Live data from Hacker News

Specter – Clojure API for immutable programming (2017)

nathanmarz.com

21–30 of 44 posts

Re: Specter – Clojure API for immutable programming (2017)

#21
post #2

I invented instar ( https://github.com/boxed/Instar ) which is quite similar to specter (imo a little bit nicer) because I also thought the built in API was weirdly clunky in these respects.

I have used both Spectre and Instar. I prefer Instar for straight forward simple transforms, but Spectre can do more complex ones. Spectre has a more difficult API to wrap your head around and that is its biggest downside, IMO. You really need to dedicate time to learn it rather than try to pull it out on demand.

Re: Specter – Clojure API for immutable programming (2017)

#22
TXR Lisp:

  This is the TXR Lisp interactive listener of TXR 243.
  Quit with :quit or Ctrl-D on an empty line. Ctrl-X ? for cheatsheet.
Give me all the .c files:

  1> (glob "*.c")
  ("abcd.c" "args.c" "arith.c" "buf.c" "cadr.c" "chksum.c" "combi.c"
   "crazyffi.c" "debug.c" "dict.c" "eval.c" "ffi.c" "filter.c" "ftw.c"
 "gc.c" "glob.c" "halfsip.c" "hash.c" "highest-bit-main.c" "highest-bit.c"
   "highest-test.c" "isqrt.c" "itypes.c" "lex.yy.c" "lib.c" "lisplib.c"
   "match.c" "parser.c" "protsym.c" "query.c" "rand.c" "regex.c"
   "signal.c" "socket.c" "stream.c" "struct.c" "strudel.c" "sysif.c"
   "syslog.c" "termios.c" "test.c" "tree.c" "txr.c" "unwind.c" "utf8.c"
   "vecho.c" "vm.c" "y.tab.c")
OK, which ones are over 100000 bytes:

  2> (keep-if [chain stat .size (op 

Re: Specter – Clojure API for immutable programming (2017)

#23

TXR Lisp: This is the TXR Lisp interactive listener of TXR 243. Quit with :quit or Ctrl-D on an empty line. Ctrl-X ? for cheatsheet. Give me all the .c files: 1> (glob "*.c") ("abcd.c" "args.c" "arith.c" "buf.c" "cadr.c" "chksum.c" "combi.c" "crazyffi.c" "debug.c" "dict.c" "eval.c" "ffi.c" "filter.c" "ftw.c" "gc.c" "glob.c" "halfsip.c" "hash.c" "highest-bit-main.c" "highest-bit.c" "highest-test.c" "isqrt.c" "itypes.c…

Clojure is already good at that- at conditional pipe / filter / aggregate semantics, bc it is a lisp. Specter is for a different problem. When you have a data structure that has some semantics and is deeply nested (and you aren't discovering the structure, like getting size from a node via a function call) Specter has a declarative set of operations to navigate and extract on that data structure, extremely efficiently.

Re: Specter – Clojure API for immutable programming (2017)

#24

TXR Lisp: This is the TXR Lisp interactive listener of TXR 243. Quit with :quit or Ctrl-D on an empty line. Ctrl-X ? for cheatsheet. Give me all the .c files: 1> (glob "*.c") ("abcd.c" "args.c" "arith.c" "buf.c" "cadr.c" "chksum.c" "combi.c" "crazyffi.c" "debug.c" "dict.c" "eval.c" "ffi.c" "filter.c" "ftw.c" "gc.c" "glob.c" "halfsip.c" "hash.c" "highest-bit-main.c" "highest-bit.c" "highest-test.c" "isqrt.c" "itypes.c…

Clojure is already good at that- at conditional pipe / filter / aggregate semantics, bc it is a lisp. Specter is for a different problem. When you have a data structure that has some semantics and is deeply nested (and you aren't discovering the structure, like getting size from a node via a function call) Specter has a declarative set of operations to navigate and extract on that data structure, extremely efficientl…

  1> (defstruct node ()
       item
       next)
  #
  2> (new node next (new node next (new node item 42)))
  #S(node item nil next #S(node item nil next #S(node item 42 next nil)))
  3> (call .next.next.item *2)
  42

Re: Specter – Clojure API for immutable programming (2017)

#25
So it turns out that Clojure is the ultimate data-wrangling tool yet there's no chance of earning a living with it. So much for innovation. Technology is a strange industry where conservative Java bondage and a 2-bit browser scripting extension with no stdlib reign supreme.

Re: Specter – Clojure API for immutable programming (2017)

#26

Earlier quoted context omitted.

Clojure is already good at that- at conditional pipe / filter / aggregate semantics, bc it is a lisp. Specter is for a different problem. When you have a data structure that has some semantics and is deeply nested (and you aren't discovering the structure, like getting size from a node via a function call) Specter has a declarative set of operations to navigate and extract on that data structure, extremely efficientl…

1> (defstruct node () item next) # 2> (new node next (new node next (new node item 42))) #S(node item nil next #S(node item nil next #S(node item 42 next nil))) 3> (call .next.next.item *2) 42

I don't usually have a problem with you posting TXR comparisons in every lisp thread, but if you're not going to take the time to understand what the library does, this is just spam.

Re: Specter – Clojure API for immutable programming (2017)

#27
post #25

So it turns out that Clojure is the ultimate data-wrangling tool yet there's no chance of earning a living with it. So much for innovation. Technology is a strange industry where conservative Java bondage and a 2-bit browser scripting extension with no stdlib reign supreme.

Clojure’s just a Java library, friend.

Re: Specter – Clojure API for immutable programming (2017)

#28
post #25

So it turns out that Clojure is the ultimate data-wrangling tool yet there's no chance of earning a living with it. So much for innovation. Technology is a strange industry where conservative Java bondage and a 2-bit browser scripting extension with no stdlib reign supreme.

Clojure’s just a Java library, friend.

I wonder how many fanfold pages of Java, complete with getters, setters, toString and hashCode, one of Nathan's examples expands into?

Re: Specter – Clojure API for immutable programming (2017)

#29
post #25

So it turns out that Clojure is the ultimate data-wrangling tool yet there's no chance of earning a living with it. So much for innovation. Technology is a strange industry where conservative Java bondage and a 2-bit browser scripting extension with no stdlib reign supreme.

Clojure is wholly inadequate to meeting challenges of the industry today. Not just because it's dynamically typed (which means tooling for it is close to nonexistent and it has terrible performance), but also because its ecosystem is a ghost town.

It takes more than just a language to create a productive development environment in 2020, especially one which is so flawed by designed to the point of not even being statically typed.

Re: Specter – Clojure API for immutable programming (2017)

#30
post #25

So it turns out that Clojure is the ultimate data-wrangling tool yet there's no chance of earning a living with it. So much for innovation. Technology is a strange industry where conservative Java bondage and a 2-bit browser scripting extension with no stdlib reign supreme.

Not really. I put together a few github projects and was approached about two jobs over a few years just under 200k... I said no, because even though my github projects were simple when I wrote them, reading them later was insane. Reopening my java projects after years is the exact opposite - my IDE tells me everything I need to know and reminds me along the way. It's like a warm fuzzy blanket.

I'm almost 99% sure both jobs were places that bought into some dynamic developer who promised unicorns and rainbows and then left them with a huge clojure project have their eyes bleed to. No thanks.

Post reply on HN