News for hackers. Stuff that matters.
Re:Tiny JITs for a Faster FFI by teaearlgraycold on Wednesday February 12, 2025 @08:38PM (#43031829)
This is the main thing keeping me from going back to Ruby. I don’t want to go back to the stone age where there’s no or poor static analysis
Re:Tiny JITs for a Faster FFI by nirvdrum on Thursday February 13, 2025 @03:22AM (#43033887)
If you're looking for static typing a dynamic language is going to be a poor fit. I find a place for both. I love Rust, but trying to write a tool that consumed a GraphQL API with was a brutal exercise in frustation. I'd say that goes for typing of JSON or YAML or whatever structured format in general. It's refreshing being able to just work with data in the form I already know it's in. Ruby can be an incredibly productive language to work with.

If you're looking for static analysis in general, please note that there are mature tools available. Rubocop¹ is probably the most popular and allows for linting and code formatting. Brakeman² is a vulnerability scanner for Rails. Sorbet³ is a static type checker.

The tooling is there if you want to try things out. But, if you want a statically typed language then that's a debate that's been going since the dawn of programming language design. I doubt it's going to get resolved in this thread.

¹ - https://github.com/rubocop/rubocop

² - https://brakemanscanner.org/

³ - https://sorbet.org/

Re:Tiny JITs for a Faster FFI by shortrounddev2 on Thursday February 13, 2025 @10:43AM (#43036994)
I want to use Lua for more tasks
Re:Tiny JITs for a Faster FFI by teaearlgraycold on Thursday February 13, 2025 @04:52PM (#43041865)
I’ve used rubocop and sorbet. But now that I’ve used TypeScript it’s clear there’s no comparison. TS will even analyze your regex patterns. Every update gets better. I’m eagerly waiting for the day they add analysis for array length and ranged numbers.