Hi fediverse,
Which of the following would be the nicest to wrap a low-level 3D geometry (I.e vertices, geometry, topology) operations library written in Rust.
Haskell
Common Lisp (and which implementation?)
Scheme:
Racket
Chicken
Gambit
...
Ideally, I'd like to be able to easily make higher-level operations such as boolean, blend, etc from the low level library and make that as one command in an ergonomic language (with a repl) that allows me to play around easily with various geometrical objects to compose them in increasingly complex ways and then pass the modified object back to the Rust code in case we need to revert a high-level operation operation (this is key). Eventually, a parser would let you pass some math formulae in (Latex?) and execute the live math for you in an interactive way that let's you modify the objects.
Thoughts?
[Boosts appreciated]
#math #programming #Scheme #emacs #fp #latex #haskell #commonlisp #racket #geometry #rust #coding #foss #floss #science #engineering
@wilfredh you seem like the kind of person that might know about this stuff
@zpartacoos Macaulay2 might be worth looking into.
@akater yeap, you can do so from GHCi (interactive mode) on the terminal.
@zpartacoos
Have you considered Julia?
@mc interesting alternative. I'll have to look further into it as I have never used it or heard much about it outside of data science and ML circles. I'm curious, do you know if Julia let's you define custom syntax? So that rather than just call functions in the repl as:
Let c= circle(radius=15)
colorize(c, "red")
Instead I could do:
circle.15.color."red"
Or whatever other weird syntax I want.
The reason I'm asking is because from what I understand about the other languages mentioned on thr list, you are able to do this. Meaning that if the syntax used to manipulate the geometric objects turns out to be cumbersome then we'd be able to experiment and make it more intuitive over time without having to touch the low-level Rust code.
@zpartacoos
I suppose so, but never tried it.
https://docs.julialang.org/en/v1/manual/metaprogramming/
@zpartacoos The only thing I can say is that of that list Haskell is the only language I have found enjoyable. But thats more of a general comment than anything to do with your specific needs.
@freemo yeah I only started trying out the others on the list yesterday but Haskell holds a special place in my heart (despite me sucking at it).
A big element of this endeavor would be the ability to guarantee valid types only. Meaning, I should not be able to accidentally use the higher level API to create a square with 5 sides, etc. So, whatever constrains are imposed by my primitives remain. If the higher-level language would also let me prove properties about my specific geometrical object after a series of operations that'd be a huge plus (although I have zero knowledge of this domain). For example, if after some operations (unknowingly to the user) they change a mesh in such a way that it now satisfies conditions for a Delaunay triangulation then it would output a message saying this is the case. Alternatively, given some mesh I should be able to specify "make it X" and it would automatically apply the operations (based on a selection of suitable algorithms) on the mesh that would guarantee that the output does indeed satisfy X.