1,706 karma · joined Dec 9, 2019 (6y ago) · 623 submissions
comment 5y ago · link · parent
Converting a pointer to an integer address is problematic if you have a garbage collector due to compacting. Technically it's still the dereferencing that actually causes the UB, but I don't think this is too much of a leap.
C# marking all pointers unsafe also makes sense in the same way, because "passing pointers between methods can cause undefined behavior."
comment 5y ago · link · parent
I don't understand how this distinction is supposed to work. If someone has exactly the 'general natural inclinations' that fit to a certain activity, it seems asinine to not call them talented in it. Sure, they won't be skilled in it unless they actually put in the work, but they'll comparatively have an easier time with it.
comment 5y ago · link · parent
Am I getting this right? Your issue is a lot of hidden, opaque access to external state, so you think adding even more internal state on top would be a remedy because the stuff you add on top would be navigable?
comment 5y ago · link · parent
Viewing iteration as more 'natural' than a fold seems down to mostly taste. And hell, if you really want iteration, you can easily get that in both effectful and non-effectul variants through monads.
>ask a functional programming zealot to implement an O(1) hash map in a pure way—they will usually stammer, try to move goal posts, before finally admitting it's not possible
Except that no one - not even Haskell zealots - will argue that you never need effects, but simply that effects should be encapsulated. In Haskell, nothing prevents you from using mutable state if you really need it and mutable hash tables can be easily implemented using something called functional state threads [1][2].
[1] https://www.microsoft.com/en-us/research/wp-content/uploads/...
comment 6y ago · link · parent
Most commercial Haskell is just boring CRUD, like with virtually any other language. There are some interesting projects like Hasura (a decently fast GraphQL engine), but something like Facebook is just a million times more prestigious, so that's what will always be brought up.
> that it is very difficult to debug not only logic
Feel free to link any write up making an actual case for this.
comment 6y ago · link · parent
And I didn't say anything to the contrary. It's about what people are used to, not to what is physically possible. Again, digital neon colors are definitely not even close to the most extreme you can get - that doesn't mean they're not garish and ugly.
> clearly taking in a bright sunlit day through the window next to a dark but still clearly visible interior
Do you think most people would call that 'natural' and pleasant lighting conditions?
>If you stand in an office and look around, it's not like computer screens stand out as blazing white with inky black figures on them
If you look at them from their intended viewing angle, they're absolutely going to stand out (unless your display is just really dumpy).
>The idea that computer screens have extreme levels of contrast in comparison with the surroundings is simply not true
Feel free to name all the items in your (normally lit) office that have a higher or even just comparable contrast to your screen.
comment 6y ago · link · parent
So? The contrast between 'black' and 'white' is still extreme relative to what people normally have around them. The same goes for the neon colors. They are 'diluted', but they're still incredibly garish and generally look unnatural. If you don't like the word 'unnatural' just replace it with 'digital looking'.
Now, looking 'unnatural' isn't necessarily bad (especially for a website interface) and something like text should definitely have a high contrast, but it's definitely something to keep in mind.
comment 6y ago · link · parent
Of course it is, because even if there's no type system the people using the library still have to make sense of the complexity. A function with a dozen, context-sensitive overloads that accepts data without a clear pattern isn't just hard to type, it's also hard to understand for a user. Even with dynamic typing you should be able to clearly state what a function does.
comment 6y ago · link · parent
I assume you're talking about how you need to use the hosts ip rather than localhost? Because you definitely can access host ports. I'm even connecting WSL2 to an X server running on windows.
comment 6y ago · link · parent
Or look at the start of the readme, he claims that he wants to disprove "some of the falsehoods about performance and optimisation regarding software and interpreted languages in particular". What falsehood exactly? To me it seems he intended it to be "interpreted languages are slow", but he doesn't disprove that at all.
comment 6y ago · link · parent
Because they're research languages. The amount of non-toy software actually verified in them is zero. I'm not even sure if there's any non-toy software written in Idris besides the Idris compiler itself.
Coq's track record is better, but its language is ugly as hell in comparison (and to actually do anything you'd need to extract to Ocaml/Haskell anyway and the same applies to Agda).
comment 6y ago · link · parent
>But they’ve succeeded in impressing writers for nontechnical publications
isn't enough for me to give it any more credence than any other "this is why society is breaking apart" explanation.
comment 6y ago · link · parent
The only thing I could realistically see happening anytime soon would be people using it as a scripting language for Godot, but I'm not convinced that working with the Godot abstractions won't rob you off most of the gains you make by using Haskell.
comment 6y ago · link · parent
I'm not sure what you mean? Are you saying bevy's architecture isn't fitting?
Not to mention that you evidently don't _have to_ do this, seeing as how in Unity you're basically forced to work with raw sockets.
comment 6y ago · link · parent
That's true, but I don't think you necessarily need a type for all universes (excluding itself), just some other way to denote that type is supposed to be universe polymorphic.
>Does that require forbidding full recursion, or can you still introduce non-computable objects?
I'm not sure what you mean exactly. The core type theory assumes that all functions are terminating. You can 'cheat in' full recursion by providing a non-computational termination proof, but the type checker would still be assuming that its actually terminating.
I think if that wasn't the case, it'd need to be restricted (unless you did something really weird like introducing infinite negative universe levels).