[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: 293
Thread images: 29

File: anime is degenerate.png (622KB, 540x608px) Image search: [Google]
anime is degenerate.png
622KB, 540x608px
old thread: >>60928630

What are you working on, /g/?
>>
I'm trying out go and it's such a fucking meme language. Instead of declaring variables with

int i = 1
it's
var i int = 1


What the fuck is wrong with them? They're literally just doing this to be different instead of for an actual logical reason.

Arrays are declared

classifications := [3]string{"Hello", "Meme", "Language"} 


Honestly why can't they just use C style syntax, if they did then it could actually be a good language instead of a meme language.
>>
>>60933308
i := 1;
>>
>>60933273
insert Lisp shill text here
>>
What's wrong with putting things in your butt, OP?
>>
File: weight a minute.png (25KB, 128x135px) Image search: [Google]
weight a minute.png
25KB, 128x135px
I want to learn C#

How do I get started?
>>
>:=
trash
>>
>>60933273
I figured out how to make a normie friendly CLI.

I'm not sure the world is ready, but I'm going to find out.
>>
>>60933315
Learn C, then learn #.
>>
>buttstuff
>>
>>60933311

Yeah nice one, what could possibly go wrong with not declaring types and trusting the compiler to guess.
>>
>>60933321
Not possible
>>
>>60933320
Absolutely shit taste, get the fuck out of my board
>>
>>60933327
Do you think compiler engineers are idiots like yourself?
>>
>>60933308

The := thing is really nice. If they just kept classic declarations and included that it'd be really clean and nice.
>>
>>60933336
>its old so its good
its literally more typing to do the same thing.
>>
>>60933327
Sit back and let Jesus take the wheel
>>
>>60933347
Who the fuck are you quoting and why the fuck didn't they also tell you to get the fuck off of this broad?
>>
>>60933356
>Jesus
Not real
>>
>>60933327
Seriously every language that isn't C or dynamically typed has some form of type inference now; the world has moved on.
>>
60933366
>still no telling why its good
(You)
>>
>>60933273
>anime is degenerate.png
>he thinks that shit's bad
https://www.youtube.com/watch?v=-iDtR1yKJM0
>>
>>60933375

Just because everyone says jumping off bridges is fun doesn't mean I'm going to do it
>>
Stupid fuck here. Do you say that app was "tested on windows" or "tested in windows"
>>
>>60933381
>bunnies in a basket
That was gonna be some gore wasnt it?
>>
>>60933405
on
>>
>>60933347
>more typing to do the same thing.

:= is both for variable declaration and assignment, it's not the same as =.
>>
>>60933405
I don't make Windows Apps
>>
>>60933330
You may be underestimating the latest generation of normies.
>>
File: old_hag_langs.png (173KB, 600x355px) Image search: [Google]
old_hag_langs.png
173KB, 600x355px
Fortranth for Fortran
construct pure function
>>
>>60933408
only if you count dialogue gore as a real kind of gore
>>
>>60933426
But i can declare and assign with "=". ?
>>
>>60933436
I use ALGOL 60 bro, step up
>>
>>60933436
Stream your suicide in starbucks
>>
>>60933416
Thanks a million times.
>>
>>60933447
And you'll be typing more and adding redundant type specifiers.
>>
>>60933405
>app

faggot
>>
>>60933512
???
 auto arr = [1,2,3];
writeln(arr);
arr[0] = 2;
writeln(arr);
>>
>>60933327
> to guess

the reason type inference is possible is because it never has to guess unless you want to do something that doesn't make sense semantically, like expecting i := 1 to be a float

get with the times grandpa
>>
>>60933531
Assignment and definition are different

a = b
a := b
these don't mean the same thing
>>
>>60933558
only in declaration though.
>>60933579
i know, im saying overall, := is more typing and more reading.
>>
>>60933602
They have different meanings.
>>
>>60933531
auto is just D's version of :=, and you're typing more.
>>
>>60933607
>>60933608
what about with type qualifiers?
>>
>>60933629
(a :: T) = (b :: T)
((a :: V M T) := (b :: T)) :: M ()
>>
>>60933647
>::
i still dont see the reason though, both pascal and go are more tedious.
>>
>>60933659
= and := have different meanings
what is your complaint?
>>
>>60933690
that its more work to do the same thing in pascal, go and probably most other languages with :=
>>
>>60933717
= and := are DIFFERENT
>>
>>60933717
:= and = aren't the same thing, this has been said about 10 times now

are you stupid
>>
Memes aside, what is the healthiest choice to do webshit for someone with solid C/C++ background? All these php, js, ruby things look bizarre but maybe I should look more closely :thinking:
>>
>>60933759
>>60933766
i get its both declared and initialized, thats not the thing here. but ill quit i guess.
>>
File: sched.png (320KB, 1222x998px) Image search: [Google]
sched.png
320KB, 1222x998px
Does any Anon have experience with manufacturing scheduling or scheduling algorithms in general?
I was thinking to start working on a babby's first program related to scheduling. But after reading about it a little I decided to change my mind. This is a really complex field of study and I'd probably need to become a professor to be able to create anything useful.
>>
File: consider_suicide.png (628KB, 1280x620px) Image search: [Google]
consider_suicide.png
628KB, 1280x620px
>>60933456
Ok buy me a mocha frap and I'll do it.
>>
>>60933770
PHP might look familiar to you.
Don't=fall for it, it's hellish.
>>
>>60933807
a = b = c

a := b
a := c

NOT THE SAME
>>
>>60933770
good luck writing any kind of modern RESTful backend application with a compiled language
>>
>>60933837
why?
>>
>>60933837
What does using a compiled language have to do with the REST buzzword?
>>
>>60933837
My previous job was as a back-end web developer. We used C++ and delivered a REST API to the client.
>>
>>60933575
>write a kernel in go
>every int is 16
>32gb of memory needed to boot strap
>>
>>60933908
Try it today :^)
https://github.com/jjyr/bootgo
>>
>>60933908
don't use type inference when writing kernels in go then.

jesus is this entire thread retarded today
>>
>>60933947
Meanwhile d can do type inference without that issue.
>>
>>60933575

What if it assumes it's a 32 int when you actually need a 64 so it ruins everything
>>
>>60934003
Are you pretending to be an idiot?
>>
>>60933984
No it can't, only languages with full Hindley-Milner can deduce the intended width of an integer constant without type annotation.
>>
>>60933315
install Visual Studio and dick around
>>
>>60934074
auto i = 32_767;
auto ii = 2_147_483_647;
auto iii = 9_223_372_036_854_775_807;


4
4
8
>>
>>60933929
This looks like a piece of shit. If X language is so good and better than C, why isn't there an actual kernel written in it?
>inb4 rust microkernel garbage
>>
>>60934074
that's bullshit
>>
>>60934165
Redox OS
>>
>>60933273

> tfw 75+ weekly downloads for my shitty javascripts
> 5 people are using them right now
>>
>>60934240
I said:
>inb4 rust microkernel garbage
>>
>>60934277
https://github.com/Vild/PowerNex
>>
>>60934277
Do you know what "inb4" means?
>>
>>60934275
>5 people are using them right now
How do you know this? Why do you package botnet?
>>
>>60934165
What is an """"actual kernel""""?
>>
>>60934112
You can't assume the width of an integer variable based on its initialization value. 32_767 could just as well be 32-bit.
>>
>>60934317
...or rather i could be.
>>
LINQ is for C# toddlers that are too retarded for Functional Programming
>>
>>60934240
>Current state of Fox News
>>
>>60934317
You can for a constant
>>
>>60934317
???????????????????
>>
>>60934317
let x = 2i8

:^)
>>
>>60934351
http://www.huffingtonpost.com/2015/03/03/stoned-rabbits-dea_n_6789232.html

http://www.telegraph.co.uk/news/worldnews/northamerica/usa/11447042/Stoner-rabbits-will-run-amok-if-Utah-legalises-marijuana-DEA-agent-warns.html
>>
>>60934394
>The current state of huffingtonpost
>>
>>60934361
The example above was complaining about go using too much memory by making all ints bit unnecessarily large; that's not something D does any better.

>>60934393
that's cheating.
>>
>>60934410
>The current state of mainstream media
FTFY
>>
>>60934299
This is even worst than Redox kernel. An utter joke in its current state.
>>60934303
Yes. Do you?
>>60934313
On par or better than the Linux kernel. Everything else is niche, or just garbage both in terms of current state and future potential.
>>
>>60934502
whys that?
>>
File: alex-jones.jpg (44KB, 492x398px) Image search: [Google]
alex-jones.jpg
44KB, 492x398px
>>60934491
>The current state of """alternative media"""
>>
>>60934502
>On par or better than the Linux kernel
Redox OS
>>
>>60934474
No one writing a kernel would be silly enough to use type inference anyway so this is a non-issue.
>>
File: 1496375114500.png (106KB, 1907x1420px) Image search: [Google]
1496375114500.png
106KB, 1907x1420px
>>60934502
>This is even worst than Redox kernel.
Pajeet my son!
>>
>>60934502
>Pajeets now shilling C
/dpt/ is dead
>>
>>60933315
if you know programming, just implement some shit with it like a signal convolution function

if you don't, just pick up a tutorial for a week then try to implement some shit like a signal convolution function
>>
File: 1488608309836.jpg (61KB, 1000x800px) Image search: [Google]
1488608309836.jpg
61KB, 1000x800px
I'll fix C++ namespaces in a single post
Take regular namespaces, and replace them with class instances. No, really, it fixes everything that's wrong with C++ namespaces. No more forward declarations needed and you get real symbol hiding.

replace
namespace N {
//...
}


with
class N_impl {
//...
} constexpr N{};


done. There's absolutely no downside, and on the upside you can now put a call operator on your 'namespace'.
>>
>>60934559
>C++ namespaces
just stick to c namespaces
int ___i
>>
>>60933273
Is that pic real? I need to download that series.
>>
>>60934559
dumb frogposter
>>
>>60934559
>I'll fix C++ namespaces in a single post
Let me have a crack at this
module


:^)
>>
>>60933908
You have other problems if you're writing a kernel in Go.
>>
>>60934509
Why's what?
>>60934521
Redox is a piece of shit hipster OS form the get-go when it decided to shit on GPL and Linux and claim superiority despite being a toy OS. No one will ever care about it except the few Rust "enthusiasts".
>>60934528
>>60934537
What the fuck are you spewing retards going on about? What level of Rust butthurt is this to spew baseless fallacies? Thankfully I know I'm white (male).
>>
>>60934643
Why is it a joke
>GPL is good
commies out.
>>
>>60934643
>when it decided to shit on GPL and Linux
Are you purposefully ignorant?
>>
>>60934643
>>60934502
Why does C attract these 15 year olds? It's a genuine question
>>
>coworker decides to add an npm step to one of our project builds
>tells us it will make it easier to add js libraries as dependencies
>the build breaks every week when some random webshitter pushes a breaking change to an obscure js library
Why do we tolerate webdevs? Why the fuck is JS not dead yet? Why the shitting antichrist fuckcunt is node not banned by international treaty?
>>
File: 4chan.jpg (218KB, 1106x838px) Image search: [Google]
4chan.jpg
218KB, 1106x838px
>>60934512
>The current state of social commentary on forums for discussing taiwanese tapestry
>>
>>60934734
Because no language is close to replacing C.
>>
>>60934734
>DUDE ITS THE ONLY LANGUAGE IF YOU WANT TO LEARN PROGRAMMING LMAO
>>
>>60934734
Most 4chan users are school going girls. This is a statistical fact
>>
>>60934734
Well you can post anything absolutely retarded and hide behind the pseudo anonymity.
>>
>>60933837
why would you not do backend work in a compiled language or at least Java.
>>
Post yfw when there still isn't widespread support for the C++ export keyword
>>
File: 12506712512.jpg (41KB, 960x960px) Image search: [Google]
12506712512.jpg
41KB, 960x960px
>>60934800
>>
>>60934800
>which allows the same template to be declared, but not defined, in other translation units.
What a shit language.
>>
>>60934797
He wouldn't because he can't get his code to compile, presumably

You can tell a bad programmer because he (yes, 'he', all bad programmers are male) has a problem with compilers
>>
So pure functions are just functions that won't mutate the input, right?
>>
>>60934841
pure just means no side effects.
you put it ints, you get an int back, nothing more, nothing less.
>>
>>60934857
int f(int x)
{
printf("Hi there.\n");
return x;
}
>>
>>60934304

It is anonymous statistics from Mozilla's servers.

I literally made them in correspondence with RMS, so don't you accuse me of being botnet
>>
File: Python_function.png (60KB, 630x340px) Image search: [Google]
Python_function.png
60KB, 630x340px
>>60934841
A pure function is a function that's actually a function. Something which for a given input returns a given output, and doesn't affect other functions outputs.
Non-example in pic related: Python
>>
File: 1442801274591.jpg (100KB, 540x394px) Image search: [Google]
1442801274591.jpg
100KB, 540x394px
>>60934786
Who's really retarded:
>the people using a language with no viable kernel written in it
>the people using a language who's kernel offers nothing but a false sense of superiority to its devs
>>
>>60934871
IO is impure because it's basically a side-effect.

Why do you think Haskell fags do all sorts of mental gymnastics to justify the IO monad.
>>
>>60934871
no
>>
>>60934643
>when it decided to shit on GPL
even if linus uses GPL he shat on GPLv3
>>
>>60934786
>>60934768
This explains a lot.
>>
>>60934911
>>60934910
static int i;

int f(int x)
{
return x + i++;
}
>>
why is swift just objective-c but without anything that made objc good and instead with everything that makes javascript awful
>>
>>60934942
>swift
Found your problem
>>
>>60934942
Lots of JS devs out there who are incapable of using any language significantly different to JS.
>>
>>60934939
Not only does that mutate i (change state aka impure), it might be the case that f is called before i is initialised (undefined behaviour).
>>
>>60934939
 pure int add_self(int x)
{
return x+x;
}
writeln(add_self(1));


its not a hard concept lads
>>
>>60934958
Git gud
int add_self(in int x)
{
return x+x;
}
writeln(add_self(1));
>>
>>60934966
i always forget in/out exists, thanks.
>>
>>60934957
>it might be the case that f is called before i is initialised (undefined behaviour).
Not at all, i is initialized to zero.
>>
>>60934975
Always use in ref in the parameter for performance optimization
>>
>>60934976
Ah, yes, you are correct. I made a classic C pitfall there, global variables are always initialised.
>>
>>60934955
That MUST have been Apple's thought process. Software development is too hard, let's just pretend we're making websites so all the low-wage cucks will get on board.

Then we end up with shit like Atom which has somehow become the new Sublime in terms of "awful software being promoted as superior by people who have literally no idea what they're talking about".

I just wish that we could all settle down and agree that either Objective-C or C++ with Lua support is really all you need to make the vast, vast, VAST majority of desktop software, and at the end of the day it'll be much better than some random API developed on a language that was originally only built for webdev.
The only this missing from that combo would be real functional support (fuck boost). I guess C# has its niches too, but I feel like Lua could use some sort of functional programming layer.
>>
>>60934958
>>60934966
Hwæt tunge eart þes?
>>
>>60935012
>
int example.add_self(ref const(int)):
push rax
mov eax,DWORD PTR [rdi]
add eax,eax
pop rcx
ret


oh neat
>>
>>60935029
>Objective-C or C++ with Lua
Fuck no.
>>
>>60935046
Why not? What's so bad about just using C++ to design software on operating systems that are themselves written in some dialect of C, as they all are nowadays?
>>
>>60935056
I wasn't objecting to C++.
>>
>>60935066
ObjC has its place, and while I much prefer C++ over it I think if you get past the weird {[syntax]} it's a noble effort to actually do something differently.
Lua is like Python but good, in that it can quickly and easily manipulate data but it doesn't have completely retarded constraints such as relevant whitespace or updates to the language breaking old programs.

Which do you disagree with? And how would you go about improving programming culture, anon?
>>
>>60934607
Wrong, that's not C++
>>
>>60934800
The keyword is unused and reserved, idiot.
http://en.cppreference.com/w/cpp/keyword/export
>>
>>60935104
good thing im not stuck with sepples then.
>>
>>60935095
I don't have any experience with Obj-C so I cannot comment on it.

I object strenuously and vociferously to Lua. It is far inferior to CL and Scheme.
>>
>>60935121
>add export to the standard
>no major compilers add support for it
>remove it in a later version
>i-it's only reserved!
bjarne pls go
>>
cant imagine how depressed bjarne must be to be stuck with such a shit language that you lost all control of a decade ago.
Then having to watch these new and better languages spring up and get bombarded with why cant C++ do THING, LANG X can?
>>
>>60935145
While I agree that Lisp as a whole is superior to most languages that aren't as low-level as C, I dis like how fractured it is. Finding a simple compiler (that actually exports to binary) for Common Lisp is almost as hard as finding one for Java, and unfortunately like Java they all seem to be platform specific (the parallel is actually quite apt: clisp and gcc-gcj both don't exist on Windows in any useful state, and neither has the capability of cross-compiling).
I haven't put as much time into Scheme as clisp (I much preferred clisp when first trying them out), but I don't think it's situation is much better.

I'm also unsure if Lisp works with C as well as Lua does. Correct me if I'm wrong on this, but considering you can literally embed C into Lua and vice versa and compile them in a single file. I don't think you can do that with C and Lisp, but again I've never tried so I don't know. I think if you could embed clisp into C and have the two languages be able to operate side by side on the same data sets then that would be perfect.
>>
File: 1497528035646.jpg (156KB, 528x528px) Image search: [Google]
1497528035646.jpg
156KB, 528x528px
>Objective-C
>>
It's been a few years since I've done any C++ starting to get back into it. Love that the error messages from the compiler are several pages on a 4K monitor.
>>
>>60935178
Bjarne doesn't even do any programming these days. He stays the fuck out of it and gives speeches here and there
>>
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0267r4.pdf
>>
>>60935188
clisp has been dormant for a long time. Use SBCL.
>>
>>60935234
Just include boost :^)
>>
>>60935188
Fair points. Lua as a whole seems to be much less fragmented. It saddens me that so much collective effort has gone into Python, JS, Lua, Ruby, etc. and produced at best average results, when it could have gone into improving the tooling and ecosystems of superior languages.

I can't say I've ever wanted to literally embed C into Lisp, but it wouldn't surprise me that it's useful in some situations. C and Lisp do work together pretty well in general though.
>>
>>60935247
Boost is a C++ standard library
>>
>>60935188
>>60935239
Common Lisp and Scheme can be embedded as well. See ECL and Guile.
>>
>>60933837
you can compile php, javascript and ruby (most of their implementations do)
>>
>>60935257
Because no one in Lisp want to get actual work done. And anyone like clojure that attempt just get lazy with the JVM.
>>
>>60935257
I think the issue is that new developers so often get "taught" webdev first, which means they assume after learning Python and JS that ALL programming languages essentially work the same way. Syntax as foreign as Lisp's (despite being superior in many cases) seems completely impossible to understand.
That shouldn't affect the heavier areas of programming such as systems as much, but then again Atom shouldn't be as popular as it is.

>>60935264
Ooooh I forgot about Guile, I always forget it's an actual language and not just specifically for Guix (as elisp is essentially just used for emacs).
I'll definitely be looking into embedded lisp in C now, that's not something I've even casually googled before but now that I think about it that workflow would be quite something.
>>
>>60935293
common lisp has some very mature implementations
>>
>>60935293
>Because no one in Lisp want to get actual work done.
r u avin a propa giggle m9
>>
>>60935263
If Boost is standard then why doesn't it come with GCC?
>>
>>60933770
You can write web backends in C# using ASP. Probably the best way to do it now, honestly, because you can just learn the desktop version of the language first (if you've never used it before, it's basically Java but with C++'s syntax and no bullshit) and then transition to ASP when you're comfortable.
>>
>>60935310
>Syntax as foreign as Lisp's (despite being superior in many cases) seems completely impossible to understand.
Then they should try harder.

We don't let civil engineers design bridges with plastic bricks that click together because they find math too hard.
>>
Was using boost date_time but it was really really slow. Just rewrote it to use this https://github.com/HowardHinnant/date and now the code massively faster.
>>
>>60935320
>Must not require that the source code be available for execution or other binary uses of the library.
>>
>>60935293
Define actual work.
>>
>>60935367
the boost license
>>
>>60935351
I'll say again,
If Boost is standard then why doesn't it come with GCC?

The C++ standard library does.
>>
What's with the new meme of describing JS as a functional language? It is not.
>>
>>60935324
What you are referring to as quoting, is in fact, greentexting, or as I've recently taken to calling it, greentexting or quoting. Greentexting is not a quoting mechanic in itself, but rather another free component of a fully functioning text editing system made useful by the english language, 4chan culture and meme components providing a full 4chan experience as defined by anonymous.
>>
>>60935382
If Boost is standard, then why isn't it described or even mentioned in the C++ standard?
>>
>>60935396
Who are you quoting?
>>
>>60935397
Granted its a joke, but its even better considering many boost heads are actually on the std committee.
>>
I am thinking about quitting work and work at the diner
>>
>>60935413
One that's not dysfunctional
>>
>>60935372
If pointer_safety is in the standard C++ why does it not come with GCC?
>>
>>60935445
""greentexting"" doesn't appear anywhere in this post. Where could it be?
>>
>>60935457
Fuck off back to your day care board >>>/v/
>>
>>60935457
"Programming" for Windows is more like taking a spiked dick in the ass than actual programming
>>
File: 1440246538429.png (304KB, 722x768px) Image search: [Google]
1440246538429.png
304KB, 722x768px
>>60935457
>programming thread
>doesn't use a programming OS
>>
>>60935430
Boost is the standard, anon. It's the beta version or the latest stable release of std
>>
>>60935479
when will this meme end?
>>
>>60935481
>double-quoted
>>>/trash/
>>
>>60935479
*tips certain type of hat*
>>
>>60935498
>What is that?
Your day care board
>>
>>60935396
Nice double quotation marks you got there, faggot. I think you will have more fun pointing out words on /v.
>>
>>60935494
Can you point me to the section in the C++ standard where it says this?
>>
what is an ``FROB""?
>>
>>60935530
frobenius norm
>>
>>60935525
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2670.htm
>>
File: 1472809601922.png (2KB, 265x44px) Image search: [Google]
1472809601922.png
2KB, 265x44px
>>60935571
Ok
>>
>>60935521
Linux discussion is more relevant to programming than most of these threads. If YOU don't want to discuss it, don't bring it up and start making a series of asinine shitposts completely unrelated to programming.
>>
>>60935584
Boost is the std beta, instead of calling it "std beta" they call it "boost". Did damage your brain somehow?
>>
>>60935605
Can you point me to the section in the C++ standard where it says this?
>>
>>60935571
This also is a fantastic proof that C++ is a garbage collected language.
>>
>>60935608
Like the other anon said, back to >>>/v/ with you.
>>
>>60935234
this looks like an april fools joke

but I also fully expect the C++ standards comittee to put this in the language.
>>
>>60935616
It's a common knowledge. Obvious things are not stated for a reason.
>>
>>60935234
>Current state of C++
Lmao
>>
>>60935634
That's a no, then.
>>
@60935616
Boost shit gets added into the standard and has in the past.
I.E Boost is basically staging for the C++ std

This pretending to be dense for (you)s needs banned.
>>
>>60935634
So in other words, you're talking out of your ass, and you have no official sources to back yourself up with.

>>60935643
Future state*
>>
>>60934585
its shopped. Check just after 1:00 here for the original:
https://www.youtube.com/watch?v=dQNyvMFn8zg
>>
File: MM8117_140710_36969.jpg (342KB, 1620x1080px) Image search: [Google]
MM8117_140710_36969.jpg
342KB, 1620x1080px
I'm a snake, I currently program using Lisp, should I bother learning any other languages?
>>
What is with this influx of newfags who don't understand the use of > on this site?
>>
>>60935679
No.
>>
>>60935678
Actually, I've heard that they had to change it.
>>
>>60935680
Its literally just autists who discovered the /jp/ meme and think its funny to run it into the ground.
>>
>>60935692
Someone said there's an old version with it, but I haven't been able to find it. Not sure if shenanigans or just hard to find.
>>
>>60935647
>That's a no, then.
Where did I say so?
>>
>>60935672
The link where it says "open-std.org"
>>
>>60935653
Yes, there are many programmers of your calibre posting on /v/. You will fit right in, don't worry.
>>
>>60935723
It's a common knowledge. Obvious things are not stated for a reason.
>>
>Windows-using "programmers" feeling threatened by Linux again
>>
>>60935655
The "C++ has 3 standard libraries lmao xD" is the epic new meme of the month, /dpt/ retards will keep spewing it for as long as you keep reacting to it
>>
>>60935387
Javascript is highest and final evolutionary form of Lisp as intended by McCarthy, this has been known for decades and suggesting otherwise only lays bare your pajeetness for everyone to ridicule
>>
File: 1496552170191.jpg (6KB, 176x238px) Image search: [Google]
1496552170191.jpg
6KB, 176x238px
>tfw too much of a brainlet to learn anything other than python and html
>>
>>60935757
>Javascript is highest and final evolutionary form of Lisp as intended by McCarthy, this has been known for decades and suggesting otherwise only lays bare your pajeetness for everyone to ridicule
m9 i know ur avin a giggle but ur seriously fkin triggerin me atm
>>
>>60935760
Stick to one language. Those retards who keep talking about how you must "keep learning new languages" haven't actually built anything consequent and barely know what programming is about.
>>
>>60935732
Yes, this is why Boost is "std beta"
>>
>>60935784
Sick burn Chad.
>>
>>60935784
Absolutely no link with the statement you replied to.
>>
>>60935784
Python can generate and sum the primes under 2 million in a jiffy, unlike whatever programming language you use. And by "jiffy", I don't mean performance-wise, I mean I can type out a sieve in the blink of an eye.
>>
>>60935834
Do it.
>>
>>60935775
This. HTML is enough, ignore the tryhard faggots on this board.
>>
What's the point of iter() in python? It points to a spot in memory yes? What do I usè that for.
>>
>>60933322
this
>>
>>60935871
Dont bully snek
>>
>>60935862
Why don't you read the docs?
>>
>>60935834
The small gain you get from less typing with Python is easily cancelled out by the shit performance
>>
>>60935871
My python can program, are you just a bad owner who didn't teach yours?
>>
>>60933273
I'm trying to write a FizzBuzz program in C++, but using template metaprogramming. That way, the program can generate the FizzBuzz list at compile-time.
>>
Prove there are male programmers. Men (female) don't count.
>>
>>60935845
import array

def sieve(limit):
if limit >= 2:
yield 2
x = array.array('B', [1])*(limit + 1)
for i in range(3, limit + 1, 2):
if x[i]:
yield i
for j in range(i*i, limit + 1, i):
x[j] = 0
print(sum(sieve(2*10**6)))

$ time python3 test7.py
142913828922

real 0m0.446s
user 0m0.444s
sys 0m0.000s
>>
Hello where are the cute little girls?
>>
> webdevs will defend this
>>
>>60935898
If performance is critical, then in such instances you wouldn't use native Python, or supplement with C.
>>
>>60935942
This is a fictional depiction of a male programmer.
>>
i want to create a discord bot preferably using java, but i accept any suggestion
is discord 4j ok?
do i need a server to host my bot?
>>
>>60935720
It's not in episode 2
>>
>>60936014
The way the API works the bot acts like a client itself with special privileges. If you're running it for yourself or only one server you can have it running on your own machine and it'd probably be fine. If you plan to make it a widely used bot to be used on many servers you'll likely have to get a server. Probably won't need a dedi though, shared hosting probably works fine.
>>
>>60936014
No ideabut for IRC bots you usually have to host it on a server or run it from your computer
>>
>>60936069
i'm doing it mostly for fun, so its only for my own discord group
i want the bot to store some shit on a db
anyway, ty for the answer
>>
>>60935910
>That way, the program can generate the FizzBuzz list at compile-time.
So basically CTFE? That shit is fucking trivial in D
>>
>>60936050
Is that the original airing?
>>
File: floodFillGradient.png (15KB, 529x529px) Image search: [Google]
floodFillGradient.png
15KB, 529x529px
I need a program that takes a black and white texture, and performs a flood fill on it, given a starting position.
But instead of filling the whole thing with a solid color, I need it to fill it with a distance-based gradient, like pic related.
And it should export that new texture.

Given that I'm just an amateur programmer, how could I achieve this?
Maybe the software exists already?
>>
>>60936315
If that was the case CTFE would be trivial in C++
>>
>>60936014
You could probably just chuck it on Heroku for free. But having a server is very useful. Good luck anon, bots are deceptively involved and your mileage will vary depending on how good the Discord API docs are.
>>
>>60936345
>>60936315
>>
File: 12506712.jpg (20KB, 331x315px) Image search: [Google]
12506712.jpg
20KB, 331x315px
>>60935930
>.446s
>>
File: 1497540689519.jpg (313KB, 1158x1064px) Image search: [Google]
1497540689519.jpg
313KB, 1158x1064px
Finally got the lead out of my pants and am working on a Discord bot. Right now my friends and I have three bots that all have a few useful functions, but a lot of functions we don't use - Not to mention overlapping functions with the same command prefix. So I'm just going to pull all of the ones we use and put them into one bot and make it not such a clusterfuck.
>>
>>60936386
Where is your sieve?
>>
>>60936403
I bet you are proud of your fizzbuzz too
>>
File: programmer_employability.png (27KB, 520x544px) Image search: [Google]
programmer_employability.png
27KB, 520x544px
>>60936411
You're the one who cannot write a fizzbuzz-tier algorithm.
>>
File: 125067188.jpg (61KB, 331x315px) Image search: [Google]
125067188.jpg
61KB, 331x315px
>>60936438
>fizzbuzz
>prime sieve
>bubble sort
>>
>>60936444
Yet I bet you gonna even fizzbuzz.
>>
>>60936326
alpha blending

then set alpha to the inverse of the distance or something

distance = sqrt((x1-x2)*(x1-x2) + (y1-y2)(y1-y2))
>>
>>60935649
This
>>
>>60933273
For those of you who program for a living: what does professional code look like?
>>
>>60936499
fizzbuzz and lowerCamelCase
>>
>>60936501
Proving that you're not a mouthbreathing retard
>>
>>60936501
To wank to terseness
>>
File: 1424022503844.jpg (41KB, 800x577px) Image search: [Google]
1424022503844.jpg
41KB, 800x577px
>having more than 2 modulo checks in your fizzbuzz
>>
>>60936499
No HTML, only JavaScript
>>
>>60934824
what about the girls who flunked my algorithms class ?
>>
What happens if I use spaces instead of tabs in a python script?
>>
>>60936499
//Set the latency time in an unused element of one of the arrays.
mDownRatios[PxVehicleGearsData::eREVERSE]=2.0f;
>>
>>60936571
You cannot mix tabs and spaces in CPython. And you should already be using spaces over tabs, if not for the PEP8 requirements, then for the simple fact spaces are superior to tabs.
>>
File: 1497487237353.jpg (64KB, 480x480px) Image search: [Google]
1497487237353.jpg
64KB, 480x480px
>>60936537
I'll put as many as I want, faggot
>>
>>60936571
Nothing, both work just fine.
>>
>>60936403
I can implement O(1) prime sieve if you give me the limit
>>
>>60936768
sum(prime_sieve)
My bad
>>
>>60936768
Summing a list of primes is not the same as generating primes. Not impressive.
>>
>>60936840
I can generate a list of all primes under a certain number (preferably below 1200 digits) and I can still produce a O(1) runtime
>>
>>60936890
>1200
Sorry, 700digits
>>
cringe
>>
>>60936959
If you are into microblogging I highly suggest you to go back to twatter
>>
New thread:
>>60937009
>>60937009
>>60937009
>>
>>60937016
Wrong.

New Thread:
>>60936655
>>60936655
>>60936655
>>
>>60937054
That thread is invalid, you fucking idiot.
>>
>thread isn't even at 290 yet
for fucks sakes
>>
>>60938502
I guess a janitor cleared out a bunch of shit. It was over 310 when I made the new thread.
>>
>>60938873
i forgive you
>>
>>60938884
Was it really worth bumping the thread with that useless reply?
Fucking learn to sage.
>>
>>60938894
Fuck off and kill yourself
>>
What anime is this? I need it for research.
Thread posts: 293
Thread images: 29


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