Using vectors for function arguments is unique to Clojure, and I'm not entirely sure why they chose to do it that way.
1,232 karma · joined March 21, 2011
PhD in automatic memory optimizations for GPUs, focusing on Futhark.
philip@munksgaard.me
https://munksgaard.me
Using vectors for function arguments is unique to Clojure, and I'm not entirely sure why they chose to do it that way.
Does anyone know of uses in industry?
Source: https://sundhedsdatastyrelsen.dk/-/media/sds/filer/rammer-og...
However, I would think that being much simpler (also, mind you, content-wise) would be a positive thing for gemini, in this context? Would you care to elaborate on what kinds of things are made harder by the choices gemini made? And what do you think could be done to alleviate those problems?
Of course, in the ideal world, that's not the way it should be, but such is the reality we live in.
I've used sml-mode in Emacs for years, and I've never had the problem you're describing. On the contrary, I find sml-mode to be quite adequate for my needs. Can you elaborate a bit on what's causing you problems?
Edit: Ah, I see what you're saying. After finishing a function definition and starting a new, the cursor is wildly indented, that's true. But if you just type `fun` and press tab, sml-mode automatically indents the definition correctly.
> 2. I've used Poly/ML and SML/NJ so far. Both of them are purely interactive, meaning I can't just compile a program into ELF and ship it somewhere else without the compiler. That makes it a no-go for me for real-world use.
I can recommend MoSML for interactive development. It can also produce compiled binaries. When I want to produce efficient compiled code, I usually use MLton.
> 3. The interactive modes of Poly/ML and SML/NJ don't support readline shortcuts. They are the most cumbersome REPLs I've ever used.
Use the REPL in emacs, it's excellent.
> 4. Inline type declarations (as opposed to Haskell-style type declarations on a separate line) are very noisy - they make reading the code harder. Omitting them (which is the rule in SML in practice) leads to hard-to-decipher compilation errors when you write a new piece of code and you made an error somewhere which confused the type-inference about your intentions. Suddenly forgetting about a word or a set of parentheses in one function results in errors in another perfectly-good function. It's the horror of C++ templates all over again.
I agree, this is a pain point. I usually leave type declarations in comments before the definitions, but that of course has obvious drawbacks.
I'm asking because I'm part of the team that's working on the Futhark language[0], which is exactly what you're describing: a high-level array language in a functional style, targeting the GPU. We're always on the lookout for interesting applications or benchmarks. In particular, we're interested in knowing exactly where our shortcomings are, compared to hand-written GPU code, so that we may work on improving them. For the curious, we think we're doing reasonably well compared to benchmark suites such as Rodinia[1], though there are still cases where we cannot keep up.
[0]: https://futhark-lang.org/ [1]: https://futhark-lang.org/performance.html
Edit: It's also about time that SML got a proper package manager. Smackage never really worked well.