[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: 339
Thread images: 26

File: FP.png (15KB, 1036x75px) Image search: [Google]
FP.png
15KB, 1036x75px
What are you working on, /g/?


Previous Thread: >>58283032
Functional Thread: >>58268853

Sorry for not using an anime image.
>>
>>58289160
First for D
>>
A POC for my Japanese training application.
>>
>>58289160
first for futhark
https://futhark-lang.org/
>>
java's objectively a bad language
>>
>>58289179
they are all retarded anyway. literally no need for anything besides anki.
>>
rewriting c++ game engine in c.
What's the best utility library(allocators, containers, ...) glibc, qlibc, tbox, apr or something?
>>
>>58289207
Yeah but the only other options are C and C++ and C++ is maybe slightly slower than C so you're not allowed to use it, only C when you need performance and Java otherwise.
>>
>>58289160
Stop advertising the functional programming thread in the OP, cunt.

Why split the threads? Functional programming is still programming.
>>
File: Untitled.webm (2MB, 1920x1080px) Image search: [Google]
Untitled.webm
2MB, 1920x1080px
>>
>>58289328
It's just a description of FP
>>
How do I convert
std::iter::Skip
back to a normal iterator?
>>
>>58289160
>Functional Thread: >>58268853
Why?

Don't advertising other threads in the OP.
>>
No one is posting here.

Refer to the correct thread >>58289196
>>
File: VID_20170102_200838917.webm (3MB, 1280x720px) Image search: [Google]
VID_20170102_200838917.webm
3MB, 1280x720px
We shift out now.

Next step:
shift in with through dip-switches, which alter the shift-out then
>>
>>58289356
>11 IPs here
>4 IPs there
Nah.
>>
File: 1472085118347.jpg (15KB, 185x156px) Image search: [Google]
1472085118347.jpg
15KB, 185x156px
>Functional programming is still programming.
>>
>>58289338
Nice to see you're still working on it. Just a few questions:
1) Could we see a download?
2) Is it only for /g/ or is there multi-board support?
3) What stage is your program in? Do you plan to add any more features?
>>
Real thread without any advertising in the OP.

>>58289375
>>58289375
>>
File: PepeGun.jpg (40KB, 403x392px)
PepeGun.jpg
40KB, 403x392px
>>58289365
Go post on my thread now
>>
>>58289384
>>58289351

>advertising

What the fuck are you talking about?
It's a fucking link to the FP thread.
>>
>>58289207
it's productive and reasonably fast

learn it and start getting shit done
>>
>>58289406
It's stupid thread splitting is what it is.

Don't include it the OP, cunt.
>>
>>58289415
>it's thread splitting
No it isn't.
The other two threads are thread splitting.

How the fuck can you LITERALLY split the thread and dare to accuse someone else of thread splitting?
>>
>>58289160
Stop linking to other threads that aren't /dpt/ threads.
>>
>>58289363
nice
>>
Why link to /fpt/ in the OP?

What's the point in having two seperate programming threads?
>>
>>58289439
There's a thread specifically for discussing FP, and a general purpose programming thread.

You can think of the FP thread as being there for advanced FP discussion, since it's more of a niche.

The link is there because it is a useful resource related to programming, unlike wdg (which is not programming).
>>
>>58289377
1) browser #112 can be found by searching for it
2) works for all 4chan boards except /f/
3) very mature and stable after 6 years. always thinking of new features.
>>
>>58289408

>outperformed by luajit

kek
>>
>>58289450
You can discuss FP here, there's no need to advertise your thread splitting general in the OP.

If you want to have a separate programming thread as well as /dpt/, fine, but don't use the /dpt/ OP to advertise it because hardly anyone is posting in it.
>>
>>58289408
C# is far more productive with comparable performance.
>>
>>58289484
>to advertise your thread splitting general
please read BEFORE replying
>>
File: Untitled.webm (2MB, 1920x1080px) Image search: [Google]
Untitled.webm
2MB, 1920x1080px
>>58289474
>>
>>58289160
getting my poker engine hacked together.

['d', 5, 'd', 2]
['h', 'A', 's', 'K']
['s', 'Q', 'h', 10]
['c', 'A', 'c', 'Q']
['c', 8, 'd', 4]
['d', 9, 'h', 5]
['s', 2, 'c', 7]
['c', 5, 'd', 3]
['d', 6, 'd', 8]
['h', 'K', 'c', 2, 'c', 'J', 'h', 6, 's', 9]

['s', 'Q', 'h', 10] made a straight
>>
>>58289508
I don't disagree

Java is just five times more popular = easy to find jobs
>>
File: 1483259711222.png (221KB, 721x468px)
1483259711222.png
221KB, 721x468px
What about Nim?
>>
>>58289510
You can spin it however you like, the reason why you included the link is because no body is posting in your /fpt/ threads.

It's nearly 2 days old and it only has 100 replies.

You're forcing a general that nobody wants, we have /dpt/ to discuss programming. We don't need a separate thread for every single programming paradigm.
>>
doing K&R and having trouble with an exercise. it's to make a program that copies its input to its output and places each tab by \t, each backspace by \b, and each backslash by \\. this is what i have

#include <stdio.h>

main()
{
int c;

c = 0;
while((c = getchar()) != EOF)
{
if(c == '\t') printf("\\t");
else if(c == '\b') printf("\\b");
else if(c == '\\') printf("\\\\");
else putchar(c);
}
}


but when i do ./replace lorem.txt the document remains unchanged. also when i do cat lorem.txt > ./replace > res.txt, res.txt is the same as lorem.txt. i may just be using the command line wrong, anyone know how i should be doing it?
>>
>>58289415
so you're admitting it's NOT advertising
>>
>>58289540
>automated proof
>I cannot prove it so I won't allow it
Slow compilation for overly conservative results. I'll pass and use a language where I can write the proofs myself.
>>
>>58289540
Worthless meme language that failed to be shilled even here
>>
>>58289554
Try a pipeline
cat in.txt | ./program > out.txt
>>
>>58289570
They say it's like Python but static and compiled through C.
>>
>>58287248
Quick update on my Arduino project:
I tried compiling the link you sent over for Serial logging - didn't work because it kept complaining about LK1561 in VS 2015's compiler. I'll find something else in the meanwhile, don't worry about it.

I've spent the past two hours dicking around with how the data writes to the tags, as it wasn't coming out properly, but I fixed that now. Up next is trying to get timestamps added to the data read off each time, and then get the serial logger working on the PC side and get it written into .csv.

Link to source code if anyone is interested: http://pastebin.com/sBJnwXD4
>>
>>58289580
>it's like Python
Is that supposed to be appealing?
>>
>>58289482
only in the simplest task

https://benchmarksgame.alioth.debian.org/u64q/lua.html
>>
>>58289544
>the reason why you included the link is because no body is posting in your /fpt/ threads.
That isn't true, I always link the functional thread in /dpt/.
Similarly I try to link the current /dpt/ in the functional thread, but someone complained that it moves too fast.
>>
>>58289554
Your problem isn't your C code, your problem is that you're using redirects wrong.

( cat lorem.txt | ./replace ) > res.txt
>>
>>58289474
It's 6 years old? I thought it was 1 year at most
I'll give it a try, thanks buddy
>>
>>58289579
when i do it that way, out.txt is empty
>>
>>58289566
It's not advertising in the commercial sense, but he's definitely using /dpt/ to promote his slow general.

Personally I don't know why we can't just have a single programming thread, why do we have to split discussion up into programming paradigms?
>>
>>58289544
>>58289602
Oh, and /prog/ used to be its own board.
100 replies in 2 days (well, 30 hours) is perfectly fine for a thread.
>>
>>58289621
>It's not advertising in the commercial sense, but he's definitely using /dpt/ to promote his slow general.
No I'm not, and it's not "my" general.
I didn't even start the idea.

I bet half of the people who are mad about /fpt/ are the ones that complain any time anyone mentions Haskell or monads.
>>
>>58289348
What do you mean by "normal"?
>>
>>58289603
the output file's empty when i do it that way as well. i'm starting to think it has to be a problem with my C code, i don't know how else it'd be failing to work. can you compile it and see if it works for you?
>>
>>58289615
Is the original file empty?

Did you rebuild ./replace ? (Because
cat lorem.txt > ./replace > res.txt
overwrites replace)
>>
>>58289607
2344 days, to be precise.

of course, it's only taking me about 10 hours of total coding time. :^)
>>
>>58289646
See >>58289649
>>
>>58289570
That's literally what static typing is.
When you don't want to fight the type checker, use more permissive types.
>>
>>58289649
ah yep that was it. i was about to ask you what effect the original way i put it had if not the effect i expected it but i guess now i know. thanks!
>>
>>58289110
>The ada compiler they're using is three years old
>>
>>58289521
whats this?

you generate random cards and wait to see if you make a hand?
>>
>>58289637
correct. functional programmers are like the jews, we are harassed and belittled in europe (/dpt/) and when we try to create our own home state (/fpt/) we are attacked even then
>>
>>58289677
Checking a programmer-supplied proof is completely different from automatically coming up with one.
>>
>>58289639
I want to pass this (https://doc.rust-lang.org/std/env/struct.Args.html) iterator, but after skip has been called, it's transformed into a skip iterator.
>>
>>58289713
You can't automate every proof
>>
>>58289721
Yeah, exactly.
>>
>>58289637
Just stop being a cunt and keep the /dpt/ OP free from the usual bloat you see from generals.

We don't need links to anything, /dpt/ has always been a minimalist thread.
>>
>>58289703
You can have your functional ethno state just stop promoting it ours.
>>
File: whydotheypersecutemeso.jpg (109KB, 431x696px) Image search: [Google]
whydotheypersecutemeso.jpg
109KB, 431x696px
>>58289703
And like the real jews, you aren't really persecuted and in fact you're a bunch of entitled cunts making everyone else's lives miserable.
>>
File: aswdefg.png (10KB, 666x384px)
aswdefg.png
10KB, 666x384px
Are you better than the programmers you know?
>>
>>58289750
I'm the best because I don't know any other programmers irl.
>>
>>58289760
what do you mean?

you never leave the basement?
>>
>>58289728
>Just stop being a cunt and don't ever link programming related threads in the OP
You realise you can deviate from the tradition, right?
We established the whole "you have to post "what are you working on g, previous thread", and nothing else" thing to end incessant shitposting.

If someone makes another niche programming thread I'd've linked that too.
>>
>>58289782
>implying we have basements here
>>
File: blink.gif (45KB, 499x499px)
blink.gif
45KB, 499x499px
>>58289742
keep /pol/ in /pol/
>>
>>58289784
>Just stop being a cunt and don't ever link programming related threads in the OP

Yes, that's what I'm saying. Stop it.

Keep /dpt/ minimalist like it's always been.

Your /fpt/ threads would die if you stopped bumping them, stop forcing it.
>>
>>58289718
Do you need to pass Args? It's normally better to make the function generic over the Iterator trait, e.g.
fn takes_iter<I>(args: I) where I: Iterator<Item=String> { ... }

instead of
fn takes_iter(args: Args) { ... }

otherwise your Iterator types become limited (e.g. can't call any iterator methods before passing it to takes_iter()).
>>
>>58289750
i go to a party school and yeah, i don't know any better programmers. big fish in a small pond
>>
>>58289750
>get ask by co-worker to check out his video player implementation because that's basically my job
>notice a class called SomethingViewHelper
"what does it do?" I ask
>"it helps the View, duh" he says
>...
>shitpost about it on 4chan
Seriously, stop with the fucking SomethingHelper, SomethingManager and SomethingUtils.
>>
>>58289802
dumb frogposter
>>
>>58289741
>>58289742
>replying to the effortless false flag
>>
>>58289812
We get plenty of people that use and enjoy the FP threads.
For FP discussion they are MUCH comfier than /dpt/.
Ideally /prog/ would be brought back.
>>
In OpenGL...

Let's say I want to render 128 textures to the screen.

I can only bind 16 textures to texture units at a time, so I guess I need to make 8 draw calls, changing out all the texture units to new textures each time. Is there an reasons not to do this? I though i recall reading switching textures specifically has a high cost but i can't remember.

Alternatively I could put the 128 textures into a single texture array and bind it to one texture unit, and that would work fine too. But would it be worth the hassle performance wise?
>>
>>58289693
well it's a texas hold em poker game.

the list at the bottom is the community cards, and all the other are the players hands. it sees who made what hand. right now the game is very incomplete it only can check for straights, flushes, and a pair.

ideally once it's finished it'll have all the features of a regular poker game players can check, fold, call, etc on all streets. so it'll first deal their hands allow them to bet, fold, then it'll show the first three cards in teh community list and same thing, then the fourth card in the list until it gets to the river.
>>
>>58289838
Fine, enjoy it, just stop promoting it in the OP.
>>
>>58289838
>Ideally /prog/ would be brought back.
Well seeing how /prog/ was basically that one guy that did everything in Racket and a bunch of annoying Haskellfags that also were incredibly racist and basically /pol/lacks, I agree. Bringing back /prog/ would remove the /pol/ from /g/.
>>
>>58289815
Yeah, I want to pass the iterator around. That should do the trick.
>>
>>58289853
>promoting it on the OP
I am literally only linking it because it is related.
This is like saying that the resources linked in the FP thread "are only there to promote the resources"

As I said, if there were other niche programming threads (there used to be lisp generals), I'd link them

Better than embedded rust general
>>
>>58289847
i could make this program in 5 minutes

you're beginning to learning programming or what?
>>
>>58289884
/dpt/ doesn't need links to resources, they're just unnecessary bloat. We all know /fpt/ exists.

But that's just a charade anyway, the reason you're promoting it is because it's slow and it would die if you stopped bumping it.
>>
>>58289885
well i've been programming for about two months now.

this is just a project i started its actually kinda difficult for me to get all the logic put together.
>>
>>58289928
>But that's just a charade anyway, the reason you're promoting it is because it's slow and it would die if you stopped bumping it.
Repeating this doesn't make it true
>>
>>58289865
>Say it loud, say it clear: refugees are welcome here
Kill you're self. Anime and right wing extremism is an integral part of the 4chan community.
>>
>>58289945
We both know it's true regardless.
>>
>>58289658
What's the password?
I just launched it, and anything I enter throws me an error for an incorrect password.

Just a request - add the option to change themes, e.g. Yotsuba, Tomorrow, Photon etc.
>>
>>58289189
I approve
>>
>>58289959
>What's the password?
animu4life
>>
>>58289972
kek ok
>>
>>58289959
CRUISECONTROL

I started on themes long ago but not sure that'll ever go anywhere.
>>
>>58289972
That didn't work either. Also, the error dialog box appears under the password which is kind of annoying desu
>>
>>58290010
Thanks for that, listened to the retarded poster >>58289972
>>
File: pol-ukip.jpg (278KB, 976x792px)
pol-ukip.jpg
278KB, 976x792px
>>58289953
>Anime and right wing extremism is an integral part of the 4chan community
You know what memes are, right? You're not supposed to take them seriously.
>>
>>58290046.
> retarded poster
Excuse me?

is that a way to treat a lady?
>>
>>58289885
>i could make this program in 5 minutes

Do it and upload you programming it
>>
File: 1386230384581.jpg (86KB, 400x398px) Image search: [Google]
1386230384581.jpg
86KB, 400x398px
>>58290055
>lady
>>
>>58290034
>error dialog box appears under the password
ah, fixed it now for #113.
>>
>>58290055
yes.
>>
>>58290052
>Brit/pol/
Wahey.

Who /Brit/pol// here?
>>
is Lua a meme language?
>>
>>58290055
No, he did not call her a filthy slut that she is.
>>
>>58290081
No one, fuck off back to /pol/.
>>
File: fdf.jpg (28KB, 599x448px) Image search: [Google]
fdf.jpg
28KB, 599x448px
>>58290094
Rude.
>>
>>58290114
I'm sorry anon, you get to stay, but keep it to programming, okay?
>>
>>58289160
two project ideas would like feedback on either
project 1 - a repo filled with host lists (including two I maintain myself) all credit would be given, it's mostly just so I have all my host lists in one place

project 2 - when doing malware analysis you output all strings to a txt file a script sorts through them and outputs to a new file only the strings it finds note worthy
>>
>>58290059
well if he's talking about just making a deck of cards that ranodmly deals out hands yes that's probably possible. if he's talking about making it to where it deals players hands, a community board, then checks that board for all possible poker hands and determines what player won not possible in five minutes but probably an hour.

if he's talking about a fully functional poker game minus graphics probably a couple hours for a good progarmmer.

for me it's been kinda struggle only working on it in ten minute intervals for about two days now. i'm not dissuaded i realize some people have been coding much longer hten me and also may have more a natural aptitutde in it but i still like to do it no matter how noob. it's fun for me.
>>
>>58290125
>>58290081
brit/pol/ is not real /pol/, it's just real comfy
>>
>>58290059
i assume the format of your game would be a double ended queue for the stock, and arrays for player hands or something? it really doesn't sound that hard
>>
File: Imperial Leather.jpg (39KB, 620x413px)
Imperial Leather.jpg
39KB, 620x413px
Imperial Leather
>>
>>58290052
>memes
>seriously
Until Trump because president. Memes are serious and dangerous. Don't underestimate them boy.
>>
>>58290143
>it really doesn't sound that hard

Alright bro, you go and handle matching every valid hand in 5 minutes without any errors. I'll be waiting for your video.
>>
Skimming through a very nice udemy course for Spark and Scala, put that shit in my Github later.

I already have a Masters in Information systems and I want to stop being RnD for a shitty web dev shop (they promised me a data driven position yet the shitters don't have any data, let alone know how to treat a relational database right).
>>
>>58290137
Not a /pol/ or /g/ regular here but that's bullshit. Yeah it's comfy to a degree if you're a hite brit like myself but it doesn't change the fact that it's full of out of touch middle and upper class white teenagers. I agree with you guys on a lot of stuff including mass immigration etc but it doesn't change the fact that most of you are edgy as fuck.
>>
>>58290082
It's fine as a scripting language.
>>
>>58290203
>being right is now edgy
okay
>>
Is it better to use the command line to execute multiple linked files or header files in C???
>>
>>58290191
sounds as if you're doing a naive way of checking for whatever the special hand names are. i don't even know them, give me a type of hand and i'll give you a way to check it
>>
>>58290212
I never used to care about politics before 4chan but I would consider myself slightly right leaning these days compared to left just because of how SJW the left has become. I love the fact that trump won purely for pissing off the far left. I grew up in a shit hole along side different races (but mostly white) and I do actually believe there'es a difference besides 'social constructs' and I'm with you all on that. The difference is that I know that there are lots of really nice black and Asian people out there and you faggots in your white villages spout the word nigger whenever you see one on your screen, just because you never see them in real life. Well, besides the atcual niggerish ones hanging outside mcdonalds whenever you decide to venture outwards.
>>
>>58290230
  y = sorted(temp, reverse=True)
x = 0
count = 1
for i in range(1, 7):
if y[x] - 1 == y[i]:
count += 1
else:
count = 0
x += 1
if count == 5:
print()
print(a, 'made a straight')
print()
break


here's my code for checking the straight. this is the only what i could think to do it and it works. my problems is repeating code throughout. like for instance i repeat code to turn the 'A', 'K', etc cards into their numerical values.
>>
>>58289160
Being forced into making an HTML5 + js game...
Hooly fucking hell, js the worst garbage I've seen in a while...
>>
>>58290230
>you're

I'm not the person doing the program, but that 5 minutes thing is bullshit 100% until I can see it.

>I don't even know them
Oh, so you're so good you can do it without even understanding the problem.

https://en.wikipedia.org/wiki/List_of_poker_hand_categories

Dont' forget after worrying about hands you need to worry about rank and suit of the hands too.
>>
>>58290297
That's why JS isn't allowed here.
>>
>>58290297
Use TypeScript. It's the only /dpt/ approved web langugae.
>>
>>58290319
/dpt/ doesn't approve of web.
>>
>>58290311
>>58290319
Nah, fuck that, if I have to rewrite that shit, I'll probably use something like emscripten and C.

Hm... Is emscripten stable/fast enough for games?
>>
>>58290297
I had exactly the same idea after I was put in charge of maintaining (((web apps))) on the Chromecast. Literally everything is complete shit: syntax, performance, tooling, debugging, community.
>>
File: pls.jpg (52KB, 331x331px) Image search: [Google]
pls.jpg
52KB, 331x331px
>>58289234
>>
>>58290319
>>58290338
Yeah, fuck weebdev.
>>
>>58290366
I don't see reasons why to rewrite C++ into C.
>>
>>58290366
write your own?
>>
>>58290389
fuck c++.
>>58290397
fuck reinventing the wheel.
>>
>>58290353
LOL compile-to-JS langugaes are largely a giant meme. Enjoy your comically bloated, unreadable JS codebase.

Only TypeScript and CoffeeScript are reasonable, because the are effectively just JS with a few things fixed.
>>
>>58290421
Parenscript maybe?
I don't wanna touch coffeescript with a 10ft pole.
Typescript seems like complete meme.
>>
>>58289602
>Similarly I try to link the current /dpt/ in the functional thread, but someone complained that it moves too fast
yes
>>
File: Snek, 1.png (183KB, 1420x1182px) Image search: [Google]
Snek, 1.png
183KB, 1420x1182px
Trying to use SDL to read keyboard inputs for a small-scale Snake game I'm making. I'm following this tutorial ->
https://www.libsdl.org/release/SDL-1.2.15/docs/html/guideinputkeyboard.html

But when I copy+paste the code in example 3-11, I get an error because apparently I haven't defined some of the structs that are supposed to be included... Any help?
>>
>>58289234
>rewriting c++ in c
Why friendo?
>>
File: 1466531871712.png (281KB, 791x613px) Image search: [Google]
1466531871712.png
281KB, 791x613px
>>58290411
>i'm going to rewrite this C++ game engine in C
>fuck re-inventing the wheel
ALL of the anime girls (with question marks above their heads)
>>
>>58290465
Check if ya installed correctly.
Check whether you're using SDL or SDL2.
>>
>>58290484
>>58290470
shh...

Using c library from other language is way easier plus dealing with c++ libraries is pain in the ass because every faggot has their own way of writing c++.
>>
>>58290457
>Parenscript maybe?
Yes, parenscript is a perfect example of the shit I was talking about.

>I don't wanna touch coffeescript with a 10ft pole.
>Typescript seems like complete meme.
Why? Dynamic typing is a meme. TS is actually pretty based. Google even dumped their own garbage compile-to-js langugae to use microsoft's TypeScript too.
>>
>>58290203
>(w)hite brit
Isn't that redundant?
>>
>>58290511
I understand, but rewriting for the sake of being autistic is a complete waste of time.
>>
>>58290511
and dealing with c isn't a pain in the ass?
>>
File: sharia-for-the-uk.jpg (42KB, 468x312px) Image search: [Google]
sharia-for-the-uk.jpg
42KB, 468x312px
>>58290526
no
>>
>>58290457
TypeScript does what the name says - static typing for JS. The advantage over other languages is that it's a superset of JS and so any valid JS is valid TS. It cut down my debugging time at least 10 fold. Of course I would rather use a normal language, but full asm.js web applications are still a terrible hack. Waiting till we get proper WASM.
>>
>>58290283
My highschool and middleschool was majority black.
99% of them are worthless.
That's my experience.
>>
>>58290548
It doesn't have to be but now that I have looked into most C libraries every faggot redefined the standard library and implements even the most basic data structures themselves just because...

>>58290547
It's not waste of time if it's for fun and sport.
Because back up plan is going with java. It sucks but at least it's not c++.
>>
>>58290511
Pretty true, as long as they don't fuck it up with macros
>>
k guys, this is a content script (the only content script) in a web extension I am working on. It doesn't work, at least on 4chan. Can somebody tell me what I did wrong?

 document.body.innerHTML = document.body.innerHTML.replace(/baka/g, 'baka');
document.body.innerHTML = document.body.innerHTML.replace(/desu/g, 'desu');
document.body.innerHTML = document.body.innerHTML.replace(/senpai/g, 'senpai');
>>
>>58289845
>Alternatively I could put the 128 textures into a single texture array and bind it to one texture unit, and that would work fine too. But would it be worth the hassle performance wise?
Idk, but have you looked at https://www.khronos.org/opengl/wiki/Array_Texture
and
https://www.khronos.org/opengl/wiki/3D_Texture

Texture arrays plus a few other extensions seem to be the go-to solution nowdays. Look at this from page 26 http://www.slideshare.net/CassEveritt/beyond-porting
>>
>>58290552
Is that Turkey?
>>
>>58290519
>>58290557
Hm... I'd have thought that lisp to js would a pretty straightforward compilati, minus a couple of hiccups (How closures work, etc).

As for typescript, it's just extra work with little to no pay off if you know what you're doing.
If I don't care about performance (Which ts doesn't improve on all that much), type systems aren't really worth it for me.
>>
>>58290598
Even (or perhaps especially) basic data structures can be tailor-made for a specific purpose. Generic structures from generic libraries would have to make compromises. What sort of C programmer can't bang out any variant of say a self-balancing binary tree in 45 minutes anyway?

If you're not coding for performance/around hardware limits you shouldn't be using C in the first place.
>>
>>58290628
No, it's the UK
>>
>>58290628
No it's the UK
Shitty bait
>>
>>58290628
Yes, it's the UK
>>
>>58290587
I'm not racist but I don't believe in the idea of all races being exactly the same.

Why are blacks on average better athletes. This is easily observed just look at pro sports anything entirely black people, olympics, dominated by black people (minus swimming hmm?).

I bet if you looked at engineers by race there would be less blacks then that of any other race.

so liberals need to explain this without their 'social construct' psuedo science bullshit when confronted with this they do mental gymnastics to say 'oh blacks aren't in STEM as often because of systemicc racism' ya no that's not a valid argument.
>>
>>58290614
it even replaced the words in the code.
>>
>>58290660
Why are all mothers female?
Seems pretty sexists to me.
>>
>>58290677
Thanks to the gender revolution that willl soon change.
>>
What's the best way to allocate a 2D array in C?

    /* Option A */
foo = malloc(row_num * sizeof *foo);
for (int i = 0; i < row_num; i++) {
foo[i] = malloc(col_num * sizeof **foo);
}

/* Option B */
foo = malloc(row_num * sizeof *foo);
foo[0] = malloc(row_num * col_num * sizeof **foo);
for (int i = 1; i < row_num; i++) {
foo[i] = foo[0] + i * col_num;
}


A seems much clearer to me but I keep seeing stuff similar to B crop up in various code bases. Are there any big advantages to it?
>>
>>58290614
also pls help, I want to replace baka desu senpai with the original words on 4chan.
>>
>>58290660
>>58290659
>>58290654
>>58290652
>>58290628
>>58290552
>>58290526
Stop this /pol/ leakage and fuck off back to /pol/

>Why are blacks on average better athletes. This is easily observed just look at pro sports anything entirely black people, olympics, dominated by black people (minus swimming hmm?).
Bicycling
Weightlifting
Athletics (pole vaulting, height jumping)
Gymnastics
...

I could mention more but I'm not going to because I want to talk about programming.
>>
>>58290681
Wtf are ya doing?
Just allocate it all at once...
>>
>>58290614
>'this doesn't work, solve it for me'
>doesn't even provide a description of the problem
>>>/wdg/
>>
>>58290647
>As for typescript, it's just extra work with little to no pay off if you know what you're doing.
Said every weebdev ever. I bet If i look at any large web project you've worked on I'll find shit tones of "The field "fuck" of Undefined is not an object", "cannot call function muhFunc() of Undefined" and endless shit caused by weak typing resulting in errors propagation and causing difficult to debug behaviour which takes literally hundreds of times longer to fix than if there was just strong typing, or better yet, have the types enforced at compile time and make the errors impossible in the first place.
>>
>>58290681
>sizeof *foo
Is this allowed?
>>
>>58290681
>What's the best way to allocate a 2D array in C?
sometype foo[i][j]
>>
>>58290702
it's because a lot of inner city blacks are shuffled off into football, basketball, and track/field. if htey were tailored into the more niche sports you mentioned they'd probably start composing mainly winners in that
>>
>>58290702
Blacks are good for physical labor, but they're goddamn stupid.
>>
>>58290702
This is relevant to /g/ and /dpt/ because we need to create more languages like Ruby, Python and JS that do not perpetuate systemic oppression.

One of their main advantages is that there is no discrimination at compile time which many people find triggering.
>>
>>58290719
Nah, I mainly work on stuff in Lisp and C.
Never had that happen to me on js projects though, even on the large ones...
Granted, I'm the only programmer on the team, so I guess it's easier.
>>
>>58290702
>I want to talk about programming.
doesn't sound like it
>>
>>58290648
>If you're not coding for performance/around hardware limits you shouldn't be using C in the first place.
Staying away from c++ and getting easy interface with any other language seems kind of nice thing when you can do pretty much everything in C that can you witch c++ except those things that operation overloading gives like reference counting.

>Generic structures from generic libraries would have to make compromises
Seeing that most implement thing are really basic pool allocator, freelist allocator, maybe even heararchical allocator, containers using said allocators it really that kind of abstraction that gives away performance. It's just pain because there is no decent library providing it with permissive license.
>>
>>58290681
Just allocate width*height*sizeof foo
Index using foo+x+y*width
>>
>>58290681
>running the malloc syscall this many times

Congrats. You found a way to make C slower than PHP
>>
>>58290750
>Never had that happen to me on js projects though, even on the large ones...
bullshit
>>
>>58290731
>inner city blacks
Isn't this essentially Trumpism/rich white man-ism for "nigger"?

Anyway, most medal-winning black olympic athletes are from Africa, like Kenyans are really good at running because a lot of the cities are quite high above the sea meaning that they have developed a more refined oxygen intake.
>>
>>58290767
>malloc syscall
Congrats, you don't know how malloc is implemented, nor which syscalls exist apparently.
>>
>>58290727
It is for named objects, but not types.
>>
>>58290776
no if you look at a lot of the best football, basketball, etc athletes that are black 90% of them are from low income households in urban areas. thus inner city blacks.
>>
>>58290773
Meh, it's true, out of the 3 large projects, most of the bugs were caused by assuming the language designers had common sense...
>>
>>58290619
That's a pretty interesting link. Thanks anon.
>>
>>58290788
>you don't know how malloc is implemented
you what?
>>
>>58290767
The compiler generally optimises that into single malloc calls. But if he put too much work into the for loop that might not be the case.
>b-but my compiler doesn't
Well then it's shit and you should upgrade.
>>
>>58290792
>no if you look at a lot of the best football, basketball, etc athletes that are black 90% of them are from low income households in urban areas. thus inner city blacks.
FYI: Only Americans play American Football, and basketball is a niche sport everywhere in the world except in the US.

Protip: When you have a world league and less than 4 countries participate, it's a niche sport.
>>
>>58290727
>allowed
Allowed? It's the only proper way to do it.

Foo *bar = malloc(sizeof(Foo)) is casting-the-result-of-malloc-tier mongitude.
>>
Blacks can't program
>>
>>58290814
It doesn't request the OS for memory every time.
>>
>>58290814
Let me spell it out for you: malloc() isn't a syscall. It ***may*** call mmap(), but it may also decide that using brk() is smarter.
>>
>>58290703
Then you can't array[i][j]
>>
>>58290859
>every OS is unix
>>
>>58290824
my argument still stands there's differences in muscle strenght and intelligence in races.

you could take every race have htem train equally hard for say 'nfl' its still going to be dominated by black athletes.
>>
>>58290865
If it's a 2D grid, there's no need to.

array[row * width + column]
>>
>>58290826
There's virtually no difference.
>>
File: ackchyually.png (124KB, 680x680px) Image search: [Google]
ackchyually.png
124KB, 680x680px
>>58290865
You could with a macro.
>>
>>58290788
>nor which system calls exist
Why do you say that? The former is obviously true but I don't see why he necessarily doesn't know about virtualalloc for instance.
>>
>>58290796
So you literally NEVER misspelled something you were referring to in dynamic code and ended up referring to Undefined instead of what you expected?
>>
>>58290870
Only UNIX uses syscalls, so nice attempt at backtracking but still no soup for you.
>>
>>58290901
but i'm hungry...
>>
>>58290846
I helped a black program.
He programmed pretty well that black.
>but he needed your help
Well I'm also pretty good at program.
>>
>>58290889
It violates DRY and can be a source of bugs. If you decide to change the type you have to remember to change your code in two places.
>>
>>58290901
>backtracking

If anything it's sidetracking.

>Only UNIX uses syscalls

GNU does, and GNU's Not UNIX. QED.
>>
>>58290935
>syscall
>userland
Pick one. Linux != GNU
>>
>>58290809
You're welcome. This one seems interesting too:
http://www.slideshare.net/CassEveritt/approaching-zero-driver-overhead

On the other hand, they all assume pretty recent OpenGL so idk if you target older versions.
>>
File: fuckingidiot.png (38KB, 499x338px) Image search: [Google]
fuckingidiot.png
38KB, 499x338px
>>58290935
>GNU does, and GNU's Not UNIX. QED.
>>
>>58290962
not an argument.
>>
>>58290899
I'm absurdly paranoid when it comes to testing, so no?
I think most dynamic languages won't let that pass though, lisp certainly doesn't...
>>
>>58290954
Linux isn't UNIX either, but I'm referring to GNU/Linux. What you’re referring to as Linux, is in fact, GNU/Linux, or as I’ve recently taken to calling it, GNU plus Linux. Linux is not an operating system unto itself, but rather another free component of a fully functioning GNU system made useful by the GNU corelibs, shell utilities and vital system components comprising a full OS as defined by POSIX.
Many computer users run a modified version of the GNU system every day, without realizing it. Through a peculiar turn of events, the version of GNU which is widely used today is often called “Linux”, and many of its users are not aware that it is basically the GNU system, developed by the GNU Project. There really is a Linux, and these people are using it, but it is just a part of the system they use.
Linux is the kernel: the program in the system that allocates the machine’s resources to the other programs that you run. The kernel is an essential part of an operating system, but useless by itself; it can only function in the context of a complete operating system. Linux is normally used in combination with the GNU operating system: the whole system is basically GNU with Linux added, or GNU/Linux. All the so-called “Linux” distributions are really distributions of GNU/Linux.
>>
>>58290975
Why will you guy never let this go? He made one bad PR move and you hound him about it to no end.
He comes off like a complete autist here but in reality he's an OK guy.
>>
>>58290975
No, Richard, it's 'Linux', not 'GNU/Linux'. The most important contributions that the FSF made to Linux were the creation of the GPL and the GCC compiler. Those are fine and inspired products. GCC is a monumental achievement and has earned you, RMS, and the Free Software Foundation countless kudos and much appreciation.

Following are some reasons for you to mull over, including some already answered in your FAQ.

One guy, Linus Torvalds, used GCC to make his operating system (yes, Linux is an OS -- more on this later). He named it 'Linux' with a little help from his friends. Why doesn't he call it GNU/Linux? Because he wrote it, with more help from his friends, not you. You named your stuff, I named my stuff -- including the software I wrote using GCC -- and Linus named his stuff. The proper name is Linux because Linus Torvalds says so. Linus has spoken. Accept his authority. To do otherwise is to become a nag. You don't want to be known as a nag, do you?

(An operating system) != (a distribution). Linux is an operating system. By my definition, an operating system is that software which provides and limits access to hardware resources on a computer. That definition applies whereever you see Linux in use. However, Linux is usually distributed with a collection of utilities and applications to make it easily configurable as a desktop system, a server, a development box, or a graphics workstation, or whatever the user needs. In such a configuration, we have a Linux (based) distribution. Therein lies your strongest argument for the unwieldy title 'GNU/Linux' (when said bundled software is largely from the FSF). Go bug the distribution makers on that one. Take your beef to Red Hat, Mandrake, and Slackware. At least there you have an argument. Linux alone is an operating system that can be used in various applications without any GNU software whatsoever. Embedded applications come to mind as an obvious example.
>>
>>58290971
>I'm absurdly paranoid when it comes to testing, so no?
You're not making sense. If you have to test your code, that implies that you on occasion do misspell things and need to test the code in some form to make sure you didn't make any mistakes.

>I think most dynamic languages won't let that pass through
Every single one does. That's the entire point. The fields of objects aren't known until runtime, so the compiler has no way to know if you misspelled a field name or not.
>>
>>58290881
>my argument still stands there's differences in muscle strenght and intelligence in races.
There is, but equating African blacks with American blacks is wrong for several reasons.

Different diets and different environments for some generations has obviously changed their physical and mental capabilities. Not to mention that the different ethnic groups in Africa, and obviously in the US as well, are also pretty diverse themselves. And then there's also the fact that only the strongest+not too smart were taken as slaves / survived being a slave and were allowed breed (since the too smart ones were potential trouble makers). And also obviously there's a huge culture difference, many Africans are hunter gatherers, and in the US there has been decades of a negative culture where athletes are worshipped while school and education has been regarded as worthless among blacks.
>>
>>58290975
The kernel implements syscalls.
>>
File: Just Linux.png (95KB, 1279x492px) Image search: [Google]
Just Linux.png
95KB, 1279x492px
>>58291017
Actually, it's Just Linux.
>>
>>58291018
Ah, I've misspelled names, yes, but it never went out of control.
>>
I'm teaching one guy C.
What is good next language to give him in order to get employed?
>>
>>58291098
Anything other than Haskell
>>
How do I add a 0 to the second if it's 0-9?

#include <TimeLib.h>

void setup() {
Serial.begin(9600);
time_t t = now();
//setTime(20, 36, 55, 2, 1, 17); //Hour, Minute, Second, Day, Month, Year

}

void loop() {
Serial.print(hour());
Serial.print(":");
Serial.print(minute());
Serial.print(":");
if(second()<=10){
Serial.print(second());
}else{
Serial.print("0"&&second());
}

Serial.print(" - ");

Serial.print(day());
Serial.print("/");
Serial.print(month());
Serial.print("/");
Serial.println(year());

delay(1000);
}
>>
>>58291018
Ah, I've misspelled names, yes, but it never went out of control.

Still, Lisps in my experience give ya an error at runtime if you use values that aren't defined.
>>
>>58291058
And the kernel is a part of GNU/Linux.
>>
>>58291098
Haskell.
>>
>>58290299
>but that 5 minutes thing is bullshit 100% until I can see it.
i never said 5 minutes, & i'm not sure why you're so triggered right now
>>
>>58291086
So when you said
>Never had that happen to me on js projects though, even on the large ones...
you mean, that it does happen.

What does "out of control" mean? If it costs you time, then why put up with it? There's literally no benefit to dynamic typing. All it does is create large classes of errors that can easily be prevented with a statically typed langugae.
>>
>>58291098
Go, Haskell or Rust
>>
>>58291102
>>58291116
>>What language?
>any language
Thanks for the help
>>
>>58291098
employment is a meme
>>
>>58289596
>https://benchmarksgame.alioth.debian.org/u64q/lua.html

That's not JIT ;)
>>
>>58291112
It's also part of Busybox/Linux and Tinybox/Linux and Android/Linux, so why don't you go away and suck om RMS' toejam?
>>
>>58291108
yes, at runtime. That is my point. I was said
>"cannot call function muhFunc() of Undefined"
That was an example of a runtime exception you commonly get in dynamically typed langugaes, but never in statically typed ones.
>>
>>58291119
you never said anything because this is a fucking text board, you mong.
>>
>>58291132
what do you mean?

being a NEET like you is cool?
>>
>>58290191
Why is this autistic child so triggered by hyperbole?
>>
>>58291104
Ignore this, I fixed it
>>
>>58291151
Inane. I provided one non-Unix OS, namely GNU/Linux. Iterating all other combinations of OSes that use Linux does not win the argument. Stop embarrassing yourself.
>>
>>58291160
No, I mean you're here forever and you will die a lonely death, you hapless, autistic, weeb.
>>
>>58291192
If you weren't a weeb you wouldn't know about this website
>>
>>58291098
OOP.
Java is popular.
>>
>>58291175
Thinking that the userland has anything to do with systemcalls is inane. Arguing semantics about UNIX vs UNIX-likes is inane.

Do the world a favor and jump in front of a moving train.
>>
>>58291208
And yet here we are.
>>
>>58291144
how do you know?
>>
>>58291192
nice projection, retard
>>
>>58289760

I don't really either

I know one person who "made an app" and I have a feeling he's a hack
>>
>>58291223
GNU could not be UNIX if only UNIX OSes have system calls. And GNU by definition is Not UNIX.
>>
>>58291098
Both Java and C#, and he's set for life.

Or if he's interested in web dev, then those other languages.
>>
>>58291247
>Both Java and C#, and he's set for life.


Life where? Dubai?
>>
>>58291226
Exactly. Weeb to weeb.
>>
>>58291245
>GNU could not be UNIX if only UNIX OSes have system calls.
You know what I meant, now you're just pretending to be autistic.

It's anyway a matter of POSIX compliance, and inb4 hurr durr GNU/Loonix isn't POSIX we know, but a fancy piece of paper is essentially the only thing standing in the way of that.

>And GNU by definition is Not UNIX.
You know that the reverse acronym is not actually the definition, right?
>>
>>58291261
Middle class life, good life.
>>
>>58291152
But you can just use the browser's debugger.
It really isn't worth the time wasted managing types, compiling each time, etc.
>>
>>58291273
>You know that the reverse acronym is not actually the definition, right?

You're the retard responding to low effort bait. I wouldn't be getting all smarmy if I were you.
>>
>>58291305
>You're the retard responding to low effort bait. I wouldn't be getting all smarmy if I were you.
You know what I meant, now you're just pretending to be autistic.

It's anyway a matter of POSIX compliance, and inb4 hurr durr GNU/Loonix isn't POSIX we know, but a fancy piece of paper is essentially the only thing standing in the way of that.

You know that the reverse acronym is not actually the definition, right?
>>
>>58291305
>>You're the retard responding to low effort bait. I wouldn't be getting all smarmy if I were you.
>You know what I meant, now you're just pretending to be autistic.
>It's anyway a matter of POSIX compliance, and inb4 hurr durr GNU/Loonix isn't POSIX we know, but a fancy piece of paper is essentially the only thing standing in the way of that.
>You know that the reverse acronym is not actually the definition, right?

You're the retard responding to low effort bait. I wouldn't be getting all smarmy if I were you.
>>
Does a truly a bug-free program exist? I think not.
>>
>>58291228
Because JIT is Lua 5.1?
>>
>go to sleep
>wake up way too early
>go on dpt
>it's absolute shit
Just this morning we had a riveting discussion about our opinions on books for compiler writing. One anon shared his thoughts on simple work systems (multi-threading). We discussed what a programmer should be required to know without there being too much autism.

>American hours
>I have opinions on [insert race here]'s athletic performance
>arguing semantics concerning something that's tangential to an actual constructive discussion
>unhelpful answers to the 'what language should I teach people' question
This is awful.
You all deserve any awful thing that might happen to you.
>>
>>58291276
>But you can just use the browser's debugger.
That's exactly my point. You HAVE to use the browser debugger, which takes a lot of time every time you get a cryptic runtime error caused by type problems.

>It really isn't worth the time wasted managing types, compiling each time, etc.
Firstly, in dynamic languages, you still have to manage your types. Simply because you don't need to annotate the types of variables and fields in your code, doesn't mean you don't have to make sure your types are consistent. If you fuck up you still get errors, just at runtime and they take much longer to resolve than when they happen at compile time. Secondly, the time it takes to compile is MASSIVELY made up for in large projects. Particularly if actually somewhat dependable code is a project goal.
>>
>>58291355
Of course, you can write a very small program that is bug-free. Also, you can be a shitter and call a bug as a feature.
>>
>>58291355
print "Hello World"
>>
>>58291380
epik /b/ro
>>
>>58291355
Of course it does.
As long as you claim the current working behavior is intended its bug free.
And if you determine sets of valid input plenty of programs can easily be considered bug free.
>>
>>58291397
thanks
>>
>>58291372
>>58291380
>>58291409

The underlying OS and hardware still have bugs, so by extension, so does your program.
>>
>>58291418
No. That's OS bugs. Place your program on a machine without bugs and it's gonna have flawless execution.
>>
>>58291418
>The underlying OS and hardware still have bugs, so by extension, so does your program.
not at all true. Your program has nothing to do with the compiler/runtime/ machine implementing it.

Bug free code Bug free code can crash because of problems that are not to do with the code itself, but to do with it's runtime environment.
>>
>>58291434
>a machine without bugs
Doesn't exist.
They'll always be bugs and exploits.
>>
>>58291418
WRONG.
>>
File: 1477769659150.png (165KB, 400x400px) Image search: [Google]
1477769659150.png
165KB, 400x400px
>>58291159
fantastic post
>>
>>58291355
It could if someone would write and execute it correctly. This doesn't happen often though
>>
>>58291489
https://www.google.com/#q=bug-free+program+myth
>>
>>58291475
That's if humanity continues to have flaws.
If programs were developed by flawless human nature, then there wouldn't be.

Or you could get an AI to design the programs, but the AI would have its own bugs and flaws as a human would have to make the AI
>>
>>58291418
Would you say a piece of hardware is 'buggy' because it has a bit of a hiccup when the operator hammers it with a hammer?
No, you probably wouldn't. Likewise if your OS hammers your program with all kinds of garbage it's not that your program is buggy. It's the OS.
>>58291475
Is a single transistor buggy?
>>
>>58291499

Thank you.
>>
>>58291363
it can be jit

> Lua 5.3.3 Copyright (C) 1994-2016 Lua.org, PUC-Rio
>>
>>58289160
I want to enjoy my music and I hate SoundCloud

I'm working on a Jersey/JAX-RS (RESTful) Music Streaming web app. Authorization using Json Tokens. Fully written in JetBrains' Kotlin language. I love it, it's like (Java (without pain in the ass and null checking) + Scala).

I love it! I recommend Kotlin to any IntelliJ IDEA user
>>
>>58291520
>Is a single transistor buggy
Absolutely. It happens all the time. Transistors are not yes/no machines. They're actually analog when you look close enough.
>>
File: 1454868587096.jpg (10KB, 270x187px) Image search: [Google]
1454868587096.jpg
10KB, 270x187px
Is .NET Core a good thing to invest time into?
>>
>>58291520
If your program cannot withstand abuse, then it's buggy.
>>
>>58291369
Mate, any large enough program requires you to use a debugger at one point or another, even more so if you work in a team.
And it really isn't cryptic (at least compared to something like C). You even get the browser to highlight the exact line and capture/track values.

As for the time being made up. Maybe it is in group projects, where ya have 5+ guys all doing stuff on their own, but not so much on one programmer teams... I've certainly never run into big problems just letting my brain handle types on the fly, so I'd rather save the time I'd on the extra typing and working around the type system on something else.
>>
>>58290681
int *p = malloc(x * y * sizeof(int));
>>
>>58291559
>they're analog
Yes obviously. It's part of their 'design' and is how you can make amplifiers using transistors (though you generally don't because it's finicky).
How is that a bug? It's that you're applying a set of demands on the transistors that are wrong.
The transistor operates under the physical laws of the universe (lest we have a bug). The spec sheet for it may be improper and not have a performance curve with proper measurements or granularity but it operates as you'd expect when you know all the details.
I'd say it's not buggy.
>>58291598
OK. So you've defined that everything is buggy because there's ways of manipulating it to not do the expected thing.
Regardless of if expectations are correct or not.
>>
File: wvuEZ.png (61KB, 1048x661px)
wvuEZ.png
61KB, 1048x661px
>>58289160

> the program has an ncurses gui

that's how you know it's good

colorful and orthogonal
>>
File: 1461620795693.jpg (362KB, 900x1550px) Image search: [Google]
1461620795693.jpg
362KB, 900x1550px
>>58290767
>malloc
>syscall
>>
>>58291540
What are you talking about?

5.3.3 is not backwards compatible with 5.1

Furthermore if it was JIT then it would be something like:

>LuaJit 2.1.1 Copyright © 2005-2016 Mike Pall
>>
>>58291701
GNU is Not Unix retard
>>
>he needs parentheses to call a function
>>
>>58291716
> What are you talking about?

so you didn't try to run it with luajit?
>>
>>58291718
It doesn't matter you retard.
The plain fucking fact is that malloc is not a fucking syscall you nigger.

>$ man 2 malloc
>No manual entry for malloc in section 2

Now fuck off.
>>
>>58291683
If something is not perfect and can be made to fail, then ultimately it's buggy. A program/system requires input. If certain kinds of input crash the program, that's a bug.
>>
>>58290598
>Because back up plan is going with java. It sucks but at least it's not c++.
I am curious what is so hard to read in c++ you would rather punish yourself with java.
Is it easier to translate to C because it does not have operator overloads?
>>
>>58291787
Ni need to reiterate. You had made your stance clear.
>>
>>58291763
Oh, good idea, but I might not have comparable hardware, oh well, I'll try anyways.
>>
>>58291773
>man 2 malloc

Who said anything about UNIX?
>>
>>58291574
Yes it is. Despite everything said here .NET is one of the most beautifully thought language. Don't listen the Haskell neets who've never done anything in their life apart hating each others and hating people that actually improve the field of computer science in number of ways.

Please have as many kids as you can and absolutely do not kill yourself. You are meaningful.
>>
>>58291826
if they run and much faster then those faggots need to be notified too
>>
>>58291833
malloc is not a syscall on ANY operating system.
Linux was just an example.
>>
File: my-sides.gif (2MB, 400x398px)
my-sides.gif
2MB, 400x398px
>>58291833
>>
>>58291845
>.NET
>language
smug_anime_girl_321.jpg
>>
>>58291816
Well, just clarifying for myself then. :)

Source code text can be made 'bug-free' in that it's typed as well as it possibly can be, but the execution will always have flaws. "Hello World" seems simple, but it depends on many system calls.
>>
>>58291833
>>58291718
>>58290767
malloc is implemented using brk/sbrk, and sometimes mmap for larger allocations.
However a syscall is not needed every time malloc is used.
>>
>>58291856
>Linux was just an example.
But anon said UNIX not GNU/Linux, and GNU/Linux isn't UNIX and it has syscalls.
>>
New thread:

>>58291882
>>58291882
>>58291882
>>
>>58291872
Both brk and mmap are system calls tho
>>
>>58291872
>it uses two system calls instead of one

So it has 200% MORE system calls. Even slower.
>>
>>58291881
Linux may not be Unix but it is Unix compatible.
Besides, I never said a single fucking thing about how only Unix can have syscalls, you fucking retard.

Why don't you just admit already that you're wrong. Malloc is not a syscall on ANY system.

You. Are. WRONG. DEAL WITH IT.
>>
>>58291909
I know, I wasn't claiming that they weren't.
It's just that malloc is not a syscall.
>>
>>58291909
And neither "brk" or "mmap" are spelt "malloc".
malloc using those syscalls are just an implementation detail. malloc itself is not a syscall like you originally claimed.
>>
>>58291921
>Malloc is not a syscall on ANY system.
It is on Haiku so lol on you
>>
>>58291921
I've half a mind to fork linux and add malloc just to fuck you with you.
>>
>>58291936
>it's not a performance overhead because it's a different syscall
Kill you're self
>>
>>58291791
By my experience using c++ basically forces you to use only classes. Which is basically java. Then they implement reference counting with operator overloading so they don't need call delete or use some custom allocator which they delete once it's not needed. Maybe all the effort gives little performance boost but if I were to use c++ I would expect more because otherwise I don't really see any reason to use C++ or java, D might be good contender.

Using C++ would give more control but if the end game is basically same as java but with more hoops and loops, worst part is that C++ can't do so generic libraries that they would be uselful for others so they reimplement the wheel and force you to do so too. There is stl but if nobody else uses it then I don't thing I will either. Where as C gives me easy for other languages and I actually have implement the basic stuff myself because C standard library is shit or use some library which seems to actually be as hard as with C++.
>>
>>58291973
Then you'd basically be admitting you're wrong.
>>
>>58291982
Who said anything about performance overhead?
You claimed malloc is a syscall. malloc is not a syscall, so you are wrong.
>>
>>58292003
>Who said anything about performance overhead?
The original post you quoted, you dumb shit: >>58290767

>Congrats. You found a way to make C slower than PHP
>>
>>58292003
No he didn't. I did. I planted that bait and the thread is still shitting itself over it. What's even better is I'm pretty sure there are two separate people continuing the bait while I sit here and watch people argue with them.

It's like shooting autistic fish in a barrel.
>>
>>58291689
Alsamixer may be good, but ALSA itself is a fucking trainwreck.
>>
>>58292031
Does it look like we are arguing over that bit?
In that same post you quoted, it says:
>>running the malloc syscall this many times
Claiming that malloc is a syscall, which is plain wrong.
>>
>>58292045
>Damage control
Admit you're wrong and you know nothing about computers and fuck off.
>>
>>58291845
>.NET is one of the most beautifully thought language.
It's definitely not a language, 'beautifully thought' or not.
>>
Beginner programmer here. What language should I be using to eventually make bots for WoW.
>>
>>58292054
Alsa just werks.
Which is a nice change from Pulse.
>>
>>58292086
Either c or lua and autohotkey if that's still a thing..?
>>
>common utility functions, like MIN and ntohl, are defined in different places in MinGW
WHY FUCKING WHY
>>
>>58292063
>Does it look like we are arguing over that bit?
You literally asked "who said anything about performance", so yeah it looks like that fucking faggot. Stay triggered BY BEING WRONG AS FUCK

>Claiming that malloc is a syscall, which is plain wrong.
It is on Haiku, so yeah, looks like you're wrong and I won haha. Faggot.
>>
>>58292082
What damage am I actually controlling? Some autistic faggot on /g/ thinks some collection of posts belong to someone retarded? Oh Lordy me, how ever will I recover.
>>
>>58291984
classes are just structs with functions.
It shouldn't take you a long time to break a class apart.

Ex turn
class example {
example();
~example();
void t_func();
};
void example::t_func() {
//closer to c code
}

to
struct example {
example();
};
void delete_ex(example *ex){
//C way of cleaning up
}
void t_func();
void t_func() {
//closer to c code
}


Some things might take more effort, but you get the idea.
Most of C++ is to make it easier for the user of the library.
So you are basically undoing that.
You will probably find that you can reduce the code base, either by making it less general or by removing stuff that is C++ specific.
>>
I assembled and ran my first byte code program for my interpreter today. Currently it's register based but I'm considering moving it to stack based.

.types
void
u8
u16
u32
u64
string

.signatures
run = void(string)
m = void()

.u64
number_1 = 214
number_2 = 34

.native_code
runuvm_print_number : run

.code
main : m {
load r0 number_1
load r1 number_2
call r0 add_and_print
return r0
}
add_and_print : m {
add_64 r1
call r0 runuvm_print_number
return r0
}

.exports
main
>>
>>58293345
>posting in a dead thread
Thread posts: 339
Thread images: 26


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