[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
/dpt/ - Daily Programming Thread
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 255
Thread images: 32
File: 1460203639407.jpg (45 KB, 500x225) Image search: [Google]
1460203639407.jpg
45 KB, 500x225
Old thread:>>53972678
What are you working on /g/?
>>
>>53982596
Kerneling the haskell linux in programming
>>
>>53982596
What the fuck are you doing, retard?

Current is at 210 posts.

Sage.
>>
summer already
>>
>>53982596
>not zipWith'ing infinite lists
>>
Can any of you post the shitty CS graduate meme?
>>
File: Untitled.png (17 KB, 922x720) Image search: [Google]
Untitled.png
17 KB, 922x720
>>53985545
>>
>>53985572
post moar pls
>>
>>53985572
Best version
>>
File: 1423227248254.png (115 KB, 850x800) Image search: [Google]
1423227248254.png
115 KB, 850x800
>>53985577
>>
File: untitled.png (20 KB, 922x720) Image search: [Google]
untitled.png
20 KB, 922x720
>>53985577
>>
I've commited code changes to a remote git repo from one machine, while another machine has some local uncommited changes.

How do I pull in the commited changes and keep the uncommited ones? (except for creating a diff file and applying it after pulling)
>>
>>53985855
Figured it out: stash, pull, stash pop. Not the most ideal solution, but it worked.
>>
Here's a nice blog senpai

I've ordered two books about C and C++ and back in school we were taught very basics of programming. But I don't really know what I'm doing yet. Also, 5 years ago or so when I was a kid, I programmed some OpenGL renderer without knowing what I was doing, but it seemed fairly simple so I think I can do it if I try

I want to do graphics related programming (3D), do you have any tips on getting started at a nice pace? I'm planning on programming a simple game ''engine'' for iOS so from what I understand, I should achieve it with Swift and Metal or am I retarded? It's true that I don't even understand how this really works
>>
>>53985632
but that's valid...
>>
>>53986018
C++ and opengl would be more versatile (less platform-specific) than swift and metal, and swift isn't very fast or good from what i've heard about it, and you can transpile from glsl to metal

https://github.com/aras-p/glsl-optimizer
>>
>>53986041
All of them are valid, but none of them are good:
if x: 
return True
>>
>>53986057
return x

you idiot
>>
Why isn't my code working?


int arr[) = new int[100]

for(int z = 0; g <= arr.length-5;i++)
{
arr[z] = z;
}

int moo = 0;
while(true)
{
System.out.println(arr[moo]);
moo- -;

if(moo == 1)
{
destroy(moo);
}
}

}

>>
>>53986041
return !!x

oh but that's not the language you autists like
>>
>>53986077
Doesn't really matter, but
return True
looks cleaner.
>>
>>53986084
>[)
>>
>>53986084
>int arr[)
>>
>>53986103
nope, it's retarded from the point of view of an experienced developer
>>
>>53986084
Why aren't you using an IDE with warnings and errors?
>>
>>53986077
>>53986093
>what is an early return
FUCKING RETARDS
>>
>>53986122
>if(x) return x;
is fucking retarded stupid shitkid, it should be return true
>>
>>53986122
Why? I mean, if that code is the whole thing, then sure, use
return x
just to save a few bytes.
But if you add some more code, then returning a bool instead of a variable is easier to figure out at a glance.
>>
>>53986018
you will give up once you realize how difficult it is to make an engine and how much work it requires to make a fully functioning good one
>>
>>53985981
iirc, that is actually the ideal solution. It's why stash was made.
>>
>>53986093
>>53986103

You're a fucking retard, the code implies he doesn't want to return from the function if x isn't true.
Kill yourself, pajeet.
>>
>>53986192
epic meme faglord your unity game is complete trash and will always be trash just give up altogether
>>
>>53986130
Because /g/ convinced him that using anything more than stock vim was bloat.
>>
>>53985938
here is nonstandard asm from go
package main

func main() {
var i int
var ndigit [10]int
for i = 0; i < 10; i++ {
ndigit[i] = 0
}
}


go tool compile -S zxc.go > zxc.s

"".main t=1 size=112 value=0 args=0x0 locals=0x50
0x0000 00000 (zxc.go:4) TEXT "".main(SB), $80-0
0x0000 00000 (zxc.go:4) MOVQ TLS, CX
0x0009 00009 (zxc.go:4) MOVQ (CX)(TLS*2), CX
0x0010 00016 (zxc.go:4) CMPQ SP, 16(CX)
0x0014 00020 (zxc.go:4) JLS 92
0x0016 00022 (zxc.go:4) SUBQ $80, SP
0x001a 00026 (zxc.go:4) FUNCDATA $0, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
0x001a 00026 (zxc.go:4) FUNCDATA $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
0x001a 00026 (zxc.go:6) LEAQ "".ndigit(SP), DI
0x001e 00030 (zxc.go:6) XORPS X0, X0
0x0021 00033 (zxc.go:6) ADDQ $-48, DI
0x0025 00037 (zxc.go:6) DUFFZERO $277
0x002a 00042 (zxc.go:7) MOVQ $0, AX
0x002c 00044 (zxc.go:7) CMPQ AX, $10
0x0030 00048 (zxc.go:7) JGE $0, 80
0x0032 00050 (zxc.go:8) LEAQ "".ndigit(SP), BX
0x0036 00054 (zxc.go:8) CMPQ AX, $10
0x003a 00058 (zxc.go:8) JCC $1, 85
0x003c 00060 (zxc.go:8) LEAQ (BX)(AX*8), BX
0x0040 00064 (zxc.go:8) MOVQ $0, (BX)
0x0047 00071 (zxc.go:7) INCQ AX
0x004a 00074 (zxc.go:7) NOP
0x004a 00074 (zxc.go:7) CMPQ AX, $10
0x004e 00078 (zxc.go:7) JLT $0, 50
0x0050 00080 (zxc.go:10) ADDQ $80, SP
0x0054 00084 (zxc.go:10) RET
0x0055 00085 (zxc.go:8) PCDATA $0, $0
0x0055 00085 (zxc.go:8) CALL runtime.panicindex(SB)
0x005a 00090 (zxc.go:8) UNDEF
0x005c 00092 (zxc.go:8) NOP
0x005c 00092 (zxc.go:4) CALL runtime.morestack_noctxt(SB)
0x0061 00097 (zxc.go:4) JMP 0

1/x
>>
>>53986235
He's right, though.

Making a basic engine is pretty hard.

Making an advanced engine that does what you want it to is suffering. You need some sort of autism and tons of free time to accomplish this.
>>
>>53986235
It's true making an engine is something only a professional experienced programmer with many years of experience can make not a guy just getting two books on it you pleb
>>
>>53986246
0x0000 65 48 8b 0c 25 28 00 00 00 48 8b 89 00 00 00 00  eH..%(...H......
0x0010 48 3b 61 10 76 46 48 83 ec 50 48 8d 3c 24 0f 57 H;a.vFH..PH.<$.W
0x0020 c0 48 83 c7 d0 e8 00 00 00 00 31 c0 48 83 f8 0a .H........1.H...
0x0030 7d 1e 48 8d 1c 24 48 83 f8 0a 73 19 48 8d 1c c3 }.H..$H...s.H...
0x0040 48 c7 03 00 00 00 00 48 ff c0 48 83 f8 0a 7c e2 H......H..H...|.
0x0050 48 83 c4 50 c3 e8 00 00 00 00 0f 0b e8 00 00 00 H..P............
0x0060 00 eb 9d cc cc cc cc cc cc cc cc cc cc cc cc cc ................
rel 12+4 t=14 +0
rel 38+4 t=6 runtime.duffzero+277
rel 86+4 t=6 runtime.panicindex+0
rel 93+4 t=6 runtime.morestack_noctxt+0
"".init t=1 size=80 value=0 args=0x0 locals=0x0
0x0000 00000 (zxc.go:10) TEXT "".init(SB), $0-0
0x0000 00000 (zxc.go:10) MOVQ TLS, CX
0x0009 00009 (zxc.go:10) MOVQ (CX)(TLS*2), CX
0x0010 00016 (zxc.go:10) CMPQ SP, 16(CX)
0x0014 00020 (zxc.go:10) JLS 69
0x0016 00022 (zxc.go:10) NOP
0x0016 00022 (zxc.go:10) NOP
0x0016 00022 (zxc.go:10) FUNCDATA $0, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
0x0016 00022 (zxc.go:10) FUNCDATA $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
0x0016 00022 (zxc.go:10) MOVBQZX "".initdone·(SB), BX
0x001d 00029 (zxc.go:10) CMPB BL, $0
0x0020 00032 (zxc.go:10) JEQ 54
0x0022 00034 (zxc.go:10) MOVBQZX "".initdone·(SB), BX
0x0029 00041 (zxc.go:10) CMPB BL, $2
0x002c 00044 (zxc.go:10) JNE 47
0x002e 00046 (zxc.go:10) RET
0x002f 00047 (zxc.go:10) PCDATA $0, $0
0x002f 00047 (zxc.go:10) CALL runtime.throwinit(SB)
0x0034 00052 (zxc.go:10) UNDEF
0x0036 00054 (zxc.go:10) MOVB $1, "".initdone·(SB)
0x003d 00061 (zxc.go:10) MOVB $2, "".initdone·(SB)
0x0044 00068 (zxc.go:10) RET
0x0045 00069 (zxc.go:10) NOP
0x0045 00069 (zxc.go:10) CALL runtime.morestack_noctxt(SB)
0x004a 00074 (zxc.go:10) JMP 0

2/x
>>
>>53986246
>>53986271

Go fuck yourself, use pastebin.
>>
>>53986192
I hope not, at least I know that I can figure out how to get 3D graphics on the screen, as I did it when I was a kid

>>53986055
For some reason I was under the impression that Apple didn't allow C++ on iOS
>>
File: 1417382266679.jpg (32 KB, 480x454) Image search: [Google]
1417382266679.jpg
32 KB, 480x454
>lay down a bunch of new code
>it compiles the first time with no errors
>>
>>53986266
>>53986260
it's only hard if you're retarded and especially for learning it's what he should be doing. he already made an opengl renderer when he was a kid anyway fucking retards
>>
>>53986271
    0x0000 65 48 8b 0c 25 28 00 00 00 48 8b 89 00 00 00 00  eH..%(...H......
0x0010 48 3b 61 10 76 2f 0f b6 1d 00 00 00 00 80 fb 00 H;a.v/..........
0x0020 74 14 0f b6 1d 00 00 00 00 80 fb 02 75 01 c3 e8 t...........u...
0x0030 00 00 00 00 0f 0b c6 05 00 00 00 00 01 c6 05 00 ................
0x0040 00 00 00 02 c3 e8 00 00 00 00 eb b4 cc cc cc cc ................
rel 12+4 t=14 +0
rel 25+4 t=13 "".initdone·+0
rel 37+4 t=13 "".initdone·+0
rel 48+4 t=6 runtime.throwinit+0
rel 56+4 t=13 "".initdone·+-1
rel 63+4 t=13 "".initdone·+-1
rel 70+4 t=6 runtime.morestack_noctxt+0
gclocals·33cdeccccebe80329f1fdbee7f5874cb t=8 dupok size=8 value=0
0x0000 01 00 00 00 00 00 00 00 ........
gclocals·33cdeccccebe80329f1fdbee7f5874cb t=8 dupok size=8 value=0
0x0000 01 00 00 00 00 00 00 00 ........
gclocals·33cdeccccebe80329f1fdbee7f5874cb t=8 dupok size=8 value=0
0x0000 01 00 00 00 00 00 00 00 ........
gclocals·33cdeccccebe80329f1fdbee7f5874cb t=8 dupok size=8 value=0
0x0000 01 00 00 00 00 00 00 00 ........
"".initdone· t=31 size=1 value=0
"".main·f t=8 dupok size=8 value=0
0x0000 00 00 00 00 00 00 00 00 ........
rel 0+8 t=1 "".main+0
"".init·f t=8 dupok size=8 value=0
0x0000 00 00 00 00 00 00 00 00 ........
rel 0+8 t=1 "".init+0
runtime.gcbits.01 t=8 dupok size=1 value=0
0x0000 01 .
go.string.hdr."[]int" t=8 dupok size=16 value=0
0x0000 00 00 00 00 00 00 00 00 05 00 00 00 00 00 00 00 ................
rel 0+8 t=1 go.string."[]int"+0
go.string."[]int" t=8 dupok size=8 value=0
0x0000 5b 5d 69 6e 74 00 []int.
type.[]int t=8 dupok size=72 value=0
0x0000 18 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00 ................
0x0010 8e 66 f9 1b 00 08 08 17 00 00 00 00 00 00 00 00 .f..............

3/x
>>
>>53986279
http://stackoverflow.com/a/8759684
>>
>>53986281
ok
>>
>>53986284
0x0020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0x0030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0040 00 00 00 00 00 00 00 00 ........
rel 24+8 t=1 runtime.algarray+272
rel 32+8 t=1 runtime.gcbits.01+0
rel 40+8 t=1 go.string.hdr."[]int"+0
rel 56+8 t=1 go.weak.type.*[]int+0
rel 64+8 t=1 type.int+0
go.typelink.[]int []int t=8 dupok size=8 value=0
0x0000 00 00 00 00 00 00 00 00 ........
rel 0+8 t=1 type.[]int+0
type..hashfunc80 t=8 dupok size=16 value=0
0x0000 00 00 00 00 00 00 00 00 50 00 00 00 00 00 00 00 ........P.......
rel 0+8 t=1 runtime.memhash_varlen+0
type..eqfunc80 t=8 dupok size=16 value=0
0x0000 00 00 00 00 00 00 00 00 50 00 00 00 00 00 00 00 ........P.......
rel 0+8 t=1 runtime.memequal_varlen+0
type..alg80 t=8 dupok size=16 value=0
0x0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
rel 0+8 t=1 type..hashfunc80+0
rel 8+8 t=1 type..eqfunc80+0
runtime.gcbits. t=8 dupok size=0 value=0
go.string.hdr."[10]int" t=8 dupok size=16 value=0
0x0000 00 00 00 00 00 00 00 00 07 00 00 00 00 00 00 00 ................
rel 0+8 t=1 go.string."[10]int"+0
go.string."[10]int" t=8 dupok size=8 value=0
0x0000 5b 31 30 5d 69 6e 74 00 [10]int.

4/5
>>
>>53986235
He's right though. 3D graphics programming is a pain in the ass all on it's own, and programming an engine can be complicated as hell. Then doing it all for a mobile phone with limited resources? WHILE learning a new language and framework for graphics? Come on, man. It's a recipe for disaster or severe burnout. One step at a time. If he actually did want to just program a game for mobile, he probably should just use something like unity.
>>
>>53986301
type.[10]int t=8 dupok size=88 value=0
0x0000 50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 P...............
0x0010 02 48 96 2f 00 08 08 91 00 00 00 00 00 00 00 00 .H./............
0x0020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0050 0a 00 00 00 00 00 00 00 ........
rel 24+8 t=1 type..alg80+0
rel 32+8 t=1 runtime.gcbits.+0
rel 40+8 t=1 go.string.hdr."[10]int"+0
rel 56+8 t=1 go.weak.type.*[10]int+0
rel 64+8 t=1 type.int+0
rel 72+8 t=1 type.[]int+0
go.typelink.[10]int [10]int t=8 dupok size=8 value=0
0x0000 00 00 00 00 00 00 00 00 ........
rel 0+8 t=1 type.[10]int+0

5/5
>>
>>53986303
it's not for everyone

jewnity is not for everyone either

fuck off to >>>/vg/agdg shitkid
>>
>>53986281
That is not the same as making your own engine be realistic

>>53986279
You should be realistic and take one steps at a time. The first thing you should do is actually learn C++ through a beginners book
>>
>>53986316
agdg knows about engines since practically every dev is an engine dev there
>>
>>53986335
no they aren't they're engine users
>>
>>53986316
Yeah sure dude, good luck on your engine, I hope it's going well.
>>
>>53986362
lmao no
>>
>>53986281
Rendering spinning cubes =/= writing an entire rendering engine alone from the ground up while learning a new language
>>
>>53986381
>>53986368
>>53986367
kill yourselves fucking retards
>>
>>53986395
See:
>>53986367
>>
>>53986408
hope you're enjoying your low ambitions and being a shitty underperforming wage cuck
>>
>>53986332
yeah that's why I ordered a book about C++

>>53986292
thanks senpai

>>53986381
yeah that's pretty much what I accomplished, well you could move the camera around the cube (or whatever object) but I didn't really know what I was doing
>>
unity is fucking horrible and won't teach you anything about programming and you won't even make any non-shit game with it

it's the python of game engines
>>
Can anyone recommend a programming bible like "ANSI C Language by Dennis Ritchie" or that Java book with a mayan cover, but for C++?

I want to find a good book to learn C++ from that /dpt/ recommends. I tried 'Learn C++ in easy steps' but I didn't like it.
>>
>>53986521
import gameengine
>>
>>53986574
*tips fedora*

>>53986521
Where do you stand on UE4?
>>
>>53986574
using UnityEngine;


same shit
>>
>>53986280
This happens to anyone who has experience in programming
>>
>>53986592
at least it can feasibly be used to produce a presentable game but smug indie """"""""devs"""""""" tend to overdo the visual effects way too fucking much
>>
>>53986565
Effective Modern C++ by meyers
The C++ Programming Language (4th Edition) by Stroustrup

this one is good for beginners
Programming -- Principles and Practice Using C++ bt Stroustrup
>>
>>53986623
how is that different from smug AAA devs overdoing the visual effects way too fucking much, ala Dice?
>>
>>53986642
that's horrible too but like if you look at some 12 year old wannabe JJ abrams UE4 "dev"'s demo it's even worse
>>
>>53986640
I never understood the difference between regular programming books and books for """"beginners"""". If I understand the fundamentals of programming and a little bit of C++ already, then would the beginner's book be too..easy?
>>
>>53986659
also known as panzer gaming studios
>>
Rate my first perl script /g/

use strict;
use warnings;

my @series;
my $html = `curl -s http://dizimag.co/`;
while ($html =~ /alt="(.*) (.*)\. Sezon (.*)\. Bölüm" class="avatar" width=40\>/g) {
push(@series, $1." Season ".$2." Episode ".$3);
}

my @favorites = ("arrow", "flash", "legends of tommorrow", "grimm", "limitless", "izombie", "magicians");

foreach my $episode (@series) {
print "\033[0m"; # white
foreach my $fav (@favorites) {
if ($episode =~ /$fav/i) {
print "\033[93m"; # yellow
print "---> ";
last;
}
}
print $episode, "\n";
}
>>
>>53986640
http://www.amazon.co.uk/dp/1491903996
And
http://www.amazon.co.uk/dp/0321563840
?

The 4th edition book by Bjarne is Stroustrup is pretty expensive. Is it always this much?
>>
>>53986668
beginner books hold your hand and act like you never programmed before, classroom books
>>
Here's a question I've been wondering for a few days, how well can modern iPads handle 2D fluid simulations in real time in a 2D game environment? How many particles do you think would be feasible, the A9X seems to surpass PS3/360/WiiU
>>
>>53986683
What is this supposed to do?
>>
>>53986707
they're pretty powerful
>>
>>53986084
Check your variables.
I dont even know what are you trying to do..
>>
>>53986693
no idea desu
just pirate the pdf for both then decide
>>
>>53986713
It scrapes latest episodes from a website and highlights the ones I follow.
>>
>>53986722
yeah but I don't really know anything about fluid simulations, from a what I've seen sacrificing accuracy allows for very fast simulations but mobile, I have no idea
>>
>>53986778
doing it on the gpu first and foremost

maybe this: http://http.developer.nvidia.com/GPUGems/gpugems_ch38.html

anything that you could do on older desktop hardware you can do on recent mobile hardware
>>
>>53986835
that's a neat little guide, thanks!

Now I know what I'm working on
>>
>>53982596

got sauce on that quote?
>>
>>53986970
bill gates you retard
>>
>>53986987

confirmation that he said it mouthbreather
>>
>>53986970
billy g himself said that
>>
>>53985572

What's wrong with that?
>>
Going to try my hand at some very basic C socket programming. Any good projects out there to learn from
>>
>>53986970
ur mom
>>
>>53986999
First day huh?
>The stories and information posted here are artistic works of fiction and falsehood. Only a fool would take anything posted here as fact.
At least you got anti-satan trips.
>>
>>53987028

I figured as much, everything I found linked back to this board.
>>
>>53987022
Just do a server listening on your computer to make shit up based on what arrives as input, imagination is the limit.
>>
>>53987022

Do the TCP forwarder for starters.

http://pld.cs.luc.edu/courses/443/fall14/forwarder/forwarder.html
>>
Does anyone have one of those images with tasks for the different digits you get? I'm looking to do something, but I can't really think anything up.

I'm studying C#. My knowledge of it is still somewhat fresh.
>>
File: 1459915435088.jpg (752 KB, 1920x1080) Image search: [Google]
1459915435088.jpg
752 KB, 1920x1080
>>53987331
>>
>>53987453
Thanks a lot, m8.

rollin' for something gentle
>>
File: programming_challenges.png (302 KB, 1920x1080) Image search: [Google]
programming_challenges.png
302 KB, 1920x1080
>>53987331
>>
>>53987466
Wew, updated
Thanks mate
>>
>>53987466
role ing
>>
>>53987331
>>53987453
>>53987466
http://better-dpt-roll.github.io/

Alternatively, write your own random number generator for the roll.

Threads get shat up with rollposts and no one actually responds to their post with their solution.
>>
How do I into design patterns and using SOLID principles in my code?
>>
File: browser #112.png (2 MB, 1680x1050) Image search: [Google]
browser #112.png
2 MB, 1680x1050
just added +/- and ctrl +/- ability to change thread preview. shoulda done this a long time ago. it's like a whole new botnet now.
>>
is accelerated c++ a good book or a meme just like the title?
been reading c++ primer but it goes 2deep4me
>>
>>53987584
Is the GUI some sort of early-2000's deviant art WinAmp skin irony?
>>
Can someone post the picture with two functions to the left something a guy made in c and on the right something a girl made with a fuck ton of unnecessary comments and code.
>>
>>53987584
When are we gonna get a download link?
>>
File: Untitled.png (1024 KB, 840x1010) Image search: [Google]
Untitled.png
1024 KB, 840x1010
>>53987625
you mean is it shitty on purpose? well I guess so. that's all I'm capable of.

>>53987643
any day now. there's been a flurry of recent changes though, so that has to die down first.
>>
File: 1459372013720.jpg (226 KB, 869x1776) Image search: [Google]
1459372013720.jpg
226 KB, 869x1776
>>53987637
>>
>>53987008
x++
>>
>>53987637
>>53987736
Hope you know this is fake.

Sadly girls do not program, and would not even bother commenting on something like code styles.

I very much doubt Karlie Kloss had enough interest in programming to post about something like this. Literally everything I've heard from her is "look at me, I'm a girl who's coding! Girl power!" with a photo of her doing something utterly retarded with sublime or some shit.
>>
>>53987787
++x
>>
File: 1459384379485.jpg (82 KB, 780x873) Image search: [Google]
1459384379485.jpg
82 KB, 780x873
>>53987736
GRRLZ CAN CODE
>>
>>53987820
>>53987736
I feel a lot better about myself now, thanks
>>
In RISC architectures, how in the fuck are you supposed to load a word sized constant into a register if you can't fucking fit it in the stupid fucking instruction?
>>
File: 1451980545430.png (406 KB, 556x313) Image search: [Google]
1451980545430.png
406 KB, 556x313
>Program isn't working on a Java test I had today
>On the way home, realize it's because I put a variable's increment for a loop's condition in the wrong place and it was never leaving the loop
>Having moved one bracket two lines above would have had the program working flawlessly
It is moments like these when I feel like putting a bullet through my head
>>
can someone tell me whats wrong with my code?
using namespace std;
>>
>>53987869
your mom has an std
>>
>>53987869
>People who actually use this to program in C++
It's disgusting.
>>
>>53987878
if the what you're doing is short who cares
>>
>>53987852
Can you fit it in two instructions?
>>
>>53987876
>an std
>an
>s
Fucking retard
>>
>>53987890
it's disgusting even if it's short, and what are you even doing that's short outside of small school assignments and fizzbuzz
>>
>>53987895
an ess tee dee

fucking idiot

http://www.googlefight.com/%22an+std%22-vs-%22a+std%22.php
>>
>>53987900
Jokes on you, I can't fizzbuzz fucking cuckand neither can you.
>>
>>53987895
'an' is the correct usage there. 'S' has a vowel sound when naming the letter.
>>
>>53987900
practicing for interviews with leetcode/hackerrank
and some book
>>
>>53987916
>Google
>Not DuckDuckGo
im done with you
>>
>>53987943
then definitely use std:: fucking retard its not like it's difficult to type or anything
>>
>>53987892
I don't think so, unless the specific arch allows me to access upper and lower halves of registers like x86 does, but most RISC archs I've used don't have that.
The only way I can think is declaring it statically in a data section and using a load word instruction. But that's hardly useful.
>>
>>53987973
Can you fit it in 3 instructions?
>>
>>53987955
std::yourmom << aids;
>>
>>53987960
why are you getting triggered by something like this you complete autist, doesn't matter in small programs as long as you don't get used to it
>>
>>53988000
you don't matter
>>
>>53987994
I don't see why I would, read my fucking post.
Just because I can fit it IN 2 or 3 instructions, doesn't mean I can get it into a REGISTER.
>>
>>53988017
>people are significant
laughing_feminists.jpg
>>
Are there any elegant, cross platform scripting languages?
>Lua is ugly
>Python is ugly
>C# isn't cross platform
>Java is bloated
>>
>>53987999
>not 'yourmom << std::aids'
you blew it
>>
>>53988039
C# is cross platform now with xamarin

kinda sorta
>>
>>53988054
><>scripting

>>53988039
>java
>scripting
i guess

Python is only ugly if you use the ugly parts desu
>>
>>53988053
damn
>>
Hey guys my network adapter is piece of shit and I hate having to reset it in device manager and would like some sort of shell script i can double click on desktop to reset it

Im on win7, i seriously doubt CMD is capable of this
>>
>>53988116
Fuck off.
>>>/wsr/
>>
>>53987916
>an standard
>>
File: 1455217692734.jpg (121 KB, 2032x820) Image search: [Google]
1455217692734.jpg
121 KB, 2032x820
>>53988154
>an ESS TEE DEE
>>
>>53988192
it's spelled std but everyone reads that as "standard"
>>
>>53988116
>>>/g/sqt
>>
>>53988206
>your mom has an std
for the namespace std you wouldn't even refer to it as a/an std, we're clearing talking about a sexually transmitted disease commonly said as S T D
>>
>>53987583
What do you mean? Just apply them when it's appropriate.
>>
>>53988039
Yes, Python.
>>
>>53988039
F#
>>
>>53988039
Scheme or Lisp
>>
>>53988039
Lua is awesome. Lisp as well.
>>
File: 1460066289682.jpg (130 KB, 650x650) Image search: [Google]
1460066289682.jpg
130 KB, 650x650
Where can I find example source code for different GTK+ widgets? The official documentation doesn't provide it.
>>
>>53988643
Don't. Give up. Use QT.
>>
>Want to tinker around with different instruction set architectures
>Only hardware implementations made in the current decade that I can feasibly get my hands on are ARM and x86 (32 bit and 64 bit for both are easy to get a hold of), and 32 bit MIPS (Imgtec likes to brag about the performance of their 64 bit "warrior" CPUs, but won't sell a fucking board with them, and no one will even make a phone or tablet with them)
>PowerPC SBCs exist, but you cannot actually buy them. The manufacturers want you to talk to their sales department so you can bulk order them or some shit. No convenient way to just add a unit to and shopping cart and pay for one without having someone question my motives.

IBM decided to make their architecture "open", and yet it's fairly closed to anyone who isn't a large corporation. Imgtec wants to be relevant, but they won't even put their best chips forward. What is this nonsense?
>>
>>53988643
Run gtk3-demo, it has source code in it IIRC.
>>
>>53988643
>The official documentation does not provide examples

I hope you got the message
>>
I'm not a programmer, how much do you guys have to think about the hardware, like hyper-threading and cores and shit? Does Windows/whatever deal with that?
>>
>>53988681
Get yourself a 6502 or a 65c816 and build yourself a little prototyping setup on a breadboard/strip board. First learnt 6502 assembly on the apple II and I still think it's a great architecture to learn. You can find the entire gate level schematics online.
>>
>>53988720
Kernel handles that for you, unless you do low level shit.
>>
>>53988681
To prevent people with spare microfabs laying around to make their own processors I guess, lol. I'm assuming you've played around with MARS, right?
>>
>>53988720
Depends on the program. If you need to squeeze a lot of performance out of the hardware, you need to think about that stuff a bit. Otherwise not much.
>>
>>53988720
it's all abstracted away, for performance you take the hardware into consideration (like how many threads you should run) but it's nothing crucial
>>
File: no.jpg (186 KB, 816x488) Image search: [Google]
no.jpg
186 KB, 816x488
>>53988643
>GTK
>not IUP
>>
>>53988683
Thanks.

>>53988662
No, because it doesn't have an entirely free/libre license.
>>
>>53988751

MARS?
>>
File: g7AlGaM.png (13 KB, 331x293) Image search: [Google]
g7AlGaM.png
13 KB, 331x293
>>53988039
>C# isn't cross platform
C# literally runs on every major modern operating system.
>>
>>53987466
roll
>>
>>53988720
>how much do you guys have to think about the hardware, like hyper-threading and cores and shit?
Pretty much never.

The main form of optimization you'll be doing in any modern, high-level language is just sanity things.

Simple example: rather than opening the same text file on each iteration of a loop, just open it before you go into the loop.

Basically doing expensive things a minimum amount of times.
>>
>>53988880
>not mentioning android and integrated stuff
>>
>>53988810
LGPL isn't enough for you?
>>
Right now I'm trying to find out how the fuck I can read my PC's temperature data with a program.
Second step will be sending that shit over a virtual COM (with a port number that may or may not change randomly whenever the device disconnects) port as serial data to my Arduino.
>>
>>53988230
Reported for having nothing to do with programming
>>
>>53987852
load %r, HIGH_BYTE<<HALF_WORD_BITS
or %r, LOW_BYTE

wew
>>
>>53989001
WEll I guess you would have to do the shift after the load. So
load high byte(s)
shift left half word bits
or low byte(s)
>>
>>53988749
>>53988761
>>53988766
>>53988925
is low level programming a meme then? or is it necessary in any significant case?
>>
>>53989032
It's because of low-level programming those abstractions exist you dumb twat.
>>
File: HqV1tEu.png (48 KB, 999x718) Image search: [Google]
HqV1tEu.png
48 KB, 999x718
>>53988926
Sorry, I guess I could have included more.

Cross platform mobile development is now available for everyone with the to-be-MIT-licensed Xamarin that is free as in free beer, as well as soon to be freedom.

Furthermore, Red Hat Enterprise Linux is now shipping with .NET as a first class development framework, and RHEL has joined the .NET Foundation, along with JetBrains and Unity.
>>
>>53989032
Well, somebody wrote the kernel and the microcode and all the firmware...
>>
Ok guys, we are going to make a simple hello world program in c++. Only rule is that you can only write one line, lets see if we can do this. Ill start:
#include <iostream>
>>
>>53989061
int main() { }
>>
File: abstract jew.jpg (1 KB, 106x125) Image search: [Google]
abstract jew.jpg
1 KB, 106x125
Any of you niggers ever work with file headers?

I'm making a program that detects the file type of something you give it. The problem is that a .docx file has the same header used in excel and powerpoint files. Any of you know a way around this?
>>
Can someone explain how to setup the linux command line on windows 10. The only reason I upgraded was to use it. I'm an insider but I can't find the option to turn it on.
>>
>>53989061
>>53989080
In between these, insert

/* TODO: Write program
>>
>>53989054
>>53989052
yeah but fuck those nerds I mean for the rest of programmers, that stuff's already done for them?
>>
>>53989080
You fucking failed, why would you close the main function
>>
>>53989106
I believe you have to go to Turn Windows Features On or Off, then enable the feature. Then, from cmd type bash to install and start it

That's what I've read anyway. When I tried upgrading my ThinkPad to the insider build, it hosed the whole thing, so I haven't done it myself.
>>
>>53989119
Sure. Everything is as abstracted from you as you want it. From as low as bare metal to as high as games with programming elements: pick your poison.
>>
>>53989146
I went to the windows features but the option to turn it on/off isn't there. Im an insider so it should be but I was wondering if someone could tell me why
>>
>>53987804
>y = ++x + 1
>>
>>53989119
Yes Mr. WebApper now fuck off
>>
>>53989138
Because she was satisfied with the current functionality.

Aren't you?
>>
I have to read different types using C, the data may come as int, tomorrow as float, etc.
The user input lets me know what's the type, i want to structure the code so that i don't have to write it for each kind of type in C, any suggestion?
>>
>>53989262
Just let C implicitly cast it to whatever and hope for the best.
>>
iirc I can pushnumber and setglobal for a variable in lua, right?

But, if I have a table:
n = { 
dt
}


What do I do in C to get that table, get the variable, and set it?
>>
>>53987453
may as well
>>
>>53988957
reported for saying you reported
>>
>>53989176
so there's an extreme difference in performance or something?
>>
>>53987453
fuck it
>>
i was having problems with iptables not accepting and completely ignoring rules that i made for it so i just left everything open. That didn't work so now i deleted iptables. There are other options, right? Every time i tried to save changes it just keeps saying that segmentiation core dumped or something. How does UFW work in relation? Are there other options?

(i'm aware that its entirely my fault and that i must have not been doing something right, please help me regardless)
>>
File: 1456066825464.jpg (70 KB, 392x230) Image search: [Google]
1456066825464.jpg
70 KB, 392x230
Writing a sierpinsky triangle in bash.
Shortest solution?
>>
>>53989374
If something as core as iptables segfaults on your machine then you're have bigger problems than whatever is not working out for you.
>>
>>53989352
web languages are only a couple of orders of magnitude slower than C/C++
>>
>>53989400
should reinstalling iptables work? i ran through this guide here: https://www.digitalocean.com/community/tutorials/how-to-implement-a-basic-firewall-template-with-iptables-on-ubuntu-14-04
>>
>>53989383
I did that on my ti-83 when I was 15. you aren't going to gain anything from it.
>>
>>53987878
>std::
>std::
>std::
>>
>>53989032
Low-level programming is the exact opposite of a meme
>>
File: 2832655391525869130.jpg (61 KB, 320x320) Image search: [Google]
2832655391525869130.jpg
61 KB, 320x320
>build a dropbox clone
>use spring boot on java as the api server, and a node.js-based single page application as the ui
>index file and folder details in elastic so searching creates virtually no load on the api
>for the same reason, create a websocket-based realtime notification server using akka actors and reactive streams
>implement shared-nothing architecture over rabbitmq so that neither the api server nor the websocket server has no fucking idea who or what the others are
>everything just worksâ„¢
>quit job, some guy replaces me
>the guy replaces elastic with good ol' database models so the searches are done using like queries
>the guy also moves all notification and websocket functionality back into the api server, leaving the other server obsolete
>mfw
>>
>>53989515
>I did that on my ti-83 when I was 15
good for you, I guess?
does that mean I can't do it for fun?
And that I can't ask anons for their simplest solution?
>>
>>53989584
You're not really doing it if you're asking other people for the solution
>>
>>53989262
depends on what you're using it for
you can always just keep it as a string
>>
>>53989262
A template?
>>
>>53989604
Wow, you sure must have a mental issue, right? Who says that?
I can implement it in C, but I'm still learning bash.
So leave me alone if you don't want to contribute
>>
>>53989659
You know he didn't fucking do it in his calculator so why are you entertaining him. He probably still is 15
>>
>>53989636
>template
he's using C
unless you want him to reimplement templates, then go for it
>>
>>53989575
does low level programming mean thinking about the hardware in detail?
>>
>>53989659
You're not learning if you're copying and pasting, don't get so defensive.
>>
>>53989604
is not me >>53989515 but I agree with him. The point is >>53989701 yes I did write it, I would click the button and go "herp, derp, i liek triangles." 9 years later I'm a NEET. moral is don't draw the triangles, not even once.
>>
>>53989802
I mean you have to know about whatever Architecture you're designing for, what the registers are, etc.
>>
Writing XML transforms for work, to augment (and I hope eventually replace) our current data preprocessing system.

Tired of maintaining the ancient VB nightmare my predecessor left behind.
>>
>>53989830
it can. Low level is relative. It generally just means close to the hardware. Less abstraction. JavaScript is very high level. Assembly is very low level.
>>
>>53989853
>XML
>for anything
>>
File: 1438719386525.jpg (151 KB, 750x500) Image search: [Google]
1438719386525.jpg
151 KB, 750x500
>>53989815
what do you think learning is then, anyway? It all comes down to copy and paste. But you're right, the important part is to understand what you did.
>>53989822
2late for me then I guess.. Neet lyfe here I come
>>
>>53989878
I'm using XML to store game data. What should I be using?
>>
>>53989887
WHAT that pic is fucking trippy
>>
>>53989915
A game is being written with VB?? The fuck?

JSON my man. JSON.
>>
>>53989878
I have to work with data stored as XML inside VARCHAR fields in relational DB.
>>
>>53989925
It's a very logical shell.
>>
>>53989878
Most enterprises use XML, hipster trash.
>>
>>53989943
I'm a different anon. I'm writing my game in C++.

My XML reading / writing portion of the engine is done but I may go back and redo it in JSON then. It certainly looks better.
>>
>>53989949
That's fair enough. And what are these "XML Transforms" being written in?

>>53989964
Enterprises are not famous for having fantastic development practices.
>>
What's the difference between a value and an object in programming? Not talking about OOP objects, but objects such as a struct, or maybe even integers.
>>
>>53989943
Nobody is writing games in VB as far as I know. I am>>53989853 above, and work in Healthcare.

what >>53989949 describes is a common scenario for me as well
>>
>>53989977
If it's done don't bother rewriting it. Unless you have a really good reason to.
>>
>>53989925
NEET shell
>>
Is codewars a good web for learning?
>>
>>53989980
XML transforms are written in XSLT.
Have you ever used XML?
>>
>>53989987
How about this:
value - an universal value separate from the execution or the code of the program
object - a specific instance of a value in the program source code or at runtime
>>
I'm trying to learn R.

I've never programmed before.

Good idea?
>>
>>53988851
http://courses.missouristate.edu/KenVollmar/MARS/
>>
>>53990051
You'll fit right in
>>
>>53990051
You'll fit in because the guys who make R couldn't program either.
>>
>>53990051
pick a more mainstream language at least to start with
>>
>>53990051
you'll be right at home
>>
>>53989915
Json is better in every way. Although it doesn't matter as much for games.
>>
help me come up with a definitive list of programming assignments for novices in increasing order of difficulty dpt
>>
>>53987838
Those images are fake.
>>
>tfw you're just an XML girl in a json world.
>>
>>53990254
you wish don't you, newman
>>
>>53990241
fizzbuzz
>>
>>53990241
Problem 1: Read two integers from stdin and return their sum to stdout.

Problem 2: Rewrite the GNU coreutils in Python.

Problem 3: Create a kernel and boot it in a VM.
>>
>>53990272
The commands on the left don't match what she wrote. Are people so insecure that they have to lie to put her down?
>>
>>53990270
>not using messagepack

Come the fuck on
>>
>>53990272
The code is above that, neckbeard.
>>
>>53990319
Yes they do, more or less. It is pretty sad.
>>
>>53990319
Yes they do, are you retarded?
Thread replies: 255
Thread images: 32

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

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.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.