/dpt/ - Daily Programming Thread

This is /dpt/, the best subreddit of Jow Forums

previous thread In this thread:
r/programming
r/compsci
r/ReverseEngineering
r/softwaredevelopment

/!\ ** Read this before asking questions ** /!\

mattgemmell.com/what-have-you-tried/
catb.org/~esr/faqs/smart-questions.html


What are you working on?

Attached: timetocode.webm (1152x648, 2M)

Other urls found in this thread:

infowarsstore.com/brain-force.html
system76.com/pop
gnu.org/software/guix/
stroustrup.com/bs_faq2.html#whitespace
project-everest.github.io/
fstar-lang.org/tutorial/
fstarlang.github.io/lowstar/html/
pastebin.com/xq2XzwZb
en.wikipedia.org/wiki/Zabuton
github.com/xoreaxeaxeax/movfuscator
en.wikipedia.org/wiki/Software_as_a_service
store.steampowered.com/app/400110/Else_HeartBreak/
twitter.com/NSFWRedditGif

Is there a dumbies guide to AI and machine learning?

first for cunny

fuck yoooooooou

lol you got btfo

So uh, i am trying to rewrite a mergesort algorithm that i made in C# in C++ using the std::array and the templates but i i have errors in pic related, it cant create an array of length midpoint cause midpoint is not a const (duh), how do i fix this

Attached: 12414142.jpg (597x167, 34K)

Does anyone know of recommended resources(like books) that explain the html, css and js parsers and interpreters in browsers(and possible ways to implement them without big external code) ?

Rewrote the UDP parts of libuv, and implemented TCP over UDP

# Get and translate the algorithm
algorithm = dialogresults["algorithm"]
if algorithm == "SHA-2 224": algorithm = "sha224"
if algorithm == "SHA-2 256": algorithm = "sha256"
if algorithm == "SHA-2 384": algorithm = "sha384"
if algorithm == "SHA-2 512": algorithm = "sha512"
if algorithm == "SHA-2 512/224": algorithm = "sha512_224"
if algorithm == "SHA-2 512/256": algorithm = "sha512_256"
if algorithm == "SHA-3 224": algorithm = "sha3_224"
if algorithm == "SHA-3 256": algorithm = "sha3_256"
if algorithm == "SHA-3 384": algorithm = "sha3_384"
if algorithm == "SHA-3 512": algorithm = "sha3_512"
if algorithm == "SHAKE128": algorithm = "shake128"
if algorithm == "SHAKE3256": algorithm = "shake256"
if algorithm == "BLAKE2b": algorithm = "blake2b"
if algorithm == "BLAKE2s": algorithm = "blake2s"

use a dictionary, bro.

Attached: anon idiot.png (1679x943, 806K)

>r/programming
>r/compsci
>r/ReverseEngineering
>r/softwaredevelopment
I can't tell if this is self-aware humor or dpt has just become such a shitty cesspool thanks to reddit.

wouldnt that be roughly the same amount of code?

What's your use-case

No.
resolver = {'SHA-2 224 ': 'sha224', 'SHA-2 256' : 'sha256'}
algorithm = resolver[dialogresults["algorithm"]]

dude, am I retarded? i've watched every youtube video on dijkstra's algorithm and I still don't fucking get it????
I aced analysis of algorithms at uni and we did this, wtf

Attached: 1520923469593.jpg (250x246, 7K)

>dude, am I retarded?
Yeah!

Is there a formatting function akin to lisp's format or C's printf for Haskell?

how do i grow mor iqs?

Attached: 1549595106596.jpg (1280x720, 564K)

dijkstra's alrgorithm is pretty easy yeah
it's just a breadth first search with the additional parameter that you visit each node in order of distance from the root, therefore you use a priority queue

infowarsstore.com/brain-force.html

Attached: vitality.png (307x311, 159K)

hows your game coming along

Attached: 1561594379557.webm (480x360, 2.87M)

# Get and translate the algorithm
translator = {
"SHA-2 224": "sha224",
"SHA-2 256": "sha256",
"SHA-2 384": "sha384",
"SHA-2 512": "sha512",
"SHA-2 512/224": "sha512_224",
"SHA-2 512/256": "sha512_256",
"SHA-3 224": "sha3_224",
"SHA-3 256": "sha3_256",
"SHA-3 384": "sha3_384",
"SHA-3 512": "sha3_512",
"SHAKE128": "shake128",
"SHAKE3256": "shake256",
"BLAKE2b": "blake2b",
"BLAKE2s": "blake2s" }
algorithm = translator[dialogresults["algorithm"]][\code]

What would you guys recommend for a Linux/*Nix system? I want something to be able to concentrate a bit better on my programming work.

Whats the difference in C++ between doing

void Foo(int *bar){}


and

void Foo(int *bar){}

Much better. And if you need the keys for a menu in a graphic user interface, you then simply do translator.keys()

Shit i fucked up, i meant

void Foo(int* bar){}

and


void Foo(int *bar){}

replace everything with cute girls or your pos niggerware game won't matter to anyone

It's a style thing. C++ users will fiercely argue over which one is correct. C users already know the correct answer to be int *bar

system76.com/pop
or
gnu.org/software/guix/

None

first is c++ recommended style. second is C recommend style.

ubuntu flavor

...For what fucking purpose such nonsense

I'm not fond of Haskell's names for car and cdr and the fact that caar, cddr, cdar, etc, have no equals in Haskell.

About hardward accelerated graphics, what do linux OSes use? Do they solely use OpenGL, or is there some other magic going on I'm not aware of?

Attached: 851fae8e0f8b233c74ba5504b6d604b5.png (900x1200, 642K)

stroustrup.com/bs_faq2.html#whitespace

auto car = new Car()

>I'm not fond of Haskell's names for car and cdr
what?

I think head and tail are much more intuitive names.
I also think pattern matching is enough and you should be avoiding these partial functions any way.

god you lisplets are fucking obnoxious.
all the basic functions are basic shit in other langs.

all those basic*

finishing up college but the course if all full of horse shit that doesn't connect and I have to learn outside of the course for stuff that I'll actually use in real life.

So.. question: is web dev oversaturated? and if it is, do you recommend an alternative path that doesn't get me to unemployment?

Thanks in advance

Learning about it, some basic use cases to get a nice understanding.

Maybe my own shiity version of deepnude

car and cdr shall not be confused with head and tail, bro.
head and tail are about lists while car and cdr are about pairs.

Pairs are used to implement lists in Lisp, not so in Haskell. Even so, I find fst and snd to be clearer than car and cdr.

Not him but isn't car just arr[0]?
Or am i missing something

what's wrong with fst and snd

I graduated today, what are some programs I should write

Attached: 1539709009152.jpg (346x510, 31K)

kernel

fizzbuzz

Is it possible to write software that can't be reverse engineered?

e.g. people trying to crack your program to avoid licenses

Attached: 1561658375152s.jpg (250x250, 5K)

(car (cons 1 2)) -> 1
(cdr (cons 1 2)) -> 2

(car (list 1 2)) -> 1
(car (list 1 2)) -> '(2)

a program that gives you a job

auto mobile = new Car()

Yes? How does this relate to my post?

last example should have been cdr.

the main difference between cdr and tail is that cdr returns whatever is in the "cdr slot" while tail always returns a list.

Give F* a try for that.

why? any experiences with it?

Then use a maybe or either type?
I'm honestly not seeing the problem.

the problem is that people in this thread are saying that car = head and cdr = tail which is wrong. head/tail is distinct from car/cdr in purpose, philosophy and reality.

It's a security-oriented language being used for project-everest.github.io/
fstar-lang.org/tutorial/
And nope, as i honestly don't have a use-case for it, and some things are still a bit over my head.
But the embedded C DSL is pretty cool.
fstarlang.github.io/lowstar/html/

they're only distinct in languages which meaningfully distinguish pairs and lists, which lisp does not

You're being a pedantic cunt and ignoring reality, like all lisp zealots.

dubs name my programming language

JavaScript!

Attached: 1561654726078.jpg (1200x800, 92K)

rustsucks

cunnylang

who the fuck puts a computer on the floor.

What do you goys think of my bash skills?
pastebin.com/xq2XzwZb

It's an alternative to pacaudit/arch-audit/archsecure, and has way better formatting options, plus a couple other things

chaika!

Attached: 586181578422747136.png (126x128, 36K)

How faster, if at all, is joining two for loops into a single one? Is it something that the compiler already takes care of?

Attached: 1465891014271.jpg (2100x1500, 625K)

the nips dont even have a word for door, theyre rather primitive

example?

yeah don't lose sleep over it

two unnested loops?

>pairs and lists, which lisp does not

wrong. in common lisp, the cdr of a list element must be either a cons or null. something like (list-length (cons 1 2)) will throw an error ("2" is not a list).

it's like a string in C: it's a character array terminating with the null char.

foo[] = {'a', 'b', 'c'}; // not a string
foo[] = {'a', 'b', 'c', '\0'}; // a string


I call that an implicit type.

en.wikipedia.org/wiki/Zabuton

Attached: why anon why.png (868x932, 402K)

java 2

sure but who cares
point is that whether you call them fst/snd or head/tail they both do the same thing because any semantic distinction is implicit

winrar

DO i=1,N
a = a+1
END DO

DO i=1,N
b=b+1
END DO


vs
DO i=1,N
a = a+1
b = b+1
END DO

NOOOOOOOOOOO

I'm finding the first few exercises in SICP to be somewhat hard for me.
Should I give up alread?

web dev oversaturated? and if it is, do you recommend an alternative path that doesn't get me to unemployment?

Cute doll!

no that's normal

SICP being a creation from MIT, its exercises are obviously intended for math literates. Also, the first chapter relies a lot on math because data structures are only introduced int the second chapter.
>Should I give up alread?
no.

Only ever run it on machines that you control, and handle all user IO over a network. You may think that's a joke but sadly that seems to be the direction the gaming industry is leaning towards in order to avoid "piracy".

github.com/xoreaxeaxeax/movfuscator

Attached: Lain.gif (500x333, 462K)

en.wikipedia.org/wiki/Software_as_a_service

Ah thanks a lot guys. I was expecting some "yeah just kill yourself" replies to get some laughs out of it but you were pretty wholesome. Thank you!

the first chapter is not even that heavy on math. just grind through it.

>The M/o/Vfuscator (short 'o', sounds like "mobfuscator") compiles programs into "mov" instructions, and only "mov" instructions.
brb, learning C

that's for C programs though

Is perl really dead? I'm considering learning it cause I like shorthand ways of doing a lot at once, i.e. I'd rather write a single line of bash than 1,000 lines of C.

Good grief!

People use it so it's not dead.
Use Perl 5.

Else Heart.Break() currently at -75% on steam!

store.steampowered.com/app/400110/Else_HeartBreak/

Attached: ss_da8ea9f75d13495301eb99862526069aaa2b76dd.1920x1080.jpg (1228x691, 667K)

fuckin based