[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: 360
Thread images: 38

What are you working on, /g/?

Old thread: >>59288217
>>
First for C++ is garbage.
>>
Stop shilling C, NSA
>>
File: smallrad2.png (1MB, 752x800px) Image search: [Google]
smallrad2.png
1MB, 752x800px
Ended up making changes to my restoration program, but I've given up for now.
>>
>>59291739
You're missing the fact that
if (auto x = find_thing(); x != nullptr) { ... }

When you enter the if statement x still contains the result of find_thing().
It may seem silly but compilers will often not optimize away calls where there's no side effects. And where there are side effects you have to alter what's generally considered clear control flow into something less clear to keep the value around. Sorting out the 'init's first can be a hassle. And you might have to break up your single else if condition to an else if and a nested if, or break the else if chain and have the rest of the chain be contained in an else.

Now i don't regularly face these situations, but they're there and they're slightly annoying. Hence I say there's slightly more use for declarations in the if statement.
>>59291762
Fuck. Maybe we have the wrong syntax? Where's the proposal? This is just silly.
>>59291843
Yes.
>>
>>59291825
I'm working on pushing this massive shit log out of my ass.
>>
6th for "why aren't you using Ada, idiot."
>>
>>59291825
This thread is garbage and you're all retards
>>
>>59291854
It's way better than the old version if you could get rid of the sharp artifacts (those single bright/dark pixels) you have there.
>>
>>59291861
Because Rust is the better Ada
>>
I'm planning to implement a feature in C++ that will require making http requests.

In looking into socket programming, most of the results are "just use WinSock."

I want to make my source able to compile on both Windows and Linux. Is this possible for an individual? I would like to avoid making two different versions if possible.

>>59291843
Unkind
>>
>>59291861
Because fuck Ada, I'm using Lisp.
>>
>>59291858
>Fuck. Maybe we have the wrong syntax? Where's the proposal? This is just silly.

No, that's by design as far I remember. The proposal is here: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0144r0.pdf
>>
File: 1469331980104.jpg (18KB, 325x260px) Image search: [Google]
1469331980104.jpg
18KB, 325x260px
>>59291843
>C++ is garbage
why does it not need garbage collection then??
>>
>>59291888
boost?
>>
>>59291843
nth for C stands for CIA
>>
>>59291880
Something about your post makes me not believe you.
>>
>>59291906
The OS has to collect garbage C++ programs leave behind whenever they spontaneously segfault.
>>
File: 1466772568932.jpg (29KB, 282x546px) Image search: [Google]
1466772568932.jpg
29KB, 282x546px
IS THERE A PROGRAMMING LANGUAGE WITH BUILT IN RACISM?
>>
whateverth for fuck python
>>
>>59291936
HolyC
>>
>>59291875

Yes, the salt-n-pepper effect is a bit of a problem. Was trying to sort that out, but I'm done with this for now. May come back to it when I'm less busy.
>>
>>59291936
Brainfuck with racial slurs instead of the usual syntax.
>>
>>59291892
3.3 Should we also allow a non-declaration syntax without auto to replace tie() syntax?
For example:
{x,y,z} = f(); // same as: tie(x,y,z) = ...
{iter, success} = mymap.insert(value); // same as: tie(iter,success) = ...
We think the answer should be no. We know of no use cases where this is better than using std::tie, as
noted in the comments. It would also complicate the grammar because { is already permitted in this position to
begin a block, so we would need lookahead to disambiguate. (Using () parens is worse, because code like
(iter, success) = expression; already has a meaning and in some cases might compile today.)

Well shit. This is the crap that haunts C++ all the time. Some crappy incarnation of a feature already existed so they're gnawing the legs off a relatively good idea and make two half-assed ideas instead of 1.

I'm not gonna use it then.
>>
A lot of times in shader programming I'll have to transform a 0-1 coordinate into another range. Is there a name for this? I searched "range transformation" and can't find anything.

For example:

Turn 0 - 1 into 1 - 0
Turn 0 - .5 - 1 into 0 - 1 - 0
Turn 0 - .7 - 1 into 0 - 1 - 1 and everything originally 0-.7 is linearly scaled

I've basically built my own function library at this point, but would like to see other people's work.

Pic unrelated.
>>
>>59291988
Linear map.
>>
>>59291988
It's common to say you're mapping a range.
>>
Will x:Bind ever come to wpf?
>>
>>59291971
I remember saying many times that C++ will never be a good language
>>
>>59291971
Ah.
You can basically do destructuring assingments already with tie(), but the problem is that they have to be assignments, and some data types you can't assign to, or you can't create an uninitialized variable to assign to, so youre out of luck without the new syntax proposal.
Also
If the language had fucking macros you could implement all of these proposals inside a library and call it a day, but noooo
>>
>>59291988

Mapping
>>
File: 1389729174721.jpg (78KB, 569x676px) Image search: [Google]
1389729174721.jpg
78KB, 569x676px
What's your opinion on UWP?
>>
>>59292082
Some of my favorite letters
>>
>>59292082
My opinion is Kill la Kill is shit.
>>
File: Fun unrealengine 4 code.kms.png (72KB, 1039x663px) Image search: [Google]
Fun unrealengine 4 code.kms.png
72KB, 1039x663px
>>59292055
>If the language had fucking macros
More powerful macros?
C++ certainly has macros.
>>
>>59292055
>but the problem is that they have to be assignments, and some data types you can't assign to, or you can't create an uninitialized variable to assign to
That wouldn't be a problem because you could say that it only works if all of the elements can be assigned, etc.
The problem is there's already a (,) operator
>>
>>59292095
That guy certainly meant Lisp-style macros.
>>
>>59292095
ewww
>>
I need to write a sort function in racket, but have no clue over how to do it.

any help?
>>
File: 1389729258977.png (316KB, 788x540px) Image search: [Google]
1389729258977.png
316KB, 788x540px
>>59292091
>>59292094
>Universal Windows Platform

captcha: veterinary artisan
>>
>>59292095
is this many slashes normal in programing?
>>
>>59292128
Only in shit languages, there's no reason to have that anymore.
>>
File: anti-bully_ranger.jpg (143KB, 833x696px) Image search: [Google]
anti-bully_ranger.jpg
143KB, 833x696px
>>59291843
Please don't bully
>>
>>59292128
The slashes say "this macro continues on the next line".
This is a very long macro, so instead of putting it all on one line (making it extra impossible to read) they do slash newline everywhere.
>>
Anyone has a cool playlist to either study or program or both?
>>
>>59292154
I think this one's ok
https://www.youtube.com/playlist?list=PLDfKAXSi6kUapi0I8jCbQK3_TeIiDNEw2
>>
>>59292109
They have some templates in there too just to make the code impossible to debug.
>>
>>59292154
check out my silence mixtape
>>
File: 1486803036088.jpg (88KB, 1032x720px) Image search: [Google]
1486803036088.jpg
88KB, 1032x720px
>>59292139
I like you.

captcha: john queensdale
>>
>>59292154
FF4 OST
Chrono Trigger OST
The Well-Tempered Clavier
>>
>>59292176
>debugging
Making errors is for amateurs
>>
>>59292154
It is said that listening to classical music while studying makes you perform better in math. But that's probably just people observing people who listen to classical music being smart.

Try hardbass.
>>
>>59292194
Well they certainly make errors if you look at the size of the patch notes.
>>
>>59292154
goreshit
>>
File: 1485904893417.png (2MB, 1220x1220px) Image search: [Google]
1485904893417.png
2MB, 1220x1220px
>>59292180
I don't like you
>>
File: 1461602749662.jpg (110KB, 1920x1080px) Image search: [Google]
1461602749662.jpg
110KB, 1920x1080px
>>59292229
>>
>>59292194
If you have never made an error, you've never made anything.
>>
>>59292096
The problem is that sometimes you want to initialize an unassignable variable from a destructuring bind, but you cant get that with tie(). Tie already errors if you give it a variable that can't be assigned to

I want to making a language like C++, but
1) every type has an "uninitialized" value. This is necessary to allow move semantics without a complicated linear type system.
2) arbitrary terms in the language itself may appear at the type level. These are evaluated like C++ templates, just without the AST undecidability.
3) full fledged lisp style macros, which also have access to the language itself (or maybe an interpreted subset where memory is uncorruptable but doesnt need to be freed).
4) "dangerous" to program in: you get raw pointers, you can write meta code to determine memory layout of structs, you can generate inline assembly, maybe you even have access to the assembler itself?
>>
File: anal beads.png (4KB, 528x88px) Image search: [Google]
anal beads.png
4KB, 528x88px
>>59291858
I was going to recommend whatever C++'s equivalent to out is, but C++ doesn't have that:
if(int.TryParse("69", out var x)) { /* do stuff with x */}
>>
>>59292179
I know but I can't concentrate on my office. My boss/dad talks a lot on the phone and he is loud.
>>
God's prophet TERRY DAVIS warned of the CIA and we didn't listne
>>
>>59292138
What, because "modern" languages "don't have" macros? It's called the preprocessor for a reason. You can just run it on any file. It "preprocesses" the file before compilation. Hence "preprocessor."
>>
File: 1481669880462.png (254KB, 580x504px) Image search: [Google]
1481669880462.png
254KB, 580x504px
>>59292249
I've changed my mind
>>
File: akari_nyoron.gif (35KB, 400x330px) Image search: [Google]
akari_nyoron.gif
35KB, 400x330px
>>59292229
>>59292249
Please get along and love each other anons.
>>
What's with all the fucking anime? What is the fucking relation on programming and anime whores?
Do you think Kernighan (to mention just one person) has a waifu?
Grow up.
>>
>>59292286
wasn't talking about macros
>>
File: mpv-shot0158.jpg (88KB, 1280x720px) Image search: [Google]
mpv-shot0158.jpg
88KB, 1280x720px
i'm just here to post bestgirl
>>
>>59292329
>What is the fucking relation on programming and anime whores?
Good programmers appreciate good anime.
That's the relation.
>>
>>59292329
>Do you think Kernighan (to mention just one person) has a waifu?
I'm going to email him right now and tell him you are wondering about that.
>>
>>59292268
Probably something like this with the new syntax:
`if (int result; sscanf("42", "%d", &result)) {}`
>>
>>59292286
Macros are a language limitation

>>59292329
Gee, maybe because it's A FUCKING ANIME WEBSITE?
When will you fucking redditors shut up about this?
Stop wasting our time and precious thread bumps.
>>
>>59292342
that's a boy
>>
>>59292329
>Do you think Kernighan (to mention just one person) has a waifu?
Yes
>>
File: chitose_face.jpg (243KB, 1136x1344px) Image search: [Google]
chitose_face.jpg
243KB, 1136x1344px
>>59292367
>>
File: 1366168061169.png (811KB, 1290x1080px) Image search: [Google]
1366168061169.png
811KB, 1290x1080px
>>59292329
>>
>>59292362
Macros work on any language. The preprocessor works on any text file. It doesn't know what language your source code is in.

It's the PREprocessor. "PRE."
>>
File: mpv-shot0023.jpg (116KB, 1280x720px) Image search: [Google]
mpv-shot0023.jpg
116KB, 1280x720px
>>59292367
i wish
>>
>>59292373
you proved my point
>>
>>59289682
>>59289682
>>
File: chitose_mate.png (124KB, 284x348px) Image search: [Google]
chitose_mate.png
124KB, 284x348px
>>59292386
>>
My language will have macros in the form of AST->AST functions that are run at compile time and are completely unrestricted.
>>
>>59292398
>is F# worth it?
No, proceed directly to Haskell
>>
File: 36853676497707.jpg (77KB, 562x630px) Image search: [Google]
36853676497707.jpg
77KB, 562x630px
This shit is going to be called a lot, is there any way I can improve it?

private static string checkSingleQuote (string name)
{
byte i = 0;

foreach (char c in name)
{
if (c == 39)
{
name = name.Insert(i, "'");
i++;
}

i++;
}

return name;
}
>>
>>59292367
>best girl
>female

pick one
>>
>>59292407
I don't think you understand. Macros are expanded BEFORE compile time. It's a PREprocessor.
>>
>>59292423
>haaha le pol memes :'d
>>
>>59289682
*looking at it from
>>59292408
>Haskell
But what about the .NET libraries? I thought Haskell was pretty library-poor (per http://www.stephendiehl.com/posts/production.html). What about the saner strings?
>>
>>59291843
C++ is the MOST powerful language
>>
>>59291906
It cannot self-terminate.
>>
>>59292446
I'm not using the autistic C nomenclature. Compile time is compile time and run time is run time. Obviously AST transformations happen before type checking and code generation.
>>
>>59292384
C macros are part of the standard, fairly sure that's the case in C++ too. m4 works on any file sure but you can't say they're not part of the language.
>>
>>59292469
>C++ is the MOST language
>>
>>59292469
>any language more powerful than assembly
>>
>>59292411
for is about 5 times faster than a foreach loop
>>
>>59292116
something like dis?

(define (qsort a)
(cond
((empty? a) empty)
(else (append (qsort (filter (lambda (y) (< y (car a))) (cdr a)))
(list (car a))
(qsort (filter (lambda (y) (>= y (car a))) (cdr a)))))))
>>
>>59292411
Yes, you can improve this easily.

Use
string.Replace()
. It calls the appropriate C library and is very fast.

http://sourceof.net/
>>
>>59292463
Haskell has great libraries, sure it doesn't have as many as .NET

>strings
Just use the overloaded strings extension, and pick a string type of choice (e.g. Text, ByteString)
>>
>>59292536
>those parentheses
I came.
>>
>>59292509
There are common ASM programming techniques that very very very few languages capture. For instance, infamous Duff's Device is in very ugly C a very common and normal ASM technique which no higher level language can achieve G*d bless The Machine and its Code
>>
>>59292411
>
 if (c == 39)

Maybe use '"' for clarity?
Or, nevermind, that looks horrible.
But I'm not sure what you're intending here. You're checking for ' and inserting ' in its place, not sure that's what you're intending here.
>>59292515
Wow that's horrible. Has someone submitted a bug report to microshaft yet?
>>59292539
What's with these illogical problems?
>>
>>59291843
TFW C++ now can be used for webAssembly meaning you can actually be a "front end dev" pajeet with C++.

Speaking of, what is a good reference for safe/modern C++ besides the shit Bjarne book. I already know C/Asm but need C++ to hack an in memory dbms and dick around in webAsm.
>>
>>59292575
>Wow that's horrible. Has someone submitted a bug report to microshaft yet?
For is faster on arrays and ilist but people don't seem to care that much, dunno why.

http://stackoverflow.com/questions/365615/in-net-which-loop-runs-faster-for-or-foreach
>>
>>59292586
>what is a good reference for safe/modern C++
No such thing desu.
>>
File: 73175.jpg (48KB, 459x476px) Image search: [Google]
73175.jpg
48KB, 459x476px
>>59292515
>>59292539
Thanks for the input, I will do some stress tests later to see how it goes.

>>59292575
>But I'm not sure what you're intending here. You're checking for ' and inserting ' in its place, not sure that's what you're intending here.
Doubling all the single quotation marks for the SQLite database as it doesn't have escape characters.
>>
>>59292618
this, you're on your own
>>
>>59292575
>>59292615
If you think about it, it's obvious that the higher level construct would be slower to execute. They always are.
>>
File: 123ertgh.jpg (22KB, 413x777px) Image search: [Google]
123ertgh.jpg
22KB, 413x777px
what are you /g/?
>>
>>59292645
Code Artist
>>
File: 1488901890398.gif (2MB, 300x169px) Image search: [Google]
1488901890398.gif
2MB, 300x169px
So how many of you are doing some of those CIA exercises revealed in the leak?
>>
>>59292469
This is not a good thing. C++ lets the programmer use power indiscriminately. It is the pic related of programming languages.
>>
>>59292668
none, i'm modding tf2 and waiting for an answer to a question i posted on stackoverflow
>>
>>59292645
Enlightened code artisan
>>
>>59292645
Perma-expert beginner reporting in
>>
File: 1488477805916.png (143KB, 600x600px) Image search: [Google]
1488477805916.png
143KB, 600x600px
>>59292673
>It is the pic related of programming languages
>>
>>59292645
what a stupid fucking image
>>
>>59292673
What pic was that supposed to be, anon?
>>
>>59292673
With GREAT power comes GREAT responsibility
C++ is a language for RESPONSIBLE adults like ME
>>
>>59292717
why?
>>
>>59292717
Please no rude
>>
File: ancap.jpg (66KB, 800x576px) Image search: [Google]
ancap.jpg
66KB, 800x576px
>>59292715
>>59292718
Sorry, forgot to renew my JPEG license.
>>
>>59292636
>it's obvious that the higher level construct would be slower to execute.
Not at all. Deep down the array you're iterating is only constrained by the data that's there to represent it. If the array is a size+data array the rewrite to a for loop is trivial. The compiler can easily write the code the user wrote to speed it up.

C++ does a lot of zero cost abstraction (but not always, even where it promises that because the optimizer gets confused). But this basic foreach is trivial to make into a proper zero cost abstraction and C# should definitively be able to unless the language semantics constrain them in some way. Which I don't really see how it could for this very simple case.
>>
>>59292741
I just uploaded this to the discord as you posted this

holy shit
>>
>>59292722
A responsible adult understands his limitations and that ze is not special enough to run bug-free C++ code when thousands of veteran programmers have failed at it.
>>
>>59292766
>the rewrite to a for loop is trivial. The compiler can easily write the code the user wrote to speed it up
this statement is not portable
>>
>>59292555
Because high level languages don't make the programmer unroll loops like a monkey.
>>
>>59292778
s/ze/he;s/run/write/
>>
>>59292673
>>59292722
Most C++ programmers are stupid hicks who shoot themselves in the foot because they don't know not to sweep bodyparts with loaded guns.
But there's trained soldiers who also wield C++.

The rest of you play with nerf, with is fun, but you won't do any real damage with those guns.
>>
>>59292797
It's not an unrolled loop you blithering cock go back to school do not pass Go do not collect 200 dollaridoos
>>
>>59292722
Me too.

I only use mature languages for mature programmers such as myself.
>>
>>59292515
>for is about 5 times faster than a foreach loop
This is not necessarily true.

The IL generated is nearly identical, depending on what's going on with that loop.

In fact, foreach is faster in some cases.

>>59292631
Remember that .NET standard library calls are often going to be the most optimized solution for simple things like that.

In many cases, they either use a C library with an external call or it is implemented with
 unsafe 
to squeeze every drop of performance out of if they can while keeping your code type-safe.
>>
>>59292792
>not portable
Not relevant whatsoever.

Also you're making a very ambiguous statement.
>>
>>59292792
For-each is direct syntax sugar.
for (x : a) {
f(x);
}

for (auto i = a.begin(); i != a.end(); i++) {
f(*i);
}

For arrays and vectors, this should easily be inlined to:
for (auto i = 0; i < a.size(); i++) {
f(a[i]);
}


>>59292819
It's part of optimized loop unrolling.
>>
>>59292802
Define "real damage". Is it performance? Is it delivering business value fast? Is it programmer status signaling? Because there sure are languages that compete with C++ on each of these.
>>
>>59292864
Oh, oops, I thought this was C++.
>>
>>59292865
>languages that compete with C++ on each of these.
How about just one that competes with C++ on all of those things
>>
>>59292864
this doesn't generalise to all high level constructs
>>
File: output.webm (718KB, 640x360px) Image search: [Google]
output.webm
718KB, 640x360px
>>59291825
>What are you working on, /g/?

making a physics based cave exploration game

still programmer graphics atm so it's just a bunch of polygons moving about
>>
>>59292893
No, it doesn't. But your argument was "high level => slow" and this is a counter example.
>>
>>59292896
>removing programmer graphics

that's so 2010
everybody knows the money is in the indie look nowadays
>>
what is the best way to structure your code?
>>
>>59292936
Short functions, long comments
>>
>>59292865
>Because there sure are languages that compete with C++ on each of these.
It's the combination. There's plenty of languages that simply don't let you scale, that's what I'm talking about when I say real damage. C++ lets you get up and running quick and it lets you start being fast when you need to.

Regardless I don't see languages compete with C++ on performance. I'd be very interested to see that. No "look at this dead code the Java VM managed to eliminate after 100000 iterations"-benchmarks.

I don't think C++ is amazing or anything, it's just the best option available.
>>
>>59292916
High level does generally imply slow
>>
>>59292955
>needing to comment your code

pleb detected
>>
>>59292971
>generally
You seem confused, "general" means "in every situation". That is, as a general rule.
>>
>>59292936
Just put everything in main fa m.
>>
How would you make GUI in functional language?
>>
>>59292936
Avoid side effects, make sure each "thing" has a single, clear purpose, and don't prematurely abstract.

>>59292971
It often does, but not always.
>>
>>59292920
Actually it's clear that it doesn't cut it anymore. Indies got a pass in the past because they were fresh in a stagnant game market. Now you need to market your game because every single place where people look for games is just cluttered with junk now.

So programmer LOOKING graphics don't cut it. There's nothing wrong with procedural art though, look at No mans sky. Had a lot of people fooled. Starbound is another example, though it's more artist driven obviously.
>>
>>59293014
IMGUI
>>
>>59292936
one class per file

one purpose per method

public members at the top, private at the bottom

methods should only know what they need to and nothing more

namespaces are your friend
>>
>>59292936
Everything should inherit
>>
>>59293014
http://hackage.haskell.org/package/grapefruit-ui-gtk

http://hackage.haskell.org/package/reactive-glut

http://hackage.haskell.org/package/wxFruit

http://hackage.haskell.org/package/reactive-banana
>>
>>59293014
FRP
>>
>>59292971
I think "slow" needs to be really quantified here, even if this were an acceptable assertion.

High-level being "slow" means imperceptible differences in execution speed 99% of the time, and it means faster development and deployment time 100% of the time.

If I absolutely need to optimize something specific in my application, I will take steps to do so. Until then, I'll be producing results under budget and ahead of schedule.
>>
Are there stable jobs after getting cs degree?
Like what if some program is too hard and you dont make it work like its supposed to do you just get fired?
Seems tough, scary and unstable if yes.
>>
>>59292691
tf2 in 2017?
>>
>>59293035
>public members at the top, private at the bottom
?
>>
>>59293048
>99% of the time
for your applications
>>
>>59293031
Sorry for baiting you into a long response. I was never into the lazy "it's indie no graphics needed" approach and made a bad joke about it

Best of luck with your game
>>
>>59293034
Shut up you can't claim that ground. It's not even decent for functional languages since it's woefully inefficient in a functional setting.
>>
>>59293056
https://www.teamfortress.tv/
>>
Why doesn't OOP work properly in Unity?
>>
>>59293035
no capital letters

reddit spacing

not shutting the fuck up

being this retarded
>>
>>59292971
low level does generally mean dev time is hugely inflated
>>
>>59293069
Take all applications that the entire population of programmers would write for any reason.

Yeah, C and other lower-level languages have a place, but that place is not common outside of the CS101/NEET bubble.
>>
>>59293075
What?
>>
Why doesn't OOP work properly?
>>
>>59293070
I'm not that guy. I just didn't want him to take that comment seriously.
>>
>>59293089
Except it does.

you're just a pleb

public class Faggot: MonoBehaviour { }


public class OP: Faggot { }
>>
>>59292971
I'd rather the application take 10.00001 seconds instead of 10 seconds to do its job every night, while taking days less to develop the damn thing.
>>
>>59293110
Because it encourages shared mutable state.
>>
>>59293055
you'll most likely be maintaining a large existing code base that was written in a hurry so everything was done stupidly.
and they'll want new features instead of fixing technical debt. so you'll put in stupid stuff because there's deadlines.
and no one wants to hire someone who doesn't have 5 years experience in a language unless they want to pay you garbage
>>
>>59293110
Because most don't do pure OOP and the effort to optimize pure OOP is rather massive.
>>
>>59293098
C is not low-level language.
>>
>>59293089
Unity expects you to have components that are encapsulated, yet supposed to work together, while you can't program the things that own components themselves to provide mediating logic. Also you have no access to a top level main loop so you have to make globals.
>>
>>59293067
generally, put methods / properties that are public before anything that's private. that's more of a style thing rather than maintainability though, so don't worry about it too much

>>59293094
>becoming quick to anger

have a nice day friend
>>
>>59293126
>I'd rather the application take 10.00001 seconds instead of 10 seconds to do its job every night, while taking days less to develop the damn thing.
I think everyone would want that. Except Facebook and the like.

Too bad that's not what you get with 'high level' programming.
>>
>>59293147
You may have quoted the wrong post.

I didn't say C is a "low-level language".
>>
>>59293152
>what is Update()
>>
File: mx.png (58KB, 891x522px) Image search: [Google]
mx.png
58KB, 891x522px
Still working on my text editor. Looking good so far.
>>
>>59293126
Then you do it and it takes 1000 seconds
>>
>>59293055
If you're getting a degree, do something like Statistics instead. A math degree in stats will always be valuable. You can use your electives to take intro to CS 1 and 2 or w/e, and that's good enough you can teach yourself computer science with the tons of books and resources around but learning serious stats is something you really can only get in school, because you need to be around peers a lot to iron out problems in your logic, edge/corner cases, ect.

For example if you had a stats degree you could learn Python in a weekend, and then easily start doing machine learning with Tensorflow library and shit which is all entirely stats.

If the entire industry explodes when the bubble pops you can then go and get a simple government job doing enviro stats or election stats.
>>
File: 1476804876543.jpg (71KB, 487x497px) Image search: [Google]
1476804876543.jpg
71KB, 487x497px
>supposed to be working
>do bitcoin gambling and twitch watching instead
>play all in and double my money
oh well, I guess I'll become a professional gambler
>>
>>59293152
then how does one go about structuring his code for a game in Unity?
>>
>>59293160
Not a top level main loop.
>>
im a cuck
>>
>>59293135
what kind of job should I be looking for when I have 0 years experience
how do they know how many years I got cant I just make it up on my CV
>>
>>59293172
what's a top level main loop, then?.
>>
>>59293170
who this cute boy
>>
>>59293171
You have no choice but to write utter garbage.
>>
>>59293167
i already study CS im second year
>>
>>59293192
>CS
Cock Sucking?
>>
>>59293177
They will know in the interview when they test your experience.

Just apply as a junior dev, or intern somewhere. Or apply to some online ticket shop like Toptal or other places that hire independent contractors. Build your exp there
>>
>>59293188
but then the code is going to be all spaghetti code all over the place
>>
>>59293155
>I think everyone would want that. Except Facebook and the like.
What do you imply?
>>
>>59293192
Ask people who have graduated where you graduated and ask them what they'd do differently.
>>
>>59293187
I looked him up myself to not avail, would fugg so bad
>>
>>59292883
Competing with C++ on delivering business value fast is easy. Any modern language will do for that, so the question is reduced to picking a modern language that competes with C++ on performance (throughput). Those include Ada (a terribly underappreciated language), C# (AOT), D, Object Pascal, OCaml, Rust and a few others.

You are on your own WRT status singaling. Go experiment with Coq or something.
>>
File: 1478848344840.jpg (398KB, 912x988px) Image search: [Google]
1478848344840.jpg
398KB, 912x988px
>>59292120
She is a cute!
>>
>>59293014
elm-lang.org/
>>
>>59293186
I'm sure you've never tried to make a game without an engine before, but basically, like you would expect, you have access to all the game objects, you can create them and store them in specific variables instead of a big indiscriminate list (you could also store them in more discriminating lists so that you don't have to use a single, useless interface for everything), you can write logic that isn't encapsulated in a component, etc.

Basically you get to program normally without having to coordinate logic in a framework that is heavily OO while breaking every OO rule.

>>59293207
That's the power of Unity.
>>
>tfw all the young /dpt/nerds hang out in discord instead of irc
>>
>>59293211
For Facebook 0.09 Per mille performance is a very large saving. Would certainly be worth a fair few days of a programmers time if it was a stable improvement.
>>
>>59293192
spoonfed cuck

stop bloating the industry

go flip some burgers
>>
>>59293187
from a hentai, she's a slut
>>
>>59293272
"No"
>>
>>59293276
but do you have a link
>>
>>59293270
>discord
>nerds
>>
>>59293055
You don't need to worry about getting fired, you need to worry about having your company bought out and everybody laid off, then finding out the options you took during salary negotiation aren't worth fuck all and you get screwed.

I've never seen anybody fired, even the people I work with who are proven to be unable to program who somehow bullshitted their way through the interview still work with me just we have to fix all their commits. Management doesn't give a shit because you will quickly realize what a big fraud/scam/joke the entire tech industry is.
>>
I MADE A THING :-DDD

irc: 2hu-ch.org #overchan

i think it works
>>
File: anal beads.png (35KB, 325x129px) Image search: [Google]
anal beads.png
35KB, 325x129px
>>59293270
Well, yeah. Bitches love emojis.

You should thank the Discord; there's plenty of Haskell/FP autism that gets contained there, so it doesn't leak out into this thread.
>>
>>59293307
All the IRC channels that /dpt/ used a few years ago are dead right now
>>
>>59293243
>C# (AOT), D, Object Pascal, OCaml, Rust
So these are all supposed to be easier to use and get equal or better performance? I really doubt that. It sounds like it'd be incredibly hard to reach that point in those languages.

C# and D are the only two I've considered in the past and they both prove incredibly difficult to work with effectively.
>>
>>59293324
post a link to a website or gtfo
>>
>>59293341
>irc
>website
anon
>>
>>59293341
it's an irc server nerd
>>
Is shipping software a feature?
>>
>>59292286
>#$
>multi-line macro
>#$
>normal program
Wow, so hard.
>>
Real /dpt/ Programmers
- knows every single binary /usr/bin
- have an anime wallpaper that automatically changes to a hentai wallpaper once the sun sets
- uses C only, implementing another language in C if they want that language's features
- eats two pizzas a day
- drinks Pepsi Max, the true programmer's drink
- types at 40 words per minute
- does all I/O at compile time
- uses triply-linked lists
- can read backwards and forwards
>>
>>59293341
Hes made an IRC server obviously.
Or are you asking for a link to one of those web-irc clients?
>>
>>59293338
Rust is already faster than C++. Is it easier? In the long run, yes, but there's a strong learning curve when it comes to ownership and borrowing, though you should already understand the concepts behind it if you've done MMM and RAII in C++.
>>
>>59293375
it's the most autistic irc server you'll ever see, try it. connect via tor if you feel like.
>>
>>59293373
Addendum:
- is unemployed
- doesn't actually create programs that anyone uses
>>
>>59293373
>- types at 40 words per minute
Slow and deliberate. I can respect that ut it's not for me.
>>
>>59293396
- pursues his passions
- has a small but dedicated userbase
>>
>>59293405
>- has a small but dedicated userbase of less than one person because she doesn't even use what she's written

fixed that for you
>>
>>59293192
Quality of school is pretty important. Better quality professors/peers/opportunities.
>>
>>59292636
Sure, but for syntactic sugar like a foreach loop the language should be able to optimize.
>>
>>59293398
It is the pleasure of typing without any spelling errors. I have observed the greatest typists of my time in action. 80+ words per minute. The backspace key gets worn out fast, and you should see their expressions - gritted teeth, narrowed eyes, the lines of a permanent scowl etched on their faces. For them, typing is a painful race full of mistakes and corrections and stress. For us, the slow typists, the calm typists, typing is a pleasant walk in a beautiful garden, only rarely needing to use the backspace key, usually because we decided to use an even more graceful word, rather than making a typing input mistake.
>>
>>59291854
Answer me! Where the hell did you get this image of me?
>>
>>59293373
>triply-linked lists
Some kind of tree?
>>
I'm teaching myself [spoiler]C++[/spoiler] and just doing exercises to git gud, made an RPN calculator right now.
>>
>>59293456
>the language
the compiler, idiot, languahes don't do a shit
>>
>>59293482
No way
>>
>>59293467

Stop!
>>
>>59293482
Good. Now make C++ use RPN everywhere.
>>
>>59293035
like this senpai http://git.suckless.org/dwm/tree/dwm.c ?
>>
>>59293539
>suckless
Stopped reading right there
>>
>>59293522
Tell me. Please.
>>
>>59293544
suckless is white and based.
>>
>>59293544
so you didn't read ".org/dwm/tree/dwm.c ?" ?
>>
>>59293391
>Is it easier? In the long run, yes
So basically you're asking people to invest heavily into the language before they can have proof of any gains?
>Rust is already faster than C++.
We need better use of language here. Are you saying that the constructs Rust programmers work with produce better code than optimized C++ code or naive C++ code?

Because if Rust offers a better naive solution, easier naive solution yet doesn't make optimizing the code a hassle that'd be great.

I don't have many issues writing code that's free of trivial errors in C++. It's usually domain specific errors, those aren't really possible to avoid through programming language changes. So for me it's mostly about getting up the basic version of what I want and then making changes to it until it's fast.
>>
>>59293544
pleb identified
>>
>>59293545
Suckless is a bunch of 14 y/olds and appeals to a bunch of 14 y/olds
>>
>>59293574
>t. barely-sentient humanoid
>>
>>59293574
still better than you
>>
>>59293373
- I use Guix so my binaries are in /home :)
- I have no wallpaper
- I always use Common Lisp for everything, haven't used C since my last job in 2009
- I don't eat pizza/pop I walk downstairs and get sushi to complete my weaboo requirements
- Last I/O I compiled was in MMIXAL
- Dancing links on a tree
- I always have to read backwards to fix something I fucked up and continue to not see it reading forwards

Also Discord I never have time for, and I no longer like chat since being forced to use it (Slack) for years and fed unfunny memes. I like IRC when you just idled in a room and came by a day later to reply to something.
>>
>>59293568
xD
>>
>>59292955
>commenting yourself out of a job
Hi anon this is pajeet, thank you for writing such good, clear comments that he can understand!
>>
>>59293468
When I hear a triply linked list I'm assuming a doubly linked list with a third pointer that allows for an arbitrary order of elements if you chase it.
Ideally you'd probably end and start that chain at fixed locations.

But when in doubt, call it a graph.
>>
>in accordance with federal law Rust Defense Force arrives

attention everyone, stop deving right this fucking instant and rewrite your shit with Rust
>>
>>59293305
Gujira 4 Gou - Kimeseku ni Maketa Shounen
took some time but here's the name
>>
File: 1455893578448.jpg (93KB, 533x700px) Image search: [Google]
1455893578448.jpg
93KB, 533x700px
>>59293582
>>59293583
>Kids getting butthurt about their age
No worries, we all know about you and your suck"less".
>>
>>59293604
helllllllllll yeah
thanks anon, i;ll check it out in a bit
>>
Lua is pretty nice, I think, it reminds me good old BASIC.
>>
>>59293531
are you alright chum
>>
>>59293604
thanks, I was trying to find it on nhentai
<3
>>
>>59293098
C is still one of if not the most used languages still, 40 years later.
>>
>>59293618
epik /b/ro
>>
>>59293653
C will die soon enough
>>
>>59293110
Because it was over hyped and turned into God's form of programming, when it's just one more tool in programmer's toolbox. So you've got retards trying to fit everything into some frankenstein class hierarchy, when there's probably a better way.
>>
>>59293566
>So basically you're asking people to invest heavily into the language before they can have proof of any gains?
That's the cost of the type and lifetime system.

>We need better use of language here. Are you saying that the constructs Rust programmers work with produce better code than optimized C++ code or naive C++ code?
Idiomatic Rust is often the same as optimized Rust, so the former, I guess. The big exception is unsafe code, where "idiomatic Rust" isn't so well-defined and the compiler has to give up some optimizations. Then it's about the same as optimizing C code while still using as much of safe Rust as you can in order to get those optimizations.
>>
Hi guys I have the strongest urge to just type code and not even plan before hand and I usually just change the code at random places until it works not knowing why
>>
>>59293618
dwm author is 40 or something
>>
>>59293720
go ahead, its the craving
>>
>>59293656
Whoa there, you showed me right there suck"less" toddler
>>
>>59293653
C is popular, but it is not even close to being the most popular. Not even in the top 3.

Again, it has its place. It's extremely useful when needed.
>>
>>59293653
>>59293674
>http://www.tiobe.com/tiobe-index/
Admittedly it doesn't look amazing. But the tiobe index is based on search quieries, which aren't really what people should be interested in. (despite this Tiobe is one of the most well regarded source in this popularity contest)
For actual use:
http://spectrum.ieee.org/static/interactive-the-top-programming-languages-2016
Much better.
>>
>>59293747
Not an argument, you fucking idiot
>>
>>59293733
alright

boolean status = false;
int counter = 0;

while(status)
{
count++;
if(//count becomes 10)
{
System.exit(0);//break out of the program
}
}

>>
>>59293767
Fuck off, toddler
>>
>>59293720
>[...]until it works
mmh, ok.
>not knowing why
No that's terrible.
>>
>>59293769
Doesn't even compile.
>>
>>59293779
i love fallacies

keep'em coming champ
>>
>>59293758
>>http://www.tiobe.com/tiobe-index/
>C's popularity is falling almost twice as much as Java
kek
>>
everyone itt is a cukc
>>
>>59293803
Yeah this is C users moving to other systems languages.
Java doesn't compete there.
>>
>>59293769
boolean status = false;
int counter = 0;

while (!status) {
count++;
if (count == 10) { //count becomes 10)
System.exit(0); //break out of the program
}
}

>>
>>59293769
maybe learn the language first
>>
>>59293800
>i love fallacies
No wonder you love hanging around edgy manchildren and pre teens in your containment cult website. How quickly fuck off, this is an 18+ website
>>
>>59293758
>http://spectrum.ieee.org/static/interactive-the-top-programming-languages-2016
That's actually pretty sweet, is there a way to only get the popularity on the selected domains? Right now it just filters irrelevant languages out without taking into account how much less or more popular a language gets once the filter is in place.
>>
>>59293832
>No wonder you love hanging around edgy manchildren and pre teens in your containment cult website.
are you talking about you, kiddo?
>>
>>59293803
tiobe has been debunked anyway, specifically in the fact that it OVERREPRESENTS C massively with false positives. C#/C++ and random shit gets categorized as a C topic all the time.
>>
>>59293751
I said the most used you useless piece of shit.

See
>>59293758
>>
>>59293820
lol you just can't not! every line of code

>>59293826
nah I am too lazy to type out the rest of java
>>
File: 1478532924537.jpg (37KB, 627x627px) Image search: [Google]
1478532924537.jpg
37KB, 627x627px
hey guys i'm a retard
>>
>>59293843
>is there a way to only get the popularity on the selected domains?
Not sure if I got that right but you select "embedded" for instance and deselect the rest.
>>
>>59293845
Talking about your meme spouting website called ***ckless
>>
>>59293758
Holy shit, that second site is absolutely delusional if it thinks that Javascript has less jobs than C++ or Python.
>>
>>59293880
*fewer
>>
>>59293854
>burgercuck
No shit
>>
>>59293880
It divides between web and other. If you look at web it's a completely different story.

Try to maybe understand it before you complain.
>>
>>59293849
Yeah, people who use C don't do ask many questions about it. It's why it's so different when you compare popularity rankings to industry deployment.
>>
>>59293907
>Yeah, people who use C don't do ask many questions about it.
I love how C toddlers stay deluded in their small pathetic world
>>
>>59293861
That's what I did but the spectrum ranking thing didn't change, only the present languages.
>>
>>59293903
To kikes like you, yes.
>>
>>59293922
>I love how C toddlers stay deluded in their small pathetic world
you're here talking about them while they are out making money, get your life together my man
>>
>>59293943
I was expecting a coherent response. But suit yourself.
>>
>>59293922
Do you even realize people program outside of your web company, for example work on micro-controllers?
>>
>>59293943
there is literally nothing wrong with being jewish
>>
>>59293903
How about you pay attention, moron?

It says that Python has more web jobs than Javascript or C#.

ASP.NET is quite literally the most popular web framework in existence, only maybe sharing the top with something like Angular or RoR.

There are so many obvious issues with that website, it's hilarious.
>>
File: ngbbs4249d7fa0d673.jpg (33KB, 343x238px) Image search: [Google]
ngbbs4249d7fa0d673.jpg
33KB, 343x238px
How much of this thread is just faggots sperging out about how language that does abc is better than language that does abc
>>
>>59293880
>javascript
>used only by web developers
>more jobs than general purpose programming language used in any serious codebase that's not C or Java
>more jobs than advanced scripting language used prominently in several different fields that don't even have anything to do with CS
Apply yourself. Javascript has one domain, C++ and Python apply to several.
>>
>>59293959
Ah, yes. So what company do you pretend to work for? Intel? AMD?
>>
Big O question:

I often see the phrase 'sufficiently large input' being used when discussing n in the context of Big O.

Is this because the contributions of certain parts of algorithms only begin to dwarf the contributions of other parts (e.g. constants) when the input gets larger? Seeing as Big O is used to measure how algorithmic efficiency scales with input size, we only get to see the true character of the scaling when we start emphasising certain parts of the algorithm's operations by giving it a large enough input.

Is that right?
>>
>>59293966
turn back while you still can
>>
>>59293947
>C toddler
>Making money
Which company hires fuzzbuzzers?
>>
>>59293974
>being this unable to read
So you're one of these trolls who make these threads so shit, nice.
>>
>>59293961
Where did I say otherwise? I myself am a kike.
>>
>>59293758
>python is #1 trending in web

huh. didn't expect that, what happened?
>>
all programming tasks and IT positions will be outsourced so there is no point in even learning programming anymore
>>
>>59294005
Hobby
>>
>>59293965
>(Read more about our method and sources)
For JOBS, which is what you specifically mentioned. It claims Java>Python>JS>C# and C++ isn't even listed.

So clearly you're the one that should be paying attention here.

Also APS.NET is clearly not a programming language. Fucking retard.
>>
>>59293990
Oracle, Microsoft, Redhat Inc, NXP, Samsung, ARM....
you will find out when you get a job
>>
>>59294005
i know this is bait but you should still kill yourself
>>
>>59293966
>implying it isn't the same guy talking to himself
>>
>>59294017
Pretty sure you are more likely to use C++ or C# in MS, Java at Oracle, son
>>
>>59294022
>I know it's intentional but I still cant control my emotions
grow up senpai
>>
>>59294041
These are very strange assumptions.
>>
>>59294055
Look at their job listings, fuzzbuzzer
>>
>>59294041
Of course, if you deal with the smaller and less significant tasks
The real work is done in C and C++ though, you'll see when you step in the real world
>>
new thread when? :3
>>
>>59294068
I think he was being sarcastic.
>>
Any place that deals with embedded system design uses C.

t. Someone who works at a semi-con company
>>
Since when did "fizzbuzzer" become a derogatory term?
>>
>>59292536
Thank you for choosing a Lisp.
>>
>>59294088
fizzbuzz too hard for a C toddler?
>>
>>59294083
The Mozilla task force will force you to rewrite everything in Rust.
>>
>>59294100
+18 please.
Learn to curse before you come here.
>>
>>59294077
you suck my cock when?
>>
>>59294002
Questionable methodologies happened.
>>
>>59294102
Rust is okay I guess
>>
>>59294118
C(ancer) is a gentlemens' curse itself
>>
>>59294126
>Questionable methodologies happened.
I'd be happy to hear your critique. Maybe we could relay them to the I triple fucking E.
>>
>>59294129
Rust is actually the most white language currently available
>>
I feel it coming
>>
>>59294144
Java is
>>
>>59294102
NSA will prevent you use anything but C at all costs
>>
NEW THREAD!!

>>59294171
>>59294171
>>
File: 0131103628.jpg (322KB, 438x576px) Image search: [Google]
0131103628.jpg
322KB, 438x576px
>>59294144
>most white
/pol/ really have shuffled priorities around.
Look at this book. Tell me it's not white.
>>
>>59294102
Rewriting everything in Rust takes thousands upon thousands of hours as well as abandoning some of the legacy software my company has been using since 1980. Don't fix what isn't broken.
>>
>>59294173
That's pink
>>
>>59294173
It's not actually. It has some kind of yellowy tint, which is probably from all the curry.
>>
>>59294235
>>59294228
I'm colorblind. I really couldn't tell. You'd think I would manage by now. Still you get the point. That's just the JPEG.
>>
>>59294254
>/pol/ toddler
>I'm colorblind
lmfao
>>
>>59294270
/pol/.
You're confused. I'm responding to /pol/ posts from the Rust nazi.
>>
>>59294139
>le epic argument of authority
>Google Search
>Google Trends
Research about a languages follow the hype factor way more than actual adoption. Up and coming languages will be way over represented compared to their actual adoption.
>Social media
It is safe to assume the embedded programmers or mathematical developers are not as represented on social media compared to, say, web developers or another category which relies more on public exposure. Likewise you don't go to Stack Overflow to know what's going wrong in your linear solver.
>CareerBuilder
This is fine. Although it's better for knowing which languages grow, it doesn't tell which languages had most retired programmers or absolute presence.

In short I fail to see the point of such a ranking, even from the IEEE.
>>
File: BigO.png (66KB, 1071x240px) Image search: [Google]
BigO.png
66KB, 1071x240px
>>59293977
Kinda, yeah. I think it is used to show that we don't really care about what happens with a function at the "start", only after n gets to infinity.
>>
>>59294300
Ok I get it you're in denial about how fragmented and small the functional programming community is. That's fine.
>retired programmers
Well naturally the companies will replace those retired programmers with programmers of similar skillset. You're underestimating the measurement.
>>
>>59294270
>race is just skin color
>>>/t/umblr
>>
>>59294354
>>>/t/730945
Thanks
>>
>>59293272
im not bloating anything i live in Albania
>>
>>59294354

Racism is wrong.
>>
>>59294796
it's 2017 my dude
>>
>>59294796
Actually it's correct by definition. Something which is different can't be the same.
>>
>>59294796
its natural
>>
>>59294353
there's no such thing as `functional` programming. it is a meme forced by js pajeets
>>
>>59296291
>there's no such thing as `functional` programming
what did he mean by this
>>
>>59296291
`there` `is` `though`?
Thread posts: 360
Thread images: 38


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