/dpt/ - Daily Programming Thread

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

Attached: lisp-glossy.jpg (430x299, 44K)

Other urls found in this thread:

nick-black.com/dankwiki/images/8/85/Msadvice.pdf
github.com/danistefanovic/build-your-own-x
golang.org/pkg/sort/#Slice
pub.dartlang.org/documentation/spritewidget/latest/
twitter.com/NSFWRedditGif

I'm applying logic programming concepts to separation logic for the purpose of automated theorem proving for a safe systems language.

Lisp and its derivatives are for autists who don't want to get any real work done.

Attached: felix thonk.png (327x300, 96K)

***rd for 3 star programmers!

Attached: dpt 3 star programmer.png (868x1228, 884K)

>ywn have smooth legs
>ywn have smooth face
>ywn have a cute girlish face
>ywn look good in programming socks
>ywn wear cute, frilly dresses while programming

If I didn't think transsexuals were the pinnacle of degeneracy, I might consider popping titty pills.

Attached: pepe mad.jpg (459x448, 131K)

10th for C

>not an anime OP
Do you realize how triggered the mentally ill traps will be now? Way to go OP.

JavaScript rocks!

Attached: js-rocks.png (1000x494, 286K)

botnet

js and python are for fags who don't want to do anything but want to pretend they have accomplished something.

No C is the most powerful programming language. Which is why your operating system was written in it.

I was reading a blogpost and they used
llvm::make_unique()

from llvm/ADT/STLExtras.h
what's the difference with the one from the standard library?

Attached: 1543915407240.png (700x700, 351K)

I can't see a difference. Weird.

>tfw lang hopping

Attached: 1445679086284.png (1280x720, 789K)

nick-black.com/dankwiki/images/8/85/Msadvice.pdf

>Possession of a GT MSCS is pretty much
winning the life lottery. Some people win the state lottery, and yet somehow
a decade later they’re freshly broke and no less ignorant. These people are
loathed, as is right and proper; hate’s what makes America strong.

nice

Is Javascript lingua franca of today's world?

No, that would be C. But, much like French, Javascript is obnoxious to read, the people the use it are smelly and hairy, and it likes to invent new words for shit instead of using loanwords.

>No, that would be C
Lmao, no it isn't. There are MANY MANY more programmers that you could show C and they've have no fucking clue what it was doing. Especially with memory.

Is this good to learn C++ with?
Also, I've heard to just do projects instead of fretting over step-by-steps for things, but I don't know where to find such projects (Is there something like freecodecamp for C++? That site is for webdev)

github.com/danistefanovic/build-your-own-x

historic relic maybe?
make_unique was introduced in c++14 iirc

if
int const n;
const int n;
are equivalent

and
const int *m
int const *m
are equivalent

then why
int *const x;
*const int x;
is haram?

Attached: 1537249666694.jpg (960x790, 83K)

Ty also I completely forgot the image.

Attached: Murach’s-C-Programming[1].jpg (318x398, 44K)

>unironically want to get real work done
you don't belong here

Because *int x makes no sense.

Asking one more time.

Alright niggas, I'm familiar with programming desktop software, now I'd like to get started on bots. Specifically, internet crawlers. I figure, there are probably bot frameworks or IDEs or libraries or whatever. Anyone can comment on those?

In a previous thread, someone mentioned Lisp, but it would still require me to program the actual bot from the start, wouldn't it?

Attached: DsjbtazWoAA0oBu.jpg orig.jpg (1158x1194, 192K)

No, there aren't. Because if you don't understand C, you can't call yourself a programmer. C is to programming what Ohm's law is to electrical engineering.

As much as I hate to say it, use Python. There's a lot of shit already out there for you to use. If you're going to be a script kiddie, you might as well go full retard.

No it's not. You arrogant cunt. Not knowing C doesn't mean you're not a programmer. Christ, get your head out of your ass. There are hundreds of languages and a person doesn't need to know any specific one to make meaningful programs.

>taking the bait
Christ, this is getting too easy.

JS is a scheme clone with C syntax and it's borrowing more and more from other languages.
What the fuck are you smoking to come up with whatever garbage you just wrote?

xD

I use only Python and bash. I've tried to learn C, Java and Haskell but found no use for them.

How degenerate am I?

Rust is for C programmers who aren't brainlets.

my friend it's not about what language you use it's about what you do with whatever you're using

With that said, functional programming is fucking nice if you give it some time

For the most part I'm not writing libraries. Not right now anyway. Anything with very little usage code doesn't deserve to be one. The way usage code looks and the process getting to the final version is more important.
Of course libraries often have what's effectively usage code internal to it but it's relatively special cased usually.

When will everything I use use those to this effect?

In Go, there are generally two ways of sorting slices of types: sort.Sort and sort.Slice.
Why would you use one over the other? Especially if Slice does it while only defining a single closure whilst Sort requires three function definitions to satisfy the interface.

>oop was a mistake.
what's the deal with this meme, is it just a meme, or are they actually being serious? Like what's your alternative? Are you really implying YOU have a better idea, I'd like to hear about it.

>pop doesn't return the value popped in STL
For what purpose?

STL is badly designed, you should know this.

You can't delete the value and return it at the same time you stupid brainlet

>golang.org/pkg/sort/#Slice
>The function panics if the provided interface is not a slice.
Seems like a specialization of some sort. I don't know go though.

All you need to procedural programming.

I drawing a Penrose Triangle using Turtle Drawer, it's pretty hard.

Trying to jump in at the deep end here:

pub.dartlang.org/documentation/spritewidget/latest/

Anyone got resources on node graphs, etc?

>Are you really implying YOU have a better idea
Countless people have better ideas. OOP is a demonstrably bad idea. Take your pick of paradigm.
I think the only way you could possibly support this assertion yourself is because you were a shit programmer when you used another style of programming. Or you yourself would know OOP isn't the only way to program well.

A lot of people can't comprehend the idea of objects. I'm not even joking. It's also forced down student's throats these days and they have fits over it because OOP is not how humans think. I've seen threads on Jow Forums of people legitimately dumbfounded by simple concepts from OOP. It's really sad because it's incredibly simple.

I suggest looking up smalltalk if you like OOP.

dsl

Simula style OOP was a mistake.

>A lot of people can't comprehend the idea of objects.
I refuse to believe this. Objects are not a complicated concept to digest. They are literally an analog of the world around you.

>Like what's your alternative?
procedural programming for performance-sensitive tasks, functional otherwise

Best believe it my man. I had this same conversation with my Boss at work and he told me he just can't accept that fact that you can just make a bunch of languages and have them do things in such a silo'd fashion. Trust me, I don't understand it but there are people out there that can't get it for some reason. You throw things like inheritance in and people go batshit.

Which is all funny since C can do most if not all of these features.

>They are literally an analog of the world around you.
completely fucking wrong lmao

that's exactly what I was talking about

Cells are an almost perfect analog to OOP and make up everything around you. They encapsulate functionality and data in themselves. Which is a core concept of OOP.

>They are literally an analog of the world around you.
What a joke.
The world consists of ObjectBeanFactoryManager(s) for you?
World modeling isn't even hip among object oriented programmers anymore.
>A lot of people can't comprehend the idea of objects.
I doubt that. The concept of collecting data and a set of functions that apply to that data is not hard to understand.
>It's also forced down student's throats these days and they have fits over it because OOP is not how humans think.
This is contrary to what a lot of people claim. I would agree with you but I doubt we agree on why.
I think the reason why people become confused is because the problems OOP tries to solve isn't simple programming problems. It'll look like it in their introductory books. It looks like a terribly roundabout way of dealing with things and a procedural style is almost obviously better in those cases.
A new programmer doesn't understand why encapsulation (through any means, hopefully better than typical OOP provides) would be a good thing. Because their problems don't scale to the level where it would be useful. It's told not shown at best but I've seen plenty of literature that obviously thinks they get it across because they mentioned it but it's not easy to understand when all you're given is trivial examples.
>I've seen threads on Jow Forums of people legitimately dumbfounded by simple concepts from OOP.
That's a terrible measure. Just the other thread we had someone ask why a pointer would be needed anywhere. By implication they asked about any reference type. It just means that they're new.

>ObjectBeanFactoryManager
Funny Enterprise Java Joke!

Bullshit.

The simplest way to introduce someone to the concept of objects is to apply the methodology to objects in the real world. This moves something conceptual into the world the concrete. When you explain inheritance, you explain it in term of hierarchies, because that's how object inheritance is used. I use taxonomic hierarchies in the C++ class I teach as an example because everyone knows what species/genus/family/etc is.

>ObjectBeanFactoryManager
>java
>being sensical

I've subscribed to github


...what now

>The world consists of ObjectBeanFactoryManager(s) for you?

Jelly Bean factory.
Jelly Bean manufacturing machines
Input goes in
Jelly Bean objects come out based on input

Attached: 1492983602929.png (800x689, 203K)

Now you collect your paycheck

but i don't work

you give your code to microsoft for free

There's not much to steal

Attached: Screenshot from 2019-01-09 22-28-32.png (985x379, 18K)

But they dont steal anything,you give it to them.

All of those words have meaning and they have purpose.
It implies a Class of object or instance of object (I wasn't that specific) that manages functionality that generates groups of objects.
It isn't a bad idea in itself if you have a complex enough problem.
But without going into hours of posting here I would say that it's a root design flaw. I would expect it to come from a principled approach to OOP but it can come from many places. Simply trying to be too generic in your code could create that situation.
Agreed. But this isn't a language issue, this was the programmers fault.
Now this is a joke.
I don't get it.

Procedural programming
Functional programming
Also what you pajeets call OOP isn't actually OOP. pretty much every programming paradigm is a better idea than fake OOP.

Attached: alankayC++.jpg (728x546, 54K)

I've never seen "Factories" used outside of Enterprise code that were valid use cases except for maybe once or twice.

>Appeal to authority
Yawn.

can you build full-fledged software applications in go yet? or is it still just used for web shit?

for years I thought that one place where OOPreally shines were video games
boi, was I surprised when I discovered pmuch everyone in the industry shits on OOP

basically, never listen to OOPfags, also never listen to incompetents and students as they've probably been brainwashed like I were

web shit, lost cause

Lisp is for pajeets. Real men code in erlang

>except for maybe once or twice
That's all it takes for you to be required to know about them really. I'm a bit surprised, factories aren't that rare. It's a way to encapsulate construction resources (usually). It's not an uncommon construct at all. What's often parodied is the layers. Not the individual elements. Though some are very specific to OOP. Like beans, their requirements make them make little sense outside the context.

Of course OOP is shit when data locality is very important. How braindead could you be?

as braindead as any dumb undergrad who's only experience with vidya was some shitty tutorial in unity or w/e and was taught OOP first

Why use factories when you can abuse reflection and use constructors?

Attached: 1472493166371.png (463x492, 179K)

I've only ever heard of reflection in this context to reduce the switch case-y code some come up with.
You'd have to explain.

Given the desired object name and parameter signature you can create a Class instance of it and construct an object form that.

Because factories are less ugly.

Reflection abuse is heinous.

There is literally nothing wrong with stack based languages like forth

Alan Kay's "OOP" was nothing more than an ugly and worse version of Erlang.

Is the Bloomberg terminal just a software package? Or is it an actual proprietary machine?

What's a Java project you could do in 8 hours that would be alright enough to stick on GitHub?

Attached: 1530701354858.jpg (916x771, 79K)

Pajeet code rater. Parsers Java code and determines the level of Pajeet.

pls no bully, is Python's standard library actually good for internet crap?

r8 my fizz buzz :3
(defmacro match (pred with ptest &rest preps)
(let* ((test (if ptest ptest #'equal))
(predlst (if (consp pred) pred (list pred))))
`(cond
,@(loop for prep in preps
collect
`((and ,@(loop for i in (if (consp (car prep)) (car prep) (list (car prep)))
for j in predlst
unless (symbolp i)
collect `(,test ,i (eval ,j))))

(let ,(loop for i in (if (consp (car prep)) (car prep) (list (car prep)))
for j in predlst
when (and (symbolp i) (not (equal i '_) ))
collect `(,i (eval ,j)))
,(cadr prep)))))))
(defun m/test ()
(loop for i from 14 to 100
collect
(match ((mod i 3) (mod i 5)) with nil
((0 0) "fizzbuzz")
((0 _) "fizz")
((_ 0) "buzz")
((_ _) i))))
(m/test)

Attached: 1535255079008.jpg (1280x1890, 425K)

Doesn't work/10
...
MATCH
CL-USER> (defun m/test ()
(loop for i from 14 to 100
collect
(match ((mod i 3) (mod i 5)) with nil
((0 0) "fizzbuzz")
((0 _) "fizz")
((_ 0) "buzz")
((_ _) i))))
; in: DEFUN M/TEST
; (MATCH ((MOD I 3) (MOD I 5)) WITH NIL ((0 0) "fizzbuzz") ((0 _) "fizz")
; ((_ 0) "buzz") ((_ _) I))
; --> COND IF AND IF
; ==>
; (# 0 (EVAL (MOD I 3)))
;
; caught ERROR:
; illegal function call

; ==>
; (# 0 (EVAL (MOD I 5)))
;
; caught ERROR:
; illegal function call

; --> COND IF IF AND THE
; ==>
; (# 0 (EVAL (MOD I 3)))
;
; caught ERROR:
; illegal function call

; --> COND IF IF IF AND THE
; ==>
; (# 0 (EVAL (MOD I 5)))
;
; caught ERROR:
; illegal function call
;
; compilation unit finished
; caught 4 ERROR conditions

whoops, it's in emacs lisp not common

All transfreaks should get murdered.
If you are a programmer and you don't hate these abominations then you are not a programmer.

Agreed. Traps and trannies were the worst thing to invade software.

Do a class finder.
Someone I know made one a while ago. It's quite rudimentary now but not too long ago it was the fucking bollocks. It's a very useful tool for finding single classes nested in deep codebases.

to convert to common lisp I just had to add a funcall for the test
(defmacro match (pred with ptest &rest preps)
(declare (ignore with))
(let* ((test (if ptest ptest #'equal))
(predlst (if (consp pred) pred (list pred))))
`(cond
,@(loop for prep in preps
collect
`((and ,@(loop for i in (if (consp (car prep)) (car prep) (list (car prep)))
for j in predlst
unless (symbolp i)
collect `(funcall ,test ,i (eval ,j))))

(let ,(loop for i in (if (consp (car prep)) (car prep) (list (car prep)))
for j in predlst
when (and (symbolp i) (not (equal i '_) ))
collect `(,i (eval ,j)))
,(cadr prep)))))))

What's the best programming language for games and why?

Hello /dpt
How would I go about creating a simple program to delete files but keep their pointers?

That could be done pretty easily with a shell script.

Can I use GPLv3 code without publishing source code if its usage is private to just the company I work for?

always do exactly opposite of what Jow Forums says

Don't use Ada 2012!