[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: 315
Thread images: 56

File: trop.png (1MB, 1280x720px) Image search: [Google]
trop.png
1MB, 1280x720px
What are you working on, /g/?


Previous Thread: >>62251727
>>
File: hOg3YKLZ_400x400.jpg (16KB, 400x400px) Image search: [Google]
hOg3YKLZ_400x400.jpg
16KB, 400x400px
First for Lambda Ladies!

http://www.lambdaladies.com/
>>
>>62257690
>Nah see what you're saying works for like the most basic possible application of evolutionary algos, which isn't super interesting to me. I'm using a genetic algorithm to generate another algorithm which will be used for approximate time series prediction. Doing what you're saying would basically involve iterating over the entire dataset for every reproduction, which would obviously be retarded.

What I'm saying works for any application of evolutionary algorithms. You have to have a fitness function, period. What you don't want to do is have a fitness function that requires the entire time series data set as its input, which is reasonable, but you'll still need to have a fitness function. The three obvious solutions that come to mind are to randomly select a subset of the time series data and use that as input for the fitness function for every individual, select a random subset of the data for each individual's fitness function (instead of having a single subset for every individual) or find some way to estimate how good an individual is without testing it on the time series data itself.

I know this will sound rude (and it is meant to be a little rude), but I don't know why you're trying to use evolutionary algorithms if you think you can somehow escape the usage of a fitness function. Even your original suggestion of using the parents' average fitness as the new individual's fitness is a fitness function, just not how an usual one would be.
>>
>>62258573
Trying to learn Haskell

What would the proper form of writing this function in haskell be? I'm getting "Parse Error"˘
I want to use pattern matching to recursively iterate through a list (sort of what Lisp does with cons / car / cdr)

let sum_list
| [] = 0
| (a : b) = a + sum b


let length_list
| [] = 0
| (a : b) = 1 + length_list b



Unrelated question, but is the way above how you define functions? Is there a specific "Function" Keyword I should know about?
>>
File: god is dead and we killed him.jpg (9KB, 300x168px) Image search: [Google]
god is dead and we killed him.jpg
9KB, 300x168px
>>62258573
>typecasting void pointers is necessary in C++
>>
>>62258714
that's what you get for using c calls in c++
>>
>>62258714
that's what you get for using c++
>>
>>62258714
that's what you get for
>>
>>62258714
that's what
>>
imagine using a language without nonblocking io in its stdlib
>>
>>62258679
1) Don't use "let" at the top level
2) Pattern matching doesn't use "|"s like function in OCaml

there are 2 ways of doing it
sum_list x = case x of
[]
(a : b)
-- and
sum_list [] = ...
sum_list (a:b) = ...


using the extension LambdaCase you can get something similar to function

sum_list = \case
[] ->
(a:b) ->
>>
>>62258679
>>62258796
Though you CAN use |s for boolean conditions, e.g.
f a b | a > b = ...
| you <- can also bind stuff
| otherwise = ...
>>
>>62258785
just hack it to use kernel calls, lel
>>
>>62258769
you need
>>
>>62258796
Hm... I'm doing this:

sum_list x = case x of
[]
(a : b)
-- and
sum_list [] = 0
sum_list (a:b) = a + sum_list b



but ghc complains of a parse error on the top line... Am I fucking up somewhere obvious?
>>
>>62258886
i mean one or the other

in the first case obviously you also need -> someexpr
>>
>>62258886
sum_list x = case x of
[] -> 0
(a:b) -> a + sum_list b

(X)OR

sum_list [] = 0
sum_list (a:b) = a + sum_list b


they're equivalent
>>
I made escherize.com/colors with clojurescript.
>>
>>62258573
Anyone have that image with around 100 programming challenges? The challenges are colored differently based on difficulty.
>>
>>62258952
No, nobody has it and nobody will post it.
>>
>>62258914
>>62258903
Oh fuck me I'm a moron. Sorry about that.

I'm now getting a parse error on line 25 (code below)
surf_area_cyl [r, h] = pi * r * r * h


Is there a way to have ghc be more verbose?
>>
File: 1477623301642.jpg (40KB, 405x650px) Image search: [Google]
1477623301642.jpg
40KB, 405x650px
>Modern C++'s selling point is garbage collected pointers
>Shits on other garbage collected language
Why the fuck C++ tards act so edgy in language forums?
>>
File: ProgrammingChallenges, 4.0 (HD).png (2MB, 3840x2160px) Image search: [Google]
ProgrammingChallenges, 4.0 (HD).png
2MB, 3840x2160px
>>62258952
Yes!

>>62258959
I'm only posting it to spite you
>>
>>62258974
Stop same fagging you fucking faggot
>>
>>62258967
It's the let that's an error
You don't use lets at the top level.
You use them locally.

For the abcpqx, use "where"

solve_poly = ...
where a = .....
b = ... -- it's important that "b" starts at the same column as a
>>
File: 1504454183061.png (130KB, 1369x217px) Image search: [Google]
1504454183061.png
130KB, 1369x217px
>>62258573
daily reminder
>>
>>62258993
unironically a good post
>>
C# in Depth or Accelerated C#? Some other third thing?
>>
>>62258974
Thanks.
>>
>>62258969
>reference counting is garbage collection
>what are closures
>what is type deduction
>what is std::move
>what are variadic templates
>>
>>62259103
>reference counting is garbage collection
>it isn't
>>
>>62258982
So not only are you a moron, you're also apparently a manchild that goes on technology forums just to cause a stir that no one but you finds funny and throws around baseless accusations that only derail conversations about programming.

You are such a cool person.
>>
>>62258993
delete this
>>
>>62259113
are you implying the linux kernel is garbage collected?
>>
Now I'm getting a really weird error.

I'm not really sure I understand the error, but I think it's something to do with me accidentally confusing ghc with the types I'm using.

Anyone know what a better way of doing this print statement would be? (I am getting some errors here, but most of the errors are from the 'solve-poly' method

main = print( a + '\n' + b '\n' + c +'\n' + d)
where a = area_sqr 1.532
b = average_list[1.23, 2.45, -6.50, 9.76]
c = solve_poly
d = do
putStr( show $ surf_area_cyl[5.678, 1.234])
putStr( show $ surf_area_cyl[9.765, 0.864])
putStr( show $ surf_area_cyl[5.371, 9.364])

>>
>>62259103
How is reference counting any better than garbage collection?
>Other stuff
Are those exclusive to C++?
>>
I'm excited to see where this goes.
https://dlang.org/blog/2017/08/23/d-as-a-better-c/

>>62259083
C# a shit. Learn D: http://ddili.org/ders/d.en/index.html
>>
>>62258714
that's what you get when you let your heart win
>>
>>62259139
All of your things have different types and none of them are strings.

also, putStr (show x ++ "\n")
is just (print x)

main = do
print a
print b
print c
d
>>
>>62259140
>How is reference counting any better than garbage collection?
because you don't have to waste cycles on a reachability algorithm?
>>
>>62258974
nice la
>>
File: 1496232402981.png (1MB, 1920x1080px) Image search: [Google]
1496232402981.png
1MB, 1920x1080px
Reminder programming is a lot more fun when you imagine they're a bunch of cute girls.
>>
Looking for recruit programmers to help me with the game I'm making. Must have a PhD in computer science/math/physics and five years' experience programming professionally. Hit me up.
>>
>>62259187
but it works in JS, is Haskell always this useless?
>>
>>62259304
*Looking to recruit
>>
>>62259139
>>62259187
Huh? You're assigning what looks like a function to a variable. That might be your problem.
>>
>>62259311
JavaScript doesn't have types you moron
Try actually learning the language
>>
>>62259246
C# stands for CuteSharp
>>
File: 1477603909050.jpg (48KB, 500x500px) Image search: [Google]
1477603909050.jpg
48KB, 500x500px
>>62259246
>when you imagine they're a bunch of cute girls.
That goes for anything.
>>
>>62259334
That isn't the problem, functions are just regular values.
Haskell is pure so it isn't assignment, it's definition.

>>62259311
'\n' is a Char
+ adds to num's of the same type
d is an IO ()

There is absolutely no reason that what you typed should work.
It is insane and shows you don't really know the language.
Please read a tutorial.
>>
can i go ahead and delete a forked git repo while waiting on a pull request

or will it delete the pull request
>>
>>62259335
Javascript has types

>typeof 3
"number"
>typeof "3"
"string"
>>
File: 1504445509270.jpg (61KB, 468x487px) Image search: [Google]
1504445509270.jpg
61KB, 468x487px
>>62259246
What if my attraction to C is because I'm subconsciously imagining it as a mommy gf? I get boners when I program in C.
>>
>>62259334
There is literally nothing wrong with this.

Action<Action> muhHigherOrderFunction = a => a();
>>
>>62259378
It doesn't have static types and most of its shit almost pretends there aren't any types.
Please at least try a tutorial before asking EXTREMELY stupid questions like

"why can't I add integers to chars to io actions"
>>
File: 1385922039966.png (431KB, 640x478px) Image search: [Google]
1385922039966.png
431KB, 640x478px
>>62259387
>I get boners when I program in C
I thought I was the only one.
>>
>>62253288
this works fine, what are you talking about? i can't replicate your problem
>>62253310
>>62253358
none of these are right... while(((c = getchar()) != EOF) {...} is correct. it's an idiom
>>
>>62259405
That wasn't me anon
>>
>>62259433
well whatever, saying Javascript has types is stupid, it doesn't in any meaningful way
>>
>>62259334
>>62259187
Thanks for all the help!

I've been using kind of an old Haskell book ("Intro to Functional Programming Systems Using Haskell") but I think I might switch over to "Haskell from First Principles" just so I'm not as lost in the later chapters
>>
>>62259459
HFFP starts off with a bunch of lambda calculus

You could try "Learn Yourself a Haskell" or the Haskell Wikibook (both are free online)
>>
File: 1500151383410.jpg (42KB, 600x740px) Image search: [Google]
1500151383410.jpg
42KB, 600x740px
>>62259417
I built an html parser, web crawler, and refresh scheduler(for wiby.me) in C. It can crunch the nastiest of the nastiest html files in about a second.
>>
>>62259422
If I recall correctly, he's on windows.
>>
>>62259484
EOF is part of the stdio library so it should work either way. the newlines won't increment since windows use \r\n but that wouldn't cause an infinite loop
>>
>>62259472
>HFFP starts off with a bunch of lambda calculus
That's a good thing.
>>
>>62259505
It starts with A LOT of lambda calculus
A SIGNIFICANT part of the book
>>
>>62258573
>what are you working on
Writing a method that automatically compiles a CSV to json representation given a set of rules stored inside mongo db.
>>
>>62259525
Then it is likely an excellent book.
>>
>>62259538
No, it really isn't.
The last thing someone wanting to learn Haskell needs is to pick up a book which is practically a third about LC.
They do not need to know how to write factorial in the untyped lambda calculus without primitives.
They can learn that later.
>>
>>62259583
you need to know how to crawl before you can learn how to run
>>
>>62259600
Except basic Haskell isn't running, it's crawling, while untyped church encoded factorial is like walking on your hands
>>
>>62259472
>>62259525
learn you a haskell is a reddit book
>>
>>62259624
Just because the humour is cringeworthy doesn't mean I'm going to tell him not to learn it
>>
How can I install the Visual C++ build tools in windows xp?
>>
What is the point of restrict? It seems redundant. I see this example:
void foo(int restrict *p, int restrict *q, int restrict *r) {
*p += *r;
*q += *r;
}

But I raise that you could just do:
void foo(int *p, int *q, int *r) {
int x = *r;
*p += x;
*q += x;
}
>>
File: superthumb.jpg (29KB, 300x250px) Image search: [Google]
superthumb.jpg
29KB, 300x250px
>want to write my own matrix functions to learn more about low level programming
>apparently, matrix function optimizations are all about tight memory management and abusing specific ASM instructions
>don't know shit about ASM
>can't even look at examples from already existing libraries because I can't read/understand them at all
>don't know where to start
Why is programming so difficult.
I'd just make one for learning purposes anyway, but what's the point when the naive implementation and optimized implementations require such different skill sets that the naive implementation won't even teach you anything anyway? It won't even be useful because ASM optimized math functions run at 10% of the time compared to optimized implementations.

I'm too much of a brainlet for this, why is programming so difficult?
>>
>>62259801
optimisation
>>
>>62259827
You don't need to dip into ASM. You can call SIMD intrinsics from C by including a header like xmmintrin.h.
>>
>>62259835
The same optimization is performed by writing the latter code.
>>
>>62259827
sasuga dumb frogposter
>>
>>62259870
no

https://en.wikipedia.org/wiki/Restrict
>>
>>62259827
You don't need to go lowest level to go low level.
>>
>>62259920
You have no idea what you are talking about.
>>
>>62259976
I am aware that restrict pointers enable optimisations.
>>
Is it possible to optimize a C# .net DLL any more than what the default VS settings will net you?
>>
>>62260003
If you could read you would see that I lifted my example from that Wikipedia page. restrict enables the exact optimization I have done by hand (it's not exactly heroic, it's actually fewer characters and doesn't needlessly require p and q to be non-aliased).
>>
File: 1498435585165.png (180KB, 1304x641px) Image search: [Google]
1498435585165.png
180KB, 1304x641px
>>62259343
She's the best
>>
>>62260045
Actually, I guess it makes no difference if p and/or q are restrict or not. Still, I don't see the point of adding a whole language feature for such a simple optimization. A load should be a load without any hidden tricks.
>>
>2017
>using a language without coroutines or features that allow simple implementation of coroutines
Why would you do this to yourself?
>>
>>62260209
because we have threads
>>
>>62259801
theoretically, modern compilers will already do this optimization regardless of the use of the restrict keyword
which is likely why they C++ standard doesn't even have the keyword
>>
>>62260099
Boring language, cute girl!
>>
>Engineering program requires that everyone take a javascript course
>The lectures are two hours long and consist of a guy who is 70 years old (who has been working on computers for nearly half a century) ranting about pretty much everything but javascript
wuh
>>
>>62260310
>elderly computer professor digresses for two hours every lecture
those are the best classes, by far
>>
File: ....jpg (18KB, 200x256px) Image search: [Google]
....jpg
18KB, 200x256px
>>
>>62260351
D is dead
>>
File: !!!.jpg (35KB, 200x256px) Image search: [Google]
!!!.jpg
35KB, 200x256px
>>62260370
>>
>>62259966
Might as well code in fucking javascript, then.
It'll perform on par with unoptimized "low level" programs anyway.

What is it about CS that is so conductive to reinventing the wheel so many times?
Why does EVERY language have to have its own fugging library that does the same shit, and then some cross-language dynamic libraries on top?

Intel publishes spec for feature X, why not have an implementation that ALL languages can use?
>>
>>62260401
because different people write the libraries and standards for every different language
and they all think they're doing it the best way
>>
>>62260399
D was never alive
>>
>>62260275
Isn't about the language, is what you make out of it
>>
File: dlang chan.png (319KB, 470x545px) Image search: [Google]
dlang chan.png
319KB, 470x545px
>>62260466
>>
File: !!!!!!!!!!!!!!!!!!!!!!!.jpg (35KB, 200x256px) Image search: [Google]
!!!!!!!!!!!!!!!!!!!!!!!.jpg
35KB, 200x256px
>>62260466
>>62260471
>>
File: dlang_chan.jpg (139KB, 470x545px) Image search: [Google]
dlang_chan.jpg
139KB, 470x545px
>>62260471
>implying you wouldn't fuck a zombie
>>
>>62260508
D is just a figment of your imagination, it never existed in the first place
>>
File: !!!!!!!!!!!!!!!!!!!!!!!.jpg (39KB, 200x256px) Image search: [Google]
!!!!!!!!!!!!!!!!!!!!!!!.jpg
39KB, 200x256px
>>62260526
>>
File: d lang.png (909KB, 1280x720px) Image search: [Google]
d lang.png
909KB, 1280x720px
>>62260551
RIP romanian vampier
>>
How can I process user input line by line in standard Rust? I don't want to read the whole buffer at once
use std::io;
use std::io::Read;

fn main() {
let mut input = String::new();
io::stdin().read_to_string(&mut input).unwrap(); // does this read the whole input?
for line in input.lines(){
//processes one line at a time
}
}
>>
>>62260644
Don't bother, it doesn't even have async io in its standard library
>>
>>62260653
Answer my question or buzz off
>>
>>62260658
You're allowed to swear here anon
>>
>>62260653
Unlike C/C++, installing/using/maintaining libraries is a breeze in most modern languages
>>
File: 1504327150711.gif (939KB, 317x360px) Image search: [Google]
1504327150711.gif
939KB, 317x360px
>>62260644
>rust
>>
>>62260673
third party dependencies are death
>>
>>62260690
If you don't use any other library than the stdlib you never really programmed anything
>>
>>62260708
been burned too many times anon

as much as possible is done in house now
>>
>>62260644
use std::io::{self, BufRead, BufReader};

fn main() {
let sin = BufReader::new(io::stdin());
for input in sin.lines() {
//processes one line at a time
}
}
>>
>>62260708
the only library I use with C++ outside the standard is libcurl
and not directly; I use a C++ wrapper I wrote for it years ago
>>
File: Anon gets tricked tw(...).jpg (1KB, 16x125px) Image search: [Google]
Anon gets tricked tw(...).jpg
1KB, 16x125px
are there any good beginners books i can buy anywhere that will basically give me an intro course to c++? I have a large amount of time on my hands and feel that it is going to waste so I want to learn something new

Thank you /g/
>>
>>62260828
Here's a list: https://pastebin.com/r2PB21PA
>>
Aah fuck it. Ffmpeg is apparently dropping a lot of segments when streaming hls video, resulting in shitty shitty files. I just had bad luck the first few times and didn't notice. Now I have a week's worth of unwatchable streams. Switching over to streamline asap.
>>
File: 1431483149744.png (210KB, 500x706px) Image search: [Google]
1431483149744.png
210KB, 500x706px
Actually does make me wonder why this general doesn't have any info in its title/pastebin.

You know, just basic info/guidelines on some books and languages.
>>
>>62261001
NEET loli
>>
>>62261001
Such information is already collected at places like stack overflow and plebbit, and if an anon wanted to learn, they would easily find such resources. With that said, I wouldn't mine creating a /dpt/ neocities site if anons fed me stuff they wanted catalogued.

>>62261031
smelly NEET loli
>>
File: linus tech tips.png (748KB, 865x789px) Image search: [Google]
linus tech tips.png
748KB, 865x789px
Explain this linux fags
>>
>>62261081
Yeah, I know it is. 'We' do, other people might not. I'm just saying, not even suggesting, I don't really know much myself (books, etc) to want to make it.

Wouldn't hurt.
>>
>>62261108
We could link to the programming section of the /g/ wiki (which many anons forget about it, but I think that's because this board is practically dead and filled with newfags).
>>
>want to progtam something with libcurl
>no easy tutorial
Python was easier
>>
>>62260310
>Engineering program requires that everyone take a javascript course
The state of amerishit education
>>
How the fuck do I understand object orientation in Ruby!!!! It's just not sticking
>>
>>62261200
Easy. Objects are gay.
>>
>>62261376
Help!!!! This is life or death. I need to learn object orientation within the next 2 days! I can sort of do it but it gets to a point where I lose track of everything and just don't understand it anymore.

Any good links to resources or diagrams to help me better understand it?
>>
>>62261476
Post a loli; then I'll help you, anon.
>>
>>62261552
I don't have shit!
>>
>>62261563
Just go to a booru and grab any cute loli.
>>
>>62261568
You do it. And then help me with this plague that is object orientation of ruby
>>
>>62261582
Get a loli, anon, and I'll help you. It's that simple.
>>
What is vsync exactly and can I do it manually? The problem is that I want to separate frames (drawing frames) from ticks (logical frames, during which everything changes). Now, with vsync, I cannot go above monitor refresh rate, so I cannot do like, say, 60 fps and 300 ticks per second for better physics, I'm stuck with 60 ticks per second which is ultra slow motion.

So if I implement vsync myself, that is, don't push new frame until (1.0 / MONITOR_REFRESH_RATE) seconds have passed since the last frame, do I lose anything? I mean why is such a trivial thing implemented in the driver when it should clearly be programmers responsibility, or am I missing something?
>>
File: nya.gif (2MB, 800x450px) Image search: [Google]
nya.gif
2MB, 800x450px
>>62261582
>>62261563

>not having a single loli
>>
>>62261611
My IQ increased watching that gif.
>>
>>62261611
My IQ decreased watching that gif.
>>
>>62261611
My IQ stayed the same watching that gif.
>>
when im writing a resume should i stick to system default fonts or does it not matter?

im worried about those automated systems getting confused if i use a font like roboto because they most likely wont have them
>>
>>62258935
how's clojurescript, is it as good as clojure?
>>
File: 1462009264828.gif (354KB, 640x360px) Image search: [Google]
1462009264828.gif
354KB, 640x360px
What does /dpt/ think of l(isp)olis?
>>
>>62261200

Everything in Ruby that can be assigned to an identifier is an object. Even classes are objects. Even methods are objects (although accessing them as an object requires sending the method method to an object with the name of that method).

Objects can contain other objects. You can interact with an object by sending it a message, which is accomplished by calling a method on that object. When you send an object a message, it does stuff. Sometimes it sends messages to the objects it has as a result of receiving a message.

But really, ignore all of that. Ruby has a unified type system. Methods are just fancy functions that use a dot syntax. Those functions can be called on anything, not just your typical numbers, strings, and data structures.
>>
>>62261607
What's there to stop you from having a 120 tick or whatever physics simulation? Just render based on the 60 tick cycle but keep updating your data otherwise. vsync doesn't prevent that.

There's hardware details that the userland programmer can't duplicate in software, which is why vsync is handled by the drivers. See: https://en.wikipedia.org/wiki/Screen_tearing#V-sync
>>
>>62261970
C'mon fag, make him work for his information. I'm still waiting on my damn loli.
>>
>>62261973
Vsync literally sleeps and prevents main thread from continuous execution. Should I spawn another thread for ticks? That seems stupid.
>>
>>62262005

But I like helping newbies. It's what makes /dpt/ fun.
>>
File: fps.png (7KB, 482x313px) Image search: [Google]
fps.png
7KB, 482x313px
>>62262047
pic related
>>
File: vsync-on.png (5KB, 163x260px) Image search: [Google]
vsync-on.png
5KB, 163x260px
>>62262061
That was with vsync disable and doing software vsync (monitor refresh rate is 59).

Now here is with hardware vsync enabled.
>>
File: 1496345369729.jpg (8KB, 250x244px) Image search: [Google]
1496345369729.jpg
8KB, 250x244px
How did you guys learn how to program?

I'm genuinely curious as someone who has a long history of hitting walls with it and being unable to stick with it. I'm hoping some of your life experiences will help me see how i'm going about it wrong.
>>
File: warmth.jpg (170KB, 1252x886px) Image search: [Google]
warmth.jpg
170KB, 1252x886px
who would you pick
>>
>>62262142
University
>>
>>62262142
get into it young, any time before age 13 is fine
you missed the boat
>>
>>62262150
the one who values comfy, obviously
>>
>>62262150
fuck, marry
>>
I have a massive 2d String array with 100 elements inside.

I want to change 10 of them randomly to #

I've been stuck on this for hours now. wtf. I can't remember how I used to this shit. Im a junior trying to remember this freshman year basics just in case


String[][] arr = new String[10][10];

for(int i = 0; i< arr.length; i++)
{

for(int c = 0; c<arr[i].length; c++)
{
arr[i][c] = ".";
System.out.print(arr[i][c]);

Random rn = new Random();
int rand = rn.nextInt(10);
//System.out.print(arr[i][c].replace(arr[rand], "$"));


if (c == 9)
{
System.out.print("\n");

}


}

[\code]
>>
>>62262087
Of course it's going to block the rendering thread while the buffers are getting swapped. How else do you think it's going to prevent tearing?

Run your logic in a separate thread and poll it from the rendering one. Most modern game engines do this.
>>
>>62262245
generate 10 random pairs of ints where each element is 0..(n-1) then just iterate over the list of pairs and change arr on current pair.
>>
>>62262150

Girl on the right. She'd probably enjoy a good cuddle.

>>62262142

From a shitty C++ tutorial... then I just started reading tons of source code until I got a sense of how different kinds of things were made.
>>
File: Thinking_Face_Emoji_grande.png (143KB, 600x600px) Image search: [Google]
Thinking_Face_Emoji_grande.png
143KB, 600x600px
Hold on me laddies.
I wanted to trick le system by creating a dictionary table by using enums as array indices instead of hashed strings.
Fair enough, you can do that to output your indices and values.

But to READ values from the enum indexed array from, say, a command line, is actually not possible without either matching every input string to enum name in a for loop, OR going back to hashing strings, right?

Like, fundamentally? Like, my API has a function to convert strings to enums, but it's actually doing a for loop behind the scenes, isn't it?
>>
>>62262282
Thanks.
>>
How do i find out if anyone is downloading my shit on github? I can only see the number of clones
>>
>>62262401
first character of string becomes the index
wham bam O(1) lookup
>>
>>62262401
i cant actually tell what your question is, but any hashmap/map/dictionary used by you or behind the scenes in the interpreter/compiler/whatever has O(1) lookup (i think technically a little more but not in any significant way), so theres no for loop behind the scenes slowing anything down in O(n)
>>
>>62262449
That's, like, a REALLY shitty hashing function that guarantees a collision for every one in 26 inputs or more.
And doesn't solve the problem of non continuous data allocation.
Actually, in fact, if you used arrays, you'd be allocating empty space for hash misses.
>>
>>62262401
>>62262481
Yup, just map string inputs as keys to respective enum value
>>
A shell question.
How do I learn ffmpeg? Right now I want to convert any audio containing file into uint8_t 22050 Hz mono PCM, but I've no idea how to do it.
I'm mainly interested in ffmpeg for using it to convert complex formats into ones that I can very easily parse and process.
Any good tutorials, books, sites that are better than just "man ffmpeg"?
>>
>>62262401
dumb emojiposter
>>
>>62262333
I've been trying that was my line of thinking. My code is the closest I was able to get to that or so I believe.

I'll be back in the morning. Going to sleep on it.
>>
>>62258573
What's wrong with casting the return value of malloc()?
>>
File: you wouldn't cast malloc.png (119KB, 563x378px) Image search: [Google]
you wouldn't cast malloc.png
119KB, 563x378px
>>62262939
Because we'll ridicule you.
>>
File: 1502587216059.jpg (21KB, 201x187px) Image search: [Google]
1502587216059.jpg
21KB, 201x187px
How do I have a variable set to 0 only the first time it is called in a recursive function without using global
>>
>>62258714
As it should be.

>Implicitly casting void* to T* of arbitrary T is at all acceptable, in any way whatsoever.
Cfags are fucking retarded.
>>
File: 1492758343932.jpg (19KB, 478x571px) Image search: [Google]
1492758343932.jpg
19KB, 478x571px
>>62262939
[spoonfeed]https://stackoverflow.com/questions/605845/do-i-cast-the-result-of-malloc[/spoonfeed]

Now go, and sin no more.
>>
>>62262481
Look, my language allows me to do something like this:
type TypeSpectrum = (Red, Orange, Yellow, Green, Blue, Violet); 
var Color: TypeSpectrum;
for Color := Red..Violet do
Write(Color + ' '); //Prints "Red Orange Yellow Green Blue Violet"
end;


Now it also has the following functionality:
//Some type info library includes and declarations here
GetEnumValue(TypeSpectrum, "Yellow"); // Returns enum type Yellow

I'm wondering what the fuck it's doing behind the scenes in the above snippet. My guess is probably iterating over the internal type[index]="Token" symbol table, which is O(n), but not critical for such a small array. What I'm wondering is if there's some backend black magic that allows the compiler to do it more efficiently, or if I was right about there being an internal loop.

Am I curious enough to dig through the sources and find out? Dunno.
>>
>>62262965
You could try a static variable with an initially invalid, but that could result in a bit of housekeeping for subsequent top-level calls. You could mitigate that by having an extra normally-unused argument that would contain a default value for that variable, though.
>>
>>62262965
Use type default value flags, of course.
Wait, you language doesn't have those? Hahahaha
>>
>using a language without garbage collection

literally why?
>>
>>62263071
GC is obsolete and inadequate.
>>
File: 1504551311136.png (287KB, 640x548px) Image search: [Google]
1504551311136.png
287KB, 640x548px
>standard C library is a bunch of MACRO hacks
>most C programs are bunches of MACRO hacks
Why is this allowed?
>>
>>62263071
I don't have 5 times more memory than I am using.
>>
>>62263286
Because C is inexpressive and everything is a hack.
>>
>>62258573
I want to learn a at least 3 languages within the next two months, is this possible. Atm im doing a number of projects, and learning red hat and a few other sys admin stuff. Is 2 months not enough time?
>>
>>62263487
No, you'll get a shallow understanding of each language--especially if it's something like (or is) C++. Pick one and learn that.
>>
>>62263487
It's possible
>>
File: retard.jpg (35KB, 600x239px) Image search: [Google]
retard.jpg
35KB, 600x239px
imagine being this retarded
>>
I asked in the two previous threads but I still can't fix it.
The following program compiles but I can't run the executable on a file, it tells me "Illegal instruction: 4", which under macOS means I'm using instructions my processor doesn't understand.
I tried compiling it with different flags but to no avail.
Valgrind doesn't give me any useful information either.
What the fuck?
#include <stdio.h>
#define LIMIT 25
#define IN 1
#define OUT 0
int main()
{
int input, i, j, status;
int length[LIMIT];
for (i = 0; i < LIMIT; ++i) length[i] = 0;
status = OUT;
while ((input = getchar()) != EOF) {
if ((input >= 'A' && input <= 'Z') || (input >= 'a' && input <= 'z')) {
status = IN;
++j;
}
else {
status = OUT;
++length[j];
j = 0;
}
}
for (i = 0; i < LIMIT; ++i) {
printf("%d: ", i);
for (j = 0; j < i; ++j) printf("*");
}
}
>>
>>62263629
>macOS
There, there is your problem
>>
>>62263539
Alright, what are you working on atm if i may ask
>>
>>62263570
YOU ARE SO FAT
>>
>>62263638
I really don't care for the OS flamewars, I'm just looking for help.
>>
File: 1499909693425.jpg (30KB, 347x491px) Image search: [Google]
1499909693425.jpg
30KB, 347x491px
>>62263629
Use a debugger and/or read the documentation for your compiler.

>>62263638
Loli haet shitposting.

>>62263661
The backend for a website whose content is user driven. That and I also have to make a few utility libraries because the language I'm using has a growing but weak ecosystem.
>>
>>62263775
>debugger
Well fuck for some reason valgrind didn't detect anything but lldb gives me an error. Apparently the
++length[j];

is an error, but why? It doesn't cause a leak or anything.
>>
>>62262965
You could pass it in as a parameter and have the recursive calls all set it to whatever it should actually be.
Or. You can leave the parameter out of the recursive calls and have a 'base step' function that kicks off the recursion. It'd be a specialized case for the recursive call.

There's concerns with both of these but none that you haven't already dismissed when you chose to make a recursive function.
>>
>>62263829
Because you do (++length)[i]
>>
>>62263867
So K&R's notation is obsolete?
>>
>>62263570
>Go programmers are colloquially known as 'Gophers'
Vermin.
>>
>>62263829
>for some reason valgrind didn't detect anything?
Why would it? It's never been about catching every memory issue.
It's a very specialized tool. Seems entirely inappropriate for small programs like this.
>>
>>62263867
This notation is caught as an error by the compiler, by the way. "Can't increment value of type int [25]".
>>62263910
I figured I could just use it to detect segfaults more easily than with lldb. My bad.
>>
>>62263286
>I'm too stupid for macros
>Therefore nobody is allowed to use macros
>>
>>62263629
If your compiler is spitting out "illegal instructions", your toolchain must really be fucked up.
Install Gentoo and program on that instead.
>>
File: 1438842903710.gif (3MB, 512x384px) Image search: [Google]
1438842903710.gif
3MB, 512x384px
>>62263942
>>
>>62263942
No, the tools are up to date.
It turns out that the error disappears if I initialize j after I declared it so it has a value of 0. Then I can increment the array just fine. It still doesn't make much sense to me. If the problem came from trying to access a part of the array that wasn't defined, shouldn't the compiler just given me a segfault instead of telling me it's an illegal instruction?
>>
>>62263829
If you're writing C or C++ do yourself and the world a favour and use AFL + ASAN

Please.
>>
I just accepted entry level .net job and they want to send me to a 3 month long bootcamp before I even start. Is that normal?

They added me to a slack channel and gave me a bunch of stuff to read and install, but apparently I don't even get to see them for 3 months?
>>
>>62264137
>getting paid for 3 months of training

you realise you should be happy right
>>
>>62264137
Are they paying for it?
Are you getting paid while you're doing it?
>>
>>62263953
sit on my lap and I might, anon chan :3
>>
>>62264198
Well I'm coming on as a salaried employee so I assume I'm getting paid while doing it? This is my first big boy job which is why I'm just radiating confusion.

The place is in Vancouver and the bootcamp is in Seattle, so it's kind of going to be a logistics nightmare for me. I can make it work but it feels like they're investing way too much in me, considering the only technical interview we had was over the phone
>>
>>62264080
>use AFL + ASAN
Why?
>>
w-where do I start
>>
>>62264272
because you probably have a bunch of bugs and memory access problems that you can catch with those? because fuzzing your program is a good idea for testing it?
>>
>>62258573
Learning Urbit

I feel like a wizard.
>>
Do you guys think that now the original t9 patent is about to expire, people will start to bring it back?
It was obviously the best input method ever created aside for a full keyboard, so I assume it is the patent that have held back technology for so long.
>>
>>62264282
Install GNU/Linux.
Learn C.
Become a kernel hacker.
>>
>>62264327
You mean install OpenBSD.
>>
>>62264342
Nah, only cucks use BSD.
Use an operating system that protects your freedoms.
>>
import java.io.*;
import java.net.*;
import java.awt.*;
import java.awt.event.*;

import javax.swing.*;

public class Client extends JFrame{

private JTextField userText;
private JTextArea chatWindow;
private ObjectOutputStream output;
private ObjectInputStream input;
private String message = "";
private String serverIP;
private Socket connection;

//constructor
public Client(String host){
super("Client");
serverIP = host;
userText = new JTextField();
userText.setEditable(false);
userText.addActionListener(
new ActionListener(){
public void actionPerformed(ActionEvent event){
sendMessage(event.getActionCommand());
userText.setText("");
}
}
);
add(userText, BorderLayout.NORTH);
chatWindow = new JTextArea();
add(new JScrollPane(chatWindow));
setSize(300, 150); //Sets the window size
setVisible(true);
}

//connect to server
public void startRunning(){
try{
connectToServer();
setupStreams();
whileChatting();
}catch(EOFException eofException){
showMessage("\n Client terminated the connection");
}catch(IOException ioException){
ioException.printStackTrace();
}finally{
closeConnection();
}
}

//connect to server
private void connectToServer() throws IOException{
showMessage("Attempting connection... \n");
connection = new Socket(InetAddress.getByName(serverIP), 6789);
showMessage("Connection Established! Connected to: " + connection.getInetAddress().getHostName());
}

//set up streams
private void setupStreams() throws IOException{
output = new ObjectOutputStream(connection.getOutputStream());
output.flush();
input = new ObjectInputStream(connection.getInputStream());
showMessage("\n The streams are now set up! \n");
}
}
>>
>>62258993
>tfw when I was going to start exercising last night but didn't do anything at all because I was afraid of incorrectly activating my transverse abdominus
>>
>>62264327
What's the easiest distro? And how long until I can use Adobe and play vidya on Linux?
>>
>>62264350
OpenBSD literally does that.
>>
>>62264414
Why on earth would you want to use Adobe garbage?
>>
>>62264435
Editing videos, family
>>
File: 1503971644344.jpg (26KB, 293x313px) Image search: [Google]
1503971644344.jpg
26KB, 293x313px
>can't program in python because it wouldn't be cool
>>
File: trisquel-logo-compact.png (44KB, 300x300px) Image search: [Google]
trisquel-logo-compact.png
44KB, 300x300px
>>62264350
Trisquel is the answer.
>>
fuck opengl though
>>
>>62263570
This is actual autism
>>
>>62263942
illegal instruction actually can happen if non-void function does not exlicitly return
>>
>>62263629
Try initializing j
>>
fuck directx though
>>
Is libsoundio the best cross-platform audio library?
https://github.com/andrewrk/libsoundio/
>>
I never understood C really. What is >>62263629 trying to achieve here? Count the number of characters between a-Z and print the same number of *'s?
>>
>>62264810
Yeah, I ended up doing that and it worked. Why didn't I get a segfault when running a.out though?
>>62264869
It's K&R exercise 1-13, "print a horizontal histogram of the length of the words in its input".
My program doesn't work though, it just prints X times * where X is the current value of the iterator.
>>
File: 1497940343055.jpg (10KB, 480x335px) Image search: [Google]
1497940343055.jpg
10KB, 480x335px
>work as software dev
>designing a new system is 80% researching libraries and frameworks to use, 15% documenting shit and 5% writing boring glue code to integrate all the frameworks
>>
So /g/ I have to learn C++ for my EE degree
What are some good ways to practice it while I put off the class for as long as possible?
>>
>>62264869
Not a problem of C, the problem of an idiot poster. There are no comments explaining what he's trying to do, no documentation, nothing, and there's only one function, main, and the name of main has no special meaning. So I wouldn't bother wasting your time, it's obfuscated.

He doesn't initialize j, and he doesn't notice it because the retard doesn't use -Weverything.
He uses invalid main prototype.
He uses obsolete C (C11 is current C, not C89).
He uses ancient book (K&R is outdated, try modern C).
He uses defined where he could use enum or stdbool.h
He mixes 1TBS with K&R style
>>
>start using new library
>everything is based on callbacks
>immediately come up with hacky solution so I can run the main loop myself
the art of computer programming
>>
>>62264901
>print a horizontal histogram of the length of the words in its input
oh
#include <iostream>
#include <string>
using namespace std;

int main() {
string line;
while (cin >> line) {
for (int i = 0; i < line.length(); i++)
cout << '*';
}
}

>>62264934
Well, he is learning. You shouldn't be harsh like that.
>>
>>62264934
I just started reading K&R, cut me some slack
>no comments
The program is short and fairly self-explanatory.
>only one function
Why would I need several for something this short?
>He doesn't initialize j
I noticed the mistake afterwards.
>invalid main prototype
Explain please.
>obsolete C
What parts of the syntax are outdated? I'm using K&R because it's short and the exercises are said to be good.
>mixes 1TBS with K&R style
Explain.
>>
>>62264966
That's fairly straightforward. I'm not planning on learning C++ yet though.
>>
>>62265003
Use glib, it's your only friend
>>
File: 1496908497876.png (126KB, 280x280px) Image search: [Google]
1496908497876.png
126KB, 280x280px
is software "magic" really a good thing?
i get that its more time efficient because you spend less time writing boilerplate code but i feel like i spend so much more time writing convoluted config files and going nuts because i have no idea what really happens under the hood
yes im looking at you rails
>>
>>62264982
>The program is short and fairly self-explanatory
Bitch please. Nobody has time to read your code. Even the most trivial program has to have purpose comment.
>Why would I need several for something this short?
If you want to avoid comments you have to put things in tiny functions with detailed names. Or leave it in main and put a comment.
>I noticed the mistake afterwards.
You won't notice hunders of others. Use -Weverything, -Wall, -Wpedantic and -Wextra.
>invalid main prototype
C11 1570.pdf draft, 5.1.2.2.1
>What parts of the syntax are outdated?
Declaring variables at the start of the function is ugly as fuck, makes the code less readable too. It's valid, but not-idiomatic C anymore.
>mixes 1TBS with K&R style
Brace styles. Pick one and don't mix them.
>>
File: 1488603538763.jpg (88KB, 1280x720px) Image search: [Google]
1488603538763.jpg
88KB, 1280x720px
>>62263629
Imagine this guy doing the vertical asterisk line exercise

At least comment your shit boi. IN/OUT/status aren't good variable names as well
>>
>>62265034
His braces are alright though, it's K&R
>>
>>62265064
Maybe, don't know the details. Thought K&R puts braces on newline anywhere, my bad.
>>
when faggots say that programming language is "safe" what do they mean?
>>
>>62265014
Thanks
>>62265034
Alright I'll use comments from now on then.
So should I use int main(void) or int main(int argc, char *argv[])? What difference does it make?
>Declaring variables at the start of the function
Yeah I know but given how short the program is I didn't think I had to declare them just before using them.
>Brace styles
Is it bad to use K&R style for functions and 1TBS for everything else?
>>62265045
>vertical asterisk line exercise
I haven't even finished this one yet, I feel like a retard.
>IN/OUT
I know I should use bool but I haven't reached that part in the book yet so I use #define for now.
Why is status not a good name?
>>
>>62265082
It means compiler catches most of the bugs.
>>
>>62265082
Static analysis in compile time
>>
>>62265082
Same difference between (int)x and static_cast<int>x
>>
>>62265034
Also, if K&R really teaches outdated C, is it still alright to use it to learn and pick up the differences between C11 and C89 with a reference?
Or are there too many differences between the two?
>>
>>62265145
No, they're pretty similar. K&R is exercises are alright but the language is slightly outdated and less comfortable to write and, more importantly, read.
>>
>>62265145
For the most part you will be writing C99 anyways, C11 topics are too advanced for you at this level.

Get a new version of K&R I suppose.
>>
>>62265168
I'll continue using K&R and use a reference afterwards to avoid writing shitty programs then.
>>62265174
>new version
I have the second edition, I don't think there's a newer one.
>>
Things I miss in C++
1. easy, mutable (to a degree) slicing
2. iterator creation like 0 .. N
3. UFCS
4. Modules
>>
how are ruby blocks any different from just passing in a callback function as a parameter in another language?
>>
>>62264267
They might have an evaluation arrangement with the boot camp provider. It's not uncommon for your first 90 days to be probationary in nature, allowing for easier termination if your skills are not up to par.

Either way, you should be grateful for free, paid training.
>>
File: 1503417474-464.png (29KB, 655x530px) Image search: [Google]
1503417474-464.png
29KB, 655x530px
So, if instead of storing an RGBA value as a record (pixel.R, pixel.G, pixel.B, pixel.A), I store it as a 4 byte unsigned int (FF FF FF FF), and then use bitwise operators to extract the values, would that be faster?

I'm especially interested in cache optimization. Will an array of record have any significant cache miss performance loss compared to a big block of integer values?
>>
>>62265082
It means they don't know what they're talking about.
>>
>>62265351
bitfield struct would be fastest, cleanest and clearest
>>
>>62265351
Actually, on 64-bit processors struct of four bytes is passed to/from a function as a 64-bit integer, and the compiler does all the bit-twiddling for you, so it should be exactly as fast as doing it yourself.
>>
>>62263412
Your fizzbuzz projects don't require the 1.6GB your gaymur platform has.
>>
Is there a library for tagging files? I know taglib is for audio only, but I'm looking for a more universal thing.
A less shitty hydrus I guess
>>
>>62265225
> iterator creation like 0 .. N
FOR i FROM 0 TO N STEP 1 DO
#define FOR __FOR__(
#define DO ) {
#define FROM ,
#define TO ,
#define STEP ,
#define __FOR__(var, start, end, inc) for (var = start; var < end; var += inc)

Kinda like that
>>
>>62265225
>iterator creation like 0 .. N
That's only viable for integers. C++ iterators are abstracting much more that that.
>>
>>62265379
Tbh, I'm don't trust the compiler much in this case, I'm writing for a small volunteer maintained platform that has their hands full updating the compiler to match the spec, with compiler optimization implemented on a "nice to have if there's time" principle.

I guess I'll have to do some benchmarks to see if there's a difference in my particular case.
>>
>>62265415
>I'm don't trust the compiler much in this case
And you shouldn't, the "compiler is better at optimizing than you" is only valid for large-scale program analysis (control flow, etc). Compilers for example suck big times at vectoring loop, meanwhile no language has built-in SIMD support even the ones that claim to be """modern""".
>>
>>62265399
Most of the time I'll be working with integers anyways
>>
>>62265415
Well, if you're not compiling for amd64, then how structs are passed depends on your platform's ABI. You could read it's doc, or just read the assembly generated by compiler. Usually option -S makes the compiler output assembly.

>>62265399
Haskell provides that kind of notation for anything that has an instance of typeclass Enum though.
>>
File: 5wfAmx1.png (94KB, 441x331px) Image search: [Google]
5wfAmx1.png
94KB, 441x331px
Haskell.
>>
>>62265428
I'm actually wondering why language designers don't just implement structs, multi-dimensional arrays and other such sequential data structures as syntactical wrappers around big chunks of simple 1D arrays.
Like, a 2D array could just be a big 1D array with a header for dimensions. Save the programmer the hassle of manually optimizing code, and the devs the hassle of implementing optimizations for several different data structures.
>>
>>62265516
C# does that for multidimensional arrays (as opposed to Java-style "jagged" arrays)
>>
>>62265516
I can see at least two very valid reasons. The first and most important is that as you mention, this is on the implementation side, not design. Sure there are sometimes parts of implementation that end up in the specification (C++ bool vectors for example) but doing so too much is a good way to get in a fight with compiler vendors. Also, there is no guarantee that the current best way to implement something won't change in the future.
Second it requires always allocating huge chunks of data which may not be free depending on how fragmented your memory pool is.
>>
File: ladies world.png (55KB, 859x355px) Image search: [Google]
ladies world.png
55KB, 859x355px
>>62258652

Seriously, people who can't get a job should consider changing gender (no, you don't have to remove dick or take hormones, and yes you can still fuck chicks)
>>
>>62258677
I'm not "escaping" the use of a fitness function. I'm just doing it differently than you're thinking. I already explained this last night. If you're still hung up on "genetic algorithms must be done in this exact way," I'm not going to bother explaining why I'm doing what I'm doing.
>>
I want to compile binaries that are supported on like 10 year old debian installations. I'm having issues with old versions of libc not working with my binaries even when I compile with gcc-4.8 on a modern Debian system. Static compiling doesn't seem to work, either.

Do I just need to find an extremely out of date LiveCD or something?
>>
>>62258573
Anyone recommend some good programming books to read that don't necessarily involve exercises? I'm working through K&R but when I'm not near my computer I can't do the exercises and it's kind of useless to read
>>
>>62266163
books are lame, hack code.
>>
>>62266163
>it's kind of useless to read
This sounds weird, but sometimes writing problems by hand helps me think things out.
>>
File: 1460330305439.jpg (25KB, 680x383px) Image search: [Google]
1460330305439.jpg
25KB, 680x383px
>>62266070
A different anon here. I'm a graduate student whose thesis deals with genetic algorithms.

You are being a stubborn idiot. You always have a fitnesss function that evaluates each individual's fitness. That's 100% necessary in a genetic algorithm.

If you're not calculating the fitness of an individual whenever a new, unique candidate is generated, you're not using a genetic algorithm.

Think about it: a genetic algorithm is non-deterministic, so a different result is produced everytime you run it. The slightest change in a gene may or may not dramatically effect the fitness of an individual.
>>
>>62266214
I want an anime girl to look at me like that
>>
>>62261001
https://g.sicp.me/books/
>>
Gonna start my first serious project in Common Lisp, is Vim still viable? I hate Emacs and rms.
>>
>>62266353
Why would it no longer be? I use it to work on 1M+ C++ code bases
>>
>>62266196
You at least need the basics for that.
>>
>>62262166
How come EVERY SINGLE PROGRAMMER on the internet has started when they were in kindergarten?
>>
>>62266386
Sorry, I explained myself badly, I meant, is Vim good for CL too? I've been using it for C, Pyhton and Java for years and it's great.
>>
>>62266353
have you actually used emacs?
it's pretty nice for lisp with paredit/such, and you can just use evil-mode
>>
>>62266408
neuroplasticity
>>
>>62266408
not me
>>
>>62258974
Please be something I can add to my github :^)
>>
File: file.png (8KB, 509x619px) Image search: [Google]
file.png
8KB, 509x619px
>>62266514
>tfw you're learning to program at 23 and you didn't start learning when you were a fetus

is there any hope left?
>>
>>62266591
stem cell therapy
>>
>>62266591
No, might as well KYS yourself now.
>>
>>62266591
if you were born smart
brainlets NEED to start early and be average at just 1 thing, otherwise they won't get a job and be neets

the chad programmer starts at 19 in university where he also bangs girls from other courses
>>
File: 1489420240715.png (5KB, 238x212px) Image search: [Google]
1489420240715.png
5KB, 238x212px
I've decided to come back to D. C++ is a torture.
>>
>>62259827
>>don't know shit about ASM
ASM is honestly easy, just dive into it
https://www.youtube.com/watch?v=VQAKkuLL31g this guy's cozy.
>>
>>62266622
>D
also if you cant learn any language read >>62266603
>>
>>62266630
>if you cant learn any language
What do you mean?
>>
>>62266622
Dude GC lmao
>>
>>62266675
i mean git gud
go back to c++ and learn it
>>
>>62266622
If you have trouble with C++, switching to D won't help you much. That being said disregard the retards talking about GC like it was a bad thing.
>>
>>62266805
>If you have trouble with C++, switching to D won't help you much
>>62265225
>>
>>62266812
So you have a point or are you just shitposting?
>>
>>62266838
You said D won't help if I have trouble with C++, that list of things over there is provided by D. Do I have to chew that out for you a bit more?
>>
>>62266852
>I absolutely NEED these things I can only do the exact way they're done in D OR ELSE!
I agree with >>62266630
>>
>>62266887
Not having modules alone is a big reason for me. Furthermore there is no UFCS so no easy chaining of functions/templates.

May be I'll see if C++23 adopts those two.
>>
New thread:

>>62266919
>>62266919
>>62266919
>>
File: 1494033868339.jpg (135KB, 800x580px) Image search: [Google]
1494033868339.jpg
135KB, 800x580px
>>62266278
Just pretend she's scowling at you
>>
>>62266622
Bruh, just use the standard libraries
>>
>>62266408
>literally
>>>/tumblr/
Thread posts: 315
Thread images: 56


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