|
gonadic io posted:honestly all I want out of a language is i don’t understand any of these unless ‘pattern matching’ is regex but that sounds like a dumb subset
|
# ? Nov 27, 2017 18:35 |
|
|
# ? Jun 5, 2024 03:30 |
|
JawnV6 posted:i don’t understand any of these pattern matching allows you to specify different function definitions for certain specific values of parameters from learnyousomeerlang: code:
am i getting terms mixed? \/\/\/
|
# ? Nov 27, 2017 18:46 |
|
JawnV6 posted:i don’t understand any of these - pattern matching: this goes hand in hand with union types/algebraic data types. you can write something like this in rust (I haven't written it in awhile so this is def wrong) code:
- a type system with generics and decent type classes: generics/templates are like, generics and templates. have you never used java or c++? type classes are more or less generic interfaces from java, and generally have the ability to implement typeclasses over other generic types (ex. I implement the type class Queryable for all things Readable and Writable) - lambdas: anoymous functions. again, have you never used c++11 or java 8? - locals are immutable by default: const is the default and you should have to explicitly override it - maybe not a GIL: maybe don't have a single process-level lock that all threads have to take to do much of anything EDIT: another way to think of typeclasses are that they are dispatch tables that you can define within the language and that the compiler will inline for you FamDav fucked around with this message at 18:50 on Nov 27, 2017 |
# ? Nov 27, 2017 18:46 |
|
Fiedler posted:No, one should learn C only reluctantly and after carefully eliminating all reasonable alternatives.
|
# ? Nov 27, 2017 19:09 |
|
i love pattern matchingcode:
|
# ? Nov 27, 2017 19:09 |
|
JawnV6 posted:i don’t understand any of these pattern matching is switch statements but more complex case statements.
|
# ? Nov 27, 2017 19:15 |
|
ultravoices posted:think python was more dry and obviously keyed for a college level course for kids who had a recent math background. my old rear end had to do some heavy googling to know what an ackermann function was and why I wanted to implement it to make it through the examples. oh man I learned with think python, it was so fitting for my autistic math obsessions but I know it's not for everyone, just saying that I particularly loved the book
|
# ? Nov 27, 2017 19:25 |
|
re: type classes whats the difference from protocol extensions swift?
|
# ? Nov 27, 2017 19:31 |
|
NihilCredo posted:
And I've done a lot of haskell and am not interested in really doing any more. In conclusion: all programming languages are poo poo But regardless typeclasses I don't need them specifically, I'm happy with anything that serves the same purpose like interfaces, traits, etc etc
|
# ? Nov 27, 2017 19:40 |
|
But yes there's a reason that my chosen programming languages are rust and scala, and haskell I have the most experience in Starting a business id choose c# and f# though, or maybe kotlin. Those jvm or dotnet communities and tooling are just too good E: kotlin is too niche still, c# and f# are good to hire in gonadic io fucked around with this message at 19:47 on Nov 27, 2017 |
# ? Nov 27, 2017 19:42 |
|
rjmccall explain this fucker please https://twitter.com/pepper_chico/status/935192195329593344
|
# ? Nov 27, 2017 19:45 |
|
Suspicious Dish posted:rjmccall explain this fucker please youre not authorized to view these tweets
|
# ? Nov 27, 2017 19:56 |
|
im not even logged in on twitter and i can see it so Francisco Lopes @pepper_chico Follow Follow @pepper_chico More So this is modern C++, four compilers, four different interpretations of the standard (and potentially wrong ones): - https://godbolt.org/g/3s9Lkp #cpp #cplusplus #cpp11 #moderncpp 9:02 AM - 27 Nov 2017
|
# ? Nov 27, 2017 20:03 |
|
decltype is dumb, lambda captures are dumb, go gently caress yourself alright, so first, decltype(x) is supposed to have different semantics from decltype((x)), because the first is a special form that produces the actual declared type of the variable/member, and the second is the expression type decorated by & if an l-value and && if an x-value. decltype(x) inside a lambda is still based on the actual declaration of the local variable, ignoring the fact that it's been captured, but decltype((x)) is treated as if x were a reference to the lambda capture field, even if there is not in fact a lambda capture because x is never captured clang is correct to complain about D2 and F2, those variables are captured by copy and so the fact that they were originally references is irrelevant: this is a non-mutating lambda and so a reference to the capture is a const l-value gcc's problem with B1 is definitely wrong, decltype is an unevaluated context regardless of whether the argument expression is the special form, and variables used in unevaluated contexts don't need to be captured icc's problem with B2 is wrong, that does need to be const int & msvc is lol
|
# ? Nov 27, 2017 20:22 |
gonadic io posted:But yes there's a reason that my chosen programming languages are rust and scala, and haskell I have the most experience in how is f# not niche
|
|
# ? Nov 27, 2017 20:25 |
|
cinci zoo sniper posted:how is f# not niche You'd be surprised, especially in London. More importantly, c# and f# can call each other trivially so some components can be built in one and some in another
|
# ? Nov 27, 2017 20:34 |
|
cinci zoo sniper posted:how is f# not niche depends very much on ones views, but being created and backed pretty heavily by microsoft (including tool support) does lend it a certain legitimacy. when compared to kotlin it may be good to note that f# has been around longer and the effort to keep tracking the .net platform changes in a sensible way has been demonstrated kotlin seems entirely fine though, targetting the jvm is good for not needing to worry about the future too much. worst case, where jetbrains drops the ball on it in some way, you just get frozen on a compiler, but the runtime will continue to live and be worked on, and you can in that case piecewise migrate onto java or some other jvm language good to switch to this subject matter, because the c++ post above just scares me deeply
|
# ? Nov 27, 2017 20:37 |
gonadic io posted:You'd be surprised, especially in London. More importantly, c# and f# can call each other trivially so some components can be built in one and some in another Cybernetic Vermin posted:depends very much on ones views, but being created and backed pretty heavily by microsoft (including tool support) does lend it a certain legitimacy. when compared to kotlin it may be good to note that f# has been around longer and the effort to keep tracking the .net platform changes in a sensible way has been demonstrated fair enough, its probably just me living in the loonies that i hadn't heard of f# until this year
|
|
# ? Nov 27, 2017 20:41 |
waaaait. i just went to read about f# and you can do some flavour of static typing with it? and i mean in general, do python/r style coding but with actually guaranteed outcomes and poo poo? hoooly gently caress e: https://fsharpforfunandprofit.com/posts/correctness-type-checking/ i know what ill be doing next year, this looks really loving good. maybe more c# than this per se since i have enough of what i assume to be functional programming at work already, but why not cinci zoo sniper fucked around with this message at 20:59 on Nov 27, 2017 |
|
# ? Nov 27, 2017 20:57 |
random musings (i think i asked this before, probably even itt) - what are the bad things about haskell?
|
|
# ? Nov 27, 2017 21:01 |
|
cinci zoo sniper posted:random musings (i think i asked this before, probably even itt) - what are the bad things about haskell? haskell fans
|
# ? Nov 27, 2017 21:04 |
carry on then posted:haskell fans i thought that was rust quote:Exploring different microcontrollers less than $1
|
|
# ? Nov 27, 2017 21:05 |
|
FamDav posted:youre old remember when java had synchronized collections by default
|
# ? Nov 27, 2017 21:12 |
|
Malcolm XML posted:remember when java had synchronized collections by default Vectors and StringBuffers still haunt a lot of codebases
|
# ? Nov 27, 2017 21:16 |
|
cinci zoo sniper posted:random musings (i think i asked this before, probably even itt) - what are the bad things about haskell? bad as a language, bad for people to learn, or bad to use in production? one thing that's always annoyed me is its standard library string type is academic and only for demos. should never ever be used in any code intended to be executed. typeclasses are pretty awkward in practice and (much like nightly rust) it's extremely difficult to avoid using a half-dozen or so compiler extensions to manage them its time and memory usage are wildly unpredictable and difficult to optimise. when optimised it's fine though but laziness was an interesting idea but everything being lazy by default is a bad idea and much of optimising haskell is removing as much laziness out of your small values as possible. for example, foldl has the worst properties of both laziness and strictness so shouldn't even exist in favour of foldl'. foldr tends to cause space leaks i still like it a lot as a language, i wish more languages actually curried. (don't talk to me about scala's attempt) as simon p jones said in his oft misquoted talk "haskell is useless", its ideas are appearing in essentially every programming language these days (for better or for worse) and haskell exists to prove that the concepts are viable. things like lenses, stm, side effecting types were all popularised by haskell (afaik). other good things that were not invented by haskell but are also being included everywhere are adts, first class functions, currying and none of this mentions the lack of infrastructure compared to the incredible .net or jvm platforms
|
# ? Nov 27, 2017 21:35 |
|
i'd be a lot more hyped for f# if it wasn't shackled to the .net ecosystem because it is just so goddamn bad
|
# ? Nov 27, 2017 21:38 |
|
tl;dr haskell has some very good ideas that are really useful it's okay as a language but it's standard library is awful lots of fart-huffing going on in 300 years maybe you'll be able to deploy and test and recruit as well as you can for c# so i recommend learning and building a hobby project in. this thread has plenty of people able and happy to help. then when you've huffed straight farts you'll find you recognise and can apply those smells in other projects that are easier to deploy and have existing libraries gonadic io fucked around with this message at 21:41 on Nov 27, 2017 |
# ? Nov 27, 2017 21:39 |
|
ok, so it turns out that, two releases after introducing lambdas, the c++ committee might have just changed its mind about how captures interact with decltype, so that all three of B2, D2, and F2 should be 'int &' this is not a bugfix, it is them removing an intentionally-added special case and changing behavior but i don't know if that's supposed to be in c++17 or not
|
# ? Nov 27, 2017 22:27 |
|
haskell is this sketch in programming language form https://www.youtube.com/watch?v=KrJYpActs7g&t=10s
|
# ? Nov 27, 2017 22:36 |
|
okay, actually, they just moved the wording to a more sensible part of the standard and clarified things accordingly, so everything's good
|
# ? Nov 27, 2017 23:03 |
|
re: haskell, i think the worst bit is the type-signatures-are-all-the-documentation-you-need nature of some of the ecosystem. that and everyone inventing their own operators. apart from that it is my favorite spare time hobby langauge. in some ways it feels more like playing with lego than programming. it's super fun.
|
# ? Nov 27, 2017 23:24 |
|
and the standard string type, yeah it's completely impractical for use, but haskell was the first language I learned after C and strings just being lists of of chars seemed like a super awesome idea then
|
# ? Nov 27, 2017 23:30 |
|
a very small horse posted:and the standard string type, yeah it's completely impractical for use, but haskell was the first language I learned after C and strings just being lists of of chars seemed like a super awesome idea then i'd say the main compaint i have about actually programming in haskell now is that the way that the language is used has vastly changed beyond what the designers of the haskell98 language, tools, etc etc imagined. this is both a good and bad thing.
|
# ? Nov 27, 2017 23:38 |
|
Sapozhnik posted:i'd be a lot more hyped for f# if it wasn't shackled to the .net ecosystem because it is just so goddamn bad i follow p closely and occasionally contribute to f# tooling. i've noticed that the core group of contributors, including the bdfl don syme, are all really enthusiastic about fable (the third and most recent f#-to-js compiler), to the point that new language features are being weighted against whether they will support better js compilation and integration with platforms like react native imo it's clearly a long-term move to give f# a foothold / escape hatch separate from the .net world, most likely since the recent shakeups in the latter (the roslyn compiler rewrite, .net core) were all done with ms violently ignoring anything except their core "c# and asp.net mvc with entity framework on azure" business target, to the point that visual studio 2017 originally shipped with completely broken f# support also between elm, wasm and facebook's weird reasonml thing there seems to be a growing interest in non-poo poo-language-to-js compilers, and on that field the f#/fable stack is pretty well positioned b/c of code reuse between frontend and backend and also its ability to consume typescript definitions to get typed bindings to a lot of the js ecosystem for free
|
# ? Nov 27, 2017 23:42 |
|
gonadic io posted:i'd say the main compaint i have about actually programming in haskell now is that the way that the language is used has vastly changed beyond what the designers of the haskell98 language, tools, etc etc imagined. this is both a good and bad thing. i think this is kind of cool now though. I would not claim to be an expert but more modern haskell feels a bit more like a big boy langauge.
|
# ? Nov 27, 2017 23:44 |
|
NihilCredo posted:also between elm, wasm and facebook's weird reasonml thing there seems to be a growing interest in non-poo poo-language-to-js compilers, this makes me wonder if people consider TypeScript to be a not-poo poo language, or just the least lovely option
|
# ? Nov 28, 2017 00:26 |
|
Fiedler posted:What language are you talking about? From context I'm guessing C#, but if so the "fucks up the execution" part doesn't make sense. it does though, because windows
|
# ? Nov 28, 2017 00:34 |
|
Thermopyle posted:this makes me wonder if people consider TypeScript to be a not-poo poo language, or just the least lovely option I fukken hated typescript but that was probably because of the hosed ecosystem I was in.
|
# ? Nov 28, 2017 00:35 |
|
the problem with non-poo poo-language-to-js compilers is not technical but social. such compilers have existed for years, but there's still a critical mass of javascript developers in webshit land. new developers could learn the goodlang instead, but they don't, they learn javascript, because it's the lingua franca of webdev, and they can get a job doing it, and sure they'll hate their miserable lives, but if they didn't want to feel that way 24/7 they wouldn't be doing frontend. that's why people like typescript, because you can gradually start to write js with the occasional var:type and suddenly half your bugs are gone and you didn't have to hire a new team or waste time retraining
|
# ? Nov 28, 2017 00:44 |
|
|
# ? Jun 5, 2024 03:30 |
|
Sapozhnik posted:remember when java originally had green threads lol Pepperidge Farms remembers this was only on systems that didn’t have native threads right, because Solaris had them by the mid-1990s, as did many other Unixes (they just didn’t all have the pthreads API on top yet) hell the classic Mac OS even had native threads back then, both cooperative (Thread Manager on 68K & PPC) and preemptive (Multiprocessing Services and PPC) green threads as a concept should’ve been dead by 1995 or so
|
# ? Nov 28, 2017 01:11 |