/dpt/ - Daily Programming Thread

What are you working on, Jow Forums?

Lisp is the most powerful programming language.
Last thread:

Attached: Lisp.png (2880x1800, 562K)

Other urls found in this thread:

esolangs.org/wiki/Tic_Tac_Toe
esolangs.org/wiki/Image
learnopengl.com/Lighting/Light-casters
ogre3d.org/tikiwiki/tiki-index.php?page=-Point Light Attenuation
github.com/plaidml/plaidml
citeseerx.ist.psu.edu/viewdoc/download;jsessionid=E8C44F68E7A8562C01ABB4C499E2D707?doi=10.1.1.37.5452&rep=rep1&type=pdf
citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.37.5452
twitter.com/AnonBabble

>Shitposting in the OP
>lisp memery
>No anime
Shit thread.

Attached: 1562616804496.jpg (551x763, 356K)

Reading a Haskell book. It's functions all the way down.

Anyone now about some cool Haskell project, that is actually used? Only know of pandoc which of course is freakin awesome.

>Lisp is the most powerful programming language.
illegitimate thread detected

Attached: 1473394056831.jpg (473x311, 56K)

reminder that common lisp is the worst lisp

Surprinsingly, you can do many things in Python as well, closures, lambda, etc. Haskell guy like, look how cool that is - the industry guy: meh, don't be a diva.

How would you say it compares to GPRbuild?

>pandoc
$ sudo pacman -S pandoc
resolving dependencies...
looking for conflicting packages...

Packages (101) cmark-gfm-0.29.0.gfm.0-1 haskell-aeson-1.4.4.0-2 haskell-aeson-pretty-0.8.7-77 haskell-ansi-terminal-0.9.1-2
haskell-asn1-encoding-0.9.5-94 haskell-asn1-parse-0.9.4-105 haskell-asn1-types-0.3.3-2 haskell-async-2.2.2-1
...
haskell-x509-system-1.6.6-90 haskell-x509-validation-1.6.11-22 haskell-xml-1.3.14-19 haskell-zip-archive-0.4.1-9
haskell-zlib-0.6.2-8 pandoc-2.7.3-4

Total Download Size: 26.78 MiB
Total Installed Size: 210.10 MiB

:: Proceed with installation? [Y/n]
n

Why is everything related to Haskell so bloated?

what is the best lisp? asking for a friend

Scheme is the better Lsip.

Not bloated, well partitioned.

SUCK MY BALLS OP RACKET/SCHEME IS THE MASTER RACE REEEEEE YOU FUCKING LISP2 RETARDS

pandoc is like 60 megs

with

.rwxr-xr-x 33M root 12 Jul 13:38 /usr/lib/libHSpandoc-2.7.3-IUsR2ap7RpY7W979iFcy2L-ghc8.6.5.so

being a heavyweight, plus docs and stuff

Asking for a friend.

How to make money programming, if I like programming, but hate surveillance capitalism?

Infiltrate and subterfuge from the inside. The rats will always find a way in, and they will know when to abandon ship. The rat race is almost over. The rats will win.

Is there a type system that supports excluding certain members of an interface? e.g. foo inherits bar excludes baz, foo would have all the members of bar except for the members in baz.

sounds terrible.

>not using generic functions

sepples can inherit from a type privately

That's why I asked, I was wondering if anyone had a use for something like this. You would probably just split the interface into two other interfaces though.

>Boss = boss() returns error "variable called before assignment"
>renames struct to Boss()
>boss = Boss() runs just fine
idk what is wrong here but I'm not touching this code anymore

Attached: 1562369462717.png (40x40, 3K)

why don't you actually read a python book.

I probably will eventually, now I just want my game to be finished before school starts again

face palming so hard at this through INT_MAX+1 levels of irony

What would I give to be with a cute girl that is lecturing me about monads? I could even die the next day. It must be rarer than rare metals.

bit mean but you're right, this is supposed to be my first "real project", I'm learning a lot with it like using vectors math and trigonometry in my scripts, it's all really fun but I also feel the need to relearn some basic both math and python

I'd rather have her lecture my gonads, nah mean?

SICP is outdated and absolutely useless in Anno Domini 2019. It's a meme for people to feel like a "real programmer". No one who gets paid to code, that was born in the last 30 years, has bothered reading it. Just because some anime watching dullard shills it non-stop doesn't make it any more useful. Please stop recommending trash to new programmers, because it does more harm than good.
Cheers.

Attached: bjarne.jpg (200x245, 62K)

i wanna polish bjarne's head

but it compares programmers to wizards, there's nothing cooler than that

bjarne is one cool guy

Just because a book is old, does not mean it is not good. At least it will show you, how those Neanderthals thought about programming and how they went through crazy hoops just to build something that is just a single line of Mathematica today. Oops.

Barne is cool, his language not that much.

He went ballistic, when he needed to have the courage to shut up. He didn't and it will cost the world billions. Can you imagine what C++29 will look like? It will look like Python on the outside. But when you look closer ...

The intersection between people who fully understand c++ and people who program in c++ for a living is the empty set.

why can't other programming languages have good plot tools like matlab
matplotlib is utter shit

>But when you look closer ...
I recognize that!

Attached: 1499573022327.png (213x334, 8K)

Where can I get a pair of OpenGL SDL2 C++ Discount Programming Socks?

nowadays you do not use matplotlib directly. also r.i.p. the matplotlib creator - guy died too young

Javascript

programming-gear.us

"h":"e":"l":["l", "o"] guys.

Guy told me yesterday, that we're in for the final rally and that in less than 24 month, suffering will be large.

Looking forward to layoffs, especially mine. Got no time for my garden these days.

where do you work? US?

yup.

layoff why? run out of VC money ?
your product doesn't sell?

(cons "h" (cons "e" (cons "l" (list "l" "o")))) friend.

company just hired and hired in recent years, not seeing anyone adding that much value, plus lots of new services brought in from the outside, making many peoples jobs look like monkeywork. not VC, just large company happyliy swiming in debt as everyone else

based

#include

typedef struct unit unit;
struct unit {
char *s;
unit *next;
};

#define cons(x, y) (unit[]) {{x, y}}

int main(void)
{
unit *lst = cons("this",
cons("is",
cons("a",
cons("compile-time",
cons("linked",
cons("list", 0)))))), *l = lst;
do {
puts(l->s);
} while ((l = l->next));

return 0;
}

damn
many such cases
are do you work with? Java? C++?

SList!string("h","e","l","l","o").each!writeln;
c friend

Core is Java, with tons of Js and PHP

So the company is going to the garbage collector?

>After decades of working non stop the company is finally running a GC pass on itself
kek

Attached: idontknowwhatthefuckthisdoes.gif (752x675, 1.86M)

Destructive capitalism.

Same reason car manufacturers are fucked. Or does anybody talk about car brands anymore?

LOL at the BMWs of the world for getting cucked by the platform.

SICP isn't outdated, but HtDP is a massive improvement over it.

best for what?

Attached: index.jpg (259x194, 6K)

What is the porcelain tile of programming languages?

Take the Favorite Programming Language poll:

elisp

whatever common lisp is the worst lisp for

esolangs.org/wiki/Tic_Tac_Toe
esolangs.org/wiki/Image

Okay so, I have a big dilemma, /dpt/ and I need advice. I have furry friends and they know I am a crafty motherfucker when it comes to programmation and I know a lot of shit about a lot of different languages. I had a friend that asked me about contributing to a completely degenerate furry-game full of porn and try to implement it in a browser. This is basically javascript job through and through and it wouldn't be too hard because it's just a matter of learning a framework and doing shit with it, right?

My dilemma is this: I don't want my name attached to the project but I still want the big bucks because I know these people have a shit load of money and this is a way to make a shit load of money really fucking easily given they have artists and writers ready to provide all the shit I need. The problem with this is that I can't show this on a portfolio to show my skills to an employer at the risk of looking like a complete degenerate and that bothers me even though I'm not into it. Should I do it? I'm not a furry and I hate the idea but god damn it I really fucking need money right now. Is it worth it?

Attached: 1562446023199.jpg (620x640, 33K)

no
my favorite programming language is sepples, followed shortly by lua

>my favorite programming language is sepples

Attached: vomit.jpg (650x650, 90K)

>make up a new online handle
>ye use this in the credits
wow so hard. Also a JS dating sim/fuck game is hardly impressive regardless.
Use the money for NEETbux and start actual projects.

Author the majority of the components, basically all the generic shit, which will not have furshit in them, under one name, which you will associate with yourself.
Then author the actual porn-related stuff under a different name, LARP as a different person asking for permission to use the non-furshit components for furshit or something, and you're golden

It sounds like a terrible idea but you could direct them to an anonymous online friend who is actually you.
They would figure it out though, and you would always fear it coming out.

>Is it worth it?
No. Definitely not.

C++ is the language of the gods.
Just because mere mortals lack the skills needed to understand its truth in its entirety does not make it any less of the truth.

Attached: bjarne.jpg (432x324, 32K)

what other languages do you know?

Doesn't fix the milking part to try and introduce the non degenerate part for a portfolio though.
Hm, so introduce a """""framework""""" to make easy games in javascript and pretend to be someone else when using that same system to do all the degenerate shit, and only using the parts that are the basics as a portfolio? Hm... this could work. This is jumping through hoops but I value my portfolio presence a lot.

when is my girl julia getting popular

Java, C#, Python, Lua, C (not in the "I know C++ and thus C" sense, I've worked with pure C libraries a lot).

She picked the wrong niche to target.
/sci/ people cannot be fucked learning new things, not directly related to their research/specialty.

I don't think you want to use interface desu

I really hate all these machine learning things that require a nvidia gpu because of cuda. fuck you nvidia

yeah it's kind of gay

you could make smaller interfaces or not implement certain members

there's a cuda runtime in development that's vulkan based

Scheme

Is there any card that can provide CUDA but that can't function as a graphics card?

>want to pass an array of structs to shader program
>google for answer
>need to use strings to set ever member of the struct individually and for each element of the struct array
what the frick man

struct ShaderMaterial_t {
sampler2D diffuse;
sampler2D specular;
glm::vec3 ambient;
glm::vec3 diffuse;
glm::vec3 specular;
float shininess;
int type; // 0 = float ambient, diffuse
// 1 = Sampler Texture0(diffuse) Texture1(specular)
};

struct ShaderLight_t {
glm::vec3 position;
glm::vec3 direction;
glm::vec3 ambient;
glm::vec3 diffuse;
glm::vec3 specular;
// learnopengl.com/Lighting/Light-casters
float innerCutOff;
float outerCutOff; // Angle
// ogre3d.org/tikiwiki/tiki-index.php?page=-Point Light Attenuation
float constant;
float linear;
float quadratic;
int type; // 0 Directional (sun)
// 1 Point (360 lamp)
// 2 Spotlight
};


#define MAX_LIGHTS 256
uniform Light lights[MAX_LIGHTS];

Attached: why_gl.png (747x366, 24K)

iirc, you don't have to do that, he's only saying that because the other option is equally as painful, you have to manually make sure the memory alignment is equal in the shader and the struct

also GLSL has some alignment specifiers which may make this less of a ballache

there is a way to do it with offsets but then you get into layout specifications
that's why I didn't bother using structs in shaders

there's rocm if you have amd

also there's this
github.com/plaidml/plaidml

citeseerx.ist.psu.edu/viewdoc/download;jsessionid=E8C44F68E7A8562C01ABB4C499E2D707?doi=10.1.1.37.5452&rep=rep1&type=pdf

I ain't clicking that

Automatinc frontend benchmarking for my job's website. Using lighthouse behind puppeteer to generate reports daily, then making a chart of different pages and their statistics. Really I just want to convince my coworkers that having a 1MB vendor bundle is shameful.

Gonna have to make a lightweight web app to serve the reports tho. What should I write it in? JS makes the most sense because that's what puppeteer's in, but I have free reign here.

It's just a PDF file.

PDFs have known exploits

Fast Mergeable Integer Maps
citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.37.5452

Thanks for letting me know.

okasaki is a genius

unless you're willing to use WASM

is codeacademy a good starting point for whatever language you want I was thinking about starting with it for python

Clojure.

sure, go for it