Re:Joy: Web framework with Clojure syntax, fast startup and ...
by jonahbenton on Friday May 01, 2020 @09:59PM
(#23048428)
Love passion projects, and love Clojure and its syntax, but wish some folks would pick up on Spec and on predicate-based data flow definitions. That is what I miss most in other languages.
[ Parent
| on HN ]
Re:Joy: Web framework with Clojure syntax, fast startup and ...
by dustingetz on Friday May 01, 2020 @10:19PM
(#23048540)
"predicate-based data flow" is something I haven't heard before, what do you have in mind? I agree that clojure.spec2 can probably generate UI ... This gist is where Hyperfiddle DSL is roughly at right now but I think the Datomic schema definitions can be replaced by specs and the pull queries by s/select https://gist.github.com/dustingetz/96c928f755c736d2b525bb61a...
Re:Joy: Web framework with Clojure syntax, fast startup and ...
by dig1 on Saturday May 02, 2020 @06:40AM
(#23050896)
Spec has it's place, but I think people are trying to shovel spec in all sort of places; for example, heavy data parsing, making code very hard to track. Reminds me on core.logic movement couple of years ago, where everyone tried to have own parser/ui/whatever written in it, resulting very unreadable code.
What I'm really missing from spec is ability to disable it with flag or property, like "assert" macro. Sometimes I just want piece of code to run as fast as possible with less bytecode and instructions executed.
Re:Joy: Web framework with Clojure syntax, fast startup and ...
by jgalt212 on Saturday May 02, 2020 @10:00AM
(#23051818)
Isn't spec just a way to bolt on types to a dynamic language? And if you look at this way, can one have its cake and eat it too?
Re:Joy: Web framework with Clojure syntax, fast startup and ...
by nickik on Saturday May 02, 2020 @01:30PM
(#23053387)
Thinking about Spec like a type-system is really not the right way to think. Its more dynamic validation system that works like regex for data-structures.
Re:Joy: Web framework with Clojure syntax, fast startup and ...
by jgalt212 on Monday May 04, 2020 @08:23AM
(#23067082)
unless you think about types the way Haskell does.
Re:Joy: Web framework with Clojure syntax, fast startup and ...
by StreamBright on Saturday May 02, 2020 @07:26AM
(#23051094)
Code readability is massively underrated.