admin-announcements

Announcements from the Clojurians Admin Team (@U11BV7MTK @U077BEWNQ @U050TNB9F @U0ETXRFEW @U04V70XH6 @U8MJBRSR5 and others)
blissdev 2015-12-30T07:59:48.002617Z

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?

2015-12-30T11:26:31.002619Z

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.

2015-12-30T11:28:21.002620Z

Perhaps, haskell

magomimmo 2015-12-30T11:30:56.002621Z

@crocket: https://www.rust-lang.org/

2015-12-30T11:31:25.002623Z

Is Rust a proper functional language? I doubt it.

2015-12-30T11:34:50.002625Z

@dnolen: Sorry for losing focus, I moved here.

jaen 2015-12-30T11:43:42.002626Z

Depend on your definition of functional, I suppose. To me it has a distinctly functional slant.

jaen 2015-12-30T11:44:21.002627Z

That said it's ownership semantics is fairly complicated to grok at first.

jaen 2015-12-30T11:44:31.002628Z

It does help you avoid all kinds of memory errors though.

2015-12-30T11:44:36.002629Z

I would rather use haskell or OCaml than Rust for small command line programs. Dealing with memory management is unneccesary in such programs.

magomimmo 2015-12-30T11:52:12.002632Z

@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

jaen 2015-12-30T12:24:30.002633Z

That is fair, in small utilities you don't really need the safety Rust provides

jaen 2015-12-30T12:24:42.002634Z

It's also why go is so popular for server plumbing infrastructure.

jaen 2015-12-30T12:25:36.002635Z

Something like Nimrod could be interesting in that niche also - http://nim-lang.org/

2015-12-30T12:25:38.002636Z

I can see how go is popular for small command line programs.

jaen 2015-12-30T12:33:34.002637Z

Yeah, fast boot and execution and simplicity of the language probably buy a lot of mindshare there.

jaen 2015-12-30T12:33:53.002638Z

I'm curious if Nimrod and Crystal will also become popular there, or will they remain niche.

jaen 2015-12-30T12:36:01.002639Z

@crocket: if you want to remain functional then maybe some lightweight scheme like Racket or Chicken?

2015-12-30T12:36:24.002640Z

I also considered them, too, but I haven't made a decision, yet.

jaen 2015-12-30T12:36:28.002641Z

Pixie is also interesting - https://github.com/pixie-lang/pixie

jaen 2015-12-30T12:36:32.002643Z

But it's fairly new.

2015-12-30T12:36:37.002645Z

Pixie is too young to be useful.

jaen 2015-12-30T12:37:26.002646Z

If by "useful" you mean "I would have to wrap too many C libs by myself" then yeah, probably.

2015-12-30T12:39:12.002648Z

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.

jaen 2015-12-30T12:42:37.002650Z

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.

jaen 2015-12-30T12:42:45.002653Z

But the problem of having to wrap things

2015-12-30T12:42:56.002654Z

Tooling and libraries

jaen 2015-12-30T12:43:02.002656Z

That in, say, node someone did before

jaen 2015-12-30T12:43:05.002657Z

Remains.

jaen 2015-12-30T12:43:06.002658Z

Yeah.

2015-12-30T15:06:47.002660Z

@blissdev: I believe you want to set clojure-defun-style-default-indent to a non-nil value to achieve this

michaeldrogalis 2015-12-30T15:14:27.002661Z

Anyone know of lein test has a verbose mode plugin that prints every deftest var name before execution?

2015-12-30T19:01:44.002667Z

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?

jaen 2015-12-30T19:12:23.002668Z

Because you're probably referring to the Java types and not schema predicates.

jaen 2015-12-30T19:12:48.002669Z

Schema interprets Java classes as predicates that check if the given value is of that type.

jaen 2015-12-30T19:13:17.002670Z

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.

2015-12-30T19:13:31.002672Z

Looks like they’re just aliases: https://github.com/Prismatic/schema/blob/master/src/cljx/schema/core.cljx#L198-L228

2015-12-30T19:14:25.002674Z

seems like it’s just piggybacking off the coercion functions in core

jaen 2015-12-30T19:16:31.002675Z

Thanks, that's nice of them to have implemented it that way.

blissdev 2015-12-30T20:00:49.002676Z

@pbostrom: thanks!

bocaj 2015-12-30T23:13:43.002680Z

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