/dpt/ - Daily Programming Thread

What are you working on, Sup Forums?

Previous thread:

Other urls found in this thread:

youtube.com/watch?v=RdE-d_EhzmA
youtube.com/watch?v=F-HIuQHy_84
vimeo.com/9270320
en.wikipedia.org/wiki/Greenspun's_tenth_rule
github.com/cblp/yaml-sucks
twitter.com/NSFWRedditImage

C is a shitlang and just as dense with pitfalls as C++.

gimme your favorite programming talks/keynotes, lads.
Looking for some more.

Reminder that most people here are beyond help

did you intend to sponsor it? what kinda game did you want? id rather program a game that i have no interest in playing than break my back in the heat all summer again...

youtube.com/watch?v=RdE-d_EhzmA

youtube.com/watch?v=F-HIuQHy_84

Lisp is dead.

>Lisp is dead.
Behind these parens there's an idea...

Lisp has been on perpetual life-support since its inception. Only recently has the JVM, and what lisp zealots consider a heretical flavor, made it sort of relevant. But Clojure has yet to really make a dent in Scala, so that's about it.

how about getting a desperate art student to go in with you (just go full hollywood accounting and offer him 50% of "profit.)" literally 90% of the success of any game that can be coded by one guy depends on the art. especially if it a "retro" game.

A failed idea.

for the game that you want?
yeah hook me up with with the art student,
but for my game i wouldnt need it.

in fact ill find the art student just tell me what kinda game youd gonna pay me to make...

he's probably referring to how it doesn't fit the assignment in that it contains neither error handling nor 1 function

>A failed idea.
The "failed ideas" of lisp are being copied and integrated into mainstream languages to this very day, tard.

Not to me but the curse is strong.

vimeo.com/9270320

Please use an anime image next time.

>What are you working on, Sup Forums?

Exploring the deepest, darkest corners of Racket. Advent of Code 2017.

How do I reach the argc and argv of a qt plugin?
Or how do I fake it?
I don't need any arguments, just the name of the application, is it the name of the main application or is it the name of the plugin?

What exactly are they?

Explicit support for recursion, tail call optimization, garbage collection, higher-order functions, dynamic typing, the REPL, multimethods, metaprogramming by transforming the syntax tree, and those are just the things I can think of off the top of my head.

As long as emacs is still used, lisp implementations will still be around. However it will prob be transformed to pretty much something completely different if its not already.

>What are you working on, Sup Forums?
Well, nothing now
quicksort=:(])`( (([:$:(#~(=&_1))),(#~(=&0)),([:$:(#~(=&1)))) ([:*]-]{~[:?#) )@.([:(>&1)[:#])
NB. A pivot (B )(C ) agenda for recursion
NB. A.return input if selected by agenda; agenda selects if #input is 1
NB. B.subtract pivot value from y; return signs of results
NB. C.monad (]fg) fork = monad hook: select pivot: random index method
quicksort?30$20
0 1 2 2 2 2 3 5 7 8 8 9 9 10 11 11 13 14 14 15 16 16 16 16 17 17 18 18 19 19

>GC is a good thing
>dynamic typing is a good thing
>REPLS are useful

LIsp may have introduced some good things, but it brought just as much shit as well.

>write fizzbuzz on windows 10
>open powershell
>compile
>program.exe
>command not recognized xdddddd
fuck powershell
seriously

Explain why dynamic typing is a good thing.

>GC is a bad thing
I love this meme

en.wikipedia.org/wiki/Greenspun's_tenth_rule

>moving the goalpost to a discussion about his purely subjective opinions
I just gave you a partial list of things pioneered by lisp, some of which are only now being adopted (like sane metaprogramming support), which reduces your claim into the meaningless "b-b-but nobody uses the original LISP syntax", and even that is false given emacs lisp, Clojure, Racket etc.

GCs are a hindrance.

>not having to worry about managing memory is a hindrance

>explain why my subjective opinion is wrong
I don't care. My statement wasn't that dynamic typing is "good".

>what is concurrency

So Lisp is the cancer that brought us dynamic typing?

I never said Lisp's ideas were useless, i said Lisp itself is useless, and has barely any relevance. Its ideas are not tied to it.

>i said Lisp itself is useless
Lisp is the collection of ideas that constitute it, and most of those ideas are alive and well today, and even the ones that were initially unpopular outside of Lisp itself (mostly metaprogramming, some aspects of CLOS) are suddenly gaining traction.

>and has barely any relevance
You mean except for the huge shaping influence it's had on programming language design? I hate to repeat myself, but:
>which reduces your claim into the meaningless "b-b-but nobody uses the original LISP syntax", and even that is false given emacs lisp, Clojure, Racket etc.

>muh monkeyish subjectivist drivel is relevant
It isn't, though.

Just because Nim has arbitrary AST manipulation , doesn't mean it's suddenly tied to Lisp. Yes, Lisp brought the idea, but Nim doesn't make Lisp any more relevant because of it. This is the bullshit you Lisp zealots love to do, you're like a leech that tries to attach to everything because your language just happened to be first. Lisp is pretty much dead, but new and better languages are learning and taking its idea to better places. Pretty much like C.

>Just because Nim has arbitrary AST manipulation , doesn't mean it's suddenly tied to Lisp.
Its author actually explicitly acknowledged Lisp as the influence behind Nim's metaprogramming features. My original statement () still stands, you butthurt little worm. Now go get that bleeding asshole of yours stitched.

The lisp lore and community are amongst the biggest. almost everyday there is an article involving lisp on the front page of hacker news.

> the language that invented the concept got recognition for it
amazing
And yet LIsp is still irrelevant and theres no amount of mental gymnastics you can do to change that.

>And yet LIsp is still irrelevant
It's so "irrelevant" that even lisp-like metaprogramming is making its way into the mainstream, so soon enough you'll be screeching about how it's irrelevant and useless while mainstream dynamic languages have all the features of Lisp and with almost identical semantics, only different in syntax. Now stop shitting and drooling all over the thread, you fucking rodent.

Why are you championing Lisp's ideas instead of Lisp itself?
Shouldn't that tell you something about the language (family) if people choose to take the good and leave the actual language to die? And 13 yo insults doesn't make your case better, lad.

>irrelevant
compared to what? nimrod? sure.

>File: God.jpg

posting self promotion images in daily threads should be a bannable offense

most people are trying and failing to acquire passable C++ skills while scripting in python and obscure shit, but mostly in python

Many artists today would no doubt cite the Rolling Stones as an influence. They released a new album in 2005. But are they still relevant in the music world today? No.

>Why are you championing Lisp's ideas instead of Lisp itself?
Which language is "Lisp itself"? Is it LISP 1.5? Common Lisp? Scheme? Racket? Clojure? Lisp is not a single language. Lisp is dynamic typing, dynamic compilation/evaluation, dynamic binding, garbage collection, reflection, preference function style while supporting imperative as well, metaprogramming and homoiconicity. Lisp didn't just come up with many of the ingredients, but it pioneered the entire recipe that modern dynamic languages follow almost to a T (excluding homoconicity). You can call this combination Anti-Lisp for all I care, but anyone older than your ripe age of 12 knows what it really is under the surface syntax.

as if there were demand for C++ programmers

>Lisp is dynamic typing
not necessary.

Lost my time with Javascript, Java, start react.js and node.js

>Many artists today would no doubt cite the Rolling Stones as an influence. They released a new album in 2005. But are they still relevant in the music world today? No
If half of modern day bands were basically Rolling Stones wannabes in slightly different outfits, you could screech that the Rolling Stones are dead and irrelevant until your autistic little throat starts bleeding, but it wouldn't change the fact that the essence of their music endures.

What would Shen be since it breaks many Lisp fundamentals? And i mean the general popularity and progression of CL, Scheme and the popular Lisp flavors. But I guess they're all perfect and never need to change or grow in Lisp zealots opinions.

>What would Shen be since it breaks many Lisp fundamentals?
An entirely different language.

>but I guess they're all perfect and never need to change or grow
Change and grow by incorporating your purely subjective opinions? I'm all for improvement. What are your suggestions?

I hate YAML (the file format).

I thought XML was bloated and JSON was annoying, but YAML looked sane.

I was wrong. It's the goddamn Perl of serialization languages. The problem is that you can define things in lists, dictionaries/hashes/whatever-they're-called-in-your-language or just plain comma-separated strings and whatever, and even MIX them all in arbitrary ways, making sure that extracting data from a YAML is real pain. You really don't have any other choice except saying "define your data using *THIS* exact syntax (a subset of all what YAML syntax permits), or it will not be loaded".

It's TOO flexible. And in my case, my program has to accept user-written YAML files.

I so fucking hate YAML. Hate. Hate. Hate.

I guess my improvements would basically kill its core syntax since i think proper functional langs do it better. And that's where we'd disagree so we can just stop.

>But I guess they're all perfect and never need to change or grow in Lisp zealots opinions.
Schemes suck. The standard is too small and every implementation ends up implementing most of CL but in non-portable way.
CL is pretty much perfect considering you can program the reader and make it work how ever you want. The only things to maybe update on CL would be changing away from dynamic binding of functions, maybe I consider it a good thing. Make it so the implementation doesn't have to provide repl/debugger, maybe that way there could be compiler that can deploy small executables. Not every executable needs to have the repl/debugger in it.

same as before

In Java, what's the best way given an JSON array return a new one with the sum of the types?
Do you really have to iterate over the dictionary and increment counters bla bla...?

Example: given this:
"data": [{
"id": "1234",
"name": "John",
"type": "LIKE"
}, {
"id": "45567",
"name": "Bob",
"type": "LIKE"
}, {
"id": "7642",
"name": "Ashley",
"type": "LOVE"
}]


return this
"result":[
"like":2,
"love":1,
"sad":0,
]

sounds fun

So it's all just autistic syntax rage, and nothing of substance about the combination of features that constitutes the core idea and the associated programming style.

Yes, that is a common criticism of YAML.
If I was to go for some config file format, I would go with TOML or some other INI-like format.

github.com/cblp/yaml-sucks

>the essence of their music endures
>essence
do you not see how this is not the same thing as the music itself enduring

>do you not see how this is not the same thing as the music itself enduring
It's the same music performed by people in new costumes, and if they're good at it, it might as well be the same music. Either way, my original statement was:
>Behind these parens there's an idea...
But so far you do nothing except screeching about the parens, and what else can you do? The idea is still alive, as already explained.

>So it's all just autistic syntax rage
No, type stuff and syntax, static typing, no type inference, dependent types, type annotations. Lisp is a trudge to tread by trying too hard to bank on its "core" syntax.

The same score*

Anyone here try microdosing LSD? And how it felt when you were writing code, and daily life?

>muh subjective opinions about static typing
How is it relevant to the discussion?

>how are types relevant
Ah yes, here we go with the "everything i don't like isn't valid".

we can actually stop now.

>"everything i don't like isn't valid"
Never said that, you mental cripple. It's more the case that you think your subjective opinions about typing are the only valid ones, and that they objectively constitute an "improvement" over a system that avoids static typing as a design principle. So yeah, it's plainly irrelevant to the broader discussion, and almost as plainly irrelevant to the sub-discussion about how Lisp can be improved.

dumb

Why is Rust so comfy? Am I turning gay?
>fast
>compiles to a native binary
>proper error messages
>good tooling
>good library support
But... the only thing that pisses me off, is that clippy (linter) and rustfmt (formatter) require the nightly compiler.

>Why is Rust so comfy?
Because you're doing fizzbuzz, so you never hit its dumb limitations.

Yes, how else would you do it? I'm sure there's a library that can do this but it's literally five lines of code who cares.

nice

>>good library support
spotty 3rd party library support*

isnt microdosing LSD equivalent to taking serotonin-based antidepressants?

>dumb limitations
Like what?
Good enough for my use case.

i thought there was things like
json_array.sum().flat().whatever()


that did the job

>Good enough
a phrase that should never describe anything about a programming lang. But glad you're enjoying yourself atleast.

>REPLS are useful
they are tho desu
i agree with the other points

Actually, there are very few programming languages with a vast amount of high quality libraries available. I can only think of Java, C# and Python.

yes, you can do something similar with the stream api but it'll do the same thing under the hood and wont be much more concise

>they are tho desu
I guess i just don't see a use case for them and anytime i tried to use one as a "helper". I found it counter-intuitive. But i guess maybe I haven't done a large enough application to warrant anything beyond holes? But at the same time, I don't know if that would even matter.

>tfw data structures final in two days
>tfw trying to learn how assembly and C works
>tfw best I can score in the class is a C

>data structures final
Nigga, that shit's easy. How the fuck do you get so low that your best possible grade goes down to a C?

>Like what?
Try to make a mutable cyclic graph and then come back and tell us how it was.

just use an arena bru
(thats an allocator that collects in one go for you plebs)

dumb frogposter

The point of a REPL is to build things from the bottom up, testing out your ideas interactively before building abstractions around them.

>just use this clumsy workaround
Don't spoil it for him. Let him struggle for a bit before he figures out that it cannot be done, and that he's better off just using a node pool. (It's not an arena, you nigger, but a pool).

I guess it's just for different thinking people.

dumb frogposter

It's geared towards bottom-up rapid prototyping rather than top-down planning. In most real world scenarios, top-down planning gives birth to stillborn designs.

This cattle nigger here posted your answer.

what is the difference between
>reinterpret_cast
>dynamic_cast
>static_cast

what happened if i use normal (foo) bar cast on custom class?

>what happened if i use normal (foo) bar cast on custom class?
the seventh seal breaks

That's not really an "answer". It's just a workaround using a graph of freaking indexes into a pool instead of a legit mutable cyclic graph, which is impossible in normal Rust (and probably invokes undefined behavior in unsafe Rust as well).

>Sepples has at least 4 ways to cast something
How do people defend this garbage language?

A Danish gnome will kill you in your sleep.