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

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

Thread replies: 255
Thread images: 13
File: edsger-dijkstras-quotes-2.jpg (74 KB, 545x293) Image search: [Google]
edsger-dijkstras-quotes-2.jpg
74 KB, 545x293
Despite being wrong about goto (http://koblents.com/Ches/Links/Month-Mar-2013/20-Using-Goto-in-Linux-Kernel-Code/) he's a pretty cool guy

Old thread:
>>54562244
>>
File: 1463336093822.jpg (248 KB, 755x1341) Image search: [Google]
1463336093822.jpg
248 KB, 755x1341
>>
>leave out explicit checking for division by 0
>code fucks up in a one-off event
>intentionally divide by 0
>code works fucking fine
fuck me
>>
File: ll_smart_x64.png (19 KB, 600x371) Image search: [Google]
ll_smart_x64.png
19 KB, 600x371
Linked lists are obsolete
>>
>>54565859
Well no shit sherlock, only cs undergrads like like them.
>>
>>54565859
But muh O(1) inserts!
>>
>>54565871
The Linux kernel uses them
>>
File: fixed.jpg (229 KB, 755x1341) Image search: [Google]
fixed.jpg
229 KB, 755x1341
>>54565830
>>
>>54565859
you should use arrays in >99.9% of cases
>>
>>54565877
Why? Arrays are better in any way i can think of.
>>
>>54565876
Both have O(1) if you do amortized analysis
>>
>>54565877
Yes because memory (re)allocation and memory fragmentation is incredibly important in kernel code.

Use a Vector. If you really, really think you need a List, try both and profile.
>>
File: 1462764581474.jpg (377 KB, 576x804) Image search: [Google]
1462764581474.jpg
377 KB, 576x804
>>54565830
>C#
>>
>>54565898
Because Linux is a hobby project unlike enterprise quality kernels like WinNT and Apple XNU
>>
>>54565909
this, C# is fucking shit, only CRUD sub-110 IQ normie codemonkeys use it
>>
>>54565804
What did he mean by this?
>>
>>54565830
what is the logo for the top left one
>>
>>54565859
What is this even a measure of?
>>
I've prior experience with Basic. Now I work at a startup.
>>
>>54565947
Insert it seems.
>>
>>54565957
anybody can work at a startup, you can even make your own startup and work in it, its a startup!!!
>>
>>54565947
https://kjellkod.wordpress.com/2012/02/25/why-you-should-never-ever-ever-use-linked-list-in-your-code-again/
>>
>>54565909
>>54565938
The proprietary trading algorithims and platforms at my bank (big investment bank) are all written in C#.
>>
>>54565945
just lambda calculus, he's basically spouting bullshit
>>
>>54565985
Most banks still use COBOL and they do fine, what's your point?
>>
File: Einschaltmeldung_C64.jpg (11 KB, 386x272) Image search: [Google]
Einschaltmeldung_C64.jpg
11 KB, 386x272
>>54565804
Torvalds started out with BASIC

Pretty sure a fuckton of great programmers did, because things like >pic
>>
>>54565985
the typical bank is full of shitters, that kind of software should have minimal latency and should be written in C/C++
>>
>>54566001
>>54566010
The point is that the traders who maintain it are pretty much the pic
>>
File: programming powerlevels.jpg (473 KB, 1400x1341) Image search: [Google]
programming powerlevels.jpg
473 KB, 1400x1341
>>
>>54565985
Thanks for sharing :D
>>
>>54566182
shouldn't python be with php and java?
>>
Ok so what language and where to learn?

im thinking c would be cool but idk.

also why does everyone hate node.js (whatever that is)
>>
>>54566216
i think scientists use it for some reason, so that's why i left it in the nerd category. the only thing i moved was haskell. the rest i just gave a cursory overview to see it wasn't too out of place
>>
>>54566182
>haskell not being in same list as CL and rust
The fuckers are the same. Always about "muh industry ready."
>>
>>54566216
I moved python to the category with matlab because python is basically a language for scientists. While it's true that webdev types use python, its primary audience is scientists.
>>
>>54566234
Learn Scala, it's a great language.
>>
>>54566241
It has a series of numerical libraries that are useful for quickly analyzing data that you don't need to process on the fly.
>>
>>54566267
>>54566241
I guess i agree, in which case why split numpy?
>>
>>54566234
japanese

subbed anime streaming websites
>>
>>54565830
>.NET not pajeet tier
>>
>>54566010
The language you use to code trading software generally doesn't matter because the it's latency of the internet connection that matters the most.
>>
>>54565879
>>54566182
>Using "CLISP", the name of *an* implementation of Common Lisp (and not even the most popular one at that) to mean "Common Lisp"

of course it's the retarded memeautists doing this
>>
>>54566294
>this
korean is pretty nice as well and much easier to write.
>>
dat
boi
>>
>>54565804
The actual FUCK!. Why is "C" Pajeet tier?.
>>
>>54566338
Why is this shitty meme becoming popular?
>>
>>54566366
C, while hard to master, is very easy to learn.
>>
>>54566313
The clisp icon is more amusing and I'm not aware of a symbol for common lisp.

I think you just justified where I placed your types though.
>>
>>54566370
kys
>>
>>54566370
every site has the same userbase
>>
>>54566311
This is probably true

I wrote a web crawler in Python and CPU use was pretty much 5% at most on my T400
>>
>>54566392
Use a lambda, the symbol for the common lisp hyperspec or make your own symbol using iconic macros and functions

you fucktard
>>
>>54566395
>I LOVE CANCER!
>>>/reddit/
>>
>>54566389
In that case that's every programming language on the planet then.
>>
>>54566416
A plain lambda is already taken by Scheme bro. And Scheme is older than CL.

The clisp icon is still fun more fun than a lambda.
>>
>>54566444
Fine, then use one of the other things I suggested. Don't use CLisp, because it does NOT represent what common lisp stands for.

>waahhh waahhhh but it's more fun
Shut the fuck up you retard, programming isn't about fun. Programming in its purest form is a battle of the minds, a timeless, worldwide, unending competition to prove yourself to be better than everyone else. Fun is for little skiddies who program in python, so take it and shove it up your ass kid.
>>
>>54566444
Oh and PS: I am not your bro, nor am I black, so don't talk ebonics at me you skiddie.
>>
>>54566567
your neckbeard is showing
>>
File: common-lisper.jpg (26 KB, 367x500) Image search: [Google]
common-lisper.jpg
26 KB, 367x500
>>54566567
>>
>>54566605
Yeah, because having a neckbeard is sooooo uncool right guys?? Right??? hahahaha you sure showed me, "bro"!!! hahahahaha

I fucking hate you and I fucking hate all that people like you stand for. Programming used to be a field for us, for the outcasts, for the intelligent pariahs that had nowhere else to go. But no, you normiefucks had to invade our field, to destroy our culture and then try to push us out of the place we carved for ourselves on this Earth. Fuck you "bro", fuck you and fuck your stacy, I will not stand for your attempts to insult me for being ugly/whatever other characteristics you want to point out about me. You don't belong here, none of your kind do.
>>
>>54566370
it's fucking hilarious, stupid sperg
>>
>>54566746
>Hahahaha! It's SOOOOO random! Just like me!
>>
>>54566781
kys
>>
File: logoUebersicht.jpg (48 KB, 430x305) Image search: [Google]
logoUebersicht.jpg
48 KB, 430x305
>>54566444
This lizard is in some of the sites dedicated for common lisp and pages for common lisp libraries.
Also there is the lisp alien but that's way more rare.
>>
>>54566800
no
>>
where does the science come in when someone says 'computer science', it can't be just programming?
>>
>>54566665
you've got to be false flagging common lispers.
>>
>>54566781
kys
>>
>>54566665
Is this a new pasta?
>>
>>54566807
I saw that but didn't go with it because a schemer is equally justified in using it.
>>
>>54566841
because computer science has aspects of it that aren't programming
>>
>>54566841
there's theories and proofs and shit
>>
>>54566800
>>54566849
You both sure are triggered, did I hit a little too close to home?
>>
>>54566881
you're the one that's triggered by the simple words "dat boi"
>>
>>54566879
>>54566880
So if you programmed a light switch you could say that is computer science?
>>
>>54566911
no, unless perhaps you programmed it in a fascinating new way to transmit information efficiently or something like that
>>
>>54566843
Whatever, the guy I was arguing with shut the fuck up so it doesn't matter anymore

>>54566858
No, it's not a pasta. I wrote it myself.
>>
>>54566911
it depends on whether you're a university or someone with common sense. A university would say yes and someone would say no, a computer scientist isn't a technician.
>>
>>54566908
It was made on fucking tumblr, it should be rejected on sight.
>>
>>54566941
is he a typist then?
>>
>>54565879
Pajeet likes Javashit too, retard.
>>
>>54566930
Lol I am the one you were yelling at for daring using CLISP as a symbol for common lispers.

Since you hate it so much, what's your favorite CL implementation?
>>
>>54566952
Nah he's a programmer.
>>
>>54566963
Steelbanks
>>
>>54566952
if i kick a soccer ball, am i a soccer player?
>>
>>54567072
by retarded /dpt/ logic, yes
>>
dat boi BTFO
>>
>>54567187
kys
>>
What's so bad about basic? I mean, what is it about basic that's supposed to be so damaging to people who are learning to program? Is it mainly the goto thing or are there other things too?
>>
hey /dpt/, what is better for a first language: C or Python?
>>
>>54567256
python, because simple programs are like pseudo code
>>
>>54567256
both are fucking cancerous

what is with your murritards, why do you have to go in either extreme, pick a sensible middle ground like java or C++
>>
File: 1455495419795.jpg (29 KB, 238x241) Image search: [Google]
1455495419795.jpg
29 KB, 238x241
>>54567274
>Java
>sensible middle ground
>>
>>54567299
kys
>>
>>54567256
/g/ will surely disagree but Python, while not perfect, is better for a first approach since it holds your hand and lets you discover all algorithms and systems, whereas with C you'll just be lost in segfaults.
>>
>>54567274
Is there any real advantage of using Java? Only one I can think of is only having to compile once and not having to compile multiple versions per operating system.
>>
>>54567309
>C
>lost in segfaults

kys
>>
python hardly teaches you anything, most shitters even ignore the OOP because the OOP in python is INSANELY shit, all you learn after months and months is basic control flow and how to use simple functions

>>54567317
java is orders of magnitude faster than python while being fast to write, is statically typed and is simple to learn and understand. it's very similar to C++, it's a great preparation for learning C++.
>>
>>54567317
>having to compile once
not true, java programs must be compiled every time they are run
>>
File: bglisp.jpg (42 KB, 500x225) Image search: [Google]
bglisp.jpg
42 KB, 500x225
>>54565804
>>
>>54567364
>java
>fast to write

no, just no
>>
>>54567364
Except python has a repl and Java doesn't. Python is a way better choice for a noob because they can experiment in the repl. Static typing doesn't matter as long as the language is strongly typed.

>>54567256
Scheme
>>
>>54567378
they're compiled once to byte code and then interpreted + JIT compiled (or AOT compiled like with android runtime)
>>
>>54567402
>what is an IDE
kys

>>54567406
>repl
kys
>Static typing doesn't matter
fuck off kid, especially for a beginner they need to learn basic things like fucking types MCFUCKING KILLYOURSELF
>>
Can someone post that programming project roulette?
>>
Guys, is the Write Once Run Anywhere of Java legit? Will I only have to write it once?
>>
>>54567426
>IDE
Ayy lmao.
>>
>>54567426
>he thinks types only exist in static typing
>he thinks repls aren't wonderful, esp for beginners
kys
>>
>>54567426
it's still a verbose language, and if you want to structure it idiomatically it won't be fast to write at all

so boi, take dat kys and kys
>>
>>54567446
you're fucking pathetic, have fun with your shitty python and your shitty linux lmfao off yourself
>>
>>54566182
Matlab and R are taught in lots of (applied) math/stats programs. Nerds are not only computer nerds
>>
>>54567433
yes, it's the most portable language
>>
hey guys you're always talking about programming languages but you never talk about ocaml

let's talk about ocaml
>>
>>54567499
math/stats nerds are even worse nerds than computer nerds
>>
>>54567499
That's the point. Matlab, R, and Python are scientist nerd languages.
>>
Having a high IQ comes with it's pros and cons. For instance, i do perfectly fine while only half paying attention to what I'm doing in C#, but when it comes to religion i can't even begin to understand how anyone would believe a damned thing
>>
>>54567527
>python
and babby's first minecraft mod and "let's pretend to be a programmer" language
>>
>>54567446
You must be a NEET.
>>
>>54567551
Since when is there python modding for minecraft?

>>54567556
Lots of devs at microsoft don't' use ides. it's more common in the kernel team though.
>>
>>54567499
that's the point
>>
>>54567245
http://programmingisterrible.com/post/40132515169/dijkstra-basic
>>
Java is a completely worthless language not worth learning.
>>
Why isn't there a cross-platform audio driver that's compatible with DOS?
>>
>>54567619
ok dylan
>>
>>54567631
Why should anyone bother learning Java?
>>
I'm trying to figure out the Soundcloud website and write a userscript that interacts with it. Of course it's a webpack minified mess.

I found the object that I want to call through the debugger, it has events attached to it, but I can't just trigger that event and make it work. Is there a way I can extract or find this one object (maybe recursively search all window objects (RIP CPU)) and use it? If that makes any sense
>>
>>54567639
meme harder
>>
>>54567651
You haven't given me a single valid reason why anyone should learn Java
>>
>>54567693
just learn your python or your C lmfao
>>
>>54567710
You really don't have an answer, do you?
>>
>>54567736
see >>54567364 and fuck off i don't have to pamper your millennial babby ass, i don't give a shit what you do, the joke's on you
>>
What languages (that people actually use) allow you to make custom operators? I know perl and swift do, but that's it
>>
>>54567785
C++
C# (blegh)
>>
How close is Java and C?
>>
>>54567785
What the fuck is a custom operator and how is it distinct from a function?

If you mean infix function then I know haskell does but that requires using a horrible language.
>>
>>54567804
they're relatively close but they have some clear differences, java is closer to C++
>>
>>54567827
Is C++ more useful these days than C?
>>
>>54567862
absolutely, C is pretty much only useful for the most micro-managed stuff like operating systems, drivers, low-end embedded applications
>>
>>54567888
Then why do people still write programs and libraries in C?
>>
I'm feeling dumb right now does this make sense?
    ShaderBuffer=new char[FileSize32];
memset(ShaderBuffer,0,FileSize32*sizeof(char)+1); //+1 here?

Why would I need the +1? The issue I was having the uninitialized memory just fuck me over before (because the c-string had to be null terminated and windows ReadFile() doesn't do that).

Also why didn't the GLSL compiler complain at me? It didn't cause an error to just have garbage at the end but it didn't render my triangle.
>>
>>54567862
No. C++ does basically fuckall well. There's almost always a better tool for the job.

>>54567917
C++ is super unportable. Name mangling was a mistake.
>>
>>54567862
Depends on what you're doing, but generally C is fine for almost anything.

>>54567917
Because hating on C is a meme.
>>
>>54567808
sum(a, b) adds a and b with a function

a + b adds a and b with an operator

>>54567799
damn, I really need to learn C++. It is nowhere near as easy as C
>>
>>54565830
>C
>Pajeet
Do you even know what you're talking about?
>>
>>54567862
No. C++ is awful, and shouldn't be used in any circumstance.

>>54567917
C++'s unstable ABI makes it completely unviable for writing libraries.
>>
C is genuinely shit, doesn't even have user-defined namespaces

come on, it's 2016
>>
>>54567959
I already explained that shit to you like 2 threads ago. Stop being a retard.
>>
>>54567968
you're the retard
>>
File: 1438222854593.jpg (893 KB, 4500x4334) Image search: [Google]
1438222854593.jpg
893 KB, 4500x4334
http://www.infoworld.com/article/3068669/application-development/scala-language-moves-closer-to-bare-metal.html
>>
>>54567917
C is more portable.
Any gains you'd have from writing C++ is minor.

That said I don't constrain myself because I don't care that much about the portability difference.
>>
what's wrong with learning basic to start with? It's not that different from, say, javascript
>>
>>54567978
scala is bad and you should feel bad
>>
>>54567988
>>54567988
Nothing, dickstraw just sounds a little salty about something
>>
>>54567799
It appears C++ doesn't have custom operators, just overloaded ones
>>
>>54567959
Serious question: when is a user defined namespace a. useful; b. necessary?
>>
>>54567988
javascript is like the second worst language in existence
>>
>>54567937
That's just an infix function. They save on parentheses I guess but parentheses are my symbols of power.

And don't bother with C++. First, he's incorrect about being able to define infix shit: you can only overwrite it. Second C++ is horrible overdesign by committee bikeshedded ass.
>>
>>54568024
what's the difference, what are you asking for
>>
>>54567983
Is it as portable as Java?
>>
>>54568082
MUCH more portable than Java.
>>
>>54568082
More.
>>
>>54568095
Yeah but is it more portable than this?
*pulls dick out of pants*
>>
>>54568066
C++ you only get to choose from a finite number of infix names, and they're all shit like + ! << >> -> but not things like <> or R.
>>
>>54568095
>>54568109
AHAHAHAHAHAAHAHAHHA ohh god this is what c drones actually think
>>
>>54568095
>>54568109
I just want to compile it and not have to have 3+ operating systems installed to get it on more than one platform. Should I really pick C over Java?
>>
>>54568125
Just use whatever you want to use and stop listening to memers.
>>
>>54568123
>Java is implemented in C++
>C is inherently more portable than C++
Can Java run on 36-bit computers?
>>
>>54568042
I don't just want infix, I want prefix, postfix and circumfix like perl has

>>54568066
overloading only uses existing operators for new purposes. I want to be able to create my own operators to save time

for example, say I want to replace
string1.find(string2) != -1
with
string2 in string1
>>
>>54568125
>I just want to compile it and not have to have 3+ operating systems installed to get it on more than one platform.
Cross compile.

But yeah if you really can't be bothered to cross compile. Go with Java. People need to install the Java VM though. A lot of people have it. Not everyone though.

If you don't care about the user experience do whatever.

For libraries you don't have to worry.
>>54568123
It's just a fact.
>>
what book should I read for beginner c++?
>>
>>54568142
Let's say I'm Linux and making a C program. Can I compile the windows and OS X version in linux or will I have to install the OS just to compile and test it?
>>
>>54565830
>SJW-tier doesn't have Rust or Go
>>
>>54568095
no it's not you fucking dumbfuck, java is literally write once run everywhere, C you have to use defines for different platforms and write platform-specific code and shit
>>
>>54568156
I have never ever seen a language with prefix postfix, infix and circumfix before. Perl is weird. I think if you want that just stick to perl.
>>
>>54568171
With C code, you will need to compile it for each operating system to test it.
WIth Java code, you can compile on any OS.
>>
>>54568150
Nobody cares how many computers your trivial program that has 0 dependencies will compile on. Jesus christ. Now, give that program a GUI, and have it compile and run on any modern OS, without using #ifdef, then we'll talk, faggot.
>>
>>54568178
A fully compliant C program will run and execute correctly on any C implementation.
Sure, you can write non-portable C, but fully compliant C is much more portable than the Coffee meme.
>>
>>54568095
C is more portable between architectures, but not between operating systems.
>>
bjarne stroustop is a neat guy.
>>
>>54568178
not what portable means

portable -> runs on many different platforms

c runs on any computer that can run assembly
java runs on any computer with its proprietary JVM installed, has supported hardware and OS, and can run assembly

which of those groups is the larger one?
>>
>>54568201
>>54568211
fucking retards

i'm talking about dependencies like >>54568198 pointed out, for example on android you have opensl es and on iOS you have some other cancer
>>
>>54568222
>Redefining 'portability' to fit your shitty argument
Idiot.
>>
>>54568195
swift has prefix, postfix and interfix but not circumfix. I can still use that for a lot of other stuff like complex numbers and regex. I'll just start regex strings with r and end complex numbers with i
>>
>>54568178
>C you have to use defines for different platforms and write platform-specific code and shit
Yeah if you decide to work outside the C standard library, your own code has platform specific behavior or you use platform independent libraries.
Is more portable because it runs on more platforms with less hassle. Especially for the end user.
>>
>>54568201
I think even the biggest moron is aware that, if you reinvent every single wheel with your program (threading, GUI, hash table, sorting algorithms) it will compile everywhere. But nobody in their right mind is going to do that, because it's retarded.
>>
>>54568210
I'd inherit his private members and push_back into his std::vector if you catch my drift.
>>
>>54568209
java can run on different architectures too, and is more consistent, the only architecture-specific thing is that floats can be more accurate, but you can use strictfp if you want conistent results across all archs and platforms
>>
>>54568235
>independent libraries
Meant platform dependent libraries obviously.
>>
Guys, hlep.

I'm using a LUA imaging library called IM, and I can't figure out how to get the color depth/bit depth of the image.

http://webserver2.tecgraf.puc-rio.br/im/en/doxygen/struct__imImage.html

int _imImage::depth returns the number of planes

Either I'm retarded or the documentation is ass.
>>
>>54568235
C is not less hassle at all, the user just needs to have the JRE installed and he can run any java program
>>
Does anyone have any experience with DOS audio prgramming? Basically I want to be able to play raw audio in DOS, and there doesn't seem to be an all-encompassing solution for all of the audio cards.
>>
>>54565830
sorry i only program in cobol, algol, prolog and asm. where does that put me?
>>
>>54567541
>le educated and enlightened gentleman
>>
>>54568261
>C is not less hassle at all, the user just needs to have the JRE installed and he can run any java program
The user needs nothing installed to run C programs if your goal was good portability. You can just have a 10GB exe for an AAA game if you wanted to. It's as portable as moving the EXE.

Java needs the VM. That makes it less portable. Any of the millions of computers that doesn't have the VM can't run the program.

Usually C programs come with dll's at worst when compiled.
>>
java is literally write once, run everywhere

you can't say that for C

even by your spergtastic definition of "portable", whatever it is, java is not any less portable than C
>>
>>54567541
This post gave me eurphoria
>>
>>54567541
Do you post this every day?
>>
>>54568298
you can AOT compile java if you wanted to, but it's not necessary at all, your argument is contrived
>>
>>54568300
More like write once and debug everywhere
>>
>>54568268
Literally why
>>
>>54568326
found the incompetent code monkey
>>
>>54568338
>Javafag
>Trying to call someone else a code monkey
>>
>>54568324
>you can AOT compile java if you wanted to
Yes sure, go ahead and try that just once and see how easy it is to compile a C program for every platform by comparison.
Also >>54568326

And note how you can't just take your Java app to Android for instance. Just try moving your java application around a little and you will see how it shrivels and dies.

I don't even know who should be writing Java honestly. If you want GC there's way better languages.
>>
http://stackoverflow.com/questions/3925947/what-is-portability-how-is-java-more-portable-than-other-languages
http://www.javaworld.com/article/2076944/java-s-three-types-of-portability.html

fucking spergs, you're just pointlessly nitpicking about what you feel is the "one true definition" of the word portable, fucking kill yourselves
>>
>>54568367
yeah and take your C program to android, see how that goes

fucking retard
>>
>>54568333
Just for fun, really. I found this. It details Sound Blaster programming in DOS.
http://www.ragestorm.net/tutorial?id=26
Is Sound Blaster the standard for DOS audio programming?
>>
In the previous thread someone recomended that I read Linux Kernel Development by Love but it seems the book lacks example, practical uses, challenges etc. What should I read, if I need something with more practical usage?
>>
>https://www.youtube.com/watch?v=tK50z_gUpZI
>Two fun dudes with industry experience talking about how amazing portability is.
>>54568372
>bias answers
>>54568386
>fucking retard
Yeah I just compile it for android. I have a C++ compiler on my phone right now. Give me some code and I'l run it for you.
>>
>>54568395
I believe whatever sound card was king during DOS' reign would be the "standard". In other words, likely, yes.
>>
>>54568410
kill yourself retard, if you just have some trivial CLI shit it would work the same in java, FUCKING RETARD
>>
>>54568367
Is it difficult to cross compile multiple OS versions of a C program in one OS?
>>
>>54568261
>all, the user just needs to have the JRE installed and he can run any java program

Great! Can I run java programs on a Ralink 5350 MIPS chip with 12MiB of memory and 8MiB of disk?

What do you mean the JRE wouldn't even fit in storage? What do you mean the JRE wouldn't even fit in memory? What do you mean there's no JRE for MIPSEL architecture processors?

Good thing I still have a complete C standard library that's only 270K.
>>
>>54568431
die
>>
>>54568417
Thanks.
>>
fucking delusional Ctards, you're fucking terrible programs, i bet you've never made any non-trivial program, just fizzbuzz-tier CLI linux neckbeard shit in your """"text editors"""" that you spent hours and hours customizing to mimic IDEs
>>
>>54568422
Not particularly. But there's certainly issues to attend to.
https://www.youtube.com/watch?v=tlYn2kN0g8c
>>54568419
>>54568481
>Keeps yelling at me like a child
Are you that autist who yelled at me over pointing out that I didn't want a truncation when I asked for details on a flooring method (some IEEE spec thing)?
I swear you seem incredibly similar and just as retarded.
>>
>>54568489
you're pathetic, you're pure trash
>>
in C do you cast malloc?

should i write code A or B?

code A
int **matrix;
matrix = (int **)malloc(n * sizeof(int*));

for (i = 0 ; i < n ; i++) {
matrix[i] = (int *)malloc (m * sizeof(int));
}


code B

int **matrix;
matrix = malloc(n * sizeof(int*));

for (i = 0 ; i < n ; i++) {
matrix[i] = malloc (m * sizeof(int));
}

>>
>>54568442
>I got told
>>
>>54568507
Always cast malloc, ignore the trolls who say not to. It's more clear and portable.
>>
>>54568507
only if you want C++ compatibility

>>54568514
stay delusional, tard
>>
>>54568489
so If I want easy cross-compile, I should stick wtih java?
>>
>>54568506
t. autism
>>
>>54568507
>in C do you cast malloc?
No. There is literally no reason to, and doing so unnecessarily repeats information anyway.
>should i write code A or B?
Neither.
int *matrix = malloc(sizeof *matrix * n * m);
>>
>>54568528
Not sure if trolling or...
>>
>>54568519
>cast
>more portable
m8...
>>
>>54568528
yes, java is LITERALLY write once, run everywhere, if it works on your machine it works on everyone's machines (assuming you don't have race conditions in multi-threaded code, but the same caveat applies to any other language)
>>
>>54568537
I'm just asking, which is easier for cross-compile: Java or C?
>>
>>54568298
>The user needs nothing installed to run C programs
They need to have libc installed.
>>
>>54568507
>should i
do whatever you want, it's not like anyone will ever see your code
>>
>>54568556
java

with C you always run into platform-specific bullshit for any non-trivial program
>>
>>54568524
>only if you want C++ compatibility
That's a pointless thing to try and do. C and C++ have diverged massively, and there are shitloads of semantic differences between them.

>>54568563
>libc installed
libc can be statically linked.
>>
>>54568549
>>54568568
I keep hearing about how programs act differently on a different OS based on what Java VM they're using.
>>
>>54568556
java, because you always "cross-compile" in java
>>
>>54568549
>LITERALLY
>everywhere
webcuck confirmed
>>
>>54568528
>so If I want easy cross-compile, I should stick wtih java?
If you want to ignore cross compiling and require users to install the Java VM before they run your program. Yeah, sure, go with Java.

But you will probably tear your hair out at some point. The bald with beard look isn't too bad though.
Just look at the agitation for this fellow here. >>54568549
Post hair please.
>>54568563
If you use the C standard library and/or don't remove it from your build. Can also be statically linked.
>>54568536
Correct.
>>
>>54568563
but it's pre-installed in his babby neckbeard linux distro
>>
>>54568566
(You)
>>
>>54568569
>>54568583
>statically linked libc
Yeah I guess you're right, didn't think about that.
>>
>>54568536
upvoted
>>
>>54568583
Is having to install the Java VM a bad thing?
>>
>>54568570
the only difference would be in floating point calculations, they can be more accurate on x86 because they use 80-bit registers. use strictfp if you want them to act exactly the same.
>>
>>54568604
are you offended?
>>
>>54568621
no, most users (except for some linux neckbeards maybe) already have it installed
>>
>>54568621
Try installing it on the iPhone.
>>
>>54568638
I don't care about mobile stuff
>>
>>54568269
oh, and malbolge of course
>>
File: 1461226306431.gif (48 KB, 2034x1491) Image search: [Google]
1461226306431.gif
48 KB, 2034x1491
>>54568638
https://robovm.com/
>>
>>54568636
>most
Did you forget to take your medicine today?
>>
>>54568621
Ignoring tons of stuff.
No. But I'd much prefer to just download and run your program rather than download, see that i need to run your installer to install the program, wait for a few minutes (don't quite know how long it takes). The Java VM doesn't ship with windows though.

So honestly if you're a major dev at some point you'd really prefer not to have it. Because grandma isn't gonna go and install the VM. I haven't checked, hopefully there's silent installs.
>>54568638
Nice.
>>
>>54568656
>I don't know what a JVM is
you should stay with your css
>>
will ai ever be smart enough to install gentoo fellow gentoomens
>>
Is Swift actually taking off, or is it still iOS-only
>>
.cxx > .cpp > .cp >> .cc
>>
>>54568659
>i'm a linux neckbeard, therefore all people are linux neckbeards
https://en.wikipedia.org/wiki/Asperger_syndrome
>>
>>54568686
What is .cxx?
Thread replies: 255
Thread images: 13

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

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.