106 karma · joined Mar 30, 2020 (6y ago) · 103 submissions
comment 7mo ago · link · parent
- most of them are dynamically typed (thus don't need sum types, as there are no types). The ones that do have gradual type systems likely either implement some form of them (off the top of my head I can only remember typed racket, and I think it implements them through union types)
- not all lisps lean functional: I believe that's mostly a prerogative of scheme and clojure (and their descendants); something like CL is a lot more procedural, iirc
- in most lisps, thanks to macros, you probably don't need the language to support some sort of match construct out of the box: just implement it as a macro [1]
In general the "proper sum types" side of functional programming is just the statically typed one, but even in dynamically typed FP languages you end up adopting sum type-esque patterns, like elixir's error handling (which closely resembles the usual Either/Result type, just built out of tuples and atoms rather than a predefined type), and I assume many lisps adopt similar patterns as well
comment 11mo ago · link · parent
comment 2y ago · link · parent
comment 2y ago · link · parent
comment 2y ago · link · parent
comment 2y ago · link · parent
comment 2y ago · link · parent
At least in my job(s over the years), turning a flat list of db records into a more complex, nested (potentially on multiple levels) data structure before handing it off to the front-end is a very common. I've seen it done with "simple, fast code" (although not in go specifically, but in other languages), but it very quickly turned into huge messes of of long nested for loops and was very difficult to read. LINQ, Lodash, java's streams... I sincerely can't understand how go developers live without them. They make me a lot more productive both at reading and writing the code.
comment 2y ago · link · parent
comment 2y ago · link · parent
- gen 1 pokemon are very basic and probably some of the worst in the series (subjective)
- the games are extremely unbalanced, and many types have only one evolution line while others have a lot, there's no uniformity (gen 1 has only 1 dragon and 1 ghost line)
- the lack of physical special split hits many types insanely hard and they never balanced for it (i.e.: Ghastly line is a special attacker but is the only ghost type, ghost type is physical for some reason)
- gen2 is basically non linear for most of Johto, which completely destroys the levels on the gym leaders and the wild pokemon. The Kanto section has similar issues. And red is only difficult because it's insanely overlevelled compared to everything else
- gen 2 gym leaders don't have Johto pokemon (lol)
- trainer AI, especially in some instances, is very weirdly programmed (Blaine for example uses healing items on full HP pokemon for no reason)
- lack of moves means even late game, trainers have start-of-game moves ( blue has a rhydon with tail whip and leer, but no ground or rock moves. And an Exeggutor with no grass or psychic damaging moves. And he's the final boss)
comment 2y ago · link · parent
comment 2y ago · link · parent
The mechanics and the balance got better (even if power creep is a very real thing). In fact, going back now, early pokemon titles are, mechanically, extremely weak (especially the ones before diamond/pearl).
The problem is that the single player experience is extremely lacking. The games were never hard, but as the player gained tools they became even easier. The story peaked at Black/White and then kept oscillating between forgettable and downright horrible.
The performance of the games has also steadily gotten worse, and Scarlet/Violet is the worst point in the series on that front. By a mile.
The problem for me, and for I assume many other players, is that it's sadly a one of a kind franchise. It's probably the one with the most content in its own sub-genre (there's very few catch-em-all type games that hold a candle to it), and it's also the only turn based rpg with a competitive scene on the market. I've probably collectively spent tens of thousands of hours on the franchise over a span of 16 years or so and unless something that can even get close to the experience pokemon gives me gets made, I'm kinda stuck.
comment 2y ago · link · parent
comment 2y ago · link · parent
comment 2y ago · link · parent
comment 2y ago · link · parent
comment 2y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
as the apps get big, state becomes a mess, fully reusing code is very hard, making anything even slightly reactive becomes not only a lot of code, but a jumbled mess of mutability, usually copy pasted from somewhere else. I will take any other type of app over that - I don't care if it's angular, vue, react, next, whatever.
So i contend that not only is "managing a bit of state and writing sensible CSS to make it reusable" very hard, I haven't even seen it done ever, at least in my personal experience of the code I touched
comment 3y ago · link · parent
comment 3y ago · link · parent
$haystack | lines | where $it =~ $needle
which, albeit maybe not as concise as the grep solution, to me feels good enough, especially when you have so many other tools to handle text (all of the str subcommands, splitting by row/column and then working on tables).
also, admittedly, if you want to drop down to "normal" ls, you are one character away: use a caret and you can drop down to the usual bash/sh/whatever.comment 3y ago · link · parent
I recently got back into it, downloaded it on my phone, and will probably switch over to it on my personal PC too (on phone I switched to it because built in adblocker + faster and less wonky than FF for me).
adblocker + performance control + nice aesthetics + integrations + easy sending stuff from phone to PC and back is kind of a sweet spot for me - though it might not be for everyone. Or at least it seems like it
comment 3y ago · link · parent
Idris(at least idris2) gets a bit closer with the implicit delaying and forcing, but changing a value from lazy to strict and viceversa still modifies the signature, which is kind of annoying in my opinion. Compared to Haskell, where I can just add bangpatterns and sprinkle `!` in a few places, it's still less ergonomic.
I feel like there isn't really a good implementation of strict-by-default but lazy-on-demand functional programming that is ergonomic and gets out of the way, quite yet.
comment 3y ago · link · parent