[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: 392
Thread images: 43

File: dpt_flat.png (102KB, 1000x1071px) Image search: [Google]
dpt_flat.png
102KB, 1000x1071px
Old thread: >>61108019

What are you working on, /g/?
>>
This one has double numbers and was a post earlier. I usually post in /wdg/ but I think they're sick of me and want me to drop what I have and fuck off.

Almost finished my web framework, it runs JavaScript templating libraries in c# so all you have to do is pass the constructor a filename and an anonymous object for the templating libraries input object. I told myself it's done when I can no longer see any bugs since at this stage most bugs require obscure test conditions which I don't have a hope of finding.

Currently faster than react.net and asp.net mvc, implements every JavaScript templating library that's popular here besides razor (I personally don't like it) and vue (hard dependency on node.js).
>>
first for javascript
>>
File: cirno penguin.png (471KB, 778x962px) Image search: [Google]
cirno penguin.png
471KB, 778x962px
Why was the other thread deleted?
>>
>>61114866
learning scheme; going through sicp

(define integrate
(lambda (f a b step)
(integral-helper f a b step)))

(define integral-helper
(lambda (f n b step)
(if (or (< b n) (= b n))
0
(+ (* (f n) step) (integral-helper f (+ n step) b step)))))

(integrate (lambda (x) (* x x)) 0 4 0.0001)
>>
>>61115003
it was a second too late
>>
File: 1496198005995.png (127KB, 601x508px) Image search: [Google]
1496198005995.png
127KB, 601x508px
Today my programming professor told me multiple if statements were faster and take less processing power than using if-else if-else etc. I'm almost certain he's wrong for seemingly obvious reasons, but I need reassurance.
>>
File: netrunner s.png (91KB, 1356x300px) Image search: [Google]
netrunner s.png
91KB, 1356x300px
>>61114866
We are making a web browser! >>61078788

You are welcome to join.
Channel on Rizon: #/g/netrunner
>>
>>61115008
isn't this code beautiful?
>>
>>61115036
No he's right.
That's why he's the professor and you're the student.
>>
>>61115046
(no .)
>>
File: yukari_sneeze.png (60KB, 295x200px) Image search: [Google]
yukari_sneeze.png
60KB, 295x200px
>>61115008
>those lisp brackets
Where are the elegant braces and semicolons?
>>
Are pathfinding algorithms "hard" to implement, or am I just retarded?
>>
>>61115008
is it true that lisp implementations have no real operators?

How the fuck do you add 2 numbers and implement the (+ function?
>>
>>61115057
They shouldn't be.
>>
>>61115036
if-else if-else is probably a nanosecond faster; does it really matter?
>>
>>61115043
I'd like to help but it seems everything "/g/" makes turns into some reddit clusterfuck after a few months, can I get reassurance that no redditors are working or will be allowed to work on the project?
>>
>>61115043
Do you guys have even a single line of code written yet?
>>
>>61115043
>not megumeme
dropped
>>
>>61115036
for i in range(i, 10000000): 
print ( "if (i == %d) {" % i )
print ( "printf(\"\%d\", %d )" % i )
print ( " } " )

compile and run, compare to else if equivalent, post results im interested
>>
To respond to >>61102276 from yesterday:

Sure, that's a great idea, but the intangibles usually don't end up having as much of an impact to people as money in my experience. I'm not trying to say it shouldn't happen, I'm just trying to explain the occurrence of why people aren't joining unions.
>>
>>61115036
>>61115051
probably depends on the language and compiler, but any good compiler will optimize away any difference.
>>
>>61115055
I like both desu. Either one can get a little boring after a while. I come from C/C++ so lisp to me is still completely new and exciting.
>>
>>61115105
enjoy blowing out your instruction cache
>>
>>61115070
My code is always perfect so he pulls comments like that all the time on me to take off points, I'm not sure why, maybe he's jealous
>>
if (...)
(do something)
elif (...)
(do something)
else
(bla bla bla)


So in a situation like this, does it make sense to put the most common condition up at the top ('if'), the second most common in second place ('elif') and the least common at the end ('else') to save the machine some work? I'm asking about Python specifically but any language in general as well. Does it make a difference? Does the compiler (in compiled languages, of course) know how to optimize this? Are there any tools that check for this kind of thing?
>>
Should I bother with blogging some project to build up my portfolio or it is a meme?
>>
>>61115061
LISP has primitive operators.

(+ 2 3)
>5

(+ 1 2 3 4 5)
>15
>>
>>61115036
Depends. if-else if-else should be faster at best, the same at worst, at least on modern compilers.

If you're comparing some variable between if statements, and it's sensible to prove it hasn't changed (e.g. it's not a reference), the code output will probably end up being the same.
>>
>>61115036
What do you mean multiple if statements as being equivalent to multiple if else statements?

>>61115107
Compilers optimize for instruction cache too

>>61115117
Yeah, if the first statement evaluates to true, it won't evaluate the rest of the conditionals


>>61115128
Worked for me
>>
>>61115117
yes. The computer goes through if/elif/else in order and stops when one of the conditions is met. Hence the more probable conditions should go first
>>
>>61115117
The compiler cant optimize the order. For example, imagine:

if ( launch_the_missiles() )  { // launch_the_missles() returns true if successful  
print("They ded");
} elif ( getChar() == 'y') {
retry();
} else {
print (" we ded");
}
the order of the if statements is very important and its impossible to change the order without changing the program semantics.
>>
Give it to me straight, /dpt/. Should I use C++ or Rust for new games?
>>
>>61115171
C
>>
>>61115171
javascript
>>
>>61115156
in some rare cases, the evaluation time might vary greatly. for example, if one involves reading from file or makign an http call. in those cases putting the less common but quicker evaluation first would make more sense
>>
>>61115176
No

>>61115182
No
>>
>>61115117
No, it actually depends. For example, if the most common is a costly function call, putting it first will result in a slowdown than putting it last, where it doesn't need to be checked. This may already be obvious to you, though. And in a
if..and...
statement, you obviously want the least costly to come first.
>>
>>61115171
Definitely C.
>>
>>61115171
Depends on the game. Indie games are quite popular so Unity/C# is an option.
>>
>>61115190
just use short circuit evaluation dummy
>>
>>61115171
C++, unless you want to be a game engine dev too. Rust's game engines just realistically aren't ready for use yet.
>>
File: gun.webm (1MB, 512x512px) Image search: [Google]
gun.webm
1MB, 512x512px
Feels good man
>>
>>61115171
rust is for systems programming, not application programming
>>
I'm in love with sicp. Help me /g/

(define (sqrt x)
(define (sqrt-iter guess x)
(if (good-enough? guess x)
guess
(sqrt-iter (improve guess x) x)))
(define (improve guess x)
(average guess (/ x guess)))
(define (average x y)
(/ (+ x y) 2))
(define (good-enough? guess x)
(< (abs (- (square guess) x)) 0.001))
(define (square n)
(* n n))
(sqrt-iter 1.0 x))
>>
>>61115151
>>61115156
>>61115159

Right, thanks. So are there any tools (linters, I don't know, something) that check and optimize this once the code is running?

Let's say I have a large codebase with multiple if-elif-else cases, some of them with multiple options, is there any bit of software out there that tracks the user input or whatever data I run through it, and optimizes the order of the if-else's?
>>
>>61115193
that's what he's talking about.
>>
>>61115229
no, as I said optimizing the order of if-else is impossible in general because it changes program semantics
>>
>>61115171
C++
>>
>>61115191
I'm tired of doing RAII by hand.

>>61115192
Unity is way too heavyweight for the games I want to make. Also I don't want to use an OOP language like C#
>>
>2017
>developers unironically make applications with undo/redo implemented as a fucking 1D data structure

time and time again, emacs gets it right. History and undo/redo should be a tree, and going through every revision and branch in your file's history is necessary. Anything else is silly.

Why are people still making this mistake, decades later?
>>
>>61115185
That's a good point. I didn't think of that.
>>
>>61115249
What is RAII by hand?
>>
>>61115229
you could look at the machine code (just skim it, taking note of the length); you could put break points in your IDE; you could run a bunch of unit tests to get some idea of expected performance
>>
>>61115241
I get it, on some cases the order of execution is relevant. But in other cases, where the if-else are just "pick A, B or C", I guess where the if-else resembles more a switch case, things could be optimized without altering the program, right? So wouldn't it be cool to have some bit of code that logs frequency and processing time of the if-else options and then made suggestions to optimize?
>>
File: disappointed.jpg (100KB, 450x539px) Image search: [Google]
disappointed.jpg
100KB, 450x539px
Fuck my life. I'm trying to use the Ruby net/http library but it doesn't fucking work.
require 'net/http'
require 'resolv'

http = Net::HTTP.new("www.wikipedia.org", 80)
puts http.get('/')


It keeps giving me an error.

/usr/lib/ruby/2.3.0/net/http.rb:882:in `rescue in block in connect': Failed to open TCP connection to www.wikipedia.org:80 (getaddrinfo: Name or service not known) (SocketError)
from /usr/lib/ruby/2.3.0/net/http.rb:879:in `block in connect'
from /usr/lib/ruby/2.3.0/timeout.rb:91:in `block in timeout'
from /usr/lib/ruby/2.3.0/timeout.rb:101:in `timeout'
from /usr/lib/ruby/2.3.0/net/http.rb:878:in `connect'
from /usr/lib/ruby/2.3.0/net/http.rb:863:in `do_start'
from /usr/lib/ruby/2.3.0/net/http.rb:852:in `start'
from /usr/lib/ruby/2.3.0/net/http.rb:1398:in `request'
from /usr/lib/ruby/2.3.0/net/http.rb:1156:in `get'
from scraper.rb:5:in `<main>'


I tried searching this shit but I can't figure out how to fix it. I don't use a firewall or anything.
>>
File: 1433814882191.png (327KB, 495x498px) Image search: [Google]
1433814882191.png
327KB, 495x498px
>>61115271
>IDE
>>
>>61115288
>http://www.wikipedia.org
>>
>>61115263
What do you think it is?
>>
>>61115291
> not using xcode on a mac
>>
>>61115271
I know this can all be done by hand, my question is, isn't there some code that does this automatically? Not maybe actually optimize it for you (change the code for you) but simply point out all the places that could be potentially optimized this way. Because again, in small codebases it's easy to do it by hand, but not when the code starts growing.
>>
>>61115283
stop worrying about negligible optimizations, they don't matter. pick the right architecture, the right data structures, and the right algorithms. worry about the limiting behaviors, not the order of conditionals
>>
>>61115283
>code that logs frequency and processing time of the if-else options and then made suggestions to optimize?

This would be really easy to write into your software if you care that much...
>>
>>61115254
>and going through every revision and branch in your file's history is necessary
How do you choose which branch to go down? What does vim use?
>>
>>61115301
>a vulkanless platform
S H I T
H
I
T
>>
>>61115294
Doesn't change a thing.

/usr/lib/ruby/2.3.0/net/http.rb:882:in `rescue in block in connect': Failed to open TCP connection to http://www.wikipedia.org:80 (getaddrinfo: Name or service not known) (SocketError)
from /usr/lib/ruby/2.3.0/net/http.rb:879:in `block in connect'
from /usr/lib/ruby/2.3.0/timeout.rb:91:in `block in timeout'
from /usr/lib/ruby/2.3.0/timeout.rb:101:in `timeout'
from /usr/lib/ruby/2.3.0/net/http.rb:878:in `connect'
from /usr/lib/ruby/2.3.0/net/http.rb:863:in `do_start'
from /usr/lib/ruby/2.3.0/net/http.rb:852:in `start'
from /usr/lib/ruby/2.3.0/net/http.rb:1398:in `request'
from /usr/lib/ruby/2.3.0/net/http.rb:1156:in `get'
from scraper.rb:5:in `<main>'
>>
>>61115300
RAII denotes an object wiping its own ass when it goes out of scope....

If you have to wipe an object's ass for it, it's not RAII....?

Unless you just mean implementing copy constructor and all of that.
>>
>>61115341
try without port 80
god why am I trying I dont use in Rudy
>>
>>61115358
What port would I use?
>>
>>61115307
I'm just a dumb freshman trying to come up with a cool little project for my intro to comp sci course. I want something not written into my own code, but just an add-on, or maybe a wrapper or something, that people can fork and deploy into their own code. Even if it is a negligible improvement, it's just about the theoretical improvement. I don't want to code a silly blogging platform for my final project, that's all.
>>
File: 1498615923951.png (407KB, 498x496px) Image search: [Google]
1498615923951.png
407KB, 498x496px
you see this shit???

what the FUCK

computer science was a mistake
>>
>>61115364
docs indicate you dont need a port
https://docs.ruby-lang.org/en/2.0.0/Net/HTTP.html

>>61115374
you have autism, you're gonna go far lad
>>
I have 2 days to learn C to what I can pass off as a professional level. I'm coming from a background in Pajeet-tier managed languages.

What do?
>>
>>61115391
Still doesn't work...

/usr/lib/ruby/2.3.0/net/http.rb:882:in `rescue in block in connect': Failed to open TCP connection to http://www.wikipedia.org:80 (getaddrinfo: Name or service not known) (SocketError)
from /usr/lib/ruby/2.3.0/net/http.rb:879:in `block in connect'
from /usr/lib/ruby/2.3.0/timeout.rb:91:in `block in timeout'
from /usr/lib/ruby/2.3.0/timeout.rb:101:in `timeout'
from /usr/lib/ruby/2.3.0/net/http.rb:878:in `connect'
from /usr/lib/ruby/2.3.0/net/http.rb:863:in `do_start'
from /usr/lib/ruby/2.3.0/net/http.rb:852:in `start'
from /usr/lib/ruby/2.3.0/net/http.rb:1398:in `request'
from /usr/lib/ruby/2.3.0/net/http.rb:1156:in `get'
from scraper.rb:5:in `<main>'
>>
>>61115391
>you have autism, you're gonna go far lad

lol thanks, that's the first time anyone's diagnosed me with autism. I'm gonna call my mom and tell her
>>
>>61115400
walk into the interview in a dress, claim you're non--binary conforming
you'll get the job immediately

afterwards, you can slowly stop dressing like a woman and claim it was just a phase
>>
>>61115374
Then start writing. Can you get your program to start recording the desired statistics using print statements? Then go from there.
>>
Working on my 3d loli MMORPG

what are some essential 3d effects in your opinion like tesselation? I want it to look as realistic and high quality as possible
>>
File: optimus prime.jpg (12KB, 251x201px) Image search: [Google]
optimus prime.jpg
12KB, 251x201px
So let's say I put my autistic urge to optimize if-else's to the side for a moment, what's a good source to learn about code optimization? I'm interested specifically in optimizing based on user input, if that makes any sense.
>>
>>61115424
>3d loli MMORPG
>I want it to look as realistic and high quality as possible
Are you rolling your own engine?
Start with PBR.
>>
>>61115452
Yes, I decided to skip libraries like Three.JS and go with an optimized engine instead. And thank you for the tip.
>>
>>61115440
optimization is a dark art, as you can tell by the angry responses on /dpt/. iry a bunch of things and see what's fastest. i dont have much advice beyond that
>>
>>61115469
>optimization is a dark art

>https://en.wikipedia.org/wiki/Multi-armed_bandit
There's many frameworks for studying resource optimization, so it shouldn't be too hard to treat processing time as a resource and apply some of these frameworks, crunch some numbers and get a result. I don't get the whole commotion.
>>
File: 1498515152429.gif (954KB, 500x332px) Image search: [Google]
1498515152429.gif
954KB, 500x332px
I started learning programming a few weeks ago. I'm thinking of programming a basic 5x5 game of checkers to conclude the 1st chapter of SICP.

Should I use C or Scheme ? I'm as much of a begginer at both.
>>
>>61115653
Lisp is not beginner friendly, especially for actual programs. start with c desu.
>>
>>61115440
I guess this article here is sort of what I was looking for, or at least headed in the right direction:

>http://igoro.com/archive/fast-and-slow-if-statements-branch-prediction-in-modern-processors/

anybody got more stuff like this?
>>
>>61115631
I dont know what your wikipedia link is supposed to prove. The multi-armed bandit problem is a massive annoyance in machine learning and optimization in general.
>>
File: example.png (146KB, 960x540px) Image search: [Google]
example.png
146KB, 960x540px
> Pic related
Making balances and tweaks to my upcoming android puzzle game.
>>
File: gl.png (316KB, 1891x1304px) Image search: [Google]
gl.png
316KB, 1891x1304px
Why does this have to be so difficult? I still don't understand modern core profile. Would it be better to use the same rectangle and just transform it a bunch of times to create other rectangles, or is it better to have each as its own entry with its own coordinates in the the array? And also I still need a lot of work to understand how to use glm to transform and get ortho setup so the rectangles can have their own coordinates and map that
>>
>>61115777
read the opengl bible you fool.
>>
File: ncurses.png (14KB, 1140x142px) Image search: [Google]
ncurses.png
14KB, 1140x142px
Trying to compile ncurses 6.0 from source on Ubuntu. Any clue why it'd give an error like this? I'm guessing there's not actually a typo.

I'm not all that familiar with this compiling from source stuff. I downloaded the source, ran ./configure, then ran make. Is there something else I'm supposed to do, like downloading dependencies or something? Documentation seems to assume that end users know what they're doing.
>>
>>61115852
Nevermind, fixed it, had to set some flags was all. Still confused as fuck by the magic involved.
>>
>>61115772
Where did you get the sprites from?
>>
>>61115852
>Documentation seems to assume that end users know what they're doing.
Well yes, that's the sort of person who would be compiling from source.
>>
File: 2017-06-27_22-15-31.jpg (225KB, 1136x818px) Image search: [Google]
2017-06-27_22-15-31.jpg
225KB, 1136x818px
>what are you working on

this

I think I worked more on its flashyness than anything
>>
File: poodr.jpg (44KB, 335x499px) Image search: [Google]
poodr.jpg
44KB, 335x499px
am just about to finish pic related tomorrow
suggest me a new book to read, /g/
>>
File: Mrpeabody.jpg (16KB, 350x350px) Image search: [Google]
Mrpeabody.jpg
16KB, 350x350px
When I came in here I took not at the activity, the pattern somewhat indicates that my post may have had something to do with the lack of activity after its submission >>61115936
I can't help but dismiss this feeling. This is quite the demotivating experience.
>>
>>61115852
> ran ./configure, then ran make
if this doesn't work i just stop trying
>>
Can I compile a C program to use two version of the same library?
>>
>>61116537
Sort of. But why would you want to do that?
>>
>>61115288

I use a Gem called HTTParty for most of my HTTP requests. Has great utility to help form the exact response/request body you need.

Also, accessing Wikipedia from port 80 produces a timeout when I try in the browser. Remove the port and you should get the proper HTML response. The docs for Net::HTTP seem to say that passing port is an option, so you should be able to omit it.

If you use HTTParty, you should be able to do something like this:

require 'HTTParty'

response = HTTParty.get("https://www.wikipedia.org")
# response.body => <body> Some HTML from Wikipedia </body>
>>
>>61116571
I need to use multiple versions of the same library but I want everything in a single file
>>
>>61116623
>need to use multiple versions of the same library
Why?
>>
Is there something better than a hashmap here that I can use? Seems like assigning a key value is a waste.

    //prints the common elements between 2 arrays 
public static void printCommonElements(int a[], int b[]) {
Map<Integer, Integer> map = new HashMap<Integer, Integer>();

for(int i = 0;i < a.length;i++) {
map.put(a[i], i);
}
for(int i = 0;i < b.length;i++) {
if(map.containsKey(b[i])) {
System.out.printf("%d ", b[i]);
map.remove(b[i]);
}
}
System.out.println();
}
>>
>>61116636
Well the output is different for the two versions. In general I need the output returned by the same function but from different versions of the library. I'm not really sure what options are available to me in C
>>
Anyone know anything about WebGL performance optimizations? SIMD friendly ones particularly
>>
>>61116680
You're going to need to manually open the library yourself, and load the functions.
void *old = dlopen("somelib.1.so", RTLD_LAZY | RTLD_LOCAL);
void *new = dlopen("somelib.2.so", RTLD_LAZY | RTLD_LOCAL);

void (*old_fn)(int, int) = (void(*)(int, int))dlsym(old, "some_function");
void (*new_fn)(int, int) = (void(*)(int, int))dlsym(old, "some_function");

old_fn(1, 2);
new_fn(1, 2);

or whatever.
>>
>>61116676
you could use HashSet
>>
>>61116749
Actually, maybe you need RTLD_DEEPBIND.
I don't really know; I haven't tested it.
>>
>>61116749
>>61116782
Damn anon thank you that is so simple.

Will I pick these things up and know the best way to solve a problem as I continue programming?
>>
File: thinking2.png (5KB, 139x157px) Image search: [Google]
thinking2.png
5KB, 139x157px
>>61116795
No. You will be dependent on /dpt/ for everything
>>
>>61116858
that or stack overflow
>>
File: 1467522483272.png (194KB, 520x423px) Image search: [Google]
1467522483272.png
194KB, 520x423px
What do yall use to create flashy GUIs for you application?

Am I still living in 2000 late and caring about this?

I like my GUIs to be pretty and enticing. I find that a lot of videogames have these kinda of things but i never see it in the normal application world.

I'm referring to any general programming language, script even

I've heard that some antivirus engines UIs use some sciter dll, UI library to render UIs in HTML/CSS like electron but without the gigantic 1GB memory overhead, 11mb PE file and the stripped down chromium which is essentially an operating system inside another operating system
>>
>>61116932
I'm not a game developer and I've never used unity3d or any other 3d engine, but I would imagine that that is your best starting point. Most games are going to be using something like that or they've rolled there own. Also, I didn't misunderstand you, I know you're trying to build GUIs, my suggestion is to look into using stuff like unity3d to build your GUI.
>>
>>61117064
otherwise you'd probably be best off with electron.js. I'm not sure if you mean something like the GUI in leagues of legends or stuff like photoshop. if you mean like photoshop maybe something like this https://github.com/vurtun/nuklear can help?
>>
File: space_0.jpg (1019KB, 1500x1129px) Image search: [Google]
space_0.jpg
1019KB, 1500x1129px
>>61117064
I understood you well, it's in line with my question which is drunkenly asking what game library or such might most ppl use to create fancy GUIs. I'm just kinda surprised at how/why people don't take that path more often for normal GUI development.

I like how a lot of game UI stuff looks like, elite dangerous for example. wonders why others don't create more interesting and attractive UIs for things more often
>>
this is actually fucking scary.

>>61111871

After staring at it for 5 minutes, I was positive the answer was 1. This morning, after reading the example for 5 seconds, it was obvious it was not.

This is why you don't program at 4am.
>>
>>61117083
>nuklear

holy shit that's amazing
>>
>>61115074
No idea what you mean but people is cool
>>61115079
Yes
>>
>>61115171
Rust
>>
>>61115440
Read a book about computer architecture, if they are any good, they'll have chapters on cahche and branching optimlaization as thos are the most significant ones
>>
SDL_IsGameController() always returns false. Regardless if using a current or older version of SDL2 (regardless of compiled personally or not).

Using windows 8.1 x64 and an Xbox 360 Controller.

I see that it is registered as a joystick, but I do not want to use it as a joystick.

A google search shows me a few posts here and there of others with the same issue, but I never see a resolve.

Any one else with this problem?
>>
>>61117788 nice
Use sfml instead
>>
>>61117849
I'll consider it for a future project, but I can't switch for this one
>>
>>61117788
post code lad
But yeah, SFML is superior desu. Even if its C++ oriented. Most things just werk
>>
File: 1478119070025.jpg (154KB, 1280x720px) Image search: [Google]
1478119070025.jpg
154KB, 1280x720px
>You will never create a language as good as C++
>>
File: file.png (34KB, 813x149px) Image search: [Google]
file.png
34KB, 813x149px
uh, t-thanks i guess...
>>
>>61117974
video game achievements were a mistake.
>>
File: 1494737320571.jpg (151KB, 1920x1080px) Image search: [Google]
1494737320571.jpg
151KB, 1920x1080px
>>61117956
But that's a good thing, anon. We have enough shit languages.
>>
>>61117956
Java will always be the king of programming languages.
>>
>>61118090
t. pajeet
>>
>>61118101
I am anglo.
>>
>>61118121
I dont believe anyone of anything, who actively endorse Pajeetware
>>
>>61118132
It's too bad for you. Java is objectively the most popular language in the world.
>>
>>61118121
Angl*s are pure pajeets.
>>
>>61118141
so is js
>>
>>61118160
This is incorrect. Javascript is less popular than Java.
>>
>>61118177
How is it possible for a language to be less popular than itself?
>>
>>61118210
Multiverse theory
>>
File: Capture.png (153KB, 947x1132px) Image search: [Google]
Capture.png
153KB, 947x1132px
>>61118177
http://githut.info/
no
>>
>>61118229
Rust confirmed for DOA
>>
File: 1456007784488.gif (18KB, 340x340px) Image search: [Google]
1456007784488.gif
18KB, 340x340px
>>61118229
Check out that long term trend on D.
Deadlang confirmed.
>>
>>61118314
D is slow and steady.
>>
>>61117956
>You will never fix C++
>>
>>61118328
It's clearly receding, idiot.
>>
>>61118339
That sites data is also 3 years old.
>>
>>61118353
I have no reason to believe the trend will change.
>>
>>61118229
So the language to learn is JS. Got it.
>>
File: Capture.png (104KB, 734x680px) Image search: [Google]
Capture.png
104KB, 734x680px
>>61118362
im trying to find more current data.
on a related note
Hasklet B T F O
>>
>>61115008
(define integrate
(lambda (f a b step)
(integral-helper f a b step)))

(define integral-helper
(lambda (f n b step)
(if (or (< b n) (= b n))
0
(+ (* (f n) step) (integral-helper f (+ n step) b step)))))

(define where-did-all-the-hamburger-helper-go
(lambda ()
"buuuuuuuurrp"))
>>
>>61118390
(if (or (< b n) (= b n))

(if (<= b n)
>>
>>61115008
protip you can also define functions like this:
(define (function-name . arguments) . body)

example:
(define (f x y) (+ x y))
(display (f 1 2)) ;; 3

in common lisp it's actually important to use its equivalent syntax (defun, or labels at local scope) instead of lambdas whenever possible because that ensures you can take the greatest possible advantage of static compilation
it might be different in scheme though
>>
>>61118439
you missed the point
>>
>>61118390
you are eating us out of house and home
gARMfIELD
>>
Reminder that C++ is the best language even though it's ugly and dirty. Java is also quite good even though it's even more disgusting.
Reminder that real programming is never pretty and clean.
Reminder that real programming is functional, object-oriented, imperative, AND declarative, and uses recursion AND iteration, and there's no rhyme or reason, nor any other kind of decency, as to what's used when for what.
Reminder that if you don't hate your code, hate the language you work with, hate your boss, and hate your life, you're almost certainly not making anything useful.
Reminder that programming is a job. Not a hobby. Not a field of study. A fucking job.
>>
>>61118681
>and there's no rhyme or reason, nor any other kind of decency, as to what's used when for what.
You use the best tool for the job, you moron.
>>
>>61118681
only sensible post i've ever read on this board
>>
>>61118689
>You use the best tool for the job, you moron.
This is a myth.
Real programming is pain.
The best tool for the job doesn't fucking matter.
You use the best compromise between efficiency and grief avoidance.
>>
>>61114959
Good job, m8.
>>
>>61118703
What if you enjoy pain?
>>
>>61115203
what is it
>>
>>61118728
Kinky.
>>
>>61118729
conway's game of life silly
>>
File: Capture du 2017-06-28 11-15-40.png (110KB, 1920x1080px) Image search: [Google]
Capture du 2017-06-28 11-15-40.png
110KB, 1920x1080px
>>61115008
I got this error when trying compiling your code on an online interpreter. Can you tell me what's wrong with it ?
>>
>>61118776
>Language: Common Lisp
This is the problem.
That code is in Scheme, not Common Lisp.
>>
File: fastbrown.gif (3MB, 139x157px) Image search: [Google]
fastbrown.gif
3MB, 139x157px
>>61116858

Here, please have some voronoi thonking with fast brownian motion.
>>
>>61118804
but why it thonk tho
>>
>>61118813

We might never know.
>>
>>61118853
OAH
>>
>>61118804
>fastbrown.gif
did you fail art class
in like
elementary school
.
.
that's yellow
>>
Implicit dereferencing is the root of all evil.
>>
File: Capture du 2017-06-28 11-33-19.png (104KB, 1920x1080px) Image search: [Google]
Capture du 2017-06-28 11-33-19.png
104KB, 1920x1080px
>>61118784
Thanks, but now I've got this issue...
>>
>>61118956
Must be a problem with the website you're using. I just tested it with MIT Scheme 9.1.1 and it works fine.
(I'm not the anon that wrote that code by the way.)
>>
>>61118926

rude baka
>>
>>61118926
>calls himself a programmer
>doesn't know brown is a shade of yellow
>>
Guys, I need advice. My university is teaching me Java, but I've only gotten to take one course in it so far. I've been studying abroad this year, so I haven't gotten to take programming classes for a while. But I'm getting antsy, and I want to learn more. The only Java reference material I have is Head First Java, which was relevant around when Java 5 was a thing. (Though I've still read it cover-to-cover, so I'm familiar at least with several concepts.) Is there any better source to teach myself Java from? Is Swing still even a thing for making GUIs? Or should I just say screw it and start learning C++?
>>
>>61118681
C++ killed programming.
>>
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0707r0.pdf

What do you think about metaclasses, friends.
>>
File: vomit.jpg (90KB, 650x650px) Image search: [Google]
vomit.jpg
90KB, 650x650px
>>61119330
>wg21
>>
File: 1498408261711.jpg (128KB, 600x1005px) Image search: [Google]
1498408261711.jpg
128KB, 600x1005px
>>61119330
>>
>>61119242
I honestly have not seen any Java book that I thought was decent. Head First Java is probably the best it gets unless you want to get a book meant as a college textbook or a book meant for passing certifications, but both of those are going to be far more formal and pedantic for just teaching yourself.

If you already know some OOP, really, just start hacking away with Java.

For C++, Stroustrup's book is probably the best way to learn C++. Yeah, it's pretty pedantic too, but really that's necessary for C++.

No reason to choose C++ or Java over the other, IMO. Just choose which one you're more interested in -- e.g. games programming, learn C++.
>>
>>61119330

I feel like this is something already done in a Lisp... but since C++ needs to have every good feature that can be possible in a language, I say go for it.
>>
>>61115777
Well it depends,
What you're referring to as taking the same rectangle and transform it it's the principle of a technique called instantiation in which instead of having many VBO with the same information you just recycle the VBO and VAO and assign it with different transformation matrices.

I recommend that if you wish to better understand how transforms and the MVP matrix works you read about linear algebra and how it is used in rendering. The appendix section in Real Time Rendering (excellent book by the way) does a very good job at this.
>>
>>61119449
That that is the exact attitude that made C++ a fucking terrible language.
>>
>>61119611
what do we have to lose at this point
>>
Is it possible to be a programmer and not be obese?
>>
C++ is the nigger of the languages, steals shit from C, steals shit from Lisp, steals shit from D and now it's stealing shit from Rust.
>>
>>61119797
Whats it stealing from Rust?
>>
>>61119805
https://news.ycombinator.com/item?id=10865119
>>
>>61119805
The proposal I linked are basically Rust's macros.
>>
>>61119797
so youre saying c++ is implementing everything good about other languages, making it the greatest language of them all?
>>
>>61119826
C++ would be good if they sat down one day and decided to clean it up with breaking changes rather than piling more shit on top.
Languages that arrive at their current shape by evolution rather than design are invariably ugly and messy.
>>
>>61119826
hacking in != implementing, pajeet
>>
>>61119826
Picking half assed good features of all language only results in unmaintainable clusterfuck and nothing else. It's not that simple.
>>
http://www.mercurynews.com/2017/02/10/tech-job-growth-slows-in-bay-area/

ahahaha get fucked javascript brainlet sjw fags
>>
>>61119836
One major selling point of C++ is that when you get a million LOC codebase, and decide you want to start using new C++ features for new code, you don't have to rewrite shit (and any shit you do have to rewrite was technically a bug in your code anyway, and even then they try to avoid breaking that).
>>
>>61119861
Backwards compatibility is a noble goal to strive for but it fucked up C++ and Java pretty bad.
>>
>>61119861
>and decide you want to start using new C++ features for new code
And confuse the developers, introduce inconsistency and sacrifice the project philosophy.

Half of the project will be completely different than the other half. Taping shit together is the worst solution imaginable.
>>
>>61119330
>makes C++ more convoluted, esoteric, and difficult to learn
> simultaneously makes it a more powerful and ergonomic
>fucks over new programmers trying to learn C++ and break into industry
>existing C++ programmers have easier job

It's perfect.
>>
>>61119860
Commiefornia tech bubble pop W H E N
>>
File: 1497305697332.png (40KB, 1620x774px) Image search: [Google]
1497305697332.png
40KB, 1620x774px
>>61119826
>>
>>61119330
fuck all this other shit and just give us modules
>>
>>61119911
C++ modules wouldnt solve anything desu.
>>
>>61119911
C++39 doesn't have this problem
>>
>>61119797

But stealing is good for programming languages.
>>
>>61119927
It's good for niggers too, what's your point?
>>
>>61119927
Stealing is good when the language can properly implement said feature. C++ cannot implement anything properly until the ISO finally decide to break things.
>>
>>61119961
this
>>
>>61119961
that will literally never happen
D had the right idea, being able to link against C and C++ while being unafraid to make plenty of breaking changes itself. It fucked up in other ways though.
>>
>>61120011
And D's attributes, which i can see C++ stealing as well.
Where did D fuck up though, minus the GC?
>>
guys I have so much trouble making stuff work and installing dependencies for python program in windows.

should I install ubuntu in dual boot? or maybe another linux OS?
>>
>>61120018
>2017
>Still using windows
>>>/v/
>>
>>61120018
Install pip, lad
>>
>>61120017
initializes ints to 0, doubles to NaN by default
>>
>>61120018
Not programming related.
>>>/g/sqt/
>>
>google libclang documentation
>get a doxygen dump instead
>>
>>61120029

what? pip comes with python
>>
>>61120017
petty shit mainly
>>
>>61120030
>He leaves his vars unitialized
You need a month in Rust. Go train yourself.
>>
>>61120025
>>61120035
>>61120047
Who are you quoting?
>>
Oh the quotefaggot is back again
>>
>>61120030
beyond disgusting

D and rust fags are delusional
>>
>>61120030
why are 0 ints bad?
nan is odd, but probably just a forgot about placeholder.

Also as the other anon said, its a non-issue if you follow good practices.
>>
>>61120030
>>61120060
Literally nothing wrong with this
>>
>>61120060
>>61120047
>>
>>61120018
I don't use windows but I read on a blog that you need to clear the python cache if you're having trouble with python dependencies:

del c:\windows\*.* python\cache\ /F /S /Q /as /ar /aa /ah


>>61120052
greentext is not just for quoting, friend.
>>
>>61120060
>autistic meltdown while he knows his language is not any better
>>
>>61120065
primitives should not be default-initialized to any value
>>
>>61120084

looks like something that would fuck up my windows installation

I dont trust this
>>
>>61120084
>greentext
I don't want reddit stink nearby. Fuck off.
>>
>>61120106
In dependently typed languages, yes.
But most imperatives dont have them so its just to skip a step of the good thing being to throw a compiler warning (really should be an error) for un-init'd vars.

I do not see the issue, desu.
>>
>>61120086
meanwhile your userbase won't be as big within a decade if ever
>>
>>61120086
>>61120052
>>
>>61120120
>he thinks greentexting comes from reddit
spotted the redditor
>>
>>61120190
Do you have problem in having a coherent conversation?
>>
>>61120017
D really just has "the wrong mix". IMO it just doesn't feel good to program in.
>>
>>61120204
>""greentexting""
A redditor denying being a redditor is logical. I don't want any reddit stink nearby. Fuck off.
>>
>>61120251
D seems overengineered, the features appear to be helpful, but it's all kind of meh.
>>
>>61120251
What makes you say that?
I felt the opposite desu, especially having come from sepples
>>
>>61120279
>>61120251
please point to specifics, I'm curious
>>
>>61120017
>>61120251
This.
D is the minivan of languages. It actually works really well for what it's meant for. It has all the safety features, it's well designed.
But you'll never feel good driving it. It will never really do what you want it to do. And it just *feels weird* to drive.
>>
>>61120329
>But you'll never feel good driving it. It will never really do what you want it to do. And it just *feels weird* to drive.
Why?
Im really curious why people feel this way.
>>
File: 7phuJaq6[1].jpg (42KB, 512x512px) Image search: [Google]
7phuJaq6[1].jpg
42KB, 512x512px
>>61120352
Is this you, Andrei.
>>
File: os2beard.jpg (56KB, 604x453px) Image search: [Google]
os2beard.jpg
56KB, 604x453px
who else unironically done used the rust in production?

meme webdev :^) reddit game
>>
>>61120418
nah, just never hear about people finding D un-intuitive /awkward/vhatever.
>>
>>61120425
your ML-bot needs more data, m8
>>
>>61120435
Help. I can't use anything but D these days
>>
>>61120464
D + Idris/Agda is all you need desu.
>>
>>61120285
>>61120297
The strings, for example. Wtf are they, even? char array? enum? They're awkward as hell to work with. It's like they tried to show off how great Ds arrays are without caring about we actually think of strings.
Then there's the whole managed/unmanaged rift. Trying to use SafeD just shows you how schizophrenic the language is regarding this, so you end up relying on trusted code far more than you should, rather than *actually* making sure everything is safe.
It's been a while so I forget most of my complaints, but while everything in D sounds great in theory, it was just uncomfy as hell.
>>
>>61120469
I have OCaml as my pet language
>>
>>61120435
>just never hear about people finding D un-intuitive /awkward/vhatever
That's because literally nobody is using it.
>>
>>61120479
>strings
Immutable char[]
>enum
They are manifest variablses. enum x = 12 is like saying #define x 12
>>
>>61120501
>Immutable char[]
how does that work? Is it implicitly a reference type?
>>
>>61120479
>The strings, for example. Wtf are they, even?
char array
Do you know about .dup/.idup,ranges and ~?
>>
>>61120501
>variablses
variables*

>>61120538
https://tour.dlang.org/tour/en/basics/alias-strings
>>
>>61120501
>>61120540
Yes, strings are immutable char[]. Now if only they actually acted like that consistently. There were several points where I had issues with Strings working like they should, then replacing "string" with "enum" in my code, as suggested by Stackoverflow, and the code magically works.

They're an unintuitive mess.
>>
>>61120575
>>61120501
>>61120540
https://stackoverflow.com/questions/29082473/whats-the-advantage-of-using-enum-string-over-string-in-d
This is what I'm talking about.
>>
>>61120594
Enums are immutable themselves, you cannot assign a different string to an enum string
enum x = "abc"
x ~= "def" //won't compile
string x = "abc"
x ~= "def" //x is now "abcdef"
Also, Enums are for ensuring that the statement is evaluted in compile time.
>>
>>61120635
This doesn't sound like an enum at all
>>
>>61120575
readup on traits if you care enough, that might make things clearer.
>>
>>61120637
Enum declarations are used to define a group of constants. They come in these forms:

Named enums, which have a name.
Anonymous enums, which do not have a name.
Manifest constants. <- You are here
>>
>What are you working on, /g/?

after a bunch of successful smaller projects i'm starting a bigger project that i'm confident i'll have no problem with but i'm proud of and the hardest part so far is literally the name. I have 10+ candidates and i'm pretty sure i already spent hours on it.

not unlike a /g/ project, except that this will actually get to an useful state
>>
>>61120635
>>61120639
Yeah, I'd really rather not. D has too many gotcha!'s like this littered all throughout the language and libraries. They might be theoretically sound, but they also feel rather arbitrary.
If D had good job prospects or some projects I was interested in working on, I'd probably care more to more deeply to understand the language and the awkwardness would probably go away.
In the meantime, D is just a distraction to being productive.
>>
Just finished a simple trigonometry calculator. I am rather surprised with how simple it is.


(define sin
(lambda (x)
(* x (trig-helper x 11 2))))

(define cos
(lambda (x)
(trig-helper x 11 1)))


(define trig-helper
(lambda (y n k)
(if (< n k) 1
(- 1 (/ (* y y (trig-helper y n (+ k 2))) k (+ k 1))))))

>>
>>61120710
>I am rather surprised with how simple it is
Enjoy Scheme while you can, every other language is pain
>>
>What are you working on, /g/?
I've got two USB stacks. They were both written by Chinks. One works on our developer hardware and our production hardware. The other works on our developer hardware, but not on our production hardware. Both are very similar, but with enough subtle differences that someone with my level of knowledge cannot tell the difference.

This product needs to be ready to go in about 2 weeks, and I have several other items to fix after USB. I am an intern, and they seem to think that I know what I am doing, despite my insistence that I do not.
>>
>>61120720
I come from a C/C++ background, so Scheme is completely new and refreshing. I've been going through sicp as well as the corresponding MIT youtube lectures. It's been a while since I've learned a new language, and I've forgotten how fun it is.
>>
File: oJ2AJGn_.jpg (32KB, 358x344px) Image search: [Google]
oJ2AJGn_.jpg
32KB, 358x344px
Help a baka out.
I have a java app that uses right now uses images from an folder at "user/[name]/NetBeansProjects/[project name]/images". This works as long as I run it from the NetBeans IDE, but what do I do if I want to run it externally?
>>
>>61120800
>be me
>take math class from weird professor
>mostly grad students, but he made an exception for me and another student he liked
>after a week or two of discussing graphs and network theory and djikstra and all that shit he gives us an assignment
>write a program to reduce a hypergraph
>week goes by
>fuck I didn't do the assignment I've only got today
>write it in scheme
>about 50 lines, including comments
>realize there's a ton of redundancy I could remove but w/e
>write a short report on it, mostly BS
>print it off and bring it in
>other students have huge long-ass C++ programs
>most of them implemented their own data structures because this teacher was a known autismo about STL
>he runs tests, shows that most of them don't even work or crash if you give them kinda complicated relationships

>>61120871
relative file location. Or include the images in the jar file
>>
>>61120871
I mean, when I need the image I pass the string with the address like "user/[name]/NetBeansProjects/[project name]/images/image.jpg" in the code, but if I change locations I am fucked. How do I get this shit in a wrapper?

Please hlp I am retarded.
>>
j-just did my calc 2 final
wish me luck
im risking failure never happened before
tfw
>>
>>61120920
package it in your jar
>>
>>61120930
Typical calc2 experience.
You'll be fine. Good chance you have to take it a second time, but that's a typical calc2 experience.
Stop giving a fuck. A C is a degree. Just get that credit and get done with it, now or later doesn't matter.
>>
>>61120897
>relative file location. Or include the images in the jar file
How does relative file location work? How do I include the images in the jar file?
>>61120936
How? I don't understand. Does making a .jar from the package automatically changes the lines of code where I have user/[name]/NetBeansProjects/[project name]/images/image.jpg" ?
What if I need to run the app on another OS, this will still work?
>>
>>61120975
you put the image in the jar
>>
File: 1476929733307.jpg (2MB, 2448x3264px) Image search: [Google]
1476929733307.jpg
2MB, 2448x3264px
experienced in C, but i want to start C++ and also start following some industry standard practices, but i want to keep using my text editor and terminal to compile.

what's a good toolchain to use?

Is G++ alright?

how do i get started with breaking my source code into modules/separate files? i have a vague idea of what header files are about, but do i need to edit a make file to get the stuff to compile, or just <include myotherfile.h>?
>>
>>61120975
https://stackoverflow.com/questions/1096398/add-image-to-jar-java
https://stackoverflow.com/questions/14209085/how-to-define-a-relative-path-in-java

google is your friend
>>
>>61120930
>>61120958
When it's time to get your job...
"So you have a BS in CS, right?"
"y-yes, b-but I failed calc2...."
"But you can code right?"
"Y-yes, b-but I failed calc2...."
"And you'll show up to work on time every day, right?"
"Y-yes, b-but I failed calc2...."
"Well, I was going to hire you, but you're being an absolute bitch about having failed calc2, so bye."
>>
>>61120958
>b-but mr interviewer, C's get degrees
>>
>>61120993
>what's a good toolchain to use?
windows. C++ is meant for windows.
>G++
use microsoft visual C++ compiler
>>
>>61120993
>Experienced in C
>Doesn't know how to use header files
are you sure m8?
>>
File: cirno_chan_by_yuuki2.jpg (376KB, 800x1066px) Image search: [Google]
cirno_chan_by_yuuki2.jpg
376KB, 800x1066px
>>61121000
Thank you putting up with a baka like me.
(Also, checked.)
>>
>>61120993
g++ or clang are best. Clang has slightly clearer error messages some time.

If you don't understand multiple source/header files in C then I'd recommend learning how to do that in C first. C++ follows similar principles. If you don't understand Makefiles for C, do that first. C++ Makefiles are no different.

Also, learn the difference between
#include <header.h>
and
#include "header.h"
>>
>>61120993
>pic
it's a she. disgusting.
>>
>>61120993
>experienced in c
>I have a vague idea of what header files are about
>what is a makefile
C++ is mostly like C in these regards....

Anyway, personally, I use clang. Error messages are much more clear.
>>
>>61121042
but if you close your eyes and pretend real hard you can pretend that she is a girl (male)
>>
File: 1497214889403.jpg (47KB, 475x530px) Image search: [Google]
1497214889403.jpg
47KB, 475x530px
>>61120993
>experienced in C
>Doesn't know about header files
Yeah, you definitely not experienced in C.
>>
>>61121091
Is that a dog?
>>
>>61121008
The bottom 80% of Employers don't give a fuck how you did in school, they're just happy to have someone who can actually code, and the bachelors degree is just to make HR happy.

The bottom 90% of employers won't give a fuck if you generally did good in college but had to retake Calc 2.

So what, you'll start out making $50-60k instead of $60-80k. It won't matter in 3-5 years, because at that point employers will literally not give a single fuck about what you did at school, but entirely about your experience and merit as a professional programmer.
>>
>>61121042
>it's a she
What makes you think so?
>>
>>61121129
higurashirin
you probably get lmgtfy'd a lot, cretin
>>
guys, I need help with gmp, C.
Assume that I have a mp_ptr ap and a corresponding mp_size_t an, and I also have a mpz_t x. I want to use mpn_ functions with this x, but as far as I understand, I need mp_ptr and mp_size_t for those. How can I export them from x? I also might need to do the reverse. I know there is mpz_export, mpz_import, mpz_limbs_write, mpz_roinit_n etc. I wasn't able to make them work.
I am however able to work with mpz_t's alone with mpz_ functions, and I can work with {ap, an} with mpn_ functions.
The reason I want to interchange between these is becase mpn_random sucks balls. I can randomize the limbs myself without using gmp functions, but I guess I should learn how to use these as well.
>>
>>61121025
>windows. C++ is meant for windows.
is this really true? it's possible to write good software for osx in C++
>>
>>61121105
you'll always be in the bottom 80% because you don't care about being better than that, regardless of work experience
>>
File: 1452471092796.png (372KB, 1280x720px) Image search: [Google]
1452471092796.png
372KB, 1280x720px
>>61121246
>Good software
>in C++
>>
>>61121246
>is this really true?
The writer of C++ book wrote demands that you use windows and winapi
>>
>>61120469
>Idris/Agda
literally who? i'm not sure i've even seen agda code in /dpt/
>>
>>61121267
b̶o̶o̶k̶
>>
>>61121247
I did shit in college because I had to work a full time job at the same time to make ends meet.
It only held me back for like 2 years after college, still got lots of offers for $50-60k in the Midwest, now no one gives a fuck because I constantly perform top tier work. Am currently being groomed for project manager and will be sent out to Chicago soon with a $120k salary.
>>
>>61120993
>experienced in C
>i have a vague idea of what header files are about
lol come the fuck on

it works the same in C++ as in C
>>
>>61121246
No, it's a complete fabrication. Windows C++ implementation is a total mess. Windows library management is a total mess. You're much better off using clang or g++.

>>61121267
Nobody cares.
>>
>>61121315
>Nobody cares.
Bjarne does.
>>
>>61121275
I mostly use idris, but i dabble in Agda from time to time. Im still a massive FPlet, so i dont want to embarrass myself.
>>
>>61121303
$120 in chicago is breaking even
>>
>>61121247
to add to this: >>61121303
also helps I'm not autistic like 70% of my coworkers. Not having aspergers gets you really far in CS.
>>
>>61121246
Bjarne (The creator of C++) actively shills windows
>>
>>61121323
yeah well i write AND compile C++ for mac and linux, guess that makes me savage af
>>
>>61121336
That just makes you a second class citizen.
>>
>>61121327
I've lived in Chicago on $15k before. It's actually a pretty cheap city as long as you stay away from the gentrified areas and don't mind living in an apartment.
>>
>>61121303
you give me hope. when you're doing what your'e good at, you want to work hard and do a good job. it all pays off
>>
>>61121343
BTFO
>>
>>61121343
ay yo hol up man that's raycis
>>
>>61120482
OCaml is worse than Shitkell though, and that's saying a lot.
>>
>>61121323
>>61121335
>Bjarne
Nobody cares
>>
>>61121472
Bjarne is the creator of C++, if that gives you an idea.
>>
>>61121323
He is not a sane person.
>>
>>61121502
You cant really blame modern c++ on him though.
>>
>>61121502
C++ is not a sane language.
>>
>>61121495
>the creator of C++
I legit wish him death.
>>
>>61121537
I wish he was never born in the first place
>>
>>61121495
I know who he is, but his opinion on operating systems doesn't matter. He doesn't actually use his shitty language for anything important, it's the rest of us who have to work with it
>>
>>61121594
I'd much rather use an equivalent language that doesn't actively shill microsoft for learning purposes.
>>
>>61121626
there is no equivalent language.
>>
>>61121594
>>61121626
>>61121635
Just use C already and stop being a stupid faggot.
>>
>>61121635
Combination of C and Rust >> Combination of C and Microsoft C++
>>
>>61121635
In terms of shittyness? Java.
>>
>>61119580
I still havent figured out how to recycle a rectangle and use transforms to specify the coordinates of the bottom of the rectangle and the top.
>>
>>61121626
The language is an open standard, Bjarne doesn't "own" it. C++ tooling is way better on *nix than Windows.

>>61121648
Stop dreaming, Rust is not suitable for anything outside of your toy projects.

>>61121644
If C had template functions and structs I would never touch C++ again.
>>
>>61121673
I won't use C++ just because it's a mediocre languge.
>>
>>61121686
language*
>>
>>61121673
Again, I'd much rather use an equivalent language that doesn't actively shill and DEMAND microsoft windows for learning purposes.
>>
>>61121709
so would I but there is none
>>
>>61121673
C has structs idiot
>>
>>61121718
read the sentence again faggot
>>
>>61121717
Oh there is, Microsoft brainwashed you enough to be in permenant denial.
>>
>>61121732
>>61121718
>>
>>61121741
>C evangelists are literally too dumb to parse a sentence correctly
Who'd have thought?
>>
Rajeesh, please go and tell your manager, /g/ is a dead-end for sepples shiling.
>>
>>61121673
Well, you know C++ is for windows when you see "the book" is written for windows users only.
Dropped.
>>
Tell me what to do, /dpt/. I want people to use my shit / shit I contribute to.
>>
>>61121745
Learn English first, rajapajeet. No bing points for you.
>>
>>61121769
Forgot link
>>61121557
>>
>>61121759
Not only that, C++ denies the core values of the Unix way.
>>
>>61121686
It has many rough edges, but there is no other language that has the same supported platforms, library availability, feature set, and developer availability

>>61121709
>>61121759
A language cannot shill. I've never read Bjarne's book, and I don't care to do so. Bjarne's book is not part of the C++ specification, and last I checked Bjarne's opinions on development platform have nothing to do with application development with a language.

>>61121718
Structs with templates.
>>
>>61121816
It's called C. Now what platform do you develop in/for? Windows? Thought so.
>>
>>61121816
>Can't read the de-facto book because his platform is treated like a second class citizen
Sad
>>
>>61121709
>DEMAND microsoft windows for learning purposes.
How? Why? When?
>>
>>61121848
The de-facto C++ book teaches you C++ by using winapi
>>
>>61121816
>It has many rough edges
full of rough edges*
>>
>>61121831
I develop mostly for ARM microcontrollers.

>>61121837
>didn't bother to read the book because he liked O'Reilly more
>>
>>61121857
Which part?
>>
>>61121897
Write from the beginnng
>>
>>61121927
right*
>>
>>61121886
>I develop mostly for ARM microcontrollers.
>>61121336
>yeah well i write AND compile C++ for mac and linux
Try harder.
>>
>tfw winapi for audio is actually kind of nice, especially compared to the clusterfuck of linux
>>
>>61115036
using a switch{} in that situation is almost certainly faster than a bunch of if/else{}'s. At runtime you are only evaluating a constant.
>>
>>61121897
>Open book
>Hmm, doesn't really say about unix setup as much
>doubt
>go down further, select a random chapter
>GUI
>(((win.wait_for_button)))
Dropped in the spot.
>>
File: not me.png (8KB, 441x131px) Image search: [Google]
not me.png
8KB, 441x131px
>>61121947
Those are two different people
>>
>>61121981
>not me
C̶l̶a̶s̶s̶i̶c̶ stale.
>>
File: 1463505133328.png (11KB, 454x132px) Image search: [Google]
1463505133328.png
11KB, 454x132px
>>61121981
explain this
>>
I need to process office docs a bit. I should C#, right?
>>
>>61122043
C# is bretty good for that. What are you trying to do with them?
>>
>>61122042
You trying to be funny?
>>
>>61122083
yes
>>
>>61121978
Hmm, he used the most widely used OS's GUI API for example code, rather than choosing the one of many GUI toolkits available on Linux. Fucking weird, right??
>>
>>61121978
I don't know, here I am with Stroustrup's "The C++ Programming Language", 4th edition. I can't even find anything about GUI programming in it. I literally only found an imaginary Window class used as an example.
>>
>>61122131
>Hmm he just shilled Microsoft without even telling the readers beforehand
12 rupees have been deposited to your Microsoft Visual C++ Evangelism Campaign, Pajeet
>>
File: 1488794529873.gif (1MB, 320x240px) Image search: [Google]
1488794529873.gif
1MB, 320x240px
>>61122131
>>
>>61122162
This, I just scrolled through the most recent edition, and can't find anything
>>
>>61122073
Nothing serious, just batch modify existing spreadsheets to another format so to say. Any advice?
>>
>>61122170
That's not what shilling is, and I'm probably whiter than you.
Visual C++ is cancer, g++ and clang clearly offer superior implementations.

>>61122282
Nah, C# is probably the most suitable tool for the job
>>
>>61122267
What I did find with some Googling was this
http://www.stroustrup.com/programming.html
Which does seem to do some GUI programming.
But it also says this:
>The book is primarily designed for people who have never programmed before, and it has been tested with many thousands of first-year university students.
Because a person that has never programmed before is expected to learn Linux on top of the beast that is C++, yeah?
But this is not THE C++ book.
>>
>>61122335
Hmm, seems like the rust shills are btfo as usual.
>>
>>61122331
>That's not what shilling is,
>I'm probably whiter than you.
Okay pajeet.
>>
>>61122363
>>61122331
post hand pics
>>
>>61122335
>But this is not THE C++ book.
This is THE C++ book though
>>
>>61122335
Rust ashils BTFO
>>
>>61122213
Wow what an ass. What did Bill ever do to anyone who's not a CEO of a large competing company?
>>
>>61122335
>>The book is primarily designed for people who have never programmed before, and it has been tested with many thousands of first-year university students.
>Because a person that has never programmed before is expected to learn Linux on top of the beast that is C++, yeah?
What did he mean by this?
>>
>no modules
>no UFCS
>still have to use header guards
>templates are a mess
>basically ruled by MS
>3 stds
>boost members double dippin as ISO members

I dont understand why anyone uses C++ for """""""""""""""""""fun""""""""""""""""""""
>>
>>61122411
The book is intended for the kind of retard that enjoys C++ and linux
>>
New thread >>61122451
New thread >>61122451
New thread >>61122451
>>
>>61122420
C++ is just for substandard C programmers.
>>
>>61122430
What kind of a retard "enjoys" C++?
>>
>>61122420
>ufcs
Why do people want this? I don't get it.
I can slightly see it if you're writing code that is basically just function calls since you get the left to right read order you wouldn't get with the normal equivalent.
But if that's an issue why not just break it into multiple lines? To me that's just as easy to read.

And C++ isn't exactly the kind of language you use when you're a code monkey who glues libraries together.
>>
>>61122483
>C++ isn't exactly the kind of language you use when you're a code monkey who glues libraries together.
AHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHHAAHA
HAHAH
AHAHAHAHAHAHAHAHAHHAHAHA
AHAHAHAHAHAHAHHAHHAHAHAHAHA
>>
>>61122471
why do you think they're called retards?
>>
>>61122483

The only difference between a static/free function and a nonvirtual member function is that the member function's this argument is implicit. This equivalence is expressed through UFCS.
>>
>>61122514
Well that's just beyond retardation.
>>
>>61122501
There's way better languages for that though. And you can usually just compile your C++ and call out to it. Makes much more sense. That's what researchers do. They work in things like python and the likes but have their underlying libraries written in C or C++.
>>61122538
Yeah you're explaining what UFCS is here sort of but this isn't what I'm asking.
>>
>>61119330
I like this but honestly most of this can be done already with clever macros.
>>
>>61119911
Planned feature for C++20
Thread posts: 392
Thread images: 43


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