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

File: 1480956343871.jpg (675KB, 940x822px) Image search: [Google]
1480956343871.jpg
675KB, 940x822px
What are you working on, /g/?

Old thread: >>58266868
>>
File: tiny-guardians-ios-3.jpg (722KB, 2048x1536px) Image search: [Google]
tiny-guardians-ios-3.jpg
722KB, 2048x1536px
A few questions.

I have a tiny bit of programming experience, basically just a basic understanding of how it works, which I've been able to apply to C#/C++/Pascal/visual basic.

Anyway, so I kind of want to make the best game ever, probably a phone game (or a computer "phone game").

So the questions
>What language and free engine should I use to make something like pic-related
>How long would it take to make it?
I really would want to make you have a party of up to 5 people, that you control all the character, and they have to be a certain distance away from each other. Then you'd have some spells that your characters can cast.
Then I'd want to apply an "instanced MMO" setting upon it (PvP, and instanced dungeons).
>>
>>58275717
First for perl
>>
>>58275608
Thanks, the linked list approach sounds like a great idea!
>>
>>58275737
>tiny bit of programming experience
>I kind of want to make the best game ever
>MMO

Not going to happen bud.
If you have never made a game before you cannot ever make something you have in mind.
Learn programming first, game development theory and start with much much smaller projects.

Games like you show are made by 10+ people at a time and even they can take years.
>>
>>58275737
>>>/vg/agdg
>>
>>58275717
>>58275688
I'm here to shitpost. when i compare, all the hussles & tweaking in the 90-ties, needed to get some kernel 1.3 / 2.o.35 GNU/Linux up & running, on some Pentium1/24 MB ram or on classicAmiga_12oo 68o40/PowerPC_G2 hybridSymetricMultiprocessing; nowDays allmost every localised desktop distros (Mint, simplyMepis, AntiX, ubuntu,...) which i put in multiBoot, during gnuFeministic & cyberFeministic advocacy & activism, to new folk, who look for help inSide & outSide of a hackLab, i can say: -GNU/Linux is easier & less time consuming to install (halfAnHour per distro, compared to a day to patch, protect (fireWall), driverSolve & userLand (apps) equip any winblou$) -GNU/Linux is easier to use -- all the techical details are hidden from common desktop user, & left to root/admin realm...to the point that some desktop distros have their terminal/shell dissabled.. :) (control panels & centers reigns... :) ) -GNU/Linux saves time in general -- my estimate is 80 % after full switch (support) -you are on the legal side -- no cracking -one can recycle way old hw -- Pent2 / 64-256 MB ram with AntiX (exception to above is maybe hw egsotics like Debian GNU/Linux on new dual or Quad c0re Power6 AmigaOne x1ooo or x5ooo/4o 2.4 GHz :) & other non x86 hw like ARM/rasperyPi or the like. ) ...recently, we had an interesting phenomenon with g33ks in hackLab: experienced Slackware, Debian, Gentoo, arch,... powerUsers figured that, staying on a bleedeng rollingRelease tweakingTheLast edge "as-per-se" has no point any more, & that leaving developers, betaTesters, maintainers & packagers job is better to outSource to the people that do that things the best, so they switching to versionin "newbie" distros... :) ...actualy now than ever, it is more a question of psichologycal, sociologycal...maybe culture acceptance; than technical excelence.
>>
>>58275737
>Tiny amount
>Best game
>Phone game
>>>/out/
>>
>>58275717
working on my poker engine. so far only teh flush logic is made but my solutions are far from elegant.

heres how many flushes were dealt to a player in 100 hands

['h', 6, 'h', 6]
['h', 7, 'h', 2, 'd', 5, 'h', 6, 's', 9]
flush
['h', 7, 'h', 6]
['h', 8, 'd', 8, 'h', 'J', 'h', 7, 'c', 'Q']
flush
['s', 7, 'h', 5]
['s', 6, 'c', 'Q', 's', 9, 's', 'K', 's', 4]
flush
['d', 2, 'd', 'A']
['c', 10, 'h', 'J', 'd', 4, 'd', 'A', 'd', 'A']
flush
['s', 'K', 's', 8]
['d', 'J', 's', 3, 's', 'J', 'c', 3, 's', 5]
flush
>>
>>58275737
I hate the phone game era so much.
>>
CLRS worth reading from cover to cover?(At least most of it, I guess it's hard to finish all the chapters)
I wanna gitgud @ algos
>>
>>58276095
its mostly a reference
study mathematics rather
>>
>>58275773

if you are good, you can make a game that's interesting

You can't make the kind that a non programmer would think up (with a story and art and half a gigabyte of shit) but you can make an interesting game

Minecraft when it was released was an achievable game for one person to make, for example
>>
>>58276120
what mathematics?
>>
>>58276095
Anons say that it's a kinda heavy on theory book, I prefer a practical path. Just grab an algos book (preferably C).
>>
>>58276137
Because noth just used the infiniminer code and tweaked it until it was a game.
>>
>>58276143
set theory, logic
>>
What book do you guys recommend to learn about algorithms? Also, a book that helps me "think" like a programmer(problem solving, preferably in C) would be greatly appreciated.
>>
>>58276318
Cracking the coding interview has some interesting problems to solve, but if you want real-world experience there's no substitute for starting a challenging personal project and optimizing the shit out of it.
>>
>>58276318
>C
shit language
try Java
>>
>>58276364
>calls C shit
>recommends Java
>>
File: mesh.png (217KB, 1197x1210px) Image search: [Google]
mesh.png
217KB, 1197x1210px
Update on the icosahedral grid project from the previous thread.

I'm partway to being able to generate an adjacency matrix for the nodes in the mesh. The idea is to generate the grid in 10 'diamond' segments and then 'stitch' these together. Here's 3 diamond segments drawn with their own 'internal' adjacency graphs.
>>
>>58276008
alright fixed it so it doesn't deal out multiples of same card. i was forgetting ot remove the cards from the global dictionary.

['h', 5, 'h', 'K']
['h', 2, 's', 9, 'd', 'Q', 'h', 'Q', 'h', 'J']
flush
['c', 7, 'c', 10]
['h', 9, 'c', 8, 'h', 'J', 'c', 4, 'c', 2]
flush
['d', 8, 'd', 4]
['d', 'A', 'd', 5, 'c', 2, 'd', 2, 'c', 10]
flush
['h', 'Q', 'h', 3]
['h', 9, 'd', 5, 's', 'J', 'h', 5, 'h', 'K']
flush
>>
>>58276345
Cool, gonna order that book(I am aware that I can get the pdf, but I prefer to have the physical copy).
Yes, I need to start creating my own apps, and as I get better at programming, I start optimizing the shit outta them. Thanks anon.
>>
>>58276177
off topic but isn't logic a philosophy course?
>>
Which one makes more money, an Android dev, or an iOS dev? I personally prefer Android(I like how much more customizable it is compared to iOS), but I could learn swift if I need to.
>>
File: 6a2a08a96ff91a696469b7f5fe81d800.jpg (131KB, 1024x645px) Image search: [Google]
6a2a08a96ff91a696469b7f5fe81d800.jpg
131KB, 1024x645px
Anyone have that script for sorting a thread by reply count?
>>
Whats /g/'s opinion on Clojure?
>>
>>58276576
There's lots of kinds of logic. Including mathematical logic.
>>
>>58276601
Why don't you write one
>>
>>58276601
That looks familiar.

Which dere is that?
>>
>>58276621
It's an incredible true meme
>>
File: snap112.png (236KB, 1232x448px) Image search: [Google]
snap112.png
236KB, 1232x448px
>>58276601
Are you trolling?
It's literally a feature of the catalog.
>>
File: VisualCover2_Joel-Alter new.jpg (350KB, 705x705px) Image search: [Google]
VisualCover2_Joel-Alter new.jpg
350KB, 705x705px
I'm working on Half-Life 3.
>>
File: 1456598500377.jpg (105KB, 750x738px) Image search: [Google]
1456598500377.jpg
105KB, 750x738px
>>58276643
My eyes are bleeding.

>>58276697
Sorting posts inside a thread, dingus.
>>
>>58276635

And what sort of logic would you classify as non-mathematical logic?
>>
>>58276071
>>58276601
>>58276757
fuck off
>>
>>58276786
Philosophy
>>
File: 1437425483923.png (65KB, 252x274px) Image search: [Google]
1437425483923.png
65KB, 252x274px
>>58276794
>>
>>58276786
take one jar of peanuts

take one peanut out of jar

place peanut on counter at mark a

get drawer pull the handle on drawer marked b toward urself

oh wait
>>
>>58276786
not him, but there's different kind of ways to express logic.
when he's talking about "mathematical" logic, he's presumably talking about a course that teaches logic in terms of mathematical expressions.
essentially, a philosophical logic course and a mathematical logic course teach similar lemmas in different languages (obviously lemmas differ in terms of specialization, e.g. it's benefitial to construct proofs via some very formal calculus, while it doesn't matter as much in a philosophical course).
>>
>>58276808

Was this all some sort of clever shenanigan to say "be yourself"?

>>58276881

Ah, so same concepts, different approach.
>>
>>58276071
Modern games in general are awful.
30 fps console cinematic experiences and bad pc ports.
Esports casualized multiplayer games with the same toon art style.
It's enough to drive one mad.
>>
>>58276799
I'd call it technical as mathematical is. Though I wouldn't put it all on a color just because it's print ready versus web ready. Philosophy is the syntax in words. Philosophy would be the binding between English clarity and concise-ness and any valuable technical nature. If your english isn't very strong, I wouldn't want to be stuck arguing these objective traits because logic is reasoning and separate logic from the reasoning and calling it logic is...
>>
>>58277014
>we will never have tournaments like this
https://www.youtube.com/watch?v=xDj0DkFYAEA
good match too
>>
Does /dpt/ use edgy programming screen names?
I'm thinking about becoming "!sherlock".
>>
>when talk to yourself in your code comments and use the royal "we" even though you're the only one that will ever see the comments
>>
Hi guys i've got to do a mini project in java for school, i don't have any idea what to do. do you have any ideas?
I've got networking & security knowledge
>>
>>58277134
This was definitely instilled via public schooling. When you'd be seated around the teacher and had to answer on behalf of the student body. "We learned that...".

I feel like most of my life's knowledge is carried in that form...
"We, humans,..."
>>
>>58277146
>java
I want normies to leave.

>I've got networking & security knowledge
You don't.
>>
>>58277146
Implement Diffie-Hellman key exchange.
>>
File: 1282613150782.jpg (78KB, 522x399px) Image search: [Google]
1282613150782.jpg
78KB, 522x399px
If someone is brave enough:
Comment on two youtube videos on two tiny channels, post those channels here.
Want to see if something works.
>>
>>58277134
>>58277163
What are you guys talking about? Where the hell did you go to school?
>>
>>58277134
This is me, all the time. I even started using the royal we with my inner voice when I'm thinking.
>>
>>58277209
Nice try, GCHQ
>>
>>58277209
The smallest I know:

https://www.youtube.com/user/VEVO
https://www.youtube.com/user/PewDiePie
>>
>>58277213
I'm referring to when we may have been kids. Teacher's ask for discussion on "what we learned" and eventually take to teaching with supplants like "we".

After that I was just commenting, really. It could be meaningful. Any self-respecting programmer can see that.
>>
I'm implementing Shamir's secret sharing
>>
let's say i'm making a program in a certain language then maybe i might want ot extend it into a web application or a cell phone application how hard is it to port that over?

i'm using python so know i could use like django or flask to port it into a web application instead of just on my comp, but don't know about cell phones with python?

is it a lot of work?
>>
>>58277372
It's more work than saying it. And probably more work than the original offline one.
>>
>>58277372
What does the program do?
>>
>>58277412
well it's a poker engine minus computer graphics atm.
>>
>>58277423
>poker engine
Is that a euphemism for your penis?
>>
>>58277423
You're going to have to do a lot of modification to get the IO working over the web
>>
File: knit10.png (260KB, 1197x1210px) Image search: [Google]
knit10.png
260KB, 1197x1210px
More geodesic stuff. I figured out how to knit together the five 'diamonds' connected to the 'pole' of the icosahedron.
>>
>>58277372
That's vague. What does the program do?
In the simplest situation I can think of and if the original program is well designed, it should not be hard.

If it has a chance of ever getting big django is the best option.

You mean python on mobile? It's not impossible but will not be pleasurable.
>>
>>58275717
I'm working on a technical spec for a feed processing service
>>
>>58276601
Here's the script:

var replies = document.querySelectorAll('.replyContainer');
var replyCount, n = 0;
var chanX = document.querySelector("[title='4chan X Settings']") !== null;

function getReplyLength(node) {
if(chanX) {
return node.querySelectorAll('.desktop .container a').length;
}
return node.querySelectorAll('.desktop .backlink > span').length;
}

for(var i = 0; i < replies.length; i++) {
replyCount = getReplyLength(replies[i]);

if(replyCount > n) {
n = replyCount;
}
}

while(n !== -1) {
for(var i = 0; i < replies.length; i++) {
replyCount = getReplyLength(replies[i]);

if(replyCount === n) {
document.querySelector('.thread').appendChild(replies[i]);
}
}

n--;
}


This place really has gone to shit. Nothing but egotistical fuccbois.
>>
I wrote a botnet for practice. Will Github ban me or remove it if I put it in a public repo?
>>
>>58277684
not if you say it's a botnet
>>
>>58277671
>>58276601
Samefag?
>>
>>58277684
name it something IoT related
>>
>>58277684
why not gitlab?

its better, it's expanding and it has no all that SJW bullshit

disclaimer: im not in gitlab team
>>
>>58277750
+1 for Gitlab

Github itself is not open-source, it's a joke at this point.
>>
>>58276095

I did because I studied theory. Would I recommend engineers/developers to read it cover to cover? No. CLRS covers a vast array of material, a large portion of which is just not useful in the real world. Fibonacci Heaps? They have virtually no application outside of theory. It's not feasible to build one, especially when you have better data structures as alternatives.

Let's be practical for just a second: will you ever develop quicksort on the job? Probably not. That's all been done for you, libraries have that covered. I think understanding fundamentals is important, and many of the things in CLRS like sorting, dynamic programming, hashing, and complexity ARE useful, but reading the book cover to cover is not a smart strategy.
>>
>>58277981

>will you ever develop quicksort on the job? Probably not.
No, but you will in the interview.
>>
"zero cost abstraction" is a lie
>>
File: Untitled.webm (545KB, 960x1040px) Image search: [Google]
Untitled.webm
545KB, 960x1040px
>tfw adding a new option to your bloated gooey
>>
>>58278038

The cost is paid at compile time.
>>
File: 1428182712023.jpg (72KB, 440x406px) Image search: [Google]
1428182712023.jpg
72KB, 440x406px
>>58278038
muh call function overhead
>>
This thread is pathetic. It is not about programming. It's just a bunch of computers illiterates and first semesters memeing about whatever they just learned.

A quick search shows that most arguments used here are not original and have been copied from some trendy tech blog or other shit site.

The only real programming questions I have seen so far are from beginners(it's fine to be a beginner btw).

This entire site is shit and I don't know why anyone would regularly come here.
>>
>>58278108
Nice blog post
>>
>>58278049
>not enough options
>0/10 would not bang
>>
>>58278070
What a nice picture that deserves to be /dpt/ OP.
>>
>>58278121
ty
>>
>>58278147
kys
>>
>>58278000

I don't think reading CLRS cover to cover for interviews alone is an optimal strategy; I think it'd be a waste of time, especially considering the breadth AND depth of CLRS. And on that particular point, very few companies will ask you to code quicksort outright. They'd ask about running time perhaps, why it's superior to bubble sort, in what case(s) bubble sort is a better choice, etc. I say this, admittedly, from personal experience (as well as anecdotes, discussions with peers). In many cases, a hiring manager doesn't care if you memorized the code for a sorting algorithm, but that you have the essentials down.
>>
File: 1479321120729.jpg (59KB, 513x510px) Image search: [Google]
1479321120729.jpg
59KB, 513x510px
>>58278158
I won't. Your move?
>>
>>58277209
too spooky for /g/
>>
https://idea.popcount.org/2013-07-24-ir-is-better-than-assembly/
so, for LLVM, this is a great idea, but... if the golang devs do something similar, it's not OK

programmers are a very special kind of people
>>
>>58278208
ur dum
>>
>>58278248
dis
>>
>>58278208
I think it was more Go did it poorly, but I have no idea
>>
>>58278181
Kill your children and don't reproduce.
>>
>>58278208
>everyone on the internet is the same person
>programmers are all the same
>>
File: maxresdefault.jpg (88KB, 1280x720px) Image search: [Google]
maxresdefault.jpg
88KB, 1280x720px
>>58275717
happy new year guys.
getting into more subtle stuff here.

on an HTTP server, when i get a request of an executable i fork a child that first redirects stdout to a socket file descriptor and then execl a shellscript that prints HTTP replies.

i have to somehow get the first line of the reply, so i think i should use a another redirection in the execl call, that redirection should be to stdin.

so in the father process i should scanf the stdin to get it.

how can someone redirects bash stream to stdin ?
>>
>>58278405
That's not funny. My mom died 5 years before I was born.
>>
>>58278486
i meant the father should somehow get the first line of the execl response in the forked child
>>
>>58278108

"most arguments used here are not original"

This can be said about every argument on every board on this site or any other forum site. Arguments are going to be reused no matter what. What are you getting at?

What kinds of programming-related posts are you expecting to see?
>>
>>58278065
If you pay the cost, it isn't zero.
>>
>>58278486
You're french
>>
trrying learning python but I'm just on my first day. objects and classes confuse me so far
>>
>>58278538
yes.
>>
Whats a good source for learning RxJava / RxAndroid. Whats the point of RxBinding?
>>
>>58275717
was writing an optimizer for parameters in python.

I'm torn between hating and liking python.
>>
>>58278511
What I mean is that it's just copy pasting empty and usually wrong arguments from other sites, like tech blogs. In case you didn't know, it's pasta. I wrote when I was angry and the thread was particularly shit.
It took off, now I post for the (You)s.
>>
>>58278486
>how can someone redirects bash stream to stdin ?
pipes?
>>
>>58278632
What are your reasons for hating it?
>>
>>58278594
why are you worried about classes on your first day?

Learn basic syntax, loops, variables and functions way before messing with the OOP meme (it isn't even needed for python.)
>>
File: 1448593038017.png (246KB, 446x393px) Image search: [Google]
1448593038017.png
246KB, 446x393px
>>58277720
Yes, you fucking retard.

Since everyone here is a worthless shithead I had to dig through my cache to recover it.
>>
>>58278525

The emphasis is that there is no cost at RUNTIME.
>>
>>58278679
I was just wondering, you piece of shit.
Happy new year.
>>
>>58278679
>javascript
>programming
>>>/g/wdg/
>>
>>58278682

why are you tripfagging?
>>
>>58278656
"Typo evaluation" only at runtime is my favourite so far.

Also the syntax is really ugly. I don't get the "pythonesque" appeal, it looks like shit.
>>
>>58278703

I always tripfag. Are you new?
>>
File: 1481576017372.jpg (41KB, 443x359px) Image search: [Google]
1481576017372.jpg
41KB, 443x359px
What Forth is nice for?
>>
>>58278715
No i've been here 10 years and if i've seen you before I asked you then as well

quit tripfagging, dick
>>
>>58278737

No. I'm going to continue tripfagging, and you're going to continue bitching about it.
>>
>>58278753
Your posts would be better if you stopped using tripcodes.
>>
File: 1456399349556.png (557KB, 411x831px) Image search: [Google]
1456399349556.png
557KB, 411x831px
>Need to write memory manager for my kernel now
>Need to enable paging beforehand (I do it in my bootloader)
>May as well make kernel higher-half too
>Expecting hell
>10 minutes later
>It works first go
This.. doesn't seem right.
>>
>>58278796
sauce
>>
>>58278649

anonymous pipe operator "x | y" only works when you are not already executing the program y.
>>
File: 1463107217744.jpg (550KB, 1280x720px) Image search: [Google]
1463107217744.jpg
550KB, 1280x720px
>>58278814
Purasuchikku Memorizu
>>
So I have this game I'm trying to "mod", it packs the whole game inside a single file, inside it has directories and files like a folder, is there any method of tricking the game into thinking it's loading the file but instead loading a normal directory I can modify and shit? where do I get started searching for this
>>
>>58278844
Thanks I'm going to watch this while programming.
>>
>>58278753
>fame seeking on 4chan

No I won't, but it adds nothing to the discussion except for derailing threads because it is a custom on this image board to be anonymous. I know you're a newfag and probably came from reddit or tumblr but please, for everyones sake stop.

No one here cares who you are, and if they do it's only because they want to dox and then harass you.
>>
File: 1476030881458.jpg (347KB, 1280x720px) Image search: [Google]
1476030881458.jpg
347KB, 1280x720px
>>58278870
>Watching anime while programming
Why would you do such a thing?
>>
>>58278870
It's shit though. Everything past episode one is garbage.
>>
>>58278049
I keep seeing this. Is this written in Visual Basic or something?
>>
>>58278910
Is it even possible to achieve this level of bloat with any other language.
>>
>>58278853
Usually not. You should unpack it and then repack and test on each modification.
>>
It's always possible. If the game is in Java just unzip it.
>>
File: anon-pls.jpg (94KB, 580x774px) Image search: [Google]
anon-pls.jpg
94KB, 580x774px
>>58278818
I meant unix process pipes. Not the bash pipe.

Anon, you know about process pipes, don't you?
>>
>>58278928
Either Java or some of those bullshit "Easy-Bake-Oven" style programming IDEs.
>>
>>58278954
shit nigga, if i had controle over the executable behavior, i'll do it easy with any IPC.

after execl the child is gone.
>>
File: youre-surely-joking-mr-anon.jpg (35KB, 452x650px) Image search: [Google]
youre-surely-joking-mr-anon.jpg
35KB, 452x650px
>>58278987
>>
Reminder that the reason windows is not open source, its because their code is so ugly , they don't want people to see
>>
>>58279040
to be correct, after execl, i can only get the exit value of the child.
>>
>>58279115
And the child has access to any file descriptors of the parent that were told not to close on exec. Including, stdin, stdout and any other you create.
>>
File: done.jpg (236KB, 600x579px) Image search: [Google]
done.jpg
236KB, 600x579px
>>58277506
>>58276387
>>
>>58279141
yes i know you didn't understand my question.

this is what the child does

if (!fork)
dup2(ClientSocket,1) //redirect stdout to the socket so the echos in the bash script write into the socket

then run the script with execl.

how can i send a copy of the data (that has been written to the socket) to the father ?
>>
>>58278674
>oop meme (it isn't even needed for python.)

you what nigger? it depends on what you're building. maybe not for a script but if you're building anything else oop is definitely used and SHOULD be used.
>>
>>58279211
>how can i send a copy of the data (that has been written to the socket) to the father ?
That's my last post anon.

Why a socket?
Why not a file descriptor?
Why not just connect normally to the socket?
>>
New year.
Want to improve my skill set and find a better gig. I am working as a Developer now for a hospital system and the job is low paying and boring.

What should I do to improve myself? Do those trendy interview problems? Relearn CS fundamentals? Learn the new hipster JS framework?
>>
>>58279243
because the executable is supposed to reply to the client !

and the father is supposed to spy on them !
>>
File: worst_chan.png (105KB, 2194x576px) Image search: [Google]
worst_chan.png
105KB, 2194x576px
>>58279282
Go back to where you belong, stupid frogposter.
>>
>>58279243
>>58279282
sometimes the client want textual files, here the main process should reply.
when the client however wants to execute a file and get its output i should fork a child and redirect the stdout before executing the script
>>
>>58279302
go shitpost somewhere else.
>>
/g/entlemen, I'm in dire need of assistance. Are you familiar with this error message?

> 1> compat-inet_pton.c
1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\ucrt\stdlib.h(568): error C2371: 'strtoul': redefinition; different basic types
1> c:\program files (x86)\windows kits\10\include\10.0.14393.0\ucrt\stdlib.h(553): note: see declaration of 'strtoul'
>>
>>58279262
Watch Terry Davis streams and try to be more creative about your life and everything.
>>
File: 1483256959391.png (283KB, 714x574px) Image search: [Google]
1483256959391.png
283KB, 714x574px
>>58279333
n-no
>>
>>58279282
>>58279333
is it true? are you a frogposter?
>>
>>58279505
i have a deadline guys
stop trolling and help me with this shit.
>>
>>58279523
>shut the fuck up and do my job fggots
man 2 sendfile
>>
>>58279356

How you're using strtoul does not match how it's declared in the header. Post your source.
>>
going to make my first android app, this will be my first "project" I guess, I'm still a noob so whatever. Basically going to make a calorie counting app (basically I want to make one that will work perfectly for my needs). I took java I/II classes so I know some java, just never did a project on my own with it.

Is this trivial or is it a good first project? inb4 java android meme
>>
>>58279584
It's a terrible first project.
>>
>>58276364

java is a complete joke

you can't even use pointers so it's basically an entire language that revolves around making calls to C and C++ libraries
>>
>>58279584
Depends on what you mean by work perfectly for your needs. It could be extremely hard or very easy
>>
>>58279603
why?
>>
File: Untitled.webm (3MB, 960x1040px) Image search: [Google]
Untitled.webm
3MB, 960x1040px
>>58278910
>>58278928
>>58278964
>bullying someone for their language of choice
be nice
>>
>>58279617
>C is an entire language that revolves around making calls to ASM instructions
>>
>>58279551
man 2 man
>>
>>58279626

Try it

you'll run into a bunch of confusing shit like contexts, manifests, callback functions

>>58279641

C is to assembly as assembly is to machine code

it's a perfectly warranted abstraction and you don't lose performance
>>
>>58279584

>Is this trivial or is it a good first project?
Android APIs aren't that hard, so this sounds simple enough. I remember a couple of years ago taking a class on Android development, and I decided that my final project for that class was going to be to modify the Exodus application (basically an old fork of Clover for 8ch) to support logging in as a board volunteer, and banning/deleting posts. Took only a couple of weeks, most of which was spent familiarizing myself with the god-awful codebase.

>>58279617

>you can't even use pointers so it's basically an entire language that revolves around making calls to C and C++ libraries
That describes a lot of high level languages, Anon.
>>
File: ..png (4KB, 256x82px) Image search: [Google]
..png
4KB, 256x82px
This was working fine, and suddenly android studio decided that it couldn't find the class GraphRequest anymore, despite still being able to import it.
What is going on? I tried cleaning the project and nothing happened.
>>
>>58279682
well, everyone says make a project that you find useful, and I want to make an app to help me for tracking weights for the gym and calories, is that not something interesting I can do?
>>
>>58279709
>read this post
>remember the horrible life I had when I was using an IDE
I know how to fix your problem but you're not going to listen.
>>
File: capitalism.png (2MB, 1600x4176px) Image search: [Google]
capitalism.png
2MB, 1600x4176px
>>58279723
Hmm.
>>
>>58279641
it doesn't make calls to ASM instructions, it makes ASM instructions
>>
>>58279551
not even close.


but i think i found it, the child should fork another child that dup2 the socket to stdin or another file

like this :

father (gets)
|
|
child :dup2(sock,STDOUT_FILENO) ; execl(script)
|
|
grand child : dup2(sock,STDIN_FILENO) ; execl(script)


i'm shrewd
>>
I am reading "How to Design Programs", here is a link: http://www.ccs.neu.edu/home/matthias/HtDP2e/part_one.html#%28tech._.D.K._worldstate%29

What does /g/ think of this book? I got the recommendation from /fpt/, although i don't really care about fp, I just want to learn how to read and write actual fucking programs and make my own projects/contribute to other peoples projects. A lot of the exercises in this book feel like complete busy work and it doesn't even teach a real language, it teaches its own watered down form of lisp. I understand that this book is more about learning computer programming concepts, but would I just be better working through ANSI C than grinding through this textbook? Please respond, I really want to know if I have been wasting my time.
>>
>>58279777
I know its not revolutionary, I just think I can make one that works better for me.
>>
File: 1450986476805_1.jpg (26KB, 360x452px) Image search: [Google]
1450986476805_1.jpg
26KB, 360x452px
>>58275717
How do I generalize C++ GSL special functions to C anons? Don't tell me I have to define them myself again.
>>
>>58279797
a little fuckup, it should be like :

grand child : dup2(STDIN_FILENO,STDOUT_FILENO) ; execl(script)
>>
>>58279809
> I really want to know if I've been wasting my time

Greatly. When you're learning to drive, there's only so much the DMV handeguide can give you. You need to get 'out on the road', so to speak.

Can you think of a small project? Something that preferably would make your life easier so you can hold an interesting in it?

Alternatively, get on Github and start reading about projects that you find interesting. Look at how they're designed, and try to figure out why. If you see design patterns come up over and over again, Wikipedia them. Write a small implementation yourself.

Also, unless you really want to work in systems programming or embedded work, C too will waste your time. Many large projects are built in OO because the different pieces of the puzzle can click together so nicely. It's not mathematically beautiful like Lisp or Haskell may be, and it's not groundbreaking like Coq or Idris. But it's what's been found to work in the real world, under time constraints and large teams.

So, you've gotta learn yourself a Java, Python, C#, or Ruby, and get dirty with some Github work.
>>
>>58279723

If you find it useful to you, go for it. Personally, when I want to "keep track of" anything, I just use a text editor and a calculator.
>>
>>58279723
it is
>>
>>58279815
Think about what your project is gonna need to work. Some foreign API for how many calories some food has or some user-interaction with moderation to account all that info, either a cloud or local database for the tracking, and maybe sensor integration depending on how deep you want to go.

It's bound to be a lot harder than you're thinking, especially for a first project.
>>
>>58279723

If you can't do this after 2 java courses you need to kill yourself my man

don't think about it just do it

>>58279731

All usable java IDEs suck. IntelliJ, Eclipse and Android studio especially are so ugly. And it's so easy to fuck up your project.

In code::blocks you can just start a new project, create main.cpp, link any librarys by typing 1 word and you are good.

>>58279682

High level languages are not useful unless you are doing a productivity script or something

Using java is so boring. Can't do anything actually impressive because you aren't really even programming a computer, you are programming a program. Nothing in Java is ever lightning fast and you can't do any interesting hacks that make you better and look good on shithub.
>>
File: umatrix-edge.png (238KB, 1440x860px) Image search: [Google]
umatrix-edge.png
238KB, 1440x860px
Still there's quite a lot of bugs to be fixed but for the most part it's ported
>>
>>58279872
>not making your own Ruby script
I'm disappointed.
>>
>>58279883
>productivity
When did the word "money" replaced the word for "useful"?
>>
>>58279857
alright, thanks man. I know java from comp sci AP classes in HS, and I also taught myself ruby in a comp sci ind. study a while back but I need to do a refresher. I guess its time to get on github.
>>
>>58279883
> If you can't make a multi-view web enabled multiplatform program after 2 shitty java courses, kill yourself
makes sense
> In my lightweight neckbeard IDE I fantasize about writing real programs in...
> High level languages are not useful
Unless you're in the same 90% of the software industry I'm in

I know /g/'s pretty elitist but holy fuck man
>>
>>58279966
I wish /g/ were actually elitist.
>>
What distro to program do I install to program c++
>>
In haskell, when a thread is killed, how do I kill all it's children as well?
>>
>>58279883

>High level languages are not useful unless you are doing a productivity script or something
"productivity script" is a very broad term, Anon.

>>58279890

Scripts are for things that actually need automating, or at the very least require some sort of complex data transformation. If you are literally just keeping track of the number of calories you have consumed in a day, you can just open a calculator and add to the sum every time you eat. If you need the calculator for something else, you jot down the number in a text editor temporarily.
>>
>>58280070
>If you are literally just keeping track of the number of calories you have consumed in a day, you can just open a calculator and add to the sum every time you eat.

I do that shit with a little notepad. Even easier. Then you can take it with you, too.
>>
>>58280057

Just get regular old Ubuntu and make sure you have the build-essential package installed.

>>58280098

I use a text editor. Never need a pencil. Although I don't keep track of calories. I keep track of debit card purchases and then log it in a transaction register later. I refuse to do online banking.
>>
>hes scared to post his github
>>
How did you really learn to program, /g/? I went through a bunch of comp sci courses in HS, including AP comp sci, and all I ever learned was how to make useless novelty java programs. We never learned how to come up with actual useful projects. I want to be able to read and understand code on opensource projects, and I want to be able to contribute to projects I like and develop my own, but I have not idea what to do at all. How do you ge tto the point where shit on github makes sense to you?
>>
>>58279908

Once you get a complex workflow going you need to script or else it gets very tedious. I use python for simulating data and doing tests sometimes

>>58279966

After two java classes you should be able to make a simple app that doesn't even do anything that isn't trivial

2 years is half of an entire bachelors degree. I made emulators, embedded firmware, and fairly complex GPU accelerated OpenGL two years before my first computer programming class

90% of everyone in the software industry is basically a coding bootcamp javascript hipster. Pajeet has been programming VHDL in a shitty ditch on a computer he made out of barbed wire since he was 8 years old.
>>
>>58280070
>>58280098
Well the idea I had isn't just adding up calories, this was my idea

1. you enter your daily goal for protein, fats, carbs, calories and optionally for all the micronutrients. You can also choose from pre-decided macro formulas (keto, iifym, bodybuilding style diet, etc.) that will just generate the macros for you based on your weight, etc.

2. after that you can enter your calories for every meal and it keeps track of it for every day, keeps track of calories, fats, carbs, protein and optionally micronutrients.

3. I could also have a graph that shows your progression over time, etc.

4. could also have a section for tracking weights, or maybe generating weightlifting programs.

idk I just want to make something interesting, I've learned java I/II and done school assignements, but I've never actually started working on stuff on my own. I want to start on something easy I guess, but then work my way up to better stuff. I've never done an app before so that would be something to learn. Weightlifting is my hobby so I guess the app can be usefull, although its been done a million times, maybe I'll like my app better. Personally I just track my calories/weight etc with a spreadsheet but that's besides the point.
>>
>>58279568
I'm trying to compile openvpn on windows with VS 2015

should i crossreference it and comment it out?
>>
>>58280146
Post yours :)
>>
>>58280146
>wanting your code to be stolen by chinks
>>
>>58280148
pls respond
>>
>>58280148
start with easier stuff, then build your way up. Make some programs that you find useful, and build on them. Like a chrome extension that does something you would find useful. Don't know how? Google it. Wake up one morning, set aside distractions, and google something you want to program/learn and figure out how to do it. Learn some more advanced stuff as you go along.
>>
>>58280148

I derped around with a C++ tutorial and the dev-c++ IDE when I was 16. I remember barely understanding most of what I was doing for a while. I also remember learning Ruby when I was 18, and then pouring through the source code of the Ruby interpreter, and then everything related to C and C++ just sort of "clicked" for me.

I think in retrospect, being exposed to how other people approach problems is a great way to become a better programmer.

>>58280207

Compile it with MinGW/MSYS2

./configure
make

That's all you need.
>>
>>58280311
> Compile it with MinGW/MSYS2
You must be new here. Na bruv, I got myself a custom build here with custom crypto. Custom crypto lib doesn't support cross compiling. Gotta stay native
>>
>>58280320

>Gotta stay native
What the hell do you think MSYS2 is? It's literally just Bash, GCC, and some POSIX utilities running natively on Windows. There is no cross compiling involved, just pure WIndows host, Windows target.
>>
How should I go about the license for my project's logo? It's an asset so I don't think the GPL makes sense, but at the same time it's a 3D asset so if I release the blender file it might make sense. What do you guys think?
>>
>>58280379
creative commons?
>>
>>58280146
Don't be a pussy. https://github.com/bakape
>>
>>58280375
The more you know. No experience with windows so my bad. Still I tried it and the compiler makes very clear that some rand functions aren't supported
>>
>>58280389
But do I need to make a new project on Github for it or can I have multiple licenses inside the same repository?
>>
>>58280178

You can do all this with an excel spreadsheet fambly.

Not trying to discourage you, but some up with something fresh.
>>
>>58280400
>a bunch of shit in GO and Javascript

You literally fell for every meme
>>
>>58280428
-____-
>>
>>58280146
Its like you hate money. Only tards use public repos.
>>
>>58280431
Go is good for servers and related tools, absolute shit for anything else.
Regrettably, JS was my first language.
>>58280463
B-B-But muh OSS!
>>
>>58280495
>Regrettably, JS was my first language.
mine, too, friendo :O)
>>
Is it worth it to learn javascript? I want to make a firefox extension, and it you basically need to use JS, so would I be able to learn enough JS in 1-2 days to make a simple extension? Also, good resources for learning it fast, so I can use it?
>>
>>58280463

You don't need to sell everything you make. Public repos are a great way to show off your work to future employers.
>>
>>58280146
https://git.io/vMq4u

most of my stuff is private but here's a really shitty little "library" i just made public.
https://git.io/vMq4o
>>
>>58280528
It's almost mandatory for anything web-related. What languages do you already know?
>>
this is likely out of scope for the thread but i'm going to ask anyway.

Anyone here moving into a more senior role at a more enterprise-like job?

I'm looking for more resources for this transition (promotion coming next month).

Some of the problems i'm facing/going to be facing:

* Being in a position of authority, including dictating work and having interns
* Less coding, more managing
* Maintaining and moving away from old code and stack (total rewrite would be best case scenario but not holding my breath)
* Dealing with other seniors
* OFFICE POLITICS

Current stack is a totally fucked up ASP.NET + JQUERY + shoe horned Angular 1 originally made by C++ devs in '09/10. I can't overstate how fucked it is.
>>
>>58280561
java. I learned it in HS AP comp sci. I used to know ruby but haven't used it in a year.

also do you guys recommend following tutorials on projects when you are first learning how to do shit on your own?
>>
>>58280146
https://github.com/salvadorp2001
It's absolute shite.
>>
>>58279883
Just kill yourself. I was going to argue with you but I stopped caring enough halfway through your post.
>>
>>58280647
https://learnxinyminutes.com/docs/javascript/ is enough. Then just MDN or google anything you don't understand.

>tutorials
No. Most are complete shit and/or outdated. Reading docs and googling examples is more reliable.
>>
>>58280561
>>58280637
>>58280647
Nobody needs your memes.
>>
>>58280746
Memes are unnecessary by default.
>>
>>58280637
I moved into my management role a few months ago, although I work for a start-up so the culture is probably different. What tier of management are you going to be at/are you going to be starting new projects?
>>
>>58280781

I'm currently the only developer on an outdated (mandatory) web project. I will be (formally) promoted to Senior + Lead Web Developer.

I will have a say in hiring two additional web developers within the next 6 months.

I will also (pending office politics) have the final say in the direction we take with the web portion of the product.
>>
>"""programmers""" in charge of HTML/CSS
Holy shit
>>
File: dpt.png (742KB, 1920x1080px) Image search: [Google]
dpt.png
742KB, 1920x1080px
Reminder that this is the new /dpt/ image.
>>
>>58280818
I was in a similar position although when I took the reins I took(and am taking on) two apprentices and three full timers across two projects I created to improve our product and bring it to enterprise markets. The hardest part for taking the wheel of the ship is getting stakeholder buy-in to take it in the direction you want which was made easier for me by having previous relationships with customers and shareholder backing behind the scenes. What's your relationship with the high level decision makers and do you know exactly how you'd change the shitty current stack and web, what benefits it brings (both commercial and technical) and have a feasible timeline for completion? If you can confidently convey that to the commercial and business guys above you it should be easy but I don't know how mad enterprise your environment is and how much red tape you'll have.
>>
File: 1415312350252.jpg (12KB, 232x198px) Image search: [Google]
1415312350252.jpg
12KB, 232x198px
friendly reminder that it's easier to tell if a large number is a multiple three if you add all the digits and the result is divisible by three
>>
>>58280900
that's slower
>>
>>58280897
Stop trying to force your retarded meme
>>
File: IMAG0041.jpg (1002KB, 1840x3264px) Image search: [Google]
IMAG0041.jpg
1002KB, 1840x3264px
>>58280897
Post more bunnies, here mine.
>>
>>58279523
Fuck off and kill yourself.
>>
File: 1472392828589.jpg (11KB, 300x300px) Image search: [Google]
1472392828589.jpg
11KB, 300x300px
What are OS incompatibilities with C++ going from Windows to Linux?

Can I write C++ in VS, open the .cpp file in Geany in Ubuntu and rebuild it? Does it work like this?
>>
why does floor division in python still leave the number as floating point?

doesn't it make more sense to use int(x/y) rather than x//y?
>>
File: 1483283498568.png (426KB, 1079x1128px) Image search: [Google]
1483283498568.png
426KB, 1079x1128px
>>58281032
i-i can't answer. i'm afraid of snakes..
>>
>>58277506
How is this done?

like, what language is it and/or what program?
>>
>>58281025
In theory yes you can.
>>
>>58280899


This is helping - These are all questions I need to answer my self.

I started in June but I've been consistently outperforming and communicating much more than my predecessor, so its as good as it can be. I have opened communication with the top stake holder so I think i will continue to work on that relationship as much as possible.

One of the major problems in my office is people whispering into stakeholder's ears, people who have no business saying or doing shit (unrelated senior developers, even customer escalation - its insane.) I can't change management and it does bug me that they listen, just another obstacle.

Another difficulty is coming up to feature parity with what is perceived as a "working product" from the user's point of view. On the dev side the tech debt is so brutal that what should take a day is taking weeks. This needs to be communicated heavily.

The above point can be driven harder by the fact that we recently moved to "rapid delivery" of features (we're only a few years late).

I think the red tape is going to be harder than the actual development. Off-hours work on my part to prove things seems like a necessary evil at this point.
>>
>>58281073
Jesus, what a humongous shitpost
>>
>>58281025
There's a bunch of small things that might get in the way.
>>
>>58281025
You need to surround the code with this:

#ifdef _WIN32

/* put the Windows code here */

#else

/* put the non-Windows code here */

#endif
>>
>>58281079
>>58281091

Assuming I use no Windows specific things (eg. using functions from Windows header file). Part of a team I'm working with requires I write Linux buildable code. I'm familiar with Linux but it's not my primary platform. I don't have a dedicated Linux machine so I was to write it in VS and just pray it works on Linux. It's just because I can keep my macros, etc from VS and not start anew.
>>
>>58281126
Just set up a Linux VM to test your code in.
>>
>>58281025
>VS
You fucked up

Should have gone with MinGW + autotools/CMake from the start
>>
>some guy in my team uses VS
>keeps committing proprietary windows shit
>the rest of us have to keep reverting it and telling him to cut it out
>he says "but windows makes it so easy!!"
>mffw our primary target isn't even windows
>>
Trying to make Snake as a way to get started on more graphics-oriented projects in C++.

I'm having a bit of an issue, though. in my IDE (XCode), I'm including a library I'm using, SDL, and I'm also including the proper "header search path," but it can't seem to be able to find the header file I'm including...

#include "SDL.h"

/* main */
int main( int argc, char *argv[] ){
/* magic */
}


Any and all help is appreciated!
>>
>>58281194
>not using gitignore or whatever the fuck to ignore it outright
>>
>>58281032

The floor() function in C takes a double and returns a double. Casting to integer would take extra unnecessary instructions and would produce unexpected behavior for users of other languages

>>58281126

If you're writing in standard C/C++ and not using any VS-specific extensions, it should work fine.

But in all seriousness, you should use GCC or Clang on every platform.
>>
>>58281223
It's in the fucking code itself.
>>
>>58281200
#include <SDL2/SDL.h>
>>
>>58281229
Oh, my mistake.

Fuck that guy.
>>
>>58281200

>Search path is a folder on your desktop
Mate, move the SDL2 folder into /usr/include.
>>
File: reliefisnonexistent.png (53KB, 334x355px) Image search: [Google]
reliefisnonexistent.png
53KB, 334x355px
>>58281277
I don't think that's the issue... I've used libraries in my Desktop before (that and at least for me, my /usr/include folder includes files like ncurses.h, bootstrap.h, etc...(not libraries) )
>>
>>58281248
He somehow managed to convince the boss to let him only write libraries, so he never has to deal with actually making shit work on the target platform.
>>
>>58275737
1.
What language and free engine isn't all that important. It's a very low requirement game overall. Ask >>>/vg/agdg/.
I'd imagine gamemaker is their top recommendation as it's marketed as easy to use and its intended entirely for 2D. But there's plenty of options.
2.
How long depends on how good you are and the work you put in per unit time.

I don't see it being particularly much work if you try.
>>
>>58281377
Really?
That guy is going places, get that man a promotion.
>>
>>58281384
Worth noting:
People overestimate the complexity of mmo's because they look to the largest most complex games and set that as the minimum barrier.

An instanced MMO game is not that hard. It's approximately twice the amount of work you'd put on a drop in drop out multiplayer game (see practically any shooter) as you have a meta-level to your networking where you decide where to put your players.
>>
>>58281353

It's not a matter of that being the issue (you need to include SDL2/SDL.h). I'm merely stating that you shouldn't put libraries in your Desktop in general. There are standard locations to put them, and when you put them in non-standard locations, it becomes a pain in the ass to build your project on any other system, should you need to port it.
>>
>>58281417
I'd prefer him and my boss gone, they're the reason we're still on svn and not git.
>>
>>58281439
He could use a sane build system and not XCode.
>>
I've spent the last 5 hours or so porting my language to Python and writing a page. God I hate Python, but HTMLCSScript 2016 is fucking worse.
>>
File: 1483286359238.jpg (103KB, 572x536px) Image search: [Google]
1483286359238.jpg
103KB, 572x536px
This one is my favorite so far
.matrix .matRow.l2 > .matCell:first-child {
margin-left: 1px;
width: calc(16em - 1px);
}

And few lines up:
.matCell {
width: 16em;
>>
>>58275717
guys im 65, is it too young to unlearn programming?
>>
>>58281560
no, just watch more anime
>>
>>58281459

I really wish IDE users would just use standard Makefiles or CMake files.
>>
File: justwerks.png (156KB, 1350x665px) Image search: [Google]
justwerks.png
156KB, 1350x665px
Hey! I'm not 5 users anymore!
>>
File: arrays_h1_381x122.gif (1KB, 381x122px) Image search: [Google]
arrays_h1_381x122.gif
1KB, 381x122px
You know those graphs of arrays from compsci books? How do I make one?

I'm assuming in TeX?
>>
>>58281581
>not wishing their death
You're way too kind, Ruby.
>>
File: file.png (14KB, 278x247px) Image search: [Google]
file.png
14KB, 278x247px
>apply for graduate software dev job position
>see this
fug
>>
>>58281618
why are there two elifs that have the same condition?
>>
>>58281674
>desired pay

I always put in 100k
>>
>>58281689
?, where?
>>
>>58281674
>Desired pay
I would max out the input fields with 9s.
>>
>>58281446
Show them gitlab. Free private repos. Push it as free off site backup of the code base. You can also just self host if you need muh biznes sekrrts.
>>
>>58281674
>Graduate
In the ~50k pile it goes
>>
>>58281581
>>58281459
>>58281353

QT solved my problem... That, and apparently, I *do* have the DSL directory in /usr/blah/include/
>>
>>58281691
That's why you're still a neet living in your mom's basement.
>>
File: 1470159730006.png (110KB, 429x410px) Image search: [Google]
1470159730006.png
110KB, 429x410px
>>58281720
*SDL
>>
>>58281674
>desired pay
How is anyone supposed to ever know what to put there? Is that the minimum before you consider taking the job?
What kind of work week does this account for?
There's just too many variables.
>>
I wrote a wrapper for the FLIF library in Racket. That is, it covers all of the functions, but it could be more Racket-y, I suppose. Then I decided I'd figure out decoding the image so I can display it in Ivy, my image viewer. It takes a very, very long time to go from a FLIF file to a Racket bitmap% with most of the time spent scanning for RGBA pixels.
>>
>>58281702

elif(commands[0] == "JOINCHANNEL" and not (commands[1] in self.channel))

then right after:

elif(commands[0] == "JOINCHANNEL" and not (commands[1] in self.channel))
>>
>>58281758
wow i fucking suck, top one is supposed to be self.session.findChannel(commands[1]) != -1
>>
>>58281772
it happens m8.

code reviews work.
>>
test
>>
>>58281828
    y = sorted(temp, reverse=True)
x = 0
count = 1
for i in range(1, 7):
if y[x] - 1 == y[i]:
count += 1
else:
count = 0
x += 1
if count == 5:


wrote this to find a straight for my poker game. i feel like i solve problems stupidly but oh well.
>>
>>58282055
the output

['h', 'J', 'h', 3]
['s', 'Q', 'c', 10, 'd', 'K', 'c', 9, 'c', 5]

['s', 4, 'd', 10]
['d', 7, 'd', 8, 'c', 3, 'c', 9, 'd', 'J']

['h', 'J', 's', 6]
['h', 8, 'h', 'K', 's', 10, 'd', 9, 'c', 7]

['c', 'J', 'd', 5]
['c', 'A', 'd', 'Q', 'c', 7, 'c', 10, 'h', 'K']

['c', 2, 'c', 'J']
['c', 7, 'c', 6, 's', 8, 'c', 10, 'h', 9]
>>
File: umatrix-edge.png (841KB, 1440x860px) Image search: [Google]
umatrix-edge.png
841KB, 1440x860px
Restyled the popup UI, now back to bug fixing
>>
what is the best way of reading a textfile with integers until the end of the file? I did it like this:

C++
ifstream f("name.ext");
int i;
while(f >> i) {
//do stuff
std::cout << i;
}
f.close();


C
FILE* f = fopen("name.ext", "r");
int i;
while(fscanf(f, "%d", &i) == 1) {
//do stuff
printf("%d", i);
}
fclose(f);


I've heard people saying that using f.eof() and feof(f) ins't good.
>>
>>58282300
>I've heard people saying that using f.eof() and feof(f) ins't good.
who says this
>>
>>58282300
>I've heard people saying that using f.eof() and feof(f) ins't good
I bet those people also need help getting dressed in the morning
>>
File: toontown.jpg (182KB, 1366x705px) Image search: [Google]
toontown.jpg
182KB, 1366x705px
>>58275717
I'm working on how to stop procrastinating on 4chan and actually getting work done.
Help please.
>>
>>58282343
one time my aunt woke me up with some clothes to wear and i fantasized about doing incest does that count?

btw my aunt is this beautiful millionaire lady with DD tits.
>>
>>58282365
hmmm, i think he meant need help getting dressed /every/ morning, not just once
>>
>>58282365
damn nice i always wondered what it'd be like to have a really attractive mom/female relative
>>
>>58282365
Post pics
>>
>>58282311
http://stackoverflow.com/questions/5605125/why-is-iostreameof-inside-a-loop-condition-considered-wrong
http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1046476070&id=1043284351
and many similar others
>>
>>58282427
well who do you trust more: me or those websites?
why ask this if you have summoned perfectly good answers already
>>
>>58282427
Well. That's improper use of them. Not that f.eof() and similar constructs are bad.
>>
>>58281032
x//y
>>
File: 1454911292875.jpg (338KB, 687x1024px) Image search: [Google]
1454911292875.jpg
338KB, 687x1024px
There's something I don't get about context switching.

When a new process is created, the kernel copies the kernel page tables into the new process' page tables, which means each process has it's own version of the kernel page tables.

Now say in process A the process makes a syscall, in that syscall the kernel allocates a page and maps it into process A's address space.
Then sometime after the timer fires and causes a context switch into process B. Sometime after while the kernel is still in process B, the kernel tries to access the area where the page was mapped and page faults because that page was mapped in process A's address space and not B's.

Unless the kernel iterates through each process mapping the page in each when it allocates a page, I can't think of how you would solve this.
How does Linux do it?
>>
new thread: >>58282497
new thread: >>58282497
new thread: >>58282497
new thread: >>58282497
>>
>>58282501
dumbass
>>
>>58282462
I thought there could be better ways of doing the same thing, using other functions or stuff from c++11/14.
>>
>>58282474
Look it up yourself.
>>
File: Untitled.png (317KB, 611x342px) Image search: [Google]
Untitled.png
317KB, 611x342px
>>58282501
>200 memes too early
>>
>>58282518
std::copy(std::istream_iterator<int>(ifs), std::istream_iterator<int>(), std::back_inserter(vec));
>>
>>58282547
I don't know what to search for.
I've looked around on osdev and didn't find anything.
>>
>>58282558
I mean read the Linux source to see how it handles the situation.
>>
I wanted to make an imageboard without thumbnails but it sucks, maybe it's true Futaba can't be improved after all. What do you think?
>>
>>58282651
>without thumbnails
stop
>>
>>58282666
Without them it doesn't feel like the text is linked to the image. I knew it was going to be weird but I had to try.
>>
>>58275717
I'm working on learning c++ studying this book http://www.stroustrup.com/4th.html

What do when finished guys?
>>
Window Manager for my OS
I haven't decided quite how it'll work yet, but i have an idea for key control. IT will get an event when a key is pressed, and the program or alternatively window manager decides what to do with it.
>>
Off topic:
Can you report people for deleting their threads?
>>
>>58282944
The thread was up for too long.
A janitor must have done it.
>>
>>58282962
Can you report people for deleting [...] posts?
>>
>>58282944
faggot mod deleted it
t. OP of the deleted thread
>>
>>58282981
That's what you get for posting before the bump limit, you fucking idiot.
I hope you get banned.
>>
For real this time:
>>58283032
>>58283032
>>58283032
Thread posts: 323
Thread images: 48


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