/dpt/ - Daily Programming Thread

What are you working on, Jow Forums?

Previous thread:

Attached: 1024px-Pharo_syntax_postcard.png (1024x727, 134K)

Other urls found in this thread:

youtube.com/watch?v=7yTIWFZrXpg
qrng.anu.edu.au/API/api-demo.php
godbolt.org/z/x41hmY
godbolt.org/z/Lei6-_
gcc.godbolt.org/z/ee5y9U
twitter.com/SFWRedditVideos

Make a chatbot.
youtube.com/watch?v=7yTIWFZrXpg

>What are you working on, Jow Forums?

Exploring the deepest, darkest corners of Racket. Just crafted a true random number generator. Actually, it's simply fetching numbers from the Australian National University's Quantum Number Generator through its RESTful API. But, thanks to the magic of abstraction, the user will never know that. hehehe... yeah.

You too, craft your own TRNG qrng.anu.edu.au/API/api-demo.php

Please use an anime image next time.

Attached: programmingliterate.webm (1400x842, 479K)

What the FUCK is that font? Absolute garbage holy fuck it's unreadable

>>>list2 = [[]] #list containing 1 empty list
>>>list2 *= 5
>>>list2[2].append(1) #put a 1 in the list in list2[2], and not in any of the others
>>>print(list2)
[[1], [1], [1], [1], [1]]

If I want to learn GUI programming on GNU/Linux, should I learn Qt or GTK?

Qt

it's the only font supported by my Creed 444 teleprinter.

Surely no one is this autistic, right?

Qt comes with very good documentation, tons of examples, and if you ever want to move to Windows or Apple, you can take your Qt projects and compile them there.

I want to graph input once per loop with matplotlib. I want one window that updates the data.

plt.ion()
plt.plot(x, y)
fig = plt.figure()
fig.canvas.draw()


The above generates two windows per loop. One of them is blank, while the other contains the data I want plotted. How can I update only one window with new data?

Why do people say ++x is faster than x++?

Doesn't it boil down to
inc dword [X]
mov eax, [X]
versus
mov eax, [X]
inc dword [X]

ops shit. making gitlab CI build docker images so I can cache layers of my build, then passing builds go into a registry and deploying via ECS.

t.oldtimer getting with the virtualization times

godbolt.org/z/x41hmY

I-I'm gonna start working on that project this time, I swear!

Attached: 1554235343379.jpg (385x503, 40K)

x++ returns x before it was incremented

He thinks that if he uses old looking DOS-era-like fonts like bisqwit, he will be as smart as him.

Attached: Girls.png (449x401, 490K)

Huh, guess you learn something every day

Still want more input on projects to do:
1. Learn OpenGL and make a basic 3D physics engine
2. Make a chatroom/forum with a twist
3. Build a real twitch drone (from rainbow six siege) that can be controlled via Bluetooth by a phone

A Chatbot for what?

Absolutely fucking not. I need as much performance as possible in handling lots of physics interactions/state

What is the most archeo-futurist programming language?

Attached: 1559819160438.png (1200x758, 680K)

This isn’/dpt/ related by holy fuck. What the fuck happened? I’ve been gone for a year and now Jow Forums has literal Jow Forums threads just because of a shitty choice of a picture. It’s been up for a day and the mods STILL haven’t deleted it. Is this what you niggers have been dealing with for that long?

Hi, welcome to reddit! If this is your first time posting here you might want to read our Code of Conduct

Mods will delete Pepe, but not anime girls, no matter how shitty the post is.

what are you going on about?

godbolt.org/z/Lei6-_

Starting work on a simple painting app for my OS :)

Glow in the dark overdosed on blue pill

how do you have time to work on your OS? you don't have a job?

Attached: no_one_asked_you_bro.webm (400x226, 690K)

This is he thread in question

how far on the spectrum do you have to be to make an image like that?

most of Jow Forums is garbage, people are either in the generals or left. /dpt/ isn't the place to complain about this shit either.

Sure, I work a programming job 8 hours a day. I'm not gonna lie and pretend I don't get tired, but my OS isn't gonna write itself so I just deal with it.

Attached: terryneon.jpg (480x360, 35K)

is your work related to OS dev?

Futurism is post-autism, it says it right there.

Oh sorry then. I’ll just make this short and sweet and not shit up the thread any further: I haven’t actually gotten to writing any code for my Latin to English dictionary/translator yet, but I managed to extract the whole (or the most important parts) of the Latin language from a weird raw data file from 2001. So things are going smooth. Now I have to think a bit more before I make any more updates. I’m trying to see how to organize the Latin word struct or class (along with the daughter struct/classes of the verbs and the nouns) and whether to use C or C++

Nah, I'm working on transparent gateways between different types of industrial networks. It's only my third week at a new company, so idk yet what to think. I'd love to do OS dev full time but it's not exactly a money maker :)

Attached: D76YEuXWkAAHzXs.jpg (900x1200, 131K)

why is pygame's documentation so fucken terrible

Attached: ae9.jpg (813x407, 213K)

Just use SDL itself instead of a python wrapper of it.

Oh, that's very interesting, user! Can you show me more of this JavaScript thing?

Attached: 5113acaf0f57b716864e2b8433670b10.jpg (1080x1079, 103K)

Here's where I am right now. Going for that classic Windows 3.1 PBRUSH.EXE look

Attached: Screenshot at 2019-06-10 21-07-58.png (1920x1080, 711K)

[] == ![];
true

> addOne = a => a+1;
[Function: addOne]
>
> addOne(8)
9
>

I can't my professor wants us to use either pygame or turtle. but my assignment mate went ahead of me and wrote the more elemental parts of the code, now I have to understand what she did and give the objects hitboxes. I'm pulling my hair off because the code isn't even bad but I have to reread the code entirely every time I'm checking a new variable. I know being able to read someone else's code is a skill I'll need to develop at some point but I'm really close to rewriting the code just so I can know what is going on

duxi: ~/src/serenity/Kernel $ make .

what about using wordnet? I think there are some latin databases available.

>she
This was your first mistake

Neat, user. Glad you got it working.

Attached: 1491881004368.jpg (500x587, 122K)

Neck yourself, degenerate.
Nobody likes you.

>now I have to understand what she did and give the objects hitboxes
Each object presumably has a rect and pygame natively supports collision detection of rects iirc.

i wish python had curly brackets

Very cute image! I like you user, even if I don't particularly like javascript. Please keep posting.

braces*

what is the difference

Still trying to pitch shift my music in Android

*parentheses

! casts its operand to boolean, [] is a non-null reference -> true
== works based on the Loose Equality rules, Operand A is an object, Operand B is a boolean -> ToPrimitive([]) == ToNumber(true)
ToPrimitive([]) -> [].toString() -> ""
ToNumber(true) -> 1
"" == 1 -> ToNumber("") === 1
ToNumber("") -> 0
0 === 1 -> false

And this is you are a retard if you are not using ===

Imagine taking javascript seriously.

Not liking cute things is degenerate. Fuck off degenerate.

Parens: ()
Braces: {}
Brackets: []

>Brackets: []
No, those are square brackets.

>use coercing operator
>"wtf why it coerces my values"
user, I think you might be retarded

The glorious default Ubuntu prompt, for people who just wanna get shit done.

Thanks user. I hope you get your things working too!

Attached: wild-cats-apple-mac-hd-comic-pet-very-happy-cat-467784.jpg (1920x1440, 447K)

Parens: ()
Curly parens: {}
Square parens: []

are you familiar with the notion of sane defaults user

>= is a coercive operator
You mean it doesn't sign consent forms?

Attached: AAAAAAAAAAAAA.png (276x337, 148K)

Innie: ()
Outie: {}
Vacuum cleaner: []

You are not only retarded but also an illiterate monkey who can't read the last line of

ok thakns

>No, those are square brackets.
They are square braces, dummy.

>2049
>not using the ================= operator

No

Ok but you're wrong.

No, you're wrong.

No you are. My dad works at nintendo. Also I revoke the right of reply.

I win.

I can't see what am I doing wrong here. It's not some uninitialized garbage.
Maybe I shouldn't reference pointers like this. I don't know.

Attached: Capture.png (849x548, 57K)

Parens: ()
Curly braces: {}
Square brackets: []

CLisp has 5 equality operators.

>Also I revoke the right of reply
Yeah? well I'm going to reply anyway. What are you going to do now? Arrest me?

What are non-curly braces then? Just call them curly parens.

I win.

did you notice the e-07?
that means *10^-7

Because they're naive and like to take old tricks from when compilers were really dumb (it's amazing we moved on from asm back then) and feel computer-wizardy about themselves.
gcc.godbolt.org/z/ee5y9U

You'll find that where you use x++ or ++x and get the same result it will almost certainly have been compiled to the same thing when using O1 or greater on modern compilers.

My advice is to ignore almost anyone who talks about micro-optimization which isn't in SIMD or directly in assembly because even people who should know better have no idea and they don't measure. There's certain broad advice like doing SSA form on your code which is valid. But that's for very obvious reasons.

There are only parens, curly braces, and square brackets. Nothing else exists.

Round brackets: ()
Curly brackets: {}
Square brackets: []

Attached: magisterium.jpg (600x443, 85K)

Jesus Christ, user.

Attached: oreilly_codingdrunk.jpg (600x716, 73K)

Absolutely degenerate.

Maybe. It's not like I know how floats are stored or anything.

Attached: tinking.png (451x619, 428K)

All must be brought in conformance with the will of the council.

Attached: heretics.jpg (624x471, 83K)

This is almost correct though.
(-0.70717008)*(-0.5) + (0.707106351)*(-0.5) = 0.0000318645 = 3.168e-05
Off by two orders of magnitude, but that's to be expected with floats.

No, it's [] == false, i.e. object == boolean

>Maybe
It's a really small number, close to zero.
It's what you should be expecting here.

Attached: file.png (214x74, 3K)

Yeah I realized I got the order wrong. It's not intuitive but it makes sense.

(-0.707107008)*(-0.5) + (0.707106531)*(-0.5) = 2.385000000271198e-07
makes even more sense if you copy the numbers correctly

I realized it the second you mentioned it but the problem is that I still have no idea where the bug is.

Attached: 590px-Float_example.svg[1].png (590x75, 7K)

You haven't shown us anything that could lead us to help you with that. The only thing that's wrong is what you drew in paint.
When you said maybe I thought you were uncertain about this situation in some way.
You asking about how floats are stored reinforces that idea a little.

Is this a good book to learn python?

Attached: lphw.png (646x850, 525K)

Fuck no.

what bug? if your matrix is supposed to only have values of the exact same magnitude you should check how it is populated.
if you just want exact zeros in temp, you could go through temp at the end and round everything to zero if it's small enough