[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

/dpt/ - Daily Programming Thread

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 319
Thread images: 21

File: Screenshot_20170722_204350.png (160KB, 1202x1054px) Image search: [Google]
Screenshot_20170722_204350.png
160KB, 1202x1054px
What are you working on, /g/?

Previous thread: >>61509923
>>
>>61516462
How's this programming related fag
>>
File: old_hag_langs.png (173KB, 600x355px) Image search: [Google]
old_hag_langs.png
173KB, 600x355px
>>61516462
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?
>>
File: KYS.png (379KB, 582x480px) Image search: [Google]
KYS.png
379KB, 582x480px
>>61516468
>mathematics is not programming related
Literally KYS!
>>
>>61516478
god that language is so fucking nasty, what is it, haskell?
>>
>>61516462
>not anime
trash
>>
>>61516478
What esoteric programming language is this?
>>
>>61516495
>>61516533
looks like F#
>>
>>61516468
Someone is mad because his/her country didn't do well in this year's IMO...
>>
>>61516478
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
>>
http://www.businessinsider.com/startups-that-raised-148-billion-have-shut-down-or-may-soon-2017-7?IR=T

https://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
>>
>>61516468
programming is applied math
>>
>>61516578
Is web dev finally dying?
Thank fuck
>>
Right click menus with formatted entries
>>
>>61516578
>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.
>>
>>61516736
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?
>>
>>61516786
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
>>
>>61516485
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.
>>
>>61516646
Not exactly. This has been going on forever.
That news bring it up is a good step though.
>>61516773
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
>>
File: 1500750470416.jpg (489KB, 1800x1200px) Image search: [Google]
1500750470416.jpg
489KB, 1800x1200px
>>61516842
>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.
>>
>>61516869
emacs
>>
>>61516869
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
>>
>>61516872
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.
>>
>>61516869
I'll shill IntelliJ, anything not Eclipse

>>61516884
Don't break the chain
>>
>>61516895
>eclipse
is it still a resource hog
>>
>>61516842
Because anime is soooo dpt appropriate.
>>
>>61516884
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
>>
>>61516917
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
>>
>>61516902
>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?
>>
>>61516902
>>61516959

>>>/k/
>>
File: Bosch 2.jpg (361KB, 782x383px) Image search: [Google]
Bosch 2.jpg
361KB, 782x383px
>>61516902
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.
>>
>>61517040
>>>/lgbt/
>>
>>61516902

Just buy a cheap gun like a Mosin Nagant.
>>
>>61517047
>>>/pol/
>>
>>61517044
C++

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

>python
https://www.youtube.com/watch?v=rkcXRBhYZHU


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

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


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

>python
https://www.youtube.com/watch?v=IIAWs3_Hgtc
>>
>>61517044

If you want rugged, look into code designed to never fail, like airplane code. It will probably be written in Ada.
>>
>>61517052
He wont appreciate that

>>61516902
Buy a ruger 10/22, and a 10/22 ar-15 stock
very cool, easy to shoot, and cheap as fuck
>>
>>61517040
>>61517047
>>61517069
>>>/s4s/
>>
>>61517069
>>/out/
>>
>>61517082
Hey, what is your opinion on Go you fucking retard?
>>
writing a cuckold simulator in java
>>
>>61517089
>>61517099
>>>/b/
>>
>>61517082
Do you own a gun Ruby?
>>
>>61517080
>C
https://www.youtube.com/watch?v=GXSCx50LlNo
>>
>>61517102

Go does not serve a useful purpose compared to other languages, but I guess some people enjoy it.
>>
>>61517099
>>61517105
>>>/mlp/
>>
>>61517104
why bother? writing in java already is one
>>
>>61517121
Can you show me your programming set up? Like, show me your work flow.
>>
>>61517114

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.
>>
>>61516902
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.
>>
>>61517145
>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. ╥﹏╥
>>
>>61517147
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
>>
>>61517176
>will they sell a gun to someone who may or may not be on an nsa watchlist
yes
>>
>>61517168
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
>>
>>61516902
>Why are guns so cool?

Because they just are. People who pretend they aren't cool are just Europeans jealous they cannot own them.
>>
>>61517193
>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
>>
>>61517189
neck-beard/basement-dweller
>>
>>61517176
If you don't say any of that probably yes
>>
>>61516934
lol
>>
File: wojak_pepe.jpg (138KB, 750x750px) Image search: [Google]
wojak_pepe.jpg
138KB, 750x750px
>>61517193
>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.
>>
File: chen_roomba.webm (534KB, 1000x700px) Image search: [Google]
chen_roomba.webm
534KB, 1000x700px
>>61517080
Very good post.
>>
>>61517214
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
>>
>>61517220
>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
>>
>>61517214
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.
>>
>>61516959
How do you see people who used to use punch cards?
>>
>>61517261
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
>>
>>61517261
>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
>>
>>61517269
like spear chuckers
not even on the same level of technology
>>
>>61517144

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?

>>61517168

>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.
>>
File: 129.jpg (83KB, 712x950px) Image search: [Google]
129.jpg
83KB, 712x950px
I'm new to github pages.

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

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

help?
>>
>>61517267
>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
>>
>>61517314

>all weapons actually
Would you prefer we go back to eating bone marrow of animals that we didn't even get to kill ourselves?
>>
>>61517345
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
>>
>>61517314
what sort of commie are you exactly?
the young and naive brand,
or the old and over trusting?
>>
>>61517298
GIVE ME SCREENSHOTS OR WEBM PLEASE
>>
>>61517214
>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.

>>61517267
>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.

>>61517314
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.
>>
>>61517372
if i were either of those things i think i would be dumb enough to believe humanity can be trusted with instruments of war
>>
>>61517384
u ok lad?
>>
>>61517189
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.
>>
>>61517390
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
>>
>>61517400
>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
>>
>>61517370

You can't hunt without a weapon, Anon. 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.
>>
>>61517421
>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
>>
>>61517384

Screenshots of what, my editor? The extension I just described?
>>
File: embarassed.jpg (46KB, 379x417px) Image search: [Google]
embarassed.jpg
46KB, 379x417px
>>61517438
R-Ruby sensei, w-will you b-be my ..... w-will you be my f-friend ... ?
...
・゚。(///>﹏<///)。・゚・
>>
>>61517421
"Antisocial Weeb" seems to be fitting, then.
>>
>>61517456
Nobody wants to be your friend.
You're ugly.
>>
>>61517411
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
>>
>>61517447
Just everything. Like, a picture of you pretending to program with all your windows visible, like a Ruby program or something.
>>
>>61517456
>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<Vec<Runtime>, &'static str> {
match env::var("PATH") {
Ok(ev_path) => {
let dirs = ev_path.split(":");
let mut rts = Vec::new();
for d in dirs {
let dp = PathBuf::from(Path::new(d));
match fs::read_dir(dp.clone()) {
Ok(rd) => for e in rd {
match e {
Ok(ee) => match ee.file_name().into_string() {
Ok(name) => if name.starts_with("python") {
rts.push(Runtime { name: name, path: dp.clone() });
},
Err(_) => {}
},
Err(_) => {}
}
},
Err(_) => {}
}
}
Ok(rts)
},
Err(_) => Err("path not set")
}
}



(cont.)
>>
>>61517456

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

After:
pub fn get_system_runtimes() -> Result<Vec<Runtime>, &static str> {

fn readdir_file_names(rd: fs::ReadDir) -> impl Iterator<Item=String> {
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<Item=Runtime> {
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, /g/?
>>
>>61517438
>You can't hunt without a weapon, Anon
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.
>>
>>61517489
If you could date the cutest person in the world but they stuttered as bad as Porky Pig, would you still date them?
>>
>>61517438
>You can't hunt without a weapon, Anon.
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
>>
>>61517487
i hope you used the either monad to rewrite this
>>
>>61517487
>>61517498
>posting the eyecancer that is Rust

Away, away!
>>
>>61517509
not him but why would one use a hypothetical "either monad"
what is its conceivable use
you could literally just
|
>>
>>61517312
>>61517312
>>61517312
>>61517312
>>61517312

please help
>>
>>61517487
>>61517498
Rust was a mistake.
>>
>>61517524
>https://github.com/testanontest/cxz.github.io
Don't github pages have to be named either your username (.github.io) or the name of the organization you made the repository in?
>>
>>61517524
Just because you post, you aren't entitled to an answer.
>>
>>61517314
>we should work on making it our priority to destroy them all simultaneously
This is why captcha has you target cars. We need ai that can signal drone strikes automatically because of the amount of cars that are around.
>>
>>61517536
that seems like a strange condition for not being entitled to an answer
does this mean you are also not entitled to an answer
(to any hypothetical future question)
on account of the fact that "you post"
>>
>>61517505
>vegetarianism is a viable lifestyle
Most vegetarians I know are extremely sickly people. Eat a steak please god anon. Humans are carnivorous. Why is this true? Because herbivores either eat their own shit or eat dirt to get vitamins plants lack. Can you safely eat your own shit without dying? What about dirt? Do you have instinctual impulses to do either?

You wouldn't judge a cat for eating meat, would you?
>muh vitamin pills
>muh beans
>>
>>61517500

Got Discord?

>>61517505

>all this sweet gear and loot
Which could very easily be used as weapons, right?

>vegetarianism is a viable lifestyle
Excuse me while I laugh.
>>
>>61517560
Yes. Just because you post a question, doesn't mean people have to answer it. And if people don't want to answer it, you shouldn't keep reposting it and spamming it.
>>
>>61517560
You are not entitled to any answers for the majority of circumstances

>>61517562
I actually saw a tumblr post about how household cats are destroying the environment by hunting birds, so yes, apparently you can judge cats too.
>>
>>61517562
>muh decent health in spite of vegetarianism
>"Most vegetarians I know are extremely sickly people."
>muh observation bias
>muh "muh"
>muh "muh "muh""
>MUH MUH MUH PO KER FACE MUH MUH PO KER FACE
>(muh po ker face)
>>
>>61517575
>Got Discord?
Fuck off to /v/, you fucking ponyfag.
>>
>>61517581
You're still an abomination though anon. And I bet your vitamin pills were made from liver.
>>
>>61516462
>tfw my country isn't in the top 10

I-it's ok, we aren't that big a country anyway...
>>
>>61517601
>You're still an abomination though anon.
no wrong
>And I bet your vitamin pills were made from liver.
why would i take vitamin pills that's gross and also pseudoscience
>>
>>61517575
>>vegetarianism is a viable lifestyle
>Excuse me while I laugh.
You're fucking dumb, so it is easy to see why you are single.

>There are substantially more female than male vegetarians, bigger pool to date
>Vegetarian females only want to date vegetarian males because it is much easier to make 1 vegetarian meal together than two separate meals
>Good for you and healthy, shes guaranteed to not be fat
>You get healthy while you are at it

There is literally no reason to not be vegetarian if you want to get a cute gf
>>
>>61517614
Because you need vitamin b12 to live and you can't get it from fucking plants?

There's no pseudoscience in you will eventually die from anemia on a strictly plant diet.

Honestly if you don't wanna do pills, just eat your own shit. The bacteria in there produce it.
>>
>>61517575
>Which could very easily be used as weapons, right?
yo ok but like have you ever considered how unreal the concept of cheese is
what motherfucking tool was like
"let me just have a sample of the peculiarly watery jizz from one of these four disgusting pink dicks on the underbelly of this large and conceivably dangerous wild animal"
"pretty good stuff but i bet it would be even better if i stuck it up her butt for a few months"
>>
>>61516545
>dunno if F# compiler has it, but GHC (Haskell compiler) has an error message for unused bound variables that would have reported this
idk about this specific case, but it definitely does have that issue when using unions because it doesn't use case to parse identifiers. so the following code will create a bug:
type t = Ab | Ac | Ad
let x = function
| Ab -> 1
| Ac -> 2
| Ad -> 3
| Ae -> 4 (* No Ae member *)
>>
>>61517681
two sick ass spoilers coming your way frendo
1) everyone dies eventually numbnuts
2) fatigue and superficial inflammation are not particularly deadly and are easily adapted to over about two decades
>>
>>61517710
>fatigue and superficial inflammation are not particularly deadly and are easily adapted to over about two decades
Is this a joke? You have chronic anemia and you just live with it?

Anyway I realized I mixed up veganism with vegeterianism.

You're going to need to drink 6 glasses of milk a day to stay healthy anon. Drink those 6 glasses of milk a day and the anemia should go away in a few weeks.
>>
>>61517682
People bring this up must be retarded.
Calfs get sustenance from milk. Babies (and I'm confident they knew not just babies can) get sustenance from milk.
So you try making the animal that can live off grass and other plant life you can't live off sustain you instead of a calf.
I don't know how cheese was originally conceived but the problems of preserving milk must have made people pay close attention when a preservative method was discovered. It's not that strange.

People who find this odd should be amazed by the concept of counting things.
>>
>>61517747
man
>>
>>61517587

>You're fucking dumb, so it is easy to see why you are single.
Gonna be honest, I don't think my ex would have dated, or even respected me, were I a vegetarian.

>There are substantially more female than male vegetarians, bigger pool to date
You know there's substantially more women that eat meat than vegetarians, right? You know vegetarian girls will date meat eating men, right?

>Good for you and healthy, shes guaranteed to not be fat
It is very, VERY easy to get fat on a vegetarian diet. Do you know why most people get fat these days? We consume several times the WHO recommended maximum daily intake of sugar.

Fat, on the other hand, is not as bad for you as you think, depending on the type of fat (although I tend to eat lean meats anyways).

>>61517682

>up her butt
Nah, not their butt. They were using the internal organs of various animals as a means of storing food since preservation technology wasn't that great. Put milk in and accidentally leave it sitting for a few months. Oh hey, it turned into something nice.

Incidentally, cheese is the fucking shit. I remember making a calzone with ricotta, broccoli, chicken, and an Alfredo sauce made with a fuckload of Parmesan. Like sex in my mouth.
>>
>>61517532
nope

>>61517536
I know, bitch.
>>
>stupid liberal who likes homestuck too much goes on rant about outlawing weapons
>predictably gets proven wrong
>equally predictably memes everyone into oblivion extra hard
>no one is surprised by this except those on the receiving end of the memes
literally why even live
>>
>>61517785
>>61517532
>>61517524
>>61517312
>>61517536
nvm, it works now
https://testanontest.github.io/cxz.github.io/
>>
>>61517812

>who likes homestuck too much
I didn't catch any homestuck references dropped in this thread... or are you talking about someone completely different?
>>
>>61517812
>bluh bluh
>huge cuck
>>
>>61517839
he is so obviously pretending to be dave it's physically painful to watch
>>
Why does modern C++ suck so much? who or what will save it?
>>
>>61517866

Eh... it seems very lowkey, only noticeable going through his posts a second time around. I'm not sure if it's intentional or if that's just how he normally acts.

>>61517892

The problems with C++ are that it's designed by committee and intended to retain (mostly) backwards compatibility with C. The result is a disorganized mess of a language with a bunch of features that don't seem like they fit together, at least not in their syntactic style. The only way it could be fixed would be to remove features. This won't happen because it would break compatibility with existing codebases, and because C++ programmers have grown to enjoy having stupid amounts of power.

Rather than trying to fix C++, you should use something else.
>>
>>61517844
this could have been funny but sounds too much like "huge cock"
which for the record is something this jackass definitely doesn't have
>>
>>61517892
C++ is not redeemable
>>
>>61518048

Then what will replace it? Rust? Pure C will get more widely used? (its more used than C++ in big projects already i think)
>>
>>61518056
Problem with Rust is, it's a massive jump from traditional programming language. Even if you are a good C++ dev, one cannot say that you can "Think in Rust".

Long have we waited for a sane, precise and modern successor to C++ and Rust is the closest to it
>>
>>61518056
>Then what will replace it?
Jai.
>>
>>61518114
>Gaming programming language
>>
>>61517314
not an argument
>>
>>61518121
You mean a language designed for a real world use case instead of by academics that don't know what they're doing?
>b-but javascript, php
Those don't compare, Jai hasn't been written in a single weekend.
>>
Talking about meat and cheese in /dpt/ made me hungry. So now I have a couple of fried ham, egg, and provolone sandwiches
>>
File: 12742180.png (162KB, 476x260px) Image search: [Google]
12742180.png
162KB, 476x260px
>>61518164
>ham
Absolutely haram
>>
>>61518164
aren't you worried about your weight
>>
>>61518156
>Real world use case
>Games
>>
>>61518121
>Gaming programming language
So you're opposing it because the standard library will allow you to open windows and its developer will ship an open source game in the language at release?
>>
>>61518179
https://www.youtube.com/watch?v=Km9alkBs-AU
>>
>>61518182
What's a real world use case for you? Strung together python and bash scripts?
>>
>>61518186
I'm opposing it because it caters to retards that go "I want to make a AAA game too xD" every now and then
>>
>>61518212
That actually has more use than video games
>>
>>61518219
Yeah, spending 10 hours a day ricing your desktop sure is useful. What a technical feat.
>>
>>61518223
>still more useful than video games
kek
>>
>>61518179

A little bit, but I don't tend to eat a ton. All I had earlier today was a bowl of cereal and a bowl of chicken and rice. Adding these sammiches, and I guess that makes 3 square meals.
>>
>>61518213
>because it caters to retards
But that's already a feature of C++.
Anyway you'd clearly fit right in.
>>
>>61518182
>real world use case
>haskell
>>
>>61518182

>Industry valued at almost $100 billion
>Not a real world use case
>>
>>61518317
What is game useful for in real world?
>>
>>61518327
Making you money
>>
>>61518327
https://www.thestar.com/life/2007/11/08/games_improve_womens_spatial_skills.html
>>
>>61516533
>>61516495
That's ocaml.
>>
>>61518337
Games do not get you money
>>
File: smug21.jpg (24KB, 188x211px) Image search: [Google]
smug21.jpg
24KB, 188x211px
>>61518337
>he thinks gamedevs make money
>>
>>61518365
https://www.recode.net/2015/8/29/11618134/minecraft-billionaire-markus-persson-hates-being-a-billionaire
>>
>>61518382
He should give his money to me then.
>>
>>61518382
What does that link supposed to establish?
>>
>>61518392
>Games do not get you money
Am I arguing with a complete retard? These were your words.
>>
>>61518401
But ganes do not get you money
>>
>>61518382
https://www.youtube.com/watch?v=iQ0e3QUADw8
>>
>>61518413
tl;dw
Also, fuck off gogem, nobody agrees with you on anything.
>>
>>61518424
where are your billions
>>
>>61518424
dumb phone poster
>>
>>61518164
I'm gonna tell your rabbi that you ate ham!
>>
>>61518439
What does that have to do with anything?
>>61518443
Dumb Chrome poster.
>>
>>61518365

>Make game
>Sell on steam
>Get money

Seems simple, no?
>>
File: smug_pepe_pissed_pants.png (163KB, 303x566px) Image search: [Google]
smug_pepe_pissed_pants.png
163KB, 303x566px
>>61518443
>>61518451
dumb 4chan poster
>>
>>61518458
>>Sell on steam
>>Get money
Too simple for real world, yes
>>
>>61518461
dumb frog poster
>>
>>61517892
The main problem with C++ is reading other people's C++. Since the language is so large, the mental overhead of keeping track of implicit behavior (templates, overloads, different types of constructors, RAII. polymorphism, etc) becomes stupidly large.
I think the additions of Concepts, Modules and Metaclasses should help a bit with managing this complexity, but we'll see.
However, I don't think we should be looking for a successor to C++, but instead use domain specific languages.
>>
>>61518458
in theory yes. in practice... most people >>>/vg/agdg don't make any money worth mentioning
>>
>>61518483

Most people on >>>/vg/agdg don't make any games worth mentioning.
>>
>>61518483
Yeah but they are not programmers, they use game engines made by someone else.
>>
>>61518491
Most people don't make any games worth mentioning.
>>
>>61518491
>>61518492
where are your games?
>>
>>61518483
Most programmers don't make any money worth mentioning. For example, I make nothing.
>>
>>61518503
What's wrong with shitkell in that case?
>>
>>61518491
Are you a virgin? Are you a homosexual? Can I lose my virginity to you?
>>
>>61518507
Nothing, Haskell is actually a well thought out language unlike C++.
>>
>>61518516
She's a girl
>>
>>61518518
>She
>>
>>61517214
>the same people who are so crazy about murdering fetuses strongly frown upon murdering jews
please explain this
>>
File: sad_boy.jpg (74KB, 640x640px) Image search: [Google]
sad_boy.jpg
74KB, 640x640px
>>61518491
Go to sleep Ruby, its 1:30am
>>
>>61518516
>>61518518
>>61518522
>>>/d/
>>
>>61518498
True.

>>61518502
I have none really. All I've made is a Snake game with the snake's body being user-inputtable letters, and I made that because /dpt/ challenged me.

>>61518516
No, no, and probably not.

>>61518525
Nah, I'll be awake for at least another 3 hours.
>>
>>61518542
Who did you lose your virginity to? Your gf? Is she fat?
>>
File: ruby is a girl.png (13KB, 313x297px) Image search: [Google]
ruby is a girl.png
13KB, 313x297px
>>61518522
Yes, she.
>>
>>61518542
Why such a night owl? People who stay up all night and sleep during the day are more likely to be depressed because their natural circadian rhythm is out of wack.
>>
File: Programming challenges.png (125KB, 1920x1080px) Image search: [Google]
Programming challenges.png
125KB, 1920x1080px
Tryina do pic related, stuck at Morse. I was doing it on Android (AIDE) since it's an easy program to make, but it crashes for seemengly no reason.
<EditText 
android:id="@+id/Input"
android:gravity="left"
android:layout_width="fill_parent"
android:text="Write what you want to translate"/>
<Button
android:id="@+id/Go"
android:text="Create Morse"
android:layout_width="wrap_content"/>
<TextView
android:id="@+id/Output"
android:text="Morse: "
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>

If I only put the TextView, it works. Adding either of the other components crashes, the same happens when adding only one of the others.
On a sidenote, I learnt Java then C#. Should I study C++ and free myself from Microsoft?
>>
>>61518584
go post your dumb rolling shit to >>>/b/
>>
>>61518597
B-b-but it's pro/g/ramming
>rolling
You're supposed to do all of them, even though I'm doing the ones I need to learn communication, web request handling etc. I wanted to do that Morse app 'cause it seemed dumb, but I found out I may be dumber
>>
>>61518549
Ex-gf, and no she was not fat.

>>61518556
Not a she.

>>61518559
I like being alone in the darkness. I mostly have no problem with depression.
>>
>>61518649
THE she?
>>
>>61516462
currently trying to make pong in in sfml using c++ and am messing around to see how i can get the ball to work.

i have this code:

int ballmovement = 1;

if (ballmovement == 1) {
ball.rect.move(0.08f, 0.0f);
}

if (p2.Collision(ball)) {
ball.rect.move(-5.0f, 0.0f);
ballmovement = 0;
std::cout << "P2 Collision" << std::endl;
}


however when the ball collides with the paddle, it keeps going in the direction from the first if statement and doesn't stop and go in the other direction even though i set the variable to 0. i tried using a dowhile statement but that crashes the program immediately on startup for some reason. anyone know the problem here?
>>
File: rubyemotionless.jpg (60KB, 350x638px) Image search: [Google]
rubyemotionless.jpg
60KB, 350x638px
>>61518654

I originally started using this name from a male protagonist in Pokemon Adventures of the same name (pic related).

I am very much a man.
>>
>>61518649
How old were you when you lost it?
>>
>>61518737

17.
>>
>>61518709
Don't lie to me
>>
>>61518746
Did she break up with because she got blacked?
>>
>>61518684
Theres no reason to pause and play the balls movement.
If you want some time for the player to be ready add an arbitrary countdown on reset. Typically you don't hard code movement values.
Its Y value on reset is typically a skewed random number, as is collisions.
Also post your "Collision".
>>
>>61518709
can you stop blogposting faggot, i really dont want to have to filter you because you occasionally bring decent conversation.
>>
File: 1471342074315.png (27KB, 303x181px) Image search: [Google]
1471342074315.png
27KB, 303x181px
>>61518649
Can I become your new girlfriend?
Not joking.
>>
>>61518778
More like she may have lost her mind.

>>61518838
I don't even know you... and I'm pretty sure you're not a girl.

>>61518837
People ask me questions, I respond to questions.
>>
>>61518862
Dont respond to personal bullshit not relevant to the thread, and especially stop feeding your RP'ing orbiters.
>>
>>61518862
>I don't even know you...
You can learn me!

>and I'm pretty sure you're not a girl.
I can become one for you.
>>
>>61518862
How do your parents feel that you are a brony? Are they ashamed?
>>
>Current state of /dpt/
>>
>>61518870
It would help if they'd give me a fucking Discord or something so I could keep this crap out of the thread.

>>61518891
They don't give a fuck.
>>
>>61518909
Do that by not responding you ego-tripping twat
>>
>>61518919
Or dropping the trip
>>
>>61518909
A-are you on rizon?
>>
>>61518902
In an electronics class in high school. She was literally the only female there, and thought I was the teacher because of my beard.
>>
>>61518937
lmao
>>
>>61518937
Are you muslim? why do you have a full beard at 17 years old?
>>
>>61518413
This is some of the dumbest shit.
Ignore this person.
>>
>>61518800
>If you want some time for the player to be ready add an arbitrary countdown on reset.
that doesn't matter much now
>Typically you don't hard code movement values.
Its Y value on reset is typically a skewed random number, as is collisions.
well the y value could be a random number but i don't think it would change anything. and also, how would i not "hard code" movement while still having the ball move on its own from the start?
>Also post your "Collision".
collision is just a function that sfml has.
>>
>>61518937
What's your name in real life? I bet its something like Robert.
>>
>>61518903
>Current state of /dpt/
bru seriously I only come here once in awhile but there's ALWAYS faggots who(probably) don't code posting gay shit.
>>
>>61518944
>why do you have a full beard at 17 years old?
Why would you not?
>>
>>61518950
ball.move is a speed value * a fixed delta.
But are you actually getting the Collision print?
Because its probably not properly colliding.
>>
>>61518944
Nordic.

>>61518930
I could jump on Rizon. What's your nick?
>>
>>61518995
Rukachan
>>
>>61518986
it collides and the ball bounces back in the opposite direction but it keeps moving in the initial direction that it first started moving in.
>>
>>61518950
I don't think that sfml handles collision detection, my dude. Like the name says, it's just a multimedia (+ networking) lib.
>>
>>61519086
it does

https://www.youtube.com/watch?v=JchlOld1rJI
>>
>>61519068
Ah, will first get rid of ball.rect, and your ballmovement int that should really be a bool.
You should just be able to call the rectshape ball.
>>
File: a_monster_cock.jpg (121KB, 800x1152px) Image search: [Google]
a_monster_cock.jpg
121KB, 800x1152px
>>61518995
What Rizon channels do you go on?
>>
>>61519098
nvm, actually. im pretty tired here.

bool Collision(User p) {
if (right < p.left || left > p.right || top > p.bottom || bottom < p.top) {
return false;
}
return true;
}
>>
Appending a new element to a dynamically-resizing array has an amortized O(1) time complexity.

Is that still true if the item being appended is a string? Or will it have a time complexity of O(string length)?
>>
>>61516462
just finished my new network stack (assembly, arm processors)
>>
>>61519167
depends on the way the string is implemented. in c++ for example, a std::string looks pretty much like a std::vector under the hood so it would have the same complexity. But a null-terminated char* would probably work differently.
>>
>>61519167
what precisely do you mean? give code examples
>>
struct record* buff = (struct record*) malloc(n * sizeof (struct record));
if (buff == NULL) {
perror("malloc");
exit(1);
}

pthread_cleanup_push(free, buff);

if (pthread_setspecific(key, buff) != 0) {
perror("pthread_setspecific");
exit(1);
}

According to malloc(3) manpage, calling free() multiple times yields undefined behaviour. How do I deal with this in code related?
>>
>>61519125
#guro
>>
>>61519256
W-What is /g-guro/? Didn't /g/ use to be /g/uro?
>>
>>61519259
lets meet irl i'll show you
>>
>>61519244
Set the pointer to NULL after you free it, free(NULL) has no effect.
>>
>>61519291
And I should also mutex it, I guess?

>thread 1 frees the pointer
>thread 2 frees the pointer
>thread 1 sets it to NULL
>>
>>61519291
It would be better not to set it to null in order to detect double-frees.

>>61519244
Why are you casting the result value of malloc?
>>
>>61519311
don't free it in thread 2
>>
>>61519125
None anymore. I used to lurk a few /g/ channels though.

>>61519167
If you are appending a string to a vector of strings, then the time complexity is O(string length) for copying the string or O(1) amortized for moving the string. If you are appending a string to a string, then it's just like appending multiple elements to a vector, assuming the string is implemented like a vector as in C++ and Rust.
>>
>>61519338
W-What's your Rizon username which I can use to communicate with you then? Which /g/ channel do you lurk so I can talk to you? ;_;
>>
>>61519347

expeditiousRubyist is my nick. I'm not in any channels right now.
>>
>>61519381
Do you browse infinity chan?
>>
>>61519440
>infinity chan
Cancer
>>
>>61516736
>>61516820
What's this for? Do you have a github/bitbucket repo for it??
>>
Can anyone recommend a book on algorithms and data structures with examples in pure C?
>>
I've been working on actually getting into to coding and working with unity, and having a blast, but does anyone have suggestions for something other than visual studio for c#? I've been reading around but haven't found anything conclusive.
>>
>>61519785
The Algorithm Design Manual by Skiena
>>
>>61519795
mono, VS Code, a few others a forget
>>
>>61519795
There used to be xamarin studio, but MS bought Xamarin so it's no longer maintained for Windows. You can still get it for Mac as "Visual Studio for Mac".

I'd just recommend using vs2017 though, MS made a lot of improvements to the installation process so you only install what you need for the most part, and updates don't take fucking forever to install any more
>>
>>61519795
If you're writing C# you really do want to use VS.
>>
>>61519891
>>61519912

Man xamarin was what I was first learning with before I fell out into life shit. It felt so good. Sad to see it go.

Guess I'll just stick with vs then. Not much of a bother. Cheers and thanks mein froinds.
>>
File: bepis.png (108KB, 500x531px) Image search: [Google]
bepis.png
108KB, 500x531px
Can someone post the /g/ summer project dubs roll thing (it has 100 projects, post # determines your project)
>>
>>61520075
https://better-dpt-roll.github.io/
>>
>>61516462
so Worst Korean kids studying to death is a not a meme huh
>>
>>61520136
or is it fuckery with translators and shit because it's a rare and weird language? (I have no idea how it works IRL, could be totally fair)
>>
>>61520164
Leaders are the ones doing the translation.
>>
>>61520075
no, do something useful that hasn't been done a million times

contribute patches to FOSS
>>
>>61520174
that can't be true, it would be the most rigged event in the world but it has a good reputation
>>
>>61520176
Doing something useful would be porting C-shit to a good language.
>>
>>61520204
there's no good language
>>
>>61520224
But there is.
>>
>>61520235
>he thinks he's not a cult
>>
>>61520241
???
>>
>>61520202
organizers
>>
Some rpg cubic shit with terrypratchetry shenanigans.
>>
Hey /g/, i'm looking for some good programming books to read (language agnostic), any recommendation?

I think i will buy Clean Code or the the Gang of Four
>>
>>61520359
consensus these days is that gof succ
>>
File: fortran.jpg (116KB, 610x925px) Image search: [Google]
fortran.jpg
116KB, 610x925px
Borrowed this book from library and been reading it a bit. Haven't done any exercises yet, though. I already know a tiny bit of very basic C programming (variables, loops, functions). Should I extend my knowledge with Fortran?
>>
I am thinking about making my own cms for static webshit from a "reasonable" scratch to learn shit and use it later for side projects. What would be a good starting point? I work as a c++ dev
>>
>>61520424
>c++
Start by unlearning everything.
>>
>>61520387
Cute, I have this one downloaded too!
>Should I extend my knowledge with Fortran?
In what area are you going to program?
>>
>>61520176
Name any FOSS projects that needs patches that don't use GPL as license.
>>
>>61520473
BSD stuff
>>
>>61520487
>software with cuck-license
>>
>>61520473
>that don't use GPL as license.
what the shit is your problem faggot

it doesn't matter what you practice on
>>
>>61520505
>care about FOSS
>hate GPL
>but advocate for an obstructive license
???
>>
>>61520513
I don't support GPL in anyway, as it takes away my freedom.
>>
>>61520451
Just interested in programming in general and would like to try different stuff to see which would be most interesting for me.
>>
>>61520473
OpenCV: BSD-licenced, 1,138 open issues. Just pick one, neet-o.
>>
>>61520537
>mfw g now has its own brainless edgefags

I bet you don't use/want to improve any GPL licensed software either, tard
>>
Trying to optimise the liveness analysis code in my C compiler. Still takes 6-7x longer than clang on a particular pathological function with lots of instructions and virtual registers.
>>
>>61520546
Modern Fortran isn't very interesting from the language perspective. Try Ada.
>>
what is bitwise operators used for?
>>
>>61520671
low level shit with bitmasks mainly
>>
>>61520671
Left over from the days where we had to use every byte sparingly.
>>
>>61520671
Still used a lot in embedded programming such as *duino
>>
Can someone help me with >>>/biz/2855860? I need either an API or a data dump of intraday (minute level is ok) stock trading data.
>>
>>61520671
Any time you need to operate on bits.
Basically any time you'd rather not waste space. Tons of people store boolean values to make up flags. But if you have less than 64 flags to store its way wiser to mask using a long int rather than using multiple bools.
It may seem picky but the performance impact of having big data where you don't need to is quite terrible. You'll stomp the L2 cache for no reason and waiting 200cycles to read 1 bit is just dumb. The situations where you early out om flags is the worst.
>but I work in languages like python
Then you don't have bitwise operations as a core of the language because it's pointless.
>>
>>61520848

>can somebody gibsmestuff

lol
>>
Is the space complexity of this algorithm O(1) or O(n + m), where n and m are the lengths of the strings passed?

function foo(strOne, strTwo) {
// create arrays based on strings
strOne = strOne.split('');
strTwo = strTwo.split('');
}


I want to say that it's O(1). However, consider a language that passes by value rather than reference during the assignment of the arguments to the function parameters. Is that technically not linear space then?
>>
>>61520975
The fuck are you talking about? I'm obviously going to pay for the data, no one is going to give you clean free intraday.

I don't want stuff, I just want some names.
>>
>>61518471

>However, I don't think we should be looking for a successor to C++, but instead use domain specific languages.

this
>>
>>61521062
>using dozens of languages for every tiny thing instead of trying to make an incrementally great general purpose lang
fuck off
>>
>>61516495
t. brainlet
>>
>>61521081
it's better to be good at oone thing than mediocre at them all
>>
>>61516462
Just finished a tool for wireframing and layout prototyping in the glorious language that is AS3
>>
>>61520359
those book titles sound like total memes

check these instead

https://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list
>>
>>61521096
>have to use 12 goods instead of trying to make the 1 good

Software is fucked because of brainlets like you who have no common sense.
>>
>>61521137
C++ is the mess it is because it has tried to be everything with no clear focus. The things it does relatively well (RAII, Templates, STL) are still deeply flawed because they weren't really envisioned from the start and have bizarre limitations or gotchas because they were mainly just hacks.
>>
>>61521192
>C++ is the mess it is because it has tried to be everything with no clear focus.
No, C++ is fucked because the ISO refuse to break code you ignorant twat.
>>
Can we all agree that Scheme is the most comfy language?
>>
>>61521211
Those aren't mutually exclusive.
>>
>>61521211
If the C++ standard broke code every time there was a major shift in focus there'd be a Python 2/3-tier split every 5 years.
>>
>>61521220
They are though.
>break code
>language can actually evolve

>dont break code
>all your additions are just stapled on and so your language is a mouse trap jungle.

>>61521229
plenty of modern languages now break code logically by adding @deprecated titles so people can transition ahead of time. Its really not a hard concept.
>>
>>61521249
>Go through a codebase
>Find every function annotated differently for C89, C++98, C++11 and C++17 compatibility.
Sounds like hell to me.
>>
get in here nerds
>>61521295
>>61521295
>>61521295
>>
>>61521214
>wannabe pure lambda calc
No.
>>
>>61521033
k
Thread posts: 319
Thread images: 21


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.