/dpt/ - Daily Programming Thread

No time for love edition.

Previous thread: What are you workin' on Jow Forums?

Attached: code_master.png (1164x1738, 2.17M)

Other urls found in this thread:

gnu.org/software/guile/manual/html_node/Scripting-Examples.html
nongnu.org/geiser/
youtube.com/watch?v=wHRubMACen0
github.com/zv/SICP-guile
gnu.org/software/guile/docs/guile-tut/tutorial.html
github.com/theodesp/guile-turtle
youtube.com/watch?v=C-T4VVZrmkA
youtube.com/watch?v=pTAnUBbunlY
coypu.sdf.org/porting-zig.html
techbeacon.com/app-dev-testing/10-programming-languages-defining-future-coding
twitter.com/SFWRedditGifs

I like men.

also I've been learning OCaml because Haskell is too hard for real world problems

i want to nakadashi iori

here's your redpill, bro

Attached: 1534935983694.jpg (1291x3600, 610K)

C
R
fortran
rust
D
guile
julia
elixir
purescript
haskell
idris
ruby
python
java
nim
c++
c#
f#
f*
apl
ats
ocaml
ml
perl
php
lisp
racket

are bad, instead you should learn
C
R
fortran
rust
D
guile
julia
elixir
purescript
haskell
idris
ruby
python
java
nim
c++
c#
f#
f*
apl
ats
ocaml
ml
perl
php
lisp
racket

I decided to transition to Haskell. I'm already taking monad injections. I haven't told my parents yet. They're devout Christians and would be disappointed.

The knights of lambda welcome you.

Why are so many languages racist against functions?
They will treat integers and strings as first class, but remind them that they're still oppresing functions and not giving them first-class rights and you will be astonished at how they recoil, how injured they are, how they suddenly shrink back: “We’ve been found out.”

thanks

Attached: 1459214075892.jpg (1280x720, 95K)

is "Sams Teach Yourself C++ in 24 Hours " the same as "Sams Teach Yourself C++ in One Hour a Day" the same thing? which one is better? the newer one?

Please do not use an anime image next time. Thank you.

Attached: 1458596714626.gif (500x270, 490K)

im thinking by this you mean closures and lambdas and block structure and the like

because your closure needs to remember a bunch of arguments in environments and that just dont fit a register

so, truly sad, because functions being first class makes programming easier, but our machines are imperfect

why

Attached: 1548120665546.jpg (300x260, 14K)

learncpp.com

Do you cpp, user?

Attached: PX9qW8CneOSjvgXqIa80Dn5NiOK09Y9pr-JuTDGUCP8.jpg (716x754, 92K)

Where do you think you are?

Attached: 1502637236461.jpg (517x545, 88K)

iori a cute

The C Preprocessor is a part of the C language, so I naturally use it.

The rule is no webdev languages (>>>/wdg/). So no php or javascript. Also I still know nothing so I need you guys to help me maintain this list.

Meme languages:
>guile
>purescript
>f#
>f*
>apl
>ats

Meme languages you should learn:
>rust
>go
>swift
>kotlin
>julia
>haskell
>nim!
>crystal
>zig
>forth
>brainfuck
>idris
>elixir
>ml
>racket

Real languages:
>Ruby
>Python
>Java
>C
>C#
>C++
>Scala
>R
>Perl
>MUMPS
>Malbolge
>Fortran
>Ocaml

Other:
>Lisp

PAJEETBNIG PIECE OF SHIT LANGUAGE:
>D

nothing really

Attached: not_anime_website.jpg (574x81, 19K)

Lisp is special, and surprisingly never died like every other lang before C.

Attached: user was btfo for this post.png (1064x169, 12K)

Isn't Fortran really old too?

It was literally the first language after Assembly. Every imperative language descends from it.

Guile is lisp you tard.

What database should I learn if I want to get a job? Is MongoDB still relevant in 2019? It seems nice.

Attached: 1547167282701.jpg (800x600, 97K)

Quick edit:
Memelangs =. 'J' ; Memelangs

Is it possible to make a purely list comprehension based language and would it be the most smug thing possible? I think Comprehensional Languages sounds like a good smug paradigm name.

prolog

Adding J to memelangs and prolog to memelangs to learn. Any objections?

What is the most smug looking form of list comprehension?
0..10 -> x -> x * 2
0..10 |x| x * 2
0..10 -> $ * 2

1..10 : $ * 2
1..10, $ * 2;

[1 10) α . 2
Lets see if Jow Forums will strip some of my unicode.

There was supposed to be an arrow in the middle.
Anyway, the point is, the more non-ascii characters you have, the more smug it is.

Fuck off, frog scum.
You're not welcome here.

SHOULD I START PROGRAMMING WITH SHEN

oh yeah i forgot the janny here hates frogs

You just inspired me. This is probably the most smug with only ascii.
[1 10) $ * 2

Maybe even have conditionals with a strange character for no appending.
[1 10) $ % 2 == 0 ? $ * 2 : ~

>beep boop I'm a computer
lol this is literally what you eggheads sound like

fag thinks programmers on Jow Forums aren't weebs

Attached: nagatoroehehe.jpg (266x325, 25K)

Anyone here use guile? I want to feel comfy following along the /SICP/ lectures on youtube and brag online.
What's a recommended workflow?
So fat I am reading the documentation gnu.org/software/guile/manual/html_node/Scripting-Examples.html but I'm looking for something more about best practice. Bonus point for using emacs for writing guile scheme.

Friendly reminder that a project's quality is directly proportional to the number of contributors with anime girl avatars.

Attached: github anime girls.png (938x545, 421K)

I use chicken and vim so I can't help much, but I think most guile/emacs users use geiser.
nongnu.org/geiser/

I really dislike anime
yes I've seen lain and akira and anything else you can throw at me
it's bad and trite and please stop thinking this is an anime website, it isn't

Have you ever had a program you made go rogue and take control of your computer? youtube.com/watch?v=wHRubMACen0

>geiser
Thanks, I'll lurk what they do and try to go from there.

There's also SLIME on emacs

lolis are illegal now , bucko

OT: how is Rust's ownership and borrow differ than c++'s unique_ptr? pros, cons etc

That video is baby-tier shit.

Quit your job
Make video games

Attached: agdg magician.png (826x978, 936K)

>OP's image
>Loli
Go learn what a loli is, you stupid redditor.

k

Is it inefficient to put a length call from the vector or string class in a for loop header? Is it better to store that call in a local variable and use that in the condition test, or does the compiler optimize the function call away so it doesn't matter?
for (size_t i = 0; i < string.length(); i++)
{ do stuff here }
or
size_t length = string.length();
for (size_t i = 0; i < length; i++) { do stuff here }

Thanks. I found this guy github.com/zv/SICP-guile who gives a pretty detailed guide

anime website

Attached: 1549196721078.jpg (1024x576, 48K)

That's right, a significant portion of your peers find you gross but what can we do? you only double-down when called out

Guile masterrace here, it's like CL but Scheme so why I switched from Cl.

no you are just not old enough to know that this is and has always been a website with close ties to the anime cultures out there. you sound 12 when you go on with the Jow Forums call outs like “double down” and insisting that “your peers” must find it gross. none of my peers find anime gross kid. this isn’t your personal clubhouse of ideas its a god damn anonnymous anime image website with themed boards. get out of here go to reddit or tumblr and join an anti anime subreddit or blog

need some advice from fellow Jow Forums users. Ive made a couple cool friends at a rust meetup I attended when I still had any hype about this language. the absolute lack of any real world use and the toxic global community made me lose any interest left in it, and now I don't want to lose time programming in it or attending Rust events anymore, I even want to uninstall it from my thinkpad as it takes up quite some space on my tiny SSD. how do I tell them while staying friends with them? we have plenty of common tech interests not only centered on rust.

Attached: maxresdefault.jpg (1263x720, 172K)

I'm a beginner and I can't manage to make the turtle tutorial work lmao.
Gnuplot pops up but nothing is happening.

sup /agdg/
so I joined my friend's terraria server and it was like this massive shrine to his ex
I just noped out
anyhow a game like ooblets but also subnautica

Attached: mol don.jpg (600x600, 54K)

...

...

Is there a nude version of OPs pic?

what turtle tutorial?

Ah, tortoise. From the manual.
gnu.org/software/guile/docs/guile-tut/tutorial.html
And because I'm too lazy to type everything, I searched for someone's code github.com/theodesp/guile-turtle
I had to modify the makefile to make it compile. I changed the CLFAG and LIB to
CFLAGS = -ggdb `guile-config compile`
LIBS = -lm `guile-config link`

Quick question, I'm interesting with this coding thing but I don't know where to start.

I'm interested to eventually do cool stuff with it or find work on it

gay

Quit your job
Make video games

Attached: agdg webbrowser.png (1897x1020, 1.58M)

don't listen to him gamedev is like the one sector of Jow Forums with no money in it unless you're very big, you have better chances of making it as a musician or actor

google "minecraft" ;)

I've never heard of this sorry.
Just learn Scheme and use Guile as an interpreter.

How

I "learned" scheme by watching the sicp lectures during a long haul.
I'm doing a second pass, this time following along with writing stuff.
Also, I'm also interested in "practical" applications. This toirtoise stuff seems neat because I would make it easy to make Scheme scripts interact with other programs.
Like this "Billy and billy's son" or the "mirrored art" they showed on the lectures.
Long term goal would be to make servo motors move based on LISP code. Like these tower of Hanoi solver type of thing.

just like make game
youtube.com/watch?v=C-T4VVZrmkA

Attached: molinucks xmas.png (293x281, 7K)

how could that be inefficient?

Should I watch the lectures? I'm only reading the book.

The lectures are like a tl;dr version.
The book goes deeper and has exercises but the outline is the same

because passing control to another function, running the length function, and then returning control takes more resources than a simple integer comparison

let stuff1 = [ [10, 'red'], [5, 'red'], [7, 'red'] ] ;
let max = 0;

for(let i = 0; i < stuff1.length; i++){
if(stuff1[i][0] > max){
max = stuff1[i][0];
}
}
alert(max);

max kept coming back as 7

Can someone explain why I am retarded.

Thank you.

you're retarded because you can't use code tags or put readability spaces in your code

>tfw stopped readin SICP because some exercises kicked my ass

sorry

for(var i = 0; i < data.length; i++){
if(data[i] > max){
secondLargest = max;
max = data[i];
}
}

>hurr durr I'm a computer
literally what you sound like

compiler handles this thing pretty damn well, check assembly code generated via e.g. godbolt

>Hey guys I'm a computer burdy hurdy durr

D sucks

it wont let me re post my code

iam sorry for being new to this.

>hurm de durm de doo
Oh my opcodes oh babey yeah

>800815

z
z

youtube.com/watch?v=pTAnUBbunlY

Stop false-flagging, Andrei.

coypu.sdf.org/porting-zig.html
> Porting Zig to NetBSD
Imagine wasting your time porting a language no one uses to an OS no one uses, that's, like, twice the uselessness. What's next, porting DMD to HelenOS? Porting SBCL to Redox? Porting GNU Smalltalk to OpenBSD?

anal

>can't figure out how to split up compression and flush loops for most apis
i had a terribly brilliant idea to get around being dumb
run the compression/flush loops in another thread that blocks when there's no more input

imagine wasting your time shitposting about languages you claim not to care about instead of getting better.

techbeacon.com/app-dev-testing/10-programming-languages-defining-future-coding
> 10 programming languages defining the future of coding
1. Ethereum
2. React JSX
3. TensorFlow
4. TypeScript
5. R
6. Java 8
7. Go
8. CUDA
9. YAML
10. DSL

What is this, 2009?
> Feb 7, 2019
Oh no.