/dpt/ - Daily Programming Thread

N E N E edition
old: What are you working on, Jow Forums?

Attached: nene.png (900x506, 596K)

Other urls found in this thread:

jonahmann.x10host.com/bluerectangles.html
pastebin.com/WFs93gT8
youtu.be/c52QhiXsmyI?t=547
twitter.com/NSFWRedditGif

nene is shit

This

>segmentation fault before the printf even displays
Huh?

Attached: 2018-11-30 19_18_00-Untubuntu [Running] - Oracle VM VirtualBox.png (394x98, 7K)

std::delet this

Attached: New Game!! - 01 (1280x720 HEVC2 AAC).mkv_snapshot_15.51_[2018.07.10_08.37.03].png (1280x720, 1.84M)

you need to either print a newline or call fflush(stdout)

IEEE 754 was a mistake.

what kind of babby caliber is that?

It's an airsoft gun

I don't get to post this much.

Attached: 1430693406033.jpg (451x449, 52K)

What do you figure is the ratio of students/hobbyist/working developers in these threads?

Attached: 51ZAN08XYTL._SY445_.jpg (314x445, 35K)

How do I divide work between threads if I don't know how much work is going to need to be done until the thread has already started executing?

Attached: 1535212107554.gif (345x345, 186K)

> programmed hit indie game NENEQUEST using her own engine
> Fearlessly picked seeples as her first language
> Has a qt black gf
You wish you were her.

you could try divvying up tasks into smaller ones that are roughly equal in complexity, then put each of the jobs in a buffer and have threads just pull things from the buffer

Don't forget her side bitch Aoba.
>sepples
I swear it was C but maybe I'm remembering wrong.

build a scheduler using an algorithm like round robin or use a producer/consumer pattern.

Nah I figured it out, I'm just gonna let them all do the same work then divide their shared integer by the number of threads.

enjoy your race conditions and lock contention

literally in the OP you baka

it works perfectly

Attached: 1535720751423.png (532x603, 247K)

I am all three of those things.

>> Has a qt black gf
uwot

Literally hundreds of pictures of anime girls holding SICP and not one anime about actual programming.

Lisp is the most powerful programming language.

kobayashi-san chi no maid dragon

Attached: 1526598181159.jpg (640x640, 74K)

Asking again.
Anyone here know how to uncompress and work with zlib data from a png in C?

Attached: 1518740858466.jpg (800x600, 87K)

that's a screenshot from the actual show.
But yeah programming itself is just not a very exciting concept to shape a whole show around.
has even less than new game and
>pthon

Screenshots of code exist in a bunch of anime, doesn't count. Maybe if you had said battle programmer Shiraishi you'd have a better point.

You know on mailing lists how you get those enormous quotes and then some corresponding link as source?

>quote quote quote
>quote quote quote
>quote quote quote
>quote quote quote

>black gf
yuck

lrn2debugger

A student here. I barely post, just lurk. Most of the stuff here is extremely cringy

You don't like purple?

Where would I start with making a soundboard for discord on linux?

...

Learn Lisp.

libpng

Same, I actually enjoy /wdg/ and AGDG on /vg/ more because they actually seem to make stuff. I just enjoy seeing what people are working on but there's just so much stupid wankery in /dpt/.

Attached: 1510581710362.png (972x1440, 2.72M)

I know this is not really "software" but I have a few questions:

I make websites with HTML and CSS and they look kind of good with a flexbox yet sometimes is see people, boom bam 10 website 3 minutes.
And they even look cool, on the thought of minimalism, they are minimalising their time.

An I doing it right? I don't think I need NodeJs or other server-side scripting I just want a normal webpage made by me, possibly with links and an iframes to my blog. Is this the right way? I'm not sure...

go ask /wdg/ they'd make sure it has the right amount of bloat and recommend you a nice framework as well

wizardry is usually practiced, prepared, and perfected rather than pulled out of their ass in an ad-hoc, impromptu manner.

assembler is the dark souls of programming

i unironically want to make a game in pure ASM someday.

What is an appropriate amount to pay for technical manual editing? I'm going to hire a mathematician to look over a paper I'm writing because lord knows I know shit all about math. What's a good price to pay? pic related

Attached: pca.png (1779x773, 90K)

what does geography have to do with whatever it is you're doing?

10,000 rubies

Should any serious C/C++ program in Windows be compiled with microsoft's cl? Or is gcc or g++ fine

>windows
>serious program

Attached: 1532125130165.jpg (680x491, 41K)

Amazing what a short break can do
re.finditer("^>.+^

Is that a redacted version of an actual movie poster?

They are most likely using front-end frameworks like bootstrap and processors like sass or less. Bootstrap is pretty useful for drafting up clean and responsive front-ends quickly.

Yeah, it was the original draft that Mel submitted.

topkek

I made this music visualiser in p5.js.

jonahmann.x10host.com/bluerectangles.html

>it is useless, the user isn't authorized and it will fail
Yes. And my mother had to use ssh to access a device via serial just a few months ago and she's used to putty. So we got putty for Linux. Starting it without root privileges makes it so that when we try to connect through her USB to serial device it gives us a generic connection error. It would be extremely helpful to my mother if it had told her she wasn't root and this operation requires root privileges.

I have difficulty believing someone would be so stupid to consider an interface that informs you of your problem to be a problem. It doesn't even matter who it's obvious to. If the software can detect specifically what the error is then giving that specific error is better. A knowledgeable user didn't become less informed because of it. It tells you more information where previously very little was given. Programs that do what you suggest is the reason people are using su irresponsibly.
Yeah anyone with a brain would be so far ahead of you you're vanishing on the horizon.

Are we talking about using mingw to cross compile for windows on windows or just cross compiling for windows from normal gcc.
Because the former is a hassle. When it works it works.

MSVC is worse overall. Worse optimizations. Less features supported. Less standards compliant (in the past at least). The people who use it do so because they're making a game for Xbox or they're stuck with it for company culture reasons.

Also be careful. There's a lot of people right now being sponsored to encourage 'code portability' where that implies lowering yourself to build on all platforms. Usually the arguments for doing this (even when you're not releasing on windows or the like) is that you'll be more standards compliant and you have better warning coverage. Those are incredibly poor reasons.

Why aren't you earning over $100k?
You're above average, right?

I'm ok with frameworks... but I didn't mention I'm a system programmer usually... and I know there is that .NET website maker...

I know there are plenty of system resources. But I can't bare the use of an entire ecosystem of bloat, I've even seen packages as "Is odd" which have plenty of dependencies??? And I'm unsure if that is a joke.
I can make my website look as good as them, but it would just take more time, right?

I'm not confident in frameworks as I will not learn anything, just copy-pasting code I find on google(I think that's basically it).
And I really don't want to use NodeJs when I can use just Apache... (for at least what I'm making now)
I'll probably use NodeJs when I need to implement my App... but for now, I guess I'll stick to HTML CSS.
I'm still unsure, because seem a mindless:
Not learning anything, just knowing which line is to change your color palette and that's it..
I'll attach a pic to, let you know what I'm doing

Attached: 2018-12-01 05:08:24.jpg (1080x1620, 207K)

the state of programming

How do I leave the NEET lifestyle and start earning $100k+? Give me a step by step.

Attached: 1419669638912.png (256x256, 32K)

Interested too for reasons.

step 1) be a NEET (we are here)
step 2) ???
step 3) start earning $100k+

Attached: 1436466816362.png (760x720, 439K)

>enginedev
Doomed to fail

become a hedge fund manager

I only graduated last year.
I will probably finish my masters next year, after that I will have my MS and two years of data exp.

I should be able to break 100k before I turn 28.

Learn Haskell
Create GitHub account with Anime avatar
Post Haskell code
Drown in job offers $300k starting

>Learn Haskell
>Job
good one

you missed 2 important steps

Attached: 1543148201863.jpg (371x370, 80K)

I was legitimately asking how to stop being such a worthless waste of resources.

Attached: 1472860069099.png (600x979, 191K)

we're in the same boat tbhdesu

Attached: 1475195100325.jpg (600x456, 29K)

Learned flask over the past few days. Lots of fun. I always hated working with Django for some reason, but I dig the minimalism of flask, makes it easy to deploy quick and fun web apps.

Apply for jobs. Do what they tell you to do. If things go bad ask them what went wrong and what you can do better. Do those things. Repeat.
When you have a job you do your job and spend the rest of the time on learning what better (by your measure) departments do. If the job seems like a dead-end job you start putting in job applications for better jobs than you tried for last time.

I think I just want to kill myself honestly. I keep trying to do things but I'm just always tired and I really don't care or have any deep interest in things. I don't spend money or go places and don't want friends or a relationship. Even my hobbies have gone from enjoyment to a way to make time pass. Going to get help feels like I'd be losing and probably won't do anything anyway.

How do normal people find something to live for and work towards? All the things I accomplish make me feel the same as though I had done nothing at all.

Attached: 1422500682786.png (700x709, 188K)

this is called terminal depression. you should seek real professional help.

Fuck off and figure it out.

>How do normal people find something to live for and work towards? All the things I accomplish make me feel the same as though I had done nothing at all.
Most normal people don't have an inner monologue and don't reflect much. They're mostly driven by their hormones and primeval urges. They don't think about their inevitable death either.

Redpill me on Clojure.

Attached: notpy.png (1280x867, 1.96M)

>Going to get help feels like I'd be losing
losing what? are you playing a game?

>and probably won't do anything anyway.
you've got a feedback loop. this is what it takes for your sickness to live. seek help and try new things. i promise you it will work.

ultimately you need to find/create meaning. it isn't stupid or beneath you. its what humans do.

No.

Working on this . Please help with the finishing touches. Thanks.

The nenequest engine, while unambitious, is a complete work. /agdg/ has a lot to learn from her.

I am trying to write a simple program that loops through numbers in a file. The txt file has no spaces, just numbers and commas. Every-time I try to run the program I get an operand error message with the modulo line. It won't loop through the numbers to separate odds and evens, so the rest of the code doesn't get run. What am I doing wrong?

def main():
fileName = input("What is the path and file the numbers are in?: ")
infile = open(fileName,'r')
even = 0.0
odd = 0.0
odd_count = 0.0
line = infile.readline()
while line != " ":
for num in line.split(","):
num = eval(line)
if num % 2 == 0:
even = even + x
else:
odd = odd + x
odd_count = odd_count + 1
print("\nThe sum of the even numbers is", even, "\nthe average of the odd numbers is", odd/odd_count)

main()

Attached: 1509986352164.jpg (600x388, 65K)

Wrong!

I am not at all familiar with your language, but there is a bit that seems weird to me:
[spoiler]
for num in line.split(","):
num = eval(line)
[/spoiler]
Presumably num is set by line.split()? If not, then what is line after split has been aclled on it? What does eval do to line after split has been called on it?

My instincts say that num should not be changed within the for loop.

>for num in line.split(","):
> num = eval(line)

Traceback (most recent call last):
File "C:/Users/Kid Antrim/Desktop/CS/Project8-Chp8-Harvey.py", line 21, in
main()
File "C:/Users/Kid Antrim/Desktop/CS/Project8-Chp8-Harvey.py", line 14, in main
if num % 2 == 0:
TypeError: not all arguments converted during string formatting

still getting the same error even after moving num = eval(line) above the "while" line.

pastebin.com/WFs93gT8
Trying to fix this script.
The problem with this is the keyboard shortcut for resetting the speed back to 1 doesn't work
also, when i type in any text field on the page, it triggers the corresponding keybinds in this userscript. I want it to be disabled while typing.

Try int(num) instead of eval(num)?

bruh, the traceback tells you what the problem is.
num is a string. what does performing modulo on a string give you?

Then how do I convert the string to an integer? I thought that is what eval did

just curious, how old are you?
eval took line (a string) as an input, the output was a tuple of integers, of which was stored in the variable num.
so before your while loop, num was a tuple.
then you proceeded to assign num to the iterable on the output of line.split(','), which is a list of strings.
now num is a string.

The question is: why are you using eval() in the first place?

Whats the most pragmatic high-level programming language?

> num = eval(line)
for n in num:
if n % 2 == 0:
even = even + n
else:
odd = odd + n
odd_count = odd_count + 1
instead of the while loop but idk wtf is x supposed to be in your code

Can someone link to the latest "how to become software engineer at home" guide?

>Redpill me on Clojure.
You should watch the Clojure/Conj talks that have been posted since yesterday.
The REBL talk is spaceship technology
youtu.be/c52QhiXsmyI?t=547
(skip to 9:07 if that link doesn't)

python

Clojure is really good. Uncle Rick is a little crazy but that's okay.

Planning to learn unity over the summer. It requires a fair bit of C# though and I’m good at C. Will it be easy for me to pick up the basics?

FP is simply DRY taken seriously. If you're not doing FP then you are literally writing the same code over and over again.

No types? No time for it.