/dpt/ - Daily Programming Thread

What are you working on, Jow Forums?

Last thread:

Attached: DPT.png (934x1000, 389K)

Other urls found in this thread:

strawpoll.me/18534350
htdp.org/2018-01-06/Book/
myredditnudes.com/
twitter.com/NSFWRedditVideo

nth for bad API error messages

Javascript is the most powerful lisp

Attached: Thank+you+based+doge+_301f4c059c73d8b78555c492ff0908be.png (747x1012, 1.11M)

Rewriting the Linux kernel in Haskell.

Rust!

Attached: E9FDBE13-D859-427F-8005-7E956C16808A.jpg (2048x1870, 525K)

making my game engine multithreaded
this shit is a bitch to deal with
fuck opengl
why does this shit needs to run on the main thread???

Learning x86 and x86_64 assembly

I want to try rust, but I have a huge jaw and obviously wouldn't pass.

post body DYEL

>be me
>working some really shitty engineering job for $60k a year
>get an offer to move across the country and work as a data scientist for $90k a year at this huge company
>accept the offer and move 1500 miles away
>start working there
>it turns out they've outsourced almost their entire team of developers
>I work on a team consisting of 10 full time US citizens and 147 H1B contractors from India
>it begins to come to light that they hired me because
>A.) I'm cheap for a data scientist ($90k instead of $150k)
>B.) this high-profile project that will determine the future of the company is at risk of failing, and they want me to fix everything for them
>the Indian contractors have no idea what they're doing and everything is in really bad shape
>the company itself is drowning in corp-speaking dumbasses who just schedule meetings all day to "align synergies"

>fast-forward to the present day
>it turns out that this project was really, fundamentally designed wrong and is producing totally useless results
>the executives in the company want to be using it right now even though it's not ready
>nobody here knows what they're doing so they don't really understand just how severe the problem is
>we may have to throw away a year of work from the entire team and start completely over
>propose a really mathematically complicated fix that will allow us to not throw everything away
>working these insane 80 hour weeks to get it done since business wanted the project working a month
>all five of my managers questioning me why it's taking so long, but they don't even remotely understand what I'm doing
>I'm only 24 but I'm having chest pain from the crazy amounts that I'm working
>concerned about losing my job
Help. What do I do here? My last job was so shitty, and I thought this would be my big break. How do I not get fired for other people fucking up?

Attached: 1548044180771.jpg (250x141, 16K)

Vulkan

just quit and live off your savings for a couple of months while applying elsewhere
you're only 24

I'm stuck in the midwest now, and I have 10 months left on my lease. I was at my last job for less than a year too. I need to make this job work if at all possible.

i'm not saying you have to move, just apply elsewhere. i'm in the midwest too, and there are plenty of jobs. also, what do you mean by big break?

Lisp is the most powerful programming language.

How can people afford to move across a state, yet alone across country at a young age to work? I feel like that moving itself would cost at least several hundreds, if not thousands, of dollars, not including the cost of getting an apartment or down payment on a home.

If I get fired or quit, I'll have to pay back $14k in relocation and signing bonuses.
>what do you mean by big break?
I got hired because I do this as a hobby. I love this line of work, but the expectations from management are impossible.

companies offer assistance if they really want you

im pretty new, so i would rather learn opengl first...i wouldnt learn anything by copy pasting anyways.

user I made $60/year doing really easy Linux work and answering support tickets.
You are not rewarded now for your work, and you won't be rewarded later for it either. The best possible outcome is that the manager who fired the team and moved everything to India looks good for getting results.
You should immediately
1. reduce your work to 40 hrs/week
2. look for any other employment
3. talk to your parents and get confirmation that they will bail you out if you get fired
4. (provided #3) immediately give realistic numbers to your bosses about how long this will take without you overworking. tell them you've been working too hard, that the project is fucked, and that you aren't responsible but that you can fix it given time and whatever else.
5. (if not #3) lie and say you're working when you're not. Give your managers realistic expectations but don't be as up front with them about your personal situation. Seriously look for any kind of escape hatch. Is McDonalds hiring? You'll want to kill yourself for boredom but if you've no savings at all you can keep afloat while looking for another job.

This is very exciting indeed! You've been making great progress with your JavaScript studies, Anone!

Attached: 7bf6fcb8674fcac3c7a8fb3b9a9bbf7a.jpg (567x756, 49K)

oh also user, get savings.
Nothing you spend your money on is as valuable as having money in the bank.
I could tell my bosses to get fucked right now and then chill for an entire year if I wanted to.
There is *nothing* so shiny or fun that it can replace savings.

What kind of brain damage does it take to actually use C/Go?

Attached: Screenshot from 2019-08-25 10-52-32.png (480x1418, 88K)

>pay back $14k
i see. i'd probably just tough it out in that situation, since there really isn't much you can do otherwise. i get the feeling the managers will probably be too scared to let you go. i don't know, you could just start working normal hours and see what happens.

>propose a really mathematically complicated fix that will allow us to not throw everything away
>working these insane 80 hour weeks to get it done since business wanted the project working a month
This was probably a mistake. Unless you have a piece of the action that is riding on this company's success, there is no reason to save incompetent management from itself. Those 80 hr weeks would have be better spent networking and job hunting.

>only $60/year pay
>$14k in job handcuffs
PAY ATTENTION /DPT/
NEVER EVER DO THIS

I make $90k, not $60k

>code doesn't work
>comment line
>code works
>uncomment line
>code still works
Wat?

UB

Shouldn't the same UB on the same system still produce the same behavior though?

oh right. not quite as horrifying then.
if you decide to be a hero and continuing working $80/hr weeks for this project, then do some exercise, eat better. Drink more water and less coffee. Pretend you're a 40-year-old latter-day health nut. Don't actually keel over.
you lost the plot and changed other things without noticing.

not necessarily, UB if you're accessing out of bounds memory or using undefined memory can seem almost random. run your program through valgrind. Also -Wall -g

Yeah, but how much?

DEALLOCATE THIS

What the fuck programming book should I learn from as a beginner and what the fuck do I move on to from there?

Attached: 1566572981673.png (583x671, 500K)

Not him but I moved from the west coast to the east cost and it cost a little less than $1k. If you don't have a lot of stuff you can move the majority of your things in a few suitcases then buy what you need in your new area. Personally I would not reccommend moving that far unless you've spent at least a week living there. This does not mean visiting doing tourist stuff, I mean really live there: buy groceries, do something on a weekend, see if the local food is decent, figure out if there are enough decent people to stand it there.

beats me. i wouldn't be surprised if it varied a lot. i've been looking into relocating myself, but it does seem like a big hassle.

In C this is just
void func(void *data) { /*...*/ }

in go it's just
func fn(interface{} data) void {}

what's ur point?

The kind caused by doing nothing but simple programming challenges.

So how do people organise their c sources again
|
|-//sources/.c
|-//include/.h

? What about files that will never be included from outside the module - just chuck them into /sources/?

What are the equivalents of Python requests and bs4 on C#?

>*hiss*, *slither*, *hiss*
allow me to translate this retarded Python's question into English:
How, with C#, should I make web requests and work with requested HTML?

What was the prior engineering job and what was your major?

System.Net

very vague, what do you want to program?
if you know nothing, I would start with code: hidden language of computer hardware and software.
it's a very quick read and you'll come out knowing a lot more than most programmers.

strawpoll.me/18534350

>strawpoll.me/18534350
depends on the language desu.

subdirectories, your "module" should be in a directory by itself. build is recursive but don't use recursive make.

>strawpoll.me/18534350
What kind of third-worlders use spaces? You are literally using space to emulate the function that tabs were designed for.

A website that helps you find food pantries in my city. The city likes our Idea.

oh my god it's a webshit!

Why is everyone panicking over the new walrus operator in Python 3.8? It's a thing C had since forever and nobody ever complained about it.

Attached: 1562267541636.png (700x700, 202K)

Frick off no bulli

is starting with cs50 a meme?

i will forgive you only if you learn lisp

Render calls don't take that long there's not much to gain from multithreading them

its for loading the models.

You fucking larpers are insufferable. No one should use stupid niggerlicious tricks in C yet you faggots love the language because of that. My brother was right. The glitch worship that originated in Melee was the beginning of many horrible things.

Attached: 8675647687.jpg (233x216, 9K)

Wew, it took 8 months to do, but thanks to you guys calling me shit and telling me what I'm doing wrong, I finally got a job from nothing. Thanks you jackasses

C doesn't have models. Use that instead. Then you won't have to multithread.

Learn Lisp.

Asked this in another thread but it was dying: I'm finishing Andrew Ng's Machine Learning course; I found it very nice, but not overly challenging or going too in depth. Is there a recommended next step for learning Machine Learning the right way? I don't mind something statistics-heavy as long as I get to do some coding alongside it.

Salary/location?

are you using python? read "deep learning with python"
if you're taking the more general approach, read the murphy book and the bishop book.

God Elisp is retarded
>can't have optional default arguments, so must use setq
(defun (foo &optional x)
(or x (setq x 0))
(+ 3 x))


>can't returns closures
(defun div (x)
(lambda (y) (= (mod y x) 0)))

(div 3) => (lambda (y) (= (mod y x) 0)) ; notice x didn't get replaced by 3
(funcall (div 3) 9) => error, x is unbound


Yikes, wish I could just use Common Lisp to extend Emacs.

It's not great, 50k in Denver. I have to relocate, but it's something.

its ASSIMP model dumb dumb
im loading Sponza model and it hangs the program for 10 seconds.

I always thought that TAB was the only right choice. Your editor open a file, read a tabulation, and according your settings puts 4 or 8 spaces (or 2 or whatever). I don't see how space is a sane choice.
With a 16:9 screen I also don't see why choose less than 8. You got a wide enough screen to not bother, and have something easier to read.

making a porn scrapper\spammer tool in python that gets banned\shadow-banned all the time. am I retarded?

Attached: 1566079851866.jpg (640x480, 29K)

Fake the user-agent

yeh common lisp would be great
use cl-defun for your first snippet
i think on the second snippet, you need to set the lexical-binding variable to something non-nil

Really? Are you talking about
:=

I don't see it under man operator

>increase efficiency of function calling in my compiler
>5% speed improvement
Is that good? I thought increasing the speed of something as universal as a function call would result in a far greater performance increase.

Attached: 1563095917242.png (256x256, 90K)

but x = 3

whats good c sharp book if i know bits of c?

It looks different but it functions exactly like C's = operator instead of the Python one that can't be used inside expressions.

i mean c# for videogame development, or more specifically, for unity development

Why are you bothering with the Cuck tribe?

can't expressions in c have a side effect? i don't think they can in python

i've made a few silly games with pygame and thought it would be better to step up the game since i'm having fun with this

How difficult are Oracle's Java certification exams?

Attached: congratulations.jpg (1569x564, 726K)

probably a python book or htdp.org/2018-01-06/Book/

Why not use JavaScript instead of Cshit?

Oh I see, good operator to know for when I learn python then

im new to elisp
can you talk more shit so i have more reason to forget about elisp?

gosh, guess the board!

Attached: firefox_2019-08-25_04-12-30.jpg (757x88, 18K)

thanks but no thanks

I'm doing stuff in Qt right now and I want to know: what the heck is a "mouse grabber"?

/ck/

i m using sbcl. how do I get the last command in the prompt like every other interpreter. it doesn't work in sbcl. "+" will just print the last command.

sure
try this:
(defun div (x)
(lexical-let ((x x))
(lambda (y)
(= (mod y x) 0))))

Jow Forums

Lisp looks confusing and difficult at first glance

Jow Forums
Also, go to bed user.

No, Jow Forums has ID's.

/sci/ ?

all wrong so far
and yes I'm about to go to bed, it's 4am

Attached: firefox_2019-08-25_04-18-03.jpg (507x87, 13K)

yikes, but i guess it solves the problem

/lit/