[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: 325
Thread images: 30

web dev crap goes in >>>/g/wdg

crappy game dev goes in >>>/vg/agdg

general questions go in >>>/g/sqt

previous thread: >>52897215

what are you working on, /g/?
>>
>>52902189
kill yourself
>>
>>52902171
Now here's an OP I can get behind.
>>
>>52902192
kill yourself
>>
>>52902201
kill yourself
>>
>>52902192
kill yourself
>>
>>52902207
kill yourself
>>
>>52902212
kill yourself
>>
DPT IN A NUTSHELL
>>
weebshits on suicide watch!
>>
File: xlsmuW1.png (83KB, 600x700px) Image search: [Google]
xlsmuW1.png
83KB, 600x700px
Off to a rousing start.
>>
>>52902239
kill yourself
>>
MOOOOOOOODS! MODS MODS MODS!
>>
>>52902255
nice gui for such a pointless program unless you're doing metrics

also

kill yourself
>>
INB4 MODS!
>>
>>52902292
I'm planning on adding metrics that analyze phrases and flag pasta and rate posts out of 10 on how 'shitposty' they are.

Kill yourself.
>>
bamp for mods!
>>
>>52902255
osx version when?
>>
>>52902589
Never
>>
>>52902601
release source and I will port it
>>
>>52902633
sauce is wpfshit
>>
so gee, have you managed to average 2 ints?
>>
>>52902651
You'd need to build another gui any way you look at it

fuck, it's probably easy to build the backend anyways. It's just JSON and some processing.
>>
>>52902666
Use bitshit, satan
>>
>>52902674
>build another gui
>I can't into qml
step it up, anon
>>
>>52902689
bitshit no workee
>>
I want to mount that in the traditional missionary position and insert my blood engorged phallus into the vaginal orifice before commencing hip gyrations at a rate of 120 oscillations per minute for a period not exceeding 240 medicated minutes before impulsively ejaculating fertile sperm for the purposes of procreation.
>>
>>52902715
>traditional missionary position
pleb >>>/wdg/
>>
Is Java still the no. 1 future-proof viable language to learn?
>>
API to find all the manga cafes in Tokyo.

Kill yourself
>>
>>52902752
yes
>>
>>52902689
confirmed csscuck
>>
>>52902752
yea probably but i don't think for much longer ( max 5 years)
>>
>>52902757
>jerking it to kids in public
>muh degeneracy
end yourself, subhuman
>>
>>52902752
Pretty much, C++ is another contender too.
>>
>>52902772
why? what's replacing it? seems to me to be going as strong as ever
>>
>>52902772
m8 Java's future proofness has only increased, the fuck do you think is going to replace it?
>>
>>52902781
what the fuck
>>
animal *arr[10];
for (int i = 0; i < 10; ++i){
animal k;
arr[i] = &k;
}
for (int i = 0; i < 10; ++i){
cout << "arr["<<i<<"] says " + arr[i]->sound() << endl;
}


Why is this working? Shouldn't the variables go out of scope at the end of the first for loop, leaving the pointers dangling?
>>
Speaking of progress and future proof has anybody else noticed Python has come to a standstill while Ruby is advancing at record pace?
>>
>>52902808
j4lyfe
>>
>>52902853
>Why is this working?
because undefined behavior says anything can happen
>Shouldn't the variables
it does
>>
>>52902853
freeing memory doesn't necessarily change it
>>
>>52902752
Java is the new COBOL.

It's future-proof in the same way that being a waste collector is future-proof, since we're always going to need them.
Doesn't make it a very fulfilling job though.
>>
>>52902808
>>52902798

I said probaly and i've given a time , unless there will be changes some industries might take-over;

And i'm talking about the mobile industry ( last 2 years there was already a decay), big enterprises, etc.

They'll try to improve it performance-wise while keeping the "bullet-proof" JVM up, i don't think how it will work.
>>
>>52902856
ruby? that half-assed me-too perl wannabe vomit?
inb4 muh method_missing
inb4 muh 300 lines stacktrack
>>
>>52902171
I bet she has a cute dick
>>
>>52902171
Web"dev" shouldn't even be considered development.
>>
>>52902892
nobody is freeing anything in that code sample
>>
>>52902884
Okay thanks. I was trying to demonstrate to someone that you couldn't do something like that, and then it wound up giving me the correct output anyway, so I thought I was misunderstanding scope.
>>
>falling for the jeb dev meme
>>
>>52902171
>>52902189
>>52902192
>>52902197
>>52902201
>>52902207
>>52902209
>>52902212
>>52902220
>>52902226
>>52902239
Samefag
>>
>>52902909
>some industries might take-over
what?
>i'm talking about the mobile industry
what about it?
>big enterprises
those are mostly java shops
>i don't think how it will work
what the fuck are you blabbering about, you fucking mongoloid?
>>
File: Dragon_trees.jpg (154KB, 800x574px) Image search: [Google]
Dragon_trees.jpg
154KB, 800x574px
Just finished with simple DOL-system for procedural generation of plants. Will continue with L-Systems, next up is either kl-system, stochastic or parametric. Very fun results and easy to implement :)

pic related but not work of mine
>>
i rate your github/bitbucket/anything on 10.
>>
>>52902985
nobody cares; post some animu traps, cuckboi!
>>
>>52902963
Turn on the unique IP monitor for your threads so you can stop being this delusional.
>>
>>52903004
rate me bee
>>
>g says networking is hard
>with ue4 you literally select the number of players and everything just werks
>>
>>52902964
i guess what he is reffering to are the "bottlenecks" of performance in java that will deprecate the language in favors of others since the hardware is getting stronger all-around platforms.
>>
>>52903022
>just werks
>web2.0 generation
>muh js
>muh drag and drop
>just werks
>icaninto netwerkz nao!
end yourself, you fucking weeb cancer!
>>
>>52902909
>They'll try to improve it performance-wise while keeping the "bullet-proof" JVM up
They've given up on significantly improving the JVM performance through JIT optimization, they're actually focusing more on making the JVM even more bullet-proof by allowing developers strip it to the very core; we'll be having a <10mb JVM soon.
>>
Is there any Android Developer here?
When you create a new Activity, do you always create a blank activity and design it from scratch or use the code template related with the Activity's purpose?
Picture related, the code template I am talking about.
>>
>>52903031
>the "bottlenecks" of performance in java
what are those?
>will deprecate the language in favors of others
which ones?
>since the hardware is getting stronger all-around platforms
how the fuck does that make any sense, you imbecile?
>>
>>52903007
>>>/a/
>>>/mlp/
>>>/trash/
>>>/out/
>>
>>52903031
They only way they'd be able to squeeze more performance like that would be by simplifying Java (the language) and the java bytecode to Go-tier retarded.
>>
>>52903045
>i want to reinvent the wheel!
>web1.0 generation
>muh C
>muh functional programming
>i want to reinvent the wheel!
>icaninto everything nao!
>>
>>52903057
That's your decision, dude. I see no point in starting a blank activity when they already provide one that's very similar. Changing some small things here and there takes less time than rebuilding the entire thing.
>>
>>52903102
knowing how stuff works is reinventing the wheel
you heard it on /g/, folks!
back to css, shitstain!
>>
TRAPS!
>>
>>52903129
Do you understand all of quantum mechanics? No? Then you don't understand how computers work at the molecular level. Therefore, you don't understand computers. Why are you so uneducated?
>>
File: 39431.png (306KB, 593x540px) Image search: [Google]
39431.png
306KB, 593x540px
>>52903158
>i don't understand quantum mechanics
>>
File: 6346334.jpg (99KB, 600x800px) Image search: [Google]
6346334.jpg
99KB, 600x800px
>>52903198
>i waste time watching japanese cartoons when i could be studying how the world works
>>
>>52903158
>Do you understand all of quantum mechanics?
yes
>No?
i said yes, you dumb fuck
>Then you don't understand how computers work at the molecular level.
but I do
>Therefore, you don't understand computers.
therefore what, you retard? your whole premise is wrong
>Why are you so uneducated?
you're definitely brain damaged
>>
OP is a faggot
>>
>>52903066
are you fucking retarded?

Was gonna put some references and links but since you ask every fucking shit i'm not even gonna fall for your fucking bait
>>
>>52903228
>I shitpost on 4chan when i could be doing something productive
>>
>>52903232
>Do you understand all of quantum mechanics?
>yes
You are wrong, my friend. It is physically impossible for one human to know _all_, aka 100% about quantum mechanics, especially since small details get added constantly. How bold of a shithead that thinks he can know it all to call my brain damaged.
>>
>This thread has been pruned or deleted
nice.
more yoga pants, more suicide watch for the weebs.
>>
>>52902853
You're storing pointers.
>>
>>52902930
>>52902892
>>52902853

the variable animal k; in the loop goes out of scope, and becomes free'd. If it's an object, the destructor gets called. If it's a struct, then chances are if it was small enough, it was stored in the stack in the first place.

format PE console
entry start

include 'win32a.inc'

section '.code' code executable
start:
mov [i],0
loopstart:
mov eax,[i]
cmp eax,10
jge loopend
push ebp
mov ebp,esp

sub esp,12 ; allocating animal k is as simple as stack framing!
mov esi,animal
mov [esi+eax*4],esp ; store our temp variable into our array

mov esp,ebp
pop ebp
inc [i]
jmp loopstart
loopend:
ret

section '.data' data readable writeable
i dd ?
animal dd 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
>>
File: 1453651274891.jpg (86KB, 719x720px) Image search: [Google]
1453651274891.jpg
86KB, 719x720px
>>52903228
>I don't know how the world works
>>
jewmods are on a roll
>>
>>52903294
You post images of japanese cartoon characters, you can't know how the world works.
>>
>>52903237
>Was gonna put some references
>honestly guise, I was gonna bring references in the next thread
fuck off, moron
>>
File: 1453656893900.png (1021KB, 870x717px) Image search: [Google]
1453656893900.png
1021KB, 870x717px
>>52903320
>I shitpost on 4chan and pretend I don't like anpanime
>>
>>52903266
>being this pedantic
kill yourself
>>
>>52903266
>It is physically impossible for one human
it might be impossible for you with a low IQ; not impossible when you're working on the bleeding edge research of quantum mechanics and you publish new material every year
fuck off, pleb
>>
>>52903353
>complaining about anon not doing everything himself, being pedantic as fuck
>calls me pedantic
Good. I hope you understand now, you hypocrite.
>>
>>52903361
If you were working on the 'bleeding edge research of quantum mechanics', you wouldn't waste your time on 4chan, especially not on /g/, and most importantly, not on a thread filled with amateurs learning programming.
>>
>>52903288
>goes out of scope, and becomes free'd
you don't know what you're talking about
>chances are
so you basically don't know shit and you're just trying your luck with an explanation
>>
>>52903436
I think the poo in the streets is getting inside Pajeet's brain!
>>
File: triangle.webm (271KB, 800x608px) Image search: [Google]
triangle.webm
271KB, 800x608px
Someone suggested yesterday that I should be doing vertex transformations on the gpu side?

How would I go about doing that?
>>
>>52903650
vertex shaders?
>>
>>52903650
https://www.google.com/search?q=transformation+matrix
https://www.google.com/search?q=vertex+shader
>>
>>52903650
learn linear algebra first; the one that suggested that didn't know you don't know math at all (he was a moron that couldn't read 2 posts worth of content)
>>
Is c++ primer 5th edition fine or should I read some book that covers c++14?
>>
What do you guys recommend? gulp, grunt or brunch (besides bower which is basically a must for easy management of client side extensions like modernizr, browserify, etc as bower components). I'm looking for a generic solution that plays well with any client side stack (backbone, angular, knockout, react, vue, meteor, etc).
>>
In Haskell, if I use pattern matching to deconstruct a data object, then return a constructor with all the same arguments, am I duplicating that object? Is there any way around that?
Like this
A b c d
| b == 4 = A b c d
| otherwise blah blah blah
>>
writing a portal engine (ala build) for the 32x.
>>
>>52899602
If you're still here and interested, I uploaded it to Github now.

https://github.com/forbjok/chandler2

You will need to clone and add-local a few dub packages, as they are not in the dub repository (yet):
https://github.com/forbjok/reurl
https://github.com/forbjok/jsonserialized
https://github.com/forbjok/dstatus

It's reasonably usable at this point, but completely devoid of any documentation yet, and I haven't gotten around to properly handling transport errors (connection loss, http errors, etc) yet, so I don't know how it will react to those.

In short summary, you can specify any number of urls as commandline arguments, and they will be downloaded. If you want it to watch one or more threads indefinitely and add new posts, give it one or more "-w <url>" arguments. For watching threads, the interval at which it checks for new posts can be set with "-i <seconds>".
>>
Is /dpt/ jealous of /wdg/ or something?
>>
>>52903944
C++14 is quite a minor upgrade to C++11, you can ignore it for now.
>>
>>52903959
Kill yourself
>>
File: shiggydiggy.jpg (7KB, 378x378px) Image search: [Google]
shiggydiggy.jpg
7KB, 378x378px
>>52903959
>besides bower which is basically a must for easy management of client side extensions
>not using jspm for client-side components
>>
>>52903990
You can bind pattern to an object as a whole via @, something like
match a of 
wholeObject@(A b _ _)
| b == 4 = wholeObject
| otherwise = undefined
>>
>>52904118
>jspm
This. Changes. Everything!
>>
>>52903650
Go away and read an OpenGL tutorial, or better still, a book.

You can't expect to learn something like OpenGL one isolated fact after another. You need to understand some general principles and have a reasonable overview.
>>
>>52904089
>I don't know but I feel compelled to shitpost
Stay pleb!
>>
>>52904216
It does indeed. No more hardcoding paths to .js files or .css files in your htmls!
>>
>>52904044
no it's just that it gets old fast when web dev shitters bombard us with retarded web dev related questions
>>
>>52904140
That's exactly what I was looking for, thanks
>>
>>52903959
kill yourself

>>52904118
kill yourself
>>
>>52903990
> am I duplicating that object?
Who cares?

A fundamental feature of pure functional languages is that there's no such thing as "identity" for values. There's no difference between copying a reference and duplicating (cloning) an object (unlike e.g. Java where you have == and .equals() and it matters which one you use).
>>
How do I stop being a perfectionist?
I keep rewriting my code. The code itself is fine, but I keep nitpicking on trivial shit like whitespace and documentation. I've come to a point where I d on't even bother writing code anymore.
>>
>>52904256
>retarded web dev related
codewords for "out of our league"
>>
>>52904293
>There's no difference between copying a reference and duplicating

This kills the cache.
>>
>>52904325
same; I just ask people to average 2 ints instead and provide me with entertainment
>>
File: 18211.png (98KB, 400x300px) Image search: [Google]
18211.png
98KB, 400x300px
>>52904338
>>
>>52904293
> Who cares?
Yeah, you don't care until your first contact with reality, and then you start to use unboxed types, force evaluate lazy trunks and doing lots of magic just to get close to 1/10 of C performance.
>>
How do I get good at Java? Everything I try without a step by step tutorial doesn't work. I even tried copying someone's code on github to base my code off of that, but I couldn't find anything useful.
>>
>>52904325
Why don't you try writing something non-trivial, preferably something outside of your comfort zone.
You'll be too frustrated to worry about mundane shit like formatting and documentation.
>>
>>52904421
read a book
>>
>>52904443
That's what I tried. I stopped writing C++ and started learning Go. That didn't help. In fact: it got even worse. It's so bad it even affects me at my job.
>>
>>52904519
I can suggest one of two things.
Stop working harder than you need to.

And get yourself checked out, you might have actual OCD if this is starting to disrupt your capacity to work.
Do you experience this in any other aspects of your daily life?
>>
>>52904518
i don't know how to read.
>>
>>52904567
/self
>>
>>52904366
If you want C, you know where to find it.

Unboxed types, strictness annotations and concerning yourself with the precise evaluation strategy of a specific implementation should be reserved for the specific cases where optimising a (very) small proportion of the code brings significant gains to the entire program.

If you end up doing it a lot, you're probably using the wrong language.
>>
>>52904558
>you might have actual OCD
I'm pretty sure I do.
>keep checking if the door is locked
>keep checking if all the right items are packed
>nail biting (not really OCD, but more an anxiety thing)
I don't think getting myself checked out is the right thing to do. I have to figure it out by myself. Maybe some obscure shit like meditation helps me out. Or go completely out of my comfort zone and learn something like Haskell or do more math stuff in programming.
>>
>>52904633
that's normal, you're just insecure over whether you did something correctly

true OCD is when you start experiencing irrational thoughts and/or fear if you don't do some compulsive behavior
>>
What's the best way to learn x86_64 assembly? I already know one assembly language (AVR), but I realize x86 is much more complicated.
Seems like a lot of the assembler books in the Gentooman's Library are for 32-bit x86 only and explain all the terribly useless cruft x86 carries with it. Additionally they are usually completely tied to Windows. Anybody have a good book that's OS agnostic and 64-bit focused?
>>
Threadly reminder that you should not refer to the act of programming as coding. It is improper and makes you look like a 16 year old

You are a programmer, not a coder

Software Alchemist is GOAT
Developer is okay
Magician is okay
Software Magus is okay
Software Engineer is okay
Software Architect is okay
Code Guru is questionable

Archmage is reserved for only the most senior of programmers

Writing in HTML and CSS is not programming, therefore it should be referred to as designing
>>
File: power of boobs.webm (3MB, 1280x720px) Image search: [Google]
power of boobs.webm
3MB, 1280x720px
It's time to ask your beloved programming literate anything.

>>52903004
http://neetco.de/codeartisan/ (*゚ー゚)ゞ

>>52904080
c++11
C++ G++:                     1745.763408969  seconds time elapsed
C++ clang++: 1810.088946536 seconds time elapsed


c++14
C++ G++:                        4.659448453 seconds time elapsed
C++ clang++: 5.518077517 seconds time elapsed


>>52904799
intel/amd manuals
http://www.cs.karelia.ru/~akolosov/bosp/2008/docs/Blum%20R.-Professional-assembly-language-%5Ben.Wrox.2005.577p%5D.pdf
https://github.com/mat0thew/awesome-asm
https://delicious.com/Evenbit
>>
>>52904359
>actually posting memes
Get with the rimes gramps
>>
>>52904913
Kill yourself, Tetsumi faggot.
>>
>>52904913
>C++11
>C++14
Explain. I bet this is some kind of expanded constexpr stuff, nothing relevant for a newcomer.
>>
>>52904787
Yeah, I'm not yet full looney. It's just the small stuff I mentioned. The checking habit has lessened over the years.
You're probably right, I'm just trying too hard. I had the idea of writing a web server, while I normally only do client stuff. Maybe that'll help me.
>>
>>52904913
Are you also the CHIP-8 shill?
>>
>>52905063
No, he's the benchmark weeaboo faggot who's awful at everything he does.
>>
File: umarusfs.jpg (115KB, 1280x720px) Image search: [Google]
umarusfs.jpg
115KB, 1280x720px
>>52905063
no.

>>52904953
>>52905116
please, don't bully.
>>
>>52904949
My computer typing skills surpass any of your so called 'talents'. I can type 'internet relay chat' in the time it takes you to type 'IRC' (by the way, acronyms are so passé). I have 6 custom developed DAS Keyboards programmed to a vast array of languages. They are strategically placed across my 3 tier, Mahogany desktop that I had custom ordered from France. I can communicate with 3 different people simultaneously while coding the README updates for my UNIX distribution. Did I mention I have the all-time high score on Mavis Beacon? You have nothing on my impressive typing skills.
>>
>>52905218
Best anime of the season?
>>
>>52905298
Bokumachi has any show this season beat desu senpai
>>
>>52905355
>>52905298
>>>/a/ faggots.
>>
>>52905223
>I can communicate with 3 different people simultaneously
How many limbs do.. Actually could you post a picture of yourself?
>>
File: Bh3.png (7KB, 224x250px) Image search: [Google]
Bh3.png
7KB, 224x250px
Well I think I'm ready for the world computer chess championship.

Just look at this beautiful play on the Queen's Gambit.
>>
>>52905393
it is trying to weaken your king side, next it will force you to castling on kings side and mate you from there
>>
File: 2016-feb5th.jpg (186KB, 1920x1280px) Image search: [Google]
2016-feb5th.jpg
186KB, 1920x1280px
>>52905391
I guess... I had just woken up, so don't be harsh.
>>
Anyone familiar with FTP transfers?

I am trying to re-upload my home dir using Filezilla but am getting disconnects after about 25%. I have also tried using cpanel file manager but I get similar error messages.

How to fix?
>>
>>52905436
That astute gaze, unblemished skin, your firm figure and mighty stance.
I bow to you.
>>
>>52905223
You're fucking dead, kiddo.
>>
>>52904293
>A fundamental feature of pure functional languages is that there's no such thing as "identity" for values.
It doesn't have to be purely functional. That's a fundamental feature of Algol 68 and Standard ML too.

http://permalink.gmane.org/gmane.lisp.scheme.scsh/3770
>>
>>52905479
Can't even tell I'm taking a selfie.
>>
>>52905517

and now you're paying the price.
>>
>>52905393
How is this better than stockfish?

ALSO, webdevs are shit tier in the development world. That's why they have a completely other thread and it's usually filled with stupider people than this thread. Go hide in your broken, run down javascript huts, fucking webdevs.
>>
>>52905437
Have a less shitty connection? This isn't /sqt/.
>>
>>52905576

Should I change something in my router settings?
>>
>>52905615
Did you try turning it off and on again? If not, blow in the cartridge.
>>
>>52905615
>This isn't /sqt/.
Heed the man's advice.
>>>/g/sqt
>>
>>52905562
>How is this better than stockfish?
It's not. What are you, retarded?
>>
>>52905562
>stupider people than this thread
that is impossible
>>
What are good books on learning assembly?
>>
Can you do something for me?

Try
SystemPropertiesInfo(SPI_SETMOUSESPEED, 0, (LPVOID)2, SPIF_SENDCHANGE);


Tell me if it does work or if it don't. I can't make it work. SPI_GETMOUSESPEED returns the value set but there is no change in pointer acceleration.
>>
>>52905894
What arch?
>>
>>52906196
intel64
>>
>>52906225
So IA-64?
>>
how to transform this if-else clause to one-line?
int a = 234,b=777;
int c = -1;


if (a == b)
c = 10;
else if (a > b)
c = 20;
else
c = 30;

one line
c = (a == b) ? 10 ? (a > b) ? 20 : 30 : -1;

i tried this but it is not working..
>>
>>52906269
>le tricked face
Sorry, I'm not anon who asked the question.
>>
>>52906293
Try again. That ternary is fucked up. You do know ternary goes cond ? expression_if_true : expression_if_false.
>>
>>52906315
yeah with 2 values its easy, but with three not so much
>>
>>52906355
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

c = a == b ? 10 : a > b ? 20 : 30
>>
>>52906355
It's easy. You just don't understand how if-else statements work.
   if (a == b)
c = 10;
else if (a > b)
c = 20;
else
c = 30;

is quite literally
if (a == b) {
c = 10;
} else {
if (a > b) {
c = 20;
} else {
c = 30;
}
}

'else if' doesn't actually exist as a construct. Does that help you see how they should be nested?
>>
File: 1.jpg (426KB, 1920x1080px) Image search: [Google]
1.jpg
426KB, 1920x1080px
>>52906401
thanks!
>>52906413
> You just don't understand how if-else statements work.
i understand, i just trying to write it in one line, because i never wrote a ternary operator with 3 conditions only two
like
 return a > b ? -1 : 0 


thanks for the help anyway
>>
>>52902171
kiII youseIf
>>
>>52906196
>>52906225
>>52906269
>>52906311
I'm the guy who originally asked about assembly books. I have a 64 bit Intel i7 processor and am running Debian. Any good books you recommend?
>>
>>52906895
It's for 32-bit computers, but really going from 32 to 64 isn't that big of a jump
>>
>>52906955
Thank you, appreciated.
>>
Trying to make a stupid WinAPI function work.
Going to Microsoft support for Windows SDK
Get this: https://support.microsoft.com/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/getsupport?oaspworkflow=start_1.0.0.0&wf=0&wfName=productselection&prid=15724

Microsoft DOES NOT KNOW HOW TO MAKE A FUCKING LINK.
>>
Anyone familiar with Oracle Application Express offer me some advice. I've installed Oracle Express and installed Apex and can access the Administration services. However when I go on localhost:8080 I am asked for authentication. I can get pass XDB with System and passord however with the Apex authentication it never goes through. I tried resetting the password following this guide http://blog.mclaughlinsoftware.com/2011/09/14/reset-11g-xe-apex-password/ and using the user rest password in administration but I still can't get past that screen. Scrub question I know but I am really stumped. Anyone got an idea of what I should be doing?
>>
Javascript is a pass-by-value language. I'm trying to understand how parameters and arguments work with one another in a function.

A parameter is a variable. When we pass an argument to the function, we are passing the value referenced by that argument, and assigning its value to the parameter.

So, when argument = 3 is passed to the function, it's like saying
var parameter = 3;
Is that right? Would something like this be permissible within a js function:
function foo(param) {
param = param + param;
return param;
}

What I suppose I'm trying to figure out is if param acts as a variable within a function, holding (initially at least) the argument value, or if it's almost like a blank space that is "filled in" by our argument value. Like, it's not really a variable holding a value, it's just a value. In the case above, we wouldn't be able to assign param + param to param, because it'd be like saying "10 = 10 + 10". 10 isn't a variable there, it's just a value.

I'm so fuckin tired bros
>>
>>52902926

You guys keep hanging out making fizz buzz programs and I'll hang out here making 150k.
>>
Working on reading binary files through functions and structs and returning the structs to be printed back in main. Can't figure out what I'm doing. The main will print things out but it's all gibberish, so I've got that going for me at least.
>>
>>52907513
when you do param(x) you pass the value of x into foo which is assigned to variable param. if x is 10, param is also set to 10. param is a variable, you can reassign it if you want.
>>
>>52907575
I'm sure you are anon
>>
>>52907639
He meant over the course of his lifetime
>>
>>52906529
replace 0 with another ternary. you can nest them.
>>
File: gamejava.webm (671KB, 1440x896px) Image search: [Google]
gamejava.webm
671KB, 1440x896px
>after two months got solved the stupid SDK location can't be found error in eclipse because I move to lubuntu
>>
>>52907681
this game took you more than 2 months?
>>
File: krautchan overdose.jpg (41KB, 700x525px) Image search: [Google]
krautchan overdose.jpg
41KB, 700x525px
What's the deal with Object Oriented Programming? Is it just a meme or something I should take seriously?
>>
>>52907714
If you take yourself seriously as a programmer you should know how to program in all paradigms.
>>
>>52907766
If you take yourself seriously as a programmer you don't give a shit

Use your favorite language
Provide sparse build instructions
Don't support other systems unless someone else wants to do it for you
Ignore retards who scream about their favorite "awesome" languages and libraries
Fuck bitches, you do it for free nigger
>>
>>52907714
Its a decent tool that you are gonna need if you are getting on Data structure
>>
>>52907788
Giving a shit is exactly what is entailed in taking yourself seriously, airhead.
>>
>>52907803
No, it's programming. All that matters is that the compiled product works on some system. If it's done for free, that system is yours.
>>
>>52907821
Take it in boys. Someone who fell for every /dpt/ meme possible.
>>
>>52907707
nah, around two weeks max, including the character editor who took the two weeks.
>>
>>52907714
And what's the deal with airline food?
>>
>>52906293
>how to transform this if-else clause to one-line?
For what purpose?
The first time I saw ternaries I basically bundled it with goto in the "thank fuck we don't have to use this shit any more" pile.

A single ternary isn't actually that complicated and occasionally has its benefits, but the second you are nesting them you should really just be using if blocks.
>>
>>52907838
>boys
>>
>>52902985
Would be interested in looking into this if willing to share. Doing the exact opposite. Working on a Flora/Fauna generator based on generation principles for things like root type, trunk, branch, and leaf generation types. Pretty primative at the moment with just a bunch of Randoms across a few Enums, but I plan on making it a little more deterministic.
>>
File: cpp-ogl-monkey.webm (2MB, 1920x1080px) Image search: [Google]
cpp-ogl-monkey.webm
2MB, 1920x1080px
Learning C++ and OpenGL.
>>
>>52907942
>C++
>>
>>52907955
AAA vidya game language.
>>
>Basic C++ programming class
>Started this week
>Scared to go full powermode and have to make shit code on purpose
>Don't want the prof to bug me about "STOLEN CODE!!!!!" like what happened in the C class

Holy shit that was fucking gay cancer hell
>Make a rudimentary thing ~400 lines in a few hours
>WOW SO FAST
>WOW MUST BE STOLEN
>>
>>52907987
>STOLEN CODE
??? What is it?
>like what happened in the C class
What happened?
>>
>>52907987
>>Scared to go full powermode

xpost from /r/cringe
>>
>>52907987
Just hand it in a little later so they don't cry about it
>>
>>52908011
>What happened?

Second part of my first post

It was just a shitty sudoku solver that went algorithmically then brute forced, could have made it a lot faster if I bothered to add in one algo.

He made me add a bunch of fucking useless shit like
>MAKE THE CONSOLE OUTPUT PRETTY!
>SHOW HOW IT SOLVES IT
>ADD PRETTY COLORS
>>
>>52907987
>Data Structures class
>Talk to the teacher after the class about having done all the assignments already
>Agrees that I'm exempt from the class on the condition I work on a personal project and give him weekly reports on progress
What's it like going to a shit uni?
>>
>>52908054
>>MAKE THE CONSOLE OUTPUT PRETTY!
>>SHOW HOW IT SOLVES IT
>>ADD PRETTY COLORS

That's not useless things.
>>
>>52908054
>ADD PRETTY COLORS
he made you use curses? what an awesome teacher.
>>
If I have a function recursively call itself, when it finally returns will it return the value from the last called function?

E.g.
function foo(param) {
// code
if (something) {
foo(param); // call self with argument passed to param at start
else {
return foo;
}
}
>>
>>52907987

omg u can do basic promgramming u r so leet
>>
>>52908087
its not a functional requirement
>>
>>52908087

Among other things.
But it is useless, nobody will use it, it was just a project.
And it was already very visible, it was separated into 3x3 (4x4 for 16x16 sudoku) grids
How is that not readable? It's not like I printed them out in one line

>>52908102
I used windows API because I was butthurt.
(SetConsolePos, that shit you used to change colors)

I'm still fucking butthurt about that class
>>
>>52908106
You literally just gave the definition of recursion. Yes.
>>
>>52908106
no, unless in your example you meant return foo(param);
>>
>>52908127
You had already finish the assignment,. The teachers was giving you more work to do.
>>
>>52908106
how did you code meme?
>>
>>52908106
you have to put a condition at the start like
function foo(param) {
var a ;
if (param < 0)
return param;
else
a = a + foo(param-1);
>>
>>52908144

He specifically told me I had stolen the code and asked that I start a new project.
>>
>>52908106
>>52908135
Mind added things you didnt from glancing at it. No. Do a return on foo(param) then you are fine.
>>
>>52908155
how do you meme code?
>>
>>52908160
I hope you defend yourself.
>>
>>52908135
That is not definition of recursion. A function can return nothing at all and still solve something recursively.
>>
>>52908174
what?
>>
>>52908187
I know. See >>52908165. Just glancing over the structure looked fine. Didnt realize he didnt return the result of the function. Thanks mate.
>>
>>52908177
of course not, he is a coward. he can't defend himself but comes 4chan to bitch about it.
>>
>>52908177

I did which is why I was allowed to submit it after doing the extra work to prove I actually knew how to code
>>
>>52908125
are you indian?
>>
>>52908207
>he can't defend himself but comes 4chan to bitch about it.

He probably DID steal the code, too.
>>
>>52908202
how do you made code memes?
>>
>>52908228
still cant understand
>>
>>52908219
XD so you did it and slap that bitch teacher metaphorically?
>>
>>52908289
i slapped her and got expelled
>>
File: Untitled.gif (3KB, 220x98px) Image search: [Google]
Untitled.gif
3KB, 220x98px
>>52908270
this code meme.. but not a photo you upload?
>>
>>52908206
What if I did it like so:
function foo(param) {
// code that modifies value of param
if (something) {
foo(param); // call self with argument passed to param at start
else {
return param;
}
}
>>
>>52908318
type code within square brackets [] and then /code within square brackets

everything between each set of brackets is code
>>
any prolog fags here? what text editor do you use for it on *nix?
>>
>>52908320
        function foo(param) {
// code that modifies value of param
if (something) {
foo(param); // call self with argument passed to param at start
else {
return param;
}
}

fixed the indentation for you
>>
http://orph.link/

How does this site work? Explain like I'm a 5 year old with minimal programming experience, please.
>>
>>52908355
its a startpage with links. just that
>>
>>52908355
4chan has an api to fetch posts/threads. he is probably using that to locate those threads
>>
>>52908389
And yes, I could simply make a console app with a while(1) loop to simulate a service waiting for device events. But that is not the way it should be.
>>
>>52908389
>using windows
lmao @ur life
>>
>>52908320
Sill missing the point mate. You want the result of "foo" to be on the stack. You can only do this by returning the result of the call all the way back up the stack.

function foo(param)
{
if (something) return foo(param);
return param;
}
>>
>>52908391
Is there a documentation on how that works? I'm interested in making a page like that for some other generals.
>>
>>52908435
check the first result on google when you search "4chan api"
>>
>>52908391
are you retarded ?

that is just links to the threads

if a i put http:// boards.4chan.org/ g /catalog#s=dpt i'm searching for the dpt thread.

it has nothing to do with an API
>>
>>52908389
>TO CHANGE THE FUCKING MOUSE SENSITIVITY FROM A FUCKING SERVICE
Why in the fuck are you trying to change the mouse sensitivity from a service? That sounds like a major troll move.
Let the users control their own mouse sensitivity.
>>
>>52908481
is that a 4chan link that takes you directly to /dpt/?
>>
>>52908481
sperg
>>
>>52908524
yes

 >>>/g/dpt 
>>
>>52908423
>function foo(param)
>{
>if (something) return foo(param);
>return param;
>}

what is this code senpai
>>
File: shit.png (13KB, 1086x98px) Image search: [Google]
shit.png
13KB, 1086x98px
>>52908542
it fucked up

see pic
>>
>>52908542
this gives me catalog, because of 4chanx?
>>
>>52908464
I see, so I see how you would get the list of threads from http(s)://a.4cdn.org/vg/threads.json
but how can you tell which thread is a certain general?
>>
>>52908584
look for the general's name in the subject field
>>
>>52908567
see >>52908564

it has nothing to do with 4chanx. you're simply searching for the word "dpt" in the filter (top right)
>>
>>52908567
that's all it does, it opens the catalog with the specified search term
>>
File: bba6889a77d8f5931498ba31e1163851.png (189KB, 1920x955px) Image search: [Google]
bba6889a77d8f5931498ba31e1163851.png
189KB, 1920x955px
>>52908542
that only sends you to pic related

I'd like to go directly into the thread
>>
I just finished an assignment for one of my classes. But I have no idea if I did it how the professor wanted. I am not sure if I am getting the right output. This is frustrating.
>>
>>52908636
thanks for the blog update
>>
>>52908619
are you? you cant write a program to go from that page to the thread?
>>
>>52908650
speak english
>>
>>52908636
have you tried asking the professor?
>>
>>52908641
>>52902171
>what are you working on, /g/?
well, I put screenshots to my github projects. there are a cuple ones that I need to run a server, will probably make a digital ocean account to run my servers.
>>
>>52908650
that's exactly what I'm asking, how can I do that?
>>
>>52908667
Sent an email. But I've been told he doesn't respond to email. The assignment was to just validate bezouts theorem.
>>
>>52908661
thats english
>>
>>52908650
what if you have more than one thread? which one opens up?
>>
>>52908668
A service for Windows to handle sensitivity profiles for pointers and apply them automatically on device connection/disconnection. But WinAPI makes that hard for services. And some Indian Microsoft shill reported my post getting me a ban of 15 minutes.
>>
File: 1446602729925.png (462KB, 508x509px) Image search: [Google]
1446602729925.png
462KB, 508x509px
>>52902171
Hey dfpt can you recommend me what should i learn?
I have two weeks till semester starts and i want something easy but fun to learn. Something i can create cool stuff with
Is visual basic good idea?
>>
>>52908715
Maybe he judges which thread to go to based on posts per minute
>>
>>52908807
learn curses, make an ascii game
>>
>>52908715
how do you decide which /dpt/ to open up?
>>52908807
define "cool stuff"
>>
File: 1437663010095.jpg (93KB, 679x453px) Image search: [Google]
1437663010095.jpg
93KB, 679x453px
why is there no modifier in java to make a field read-only for everything outside the class?

let me explain:
obviously you can do it with getters, however, it's just ugly. even uglier if you need to use getters for static field.
Let's say you have a class that maintains one static field (like a vector with the mouse coordinates) and 5 classes that need sad value from time to time.. now, if you use a getter to return the value you have an ugly function that does literally nothing and even more ugliness in the classes utilizing said value. call me autists, but this really bothers me.
>>
File: 1453556850824.jpg (23KB, 535x425px) Image search: [Google]
1453556850824.jpg
23KB, 535x425px
>>52908864
>Programming OOP
>Wants his variables visible from outside the class
>>
>>52908864
because that is job of getters.
>>
>>52908864
Gonna need a code example of why you think getters are so ugly
>>
>>52902255
kill yourself
>>
>>52908911
getters for static fields is pure cancer

>>52908897
that's why only first semester kids use oop. everyone else moved to a data focused approach

>>52908921
class Foo{
private final static Vector test;

public Vector getTest(){
return test;
}

class otherCLass{
public void update(){
//with getter
doStuff(Foo.getTest());
//better
doStuff(Foo.test);
}


clear and now fucking mess of brackets. and it's clear that you get the untampered value. you don't necessarily know what's happening in the getter.
>>
>>52902726
underrated toast
>>
>>52908991
non const static fields are cancer. you are probably a shitty programmer that can't organize his classes.
>>
>>52908864
It's by design, so you can just change stuff in the getter/setter later if you need to without having to change things in other classes.
>>
>>52909030
I know. but I still think it is needed. it would be on the same level as final.

>>52909028
-t. someone who never wrote more than 100 locs
>>
>>52909052
It's not needed until you need it. And then you wish you had it.
>>
>>52908864

Use C# and then you can do this with properties.

God bless,
GTP.
>>
You can now install it from the AUR.

The package is vaccine-git
>>
>>52908991
You don't need to know what's happening in the getter? The fuck? Are you telling me you write getters longer than one line (return Val)?
>>
>>52909305
sometimes. like on-demand conversions or scaling.
>>
How would I go about writing a program to brute force open a .rar file locked with a password in C++?
>>
>>52909352
just try running john the ripper on it first
>>
>>52909352
don't, use cRARk or rarcrack
nothing you shit out will be better than those, especially taking into account GPU acceleration
>>
>>52909343
That's not a getter

I'm actually laughing
>>
>>52909392
autism is strong in you.
>>
are accessors considered harmful
>>
>>52909415
Just to close the case on this. A getter is literally only used to return a private value untouched. You are not writing getters.

This has been OOP 101, thanks for attending.
>>
>>52908864
if youre doing this you probably want a getter and a setter so you can define them as synchronous so you get thready saftey.
>>52909430
yes. an object should expose interface possible. getters and setters should often be left out.
>>52909457
now we're just being pedantic
>>
>>52909457
every function with a "get" in the name and return a value of private member is a getter, duh. And look: it doesnt say it must be unaltered.
but doesnt surprise me that some raging autist appears to discuss semantics he learned in first two weeks of college.
>>
>>52909516
That is literally the definition of a getter. No pedantry involved.

You should be using a proper getter then converting elsewhere.
>>
>>52909457
not necessarily. getters/setters can do more than that. getter can do a null check and initialize a variable for example. or setter can back up the value in database.

I don't blame you though. that is probably what your collage teacher taught you.
>>
>>52909532
Yes. The return of a private value. Notice that it says return and not modify themn return.
>>
>>52909563
Never will a getter ever need to do those. The checks should be done from where the getter is called.
>>
>>52909563
>collage

uh-oh
>>
>>52909563
>collage

Lol
>>
>>52909570
no. that's what you infer from the word "return".

>>52909587
didn't you just defend encapsulation 101? do you even see what kind of mess this approach would create?
>>
>>52909621
I'm not sure a null check when calling a getter is messier than whatever bullshit return value you get when your "getter" detects null.
>>
>>52909648
It is just an example. In that way you ensure that an object is not initialized unless you use it. Can be useful.

At our job, one the classes has getters that recalculates the value when they are dirty. Instead of recalculating them everytime we change something, it simply does they when they are actually being accessed. Way more efficient this way.
>>
>>52909648
let's do a thought experiment with your method:

class Foo{
private Object dildo;

public Object getDildo(){
return dildo;
}

public void initializeDildo(){
this.dildo = new Dildo();
}

}


now another class:

class YourAss{

public void insert(){
Dildo dildo = Foo.getDildo();
if(dildo ==null){
Foo.initialize();
dildo = Foo.getDildo();
}
doStuff(dildo);
}
}


now imagine you have 20 different classes accessing that field and you have no way to tell what class will be the first one. you will have to add this code every single class and create a huge blobb of decentralized bloat. and that's just for one getter.
>>
>>52909746
>>52909741
So fucking easy to bait people on here
>>
File: 1326018808399.png (87KB, 755x1255px) Image search: [Google]
1326018808399.png
87KB, 755x1255px
>>52909758
all time classic
>>
>>52909758
oh so you are only pretending to be retarded. my bad.
>>
guy trying to make a site that links directly into threads again

what is wrong with this, exactly?
>>
>>52909807
>what is wrong with this, exactly?
it belongs to /wdg/
>>
>>52909807
>what is wrong with this, exactly?
php
>>
New thread when?
>>
>>52909181
If you just installed it, update it. I just merged a bunch of work into master
>>
>>52909807
json_decode is not returning a value that foreach can use
use var_dump on json_output to inspect it's run time type.
>>
New thread
>>52909920
>>52909920
>>52909920
>>52909920
>>
Hello /g/. I'm a newfag trying to teach myself programming. I'm working in Python. I'm having a confusing problem and I was wondering if you guys could offer some assistance.

I'm writing a wrapper around the API for this chat client me and my friends use. My goal is to create some function that lets you choose who to post as and whose icon to use for posting, then you enter your message and it posts all that to the appropriate channel. It's sily, but it'll be fun when it works. I have this figured out in a basic form (IE the user can't choose, I just put all the information in ahead of time) but the issue is having it change everything dynamically based on user choice. You can query for a dump of information on all of the users, but users each have individual IDs aside from their usernames (IE "userid = 5e34tgr34, then a line later, username = anon") and the API commands function via userID, not username. I need to find a way to associate the names with the IDs so that the user can put in "anon" and the program will know I'm addressing "5e34tgr34".

I don't want to just go through the list manually and create a library by hand, because I'm not sure if the userids change (though they probably don't), and because that feels like a copout. What do you guys think is the most graceful way to approach this? I've never really parsed an information dump like this before so I'm a bit confused.

So far my best idea is to have a super long loop that goes through the entire info dump and finds and matches every instance of "userID" with "username", then puts all this information in a library which the rest of the wrapper references back to. Is that too cumbersome?
>>
>>52909999
that's fine
>I'm not sure if the userids change
if they do, the api is shit
>>
>>52902853
Indeed you are correct, the objects which are referenced by the pointers in the array are no longer in the for loop scope and are "freed". However since they are on stack, being freed doesn't mean being cleaned, it simply means that now any other variable that needs that memory address is free to use it, since you have no other assignments operations those particular addresses in your pointer array have probably not been used yet, but if you make a couple of call to functions and assignments between the first and the second loop chances are that those pointers will be pointing to garbage.
>>
>>52902171
Bullshit communist calisthenics
>op's pic related
>>
>>52907714
that thinkpad. Also OOP is used in lots of places you probably already use it and you just choose not to acknowledge it.
Thread posts: 325
Thread images: 30


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