[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: 353
Thread images: 22

File: 7daysinpaint.png (212KB, 300x400px) Image search: [Google]
7daysinpaint.png
212KB, 300x400px
Glorious old thread >>61325401

What are you working on, /g/?
>>
Idris is a reasonable language
>>
I love ruby
>>
JavaScript
>>
File: tildeath.png (61KB, 500x346px) Image search: [Google]
tildeath.png
61KB, 500x346px
>>61330032

It's ~ATH (pronounced "til death"), a made-up language from the webcomic Homestuck. It looks like pic related.
>>
reposting to demand answers
>>61329945 #
>~ATH(you)
>>61329994 #
>~ath(this)
what fucking sepples-ass shitlang is this
>>
elixir
>>
>>61330066
oh
thank
>>
Code is at: >>61329694

When I move I scan the tiles along the X and Y axis individually, and then offset in case of collision. I added ramps, they do work. But, if there are solid tiles near it, then some weird stuff happens. I think I can solve the issue if I purely ignore solid tiles if I am currently on a ramp. Because tiles go from left to right and up to down, my problem is what i've tried to implement only works in one direction and not the other. Any ideas?
>>
>>61330066
R-Ruby Senpai, why are languages not Turing Complete in practice?
>>
File: govnocode.webm (924KB, 600x336px) Image search: [Google]
govnocode.webm
924KB, 600x336px
>>
>>61330109
Java is Turing-complete.
>>
>>61330109
Turing completeness requires infinite memory, nothing is turing complete lmao, its a hypothetical model

>>61330130
WRONG
>>
>>61330066
r-ruby senpai... how do i learn lisp?
>>
>>61330130
How do you write a garbage collector for a Turing machine?
>>
>>61330041

Local variables need not be located on the stack (they can be in registers), and depending on the architecture, loading a variable from memory can also perform arithmetic in the same instruction.

>>61330109

A turing machine has infinite tape. No computer has infinite memory. Programming languages are designed to make programs that run on computers, and not on hypothetical machines that might not even be possible. There is a limit to how far we can see in the universe. Beyond this point, space is expanding faster than light is traveling, so we can't really tell if there's nothing there, or if there is something there, but we'd never know. It is possible that the universe is infinite, and thus a real turing machine is possible (although constructing it would be an engineering miracle). It is also possible that the universe is finite, and as such, no turing machine is possible. A cluster of super efficient finite-tape turing-like machines is as good as any. Because let's be honest: while plenty of useful programs require infinite time, how many require infinite space?
>>
>>61330066
Is there a standards document for or guide to this language?
If not, can I write one?
Also, how come in the webcomic we saw a bunch of ~ATH but never any ^CAKE? Supposedly the latter is good for game development. Also wasn't SBURB written in it
>>
>>61330180
>Beyond this point, space is expanding faster than light is traveling, so we can't really tell if there's nothing there, or if there is something there, but we'd never know.
Not how the edge of the observable universe works, I'm fairly certain.
>>
For someone wanting to get into programming, what language is good to start with? It's getting to the point that it's overwhelming with all the different languages there are. Also, any learning resources you guys would recommend to total noob?
>>
>>61330159
You don't, why would you ever need to reclaim memory during program execution, or at all for that matter, if your computer is a Turing machine
>>
>>61330226
Scheme
>>
>>61330180
If space is expanding faster than light is traveling, and time can only propagate as fast as light, then wouldn't there be nothing there relative to us?
>>
>>61330239
A Turing machine uses tape memory, so you have to take seek time into account. In some cases the overhead of garbage collection might be less than the seek time to the nearest memory block of sufficient size.
>>
>>61330213

Well, astronomy isn't my specialty. That's just how I'm interpreting what I've read thus far. If someone can explain it better, feel free to do so.

>>61330207

>Is there a standards document for or guide to this language?
Not to my knowledge.

>If not, can I write one?
Is your name Andrew Hussie?

>Also, how come in the webcomic we saw a bunch of ~ATH but never any ^CAKE? Supposedly the latter is good for game development. Also wasn't SBURB written in it
The comic was long enough as is. I'm certain that there are plenty of things Hussie could have went more in depth on.
>>
>>61330151

To learn any programming language:

1. Find a tutorial online or some book to learn the syntax.
2. Read some open source programs written in this language to get an idea of how programs in it should be written.
3. Write programs in this language until you consider yourself reasonably proficient in it.
>>
>>61330241
Is scheme a scripting language? I don't think I've ever heard of it at all.
>>
>>61330366
Define scripting language, anon.
>>
>>61330265
The idea is that every bit of space is expanding at a certain rate, the cosmological constant, so the expansion of distance between two points is c * distance.

>>61330213
He's actually right. We estimate the age of the universe by the inverse of the cosmological constant.
>>
>>61330366
Scheme is like Lisp, but simpler and more purely functional, and you don't have to distinguish between functions and function values, because funcall and #' are both always implicit.
>>
>>61330390
I don't know, similar to Ruby, Perl, and Python I guess? Like I said I'm a total noob.
>>
>>61330434
Some Scheme implementations can be run as an interpreter, if that's what you're getting at.
>>
>>61330366
Almost every dialect of scheme can be run as a script, but it's not really used like python or bash are. It's best lisp.

It's wonderful. You can do beautiful things.

To the rest of the thread, prove you're not a brainlet by telling me this code's output:
(use srfi-1 amb amb-extras)
(let ((deck (map (lambda (x) (amb #t #f)) (make-list 52))))
(required (= 13 (count-member #t deck eq?)))
(let ((hand (map not (take deck 13)))
(table (drop deck 13)))
(required (not (= (count-member #t hand eq?) (count-member #t table eq?))))
(print "You aren't a brainlet.")))
>>
>>61330434
You mean interpreted, not scripting.
>>
File: verbose_old_fashioned.png (167KB, 654x625px) Image search: [Google]
verbose_old_fashioned.png
167KB, 654x625px
Which languages are slow and old fashioned?
>>
File: go_is_trash.png (9KB, 230x173px) Image search: [Google]
go_is_trash.png
9KB, 230x173px
>>61330463
>>
>>61330456
Okay, interpreted then. Is Scheme something that has good documentation or learning resources freely available online?
>>
>>61330489
SICP
>>
>>61330489
https://mitpress.mit.edu/sicp/
>>
>>61330119

>Any idea how size_t is defined in C90 implementations for 64-bit Windows? Long is 32 bits, there's no long long in C90, so what would they typedef size_t to?
__int64. You shouldn't use C90 though. Decent C11 compilers exist for Windows. If you need to use Visual Studio, there's an extension for it to use Clang instead of CL. Even if you are targetting embedded devices, GCC, Clang, and the Small Device C Compiler (SDCC) all support C11.

>With C it's iffy, since pointers do need to have some defined size, and an infinite-memory machine would need to have infinite sized pointers, which wouldn't really work.
It wouldn't be pragmatic, but it could be made to work.

>>61330489

Scheme has many different implementations, each with their own documentation. But yes, it is easy to learn given the resources freely available online.
>>
>>61330463
https://nogenerics.info/
>>
>>61330472
>Cherry picking to defend your autism language
>>
>>61330520
>It wouldn't be pragmatic, but it could be made to work.
I think the only way it would work is with bignums, though it would make sizeof(void *) undefined. It couldn't be fixed-size pointers since they'd be of infinite size, in which case a single pointer would take up the entire address space.
>>
>>61330541
A "systems"-oriented language should be crushing Haskell in every benchmark.
>>
File: inputoutput.png (7KB, 289x377px) Image search: [Google]
inputoutput.png
7KB, 289x377px
i need help figuring out how to get this java maze program to work, its supposed to take in information from a text file, and then recursively determine if the maze is solvable, and my ide isnt providing any solutions https://pastebin.com/NKc9NENQ
>>
>>61330544
I'm not sure if sizeof(void*) would be undefined.

Turing machines I think only need an unbound amount of memory, not an infinite amount of memory.

In our magical C compiler, sizeof(void) would be resolved at compile time to what the program needs based on its length, which is finite, but unbounded.
>>
>>61330344
he got carried away with the timelines thing and the pandering to his fandom, he fucked up.

It could have been his magnum opus, but it wasnt.
>>
>>61330553
>moving goalposts
>>
>>61330579
Hes not wrong though.
>>
>>61330579
No. I never said Go was slow because it loses to Haskell in one benchmark.
>>
>>61330489
Why the fuck would you want to learn Scheme? It's a dead language. Even COBOL would be a better language to learn.
>>
>>61330226
C. Look into CS50 on edx
>>
>>61330567
recursion is for brainlets
>>
>>61330344
I see, no problem. I just read about it for a hobby, but my understanding is as follows:

At the Hubble length, objects recede at the speed of light, but this is within the observable universe
Past it, objects continue to recede at even faster "speeds" which aren't actually the result of faster than light travel, but rather that much space expanding per second between here and that object (which is why it's physically valid)
We can observe some of these objects because they were inside the Hubble length when the photon was originally emitted
The observable universe consists simply of the radius of distance where light has arrived to us
Even if the universe is infinite, assuming expansion continues, objects past the Hubble length can never be reached, so a universe Turing machine would have a finite amount of objects to work with
>>
>>61330567
build a graph and use a bfs to find the solution node.
>>
>>61330489
Just going to be kind and spoonfeed you: SICP is a /g/ meme. Don't waste your time trying to read it. Learn a language that is actually useful, not a dead one like Scheme.
>>
>>61330613
What would you recommend then? For someone who's never done any programming?
>>
>>61330650
C#, Java, or Python
or JavaScript if you're interested in web development
>>
>>61330650
>>61330666
Haskell is another /dpt/ meme. It's a dead language.
https://www.tiobe.com/tiobe-index/
>>
>>61330628
Yeah you're spot on.

t. minor in physics.

>>61330613
>>61330648
don't samefag. also it wouldn't matter if scheme was a dead language because it has ffi to c and is highly flexible.

>>61330650
C or Scheme. Haskell is abstract algebra masturbation. Java is acceptable.
>>
>>61330650
Listen to >>61330664 if you're looking for a career.
>>
>>61330650
learn C, then read Introduction to OOP Patterns and then learn Java.

Read some algo books, build something, then learn all the shitty webshit and memelanguages you want.
>>
>>61330694
>C
Dying.
>Scheme
Dead.
>Haskell
Dead.
>>
>>61330711
>C
>dying
keep telling yourself that, brainlet
>>
>>61330711
Tell me anon where did the continuation touch you?
>>
>>61330650
>>61330710
This is pretty good advice, I'd say C# over Java unless you're gonna try to go find a programming job ASAP
>>
>>61330650
For your own sake, do not listen to the retards telling you to learn C. It is NOT useful outside of low-level development on kernels, drivers and embedded systems. Learning it as your first language would be stupid. Learn Java. It's portable (runs on everything) and it's easy as fuck to find anything you wish to know about it online. Plus it's what most Android apps are written in if you're interested in that.
Oh, and it's the most popular language at the moment, so it's easy to make a career out of it.
>>
>>61330628

Yeah, but what if we had some sort of wormhole to reach those objects?
>>
>>61330720
Unable to read graphs, pajeet?
>>
>>61330628
Also, if the universe expands too fast, it's possible for a photon to never reach Earth even if it was originally emitted within the Hubble length.

>>61330694
Awesome, makes me feel like I wasn't wasting my time.

>>61330711
Sometimes I feel depressed when I look at the statistics for some languages
>>
>>61330650
C# if you're on Windows, Java if you're on anything else
>>
>>61330758
Nothing anytime soon, I'm currently in the navy, and got about 4 more years before I get out, I want skills more marketable than chipping paint and repainting.
>>
>>61330768
i'll read it as soon as you give your sources on those (((ratings)))
>>
>>61330789
https://www.tiobe.com/tiobe-index/ brainlet
>>
>>61330711
It doesn't matter that C is dying, if true, because it means the people left over will be competent. It's like Torvalds says in regards to C vs C++: he'd rather use C just for the fact it excludes C++ retards from contributing. The same applies to a "dead language".
>>
>>61330785
If you want a marketable skill, don't learn C. Scheme or Haskell. That is probably the worst thing you could do.
>>
>>61330795
>It is important to note that the TIOBE index is not about the best programming language or the language in which most lines of code have been written.

so, it's literally nothing then?
>>
>>61330803
https://en.wikipedia.org/wiki/Dunning–Kruger_effect
>>
>>61330759
C is #2, is portable (runs on everything) and easy as fuck to find anything you want to know about online (because it's #2).

And I'm not sure if you knew this, but like, there's like, libraries for application development for C. And, most languages end up using that C code thinly wrapped and it feels clunky and awful calling them.
>>
>>61330818
Are you retarded? It measures programming language popularity. C will drop out of the top 10 soon. Why? Because it's no longer needed. It's D E P R E C A T E D. Fucking dead. C. Has been. Replaced. Get it through your thick skull.
>>
>>61330766
That stuff's too complicated for me. But it's probably impossible in the real world since pretty much any form of FTL travel involves violating causality.
>>
>>61330635
>>61330623
what if recursion is a mandatory part of the program though
>>
>>61330828
So you're resorting to lying now?
>>
>>61330825
You do know that what they're talking about literally happened to COBOL, right? COBOL jobs are very high paying because very few people know it, yet despite being a "dead" language there's still a lot of legacy code written in it. Even if C is no longer popular as an applications language, it's still popular for implementing libraries, and those libraries will need to continue to be maintained.
>>
>>61330828
C is dead.
>>
>>61330839
>Replaced.
By what, exactly?

>>61330867
Where exactly did they lie?
>>
>>61330848
I meant to type dfs, and the most common implementations are all recursive. I'm pretty sure the literal example for teaching dfs and graphs is to write a maze solver or generator.
>>
>>61330825
Yeah, sure, show that link to Linus - I'm sure you'll make a sound argument for yourself and your abysmal language.
Here's term for people like you who think they're real programmers: https://en.wikipedia.org/wiki/Retard
>>
>>61330872
Good luck getting one of those high-up jobs handling legacy code you teenage neckbeard. You're in for a shock once you enter the real world.
>>
>>61330874
Yet you're using software written in C at this very moment.
>>
>>61330885
Rust
>>
>>61330889
you sound like a bitter failure why would anyone take advice from you?
>>
>>61330867
What claim was "lying?" I cannot think of a system which has a java compiler which doesn't have a c compiler.

C has a million stackoverflow questions, an insane amount of documentation (more than java), and a million mailing lists.

There's 300 gorillion libraries for C too, and most languages do end up wrapping some of those libraries.
>>
>>61330885
>>Replaced.
>By what, exactly?
C has been 100% replaced by Rust.
>>61330888
https://en.wikipedia.org/wiki/Dunning–Kruger_effect
>>61330899
>Yet you're using software written in C at this very moment.
Actually I'm not. I intentionally do not use any software that came from a single line of C code.
>>
>>61330889
Great job disproving your own argument then.
>>
File: HPxYLYj.jpg (161KB, 600x527px) Image search: [Google]
HPxYLYj.jpg
161KB, 600x527px
Daily reminder that the people who try to talk shit about OOP are literally too dumb to understand basic principles like inheritance and polymorphism.
>>
>>61330902
Why would anyone take advice from YOU?
>>
>>61330907
What's your OS then? Are you browsing 4chan on a commodore 64 or something anon?
>>
>>61330907
>Actually I'm not. I intentionally do not use any software that came from a single line of C code.
You're running Redox OS?
>>
>>61330907
>I intentionally do not use any software that came from a single line of C code.
>>
>>61330906
>an insane amount of documentation (more than java)
hahahahaha no
enjoying the /g/ bubble. shit-for-brains?
>>61330924
https://github.com/redox-os/redox
Not a single line of C code. The kernel is 100% rust.
>>
Not him but:
>>61330839
C hasn't been replaced though. Its proper use is just no longer a concern to most people. C should be used to implement kernels. There is no longer a need to implement kernels.
At least not for FUCKING NORMIES.
>>
>>61330907
Now this is shitposting.
>>
>>61330917
I understand them perfectly well, but I also understand that ``code reuse" is a sham. The only value in ``OOP" is as syntactic sugar for imperative code.
>>
>>61330935
So what browser are you using?
>>
>>61330953
>So what browser are you using?
The one that comes with Redox. That happens to be written in Rust as well! :)
>>
>>61330935
Post screenshot of desktop. Else you're shitposting mindlessly like the retard you are. And what, you don't use git, etc? Also written in C.
>>
Is it possible for subtyping and typeclasses to work well together?
>>
File: redox.png (44KB, 343x407px) Image search: [Google]
redox.png
44KB, 343x407px
>>61330967
k
>>
>>61330953
What is this a fucking 20 of questions?
Next you'll be asking me what flavor popsicle do I want little Pickles.
You want a cherry popsicle, Pickles?
Are you sure?
Turn around, Pickles.
Here
comes
the
P
O
P
S
I
C
L
E
>>
>>61330962
>i have a magical browser written entirely in [unsuccessful language]
>haha, why would i tell you the name of it? you're not smart enough for such complex software...
>>
>>61330992
The name is literally just "browser", dumbass.
>>
>>61330982
>Redox er et Unix-lignende operativsystem som er skrevet i programmeringsspråket Rust, for å bringe innovasjoner fra Rust til en moderne mikrokjerne med et komplett sett av programmer.
Okay, but why? What benefits does it have over Linux?
>>
>>61330982
This image is in the archives, it's been posted before. Way to out yourself as spewing shitposter.
>>
>>61331004
That is irrelevant due to the high quality argument posted above
>>
>>61330935
What about the rest of your components? How do you source C free routers and internet cards and graphics cards and modems and charging circuits and ...?

What about little utility programs? Have you sourced your versions of cp, mv, rm, mkdir, chmod, less, more, grep, cd, (terminal multiplexer), .....?

What about the big ones? What's your desktop environment? Don't say you don't have one, because the terminal web browser lynx is written in C.
>>
>>61330998
Okay, I don't know anything about redox but unless it's improved massively, I can't believe you could post to 4chan on this thing

https://imgur.com/a/naiB1

I can't believe you could possibly solve an recaptcha with this, let alone run script tags
>>
>>61331036
beautiful
>>
>>61330998
>>61331036
Is Redox, dare I say it... BTFO?
>>
>>61331044
Yeah, no, I just checked the source.
https://github.com/redox-os/orbutils/blob/master/src/browser/main.rs

Not gonna be posting to 4chan with that any time soon. Maybe I'll try rust though
>>
>>61330985
You do realize that making a browser is far from trivial, right? Most of the non-mainstream browsers use code from mainstream open-source browsers. Code which depends on C.
>>
>C babies literally cannot comprehend someone not using their garbage
>>
File: doff_glasses.gif (1MB, 500x281px) Image search: [Google]
doff_glasses.gif
1MB, 500x281px
I know SQL
>>
File: 1409547168005.jpg (25KB, 231x363px) Image search: [Google]
1409547168005.jpg
25KB, 231x363px
>rust shill doesn't even use rust OS
>the same OS that shat on linux and claim superiority from the get go, only to get literally nowhere and end up yet another microkernel piece of shit
>literally shills for something that is so bad it's unusable, and does it for free
>probably can't write a decent line of code in rust, either, but shills for it nonetheless
What form of mental illness is this?
>>
>>61331079
>Rustards cannot comprehend that they're using our garbage
>>
>>61331079
>programming thread
>doesn't use git
That's what you claimed, retard. Shut the fuck up already.
>>
You know, I might actually believe that Rust shill if xe posted an actual screenshot of them viewing 4chan in their browser.
>>
>>61331096
Version control is for brainlets :^)
>>
>>61331085
Judaism
>>
>>61331096
git is for brainlets
>>
>>61330711
>Falling for the "popular means it's good" fallacy
>>
>>61331070
Anything which depends on C is shit. You should use a browser written in Rust, it won't leave you at Goodwill or when you're in the tub try and drown you. You don't have to feel that guy's sticky stuff in your hair, just clap your heels three times and you're away from there, so forget about the humiliation and shame, your innocence is not being snatched from you, because you're here putting tape on your face and trying on silly hats.
>>
>>61331143
>this is your brain on Rust
>>
>>61331143
>You should use a browser written in Rust

>>61331036
>>
>>61331138
>Falling for the "good means it's not dying" fallacy
>>
File: rustisking.jpg (170KB, 1142x885px) Image search: [Google]
rustisking.jpg
170KB, 1142x885px
FUCK YOU ALL

C IS DEAD

RUST IS KING

PIC RELATED, IT'S ME RUNNING REDOX, AN OPERATING SYSTEM WRITTEN IN NOTHING BUT RUST

I WILL NEVER USE ANYTHING WRITTEN IN C EVER AGAIN
>>
>>61331176
Awesome. You go, girl. C BTFO, Rust is queen. And what do we do when we hear the secret word, boys and girls?
>>
>>61331176
Hmm >>61329397
>>
File: keke.jpg (178KB, 798x770px) Image search: [Google]
keke.jpg
178KB, 798x770px
>>61331176
>>61331202
>>
>>61331085
Fuck you, Rust is better than C, when you use it your perception is changed like magic.
I have a secret. I have friends who live inside my wall.
>>
>>61331085
Fuck you, Rust is better than C. You're living in a bubble.
>>
>>61331169
No, a language can be shit. If enough people meme about it, it becomes popular.
>>
>>61331217
Point exactly.
>>
What's the best way to simulate a die roll in Rust?
>>
>>61331207
>>61331215
t. samefag
>>
>>61331086
Shut up, Rust does not depend on C in any way. The frozen peas have all gone rancid, so we'll probably need to buy some more peas.
>>
>>61331086
Rust does not depend on C.
>>
>>61331230
Rust is better than C and Gumby and a horse are lying somewhere.
>>
>>61331230
Rust is better than C fuck you
>>
>>61331231
>>61331233
But your browsers do.

And your OS, and your hardware, and your network protocols, and your office suite.
>>
>>61331253
>And your OS, and your hardware, and your network protocols, and your office suite.
ummm no
>>61331176
>>61330982
>>61330907
>>61330935
>>
>>61330985
>>61331143
>>61331187
>>61331207
>>61331231
>>61331240
Is this how delusional you have to be to shill Rust?
So delusional you start sounding like this?
>>
they should ban rust posters, make them pick something else to derail threads with. At this point rust posting is the lazy man's derail.
>>
>>61331253
not true, rust has it's own operational system which everything programmed in rust
>>
they should ban C posters for being underage
>>
>>61331261
>straight up lying as a desperate attempt to score relevance points

kys brainlet
>>
>>61331289
you have a lying brain
>>
>>61331289
Rust is a bare metal programming language that depends on nothing and then we're going to have lots of fun boys and girls here at the playhouse.
>>
>>61331289
Rust has no dependencies.
>>
>>61331307
>>61331333
C has no dependencies, and they already make up a majority of the software you're already using.

>>61331303
you must be 18 years or older to post on this board
>>
>>61331354
>and they already make up a majority of the software you're already using.
They make up none of the software I'm using. I only use software programmed in Rust.
>>
In C, an expression of the form
(a / b) * b
where a and b are integers is guaranteed to do integer division, right? It won't try to "optimize" by just using the value of a because the multiplication and division "cancel out" (which they normally would, but they don't in this case due to the potential precision loss from integer division). My intent is to portably find the largest multiple of b that is not greater than a; is there a better way of doing this?
>>
>>61331354
>C has no dependencies,
Yeah, but Rust has no dependencies.
Right. We scream.
Let's find out what the secret word is.
>>
>>61331363
No you don't.
Your posting here on this board has already proved it.
>>
>>61331354
Rust has no dependencies. Rust will conquer all...
>>
>>61330985
>>61331143
>>61331187
>>61331207
>>61331231
>>61331240
>>61331307
>>61331371
why does this faggot keep appending creepy nonsense to his posts
>>
>>61331370
No. Your compiler will optimize it.

That would only work if they were floats.
>>
>>61331387
You don't understand.
Rust has...
A touch.
From the heart, like roses.
Roses, they fill your nose.
With delight.
Delight.
For Rust.
>>
>>61331387
This: >>61331394
Rust is where a manchild goes to forget he was unsuccessfully aborted.
It's kind of like liquor.
>>
What does Rust smell like?
>>
>>61331390
>>61331370
Wait I'm retarded. I guess it wouldn't.

Uh,
a + b - (a % b)
should do what you want too though.
>>
>>61331408
Electric cords for our luncheon.
>>
>>61331408
C's rotting corpse
>>
>>61331408
Like iron that's been out in the open for a long time.
>>
>>61331287
I'm a C poster and I make more money than you

>>61331370
Your compiler will optimize it, but probably to
a = a-a%b
. Or maybe some crazy shit if b is constant.

>>61331390
Not right, but good that you noticed >>61331418

Although your code makes the end result b too high
>>
>>61331370
Also, in C, does "const" indicate a compile-time constant, or does it just mean that the variable can't be assigned to after initialization? Like if a local variable to a function is declared const, is it okay for that variable to be initialized with an expression that depends on the function's arguments?
>>
>>61331442
Yeah I went for multiple above rather than multiple below. Reading comprehension.
>>
>>61331442
>and I make more money than you
lmao I guarantee you don't. Rust programmers are in high demand.
>>
>>61331445
It just means the variable can't be assigned to after initialization. C has no facility for defining compile-time constants -- except macros, except those are really just a more general facility for compile-time lazy evaluation / call-by-name semantics / text substitution / whatever you want to call it.
>>
Its amazing that all Rust ever brings is shitposting.
Its sad Mozillla cant even shill by merit.
>>
>>61331467
>Its amazing that all /dpt/ ever brings is shitposting.
Ftfy you fucking Stalin-lover.
Stalin's signing death lists.
>>
>>61331442
Er, I assumed you were updating a with the value.

If you just want the expression it's a-a%b

>>61331460
How much do you make then

Bonus points if I believe you

>>61331445
It just means you can't write to it. The compiler is free to optimize. But you can have pointers to const values that were created at runtime
>>
>>61331488
>How much do you make then
95k
>>
>>61331488
That's... Not accurate. You're not a C programmer.
>>
reminder there's never a good reason to use dynamic memory allocation
>>
reminder there's never a good reason to use static typing
>>
>>61331504
There's never a good reason to use something that doesn't exist.
>>
>>61331493
105k motherfucker and I'm an intern right now

That's extrapolating my summer income to the whole year

>>61331503
I'm not a C programmer actually, I just program in C. But tell me where I'm wrong if you think I am
>>
>>61331517
reminder there's never a good reason to use typing
>>61331518
reminder there's never a good reason to use shitposting
>>
>>61331523
Rust is better than C, it won't leave you at Goodwill or when you're in the tub try and drown you
>>
File: 1499809062547.png (1MB, 1357x1281px) Image search: [Google]
1499809062547.png
1MB, 1357x1281px
>>
>>61331535
old bait is old
>>
So C programmers hate C++ because they can't understand it?
>>
>>61331565
Yes, it's too complicated for them. Notice how the only thing they complain about is "bloat" (aka C++ is too feature-rich for their feeble minds).
>>
>>61331565
I use both.
They both have their advantages. C is more elegant, but C++ is more expressive.
>>
>>61331577
It also intrinsically gets worse performance, name mangling isn't standardized, and the void * thing in C++ is obnoxious.
>>
>>61331577
People who pick a side and stick to it instead of just freely using both languages disgust me.
>>
>>61331565
I hate C++ because an OOP style legacy codebase is a monster to maintain compared to something written in C. You end up having to open like 15 related files and read a bunch of classes to understand a single procedure you have to modify.

Meanwhile in C you can just look at the structs you're touching and change the procedure.
>>
>>61331590
I write C in Javascript.
>>
I'm starting to believe that I am significantly less productive when I use a dark theme in my editor compared to light theme. Am I on to something?
>>
>>61331596
That doesn't sound much like a C++ vs. C complaint. That sounds more like a poorly written C++ vs. well written C complaint.
A well written OOP-style legacy codebase in C++ shouldn't have you opening any related files at all, because good classes can be understood just by looking at the procedures that use them.
>>
>>61330035
i amcurrently learning c# and i am using visual c# forms rn. i was wondering how, with a text box and button, i could make the form print a certain thing only if the user puts a certain thing in the text box. like, it would only print "bacon" if the user put "eggs" in the text box and pressed the button. can anyone help?
>>
There is literally nothing wrong with c++, only brainlets have a problem with it
>>
C99 or C11?
>>
wooah cpp is kinda cool
template<typename... Args>
auto sum(Args... args) {
// Unary folding.
return (... + args);
}
sum(1.0, 2.0f, 3); // == 6.0
>>
>>61331629
holy fuck we could do that 50 years ago
(define (sum + . args) (apply + args))
>>
>>61331629
Its weird that modern C++ is creeping closer to looking like haskell
>>
>>61331598
I fucking hate all the language wars that go on around here.
People are like "UGH I only use so and so language everything else is poo!!!"
Meanwhile I use C, C++, Java, Lisp, Scheme, Racket, Ruby, Python, Lua, Javascript, PHP, Haskell, Prolog, and SQL.
Why is it so hard for some pathetic brainlets to understand the concept of industry standards? Different languages are suited to different purposes. Even if not naturally so, they become that way when they get shilled and memed into the relevant fields. It's okay to resent that, but you can't get hung up on it; you have literally no choice but to just move with the times and use the languages everyone fucking uses for whatever it is you happen to be trying to do in the moment. Because if you try to resist it like a "muh purity"-obsessed autistic manchild, you'll piss off all the wrong people be unemployable.
>>
>>61331651
>just accept industry standards even though 0 got there on merit

Nah, you sound like a boot-licker.
>>
>>61331624
I don't write C# but I have Visual Studio so I'll try to help.
private void button_Click(object sender, EventArgs e)
{
if(textBox.Text == "eggs")
{
textBox.Text = "bacon";
}
}
>>
>>61331673
And you sound unemployable.
>>
>>61331651
I don't think you understand that 4chan is a land of eternal strife and meaningless battles. You died and went to the ante-hell for being atheist.

Every day for all of eternity we wage meaningless war under meaningless battle standards.
>>
>>61331703
Sounds sexy tbqh.

In all honesty I'd fuck a male NEET. With lifestyles like that, it's not like they're that far off from being girls.
>>
File: rindia.jpg (529KB, 2592x1944px) Image search: [Google]
rindia.jpg
529KB, 2592x1944px
>>61331677
huh, it was very obvious. thanks bud, i appreciate it.
>>
>>61331727
>With lifestyles like that, it's not like they're that far off from being girls.
st--stop anon >///<' i only take responsibility for being chubby, it's not my fault the adipose is distributed like "that"
>>
>>61331689
>as long as i have my glorious shekel, nothing else matters
sad
>>
>>61331627
glibc doesn't support C11 threads...
gnu11 is the only sane one.
>>
>>61331651
ive seen every language be called shit, should we just not use computers anymore?
>>
What's the best way to start learning C? K&R?
>>
>>61331753
If that were the case, there are higher paying jobs I could seek than programming.
I do this because I see the beauty in the trade. It's a kind of beauty all languages share, and that's why I enjoy using every language, because none of them, no matter how bad, has yet managed to ruin the essence of programming.
Unlike you faggots, who are blind and can only see the beauty of specific kinds of programming, and are only interested in shilling the kind you like best and putting down all the others.
>>
>>61331784
>has yet managed to ruin the essence of programming.
>C/++
>Python
>JS
>PHP
>SQL
>>
>>61331803
If you think any of those ruin programming your appreciation for the craft is not as deep and broad as mine
>>
6..6
wew lad, this is some terrible bait.
>>
>>61331739
Don't mention it, friend. I'll try to help if you have anymore questions.
>>
>>61331677
sorry for asking another question but how would you make it so it prints "bacon" if "eggs" is in the textbox at all and not the only thing in it. i tried doing this:

private void button1_Click(object sender, EventArgs e)
{
var regex = new Regex("eggs");
if (regex.IsMatch(textBox1))
{
textBox1.Text = "bacon";


but i get the error: "cannot convert from 'System.Windows.Forms.TextBox' to 'String'"
>>
>>61331778
>glibc doesn't support C11 threads
https://sourceware.org/ml/libc-alpha/2017-06/msg01413.html
Hopefully they'll fucking accept this, finally.
>>
>>61331565
>>61331577
>implying Linus Torvalds can't understand C++
>>
Is it worth buying K&R if I've already read other C books or is only useful for beginners?
>>
>>61331503
https://www.quora.com/Can-a-variable-be-both-const-and-volatile
https://cdecl.org/?q=const+int+*x
>>
>>61331782
I recommend K&R, and recommend the free CS50 course from Harvardx in conjunction, specifically the lectures. At the end of the very first lecture they recommend you use a very memey Programming 4 Kidz type program called Scratch to do the first assignment, which I think one could skip. Apart from that the lectures are very interesting. I also recommend a book called Learning C the hard way or something like that.
>>
>>61331784
>If that were the case, there are higher paying jobs I could seek than programming.
The higher paying jobs aren't as accessible as software engineering, any moron can get a software engineering job provided that they have the degree for it.
>>
>>61331919
this guy is retarded
learning C the hard way is trash littered with mistakes
K&R is incredibly dated and will teach you a bunch of habits that will make people think you are retarded.

I recommend two books, C Programming: A modern approach, and 21st Century C.

Modern approach gives you the basics and more, 21st Century C has two really good chapters on using other people's libraries.
>>
>>61331836
I don't mind at all. Ask me a million questions if you have to. I enjoy helping beginners.

You don't need to use regex for that. Just use the String.Contains method.

if(textBox.Text.Contains("eggs"))
{
textBox.Text = "bacon";
}
>>
>>61331836
nevermind, i figured it out. for future reference for anyone you do:

private void button1_Click(object sender, EventArgs e)
{
if (textBox1.Text.Contains("eggs"))
{
textBox1.Text = "bacon";
}
}
}
}
>>
>>61330711
Finally C is on its way to become as popular as Javascript, the most popular language on Github
>>
>>61331903
K&R is like a manual for C, it explains the syntax, functions, operators, etc. of the C language. The preface of the book states that it's not a book to learn programming, but more of a manual on how the C language works. Definitely recommend it for anyone who wants to get familiarized with C, and especially novice programmers because of the quality of explanation of programming concepts and excersizes.
>>
>>61331952
Try also Kenneth Reek "Pointers on C". I switched 3 or 4 C books before i stumbled on this gem. Goes from basic to advanced level and also has comparisons between K&R way and modern way of doing things.
>>
>>61331955
okay, cool. well i do have another question then. what i have been trying to do actually is have the form play notes from putting the notes in the text box. like if you put "CDEFG" in the text box and clicked the button, it would play that.

if (textBox1.Text.Contains("C"))
{
playerC.Play();
}
if (textBox1.Text.Contains("D"))
{
playerD.Play();
}


this is what the code looks like. of course, and it is what i expected, they don't play before and after eachother. if you put "CD" it only plays the last if statement. what i'm trying to do is have it play C, then D. do you have an idea of how to go about that?
>>
>job opening
>Minimum 5 years c++, bachelor's
>Up to 500k total compensation
>>
My boss wants me to learn Java to help with a project. How do I tell him to fuck off and that it is fucking retarded?
>>
>>61332054
pseudocode
for (int i = 0; i < textbox.text.length; i++)
{
switch (textbox.text[i])
{
case 'A':
playerA.play();
break;
// etc
}
}
>>
>>61332133
Tell him you are allergic to curry.
>>
>>61332133
I'm a big baby who can't learn new things, you should sideline me until you get an excuse to fire me.
>>
>>61332140
Haha very funny. No seriously I don't want to learn Java.

>>61332147
Java is a fucking retarded language and i code C++ projects as my job.
>>
>>61332158
C++ is even more retarded, though.
>>
>>61332158
>C++ ranjeet acting like he's above Java pajeets
Sepples is just as stupid, if not more, than Java.
>>
>>61332169
Yes. I know.
>>
Best IDE for C?
>>
>>61332213
lpcxpresso
>>
File: 2.jpg (24KB, 441x148px) Image search: [Google]
2.jpg
24KB, 441x148px
>>61332134
hmm, i tried this and i get this everytime i put the notes in the text box.
>>
>>61332248
post code
>>
>>61332264
private void button1_Click(object sender, EventArgs e)
{
for (int i = 0; i < textBox1.Text.Length; i++)
{
switch (textBox1.Text[1])
{
case ('C'):
playerC.Play();
break;
case ('D'):
playerD.Play();
break;
}
}
}
>>
is there any real reason that spaces are recommended over tabs in python?
>>
>>61332268
>switch (textBox1.Text[1])
should be
switch (textBox1.Text[i])
>>
>>61332268
You are just checking the 2nd character in the textbox over and over again, replace textBox1.Text[1] with textBox1.Text[i]. Your code is failing because, presumably, you are running it with only 1 character in the textbox.
>>
>>61332271
No, just use spaces.
>>
>>61332279
>>61332282
ah yeah, didn't notice that. i changed it and it works now but it only plays the last key the user inputs instead of both of them. and also, i'm not sure how you would make it play the same key twice if you put that in the text box.
>>
> C++17 will be C11 compliant, not C99

What are the implications of this change?
>>
>>61332311
>it only plays the last key the user inputs instead of both of them.
That's because there is no delay between the note executions. Use Thread.Sleep()
>and also, i'm not sure how you would make it play the same key twice if you put that in the text box.
That's why we're using a for loop. It will work just fine.
>>
>>61332304
>press space 4 times every time to indent
no
>>
>>61332311
Try putting the C# equivalent of a sleep(x) after the switch block, it's probably just because you're trying to play the notes too quickly.

>i'm not sure how you would make it play the same key twice if you put that in the text box.
The combination of keys doesn't matter, it iterates over all the characters, checks it against all the valid characters, then moves onto the next key, and so on.
>>
>>61332271
this is why python will never be takes seriously

a bigger code file written in it looks like an incomprehensible mess
>>
>>61332353
Your editor should have an option to automatically convert tabs to x spaces.
>>
>>61332337
*crickets*

>tfw /g/ is full of vocal C-fags but they have no idea about their own language's various standards.
>>
>>61332347
>>61332357
yeah, okay, i've got that done, thank you. my only problem now is the sharp keys, because it looks like case only takes one character, so you can't do something like case('A#')
>>
>>61332213
Clion
>>
>>61332213
Intellij Clion, also faster than vim
>>
File: editor-latency-linux-xml (1).png (9KB, 580x430px) Image search: [Google]
editor-latency-linux-xml (1).png
9KB, 580x430px
>>61332437
oops, wrong picrelated
>>
>>61332408
Do something like this
for (int i = 0; i < textbox.text.length; i++)
{
switch (textbox.text[i])
{
case 'A':
{
if (textbox.text[i + 1] == '#')
playerAS.play();
else
playerA.play();

break;
}
// etc
}
}

It doesn't check to make sure i + 1 isn't out of bounds, you'll need to implement error checking.
>>
>>61332213
>IDE for C
why?
>>
Who /vscode/ here?
>>
>>61330489
Because everyone is getting hung up on SICP (likely because they have nfi), there actually is a better book on learning scheme.

Look up How to Design Programs (HtdP). It's quite a good book that starts from the basics and works its way up. You'll be using DrRacket which is a great IDE for noobs and is extensible enough for you to use down the track as well (I use it).
>>
>>61332532
it's all good
>>
>>61332337
The most impact this has is that a bunch of sections have different reference numbers in the standard when referring to the C11 doc. C11 isn't that different from C99

If it was a big deal, it would actually be someone people were talking about

>>61332384
You're very smart anon
>>
>>61332632
something*

>>61332271
Tabs look different on different machines, I guess is one reason why they don't like it. But they can't mix tabs and spaces in the first places so I don't think it really affects them. The real reason is everyone does it so everyone else does and it's branded into PEP 8 as the word of god
>>
>>61330886
i added this to my program but i am still getting an out of bounds exception witha value of -1, what needs to be changed and how?
    // check to the right
if (x != y - 1)
if (exploreMyMaze(x, y + 1)) {
return true;
}
// check above
else if (y != 0)
if (exploreMyMaze(x - 1, y)) {
return true;
}
// check to the left
else if (x != 0)
if (exploreMyMaze(x, y - 1)) {
return true;
}
// check below
else if (y != x - 1)
if (exploreMyMaze(x + 1, y)) {
return true;
}
>>
int main(void)
{
int tmp = fn( 10,
301);
return tmp;
}

Tabs for everything, tab should be always 8 space wide.
People who use anything but monospace fonts should be beheaded.
>>
>>61332729
>Using whitespace for anything but separating tokens
What a pleb.
>>
>>61332717
>if (exploreMyMaze(x, y + 1)) {
> return true;
>}

Nigga just return exploreMyMaze(x, y + 1) then
>>
>>61332133
tell him OOP is POO backwards and is considered harmful.
>>
>>61332750
didnt fix the -1 index out of bounds error, any other suggestions
>>
>>61332632
>If it was a big deal, it would actually be someone people were talking about
well, what's new in C11?

if I were a C shill I'd surely know this, like I know a ton of facts about various C++ standards
>>
>>61333041
>tfw wiipedia is smarter than local Cshills

Multi-threading support (_Thread_local storage-class specifier, <threads.h> header including thread creation/management functions, mutex, condition variable and thread-specific storage functionality, as well as the _Atomic type qualifier and <stdatomic.h> for uninterruptible object access).
Improved Unicode support based on the C Unicode Technical Report ISO/IEC TR 19769:2004 (char16_t and char32_t types for storing UTF-16/UTF-32 encoded data, including conversion functions in <uchar.h> and the corresponding u and U string literal prefixes, as well as the u8 prefix for UTF-8 encoded literals).[10]
Removal of the gets function, deprecated in the previous C language standard revision, ISO/IEC 9899:1999/Cor.3:2007(E), in favor of a new safe alternative, gets_s.
Bounds-checking interfaces (Annex K).[11]
Analyzability features (Annex L).
More macros for querying the characteristics of floating point types, concerning subnormal floating point numbers and the number of decimal digits the type is able to store.
Anonymous structures and unions, useful when unions and structures are nested, e.g. in struct T { int tag; union { float x; int n; }; };.
Static assertions, which are evaluated during translation at a later phase than #if and #error, when types are understood by the translator.
An exclusive create-and-open mode ("…x" suffix) for fopen. This behaves like O_CREAT|O_EXCL in POSIX, which is commonly used for lock files.
The quick_exit function as a third way to terminate a program, intended to do at least minimal deinitialization if termination with exit fails.[12]
Macros for the construction of complex values (partly because real + imaginary*I might not yield the expected value if imaginary is infinite or NaN).[13]
>>
>>61333041
>what's new in C11
Some unicode stuff.
Threading support (Optional).
Atomic types (Optional).
Anonymous structs/unions.
Static assertions.
_Generic (basically a type 'switch')
And some other shit not really worth getting worked up over.

C2X sounds like it's going to be a much more interesting standard.
>>
>>61332337
>>61332384
>C11 compliant
Just because it defers to another standard, it doesn't mean that it's compliant with it.
Is this completely valid C11 code accepting by C++17?
int *ptr = malloc(sizeof *ptr);
>>
The only languages that survive are the ones which actually get the job done with.

That alone should be enough to laugh at anyone who shills a language without actually demonstrating something non-trivial with it.
>>
>>61333095
>accepting
accepted*

>>61333115
Who are you referring to specifically?
>>
>>61333129
>Who are you referring to specifically?
There's no quote in >>61333115. So you can guess it's a general statement. But I actually had the Rust shill in mind.

>>61333095
C++ always had and still has in 2017 a strong (but stupid) type system. So it will still cry if you don't cast the result of malloc.
>>
>>61333156
So it's not compliant with C11 then. It's not even close to being compliant with C11.
>>
>>61333095
No, neither would work the sizeof use there, as far as I know it requires parens in C++. Probably what the OP meant was that it will be built on top of C11 rather than being compliant.
>>
>>61333195
All it does is defer to C11 for the definitions of some function, so it can claim it "has the C standard library".
It's not "compliant" or even anything worth giving a shit about.
>>
>>61333095
> Is this completely valid C11 code accepting by C++17?

Not currently (GCC 7.1)

> error: invalid conversion from ‘void*’ to ‘int*’ [-fpermissive]
>>
>>61333206
>It's not "compliant" or even anything worth giving a shit about.
You very much give a shit because optimized parts of C++ code should look like C.
>>
>>61333256
I don't give two fucks for what C++ does. It's shit, and I'm not going to use it.
>>
>>61333266
> and I'm not going to use it.
That's stupid too. The sweet spot for development speed and performance is somewhere between the two styles.
>>
>>61333266
>I don't know what it does, but I hate it
>>
>>61333295
>I don't know what it does
Where did I say that?
I said I just don't fucking care. C++ is shit, and it's going to keep being shit. Anything they do now is just more shit on the pile.
>>
>>61333311
>Where did I say that?
When you said you didn't even want to know what it does.
>>
>>61333311
>C++ is shit, and it's going to keep being shit. Anything they do now is just more shit on the pile.
But it does the work for you, with proper checks. File i/o, regexs, string ops, whatever.
You can quickly do the not performance critical parts of your program in C++ and roll your own shit in C style for performance critical parts.
>>
>>61333338
Might as well just use python desu
>>
>>61333326
Please point out the post where I said that.

>>61333338
Why would I use a language that is objectively shit?
>>
>>61333356
No, that's stupid.
>>
>>61333367
Why not? You can write the boilerplate much more quickly and write the performance-critical parts in C. Why is it better to use C++?
>>
>>61333358
>Why would I use a language that is objectively shit?
Because you can work ten times faster and a hundred times safer in it. And your code is more comprehensible.
>>
>>61333378
>C++
>Safe

I mean, maybe compared to C, but definitely not a hundreed times safer.
>>
>>61333378
>sepplesfag pulling numbers out of his while waiting that his compilation would finish
>>
>>61333378
Enjoy being a shiteater.
>C++
>work ten times faster
>hundred time safer
>comprehensible
AHAHAHAHHAHAHAHHAHAHAHAHAHHA
>>
>>61333387
>C++
>incomprehensible
brainlet
>>
File: C++ in a nutshell.png (72KB, 1016x98px) Image search: [Google]
C++ in a nutshell.png
72KB, 1016x98px
>>61333394
Please explain to me what this does, and do it without searching shit up and in a timely manner.
>>
>>61333394
>I add extra complexity for the sake of having complexity
dumb sepples poster.
>>
New thread
>>61333413
>>
310
>>
>sepples
vector<int> v(10);
try{
v[100]=1;
}catch(...){}

>no exception thrown
What's the point of exceptions in sepples if they don't work? What's the point of private in sepples if you can #define private public? What's the point of const variables if you can get their address and write directly there?
>>
writing an exokernel for ARM64

im basically planning to strip off all abstractions, for ex google's magenta kernel has "streams" that are neither processes or threads but streams of execution that can have parents, removing 2 unnecessary abstractions. im also planning to give direct access to IO and memory (inside the stream space that is)
>>
>>61333401
that's pretty easy
constructs unique_ptr using the template arguments with perfect param forwarding
>>
New thread:
>>61333439
>>61333439
>>61333439
>>
>>61333401
Why would I need to understand library code? The work is already done. An equivalent construct in C wouldn't just be more complicated, it would be impossible.
>>
>>61333432
v.at(100)

operator[] does not perform bound checks
function at() does
>>
>>61333445
>Why would I need to understand [...] code
Jesus fucking christ. I don't even know how to respond to this level of retardation.
>>
>>61333432
vector::operator[] does not do bounds checking, because that's the C way. If you want bounds checking and exceptions, use .at().

Learn the language before you spout shit.
>>
>>61333455
>>61333460
[] is overloaded anyway, why not add checking?
>>
>>61333458
Write equivalent code in an language of your choosing. See how much simpler it can get.
>>
>>61333479
so you can choose whether you want safety or speed where applicable

working with user input and what not? use at
working with some algos? use []
>>
>>61333444
FUCK. I forgot the title.
I'll post it again.
>>
>>61333479
That doesn't make sense. How do you decide which version you want?
>>
Is the janny frogposter?
>>
This is what happens when you split threads you stupid fucks. Good job.
>>
>>61333444
>>61333488
I'm fucking off-form today. I haven't fucking up a new thread in over a year.

New thread:
>>61333517
>>61333517
>>61333517
>>
>>61333444
>>
>>61333520
>>61333522
No, I just kept fucking it up.
>>
>>61333487
>>61333492
Generally, unsafe stuff should be harder to write. Yet sepples encourage unsafe code because it's shorter. I think the behavior should be reversed, with .at being used by people who really need that speed boost.
>>
>>61333538
C++ is based on C, so it stands to reason that code which looks like C should behave like C.
>>
>>61333526
Fuck off.
>>
>>61333558
sizeof('a')
>>
>>61330613
>>61330623
>>61330648
these
>>
>>61333532
brainlet detected
>>
>>61333563
I don't see the problem.
>>
>>61333578
What does it evaluate to?
>>
>>61333600
It's 1, because a char is 1 char in size. I don't see see what the problem is.
>>
new
>>61333611
>>61333611
>>61333611
>>
>>61333609
#include <stdio.h>

int main()
{
printf("%zu\n", sizeof(char));
printf("%zu\n", sizeof(int));
printf("%zu\n", sizeof('a'));
}

1
4
4
>>
>>61333620
That's silly. What's going on here, int promotion?
>>
>>61333642
No. char literals have always been typed as ints.
C++ is "just like C".
>>
>>61333652
Why would you ever want that
>>
>>61333661
>2 unique posters
Kill yourself, mate.
>>
>>61333676
mad because nobody wants to use your shitty thread?
>>
File: 1377363144588.jpg (175KB, 317x699px) Image search: [Google]
1377363144588.jpg
175KB, 317x699px
>>61333680
>>
>>61330463
java is faster and more advanced plt wise than go. kek.
>>
How do I contribute to a project /dpt/ ?

I look at the Github repo but it's fucking huge. I don't know how the thing works and I don't know where to start figuring it out. I want to change some specific things but I have no idea where they even are.
>>
>>61332450
Why GVim and not regular Vim?
Maybe there isn't a difference in latency I guess, never used GVim myself though
>>
>>61330520
You seem to know about Lisp. Can you explain to me what FEXP, NEXP and LEXP are?
>>
>>61333889
> I want to change some specific things but I have no idea where they even are.

you can try to find where they are with grep
of read the docs
>>
Javascript dev here... Want to start learning C. Any recommended resources?
>>
>>61334009
That's sadly not enough. I can't just change something without understanding the impact it's going to have on the rest of the program. Things are going to break and my changes are going to get rejected.
Thread posts: 353
Thread images: 22


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