[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: 343
Thread images: 23

File: 1456075074460.jpg (60KB, 627x627px) Image search: [Google]
1456075074460.jpg
60KB, 627x627px
Previous thread: >>54927397

What are you working on, /g/?
>>
>>54934593
First for D
>>
>305
Too soon faggot
>>
File: crying-baby-1.jpg (15KB, 635x414px) Image search: [Google]
crying-baby-1.jpg
15KB, 635x414px
>>54934599
>>
why is unit testing is java so inconvenient?
>>
TeamSpeak + Steam integration bot
>>
>>54934597
>muh features!
>>
First for c++ is the best language any disagreement is from wannabe programmers and is just sad
>>

int C = 1;

if (C > C++)
puts("C is bigger");
else
puts("C++ is bigger");

>>
>>54934725
>features now considered a bad thing
>>54934768
first for "C++ is absolutely horrible and anyone who disagrees should be shot" is an accurate representation of your opinion
>>
What language(s) should I learn in order to develop my own cryptocurrency?
>>
>>54934805
So what shitty language do you use my friend let me guess Sanjeef tier Java or maybe you are so l33t you use Python
>>
>>54934805
>he thinks more features are always better
>he thinks C++ is absolutely horrible
IDIOT
>>
>>54934812
Php all you need is php, php is love, php is life
>>
>>54934824
Yes he is mentally handicapped and it is people like him that convince people that they can be programmers because they can learn a syntax
>>
>>54934653
If you think Java Unit Testing is bad, wait till you try the Android+Java testing clusterfuck combo.

Robolectric makes it bearable but it still fucking sucks. It's kinda fun though when you write a beautiful test for a huge blackbox piece of code
>>
File: 1442189860428.jpg (245KB, 947x1205px) Image search: [Google]
1442189860428.jpg
245KB, 947x1205px
I know ruby, rails, and javascript. What should I learn next?! XDDDD
>>
>>54934818
>>54934824
>>54934842

>I can't read
>>
>>54934924
Learn how to use a gun and then shoot yourself.
>>
>>54934924
You should kill yourself because you realise that you are proud of becoming a code-monkey who can use program terribly in some meme languages that even kids can program in
>>
>>54934940
>Learn how to use a gun

They're pretty much idiot proof.
>>
File: cutecat.jpg (198KB, 960x960px) Image search: [Google]
cutecat.jpg
198KB, 960x960px
>>54934940
>>54934954

I actually seriously ask though because I can't tell which languages are memes and which aren't. I just learned these so I could move out to the bay area and make six figs. Some guidance would be nice on what to learn next though. ^_^
>>
>>54935015
What's popular is what's actually used in industry. What's popular is also what low-quality people on 4chan will call a 'meme' in an attempt to de-legitimize it.
>>
>>54935015
Ruby is a trash and unscslable version of python. Use python.
Also: Java > c#
>>
>>54935015
Ok you want my honest opinion if you are serious about programming learn c++ if you have time you may as well learn lisp or ocaml or rust. I mean not much job oppurtunities for that right now but it will help you grow as a programmer
>>
>>54935066
I despise you so much you are advising this young new programmer to learn Java or c#...just cos you are a fuck up doesn't mean he has to be
>>
>>54935015
you seem like a retarded webshit so python
>>
>>54935105
>mad
>internet
>>
>>54934924
html an css?
>>
>>54935116
He is clearly new to programming and probably picked those languages not because he is interested in webshit but because he searches some shit ass site and saw a language he recognises(JavaScript) and then some Redditfag told him to learn Ruby on Rails.

Overall Python is a good first language. But desu more than Python if ur gonna learn a SL learn perl I mean perl is God-tier. Don't even bash perl because you have never used it, perl is life.
>>
>>54935160
he wants a six figure job in the bay area, then python is what he should be learning, not perl
>>
>>54935140
What age are you kid I mean I know you must be under 12 considering you are using a language that is as good as scratch. People like you destroy this industry so yes I am mad at the fact that every 50 year old mother of 5 feminazi thinks she can be the next genius programming mind because she can learn Java ffs
>>
File: 1442874048749.jpg (93KB, 699x464px) Image search: [Google]
1442874048749.jpg
93KB, 699x464px
>>54935116

I just did AppAcademy, so you are correct. If there were a well respected coding bootcamp that wasn't webcentric I would have done that, but it was my foot in the door...

>>54935086

Learn them to what ends? Just because I will be more generally knowledgeable or because there are specific things I need to pick up that are abstracted away in ruby?

>>54935066

I mean I take your word for it, but what makes ruby unscalable and python not?
>>
>>54935173
I can agree with that but if you got some spare time it's good to pick up a few languages that aren't really looked for in jobs just to advance your programming talent. For example a lisp or Haskell or some other functional meme.
>>
File: 1443470280896.jpg (100KB, 600x825px) Image search: [Google]
1443470280896.jpg
100KB, 600x825px
>>54935158

I mean I know HTML/CSS, SQL and React too, I was just speaking to general programming languages.

>>54935173

I already have said job. Just started. I just want to actually become a good programmer and transition from junior web dev.
>>
>>54935194
Python is just usually faster when dealing w big data, etc. Google it cuz I'm lazy. I'd recommend learning both but I like python more. After python & Ruby try Java for knowledge on OOP, from Java, c# is easy
>>
>>54935225
learn java
>>
>>54935194
Using c++ will advance your growth as a programmer and will make you see things in a completely different perspective than ruby. C++ is a low level procedural/templating/OOP language whilst ruby is high level level scripting language they are extremely different from one another. There are some things you simply cannot do efficiently in ruby that you can do in other languages. At the end of the day it is about learning programming theory and picking the right tool for the job that is a measure of your programming ability not just learning syntax
>>
>>54935247
I have never ever seen the words Python and fast being used in the same sentence. Are you smoking crack my friend
>>
>>54935279
it's being compared to ruby which is even worse
>>
>>54934799
desu u dont even need 2 initialize C to anything
>>
>>54935292
Yes I agree ruby is just a slower version of Python that is pointless and meaningless only edgy hipsterfags use ruby
>>
>>54935292
Python is faster than Ruby which is what I mean. Both are reasonably easy languages to learn, especially as a beginner.
>>
>>54935194
>Learn them to what ends? Just because I will be more generally knowledgeable or because there are specific things I need to pick up that are abstracted away in ruby?
Because despite startups paying six figures they last two paychecks because the companies go under in a month.

C/C++/Java is used at established companies that will never disappear like IBM, Microsoft, Redhat, banks, list goes on
>>
>>54935326
I was gonna comment on that same thing but I cannot comprehend how he can basically ask what is the difference between Ruby and other languages. It sounds as if he believes all programming languages are the same and that pisses me off
>>
Ruby's got to have the worst syntax out of all the scripting languages.
>>
>>54935357
*cough*Php*cough*
*cough*perl*cough*
*cough*many other scripting languages*cough*
>>
>>54935368
PHP's syntax is not that bad though, it feels quite natural to write even though the language is garbage itself, I've got to agree on Perl but it's a monster on its own.
>>
so let me bring up another topic of conversation sure to liven things up

Goto statements
>>
>>54935424
>statement based language
Disgusting.
>>
What's your opinion on GNU parallel's syntax?
>>
>>54935301
don't even need anything but the puts("C++ is bigger") since the initial value of C is returned before incrementing.

>>54935356
There is a misconception really that the only metric that differentiates languages is abstraction.

>>54935424
Necessary, but should only be used when there are no other alternatives.
>>
ok guys may as well ask
What is your favourite language, ya know that one language you just feel a warmth inside while programming in
>>
>>54935546
C++
>>
>>54935565
faggot
>>
>>54935569
kys pythonbabby
>>
>>54935565
I agree
Don't listen to
>>54935569
He is clearly a Sanjeef tier programmer
>>
>>54935569
I agree
>>
>>54935597
Tfw samefag
>>
>>54935609
this
>>
>>54935612
kys
>>
>>54935645
you're mom
>>
>>54935645
Tfw one 12 year old pajeet samefag tries to insult the real programmers who don't use meme langs
>>
File: KYS KYS KYS.gif (48KB, 2034x1491px) Image search: [Google]
KYS KYS KYS.gif
48KB, 2034x1491px
>>54935609
KYS
>>
>>54935357
actually consider ending your life
>>
>>54935772
put your trip back on fag
>>
Every post between >>54935565 and this post is either new or under 18
>>
>>54935772
Well that was just rude ...
>>
>>54935831
(And >>54935565 isn't necessarily new or under 18 but is definitely retarded)
>>
>>54935799

>>54935772
is not me.
>>
>>54935842
But >>54935799 is, isn't it?
>>
>>54935842
Yes it was tripcuck kill yourself you fucking attention whoring faggot you actually think anyone gives half a mongolian shit about you you fucking dim witted punk?
>>
Bringing this thread back on topic with a bold statement

JavaScript isn't as bad as people make out
>>
>>54935990
not as bad as python but still really bad
>>
>>54935990
aren't all javascript variables global by default?
>>
>>54935990
Not that bold at all to b h

>>54936024
No, all variables declared without the 'var' qualifier are. It's a gotcha but not a huge deal because linters catch it really easily.
>>
File: FuckingRetards.png (86KB, 1366x768px) Image search: [Google]
FuckingRetards.png
86KB, 1366x768px
Clearing up who is and isn't me.

Anyways, anyone know of any resources on, say, garbage collection algorithms? Like aside from the standard mark and sweep, I'd like to see what modern research has brought us in this area.
>>
>>54936055
Modern research in this area has brought us ARC
>>
>>54936055
>900 millennia in mspaint
not fooling anyone, tripmelt

>I'd like to see what modern research has brought us in this area.
I hear generational GCs are cool
>>
File: The Art Of Trolling.png (85KB, 1264x904px) Image search: [Google]
The Art Of Trolling.png
85KB, 1264x904px
>>54936055
>>
File: nextyoullsay.png (676KB, 652x711px) Image search: [Google]
nextyoullsay.png
676KB, 652x711px
>>54935990
>Javascript is based on Scheme and V8 is really fast
>>
>>54936080
>he is proud of this
kys
>>
fucking hell, learning anything these days takes me quite some time. worse, every time I ask for advice on how to fix my own life, I quickly forget everything I was told

I should really kill myself, I'm far from the guy that used to learn everything fast. being a poor NEET and not young anymore sucks.
>>
Has anyone used Google's PlayN game engine? I'm debating whether to use that or LibGDX.

Both are in Java, use OpenGL, and are crossplatform. Does anyone have experience with either of them?
>>
>>54936149
You shouldn't try to learn too much, you'll just drag yourself down. Take breaks (like weeks if you feel like it) and don't force it.
>>
>>54936175
>High and low-level drawing APIs are provided: write directly to OpenGL, use QuadBatch and our built-in shaders, use Surface for an accelerated Canvas-like API, or use the 2D scene graph
so it's meant for 2d unless you diy it with opengl? i started with libgdx and i regret it, it's better to start from scratch especially when you're learning and you don't need a game engine/framework for 2d, and crossplatform is not hard
>>
>>54936211
>https://github.com/playn/playn
also it's using robovm which microsoft bought up and shut down so i think you'd have to come up with something else for iOS
>>
>>54936185
yeah, but I really want to learn. thing is, I think that learning from books is really the best way to learn, but... they are just too slow. either that, or I simply force myself into reading chapters quickier, but I'm not used to learning/memorizing a shitload of info quickly anymore ;_;
>>
Does anyone have the cs grad meme where they used a drop down box for all phone number options?
>>
File: 1463696945268.png (25KB, 396x400px) Image search: [Google]
1463696945268.png
25KB, 396x400px
If I use a game engine do i avoid all the hassle of opengl/directx calls?

I really can't wrap my head around OpenGL 3.0+ and shaders and shit.
>>
>>54936080
t. 54885630
>>
>>54936321
you avoid them with UE4, cryengine 3 and jewnity but not really with simpler barebones engines like libgdx and playn
>>
>>54936256
Programming shouldn't be about memorizing. Maybe look for a good tutorial online (it's really easy to tell quality apart from shit)? Those go way faster than books and it's easy to copy/paste and tinker with code from them
>>
>>54936064
>>54936067

Thank you for your contributions.
>>
>>54936349
Will I lose any power really if I use UE4/Cry3/jewnity? Do I have to subject myself to some mandated modeling that they accept only?
>>
>>54936295
>>
>>54934593
hello, im retarded.

learning C, i have been for months and occasionally pick it back up. finally getting interested in it, legitimate interest, its going great

anyways i want to know why this doesn't work. comments outline the problem i am having. basically the for loop will work for one number (1) but not for the other (0), even though i use ||. it isn't just 0 either but thats just what i want to use. you will also need to press a number, then enter, then another number for it to work as it has been for me. i don't know why, it just started acting that way after i rewrote it for simplification but i dont see why it should so that is something else if you could help me figure the fuck out would make my day

#include <stdio.h>
int main()
{
int movies;

printf ("Ay yo Rolonda, would you like to go to the movies? Say 1 for yes, and 0 for no. There are no wrong answers. ");
scanf ("%d\n", &movies);

if (movies == 1) {
printf ("Cool, I'll holla at you gurlfrand. ");
}
else if (movies == 0) {
printf ("Aight, I'll holla at you later. ");
}
else {
printf ("O-okay.");
}

/*
the goal of the following line is to attach a single unique line of text to both the answers 1 and 0. it's purpose is to create an example using the for loop in a meaningful way. the problem is this will work for the number 1, but not for the number 0. if you add another number, such as for example 4, it will end at the else statement and also, will not work.
*/
for (movies == (0 || 1); movies == (0 || 1); movies = 2) {
printf ("Tell me if you change your mind.");
}
}


please save me, ive tried to figure it out on my own, but ive spent like eight hours just on this one fucking thing (as in whole page, ive been learning everything through trial and error, literally only thing ive done all day)
>>
>>54936389
Hello retarded
>>
File: sphk.jpg (2MB, 1748x2480px) Image search: [Google]
sphk.jpg
2MB, 1748x2480px
>>54936370
thanks.

have a maki
>>
>>54936321
>>54936349
also you should really learn opengl and shaders it seems really hard at first and it's hard to gather the relevant knowledge with all the autistic documentation and such but it's actually really easy in the end and if you use a game engine you still have to learn a lot about the engine instead of something more general purpose like shaders and graphics programming

>>54936365
you lose performance and you also lose a lot of ability in terms of what you can do. they're only really suitable for typical mainstream games that fit a certain mold like a first/third person shooter with standardized hit detection and physics and such and you just want to customize the storyline and aesthetics. if you want something that doesn't fit the mold you'll still have to do a ton of programming yourself and it's kinda pointless to use an engine at that point
>>
>>54936370
>what is server side page rendering
while it's certainly not the smartest solution, it's not retarded either
>>
>>54936409
s/mold/mould
>>
>>54936393
nice to meet you
>>
>>54936409
also in game engines you can still use your own shaders, it's really useful to know them so you can get the effects you want and do gpu-side programming
>>
trying to go through learn-opengls tutorials but oh my god, im so slow and its so boring. im only in chapter 8 after two weeks of reading this thing and its not that i have learning problems, i just constantly get distracted because im still at a stage i cant build anuthing meaningful with openglbfor practice
>>
>>54936389
I think you need to go over for loops again for what and how they're used
>>
>>54936410
it is 100% retarded. no point in using this over a validated text box input unless you're mentally challenged.
>>
>>54936410
As a user, would you really want to scroll through thousands of numbers to find the correct one?
>>
>>54936477
>As a user, would you really want to scroll through thousands of numbers to find the correct one?
>implying using dropdown menus in the first place is a smart idea
>>
>>54936211
>>54936250
Hmm. Maybe I'll just bite the bullet and learn C++ and OpenGL.

Thanks
>>
>>54936454
how is it not appropriate for this task? the whole goal isn't to do things the most optimally, but to find a purpose for these loops to help me better understand them

it works for example if i do
for (x == (1 || 0); x < 2; x+=2) {
however that only works for numbers that aren't negative. it seems like it should be capable of this job
>>
>>54936520
for loops are for iteration, you're only adding one line of text to one result and your conditions are fucked up

you could just add
\nI suck cocks
in your strings for the 1 and 0 if statements to print on the newline
>>
>>54934593
can we have one thread that you might-makes-rightards don't shit up in the first three posts?
>>
>>54936492
What?

The ridiculous amount of scrolling is the reason that dropdown menus are a bad idea.
>>
>>54936295
>cs grad meme
how come no one has made a website with this? or... does it exist?

>>54936356
afaiu, when you learn, you do a few things, one of which is memorizing the stuff you are learning. then, as you practice, the things you memorized are "internalized" and you can say "I've learned"
>>
>>54936556
That's my point.
>>
>>54936551
>\nI suck cocks
*\n.I suck cocks
>>
>>54936520
for (x == (1 || 0)...


anon, that first part is supposed to assign a value, not make a comparison
>>
>>54936562
That's what I said in the first place though. When did I imply that dropdown menus were a smart idea?
>>
>>54936551
potentially though if i had to do that for 10 or more lines it would be easier to just create a loop

>>54936578
so suddenly that initialization wont fucking work? because in the post youve quoted that was the only example where it correctly served it's purpose to single out the values 1 and 0
>>
>>54936648
or you could just use another if statement at the end

like if you had 1000 responses and didn't want to individually paste in for #s 0-999 you could do
if (movie >= 0 && movie <= 999) {
printf("suck my scrotum");
}


also for loops are structured like
for (var initilization; condition; increment until var meets condition) {
statements;
}
>>
>>54936520
okay, I think I understand what you want. try this

#include <stdio.h>
int main()
{
int movies = -1;

printf ("Ay yo Rolonda, would you like to go to the movies? Say 1 for yes, and 0 for no. There are no wrong answers. ");

while (1)
{
scanf ("%d\n", &movies);

if (movies == 1) break;
else if (movies == 0) printf ("Aight, I'll holla at you later. ");
else printf ("O-okay.");

printf ("Tell me if you change your mind.");
}

printf ("Cool, I'll holla at you gurlfrand. ");

return 0;
}


while loops go until a state is achieved where as for goes a set number of times. break ends a while or for loop abruptly

>>54936713
anon, he's working in C. don't confuse him with nonsense syntax
>>
>>54936648
I think the initialization will still work, but it's "supposed to" be used to create an internal counter variable, not as a conditional.

The fact that it's used for this, plus the way the condition and incrementer are set up such that the loop runs only once makes this an abuse of the for loop.
>>
could anybody who has Windows (32-bit), and any free time help me compile some shit.

No matter what I try, I can never get this hunk of shit computer to compile anything.
>>
>>54935990
it's so not bad that there are like 30 other languages that compile down to it so you don't have to write in it explicitly
>>
>>54936410
>it's not retarded either
yes returning ten thousand lines of select options in a dropdown list rendered on the server is not at all retarded when you can solve the problem with a client side 1 liner I found in 5 seconds on google
<input type="text" onkeypress='return event.charCode >= 48 && event.charCode <= 57' maxlength="4"></input>
>>
I'm doing some work in VHDL, and i've come to a problem. I'm supposed to write a code for reading/writing shit at a registers. Thing is, I declared them as signals, and it seems that i can't read them during simulation. Does anyone know how to fix this? Declarim them as standard ports won't work, given the board I'm working with doesn't have enough I/O ports for it
>>
>>54936863
right click > paste still works when you do it like that though
>>
>Haskell
>Performance

Pick one
>>
>>54937059
I pick performance!

what do I win?
>>
>>54937059
One
>>
>>54937071
You win 1000 years of inexpressive, unsafe & dull unscalable pleb languages
>>
>>54937105
>Haskell
>scalable

Pick one.
>>
>>54934593
>Java
>C++ (and C but not as much)
>C#
>js + all the meme MEAN shit
>some python just coz arduino and raspi shit

Is my skill set any good for real world job ?? What should I learn to be more employebale ?

>I am tall, white, blond with blue eyes and german roots btw, so thats a huge no no on the interviews
>>
>>54937165
You could know 500 different languages/technologies and still be unemployable. What you have done with your skills so far is what matters more.
>>
>>54937143
Scala ripped off Haskell so it stands to reason that Haskell is also Scalable
>>
>>54937105
>You win 1000 years of inexpressive, unsafe & dull unscalable pleb languages
like Go and Rust?
>>
>>54937183
Riight... well I have done 2-3 websites for clients for the last 6 months, and build few "apps" for android that are really simple and just act as a wrapper over the original logic.
Other than that I have 2 games in the making using C++, both are 2D and "indie". But thats not the market I am looking for to dive in, I am doing them with a friend in the free time and we don't care if we fail with the said projects.

So, I guess, I have to work on my portfolio then. Whats best practices ? Should I do some open source project work etc ?
>>
>>54937227
Yes, exactly like Go and Rust
>>
>>54937241
k bro, cool story
>>
>>54934593
okay, jesus, chill out
>>
>>54936555
C U C K
U
C
K
>>
>>54936555
>not wanting to make america great again
>>
>>54937250
wow that drumpf's really scaring me too, glad im not the only one :^)
>>
File: hiddentalent.webm (2MB, 1280x720px) Image search: [Google]
hiddentalent.webm
2MB, 1280x720px
/dpt/-chan, daisuki~

>>54937059
https://code.facebook.com/posts/745068642270222/fighting-spam-with-haskell/

>>54936089
>Javascript is based on Scheme
No.

>>54934653
Static typing.
>>
>>54937389
Why haven't you killed yourself, you attention whore?
>>
>>54937389
good post, I read it
>>
>>54937363
>drumpf

worst maymay ever
>>
>>54937389
image guess for this is floristry? what is the actual sauce?
>>
I wrote a program that monitors ports but, the bittorrent protocol has ports in the same range.

What I'm monitoring is also UDP.
I've tried limiting the ports in deluge but the incoming connections use the same ports or something.
How do I prevent torrent traffic from interfering?
>>
File: 2016.jpg (28KB, 367x390px) Image search: [Google]
2016.jpg
28KB, 367x390px
>>54937465
best meme of CURRENT YEAR
>>
>>54937488
Use a different port.
>>
>>54937503
I can't control the ports, senpai.
>>
>>54937512
>>54937503
>>54937488
I could just add the peers to a list and ignore them, I do not know how to get all of the current peers from deluge.
I only see something /one/ torrent at a time.
>>
>>54937465
>>54937491
>hahaha i can into pol memes

You're literally normies
>>
> OpenSSL
> Notify server about unusable connections from clients
> What method do you suggest?

Blocking or nonblocking? Select? Pings? Timer?
>>
>>54937536

You're right. I'm a Cruz Missile now.
>>
>>54937536
>You're literally normies
you say this like it's a bad thing
>>
>>54937238
i was gonna suggest android/iOS and/or game dev to broaden your skill set and portfolio but it seems you're not interested in those things
>>
>>54937554
It is. You sound autistic as fuck.
It's like fucking r/The_Donald in here
>>
I really like C and wish to do everything in C, but I know that's unrealistic.

How do I get a job where I stay as far away from webdev as possible and just write C all day?
>>
>>54937512
>I can't control the ports, senpai.
UPnP
>>
>>54937565
>normies
>autistic
normies are pathetic in their own way but they're not autistic
>>
>>54937606
Normies meming
>>
>>54937605
>UPnP
>program that monitors ports >>54937488
???
>>
>>54937565
have fun at your bernie rally :v)
>>
>>54937602
write device drivers or something
>>
>>54937602
get a C++ job and write C-style C++
>>
>>54937704
this

>>54937658
I'm tired of you reddit faggots giving /pol/ a bad name.
>>
>>54937729
>reddit faggots
funny that you're the one referencing subreddits here then, huh?
>>
>>54937753
Yeah maybe if you'd actually spent a fucking second on /pol/ you might have heard about literally anything /pol/ related
>>
>>54937771
sorry that I'm not enlightened like you, any tips before I dive deep?
>>
>>54936773
Oh come on.

None of you can help me compile this shit?
>>
File: 1453907886839.jpg (338KB, 1024x576px) Image search: [Google]
1453907886839.jpg
338KB, 1024x576px
I'm bored /dpt/.
What should I make?
Primarily possible with Py.
>>
>>54937794
What is it?
>>
Alright /dpt/, riddle me this: Here we have a simple definition for an object in a scheme interpreter:

enum scm_kind {
SCM_BOOL,
SCM_CONS,
SCM_FIXED,
SCM_FLOAT,
SCM_STRING,
SCM_SYMBOL,
SCM_VECTOR
};

struct scm_cell {
union {
bool as_bool;
ptrdiff_t as_fixed;
double as_float;
struct {
struct scm_cell *car;
struct scm_cell *cdr;
} as_cons;
struct {
char *str;
ptrdiff_t len;
ptrdiff_t cap;
} as_string;
struct {
struct scm_cell *vec;
ptrdiff_t len;
ptrdiff_t cap;
} as_vector;
};
enum scm_kind _kind;
};


We know that because it contains a double precision float as one of the first elements in the union, that it has to be 8-byte aligned on either 32-bit or 64-bit platforms. It thus makes logical sense that it should be 32 bytes total when compiled as 64-bit. But on 32-bit systems, I find that the size of the structure is 24 bytes. A glance at the offsets of each of the members shows a structure something like this:
00    04  08  0C  10   14  18
+-----+---+---+---+----+---+
|bool | | | |kind| |
|fixed| | | |kind| |
|float | | |kind| |
|car |cdr| | |kind| |
|str |len|cap| |kind| |
|vec |len|cap| |kind| |
+-----+----+--+---+----+---+


Notice anything strange? _kind is an enumerated type, and on my machine takes up 4 bytes. But why does it need to be located on an 8 byte boundary? Here we have 8 bytes of wasted code. Something more ideal might look like this:

00    04  08  0C   10
+-----+---+---+----+
|bool | | |kind|
|fixed| | |kind|
|float | |kind|
|car |cdr| |kind|
|str |len|cap|kind|
|vec |len|cap|kind|
+-----+----+--+----+


Here, our double is still 8-byte aligned, so it shouldn't cause issues for any reasonable CPU architecture... at least not Intel, for which this is compiled.
>>
>>54937784
>You should already hate Canadians by this point
>"Really makes you think" isn't actually spam
>90% of sliding isn't actually sliding, just shitposting
>Janitors will ban you for replying to rolls & "reply _ else _"
>Always respond to bait
>Never take "aus/pol/" seriously
>Don't just post memes completely out of place (see >>54937796 )
>"Not an argument" is always an argument
>Ron and Rand Paul are GOAT. Carson is also GOAT
>Calling Trump "God Emperor" is cringe autism
>90% of /pol/ are newfags
>/pol/ is actually a Christian board. Catholics are not Christian
>Ghost/TCR and alex jones/infowars are GOAT
>Sage "alt-right" threads. Sage TRS threads. Sage Milo threads. Sage Sargon threads. Sage and report interracial threads. Sage r9k threads.
>Carlos is funny except when he isn't
>ignore >politics posters
>Fuck turks
>>
I just came back from a furry convention after being dragged there by some friends who are fursuiters.

I haven't touched a computer in 5 days.
What should I program?
>>
>>54937808
it's a lua GLFW binder.

I feel like an ass because I haven't been able to compile it. I need help.
>>
>>54937869
what OS are you on?
>>
>>54937886
Windows 10, obviously
>>
>>54937869
I posted a mene because of OP image.
>>
im trying to write a messaging program
this is what i have so far:
#include <iostream>
#include <stdio.h>
#include <stdlib.h>

using namespace std;

int main(int argc, char* argv[])
{
char mode;
cout << "Enter 'C' for client or 'S' for server\n";
mode = getchar();
if(mode == 'C' || mode == 'c')
{
cout << "Entering client mode...\n";
}
else if(mode == 'S' || mode == 's')
{
cout << "Entering server mode...\n";
}
else{
cout << "Invalid input\n";
system("pause");
}
return 0;
}

is this good or am i retarded?
i would like honest criticism because i'm somewhat new to c++
t. former java pajeet
>>
>>54937940
well it does what you'd expect it to do
>>
>>54936370
>not using php
>>
>>54937940
Lol idk, I just used visual studio and dragged and dropped some modules together
>>
>>54937940
looks great, just use getchar() instead of system("pause"), the pause version is actually a security vulnerability
>>
>>54937940

Don't use system("pause"). Don't use getchar() to pause the program either as Anon is suggesting. Your program should terminate as soon as it has nothing else to do.

And I know what you're going to say next...

"But the window will close before I can see the results of my program"

You're running it wrong. Aside from the fact that Visual Studio can already insert the pause for you by running your program on a script like this:

your_program some args here
pause


If you are running it anywhere outside of debugging you would know that console programs are run... from a console. If you are using cmd or powershell or cygwin or msys bash to run your program, it's not going to open up a new window, print shit out, and close it. It's going to run the program using its own window to print the output, and when the program has finished, it's going to return execution to the shell you called it from. That's the way console programs are supposed to be run.

So just stop. Let your program terminate, and never ever for the rest of your life add system("pause") or anything similar at the end of your program. It's completely unnecessary.
>>
Terminal based OSes were a mistake
>>
>>54937954
>>54937973
>>54937977
>>54938058
thanks for the feedback, i'll probably post a bit more here about sockets and stuff once i get to that point
>>
>>54938083
no
>>
>>54938083
Operating systems were a mistake
>>
>>54938083
You were a mistake
>>
>>54937839
https://ideone.com/CrqV0Z
>>
>>54937839
What OS and text editor do you use>
>>
Best programming languages?

top tier:
>Excel Formulas
>MSWLogo
>C preprocessor
>.txt

good tier
>C derivatives (C++, Go, D, ...)
>ML derivatives (Ocaml, F#, ...)
>Powershell

ok tier
>meme languages (Nim, Idris)
>English language

diaper tier
>visual basic
>C#
>x86, x64 assembly
>bash

web tier
>HTML
>CSS

python tier
>python
>javascript
>python
>java
>python
>>
Hi /dpt/, friend and I need an idea for an Android application to pass the Android class.
We have until this Wednesday to finish it.
Any ideas?
>>
>>54939026
Calculator

everyone does it
>>
/ded/pt/
>>
>>54935279
PyPy
Cython
Numba
>>
>>54935990
I agree. Spergs are just angry at node.js for some reason
>>
>>54938995
kill yourself
>>
>>54939026
fucking retard if you want an app in two days just do some bullshit like a calculator why are you even asking for ideas stop procrastinating idiot
>>
>>54937871
Program a furry tamagotchi.
>>
>>54939291
Because Im riding a train and am bored
>>
>>54939335
you should be googling for prefab shit like cordova so you can get some junk to present, do you have any idea how much in a hurry you are

you could make tic tac toe or even rock paper scissors if you think you can get away with it
>>
File: Untitled4092.png (78KB, 1920x1080px) Image search: [Google]
Untitled4092.png
78KB, 1920x1080px
This stuff again
>>
>>54939593
>all that wasted space
>>
>>54939610
The zone info (SOA record information) and the Actions panel is still missing.
I had to start somewhere.
>>
>>54939375
We mostly have all the necessary knowledge since all the lectures are over, we just couldn't come up with anything that isn't a calculator and doesnt require online databases because fuck setting up JSON.
>>
>>54936149
how old are you
>>
File: tqdm.gif (469KB, 720x464px) Image search: [Google]
tqdm.gif
469KB, 720x464px
What is he using this gif?
it looks like he is in python console
but how come he has autocompletion and other shit?
>>
>>54938995
Bait: the post.
>>
>>54940020
bpython from the looks of it. its like ipython
>>
>>54940020
tqdm is a cli downloadbar tool for python that shows progress of shit (in that gif case, the range 0-1000 with a sleep)
>>
>>54940310
I know
question was about the environment he is using to show it off
>>
>>54938995
What are the criteria for something to be a "meme language"?
>>
hey can someone here make a browser extension to change the words "desu" back to "desu" and "senpai" back to "senpai" on 4chan plus any other filtered words? sick of reading this weeb shit
>>
>>54940358
email hiroshima or on /qa/ or whatever

that's how cuck got unfiltered
>>
>>54940358
oops. second quotes were "tbqh" -q and "family" -ily
>>
>>54940358
That shit is better than your nigger talk.
>>
>>54940415
post ironic nigger memes are way funnier than weeb shit
>>
>>54940358
desu is already desu and senpai is already senpai
>>
Did anyone work with FUSE? I'm wondering how easy it would be to make a CIFS -> FAT32 bridge.
>>
>>54936051
>using a dynamically-typed language and then relying on linters to catch errors before run time
I don't understand you people.
>>
c++:
I have a regular std::vector of pointers to objects, I clean these up in the destructor. But how do I clean that shit up after a crash or force quit?
>>
>>54937565
cuck pls go
>>
>>54940691
Most resources will be cleaned up automatically when the application ends, no matter what. Otherwise, you need a way of catching the error (usually using exceptions) and then terminating after cleaning up yourself.

Don't take this as an excuse for letting your memory run wild. Memory leaks are still a big issue if you have a program that needs to run continuously, not closing a file handle means you won't be able to write, move, or delete it until the entire program terminates, etc.
>>
>>54940691
operating system frees it when the application stops existing
>>
>>54940580
if you're on windows, check out Dokan
>>
File: r don.png (134KB, 312x586px) Image search: [Google]
r don.png
134KB, 312x586px
>>54940691
Make sure your program never crashes forcefully

>>54940701
Did I insult your favourite subreddit?
>>
>>54940793
Not Windows. It's basically Beaglebone Black USB->whatever. The Beaglebone Black needs to show a FAT32 file system to whatever, with the content from my CIFS server. I thought it was going to be as easy as making symlinks, but then my brain turned on and I realized that I needed to get the data "into" the FAT volume.
>>
>>54936587
Actually you don't... My bad.
>>
>>54940580
>>54940864
Now that I think about it, I don't even think FUSE will help me with this. I'll probably have to fuck around with the g_multi kernel module just to be able to do this properly.
>>
>>54938995
Excel formulas are pretty tight.
Check out this beauty
{=SUM(IF(FREQUENCY(IF(G2:G17<>"", MATCH(G2:G17,G2:G17,0)),ROW(G2:G17)-ROW(G1)+1),1))}
>>
Best language/framework for a small platform independent desktop program that uses some graphical specials like transparent background and always in foreground? No Java or other stuff that rely on heavy dependency.
>>
Reminder that rust is the best language there is, bar none. When rusti grows up some, it will even be the best scripting language around.
>>
>>54941395
Weak bait.
>>
>>54941407
Butthurt
>>
>>54941395
>no higher kinded types
>no polymorphic recursion
>no programmable move semantics
>>
>>54941424
No, just older than 16.
>>
c++:
if I do this:
Obj *objects[MAX_OBJECTS];


What do it initialize as? Full of nullptr?
>>
>>54941477
Yes.
>>
>>54941467
>no higher kinded types
False
>no polymorphic recursion
False
>no programmable move semantics
Effectively the exact opposite

Gratz.
>>
>>54941477
No.
>>
>>54941477
Maybe
>>
>>54941395
make a rust garbage collector please
>>
>>54941505
>False
Use them for me, then.
>False
Literally there isn't. Do you know what polymorphic recursion is?
>Effectively the exact opposite
Every move is a straight memcpy, nothing else.
>>
What's the best book to learn ISO C? And I mean actual ISO C. I already "know" C, but I'm tired of never being 100% sure of whether or not I'm accidentally using undefined/unspecified behaviour in my program. Is there a condensed version of the standard without all the cruft?
>>
Assembly language is the most American and uncucked language of all time. Prove me wrong /g/.
>>
>>54942008
>What's the best book to learn ISO C?
The standard

>Is there a condensed version of the standard without all the cruft?
The standard is already condensed.
>>
>>54942053
>unbounded freedom provided by assembly
You bet your ass it is
>>
>>54942067
>The standard is already condensed.
The standard is a trillion pages long and somewhat dense to read.
>>
>>54942008
definitively c primer plus
>>
>>54942090
>a trillion pages
It's 570 pages cover to cover. Leave out index, table of contents etc, and most of the appendices, it's less than 300 pages.
>>
>>54942150
"C Primer Plus is a book by Stephen Prata meant for beginners to the C programming language." from Wikipedia

Doesn't really seem to be what I'm looking for?

>>54942166
It's still a dense text. If no one has any better suggestions, I'll just read the damn thing.
>>
>>54942221
if you want to learn standard C, then, yes.
>>
>>54942053
I can't agree that it is the most American language strictly for the fact that america is a shitty disgusting country where as assembly is a beautiful, limitless work of art
>>
>>54935368
>>54935389
I'd go so far to say that I'd rather write PHP than C.
>>
>>54942331
As long as you aren't also implying that you don't like c++ I agree with you.
On a side note using c over c++ is like using a stick over a katana in a zombie apocalypse
>>
>>54942221
>dense text
>300 pages
>learn C
ARE YOU FUCKING KIDDING ME WHAT YOU WANNA LEARN C IN A 10 PAGE KINDERGARTEN BOOK? KYS
>>
>>54942369
It's actually more like using a sharp steel knife over using an object-oriented extensible modular swissblade.
>>
>>54942394
Well I agree that the knife would be sharp and steel but it would have a little rust on it...damn is it just me or is this starting to get kinky?
>>
>>54942386
>ARE YOU FUCKING KIDDING ME WHAT YOU WANNA LEARN C IN A 10 PAGE KINDERGARTEN BOOK? KYS
If you need 10 pages to learn C then you're a mentally challenged individual. I'm talking about learning ISO C and actually memorising what is and is not undefined and unspecified behaviour.

I like C, but don't try to defend its unsafeness please.
>>
>>54942369
They're both archaic nightmares, but easily C++ > C for the less retarded syntax.
>>
>>54942369
>>54942428
Rust would like to have a word with you. Though, I'm not particularly happy with some of their decisions regarding type system features...
>>
>>54942428
For some reason I managed to read "arabic nightmares" instead of "archaic"....
>>
>>54942440
I do like the look of rust if I'm being honest looks decent. I don't know if I should look into it more
>>
>>54942448
Don't be silly Arabs don't have nightmares they are the nightmares
>>
>>54942314
There is nothing more beautiful than freedom
>>
File: CFYKWNPVAAAXZDZ.jpg (27KB, 388x480px) Image search: [Google]
CFYKWNPVAAAXZDZ.jpg
27KB, 388x480px
Right now I have a Python program that runs ~10 shell commands, parses their output and outputs it.

I want to move all the command running duties and easy parsing off to a separate C program to reduce CPU usage.

How would move all the output from the C program into the Python one?
Should I make the C program output data to a file in /tmp and have Python read it? That's my first instinct, don't know if it's the best way.
>>
>>54942485
>10 commands
I meant 10 commands per second.
>>
>>54942485
Cython
>>
why is FP supposedly better than OOP? i just realized yesterday after trying to program some C++ that my data structures professor was an FPer and didn't teach us ANYTHING about the OOP tools C++ has and i essentially don't even know C++ despite a semester of supposedly programming in it
>>
>>54942736
Because oop is a fucking mess in every single way there is no pros only cons of oop.
>>
>>54942792
i've been told FP code isn't reusable, and that OOP code is. and that also OOP can be made more abstract than FP code to resemble real world situations better
>>
>>54942736
FP isn't better than OOP, that would imply that they are appropriate for the same class of problems. It's just that OOP is bad and FP is good.

>>54942830
FP code tends to be far more reuse-oriented because of higher-order functions and function composition. Yes, OOP is better at domain modeling, but domain modeling is bad. You write write code to program a computer well, not reflect the "real world".
>>
Using Node here (I don't have a choice in the matter), and this seems to be effective at reducing callback hell: https://github.com/yortus/asyncawait

Why isn't this more widely recommended and are there any gotchas I should be aware of?
>>
>>54942915
Looks alright to me, although I can see this sort of abstraction being quite a pain to work with without static typing...
>>
>>54942830
>FP code isn't reusable
Kernels are oftentimes written in a lot of C, so I lean to the disagreeing side
>>
>>54942792
>t. Nagarajan Shanmuganathan
>>
Hi /dpt/
I need some help with a program that's ham-radio related. I'm trying to make a python program that will give the Maidenhead Locator System grid square for a certain set of coordinates.
I am able to get the field (first two characters), but I have no idea how to get the next two:
import math
def roundup(x,y):
return int(math.ceil(x/float(y)))*y
phi = int(float(raw_input("Enter latitude....."))+90)
lam = int(float(raw_input("Enter longitude...."))+180)
# Necessarily add 90 and 180 to respective measurements so Python can use the ints correctly. This format would make it so 0* latitude is now 90*, the poles respectively 0* and 180*. Longitude now assumes a full 360, with the meridian being at 180*.
fchars=["A","B","C","D","E","F","G","H","I","J","K","L", "M", "N", "O","P","Q","R"]
f_phi = roundup(phi,10) #10x20 grid squares, round to the nearest multiple
f_lam = roundup(lam,20)
field=fchars[int((f_lam/20)-1)]+fchars[int((f_phi/10)-1)]
print field

https://en.wikipedia.org/wiki/Maidenhead_Locator_System
>>
>>54943196
Can you not just use the difference between phi and f_phi and the the difference between lam and f_lam to get the sub-coordinates?
>>
>>54943250
I think the way the square is formatted tricks it out, it gives me the wrong thing.
Moscow (55.7558, 37.6173)should be in KO85, but the script will give KO35. It may just be a problem with the lam, because it has to be rounded weirdly.
>>
>>54943321
>>54943250
It seems to be a problem with both. San Francisco (37.7749, -122.419) should be in CM87, script gives CM33
>>
>>54943321
>>54943342
In both those examples, the first digit you got is (10 - correct_value + 1) and the second digit you got is (10 - correct_value)

Is this consistent with other examples? If so, you can easily map it to the correct value.
>>
>>54943196
And by the way, you're losing precision when you convert the raw input for phi and lam to ints unnecessarily. You can remove that.
>>
>>54943386
>>54943374
I forgot to mark that there needs to be an additional one, because the squares are also set distances. I'll see if you can get a pattern out of these:
San Francisco - should be CM87, script gives CM22
Moscow - should be KO85, script gives KO24
New York City - should be FN20, script gives FN with 14 and 9
fchars=["A","B","C","D","E","F","G","H","I","J","K","L", "M", "N", "O","P","Q","R"]
f_phi = roundup(phi,10) #10x20 grid squares, round to the nearest multiple
f_lam = roundup(lam,20)
field=fchars[int((f_lam/20)-1)]+fchars[int((f_phi/10)-1)]
print field
s_phi = roundup(phi,1)
s_lam = roundup(lam,2)
print f_lam - s_lam
print f_phi - s_phi
>>
>>54935225
>i know everything
>i can't make up my mind on what i should learn
learn every single meme language and fizzbuzz, then you will never need to learn anything in your life
>>
What makes a "meme language" a meme?
>>
>>54943618
If *you* specifically like it
Now list every language you use so I can actively avoid it
>>
>>54943634
Java
C
C++
Python
C#
PHP
JavaScript
Perl
Visual Basic .NET
Ruby
Visual Basic
Assembly language
Delphi/Object Pascal
Swift
Objective-C
R
MATLAB
PL/SQL
D
COBOL
Fortran
Scratch
ABAP
Dart
SAS
Groovy
Transact-SQL
Lisp
Ada
Scala
Lua
Logo
Prolog
Scheme
RPG (OS/400)
LabVIEW
OpenEdge ABL
Erlang
Haskell
Alice
Apex
Bash
F#
Q
Ladder Logic
Rust
Awk
Go
(Visual) FoxPro
VBScript
>>
>>54943696
Looks like it's time to pickup Powershell
>>
In assembly, what numbering system so I use the most: Decimal, Binary, or Hexadecimal?
>>
>>54943708
I write PowerShell every single day, too, nerd.
>>
>>54943726
Probably a relatively even mix of decimal and hex.
>>54943727
Looks like I'm going to have to create my own language and write the compiler in pure binary
>>
>>54943726
Yes.
>>
>>54943758
OK, so I'm unlikely to use binary like 011011101 rather I'll convert it to decimal or hexadecimal?
>>
>>54943781
Yeah, you're more likely to just convert the binary to hex, it's much easier to read and work with than a bunch of ones and zeros (1 hex digit is the same as four binary digits if you didn't know that already). Binary is still definitely good to know though.
>>
>>54943842
How often do I even used decimal in assembly?
>>
>>54937796
Every project euler problem
>>
>>54943696
>Assembly language
kek
>>
>>54944000
It's the greatest, freest, and most American language there is.
>>
>>54944192
"Assembly" isn't a language, though. It's like calling "romance" a language.
>>
>>54944220
Assembly is a language. You input commands for the computer to do your bidding like C, Java, or Python.
>>
>>54940334
>no one uses it
>it was made in the last 5 years (not mandatory to be a memelang)
>it claims to be a huge improvement above mainstream langs but yet no one uses it
>>
Anybody here uses qt? I want to try to port something just made to iOS however it asks for a provisional profile

In xCode i can work around it by clicking "Fix this problem" :^) but i can't compile in Qt because of it can anybody shed some light on me?

I don't have a paid dev account
>>
>>54944353
Write me some "Assembly" code, then.
>>
How do I read a PPM image in java?

I have to read a ppm file in java, I've already read the magic number, the width, the height and the number of colors. I've tried using a BufferedImage and an array of bytes, but I couldn't read it.

I tried to do this:

FileInputStream file = new FileInputStream("image.ppm");
//...read magic number,width,height, and color;

BufferedImage imageIn = new BufferedImage(width, height, BufferedImage.TYPE_3BYTE_BGR);
byte [] pixels=((DataBufferByte)imageIn.getRaster().getDataBuffer()).getData();


while(count < 3*width*height){
bt = (byte) file.read();
pixels[count] = bt;
count++;
}

And the result was image more blue than the original. If I change the BufferedImage type to TYPE_INT_RGB I get an all black image.
>>
Post 310 get.

>>54944220
>"Assembly" isn't a language, though.
what
>>
>>54944353
>>54944488
I think he more meant there's multiple dialects of assembly, just saying assembly language doesn't necessarily specify a specific language
>>
>>54944413
In assembly there are many different instruction sets like x86, they're all assembly regardless of what set you pick like


; hello-DOS.asm - single-segment, 16-bit "hello world" program
;
; assemble with "nasm -f bin -o hi.com hello-DOS.asm"

org0x100; .com files always start 256 bytes into the segment

; int 21h is going to want...

movdx,msg ; the address of or message in dx
movah,9; ah=9 - "print string" sub-function
int0x21; call dos services

movah,0x4c; "terminate program" sub-function
int0x21; call dos services

msg db'Hello, World!',0x0d,0x0a,'$'; $-terminated message
>>
So I have a map file that looks like this:

111111111111
100000000111
101111110111
101000010111
101000010111
101000010111
101100110111
100000000111
100000000111
111111111111
111111111111


and I'm trying to load it into a 2D array in C like this:

char map_data[height][width];
for (int y = 0; y < height; y++)
{
for (int x = 0; x < width; x++)
{
c = fgetc(tile_map->file);
if (c == '\n') continue;
map_data[y][x] = c;
}
}


However it seems to be loading in the wrong data.

Help?
>>
public class TimeCalc {

public static void main(String[] args) {
/** TODO
Lese eine int value ein, rechne sie um in Minuten und
Sekunen um.
234 =>3:54
**/
int time = 99999;
//modulo time by sec =39
int sec = time %60;
//divide time by 60 = 1665
int rest = time / 60;
//modulo rest by 60 = 46
int min = rest %60;
int hour1 = rest/ 60;
int hour = hour1 %60;
int hour2 = hour %24;
int day = hour/24;


System.out.println(day + ":"+ hour2+ ":"+ min +":"+ sec );
}


}


how can I make this simpler
>>
>>54944515
assembly is a medium (instructions as text), not a language. do you guys ever studied computer science at all ?
>>
>>54944541
Then why does literally everyone call it the assembly language if it's not a programming language?
>>
>>54944468
https://github.com/abeppu/learning-with-images/blob/master/src/PPMReadWrite.java
>>
>>54944561
assembly is an adjective, not a name. like we say that java is an high level language.
>>
>>54944586
I've seen assembly all the time described as a low level programming language like with machine code.
>>
>>54944561
Because they're stupid.

>>54944597
By stupid people.
>>
>>54944609
You're stupid because I've not seen anyone till now argue that assembly and low level languages aren't programming languages.
>>
>>54944633
Assembly isn't a programming language.
x86 assembly is.
MIPS assembly is.
SPARC assembly is.
>>
>>54944651
You're the reason nerds are bullied.
>>
>>54944651
OK I see now where the confusion is. You're saying not to refer to assembly in general as a programming language but the instruction set like x86 as a programming language.
>>
>>54944678
But is he right?
>>
>>54944686
Yeah, because there is no "Assembly language". There are many assembly languages.
>>
>>54944651
>x86 assembly
I'm sorry, but that's not an assembly language. There are at least two popular syntaxes for the x86 family of languages, and there are different dialects depending on your processor (i.e. x86-16, x86-32, etc)

Do you understand why being pedantic about this is annoying?
>>
>>54944651
Autistic semantics.

Assembly is typically a lazy reference to all assembly language dialects.

>What you are calling assembly is ACKSHUALLY assembly/x86, or as I've taken to calling it, assembly + x86
>>
>>54944704
And before you reply to my post sperging about the syntax recognised by your assembler not making GAS x86 different from NASM x86 - I'm 100% you don't write in machine code so go fuck yourself.
>>
>>54944704
Are those really different languages so much as they are different versions of the same thing? C89, C99, and C11 are all C.

>>54944712
Yes, but saying "I know assembly!" implies that somehow you know ALL assembly languages and their respective architectures.
>>
>>54944744
>>
>>54944740
>Yes, but saying "I know assembly!" implies that somehow you know ALL assembly languages and their respective architectures.
No, it doesn't, you fucking faggot.

No reasonable person would make that fucking stupid assumption.
>>
>>54944740
>Are those really different languages so much as they are different versions of the same thing? C89, C99, and C11 are all C.

>>54944737

C11 is a superset of C99 is a superset of C89 is a [...]

GASM neither contains nor is contained by NASM.
>>
>>54944712
Yeah, it's just easier to day you know assembly rather than autistically specifying the dialects and the processor version of the dialect.
>>
>>54944807
ISAs can be very different to each others. if you put on your resume "assembly language", no one in the field will take you seriously.
>>
>>54944782
>C11 is a superset of C99
no. a super set would mean that everything in c99 is in c11 which is not true.
>>
>>54944534
Don't you need to parse from char to int before you put it in the array? You could also just do:
if (c == '\n') 
{
continue;
}
else if (c == '1')
{
map_data[y][x] = 1;
}
else
{
map_data[y][x] = 0;
}
>>
>>54944534
Use getline instead
>>
File: javascript strange.png (3KB, 400x250px) Image search: [Google]
javascript strange.png
3KB, 400x250px
Someone explain this piece of JavaScript magic...
>>
>>54941477
I don't know
>>
>>54945268
they fiddled with toString functions?
>>
>>54944586
>assembly is an adjective, not a name
It's a noun, you fucking mug.
>/g/ """intellectuals"""
>>
>>54941554
>Every move is a straight memcpy, nothing else.
Unless you implement the copy trait, every move is a real move. Only if the copy trait is implemented do you get an actual memcpy, as described by the trait definition.
>Use them for me, then.
trait Something {
type X;
fn something(y: int) -> X<int>
}
...

>Literally there isn't. Do you know what polymorphic recursion is?
Do you know what a type annotation is?
Thread posts: 343
Thread images: 23


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