/dpt/ - Daily Programming Thread

What are you working on, Sup Forums?

Old thread:

Other urls found in this thread:

en.wikipedia.org/wiki/Decimal_mark#Countries_using_Arabic_numerals_with_decimal_comma
buildyourownlisp.com/
youtube.com/watch?v=irvFiTsY05Q
advsys.net/ken/voxlap/pnd3d.htm
developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Pixel_manipulation_with_canvas
github.com/karan/Projects
newscientist.com/blogs/shortsharpscience/2009/03/ada-lovelace-day.html
twitter.com/NSFWRedditGif

I wish more languages used R's

halp

Currently going through "Expert C Programming" as I'm taking a pretty low-level C class.
I'm finding it to be really well written and am enjoying it immensely. Anyone know similar books I could go read?

Related question: Anyone know how to download the ANSI C Rationale with scp? I tried ftp and scp
- lambda @ DN0a22e4eb - ~$ scp [email protected]:/doc/standards/ansi/X3.159-1989/ Rationale
ssh: connect to host ftp.uu.net port 22: Operation timed out

but it doesn't seem to be working

After how many beers are you most productive?
For me it's like 3x 0,5L (17oz)

template
T *malloc(size_t n = 1) {
return static_cast(malloc(sizeof(T) * n));
}


This is how malloc was meant to be.

>3 times 0 and 5 litres

hobbyist here trying to find motivation. do I need pic related?

>not ::malloc in body
>unchecked overflow in the multiplication

Most of the world uses comma instead of a dot: en.wikipedia.org/wiki/Decimal_mark#Countries_using_Arabic_numerals_with_decimal_comma

>how to stack overflow

Every time I drink at home, I get distracted and horny and I break out the suitcase under my bed and dress up like a girl and jerk off and fall asleep from the afterglowy feeling and get no coding done ever, don't fall for the memes.

If you’re copying an entire folder, you need to add the -r flag

that is ridiculously overkill for a hobbyist

It's 0 POINT 5, not 0 AND 5, dumb towelhead.

Literal retard.

>implying any important country uses decimal comma

Does making a toy CPU in Logisim count as programming?

It doesn't even have an ALU yet, it's coming shortly.
And yes, it will be an x86 killer, no question about it.

if you built paper airplanes for a hobby, would you find it fun to read graduate-level texts on fluid dynamics as they pertain to jet engines?

>Most of the world uses comma
And most of the world is shit and full of niggers/subhumans.
Pic related, literally only the shit countries use comma.

if you find it interesting, go for it, don't listen to those other guys

Am russian, can confirm that commas are retarded.

>hobbyist trying to find motivation
is WAY different from
>hobbyist looking to challenge themselves beyond anything they've ever encountered

>map is color-coded but has no key

...

looks nice
are you doing your own ISA? your own microarchitecture for an existing one? CISC or RISC?

that chart is wrong, canada typically uses periods except for french texts (and nobody fucking likes quebec anyway)

Take a look at the color again, blind retard.

FUCK OPENGL

Do you guys use write lists of numbers like this?
1,3, 4,5, 6,7
or like this?
1,3. 4,5. 6,7

I'll try to reinvent the wheel as much as possible, as it's the only fun way.
I'm periodically reading up on RISC-V just so I have a general idea of where I'm headed (and not doing anything too stupid), but nothing is certain.

The dream is to eventually write an LLVM backend for it so that it can run actual software, if I manage to figure LLVM out.

The key never defined teal.

(map inc (flatten [[1 2 3] 1 2 [1 2 3]]))

flatmap is a combination of map and flatten.
I'm not sure how common a flatmap function is, but Java and Scala have them.

who ats here?

typedef int2 = (int, int)
fn sqrsum2
(xy: int2): int =
let val x = xy.0 and y = xy.1 in x * x + y * y end

that's true

but >hobbiyist
is quite vague

for example, I'm a hobbyist, and I read stuff about algorithms when I'm bored and it makes me feel better

if someone has a math/algorithms background to begin with, it can be a lot of fun

in Haskell this is >>=

Statically typed Common Lisp when?

but lisp is the only lang where dynamic typing works

Go to bed dark blade master.

Well RISC would definitely make the cpu simpler, which would also make it easier to do things like pipelining if you wanted to

hey niggas is rust worth learning or is it tainted by sjws

it is

it is

GNU/communism is the inevitable future

posting in shill filled thread

fug

>is rust worth learning
Yes, if only to experience first-hand what a crock of shit it is so that you could explain to others why they should avoid it.

i know this one guy that programs in rust and he’s pretty cool no homo

what do you dislike about Rust?

but what if I want to impress my LGBTQA+ with faux memory safety

like this

1, 2, 3

1.5; 2.7; 3.8

Slovakia

>what if I want to impress my LGBTQA+
Just show them how small your dick is, you don't need programming langauge here.

I don't judge you

but rust is good desu

He forgives you
I won't

Could be worse
(defn dagtoppers []
(->>
(client/get "dumpert.nl/mobile_api/json/top5/dag/2017-10-17" {:as :json})
(:body)
(:items)
(map #(:media %))
(flatten)
(filter #(= "VIDEO" (:mediatype %)))
(map #(:variants %))
(map #(last %))
(map #(:uri %))))

Rust will never be good until it:
- implements non lexical lifetimes
- gets full metaprogramming support
- gets much better architecture support (you can't even compile Rust to mips1 lmao)

>([](->>(/""{: :})(:)(:)(#(:%))()(#(=""(:%)))(#(:%))(#(%))(#(:%))))
So this is the power of languages pretending to be lisp

Been programming a lot of sepples for a couple of years as a hobby but never actually finished a project mainly because "gotta do it from scratch" autism. What projects should I do for a portfolio considering I'm not doing a CS/comp eng/whatever related degree?

It isn't even hard to read.

work at geek squad

Write a kernel, in sepples.

buildyourownlisp.com/
except do your own parser combinator library too

We have literal APL programmer here

>shilling some overrated cunny on the first page
wow stopped reading right there

brainletts from /dpt/ could not code this

youtube.com/watch?v=irvFiTsY05Q

and of course this
advsys.net/ken/voxlap/pnd3d.htm

retard

jesus christ those sounds and graphics suck

*nodding respectfully towards you*
t. balding numale

These are just shorthands for writing lambdas and a macro for writing (f (g (h x))) as (->> (h) (g) (f)).

how does one implement a "timer" that counts down to zero at a rate of "60 hertz"? I'm implementing a chip8 interpreter
two ideas:
- use a thread
- decrement the timer by 1 for each cycle of main instruction loop

wow, are you that offended that a woman was one of the first computer scientists? grow the fuck up

>today's state of dpt

hey /dpt/

I'm reading up on the js ImageData documentation on but I'm having trouble understanding it's method accessing rgba data.

could someone explain it to me?

where is proofs other than balding numales like you?

piss off with your web shit

woops forgot link developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Pixel_manipulation_with_canvas

You'll have more luck in the electronics general in /diy/

"Ada Lovelace's notes were labelled alphabetically from A to G. In note G, she describes an algorithm for the Analytical Engine to compute Bernoulli numbers. It is considered the first published algorithm ever specifically tailored for implementation on a computer, and Ada Lovelace has often been cited as the first computer programmer for this reason."
It's noteworthy. She did technically develop the first computer algorithm. I think it's hilarious that you're that asspained by the mere sight of her picture.

github.com/karan/Projects

[citaiton needed]

>What projects should I do for a portfolio
You're gonna have a bad time starting off like this.
Find a problem you're passionate about, write software to fix it. That's the only way to get good shit on your resume.

Parker, Matt (2014). Things to Make and Do in the Fourth Dimension. Farrar, Straus & Giroux. p. 261.
newscientist.com/blogs/shortsharpscience/2009/03/ada-lovelace-day.html

The equivalent Java code would've looked much worse. The only real noise here is the # reader macro.

Guys, I'm nearing the end of chapter 3 of sicp and it has just been a standard introductory book. I have not been enlightened. I have also procrastinated any real world programming.

I do the exercises but I don't see how I am supposed to be enlightened or get superpowers from this book.

What am I supposed to get from the book? Are the last two chapters good? Any suggestions for something to program as a first time programmer?

>He fell for the sicp meme

>balding numale literally who e-celeb
color me surprised

finish the book and gain superpowers

>ada: i think your machine can be used to make music if you just treat numbers like musical notes!
>170 years later, people would later mistake this historical blip as a stroke of genius and call her the first computer programmer

I hate this timeline.

...

>Misogynistic male this upset there are women in his field.

fomating stupid "CSV" files. fucking plebs.
REEEEEEEEEEEEEEEEEEEE

keep putting women on a pedestal, castration day can't come soon enough

Fucking hell. As a female developer, it's people like you that make it a pain in the ass to get anywhere in industry.

I asked feminists on facebook who want male allies to help stop rape culture why they want help from their supposed oppressors. Still waiting for a reply

taking estrogen and castrating yourself doesn't make you a girl sweetie

>public static class int main
Whomsted idea was this shit?

It makes sense if you aren't a mongoloid

womanlet

Please leave this world, you are mentally ill and a burden on all of us.

Just learned AJAX for my web dev class today.
Been working on a persistent browser based game in node for a bit
Thinking of making a WM in node since there is an X11 wrapper, and using electron for widgets/panels etc. still debating

Umm woah woah woah there sweetie, watch it with that ableism, buddy

more like
public static class public static void main String[]