#clojure logs

2014-12-14

00:22arrdemdo we have a function (app f fs) -> g | (g y) = true iff ∀h∈fs (h y) = true
00:23arrdemso a function that returns a function returning the logical conjunction of the argument functions over input
00:24arrdemevery-pred
02:02justin_smith&(apply str (sort (str (java.util.UUID/randomUUID))))
02:03justin_smith,(apply str (sort (str (java.util.UUID/randomUUID))))
02:03clojurebot"----000011223445555777888bbcccddeeff"
02:46sveriHi, I am trying to offer binary downloads from my ring application. However, I am doing an async request with cljs-ajax and all I get is the content of the file, but not an option to download it
02:48justin_smithtry :headers {"Content-Description" "File Transfer" "Content-Type" "application/octet-stream"}
02:49justin_smithyou may also want "Content-Disposition" "attachment; filename=\"foo.jpg\""
02:50justin_smithalso, it may be that you can only get the download popup if you provide the content via a link the user clicks...
02:50justin_smiththis may be a "security" thing
02:53sverithats what I am afraid of too
02:54sveriadding your headers produces the same result
02:56sveriAh, It's not easily achievable from javscript side
04:25hydoIs there something special I need to do to reference the .class made with gen-class from another class made with gen-class? The lib I'm writing is a plugin to a larger java program, and I'm gen-class'ing its entry point and in it trying to attach an event listener which is another gen-classed class. heh
04:26hydoso.. many.. classes.
04:43hydoAfter more research a better question is: Is there something special I need to do to use a class literal that references a gen-class'ed class - inside a class that will itself be gen-classed?
04:44SagiCZ1hydo: what problem do you have_
04:44SagiCZ1?
04:46hydoClass A is an event listener that subclasses a java class. I seems to build just fine. The project is a plugin to a larger java program - Class B is its entry point and is itself gen-classed. Inside Class B's init method, I need to use a class literal to point to Class A. Upon compilation, it can't find Class A's .class. It is being compiled first, so there's that.
04:46SagiCZ1are you using leiningen?
04:46hydoYes
04:47SagiCZ1did you specify in project.clj that the classes should be :aot ?
04:47hydoI've got :aot :all
04:47hydojust in case. heeh
04:47SagiCZ1ok
04:47hydoFrom the repl, I can (compile the.class)
04:48SagiCZ1and in classes A, B you have (ns ... (:gen-class)) correct?
04:48hydoerr, the event listener in question.
04:48hydoCorrect.
04:49SagiCZ1i would maybe try to isolate the problem by quickly making a toy project with just those two classes without being run as a the plugin..
04:50hydoOk, I'll get some more coffee and do that. Thanks!
04:50SagiCZ1hydo: np
05:11hydoSagiCZ1: One last question: is there anything I need to do to make a class literal or is it as easy as (.registerEvent "event-name" my.class.literal.class)?
05:12hydoie. the bare my.class.literal.class
05:19Glenjaminhydo: it's just my.class.literal
05:19Glenjamin,String
05:19clojurebotjava.lang.String
05:20hydoHah... I tried that and it built. was just about to test it.
05:20hydoThank you, Glenjamin :)
05:55marrrkCan you combine kioo and hiccup? I mean generate the html for use with kioo from hiccup?
06:16lxsameerhey guys, Lein complain about network is unreachable. here is my lein output http://dpaste.com/3JB34JZ
06:16lxsameerhow can i fix it ?
07:28bitcrushercan't get clj-webdriver to click this button :x
07:41bitcrusheris there a good web automate library
07:41bitcrusherbesides clj-webdriver
07:42bitcrushertrying to make a script to turn my steam items into gems, got logged in and into my inventory, but i can't figure out how to make it click the "Turn into Gems..." button
07:46TEttingerbitcrusher, you could probably do it with a plain AWT robot
07:46TEttingerassuming you let it use your mouse
07:51bitcrusherhmm, not as cool
07:51bitcrushermight as well just click it with my own fingers
07:52bitcrushergonna try it in python :/
08:03bitcrusheroh this is neat.. http://sebuilder.github.io/se-builder/
09:09zarkonehello all. I
09:10SagiCZ1zarkone: whats up
09:10zarkone*hello all. I'm new to clojure and never used java. What i better should read about java internals?
09:10zarkone
09:11SagiCZ1zarkone: well some short introduction to java types could be helpful.. i dont think its completely necessary
09:12SagiCZ1its good to know how primitives, arrays and collections work.. dont bother reading about java inheriting, polymorphism etc
09:12zarkoneSagiCZ1: thanks. I thought, may be some books about JVM and standart java api
09:13SagiCZ1the more you know the better.. but if you want to save time, i would jump straight into clojure and learn only bits and pieces of java where you feel the need
09:14zarkoneSagiCZ1: ok, that's how i'm learning it now =)
09:14SagiCZ1zarkone: if you want some tips regarding learning clojure, check out 4clojure..
09:26zarkoneSagiCZ1: ok, thanks =)
09:28justin_smithzarkone: the javadoc api docs are sufficient, and comprehensive
09:28justin_smithzarkone: except when it comes to primitives and arrays, it is helpful to learn how those relate to everything else
09:29justin_smithzarkone but the official java tutorials cover that stuff I think
09:29SagiCZ1yeah the basic tutorials usually start with the.. well basics
09:32SagiCZ1can swap! block the thread?
09:32justin_smithSagiCZ1: no, but it can cause crazy amounts of retries, in a pathological situation
09:32justin_smithI think there is a hard-coded retry limit
09:33SagiCZ1so yeah, that could look like blocking..
09:33justin_smithSagiCZ1: it does a CAS - notes the value, does it's operation, and compares, and does the set only if the value has not changed yet, otherwise it starts over as a retry
09:33justin_smith*its
09:34justin_smithI know the docs say "no side effects in the operation" but if you added a println you would see how many times the swap is retried
09:34SagiCZ1good idea
09:38martinklepschis there a one-line way to see what files are in a given clojars dependency?
09:39justin_smithmartinklepsch: if you have it on disk jar tf ~/.m2/repository/path/to/file.jar
09:39justin_smithmartinklepsch: also, a decent editor will open the jar itself for editing
09:39justin_smithit's just a zip file with a specific format
09:40justin_smith(emacs and vi can both open jar files)
09:40martinklepschjustin_smith: yeah, I know about that I just wondered if it's possible to get that information potentially even w/o downloading
09:40justin_smithmartinklepsch: oh, no idea
09:40justin_smithpaying by the byte?
09:44martinklepschjustin_smith: hehe, luckily noy
10:17SagiCZ1i need to separate a sequence into some subsequence.. something like take-while does, but take-while only give me the first subsequence.. how can i get all?
10:17SagiCZ1maybe split-with?
10:17SagiCZ1split-with is probably the one
10:19stephenmac7Does something like this exist in the standard library?
10:19stephenmac7(defn comp-all [& fs] (reduce comp fs))
10:20stephenmac7,(((fn [& fs] (reduce comp fs)) #(- % 5) #(* % 5)) 6)
10:20clojurebot25
10:20SagiCZ1no.. split-with only splits it into two colls :(
10:22luxbock,((comp #(- % 5) #(* % 5)) 6)
10:22clojurebot25
10:23justin_smith,(partition-by #(quot % 3) (range))
10:23clojurebot((0 1 2) (3 4 5) (6 7 8) (9 10 11) (12 13 14) ...)
10:23justin_smithSagiCZ1: like that?
10:24SagiCZ1justin_smith: yeah i figured group-by, but this is even cleaner.. thanks
10:24justin_smithgroup-by is a little odd
10:25justin_smith,(group-by odd? (range 10))
10:25clojurebot{false [0 2 4 6 8], true [1 3 5 7 9]}
10:25SagiCZ1is that wrong?
10:25justin_smithI mean for the collection splitting, because it's totally out of order
10:25justin_smithbut maybe that is OK for your usage
10:25SagiCZ1true
10:26SagiCZ1,(partion 2 (range 10))
10:26clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: partion in this context, compiling:(NO_SOURCE_PATH:0:0)>
10:26SagiCZ1,(partition 2 (range 10))
10:26clojurebot((0 1) (2 3) (4 5) (6 7) (8 9))
10:26SagiCZ1what would be the most idiomatic way to get the 5 out of (4 5) <
10:26SagiCZ1?
10:26engblom`What is Clojure doing differently than other lisp implementations running on jvm? ABCL takes ~3 seconds for REPL, Kawa <1 second and Clojure takes ~6 seconds.
10:27SagiCZ1engblom`: it sends a thank you e-mail to rich hickey
10:27justin_smithSagiCZ1: second maybe?
10:27SagiCZ1,(nth '(4 5) 1)
10:27clojurebot5
10:27SagiCZ1yeah ok
10:28justin_smithengblom`: If you don't use nrepl you can get startups like the others
10:28justin_smith~faster-lein
10:28clojurebotPardon?
10:29justin_smithengblom`: some good hints here, the biggest difference is the one made by whether you run nrepl or not, in my experience https://github.com/technomancy/leiningen/wiki/Faster
10:29justin_smithwe should look into optimizing nrepl startup time
10:30engblom`justin_smith: Thanks!
10:30justin_smithfast trampoline helps a lot too
10:30justin_smith(skipping the time lein takes to build the class path, if nothing changed since last run)
10:32SagiCZ1,(group-by odd? (range 10))
10:32clojurebot{false [0 2 4 6 8], true [1 3 5 7 9]}
10:32SagiCZ1how do i get the ones that are true? its not a keyword so..
10:32SagiCZ1,(true (group-by odd? (range 10)))
10:32clojurebot#<ClassCastException java.lang.ClassCastException: java.lang.Boolean cannot be cast to clojure.lang.IFn>
10:32justin_smith,((group-by odd? (range 10)) true)
10:32clojurebot[1 3 5 7 9]
10:33SagiCZ1wait so it works the other way?
10:33justin_smith,(get (group-by odd? (range 10)) true)
10:33clojurebot[1 3 5 7 9]
10:33justin_smithboth are just calling get anyway
10:33justin_smithno reason not to do get explicitly
10:33SagiCZ1i was taught to always use (key map) to get values from map
10:33SagiCZ1not the other way around
10:34justin_smithSagiCZ1: sets, maps, vectors, keywords, and symbols all implement get when used as a function
10:34justin_smith,('a '{a 1})
10:34clojurebot1
10:34SagiCZ1,('false {false [1 2]})
10:34clojurebot#<ClassCastException java.lang.ClassCastException: java.lang.Boolean cannot be cast to clojure.lang.IFn>
10:34justin_smiththat's not a symbol
10:35justin_smithand if it was, it wouldn't match the non-symbol in the map
10:35justin_smithjust use get
10:35justin_smith,([:a :b :c] 1)
10:35clojurebot:b
10:36SagiCZ1okay :(
10:58justin_smith,(map (vec (range 20 0 -1)) (range 7 15))
10:58clojurebot(13 12 11 10 9 ...)
11:11csd_How would I express in loop/recur a mathematical function such as f(n) = f(n-1) + 2f(n-2) ...
11:14csd_namely, i don't know how to handle the recursive function being called multiple times. would i need mulitple loop/recurs?
11:14SagiCZ1csd_: you could use named recursion
11:14SagiCZ1without recur
11:14SagiCZ1if n is not big enough to blow up stack
11:15csd_SagiCZ1: I am trying to express this as an iterative process.. doing SICP exercises :)
11:16csd_maybe i need trampoline
11:16SagiCZ1csd_: i was thinking about it yeah
11:19justin_smithcsd_: (nth (iterate #(* 2 %) x) y) ?
11:19justin_smithor maybe you want + and not * for that, depending on whether it is 1,2,3 or 1,2,4
11:24csd_trampoline is giving me an error, i think the function might be too intertwined for it :-/
11:24justin_smithcsd_: what kind of error?
11:24csd_ClassCast Exception, saying I'm trying to treat a function as a number
11:25csd_https://www.refheap.com/94889
11:27justin_smithcsd_: (+ (f (- n 1)) ...) - (f (- n 1)) probably returns a function
11:27justin_smithyou are trampolining, remember
11:27justin_smithbut self calls inside trampoline are gonna be weird
11:27csd_ultimately though it should return a number
11:28csd_I haven't used trampoline before
11:28justin_smithcsd_: f returns a function
11:28justin_smithOK, ignore the trampoline part for now
11:28justin_smithf returns a number or a function
11:28csd_right
11:28justin_smitha self call inside f, needs to handle a number or a function
11:28csd_sure
11:28justin_smithso you can call trampoline recursively, or reorganize your code
11:29csd_what needs to be done to make it work with trampoline? and/or what should i do instead of using trampoline
11:29csd_i.e. what's easiest here
11:30justin_smith:else #(+ (trampoline (f (- n 1))) (* 2 (trampoline (- n 2))) ...)
11:30justin_smithif all calls to f are trampolined, you at least avoid that error, though I think your stack usage will still be bad
11:30justin_smithbecause by recursively calling trampoline you work around the advantage of trampoline
11:31csd_oh well yeah that's silly
11:31justin_smithright
11:31csd_what if i added an accumulator parameter
11:32justin_smithtrampoline is for replacing deep call stacks with continuation passing
11:32justin_smithgiven that you are just passing numbers, you may want to just memoize f
11:32justin_smithsimilar to the classic fib
11:33justin_smithin fact, the solutions that work for fib should all be adaptable to this function
11:34csd_well there's a really simple solution to the fib sequence that i was trying to emulate here, where a+b is passed as a state parameter
11:40justin_smithI think this is wrong, but getting closer to something reasonable
11:40justin_smith(first (nth (iterate (fn [[acc [a b c]]] [(+ acc (* a 10)) [b c (inc c)]]) 2) n))
11:46TimMc_Haven't read backlog, what's the problem statement again?
11:46csd_ this is what i'm trying to emulate https://www.refheap.com/94891
11:47csd_TimMc_: oh i'm just doing SICP exercise 1.11
11:47TimMc_ok
11:48csd_there's this mathematical function with multiple recursive calls that i'm trying to express using tail recursion
11:49TimMc_Wow, the bots are really in bad shape today.
11:50TimMc,(first (nth (iterate (fn [[a b]] [b (+ a b)]) [1 1]) 5))
11:50clojurebot8
11:51TimMc,(take 10 (map first (iterate (fn [[a b]] [b (+ a b)]) [1 1])))
11:51clojurebot(1 1 2 3 5 ...)
11:51TimMcThat's the standard state-passing version in Clojure.
11:52justin_smithTimMc: there we go, that's what I was aiming for above
11:52TimMc*nod*
11:53csd_TimMc: The problem I'm trying to figure out is f(n) = n where n < 3; otherwise (+ f(n-1) 2f(n-2) 3f(n-3))
11:54justin_smithcsd_: what about that * 10
11:55csd_oh you could have an iterator function that takes as state parameters f(n-1) f(n-2) and f(n-3)
11:55csd_then you start at n = 1 and increment until you get to what the original n was
11:55justin_smithright, that was what I was trying to aim at
11:55csd_i see now
11:55justin_smithcsd_: initial state would be [0 1 2]
11:55justin_smithor maybe [2 1 0]
11:56trissso let's say I want to auto-generate a list of functions for a library and shove them in a name space...
11:56trisshow could this be done?
11:57trissI'll have a list of strings to manipulate to name them...
11:58trisssorely I don't need a defn for every function in the namespace?
11:58justin_smithtriss: you could use intern, if you don't mind wrangling the metadata
11:58justin_smith(doc intern)
11:58clojurebot"([ns name] [ns name val]); Finds or creates a var named by the symbol name in the namespace ns (which can be a symbol or a namespace), setting its root binding to val if supplied. The namespace must exist. The var will adopt any metadata from the name symbol. Returns the var."
11:59justin_smithit's a function, so you can construct the args
11:59justin_smith,(intern *ns* (symbol (str "foo" "bar")) 42)
11:59clojurebot#'sandbox/foobar
11:59justin_smith,foobar
11:59clojurebot42
11:59justin_smith,(meta #'foobar)
11:59clojurebot{:ns #<Namespace sandbox>, :name foobar}
12:00justin_smithnotice it takes an ns as an arg, so you don't even have to be "in" the ns to construct it
12:09trisssplendid thanks justin_smith. I'll have a play.
12:10myguidingstarhi all, in core.logic, is there anyway to declare "these two clauses never succeed at the same time"?
12:10justin_smithtriss: it might be nice to add :file and :line metadata that points to where you do the auto-generation, with a comment on how it works. That way tooling can actually help people.
12:11justin_smithtriss: a common problem with auto-generated stuff is that the metadata that people's tools (like doc, source, editor specific stuff) all break
12:11trissgosh hadn't thought about anything like that.
12:12justin_smithtriss: think about how you find out how libs work - what would you find looking into your own lib?
12:12justin_smithat least have some doc string!
12:12justin_smithcheck out the metadata that def / defn create when you load something from a file
12:13justin_smith&(meta #'+)
12:13justin_smith,(meta #'+)
12:13clojurebot{:added "1.2", :ns #<Namespace clojure.core>, :name +, :file "clojure/core.clj", :inline-arities #<core$_GT_1_QMARK_ clojure.core$_GT_1_QMARK_@82d300>, ...}
12:14Glenjamin~ask
12:14clojurebotThe Ask To Ask protocol wastes more bandwidth than any version of the Ask protocol, so just ask your question.
12:14Glenjamin(wanted the phrasing for another channel)
12:16justin_smithmyguidingstar: I don't know your answer, but I don't want your small question to get lost in all the chatter, maybe someone else here knows core.logic?
12:18myguidingstarjustin_smith, thanks. I've found a good foundation here http://stackoverflow.com/questions/19414335/encoding-two-out-of-three-in-clojure-core-logic
12:39LauJensenQuick question re Clojurescript. When building a cljs app w/o optimizations, I need to include every single .js in my .html file, so /app/om/om.js, /app/transit/transit.js, /app/domina.js, /app/domina/support.js - And so on and so on. Is this correct or due to an error in my setup ?
12:39myguidingstarLauJensen, it's correct
12:40myguidingstarw/o optimizations, each namespace will have an equivalent js file
12:41myguidingstaror you may want goog.require to load them automatically
12:47LauJensenmyguidingstar: How can I use goog.require to do that?
12:48myguidingstarLauJensen, find in Om's Readme the line: "Your local development markup should look something like the following:"
12:48LauJensenthanks
12:56Rhainur1can someone explain how I can integrate friend or buddy with a luminus project?
12:56Rhainur1I'm completely lost
12:57LauJensenmyguidingstar: For something like transit, you'll need about 10 script tags just to load deps, and the order needs to be specific and this is undocumented. It makes little sense to code without optimizations turned on
12:59myguidingstarLauJensen, I thought goog.require will load deps in the right order?
13:00myguidingstaras it infers from dependencies in ns forms
13:18bja_myguidingstar: that is correct
13:19bja_you just need to script include the initial goog closure library along with your script and then load it manually with a third script tag
13:32arrdemreiddraper: ping
13:33arrdemgood lord test.check.gen/symbol emits some evil shit
13:48andyfarrdem: out of curiosity, does it generate symbols that do not conform to the Clojure documentation, or ones that conform, but have weird chars in them that you don't normally use?
14:05arrdem$mail andyf they're legitimate to the clojure docs, so I guess that means my parser is broken :C
14:33TimMcarrdem: How can you tell they're legit?
14:33arrdemTimMc: (read-string (pr-str)) :P
14:33arrdemyay implementation specification
14:34TimMc...
14:34TimMcYeah...
14:34TimMc"Symbols begin with a non-numeric character and can contain alphanumeric characters and *, +, !, -, _, and ? (other characters will be allowed eventually, but not all macro characters have been determined)."
14:34TimMcand then clojure.core/<
14:35arrdemclojure.core//
14:35arrdem:D
14:35andyfVote early, vote often: http://dev.clojure.org/jira/browse/CLJ-1527
14:35arrdemandyf: pretty sure my vote doesn't count at this point but you still have it :P
14:36arrdemyarp. already voted for that one.
14:36andyfweighted vote not so much, but Alex Miller says he looks at tickets sorted by normal vote counts sometimes, too.
14:36andyfwhich is straightforward to get from JIRA already, without my separate report.
14:37arrdemmeh we'll see how feature expressions shake out.
14:37andyfplus, you are allowed to lobby :)
14:49cflemingYeah, Clojure accepts pretty much any old rubbish as symbol constituents
14:49cflemingAnd hence, keyword constituents too.
14:49cflemingThe doc is sadly meaningless.
14:50cflemingOr at least, bears no relation to reality.
14:50andyfcfleming: I don't see your vote :)
14:50cflemingOops, you're right, done :)
14:51cflemingAlthough I'm sure I've voted for another similar issue.
14:51cflemingI'm sure there's a way to see which issues I've voted for, but I can't find it.
14:52andyfOne way is looking at the top voted ticket reports here: http://jafingerhut.github.io/clj-ticket-status/clojure-ticket-info.html
14:52andyfThe generation code remembers how to query JIRA for it, so I don't have to.
14:53cflemingThat is a fine goal for generation code.
14:53cflemingMy weighted vote is probably subject to floating point underflow at this stage.
14:55cflemingActually, according to the report I've only voted for 5? Hmm
14:56andyfcfleming: The number there only includes tickets that are currently open. If you voted for tickets that have since been closed, the remaining tickets you vote for get bumped up a bit.
14:56cflemingandyf: I feel like not many of my issue have ever been closed, but perhaps I'm just feeling petulant :)
14:57cflemingandyf: thanks for the report link, it's very useful. I think I'll be diluting my vote a little more.
14:57andyfExcellent.
15:04yediis there a cljs fn for getting a human readable date string from an instant
15:08yedinvm, ofc the str function just works
15:09yedithought it would be nice if there was a function that let you specify which info in the datetime you wanna display, like a print format option
15:09yedilooks like i might have to make that
15:19dnolen_yedi: http://docs.closure-library.googlecode.com/git/class_goog_i18n_DateTimeFormat.html
15:53luther07term-line-mode
18:16kenrestivowhat's the advantage of using async/thread as opposed to just future? i kinda like using future-cancel
18:17rhg135kenrestivo, it returns a channel with the result
18:18rhg135instead of IDeref
18:18kenrestivoright, but in a loop, i don't care about the result
18:18kenrestivoi'm just while'ing for side-effect
18:19rhg135then you can use a future/Thread/start
18:20justin_smithdoes async/thread use a pool? future does
18:20kenrestivoso if i've got (future (loop [] (let [v (async/<!! some-chan)] (do-side-effecting-stuff v) (recur))), why would i need async/thread and the return value?
18:21kenrestivoall i'll want to do is shutdown that loop. again, forgive me if i'm thinking like a linux sysadmin dealing with daemons, because that's what i am.
18:22justin_smithkenrestivo: realize that you will go into a super fast busy wait with nils if you do it that way, but if you check for nil before the recur, you can automatically cut it short
18:23justin_smith(if/when the channel closes, that is)
18:23rhg135he is corect
18:23justin_smithtake on a closed channel instantly returns nil, you will peak out the CPU doing nothing
18:24kenrestivogood point, i actually am checking that. but i'm still not clear on why future vs async/thread
18:24justin_smithmay as well use channel closing to control your loop
18:24justin_smithdepends on whether you want to use part of the future pool I'd say
18:25kenrestivowhen-let, not let :-)
18:25justin_smithfrequent relatively short lived things? yeah. Something long lived? just use a future, and count on when-let stopping the loop when you get nil on the channel
18:26kenrestivothat's kind of what i figured. just want to make sure i'm not missing anything important, thanks.
18:28kenrestivothe #clojure code review
18:29arrdem#clojure will review just about any code you dare link :D
18:29arrdemhalfbaked ideas are for #clojure-offtopic however
18:30bbloomcsd_: you can't with recur, since the addition is in tail position. recur only works in tail position. you can make a normally recursive function or implement the function with an explicit accumulato
18:31bbloomr
18:47magicantlerHey, has anyone here used clojure as a token-based-auth rest api?
18:48rhg135magicantler, i've been luck to never need authentication
18:49magicantlerSo what type of web-apps have you dealt with then?
18:49magicantlerI was looking to make a mobile back end
18:49magicantlerand I just went through the node.js train and phew...
18:50TEttingerI think Friend is the main lib people use in clojure for auth, but don't quote me on that
18:50rhg135a blog with posts metadata in datomic
18:50rhg135i figured i can add posts locally through a repl
18:52arrdemTo the extent that there is a Clojure auth story, Friend is the only thing I know of
18:53magicantlerWell, if you guys don’t mind me asking, why would one choose to use clojure for a webservice, say over node.js?
18:56rhg135sanity
18:56tickingis there a proper way to match lists in core.match except for (([1 x 3] :seq) :guard list?)?
18:56rhg135i'm not familiar with js but i think 1 + "1" is valid
18:57tickingrhg135: yeah it will give you 11
18:58arrdemWriting the entire "wat" talk off as a low blow, I'd say that people use Clojure because they want to leverage JVM resources without dealing with Java or Scala.
18:58rhg135[] + {} is and i've actually seen it used
18:58hipsterslapfightvalid yes, but known as an awful idea not to be touched
18:58Farewhich if any is cheaper to use as a key, a :keyword, or a "string" ?
18:58tickingFare: :keyword by far
18:59Fareok
18:59SagiCZ1ticking: sauce?
18:59tickingFare: they are interned strings so equality checks should be integer equality ops
18:59arrdemlazybot has abandoned us
18:59arrdemticking: they should be equally expensive
18:59rhg135hipsterslapfight, valid implies will be used
18:59tickingarrdem: really?
18:59Fareok, so I'll tweak my data representation accordingly.
19:00hipsterslapfightrhg135: sure, it could be. i'm saying it shouldn't (and if you know what you're doing, you won't). that's not even the worse of the insane things in JS (though probably one of the top 5)
19:00hipsterslapfightcertainly a bad language for beginners though
19:02rhg135hipsterslapfight, everyone is a beginner
19:02hipsterslapfighthah
19:02rhg135im serious
19:02rhg135what is the distinction
19:03rhg135and does one ever acquire it
19:04hipsterslapfighthmm, i was using "beginner" to refer to the fact that js is often used as a first language for people just getting into programming; something i find very silly.
19:04arrdemwhen you've done a clean room implementation of $LANG you are no longer a beginner at $LANG
19:04SagiCZ1hipsterslapfigh: what would you use as a first language for beginners?
19:04arrdemhipsterslapfight: meh everyone has a JS REPL in their browser. ease of getting started counts for something.
19:05arrdemthat said we have Haskell and Lisp REPLs that run in browsers atop js so..
19:05hipsterslapfightSagiCZ1: something functional, maybe a lisp. i should think on this more
19:05hipsterslapfightarrdem: we sure do, though not quite as easy as js is
19:05SagiCZ1would you say that functional programming makes more sense then imperative for a beginner?
19:06arrdemSagiCZ1: yes in a heartbeat
19:06hipsterslapfightSagiCZ1: definitely
19:06SagiCZ1but everyone can understand imperative sequence of steps.. its like a recipe from a cookbook
19:06rhg135hipsterslapfight, js is a great language for some people
19:06hipsterslapfightrhg135: it's a great language for me, i make my living from it :v
19:06lachenmayeryep... beginners have a surprisingly hard time with the imperative assign "=" operator :)
19:06rhg135it teaches you how NOT to program
19:07arrdemSagiCZ1: sure, but most of those steps turn out to be boilerplate whereas a pure function is directly and obiously derived from the problem statement.
19:07SagiCZ1lachenmayer: wow that is true
19:07arrdem(inc lachenmayer)
19:07arrdemdamnit lazybot
19:07SagiCZ1lazybot is too lazy
19:07tickingarrdem SagiCZ1 Fare: sauce, https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Keyword.java#L32 https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Symbol.java#L72
19:07arrdemRaynes: oi. kick the bot <3
19:07rhg135lazybot died
19:08arrdemit's been dead for a few hours now :C
19:08arrdemjustin_smith clearly didn't get enough stability improvement
19:10trisshey all. does do (comp doall map) exist in the standard lib anywhere?
19:11arrdemtriss: no, but we have mapv
19:11rhg135hipsterslapfight, that doesn't make it a great language
19:11arrdemtriss: which has eager rather than lazy semantics
19:11tickingarrdem SagiCZ1 Fare: there is also classloader foo in which case two keywords won't be comparable with reference comparison, regarding strings, if they are all written as literals they will be interned by the compiler afaik, so they should be equal in performance, unless you generate them dynamically
19:11hipsterslapfightrhg135: what?
19:11SagiCZ1ticking: thanks for the digging
19:11trisscheers arrdem. I'll take a peek
19:12arrdemhttp://conj.io/1.6.0/clojure.core/mapv
19:12arrdemtriss: ^
19:12rhg135it makes it a money makin gtool whereas a programing language is a creation tool
19:12hipsterslapfightrhg135: ":v" was to denote i was being sarcastic
19:13rhg135hipsterslapfight, sarcasm and interwebz do not mix
19:13arrdem(with-sarcasm ...
19:13arrdem#sarasm ...
19:13hipsterslapfighthaha
19:13rhg135(inc arrdem)
19:13arrdem*#sarcasm <form>
19:13rhg135dammit lazybot
19:14tickingno no you have to use sarcasm feature expressions because it is determined at read time
19:15ticking#+sarcasm <form>
19:15bbloomcsd_: (defn fib [n] (loop [acc 0 i 0] (if (= i n) acc (recur (+ ....
19:15arrdemticking: in oxlang it's determined at eval time not at parse time :P
19:15andyfarrdem: when did conj.io become available?
19:15ticking:D
19:15rhg135(say ... {:sarcasm true})
19:15arrdemandyf: as the Grimoire domain?
19:16arrdemandyf: I've had it for two months or so now.
19:16arrdemandyf: it's pointed to Grimoire since mid summer, I just wasn't ready to use it.
19:16andyfWow, I guess I haven't been watching very closely.
19:16arrdemI actually need to renew it before one of you steals it from me...
19:21magicantlerarrdem: is it easier to use than scala..?
19:22arrdemmagicantler: is what easier than scala?
19:22arrdemmagicantler: clojure?
19:22magicantlerindeed
19:22rhg135maybe
19:22rhg135easy is subjective
19:22arrdem(dec Raynes)
19:22tickinghell yes
19:22magicantlerI guess I’d like to know why people gravitate towards it. lol
19:22tickingclojure > java > scala
19:22arrdemrhg135: eh we have "simple" and "easy" as defined by Rich :P
19:22arrdemmagicantler: have you watched simple made easy?
19:23rhg135arrdem, he agrees it's relative
19:23bbloomjustin_smith: i think the loop/recur is basically the only reasonable thing :-P
19:24magicantlerI’ll watch it
19:24magicantlerDo you guys find your java skills being used in clojure a fair bit?
19:24arrdemI'd say that Java is imperically simpler than Clojure or Scala, but Clojure is simpler than Scala and leads to simpler problem solutions than either java or scala.
19:24magicantlerarrdem: and where would you place haskell in this?
19:24arrdemmagicantler: going on three years of Clojure for hoby work, less than 500 lines of Java actually written.
19:25arrdemmagicantler: hard to say.
19:25rhg135somewher off to the side i'd say
19:25arrdemI will refrain from commenting on Haskell because while I like it and understand some of what it does I haven't used it.
19:26TEttingermagicantler, I've used a small bit of Scala, but that's all I will ever use because the language is so massive that you really can't learn much of it
19:26TEttingerjust the syntax is a mess
19:28arrdemthe only scala I had to write was an implicit type cast based DSL for a school project on doing implicit type cast DSLs
19:28magicantlerTEttinger: What do you use clojure for?
19:28arrdemit was disgusting, slower than the Clojure implementation I did, and I swore off Scala when I was done.
19:29dweaveare transducers really just parameterizing a ‘conj’ operation?
19:29dweaveis that the same problem haskell type classes solve?
19:31magicantlerarrdem: ha wow. Sorry to hear that. I wonder why Spark is pushing scala.
19:31magicantlerGetting The Joy of Clojure now :D
19:31rhg135$$
19:31rhg135it makes the world gor ound
19:32magicantlerrhg135: elaborate please lol
19:32rhg135im not acquainted with the complexities of modern life
19:33magicantlerListen to the corporations that tell you to buy things and keep quiet ;p
19:35rhg135since scala might look familiar maybe companies think it may encourage ppl to think they're cool/hip and give them $$
19:37TEttingerthere's an interesting pair of interviews with scala types here http://www.infoq.com/articles/barriers-to-scala-adoption
19:41tickingfor me it boils down to clojure being deterministic and scala being nondeterministic
19:41TEttingerI use clojure for a continually-modified IRC bot originally starting as lazybot, often for small script-style projects (where if writing the code takes 300 lines of java it can be expected to be under 50 in clojure, in my experience) and also sometimes for games using play-clj.
19:41TEttingerI think it's much better suited for web apps than 1-player games, based on the presence of so many database, auth, templating, etc. libs and cljs
19:42TEttingerI also wrote a game in C# using libgdx (what play-clj wraps), then ported that to Scala and have had a hard time with Scala. the IDE support is quite lousy and it really needs an IDE, unlike clojure
19:42tickingI know what clojure does and can rougly estimate performance and behaviour, with scala its all luck, maybe tail call optimisation kicks in, maybe it won't, maybe the type system will be able to figure it out maybe it won't
19:43TEttingerI just didn't like the attitude of the scala community that I asked for help on, it was something like, "we wish we could just use haskell but we're stuck with the JVM"
19:43tickinghrhr
19:43TEttingerpeople actually said that though
19:45tickingTEttinger: yeah sounds like something scala people would say :D
19:45rhg135TEttinger, s/we/i/ is what bitemyapp once said
19:45tickingTEttinger: but I don't quite get it, because haskell strives for elegance, while scala strives for doing it sll
19:45tickingall
19:46magicantlerand what does clojure strive for..?
19:47arrdemsome balance of the two as judged by Rich
19:47tickingmagicantler: simplicity?
19:47dweaveso are transducers lazy?
19:47dweavei’m confusedd
19:47arrdemdweave: they _can be_ but need not be.
19:47tickingdweave: transducers separate the concept of lazynes from the operation on collections
19:47dweaveright
19:47dweaveare lists and vectors both lazy?
19:48tickingdweave: you can have transducers work on vectors, set, lazy seqs or even core.async channels
19:48tickingdweave: neither are
19:48tickingdweave: lazy sequences are lazy, they are their own datatype
19:48TEttingermagicantler, I think of clojure as making hard things easier first, and making every piece of code smaller and involve less state as another thing.
19:49tickingdweave: clojure does not have lazynes as a language feature, it has one construct that provides lazyness, called a seq
19:49dweaveok
19:49dweavehow is fusion done?
19:49dweaveit just isn't?
19:49tickingdweave: fusion?
19:49arrdemFare: have you seen pixie?
19:49FareI'm taking a break from the compiler, and focusing on the runtime
19:49Farewhat's pixie?
19:49dweavelike deforestation
19:50tickingFare: dum dum dum
19:50TEttingerclojure-like in rpython
19:50arrdemtbaldridge's clojure on python
19:50dweavei think this is the right word
19:50tickingarrdem: clojure on RPython =|= clojure on Python at all
19:50FareI'm doing kind of the opposite
19:50tickingdweave: don't fall for the syntax that seqs are printed in which is () the same as lists
19:50dweavefor instance psudocode: filter(f, map(f, list));
19:50TEttingerdweave: pruning? tree-shaking? can you describe what the feature does?
19:50dweavethat would iterate the list twice
19:50FareI'm doing python in clojure
19:51dweavei want to iterate it only once
19:51Farewell, a pure python anyway
19:51dweavehaskell solves this because lists are lazy
19:51tickingdweave: yeah and map and filter operate on seqs
19:51dweavein an eagerly evaluated language like Js that would be inefficient
19:51tickingdweave: so they are lazy, mapv returns a vector for example and is not
19:51dweaveok i see
19:51Faredweave: if your compiler can deforest
19:52TEttingercan a transducer do that?
19:52arrdemFare: wanna come write an immutable interpreter for me? :P
19:52dweave(map inc [1 2 3 4 5])
19:52dweaveis that not lazy?
19:53tickingdweave: it is because map works on sequences
19:53dweaveso there’s an intermediate step?
19:53dweaveto convert that vector to a seq?
19:53tickingdweave: sequences are both an abstraction as well as a datatype, most clojure functions will turn a collection into a sequence first and then operate on them
19:53tickingdweave: basically yes
19:54dweaveok
19:54tickingdweave: with transducer you get rid of that conversion step
19:54tickingdweave: you will specify the operations that you want to do say (comp (filter even?) (map inc))
19:55tickingdweave: compose them with function composition and then run a transducing function like (into [] (comp (filter even?) [1 2 3])
19:55dweaveok
19:55dweavecool
19:55TEttinger,(into [] (comp (filter even?) (map inc)) [1 2 3 4 5])
19:55clojurebot[3 5]
19:55tickingwhich will evaluate egaerly, yet have no intermediate steps and only allocate what is needed for a vector, or you could do (sequence (comp (filter even?) [1 2 3])
19:56arrdemone better (comp (map inc) (filter odd?))
19:56TEttingeroh right, transducers use comp in regular order
19:56arrdembecause addition is expensive :P
19:56tickingwhich will return a lazy sequence because the final transducing function has that as it's model of evaluation
19:56dweaveahh
19:57dweavestarting to make sense
19:57tickingdweave: so you basically separate what should be done from how it should be done
19:57TEttinger,(into [] (comp (map #(* % % 3/2)) (filter #(= (mod % 3) 0))) (range 50))
19:57clojurebot[0N 6N 24N 54N 96N ...]
19:57dweaveis it generally hard to ‘change’ from lazy to eager evaluation
19:58tickingdweave: with transducers no, currently kinda
19:58TEttingerbut transducers should be part of clojure stable release soon
19:58dweaveso like transducers are kind of this optional thing that haven’t made it into the core yet?
19:59TEttingerthey'll be in 1.7
19:59TEttingerwhich is in alpha
19:59dweavei’m like completely new btw ha
19:59dweavecool
19:59tickingdweave: you have map and mapv, you can force evaluation with doall or into, and you can use reducers, but all of these are inconsistent and sometimes slow
19:59tickingdweave: yeah some people run the current alpha just for transducers :S
19:59TEttingerlike clojurebot
19:59dweaveit’s an interesting concept. I just watched one of hickey’s talks tho and it seems weird taht i have to parameterize both ‘[]’ and ‘conj’
20:00dweavefor some reason
20:00tickingdweave: hm?
20:00TEttingervector, vec, or nth as '[]' ?
20:00dweavevector
20:01dweavelike if I have a vector wouldn’t my ‘step’ function always be conj
20:02tickingneeds more input ;)
20:02tickingcould you provide a code example where this happens?
20:02dweavei think i’m prob not fully understanding i should read more.
20:03tickingdweave: I'm curious though :D
20:03dweavelemme find
20:03tickingdweave: transducers have this weird inside out property
20:05tickingtransducers always remind me of this https://www.youtube.com/watch?v=nW-NiGp1gys
20:05dweaveoh nvm I just got confused. https://www.youtube.com/watch?v=6mTbuzafcII at 16:00 there was this intermediate step
20:05dweaveactually no. 19:39
20:06tickingdweave: those are not transducers yet I think
20:06dweaveyeah
20:06dweaveexactly
20:07dweaveshowing how he’s arriving at them
20:07tickingyeah
20:07tickingdweave: conj is the general insertion operator btw
20:07dweaveah yeah i was wondering
20:07tickingdweave: it adds in the most efficient way to collections, for lists at the front, vectors at the back, for maps it takes pairs
20:08tickingsets, don't care about order
20:09dweaveticking: (reduce (xform conj) [] (range 10))
20:09dweavethat function
20:09dweaveoh wait sorry
20:09dweavehold on
20:09dweavehttp://pastebin.com/Njgpqe4G
20:10tickingdweave: that is the inside out thing I meant
20:10dweaveso here the vactor is first mapped?
20:10dweaveor just the first item is mapped
20:10dweaveand then mapped again by square
20:10dweavei think the latter right?
20:10tickingyeah
20:11tickingyou do everything in one step
20:11tickingand then do the next step
20:11dweavenice!
20:11dweaveso this is accomplishing what i was talking about without being lazy
20:11tickingdevils in the details, so not always for example with partition I think
20:11dweaveya
20:11tickingdweave: yeah
20:11dweaveman this is interesting.
20:12tickingand the conj is there to pass the insertion function
20:12dweaveyeah
20:12tickingit has to be threaeded in there
20:12dweavecause you could supposedly want to do something else to a vector
20:12dweavei guess
20:12tickingreducers make my head spin because of this but they seem quite usefull
20:12dweaveyeah
20:12tickingdweave: well
20:12tickingdweave: not really, but because you could wan't something else then a vector
20:13dweaveyeah
20:13tickingdweave: passing the insertion function separates the collection type from the operations
20:13dweaveyeah
20:13dweaveit’s just necessary
20:14tickingdweave: so if you provide conj, you will work on vectors, if you provide something for creating lazy sequences like cons you will get lazyness, if you want to work on CSP channels you provide a function for that like put!
20:14dweavegotcha
20:15dweaveawesome
20:15dweavethanks. I’m sure ill be back
20:16tickingalways welcome :)
20:18Farearrdem: interpreters? what's that?
20:18FareI admit I'm using state in some places, though in a monotonic way
20:18Farealso for caches
20:19Farethe python calling convention is such a pile of lose, I have to write JIT for it.
20:19tickingFare: looked at pixie?
20:20Fareticking: it's doing the reverse of what I want: lisp in rpython, rather than python in lisp
20:20tickingFare: a python interpreter in clojure?
20:20Farealso, clojure is significantly different from other lisps that e.g. not much of clpython can be reused
20:21Fareinterpreter? I said implementation
20:21Faremore like a compiler
20:21tickingFare: why? :D
20:22Farewhy what?
20:22FareI wanted to write a compiler
20:22Farefor many reasons
20:23Fare"performance" being one of them
20:23Fareand getting experience another
20:23tickingFare: ah, I wondered, maybe you have a python codebase that you want to put clojure underneath
20:23Fareyes, kind of
20:23FareI do
20:24Farecurrently using a horrible naive interpreter written in Java
20:24FareJava: the COBOL of the 1990s
20:24Farei.e. bureaucracy-oriented language
20:25tickingisn't there a python on the jvm already?
20:25Fareyes, but it does too much
20:25tickingjython
20:25Farea big part of the idea is a pure, restricted python
20:25tickingah
20:26Faretrying to sandbox jython is not a good idea
20:26tickingwhy not use clojures persistent datastructures from within jython?
20:26Fareand we had enough trouble failing to properly sandbox cpython
20:26tickingsandboxing it on the app level?
20:26Faresecurity / determinism / reproducibility
20:27tickingwhy not use peroper virtualisation?
20:27Farewe really really really don't want state leaks
20:27Farewhat we had before — expensive, slow, and the sec team still found leaks
20:27tickinghttp://bhyve.org ?
20:29Faresure, things like that can work, but a new VM for every single of the thousands of small proglets we write is actually too expensive, vs a slow in-memory but guaranteed hermetic language reimplementation.
20:29Farenot even the full language
20:29tickingFare: these systems are build for thousands of virtual systems afaik
20:29tickingtheyre pretty lightweight
20:30tickingapp level sandboxing always feels like snakeoil to me
20:30Farestarting running and stopping a thousand VMs in a few seconds, for each of tens of thousands of simultaneous tasks? Nope.
20:31Farelanguage level sandboxing is what we want, hence a pure functional language.
20:32tickingI'd maybe trust it it was written in idris :D
20:32Faretransforming either cpython or jython into something pure functional... nope
20:32Fareticking: I proposed a haskell dialect for the jvm, but the idea wasn't taken seriously by other team members.
20:33tickingFare: to bad
20:33Fareyup
20:33Farewell, that means I get to experiment with my own pure functional compiler
20:34Fare(even though the runtime has a bit of state for (1) caches (for performance) and (2) tying magic knots, and (3) interfacing with the rest of the system
20:35Fare(2) could be done away using additional level of indirection and/or state-passing, but see (1)
20:37FareI myself am both a proponent of 100% pure and 100% stateful — simultaneously, as a change of perspective in interfacing the system
20:37Fareproblem is, no system currently allows to do that seamlessly
20:38tickinghrm
20:38Faresandboxing is fine, it just can't be retrofitted
20:38Farejust like automatic pure←→stateful viewpoint switching
20:38Fareor security, or any deep semantic property
20:39Fareorthogonal persistence, etc.
20:41lambda.(str " " " " "b")
20:42lambda,(str " " " " "b")
20:42clojurebot" b"
20:42lambdaah -ha, clojurescript issue maybe
20:44sg2002Gonna ask here too, since there are probably some paredit users here - how do I escape an existing character in paredit? For example <?xml version="1.0" encoding="UTF-8"?> - I want to escape double quotes here. But \ asks me to enter a character, so I end up with "" before 1.0.
20:46amalloysg: C-q \
20:46amalloyC-q is bound to "insert the following character, no matter what my dang mode says"
20:46TEttinger(inc amalloy)
20:46TEttinger(dec lazybot)
20:46sg2002amalloy: Thanks. Didn't think of that.
21:07ottihm i have defined a test: (deftest endpoints (another_test) (also_a_test))
21:08ottinow when i add a mixin that is supposed to only run once
21:08ottiwill it only apply to the test "endpoints"
21:08ottior also to any subsequent test enclosed in this test?
21:08otticause i only want to run it once for the test endpoint, to setup a database
21:09ottisorry fixtures not mixinx
21:11ottik the doc actually states it clearly
21:42Farewhat is the idiomatic way to do defvar in clojure?
21:43Farei.e. if some variable is already bound to some atom, I don't want a new atom but the old one.
21:45arrdemFare: check out the way that defmulti works.
21:46Fare I seem to be having a problem with defrecord and AOT
21:46Fareon 1.6
21:46Fareis that a known issue?
21:47Farea form using ->$Monotonic works at the REPL, but lein says: skylark.mop.$Monotonic cannot be cast to clojure.lang.IFn, compiling:(skylark/mop.clj:66:48)
21:51Farenever mind, it was improper quoting in a macro
21:52Fare(which doesn't explain why it was working at the REPL)
22:32ottihm can someone recommend a sql ddl library
22:32ottithe documentation of lobos is kind of horribel :/
23:13andyfFare: Clojure's defonce might be close enough to Common Lisp's defvar to do what you want
23:14Farethanks!
23:15andyfFare: There are some known bugs related to AOT in Clojure. Some of them have gotten some attention recently and may have correct patches now, but not known whether they will be in Clojure 1.7 or not. Example: http://dev.clojure.org/jira/browse/CLJ-979
23:15andyfThere are a handful of other AOT-related bugs.
23:16Farewhen is 1.7 expected?
23:16andyfAh, here is a recently created wiki page with a link to known issues, some of which are fixed in 1.7.0-alpha4, but several not.
23:17andyfI am not aware of a scheduled date for 1.7. They are working on adding some more performance enhancements related to transducers, and may add feature expressions, before releasing. Somewhere in the next 2-6 months would be my guess.
23:18andyfThere will be more released alpha and/or betas before then, most likely.
23:33munderwoAnybody know how to inspect the contents of a clojurescript core.async channel?
23:40puredangerandyf: I'm hoping to get another alpha/beta out before the holidays
23:41andyfnice. I know you've been putting in a lot of hours on some of those transducer enhancements.
23:41puredangerfeature expressions is still on the list. we go beta when all "features" are tentatively done, so we won't go beta till those are in.
23:41puredangervirtually everything in 1.7 is ready to review at this point
23:41puredangerI'm planning to review the AOT stuff this week so I can make a case for inclusion as well
23:42andyfDid the Conj unsession on feature expressions raise any new points you hadn't heard before?
23:42puredangerwas most useful to me to hear people ask Rich questions about it :)
23:43puredangerandyf: btw, I have a new blog: http://insideclojure.org that you might enjoy
23:44puredangerI often build up a lot of mental knowledge around parts of Clojure while working on tickets. hoping to drop it here so maybe I'll remember some of it.
23:44arrdem+1
23:45puredangerwe have a bunch of stuff queued for a core.async release too
23:45andyfthx for the link. I find I learn the most when digging into something deeply myself and writing about it.
23:45puredangeryup
23:45andyfWriting Eastwood linters has been an educational experience on some corner cases.
23:45puredangerI bet :)
23:45puredangerpresumably a linter is all corners :)
23:46andyfThe saving grace being that I try not to double-check things Clojure already does, just the things it lets through silently.
23:46andyfthat and it can be useful even if it doesn't catch everything :)
23:49andyfSo hearing people ask Rich questions about feature expressions, did things end up pretty much where the current proposal is, e.g. #+cljs expr effectively becomes whitespace if feature cljs is not present?
23:50puredangertbd - I haven't had a chance to talk to it about him yet
23:50Bruce_WayneDoes anyone know a bit about OCR?
23:50puredangerbut I would say yes
23:50Bruce_WayneI am looking to pull text from images
23:51arrdemBruce_Wayne: gonna have to make that more clojure-specific if you want to get useful help here.
23:51arrdemespecially this late US/west
23:51Bruce_Waynedoes anyone know a good clojure library for OCR
23:51Bruce_Waynelike using clojure vision
23:51puredangerandyf: the big questions in my mind are whether we could do less now
23:52Bruce_Waynethen pulling the text
23:52puredangerandyf: and add more later if necessary (omitting things like #-, boolean conditions, *feature-expressions*, etc)
23:52Bruce_Waynewould anyone know a better place to ask about OCR? better chatroom?
23:53andyfI didn't watch all of the videos published from the Conj, but I have a feeling Rich may have suggested Brian Goetz as a speaker, and the topic.
23:53puredangerandyf: I suggested him
23:54puredangerI think Brian came up with the topic, but I know he worked with Stu on fine-tuning it quite a bit. Rich, Stu, and Brian have known each other for a long time and there is a lot of mutual respect there.
23:55andyfBruce_Wayne: There are several open source programs/libs for OCR that I've heard of, and tried a few years ago. All of them I know of are accessible from a Linux scanning program called gscan2pdf. Some names are: tesseract, gocr, ocropus, cuneiform. Search for "ocr" here for a list and links to them: http://gscan2pdf.sourceforge.net
23:56Bruce_Wayneandyf: Do they have the ability to pull text from a jpg image per say
23:56andyfI'm not aware of any Java libs for it, and don't have a suggestion for an on-line forum to ask in.
23:58andyfBruce_Wayne: I think all of them can pull text from an image, but they might vary in what image format they require. e.g. some might require converting to gif.
23:59andyfI think some/all of those programs may have already-built package for them in, e.g. Ubuntu Linux.