[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: 340
Thread images: 44

File: Strang.jpg (100KB, 870x770px) Image search: [Google]
Strang.jpg
100KB, 870x770px
Linear Algebra Edition

Picture of slut: >>56233126
>>
>Created way before the bump limit
Delete this invalid thread.
>>
tfw discrete math in the next semester
>>
>>56239389
Bang my matriƧocks with your threadick as hard as you can anon cuz' I love you! LinAlg is so much good stuff.
>>
>>56239500

It won't murder you unless you suck at math. If you do suck at math, why are you in Computer Science?
>>
File: shit font tbh.png (573KB, 587x551px) Image search: [Google]
shit font tbh.png
573KB, 587x551px
5th for Haskell

long may she reign
>>
>>56239528
i wana make video games
>>
>>56239500
Discrete maths is infinitely easier than calculus though
>>
>>56239389
I did a pure math project that I managed to turn into me defining a bunch of convex programs in Python.

Feels good man.
>>
Questions for generous anons to answer.


When is one too old to start with programming?

Is it possible to become employable if one is learning from home for 6 months, say, 4+ hours a day, reading books, practicing, online resources? (considering one is not starting from 0... I already know HTML, CSS, and I did some programming in C and Turbo Pascal back in the day - so I understand the basics like functions, for loops, basic algos, while do, etc.)

What would be the best to focus on now to get employable ASAP? I imagine front-end web dev? Go the JS, nodeJS, ReactJS route ? Does this have a future or is it just a meme?

Thank you I just want to turn my life around I work at a dead end job now... ideally I want to work from home freelance some day, even if I don't make enough I don't care, just enough to pay the bills and live a normal life. I live in a very cheap country so that will help I guess.

I'm currently doing FreeCodeCamp.com's curriculum ... I'm also interested in data visualization (D3? etc) but I guess my foundation in statistics and maths is not sufficient. I have a Master's Degree in Philosophy (help me God)
>>
>>56239574
Calculus is easy shit. Only if your discrete is dumbed-down af is it easier
>>
>>56239557

Are you working on a video game right now?
>>
>>56239580
pi * your current age / 3
>>
>>56239586
Bachelors math is piss easy, if you find it difficult you should consider pursuing a different degree like gender studies
>>
>>56239679
That's rude.
>>
Reminder that the proper thread is still at 295 posts
>>56233126
>>
>>56239611
Not him but what knowledge do I need to create a video game? I'd guess engines do most of the work, but I'll need some programming, and graphic artists, yes?
I'm a CS undergrad and got a small team of people from my dept, think we can manage to make an RTS?
>>
>>56239703
Beyond the basic understanding of a game development cycle and basic math competence it's nothing particularly difficult.

However what is difficult is the sheer amount of work involved, people underestimate it to a ludicrous degree until they actually try it. Even the most bare bones basic RTS made in Unity is a few months of your time.

Wrangling artists, musicians and writers both managerially and financially is another kick in the teeth.
>>
>>56239528
I'm studying bacc. CE right now and the only postgrad master's course this uni has is CS (atm, due to problems with govt funding). To fix that, they spread the course to 2 modules, one of them focuses on CE again as an extention of the bacc. one.
Discrete math just seems to be one of the mandatory classes on both modules.

And yea, I suck at math but I'm planning on learning everything over again, starting fron HS. Just gotta take care of enrollment right now
>>
>>56239725
>not creating a geometric game like slither.io or agar.io and making money without needing graphics or music
why do you hate yourself ,anon?
>>
>>56239737
Because I'm a talentless, motivation-free waste of space.

Please help.

I've managed to learn how to do a whole heap of things and I simply haven't got the ideas or the motivation to use any of what I've learned.
>>
File: real science.png (5KB, 262x292px) Image search: [Google]
real science.png
5KB, 262x292px
>>
>>56239783
"Real science" is for real faggots
>>>/sci/
>>
>>56239750
You have to get mental discipline first
Pick up a daily meditation routine
>>
>>56239820
>C:\
>"Command Prompt"
>not bash
GTFO back to /jp/ or /a/
>>
>>56239839
>Bash
Are you twelve?

I bet you use Ubuntu
>>
>>56239389
>tfw i finally got my swapping certificate
>>
>>56239868
What's wrong with Ubuntu?
>>
>>56239893
babby tier shit, real men use arch
>>
>>56239868
>le Ubuntu is for le noobs meme xD
Nasa uses Ubuntu for Curiosity rover
>>
File: 1467996343753.jpg (19KB, 326x273px) Image search: [Google]
1467996343753.jpg
19KB, 326x273px
>>56239893
Holy shit

Kill yourself
>>
>>56239912
>manhood is defined by the Linux distribution
Teenage autistic kid who never did anything in the real world detected
Keep writing those fizzbuzz C programs in your mom's basement you LEET kid
>>
>>56239914
Go back to /jp/ Microsoft shill Pajeet
>>
>>56239912
>>56239914
Why do you even bother replying to me if you can't give a proper answer? Please think before you post.
>>
>>56239928
>microsoft
>shill
>pajeet
>/jp/
>>56239923
>teenage
>autistic
>never did anything
>fizzbuzz
>mom's basement
>LEET
>kid
>>>56239913
>le xD

Wow you're really pulling out all the memes
>>
>>56239913
And for everyone else, there's MicroSoft
>>
>>56239913
Why does a rover need a desktop OS. I thoughts it would just be embedded chips programmed in C.

Seems like the safer option.
>>
>>56240000
>C
>safe
>>
>>56239690
>proper thread
>has a picture of some slut that never has written any code
>>
>>56239913
Curiosity runs an embedded real-time OS
>>
I am literally out of ideas.
And I am a bloody beginner.
Is there an incremental project list that becomes harder the higher you climb the ladder?
>>
>>56240133
Just write a 2D platformer or something and keep refactoring and adding features
>>
>>56240133
Just start with some automation of shit you usually do, or some smallish program that does something you want.
Also, if you're trying to learn, don't use libraries.
>>
File: 1422560700212.gif (3MB, 320x227px) Image search: [Google]
1422560700212.gif
3MB, 320x227px
>>56239586
>Calculus is easy shit
>tfw ECE
>tfw barely scraped by in Calc III and I have to take EM Theory next semester
>>
I want to set the 4 least significant bits of b to be equal to the 4 least significant bits of a, without changing the 4 most significant bits of b.
b and a are both unsigned chars.
b = (b& 0xF0) | (a & 0x0F);

Is there a better way to do this than I came up with? I feel like there is a bit-shift method to do this.
>>
>>56240088
Safe as in you don't need to work on top of a giant code base that noone on your team completely knows.

As for writting code without defects, read this.
http://www.fastcompany.com/28121/they-write-right-stuff
>>
>>56240410

b &= 0xFFF0;
b |= a & 0x0F;

>Is there a better way to do this than I came up with?

Not really.

> I feel like there is a bit-shift method to do this.

No. I mean, you could, but why? It's just more steps. Both in your code and the actual compiled executable.
>>
>>56240450
k, thanks.
It's just that whenever I get stuck with some bit-manipulation and I look up a solution online, the solution is a one-liner containing bit-shifts.
Or at least that's how it feels like for me.
>>
File: aa4.jpg (22KB, 456x628px) Image search: [Google]
aa4.jpg
22KB, 456x628px
Anyone have any ideas that I can borrow?

I'm fresh out.
>>
>>56240502
Implement n body simulator. Add graphics to it. Explore different numerical integration methods.
>>
>>56240502
create a general AI
>>
>>56240528
I'm mathematically challenged, seems like a real pain in the ass.

>>56240545
:^)
>>
>>56240558
Exactly why you should do it. Also its great project for learning cuda or openmpi. How do you learn something without trying it out first?
>>
>>56240558
>Anyone have any ideas?
>No, not that one
>>
>>56240577
That's perfectly valid but it's almost certainly so far out of my comfort zone that I have very little chance of even getting over the initial hump.

I'm too much of a CRUD babby.

>>56240599
Anyone have any ideas that a complete pleb could actually reasonably achieve. I've got a few ideas of my own but they're so far out of my reach.
>>
>>56240502
Create a GUI program that can auto tag and find duplicate images in your 4chan folder using CV and AI.
>>
>>56240609
Lisp interpreter or if thats too hard Brainfuck transpiler?
>>
Why should I use Python?
>>
>>56240761
You shouldn't.

Unless you're a babby who has no interest in programming properly and just needs to do some basic automation from time to time of course.
>>
>>56240783
to be fair python can be useful for sys admin scripts
>>
Rate my memmove
https://godbolt.org/g/gdOlbw
>>
>>56240761
>Been wanting to learn Python
>Can't think of any use for it.

Every problem I have I can solve in C, C++ or C#.
>>
>His language doesn't have pointers
Even Haskell is lower level than you
>>
Wait, Xamarin compiles to actual native code? I thought it compiled to JVM bytecode on android.

Is there any reason not to use Xamarin instead of android java even when only targeting Android? I'm better at C# than java.
>>
>>56240876
Don't they mean Java by native for Android? Like it compiles "natively" to whatever platform you're targetting, which would be Java for Android?
>>
Sup /g/ents, I'd like to get into programming for real. I did the Python class on codeacademy and currently on the Java one, as recommended by some CS friends, but I feel like they dont teach you shit other than syntax. I could enroll in some uni classes but not untill january. Any good sites/resources online I shoud take a look at?
>>
So I thought what I'd do was, I'd pretend I was one of those Python idiots.
>>
>>56240906
I don't know, which is why I'm asking
>>
>>56240930
Download unity and start making some games. That's how I started.
>>
>>56240931
made me smile, have a (you)
>>
>>56240820
ayy@lmao ~ $ python3
Python 3.4.3 (default, Oct 14 2015, 14:28:29)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> class A:
... x = 0
... def f(self):
... self.x += 1
...
>>> a = A()
>>> b = a
>>> a.f()
>>> b.x
1

I can't think of any language that doesn't have pointers in one form or another.
>>
>>56241026
I don't see any pointers anon
>>
>>56241026
Lambda calculus
>>
>>56241032
How would you explain that the state of 'b' is modified by 'a.f()' if 'b' isn't a pointer to 'a' ?
>>
>>56241075
I said pointers, not references
>>
>>56241092
References are pointers.
>>
>>56241110
No, they aren't.
>>
>>56241121
They compile to the same thing so they essentially are.
>>
>>56241092
Fair enough.
I didn't know Haskell have pointers, but isn't it just in the context of the C FFI though, and not the core language ?
I must admit I don't know much Haskell.
>>
>>56241152
https://hackage.haskell.org/package/base-4.9.0.0/docs/Foreign-Marshal-Alloc.html
>>
>>56241152
>>56241179
It's certainly not something you'd regularly use in Haskell, if at all.
It's for FFI as well as manual memory management
>>
>>56239500
Most enjoyable subject of math for me. Deeper understanding of modulo helps me a lot to this day.

int size(QueuePtr q)
{
QueuePtr temp = q;
int size = 0;
while(temp->next != 0)
{
size++;
temp = temp->next;
}
return size;
}
>>
>>56241193
Is that what discrete math normally means? My uni's discrete math course was purely set theory.
>>
>>56240930
cs50 teaches C but also a lot of basic computing concepts including web stuff. There's also an introduction to python course by MIT though i haven't gone through that one yet so i don't know how good it is.

You can find both on edX
>>
Should I Python or SICP? I can speak Java already
>>
>>56240609
What personal ideas do you have?
>>
>MIT LITERALLY replaced SICP with Python
How does this make you feel?
>>
>>56241267
An app that makes fart noises when you shake your phone.
Tetris with dicks instead of bricks.
Abortion simulator.
>>
>>56241323
Great ideas! The tetris remake is really intriguing.

I'd start of by making a tetris clone and then reskin the bricks. I think a sprite with three seperate images would suffice - one testicle image, one shaft image, and one head.

L/J:
[S][S][H]
[B]
I:
[S][S][S][H]
O:
[B][B]
[B][B]
T:
[B][S][B]
[H]
S/Z:
[H][S]
[S][H]

I'm not quite sure about the S/Z but maybe you can figure something out. I recommend you still tint the blocks in the standard colours, but with enough opacity to make the dicks really shine through.

If you get stuck anywhere while making the clone, just (You) me and I'll assist you. I can't help you with the sprites, since staring at dicks all day has a weird effect on me.
>>
File: sarah_mcdaniel_1[1].jpg (112KB, 1024x829px) Image search: [Google]
sarah_mcdaniel_1[1].jpg
112KB, 1024x829px
cout << pointer->stringMember;


Why cant I dereference a string member from a pointer and print it on the standard output?

error text says no operator ""<<" matches these operands
>>
>>56241448
cout << (pointer->stringMember);
>>
>>56241448
Works just fine.

https://ideone.com/MPVQbT
>>
https://youtu.be/WDIkqP4JbkE

Great talk on CPU caches
>>
>>56241506
old news, post something interesting
>>
>>56239389
>without coordinates: no matrix
>with coordinates -> MATRIX

what the hell does this mean
>>
>>56241492
doesnt work

>>56241503
must be another problem with my implementation then, ill keep digging. thanks
>>
>>56241441
The S/Z can be a bent duck.
>>
>>56241510
https://www.youtube.com/watch?v=ame2PH67gnk
>>
>>56241510
Yet a bunch of people still aren't aware of it

How many have seen linked lists in the wild?
>>
>>56241550
What type is pointer? How is it defined? How is it declared? What type is stringMember? Did you explicitly include iostream & string or are they included indirectly by other standard headers?
>>
>>56241448
Because you suck.
Show us the header of the object.
>>
>>56240160
Good idea here. My first "useful" C program was one that generates a makefile just how I like it for any given .c file. Still use it today.
>>
File: spain.png (2KB, 402x402px) Image search: [Google]
spain.png
2KB, 402x402px
post the last piece of code you wrote
>>
File: Capture1232.png (7KB, 236x237px) Image search: [Google]
Capture1232.png
7KB, 236x237px
>>56241647
>>56241578
>>
>>56241319
Not too bothered. SICP is not about the language but the approach to programming. I think they can try to achieve the same end goal.
>>
>>56241789
>>56241492
>>
>>56241807
Try this.

tmp->itemName.c_str();
>>
>>56241807
Did you try including <string>? I'm pretty sure it's the string header that overloads the << operator for streams.
>>
>>56241835
>SICP is not about the language but the approach to programming. I think they can try to achieve the same end goal.
They literally said SICP is worthless now, and so is learning data structures, because you can just import them.
>>
I'm trying to learn numpy and I really don't understand how to iterate on elements on a matrix.

I need to do something as trivial as:
for(m=1000000; m != 0; --n){ 
for(n=1000000; n != 0; --n){
// Do shit between matrix elements like:
matrix[m][n] = matrix[something][something] * ...
}
}


The most obvious thing would be to use the "range" function to write the exact same thing in python, but the point of numpy is that python is slow and to iterate on an array I should use numpy.nditer, but I have no idea how to use it in this case. Suggestions?
>>
>>56241861
Try harder
>>
>>56241890
I think that's because your matrix operation seems to be unnatural.
>>
File: ?.png (7KB, 120x120px) Image search: [Google]
?.png
7KB, 120x120px
How would you sell a comb to a bald person?
>>
>>56241892
http://www.posteriorscience.net/?p=206
Straight from Sussman, too.
I think he's senile
>>
File: SvajHUx[1].jpg (155KB, 640x1136px) Image search: [Google]
SvajHUx[1].jpg
155KB, 640x1136px
>>56241855
>>56241859
both these work.

thank you anons.
>>
>>56241890
You are supposed to use matrix operations. Have you taken linear algebra?
>>
for my software development class we have to make something as a group through the whole semester and i want to make something that can help you meet up with other musicians if you're looking for a band or band members. do you think a website like that would be too trivial? the professor said he's rarely even seen people make the mistake of doing too easy of a project and students usually err the opposite way
>>
>>56242158
Seems fine if it's fully functional. You have one semester probably along with other classes so realistically you might be able to put 200 hours into it total. Do you think you can set up a fully functional site in 200 hours? And what kind of site? Will it be profile-based? ad-based (like ebay for musicians)? dating-site-esque? More than one? It will never the less take a lot more time than you expect.
>>
>>56242136
I'm not working on a linear algebra problem, I basically need to calculate the sum of the elements along a certain path on the matrix
>>
>>56239893
its popular and therefore bad
>>
>>56242158
maybe consult with what your teammates want as well
>>
>>56242136
It's far better to make something simple well with many useful features than to make something really complicated poorly that only has a few functional features.

As long as you spend your time wisely and put any extra man hours into polish and not feature creep then you should do well.
>>
>>56242271
Select elements from the matrix using a vector of indexes and then call sum on the result. It takes some time to think in idiomatic MATLAB, numpy, etc. if you are accustomed to a procedural language.
>>
>>56242354
Woops, meant to quote
>>56242158
>>
File: Tuvix.jpg (33KB, 636x487px) Image search: [Google]
Tuvix.jpg
33KB, 636x487px
>>56239389
>tfw your professors can never live up to Gilbert Strang
Feels bad man
>>
>>56242355
In MATLAB I'd do.
A = magic(6); % some matrix
b = [1,2;3,4;5,6]; % indices
% transform matrix indices into vector indices
b(:,1) = (b(:,1)-1)*size(A,2);
idx = sum(b);
sumofpath = sum(A(idx));
>>
redpill me on typecasting in c
>>
if i wanna webdev should i node or django?
>>
>>56242503
Scala
>>
>>56242531
>Scala

r u serious or meeming?
>>
>>56241789
PrimaryKeys = new SqlConnection(connectionString)
.GetSchema("IndexColumns")
.AsEnumerable()
.Where(x => x.ItemArray[2].ToString().Contains("PK_"))
.GroupBy(x => x.ItemArray[5].ToString()) // group by table
.ToDictionary(x => x.Key.ToLower(), y => y.Select(x => x.ItemArray[6].ToString()).ToList()); // to jagged dictionary
>>
>>56242499
>redpill
>>>/pol/
>>
>>56242499
TypeA var_of_TypeA = (TypeA)var_of_TypeB;

It's UB if the two types aren't the same size or integral types that have predefined casting rules (like int to long, sign int to unsigned int, or float to double, etc.).
>>
>>56242539
Scala's a good language for web backends.
>>
>>56239827
I thought this said daily medication routine at first and was gonna ask what you recommend

wew..
>>
Got an interview for my first programming job tomorrow. Wish me luck lads.
>>
Is there a universally recommended first language around here? Something that I can pick up quick just to understand programming as a concept, even if it can't do much on its own.

I've downloaded a few books, including one on C, but I'm wondering if that'll be too heavy to start with. Should I just learn bash scripting or something first?
>>
>>56242699
C#

C is too low level and ancient, it's got very little transferrable knowledge and only really applies to people looking to get into academia or embedded systems, etc.

Java is garbage for many reasons, Python and Javascript are both babbys first languages that nobody should use unless they have a specific reason to and most of the C++ and equivalent level languages are a bit old and needlessly complicated for the vast majority of devs.

Depending on what you want to do exactly, some languages might be a better fit for you, but for general development there's nothing quite like C# around right now, it's fast, high level, easy to work with and you can do anything with it.
>>
>>56242737
>C#

I don't use Windows, though. Also I heard C# and Java are similar, so should I learn Java then? Or do you have a second choice if I can't work with C#?

Sorry if C# works on multiple platforms, I just associate it with Microsoft and Windows for some reason.
>>
>>56242699

I'd say either Python or C (you probably want both in the long run).

Python has a lot of "Python as first langauge" tutorials and will give you motivation very fast.

C is pretty neat and not so complicated. It's just that you have to be more precise.


I learned Java as first langauge and I which I would have learned C earlier. Because with C knowledge, some concepts in Java make more sense.
>>
>>56242763
I have started to learn Python and C in the past but lost my motivation not far into each book. I posted here the other day and some anon told me to get some vitamin D. I got some and now I'm back.

Which books do you recommend for Python or C? Just in case they're different from what I have and I can try something new.
>>
>>56242757
C# will run on just about anything these days.

Xamarin, Mono, .NET Core, Unity's IL2CPP tech, etc.

>>56242763
People like this are stupid, C is far too low level and very unique to the point where it's a detriment to learn it as a first language most of the time. Development time for even the most basic of things is incredibly slow and difficult. If you want to learn about how software works at a lower level it's a nice little curiosity, but if you ever actually want to make anything then it's really not good at all.
>>
>>56242737
>C#
Fuck off troll
>>
File: 952.jpg (12KB, 203x303px) Image search: [Google]
952.jpg
12KB, 203x303px
>>56242804
>I have no valid arguments

Quality post, 10/10 would reply again.
>>
>>56242699
>>56242737
C and the Big 4 are generally recommended. The Big 4 are: C++, C#, Java, and Python. Personally, I recommend either C# or Java if you pick one of the Big 4. C++ will come with C, and Python is a week or two max if you start with any of the other 5 languages. I will say that Python has a lot more "beginner's tutorials" than any of the other languages, though.

EVERYONE learns C sooner or later who isn't a pajeet or a webshit. It's not a great language to self-teach unless you're an actual NEET with infinite time, but if you go to school (read: NOT free online courses from edX/coursera) or have that free time otherwise, it's not a terrible place to start.

All in all, it's not that you have to learn a specific language , but the concepts behind programming; developing problem solving skills, algorithms, using math concepts, etc. You could start out by learning COBOL or Visual Basic and it wouldn't matter so long as you learned the concepts of programming. Don't touch any of the internet languages (Javascript, Ruby) for your first unless you want to be eternally trapped in webshit hell, though.

>Sorry if C# works on multiple platforms
C# is cross platform even though it's something from MS, it's probably the single-best creation they've made and maintained.

Unrelated, why the fuck don't we have a wiki entry for this shit? We have one that just generally goes over languages and that's it.
>>
>>56242795

Well, for C the gold standard is "Kernighan & Ritchie":
>https://hassanolity.files.wordpress.com/2013/11/the_c_programming_language_2.pdf

I'd recommend a paper version of the book though.

Yes, C is hard at the beginning. It's pretty close to "how computers do things" and gives you a feeling for what actually happens "under the hood".

But if you put some efforts in it, it will be very rewarding. Even if you choose to not learn C right now because aforementioned reasons, you should lear it some day. It's a very important langauge, for example windows and Linux are written in C. Python is written in C. Ruby is written in C.

Yes, every Python statement turns into multiple lines of C code without bothering you. That's cool because if you want to do somethin Python makes it very easy.


But let me tell you a secret:
EVERY first programmign langauge will be very hard for you. Because programming is not only about remembering some word, it's about grasping concepts, understanding algorithms, structuring data, making design decisions..

So put a month of work into a langauge of your liking and do some "/g/ programming challenges". Then choose if you erally want to learn that langauge any longer.


After one or two programming langauges it gets a lot easier.
>>
>>56242939
>It's pretty close to "how computers do things" and gives you a feeling for what actually happens "under the hood".
lemaw
>>
>>56242926
> why the fuck don't we have a wiki entry for this shit?

There's a wiki?

No one can agree anyway, there are a lot of people who would agree with any one of the big 4, quite a few of those would specifically point at C# even. But the vocal minority of diehard autists will insist that if you don't start with Assembly then you're a pleb who doesn't even deserve to own a computer.
>>
File: 1466357136698.jpg (213KB, 853x910px) Image search: [Google]
1466357136698.jpg
213KB, 853x910px
>>56242926
>big 4
>meme snake
>>
>>56242926

> Don't touch any of the internet languages (Javascript, Ruby) for your first unless you want to be eternally trapped in webshit hell, though.


Ruby can do everything Python does + plus a lot of stuff more, since it has a lot of tools from Lisp, Perl, Smalltalk and JS.

I'd never recommend it as a first language, because it looks deceptively easy but will give you a lot of responsibility. And it's just as slow as Python. But don't shit on it's langauge design, it's pretty close to perfect and influenced many of the modern languages afterwards.

[/Rant]
>>
>>56242926
>It's not a great language to self-teach unless you're an actual NEET with infinite time,
I am an actual NEET but I don't know if I have the focus to effectively use all my time and learn C, so I'll probably start with something else and come back to it later.

>>All in all, it's not that you have to learn a specific language , but the concepts behind programming; developing problem solving skills, algorithms, using math concepts, etc.
This is what I've been hearing, which is why rather than ask for the 'best language' or whatever, I'm looking for one that'll help me learn the basics so I can go my own way sooner and more easily.

>>56242939
>I'd recommend a paper version of the book though.
Why? I saw an image or something once saying something like this because 'if you just download it you'll never read it anyway, like all that anime you download', but I don't really think I'd be more likely to read a paper book, and I'd be out money if I got a physical one.

>But let me tell you a secret:
>EVERY first programmign langauge will be very hard for you. Because programming is not only about remembering some word, it's about grasping concepts, understanding algorithms, structuring data, making design decisions..

This is actually really comforting to hear. I've been feeling pretty stupid trying to get started on this off and on for a couple years now, but hearing that it's hard for everyone kind of makes me want to try harder.

>So put a month of work into a langauge of your liking and do some "/g/ programming challenges". Then choose if you erally want to learn that langauge any longer.

Thanks! Having a specific timeframe and goal in mind will help also.
>>
>>56242939
>muh under the hood
It is $TimetellingLiberal and people still believe that this is an excuse to put people through the ringer instead of teaching them fundamentals beforehand. You learn to ride a bike by falling down and getting back up, not by building the bike from parts first.

>>56243008
Them's just the facts. You may not like molassesSnek but it's definitely in the Big 4.

>>56243023
>[/Rant]
>>>/g/wdg/
>>
File: 1454012103930.png (25KB, 144x226px) Image search: [Google]
1454012103930.png
25KB, 144x226px
Are all the gui libraries just wrappers for the win32 api?
>>
Are there any /g/ recommended editors for java, C and C++ or should I just google and download the first I find?
>>
>>56243111
I find microsoft word works pretty well for me for java

has built-in spell check too which is nice for programming
>>
>>56243111
>c
text editor
>c++
visual studio
>java
intellij
>>
>>56243136
Seconding microsoft word, top tier IDE in all honesty.
>>
>>56243136
>>56243150
thx senpaitachi
>>
>>56243111
vim
>>
>>56239783
Engineering is for people too stupid to become doctors.
>>
>>56242678
Good luck, m8.

What kind of programming job?
>>
>>56243111
>google and download the first I find
always a bad idea

But the answer is vim
>>
>>56243051

>if you just download it you'll never read it anyway, like all that anime you download

That's exactly the reaon.

You drive with the bus? Read some pages in your Programming book. Wait for someone? Read your book. You even put it in your toilet and read it when you're.. well, you got the point.


I used to collect some Ebooks as well but it's so much harder to motivate yourself after two days to keep on reading it. Too much distraction.

And a few bucks a great investment in your future, right?

>I've been feeling pretty stupid trying

You know what? The first year at university I hated Java. I hated programming. Nothing made sense, everything seemed so complicated. I made an internship somewhere and programming was still wired but OK.

But after a while it gets really fun. You somehow "see the matrix" and get a deeper understanding of programming: in the end everything is just code. Data is code. Data structures are code. Immutable values are code. It's only the WAY you look at it that makes the difference.

>Thanks! Having a specific timeframe and goal in mind will help also.

You're welcome.


And let me give you one last advice:
Sooner or later - or even now if you want to - you should look into "Structure and Interpretation of Computer Programs".
>http://folk.uio.no/bjornove/sicp.pdf

It teaches the language Scheme, which is a Lisp dialect and the book was the intro course at the MIT before they switched to Python as first langauge.
It's well written, but in the middle it gets complex, since they don't care about "programming" in the first place, but especially about teaching you concepts. It's a very good book though, you should read it some day. But if you feel confused by it read it after you learned C or Python, it will change your perspective.
>>
File: newlogo-repro.png (8KB, 360x361px) Image search: [Google]
newlogo-repro.png
8KB, 360x361px
input_text = get_text().split()
if not input_text:
return
input_text.pop(-1)
last_removed = ' '.join(input_text)
if len(input_text) > 0:
last_removed = last_removed + ' '
set_text(last_removed)


in bash theres ctrl+w shortcut that deletes last word in the current line
I wrote this to get same functionality for my application, its fine, but it feels kinda meh
you got something better to remove last word from string input?
>>
since it's a math themed thread, does /dpt/ want some simple math problems for kids?
>>
>>56243241
ok but in return you have to write a brainfuck program to multiply two inputs
>>
>>56243230
string test = "Hello, World!";
test = test.Remove(test.LastIndexOf(' ')-1); // "Hello,"


Man I love C#. Everything is so easy.
>>
input_text = get_text().split()[-1]
>>
File: 8795f38fdae5367a30dd01dea5ecd367.png (384KB, 1024x768px) Image search: [Google]
8795f38fdae5367a30dd01dea5ecd367.png
384KB, 1024x768px
>>56243217
>You drive with the bus? Read some pages in your Programming book. Wait for someone? Read your book. You even put it in your toilet and read it when you're.. well, you got the point.

I rarely leave the house desu.

More importantly, don't most program books require you to have a computer to run stuff on? I feel like having a pdf of the book open next to a terminal is better for this reason. Maybe that's some dumb reasoning, though.

>And let me give you one last advice:
>Sooner or later - or even now if you want to - you should look into "Structure and Interpretation of Computer Programs".
>>http://folk.uio.no/bjornove/sicp.pdf

I have seen SICP memes around (pic related), but this might be the first time it's been genuinely recommended to me.


My plan now then is to resume my Python book and possibly buy a copy of K&R for the future. I'll also save the pdf of sicp to check out later. You've given me a lot of good info. Hopefully I can discipline myself and actually start learning now.
>>
>>56243294
I believe that gives you the last word
>>
>>56243111

>Are there any /g/ recommended editors for java, C and C++

For the beginning, a text editor (I recommend Notepad++ for Win and Geany for Linux) will do. installing a langauge can be difficult, especially for Java the are some steps you have to do first. Read some tutorial for that.

Python and C are preinstalled on Linux.


After a while you want to use:

Netbeans is a simple and well designed "works out of the box" editor.

Eclipse it like Netbeans, but more common. IT's cool but you have to do some configuring yourself.

IntelliJ IDEA is a very nice editor, but it costs money.


If you want to be a cool Hacker(tm) you want to use:

Vim (texteditors where you use only the keyboard)
Emacs (similar to Vim, but a other combinations)
Sublime Text (cool text editor, but also costst money)
>>
>>56243271
fair enough, just give me a sec to copy those problems down
>>
>>56243101
Kinda yes, you have the higher level abstraction that implements the GUI functionality and shit and then lower level implementation of platform specific functionality based on WinAPI, Xlib and Cocoa.
>>
>>56243308
What about [:-1]

I don't know Python honestly.
>>
>>56243323
yeah that would get the rest, but as a list of items that got splitted by split()
>>
>>56241214
graph theory to optimise graph problems
number theory and modular arithmetic to understand cryptography
learn to solve recursive funtions
>>
>>56243312
>IntelliJ IDEA is a very nice editor, but it costs money.
Are you sure? I'm pretty sure I have it and didn't do anything sketchy.
>>
>>56243217
>But after a while it gets really fun. You somehow "see the matrix" and get a deeper understanding of programming: in the end everything is just code. Data is code. Data structures are code. Immutable values are code. It's only the WAY you look at it that makes the difference.
This. The more you even just sit around looking at it, the more it makes sense. Lurk the tech community overall, not just here; it all helps.

Do what this anon said; read you some SICP. I'd also suggest getting back into the swing of math. Start all the way back at Algebra if its not fresh in your mind. It's all part of the process and it doesn't just magically happen over the course of a month or two.
>>
>>56243308
popping is probably your best bet then, I can do this with regex too but it'd be more complicated

>>56243345
it's not very difficult to rejoin an array, it's like 2 lines of code
>>
>>56243282

I python that would be:

test = "Hello, World!"[:5]
>>
>>56243312
>>56243177
>>56243150
>>56243136

good infos m8s, someone should put them in the /g/ wiki as when I searched it lacks a section of recommended programming tools.
>>
How much time should I spend programming each day as a beginner trying to learn? I keep picturing you guys programming all day, but maybe that's not quite accurate.
>>
>>56243304

>Maybe that's some dumb reasoning, though.

It's OK. I just got the impression that learning with pdfs is bad for long term motivation. But whatever floats your boat..


>but this might be the first time it's been genuinely recommended to me

I first saw it on /g/ and after hearing about it for a dozen times I decided to read it. It really made my a better programmer, I think, even though I'm porbably not gonna use Scheme in the future.

>.. and actually start learning now.

That's it.

Don't spend too much time figuring out "what's the best language to learn"..

You won't regret neither C nor Python, so just give each of them langauges a month of dedicated work, it will become clearer then.
>>
>>56243372
I can't tell if this is a serious post or not.
>>
>>56243364

Ah right, there's a community edition now, right?
I'm a Vim guy so I haven't checked for ages.
>>
>>56243489
I'm also a vim guy, honestly. I just heard Intellij Idea was good for Java dev and so I grabbed it in case I ever get into that.
>>
>>56243438

>How much time should I spend programming each day as a beginner trying to learn?

Do one simple task, for example from here:
>https://coderbyte.com/

If you feel motivated after that, do another one.


But don't force yourself. Take your time, let it sink in.
>>
File: 1.png (18KB, 300x800px) Image search: [Google]
1.png
18KB, 300x800px
>>56243271
The first one for warm-up: fill the missing digits to make proper operations
>>
>>56240618
That's silly. Just hash the images.
>>
File: 2.png (9KB, 300x1200px) Image search: [Google]
2.png
9KB, 300x1200px
>>56243749
second one
>>
>>56243282
Love me some Python.

>>> test = "Hello, world!"
>>> test = test[:test.rfind(' ')]
>>> test
'Hello,'
>>
>>56241932
Scalp massager
>>
>>56243271
and here's your multiplier, result is in the second frame:
++>++++<
[-
>
[->+>+<<]
>[-<+>] >[-<+>]
<<<
]
First time writing in bf, I know it could probably be done better but whatever
>>
>>56244053
(oh, and input is in the first two frames)
>>
So I am trying to do this:

 
public class Exercise8_1 {

public static double[] powarray(double a[]){
for (int i = 0; i < a.length; i++){
a[i] = Math.pow(a[i], 2.0);
}
return a;
}
public static void main(String[] args) {
//1. Userinput sets array size
System.out.println("Please enter the size of the array: ");
Scanner sc = new Scanner(System.in);
int array = sc.nextInt();
double[] ars = new double[array];
System.out.println(Arrays.toString(ars));

//2. put double numbers into each memory, space whatever.
System.out.println("please enter the numbers for your arrays: ");
while (=< array){
double hm = sc.nextDouble();
// here it should pass the double into the current cell of an array and get the other cell in line....
System.out.println("Please enter a number for the next cell: ");

}
}



What would the condition be?
Help?
>>
>>56243136
i binded emacs keystrokes in word and it is the best ide for small-medium projects in about every imperative language (haskell fags need not to apply)
>>
>>56244219
Haskell fags don't need to worry about keystrokes, they're making millions less
>>
>>56244246
and calling a million more
>>
>>56243136
>microsoft word

please be bait
>>
>>56244326
Excuse me, Sir?
>>
Doing unpaid overtime once again ;_;
>>
>>56244360
what job? programming?
>>
>>56244360
I'm not familiar with this term
Does that mean you're being forced to stay overtime and not being paid your time and a half?
Or they're simply not paying you at all?
>>
>>56239580
Alright so here's the question.
Do you ACTUALLY know CSS or do you just know of it? Do you know all the little nuances that go into making a web page or application look nice without hardcoding everything? Do you know how to move scrollbars to any element you wish? Can you implicitly manipulate elements without directly modifying any CSS on that particular element?
>>
>>56244385

It means they lock you in the office and don't let you out until you've done your fair share of the work.
>>
File: new-game-aoba.jpg (51KB, 589x375px) Image search: [Google]
new-game-aoba.jpg
51KB, 589x375px
>>56244381
Android fart apps.
>>56244385
Not paying at all. I could try to ask the manager, but usually they'll tell something like 'that's part of your job'.
>>
>>56244417
i started feeling sorry for you, but then i saw your animu weeboo pic.

get fucked
>>
>>56244385
>>56244417
It's not that you're "not getting paid"; if you work on salary, you are agreeing to work as much as needed (within reason) as the job requires.

As of Dec. 1st 2016, if you make less than $47,000 or so, this will no longer be the case and your employers must pay overtime for more than 40 hours of work.

At the moment, that threshold is like $23,000.
>>
File: hqdefault.jpg (15KB, 480x360px) Image search: [Google]
hqdefault.jpg
15KB, 480x360px
>>56244462
Don't worry, you'll turn full weeb too eventually.
Welcome to 4chan. Enjoy your permanent stay.
>>
>>56244477
This. Even though I'm not living in the US, it's fair to require your employees to work overtime.
>>
>>56244478

no.
Fuck anime.
>>
>>56244478
I disagree. I've been on 4chan for years and I'm not even close to being a weeb. The trick is to avoid worthless mainstream boards full of animu shit.
>>
File: unix-cargo-small.jpg (29KB, 400x300px) Image search: [Google]
unix-cargo-small.jpg
29KB, 400x300px
>>56244326
>not writing Operative Systems in the best editor ms made
>>
>>56244417
>>56244478
At least this is actually programming related, apparently.

Love it or hate it, anime is a part of 4chan culture as a whole.

I'm not sure why anyone would get all excited when it is or isn't posted. Who cares?
>>
>>56244512
The problem is that they don't pay for it.
>>
>>56244360
>>56244417
>>56244478
Why are you posting low quality images from a stream
>>
>>56244563
There are boards on 4chan where no animu is posted at all.
>>
>>56244568
Yes they do.

You agreed to be paid $60,000 a year, not $28 per hour every 40 hour work week.

In almost every state in the US, a salaried employee over a set threshold is obligated to work as many hours as the job requires.

If this is really that difficult for you to understand, then of the overtime as "built-in", and that you're already being paid overtime every week, in the event that you do actually work overtime.
>>
>>56244563
>At least this is actually programming related, apparently.
Barely. It is a show about gamedev, but it heavily focuses on the art team making models. Aside from them there's one person who sits nearby on the motion team (her work isn't shown much, though), and one of the programmers was introduced but she didn't talk much about programming, just came to complain about errors from one of their models.

It is a good and comfy show, but if you go in expecting cute programmers then you will be pretty disappointed.
>>
>>56244580
post a comparison pic from the same parts
>>
>>56244603
It's not that you have to post anime, it's more that it's ridiculous to be anti-anime when this is an anime website. Of course in a programming thread on a technology board, it's unlikely to have anime discussion, however it's a given that everyone here is a fan of anime since this is the programming thread of an anime website.
>>
>>56244563
As long as it's somewhat related, I don't mind.
>>56244568
It's a bit shitty, but that's how Dutch law works.
>>56244580
Too lazy to make screencaps, so random google images will do.
>>
>>56244655
honestly i can't take you seriously when you keep avatarfagging with the same purple haired anime in every post
>>
>>56244077
I DID IT!
public class Exercise8_1 {

public static double[] powarray(double a[]){
for (int i = 0; i < a.length; i++){
a[i] = Math.pow(a[i], 2.0);
}
return a;
}
public static void main(String[] args) {
//1. Userinput sets array size
System.out.println("Please enter the size of the array: ");
Scanner sc = new Scanner(System.in);
int array = sc.nextInt();
double[] ars = new double[array];
System.out.println(Arrays.toString(ars));

//2. put double numbers into each memory, space whatever.
System.out.println("please enter the numbers for your arrays: ");
for (int i =0; i<array; i++){
double cell = sc.nextDouble();
ars[i] = cell;
//this works
System.out.println(Arrays.toString(ars));
System.out.println("And the next one? ");
}

//3. transfer them into powarray
powarray(ars);
System.out.println(Arrays.toString(ars));
}


}

Now, is this generalized enough?

Output:
Please enter the size of the array:
3
[0.0, 0.0, 0.0]
please enter the numbers for your arrays:
1
[1.0, 0.0, 0.0]
And the next one?
2
[1.0, 2.0, 0.0]
And the next one?
3
[1.0, 2.0, 3.0]
And the next one?
[1.0, 4.0, 9.0]

Process finished with exit code 0
>>
>>56244568
Isn't there an institution or something like that in the us where you can call them and anonymously tip shit like that, and they'll raid the place and check if everyone is working on conditions required in your job agreement, and if the agreement is even legit at all?
>>
File: haskell is shit.png (4MB, 4712x3000px) Image search: [Google]
haskell is shit.png
4MB, 4712x3000px
>>56244626
Here is a simulation of what it may look like.

>>56244655
>It's a bit shitty, but that's how Dutch law works.
That's how it is in the US, too.

Hell, that's how it is in most of the world. Salary means you might work more than 40 hours a week. That's between you and your employer.
>>
>>56244691
They'll find out it was you and have you fired and blacklisted from the industry.
>>
File: asdf.png (11KB, 744x118px) Image search: [Google]
asdf.png
11KB, 744x118px
>>56244691
>Isn't there an institution or something like that in the us where you can call them and anonymously tip shit like that
It's legal if you're on salary in the US, you fuckwit.

Obviously, most details depend on the state. See pic for Texas law: basically, if you don't like it, then quit.

And yes, you can call your local workforce commission hotline anonymously if you think they're doing something illegal. They will start an investigation with whatever proof is provided.
>>
>>56244706
>They'll find out it was you
Right. Because I'm retarded enough to do it in a way that they could find out.
>>
>>56239586

>written the person who invent calculus himself
>it was so easy it took centuries to develop and most people who take it still have a lot of difficulty actually comprehending what it means

overcompensating much, you sperg
>>
>>56244682
Build times are insanely slow for this project, so I have lots of time to find a decent image and prepare my shitpost. Have a avatarless post my friend.
>>56244692
You're right, assuming you don't work for an hourly wage. I get paid 2500 (before tax jews) a month to do my job. Obviously, it's unreasonable to let your employees work overtime every day up until midnight.
>>
>>56244731
>It's legal if you're on salary in the US, you fuckwit.
I don't know how the labor law works in the US, that's why I'm asking. It's not like that everywhere.
>>
File: 1465551949122s.jpg (7KB, 211x212px) Image search: [Google]
1465551949122s.jpg
7KB, 211x212px
>>56243179
Why would you say that anon

You know everyone is different, did your parents get divorced early on?
>>
>>56244804
My hostility stems from the fact that you immediately jumped to figuring out how to report the business so they can "raid the place", rather than asking where to find information on labor laws so that you can educate yourself first.
>>
>>56244822
and my jumping from one thing to the other stems from it not being normal where I worked so far.
>>
>>56244820
>>56244820
>Why would you say that anon
because being egdy on anonymous imageboards benefits him in some sick, sad way.
>>
>>56244360
rape your boss desu
>>
>>56244477
This.

I'm in a similar boat. I don't complain though. My work ranges anywhere from 10 to 80 hours a week depending on what we're working on. I get paid salary so I just work overtime when I need to.
At 97k, I can't really complain.
>>
>>56240410
b ^= (b ^ a) & 0x0F;
>>
>>56241193
int size(QueuePtr q)
{
int size;
for (size = 0; q = q->next; ++size);
return size;
}

Concision is key.
>>
>>56244732
You don't understand how these things leak.
All it takes is someone having rogue contacts in the right department and you're outed.
>>
>>56244882
Good idea.
>>56244890
>97k
I doubt you're a CRUD monkey. What is your main occupation?
>>
How much hours a week do you guys work? If it's over 40, you're getting fucked.
>>
>>56241214
Discrete math is literally cherry-picked topics from entire math for their usefulness in computer science, and can mean very different things depending on who's teaching.
Knuths book can be thought as canon for discrete math.
>>
>>56245109
I'm a lead dev for engineering systems at Textron aviation.
>>
>>56244736
Coming up with and learning what someone else came up with are entirely different
>>
>>56245314
Do you work on the training simulators? That sounds like a cool project to work on.
>>
>>56243111
>Are there any /g/ recommended editors for java, C and C++ or should I just google and download the first I find?
Has anyone here tried UltraEdit? Its an editor that has been around for 20 years, it has all the features of an IDE to the point that you can import Visual Studio projects and yet it is streamlined enough that web programmers like it. Im surprised more people dont know about it.
>>
redpill me on binary number multiplication
>>
>>56245534
jews are behind it
>>
File: gTDbRHK.png (410KB, 948x735px) Image search: [Google]
gTDbRHK.png
410KB, 948x735px
Currently working on an image output for the console, my color approximation kinda blows ass and there's really not enough definition - pretty sure my euclidean distance calculation that I'm using is garbage.- but it's a start.
>>
File: SLgXfIX.png (41KB, 454x799px) Image search: [Google]
SLgXfIX.png
41KB, 454x799px
>>56245587
Here it is working with three times the resolution and the minimum available font size.
>>
File: yeeeeah.gif (13KB, 200x200px) Image search: [Google]
yeeeeah.gif
13KB, 200x200px
Which looks better to you?
if ((*str & 0xC0) != 0x80) count++;

count += ((*str & 0xC0) != 0x80);
>>
Visual studio baby here.
What's a makefile?
>>
>>56245628
It's a build script.
>>
>>56245620
if ((*str & 0xC0) != 0x80) ++count;
>>
>>56245620
the first but the second is probably faster.
>>
>>56245620
The second
>>
>>56245728
No
>>
>>56244820
It's applying the same retarded logic of the original post.
>>
File: condraw.png (43KB, 800x602px) Image search: [Google]
condraw.png
43KB, 800x602px
>>56245587
>>56245619

I suggested skipping vertical lines, so elect to use y += 2, rather than y++.
>>
>>56245692
They're identical with -O2 optimization.
>>
>>56245911
Now try with -Ofast.
>>
>>56245923
still identical
>>
>>56245928
try -O1
>>
>>56245945
still identical
>>
>>56245945
>>56245923
>>56245911
>>56245928
>>56245728
>>56245692
>>56245673
>>56245620

This is why I don't post here anymore.
You people do nothing but bikeshed over syntax.
>>
>>56245969
try -O3
>>
>>56245620
If you're a tryhard, the second.
Otherwise, the first.
>>
>>56245994
Are you a tard?
>>
>>56239389
>Apress Accelerated C# 2010
This is the (only) book on the wiki for C#, is it dated?

Should I use it or something else to learn C#? Any recommendations?
>>
>>56246010
Why don't you take a guess?
>>
>>56246042
more efficient
>>
File: ESrb7.jpg (32KB, 541x186px) Image search: [Google]
ESrb7.jpg
32KB, 541x186px
>>56245628
It's a file containing arbitrary build scripts, and preconditions for running them, in terms of "file X depends on files A, B, and C."

There's a Unix program called "make" that interprets this file and recursively compares the modification dates on all the files you mention. If X is older than any of its dependencies, or if X doesn't exist, then it runs the build script attached to that rule.

Makefiles were designed for building C projects, but because of the C header model, it was always kind of shitty for that purpose. Modern languages generally don't need you to define this shit by hand and modern IDEs are pretty smart about setting it all up automatically, even for C and C++.
>>
>>56245928
try -Og
>>
>>56245969
Liar
>>
>>56246042
have you tried -OKitchenSink ?
>>
>>56246054
-std=c99
absolutely disgusting
>>
>>56245911
Try with -O0, asshat.
>>
>all these negative people

try +O2
>>
>-O(2)

>not -O(log n)
>>
tell me about data oriented design

is oop obsolete in a time of caches and parallelism?
>>
-Osuck-muh-dick
>>
File: 1468527145474.png (91KB, 630x686px) Image search: [Google]
1468527145474.png
91KB, 630x686px
>build a library
>the code is absolutely shit
>people start using it anyway
>mfw I realize thousands of projects depend on my shit code
>realize the libraries I depend on are probably shit also
>realize it's shit all the way down
>>
>>56246154
Rewrite your library but don't touch the external interface.
>>
>>56246154
Libraries were a mistake. Now Pajeets just "import browser" and think they have created a web browser.
>>
>>56246145
OOP is obsolete in every possible set of terms
>>
I was thinking of using my rpi for a project, I want to do note and chord recognition of my electric guitar either from microphone input or in case that makes things too hard by directly connecting it.

I am pretty much clueless regarding audio processing, so if anyone has some good resources related to this sort of thing it would be appreciated.
>>
>>56246090

>>56245692
>>the first but the second is probably faster.
>caring about speed
>not compiling with optimizations

First one would still be faster, as it would ignore one add instruction if the if condition is true.
>>
Try -CO2 to fight global warming!
>>
File: workflow.png (34KB, 278x386px) Image search: [Google]
workflow.png
34KB, 278x386px
>>56246163
>>
>>56246191
This was written by someone who removed an actually useful feature, wasn't it?
>>
>>56246175
Branch instructions are slower than add instructions, tard.
>>
>>56244731
This is how it should work. An employment contract is a private contract. Just like private bedrooms, governments shouldn't interfere with private contracts.
>>
>>56246201
gotta get rid of that feature bloat man
>>
File: 590VCJO.png (25KB, 300x741px) Image search: [Google]
590VCJO.png
25KB, 300x741px
>>56245866
Tried adding them in but it added a whole heap of unavoidable noise.

This is how it's looking now, a lot better.
>>
>>56246202
>what is branch prediction
>>
>>56246201
>tfw gnome
>>
>>56246233
>what is branch misprediction
Enjoy cleaning the pipeline every time a misprediction happens, faggot.
>>
>>56246236
>>56246228
>option to disable botnet
That feature bloat though.
Who would actually use that option?
>>
>>56246231

Skipping lines really does make the overall effect better because chars are not square.
>>
>>56246265
STFU OSGTP
>>
>>56246265
I'm somewhat okay with the stretching caused by the non-uniform characters, it adds a little something.

As a trade-off for the extra noise it adds in higher resolution images I'm somewhat okay with it.

Any requests for stuff to pass through it?
>>
>>56246258
>98% of our users did not use the botnet disabling feature so we removed it from the release v3. 99% of our users did not use the forking, modification and distribution features of the license of our product so we switched to an EULA for the highest quality software experience with no bloat!
>>
>>56246290
New
>>
>>56246202
Readable code is more important than the addition of a branch.
                                                                                unless you run that code 50k times in your main loop
>>
>>56246039
Google "Rob Miles Yellow Book." Easily the best C# introduction/intro to programming book I've read. I used https://www.amazon.com/C-Players-Guide-2nd/dp/0985580127/ref=sr_1_1?ie=UTF8&qid=1472067127&sr=8-1&keywords=c%23 to supplement it whenever there was something I just needed a straightforward explanation for. The "Player's Guide" doesn't stand well on its own if you don't know a language already.


>>56246226
>governments shouldn't interfere with private contracts.
>>56244731
>basically, if you don't like it, then quit.
I'm pretty sure this is called "at-will employment" and according to the link, is enacted and enforced in all states excluding Montana
http://www.ncsl.org/research/labor-and-employment/at-will-employment-overview.aspx
>>
How the hell do I connect the graphics.h library to C? I've tried Codeblocks and Dev, neither wants to compile, claims a file is missing, points to having no such file or directory as sstream. I've linked in the library, that came with the header file, I've linked in some more headers, I've tried everything I could think of. Examples of people using graphics.h to frolic with circles of all sizes are all over the internet, they all just slap the "#include graphics.h" on top of their code and it just works, why won't it do the same for me? I just need a goddamn moving circle, why is programming on windows so hard?
>>
>>56246297
Why the code tags?

Also, both are just as readable.
>>
>>56246145
OOP is unfairly maligned by ivory tower academics so ignorant of critical thinking ability that they throw stones in glass houses. A sincere understanding of the subject matter elucidates genuine dexterity with powerful, expressive object-oriented idioms. It's paramount to distinguish the wheat from the chaff. Inheritance is inheritance, not subtyping. Code reuse is code reuse, not copy and paste. Object-orientation reflects the actual structure of intelligent thought, and that's why encapsulation and polymorphism are valid and usable metaphors both for architecting and engineering a solution to any problem, whether practical or even theoretical.
>>
>>56246315
poor mans [spoiler]tags[/spoiler]
>>
>>56246311
>graphics.h library
graphics.h is not a library, it's a header.
Which library is it from?

>why is programming on windows so hard?
>windows
Why haven't you moved to GNU/Linux yet?
>>
Is this a good stdbool.h implementation?

enum _Bool { false = 0, true = 1 };
typedef enum _Bool bool;
>>
>>56246329
I wept, I slept, I dreamed. Thank you.
>>
>>56246341
How are they spoilers if all the text is readable without any action on my part?
>>
>>56246354
enum needs a FileNotFound

>>56246311
Did you add the path of graphics.h to your PATH environment variable?
>>
>>56246354
no
#define BOOL int
#define TRUE (0 == 0)
#define FALSE (0 != 0)
>>
>>56246202
Not for short jumps, which this is.
http://www.agner.org/optimize/instruction_tables.pdf
>>
>>56246354
No, it does not confirm to the standard.
>>
>>56246373
And this is wrong.

>>56246329
>m-muh ivory tower and academics are trying to clean the loo! Damn them!
>>
File: spoiler.png (11KB, 697x126px) Image search: [Google]
spoiler.png
11KB, 697x126px
>>56246360
It works for me, the code tag cuts off just before the text starts.
>>
>>56246400
>And this is wrong.
Why?
>>
>>56246407
>not using 4chanx
hahahahahaha, fag
>>
>>56246416
Read DA STANDARD
>>
>>56246434
why my implementation of bool is wrong. Please explain.
>>
>>56246350
I've started learning C last Friday and have to hand in the program this Friday, so I decided to put off switching systems until then. I'll put together a Mint or Ubuntu live-CD of some description when I'm done with this project. As for the library, it's called libbgi.a, I think that's the library at least, the zip archive, in which graphics.h, libbgi.a and winbgim.h came was called WinBGIm_Library, I tried including them all and including them separately, linking the .a file in the compiler options and putting it in the include's lib folder, nothing seems to work.

>>56246372
I'm not entirely expirienced, but I think the graphics.h header is being found alright, I've placed it in the project folder, next to main.c, #include "graphics.h" summons it fine, but inside the header it can't go past the #include <sstream> line, says it's missing. Do I just keep downloading more headers to sate the compiler's hunger? Is sstream even a header?
>>
>>56245450
Personally, I don't. My department does.
I'm working on the in house CAD software.
>>
>>56246455
stdbool.h does not define BOOl, TRUE nor FALSE. It also misses 4 defines that stdbool.h provides.
Also, it makes no sense why BOOl is defined to int, true to 0 == 0 instead of 1 and FALSE to 0 != 0 instead of 0.
>>
>>56246478
Does your college force the use of windows?

>but inside the header it can't go past the #include <sstream> line, says it's missing
The header is in C++, not C. It needs a C++ implementation.
>>
>>56246493
Oh you just want a stupid implementation of the shitty and useless stdbool.h header. You're lame.
>>
>>56246540
No, you claimed it was, see >>56246354, of which your post was reply to.
Retard
>>
>>56246532
In my country the school year is yet to start, so I'm not studying the language in college, I've signed up for the extracurriculum C courses instead, and the computer rooms have just the windows machines, I think they might be using windows because they teach the people to use microsoft's office programs there a lot.
Is there a version of the library for C? Or any way to use it in C? I've seen a whole lot of examples of people using it, this is one that got me into thinking that I could implement the graphics element easily: http://www.programmingsimplified.com/c/graphics.h
Ironically enough, I'm having the time of my life writing the math of the program and contemplating suicide every time I try to come back this and try to include the graphics library again.
>>
File: seolhyun.jpg (67KB, 519x700px) Image search: [Google]
seolhyun.jpg
67KB, 519x700px
I need to build a continuous integration pipeline with Docker, Jenkins and AWS by tomorrow. What do?

I know how to make Docker images, containers, all that, and I'm just using AWS for a remote computer. How do I fit Jenkins in the middle?
>>
File: aa.png (7KB, 1121x105px) Image search: [Google]
aa.png
7KB, 1121x105px
>>56246407
>>
>>56246665
Honestly, it seems like some really cancerous library. And no, I do not think you can use it in C unless you fiddle with it:
You would need to remove these lines:
extern std::ostringstream bgiout;    
void outstream(std::ostringstream& out=bgiout);
void outstreamxy(int x, int y, std::ostringstream& out=bgiout);
And not use any of these functions, as well as to remove the C++ headers and the default argument values. Also, this library requires windows to work. No serious school would force you to use this library.

These examples are probably C programs compiled with C++ compilers, you could try that if you want but it's really shitty and you lose many nice C features.
>>
>>56246789
do you feel like a hacker yet?
>>
>>56246798
I guess I'll try to wrap my head around printing circles in OpenGL, as hopeless as that might seem, and download a C++ compiler, if all fails. Thank you!
>>
>>56246863
If you just want to print 2d stuff, consider trying SDL, SFML (the C wrapper) or Cairo.
>>
>>56246849
Why would using a simple convenience addon make anyone feel "like a hacker"?
>>
File: jon_blow.jpg (49KB, 615x347px) Image search: [Google]
jon_blow.jpg
49KB, 615x347px
any thoughts on jai?
Thread posts: 340
Thread images: 44


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