#clojure logs

2013-10-14

00:01marco1Anyone use the worker option in a pedestal aspect? Their example uses regex pattern objs, but I don't think edn supports #"regex"
00:07Roxxicd ..
00:07Roxxils
00:07lazybotbin boot data dev etc proc selinux sys tmp usr
00:07Roxxi>.<
00:11marco1cd /bin
00:34muhooirc shell
00:35muhoo~aot is Ahead Of Time compilation
00:35clojurebotOk.
00:36muhoo~aot
00:36clojurebothttp://i.qkme.me/3vb225.jpg
00:36muhoofack
00:36brehaut~aot
00:36clojurebothttp://i.qkme.me/3vb225.jpg
00:36muhooffs
00:36brehaut~aot
00:36clojurebothttp://i.qkme.me/3vb225.jpg
00:36muhoo~aot is chese
00:36brehauthah
00:36clojurebotAlles klar
00:36muhoo~aot
00:36clojurebothttp://i.qkme.me/3vb225.jpg
00:36muhoo~aot is Ahead Of Time compilation
00:36clojurebot'Sea, mhuise.
00:36muhoo-_-
00:37brehautmuhoo: you just have to accept that clojurebot is enterprise ready, and no one person can understand how any a feature works ;)
00:38muhooit's on github somewhere, i thought
00:38brehautit is
00:38muhoois that factoid hardcoded or something?
00:38brehauthttps://github.com/hiredman/clojurebot/
00:38muhoo~hardcoded is aot
00:38clojurebotc'est bon!
00:38muhoo~hardcoded
00:38clojurebothardcoded is aot
00:38brehautno, its just a very complex system
00:38muhoo~hardcoded is not aot, says yoda
00:38clojurebotOk.
00:38brehautfactoids are a multimap
00:39brehautand theres an inference engine
00:39brehautthe command pipeline is also built on Arrows
00:39brehautand its parser is only documented in the fnparse rules
00:40muhooi actually have no idea what you're talking about
00:40muhoohow do you send a message to someone?
00:40muhooin this bot?
00:40muhooit has a store-and-forward capability IIRC
00:40brehauti think thats lazybot's $mail
00:41brehautjust to confuse things ;)
00:42brehautmuhoo: http://ro-che.info/ccc/12
00:45muhoowow, that is the geekiest comic i've ever seen
00:45brehautpretty much yeah
00:45brehaut~arrows
00:45clojurebotarrows is http://ro-che.info/ccc/12.html
00:45brehautwell lol
00:46muhoohttp://ro-che.info/ccc/21
00:46muhoolike... talk about a niche audience
00:46brehauthah yeah
00:46brehautturns out yes, applicative is now a superclass of monad
01:02lynaghk`hugod: ping
02:21frozenlockCljs version 0.0-1909 and higher break the domina function node. :-/
02:55logic_progin datomic free edition's in memory databse -- does it somehow survive machien reboots, or is all data lost when the machine reboots?
02:58rhg135one small question, for serversockets, i have a series of clients which arent known till runtime and isn]t mutable in a conventional sense (you can]t change it) but its not static either (it depends on who connects), is there an interface more appropriate than ISeq?
02:59marcopolo2rhg135: how are you going to be interacting with it?
03:00rhg135just loop on it with doseq and dispathing a thread on the new sockets
03:00rhg135since it's .accept returns a socket to the client
03:01rhg135and it blocks till a connection
03:01rhg135something like (repeatedly #(.accept this))
03:02marcopolo2yeah ISeq sounds fine to me
03:03rhg135ok
03:03francislogic_prog: I belive you can persist to disk with free
03:03rhg135i wasn't sure since it's indeterminate
03:11marcopolo2rhg135: well you could have it wrapped in an atom if you are going to update it's value
03:11rhg135i'm thinking of of having a fn that returns (repeatedly #(.accept socket)) since i see no way to implement Seqable on ServerSocket
03:11marcopolo2and then calling a thread on each fn?
03:12rhg135marcopolo2: i can]t change it (save closing the socket) from the server, only who connects, and yes
03:12rhg135threads
03:13marcopolo2why do you need to do multiple accepts on the same socket?
03:13rhg135.accept opens a new socket
03:14marcopolo2ah okay
03:14rhg135thats how servers work, open a new socket per client
03:15marcopolo2I wasn't familiar with that interface
03:15rhg135in python i used a generator but threading is a pita and it was ugly
03:21rhg135here]s the code https://bitbucket.org/rhg135/jimpy/src/b9f81cf11bb736f5f48d96f8dcabbf39a9516db3/jimpy/server/utils.py?at=newserver#cl-123
03:21rhg135thats essentially the idea
03:22rhg135but id like that server on the jvm
03:23rhg135i don't really like python, but i started writing the client part and the jvm is too slow to start for a client-side lib
03:29Foxboronrhg135: i could go like "Hey! There is a LISP on python that complies down too Python AST!"
03:31rhg135i did try nodejs, but clojurescript failed me and when i asked here i got no help twice so i just went with python (which i used before clojure and haskell)
03:31Foxboronrhg135: check out Hy :)
03:31rhg135Foxboron: i saw it but it seemed abandoned
03:32rhg135oh
03:32rhg135Hy?
03:32TEttingercheck out Shen then
03:32Foxboronrhg135: yeah Hy.https://github.com/hylang/hy
03:34rhg135Foxboron: the main issue i've had with python is concurrency not syntax
03:35Foxboronrhg135: yeah, it is a hell :/
03:35rhg135that said, it looks interesting
03:35rhg135any easy way to run a repl?
03:35Foxboron"Hey lets make a thread! Just gotta subclass threading.Thread, rewrite run...then..hmm..make it a deamon so it dosnt fuck up..hmm...oh bugs!" \o/
03:35Foxboronrhg135: pip install hy
03:35Foxboronhy
03:36rhg135and i can connect to it from, say, vim?
03:36Foxboronrhg135: Sadly no vim plugins yet. I'm actually suppose to be fixing that, along with a nrepl for hy D:
03:37rhg135yeah an nrepl'd be nice
03:37rhg135but no biggie
03:37rhg135python is worse for that
03:37Foxboronrhg135: it runs, compiles and works along side python code :)
03:38Foxboronso its awesome anyway IMO
03:38rhg135so it]s just a lisp dialect?
03:38Foxboronrhg135: yeah it is.
03:38rhg135any special features?
03:39Foxboronayou can import hy directly into python, and vica versa
03:39Foxboronand macros
03:39rhg135hmm, macros
03:39Foxboronbeen talks about trying to implement some TCO'ish things using generators
03:39Foxboronbut i am not sure what the status on that is
03:39rhg135but concurrency still would be a pita
03:40Foxboronrhg135: its still python :/ concurrency is a living hell.
03:40rhg135but anyway for the server i do want it on the jvm
03:41rhg135it]s looking as i have to seperate client and server
03:42rhg135idk, but the python vm doesnt feel as if it is meant to run a chat server
03:42rhg135think like freenode, but based on JIM not iRC
03:43TEttingerJIM?
03:43TEttingerjabber IM?
03:43rhg135JIM.HACKPAD.COM
03:43rhg135JIM{ JSON IM
03:43rhg135grr
03:43rhg135caps
03:44TEttingerrhg135, looks nice
03:45rhg135Nathan is writing one on nodejs
03:45rhg135im not sure whether to trust itll work
03:46rhg135for one the guy likes c++
03:47rhg135and my python one is broken mysteriously
03:53rhg135actually i do know why; it isn't launching new threads until i interrupt the main thread; again python concurrency is a pita
03:58echo-areaLeiningen told me two checksums about an artifact, but none of which is the same as the on in the maven repo, what could be the reason?
03:59echo-areaCould not transfer artifact XYZ from/to REPO (ADDRESS): Checksum validation failed, expected CHECKSUM1 but is CHECKSUM2
03:59echo-areaThis is the error I get
03:59TEttingerwell they may have incorrectly hashed their file, or used the wrong checksum for the file
04:00TEttingertry a different version?
04:00TEttingerwhich artifact, I can check? lein dependency line?
04:00echo-areaOf leiningen or what?
04:00TEttingerno, the artifact
04:00echo-areaNo, it's a private artifact here
04:00TEttingeroh
04:01TEttingerwell ask whoever made it, he may have done something wrong
04:01echo-areaAnd another guy tried maven, got similar warnings about checksums, but one of them at least was correct
04:02echo-areaOkay, thanks
04:56echo-areaIs it possible to make process of leiningen finding dependencies verbose?
04:59hyPiRionecho-area: you could try `DEBUG='y' lein deps :verify`
04:59echo-areaThanks
05:28logic_progis there any implementation of frp (functional reactional programming) in clojurescript?
05:28logic_progI'm not looking for a javascript wrapper, I'm looking for a clojurescript codebase to read / learn from
05:28piranhalogic_prog: http://github.com/tailrecursion/javelin
05:29logic_progha, was just looking at it
05:29logic_progbe nice it was tied into dom elmenets too :-)
05:29logic_progs/it/if it
05:29piranhalogic_prog: github.com/tailrecursion/hoplon
05:29piranha:)
05:29piranhalook at the 'dox' branch right now
05:29piranhathere are some docs
05:30logic_progwait what?
05:30logic_progi have to read the examples
05:31logic_progI don't understand https://github.com/tailrecursion/hoplon/tree/dox
05:31logic_proghow ishe embedding clojurecript into a web html file?
05:32logic_progthis is fucking insane
05:32logic_progby insane I mean genius
05:32ro_stat bottom, it's all just text
05:33logic_proghttps://github.com/tailrecursion/hoplon/blob/master/doc/Design.md is genius
05:33logic_progwho is tailrecursion?
05:34ro_stAlan Dipert and co
05:34logic_progthis person should be renamed michangelo-davinchi-raphael
08:39maris`why does clojure print strings from maps without quotes around them ?
08:40maris`(print {:s "hi"})
08:41maris`omg pprint does it correctly :-)
08:41augustlis there a way for a multimethod to have the same body for different dispatch values, other than extracting the body to a separate function?
08:42hoeckmaris`: (prn {:a "hi"})
08:43hoeckmaris`: print prints for human consumption, prn prints `readably` (for the clojure reader)
08:45hoeckaugustl: you could also modify you dispatch function
09:04mpenetI just upgraded to the latest nrepl and it now wont launch. Anyone had issue recently?
09:04mpenetissues*
09:05mpenetjack in works but I end up in a broken repl (I also use nrepl-ac btw, I ll try without it)
10:02CookedGr1phonhey, I'm building an app on android and midje doesn't work properly on the device, so I want to exclude all my test files from the build which goes onto my device
10:03CookedGr1phonI made a separate midje profile in my project.clj
10:03CookedGr1phonbut I can't seem to stop it trying to build the test/* folder's contents
10:03CookedGr1phonI have set :source-paths and test-paths appropriately, but it's still doing it. Any ideas?
10:04mdrogalisCookedGr1phon: Not sure, sorry. :/
10:13CookedGr1phonmdrogalis: very odd. I have moved them to another directory not named test/ and it works fine
10:13mdrogalisCookedGr1phon: Huh, interesting.
10:30Morgawrdoes anybody know of any academic papers/studies on clojure and its concurrency models? Some references I could have that aren't just Hickey's talks on youtube or clojure.org articles or random blog posts? (not that they aren't interesting, it's just that I read them all already :P )
10:35mdrogalisMorgawr: Maybe look up some stuff on Multiversion Concurrency Control and Snapshot Isolation? Obviously not exactly Clojure, but the underlying stuff is the same.
10:36Morgawrmdrogalis: yeah, thanks. I was mostly looking for Clojure-related stuff but that's certainly a good stepping stone. Gotta write a position paper about an academic study/paper I wanted to write about clojure performance and concurrency model
10:37Morgawrso I gotta find good excuses to present to my tutor :P
10:38CookedGr1phonI feel I should probably plug my colleague's new book at this point :P http://pragprog.com/book/pb7con/seven-concurrency-models-in-seven-weeks
10:39CookedGr1phonwhich should give a nice overview, and a lot of the examples are clojure based
10:44mdrogalisCookedGr1phon: Looks worth a read. :)
10:44si14lynaghk: ping
10:44MorgawrCookedGr1phon: will check it out ;)
11:00scape_Little confused by simpledateformat parsing: (.parse (java.text.SimpleDateFormat. "mmddyyyy") "04121985") ;results in #inst "1985-01-12T05:04:00.000-00:00"
11:01scape_(.parse (java.text.SimpleDateFormat. "yyyymmdd") "19850322") ;results in #inst "1985-01-22T05:03:00.000-00:00"
11:01scape_what am I doing wrong with month?
11:03andrewmcveigh|woscape_: months are usually MM
11:03andrewmcveigh|woscape_: mm = minutes
11:04scape_aha
11:04scape_thank you
11:04andrewmcveigh|wonp
11:20hardliner_scala or clojure?
11:20bbloomsurely you must realize that's trolling in either #scala or #clojure, right?
11:22drguildodoes anyone have any idea what would prevent the nrepl prompt appearing when i do nrepl-jack-in?
11:23drguildoi've tried disabling all the hooks in my init.el but it didn't help
11:24gfredericksbbloom: your last night fipp idea that I just saw is quite interesting; thanks :)
11:24AimHeredrguildo, might you have a (-main) function in your project and it's trying and failing to compile it?
11:27RoboClaudioHello hello everyone!
11:27drguildoAimHere, i doubt it, it's done it with every project i've tested including "lein new test"
11:27hardliner_hello
11:27RoboClaudioI'm having a blast learning clojure right now, and I'd like to introduce the language to a friend of mine who is not a programmer
11:27hardliner_is it true that the creator of clojure is hikki?
11:27gtrakgfredericks: did you ever write up those macro-generating macros you were messing with somewhere?
11:27francisR
11:28RoboClaudioany recommendation for a resource? Something like "clojure for non programmers"
11:28francisRoboClaudio: Clojure was the first language I learned. I reccomend 4clojure
11:28RoboClaudioI do believe that clojure would be a good first language, this friend is smart, and he would like to contribute to my clojure projects
11:28RoboClaudiofrancis: oh great
11:29francisSorry for misspelling ect. ect. Not on my native keyboard layout right now
11:29hardliner_francis: do you use qwerty?
11:29francishardliner_: colmak
11:29RoboClaudiofrancis: you really never had any sort of C, or ruby or anything like that before? How much to you use Clojure now?
11:30francisRoboClaudio: I program clojure everyday
11:30francisRoboClaudio: I tried out other languages first, but settled on clojure. It was the first language I learned beyond some VERY basic programs.
11:31RoboClaudioThat's very comforting. I personally use Haskell, Go and JS for work, but Clojure (with some love for core.typed) for personal stuff, and I think it's great.
11:32francisRoboClaudio: How do you like haskell?
11:32RoboClaudiofrancis: which sort of applications do you work on?
11:32francisRoboClaudio: Webapps
11:32francisRoboClaudio: nothing fancy
11:33RoboClaudiofrancis: I really like haskell, especially within teams. The purity and type safety make very good guards for large programs.
11:33tbaldridgehave you tried using Clojure for "large programs" ?
11:34RoboClaudiofrancis: great, thanks so much for the feedback, you're comforting my feeling that clojure is good for beginners.
11:35RoboClaudiotbaldridge: I didn't have the chance, I only use Clojure within side projects, and haven't wrote anything bigger than a few thousands loc :(
11:36endouRoboClaudio: I feel think you can do pretty much in a few thousands loc with clojure, what's your opinion on that?
11:37tbaldridgeRoboClaudio: it might be something to investigate. I've found that the claims of "type safety guard against poor programming" to be a fairly weak argument. In practice, I very, rarely hit problems that typing would help with.
11:38RoboClaudioendou: true, but working alone removes my ability to judge how it is with teams. So far I'm personally very satisfied, especially because of the readability of my programs. I don't have to go through beautifiers and the like, it's just clear.
11:38tbaldridgeAnd I find that the restrictions (even) Haskell's type system put on the programmer are bit restrictive.
11:38xeqitbaldridge: I like it as a set of unit tests I don't have to write
11:39tbaldridgexeqi: perhaps, but with Haskell, can you have the option to use these "tests" on only half your code?
11:40pandeirohow do i get nrepl to show eldoc-like documentation inside a clojure buffer?
11:40RoboClaudiotbaldridge: I understand, but I found this (& purity) to be quite helpful when I could jump in a project without spending too much time making sure I don't break everything. I'm far from being a Haskell guru but I could get up and running very fast at work
11:40pandeiroand how do i kill a lein repl :headless process?
11:41xeqitbaldridge: Haskell's type system can affect the semantics of the program, so no
11:41RoboClaudiotyped clojure seems to be a very good middleground between the funny language for hacking and the tough thing you can use at work
11:42RoboClaudioconvincing my previous boss of using clojure on a project was incredibly hard
11:43RoboClaudiotbaldridge: do you have the chance to use clojure at work?
11:44tbaldridgeYes I do, and I only have a passing familiarity with Haskell, so I am biased.
11:44tbaldridgePerhaps someday I'll go and learn me some Haskell for great good.
11:45RoboClaudiohaha this is the book that got me into it!
11:45RoboClaudiotbaldridge: did you have to convince your boss or was it a clojure shop?
11:46scriptorRoboClaudio: how did you convince your boss in the end?
11:46tbaldridgeRoboClaudio: I work for Cognitect, so I was hired to work on Clojure in the first place.
11:47bbloomtbaldridge: surely somebody had to convince relevance back when they were predominently a rails shop ;-)
11:48francisRoboClaudio: Is there any reason that haskell isn't a lisp other than some ill-defined notion of readability. Or, is there anything to be gained by using syntax other than sexps?
11:48RoboClaudioscriptor: I lamentably failed, because of the lack of static typing and the sources of help in the local language (I live in Japan)
11:48RoboClaudiotbaldridge: that sounds great!
11:49tbaldridgebbloom: well the full story is here: http://www.infoq.com/presentations/Clojure-tips Basically Stu went out looking for a language that solved his complaints with Ruby and Java.
11:49scriptorfrancis: it's a descendant of ML, so you'll have to ask why that didn't use sexp's
11:49bbloomtbaldridge: cool
11:50francisscriptor: You wouldnt happen to know the answer to that would you?
11:50scriptorpart of the reason may be that it's heavily based on mathematical notation
11:50RoboClaudioscriptor was faster
11:50ambrosebsRoboClaudio: hopefully Typed Clojure is good ammunition for next time.
11:51RoboClaudioambrosebs: I left that company since then, and I do believe it's going to be way easier with the current one.
11:52ambrosebsRoboClaudio: good :)
11:52RoboClaudiooh yeah :)
11:52mdrogalisambrosebs: You should take your $30k and put it all on black.
11:52mdrogalisWhat could go wrong?
11:53ambrosebsmdrogalis: what does that mean?
11:54RoboClaudiohe's probably referring to the gamble of using something as new as typed clojure
11:54RoboClaudio* in a corporate environment
11:54mdrogalisambrosebs: A patently bad idea. 'putting it all on black' means betting all your money on a 50/50 chance in Roulette.
11:54ambrosebsheh
11:54mdrogalisRoboClaudio: Nope. Just being dumb. D:
11:54RoboClaudiomdrogalis: got me :p
11:54mdrogalisI literally meant you should gamble with it.
11:54mdrogalis:)
11:54ambrosebsyou will never see me in a casino ;)
11:55scriptorimagine how much good one night in vegas could do for clojure
11:55mdrogalisI went in one once. Good God, I wanted to hand out flyers about the odds on slot machines.
11:55mdrogalisDo you people even know what you're doing?!
11:55mdrogalisHah, scriptor
11:58RoboClaudioI was in a hospital last week, and as I was in emergency room, I had no access to my computer & cell phone. I wrote some clojure code on paper for some side project to kill boredom.
11:58RoboClaudioWhen I got home, I just typed my code in, and it just worked. That thing made my coworkers laugh and wonder about how cool is clojure.
11:58mdrogalisYour parens balanced?
11:58RoboClaudioF*CK YEAH
11:59mdrogalisHuman-paredit mode.
11:59RoboClaudiotrust me, you have time in the hospital
11:59RoboClaudioI had to stay in the same bed all day, couldn't even walk
11:59RoboClaudiowell, I still can't, but now I'm at home
12:00scriptorI never close my parens when I'm coding on paper
12:00scriptorit's like a god-awful mishmash of python and lisp
12:00RoboClaudiocoworkers tell me I could have done this with Haskell, and I wouldn't have to worry about those parens
12:00RoboClaudioscriptor: Aww
12:00RoboClaudio:)
12:02tbaldridgeI have to admit, talks like this scare me away from Haskell http://www.infoq.com/presentations/molog It's a 30 minute talk about all the nasty hacks they had to do to get a half-working version of miniKanren. Something that's about 200 lines of scheme.
12:05RoboClaudiowell I have to say Haskell is far from being a convenient language for everything. I'm lucky enough to have used it only in projects where it made sense
12:05bbloomtbaldridge: part of the problem is trying to get the logic variable hackery past the type checker
12:05bbloomtbaldridge: the result is very limited type checking :-/
12:05RoboClaudioohh
12:06bbloomtbaldridge: I enjoyed the "Oleg's permission" bit. If Oleg says you can bypass the type system, then you're good!
12:07ambrosebsbbloom: that's gold
12:07scriptorcan typed clojure do any sort of type inference yet?
12:08bbloomambrosebs: did you see that thing about "rational types" with negative & fraction types to go along with sum & product types?
12:08ambrosebsbbloom: no what is that?
12:09ambrosebsscriptor: it never will
12:09scriptorgotcha
12:09bbloomambrosebs: www.cs.indiana.edu/~sabry/papers/rational.pdf‎
12:10ambrosebsbbloom: wow!
12:10arrdemRoboClaudio: welcome to #clojure, where you get to lurk with library & tool developers :D
12:11RoboClaudioarrdem: Right, or the people making my life better.
12:11tbaldridgeThat's the nice thing about #clojure, all the cool kids hang out here.
12:11bbloomambrosebs: i haven't managed to make any sense of it yet. what makes you say wow so quickly? :-P
12:11scriptorI think rich hickey even shows up here from time to time
12:11ambrosebsbbloom: it's more "wtf"!
12:11bbloomhaha
12:12arrdemscriptor: Rich I think is 2nd or 3rd for all time messages sent to #clojure
12:12ambrosebsbbloom: what the hell is a fractional type
12:12scriptorinteresting
12:12ambrosebs:)
12:12scriptormust've had a ton of discussion here in the olden days
12:12arrdemscriptor: but I haven't de-aliased for away nicks yet
12:14bbloomambrosebs: i dunno but sabry is generally worth attempting to understand :-)
12:15indigohttp://fc04.deviantart.net/fs70/f/2012/229/a/6/rich_hickey_by_emareaf-d5bevsm.png wat
12:17benmossindigo: apparently drawn with https://github.com/ema-fox/artengine
12:17benmossthus the tribute
12:18rishisadhirCan someone let me know why (use 'seesaw.core) brings up a FileNotFoundException? All the code examples online seems to just be able to 'use it without any issues.
12:18xeqidoes anyone know any oss projects using clj-webdriver?
12:18indigoHaha
12:19clgvrishisadhir: that definitely works if you have specified the dependencies in your project.clj correctly before you fired up the repl
12:19rishisadhirThanks clgv
12:23seangrovexeqi: We use it for some functional tests
12:23srrubyI'm transforming a parse tree created by instaparse. So far I've been using postwalk to "edit" the tree. I'm thinking maybe I should use refs as some of the nodes need to be pointers to other nodes. I'm also looking at zippers. Currently I've been able to do what I want with postwalk, but some of my code looks clumsy. Any advice ? Thanks, John
12:26xeqiseangrove: do you start a jetty server as part of your test suite to run against?
12:27arrdemsrruby: what are you trying to get out of the parse tree?
12:27xeqiI've got example of doing that using clj-http and some libs that only talk http. Was hoping to find one that did it for clj-webdriver
12:28xeqiwriting a blog entry, so collecting references
12:30srrubyarrdem: The source is a textual dsl for music notation. I need to transform the parse tree to a similar legacy json format. There are some calculations involving assigning rhythms to beats and notes. I also need pointers in a few places.
12:37noidixeqi, we're using clj-webdriver as well. we deploy the application to a production-like environment and then run the tests against it.
12:38noidiso there's no special test server. the end-to-end tests test server provisioning and the deployment process as well as the application itself.
12:43Morgawrhow do I use clojure.core.reducers? I tried using (require '[clojure.core.reducers]) in my repl just to test stuff but it says "cannot find the namespace" or something like that
12:43Morgawrdo I need to import something specific with lein? I thought they were shipped with the clojure core
12:43Morgawrlike strings
12:44Morgawrokay
12:44MorgawrI'm an idiot
12:44MorgawrI wrote "reuducers" instead of reducers
12:44Morgawrnevermind =_=
12:44unsymbol:3
12:46hardliner_is clojure for hikkikimories?
12:46wedrhardliner_: yep
12:48hardliner_wedr: when you go out from home last time?
12:49unsymboltil : hikikomori :)
12:50arrdemis there a better way to achieve this sort of result? https://www.refheap.com/19800
12:51wedrhardliner_: today, cause im working as consulter
12:51hardliner_wedr: so you are not hikkikimori
12:51wedrhardliner_: no, im not
12:51hardliner_wedr: they are sitting at home
12:51hardliner_all the time
12:51wedrim wannabe hikkimori
12:51hardliner_he-he
12:52hardliner_why?
12:52clojurebothardliner_: because you can't handle the truth!
12:52hardliner_why?
12:52clojurebotwhy is startup slow is busy compiling the `for` macroexpansion
12:52wedrhardliner_: cause i hate consulting
12:52wedrhardliner_: i want work remotely
12:52hardliner_wedr: go software development
12:52wedrhardliner_: im software developer
12:52hardliner_and consultant?
12:53wedrhardliner_: yes, java enterprise and so on
12:53wedryou know
12:53Morgawrmm.. weir
12:53Morgawrweird
12:53MorgawrI did (reduce + (map inc (range 1 1000000))) and it took like 14 seconds
12:53mtpwhat is enterprise
12:53Morgawrthen I did (reduce + (r/map inc (range 1 1000000)) and it didn't complete, not sure if I ran into a deadlock or it was just very slow
12:53Morgawr(waited like 10 minutes)
12:54Morgawrthis is not normal, is it?
12:54hardliner_wedr: i'm c++ monkey
12:55rasmustoarrdem: (if (pred map) (update-in map path arg ...) map) ? doesn't seem like you'd have to wrap it in a function
12:55wedrmtp: http://en.wikipedia.org/wiki/Enterprise_software
12:55arrdemrasmusto: the reason to wrap it is so that I can use it in ->
12:55arrdemrasmusto: that's the real question.. mid -> conditional updates.
12:55rasmustoarrdem: okay, looks reasonable then
12:55rasmustoarrdem: see also cond->
12:56hardliner_wedr: do you have dress code?
12:56arrdemrasmusto: oh right. we have that as of 1.5...
12:56Morgawrhttp://www.morgawr.eu/p/1381767636.png the last command seems to either block or explode in computational time to something very unreasonable...
12:56rasmustoarrdem: seem better than making a function that works only for -> (and not ->>)
12:57rasmustoarrdem: 1.20 is NOT the latests: warning!, use 1.30 docs instead
12:59Morgawrhttp://www.morgawr.eu/p/1381767851.png oh well, looks like it finished :D .... :(
13:06llasramMorgawr: FYI, you might consider using a text paste service like refheap.com instead of images...
13:07arrdemllasram: but he's trolling for our IPs...
13:07Morgawrarrdem: lol
13:07Morgawrllasram: I find it easier when I'm not pasting code
13:07Morgawrsorry
13:07Morgawr(I have a script that takes screenshot and uploads it automatically)
13:08arrdemMorgawr: refheap.el?
13:08Morgawrarrdem: I know I could use a paste service but using paste tool for structured text that doesn't have anything directly to do with code feels weird to me
13:08Morgawrbut yeah, I'll do that in the future, sorry
13:09mtpreading a screenshot of text is weird to the rest of us
13:10arrdemmtp: <fighting pants> SPEAK FOR YOURSELF SAH </fighting pants>
13:10Morgawrmtp: point taken
13:11mtpflashbacks to tech-support days, with Word docs full of screenshots of terminals
13:11Morgawrsounds like PTSD :P
13:12mtpmaybe
13:12mtp:)
13:27bitemyapptechnomancy: I enjoyed your OCaml write-up, thanks for doing that :)
13:28bitemyapptechnomancy: how would you feel about a Haskell compare-contrast for grench? (not your labor, mine)
13:37technomancybitemyapp: that'd be interesting. I wonder if it would create confusion for users though.
13:38bitemyapptechnomancy: it'd be a semi-private/quiet experiment. Between the two of us, I think I've done more Haskelling and I want to compare contrast.
13:38bitemyapptechnomancy: I look at either potential result as a win, either Haskell does well and that's cool or I get a new cudgel for tormenting puffnfresh with.
13:39technomancyseems like a lot of work to go to for just a throw-away program, even though I'd certainly be interested in reading a write-up. but if it's something you'd have fun with then go for it =)
13:40bitemyapptechnomancy: I wanted something not-Clojure to do. my head rattles from the parens inside if I turn too quickly.
13:51technomancyyou forgot the firstworldproblems hashtag there buddy =)
13:52bitemyapptechnomancy: haha, too true.
13:52bitemyapptechnomancy: the reason for the head-rattling is I've been doing Clojure at work and at home, so I'm more clj-inundated than usual.
13:53rasmustoI really like pprint/print-table, but I want to make it parsable, is there something in edn for me?
13:58bitemyappAlright Timbre, this shit: "java.lang.NullPointerException: null" is getting old.
13:58Morgawrmm.. I'm trying to write a map with some heavy computation and I want it to be realized (non-lazy), I try (time (doall (map myfunction mycoll) nil)) in the repl because I don't want it to print any values (too cluttered) and it finishes right away
13:59Morgawrisn't doall supposed to enforce realization?
13:59technomancybitemyapp: did you try the paaaaaatch?
13:59Morgawroh
13:59bitemyapptechnomancy: oh frick.
13:59Morgawrnvm I realized the problem
13:59rasmustoMorgawr: what was the problem?
13:59Morgawr(doall (myfun) nil) means that it doesn't actually enforce (myfun)
13:59bitemyapptechnomancy: let me give it a whirl. What's the most direct way, checkout?
13:59rasmustooh, the nil was returned right away?
13:59Morgawrrasmusto: yea
14:00rasmustogotcha
14:00Morgawrbecause the second form of doall takes [n coll]
14:00Morgawrto realize 'coll' n times
14:00technomancybitemyapp: lein install from a checkout
14:00Morgawrbut it was seeing 'coll' as 'nil' :P
14:00Morgawr(do (doall (mymap)) nil) is what I needed
14:00Morgawr(I know it's ugly but it's just some quick repl hacking to test stuff)
14:00llasramMorgawr: Or `dorun`?
14:00rasmustoMorgawr: uh, I thought doall just took a lazy seq in an implicit do?
14:01bitemyapptechnomancy: the good news is, I have my repro because I just nailed this error in production, so I have a regression I can poke at.
14:01bitemyappwell, fake production. Not real production.
14:01bitemyappyou get my meaning -_-
14:02Morgawrllasram: derp
14:02Morgawrllasram: thanks for the tip, I didn't even know that :P
14:02Morgawrrasmusto: you can pass a number to doall to specify how much of the sequence you want to realize
14:03rasmustoMorgawr: ah, didn't see that
14:10Raynesbitemyapp: I don't see the problem.
14:10Raynesbitemyapp: Obviously null.
14:11RaynesWhat part of null do you not understand? null.
14:11bitemyappRaynes: the hilarious part is it swallows all my logging information from Timbre, making it impossible to know what broke.
14:11bitemyappthanks Obama.
14:12RaynesI bet it's running better than the convernemtn.
14:12Rayneswat how did that happen
14:12Raynesgovernment
14:12scriptorinteresting typo
14:19llasramRaynes: You may want to get that stroke looked at
14:19Raynesllasram: Indeed.
14:20llasramRaynes: Do you happen to use the Dvorak keyboard layout?
14:20Raynesllasram: I barely use the qwerty layout.
14:20llasramhah
14:21RaynesI'm the second fastest typist in Geni at the moment, yet nobody understands how I even manage to produce words given that I type with like two fingers on each hand.
14:21scriptorwhat's your typing speed?
14:21Raynes110-115ish
14:21technomancythe supple fingers of youth
14:22arrdemyall type so fast...
14:24dnolenthis is a pretty tricky/fun performance enhancement ticket for ClojureScript http://dev.clojure.org/jira/browse/CLJS-619
14:25bitemyapptechnomancy: yes, that fixed it.
14:25bitemyappRaynes: I do 80-90 WAM typically, 100-105 if I'm paying attention.
14:26bitemyapptechnomancy: now I have useful stacktraces again.
14:26Raynesbitemyapp: My typical speed is something like 85-95.
14:26Raynesbitemyapp: But if I care, I can hit 110-115 pretty easily.
14:26bitemyappwelp. pushin' this to quasi-prod so I can know wtf is going on.
14:26bitemyappRaynes: I don't think I could crack 110 unless I practiced. I don't type properly (home row)
14:27Raynesbitemyapp: What I was just saying is that I don't do that either.
14:27RaynesI don't do anything even remotely resembling that, in fact.
14:27RaynesMy hands literally hover above the keyboard.
14:27RaynesI hunt and peck, but at 200 miles per hour. :P
14:27Raynes(and without looking at the keyboard, of course)
14:28technomancyisn't that just pecking then?
14:28RaynesSure. My fingers still hunt.
14:28noncomwhen you do that does it look like that? : https://www.youtube.com/watch?v=8T7FKrJvgCk
14:28bitemyappmy fingers hunt some, but they hover in orbits on the left and right-hand sides so that I have easier access to symbols.
14:29jonasendnolen: I don't really understand what you mean in CLJS-619. What do you mean with IFn implementations for different arities? Doesn't IFn already support that?
14:29Raynesnoncom: Not really.
14:30dnolenjonasen: it does not, IFn is a fiction at this point - it just emits .call and .apply methods
14:30technomancybitemyapp: thanks for the report; will try to get a release out today.
14:30dnolenjonasen: with the obvious perf hits around & args
14:31jonasendnolen: what's the alternative?
14:31dnolenjonasen: IFn implementors have .cljs$core$IFn$_invoke$arity$ for each arity
14:32dnolenjonasen: since it's a bear to implement all 20 arities, I think it may be ok to use JS prototypes here to get default implementations
14:32dnolenjonasen: this means calls collections as functions will get much, much, much faster
14:32dnolenjonasen: and it would be possible for multimethods to not be so slow
14:32bitemyapptechnomancy: aweeeessssooome. Thank you :)
14:34pandeirohow can i kill a repl process started with lein repl :headless?
14:34jonasenso ([42 43] 1) would emit <persistent-collection>..cljs$core$IFn$_invoke$arity$1(1)
14:36jonasendnolen: instead of cljs.core.PersistentVector.fromArray([42, 43], true).call(null, 1);
14:36dnolenjonasen: yep
14:36jonasendnolen: I think dart does this?
14:37dnolenjonasen: and that will get even faster when we emit constant tables w/ pre-allocated data structures
14:37dnolenso (if (#{1 2 3} 1) ...) could be very fast
14:38Raynesbitemyapp, noncom, technomancy: https://www.youtube.com/watch?v=5ZWxIyxxtis
14:38RaynesIn case you care.
14:39dnolenjonasen: re: multimethods, currently 100X slower than Clojure JVM
14:39bitemyappRaynes: yeah, you type a lot like I do.
14:39jonasendnolen: I haven't really looked at how multimethods work... But I'm a happy user of them :)
14:40Raynesbitemyapp: But on a better keyboard! :D
14:40Raynes:p
14:40jonasenso making them faster +1 from me
14:40bbloomdnolen: is anything blocking the constant tables any more? we have the :constant? flag and we have the keyword table. can't we just glue those together pretty easily?
14:42bitemyappRaynes: I type on a fairly flat wired apple keyboard. I've grown accustomed to these things.
14:43dnolenjonasen: they are pretty simple, at least the ClojureScript implementation - skimming the source, there's a lot of room for improvement.
14:44dnolenbbloom: we never actually merged in the :constant? work in your branch
14:52bbloomdnolen: *scratches head* really? it's been a while, i forgot heh
14:53Raynesbitemyapp: I'm fairly accustomed to my macbook keyboard, but I <3 my das.
14:53bbloomdnolen: ooooh yeah, heh
14:53arrdemupvotes for the das!
14:53Raynesbitemyapp: You should consider getting a CM quickfire rapid.
14:53bbloomok, well i guess i need to bring that up to date at some point
14:53RaynesIt's super cheap (if you care about that), but is mechanical and doesn't suck.
14:53RaynesMy flatmate got one of those recently. Enjoys it quite a bit, I hear.
14:53bitemyappRaynes: I've gotten so used to the low-travel Apple keyboards that I don't know if I'd want to do that except as a gaming keyboard.
14:54bbloomdnolen: ah but f80956 did make it in
14:54technomancyI'm kind of afraid that once my mechanical keyboard arrives I'll just be filled with disgust at everything else
14:55Raynesbitemyapp, technomancy: It's really easy to go from a good keyboard to a shitty apple keyboard.
14:55bitemyapptechnomancy: which did you get?
14:55RaynesIn my experience anyways.
14:55arrdemtechnomancy: it isn't so much disgust at anything else.. you just miss the feel when not using it.
14:55bbloomdnolen: https://github.com/brandonbloom/clojurescript/commit/b02b07fe888ffc8554469148cb35afdceabcd348 doesn't seem too scary if that would help :-P
14:55technomancybitemyapp: ergodox
14:55bitemyappI've owned mechanical keyboards before, I just don't own one right now.
14:55bitemyapptechnomancy: too hardcore for me.
14:55dnolenbbloom: yep, that's the bit that's missing
14:56technomancyarrdem: going from my thinkpad to a macbooklike chicklet filled me with disgust though
14:57arrdemtechnomancy: idk. I can still type on my friends macbooks and my Samsung Series 9, I just miss the clicking feeling to the point that I've been known to lug a Das around campus with me.
14:57technomancyI got rid of my series 9 =(
14:57arrdemQ_Q
14:57arrdemtechnomancy: you traded up to a Crackbook Air didn't you, trator.
14:58technomancyarrdem: not a chance. got my old thinkpad repaired.
14:58jonasendnolen: bbloom: I read the log from a couple of days back when you were discussing cljs "static fields" with cemerick... I just want to mention that I support your side of the argument: https://groups.google.com/d/msg/clojure-dev/Ge5uEqlUcJk/E-PnFQ9lefoJ
14:59bbloomjonasen: ::thumbs up::
15:00dnolenjonasen: yes I remember
15:00dnolenjonasen: that's why I pinged you when I changed it, I realized you were right because otherwise identifying namespaces is more complicated in CLJS.
15:01dnolenjonasen: we can special case the convention for deftypes, but it just seems like a JVMism to me, not a Clojure-ism.
15:02jonasendnolen: I think it's important to follow clojure semantics as close as possible but _not_ interop semantics
15:02bbloomdnolen: i get a test failure on master right now
15:02jonaseninterop is obviously different between platforms
15:02bbloomdnolen: Error: Assert failed: (= (-> s reader/read-string .valueOf) (-> s reader/read-string pr-str reader/read-string .valueOf))
15:03bbloomunder V8. out/core-advanced-test.js:1090
15:03dnolenbbloom: hrm, running them, tests pass for me.
15:03bbloomi did a clean & a bootstrap, then ran them & get that
15:04dnolenbbloom: trying
15:06dnolenbbloom: no failing tests, clean + bootstrap
15:06bbloomon 09488be2?
15:06dnolenbbloom: yes
15:06bbloomodd....
15:07dnolenbbloom: or a bug, that's an #inst test
15:09bbloomdnolen: #_ing it out: all the other tests pass for me
15:09gphilipparthi
15:09jonasendnolen: bbloom: I haven't been able to run the test suite for a long time and I have not been able to figure out what the problem is. I've got a special testing branch where I have commented out https://github.com/clojure/clojurescript/blob/master/test/cljs/cljs/core_test.cljs#L1725-L1726
15:10dnolenjonasen: so that line causes tests to not run for you?
15:10gphilippartCan anyone give me a hand on a simple atom probem ?
15:10bbloomdnolen: run ${V8_HOME}/d8 and tell me what version you've got
15:10bbloomgphilippart: don't ask to ask. just ask
15:10dnolenversion 3.22.11 (candidate)
15:10dnolenI built a couple of days ago
15:10gphilippartyeah, right
15:10bbloomdnolen: hmm, i've got 3.10.2.1
15:11gphilippartI expect reset! to respect lazyness but (reset! commands (cycle (concat (repeat 6 "UP") (repeat 6 "DOWN")))) realizes the lazy seq that comes out of (cycle x)
15:12jonasendnolen: core_test.cljs doesnt compile for me with #queue literals. But the weird thing is that #queue [1 2 3] works in script/repljs
15:12gphilippartwhere commands is an atom of course
15:12bbloomjonasen: have you run script/boostrap ?
15:12jonasenbbloom: yes
15:12bbloomand script/clean? :-)
15:13jonasenbbloom: yep, several times :)
15:13bbloom*shrug*
15:13bbloomi'm updating my v8 now
15:13bbloomseeing if that helps my issue
15:14amalloygphilippart: no it doesn't
15:14bbloomdnolen: anyway. i remembered the other thing that is blocking the constants table for data structures....
15:14amalloyperhaps your repl is realizing the sequence in order to print it for you
15:14dnolenjonasen: seems like a reader problem maybe? what version of tools.reader is in your lib directory?
15:14bbloomdnolen: it's the fact that all the deftypes get mixed in with their implementations. we'd have to sort all the deftypes to the top, basically
15:14bbloomb/c the fields/constructor needs to come before the constants table
15:14jonasenso #queue [1 2 3] works in script/repljs but _not_ script/repl
15:14bbloomwhich is needed throughout the bootstrapping process
15:15dnolenjonasen: seems like a classpath thing?
15:15dnolenbbloom: we already emit constant_table.js in the right place
15:15dnolenafter the standard lib, before all user libs
15:16dnolenoh
15:16jonasendnolen: Yes, probably. Does #queue literals work for you in script/repl?
15:16gphilippartamalloy : seems I'm bitten by the repl realizing lazyseqs.
15:16gphilipparthow do you know it's still lazy ?
15:17dnolenbbloom: oh you're talking about making it work for user deftypes too ... lower priority I think.
15:17amalloygphilippart: because it would be absurd for it not to be. that is just not how things work
15:17amalloyreset! doesn't have any magical properties that reach inside of objects and somehow make them non-lazy; it just sets a pointer
15:18bbloomdnolen: hmmm… i didn't consider differentiating core and user deftypes…
15:18dnolenjonasen: yes #queue [1 2 3] works for me in repljs
15:19gphilippartamalloy : yeah it sounded absurd to me as well, yet my ring handler blocks on this call. I might have missed something.
15:19jonasendnolen: it works for me to in repljs, but not in repl (i.e., script/repl)
15:20dnolenjonasen: which is the Clojure repl, why should it work there?
15:20jonasendnolen: ok, just wanted to check
15:21dnolenjonasen: compile-file* in compiler.clj binds reader/*data-readers* to tags/*cljs-data-readers*
15:21dnolenjonasen: where reader is tools.reader
15:23pandeiroanyone use ring-middleware-format? besides setting the Accept: header what must a request do to trigger the automatic response serialization?
15:24noonianpandeiro: you should get response serialization on any route that you wrapped with wrap-format-response, if you don't specify one it should default to json I think
15:32bitemyappIf I find the person responsible for putting this: ["[]"] - in my schema, I'm going to beat them to death with a banana.
15:33pandeironoonian: i am doing something like (-> (site (context root [] my-routes)) (wrap-restful-format)) - do i need to call wrap-format-response? i thought it was included in wrap-restful-format
15:34jonasendnolen: I can compile core_test.cljs from the repl using cljs.compiler/compile-file*. I can also read #queue literals in script/repljs. But I can not read #queue literals when running script/test..
15:34noonianpandeiro: wrap-restful-format does both, but if you wrap routes with wrap-response that are supposed to return html and not json I've encountered problems
15:35noonianso I switched to using wrap-restful-params for everything, and only wrap-restful-response on the actual routes I am returning non-html data from
15:35dnolenjonasen: hmm weird ... maybe we need to setup that binding around analysis as well?
15:35bbloomdnolen: jonasen: ugh. v8 takes forever to compile. how do people actually write software like this?
15:36dnolenbbloom: yeah forever
15:36bbloomIMO, 1 second is the upper bound for how long ANYTHING should take to compile
15:36gphilippartamalloy: I put a very simple ring app (20 lines) here : https://github.com/gphilipp/gilles-elevator/blob/master/src/gilles_elevator/core.clj. When I go to localhost:8081/reset, the browser returns the whole realized list, and the CPU goes wild. It's just a reset!. What's the issue ?
15:36dnolenbbloom: trying compiling Mercury sometime, 8 hours or something like that
15:37dnolenerg updated nrepl, stopped worked
15:37dnolennrepl.el
15:37amalloyring is trying to interpret the result of your reset! as a valid ring response
15:37technomancybitemyapp: https://github.com/mmcgrana/clj-stacktrace/tree/0.2.7
15:37arrdemdnolen: yeah melpa's nrepl is b0rken
15:37noonianpandeiro: for instance you can return a sequence of strings and ring renders it as html, if you call wrap-restful-response that will be converted to a json array, at least if its a vector
15:37dnolenarrdem: how to fix?
15:38arrdemdnolen: idk. I wound up pulling nrepl from my packages and `git clone`ing the master. that worked.
15:38arrdemdnolen: another fix is to use the marmalade version.
15:38pandeironoonian: gotcha.. and the middleware should work fine with (context "foo" [] foo-routes), right? right now i'm getting 0-length responses for some reason
15:38arrdemdnolen: but that's only 0.2.0, not 0.2.3 which is Master ToT
15:38amalloytry reading the ring SPEC to see what a ring handler is supposed to return
15:39amalloy$google clojure ring spec.md
15:39lazybot[ring/SPEC at master · mmcgrana/ring · GitHub] https://github.com/mmcgrana/ring/blob/master/SPEC
15:39technomancymelpa =\
15:39bbloomdnolen: ok, on latest V8: tests run
15:39bitemyapptechnomancy: thank you :)
15:39noonianpandeiro: that usually means you need to wrap it in ring.util.response/response
15:39dnolenbbloom: ok good to know
15:39dnolenbbloom: all the JS engines on the bleeding edge are crazy finicky
15:39pandeironoonian: huh b/c the ring-middleware-format README says just return a clojure data structure
15:40dnolenbbloom: they've on failed inexplicably at one time or another
15:40dnolenthey've all
15:40bbloomheh
15:40noonianpandeiro: basically, handlers need to return maps, otherwise format-response is looking in the :body key presumably, and getting nil for the value
15:40pandeironoonian: ah ok
15:40pandeirocompojure magic confused me there
15:40noonianpandeiro: yeah, the :body should contain a clojure datastructure, maps to json objects, vectors to arrays, etc
15:41gphilippartamalloy : thx, I wrapped my call into a do block, and return a "reset everything" string.
15:41gphilippartseems to do the trick
15:41gphilippartI get it now
15:44dnolenarrdem: grr, still not working for me, I get a hung process when using nrepl.el
15:44arrdemdnolen: the brand new one from github?
15:46dnolenarrdem: yeah, HEAD is busted, I git reset back to the 0.2.0 commit
15:46arrdemdnolen: ... weird that's not the behavior I'm seeing. I'm sitting at a4f90f2d25985396e760e6c889d9dcb19deddeca happily.
15:47dnolenarrdem: yeah, well at least it's working for me now, thanks for the help
15:47arrdemugh someone is gonna have to figure out what's going on here eventually...
16:15al-maisanhello there! I get "Exception in thread "async-dispatch-916" java.lang.AssertionError: Assert failed: No more than 1024 pending puts are allowed on a single channel. Consider using a windowed buffer." when using core.async with a lot of go routines .. ist this a hard limit..?
16:16BobSchackpretty much https://github.com/clojure/core.async/blob/master/src/main/clojure/cljs/core/async/impl/channels.cljs#L57
16:17tbaldridgeal-maisan: yep, pending puts/takes create a unbounded buffer (a bad thing), Use a larger buffer, or use a windowed one.
16:18tbaldridgeor at least without that assert they create a unbounded buffer.
16:18al-maisanwill try a larger buffer .. thanks tbaldridge and BobSchack !
16:20amalloyi wouldn't just increase the buffer size without at least examining why you need more than 1024 buffered writes. it seems more likely to be a bug in your code than a limitation you're really bumping up again
16:21amalloylike, two thousand different go blocks all writing to the same place? doesn't sound good
16:26pepijndevosShould I use core.monad or protocol-monads?
16:28al-maisanamalloy: I actually forgot to set the buffer size in first place
16:28amalloypepijndevos: i don't think core.monad exists. algo.monad?
16:28al-maisanamalloy: I have a program that spawns 50K go routines that all write results to the same channel
16:29pepijndevosamalloy, yes.
16:29tbaldridgeal-maisan: that's going to be a bit of a problem for several reasons. but, what do you need 50k go blocks for?
16:29pepijndevoseveryone at eeuroclojure seems to tak about the state monad
16:30pepijndevosso while I'm in my place with proper wifi, I though i'd check it out
16:30lynaghksi14: pong
16:30amalloypepijndevos: i would for sure not use algo.monad. i probably would learn haskell rather than try to use protocol-monads, but at least protocol-monads is conceptually sound; last i checked, it doesn't violate the monad laws
16:30pepijndevoshaha
16:31pepijndevosI did some haskell actually
16:31pepijndevosbut yea, the prevailing opinion seems to be that most advanced monads only make sense with a type system
16:32pepijndevosI just have some clojure code that I think could benefit from the state monad, so I want to try that
16:32amalloyi'm inclined to agree, but don't have enough experience that you should take my opinion seriously
16:32al-maisantbaldridge: just kicking the tyres of core.async .. I have similar code working in golang
16:32pepijndevoswhat a stunning amount of documentation...
16:33amalloythat's jimduey for you, pepijndevos
16:33amalloymonads also suffer from lack of TCO, because you end up with a lot of nested calls to bind that could be optimized but aren't on the jvm
16:33al-maisantbaldridge: what is a more "reasonable" number of go routines to be used with core.async?
16:33tbaldridgeal-maisan: yeah, the reasoning for the limitation is that a) it's mostly pointless. Very few people need to do that in production. 2) it normally indicates a flaw in the logic of the program.
16:34al-maisantbaldridge: err .. how about embarrassingly parallel problems?
16:35tbaldridgeal-maisan: use reducers. core.async is a concurrency library, not a parallelism library. Or just spin up X number of threads/gos where X is the number of CPUs. Any more than that, and you're going to kill performance due to book keeping.
16:35pepijndevosamalloy, ouch... that *might* be a problem
16:35pepijndevosmeh, probably not
16:35tbaldridgeNotice how very few (if any) raytracers spin off a thread for every pixel. They spin up CPU+2 threads and then process the pixels in blocks
16:35al-maisanok, will look at reducers .. thanks tbaldridge !!
16:38bitemyapppepijndevos: I like that people use the opportunity to go to a Clojure conference and be surrounded by Clojurians to talk about things Haskellers do :)
16:38AimHereIsn't gossipping about people of other languages exactly what Clojurians do?
16:38AimHereAt least in conferences
16:39AimHereThey get some Scala dude in to talk about Scala. They get Byrd and Friedman to talk about Kanren and Prolog, they all bitch about Java
16:39muhoothere's been a weird envy/cross-pollination between haskell and clojure for a while
16:40al-maisantbaldridge: yeah, ideally I'd like to fire up all the tasks in separare go routines and let the run time take care of things
16:40al-maisantbaldridge: the golang runtime is handling huge numbers of go routines just fine
16:40scriptormuhoo: both ways?
16:40muhooscriptor: mostly one way AFAICT
16:40dnolenal-maisan: the problems you'll encounter with your approach is no different than in core.async, Erlang, Haskell sparks, etc
16:40tbaldridgeal-maisan: so does core.async, the problem is putting all the values into the channel. But like I said, you'll get better performance by doing things slightly differently
16:41tbaldridgeal-maisan: for instance, spin up 10 gos to do processing, then use one more go to spool items into the channel.
16:42al-maisanthanks for the suggestions tbaldridge .. will try that
16:42dnolenal-maisan: here's a simple go program that breaks down
16:42dnolenhttps://gist.github.com/swannodette/6981382
16:42dnoleneasily portable to core.async, Erlang, Haskell where it will also ... break down
16:46pepijndevosthe tests and source code arn't terribly helpful to understand how to use the state monad.
16:46al-maisandnolen: I am clojure rookie and just trying to replicate what I had working in golang very nicely (https://github.com/freizeit/exercises/tree/master/cj-a-store-credit/golang)
16:47al-maisandnolen: just experimenting with core.async at this point ..
16:49al-maisandnolen: when I spawned 50K go routines (all writing to the same result channel) in golang the runtime handled that just fine .. hence my questions whether that would be the case in core.async as well
16:49al-maisanbut never mind
16:51dnolenal-maisan: yes I understood what you're trying to do. But my gist shows precisely where allowing unbounded queues behind the scene allows things to fall apart.
16:51al-maisansure .. point taken
16:51dnolenal-maisan: core.async could also allow it, but it does not - different philosophy
16:51al-maisangotcha
16:52tbaldridgeal-maisan: since it's an artificial limit, we don't mind removing it at some point, but we haven't seen a good use case yet.
16:56coventrybitemyapp: "git blame --retribution=banana-beat-down"
16:56mercwith1mouthlol
16:56bitemyappcoventry: it's unconscionable.
16:57bitemyappmeanwhile, I'm knee-deep in nested-reduce-hell.
16:57bitemyappcan't figure out how a root binding got ghosted out of existence by all my (next (reduce ...)) calls.
17:00bitemyappSomewhere out there a Haskeller is mocking me mercilessly.
17:01muhooi saw a post recently by a guy who listed all the reasons why using a queue is a bad idea.
17:01muhoogoogled, haven't been able to find it. but it was basically "yeah, nice hammer, too bad that's not a nail"
17:02tbaldridgemuhoo: WHERE!?! someone is wrong on the internet....
17:02Morgawrman, I just read http://swannodette.github.io/2013/07/12/communicating-sequential-processes/ this... hell, I've always seen you guys talk about core.async but never really cared about it... it's amazing :V
17:02bitemyappmuhoo: in what use-case?
17:02bitemyappmuhoo: RabbitMQ has solved a goodly number of problems for something I'm working on right now.
17:02dnolenMorgawr: it's pretty cool
17:03Morgawrdnolen: yes
17:03muhootbaldridge: bitemyapp: wish i could find it. there was a list of cases where, if you are doing x, y, or z, you don't want a queue
17:03bitemyappthere are some aspects of queues I find awkward/annoying, I can't say I'd be upset if it just turned into a lazy-job-processing database coll instead.
17:03Morgawrdefinitely going to use this for my next gamedev challenge in clojurescript :P
17:03tbaldridgebitemyapp: the more I use RabbitMQ the more I love it.
17:03bitemyappmuhoo: that sounds...really useful. Please save the links you find next time :P
17:03bitemyapptbaldridge: I'm...not really there with you on that. More like familiarity breeding contempt. It's still useful though.
17:04bitemyappRMQ technically does its job fine, I just find the semantics of how AMQP based queues work annoying at times.
17:04tbaldridgeexplain?
17:05bitemyapptbaldridge: listing my grievances is more like a blog post or a skype call than a drive-by on IRC.
17:05bitemyappit might elucidate the matter quickly that I'm using it as a job queue, not a message queue though.
17:06tbaldridgebitemyapp: well let me know when that happens. For what I use it for (durable, reliable, messaging) it seems to work well, but there are many tasks I would not use it for.
17:06bitemyappusually whenever I mention that I'm using RMQ as a job queue, people go, "ohhhh" at my grumpiness surrounding it.
17:10bitemyappI'm just going to start adding types to my program until it makes sense.
17:11tbaldridgerofl, that's going on twitter.
17:11dnolenMorgawr: this is a pretty cool writeup of using core.async to do a Dots clone http://rigsomelight.com/2013/08/12/clojurescript-core-async-dots-game.html
17:12dnolenMorgawr: a good one a pong variation http://ragnard.github.io/2013/10/01/clojurecup-pong-async.html
17:12dnolenMorgawr: and I heard weavejester was talking about core.async for games at EuroClojure
17:13Morgawrdnolen: daamn so much to read, thanks! :P
17:15bitemyapptbaldridge: you laugh, but it'll probably help.
17:16bitemyappI hope.
17:18hfaafbis there a web interface that compiles cljs to js
17:18hfaafbto sate curiosities
17:18muhoohfaafb: cljsfiddle?
17:18scriptorto see the resulting js?
17:19dnolenhfaafb: http://cljsfiddle.net
17:19hfaafbthanks :)
17:19dnolenhfaafb: http://himera.herokuapp.com/index.html also
17:20dnolenhfaafb: note neither are particularly informative since the JS we generate is optimized for further processing by Google Closure Compiler
17:20scriptorhow do you check the version of cljs you're running?
17:20dnolenscriptor: there's no way to do that at the moment
17:20scriptoris the herokuapp one otherwise up-to-date?
17:20hfaafbahh do any of these show the resulting js?
17:22xeqidoes cljsfiddle let you write macros?
17:22jonasenxeqi: no
17:23dnolenhfaafb: in Himera you can always just wrap your expression in an (fn [] ...)
17:24jonasenxeqi: with some sandboxing and custom cljs it would probably be possible
17:24dnolenhfaafb: so (fn [] some-expr)
17:24jonasenxeqi: but I haven't experimented with that at all yet
17:24xeqijonasen: np, I was just going to raise concerns about sandboxing
17:26hfaafbmuch appreciated dnolen
17:26benmosshfaafb: also no, not really. you can sorta see it if you look at the EDN response on cljsfiddle
17:27benmossoh, better answer :)
17:28jonasenI could (should?) add a tab where you can see the generated js... that would probably be a useful feature
17:28jonasenin cljsfiddle that is
17:28dnolenjonasen: it would be useful for debugging yes, I had to use the DOM inspector to debug
17:33dnolenhfaafb: the CLJS version Himera uses is pretty cold now, cljsfiddle very up to date.
17:34bitemyappOkay, so today's lesson was: maintain symmetry in nested reductions.
17:34bitemyapptbaldridge: done without types ^^ just thinking :P
17:36dnolenjonasen: oh rad, you keep improved cljsfiddle, console much appreciated
17:36dnolens/improved/improving
17:37jonasendnolen: yes, its not finished yet :)
17:37letslearnhello, i hope it is ok to ask n00b questiosn here. I am going through the clojure koans series and am kinda tripped up with the functions portion. The one i am having trouble with is this one specifically
17:37letslearn "Higher-order functions take function arguments" (= 25 ((fn [f] (f 5)) (fn [n] (* n n))))
17:38letslearnI am not certain what is happening here. It is that - ((fn [f] (f 5)) is returning 5 ?
17:40letslearnSo, to prove that, I tried (= (fn [f] (f 5))5) in the repl and it gave me false. So, I am confused
17:41AimHereletslearn, (fn [f] (f 5)) takes a function and applies it to 5
17:41letslearnapplies it to 5?
17:41AimHereletslearn, So ((fn [f] (f 5)) inc) would increase 5
17:41letslearnoh
17:42jonasendnolen: I'm also planning to implement C-x-e (etc) key bindings so you can do "emacs-like" interactive development... Paredit is another thing I'd like to add but I'm hoping idbknox will implement that (and release it) for lighttable.
17:42AimHereThe function being passed happens to be one that squares the number that's passed to it
17:42scriptorapplies it = called with
17:42AimHereYes
17:42AimHereSorry
17:42scriptorf applied to 5 = f is called with 5
17:42dnolenjonasen: C-x-e would be slick
17:42letslearnaah ok
17:42scriptorjust clarifying
17:42letslearnthank you! AimHere and scriptor
17:42dnolenjonasen: did kovasb do a stand alone paredit thing? or least bits of it?
17:43dnolens/did/didn't
17:43AimHere,(apply #(* x x) 5)
17:43jonasendid he?
17:43clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: x in this context, compiling:(NO_SOURCE_PATH:0:0)>
17:43AimHere,(apply #(* % %) 5)
17:43jonasenfor codemirror?
17:43clojurebot#<IllegalArgumentException java.lang.IllegalArgumentException: Don't know how to create ISeq from: java.lang.Long>
17:43AimHereGah
17:43dnolenjonasen: oh I was thinking of this - http://github.com/achengs/subpar
17:43hyPiRion,(apply #(* % %) [5]) ;?
17:43clojurebot25
17:44jonasendnolen: Thanks! I'll definitely take a close look at that!
17:44letslearnok
17:46letslearn, ((fn [f] (f 5)) -) ; ?
17:46clojurebot-5
17:46letslearnthanks Aimhere, i think i get it now
17:47bitemyappcore.typed ended up being too noisy to be helpful in my use-case. Look forward to seeing it improve though.
17:54mgaarenrepl.el is broke
18:54technomancywhy does lein-cljsbuild tell everyone to use hooks?
18:58Raynestechnomancy: Too much phonics?
19:00technomancyundoubtedly
19:03bitemyappI love it when I forget to comment my cond/case :elses so I remember what the fuck I was assuming at that point in time about the :else case
19:47Morgawrmm.. I'm trying to connect to an nrepl from lighttable and it's not working :(
19:48MorgawrI open the connect bar, add connection to nRepl (started from lein repl in my project), input localhost:<port> where port is the one provided by lein nrepl
19:48rasmustoMorgawr: is the project using clojure 1.5.X?
19:48Morgawryes
19:48Morgawr1.5.1
19:48Morgawrit just says "connecting...." forever
19:48rasmustothat was the first thing that I ran into, idk what you're seeing, hm
19:53rasmustocan I use edn/read-string and (with-out-str (clojure.pprint/pprint somestuff)) safely?
19:53Morgawruff, can't get it to connect ;_;
19:54bitemyappMorgawr: I've never had any trouble in Emacs :)
19:54rasmustowell, if lighttable can't connect, can nrepl.el connect at least?
19:54Morgawrmmm.. I don't think it's an LT problem... when I kill the nrepl from the command line the "connecting..." is dropped
19:54Morgawrso maybe it's a problem from leing, idk
19:55Morgawrdo I need to add some special flag to lein or somethnig?
20:02Morgawrdoes it have to be started in :headless mode from lein in order to be able to connect locally from LT?
20:03rasmustoMorgawr: that shouldn't matter.
20:04rasmustoDoesn't LT fire up its own repl if there isn't one running?
20:04Morgawryes it does
20:04Morgawrbut I want to connect to my own nrepl
20:09rasmustoi wonder if its a leiningen .nrepl-port thing
20:09technomancyif .nrepl-port gets written, you should be able to connect
20:10technomancyyou can always test with `lein repl :connect` to see whether it's a client issue or not
20:15Morgawrtechnomancy: ehh, I did "lein repl :connect <port>" and it worked
20:15Morgawrbut inside LightTable it doesn't
20:16MorgawrI really don't know why, it's so annoying
20:17technomancyyeah, no idea, sorry
20:24rasmustoMorgawr: what version of leiningen are you using?
20:26Morgawr2.1.3
20:28rasmustoI'm on 2.2.0, and I can connect to a new repl using LT
20:29Morgawrthat might be the thing, how do I update lein?
20:29rasmustolein upgrade
20:30rasmustohmm, it looks like .nrepl-port and target/repl-port are both created with this version, I'm not sure what 2.1.3 did
20:30Morgawrrasmusto: ok, trying now :)
20:32Morgawrnah, still no good :(
20:32rasmustoyou restarted the repl, right?
20:33Morgawrrasmusto: yeah ofc
20:33rasmusto:) just making sure. I've missed doing that personally
20:33rasmustohrm, and you have both a .nrepl-port and target/repl-port file?
20:34bitemyapparrdem: you watch SC2!?
20:34Morgawrrasmusto: where should I look for them?
20:35rasmustoMorgawr: on the machine that you're running the repl on
20:35Morgawryeah but which folder :P in the lein project or in lein root?
20:35rasmustooh, I guess I didn't understand, how are you attempting to connect to the repl with lt?
20:35rasmustothe root of the project where you run `lein repl`
20:35MorgawrI just run LT -> connections -> add connection from nRepl -> localhost:port
20:36rasmustoah, okay. hrm
20:36Morgawrbut yeah, it's not a big deal, I found a better way with dealing with this
20:36Morgawrby using the integrated LT repl
20:36MorgawrI was having a problem with an infinite loop (main game loop) so I just spawned that in another thread
20:36Morgawrand now it works perfectly :P no need for remote repl
20:39rasmustoMorgawr: hm yeah, I'm having some issues with the remote repl thing too
20:40arrdembitemyapp: you bet your drones I do
20:41bitemyapparrdem: do you play too?
20:42arrdembitemyapp: I'm not competitive but I do play.
20:42bitemyapparrdem: I've been thinking about getting back into it.
20:42rasmustothat game stresses me out
20:42bitemyapprasmusto: that sounds about right.
20:42arrdembitemyapp: I had a lot of fun back in HS playing 2v2s with a Masters buddy of mine
20:42bitemyapparrdem: want to do 2v2s sometime?
20:42arrdembitemyapp: but I never really enjoyed 1v1s
20:42arrdembitemyapp: I'm down.
20:42bitemyappI love 2v2s.
20:42bitemyapparrdem: what region do you play on?
20:43rasmustoi need too much coffee to sustain 100+ apm, and my strategy goes out the window at that point
20:43arrdembitemyapp: NA
20:43arrdemrasmusto: lol I've made 116 before, but I _feel_ like I'm flying at that point.
20:43bitemyapparrdem: how should I ping you to play later?
20:43arrdemrasmusto: my normal max is about 85-90
20:43rasmustoi have inflated zerg apm too, so I cheat
20:44bitemyappI have the most experience with Zerg, but playing Z really burns my tail.
20:44arrdemzerg APM is _not_ inflated.
20:44bitemyappI need to finish switching to something else.
20:44arrdembitemyapp: please please please be Protos
20:44arrdemmuta/ling/bling is my specialty
20:44arrdemhydra/roach is my alternate
20:44rasmustoarrdem: its not? I thought that auto-repeat on unit building counted
20:44bitemyapparrdem: P is my second best race an the one I was trying to transition to. We can do ZP 2s.
20:44bitemyappand*
20:45bitemyapparrdem: what tier are you?
20:45bitemyapptechnomancy: kekekekekekeke
20:45arrdembitemyapp: sounds good. I just finished midterms as you can tell by my ranting about church numerals. email me later and we can get something going.
20:45arrdembbl lock picking
20:45scriptortime to make a clojure lounge channel
20:45arrdemtechnomancy: my appologies
20:46rasmustoscriptor: clounje
20:46bitemyapprasmusto: ew
20:46arrdemscriptor: #clojure is the #clojure-offtopic
20:46technomancyarrdem: no this is legit; I just had a bad pattern match
20:46scriptorthough I guess #emacs is pretty loungy
20:46rasmusto#emacs is where I go for politics
20:46rasmustoit hasn't worked out too well so far...
20:47arrdemtechnomancy: you should explain that in english... IRC modes are one of the many things I don't grok yet.
20:48bitemyapparrdem: http://www.dslreports.com/faq/8037
20:48rasmustobitemyapp: what isn't on dslreports.com?
20:48arrdembitemyapp: ah. that's what I thought it meant.
20:48technomancyarrdem: just that I thought for a moment it was that "everyone in this room is terrible. please help me write a starcraft clone in clojure" troll
20:49technomancyand I was getting an itchy trigger finger
20:49bitemyappLOL
20:49bitemyappI actually totally forgot about that guy.
20:49arrdemHUEUEUEUE
20:49bitemyapparrdem: wrong game, that BRs ruined Dota/Dota2/HoN/LoL not SC2.
20:49rasmustohe's probably laughing on the way to the bank as we speak
20:49arrdembitemyapp: I think in his 48hrs chord equaled my cloutjure score...
20:49bitemyappin SC2 they can't hide behind their teammates so they get face-smashed back into the MOBAs.
20:50bitemyapparrdem: http://cloutjure.com/ ?
20:50scriptorI wish EE/RoN style RTS's
20:50scriptorsomeone should make one in clojure
20:50arrdembitemyapp: yeah... the DB has scores but the website doesn't
20:51arrdemok. phew.
20:52arrdem{ "#clojure" : { "nick" : "chord", "posts" : NumberLong(719) } }
20:52bitemyappwtf is a NumberLong?
20:52arrdembitemyapp: mongodb weirdness
20:52arrdembitemyapp: hey. we didn't have time to get neo4j working.
20:53arrdembitemyapp: I practically DDoS'd our server and was still looking at 8hrs too slow to input the data.
20:54technomancyoh dear; is that to get around JSON's being coupled to JS broken numerics?
20:54technomancywait no; I actually don't want to know the answer
20:54bitemyapparrdem: you know I work on Korma, got a RethinkDB client started, and have been doing Datomic at work right?
20:54bitemyapptechnomancy: the answer is yes, btw.
20:54arrdemtechnomancy: yeah... sadly that answer is yes.
20:54bitemyapparrdem: there are a number of things you could do to avoid using MongoDB :(
20:54arrdembitemyapp: no I did not. you should teach me to use a DB that sucks less.
20:55bitemyapparrdem: I would be happy to. I should actually finish the Korma Clojure Cookbook chapter
20:55bitemyapparrdem: then you could be one of my test subjects for the chapter.
21:47dobry-denI read that you should only throw Exceptions for external catastrophies, not for known hazards like user-input error.
21:47dobry-denThen what do you do when your library user's input was invalid?
21:48technomancydobry-den: IMO there are places it's fine to throw for user error
21:48technomancystuff like users trying to access things they don't have permissions for
21:49technomancyI wouldn't do it for badly formatted input though
21:50dobry-dentechnomancy: Compass' compiler produces an error "Cannot determine position of: <user-input>" and I'm wondering how that translates. Do you generally subclass your own Exception named after your library?
21:50hyPiRionI think Instaparse throws, actually.
21:51technomancydobry-den: no; definitely don't subclass exception
21:51technomancyuse ex-info
21:51hyPiRionIn general, you just throw ExceptionInfo or RuntimeException.
21:52dobry-denthanks
22:57scanlonmanHey everyone, I just began 4clojure.com and am on problem 23 (http://www.4clojure.com/problem/23). Basically, the question wants me to reverse a sequence without using reverse or rseq
22:57scanlonmanMy question is -- is that possible to do in a method with only one argument?
22:57scanlonmanAll of the solutions I was thinking of had two arguments with a bootstrap method containing one argument
23:03RaynesIt is indeed possible.
23:05brehaut,(partial reduce +)
23:05clojurebot#<core$partial$fn__4190 clojure.core$partial$fn__4190@23578d>
23:05brehaut,((partial reduce +) [1 2 3])
23:05clojurebot6
23:06brehaut,((partial reduce + 0) [1 2 3])
23:06clojurebot6
23:10brehautscanlonman: ^ is a hint for you
23:10scanlonmanThank you!
23:11brehautyou might also find http://clojure.org/data_structures contains useful information
23:15scanlonmanAre there any other recommended guides to learning Clojure? I've mostly just been using 4clojure and googling some methods when I need to find something out
23:15scanlonmanI've googled around a bit and found the Clojure cheat sheet and Clojure in 15 minutes which were pretty useful
23:15brehautthat is the recommended method
23:15scanlonmanOkay thanks!
23:15scanlonmanJust need to get in the functional programming mindset :)
23:15brehautthe clojure.org website contains a lot of useful information but many beginners find it a bit overwhelmingly terse
23:17danlentzbrehaut: just like clojure :)
23:17brehautdanlentz: i dont buy it. i have to type partial out in full!
23:18danlentzI have the hardest time remembering to shorten substring to subs
23:18brehautyou can jsut use .substring if you prefer
23:18RaynesNothing wrong with it, in fact.
23:28danlentzi come from common-lisp where long symbols like 'multiple-value-bind are the norm
23:29danlentznice when reading code, excruciating at times to type
23:30brehautdoesnt CL also have caaddaaddr
23:31danlentzwith clojure's terse syntax I find I am able to make mistakes much more efficiently than in C
23:31danlentzCL
23:31brehauti suspect that is familiarity more than anything
23:32danlentzy it was a dumb joke I was just kidding
23:32brehautoh ok
23:34danlentzregarding CXXX..R I forget how many are defined by the standard. I think it is up to 10 A's and D's
23:34brehautoh really? i thought it was jsut a reader macro expanding it out
23:35danlentzYou'd have to be quite insane to actually use them, but at times there are a few notable ones like CADDR CDADDR that you find turning up more frequently
23:36danlentznope they are functions
23:36brehautthats something of a relief
23:38danlentzthere is a book called let-over-lambda by doug hoyte that goes over the implementation of a very elegant macro that will define the CXR functions to any depth you want
23:39danlentzis really just an example of the macro writing technique, not a suggestion you them in practice
23:39brehautright
23:39brehauti think ive read a bit of that book. it gets very macros very fast
23:40danlentzhoyte does things with macros I never even imagined
23:41danlentzreally strange new concepts like 'sub-lexical scope' is one off the top of my head
23:42danlentzit took me several years to digest the whole book -- starting at "I don't understand a damn thing in this book!"
23:56tsantosIs there an equivalent to (some pred coll) where it's sorta the opposite so it would be more like (matches? item pred-1 pred-2…)? I'm not sure I'm making this clear...
23:57coventrytsantos: Something like (some (every-pred p1 p2 ...) coll)?
23:57danlentztsantos: any?
23:58tsantoswell, I'm just interested to see of item passes any of the predicates
23:59tsantos(or (string? elem) (keyword? elem) (symbol? elem)) works but I was wondering if there was a simpler way of putting it.