Earlier quoted context omitted.
In Clojure you typically program to interfaces/protocols and not to types The Clojure docs should be more straightforward about the interfaces that are available and targetted You can still have a problem of not knowing which is required of an argument, but its usuallt clear contextually
What I mean is that it is harder for me to reason about. In Java you also use collection interfaces, but List is a no brainer.
Elixir v1.20: Now a gradually typed language
421–426 of 426 posts
Re: Elixir v1.20: Now a gradually typed language
#422Earlier quoted context omitted.
what do you mean by 'security related concerns'?
How to properly build a liveview thats safe against hijacking the websocket phoenix uses for liveviews. You can just do it from the devtools on client side. With regular HTTP requests at least I know what to look out for, with liveview there are almost no resources on how to build a view securely. Like I was able to just call the functions in my module by just addressing them from my browsers console. Just to name an…
E.g. https://github.com/beyond-all-reason/teiserver/blob/f6ff6d68... here, we are in a function call that handles requests to send a chat message into a game lobby. We updated the flood protection timestamps above, and then determine if the user has permission to send the message, and finally if they are speaking just as a client or via the Coordinator. Then we reply the updated state back to the websocket.
This is what I found beautiful about GenServers, by the way. It's a very explicit "starting state, consume from queue, and each message handling function returns the next system state", which makes it very clear that a state transition does not occur unless you reach the bottom of the event-handling function call, and at that point, it's an atomic state transition of the entire internal state.
In summary: don't trust the client. Independently determine, server-side, in the function itself, if the function call you just received is valid given the current state, not rate limited, etc, and then from there you can choose if you want to act on it.
Disclaimer: Elixir noob, but I have been using Teiserver to learn.
Re: Elixir v1.20: Now a gradually typed language
#423Earlier quoted context omitted.
> Huh. The hardware changed. The way measurements were made changed. https://benchmarksgame-team.pages.debian.net/benchmarksgame/... The Java version changed. The SBCL version changed. > side by side You'd have to say what you mean by that.
> You'd have to say what you mean by that. They appear, literally, side by side, in the list. That is, they were competitive eight years ago. They are still competitive today.
There's overlap across most of the different language implementations:
https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
Re: Elixir v1.20: Now a gradually typed language
#424Earlier quoted context omitted.
It’s had it for a long time now: https://gleam-otp.hexdocs.pm/index.html
> Not all Erlang/OTP functionality is included in this library. Some is not possible to represent in a type safe way, so it is not included. Other features are still in development, such as further process supervision strategies. It seems like they are re-implementing a half baked OTP lookalike, but they aren’t actually using Erlang/OTP under the hood which gives me pause as the Erlang/OTP implementation has been bat…
Re: Elixir v1.20: Now a gradually typed language
#425Earlier quoted context omitted.
IMO all of these higher level languages that were designed for humans have a very short lifespan at this point. The only thing propping them up seems to be loyalty for the most part.
I use rails because it makes thousands of good choices that I never have to make. If build apps the rails way I don't have to deal with a mountain of tech debt (in the form bad or ever changing choices).
Re: Elixir v1.20: Now a gradually typed language
#426Earlier quoted context omitted.
IMO all of these higher level languages that were designed for humans have a very short lifespan at this point. The only thing propping them up seems to be loyalty for the most part.
So the future of programming is asking an LLM to spit out the appropriate assembly?