/dpt/ - Daily Programming Thread

What are you working on, Sup Forums?

Old thread:

Thanks for not using an anime picture.

You wish.

Refactoring my javascript program to be maintainable

I hope it's browser-only program.

Trying to set light in my OpenGL future game.

It runs on Electron, so no (node.js)

Is it okay to leave a variable initialised?
int abc;

if(condition)
abc = 15;
else
//finish the rest of the program


And is this a better practice?

int abc=9999;

if(condition)
abc = 15;
else
//finish the rest of the program

fag

>if(condition)
abc = 15;
I meant
if(condition)
abc =abc*0+ 15;

It doesn't make difference, if you set value in the ELSE block.

Why?

I've seen it both ways.

I don't set the value in the else block, it's a throwaway variable for performing a certain loop.

>why
you can't re-set a variable within the same scope afaik. (C)

you can though
?????

That is an anime, you fucking moron.

Sage this fucking cancer.

>you can't re-set a variable within the same scope afaik.
Who did ever say that to you?

is there anyone developing C++ on windows machine? how good it is? last time I tried (3 years ago) I struggled very hard to install some libraries. how is developing in general?

...

>lisp is anime

butthurt weaboo subhuman detected

go back to

No one, I found it out myself. I'm pretty new to this, teach me how to

Not him, but I bet it was some Haskell fag.

...

Once you give abc a type, you don't need to say it again. Take off the second 'int'

That's a literal screenshot from a chinese animated cartoon, idiot. Reverse image search it, fag.

Stop trolling people with this shit, it's not funny anymore.

That's a shot from Serial Experiments Lain, bro.

To set a value, you just write abc = 19;
In int abc = 19; you try to re-declare already declared variable.

works on my machine :^)

Ah got it, thanks.

But is it still a good practice to leave a variable uninitialised?

C++ is shit.

Daily reminder that C stands for cancer.

putting stuff into PATH is fun
pretty bad without auto-updates
MSYS2 and MinGW probably be okay

>le edgy
>le returning from le reddit once again

my teacher wants us to choose a project in html/css and a few php
can someone give me ideas?
i have no idea at all

>Developing in windows

i personally leave them uninitialized unless i need them right away.

It's good practice to only have the variable exist in the smallest possible scope where it can be used. This is one of the reasons for breaking your code up into smaller functions instead of making everything a global and jumping around with GOTO.

a webpage to phish passwords

>trolling
I don't know who can be _trolled_ by anime pictures.
Have a (You).

that's nice, are you using some special libraries? I'm developing a physics engine, but the final user want it done for windows for their tools, but still wanting linux compatibility for future proof.

Make an imageboard.

let's not pretend to make c++ something it's not, shall we?

Nagato only pls

dank? dunk? bud?

>shall we
who are you of relevant?

Name one widespread OO language to make native applications.

>haha it's your fault for getting trolled by unrelated shit
Fine, I'm gonna start flooding this fucking board with pictures of Brazilian soccer players then.

Object Pascal.

Why do you evade your ban?

There certainly aren't any good ones, that's for sure. :^)

>widespread

>only one guy likes pascal

It is though. It runs on all platforms and is a lot more popular than a lot of meme languages Sup Forums keeps memeing.

and you aren't doing one, so fuck off

Ada, you can even shit it up with your trash c++ code if you don't want to rewrite it

>being this mad because his favorite language is shit
You'll come around eventually.

my favorite language is scheme, C++ does the job, and you are faggot (and a worthless one btw)

>not using CL
>not using a Lisp-2
Wow! Scheme is pretty useless. Just when I thought you couldn't sink any lower.

>lisp-2
Ew groce.

How long does it take to compute a square root compared to multiplication or division on a floating point number

>and is a lot more popular
Indeed, lol.

>Scheme is pretty useless
show us those great projects you have done with CL then, fartfag

Enjoy your worthless macro system. :^)

Lisp-2s are bloated, complex, old garbage where as LISP-1 are simple, small, and get the job done in less time.
We even have ported CLOS and have better object systems

By "a lot of meme languages", I was referring to crap like Go, Rust, Haskell and a lot of shit Sup Forums's always memeing. Also, according to your own source, it is growing.

Verifying XAdES-BES

>Haskell
We are talking about OO languages now.

Thoughts on CakePhP?

Why are you guys always angry and triggered?

Sexual frustration.

Rust isn't OO either, you fucking moron.

I can't get a developer job with my skills on haskell, but my friend got that job doing java, that's why I hate those mainstream languages so much

Are you literally shaking yet? There are many useful projects developed in CL. Hell, CL flew aboard NASA projects. Just accept your shitty Scheme will always be a toy language.

The difference is, I don't care about Rust.

is it autistic to code just for "fun" like im neet ill never make the big bucks programming but i do enjoy it whenever something actually fucking works that i code.

it is indeed, so I'm using C++ for doing real task, not repeating again degree homework every day

You can do OO in any language, it's a programming language-independent architectural design pattern. Of couse, some languages implement syntactic sugar and features that facilitate the process. We say those follow the "OOP" paradigm because they encourage you to follow an object-oriented architecture, but you can code in a non-object-oriented manner in those languages too.

Get a scala job

Just learn the cats library and you're good to go with haskell on top to show you know what you're doing

I don't care about what you care.

Fuck you, you false flagging nigger. I already tracked your IP and I'm gonna kill you and your family tonight.

Does anyone know how to create a diamond using strokepolygon in javafx? lienzo.strokePolygon(new double[]{60, 90, 60, 90},
new double[]{210, 210, 240, 240}, 4);

nope, it's like drawing for fun

scala is too mainstream for me, I would prefer a job in some lisp dialect, but not clojure, because jvm is shit

yeah it's autistic

but that's a healthy hobby

>a million broken CLOS reimplementations with missing features
>better
Yeah, sure buddy. Keep telling yourself that. :^)

I don't care about what you don't care.

fuck java
fuck java
fuck java
fuck java
fuck java
fuck java
>fuck java
fuck java
>fuck java
fuck java
>fuck java
fuck java

Haskell doesn't need OOP as it's like scheme where you can easily make objects as functions. Heck just throw together the State monad and a few local functions and you have your OOP

i approve of this post

still waiting for your great projects faggot

So looks like we finally agree about something.

Scala is haskell if you use the cats (category) library
Also stop being an autistic fuck and bite the bullet for once, you can interface with scala from haskell if you really want to but first you need the job right?

Also... good luck getting a lisp job that's not clojure since there are almost none advertised externally.

Yes.
Haskell is great.

Is there any way to call a function on every instance of a class in python?

instead of doing like:

a = thing()
b = thing()
c = thing()

a.do(2)
b.do(2)
c.do(2)

Finally got RSA keys to import and export in BasicTV. Now i'm starting work on a telnet based console to control basic functions and variables.

After that, Opus compression, and some finalizing with networking, it'll be ready for a testnet release.

if I wanted to bite the bullet I would be doing java or C
I want to raise my protest here on Sup Forums and
say the world that even if we are a
minority, we hate C++ so much

No.

You should try out the game
SHENZHEN IO.
It is a fun game where you solve really simple puzzles using a made up asm language.
Then when people ask you what you are doing, just say you are playing a game.

It sure is, it's still a meme language though.

wtf is "Rust" is it a meme language?

Scala is awful, don't learn it

too late, I already know it, if not it would be a blind hate