[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: 317
Thread images: 28

File: prog.jpg (105KB, 473x496px) Image search: [Google]
prog.jpg
105KB, 473x496px
Old thread: >>61792971

What are you working on, /g/?
>>
>>61799317
Why's she still angry?
>>
>>61799349
because you post here and you haven't even achieved satori.
>>
Ongoing /dpt/ survey - what languages do you know?
Tick all that apply.
(Don't tick shit you _used_ to know)

http://www.strawpoll.me/13656540
Lisp = Common Lisp
Sorry for languages I missed
>>
>>61799317
Why does D suck again?
>>
>>61799381
GC
>>
>>61799392
what the fuck, D is a garbage (collecting) language?
>>
>>61799442
Yeah. You can turn it off but then everything you write is a minefield.
>>
>>61799359
How do I achieve that
>>
>>61799317
hey guise, I am learning how to administrate wangblows with PS. Am I basically a programmer now?
>>
>>61799457
start by reading SICP
>>
>>61799547
I can't read
>>
>>61799449
>then everything you write is a minefield.
Not really, youll just get told you cant use XYZ.
>>
>>61799502
Powershell is neat, but no
>>
>>61799392
didn't stop Java from dominating the software world
>>
>>61799619
Java has a good GC.
>>
>>61799556
You can also watch the lectures by Hal Abelson and THE SUSSMAN
>>
>>61799624
>cant even turn it off and on
>good
>>
Noob here, bumbling around in Netbeans (Java). I accidentally clicked F7 instead of F6 when I was going to execute code and the UI flashed, a debugger appeared and I don't know how to fix it. Any better way than to relaunch Netbeans?
>>
Going through SICP
>>
In C11, is it possible to convert the absolute value of long long into unsigned long long without invoking UB? llabs may invoke UB without any prior warning.
>>
>>61799976
Can't you do some bit manipulation if nothing else? The negative sign is represented by the highest bit, afaik. Copy every other bit and you'll have the absolute value
>>
>>61800057
>The negative sign is represented by the highest bit, afaik
You're thinking of floats. Integers are 2's complement
>>
>>61800099
>Integers are 2's complement
Explain
>>
>>61800099
>Integers are 2's complement
yeah exactly in which case the highest bit is the sign
>>
>>61800123
topmost bit takes the value of -2^(n-1)
>>
>>61800123
invert the digits, add 1 to switch signs
>>
>>61800130
Yeah, my bad. Anyway, this is not the solution since long longs are not guaranteed to have 64 bits, they may have 900 bits for example.

I'm looking for a standard-compliant solution, and I don't think there is one. I think standard allows char to be in range [-1000000; 127].
>>
File: 1483829514331.jpg (74KB, 763x757px) Image search: [Google]
1483829514331.jpg
74KB, 763x757px
reminder that the computer was invented in nazi germany

https://en.wikipedia.org/wiki/Z3_(computer)
>>
File: Capture.png (4KB, 817x46px) Image search: [Google]
Capture.png
4KB, 817x46px
How do I make FFMPEG output the images it extracts from the video file and put it somewhere else instead of in users\Leo
>>
check em
http://ferret-lang.org/
>>
>>61799317
Going to work on enchiladas today

just two evening meetings first because fucking timezones and working for Americans from EU

maybe continue reading Haskell High Performance Programming® book
>>
>>61800173
>Anyway, this is not the solution since long longs are not guaranteed to have 64 bits, they may have 900 bits for example.
Is that an issue? Can't you determine the actual size with sizeof?
>>
>>61800211
This is more of a theoretical issue. I want to find out if there is a way to do what I want
in C without invoking UB. If this was a practical issue, I would be using Python.
>>
>>61800246
sizeof is in C, surely
>>
>>61800262
And where does it state that sizeof reports the actual number of bits used? sizeof(long double) reports 16, when only 80 bits are actually used.
>>
>>61800201
cd <directory>
>>
>>61800282
I see.
>>
>>61800287
how would I change this? I want the outputted files to go to a different disk which is disk D:
>>
File: s.png (165KB, 1680x1050px) Image search: [Google]
s.png
165KB, 1680x1050px
>>61799317
>What are you working on, /g/?

Exploring the deepest, darkest corners of Racket
>>
>>61800201
Enjoying your h-games?
>>
>>61800313
wrong thread buddy, this isn't how to computer 101
>>
>>61800335
What do you mean?
>>
File: pathetic.jpg (24KB, 680x419px) Image search: [Google]
pathetic.jpg
24KB, 680x419px
>>61800329
>using a language without ISO standard
>>
>>61800350
t. Ragda Pundesh
>>
>>61800329
How many times do you switch font and color scheme on a day?
>>
>>61800370
False. Pajeets like you can't exactly define what they're programming. I do.
>>
>>61800370
>still using a language without ISO standard
>>
File: 1458780613244.jpg (25KB, 704x528px) Image search: [Google]
1458780613244.jpg
25KB, 704x528px
>>61800350
>implying racket will ever have more than one implementation.
>>
>>61800402
randomized every time i type a character
>>
>>61800350
This. ISLISP is the only LISP worth getting into.
>>
I'm still looking for a job.
So far: 2 recruiters and 2 job offers in 2 days.
The job offers are meh, so I'll be sending my CV to a bunch of companies.
>>
File: sides.jpg (101KB, 768x926px) Image search: [Google]
sides.jpg
101KB, 768x926px
>>61799976
>>61800057
>>61800099
>>61800123
>>61800130
>>61800135
>>61800141
>>61800173
>>61800211
>>61800246
>>61800262
>>61800282
>>61800301

AHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHA

CFAGS CAN'T EVEN CONVERT AN ABSOLUTE VALUE OF SIGNED TYPE INTO UNSIGNED TYPE WITHOUT INVOKING UNDEFINED BEHAVIOUR IN THE CURRENT YEAR

MY FUCKING SIDES, HAHAHAHAHAHAHAHA. ENJOY YOUR WORTHLESS PIECE OF SHIT LANGUAGE
>>
>>61800564
post CV
>>
>>61800201
 ffmpeg -i animu.mkv /some/dir/animu%05d.png
>>
File: original.jpg (122KB, 600x776px) Image search: [Google]
original.jpg
122KB, 600x776px
>>61800694
>>
>>61800629
t. butthurt rustfag
long long int x = -1;
unsigned long long int y = (unsigned long long int) x < 0 ? -x : x
>>
>>61800201
It's almost as if the output param was a path... you fucking retard.
>>
>>61800737
https://www.youtube.com/watch?v=-JhwxTen6yA
>>
File: 2017-08-08-202628_1366x768_scrot.png (139KB, 1366x768px) Image search: [Google]
2017-08-08-202628_1366x768_scrot.png
139KB, 1366x768px
>>61800737
ULLONG_MAX IS NOT GUARANTEED TO BE GREATER OR EQUAL THAN NEGATIVE LLONG_MIN

HAHA FUCKING RETARD, YOU DON'T EVEN KNOW YOUR ANCIENT FUCKING LANGUAGE
>>
>>61800795
>stopwatch.c
nice falseflagging retard
>>
>>61800313
D:
>>
>>61799317
anybody here use Chez Scheme? how does it compare to writing in Common Lisp? I'm thinking about making the transition since it seems more modernized and I'm expecting some eventual support in enterprise software at some point. I love CL but I'm getting really tired of hearing I'm old school :(
>>
>>61800329
>>61800463
can you please answer me here:
>>61770279
about what font and scheme was this?

I really dig it
>>
File: s.png (231KB, 1680x1050px) Image search: [Google]
s.png
231KB, 1680x1050px
>>61800863
this is the pic that I meant to post
>>
>>61800848
Chez Scheme is an implementation of R6RS Scheme. If you want to be cool, go for Racket.
>>
>>61800885
Racket's implementation seemed a little lack luster compared to the performance of Chez and SBCL, is there any feature or reason it's a better idea to check out?
>>
send help >>61800717
>>61800717
>>61800717
>>
>>61799317
looking for responses

https://paste.ofcode.org/rnCXcaySWQmPfxXpBveitG
>>
>>61800924
Racket is slow. In fact, Lisps in general are slow.
You shouldn't pick a Lisp for its performance.
>>
    .global    _start
.text
str: .ascii "Hello world!\n"
_start:
mov $1, %rax
mov $1, %rdi
mov $str, %rsi
mov $13, %rdx
syscall
mov $60, %rax
mov $0, %rdi
syscall
>>
File: 1502079108495.jpg (96KB, 500x444px) Image search: [Google]
1502079108495.jpg
96KB, 500x444px
>>61800629
>>61800795
Lambda A.Calculus sempai, when did you stop telling gois to READ DA STANDARD and turn to bash C instead?
>>
>>61800937
it's SQL man it's like what, 20 keywords and it's basically english in it's syntax? Learn UPDATE/WHERE SELECT/FROM and how to JOIN/INNERJOIN

think of a Btree like you're a cook in a kitchen and you're looking for a recipe in your cookbook. You start at the top level by A-Z and then keep going to the left or right depending on what you want Aa-Am , etc
>>
>>61800966
Definitely used to be the case, SBCL performs better than most Python pplications I have though. If I put SBCL in LXC it still runs really well. The level of performance I need to acheive isn't like something running on embedded hardware I can deal with layers of abstraction and I'm not tight on resources.
>>
>>61800880
the font is fantasque sans mono
the theme is brin
https://emacsthemes.com/themes/brin-theme.html
>>
>>61800848
Chez was a crazy fast implementation of R5RS back in the day, but since it was closed source no one knows how it did that. Chicken was pretty close to Chez in term of performance though but Chez was reigning as the fastest Scheme. Compared to those two Racket was an embarassment given how many people were behind its development.
I don't know about R6RS Chez.
>>
>>61800848
the next major version of Racket will be implemented on chez-scheme so i presume is must be quite good.
>>
>>61800975
>Lambda A.Calculus
What is this?
>>
>>61801041
A particular RETOID
If you got OP's pic you would know who he is too.
>>
>>61801032
ah thats interesting, I saw that it was only recently made open source but I believe much of it's documentation is still proprietary x_x. heading in the right direction I suppose.

>>61801036
I will have to check it out, I have to account for a few lisps at my job so i'm not a disciple to any one implementation
>>
>>61801020
thanks man
>>
>>61801056
Whatever, I'm sticking with the standard. Turns out <stdint.h> alleviates my burden and brings more structure and specifications to the table.
>>
>>61801068
also, chez scheme has been bought by Cisco for more than $1 000 000 and is now open source.
>>
>>61801032
No one uses R6RS. R6RS was completely skipped over.

It's either R5RS or R7RS, but R7RS is so new.
>>
>>61801113
hmmmm, I wonder what the reasoning for the purchase was. Maybe they want to implement some sort of DSL for routing or something?
>>
>>61799317
fnct sum_mult(k:int, n:int) -> int $ (p=k/n)(q=p*(++p)/2) ; return (q*n) ?
total:int as 0 += sum_mult(N, _2) with _2 in range (_2=3,5,15);
>>
>>61801032
>Compared to those two Racket was an embarassment given how many people were behind its development.
What? Chicken is know for being one of the slowest implementations of scheme

https://ecraven.github.io/r7rs-benchmarks/benchmark.html
>>
>>61801140
disgusting
>>
>>61801128
it's not rare that a company buy another one not for its products but for its patents.
>>
>>61801171
>disgusting
Are you allergic to good code, my dear sire?
>>
>>61801196
literally what language is that?
Please dont tell me its sepples
>>
>>61801170
I said "was". I don't know how they currently are anymore because I haven't been involved with Scheme since 2013.
>>
>>61801196
I'm allergic to languages out of C family, or as I like to call them, the brown languages
>>
>>61801226
>C family
you mean Algol family?
>>
>>61801212
In-house language, created by some retarded faggot with his head so far up his ass that he found the old creators of AS3
>>
File: thinkpython2.jpg (32KB, 250x328px) Image search: [Google]
thinkpython2.jpg
32KB, 250x328px
I will start learning python in 5 minutes, is this the best book/pdf for python ?
Pic related
>>
>>61801243
Yes.
>>
>>61801170
>>61801218
Also
>R7RS benchmark
Chicken's author was anal about anything beyond R5RS for as long as I can remember so it even surprises me that he did an R7RS implementation at all.
>>
>>61801212
>>61801246
Tl;dr Functional ActionScript woth pointers and macros
>>
>>61801312
>Functional ActionScript
but why
>>
>>61801326
Thats the real question, ain't it
>>
File: 2017-08-08-200031_371847230.png (165KB, 1348x1010px) Image search: [Google]
2017-08-08-200031_371847230.png
165KB, 1348x1010px
what the fukk C and C++ is aids I just want to import and build a few functions

g++ -o looloo mainloop.cpp common/loadShader.cpp main.cpp -L/usr/lib64/ -lglfw -lGLEW -lGL
In file included from mainloop.cpp:7:0:
common/loadShader.cpp: In function ‘GLuint LoadShaders(const char*, const char*)’:
common/loadShader.cpp:8:3: error: ‘string’ is not a member of ‘std’
std::string VertexShaderCode;
^~~
common/loadShader.cpp:9:3: error: ‘ifstream’ is not a member of ‘std’
std::ifstream VertexShaderStream(vertex_file_path, std::ios::in);
^~~
common/loadShader.cpp:10:6: error: ‘VertexShaderStream’ was not declared in this scope
if(VertexShaderStream.is_open()){
^~~~~~~~~~~~~~~~~~
common/loadShader.cpp:11:5: error: ‘string’ is not a member of ‘std’
std::string Line = "";
^~~
common/loadShader.cpp:12:39: error: ‘Line’ was not declared in this scope
while(getline(VertexShaderStream, Line))
^~~~
common/loadShader.cpp:13:7: error: ‘VertexShaderCode’ was not declared in this scope
VertexShaderCode += "\n" + Line;
^~~~~~~~~~~~~~~~
common/loadShader.cpp:22:3: error: ‘string’ is not a mem
>>
>>61801170
>>61801218
>>61801308
After actually checking out the benchmark, I think maybe you got confused chicken (the compiler) with chickencsi (the interpreter), because chicken's performance there isn't really that bad. It's quite average and not among the best anymore, but certainly still nowhere close to "one of the slowest implementations"
>>
>>61801357
You need to include the libraries you use, anon.
>>
>>61801170
If you actually look at the data chicken does decently on pretty much all the tests.

The scoring favors being exceptional though and chicken is exceptional in no tests.
>>
File: 1502144027874.jpg (5KB, 159x159px) Image search: [Google]
1502144027874.jpg
5KB, 159x159px
Clean up that mess you call code.
>>
>>61801394
I-I'm trying, it's not mine
>>
File: stdint.png (346KB, 1366x768px) Image search: [Google]
stdint.png
346KB, 1366x768px
holy shit I found the holy grail
>2's complement guaranteed
>fixed width guaranteed
>will predictably not compile on machines that don't have them
>is IN the standard, not "how gcc does it"

FUCK. YES.
>>
>>61801375
I thought I did

I have a main.cpp that includes mainloop.cpp and calls the run() function in mainloop.cpp.

mainloop.cpp includes a common/loadShader.cpp which is a pile of trashy boilerplate

it built with my library inclusions before I started trying to add loadShader

this language just feels like such a mess
>>
>>61801513
>I have a .cpp that includes a .cpp
Yeah, you really have no idea what you're doing.
>>
>>61801513
>this language just feels like such a mess
Because it doesnt have modules. header/src are absolute pantsu on head retarded. Thats why every half-decent modern lang has one ext for its src files.
>>
>>61801500
So this is what autism looks like
>>
>>61801380
>>61801374
Still I couldn't help but wonder what went wrong? Did the other implementations simply just catch up with and surpass Chicken, or the Chicken guys just don't have the sparks in them anymore?
>>
>>61801546
>>61801529
do I really have to use cmake and end up with a clusterfuck of a directory structure
>>
>>61801694
no, just include headers like you're supposed to
go learn C++ you have no idea what you're doing
>>
>>61801694
technically no.
But for big projects youre going to want to. Unless you use an IDE like code blocks
>>
>>61801685
Chicken was originally written by one guy and it shows. I've tried reading the chicken source code. It's fucking unreadable. The guy does not comment ANYTHING. With one exception. He'll put ;XXX comments on pieces of code he doesn't like, but no explanation of why the ;XXX is deserved. Because of that, there's no clear way to learn how the source code works and It's not clear where to find different components.

As such, there's only a few contributors to Chicken.
>>
>>61800967
>A
>T
>&
>T
>>
>>61801633
This is not autism. This is a healthy pursuit of strict standard conformance.
>>
>>61801822
Syntax is the least relevant part of a language.
>>
>>61801822
>liking NASM
>>
>>61801881
Doesn't mean you can't pick the version that's not a total eyesore
>>
>>61801929
Once you get used to AT&T you see no difference with Intel syntax.
>>
>>61801513
Please read a book, anon.

Throwing shit around and hoping it works is what Pajeets do. The aftermath is just shit everywhere.
>>
>>61801952
>extra % for no reason
>>
>>61801980
I did that when I was 17 with C++ and wondered why can't I make a simple pong game. Then I went for C and now I know why can't I make a simple pong game.
>>
File: 1501346107291.png (372KB, 954x768px) Image search: [Google]
1501346107291.png
372KB, 954x768px
>>61801500
Do people not do that?
>>
File: Untitled.png (16KB, 929x288px) Image search: [Google]
Untitled.png
16KB, 929x288px
Javabeginner. What to do? It doesn't seem to output the result of the calculation.
>>
>>61802074
Some people might be interested in machines in which int is 35.4 bits.
>>
>>61802146
lrn2concatenate
>>
>>61802146
You need to add a + between the string and 4.0. What you are trying to do is calculate the result and combine it with the pi symbol. You need to use a plus symbol to combine strings.
>>
>>61802146
why doesnt java throw an error that youre missing a comma?
>>
>>61802177
>You need to add a + between the string and 4.0. What you are trying to do is calculate the result and combine it with the pi symbol. You need to use a plus symbol to combine strings.
Shit, is Java that easy? Why are you guys throwing bad rap on it again?
>>
>>61802183
where
>>
File: 1500935859859.jpg (60KB, 512x512px) Image search: [Google]
1500935859859.jpg
60KB, 512x512px
>>61802155
Wow quantum computers are already out?
>>
>>61802177
>You need to use a plus symbol to combine strings.
I see, thanks, it worked.
>>
>>61802220
" pie = " 4.0
>>
>>61802222
They do exist though.
>>
>>61802207
>
>>61802222
Nice quads
>>
>>61802248
There is no missing comma there
>>
>>61802269
>>61777777
>>
>>61802271
Heresy
>>
>>61802297
There is a missing concatenation
But there is no missing comma


you faggot
>>
>>61801987
Just don't look at them.
>>
>>61802183
>>61802248
It would throw an error even with a comma because println only takes one argument.

His IDE is probably somehow squashing the error or running an older version without compiling. Netbeans likes to do that sometimes.

>>61802207
I really can't tell wheter you're trolling or not.

>>61802227
Another tip: Try to avoid long statements like that, they tend to be really hard to read.
>>
>>61802327
well that was more my point, it needs to be one or the other so an error should be thrown. Silent failing is fucking cancer.
>>
>>61802260
Not in a funtional form yet
>>
>>61802350
I wish your body would silently fail due to fucking cancer
>>
This may sound like a dumb question but is it worth adding threads to java app? Or is it all just automated and I shouldn't bother
>>
>>61802362
https://www.dwavesys.com/quantum-computing
>>
>>61802362
It can compute things, so it's functional.
>>
>tfw you take the functional pill
>haskell is easier to program in than any other language
gaze into the iris
>>
>>61802347
I'm not, I write in C. I have never written a single line of Java. I have seen the horrors you can achieve with C++ though.
>>
>>61802396
threads dont happen automatically. everything is single threaded by default. counter-intutively, adding threads can slow things down so only add them if you need them.
>>
>>61802461
>I have seen the horrors you can achieve with C++ though.
Imagine those same horrors, but exacerbated and without benefits.
Welcome to Java.
>>
>>61802450
>tfw stuck in the brainlet mindset and still struggle with basic functional equivalents
>>
Nothing to fucking do at work all day holy shit just sitting here playing doom
>>
File: Untitled.png (2KB, 413x44px) Image search: [Google]
Untitled.png
2KB, 413x44px
>>61802347
>Another tip: Try to avoid long statements like that, they tend to be really hard to read.
Thanks and I agree but how do I best avoid a long statement in this situation? Just cut it up like pic related? Stupid question I guess.
>>
It's 2017. Can we pls have better C now?
>Vala is too tangled with Glib.
>ec is OOP.
>objective-c has GC
>>
>>61802547
Holy C you heathen
>>
>>61802526
Yea, one operation per line, optimally. Unless you're starting to run out of new lines.
>>
>>61802506
Invest time in improving yourself instead of playing shitty games.
>>
>>61802526
If you're using a particular algorithm to calculate pi here, break it up into a method or two.
>>
>>61802555
>only existing compiler runs on operating system that does not run on any real hardware
>>
I graduated from a good university with a good GPA but didn't have any internships. I want to contribute to open source projects to bolster my resume.

What are good beginner ones that I can contribute to? Preferably C++/Python.
>>
>>61802461
Yeah well you woudn't like it as a C developer though. If you concencate strings with + it'll either concencate while compiling, use String::concat to concencate or generate a StringBuilder object which combines strings. Which one will happen with your code? Only way to find out is to go through the bytecode.

>>61802526
Use variables
double result = ...;
System.out.println("pi = " + result);
>>
>>61802547
It's coming, but slowly. I mean, C20. It will be just like now, but slightly better. Just like C99 was better than C89. Just like C11 is better than C99.
>>
>>61802595
>+ results in either that or that or that
What, there's no standard to clarify that?
>>
>>61802599
>glibc still doesn't support C11 threads
What's the point if you have to compiler extension and custom build preprocessor to have any decent features.
>>
>>61802599
>c20
>not c22
>>
>>61802626
>What's the point if you have to compiler extension and custom build preprocessor to have any decent features.
You can link to a C11 compliant library (tinycthread), fuck with path variables to include it like <threads.h>, link to appropriate libraries and pretend it's cool.

>>61802638
Yeah, I mixed it up.
>>
>>61800198
Wrong. Keep fantasizing, /pol/.
https://en.wikipedia.org/wiki/Antikythera_mechanism - Invented by greek buttfuckers.
https://en.wikipedia.org/wiki/Analytical_Engine - Invented by britbong buttfucker charles babbage and it's first compiler was a stupid female.
https://en.wikipedia.org/wiki/Torpedo_Data_Computer - Invented by Freedom to fire missiles at Nazis.
>>
>>61800350
>caring about standards
MS pls go
>>
>>61802721
But microsoft is the one who doesn't care about standards...
>>
>>61802693
(((who))) could be behind this post
>>
>>61802733
Microsoft is the one who makes the standards.
>>
>>61802623
The compiler tries do detect which method works best and apply it, there's no gurantee about which method it'll actually use. That's just how java was designed; pajeets can write simple lines of code and it'll run fast because the compiler and JRE do magic tricks behind the scenes.

And your code will get optimized further by JIT while it is running, so even bytecode analysis won't really reveal what happens under the hood.
>>
Trying to get SDL installed and have some probably dumb questions.
When I have the libsdl2-2.0 package installed, how do I start using it from there? I'm not entirely sure how to use libraries in my projects when they're installed.
>>
>>61802743
>facts = jews
gb2 your containment board, brown 'aryan'.
>>
>>61802762
Z3 was the first working computer in the modern sense of what a computer is
>>
>>61802744
Nope. It's ISO.
>>
>>61802777
The Nazis invented some good stuff but not this particular stuff.
>>
>>61802450
>not using Functional OOP
You have yet to attain true mastery
>>
>tfw bored and #haskell is slow

what do
>>
>>61802793
>hurr durr
https://www.inverse.com/article/15542-konrad-zuse-s-z3-the-world-s-first-programmable-computer-was-unveiled-75-years-ago
>>
>>61802761
#include <SDL2/SDL.h>

in your source.
-lSDL2
in your compiler flags
>>
>>61802823
Why do you need to falsely claim stuff?
Programming was around before then.
Did the Nazis contribute to it, both with Z3 and by creating a code to be cracked? Clearly.
Did the Nazis invent programming? No.
>>
>>61802777
Wrong. You've got to draw the line in a really specific spot to get the Z3.

The first computer in the modern sense of the word, being electronic, digital, and programmable, would be this:
https://en.wikipedia.org/wiki/Colossus_computer
It was used to rape Nazis.

The Z3 is not a significant enough stepping stone to be called the first computer.
>>
>>61802870
>>61802852
>>>/pol/
dumb jews
>>
>>61802890
>if you dont think everything was invented by the nazis ur a jew!!!
Well I think you're a jew anon
>>
>>61802870
> although it was programmed by switches and plugs and not by a stored program.

not sure that constitutes "modern" desu
>>
>>61802852
fucking retard i'm talking about the physical computer not programming in theory

>>61802870
>https://en.wikipedia.org/wiki/Colossus_computer
not turing complete
>>
>>61802848
Thanks.
So a compilation would be something like:
g++ -ISDL2 test.cpp
?
>>
>>61802890
Facts are clearly the work of the Jews.
>>
>>61802914
Would you believe me if I told you that George Soros, notorious Jew, is running an organisation that is developing an OFFICIAL FACT CHECKER (TM) for the UK Government to "detect fake news"?
>>
>>61802914
your """"facts"""" are insane leftist mental gymnastics
>>
>>61802907
g++ -lSDL2 test.cpp
>>
>>61802898
The Z3 used film. If you want terminal computers, they came about after the Third Reich had fallen.

>>61802899
>not turing complete
Neither was the Z3, nor any piece of computer hardware. The Z3 is only supposed to be 'in principal' turing complete. Turing completeness was invented by an Englishman though, and that Englishman was a faggot. Glad to know /pol/'s definition of computer revolves around a gay englishman best known for raping Nazi's shitty crypto.

>>61802926
What does that have to do with the conversation?
>>61802927
No, they're just facts, samefag.
>>
>>61802587
Reading web security stuff now oppa
>>
>>61802984
I just thought it was an interesting development, soon in the UK, Facts™ will quite literally be a work of the jews, or a jew

This is all a diversion though, lets get back to programming
>>
>>61802592
>has degree (maybe in csc related field)
>asks for spoon feeding easy projects to contribute to
>>
>>61802984
>samefag
i don't think that means what you think it means

shill
>>
Programming is an incredibly degrading job that offers 0 job security and is the vocation most plagued by ageism by a far margin. You are not respected at any normal company. Every day, some Alpha who probably does nothing at his job except get his secretary to suck his dick in his corner office cucks you into doing random bitch work, and then yells at you when it's not done by the deadline despite it being impossible to complete the work requested. Not only that, the code rarely works, your co-workers are Indians brought in by Tata Consultancy who will replace you for half the salary and you have to train them to get your $500 severence, and the work never, ever ends. You pollute your body with the caffeinenated jew, deprive it of sleep, and let it rot while you sit the majority of the day, neglecting any healthy exercise, social interaction or life goal attainment.

It's like a postal worker, but coupled with feelings of loneliness, helplessness and total hopelessness. Programmers are too depressed to go postal, a sad state of affairs. After dentists, programmers have the highest rates of mental disorders-- depression and suicide.

It gets worse. Women, when they hear you are a programmer, instantly reject you. It is far better to tell a woman you are on welfare than to out yourself as a computer programmer. It's highly embarrassing for a woman to associate with a programmer, as everyone knows they are the grown up version of the hopeless virgin in high school. One who never really grew up and became normal and fit into society, but rather found an environment where he could escape the reality of his situation and be invisible, able to hide the toxic shame and utter humiliation that is the programmer.

Programming's father, Alan Turing, killed himself with cyanide because he was a programmer. Programmers, why haven't you taken the cyanide pill and quit programming and turned to a respectable and productive profession to better society?
>>
I'm preparing for my first C# junior developer/internship interview. What can I expect? What questions? Tasks?
>>
>>61803025
>i don't think that means what you think it means
>>>/r/eddit
>>
>>61803025
It means you and the last guy I responded to are obviously the same person, newfag. How are you confused about that?
>>
>>61803040
>Women, when they hear you are a programmer, instantly reject you

Depends. In my country women associate it with very high salary.
>>
>>61803057
>>61803057
>you and the last guy I responded to are obviously the same person
that's not even the case, and that's not what samefag means, kill yourself newfag
>>
class Demo.HelloWorld : GLib.Object {

public static int main(string[] args) {

stdout.printf("Hello, World\n");

return 0;
}
}

eww
>>
>>61803071
Yes it is, kek. That's exactly what samefag means. Tell me what you think samefag means.
>>
>>61803090
a samefag is someone who pretends to be two different people. i never pretended to be more than one person and i didn't reply to any post more than once. KILL YOURSELF RETARDED SHILL
>>
>>61803040
>Women, when they hear you are a programmer, instantly reject you.

Maybe you're just fat and ugly?

Find a girl who's not shallow enough to judge you on your profession. Programming is a fun job. Just don't be a fucking sperglord
>>
http://www.computerhistory.org/fellowawards/hall/konrad-zuse/
>Konrad Zuse
>1999 Fellow
>For his invention of the first program-controlled, electromechanical, digital computer and the first high-level programming language, "Plankalkul."

really makes you think
>>
>>61803040
>Every day, some Alpha who probably does nothing at his job except get his secretary to suck his dick in his corner office cucks you into doing random bitch work, and then yells at you when it's not done by the deadline despite it being impossible to complete the work requested
You've just described almost every job anon. Congratulations!
>>
so working in android studio and keep getting a "cannot resolve symbol" error whenever I try to access methods in a class I just made.
the class isn't private or anything, and even if i manually import it it still doesn't link up.

any ideas?
>>
>>61803247
Hey just wanted to let you know

The Nazis lost because the retards in Germany put their faith in a syphilitic freak and were too much of whiners to actually take responsibility for their actions. That generation of Germans were the ultimate entitlement generation. They literally killed 10 million people because they were such a fucking "participation award" generation. Got their asses whooped by a bunch of starved Russians and superior Anglos in England and USA.

Hold on to you "history" there: it won't change the fact that Germany WASN'T everyone else's bitch for like a total of 30 seconds in global history
>>
>>61802526
use Math.PI
>>
>>61799372
>no perl
>>
In SICP, section 2.33, why isn't the intersection-set procedure implemented like this (in the unordered list part):

(define (intersection-set set1 set2)
(filter (lambda (x) (element-of-set? x set2)) set1))


basically for those that haven't read it this is supposed to create a set (implemented as unordered lists) of only the elements that are presents in two given sets. In the book it is implemented like this:

(define (intersection-set set1 set2)
(cond ((or (null? set1) (null? set2))
'())
((element-of-set? (car set1) set2)
(cons (car set1)
(intersection-set (cdr set1)
set2)))
(else (intersection-set (cdr set1)
set2))))


what's the advantage of the second solution?
>>
>>61803438
There's no real advantage really outside of the fact that the book's implementation can skip construction and return null instantly if set2 is null.
>>
File: 1446737342826.png (113KB, 1302x892px) Image search: [Google]
1446737342826.png
113KB, 1302x892px
>>61803306
>superior Anglos
>>
>>61803533
I see, thanks.
>>
>>61803438
second solution has a smaller complexity.
>>
File: programming wat.jpg (118KB, 663x960px) Image search: [Google]
programming wat.jpg
118KB, 663x960px
>>61799317
daily reminder
>>
File: 1498866208019.png (717KB, 1000x793px) Image search: [Google]
1498866208019.png
717KB, 1000x793px
>>
File: knife.jpg (21KB, 493x257px) Image search: [Google]
knife.jpg
21KB, 493x257px
>>
>>61801694
No, just stop being fucking retarded.
include <string>. It's obvious by the error message.
>>
>>61803670
bongistani's arent anglos, theyre pakis
>>
>>61803576
only because of this >>61803533 or anything more significant?
>>
>>61803438
It'll be obvious why the book doesn't use filter as it optimizes intersection-set.
>>
>>61803739
depends how filter is implemented actually. if filter is tail call recursive, then is O(N * 2). if, like the second solution, it's not tail recursive, then it's O(N). (of coures, i am not counting the complexity of element-of-set?)
>>
I'm confused.

Python 2
Python 3

Which do I use
>>
>>61803987
clojure
>>
>>61803987
python 3
>>
>>61803987
neither
>>
>>61803987
3
>>
I just paid someone on Fiverr to do a University project for me I couldn't do because I haven't studied enough C and I left it way too close to the deadline.

Am I as degenerate as I feel about this, /g/?
>>
>>61803987
python2
>>
>>61803987
3
>>
>>61804019
Yes.

But I should look into doing stuff like this.
>>
>>61804031
Honestly, you should. It's the first time I've done it and as shit as it felt, the entire process was very streamlined. 10/10. I might do it too, just not for C.
>>
>>61803998
>>61804009
>>61804010
>>61804024
>>61804030

Even for low level numpy scipy data crunching stuff?

Cool. I got a little thrown off by the fact everything is 2 by default. Linux. "python" instead of "python3", Pycharm defaults to 2. People say 2 has better support. Etc etc.

What a clusterfuck.
>>
>>61804019
Yeah. Because now when you get out of college and into the real world of working you won't have the experience necessary to do a good job.

It's like paying someone else to lift weights for you and hoping that nobody at the gym realizes you can't actually lift 100 lbs.
>>
>>61804063
Neither. Learn perl 6 or C
>>
>>61804063
2 has better support for NOW, but over time more and more people will start to use 3 until it becomes the standard for Py. May as well just get ahead of the curve as use it now. The difference is pretty much negligible anyway.
>>
>>61804081
Would I be less degenerate if I completed the project another time for myself after the deadline? I just simply didn't leave myself enough time for a satisfactory grade.
>>
>>61804046
I mean doing the projects, but whatever.
>>
>>61804115
That's acceptable. However, learning to keep to a schedule is also essential, anon. Don't do this again.
>>
>>61804115
How complicated is the project?
>>
>>61804117
Yeah, that's what I meant too. It was shit to request work from someone else but it was so easy I'll probably sell my services for other languages.

>>61804136
Honestly, not even that hard, I'm just not practiced enough in C to get it done by the deadline. I know I'd have to utilize structs, a large linked list, and at least one sorting algorithm - plus on top of that memory allocation always trips me up.

>>61804134
Thanks dad. I won't let it happen again.
>>
>>61804115

you wont
>>
in python is better to do
from urllib2 import urlopen
from urllib2 import Request


or use

import urllib2
...
urllib2.urlopen()
urllib2.Request()
>>
>>61804199
barf

but the first one
>>
>>61804199
generally the latter is better, however for small files the first is ok to reduce typing.
also if you use the first one do this instead:
from urllib2 import urlopen, Request
>>
>>61804199
from urllib2 import ( 
urlopen,
Request,
...,
)
>>
>>61804199
The second is better to distinguish local vs imported functions, and adheres to PEP8. Suppose you have existing code with urlopen() - the first would create a conflict
>>
>>61804268
didn't know you could do this

nice
>>
>>61804286
>. Suppose you have existing code with urlopen() - the first would create a conflict

you're not gonna create a function with the same name as one of the modules
>>
speaking of efficient python
>http://gawron.sdsu.edu/compling/course_core/python_intro/intro_lecture_files/fastpython.html
>inb4 >efficient python
>>
>>61804327
>python
>>
>>61804311
No, you can, if the module is added later on in development. And
modulename.function()
implies relation with the module, while just
function()
could be anything.
>>
>>61804368
you're right.
>>
File: 1435433811218.png (19KB, 571x448px) Image search: [Google]
1435433811218.png
19KB, 571x448px
>>61799317
>What are you working on, /g/?
ONE THOUSAND UNFINISHED PROJECTS
>>
>>61804465
Tell me about your favorite one, anon.
>>
>>61804199
Unrelated to your question but consider using requests instead of urllib.
>>
>>61804531
yeah i use requests, but at the time i didn't have requests for python 2 only python 3
and i only had urllib2 in python 2
>>
I'm sitting staring at awful code and I know I have to refactor all this but I just don't want to.
>>
>>61804572
Refactoring awful code made by Bulgarians or Chinese people is so nice.
>>
>>61804572
You don't find refactoring fun?

I pretend it's a big un-obfuscation puzzle. That makes it much more palatable.
>>
>>61804526
Seedbox/torrent management tool
copies and moves torrents between seedboxes directly (like FXP)

It works but it's unpolished and command-line only
>>
>>61804616
>copies and moves torrents between seedboxes directly
Can't you just use rsync for that, and then add the torrents via commandline client?
>>
>>61804676
Requires SSH access between the seedboxes = breaks isolation
Doesn't easily handle cross-seeded torrents (same content with artificially altered infohash)

My solution uses a local tracker and temporary torrents to transfer data between clients. The tool connects to each seedbox via SSH and sets up a reverse tunnel to the local tracker
>>
>>61804764
That actual sounds pretty convenient, I'd use it.
>>
How can you check if g++ is compiling C++11? And how do you make it use 11 if it isn't already?
>>
>>61804858
-std=c++11 and __cplusplus macro
>>
My C program currently allocates about 1 MB of memory with malloc() during its run, but does not free the memory. Will that block of memory stay unusable until I restart the computer?
>>
>>61804965
The OS most likely deallocates every page when the process stops, so no.

Using free() would be good practice though
>>
>>61799317
I made this a while ago.

    float f_atan(float x)
{
int i3, i5, i7 = (*(int*)&x);

i3 = i3*3 - 0x7EF47AE1;
i5 = i5*5 - 0xFDE8F5C3;
i7 = i7*7 - 0x7CDD70A4;

x = x - (0.333f * (*(float*)&i3)) + (0.2f * (*(float*)&i5)) - (0.1428 * (*(float*)&i7));
return x;
}
>>
>>61804965
The kernel deals with it, but you should free() everything you malloc(), even if you use the memory for the program's entire run time as despite the fact that it's not technically an issue, it can create noise that makes locating real memory leaks harder.
>>
File: 1461071554933.jpg (33KB, 359x473px) Image search: [Google]
1461071554933.jpg
33KB, 359x473px
>AI Class Final on Friday
>Have 300 pages of dense reading to get caught up on
What do
>>
>>61805090
Take back the course and try not to fuck it up by actually doing your work next time
>>
>>61805119
>Implying I'm going to waste 5000 to drop this class
>Implying the drop deadline hasn't already passed
I got an A on the first mid term and I've gotten As on all the other assignments. I literally just need to cheese this one final and I'll probably get an A.

How do I into motivation to study?
>>
>>61805090
Read really really fast
>>
>>61805194
You rethink your life choice if you're spending 5000$ on something you have no motivation to put any work into.
>>
File: enough.jpg (63KB, 500x600px) Image search: [Google]
enough.jpg
63KB, 500x600px
>>61805230
>No motivation for one assignment = no motivation for CS
It's the last week of class for summer, sorry that I'm tired of constant schoolwork. That doesn't mean I didn't put work into all the other assignments I got A's on. Are you autistic? I hate people who extrapolate so goddamn hard.
>>
>>61805010
i prefer ryzen.
>>
>>61805403
What?

This post doesn't make any sense.
>>
>>61805090

Either read 100 pages a day and have a light understanding of everything. Reread the most important/difficult parts on Friday before the test.

Or read the most important chapters/sections, have a stronger understanding there, and almost none for everything else.

Also if someone you know has made a review, try to grab a copy off of them and maybe(?) offer to buy them lunch for it.
>>
whats the difference and similarities between c# and java?
i already know java
>>
>>61799636
I can't read because I have no eyes
>>
I need to learn Java relatively fast because of my classes. Could anyone recommend me a good resource?
>>
>>61805579
In one of them, you take microsoft's dick, and in the other you take oracle's dick.
>>
>
    const int & value() const { return a; }

What does the second "const" imply?
>>
>>61799317
What do you guys think of this?
https://www.securecoding.cert.org/confluence/display/c/API04-C.+Provide+a+consistent+and+usable+error-checking+mechanism

tl;dr:

int func(args..., type *output_var)


also:
>The greatest disadvantage of this approach is that it prevents functions from returning any other value. Consequently, all values (other than the status) returned by a function must be returned as a pass-by-reference parameter, preventing a programmer from nesting function calls. This trade-off is necessary because nesting function calls can conflict with a programmer's willingness to check status codes.
>>
I just bought pic related. Gonna finally learn C.
>>
>>61805688
means this function does not modify the object.
>>
>>61805752
malloc a pointer
>>
>>61805752
No you're not. It's going to collect dust on your shelf
>>
Flask SQLAlchemy class "Test" table gives me objects instead of values.

id |   name
---------------
1 | test1
---------------
2 | test2
---------------
3 | test3


Test.query.all()

[<main.Test at 0x7f5715bb7400>,
<main.Test at 0x7f5715bb7748>,
<main.Test at 0x7f5715bb7358>]


Wat do?
>>
>>61805864
].collect::<dust>();
>>
>>61799317
nodejs thermostat. with logging and graphing. using rpi.
>>
>>61805752
>buying books in 2017
>buying C books ever
>learning C
you're not gonn make it
>>
>>61805864
>>61806005
I'm actually trying. It's pretty fun.
>>
>>61805864
It's like 200 pages, you can read it in an afternoon
>>
Dictionary is a tuple with key and value
Whats the thing that have only keys? hash?
whats the object in c#
>>
>>61805905

i think those are the pointer addresses?? in java what you have to do is access whats in the object like object.id to actually get what you want
>>
New thread: >>61806259
>>
>>61806269
>307 replies
No, fuck off.
>>
>>61806269
So early and so desperate.
>>
>>61806300
>>61806292
310 now faggot google shills
>>
>>61806307
It doesn't matter. The thread was created before 310, so it's invalid. Delete it.
>>
>>61806269
rape urself
>>
>>61806313
fag
>>
Real new thread:
>>61806360
>>61806360
>>61806360
>>
Real new thread:
>>61799317
>>61799317
>>61799317
>>
Real new thread:
>>61803495
>>61803495
>>61803495
Thread posts: 317
Thread images: 28


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