/dpt/ - Daily Programming Thread

Last thread: What are you working on, Sup Forums?

Other urls found in this thread:

fftw.org/
twitter.com/NSFWRedditVideo

I learn C. I can write C if help needed

how often do you use monads, /dpt/? if not why not?

>anime
Hi.
thank you

What do you have against genuine C users (not trolls like yourself) that compels you to try so hard to misrepresent us?
Is it literally just "stop liking things I don't like?"

His company went bankrupt after a C memory bug resulted in hackers gaining full control over his servers, leaking user CC numbers and wiping out all of their data. He's now on a crusade against C and in favor of memory safety.

You don't need monads to emulate imperative programming when your language:
>is already imperative
>doesn't have retarded rules about how every single command in an imperative sequence must be a function of the same typeclass
>doesn't mandate purity, type safety, and functionalism at all costs, including the cost of expressivity

someone post the leddit pasta

>a C memory bug
His fault for not using valgrind enough

>imperative
What about Applicative, Alternative, MonadLogic, etc?

>You don't need monads to emulate imperative programming
>implying that's the only use of monads
>implying that use of monads doesn't have some advantages over "normal" imperative programming

Fellow anons, I didn't get the job. The recruiter told me my soft skills are at junior level and they are looking for a more experienced person. The company also doesn't have the capacity to mentor me in boosting those skills. She's right though, I don't have much experience in dealing with customers or project management. However, my technical skills are at senior level even though the job only requires medior level skills.
Some anons gave me advice in smooth talking my way through the soft skills interview. I'll give that a try next time.

So, it looks like I became a meme now... Now I can rest in peace.
Will see You in hell, animetards.

>She's right though
>She
>my technical skills are at senior level
>expecting "her" to recognize technical skill

I can write 'C' too, man! You C? C!
Cool!!1

>requiring that every function in a monadic sequence be of the same typeclass is an """""""""""""""""advantage"""""""""""""""""""" over normal imperative programming

good look

whatever you say fellow redditor

I had two interviews. The first interview was with the recruiter (the she in the story) and a project manager. The second interview was with two senior developers.

I don't understand this meme.

Now quote where I said that specifically is an advantage, fucktardino.

What is the moral of your story, then? That the rest of them couldn't recognize your superior technical skill, either?

>told so hard he can literally only respond with the "whomst arst thou quothing" meme

I start learning ruby

I need an idea where to apply ruby knowledge.

I think the moral is he needs to be more confident and social.

That I lack in social skills.

Pretty much every discussion I have with a haskellfag ends up with

>Well you see back in the early 1900s there was this person called Russell and his friend Godel...

>i-i-it was because i wasn't social enough
Sure thing... because that's a top priority for a programming job. It was most likely a combination of Dunning-Kruger and being socially awkward that got you rejected.

>because that's a top priority for a programming job
not him but this unironically

>because that's a top priority for a programming job.

You'd be surprised.

She told me that my technical skills are at senior level. I didn't make that up.
Why would I lie about that on an anonymous imageboard?

>I need an idea where to apply ruby knowledge.
Write a Ruby program to give you ideas.

>Why would I lie about that on an anonymous imageboard?

c++ is the greatest language of all time

lol no

Can anons check this for me? My computer kicked the bucket last night so im at school trying to do my assembly final. Does this look good? ended around 80 lines.

Reminder to unironically read a lot of books.

social skills are higher on the list of requirements than programming skill in most companies
and no, I'm not exaggerating
even in hipster startups (maybe even especially) where you need to fit into the clique (aka you have to be a good "cultural fit")

Yeah, keep telling that to yourself. You only get rejected because you lack social skills. The average programmer is a Chad and you just wouldn't fit in. Dunning-Kruger in action, if you ask me.

>She told me that my technical skills are at senior level.
Sure thing, user. That's what they usually do. They praise your technical skills but tell you that you're just not friendly enough. I believe it.

>I didn't make that up. Why would I lie about that
Same reason people all over Sup Forums lie about everything all the time while saying the exact same thing.

Not him but people like you are why Sup Forums is a shithole.
Around here, you don't have to be right to win a debate, or even have the best argument.
You just have to shitpost the hardest.

Do you have a development job?

>social skills are higher on the list of requirements than programming skill in most companies
Yeah, no. The only "social skills" required from you is to not look deranged or like a potential rapist. Go tell this story to other perma-NEETs who have never been hired for anything.

at this point it's evident that you're just playing devils advocate for funsies

I wonder if there are employed chad haskell programmers in the world

all haskell programmers are chads

>Do you have a development job?
Yes, and I've worked in three other places before this one, and been to probably two dozens of interviews, and they NEVER say anything like what you're claiming. They won't even tell you if you suck on a technical level, let alone if you just look like a freak. It's a complete and utter fantasy, an obvious fabrication, and only other lying NEETs would buy it.

trying to get the motivation to do anything but play videogames all day

employed chad c++ brogrammer reporting in

>at this point it's evident that you're just playing devils advocate for funsies
No, it's entirely self-evident to anyone who's ever been on any interview that you are lying, just like yesterday you and a dozen other kids were lying about being interviewers and preferring Haskell programmers with anime profiles. It's constant in these threads.

I have done a lot of interviews, and I don't think his story is that outlandish. I think you're just a college freshman that is trying to make himself feel better about his shit social skills.

>"I-i don't need to be social to get a job! I'll be fine being a complete autist and can't manage to look people into the eyes!"

I never claimed to be a senior. I consider myself a medior at best. I have no idea why you think I suffer from the Dunning-Kruger effect.
>Sure thing, user. That's what they usually do. They praise your technical skills but tell you that you're just not friendly enough. I believe it.
I never said that they told me that I'm not friendly enough. They told me that I lack social skills. Those two are not related.

Trying to figure out if I should walk or run in the rain

All results so far point to run

Yesterday you were LARPing as interviewers with a preference for socially awkward Haskell programmers. Today you are LARPing as competent programmers getting rejected only for their lack of social skills. I just can't get over how funny you guys are. Literally anyone can fucking tell that most of posters ITT are pathological liars and autists who can't write a single non-fizzbuzz line of code.

just go watch that mythbusters episode

>look at candidate's CV
>i hate anime
>into the trash
>next
>i love java
>trash
>i love C++
>trash
>i love Haskell & anime
hired to be my boss

I have no clue what you're talking about.
You have issues, my dude.

You shouldn't go out when it's raining, you should stay home and make yourself comfy.

Why Python is so retarded??
I made a small program in Python to create a list of prime number from 0 to MAX_UINT, but it ran so slow.
Then I found out that you can speed the calculation up using C program and link it with Python.h.
After spend 2 hours figuring out and porting my existing prime checker from pure C to python extension, I rerun the program with
my extension but now it spewing garbage output.

So why is Python retarded now?

Sure thing, friendo. Yesterday I was tired and went to bed early. I didn't even touch the computer.
Stop making assumptions.

>/dpt/ is one person

There are actually 3 /dpt/ posters.
The haskell fag
The C fag
The newbie

>/agdg/
>now /dpt/
Why do generals I frequent attract shitposters that spend hours and days here saying the same things and having the same arguments time and time again and acting as if everyone's on their side except a couple of outliers when really it's the other way around?

it's the Trump era
everyone and everything else is lying fake news besides what I believe in my own personal alternative reality

>now
You haven't been here very long, have you?

>durrr you said /dpt/ is one person
No, but you can always recognize the same bunch of autistic pathological liars, because they LARP almost every day, it's always completely delusional fantasy-tier shit, and they always react in exactly the same way when called out, so you know it's the same bunch of people.

>C project
>have a bunch of custom struct types imported in through include files
>Eclipse refuses to recognize them even though I added all the relevant paths in project properties
>try Netbeans
>Netbeans will only recognize about half of them draw red lines all over the rest

Why are C IDEs so shit?

IDEs are shit in general.
Use Vim.

yeah the lies in here are pretty bad, I just saw this earlier today

> Yes, and I've worked in three other places before this one, and been to probably two dozens of interviews

Yeah right, like this autist would ever find a job let alone get an interview.

Global variables, kids... They teach you to avoid them in your code, but then base the entire computing ecosystem on them, with the same sad results.

Struct definitions are not global variables, dumbass.

>LARP
_donald

>n-n-no u
Yeah, always the same reaction when you get called out; always projection.

Fuck off, reddit spacer.

Use Emacs, it integrates directly with Clang so red underlines in the IDE are directly correlated with compile errors. If you have funky build paths you have to set up some config for it in elisp, which is kind of annoying, but besides that it just werks.

I didn't say struct definitions are global variables, fucktard. I said good luck figuring out where exactly Eclipse looks for your files because it probably uses some environment variables and shit buried deeply in the configuration options.

>Clang
I have to use GCC because it's building to some exotic embedded MCU architecture that Clang doesn't compile to yet.

Does it compile at all under clang? You could use the clang backend just for checking and autocomplete but use gcc when actually building.

Also there is almost definitely the same Clang backend for Vim if that would suit you better.

>learn lisp so that you can use an editor that gives you carpal tunnel

no

Will trade 10 dollar steam game for someone to code part of my final in assembly (Irvine32).

It’s not that I can’t do this it’s that my computer died on me last night and I want to be finished with this class.

Add steam name in code comments.

Code needs to 1)remove punctuation
2)convert it all to lower case 3)work from both ends to see if they’re the same

Must have a string of at most 40 chars.

Scum-user out.

Make it $200 and we'll talk.

Why would you use an IDE, especially Eclipse of all fucking things, for C?

You can use clang tools for code completion/formatting/other things without actually compiling with clang

No thanks, this code isn’t too complicated I just physically cannot do it :(

Then just do it yourself, user. You can find a pretty good beater laptop for less than $200 at any local pawn shop.

like one to say happy birthday to you?

I really dont have the time. Thanks for replying though.

thinking of suicide. opinions?

Try Emacs.

>thinking of suicide. opinions?
Try to learn C++ if you want to go through with it. Learn Lisp if you want a reason to live.

Stay inside and learn how to write less ugly code.

>1288 raindrops impacted the cunt
kek'd out loud

does js even allow you to declare types?

>declare types
Disgusting.

>implying
it's literally a throwaway project that only I will ever lay eyes on (and Sup Forums now I guess). I know how shit the code is but it doesn't really matter at this scale

>var
disgusting

JS doesn't even have integers.

>not formally proving the correctness of the raindrops impacting the cunt in Agda
This thread is for professional programmers. You're looking for

>JS doesn't even have integers.
WRONG!
var x = 123 | 0; // we integers now

Can anyone help me understand fourier transform?
I am creating audio visualization software, managed to decode audio file into individual samples and then I split it into individual 'frames' based on the wanted fps.
That is, for example, I get 4410 samples per 'frame' if the sample rate is 44.1khz

That's when the problems start, what do I do now?
Is the extracting samples for each frame a correct way of getting the data for further analysis?
And if so how do I apply the fourier transform and what do I do afterwards with the complex numbers?

Sorry if this is a silly question but it's the first time I'm dealing with sound analysis.

4410 per frame if the wanted refresh rate is set to 10*

>how do I apply the fourier transform
fftw.org/

>what do I do afterwards with the complex numbers?
Get their magnitude.