/dpt/ - Daily Programming Thread

Old thread: What are you working on, Jow Forums?

Attached: index.png (267x189, 2K)

Other urls found in this thread:

pastebin.com/raw/6mnMqmkc
codesandbox.io/s/static-5u45q
squeak.org/
dyalog.com/mastering-dyalog-apl.htm
tridejur.uy/searchchan.php
en.wikipedia.org/wiki/Hindley–Milner_type_system
github.com/manishroshan
twitter.com/AnonBabble

x touched my penis etc

Attached: letsu-sleep.png (381x328, 129K)

working on my roguelike,
just about got basic dungeon generation down
though the code should be refactored heavily

thanks to the anons who suggest GohuFont,
it was a bitch finding the right ascii glyphs but its
very readable

Attached: rogue.png (635x150, 8K)

I am learning C++ from a book made in 2000

Attached: 1454724890751.png (720x480, 208K)

wrong image

Attached: rogue.png (551x280, 75K)

Show us your void.h

stop rn

Currently FCC which is more webdev, but the Build-your-own-x for the C++ stacks after that.

but why

Attached: 1467544552285.jpg (503x462, 129K)

pastebin.com/raw/6mnMqmkc

I learnt C from a book made in 1978.

Attached: cool.png (900x955, 253K)

>void.h
it's not written in C. Though I kind of regret that I didn't. Would have been much faster development for a roguelike.

Attached: rogue2.png (638x376, 11K)

>still having the godot symbol

don't worry user I will remove it and the splash screen when I get to making the logo

I learned C in 1978...

>haskell OP
boycotting this lazy thread.

>I learned C in 1978...

Attached: brian-kernighan.jpg (900x600, 71K)

>that screensaver

Attached: pure.png (800x800, 116K)

>python
lmao

I fixed duck user's site codesandbox.io/s/static-5u45q

>Using 42 any time an example int is required
I'm getting really tired of this meme

based kaga poster

not an anime, but will do

its not python its gdscript

No way, Anone! You can only have this ice cream once you're done with your JavaScript studies for today!

Attached: eadb043adb2bbe1eacc200089d2288be.jpg (1200x1600, 318K)

't was about time you started posting again, I was getting worried

but i don't even like ice cream and i finished college years ago

>0xdeadbeef

>Clojure permits keys of different types in the same map

When is this useful? I can't remember ever thinking I wanted this. Do I just have bad imagination?

Attached: reading and traveling hitler.jpg (1080x1071, 130K)

>dumb cnile can't even recognize Python

>cnile
kill yourself hipster.

why isn't there a programming language that doesn't require shitty autistic text?. I want a progrmming language that's basically photoshop

I want a programing language that's based around music. I just play a song and a program happens

very nice
beautiful JS code

squeak.org/
dyalog.com/mastering-dyalog-apl.htm
as close as it gets without getting stupid.

The most powerful programming language is Lisp. If you don't know Lisp (or its variant, Scheme), you don't know what it means for a programming language to be powerful and elegant. Once you learn Lisp, you will see what is lacking in most other languages.

Wrong.

>i expect to finish the first draft of volume 5 of the art of computer programming by 2025

Attached: Knuth1988.jpg (450x591, 47K)

>81 years old

Attached: 1564274647411.jpg (688x720, 169K)

/wdg/ has been trying to write an algorithm to reverse a string for the last 4 hours

>/dpt/ #24353234
>still can't program

how's this possible?

There's certainly a different intellectual atmosphere in their threads.

Attached: 1565139996122.png (1000x710, 344K)

Why does /wdg/ actually get things done while /dpt/ is full of glowniggers shilling insecure dinosaur shitlangs?

>building websites
>hard

Why does this cause an infinite loop?
(let ((h (make-hash-table)))
(setf (gethash 1 h) 1)
(setf (gethash 2 h) 2)
(setf (gethash 4 h) 3)
(defun collen (n)
(or (gethash n h)
(setf (gethash n h)
(1+ (collen (if (evenp n)
(/ n 2)
(1+ (* 3 n)))))))))

That's a pretty dumb thing to say you know. I mean that entirely depends on what your backend is doing. Take whatever you're doing, run it on a server and give it a website interface. Is it now suddenly trivial?

most things on /wdg/ are CRUD/hello world tier, so yes.

I'd like to see your attempt.

> )))))))))

Attached: 1480349587824.jpg (524x468, 43K)

It's because (((Lisp))) is jewish.

What happens if he dies before completing it? Does he have someone set to finish the series off if he dies?

CL-USER> (((Lisp)))
; in: ((LISP))
; (((LISP)))
;
; caught ERROR:
; illegal function call
;
; compilation unit finished
; caught 1 ERROR condition

this
the anti lisp fags don't even know how lisp works
they just dismiss it because of a Jow Forums meme and clisp having a menorah in the start of the repl

>I'd like to see your attempt.
I don't know much javascript but something like this:

const string = "some string";
var s = "";

for (let i = string.length - 1; i >= 0; --i) {
s += string[i];
}

console.log(s);

Attached: 1565694528008.jpg (1005x794, 162K)

absolute retards if you think that's supposed to be actual syntax,

I was joking, user. No need to get so triggered. I actually made a Lisp interpreter and enjoyed it in college.

based retard poster

I am working on building an AI laboratory to invade Japan as soon as possible, I'll need help with Captcha
tridejur.uy/searchchan.php

Attached: 42.png (614x460, 5K)

(forgive 'user)

Hmm really makes you wonder

Attached: file.png (655x458, 62K)

Um goy what is that?

You can't just add a Haskell like type system to a language like python.
For linear type inference to work you have strict restrictions on it
en.wikipedia.org/wiki/Hindley–Milner_type_system

There is actually an Electricity bill, but will make sure you never wanna leave

>manishroshan
github.com/manishroshan

wtf

>/dpt/ user did in 15 minutes what /wdg/ has been trying to do for hours
The absolute state.

ohnononono

revert = lambda s: s[-1] + revert(s[:-1]) if s else ''

>using var and then using let in the following line

8 secs
in python this is just
reverse = lambda s: s[::-1]

>lowering yourself to writing javascript

Attached: kenny.gif (498x280, 1.49M)

see

Yeah sure, didn't want to go that far with the std cheating. I didn't even like using a lambda as it's not very python, but given I talked about the Haskell type system above

Don't be a dick delete that shit now.

std::string reverse(const std::string& str) {
return std::string(str.crbegin(), str.crend());
}

I thought let just means it's scoped normally, so let in the global scope would be redundant. Again, I don't know much about javascript.

If that's the only critique though I'm happy, because I was ready to write my own string_length function if you were going to be hardnosed about it.

Attached: marisa.jpg (1500x1062, 378K)

Is there a simple way to use node.js to make a secure website? What is with all these damn different frameworks that still require so much reading to do what seems like should be simple webpajeet stuff?

>web
>simple
You could have a total front-end though, with Elm.
And then use haskell as a backend.

>>>/wdg/

/wdg/ would shit themselves trying to use haskell.

Im from /wdg/ and my favorite language is Haskell

of course it is.

Making money from crypto-currency infrastructure programming.

whoops meant to link to >>>/wdg/

I find it funny how /dpt/ makes fun of webshits despite JS being on equal power levels compared to Lisp.

JS is even more unsafe and shitty than Lisp, so no, it's below shit.

no base case

For python is there a way to copy folders (not files) into another directory? I'm trying to use shutil to essentially move any folders beginning with a phrase in my Downloads folder to be searched for and moved to another directory. I'm working with two things right now from what I've gathered from videos and google searches.
First
import shutil
import os
def copytree(src, dst, symlinks=False, ignore=None):
for folder in os.listdir(src):
src = os.path.join(src)

Second

import shutil
import os
source = os.listdir("/Users/Me/Downloads/")
destination = "/Users/Me/Notes/Week 5/Day 1"
for folders in source:
if folders.beginswith("Stu_"):
shutil.copy(folders,destination)

Still new to python so plz no bully. Any advice or something I should try?

Attached: thinking.gif (500x281, 124K)

>I'm trying to use shutil to essentially move any folders beginning with a phrase in my Downloads folder
It's porn, isn't it?

Notes for class. But if their is a need for that then I would just changed the code around a bit.

you think there isn't a StackExchange thread on that exact issue?

It works now.
And there is
notice the gethash of 1 is defined 1

>not realizing lisp is a meme as well

Attached: 7IlgLc8.png (554x788, 435K)

wrong. try with "mañana mañana"

Does anyone know how I'd go about getting the subarray of a two dimensional array in Common Lisp?
(? (make-array '(3 3)) 1 1) => #2a((0 0) (0 0))

i just learned that postgresql supports materialized views, which would be really useful to me. i have a whole dumb set of cache tables in mysql updated by a script that they could replace. given i'm not that great at sql stuff is ot worth making the switch, or is postgres for smart people only?

migrating database in general is a bitch

also wrong, see

i'm in the process of redesigning some big chunks of the db anyway, and updating a lot of code, so some extra fucking around wouldn't be too bad.

postgres is superior in nearly every concieveable way in my experience