/dpt/ - Daily Programming Thread

Dream big! edition.

Previous thread: What are you working on Jow Forums?

Attached: code_master.png (1164x1738, 2.17M)

Other urls found in this thread:

gitlab.com/cppit/jucipp
youtube.com/watch?v=TiBYXcRAL-Y&t=1s
forum.golangbridge.org/t/performance-concern-in-calling-gtk-library-ies/10290
cmake.org/cmake/help/git-stage/module/FetchContent.html
cs.nott.ac.uk/~pszgmh/pearl.pdf
twitter.com/NSFWRedditImage

I shill this for free there's nothing you can do about it
gitlab.com/cppit/jucipp

Attached: 1535972932461.jpg (960x722, 286K)

all this should be a clang langaugeserver plugin for vim

Attached: .jpg (912x1009, 143K)

>vim
garbage
>emacs
trash
>atom
slow
>qt creator
lmao wtf is with this pre 2002 boomer UI design and the scaling doesn't even work in hdpi
>atom
electron garbage
>vs code
microshaft electron botnet that flickers in hidpi nonstop
>ST
lmao no embedded terminal, no CMake support
>others
garbo

Attached: 40451969.png (447x625, 243K)

ok whatever nice facebook meme

clangd isn't ready for production, is it?
Damn, GCC is going to take a substantial blow in popularity when this comes out.

I imagine GCC devs are a bunch of angry, smug and arrogant boomers living in the cave.

right so ruby said some gay shit about nes.... but whatever.... i didn't get it... reminder that 6502 won't get you a job

I'm not looking for a job; I'm looking for an artistic life.

you do 6502 assembly because of an artistic life?

autistic*

>Sepples

Attached: vomit.jpg (650x650, 90K)

No, but it is a valid way to be artistic.

I try to strive for more than social approval.

Stop LARPing stupid fucking nigger. Your web browser, the compiler back-end of your meme lang, your bank and everything else uses C++ in your back lmao

Attached: 25591838.jpg (743x635, 47K)

c++ is the most expressive, most multi paradigm, zero cost exception having, pure functional enabled, meta programming capable language around. and just like the other freshmen and dropouts ITT that spam 'oop is bad' memes or think that pure functional means you use structs and free functions instead of methods you're really dumb and retarded.

please tell me why a language that's constantly improving and making great strides in all directions makes you throw up. is it because it allows multiple inheritance or because you or because you're too dumb to parse the complicated syntax?

which are you going to tell me to use instead? C99 or Idris?

>zero cost exception having,
What about (((Rust)))?

Rust.

How is that an argument for sepples not being garbage?

Boy, you sure got defensive.
Sepplesfags are so insecure; they really need to delude themselves and get defensive whenever their precious garbage gets criticised.

if he'd made an argument you would have just called him defensive

Rust is good too.
Shit stdlib though.
>No randgen in std
C++ is one the best, if not the best we have rn

Not him but I'd reimplement some of its useful ideas before I'd use the language, it's just so horribly inconsistent and holds too dearly to c's baggage.

>which are you going to tell me to use instead? C99 or Idris?
I'd suggest lisp since you said metaprogramming.

>CMake support
CMake is a meme. Go fuck yourself faggot.

Attached: 834cda80110b43161de14cdc831a7dba--yuru-yuri-sticker.jpg (236x305, 17K)

He'a right: Cmake is shit.
Fucking avatarfags.

Have you tried Nim yet?

Attached: me in the right.jpg (1280x720, 72K)

Too many yurus

no such thing

With no major entity backing it, the language is doomed to obscurity.

A voice of reason on Jow Forums.
But sepples fags won't ever understand why their bloat of a language is garbage. They like shiny things. I had a manager once who filled the codebase with shiny shit, let's call it magpie syndrome. Every retard who thinks having a language which can be written in 1000 different ways is better than a language which focuses on a good set of key features useful in its domain has this brain damaged magpie syndrome.

Enjoy your bloat faggots, you're the reason why the web is such a fucking mess right now.

Rust is shit too. Enjoy your

status.im

What things did you guys code to get from beginner to advanced level coding? I know the basics of coding in C and python but when it comes to coding things like linked lists its hard i just copy docs. How do i improve

I felt comfortable with C++ after I wrote a simple Lisp interpreter in it.

Rust is far more complex than C++ is or ever will be, although it has a robust type system. Syntax is the least of Rust's own problems.

That said, ">le bloat" is a complete non-argument. C++20's concepts will greatly help you avoid code-bloats.
Truly, templates without proper constraints was not a good idea. I'm glad C++20 is fixing that.

Attached: 1535935817857.png (1280x720, 258K)

>website does flashy animation shit as I scroll down
>website looks like some kind of gay
>website basically stops working if you disable js and only keep css
>at least the piece of shit doesn't rely on 50 javascript libraries hosted on some unrelated server
Come on, you can do better.
>I know the basics of coding in C
No you don't.
>How do i improve
Avoid online tutorials and read more.

How the fuck is shovelling more bloat into a language going to make it less bloated?

c++ will be TRULY great in c++30 when it has language sum types and reflection and networking and coroutines and whatever TS the std::threadpool is hiding in

oh yeah its exectutors
I cannot freaking beleive executors aren't making it into c++20 im so mad

Attached: .gif (500x513, 251K)

>Rust is far more complex than C++ is or ever will be
How do you measure? Rust is more idiosyncratic, but it's a more clear, better-designed language. C++ is a mess.

>Everything I don't have any knowledge about is called bloat
golangboomer.jpg

>need to wait until C++20 until C++ is fixed
>when C++20 is released we'll need to wait until C++25 until C++ is fially fixed
Keep dreaming.
>rust is complex
Yes, that's why it's shit, keeping the syntactic memes of C++ was only the tip of the iceberg, I still think that at least so far it's not as bad as C++ just because it hasn't had enough time to absorb as many programming paradigms as C++ has.
>That said, ">le bloat" is a complete non-argument
I disagree, it's now impossible to fully learn all the aspects of the language AND also gain the experience to be able to use them effectively without spending a good 10 years on it.
This means you're left with having to learn a subset of the language.
It has gotten to the point where any given C++ project can be considered to be written in a completely different language depending on the arbitrary subset of features someone picked from it.
And even then, once you pick a set of features you are comfortable with and find one other person on earth who is also familiar and comfortable with that subset of features you're now left with the realisation that you could have just picked a language which was designed to cover that set of features and deals with them much better.
C++ is trying to be everything at once and in doing so it fails to be good at anything at all.

name 3 features that were added in c++11 or later that are misguided bloat and aren't library features

>TS
Tran-sexual?

recommend any books?

Initializers in if and switch statements
Structured binding declarations
User-defined deduction guides

>How do you measure
Rust chan's borrow checker makes her very troublesome to do certain things with.

Ruby is a girl, you must be thinking of someone else.

With a language which already has SO MANY FEATURES. Any new feature was "misguided bloat". The focus should have switched for a long time to deprecating useless crap and simplifying the language not bolting more onto it.
Just because you have a good feature added to a language doesn't mean it's a good idea when the language is an over-featured pile of crap.
Things like lambdas, rvalue references, move semantics, tuples, user defined literals and more are all neat features, don't get me wrong, but their bolting on to the existing language doesn't make the language any better, it just makes it bigger and less directed.

>tfw /dpt/ made you fall for the functional meme

Sure, but the language itself is less complex. Like, there are "complex" and "complex to use", both C++ and Rust are complex to use, but Rust is less complex by itself, i.e. better designed.

Yeah Rust is weird like that

Attached: rustchan.jpg (900x1200, 156K)

these are pretty shitty examples and it looks like you just went to the list of c++17 features and chose the ones that looked the most complicated to you

>Initializers in if and switch statements
this isn't going to confuse anyone at all, and you could already do this it was just weirder and made less sense. definitely not misguided and its not bloat because its invisible unless you chose to use it, and if you do use it it wont confuse anyone

>Structured binding declarations
Ill admit that THIS feature could confuse someone if they hadn't seen it before; but its not a bad feature .

>user defined deduction guides
not anymore confusing than temppate metaprogramming already is, and it opens up template deduction for objects instead of just functionsl; which makes code cleaner and easier to write and read so no you're retarded

0.5/3 of the features you named were misguided bloat

none of the features you named were misguided and bloat. If you're too retarded to keep up with an evolving and sanely expanding language go back to C. and even C sees changes and new features

Attached: .jpg (660x557, 34K)

Not complicated, completely unnecessary, i.e. bloat.

Yes. For C there is "The C Programming Language (2nd Edition)" by Dennis Ritchie and Brian Kernighan. It's a good thing to keep around as a reference and read a few times, people often miss a good number of important key details on first reading.
If you want a more expanded and longer more up to date book on C I hear people I trust recommending "C Programming: A Modern Approach" by K. N. King.
For general good programming practices I recommend the short book "The Practice of Programming" by Brian Kernighan and Rob Pike.
For a good introduction to various algorithms and data structures there's "Algorithms + Data Structures = Programs" by Niklaus Wirth.
A very interesting introduction to functional programming can be found in the lecture series "Structure and Interpretation of Computer Programs" (available on youtube). There's a corresponding book but I have not read it.
That should be a good start.

how is something that is easy to comprehend, totally optional, has zero or even negative cost, and that makes code cleaner and easier to write and to read BLOAT

>most books are 30+ years old
Meme list.

cute anime girl teaching Python!!

it's just 1st Ep so nothing much yet but damn I never knew there's a browser program for writing python. thx programmer chan

youtube.com/watch?v=TiBYXcRAL-Y&t=1s

Attached: 1465404669967.png (480x480, 292K)

>none of the features you named were misguided and bloat.
Not on their own, they were misguided and bloat in context, however.
>If you're too retarded to keep up with an evolving
Languages aren't meant to "evolve", any language which has ever tried to "evolve" rather than slowly and carefully "adapt" has slowly turned into bloated shit.
>and sanely expanding
Magpie syndrome.
>language go back to C. and even C sees changes and new features
You clearly have no clue about C. C has barely changed since C89. The biggest changes have really been the deprecation of a bunch of legacy shit and the introduction of features like compound literals (and expansion of the standard library, which is far less likely to disrupt a language than syntactical additions).

Old books are usually better. I didn't actually understand parsers until I started reading Wirth's stuff on it.

>implying that anything good has come out of programming in the past 20 years.

programming in c++ without lambdas and move semantics would be litteraly unbearable

rec me some golang books

The Go programming language

But the language was still praised before they were introduced.
In a few years when another "useful" feature will be introduced into the language people like you will be talking about how programming without that feature would be literally unbearable.
Ignoring this hypocrisy for a moment, let's consider this a bit further. If the new features of C++ make the language so much better, why can't they be integrated more cleanly and deeply into the language (with move semantics in place, for example, why isn't there an easy way to insist something can't be copied without having to write what amounts to a bit of vague boilerplate every time). Why can't the old ways of doing those things be deprecated or removed? Why is it just a language where instead of stripping the old paint and re-painting, everything just gets lightly scuffed up with a brillo pad and then re-primed, re-sprayed and re-cleared every few years?
At least with garbage like rust they started from scratch, even if they quickly made the same mistakes as C++, they at least went for the right approach, and in the end it resulted in a mildly better result.

fn main() {
let mut result = String::new();
for word in ::std::env::args().skip(1) {
result = format!("{}{} ", result, word.to_uppercase());
}
println!("{}", result);
}

Thanks.

>Go
obligatory
forum.golangbridge.org/t/performance-concern-in-calling-gtk-library-ies/10290

are you saying I should avoid Go because of this?

Not unless you are FFing to useful legacy libraries like Linux API, Vulkan, pulse, udisks etc

>legacy libraries
>Linux API
>Vulkan
>pulse

Hello frens. Is there any active /dpt/ irc server that i could join? ;_; pls respond

Why are employers discriminating against genius programmers with Anime avatars such as myself?

Attached: 1421162030740.jpg (540x705, 87K)

>Vulkan
>legacy
bro... OpenGL is legacy, and vulkan is its replacement.

Not true, I have several coworkers that use anime avatars

Attached: G1.jpg (500x500, 53K)

Not enough Haskell in your repos

in c++ this is just
int main (int argc, char **argv)
{
auto expr = IteratorStream( argv, argv + argc) | Skip(1) | Map(toString) | Map(toUpper) | CollectList();


std::cout

Attached: Illya 1192 (BU).png (500x505, 194K)

Attached: 1514320418538r9k.gif (500x625, 1.78M)

i have seen a facebook dev that had Lenin as his avatar.

they aren't

Meson is the new hotness.
Get with the times.

fp autists please answer my question here about some sort of applicatives :

How do I quickly learn enough c++ syntax to use arduino?

[spoiler]not a coder, so learning too much would be pointless in my case[/spoiler]

ZipList?

What's meson's alternative to this?
cmake.org/cmake/help/git-stage/module/FetchContent.html

ill look into it but its 1am here
just wanna know if
[ [1,2,3], [2,4,6]] zipList( + 1)
would be
[[2,3,4], [3,5,6]]

no you'd get 3 6 9

I am tentatively making a start on learning how to program, reading this book.
A few quick and possibly stupid questions:
This seems a good solid introduction, but for a total newbie, is there a book that would be a good foundation to read before this, or should I continue with just this one?
What should I compile with? I think a compiler is what takes your code and turns it into a working program, if so, which one is best?
Thanks

Attached: th?id=OIP.vzKZHmn6BVg7UD-wKZWIEQHaJO&pid=Api.jpg (474x590, 39K)

>No UTF-8 support

k thanks

learncpp.com
get rid of that boomer trash. also the language maybe.

>learncpp.com
Is it actually good?

oh do you want []? with
(+) [1,2,3] [2,4,6] you'd get [[3,5,7],[4,6,8],[5,7,9]]

or wait nvm

Wow, are they actually trying to make ExternalProject not so fantastically useful?
That is still inferior to meson subprojects/wraps, though.

Rereading my post, I'm not sure if my sarcasm about ExternalProject was obvious enough,

I am writing a web scraper in haskell using the scalpel library. I would really like to know how to use Parsec to do some processing on the scraped text. From example I would like to drop elements from the 'title' list matching a regular expression. And also trim whitespace and weird newline characters from the strings in 'list'
getSheets :: IO ()
getSheets = scrapeURL url sheeter >>= saveSheets
where sheeter :: Scraper String [Sheet]
sheeter = chroot ("section" @: ["id" @= "1"]) $ do
titles

write a parser and run it on the input?

>get rid of that boomer trash. also the language maybe.
No, and no. Thanks for the site link though.

i need to be "well versed" in sql in a couple weeks, but i am having a horrible time memorizing even basic queries. what can i do to make it stick?

cs.nott.ac.uk/~pszgmh/pearl.pdf for starters

To make the concepts stick you need to write more programs. For straight memorization you can use Anki-style flash cards, but I haven't found memorizing things to be very important for learning.

Sit on freenode #mysql. Lots of interesting stuff.
Think of joins in terms of their ven diagrams, brush up on your logic.
What sort of queries will you be writing?
I have found pivots and island grouping to be incredibly difficult in mysql.

before starting a project some guys do a uml class stuff to design a program before hand any one with info on this ?