for those using clojure with emacs, is there a way to set the default indentation to always be just 2 spaces instead of forcing evenness with the preceding argument in a function call etc?
Can anyone recommend a decent functional programming language for small command line programs? I tried clojurescript on nodejs, but it is not suitable for a command line program.
Perhaps, haskell
Is Rust a proper functional language? I doubt it.
@crocket: https://en.wikipedia.org/wiki/List_of_programming_languages_by_type#Impure
@dnolen: Sorry for losing focus, I moved here.
Depend on your definition of functional, I suppose. To me it has a distinctly functional slant.
That said it's ownership semantics is fairly complicated to grok at first.
It does help you avoid all kinds of memory errors though.
I would rather use haskell or OCaml than Rust for small command line programs. Dealing with memory management is unneccesary in such programs.
@crocket: as you prefer. but just in case here is a nice post on rust. http://science.raphael.poss.name/rust-for-functional-programmers.html#id13
That is fair, in small utilities you don't really need the safety Rust provides
It's also why go is so popular for server plumbing infrastructure.
Something like Nimrod could be interesting in that niche also - http://nim-lang.org/
I can see how go is popular for small command line programs.
Yeah, fast boot and execution and simplicity of the language probably buy a lot of mindshare there.
I'm curious if Nimrod and Crystal will also become popular there, or will they remain niche.
@crocket: if you want to remain functional then maybe some lightweight scheme like Racket or Chicken?
I also considered them, too, but I haven't made a decision, yet.
Pixie is also interesting - https://github.com/pixie-lang/pixie
But it's fairly new.
Pixie is too young to be useful.
If by "useful" you mean "I would have to wrap too many C libs by myself" then yeah, probably.
The language is not even documented, other than saying it's based on clojure. I can't afford to be a pioneer in every area.
True enough, though if you look at this example - https://github.com/pixie-lang/pixie/blob/master/examples/gen-docs.pxi - then the only thing giving away it's not Clojure is the ns form. So I guess you would be readily able to code in it.
But the problem of having to wrap things
Tooling and libraries
That in, say, node someone did before
Remains.
Yeah.
@blissdev: I believe you want to set clojure-defun-style-default-indent
to a non-nil value to achieve this
Anyone know of lein test
has a verbose mode plugin that prints every deftest
var name before execution?
With Prismatic Schema why do the long, String and double in: (s/validate {long {String double}} {1 {"2" 3.0 "4" 5.0}}) not require a namespace prefix?
Because you're probably referring to the Java
types and not schema predicates.
Schema interprets Java classes as predicates that check if the given value is of that type.
Though I'm not 100% sure why long
or double
would work, since it's primitves not classes, someone else would need to chime in on that.
Looks like they’re just aliases: https://github.com/Prismatic/schema/blob/master/src/cljx/schema/core.cljx#L198-L228
seems like it’s just piggybacking off the coercion functions in core
Thanks, that's nice of them to have implemented it that way.
@pbostrom: thanks!
I'm collecting examples of datascript on the jvm or node, saving a history to a database. So far I have using rethinkdb https://github.com/runexec/PossibleDB