[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 Language

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: 323
Thread images: 46

File: 1486324615343.png (2KB, 197x107px) Image search: [Google]
1486324615343.png
2KB, 197x107px
Did I fuck up /g/?

Old thread: >>60259082
>>
First for Idris
>>
>>60268718
dpt_without_anime_op("60268718").

fucked_up_thread(X) :- dpt_without_anime_op(X).

?- fucked_up_thread("60268718").
true.
>>
how do i get an input in a phone call?, for example if i ask the user to enter a 1 in the phone how i obtain that input.
i am obtaining the inputs through a modem and i am developing a windows program
>>
>>60268888
DTMF?
>>
>>60268718
This image is fun. The longer you stare, the more you find.
>>
>>60268888
https://en.wikipedia.org/wiki/Telephone_keypad#Key_tones

Phones usually dial with a sound using these frequencies.
>>
>>60268799
this
>>
File: 1493501057809.png (1MB, 1389x1084px) Image search: [Google]
1493501057809.png
1MB, 1389x1084px
>>60268718
>le phd in cs face
>>
>>60268888
Sounds. How telephony systems work is fascinating.
>>
>>60268918
>>60268931
bellcore fsk, but how do obtain an input from usb port?
>>
                C               
+
+
1
7 7
1 1 1
+ + +
+ + +
C C C
+ + +
+ + +
1 1 1
7 7
1
+
+
C
>>
>>60268956
C++ 17 isn't very good
>>
>>60268944
Here's a challenge: Find a reasonable project requirement or other reasoning for each silly part of that block, without contradicting any other reason.
>>
>>60268946
What are you using to plug it in your computer as USB?
>>
>scala-lang.org, Aug 2013
>Construct elegant class hierarchies for maximum code reuse and extensibility

>Silicon Valley S01E01, Apr 2014, speech from a startup CEO
>We're making the world a better place through constructing elegant hierarchies for maximum code reuse and extensibility
>>
JavaScript is the English of programming languages.
>>
>>60268983
Web frameworks are the ebonics of programming languages.
>>
>>60268969
a modem with caller id support, but doesn't have voice support
>>
>>60268799
Fuck anime
>>
>>60268980
> The crew went to TechCrunch Disrupt, a startup competition also featured in the show, to film footage of the crowd, Berg explained.
>During the review process once the footage was woven in, another editor criticized the crowd shots for not featuring any women and blamed Berg for the oversight.
>"She said those crowd shots were absurd," Berg told the crowd at SXSW. "Those were real shots of the real place, and we didn't frame women out. The world we're depicting is f---ed up."
>>
>>60268983
That would be C nigger
>>
File: uomi_check.png (207KB, 375x626px) Image search: [Google]
uomi_check.png
207KB, 375x626px
>>60268944
Checked and congrats on becoming a glorified codemonkey.
>>
Do you need to learn Java before learning Scala?
>>
>>60269008
From that family, C++ is a far better match with all the inconsistent, poorly thought out crap it has bolted onto it.
>>
Java langs are a complex hierarchy.

You need to start Javascript so you can understand the foundations of Java. Then Java. From there you need to learn Clojure so that when you dive in to Scala you understand its scopes and methods.
>>
>>60269033
It would be a good idea, in case you want to interact with or utilize java components in your application.

There's a lot of well tested solutions and java libraries out there, so it's worth reducing any language friction up front.
>>
I feel like there's some way to optimize that snippet on OP's pic.
>>
>>60269055
>You need to start Javascript so you can understand the foundations of Java

Oh you silly Billy.
>>
>>60269041
They said English, not American.
>>
>>60269055
JavaScript is actually the best dialect of Java because it eliminates most of the boilerplate and has the strengths of both C and Haskal.
>>
>>60269008
C is an objectively decent languages for its domain.
>>
>tfw C program with >1.5K loc has weird as fuck string problem
>in a very special case it returns a cryptic string
>can't fucking figure it out why
>in small inputs it wroks perfectly
>in big ass inputs it just throws this magic string garbage
>i just do
if (!strcmp(rb->pos,<weird string here>))
return NULL;


oh well
>>
I'm looking log .mp3 files that are played on my computer, basically like the last.fm scrobbler for anyone that's familiar. Eventually I want to set up a SQL database so I can monitor my listening habits and have quick queries about it.

I have no idea how I'd approach it, though. How would I even log audio files that I play in foobar?
>>
>>
>>60269055
>>60269119
What the hell am I reading?
>>
>>60269158
nvm solve it.

forgot do do memset

i'll pm you guys the solution
>>
>>60269164
>foobar
Write a plugin?

Or write a program that monitors all HDD access and logs all .mp3 access.

Scrape whatever file access event system the os has.
>>
>>60268956
This symbol is very triggering.
>>
>>60269175
letters?
>>
>>60269175
Javascript is a foundational language, which is why silicon valley uses it instead of newer, web oriented languages such as Rust and SNOBOL.
>>
>>60269173
Rust is more influenced by Haksal than by Java.
>>
>>60269226
Rust is more influenced by C++ than Haskell
>>
>>60269226
>no HKTs
>strict evaluation
>no way to guarantee TCO
Yeah, I can really feel that Haskell influence.
>>
>>60269246
Nobody asked about C++.
>>
>>60269164
View > Console > Write Log

It contains many other things, but if you're good enough to clean it, it could be your solution.
>>
>>60269253
Yeah well I don't see any AbstractOutOfMemoryExceptionFactories in Rust either.
>>
>>60269253
>>no way to guarantee TCO
That's being worked on. And besides, that's more of a C thing anyway. TCO isn't needed when you have first class functions.
>>
where can i talk about data analysis programming in R and Python?

I work in the financial services industry
>>
>>60269274
>That's being worked on.
Just like entirely removing the GC in D. I'm not interested in vague promises of necessary features.
>>
where do i get started with embedded shit
>>
>>60269288
>where can i talk about data analysis programming in R and Python?
anywhere you want?

just don't expect everyone to listen to you.
>>
>>60269288
>Python
>>>/g/sqt
>>
>>60269288
ill listen to you anon
>>
>>60268718
D version:

bool getConfirmed() {
scope(exit) confirmed = confirmed ? false : confirmed;
return confirmed;
}
>>
>>60269311
>sqt
Oh hey, I'd forgotten about the Stats and Quant Thread.
>>
>>60269311
is sgt a general here?
>>
>>60269334
sQt, not sGt. It's fairly regular.
>>
>>60269329
C version

int getConfirmed() {
return confirmed;
}
>>
>>60268718
>changing state in a getter
holy shit op just call your function confirm or do_confirm or something
>>
>>60269306

well there isnt a "data analysis general" or similar as far as I am aware

>>60269311

thanks

>>60269314

I like R because I can quickly analyze massive data sets I work with, but it takes me like fucking 10 minutes to upload like 3.5gb of data, so I think I am going to start full time using python....but ggplot2 is amazing for presenting data and at the office im "that guy who makes amazing pitchbooks/graphs" so idk, fuck


Also when I run monte carlo sims I have to leave programs running overnight just to get enough data to be able to meaningfully analyze a hypothesis

I KNOW it can be done faster in "lower level" languages, but I never learned comp sci (math major) so I cant just pick up C and write what I am doing in it
>>
>>60269337
If confirmed is true, its value is inverted.
>>
Tell me about Go, why does it suck other than it was designed to stop pajeets from fucking everything up?

Seems good tbqh
>>
>>60269376
https://github.com/ksimka/go-is-not-good
>>
>>60269329
This
>>
>>60269376

> error type is simply an interface to a function returning a string.
> lacks pattern matching & abstract data types.
> lacks immutable variables.
> lacks generics.
> lacks exceptions, and instead uses error codes everywhere,
>>
>>60269396
Error codes are great. If your language has features to make it easy to handle them, like Rust's try! or Haskell's Either (or MonadError, or whatever).
>>
>>60269188
what's the matter, pajeet? can't handle c++17?
>>
>>60269427
Excuse me, Sir?
>>
How much code does Reddit keep private from the public Github repo?

I've been looking through the code to see if there are any methods for checking one user using multiple accounts to vote on posts and don't see any methods for accomplishing that info directly.

There's some stuff for checking what IPs are accessing accounts with a comment about "send this info so we can investigate". They can't be doing vote manipulation checking by hand? Or do they keep their vote manipulation checks private
>>
I wanna learn python. What do I start with?
>>
bool getConfirmed() {
bool ret = confirmed;
confirmed = false;
return ret;
>>
>>60269503
Python.
>>
>>60269371
You can learn Python and then use C and C++ binding for the parts where you require speed.
>>
>>60269503
Wanting to learn python is like wanting to learn how to read. There are resources everywhere. Because of how easy the language is, every resource is technically good enough.
>>
>>60269467
90%
>>
File: dlang_chan.jpg (139KB, 470x545px) Image search: [Google]
dlang_chan.jpg
139KB, 470x545px
Threadly reminder that dlang-chan is not dead; she's going to have her GC tumor removed (eventually); and she's super duper cute and easy to prototype in! Say something nice about her, /dpt/!
>>
>>60269467
Of course Reddit is going to hide stuff like that. You think Reddit will be happy if people discovered it is a shilling zone via their own code?
>>
should i ask about help with a programming project here or /wsr/
>>
File: 1491487930460.png (409KB, 1144x888px) Image search: [Google]
1491487930460.png
409KB, 1144x888px
>finally made it to computer programming classes in college
>tomorrow is my first day
>mfw btfoing everyone tomorrow with my extensive linguistical programming knowledge from years of daily programming threads
>>
>>60269504
b-but you're doing an assignment each time anon
>>
>>60269587
dumb frogposter
>>
File: NO FUCKING WAY.png (29KB, 525x240px) Image search: [Google]
NO FUCKING WAY.png
29KB, 525x240px
NO FUCKING WAYY

HOW LONG AS THIS BEEN A THING?
>>
bool getConfirmed() {
return confirmed && !(confirmed = false);
}


>>60269594
An assignment that changes nothing is faster than a branch
>>
>>60269587
Yeah. That is called Autism
>>
>>60269556
She severely needs to get a rich daddy.
>>
File: 1406342198440.png (58KB, 403x426px) Image search: [Google]
1406342198440.png
58KB, 403x426px
>>60269587
I'm sure the first question the teacher is going to ask is "who here knows how to fizzbuzz" and you'll answer correctly and instantly be awarded your diploma.
>>
>>60269614
forever
>>
File: 1493190153223.jpg (378KB, 1280x1389px) Image search: [Google]
1493190153223.jpg
378KB, 1280x1389px
bool getConfirmed(void) {
return (!(confirmed = !confirmed));
}
>>
>>60269650
This is wrong. confirmed should not be set to true if confirmed was false.
>>
File: 1487310432664.png (2KB, 463x119px) Image search: [Google]
1487310432664.png
2KB, 463x119px
>>60269616
thanks anon
>>
>>60269650
confirmed = \empty
>>
>>60268922
I've seen code like this
>>
pls help I'm going insane

using angular I want to iterate through a json array containing arrays.

<tr ng-repeat="((key,val) in wordcounts">
<td>{{key}}</td>
<td>{{val}}</td>
</tr>


gives pic related

and when I try to

<tr ng-repeat="item in wordcounts">
<tr ng-repeat="(key,value) in item">
<td>{{key}}</td>
<td>{{value}}</td>
</tr>
</tr>


nothing shows up in the table

what the fuck am I doing wrong?
>blah you need to know the json identifiers in the arrays
I don't know them because I python "jsonify"s the results I get from GETs
>>
>>60269619
It sure will help though if he's lurking, I had a lot of problems when they introduced us with javascript last year, the syntax is absolutely haram.
>>
>>60269587
No anon!

I've been going to Uni for a couple months now, hide all prior knowledge!

It's taken me a while to grasp but 99% off the people in CompSci come in with no prior knowledge, they just expect to learn all this stuff when they get there.
I've finally managed to make some good mates but they get quite and defensive whenever I whip out previous projects. They will be thankful when they realise they can come to you for help with their work though.

Also the professors there are pretty thick, most of them are working with severely outdated limited knowledge, they do not care about their fields 90% of the time, I know it's a """place of learning""" so you'd expect them to care but they don't.

Don't make the same mistakes I did, these people are massive casuals in disguise!
>>
>>60269691
>Angular

Pffthahahaha
>>
>>60269745
no bully, how fix?
>>
>>60269733
This. The worst meme you can fall for is the pretty girl that needs your help. Don't do it. I have seen too many retards fall for it and end up doing 80% of some CS girl project.
>>
>>60269733
This, just shut up and keep your head low.
>>
You guys must know this.

I almost never use programs operated from a command prompt, so clear this up for me. In the help section, it tells you the following:

>-f, --force = "Text explaining what it does"

Now, are these arguments the same thing, and it just gives me two different ways of inputting it, or is there some sort of difference?
>>
File: 1493334087537.png (67KB, 616x596px) Image search: [Google]
1493334087537.png
67KB, 616x596px
>>60269733
>>60269763
>>60269770
>these people are massive casuals in disguise!
that just makes btfoing them even better

>making friends
there are no friends, only competition to the top of the food chain, I'm gonna show those plebs who's daddy. The only thing they'll get is little trickles of my superior man milk from the pure knowledge I excrete out loud when I'm correcting the teacher every few minutes.
>>
>>60269789
>are these arguments the same thing, and it just gives me two different ways of inputting it
Yes.
>>
>>60269810
dumb frogposter
>>
>>60269810
good luck working then, programming isn't exactly a solitary profession.
>>
>>60269812
Why does the letter have one dash and the full text two?
>>
>>60269840
If he has the balls to join the honors program, he's going to sit back and prep the bull as he gets blown out by superior students anyways.
>>
>>60269849
that's just the way the devs made it, you'd have to ask them
>>
File: help.png (37KB, 616x143px) Image search: [Google]
help.png
37KB, 616x143px
crimson editor isnt very descriptive on php errors so please help me figure out whats going wrong with this guys code
What ive followed
https://pastebin.com/hfrexMu7
using
students.txt
Sally F 35 A 
Donald M 38 A
Susan F 22 N
Richard M 21 N
Dave M 39 A
>>
File: ran_disgust.png (53KB, 204x288px) Image search: [Google]
ran_disgust.png
53KB, 204x288px
>>60269587
>>60269810
>the frogposter is retarded and autistic
Who would've thunk it?
>>
>>60269587
>asking questions you already know the answer to to impress everyone in class
plz don't
>>
>>60269849
You can string a bunch of single-letter arguments together like so:
bash -fuck

You can't do that with double-dashed arguments.
>>
>>60269870
>do you even lift bro
I really can't stand people who do this every chance they get.
>>
>>60269789
Yeah. I think the "long" options (the ones preceded with a double dash) are mainly a GNU thing, though you do sometimes see them elsewhere. The short options are easier to type, but the long options are more readable when they're used in a script.
>>
>>60269903
yeah i dont like it either, im just trying to see thr thought process behind his code and why it doesnt work and it just makes me more annoyed when memes are shoved in
>>
File: anzu_what.png (118KB, 330x224px) Image search: [Google]
anzu_what.png
118KB, 330x224px
>>60269870
>those autistic comments
>>
File: 1471605137992.png (272KB, 785x757px) Image search: [Google]
1471605137992.png
272KB, 785x757px
>>60269884
>reach into my bag
>loudly pull out a piece of wide rule paper with words and notes scribbled all over it
>loudly clear my throat and flick the paper straight to deliberately draw attention to my area
>mfw I start grilling the professor with my buzzword sheet that I've been writing up all week
>mfw he won't even know what the most efficient way to write fizz buzz is
>mfw I force him to quit on the spot because he's so embarrassed and the school passes me that day with cum laude honors A++ graduate masters degree
damn, how did I get this smart
>>
>>60269274

>that's more of a C thing anyway.
C makes no guarantees for TCO, but every decent C compiler implements it anyways. Incidentally, clang and rust use the same code generator (LLVM), so Rust gets TCO wherever the equivalent code in C would when using Clang.
>>
>>60269691
n-no one?
>>
i'm almost finished this assignment for my c++ course, but the very last part is triggering me

i have a function that takes in a string like "1+2*(5/3) + 5" and i need to tokenize it and return it as a vector of strings

stackoverflow is giving me lots of useful suggestions but they all use a whitespace delimiter, which my string may or may not have

my current plan is to just read in the string by index and seperate every character with a whitespace and then tokenize it with a str stream, but that sounds like a completely retarded way of doing it

any suggestions?
>>
>>60270085
even if it sounds retarded just do that lol, why not
>>
Where do I start with JavaScript?
>>
>>60270139
/wdg/ is down the road
>>
>>60270139
you don't.
>>
>>60269691
Q_Q
>>
>>60268956
this is a work of art
>>
>>60269371
if you're a math major have you thought of trying a lisp language? i've tried a lot of different languages but among them it's pretty unique and was designed with math theory(lambda calculus) in mind, so if you find something like c difficult it might be worth a shot. it's pretty freely expressive with lots of room for abstraction, instead of having to deal with someone's arbitrary typing and/or syntax rules and whatnot.

>>60269503
personally i'd recommend codecademy. it won't make you extremely proficient but it will teach you how to use it quickly without the need to install anything, so you can use it as training wheels even if you have trouble setting up the environment.
>>
>>60270085
https://pastebin.com/U64nTEXQ
>>
File: 1477705471879.jpg (228KB, 1024x1024px) Image search: [Google]
1477705471879.jpg
228KB, 1024x1024px
>>60268718
bool getConfirmed()
{
confirmed ? confirmed = false; return true; : return false;
}
>>
File: ran's_DMRG.png (1MB, 900x1440px) Image search: [Google]
ran's_DMRG.png
1MB, 900x1440px
>>60269371
>Also when I run monte carlo sims I have to leave programs running overnight just to get enough data to be able to meaningfully analyze a hypothesis
There are certain properties that your PDF must have to guarantee good convergence. Also depending on the problem you're looking at you could make up weighting functions that pick out MC samples that best suit the purpose. For example if I want to calculate expectation values of a many-body quantum system I could use DMRG to truncate the Hilbert space so that I don't need to integrate over such a large parameter space with QMC.
>>
bool getConfirmed()
{
try {
return confirmed;
} finally {
if(confirmed) confirmed = false;
}
}


',:^)
>>
>>60270131
for all i can tell java and c# are so similar(not considering libraries, which should probably be the key factor in your decision) it almost doesn't matter. just learn both, or use whichever one you need. for what it's worth, at the moment java is more taught in schools and probably more used in businesses.

if you're into games and stuff you might consider prioritizing c# though, for example if you've ever considered getting into something like unity development then c# is the obvious choice.

that being said i hate c# and java, and wouldn't use them if i didn't have to myself.
>>
>>60269556
dlang-chan is NOT cute
>>
>>60270400
Does this actually work? I don't think it does.
>>
>>60270418
but that's wrong
>>
File: C3KcP4KUYAAA-IO.jpg (182KB, 1024x829px) Image search: [Google]
C3KcP4KUYAAA-IO.jpg
182KB, 1024x829px
I've got a challenge for you, /g/.

Make a program which runs in the background, automatically checking and tracking /dpt/ threads, and feeds any new posts it finds into a text-to-speech reader, playing it for the user.

Then we can always be together. Forever.
>>
>>60270507
Not gonna do your homework for you
>>
>>60270507
I can make that in python. I already made one that updates itself except for .txt to browse during work. The only part left is txt to speech which should't be too hard.
>>
File: rarepepe.jpg (70KB, 1631x1571px) Image search: [Google]
rarepepe.jpg
70KB, 1631x1571px
fun main(args: Array<String>) {
val map = hashMapOf<String, Int>()
map.put("one", 1)
map.put("two", 2)

for ((key, value) in map) {
println("key = $key, value = $value")
}
}


Doesn't that just look nice?
>>
>>60270567
Kill you'reself, you retarded frogposter.
>>
File: 1404729489035.jpg (76KB, 398x500px) Image search: [Google]
1404729489035.jpg
76KB, 398x500px
>>60270337

wow thanks anon
i didn't think of making a seperate string for possible delimeters, this is a really elegant solution

thanks a lot
>>
>>60268718

Yes. You mutated in a getter.

>>60269616

That's the Max Power way,

https://www.youtube.com/watch?v=7P0JM3h7IQk
>>
>>60269691
aight fuckers I'm not joking around. I've almost been awake for 20 hours and need to fix this shit before my presentation in a few hours. how much btc do you want to help me?
>>
>>60270578
n-no bully pls
i probably know as much as you if not less
>>
>>60270575
So you admit Kotlin is the new master race.
>>
File: seq.png (62KB, 800x543px) Image search: [Google]
seq.png
62KB, 800x543px
>>60270316

hmm i'll look into it, thanks anon. I've tried using mathematica for work stuff but its too memey for real world data analysis, with the computer algebra stuff.

have a chart I made of some number sequence from the online encyclopedia of number sequences
>>
>>60270628
Scala > Kotlin
>>
File: 1om165.jpg (68KB, 423x600px) Image search: [Google]
1om165.jpg
68KB, 423x600px
>>60269680
>>
>>60270658
Scala can't hide itself as Java code even from Pajeets.
>>
>>60270666
I don't understand what you're getting at there, Satan.
>>
>>60269403
That's the difference between error code and error types: error types are cleanly handled via e.g. rust's ? or pattern matching, etc. Error codes cannot be: they imply that you have a separate channel for the return value and for the error code and the error code is almost always ignored because it's too much trouble to actually deal with it correctly.
>>
File: maxresdefault.jpg (39KB, 1920x1080px) Image search: [Google]
maxresdefault.jpg
39KB, 1920x1080px
How difficult would it be to create a red button that when pressed, starts a song. So far I know javaScript and HTML. Would CSS be necessary? This would be my first actual project.
>>
>>60270673
Check out the interop of Java and Kotlin. It's significantly better than Scala in that regards.
>>
>>60270718
>>60270718
I forgot to mention, I want the button to be on my local web server.
>>
>>60270718
>knows html
>doesn't know CSS
If you're learning HTML, you pretty much need to know CSS. CSS contains all the formatting rules for how your HTML is displayed. HTML is the arrangement of pots and plates on your shelves, CSS is the collection of aspects of said objects and shelves like the color and size.

>how difficult would it be to create a red button when pressed, starts a song
Uh, really fucking easy. Like maybe 6 lines of jquery code and an html button.
>>
>>60270752
>arrangement of pots and plates on your shelves
and >>>/g/wdg/ is an arrangement of posts to where you fuck off
>>
>>60270774
It's a fucking analogy, you dweeb. Chillax. If someone is saying "Do I need to learn CSS? I already know HTML" then they probably need a simple metaphor.
>>
>>60270774
ur link is broken
>not using other things
>>
>>60270800
everyone knows CSS means C SchutzStaffel - german dialect of C lang, so fuck off with your pots
>>
>>60270860
The link works fine, dumb mobileposter.
>>
>>60269870
if it helps anyone the error is a parse error on line 58, of course it could just mean theres a problem elsewhere in the code but if anyone has any knowledge on the subject i would be very thankful
>>
File: 1493772015199.png (761KB, 865x1338px) Image search: [Google]
1493772015199.png
761KB, 865x1338px
Learn java for OOP and C++
or
Learn C# for OOP and C++?
>>
File: chen_honk.png (73KB, 380x248px) Image search: [Google]
chen_honk.png
73KB, 380x248px
>>60270997
The latter.
>>
>>60270997
C#
>>
>>60270997
>>60270408
>>
Is there a place online where i can input expressions like:
a = (a+b)+b-c+99


and it generates the corresponding Abstract syntax Tree?
>>
>>60270997
Java for the banking jews
C# for the MS jews
It always the jews.
>>
>>60269810
No dumb cunt, there will also be people there who make you look like a kid.

I came into first year at 18 years old, having completed 2 units alongside HS through some Ausfag meme with 2 near perfect internal study scores (99), I was in the process of writing a GBC emulator and had about 10 languages confidently under my belt as well as a phat portfolio of hardware and software projects I'd built over my limited life. I thought I was top shit.

One of the first dudes I met there was a 18 y/o second year who was already working at the Uni in their research department doing some shit with analysing pulsar data from space, with his entire CS degree under his belt through the same Ausfag meme I used, and was in the process of annihilating his math+physics double degree.
Nibba wasn't even Asian (was Irish+American)

tl;dr There's always some smarter and younger, stay humble cunt
>>
>>60269614

Is that within Chrome's dev tools?
>>
>>60271089
nani?
>>
>>60271089
Yeah it's a vanilla chrome install
>>
File: 1464606716660.jpg (124KB, 424x755px) Image search: [Google]
1464606716660.jpg
124KB, 424x755px
>>60271059
This anon speaks the truth. No matter how good you think you are; you will always be anally annihilated by someone else--be it sports, academics, appearance, etc. If you stay humble, the pain will be at most a sting, and you look better for it too.
Thank god I suck at everything so I don't have to worry about being a smug jackass.
>>
File: 1451438284147.jpg (54KB, 607x428px) Image search: [Google]
1451438284147.jpg
54KB, 607x428px
>>60271132
>This anon speaks the truth.
>>
Built a dating site. It's in alpha though. Need some test users. Email [email protected] if you're interested. Can maybe hook people up with giftcards for their time.
>>
File: 1472349453026.jpg (177KB, 1050x1400px) Image search: [Google]
1472349453026.jpg
177KB, 1050x1400px
>>60271165
Only if it's a dating site that allows me to hook up with 2D girls.
>>
>>60271165
it's never going to take off, so why bother?

it's like creating a new facebook. no one is ever gonna use it
>>
>>60271132
That's why you gotta find something incredibly niche and take your pride in that. Like yeah sure, I suck at pretty much everything but at least I can walk as silently as a ninja.
>>
>>60271182
>nothing is worth doing unless you're going to win
This is how stupid you sound.
>>
>>60271182
Thats what they said about myspace, and facebook is already on a massive decline. You unironically think its the end-all?
But yeah a dating site is a really shitty idea unless its like Trap-Meetâ„¢
>>
>>60271179
>WeebNet
I like it
>>
>>60271188
I have the strange ability where sometimes people in positions of power think I'm not trash. Best I can do, anon.
>>
>>60271207
>facebook is already on a massive decline
It's actually not.
>>
>>60271165
Know how I know it's going to fail? Its first users are going to be from /g/, and they're going to swarm every girl that signs up with autistic Gentoo references.
>>
>>60271207
Dating sites are deprecated, apps like tinder are what everyone uses these days anyway. Reading profiles is too much effort and too much time, people just want to see a sexy pic and swipe right if they're interested
>>
>>60271222
Boomers and old people dont add growth you want.
Social networking sites need 13-30 to be relevant. Twitter & instagram are sucking that demo away very quick.
>>
>>60271207
>Trap-Meetâ„¢
Pff, Trans-Station is the better name. It gives you an underground kind of feel, avoids the negative stereotype of tricking people and provides dick-in-asshole/train-in-tunnel imagery.
>>
>>60271249
Boomers and old people have money, don't block ads, and click on ads a lot more than young people do, especially shady-looking ones.
>>
>>60271257
Still doenst make up for it.
Ask any new startup making a facebook killer what people they want. I guarantee its around the same demo i said.
>>
>>60271229
Ha, that wouldn't be so bad.

Actually it's not really a dating site. More like marriage match-making. Maybe you can tell from the name. I live in Japan and it's a big industry here. Just an experimental side project really.
>>
>>60271257
But they also spend less time online, so you don't collect as much data on them as with younger people. And if you're not collecting a fuckton of data about a person, what are you going to sell? Ad clicks? 100% shit business plan.
>>
File: 1456359570140.jpg (85KB, 347x411px) Image search: [Google]
1456359570140.jpg
85KB, 347x411px
>>60271300
But can you match me with 2D qts?
ANSWER THE QUESTION, ANON
>>
>>60271319
Now this is an interesting business, give autists the 2D girlfriend experience, and have the "girl" sell him stuff with her picture on it.
>>
>>60271319
Umm...well if they sign up and create marriage contracts, then yes...
>>
File: eroge.jpg (217KB, 801x602px) Image search: [Google]
eroge.jpg
217KB, 801x602px
>>60271347
>give autists the 2D girlfriend experience

That's already a thing
>>
>>60270994
You'll want to turn the else right above that line into an else if
>>
>>60271624
thank you, that fixed the problem with that line, now its saying theres an error on line 87, im stumped
>>
>>60269870
This is embarrassing
>>
File: 1488408746420.jpg (64KB, 655x491px) Image search: [Google]
1488408746420.jpg
64KB, 655x491px
>>60271684
You're missing a }
>>
>>60271730
>>60271702
im a dummy thanks a lot guys
>>
>>60269337
>>60269374
>>60269504

    bool getConfirmed(){
confirmed = !confirmed;
return !cofirmed;
}
>>
>>60269337
I'm a retard, can anyone explain to me why this is the case?
>>
File: keikaku.png (159KB, 600x600px) Image search: [Google]
keikaku.png
159KB, 600x600px
>>60271165
>>
I got a rectangle to move across a window. I feel extremely accomplished right now.
>>
>>60272112
>he doesn't post a webm of this momentous occasion
Seems like you don't feel accomplished enough.
>>
So, i'm making a MIPS simulator on C (uni work, I know it's useless) and I'm having a bit of problem. While trying to load the following bin file:
0020 0820 2020 0920 0000 298d 0400 0224
2420 0420 0c00 0000 0900 2011 0100 0224
0000 048d 0c00 0000 0400 0224 4b20 0420
0c00 0000 0400 0821 ffff 2921 0600 0008
0a00 0224 0c00 0000

I tried using fread (&mem[i], 4, 1, fprog); to read

where mem is a int32_t type, and fprog is the file pointer to the bin file. Thing is, it misreads it. By simply using a printf to see what's read, this is the result:
20082000
20092020
8d290000
24020004
20042024
c
11200009
24020001
8d040000
c
24020004
2004204b
c
21080004
2129ffff
8000006
2402000a
c
(and all else is zeroes)


I have no clue what I'm doing wrong. i tried changing mem to uint32_t instead, and the same shit still happens. Can anyone in here please shed a light on what I'm doing wrong? File is open as "rb" btw.
>>
>>60272188
Are you aware of little vs. big Endian? I'm assuming your issue is that everything's getting printed out backwards
>>
you wouldn't program a programming language
>>
What are some good overall programming projects that I could work on? Specifically low-medium difficulty please.
>>
>>60272264
Make a shitposting bot for 4chan
>>
>>60272264
IRC bot
>>
>>60272264
anything that involves automating tasks
>>
>>60272219
yeah, seems pretty stupid I look at it now.
Thanks senpai, I guess I'm too tired to think
>>
>>60272127
Nah, I feel pretty accomplished.
>>
File: 1485473684854.png (408KB, 824x792px) Image search: [Google]
1485473684854.png
408KB, 824x792px
>>60272291
This is an excellent suggestion. It's a programming task which usually isn't trivial nor too hard, and actually provides some benefit to the programmer.
I've written lots of programs/scripts, almost all of which have to do with the automation of downloading/storing anime.
>>
>>60272313
What's the library, anon-kun?

>>60272318
>almost all of which have to do with the automation of downloading/storing anime.
Same. I'm currently making a CLI program that'll allow you to manage the anime you're watching. So, it's like MAL, but with the faggotry removed.
>>
>>60272264
Evaluate the Bessel function of zeroth order by numerically integrating the ODE a priori. This means no series and integral representations.
>>
File: 1394569694713.png (269KB, 1920x1080px) Image search: [Google]
1394569694713.png
269KB, 1920x1080px
>>60272264
>>
>>60272359
Fuck off, faggot. Seriously
>>
>>60272455
Sad to say if you can't handle any of those, you're not ready to take on anything more challenging than a fizzbuzz.
>>
I have to program a game in python by Wednesday or I'll fail out of college.

I can't even get the start screen working. I have to use pygames and it is the worst engine in history. I want to die /g/.
>>
File: yukari_laugh (1).gif (2MB, 336x410px) Image search: [Google]
yukari_laugh (1).gif
2MB, 336x410px
>>60272535
>>
>>60272535
>expecting pity for this easy ass shit
lol
>>
>cant even make a a pong clone in python
Why do normies & brainlets take CS.
>>
File: 1493906665992.jpg (155KB, 1280x720px) Image search: [Google]
1493906665992.jpg
155KB, 1280x720px
>>60272535
Make a VN
>>
>>60268718
bool getConfirmed() {
if (confimed) { confirmed = !confirmed; return !confirmed; }
return confirmed;
}
>>
>>60272535
Time to pick up a trade, computers aren't for you.
>>
>>60272535
>Program a game
>In python
>Pygames
>College
I have an reaction image folder with over a 1000 images and none of them are apt enough for your post.
>>
>>60272595
I'm not normal but I probably am a brainlet
>>60272595
Its actually an asteroids clone
>>60272581
I swear it isn't easy. I tried making a different while loop but for the start screen but it won't close and start the main game loop when I press a key, its probably the engine's fault. I looked on stack overflow and they were all doing the same thing as me.
>>60272617
I'm even worse at everything else
>>
>>60272680
>its probably the engine's fault
Said every beginner ever
>>
>>60272680
>I'm even worse at everything else

Time to be a NEET and watch anime and play video games all day. I hope you have understanding parents.
>>
>>60272680
>it won't close and start the main game loop when I press a key,
Look at your code carefully, i can assure you, its not pygames fault, its yours.
>>
>>60272680
I'll do it for you, anon. But it's going to be in C and most of it boilerplate.
>>
>>60272685
I'm not even really a beginner, I first took a programming class 4 years ago.
>>60272694
My mom already makes me pay rent and will probably kick me out soon
>>60272697
I swear it's ignoring a line of my code for no reason
>>
>>60272680
>>60272535
Just visit >>>/vg/agdg and steal one of their games. They'll never get popular enough for anyone to find out.
>>
>>60272680
post source code
>>
Is there any c++ audio book? I just want to close my eyes and let it go through my mind
>>
I just started learning C++
Why can't I declare a variable and then ask for an input at the same time

Like
cin >> string name;


instead of

string name;
cin >> name;
>>
>>60269119
Tbh JS paired with recent stuff like v8 and node makes it pretty damn great. Throw react native into the mix and God damn you can make anything with JS.
>>
>>60269008
No C is Latin.
JS and English are widely known, and are objecively kinda dumb.
C and Latin have not been widely known for some time. But still have massive amount of infuence.
>>
Who here uses automated testing? Continuous deployment? Continuous integration?
>>
>>60268968
our project requires the function declaration to be shit and the whole function too.
>>
stupid piece of shit, look for the documentation
>>
>>60272954
It turned out my problem was that I was using == instead of =. That took me 2 hours of my life to figure out. I'm still probably going to fail this class though.
>>
>>60273217
How can you be so fucking bad?
>>
>>60272617
>implying programming isn't a skilled trade
>>
>>60272313
It's the small things that keep you going. Keep up the good work.
>>
>>60273217
I can't believe there's a worse programmer than myself in existence. Congrats anon. I can buy you a tank of helium if you want--you know, before you get kicked out for failing out of college.
>>
>>60273114
For the same reason you can't do shit like
int x,y = 0;
x = y + int z = 2;


You need to initialize variables before you use them.
>>
>>60273266
But you can in python.
This feels awkward. Like I am writing redundant lines of code.
>>
>>60273217
You deserve to fail the class if you can't figure out rookie shit like that.
>>
Who here /employed software dev/?

Who here /employed software dev but does hardly any coding because of overhead/?

We're doing two hardenings and two releases in this one 3-week sprint right now. It's nuts.
>>
>>60273279
That's part of why python is such a steaming pile of shit.
>>
>>60273289
Python is a steaming pile of shit for plenty of reasons. That is not one of them.
>>
bool is_true(bool var) {
if (var == true) {
bool tmp = true;
} else if (var == false) {
bool tmp == false;
}
return tmp;
}
>>
>>60268718
Anyone have the image mocking OOP where it's a stick figure holding onto several different ropes that go into a mess of classes and shit?
>>
>>60273279
AFAIK you can't create and bind an object from within an expression in Python.
>>
>>60273243
Depends on what you program. Creating stuff for scientist, or trading companies is pretty advanced desu
>>
Also DPT you wanna see a health data standard that is used out there in the real world?

Check out the HL7 v2.4 message format:

 MSH|^~\&|GHH LAB|ELAB-3|GHH OE|BLDG4|200202150930||ORU^R01|CNTRL-3456|P|2.4<cr>
PID|||555-44-4444||EVERYWOMAN^EVE^E^^^^L|JONES|19620320|F|||153 FERNWOOD DR.^
^STATESVILLE^OH^35292||(206)3345232|(206)752-121||||AC555444444||67-A4335^OH^20030520<cr>
OBR|1|845439^GHH OE|1045813^GHH LAB|15545^GLUCOSE|||200202150730|||||||||
555-55-5555^PRIMARY^PATRICIA P^^^^MD^^|||||||||F||||||444-44-4444^HIPPOCRATES^HOWARD H^^^^MD<cr>
OBX|1|SN|1554-5^GLUCOSE^POST 12H CFST:MCNC:PT:SER/PLAS:QN||^182|mg/dl|70_105|H|||F<cr>


Subsitute the <cr> for real carriage return characters. This is an example of how data is transferred between medical data systems.
>>
>>60273306
>bool tmp == false;
stop and think about what you're doing
>>
>>60273328
Name = input('What is your name?')
>>
>>60273334
why don't they just use HTTP and REST compatible APIs
>>
>>60273334
I guess at least it is human readable?
>>
>>60273385
Hospitals are morons and think money can be better spent elsewhere.
>>
>>60273385
>>60273401
How on earth are your memes going to make anything better?
>>
>>60273337
Fugg :DD cant even write shitty code
>>
>>60273385
>>60273401
They are. HL7 2.X and 3.X are old standards.

https://en.wikipedia.org/wiki/Health_Level_7

They're currently moving to a new one which has been in development over the last few years, called HL7 FHIR (pronounced 'fire').

It uses JSON or XML over top of ReST.

http://www.hl7.org/fhir/

https://en.wikipedia.org/wiki/Fast_Healthcare_Interoperability_Resources
>>
>>60273114
tl;dr reason is because of the way std::cin works. It's not a function returning a value, so you can't treat it like it is.
>>
>>60273439
>>60273417
I was not the guy who posted the original post btw. I just someone who did an FYP on using medical data to predict trend of vital signs. You will be surprised how much roadblocks I ran into over my entire year.
>>
>>60273417
Well understood standards are usually better than rolling your own shit for a number of reasons.
You get more library support, time-tested techniques.
But maybe rolling your own is necessary if the system isn't powerful enough to support HTTP (which has a lot of bloat & metadata that might push shitty microcontrollers over the edge, but I don't work in medical engineering so I'm just guessing here)
>>
File: 1414554539138.png (68KB, 675x426px) Image search: [Google]
1414554539138.png
68KB, 675x426px
>>60273425
Learn from the master.
>>
>>60273455
I am doing Bjarne Stroustrup-Programming Principles and Practice Using C++ and I noticed instead of std::cin they use cin and includes a header file to allow it. I am curious. Is this good practice? To my knowledge, header files function like libraries files. Most of the code I read uses #include iostream which uses std::cin. Any advice?
>>
>>60269371
>R

Use Pandas you filth
>>
>>60273472
I'm talking about medical record standards (i.e. patient records and patient history), not so much health devices like pulse readers, MRI scanners etc.
>>
>>60273479
>Is this good practice?
It doesn't really matter all that much, to be honest. It's an annoyance if you're expecting it to be one way and it's another, but anyone with at least a double-digit IQ should be able to handle it just fine. There's no performance impact.
Also, Stroustrup literally wrote the language, so he kind of gets to set the rules.
>>
>>60273477
>a.equals(c)
I'll never get why is this better than op. overloading. A shitty programmer will find a way to be shit, even if he is somewhat restricted.
>>
>>60273479
Stroustrup did it to simplify the book and to make code more readable. Otherwise, you'd have a fuckload of stds in your code. Yes, it's not generally best practice to use namespaces, but unless you're in an enterprise environment coding for a major company nobody should give a shit.
>>
>>60273535
I am pretty good at python and do it for a living. I am learning C++ now because there is a job prospect I am looking at. How long do you need I think need to git gud enough to pass a C++ interview?
>>
>>60273554
>How long do you need I think need to git gud enough to pass a C++ interview?
When you have a portfolio of decent software you've written.
>>
>>60273576
I actually do but in python and java instead of C++. I am talking about the technical aspects rather than my portfolio.
>>
>>60273595
Sorry, let me fix my previous post: when you have a portfolio of decent software you've written in C++. If you do that, you'll pick up what you need to know.
>>
>>60273595
Nobody is going to hire you for a C++ job without a portfolio of programs written in C++.
>>
>>60273128
C is literally the most popular language on the planet you fucking retard.
>>
>>60273595
Measure how long it takes for you to take a C++ application that is already written and make some small modification.
Just set yourself a goal you think is obtainable and do that.

If you can work on something in an alien project, within a reasonable time frame, then you are fluent in the language and you can do anything in the field.
>>
why should I ever use int over long ints when both are 4 bytes?
>>
>>60273633
Out of curiosity what would be example of c++ program to pu on portfolio?
>>
>>60274336
Windows?
>>
>>60274336
>when both are 4 bytes
Those are some pretty strong assumptions you're making there.
>>
>>60274367
yes

I just realized it can be different on different architectures ignore me
>>
>>60274336
the standard says int is at least 16 bits while long int is at least 32 bits
so if you really need the 32 bits you should use long to be safe.
>>
>>60274394
Not exactly.
usual int32 cover
-2147483648 to 2147483647
but the standard only state that long int cover
-2147483647 to 2147483647

You don't know if -2147483648 is a long int
>>
>>60274479
>Not exactly.
No it does actually specify things in terms of bits.
However, it allows for sign & magnitude, ones compliment and twos compliment implementations to exist.
>>
>>60274495
OK I get it, you and I were not talking about the same thing when saying 32 bits.

Sorry
>>
File: photo.jpg.png (438KB, 717x717px) Image search: [Google]
photo.jpg.png
438KB, 717x717px
test
>>
>>60274530
>>>/pol/ Casse toi sale faf.
>>
How the hell does this work? REE, I have been failing to do SICP exercises 3.23 for hours because of stupid shit like this. The concept behind the question is easy (double sided queues).

(define x (cons 1 2))
(define r (cons 1 0))
(set-car! r x)
(set-cdr! r x)
r = ((1 . 2) 1 . 2)
(set! x 0)
r = ((1 . 2) 1 . 2)

I would have expected r = (0 0)

And also

(define x (cons 1 2))
(define r (cons 1 0))
(set-car! r x)
(set-cdr! r (car r))
r = ((1 . 2) 1 . 2)
(set! x 0)
r = ((1 . 2) 1 . 2)
(set-car! r 0)
r = (0 1 . 2)

I would have expected r = (0 0) when x changed to 0. And eve after that, I would have expected r = (0 0).
>>
>>60274544
?
I don't care about france
>>
>>60274562
So don't post pic of that fascist.
>>
C
+
+
1
7 7
1 1 1
+ + +
+ + +
C C C
+ + +
+ + +
1 1 1
7 7
1
+
+
C
>>
>>60274504
If you looked at the current standard, they have extra comments there.
They talk about bits directly in the section about <stdint.h>, although those obviously aren't the standard types.
>>
What's the deal with this in scheme? Why does using set! on a null value bring an error while using set-car! doesn't?

(define x (cons '() 1))

(set! (car x) 2)

;Variable required in this context: (car x)

(set-car! x 2)
;Unspecified return value

x = (2 . 1)
>>
>>60274576
Those one's complement minimum values of signed types are disgusting.
>>
>>60274677
C supports ones complement systems though, so they kind of have to do that.
>>
>>60274684
I know but it's still disgusting.
>>
>>60274677
why?
>>
>>60274732
because of the whole -0 bullshit one's compliment brings with it I presume.
>>
>>60274753
there's only one value for 0, 0
127 is 127
128 is -127
129 is -126
255 is -1
>>
>>60273545

In sepples you can do
Foo *bar, *baz;
bar == baz; // compare identity/location
*bar == *baz // compare equality/value


Overloading == in Java wouldn't be overloading, it would be overriding. It'd actually be pretty awful for readers, since they no longer know if they're comparing the references or the objects' logical values.
>>
>>60274775
>128 is -127
it's -128
>>
>>60268718
The function should be called getAndClearConfirmed
>>
>>60274775
That's two's compliment anon.
Better read up on your basics :^)
https://en.wikipedia.org/wiki/Ones%27_complement
>>
>>60274753
C says that (for integers) the only way to make a negative zero (for implementations that support them) is to use bitwise operations or using another negative zero.
>>
I'm working on implementing sorts, if I'm sorting a list in ascending order but I want all 0's to be placed at the end of the list how would I go about this?
>>
>>60274970
Just have zero compare "greater than" everything in your sorting function, and they will turn up at the end.
>>
I'm trying to cut out the individual panels of a comic strip, I've already detected the panels themselves using openCV but how do i go about cutting them out?
>>
>replace companies entire custom wrappers of std::string that casted & copied to char with boost
>its basically like calling boost functions now
>you can taste the performance gains
These people are overpaid to sit there and write basic functions, they aren't even good writers. Who else has seen this (and where?)
>>
New thread:
>>60275035
>>60275035
>>60275035
>>
>>60275004
for i in array.len() - 1 {
for j in array.len() - 1 - i {
if array[j] == 0 {
swap
else if array[j] < array[j+1]
swap }
}
}

not him but like this? this is a bubble sort.
>>
>>60275057
Pretty much.
>>
>>60274559
>(se!t x 0)
The variable is a mutable cell in itself. You are making x point to 0, you aren't magically transforming the cons cell into an integer. That never happens in Scheme. Scrap your whole code off and try again.
>>
>>60274582
Because set! doesn't support that. It's just for setting variables, nothing more.
>>
>>60274568
>dont post pics i dont like you dirty fascist
I don't even care about her but you should grow up.
>>
>>60269733
>It's taken me a while to grasp but 99% off the people in CompSci come in with no prior knowledge

People go to uni to learn shit? WHO'D HAVE THUNK?
>>
>>60275833
>dude im gonna go into my career with no prior hobby knowledge lmao
Thread posts: 323
Thread images: 46


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