/dpt/ - Daily Programming Thread

What are you working on, Sup Forums?

Previous thread:

Other urls found in this thread:

businessinsider.com/startups-that-raised-148-billion-have-shut-down-or-may-soon-2017-7?IR=T
en.wikipedia.org/wiki/Homelessness_in_San_Francisco
youtube.com/watch?v=rWDNwN0h0LM
youtube.com/watch?v=rkcXRBhYZHU
youtube.com/watch?v=MZIv6WtSF9I
youtube.com/watch?v=qFl-Q21MzmQ
youtube.com/watch?v=1CpjRMICXNM
youtube.com/watch?v=IIAWs3_Hgtc
youtube.com/watch?v=GXSCx50LlNo
github.com/testanontest/cxz.github.io
twitter.com/AnonBabble

How's this programming related fag

First for Fortran

how to programming, I have this
let screenshotPos = takescreenshot (30,300)
let mousePos = getMousePos

let rec jumba sPos mPos diff =
match diff with
| x when x >= 30 -> jumba screenshotPos mousePos (screenshotPos - mousePos)
| _ -> 0

jumba screenshotPos mousePos (screenshotPos - mousePos)

when running it seems like the screenshotPos and mousePos expression is only evaluate once, anyway to have it always evaluate when calling it inside the recursive function?

>mathematics is not programming related
Literally KYS!

god that language is so fucking nasty, what is it, haskell?

>not anime
trash

What esoteric programming language is this?

looks like F#

Someone is mad because his/her country didn't do well in this year's IMO...

just checked
you're using screenshotPos and mousePos inside the function body
but those are the outer variables, not the bound variables/the parameters - those are sPos and mPos

dunno if F# compiler has it, but GHC (Haskell compiler) has an error message for unused bound variables that would have reported this

businessinsider.com/startups-that-raised-148-billion-have-shut-down-or-may-soon-2017-7?IR=T

en.wikipedia.org/wiki/Homelessness_in_San_Francisco
>Reasons cited for homelessness in the 2015 survey commissioned by the City include job loss (25%),

javascript code artisans BTFO

programming is applied math

Is web dev finally dying?
Thank fuck

Right click menus with formatted entries

>a san Francisco take out only restaurant
>110 million
People actually evaluated those companies that much. What the fuck is wrong with people?

In what world is a fucking online order takeout only restaurant 110 million dollars? A realistic estimate would put your average farm to be more valuable.

Coming along nicely. Neat. Are you designing the GUI yourself or using a library?

What are you using to render? A simple 2d library or are you doing opengl?

Just SFML. I do wish I was using a library to handle some of this stuff for me, but I'm pretty sure that I'd have to seriously work around any standard GUI library. I'm hoping I can get the UI stuff out of the way soon and begin working on real mechanics

It's computer science related. Many programmers use computer science consciously or unconsciously.
I'm not sure we can just consider tangentially related topics appropriate for dpt. Why not have computer setups be related to programming then? It's something virtually all programmers have and use.

Not exactly. This has been going on forever.
That news bring it up is a good step though.
Could easily hit that if it's in a good location.

what's a good ide for developing java? i need employment and i don't care if i have to compete with pajeets

>programmable keyboard

How to motivate self? I feel like going out and digging in the garden instead of doing programming right now. But I want to get somewhere with my projects.
It feels like gardening is my procrastination tool now but a month or two back it was the opposite.

emacs

eclipse

especially the later versions are freaking good and they're good for other languages like C++ as well. it's the most popular IDE for java. someone is bound to shill intellij but it's not free and open source like eclipse

Why are guns so cool? I don't want to fire them even (seems noisy and I don't generally appreciate shocking my wrist) I just want to own them, fiddle with them and look at them.

Renting guns won't happen but I really wanna rent a gun.

I'll shill IntelliJ, anything not Eclipse

Don't break the chain

>eclipse
is it still a resource hog

Because anime is soooo dpt appropriate.

just sit down close all your open windows and make yourself do 15 minutes worth of work
it takes a person an average of ~15 minutes to get "into the zone", or what scientists call "flow". after you enter that state, hours fly by and you'll have made a shit ton of progress

doing this is literally the only way I get anything done lol

it's not super lightweight but it's not as much of a hog as before. if your pc has 4+ gb ram you should be good to go with eclipse and google chrome and other things running

>Why are guns so cool?
we've spent the last 400-700 years bringing them to their absolute logical conclusion
there is an extremely respectable amount of thought that's gone into them
I really wonder what programming will be like in 400 years
will future programmers look back at us as we look back at musketeers?

...

I think it's how they're designed around practicality to a very fine detail and they're rugged. High end power tools are also very cool. Toughbooks are also cool.

What's the equivalent in programming? Is there any? Programming has always been a very effeminate craft to me. Not rugged, more focused on elegance.

...

Just buy a cheap gun like a Mosin Nagant.

...

C++

>C++
youtube.com/watch?v=rWDNwN0h0LM

>python
youtube.com/watch?v=rkcXRBhYZHU


>C++
youtube.com/watch?v=MZIv6WtSF9I

>python
youtube.com/watch?v=qFl-Q21MzmQ


>C++
youtube.com/watch?v=1CpjRMICXNM

>python
youtube.com/watch?v=IIAWs3_Hgtc

If you want rugged, look into code designed to never fail, like airplane code. It will probably be written in Ada.

He wont appreciate that

Buy a ruger 10/22, and a 10/22 ar-15 stock
very cool, easy to shoot, and cheap as fuck

...

>>/out/

Hey, what is your opinion on Go you fucking retard?

writing a cuckold simulator in java

...

Do you own a gun Ruby?

>C
youtube.com/watch?v=GXSCx50LlNo

Go does not serve a useful purpose compared to other languages, but I guess some people enjoy it.

...

why bother? writing in java already is one

Can you show me your programming set up? Like, show me your work flow.

No :(

I live with my mother right now, and she can't stand guns. I'm going to be moving on campus for my PhD, and they don't allow guns there either.

When I finally have a house onto my own, I'll be getting a few guns. I want an MKA-1919, which is a Turkish made semi-auto shotgun. You could say it is to the AR-15 as the Saiga 12 is to the AK-47.

You can definitely rent guns at ranges for shooting. Gun stores let you handle unloaded firearms and examine them, even going so far as to allow you to function check them.

>I live with my mother right now
How does your mother stand that you are a NEET? Did your father leave for cigarettes and never come back? Mine did. ╥﹏╥

will they sell a gun to someone who may or may not be on an nsa watchlist if you promise the only person you'll use it to kill is you

>will they sell a gun to someone who may or may not be on an nsa watchlist
yes

Is there a word for basically being a NEET but technically not because NEET means not in EDUCATION employment or training but you are in fact in education? But like you are way NEETier than a normal person describable as "in education" would be. Like Ruby

>Why are guns so cool?

Because they just are. People who pretend they aren't cool are just Europeans jealous they cannot own them.

>the same people who are so crazy about freedom they think every american citizen should own a gun also strongly frown (to put it lightly) upon the practice of building your own homegrown nukes
please explain this

neck-beard/basement-dweller

If you don't say any of that probably yes

lol

>tfw you will never be free
>tfw you will never own a gun
>tfw you will never be american
Every time I think about not being able to be free, to own a gun, to be the greatest nation on the planet, land of the free, home of the brave, I cry, I cry until I fall asleep.

Very good post.

muh world police
it's gay as fuck.
fuck the CIA
fuck fucking with the world

idgaf if some random country is commie or socialist or anarchist or fascist
it doesn't fucking affect me
it's all a waste of resources and all it accomplishes is pissing people off

isolationism when

>basement
but what if your house only has one floor
in fact for the sake of argument suppose you still live with your mom who still lives with her dad who still lives with his wife all in one tight little bundle of failure packed into a tiny disgusting house full of hoarder garbage

It's odd. I think it's mainly about the concern of risks. Similar to how people don't mind other people flying personal planes but they don't want other people to fly a Boeing without qualifications. Even if they're not a passenger.

I'm opposed to letting humans drive cars outside of extreme circumstances. So I can relate.

How do you see people who used to use punch cards?

pretty sure that's just called being poor
which is kind of like being a neckbearded basement dweller, except it somehow manages to be even more despicable

>but what if your house only has one floor
still applies
the basement is metaphorical
it means you live in such a dreary and disgusting conditions it becomes impossible to believe such a place can be above ground
you are become mole people

like spear chuckers
not even on the same level of technology

My workflow? Umm...

Sublime Text and GNOME Terminal are open at all times, regardless of whether I'm programming or not. Typically I use either Ruby or C (or C++) for most tasks, unless I feel like tinkering around with some other language. Any C or C++ program that consists of more than one file will typically be built with CMake or Make, same if I am forced to use Java for some reason. I keep Firefox open with documentation for whatever I'm working on under a single tab tree. Can't really say much more beyond that. I like to test things out in a Ruby REPL to see if they make logical sense if I'm implementing some really weird algorithm, and sometimes I'll bust out a pencil and paper if I need to reason about it spacially (e.g. stuff involving graphs and arrays, particularly if I'm trying to avoid off by one errors on array indices).

I also have an extension in Sublime that allows me to evaluate Ruby code and place the output into the editor. I will sometimes use it if I want to generate a fuckload of code, typically C. Really, who needs templates when you can use Ruby as your preprocessor?

>NEET
I am on summer break, in between a Master's Degree and a PhD. That's not... really a NEET. Not any more than someone who is seasonally unemployed.

I still see my father on a regular basis.

I'm new to github pages.

I made this repo:
github.com/testanontest/cxz.github.io

And this doesn't work.
cxz.github.io

help?

>I'm opposed to letting humans drive cars outside of extreme circumstances. So I can relate.
why does no one else understand this
cars should never have even been invented and although it would be bad if they were to start disappearing one by one (because it would create a global power dynamic which would lead to mass genocide) we should make it our business as a species to find a way to destroy them all simultaneously with high precision
i feel similarly about guns
and all weapons actually
those cart things that horses tug around are okay though

>all weapons actually
Would you prefer we go back to eating bone marrow of animals that we didn't even get to kill ourselves?

that presumes all modern technology which war and hunting has enabled would cease to exist along with the instruments of war and hunting themselves
that is not what i am proposing at all and would easily be even worse than allowing weapons to continue existing as a concept, which is already pretty bad

what sort of commie are you exactly?
the young and naive brand,
or the old and over trusting?

GIVE ME SCREENSHOTS OR WEBM PLEASE

>you can shoot a guy with a gun
>crazy people typically have bad coordination
>unless he goes to a university or a gay bar, he's going to kill 10 people max
>a nuke would destroy everything
>a nuke's uses for non-crazies are only for imperialism
I wonder why the US would be opposed to nuclear proliferation.

>I'm opposed to letting humans drive cars outside of extreme circumstances.
I am not looking forward to the self driving car future. I am not going to be willing to give up my driver's license for """social good""" Fuck you.

I fucking hate technological regressives. Quickly fuck off to the woods and spend your days making nail bombs so you lose your right to vote please. The rest of us have a distant red ball to impregnate.

if i were either of those things i think i would be dumb enough to believe humanity can be trusted with instruments of war

u ok lad?

Define what you mean by "NEETier"

That you're some lazy shit that sits around watching anime all day instead of going to lecture/doing your homework?

If that's the definition, "degenerate filth" comes to mind.

nah, commies are the sort that weapons of war and exploitation of capital are what lead to rage and greed, instead of the other way around

>That you're some lazy shit that sits around watching anime all day
yes
>instead of going to lecture/doing your homework?
no
more like instead of having friends
i could have had good grades, free time, and friends, but i chose to keep the good grades and trade my friends in for more free time

You can't hunt without a weapon, user. Even ignoring guns, these aren't the only "weapons" we've used to hunt. Spears, bows, crossbows, slings... these all count as weapons, and would have to go away.

>trade my friends in for more free time
nibba that's called being a 4chaner

I maybe talk to 1 person on the average day
and that's if it's an odd day

Screenshots of what, my editor? The extension I just described?

R-Ruby sensei, w-will you b-be my ..... w-will you be my f-friend ... ?
...
・゚。(///>﹏

"Antisocial Weeb" seems to be fitting, then.

Nobody wants to be your friend.
You're ugly.

ok well no
i'm aware that it's the other way around
and for the record it's my sincere belief that for this reason rage and greed should be bred out of the human genome if that could be done
it probably can't
we're probably doomed to be miserable and pathetic petty criminals up to the day we go extinct
least we can do is take measures to minimize our possible capacity to exercise these tendencies
you know what else will probably never happen? the swift, fair, and roughly simultaneous destruction of all possible instruments of death or harm
but if it could happen i would will it in the name of the above specified inherent good

Just everything. Like, a picture of you pretending to program with all your windows visible, like a Ruby program or something.

>w-will you be my k-kirito?

you had one job

Helping refactor some of my friend's Rust code.
Before:
pub fn get_system_runtimes() -> Result

That depends, can you speak normally, or do you need to t-talk l-like t-this every other word?

After:
pub fn get_system_runtimes() -> Result {

fn readdir_file_names(rd: fs::ReadDir) -> impl Iterator {
rd.flat_map(|maybe_dir_ent| maybe_dir_ent.into_iter())
.flat_map(|dir_ent| {
dir_ent.file_name()
.into_string()
.into_iter()
})
}

fn find_pythons(path: PathBuf) -> impl Iterator {
let files = fs::read_dir(&path)
.into_iter()
.flat_map(readdir_file_names);

files.filter_map(move |name| {
if name.starts_with("python") {
Some(Runtime { name, path: path.clone() })
} else {
None
}
})
}

match env::var("PATH") {
Ok(ev_path) => Ok(
ev_path
.split(":")
.flat_map(|dir| find_pythons(dir.into()))
.collect()
),

Err(_) => Err("path not set")
}
}

What do you think, Sup Forums?

>You can't hunt without a weapon, user
Dig a hole. Cover it up with branches. Chase animal over it. Wait.

Do you consider rocks weapons too?

The way humans used to hunt (and some still do) is that they'd chase animals until they got tired (humans have the best endurance out of any land creature), and then stone the exhausted animal. I guess depending on the animal you could strangle it if you're going to exclude stones and coconuts.

M-Maybe ... M-Maybe if I g-get to know y-you better .... I-I won't b-be so shy .....

If you could date the cutest person in the world but they stuttered as bad as Porky Pig, would you still date them?

>You can't hunt without a weapon, user.
maybe not before we had all this sweet gear and loot
but these days man we got that shit in the bag
it's like shit wants everything to do with that bag
but even assuming we didn't
vegetarianism is a viable lifestyle which in an ideal world is not for everyone but then again in an ideal world there's no violence as well so it's really a matter of compromise