[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: 345
Thread images: 37

File: homura_dpt_rust.jpg (148KB, 563x712px) Image search: [Google]
homura_dpt_rust.jpg
148KB, 563x712px
Anime edition.

Previous thread: >>60658204

What are you working on /g/?
>>
install NixOS
>>
Working on a distributed backend infrastructure to mange services related to fetching thigh-highs when I run out.
>>
File: dlang_chan.jpg (139KB, 470x545px) Image search: [Google]
dlang_chan.jpg
139KB, 470x545px
Threadly reminder that dlang-chan is not dead; she's going to have her GC tumor removed (eventually); she's super duper cute; and she's a blast to write in! Say something nice about her, /dpt/!

>Features
https://dlang.org/comparison.html
>Standard library
https://dlang.org/phobos/index.html
>Package manager
https://code.dlang.org
>GC
https://dlang.org/spec/garbage.html
https://dlang.org/blog/2017/03/20/dont-fear-the-reaper/
https://dlang.org/blog/2017/04/28/automem-hands-free-raii-for-d/
>Books
https://wiki.dlang.org/Books
>>
>>60670165
senpai will never notice you
>>
>>60670165
What's so great about D compared to rust or c++?
>>
>>60670483
Nothing. It's a useless, dead language.
>>
>>60670483
I can't speak for Rust, but she was developed to be a better C++. And in my opinion, she is. I'd say the only thing I would want from C++ would be RAII, but her GC can be disabled in some areas if you need the performance. Luckily, for regular desktop applications, the GC is fine.
Go take a look at the links in my post. You'll find there's a lot to like. She's a great general purpose systems language.

>>60670495
Stop shitposting, please~
>>
File: old_hag_langs.png (173KB, 600x355px) Image search: [Google]
old_hag_langs.png
173KB, 600x355px
>>60670531
>she is
Lol.
>>
>>60670537
All programming languages are cute girls, you know.
http://next.rikunabi.com/tech/docs/ct_s03600.jsp?p=002412
>>
>>60670537
There's nothing wrong with C, but C++ isn't "improved C".
>>
>>60670550
>All programming languages are cute girls, you know.
>C++ is the only one with tits
>C++ confirmed for not (girl (male))
and this is why C++ is for plebs
>>
>>60670571
Never said it was, homo.
>>
If C++ was a woman, she would have 5 vaginas. You'd think a woman would only need 1, and that the remaining might just look completely out of place, but I mean... more is always better, right?
>>
>>60670634
Six legs, or five legs arranged radially?
>>
Just exercising my brain with a program for scoring Cribbage hands (though no flushes or nob, since suit isn't taken into account). Trying to figure out how to make the findruns definition less clunky.

https://pastebin.com/BYyMHj7u
>>
>>60670634
>5 vaginas
No, it would be 5 assholes.
>>
>>60670659

2 legs as normal, but 5 vaginas nonetheless.
>>
File: 1495810988855.png (549KB, 1920x1080px) Image search: [Google]
1495810988855.png
549KB, 1920x1080px
rolling, i'm kinda newish to programming btw
>>
>>60670634
>She would have 5 vaginas
No one is forcing you to use them all. Just use the modern subset you retard.
>>
>>60670634
This is literally my fetish. Thank you Borusen
>>
>>60670762

Yes, I can feel it running through me
>>
>>60670800

Reroll because all I got is use git twice with no project
>>
Something about passing templates into and returning them out of a function


template T;

template& func(template& t)
{
// code
return t;
}

template U = func(T);

>>
File: 1491912956633.jpg (18KB, 237x288px) Image search: [Google]
1491912956633.jpg
18KB, 237x288px
when I hit ctrl + space in eclipse it shows all the functions and shit of the current class and super class etc. when I click on one of the super functions it will automatically create the whole override stub.
why cant visual studio do that?
>>
>>60670012
>obj*ct
Fuck off.
Thank you for using a Homura image though.
>>
Have 80 percent left on my laptop and notepad with mingw and a java compiler.

What do I spend what time I have left on this laptop doing? I will likely be using my phone once the laptop dies. Sadly, I don't have a charger for either. I will look for one in a bit.Hotel room btw.
>>
in sepples can I only override virtual functions?
>>
File: smug_ran.jpg (632KB, 709x1063px) Image search: [Google]
smug_ran.jpg
632KB, 709x1063px
>>60671108
>>
File: 1439389112440.jpg (175KB, 750x1117px) Image search: [Google]
1439389112440.jpg
175KB, 750x1117px
>>60671169
fuck animu
>>
File: 1488337665340.jpg (120KB, 626x348px) Image search: [Google]
1488337665340.jpg
120KB, 626x348px
>in sepples
>>
>>60671175
Who are you replying to? He didn't post a single anime image.
>>
File: 1401416559048.png (324KB, 1054x748px) Image search: [Google]
1401416559048.png
324KB, 1054x748px
>>60671213
>>60671231
fuck animu
>>
File: 1482267532973.jpg (106KB, 1280x720px) Image search: [Google]
1482267532973.jpg
106KB, 1280x720px
>>60671239
>No anime.
... on an anime site.

you have a very low IQ anon.
>>
>this again
ABANDON THREAD
>>
File: animu is illegal.gif (3MB, 444x250px) Image search: [Google]
animu is illegal.gif
3MB, 444x250px
>>60671242
tell me about low iq when you cant even understand the pic
>>
File: 1489073971174.jpg (49KB, 279x307px) Image search: [Google]
1489073971174.jpg
49KB, 279x307px
>>60671257
>posting leftist trash
I can't say I'm surprised.
Anime is strictly right wing and you have to leave immediately.
>>
Sorry, posted this in the other thread but it died before I could respond.

Any pointers on how to generate HTML pages with C?

An anon suggested using a tree and printing in order: can you elaborate on this? It's not immediately clear to me.

Basically, I'm generating a bunch of images using C and I want to display them in the browser using HTML.
>>
>>60671257
>>60671271
Please take it to >>>/pol/, the both of you
>>
>>60671281
I don't visit left wing boards since I am loyal to the anime.
>>
File: rape cam.png (726KB, 1280x720px) Image search: [Google]
rape cam.png
726KB, 1280x720px
Tell me why I should abuse C preprocessor macros to simulate C++ templates.
>>
>>60671288
You shouldn't. C macros are degenerate.
>>
>>60671287
>falls for the jewish ploy of animu
>hurr look at me Im le right wing
>>
File: 1493270777701.png (175KB, 310x392px) Image search: [Google]
1493270777701.png
175KB, 310x392px
>>60671304
Anime is strictly right wing and has always been.
It seems like you have fallen for the MI6 black op propaganda though, since you post leftist trash.
>>
>>60670012
>What are you working on /g/?
Lisp apparently. Decided to give that fancy Structure and Interpretation of Computer Programs book a read, mostly because classes aren't going fast enough for my liking. I like the intro so far.
>>
/dpt/ theme

https://www.youtube.com/watch?v=5BaoQweD8Ss
>>
>>60671388
>Doesn't even have the best shibayan song
I'm disappointed.
https://www.youtube.com/watch?v=3M9RFtziALc
>>
File: smug_ran1.jpg (180KB, 1732x1593px) Image search: [Google]
smug_ran1.jpg
180KB, 1732x1593px
>>60671388
https://www.youtube.com/watch?v=QuncqzGKmxg
>>
>>60671419
I'll play 2hu one day. Maybe.
>>
https://pastebin.com/Zj6ENTqS

rate my C code from 1 to 10

you can use the program with the following syntax, but it's more difficult to verify the correctness than the interpreter, as it doesn't keep the program code loaded after parsing. Everything evaluates to a lambda and all it will say is <lambda>
\x x
(\x x \y y)
>>
>>60671451
C is pretty verbose
you should rewrite it in something else
>>
>>60671467
yeah but it's 511 lines, the interpreter also happened to be 255 lines. i just thought it was a nice (almost) coincidence for a couple short fun programs i wrote
>>
>>60671474
think of how short it could be
>>
>>60671479
the point wasn't making it as short as possible
>>
>>60671479
And think of how slow it would be.
>>
File: 1489509432002.png (128KB, 304x369px) Image search: [Google]
1489509432002.png
128KB, 304x369px
>>60671451
It's cute.
Have you written a typechecker in C? I plan to do something similar too, but for a different type of lambda calculus.
>>
>>60671474
>>60671479
you could also try adding simple types and primitives (and fix), though that will limit it
>>
>>60671488
What makes you say that?
Pattern matching in something like Rust shouldn't be any slower than a switch on a tag

A variant/enum should compile to the same code
>>
>>60671499
Rust is quite a verbose language itself.
>>
>>60671522
Yes, but not as verbose as C
I chose Rust because it should compile to mostly the same code
>>
>>60671533
Rust is slower than C, though.
>>
>>60671538
Any language with more that's implicit will be slower in a large program.
This isn't a very large program.
>>
>>60670762
Roll
>>
>>60671489
thank you, that's what i was hoping for.
i haven't done a typechecker yet, but i think that's getting to the point where i'd probably rather do it in another language

>>60671491
yeah, maybe simple integers, addition/subtraction, and i/o. not sure yet
>>
>>60671571
make sure it's pure
>>
>>60671573
that means no i/o right
>>
>>60671573
Purity isn't as important as having no general recursion.
>>
>>60671577
no it means monads
>>
>>60671592
It doesn't though.
>>
>>60671557
>Any language with more that's implicit will be slower in a large program
this isn't true as a general statement. for example, type deduction in a statically typed language (var, auto) is much more implicit, but still altogether static and no slower than explicit type declaration. the compiler already knows the type of any given expression anyway, because it must in order for the program to be well-formed

>>60671577
it means no side effects
>>
>>60671622
>statically typed language
That's redundant. I think you mean "typed language".
>>
>>60671650
don't u mean compile-time typed language
>>
>>60671279
If you don't understand that, maybe you should generate the html with python.
>>
>>60671650
i was differentiating between "statically typed" and "dynamically typed" languages in the context in which those terms are used. i would say dynamically typed languages are "typed" in some sense of the word, though at a different level of abstraction than the one i think you're speaking in the context of
>>
>>60670012
>What are you working on /g/?
Embedding information inside a jpeg

I want to see how far I can take it. So far I've just been embedding "test" inside porn. I'm curious if I can get whole scripts in.
>>
>>60671659
I didn't mention type-checking anywhere in my post.

>>60671689
>i was differentiating between "statically typed" and "dynamically typed" languages
So you were differentiating between something which exists and something which doesn't?
>i would say dynamically typed languages are "typed" in some sense of the word
Assuming "dynamically typed" isn't a self-contradiction, it's obviously "typed".
>>
>>60671723
Oh good, you again.
>>
>>60671723
a program can be well typed without verifying that it is so
>>
>>60671723
Wrong. Programs are just numbers. Numbers have no sense of types. They do not understand what it means to be statically or dynamically type checked. Additionally, numbers are an abstraction, designed by humans to quantify objects found in nature.
>>
i am trying to find out how user input is cached in a browser, on a asp/js website that frequently looses its data when working in a offline mode. this mode should enable the user to input data and upload it later when a connection to the server can be established.
sadly i know jack shit about the website and theres no documentation and noone that knows how it works and now im just scanning trough every js file and decompiled dll to find wtf is going on...
>>
>>60671773
>designed by humans to quantify objects found in nature
Maybe if you're a baby.
>>
>>60671790
Numbers are an artificial construct. Do you think the universe understands what a number is?
>>
>>60671714
bonus points if you're embedding the information such that it can't be detected without the decoding tool or a copy of the unmodified source image for comparison. extra bonus points if the embedded data can survive reencoding

>>60671723
>So you were differentiating between something which exists and something which doesn't?
dynamic typing obviously exists in the context in which the term is used, even if it doesn't satisfy your definition of typing. you're just arguing semantics, and not in any productive way
>>
>>60671808
>Do you think the universe understands what a number is?
"the universe" doesn't understand anything
hippies go homu
>>
>>60671760
When did I ever deny this? Also there must exist at least one program which is well typed, but it's impossible to verify that.

>>60671773
>Programs are just numbers.
Yes, the natural numbers are a type.
>They do not understand what it means to be statically or dynamically type checked
I never mentioned type-checking in my posts.
>"""abstraction"""
I don't recognize this as a valid word.

>>60671808
>Do you think the universe understands what a number is?
What does it mean for a ""universe"" to ""understand"" something? What sort of retardation is this?

>>60671813
>even if it doesn't satisfy your definition of typing
Something which doesn't exist can satisfy any definition of anything for all I care, it's just irrelevant.
>>
>>60671808
Did humans invent numbers or did they discover them? Do numbers "exist"? Do they "exist" outside of our universe?
>>
>>60671821
> When did I ever deny this? Also there must exist at least one program which is well typed, but it's impossible to verify that.

My point was that every language is typed because all programs are typed, though some are obviously not well-typed.
>>
>>60671808
>the Hall conductance of a topological superconductor just (((happens))) to be an integer
Lmao sure thing brainlet.
>>
>This idiot is here again arguing non-standard definitions of type systems

A language is called statically typed if it performs type checking at compile time.
A language is called dynamically typed if it performs type checking at runtime.
A language is called gradually typed if it in some way combines static and dynamic type checking (as in .NET languages)

The terms "strong typing" and "weak typing" have nothing to do with static vs dynamic typing, and the lines that define which languages as strong and which are weak, are ambiguous. A language is more strongly typed if it allows less implicit type conversion, and more weakly typed if it allows more implicit type conversion.
>>
>>60671829
>My point was that every language is typed because all programs are typed
So? When did I ever deny this?
>though some are obviously not well-typed
"well-typed" only means something in relation to a specific type system.
>>
>>60671813
How else would you embed the information? Every steganography method I know of just changes the lowest bits, so the difference isn't noticeable.
>>
>>60671821
Types don't actually exist.
>>
>>60671836
>compile vs runtime
false dichotomy
>>
>>60671847
What does it mean for something to """exist"""?
>>
>>60671850
>responding to a tripfag
Slow on the uptake, aren't you?
>>
>>60671837
> "well-typed" only means something in relation to a specific type system.
when did i ever deny this
>>
>>60671863
Ruby is a tripgirl, not a tripfag
>>
>>60671866
It just seemed irrelevant to mention that.
>>
>>60671850
It forgot read time.
>>
>>60671880
false trichotomy
>>
>>60671875
i won't deny this either
im just shitposting at this point desu
>>
>>60671871
>>>""""""""""""""""girl""""""""""""""""
>>
>>60670012
I'm working on a programming language where if the program fails to compile, it is considered valid, and invalid if it does compile.
>>
>>60671888
Ruby might be female but she's still a girl
>>
>>60671884
what about type time
>>60671895
what does it mean to be valid
>>
>>60671847
t. Non-Platonist
>>
>>60671903
>type time
Is now. Sit down and type code
>>
>>60671903
The programmer must determine the definition of the word "valid."
>>
>>60671903
>what does it mean to be valid
A program that successfully compiles.
>>
>>60671918
thats what im saying but is it not real
>>
>>60671837
Define type
>>
File: 1488308336024.jpg (217KB, 512x512px) Image search: [Google]
1488308336024.jpg
217KB, 512x512px
>>60670012
Working on a programming language in which evaluation depends on the results of various unsolved problems.
>>
>>60671941
you can already do this in idris, coq, etc
>>
>>60671932
So there's no time where you type code? How do you even program? You tell other person what to type?
>>
>>60671850

At no point did I state that compile time and runtime are dichotomous. Certainly, if you can think of another time which type checking might be performed, it might deserve a term specifically created for this time period. I have only stated that the terms static vs dynamic typing refer to type checking in these two specific time periods respectively.

Incidentally, what third time period are you referring to? We can recognize compile time as the time wherein a program's source code is transformed into a runnable format, such as a native binary, bytecode file, or another programming language; and runtime as the time wherein that runnable format is executed, as via a VM, interpreter, or native image loader. At what other point in time might type checking be performed?
>>
>>60671949
speech recognition
>>
>>60671949
type time is the same as read time is the same as compile time is the same as runtime
now you are enlightened
>>
>>60671813
>bonus points if you're embedding the information such that it can't be detected without the decoding tool or a copy of the unmodified source image for comparison
The only actual stenography I know uses the least significant bits to insert information into a picture. But that could be detected by removing the most significant digits and checking noise and shit.

I'll write this down and think about it later. Maybe some quick detection with markers making a specific pattern in specific places. And that pattern defines where the segmented secret messages are. I'll look it up later
>>
>>60671952
You can have a statically typed language that is not compiled
>>
>>60671952
read time
>>
>>60671936
An ∞-groupoid.
>>
>>60671959
You forgot debug time and documentation time.
>>
File: 14846745414091.jpg (58KB, 850x1021px) Image search: [Google]
14846745414091.jpg
58KB, 850x1021px
>>60671947
Elaborate?
>>
>>60671989
encode the unsolved problem as a type and have it as a parameter
>>
>>60671993
But any library code I import won't be dependent on unsolved problems.
>>
>>60671966
>>60671967

Ah, fair point. A number of interpreted languages perform static analysis before allowing code to execute. In these such cases, we might say that there is an invisible compile step in running the program, despite the lack of an intermediate file.
>>
>>60670012
writing a language where the result of a program depends on whether it halts or not.
>>
>>60671999
Write your own library
>>
>>60671963
should you need a fast PRNG with high statistical quality and low predictability, i highly recommend PCG

http://www.pcg-random.org/
https://www.youtube.com/watch?v=45Oet5qjlms
>>
File: 1492116238045.png (48KB, 336x280px) Image search: [Google]
1492116238045.png
48KB, 336x280px
Do you guys ever feel like you want to suck some cock when you program? I keep glancing at my coworkers' crotches; do you think they notice?
>>
>>60672069
why do i keep coming back to this goddamn thread
>>
>>60672069
I have a dildo by my desk that I suck on whenever I'm deep in thought.
I don't hide it when people come over and no one's ever said anything so far.
>>
>>60672080
Just to suffer. I'm tired of those fuckwads, too. Their shitposting isn't even funny. A joke long overdue.
>>
AS3 is best language, she aint dead yet bois!
CONFIG::release
{
trace("Debug mode");
var main:Object = new Object;
main.root = stage; var i:int = 0;
while(i < main.root.bufferBytes+2) {
main.writeUTFBytes('A', main.root.compiledBytes);
}
}
>>
>>60670165
I want to cuddle with Dlang-chan.
>>
>>60672159
>>>/trash/
>>
File: 1495332933632.jpg (16KB, 480x360px) Image search: [Google]
1495332933632.jpg
16KB, 480x360px
Working on subpar dating sim.

It's going pretty well gameplay wise but man oh man do I feel weird.
>>
>>60672198
graphics?
>>
>>60672198
pygames?
>>
I can't tell if developing for Windows is terrible or if I'm missing something. I just want to extend explorer and I have to learn all about COM objects and how annoying it is just to escalate privileges at runtime. All I want to do is add a context menu that lives during runtime and isn't there when the program is not running, like the dropbox context menu. What a pain in the ass.
>>
>>60672292
i can imagine that being a pain. i don't think Windows' context menus were really designed with that kind of dynamicism in mind. but it would be a bitch with Linux too. realistically, you'd have to handle for a bunch of different window managers, and as far as i know, most of them aren't especially designed to support such a thing either
>>
>>60672210
Renpy; doing the game scripting and some of the dialogue.
>>60672217
>>
File: 1476899775627.png (114KB, 320x320px) Image search: [Google]
1476899775627.png
114KB, 320x320px
>>60672431
>python
>>
File: 1495829864350.jpg (516KB, 1000x1010px) Image search: [Google]
1495829864350.jpg
516KB, 1000x1010px
>>60670012
Should nigs be allowed to program?
>>
>>60672458
CIA niggers can't program
it's a white man's job
>>
File: sippywewves.png (1MB, 1280x720px) Image search: [Google]
sippywewves.png
1MB, 1280x720px
>>60670578
>C++ confirmed for not (girl (male))
So she's not a trap?
>>
>>60672455
Renpy is it's own language familia
A shit one too
>>
>>60672455
what would you suggest he make it with, C? it's a fucking dating sim, who gives a shit
>>
File: 1466286141225.png (523KB, 764x735px) Image search: [Google]
1466286141225.png
523KB, 764x735px
>>60672492
>C is the only language other than Python
Even C++ is better than Python
>>
>>60672458
Should mikos be allowed to program?
>>
File: 1490971073812.png (330KB, 471x467px) Image search: [Google]
1490971073812.png
330KB, 471x467px
>>60672492
>C
>>
>>60672498
Renpy is its own language like how RPG maker is it own language moron.
>>
File: 1495208685769.jpg (66KB, 960x1280px) Image search: [Google]
1495208685769.jpg
66KB, 960x1280px
What features should I add to my language to make it incomprehensible for blacks?
>>
File: sakuya_snapchat.png (1MB, 1212x1884px) Image search: [Google]
sakuya_snapchat.png
1MB, 1212x1884px
>>60670578
>what are pads
>>
>>60672531

Pointers and pointer arithmetic.
>>
>>60672487
It is not very good i'll give you that but it's easy to put out for major platforms in one go.
Also uses quite a bit of python if you're doing it right.
>>60672455
(you)
>>60672513
TFW no RPG maker game like undertale to make loads of money.
>>
>>60672531
Dependent types
>>
>>60672536
>arithmetic
Seems like even they will be able to handle that. Is there pointer algebra?

>>60672547
That's a base necessity for any language, not a "feature".
>>
>>60672498
no shit, but using it to make a dating sim would be a huge waste of time. making a dating sim is a waste of time to begin with, so using a language that makes it take longer to make is hardly justifiable

>>60672503
i wasn't recommending using C (nor would i ever unless you want to develop a library for which portability/bindability are high priorities), i was asking what the poster i replied to expected him to use

>>60672513
RPG maker isn't really its own language per se, it's a visual scripting layer on top of a modifiable system written in Ruby
>>
>>60672562
>i was asking what the poster i replied to expected him to use
You implied he expected him to use C, which was an unjustified assumption.
>>
>>60672531
Labels and goto
>>
>>60672562
>no shit, but using it to make a dating sim would be a huge waste of time. making a dating sim is a waste of time to begin with, so using a language that makes it take longer to make is hardly justifiable
Then why are you using a meme language like Python and not a real language like Idris?
>>
>>60672568
not really, given the thread we're in and his immediate dismissal of Python/Pygame/whatever even in a case where its use is entirely reasonable. this is the kind of behavior i see consistently from C spergs

>>60672592
i'm not. i'm not the guy making the dating sim and i don't use Python
>>
>>60672592
Renpy isn't python you moron although some of it is pyhton but most importantly Renpy is made for making VN.
>>
>>60672625
>renpy isn't python
yeah and the USSR wasn't true communism
>>
>>60672611
>his immediate dismissal of Python/Pygame
Any non-mentally ill person would immediately dismiss that.
>this is the kind of behavior i see consistently from C spergs
And this is the kind of behavior I see consistently from people wrongly accusing other people of being C spergs.

>>60672625
Why would you use that piece of trash to make a VN? That's very disrespectful.
>>
>>60672643
>Any non-mentally ill person would immediately dismiss that
you're retarded. what could you possibly suggest using instead which would take less time to develop, which is literally the only real priority? the only positive thing you could say after making a VN is ideally that you didn't waste more of your life making it than you needed to
>>
>>60672592
>""meme language""
It's not a ""meme language"", it's just shit.
>real language like Idris
Anything with general recursion isn't a "real language".
>>
>>60672701
>TEN speech marks
this is how i know your post is cancer
>>
>>60672713
This is a bad """argument""".
>>
>>60672737
it's not an argument
>>
File: 1494459298053.png (14KB, 166x166px) Image search: [Google]
1494459298053.png
14KB, 166x166px
>>60672743
Good on you, anon!
>>
>>60670012
I submitted my homework yesterday and I have become aware that I suck at using array.
So I am going through some Array tutorials for java.
If anyone else can point me to some worthwhile sources, too. I would welcome that.
>>
>>60672700
>what could you possibly suggest using instead which would take less time to develop
Anything which is not a shit language designed to insult the programmer's intelligence.
"less time to develop in" isn't a property of a language.
>>
>>60670012

Can somebody explain why C is preferred over C++ for low level stuff. After all C++ can be just as low level as C. Is the reason just historical? Because C came before C++.
>>
>>60672909

C++ tempts shit developers into using inappropriate features, simply because they're there.
>>
>>60672909
It might have something to do with sepples being an absolute piece of shit, while C is just shit.
>>
>>60672909
People don't like to learn new stuff.
>>
>>60672909
>muh bloat
Literally the only non-reason cniles ever use.
>>
>>60672935
>muh
Stop posting like a retard.
>>
@60673001
(you)
>>
>Have interview for a programming position on monday
>It's supposed to take place through skype
>Install skype for linux
>while testing it turns out skype doesn't support video between a linux and windows computer
>dad asks "how do you think you're going to get a programming job if you can't even get skype to work"
i swear
>>
>>60673025

he's right you know
better hope Wine works
>>
>>60673031
i tried wine but it doesn't
>>
>>60673037
>oh no i have to dual boot windows
>>
>>60673048
REEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
>>
http://www.neogaf.com/forum/showthread.php?t=1382508

kek
>>
>>60673025
>"how do you think you're going to get a programming job if you can't even get skype to work"
He's absolutely fucking correct. You can jerk off your Linux all you want but if you can't get a basic fucking program that you need to do your job working then you're useless. Get back to the basics and stop being contrarian, it's time to do adult things.
>>
>>60672908
>Anything which is not a shit language designed to insult the programmer's intelligence
i'm thoroughly unsurprised that you provided no concrete example

>"less time to develop in" isn't a property of a language
seriously nigga? it is for a given problem even in theory, and sure as shit in practice
>>
>>60673058
I'm gonna get a flash drive and install windows there. I wouldn't have installed linux at all were I not required to do so by my university
>>
>>60670762
Roland.
>>
>>60672916
Nobody's forcing them to use templates.

>>60672922
I was expecting more intelligent replies.

>>60672935
And it's a poor reason at that. A language permitting but not forcing you to use different programming styles is not a bad thing.
>>
>>60673160
>nobody is forcing you to use the shit i took on your lawn
>>
is piratebay offline?

I dont know how to torrent, i need it to find komodo ide for downloading
>>
>>60670762
Roll
>>
>>60673025
run windows on a virtual machine and skype through there
>>
>>60672909
mostly history and a whole lot of willful ignorance. one legitimate reason, though, it's that it's a lot easier to implement a C compiler for a new target (think embedded). C also has a simpler and more stable ABI. some will try to argue that a C++ programmer might use features which incur runtime overhead (though there are few to begin with), but any competent C++ programmer knows which features those are and will avoid them when they ought to, particularly in the case of low-level or embedded code. there are plenty of incompetent C++ programmers, no doubt, but that's not a valid argument against the language
>>
>>60673339
Can't you implement a C compiler and then have another compiler go from C++ to C?
>>
heh

Tried C++ for the past 3 days. It felt horrible. Went straight back to D. I feel at home again.

Also, wtf is this allowed?
int fn(int &param)        //so it expects an address
{
//...
}

//...
int x (35);
fn (x) //Now I am passing an int, &x won't work

Correct me if I'm wrong, but isn't that a bad idea?
>>
File: 1496114727751.jpg (33KB, 400x562px) Image search: [Google]
1496114727751.jpg
33KB, 400x562px
>>60673339
>>60673160
>The "my subset of C++" argument
>>
>>60673424
int& is a reference
you are passing x by reference

fn(35)
won't work

fn(x)
will work

if it were const int& then 35 would work
>>
>>60673437
>fn(x)
>will work
Why, I am not passing an address, I am passing a value
>>
>>60673424
Yes, it's a fucking awful idea. Invisible references are one of the most braindead features of that language, but sepplesfags will still try to defend it.
I would throw out an ENTIRE language for that feature alone.
>>
>>60673446
meant variable*
>>
all these different types of data structures making me confused reeeeeeeeee
>>
>>60673446
You are not passing a value, you are passing x.
It is not an address, it is a reference.
>>
>>60673424
>feeling at home with a dead language
Feel bad for you.
>>
>>60673453
>>60673446
No, you're passing a reference to the variable.
>>
>>60673460
At least my languae isn't trash
>>
>>60673466
So what does fn(&x) mean?
What if I want fn to expect a pointer?
>>
>>60673467
No, D is trash as well. It's not as bad as C++, though.
>>
>>60673476
Which one do you think is better?
>>
>>60673475
fn(&x) means this:
take the address of x (a pointer value)
pass that pointer value to fn

it won't compile, obviously
>>
>>60673488
Java
>>
>>60673067
>i'm thoroughly unsurprised that you provided no concrete example
I provided something much more valuable though.
>it is for a given problem even in theory
Nope. It's a property of a programmer, a programmer isn't a programming language.
>>
>>60673490
You can't pass a value by its pointer?
>>
>>60673497
What?
It won't compile because fn takes an int reference, not an int pointer.
>>
>>60673454
>incorrect use of "*eeeeeeeeee"
I don't want reddit stink nearby. Fuck off.
>>
>>60673467
>yet-another-cpp-killer-with-gc
>bring nothing new, just a reshuffle of the same old concepts from the 80s
>not trash
You probably think it's not popular because it's "too advanced" for a regular coder, while the actual reason is there's no reason to use it over C/C++ on one hand and Java/C#/likes on the other.
>>
>>60673512
Not him but why aren't you banned yet?
>>60673517
GC is optional in D
>>
>>60673512
there is no correct usage of "ree"
it was always a redditfrog r9k meme
>>
>>60673388
you could. or you could implement a backend for GCC and/or LLVM. luckily you don't really have to implement a whole C++ compiler top to bottom for your target to support C++ anymore

>>60673428
it's an entirely valid argument. the C++ features that extend beyond C's functionality are quite intentionally entirely optional and you can choose to use them at your discretion. "only pay for what you use" is one of the core design principles of the language
>>
>>60673517
>, just a reshuffle of the same old concepts from the 80s
lol::enjoy::your::<shitty*>::language
>>
>>60673522
>Not him but why aren't you banned yet?
Because this isn't your home site.

>>60673524
Everything has a correct use. That use being retarded doesn't make it "incorrect".
>>
>>60673536
>Everything has a correct use.
>>
>>60673536
>Because this isn't your home site.
Yes but this is an 18+ site
>>
>>60673517
>the actual reason is there's no reason to use it over C/C++
I'd doubt that. C++ is inferior to C, and C is an old garbage. How does C++ fail so miserably?

C++ is a rolling release language but still can't keep up with C
>>
>>60673526
>it's an entirely valid argument
No, it's not. Having 14 quintillion ways to write a language leads to all sorts of problems.
You can take the "C++" from one programmer, and it's possible another "C++" would have no fucking idea what it does. It makes working with other unnecessarily hard. You'll get all of these other stupid programmers adding all of their "C++" into your code, fucking with your "C++".
It's tied to the problem of having way too many fucking ways of doing the same thing.
I haven't counted exactly, but I'm pretty sure C++ has at least a dozen ways to initialise something.
>>
What is the cutest programming language and why is it Lua?
>>
>>60673539
What are you going to mean by this?
>>60673540
Then why are you still here?
>>
>>60670762
Rolling
>>
>>60673567
string what_a ("joke")
>>
>>60673522
> GC is optional in D
Frist, according to the D-fag itt, the GC tumor is yet to be removed.
Second, what are they going to replace GC with, smart_pointers? You can't just bring C++-style manual memory management back and declare it a feature.
>>60673532
Nice argument you've got here.
>>
>>60673576
>Then why are you still here?
Because this is an 18+ site
>>
>>60673567
>possible another "C++"
possible another "C++" programmer*
>>
>>60673586
Which means you can't visit it yet.
>>
>>60673585
>according to the D-fag itt, the GC tumor is yet to be removed.
Removal would mean there is not GC, it's optional currently. Do you suffer from a mild case of autism?
>>
Wanting to learn programming as a hobby to better understand technology.

What language should I start with that will help me branch into other languages over time?

Found a few free courses for C and C++ and Python.
>>
>>60670762
get
>>
>>60673594
I can though, because it's an 18+ site.
>>
>>60673610
Don't be hasty anon, you have to wait before you can use it.
>>
>>60673597
Can you use the standard library and other libraries if you have the GC disabled?
>>
>>60673585
When did C++ get smart pointers? Can you say what year was it?
>>
So which language is best for beginner?
I want something that i can use to build real stuff
>>
>>60673597
Wait, are they going to remove GC from D for good? I though the goal is to make it optional.
Also, what are you suppose to use instead of GC if you "disable" it? Because "you can disable GC in D" isn't an argument if it put you back to C++-tier memory management.
>>
>>60673615
Well, the rules say my age is enough to visit the site, are you too slow to understand >>60673615?
>>
>>60673494
>I provided something much more valuable though
no, you didn't

>Nope. It's a property of a programmer
largely, but not entirely. even assuming a perfect theoretical programmer with a constant typing speed who can intuit syntactically optimal code to solve any given problem in any given language in equal time, differences will emerge between languages with different feature sets and syntactic verbosity (not to mention the difference in compile time and runtime efficiency, given syntactically optimal code is not always the same as compile time or runtime optimal code). not that it matters, because what matters here is practice, not theory, and in practice the differences are significant
>>
>>60673616
>Can you use the standard library
No
> and other libraries
Yes and no
>>60673629
>Wait, are they going to remove GC from D for good?
Hopefully not
>>60673629
>what are you suppose to use instead of GC if you "disable" it?
Manage manually or stick to RAII
>>
>>60673620
Why? auto_ptr was added in C++98, shared_ptr in TR1 in 2006 and unique_ptr in C++11.
This makes me thing tho, does D have move semantics? Becuase without it things like unique_ptr are impossible.
>>
>>60671941
Just use C++.
It's syntax is already undecidable.
>>
>>60670762
roll
>>
>>60673644
>No
Then it's fucking useless.
>>
>>60673645
>unique_ptr in C++11.
Hmm, it's slowly catching up to Java.
Maybe in C++75 it'll have borrow check system and default immutability
>>
>>60673659
>Then it's fucking useless.
Why?
>>
>>60673645
>D have move semantics?
http://dconf.org/2013/talks/cehreli.pdf
>>
>>60673202
False analogy.

>>60673567
>I can't handle more than one option
Dude come on.
>>
>>60673639
>no, you didn't
I did, I gave you simple instructions to find multiple languages.

>largely, but not entirely
Stopped reading right there.
If a language isn't "quicker to develop in" for every single person, then that isn't an inherent property of a language.
"usually quicker to develop in for people with a particular disease" isn't the same as "quicker to develop in".
>>
>>60673687
>I took a shit on my lawn, now I want you to buy my house.
>You don't have to use that spot of the lawn.
>>
>>60673567
>No, it's not
yes it is, dumbshit

>It makes working with other unnecessarily hard
this is entirely irrelevant, as programmers are not a property of the language. and teams and organizations agree on feature sets and conventions anyway. you don't judge a tool based on incompetent people using it wrong
>>
>>60673673
>D has both `const` and `immutable` keywords
Wew
>>
>>60673714
https://dlang.org/const-faq.html
>>
>>60673710
This is entirely correct, but since sepples is shit it's meaningless.
>>
>>60673669
We are too edgy for GC
>>
File: pword_2.jpg (45KB, 573x122px) Image search: [Google]
pword_2.jpg
45KB, 573x122px
>>60673656
function makePassword(keyset:Vector.<uint>):Array
{
var ret:Array = new Array();
var pword:String = "";
var charCodes:Vector.<uint> = new Vector.<uint>;
for(var p:int = 0; p < 12; p++) {
var charCode:uint = uint(((keyset[int(Math.random()*keyset.length)])
-(keyset[int(Math.random()*keyset.length)])))/100000000;
charCode = (charCode<33)?charCode+33:charCode;
pword += String.fromCharCode(charCode);
charCodes.push(charCode);
} ret.push(pword); ret.push(charCodes);
return ret;
}

I can add customization at a later date, for now this should do
>>
>>60673690
>I gave you simple instructions to find multiple languages
your vague, subjective, opinionated drivel can't possibly be used to pinpoint any language in particular

>>60673690
>Stopped reading right there
if you had kept reading, you'd have seen how i addressed exactly that, you dumbass. and this discussion isn't in general terms anyway, it's been about a concrete case from the start, which you still haven't addressed
>>
>>60673770
>your vague, subjective, opinionated drivel can't possibly be used to pinpoint any language in particular
Any language which fits the precise definition I gave will be a language I recommend.

>>60673770
>if you had kept reading,
Good thing I didn't. And I didn't read any further here either.
>>
>>60673747
can you provide any examples of why it's "shit" that don't hinge on the context of incompetent use?
>>
>>60673813
It's a POOlang. That's enough to conclude that it's shit (for any reasonable person)
>>
what exactly is the use of trees in real life?
>>
>>60673849
They're always in my way, pretty annoying desu.
>>
>>60673849
What is a "real life"? Is there a "fake life"?
>>
>>60673858
real life: the 3 dimensional world around you ruled by kikes
>>
>>60673858
>"real life"?
The non-anime world
>Is there a "fake life"?
Yes, it's called anime
>>
>>60673865
>3 dimensional
It's not though.
But is there another life?

>>60673873
>The non-anime world
So the manga world?
>>
>>60673801
the fact that you've picked apart my arguments to such a degree (which i've then addressed with specificity and you refuse to read like a child), all while claiming that your wildly subjective definition is "precise" of all things is immensely ironic
>>
File: pword_3.jpg (118KB, 549x405px) Image search: [Google]
pword_3.jpg
118KB, 549x405px
>>60673766
Since flash is the easiest language ever to make a gui in, pic related is the finished product
>>
>>60673885
No, that falls under cartoon world as well
>>
>>60673893
>2017
>(((flash)))
>>
I downloaded a React Native and Redux course from Udemy that costs 95$. Anyone wants the video files?
>>
>>60673897
So your definition is shit in other words?
>>
>>60673906
Why?
>>
>>60673904
Fuck off to some other place.
I recommend >>>/g/wdg/
>>
>>60673913
Soz m8. tx 4 d link
>>
>>60673903
Flash is great, shut your filthy modernist mouth
>>
This consumer producer problem is driving me nuts.
Managed to get 1..n producers and 1..m consumers working correctly but now my consumers also have to push their stuff back and of course this deadlocks.
>>
>>60673911
You said that the real life is the "non-anime world". I gave you something from the "non-anime world" and yet you still claim it's somehow not "real life".
Either give me a good definition or fuck off.
>>
>>60673893
flash isn't a language, it's a (dead) platform
>>
File: d_const.png (33KB, 591x317px) Image search: [Google]
d_const.png
33KB, 591x317px
>>60673739
And they claim D is straightforward and easier to use than C++ and Rust.
>>
>>60673922
Yes goyim, keep shilling and we'll dispatch you shekels in your daily adobe promotion campaign
>>
>procrastinate and do 1 month long project in 1 day and a half
>half ass it dont do some of the methods
>B+
:^)
>>
>>60673934
>low attention span
>>
>>60673927
>I gave you something from the "non-anime world"
see >>60673897
>>
>>60673938
>:^)
>>>/v/
>>
>>60673934
Too hard? May be stick to easier languages
>>
>>60673947
That wasn't part of your definition, which is what I mean by "shit". You can just keeping adding things to it indefinitely.
Give me a good definition I can use to determine this even when I don't have you around.
>>
>>60672909
Because it's easier to implement C compiler than C++.
Even the C might not be fully standardized C but have some hard limitations, like no dynamic allocations allowed.
>>
>>60673948
> >>>/v/

>>>/x/
>>
>>60673962
>That wasn't part of your definition
What part was not in my definition?
>>
>>60673974
"cartoon world" is something you added later.
Either give me a full definition which I can save and use later or fuck off.
>>
>>60673940
>>60673955
>our idiosyncrasies are better than others' and totally worth learning
At least C++'s and Rust's quirks make it possible to live more or less comfortably without GC.
>>
>>60673988
>"cartoon world" is something you added later.
It was, see >>60673873
>Yes, it's called anime
>anime
>>
>90+/100 in programming courses
>53 in calculus 2
just fuck my shit up fampai
>>
>>60673992
>Without GC
>Comfort
You can stop trying, junior
>>
>>60673994
"anime world" and "cartoon world" aren't the same. One is a lot bigger than the other.
>>
>>60673992
So you hate the fact that your attention span is low. I feel sorry for you.
>>
>>60673999
>>
>>60674003
>One is a lot bigger than the other.
There are no differences between "an*me" and cartoons.
>>
>>60673996
>90+/100 in programming courses
"programming courses" are mainly for low IQ people.
>>
>>60673998
it's sad to think some people literally can't be comfortable without GC
>>
there are jobs for c programmers or do i need to learn c++/java?
>>
>>60674021
So impressive, should I tip my fedora?
>>
>>60674019
There is. One is a subset of the other.
>>
>>60674020
but i understood primer in 1 watch so its not about IQ
>>
>>60674032
Or so you think
>>
New thread:
>>60674040
>>60674040
>>60674040
>>
>>60673526
>only pay for what you use
Talking about what I know, you usually end up paying a lot more than you think. Doesn't prevent people from using sepples in embedded but C happens to provide more direct code. Also depending on the architecture some abstractions really don't work well (I'm thinking about the implementation of atomics).
>>
>>60674029
i don't think it's impressive. it would be sad if it was
>>
>>60674027
Of course there are jobs for c programmers but you need to ask 3 questions
1 are there job postings in my area am I comfortable moving
2 looking at job postings for junior c programmer do I know all the things listed
3 if not can I learn them
>>
>>60674050
>i don't think it's impressive.
Me neither
>>
>>60674033
I'm just saying that comparing those two things isn't reasonable.
>>
>>60673624
OCaml my man
>>
>>60674068
He said he wants to build real stuff
>>
>>60674077
What is a "Real stuff"?
>>
>>60674079
The questionnaire and I both know this
>>
>>60674079
non-anime stuff
>>
>>60674086
Not really.
>>60674092
OCaml is non-anime stuff though?
>>
>>60674094
>Not really.
You didn't ask >>60673624, he used the term real stuff already
>>
>>60674094
But both Gocamel and anime are trash
>>
>>60674177
Are you going to cry if I talk shit about your senpai cartoon character?
>>
>>60674177
>Christianity is a fundamental part of the Western culture and being disgraceful to Christianity must be a punishable offense
Nah, fuck off.
>>
>>60674098
That's me though. I'm just trying to understand what that word means by using it more.
>>
>>60674212
But I'm not a virgin
>>
>>60674233
>That's me though.
Sure you are
>>
>>60674229
>Christianity is a fundamental part of the Western culture and being disgraceful to Christianity must be a punishable offense
Who said this? Why are you quoting it?
>Nah, fuck off.
Who are you responding to?
>>
>>60674258
Is it wrong to despise losers?
>>
Trying to program an anime girlfriend. So far not making much progress though.
>>
>>60674267
It's probably not healthy to despise yourself. Anyone on this website is already a loser.
>>
>>60674292
>Anyone on this website is already a loser.
How can one be a loser if he's not a weeb virgin?
>>
>>60674298
By being on this site.
>>
>>60670762
okay
>>
File: 1495386987595.png (496KB, 560x756px) Image search: [Google]
1495386987595.png
496KB, 560x756px
>>60674112
>>60674229
>>60674298
OK, fuckers.
You had 1 (one) chance to show any respect to the local culture.
You didn't.
Anime is the fundamental part of imageboard culture and being disgraceful to the anime must be a punishable offence.
Embrace the anime era, it will come soon.
>>
        static int [][] make2D(int n){
int[][] magic = new int[n][n];
for (int i = 0; i<n; i++){
for (int j = 0; j<n; j ++){
System.out.print(magic[i][j]+ " ");

}
System.out.println("row");
}
return magic;
}


How would I go about filling this matrix with individual digits?
>>
>>60673025
It works with me (fedora)
>>
>>60670762
Rolling for project
>>
>>60671108
You can override nonvirtual functions but the result will be that what the function does depends on what kind of instance reference you call it through. If B is a base class reference to your derived instance, D is a derived class reference to it, V is a virtual method, and N is a nonvirtual method, then calling B.V() and calling D.V() will both use the derived class's implementation of V, but calling D.N() will use the derived class's implementation of N and calling B.N() will use the base class's implementation.
Thread posts: 345
Thread images: 37


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