What are you working on, Sup Forums?
Previous Thread:
What are you working on, Sup Forums?
Previous Thread:
Other urls found in this thread:
merriam-webster.com
bayt.com
twitter.com
rust a shit
I'm programming my AI Maki
C++ is vomit
nth for the B E A U T Y of Rust
C++ is garbage
Idris is the most practical language.
in haskell this is just
first = (!!1)
Rust is trash
nth for the B E A U T Y of C++
kek
in d this is just
arr.ptr
Got what an ugly fucking language
Rust is the future, whether you like it or not
>fn
this is LITERALLY fucking garbage
rust is so fucking shit the language designers have failed on even the most basic things which is utterly inexcusable since they don't really have the baggage of C or anything
>It's real
C++ lives upto it's name for ugliness
V O M I T
O
M
I
T
that's a contrived example and rust is just as ugly even in the most trivial examples
>There are people who'll defend this
My fucking eyes
>there are people who will defend this
firstTruthy :: Monad m => (a -> Bool) -> [m a] -> m (Maybe a)
firstTruthy f = foldr
(\x r -> x >>= uncurry (bool r) . (return . Just &&& f))
(return Nothing)
Only a mongrel will tolerate this
>posters
>7
we get it, enough with the samefagging mozilla shill
int x = 1
int x (1)
int x {1}
:^^^)
Implemented my own generic vector, hashmap, object pool and allocators in C.
Didn't want to do that but Glib is too huge and the alternatives were either not cross platform, did not specify supported platforms or were in general just unusable.
When can't there be C with better standard library and smarter compiler features?
Even if you disregard C++'s ugliness how the fuck can you stand a language who's creator is a windows shill?
wtf?
>Generic
>C
Please don't tell me you used void*
>[]
>not generalising to forall t. Traversable t => t
how is he a windows shill lmfao? and what does it matter? nice ad hominem
>how is he a windows shill lmfao?
His C++ book literally shills windows
>what does it matter
why*
Enjoy your proprietary language, faggot
MACROS you fucking retard, though the hashtable currently works with only void* but it wouldn't be hard to implement it with macros to make it fully generic.
>buy K&R
>see this
have memes gone too far?
>linux project outright rejected C++
why would he endorse linux when microsoft welcomed his language with open arms?
>His C++ book literally shills windows
Do you mean that he just assumes Windows and MSVS?
Those are two different things.
forgot my pic
>t. Bjarne
>Linux project outright rejected C++
He doesn't seem to include any instructions for *BSD users. C++ is for wincucks
>Assumes
Why would it?
>MACROS
absolutely disgusting
>Do you mean that he just assumes Windows and MSVS
So you have to be a wincuck to read the C++ bible?
Even more reasons to hate C++
>why would a book on programming assume the dominant platform and its first-party IDE
Who knows.
>macros are better than void pointers
wew lad
You can't run MSVS on Linux.
>the dominant platform
There are more *nix developers than wankbloz developers
>He doesn't seem to include any instructions for *BSD users.
Because BSD is even less prevalent than Linux?
>C++ is a wincuck pajeet language
I fucking knew it
only on Sup Forums and they're not real developers they're mostly underage/manchild neckbeards
>memes
Stackoverflow, fucktard
Who the fuck uses wankbloz, are you one of those (((gayme devz))) as well?
Were talking about employed people here user.
Mac users are *nix devs too
So Java users?
>Mac users
They aren't devs. Mac devs are somewhat nixen-developers, but bastard ones.
Can't make this shit up. C++ is full of pajeets
So winoze """koderz""" are the minority. I feel sorry for you, pajeet
So basically C++ is a windows lock-in trash? wew
All the pajeetlangs, yes. Windows is still the most relevant platform.
I'm on your side you dumb nigger
For pajeets and gayme koderz? May be. If so you belong to >>>/wdg/ or
Look beyond the workstation user.
Windows is the minority in development platform, you currymunching wincuck!
>void(*)(ReturnTypeReturnType*)
why.
I am, Debian + Freebsd, lad.
Because C++ is made to cater pajeets
>The amount of windows shilling ITT
Not in the 1990s they weren't.
I want (kind have) to write a LISP interpreter in Lua. Is Racket a good choice for the dialect?
>C++ is windows shill
>but doesn't let you use any of the superior features of the windows platform
Really makes you think...
In JavaScript, how do I make it if 2 dice are rolled and they are both the same number, then the user gets no points, if it is different numbers then they are added up as points.
if (dice !== 1 && dice2 !== 1) {
//add score
roundScore = dice + dice2;
document.querySelector('#current-' + activePlayer).textContent = roundScore;
} else {
//next player
}
For some reason its not adding points if just 1 dice is 1, I want it to only not add points if both are 1, how do I fix this. Thanks.
I'd go with the simplest Lisp dialect.
It's the dialect I prefer, but I'm not 100% confident it's simple to implement tbqh senpai
Should recursion be avoided at all costs? Or are there situations where it's an acceptable solution to a problem.
More concrete: I have a tree. I want to destroy a sub-tree, each element one by one.
This problem to me screams "recursion", but I've heard recursion is not very good for performance and stuff like that (not sure how much of that is true for C++).
Should I go the easy route and solve this with recursion or go convoluted but without recursion?
>C++
Found your problem
No, recursion is the best way to do it.
>use an and statement
>UHH WHY DOES IT ONLY WORK WHEN BOTH THINGS ARE TRUE
fucking christ
No you dumbfuck. Racket is scheme + shitons of extensions.
If it for school you implement the 7 operators that are needed to implement scheme.
If you need to actually implement working scheme then look for the smallest r4rs scheme implementation.
Okay, thanks. Scheme it is.
Some C++ compilers do TCO, so you could be good actually writing the tail recursion and be done with it. However, even if the final code isn't recursive, it's not a sin to reason in terms of a recursive algorithm and then flatten it into something non-recursive. That's what I often do personally
>i heard recursion is bad
who told you that? your instructor pajeet?
So it basically goes back to the beggining of the conversation, when I said, that the following two statements are contradictory:
>Language has FCF if it can pass, and store functions as data [implicitly: it doesn't need to have closure functionality]
>C is not considered to have FCF because it doesn't have closures
According to the wikipedia definition C does in fact have first class functions.
It just doesn't have closures to elevate those first class functions to be more useful.
>C++
yes
>/dpt/ hates C++
Stupid hipsters. I bet none of you work in the industry either.
Truly sad.
>Should recursion be avoided at all costs?
yes. recursion is only shilled by brainlet newfags who think it's cool because they learned it in cs101 last week
use an explicit stack to traverse the tree. it's not convoluted at all
If you worked in the industry you would use Java, faggot
Yup, I was trying to bring something more out of the definition, but realized I won't manage to.
Imma stir shit up in your discussion m8.
Common Lisp doesn't have FCF. Instead it's stuck with passing symbols around and looking them up in the defun obarray slot or whatever it's called. Fucking pathetic. C beats CL in this regard.
Well of course they don't.
How can underage people work in the industry?
>>>/dpt/ hates C++
I thought that too, but then I realized it's literally just a handful of shitposters who have nothing better to do with their life.
C++ is one of the top languages faggot
everyone hates Java.
>liking sepples is required for working in the """industry"""
You do realize that most people hate their job?
The reason Java job pay more is because it is so niche faggot.
Java>Python>JS>Ctrashtrash
Sorry, your microsoft C loses here too
no they don't, not even in a tiny circlejerk like /dpt/
>Implying I don't use g++
How can I work in """the industry"""? I'm already taking my hindi courses and learning Microsoft Visual C++. But I still need English subtitles :(
Python>JS yeah
Java>C++ ok
but Python>Java you're in space m8. Java's design is retarded even for a procedural language, while Python is an honorary LISP-sensei.
That's because there's no proper alternative to C++.
Bjarne openly shills microsoft
if(dice1 === dice2) // Equal numbers, no points
{
alert('no points, user!');
}
else // if the numbers are not equal, we know they are different, so get points
{
roundScore = dice1 + dice2;
}
Java's syntax is pretty clear and straightforward m8. There's not much to get snagged on.
Has it always been like this, or did /dpt/ just recently become 75% shit slinging with hardly any reasonable discourse?
I don't see as much vitriol in other generals.