#clojure logs

2014-01-03

00:01thirdyDenommus, thanx. I guess I could say that (if) is less reluctant than (true?)
00:10TEttinger3,morton
00:10clojurebot(0 1 4 5 16 ...)
00:10TEttinger3heyyy you can def stuff in privmsg
00:10TEttinger3that's the set of 256 magic numbers (morton numbers) used for interposing numbers
00:10TEttinger3(bitwise)
00:16TEttinger3,(Integer/toString (interself 2r10101) 2)
00:16clojurebot"1100110011"
00:31ryanflorencetaking my first spin with clojure, how do I get (trim " foo ") to work? I'm sure I need to require something but I don't know what.
00:32ryanflorence(require '[clojure.string]) doesn't seem to work like it does for other things (I'm using lein if that matters)
00:32tim__ryanflorence: you need to require clojure.string
00:33tim__and if you require it like you just said, you need to call it as clojure.string/trim
00:33ryanflorencetim__: forgive my ignorance, how can I import it w/o :as ?
00:33tim__or do (require [clojure.string :as string]) and then do string/trim
00:34ryanflorenceis there a non-namespaced way to import it or is that bad practice?
00:34ToBeReplaced(require [clojure.string :refer [trim]])
00:35tim__ryanflorence: depends on your view, I tend to use :refer [trim] when I only want one function and when it's clear where trim is from.
00:35ryanflorencethanks ToBeReplaced and tim__: is there a nice guide somewhere on all the ways you can require things?
00:36ToBeReplacedsee clojure-style-guide on github -- should have a complete example
00:37ryanflorencethanks
00:37TEttinger3I am only starting to heavily use (require 'naaaaamespace :reload) recently
00:37TEttinger3it's so useful
00:37tim__ryanflorence: this may also help http://clojure-doc.org/articles/language/namespaces.html
00:37TEttinger3although admittedly less so when you are debugging an infinite-loop bug, which I was
01:06bitemyappalexbaranosky: hello hello :)
01:08arrdembitemyapp: well I can now assemble instructions correctly assuming that all immediate values are #(< %1 1024)
01:09arrdemnow I need to start writing tests in my shiny new assembler :D
01:09bitemyapparrdem: :D
01:09arrdembitemyapp: got time for a game? I'm about done for the night...
01:09bitemyapparrdem: doters?
01:09bitemyappYISSSSSSS
01:09bitemyapprebootan
01:09arrdemlel
03:20TEttinger3ok, this is breaking my mind. how do I print the values in a transient map...
03:21TEttinger3for vectors, it's easy, you get a count, doseq with nth on each value of the loop iter
03:21TEttinger3but nth doesn't work for maps
03:23TEttinger3this is part of a weird bug thing I am trying to fix in my code, for some reason a transient map is getting normal values assoc!ed onto it... then stopping once the count hits 8
03:23TEttinger3no matter what other stuff goes on, the map never gets over 8 values
03:28TEttinger3http://ideone.com/KxGIeB my code is here, I modified what amalloy pasted last night, but it ain't working
03:40MorgawrTEttinger3: I don't think you can print a transient map, you need to make it persistent before accessing individual values inside it
03:41Morgawrbut I haven't worked with transients a lot so idk
03:41TEttinger3Morgawr, I figured out part of it
03:41TEttinger3I am not using the return value, ugh
03:44pyrtsaLooks like there just isn't a public method for listing the keys (nor the kv-pairs) contained in a transient map.
04:11TEttinger3fixed it, used an atom, it works great and is only slightly slower
04:17pyrtsaAtoms are great for that kind of usage. And in case you don't have to look something up at every iteration, you can even benefit from the internal use of transients by using e.g. (into my-map ...) instead of repeatedly assoc'ing.
04:18pyrtsa(I mean, in case you don't need to view the contents of the map between every subsequent assoc's.)
04:19TEttinger3https://dl.dropboxusercontent.com/u/11914692/dungeon-lotsa-ambushes.PNG the algorithm was used to find good hiding places on a maze-like map, by finding the group of locations that would take 5-6 steps to reach from a given cell, and rating the given cell by how many locations it was hidden from
04:23pyrtsaI see. Nice.
04:51philedbitemyapp: What was the reference to ad-hoc polymorphism for?
04:57hiredmanTEttinger3: transients that start acting wierd once you get to a certain number values means you shouldn't be using transients (you haven't read / understood the docs)
04:57hiredmanyou are bashing the transient in place
05:01amalloyTEttinger3: there's a reason the version i posted last night didn't use any transients - you don't need one, and keep trying to treat it as if it were an atom
05:12arrdemTEttinger3: ballin! what graphics system are you using?
05:15pepijndevosIs there a ordered data structure in clojure that allows fast deletes?
05:21pepijndevosI remember seeing some table of time complexities somewhere...
05:23t3soroa hash map should be O(1)
05:24raekpepijndevos: finger trees, perhaps?
05:24arrdemt3soro: beware the constant....
05:24pepijndevost3soro a hash is not ordered
05:24TEttinger3arrdem, libgdx, which uses lwjgl
05:24raekor maybe a ordered map with the right comparison operation
05:25pepijndevoshmmm
05:25arrdempepijndevos: hashes are ordered by the hash value. what are you on about?
05:25raekpepijndevos: you want to maintain the order in which the elements were inserted?
05:26pepijndevosraek yea
05:26TEttinger3ordered, it's a lib
05:27TEttinger3https://github.com/flatland/ordered
05:29raekmaybe this is cheating, but you could create a new filtered data structure like this: (into (empty x) (filter pred x))
05:30raekno structure is shared this way, though
05:31TEttinger3,(empty {:a [1 2 3]})
05:31clojurebot{}
05:32t3sorosorry it's late of course hash maps aren't sorted. you could try using a red-black binary search tree.
05:32pepijndevosyea, they look interesting
05:34TEttinger3the ordered data structures are insertion-ordered
05:34TEttinger3there's of course ##(doc sorted-set-by)
05:34TEttinger3lazybot isn't here
05:34TEttinger3(doc sorted-set)
05:34clojurebot"([& keys]); Returns a new sorted set with supplied keys. Any equal keys are handled as if by repeated uses of conj."
05:35TEttinger3,(doc sorted-map) ; as well
05:35clojurebot"([& keyvals]); keyval => key val Returns a new sorted map with supplied mappings. If any keys are equal, they are handled as if by repeated uses of assoc."
05:45amalloypepijndevos, TEttinger3: the collections in ordered don't have very good deletion performance
05:45amalloyi remember i had an implementation that was ln(n) deletion, but it slowed down all the much more common operations by a lot
05:46pepijndevosI see. good to know. would be usefull to put those in the readme
05:47amalloywell, it's kinda complicated. i guess what i said isn't quite right
05:48amalloythe implementation of deletion involves leaving "blanks" in the collection, which will eventually eat up space and degrade performance if you delete many things from a collection
05:48amalloybut the deletion operation itself is fast
05:49amalloyand (flatland.ordered.common/compact m) will reclaim all that wasted space, at the expense of rebuilding the collection
05:52lnostdalhow does one go about debugging `lein install` getting stuck in a 100% cpu loop? .. `lein repl` etc. works fine
05:52TEttinger3lnostdal, this just happened to me
05:52TEttinger3err, install?
05:53TEttinger3lnostdal, could it be a jar signing thing?
05:54TEttinger3and it asks for a key passphrase in some hidden window so it can sign the jar, but the window isn't visible...
05:54lnostdalTEttinger3: no idea .. there's no output .. it just sits there x)
05:54TEttinger3that's happened to me
05:54TEttinger3can you do the steps before install?
05:54TEttinger3deps, compile, jar
05:55lnostdalhm, yup; all except jar
05:55TEttinger3do you have any folders named META_INF in your project?
05:56TEttinger3or other jars as resources?
05:57lnostdalnope
05:59TEttinger3lnostdal, is this on github or something?
05:59TEttinger3so I could see for myself
06:00lnostdalno, but maybe i could create a test case .. i'll try that
06:07TEttinger3I need to go to bed
06:08lnostdaloh, ffs. .. some idiot has created a circular symlink
07:40dongchaoHas somebody trying to contribute to Storm now?
09:13recursor94Is there a simple way to create a resizeable table in compojure with input fields, and to get the id and value of every column of that table?
09:16jcidahohi is anyone using Avout in anger in here?
09:22devnheh, in what sense?
09:22jcidahoin a large application that gets pretty well hammered
09:23jcidahowe're using it to store our config data, but we're seeing some kind of recursive loop kicking off
09:23mullrrecursor94: Your question seems strange... do you mean the ring routing library?
09:24jcidahoi.e. http://pastebin.com/tkBd0VeH
09:30lgs32aI just watched RH presenting Harmonikit and noticed he is using a naked inferior-lisp setup
09:31mikerodno clothes on it at all?
09:31lgs32ano nrepl at least
09:32anildigitalhelp needed... I have two files in two different buffers in emacs.. 1. bob.clj 2. bob_test.clj .. I am able to compile bob.clj with C-c k
09:32anildigitalbut when I try to compile bob_test.clj .. it's not able to find bob.clj
09:32anildigitalhalp
09:32lgs32ahow is it supposed to find bob.clj
09:33lgs32awhat are you telling it to do?
09:33gdevanildigital, are you requiring it in your bob_test ns?
09:33anildigital(load-file "bob.clj")
09:33anildigitalyes
09:33anildigitallike above.. but somehow it's not able to find that file
09:33mikerodanildigital: are you using an nrepl server?
09:33anildigitalmikerod: I have done cider-jack-in
09:34anildigitaland ran C-c k in bob.clj that worked
09:34anildigitalyes server is running in a port
09:34mikerodhmm, I wonder if jacking in on a "main" module file is causing the classpath to not be loaded with the "test" files
09:34mikerodoh, never mind, I misread
09:35mikerodyour test file can't find your main file
09:35anildigitalI just killed nrepl server .. opened bob.clj and did cider-jack-in .. I think now it found the file
09:36seriously_randomis it possible to replace concat (conj '()? http://pastebin.com/zKRiQ9qi
09:36mikerodI'd think if you did the cider-jack-in with the test_bob.clj in the current buffer, it'd work
09:37anildigitalmikerod: I did that with bob.clj and it worked
09:38lumafii don't understand why you even want to conj onto an empty list
09:38lumafiyou can just put whatever you're conjing into a vector literal
09:38mikerodanildigital: that'd make sense too
09:39anildigitalmikerod: thanks :)
09:39mikerodnot sure what was your issue before though :)
09:39mikerodhah no problem
09:39seriously_randomlumafi, how?
09:39lumafiand have basically the same result (except having a vector instead of a list)
09:39mikerodseriously_random: what are you wanting to accomplish? there
09:39seriously_randommikerod, I want to replace concat (conj part
09:40lumafiinstead of (conj ...), [(row-values ...)]
09:40necronianDoes anyone have a recommendation on a good resource for learning about designing dsls?
09:40mikerod(map (fn [x] (row-values board [x 0])) (range 9))
09:41lumafiand if you make acc a vector, you can conj to its end directly: (conj acc (row-values ...))
09:41seriously_randomlumafi, thanks
09:41gdevnecronian, there's a whole book on it
09:41mikerodseriously_random: If you just want to map the `row-values` function across each number of (range 9), I'd think to just use map
09:42necroniangdev: I would assume there are many books on it... do you have a recommended title?
09:42mikerod`reduce` with an accumulator just sounds like you are doing the work more manually
09:43seriously_randommikerod, makes sense
09:44lumafiI'd use for rather than map with an anonymous function, but that's a matter of taste
09:44gdevnecronian, yeah it's literally called Clojure for Domain-specific languages
09:44mikerodseriously_random: (map (fn [x] (row-values board [x 0])) (range 9)) ; if you missed it. I tend to avoid reduce if your doing something like a filter, with no transformations on the sequence data, or use map if you are mapping a transformation across *all* items in the sequence.
09:45mikerodlumafi: I agree, I like anonymous fn for a case like this too
09:45seriously_randommikerod, no I didn't miss it
09:45necroniangdev: Welllll okay then I guess I'll go buy that....
09:45gdevnecronian, wait, it only has a 1-star review on Amazon
09:46anildigitalokay now clojure shows me {:type :summary, :pass 10, :test 14, :error 4, :fail 0}
09:46anildigitalbut how can I know what those 4 errors are ..
09:47mikerodM-x clojure-test-show-result perhaps?
09:47mikerodnot sure how you are running the tests
09:47necroniangdev: I'm not a fan of packt really, but it's on sale for $5 right now. So it can't hurt.
09:50necroniangdev: On second thought, after looking at the table of contents it really looks more like a book on learning clojure.
09:50gdevnecronian, yeah I'm skimming it now since I have access to it on Safari books. looks like the book assumes no knowledge of Clojure and so it teaches Clojure and DSLs which I don't like
09:50gdevthat's like the worst place for a beginner to start
09:53gdevnecronian, okay, so when you asked for a "good resource" I should've just said github
09:56gdevnecronian, a good example of a DSL in Clojure is Korma https://github.com/korma/Korma by ibdknox
09:56necroniangdev: Yea I was looking at the source for korma, but who ever invented the code format I want to output to was on crack. So it's going to be more complicated I think, and probably beyond my abilities at the moment.
09:57gdevnecronian, also check out Jim Duey's talk on it http://www.infoq.com/presentations/DSL-Clojure
09:58necroniangdev: Thanks a lot, very helpful
09:59gdevnecronian, no problem, good luck =)
10:04gdevalgernon, are you still interested in working on Marginalia?
10:05algernongdev: yes. lacking time at the moment, though :(
10:05gdevalgernon, ha, I know what you mean =)
10:08rukorHi does any one know of existing clients for fressian in c++ and/or python
10:09gdevalgernon, if you get some time later this month or in February, ping me if you want to spend a little bit of that free time working on it
10:10algernongdev: okay
10:11gdevalgernon, I'm still trying to get intimate with all the details of the library so hopefully I'll have a plan by that time =)
10:14dnolenpushed out Om 0.1.0 to Clojars, have fun
10:14hyPiRion(inc dnolen) ;; awesome
10:14gdev(inc dnolen)
10:14hyPiRionah, lazybot is dead
10:14hyPiRionRaynes: ^
10:43gfrederickslong live lazybot?
11:46TimMchyPiRion: Swearjurescript, have you looked into it?
11:49gfredericksseancorfield: ping
11:57gfredericksseancorfield: unping, just noticed master is fixed
12:02hyPiRionTimMc: no
12:04TimMcA quick review of the syntax didn't show me anything particularly different.
12:04hyPiRionWell, the compilation phase could be improved
12:05TimMcCoffeescript uses `backticks` to delimit raw JS, but CLJS uses js* or something.
12:06hyPiRionI mean, the output should clearly be in JS without alphanumerics
12:06hyPiRionhttp://sla.ckers.org/forum/read.php?24,33349
12:07bbloomTimMc: shh no, CLJS doesn't use anything. that's a secret :-P
12:07TimMcoops
12:07seancorfieldgfredericks: master of what?
12:08TimMchyPiRion: Oh wait, we can get strings!
12:09TimMchyPiRion: (`[~@(+ + +)] (+)) ;= "f"
12:09TimMcI'll leave you to it.
12:10hyPiRionTimMc: with Swearjurescript?
12:10hyPiRionFinally a good reason to learn Clojurescript I guess
12:10jonasenBronsa: https://www.refheap.com/22442
12:11jonasenBronsa: Am I using uniquify-locals wrong?
12:11gfredericksseancorfield: java.jdbc -- query calls vec when :as-arrays? is true (in old versions) for no reason I could figure out
12:11gfredericksit was precluding lazy processing
12:12gfredericksthe req is A) process lazily B) maintain column order
12:20Bronsajonasen: doesn't look like so, might be a bug. I'm looking into that
12:20jcromartieHow do you manage the shared stuff between Enlive HTML templates. Like, if you have a common design for a bunch of fairly different pages that share the same basic markup, how do you avoid duplicating everything among the different actual .html files.
12:22indigojcromartie: https://github.com/swannodette/enlive-tutorial
12:22Bronsajonasen: oh, you're using prewalk on uniquify-locals, you don't need to do that.
12:22indigoSpecifically the part on template inheritance
12:22Bronsajonasen: (uniquify-locals ast) will do what you want.
12:22clojurebotExcuse me?
12:24jcromartieindigo: yes, that covers it from the Clojure code perspective, but I'm just looking for suggestions for keeping my actual .html files clean
12:24jcromartieI guess I could use a single html file with different <sections> or something
12:25jcromartiebut otherwise there is a lot of duplicated "boilerplate" in the HTML between the different pages that the designer maintains
12:25indigoAh, yeah
12:25jonasenBronsa: ok, dropping the prewalk and it works now! Thanks!
12:26jcromartieI don't think it's a dealbreaker or anything :)
12:26indigo<sections> are decent for this kind of organization ;P
12:26jcromartieyes
12:35bitemyappbbloom: started my day off right, trolled Minsky and Harper in one go.
12:37bbloombitemyapp: ?
12:38bitemyappbbloom: ML people.
12:38bitemyappthe latter is the intelligent but cranky homotopy guy.
12:39bbloombitemyapp: i know who they are
12:39bitemyappcomplains about Haskell a lot for some reason.
12:39bitemyappbbloom: well, they started it.
12:39bbloombut they seem to have ignored you...
12:39bbloomnot a very effective trolling
12:39bbloomalso... why?
12:42bitemyappbbloom: narcissism of small differences is silly
12:42bitemyapparrdem: even the trees in Australia: http://en.wikipedia.org/wiki/Dendrocnide_moroides
12:45gfrederickswhat are the implications of trying to get metadata on numbers in clj-jvm via ##(+ 32 (proxy [java.lang.Number] [] (longValue [] 10)))
12:46gfredericks,(+ 32 (proxy [java.lang.Number] [] (longValue [] 10)))
12:46clojurebot42
12:46gfredericksjust curious
12:47indigobitemyapp: How's it going in Haskell land
12:47TimMcOh huh. This one reference PDF implies that with CLJS, macros can't be recursive.
12:47bitemyappindigo: lazily.
12:47indigo:P
12:47TimMcOr... no, that's not quite what it implies.
12:47hyPiRionTimMc: huh? That would make no sense
12:47TimMchttp://appletree.or.kr/quick_reference_cards/Others/ClojureScript%20Cheat%20Sheet.pdf
12:47indigoClearly you have seen the light of proper static typing and nothing else will compare ;)
12:48TimMcBottom left: Macros must emit clojurescript.
12:48TimMcIt's an odd statement, and perhaps I was reading too much into it.
12:48bitemyappindigo: I continue to drag souls to the other side of the fence with me as I go.
12:48hyPiRionTimMc: Yeah, that's a very odd statement
12:49bitemyappindigo: I gave a brief presentation and an extended tutorial following that on some Haskell last night at the Clojure meetup.
12:49indigoHeh
12:50bitemyappindigo: one of my project ideas is making a clean Fay wrapper for ReactJS, my only hesitation is that I kinda wanted to wait for typeclasses.
12:51indigoSounds like a fun project
12:52bitemyappcould be.
12:52indigoI read a bunch of benchmarks on how awesome React is
12:55jcromartiewow, so Enlive is a better Hiccup than Hiccup
12:56bitemyappjcromartie: refheap plz
12:58jcromartiebitemyapp: wat
12:58bbloomjcromartie: they are different things for different purposes...
12:58arrdembitemyapp: that's awesome
13:01bitemyappwhat's a dynamic language?
13:01arrdemclojurebot: assembler |is| a dynamic language
13:01clojurebotIk begrijp
13:02arrdembitemyapp: it's ints all the way down man...
13:02bitemyapparrdem: but seriously, what is "dynamic language" supposed to mean?
13:02TimMcSelf-modifying? :-P
13:02arrdembitemyapp: runtime dispatch of control
13:02arrdembitemyapp: optional dynamic code creation and execution
13:03hyPiRion(def dynamic? (complement static?))
13:03arrdemhyPiRion: see that doesn't make any sense...
13:04arrdemalso when on earth is (complement) ever useful?
13:04arrdemseems like it's a (not) that got too big for its boots....
13:04bitemyapparrdem: so Haskell is a dynamic language?
13:04TimMcWhen you want to write point-less code.
13:04bitemyappgood to know.
13:05jcromartiebbloom: but the net.cgrand.enlive-html/html function does what Hiccup does
13:05jcromartiebut safely
13:05jcromartie(i.e. it escapes loose HTML entities)
13:05jcromartieso why use Hiccup?
13:07bbloomjcromartie: my comment was b/c i had no way of knowing enlive had grown to essentially essentially include hiccup: https://github.com/cgrand/enlive/blob/master/src/net/cgrand/enlive_html.clj#L1013 <- i just discovered
13:07TimMcjcromartie: I have no idea. (Unless you use xeqi's wrapper on hiccup, which makes it safe.)
13:08gdevPLT trolling is so 2013
13:08jcromartieHiccup still has useful functions for making things like forms
13:09jcromartiebut the final rendering should probably be done with Enlive :P
13:09bitemyappgdev: too right.
13:11TimMcbitemyapp: Piet is not dynamic. :-(
13:11TimMc!
13:12TimMcPiet should gain some turtle-graphics primitives so that it can modify instruction memory!
13:15bitemyappTimMc: Piet is the ultimate quiche eater's programming language.
13:17TimMcI'm not sure what a quiche eater is, but if it results in more Piet programs, I'm all for it.
13:18TimMchttp://www.dangermouse.net/esoteric/piet/samples.html -- the Pi calculator is my favorite.
13:18SegFaultAXQuiche is delicious.
13:18TimMc"Naturally, a more accurate value can be obtained by using a bigger program."
13:20arrdemah esolangs...
13:20arrdemin programming languages this last semester some classmates built an extended brainfuck with multiple concurrent threads, a single shared global memory and synchronization instructions 0.o
13:21bbloomarrdem: that. is. awesome.
13:21bbloombut i've always been partial to befunge
13:21hyPiRionthat sounds more like an extended Swearjure, really
13:21bbloomi wrote a befunge interpreter the first year or two i was learning to code. it was a transformative experience for me :-)
13:22fabioportierihi guys
13:22hyPiRionYou just need to provide swearjurian primitives for those things
13:22fabioportieriit's me, or clojure syntax suck asses?
13:22bitemyapphyPiRion: isn't Swearjure a pure lambda calculus?
13:22arrdemhyPiRion: I thought you hadn't invented defs yet...
13:23bitemyapphyPiRion: if so, I have a suggestion to make to Yaron Minsky about pure functional languages.
13:23bbloomarrdem: please ignore the trolls
13:23arrdembbloom: glad I wasn't the only person with that gut reaction.
13:23bitemyappfabioportieri: it's definitely you that sucks asses.
13:23bbloombitemyapp: that's not helping
13:24arrdemM-x zen-of-clojure
13:24fabioportierii'll admit i come here to troll if you guys admit the syntax is horrendous.. wtf is all the js closure syntax-like?
13:24bitemyappbbloom: I like hoisting the black flag and slitting throats too much.
13:24hyPiRionbitemyapp, arrdem: well, with 5 non-alphanums stuff we can do anything
13:24bitemyappfabioportieri: this is #clojure not #closure.
13:24bitemyapphyPiRion: oh so it's impure? pity.
13:24fabioportieribitemyapp: pardon me but i feel like the whole idea of clojure is ripped off from js closures
13:24jcromartie(∆ [] (™ £ ))
13:25indigoLoll
13:25hyPiRionbitemyapp: not the pure version
13:25bitemyappfabioportieri: you're not very well informed.
13:25hyPiRion$google hello swearjure
13:25bitemyappthat's about as nice as I can possibly be.
13:25hyPiRionoh lazybot, do I have to provide stuff myself today?
13:25fabioportieribitemyapp: are you saying it's just me, that the two things are completely unrelated?
13:25hyPiRionhttps://github.com/hyPiRion/hello-swearjure/blob/master/src/hello_swearjure/core.clj
13:25indigobitemyapp: Why do I feel that every large software project tends to move toward static type checking
13:25bitemyappindigo: :D
13:26indigoFacebook even made a statically typed PHP
13:26bitemyappindigo: refactoring tools and general sanity retention.
13:26bitemyappindigo: documentation.
13:26arrdemhttp://i.imgur.com/MXUg1Cq.gif
13:26TimMcbitemyapp: The lack of nested functions is a great hindrance to making Swearjure implement any of the basic calculi
13:26SegFaultAXbitemyapp: Stop feeding the trolls. ;)
13:26bitemyappfabioportieri: you have absolutely no idea what you're talking about. I can toss you some learning material or you can somehow supercede me in being an ass in IRC. This is not a contest you want to win.
13:27bitemyappTimMc: wot. No SKI?
13:27bitemyappSegFaultAX: feeding him bleach, give me a minute.
13:27hyPiRionbitemyapp: it's not a contest he can win
13:27arrdemah. nice.
13:27hyPiRionbitemyapp: it's SKI afaik
13:27bitemyapphyPiRion: your confidence is appreciated.
13:28SegFaultAXarrdem: Can you +o?
13:28arrdemSegFaultAX: unless you promoted me no.
13:29SegFaultAXWe need technomancy.
13:29bitemyapphe quieted.
13:29bitemyappand I'm about to leave to talk to icky humans.
13:29SegFaultAXbitemyapp: Ew. Hardware interfaces?
13:30arrdemSegFaultAX: yeah Tech and Rich are the only people with op access here that I know of.
13:30SegFaultAXarrdem: I don't.
13:30SegFaultAXJust Rich and Phil.
13:31TimMcbitemyapp: Feel free to try making K in Swearjure.
13:32TimMcIt's infuriating. The simplest damn function...
13:33SegFaultAXTimMc: Well presumably that extends to any HOF that needs to a return a function.
13:34SegFaultAXSince you can't do #(... #())
13:34TimMcExactly.
13:47seangroveFeel like Heroku has ADD sometimes. In the middle of a push: Received disconnect from 50.19.85.132: 10: user closed connection\n fatal: The remote end hung up unexpectedly
13:53gfredericksclojurebot: The lack of nested functions is a great hindrance to making Swearjure implement any of the basic calculi
13:53clojurebotRoger.
13:54bitemyappomg I am going to die. I need to do something about the insomnia.
13:54gfredericks(Thread/sleep :night)
13:55llasrambitemyapp: Exercise can help. Also, Zolpidem
13:55bitemyappllasram: I exercise and I don't want to crash my car into sexy walruses.
13:55bitemyappclearly the answer is to exercise more.
13:55llasramYes!
13:56TimMcAmbien + handcuffs
13:56bbloomthat Flux program helped me for a little while, then i got used to it & now no effect :-P
13:56TimMc(Nota bene: Buying these together may put you on a watchlist.)
13:56SegFaultAXF.lux is the shit.
13:57bitemyappllasram: you'd think HIIT and strength-training on the same day would be enough -_-'
13:58jcromartiesexy walruses?
13:58rovarTimMc: handcuffs is a bit much, you just need to buy a t-shirt with your name and address printed on it.
13:58bitemyappjcromartie: never done ambien I take it?
13:58bitemyapprovar: no, I don't want video proof in the aftermath.
13:59llasrambitemyapp: Geez. You'd think interval training would be enough by itself, actually. I guess then go run for 10-20k?
13:59rovarso are you sore after HIIT and strength training ?
13:59bitemyapprovar: not especially if I
13:59TimMcjcromartie: Search "ambien walrus"
13:59bitemyapprovar: am doing my routine regularly.
13:59jcromartiejesus christ
13:59bitemyappI'm sore if I return to my routine after a break.
13:59jcromartiethat's a thing?
13:59jcromartieit's like that one drug that made people gamble compulsively
13:59TimMcjcromartie: It's a scary, scary medication.
14:00SegFaultAXI thought it was an alergy medication?
14:00TimMcInsomnia.
14:00SegFaultAXI've never taken it.
14:00SegFaultAXI'll be sure to stay away from it then.
14:00bitemyappllasram: it's not just the insomnia, I need to improve my sleep quality even on my better nights.
14:00philedTamazapan works for me.
14:01jcromartie"Pathological gambling is a rare potential complication related to treatment of Parkinson disease"
14:01jcromartieI'm a big fan of the 'zapans
14:01TimMcSegFaultAX: But if you do, make sure to wear a headcam set to record on movement.
14:01philed*Tamazepan. Or Clonazepam. One of the 'pams.
14:01philedAs you say jcromartie
14:02jcromartiemarzipan
14:02llasram(inc jcromartie)
14:02llasramAww
14:02rovarmy sleeping problems were fixed mostly by afrin and on the days that I do exercise, naproxen sodium
14:03bitemyapprovar: I think I need to adjust my diet too.
14:03bitemyapprovar: further reduce calories, fast periodically, and avoid carbs.
14:03rovarno caffeine after 12pm, no food within 3 hours of sleep time
14:04rovaryou might also experiment with phenibut
14:05bitemyapprovar: yeah I don't think I'll touch phenylephrine.
14:05bitemyappphenibut sounds interesting.
14:05rovari'm a bit of a nootropics junkie, I've never tried phenibut, but people I trust have.
14:06bitemyapprovar: I'm not a nootropics junkie, but I have some regular/go-to things I use that are fairly mild.
14:06rovarthey took it in med school the night before exams to ensure a good night's sleep without ambien-esque effects.
14:06bitemyapprovar: mostly fish oil and vitamin d. I use to take tyrosine and a bunch of other stuff.
14:06SegFaultAXbitemyapp: It probably has nothing to do with the quantity of tea you drink.
14:06bitemyappand yes, I took the vit D in the morning.
14:06SegFaultAXThat's entirely uncorrelated.
14:06rovarI regularly take a acetyl-choline stack
14:06bitemyappSegFaultAX: I switched to drinking bottles of water at night.
14:06rovarand magnesium
14:07rovarooh. magnesium l-threonate can help with sleep as well.
14:07bitemyappSegFaultAX: I could probably roll back how late I drink caffeine though.
14:07rovarand brain function.. especially as we get older..
14:07bitemyappI'm usually drinking caffeine on into the afternoon.
14:07bitemyappthis is why I <3 this channel.
14:07SegFaultAXbitemyapp: You could also take a week of e-vacation.
14:07arrdemthe party starts nightly at 2am :D
14:07SegFaultAXJust don't get on your computer for a week or so.
14:08bitemyappSegFaultAX: does that dis-include my Kindle?
14:08SegFaultAXbitemyapp: Yes. Nature only.
14:08bitemyappfuck me.
14:08bitemyappI'd have to buy physical books to survive.
14:08bitemyappprobably on type theory.
14:08SegFaultAXThat'll do. It'll put you right to sleep.
14:08bitemyappLOL
14:25devnAnyone know what the status of core.async.lab/broadcast?
14:25devnis*
14:27justin_smithbitemyapp: I think you could still program on punch cards, just no feeding them into the hopper until the week is up
14:28mdrogalis-homedevn: I never used the lab, but it sounds like that would be sort of what mult is now?
14:37SuperDuperhi
14:38bitemyappSuperDuper: super hi
14:38SuperDuperi'm new to irc. using emacs as the client. how to i list the users in the room?
14:39bitemyappSuperDuper: try /who
14:40SuperDuperthanks. typing "/who #clojure" worked.
14:40SuperDuperdo you use emacs for your clojure coding?
14:41devnmdrogalis-home: they look different to me
14:41devnmdrogalis-home: "broadcast returns a broadcasting write port which, when written to, writes the value to each of ports"
14:41gfredericksSuperDuper: cemerick reports over half of survey respondents use emacs for clojure
14:42devnmdrogalis-home: multiplex: "returns a multiplexing read port which, when read from, produces a value from one of ports."
14:42mdrogalis-homedevn: Ah, I gotcha. Yeah, I'm not sure what state it's in.
14:42devncompare that with "creates and returns multiple of the supplied channel"
14:43devnmdrogalis-home: yeah, idk either, but im wondering about it for use in overtone
14:43mdrogalis-homedevn: I see.
14:43SuperDuperI'm going to learn one of the lisps. trying to decide between CL, racket, and clojure.
14:44devnmdrogalis-home: samaaron asked about pub/sub 1->many and core.async
14:44mdrogalis-homeOn the mailing list?
14:44devnyes
14:45devnearlier today
14:45devni think it would be cool to move overtone over to core.async
14:45devnfor the event model
14:46mdrogalis-homeFor the first time ever, I was bored with a Rich Hickey talk. (I'm not musical at all :P)
14:46mdrogalis-homeGlad he had fun with his talk though.
14:47rovaris there a bot whom I can ask when they last saw a person in this chat?
14:49TimMcrovar: Not today.
14:49koalallamansabot
14:49hyPiRionlazybot is dead =/
14:50bitemyapp$seen lazybot
14:50bitemyappSHOTS FIRED
14:50bitemyappRaynes: ahem.
14:51hyPiRionbitemyapp: I've already pinged him, but realise that he's been very sick lately
14:51bitemyapphyPiRion: I saw something on twitter about that.
14:51bitemyappRaynes: get bettar please :(
14:51Raynes^
14:51RaynesI missed hyPiRion's ping, somehow.
14:51bitemyappRaynes: <3 don't die
14:51bitemyapp$seen lazybot
14:51lazybotlazybot was last seen joining on typed-clojure 1 second and 679 milliseconds ago.
14:51RaynesI'll try.
14:52bitemyapp$seen Raynes
14:52lazybotRaynes was last seen talking on #clojure 4 seconds and 242 milliseconds ago.
14:52rovar:) :)
14:53gfredericks$seen lazybot
14:53lazybotlazybot was last seen joining on typed-clojure 1 minute and 11 seconds ago.
15:03llasramAny one using ring to stream chunked responses have any suggestions before I submit this PR? https://github.com/llasram/ring/compare/reducible-body
15:13jonasenBronsa: It seems that uniquify-locals doesn't update the :loop-locals key in the environment. Should it?
15:26Bronsajonasen: if you need it I could make a patch but in t.a.jvm I only use :loop-locals for the :tag info
15:28jonasenBronsa: There are probably many more ways to do what I'm trying to do but for the approach I've chosen, yes I need it :)
15:30jonasenBronsa: I could try to create a patch myself if you'd like
15:41Bronsajonasen: I'd accept such a patch if you're willing to make one :)
15:42jonasenBronsa: the problem is, that when I reach a :recur I need to know what symbols the :exprs corresponds to. In clojurescript there is a :frame key, see e.g. here: https://github.com/clojure/clojurescript/blob/master/src/clj/cljs/compiler.clj#L665
15:43jonasenBronsa: so maybe there's another way I can figure out the loop-locals?
15:47Bronsajonasen: I see. Well, :loop-locals is basically the same as (:params frame), so yeah, extending -uniquify-locals to do the alpha-transformation to :loop-locals should do what you want
15:51jonasenBronsa: I'm trying to read the code but I don't (yet) see how to update the env correctly. Any pointers?
15:57Guest32856Howdy. not sure what the procedure for requesting help on here is, but does anyone have experience including local (private) maven dependencies into leiningen?
15:58justin_smithGuest32856: does local and hosted on the same machine suffice?
15:58joegallostrongbad: how do you type with boxing gloves on?
15:59justin_smithGuest32856: or do you need it to be available over a network plus private?
15:59justin_smithGuest32856: also, is it a lein / clojure dependency or a java / mvn one?
16:00Guest32856justin_smith: no, i just need it to be available to the local project. The dependency is datomic
16:01justin_smithGuest32856: mvn install should suffice - it is a maven project right?
16:01justin_smithhttp://maven.apache.org/plugins/maven-install-plugin/usage.html
16:01Guest32856justin_smith: Yes, i tried this: mvn install:install-file -DgroupId=com.datomic -DartifactId=datomic-pro -Dfile=datomic-pro-0.9.4384.jar -Dversion=0.9.4384 -Dpackaging=jar -DcreateChecksum=true -DlocalRepositoryPath=local_mvn_repo
16:01justin_smithyou really shouldn't need all those args
16:02justin_smithdid you try just "mvn install" by any chance?
16:02justin_smithif it comes with a pom that should suffice
16:02Guest32856justin_smith: hmm, ok, let me try that. thanks
16:02Bronsajonasen: extending -uniquify-locals for :recur and mapping normalize on:loop-local s should do it
16:03redingerGuest32856: In your unzipped datomic directory, there should be a bin/maven-install
16:03redingerJust run that
16:04jonasenBronsa: so then the :recur env is up-to-date (which is enough for my usecase) but all the other environments are not updated
16:04Guest32856redinger: if I deploy my project to a different machine, won't it lose the datomic dependency as bin/maven-install will install it outside of my project's directory ?
16:05jonasenBronsa: should I instead do the mapping on :default?
16:06justin_smithGuest32856: yes, it needs to be installed on each machine on which you will run it
16:06redingerGuest32856: Yes, you would need to install it on the machine you want to run it on.
16:06Guest32856hmm - it's a heroku machine. I suppose that's possible?
16:07Guest32856justin_smith, redinger: thanks
16:09arrdemis there a nice shorthand for selecting N random elements of a sequence?
16:09Bronsajonasen: not on :default, it won't get called on :binding/:local etc that way. probably the best way is to introduce uniquify-locals* that first updated the env and then -uniquify-locals && replace calls of -uniquify-locals with uniquify-locals*
16:09justin_smithGuest32856: a thread about datomic on heroku https://groups.google.com/forum/#!topic/datomic/486mjOJZVVI
16:09Guest32856justin_smith, redinger: what i'm trying to do is include the maven repository within my project directory, so when i deploy it to heroku, all the dependencies are still there. I'm not sure if this approach will work.
16:09arrdemor do I jhust need to pull down https://github.com/bigmlcom/sampling
16:09justin_smitharrdem: 10 distinct, or can repeats be valid?
16:10arrdemjustin_smith: repeats are considered wastefull, but not harmful.
16:11justin_smith,(repeatedly #(rand-nth (range 10000)))
16:11clojurebot(8619 6903 9822 2591 8960 ...)
16:11jonasenBronsa: there already is a uniquify-locals* function and it gets called by all -uniquify-locals methods except :binding and :local
16:11justin_smitharrdem: repeatedly rand-nth should be simple enough I hope
16:11bitemyapparrdem: lol @ tests.
16:11bitemyapparrdem: tickets to austin are $273 round-trip from SF.
16:11bitemyappfrickin' awesome.
16:12gfredericksarrdem: (take n (shuffle foo)) if shuffling isn't too slow
16:12justin_smitharrdem: you could turn it into an iterate if you want to dissoc the selections as you go, but that is likely only useful for smaller collections
16:12arrdembitemyapp: because I'm fuzzing my assembler suite I can push my assertion count all the way up to Long/MAX_VALUE :D
16:12arrdembut then I have to wait for my computer to count that high... :/
16:12justin_smithoh, yeah, shuffle is a good option there
16:13arrdemyeah I think I'll go with shuffle.
16:13Bronsajonasen: duh. well, the point still holds, pick another name :). If you have a better approach feel free to do it your way btw
16:14bitemyapparrdem: I finally found two hardware project ideas I could conceivably give a fuck about.
16:15arrdembitemyapp: oh?
16:16jonasenBronsa: I'll create a patch. Thanks for your help!
16:16arrdem1 test passes with 250,000 assertions. I consider this library fuzzed :D
16:17bitemyapparrdem: I can't use Rust. pcwalton thinks Golang is a good language.
16:17bitemyapppersona non grata.
16:17bitemyapparrdem: http://skreksto.re/products/durr and http://feelspace.cogsci.uni-osnabrueck.de/ made less intrusive.
16:17arrdembitemyapp: when I took compilers one of my buddies at school did the first several assignments in Rust.. then said it wasn't mature enough yet :/
16:17arrdembitemyapp: haven'
16:18arrdemt played with golang yet
16:18hyPiRionbitemyapp: Golang is amazing if you need to destroy something but isn't angry enough to utterly demolish it
16:18arrdemC99 - it still wins at clobbering the entire heap :D
16:20bitemyapparrdem: Rust has a lot of promise, I'm just :( pcwalton likes Go.
16:20arrdembitemyapp: those projects are both pretty cool!
16:22bitemyapparrdem: I wouldn't do that :(
16:22bitemyappnot worth risking nerve damage.
16:22bitemyappor infection.
16:22arrdemsee it's the infection/rejection that worries me.
16:22justin_smithI imagine it would make typing difficult for a while
16:22bitemyapparrdem: that too, I need you in tip-top shape for the doters.
16:22arrdemlololol
16:22justin_smithbut then you would be able to use inductors instead of keyswitches, and have a keyboard with no moving parts
16:23arrdemjustin_smith: more like I'd be able to feel charged circuits :D
16:23justin_smithwell that too
16:23justin_smiththis would just be a side effect
16:23arrdemtechnically the magnetic complement but yes
16:24justin_smithyou could also use three antenna as a 3d mouse
16:30rhg135!w 75042
16:30TimMcbitemyapp: I remember hearing about the feelspace belt some years ago. IIRC, after the experiment was over, the participants had a harder time navigating.
16:30rhg135damn
16:30rhg135wrong window
16:30bitemyappTimMc: wow, ouch.
16:30bitemyappTimMc: I guess I'll pass then.
16:31bitemyappTimMc: I already have a pretty good internal compass.
16:31justin_smithreminds me of that recent research about dogs and magnetic orientation
16:33TimMcbitemyapp: Not all of them, I think. And maybe it was just a perception.
16:33TimMcbut it's very easy -- sometimes too easy -- to get used to augmentation technologies.
16:35rovarfor instance, I've found that my human host has definitely improved my mobility
16:38jonasenBronsa: patch submitted
16:40rovarwhat does 'parameter declaration missing' usually mean when trying to write macros?
16:41rovarI mean.. aside from the obvious, where there is clearly a param vector..
16:42rovarhmm.. when I change my args to ~@args it stops complaining, but I'm not sure that's right..
16:44arrdemrovar: paste?
16:46justin_smithrovar let / defn / loop / for / doseq etc. without the binding vector?
16:47noonianmost of the time when i get that it's because i accidentally typed defn instead of def
16:47rovarhttps://www.refheap.com/22448
16:47rovarin line five, if I leave off the ~@ it gives me the error
16:48rovars/fn is serializable.fn
16:48justin_smithdoes the body start with a vector of parameters?
16:48rovaralso.. I know my verbname is wrong..
16:48rovarIt doesn't let me get past the creation of the macro
16:48justin_smithif so, without the @ it would be hidden in a list, and thus missing
16:48rovarbut yes..
16:48arrdemrovar: needs to be ~verbname...
16:48rovarya
16:48arrdemrovar: and ~doc
16:49arrdemw00t [me.arrdem/toothpick "0.1.0"] is live :D
16:49arrdemnow to 0.1.0 batbridge...
16:49rovarwhat isL?
16:50justin_smith,`([a ~(list [:a :b :c] 1 2 3)] [a ~@(list [:a :b :c] 1 2 3)]) ; rovar
16:50clojurebot([sandbox/a ([:a :b :c] 1 2 3)] [sandbox/a [:a :b :c] 1 2 3])
16:51noonians/fn is probably like a normal fn in that it expects an argument vector
16:51justin_smithright
16:51noonian(s/fn [x] (+ x 1))
16:51rovararrdem: you are a madman. Love it
16:52arrdemrovar: lil bit. I just appreciate that yall put up with me :D
16:52rovararrdem: what is your intended purpose for toothpick and batbridge?
16:53rovaramalloy: are you around?
16:54amalloyyes, why?
16:55rovaramalloy: I was hoping to find some answers about Jiraph
16:55rovarI'm hoping you're the right person to ask.
16:56rovarfirstly, is there some updated examples running around of how to get a basic graph up and storing/retrieving data in a simple way?
16:56amalloywell. jiraph never really transitioned from "works well if you're an expert who developed it" to "usable by normal people"
16:56arrdemrovar: batbridge was school work that I never quite finished
16:56rovar<-- normal person
16:57arrdemrovar: it has served its purpose, and is just a toy bytecode machine
16:57amalloynow that nobody is being paid to work on jiraph, it probably won't make that transition
16:58arrdemrovar: toothpick I hope will go on and be able to generate bytecode for x86 and JVM. Maybe one day it'll backend a Clojure on Metal based on Clojure in Clojure but that's a loooong way off.
16:58rovaramalloy: gotcha.. I was trying to chose between either it or Titanium, Titanium seems to be under more active development, but it is also broken, I think at the Titan level, and I can't get a response from either group for issues I've posted.
16:59arrdemrovar: batbridge may see some more work as a demonstration platoform for various hardware concepts and to further aid as a test target of Toothpick but otherwise this is the end of the line for it.
17:00rovararrdem: I would one day like to target LLVM for arm with clojure. I have looked briefly at mjollnir, but it seems so many projects are built as a POC because its fun to build things in clojure.
17:01mrhankywhy does this not work? (clojure.browser.dom): (dom/append (dom/get-element list) (dom/element [:li item]))
17:01rovaramalloy: at some point soon I may dig deeper into jiraph and help it make that transition. It depends on how desperate I get.
17:01mrhankygets me: Uncaught Error: No protocol method DOMBuilder.-element defined for type cljs.core/Keyword: :li
17:02arrdemrovar: I hear you there. I looked at Mjollnir, but half of my reason to build toothpick was to build my own assembler from the ground up since the code generator I wrote for my compilers class never quite made it. I'm also really not a fan of calling off the JVM, so being able to say that Clojure on metal via Toothpick is Clojure all the way down I think is significant.
17:03amalloymrhanky: the error message sounds like dom/element doesn't like those args, and https://github.com/clojure/clojurescript/blob/master/src/cljs/clojure/browser/dom.cljs#L26 confirms it only accepts strings, not keywords
17:03mrhankyah thanks amalloy, i used another cljs compiler before which supported keywords
17:04amalloyuhhhhh...the cljs compiler is happy to support keywords
17:04amalloyit's this function in clojure.browser.dom that doesn't like them
17:04mrhankyi meant the function clj.browser.dom from that compiler :)
17:04mrhanky+from
17:05rovaryea I would think that keywords would be the right thing here..
17:05rovarI wish the github code viewer would do paren matching
17:06mrhankyhum
17:07mrhankyi compared the dom.cljs from my old compiler with the official one, they're the same
17:07rovarso does "li" work?
17:07mrhankyyes
17:08mrhankybut i'm wondering why it does not support li as keyword?
17:09rovarbecause there is no dom/-element defined for keywords. Not sure why, maybe it was an oversight
17:09mrhankybut the two dom.cljs i compared are exact the same, and the "old" one supported keywords
17:10rovaryou could do a quick patch which defines -element for a keyword which converts the word to a string and then calls -element again :)
17:10rovargithub says that hasn't been edited in two years.
17:12mrhankyrovar, https://github.com/kanaka/clojurescript/blob/cljs_in_cljs/src/cljs/clojure/browser/dom.cljs
17:12mrhankythey're exactly the same one
17:13mrhankystrange
17:13rovarthen one of two things are possible: you misremembered, or some external force caused that code to break. perhaps in previous versions of clojurescript keywords were treated as strings..
17:13rovarjust guessing
17:15mrhankyhm..
17:31dnolenmrhanky: I wouldn't use clojure.browser/dom.cljs
17:31mrhankywhat should i use instead?
17:31mrhankyhiccup(s)?
17:32dnolenmrhanky: something that's maintained
17:32mrhankyi see :)
17:32dnolenmrhanky: clojure.browser/dom.cljs was just created for the ClojureScript launch, better alternatives exist
17:33dnolenmrhanky: the reason keywords work in kanaka's fork is that keywords used to be strings, no longer
17:37bitemyapparrdem: doters? I got home early.
17:38seangroveI think I've found bitemyapp's kindred spirit https://news.ycombinator.com/item?id=7008622
17:41arrdemseangrove: haha
17:41arrdembitemyapp: your timing's good...
17:41marcopolo`dnolen: have you looked at pedestal? The more I look into react the more similar they appear
17:42dnolenmarcopolo`: they are many conceptual similarities yes
17:42dnolenmarcopolo`: though pedestal's solution to the front end was very server centric
17:42dnolenmarcopolo`: where React is very client centric
17:42seangrovemarcopolo`: I thought so too, but I think react is a subset
17:43marcopolo`seangrove: react is definetly smaller, and I like that better
17:43marcopolo`more portable
17:43marcopolo`dnolen: server centric?
17:43dnolenmarcopolo`: it doesn't really have a very sophisticated front end story
17:43bitemyapparrdem: mumburs
17:43marcopolo`I was watching a presentation at jsconf eu and they talked about getting react working in a webworker. I thought, hey the pedestal guys did that too!
17:44marcopolo`dnolen: agreed
17:44bitemyappseangrove: not quite, this guy listens to bitchy high school metal. I listen to way better stuff than this.
17:44dnolenmarcopolo`: putting React in a webworker is more an experiment than something practical at this point.
17:44marcopolo`I'm excited to see this design becoming a trend, and I'm really excited for Om
17:44dnolenmarcopolo`: and entirely unnecessary React is plenty fast
17:44bitemyappseangrove: contrast his: http://www.youtube.com/watch?v=JYjIlHWBAVo vs my preferred: http://www.youtube.com/watch?v=aIQgwFcush0
17:45bitemyappseangrove: he's a pleb.
17:45dnolenmarcopolo`: I am to, the history/time travel stuff in Om I think will turn out to be powerful
17:45dnolenmarcopolo`: how to organize applications stills needs work but it looks like quite a few people are diving into Om head first
17:45bitemyappseangrove: I even use a powered amplifier with my headphones when I jam out to metal, it's part of the reason I want to work from home.
17:45dnolenmarcopolo`: despite being pre pre pre alpha
17:46marcopolo`dnolen: yeah, I'm surprised by the attention it's gathered in it's early phase. but I see it as a good sign!
17:46marcopolo`dnolen: and you are working on top of a _slightly_ more mature reactjs
17:46dnolenmarcopolo`: I think it's because even in this early state it's good enough for many applications
17:47dnolenmarcopolo`: I'm curious about how composable Om will turn out to be, delegating components and stuff like that
17:47dnolenmarcopolo`: which are a bit more obvious to do in OO setting, at least for me
17:47dnolenmarcopolo`: yeah React is great, and the people working on it are great/helpful
17:47dnolenmarcopolo`: glad the rendering layer of things is in good hands and we can focus on other problems
17:47bitemyappseangrove: replied.
17:48marcopolo`dnolen: The OO is apparent, but just the good parts at least. Hopefully we can make bigger use of composition :)
17:50marcopolo`I love how many Clojurist are on the #reactjs channel
17:50rovarwhat would be a recommended analog for setTimeout() in java?
17:51eggheadThread.sleep lol
17:51rovarI could sleep in a separate thread and call a fn
17:51rovarbut that sounds quite dreadful
17:51eggheadrovar: use core.async
17:51rovarcore.async has such a thing? I should have guessed.
17:52marcopolo`rovar: it has timeout, which a channel that will close after some time
17:52eggheadreading from a timeout channel will park for the amount of time, same deal as a setTimeout
17:52Cr8https://github.com/overtone/at-at
17:52Cr8which is mostly a wrapper around http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ScheduledThreadPoolExecutor.html
17:53Cr8if you make your own ScheduleThreadPoolExecutor you can just throw regular ol' clojure fns at it, since they're Callable.
17:54rovarnice
17:55marcopolo`So I'm organizing a meetup soon, and I'm looking for ideas of something we can build in about an hour at the meetup
17:56marcopolo`the idea being to show how to build stuff with clojure. Everyone will get a turn programming it with someone helping if they get stuck
17:56marcopolo`My first thought was a scraper, since it's relatively easy. but a bit boring
17:59edwmarcopolo`: I just started playing with core.logic (it had been a while since I'd made it throught the Reasoned Schemer) and I had a lot of fun building a simple dependency manager.
17:59marcopolo`edw: ooo that sounds like fun!
17:59marcopolo`a good example of: can your programming language do this?
17:59edwYeah. Everyone should be able to build their own Make.
18:00edwMaybe do it the functional way first, then the LP way.
18:00marcopolo`yeah, I like it!
18:01marcopolo`thanks
18:01edwAnd then maybe think about how you could model resolved vs unresolved dependencies.
18:01edwAnd building (ordered) plans for resolving them.
18:01edwFun stuff.
18:01edwmarcopolo`: Where is your meetup?
18:02marcopolo`Gainesville, FL
18:03xnilmarcopolo`: when's that?L
18:03marcopolo`xnil: not sure yet, maybe the week after next. Are you in the area?
18:26TimMcmarcopolo`: Ah, my partner's parents live there.
18:26marcopolo`TimMc: If your in town, your welcome to come!
18:28mrhankydnolen, should i also avoid clojure.browser.event ?
18:29dnolenmrhanky: avoid clojure.browser.*
18:30marcopolo`s/your/you're
18:30marcopolo`I'm toying with the idea of making a chrome extension to setup a brepl connection, thoughts?
18:40mrhankyis there a smarter way to make a keyword from two strings than this? (keyword (str "#" name))
18:40bbloommrhanky: define "smarter"
18:41mrhankyi have no idea, but maybe there is another way which is shorter than this?
18:41noonianwell if you're trying to be cute
18:41bbloommrhanky: i dunno, that seems about as short as it possibly could be.... are you doing this so frequently as to need a dramatically shorter way?
18:42bbloommrhanky: also, you shouldn't lead a keyword with a #
18:42mrhankydommy requires this
18:42noonian(apply (comp keyword str) ["#" name])
18:42hyPiRionnoonian: or just ((comp keyword str) "#" name)
18:42nooniandoh
18:43noonianhyPiRion: thanks
18:43bbloom# is an invalid symbol and :# is a arguably an invalid keyword too
18:43mrhankyworks fine for dommy
18:43hyPiRion,:#foo
18:43clojurebot:#foo
18:43bbloom*shrug* # is allowed in symbols and keywords, but definitely can't lead a symbol. i guess it technically works for keywords, but i wouldn't rely on it
18:43noonian,:$foo
18:44clojurebot:$foo
18:44mrhankyno, not using frequently, but as i'm a bloody beginner i'm just wanted to know if there is a shorter way
18:44noonianmrhanky: what you are doing is fine and pretty short
18:44hyPiRionmrhanky: I don't think there's a shorter way without defining some function
18:44noonianyou can always stick it in a helper function and call that so its a single function call
18:44bbloommrhanky: i'd suggest separating your notion of better from your notion of shorter :-)
18:46akurilinIs there a clojurescript channel out there?
18:47bbloomakurilin: there is #clojurescript but i don't think it gets much/any use. just use #clojure
18:47akurilinbbloom: got it.
18:47noonianyeah, no one's responded to anything i've ever said there
18:48akurilinI just wanted to ask people heavily involved in the project about what they think of where the ecosystem is going to go in the next 6-12 months with Om and all that amazing stuff that's pouring out of dnolen.
18:48akurilinMore specfically, are there plans to completely bypass the less OOish frameworks like Angular and have something super functional that works really well with cljs?
18:49akurilinI don't know if cool kids call it FRP these days.
18:49bbloomakurilin: FRP and "reactive" in general is a term that is so poorly understand that i hesitate to use it ever
18:50bbloomakurilin: React.js is a complete misnomer
18:50nooniani'm very interested in om, being the only clojurescript framework out there right now, and i plan on experimenting with using it for mobile development
18:50clojurebotTitim gan éirí ort.
18:50akurilinbbloom: that's fair, I've yet to figure out what it means either.
18:51akurilinnoonian: when you say framework, does that necessarily imply there's a MVC-like structure to it?
18:51arrdemgdev_away: you did mean to make that pharmacy db public, right?
18:52noonianakurilin: om is built on top of reactjs, my understanding is its a way of creating isolated components with one way data binding to your model, so yeah its a form of MVC
18:53noonianI haven't done anything with Om yet, but I am trying to make an app with angular and cljs right now and it's not all that nice having to do a ton of js interop
18:54bbloomMVC is another totally misunderstood acronym that has become essentially useless for conveying an idea
18:55noonianakurilin: here's a blog post on cljs app designs (from before om or reactjs was released): http://keminglabs.com/blog/cljs-app-designs/
18:55noonianthere are also other cljs FRP libraries like Javelin that all have todoMVC implementations
18:55marcopolo`there is pedestal, but it's in a limbo state right now
18:56akurilinnoonian: good link, thanks
18:57nooniannp
19:00akurilinbbloom: is that true though? I think MVC conveys the general idea of separating concerns and decoupling interaction with UI into a few distinct chunks, but fundamentally it doesn't matter if it's Smalltalk MVC, GoF MVC, Rails MVC etc.
19:00akurilinKind of reminds me of REST and how nobody actually does Fielding's REST.
19:01bbloomREST is the most useless of all three of these acronyms :-)
19:01akurilinActually one guy here at the office implemented a full-blown completely data-driven api+client, it's kind of nuts.
19:01bbloomakurilin: react.js' developers sometimes talk about React as the V part of MVC
19:03akurilinbbloom: I guess that part makes sense. I really liked the analogy of the DOM being like a game's frame buffer.
19:04akurilinI'm not super familiar with current rendering logic in browsers, but I imagine doing a jQuery animation of a moving piece of the DOM must be impressively inefficient.
19:15seangroveMakes sure your MVC's can pass as MVP for a HATEOS-inspired REST FRP framework.
19:24akurilinseangrove: wouldn't settle for anything less.
19:37dnolennoonian: React.js is not really an MVC, and Om isn't intended to replace such monstrocities
19:38dnolennonuby: React.js is a DOM rendering engine, Om gives you a sane interaction model over unadorned ClojureScript data
19:38dnolenoops for noonian
19:38noonianbut it does let you map your data onto the dom right?
19:39dnolenakurilin: I have no big plans for Om, but I think big things are possible when you use it.
19:40noonianthats all I meant by calling it a form of MVC, I guess it leaves the M and the C up to the programmer.\
19:41dnolennoonian: I don't think you need an M. You do need C because it nice to be able to represent logical UI components
19:41dnolennoonian: but the basic concept is you don't put data into crap, it's always there for the taking
19:41dnolensnapshottable and restorable
19:43dnolenakurilin: I think one of the biggest benefits of something like Om is development, being able to VCR the app state while developing live w/ a REPL will be I think a very interesting combo.
19:43noonianyeah, i kind of think of the data as the model
19:43dnolenakurilin: what stinks about traditional REPL is losing state
19:44seangrovednolen: I like the idea of storing app state, and then on an error, reporting the vcr-state to a server along with the exception
19:44seangroveIn effect, creating an automatic repro case for debugging and automated tests
19:44seangroveThat could hugely simplify development and debugging production apps
19:44akurilinThat's pretty great.
19:47dnolenseangrove: yeah also I also rewinding and modifying something in the past and propagating it forward could it also be useful
19:54akurilinSo will I be able to avoid having to learn Angular if I jump on the Om train in a few months? :)
19:55seangroveakurilin: Possibly. Probably no one will force you either way
19:55seakoyou can avoid learning anything you want
19:55noonianthat probably depends on who you work with and whether or not they are using angular :P
19:56akurilinseangrove: reason why I ask is that I want to start using CLJS at some point but I remember dnolen telling me that it's a pretty poor for Backbone which most of our web apps are on right now.
19:56akurilin*fit
19:57akurilinHeavy OO and all.
19:57dnolenakurilin: yeah
19:57seangroveYeah, I don't know much about using it with Backbone. I'm certainly more in the react/pedestal camp
19:57dnolenakurilin: another reason I dived on Om, much less of mismatch, lets data structures shine
19:57dnolenno more clj->js crap
19:57akurilinAnd I don't want to blow a few months on Angular if the CLJS people are going to put out something better anyway.
19:58akurilinNo pressure there, dnolen ;)
19:58dnolenakurilin: I think React model is superior to Angular, and Angular is a big dependency
19:58seangrovednolen: Yeah, the interop side is pretty painful in terms of perf hit, so it's nice to be able to stay in cljs-land
19:59seangroveakurilin: It's a good idea to play with angular anyway, at least to see how they approach building things
19:59seangroveThough I might recommend pedestal before that
20:00akurilinI think the more minimalistic, the more palatable it'd be to the clj crowd. Pedestal looked like a pretty complete solution when I looked at it a few months ago.
20:01akurilinseangrove: but good suggestion on checking out Angular, will put it on my list
20:04seangrovePedestal is surprisingly encompassing, but it has some great ideas
20:04seangroveVery much worth understanding
20:04seangroveAngular is a ton of work to pick up
20:07akurilinGood to know, will keep that in mind.
20:15dubsgWhat is pedestal, competing http framework to compojure? Or comething different?
20:16seangrovedubsg: Considerably more encompassing
20:17dubsgI see, I'm just starting to pick up clojure as a scala dev... I'll have to look into it.
20:17seangrovehttp://pedestal.io/
20:17seangroveProbably not a good place to start, honestly
20:17seangroveIt does things pretty differently
20:30RaynesCompete! Bah!
20:30RaynesNobody competes in the Clojure community.
20:30RaynesWe merely write new things and give each other hugs.
20:32rhg135Raynes, otherwise you get epatents etc.
20:40jtoyhow can I have this return 0? (get {:var nil} :var 0)
20:41gfredericks,(or (get {:var nil} :var) 0)
20:41clojurebot0
20:42jtoyshould have though of that, thx
20:43amalloy,((fnil identity 0) (get {:var nil} :var)) ; genius-level use of fnil
20:43clojurebot0
20:54rhg135,(doc fnil)
20:54clojurebot"([f x] [f x y] [f x y z]); Takes a function f, and returns a function that calls f, replacing a nil first argument to f with the supplied value x. Higher arity versions can replace arguments in the second and third positions (y, z). Note that the function f can take any number of arguments, not just the one(s) being nil-patched."
20:54rhg135Ic
20:59amalloyseriously though don't use fnil for that
21:04marcopolo`is there a select-keys for coll indices?
21:09gfredericksmarcopolo`: if it's a vector you can use map
21:09gfredericks,(map [7 8 9 10 11 12] [1 3 5])
21:09clojurebot(8 10 12)
21:09marcopolo`nice, thanks
21:17MackyLooking for additional clojure libraries for Linear Programming - Simplex Algorithm, other than levand/prolin
21:22lsdafjklsd,(doc cond->)
21:22clojurebot"([expr & clauses]); Takes an expression and a set of test/form pairs. Threads expr (via ->) through each form for which the corresponding test expression is true. Note that, unlike cond branching, cond-> threading does not short circuit after the first true test expression."
21:24lsdafjklsd,(def chars (into [] "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"))
21:24clojurebot#<CompilerException java.lang.SecurityException: denied, compiling:(NO_SOURCE_PATH:0:0)>
21:27lsdafjklsdbbloom: Hey man, I work building a web app using Ember but in my free time enjoy developing with clojure and recently om. I'm still interested in seeing how the big picture fits together, like layout management, and url support as far as clojure app goes
21:28lsdafjklsdbbloom: developing client side apps in cljs feels like backbone again, where I don't know how to organize my stuff in a way that is maintainable. Interested in learning the macro techniques of app development, versus the micro bottom up approach
21:29lsdafjklsdbbloom: no idea why I just singled you out haha, saw your previous convo and have been wanting to say the above stuff to someone
21:30mischanixIs there a better way to do this?
21:30mischanix,(let [subsets '(() ({:id 1}) ({:id 2}) ({:id 1} {:id 2}))] (map #(set (map vector (repeat :id) (map :id %))) subsets))
21:30clojurebot(#{} #{[:id 1]} #{[:id 2]} #{[:id 1] [:id 2]})
21:31mischanixfor use with some
21:34dnolenlsdafjklsd: organize your code around the data, use namespaces for logical grouping
21:35lsdafjklsddnolen: ok, so is your strategy to contain all state to an `app-state` atom?
21:35dnolenlsdafjklsd: I think client side routing is goofy
21:35dnolenlsdafjklsd: in the Om model the whole Google Wave like push state thing is trivial
21:36dnolenlsdafjklsd: think of app-state more like a client side database
21:36lsdafjklsddnolen: ok, that make's sense
21:37dnolenlsdafjklsd: this part of Om is not fully baked yet, but in the future I think app-state will be pretty flat
21:37lsdafjklsddnolen: so I was working on routing with just secretary, and I couldn't really come up with a great way to render pages
21:37lsdafjklsddnolen: it felt bad to store :current-page "login" in my app-state
21:37dnolenlsdafjklsd: I don't expect serious apps to use deeply nested structures
21:38lsdafjklsddnolen: with a long cond rendering different components based on that
21:38dnolenlsdafjklsd: don't be afraid to put that stuff in your component local state via om/set-state! om/get-state if it makes sense.
21:38lsdafjklsddnolen: yea
21:39dnolenlsdafjklsd: multimethods work, also you can push down the renders via opts
21:39dnolener, I mean the component rendering fns
21:39dnolenlsdafjklsd: if you've got conds, something is not right
21:39lsdafjklsddnolen: ok yea
21:40lsdafjklsddnolen: it seemed really bad, and I was frusterated at how bad I was designing things hah
21:40dnolenlsdafjklsd: Om is naturally going to be conservative, Clojure brings serious firepower to the table
21:40lsdafjklsddnolen: this im learning
21:40ambrosebsis there a flag to disable all inlining in the JVM compiler?
21:41lsdafjklsddnolen: what about complex nested layouts?
21:42lsdafjklsddnolen: how do I render into another component
21:42lsdafjklsddnolen: if I have a component that is an app shell, with a header sidebar footer, and I want to render into the 'main' section
21:42dnolenlsdafjklsd: like parameterized rendering right?
21:43dnolenlsdafjklsd: just pass the rendering functions via opts
21:43dnolenlsdafjklsd: https://github.com/swannodette/om/blob/sortable/examples/sortable/core.cljs
21:43dnolenlsdafjklsd: wip, but see how sortable can render any view because it takes it as a option
21:43lsdafjklsddnolen: ok
21:44apiologyambrosebs: I've never used the options, but I see -XX:InlineSmallCode, -XX:MaxInlineSize and -XX:FreqInlineSize: http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html
21:44ambrosebsapiology: ah I meant the :inline metadata on vars
21:45ambrosebsapiology: thanks anyway, that's interesting
21:45mischanixDoes what I did above look sane to someone?
21:46lsdafjklsddnolen: is there literature you can recommend about ui development that would be relevent. You said on twitter "not doing anything UI devs haven't already been doing". I'm sure what we are doing is analogous to stuff that has always been done, I'm just not aware
21:47lsdafjklsddnolen: I just do MVC development, I've never built a game... and previously most clojure apps seemed to implement the render loop strategy
21:47dnolenlsdafjklsd: there's not a lot of good stuff out there, there have been weak attempts to break out of the OO approaches towards UIs
21:47DomKMHas anyone here used Garden (https://github.com/noprompt/garden) extensively? What did you think of it?
21:47dnolenlsdafjklsd: none of them went anywhere, but also not a lot of people were thinking/working on the problem
21:48dnolenlsdafjklsd: honestly until I saw React I was skeptical a mostly FP approach to UI could actually work :P
21:48dnolenlsdafjklsd: so you're on the cutting edge here :)
21:48lsdafjklsddnolen: yea it's fun
21:49lsdafjklsddnolen: you're a smart guy, I'll just follow what you recommend haha
21:49dnolenlsdafjklsd: for me the big idea is that FP gives us time travel, I think most of the organizational principles can be drawn from OO.
21:50lsdafjklsddnolen: which is huge for applications
21:50dnolenlsdafjklsd: my main complaint with Ember and other systems is that they reify every little pattern and concept into an Object
21:50dnolenlsdafjklsd: it's tiresome
21:50seangroveShould `lein with-profile jenkins test :all` load the test profile at all?
21:50seangroveI would expect not, but it seems to be, and the test profile is overwriting some important jenkins-specific profile info
21:51dnolenlsdafjklsd: but I think taking the Ember model and saying what's a simple functional version of this that doesn't need a name
21:51dnolenlsdafjklsd: is a good approach
21:52lsdafjklsddnolen: yea, I've been drawing on that for sure. I'm still learning the fp ropes so I have doubts in my implementations... and I'll drop routing for a while, that was a rabbit hole of no productivity
21:53petehuntbbloom: yt?
21:53lsdafjklsddnolen: do you have any other good ideas for little apps to build?
21:53dnolenlsdafjklsd: try something that can take advantage of history, that'll be really eye opening
21:53petehuntor... anyone who knows something about datomic?
21:53dnolenlsdafjklsd: like do something speculative, update the user interface, fail, restore old snapshot
21:53lsdafjklsddnolen: k
21:54dnolenlsdafjklsd: that type of thing in Om is so easy and mind blowingly cool
21:54dnolen lsdafjklsd: also ClojureScript comes with clojure.data so you can do diffing trivially over two app states
21:54dnolenlsdafjklsd: it will give you the delta
21:56lsdafjklsddnolen: ah cool, didn't know clojure.data existed until now
21:56dnolenlsdafjklsd: useful if you want to manage what type of changes you want to record or ignore
21:56lsdafjklsddnolen: yea
21:56dnolenpetehunt: quite a few people, I'm no expect, but ask away.
21:56dnolenpetehunt: there's a friendly datomic channel too
21:57dnolens/expect/expert
21:57petehuntdnolen: i watched a rich hickey video on the design decisions. you're probably a good person for me to ask because you have the context for the world i inhabit :)
21:57dnolenpetehunt: go for it
21:57petehuntdnolen: what i am wondering is: why does it have transactions?
21:57dnolenpetehunt: vs what?
21:58petehuntit seems to me that if you have a fully normalized data store (basically an append-only log of everything that ever happened) you would never need transactions since you'd never have any duplicated data
21:58petehunti know that datomic works by adding and retracting facts, but i'm wondering why they didn't go with that sort of approach
21:58eggheadthey allow consistency & provide a reference to every change
21:58dnolenpetehunt: datomic isn't append only. It's ACID database built on 1000+ ways persistent data structure
21:59petehuntdnolen: right
21:59petehuntbut wondering why they didn't take that approach
21:59eggheadit is append only in the sense that the transaction ids increment, but you can say for instance 'alice lives in the us'
22:00petehuntlike in react we never have synchronization problems because there is only 1 canonical piece of state and everything is computed off of that
22:00petehuntand we use lazy eval and memoization to get the perf we need
22:00petehuntthe canonical example for transactions is bank account transfers, where you need to atomically write 2 account balances when you do a transfer
22:01petehunti'm wondering why we don't just keep an append only log of "transaction of $X from A to B"
22:01dnolenpetehunt: lots of downsides
22:01dnolenpetehunt: in Datomic you can load the database at any point in time
22:01eggheadwhy not just think of the transactions as the method of appending?
22:02dnolenpetehunt: if you base everything on storing transitions you have to reconstruct, queries get more complicated slower
22:02petehuntas opposed to the append-only log approach, which would require you to rollup from the last snapshot/compaction
22:02dnolenpetehunt: this is all stuff I'm trying to avoid in the way that Om uses React BTW
22:03petehuntright, i seem to remember seeing a twitter debate about command pattern vs persistent datastructures
22:03dnolenpetehunt: we don't store deltas, and persistent data structure let us jump around in the timeline efficiently
22:03dnolenpetehunt: and we can compute delta efficiently if we need them because ...
22:03dnolenpersistent data structures
22:03petehuntthat is nice.
22:04petehunti'll have to mull this over some more
22:04petehuntbtw, does datomic actually work? :)
22:05dnolenpetehunt: yeah, there are people doing some very serious work w/ it
22:05petehuntdnolen: do you know what backing store they're using?
22:05dnolenpetehunt: seems popular with financial companies in NYC
22:06lsdafjklsddnolen: whaaat. do you know how they are using it?
22:06eggheadstill waiting for aphyr jepsen of datomic
22:06seangroveegghead: Heh, would be interesting
22:06dnolenpetehunt: Riak seems popular, and I think for some people DynamoDB when perf is critical
22:06seangrovepetehunt: I believe bitemyapp uses the postgres backend, it's what we're looking at as well
22:06petehunti see
22:06dnolenpetehunt: also PostgreSQL because that's what people use
22:07petehuntinstagram included :)
22:07dnolenpetehunt: I've never used Datomic seriously, but I love the query language, http://www.learndatalogtoday.org
22:07dnolenis a rad tutorial
22:09petehuntyeah bbloom told me to look at it
22:09petehuntseems pretty sweet
22:09petehunti still have a dream of a fully normalized, performant data store though :)
22:09petehuntbut maybe that's just sugar on top of datomic
22:14TEttinger3lnostdal, did you figure out your issue from... 16 hours ago?