/dpt/ - Daily Programming Thread

Old thread: Comfy arm warmers edition!
What are you working on, Sup Forums?

>2016
>using javaids

kill yourself

>2016
>he uses Java

first for C++

but op pic has nothing to do with programming

I'm doing reverse CNN.

Instead of taking an image and picking a category, I input a string and output an image, but the 1040 inputs seem to be an issue, Might try with just like 50 categories or something

>scalaids """dependent types"""
loooool

sometimes I wonder if my programming skills are lacking since I dont wear long stripey socks. one day i hope to wear them and see how much more efficiently I can code.

I hope you're at least wearing your skirt.

Still not working correctly, but I guess I am getting closer.
Not sure where the problem is though, gotta wire up some leds to help debugging shit

Reposting because i'm a retard who posted in a dead thread.

Alright, I did a shitpost detector that attributes a grade to each post in Python. I want to do a web extension for this, which would basically put a little icon next to the name of the poster depending on how shitposty the post is.
How would I go on to do that ?
Also you got bad grades user. I'm gonna have a little talk with your parents on how you discuss with people on this South Vietnamese rice farming forum.

In Java,
How would I correct the error in the image?
Also, how would I fill the hashset with the amount of objects using a loop?
And how would I also set each element of an arraylist to be assigned with another object?

Thanks.

Why is this line throwing a syntax error in Python?

y= y-(0.2*(y-(x**2)*(y**4)*y)/(x+(x**2)*(y**4)*x))

it sounds really doable, if you find the right online tutorial - seems a matter of minor reading on the topic

what's your algorithm for determning if a post is a shitpost - i'm guessing dubs, meme content, off topic etc?

Penny penny = (Penny) itr.next();
Gotta love Java verbosity :)

well, at least it does stuff.

it doesn't you retard

What is le goal user

It probably is, but I don't know tits about web dev. I'll take a look into it, just need some ideas on where to start.

The algorithm is pretty simple, it checks for length, amount of curse word, number of replies and if the replies says thanks. Then it add the grade of each of those attributes into one. I'll refine it once i'm done with the web implementation. I'll also set up a repo so you guys can check out my abhorrent coding skills.

Did it really work for you? I've tried in lots of ways in interactive mode and also from a file, it just doesn't work.

nice clock ahmed

Probably an indentation error and python is being passive aggressive. It works perfectly in my repl, python 2.7 or 3.5

>not using arduino

Oh it's you again

le goal is to get an hd44780 display workin with an attiny13, a 595 shift register and only 3 pins

>tfw havent written any real code in months because im studying for google and fb interviews

how do you study for an interview?

What would you study for those? kek
Just be you'reself m9

well google expects you to solve the millennium problem of inverting a binary tree so...

i am learning how to do computer programming in lua (love2d)

it will become a space-invaders game soon

pls inform me now if my computer code looks like pocket spaghetti to trained eyes

really?
Inverting a binary tree is the easiest fuckin shit on the whole fuckin planet. If you can't do that, then you should just kys

Your code looks really good user

Man, this is some cool ass shit, those are the first 2 images I've taught it to return for now

...

>implying they said exactly that

Those are the logos of apple and google btw

thx user-san

Are you removing bullets once they leave the screen and become irrelevant to game logic?

What IDE/Editor is that?

>company does some diversity hires
>woman joins our small dev department of 10 people
>it's a tranny
It's been a week and I haven't seen him do any real work, he won't talk to us, he disappears for most of the day after lunch and I don't think he even knows how to program.

that is the gnome text editor Gedit. It got a facelift in gnome version 3.18. It is very powerful and lightweight.

if v.y < -10 then
table.remove(player.bullets, i)
end

although i cannot get the external tools plugin to work correctly for some reason so i have a terminal in the bottom instead

>Its a matter of time before you get fired in favor of more trannies and diversities for those sweet government subsidies

is he cute?

computer programmers dont do any real work anyway user

There has to be a less shitty way.

> tranny
>cute

Alright, how mind blowingly hot is she then?

Working on my terminal emulator, started working on the Wayland port, this is going to be awful, Wayland a shit.

But alas, at least I'd get the meme Wayland users :^)

How long until you suck her big feminine cock, user?

Yesterday.

how do I implement inheritance in C?

I need to interact with a bunch of different types of structs but doing so through only one interface

>mind blowingly hot

>woman

>she
He said it's a dude, nigger.

Why you gotta judge?

>I don't think he even knows how to program.
user the reason you don't see him do any work is because he's really really fast.
Boys in women's clothing are like that.

She said it's a dude, dude

That logic is awful

That's not inheritance.

It should've printed some numbers, but I am ok with this, too :-)

If I put this line of code into my android app, how difficult it might be for someone to extract it?
String encoding = Base64Encoder.encode ("username:password");
If easy, how to get it done right?

One of us has to be sane.

Who's information is this? If it's the users own identification you're pretty safe from malware on the device (in the sense that it's not trivial to take it) since you're saving it in memory and you're not important enough.

If it's something you don't want the users to have then. That's bad.

Easy as shit, don't do that

Any recommendation for a C library which implements associative arrays/dictionaries/hashmaps?

Character LCDs are fun.

(basically need me to associate some char arrays with some numbers, nothing fancy)

You are just insecure that she is living without repressing herself

1. Write that on yourself
2. Use C++

I don't know because I don't waste time looking and just quickly write it myself.
A hashmap is like 10-20 lines of code maybe.

I liked this one more, but I fucked it up with connecting it to 5V instead of 3.3

How much was it?

Nothing.
It was an old siemens c60 display.

Okay anyone how the fuck do you not lose references to data in OOP. I just can't understand its like everything is referenced within a class and I can't access it outside of the class.

That's pretty cool.
I need to find broken shit to salvage parts from.

You can tell the programmer who has never worked on a real project by his insistence on reinventing the wheel.

Bad thing is, I am hired, and actually sometimes reinvent wheels.

>insistance
Well if you have it you have it. If you don't you don't.

You wouldn't inflict STD's on your code i hope.
I consider that abuse.

I would inflict say GLib which has pretty good implementations of many useful data structures including hash maps.

How do you handle hash collision in ten lines of code?

> project is starting to work
> a year ago I never would have thought I could have done it

I'm gonna make it bros

>how to get it done right?
I could write a whole book about this. Well not me, but someone else as I suck at security and rely on other libraries

The basic concept is
> generate a long unique string (20 characters is definitely enough)
> add it to the front of the password
> use sha512 or some other modern hashing function like sha3 on the string you just created
> store the output and the string you created
> repeat the process each time the user logs in

That being said, Google has plenty of libraries that let you use their authentication system. But if you still want to do it, make sure all of this is in the server side, but client side

Can somebody post the source code for that Rust terminal? I want to try it out, and I only hear about it on these threads.

Are you talking about cancer? You could probably find it by googling cancer terminal rust

notty?

For freetype, but I suppose it applies to libraries in general. Are you supposed to link debug builds of libraries in your own debug builds and link release builds of the lib in your own release builds, or just have one release build of the lib and link that wherever?

>How do you handle hash collision in ten lines of code?
Depends on how you want to deal with it.
>GLib
Well as far as libraries go it seems ok. It's not using std::pair as the C++ std library does. How a standard library can be that sloppy is beyond me. So I approve of this library.

But a major problem with practically any library is how you introduce all these new types to deal with. It clutters your brain space. When you write things yourself you get exactly what you want and it's very easy to extend if you need to.
You're not gonna do something very fancy wish a hashmap usually but in the general case you may want to have a smaller piece of code to work with.

If you don't it's not rare to end up in a situation where you don't exactly feel the exact implementation is all that appropriate and you work around it, rather than changing the library you've been using. Simply because you can't be 100% sure of how it works before you start reading everything. Just looking at Glibs hashmap there's a fairly large amount of functions I'd probably straight up delete if I decided I need to change something.

what is the project?

Hello World! in brainfuck

8080 emulator

also my 4th try on my 3rd language of OpenGL is working

you know, according to this thread he probably is a much better programmer than you.

can you put up the repo now I don't care what it looks like I just want to see how you're reading from Sup Forums. I'd rather try to reserve engineer than look it up.

C "programmers" everyone.

>women joins our small dev department of 10 people
>it's a tranny
>he even knows how to program
your already being judgmental of the person. maybe you should be reprimanded and made to attend a worker correction program to learn about diversity in teh workplace, trans inclusion, the transgression of sexual discrimination inteh work place.

user you need ot acceptthis person.

Sup Forums "arguments" everyone.

> implying he won't just kill himself

so tolerant senpai making the internet proud

Can you handle GUI without OOP?
If so, how?

what's better for shell oneliners? write as a script or as a function?

IMGUI