#clojure logs

2012-02-09

00:55TheBusbyhmm, anyone have any idea why clojure.xml/parse would take 2.5 *minutes* to parse a medium sized wipipedia page?
00:59TheBusbyfun exercise: (clojure.xml/parse "http://en.wikipedia.org/wiki/The_Book_of_Eli")
00:59adiabaticIs that valid XML?
01:00TheBusbyxhtml
01:00adiabaticNo. http://validator.w3.org/check?uri=http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FThe_Book_of_Eli&charset=%28detect+automatically%29&doctype=Inline&group=0
01:01TheBusbyahh okay,
01:01TheBusbyso since some huge number of websites use invalid HTML/XML at some level, what would be a good way to parse HTML in Clojure?
01:01amalloyTheBusby, adiabatic: it's not invalid in any way that clojure.xml cares about
01:02amalloyit's perfectly valid xml, it just doesn't conform to the xhtml spec
01:02amalloy(in that apparently <ul></ul> is illegal - it can't be empty
01:02amalloy)
01:03TheBusbyhmm, is anyone else experiencing the same issue?
01:04adiabatichow do I import clojure.xml? :D
01:04noidiTheBusby, try https://github.com/nathell/clj-tagsoup
01:04noidibut tagsoup ignores all the stuff that makes the HTML unparseable
01:05scottjTheBusby: the data parsing libs in clojure aren't always the best since they don't use any external dependencies even when there are great libs out there
01:05noidiif you care about those bits, take a look at http://jericho.htmlparser.net/docs/index.html
01:05TheBusbynoidi: Thanks, I'll give that a try now.
01:07TheBusbynoidi: does tagsoup work with data.zip.xml by chance?
01:07technomancyscottj: hey, did I tell you I got new stickers?
01:08noidiTheBusby, I haven't tried that, but the docs suggest that it is: "the output format is compatible with clojure.xml"
01:08noidiah, it calls xml/parse automatically
01:09scottjtechnomancy: yeah I saw that and will get you a SASE sometime; are they the same size as old ones?
01:10scottji.e. about the right size for an ipod shuffle :)
01:10technomancyscottj: no; a fair bit bigger
01:10scottjcool
01:10technomancy2x2 inches
01:10noidiTheBusby, so yes, it should return exactly what zip/xml-zip expects
01:11bguthrieBy any chance does anyone happen to know what shell-out was deprecated in favor of?
01:12TheBusbynoidi: Giving it a shot now
01:12bguthrieIt used to be a part of contrib, but I don't see any references to it or functionality like it in the exploded github.com/clojure projects - unless I'm missing something?
01:14technomancybguthrie: clojure.java.shell
01:15bguthrie@technomancy Awesome, thanks so much for that.
01:15technomancynp
01:20TheBusbynoidi: that seemed to do the trick nicely! < 300ms
01:23noidicool!
01:48muhoosudden realization when reading about how clojure handles immutability: it reminds me a lot of git
01:49Scriptorhow so?
01:49muhoostructural sharing, in particular. git comits
01:49muhoothey're hashes of all the previous commits leading up to that one.
01:49technomancyhttp://eclipsesource.com/blogs/2009/12/13/persistent-trees-in-git-clojure-and-couchdb-data-structure-convergence/
01:49muhooheh
01:50technomancyquite true
01:50technomancyalso nix packages
01:50technomancy~nix
01:50clojurebotexcusez-moi
01:51technomancy~nix is a purely functional package manager exhibiting many similar characteristics to Clojure's persistent data structures or git commit trees: http://nixos.org/nix/
01:51muhooalso, and this one is a bit farther afield... string theory and EPR
01:52technomancyoh?
01:52muhoothe multiple-worlds interpretation of quantum physics. things never change, new realities are created every moment.
01:52clojurebotIn Ordnung
01:52technomancyah
01:53Scriptordoes string theory say that as well?
01:53muhoofrom my feeble understanding of it
01:53technomancyis that in whitehead?
01:53technomancyor russell maybe?
01:53muhoono, einstein, IIRC
01:53technomancyhuh
01:54muhoohttp://en.wikipedia.org/wiki/Many-worlds_interpretation
01:55muhoosorry, everett-wheeler-graham
01:55Scriptorthat's more of a copy-on-write implementation though :)
01:55muhooye
01:55muhoothere's no garbage collection
01:56muhoothen again, maybe there is
01:56technomancydun dun dun!
01:56muhooi can't wait until theoretical physicists start using clojure for their computation work.
01:57Scriptorheh, my friend's doing/did research in a quantum physics lab
01:57Scriptorstill chugging along with fortran there
01:58ScriptorI think R is gaining some adoption, so incanter might have a niche
01:59technomancyso really the tardis is the cause of the universe's most egregious memory leak
01:59technomancynever thought of it that way
02:00technomancyand that, my friends, is why you should never create a time paradox
02:00muhooparadoxes are, IIRC, impossible in a many-worlds interpretation
02:01muhoobecause the past is immutable
02:01Scriptormultiple leaks, really
02:01technomancywell I was thinking because the universe uses reference counting GC, and cycles make that break down
02:01muhooas soon as you go into a different universe, it's a new branch. copy-on-write
02:01Scriptorwait, the universe or the multiverse?
02:02Scriptoranything with 0 references is just in a superposition
02:16clj_newbis there a way in clojure to do dead code static analysis?
02:17clj_newbi.e. it'll find me all functions that no one calls, all agents/atoms/vars taht no one uses, etc ...
02:18technomancyclj_newb: radagast does that for defns
02:36clj_newbinteresting, a wizard of middle earth
02:36clj_newbfor a moment, given the difficulty in pronouncing the name, I thought it came from ancient mythology
02:37technomancyyou never know with tolkien
02:37technomancyyou never know with philologists in general, actually
02:37clj_newbI thought that that the RedWall series was good; then I read the Hobbit.
02:38technomancywell there's good and there's great
02:39technomancyTimMc, arohner: https://github.com/technomancy/leiningen/blob/master/doc/PLUGINS.md <- in particular under "Upgrading Existing Plugins"
02:39technomancyor anyone with a lein plugin who's interested in trying out lein2 really
02:40clj_newbwriting goes somethign like this: me, good, great, tolkein. [on an exponential scale]
02:40technomancyheh
02:52technomancywow, the contrib projects have each developers' timezone in the pom
02:52technomancythat's ... interesting.
02:54clj_newbon osx, is full screen a matter of OSX or a matter of Java?
02:54clj_newb(I'm writing a gui app in clojure; and trying to figure out how to deal with full screening)
02:54technomancyhttps://github.com/clojure/data.xml/blob/master/pom.xml#L18 helpful for IRC stalking I guess?
02:54technomancyall I know is OS X full-screening causes no end of trouble in Emacs
02:54clj_newbsay my clojure/java app hangs (beacuse some exception is thrown and the gui loop is screwed up); now, is there a way for me to in osx force the app to go go a window; so I can get back to the console?
02:55clj_newbwell, OSes, by definition, do not play nice together
02:55clj_newbba da bum
02:55technomancyheh
02:55clj_newbi'm actually really curious about osx lion's single window focus thingy
02:55clj_newbperhas this is more appropriate for #macosx
03:47Blktgood morning everyone
05:05jaleyI have a function calling .indexOf on a lazy sequence in the middle of a big loop, with a reflection warning. What's the right way to fix it? If it's a type hint, which type?
05:06clgvjaley: well, first: are you really sure you want to call.indexOf on a lazy-seq?
05:07jaleyclgv: not certain, if you've a better suggestion that'd be preferred :) I want the first indexOf a matching string. The list is sorted by a probability score
05:07jaleyclgv: oh and the list only ever has 10 elements
05:08raekjaley: you could construct a map from strings to indices from that seq
05:09raekand then use that map to lookup the index of a string
05:09jaleyraek: something like (into {} (map-indexed ...))?
05:09raeksure
05:09clgvjaley: I think a sulotion depends on the context since there several possibilities
05:09raekor (zipmap strings (range))
05:09clgv*solution
05:10jaleyraek: ok, but .indexOf was worst case O(n), where n is 10, this seems like more cpu time for little gain?
05:10clgvjaley: can you paste an example with intended context?
05:10raeksure
05:11raekI think the interface where .indexOf is defined is java.util.Collection
05:11raekcheck the javadocs
05:11lucianshouldn't the reflection be avoided by forcing the lazy-seq into a vector?
05:12jaleyi guess i would prefer to have a vector at this point for access by index, that makes the most sense
05:12cemericklpetit: FYI, try #ccw
05:13jaleypresumably I still need a type hint to avoid reflection if I then use .indexOf on that vector though?
05:13raekjaley: yes
05:15osa1I've done everything written in https://github.com/samaaron/serial-port but I'm getting ClassNotFoundException gnu.io.CommPortIdentifier java.net.URLClassLoader$1.run (URLClassLoader.java:202) when I run (use 'serial-port), can anyone help me?
05:15jaleyso (let [^PersistentVector v (vec x)] ...) -- not sure if that will actually perform better though? presumable this copies the sequence to a vector first
05:15jaleybut i think that's as good as i'll get
05:16clgvjaley: if you dont have other advantages from that, just annotate the interface that adds .indexOf to LazySeq
05:18jaleyclgv, raek: done. thanks for the help!
05:20clgvjaley: but if you need that functionality more often you could write a more fitting more efficient solution. in the "worst case" by using loop-recur
05:22jaleyclgv: sure. it's not really a bottle neck right now, I just had a load of reflection warnings in the part of my code that calls one of our java libs and was tidying it up. thanks again!
05:23clgvjaley: what I meant is now you have effort n+k and you could have effort k
05:23jaleyclgv: oh I went with the ^LazySeq hint, not the vector
05:23clgvor maybe you have 2k and could have k. I dont know your matching function
05:24raekosa1: did you run "lein deps"?
05:24osa1raek: yes
05:25raekdo you have a RxTx jar in your lib/ directrory?
05:25osa1raek: yes
05:26raekand you didn't launch clojure in some strange way?
05:26osa1raek: I'm run it with `lein repl`
05:26osa1I run*
05:28raekweird, there's a RXTXcomm.jar file inside the rxtx22-1.0.5.jar file...
05:28raekI wonder which convention this is
05:29osa1raek: are you getting the same error?
05:29raekosa1: maybe the library uses some cake-specific features
05:29raekosa1: the RXTXcomm.jar does not show up in the lib/ directory, right?
05:29raekalso, are you using the latest leiningen version?
05:29osa1raek: no, I only have rxtx22-1.0.5.jar
05:30osa1Leiningen 1.6.2 on Java 1.6.0_29 Java HotSpot(TM) 64-Bit Server VM
05:31osa1I'm upgrading lein
05:32osa1raek: I upgraded lein and then run lein deps again, and I'm getting same error
05:32raekI know that the native-deps plugin was merged into leiningen some time ago, but I haven't used it myself
05:33osa1yeah I also have a folder created with name "native", and it have some files I think related with rxtx
05:33raekosa1: could you try to put the dependency in :native-dependencies insted of :dependencies
05:34raekalso, I found this: http://groups.google.com/group/leiningen/browse_thread/thread/11e225cdea343176
05:35raekosa1: you could also try to run "lein native-deps"
05:35SebbohI'm *very* new to Clojure, so pardon me if I'm asking a silly question, or an often-asked question. :) I've read a little about clojure's perceived dependency on the jvm, and on the Java class library. Well, have you folks looked at Squawk? http://labs.oracle.com/projects/squawk/squawk-rjvm.html It's a jvm that is made out of very little C, a jvm implemented mostly in Java. Could you replace the java parts of that with Clojure parts?
05:35raekI'm just guessing here since I haven't used any lib that needed native deps myself
05:36osa1raek: looks like lein doesn't have a task named "native-deps".
05:36raekSebboh: I guess so... Clojure is just a jar file :-)
05:36raekosa1: did you try to put it in :native-dependencies and then run "lein deps"?
05:36osa1raek: yes and nothing changed
05:37raekosa1: you could try aksing in the #leiningen channel
05:37raekor wait some hours and ask here again (when the US folks has woken up)
05:37osa1raek: ok, thanks
05:39raekSebboh: sorry, I misread your question. the clojure compiler and the core data types are implemented in Java. you should be able to run clojure on any jvm.
05:40raekand yes, there has been attempts to write as much of clojure as possible in itself. take a look at the ClojureScript project.
05:40Sebbohraek, well, Squawk (from Oracle/Sun, it's in "Labs" status..) is a J2ME jvm. So, it's probably very limited. But it's design might be... inspiring. :)
05:40raekit is possible that eventually the JVM version of clojure will use the approach of ClojureScipt (often called Clojure-in-Clojure, or CinC)
05:41SebbohI will read up on ClojureScript and CinC.
05:41Sebboh:) Thanks!
05:48raekosa1: maybe you could try to delete the contents of lib/, have the dep in :native-dependencies and do "lein deps" again?
06:48Raynesraek, osa1: 1) Leiningen's native deps support was broken until the most recent release, 1.7.0. 2) When you run 'lein deps', Leiningen looks in each of the jars that you depend on for a folder called 'native'. If it is there, it pulls it out of the jar and puts it in a directory called 'native'. If you have :native-path set in your project.clj, it'll extract them to :native-path/native/*. After they are extracted, Leiningen will set java.library.path to
06:48Raynes correct native deps for your particular operating system and architecture.
06:48RaynesI'll see about documenting this soon.
06:49RaynesAnyways, there is no :native-dependencies and no native-deps task.
06:49RaynesI think those things were specific to a plugin for native deps that predates built-in support in Leiningen.
06:52osa1Raynes: so, do you have any ideas about my problem? I don't have :native-path in my project.clj, should I add one?
06:52RaynesI didn't actually read that far back. Give me a sec.
06:55Raynesosa1: Huh. That's strange. I'm not sure I've ever had the pleasure of dealing with jars with jars inside of them. I'd create an issue on that project about Leiningen support. samaaron insists on using cake even though we've dropped development on it in favor of working on Leiningen, but I'm sure he'd help you out.
06:57osa1Raynes: ok, thanks
07:25denlabhi, 4clojure.com is down
07:26RaynesThat's unfortunate.
07:26denlaband we are in the middle of a clojure evangelisation prez
07:26RaynesDamn it. Why am I always the only one awake with access to the server.
07:26denlabnot a good press for clojure
07:26RaynesGive a minute and I'll restart it.
07:26denlab;-)
07:26denlabwould be great
07:27Fossiat least it shows the great community support ;)
07:27osa1ok, if anyone else is intrested, about my serial-port problem: https://github.com/samaaron/serial-port/issues/2#issuecomment-3886469
07:27RaynesI'm also trying to manage a nosebleed at the same time.
07:27osa1it means I have to use cake for now
07:28dEPyWorkI came up with a "slogan" Clojure could use! :)
07:28denlabdon't drop blood on the server
07:28dEPyWorkIt goes like this:" I've seen the future. It has pros, cons and conj."
07:28dEPyWorkwhat do you guys think? :P
07:28Raynesdenlab: I appreciate your concern for my blood loss into the server.
07:29RaynesLuckily the server is about about 500-600 miles away fro me.
07:29cemerickRaynes: what is that, permgen bonking on you?
07:30Raynescemerick: Usually it just runs out of memory. In this particular case, it seems to have been swallowing up CPU for some reason. Mostly we suffer from not having a monitoring process that restarts the server for us when it goes down. I'm going to work on something when I get a chance.
07:30Raynesdenlab: It is back up.
07:31cemerickheroku won't bounce the app when it becomes unresponsive?
07:31Raynesdenlab: You can assure your people that the problem is not Clojure and its ability to handle traffic but the nature of the website and how it allows people to evaluate arbitrary code and how that tends to eat up memory over time.
07:31Raynes4Clojure doesn't run on Heroku.
07:31denlabthanks !
07:31cemerickah, sorry. Thought it and tryclj were tied at the hip for some reason.
07:32RaynesYeah, Heroku bounces tryclj I think.
07:32RaynesBut not reliably.
07:32RaynesYou've noticed it down a couple of times.
07:32RaynesWow. I'm going to have severe blood loss from this nosebleed.
07:33RaynesOops. I didn't restart it in a tmux session.
07:33RaynesIt's probably going to die again when I log out.
07:34cemericklpetit: BTW, thank you for the debugger in ccw. Saved my ass last night. :-)
07:35denlabthanks !
07:35lpetitcemerick: you're welcome. And don't we forget cgrand initiated the debugger
07:35lpetitso kudos to him too
07:36cemericklpetit: sure, but he's never in irc anymore, so he can't get any kudos ;-)
07:37RaynesI miss all of our IRC brethren.
07:37Raynescgrand helped me write my first macro.
07:37RaynesHe will always hold a place in my heart. <3
07:38cemerickEveryone <3's cgrand. :-)
07:38cemerickIt is too bad he's not around here anymore, but that's life.
07:38Rayneslpetit is the sneakier frenchman, I'd say. He always sneaks in a little talk about ccw at the conferences. :>
07:39cemerickYeah, lpetit has a certain craftiness about him. :-P
07:39lpetitRaynes: and now that Relevance sponsorizes me, the sneaking will be even heavier :-p
07:40lpetitcemerick: WAT?
07:40cemerickyou heard me
07:40cemerickcrafty, I tell you.
07:41lpetitcemerick: actually, I don't understand the meaning of it
07:42cemerickha
07:42cemerickcunning, full of surprises
07:42RaynesSneaky.
07:43cemerickcrafty > sneaky, insofar as the latter can have a negative connotation
07:44lpetitinteresting, I didn't know that I could project this kind of image
07:45cemerickall the better for keeping people on their toes
08:14jjcomerI'm looking into parser combinators, in clojure. Does anyone have a suggestions as to which library I should work with (or should I just be porting parsec to clojure myslef :) )
08:14lpetitjjcomer: it would just be the nnthiest port :-)
08:16clgvsince I am about to write a test. what do you guys recommend to use for it?
08:17lpetitwhat kind of test?
08:18clgvunit test style. I am testing 2 functions
08:19lpetitdo you want it more to be for building a non regression test suite, or are you starting to write code in a TDD style?
08:19clgvno TDD for that particular task right now
08:20clgvthe code is complete but I want to be sure that I can trust it ;)
08:20lpetitplain old out of the box clojure.test library, then ?
08:22clgvlast time I used that I somehow hat the desire for more^^
08:23lpetitthen I'll let other advocate their favorite alternative ;)
08:23clgvhmm I am reading lazy-test and midje pages right now
08:26clgvah midje had these nice analysis semantic for results
09:04_philis it possible to provide a "value function" for a defrecord/deftype? i.e. i might have a deftype x having [a b c d] as fields, but then i just reference x i want some function to provide a value for x
09:04_philthen=when
09:05_philIDeref comes close
09:05_philbut not quite
09:05_phili still need to write @x instead of just x
09:06joegalloi do not think such a thing exists
09:06joegalloit sounds to me like [a b c d] might be metadata on x, though, where x is your actual value.
09:06raekyou cannot extend the meaning of local variables
09:06joegallootherwise i guess you should just become happy with IDeref
09:07raek_phil: perhaps a function of zero arguments solve the problem?
09:08raekyou'd have to write (x) to acquire the value, though
09:09_philraek: yea, (x) or @x, not a big difference :)
09:10_philother question, in what interface is conj defines?
09:10_phildefined*
09:10_philwasnt able to find it while snooping through the source, there is cons but no conj
09:11raekyes, it's called cons in the java sources for some reason
09:11joegalloIPersistentCollection, but yeah, it's cons
09:11_philoh, thanks a lot
09:18clgvhumm "lein deps" and "lein clean" are pretty slow in leiningen 1.7.0 - they were much faster before. is there a reason for that?
09:21joegalloitalian strike
09:21clgvit ran over a minute
09:21joegallountil leiningen gets better working conditions, clgv, the slowness will continue
09:21clgvjoegallo: huh? it was much faster on both of these tasks in 1.5
09:22joegalloi'm just messing around, i have no idea
09:26dribnetanyone know how to adjust leiningen java compile ordering? I'd like aot -> java -> the rest.
09:26jkdufairis anyone using windows as their primary dev environment? even though i live there most of the time, it still feels like a foreign land
09:26jkdufaira few tips would be welcome
09:27lpetitjkdufair: not a foreign land for Clojure with e.g. Counterclockwise (shameless plug)
09:28jkdufairah hm. maybe i should give it a try. i suppose i was supposing emacs. which is embedded somewhere in my mitochondrial dna. but maybe i should act like i'm in rome
09:28lucianemacs works fine on windows
09:29lpetitno, stay with emacs if you use emacs
09:30lucianwith msys it's almost bearable
09:30jkdufairlucian: i've been using cygwin emacs and it works pretty well, but a few things freak out because java expects windows paths
09:30lucianalso, console2 or mintty
09:30jkdufairi.e. lein trampoline chokes
09:30lucianjkdufair: works fine without cygwin
09:30jkdufairi tried native win32 emacs but clojure-jack-in fails and hacking it to work for a few hours got me nowhere
09:30luciani see
09:30jkdufairlucian: do you use clojure-mode and lein?
09:30luciannot on windows
09:30jkdufairindeed
09:32jkdufairi ended up trying lein swank from cmd.exe. worked great. slime-connect. great. C-c C-k. *crash*
09:32luciani was using msys + bash + console2
09:32jkdufairah. i'll look into that
09:51Raynessemperos: http://clojars.org/org.clojars.ninjudd/data.xml
09:51clgvwell midje's tabular is great for my randomized test, although there could be a more specialized macro for randomized tests
09:51RaynesAnd the reason it's still a snapshot is because… well, I'm not sure anyone really knows.
09:53jkkramersemperos: Raynes: it's recently undergone a rewrite by Ryan Senior. I believe they're trying to get the new version to work with the build system
09:53semperosunderstood
09:53jkkrameri'm using a checked-out, locally installed version myself
09:53semperosRaynes: thanks, saw the one on Clojars, it's a bit old at this point
09:53Raynesjkkramer: I see. I believe the old version had the same problem.
09:53semperosI'm happy to locally install it myself
09:54Raynessemperos: You can push a version to clojars if you need something to depend on.
09:54semperosjust makes it harder to add to a larger project with other developers unless I add my own org.clojras.semperos... version
09:54jkkramerthe new version is nice, works much better with huge xml files that don't fit into memory
09:55semperosI'm all for improvements :)
09:55semperosthanks for the info, guys
10:10Raynesjkkramer: That's pretty spectacular. Did he do it in like a day? This must have happened really quickly. The original version was pretty non-trivial.
10:11jkkramerRaynes: there have been dev list posts on it periodically for a few months, I think
10:11RaynesThen I suppose he was rewriting it while they were still trying to get a release out for the old version, because that was pretty recent.
10:13cemerickyeah, Ryan's been working on it for a while
10:18RaynesMan, Python is so weird.
10:20Raynescemerick: How are you and Vim getting along?
10:21cemerickso-so
10:21cemerickI'm trying to make it my baseline editor, e.g. replacing sublime and textmate
10:22RaynesYou used ST2?
10:22cemerickWrote the whole book in it.
10:22cemerick*shrug*
10:22RaynesI guess you can't fight the truth.
10:22cemerickit's ok, hardly sublime
10:22RaynesIt's a good text editor. I just strongly disagree with the choice to use textmate bundles.
10:23cemerickOh, is it compatible with them?
10:23RaynesI'd rather it support a fraction of what it supports right now and have sane syntax definitions.
10:23RaynesYes.
10:23RaynesThe Clojure one is a couple thousand lines of XML and still doesn't get it right. :\
10:24cemerickcompound regexes FTW!
10:24cemerickanyway, I presume sublime will eventually go the way of TM, which again leaves me without a reliable editor. Vim seems as reasonable a candidate as any.
10:24cemerickBBEdit would probably be another option.
10:25lucianall the extensibility of emacs with the sane keybindings in vim
10:25lucianand some extra confusion on top
10:25Raynescemerick: I was going to paste the tmLanguage file for you, but (I swear to God) it is too big to paste in refheap.
10:25Rayneslucian: I'm impressed with evil-mode. I'd have used it even before I started using Vim had I know it was so excellent.
10:25RaynesI love text objects, in particular.
10:26lucianit's a really, really good vim mode
10:26luciani've been using it for 2 months or so without learning even one emacs keybinding :)
10:26jkkramercan ST2 or TM2 handle proper lisp indentation?
10:26RaynesMy problem with evil-mode is just that it's so confusing. There is overlapping functionality so I always question "Should I use the Emacs way or the evil way?" and my hands twitch in the meanwhile.
10:26Raynesjkkramer: Can it handle it? Perhaps. Does it? God no.
10:27cemerickjkkramer: ST2 doesn't do too badly. I wouldn't want to use it more than occasionally though.
10:27cemericktoo badly compared to other non-lisp-ready editors, that is
10:27RaynesI'm not sure what the capabilities are. I don't think any sort of intelligent structural indentation is possible. These are just big fat XML files.
10:28jkkrameryuck
10:28Raynescemerick: The point where I gave up was where I turned on vintage and tried to reindent some code with =ab and it just completely warped it.
10:28cemerickRaynes: I have no idea what you just said. :-)
10:29Scriptorvintage?
10:29cemerickAt the moment, I'm happy enough to have learned about a vs. i :-P
10:29lucianRaynes: i always use the vi way
10:29RaynesGo screw up some indentation in a Clojure source file in Vim and then type =ab.
10:29RaynesScriptor: ST2 has a Vim emulation mode called vintage.
10:29Scriptor= automatically fixes indentation
10:29Scriptorohh, for sublime
10:31pdkvim is good enough at getting lisp indentation wrong on its own
10:31Raynespdk: Howso?
10:31Scriptorvimclojure seems to handle it alright
10:32RaynesI got that impression at first as well until I turned on fuzzyindentation in VimClojure.
10:32hhutchcemerick: i haven't ever felt like I quite got a good vim+nailgun workflow down, are you happy with it so far?
10:32lucianbut i fell in love with M-x package-install
10:32RaynesI haven't bothered with nailgun.
10:32TimMcAugh, how did this plugin ever work?
10:32RaynesLein2's reply repl should further enforce my indifference to those in-editor REPLs.
10:32cemerickhhutch: oh, I'm not using vim for Clojure dev.
10:32TimMcIt's completely broken now, and I'm using teh smae version of lein as when I wrote it.
10:32clojurebotexcusez-moi
10:33hhutchcemerick: ah i misunderstood
10:33RaynesTimMc: What plugin?
10:33cemerickhhutch: I'm hacking on counterclockwise right now. :-)
10:33jkkrameri'm looking forward to giving CCW another try
10:33TimMcRaynes: lein-jit
10:34hhutchnailgun works, but i always hear so much about emacs+clojure that i'm giving it a try, and if i didn't have EVIL mode, i'd go crazy
10:34lucianis there some joke about CCW? where does the name come from?
10:34RaynesI need to give CCW another shot. The last time I tried it, I couldn't really figure out how to work it.
10:34lucianevil is nice indeed
10:34jkkramerI like what emacs lets you do, but not how it makes you do it. CCW seems saner
10:34lucianand as annoying as elisp is, it still beats vimscript
10:35hhutchlucian: i still find evil to be kind of flaky. i'm always forgetting what mode i'm in
10:35Rayneslucian: Brainfuck beats VimL.
10:35TimMcIn nastiness or readability?
10:36TimMcAh, the latter, from context.
10:36ejacksonoh lord, Vim and Emacs all at once, i'll never be worthy.
10:36lucianhhutch: it's slightly different, yes. things like :e vs :badd and so on
10:36cemerickhhutch: nailgun will be going away soonish
10:36cemerickreplaced by jark, AFAIK
10:36hhutchcemerick: replaced with ?
10:36hhutchoh
10:37cemerickThat's all sorta blocking on me at the moment. o.0
10:37Raynescemerick: I think the VimClojure fellow is rewriting his repl stuff with nrepl.
10:38cemerickRaynes: Yup, Meikel wrote the bencode impl for nrepl. :-)
10:38RaynesI don't know what you just said.
10:38TimMcb-encode?
10:38RaynesOkay, that makes more sense.
10:38cemerickdon't worry about it :-)
10:38cemerickI'll make more noise about that later in #leiningen.
10:39hhutchcemerick: you mean the jark written by isaac praveen ?
10:39cemerickyup
10:39hhutchinteresting
10:39Rayneslucian: I'd go back to Emacs and use evil-mode, but there are a lot of other things I like about Vim that make it hard. For one, I could never (ever, ever) get mouse support to work properly in a terminal emacs. In Vim, the distinction between macvim GUI window and terminal Vim is basically nil.
10:40cemerickMartin can't-remember-his-name wrote an nREPL client in O'caml, which is obviously crazy fast to start when compiled down to a native executable.
10:40cemerick…which helps in the vim environment a lot. :-)
10:40TimMcHah, "O'caml"
10:40cemerickIt's the Irish version.
10:40Rayneslucian: Another thing that bothers me is that people treat evil-mode and friends as if it were training wheels for vim users -- I don't get that. evil-mode seems to be an all-around better alternative to some bizarre Emacs keybindings that I never bothered to remember when I did use it.
10:41lucianRaynes: indeed, but that's less of a problem with evil itself
10:41Raynes=ab is much better than "copy this text and then run reindent-region"
10:41lucianit's new enough and complete enough that if you tell folks in #emacs you're using it and don't want to learn emacs you'll get no more than suggestions to try anyway :)
10:43Rayneslucian: Do you use Emacs on OS X?
10:43lucianno
10:44RaynesJust wondering if anyone else had ever experienced that weird fringe rendering bug where linum-mode line numbers get skewed and unreadable.
10:44dunibRaynes: why were you trying to use a mouse in the terminal? the concept seems strange and uncomfortable
10:44RaynesThe only solution seems to be to put a gap to the left of the numbers which is pretty hideous.
10:44jlfRaynes: that is/was a known issue but i don't recall if there's a resolution yet
10:44lucianRaynes: wfm on ubuntu
10:44Rayneslucian: It's an OS X specific thing.
10:45luciani see
10:45jlfRaynes: you might search the emacs-devel archives
10:45Raynesdunib: Because I scroll and select with the mouse if my hand happens to be sitting on it.
10:45RaynesI'm not a super l33t haxxor man who never touches his mouse.
10:45RaynesHaven't reached that point of ascension yet.
10:45Raynesjlf: Thanks.
10:46RaynesTimMc: What issues are you having with that plugin, specifically?
10:46TimMcRaynes: Done broke.
10:46Raynes(If you've already told me this, sorry, I've been talking editors with people)
10:46TimMcLet me get the fix out the door first.
10:46dunibRaynes: you managed to get vim to scroll in a terminal? whenever I scroll in the terminal it tricks my by showing scrollback.
10:47hhutchRaynes: i wouldn't buy into that hype... the only reaso you should pay attention to that "don't touch the mouse" is because you actually have a mouse which is far away from the home row. a touch pad you can reach with your thumb is a completely different thing
10:47Rayneshhutch: I've mostly survived with my mouse so far. But man! The seconds of my life that I've lost by reaching for my touchpad!
10:47luciantouchpads are awesome
10:48lucianthey're the reason i still use mice at all
10:48Raynesdunib: Seems to work out of the box for me. Well, I might have set something...
10:48lucianthinkpad nubs are nice to
10:48Raynesdunib: It probably wouldn't work in tmux or screen session.
10:48luciani think even desktop keyboards should come with a touchpad beneath
10:48hhutchi guess it helps to have ginormous hands like i do. my thumb reaches the touchpad on most laptops without my hads leaving the homerow
10:48Raynescemerick: I have a trackball. :D
10:48cemerickas do I!
10:49RaynesI bet mine is better.
10:49cemerickheh, probably
10:49cemerickI miss the ones that used to be built into the laptop, tho.
10:49cemerickPowerbook Duo 230 FTW
10:50Raynescemerick: http://www.kensington.com/kensington/us/us/p/1444/K72327US/slimblade%E2%84%A2-trackball.aspx
10:50RaynesI have this.
10:50RaynesAlso, yay for unicode in a URL.
10:50hhutch68030 ?
10:50cemerickhhutch: absolutley
10:50hhutchwow, you *could* run netbsd on that
10:50cemerickloved that laptop
10:50hhutchbut no JVM
10:50hhutch:(
10:51cemerickRaynes: I looked at that. Ended up getting another trackman wheel for $25.
10:51RaynesYour life is empty.
10:51cemerickBeen using the same trackball for ~8 years now, I think.
10:51RaynesUnfortunately, I haven't used my trackball much lately.
10:51cemerickYou're right. It is.
10:51RaynesI have a magic mouse and magic trackpad.
10:51cemerickThus, my move to vim. It'll get me more friends.
10:51RaynesAnd my crappy ancient built in touchpad that doesn't work very well.
10:52hhutchdoes anybody use a wacom bamboo as a touchpad?
10:52RaynesMy magic mouse was a bit of a bad decision.
10:52hhutchRaynes: how so?
10:52cemerickhhutch: tried to — not nearly as smooth as the built-in
10:53RaynesI bought it because it is smaller than a trackpad and I figured I could use it while on the go. Unfortunately cars + mouses don't work very well.
10:53hhutchcemerick: did you try any other touchpads? like the apple?
10:53RaynesIf I let it go for a second, it slides into oblivion.
10:54dunibhhutch: no, nobody uses a bamboo as a touchpad. because they rely on the stylus for information, you can smudge your fingers all over them, and it does nothing.
10:54cemerickhhutch: nah, the trackball is far better for me
10:55clgvI wonder whether interleaving :when predicates in a 'for works like intended? (for [[k1 v1] m :when (map? v1) [k2 v2] v1 :when (map? v2) [k3 v3] v2] ...)
10:56dunibRaynes: the apple magic trackpad's pretty good. but to use it off a desk, it requires two hands. well, unless you enable some tap-to-click feature.
10:56hhutchdunib: no, there's two different models of bamboo... one is called a pen&touch, it has a capacitive touch layer
10:58Scriptormy main gripe with my hp is the multi touch
10:58Scriptoron my mac the comination of vim with a good trackpad nearby was pretty good
10:58Scriptoralmost never used C-d or C-u for scrolling
10:59unlink`Are closures idiomatic in Clojure for encapsulating state? I would use vars to hold my refs, but I actually want multiple copies of my function running with different state at the same time.
11:00cemerickunlink`: very
11:00unlink`It doesn't look particularly idiomatic, but this could be accomplished like (fn [] (let [aref (ref {}) otherref (ref {})] (fn my-func [x y] ... )))
11:04unlink`cemerick: That is how you would accomplish it?
11:05cemerickunlink`: hard to know since I don't know what the domain is, but that's fine AFAIC.
11:06cemerickI very often use partial to accomplish similar things.
11:06cemerickAnd middleware of all sorts is based on the same kind of composition.
11:07unlink`cemerick: Fair enough. The particular function is a consumer of real-time data and is doing its own local bookkeeping of such.
11:22TimMcRaynes: https://github.com/timmc/lein-otf/commit/36de0ba7ac27c6498168e49fb35144be9223320e
11:23TimMcRaynes: The plugin works by swapping out the project's :main namespace for one of its own -- which *used* to get that namespace included and compiled AOT. Somehow that stopped happening.
11:23TimMcRaynes, technomancy: I fixed the plugin by also specifying :aot [lein-otf.loader].
11:24RaynesStrange.
11:24RaynesI'm pretty sure that's still how it works.
11:24RaynesNo idea why it wouldn't work there.
11:25TimMcIt used to! :-(
11:25RaynesTimMc: In other news, your usage of commas there makes me want to strange a kitten.
11:25Raynesstrangle*
11:25TimMcOh, in the nick-prefixing?
11:25RaynesI've never stranged a kitten before.
11:26RaynesNo.
11:26Raynes(assoc-in ,,, ...)
11:26TimMcThere's always a first time.
11:26nachtalpRaynes: it's only fun if you don't get caught
11:26TimMcOh, hah! Yeah, I've stopped doing that.
11:29technomancyRaynes: so the data.xml that we use for "lein2 pom" never saw an actual release before being scrapped and rewritten?
11:29Raynestechnomancy: Apparently, yes.
11:29technomancylovely
11:29Raynestechnomancy: I'll fix pom (if fixing is necessary) when the new one is released. If that ever happens.
11:29technomancyyeah, I'd like to get off the snapshot before the preview, but that seems unlikely
11:29technomancythanks
11:30Raynestechnomancy: We're on a snapshot of reply as well.
11:30technomancythat we can surely take care of
11:30RaynesMight want to talk to Colin about doing alpha releases and such instead of snapshots.
11:41pandeiroibdknox: did wrap-aleph-handler used to be in the noir.core ns? trying to understand this: https://gist.github.com/1257857
11:47pandeiroah nm it's in aleph.http
11:55`fogusPutting together a 1-page ClojureScript cheat-sheet. Feedback is welcome :-) https://github.com/fogus/clojure-cheatsheets/blob/master/pdf/cljs-cheatsheet.pdf?raw%3Dtrue
11:58`fogusVisual issues aside. Anything missing content-wise?
11:58lpetitfogus: <3
11:59dnolen`fogus: awesome!
12:00`fogusI'd like to create another cheatsheet for CLJS vs. jQuery (to the death)
12:00dnolen`fogus: heh
12:01`fogusBut not sure what to put there yet.
12:03devn`fogus: was it you that built a little ruby metadata lib?
12:03`fogusBTW, repo at https://github.com/fogus/clojure-cheatsheets
12:03`fogusdevn: I don't think so.
12:04devnhm, nevermind :)
12:04`fogusdevn: I have https://github.com/fogus/duckstrings -- is that what you mean?
12:05`fogusAnd this https://github.com/fogus/clj.rb
12:06pandeiro`fogus: an example of :use-macros maybe?
12:06`foguspandeiro: I have a require-macros use in the namespace section.
12:07pandeiro`fogus: i saw but i have seen :use-macros in some code but i'm not sure of the exact syntax
12:09`foguspandeiro: Got it. Thanks!
12:11jkdufairvery nice cljs cheatsheet
12:12`fogusThanks. Suggestions welcomed
12:13`foguspandeiro: Updated
12:14lpetitfogus: is there a leiningen cheat sheet like this floating around ? A CLJS oriented (with library mgt addressed) one ?
12:15`foguslpetit: Not sure... but if I have time today there might be ;-)
12:16lpetitfogus: when you're at it, would you please create one for CCW as well ? ;)
12:20lpetitfogus: what does WJW mean ?
12:23pandeiro`fogus: ibdknox/crate (hiccup impl) as a templating solution might be better to mention than pinot, which i understand chris is deprecating
12:24`foguspandeiro: Oh? Would love some verification from ibdnox
12:24`fogusibdknox ^^
12:25pandeiro`fogus: i forwarded you the announcement from the noir list
12:25`fogusgreat, thanks
12:26muhoowhat does CCW mean?
12:26TimMcCounterClockWise
12:26TimMcClojure plugin for Eclipse
12:27lpetitNew beta of CounterClockWise just released to the wild http://ccw.cgrand.net/updatesite-betas
12:57hagnaso I have (:require [hobbit.bitly :as bitly]) but the line (def *bitly* (bitly/Bitly. "a" "b" "c")) fails with Unable to resolve classname
13:00hagnaBitly is a defrecord I checked
13:00hagnawhat's wrong?
13:02`fogushagna: Try adding an (:import bitly.Bitly) and then changing to (Bitly. "a" "b" "c")
13:02hagna`fogus: can I do that in the repl?
13:03hagnaclojure.core=> (:import bitly.Bitly)
13:03hagnaCompilerException java.lang.RuntimeException: java.lang.ClassNotFoundException:....
13:04`fogusI think so
13:04TimMchagna: There are two reasons that fails: :import is a keyword, bitly.Bitly is an unknown symbol.
13:04`fogushagna: https://gist.github.com/ae4d5034a2649a4a40e1
13:06Raynes(import bitly.Bitly)
13:06RaynesTimMc: Doesn't matter because import is a macro.
13:07Raynes`fogus: Long time no IRC. :D
13:07hagna`fogus: thanks
13:07`fogusRaynes: This company of mine... making me work and all! Well I never!
13:08TimMcRaynes: It doesn't matter once you use import instead of :import, yes.
13:08hagna`fogus: we're working
13:08`fogusFor the newcomers: https://github.com/fogus/clojure-cheatsheets/blob/master/pdf/cljs-cheatsheet.pdf?raw%3Dtrue FEEDBACK WELCOME
13:08Raynes`fogus: What is the email address you're most likely to receive email at? I've sent you a couple of emails over the past few months for various reasons, but I'm not sure you received them.
13:08`fogusRaunes: The one at the top of blog.fogus.me
13:09hagnaRaynes: um (import bitly.Bitly) didn't work in the repl
13:09hagnaRaynes: maybe I need to require that ns first?
13:09technomancy`fogus: so you're liking LaTeX? thinking of using it for my clojure west slides
13:10technomancythere's a solemn dignity surrounding Computer Modern that you just don't see much of these days
13:10`fogushagna: I don't think import will work on a class that is not implicitly import3ed
13:11`fogustechnomancy: It's fantastic! I'm sad that I've only now discovered it.
13:11RaynesI didn't have that same conclusion.
13:11technomancyare you using auctex or org or just straight up latex?
13:11`fogustechnomancy: WRT Computer Modern... the font?
13:11technomancy`fogus: yeah
13:12technomancyahem; the typeface
13:12`fogustechnomancy: not sure exactly.
13:12technomancySussman had it in his strange loop slides and I was all "this guy is the man"
13:12`fogusI'm a LaTeX n00b
13:12technomancyI know correlation is not causation, but it doesn't hurt
13:13cemericktechnomancy: Computer Modern is even more sublime in something sane like Keynote. :-P
13:13`fogusI vow to never miss another StrangeLoop as long as I shall live!
13:13technomancylol, keynote
13:13cemerickthe mocking, it slows me not
13:14technomancy`fogus: supposedly org has some pretty sweet export-to-latex capabilities
13:15RaynesAnd checkboxes.
13:15cemerickRaynes: I had used powerpoint within virtualbox for ages. :-|
13:15RaynesNothing like plain-text checkboxes to make the sunlight shine though on a cloudy day.
13:15`fogustechnomancy: I am at least 20 years (at best) behind the formatting scene
13:16technomancy`fogus: that's precisely the right place to be
13:16technomancyconsidering it hasn't progressed at all in 20 years
13:16cemerickThere's a "formatting scene"?
13:16hagnada scene please
13:16`fogusYAY
13:17technomancyhiredman: was it org-beamer that you used for the safe manual?
13:17`fogus"there's a community?"
13:17technomancyor sorry, Manuel.
13:19hagnahttps://gist.github.com/1781759 so what is wrong with importing bitly here?
13:20`fogusWho is going to Clojure West?
13:20nachtalp`fogus: if you plan to use a lot of references in your latex-docs you might want to check out citeulike.org - helped to keep me sane back in the day
13:21`fogusnachtalp: Are you kidding. I live at citeulike
13:21`fogus;-)
13:22hiredmantechnomancy: just the org-mode latex export
13:22hiredmanbeamer is a latex package for slides I believe
13:22technomancygotcha
13:22nachtalp`fogus: nevermind then :) - you'll love the bibtex export ;)
13:24apwalk`fogus: me + 4 co-workers. :)
13:29`fogusapwalk: ?
13:29apwalkgoing to clojure west
13:29`fogusapwalk: ahhhhh. Say Hi if you have the chance.
13:30Raynes`fogus: I'll be there in spirit.
13:30apwalkcertainly will. i'm psyched to be able to go
13:31TimMchagna: Does that gist work?
13:32`fogusTimMc: My gist?
13:32TimMcNo, hagna's.
13:33`fogusk
13:33hagnaTimMc: no
13:33hagnaTimMc: this one does though
13:34hagnahttps://gist.github.com/1781893
13:39Rayneshagna: https://refheap.com/paste/688 I cleaned that up a bit.
13:40Rayneshagna: Also, the big problem here is that I didn't write any examples on using the library in the README. I apologize for the trouble you've been having figuring it out.
13:40hagnaRaynes: it's not just you
13:40hagna:)
13:40hagnaRaynes: thanks though
13:40mfex`fogus: re cljs cheatsheet: deftype access is (.-b a) with the new syntax
13:47`fogusmfex: Thanks
13:52jcrossley3`fogus: hi. are you open to including the tests in the core.cache jar? i'll send a PR if so.
13:54`fogusjcrossley3: Do you mind generating a patch? I will create a ticket if you don't mind providing the overview text for your pull req
13:57jcrossley3`fogus: overview text? i just want to re-use some of your test fn's for my impl.
13:57`fogusI guess I don't understand the question
13:58jcrossley3:)
14:00jcrossley3`fogus: if clojure.core.cache.tests were in the core.cache jar, i could refer to, say do-dot-lookup-tests in my own tests for my CacheProtocol implementation.
14:00hagnaRaynes: dang this isn't the way to call shorten (hobbit.core/shorten *bitly* "a" "b")
14:02jcrossley3`fogus: not a huge deal, just saves me from having to worry about that big copyright notice at the top of said file, but still ensure my cache behaves reasonably. :)
14:02ibdknox`fogus: I'm confirming that's the case :)
14:03`fogusjcrossley3: Do you know an easy for me to make them appear in the jar?
14:03lynaghk`fogus, do you know if anyone on core is looking at instant literals in ClojureScript? I have a client who wants 'em but right now ClojureScript gets angry with "No method in multimethod 'emit-constant' for dispatch value: class java.util.Date"
14:05lynaghkI'd be happy to dig into it and submit a patch, but I wanted to check with you first; there's nothing on JIRA or obviously on cljs branches.
14:06`foguslynaghk: They're only available in Clojure ATM
14:06amalloy`fogus: since you're here, http://dev.clojure.org/jira/browse/CLJ-929 is an issue i recently came across with the property-access syntax in jvm-clojure
14:06ibdknoxlynaghk: sorry I haven't responded to you about the libs thing, I'm still thinking what the best course of action is
14:07lynaghkibdknox: oh, no problem. It warms my heart when people think before talking =)
14:07ibdknox`fogus: we should actually chat at this conference :)
14:07ibdknoxlol
14:07ibdknoxlynaghk: haha a rarity ;)
14:08lynaghk`fogus: okay, I will dig into it then, thanks.
14:08dnolenlynaghk: ibdknox: thx for sending that out - I think the proper solution is to solve at the level of the build tool - lein
14:09`fogus(inc ibdknox)
14:09lynaghkdnolen, yeah I got your email. So your preference is to just make people explicit about it--if they want a JAR containing JS they'll have to add it to project.clj's :deps of course, but also to some other build-tool options?
14:10dnolen`fogus: lynaghk: sounds like something that could be solved with support for cljs_init.clj, Clojure will do the right thing - but you need to add a dispatch case to the CLJS compiler.
14:10lynaghkrather than have clojurescript aggressively suck in everything on the classpath like how it does for clj and java code
14:10lynaghk*it = jvm clojure.
14:10dnolen`fogus: lynaghk: actually given that Clojure supports it, probably should just add the emit-constant case.
14:11jcrossley3`fogus: er... i'll get back to you on that. :)
14:11ibdknoxlynaghk: dnolen: yeah I'm not sure I like the idea that all js code gets sucked in, but it should be virtually automatic for the end user to take a CLJS jar and use it if it contains externs/libs/whathaveyou
14:11dnolenibdknox: that's what I'm thinking.
14:12`fogusdnolen: emit-constant for Date?
14:12dnolenlynaghk: I think the optimal experience for folks is something that works with their existing lein workflow
14:12dnolen`fogus: yes
14:12ibdknoxdnolen: it *seems* reasonable that that could be at the level of lein, but I'm not sure if everything is there for that to be possible
14:12ibdknoxit might be with the classpath changes
14:13ibdknoxthen we just need to create a convention for either using a manifest, or named dirs, or something. dnolen: your suggestion was the project.clj?
14:14dnolenibdknox: there needs to be convention as far as the jars, something describing the js to include and the externs.
14:14`fogusdnolen: I created a case for this that should avoid outright failure, but in the current tagged literal sense the capability is not yet in CLJS
14:15`fogusamalloy: I think there is an older card about that... looking
14:15dnolenibdknox: ideally I can grab jQuery just like I grab any Clojure dep. The jQuery jar includes the externs .js etc. It's foreign lib, so it should no get compiled via GClosure but appended to the top of the output.
14:15`fogusdnolen: http://dev.clojure.org/jira/browse/CLJ-927
14:15dnolenibdknox: basically users should have to deal w/ any of this stuff - build tool deals w/ it.
14:15dnolenshouldn't
14:16dnolen`fogus: so you can't just emit Date because of limitations around JS Date object?
14:16ibdknoxdnolen: I agree, but if we tie this to lein, it basically makes dealing with this any other way an incredibly painful experience
14:16ibdknoxdnolen: which is not necessarily bad, just a point
14:17dnolenibdknox: why should anyone deal with it any other way? Clojure doesn't provide anything sophisticated compilation features, no sure CLJS
14:17dnolennor
14:17ibdknoxfair
14:17`fogusdnolen: I don't think that's it (although I haven't dug deeply in js/Date). It's only that the path for emission doesn't exist yet
14:17ibdknoxdnolen: but adding things to the classpath is the only step in Java-land
14:17ibdknoxCLJS is much more involved
14:18dnolenibdknox: no argument there, but I think solve it with lein - only fix those parts in CLJS compiler that make fixing at lein difficult.
14:19ibdknoxemezeske: this is something that should likely end up prototyped in lein-cljsbuild ^
14:21Raynesbrehaut: Hi.
14:21brehautRaynes: hi
14:21lynaghkdnolen: `fogus: I just added an emit-constant for java.util.Date that writes out "new Date(epoch-time)" in the cljs compiler and it seems to work fine
14:22emezeskeibdknox: was afk, catching up
14:22lynaghkIs there something else that needs to happen for instant literal support?
14:22`foguslynaghk: With the #inst "..." format?
14:22dnolenlynaghk: `fogus: I didn't think so
14:22lynaghkyep
14:22ibdknoxlike magic
14:22lynaghkibdknox, that's what powers *all* compilers.
14:23ibdknoxhehe you should've seen the VB compiler ;)
14:23`foguslynaghk: Does it all allow me to override the emit type?
14:24lynaghkI'm not sure what you mean; I haven't used instants until about 20 minutes ago
14:24`fogusThe #inst and #uuid features in Clojure are easy to emulate, but they are built on a generic feature to allow user-specific emission types as well as new tagged literals
14:25dnolen`fogus: that can't happen in a normal way in CLJS - would need to be a special form of some kind.
14:25`fogusdnolen: Agreed.
14:25`fogusCLJS has 2 readers
14:25emezeskeibdknox: Ahh, I see, so when you depend on a jar that contains JS, the externs (right now) need to be added to the end-project manually? Is that the problem?
14:25lynaghkemezeske: and the JS itself, within the JAR.
14:25ibdknoxemezeske: externs/libs and so on.
14:26`fogusnot that 1/4 helps
14:26lynaghkheh
14:26dnolen`fogus: also not something you can modify at runtime in CLJS, so seems like a broken thing to try and emulate. Thus my cljs_init.clj idea.
14:27emezeskelynaghk, ibdknox: I see dnolen mentioned that the JS could be prepended to the gclosure output, is that the desired approach?
14:27lynaghkdnolan: cljs_init.clj would be a file that customizes the reader for generating cljs at compile time?
14:27dnolenemezeske: I think that would be awesome.
14:27ibdknoxemezeske: it depends on the JS included, you don't want externs ending up in there
14:27`fogusdnolen: Unless you limit yourself to the CLJS/CLJ subset of features. Not ideal
14:27ibdknoxemezeske: if it's a compiled lib, yep :)
14:27emezeskeibdknox, dnolen: I see, that makes sense
14:27lynaghkemezeske: not really; I'm just trying to get libraries into the closure compiler at the same time as the cljs code
14:28ibdknoxlynaghk: that's the :lib case, and should also be automatic
14:28ibdknoxgiven some either naming convention or specification
14:28lynaghkibdknox, right.
14:28emezeskeibdknox: is there any really good documentation on the :externs and :lib stuff? (other than the compiler itself)
14:29dnolen`fogus: CLJS is already very limited, most things cannot be done in a good / first-class / reified way because of stratification between compiler/runtime.
14:29lynaghkStill, I'm concerned about it being automatic because it'll just blow up anyone who uses anything below :advanced optimizations.
14:29emezeskeibdknox: I need to understand it better to make cljsbuild handle it nicely
14:29lynaghkemezeske: http://lukevanderhart.com/2011/09/30/using-javascript-and-clojurescript.html
14:29ibdknoxlynaghk: I think it should be specified
14:29emezeskelynaghk: thanks
14:29lynaghkemezeske: that is where I learned everything I know about closure.
14:30emezeskeibdkno, lynaghk: I agree that it should be explicit
14:30ibdknoxlynaghk: or somehow made explicit. Anything in externs/* in the jar is treated as an extern. Or there's a specification in a project.cljs file
14:30ibdknoxlynaghk: I'm leaning more towards the latter
14:30dnolen`fogus: I don't mean "most" things, but that lot of dynamic features need to become static in CLJS, breaking the interface that Clojure folks are used to.
14:31emezeskeibdknox, lynaghk: Yeah, there could be entries in the :cljsbuild config for which jars you want externs/libs to be pulled from
14:31lynaghkibdknox, I think we're talking about a broader issue here. The subset I'm interested in is getting JS into JARS into the closure compilation step. Externs are a feature beyond that, and auto concat of non-closure-happy JS is another feature too.
14:32`fogusdnolen: but readers will likely not change after compilation
14:33mrBlissdnolen: question about core.logic: how can I 'refresh' an expression? with refresh = replace all *unbound* lvars by new lvars.
14:33technomancyemezeske: hey, would you be interested in getting lein-cljsbuild working on lein2?
14:33mrBlissdnolen: or, how can I see if an lvar is unbound?
14:34technomancyI think we are pretty close to putting out a preview release and would like to ease the upgrade path by making sure plugins are in order
14:34dnolen`fogus: oh yeah - good point
14:34emezesketechnomancy: yeah! I don't think I'll have time to do that until the weekend though
14:34technomancyemezeske: no worries
14:34dnolenmrBliss: there's a goal for that, lvaro I think? but note that makes your program non-relational
14:34emezesketechnomancy: is it possible to make plugins multi-compatible (with lein 1 and lein 2)?
14:35lynaghkibdknox, emezeske: so projects need to specify their JS goodies (source, externs, foreign-libs) in project.clj, and lein will walk through all of those and concat everything for the cljs compiler?
14:35dnolenmrBliss: the first questions doesn't make sense to me :)
14:35technomancyemezeske: that's the hope
14:35emezesketechnomancy: okay, that makes things easier.
14:35technomancymight not always be worth the hassle, but I think it won't be too tricky for the majority of plugins
14:35mrBlissdnolen: I'm trying to implement let polymorphism in my type inferencer
14:35lynaghktechnomancy: does lein2 have cake's killer background-jvm magic merged in?
14:36dnolenmrBliss: https://github.com/clojure/core.logic/blob/master/src/main/clojure/clojure/core/logic.clj#L1192
14:36dnolenmrBliss: I don't think you need to check groudness for that, have you looked at Oleg's version?
14:36technomancylynaghk: no, keep an eye on Jark for that
14:36emezeskelynaghk: maybe something like that. I'm ill-equipped to come up with a great solution at the moment; I need to mess around with JS libs a bit first, to understand it.
14:37Raynesemezeske: Ping me if you need help migrating.
14:37lynaghktechnomancy: thanks for the tip, I hadn't heard of this.
14:37mrBlissdnolen: yes, but I don't fully understand it ;-) It differs quite a bit from Ambrose's type implementation. Thanks for the tip about lvaro!
14:37emezeskeRaynes: thanks a bunch!
14:37technomancyemezeske: my hope is that the docs (README.md and docs/PLUGINS.md) cover enough for you to figure out the upgrade, but if not feel free to drop by #leiningen
14:37lynaghkemezeske: that's what I've been up to the past few days = )
14:38emezesketechnomancy: sounds good.
14:39dnolenmrBliss: sure, interested to hear how it goes
14:39mrBlissdnolen: apparently, I'm already using lvaro. I assume Oleg's version is the one on this site: http://kanren.sourceforge.net/
14:40lynaghkdolen, fogus: does an emit-constant for java.util.Date make sense for CLJS, or do you want to hold off until you figure out the reader(s) situation? All I know is that adding it to cljs gets #inst "..." working.
14:40dnolenlynaghk: probably should wait based on what `fogus said.
14:41dnolenlynaghk: or you should look deeper into how it's done in CLJ and come up with a comparable syntax/solution.
14:41lynaghkthe problem is that the user should be able to redefine how #inst "..." is read, and it's not clear how to implement that with cljs?
14:42dnolenlynaghk: yes
14:45lynaghkdnolen: okay, thanks. In the mean time I'll just define the date multimethod in my project's compile.clj script.
14:49dnolenany opinions about generic math in CLJS? Dart has it.
14:50`fogusdnolen: link(s)?
14:53dnolen`fogus: no link, I just looked at the Dart generated source.
14:55dnolen`fogus: main downsides - need type-hints for fast math, users extend arithmetic operators to any type - operator overloading hell
14:55hiredmanseems like a significant departure from clojure
14:56`fogusdnolen: yikes!
14:57dnolen`fogus: yeah, but it means we can't support rationals - but perhaps that's just the reality of using JS as a host?
14:57dnolensorry ratios
14:58`fogusunderstood. Yeah, that's quite a pickle
14:59`fogusSo I was sad to see the hate for ':' as whitespace in map literals. :-(
15:00hiredman`fogus: do you also wnat to support null as a synonym for nil?
15:01hiredmanjson map support is just a horrible idea
15:01`fogushiredman: That is the main sticking point. There is no good answer for that one -- hence no ':'
15:01dnolen`fogus: : as whitespace less useful then real JSON literal support ;)
15:01dnolenwell for CLJS anyway
15:02`fogushiredman: I'd be happy to hear your thoughts. As it stands your objection is over my head
15:03hiredman`fogus: in my mind json map is very clearly a bad investment. you are spending a lot of complexity and corner cases for a very small reward
15:04`fogushiredman: Using Clojure data on the wire and subsuming JSON is small reward?
15:04hiredmanyou are not subsuming json
15:04hiredmanat all
15:04`fogusnot without null no
15:05hiredmaneven with null
15:05`fogusWhat else is missing?
15:05hiredmanthe reason we use json at work is to be interoperable with other languages
15:05`fogusright
15:05hiredmanperhaps I am misunderstanding what you mean by subsuming
15:06`fogusWith null support Clojure literal data is a super-set of JSON. That's all I mean
15:06`fogusOh an ':'
15:07`foguss/an/and/
15:07hiredmaneven if the clojure reader could use json, I would not use it to do that
15:07adiabaticSounds like eval().
15:07cemerickI wonder what happens in 7 years when JSON is that shoddy serialization format no one wants to use anymore.
15:07technomancyI don't want to see a : and have to think about whether I'm in a map or not
15:07`fogusadibatic: The reader doesn't do eval
15:08tremolocemerick: we will usher in the new and brilliant era of yaml
15:08hiredmanit's the kind of thing that leads to xml literals
15:08dnolencemerick: I don't see JavaScript going anywhere in 7 years, so I doubt that will ever happen.
15:08dnolenwell not "ever", just not anytime soon
15:08hiredmancemerick: it already is
15:08cemerickhiredman: true that
15:09`fogustechnomancy: I hope you're not mixing JSON and Clojure literals. :p
15:09`fogushiredman: You know, '<' is open in the reader! ;-)
15:09hiredman:(
15:09hiredman`fogus: please take it to #scala
15:09adiabaticI like YAML enough, but it hasn't really caught on in the programming languages that I like. I blame _why.
15:10hiredmanleave the poor clojure reader alone
15:10hiredman`fogus: I am shocked, shocked, that the person pushing for json literals in clojure was the maintainer of xml literal support in scala
15:10`fogushiredman: Ignoring ':' in map literals is very very far from XML literals
15:10mfex`fogus: what about ' around strings in json?
15:11`fogushiredman: pushing?
15:11`fogusmfex: ' is not legal in JSON
15:11dnolen`fogus: unless I'm missing something, what wrong with #json { ... } ?
15:11`fogusIf I were pushing it then I'd have a branch with an impl by now
15:12hiredman:(
15:12`fogusThe thing after the #json has to be a legal Clojure form
15:12`fogusdnolen: ^^^
15:13amalloy`fogus: ignoring : isn't sufficient to get you there, because it's not internally consistent. {a b} is valid reader syntax, which should surely be the same as {a: b} but different from {a :b}
15:13`fogushiredman: I'm just curious what the argument against it is.
15:13technomancyit's a feature. it doesn't solve a problem.
15:13hiredman`fogus: it is a complex set of edge cases with little reward
15:14`fogusamalloy: You're assuming that people are likely to hit that edge case. I suspect that JSON data would be isolated to an argument to (read). Clojure literals would still be Clojure literals
15:14dnolentechnomancy: hiredman: well it solves a pretty big CLJS problem - interacting with JS libs is the pits right now.
15:14hiredman`fogus: what is the argument for it? so you can copy and paste json stuff into the repl?
15:15hiredmandnolen: please don't burden clojure with the problems of clojurescript
15:15technomancycheshire.core/parse will always be there for you
15:15amalloyi don't really care if people hit that edge case. there is an edge case, whereas for the reader now there are no edge cases and everything is clean and well-defined
15:15`fogushiredman: Dominating the Internet pipe? ;-)
15:15cemerickWas going to make a wagging the dog reference /ht hiredman
15:15dnolenhiredman: I don't see how it burdens you, if you don't want it don't use it.
15:15hiredmandnolen: I already am unhappy with the field access changes
15:15`fogusammaloy: There are edge cases in the reader.
15:15dnolenhiredman: why? if you don't use it?
15:16`fogushiredman: Are you just opposed to change? I've not heard any push back from you WRT the field access change so far.
15:16dnolenamalloy: uh, clojure.core// ?
15:16hiredmandnolen: because the language you use matters, adding complexity to the langauge makes it more difficult to track down problems
15:17cemerickdnolen: each new wrinkle adds to cumulative mental overhead, esp. for newcomers.
15:17hiredman`fogus: I made a suggestion or two on the clj jira ticket
15:17adiabaticAnd explain the rules to new people.
15:17hiredmancljs
15:17dnolenhiredman: I don't see how it causes you problems, you're not going to use #json
15:18hiredmandnolen: because when I do have a problem with the language (which happens, you cannot treat a language and runtime as a blackbox) I now have to deal with this garbage in my mental model
15:18`fogushiredman: I can't find it
15:19hiredmanit might have been on the clj ticket
15:19dnolenhiredman: I don't see any real argument besides "I don't like it"
15:20`fogushiredman: Is the property syntax causing you real pain? I completely understand the desire to keep things "pure", but the prop lookup solves a real problem in light of ClojureScript.
15:20mfexwhat's the argument to not put all the json stuff in a library? Especially why does the cljs case need to use the clj reader for json rather than something custom?
15:21`fogusmfex: It's already in a library -- a few even
15:21hiredmanferd__: the property lookup syntax is more of a matter of taste, I proposed adding a new special form for field access
15:21hiredmaner
15:21hiredman`fogus: -^
15:21mfextherefore, why the need to move it down/up into the language?
15:21cemerickdnolen, `fogus: "because it'd be handy in cljs" doesn't seem like it should be sufficient
15:22cemerickI mean, it obviously is, but…
15:22dnolenmfex: well, CLJS repurposes the CLJ reader. There's a strong desire from rhickey to keep the languages the same - for good reason IMO.
15:22hiredmanit doesn't cause me pain so much as "oh geez thats's ugly" everytime I see it
15:22`foguscenerick: It's not jsut handy. It resolve a fundamental ambiguity in CLJS
15:22dnolencemerick: it has nothing to do w/ being handy, marshaling data in CLJS -> JS is crazy slow
15:22pandeirohow do i write a BigEndianHeapChannelBuffer from netty to a tmp file? i tried (slurp) and instantiating a java.io.BufferedReader to no avail
15:22cemerickThere's a pretty bright line between cljs and Clojure for me.
15:23cemerickI suspect for many others as well.
15:23`foguscemerick: I realize I may not have responded to your actual point
15:23hiredmanas big as between clojure and clojureclr
15:23dnolencemerick: well Rich Hickey doesn't seem to think so.
15:23mfexdnolen: where does the json come from that you can only use the clj reader? I agree on keeping them the same, I'm just looking for examples. Why would you write json in cljs source code for example?
15:23dnolencemerick: otherwise that thread about property access would have been a lot shorter.
15:24cemerickclearly, no
15:24dnolenmfex: to talk to GClosure, jQuery, Raphael, etc.
15:24hiredmandnolen: I thought there was going to be a js-object special form or something
15:24RaynesI'm not sure I'm a fan of Clojure getting changed because things might be handy in ClojureScript.
15:24dnolenhiredman: nope
15:24hiredmanwhy not?
15:25`fogusRaynes: What are you referring to. There are 2 threads here
15:25dnolenhiredman: because that's not how Rich Hickey thought it should be solved? I proposed the js-object macro, chouser mentioned that it wasn't ideal
15:26hiredmandnolen: so basically this is all moot and we should just ask rich what the hell he wants
15:27mfexdnolen: then what about #json{:clojure "map"} that turns into json, w/o the need for clj to able to read json?
15:27Raynes`fogus: {foo: ..} syntax.
15:27hiredman`fogus: there are way more than 2 threads here
15:27mfexfor the interop case
15:27`fogushiredman: agreed. I'm not concurrent
15:28dnolenmfex: sorry if not clear, CJLS repurposes the CLJ reader.
15:28hiredmanan important subtext is generally "what the hell is core doing now? why aren't any of the issues we care about actually addressed, and why are patches just sitting in jira"
15:30hiredmanhttp://dev.clojure.org/jira/browse/CLJ-855
15:30hiredmanwe are looking to move to 1.4-beta2 from 1.2 at work and clj-855 is the blocker
15:31jcrossley3`fogus: simplest way is to declare them as resources: https://gist.github.com/1782891
15:31hiredmannew features are great, but lets fix stuff and apply patches
15:32`fogushiredman: As far as I can tell there are unanswered questions surrounding that tikect.
15:32cemerickhiredman: though I can see your hesitation to do that in this case
15:32mrBlissdnolen: do you mind taking a look at an example of my need for 'refreshing' an expression? https://gist.github.com/1782865
15:32hiredmanwe are infact on a fork of 1.2 at work
15:33hiredmanhttps://github.com/scgilardi/clojure/commits/mantle
15:33amalloyyeah, we were using a fork of 1.2.1 until like yesterday when we got 1.3 working (and actually 1.4 as well)
15:33hiredmanis anyone using clojure in production not on a fork?
15:34`fogusjcrossley3: Thanks. I will look at that
15:34hiredman(muttering and feet shuffling all around)
15:34lancepantzhah, as amalloy said, we're actually putting our first non fork of clojure in production today
15:34hiredmanrelevence isn't on a fork I guess
15:34pjstadigit's open source, so that's an advantage (having a fork)
15:34lancepantzwe had actually been on a fork of 1.2.0
15:35pjstadigthough i do think Clojure/core moves a bit to slowly for me at times
15:35`fogusI've not yet been on a project using a fork, but I can't speak for all of the Relevance projects
15:35pjstadigon the other hand i wouldn't want to add a bunch of junk too quickly either...isn't that the point of the preceeding discussion?
15:35hiredmanpjstadig: it is an advantage for us, but not for the clojure community for everyone to be on a fork
15:35lancepantzwe were on a fork of 1.2.0 because of the keyword hashing bug
15:35brehautlancepantz: wasnt that fixed in 1.2.1 ?
15:35lancepantzthen 1.2.1 added other patches that broke something else for us
15:35cemerickI've been using my own version of c.l.Agent for some time. *shrug*
15:35lancepantzbrehaut: ^
15:36hiredmancemerick: do tell
15:36brehautlancepantz: sorry, NZ internet lag
15:36lancepantzi think it was something with protocols
15:36hiredmanlancepantz: /-/_/ or something with type names
15:36cemerickhiredman: nothing fancy; just parameterization of the threadpool an agent lives on
15:36pjstadiglancepantz: you are mistaken, there are no bugs in clojure
15:36lancepantzhiredman: i think that's it actually
15:36pjstadigonly additive changes :-p
15:36hiredmancemerick: very interesting
15:36lancepantz:)
15:36dnolenmrBliss: well, you're in some dangerous territory there. you're using lvaro and cut. If you're never getting to the next case, the first case is always succeeding. I don't have time to dig into that at the moment.
15:37hiredmanI had a thing for making agents run on the EDT, showed it to rich, he did not approve
15:37mrBlissdnolen: the first case should fail though, that's the problem. Thanks.
15:37brehautlancepantz, hiredman: 1.2.1 that was an awkward time for name munging changes to drop imo
15:37hiredmanyep
15:38pjstadigyeah i would have preferred to just get in the keyword memory leak fix
15:38pjstadigor no
15:38pjstadigthe infinite recursion
15:38cemerickhiredman: hah, that's cute
15:38mrBlissdnolen: Is there a way I can get in touch with Ambrose?
15:39dnolenmrBliss: try to message him via GitHub. I will say, refresh sounds like a bad idea to me.
15:39cemerickParameterization of the threadpool is quite straightforward, and I think he was fundamentally in favor, but it got lost in the shuffle in the early days.
15:40hiredmancemerick: I guess I would like to see kind of the opposite actually, more expose of the clojure threadpools and more control over them, because does every library need its own threadpool?
15:41mrBlissdnolen: I can't message him via GitHub because he didn't provide an email address.
15:42mrBlissdnolen: do you have any other pointers?
15:42cemerickhiredman: well, who controls them? N libraries trying to change threadpools around isn't any better.
15:43dnolenmrBliss: book some time to grok the Oleg version :) seriously it's not a lot of code and probably worth the effort.
15:43cemerickStuff like that is the sort of thing app containers provide, i.e. these libraries use agents that need a threadpool with characteristics X, Y, and Z.
15:43hiredmancemerick: I guess, I don't have a clear anwser
15:43adiabaticsure, but what about the next library that has to waste time writing yet another thread pool?
15:43cemerickPresumably there's a lot of overlap, and you'd end up with a suitable optimization.
15:44cemerickhiredman: it's a lot easier when you only care about what you're doing. :-)
15:44mrBlissdnolen: can you provide a link or is it the one on http://kanren.sourceforge.net/ ?
15:44dnolenmrBliss: that's the one
15:45mrBlissdnolen: ok, thanks for the help
15:46hiredmancemerick: in theory you just need two like clojure provides, unbounded for long running tasks and bounded for short
15:46hiredmanjust like in theory you only need one event polling loop
16:41jcrossley3`fogus: do you know of anyone who's attempted to implement CacheProtocol for a shared, distributed cache like memcached or something else?
17:08beffbernardHi, I'm looking to return the nth value of a lazy seq and my current approach is pretty ghetto.. like so (last (take 100 ( … ))
17:08beffbernardwhat's the "right" way? or an existing function that does the same thing
17:09dnolenbeffbernard: nth
17:09dnolen,(nth 500 (range 1000))
17:09clojurebot#<ClassCastException java.lang.ClassCastException: clojure.lang.LazySeq cannot be cast to java.lang.Number>
17:09beffbernardhaha so obv
17:09dnolenoops
17:09dnolen,(nth (range 1000) 500)
17:09clojurebot500
17:09beffbernardthanks
17:11brehautbeffbernard: meta suggestion ##(apropos 'nth)
17:11lazybotjava.lang.RuntimeException: Unable to resolve symbol: apropos in this context
17:11brehaut,(apropos 'nth)
17:11clojurebot(nthrest nth nthnext take-nth rand-nth)
17:11brehaut~botsnack
17:11clojurebotThanks! Can I have chocolate next time
17:17beffbernardanother quick question. Is there a lazy-seq representing natural numbers?
17:17beffbernardi'm currently doing this (iterate inc 1)
17:17cemerickbeffbernard: see `range`
17:19AimHere(iterate inc 1) is probably what you're looking for, unless you want to make the numbers stop
17:20beffbernardcemerick: almost but the unbounded range includes 0.. but no biggy
17:20amalloy,(rest (range))
17:20clojurebot(1 2 3 4 5 ...)
17:20brehautjust to be pedantic, (iterate inc 1) is not a lazy sequence, the tail of (iterate inc 1) is
17:21beffbernardbrehaut: ahhhhh
17:21brehaut,((juxt class (comp class rest)) (iterate inc 1))
17:21clojurebot[clojure.lang.Cons clojure.lang.LazySeq]
17:22AimHereEep. (range) can be called without arguments? Damn, I learn so many little bits
17:22brehautussually not a problem, but there are some cases where it matters
17:22brehaut,(realized? (range))
17:22clojurebotfalse
17:23brehaut,(realized? (iterate inc 1))
17:23clojurebot#<ClassCastException java.lang.ClassCastException: clojure.lang.Cons cannot be cast to clojure.lang.IPending>
17:23cemerickand brehaut wins today's Extravagant Usage of juxt Award ;-)
17:23technomancy...
17:23beffbernard,(realized? (rest (range)))
17:23clojurebot#<ClassCastException java.lang.ClassCastException: clojure.lang.ChunkedCons cannot be cast to clojure.lang.IPending>
17:23technomancywow, that suddenly makes realized? a lot less useful
17:24amalloywell, it's not *that* sudden. brehaut's been going on about it for a while
17:24brehautamalloy: huh? only a couple of minutes
17:24amalloybrehaut: was it not you who was complaining a couple weeks ago?
17:24brehautnope
17:25amalloyoh. well, people have been complaining for a while. realized? really is pretty useless
17:25jyaanI just checked out clojurescript from github and then ran script/bootstrap, but script/repl and script/repljs throw: Exception in thread "main" java.lang.NoClassDefFoundError: clojure/main
17:26amalloy(defn my-realized? [x] (or (not (instance? clojure.lang.IPending x)) (realized? x))
17:26jyaanAm I missing something here? I looked at the scripts and they should be taking care of their own classpath. I'm on OSX 10.5, btw
17:27brehautis it possible to have a lazy chunked seq ?
17:28dnolenjyaan: should just work, nothing went wrong w/ bootstrap?
17:28jyaanDidn't see anything
17:28jyaanodd
17:28jyaanI'll try re-cloning first I guess
17:29jyaanBtw, I really like the libraries you've been working on lately. Thanks!
17:29dnolenjyaan: thx!
17:32jyaanStill getting that exception, and there were no errors from bootstrap
17:34lynaghkjyaan: are you running them from bin or clojurescript root?
17:34jyaanclojurescript root
17:34lynaghkhmm
17:34jyaanalso tried setting CLOJURESCRIPT_HOME but nothing changed
17:34lynaghkdo you have $CLOJURESCRIPT_HOME set in your environment?
17:34lynaghktry unsetting it; you may have set it incorrectly.
17:34jyaanreally weird considering it just loops over the files in lib and such
17:34jyaangood idea
17:35jyaannah it's the same
17:36jyaanI'll try printing the variables in the script to see what's going on
17:36lynaghkDon't know what to tell you
17:36lynaghkah, yes, always a good idea.
17:37dnolenjyaan: have you checked that you can run the jar, java -cp clojure.jar clojure.main ?
17:37jyaanI believe I've found the problem
17:38jyaanIts variable for setting the classpath is empty
17:38jyaanSo sometihng is going wrong in that for loop
17:48technomancyany other lein plugin authors that missed it from earlier; I've updated the plugin docs to cover upgrading your plugin to work with lein2: https://github.com/technomancy/leiningen/blob/master/doc/PLUGINS.md
17:48technomancyif you get a chance I'd love to get some feedback on that
17:49jyaanThis is what script/repl ends up running: java -server -cp script/../lib/*:script/../src/clj:script/../src/cljs:script/../test/cljs clojure.main
17:52jyaanwhich means none of that stuff is expanding into actual files
17:52jyaanfor next in lib/*: src/clj: src/cljs: test/cljs; do
17:52jyaan CLJSC_CP=$CLJSC_CP:$CLOJURESCRIPT_HOME'/'$next
17:52jyaandone
17:52jyaanthat's the for loop lol
17:52jyaanso I'm just going to separate them and it should run I think
17:53jyaanExcept for the colon in front of the $ that wasn't there originally
17:56jyaanYea I got it working; I'm guessing they were separate before and someone tried to combine them and broke it
17:58jyaanBleh it was compiled for 1.6
18:07devinuscan anybody succinctly describe the clojure concurrency model to me?
18:07devinushow does it map to processes:threads ?
18:11TimMcdevinus: There's the STM stuff, and there's also the agents/futures stuff... which are you asking about? Only the latter really involves new threads.
18:11TimMcThere's documentation on the threadpools that send and send-off use.
18:12devinusTimMc: sorry, agents
18:12devinusi'm trying to visualize how agents map to processes and threads
18:13TimMcI think there are 2 queues that lead into threadpools, and each processes agent messages as they come in.
18:21hiredmandevinus: they don't
18:22hiredmanagents are about identity
18:26SirDinosaurquestion: how do i add the dependency for clojure.algo.generic.math-functions if i'm using lein?
18:28RaynesSirDinosaur: In your project.clj, add [org.clojure/algo.generic "0.1.0"] to :dependencies
18:29SirDinosaurRaynes: thank you so much
18:39RaynesHahaha, wow.
18:39RaynesI was wondering why there weren't any new pastes on refheap and then I realized about 30 minutes later that I was looking at my local server.
18:51mebaran151if I have a def that relies on something outside my program (like (def current-time (System/current-time-millis))) will my defs be executed only once and fixed at compile time or every time my program starts?
18:52technomancymebaran151: yes
18:52technomancyerr
18:52technomancyif you do AOT, it will be fixed at compile tim
18:52technomancye
18:53mebaran151I see
18:53mebaran151so I if I want to be able to AOT my code, I should probably embed those properties in startup functions
18:53technomancyyep
18:53technomancyyou can memoize them if you like
18:53hiredmantechnomancy: that is not true
18:54hiredmanmebaran151: it will be run everytime the code is loaded
18:54mebaran151basically I want to use seesaw to read a preference from the registry
18:54technomancyoh, right; it's just defonce
18:55mebaran151and not embed my own regisry values as a result
18:55hiredmanwell, no, defonce will do the same thing, it well execute it when it is loaded
18:55hiredmanjsut once you've loaded the code, if you reload the defonce it won't clobber the existing value
18:56mebaran151so if I AOT'ed a file with (def my-time (System/currentTimeMillis)) every time I start my program it would rerun System/currentTimeMillis
18:57technomancyhm; I assumed vars would be loaded as .class files even if they're not functions, but I may have been thinking of something else
18:59hiredmanwell what the compiler emits for that is something like (.setRawRoot #'my-time (System/currentTimeMillis))
18:59hiredman(bytecode of course)
19:00amalloyinside of my_ns__init.class, right?
19:00hiredmanwhere (System/currentTimeMillis) is emited as something like (invoke-static System currentTimeMillis)
19:00hiredmanamalloy: yes, as a static init
19:01JohnnyLif [] is fater than () why is clojure slower than java and slower than sbcl?
19:02JohnnyLfaster
19:02amalloythat question is all premise and no content
19:02hiredmanJohnnyL: please either ask a question that makes sense or troll somewhere else
19:02technomancyJohnnyL: () is faster than [] because it's more aerodynamic
19:02emezeskeJohnnyL: [] is faster to type than () because you don't need to hold the shift key
19:03JohnnyLah, so the clojure community sucks.
19:03amalloyyeah, unlucky
19:03technomancyyep, you figured it out
19:03technomancyplease don't let our secret become known
19:03jyaanLol
19:03JohnnyLinherit from lisp?
19:03amalloyemezeske: swap the 90/() keys! makes my life so much easier
19:03emezeskeCome to think of it, you guys are a bunch of jerks!
19:03technomancyemezeske: NO U
19:04emezeskeamalloy: That is actually pretty appealing to me...
19:04JohnnyLThe Great Computer Language Shootout make clojure about halfway in speed for all tested languages.
19:04JohnnyLThats why I ask.
19:04amalloyi swapped all the numbers for symbols. inconvenient on occasion, but pretty awesome for coding
19:04TimMcJohnnyL: And you believe that site?
19:04JohnnyLGetting facts about a lanugage is not trolling btw.
19:04TimMcIt doesn't know shite about benchmarking.
19:04JohnnyLBut responding *like* a troll is.
19:04jyaanKeep in mind that it's the Language Shootout GAME
19:05emezeskeJohnnyL: I don't think people meant to troll you. There was some kidding around, because I don't think anyone understood your question.
19:05TimMcamalloy: That's pretty fantastic.
19:05jyaanRead the disclaimers on that site and that should explain some confusion
19:05TimMcemezeske: Also because he was being an ass.
19:05JohnnyLhttp://shootout.alioth.debian.org/u32/which-programming-languages-are-fastest.php
19:05JohnnyLTimMc, lick me.
19:05emezeskeTimMc: Hahaha, I should probably speak for myself :P
19:06jyaanYep that's it
19:06technomancyalioth shootouts are pretty famous for being hugely biased against languages hosted on virtual machines
19:06amalloy"which language has the best support for calling into native libs written in C?"
19:06jyaanC?
19:06kirasheh
19:06clojurebot#<ClassCastException java.lang.ClassCastException: clojure.lang.Cons cannot be cast to clojure.lang.IPersistentStack>
19:06brehautjyaan: you may be surprised then :P
19:06technomancyamalloy: "which language has lots of people sitting around with nothing better to do than write up benchmarks?"
19:07JohnnyLtechnomancy, the same that has people sitting on irc making fun of people asking questions.
19:07JohnnyLI take it you guys are pretty much into linux.
19:07brehautunix
19:08jyaanYea there are lots of Mac and *BSD users
19:08JohnnyLbrehaut" curious.
19:08JohnnyLlinux isn't unix.
19:08brehautnever is anything else people call unix these days
19:08brehautbut nevertheless
19:08brehauts/never/neither/
19:08JohnnyLthats what I thought.
19:08brehautbah
19:09brehautunix is still a useful category of OSs even if the oses in the category are not (strictly) unix
19:09jyaanlinux seems a lot more unix-like than mac imo, but mac is one that paid the standardization fees
19:09AimHereUnix has about three meanings, one of which Linux could qualify
19:09jyaanRight
19:10jyaanAimHere: Wait, what's the third?
19:10AimHereUnix the original codebase and derivatives therefrom, Unix the trademark, and Unix, the way of doing things
19:10jyaanOhh
19:11brehautanyway it hardly seems curious that there are lots of mac and bsd users
19:12jyaanNo kidding, take a look at any Google talk for example, nearly every speaker is using a Mac
19:13technomancyjyaan: http://p.hagelb.org/lein-os.png <- for lein users
19:13AimHereThe only exception I've seen in the Clojure talks on Blip has been the old English dude who did the data structures in Scala that Clojure nicked, and he used Windows of all things
19:13brehautPhil Bagwell
19:13AimHereThat's the fellow
19:14jyaanYea that's about what I'd expect I think; Lots of people like me tend to use both Linux and Mac
19:14brehautself selecting survey http://lein-survey.herokuapp.com/results
19:14jyaanFor most development
19:14technomancybrehaut: true
19:14jyaanThen mainly just Windows for testing and maybe some games
19:15brehauttechnomancy: im not sure why its a surprise that a lot of us mac people dont have a package manager
19:15jyaanActually Bagwell's versions weren't immutable
19:15jyaanWell macports is out there
19:15hiredmanI ended up with a mac because I was tired of maintaining my personal freebsd machines
19:15technomancynot having a package manager just feels so stone-age
19:15jyaanIf it weren't I would have a hard time
19:15jyaanYes agreed
19:15hiredmanof course now I have to maintain a linux vm :(
19:16jyaanIt's such an annoyance having to go out and search for things and set it up manually
19:16brehauttechnomancy: but lein installs most of my developer dependancies, and apps are stand alone bundles in /Applications/
19:16technomancyinstalling software by hand is a way of teaching your subconscious that it's OK for humans to perform tasks that should be done by a computer
19:16kirasi think i might be encountering the problem described here: https://github.com/technomancy/leiningen/issues/354 however it seems like it should be resolved by using 1.7.0-SNAPSHOT, which i am currently using. before i reopen (if i even can), would someone mind taking a look at my project.clj to see if i'm missing something obvious? https://gist.github.com/1784697
19:16brehauttechnomancy: anything that isnt lein or mac land lives in my linux VM and is managed by apt
19:17jyaanWell it should be fairly clear at this point that the old way won't last much longer
19:17brehauthiredman: what vm software do you use for the linux VMs?
19:17jyaanEven looking at mobile, things are in app stores which are really just repos as well
19:18hiredmanbrehaut: just one, under virtualbox
19:18jyaanThis is the biggest pain in Windows I think, because about all you have is Cygwin
19:18mebaran151jyaan: there's actually a package manager for windows surprisingly
19:19jyaanI heard about an open-source project for that but it didn't look very convenient at the time
19:19mebaran151I use pik for ruby stuff I have to write, but there was one I played with that worked alright
19:19AimHereThe most important package manager for Windows is called 'Steam'
19:19jyaanLol
19:19mebaran151haha
19:19Apage43AimHere: I have that one on my Mac too :)
19:19Apage43it's a lot more useful on windows though.
19:20jyaanWindows really needs to ditch the whole everything-has-its-own-update-program-and-daemon
19:20jyaanEspecially how they try to organize things with nagging
19:22jyaanBut it's workable; With Cygwin and Emacs I can get by on there
19:23mebaran151it's nuget, which actually works alright
19:23mebaran151I install Emacs myself though
19:25mebaran151I tend to stay away from cygwin, because it lives in the uncanny valley: all the tools I really need come in mingw packages these days
19:25jyaanuncanny valley??
19:25lazybotjyaan: Uh, no. Why would you even ask?
19:25mebaran151jyaan: the uncanny valley of almost unix but not quite so
19:26jyaanYea there are a few issues like encoding
19:26jyaanNot too bad if you just stick to utf-8 for everything
19:26AimHereIt outwardly looks and moves like Unix, but it's dead inside
19:26mebaran151so silly little things blow up and it doesn't do unix well enough to be worth the hassle
19:26technomancywhat's \\b in emacs-regex-speak?
19:26jyaanword boundary
19:26mebaran151the only thing that sadly doesn't work is clojure-jack-in for lein
19:26jyaani was using it
19:27jyaanso it works
19:27mebaran151but lein swank and slime-connect works okay
19:27mebaran151hmm
19:27jyaanmaybe something changed recently, idk
19:27technomancyjyaan: nice, wrong channel and I still got an answer; thanks. =)
19:27jyaanhaha yea
19:27jyaani like regex :)
19:27mebaran151I get error in process filter: non-hex digit
19:27jyaanoh hm, actually you're right
19:27mebaran151is there a quick fix or an update?
19:27jyaanyou have to use lein.bat
19:28mebaran151I am using lein.bat
19:28jyaanI remember getting that error, let me see if I can remember exactly what I did
19:28seancorfieldmebaran151: you have stuff in c:\users\... and the \u introduces a unicode escape sequence so it's expecting hex, not sers
19:29seancorfieldif you can get it all installed in c:\work or something, it'll work fine
19:29mebaran151I do have stuff in users....
19:29jyaani didn't have to do that though
19:29jyaani had my stuff in C:/users/jyaan/projects/
19:29brehauti really wish linus et al had thought that maybe a decent UI would be a good thing on a VCS when they made git
19:30jyaaner, well c:\\.. etc..
19:30seancorfieldjyaan: yeah, it seems to depend on how it calculates the path
19:30seancorfieldand which version of windoze folks are running
19:31seancorfieldi have a VM with Win XP and emacs etc all works just fine - with the identical config to my ubuntu and mac machines (i have it dropbox, shared to all three, and symlink my .emacs.d folder)
19:31seancorfieldtook me a while to figure out how to do a symlink on windows :(
19:32jyaanhaha
19:32jyaanI still haven't quite got that tfigured out I think
19:32ChandonThe clojure.parallel library claims to be deprecated. Does something replace it?
19:33jyaanAt least with Java you don't have to deal with all the Windows stuff so much these days
19:34jyaanMaybe pmap? I don't know abotu clojure.parallel though
19:34jyaanseancorfield: I also badly miss the Emacs/Unix keyborad shortcuts when in Windows
19:35seancorfieldwhich ones?
19:35kirasjyaan: i miss the vim keyboard shortcuts when i'm everywhere ;)
19:36jyaanYou can use C-a C-e C-k C-b C-f M-b M-f in both GTK and OSX
19:36brehautanyone got a good article to read on tuning the memory usage of the JVM for clojure?
19:36brehaut(one that assumes the reader knows next to nothing about tuning the JVMs memory settings)
19:36kirasjyaan: this might be of interest to you: http://www.emacswiki.org/emacs/XKeymacs
19:36jyaanYou have to set the keybinding mode to "Emacs" with gconf
19:37mebaran151jyaan: I'm on Win 7 Pro
19:37mebaran151have to be for work :(, though it's less unpleasant than I remembered
19:37aperiodicbrehaut: i just apply everything in http://groups.google.com/group/clojure/browse_thread/thread/c8f69037b26e2856?pli=1
19:37hiredmanbrehaut: watch out for copyng strings around, they are immutable and have no structural sharing
19:38jyaanaperiodic: nice
19:38aperiodicalso, i recently learned that keywords live in the permgen
19:38hiredmanif you are messing about with big globs of say json encoded data it can hurt
19:38hiredmanaperiodic: not true
19:39brehauthiredman: yikes. ive got a couchdb based site. thats basicly all it does
19:39jyaanI had a feeling it would be in permgen
19:39hiredmanthe strings backing keywords are interned which generally means they end up in the permgen
19:39amalloyjyaan: the gtk emacs bindings just make me sad
19:39jyaanLol
19:39jyaanamalloy: Yea they don't always works
19:39amalloya few things work, which lead me to assume more will, and then i'm fumbling around completely
19:40amalloyi'd rather just remember the windows bindings, even if they're less good
19:40jyaanamalloy: Yea there are lots of apps that override
19:40amalloynot just that; so much is missing like mark/kill
19:40jyaanamalloy: nah I hate dealing with all the arrow-key stuff
19:40aperiodichiredman: well, right. lots of distinct keywords => bunch of allocations in the permgen was the point i wanted to make
19:41hiredmanbrehaut: byte arrays and seqs of byte arrays
19:41hiredmanor something like erlnag's io lists
19:41hiredmanhttp://prog21.dadgum.com/70.html
19:41aperiodichiredman: would i probably know it if i were copying strings around?
19:41amalloyhiredman: strings do a little bit of structural sharing; mostly the kind that makes you sad
19:42brehauthiredman: i think i might have missed something, is that as an alternative to strings?
19:42aperiodichiredman: as opposed to sharing their reference
19:42brehautamalloy: you mean like split and substring?
19:42amalloyyes
19:42hiredmanaperiodic: just about anything causes a copy
19:42hiredmanbrehaut: yes, I guess seqs of strings work too
19:43hiredmanjust avoid call str to build up strings
19:43brehauthiredman: right. that makse sense
19:43hiredman.getBytes
19:43hiredmanso easy to call, but the pain is forever
19:44aperiodichiredman: if they're immutable, why are they so prone to being copied?
19:44hiredmanbecause they are backed by mutable arrays instead of trees
19:45hiredmanfor example the byte array returned by .getBytes is mutable, but the string is not, so it needs a defensive copy
19:45aperiodicis there an easy way to verify whether or not an operation causes a copy (identical?)?
19:46hiredmanaperiodic: anything that creates a "new" string
19:46hiredmanconcat
19:46hiredmanI guess with the notable exceptions amalloy mentioned
19:47hiredmanat least str doesn't use concat
19:48aperiodichiredman: good to know, thanks!
19:49brehautim very glad enlive defaults to producing a seq of strings right now
19:50kiraswould someone please take a look at this for me and tell me if i'm doing something wrong or if it looks like a bug in leiningen? https://gist.github.com/1784697 i think it might be the same issue as this: https://github.com/technomancy/leiningen/issues/354
19:50brehauthiredman: thanks for the pointers
19:52hiredmanhttps://github.com/hiredman/iolists is something I started on after running into an issue at work with oomes from copying strings around and thinking for the 4th or 5th time "iolists would be useful here"
19:52hiredmanhaven't used it in anger yet
19:52technomancykiras: on 1.6 or 1.7?
19:53kirastechnomancy: i started with 1.6 then moved to 1.7 and am now at 1.7.0-SNAPSHOT, according to lein version
19:54technomancykiras: probably a bug then, but I've never used native dependencies myself so I'm not really sure
19:54brehauthiredman: is that dynamically extending the Word protocol as new array types are discovered?
19:54technomancygo ahead and re-open that issue and paste your project.clj file
19:55hiredmanbrehaut: to new array types
19:55brehautthats extremely cool
19:56kirastechnomancy: ok... i would like to re-open the issue, but github says that i don't have permission to do so. is that normal?
19:56technomancykiras: didn't realize that was possible; sorry
19:56technomancyI re-opened it
19:57kirastechnomancy: thanks :) just out of curiosity, what do you think the chances are this will be fixed soon? i have a feeling this might be considered a low priority issue for most users?
19:59technomancykiras: it's true there are very few users of native dependencies
19:59technomancyif you are interested in helping, it could be fixed soon
20:01kirastechnomancy: i would be interested in helping. i am trying to make a game using clojure and i need access to lwjgl. i'm not really sure where to start though. any thoughts?
20:02technomancynative-dependency support consists of three steps: 0) find which jars have native deps, 1) extract them to the filesystem, and 2) add them to the java.library.path
20:02technomancythe first thing to do is find out which step is failing
20:03kirastechnomancy: ok. i seem to have the proper native dependencies installed to the various "native/os" directories. that seems to imply that it is the last step that is failing. do you agree?
20:04technomancyyeah
20:04technomancyso the code for handling that is in src/leiningen/compile.clj
20:04technomancyin get-jvm-args
20:05technomancyso you'd want to check the value of native-arch-path
20:09kirastechnomancy: thanks. i'll take a look at that.
20:11mebaran151so is there any secret to getting jack-in to run on windows?
20:11Frozenlo`mebaran151: I did it yesterday, what is your question?
20:12mebaran151I'm on Win 7 and I'm having process filter issues
20:12mebaran151I can do slime-connect, which is more than adequate, but just doing a clojure-jack-in seems a lot nicer
20:13Frozenlo`Sure is.
20:13Frozenlo`WHat happens when you M-x clojure-jack-in?
20:13mebaran151error process filter
20:14Frozenlo`No more info? Like "can't find project.clj"?
20:16kirastechnomancy: i'm not very experienced with git. would you mind telling me what branch i should be on?
20:16technomancykiras: oh, sorry; "git checkout 1.x"
20:17technomancykiras: though I would be interested in knowing if the same problem is present in the master branch
20:19technomancyanyone know whose this is? http://clojars.org/clj-rpm/newrelic
20:19kirastechnomancy: thanks, that seems to work. i could try to look into whether the problem exists on the master branch. i was unable to find either get-jvm-args or native-arch-path in compile.clj when i was on the master branch though.
20:20technomancykiras: maybe just check in "bin/lein repl"?
20:20technomancywait, so when working from the 1.x branch, native dependencies are working for you?
20:24kirastechnomancy: i'm not entirely sure what you mean. with all the versions i have tried, the native dependencies get downloaded and extracted into the native/os directories. but when i am using emacs/slime or lein repl, the native path doesn't seem to be added to java.library.path
20:25technomancyoh, ok; I thought you said it worked.
20:25kirastechnomancy: it is only just now, however, that i have used git to download lein's code and started switching between branches and the such.
20:25technomancyok, sure. with bin/lein from the 1.x, can you put a println in to see the value of native-arch-path?
20:32kirastechnomancy: i will try that.
20:35kirastechnomancy: #<File /home/kiras/projects/practice-001/native/linux/x86_64>
20:36technomancyso that directory exists?
20:38kirastechnomancy: no, it doesn't... it seems that the native libraries are unpacked to native/linux and architecture is not taken into account
20:39technomancykiras: oh, ok; that sounds bad
20:39kirastechnomancy: so i suppose one of the questions is, where exactly should the libraries be?
20:39technomancylemme see
20:39technomancythat actually sounds like a problem with the jar you're consuming, not leiningen
20:40technomancythe extraction location within native/ depends on the path of the JarEntry
20:41kirastechnomancy: yeah, after seeing the difference in native-arch-path and the actual location i was wondering if that could happen...
20:41kirastechnomancy: i will have to try another jar or possibly create my own.
20:41technomancyyeah, unfortunately creation of native-dependency jars is totally undocumented and fairly manual
20:41technomancythat's on my hit list after lein2 is released
20:42kirastechnomancy: do you happen to know of a working jar with native dependencies i could test on quickly?
20:42kirastechnomancy: any improvements to that would definitely make me happy :)
20:42technomancykiras: here's a list of all the jars (c. last summer) that have native components: http://p.hagelb.org/find-native.clj
20:43technomancyall clojars jars anyway
20:43kirastechnomancy: thanks :)
20:43technomancysure
20:43technomancywe could use some help improving the native situation for sure
20:44clj_newbIs there a builtin for transforming all the values of a map with function TRANSFORM? I currently have: (into {} (map (fn [k v] {k (TRANSFORM v)}) m))
20:44clj_newbbut I suepect there is a more idiomatic way to write this montrosity
20:46technomancyclj_newb: I wish there were!
20:46kirastechnomancy: i wouldn't mind assisting where i am able to, although i don't know that my help would be very helpful. :)
20:46brehautyeah (into {} (map (juxt first (comp TRANSFORM second)) m))
20:46clj_newbtechnomancy: woot, this can be my first contrib to clojure.contrib
20:46clj_newbtechnomancy: can you come up with a good name, push it through the approval process, and then mention me in the acknolwedgements?
20:47amalloyhahaha
20:47technomancyclj_newb: there is clojure.walk/keywordize-keys, but there needs to be something more general
20:47brehautmapmapvalues and mapmapkeys :P
20:47brehautbut really why would you give up an oppertunity for juxt and comp
20:48technomancyclj_newb: (zipmap (map transform (keys x)) (vals x)) is a bit better
20:48clj_newbbrehaut: haskell point free style?
20:48brehautclj_newb: clojure point free style
20:48technomancybut I really wish map-keys and map-values were in core
20:48amalloybrehaut: remember knit, my theft of ***? (into {} (map (knit identity f) m))
20:48brehautamalloy: oh yeah! even bette :D
20:50clj_newbI like the name map-values
20:52technomancyit bothers me that clojure.walk/keywordize-keys and clojure.walk/stringify-keys are not implemented in terms of map-keys
20:52technomancyit just seems so obvious
20:52technomancyI'll have to give stuartsierra an earful next time he comes online; wtf
20:52hiredmanand it really should just be a reduce
21:00mebaran151Frozenlo`: nope, I think it's \U escape issue; seems pretty common
21:15dnolenthe T programming language was pretty neat
21:17brehautdnolen: thats one of the precursors to scheme?
21:21hiredman~def update-in
21:23brehauthiredman: the burdens of AR type checking
21:23hiredmanhmmm?
21:23brehautlens vs update-in
21:23hiredmanah
21:24hiredmanAR?
21:24clj_newbwhat is the inverse of read-string?
21:24ajabrehaut: I think PG had an essay on T. I seem to recall reading it.
21:24amalloypr-str
21:24brehautaja: http://www.paulgraham.com/thist.html
21:25brehautand its not actually PG, its olin shivers i think
21:25clj_newbamalloy: thanks
21:25ajabrehaut: Ah.
21:25brehaut(hosted by pg so understandable mistake)
21:27dnolenbrehaut: no T was a pretty incredible language, one of the first experiments to see if a Lisp language could be very efficient, it also had objects at the bottom (cons was not primitive)
21:27dnolenbrehaut: this is a pretty mind blowing read http://www.paulgraham.com/thist.html
21:28dnolenbrehaut: influenced Self, this is also a killer read for the Clojure programmer http://cs.au.dk/~hosc/local/LaSC-4-3-pp223-242.pdf
21:28brehautyeah it is
21:28dnolenOrganizing Programs w/o Classes ^
21:29dnolenbrehaut: T was after Scheme
21:29brehautoh hmm. somehow i have that remembered backwards
21:29ajaHeh. It was a response to a project called 'nil'.
21:32brehauti find the whole notion of CPS as an intermediate representation/optimization target amazing and mind boggling
21:32ajaMy new language name is going to be '()'
21:33brehautaja: i predict poor marketability due to search engine impedance
21:34ajabrehaut: :-). Previously known as "the C# Problem"
21:34brehauthah yeah
21:59i_sJust finished my first program, a sudoku-solver. Would love to get critique/tips: https://github.com/isaksky/sudoku-clojure/blob/master/src/sudoku_clojure/core.clj
21:59i_sparticularly if there is a better way to do the function in line 92
22:01brehautyikes
22:02ajai_s: Heh. Google "Norvig Sudoku" which is sort of the last word on how to attack that problem and links to a Clojure implementation of his solution.
22:03brehautor alternatively bird's functional pearls ;)
22:03jtoyhi all
22:04brehauthttp://www.cs.tufts.edu/~nr/comp150fp/archive/richard-bird/sudoku.pdf
22:05i_swill check those out, thanks
22:07i_swell mine already works, so i was wondering more about clojure style and so forth
22:07ajabrehaut: Nice link, thanks. That book has been on my wish list for a while.
22:16ajai_s: Effectively critiquing another's code is difficult work. Better to compare your implementation to the others that were offered and then ask more specific questions in here. (Why is x better than y? Which would be preferable, u or v?)
22:21i_saja: ok, in that case I have a specific question. Is it ok to use doseq and swap for this function? https://github.com/isaksky/sudoku-clojure/blob/master/src/sudoku_clojure/core.clj#L92 Or is there a good functional way to do it?
22:29ajai_s: It's a taste thing, but you function looks a little imperative to me (lots of conds and cases). Consider the search function in the sample I cited, which (a) doesn't limit itself to one level of search and (b) employs structures like apply and filter instead of branching.
22:32i_saja: will look into it, thanks
22:39ajai_s: Bear in mind that this is just my opinion. I'm still pretty new to to clojure myself (more comfortable in vanilla common lisp or old-school C), so I dn't feel particularly qualified to be dispensing advice.
22:42i_sok
23:07i_sis there a way to splat lists in clojure? e.g., splat [2 3] so that for (disj #{1 2 3} [2 3]), it returns #{1}?
23:09i_si.e., I have [2 3], but want to evaluate (disj #{1 2 3} 2 3)
23:10dnolen,(apply disj #{1 2 3} [2 3])
23:10clojurebot#{1}
23:10dnoleni_s: ^
23:12i_ssweet, thanks dnolen
23:25clj_newbclojure is
23:26clj_newb_ <-- fill in the blank
23:58muhooa language :-P