#clojure logs

2014-09-10

00:48rpaulo \
00:51rpaulooops
01:07jyu1hello, a question about the compiler, for example (concat 1 [2]), it will raise an exception indicating 1 is not a iseq after evalution in the repl, looks to me, it will go through compiler.eval, but I cannot catch that exception in the eval method.
01:08jyu1I am not sure if I miss something, anybody can help me understand the chain of invocation for the expression?
01:13ncthom91hey all. I'm working on a clojurescript project, and I want to test the clojure functions I write, but I can't figure out the directory structure
01:14amalloyjyu1: (concat 1 [2]) immediately (and successfully) returns a lazy seq, without ever "looking at" 1 or [2]. when you ask for the first item in that seq (eg by trying to print it at the repl), it explodes because 1 isn't a sequence
01:15noonianncthom91: you will need to have :source-paths in your cljsbuild settings with the directories containing cljs and clj code
01:15amalloythus, (try (concat ...)) doesn't throw an exception; by the time you try to print it, you're no longer inside the try/catch scope
01:15ncthom91noonian thanks, I do, I believe :P
01:16noonianthe directory structure from those named directories should be my_lib/core.clj for a clj(s) ns my-lib.core
01:16ncthom91yep, got that much
01:16ncthom91then i have ./test/my_lib/test.clj
01:16ncthom91(where . is the root of my project directory)
01:17noonianyou may have to have the test directory in cljsbuild's source paths
01:17ncthom91noonian even if I'm just using the normal `lein test` for my testing?
01:18noonianare the tests clojure or clojurescript code?
01:18ncthom91noonian i guess they'll probably be clojurescript
01:18ncthom91so I suppose I'll have to compile them before I test
01:19ncthom91noonian maybe I should just use a js testing framework? is that the common wisdom?
01:19nooniani actually haven't done much testing, but i think you need to add the clojurescript test lib to dev dependencies also
01:19noonianhttps://github.com/cemerick/clojurescript.test
01:19nooniani mean much testing in clojurescript :P
01:22jyu1@amalloy thanks
01:22noonianncthom91: sorry, i'm a few beers in tonight as well hehe; i might not be much help
01:22ncthom91noonian heh no worries. You + a few beers = definitely more knowledgeable than I am
01:23jyu1amalloy: I add a catch clause with additional msg in the compiler.eval in the end, when I call (concat 1 [2]) , the additional msg will not shown, but (print (concat 1 [2]) does
01:24noonianncthom91: i'd take a look at the clojurescript test readme, and it wont hurt anything to have the test dir in your :source-paths
01:26noonianyou could add a leiningen alias that calls cemerick.cljs.test/test-ns on your test nss also, i'm not sure how integrated clojurescript.test is with leiningen
01:29ncthom91noonian this looks like the key: https://github.com/emezeske/lein-cljsbuild/blob/1.0.3/example-projects/advanced/project.clj#L71
01:30jyu1amalloy: looks (concat 1 [2]) does not call the compiler.eval but (print (concat 1 [2]) does
01:32noonianncthom91: the :test profile will be active during cljsbuilds :test-commands i'm sure, but i think that is just telling cljsbuild where to output the js file so that the phantomjs html file can reference it
01:33ncthom91noonian well i have to build it before i test it, no?
01:36noonianncthom91: i'm not sure, but at least if you need to test in a browser context. i think i'm probably doing more harm than good at this point though so i'm going to wish you good luck and pass out :p
01:38dorkmafiais there a way to define globals in clojure?
01:40ivandorkmafia: any (def) in a namespace?
01:42jlongsterwhat does it mean when a vector is in the call position? https://github.com/clojure/clojurescript/blob/master/src/cljs/clojure/core/reducers.cljs#L71
01:43seangroveJust lookup
01:43seangrove,([0 0 1 1 2] 3)
01:43clojurebot1
01:44ncthom91hey guys, how do I import a namespace to get all of its functions?
01:44ncthom91something like https://github.com/emezeske/lein-cljsbuild/blob/1.0.3/example-projects/advanced/test-cljs/example/test/hello.cljs#L2
01:44ncthom91except I don't want to list everythin I need in the :only definition
01:44ncthom91rather just get it all by default
01:44jlongsterseangrove: oh. that code calls it with an object (?) instance though? I don't understand that
01:44jlongsterit almost looks like that's a different way to define functions
01:45jlongstercoll & cf are the arguments
01:45seangroveOh, sorry
01:45seangroveThat's just a way of defining different arities
01:45seangroveAlso that's how you get a docstring for a fn
01:46seangroveA tiny bit strange
01:46jlongsterseangrove: oh, I see. forgot about the multiple arities
01:46jlongsterseangrove: thanks. obviously have never quite sharpened my Clojure familiarity.
01:47seangrovejlongster: Ever done much Haskell/OCaml? Been diving into it alongside Glint recently
01:47seangroveThe "Let's build a browser engine engine in Haskell pt 2." was pretty cool to see the code compared to Rust
01:48jlongsterseangrove: not much, but familiar with all the concepts. careful, don't get sucked in too much :)
01:48jlongsterwhich article was that? didn't see that one
01:48jlongsterI'd play with Rust first because it maps well with what I'd do with it: games
01:49seangrovehttp://hrothen.github.io/2014/09/08/lets-build-a-browser-engine-in-haskell-part-2/
01:49seangroveWhy the warning about getting sucked in - experience? :)
01:50jlongsterseangrove: nah, but I know several people that once they started using good type systems, couldn't turn back
01:50jlongsterdefinitely worth getting to know though
01:51seangroveHeh, fair enough
01:53jyu1...
01:55jyu1will the repl generate classes in memory after evaluting forms?
02:00amalloyjyu1: of course. the only way to run any code on the jvm is to have it live in a class
02:03jyu1amalloy: so my understanding is wrong, the expression just call the expr's eval method instead of invoking the method of emitted classes in the repl env.
02:04jyu1go to look the code again.
02:04jyu1come back later
02:04jyu1thanks
02:05amalloycalling .eval on an expression is not the "common case" for evaluating code. i don't totally understand when it's used, but almost all of the time the compile/run cycle is chosen instead
02:46dorkmafiawhat's the difference between [^String] and [#^String] ?
02:47sm0kenew vs old notation i guess
02:48dorkmafiaoh ok
03:22snowstalkerWhat is the best way to figure out the source of randomly new log messages in my clojure project, e.g. http://paste.lisp.org/+32UT
03:24hiredmanthe class name is in the log message
03:26snowstalkerhiredman: Yes, but I'm not using the class name anywhere in my code, so is there a way to grep the source code of all the (lots of) dependencies listed in my project.clj ...
03:40sm0keyou can do ##(bean clojure.lang.Keyword)
03:40lazybotjava.security.AccessControlException: access denied ("java.lang.RuntimePermission" "getProtectionDomain")
03:41sm0kewhich which give you location of jar for the class
03:46piranhais there a shorter way than (ns ... (:require [my.prefix [one :as one] [two :as two]]))? I.e. at least shorten the prefix maybe...
03:46TEttinger,(bean clojure.lang.Keyword)
03:46clojurebot{:enum false, :interfaces #<Class[] [Ljava.lang.Class;@3e4d49>, :declaredConstructors #<Constructor[] [Ljava.lang.reflect.Constructor;@876d42>, :simpleName "Keyword", :package #<Package package clojure.lang>, ...}
03:49sm0ke,(keys (bean clojure.lang.Keyword))
03:49clojurebot(:enum :interfaces :declaredConstructors :simpleName :package ...)
03:50jyu1 clojurebot: (: 1)
03:50jyu1(concat [1] [2])
03:50sm0ke,(:protectionDomain (bean clojure.lang.Keyword))
03:50clojurebot#<InvocationTargetException java.lang.reflect.InvocationTargetException>
03:51TEttingerjyu1: you can eval code by starting with a comma, like
03:51TEttinger,(concat [1] [2])
03:51clojurebot(1 2)
03:51jyu1,(thanks)
03:51jyu1,(thanks)
03:51clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: thanks in this context, compiling:(NO_SOURCE_PATH:0:0)>
03:51jyu1,(print 'a)
03:51clojurebota
03:52TEttingerthat's a different comma! I'm wondering what that is
03:52TEttinger,(int \,)
03:52clojurebot65292
03:52sm0ke,(-> clojure.lang.Atom .getProtectionDomain .getCodeSource ; .getLocation .getPath)
03:52clojurebot#<RuntimeException java.lang.RuntimeException: EOF while reading>
03:52sm0ke,(-> clojure.lang.Atom .getProtectionDomain .getCodeSource .getLocation .getPath)
03:52clojurebot#<AccessControlException java.security.AccessControlException: access denied (java.lang.RuntimePermission getProtectionDomain)>
03:53jyu1(concat 2 [2])
03:53jyu1,(concat 2 [2])
03:53clojurebot#<IllegalArgumentException java.lang.IllegalArgumentException: Don't know how to create ISeq from: java.lang.Long>
03:53TEttinger,(doc concat)
03:53clojurebot"([] [x] [x y] [x y & zs]); Returns a lazy seq representing the concatenation of the elements in the supplied colls."
03:53sm0kesolid sandboxing
03:53jyu1,(concat [2] [3])
03:53clojurebot(2 3)
03:54TEttinger,(conj [1 2 3] 4)
03:54clojurebot[1 2 3 4]
03:54jyu1TEttinger: are you familiar with clojure compiler?
03:55TEttingernot the internals, no, but I know how to write clojure
03:57jyu1how do you deal with the un-friendly error message from clojure? do not tell me the line and column, it is not effective.
03:58TEttingermostly experience with similar messages in earlier code.
03:59TEttingerNullPointerException means something is nil where it shouldn't be, and usually you're trying to call it like it's an object.
04:00TEttingerStackOverflowException means you have an infinite loop, usually, though freezing with no exception can also be that.
04:01TEttingerreader errors usually mean the parentheses don't match, like (+ 1 (/ 4 3)
04:01TEttingerthere's common errors with Long and ISeq mixups when you try to call something like map or reduce that needs a collection, and you give it a number
04:03TEttingerjyu1, Typed Clojure fixes some of this by adding extra things that can be verified before your program runs
04:03jyu1:)have you tried?
04:03TEttingerthat's one of the main motivations for making Typed Clojure, the better error messages. I haven't needed typed clojure though
04:07jyu1what editor are you using, I am using cursive
04:18TEttingerjyu1, I haven't written a large clojure program in a while, last I used was nightcode
04:25TEttingerMorgawr: are you still working on Cloister?
04:35lvhhm
04:36lvhhttp://grimoire.arrdem.com/1.6.0/clojure.core/fn/ insists that fn is a macro; but I thought it was a special form
04:36opqdonutsee the source
04:36opqdonutit's a wrapper for the fn* special form
04:36hyPiRionlvh: fn is a macro, fn* is a spcial
04:38opqdonutthe wrapper handles e.g. pre and post conditions
04:40cflemingThe wrapper also handles destructuring - let is similar
05:23piranhawhat's the best way to mock my db connection?
05:24hyPiRionfor testing?
05:25hyPiRionusually I'd use with-redefs
05:26piranhahyPiRion: do you do with-redefs in each deftest separately?
05:27piranhahm, I also wonder what do you set it to? To some memory database?
05:27piranhathat's the first time I'm writing tests for db-backend clojure application, sorry :)
05:27piranhaI wonder if better way would be having :dynamic function to execute a query
05:28piranhaso I won't need to have a database at all and could just mock responses...
05:29hyPiRionpiranha: I'd usually load a clojure map, then use fixtures for the with-redef, and let the queries and such be things on the map itself
05:30piranhahyPiRion: hm, do you have an example? Not sure I understand correctly...
05:30piranhaI would even say 'not sure I understand that' :)
05:30hyPiRionThis very much depends on the tests you are creating though. It's not that easy for SQL databases for instance
05:30piranhayeah, I use pgsql
05:30hyPiRionpiranha: gimme a sec, I'll make one
05:30piranhathanks!
05:33TEttinger(inc hyPiRion)
05:33lazybot⇒ 45
05:35piranhaTEttinger: inc is like an upvote?
05:36TEttinger$karma TEttinger
05:36lazybotTEttinger has karma 21.
05:36TEttinger$karma technikhil
05:36lazybottechnikhil has karma 0.
05:36TEttinger$karma technomancy
05:36lazybottechnomancy has karma 134.
05:36TEttingerhyPiRion is doing pretty well
05:36TEttinger$karma so
05:36lazybotso has karma -33.
05:37TEttingersomeone used that nick and it messed up highlighting since it was a common word
05:37technikhil$karma lazybot
05:37lazybotlazybot has karma 29.
05:38piranha$karma piranha
05:38lazybotpiranha has karma 0.
05:38piranhaobviously
05:38TEttinger(inc piranha) ; for wanting to know more
05:38lazybot⇒ 1
05:38piranha:))
05:39snowstalkerhiredman: sm0ke Finally figured which library did it by running `ps | fgrep -i java` to get the CLASSPATH directories list and then going through each jar file whether it contains the PluginProxyUtil class, and figured out the jets3t library is using it, googling finally led me to http://www.jets3t.org/toolkit/configuration.html and adding a
05:39snowstalkerjets3t.properties file with `httpclient.proxy-autodetect=false` in the resources directory solved the problem :)
05:41H4nshi. how would i express javax.xml.validation.SchemaFactory.class.getName() in clojure?
05:42TEttinger,(.getName javax.xml.validation.SchemaFactory/class)
05:42clojurebot#<CompilerException java.lang.RuntimeException: Unable to find static field: class in class javax.xml.validation.SchemaFactory, compiling:(NO_SOURCE_PATH:0:0)>
05:43TEttinger,(.getName (.class javax.xml.validation.SchemaFactory))
05:43clojurebot#<IllegalArgumentException java.lang.IllegalArgumentException: No matching field found: class for class java.lang.Class>
05:43TEttingeroh!
05:43H4nsi suppose that something very javaesque is going on there.
05:43TEttinger,(.getName javax.xml.validation.SchemaFactory)
05:43clojurebot"javax.xml.validation.SchemaFactory"
05:43H4nsah. that looks good. but why?
05:44TEttingeryou don't need the .class since javax.xml.validation.SchemaFactory is already a literal for a type of class
05:44H4nsah, ok, understood. thanks!
05:46hyPiRionpiranha: https://www.refheap.com/90048
05:46H4nsi hate it that almost everything that i try in clojure just works. i mean, where is the struggle? i need to procrastinate even more so that i don't appear to be too productive.
05:49notostraca(inc H4ns)
05:49lazybot⇒ 2
05:50hyPiRionpiranha: That one should be a fully working clojure test. I tried to include comments, as it's a bit long.
05:50hyPiRionwell, long in the sense of not being 2 lines.
05:50piranhasure :)
05:51piranhaI see
05:52piranhahyPiRion: I was too lazy to create functions which take db as a first parameter, so it's global in my app
05:52piranha%)
05:52piranhawhich sucks, but makes it faster to develop... I guess I'll try working with with-redefs-fn
05:52hyPiRionpiranha: that works as well. If it's a dynamic variable, you can just use binding
05:53piranhawell my url of a database is a dynamic variable
05:53hyPiRionah
05:53piranhabut that means I'll need to use some in memory database for that to work
05:53piranhaplus probably it won't work exactly like pgsql
05:53piranhawhich sucks :\
05:53hyPiRionright
05:54piranhanow I'm trying to decide if I need to redef my low-level functions (like query/execute) or higher-level (create-user/get-session/etc)
05:54piranhaI probably don't need to test them, so it's going to be ok... I hope
05:55hyPiRionright
05:55hyPiRionIf you really want to test the database properly, I think there's no way around working against an actual postgres db
05:56piranhahyPiRion: thanks for the example :)
05:56piranhayeah I guess so
05:56piranhaso it's better to just test api to have fast tests
05:56hyPiRionyou're welcome
05:56piranha(inc hyPiRion) ; I guess :)
05:56lazybot⇒ 1
05:56piranhawoah what
05:57piranhawhy 1?
05:57hyPiRion$karma hyPiRion) ; I guess :
05:57lazybothyPiRion) has karma 0.
05:57hyPiRionhrm
05:57piranhaI'm not sure I understand
05:57piranhawhy did it take closing bracket as a part of a name?
05:57hyPiRionpiranha: lazybot is not exactly bulletproof
05:58piranha:)
05:58piranha(inc hyPiRion)
05:58lazybot⇒ 46
05:58piranhahm
05:58piranha$karma piranha
05:58lazybotpiranha has karma 1.
05:58piranha$karma piranha)
05:58lazybotpiranha) has karma 0.
05:58piranha$karma hyPiRion)
05:58lazybothyPiRion) has karma 0.
05:58piranha$karma hyPiRion) ; test
05:58lazybothyPiRion) has karma 0.
05:58piranhaah!
05:58piranhadamn, I understand it now
05:58piranhait's been my smiley
06:00hyPiRionhttps://github.com/Raynes/lazybot/blob/master/src/lazybot/plugins/karma.clj#L69 <- I guess that regex is broken
06:01piranhahyPiRion: I think it needs ? right after \)
06:01piranhaor [^)]+ instead of .+
06:01piranhaignore first message plz :)
06:03hyPiRionamalloy_: your karma regex isn't working properly, go fix
06:04TEttinger$karma hyPiRion) ; I guess :
06:04lazybothyPiRion) has karma 0.
06:05TEttinger#"^\((inc|dec|identity) (.+?)\)(\s*;.*)?$" ; should work
06:06hyPiRionooh
06:06hyPiRion(identity hyPiRion) ; I guess :)
06:06lazybothyPiRion) ; I guess : has karma 1.
06:06hyPiRionthere you go
06:06TEttinger,(re-find "(inc hyPiRion) ; I guess :)" #"^\((inc|dec|identity) (.+?)\)(\s*;.*)?$")
06:06clojurebot#<ClassCastException java.lang.ClassCastException: java.lang.String cannot be cast to java.util.regex.Pattern>
06:06TEttinger,(re-find #"^\((inc|dec|identity) (.+?)\)(\s*;.*)?$" "(inc hyPiRion) ; I guess :)")
06:06clojurebot["(inc hyPiRion) ; I guess :)" "inc" "hyPiRion" " ; I guess :)"]
06:08hyPiRionso much highlighting
06:17piranhaI actually wonder if I should start using component or something similar
06:36visofhi
06:37visofcan map over a tree which give me another tree?
06:39clgvvisof: you want something like the functions in "clojure.walk"
07:20haksiorhi there. i'm trying to play a bit with testing of compojure app using emacs/cider. having newly generated app (lein new compojure-app hello-world) and tests of handler.clj I'm getting "Wrong type argument: listp, "test-app" hitting C-c , (run tests for namespace). Any clue why?
07:24clgvhaksior: looks like the emacs side since clojure has no "listp" so it's probably cider
07:24clgvor any other emacs plugin that intervenes
07:36jcromartiehow can I easily see the order in which namespaces are loaded?
07:36jcromartiewithout adding (println "loading" *ns*) to every file...
07:36clgvjcromartie: require has an iption
07:37clgv,(doc require)
07:37clojurebot"([& args]); Loads libs, skipping any that are already loaded. Each argument is either a libspec that identifies a lib, a prefix list that identifies multiple libs whose names share a common prefix, or a flag that modifies how all the identified libs are loaded. Use :require in the ns macro in preference to calling this directly. Libs A 'lib' is a named set of resources in classpath whose contents...
07:37clgv&(doc require)
07:37lazybot⇒ "([& args]); Loads libs, skipping any that are already loaded. Each argument is either a libspec that identifies a lib, a prefix list that identifies multiple libs whose names share a common prefix, or a flag that modifies how all the identified libs are loaded. Use ... https://www.refheap.com/90052
07:37clgvjcromartie: (require 'my-parent.ns :verbose)
07:37jcromartieexcellent
07:38jcromartiethanks
07:38jcromartiegotta work around all of the Leiningen loading stuff too...
07:39jcromartie:repl-options, :main, :aot
07:39clgvyou want to use this on "lein repl" or "lein run"?
07:39clgvjcromartie: you can bind *loading-verbosely* to true in your project.clj
07:40jcromartieah ha
07:40clgvjcromartie: :global-vars {*loading-verbosely* true}
07:41clgvI am not sure if it works with "lein run" but "lein repl" is supposed to work with that config
07:43jcromartiethis is basically undocumented?
07:44lnostdalhi guys, anyone had any experience running clojure on arm? e.g. chromebook and similar? ..i'm asking because i'm considering an energy-efficient laptop / ultrabook while traveling
07:44clgvjcromartie: what exactly?
07:46clgvjcromartie: :verbose is document in `require`, *loading--verbosely* is not really documented in connection. :global-vars is documented in leiningen's sample project.clj - so the bits are mostly documented in their places, but your entire use case is not documented afaik - capture it in a blog post :)
07:47jcromartieit's hard to find any documentation about *loading-verbosely*
07:47jcromartieseems more like it's bound to true by the system, not for users to bind
07:47jcromartiehttp://www.clodoc.org/doc/clojure.core/*loading-verbosely*
07:47jcromartiebut I could be wrong
07:48clgvoh right it is private and thus an implementation detail...
07:48jcromartieso this is weird
07:48clgvthat's probably an error with respect to tooling
07:49clgvyou can trick it via :global-vars {#'clojure.core/*loading-verbosely* true}
07:49jcromartieI've removed the :main, :aot, and :repl-options from my project.clj but it is still loading code from source when I run lein repl
07:49jcromartiehm I see
07:49jcromartieare there any other things that could trigger loading code in "lein repl" ?
07:49jcromartieoh
07:50jcromartieI do have a "user" ns
07:50jcromartiein one of my source directories
07:50clgvuser.clj?
07:50clgvyeah that might be the reason, I never tried but I think there is a convention that a user.clj is loaded on repl startup
07:53piranhahm
07:54piranhaanybody here ever used pgsql jdbc driver to pass arrays to postgresql?
07:54piranhaI understand that I need to extend vector with jdbc/ISQLValue protocol
07:54piranhabut then it seems pgsql driver wants me to use conn.createArrayOf(type, java-array) to create an array
07:54piranhaand I don't have connection there
07:56mikkerAny good examples of open source compojure apps that implement some kind of authentication?
07:57mikkerI'm looking for some inspiration
08:05AeroNotixWhen I am in a lein repl instance of a project through CIDER. How would I add a new dependency to the project without needing to restart the repl?
08:06clgvAeroNotix: pomegranate (or another similar lib whose name I forgot)
08:06AeroNotixclgv: thought so
08:06clgvmikker: we used friend
08:07r4viAeroNotix: alembic
08:08mikkerclgv: yea, saw that. Though I'd do something simpler myself
08:08mikkerJust to get to know clojure better along the way
08:11clgvmikker: ah you only asked for learning purposes
08:12mikkerLearning and eventually using :)
08:12mikkerI'm reading up on friend now. Can't hurt.
08:12clgvmikker: we have it in 2 non-public projects for form-based authentication
08:44clgvdid anyone try to just use the warm-up functionality of "criterium"?
11:07magopiani'm trying to understand https://github.com/clojure/core.async/blob/master/examples/walkthrough.clj#L57
11:07magopianwhat is the use for the go block here, as we're anyway using <!! ?
11:08magopiancouldn't we just do (assert (= "hello" (<!! c))) ?
11:08tbaldridgemagopian: the example is showing how to use the go macro, and then its showing that go returns a value via a channel. You wouldn't want to write code like that IRL
11:09magopiantbaldridge: ok, it's just the example, thanks ;)
11:09magopianbtw, thanks "in advance" for your videos (i've downloaded them all, and will watch them soon ;)
11:10magopian(it's a long path, i started looking at om, then at core.async, then the video from swannodette (the cognitect webinar on core.async), then the introductory blog post from Rich, then those examples, next are your videos :)
11:10magopian(and trying at the same time to grok transducers, thanks to cgrand who gave us an informal hangout on "transducers from scratch" :)
11:11magopianall that for my poor little noob brain, i hope i'm not leaking brain cells through my ears
11:14aconbereSo... kind of weird question... I've been using jdbc for a bunch of things. But one of the databases I use (RedShift) is REALLY REALLY slow if I use prepared statements.
11:14aconbereso I've had to end up preparing my sql statements in code, and I'm trying to find out if someone has made a light weight sql library that will make safe sql strings for me
11:15aconbereit doesn't look like with clojure.jdbc that I have any option except for using prepared statements
11:16gdeer81aconbere, did you look at some of the SQL abstractions like Korma or Honey SQL?
11:17aconberegdeer81: I did, but I'm hoping to not end up in a DSL for writing SQL
11:20ghadishaybanhoneySQL has worked very well for us
11:21ghadishaybanit doesn't try to do anything ORMey
11:22aconbereghadishayban: I think also I might be riding a fringe here because RS is so non-performant with parameterized queries
11:22aconberelooking at honey sql it looks like it actually generates parameterized jdbc statements
11:25ghadishaybanis RS that non-performant?
11:26aconbereghadishayban: the difference in the performance sensitive queries I'm running between using a parepared statement and a formated string are on the order of 15 minutes
11:26aconbere(where the formatted string option runs in about 20s)
11:27clgvaconbere: is RedShift a reasonable choice then at all?
11:27ghadishaybaninteresting, that sounds like a bug
11:27aconbereclgv: well... running the query in 20s with a formatted string is certainly an option
11:27aconberebut prepared statements are off the table for us :)
11:28clgvbut a db where you cannot use prepared statements efficiently?
11:28aconbereclgv: why is that a deal breaker for you?
11:28ghadishaybancan always generate the q sans prepared statement with any of the options
11:28aconbereghadishayban: yeah, so that's what we do
11:28aconberenothing that we run takes arbitrary user input
11:28aconberebut it makes all of us ... squirmy
11:29aconberethus my question about safe sql string generation
11:29aconbereit looks like my best bet is maybe using owasp/esapi and just generating escaped strings
11:29ghadishaybanassuming you set Forward_only and read_only
11:30clgvisnt even that spreadsheet thingy, called mysql, able to do performant queries via prepared statements?
11:30aconbereclgv it is, but it's less happy with my very large datasets :)
11:30arrdemgdeer81: o/
11:30clgvI didnt want to recommend using it. just putting it into perspective. why exactly do you use redshift?
11:31aconbereclgv: we use redshift as an analytics database, we have many many terabytes of data in it, and we almost exclusively run ugly analytics type queries on it
11:31aconbereso group bys with CTE's and the works
11:32aconbereit's not clear to me exactly why RS is choking on prepared statements this way
11:32aconbereit's engine is a modified Postgres engine and one would think it would be fine
11:32aconbereits
11:32aconberebleh
11:32gdeer81arrdem, oh hai
11:33clgvaconbere: maybe it is really some kind of bug?
11:34aconbereclgv: my best bet is that something about how they parameterize queries and potentially even my inputs to it is causing a cache miss on the query plan
11:34arrdemgdeer81: to belatedly answer your question school work allowing I was planning on clojurecupping. thinking about comming up again?
11:36gdeer81arrdem, I was hoping to come up for at least one day but I might have to be totes-remote this year
11:37arrdemgdeer81: if you need a place to crash in ATX I've got an appartment this year. all remote would be... interesting.
11:38aconbereclgv: I mean, I'm not thrilled by this, but i'm pretty thrilled so far by the value that RS provides per dollar versus running our own vertica cluster of the same size
11:41gdeer81arrdem, with hangouts and skype and the myriad of telecommuting tools available I don't think remote teammates will be an issue. And hopefully this year we can limit the scope of our entry
11:41arrdemgdeer81: lol yes
11:45clgvaconbere: but I'd check possible error sources that are connected with the poor performance of prepared statements.
11:47abp(clojure.tools.reader.edn/read-string (pr-str #"\.")) throws ExceptionInfo Unsupported escape character: \.
11:47abpthat's a bug right?
11:47clgv,(read-string (pr-str #"\."))
11:47clojurebot#"\."
11:48arrdemabp: the edn reader doesn't include patterns AFAIK
11:48arrdemabp: the clojure reader does
11:48aconbereclgv: yeah, a good reminder. I can easily create the test case and send it to our rep.
11:49arrdemabp: https://github.com/edn-format/edn
11:49arrdemabp: note that there is no "pattern" type in there
11:49clgv,(do (require '[clojure.edn :as edn]) (edn/read-string (pr-str #"\.")))
11:49clojurebot#<RuntimeException java.lang.RuntimeException: No dispatch macro for: ">
11:49abparrdem: yes, damn
11:50clgv,(edn/read-string (pr-str (str #"\.")))
11:50clojurebot"\\."
11:50clgv,(re-pattern (edn/read-string (pr-str (str #"\."))))
11:50clojurebot#"\."
11:51clgvabp: you could work around it ^^
11:51arrdemclgv: but then you introduce an out of band schema... "this thing is really a pattern but we can't encode that"
11:51abparrdem: Happens when sending certain error structures generated by prismatic/schema to other web services, i.e. schemas containing regexes
11:52arrdem{:op :pattern :payload my-string}
11:55clgvarrdem: if you actually can work around it surely depends on the application and I did not suggest to replace it literally for scenarios where an automatic recognition of the pattern must happen...
11:56abparrdem, clgv: maybe i just wrap the regexes to produce specific errors.
11:57abparrdem, clgv: Thanks anyway
11:58mmitchel_I have a ring app that i'm building using the "lein ring uberwar" command. In the resulting war, I'm seeing WEB-INF/classes and WEB-INF/lib -- I see the clojure.jar in lib, but also see all of the class files in WEB-INF/classes -- Is there anyway to have "lein ring uberwar" not include those class files in the war file?
11:59elarsonI have a general functional programming question that I'm hoping will be helpful understanding common idioms in clojure
11:59justin_smithmmitchel_: an uberwar is meant to be standalone
12:00justin_smithmmitchel_: and why shouldn't it pre-compile?
12:00joegalloelarson: i grant you permission to ask it
12:00mmitchel_justin_smith: hmm, so maybe I should be doing "lein ring war" instead?
12:00mdeboardSaruman would approve
12:00justin_smithmmitchel_: why do you object to those class files?
12:01mmitchel_justin_smith: because we're thinking that it's causing an "out of file descriptors" exception. We've found that increasing the ulimit fixes the problem, but we don't want to have to do that obviously
12:01elarsonI have a program that takes a big csv and writes bunch of files smaller files. in python I would create an object and maintain a list of the files created for later. I was trying to write the same thing using only functions and I'm thinking about writing a function that resets the current file and returns a new file handle, a new csv writer and the list of files. that seems like a horrible API though so I'm curious how others might
12:01elarsonrefactor that code
12:03justin_smithmmitchel_: you could edit the uberwar, it is a zip file. But certain things need to be available to the app container as class files - it won't be a trivial thing to make it work. You'd probably need to make a shim with a .class that loads the rest from .clj files. And would this really help with the file descriptor count issues?
12:04elarsonhmm... I suppose one obvious change would be to return a map with the new filename, handle and csv writer. that would be better
12:04joegalloelarson: what determines the point where you switch to another file?
12:05clgvelarson: yeah something like (defn dosth [fileconfig, data] ) -> returns fileconfig should work
12:05lavokadnnect
12:05lavokad
12:05elarsonjoegallo: at this point I'm just using the number of rows.
12:05mmitchel_justin_smith: ugh :) thanks for the info. I'll have to look into this more I think
12:06elarsonjoegallo: it is a really wide csv (5k+ columns) and turns it into a entity-attribute-value format
12:07joegallois there a naming scheme or something for the smaller files?
12:07elarsonso each row size becomes pretty similar across the entire file.
12:07mmitchel_justin_smith: so is there a way to know what class files are required?
12:07elarsonjoegallo: yeah, it just adds a number before a .csv.gz
12:08joegallok, gonna hack on a gist for a minute
12:08justin_smithmmitchel_: I don't know off the top of my head. You need a .class file that the container can load and invoke, and you can make that do whatever you like to load all your clojure code
12:09TimMcThis is a perfectly reasonable way to type-hint an argument, right?
12:09TimMc(fn [v] (rx.Observable/from ^Iterable (repeat v v)))
12:09justin_smithmmitchel_: there is documentation online on manually constructing an uberwar, and it will have more details than I can remember.
12:10TimMcI'm encountering a case where the type hint is being lost and the Object version of the method is being called instead...
12:10TimMcI thought it was Midje, but after some macroexpansion I'm wondering if this is a Clojure compilation thing.
12:10justin_smithTimMc: you mean type hint a return value, right? and shouldn't the fn be hinted, not the value you are returning?
12:11TimMcType-hint an argument.
12:11joegalloelarson: https://gist.github.com/joegallo/1d795d9a613795dab9fe i've named things terribly on purpose, and kept it all pretty vague
12:11joegallobut that's something like the shape of what i'd probably do
12:11justin_smithTimMc: ahh, so the fn isn't the point, got it
12:11TimMcrx.Observable/from has several variations, among which are (Object) and (Iterable).
12:12TimMcYeah, sorry, it's an oerly large code extract.
12:12TimMc*overly, ugh
12:12clgvjustin_smith: mmitchel_: you'd need something similar to org.timmc/lein-otf
12:12TimMcclgv: Which is currently broken but totally easy to replicate per-project.
12:12clgvTimMc: still works over here. what is broken?
12:13justin_smithmmitchel_: https://github.com/timmc/lein-otf yeah, this looks like it would help
12:13TimMcLast I saw, it was failing to inject a :main or something.
12:13TimMcI don't know if it's worth fixing -- it's more of a pattern than a plugin.
12:13justin_smithwell, you don't need a :main for an uberwar anyway :)
12:14ncthom91hey all. I keep getting this error and I'm not sur what it means: " Only one :require form is allowed per namespace definition"
12:14technomancythese days it's easy to avoid AOT in uberjars; just put clojure.main as your entry point and use the -m option
12:14technomancyonly place it doesn't work is if you need the jar to do something sensible with no args
12:15clgvTimMc: oh right it somehow points to clojure's main
12:15ncthom91nvm, got it ;)
12:15TimMcSome lein change broke it, I guess.
12:15matthoffmanjustin_smith: TimMc: mmitchel_: but we're talking about a war here, right? No main necessary.
12:16mmitchel_war yes
12:16CookedGryphonHey, does anyone know how I can read edn data which has some #<JavaClass > bits in it without completely falling over
12:16justin_smithmatthoffman: yeah, that's wwhat I just said :)
12:16TimMcCookedGryphon: regular expressions?
12:16CookedGryphonurgh
12:17justin_smithwait, if it contains #<...> it isn't valid edn is it?
12:17TimMcHacking in a reader for #<, perhaps?
12:17CookedGryphonjusting
12:17justin_smiththe point of #< is to mean unreadable
12:17CookedGryphonjustin: no, if it's #blah something then it is
12:17CookedGryphonyeah, and that's fine, how do I get the rest of the message
12:17CookedGryphon*or* how to I output only readable things
12:17TimMcI mean, the real answer is "you don't".
12:17matthoffmanjustin_smith: True, sorry :)
12:18TimMcCookedGryphon: Cheshire with an emitter for Object?
12:18TimMcBut that's not EDN, sorry.
12:18TimMctree-walking, maybe
12:19CookedGryphonSurely it could just give it to me as a symbol or something?
12:19justin_smithCookedGryphon: you could make an extension of pr-str that returns a readable placeholder for unreadable forms
12:20CookedGryphonjustin_smith: what would I extend? Would I have to do it for each unreadable form I knew about?
12:21CookedGryphonit's really really annoying that there isn't a edn/write which is guaranteed round-trippable with edn/read
12:21clgvTimMc: how did it work before?
12:21clgvTimMc: the namespace was written into the manifest right?
12:21TimMcclgv: Yeah, and inject its own loader ns into :main in the project map.
12:22clgvTimMc: the difference between the two builds is that Main-Class in the manifest does now point to clojure.main instead of my :main
12:23TimMcA per-project DIY version would be simpler and just involve creating a second namespace that does (defn -main [& args] (require 'my.real.ns) (apply @(resolve 'my.real.ns/-main) args))
12:23clgvTimMc: hm yeah probably
12:23clgvTimMc: had that before for a different project
12:30elarsonjoegallo: thanks! that makes it extremely clear why I'd rather be using clojure ;)
12:32joegalloelarson: i couldn't stop until i used a threading macro. and the loop was bugging me.
12:32joegalloupdated the gist
12:35elarsonjoegallo: what part is using threading macro?
12:35joegallo(->> ...) is the threading macro
12:35elarsonah ok, that is what I thought
12:35elarsondoes it do each step in a thread or the whole thing?
12:36joegalloit allows you to write a nested s-expression (the evaluates from the inside out) into a series of sequential s-expressions that read from the top to the bottom
12:36clgvelarson: no, no java-threads are involved
12:36noonianelarson: it's not about os threads, it will pass the result of the cal to some-lazy... as the first argument to partition-all and the result of that as the first arg to map-indexed
12:37justin_smithCookedGryphon: just spitballing here - what about a tree walker that returns the pr-str version by default, except for the collections, where it recurses, and catches unreadables (unreadable objects will always match a simple regex) and replacing them with placeholders
12:37joegallo(a (b (c (d e f)))) becomes (->> (d e f) (c) (b) (a)) which may seems horrible and confusing at first, but later i promise you'll fall in love with it
12:37joegalloit's like sushi
12:38Fare-> and ->> are great
12:38J_ArcaneI'm not sure I understand why you would want to do that?
12:39justin_smithJ_Arcane: they can make code much more readable
12:39joegallothere's a certain conceptual readability that sometimes flows from it
12:39FareI also have (defmacro <- "Nesting macro" ([] nil) ([x] x) ([x & y] `(~@x (<- ~@y)))) ;; like UIOP:NEST in CL
12:39elarsonjoegallo: yeah, I tried using -> the other day and it was pretty nice.
12:39hiredman(->> foo (map f) (filter g) (mapcat h))
12:39hfaafbbecause it represents the pipeline of data transformations in a more linear way, outside in rather than inside out
12:39elarsoncore.async has also completely ruined my desire to play with go ;)
12:40mdrogaliselarson: Glad I'm not the only one ;[
12:40J_ArcaneAhhh. OK, I see what you mean now, I think I misunderstood the description.
12:40justin_smithhfaafb: more left-to-right rather than inside out
12:40joegallohttps://gist.github.com/joegallo/b5e6bd2346cd261016be J_Arcane elarson
12:40Jaoodcomp beats both :P
12:40joegalloslightly better example
12:40justin_smithJaood: good luck using comp with macros and interop, -> / ->> handle those nicely
12:41justin_smithJaood: yeah, you can use lambdas but... otherwise, agreed, comp is great
12:42joegallojustin_smith: comp is great, and imma let you finish, but juxt is one of the best functions OF ALL TIME
12:42justin_smith(inc juxt)
12:42lazybot⇒ 13
12:42FareWhere would I go to get <- standardized?
12:42noonianlol
12:42justin_smithFare: nail your theses to the clojure jira door
12:42Jaoodjustin_smith: yeah, some people just abuse -> / ->> to much
12:43mdrogalisjustin_smith: Like nailing jello to a tree.
13:24danneudont forget about as->
13:25danneufeel like a gambler when i use ->/->> without knowing the position i need for every fn i'm gonna thread
13:25arrdemFare: what does <- do?
13:26arrdemsplice of x splice of y...
13:27llasramIt seems conceptually to be (comp ->> reverse)
13:28llasramBut you know, not literally that because macros
13:28Farearrdem: it's nesting things a bit in reverse of ->
13:28danneuid rather just see (as-> thing _, (foo 42 _), (bar _ 42))
13:29Fareso (<- (let [a c]) (match [x] [some pattern]) (when (some-condition)) ...)
13:29Fareit's great to avoid nesting of 10+ binding forms.
13:30Fareand vast indentation to the right
13:30TimMcI'm sure that's in the swiss-arrows lib.
13:31FareTimMc: nice. I'll google it
13:32Farenope, I don't see anything like it
13:32Farein https://github.com/rplevy/swiss-arrows
13:33Fareoh wait it has a <<-
13:34Fareso yes, it has it
13:40clgvFare: why not just use `as->` ?
13:45J_ArcaneI have achieved clojure enlightment, apparently.
13:45Fare:-)
13:45justin_smith(inc TimMc)
13:45lazybot⇒ 70
13:45Fareclgv: where is it defined?
13:46justin_smith$source as->
13:46lazybotSource not found.
13:46justin_smithFare: clojure.core, 1.5+
13:47Farevery different http://clojure.github.io/clojure/clojure.core-api.html#clojure.core/as-%3E
13:47clgvFare: clojure.core
13:48clgvFare: but it removes the need for <<-
13:48olasukai am using generative testing, to cover some macros i am developing, and part of the macro is interning a symbol to the namespace that is calling the macro.
13:48Faremy <- or swiss-arrows/<<- allows you to nest arbitrary binding forms
13:49justin_smitholasuka: that is an intentional behavior of `(), if you use that construct
13:49olasukathe issue is that clojure.core, is of course present, and when a symbol such as '*' is generated, I am getting errors of the overwriting of the symbol
13:49arrdemTimMc: I challenge you to find a use of that that's correct and meaningfu
13:49arrdem*meaningfull.
13:49Fareso you can define and/or use as many of them as you like, and never had to indent your code to the right
13:49olasukais there any way to supress the behavior, or to ignore certain classes of errors during the testing?
13:50Fareall the advantages of python blocks with none of the disadvantages.
13:50arrdemFare: ah nice
13:50olasukaI know that would be an issue, once the code is run, but the writer would be aware of the issue.
13:50justin_smitholasuka: wait, what is the specific exception or error you are getting?
13:50TimMcarrdem: Turn on AOT and run lein compile, tests until tests pass. No need to fiddle about with choosing an arrow!
13:51arrdemTimMc: you monster
13:51olasuka:justin_smith the error is not with the test itself, but this...
13:51Farein CL, I've seen so many "generalized binding" packages that tried to combine "all" the binding forms in one thing, none of these macros supported all the things you wanted, because none of them supported your own macros, unless you rewrote them, or used complex extension mechanisms.
13:51Fare<- has a trivial extension mechanism
13:52olasukaWARNING: * already refers to: #'clojure.core/* in namespace: athena.dsl.types.nodes.model-eval, being replaced by: #'athena.dsl.types.nodes.model-eval/*
13:52Fareand doesn't require you to learn a new syntax.
13:52olasukaCompilerException java.lang.NullPointerException, compiling:(:30:1)
13:52justin_smitholasuka: why are you trying to def the symbol *
13:52clgvFare: ah btw the threading macros in clojure.core were rewritten without recursive calls to themselves
13:52olasukathis is produced by a generative testing suite. clojure.test.generative
13:52Fareclgv: what does that change?
13:53olasukajustin_smith: so any string is produced to test the code
13:53clgvFare: it immediately expands to the full form. I dont remember the exact reasons therefore.
13:54clgvFare: maybe they needed it due to composition.
13:54olasukajustin_smith: so, i end up with minimal failure cases that look like this: (init * "" A :adapa)
13:54olasukajustin_smith: where init is the macro definition
13:55olasukajustin_smith: the astersik is getting converted to an interned symbol for reference later in the code
13:56olasukajustin_smith: normal usage would be: (init TEST-MODEL "the doc string" MODEL-NAME :server-type)
13:56olasukajustin_smith: and this would produce a TEST-MODEL symbol, useable in the code, that is the construction of a java class provided by a subsumed java API
13:59justin_smitholasuka: seems the sensible thing would be to blacklist symbols bound directly in the testing namespace from the generated inputs
13:59justin_smitholasuka: I don't know how that's done in test.check though
14:00olasukajustin_smith: i was hoping to avoid that route, as it would entail me filtering and redefining the basic generators, but it may be the only option... I am looking into overring the intern warning, but that could produce some really unexpected behavior.
14:02olasukajustin_smith: thanks... I think I am going to do that... create a filter on the generator to exclude all clojure.core symbols
14:02olasukajustin_smith: thanks
14:02justin_smith(remove (set (keys (ns-refers *ns*))) generated)
14:03olasukajustin_smith: hmm...
14:03justin_smiththat will remove all items that are refered in the current ns from the sequence generated
14:03justin_smithyou may need to add 'name' in there for string coercion
14:05olasukajustin_smith: thanks... i like the idea, the problem, is that if I say override '*' i will end up with a re-defined '*' so (* 1 2) is an error... that is going to produce so erratic behavior. i think your first pass was right on... i am going to need to exclude the sysmbols from being produced in the test set.
14:05olasukajustin_smith: thanks again for the feedback, i appreciate it.
14:06justin_smithmy above one liner will work, if you have a sequence containing the potential generated symbols
14:09olasukajustin_smith: maybe I am mis-understanding the behavior, but it would seem that a symbol, such as '*' would be removed from the ns? so later, either I would have a re-definintion of the symbol, or no symbol at all... is that correct?
14:09justin_smitholasuka: no no
14:10justin_smiththat removes any matching symbols from a list of symbols
14:10justin_smithassuming you have some mechanism for filtering the symbols used by your generator
14:10olasukajustin_smith: ahh, right... I see it... you are using the ns symbol set as the comparision source, and excluding those values...
14:11justin_smith,(remove (set (keys (ns-refers *ns*))) '[* + foo - str bar])
14:11clojurebot(foo bar)
14:11olasukajustin_smith: from the newly created values
14:11justin_smithright, see above
14:11olasukajustin_smith: yeah... nice
14:11olasukajustin_smith: that has the added benefit of unique definition
14:12olasukajustin_smith: cool...thanks.
14:12justin_smithnp
14:13amalloyJaood: i think there's just "abusing arrows" and "using arrows too much". abusing them too much is weird
14:14justin_smithI find abusing them just enough quite productive
14:14amalloy(further, i don't think there's any such thing as using arrows too much. any number of uses is lovely, as long as no one use is an abuse. adding more arrows doesn't make previous ones a bad idea)
14:15olasukaexcept the first one, that went into my knee... that was a bad idea
14:15amalloywhoops, i just fell into a time machine to 2012
14:15olasukawelcome back... we've missed you
14:16olasukaor we will miss you... i get confused...
14:21holo /Users/ccfontes/hy/venv/bin/hy
14:21holooh sorry guys, wrong # :)
14:25TimMcAnyone know of a way to get Cheshire to default to toString for otherwise non-JSON-encodable objects?
14:29justin_smithTimMc: what about (add-encoder java.lang.Object #(.toString %))
14:31amalloyjustin_smith: that's a funny way to write (add-encoder Object str)
14:32justin_smithamalloy: and it's also incorrect in either form
14:32justin_smithplaying with it now seeing how this works
14:32amalloyis it? i don't know what cheshire's encoder api is like
14:33justin_smithyeah, your function gets two args, a thing to write to and the object to be written
14:33amalloyi'm a bit dubious that toString is actually a good encoding more than like 10% of the time, really; the cases where it does work you probably wouldn't mind listing by hand rather than defaulting to Object
14:33TimMcjustin_smith: Here's the problem: I don't want that to be a permanent, global thing.
14:33justin_smithTimMc: ahh, tricky
14:34amalloyTimMc: cheshire.core/remove-encoder...?
14:34justin_smithtoo bad there isn't a way to bind an encoder locally
14:34TimMcIt's a hack, so I'd really only want it in this one dynamic scope where lack of exceptions is more important than correctness and round-trippability.
14:35csd_How can I do something like `for` where the input is a vector of vectors of unknown length? I.e. I want to use for to iterate across all subvectors but I don't know how many there will be ahead of time.
14:35amalloycsd_: that's basically a cartesian product
14:36amalloywhich lives in clojure.math.combinatorics
14:36csd_oh good call
14:42amalloyTimMc: if you want to try something other than cheshire, clj-json does support dynamically-scoped encoders
14:42TimMcAh, thanks.
14:42TimMcI think my other alternative is mucking about in the guts of the JSONable protocol...
14:43TimMcIt looks like I could maybe bind the protocol?...
14:43amalloyTimMc: binding protocols doesn't work well at all. don't do it
14:44amalloyTimMc: (def ^:dynamic *cheat-mode* false) (extend-type Object JSONable (encode [this encoder] (when-not *cheat-mode* (explode)) (encode (str this) encoder)))
14:44amalloywould be an amusing approach
14:44TimMco.O
14:44TimMcI *like* it!
14:44amalloythe main problem is that you prevent anyone *else* from setting up a temporary cheat mode
14:44amalloyso you might make *cheat-mode* a function instead of a boolean, which is how to cheat
14:47Farethat's where interface-passing style can help
14:47Farethe protocol is in a separate interface object, not in the data object
14:47ncthom91_hi guys. I'm writing some nodejs in clojurescript, and I'm finding that "(.readFileSync fs fixture-path "utf8")" gets compiled such that .readFileSync becomes something like .Pc
14:47ncthom91_and obviously node's fs doesn't have a method "Pc"
14:48ncthom91_how do I prevent that rewrite at compile time?
14:52noonianncthom91_: do you have :target :nodejs in your cljsbuild compiler settings?
14:52ncthom91_noonian yep
14:52noonianyou probably need to use js/fs
14:53noonianif its normally a global in nodejs
14:53amalloyFare: sure. that's obviously more flexible. but it's more expensive too, and i think cheshire is right to opt for the fastest approach, with json encoding often being an actual bottleneck
14:53ncthom91_noonian it's not, i have "(def fs (nodejs/require "fs"))" at the top of my file
14:53ncthom91_(and i've tried js/require instead of nodejs/require)
14:55noonianncthom91_: i think you just need to turn off advanced compilation, cljsbuild docs say its unneccesary and that if you want it you need to supply your own externs file for the nodejs api
14:55Fareamalloy: it's not necessarily more expensive, if the bottleneck is in the processing rather than the dispatch
14:55noonianNote using advanced compilation on Node.js targets is unnecessary. If for some reason it is desirable you must supply externs for the Node.js APIs
14:55noonianfrom https://github.com/clojure/clojurescript/wiki/Quick-Start
14:57ncthom91_noonian interesting, didn't know that. I changed it to :simple but I still get the same method-name-rewrite problem
14:57noonianncthom91_: make sure you clean out the old generated js and restart lein cljsbuild if you are using auto
14:58noonianmaybe just try whitespace
14:58noonianaccording to https://developers.google.com/closure/compiler/docs/compilation_levels simple renames local variables and expressions to make them shorter
14:59DaReaper5Hey I got a kinda basic question: I am doing this: (list [1 2] (if something [3 4])) This I believe is wrong, how do i conditionally include something in this (list ?
15:00noonian(into [1 2] (if something [3 4] [])) would work
15:00llasram,(concat [1 2] (if true [3 4] [5 6]))
15:00clojurebot(1 2 3 4)
15:00llasram,(concat [1 2] (if false [3 4] [5 6]))
15:00clojurebot(1 2 5 6)
15:00llasram,(concat [1 2] (if false [3 4]))
15:00clojurebot(1 2)
15:01amalloy,`[1 2 ~@(if true [3 4] [5 6])] works too
15:01clojurebot[1 2 3 4]
15:01llasramamalloy: Awww. Was just about to add that one :-)
15:01DaReaper5i want this: ( [1 2] [3 4] )
15:01amalloyDaReaper5: can you think of how to adjust the suggested solutions to that goal?
15:01DaReaper5But I keep getting "java.lang.ClassCastException: clojure.lang.ArraySeq cannot be cast to clojure.lang.IFn"
15:02noonian,(into (list [1 2]) (if true [[3 4]]))
15:02clojurebot([3 4] [1 2])
15:02amalloyDaReaper5: that exception generally means you are dribbling parentheses all over the page
15:03noonian,(concat (list [1 2]) (if something [[3 4]]))
15:03clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: something in this context, compiling:(NO_SOURCE_PATH:0:0)>
15:03noonian,(concat (list [1 2]) (if true [[3 4]]))
15:03clojurebot([1 2] [3 4])
15:03DaReaper5amalloy: hey amalloy, thanks again for your help the other day. I think... noonian might have the answer for me. Brb
15:03ncthom91_noonian you were right. I had to clear out the cached build files, and set optimizations to :simple
15:03ncthom91_thanks :D
15:03noonian,(list (into [[1 2]] (if true [[3 4]])))
15:03clojurebot([[1 2] [3 4]])
15:03nooniangrumble
15:03DaReaper5lol
15:04noonian,(apply list (into [[1 2]] (if true [[3 4]])))
15:04clojurebot([1 2] [3 4])
15:04noonianthats probably how i would do it
15:05noonianinto with lists adds at the front since it will use conj
15:05amalloynoonian: apply list is bizarre. just call seq
15:05SagiCZ1in java i could use "return" to return a result from a function (method) and the rest was not executed.. in clojure most of the expressions return the last thing they evaluate, but then the execution continues. how would i simulate return statement from java? see example
15:06SagiCZ1,(let [x 10] (when (> x 5) x) (println "yo"))
15:06clojurebotyo\n
15:06SagiCZ1here i would expect the form to return 10
15:06noonianamalloy: yeah, but seq probably wont return a list :P
15:06amalloynoonian: who cares?
15:06DaReaper5i care?
15:06amalloySagiCZ1: just don't do it. use if/cond/whatever to structure your function such that you don't enter into code paths you don't want to run
15:06DaReaper5maybe?
15:07SagiCZ1amalloy: ok, thats the idiomatic ways i presume?
15:07noonianamalloy: i just didn't want to make any assumptions about DaReaper5's requirements, but you're right normally you shouldn't have to care
15:07amalloyDaReaper5: i sincerely doubt it. there are cases where you need specifically a list instead of of a general seq, but they are not common and i wouldn't expect someone having trouble conditionally concatting a list to be in one
15:08noonianSagiCZ1: let returns the last value in the body of the form which is (println "yo") in that case and returns nil
15:08amalloySagiCZ1: it's the only way. there is no such thing as early return
15:08SagiCZ1thanks guys
15:09SagiCZ1the functions actually might look a bit cleaner without the early returns
15:09amalloythey usually do, as it turns out. a miracle of nature
15:17SagiCZ1when you are using < > where do you put the constant and where the symbol?
15:17SagiCZ1(> x 10) or (< x 10) ?
15:18TimMcI almost always use <
15:18justin_smithSagiCZ1: dym (> x 10) or (< 10 x)
15:19BronsaI always use < too
15:19TimMcbecause then I see < and think "the following are in ascending order"
15:19TimMc(descending order is just weird)
15:20justin_smithTimMc: prio-queue
15:21SagiCZ1makes sense.. i was using "constant always first" and i have already made some nasty bugs.. A > B is way more natural
15:26TimMcSagiCZ1: By the way, you can also do (< 0 x 10)
15:26amalloyTimMc: always using < seems weird. surely there are places where it's more natural to say "if X is greater than 10" rather than "unless 10 is less than X"
15:27TimMcamalloy: Oh, I'm sure there are exceptions. Let me check some codebases...
15:28amalloyi just surveyed some of my old code and it looks five of my eight comparisons use < or <=, the other three being >
15:28csd_Any tips on how to troubleshoot java.lang.OutOfMemoryError: Java heap space?
15:28justin_smithcsd_: a profiler will show you what is using the most memory
15:29amalloycsd_: don't def infinite sequences
15:29dbaschcsd_: that's an extremely generic error, what is causing it?
15:29justin_smithcsd_: one common culprit is holding onto the head of lazy seqs
15:29amalloy(this is hardly the only cause, but i'd say about 75% of the time that's the reason)
15:29SagiCZ1TimMc: thanks for tip!
15:29clojurebotIt's greek to me.
15:29TimMc51 vs 14 on < vs >
15:30SagiCZ1how do you come up with those numbers so fast
15:30csd_dbasch: http://pastebin.com/XJH0NAQx
15:30csd_working on http://www.4clojure.com/problem/108
15:30TimMcbut about even on random open source projects I happened to have lying around
15:30justin_smithcsd_: mapcat identity is a weird way to say apply concat
15:30TimMcSagiCZ1: grep '(<' -nr work/ --include='*.clj' | wc -l
15:31SagiCZ1TimMc: i see.. hax
15:31TimMcsure
15:31olasukaSagiCZ1: grep -ir '<' . | wc -l
15:31SagiCZ1;)
15:31olasukatoo late
15:31TimMcolasuka: I think -i just makes it slower there, and nothing else.
15:31amalloyTimMc: that can catch some weird outliers, like an old project i worked on defines a << operator. i'd be a little more careful, like `grep -P '\(<[\s=]' ...`
15:32SagiCZ1let me take my Windows and go sit in the corner quietely
15:32TimMcamalloy: I did it first without the wc and actually skimmed the results.
15:32olasukayeah, that is probably true... habit
15:33amalloyanyway, 51/14 is pretty extreme
15:33AeroNotixYou can't loop/recur in a defrecord's methods?
15:33justin_smithcsd_: in that paste, you are piling up calls to lazy-seq
15:34justin_smithcsd_: also, that's a lot of unforced concat usage you are piling up too
15:34csd_justin_smith: i know... sorta just kept sticking them trying to get the code to run
15:34amalloyAeroNotix: sure you can
15:35justin_smithwhen you wrap a lazy-seq in a lazy-seq etc (or a concat on a concat etc.) this builds up unforced thunks - and you can blow the stack once the top one is finally forced
15:35justin_smithor the heap if your settings are strict enough or you go crazy enough with the stacking...
15:35dbaschcsd_: lazy-seq of filter does nothing useful
15:35justin_smithdbasch: it will use extra resources, maybe someone wants that :)
15:36dbaschjustin_smith: yes, that's useful like being morbidly obese is useful
15:36csd_dbasch: figured.. evidence of desperation
15:36justin_smithcsd_: these things are what are driving up your heap usage
15:37amalloyTimMc: when i run your script over only the projects i've actually worked on, it comes out to a remarkably balanced 274/280
15:37AeroNotixamalloy: not sure why it was telling me I couldn't then
15:37AeroNotixwhatever
15:37technomancy(inc <)
15:37lazybot⇒ 1
15:38amalloyjustin_smith: c'mon, the excess calls to lazy-seq are not going to be so much of a problem he blows the heap. he's got to have an infinite seq in there somewhere
15:39justin_smithamalloy: well, the code in the 4clojure problem supplies him with infinite seqs, yeah
15:40dbaschcsd_: what is min-s supposed to do?
15:40csd_the code in the pastebin actually doesnt have the infinite sequence tests in it
15:41csd_dbasch: for seqs where their first element are the smallest elements in the seq of seqs, min-s returns `rest` of those seqs
15:41justin_smithcsd_: you don't need to explicitly create any lazy sequences yourself - if the input is lazy, you just need to use it in a way that doesn't force that whole thing
15:41dbaschcsd_: have you tried it? I suspect it doesn't work
15:43dbaschcsd_: never mind, that part works
15:43justin_smithcsd_: why mapcat across all your inputs? how do you even know if something is present in all of them after doing that?
15:44dbaschcsd_: but I pasted your code into my repl and I get a different error
15:45csd_justin_smith: it's just my way of doing a partial flatten to get rid of the new list element that the results of filter are put in
15:47justin_smithcsd_: I'm not going to just answer the puzzle for you, but there is a much simpler solution to this puzzle that requires like 10% as much code - this code is a lot more complex than the problem is
15:47justin_smithok, more like 33%, but still
15:48technomancyamalloy_lunch: "are these numbers presented in increasing order" seems like a more common question to ask than decreasing.
15:49technomancyjust like + is more common than -
15:49abaranoskyCanvassing for votes for my clojure.core patch, that adds convenience arities for core ns functions. Any upvotes gretly appreciated :) http://dev.clojure.org/jira/browse/CLJ-1519
15:50justin_smithabaranosky: markdown ate your * on *ns*
15:50abaranoskyhmmm gretly turns out not to be an alternate spelling for greatly :)
15:50abaranoskyjustin_smith: thanks. I'll try to edit the ticket.
15:51justin_smith`*ns*` should fix it
15:51abaranoskyjustin_smith: thanks, fixed
15:51abaranoskyI used backslashes
15:51justin_smiththat's another option
15:52justin_smithmarkdown often confuses me
15:54TimMcJira uses markdown?
15:56justin_smithTimMc: not totally certain, but it clearly turned *ns* into to <b>ns</b>
15:57SagiCZ1hey.. why does this print true? when the expression is equal to one of the cases.. it shouldnt print true, right? https://www.refheap.com/90065
15:59justin_smithwhat is the type of KeyEvent/VK_RIGHT ?
15:59SagiCZ1int
15:59llasramSagiCZ1: Because `case` doesn't evaluate its dispatch values
15:59SagiCZ1and .getKeyCode returns int
15:59hiredman,(doc case)
15:59clojurebot"([e & clauses]); Takes an expression, and a set of clauses. Each clause can take the form of either: test-constant result-expr (test-constant1 ... test-constantN) result-expr The test-constants are not evaluated. They must be compile-time literals, and need not be quoted. If the expression is equal to a test-constant, the corresponding result-expr is returned. A single default expression can foll...
15:59hiredman"The test-constants are not evaluated
15:59hiredman"
15:59SagiCZ1i dont need them to be evaluated
15:59SagiCZ1they are just constants
16:00hiredman,(type 'KeyEvent/VK_RIGHT)
16:00clojurebotclojure.lang.Symbol
16:00justin_smiththe values are not being resolved
16:00hiredman^- what you get without evaluation
16:00SagiCZ1o u mean the symbols are not resolved?
16:00SagiCZ1well that's useless then ...
16:00hiredmanthat is a process that takes place in evaluation/compilation
16:01llasramSagiCZ1: For this sort of situation, I use a macro like https://gist.github.com/llasram/1287230
16:01SagiCZ1llasram: and without your macro i would have a better luck with something like cond, right<
16:01SagiCZ1?
16:01llasramYes
16:01justin_smithor even condp
16:02llasramjustin_smith: That's "something like cond" ;-)
16:02justin_smith,(condp = 1 0 :? 1 :ok 2 :?)
16:02clojurebot:ok
16:02justin_smithllasram: indeed
16:02SagiCZ1(doc condp)
16:02clojurebot"([pred expr & clauses]); Takes a binary predicate, an expression, and a set of clauses. Each clause can take the form of either: test-expr result-expr test-expr :>> result-fn Note :>> is an ordinary keyword. For each clause, (pred test-expr expr) is evaluated. If it returns logical true, the clause is a match. If a binary clause matches, the result-expr is returned, if a ternary clause matches, its result-fn, which m
16:03SagiCZ1god, i hate these docs.. could be in finnish as far as i am concerned
16:04justin_smith~finnish
16:04clojurebotexcusez-moi
16:04justin_smithI hoped to get the "it's greek to me" response
16:04SagiCZ1justin_smith: heh
16:10llasramThey are better in the original Klingon.
16:10noonian(inc llasram)
16:10lazybot⇒ 38
16:24tickingdnolen_: do you think it'd make sense to have an "inline sourcemaps" compiler opt, to embed a base64 encoded, sourceContents filled, source map into the output?
16:25dnolen_ticking: already exists
16:25tickingdnolen_: awesome, seems undocumented :D
16:27airj1012_I haven't been on IRC in YEARS, is there a good channel to ask questions about general technology?
16:27airj1012_Not sure if this is a good starting place or not.
16:27technomancyit is the second-best channel to do so
16:28airj1012_Awesome, well I have a question about the new iPhone, more specifically about the 20 LTE bands.
16:28technomancyoh, it's probably a terrible place for that?
16:28technomancyI thought you meant more like PLT stuff
16:28amalloytechnomancy assumes "general technology" means clojure, because what could be more general
16:29technomancyamalloy: technologies for generals. robot armies, submarines, lasers, etc.
16:29airj1012_Do the bands only provide better download/upload speeds or do they provide better connection too? Also will they cause additional strains on the existing network? I can't say that I've ever paid attention to the bands before because I don't think Apple has ever mentioned them,
16:29amalloyairj1012_: i don't really know where a good place for that is. surely there's an IRC channel, although i don't know what it is. you could try reddit
16:29amalloyor hacker news
16:29airj1012_OK, thanks
16:30technomancyamalloy: actually I thought it would be more a philosophical discussion about the progress of technology in general and how it affects the development of societies
16:30technomancyso let's talk about that instead of iphones
16:30tickingiphones are the doom of our society
16:30technomancythat too
16:30amalloythank god the apple watch is here to save us
16:31tickingamalloy: I cant wait for apple to build guard towers to protect us, also called the "apple watch" leading to some customer confusion
16:31technomancyticking: they did it with iBooks, why not
16:34dnolen_ticking: oh sorry didn't read closely enough, yeah not a compiler option but that's what the browser REPL does
16:34dnolen_ticking: don't really see the value of that for regular source
16:34tickingdnolen_: its hidden within :output-to :print right?
16:35dnolen_ticking: there's no complier option, it's a feature of browser REPL only
16:36tickingdnolen_: ah I see, this line got my hopes up :) https://github.com/clojure/clojurescript/blob/master/src/clj/cljs/closure.clj#L849
16:36dnolen_ticking: that's just the separate file case
16:38tickingdnolen_: to bad thanks :D, as for the use case, I'm currently integrating cljs into gorilla repl to make it more interactive, having source maps embedded means that one can export the file and still debug it later :D
16:38dnolen_ticking: you can off course cobble this together yourself
16:38tickingdnolen_: but I agree, its a rather weird edge case
16:39tickingdnolen_: yeah build it already, was just wondering if it would be usefull in cljs
16:39dnolen_ticking: we have it where people actually asked for it https://github.com/clojure/clojurescript/blob/master/src/clj/cljs/repl.clj#L94
16:43tickingdnolen_: ah yeah to bad, there is a lot of good stuff in .repl that would be really handy in .closure :/
16:44tickingdnolen_: I don't think a sourcemap is generated at all for code passed in a vector to closure/build
16:48dnolen_ticking: it's possible, most people don't pass code in vector, they just pass the source directory
16:49tickingyeah, I really like the define once compile anywhere approach of mathematica though ;)
16:51SagiCZ1i want to generate values but i need the generator function to know what the last value was.. any ideas?
16:52llasramSagiCZ1: `iterate`
16:52SagiCZ1llasram: i think thats exactly what i need
16:52SagiCZ1thank you
16:56arohnerwhat are people using for cronjobs & queues these days?
17:08GENSYM_9001clojurebot: bang |is| I do not think there is a hard definition of what ! means as a suffix. ~puredanger
17:08clojurebotIk begrijp
17:09noonianvery generally it means "watch out!"
17:09arrdemnoonian: and yet we have things like alter-var-root which should carry ultimate warning status that aren't -!'d
17:12noonianyeah, i think it is kind of historical and ! originally mean unsafe in a transaction
17:12mdrogalisarrdem: I like how technomancy and I both have libraries that solely revolve around using alter-var-root. They need a Use with Extreme Caution label on GitHub.
17:12noonianbut now they are adding more ! fns just to mean scary
17:13arrdemmdrogalis: :D
17:13justin_smithnoonian: I vote to switching over to ☠
17:13arrdemmdrogalis: sometimes you do, in fact, need to harnes a dragon
17:13arrdemjustin_smith: UTF8's DANGER SIGN?
17:13mdrogalisarrdem: How to Train Your Var.
17:13arrdemhehe
17:14arrdemmdrogalis: my vars have all learned this vanishing trick :D
17:14mdrogalisHaha
17:15noonianjustin_smith: lol
17:15pandeirois there an example of using jetty's built-in websocket support from clojure when deploying as a war?
17:15pandeiroie, can someone translate [this](http://www.eclipse.org/jetty/documentation/current/jetty-websocket-server-api.html) for a java-challenged person like myself?
17:15justin_smith(☠set☠ unsafe-thing even-more-unsafe-value)
17:16noonianpandeiro: might be interested in https://github.com/lynaghk/jetty7-websockets-async
17:17arrdemsee... when we start talking about -! my mind starts wandering in the direction of the IO monand and inferred, enforced purity..
17:18pandeironoonian: thanks i should read that and this maybe https://github.com/sunng87/ring-jetty9-adapter
17:18dbaschjustin_smith: perhaps set‽
17:19justin_smith⸘set‽ a-la espanol
17:26arrdemshould ":::" be ":user/:" ?
17:26mdrogalisHas anyone attempted to use Drools in Clojure before?
17:27mdrogalisIt looks like this is gonna hurt ;[
17:27amalloyarrdem: that should be an invalid token
17:29hiredmanmdrogalis: I started looking at writing rules in clojure at one point, but I never got very far, it is a big system so you end up spending a lot of time reading docs and code
17:30hugodmdrogalis: you might take a look at https://github.com/rbrush/clara-rules
17:30mdrogalishiredman & hugod: I saw Clara, developed by one person so I'm not sure if I can take it to production for my client.
17:31mdrogalisI think I need to put these guys on Datomic datalog. Drools like incredibly painful.
17:31mdrogalislooks*
17:32hiredmanthere is or was a jess based lisp like (definitely not a lisp internally) dsl for writing drools rules
17:32mdrogalisRan into that one, too. Not sure if its being actively developed anymore. Seems a bit aged.
17:39cflemingarrdem: BTW for your matching problem, have you considered datalog of some type?
17:40arrdemcfleming: I've thought about it and I need to really learn/play with datalog first. that was just a hack I threw together in class.
17:40cflemingarrdem: Yeah, I don't know datomic well enough to know how well it would work, but I know people have tried to use it for similar things (like codeq)
17:41Bronsahttps://github.com/clojure/tools.analyzer/blob/master/src/main/clojure/clojure/tools/analyzer/ast/query.clj#L83-L93
17:42arrdemcfleming: Bronsa already played with pushing ASTs into datomic for pattern matching. I can't say I'm hot for writing a compiler atop a nonfree db tho.
17:42arrdemlol and he beats me to it with the link
17:43cflemingarrdem: Yeah, I can understand that. A free datalog implementation would be great, even if it's not as performant as datomic.
17:43cflemingarrdem: No idea what's out there, such a thing might exist.
17:43arrdemcfleming: there's already one for Clojure I just haven't mucked with it yet.
17:43cflemingBronsa: how did you like datomic for AST use?
17:44Bronsacfleming: I've just played around with it for a couple of days when I made that
17:46Bronsacfleming: unfortunately the non-free aspect of datomic means that I'm never going to use it in a library so I'm not even going to bother trying that out to do something complex enough
17:50peejaAnyone have experience getting fireplace.vim to connect to a browser-connected Piggieback repl?
17:50thesaskwatchCan't find out what is purpose of "when" if "if" can be used for this same cause?
17:50technomancythesaskwatch: when has an implicit `do`
17:50thesaskwatchtechnomancy: thanks
17:50peejaI can get it to spawn a headless repl, but not connect to a running browser-connected one.
18:14cflemingBronsa: Yeah, fair enough
18:20talioscfleming - hola. Ran into some old posts of yours from 2011 talking about writing a Mirah plugin for IntelliJ - did you actually do anything with that back in the day?
18:21cflemingtalios: Hola! No, I didn't, sadly.
18:21cflemingtalios: I decided that ruby syntax was a bug, not a feature.
18:21cflemingtalios: I'd be using Kotlin for similar things these days.
18:22talioshah :)
18:23taliosI'd love to - but the rest here are hell bent of clojure-all-the-things, even if they don't fit :)
18:23cflemingtalios: Hehe, I have no comment. And I couldn't possibly sanction the use of any other language plugins :-)
18:24taliosI'm still waiting on an IJ14 build :)
18:24cflemingSigh, yeah, I know - I'm lazy.
18:24cflemingI'll do it soon.
18:24cflemingI hate supporting EAP builds.
18:26taliosis the documentation around IJ plugins any better these days? I've not looked in awhile
18:26cflemingtalios: Nope. Fortunately I have a mole at Jetbrains, if not I'd spend half my life trying to figure things out.
18:27cflemingHaving a mole gets that down to around a quarter or so.
18:27technomancyis kotlin also designed for zero runtime overhead?
18:27talios:) It's a shame the wiki doesn't get maintained more for the OpenAPI
18:27taliostechnomancy - there's a small runtime lib with the core classes/annotations etc.
18:27cflemingtechnomancy: Not quite I think, but it's pretty low.
18:28taliosthere's also a minimal stdlib. that was one of the nice things with Mirah
18:28cflemingYeah, I liked that about Mirah
18:28technomancymirah has literally zero
18:28technomancyat least when I looked at it
18:28cflemingI have no idea how stable Mirah is these days - I always liked the idea.
18:29taliosIt came to mind after spotting http://sjhannah.com/blog/?p=331 - a new Mirah plugin for Netbeans. And a screencast showing writing iPhone apps.... in Mirah
18:29cflemingHow did they do that? Does Mirah compile to Java or bytecode?
18:30talioscfleming - mirah goes to bytecode, with the option of generating .java files on disk
18:31cflemingOk, did they use j2objc?
18:31taliosThere's also a simple maven plugin - https://github.com/mirah/maven-mirah-plugin - the language itself doesn't appear to have changed much ( if at all ) since it's last release
18:31cflemingWhen was that?
18:31talioscfleming - for the iOS stuff? Not sure - it's using http://www.codenameone.com/
18:32talioscfleming - oh wow - 08-Aug-2014 the the last mirah deploy to maven central.
18:32taliosinteresting
18:32taliosI wonder whats actually changed.
18:34turbofailso i just found out the process control computer for the chernobyl plant was called "SKALA"
18:41talioslolz
18:42cflemingtalios: So does Mirah have no stdlib?
18:42talioscfleming - nope.
18:42cflemingInteresting.
18:42cflemingDoesn't everyone end up re-implementing map and filter, then? Or are there non-standard stdlibs?
18:43taliosmap and that seem to be build into the language
18:44tadni_You'd think this would be a natural next step.
18:44cflemingtalios: hmm, not sure I like that - I think I'd prefer a (small) stdlib, to be honest.
18:44cflemingtadni_: startup time is the issue.
18:45cflemingtadni_: There are some efforts underway to fix that - 1.7 will hopefully be a bit better.
18:45tadni_I suppose that's why one might see a play-clj game on Android too ... load times can be partially justified.
18:46taliosmmm, didn't realize Mirah had macros. nice,.
18:47cflemingtalios: Ruby syntax *and* macros - the worst of all possible worlds for editor support :-)
18:47technomancyalso the compiler had to boot all of jruby
18:47technomancywith no incremental compilation support or caching
18:48cflemingYeah, I think compile time is an issue for Kotlin too right now, I don't think it's incremental yet.
18:48cflemingAlthough they're targeting Java compile speed and incremental compilation, so sooner or later it should be nice.
18:50technomancyyeah... I was briefly interested in Mirah because it seemed it might make mobile development less painful... but it's going to take a lot more than a programming language to do that
18:51talioscfleming - it's faster than Scala's compiler :) But I also think thats in large part to people doing multi-module builds all the time with the type checker is forced to infer everything. I'd imagine .jar dependencies would also be resolved.
18:52cflemingFaster than Scala's compiler?!?! Way to set the bar low...
18:53technomancyFaster compilation times than Scala; better language semantics than Java, less cryptic error messages than Clojure--this language has it all.
18:55aperiodictechnomancy: don't forget a richer numeric type system than javascript
18:57taliostechnomancy - it has no Eclipse support, so Kotlin will still fail )
18:58technomancynom
18:59taliosI saw it pop up again last week - didn't think it was still being maintained
18:59technomancyit's a very impressive project for a one-man show
18:59cflemingErjang? I think so.
18:59cflemingThat it's being maintained, that is.
19:00cflemingIt's amazing how well the lightweight threads work on the JVM.
19:00taliosa lot of these languages are - I really like the look of yeti as well ( altho, I don't like the if/elif style syntax ) for a nice ML style JVM language. Still only 1-2 people.
19:00cflemingThere's actually a new release of OCaml-Java out there too.
19:00taliosand sadly never published to maven-central, someone even wrote a maven plugin for it, also unpublished. so kinda hard to just "hey lets try this"
19:01cflemingRelatively recently.
19:01talioscfleming - nice, the last few updates have been interesting. Interop is still an issue I find.
19:01technomancytalios: org.clojars.talios/yeti =)
19:01cflemingtalios: have you tried it?
19:02talioscfleming - only to the point of Hello World :) and looking at what code it generates. The later releases now let you NOT include the prelude/stdlib in the generated code ( they all kinda presume static linking, non-modular jar based things ).
19:04talioscfleming - calling OUT to the java may be fine (ish). but real interop is a two-way story IMHO. If you can't generate JDK annotations somehow, you're hurting interop.
19:04cflemingtalios: Yeah, I suffer a bit in Clojure too TBH
19:05taliostook a long while to get annotation support in clojure, still not sure I entirely like the syntax for it - but there's not much you can do there really.
19:07cflemingI'm a man of simple needs - I'd just like to be able to generate a named class that extends an abstract class.
19:07cflemingWithout resorting to gen-class.
19:08noonianwhats wrong with resorting to gen-class, i thought extending existing classes was the whole reason its in clojure
19:08cflemingIt is, but it's awful to use.
19:09cflemingI'd like something like deftype.
19:09amalloyi don't really use gen-class. if i want to create a class that's not easy in clojure, i just do it in java within the same project, along with producing an interface that my clojure code can reify to cooperate in the process
19:09talioscfleming - (nsclass) as a macro would be nice - but er, how do you import it - unless you have a nested (ns) call :)
19:10cflemingamalloy: Yeah, I create Java classes and then call into Clojure from there
19:10cflemingamalloy: I ended up doing it so much I added support to Cursive for it - I'd still prefer some better interop forms for that though.
19:10juliobarrosIs there an idiomatic way to replace an item in a vector based on a predicate? I have a vec of records and I get an updated one and want to find and swap out the item based on the id. Have a fn working with keep-indexed but want to see if that is written somewhere already.
19:11technomancyis the awfulness of gen-class just that it requires AOT?
19:11technomancy(if so, how is a java class any better?)
19:11cflemingI spoke to Rich about it at EuroClojure, he seemed open to forms similar to deftype and reify that allow class extension, perhaps in an interop-specific namespace.
19:12amalloytechnomancy: a java class is better because it includes something more palatable to a java consumer: some java source code
19:12cflemingtechnomancy: No, the awfulness of gen-class is mostly the syntax.
19:12aperiodictechnomancy: it's more than just that. how it actually maps to a java class & interacts with e.g. protected fields is confusing
19:12cflemingaperiodic: right, and very easy to get wrong.
19:12clojurebotIt's greek to me.
19:12technomancyamalloy: I've never actually wanted that; I've only used it when interoping with APIs that make the questionable design choice of requiring a named class
19:13noonianhow much of a pita is it to add some java source files to an existing leiningen project?
19:13technomancyI mean I can see how that'd be useful in a very specific set of circumstances
19:13amalloynoonian: like a micro-pita
19:13technomancybut I wouldn't summarize that as "gen-class is awful"
19:13cflemingtechnomancy: questionable or not, tons of Java libs require it, especially if you're integrating with a framework.
19:13hiredmanit is though
19:13noonianamalloy: nice, i can usually handle the micro ones
19:14taliosAOT for life baby
19:14amalloytechnomancy: as someone who works with java developers regularly, i need that a lot more often than i need to deal with something that wants a named class
19:14amalloylike, i define some interfaces in java, and one stub class for calling clojure functions which reify those interfaces
19:14amalloyand then, tada, two-way interop
19:14technomancy"gen-class syntax is awful, so I'll use java syntax instead" doesn't make any sense either
19:15cflemingtechnomancy: sure it does.
19:15noonianlol
19:15taliosthat, or a guice module
19:16cflemingTo extend an abstract class, generally I need less code to do it in Java and call into Clojure than with gen-class.
19:16SegFaultAXIt makes sense if you think of it like: it's going to be awful no matter what, so at least I can make it natively awful.
19:16technomancy"I don't like oatmeal, so I'll eat dirt instead"
19:16amalloyi just can't ever read "guice" without imagining it pronounced as "gwice"
19:16aperiodictechnomancy: it's more "I don't want to force everyone to learn how gen-class maps to a java class, I'll just write a java class instead"
19:16technomancyaperiodic: I get that sometimes social considerations trump technical ones, sure
19:17cflemingPlus if you're talking Java consumers, you can Javadoc a stub class.
19:18cflemingtechnomancy: which is the oatmeal, and which is the dirt, is the question.
19:19talioscfleming - can't you use deftype tho?
19:19cflemingtalios: Only if it's an interface, and even then I can't use it because deftype'd classes don't require their namespaces on class init.
19:20cflemingtalios: About half the things I need to implement are abstract classes, no joy there.
19:20amalloyhonestly building named classes with gen-class is less pleasant than doing it in java, imo. use clojure for what it's good at, and java for what it's good at
19:20talioscfleming - true. that require bug is one that shoudl really be fixed. import should implicitly require imho - somehow.
19:21cflemingamalloy: Right, exactly.
19:21talioscfleming - a variant of (proxy) that let you add arbitrary methods would be good.
19:21cflemingtalios: there's a Jira, it's slated for 1.7 I think.
19:22cflemingI'd like a fast version of proxy too, since I never actually use the proxying features (i.e. reify, but allowing extension).
19:22aperiodictechnomancy: the problem with gen-class is that it is an abstraction around java classes that is complicated and for which there exists no payoff for learning, other than you can create a java class in clojure in a way that is harder to understand than just creating the java class in java.
19:23amalloyit just occurred to me: is there even a version of reify in java that allows implementing multiple interfaces? i know you can use a local named class, or new up an anonymous instance of a single interface, but i don't know of a way to anonymously implement several interfaces
19:23aperiodicalso it brings AOT in all its transitive goodness along for the ride
19:23cflemingamalloy: I don't think so, no.
19:23noonianguice rhymes with grease right?
19:24technomancyaperiodic: that's not a fair comparison, a java class that calls clojure code also requires AOT
19:24taliosaperiodic - IMHO, if you're doing heavy java interop, embrace AOT.
19:24technomancy(or runtime resolution, which would also not require AOT in gen-class)
19:24pdkwhat context noonian
19:24pdkor do you mean guise
19:24amalloywe were talking about google gwice earlier, pdk
19:24amalloyrhymes with rice
19:26noonianah
19:26noonianthanks
19:26nooniani've mainly seen the word guice in stacktraces when using pallet
19:26aperiodictechnomancy, talios: alright, strike the AOT point then (though sometimes you're just gluing together other java components and writing the java class can let you avoid AOT entirely)
19:26amalloynoonian: it's actually supposed to be pronounced like juice
19:27technomancyaperiodic: I don't see the point of avoiding non-transitive AOT though
19:27amalloybut that pronunciation is so silly i pick other vowel sounds instead
19:27technomancyI mean, there are problems with reloading, sure. but they're the same problmes you have with a raw java class.
19:27noonianhuh, kind of like the Oneders
19:28amalloyyou mean the oh-nedders?
19:28aperiodictechnomancy: you still end up with a transitively-compiled clojure.core at the very least, right?
19:29technomancyaperiodic: that's unavoidable =)
19:29noonianamalloy: yep :)
19:29technomancyclojure.core is always AOT'd
19:29taliosIMHO the only real problem with AOT is you end up with binary compatibility issues, landing you in the same camp of scala was. And depending on your runtime environment ( say OSGi ) - you almost always need to AOT first anyway to save pain.
19:30technomancytalios: it leads to really painful reloading problems if you use protocols
19:30aperiodicok, totally strike the AOT point then
19:31taliostechnomancy - doh. mind you - hot swapping code in the JVM gives you gnarly problems at the best of times too
19:31justin_smithtalios: thus tools like jrebel, right?
19:32technomancytalios: this is exactly the problem vars were designed to solve
19:32technomancythey do an awesome job
19:32technomancyit's everything-that-isn't-a-var that sucks at it
19:33taliosjustin_smith - you say that llike jrebel actually works 100% :)
19:33technomancyliterally the only reason vars exist
19:33llasramNarm. Why does melpa-stable list packages for which it does not actually have packages :-(
19:33justin_smithtalios: I have no idea whether it even works, actually
19:33technomancyI feel like if people really understood vars, they would be more hesitant to reach for other things.
19:34taliosjustin_smith - for the most part it does, tho I've heard some nasty stories for some of its integration. I see they also killed their live-rebel project, with an interesting analysis of the failed commercial project
19:35cflemingtalios: I don't think JRebel would work with Clojure anyway, since you'd end up with the reloaded class in different DynamicClassLoaders.
19:35taliostrue
19:36cflemingI don't know how it handles multiple loaded versions of a class with the same FQN.
19:37technomancyit would be interesting to construct a type that had a reified notion of schema change over time
19:37technomancyso you could have multiple versions of it resident at once with declaratively-generated conversion functions between any two versions
19:39cflemingtechnomancy: at my last job we implemented something fairly similar to that on top of OSGi.
19:39cflemingIt's basically a nightmare.
19:39technomancyit sounds like it would be horrible for classes that conflate data and behaviour
19:40cflemingEven just for data it's pretty bad, if there are dependencies between the data in more than one object.
19:40technomancyerlang has a very primitive version of this with code_change, but it only works with a maximum of two versions at a time
19:40technomancy(because it only exists in order to support hot-deploys)
19:41tbaldrid_technomancy: Joe Armstrong admitted in some talk recently that that was a GC issue and that if they had it to do over again it would be unlimited.
19:41technomancytbaldrid_: huh, interesting
19:41tbaldrid_GC or something related to some implementation detail of the VM like the number of bits in some flag or something
19:42technomancyimplementation details like "it was the 80s; it seemed like a good idea at the time"
19:44justin_smithyet another connection between excessive usage of hairspray, spandex, cocaine, and erlang
19:56ncthom91hi all. How do you use `with-redefs-fn` on a method of an object?
19:56hiredmanyou don't
19:56hiredmanever
19:57ncthom91hiredman for real?
19:57hiredmanwith-redefs* are for mocking/stubbing/etc in tests
19:57ncthom91yep, that's what i'm using it for
19:57amalloyspecifically, for mocking clojure functions
19:57amalloyand methods on objects are not clojure functions
19:57hiredmanright
19:58hiredmanthere you go
19:58ncthom91ah. I'm working in clojurescript and I was planning on mocking out node's `fs.readFile`
19:58ncthom91is there a sane way to do that?
19:59justin_smithncthom91: by using a wrapper that is a proper function (thin wrapper) and mocking that?
19:59hiredmanah, clojure script is another kettle of fish
19:59hiredmanit may just work
19:59hiredmanfs.readFile is a global function?
19:59ncthom91justin_smith that's a possibility
20:00ncthom91hiredman not quite, i have `(def fs (js/require "fs"))` at the top of my file
20:03ncthom91also, would anyone be willing to help me try to understand core.async? I have a simple read-file function (http://pastebin.com/ypB4ty3Y) and I'd like to switch it to use the async `readFile` rather than the sync one
20:04dnolen_ncthom91: hm, looks like that would just work
20:04dnolen_ncthom91: using with-redefs-fn in CLJS that way
20:04ncthom91dnolen_ oh sweet
20:04dnolen_ncthom91: you can write a generic Node.js callback adapter since all functions work the same way
20:05dnolen_it can take a normal Node.js function and return a channel returning fn instead
20:05dnolen_you just have to choose how to handle errors, in the case of Node.js I would probably just write the error value onto the channel
20:05dnolen_basically the same thing that people do to adapt Node.js fns to promises
20:07ncthom91dnolen_ so, a few questions: If I use `with-redefs-fn`, how do I reference the fs.readFile method without calling it?
20:07ncthom91(I'm a hardcore clojure & clojurescript newb)
20:07dnolen_fs.readFile
20:07ncthom91oh. really?
20:08dnolen_yes
20:11cflemingdnolen_: The next drop of Cursive has your indentation fix.
20:14ncthom91dnolen_ hiredman so this passes: http://pastebin.com/5HF9heSW :)
20:14ncthom91throws an exception for some reason, but still passes
20:19dbaschncthom91: you're missing parentheses around is
20:37ncthom91hm.. jk, it wasn't working. This warning is currently getting me: WARNING: Use of undeclared Var bundleup.test/with-redefs-fn at line 12 test/bundleup/test.cljs
20:38ncthom91think it has to do with that i'm using cemerick's clojurescript test library
20:52yedi_so with transducers, why is the transduce function necessary?
20:52yedi_why not just use into, and then reduce the result
20:52yedi_is it only for sugar?
20:53justin_smithyedi_: why into anything?
20:53justin_smithwhy create a structure that you immediately discard?
20:53llasramIf anything its the `into` version somewhat superfluous
20:54yedi_hm, good point
20:58yedi_man transducers seem both incredibly simple, easy to use and mad useful
21:01llasramI mostly agree. I'm a bit worried there might be practical composibility issues, and do think the addition as new arities of existing functions is pretty warty
21:01yedi_warty yes, though its kinda cool that it just works
21:01yedi_i have a question regarding the end of this: http://gigasquidsoftware.com/blog/2014/09/06/green-eggs-and-transducers/
21:02yedi_she makes the sam-i-am-chan and then makes another channel that reduces the elements sent through the sam-i-am-chan
21:02yedi_why do you need to create the reduce channel?
21:03yedi_won't the channel only ever have one element go through it, since everything that comes through the initial channel gets reduced into what will come out the reduce-channel
21:03yedi_or is it more like
21:04yedi_it reduces everything that has been sent into the channel and only keeps a buffer of one element, once you take! from the reduce channel it starts again with a new result
21:04yedi_and reduces all the new stuff coming in to that new result
21:04yedi_(not sure if any of that made sense)
21:11amalloyyedi_: do you mean the result-chan? there's no reduce-chan in that article
21:12amalloyand yes, there will only ever be one thing written to the result-chan. you create that channel so that you can read that one value. how else would you propose doing it?
21:13yedi_yea i mean the result-chan
21:20hiredmanhttps://gist.github.com/hiredman/d6ea3e30be757fef6da6 vroom
21:24llasramNanoseconds, sweet
21:26justin_smithllasram: all the timings there are in microseconds?
21:26llasramjustin_smith: look again
21:27llasramOh, phhhft
21:27llasramStandard deviation nm
21:27llasramIt's been a long day, he excuses
21:27justin_smithloop looks pretty good in those microbenchmarks
21:30hiredmansure, but loop lacks composiblity
21:30justin_smithright, it's a clumsy tool
21:31RosnecI'm in the mood to watch a good ~1h talk by Rich Hickey
21:31Rosnecany suggestions?
21:32hiredmanin theory I should be able to write a double-filter and slap it in there
21:33hiredmanwrite some macros to generate transducer combinators for a given type and then generate them for all the jvm primitives
21:35dbaschRosnec: http://thechangelog.com/rich-hickeys-greatest-hits/
21:35Rosnecdbasch: awesome
21:36RosnecI think I'll watch hammock driven development
21:39amalloyheh. the disassembly for (loop [] (recur)) makes me chuckle. public Object invoke(); 0 goto 0; 3 areturn
21:39justin_smithamalloy: nice
21:40amalloyit couldn't really be otherwise, i guess, it just seems funny that (a) 0 goto 0 is an allowed instruction, and (2) you still have to return afterwards so that the verifier doesn't complain
21:41amalloyor anyway i presume the verifier is the reason that this silly areturn is there. maybe the clojure compiler just adds it for good measure
21:43justin_smithalso, the fact that it is annotated to return Object
21:43justin_smithI guess everything in Clojure does
21:43justin_smith*almost
21:45dbaschjustin_smith: that's probably why the areturn is there
21:49amalloythe weird thing, dbasch, is it seems to me like that areturn should actually be illegal: there's nothing on the stack to return. compare to #(loop []), which reads like: 0 aconst_null; 1 areturn
21:50justin_smithI guess everything is permitted for instructions that won't actually get invoked (but then, why is the instruction there?) http://i143.photobucket.com/albums/r151/ll_Crayola_ll7/Emotes/iiamicon2.gif
21:58dbaschamalloy: I guess it depends on the interpretation of "If the method returns a reference type, it must do so using an areturn instruction, and the type of the returned value must be assignment compatible (JLS §5.2) with the return descriptor (§4.3.3) of the method."
21:59dbaschwhat is the sound of an infinite loop in a method that claims to return Object?
22:43wildnuxhi, can i create two funtions with same name and same number of arguments but for different types of arguments in clojure?
22:44wildnuxlike overloaded methods in java?
22:45llasramwildnux: Not exactly, but you can create one function with multiple argument arities
22:45yedi_i'm trying to play an audio file from the browser in clojurescript leveraging this: https://developer.mozilla.org/en-US/docs/Web/API/HTMLAudioElement
22:45llasramwildnux: And you *could* create a multimethod which dispatched based no the number of arguments, although that would be unusual
22:46yedi_I tried doing '(def m1 (Audio. "resources/metronome.wav"))', but the Audio. fn is undefined
22:46yedi_anyone come across this b4?
22:46wildnuxllasram: multimethods needs protocol or some structure right?
22:47wildnuxllasram: i just want a simple function which works on multiple types of entites
22:52llasramwildnux: Can you be more specific about what you're trying to do?
22:54wildnuxllasram: just a simple example, i want to write a funtion "in?" which can take one element or a list/vector/seq of elements
22:55wildnuxllasram: it should check if that element is present in the specified seq for the first case, it should check if all the elements in the list is present in the seq in the second one
22:56llasramwildnux: What you're describing is still kind of ambiguous. The Java-style dispatch where the search element(s) would dispatch based on type (collection or not) would require a multimethod or explicit checks in Clojure
22:57llasramBut you can easily dispatch on different arities, something like:
22:57wildnuxllasram: aah
22:57llasram(defn in? ([coll x] ..) ([coll x & xs] ...))
22:57llasram(minus the fact that that would be an unusual argument order)
22:58llasramThe latter sort of definition frequently lends itself to a recursive definition, which via `recur` can compile to a tail-recursive form
22:59wildnuxllasram: can i pass a list to a vararg function?
23:00llasramI know that's just an example, but do also consider that higher order functions and function composition make that sort of thing less useful
23:00llasramIf you have the single-element version of `in?` (which is basically `contains?`)
23:00wildnuxllasram: contains? does not work as 'expected' for list :D
23:01llasramEr, yeah, sorry -- injecting confusion. `contains?` is for maps and sets, guaranteeing O(1) look-up
23:01wildnuxllasram: one more question,
23:01wildnuxi wrote in? and all-in? (for list)
23:01llasramList to a var arg function... You mean `apply`?
23:02wildnuxllasram: what will be the best way to write a funtion which loops on a list and then returns the matching one based on the funtion passed
23:02llasramIf I understand you correctly, usually `some` or `(comp first filter)`
23:02wildnuxlike (defn find-matching #(...) bigseq tosearchlist)
23:03wildnuxllasram: that should return the list of matching ones
23:03llasramNot completely following. Could you provide an exact example of argument and what you'd expect the result to be?
23:03llasramarguments even
23:04wildnuxllasram: (find-matching #(= % %) [1 2 3 4 5] [1 2 5 0 11] ) should return (1 2 5)
23:05jtacketthey how do you bold something in a text area?
23:05jtackettlike the code for bold in a string
23:06llasramwildnux: So the intersection of the distinct elements in the two collections?
23:06wildnuxllasram: yes :D
23:06llasramAnd in the order the appear... in the second collection?
23:06wildnuxllasram: does not matter
23:06jtackettthere is a function called intersection
23:07llasram,(require '[clojure.set :as set])
23:07clojurebotnil
23:07wildnuxllasram: (find-matching #(= % %) [1 2 3 4 5] [1 2 9 10 5 0 11] ) can also return (1 2 5)
23:07wildnuxllasram: ok
23:07llasramwildnux: What's the `#(= % %)` for? (which BTW is pretty much the same on its own as just `=`)
23:08llasram,(set/interection (set [1 2 3 4 5]) (set [1 2 5 0 11]))
23:08clojurebot#<CompilerException java.lang.RuntimeException: No such var: set/interection, compiling:(NO_SOURCE_PATH:0:0)>
23:08llasram,(set/intersection (set [1 2 3 4 5]) (set [1 2 5 0 11]))
23:08clojurebot#{1 2 5}
23:08llasramSpelling helps
23:08metellus,(clojure.set/intersection (set [1 2 3 4 5]) (set [1 2 5 0 1]))
23:08clojurebot#{1 2 5}
23:08llasramIf you have one large sequence, you can also do the same thing manually:
23:08metellusoh, llasram just did that
23:09wildnuxllasram: the #(= % %) was just an example
23:09llasram,(filter #{1 2 3 4 5} '[1 2 5 0 11 lots more])
23:09clojurebot(1 2 5)
23:09llasramwildnux: Well, yes -- but of what? :-)
23:09wildnuxllasram: i want to be able to find anything that matches
23:10llasramwildnux: That's the part I'm trying to understand. You want to define your own custom match predicate, which might be different from (hash) equality?
23:11llasramIf so, then you're stuck doing the Cartesian product of your two sequences and applying your match function to (asymptotically) every pair
23:12wildnuxllasram: i will give you a real world example, I have two list of records (or objects or whaterver), now i want to find the intersection between those two lists where somefuntion (eg: any element of list 1 is square of any element of list 2)
23:12wildnuxllasram: yes
23:16llasram,(defn find-matching [f es coll] (filter #(some (partial f %) es) coll))
23:16clojurebot#'sandbox/find-matching
23:16llasram,(find-matching #(= %2 (* %1 %1)) [16 25] (range 20))
23:16clojurebot(4 5)
23:16llasramSo like that then?
23:25ncthom91hey all. I'm working on a node/cljs project and trying to get a simple core.async read-file example going per http://bryangilbert.com/code/2013/07/19/escaping-callback-hell-with-core-async/. So far, I've got http://pastebin.com/Ms72g8Y3, but the return value is #<[object Object]> rather than the file contents and I'm confused about what i'm doing wrong
23:35seancorfieldyogthos do you hang out in #clojurescript or just here?
23:36yogthosseancorfield: mostly here, I suppose I should join cljs as well :)
23:36seancorfieldnow you're maintaining some popular cljs libraries :)
23:37yogthosseancorfield: oh oh! :)
23:38wildnuxllasram: how can we remove whitespaces from the middle of a string? like 'Ihave spaces \t\n in the string" to "ihavespacesinthestring"
23:39jajuyogthos: thanks for your cool libraries!
23:40yogthosglad they're getting some use :)
23:40jajuseancorfield: thanks for the nice write-up on your move to reagent
23:40Jaoodis reagent still being maintained?
23:40jajuyogthos: I find your libraries very much useful and good guides for learning nice tricks too!
23:40seancorfieldbtw, took me a while to realize that reagent-form doesn't inherently create a :form tag and/or submit event stuff yogthos
23:41seancorfieldjaju look at Whoops/reagent which is up to date
23:41yogthoswildnux: you can just use replaceAll (.replaceAll "Ihave spaces \t\n in the string" " " "")
23:41jajuNo updates to reagent in a while I can see - but I had no issues moving my react dependency to 0.11.1
23:41jajuThanks Sean! I will.
23:41seancorfieldholmsand has said he will incorporate PRs and make a new release "in a few weeks"
23:41yogthosseancorfield: oh right, I tried to leave as much of it up to the user as possible
23:42seancorfieldWhoops has incorporated all the PRs from holmsand's repo to make a 0.4.3 release with React.js 0.11.1
23:42wildnuxyogthos: :D yeah.. i suppose i can do that :::::
23:42yogthosjaju: glad to hear it, most of it tends to come from stuff I end up doing at work, it's nice to be able to open source so much stuff :)
23:43yogthoswrt to Reagent maintenance, I do recall Dan mentioned that he'd be happy if more people jumped on the project
23:44yogthosit definitely looks like it's becoming a very important cljs lib and a lot of people are using it for production apps now
23:45jajuI started with reagent because i couldn't grok Om - I am not a JS guy. Reagent was immediately useful and found myself becoming productive. But over time, I was wondering why it wasn't appearing to pick up. Reagent-form and the recent discussions on the mailing list made me quite relieved :)
23:48yogthosI think stuff like Reagent is exactly what's needed for demonstrating why cljs is so great, it's extremely intuitive and you can pick it up in minutes
23:49yogthosI'm training a co-op student at work right now, she's never done any Clojure before and was able to start doing stuff with it in days
23:49Jaoodyogthos: you need know a compojure rest api tutorial to complement the single paga apps tutorials ;)
23:50Jaoods/know/now
23:50yogthosJaood: good call, compojure-api would be my recommendation currently https://github.com/metosin/compojure-api
23:50yogthosI'll try put something together about using it
23:51Jaoodawesome