/dpt/ - Daily Programming Thread

What are you working on, Jow Forums?

Last thread:

Attached: the_donald.jpg (399x477, 73K)

Other urls found in this thread:

github.com/CrumBits/Sol
github.com/coderabbi
pastebin.com/u3Y37zYz
arxiv.org/pdf/1703.00053.pdf
twitter.com/SFWRedditVideos

First for C.

Second for Ada.

nth for nim!

ITT NEET LARP

He is the next

I have a salary job tho. It's not like it's hard to get once you do uni.

interview on wednesday for a dev job at a bank. should i wear a suit?

>should i wear a suit?
Always.

Yes and shaved

>interview
>bank
>should i wear a suit

Attached: 1469843979355.png (304x366, 231K)

>Created before the bump limit
Invalid thread. Delete this shit and kill yourself.

We should go back to front panel programming. Fuck everything.

Attached: 1546655904380.jpg (996x966, 316K)

wear programming socks, that'll show them

Too bad it's too expensive to manufacture and distribute compared to just making a gui that works on monitors.

Why the fuck won't this make file work?
heap: Heap.o main.o
g++ main.o Heap.o -o heap

main.o: main.cpp
g++ -c -Wall main.cpp

Heap.o: Heap.cpp
g++ -c -Wall Heap.cpp


I keep getting 'undefined reference to 'Heap::Heap()''

For that we need to see Heap.cpp.

A bank of switches and lights is cheaper to manufacture than an LCD or CRT.

Because you're defining a template in a .cpp file probably.

i'm doing a phd in computer science
ama 4channel

Attached: anonymous.jpg (640x853, 114K)

Are you going to tell all of your users of your software to go buy such a customized thing?

why?

Trannies are cringe.

Hmm yes i am doing that... you mean like this?
template
Heap::Heap()
{
...
}


Why does that matter and what am i supposed to do about it?

my undergrad education was all regular cs and data science, but i realized i think data science is boring as hell. i decided to go for a masters focusing on cybersecurity, but a university gave me a really nice offer for a phd. they pay me to research and i pay no tuition, and some other perks like free health insurance.

going into it, i planned to get a masters on the way and bail, but i think i'm going to see it through to the end now. after i get my master's, i won't have any classwork concerns, and i'll just be researching at my leisure while getting paid.

it's one of the biggest cybersecurity university research labs in the country, it's a super fun environment, and i'm learning cybersecurity stuff at a breakneck pace. i reckon i have my entire life to wageslave, and might as well enjoy a few years doing research with my friends

are the ppl in the pic trannies? i think it was a PETA protest

template
C read(size_t n)
{
C ret;
ret.resize(n);
stream.read(reinterpret_cast(ret.data()), sizeof(T)*n);
return ret;
}

ints = ifs.read(10);


Is there any way to make something like this work?

Compiler says: "template parameter "C" may not have a template argument list"

Read about template instantiation.
tl;dr stick template definitions in a header. This won't cause linker errors because template functions are implicitly inline.

No I'm telling them to dump their computers and their entire software stack. All modern ISAs are shit anyway. I'm taking us back to the late 1940s, your programs better fit in 4k bytes nibbas.

Attached: damn.png (1280x720, 675K)

i got a cs masters recently and can probably do a phd if i want to, but i think i'd rather get a job
i dunno if i have the focus for a phd, plus i want to improve my higher level mathematics first

template

template
C read(size_t N)
{
/* ... */
}
Templates are not types. But they are like functions that take types as arguments and return other types.

>anime avatar
>retarded post
checks out

i applied to several MS programs but they all wanted to charge me for tuition
>plus i want to improve my higher level mathematics first
At my program at least, you just need to have enough familiarity with probability/statistics/basic calculus to brush up when you're taking a class that requires you to use techniques from them. You don't have to remember equations for years, you just write them down on a cheat sheet before a test

So... are you saying to basically move everything to the .h file and get rid of the cpp file?

That's right.

Im not a fan of that. Theres gotta be another way

Attached: 1544426209785.jpg (686x441, 117K)

You think I'm retarded now but when you see the abyss you'll know I was right. After decades of incompetence everything above the level of transistors in modern computing is fucked.

Attached: suicide.png (657x550, 410K)

Welcome to SEPPLES

I'm working on hiring someone who is experienced with d3. Shit sucks nobody is.

it's the topic & the open positions that req. it, plus i'm fine (maybe after some revision) with the basic stuff

Explicit template instantiation, but that only works if you know ahead of time exactly what templates will be instantiated.

ok i'll wear a suit
not shaving though, will trim

>is a JavaScript library for producing dynamic, interactive data visualizations in web browsers.
/wdg/

It's dirty as fuck and embarrassing. Also not developed enough to be actually useful. Pls no bulli.
github.com/CrumBits/Sol

>is a bunch of retards none of them actually knows beyond basics and spends 15 hours per day in discord
Wow, thanks!!!

Have you heard of broken windows theory?
I need to tell you this so you keep away from /dpt/ with that stuff.

Better insane than mundane.

thank you bro, I'll check it tomorrow

deep

Fuck off back to your containment site.

Javascript is not web anymore grandpa

>library for producing dynamic, interactive data visualizations in web browsers is not web anymore grandpa
Imagine if you were just ignorant and said this instead of being stupid.

what anime is that

Speaking of dynamic, interactive data vis though. WebAssembly gonna put d3 out of a job, right?

Attached: hoodies.jpg (475x711, 43K)

What's this about gcc dropping support for static linking?

Attached: 1546855459721.png (1080x1080, 867K)

There is literally no way that would ever happen. Also, it's the GNU linker that is responsible for that, not GCC.

>forcing dynamic linking
what a horrible future that would be.

Isn't GNU ld part of the GCC?

github.com/coderabbi

Technically part of binutils instead of the compiler. It's not a particularly important distinction to make.
Static linking is exactly the same as "normal" linking of your own source files. All that's different is that you put a bunch of object files in some archive instead of being built from your own code.
Dropping static linking is the same as dropping normal linking.

You know, I think I kinda like getting stuck, it allows me to spent more time with the program, and part of programming is thinkering, then again I don't program for a living, so it might be a different case if you do it with a deadline.

how cool is lennart potering terminal

Attached: DrkBu0VW4AA37Gk.png large.png (1252x1374, 360K)

>this
>medium
This isn't normal, but on Lennart, it is.
Lennart, not even once.

what is this?

Just made a ruby script to convert the Mother 3 Soundtrack from .OGG to .MP3's

It took me like ten minutes. I'm really enjoying ruby!
pastebin.com/u3Y37zYz

JavaScript rocks!

Attached: javascript rocks.png (1000x494, 134K)

What's a good userland project to write in C?

a compiler for a replacement for C.

so ffmpeg converts the file and not your script?

Yeah. It's a bit boring in that regard, but I decided to not reinvent the wheel. It was for a small personal project, so I didn't want to spend too long on it.

based and redpilled

You missed the point completely. You didn't use ruby, you used ffmpeg. Your script doesn't convert anything, ffmpeg does. You're a fraud.

If you program just for the functionality and the use of your program then it's better to use something reliable or stable like ffmpeg.

But really interesting would be if you had written the entire algorithm to convert a .ogg to .mp3 file in ruby.

Dude, I'm honestly really sorry to disappoint you. I'll do better next time, random stranger on the internet.

Thanks! I'm actually considering getting "The Audio Programming Handbook" and reading it over the summer to make something similar to that! I might start small and work with MIDIs, though. Have you heard anything about the book?

>The Audio Programming Handbook
>Have you heard
>heard

for file in *.ogg
do
ffmpeg -i "$file" -c:a libmp3lame "${file%.*}.mp3"
done

Attached: 1546797166454.jpg (193x193, 19K)

heh

33: if-then-return-end is better written as return-if. The rest is decent beginner's ruby.

umm honey, d3 is for desktop applications too now.

I was looking at the current options when it comes to live updating graphs for a JS app. What do you think the best open-source options are currently? I just want to add a frontend GUI to my python script that communicates with electrical test equipment. Live updating line graphs basically.

What is d3?

i wish there was a way to combine high level and low level. doing systems programming for a class and 80% of the code doesn't need to be this low level

This.
I'm amazed nobody heckled user about being so excessive. I copy and paste that for different extensions and take an argument in my script.

The usual answer is to do C FFI in a high level language.

Look into F* and Low*
arxiv.org/pdf/1703.00053.pdf

>C
>low level

THIS

>combine high level and low level
It's almost always ends up being the "worst of both worlds".

Python with C/C++ extensions.

I agree with you, it's just that when people say low level they usually don't mean low level. They mean high level but system-y like C.

the C i'm doing is pretty low level. i'm reading and modifying registers

Rust, Ada, Common Lisp, and C++ can all inline ASM. I wouldn't call them low level.

Newbie question:

In java.
If I have a function that takes serveral functions as arugment, like func1(func2(func3(some_value)));
Where would I need to throw a RuntimeException in order to be able to catch it if func1 is in a try block?

Attached: iQIY.jpg (500x360, 26K)

depends on how you define low level

>A low level language needs to be able to address registers directly
Who on earth started this retarded meme? No language that claims to be even slightly portable (i.e. anything that's not an assembly language) doesn't allow access to those, as they are inherently unportable.
The distinction between "low" and "high" level more sensibly means that it has direct, unmanaged access to memory.

Attached: 1374576513876.png (726x1040, 642K)

The distinction between high level and low level is about hardware specificity. Something like C is very portable.
32bit x86 is not. Even if it's quite portable among x86 machines.

Is nand2tetris a good meme?
I wanna learn more low-level stuff, at least well enough to interact with the OS and feel good managing memory and not fucking everything up.

well i'm writing non portable code so i guess it's low level

There are certain things in life that you simply can not make without direct access to asm.

>Who on earth started this retarded meme?
I don't believe anyone did. It's not a meme. It's just user that supposed that right here.

I've never heard that definition before.