[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: 27
trap thread as requested

https://www.youtube.com/watch?v=lbMeZUM0slg

previous: >>54713526
>>
big dick playa here, I'll teach you fags how to C
>>
>>54720625
>linking objectively shitty music

2nd for C#.
>>
>>54720641
tell us how to allocate a variable length 2d array on the heap in C
>>
>>54720667
>spoonfeed us
how about you give your opinion on how to do it and I shit all over it with my superior C knowledge? you know, bait style :^)
>>
>>54720667
She's going to show you an example, you're going to point out how it's objectively wrong, and she's going to spout 'big dick playa' ad infinitum.
>>
>when you found the solution to all software backdoors.
>>
>>54720667
int a[m][n]
>>
>>54720686
int (*a)[m][n] = malloc(sizeof(int[m][n]));
>>
File: OfZj2PC.webm (383 KB, 404x720) Image search: [Google]
OfZj2PC.webm
383 KB, 404x720
/dpt/-chan, dai suki~

Ask your much beloved programming literate anything (IAMA).

>>54720667
int (*foo)[x][y] = malloc(sizeof(*foo));

or
int *foo = malloc(sizeof(int[x][y]));


Note that there no such thing as heap or stack in the definition of C.
>>
>>54720808
>the second option
>no foo[i][j] syntax
>>
>>54720808
just use
int (*foo)[y] = malloc(sizeof (int[x][y]));

to have the familiar element access syntax of foo[i][j]
>>
>>54720808
Got anything to comment on >>54718973 ?
>>
>>54720667
>>54720808
2 dimensional arrays are a mistake. Don't use them and calculate the index yourself.
>>
>>54720927
>mistake
why?
>>
>>54720943
They're confusing. Don't use multidimensional array.
>>
>>54720927
You're a mistake.
>>
>>54720958
>They're confusing
maybe you just don't know C
>>
>>54720927
if you don't want any abstraction why don't you program in assembly

>>54720958
>They're confusing
fucking Ctards
>>
>>54720943
They are useless.
>>
>>54720986
>arrays are useless
you're an idiot
>>
>>54720625
How impossible is to bypass the HTML code of websites like ManyVids and MyGirlFund and get the videos for free?

Thank you kind frog
>>
>>54720998
Not what I said.
>>
>>54721007
>backpedaling
fuck off already, webshit
>>
>>54720998
>array
Enjoy your botnet.
>>
This thread is cancer.
>>
>>54720808
Why don't you learn C?
>>
>>54721017
Are you illiterate?
>>
>>54720898
>http://ideone.com/yjmrrx
no workee
>>
>>54721038
>I don't know C nor C++
too bad
>>
>>54721038
>undefined behavior
anon...
>>
>>54721055
it's supposed to output 1 2 3 you dingus, fix it if you know C/C++ so well, but you can't because >>54720898 is no workee
>>
>>54721070
>supposed
orly? how about you learn C, you shit?
http://ideone.com/O639wn
get bent, faggot!
>>
>>54721062
>http://ideone.com/uNeuqo
still no workee
>>
>>54721070
>it's supposed to output 1 2 3 you dingus
No.
It's supposed to output 1 3 then possibly crash because the last access is undefined.
>>
>>54721097
>still undefined behavior
>>
>>54721108
no shit sherlock, if it was a proper 2d array it would print 1 2 3 with well-defined behavior
>>
>>54721116
>if it was a proper 2d array it would print 1 2 3 with well-defined behavior
No.
>>
>>54721116
m8, you don't know C, stop talking already
here it is with the dumbed down "proper 2d array" for retards such as yourself >>54721092
>>
>>54721129
>>54721131
KILL YOURSELVES

with a 2x2 (not 4x2) array it's supposed to be 1 2 3


RETARDS
>>
>>54721131
that links back to his original code for me
>>
>>54721147
>with a 2x2 (not 4x2) array it's supposed to be 1 2 3
Not the way you are acessing it.
>>
Is this true? >>54718973
>>
>>54721147
>I'm a webcuck
>>
>>54721147
http://ideone.com/Pwcek7
who no workee, fagman?
>>
>>54721158
>>54721171
>>54721185
it's supposed to be contiguous you retards, you fail
>>
>>54721147
>supposed
You're supposed to know what you're talking about, tard.
>>
>>54720625
fuck off with that stupid frog already
>>
>>54720774 is the only sensible option. the other ones are not contiguous.
>>
>>54721198
why no workee tho? >>54721185
>>
>>54721198
It is contiguous, you just don't understand how pointer arithmetic works.
>>
>>54721216
>>54721220
http://ideone.com/z55kPJ

you're right, 2d arrays in C are a joke
>>
>>54721198
Say, retard, what do you believe "**(foo + 2)" means? Also, how do you think foo[2][0] could be rewritten?
>>
>>54720625
Followed the programming challenges thing and made an ascii circle generator sort of doodah in Java.
http://pastebin.com/hUpPC8Yi

Unrelated, I also tried to script kiddie a bit (as in, incompetent, not malicious but I might have pissed someone off whilst testing this) and tried my damnedest to make something that can download porn from e621 by the pageload.
Everything but the download bit works.
Making iframes doesn't download squat.
Window.open() and Window.location() open new tabs or change webpages, not download stuff.
I'm struggling to find something that works.
http://pastebin.com/uipEv1MD

Last, but not least and the reason I started browsing this thread two weeks ago but I've never asked...
How do I install a C++ library?
I've got SDL and SFML sat on my harddrive and I don't know what to do with them: the installation instructions have been useless for me.
I'm really sorry for being retarded. I know I'm not supposed to ask for this stuff because the answer's always going to be one Google search away.
Still, I'll risk a ban for some guidance.
>>
>>54720927
they're only a mistake because they weren't implemented as a syntactic sugar for calculating the index yourself
>>
>>54721224
>you're right
so you are a retard?
>a joke
you just proved that you're the joke m8
>>
>>54721237
see >>54720927 >>54721234

kill yourself
>>
>>54721213
>malloc is not contiguous
are you mentally ill?
>>
File: flamboyant_cuttlefish.webm (2 MB, 720x404) Image search: [Google]
flamboyant_cuttlefish.webm
2 MB, 720x404
>>54721034
it's an obsolete programming language for the programming techniques of the past.

>>54720898
Yes

>>54720915
Not sure why GCC changed that behavior. The aliasing optimizer has changed since 6.x.

>>54720927
Type safety.
Purpose of 2d arrays is also to have an array of 1d arrays.
>>
>>54721244
nice double indirection fag
>>
>>54721243
you got told & rekt hard tho
>>
>>54721256
at the end of the day you're the one stuck using (a subset of) C because anything else is "too confusing"
>>
>>54721252
>Not sure why GCC changed that behavior.
Because it was wrong. They simply fixed it.
>>
>>54721269
>too confusing
yeah, we all saw how simple array access is too confusing for webshits like you :^)
>>
>>54721288
kys
>>
>>54721269
>you're the one stuck
nah, you got it wrong: you're the idiot who's "stuck"
>>
>>54721277
In what situation could it be wrong?
>>
>>54721302
>DELETE THIS
>>
a 2d array should obviously be laid out as [00,01,02,03],[10,11,12,13] etc so *(arr + 4) should obviously map to arr[1][0] (10), anything else is retarded
>>
>>54721277
It doesn't change anything in that case.

if the compiler know that *(char*)n = (char)*n which it should be the case here since it's only constant folding, then the optimization is legit.
>>
>>54721333
Depends on what 'arr' is, and whether you wanted row or column major order.
>>
someone make a macro for using a 1d array with 2d array-ish syntax without double indirection
>>
Alternatives to BĂ¼chi automata.
>>
File: shitgetserious.png (298 KB, 2271x2380) Image search: [Google]
shitgetserious.png
298 KB, 2271x2380
Your face when https://godbolt.org/g/pL95fP

Clang > GCC
>>
>>54721315
>>54721340
int f(int *n, float *f) {
*n = 1;
*f = 0.1;
return *(char*) n;
}

f:
movl $1, (%rdi)
movl $1, %eax
movl $0x3dcccccd, (%rsi)
ret

When "n" and "f" point to the same thing, it's clear that the return value should not be 1 (it should be -51). That's what was fixed.
>>
i think i'll just stop posting because this captcha is just too cancerous and time consuming, they really crossed the line this time
>>
What language should I start learning?
I'm taking high level math classes in uni but I have literally not done ANY programming before.

I was looking at C mainly to start out.

My purposes for programming are for fun and maybe to work on hacks for mmos and stuff.
>>
File: black_shiba_inu.webm (717 KB, 640x640) Image search: [Google]
black_shiba_inu.webm
717 KB, 640x640
>>54721430
Dereferencing (char*)n is undefined behavior due to strict aliasing. See http://port70.net/~nsz/c/c11/n1570.html#6.5p7
>>
>>54721430
>When "n" and "f" point to the same thing
How is that ever possible?
>>
/dpt/, is there any reason for me to upgrade llvm and clang? I'm using LLVM 7.3.0 now
>>
>>54721460
>>54721430
wait, char is allowed. dereferencing *n would have been undefined.
>>
>>54721430
>That's what was fixed.
>""""""""fixed"""""""""
you're saying they threw away the strict aliasing rules?
>>
https://github.com/7Y3RPXK3ETDCNRDD/dungeon_generator

What can i improve? Or is it good as it is?
>>
>>54721503
Thanks for MIT'ing it because I was actually about to implement a dungeon generator but since your seems to be doing pretty sweet job imma steal it.
>>
>>54721423
https://godbolt.org/g/PBlxw9
based gcc tho
>>
>>54721490
you shouldn't expect *(char*)f when you do *(char*)n
>>
>>54721423
https://godbolt.org/g/7IxRyx

kys
>>
>>54721557
void *p = malloc(max(sizeof(int), sizeof(float));
f(p, p);
>>
>>54721444
pls halp som1
>>
>>54721637
>what is strict aliasing
>>
>>54721644
Allocated objects have no declared type.
>>
>>54721661
fuck off, if you have int* and float* and you set a value to float* you shouldn't expect to get it from the int* unless you use -fno-strict-aliasing
>>
>>54721465
When they point to an allocated object.
>>54721495
No, they just fixed the bug where they got over zealous with strict aliasing.
>>54721557
You should. Because the aliasing rules allow it.
>>
>>54720774
But that's stack not heap you hapless techno weenie.
>>
>>54721698
just another example of C being shit then
>>
>>54721694
>float* you shouldn't expect to get it from the int*
nobody gets it from int*, it's accessed through a char*, which is allowed by strict aliasing
>>
>>54721711
>sour grapes
>>
its this the correct way to get the number of elements in points?

int points[] = {
{0, 0},
{1, 1},
{2, 2},
{3, 1}
};

int size_of_points = sizeof(points) / sizeof(points[0]);
>>
>>54721715
it's just a loophole, it goes against the spirit of strict aliasing, you're supposed to get the char* from the float* not the int*
>>
File: bully.webm (3 MB, 720x404) Image search: [Google]
bully.webm
3 MB, 720x404
>>54721495
>>54721557
>>54721644

They didn't broke strict aliasing. Strict aliasing doesn't apply to the character type (see http://port70.net/~nsz/c/c11/n1570.html#6.5p7)

You _can't_ dereference *n but you _can_ dereference *(char*)n because you are passing through the character type.

it's like

char foo(float *y, char *z)
{
*z = 45;
*y = 1.0;
return *z; // need a fetch, *z is compatible with *y
}


or

int f(int *n, float *f) {
*n = 1;
*f = 0.1;
char *z = (char *)n;
return *z; // since *z is char, dereferencing z is not undefined behavior even if z = f
}
>>
>>54721732
see >>54721747

>>54721748
explicitly casting the correct pointer should be required
>>
>>54721747
Yes, and the float* and int* can point to the same object, without breaking the aliasing rules; it's in the standard.
>>
>>54721766
There is an explicit cast to char * which is a compatible type.
>>
>>54721768
the standard is shit, the entirety of C is shit, even the prime C compiler experts at gcc got it wrong because the standard wasn't written properly
>>
>>54720625
why the fuck there aren't any pirated Ada programming ebooks anywhere on the internet? is it really that dead? I could easily find even Delphi ones released last year. after reading some code, it seems like the best language imaginable and I want to do hobby stuff in it.
>>
>>54721788
see >>54721732
>>
>>54721741
>>54721741
BUMP
>>
Should be noted that this is implementation defined behavior though, might generate a trap representation for ints.
>>
>>54721787
>>54721798
if you get the char* from the float* it's fine. requiring a fetch on everything as soon as you cast from int* is fucking retarded.
>>
>>54721817
>gcc on amd64
>trap representation for ints
pick one
>>
>>54721833
>lolamd
>>
What language should I start learning?
I'm taking high level math classes in uni but I have literally not done ANY programming before.

I was looking at C mainly to start out.

My purposes for programming are for fun.
>>
>>54721818
>requiring a fetch on everything
not everything, just what the standard says will do
>>
>>54721833
gcc on amd64 would be an example of an implementation without integer trap values.
>>
>>54721844
which is basically every goddamn pointer you've dereferenced and written to up until that point
>>
>>54721847
>gcc on amd64 would be
that's what we're discussing, m8, try to keep up
>>
>>54721863
I know.
>>
>>54721841
>math
Just use Python, specifically the NumPy distribution.
>>
>>54721891
I mean I'm not doing it for math. I just wanna get into programming, I was just stating that I'm pretty good at math so I'm not an autist who wants to write kiddycode.
>>
>>54721861
and that's why the "restrict" keyword was introduced
>>
>>54721937
>C isn't shit u guise it's just sour grapes
>>
>>54721956
>mad webshit
>>
>they never learn
didn't I warn you about the size of my dick, gee?
>>
lol have fun writing restrict in all your pointer declarations because C is a flimsy patchwork with retarded standards that they have to bandaid with even more verbose shit
>>
>>54721961
 while (1): goto reddĂ­t 
>>
>>54721972
your comebacks are lame as shit dude you're not winning any internet points or whatever by writing
>mad webshit
>>
File: aikido.webm (491 KB, 720x404) Image search: [Google]
aikido.webm
491 KB, 720x404
>>54721796
Everything surrounding Ada is usually protected by a NDA.

Here one
http://comfy.moe/bjbozd.pdf

But, trust me, Ada is crap and doesn't worth it.
>>
>>54722000
>But, trust me, Ada is crap and doesn't worth it.
what is the good one then?
>>
>>54721979
restrict is hardly ever useful or needed - in the cases where it would be you're most likely wanting to use intrinsics or asm anyway.
>>
>>54722000
>Ada is crap and doesn't worth it
why?
>>
>>54722030
you'll want to use it any time performance matters and you're using multiple pointers
>>
>>54722000
thanks
>>
>>54721996
>mad for getting raped again and again
why don't you just learn, anon?
>>
>>54722048
Amy time performance matters (i.e loops over arrays) you can't trust the compiler anyway, even with restrict it's likely to be suboptimal.
For non-arrays you can simply code in such a way that you only dereference things once (code is even cleaner that way), so it's a non-issue.
>>
File: politics_in_the_usa.webm (3 MB, 1280x720) Image search: [Google]
politics_in_the_usa.webm
3 MB, 1280x720
>>54722017
Good one what ? Programming language ? depends but i would say it must be a Lisp.

>>54722043
Over engineered and incoherent syntax.
>>
>>54722090
>Amy time performance matters (i.e loops over arrays) you can't trust the compiler anyway, even with restrict it's likely to be suboptimal.
restrict can still help and most programs don't use inline assembly in the current year
>>
>>54721979
sounds like you're mad for not knowing C
>>
>>54721981
>python babby confirmed
>>
>>54722112
they should have made it so strict aliasing works like restrict by default, that would be the only non-disgusting option, then the programmer would have to disable strict aliasing and restrict using compiler flags or keywords
>>
>>54721609
>useless xor
m8...
>>
what's the best language to start out learning if I want a really solid foundation and am already in high level mathematics and EE classes?
>>
>>54722146
there's this thing called backwards compatibility tho
>>
>>54722156
C
>>
>>54722162
it's part of why C is shit, just make a performance-oriented language without meme features and without overzealous backward compatibility
>>
>>54722177
Thanks senpai, I was looking at that and some hobbyists reccommended it
>>
>>54722180
>just make
great, start the project and you'll surely get contributions! I'll start working on the logo
>>
>>54722190
>hobbyists
>solid foundation
kek
>>
>>54722201
Well, this hobbyist guy is pretty good. He writes and sells hacks for games for example.
>>
>>54722146
Type based aliasing is shit, breaks many uaeful tricks you wanna do in a systems level language.
It would be better to introduce vector annotation like:
assume(nooverlap, a, b)
assume(canalwaysgrab(4*4), a)

etc.
That way you could get close to oprimal loops and still leave nice type punning alone.
>>
File: bat.webm (2 MB, 640x360) Image search: [Google]
bat.webm
2 MB, 640x360
>>54722146
clang has __attribute__((may_alias))

int foo(int *i, float *f) {
*i = 4;
*f = 1.0;
return *i;
}

typedef int __attribute__((may_alias)) aliasing_int;

int bar(aliasing_int *i, float *f) {
*i = 4;
*f = 1.0;
return *i;
}


foo: # @foo
movl $4, (%rdi)
movl $1065353216, (%rsi) # imm = 0x3F800000
movl $4, %eax
retq

bar: # @bar
movl $4, (%rdi)
movl $1065353216, (%rsi) # imm = 0x3F800000
movl (%rdi), %eax
retq
>>
>>54722211
>hacks for games
you have much to learn young padawan
>>
>>54722156
ASM x86
>>
>>54722093
>incoherent syntax
but it's pretty readable even for people who's seen Ada for the first time
>>
>>54722219
type punning is what should be explicit, you shouldn't have to be explicit about not using type punning
>>
>>54722228
I know I know.

https://github.com/kgzylwip/ggdm/releases

This is one thing he made for example, seems decent.

So I guess I'm going with C.
>>54722229
I'll check it out.
>>
>>54722249
Oh damn, the github is down. sorry dudes. I have the files but too lazy to upload it.
>>
>>54722156
sicp, htdp, or composing program
>>
>>54722247
Performance sensitive number crunching loops are localized and infrequent, they are the rare case which should be explicit.
Type punning can appear almost anywhere, especially in data structure implementations and custom allocators.
>>
>>54722270
>sicp
Damn, thanks for this.

I found this:https://mitpress.mit.edu/sicp/full-text/book/book-Z-H-7.html

Seems like MIT teached this stuff to EE students, and I'm an EE student so this is fucking great.
>>
>>54722309
>Type punning can appear almost anywhere
only in absolutely disgusting code

>especially in data structure implementations and custom allocators
those are localized and infrequent
>>
>>54722146
>made it so strict aliasing works like restrict by default
it already does, unless you get char involved
>>
File: sicpm.jpg (52 KB, 528x640) Image search: [Google]
sicpm.jpg
52 KB, 528x640
>>54722319
yeah, ee students of that time were not fags, not like today.

http://paste.lisp.org/display/313070//raw
>>
>>54722363
Thanks a lot senpai. I've got the next 3 months off for summer to learn a lot of this shit before classes start again and I'm flooded with other work. Really appreciate it.
>>
>>54722341
ok or uint8_t right, that could be char too
>>
How can I program a CLI menu without needing to pass and return several values to each menu option
>>
>>54722403
Show your code, just writing impressive words without context doesn't help anyone
>>
>>54722393
>could
yes, it could, but then again, so could "byte_t" "muh_small_int_t", etc. no point in listing all possible aliases for char
>>
So after 5 years of not programming for fun (and only for uni / work), I jumped into C programming with the goal of writing a simple renderer. For now I'm getting the hang of basics, structs in particular. Shit like this:

struct Point {
/*
Stores 3D coordinates.
*/

double x;
double y;
double z;
};

struct Vector {
/*
Stores 3D vector components.
*/

double x;
double y;
double z;
};

struct Vertex {
/*
One of 3 vertices that mark the corners of a polygon.

Vertex normal is used in (slightly) advanced shading algorithms.
*/

struct Point Location;
struct Vector Normal;
};

struct Polygon {
/*
Triangle defined by its three vertices.

The normal is used for shading.
NextPoly is a pointer to the next Polygon belonging to the same 3D object
(mesh). It is void if this Polygon is the last in the chain.
*/

struct Vertex Vertices[3];
struct Vector Normal;
struct Polygon *NextPoly;
};


Question: Should I replace the Vector and Point structs with simple 3-element arrays or keep them as-is? And is there a library thing (think stdio.h) that will let me display images on the screen instead of text in the terminal?
>>
>>54722129
>python
>goto

go back to 9gag
>>
>>54722445
There is no standard way of doing graphic work in C. You must rely on a third party library that hooks into the OS windows context or opengl
>>
>>54722476
>python babby is mad
>>
>>54722445
Read up on SIMD, also consider upgrading to C++ and using GLM.

>And is there a library thing (think stdio.h) that will let me display images on the screen instead of text in the terminal?
No but you can use either OpenGL with stb_image or something like SDL.
>>
>>54722521
>upgrading to C++
>upgrading
m8...
>>
>>54722498
>python babby is mad
>>
>>54722538
Yes, C++ is leaps ahead of C and is a great improvement in general so the term "upgrading" is perfectly valid here.
>>
>>54722555
>C++
>great improvement
bwahahahahaha, get a load of this cuck!
>>
>>54722494
>>54722521
I am trying to stay away from C++, OpenGL and extensive libraries because I want to make the actual renderer etc from scratch, and I want it to run on the CPU only.
Is there maybe some way of writing bitmap or PNG files rather than displaying stuff in real-time on the screen, for which I can use standard libraries?
>>
>>54722561
>can't come up with an argument to defend his precious obsolete language
>resorts to namecalling

>>54722588
Yes you can use simple char arrays to store the pixel buffer and then render those using native system calls like BitBlt on Windows and XPutImage on X11.
>>
File: The sad state of web security.png (41 KB, 392x597) Image search: [Google]
The sad state of web security.png
41 KB, 392x597
Any of you script kiddies want to play a CTF game?

The rules are simple, go to premium-vetshop.de and report back the email address of Tina Fels.

The first to win gets to g̀¶ò¶ ̀¶t̀¶ò¶ ̀¶j̀¶à¶ì¶l̀¶ report the vuln!

Extra points: Do it without SQLMap, which stupidly does it blind when error messages work.
>>
>>54722614
(to add onto this, this isn't standard though, you will have to use Xlib (or xcb) and WinAPI)
>>
>>54722156
MIT Scratch
>>
>>54722614
>an argument
how would you possibly understand the argument when you don't know C nor C++?
>>
>>54722614
I'll look into X11, thank you.
libpng seems promising for stored images.
>>
File: 759.gif (2 MB, 350x197) Image search: [Google]
759.gif
2 MB, 350x197
>os broke
>didn't make a backup of my PATH
>>
File: 1451683513443.gif (2 MB, 400x225) Image search: [Google]
1451683513443.gif
2 MB, 400x225
>mfw using python at work
Such an elegant language lads
>>
>>54722972
>os broke
>>
>>54722989
python is objectively inelegant kys
>>
>>54722992
I removed the windows activator module and it refused to work after that
shit happens
>>
File: 1451683583776.gif (2 MB, 400x600) Image search: [Google]
1451683583776.gif
2 MB, 400x600
>>54723003
>he thinks this
kys
>>
>>54723011
Just install Linux and copy your old files over, mate.
Stone two birds with one ... wait no
>>
>>54723023
kys
>>
What's the current community project of /dpt/ ?
>>
File: 1451683650441.gif (1 MB, 500x281) Image search: [Google]
1451683650441.gif
1 MB, 500x281
>>54723032
>kys
kys
>>
>>54722129
lmfao, since when does python use goto?
>>
>>54723066
tox.chat
>>
>>54723073
>>54723066
shill harder stupid shitkid
>>
>>54723076
You seem upset :)
>>
File: UKU2rhQ.jpg (891 KB, 3469x1948) Image search: [Google]
UKU2rhQ.jpg
891 KB, 3469x1948
>I made an e-commerce using wordpress

Should I call myself a webdeveloper or webdesigner?

inb4 I should call myself a faggot, retard or Pajeet.
>>
What are you listening to while programming?

What are you programming?

I'll start:
https://www.youtube.com/watch?v=O4NH8mxmypo
A booking.com service for 3rd world countries
>>
>>54723113
>Wordpress
Looks like you're a blogger, congratulation!
>>
>>54723113
>still using wordpress in the current year after their shitty security leaking the panama papers
Use Python/Django you melt
>>
>>54723129
https://www.youtube.com/watch?v=OsOUcikyGRk
>>
>>54723129
nothing

towers of hanoi in c++ and failing hard at it
>>
>>54723129
https://www.youtube.com/watch?v=c9cZSLfh7Xw
>>
first program here

i can't get the 'if' or 'else' statements to function

pls help.

# This program says hello and asks for my favorite OS

print ('Hello')
print ('What is your name?') # ask for their name
myName = input()
print ('It is good to meet you, ' + myName)
print('What is your favorite OS?' ) # ask for favorite OS
myOS = input()

if 'Gentoo'
print ('Mine Too!')
else
print ('Install Gentoo!')
>>
>>54723133
I mean, you can use Wordpress for a blog, but it has expanded to much more than that in the last few years. I can see more and more people turning from Magento to Woocommerce in the next years.
>>
>>54723179
https://docs.oracle.com/javase/tutorial/
>>
>>54723194
It's python.
>>
>>54723179
use " ; " in the end of every statement friendo!
>>
>>54723179
>
if 'Gentoo'

When you write code, you're giving orders and asking questions to the computer.

Now what's the answer to "Gentoo"? Nothing, it's not a fucking question, it makes no sense to ask wether gentoo or not.

You meant to write
if myOS == 'Gentoo':
>>
>>54723179
Colons
if 'Gentoo':
...
else:


That being said, your logic seems to want it to be:
if myOS == 'Gentoo':


>>54723194
nice meme
>>
>>54723113
you're a fucking fag, even calling you a web dev would be an insult to web devs

>>54723203
it's shit
>>
>>54723179
I think you meant if (myOS == 'Gentoo'). It doesn't know you're referring to myOS just by saying 'Gentoo'.
>>
>>54723179
what if their favorite os isn't gentoo, but they currently have it installed?
>>
I'm a gay furry
>>
What do I need to program advanced C applications, guys?
>inb4 notepad
>>
>>54723239
>>>/trash/
>>
>>54723240
CLion
>>
>>54720808
>Note that there no such thing as heap or stack in the definition of C.

Thank you spec warrior.
>>
File: image000000.jpg (485 KB, 1944x2592) Image search: [Google]
image000000.jpg
485 KB, 1944x2592
Look what just came in the mail.
>>
>>54723240
windows ? pellesC
unix ? emacs + clang
>>
>>54723274
>not using javascript on your embebbed systems

And you wonder what went wrong with your life
>>
Thanks dudes. I got it working!

# This program says hello and asks for my favorite OS

print ('Hello')
print ('What is your name?') # ask for their name
myName = input()
print ('It is good to meet you, ' + myName)
print('What OS do you have installed?' ) # ask for installed OS
myOS = input()
if (myOS == 'Gentoo'):
print ('Gentoo is the best.')
else:
print ('Install Gentoo!')
>>
>>54723274
What's it about?
Cache effets and the memory orders of atomic memory access?
Or, yknow, data structures?
>>
>>54723293
KILL YOURSELFF
>>
>>54723316
This, tbqh
>>
>>54723316
>KILL YOURSELFF
>not kys
kys
>>
>>54723298
print('python is shit')
>>
>>54723276
I gonna try those.
Thank you.
>>
File: tiger woods.jpg (20 KB, 500x466) Image search: [Google]
tiger woods.jpg
20 KB, 500x466
>>54723316
Touched a nerve uh? It's not late to join Java rockstar development.
>>
>>54723379
>javascript
>java
weak bait
>>
>>54723304
It's mostly about low-level optimizations: using cache more efficiently, writing custom allocators, etc. There's a few chapters on the STL, their limitations, suggestions for alternatives, etc.
>>
>>54723389
What do you mean? They are basically the same thing.
>>
Hey gee, figured out how to average 2 ints yet?
>>
>>54723461
kys
>>
>>54723470
Hey turbonerd stop spamming your force meme, will you?
>>
>>54723461
kys
>>
>>54723483
>he says, pushing his stale meme
kys
>>
>>54723461
>malloc
kys
>>
>>54723461
>using namespace std
kys
>>
1. Has anyone on here gone through Think Java? I was finding it easy but on the Gridworld part I don't know how to make it print out the location (middle of p53).

2. I've done parts of many programming tutorials but I feel like I'm not any closer to making 2D vidya... or anything that isn't manipulating numbers.
>>
>>54723564
>thinking
>in Java
kys
>>
>>54723461
>using languages named after animals
kys
>>
>>54723564
1. Ew, no
2. Just do itâ„¢. A simple platformer is trivial, start by googling how to show a window, then how to draw an image in that window, and you're practically there.
>>
>VM languages
kys
>>
>>54723470
>>54723485
>>54723514
>>54723525
>>54723561
>>54723576
>>54723578
Menchildren, everyone. >>54723595
>>
>>54723623
kys
>>
File: autisticHere.jpg (79 KB, 640x480) Image search: [Google]
autisticHere.jpg
79 KB, 640x480
>>54723623
Where do you think you are?
>>
>(You)
Step it up, gee! :^)
>>
>>54723725
kys
>>
>>54722328
>only in absolutely disgusting code
No.
>those are localized and infrequent
webdev detected.
>>
>>54723725
>(You)hunting
kys
>>
>>54723786
>webdev is bad
kys
>>
>spamming "kys"
kys
>>
>>54723816
>meta-shitposting
kys
>>
>>54723786
>overdoing type punning
kys
Thread replies: 255
Thread images: 27

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.