#clojure log - Aug 19 2015

The Joy of Clojure
Main Clojure site
Google Group
IRC
List of all logged dates

0:00 justin_smith: of course the full string was too long

0:00 TEttinger: ,(count (->>[[8592 8703][9027 9032][9036 9037][9039 9040][9043 9044][9046 9047][9166][9650][9654][9660][9664][9735 9736][10132][10136 10159][10161 10174][10224 10239][10496 10538][10541 10569][10578 10619][11008 11025]](mapcat #(apply(fn([x][x])([x y](range x (inc y))))%))(map char)(apply str)))

0:00 clojurebot: 320

0:01 TEttinger: 320 unicode chars, yep

0:01 (char 10160)

0:01 ,(char 10159)

0:01 clojurebot: \➯

0:01 TEttinger: ,(char 10160)

0:01 clojurebot: \➰

0:02 TEttinger: justin_smith: what criteria did you use to get the arrows?

0:02 the big page of links?

0:03 justin_smith: ,(def ddr(fn[](->>[[8592 8703][9027 9032][9036 9037][9039 9040][9043 9044][9046 9047][9166][9650][9654][9660][9664][9735 9736][10132][10136 10159][10161 10174][10224 10239][10496 10538][10541 10569][10578 10619][11008 11025]](mapcat #(apply(fn([x][x])([x y](range x(inc y))))%))(map(comp symbol str char))rand-nth)))

0:03 clojurebot: #'sandbox/ddr

0:03 justin_smith: woo~ it fits

0:03 ,(ddr)

0:03 clojurebot:

0:03 justin_smith: ,(ddr)

0:03 clojurebot:

0:03 justin_smith: TEttinger: yeah, I just grabbed all "arrows" from that big page of links

0:04 ,(apply str (repeatedly 1000 ddr))

0:04 clojurebot: "⤳⇍⬅⍖↣⤊⇆⇪➽⇸⥖➱↬↑⥃⥕→↱⬅⇌⥙⍇⤛⟶⇞⟹➲↩↪↰⇩➵⥭↝↮⟺↿⤮⬏←⥀⥹⤎⤁➬↼⥃⤴⥫➯➨⤳↽⤎⤭↧⥧⤏⥀↓⇬⥲⥈⤼⇈⇣⤿⟵↢⤅⇳⬅⇚⤖⥘⇏⍌↔⟷⬂⤍⥦⥅⤃⟷↿⤖↛⬍⇏↢⇩⥮⇣⥉⤄⬀↶↲⬆⍖⍔↿↶⤖◀⤗⥰⍈⤕⇔⥇➲⇂⤇⇁⥛▶➹↕↘⬐⍃⬀⤈⇡⥛⤻⍅⤲⇥⤙➽⥒↿⥓➡⇑▲↩➱⟵⇹⇞↗�

0:06 hfaafb: very nice

0:07 Bronsa: please stop

0:21 TEttinger: Bronsa: is there an off-topic channel to use?

0:23 Bronsa: TEttinger dunno

0:24 TEttinger I don't actually mind off-topic discussions, sorry if that was what you understood

0:25 TEttinger I was just getting my client filled with annoying escaped chars :)

0:25 justin_smith: oh yeah, the downside of utf8

0:30 TEttinger: justin_smith: got the defn down to 147 chars

0:30 I've been golfing

0:30 justin_smith: maybe refheap is a better place to share this

0:30 TEttinger: ~pastebin

0:30 clojurebot: pastebin how about refheap? https://www.refheap.com/

0:32 TEttinger: https://www.refheap.com/108464

0:34 justin_smith: TEttinger: is (range(int x)(int y)) a bug?

0:34 or did you already inc the high end?

0:34 TEttinger: it's converting them to chars

0:34 and yes I already inced

0:34 justin_smith: ahh, right

0:34 saves some chars

0:34 TEttinger: err

0:34 wait

0:34 maybe not...

0:34 justin_smith: yeah I suspected...

0:35 because otherwise we would see a bunch of non-arrows in that string

0:36 TEttinger: good catch https://www.refheap.com/108465

0:37 justin_smith: TEttinger: it's even more cryptic now - harder to tell what those symbols might mean

1:17 jeaye: How can I type hint an array of a non-primitive type?

1:19 justin_smith: ,(type (into-array ["foo"]))

1:19 clojurebot: [Ljava.lang.String;

1:19 justin_smith: in that case you would use the hint ^"[Ljava.lang.String;"

1:19 amalloy: ^"[Ljava.lang.String;"

1:19 where [Ljava.lang.String; is the JVM's internal name for the class representing an array of strings

1:19 [[ if it's a 2d array, etc

1:19 justin_smith: for obvious reasons that hint won't work outside a string

1:20 jeaye: Interesting. Does it need to be fully scoped, regardless of my usings?

3:29 Olajyd: Hi,TEttingr

3:29 Hi, TEttinger :)

3:31 TEttinger: hey Olajyd

3:31 how are your regex adventures going?

3:32 Olajyd: I had to sit down and learn it

3:33 I’ll send paste the code I cam up with so you can help me review it and see if i need to optmize it

3:35 TEttinger: here is the sample code on refheap https://www.refheap.com/108469

3:43 TEttinger: Olajyd: this is kinda an odd thing related to how characters are actually stored, but [A-z] will actually match more than you probably want.

3:43 also, re-pattern is common enough that there's a shortcut, #"[A-Za-z]+" for example

3:44 ,(re-find #"[A-z]" "_")

3:44 Olajyd: TEttinger, I wanted it to catch botth upper and lower cases

3:44 clojurebot: "_"

3:44 TEttinger: and you can, just with two ranges

3:44 Olajyd: oh ok

3:44 TEttinger: A-z will match "ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz"

3:44 there's a \\ in there, it's really just the backslash

3:45 ,(re-find #"[A-Za-z]" "_")

3:45 clojurebot: nil

3:45 TEttinger: ,(re-find #"[A-Za-z]" "Alphabet")

3:45 clojurebot: "A"

3:45 pepijndevos: What is the most simple, braindead way to build a CLJS-only single-page app? No Clojure server.

3:45 TEttinger: ,(re-find #"[A-Za-z]" "the Alphabet")

3:45 clojurebot: "t"

3:45 Olajyd: Thanks TEttinger

3:46 TEttinger: no prob, there was something else, let me try to remember it

3:47 Olajyd: TEttinger, I also have a another function that’ll handle delimiters, I’ll just post it on refheap so you can review it, i actually have some questions I wasnt clear about

3:49 TEttinger, here’s the link https://www.refheap.com/108470

3:51 TEttinger is there anyway to handle delimiters such as “*”, “\” “^” without shooting myself on the leg :)

3:51 gilliard: pepijndevos: have you looked at https://github.com/clojure/clojurescript/wiki/Quick-Start ?

3:51 TEttinger: actually, yes

3:52 pepijndevos: gilliard, not recently.

3:52 TEttinger: ,(doc clojure.string/split)

3:52 clojurebot: "([s re] [s re limit]); Splits string on a regular expression. Optional argument limit is the maximum number of splits. Not lazy. Returns vector of the splits."

3:52 TEttinger: hm.

3:52 pepijndevos: Back when it was actually hard to get cljs running, I glanced over it and dismissed it.

3:55 gilliard: pepijndevos: that's the most stripped-down doc I know of.

3:57 pepijndevos: hah, lein new figwheel is actually pretty braindead, and it generates a static html directory. Sweet.

3:57 gilliard: nice :)

4:03 Olajyd: TEttinger, I’m sorry I got diconnected.. any suggestions?

4:03 TEttinger: Olajyd: http://clojuredocs.org/clojure.string/re-quote-replacement

4:03 ,(re-pattern (re-quote-replacement "^"))

4:03 clojurebot: #error {\n :cause "Unable to resolve symbol: re-quote-replacement in this context"\n :via\n [{:type clojure.lang.Compiler$CompilerException\n :message "java.lang.RuntimeException: Unable to resolve symbol: re-quote-replacement in this context, compiling:(NO_SOURCE_PATH:0:0)"\n :at [clojure.lang.Compiler analyze "Compiler.java" 6704]}\n {:type java.lang.RuntimeException\n :message "Unable to...

4:03 TEttinger: ,(re-pattern (clojure.string/re-quote-replacement "^"))

4:03 clojurebot: #"^"

4:03 TEttinger: ,(re-pattern (clojure.string/re-quote-replacement "*"))

4:03 clojurebot: #error {\n :cause "denied"\n :via\n [{:type java.lang.ExceptionInInitializerError\n :message nil\n :at [java.util.regex.Pattern error "Pattern.java" 1924]}\n {:type java.lang.SecurityException\n :message "denied"\n :at [clojurebot.sandbox$enable_security_manager$fn__835 invoke "sandbox.clj" 69]}]\n :trace\n [[clojurebot.sandbox$enable_security_manager$fn__835 invoke "sandbox.clj" 69]\n [...

4:03 TEttinger: uh

4:04 that's new

4:04 Olajyd: hahah :)

4:04 TEttinger: ,(re-pattern (clojure.string/re-quote-replacement "[*]"))

4:04 clojurebot: #"[*]"

4:04 TEttinger: might be better to use (str "[" delim "]") instead of the plain string as the arg

4:06 Olajyd: TEttinger, so something like (clojure.string/split “string” #”[/]”) would work?

4:06 TEttinger: let's see...

4:07 Olajyd: or something like (clojure.string/split “string” #”[\]”) would work too?

4:07 TEttinger: ,(clojure.string/split "str/ing" #"[/]")

4:07 clojurebot: ["str" "ing"]

4:07 TEttinger: ,(clojure.string/split "str\ing" #"[\]") ; guessing this will fail because it thinks the backslash is escaping the ]

4:07 clojurebot: #<RuntimeException java.lang.RuntimeException: Unsupported escape character: \i>

4:07 Olajyd: ,(clojure.string/split “s*tring” #”[*]”)

4:07 clojurebot: #<ArrayIndexOutOfBoundsException java.lang.ArrayIndexOutOfBoundsException: 8221>

4:07 TEttinger: oh even before

4:08 ,(clojure.string/split "str*ing" (re-pattern (clojure.string/re-quote-replacement "[*]"))) ; guessing this will fail because it thinks the backslash is escaping the ]

4:08 clojurebot: ["str" "ing"]

4:08 gilliard: ,(clojure.string/split "s*tring" #"[\\*]")

4:08 clojurebot: ["s" "tring"]

4:08 TEttinger: left in the comment, it wasn't supposed to be there

4:08 yep!

4:09 gilliard: moar backslashes!

4:09 TEttinger: actually might not need the \

4:09 ,(clojure.string/split "str*ing" #"[\*]")

4:09 clojurebot: ["str" "ing"]

4:10 TEttinger: so there's some problem with [*] where it goes nuts, but if * is after a backslash or even an escaped backslash it's fine

4:10 ,(clojure.string/split "str\\ing" #"[\\*]")

4:10 clojurebot: ["str" "ing"]

4:11 Olajyd: ,(clojure.string/split “s*tring” #”[*]”)

4:11 Hi, gilliard

4:11 ,(clojure.string/split "str\ing" #”[\\]”)

4:11 clojurebot: #<ArrayIndexOutOfBoundsException java.lang.ArrayIndexOutOfBoundsException: 8221>

4:11 Olajyd: hmm

4:11 clojurebot: #<RuntimeException java.lang.RuntimeException: Unsupported escape character: \i>

4:11 gilliard: That regex reader macro is a bit magic isn't it? "\*" isn't a valid string.

4:12 TEttinger: gilliard, yep

4:13 Olajyd: the string you're matching on will need \\

4:13 ,(clojure.string/split "str\\ing" #"[\\]")

4:13 clojurebot: ["str" "ing"]

4:13 Olajyd: TEttinger, hm

4:13 TEttinger: that's how you enter and how it sorta prints backslashes

4:13 ,(pr "hey\\world")

4:13 clojurebot: "hey\\world"

4:14 TEttinger: ,(print "hey\\world")

4:14 clojurebot: hey\world

4:14 TEttinger: ,(count "\\")

4:14 clojurebot: 1

4:14 Olajyd: ,(clojure.string/split "str/ing" #”[\/]”)

4:14 clojurebot: #<ArrayIndexOutOfBoundsException java.lang.ArrayIndexOutOfBoundsException: 8221>

4:14 TEttinger: the \\ is an escape for the backslash

4:14 oh!

4:14 that's because you are using what some IRC clients call "smart quotes"

4:15 Olajyd: ok

4:15 TEttinger: ,"”"

4:15 clojurebot: "”"

4:15 TEttinger: see how the quotes on the outside aren't closed by the one on the inside?

4:15 Olajyd: yea gotcha

4:17 TEttinger: ,(clojure.string/split "str/ing" #"[\/]")

4:17 clojurebot: ["str" "ing"]

4:17 TEttinger: your code is good

4:19 Olajyd: TEttinger a more robust solution is therfore to use something like (str “[\” delim "]") ?

4:19 TEttinger: not exactly

4:20 Olajyd: oh

4:20 TEttinger: not all chars need to be escaped, and some, like \n , actually mean something else (that's a newline)

4:20 that's what clojure.string/re-quote-replacement is for

4:21 ,(clojure.string/split "hello\\world" (re-pattern (clojure.string/re-quote-replacement "\\")))

4:21 clojurebot: ["hello" "world"]

4:21 TEttinger: ,(clojure.string/split "hello^world" (re-pattern (clojure.string/re-quote-replacement "^")))

4:21 clojurebot: ["hello^world"]

4:21 TEttinger: hm!

4:22 ,(clojure.string/split "hello^world" (re-pattern (clojure.string/re-quote-replacement (str "[" "^" "]"))))

4:22 clojurebot: #error {\n :cause "Could not initialize class java.util.regex.PatternSyntaxException"\n :via\n [{:type java.lang.NoClassDefFoundError\n :message "Could not initialize class java.util.regex.PatternSyntaxException"\n :at [java.util.regex.Pattern error "Pattern.java" 1924]}]\n :trace\n [[java.util.regex.Pattern error "Pattern.java" 1924]\n [java.util.regex.Pattern clazz "Pattern.java" 2493]\n [...

4:22 TEttinger: hm

4:22 I don't know why that fn doesn't escape ^

4:23 Olajyd: TEttinger, lol , I’m going with the assumption that hopefully \n and the likes are not going to be present in the string

4:25 TEttinger: ,(let [delim "^"] (clojure.string/split "hello^world" (re-pattern (str "[" (->> delim first int (Integer/toHexString) (str "\\u")) "]"))))

4:26 clojurebot: #error {\n :cause "Could not initialize class java.util.regex.PatternSyntaxException"\n :via\n [{:type java.lang.NoClassDefFoundError\n :message "Could not initialize class java.util.regex.PatternSyntaxException"\n :at [java.util.regex.Pattern error "Pattern.java" 1924]}]\n :trace\n [[java.util.regex.Pattern error "Pattern.java" 1924]\n [java.util.regex.Pattern uxxxx "Pattern.java" 3182]\n [...

4:26 TEttinger: woah

4:26 ,(let [delim "^"] (str "[" (->> delim first int (Integer/toHexString) (str "\\u")) "]"))

4:26 clojurebot: "[\\u5e]"

4:26 TEttinger: ah

4:27 ,(let [delim "^"] (clojure.string/split "hello^world" (re-pattern (str "[" (->> delim first int (format "%04x") (str "\\u")) "]"))))

4:27 clojurebot: ["hello" "world"]

4:27 TEttinger: ,(let [delim "^"] (clojure.string/split "hello^world" (re-pattern (str "[" (->> delim first int (format "%04x") (str "\\u")) "]")))) ; Olajyd, this is uh kinda crazy but works

4:27 clojurebot: ["hello" "world"]

4:28 luxbock: gfredericks: I tried copying your `bounded-int` from test.chuck and creating my own version of `gen/elements` with it, but it's not quite doing what I need, though I suspect what I need might be quite specific

4:28 Olajyd: wow TEttinger :)

4:28 TEttinger: ,(for [delim ["^" "-" "*" "\\" "?" "]"]] (clojure.string/split (str "hello" delim "world") (re-pattern (str "[" (->> delim first int (format "%04x") (str "\\u")) "]")))) ; Olajyd, this is uh kinda crazy but works

4:28 clojurebot: (["hello" "world"] ["hello" "world"] ["hello" "world"] ["hello" "world"] ["hello" "world"] ...)

4:29 TEttinger: ,(for [delim ["?" "]" "[" "{"]] (clojure.string/split (str "hello" delim "world") (re-pattern (str "[" (->> delim first int (format "%04x") (str "\\u")) "]")))) ; Olajyd, this is uh kinda crazy but works

4:29 clojurebot: (["hello" "world"] ["hello" "world"] ["hello" "world"] ["hello" "world"])

4:29 luxbock: gfredericks: I haven't looked at the recursive generators, but I suspect that I don't need them, because the size of the trees that I build basically depend entirely on one property of the rules that are used, and one property of the root-node

4:29 pepijndevos: What the hell. Where is my xhr-connection? It doesn't seem to be inside clojure.browser.net

4:30 Olajyd: ok thanks TEttinger, :)

4:30 * gilliard not sure that re-quote-replacement is the right fn

4:31 Olajyd: will find a way to integrate it to the function, get-last-part,

4:31 gilliard, any suggestions?

4:31 gilliard: ,(doc clojure.string/re-quote-replacement)

4:31 clojurebot: "([replacement]); Given a replacement string that you wish to be a literal replacement for a pattern match in replace or replace-first, do the necessary escaping of special characters in the replacement."

4:31 TEttinger: Olajyd: what that does is it gets the first char out of the delim, gets the numeric code that represents it (by calling int), then does a format call which is sorta a voodoo function, it does a lot but here it makes a zero-padded 4 digit hex string, sticks "\u" before it... and you get a valid escaped character that will never be special

4:31 luxbock: gfredericks: so I can just do (gen/fmap (partial apply draw-my-tree-fn) (gen/tuple rule-generator root-node-generator))

4:31 gilliard: ^^ that's not the same as what we want. But I don't have any other suggestions atm, sorry.

4:32 TEttinger: oh and it doesn't need the [ and ] padding anymore

4:32 ,(let [delim "^"] (clojure.string/split "hello^world" (re-pattern (->> delim first int (format "%04x") (str "\\u")))))

4:32 clojurebot: ["hello" "world"]

4:33 luxbock: to implement the growing property for my root-nodes, I really just need a generator that when given [:foo :bar :baz], the typical sample of it would look like (:foo :foo :bar :foo :bar :baz :bar :foo :baz), i.e. it would begin by favoring the earlier elements

4:34 I tried to read through the clojure.test.check.generators code but it's a bit beyond my level to understand quickly

4:35 if there's some easy trick to achieve this type of generator I'd love to find out, if not then it's not a very big deal :)

4:35 gfredericks: thanks for the help in any case

4:36 pepijndevos: Seriously, the function is right here, https://github.com/clojure/clojurescript/blob/master/src/main/cljs/clojure/browser/net.cljs#L81 but when I use it, it's not there.

4:38 huh, it is, but not on the repl...

4:38 TEttinger: maybe because the repl isn't browser-based? I don't use CLJS though

4:38 Olajyd: TEttinger, thanks! more problem solving coming your way ;) thanks everyone :)

4:39 TEttinger: woohoo

4:49 pepijndevos: I'm using figwheel browser repl

4:51 spacepluk: hi, is there any good wrapper for guava caches?

4:55 pepijndevos: Ouch... figwheel doesn't deal with case-sensitive filesystems it seems.

5:24 dabd: thoughts in this language? https://github.com/LuxLang/lux

5:25 it seems like a great idea: a statically typed Lisp with a powerful module system

5:25 apparently the compiler is written in Clojure

5:36 Olajyd: what function can I use to Print "Hello World" N times

5:36 jeaye: dabd: I'm also working on a statically typed lisp.

5:39 ,(dotimes [n 5] (print "Hello World"))

5:39 clojurebot: Hello WorldHello WorldHello WorldHello WorldHello World

5:39 jeaye: Olajyd: ^

5:40 Olajyd: wow jeaye

5:42 jeaye: hm?

5:42 Olajyd: thanks :)

5:42 jeaye: sure

5:47 sveri: dabd: I scrolled through the wiki a bit and disliked all of the reader macros. Apart from that, well, types is what clojure is lacking for me, so yea, it's interesting. It would be nice if there was clojure interop so you would not have to reinvent the whole clojure stack again :-)

5:53 pepijndevos: Waaa. I'm porting some Clojure code that loaded a json resource from file and put it in a var. Now in Clojurescript I want to have the same thing, but it's of course all callbacks.

5:53 I thought I know, I'll use a promise, but there is no such thing. What am I supposed to do?

5:55 Should I use an atom, or alter-var-root or some core.async thing?

5:56 tcrayford____: pepijndevos: don't store state in vars (for the most part). I'd use an atom or core.async, depending on what you're doing

5:56 (core.async is more about "communicate this value right now to a loada downstream things, an atom is more about "hold this thing and let me update it atomically")

5:57 pepijndevos: It's not so much mutable state, it's just config things. Static data. I'm using it all over the place, so passing it around is a PITA>

5:58 tcrayford____: pepijndevos: I tend hard towards passing things around these days (see component in clojure land), but it's your program ;)

5:59 dabd: sveri: I didn't find much information about reader macros except for defsyntax #export

6:14 sm0ke: so if you have a (declare a) you can check it is bound by (bound? #'a) or (bound (var a))

6:15 but if i pass it to a function (defn foo [b] (bound? (var b)))

6:15 it throw error

6:15 ,(do (declare a) (bound? (var a)))

6:15 clojurebot: false

6:16 sm0ke: ,(do (declare a) (#(bound? (var %)) a))

6:16 clojurebot: #error {\n :cause "Unable to resolve var: p1__49# in this context"\n :via\n [{:type clojure.lang.Compiler$CompilerException\n :message "java.lang.RuntimeException: Unable to resolve var: p1__49# in this context, compiling:(NO_SOURCE_PATH:0:0)"\n :at [clojure.lang.Compiler analyzeSeq "Compiler.java" 6891]}\n {:type java.lang.RuntimeException\n :message "Unable to resolve var: p1__49# in this...

6:33 deadghost: how do you keep track of clojure news/developments

6:33 rss feeds or what?

6:34 sm0ke: is normally find it on #clojure twitter

6:34 or HN

6:34 I*

6:49 gilliard: TEttinger2 Olajyd: Was it j.u.r.Pattern/quote we needed earlier?

6:49 ,(clojure.string/split "Hello^WORLD" (re-pattern (java.util.regex.Pattern/quote "^")))

6:49 clojurebot: ["Hello" "WORLD"]

7:28 luxbock: there's no core-function for catching exceptions and returning nil right?

7:28 just got bit by this: ##((sorted-map-by > 1 :foo) :bar)

7:29 I suppose it would have to be a macro

7:59 cenzhe: hi all. Is it possible to call gen-class with values that can only determined at runtime?

7:59 be determined

8:00 concept: Hello all, I already know Haskell, how much new concepts will clojure introduce ? Is learning Clojure after Haskell a good idea?

8:07 Kneiva: concept: Well, they are both lazy functional languages. There are some new concepts. Clojure has less syntax and it is lisp so that takes a while to get used to unless you already know some lisp. I moved to Clojure after studying Haskell since I do a lot of stuff on the JVM anyways.

8:12 concept: Kneiva: is there are similar concepts like functors ? monads? applicatives? or is the focus on macros?

8:14 scottj: concept: none of those concepts are explicitly mentioned in clojure itself, and macros are part of clojure but not the focus

8:14 schmir: scottj: don't tell me I have used monads without noticing :)

8:15 Kneiva: schmir: You most likely have. =)

8:15 concept: You most likely did

8:16 tdammers: you almost certainly did

8:16 concept: so what is a good starting point, book/tutorial/video etc to learn Clojure, I already have good experience with haskell?

8:16 tdammers: (monad the phenomenon, not monad the explicit language construct)

8:16 scottj: concept: clojurebook.com

8:16 concept: or read everything on clojure.org also works

8:17 concept: scottj: thanks

8:17 schmir: damn it

8:18 scottj: for tutorial there's braveclojure.com and for videos there are several charming old ones of Rich explaining the language

8:19 concept: Another queston, how does Clojure compare to other Lisp dialects such as Scheme and Racket ?

8:20 gilliard: running on the jvm is a pretty big difference.

8:20 scottj: concept: http://clojure.org/lisps

8:27 clgv: I have the following problem with clojure.java.jdbc: In a transaction I want to insert data into two tables (jdbc/with-transaction [t-conn db] (jdbc/insert! t-conn :table1 ...) (jdbc/insert! t-conn :table2 ...)) - this fails since the second insert just hangs

8:28 ah right, the database is SQLITE. so what might be going wrong there?

8:28 I have no exception or error message to work with...

8:29 schmir: looks like a deadlock

8:30 clgv: the whole thing happens in the same thread within the same function

8:32 schmir: clgv: https://www.sqlite.org/lang_transaction.html: "Transactions created using BEGIN...COMMIT do not nest"

8:33 clgv: schmir: I do not want to nest any transactions - I just want to use the single one. I tried :transaction? false in jdbc/insert! - but no difference

8:35 schmir: oh sorry...misread that and I don't have any explanation for such behaviour

8:36 are you sure that you don't resuse the 'db' connection instead of t-conn?

8:36 s/resuse/reuse/

8:56 troydm: can anyone suggest good parsing library for Clojure, something close to attoparsec in Haskell (parser combinator library)?

8:57 tcrayford____: instaparse is decent

8:57 my prod app (http://yellerapp.com) uses it and is happy

8:58 tdammers: https://github.com/engelberg/instaparse

8:58 tcrayford____: it's not parser combinators like attoparsec or parsec - you define a CFG in a string (because iirc parser combinators are much harder to do in strict languages like clojure)

8:58 tdammers: it's also more limited in terms of what it outputs, compared to (atto-)parsec

8:59 https://github.com/engelberg/instaparse#transforming-the-tree <- this explains things a bit

8:59 but it's still a lot clumsier than how you'd make a parser output exactly what you want in parsec

9:00 hyPiRion: If you need to do stream parsing or have a lot of input, Instaparse is a bad fit. Otherwise it's very good.

9:04 clgv: schmir: yeah

9:05 troydm: hyPiRion: I need to parse lots of Perl scripts

9:06 schmir: clgv: does it work without the transaction?

9:06 tcrayford____: troydm: a reminder that the only working parser for perl is the perl parser itself, and iirc perl's parsing is *really* messed up

9:07 troydm: tcrayford____: yeah I know, I guess not fully complaint parsing but more like something that would be able to parse simple scripts

9:08 tcrayford____: troydm: http://www.perlmonks.org/?node_id=663393 may be of relevance as well ;)

9:08 oh, ok

9:08 hyPiRion: troydm: If you can encode it in instaparse, go ahead. It shouldn't be an issue with respect to perf.

9:09 troydm: hyPiRion: I guess i'll need a lot of custom parsing

9:09 hyPiRion: is instaparse flexible in that sense? or it's not good for this kind of task

9:10 hyPiRion: That really depends on what you mean by custom parsing. I haven't used perl, so I can't say how bad it is to do it. But if you can encode as a context-free grammar, then it's fine.

9:10 troydm: hyPiRion: basicly I need to parse lots of Perl scripts, recognize some common constructions of code and output the textual description of the constructs used in perl script

9:15 pepijndevos: What is the simplest way in Cljs to run some CPU intensive code without blocking everything?

9:16 crocket: Can leiningen handle java source files with clojure source files in the same directory?

9:19 clgv: schmir: I'll try

9:20 pepijndevos: core.async plus some nonsense numeric computation per item that goes through the channel?

9:22 pepijndevos: clgv?? I have a numerical computation, I just want to run it without blocking everything.

9:23 clgv: pepijndevos: can you decompose it into smaller parts? map-reduce?

9:24 oddcully: pepijndevos: have you considered web workers?

9:24 pepijndevos: yea, It produces a lazy seq, and I want to keep dropping until it reaches a certain point.

9:25 so maybe setTimeout(step, 0) would do.

9:25 clgv: pepijndevos: is it that simulated annealing algorithm?

9:25 pepijndevos: yea

9:26 clgv: and it must be run on the frontend (cljs)?

9:26 pepijndevos: yea

9:28 crocket: Is leiningen the only game in town?

9:33 BobSchack: crocket: There's also boot http://boot-clj.com/

9:39 crocket: Boot

9:44 Using clojure implementations of protocols in java is cumbersome.

9:54 clgv: schmir: found it, some innocent looking function made a reading db query :/

9:56 I hate the "builds are programs" philosophy. I suffered from a third-party project using some python build script that involved building c++ code as well - you had to add printlns or interpret the source to actually get to know what files are actually compiled

9:57 (inc leiningen)

9:57 ;)

10:22 sdegutis: What's a stupefying technique for getting the first element in an infinite sequence that satisfies a condition and stopping at that point, returning the satisfying element?

10:24 ##(->> (range) (filter even?) (first))

10:24 ,(->> (range) (filter even?) (first))

10:24 clojurebot: 0

10:24 sdegutis: lazybot is dead!!!

10:24 &(->> (range) (filter even?) (first))

10:24 ,(->> (range) (filter odd?) (first))

10:24 clojurebot: 1

10:25 matthavener: ,(->> (range) (some odd?))

10:25 clojurebot: true

10:25 matthavener: aww odd? returns boolean

10:25 pepijndevos: first drop while?

10:27 gilliard: fnext partition-by?

10:44 sdegutis: ,(->> (range) (filter odd?) (first))

10:44 clojurebot: 1

10:44 sdegutis: ,(->> (range) (some odd?))

10:44 clojurebot: true

10:44 sdegutis: Oh right.

10:48 gfredericks: luxbock: when you tried to create gen/elements used bounded-int, was the problem that it still seemed evenly distributed?

10:56 noncom: what is the common approach for creating typical groups of control elements in seesaw? say, i have a group of a text input, a button, a slider and a couple of labels, they control values of, say, 2 atoms. is there any preferred way of creating such a control group for various atoms?

10:56 i think what i am asking about is some higher-level grouping of elements..

10:57 sdegutis: I have not used seesaw.

10:58 clgv: noncom: you usually choose one of the layourmanagers

10:59 noncom: yeah, i know: that's what goes for the layout, but...

10:59 see: http://joxi.ru/1A5b5BZFXWbqrE

10:59 i just have tonns of repeating code

11:00 does not look right... although there may be no other way around..

11:00 except for maybe generalizing this into a separate function..

11:02 clgv: noncom: the bare minimum would be a declarative description as clojure map

11:02 noncom: ah, right, so i could create a builder around seesaw, which would take a declarative map and go with it create elements and setup connections, right?

11:03 clgv: sure, if it's worth the effort

11:03 noncom: those bindings are pretty noisy there. maybe that can be simplified?

11:03 justin_smith: noncom: it seems like you could have a function that returns one of those groups (k 1, k 2, bpm, etc.) in a hash-map

11:03 with sizes and positions as an argument to the function

11:04 sdegutis: Is there any interest in a testing framework that uses Java 8's java.nio.file.WatchService ?

11:04 noncom: yeah.. the combination of what you both are saying is what could be the solution

11:04 sdegutis: Seeing as how Clojure 1.7 now uses Java 8 and all...

11:05 justin_smith: sdegutis: I've been using clojure with java 8 for ages, this has nothing to do with 1.7 does it?

11:05 sdegutis: I'm very interested in it personally and will be writing one. I only ask to see if anyone would like it to be made public.

11:05 justin_smith: I thought some recent version of Clojure required Java 8?

11:05 justin_smith: no

11:05 sdegutis: Maybe I'm mistaken. Either way, I'm writing this dang thing.

11:05 So tired of my test suite polling my file system. It's killing my SSD.

11:05 justin_smith: 1.6 is still the minimum, might be jumping to 1.7 eventually

11:05 hyPiRion: sdegutis: they are considering removing 1.6 support after 1.8, but it's not set in stone yet

11:05 sdegutis: AH.

11:05 *Ah.

11:06 justin_smith: it's hard to require anything after 1.6, ubuntu and osx are stuck on that version last I heard

11:06 noncom: won't this crush the enterprise world which is still on 1.5?

11:06 justin_smith: haha

11:06 puredanger: I have seen 0 complaints about losing support for Java 1.5 (in Clojure 1.6)

11:07 Clojure 1.6, 1.7, 1.8 will support Java 1.6+

11:07 sdegutis: justin_smith: I'm on OS X and using Java 8 according to `lein repl`

11:07 Bronsa: IntelliJ requires 1.6

11:07 justin_smith: did it come with that out of the box? of course you can use java 8 anywhere if you make the effort

11:07 sdegutis: I think I installed it myself at some point?

11:08 I don't recall specifically wanting the latest version though.

11:08 Oooh I know why.

11:08 noncom: it was almost surely you

11:08 justin_smith: yeah, I'm just saying there is friction about using anything newer than the system default

11:08 newer versions of the jvm are easy to install, so it's a kind of silly friction

11:08 sdegutis: When I installed OS X 10.10, and installed Leiningen, and ran `lein` the first time to set it up, it popped up a message box saying "You need to install Java yourself" and gave me a link to the JDK download page.

11:09 noncom: this explains everything

11:09 sdegutis: So I just clicked the topmost link that was for "Mac" OS X. (APPLE DOESNT CALL IT THAT ANYMORE ORACLE GET WITH THE PROGRAM)

11:09 And it happened to be Java 8 JDK.

11:09 sveri: The business I am working for delivers its packaged JVM and we explicitly do not support OSX, but Solaris for instance :D

11:09 sdegutis: Ha.

11:09 So this implies that most OS X users are probably using Java 8.

11:10 But a minority of people in here use OS X.

11:11 So... any interest in a testing framework that uses WatchService?

11:11 All current ones just poll the system.

11:11 (file system)

11:12 noncom: maybe you better ask the google group

11:12 but why not make it and make it public? the interest will discover itself

11:14 sdegutis: noncom: I've made a dozen tools and made them public, going through a lot of effort to document it, that I never would have done if it were private only, and none saw any kind of community pick-up

11:14 *dozen Clojure libs

11:14 I'd hate to waste my time because there may potentially be interest when there's really not.

11:14 justin_smith: make something someone wants to use next time, duh

11:14 noncom: eh :( i have a somewhat similar story, man... not so much with clojure though :)

11:15 but i thought i just like to have it documented and stuff just for myself

11:15 sdegutis: :)

11:15 noncom: sometimes OCD simplifies things...

11:15 sdegutis: :)

11:15 Bronsa: sdegutis: I only see 3 clojure repos on your github

11:15 sdegutis: Anyone know where that list is of Clojure testing libs and plugins?

11:16 Bronsa: I integrated most of them into our private app since nobody wanted them.

11:16 Bronsa: none of which have any docstring

11:16 sdegutis: Bronsa: The ones still up there are probably more recent and I just haven't gotten around to removing the github repos

11:16 Bronsa: sdegutis: what's the point of removing github repos? I don't understand

11:17 sdegutis: Bronsa: OCD

11:17 I don't like having things lying around that aren't in use. It's just really irksome to me. So I either make something I use and keep it up, or get rid of it.

11:17 The only exception being mjolnir, which I keep only because it's got way many github stars, and that could be useful for something some day

11:18 Bronsa: then you shouldn't complain that nobody uses your lib if you delete them

11:18 sdegutis: Found it https://github.com/technomancy/leiningen/wiki/Plugins

11:18 Bronsa: Not if I've left it up for a year or two and plugged it a few times already.

11:21 When making Clojure libs, you either got to be first, or be famous. Otherwise your lib won't ever gain traction.

11:21 weavejester was both, which is why his libs got so popular, even his newer ones -- the mere mention of the on the mailing list gets lots of instant attention

11:21 Marick was first when he made Midje, which is why it's got more awareness and support than Speclj

11:22 justin_smith: what about data.json/cheshire

11:22 sdegutis: Compojure was first, so even though it's got a lot of downsides and bad designs, people still recommend it because it's now the de-facto standard

11:22 justin_smith: nobody uses that

11:23 justin_smith: sdegutis: those are two different libs

11:23 the newer one, made by the less famous guy, is more popular

11:23 sdegutis: justin_smith: that still counts as "first" though because the real first one sucked bad enough that everyone wanted a replacement

11:23 so it was a race to make one.

11:23 similarly to clojure.test, which some people can't accept, thus they picked Expectations in its place

11:25 Bronsa: sdegutis: lots of opinions thrown as facts, as usual

11:25 sdegutis: yep, talking out my butt

11:25 just /ignore me

11:25 i have nothing useful or informative to say

11:26 Bronsa: that's good you're aware of that

11:26 ucb: for the erlang hackers in here (or people generally interested in useless but potentially cool stuff): https://github.com/ulises/sliver/blob/pulsar-examples/reg_ping.erl + https://github.com/ulises/sliver/blob/pulsar-examples/src/sliver/core.clj

11:27 sdegutis: Bronsa: im serious. type /ignore sdegutis

11:27 scottj: compojure is the defacto standard because it has been maintained for seven years and redesigned when something better came along (ring).

11:27 Bronsa: scottj: don't even bother

11:27 sdegutis: scottj: the way it's designed is kind of weird.

11:27 scottj: for example I'd much rather destructure params myself...

11:28 If you have a middleware that assoc's the db and current user, you have to do crap like this: (POST "/foo/:bar" [bar {:keys [db user]}] ...)

11:29 It gets ugly quick.

11:29 Oh wait, what am I doing.. scottj, Bronsa is right, just ignore me. It's a complete waste of time to listen to me or seriously consider anything I say. I'm a complete moron and probably intentionally trolling.

11:35 Bronsa: sdegutis: that's the impression you make, yeah

11:35 t0by: Not sure about the second, but seeing these exchanges I wouldn't rule out #1.

11:35 sdegutis: ok

11:36 sveri: sdegutis: sounds like you had a bad day

11:36 maybe with your girlfriend?

11:36 sdegutis: haha

11:36 just trying to figure out how to find duplicate values in datomic

11:36 and only paying half attention to Bronsa's insults

11:37 but heck i dont mind being insulted, what do i gain for having a good reputation? being like Bronsa? no thanks.

11:37 so yeah im a jerk and moron and troll. so be it.

11:37 oh right :with!

12:28 clgv: justin_smith: ubuntu and most modern linux distributions shipp java 7 afaik.

12:32 justin_smith: must have happened more recently than the release of whatever images my ops guy uses

12:33 (not to mention my own box, which is aging)

12:33 we've specifically had issues in my team with java modules getting built for 1.7 then breaking on prod for that reason

12:39 eguneys: what's wrong with this code http://pastebin.com/qLyV7Rtu

12:41 justin_smith: the indentation is a bit off, but it looks fine

12:41 eguneys: it doesn't work

12:41 s c t doesn't get destructured

12:41 justin_smith: OK, what does test-address look like?

12:41 eguneys: it's a map {:street-address "123 .." }

12:42 justin_smith: eguneys: your destructuring is guaranteed to grab the keys :s :c and :t from test-address. If test-address does not contain those keys, fix your destructuring or your data.

12:43 eguneys: oh I have to use actual key names like street-address

12:43 justin_smith: right, destructuring isn't magic

12:43 eguneys: ok thanks

12:46 sdegutis: Btw Datomic is way cooler lately.

12:50 spieden-: pull function in queries is great

12:53 sdegutis: Wait, *in* queries?

12:53 Or do you mean as opposed to d/q?

12:54 spieden-: That's actually a feature I don't really understand the purpose of. When you get a user by (d/entity db (d/entity db [:user/email user-email])), you can then get anything lazily from it in map-form, like (:user/name user) or even (-> user (:user/account) (:account/balance)) and it works fine.

12:55 amalloy: justin_smith: it wouldn't necessarily have to be magic: eguneys probably imagined it pulled values from the map "in order"

12:57 sdegutis: Speak of which what's the point of hash-ordered-coll?

12:59 Bronsa: try to read the docstring

13:05 sdegutis: (doc hash-ordered-coll)

13:05 clojurebot: "([coll]); Returns the hash code, consistent with =, for an external ordered collection implementing Iterable. See http://clojure.org/data_structures#hash for full algorithms."

13:05 sdegutis: Bronsa: I thought you had me on /ignore bro what gives

13:05 Bronsa: yeah I read that earlier, still not getting it

13:15 justin_smith: amalloy: oh, that would be the more parsimonous misunderstanding, yeah

13:21 * sdegutis misread as postmortem

13:22 justin_smith: oh, the word is parsimonious, sorry

13:22 sdegutis: Finally gonna read transducers.html and see what the big deal is.

13:32 spieden-: sdegutis: true, but that makes the data dependencies of your code a bit opaque. if you pull everything you need up front they're clear. also when querying directly from the front-end as dnolen described in his omnext talk the lazy map isn't an option.

13:32 sdegutis: spieden-: ah touche

13:32 dnolen's in the dynamic-bridge camp, but there's way too much security risk there for it to be practical for our purposes

13:33 every single thing that comes from the front-end to the back-end needs to be inspected first to make sure it's a valid request, which is completely skipped when doing it "magically"

13:33 spieden-: right now i like mediated "free query" from the front-end for reads and for writes something like command objects/values

13:34 sdegutis: queries are just data you can inspect like anything else, right? also you can run them against a dbval that constrained to just what the user is allowed to see via filtering

13:35 anyway, the endless REST URI hierarchies do get tiresome, heh

13:35 sdegutis: spieden-: I personally don't like exposing any implementation details beyond their absolutely necessary black-box entrance, such as how something is stored in a database

13:35 spieden-: sdegutis: yeah you definitely lose that

13:36 cost is tighter coupling between front-end code and storage model =\

13:36 sdegutis: spieden-: the style of coding I've started changing to is to not allow datomic attribute-names to escape past the implemenetation source file they absolutely must be in -- all tests and consumers of such functions use public functions which then may use these

13:36 for example, (features.user/email user) will get the email address, even though it's just defined right now as (def email :user/email)

13:37 spieden-: ah cool, so everything's aliased

13:37 sdegutis: basically yeah

13:37 So for example this allows me to change from Entity to Pull API pretty easily

13:37 unfortunately I only started this a month ago or so, and only on a small portion of our codebase

13:37 spieden-: have to admit i like the idea of hitting "find usages" on a datomic attribute keyword and seeing everything that reads it, though =)

13:38 sdegutis: so there's still things like :user/email sitting in some Hiccup view files :'(

13:38 spieden- !!!

13:38 what's that??

13:38 oooh right

13:38 spieden-: (cursive)

13:38 sdegutis: yeah you can still do that on a function with a smart enough editor

13:38 spieden-: or whatever editor

13:38 sdegutis: which i dont have (dear emacs you suck)

13:39 spieden-: true, but with a keyword it even goes into the client-side cljs code i guess

13:40 sdegutis: ah

13:41 it's a trade off, one that freaks me the heck out nowadays

13:41 spieden-: yeah, indirection vs data migrations i guess

13:41 oddcully: which brings us basically back to what magic destructuring is with {:keys [inventory-item/stock]...} playing really nice dat(omic|ascript) stuff

13:41 sdegutis: actually mostly because it makes changes much much harder

13:42 technically you can dev a lot faster and easier by making use of lots of coincidences and magic and automatic stuff

13:42 but you're much better off in the long-run if you make an official interface and hide as much implementation detail as possible

13:42 long-run meaning like, if you plan to code the same codebase full-time for many years

13:43 spieden-: yeah, in a larger team especially i guess

13:49 stakes will finally be high when i can get clojure into my day job =)

13:49 we'll see if my tune changes then

13:49 akabander: My day job approved Clojure for my piece of our massive project. I'm ecstatic and terrified at the same time.

13:50 naga`: i get paid to get clojure to be used in my company

13:50 :)

13:50 akabander: But they wanted me to play nice with the JVM, and I really hate working in Java, and this was my answer.

13:50 spieden-: nice

13:50 naga`: we sometimes have tough competition between node.js and clojure (in server side projects)

13:50 sometimes clojure wins because we need some fancy-pants db driver that's available in java

13:50 akabander: If I could do pure Clojure it would be perfect, it's figuring out the interop that's got me worried.

13:50 spieden-: i've been doing side stuff in clojure for a couple years

13:51 akabander: it's the best i've seen

13:51 akabander: I've heard it's good, I just haven't worked it in yet. I have the pure-Clojure API roughed out, but need to make calling into it easy for the Java people.

13:51 spieden-: akabander: trivial host interop was a big design goal i think

13:52 akabander: i think that stuff has improved since i used it, but i've done the java-calling-clojure thing

13:53 akabander: I'm going to do some googling, but I may drop in with questions for people who've been down the road before.

13:54 naga`: Problem is not with Java interop. Normally when you create some piece of code in Clojure to be called from Java, you'll tend to create uberjar that you'll put to the Java project's classpath. Then you'll have multiple points of dependency management (pom.xml in Java project and project.clj).

13:54 And that's *potentially* getting you into deep s*it in some cases.

13:54 spieden-: yeah i used maven only in the project where i did this

13:54 which dealt with the clojure code fine

13:54 naga`: I mean, it's hard to manage even the pom.xml and if you do it the uberjar way then you'll potentially get same library in multiple versions to your classpath.

13:54 And who can say what classloader decides to load the lib?

13:55 akabander: Hmm, the Java folks are working in a Maven project, and I've been naively using lein for my pieces.

13:55 naga`: So I personally wouldn't use Clojure code from Java or then I'd pay attention to the dependency management stuff.

13:56 akabander: naga`: I've already asked our deep-Java nerd for class loading details, and he basically waved his arms at me and said, "lalala I can't hear you."

13:56 spieden-: naga`: what if you just build a regular jar of the clojure code from maven?

13:56 naga`: akabander: that's because you'll need to dig deep sometimes to know who loads what. it's the bad side of jvm

13:56 I don't know if jigsaw will solve this kind of things?

13:56 I haven't yet looked into it

13:57 akabander: I may be able to shift dependency management onto another team member, as cruel as that sounds, he has the background for it.

13:58 spieden-: akabander: if you produce a regular jar and a pom your artifact should be indistinguishable from those built from java code

14:01 all clojar deps can be referenced from your pom, and you just configure clojure-maven-plugin to build your code

14:04 akabander: spieden: Thanks, that will definitely get me started... Instead of teasing them with reports of functionality, I can give them stuff to use, should be fun.

14:04 sdegutis: Anyone here ditched paredit in favor of smartparents?

14:05 spieden-: I'm on a 1-person team (me) doing the same Clojure web app for 3 years straight full time, that's where my recommendation comes from.

14:07 spieden-: akabander: yeah they shouldn't know the difference beyond how much more efficient you are =)

14:07 akabander: you'll just be providing interfaces and implementations like they're used to i think

14:08 sdegutis: cool -- i'm trying to land a similar gig

14:08 sdegutis: best of luck

14:10 akabander: Thanks spieden, that's the idea. I want to make them jealous of my Clojure use, not annoyed.

14:10 arkh: sdegutis: 2.25 years part-time for me : )

14:10 sdegutis: arkh: sweet

14:12 justin_smith: akabander: spieden-: for seamless collaboration, you probably want regular java interfaces as the common ground - these are easy to make even if you want to focus on writing clojure code, and very easy to use from both sides of the divide.

14:16 akabander: Thanks for the tip, justin, will add that to my notes

14:20 expez: did lein gpg break in 2.5.2?

14:21 It now prompts me for a pw during deployment to clojars and cant sign the artifact

14:22 https://github.com/technomancy/leiningen/issues/1952 indeed :(

14:41 amalloy: expez: i just commented on that issue: it still works for me. do you have different versions of any of the stuff needed? perhaps there is some incompatibility between 2.5.2 and a particular version of gpg or something

14:47 expez: amalloy: I have gpg 2.1.6, and I run on linux. The issue creator was on osx IIRC.

14:58 tmtwd: how do I load the current file with cider?

14:59 or the current buffer rather?

14:59 expez: tmtwd: C-c C-k

16:29 xzilend: is there a way to use a closure with a defn'd function? eg., have 'db' available in register fn: https://gist.github.com/adairdavid/ba9b80122cbf044bd0f6

19:40 srruby: I'm learning AWS SQS. Can anyone recommend a sample exercise to test my ability to program SQS in Clojure? I'm imagining trying something like aggregating live twitter feeds.

19:41 arkh: I haven't used it but it looks like your best bet is Bandalore: https://github.com/cemerick/bandalore

19:43 if you're not familiar with him, cemerick writes good libraries

19:44 srruby: arkh: Thanks. Yes I looked at it.

19:45 I'm trying to see what I can use as a big data source.

19:47 arkh: srruby: sorry, I misunderstood

19:47 srruby: np

22:10 freudsfeud: /LEAVE

22:16 crocket: Does a boot repl start up faster than lein repl?

23:07 belak: What are good first projects to do with clojure? I'm interested in learning it, but I'm not too familiar with what its strengths are or what it's usually used for

23:08 futuro: belak: what interests do you currently have?

23:08 the best projects are ones that scratch your own itch

23:08 generally speaking

23:09 TEttinger: I think a lot of people here use clojure (JVM) for web app backends, and some also or instead use clojurescript for web app client-side behavior

23:09 belak: My only other current project is an IRC bot, but I've been interested in a tiny package manager, or some sort of config management... I'd do a web app, but I'm not sure what

23:10 futuro: the config managements project would give you experience with I/O, printing, dependency handling, and some other things

23:10 perhaps interfacing with the cli

23:10 which are all beneficial

23:10 beneficial to learn*

23:11 TEttinger: in my experience, clojure is really really good at handling data that would be considered complex in a language like Java. a clojure map, created with the {} sort of literal, is basically the same as a JS object in general properties, but clojure can treat a map or just about any collection as a seq, and most collection-based functions in clojure operate on seqs

23:12 so you have a lot of flexibility with converting around between types

23:15 futuro: its focus on data immutability, and it's functional nature, make it easier to reason about as well

23:15 TEttinger: belak: I've written some tiny apps before for family stuff. my grandma had a number of really challenging dietary restrictions, so I wrote a little GUI app using the Seesaw lib that looked up foods in an offline copy of the USDA database, sorted by magnesium, phosphorus, and potassium (the stuff she had to avoid)

23:15 futuro: as opposed to systems which do not have these properties

23:15 TEttinger: it was uh much faster and smaller than writing it in Java, and i didn't need a GUI to make the GUI

23:16 belak: I think my first C app was a simple todo app

23:16 Might be worth doing something like that again

Logging service provided by n01se.net