[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Daily Programming Thread
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 255
Thread images: 30
File: 1436023689035.png (18 KB, 252x223) Image search: [Google]
1436023689035.png
18 KB, 252x223
Old /dpt/ at >>51494191 What are you working on?
>>
First for C
>>
File: 1447689862747.jpg (726 KB, 2048x1536) Image search: [Google]
1447689862747.jpg
726 KB, 2048x1536
How do i memory optimization?
>>
>creating a thread more than 30 minutes after an identical one when the bump limit hasn't been reached
kill yourself
>>
>>51501312

that code in the pic is making me bilious.
>>
>>51501407
THANKS FOR POSTING IN BETTER THRED

REEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
>>
Getting myself ready to do Launchcode.org's "coding challenge", basically the first step towards getting an interview with them

they say to watch this https://www.youtube.com/watch?v=YnM3dsefgvY

and then do this practice test
https://www.hackerrank.com/tests/ioa3k1bq/20d367dea19077ca7ececdd3a8fcd5e7

and then the actual thing is timed at 90 minutes with three sections and you can use whatever language you want. I dunno hopefully I don't buttfuck it so hard they laugh in the office and never call me
>>
>>51501450
what kind of bullshit test is this?
How am I supposed to solve their number counter challenge if I can't edit the main loop?
>>
>>51501312
something to replace notepad
>>
>>51501312
shows how microsoft didn't advance
they still have the same shit on the gui
nothing progressed since win 3.11

its f*cking garbage
>>
>>51501450

I can't help but notice this guy seems like a fucking idiot about solving these problems. He was given a plain English description of exactly what he needed to do, and yet was acting as if he was trying to find out what it was that the question was asking him to do.

I can fucking solve the goddamn challenge faster than him.

void countUp(int start) {
for (int i = 1; i < 10; i++) {
printf("%d then ", start + i);
}
printf("%d", start + 10);
}
>>
why isn't there a sticky for these threads

how do i get started with this programming thing lads
>>
>>51502186
go back to reddit you cancerous faggot
>>
>>51502186

>why isn't there a sticky for these threads
Because they are cyclical. No mod wants to have to sticky a thread, and then delete and re-sticky a thread every time they get too large to load.

>how do i get started with this programming thing lads
Learn C. I recommend C Primer Plus as a choice of books.
>>
>>51502452
fuck c
python
>>
>>51502590
Pythonfags are by far the worst memesters.
>>
>>51502452
>C Primer Plus

thanks

>>51502601
why is python meme
>>
File: 713455213465.png (37 KB, 1048x870) Image search: [Google]
713455213465.png
37 KB, 1048x870
>tfw solely used notepad to program C for 3 years

it was a learning experience
>>
>>51502641
Python is not a meme. C is the biggest meme.

>>51502671
>learning experience
What did you learn by doing that?
>>
>>51502733
>What did you learn by doing that?

pain.
>>
>>51501368
a) Primarily by moving you're code over to Sepples.
b) see a)
>>
>>51502733
i had previously used IDEs and let them handle the compiling and whatnot, so i didn't completely understand what was going on when i hit the "compile and run" button

i learned to use gcc and make
now i also make fewer simple mistakes (the kind that IDEs handle for you)

also this >>51502763
>>
>>51502826
Why didn't you use Vim? You would learn all that without pain.
>>
>>51502452
Why C? C++ is the first language I learned and I don't think it was necessarily helpful to do so. I think C would have been even less helpful to learn first.
>>
>>51502902
I'm not so sure either. But c/c++ teaches you very well that everything is basically nothing but a series of pointers pointing at arrays.

Knowing that changes how you program, but javascript guys get things done more quickly
>>
>>51502926
It's not really helpful 'knowing' that IMO. I don't know if that changed how I program because I started with it, but these days I expend a lot of effort into not thinking about things like that.
>>
>>51502926
You are ignorant.
Modern C++ (the proper way of writing C++) doesn't use raw pointers. Also, everything is not a series of pointers. Pointers are just features that some programming languages support.
JavaScript guys will get things done more quickly and more safely than C guys.
>>
>>51502950
Pointers still form the foundation of C++. People did overuse pointers in the past, although even with C++98 that was poor form. Thinking about memory as locations that can be accessed with pointers is... still as 'helpful' as it has ever been.
>>
should I learn python as my first language?

i learned a bit of java and I fucking hated it

println is WAY better than Systen.Out.NiGgErS.ToUnGE[].!My.Angu$
>>
>>51503108
Don't fall "Java is bad" meme. It is good.

Also, you will like Python if you don't like typing much.
>>
>>51503118
thank god

is it marketable / useful?
>>
>>51503108
Java doesn't fuck about, its names are famously verbose.

Python has shorter names and is generally shorter than Java (and more verbose in all its friggin docs, look forward to being eternally spoon-fed you entitled swine).
>>
>>51503128
If you are to have a palette of different languages, a scripting language like Python is usually worth having. If I had to chose one scripting language it would be Python.
>>
>>51503108
>i learned a bit of java and I fucking hated it
I used to hate it as well but now it's my language of choice next to c++.
>>
Can someone tell me why the resource is not applied to this button? I have this in my Page.Resources
<Style x:Key="sideButton" TargetType="Button">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Grid Background="{TemplateBinding Background}">
<ContentPresenter HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="Background" Value="#FFF"/>
<Setter Property="Height" Value="50"/>
</Style>


and this in my codebehind

Button sideButton = new Button();
sideButton.Name = "btn";
sideButton.Content = "HelloWorld";
sideButton.Style = Application.Current.Resources["sideButton"] as Style;
sideButton.Click += sideButton_Click;
rightPanel.Children.Add(sideButton);


Not sure if i'm missing something simple or completely off the mark
>>
>>51501312
> pic
Should have typed this in MS Word.
>>
do you ever have a moment where you remember why you love programming?

I was sitting around with my roommate who is working on a compiler and we were sitting and whiteboarding out ideas and I was just kind of in awe at how much fun I was having. Programming is just so satisfying when you're doing logic heavy stuff.
>>
does anyone else scrape websites only using substrings and indexof?

is there a better way? I've thought about using regex but I'm already so good at it this way
>>
>>51503302
https://www.youtube.com/watch?v=P-hUV9yhqgY

relevant
>>
>>51503298
notepad is plenty retarded to write code in
>>
>>51503302
I only have these moments on my own.
>>
>>51503302
>>51503339
i want normies to leave
>>
>>51503355
Dunno about normies but I feel like the people who say stuff like "love programming" are deluding themselves.

I don't love programming, I do it because it's the kind of habit I get into trying to make things happen. Sometimes I appreciate the result but I don't 'love' programming, that's just a step in the journey.
>>
>>51503355
Oh, you'll get your time.
Soon enough I'll have to do some work for a living and you can have your toys to yourself.
>>
What advantages would switching from sublime to emacs or vim bring me other than 1337 cred
>>
>>51503384
Wow you really are cancer
>>
>>51503420
Lots of editors have okay to decent vim bindings provided as plugins or whatnot, so learning vim could be quite advantageous in being able to work with lots of different editors efficiently.

Er and bash and gdb use commands similar to emacs so I guess that's helpful. Not really that helpful.
>>
>>51501312
>inb4 bait

>void main
>returning a value
>returning anything other than 0 for a successful run
>not using a semicolon ;
>>
File: imgur-2015_11_24-12:35:23.png (248 KB, 1512x757) Image search: [Google]
imgur-2015_11_24-12:35:23.png
248 KB, 1512x757
why would i use anything other than this beauty?
>>
>>51503463
>emacs

Well if you can use it, sure. When you get RSI you can come join the vim club.
>>
>>51503461
You missed some.
>incorrect preprocessor syntax
>string[]
>print
>indentation
>pipe
>using true in what is probably meant to be C
>>
is there a built in function in directx for transforming a vector of normalized device coordinates to screens space using a D3D11_VIEWPORT structure or do i have to do that manually?
>>
>>51503463
>const correctness
Missing some consts mate
>>
Is this as fast as it can get? The actual code is in c, i pasted it in pseudopython just to make it less verbose

running_queue = []
finished_queue = []

def worker()
while True:

# i make a local copy so that other threads
# can still push stuff into running_queue
lock(running_queue)
local_queue = running_queue.pop_all_items()
unlock(running_queue)

while local_queue:
task = local_queue.pop()
task.run()
if task.finished():
lock(finished_queue)
finished_queue.push(task)
unlock(finished_queue)
else:
lock(running_queue)
running_queue.push(task)
unlock(running_queue)


def main()
while True:
push_some_tasks()

lock(finished_queue)
while finished_queue:
task = finished_queue.pop()
task.callback()
unlock(finished_queue)
>>
I am the only one that find low level programming easier than high level programming ?
>>
>>51504017
No.
>>
>>51504017
No. I think it's because the lower you get the more well defined the things are.
>>
>>51502072
Not <=10 to save that last line???
>>
>>51504052
>>51504053
It's been two days that I'm trying to create a simple app for my ubuntu touch in QML. I never thought a language could be that bad.
Whatever. I'm going to look for another language and library to create something good.
I really wonder how people are still developing in .net and other bullshit like that.
>>
>>51503463
nice warnings faggot
>>
>>51501450
>Just for fun. No pressure. Watch this video for tips on how to rock your interview.
not sure if socially retarded or catering to pussy ass faggots
>>
>>51504165
then it would print an extraneous " then " at the end
>>
>>51502950
>>51503096
It's important to differentiate between 'user applications' (ie, the stuff being written largely by the ppl on /g/), and 'library code'.

Library code relies heavily on low-level coding approaches such as heavy pointer use. This allows them to have the efficiency demanded by library code.

User applications however isn't the place for low-level code. Rely on the abstractions provided by good library code. That way the complexity of user application code is easier to reason about, and efficient, without getting bogged down in the details of low-level structures &tc. implementations.

This is the essence of modern C++. But make no mistake, pointers are still very important, but don't typically use them you'reself.
>>
I would say python then c++ and if you still enjoy it by then pick up C# or java.

Those three langs above make for a well rounded programming toolkit.

Python os easiest -- the simple syntax and readability will allow you to focus on implementing logic into your program without getting too fustrated.

C++ is actually a lot like python, just a lot more low level too. You have to be more explicit with C++ in telling it what you want. It wont hold your hand as much as python. Youll learn about memory management and making the most out of properly designed OOP. Plus you *essentially* learn a bit of C while learning C++ (C++ = C plus a bunch of extra library stuff)

Lastly with C# or Java, its kinda the best of both words. These langs meet halfway between python and C++. These are good for making a full project but still doing so with some ease. Python is a scripting language and is good for quick problem solving but may not be the best choice for a single solution to a large project .

C/C++ could also be used for entire projects but could be more work than necessary - often, only speed critical parts of a program are written in C/C++ (as its very fast).

C# and Java are very popular in the 'real' world and a lot of enterprise code is written with these langs.
>>
>>51504359
>python
get out
>>
>>51503211
>c++
hahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahaha
>>
If you want to end up as jobless faggots like these two though..

>>51504371
>>51504394


..then just learn Lisp and call it a day
>>
>>51503108
absolutely disgusting please fuck off to >>>/vg/agdg
>>
>>51504371

Plus.

"[since 2014] Pythonis currently the most popular language for teaching introductory computer science courses at top-ranked U.S. departments.

Specifically, eight of the top 10 CS departments (80%), and 27 of the top 39 (69%), teach Python in introductory CS0 or CS1 courses."
>>
>>51504416
>>>/trash/ with your speech impediment
>>
>>51504440
as if that's a good thing
>>
for my first language, should I learn java, python, or C?
>inb4 assembly
>>
>>51504440
python really goes well with diversity doesn't it mate
>>
>>51504440
>eight of the top 10 CS departments (80%)
that's because those cs people can't code for shit, they are competent at cs but not at coding, the professors just want to make their life easier.
>>
>>51504461
Out of those three, C

But really you should start with C++.
If you learn C++, you will learn most C along the way.
>>
>>51504461
http://qr.ae/RbpIBr
>>
>>51504482
Ignore the Java fag. It's literally the worst language.
>>
>>51504440
It's simply an artifact of institutions trying to cater to women and other minorities. However industry wants less and less to do with CS programs (predictably) when looking for developers. They go increasingly to CE and EE graduates, because they have been exposed to real-world problems and those programs stress solid engineering approaches, not "muh cute fluffy bunnies".

Python itself is a nice language when coupled with good libraries, but programs using it to introduce programming are not.
>>
>>51504469

Thats also a good point. Its easier on the sudents, the professors and it teaches basic OOP and allows students to take their knowldge further with other languages.

So whats the problem again?
>>
>>51504461
none of the above?

>>51504474
this.
>>
>>51504522
Fuck off Bernie
>>
>>51504536
I swear im not bernie sanders
>>
Why doesn't /dpt/ use Common Lisp? Any reason except "I don't know lisp and it looks daunting to learn"?
>>
>>51504612
Because some of us need to support ourselves rather than relying on mommy and her spare basement.
>>
>>51504612
See
>>51504416
>>
>>51504612
It's meme tier and lacks actual api
>>
>>51503252
you really need some MVVM up in this, yo. it'll make things a lot easier in the long run
>>
>>51504482
>If you've never programmed before, I'd generally recommend Java as a first language. Python is a great language, but in its attempt to make things easier, I think it actually makes some things harder for a new programmer. Python hides too much and that makes things confusing for a new programmer.
literally this except python is a horrible language regardless
>>
>>51504612
why would i use common lisp? any reason except "hurr i'm a neckbeard neet"?
>>
File: lambda-star-red-flag.png (23 KB, 1920x1080) Image search: [Google]
lambda-star-red-flag.png
23 KB, 1920x1080
>>51501312
Building a Lisp, implemented in the following way with the help of Objective-C, YaCC, Lex, and itself:

This Lisp is called Valutron. It is architected as an integrated compiler-VM; essentially, this means that code, when entered at the REPL, is first converted into Cons trees, and then mapped down to primitive operations at the stage of evaluation. These primitive operations control a register VM, which operates on Cons cells and Objective-C objects representing Lisp values, and which is implemented as threaded code for maximum performance.

This form was chosen to make it possible to implement continuations easily and to promote good performance. At this point I have described how it implements a basic Scheme-esque Lisp. The VM, as I explained, operates natively on Cons cells. Implemented in Valutron itself are more extensible versions of some primitives like eval; these functions are registered with the VM and, from there on, replace the primitives with themselves.

Here is where Valutron offers a feature called V-expressions. V-expressions are an alternative to S-expression notation for code. They are low in the number of brackets characteristic of S-expressions, and are instead primarily algebraic-style infix. These are implemented by using reader macros. I am going to look into integrating a shift/reduce GLR parser that may have productions and rules dynamically altered at runtime, which will allow the extension and modification of V-expression syntax as well as even creating new DSLs with unique syntax.

The pièce de résistance is an object model inspired by the CL Object System, the first ever standardised object-oriented system, which was designed as part of Common Lisp. This is implemented in terms of the Objective-C runtime and hence the full dynamism of Smalltalk, Objective-C, and CLOS are available. The Objective-C runtime used was extended in order to support double dispatch, making available CLOS' characteristic multi-methods.
>>
>>51504995
gay
>>
>>51505038
2nded
>>
>>51505038
this
>>
should i make a website or a game
>>
>>51505067
website. video games are for degenerates. the world will be better off when the kikes are dead and video games are a thing of the past.
>>
>>51505073
games are equal to movies
>>
>>51505093
video games are a waste of time that kikes want you to believe are a work of art. like anime, vidya is how the kikes are trying to destroy the white race.
>>
>>51505110
like movies, they are a medium to pass information
>>
>>51505118
what info? like how you should be liberal and race mix or be a faggot? fuck that.
>>
>>51505135
k, what should the website do/ what should it contain
>>
>>51505067
a game

>>51505073
web dev/web design is top plebdom
>>
>>51505135
how to contain anit-liberal information there
>>
>>51504669
>>51504678
>>51504866
>>51504936
I said except the "I don't know lisp" reason.
>>
>>51505404
lisp is literally useless you faggot

the only functional languages worth learning are Erlang/Elixir and even those have very limited usefulness.
>>
>>51505404
why don't you obey Allah and the words of the prophet Mohammed? any reason except "i don't know islam"?
>>51505426
this
>>
>>51505446
>>51505426
>literally useless
>no explanation
Again, do you have any reason except "I don't know lisp and can't be bothered because I'm a web developer"?
>>
>>51505446
>any reason except "i don't know islam"
No, none. It's the same for you and Lisp? If so, don't bother replying because I specifically asked for reasons other than "I don't know".
>>
>>51505426
>the only functional languages
>lisp
>functional
So I was right, you don't know Lisp. Please refrain from replying if you don't understand what the adults are talking about.
>>
>>51505545
(>(>(>(/(t(r(a(s(h(/))))))))))
>>
>>51505555
>muh twitter
ishiggy...
>>
I'm currently learning C# at college - right now it's all programming for Windows phones using Visual Studio. I'm having a blast with if statements.

Also following that Bob Tabor guy's videos on C# fundamentals - they're pretty good. I've just made a super simplistic program with yes/no inputs from the user to generate new "situations" - imagine a "choose your own adventure" book but it was only 3 pages long.

God I can't wait to learn more!
>>
>>51505426
>lisp
>functional
m8...
>>
what's the most difficult language
>>
I want to display an image when I click on a button. But I want to display it on the same page where the button is located. How do I achieve that ?
>>
>>51505578
I don't have time for social media nor do I care about what any of those people have to say.
I read this shithole while I'm at work.
My quads don't lie, lisp is fucking useless. Go stroke your ego on reddit.
>>
>>51505555
>I don't know Lisp
>I don't know C
>I'm not a programmer
what DO you know, webfag? CSS?
>>
>>51505606
javascript?
>>
>>51505605
haskell by far
>>
>>51505613
>while I'm at work
did you get the CSS to render acceptably on both safari and ie8? hard stuff, wageslave, better put in some more hours!
>>
>>51505606
CSS

don't use fucking javascript ever
>>
>>51505613
>lisp is fucking useless
How would you know when you admitted you don't have a clue about Lisp? Did somebody you follow said that without offering some context? Don't be so gullible, anon!
>>
>>51505615
Oh, I'm not that guy. My first reply in the thread was the quads one. I do in fact know C, it's the main language I program in when I have time. I don't work as a programmer.

I did try webdev. I hated it. Back when I was nine I had my first website online. Complete with javascript fireworks which I copy/pasted in. Back when I was nine, that was a common thing to see, though. geocities/homestead/angelfire or whatever.

>>51505641
>wageslave
Here's your (You) while you sit at your parents house wearing out your parens, buttercup!
I'll be in my office.
>>
>>51505650
found the framework fag
>>
>>51505622
>>51505650
I'm working with ASP.NET MVC and C#. But I guess it can be done with simple HTML.
Any code ideas ?
This is what I have so far but it opens the image in a separate cshtml.
<input type="button" value="Create" onclick="location.href='@Url.Action("DrawChart")'" />
>>
>>51505673
>I don't work as a programmer
>I had my first website
>javascript fireworks
Your opinion is irrelevant here. Go post in a homescreen thread.
>>
>>51505681
javascript fags are the framework fags you fucking tard. if you can't code CSS by hand you fail at life.

>>51505694
i bet you'll get better answers in >>>/g/wdg
>>
>>51505707
Thank you.
>>
>>51505694
Mate, you have no fucking clue what you're doing. You're trash, you're not a programmer. The "simple HTML" contains javascript, web monkey.
>ASP.NET MVC and C#
You're in over your head. Better quit and go flip some burgers.
>>
File: Logo_lisp.gif (11 KB, 700x385) Image search: [Google]
Logo_lisp.gif
11 KB, 700x385
>>51505038
>>51505044
>>51505056

How is it gay?

>>51505598
It's probably part of the key aspects that make a Lisp a Lisp that the language is built on the Lambada calculus. A model of computation that focuses explicitly on the application of functions.

>Here's your (You) while you sit at your parents house wearing out your parens, buttercup!
>I'll be in my office.
Have fun with that alienation and insignificance.
>>
>>51505707
>code CSS by hand
badass over here! great skillz, webtrash!
>>
>>51505728
https://en.wikipedia.org/wiki/Gay_lisp
>>
>>51505701
So because I showed interest at a young age in creating stuff, don't have a job as a codemonkey and program in C for my own pleasure and knowledge, I belong in a homescreen thread and my opinion (which it is just that, as is yours) is irrelevant?

Damn. I guess I'll be on my way then. I clearly don't belong here since I don't get paid to program and built a website almost 17 years ago while you were still probably swimming in your father's balls.
>>
>>51505728
>Have fun with that alienation and insignificance.
i've seen some projection in my life but holy shit
>>
>>51505728
>It's probably part of the key aspects
It's not. Please, if you don't know what you're talking about, do us all a favor and stop publicly embarrassing yourself.
>>
>>51505613
>I'm at work
so how does it feel to be a wagec.u.c.k wasting your time working? I'm a NEET and have unlimited freedom not being enslaved by my jew boss to make him more money.
>>
>>51505743
>young age in creating stuff
>built a website
>don't work as a programmer
>I'll be on my way then
Sounds about right.
>>
>>51505722
U wot m8 ?
Give me a suggestion then.
>>
>>51505743
>don't have a job
>website
>homescreen thread
>opinion is irrelevant
>don't belong here
git gud, fgt cuk
>>
>>51505743
>26 year old trying to play the oldfag card

>I did try webdev. I hated it. Back when I was nine I had my first website online. Complete with javascript fireworks which I copy/pasted in. Back when I was nine, that was a common thing to see, though. geocities/homestead/angelfire or whatever.
tippity top kek
>>
>>51505673
>can't write 2 sentences to defend opinion on lisp
>blog post about his "early life as webfag"
Seriously, m8? And you expect not to be ridiculed?
>>
>>51505779
So what you're saying is you literally have no argument. Good shit.

>>51505771
Feels pretty fucking good. I'm treated with respect here. Wasting my time? I enjoy coming to work. Much more fulfilling earning my own money, supporting myself, you know, like an adult. Stay manchild.

>>51505798
Don't have a job as a programmer. Context, reading comprehension, git non-retarded.

>>51505728
No alienation. No insignificance, at all. Project and assume more.

I'm done entertaining lispfaggots now. You all have a wonderful day.
>>
>>51505743
Nice blog. How about elaborating on why "lisp is useless"? Can't? Oh, you don't actually know anything except the HTML you "created" 17 years ago? Figures.
>>
>>51505827
Your "ridiculing" is weak at best and will be forgotten by the end of my shift. You're the insignificant one here.

>>51505817
>trying to play the oldfag card
How'd you extrapolate that?
>>
>>51505842
Missed the part where I said I know C, hm? I didn't say that was all I knew either, but I'm not wasting my time "proving" myself to a) lisptards b) people in a thread who struggle with fizzbuzz.

On this note, I'm off to take an early lunch, maybe go for a walk, get paid for it; that ol' tune.
>>
>>51505846
>built a website almost 17 years ago while you were still probably swimming in your father's balls
???
you're acting as if you made one of the first websites from scratch and hosted the server yourself back in the 90's or someshit. if you had an angelfire website or someshit with copy-pasted javascript code that's nothing worth mentioning
>>
>>51505830
>>51505846
>treated with respect
>webfag
hahahahaha literally the trash of the industry
>don't have a job as a programmer
clearly, you're not good enough for it
>insignificant
yes, you are
>I know C
>struggle with fizzbuzz
bwahahahaahha, that's you level? no wonder you can't find a job as a programmer, htmlboy
>proving myself
what you've proven is that your shit; stay pleb
>>
>>51505876
I wrote the HTML myself and clearly stated I did not write the JS. At nine, seeing my site online was pretty great.

>>51505885
You can't read so our conversation is over.
>>
>>51505842
>How about elaborating on why "lisp is useless"?
>>51505871
>I said I know C
top lels (also, no, you don't know C, we can all see through your bullshit; try lying about javascript next time)
>>
>>51505902
how fucking fascinating. please, tell us more.
>>
>>51505902
>I wrote the HTML myself
such achievement! hahahahahaha
>>
>>51505902
>discussion on lisp
>I wrote the HTML
dem mad skillz tho
>>
>>51505930
What'd you do at nine? Experiment with your dicks at a best friends sleepover party?

Or maybe you turned on a computer one night after dreaming in code and churned out some Enterprise Yava software? Do tell.
>>
let it go
>>
>>51505959
>yava software
anon...
>>
>>51505974
Aight.
>>
>Go lacks muh generics
https://golang.org/doc/effective_go.html#type_switch
>>
File: amazeballz.jpg (5 KB, 200x150) Image search: [Google]
amazeballz.jpg
5 KB, 200x150
>>51505902
>I wrote the HTML myself
>>
>>51505959
i made a website on a free hosting site for fun at like age 10 and each of my neopets had its own webpage faggot
>>
>>51505959
>at nine
>experiment with dicks
>best friends
>Yava software
this anon clearly has discovered the path to enlightenment :^)
>>
>>51505990
>I have selective reading issues!
>>
>>51506017
>HTML
>programming
ebin meme fá Žam
>>
>>51506079
Could you please point me to the post where I said HTML was programming as opposed to a mark-up language? Never mind. I see you're just shitposting. Have fun with that, champ.
>>
>>51506094
>programming thread
>lisp question
>muh html achievements
you dun goofed, weeb
>>
File: 1447802034726.webm (715 KB, 600x338) Image search: [Google]
1447802034726.webm
715 KB, 600x338
>>51506017
>buttflummoxed
>>
>>51506116
Now you're assuming I like anime, which I absolutely don't.
You also must be the person who I've deemed unable to read, since my "html achievements" were in reply to probably you, who assumed I didn't know lisp/C/I'm not a programmer, assumed I'm a webfag, and assumed I only did CSS.

All you have are half-assed assumptions based on nothing to defend yourself mixed in with some ad hominem. It's great.
>>
>>51506145
you keep posting multiple line comments "bragging" about stuff you've "done" but can't write 2 sentences regarding a simple question on lisp; everyone can see you're full of shit and don't actually amount to much
>>
https://www.bento.io/grid

so which one? , anons
>>
>>51506145
>implying I know lisp and C
>not a word about lisp nor C programming
>shitposted half the thread about my html prowess
anon, this looks fishy...
>>
>>51506145
>csscuk
why live?
>>
enough
>>
>>51506168
>keep posting multiple line comments bragging
>literally mentioned one thing which keeps being addressed yet that's my problem it's being dwelled upon.

>>51506202
I don't even know CSS. When I had the slightest interest in making a webpage (and I only made one), CSS wasn't around.
>>
>>51506079
>Putting tags into a text file

Literally this desu senpai
>>
>>51506218
Nevermind, I was looking at counter-strike source.
Apparently CSS was around but I hadn't heard of it then. Only for a year or so it looks like.
>>
File: hmm, yes.jpg (34 KB, 396x303) Image search: [Google]
hmm, yes.jpg
34 KB, 396x303
>>51506218
>I don't even know CSS. When I had the slightest interest in making a webpage (and I only made one), CSS wasn't around.
>>
>>51506248
>Nevermind, I was looking at counter-strike source.
oh shit nigger could you BE any more clueless
>>
>>51506262
I blame Google. Maybe my not paying attention a little bit as well.
Honest mistake which I corrected.
>>
>>51505755
What the fuck is it then? John McCarthy himself says as much in his 1960 paper about Lisp, Recursive Functions of Symbolic Expressions and Their Computation by Machine.
>>
>>51506315
It's multi-paradigm.
>>
All you guys constantly ridiculing web devs are acting like retards and need to grow up. Absolutely disgusting.
>>
>>51506462
I know you are but what am I?
>>
>>51506462
we ridicule all retarded faggots, not just web devs
>>
>>51506462
Well. At least I'm not a web dev.
>>
>>51504612
GC and massive binaries.
>>
>>51506544
Same as Java, C#, Go.
>>
>>51506325
What does that have to do with its foundation upon the Lambda Calculus?
>>
>>51506646
>functional
>>
>>51506620
Those are all shit as well of course.
>>
>>51505981
Well I spent 10 minutes typing up a response only to have a window pop up and backspace take me back a page. Fuck built-in keybinds. All programs should have fully user customizable keybinds.

Anyway, it isn't type safe. Imagine a func that takes two or more maps and performs a union on their elements with key precedence going to maps listed first. Well you could have the function declaration look like this:
 func mapUnion(a, b, map[interface{}]interface{}, ...map[interface{}]interface{}) (interface{}, error)
but there are problems with this. Well, the user must explicitly convert their maps to map[interface{}]interface{} before the function call. To alleviate this you can make the arguments just pure interface{}. Now what must be done by the function? It has to fist check that all parameters are maps and that all the maps have the same type (or you could do it so that if the types are different you put everything into a map[interface{}]interface{}, but that will be impossible to deal with as I'll get to).
Here's where shit gets gay. If you use the type switch you talked about you either 1) have to write a 400+ line type switch to deal with all the built-in types as both keys and values, AND not be able to cover any user defined types, or 2) use the reflect library which is slow and stupid unsafe.
Finally you have to return the finished map, which you can do as a map[interface{}]interface{} or as an interface{}. The second is better because you can just do a simple type assert instead of a copy and assert. However you can't just do that, you have to make the user checks the error before doing the type assert or you might be type asserting a nil, which is bad. And of course doing this precludes the ability to mesh maps of different types because the type of the map output is indeterminate unless you know the types of all the maps going in.

The entire process is shitty as fuck. Thank god that go generate exists so you can do template generics.
>>
>>51501368
nice bomb Ahmed
>>
>>51501368
hey, what are the 3 circles
>>
>>51506544
>>51506680
Then the "answer" doesn't answer the question. In case you're blind, the question was "Why doesn't /dpt/ use Common Lisp?"
In case you're an idiot, logic works this way:
/dpt/ uses Java, C# and Go.
/dpt/ doesn't use Common Lisp.
"GC and massive binaries" does not discriminate the two sets, thus is not an answer.
Wanna try again?
>>
>>51506743
Detonator buttons.
>>
>>51506771
c'mon, I had some electrical engineering
>>
>>51506743
Not him, but probably +1, -1, reset to 0.
>>
>>51506785
They are buttons. Do you think I would lie to you anon?
>>
for programming, I see
>>
File: C++vsObjC.jpg (62 KB, 728x546) Image search: [Google]
C++vsObjC.jpg
62 KB, 728x546
>>51506544
>GC and massive binaries.
Garbage collection is much more optimised than the atrocious excuses for programs and libraries pumped out by C fanatics who don't understand that C must be treated with extreme respect in order to avoid anything from leaking memory to segmentation faults.

In fact, manual memory management with malloc() and free() directly is one of the least efficient forms available. There's a reason why applications where high control of memory is important, for example game engines, usually implement arena/zone allocators and deletion queues instead of throwing malloc() and free(), primitive instruments, all over the place.

Manually managing your memory today, without doing so only so you can implement a more advanced system atop (like the systems found in game engines,) or in situations like OSdev where you have no choice, is nothing more than cargo-cult posturing.

>>51506667
What is your point?
>>
>>51506843
>Garbage collection is much more optimised
Wrong. Stooped reading right there. Nice blog tho.
>>
>>51506843
>usually implement arena/zone allocators and deletion queues
Because they can, faggot! Try to do the same in your shit GC language.
>manual memory management let's you manually manage memory
Any more revelations, snowfag?
>>
Seems /dpt/ doesn't use Lisp because they're a bunch of retards than accidentally stumbled upon this thread while looking for /wdg/.
>>
>>51506913
"Nice blog" is a concise way to say "I'm a dumb shitposter"
>>
>>51507028
Nah, it's a concise way of saying "you're rambling again, sperg, if you need that many words for spewing drivel there's no wonder you can't learn anything and can't be taken seriously so I won't waste time bringing you counter arguments that you won't understand anyway".
>>
>>51506756
/dpt/ does not use Java,C# or Go.
Wanna try again?
>>
>>51507212
Is this your first day?
>>
>>51506843
>C must be treated with extreme respect in order to avoid anything from leaking memory to segmentation faults.
>usually implement arena/zone allocators and deletion queues instead of throwing malloc() and free(), primitive instruments, all over the place.
You're contradicting yourself you retard.
Implementing memory arenas is easy and makes memory management dead simple (and very efficient).
>>
>>51507212
>i thought this is the homescreen thread
fá Žam...
>>
>>51507230
Is it yours?
>>
>>51507262
my what, anon?
>>
File: 1436023689035.png (25 KB, 252x223) Image search: [Google]
1436023689035.png
25 KB, 252x223
>>51501312
>>
>>51506997
>Because they can, faggot! Try to do the same in your shit GC language.

I already did. Specifically, I wrote a precise-tracing incremental garbage collector with copying for Valutron. I implement the core of the VM in Objective-C; I maintain my own Objective-C runtime library that includes a conservative tracing garbage collector, which is bypassed for much of Valutron since I have written a superior GC for its use, unconstrained by the limitations of the C memory model.

This is wildly different to "hurr durr i can use malloc and free directly lets use them instead of leaving the work to a library that knows better :D."

>>51506913
http://blogs.msdn.com/b/ricom/archive/2005/05/10/416151.aspx

Take a look here.

Note that, until Chen had wildly optimised his dictionary to a degree that is totally inappropriate for all but the very most performance-intensive applications, the garbage-collected dictionary had superior performance. I won't get too much into how this works, but it is probably a product of techniques like deletion queues (which allow the program to free a whole set of garbage at a convenient time, rather than inline one-at-a-time, which is slow) and generational collection (which is designed to allow the very quick freeing of objects that aren't used for long.)

>>51507252
What are you talking about? Of course implementing arenas is easy. It is also a style that is NOT suited to everything; good luck taking your average piecemeal-deallocating program and trying to convert it to the 'all-at-once' arena model! It really has to be designed with such paradigms in mind.
>>
Recommend me a new language

New
Old
Experimental

Anything.

I've been trying Lobster today, its pretty interesting. I'd be interested to see if anyone has done any performance testing with it.
>>
>>51507358
>It is also a style that is NOT suited to everything;
Yes it is.
>good luck taking your average piecemeal-deallocating program
You would never do that in the first place.

Actually even arenas are overkill most of the time, a large chunk of every day programs can get by with ZERO dynamic allocation (i.e allocate everything you need at startup statically, program runs to completion with no allocation/deallocation at runtime).
This is especially true on 64 bit platforms which has massive address spaces.
>>
>>51507424
Try Java
>>
>>51507424
brainfuck and ook.
>>
>>51507424
haskell
>>
>>51507424
Why don't you master one anon, knowing one or two languages real well is better paying than knowing 6
>>
>>51507358
>Valutron
Who? Ah, your toy shit that can't hold a candle to fucking javascript? hahahaha
>core of the VM in Objective-C
You already failed, faggot.
>my own Objective-C runtime library
hahahha; yo dawg, I pus a GC on your GC so you can randomly freeze while you randomly freeze
>limitations of the C memory model
Now you're just throwing buzzwords, you fucking baboon can't possibly know what a "memory model" is, much less the "C memory model".
>garbage-collected dictionary had superior performance
well memed
>>
>>51507358
>to a degree that is totally inappropriate for all but the very most performance-intensive applications,
This way of looking at things is why we have web browser which uses 2gigs of ram and chokes on low powered laptops, Visual Studio takes longer to cold start than my OS and despite the fact that computers have gotten several orders of magnitude faster the general computing experience has gotten more sluggish.

For people who care about software quality and the users experience, performance is ALWAYS important.
>>
>>51507468
I do know a language or two well. I just like trying new languages. I really want to try something that makes me think in a fundamentally different way and I think maybe I should actually try to learn >>51507466 instead of just messing around with it (because people often say it requires a different kind of thinking to program in it)
>>
>>51507539
don't learn haskell it's a meme language

learn elixir instead
>>
>>51507539
yp, it's more mathematical. is this language useful though
>>
>tfw no programmer bf
>>
File: 1447370649503.jpg (969 KB, 1024x1467) Image search: [Google]
1447370649503.jpg
969 KB, 1024x1467
>Java "programmers"
>>
>>51507632
>lgbt invasion
>>
>>51507654
Just a brainwashed generation with little-to-no hope.
>>
>>51507654
what does a straight cis female wanting a programmer bf have to do with lgbt?
>>
>>51507698
Just because you wear your mother's bra and kneesocks and undergo HRT doesn't make you female.
>>
>>51507698
rule 30
>>
>>51507499
>toy shit
It's been turing-complete for a while now.

>You already failed, faggot.

Cry more. Sorry you don't like Objective-C

>randomly freeze
Do you really think that, after 5 decades of research, that would *still* be a problem in well-designed garbage collectors? Hint: it isn't.

>fucking baboon can't possibly know what a "memory model" is, much less the "C memory model".
Lol. You seem upset. Like many terms in computer science, it is overloaded with multiple definitions. In this instance, this baboon is referring to C's very low-level structure, the inability to discern pointers from integers, and the layout and existence of the stack. If you are an obsequious FizzBuzz champion like yourself, you would fail to immediately realise what is meant and start rattling out a random insult.

>well memed

Read for yourself.

>>51507531
Is that memory management to blame, or architecture? I would suggest the latter, of which memory management is just a component. Both Firefox and Visual Studio are huge and there are no doubt myriad ways they can be improved, and looking to their memory management is one approach.

That being said, I can't support optimisation until a program becomes totally incomprehensible and gains a large and confusing codebase except where eking out the final 2% gain is truly important.

>>51507448
>Yes it is.
No it isn't. Allocating memory in blocks that are released at once is not the right way for many situations where you need piecemeal control of data. That's not to say that there are projects that can benefit from arena allocators and projects that can't - in most projects of any size, there are areas where arena allocation is sensible. But it's not a panacaa.

>a large chunk of every day programs can get by with ZERO dynamic allocation

I don't disagree that many can. I don't usually write them. Most of my programs deal with indeterminate input and have no set point of termination.
>>
>>51507725
>projecting

>>51507729
are you 12 years old?
>>
>>51507758
I don't think you understand what projecting is.
>>
>>51503463
>all that boilerplate
>>
>>51507736
>It's been turing-complete
srs bsns
>*still* be a problem in well-designed garbage collectors? Hint: it isn't
what is HotSpot
>memory model
>overloaded with multiple definitions
no, you just don't know what you're talking about and want to sound fancy
>C's very low-level structure
>inability to discern pointers from integers
you don't know C
>layout and existence of the stack
no such thing in C
>memory management to blame, or architecture? I would suggest the latter
yes, architecture, like using a gc language
>final 2% gain
more like 50% gain over gc languages
>piecemeal control of data
not in gc languages
>my programs deal with indeterminate input and have no set point of termination
if you don't know that dynamic allocation is not required for that there's no wonder you're spewing so much ignorant crap
>>
>>51507785
"Psychological projection, also known as blame shifting, is a theory in psychology in which humans defend themselves against their own unpleasant impulses by denying their existence while attributing them to others."

either YOU don't understand what projecting is, or you have some serious difficulties with reading comprehension
>>
>>51507584
not that anon, nor do I know Haskell, so I'm talking out of my ass, but it's supposed to make you solve problems at a higher level before you start writing code. If that's true, it could benefit his coding in his primary languages.
>>
>>51507882
Precisely. Nice google definition since you clearly couldn't explain it without a reference.
I have no "unpleasant impulses" nor am I denying a want to be a sissy faggot. I was born male, I'll always be a male, and you're deluded to think wearing clothes and taking drugs changes what YOU'RE running from.
>>
>>51507886
idk, I've looked into it and it seems more mathematical, c++ seems more close to the machine.
eg. in Haskell you define an array of natural numbers [1,2,...] which is of infinite size and it's evaluated only when called
>>
>>51507634
have huge tits? I don't understand
>>
>>51507926
get ladies
>>
>>51507654
>lgbt invasion of a thread dedicated to a lgbt field
What, do you think Alan Turing and Grace Hopper were straight?
>>
>>51507916
>I have no "unpleasant impulses"
you obviously do if your first reaction to someone calling themselves cis was to claim the opposite

only someone obsessed with the idea would make such a challenge

>I was born male, I'll always be a male
sounds like denial to me
>>
>>51507970
faggot, or something?
>>
>>51508005
>sounds like denial to me
Sounds like acceptable, which clearly you're not used to
>first reaction
Look where you are and look at the flamboyant statistics. Assumption, sure; without reason? Absolutely not.
>>
>>51508011
uh?
>>
Did you all read Programming: Principles and Practice Using C++ by Stroustrup as someone first starting to get into programming?
>>
>>51508046
Acceptance*
>>
Sup, recommended reading for C#?
>>
>>51508076
http://learnxinyminutes.com/docs/csharp/
>>
what are the best "c for dummies" kind of websites
>>
>>51508076
https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/TheBasics.html#//apple_ref/doc/uid/TP40014097-CH5-ID309
>>
>>51508105
suicide://kil.l-yourself.read/a.book
>>
>>51503252
Listen to this guy
>>51504871

MVVM makes this so much easier.

Also for some extra fun try out prism with unity and make your stuff modular.
>>
>>51507736
>Allocating memory in blocks that are released at once is not the right way for many situations where you need piecemeal control of data.
What situations?
If you need tighter or hierarchical control you just nest them in a stack.
There's never a reason to have arbitrary allocations happening all over the place, that is just plain bad design from the start.
>>
>>51508046
that is definitely not what acceptance sounds like. there is literally no reason to be as defensive as you are, if it weren't for the fact that you find the reality of actually having these thoughts uncomfortable
>>
>>51507867

>no, you just don't know what you're talking about and want to sound fancy
I'd say that's the same of you

>you don't know C

But I do. I know it better than you, it seems - do you just write FizzBuzz all day?

0x1234
0x1234
Which is a pointer? Which is an integer?

>no such thing in C

I've never seen a C implementation that doesn't use a stack. The concept is thoroughly intertwined with C to the heart.

>yes, architecture, like using a gc language

No, FizzBuzzlord, that's not what I'm talking about. I am thinking instead about considerations like XUL, the process model, the system of IPC, the interaction of these.

>50% gain

Maybe. Maybe not. Maybe you'd get a 200% loss v.s. garbage collection. 50% is not a huge gain except in performance-critical areas, of course.

>not in gc languages

Yes with GC. Stop saying GC by the way - it betrays your lack of understanding as to what garbage collection is, because its implementation is rarely specified in detail in any language specification. Anyway, with GC it is possible for a single unreferenced object to be freed, rather than a whole arena. Many GCs use arenas as well and copy data out of them if necessary. It's a very complex algorithm usually and I won't bother trying to explain it fully.

>50% gain

Maybe. Maybe not. Maybe you'd get a 200% loss v.s. garbage collection. 50% is not a huge gain except in performance-critical areas, of course.

>not in gc languages

Yes with GC. Stop saying GC by the way - it betrays your lack of understanding as to what garbage collection is, because its implementation is rarely specified in detail in any language specification. Anyway, with GC it is possible for a single unreferenced object to be freed, rather than a whole arena. Many GCs use arenas as well and copy data out of them if necessary. It's a very complex algorithm usually and I won't bother trying to explain it fully.

>>51508164
Consider the representation of contacts in an instant messenger.
>>
>if you don't know that dynamic allocation is not required for that there's no wonder you're spewing so much ignorant crap

You are the one spewing ignorant crap. I doubt you've ever written anything other than FizzBuzz. Maybe a Sudoku solver at most.

How do YOU propose to solve this problem? Don't say 'use static pools' because they cannot cope with indeterminate memory usage, and you would implementing a dynamic allocator, however crude, atop these. Don't say stack allocation either - the stack is, in fact, much like a stack of arenas, from which you may dynamically allocate memory.
Thread replies: 255
Thread images: 30

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.