/dpt/ - Daily Programming Thread

Lisp is the most powerful programming language.
What are you working on, Jow Forums?

Last thread:

Attached: suave_lisp_toad.png (256x223, 41K)

Other urls found in this thread:

ryanisaacg.com/quicksilver/
racket-lang.org/team.html
twitter.com/NSFWRedditImage

python is ____

Attached: pyy.png (400x400, 114K)

bool Solve (string pattern, string str) {
string[] words = str.Split(' ');
return pattern.Length == words.Length &&
pattern.Zip(words, (p, w) => p + w)
.GroupBy(s => s[0])
.All(g => g.Distinct().Count() == 1);
}

software
on the WEB
> D:

made in a language that isn't from the 80s
> D: D:

that I got PAID to MAKE
>

snek hisssssss. watch out ooooh he gonna bite u

my god I really dont like strings
here is a oneliner

String1="abba", String2="dog cat cat dog",
List1=lists:append([ [A1,A2] || {A1,A2}

Attached: cr146312225810.jpg (863x1384, 218K)

>Lisp is the most powerful programming language.
Stop taking drugs, kiddo.

>inb4 some bullshit about programmable programming language
I can churn out assembly in any fucking proper programming language and set RIP to it. That's not powerful; that's a requirement for me to even *look* at it.

Cute!

Attached: Jashin-chan.png (285x605, 126K)

>Stop taking drugs, kiddo.
He's right, Lisp is so powerful that problems which are technical issues in other programming languages are social issues in Lisp.

>implementing bioinformatics tool
>need to find / write an alternative for one step in the pipeline because the standard approach absolutely explodes on real-life datasets (which can be 200+ GB sized) and bottlenecks the whole thing to shit
>find a mid-90s paper describing alternative algorithm
>author's implementation is still online and actually compiles with minimal issues
>except it expects an exotic input format no one uses anymore
>mfw I added support for that format to my tool months ago on a whim while drunk as a form of procrastination from more important work
>mfw everything integrates seamlessly
>mfw execution time down from bottlenecked 50 minutes to 35 seconds, peak memory usage down from 120 gigs to 4 gigs

Another victory for autism.

Attached: mua.jpg (462x533, 68K)

>oneliner
A line is 80 characters max

I..is she alright?

would stuff that cloaca

all programming language issues are social issues, languages are a social construct

based and useful
huge ecosystem
easy to import whatever and start creating stuff from websites to desktop programs and gui interfaces

getting way too big

OwO

old, shitty, deprecated tryhard dropout poseur garbage

>tfw py3 will die in your lifetime

Attached: 1478217959823.gif (225x249, 808K)

an embarrassment to PLT.

Attached: guidosicp.png (601x623, 100K)

What is the standard approach, and what is the bottleneck?

>mfw execution time down from bottlenecked 50 minutes to 35 seconds

Those are the kind of performance gains I live for. I've done this once or twice, and it's honestly better than dilaudid.

nice
what's the standard approach and what's the alternative algorithm?

ok, its 3.16 liner

s-she is about to get better..

4 u

By me.

very functional user but this repost you forgot the anime image so it doesn't count

unironically it will not

Usually the best tool for the job.

I'm building a time machine to go back and do what must be done. Guido will get a girlfriend and get laid before he turns 20.

I think I should not have gone into programming. I became completely retarded, stupid as fuck, I procrastinate at my job, I am just waiting until I'll be fired, but it does not happen.
What should I do? I am lost.

start verbally abusing people

quit

What exactly are you struggling with, stupid as fuck user?

you wouldnt dare
forget about python there are greater things at stake
you will ruin a smart young man's life by giving him a wretched female human being

isn't it ironic that lispfags are always advocating to ignore 60 years of PLT research but pretend that they're the ones that are being progressive

aren't lispfags just a different flavor of gofags?

>being paid for doing nothing
>complaining about it

>PLT
how to spot the idiot

Jow Forums is dysfunctional in everything (except for politics somehow). It's no surprise it gets triggered by real useful programming.

71877282

Are Github stars important for job applications?
Will I be able to pass any interviews without strong algorithm knowledge?

>aren't lispfags just a different flavor of gofags?
At least lisp has nostalgic value.

change profession like completely
and choose one that is done outdoors
i want to become ranger for quite some time now or a bum new age know-it-all world traveler , cant decide yet

>next challenge!

Write a function "foliate" that takes a list of positive integers and returns a list of lists where the list at each position has (integer at the position in the original list) consecutive integers so that the entire list is consecutive overall.

Examples
>>> foliate([1, 2, 3])
[[1], [2, 3], [4, 5, 6]]

>>> foliate([4, 1, 1, 1])
[[1, 2, 3, 4], [5], [6], [7]]

>Jow Forums is dysfunctional in everything (except for politics
what

>I became completely retarded, stupid as fuck
consider dropping java/script and learning a proper language

muh MIT, muh machine learnin. HAHAHAHA faggots, suck my machine dick

>lispfags are always advocating to ignore 60 years of PLT research
top kek. ctards and now gofags are doing that. racket's people have been at the frontier of PLT for the last 20 years.

>>/wdg/

>PLT
Penis Laser Technology? The day has come?

Yeah, it's almost as if PLT has no fucking impact on the real world at all, and that engineers know more about getting shit to run than fancy-pants "mathematicians" and "theorists".

Go figure.

"some shitty 80s lang"
>muh RESEARCH, muh SCIENTISTS
"Where tho"
>at a job i dont fukken have lawl
"why use then"
>fuuuuuck they're starting to figure it out, I only pretend to use it because it makes me look smart because it's hard-on-purpose fuuuuck

>What is shen, clojure, racket. ...
Go back to fizzbuzz scripting, bro.

Attached: supersoft_lisp.jpg (684x2048, 267K)

>Jow Forums is dysfunctional in everything (except for politics somehow)
rofl
you're almost there, buddy, just a few steps further

name a PLT paper in the last 20 years published by one of the racket people that has more than 1k citations

whats the best way to get into desigining and programming video games?
unity?

>efficient garbage collection
Harharhar.

yes

Vulkan

maybe

Most definitely.
Access to VRAM is its own reward.

def foliate(lst):
n = 1
out = []
for i in lst:
out.append([i for i in range(n, n+i)])
n = n+i
return out

name one thing you've programmed for a video game where that matters

what languages do i need to know?

whoops that i for i should be j for j

Trying to get started on a daily purge task function that goes through a database once a day and deletes all rows where today == purge_dt. Got a pretty good idea how to do it, but anyone got any useful docs for something like this? In Java/springboot btw

imagine unironically naming clojure as an example for a lisp

2D maps.
Most RPGs don't feel real to me because the world is just so small. Having big maps without loading zones makes the world feel real.

lmao what does that have to do with VRAM

C or C++ are supported. Maybe there's bindings for other languages as well, but I really wouldn't know.

playing around with
ryanisaacg.com/quicksilver/
it's pretty fun, will make a game in this

>what does large map data have to do with direct access to VRAM
Think again, user, it can only take you another couple months.

what the fuck is this mental illness I just want the damn sdk

Attached: opencl.jpg (1902x696, 142K)

I'm thinking about a real-time face identification script who associates a new face with an id and increment a counter every time this id shows on camera, is this even possible?

You didn't answer the question
Unless you are rendering a gigantic map all at once it shouldn't be residing in VRAM

>safe
fn foliate(l: &[u32]) -> Vec {
l.iter().scan(1, |i, &n| {
*i += n;
Some((*i-n..*i).collect::())
}).collect::()
}

My team is quite decent. No way I would verbally abuse someone, especially considering that everyone knows everyone here and the only way is to move to another town and seek the job there.
Everything. Debugging, architecture, algorithms, you name it. When I arrive at my workplace, I stare at the screen mindlessly, then notice that two hours have passed by already. I've got a bunch of friends who are much more skilled than me, we don't speak about programming now as we used to.
Eight-hour workday. I work for two hours, and then waste my time at dining room or with colleagues/friends.
Well, I'd like to go for JavaScript instead. I like your idea.

... unless I use the VRAM as fast cache. Because, y'know, Vulkan allows you to do that.

>no unwrap
bad rust code

So I have two ways of representing certain numerical values in a C project, one via small nonnegative integers, the other does a low cost operation on that integer to make it ready to use in a certain context (call context A)

Now the constants that I use to do the low cost operation are in their own header (along with other constants for context A), and I didn't want to expose this header to too many parts of the program because it is specific to context A, but it turns out that this low cost operation is occasionally needed in context B as well

What's the better choice here
>include the header in context B as well
>write a small function for context B to communicate with context A, transformation done via function in context A
Both contexts already communicate but I feel like the operation is too low cost to warrant the overhead of a dedicated function, but I don't want the constants being exposed to too many parts of the program (this proved itself to be a real problem recently when I changed the values they represent and found them scattered all over the place due to their use in temporary solutions)

Maps are needed in RAM for game objects to interact with, storing the map in VRAM is slower because it needs to be bussed back to regular RAM for you to interact with it
What are you even talking about, storing one gigantic image in VRAM? All big graphics, 2D and 3D alike should be streamed off RAM or even the hard drive
typical for a tech enthusiast Vulkan early adopter to have no idea what he's talking about

foliate[l_] := FoldPairList[With[{l = #1 + Range[#2]}, {l, Last[l]}]&, 0, l]

>Maps are needed in RAM for game objects to interact with
Bullshit. Only certain data is required, unless your engine is a fucking piece of shit - which I wouldn't put past you. Mainly collision and event data; there's no reason to constantly stream off that shit over the bus.

Hmm the unicode got purged... that inner 'l' should have a little tick on it.

where are the ???

Attached: Screenshot from 2019-07-14 13-36-40.png (440x95, 10K)

>Everything. Debugging, architecture, algorithms, you name it.
It may help to break down your work into small manageable chunks. That works for me at least. Otherwise I feel lost.

common usage of the term "map" refers to more than just the graphics. If you're talking about just the graphics, rendering large areas involves streaming it in, storing it all in VRAM at once is just wasteful (not that Vulkan or OpenGL is any different in that regard)
But if it's a 2D game then memory usage is so low that none of it even matters in the first place, all loading and rendering is basically instananeous, unless your map is one gigantic prerendered image

(define (foliate l)
(define (go l acc)
(if (null? l) '()
(cons (iota (car l) acc) (go (cdr l) (+ acc (car l))))))
(go l 1))

>As long as our hypothetical Blub programmer is looking down the power continuum, he knows he's looking down. Languages less powerful than Blub are obviously less powerful, because they're missing some feature he's used to. But when our hypothetical Blub programmer looks in the other direction, up the power continuum, he doesn't realize he's looking up. What he sees are merely weird languages. He probably considers them about equivalent in power to Blub, but with all this other hairy stuff thrown in as well. Blub is good enough for him, because he thinks in Blub.

>name a PLT paper in the last 20 years published by one of the racket people that has more than 1k citations

how many plt papers with more than 1k citations? probably Liskov's ADT paper and the paper about ML's type system (written by a now racketeer, btw). then?
anyone akin to plt would recognize the names here racket-lang.org/team.html

see filename

Attached: have-seqs.png (728x2184, 516K)

>storing it all in VRAM at once is just wasteful
Not if I strive for 240 FPS in all situations.
>inb4 most people are not going to be able to see that
Yeah I know. But I don't expect to throw away that code, but keep using it for other stuff as well. At that point it's basically free lunch for other games.

foliate = flip evalState [1..] . mapM (state . splitAt)

wating for haskellfags to write a one liner

hasklel wins again

explain pls

so basically, you like Vulkan because you can load everything at once? You can do that in OpenGL too

>vg on programming

Attached: Capture.jpg (757x217, 33K)

Graham really should've kept his fucking mouth shut here, because he ignores the case where the Blub programmer can actually look at features from more powerful languages and end up liking them; it's just that the Blub programmer has serious doubts about the implementation of said features.

is it bad to have global variables? and if it is to get around it, is it good enough to just put them into get function and return the variable?
I just got the feeling it might be wrong to have an unscopped variable since everything else is scopped in functions and stuff, but the thing I am having global is something like path of a specific directory that I won't be editing but getting it from multiple places, so I thought it might be okay in this case.
thoughts?

functional programming is beyond elegant and beyond comprehension

>is it bad to have global variables?
no

I thought OpenGL effectively got replaced by Vulkan?