[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: 29

File: restinpeace.png (187KB, 1366x768px) Image search: [Google]
restinpeace.png
187KB, 1366x768px
Free software edition

Old: >>52211127

How are you liberating the world from the shackles of NSA/Windows /g/?

http://www.gnu.org/proprietary/malware-microsoft.en.html
>>
I miss squeeze........
>>
20 POSTS TOO EARLY

WHEN WILL THIS MEME OF MAKING A THREAD SO EARLY END?
>>
>>52216265
hello /dpt/ I hope I can ask this here. I am thinking of learning how to program. I am not sure which language to start with. I am interested in C, C++ and Java. C because I like playing with the Arduino. C++ because all of the FOSS I use is in C++ (with a few in C) and Java because Android is pretty cool.

I am thinking of C++ and using the book Programming Principles and Practice using C++ as I have read it is an excellent intro to programming in general not just programming in C++.

Opinions?
>>
If I want to implement malloc, and I want to merge/defrag some blocks (because there's no single continuous free block available), perhaps using memmove, pointers pointing to that data might get invalid since the data has been moved. Do I really need a special API to access the data (i.e. I can't just dereference the pointers mymalloc() gives me)?
>>
>>52216301
Great contribution anon, thanks.
>>
File: erw.jpg (53KB, 1280x720px) Image search: [Google]
erw.jpg
53KB, 1280x720px
GPL isn't freedom.

Telling developers they can't use your code in their proprietary software is NOT freedom.

/dpt/ supports the MIT/BSD licences.

I'm shaking my head at you right now, OP.
>>
File: 111143969_35533831ab_o.jpg (334KB, 450x600px) Image search: [Google]
111143969_35533831ab_o.jpg
334KB, 450x600px
>>52216345
This OP

WTF?
>>
>>52216345
>it's fundamental that I have the freedom to take away others' freedoms to use, study, and modify my software to best suit their use case
>>
>>52216377
Cute. It would be even cuter if it were a guy though.
>>
>>52216265
why? you can do pretty much the same thing with mate and jessie
>>
I get TargetInvocationException when changing the UICulture in muh WPF application. What do /g/?
>>
>>52216377
Sexy FreeBSD girls perpetrate a culture of sexism in tech.
>>
animeposters on suicide watch
>>
File: hackedintokfc.jpg (38KB, 495x363px) Image search: [Google]
hackedintokfc.jpg
38KB, 495x363px
>>52216265
Working on making a program that will help me download some Pollo Fritto from various sites. So far I have created a Pollo Fritto object that will hold the data I steal i mean get legaly from the server. Then I created a .eat() function to consume the Pollo Fritto once it has been created on my local machine.
>>
>>52216345
So use Apache or BSD. Even Stallman says that the BSD license is "free", he just gets autistic about the whole "University of California" clause, which nobody actually uses anymore.
>>
>>52216474
Then why do feminists use FreeBSD instead of Gahnoo?
>>
File: dsd.png (799KB, 1280x720px) Image search: [Google]
dsd.png
799KB, 1280x720px
When was the last time you took a break from shitposting and actually coded something?
>>
>>52216390
>it's fundamental that I have the freedom to take away others' freedoms to use, study, and modify my software to best suit their use case
There's no taking away anyones freedom with MIT. Just with GPL.
>>
>>52216345
I am personally a fan of the WTFPL
>>
>>52216345
BSD is a cuck license anon,
>>
>>52216345

What I don't get is why can't I just copy and paste an entire GPL project, change a few variable names here and there and then publish it under BSD, claiming that I wrote the whole thing from scratch and the solution converged exactly to the GPL one because it was the most efficient one.

You could copy and paste War and Peace and change some characters names but you couldn't use the same defense because a story doesn't necessarily have to converged to the most efficient one, while a computer code does.
>>
so i wrote this in python:
TestList = [1, 2, 3, 4]
ReverseTest = TestList
j = len(TestList) - 1

for element in TestList:
ReverseTest[j] = element
j -= 1
print(ReverseTest, TestList)


and I can't for the life of me understand why the result is this:

[1, 2, 3, 1] [1, 2, 3, 1]
[1, 2, 2, 1] [1, 2, 2, 1]
[1, 2, 2, 1] [1, 2, 2, 1]
[1, 2, 2, 1] [1, 2, 2, 1]

I never assign any new values to TestList. I bet it's something really simple.
>>
>>52216306
Sure
>>
>the only reason my application exists is because I based it off of existing code that someone released to the public, but I want to keep all my code including the code I borrowed to myself
>>
>>52216561
ReverseTest and TestList are pointing to the same list
>>
Anyone have any recommendations for someone wanting to learn C++ but is already an experienced programmer in other newer languages such as C# javascript and the whole web stack?

I used to know a little bit of c++ but its been lost on me as I use C# and javascript for work everyday.

I dont want to start a book where it spends forever explaining what if statements are
>>
>>52216598
Accelerated C++ or w/e that book by Bjarne with the red cover is called
>>
>>52216585
Ah thanks. I thought it would create a new list. So to make another copy of a list i should first make a new empty list and then assign it to the same values as the old? like this:

TestList = [1, 2, 3, 4]
ReverseTest = []
ReverseTest = TestList

? Seems like there propably is a better way
>>
Reddit users loves GPL.
>>
>>52216529
Because if the program is more than 50 lines of code, it's gonna be obvious
>>
File: Eogaa.webm (3MB, 1920x1200px) Image search: [Google]
Eogaa.webm
3MB, 1920x1200px
i was working on this shit, you can take a look, test it out on your linux distro of choice

https://github.com/deviantfero/wpgtk
>>
>>52216622
It looks pretty great, thanks
>>
File: few.jpg (95KB, 676x676px) Image search: [Google]
few.jpg
95KB, 676x676px
What are you wearing, /dpt/?
>>
>>52216698
>2016
>not being a nudist
>>
>>52216646
There's a few options here, I don't know Python myself so I couldn't tell you
http://stackoverflow.com/questions/2612802/how-to-clone-or-copy-a-list-in-python
>>
>>52216698
Pajama pants and a hoodie
>>
>>52216400
why?

>>52216698
shirt and panties
>>
What possible reason could anyone ITT have to not release source code of what they're working on?

If the answer is "security through obscurity", you're naive as fuck. It doesn't work.
>>
Is java a good language to learn for a total beginner?
>>
>>52216646
Let's step through those three lines and figure out how exactly the computer would interpret your code.

TestList = [1,2,3,4]
# create a new list, and give a reference to the variable "TestList"

ReverseTest = []
# create a new (empty) list, and give a reference to the variable "ReverseTest"

ReverseTest = TestList
# overwrite the old value that "ReverseTest" had with the value of "TestList": a reference to the same list [1,2,3,4]

It's no different from your first bit of code.

IIRC,
SomeList[::]
is a funny way to clone a list
>>
how do I change this?
>>
>>52216815
>overwrite
wrong, it now points to the memory TestList points to, nothing is overwritten

SomeList[:]

also works
>>
>>52216775
>What possible reason could anyone ITT have to not release source code of what they're working on?
embarassed because my code is not good enough
>>
>>52216774
>why?
I just think guys can be the cutest girls when they try.
>>
>>52216301
it will never happen

the assburger trap poster will never give up

we must always post threads early so we don't get the disgusting trap pics
>>
>>52216775
Either I'm too lazy to constantly push it to git, or it's already up there.
>>
File: diversity girl.jpg (82KB, 500x354px) Image search: [Google]
diversity girl.jpg
82KB, 500x354px
What does /dpt/ think of Mr. Robot?
>>
>>52216775
>What possible reason could anyone ITT have to not give away everything they own?
kill yourself communist tard
>>
>>52216884
"Someone is going to take MY precious CODE that's so IMPORTANT!!"
>>
>>52216902
meanwhile you are sharing nothing of value yet you are demanding to get something for nothing

greedy fuck
>>
>>52216879
another meme TV series which think they are cool for showing gay men having sex on TV.
They could have told the same story without any sex at all and the show would have been a lot better
>>
>>52216833
>>
>>52216857
I hope you don't mean cute physically
>>
>>52216902
>"Someone is going to take MY precious CODE that's so IMPORTANT!!"
Precisely. Some of us work on stuff that has actual value.
>>
>>52216811
>Is java a good language to learn for a total beginner?
No
>Is java a good language
No

Learn python.

Next question?
>>
>>52216879
Don't they show 4chan on the show?
>>
>>52216345
> GPL isn't freedom.
Some freedoms are mutually exclusive.

E.g. the freedom to own slaves doesn't look much like freedom to a slave.

If you want to create software which I cannot modify or distribute, don't expect me to write most of that software for you for free (which is what people who whine about the GPL are basically asking for).
>>
I just finished going through Baby Rudin's Analysis, and I've been done with Toplogy, Set Theory, and Discrete Math.

Am I ready for SICP? I've seen a lot of people here claim that it is very mathematically rigorous, so I'm a little worried. Is there anything in particular that I should brush up on?
>>
>>52216959
>If you want to create software which I cannot modify or distribute, don't expect me to write most of that software for you for free
Why?
>>
>>52216977
go through some differential geometry and you should be ready enough
>>
>>52216977
SICP isn't very mathematical desu

Your background is way overkill
>>
>>52216529
people aren't this easily fooled

for like a tiny function you can probably write it essentially the same because it's so simply and obvious. for an entire program it's easily going to look like plagiarism because of how it's designed etc
>>
>>52216811
Java is fucking horrible, learn Python

Or C# if you want something "java alike" but better
>>
File: 9uy.jpg (68KB, 1280x720px) Image search: [Google]
9uy.jpg
68KB, 1280x720px
>>52216977
What math books do you recommend anon senpai?

I've been thinking about getting into math ever since I learnt negative numbers are a meme.
>>
>>52217045
what about android though? would i be better off learning c++ and using the NDK?
>>
Every time you faggots
>>52211127
>>
>>52216811
yes

absolutely don't listen to the python shitters

python, haskell, lisp are the worst

learn java, or if you want to fall for the "hurr java is bad" meme then learn C++ or C#
>>
>>52216977
There's enough math in SICP for a dumbass highschooler to be worried, but not any real math. See >>52217036
>>
>>52217057
spivak :^)
>>
>>52217064
absolutely learn java for android

if you want to use NDK for performance-intensive games then you should still know both java and C++
>>
>>52216947
Python's a decent enough language for many purposes, but I wouldn't recommend a dynamically-typed language to a beginner.

Writing functions whose arguments don't have fixed types which are known up front (e.g. generic functions) is a relatively advanced topic. For a beginner, passing different types is more likely to indicate a mistake, and having the compiler tell you about it straight away makes the learning process go faster.
>>
>>52217064
>would i be better off learning c++ and using the NDK?
God no. But you can use C# for android if you're willing to pay for a xamarin licence.
>>
>>52217069
>>52217087
thank you. any recommended java books?
>>
>>52217069
>Python
>Bad

lol
>>
>>52217096
https://docs.oracle.com/javase/tutorial/
http://en.cppreference.com/w/
>>
>>52217085
Who's Spivak and what's he/she infamous for considering the ":^)"?
>>
>>52217116
cool thanks.
>>
What's that famous geometry book I'm think of that was made by some ancient Roman or Greek?
>>
>>52217143
The Geometry Ancient Book

Google it
>>
>>52217143
Euclid's "Elements"?
>>
>>52217101
>python
>good
>java
>bad
>this is what millenial pisskid memers unironically believe

http://programmers.stackexchange.com/questions/15468/what-are-the-drawbacks-of-python
http://lukeplant.me.uk/blog/posts/why-learning-haskell-python-makes-you-a-worse-programmer/
https://www.quora.com/I-heard-that-Python-is-a-really-bad-language-to-handle-and-you-need-to-learn-C-before-learning-Python-Why-is-Python-a-bad-language-compared-to-C-and-why-would-the-above-fact-be-true
http://www.advogato.org/article/1008.html
>>
>>52216698
Clothes
>>
>>52217160
Yeah, that's the one. Thanks senpai.
>>
>>52217161
>he could only dig up 5 links on the entire internet to show why python is bad
>stackexchange
>quora
>blogspot
seriously hope
>>
File: 1451855040672.png (96KB, 257x250px) Image search: [Google]
1451855040672.png
96KB, 257x250px
>>52217161
Sure thing buddy
>>
>>52216811
If learning scripting : Python
If learning oop : C++ (or Java if you are lazy)
>>
Any numpy gurus on?

Is there a simple way to take an NxM matrix and index the columns based on an M-dimensional vector containing which row to grab from each column

ex.
M =
0 1 2
3 4 5
6 7 8


v = 2 0 1

f(M, v) = 6 1 5

f = ???
>>
>>52217204
desu he did quite well
>>
>>52217204
>ad hominem
i literally just googled "python is bad" and grabbed a few links real quick
>>
>>52217248
>this is somehow considered good research
>my post is somehow considered ad hominem
>>
>>52217228
I live in West London and there are loads of Java/Android dev jobs here. I want to spend the next 3 months learning full time and then try getting a job once I have some projects and stuff on Github and the Play Store I can use to pad out my CV.
>>
Guys I need some real help.

I want to make software and everywhere tell me to code.

Im using C

and I cant even run things like prinf ("hello world"); because when I succesfully run it, it doesnt show up anywhere.


Cant find how I make the window size or colour of my software either, but thats a hurdle for later...First at least let me have "hello world" show up.

Any help is much appreciated.
>>
>>52217204
python is bad because of dynamic typing. That's all you need to know
>>
>>52217248
>i literally just googled "python is bad"

Awesome research, my friend :^)
>>
>>52217274
>attacking the websites that host the information as opposed to the content itself
>this somehow means that python isn't bad
>>
File: 1431471048976.png (63KB, 217x338px) Image search: [Google]
1431471048976.png
63KB, 217x338px
>>52217278
Go find a beginners python tutorial and come back in 6 months.

Adios amigo.
>>
>>52217278
Run it in the console
>>
>>52217276
> I want to spend the next 3 months learning full time and then try getting a job once I have some projects and stuff on Github and the Play Store I can use to pad out my CV.
Then go for Java, it's not too hard to learn.
>>
>>52217278
use an IDE and the output will appear in the console
>>
>>52216663
>https://github.com/deviantfero/wpgtk
Whats the point in this ?>
>>
>>52217297
B-barney?
>>
>>52217315
cool cheers
>>
>>52217336
What do you mean? It very clearly explains what it does...

It's just a GUI wrapper for an existing program, the program being something that changes your terminal colour scheme based on the colour of your wallpaper.

What's not to get?
>>
>>52217336
ricer crap, just ignore it
>>
>>52217204
I don't think you read them. None of them actually say anything that's likely to make someone avoid Python. They're either (fairly mild) gripes or they list the kind of tasks for which Python isn't suitable.

If Python was actually bad, it wouldn't have achieved as much traction as it has (it's now effectively the "standard" general-purpose dynamically-typed language).

JS and PHP can afford to be bad because people who use them *have no choice*. Web browsers support JS and only JS; if you want to write a web app, you have to write JS either directly or indirectly (and the latter option is a significant obstacle to getting anyone else to work on the code). Some version of PHP is available on every cheap web hosting service; if you want anything else, you typically need to pay for a decent service.
>>
>>52217374
see
>>52217385
>???
>cry
>>
>>52217232
M[v, np.arange(M.shape[-1])]
>>
>>52216663
Can you post the first two wallpapers?
>>
how2get site to stop banning scraper
>>
Is there a decent library for writing a web application in C++? I don't want some massive monstrosity like the C#/Java frameworks I use in my day job, just something to abstract away the details of sockets/http.

>Why c++?
Every language sucks, so I picked the one I suck the least in
>>
>>52217232
First transpose the numpy array, then use a for loop to iterate over each column in the array. Then get one value from each column by using the index values in v.
>>
>>52217414
It's not my tool, I don't give a fuck.
>>
>>52217471
Yes
>>
>>52217457
Excellent, thanks a lot.

>>52217476
>for loop
That's what I was trying to avoid, as the task was to fully "vectorize" a piece of code.
>>
>>52216879
Mediocre cringe fest

But enjoyable to sum extinct
>>
>>52216959
GPL is a virus, the only true freedom is BSD.
>>
>>52217512
Funny guy.
>>
File: abstract feel.jpg (46KB, 680x684px) Image search: [Google]
abstract feel.jpg
46KB, 680x684px
>That feel when you're developing an application you have no use for and know nobody will ever even know it exists

Who /blackholeprogramming/ here?
>>
>>52217457
I guess some explanation might be in order:

An N-dimensional array can be indexed with N arrays all having the same shape. Each array provides the index for one dimension. The result has the same shape as the individual arrays.

You can also use a mix of arrays (which must all have the same shape) and slices; the result is fairly intuitive.
>>
>>52217574
Now we know.
>>
>>52217548
I wasnt trying to be funny, you asked if there was, i responded
>>
>>52217574
>That feel when you're developing an application you have no use for
Why would I ever know this feel
>>
>>52217298
Yeh I did try that, it doesnt show up because its saved as a .c file.
>>
>>52217574
I started two libraries with a goal and when I finished them, I never got to the goal. That counts, right?
>>
>>52217519
> for loop
> That's what I was trying to avoid
As you should.

Using loops in numpy code is grounds for committing sudoku.
>>
>>52217594
If you worked for Microsoft or apple you would know.
>>
File: 1000.jpg (264KB, 1000x1000px) Image search: [Google]
1000.jpg
264KB, 1000x1000px
>>52217595
>>
This is just a random curiosity, but is it possible to write a document in LaTeX that executes script?

Similar in concept to an XSS attack.
>>
>>52216840
But
SecondList = firstList[::-1]


Also works
>>
>>52217595
Did you compile it?
>>
File: assburger king.jpg (69KB, 650x452px) Image search: [Google]
assburger king.jpg
69KB, 650x452px
>>52217585
>>
>>52217069
maybe it's because I'm a girl... but what's wrong with haskell?
>>
>>52217471
Don't use C++ for webdev
>>
If you are a C programmer trying to get into C++, how much of your previous skills will get in your way as "C++ bad habits"?
>>
>>52217769
All of them
>>
>>52217709
Yes it compiles succesfully when I use Atmel studio 7.0
>>
>>52217471
>this plebeian doesn't write all his netcode in pure WinSock 2.2
>>
HTML and Javascript is programming, right?
>>
>>52217775
so you have to unlearn everything?
>>
>>52217769
other guy is right.
pretty much all of them.
Learn you a RAII, it's the most important (basic) thing in the language.
>>
>>52217800
yes, or else there won't be much of a point for you to use C++ over C
>>
>>52217781
JS is yes
>>
« → N
« { } N 2
WHILE DUP2 SQ ≥
REPEAT
IF DUP2 MOD 0 ==
THE ROT OVER + ROT 3 PICK / ROT
ELSE 1 +
END
END DROP
IF DUP 1 >
THEN +
ELSE DROP
END
»
»
>>
>>52217817
shit. I hope I learned C like a fucking retarded monkey then.
>>
>>52217781
HTML is coding

javascript is scripting/coding unless you use it for programs which you shouldn't
>>
>>52217776
Does hello world not show up in the output window when you run it inside atmel studio?
>>
>>52217857
C is cool

Its really useful if you wanna learn about ICs in a future
>>
>>52217781
JavaScript is.

HTML is just a markup language.
>>
>>52217875
No. It runs succesfully and says running, but nothing shows up.

#include<stdio.h>

main()
{
printf("Hello World");

}
>>
>>52217909
HTML5 is Turing complete
>>
>>52217918
You need to print a newline at the end.

#include<stdio.h>

int main(void)
{
printf("Hello World\n");
}
>>
>>52217931
Not on it's own.
>>
>>52217931
No, the combination of HTML5 and CSS is Turing complete.
I'm sure it was unintentional though.
>>
>>52217057
>>Baby Math
>Principles of Mathematics by Allendoerfer (really hard to find online. I dare you to find a pdf)
Covers K-12 math and more, and is probably one of the best intros for formal math.
>Serge Lang's Basic Mathematics
Covers K-12 math. Isn't as rigorous as the former, but it still great.
>Gelfand's books (Algebra, Trig, Method of Coordinates, etc)
Serve as great supplementary texts for the above.
>Art and Craft of Problem Solving
Great if you want to learn contest math.
>Kiselev's Geometry
Fantastic geometry books. If you go through this, you'll be able to do all of the crazy contest math geometry proofs.
>>
>>52217918
Test adding \n at the end of your string (after d and before ")

Could be an output buffering issue
>>
>>52217931
Your mother is Turing Complete.
>>
>>52217908
yeah, but for my current objectives I think C++ would be easier.
>>
for these, don't go through the list. pick the ones that apply to you.

>>Single Variable Calculus
>Weak Students
"Calculus Made Easy" by Silvanus Thompson and Martin Gardner
"Calculus: An Intuitive and Physical Approach" (Dover) by Morris Kline
"Elementary Calculus: An Infinitesimal Approach" by Jerome Keisler (Uses infinitesimals)
"A First Course in Calculus" by Serge Lang

>Strong Students
"Calculus" by Spivak (Good mathematical exposition, poor motivation, no applications)
"Calculus, Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra" by Apostol (Good motivation and problems)
"Introduction to Calculus and Analysis, Volume I" by Richard Courant and Fritz John (Good motivation and applications, very difficult problems)

>Classic References
"A Course of Pure Mathematics" by G. H. Hardy
"Introduction to Analysis of the Infinite", "Foundations of Differential and Integral Calculus" by Euler

>>Multivariable and Vector Calculus
>Weak
"Div, Grad, Curl, and All That: An Informal Text on Vector Calculus" by Schey
"Calculus of Several Variables" by Serge Lang

>Intermediate
"Calculus, Vol. 2: Multi-Variable Calculus and Linear Algebra with Applications to Differential Equations and Probability" by Apostol
"Introduction to Calculus and Analysis, Volume II" by Richard Courant and Fritz John

>Advanced
"Advanced Calculus of Several Variables" (Dover) by C. H. Edwards Jr.
"Advanced Calculus: A Geometric View" by Callahan
"Vector Calculus, Linear Algebra and Differential Forms: A Unified Approach" by Hubbard and Hubbard
"Advanced Calculus: A Differential Forms Approach" by Harold M. Edwards
"Advanced Calculus" by Shlomo Zvi Sternberg and Lynn Harold Loomis (for the utterly fearless)
>>
>>52217931
With CSS.
>>
>>52217937
whether that forces a flush or not on stdout is implementation defined behaviour
>>
>>52217975
shit
>>52217949
>>
>>52217946
Only by way of using user input as a clock cycle.
HTML5+CSS3 is completely unrealistic as a turing complete language.
>>
File: whatido.png (39KB, 1893x837px) Image search: [Google]
whatido.png
39KB, 1893x837px
>>52217937
Nope.
>>
File: iuj.gif (199KB, 336x468px) Image search: [Google]
iuj.gif
199KB, 336x468px
>you will never code something that is worth more than $100,000
>>
>>52217975
>>Analysis
>Single Variable (with Metric Spaces)
"Real Mathematical Analysis" by Pugh (weaker version of Rudin)
"Principles of Mathematical Analysis" by Rudin
"Mathematical Analysis" by Apostol
"Mathematical Analysis I & II" by Zorich

>Multivariable Analysis
"Functions of Several Variables" by Fleming
"Analysis on Manifolds" by Munkres
"Calculus on Manifolds" by Spivak
"Differential Forms and Applications" by do Carmo

>Fourier Analysis
"Fourier Series" (Dover) by Tolstov
"Fourier Analysis: An Introduction" by Stein & Shakarchi
"Fourier Analysis and its Applications" by Folland
"Fourier Analysis" by Körner
"Fourier Series and Integrals" by Dym and McKean

>Complex Analysis
"Visual Complex Analysis" by Tristan Needham (reference)
"Complex Analysis" by Stein & Shakarchi
"Functions of One Complex Variable" by Conway
"Complex Analysis" by Ahlfors

>Real Analysis (Measure Theory)
"Real Analysis: Measure Theory, Integration, and Hilbert Spaces" by Stein & Shakarchi
"Real Analysis" by Royden
"Real Analysis: Modern Techniques and Their Applications" by Folland
"Real and Complex Analysis" by Rudin
>>
>>52218004
Why did you include stdio.h twice?
>>
isn't it \r\n on wangblows
>>
>>52218004
>Double include
Try looking at the output window, not the command window and autos?
>>
>>52218004
Why do you include stdio twice

Also add a space between include and <
>>
>>52218028
just a quick copy past...Anyway it has no effect on the code.
>>
>>52218033
No, it isn't.
Actually I don't remember which system actually requires both a carriage return and a newline.
Maybe HTTP parsers.
>>
>>52218027
>Matrix Algebra
>Weak
"Matrices and Linear Algebra" (Dover) by Schneider and Barker
>Average
"Matrices and Linear Transformations" (Dover) by Cullen
>Honors
"Linear Algebra Done Wrong" by Treil (also an intro to proofs and free online)

>Applied Linear Algebra
"Linear Algebra and Its Applications" by Strang
"Matrix Analysis and Applied Linear Algebra" by Meyer

>Numerical Linear Algebra
"Matrix Computations" by Golub and Van Loan
"Numerical Linear Algebra" by Trefethen and Bau III
"Matrix Analysis" by Horn and Johnson

>Finite Vector Spaces Theory
"Linear Algebra" by Shilov (Dover Book)
"Finite Dimensional Vector Spaces" by Halmos
"Linear Algebra" by Friedberg, Insel, and Spence
"Linear Algebra" by Hoffman and Kunze
"Linear Algebra Done Right" by Axler (best paired with Shilov)

>Advanced
"Linear Algebra and Its Applications" by Lax
"Advanced Linear Algebra" by Roman
>>
>>52218033
Depends if the file is opened in text or binary mode
Text mode converts \n to the platform-specific newline character(s). Binary mode need \r\n
>>
>>52218048
Including things twice becomes a heinous compiler error.
>>
>>52218018
On the internet nobody knows you're Bill Gates.
>>
File: What i do.png (43KB, 1896x852px) Image search: [Google]
What i do.png
43KB, 1896x852px
>>52218046
>>52218036
>>52218028

Still nothing.

This is the 4th C compiler I tried lol...Why?!
>>
Why can't you do webdev in C++?
Why are you forced to use shitty, painfully slow to execute languages? Is it because all webdevs are too retarded to use a strongly typed language?
>>
>>52218073
That's why #include guards exist.
Also, the standard says that it's always perfectly fine to include multiple standard headers more than once.
>>
>>52218087
just copy and paste this:
#include <stdio.h>

int main(void)
{
printf("hello, world\n");
return 0;
}
>>
>>52218091
>Why can't you do webdev in C++?
You can though. You could use assembly if you felt inclined to.
Look up CGI/SCGI/FCGI.
>>
File: er.jpg (25KB, 533x300px) Image search: [Google]
er.jpg
25KB, 533x300px
Having you ever made money programming (not as a code monkey)?
>>
Is there any language with a more permissive/tricky standard than C?
>>
>>52218137
c++
>>
>>52218137
>permissive/tricky
What's wrong with it?
Anyway, to answer your question: C++.
>>
>>52218137
Assembly
>>
>>52218135
I freelanced for a while
>>
>>52217995
> whether that forces a flush or not on stdout is implementation defined behaviour
The standard says (7.19.3p7):
> the standard input and standard output streams are fully buffered if and only if the stream can be determined not to refer to an interactive device.

If stdout refers to an interactive device, it will either be unbuffered (in which case, the stream will be flushed after every operation) or line-buffered (in which case, the stream will be flushed after every operation which writes a newline)

If it doesn't refer to an interactive device, you typically don't care whether it gets flushed or not.
>>
File: what i keep doing.png (43KB, 1881x848px) Image search: [Google]
what i keep doing.png
43KB, 1881x848px
>>52218110

About to start coding in assembly language if this shit keeps up.
>>
>>52216663
good work, i like it a lot
if only shit could work with stylish in firefox too, but that's a whole other story
>>
>>52218018
if you have a job it means your employer is willing to pay $50k+ a year for your work
>>
>>52218212
show output from: debug
that have anything to do with it?
i have never really used an ide but that stood out.
>>
>>52218164
I assume that he's referring to the amount of stuff that's undefined behaviour.

That results in "works on my system" and "I can expect this to work on any conforming implementation" being miles apart.
>>
>>52218247
Yes, but you don't own your work.

You're just a wage slave.
>>
>>52218264
>I assume that he's referring to the amount of stuff that's undefined behaviour.
Undefined behaviour is a good thing. It make the language more portable and increases performance. For a programmer, it just means "don't do this".
Implementation defined behaviour is that bad one.
>>
>>52218273
Oh no! I only own a house, a car, raise a family and grow up! Fuck my LIFE.

People who use the term wage slave are retarded and the prime example of the lazy entitled cunts of this generation.
>>
>>52218255
Nope the other options under it do nothing either...Man this is so annoying. I always wondered how coders would output to things...

But when you are a noob how are you even supposed to know how to output to something..

Is there like a way to output everything into CMD ?
>>
>>52218293
Implementation defined behaviour is the same shit, different smell. You should just treat implementation defined as undefined.
>>
>>52218318
Compile and run the fucking program
>>
>>52218318
compile as exe and run it from cmd with a getch(); or something under the printf.
>>
>>52218318
>coders
Baiter confirmed, do not reply to this person any more fellow bit wizards
>>
>>52218327
Not true. ID normally means there are only a limited number of ways you would have to support. And you could always read the documentation to see what it defines it as.
>>
>>52218318
>>52218212
This is why you don't begin programming with an IDE. Just download GCC and use the command line. This is an IDE configuration problem.
>>
>>52218318
If you're using Visual Studio then it should automatically open a command prompt and output your shitty hello world into it.
Alternatively, find the program you compiled and run it via command line.

I know exactly what the problem is. The program finishes executing so fast, that you can't see the hello world.
>>
>>52218374
What's wrong with the term coders?
>>
Fuck, why is HTTP so fucking complicated.
I just want to implement a HTTP server. But that seems like saying "I just want to fly to the moon".
>>
>>52218374
fuck yourself wtf do you call people who code then you asshole.

I need some serious help.

>>52218336
>>52218361
I have been building and debugg. There is no compile option.
>>
>>52218421
coders are unable to average two negative numbers in C
>>
>>52218461
HTTP is a convoluted mess, why bother writing your own when there's plenty of good implementations out there already?
>>
>>52218464
im pretty sure building and debugging isn't running, only making the executable and making sure there are no errors.
>>
>>52218212
Well, in C# you have to do something like ReadKey() so the command prompt wont dissapear as soon as it shows up
Try something like that
>>
>>52218461
what are you having trouble with?
>>
>>52218461
>why is HTTP so fucking complicated
HTTP is simple as fuck.
>>
File: minesweeper.png (784KB, 469x1000px) Image search: [Google]
minesweeper.png
784KB, 469x1000px
I'm coding a minesweeper on my HP 48GX.
>>
>>52218461
>HTTP complicated

You gotta be fucking kidding, lol

>>52218517
Shut the fuck up, liar
>>
>>52218464
>fuck yourself wtf do you call people who code then you asshole.

>I need some serious help.

you come to our general, you ignore our culture and then insult me when I point out that you're baiting because no one can be so retarded that they fail to press "run" on their ide
get the fuck >>>/out/ you filthy coder
>>
>>52218517
Neat!
>>
>>52218388
That's true, but then you're limiting your software to only whichever implementations you have thought of. And implementations can change between versions of the same compiler and runtime.
>>
>>52218517
I want to marry a calculator!
>>
>>52218406
ok imma try this.

>>52218417
So I need to delay it somehow..

I tried
#include <stdio.h>

int main(void)
{
printf("hello, world\n");
scanf("%c");
return 0;
}


Doesnt work.
>>
>>52218527
Th pic is here to prove that I'm not lying.

>>52218540
I know that feel.
>>
>>52218565
>no timestamp
>>
>>52218475
Except there isn't (for server side C++11 programming).

>>52218527
>>HTTP complicated
Yes it fucking is if you want to implement a HTTP server.
>>
>>52218547
Nigger, just use a Text editor + any compiler you want
IDEs just overcomplicate everything
>>
>>52216561
What's with your variable naming style?
>>
>>52216913
true.
>>
someone pls recommend some music that wasn't made by a talentless idiot

preferably some 1-2 hour long music mix that i can just leave on while i program
>>
>>52218728
classic fm or classic rock
>>
>>52218728
https://www.youtube.com/watch?v=H4UtBYUMVJk
>>
>>52218728
https://youtu.be/TvM_c9lJ7cs

I like this
>>
File: minesweeper-timestamp.png (829KB, 476x1000px) Image search: [Google]
minesweeper-timestamp.png
829KB, 476x1000px
>>52218581
GFY
>>
>>52218728
Slipknot
>>
>>52218728
https://www.youtube.com/watch?v=kB7K9l0fXvk
>>
>>52218728
https://www.youtube.com/watch?v=9NACc7DBRh0
>>
Dumb noob here again with more Python questions.
Posted in last thread, realized too late it was ded.
How do I add arguments to an imported constructor within a subclass?

Say I've got:
class MyClass():
def __init__(self, arg):
self.arg=arg


and I want to import this same __init__ constructor to be in a new subclass of MyClass called MySubclass, as well as add in a new argument for MySubclass.

What do?
>>
>>52218728
https://www.youtube.com/watch?v=9Pp9DC56hh8
>>
Why is CMake such a pain in the ass?
>>
>>52218771
>2016
you waited an entire year just to trick people with a fake minesweeper game?
>>
>>52218807
Excellent music for suicide.
>>
>>52218820
What?
>>
>tfw want to program but too horny

i-is anyone interested in dominating a sissy little programmer trap?
>>
>>52218728
Have some Rush
https://www.youtube.com/watch?v=IlwrioK3H74
>>
Am I understanding epoll right?

#include <cstdio>
#include <sys/epoll.h>
#include <unistd.h>

static const unsigned int EPOLL_EVENTS = EPOLLIN | EPOLLET | EPOLLONESHOT;

int main() {
int epfd = epoll_create1(EPOLL_CLOEXEC);
epoll_event event;
event.events = EPOLL_EVENTS;
event.data.fd = STDIN_FILENO;

if (epoll_ctl(epfd, EPOLL_CTL_ADD, STDIN_FILENO, &event)) {
return 1;
}

char buf[2];

while (true) {
if (epoll_wait(epfd, &event, 1, -1)) {
auto amount = read(event.data.fd, &buf, sizeof(buf)-1);
buf[amount] = '\0';
printf("%s", buf);
event.events = EPOLL_EVENTS;
epoll_ctl(epfd, EPOLL_CTL_MOD, event.data.fd, &event);
}
}
}
>>
>>52218832
Agreed
>>
>>52218874
>buf[2]
Fuck, that should be 256, but I'm retarded and never changed it back.
>>
>>52218865
>i-is anyone interested in dominating a sissy little programmer trap?
can you be a cute masculine boy programmer?
>>
>>52218904
>>52218865
Get the fuck out of here and off yourselves.
>>
>>52218728
http://musicforprogramming.net/
literally
>>
>>52218868
this is really good actually thanks

and thanks to everyone else too
>>
>>52218904
I'm intersexed so no sorry
>>
>>52218924
Fuck off, cute boys are top tier
>>
>>52219029
Wrong thread, you fucking faggot. No one gives a shit.
>>
>>52216561
What should the output be?
>>
>>52219029
>>52218904
>>52218865
>>>/d/
>>
>>52216663
I'm guessing this is Arch, but what WM/Panel. I assume this isn't a DE.
>>
>running gdb
>use the command "disass main"
>can't help but think of some nigger yelling DIS ASS MANG
>>
>>52219089
No one gives a shit about your stupid anime faggotry either, and yet /dpt/ has been riddled with it for months. I will fag it up in here if I very well damn please to do so, you raging cunt.
>>
>>52218547
tried shift+f5 already?
>>
>>52217278
Use code blocks. Worked almost without any configuration. Just press f9 and it works.
>>
>>52219224
Anime AND trap faggots need to fuck off. I don't condone either.
>>
>>52219238
This desu

It's obviously an issue with your IDE
>>
Any good books for learning java? I have finished one semester of informatics and did an intro course in java. The book we use sucks. Called Big Java, late objects. Will be using this for next semester as well. Feels like a waste of time to read it.
Any good books for java?
>>
>>52216561

Not sure what you're trying to get here, but if it's just to print the list reversed you could use this
TestList = [1,2,3,4]
for i in TestList:
print TestList, TestList[::-1]


What's the output you're expecting?
>>
>>52219280
*you're
>>
Scheme or common lisp?
>>
>>52219245
>trap faggots
I'm not a trap faggot you moron, I specified pretty clearly that I wanted a cute masculine boy. Male beauty is true beauty, everything else is just a derivative.
>>
>>52219286
Yeah, try this
http://ddili.org/ders/d.en/index.html
>>
>>52219318
define "male beauty"

can I still wear dresses and stuff?
>>
>>52219220
Whenever you're tired of this thread check the one above out

I have saved you from the trapfag and now O'm off to sleep

Good night ladies
>>
>>52219326
>programming in D
Sure you posted the correct link?
>>
>>52219379
Theres literally nothing wrong with D
>>
>>52219342
I'd prefer not
>>
>>52219414
ok ;-;
>>
I want to switch my C dev environment from Visual Studio over to linux. What software do I need?
>>
>>52219443
vi
>>
>>52219443
Sublime Text + Clang
>>
File: 1407555249868.jpg (287KB, 660x660px) Image search: [Google]
1407555249868.jpg
287KB, 660x660px
How autistic do I need to be with rounding numbers? Rounding just the final result looks correct enough but should each individual floating point variable be rounded?
>>
Does anyone on here uses TCC? what do you think about it?
>>
>>52219397
Maybe so, but I want to (need to) learn java.
Any good java books? The one I am using is not good enough.
>>
>>52219549
Round only at the very end. Rounding at intermediate steps will cause a loss of precision.
>>
>>52219549
The correct answer is completely dependent on the context in which the value is being used.
>>
How does inserting or deleting data at the middle of a file work?
>>
>>52219443
Code blocks?
>>
>>52218293
>It make the language more portable and increases performance.
Often repeated 'common wisdom' but I've started to doubt the actual practical performance gains from it.
If you pin things down more concretely you give the programmer more control as well - and they are always better than the compiler at optimizing.
I remember in earlier msvc versions (around 2008) using simd intrinsics msvc hardly did any optimization (didn't do constant folding, subexpr elimination, etc) and was more of a 1:1 mapping of intrinsic to actual instruction, but that wasn't really a problem because the programmer could lay out the intrinsics themselves for optimal machine code.
Later on they now do lots more optimizations and ill often fold away adding constants or redundant shuffles, but I've also noticed in its wisdom to 'optimize' that it can cause extra redunant register spills as well.

I would prefer a really well defined C implementation where you could rely on things like integer overflow, operator evaluation order, array out of bounds access, pointer aliasing, etc because it would actually allow me to do lots of tricks compilers still can't do.
>>
>>52219604
Overwrites whatever is after it
>>
>>52219582
if you need to learn java then you should go to community college or
buy a college text book and do the exercises.
>>
>>52219600

        int weightInPounds = 150;
double weightInKilograms = (1/(2.2)*(weightInPounds));
double runningMets = ((0.0175)*((10)*weightInKilograms)*(30));
double basketballMets= ((0.0175)*((8)*weightInKilograms)*(30));
double sleepingMets= ((0.0175)*((1)*weightInKilograms)*(360));
int totalMets = (int)Math.round(runningMets + basketballMets + sleepingMets);
System.out.println(totalMets + " calories burned.");


Something like this.
>>
>Moderator removes new thread because it's a few posts early
>Doesn't remove trap fag threads posted 30 posts too early with completely off-topic, irrelevant and inane bullshit

I hate how partial the mods are some times
>>
>>52219443
Emacs.
>>
>>52219379
I meant what I posted
>>
>>52219745
Stop shitposting, anon.
>>
>>52219796
How is this any worse than the shitposters that use anime images as the thread starter?
>>
File: 1445023659746.jpg (35KB, 252x247px) Image search: [Google]
1445023659746.jpg
35KB, 252x247px
>>52219459
>>52219523
>>52219605
>>52219777
>>
>>52219702
Already studying at a uni, have a text book, it is supbar. Want to learn more, so I want to get some recommendations for Java books that are better and/or more suited for me.
>>
>>52219740
Use your noggin. What happens when you round at every step?
>>
public class Sexuality {
public static void main (String[] args) {
if (samesex != orgasmic) individual = heterofag;
else individual = homosexual;
if (individual = homosexual) HIV == +; // this is why you have AIDS
>>
>>52219876

I am not a smart man.
>>
>>52219822
When you switch to Linux you are asking for choices and goddamn if you don't get a shitton of choices for everything
>>
File: emacs@arch_058.png (129KB, 2556x1039px) Image search: [Google]
emacs@arch_058.png
129KB, 2556x1039px
>his programming language can't compile to pdf
>>
File: 1448870372218.gif (3MB, 550x309px) Image search: [Google]
1448870372218.gif
3MB, 550x309px
>>52219940
>his language can
>>
New thread: >>52219970
>>
>>52219972
kill yourself
>>
>>52219995
That's not very nice.
>>
>>52219318
>I'm not a trap faggot you moron, I specified pretty clearly that I wanted a cute masculine boy. Male beauty is true beauty, everything else is just a derivative.
its very common now in the US for men to identify as gay/feminine because american society has degraded into caveman/tribal mentality of alpha/beta/omega. So lots of successful white american programmers have been told they are beta or whatever because white american slut women gravitate torward the idea of a thug being an alpha male. So if you go to Google, Apple or a lot of big american tech companies you will see the majority of white males identify as females. For this reason Im going to make my money in the american tech industry and then get the hell out of here. The USA has the most pathetic culture in the world. I honestly can understand how men in this country function being treated like donkeys who only work to provide money for women and have no sex life with women what so ever.
tl:dr american women encourage this trap culture in american men
>>
>>52220122
Nope, you're just a beta faggot cockloving cunt.
>>
>>52220122
>you will see the majority of white males identify as females.

lmao

>The USA has the most pathetic culture in the world.

Not even.. everywhere else in the world has banned manly pursuits. What are you going to do? Go to Europe and drive around unarmed in your 1.0L Citroen Saxo?
>>
>>52220122
American culture is a subculture.
>>
>>52220140
>typical converation with american women
>>
>>52220155
I know what you mean by that, 'family values' dont exist and have never existed. This is the lie that the 'nice guys' fall into everytime. Have fun being alone and watching porn for the rest of your life
>>
>>52220238
Nah man, I'm not American. My culture respects the value of honesty, hard work and appreciates the delicacy of a woman.
>>
>>52220269
You eat women too?
>>
>>52220289
We only eat them out.
>>
>>52216775
Here you have one, the Non Disclosure Agreement
>>
>>52216529
You can.

Good luck, anon.
>>
>>52218461
You're just being a bitch.
I implemented a basic input/output HTTP server in less than a day for my class in pure C++.
Object oriented and everything, the files even had the correct MIMETYPE pulled from the Windows Registry.
>>
>>52219162
it's just openbox and tint2 with a custom theme, they're not that hard to deal with honestly it's just like editing a css
>>
>>52221666
>Windows Registry
Might as well get your wife's son to do all the programming for you.
Thread posts: 317
Thread images: 29


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