110 karma · joined Sep 22, 2011 (15y ago) · 47 submissions
comment 3y ago · link · parent
Is this something people have done with Replicad? Perhaps with an additional lib for parsing SVG into a set of 2D curves?
comment 6y ago · link · parent
Hamiltonian neural network (HNN) intakes position and momenta {q,p}, outputs the scalar function H, takes its gradient to find its position and momentum rates of change, and minimizes the loss
<latex equation for a modified loss function that differs from traditional NN>
which enforces Hamilton's equations of motion.
https://journals.aps.org/pre/abstract/10.1103/PhysRevE.101.0...
comment 11y ago · link · parent
For an example of an electric field sensor, check out the Motorola MC33794.
comment 11y ago · link · parent
http://world.time.com/2012/12/20/the-swiss-difference-a-gun-...
comment 11y ago · link · parent
comment 12y ago · link · parent
I might point out to the grandparent post that even the basic vector collection in Rust is full of unsafe {} blocks.
comment 12y ago · link · parent
comment 12y ago · link · parent
This does not fit my understanding of pattern matching in Haskell. Say you are matching over a value of type `Maybe String`. The type of the value is always `Maybe String`, it's just that its value might be `Just "foo"` or `Nothing :: Maybe String`. It is not to my knowledge tagged with type information at runtime in a compiled program, merely value information. The different values an ADT disjunction can take on all have the same type as each other.
> Otherwise, pattern matching wouldn't work (pattern matching is always based on type reflection).
What about pattern matching a String against a series of literal values? I don't see how this is based on type reflection, merely inspection of values.
comment 12y ago · link · parent
On the other hand, Typed Clojure does not offer nearly the cohesive experience one gets from Haskell, nor do the types guide optimizations etc. Type checking is really a lint step rather than a build step. And almost all existing Clojure code is still dynamically typed, so you can't usually infer how to use a lib based on its type signatures (since it doesn't have them), which I love being able to do in hs.