#clojure logs

2013-08-08

00:07sinistersnareException in thread "main" java.io.FileNotFoundException: Could not locate cljdx/myscreen__init.class or cljdx/myscreen.clj on classpath: , does anyone have experience with this? if it helps, this class is using a proxy
00:07sinistersnareand im not sure what to do
00:14futileI have an itch to do something cool now.
00:15sinistersnareyou should help me :=\
00:15futileThe success of Zephyros has made my confidence return that I can actually do cool, smart things.
00:15futileWith what, O person?
00:16sinistersnareA FileNotFoundException with not finding something in classpath
00:17futileI'm afraid I have no idea how to help you.
00:17sinistersnareits ok :p
00:18jack_rabbitsinistersnare, Are you using leiningen?
00:18sinistersnareyes
00:18sinistersnareit is happening on a .clj file with a proxy
00:19sinistersnareidk if thats is
00:19sinistersnareit
00:19sinistersnareException in thread "main" java.io.FileNotFoundException: Could not locate cljdx/myscreen__init.class or cljdx/myscreen.clj on classpath: ,
00:19jack_rabbitsinistersnare, I don't know if it's a bug or not, but I've had this problem before. Try using both an import and a use in your namespace declaration. The order *is* important, though I don't remember which should come first.
00:19jack_rabbitThe namespace that's referencing the class, that is.
00:20coventryNever mind, my question was stupid.
00:21sinistersnaresorry, what did you say?
00:21sinistersnareright before i left
00:21jack_rabbit<jack_rabbit> sinistersnare, I don't know if it's a bug or not, but I've had this problem before. Try using both an import and a use in your namespace declaration. The order *is* important, though I don't remember which should come first.
00:21jack_rabbit<jack_rabbit> The namespace that's referencing the class, that is.
00:22futileDoes writing an efficient syntax highlighter for Clojure code sound hard?
00:23wastrelhi
00:23wastreli have vim clojure syntax thing
00:23futileIt seems easy to me right now, but maybe I'm ignoring something important.
00:23sinistersnareidk, but you should do something for nightcode! https://github.com/oakes/Nightcode
00:23sinistersnarea new clojure IDE
00:23futilesinistersnare: did you write it?
00:23sinistersnarenope
00:23sinistersnarebut im gonna try to write a libgdx-clojure template for it!
00:23technomancyfutile: improve lein's support for native deps
00:23sinistersnareoh yeah
00:24sinistersnaremake it easy to use clojure for beginners*
00:24futilesinistersnare: it's using rsyntaxtextarea which I have my doubts about
00:24sinistersnarethats a good one
00:24sinistersnaresomething lightweight
00:24futilesinistersnare: it's already easy to use Clojure for beginners
00:24sinistersnarei have no idea what that means! but ok
00:24futiletechnomancy: gaw?
00:24sinistersnarewhen i started clojure, i wasnt sure what to do :p
00:25jack_rabbitfutile, a syntax highlighter shouldn't be too complicated, thanks to Lisp's syntax.
00:25futilesinistersnare: I think the solution to that is just to advertise "lein repl" more
00:25futilejack_rabbit: that's what I'm thinking too.
00:25technomancyfutile: nobody on the lein team uses native deps, so the support is kind of crappy and undocumented
00:25sinistersnarejack_rabbit: https://www.refheap.com/17378 this is my clojure file
00:25technomancyit's a ~common complaint
00:25futiletechnomancy: s/on the lein team //
00:25sinistersnareall i use is import
00:25sinistersnareshould i use 'use'?
00:26sinistersnarehow do yall denote functions?
00:26futiletechnomancy: hmm
00:26technomancyfutile: dude sinistersnare totally uses native deps
00:26sinistersnare(use)?
00:26sinistersnareim confused
00:26sinistersnarewhat
00:26futiletechnomancy: it sounds like it involves understanding anything about Java, which I don't
00:26sinistersnareno i figured it out :D
00:26technomancyfutile: actually the opposite
00:26sinistersnareim using a maven repo from libgdx now :D
00:26futileOh. Then what's "native deps" mean?
00:26sinistersnarewell i dont know what native deps are
00:26sinistersnareso its ok
00:26technomancyfutile: like .so files and such
00:26jack_rabbitsinistersnare, where is the error occuring?
00:27futiletechnomancy: !!
00:27futiletechnomancy: you mean using C libraries?
00:27technomancyyeah
00:27jack_rabbitfutile, That's what a native dep is...
00:27futileThat sounds both fun and impossible.
00:27jack_rabbitfutile, as in "native code"
00:27futilejack_rabbit: I see that *now*
00:27sinistersnarejack_rabbit: 1,1
00:27jack_rabbitsinistersnare, in that file?
00:27technomancyfutile: that or improving clojuresphere
00:28futiletechnomancy: does JVM even allow using C libs at all?
00:28sinistersnarewhat do you mean?
00:28technomancyon the lein survey "difficulty finding dependencies" ranked highly under pain points
00:28jack_rabbitfutile, yes, of course.
00:28futilejack_rabbit: oh.
00:28technomancyfutile: sure; you can do FFI via JNI
00:28futileI just.. assumed not.
00:28technomancylike minecraft
00:28futile!
00:29jack_rabbittechnomancy, leiningen seems to be unable to find dependencies sometimes when maven can.
00:29futileI wonder if he would lose any performance by porting to Clojure
00:29futile(the Java parts)
00:29technomancyfutile: that's what sinistersnare is doing with libgdx
00:29jack_rabbitfutile, Probably not.
00:29sinistersnaretechnomancy, wait, what am i doing with libgdx?
00:29technomancyjack_rabbit: native parts specifically?
00:29technomancysinistersnare: using it? right? I dunno; I was just skimming at that point.
00:29futileoh boy
00:29sinistersnarethe dependency thing? i got it working, im using their maven repos on their site
00:29sinistersnareoh im using it (!!)
00:30futileokay, I think this conversation got way out of hand
00:30technomancysinistersnare: but it has parts written in C, right?
00:30futileeverybody jut calm down
00:30jack_rabbittechnomancy, No, not native parts. I'll retract that statement if we're specifically talking about native stuff.
00:30futile*just
00:30sinistersnaretechnomancy: libgdx uses JNI very much for math stuff and memory stuff
00:30technomancyjack_rabbit: still curious =)
00:30sinistersnareOpengl stuff
00:30futilePeople only work on things they would use on a daily basis, right?
00:30futileThat's the only motivation for working on anything (that and money)
00:31jack_rabbittechnomancy, Just that thing I mentioned to sinistersnare a moment ago, where you need both a :use and an :import statement in the namespace of :gen-class'd clojure files.
00:31technomancyfutile: that's the only sustainable motivation, sure
00:31jack_rabbittechnomancy, Otherwise it *sometimes* doesn't seem to be able to find certain classes.
00:31jack_rabbitI also want to submit a patch to clojure.
00:32futileWell I'm very dissatisfied with all text editors for Clojure code, and I use it every day for my job. So assuming I don't get fired or quit any time soon, that sounds like a good project.
00:32jack_rabbitfutile, Just use emacs.
00:32futileGranted, there have been at least 2 or 3 mentioned in the mailing list recently.
00:32jack_rabbitfutile, native lisp syntax highlighting.
00:32futilejack_rabbit: I am, and it hurts, a lot. But let's not have a flame war.
00:32jack_rabbitfutile, *native*
00:32technomancyjack_rabbit: you're talking about gen-classed stuff within the same project?
00:32jack_rabbitfutile, You don't like emacs?
00:32jack_rabbittechnomancy, yes.
00:32sinistersnareim confused, jack_rabbit im not using :use statements
00:32clojurebottechnomancy is <jweiss> oh man this sucks, why didn't anyone warn me about protocols
00:32futilejack_rabbit: please don't do this. We could be great friends.
00:33jack_rabbitfutile, :)
00:33technomancyclojurebot: we warned you man. we warned you about stairs.
00:33clojurebotI'm no man, and she's no lady!
00:33johnmn3friends are overrated
00:33jack_rabbitsinistersnare, I'm still not sure in what file your code is erroring. I don't see main anywhere in your pasted file.
00:33jack_rabbitOh, clojurebot.
00:34sinistersnareill post the entire thing
00:34futileSo, I'm pretty psyched, you guys helped me get 475 stars on my project.
00:34jack_rabbitclojurebot: say something useful.
00:34clojurebotSomething weird that I noticed: & (use '[clojure.contrib.json :as json]) & &| (json/pprint-json nil) |&
00:34sinistersnarehttps://gist.github.com/sinistersnare/44e3e50bcec04237c700
00:34futileI'm feeling like a useful member of society that contributes back!
00:34sinistersnarefutile: help out Nightcode, it could use some cool stuff! i would contribute if i knew anything
00:34futileWhat's a relative sane modern GUI lib for Java?
00:35futilesinistersnare: it has a very different feature-set than I want.
00:35futilesinistersnare: they all do.
00:35sinistersnarefutile: i can see that
00:35sinistersnareits ok :p
00:35sinistersnarei was jesting mostly
00:35jack_rabbitsinistersnare, You aren't importing your cljdx.drop namespace.
00:35sinistersnaredo i need to?
00:35technomancyfutile: I haven't used it, but seesaw is the only one I've heard good things about
00:35futilesinistersnare: it's a legitimate suggestion
00:35jack_rabbitsinistersnare, yes.
00:35futiletechnomancy: thx
00:35sinistersnareso just (:use cljdx.drop) ?
00:35futilewoo https://github.com/daveray/seesaw
00:35jack_rabbitsinistersnare, that'll work.
00:35sinistersnaregreat
00:35sinistersnarenope
00:36sinistersnare:(
00:36futilei nevar reelizd it was a closure lb
00:36futile*lub
00:36sinistersnarelib*
00:36futile*lub
00:36Heet*lob
00:36futileoh man it even has a hello world!
00:36futile*leb
00:36jack_rabbit*flub
00:36futilehey anyone using mac?
00:36jack_rabbitlil
00:36sinistersnarefutile: https://gist.github.com/daveray/1441520
00:37futilethx sinistersnare
00:37futilewho are you?
00:37sinistersnareyour maker
00:37sinistersnaresome kid whos trying to learn to program
00:37jack_rabbitWell lisp is a great start.
00:37sinistersnarewell...
00:37jack_rabbitYou're ahead of all those unix fools using their crazy archaic C.
00:37sinistersnarei know java/python
00:37sinistersnarebut ive been programming for < 1 year
00:37sinistersnareand im loving it
00:38jack_rabbitGood.
00:38sinistersnareso im just devouring everything
00:38sinistersnarei watched technomancy's talk at conj
00:38technomancy(don't want to get devoured is all)
00:38jack_rabbitsinistersnare, Try learning assembly. That'll twist your face off.
00:38sinistersnarei would go this year (im a few miles away) but its so expensive for a ticket
00:38sinistersnarei tried to learn assembly!
00:38sinistersnarei know a tad bit of C too
00:38jack_rabbitTry again!
00:38sinistersnareC++ scares me
00:38Heetassembly's not bad
00:38jack_rabbitsinistersnare, C++ should scare everyone.
00:39sinistersnarebut first i want to fix this damned FileNotFoundException!
00:39technomancysinistersnare: in the past they've had special sponsored student tickets to the conj; wouldn't hurt to ask
00:39sinistersnarethat :use didnt work
00:39jack_rabbitSame error?
00:39sinistersnareoh that would be so cool
00:39sinistersnareyes
00:39sinistersnarenothing has changed !
00:39jack_rabbitdid you try a lein clean?
00:39sinistersnareyes
00:39sinistersnarewait
00:39sinistersnareyes
00:39jack_rabbithmm. hang on. Let me look at that code again.
00:40sinistersnaretechnomancy: ill see if i can email someone, and if they need my highschool CS teacher to email or something, she likes me, im top of the class :D
00:40sinistersnarewell
00:40sinistersnarewas, school hasnt started up again
00:40jack_rabbitsinistersnare, I'm confused. Why are you using both :gen-class and using a (gen-class ...) form in your drop.clj file?
00:40sinistersnarei have no idea!
00:40sinistersnareit was a bunch of iHaveNoIdeaWhatImDoing.jpeg
00:41jack_rabbitsinistersnare, I'm also not sure that (cljdx.drop) is valid syntax.
00:41sinistersnarethe clojure book that i just bought hasnt gotten that far!
00:41sinistersnarewait
00:41technomancysinistersnare: gen-class is a bit weird; might be best to find an existing working example to adapt.
00:41technomancyI always forget how it works
00:41sinistersnareok, ill look for something
00:41sinistersnarea guy here a couple hours ago said the same :p
00:41technomancy(also make sure you can't use reify or proxy because if you can those are awy more convenient)
00:42jack_rabbitsinistersnare, Either way, you don't need one in the ns macro and as a form in your clj file.
00:42sinistersnareoh wait
00:42sinistersnarei fixed that
00:42jack_rabbittechnomancy, They don't really do subclasses, though, right?
00:42sinistersnarehttps://gist.github.com/sinistersnare/44e3e50bcec04237c700
00:42jack_rabbittechnomancy, I was under the impression that if you wanted a *true* subclass, you had to use gen-class.
00:43technomancyjack_rabbit: depends on whether you need a whole class or just an instance.
00:43jack_rabbitsinistersnare, I'm not sure if dots are valid class names.
00:43sinistersnarewell, i hear that i shouldnt use proxy, but use reify; but i havent found much on how to use it
00:43jack_rabbit*valid in class names*
00:43jack_rabbitsinistersnare, Each has its own use.
00:44sinistersnarei looked at the gen-class documentation, it said fully qualified name
00:44technomancysinistersnare: there are still cases you can use proxy where reify doesn't work by design; something about inheriting from concrete classes or something
00:44technomancyreify is preferred if you can use it, but sometimes you can't
00:44sinistersnareyes, thats what ive heard. but what i need to subclass is an abstract class
00:44technomancyreify might work for that
00:44sinistersnareok, now i just need to read on how to use it :p i have like 15 tabs open
00:45jack_rabbitReify doesn't work on classes. Only interfaces and protocols.
00:45technomancyhuh
00:46jack_rabbitI try to avoid the Java stuff when I can, though.
00:46jack_rabbitI only know that because the project I work on uses so much Java.
00:46sinistersnareyeah, im thinking i should write a wrapper for libgdx; like how seesaw works
00:46jack_rabbitsinistersnare, good idea.
00:46jack_rabbitsinistersnare, makes your code look a lot cleaner, too.
00:46sinistersnarei would be so happy if i did, ive seen some people try; but they have since stopped developing it.
00:46jack_rabbitsinistersnare, fork it.
00:47sinistersnareim interning in my CS class instead of taking the next look; so i will have some time
00:47sinistersnarewe do java, so ill just install the clojure.jar and work there
00:47jack_rabbit:)
00:47sinistersnare:D
00:47jack_rabbitJava is way easier to program in clojure.
00:47jack_rabbitOr Scala.
00:48sinistersnarenever tried scala, but ive heard good things
00:48jack_rabbitI don't know very much of it, but it's a pretty cool language.
00:48sinistersnarejack_rabbit: fork the wrappers that have tried?
00:49jack_rabbitsinistersnare, unless you want to start from scratch.
00:49sinistersnareidk, right now i just want to get this working though :p
00:50jack_rabbitsinistersnare, Well the (cljdx.drop) form isn't valid, I don't think.
00:50wastreli installed openjdk on my debian
00:50sinistersnarein the clojure documentation for gen-class it says to use the fully qualified name
00:50sinistersnarewhich im pretty sure it means package too
00:50jack_rabbitsinistersnare, That's fine. I'm talking about the form in core.clj.
00:50sinistersnareoh
00:50sinistersnarelemme see
00:50jack_rabbit (LwjglApplication. (cljdx.drop) "Hello, Clojure!" 800 480 true))
00:51jack_rabbitIf you're trying to instantiate the class, you need a dot after the name.
00:51sinistersnareOH
00:51sinistersnaredamnit
00:51sinistersnarestill doesnt work
00:51futilescala seems way over complicated
00:51jack_rabbitI don't have the first clue as to why you don't get a syntax error, though.
00:52sinistersnareim just building
00:52johnmn3How would one get at the bytes in a #<[object Blob]> in clojurescript?
00:52sinistersnareidk if that matters
00:52jack_rabbitsinistersnare, Try not a fully qualified name.
00:52sinistersnareok
00:53sinistersnarenope :(
00:53jack_rabbitsinistersnare, I mean in the core.clj file.
00:53sinistersnareyep
00:53sinistersnarejust doing (drop.)
00:53jack_rabbitsinistersnare, also, import the cljdx.drop namespace. I didn't see that in your last paste.
00:53sinistersnaredid that too
00:54jack_rabbithmm...
00:54sinistersnarehttps://gist.github.com/sinistersnare/44e3e50bcec04237c700
00:54jack_rabbitsinistersnare, I still don't see it in there.
00:54sinistersnareoh the import?
00:54sinistersnarei tried it and it didnt work
00:55sinistersnarelet me try again for good measure
00:55sinistersnarenope
00:55jack_rabbitboth import and use?
00:56sinistersnarecan i :import a clojure file?
00:56jack_rabbitsinistersnare, No. You're importing the class that's been generated.
00:56sinistersnarehttps://gist.github.com/sinistersnare/44e3e50bcec04237c700
00:56sinistersnarethats what it is now
00:57jack_rabbitAnd if leiningen tries to compile core.clj before it compiles your drop.clj into a class, lein will error.
00:57sinistersnarehmm
00:57sinistersnarecan i tell it which order to do it in?
00:57jack_rabbitTry one way, then the other.
00:57jack_rabbitI don't remember which works.
00:57sinistersnareweird
00:57sinistersnareso i switched the position of :aot and :main in project.clj
00:57sinistersnareand now
00:57technomancyusually if load order matters it means you're missing a :require somewhere
00:57wastreli installed openjdk then i installed linengngen
00:57sinistersnareits giving me a :aot [cljdx.drop cljdx.gamescreen])
00:58jack_rabbitsinistersnare, what does that mean?
00:58technomancysinistersnare: order of top-level keys in project.clj doesn't matter
00:58sinistersnarewait
00:58sinistersnarecopied wrong thing
00:58sinistersnareerror loading /home/sinistersnare/clj/cljdx/project.clj
00:58jack_rabbit:C
00:59jack_rabbitIs your project.clj valid?
00:59jack_rabbitAnd is that where it's supposed to be?
00:59sinistersnareoh its because im stupid
00:59TEttinger(:require (cljdx [myscreen :as myscreen])) seems like an odd syntax
00:59sinistersnarethe paren
01:00sinistersnarethat was copied from a previous thing i found on github
01:00sinistersnarethis is just a test that has taken many hours more
01:00sinistersnarethan i expected
01:00jack_rabbitthat'll happen.
01:00TEttingerthat was the case with libgdx for me too
01:00TEttingerat least the dep wrangling
01:01jack_rabbitdeps have always been a pain for me in clojure. Other than that it's a pretty cool lisp.
01:01sinistersnarebut this is some weird FileNotFoundException
01:01sinistersnarehow do those come up?
01:02sinistersnarecant find something on classpath...hmmm
01:02sinistersnareso it must be something with me dealing with lein
01:03sinistersnaremaybe TEttinger is right where it cant find cljdx.myscreen
01:03sinistersnaremaybe
01:03ahungryhey guys, whats the doc search call on the repl again?
01:03sinistersnarelemme see
01:03sinistersnare(doc java.lang.String)
01:03clojurebotGabh mo leithscéal?
01:03sinistersnarebut you need to do (use 'clojure.repl) first
01:03ahungrysinistersnare: the apropos one where you can search it out
01:03ahungrylike, (find-doc or something?
01:03sinistersnareoh no idea D:
01:03ahungryif I want to find regex for instance, but (doc regex) no matches
01:04sinistersnarenope didnt fix
01:04TEttingersinistersnare, did you gist upload your project.clj?
01:04sinistersnarewell
01:04coventryIs there a man page for cljs? I'm looking for a way to tell it to catch errors which clojure would normally catch at compilation time like the transposed colon in [tutorial-client.post-processing: as post].
01:04sinistersnarei fixed it
01:05sinistersnareit was the require statement
01:05sinistersnarepointed to the damned wrong file
01:05sinistersnareFileNotFoundException could never have been more right
01:05TEttingerah I see it
01:05jack_rabbit:)
01:05ahungryhm ok seems to be (find-doc actually
01:05ahungryhttp://clojuredocs.org/clojure_core/clojure.repl/find-doc
01:05sinistersnarebut i fixed like 3 other bugs, so its ok
01:05jack_rabbitsinistersnare, kudos!
01:05sinistersnarewell...
01:05sinistersnarelib names inside prefix lists must not contain periods
01:06futileDoes it make sense to port Clojure to C?
01:06technomancyfutile: no
01:06SegFaultAXSo, how do people generally feel about liberator?
01:06futileWhy not?
01:06futileIs it because you love Java so much so why don't you marry it?
01:07TEttingerliberator?
01:07SegFaultAXfutile: Because that defeats a lot of the purpose of Clojure. It's specifically designed to be a hosted language.
01:07futile(That question may need some mental rewording.)
01:07sinistersnarefutile: why?
01:07technomancyfutile: yes, that's exactly it
01:07ahungryWhat does this mean though? CompilerException java.lang.RuntimeException: Unable to resolve symbol: find-doc in this context, compiling:(NO_SOURCE_PATH:1:\
01:07ahungry1)
01:07ahungryusing the nrepl.el program in emacs
01:07technomancymy secret is out O_O
01:07futiletechnomancy: okay seriously though?
01:07ahungryusing clj directly on cli it works
01:07TEttingerahungry, did you (use 'clojure.repl)
01:07technomancyfutile: you need... like... a runtime.
01:07SegFaultAXahungry: I'm guessing because it can't resolve that symbol in whatever ns you're working in.
01:08futiletechnomancy: ... why isn't C's runtime good enough?
01:08futileOh, no GC
01:08futileWell it has that one GC lib..
01:08TEttingerfutile, also horrible strings
01:08futileIt has that one string lib..
01:08jack_rabbitfutile, It has nothing to do with that.
01:08ahungrythanks guys
01:08futileWHOA dont search "c strings"
01:09futileor at least be very careful
01:09sinistersnarebest google search of the day
01:09technomancyfutile: you can't have seamless interop with libs that don't use that runtime, strings, and collections though
01:09technomancy*use that GC
01:09futileOh, seamless interop. Ruby and Python didn't need it.
01:09futileThey got pretty popular without it.
01:09TEttingerno one interops with ruby and C unless desperate
01:09jack_rabbitfutile, If you "port" clojure to C, you end up with some weird modernized Common Lisp.
01:10futilejack_rabbit: citation needed
01:10SegFaultAXGreenspun's tenth and all that.
01:10jack_rabbitfutile, There are already plenty of native lisps.
01:10futilejack_rabbit: each Lisp is as different semantically as Ruby and Python are
01:10jack_rabbitfutile, Clojure derives a lot of its strength from its Java interop.
01:10futilejack_rabbit: and often syntactically also
01:10jack_rabbitfutile, that's just not true.
01:10TEttingera significant chunk of what makes clojure good is easy access to java
01:10futilejack_rabbit: then you're living a lie
01:11jack_rabbitfutile, lisp is what you make it. There are simple macros available to make it behave like Clojure.
01:11jack_rabbitCommon Lisp, that is.
01:11TEttingerif I had segfaults and unseen array overflow in clojure, I wouldn't use it
01:11futilejack_rabbit: no, macros are not a magic bullet that work like that.
01:11jack_rabbitfutile, I think you misunderstand me, then.
01:11futilepossibly
01:11SegFaultAXjack_rabbit: Well, sure ok. You /could/ make any old lisp act like clojure. But a lot of Clojure's semtantics were informed by the runtime on which it's built.
01:12jack_rabbitSegFaultAX, Sure, but that's invisible to the user.
01:12TEttingeryeah, doing something like pmap in C would be... agh
01:12jack_rabbitThere's no reason you couldn't build a clojure -> native compiler.
01:12futileYou'd have to build whole new datatypes in Scheme to get it to work much like Clojure.
01:12jack_rabbitThere's just also no reason TO do that.
01:12TEttingerit would probably require large libs to use threads
01:13technomancyfutile: it would be hard to make it work on a platform that lacked interfaces
01:13technomancyracket kinda has them though
01:13jack_rabbitfutile, I believe that. I don't know much about scheme. I was speaking specifically about Common Lisp.
01:13TEttingeryou could probably do something like interfaces with C++ though, right?
01:13technomancyracket is cheating though; it's specifically designed to write new languages =)
01:14jack_rabbittechnomancy, Isn't that what all lisp is designed for? DSL's?
01:14SegFaultAXjack_rabbit: The point is to invent a proper native clojure implementation, you'd have to re-invent a non-trivial portion of the JVM.
01:14jack_rabbitSegFaultAX, yes. I agree.
01:15SegFaultAXIn other words, Clojure cannot live independently of the platform on which it was intended to live.
01:15jack_rabbitSegFaultAX, I believe I made exactly that point earlier, when I said that Clojure's strength derives from its closeness to Java and the JVM.
01:15SegFaultAXLest you re-invent a bespoke platform to host it.
01:15technomancyjack_rabbit: I don't know if I'd say "domain-specific"; that's pretty limiting
01:15jack_rabbittechnomancy, True.
01:15futiletechnomancy: interfaces can be done in C, I did it once when I wrote my (inefficient) Lisp interpreter.
01:16futileKinda wish I never deleted that. But only kinda.
01:16technomancyfutile: the whole point of interfaces is that everyone in the ecosystem can agree on them though
01:16futileuhh
01:16futilewat
01:17technomancywell from an interop perspective
01:17technomancyotherwise you're constantly converting between types for every interop call you make
01:19jack_rabbitInterfaces aren't too hard in C.
01:19SegFaultAXDepends on what you call an interface I suppose.
01:19jack_rabbitThere's a good Object Oriented C pdf floating on the internet somewhere.
01:20SegFaultAXHeh "interfaces aren't too hard in C... provided you already have a working object system"
01:20jack_rabbitSegFaultAX, Nah.
01:20jack_rabbitYou just have to write a few V-tables.
01:20jack_rabbit*if you want to do it __right__ *
01:21SegFaultAXThat's not really the interesting part of interfaces, though.
01:21SegFaultAXThe interesting part is being able to asert that some thing conforms to some known API.
01:21SegFaultAXUsually that assertion comes at compile time, but it doesn't have to.
01:22jack_rabbitThat's why we have compile time errors, yes.
01:22SegFaultAXSo v-tables are entirely irrelevant.
01:23jack_rabbitI was just flexing. :)
01:23futileinterfaces in C are easy to do so long as you never ever ever change their structure.
01:23futileever.
01:23sinistersnarehi again... i hate to ask another question, but this is about scoping in clojure. im getting an error that it cant resolve a symbol, but its defined in a let form of a function that i call; can i use those variables from the first function? https://gist.github.com/sinistersnare/44e3e50bcec04237c700
01:23jack_rabbitfutile, yes.
01:23SegFaultAXsinistersnare: Never feel bad about asking questions.
01:24sinistersnareive just been here a while
01:24sinistersnareand i need to sleep really soon
01:24sinistersnarebut im determined to get this thing working
01:24sinistersnarethe code is in gamescreen.clj
01:24jack_rabbitEspecially when the main thread is so far off topic...
01:24sinistersnare:D
01:24sinistersnareit was interesting to glimpse at it, and wonder what you guys were talking about a little
01:24futilejack_rabbit: but without need that "OOP in C" pdf. i mean just using structs and casting
01:24sinistersnarebut i understood a good portion
01:25sinistersnarei dont really see much use for OOP in C, i like that its nice and clean
01:25jack_rabbitsinistersnare, I don't see your gamescreen.clj.
01:25sinistersnareunder the huge ass error?
01:25jack_rabbitOh wait...
01:25jack_rabbit:P
01:25sinistersnareyep
01:25sinistersnare:D
01:25jack_rabbit I just needed to scroll.
01:26jack_rabbitsinistersnare, you haven't defined font.
01:26sinistersnareits in the let form in (allocate) (i dont know how to point out that something is a function)
01:26jack_rabbitfont is only a valid symbol within the let form in your allocate function.
01:26sinistersnareyes
01:26TEttingeryou use let to give the name font a value, but only until the end of the ) that matches (let
01:26SegFaultAXsinistersnare: But it isn't in scope where you're using it.
01:26sinistersnareyes
01:26sinistersnarethats my main problem
01:26sinistersnarebut
01:26sinistersnaremaybe
01:26sinistersnarewait hold on
01:26sinistersnareim stupid wait
01:26john2xfont needs to be in the screen fn as well
01:28TEttinger,(let [font (java.awt.Font.)] (.derive font 8.0))
01:28clojurebot#<CompilerException java.lang.ExceptionInInitializerError, compiling:(NO_SOURCE_PATH:0:0)>
01:28jack_rabbitlul
01:28TEttinger,(let [font (java.awt.Font. java.awt.Font/MONOSPACED java.awt.Font/PLAIN 14.0)] (.deriveFont font 8.0))
01:28clojurebot#<CompilerException java.lang.NoClassDefFoundError: Could not initialize class java.awt.Font, compiling:(NO_SOURCE_PATH:0:0)>
01:29TEttingerI can guess why...
01:29xpeAny ideas for my SO question: Serializing sorted maps in Clojure: http://stackoverflow.com/questions/18118290/serializing-sorted-maps-in-clojure-edn
01:29jack_rabbit,(let [font (java.awt.BitmapFont.)] (.derive font 8.0))
01:29clojurebot#<CompilerException java.lang.ClassNotFoundException: java.awt.BitmapFont, compiling:(NO_SOURCE_PATH:0:0)>
01:29sinistersnarefont is a libgdx class :D
01:29jack_rabbitahh.
01:29jack_rabbit:)
01:29sinistersnare:D
01:29TEttingersinistersnare, it's an AWT class too, I use it in swing
01:30sinistersnareyeah
01:30sinistersnareLibgdx has some of their own stuff, like Color
01:30jack_rabbitWell clojurebot can't seem to find it.
01:30sinistersnarehttps://gist.github.com/sinistersnare/44e3e50bcec04237c700
01:30sinistersnarethe gamescreen.clj there doesnt work either
01:30sinistersnarei thought the scoping would be ok
01:30TEttingersinistersnare, nope
01:30TEttingeryou stuck a ) after ]
01:30TEttingerthat ends the let
01:30jack_rabbitsinistersnare, You're trying to program imperatively.
01:31sinistersnaredamnit!
01:31jack_rabbitsinistersnare, Your code using 'font' needs to be within the scope of the let form.
01:31noonianxpe: could you just use seq to turn it into a vector of key value pairs and serialize and deserialize that?
01:31sinistersnarewell, thats because its mostly just libgdx stuck in clojure
01:31sinistersnarei thought i did define it
01:31xpenoonian: I could, but I'd much rather keep the data structure intact
01:31jack_rabbitsinistersnare, Only within the let form.
01:31TEttingermove the ) after the ] in "(let [batch (SpriteBatch.) font (BitmapFont.)])" to the end of the function
01:31sinistersnare(let [batch (SpriteBatch.) font (BitmapFont.)])
01:32jack_rabbitsinistersnare, Do you understand what let does?
01:32sinistersnareit defines local vars
01:32jack_rabbitsinistersnare, Sort of.
01:32sinistersnareso it needs to wrap the entire function?
01:32xpenoonian: there are workarounds, where an app "knows" to expect a sorted-map, but that is missing the point, I think
01:32jack_rabbitsinistersnare, It binds symbols to storage within its form.
01:32sinistersnareok...
01:32sinistersnareseems legit
01:32jack_rabbitsinistersnare, so 'font' only has meaning within the let form.
01:32john2xoutside the let, the symbols don't exist
01:32SegFaultAXnoonian: That solution loses the semtantic meaning of a map, though.
01:33sinistersnareok
01:33jack_rabbitsinistersnare, you understand what a form is, yes?
01:33sinistersnareyes!
01:33jack_rabbitgood.
01:33sinistersnareive read a little bit of my clojure book
01:33sinistersnareso do i put it at the end?
01:33SegFaultAXxpe: I don't think there is a general solution for this. It's going to be specific to your a) serialization format, b) consumer
01:33xpeSegFaultAX: right. do you know of ways to "verbose" output a sorted set?
01:33jack_rabbitput what at the end?
01:33sinistersnarethe ]) in the let form
01:33jack_rabbitNo.
01:33sinistersnarewhere then?
01:33jack_rabbitThe ] encompases the symbols you're binding.
01:33sinistersnareok
01:34SegFaultAXxpe: That isn't really a thing. There isn't a literal form for that data structure in Clojure.
01:34sinistersnarejust the paren then?
01:34sinistersnareohhhhhhh
01:34jack_rabbitthe ending ) encompases the scope you're using those symbols in.
01:34john2xsinistersnare: i think you'll have issues with (resize [w h]) as well.
01:34xpeSegFaultAX: I'm thinking a custom reader literal could help. then I'd need to write a serializer too
01:34jack_rabbitsinistersnare, Yes, Just the ).
01:34sinistersnarejohn2x: why?
01:34SegFaultAXxpe: And your consumers almost certainly don't have that data structure built in if they're non-Clojure (eg Ruby or Python)
01:34sinistersnareit still cant resolve font
01:35SegFaultAXxpe: Sure, a custom serializer wouldn't be too hard.
01:35jack_rabbitsinistersnare, show your code.
01:35sinistersnarehttps://gist.github.com/sinistersnare/44e3e50bcec04237c700 gotcha
01:35sinistersnarejust updated
01:35TEttingereverything between "(let [batch (SpriteBatch.) font (BitmapFont.)]" and the ) that matches the let can see font and batch. nothing else can. if the ) is right after the ], nothing can see it except for other things in the let []
01:35SegFaultAXxpe: You can use the same literal form as a normal hash with a tag.
01:35sinistersnareTEttinger: ok cool
01:35xpeSegFaultAX: correct. If I control the consumer, I'm good. I could also fall back to JSON, make sure the ordering doesn't get messed up, and reread always as a sorted map, too
01:36SegFaultAXxpe: Why does ordering actually matter for your map, by the way?
01:36xpeSegFaultAX: I'm thinking through a B-tree
01:36TEttingerlet can be tricky at first, but you'll get used to seeing 2 closing braces for a defn and an immediately following let at the end of a function definition
01:36jack_rabbitsinistersnare, I think you have an extra paren before the do.
01:36john2xsinistersnare: w and h aren't in the (let) as well it seems. maybe they need to be fn arguments?
01:36TEttingersince let is so commonly used
01:36SegFaultAXxpe: Then a map literal is almost certainly not what you want anyway.
01:36sinistersnareTEttinger: yeah, im still gethering my legs
01:36jack_rabbit ((do (.dispose font)
01:36jack_rabbit(.dispose batch))))
01:36futileI love talking to people smarter than me :)
01:37xpeSegFaultAX: it is, actually, but it would take a while to explain
01:37jack_rabbitfutile, me too!
01:37sinistersnarejohn2x: those are most likely gonna be unused, so ill see
01:37SegFaultAXxpe: No common format can encode this natively.
01:37SegFaultAXxpe: Except XML
01:37sinistersnaremy parens matcher says that it works jack_rabbit but ill look over it
01:37jack_rabbitYou might have matched it, but that doesn't make it valid.
01:37xpeSegFaultAX: thanks, I've gotten good insight here.
01:37SegFaultAXxpe: I'd be interested to check out your solution!
01:38TEttinger,(vec (sorted-map {3 "a: 5 "b" 1 "c"}))
01:38clojurebot#<RuntimeException java.lang.RuntimeException: EOF while reading string>
01:38SegFaultAXxpe: Maybe you should write an edn-utils library that adds serializations for common complex data types.
01:38SegFaultAX:)
01:38TEttinger,(vec (sorted-map {3 "a" 5 "b" 1 "c"}))
01:38clojurebot#<IllegalArgumentException java.lang.IllegalArgumentException: No value supplied for key: {1 "c", 3 "a", 5 "b"}>
01:38xpeSegFaultAX: that would be nice
01:39TEttinger,[(vec (sorted-map 3 "a" 5 "b" 1 "c")) (into (sorted-map) (vec (sorted-map 3 "a" 5 "b" 1 "c")))]
01:39clojurebot[[[1 "c"] [3 "a"] [5 "b"]] {1 "c", 3 "a", 5 "b"}]
01:39futileoh my
01:39xpeTEttinger: yes, you *could* do that, but it loses the semantics
01:39futilewhat big s-exps you have
01:39jack_rabbitYou just watch yourself, jackdempsey...
01:40jack_rabbitfutile, lol.
01:40sinistersnareim confused
01:40SegFaultAXTEttinger: Well if you're doing that far, then just encode a pair of: the map, the order of the keys as a vector
01:40jack_rabbitabout what?
01:40TEttingerxpe, yeah, true
01:40futilewe will not have this discussion
01:40sinistersnarei have no idea
01:40sinistersnarethats my point
01:40jack_rabbitsinistersnare, lol.
01:40SegFaultAX[{:a 1 :b 2}, [:b :a]]
01:40jack_rabbitsinistersnare, Are you using an nrepl?
01:40sinistersnarenope
01:41SegFaultAXTEttinger: No need to repeat the kv pairs for both.
01:41sinistersnareits compiled
01:41sinistersnarei think you need to with :gen-class
01:41sinistersnaredo you need to with reify?
01:41jack_rabbitsinistersnare, the REPL is one of the greatest tools for developing lisp. Use it.
01:41TEttingerSegFaultAX, no I was just showing how to turn it into a vector and how to turn the vector back into a sorted-map
01:41sinistersnareok, but, im not sure how to use it in the context...
01:41SegFaultAXTEttinger: That's not the hard part.
01:41TEttingeryou lose type info, but metadata could do it
01:41jack_rabbitsinistersnare, Fire up a REPL, and try defining and using your functions.
01:42futileWould Clojure be a good language to implement a professional-grade programming language compiler in?
01:42jack_rabbitsinistersnare, Once your functions work in the repl, you can be sure your errors are with namespaces and junk like that.
01:42sinistersnarewell, idk
01:42xpeSegFaultAX: this is cool example I can adapt: https://github.com/flatland/ordered/blob/develop/src/data_readers.clj
01:42sinistersnarethese functions dont seem to be designed for a repl
01:42john2xsinistersnare: or, if you use vim, install vim-fireplace :)
01:42futileI had the impression it would be too slow or inefficient, but I don't know what gave me that idea.
01:42jack_rabbitsinistersnare, True, so try some repl-friendly analogues.
01:43jack_rabbitsinistersnare, but ultimately, they should all work within the repl.
01:43TEttingerfutile, I'm not familiar with the state of parsing libs in clojure, but the language features an embedded DSL would have would be great
01:43futileThere's one parsing library in Clojure that might be perfect. I forget what it's called but it's gotten great reviews.
01:44futileInstaparse.
01:44jack_rabbitfutile, I have a feeling the speed of your compiler would be due to the methods of optimization you use, not the language it's written in.
01:44SegFaultAXOr just ANTLR
01:44futileNOOOO
01:44futilenever
01:44jack_rabbitfutile, gcc is incredibly slow compared to many other *simpler* compilers.
01:54zRecursiveclang seems faster than gcc ...
01:55futileso it's settled
01:55futileI'm going to write a Clojure-like language using Clojure as the compiler, emitting LLVM bitcode.
01:55sinistersnareoh so youre gonna do clojure-llvm
01:56futileffffff
01:56Foxboroncllojvre?
01:56futiledoes that exist?
01:56sinistersnarelol jk i dont know if it exists :p
01:56sinistersnarebut i think that there is a jvm bytecode -> llvm bitcode
01:56sinistersnareso you can just do clojure -> jvm -> llvm bit
01:56Foxboronhttps://github.com/jasonjckn/llvm-clojure-bindings
01:56Foxboronsorta
01:56sinistersnareno need for a compiler
01:57sinistersnareim still confused :( i tried using the repl, but im lost.
01:57FoxboronRelated: http://www.infoq.com/presentations/Clojure-LLVM
01:57sinistersnareactually
01:57sinistersnarei fixed the scoping issue
01:57jack_rabbitsinistersnare, maybe try something simpler until you get the hang of lisp?
01:57sinistersnarewell
01:57sinistersnarei feel like
01:57jack_rabbitsinistersnare, What you're doing is pretty complicated.
01:58sinistersnarei never got into libgdx until i wrote my game
01:58sinistersnarei need to push through, im sorry im asking so many questions :(
01:58sinistersnarei fixed that one
01:58jack_rabbitsinistersnare, It's cool. You're not bothering anyone.
01:58sinistersnarenow im getting a ClassNotFoundException while compiling cljdx.drop
01:58jack_rabbitsinistersnare, paste?
01:58futilesinistersnare: ban yourself from IRC, I've found that I learn way more and way faster when I remove the social aspect from it
01:59Foxboronfutile: depends
01:59sinistersnareill paste
01:59Foxboronfutile: it is more a person too person thing
01:59futilesinistersnare: when I force myself off IRC, i have nothing left to do but figure out the problems by reading and trying things, which always works
01:59sinistersnare:p i should do the same with reddit then futile
01:59futileyes.
01:59sinistersnarewell i fixde the scoping issue after stopping myself for a few minutes
01:59Foxboronfutile: ever tried rubberduck debugging?
02:00sinistersnareits great!
02:00sinistersnarei linked to it here today
02:00sinistersnarehttps://gist.github.com/sinistersnare/44e3e50bcec04237c700
02:00sinistersnarei think i may need to update this
02:00futileFoxboron: yes, it helps. but it also helps when it's a real rubberduck and not a person
02:00zRecursive,(reduce conj #{} (for [i (range 10) j (range 10)] [i j]))
02:00clojurebot#{[2 1] [3 2] [4 3] [5 4] [6 5] ...}
02:00jack_rabbitsinistersnare, still the font thing?
02:00futilei often write an email to a friend and leave the TO field blank the whole time, until its ready to send. by that time ive already figured it out
02:01Foxboronfutile: i find it easier to talk to a person. Several times i have tried explaining a problem too a friend, then i realize the error without him even getting too respond
02:01sinistersnarenope
02:01sinistersnarefixed that
02:01futileFoxboron: ive had that happen to me a lot. its quite irritating.
02:01Foxboronhaha, i think it is funny.
02:01futile:|
02:01FoxboronBut i am not a really a talky person in the first place
02:01futiledepends on how valuable you think your time is compared to his
02:01TEttingertwo ( before do
02:01sinistersnarehttps://gist.github.com/sinistersnare/44e3e50bcec04237c700
02:02sinistersnarei got that
02:02sinistersnareyep
02:02futilei try to think of my time as less valuable, which helps me to really force myself to NOT bother him.
02:02futileand it always works.
02:02Foxboronfutile: depends what setting i guess. I usually sit in a bar with other people just talking about code
02:02futileok
02:03jack_rabbitsinistersnare, Weird. I'm again lost with the gen-class. gen-class is your problem. All I can do is suggest you read the gen-class docs again.
02:03zRecursive,(bit-shift-left 2 38)
02:03clojurebot549755813888
02:03sinistersnarei read it mostly; ill again
02:05TEttingergen-class and proxy might relate to each other in unexpected ways
02:06sinistersnarehow so?
02:07TEttingerhttps://kotka.de/blog/2010/02/gen-class_how_it_works_and_how_to_use_it.html I think you might just need a simpler gen-class declaration
02:07sinistersnarecan reify be used to generate a subclass of an abstract class?
02:07TEttingerIf you have two generated classes where one depends on the other, you should add also a require in the defining namespace. This resolves order issues for AOT compilation.
02:08sinistersnarei have an abstract class subclass, and an interface
02:08sinistersnareimplementation
02:09sinistersnarewait
02:09TEttingerhttp://www.deepbluelambda.org/programming/clojure/generate-your-class-and-proxy-it-too might help? I am not familiar with proxy
02:10sinistersnarei dont think i NEED to subclass it, but i do need to implement
02:10jack_rabbitsinistersnare, I'm not sure if reify can do that, but proxy can.
02:10sinistersnareso deftype can implement dynamically
02:10sinistersnarenot needing to AOT
02:10sinistersnarebut thats not really a problem of mine
02:11sinistersnareso only proxy can extend too
02:11TEttingertry removing :name cljdx.drop from :gen-class
02:12TEttingerthat's the line the error is on
02:13jack_rabbitCome to think of it, I've never EVER had to use gen-class in that way. I guess that's why I'm so unfamiliar with it's syntax.
02:13sinistersnarehmm
02:13jack_rabbitits*
02:13sinistersnarethat fixed, time for another error
02:13sinistersnarelemme try to fix this
02:13sinistersnaremore namespace problems
02:13futileWow. Seesaw is comparable to Cocoa.
02:13futileI could dig this.
02:13sinistersnare:use and :require and shit
02:13futilewhoa whoa whao, everybody just calm down
02:13TEttingerfutile, seesaw's great
02:13sinistersnarei like seesaw
02:14futilesinistersnare: can i recommend that maybe you take a little break from IRC?
02:14futilemaybe take a walk?
02:14sinistersnarei need to go to sleep
02:14jack_rabbitI tried seesaw for a bit, then I gave up.
02:14TEttingerhttps://www.youtube.com/watch?v=K7jG10UFN90
02:14jack_rabbitBut I don't like programming GUIs.
02:15futileTEttinger: make anything with it?
02:15TEttingermy current project
02:15futilejack_rabbit: you use Mac?
02:15TEttingera few other small things
02:15futileTEttinger: sweet
02:15jack_rabbitfutile, only when I have to.
02:16futilejack_rabbit: oh ok. well then you wont need Zephyros
02:16jack_rabbitObjective-C is pretty cool.
02:16futilejack_rabbit: yeah i wrote zeph in it
02:16jack_rabbitwhat is that?
02:16futileits no clojure, but not horrible either
02:16futilejack_rabbit: scriptable window mover-arounder-and-resizer-etc for mac, https://github.com/sdegutis/zephyros
02:16jack_rabbitSo it's a lisp implementation?
02:16jack_rabbitOh.
02:16jack_rabbitI see.
02:17futilethe "not horrible" comment was about objc
02:17sinistersnarelol
02:18futilehmm JTextArea, neat
02:18jack_rabbitfutile, LOL. I love the README.md.
02:18futilethx
02:18futiletrue story btw
02:18jack_rabbitlol
02:18futilei heard about it from a friend
02:18futileof a friend
02:20futilewelp, JTextArea looks not great for syntax highlighting
02:21sinistersnarenightcode uses seesaw for its gui stuff, and has syntax highlighting; not trying to plug this time, but you can look at how they do it
02:21futilei did. didnt i say earlier?
02:22futilehe uses rsyntaxtextarea
02:22futilewhich i think is possibly overkill
02:22sinistersnareohoh
02:22sinistersnaresorry
02:22futileno prob
02:22sinistersnaredidnt really realize that
02:23futileyou should take a nap
02:23futileits late
02:23futileand youve had a long day
02:23sinistersnarei do
02:23sinistersnarei need to be up in a few hours
02:23sinistersnarebut i was so determined
02:23futilemaybe a nice warm glass of milk
02:23sinistersnareto fix the damned thing
02:23futilesinistersnare: there's always tomorrow
02:23futilewhen you have a fresh mind
02:23sinistersnare:( it is tomorrow
02:23futilei mean friday
02:23sinistersnarelol
02:23futileie tomorrow
02:24sinistersnarecrap its thursday already
02:24futilegood night
02:24SegFaultAXI've never understood the appeal of warm milk by itself. Mixed with coffee or chocolate, sure. But by itself it's just so... warm and milky.
02:24sinistersnarechocolateeeee
02:24futileSegFaultAX: warm milk with honey is just like breast milk, hence the comfort
02:25SegFaultAXfutile: Don't drink much breast milk these days.
02:25futileme neither. but thats what my wife says.
02:25SegFaultAXThanks for the protip though. ;)
02:25SegFaultAXHas she done extensive research?
02:25SegFaultAXFor science...
02:25futileshe took some college
02:25futilelike, for nursing stuff
02:26futilelike, a nurse.
02:26SegFaultAXHaha
02:26futilebut not a nurse.
02:26SegFaultAXShe went to college to learn how to nurse!?
02:26SegFaultAXWhat school was this and how do I apply?
02:26callenSegFaultAX: http://michaelochurch.wordpress.com/2013/08/07/why-clojure-will-win/
02:26sinistersnarethese conversations go weird places
02:26callensinistersnare: it's pretty specific to futile.
02:27sinistersnarelol
02:27futilegood night sinistersnare
02:27SegFaultAXsinistersnare: Breastmilk is relatively tame compared to where it usually goes after you log.
02:27sinistersnare:( ok fine
02:27sinistersnarei have to go then
02:27SegFaultAXWe're waiting for you to leave, though.
02:27sinistersnareadios yall
02:28futilewhat a nice young man.
02:28futilei hope he comes back tomorrow well rested
02:29zRecursiveCan clojure do scripting things as bash ,etc. ? i feel it is difficult thing as its slow startup time
02:29noonianzRecursive: yeah, I use lein-exec: https://github.com/kumarshantanu/lein-exec
02:29jkji quess there should be a service of some sort to make scripting fast
02:29callenzRecursive: doable and inadvisable unless it's complicated and you want to reuse clojure libs.
02:29noonianits slow but does work :P
02:29callenjkj: that's called Drip.
02:30zRecursivethx
02:30futilezRecursive: it can but its not well suited for it as you noticed. lein exec makes it a little easier but im not convinced its great for it
02:30SegFaultAXJust use something specifically designed for scripting.
02:31futilei use ruby for scripts
02:31SegFaultAXI've found the mix of Clojure + Ansible to be positively refreshing.
02:31futileansible?
02:31SegFaultAXfutile: Less shit chef.
02:31tomjackis core.typed's (ann x t) pretty much the only sensible way to do type annotations? :(
02:31futileoh nice
02:31tomjackI wish I could do ^t x
02:32callenAnsible has a nice complexity scale up from "shoot things at lists of servers" to, "I need to distribute instructions to multiple clusters efficiently"
02:32tomjack`x :- t` is next on my list but it seems unlispy and tricky to desugar, plus weird if your code actually deals with the keyword :-
02:32futileim sold based onthis readme
02:32futilewe use chef + boucher at work
02:32sinistersnaresorry again
02:32sinistersnareBUT IT MOTHERFUCKING WORKS
02:32sinistersnaregoodnight
02:32SegFaultAXcallen: Good article so far. I agree with many of his sentiments.
02:33futileboucher = https://github.com/8thlight/boucher
02:33callenSegFaultAX: you'll note that he says exactly what I was saying about static type systems constraining the solution space :P
02:33callenSegFaultAX: he conveyed it more succinctly, but that's precisely what I'd been trying to tell you before.
02:34futilelately im wanting to switch back to RoR :(
02:34nooniani think it might be provable even
02:34callenfutile: why?
02:34callennoonian: what?
02:35callennoonian: that static systems constrain expressible programs to those that are decidable by the type system?
02:35noonianyes
02:35callennoonian: that the type system is decidable and allows some things and disallows others is kinda the point of any decidability proof
02:35noonian,:P
02:35clojurebot:P
02:35callenHaskell '98 being the keenest example
02:35callenbut nobody uses the decidable type system from Haskell '98, because it's too...drum roll please...
02:35callenrestrictive.
02:36callenso they play, "pimp my compiler" instead of writing code.
02:36futileoh wow, this is great: https://gist.github.com/daveray/1441520
02:36futilethanks whoever linked me to that
02:36futilelimechat doesnt support Cmd-F so its hard to find out who it was
02:36SegFaultAXcallen: I never disagreed with that. I only said that it's by choice, and that it's possible to side-step the side system by unifying all types to Uni (as in the case of most dynamically typed languages) if you want to.
02:37SegFaultAXWhich is trivially true.
02:37SegFaultAXs/side system/type system/
02:37callenSegFaultAX: it's not in Haskell '98
02:38callenSegFaultAX: if the type system is actually complete and decidable, you can't side-step it without changing the compiler (implementation)
02:38noonianmy experiences with haskell and sml cancell each other out, destructive interference
02:38jack_rabbitlol
02:39SegFaultAXcallen: If Haskell's type system was both sound /and/ complete, that might be ture.
02:39SegFaultAXTrue, even.
02:39callenHaskell '98, yes, and that's my point.
02:40callenI was talking about types, not Java.
02:40callenyou kept banging on about MAKE EVERYTHING OBJECT TYPE LEL
02:40futileWhoa. Seesaw may be my new favorites.
02:40futileCocoa used to be my favorites.
02:40SegFaultAXcallen: Okay.
02:40xpeSegFaultAX: solved: http://stackoverflow.com/a/18119161/109618
02:40futileThis is like Cocoa. Maybe not as native, sure. But screw that, I get to use Clojure!
02:41jack_rabbitnative is overrated.
02:41callenjack_rabbit: until you need it, sure.
02:41jack_rabbitAnd that's coming from someone who likes writing assembly.
02:41jack_rabbitcallen, true.
02:42tomjackwhich type systems have undecidable checking?
02:42clojurebotthat's cool
02:43jack_rabbitshut up, clojurebot.
02:43SegFaultAXtomjack: Type systems that support n-rank polymorphism > 2
02:43jack_rabbit(It's okay to be unreasonably mean to bots)
02:43SegFaultAXWhich I don't think Haskell does without some switches, IIRC.
02:44jack_rabbitYou shouldn't have to if you write your typeclasses properly.
02:44jack_rabbit:)
02:44SegFaultAXjack_rabbit: Uh. What?
02:45callenI've bumped into the limits of the Haskell compiler before, it wasn't a happy place.
02:45callenextending Clojure is a dream by comparison.
02:45jack_rabbitNo doubt.
02:46SegFaultAXWithout an extensive background in type theory (which I don't have), I imagine it's near impossible.
02:47callenthere's a non-trivial list of prereqs for comprehending type theory too.
02:47SegFaultAXI've looked at a very, very small amount of GHC's implementation and understood virtually nothing at all.
02:47callenI figured out thunks. That made sense. lol.
02:47callenstill don't like 100% lazy languages anyway.
02:47callenI'm with Okasaki - want both.
02:47tomjack"Most Haskell compilers allow arbitrary-rank polymorphism as an extension, but this makes type inference undecidable."
02:48SegFaultAXWell there's your answer.
02:48callen"most haskell compilers" I see we're pretending something other than GHC exists beyond Haskell '98
02:48jack_rabbitlol
02:49jack_rabbittype inference is overrated.
02:49callenI agreed with that until I tried out Scala
02:49tomjack("Type checking is decidable, however..")
02:50callenScala taught me the pain of a half-assed static type system.
02:50SegFaultAXYou should try Java some time.
02:50callenthe only static type system I'm likely to take seriously short of Hindley-Milner is core.typed.
02:50callenSegFaultAX: I'm told it's useless/horrible. I prefer to poke at bytecode from Clojure and otherwise keep my dick clean.
02:50jack_rabbitYou should try C some time.
02:50callenspeaking of, I need to write that proxy thing.
02:51jack_rabbit"that proxy thing"
02:52tomjackjava gives me just enough to make me try to use the types, and then I fail miserably :(
02:52SegFaultAXliberator seems so awesome in theory but damn defresource gets ugly and fast.
02:53jack_rabbittomjack, is there a way to use Java without using types?
02:53xpejack_rabbit: Clojure
02:54xpehaha
02:54callenjack_rabbit: you know Clojure right?
02:54tomjackI mean to.. express interesting things with the types
02:54callentomjack: trying to make the type system do something useful? Good luck.
02:55SegFaultAXcallen: WRT the previous discussion, I think you fundamentally don't understand my argument if you think I was "talking about Java". It's unfortunate considering how much time we've wasted in aggregate on the subject.
02:56callenSegFaultAX: the kind of uni-typed implementation you referred to wasn't about the type system and was an artifact of the Object abuse the Java ecosystem engages in.
02:56jack_rabbitxpe, callen, Clojure is definitely not Java.
02:56jack_rabbitIt just runs on the JVM.
02:56SegFaultAXcallen: It has nothing at all to do with Java.
02:56jack_rabbitSegFaultAX, indeed.
02:56xpewhat is happening right now?
02:56SegFaultAXjack_rabbit: You're missing a significant amount of context.
02:57callenin the abstract yes, but that you think it somehow has something to do with the type system is an artifact of your experience.
02:57SegFaultAXjack_rabbit: 5+ hours worth of discussion.
02:57callenat *LEAST* 5 hours.
02:57callenhaha, dead horse. Liquified :)
02:57jack_rabbitindeed.
02:57callenSegFaultAX: apologies. Congrats btw. :)
02:59futileOkay, a Clojure text editor it is.
02:59futileIn seesaw.
02:59SegFaultAXFor?
02:59clojurebotfor is not a loop
02:59callenSegFaultAX: to make an apple pie from scratch, futile has to first create the universe.
03:00SegFaultAXcallen: That was to you. Congrats for?
03:00SegFaultAXMy engagement?
03:00TEttingerfutile: make it handle multimarkdown and you can sell it to compete with the load of commercial non-cross-playform multimarkdown editors
03:00callenSegFaultAX: yes, your engagement.
03:00futileTEttinger: uhhh
03:00SegFaultAXThanks.
03:00callenSegFaultAX: I wasn't going to name it in public unless you did so first.
03:01callenSegFaultAX: pass my congrats to the lucky lady. :)
03:02futileTEttinger: wat?
03:02SegFaultAXcallen: I'll let Chelsea know.
03:03callendanke
03:04TEttingerfutile, multimarkdown is a superset of markdown, there's a bunch of mac-only specialized editors for it and most are commercial
03:04futileTEttinger: oh. well i dont use markdown as much as i use clojure, so..
03:04futile:)
03:04TEttingerif your text editor could also render MMD to HTML and used swing, it would work everywhere
03:04futileTEttinger: who are you?
03:05TEttingereh?
03:05SegFaultAXcallen: Anyway, the conversation was never about type systems for the same of discussing type systems. The original thesis was that dynamic type systems are a subset of statically typed systems, and that can be trivially a practically proven.
03:05futileTEttinger: oh sorry thats a weird question to ask
03:05futilei have a knack for asking weird questions by accident
03:05futileyour name sounds familiar
03:05callenSegFaultAX: we just got done discussing how the opposite is true. I don't know how you can believe that.
03:05TEttingerfutile, I've been here before
03:06TEttingeralso on some channels on quakenet for game dev
03:06futileoh maybe the mailing list
03:07SegFaultAXcallen: Is it the volume of code to do it that's the issue?
03:08SegFaultAXcallen: Name a feature for example that couldn't be implemented in a static type system, provided I unify all the run time types to a tagged union.
03:08callenSegFaultAX: no, it's just a misapprehension of type systems to use turing completeness to implement a different system outside of that type system.
03:08SegFaultAXcallen: Ah right. So the issue is the fact that I essentially have to bypass the static type system (as above)?
03:09callenbypassing it means precisely that we're talking about a different, independent type system
03:09callenyou've left one world and joined another.
03:09callenthe implications of that are unbounded and could mean anything.
03:10SegFaultAXcallen: I see your point, although it isn't clear that the distinction is always hugely valid, especially if the type systems can freely interoperate.
03:10callenit's totally valid and if you assert differently you will confuse any conversation intended to be about type systems.
03:11callenthe best example to demonstrate my point I can come up with is a raw brainfuck interpreter implemented in haskell.
03:11SegFaultAXcallen: It'd still be a valid program in XYZ-static language, I just wouldn't be able to statically verify the correctness of the program.
03:11callenthe code executed in the brainfucker interpreter has nothing to do with haskell's type system anymore.
03:11callenif that doesn't get the point across, then I am at a loss.
03:11SegFaultAXWell, BF is untyped so that's a tricky example.
03:11callenit really doesn't matter
03:12callenas I said, the implications of implementing something else could mean anything
03:12callencould be a stronger type system, could be a weaker one, could be an untyped one
03:12SegFaultAXBut I'm not really talking about type systems, for the 100th time.
03:12callenbut the behavior of the new system reflects nothing at all upon the previous type system.
03:12callenbut you are, you're talking about static vs. dyanmic
03:12SegFaultAXNot vs.
03:12callenstatic constrains the solution space to what it can understand.
03:12SegFaultAXIt isn't one vs the other.
03:13callenyou have a wider solution space for a given problem in a dynamic type system than you do in a static one.
03:13SegFaultAXI'm saying that a static type system can trivially implement a dynamic type system. That's it.
03:13callenattempts to deal with those constraints end up compromising the static type system more often than not.
03:13SegFaultAXI'm not comparing the merits of one to the other or anything.
03:13callenthat's nothing to do with a type system
03:13callenat all
03:13callena static type system can't "implement" anything.
03:13SegFaultAXI never was.
03:13callenit's an immutable thing
03:13callenyou're talking about a property of turing completeness.
03:14callenthat you can implement a *different* language flows from turing completeness
03:14callenit has NOTHING to do with the originating type system.
03:15callena type system is a property of a fixed, immutable implementation
03:15callenimplementing a different language using that language leaves the semantics of that system and you are now talking about a complete different, de novo type system.
03:15SegFaultAXI never said otherwise.
03:16callenyou're conflating type systems with programming.
03:16futilehttps://github.com/seliopou/typo
03:16callenstatic type systems have a more constrained mathematical space of expressible "things" than dynamic type systems.
03:16callenthat's...the whole point of them.
03:17callenif the type system didn't constrain the expressible programs to what it understood it would be useless.
03:17SegFaultAXHmm, perhaps my original arguments wasn't well phrased.
03:18SegFaultAXMaybe: "there isn't a clear boudnary between static and dynamic languages"
03:19callenbut there is.
03:19callenwell
03:19callennow we're talking about languages, and we're potentially including undecidable type systems.
03:19callenturing complete type systems happen to be undecidable.
03:20callenusing them to prove static languages somehow "cover" a dynamic expression space is equally senseless and besides the point of type systems.
03:20callenwhich really just gets back to what I said about turing completeness.
03:21SegFaultAXTuring completeness makes it hard to visualize the real separation between these paradigms.
03:21callendoesn't have to be, Haskell 98's type system makes the matter very clear.
03:22callenmaintains a strict separation between "turing complete programming language" and "type system allows a set of expressible programs, and is a subset of those expressible by an untyped language"
03:22callenyou do yourself a disservice by muddling your understanding of the concepts at hand with frankly poorly thought out implementations.
03:22tomjackwhat is the equivalence relation on programs
03:23futilewat
03:23SegFaultAXI only use the implementations as examples.
03:25futileI... I think I can do this!
03:25tomjackbisimilarity or something?
03:25futileThe last time I tried, it was 4 years ago and I was just learning programming and the languages I had weren't very good. But now I'm qualified do this
03:25futile!
03:25callentomjack: bisimilarity isn't strict enough.
03:25callentomjack: you'd have to match and constraint semantics to the intersecting set realistically
03:26callenthis is something you'd do by vague gestures outside of Coq and Agda.
03:26callenit's doable in a very rough and homespun sense though.
03:26callenconstrain*
03:26callenwell
03:26callenmaybe bisimilarity would be enough.
03:27callentomjack: bisimilarity across partial programs for all possible inputs with patching non-total behavior I think might be sufficient.
03:27tomjackI don't get it at all
03:28callenmatching*
03:29callentomjack: the problem is that bisimilarity would still just be talking about input and output.
03:29tomjackyeah
03:29tomjackI don't see what else to talk about
03:29callentomjack: the point of saying that static type systems are more constrained is to say that given a bisimilar program, you can skin the cat in more ways with a dynamic lang than a static one.
03:30tomjackpresumably there are infinitely many ways in either language
03:30mpenetTimMc: Do you think the query validation issue is really a big deal? I am thinking about this, and what it would take to make it more safe. Also comparing to other libs like this (honeysql for instance), lack of safety is quite common in this area, not that is should be the default.
03:30tomjack?
03:31tomjackor do you quotient something out to make it not infinite
03:31callenit's not infinite
03:32callenit's provably finite in both cases.
03:32callenthat's how you can say static is a subset.
03:33tomjackso like (... (fn [x] ((fn [x] ((fn [x] x) x)) x)) ...) counts as just (fn [x] x)
03:33callendoesn't.
03:33callenI mean they're bisimilar
03:33callenbut they're different "expressions" of the same thing
03:35tomjackI'm not following - I can trivially construct countably infinitely many such expressions of identity. but you say both "provably finite" and "doesn't"
03:35SegFaultAXCountably infinitely?
03:36SegFaultAX:)
03:36tomjackyes?
03:36clojurebotyes isn't is
03:37callentomjack: a static type system can reject a program.
03:37SegFaultAXcallen: I'm still struggling with your argument. The more I learn the more it seems invalid, but I'm not sure how to formulate why.
03:37tomjackseems to me a program which doesn't typecheck isn't a program at all
03:37callenSegFaultAX: tomjack and I are talking about something else.
03:38SegFaultAXcallen: I know. I'm referring to our previous discussion.
03:38callenSegFaultAX: you have a fundamental misapprehension of the subject matter.
03:38callenI don't know else to explain n > n -1 in new terms.
03:39SegFaultAXcallen: Perhaps I do, and I'm ok with that. I didn't study type theory in school as its own discipline so all of those I'm learning myself.
03:40SegFaultAXAll of this, even.
03:43tomjackwhen I first saw something about a static type system constraining the set of expressible programs, it seemed to make sense to me, but now it just seems like gibberish :(
03:45tomjackmaybe it's just semantic satiation
03:45SegFaultAXMy argument is essentially that to build a dynamic type system, I can trivially start with a static type system and discard a lot of stuff (which is relatively simple by comparison). Going the other direction, there is a positively overwhelming amount of stuff I'd need to implement to get even a basic static type system going from a dynamic one.
03:45SegFaultAXThat's an oversimplification of my original argument, but that's about the gist of it.
03:46SegFaultAXIn other words, from Static -> Dynamic, I just throw away a bunch of the stuff that makes static awesome. Dynamic -> Static is purely additive and significantly more work.
03:46SegFaultAXThey are equivalent due to turing completeness, however.
03:47SegFaultAXWhich is why I said that dynamic languages are essentially a subset of static languages. And that fact seems trivially obvious *to me*
03:47clgvSegFaultAX: for adding an optional type system to a dynamic language have a look at core.typed ;)
03:47SegFaultAXclgv: We're not talking about specific implementations.
03:48clgvSegFaultAX: well you might find general ideas in there...
03:48SegFaultAXclgv: Still not talking about implementation details.
03:49SegFaultAXclgv: We're discussing static :> dynamic
03:50callenSegFaultAX: static constrains the solution space in ways dynamic does that. That means a set of expressible programs in a given static type system will countably less than the set of expressible programs in the dynamic type system.
03:50callenin ways dynamic does not*
03:50SegFaultAXcallen: Sure, because that's useful to a programmer. But I can also discard those static checks if I choose to. I'm tired of saying this over and over.
03:51tomjackcountably less?
03:51Raynesdefprotocol Countably)
03:51SegFaultAXRaynes: Ahoy!
03:51RaynesArrrrr matey.
03:52tomjacki.e. there are uncountably many expressible programs in a dynamic language? O_o
03:52callentomjack: no
03:52SegFaultAXtomjack: Not quite.
03:52tomjackoh, silly me
03:52SegFaultAXtomjack: But that there are necessarily fewer in static languages than dynamic (according to callen)
03:52tomjackI forgot a subset can have the same cardinality as its superset
03:53SegFaultAXIn this case it's a strict subset if the static system is sound.
03:53tomjack"fewer" seems confusing then
03:53SegFaultAXWell it is fewer if we're talking about a sound type system like eg Haskell's.
03:54tomjack"fewer" means there is an injection but no surjection, right?
03:56Raynesdanielszmulewicz: How I feel about the ClojureScript formula you're adding to Homebrew and their acceptance of it: http://www.youtube.com/watch?v=XvqgU7DPxhs
03:56tomjackI mean if there are countably many ways to write identity in clojure, and countably many in haskell, whence "fewer"? where is my misunderstanding?
03:57tomjackprobably identity is a bad example :)
03:57SegFaultAXtomjack: Haskell rejects all formulations that are not sound.
03:58tomjackso the idea is something like we set up a bijection between syntactically (but not necessarily semantically) valid haskell programs and clojure programs, and then the typechecker knocks out some on the haskell side?
03:59tomjackit would seem to still be an open question whether there is a bijection between what's left
04:00SegFaultAXtomjack: How can there by any dispute?
04:01callenSegFaultAX: Java's type system rejects things too.
04:01RaynesI'm just gonna go watch American Psycho in the fetal position now.
04:01callenthings that would fly in a dynamic type system.
04:01callenRaynes: you might want your 'chi' to be in a better state before watching it :P
04:01tomjackSegFaultAX: hilbert's hotel?
04:03SegFaultAXcallen: Yes? Ok?
04:03callenokay, here's a thought experiment
04:03callenadd an arbitrary limitation. like a byte limit to the programs
04:03callenso that we're not talking about an infinite set
04:04callenwithin a given kb of code, a static type system will reject programs that would've flown in a dynamic type system (that being the POINT of a static type system)
04:04callenmaking the possible expressible programs within that type system constrained relative to the dynamic type system.
04:05tomjackwithout infinities, I'm back to just being baffled by the implicit equivalence relation between static and dynamic programs :(
04:06callentomjack: but at least the things we have to think about is more focused.
04:06callenlets shift to something even more focused, a contrivance.
04:06SegFaultAXTerrible thought experiment, but I get your point.
04:07callenlets imagine expressible programs A, B, and C in a given type system. We have two otherwise identical variants of the type system, one that is static and one that is dynamic.
04:07callenA is a valid program and passes the type checker, B is a valid program and doesn't pass the type checker, C is an invalid program and doesn't pass the type checker.
04:08SegFaultAXType systems don't implement things, remember?
04:08callenA, B, and C are all potentially valid within the constraints of the type system.
04:08callenSegFaultAX: I said contrived and I'm still talking about expressible semantics within the confines of the type system.
04:08SegFaultAXA sound type system I guess.
04:08callenI qualified what I was about to say with "contrivance" before I'd said a word about it.
04:09callenyou can add program D for an unsound type system if you like. you get my point.
04:09SegFaultAXWe could just as easily go to the other end of the spectrum and built a complete type system.
04:09klrrpolymorphism.... what is clojure's protocols? are they similar to haskells' type classes?
04:10SegFaultAXklrr: Protocols have been likened to dynamic type classes, but I wouldn't really think of them that way in general.
04:10callenthe trade-off of a static type system is that you sacrifice some potentially valid expression space in order to constrain your type-check-okay expression space to things that are valid within the type system
04:10callenIN THE HOPES OF
04:10callenproducing programs that are correct
04:10callenbut not necessarily.
04:10callentype systems are expressly about validity within that system
04:10callenbut these are the practical tradeoffs and implications thereof.
04:10SegFaultAXUnless the system is complete, and allows all valid programs.
04:10SegFaultAXEven if they can't be type checked.
04:11callenuhm, that's not possible.
04:11SegFaultAXNot possible or not practical?
04:11callenthat's getting into Godel territory.
04:11SegFaultAXIt most definitely is possible.
04:11klrrokey, are protocols uniqe to clojure compared to other lisps like scheme, cl and hy?
04:12callena sound type system cannot express all valid expressible programs.
04:12SegFaultAXBut a complete one can, by definition.
04:12SegFaultAXDynamic systems are neither complete nor sound (at compile time)
04:13klrrhaskells type system is turing complete
04:13RaynesThanks.
04:13SegFaultAXHaha
04:14callenklrr: haskell 98 is not, it requires extensions to be turing complete.
04:14tomjackI have trouble separating the point behind the program-size limitation out from seemingly irrelevant concerns like "you have to waste space on type annotations"
04:14tomjackI think I kind of vaguely begin to see it though
04:14klrrRaynes: are you that famous dude who got money to go to some clojure conf ? =o
04:14SegFaultAXtomjack: It was a horrible experiment.
04:14klrrokey
04:14callentomjack: I'm really just happy that I'm making progress with you.
04:14callenSegFaultAX: honestly it's a trivial point to make if you've done haskell before.
04:14RaynesThe fact that you know who I am confirms that, klrr. :p
04:14callenSegFaultAX: another good way to illustrate the point is a static type system that enforces total programming.
04:15klrrif you guys are interested in type systems you should check out agda btw :) it got really cool type wystem
04:15RaynesI like the Coq.
04:15callenklrr: I mentioned Coq and Agda earlier while explaining something.
04:15tomjackin that case it makes perfect sense to me to say that there are programs which aren't expressible
04:16klrrokey, alsa clojures optional static typing does it provide extra safety or only better performance?
04:16SegFaultAXtomjack: The type system is merely a tool. You can choose to not participate in it if you don't need it.
04:16callenyes but when you do that, you're not creating things that reflect upon that type system.
04:16callenwhich goes back to what I said about participation within type systems
04:17RaynesClojure doesn't have optional static typing.
04:17callenand brainfuck interpreters in haskell 98
04:17RaynesYou might be confused with Racket.
04:17Ember-there's work on typed clojure
04:17RaynesOr perhaps heard about Typed Clojure, which is a third party and generally incomplete project.
04:17Ember-I think I heard it had been accepted as part of core development some time back?
04:17RaynesA contrib project.
04:17Ember-humm, I might remember wrong
04:17SegFaultAXcallen: I don't get how that's a counter argument when my argument all along has been "you can choose not to use the type system"
04:18twem2core.typed?
04:18clojurebotcore is what you put in a namespace when you can't think of a better way to avoid single-segment namespaces.
04:18SegFaultAXBy unifying blah blah
04:18Ember-twem2: that one
04:18callenbecause you were acting as if the sentiment somehow disproved what I was saying about static being a subset of dynamic in expression space.
04:18SegFaultAXIt's almost like a re-affirmation.
04:18tomjackdoes seem kind of confusing that a bunch of contrib projects have "core" in the name..
04:19callenI was the one, in these long conversations, that originally reified and made the point about type system participation in order to explain what I was trying to tell you.
04:19callenand spent hours doing so
04:19callenbut school's out bitches. learn type systems on your own time. I'm back to fucking with JVM bytecode.
04:19klrri wanna learn clojure after ive become better at haskell :)
04:19callenklrr: learn both, be a better person.
04:20SegFaultAXcallen: School was never in. You're not an authority on this topic, so please don't pretend to be.
04:20klrrdo i need to learn java first?
04:20callenklrr: no
04:20callenI don't know shit about Java.
04:20tomjackwell, I was here to learn :) thanks
04:21klrri already know the basic haskell, currently learning about FRP, arrows, lenses and pipes
04:21SegFaultAXklrr: Mostly irrelevant in Clojure.
04:22klrrdoes FRP exist in cljoure, are there any non-leaking, aignal is first class citizen imolementations?
04:22klrrsignal*
04:22tomjackno.
04:23SegFaultAXklrr: Does it exist in Clojure is a strange question. Most languages aren't specifically designed with FRP in mind.
04:23callenhttp://www.youtube.com/watch?v=RwXn6bBx5KI
04:23klrrthere's none? then i have to port elerea to clojure when im learninh clojure :P
04:24callenc2 is actually a decent resource on this subject, although dated in some places.
04:24tomjackI haven't seen any FRP attempts which are F
04:25tomjackmuch less any other potentially desirable attributes
04:25klrri dont get why it wouldnt be possivle in clojure? also i only know one öanguage thtat is built with FRP in mind
04:25piranhatomjack: javelin?
04:25callenjavelin is unfortunately named.
04:25callensince there was already a JavelinJS
04:25piranhayeah
04:25tomjackjavelin is just RP, by my (and I suspect klrr's) definition
04:25fredyrRxJava perhaps also?
04:26piranhatomjack: why not F?
04:26tomjackuhh
04:26klrrive only read three papers on FRP and there is like hundred so im no expert :P
04:27tomjackI think the readme for javelin sets it out pretty well
04:27klrrlink?
04:27clojurebotunlink: and constantly is just a function that takes any arguments and returns whatever argument is given
04:27Raynesklrr: Are you intoxicated by chance?
04:27piranhaklrr: https://github.com/tailrecursion/javelin
04:27klrrwhats that?
04:27tomjack"Cells are similar to Clojure atoms: they contain values, they can be dereferenced with deref or the @ reader macro, and their contents are mutated using the swap! and reset! core functions."
04:27tomjackif that doesn't mean "not F" I don't know what "F" means
04:28klrrRaynes: wot
04:29Raynesklrr: You're typoing in unpredictable and strange ways that are usually indicative of a drunk person.
04:29klrrok, javalin seems a bit like original FRAN, the latest FRP impl. is much better IMO, leakless firs classs signal impl.
04:29klrrim using my phone
04:29klrrthats why
04:29RaynesOh, that'll do it.
04:29RaynesSorry for accusing you of being drunk. <3
04:30klrrim not allowed to get drunk yet xD
04:30tomjackI never looked at FRAN but I'm pretty sure it deserved the F
04:30klrrF?
04:30Raynesklrr: Never stopped me.
04:31klrrmilk is fine for me
04:31tomjack"functional" - I don't think conal would have called it that if it wasn't that
04:31klrrok
04:32Raynesklrr: I assume 'not allowed to get drunk yet' means under the age of 21, and the fact that you're admitting it indicates under the age of 18. How old are you, sir?
04:32klrrwell, elerea is best atm IMO, although ive ported many combinators from Elm to hasnell to make it more useful
04:32klrrim not saying my age its personal info
04:33Raynes14, got it.
04:33tomjackI see in the elerea paper "maintain referential transparency"
04:33tomjackhadn't seen elerea before, but that is enough to make me want to investigate more
04:33Foxborongood morning klrr
04:33klrrmorning
04:33tomjackthe idea that FRP is about spreadsheets or behaviors are "managed references" completely baffles me
04:34FoxboronRaynes: klrr is in the same boat as you. Learning haskell before he is 16.
04:34RaynesWho knows. That's personal info. ;)
04:34Foxboron:3
04:34FoxboronRaynes: not according to yer blog.
04:34clojurebotmake a note of http://scienceblogs.com/goodmath/2006/11/the_c_is_efficient_language_fa.php it is yet another article about picking c or c++ for performance being naive
04:34callenklrr: the best advice you'll ever get is "just code"
04:35callenklrr: so uh...just code.
04:35RaynesFoxboron: I meant the assumption that he is learnign Haskell before 16.
04:35RaynesI'm making wild assumptions about his age.
04:35klrrtomjack: fran papaer explains it kinda badly imo, i look at elm langs explaination
04:35FoxboronRaynes: i know him :3 One of your blog posts inspired him actually ^^
04:35Foxboron(inb4 klrr gets mad at me <3)
04:36RaynesAh, excellent.
04:36klrrnope
04:36RaynesIn all seriousness.
04:36callenFoxboron: klrr do either of you have a github?
04:36tomjackhmm
04:36klrrnot mad :P only at myself for that stupid pong game but ill rwerite the bad stuff today
04:36tomjacknewtype Stream a = S (IO a)
04:36tomjack????
04:37klrri removed my stuff from fithub anyway
04:37Foxboroncallen: Yes. Same as my nick :)
04:37klrrmight come up a pong game soon though:P
04:37Raynesklrr: I apologize for being silly. It takes my breath away that I could ever have contributed to the inspiration of someone else with the things I've done. You're a rockstar already.
04:38FoxboronRaynes: He is a veryvery bright kid. But he will attempt to deny that :)
04:39klrrFoxboron showed your blog to me after ive started learn haskell since a fuy tehnix knew a website with slides and learninh clojure is mostly since foxboron knows it and rick hickey presentations is cool
04:39callenFoxboron: you get to vote. Do I implement Rack::attack for Ring/Clojure or do I implement proxy+ with annotation support?
04:39callenRaynes: I want your vote too.
04:39klrralthough your blog postvwas little insiring i got to admit
04:40Foxboroncallen: Uhhhhh. I am not profficient enough in Clojure to say that
04:40Raynescallen: The former because I can use it.
04:40Raynescallen: Write it and then add it to refheap's API for example purposes and… testing… and stuff.
04:40callenRaynes: you'll like what I have in mind for this.
04:40RaynesI just want you to do free work for me.
04:41callenRaynes: I'm just racking up github points bro.
04:41callenRaynes: I hear I can use them to get...things.
04:41RaynesLike global mutable state!
04:41Raynes~rimshot
04:41clojurebotBadum, *tish*
04:41callendo ho ho
04:42callenRaynes: probably won't need process-scope global mutable state.
04:42callen...maybe.
04:42RaynesFoxboron: Badass that he is learning Haskell. I think it's a good choice. If I had to do it all over again I'd still start with Haskell because it made far more sense than any object oriented language I used.
04:42callenprobably.
04:42callenFoxboron: I learned Haskell long long after I'd learned many other programming languages. I don't use it anymore but it's always there in the back of my head informing my thoughts and providing structure.
04:42calleneven though I don't actually have a use for most static type systems, Haskell's included.
04:43RaynesI'm going to go actually watch American Psycho now, since it's 1:30AM.
04:43FoxboronRaynes: Found him in #programmers frustrated to not being able to learn anything. So i invited him over too a IRC with some programming friends to give him inspiration, help and mentoring ^^
04:43callenI didn't know #programmers was a thing.
04:43RaynesFoxboron: You're a scholar and a gentleman.
04:43Foxboroncallen: i do not know haskell :P Got other people with those skills :3
04:43RaynesFoxboron: We shall discuss this further at a later instant.
04:43callenI originally came here years and years and years ago because a lot of EFnet ##C people moved over.
04:44FoxboronRaynes: I have just moved into an apartment and going to catch breakfast anyway. Kebab on the menu.
04:45callennow I'm hungry.
04:46Foxboroncallen: got an apartment in the middle of the town. First time in my life that a kebab store is closer then the groccerystore o.o
04:47callennice.
04:47callenI'm making plans to move to SF.
04:47Foxboroncallen: well, i live in Norway :3
04:48callenevery Norwegian person I've met in the US has been sad to return home.
04:48callenI think it's the weather.
04:48FoxboronI live in Bergen. Most rainy town in Norway
04:49FoxboronI'd like to visit SF tho. Would be awsome.
04:50callenmaking the most of a visit to SF requires planning though.
04:50Foxboronpft
04:50gko_But isn't Norway the happiest country?
04:50FoxboronImprovising.
04:50gko_http://www.forbes.com/pictures/mef45ejmi/01-norway/
04:50Foxborongko_, happiest? I don't know. Wealthiest? Sure.
04:51gko_How much is a coffee in your place?
04:51FoxboronI don't drink coffee
04:51FoxboronYeah. Forbed believe GDP == Happiness
04:51Foxboronforbes*
04:51callenGDP actually == oil in Norway's case
04:52FoxboronOur only export is Oil and wepons
04:52Foxboronand fish
04:52Foxboronbut that is a minor export considering the other two
05:37noidicemerick, thanks a lot for austin, it works very well!
05:37noidiit seems to be much more robust than the original browser repl
05:39cemericknoidi: thanks for the contributions :-)
05:39cemerickBut, yeah, that's the point :-)
05:40cemerickThere's a number of other corners that can be further cleaned up to simplify the thing and make its failure conditions less common / mysterious
05:41noidiI should write a little blog post about how to use Austin with Counterclockwise. CCW doesn't start its REPL via Leiningen so the middleware approach doesn't work there.
05:42noidiI worked around it by setting up a cljs-repl profile, which sets up Austin in its user.clj: https://www.refheap.com/17379
05:43noidiI then start an NREPL with the Austin middleware using `lein with-profile +cljs-repl repl :headless :port 9998`
05:43cemericknoidi: well, you must end up using the piggieback middleware at some point?
05:44noidi(I have the alias `cljs-repl` for that in my project.clj)
05:44clgvnoidi: I think laurent wants to devote some love to the leiningen integration next (i.e. after the current tasks are finished)
05:45maleschcemerick: as I just see you online, can I ask a short question regarding friend and oauth2 integration (ddellacosta/friend-oauth2)?
05:45noidiso my workflow is: (1) run `lein cljs-repl` in the shell (2) choose Connect to REPL -> localhost:9998 in CCW, (3) run `(cljs-repl)` in the CCW REPL window that opens up
05:45noncomi need to have objects with some mutable fields... what is the best way for that in Clojure? I suppose a defrecord with atom fields would be idiomatic?
05:46noidiand of course (4) reload the browser window :)
05:46cemerickmalesch: shoot
05:47cemericknoidi: part of that must be your external HTTP server, though...you *are* running leiningen, so if everything was integrated, the profile wouldn't get you much.
05:47maleschcemerick: making my first friend/oauth steps...google recommends oauth2 token validation. friend-oauth seems not to support this. if not in the workflow directly where can this be done? I thought of the credential-fn but I think I cannot specifically override this in the friend-oauth workflow.
05:48cemerickmalesch: you'll have to ask ddellacosta when he gets in; I know ~nothing about oauth :-)
05:48callenmalesch: I've implemented OAuth2 providers and clients in multiple languages.
05:48callenbut not with Friend.
05:48noidicemerick, the only reason I run my HTTP server in a separate process, is that all the fancy CCW features like autocompletion only work for a REPL started from CCW
05:49noidiand as Austin only works in a REPL started from Leiningen, I need to use separate REPLs for the server and the CLJS RPEL :/
05:49cemericknoidi: not so :-) Just add the ccw server-side utils dep to your project.clj: https://clojars.org/ccw/ccw.server
05:49cemerickor, user profile, more likely
05:50maleschcemerick: thanks will catch him :)
05:50maleschcallen: is token validation only an issue with google or done with all providers?
05:51noidicemerick, wow, thanks so much! wish I had known about this sooner!
05:51cemericknoidi: I started work on austin while using CCW, so the separate REPLs aren't necessary. Just clone your first (Clojure) session, then turn the clone into your cljs repl.
05:51noidioh, all that sweet middleware I can finally use :')
05:52noidiwhat do you mean by cloning?
05:52callenmalesch: Google's implementation is relatively vanilla. Are you referring to the access_token or something else?
05:52callenmalesch: publicly accessible OAuth2 APIs are generally tripod-only authorization.
05:52callenI've used tripod authorization and "known entity" authentication that doesn't use the tripod.
05:53callenmalesch: the RFC for OAuth2 is pretty readable and provides a good sense of "base state" for how most OAuth2 APIs end up looking. The problem is that it's a framework and not a protocol and the provider is free to fuck you over in whatever manner amuses them most above and beyond the RFC.
05:55callensome providers behave themselves. Any I've implemented and used have been very close to the RFC.
05:55maleschcallen: thanks :) will check it
05:56callenmalesch: http://tools.ietf.org/html/rfc6749
05:57maleschcallen: gracias!
05:57cemericknoidi: all proper nREPL clients should allow you to clone (take a copy of) an open session. An easy way to get a new environment open to the nREPL server without creating a new connection, and retaining any dynamic var state that you had set up in the original session.
05:57cemericknoidi: there's a button for it in the ccw nREPL window
05:59noidicemerick, this is so cool. I feel like Clojure tooling leaped 2 years forward in a couple of seconds.
05:59noidinow my only question is: why is ccw.server such a well-kept secret?! :)
06:00noidiI have to bug Laurent to mention it somewhere in the docs
06:03dark_elementcemerick, I figured out how to print out browser connection state in repl. All I have to do is create a custom cljs repl. https://www.refheap.com/17381
06:04cemerickdark_element: cool! You're now more of an expert in the cljs repl client side than I am :-)
06:06dark_elementcemerick, you are too kind good sir. I just added one line to connect fn.
06:07dark_elementcemerick, interestingly even though i get "Browser connected" in repl. There are states where repl still prints exceptions.
06:08dark_elementcemerick, I am guessing it's the timeout duration where repl server still is expecting connection from closed browser window.
06:15cemerickdark_element: do you have a stack trace or similar?
06:16dark_elementcemerick, wait i'll try to generate it again.
06:19supersymdark_element: sweet
06:32dark_elementcemerick, comments show context (repl/browser/terminal) https://www.refheap.com/17382
06:32cemerickwow
06:33cemerickdark_element: ok, so the second evaluation is being sent prior to the browser re-connecting?
06:33cemerickor. finishing reconnecting?
06:34cemerickdark_element: the threaddeath error on interrupt is expected (see end of this section: https://github.com/cemerick/piggieback#rhino-clojurescript-environment-default)
06:34dark_elementcemerick second evaluation is sent after "Browser connected." is printed again which is sent from the js on that page.
06:35dark_elementcemerick, ahh almost forgot about that.
06:36cemerickdark_element: the second evaluation happens on line 9, but "Browser connected." appears on line 67?
06:37cemerickthe error shouldn't occur (that's what the queue is for), but I just want to make sure I understand the sequence of actions
06:37dark_elementcemerick ohh i ma sorry i was referring to the third one line #68
06:37dark_elementam*
06:39dark_elementcemerick I am ok with evaluation on #9 failing since that browser window does not exist anymore. But evaluation on line #68 should run on the newly opened browser window right?
06:40cemerickdark_element: all the evaluations should succeed; pending evaluations go into a queue, and should be picked up by the next browser(s) that connect
06:45dark_elementcemerick, Is this handled by piggieback or cljs.browser.repl?
06:45noidicemerick, is it OK to reuse a repl-env after :cljs/quit?
06:45noidiI get a NullPointerException from Austin when I try to do that
06:46noidiin my user.clj I create a repl-env, swap! it into browser-repl-env, and store it in a defonce
06:46noidiwhen I first do a (cljs-repl repl-env), it works fine
06:46noidibut if I :cljs/quit and re-open the REPL with (cljs-repl repl-env) I get a NullPointerException
06:47cemericknoidi: nope, :cljs/quit drops the session
06:47cemerickdark_element: nREPL, actually
06:47cemerickeach evaluation on a session goes into a queue
06:48noidicemerick, OK, thanks
06:49cemerickdark_element: the promise created in `open-exchange` in austin then blocks a cljs evaluation until the browser channel connects https://github.com/cemerick/austin/blob/master/src/clj/cemerick/austin.clj#L110
06:51noidicemerick, to me the use of `def` suggests that an env is something meant to be reused https://github.com/cemerick/austin/blame/master/browser-connected-repl-sample/README.md#L35
06:51noidimaybe change that to a `let` around the `cljs-repl` call?
06:51dark_elementcemerick, I was not using austin for the stacktrace i sent earlier.
06:52cemerickdark_element: oh, ok; well, I can't really help with classic browser-REPL stuff :-)
06:52dark_elementcemerick, I was using piggieback :)
06:54dark_elementcemerick, I thought this was handled at piggieback and austin is just routing repl connections to different repl servers.
06:54cemerickdark_element: sure, but the connection (or lack thereof) stuff is related to the browser-repl implementation
06:55cemerickdark_element: piggieback just patches over the parts of ClojureScript that assume it's running in a terminal. It delegates evaluation entirely to the REPL environment you're using.
06:56dark_elementcemerick all right let go back to austin again then.
06:57cemericknoidi: you're right that other REPL envs *can* be reused. That can probably be classified as a bug, though I'll have to figure out some other way to expire the corresponding sessions.
06:57cemericka finalizer on the record type, maybe
07:07Anderkent$findfn ({:a 1} {:b 2} {:c 3}) {:a 1 :b 2 :c 3}
07:07lazybot[]
07:07Anderkent$findfn {:a 1} {:b 2} {:c 3} {:a 1 :b 2 :c 3}
07:08lazybot[clojure.set/union clojure.core/conj clojure.core/merge]
07:25ciphergothIf I wanted to implement something like a task queue with an atom, AFAICT there's no easy way to do it, because it's hard to implement atomically popping a task from the queue
07:26ciphergothsince swap just returns the new value; it's not easy for my function to return both the popped task and the new queue
07:28ciphergothShould I just implement the enhanced swap I need with compare-and-set! and a loop?
07:28ciphergothOr use a ref?
07:29ciphergothOr have a "most recently popped task" field in the atom that I can read from the return value from swap?
07:29danielszmulewiczcemerick: Is it possible to use piggyback and cljsbuild together? Any chance to see an example config (project.clj)?
07:40noidiciphergoth, you could use a PersistentQueue ( http://stackoverflow.com/a/2495105/13340 ) in a ref, then in a single transaction `peek` the next task and then update the queue with `pop`
08:00ciphergothnoidi: that would work if what I was implementing was exactly a task queue, but unfortunately it's a slightly more complex data structure
08:00ciphergothnoidi: I was just looking for a simple example of a concurrent data structure that needs a simultaneous-update-and-return-value operation
08:39ronen_hi guys. can anyone please help me with emacs? I am trying to follow the tutorial on the clojure-doc site, but I can't figure out how to run the tests
08:40ronen_they say I should run C-c C-
08:40ronen_which emacs says in unknown
08:40jcsimsC-c C-,
08:40jcsimsis that what you're running?
08:41ronen_rr i didn't notice the comma
08:41ronen_thank you!
08:41jcsimssure
08:42ronen_would you happen to know what it means if it says ClassNotFoundException: clojure.test.mode ?
08:43jcsimsnot off the top of my head - you compiled the test file with C-c C-k?
08:44noidiciphergoth, can't you follow PersistentQueue's example and have the analogues of separate peek/pop operations? one to get the task and another to calculate the next version of your data structure.
08:44ronen_I did
08:46ronen_weird, it's working now after restarting emacs
08:47jcsimsit just sounds like that namespace wasn't loaded somehow ronen_ - maybe a missed save, or compile?
08:47jcsimsI'm still not that familiar with clojure yet, so others could probably shed some insight on why that might crop up
08:52xeqironen_: I've gotten that a few times, but not sure what causes it
08:52xeqidoing M-x clojure-test-mode in the file twice fixes it though
08:53ronen_thanks:)
08:59jcidahoHi. I knocked up some elisp to switch to the right nrepl buffer based on the current buffer. So if I have 2 nrepls open for project x and project y, if I open a project x file and run the function (key mapped of course) then I land on the right nrepl buffer. Wondering if any nrepl guys in here, to see if worth adding to nrepl.el or not
09:03degAnyone have a tool or trick to keep the version number in my README.md consistent with the latest version I deploy to clojars?
09:04yazirianjcidaho: you might want to post to the mailing list about it -- there's a link to it in the README. At least then you aren't waiting for someone to show up :)
09:05jcsimsor possibly submit a pull request to start a conversation about it as well?
09:05TimMcmpenet: I'm only mildly concerned about query validation in Cassaforte.
09:06jcidahoyazirian: jsims: will do. I've got an issue wiring it into nrepl.el I was hoping to ask someone about. I can't seem to get my defun registered in nrepl.el - 'Symbol's function definition is void.
09:07TimMcmpenet: The only thing that really bothers me is that a nil session given to a multi.cql query can cause a syntactic reinterpretation -- and that has happened multiple times during our switch from Hector.
09:07jcidahofeels like a newbie elisp issue, but I'll go through the resources you mention
09:10mpenetTimMc: Right, understandable. To be honnest that's one of the reason I kept these things separated in my own c* cql client
09:11mpenetTimMc: "ease of use" or shorter api can mean headaches in some cases, and in the end I am not sure it's that helpful to the user. Then I guess it's a matter of personnal choice/taste
09:12TimMcHow did you keep them separated?
09:12jamiiThis confuses me:
09:12jamii (var-get my-var)
09:12jamii ;; nil
09:12jamii (eval my-var)
09:12jamii ;; #<Var: --unnamed-->
09:12jamii (eval `(fn [] ~my-var))
09:12jamii ;; NullPointerException
09:13mpenetTimMc: you never pass session to a query fn
09:13mpenetyou can pass a query in string, bound statement form, or map (hayt query) form to execute, but that's it
09:13mpenetTimMc: https://github.com/mpenet/alia or maybe I missunderstood what you meant
09:15TimMcjamii: Please don't paste more than 1 or 2 lines to the channel -- use a pastebin such as http://refheap.com or http://gist.github.com instead.
09:15mpenetwell, there is no protection against a nil session either, but that would infer that there is a dynamic var for it, and think the query value is nil
09:15jamiiTimMc: sorry :S
09:15mpenetcausing an obvious error
09:15mpenetTimMc: btw how did you end up with a nil session in the first place?
09:16TimMcmpenet: It's in an atom that gets initialized by a startup function, and I was doing repl development. :-)
09:16mpenetah!
09:17dnolenjamii: you're trying to embed an object directly into the syntax, that only works in a couple of cases, I can never remember which.
09:19jamiidnolen: It works for functions. I'm trying to embed a reference to a function so that the lookup happens at runtime, like using (#'foo ...)
09:19dnolenjamii: yes it doesn't really work in general, and even for functions I think it's a hack mostly for some internal reasons
09:20jamiidnolen: I'm just confused as to why vars evaluate to themselves normally but are resolved when inside other code
09:20jamiiIn fact, even (eval [my-var]) gives a NullPointerException
09:20jamiiBut (eval my-var) works fine. Maybe I need to go read through the compiler...
09:21dnolenjamii: in anycase, I don't really have an answer to your question beyond I just wouldn't do that.
09:21jamiidnolen: :D
09:21ambrosebsis the cljs ast specified somewhere?
09:22dnolenambrosebs: no, though bbloom and I have talked about how useful that would be.
09:22dnolenambrosebs: in particular it would be nice to make the analyzer implement multiple passes - like a core AST that gets enriched by other passes so that there's enough information for the compiler.
09:23ambrosebsdnolen: yes I remember this convo
09:24ambrosebsdnolen: I'm working on hygienic transformation on CLJS ASTs. Almost pulled my hair out trying to work out the AST nodes.
09:24ambrosebsdnolen: thankfully I'm almost done.
09:24tbaldridgeambrosebs: dnolen: and at some point, please drop that AST down to a SSA level. Transversing blocks of insts is waaay easier than walking a tree.
09:25tbaldridgeat least those are the concepts I'm working with atm
09:26tbaldridgeplus, blocks of instructions can then be queried by core.logic or datalog with minimal effort.
09:26ambrosebsdnolen: any tools to get js* nodes into a nice AST of javascript operations?
09:27dnolenambrosebs: nope that was another bbloom idea
09:27dnolenambrosebs: it would be helpful to write down your notes somewhere if you have a chance for future spelunkers
09:27ambrosebsdnolen: ok, I guess I'll have to do it.
09:28tbaldridgebut why do we need a schema definition, it's just data :-P
09:28ambrosebsdnolen: I think I'll go through the analyzer properly and make a core.typed out of the AST
09:28ambrosebsdnolen: ..another time :P
09:30dnolenambrosebs: if you write up your basic notes, I can fill in the details - of particular interest would be anything you considered to be weird or confusing corners
09:30dnolenalso we should get Bronsa to contribute notes
09:31ambrosebsjonasen: do you happen to have notes on the CLJS AST?
09:31dnolentbaldridge: AST -> SSA sounds like analyzer pass? :)
09:32jamiiHmmm, all of these work fine (do (def x nil) (eval #'x) (eval [#'x]) (eval `[~#'x]))
09:32ambrosebsdnolen: is there anything other than the compiler that uses the CLJS analyzer?
09:32tbaldridgednolen: sure. I just wonder if many "optimizations" could be better done at a SSA level.
09:32tbaldridgeambrosebs: core.async uses it
09:32ambrosebstbaldridge: thx
09:33tbaldridgebut mostly just to expand macros, so you shouldn't have to worry about too much there.
09:33ambrosebsok
09:33ambrosebsI meant more the AST itself.
09:33dnolentbaldridge: probably though we do very few optimizations currently in the compiler - nearly everything important happens in function invoke emission.
09:34dnolenambrosebs: there are the various CLJS based Clojure compiler projects but it's not clear how closely they follow CLJS
09:35ambrosebsdnolen: haha not more ASTs!
09:35dnolenambrosebs: but I don't think that should hold us back, the current AST representation is definitely not something to depend on.
09:35ambrosebsdnolen: no, just a minor headache. I'll get back to it.
09:35maleghastHello all
09:36maleghastAnyone got any good ideas for "pretty" urls in a site driven by Compojure..?
09:36dnolentbaldridge: definitely curious about core.logic over SSA, doing tree based stuff is never fun.
09:37maleghastI want to get away from /page/52020403367093c9c830481e (as an example) and would rather it were /contact
09:38maleghast(Internally I still need the URL to equate to "fetch page with id 52020403367093c9c830481e", preferably without simply creating a hard-coded relationship between /contact and the page method and the id I want)
09:38hugodis it normal for cljsbuild build auto to use half a core cpu when idling?
09:39dnolenhugod: no
09:39hugodmm, wonder what's causing it then
09:41hyPiRionmaleghast: hm, how do get the string/id "52020403367093c9c830481e" to begin with?
09:47TimMcmaleghast: I think you'd want to treat "contact" as the page ID.
09:47ambrosebsdnolen: how do I get the binding name of the Exception bound in a catch from an AST node?
09:47TimMcSo perhaps /page/contact is really /page/$id
09:48TimMc(or whatever the compojure syntax is)
09:48maleghasthyPiRion: It's the _id from the Mongo Record
09:48dnolenambrosebs: pretty sure it the :name field of a try* AST node
09:48ambrosebsdnolen: got it thx
09:48maleghastTimMc: That might well be a good point, thanks
09:49maleghastTimMc: In fact, that solves it completely for me - I don't know why I didn't think of it before - thanks!
09:50TimMcIt's how WordPress treats page slugs.
09:50hyPiRionTimMc: it's /page/:id afaik
09:50maleghasthyPiRion: Yes, it is :-)
09:54TimMcmaleghast: If you don't want the /page prefix, you may be able to define a /:catchall route at the end and display the relevant page if it exists in the database.
09:54maleghastTimMc: That's what I am doing - right now...
09:54maleghastTimMc: your answer made me think, and made me feel a bit silly that I had not seen it for myself.
09:55TimMc:-)
09:55maleghastTimMc: :-) Appreciate the application of the cluebat ;-)
09:55hyPiRionmaleghast: that happens to everyone :) I do it all the time.
09:55hugodreducing clsbuild's polling to 1s from 100ms gets me down to 10% cpu usage
09:56ambrosebsdnolen: is the "catch" local binding name gensym'd somewhere?
09:56maleghasthyPiRion: I always reckon I get there x10 faster if I involve someone else's mind
09:57mdrogalisDepends on where you want to get to. :)
09:57ambrosebsdnolen: I can see it does, but I can't see how/where.
09:57dnolenambrosebs: look at try in the core.clj macro file
09:58hyPiRionmaleghast: For me, it's more about expressing the problem. If I can explain what the problem is, I usually tend to understand where the problem is/find a way to solve the problem.
09:58dnolenambrosebs: in same dir as analyzer.clj
09:58ambrosebsdnolen: got it, easy
10:01ambrosebsdnolen: what is pmasks in deftype?
10:02dnolenambrosebs: an optimization (which may or may not stay), it's the bitmask of protocols that the type implements
10:03ambrosebsdnolen: can I get the body of deftype from anywhere?
10:03ambrosebsdnolen: IIRC is it in a 'do' block with the deftype*?
10:04ambrosebsdnolen: ah ok. found it.
10:04ambrosebsI'm going to have to type check a lot of js*...
10:05maleghasthyPiRion TimMc - Thanks for your help; totally nailed it. :-)
10:07dnolenambrosebs: perhaps you can avoid that by analyzing the original form? for the most part js* is an inline optimization that is equivalent to a function call.
10:09ambrosebsdnolen: I'd need to copy the analyzer for that right?
10:10dnolenambrosebs: ? the original form in the js* AST node
10:10dnolen"is in"
10:11ambrosebsdnolen: really? :form just gives me (js* "(~{} + ~{})" 1 2) for (+ 1 2)
10:12noncomare all numbers in clojure boxed?
10:13nDuffnoncom: not in modern releases, no.
10:13tbaldridgenoncom: no, but you have to type hint fns
10:14dnolenambrosebs: oh hm
10:14noncomok, i'm doing speed-sensitive calculations for many splines at once and i get a serious performance drop... i will try to optimise with type hints
10:15nDuffnoncom: enable *warn-on-reflection* to determine where you need them.
10:15tbaldridgenoncom: also, remember that stuff like map, reduce, etc, are doing allocations to create collections. That can impact performance as well.
10:16noncomyeah... but i want to try to port a java spline calculation algo to clojure... so now trying to get same performance
10:16noncomand i use map and reduce to be idiomatic then
10:17tbaldridgenoncom: in that case you might want to look at reducers, http://clojure.org/reducers
10:21noncomnDuff: hmmm, with warn-on-reflection it found some places, but in 3rd party libs, not in any of my code... so type hints will not do then right?
10:22noncomtbaldridge: i might be havng like 1000 simultaneous real-time spline calculations, and reducers are said to be based on fork/join so will they work for such a case?
10:22nDuffnoncom: Depends on the details.
10:22noncomor is the best option to fall back to java?
10:23noncomnDuff: i'll try to type-hint anyway and see what it comes with
10:23nDuffnoncom: ...re: reducers, yes, I'd certainly expect them to work.
10:24tbaldridgenoncom: they should be fine, if you store them in a vector they should reduce in large chunks.
10:24noncomgonna try then
10:24OdinodinCan anyone recommend a validation library for a Ring-app ? (looking at validateur and bouncer atm)
10:24noncomhow do i type hint a [] of floats?
10:25tbaldridgenoncom: ^floats
10:25noncomi have point coordinates stored like [1.0 2.0 3.0]
10:25noncomok
10:25nDufftbaldridge: isn't ^floats an array, not a vector?
10:25tbaldridgenoncom: there are plural overrides for most primitives in Clojure, so you can say ^object or ^objects, ^byte ^bytes, etc.
10:26tbaldridgewell yeah, if he was typehinting I thought he'd use arrays.
10:26noncomoh i see
10:26noncomso i better use arrays
10:26nDuffnoncom: yes.
10:26ambrosebsdnolen: do the fields of a deftype magically get scoped in a extend-type?
10:26tbaldridgeactually you can also use vector-of
10:26tbaldridgehttp://clojuredocs.org/clojure_core/1.2.0/clojure.core/vector-of
10:26tbaldridgegenerates a vector that can only hold :primitive
10:27noncomtat would be better, i do not want to handle arrays, since [] syntax is much more concsise
10:27dnolenambrosebs: re: js* wonder if we can special case that to preserve original form ...
10:28tbaldridgenoncom: I'd start with type hinting the scalar args of your functions, that will probably be the best performance impact right there.
10:28tbaldridgethat and turn on reflection warnings
10:28dnolenambrosebs: if you look at detype/record macros you can see we carry the fields forward
10:29ambrosebsdnolen: do I have any hope of picking that up from the macroexpansion?
10:29noncomok
10:30dnolenambrosebs: I'd probably be OK w/ taking a patch for this, perhaps this can be done via meta
10:31noncomoh... ^float is not an option.. only ^double is... so i will have to make double->float conversions all over the place to interface with the java lib... hmm
10:31dnolenambrosebs: we attach field metadata to deftype implementation methods, if you look at parse fn* in analyzer.clj you can see we look at meta to get the fields
10:43silasdaviswhat would be the best way to load some data from a file into a data structure to persist in memory across requests when using ring/compojure?
11:05FretsejazHello
11:08tylereIs there an elegant way, given an integer, to get a seq of the digits of the number?
11:08arrdem,(apply list (pr-str 9001))
11:08clojurebot(\9 \0 \0 \1)
11:09tylereYea, I need (9 0 0 1) not (\9 \0 \0 \1) though
11:09tylereMy first attempt was along those lines
11:11hyPiRion,(loop [m 9001 acc ()] (if (zero? m) acc (recur (quot m 10) (conj acc (rem m 10)))))
11:11clojurebot(9 0 0 1)
11:11gtraknegatives?
11:11gtrak,(loop [m -9001 acc ()] (if (zero? m) acc (recur (quot m 10) (conj acc (rem m 10)))))
11:11clojurebot(-9 0 0 -1)
11:12gtrak,(apply list (pr-str -9001))
11:12hyPiRiongtrak: Math/abs then
11:12clojurebot(\- \9 \0 \0 \1)
11:12tylere(map (comp read-string str) (seq (str num))) works
11:12tylerebut that makes me vaguely ill
11:13hyPiRionyou'd only want the digits of the number, so the prepended minus isn't needed.
11:13arrdemhum... how to force integer division?
11:13gtrakint cast both the args?
11:13chwalsis there some way to forcibly delete stuff in paredit? i have a mess of unbalanced paren's and square brackets i can't get rid of
11:15gtrakchwals: mark and C-w
11:16chwalsthanks
11:21FretsejazDoes anyone here use Clojure professionally?
11:22mgaareyes
11:22egghead:)
11:23binskiYes, ClojureCLR
11:23nDuffFretsejaz: Depends on the context, somewhat.
11:24tylerenDuff: You aren't in NC by any chance are you?
11:25nDufftylere: Not at all; austin.tx.us
11:25tylereheh, a little out of my range then
11:25arrdemnDuff: w00t atx
11:25noncomFretsejaz: I'm trying to...
11:26noncomactually, pretty successful, although there is much to learn and always a need for help and advice from the community
11:26noncomi know that some "serious" companies use clojure as well... line banks, media and stuff.. although i can give no detail on this
11:27FretsejazNeat, I'm in a .net shop and have been starting to learn Clojure. I doubt they'd be too open to having clojure code in production though
11:27noncom(nth) is pretty slow, what are alternatives to using it when i need to pick an element from a big collection and i have the index of the element that i need?
11:29noncomFretsejaz: i heard that one of the typical ways of clojure getting into production is like "can i use this tiny library to significantly improve concurrency/threading/data-processing (or smth else)" ?
11:29mgaarenoncom: what kind of collection? if it's a vector then it should be very fast
11:30gtrakFretsejaz, noncom: testing too
11:31gtrak'the grinder' now supports clojure
11:31noncomyeah, actualy just about anything (except for the frontend maybe)
11:31gtrakand you could make a case for unit/integration tests with few implications on the real codebase
11:31jtoyi have a weird error I have never seen before, I have my app_config loaded with this: https://www.refheap.com/ , when i do lein repl it works and I see data, when I run from cron liek so it doesnt work: 'cd ~/project && lein trampoline run -m jtoy.jobs/run'
11:31FretsejazBiggest issue would be getting people to read it. Engineers around here don't seem too keen on adding new languages
11:32jtoythis was working for me bfore, all I did was move the app_config definition to its own ns
11:32jtoywhy would this work with lein repl but not lein trampoline?
11:32noncommgaare: vector, yes.. takes around 0.081157 msecs.. i think it can't get any faster..
11:33noncomFretsejas: you can try introducing it s
11:33noncom*slowly
11:33noncomfor example, try first using it as a scripting language
11:33noncomfor small tasks
11:34FretsejazNoncom: I'd have to learn it more, I'm a total novice at the moment. Thinking of doing Project Euler with it
11:34noncomyeah, probably euler is cool. don't forget to also have some "real" personal project with it
11:34noncomboosts learning well
11:34gtrakI would use it where I'd use python/perl in the past. I was doing a large refactoring of a code-base and I needed to keep track of operations, classpaths, file hashes, and generate reports. I tried doing it in python, but I started throwing up after an hour.
11:35tylereI'd recommend Rosalind over Euler: http://rosalind.info/problems/locations/
11:35jtoywhen I say doesnt work, I mean the app_config comes up as nil causing my app to die
11:35tylereReal problems grounded in actual science rather than a bunch of problems that often are basically "find the trick in the math"
11:35FretsejazWell I want to make my own SQL formater since I'm dissatisfied with the ones I've found.
11:35tylererather than being actual implementation challenges
11:35gtrakFretsejaz: actually, another dev wrote a verification script in perl, I ported it over to clojure for my work. He writes clojure now :-).
11:36noncomjtoy: the refheap link is not for a codepiece..
11:36gtraksince I didn't know perl.
11:36gtraki learned enough to port the script over.
11:37FretsejazTylere: I've wanted to do project Euler for a while as a personal goal, but this looks interesting as well! Why not both.
11:38gtrakFretsejaz: he was a much more senior and grouchy dev than me, and seeing his code translated might have shown some value.
11:39jtoynoncom: yeah, oops, https://www.refheap.com/17396 , its not the code though, it seems like a lein issue,
11:39Fretsejazgtrak: We don't automate much around here, though that's being turned around. It's... an odd situation small/mid sized company
11:39noncom,(first nil)
11:39clojurebotnil
11:40gtrakthe script for that task was a one-time thing, it was easier to do it that way than use a spreadsheet
11:40noncomjtoy: so your with-open returns nill
11:40gtrakrunning svn commands, organizing everything, and generating hiccup html in one script I think was pretty cool.
11:40jtoynoncom: how would I debug this? I see it working in lein repl where I can test it, in lein trampolie i see it print nil
11:40Fretsejazgotcha, well I'd still have to learn clojure, I'm just starting
11:41noncomjtoy: well, personally my stile is to println everything so that i know where it dies and what are the values there. also there might be a fie-reading exception, so a try-catch could do
11:41jtoyand this was working before, the only change i made was move the app_config function to its ow namespace
11:42noncomjtoy: first see if it actually sees the file
11:42noncom"creds.json"
11:43noncomjtoy: or check the (count) of read lines if the file is accessible... just do it step-by-step...
11:43noncomchecking the things as they go
11:43noncomand eventually you'll step on it
11:43bbloomtbaldridge: datalog over ssa blocks sounds like a cool idea :-)
11:44tbaldridgeit is: https://github.com/halgari/mjolnir/blob/master/src/mjolnir/ssa_rules.clj :-)
11:44tbaldridgeSSA level type inference in Datomic datalog ^^
11:45bbloomawesome.
11:45jtoynoncom: thx #<IllegalStateException java.lang.IllegalStateException: Attempting to call unbound fn: #'cheshire.core/parse-string>
11:46noncomjtoy: yep, we're all like descended on the planet where alien bugs are abundant, so we're like in the movie, the star descent or whatever it was called, great movie
11:47jtoywhat?
11:47clojurebotwhat is exceptions
11:47noncomah, nevermind :) just my imagination
11:47jtoyim still not sure why it works in lein repl and not in lein trampoline though
11:48noncomjtoy: can't help, never used trampoline.. but likely there is some difference in ns handling...
11:48gtrakFretsejaz: adoption can work top-down or bottom-up :-) bottom-up is more likely to actually work, but takes persistence.
11:49Fretsejazgtrak: True, but I am also not planning on staying too long =\
11:50bbloomtbaldridge: how has your experience been with the ssa/datalog combo? experimental at this point? or like one of those obviously mind blowing good ideas? or what?
11:50Fretsejazbeen here 2.5 years, and will be here for maybe another year or two, but then I'm moving out of state, don't like the area
11:51gtrakyea.. stuff like that is on the order of years, but maybe you can convince one or two guys to look at it.
11:51Fretsejazmaybe, we'll see. I'll have to actually know what I'm doing with it first! I'm one of the younger engineers
11:52tbaldridgebbloom: mostly good. Datomic is mostly designed for queries that are run multiple times. Once the JIT kicks in the performance is good. Until then the performance was okay-ish. That would be my concern for using it in a real compiler. I'ts not uncommon to see a 100x slowdown until the jit warms up the query
11:52bbloomtbaldridge: is that just an artifact of datomic's datalog engine? in theory a different storage engine with a different indexing model may prefer a different query strategy for the same queries. no?
11:53tbaldridgeSo a compiler that watches a directory would do pretty well, but I'm not convinced a commandline based compiler wouldn't suffer performance issues.
11:53tbaldridgeThis is all in-memory DB
11:53bbloomok
11:53bbloomtbaldridge: i've got this theory that a dramatic slowdown for a compiler is A-OK if you can reasonably do extremely incremental builds with confidence
11:53tbaldridgethe first hit of a query requires the datalog engine to create a query plan. After that the query is hashed and cached, and the plan is reused later on
11:54tbaldridgebbloom: interesting
11:54noncomFretsejaz: sometimes old engineers may take changes very steadely.. just be ready and know your goal
11:54bbloomtbaldridge: i mean when you think about it, generally only very small changes occur at a time
11:54tbaldridgebbloom: it would be cool to try a compiler where each module is cached in some sort of database, so only new modules need to be inferred
11:54tbaldridgebbloom: right
11:54bbloomtbaldridge: and if you have truly controlled inputs/environment, you can share partially compiled data too
11:54noncombut if they're no movers, then at least you know you have your benifit
11:55mgaareFretsejaz: my advice is to forget about your current organization. In the year that you stay there, contribute to clojure open source projects or start one of your own. Then you can use that to get a job somewhere that already accepts clojure.
11:55bbloomtbaldridge: i started doing an attribute grammar system w/ memoization, dependency tracking, etc, but got only far enough to say "yeah, this will probably work, but i don't need it right now"
11:55tbaldridgebbloom: but yeah, the idea of using logic programming to write optimization/inference passes is mind blowing
11:55Fretsejaznomcom, gtrack: Thank you for the advice. once I get more knowledgeable about the language I might start trying using more at work.
11:56tbaldridgebbloom: have you looked into Ometa2 at all?
11:56bbloomdidn't realize there was a #2
11:56bbloomi'm not a PEG believer though :-)
11:56Fretsejazmgaare: I'm embarrassed to say this, but I've actually never contributed to open source (still a new engineer, technically don't have my degree yet)
11:56bbloomtbaldridge: is there a major difference/discovery since v1?
11:56tbaldridgeyeah, I understand that. But the idea of expressing a compiler as parser->output->parser->output is powerful. That's where some of my experimentation is these days
11:57bbloomtbaldridge: yeah, i'm a huuuge believer in that approach
11:57tbaldridgebbloom: no, it's mostly a condensing of the spec.
11:57bbloomexplicit staging & multi-level translations == good idea
11:57ToxicFrogFretsejaz: it's only a matter of time until you feel a patch coming on :)
11:57mgaareFretsejaz: One thing that's true about every person who's ever contributed to open source, even the famous people who are leaders of prominent projects, is that at one point they were not open source contributors ;)
11:58tbaldridgebbloom: I mean, there's a reason Ocaml is known for writing good compilers, the pattern matching is top-notch
11:58FretsejazMy plan is to move to Seattle to be honest. I'm currently in Florida and don't like it here, but in state tuition is hard to beat
11:58bbloomtbaldridge: yup. there is also MetaOCaml from Oleg et al
11:59bbloomwhich ensures type correctness of the code generator AND the generated code
11:59futileUsing instaparse sounds like the perfect way to build up a partial AST that's perfect for doing syntax highlighting.
11:59futileRight?
11:59tbaldridgebbloom: nice
11:59bbloomtbaldridge: but i agree with Rich about pattern matching: I don't like the ordered choice aspect
11:59bbloomtbaldridge: i prefer what generalized CFG grammar systems do (like instaparse) where they return ambiguous results like a logic engine would
12:00bbloomtbaldridge: was just talking about this yesterday w/ kovas :-)
12:00tbaldridgebbloom: right, it's a trade-off, Ometa makes the choice of simplifying the semantics of the pattern matching by always trying patterns in-order.
12:00bbloomjust like you do case analysis when the compiler says "hey, you didn't handle all of the enum values" you can do "ambiguity analysis" where the compiler says "when you compose these two sets of structures, you have ambiguity"
12:01tbaldridgeinteresting
12:01bbloomtbaldridge: my problem with the "simplifying" approach is that you still have to worry about things like left recursion & exploding parse tables and other things that you can't really hide
12:02tbaldridgebbloom: from what I was reading in the Ometa docs, I thought they solved that via in-order parsing. Did I miss something?
12:03bbloomtbaldridge: yeah, that's precisely what they do. they punt on the ambiguity problem by subsetting CFGs to be PEGs
12:03bbloombut the same thing applies in many situations
12:03bbloomlike the multimethod shape intersection example: is it [:rectangle :circle] or is it [:circle :rectangle] ?
12:04bbloomin theory there are a few resolutions: lexical order, code order, logic variables, explicit preferences, random or otherwise non-deterministic choice, etc
12:05tbaldridgeI see
12:07bbloomparsing and predicate dispatch have *a lot* in common
12:07bbloomhell, parsing has a lot in common with a lot of things! hence the wide applicability of ometa for the viewpoints work
12:07tbaldridgeright
12:09eggheadhmm
12:09eggheadunbound buffers are kind of strange
12:09tbaldridgeegghead: unbound buffers are evil
12:10eggheadI'm just trying to wrap my head around the semantics of >! in unbound vs buffered
12:10eggheadthe way you can >!! into an buffered chan and it works like put!
12:10eggheadbut >!! into an unbound chan and it works like a sort of rendevouz
12:11eggheadI thought >!/>!! <!/<!! always had a sort of 'receipt' guarantee
12:12eggheadand put! and take! were the async/no guarantee versions
12:13eggheadfor instance I thought it was true that: (do (>!! ANY-CHAN :message) (assume-produced-message-was-consumed))
12:16eggheadbut it seems that's only true for channels with unbound buffers?
12:17eggheadand in a buffered chan there is no difference there between using >!! and put! ?
12:18bbloomegghead: no, put! will schedule a callback
12:18bbloomit's an async send
12:18bbloomthe queue of callbacks to run is effectively an unbounded queue
12:18bbloomunbounded buffer, i mean
12:18bbloomtechnically it's bounded, but it's a global bound, not per channel
12:19eggheadso there is no 'ack' besides what the consomer produces over another channel?
12:19egghead s/consomer/consumer
12:20xeqiis there a way to profile clojurescript?
12:21dnolenxeqi: browser profilers are pretty good, I suggest compiling w/ whitespace optimizations w/ :static-fns true
12:21dnolenxeqi: this will probably get easier for testing advanced compiled code when we get accurate source maps
12:21dnolens/testing/profiling
12:22eggheadinteresting, the 'rendevouz' only exists in unbound buffers
12:23eggheadbbloom: given you don't use a callback to put! and just say (put! in-buffered-chan :message) what is the practical difference for the user between that and >!
12:24xeqidnolen: ah yes, this works much better then when I forgot to turn off :advanced
12:24xeqithanks
12:24eggheadeven though the internal mechnism might be different, for a user of core.async the semantics are the same, aren't they?
12:25dnolenegghead: not the same, put! is async, and >! will block
12:25dnolenegghead: even in CLJS
12:26eggheaddnolen: (let [c (chan 10)] (go (>! c :message) (println "Message sent but not received)))
12:26eggheaddnolen: (let [c (chan)] (go (>! c :message) (println "Message received by consumer")))
12:27eggheadagainst the buffered it doesn't block, but against the unbound buffer it does block
12:27dnolenegghead: still not the same, if the buffer is filled it will block
12:27eggheador 'park' as it were
12:27dnolenwith the standard buffer
12:28eggheadis (chan) the same as (chan 0) ?
12:28dnolenegghead: the semantics of >! is rendevous regardless of the size of the buffer, put! will never block
12:29eggheadbut rendevouz with the buffer instead of a consumer
12:29ddellacostaI'm confused, you can use swap! with dynamic vars? I thought set! was the way to change their value, and swap!/reset! were for atoms?
12:29eggheadright?
12:29clojurebotEqual Rights for Functional Objects is Baker's paper on equality and why it's impossible to define sensible equality in the presence of mutable data structures: http://www.pipeline.com/~hbaker1/ObjectIdentity.html
12:29eggheadwith no buffer/unbound buffer you rendevouz with the process receiving the message and with a buffer you rendevouz with the buffer
12:30dnolenegghead: don't mix up what >! <! means w/ the utility of picking a buffering strategy
12:30ddellacostaping Raynes
12:30eggheadddellacosta: I don't think you're supposed to change dynamic vars, just rebind them :p
12:31egghead~dynamically bind~ them
12:31clojurebothttps://www.refheap.com/
12:31ddellacostaegghead: yeah, I mean, I'm read the source for lib-noir's session now and I'm really confused
12:31ddellacostareading
12:31eggheaddnolen: is it correct to think of the rendevouz as happening with the buffer?
12:32dnolenegghead: I wouldn't think of it that way
12:32ddellacostaoh, I see, it's binding it *to* an atom. wacky.
12:33dnolenegghead: but bbloom or tbaldridge may have better explanations
12:33eggheadwhat is the rendevouz in the scenario where >! "appears" async because it gets picked up by the buffer
12:34dnolenegghead: what I'm trying to say is you often write >! chan, and you absolutely have no idea what buffer strategy chan is using
12:34noncomwhat is the current state of clojure.reducers library?
12:34noncomcomplete?
12:36dnolennoncom: could probably fleshed out more, but the essentials are there for it to be useful
12:38eggheaddnolen: so I probably shouldn't be using writes as part of control flow since there is no guarantee a consumer received the message? :p
12:39dnolenegghead: I think your mental model just needs some adjusting, if you can move past >! something happened, what doesn't really matter
12:39eggheadfor instance, the way it is common to have a read-loop/recur, it seems like itd be very dangerous to invert that and have a write-loop/recur
12:40dnolenegghead: I don't know why you assume that
12:40eggheaddnolen: the dangerous assumption would be that the written message was received by somebody somewhere
12:40eggheadbut with a read you know you received the message
12:41egghead>! seems more like 'make this available for use some time between now and never'
12:42bbloomegghead: you just need to think about it as a simplification of a distributed system
12:43bbloomegghead: in a truly distributed system, you need acks and what not to ensure your message got there
12:43bbloomthere are time outs & retries and lots of stuff b/c your network is unreliable
12:43bbloomif you have an unbuffered channel, then the message was reliably received. if you have a buffered channel or put! or you (go (>! …)) (which is basically equiv to async put!) then your message might just get dropped on the floor if nobody is reading from that channel's buffer
12:44bbloomb/c you have a local system, not a distributed one, you can control what processes talk to what channels, and so you have control over the promises the runtime makes to you
12:44bbloomif you're writing library code that accepts random channels from whoever, then you need to treat that channel like a dumb pipe
12:44eggheadbut it seems safer to assume that >! *does* drop the message on the floor unless you created the channel in your local process
12:45eggheadfor all you know you could be writing to a channel with a full dropping buffer
12:45bbloomif it's an internal function and you give it the buffer yourself, then you know lots of things you can't know in general purpose library code
12:46bbloomthat's part of the interface of your code
12:46bbloomit's no different than saying "i want a map" vs "i want a map with these keys in it"
12:46eggheadright, so I guess it's kind of a la carte
12:47bbloomthat's sort of the best feature of local CSP: you get this sliding scale of guarantees that you can't get w/ truly distributed models, like erlang's "cast"
12:47eggheadI think my mistake is thinking of the rendevouz bit as ack
12:47bbloomegghead: yeah, it's not an ack, it's more like the "yield" keyword in ruby or python
12:48bbloomin fact, the state machines that core.async creates are a special (lexical, not dynamic extent) case of yield, which is a stylized use of full on continuations. so saying send/receive is more or less equiv to yield is actually provably true for more complete implementations
12:49eggheadhmm
12:50timvishercemerick ping
12:50eggheadI think like tbaldridge has said over and over I shouldn't use unbound buffers
12:50cemericktimvisher: pong
12:50eggheadsince all you gain is uncertainty about the channels behavior
12:50timvisherj0. thanks for getting back to me about the use case.
12:50bbloomegghead: yes. do not use unbounded buffers :-)
12:50timvisherdid you happen to see my messages earlier?
12:50eggheadwell, at least now I finally understand *why*
12:50eggheadthanks bbloom :)
12:50cemericktimvisher: here, today? No.
12:50timvisheryesterday.
12:50cemericktimvisher: ah, no
12:51timvisherthe basic use case is that i have a plain old html file
12:51cemerickfeel free to point to a log
12:51timvisherso templating in a dynamic port doesn't really work for me
12:51bbloomegghead: generally, you should use UNBUFFERED unless you have a reasonable idea of how large to set the buffer
12:52cemericktimvisher: your app is public, right?
12:52mdrogalisIt feels wrong to have more than one Leiningen project per Git repo. Does anyone have strong reasons for one way or the other?
12:52tbaldridgeegghead: and if you need non-blocking put, then consider sliding/dropping buffers
12:52timvisheri understand that for most people they're going to be serving through ring or summat so they can put in the call to the script markup function (forget what it's called atm) but for me the regeneration of the index.html file would get tedious unless i put some tooling around it (which wouldn't be impossible)
12:52technomancymdrogalis: lein's own repo has three projects in it =)
12:52timvisheryep, it's public
12:52cemericktimvisher: link?
12:53mdrogalistechnomancy: Heh, I guess yeah. Something about it still feels funny.
12:53mdrogalisI think I just never liked that set up for projects, regardless of platform
12:53timvisher/msg NickServ SETPASS timvisher fsnphweitxed <password>
12:53timvisher
12:53timvisherdernit!
12:53timvisherhttps://github.com/timvisher/bible-plan
12:53timvisherthere we go! ;)
12:53cemerickthanks
12:53maharjoops :)
12:53futileoh hi tim, saw you on the M.L.
12:53cemerickclassic
12:53timvisher:)
12:53bbloomtbaldridge: ignoring obvious cases like semaphore simulation. any advice on choosing buffer sizes? for my fipp branch, i found that approximately the internal max buffer size for the measure/print coroutines was about right
12:54timvisherhi futile, on what subject?
12:54bbloomtbaldridge: turns out that's == to max-width of your terminal :-)
12:54eggheadbbloom: what is the difference between an unbuffered channel and a channel with an unbound buffer
12:54futiletimvisher: are you the one who had a christian email signature?
12:54egghead(chan) vs (chan (buffer)) ?
12:54timvisherfutile: in general that'd be me ^_^
12:54timvisheron most tech mailing lists for that matter lol
12:54futiletimvisher: neat. glad to see another christian programmer around.
12:54tbaldridgebbloom: no, I don't I normally consider the use cases of the channel and do number of gos/threads as the buffer size
12:55bbloomegghead: the buffer function has an arity of 1. (buffer) is invalid
12:55timvisherfutile: awesome! great to see one too ;)
12:55eggheadwelp
12:55egghead(chan 0) seems to behave just like (chan)
12:56timvishercemerick: so far this is working out perfectly for me with a stable port: https://github.com/timvisher/bible-plan/blob/master/src/cljs/piggieback_browser.cljs
12:56futiletimvisher: still waiting to see another catholic programmer, but i dont think that day will ever come
12:56timvisherlol
12:56futile:)
12:56bbloomegghead: that would be my expectation, however, i suspect that (chan 0) is an uninteresting edge case
12:56timvishercan't help you there but if I meet one I'll be sure to send them your way!
12:56bbloom(chan 0) is basically just slower (chan) :-P
12:56cemericktimvisher, futile: you guys are hardly alone; there's a fairly silent population
12:56bbloom"allocate me a buffer object that i won't use please"
12:57futiletimvisher: thx :)
12:57cemericktimvisher: right, and that's using the classic browser-REPL
12:57timvishercemerick: to be sure. it just tends to be hard to get them to come out of the woodwork
12:57timvishercemerick: yep.
12:57futilecemerick: well if i dont know they are, they're as good as not to me, for all intents and purposes.
12:57futile:P
12:57futile(i mean socially speaking)
12:58timvisherso i had austin set up briefly but when i got to the point where i realized that i would have to update the port everytime i started the browser repl that's what turned me off
12:58cemericktimvisher: so, you were trying to have austin's HTTP server serve the static HTML, as the classic browser-REPL did?
12:58timvisherthe helper function is actually quite nice and in a dynamic site it'd be a no-brainer, but i already had the brower-repl mostly working and austin introduced another layer of complexity with the need for templating
12:58atyzdoes anyone know why rings response created doesn't return a body?
12:59tbaldridgeegghead: yeah, (chan 0) should never be used
12:59timvisherhmm. now i'm wishing i'd committed where i'd gotten to.
12:59futileI'm going back and forth between writing a compiler in C or Clojure. What do you guys think?
12:59TimMcfutile: Do you know if the current pope has weighed in on emacs vs. vim? :-P
12:59justin_smithatyz: for what request and handler?
12:59atyzhttps://github.com/ring-clojure/ring/blob/master/ring-core/src/ring/util/response.clj
12:59futileTimMc: I think he's holding out for something more modern
13:00bbloomTimMc: i heard he uses butterflies
13:00futileTimMc: you know how we're all about modernity
13:00futilebbloom: oh man i like your joke better
13:00atyzjustin_smith: the created function
13:00TimMchaha
13:00futilelets go with bbloom's joke, its pretty relevant
13:00cemericktimvisher: as background, you can set Austin's server's port number, and fix the session id that is used. See https://github.com/cemerick/austin/blob/master/src/clj/cemerick/austin.clj#L28 and :session-id option of https://github.com/cemerick/austin/blob/master/src/clj/cemerick/austin.clj#L356
13:00TimMc(Not to be confused with tpope, who is pretty clearly a vim user.)
13:01tbaldridgefutile: depends on the language
13:01futiletbaldridge: let's say it's a lot like Clojure ;)
13:01justin_smithatyz: well, specs seem to say its response SHOULD include a list of resource characteristics and locations and MUST create the resource
13:02justin_smithso technically I guess it is OK? isn't this something you would probably augment with a handler middleware anyway?
13:02timvishercemerick: i did notice that, but doesn't that negate one of the best things about austin which is it's ability to easily set up multiple browser repls for a project/many projects?
13:02timvisheror am i missing something about that?
13:02justin_smithatyz: ie. you supply the code that implements what "creation" actually means and agment the response to add a body as apropriate
13:03tbaldridgefutile: IMO, compilers in C quickly end up very ugly. I'd either write something in C++ and LLVM if it was simple enough, or stick with clojure.
13:03tbaldridgefutile: the GC, data structures and dynamic typing of Clojure are really nice to have
13:03atyzjustin_smith: to me this seems just as correct: https://www.refheap.com/17399
13:03cemericktimvisher: You can readily create multiple repl-envs with different session-ids.
13:04justin_smithatyz: wait, it is putting "Location" in the headers, that is what the specs ask for right?
13:04justin_smithor at least it seems to provide what the specs ask for
13:05atyzjustin_smith: yes. But the way it is currently implemented prevents you from having a body
13:05cemericktimvisher: But, you're right that, without templating (or _some_ way of dynamically obtaining the desired repl-env to be connected to), you're always going to be jumping back and forth between the REPL and whatever HTML file you're loading up.
13:05futiletbaldridge: Wow. After 5 years of abandoning C++, I have not once seriously considered using C++ for anything until just now.
13:05justin_smithcan't you have a handler that modifies that map after ring creates it? I don't mess with that part of my app TOO often, but I recall being able to do things like that with ring
13:06futiletbaldridge: also are you suggesting I implement those in my language, is that why you bring up the GC, data structures and dynamic typing?
13:06justin_smithie. check for a 201 status, fill in details, add a body tag
13:06atyzjustin_smith: i could totally do that. I'm wondering if there was a reason ring *prevented* me from giving a 201 a body
13:06atyzAs I didn't see anything in the http specs saying it shouldn't have a body
13:06timvisherah. interesting. ok, i'll try to dig into it again. knee jerk it didn't seem like it was configurable in that way. i think i saw the comment in the Changelog section of the README that talks about :port not being supported anymore and just assumed that i couldn't get a stable port and session-id
13:06tbaldridgefutile: no, I'm just saying that if I were going to write a LISP compiler, the first thing I would need to do is write a reader. Would you want to write that in C or Clojure
13:07justin_smithatyz: that part I don't know, and probably there is not a nice answer for
13:07futiletbaldridge: ooh I see. Yeah I don't know.
13:07justin_smithmaybe it's a bug?
13:07futiletbaldridge: I like Clojure's data structures but I also like the simplicity of C not having a JVM.
13:07tbaldridgeClojure would be my first choice, but it all depends on what your target platform is. LLVM's C++ support is amazing It's C++, but it's super well designed c++
13:07atyzI don't know, I had to write some middleware for it.So I'm probably going to patch it and see what he says
13:07atyzAt worst he will give me the reason why it shouldn't return a body
13:08atyzI was just asking to make sure I wasn't missing something
13:08justin_smithwe could both be missing something :) sorry I couldn't help more
13:10timvisheryou know that time when you were eating a sammich and you realized that you forgot the hummus. worthless.
13:13cemericktimvisher: the problem with :port was that it was on the repl-env fn, when there needs to be a 1:N relationship between HTTP server : REPL environments
13:14cemericktimvisher: If you do make it work, I'd love to have a mini-writeup in the Austin README of the setup needed for those working with static HTML pages, etc. :-)
13:14cemericktimvisher: and, if you don't make it work, let me know, and we'll figure it out
13:14timvishersure thing. :)
13:14timvisherand really, thank you so much for your work on all this. piggieback is lightyears ahead of where i started with this stuff
13:15timvisherand austin seems like it would be another big step forward
13:15timvisherso i'm very excited :)
13:15noncomi have just got some result on speed tests that surprised me
13:16noncomif i call an fn from a different ns, passing to it something from a different ns, it takes +0.1ms to complete!
13:17noncomis this an expected penalty for name resolution?
13:17tbaldridgenoncom: are you sure the JIT is warmed up?
13:17noncomwell, i run like 20 tests, until indications settle on something
13:17llasramnoncom: I heavily recommend using https://github.com/hugoduncan/criterium especially for timing differences that small
13:17tbaldridgecan you give us a copy/paste of the code in question?
13:17technomancynoncom: unless you use resolve, resolution happens at compile time
13:18technomancyor eval or something batty
13:18kmicubatty!
13:18noncomprobably that's because i'm doing tests from the repl then?
13:19tbaldridgealso, lein screws with the JIT quite a bit....
13:19llasramnoncom: Without the code and more context, it's pretty difficult for anyone to say :-)
13:19noncomjust a sec, i'm preparing
13:20tbaldridgenoncom: if you add something like this to your project.clj file, it'll stop lien from disabling a ton of optimizations: :jvm-opts ^:replace []
13:20tbaldridgeat the cost of extra compilation time
13:22arrdemhow would you guys structure a message handler system that has to deal with restarting messages?
13:24arrdemI'm trying to come up with a structure which would let handlers "catch" the current message (stop propigation of the current one and send a new messsage) without having a global state of registered handlers.
13:25noncomhere: https://www.refheap.com/17401
13:25noncomplease notice the commentaries below the actual code
13:28noncomthere is math stuff on calculating splines, I think you can disregard the equations since they don't seem to play the role..
13:28stuartsierranoncom: Timing single function calls on the JVM is almost meaningless.
13:30noncomstuartsierra: well, it is very real that the increase of +0.10ms in this case accumulates into a huge lag with 10000 splines. and the repeatability of the measurement assures it is not meaningless
13:30noncommaybe fighting it is meaningless though.... thus i'm asking if i missed something
13:31tbaldridgeyou're going to notice a better perf boost by worrying about the following
13:31tbaldridgea) turn catmull-rom into a protocol/deftype
13:31tbaldridgeb) typehint point so that the values are unboxed
13:32tbaldridgec) don't use reduce, as it performs at least one allocation per step
13:32tbaldridgethose three should make a pretty big difference
13:33stuartsierraAnd run a profiler.
13:33noncomwow, interesting. so i will try this. however, could you explain more on "typehint point" - where exactly do i place typehints?
13:34noncomstuartsierra: please suggest a good $$$-free one for clojure.. on Java I used to use VisualVM, but it is not so good for Clojure
13:35tbaldridgenoncom: looking at it now, it doesn't matter for most of the args, so perhaps don't worry about that. Do the other two things, then profile and look out for boxing
13:36stuartsierranoncom: VisualVM works fine.
13:36stuartsierraYou get used to interpreting the stacks.
13:36sritchieanyone here using core.typed?
13:37sritchieI was just curious about support for type parameters, like a List[T]
13:37noncomthank you, i have recorded your instructions, i have to go now, gonna try out some time later today and see what comes with it!
13:41jweissif I want to write :^blue (my-macro "arg1") and have it return a value with the metadata {:blue true} can i capture that? i am guessing in the &form param?
13:43jweissnevermind, easy enoough to try at the repl. works
13:44jweisshacky perhaps, but easier to write than (with-meta (my-macro "arg1" {:blue true}))
13:44jweissoops (with-meta (my-macro "arg1") {:blue true})
13:45futilejweiss: not that much easier, and perhaps not clearer.
13:47jweissfutile: yeah, but in my case i feel the ease wins because of the number of times we'll have to write this construct
13:47dnolensritchie: might want to ask on the core.typed lisp too, but I'm pretty sure you can do that.
13:47futilejweiss: sounds like maybe a list is in order
13:47futileor vector
13:47sritchiednolen: I just tracked down the (Seqable a) example
13:47sritchiewhich is exactly what I want
13:47dnolens/lisp/mailing list
13:47sritchiednolen: lisp on the brain
13:49jweissfutile: yeah, actually that probably is better. could probably just make a fn take a 2nd arg (a keyword) and add {kw true} as meta
13:49jweisssince in my use case there will be at most one flag in the meta
13:49fowlslegsI'm having problems passing a function as a string to the reader macro.
13:49fowlslegs,(re-seq #"<" "(fn [x y] (< (count x) (count y))")
13:49clojurebot("<")
13:50fowlslegs,(#(re-seq #"<" "%") (fn [x y] (< (count x) (count y))))
13:50clojurebot#<ArityException clojure.lang.ArityException: Wrong number of args (1) passed to: sandbox$eval57$fn>
13:50fowlslegsWould anyone be so kind as to show me what I'm doing wrong?
13:50jweissfowlslegs: there's just a regex reader macro there
13:50jweissnot sure what you are trying to do
13:51TimMcWhat you're trying to do is probably impossible, at least in the proximate step. What is your larger goal?
13:52fowlslegsTrying to make a reader macro form that takes an anonymous fxn as it's argument and evaluates whether it contains a symbol or not.
13:52TimMcs/proximate step/proximal sense/
13:52jweissyou mean an anonymous function form?
13:53fowlslegsjweiss: I suppose.
13:53fowlslegsTimMc: It's for a 4clojure.com problem, but I want to avoid direct help or other suggestions of how to solve it.
13:54jweiss,(read-string "#(foo %)")
13:54clojurebot(fn* [p1__91#] (foo p1__91#))
13:54jweissfowlslegs: so you can see that by the time that string comes back from the reader it's (fn* ...)
13:55jweissthen given that assumption you can look for symbols after the first item
13:55jweissor i suppose after the 2nd item
13:56fowlslegs,(read-string '#(+ % %2))
13:56clojurebot#<ClassCastException java.lang.ClassCastException: clojure.lang.PersistentList cannot be cast to java.lang.String>
13:56fowlslegs,(read-string "'#(+ % %2)")
13:56clojurebot(quote (fn* [p1__150# p2__151#] (+ p1__150# p2__151#)))
13:56jweissfowlslegs: you don't need to quote since you're only reading, not eval'ing
13:57jweissquote just protects data from eval, not read
13:59fowlslegsSo when I have a form like (#(read-string %) (fn [x y] (+ x y))) will the fn form always be evaluated no matter what I put before or after the % symbol?
14:04technomancyfowlslegs: yeah
14:04jweissfowlslegs: yes. read-string takes a string
14:05jweissbut even if you pass in a form, if it's going to a function it gets evaluated before the fucntion is called. so it'll be a function object, not the list form
14:05jweissthe only way to get at the original form is if you're passing it to a macro.
14:06jweissfowlslegs: if you're trying to just find out if a list contains a symbol, that will not involve any macros at all
14:06jweissreader or otherwise.
14:07TimMcfowlslegs: Which 4clojure problem is this, out of curiosity?
14:07TimMcI won't spoil it.
14:08fowlslegs166
14:09fowlslegsjweiss: How can I do it instead?
14:09TimMcWell, I think it's safe to say you shouldn't be mucking about with the reader or eval for this one.
14:10jweiss,(some symbol? (flatten [1 2 3 '(foo "hello" (bar 1))]))
14:10clojurebottrue
14:10jweissthat's if you don't care where the symbol is.
14:17fowlslegsArg I really don't like this problem.
14:21bbloomfowlslegs: you definitely don't need read-string or need to analyze symbols to do that problem maybe you should try another approach
14:21TimMcfowlslegs: It's a math problem, not a data structures problem.
14:22timvishercemerick: looks like i'm no go again. 0.1.0's start-server is wildly different than 0.1.1-SNAPSHOT's and doesn't seem to support any sort of configuration.
14:22timvisherOf course i could just go ahead and install 0.1.1-SNAPSHOT locally
14:22timvishermeh, i'll give that a shot
14:25cemericktimvisher: it's available in clojars
14:25cemericksorry, should have pointed out that it was on master only :-/
14:28fowlslegsGot it.
14:28Qerub(keyword 'foo) => :foo, but (symbol :foo) => ClassCastException. Anyone else thinks it would be nice if the second one also worked?
14:29fowlslegsI misread the last test.
14:29justin_smithQerub: ,(-> :foo name symbol)
14:30fowlslegsBasically thought that I would have to see whether the fxn was using the < or greater than operand because the logic of the last example was reversed, but then I realized it was a "logical double-negative"... whatever that means.
14:31TimMcYep. :-)
14:31fowlslegsNothing really, but I lack the vocabularly to accurate describe the source of my misunderstanding.
14:31fowlslegsaccurately*
14:33timvishercemerick: lol. no problem. i should've checked clojars as well anyway. :)
14:33timvisherso where exactly is the root of the server it's starting up?
14:34timvishercemerick: here's what i'm going with so far https://github.com/timvisher/bible-plan/blob/austin/src/clj/austin.clj
14:35timvishertrying to not muck around with system variables and such
14:35timvisherthat appears to be working ok except that i can't visit the index.html file in a browser anymore.
14:35timvisherit does give me a nice stable repl url though
14:36cemericktimvisher: hey, not bad!
14:36cemericktimvisher: it or something like it could be a nice addition to cemerick.austin.repls
14:37cemericktimvisher: what happens when you open the file directly? The browser-REPL won't work, but the page should still load...?
14:37timvisheryep
14:37timvishercomplete with water slide
14:37timvisher:)
14:37cemerickwater slide?
14:38timvishersorry. emperor's new groove quote
14:38timvisher:)
14:38timvishergreat movie by the way lol
14:38timvisherbut then again i have kids
14:38cemerickmissed that one :-)
14:39bbloomcemerick: it is a great movie. even if you don't have kids :-P
14:40timvisherdefinitely spades best role :)
14:40tomjackhmm https://github.com/relevance/edn-ruby#metadata
14:41timvisherso how can i get the index.html page to be served up? i was assuming that's what the :static-dir key was supposed to do
14:41bbloompersonally, i'm partial to that guy who plays Putty on Seinfeld
14:41tomjackmetadata is not in the edn spec
14:42Raynescallen: I thought they merged your pull request?
14:42Rayneshttps://github.com/mxcl/homebrew/pull/21733#issuecomment-22340993
14:43futileGot a Clojure challenge for anyone interested:
14:43futileWrite idiomatic code that does two things. Given an input string, give a list of all lines ending in \n, with the \n included. If the last line does not end with \n, give that separately. Perform some user-defined action on each line from the first step, omitting any final line not ending with \n.
14:44shaungilchristtomjack: yeah I am curious about metadata being added to the spec as well
14:44Raynesfutile: 'give that separately'
14:44tomjackguess it's tricky because of all the platforms which must be supported
14:44RaynesDon't know what that means in this context.
14:45callenRaynes: yeah I did too.
14:45tomjackbut collections as values is already pretty tricky :)
14:45shaungilchristI imagine it could be treated like comments or discard for platforms that do not care
14:45Raynescallen: I'm officially sick of homebrew.
14:45Raynes:\
14:45callenRaynes: yeah me too.
14:46technomancyswitch to nix you guys
14:46futileRaynes: not as part of the list
14:46futiletechnomancy: but i like being able to plug into projectors and have it work
14:46futileoh wait, no i dont
14:46callenRaynes: they've broken my spirit.
14:46timvishertechnomancy: cause apt is better? :)
14:46Raynesfutile: Still not telling me what you want.
14:47futiletechnomancy: but i like being able to watch Department of Eagles on Youtube
14:47technomancyfutile: not nixos silly
14:47RaynesDo you want [[stuff] last-line]?
14:47futileRaynes: https://gist.github.com/sdegutis/6187110
14:47futileHere's two simple test cases for the challenge: https://gist.github.com/sdegutis/6187110
14:47technomancythe whole "X can't hotplug dispalys" stereotype is like five years out of date anyway
14:48RaynesThis isn't much of a challenge
14:48technomancybut nix is supposedly cross-platform
14:48futileRaynes: it's not supposed to be super hard
14:48futileRaynes: it's supposed to let you show off the language in its most idiomaticness
14:48futileor however that would be Enlished up
14:48futileEnglished
14:48RaynesPerforming side effects. Heh.
14:48futileRaynes: the only side effect here is "print foo"
14:48futileetc
14:49futiletechnomancy: what's nix
14:49futilethe package manager?
14:49technomancyyeah
14:49futilea really nerdy smart colleague of mine liked it a lot a year ago
14:49futile.... i havent heard from him since
14:50technomancyhe's probably transcended human form
14:50technomancyturned into a being of pure thought
14:50futiletechnomancy: seriously though you'll love this: http://www.youtube.com/watch?v=8mt6xzhha58
14:50technomancytoo busy contemplating the mysteries of the universe to communicate with lowly flesh-forms
14:51Raynescallen: You should play Left 4 Dead 2 with me sometime.
14:51futiletechnomancy: well all we have to do to get him back is revert to the previous sha. its immutable after all right?
14:51justin_smithxrandr+dwm is more predictable from anything my osx mountain-lion has ever done with external displays
14:51justin_smiths/from/than
14:51technomancyfutile: makes sense to me
14:52futileOH NO NOW WE'RE AT THE QUESTION OF IDENTITY
14:52justin_smithxrandr --output DP-2 --auto --left-of LVDS-0 # gives me an external display on the third display port
14:52futileno takers?
14:53noonianRaynes: I think version 1.4.4 of me.raynes.fs might be missing a dependency. 1.4.0 works for me, but with 1.4.4 I get this: "ClassNotFoundException java.nio.file.Files java.net.URLClassLoader$1.run (URLClassLoader.java:202)"
14:53callenRaynes: maybe.
14:54callenRaynes: I've been playing Last of Us multiplayer lately.
14:54Raynesnoonian: Requires Java 7.
14:54noonianRaynes: ahhhh
14:54Raynesnoonian: We fucked up and did a breaking change release without incrementing the major version. Sorry. :(
14:54noonianI've heard installing Java 7 on osx is more trouble than its worth :(
14:54RaynesReally?
14:54RaynesI have it by default...
14:54nickmbaileywasn't bad at all
14:55nickmbaileyhave to download it from oracle but it was easy after that
14:55Raynesnoonian: http://www.java.com/en/download/index.jsp
14:56mattmossInstalling Java 7 on OSX is trivial. Getting things to run with Java 7 on OSX is a pain.
14:56noonianlol
14:56Raynesmattmoss: Like what?
14:56Raynes:\
14:56noonianyeah thanks, I can't just go ahead an do it because I'd break the code for my coworkers who don't have Java 7
14:56Raynesnoonian: 1.4.5
14:57Raynesnoonian: IIRC, we released that to selectively do the imports/function defines that require java 7 only if java 7 is installed.
14:57mattmossRaynes: Well, at least for me, most things dealing with graphics, esp. OpenGL, is borked, because (IIRC) how you access gfx context was changed in a breaking manner.
14:57noonianRaynes: nice! that works for me, thanks
14:57callenRaynes: I'm smashing him in the dick.
14:58callenI'm just pissed now.
14:58Raynesnoonian: But keep in mind that when I release 2.0.0 (which will be the next version), we'll be deprecating Java 6 support because there is too much good stuff in nio.
14:58callenThis is probably the last time I will attempt a contribution to homebrew.
14:58mattmossEg. Minecraft would not run for longest time until lwglw (or whatever the f it's called) had to be fixed.
14:58Raynescallen: Please be careful.
14:58Raynescallen: One wrong thing could make this go right off the rails.
14:58RaynesTrust me, I'm angry too.
14:58callenRaynes: it was subtle and had a good tone.
14:58mattmossNot that minecraft is the pinnacle of Java development...
14:58callenRaynes: look for yourself.
14:59technomancyRaynes: is this about the clojurescript thing?
14:59callentechnomancy: no
14:59callentechnomancy: this is about nuking the broken Clojure formula on homebrew.
14:59callentechnomancy: I'd REALLY like it if you spoke up for what we're doing on the thread.
14:59callentechnomancy: https://github.com/mxcl/homebrew/pull/21733#issuecomment-22340993
14:59noonianRaynes: thanks for the warning, I'll start investing in preparing to move everyone to 7
14:59callenI put in a blacklist to tell the user to use Leiningen instead.
15:00Raynesnoonian: Cool. I believe mattmoss about the things he mentioned, but it is generally really painless. I've never had a single stray problem with java 7 (haven't done gfx stuff).
15:01technomancycallen: I'll poke my head in
15:01timvishercemerick: sorry. got no more time for this atm. when i load up the index.html file from a localhost server austin claims that a session with that id doesn't exist. i'll try to dig into it more later. still, looks promising, if a bit hacky. thanks for your help!
15:01noonianyeah, I haven't had problems trying myself, but googling it a month ago turned up some stuff that convinced me to wait
15:01timvisherhttps://github.com/timvisher/bible-plan/commits/austin
15:01Raynestechnomancy: Very appreciated it. Not asking you to get involved with the shitstorm, just a little "I support this because x" comment might be helpful to our cause.
15:01TimMccallen: I notice http://clojure.org/getting_started wasn't linked.
15:02TimMcAuthoritative, and it says "The vast majority of Clojure developers use Leiningen to create and manage Clojure projects."
15:02RaynesTimMc: Someone did link it!
15:03RaynesBut every time it's about to get merged some random Ruby programmer hops in to say "UHHH I DUNNO GAIS MAY B WE SHOULDN'T"
15:03RaynesI don't mean to be bitter about it, but I'm frustrated.
15:03kmicuIt's a b... It's a b... It's a small, off-duty Czechoslovakian traffic warden!!
15:03technomancymight have been better not to mention the clojurescript one at all
15:04TimMcRaynes: I do not see the link.
15:04callentechnomancy: yep
15:04callenRaynes: I'm hunting him down in the machomebrew channel.
15:04callenTimMc: I just added it anyway.
15:04callento reiterate the matter.
15:04RaynesTimMc: https://github.com/mxcl/homebrew/pull/21733#issuecomment-22307159
15:04TimMcgood good
15:05callenis this what people trying to add/remove packages to Debian go through?
15:05tomjackt
15:05technomancycallen: Debian has actual release management
15:05TimMcRaynes: Not to be obtuse, but that's not a link and I don't know what the "get clojure" page is.
15:06callenRaynes: he wants a week. it's 1147 on the 8th of August. I'm going to be right back in this thread in a week
15:06RaynesTimMc: He explicitly mentioned that it's from the official Clojure homepage.
15:06callenhe asked for a cooling off period, I'm giving it to him.
15:06Raynescallen: I'm just baffled at what he thinks is going to happen in a week.
15:06callenRaynes: it's not like he's going to research anything.
15:07callenIf he were apt to research anything, we wouldn't have needed to say so much.
15:07callenthat's also why I'm hunting him down in the homebrew IRC channel.
15:07Raynescallen: I feel like despite our best efforts, he thinks that a storm of angry Clojure programmers are going to rush in in defense of this 6 line shell script.
15:07callentechnomancy: I don't need a reminder, hate sharpens the memory.
15:08callennobody that actually writes any Clojure code uses that formula.
15:08justin_smithwhich would explain who knowledgable callen generally is
15:08RaynesHis latest comment "Unrelated to this PR: perhaps the homepage should not suggest the "Minimal Install"."
15:08RaynesWhy are Ruby programmers trying to shit on our lawn? :(
15:08technomancyRaynes: "YA THINK"
15:09callenjustin_smith: help me out, I didn't grok that. :(
15:09technomancyjustin_smith: haha
15:09justin_smithsorry, "callen: I don't need a reminder, hate sharpens the memory." "which would explain how knowledgable callen generally is"
15:09justin_smithtypo
15:10justin_smithremember ages ago when I started cussing about homebrew? I hated homebrew before it was cool
15:10callenjustin_smith: I saw the sequencing of statements, I don't know if it's intended to be a stateful about my being hateful, ignorant, or both.
15:11callenI'm not even reacting to it with vitriol, I'm just confused and curious.
15:11justin_smithhateful and wise
15:11callenI'm down with being a Zen bastard.
15:11Raynescallen: It looks like he is saying you hate things and hate sharpens the memories and thus you're knowledgeable and smart.
15:11justin_smithI figured that was what you were going for
15:11callenRaynes: <3
15:11callenjustin_smith: if you think being in IRC with me is bad, imagine how the third party providers to my company have it.
15:12callenI'm putting them through the wringer on OAuth2 right now.
15:12Raynescallen: We should perhaps hunt down links to IRC logs where users installed this piece of junk and we had to tell them to use leiningen instead
15:12callenRaynes: what's the most complete log of this channel?
15:12RaynesProbably mine, but they're not easily searchable.
15:12RaynesWe should use n0ise I expect.
15:13callenwith search
15:13callenokay
15:13callenRaynes: don't link them to the logs.
15:13callenRaynes: we can't use the logs.
15:13callenNot really.
15:13justin_smithyou're just embarrassed by what you said
15:14callenjustin_smith: well I was ranting about homebrew's maintainers.
15:14callenjustin_smith: I'm being politically savvy, not embarrassed.
15:14calleneverything I said about homebrew was true.
15:15Raynescallen: http://www.google.com/cse?cx=partner-pub-1237864095616304%3Ae7qm3gycp2b&amp;ie=UTF-8&amp;q=%22install+leiningen%22&amp;sa=Go&amp;siteurl=clojure-log.n01se.net%2F&amp;ref=&amp;ss=4728j746238j38#gsc.tab=0&amp;gsc.q=%22install%20clojure%22 fwiw
15:15noonianis homebrew the piece of junk you guys are referring to? or some other piece of software?
15:15Raynesnoonian: The Clojure formula specifically is a piece of junk.
15:15noonianah
15:15callenRaynes: still not a good idea. there could misuse other conversations on there.
15:15callenRaynes: I really don't think it's a good idea to bring in more data at this stage.
15:16callenthey'll just misread the conversations.
15:16callenI'd let it lie for a week.
15:16callenWe've already won, now we just wait.
15:16mgaarewhat is the use case of homebrew instead of just using lein?
15:16Raynescallen: FWIW, probably shouldn't say things in a publicly logged channel that you're not willing to let people see.
15:16callenand potentially threaten Mike McQuaid's family.
15:16callenmgaare: retardation.
15:16Raynesmgaare: There isn't one.
15:16callenRaynes: I know.
15:16RaynesJust stubbornness at this point.
15:16callenI stand by what I said, it's just inconvenient for the purposes of that PR
15:16mgaareI'm on mac and every time I think to reach for homebrew I get a little shudder of dread
15:17callenmgaare: good.
15:17callenI use a mac and homebrew, but I'm not apt to be happy about either of those things.
15:17cemerickRaynes: man, what's with the packaging crazy lately?
15:17cemericks/lately/
15:17technomancydebian is getting lein2 soon you guys =)
15:17ystaelcallen: not 'apt' to be happy /groan
15:18cemericktechnomancy: right about the time v3 goes into beta or something? ;-(
15:18cemericker, ;-)
15:18callenystael: oh good, you noticed. :)
15:18technomancycemerick: 3.0 is kind of just an idea at this point
15:18noonianwell, when I started with clojure my first instinct was to see if homebrew had it and install from there
15:19callennoonian: we know a lot of people do it. that's why it's important to unfuck the situation.
15:19cemericktechnomancy: I know, just snarking at the latency
15:19technomancynix has the latest though! =)
15:19justin_smithyour choices in package management: do something totally fucked up immediately, do the best thing but take for fucking ever to get around with it
15:19justin_smith*around to it
15:19futileso, no takers?
15:20technomancyjustin_smith: the great thing is they're not mutually exclusive =)
15:20futilere: https://gist.github.com/sdegutis/6187110
15:20justin_smithoh yeah, you can get both
15:20noonianimo the clojure formula should just install leiningen and make a clojure-no-lein formula or something if you really just want the jar stuck somewhere or however it does it
15:21technomancynoonian: no one has ever wanted the latter =)
15:21Raynesnoonian: The non-lein formula is literally 'unzip and here's a 6 line shell script have fun doing nothing'
15:21RaynesI can write that with my feet on a broken keyboard in 30 seconds.
15:21RaynesDon't need a confusing formula to do it for me.
15:21mgaarecan you get the brew recipe for clojure to echo something like, "Listen, there's a clojure tool called leiningen that's quite good and, frankly, easier to deal with if you just install it yourself. Are you sure you want to proceed with this?"
15:21technomancymgaare: that's basically what's proposed
15:22timvisherRaynes: you are pretty good with your feet though.
15:22mgaaretechnomancy: righto then :D
15:23noonianhaha
15:24technomancymuhoo: fixed your trampoline bug =)
15:26noncom|2(reduce) generates an additional collection during its work. this overhead is undesirable for me in the current task. how can i substitute reduce?
15:27noncom|2with core.reducers/reduce maybe? or some other technique?
15:27justin_smithfutile: https://www.refheap.com/17407
15:28futileneat solution
15:28Rayneswar
15:28justin_smithnot concise, but I hope clear
15:28futilelooks just like my first one. great minds think alike etc :P
15:28Rayneswat
15:28Raynesjustin_smith: This doesn't even work.
15:28RaynesRight?
15:28justin_smith?
15:28justin_smithwhy not?
15:29Raynesjustin_smith: Splitting on \n removes the delimiters.
15:29futilejustin_smith: also thats not a user-given action, thats hard-coded ;)
15:29justin_smithyes
15:29futileRaynes: the "ln" in "println" adds them back ;)
15:29justin_smithI check the end of the string for newline
15:29justin_smithbefore splitting
15:29justin_smithso it works
15:29RaynesI see.
15:30Raynesjustin_smith: (.endsWith str "\n")
15:30justin_smithyes, much nicer
15:30justin_smithsplitting loses information about ending on a delimiter, I have often had to deal with that
15:31justin_smithI should write a "strict-split" that puts a nil at beginning and or end if starting / ending with a delimiter
15:31justin_smithnow that I think of it
15:31cemericktechnomancy: nix?
15:32kmicu$google nixOS
15:32lazybot[About NixOS] http://nixos.org/nixos/
15:32justin_smithnil at beginning or end if delimiters are there makes split / join be proper complementary functions
15:33hiredmannoncom|2: what makes you say it generates an additional collection?
15:35Raynescemerick: You're a gentleman and a scholar.
15:35cemerickRaynes: you should tell people, no one believes me
15:35cemerickkmicu: thanks, cute
15:35Rayneskmicu: cemerick just called you cute
15:38cemerickRaynes: The fellow looking to package cljs is _really_ motivated!
15:38Raynescemerick: Forgot the damned dot.
15:38dnolencemerick: motivated towards what I'm unable to comprehend
15:39cemerickdnolen: 'single-shot compilation' appears to be the key phrase
15:39Raynescemerick: Which surprised me, since he hasn't once said "I need it".
15:39noncom|2hiderman: i have heard it here before and i may pay to the bottleneck critical section
15:40cemerickRaynes: my (rare) previous exposure to processes packaging Java bits is that packagers are rarely users of the things they package.
15:40hiredmannoncom|2: so you ahve no evidence of it?
15:41noncom|2hiderman: true...
15:43hiredmannoncom|2: if you are not working based on evidence, your "critical section" may or may not be a real bottleneck.
15:43hiredmannoncom|2: get a profiler, get empirical
15:43noncom|2hiredman: yes, this is very sober
15:44nooniannoncom|2: pity :P
15:44noncom|2noonian: beauty :)
15:51Raynestechnomancy, TimMc, nDuff: http://identity.mozilla.com/post/57712756801/persona-makes-signing-in-easy-for-gmail-users
15:52RaynesI guess technomancy doesn't care since he boycotted gmail.
15:52RaynesBut sane people will be happy about this.
15:54futileWell since everyone seems done with the challenges, here was my solution: https://www.refheap.com/16959
15:54futileThat version admittedly doesn't preserve the newline at the end, but it would be easier to add between lines 5 and 6.
15:55technomancyRaynes: at this point the best way to get me to switch would be to steal my laptop and (defalias 'scpaste 'refheap-buffer) without my knowledge
15:55RaynesHahaha
15:55technomancyactually my dotfiles are OSS; go submit a pull request instead =)
15:59TimMcRaynes: I boycotted gmail some years ago too.
15:59RaynesThis channel is really full of hipsters.
16:00TimMcand I would encourage you to do the same, for that matter. :-P
16:00technomancyflee the coming googpocalypse
16:00maharjI just found out there's a way to preserve delimiters on str/split with (?= and (?<= Really neat I should say.
16:00hyPiRionRaynes: Go make that Elixir mail server I told you to already.
16:00RaynesSure, let me just give up email addresses I've been using for years, the app I use on my phone to read my email, and...
16:01technomancyjust wait till you won't be able to sign into gmail without using G+
16:01technomancyit won't be long
16:01glosoliWhat does one use for debugging Clojure in Emacs ?
16:01technomancyRaynes: don't you have raynes.me?
16:01llasramglosoli: println, personally
16:01Raynestechnomancy: Not my only email address.
16:01TimMcRaynes: Good job, bro.
16:01glosolillasram really??
16:01lazybotglosoli: What are you, crazy? Of course not!
16:02technomancyRaynes: I've been forwarding technomancy@gmail.com to hagelb.org for years
16:02hyPiRiontechnomancy: whaa, you actually have a gmail.com address? maniac
16:02RaynesYou're all bad people.
16:02TimMcRaynes: brainonfire.net used to be backed by gmail, then by lavabit, and now by cotse -- and people who email me don't know the difference.
16:02technomancyhyPiRion: from my college days
16:02glosolillasram: I can't git if you are just joking or not :?
16:03llasramglosoli: Well, println plus thinking all the way through the problem
16:03technomancyhyPiRion: you know, before it was obvious Google was going to turn evil
16:03glosolillasram hmm seems kinda uncomfortable but thanks
16:03llasramglosoli: Give it a try some time :-) Otherwise, I'd look at ritz
16:04llasramglosoli: https://github.com/pallet/ritz
16:04glosolithanks
16:04hyPiRiontechnomancy: I kind of feel like every company will turn evil at some point. I'm a bit pessimistic.
16:04TimMcOr they go under, or change their domain name...
16:05TimMcBasically, if you're *actually* concerned about maintaining an online identity, it's pretty important to use services that allow you to attach your own domain name.
16:05ddellacostais there a way to stub a pojo's method using with-redefs?
16:06llasramddellacosta: Nope -- `with-redefs` works on Vars
16:07llasramddellacosta: You can `proxy` to create an (anonymous) sub-class, if that could work
16:08TimMcThe number of times I've written (defn now [] (System/currentTimeMillis)) just so I can write tests...
16:08ddellacostallasram: I tried something like that, but it turns out I'm trying to proxy an Interface, which doesn't (seem to) work. Note: total newb with this kind of Java-interop in Clojure, as of yesterday
16:09ddellacostaalthough I'm finding proxy to be a lovely thing in and of itself, very handy
16:09llasramddellacosta: Oh, you need an implementation of an interface, then that's what `reify` is for
16:09llasrams,you need,if you need,
16:10ddellacostallasram: gotcha, thank you!
16:12ddellacostahuh, some people on the interwebs are saying that reify is generally preferable to proxy, across the board, if possible to use. Is this the current conventional wisdom?
16:14stuartsierraddellacosta: yes, when implementing interfaces only, `reify` is faster and more interoperable than `proxy`.
16:14ddellacostastuartsierra: thank you!
16:16callenddellacosta: proxy is sometimes necessary if you're doing black magick though.
16:16tcrayfordlike interfacing with a scala library that doesn't use an interface where it should
16:16tcrayford:(
16:16callenddellacosta: usually involving interop.
16:16callentcrayford: lol, yep.
16:16ddellacostacallen, tcrayford: gotcha…haha
16:17tcrayfordlet's just make this thing an abstract class where all the methods are also abstract. Definitely shouldn't make it an interface, no sir
16:17callenmost Clojure pain is just dealing with the sins of other communities.
16:18callenwe're not blameless but it's disproportionate.
16:20ddellacostacallen: seems like (one of) Clojure's purpose(s) is in fact to mitigate the pain of dealing with the frustrations of other environments
16:20ddellacostawhoops, meeting
16:20nDuffRaynes: Doesn't work with my AFYD address.
16:21wastrelhi speaking of sins, how do i consume a wsdl thingy in clojure
16:21callenddellacosta: yeap. Design priority.
16:21nDuffRaynes: ...for gmail.com addresses, great, _but_.
16:21wastreli want to be able to talk to this web service but it provides no documentation beyond a wsdl file, never heard of wsdl before :]
16:21llasramtcrayford: a few high-profile projects have switched from interfaces to ABCs pretty deeply: Hadoop and Netty come to mind, but I'm sure there are others
16:21nDuffRaynes: ...asked their IRC channel about the state of AFYD support, and apparently it's back-burnered right now.
16:22tcrayfordllasram: the thing I'm using is github.com/boundary/ordasity. It saves me from doing leader election in the distributed system I'm building.
16:23llasramInteresting
16:23callentcrayford: I'm a little puzzled as to why you're not using Zookeeper directly.
16:23callenwanted the shake-n-bake clustering I guess?
16:24tcrayfordordasity handles a load of distributed logic. It's not single node leader election
16:24tcrayfordmore
16:24tcrayfordI have these 64 queues that pump into stateful consumers, balance them and allow me to do failover
16:28timvisheri have basic clojure code that works entirely independently of clojurescript. i'd like to be able to store that in plain 'ol clj files under src/clj in https://github.com/timvisher/bible-plan. how do i go about doing that?
16:28timvishercan i reference namespaces from clj but not the other way around?
16:29timvisherobviously assuming that nothing platform specific is happening.
16:33callentimvisher: try it
16:34timvishercallen: 'try it', he says. 'worst that can happen is it doesn't work', he says. sheesh. it's like i'm an animal or something. :)
16:39dnolentimvisher: if you want to share code between CLJ & CLJS you will need to use lein cljsbuild crossovers or cljx
16:41timvisherdnolen: i have an ns with nothing but a map with keywords, ints, and strings in it.
16:42timvisheri'd need cljx or cljsbuild crossovers for that?
16:42timvisherto be fair, i haven't 'just tried it' yet
16:42timvisher:)
16:42dnolentimvisher: it won't work
16:42timvishersweet. that's what i was hoping someone would say
16:42timvisherlol
16:42timvishersaves me the time
16:42timvisherinteresting
16:42dnolentimvisher: there's no support for sharing code out of the box
16:42timvisherany pointers to docs on that?
16:43dnolentimvisher: never used code sharing features so I'll defer to someone else who has
16:43timvisherfor my own info, cljx is specifically for when you have a library that needs to one thing on platform and another thing on another right?
16:43cemericktimvisher: cljx docs are pretty decent
16:44cemerickNot just, no. Even if your namespace is 100% portable (and so crossovers work), there's no REPL support.
16:44timvisherit's really not that big a deal anyway, it's just that the browser repl is so slow compared to the jvm repl so i'm hoping that i can work on the platform agnostic stuff from jvm clojure and then just import to clojurescript when i need to run it
16:45cemerickdoes anyone see >40% CPU when running cljsbuild auto these days?
16:45rorschachcommon lisper here…how difficult is it to switch over to clojure?
16:45timvishercemerick: i'm way above that on my 11" air
16:45cemerickThat's crazy, especially since I'm on JDK 7. But even so, scanning the whole directory tree shouldn't cause that.
16:46timvisherwell, actually i shouldn't have spoken so fast. I'm talking about running a once
16:46ToxicFrogrorschach: try it and see? Clojure places a much heavier emphasis on FP and immutability than CL does, and is a lisp-1
16:46timvisherpresumably auto does less work each time?
16:46callenrorschach: I'm an ex-CLer. Just teryi t.
16:47callentry*
16:47technomancyrorschach: the hardest part is un-learning all your bad habits
16:47rorschachhaha alright, I'll give it a shot…my current company is interested in utilizing it
16:47rorschachthanks
16:47callentechnomancy: I thought you came from PLT Scheme?
16:47callenyou can't be serious about the elisp bit.
16:48ToxicFrog(personally I don't like CL or elisp, so moving to clojure was very easy~)
16:48technomancycallen: no; I only picked up scheme recently
16:48technomancy(unless you count implementing it)
16:48technomancycallen: I did ruby because I knew I couldn't get work in lisp =P
16:48technomancybut I had way more fun with elisp while I was waiting around for clojure than I did with ruby
16:49callentechnomancy: I knew about Ruby and was able to guess the 'why' behind it.
16:50timvishercemerick, dnolen: thanks for the info. poor man's solution is to simply `C-c C-l` the file from the jvm repl. wazam, you've got the ns!
16:50timvisher:)
16:50callen"raganwald: Engineering TDD: Drive bus into a river. Build bridge. Drive another bus across the river and into tree. Cut down tree. Drive a third bus..."
16:50fikuszI prefer clojure the language very over CL, but I'm missing the performance / stability CL has to offer
16:51fikuszthe clojure repl takes half a minute to start up on my laptop
16:51callentechnomancy: the weirdest conversation I ever had was with a Rubyist that had done Smalltalk and didn't believe me that Common Lisp impls had images too.
16:51callenfikusz: that's extreme.
16:51technomancycallen: hehe
16:51callenit shouldn't take anything close to 30s.
16:51fikuszcallen: I guess it's the jvm
16:51callentechnomancy: that was around the same time I started assuming 80% of Rubyists were huffing paint.
16:51callenfikusz: I mean, it is, but that
16:52callenis still way too long.
16:52callenfikusz: what sort of machine is it?
16:52gfredericksis (= (type :foo) (type "foo")) a known problem in cljs?
16:52fikuszcallen: it's an older DELL, let me check...
16:52technomancyclojurebot: faster lein?
16:52clojurebotCool story bro.
16:52technomancybleh
16:52hiredmanfikusz: startup time is a not really performance, it is cold start time
16:53bhaumanrorschach: it's really helpful to have a good book while exploring. http://pragprog.com/book/shcloj2/programming-clojure
16:53technomancyclojurebot: faster lein is tricks for helping speed up start time for Leiningen: https://github.com/technomancy/leiningen/wiki/Faster
16:53clojurebot'Sea, mhuise.
16:53callenwhy does Clojurebot speak Irish?
16:53fikuszhiredman: ok, but if I use the repl a lot, it starts to eat away my memory as well
16:53rorschachis programming clojure or clojure programming better?
16:53fikuszhiredman: so I have to restart it, which again takes ~30sec
16:53hiredmanfikusz: if you set the max heapsize it will never use more than that
16:54callentechnomancy: you could mention pomegranate in the bit about having to restart when changing dependencies.
16:54bhaumanrorschach: both books exist
16:54callenrorschach: clojure programming (clojurebook.com) is superior.
16:54bhaumanrorschach: but I like the one I sent to you better
16:54technomancycallen: still super unpolished
16:54callenI know.
16:54callenI strongly disliked programming clojure.
16:55hiredmanfikusz: if you use lein you can set that using :jvm-opts, -Xmx1g for a 1gig heap
16:55fikuszcallen: well the machine is a core2 with 4 gigs of ram
16:55callentechnomancy: can cemerick be convinced to use some of his 100% time to improve it?
16:55callenfikusz: wtf dude.
16:55technomancycallen: no way to know without trying
16:55callencemerick: pomegranate.
16:55technomancyfikusz: I hack on a core2 with 4 gigs of ram
16:56pbostromlein repl can take a while for a big project, 22s on my newish MBP
16:56timvisheranyone aware of a libary that can take english blobs and return word counts?
16:56callenanything in a list of NLP libraries.
16:57hyPiRiontimvisher: yeah. It's called frequencies.
16:57callenor clojure.string/split " "
16:57callenoh you mean per word counts
16:57hyPiRion,(frequencies [:foo :bar :baz :foo :foo :baz])
16:57clojurebot{:foo 3, :bar 1, :baz 2}
16:57fikusztechnomancy: well I have no idea what's causing it, maybe leiningen, maybe something's wrong with my setup
16:57callentimvisher: you want an NLP library if you want suffix conflation.
16:57ToxicFrogfikusz: my server is an athlon 64 with 1GB of memory. 'lein repl' takes 10 seconds to start up with a cold cache.
16:57technomancyfikusz: try the wiki page I linked to above
16:57timvishercallen: that sounds so impressive. :)
16:57ToxicFrogAnd 5s with a warm one.
16:58technomancyCPU and ram don't have much effect on startup time; it's mostly IO
16:58fikuszToxicFrog: that's still a lot compared to CL I guess
16:58callentimvisher: what?
16:58ToxicFrogYeah, I'm more saying that if it's taking 30s on your much more powerful machine that's really suprising and a bit worrying.
16:58hiredmanit is true that the jvm will not release memory back to the os (once it grows its heap it hangs on to the memory for use in the future) but if you set the max heap to something you are comfortable with it will not grow beyond that
16:58callenunless it's got a 5400 RPM spinning rust drive.
16:59ToxicFrog(oh yeah, and I'm running raidz on an array in an eSATA enclosure, so io throughput isn't that hot either)
16:59callentimvisher: https://github.com/dakrone/clojure-opennlp
16:59fikuszcallen: I'm not sure what it could be, but I'm using distro defaults and my projects don't use that many libs
17:00technomancyfikusz: getting lein from your distro too?
17:00timvishercallen: sorry, i mean i've got no idea what nlp and suffix conflation mean
17:00callenif I had to guess, it's due to non-SSD
17:00callentimvisher: are kick and kicks the same word?
17:00fikusztechnomancy: no, I got it from git
17:00timvisherahah
17:00technomancyok, cool
17:00timvishercallen: no
17:00technomancyfikusz: wait, running from a checkout though?
17:00fikusztechnomancy: I only have the jvm from my distro
17:00callentimvisher: then you don't need it.
17:00callentimvisher: proceed.
17:00timvisherlol
17:00technomancyfikusz: running from a release is faster than running from a checkout
17:00fikusztechnomancy: not from a checkout, it's a release
17:00technomancyok, cool
17:01timvisherthe " " split is probably good enough
17:01fikuszfor example I have a small web-scraping project using clj-time and enlive
17:01timvisherit doesn't need to be exact anyway
17:01fikuszand that's it
17:01callentimvisher: http://writequit.org/blog/?p=351
17:01fikuszstill takes around 20s and it's my smallest project in clojure so far
17:02bts-is it possible, or does it make any sense to try, to run lein prep-tasks before loading code from my dev source-paths? i'm running thriftc as a prep task, but I have code that relies on that being done already in dev/user.clj
17:02timvishercallen: thanks for the links. looks like good information
17:03fikuszI really do love clojure, I'm only saying there is a big gap between it and something like SBCL for example
17:03hiredmanbts-: assuming dev/ is a source-path, user.clj is being loaded by the clojure runtime when the clojure runtime starts, it is not something lein has any control over
17:04technomancyfikusz: yeah, it sucks for small-profile things definitely
17:04bhaumantimvisher: NLP is natural language processing
17:04fikusztechnomancy: which could be really important for doing embedded work
17:04technomancyfikusz: that's why I'm learning ocaml
17:05timvisherbhauman: picked up on that at this point. looks much like much more than what i need.
17:05futileHow do you guys get anything done when you're chatting in IRC so often?
17:05timvisherthanks though!
17:05hiredmanfeh
17:05hiredmanpeople keep saying that
17:05technomancyfutile: /me glances around nervously
17:05futileTeach me your trick so I can do it too.
17:05hiredmanclojure runs great on my beagle bone
17:05timvisherfutile: most of these guys have at least 16 hyperthreaded cores in their wetware
17:05hyPiRionfutile: that's why I don't get anything done!
17:05hiredmanlittle arm SOC using oracle's arm jdk
17:05futiletechnomancy: how's leiningen 7 coming along?
17:05ToxicFrogfutile: oh, it's simple, you just fork() when you get in to work in the morning
17:05futile:D
17:05fikusztechnomancy: but why give up on lisp, when you have small-footprint fast implementations of other lisps available?
17:06futileToxicFrog: awesome
17:06fikusztechnomancy: like ecl
17:06hyPiRiontechnomancy: you've seen the new OCaml book which is in beta, right?
17:06technomancyfikusz: because not having nil is *awesome*
17:06futileso I'm dead serious about 2 projects now
17:06futilea clojure IDE, and a new language
17:06fikusztechnomancy: yeah, I like haskell too
17:06futileI've wanted to do both of them since I first started learning programming 15 years ago.
17:06technomancyfikusz: and the equality situation with other lisps is depressing
17:06fikusztechnomancy: it's good for robust programs, but it sucks for bottom-up development
17:06futile(except at the time it was just "a text editor" not a Clojure IDE)
17:06technomancyI care a lot more about referential transparency than I do about macros
17:07TimMccallen: Spinning rust drive... you mean one of these? http://farm1.static.flickr.com/43/102689398_c8a42b29e7.jpg
17:07technomancythat said my future will probably include a fair bit of racket
17:07hyPiRionI loved macros in CL, but somehow I've not used many in Clojure.
17:07futileI think doing a Clojure IDE written in Clojure using seesaw would be great, because there are so many tools available in Clojure for analyzing Clojure code.
17:07fikusztechnomancy: yes, referential transparency is great: but clojure can show us, that you can have the best of both worlds
17:07hyPiRionmade, not used.
17:08futiletechnomancy: wat!?
17:08futiletechnomancy: why not Clojure?
17:08bts-hiredman: hm. I am declaring that "dev/" is a source-path at the lein level though
17:08technomancyfutile: I'm a parent, so I'm a teacher. Racket is optimized for teaching. you do the math. =)
17:08fikuszfutile: have you tried running clojure on anything other than a pc? :)
17:09futiletechnomancy: oooh. meh I was gonna teach my son Clojure when he got a little more interested in programming
17:09hyPiRionfikusz: like humm, a browser?
17:09futilefikusz: i develop my clojure web app on my mac, since i dont have a pc, and run it on linux in ec2
17:09technomancyfutile: I don't think teachability is something you can bolt on if it's not a core value of the community. not in a way that comes close to what racket has.
17:09bts-hiredman: :profiles {:dev {:source-paths ["dev"]}}
17:09fikuszhyPiRion: well a browser is technically still on a pc I guess :)
17:09futiletechnomancy: maybe. im not a very good teacher so i wouldnt know
17:10jballanctechnomancy: ever thought of squeak (for teaching)?
17:10technomancyjballanc: a bit. I use Scratch a lot already.
17:10jballanccool
17:10technomancyI'm sure it brings along a lot of bad habits though
17:10fikuszfutile: I didn't mean servers, clojure is perfect for that. I meant small and underpowered devices
17:10technomancyvery imperative
17:11hyPiRionfikusz: sure, if you consider a smartphone a pc I guess. That said, I know Clojure performs poorly on smaller processors
17:11hyPiRion8080 would cringe if it even thought about it
17:11technomancyironically phones are much more personal than what most people think of as personal computers
17:11dnolenfikusz: depending on how underpowered ClojureScript works well
17:11jballancfikusz: any thoughts on Clojure on another, lighter runtime?
17:12fikuszalso applications like the ones in core-utils, the ones which you constantly and often. even a few-second startup time would make them really annoying and practically useless
17:12hyPiRionjballanc: tbaldrige has some ideas, see clojure-metal
17:12technomancyjballanc: there's a clojure #lang directive for racket; gets you a lot of the niceties
17:12callentimvisher: thank you for pitching in.
17:12technomancy700kb executables, 100ms startup time =)
17:12fikuszs/constantly/constantly use/
17:12hiredmanwhen people talke about clojrue not being good for "embedded devices" without specificy the profile of the device it drives me crazy
17:12jballancI've been working more with Lua recently, and been eyeing the clojurescript-lua project
17:12timvisheris their a basic way to throttle move through a list comprehension?
17:12timvishercallen: ?
17:12jballancwondering what it would take to revive it
17:12callentimvisher: the homebrew thread.
17:13callentimvisher: that's my shindig.
17:13hiredmancellphones these days could run clojure fine if you got a jvm on them (dalvik is a toy)
17:13timvisheri.e. i've gat a little over a 1000 requests to an api that i'd like to make 'politely'
17:13timvishercallen: oh no problem. seems like the right thing to do.
17:13dnolenjballanc: cljs-lua is effectively dead, no work in a year
17:13hiredmanmy beaglebone which is much less powerful than my cellphone runs clojure fine
17:13jballancdnolen: yeah, unfortunately
17:13callentimvisher: https://github.com/ericlavigne/browse-clojure/blob/master/src/browse_clojure/core.clj
17:14callentimvisher: throttling http ^^
17:14dnolenjballanc: but I don't really see what advantage it would have over running node on said device
17:14callentimvisher: could do it with delay too.
17:14timvishercallen: figured it'd be that.
17:14callentimvisher: sorry if I'm predictable.
17:14hiredmanwhich leads me to believe that when people say "clojure doesn't/won't run well on embedded devices" they don't know what they are talking about at all
17:14hiredmanwhich drives me nuts
17:14timvishernot the link. the link is very helpful. i menat how much you need to do to grow the solution
17:14jballancdnolen: not sure what the extensibility story is like for node, but for lua it's *amazing*
17:15timvishers/menat/meant
17:15timvisheralthough now i wish i'd said mentat
17:15timvishercause that would've been funnier
17:15dnolenhiredman: well I heard it didn't run that well on early RPis, maybe improved now
17:15jballancdnolen: luajit ffi + cljs could be very interesting for integrating with existing C libs
17:15fikuszjballanc: I would very much like to see Clojure with a minimal runtime, I guess the way interop part designed for Java would be pretty useless then
17:15callendnolen: beetlejuice beetlejuice beetlejuice - https://github.com/mxcl/homebrew/pull/21733
17:16hiredmandnolen: because people used bad jvms
17:16bltavareshi there everyone. I am trying to start a project using clojurescript and raphael js and I am having troubles with cljs-build and foreign-libs.
17:16callendnolen: mxcl wants your opinion.
17:16bltavareswould this be the better place to ask for help?
17:16dnolenjballanc: ffi is nice
17:16dnolenbltavares: just ask your quesetion
17:16dnolenbltavares: this is the place
17:16noonianthere are plenty of optimizing scheme compilers that it should be fairly easy to port clojure to, I know someone was compiling clojure to c with gambit but there are native compilers also
17:17jballancfikusz: not necessarily...hence lua/luajit ffi
17:17jballancobviously it wouldn't be the same
17:17jballancbut you could preserve the spirit of being a hosted language
17:17bltavaresI have this project.clj https://gist.github.com/bltavares/6188586 and the foreign-lib does not seem to be loaded. The output of the copiled js does not contain the library and google.require fails
17:17hiredmandnolen: people would install some random jvm like jam and complain about peformance
17:17technomancyhiredman: openjdk is useless on the pi
17:17fikuszjballanc: yes, it could be changed (but you couldn't call it clojure anymore I guess). Clojure FFI is pretty much geared towards objects/OOP
17:18jballanctechnomancy: btw...would you be interested in PRs for skaro? or is it just a playground?
17:19technomancyjballanc: happy to take something to streamline what's already there. not too interested in new features or anything.
17:19hiredmantechnomancy: the pi supports hardware fp, and right now the only decent arm jvms are soft float abi, so while people tend to put hardfloat abi distros on pis, if you did soft float you could use a real jvm
17:19callentechnomancy: what about more language coverage?
17:19hiredmanand since when is the pi the only embedded device in the world?
17:19technomancyhiredman: it's not any better on arduino =P
17:19callentechnomancy: you don't have Common Lisp :(
17:19dnolenbltavares: not sure if a url like that will work, did you try that with a local file?
17:19nooniansince it became available
17:19hiredmanphones today are more powerful than the pi
17:19technomancycallen: I added a link in the readme
17:19dnolenbltavares: also did you look at this http://lukevanderhart.com/2011/09/30/using-javascript-and-clojurescript.html?
17:20bhaumanif you have a iPhone here is clojure running on an device http://rigsomelight.com/dotsters/
17:20callentechnomancy: that link is dead yo.
17:20callentechnomancy: don't link to dyndns stuff :(
17:20callenephemeral as all hell.
17:21bltavaresdnolen: yep. That is where I got the initial help.
17:21bltavaresdnolen: there is this line in that same article "Note that the value for :file can be either a URL or a classpath-relative path to a local file."
17:21bltavaresand looking at the code it seems to detect if it is a url before slurping the content
17:21technomancycallen: sure; I can add another
17:21fowlslegsAre there no native clojure libraries for handling matrices?
17:21jballanctechnomancy: I was playing with a script to compile/run each example
17:22hiredmanactually openjdk even has instructions for getting openjdk running on a pi
17:22hiredmanhttps://wiki.openjdk.java.net/display/OpenJFX/OpenJFX+on+the+Raspberry+Pi
17:22bltavaresdnolen: but I havent tried locally. I was expecting it to work given this commit https://github.com/clojure/clojurescript/commit/96b38e2c951ef07b397e9d
17:23dnolenbltavares: try it locally
17:23Raynes<3
17:25pbostromfowlslegs: I was looking into this the other day, core.matrix looks decent: https://github.com/mikera/matrix-api also clatrix: https://github.com/tel/clatrix
17:26callendnolen: I love you.
17:26bltavaresdnolen: locally it worked!
17:26bltavares\o/
17:26bhaumandid prismatic ever release flop?
17:26dnolenbltavares: cool
17:27fowlslegspbostrom: Thanks I found those. I actually wanted to use it to solve a 4clojure.com problem so I can't load any libraries.
17:27bltavaresdnolen: the documentation is misleading
17:28bltavaresor maybe it is because github redirects the request to a https server
17:28fowlslegspbostrom: Very strange that one has to resort to external libraries.
17:29gilbertw1Any reason why lein would ignore a ~/.lein/profiles.clj file?
17:29dnolenbltavares: yeah would want confirmation that it's not a https or http agent issue before changing docs.
17:32pbostromfowlslegs: my understanding is that doing operations on a vector of vectors is going to be rather slow for anything non-trivial
17:33noonianwhy?
17:33clojurebotnoonian: because you can't handle the truth!
17:33noonianlol
17:33fowlslegsBut it would save so much code in this instance.
17:35pbostromthis presentation has a pretty good overview with some empirical data: http://skillsmatter.com/podcast/scala/machine-learning-with-clojure
17:37fowlslegsI'll check that out
17:37fowlslegsGOing to meet a friend
17:37fowlslegsThank you pbostrom.
17:37futilewat
17:37pbostromnp
17:38bltavaresdnolen: I just confirmed that is because of the redirect
17:38dnolenbltavares: thx
17:38bltavaresI brought a simple http server and locally it works
17:39pbostromfowlslegs: that presentation contains some clojure code for matrix mult and dot prodct, it's only a few lines
17:39bltavaresdnolen: should this be in the documentation of lein-cljsbuild?
17:40dnolenbltavares: probably, lein-cljsbuild likely needs a new maintainer, I think emezeske is busy w/ other things these days.
17:40honeyhello
17:40honeyi have a programming question.
17:41dnolencemerick: any thoughts about a CLJS tools org? I've been thinking it might be worthwhile to consolidate under a common roof?
17:42fowlslegspbostrom: That will certianly be good to know. For the purpose of my 4clojure.com soln. I only need to be able to isolate columns in a vector of vectors. I'm pretty certain I can do this with interleave or interspose, but if you know of a better way send me a pm as I am heading out right now and will miss it in the general chat. Thanks once again.
17:43honeyis there anyone here?
17:43dnolenhoney: yes
17:43honeyok thanks.
17:43honeyi thought i was alone.
17:43justin_smithhoney: just saying you have a question isn't really how one uses ir
17:44justin_smith*irc
17:44honeyare your chan rules in topic?
17:44honeyi new here. sorry.
17:44justin_smithit's just a convention, you just ask your question
17:44justin_smithno big deal
17:44honeyoh ok.
17:44gtrak~ask
17:44clojurebotHuh?
17:44hyPiRion~anyone
17:44clojurebotJust a heads up, you're more likely to get some help if you ask the question you really want the answer to, instead of "does anyone ..."
17:45justin_smithso what is your question?
17:45gtrakhow do you record a thing in clojurebot?
17:45fowlslegspbostrom: And also diagonals, determinants, and frankly quite anything matrix related would be good to know.
17:45fowlslegsclojurebot: You're sexy.
17:45clojurebotCool story bro.
17:46hyPiRiongtrak: clojurebot: foo is<reply>bar, or clojurebot: foo is bar
17:46hyPiRionfirst results in "bar", second in "foo is bar"
17:46gtrakI will steal the one from ##java
17:46gtrak~ask is <reply>The Ask To Ask protocol wastes more bandwidth than any version of the Ask protocol, so just ask your question.
17:46clojurebotAlles klar
17:47pbostromfowlslegs: I haven't actually done too much matrix stuff in clojure personally; just write all of them yourself, you might learn something :)
17:47gtrak~ask
17:47clojurebotThe Ask To Ask protocol wastes more bandwidth than any version of the Ask protocol, so just ask your question.
17:47timvishercallen: dead simple albeit far less precise solution to the throttling thing: https://gist.github.com/timvisher/6188945
17:51timvisherit's somewhat interesting to think of time as a side-effect.
17:51futilesomeone mention datomic?
17:55TimMcRaynes: Oof, speaking of lavabit: The owner just shut it down because (presuambly) the NSA tried to install a backdoor.
17:56TimMcI should find an Icelandic email host or something.
17:57callenfutile: nope
17:58hyPiRionTimMc: even better, they are creating an open source email server with focus on privacy
17:58callentimvisher: o_O
17:58hyPiRionhttp://mailpile.is/
17:59callenhyPiRion: that's a client, not a server.
17:59noonianthat lavabit thing makes me sick to my stomach
18:00hyPiRioncallen: shoot, I was really hoping they were implementing a server
18:00hyPiRionIt looked like it, when they added in the "self-hosted" part.
18:01TimMcThere's also https://parley.co/ which looks interesting.
18:01callenhyPiRion: the client is self-hosted. it's webmail.
18:01callenlike zimbra.
18:01callenwhich you can go install right now.
18:02TimMcI hope they've solved the searchable encrypted email problem which seems to have stymied every client but mutt.
18:03hyPiRioncallen: but zimbra is a server? I'm confused now.
18:03TimMchyPiRion: SMTP/POP/IMAP client; web server.
18:04hyPiRionoh.
18:04callenhyPiRion: I know you know what a server, a client, and webmail are.
18:04TimMcThink phpmyadmin.
18:05callenif it helps, pretend mailpile aka rip-off-dumb-yuppies-through-indie-gogo is alpine for the web.
18:05winkyou make my head spin you guys
18:05callenwink: why?
18:05winkcallen: the last 20 lines of people saying weird things.
18:05callenthere's no better way to make money than to feed off white peoples' fears and sell them a product that taps into recent news stories.
18:06callenI should've thought of the encrypted webmail thingy.
18:06callenand just reskinned an existing webmail client
18:06ToBeReplacedman sometimes i write horrible code.... if i have a seq fns [f g h] and I want a seq of [(f) (g) (h)]... is the best option (map #(%) fns)?
18:06technomancythinking of cutting lein 2.3 from current master
18:06callentechnomancy: what's changed?
18:06technomancyanyone got anything else they want to get in?
18:07technomancybuncha ... stuff
18:07technomancynothing too exciting; lemme see
18:07hyPiRionToBeReplaced: ((apply juxt [f g h])) should work too
18:08TimMc((apply apply juxt fns)), nice
18:08TimMcErr, no. Never mind.
18:08hyPiRionTimMc: hah
18:08ToBeReplacedhyPiRion: yep looks good thanks
18:09technomancycallen: https://github.com/technomancy/leiningen/blob/master/NEWS.md <- just updated
18:09justin_smith,((apply juxt [+ *]))
18:09clojurebot[0 1]
18:09TimMc&((apply apply apply juxt [[[+ *]]]))
18:09lazybot⇒ [0 1]
18:09justin_smithnice
18:11callentechnomancy: thank you :D
18:12TimMccallen: s/white // and agreed -- unless they're doing mega usability studies around encryption.
18:13hyPiRion,(apply apply ((juxt first rest) ((apply juxt [(constantly +) (constantly 2) (constantly 4)]))))
18:13clojurebot6
18:15callenTimMc: the demographic is just to highlight people who have the spare time to worry about things that don't affect them and the spare money to spend against their weird interests.
18:15callenhyPiRion: weirdo.
18:16rasmustohyPiRion: is this how you write all of your code?
18:16hyPiRionrasmusto: no, it's not usually that readable
18:16rasmustohyPiRion: or juxt for fn?
18:16hyPiRion$google hello swearjure
18:16lazybot[hyPiRion/hello-swearjure · GitHub] https://github.com/hyPiRion/hello-swearjure
18:16rasmustohyPiRion: I was feeling like twisting my brain up, thanks for the link :)
18:17noonian,(doc juxt)
18:17clojurebot"([f] [f g] [f g h] [f g h & fs]); Takes a set of functions and returns a fn that is the juxtaposition of those fns. The returned fn takes a variable number of args, and returns a vector containing the result of applying each fn to the args (left-to-right). ((juxt a b c) x) => [(a x) (b x) (c x)]"
18:17hyPiRionno problem, you'll have problems looking at me seriously ever again
18:18technomancyclojurebot: juxt?
18:18clojurebotif you think 'complement is great, wait till you see 'juxt
18:18timvishercallen: o_0 right back at you?
18:18technomancyso true
18:19callentechnomancy: you know the first Rust compiler was written in OCaml right?
18:19technomancycallen: no kidding?
18:19callentechnomancy: yep, OCaml was how they bootstrapped it.
18:19callentechnomancy: have you looked at Rust much? It steals a lot from the ML family.
18:20callenI know the systems focus can throw some people off, but Rust is a credible pure-functional language with nice escape hatches.
18:20technomancya bit. seemed designed to appeal to people who can stomach C++, if only barely.
18:20noonianhadn't even heard of Rust until just now
18:20callentechnomancy: naw, it has more in common with a concurrent OCaml semantically.
18:20wheeI find myself using "into" to apply a function to a map's values and get a map with the same keys and the modified values; is there something more idiomatic for this?
18:20technomancyat least they have the decency to feel bad about not having a solid repl setup, unlike go
18:20justin_smithI got a rust shirt at oscon, I went to the booth and tried to talk to them, the guy only spoke japanese, he handed me a shirt and a pen
18:21callentechnomancy: the syntax and keywords have changed a lot too.
18:21justin_smithand a syntax reference card
18:21callentechnomancy: Rust has a REPL...
18:21technomancyI do wish the Mozillans the best with it though
18:21justin_smiththe gc is optional
18:21technomancycallen: last I heard it was "this is super experimental and might even work; try it out!"
18:21justin_smithwhich is awesome for systems stuff
18:21callenjustin_smith: yep. wonderful. :)
18:22callentechnomancy: rusti seems to be at parity with the real rust.
18:22futileanyone wanna port clojure to llvm with me?
18:22hyPiRionfutile: man
18:22callentechnomancy: I'm pretty sure it works fine.
18:23hyPiRion$google clojure-metal
18:23lazybot[halgari/clojure-metal · GitHub] https://github.com/halgari/clojure-metal
18:23technomancycallen: that's cool. last I checked was a year or so.
18:23patchworkTrying to compile cljsc from a clojure repl, getting an error:
18:23patchwork(cljsc/build "resources/cljs/hello.cljs" {:output-to "hello.js"})
18:23patchworkNullPointerException cljs.core/import-macros/fn--4840 (core.clj:42)
18:23futilehyPiRion: yay
18:23patchworkJust following the quickstart, anyone know how to fix this?
18:24patchworkcljs file is identical to the one in the quickstart
18:24futilehyPiRion: also https://github.com/schani/clojurec
18:24futilewhoa
18:24hyPiRionyeah, I know
18:24patchworkActually, subsequent calls give me : "AssertionError Assert failed: Can't recur here"
18:24hyPiRionmany out there now
18:25gunstechnomancy: What do you think about an envvar for binding clojure.pprint/*print-right-margin* when running slamhound from the command line?
18:25guns(and perhaps defaulting to 80)
18:25futilewelp
18:26futilelooks like i have no more valid reason to write it myself
18:26technomancyguns: that sounds reasonable
18:26futileill have to settle for invalid reasons
18:26gunstechnomancy: what would you like to call it? PRINT_RIGHT_MARGIN
18:26technomancyguns: how about SLAMHOUND_MAX_COLUMNS
18:27gunstechnomancy: great. I'll add it to the :refer :all patch
18:27callenrelative to how well most things work in Rust.
18:27noonianwhee: do you mean a function that assumes all values have some property (like being a number) and transforms the values some way but leaves the keys alone?
18:27callentechnomancy: you really should give it another whirl soon.
18:27justin_smithalso I like the two heaps thing rust has
18:27callenthe only "unstable" thing that's relevant to users is rust-pkg is still coming together.
18:27callenjustin_smith: do you mean the per task heaps or something else?
18:27justin_smithyeah that
18:27callenthat's not two heaps
18:27callenthat's n-heaps
18:27justin_smithgotcha, I see people from the rust world call it two heaps
18:27callenit might be pooled for the tasks
18:27callenbut the way it was originally explained to me was along the lines of what erlang does.
18:27callenthey might've made it a little more systems friendly since then.
18:27justin_smithmaybe "two heaps" means your task heap, and the global one (which of course each other task also sees two heaps, though there are more than two total)
18:27justin_smithmaybe?
18:27callenmaybe, I'm not usre
18:27callenI've mostly been following the changes to syntax and the iterators lately.
18:27callenhttp://attractivechaos.wordpress.com/2013/04/06/performance-of-rust-and-dart-in-sudoku-solving/
18:27technomancycallen: wait does rust only infer types of locals?
18:28callentechnomancy: you can't H-M a language like Rust.
18:28callentechnomancy: so yes.
18:28technomancy=\
18:28callenor I should say D-M I guess.
18:29callentechnomancy: I wouldn't want the restrictions of a damas milner compatible type system in a language like Rust.
18:30technomancymaybe once I've done enough ocaml to hate it I'll feel the same way
18:30callentechnomancy: well like I'd said before, I need concurrency and Rust is a close-enough concurrent systems ML
18:31callenI don't hate OCaml, I just got tired of the broken ecosystem and constraints.
18:31technomancycallen: good for you. =) different people want different things.
18:31hyPiRioncallen: hasn't the ecosystem turned better lately?
18:31callenI know, I'm just saying.
18:31justin_smithfutile: clojure-metal is far from done, I am sure they would appreciate help
18:31callenhyPiRion: yes but that doesn't mean OCaml is suddenly concurrent.
18:32futilejustin_smith: its clojurec im worried about
18:32callenjustin_smith: he doesn't actually do anything.
18:32callenjustin_smith: he just proposes projects but doesn't write code.
18:32RaynesIt also doesn't mean people suddenly actually use OCaml for anything.
18:32futilejustin_smith: https://github.com/schani/clojurec
18:32RaynesAnd thus libraries are probably not growing very quickly.
18:32callenRaynes: other than implementing languages better than OCaml.
18:32hyPiRioncallen: nono, I'm just mentioning it.
18:32abphuh!
18:33futilehullo!
18:33clojurebotCool story bro.
18:33futileyeah, it was.
18:33abpfor sure
18:33hyPiRionoh what, the argument ordering for isa? and instance? is confusing
18:33technomancyisa? =(
18:34hyPiRiontechnomancy: huh?
18:34technomancy(is isa? actually-is-a?) ; -> false
18:34callenIt's doubly disappointing that OCaml comes from the same organization that did join-calculus.
18:34technomancyit's not a well-named function?
18:34callenI don't know how you fuck up that deeply.
18:34hyPiRiontechnomancy: I don't know
18:34hyPiRion,(isa? Integer Number)
18:34clojurebottrue
18:35technomancyhyPiRion: but that's nonsense
18:35technomancyInteger is a Class, not a Number
18:35RaynesI'm pretty sure an integer is a number.
18:35hyPiRiontechnomancy: oh yeah, that's true too. That confuses me as well
18:35technomancyRaynes: then it should be called instances-of-this-are?
18:35hyPiRion,(instance? Number 2) ; Order reversed
18:35clojurebottrue
18:35RaynesI'm not following what is confusing.
18:35SegFaultAXRaynes: I think his point is that isa sounds like it's querying an object's type, not the class hierarchy itself.
18:36Raynes*shrug*
18:36technomancy(that's apart from the arg order facepalm part)
18:36callentechnomancy: is it that you hate writing down the type signatures?
18:37callenyou end up writing down your types in Haskell typically, surely it's the same for your code in OCaml?
18:37callenI don't think anybody writes Haskell code without type sigs. it doesn't work half the time anyway.
18:37technomancycallen: if you get inference for locals but not args, it means locals are more convenient than args
18:37technomancyif locals are more convenient than args, then that gives you incentive not to break things out into their own function when they should be
18:37technomancywhich leads to function bodies being longer than they would be otherwise
18:38technomancywhich leads to hate, which leads to anger, &c
18:38technomancythis is what happened to me when I wrote Mirah anyway
18:38callenmaybe.
18:38hyPiRionwhich leads to poorly designed programming languages, and then the circle is complete.
18:38callenHaskell users seem to have no problem with decomposition and function composition based APIs.
18:38callendespite always writing down their types.
18:39justin_smithno no, anger leads to hate which leads to knowledge
18:39technomancyjustin_smith: oh dang; I forgot about that
18:40technomancyhaskell people want to spend all day thinking about types. I'm not like that. I like OCaml *because* it doesn't put them in my face everywhere.
18:40justin_smithI miss ocaml
18:40callenTimMc: to reinforce my earlier point, there's a programmer on my twitter feed freaking out about police arresting somebody across the street. He's even talking about moving. After I was done lol'ing I googled - invariably caucasian.
18:40hyPiRionjustin_smith: it's not too late
18:40abptechnomancy: But thinking about types ensures your program is correct!
18:40callentechnomancy: thinking about types is culturally part of ML. They're the ones that got that ball rolling.
18:40technomancyabp: what can I say; I live on the edge.
18:41callentechnomancy: I think you're alone in this with respect to OCaml.
18:41justin_smithit also keeps you regular, and purifies the soul
18:41callenvery zen-like way to do OCaml though. Pro.
18:41wheenoonian: basically this: (defn map-values [m f] (into {} (for [[k v] m] [k (f v)])))
18:41wheenoonian: I'm guessing there's already a function for it, since it seems like a common pattern
18:41patchworkSo is this just way out of date? https://github.com/clojure/clojurescript/wiki/Quick-Start
18:41justin_smithwhee: not really, just a common pattern
18:41patchworkI guess 10 months ago is awhile in clojurescript time
18:42abptechnomancy: Well, something like, write types or know what you are doing anyway and check where necsessary would've been more in my favour, but ok. :P
18:42patchworkAnyone have a current method for compiling cljs from a clojure repl?
18:42hyPiRionwhee: it's in the useful library
18:42callentechnomancy: mis-inference of types in Damas-Milner based languages like OCaml and Haskell is *really* common for me. I don't know how you avoided bumping into that.
18:42hyPiRion(the lib named useful)
18:42technomancyabp: I like getting yelled at when there's a mistake, sure.
18:42technomancycallen: like overlapping field names or other stuff?
18:43callentechnomancy: No not even that. I had to write interface files for my functions in OCaml.
18:43wheehyPiRion: perfect...I'll go check that out; thanks
18:43abptechnomancy: Who doesn't? But let's say constructively being talked to.
18:44technomancyabp: I've noticed a dramatic decrease in ESL-based grammatical errors in the compiler messages just in the last 2 years
18:45noonianhyPiRion: is useful just a bunch of miscellaneous useful functions?
18:46hyPiRionnoonian: afaik, yes.
18:46abptechnomancy: And really, I'm talking about http://blog.fogus.me/2012/06/20/not-enough/ vs "a pure dynamic language is always the right thing"
18:46futileok, gotta get some work done
18:46noonianwhee: you could also use zipmap, (zipmap (keys m) (map f (vals m))) but i don't think it's any more elegant than what you were doing
18:46noonianhyPiRion: cool
18:47cemerickdnolen: you mean on github, or elsewhere?
18:47technomancyanyone know if `lein upgrade` is still busted on windows? https://github.com/technomancy/leiningen/issues/1150
18:47abptechnomancy: Well, C and C++ while just starting out in programming puts compiler yelling in perspective. More like vomitting VS6...
18:47technomancyabp: see I would love to see a compiler that's hooked up to insult generation algorithms
18:48cemerickcallen: improve what?
18:48technomancy:compiler-insults :shakespeare in defproject or something
18:48hyPiRiontechnomancy: you can do that with sudo, it's neat
18:48technomancyhyPiRion: love it
18:48hyPiRionthey are predefined though
18:49technomancyyeah, we can do better than that
18:49callencemerick: pomegranate.
18:49cemerickcallen: in what way?
18:49callentechnomancy: what was your objection?
18:50cemerickThe aether stuff is radioactive. I consider that part of the library to be a failure.
18:50technomancycallen: to which?
18:51justin_smithI would like to see a compiler with zalgo errors
18:51justin_smiththe more you fuck up your code, the more unintelligible the output
18:52abptechnomancy: Easy, just dont use alphanumerics. Sorry hyPiRion. :)
18:54hyPiRionevery time you hit a compile error, the compiler converts your code to swearjurian.
18:54abphyPiRion: Oh I just found an application for a subset of swearjure. :)
18:55hyPiRionabp: the error message thing or what? :o
18:56abphyPiRion: The insult generation algorithm for the compiler, quite manual but.. wait: "Please use "!$%&/-;:.,=" for symbols would be approptiate. :)
18:57hyPiRionheh
18:57abpah, quote miss
18:57hyPiRionI'm doing something which can turn into something like that
18:58hyPiRionSwear at you when your tests fail
18:58abpAlso with workflow integration?
18:58hyPiRionwell, with lein test.
18:59hyPiRioncoincidentally I'm writing tests for it now
18:59abpThe five whys for your project: 1. Make an easy target.
18:59abpDoes it work for you? ;P
18:59muhooso far, nothing i've seen beats cljs stacktraces for the wtf factor
18:59hyPiRionabp: oh yeah, it does
19:00hyPiRionactually, I designed it because I got bored of waiting for the Leiningen test cases to finish
19:00hyPiRionso I wanted to get some sound signal whenever those test finished.
19:00abpmuhoo: huh? I've seen quite well put error messages with offending js using browser nrepl.. after 5 minutes of programming.
19:00abpmuhoo: That's all I did in ClojureScript :x
19:01abphyPiRion: Ah like yelling at you while your program fucks up?
19:02hyPiRionabp: well, more like signalling when the test suite has finished
19:02hyPiRionbut it could be used for that later on, yes.
19:02abphyPiRion: yeah, the word *sound* arrived even in my brain by now. :)
19:04muhooabp: it's been a few months since i did any cljs, but i'm pretty sure i saved or maybe posted some good ones.
19:04abphyPiRion: Yeah lets hook up swearing samples to failed tests and let all tests run allways.
19:04muhoowow, just browsing my history on reheap, it's like a catalog of fail. every broken thing that's baffled me for a year is there in one convenient place :-/
19:04justin_smithswear at you if tests fail, swear twice as much if you push without running tests
19:05abpmuhoo: Like life: fail<->fail, get used to it or die?
19:06abpjustin_smith: CI
19:06abpjustin_smith: more like CS
19:06muhooabp: more like get used to it, and die. the dying part isn't really a choice.
19:06abpmuhoo: Yeah but let it be the later part also, please.
19:07muhoothe learning part, happily, is.
19:09abpmuhoo: That's the wise reaction. :P
19:13Fer`Hi there, is there a better idiom for (some identity coll) ?
19:13ThatOneGuydepends on the coll
19:13Fer`I just wanna check if there is anything non nil on it
19:14Fer`it's a seq
19:14ThatOneGuylazy-seq?
19:14hyPiRion(not-any? nil? coll) sounds better then
19:14technomancydepends on whether you care about false vs nil
19:14hyPiRioner.
19:14Fer`no its nil vs something because its the result of mapping re-seq
19:14hyPiRionnot-every?*
19:15Fer`i'll use not-every? :-)
19:20Fer`Wait that ends up being (not-every? (complement nil?) ..). I'm not sure if that's worse :-P
19:21Fer`Oh just every? :-)
19:21hyPiRionnot every element is non-nil.
19:21hyPiRionsome element is nil
19:27abpFer`: (assert (not-any? ::unbound cells) (str "Got unbound cell: " (some ::unbound cells)))
19:27abpFer`: That was a nice line to write. :)
19:27callenmuhoo: CLJS stackstraces with core.async are worse.
19:27callenmuhoo: way, way worse.
19:28callenmuhoo: you end up balls deep in a state machine you didn't have any real participation in. I'd rather debug Ragel C output.
19:28callencore.async is amazing, but the debugging...z0mg.
19:28abpcallen: on modern things. :) Have your read http://hueypetersen.com/posts/2013/08/02/the-state-machines-of-core-async/
19:29callenabp: on modern things what?
19:29callenyes I've read that.
19:29abpcallen: you
19:29abpcallen: ah ok, I thougt it helps/mitigates
19:30callentechnomancy: what do you want fixed in pomegranate before you're comfortable recommending it?
19:31callenis this accurate? "Pomegranate is being used by Leiningen v2.x as its sole dependency resolution library. This has prompted rapid maturation of the scope and quality of Aether support."
19:31abpcallen: https://github.com/swannodette/Ejecta just blew me awaey, conceptually, let alone core.async on cljs error msgs..
19:32abpIs anyone in here using pallet for automation besides the clouds?
19:32callenabp: no, I avoid it all costs and use Fabric or Ansible instead.
19:32abpOr virtualboxes...
19:32callenvirtualboxes aren't an automation methodology.
19:32callenthey're a stateful machine image.
19:33abpcallen: No but well supported by pallet, but thanks. :P
19:33technomancycallen: oh, I'd want something that could save off the old project.clj, compare it with the new one, and dynamically add new dependencies to the classpath where possible and issue huge warnings (or maybe abort) where not.
19:33abp /query hypirion
19:33callentechnomancy: sounds magical.
19:34technomancysufficiently advanced technology, &c
19:34abpnice one
19:34callentechnomancy: I'm not totally sure why one would want to munge the user's project.clj. AFAIAC pomegranate is to make working in a REPL less-annoying.
19:34callenala Quicklisp.
19:35callenand yes, this is something Common Lisp already had
19:35callenand it works fine.
19:35technomancycallen: no, I mean the user would edit project.clj and then go to the repl and be all "hey repl, become the change you want to see in the world" or wahtever
19:35technomancyboom
19:36callentechnomancy: oh, now I get it.
19:36kmicuBOOOOOOM
19:36callentechnomancy: that's fucking sweet.
19:36technomancycallen: maybe we can convince futile to do it
19:36technomancyoh, he left
19:36callenI don't think I've seen you overtly troll like that before.
19:37callentechnomancy: my next project is Rack::attack for Ring. I'll add this to the list.
19:37technomancycallen: I try to talk people into writing software I want all the time
19:37technomancyit's how clojurebot exists
19:41callenwell cemerick probably isn't going to do it.
19:41callenhe's too busy with not doing anything ever that he doesn't want to do.
19:44hugodritz has support for reloading a changed project.clj file
19:44ThatOneGuyI'm in the same boat. The only thing keeping my attention is project euler problems in clojure. I should be working at work :'(
19:48callenhugod: if only I could figure out how to debug code with it.
19:48callenI would love something like this one-liner for Clojure: 'import sys; sys.stdout = sys.__stdout__; import ipdb; ipdb.set_trace()'
19:53hugodcallen: and what does that do exactly?
19:53supersymwhat were you talking about trying to get, reload a project without repl restart?
19:54technomancyhugod: huh; I think you told me that once and I forgot
19:54technomancywill have to try that out
19:54technomancyhugod: have you tried my nrepl-discover thingy yet?
19:54callenhugod: rehooks stdout and trips a pdb-based debugger that uses the ipython shell.
19:54hugodtechnomancy: sorry, no - I've not done anything on ritz/nrepl since c/west
19:54callenhugod: it's convenient, easy to use, and powerful enough for almost any Python debugging use-case.
19:55callenhugod: and you get to debug your code in terms of the native language (python) not something eldritch underneath.
19:56arohneris it possible to deliver an exception w/ promise/deliver?
19:56supersymcallen: you said 'like this one-liner for CLOJURE'..how is that?
19:57callensupersym: you misunderstood what I was saying.
19:57supersymright :P
19:57callensupersym: it's a Python one-liner, I'd like something comparable *for* Clojure.
19:57supersymwell as in the one-liner or the debugger or...
19:57supersymnow I'm all confused :)
19:58supersymsince we dont have a debugger that I know of,...nor do we really care about lines? :P
19:59callenarohner: wrap it in an fn and deliver an executable?
19:59callenarohner: https://www.refheap.com/17420
20:00callenexceptions aren't values, so what you're asking for is a little odd.
20:01callenyou could do some magic with slingshot if you were so inclined, probably a waste of time though.
20:05ToxicFrogsupersym: "here is a python one-liner that activates useful debugging features. It would be nice if clojure had an equivalent, both in "usefulness of debugger" and "ease of activation"."
20:05callenToxicFrog: gracious of you, thank you.
20:21callentechnomancy: https://mail.mozilla.org/pipermail/rust-dev/2013-August/005158.html
20:40callentechnomancy: why is that wondermark comic your status?
20:46technomancycallen: I'm trying to be positive, so I'd rather not go into detail.
20:48technomancyit's not about ocaml or rust if that's what you're wondering =P
20:55callenhttp://michid.wordpress.com/2010/01/29/scala-type-level-encoding-of-the-ski-calculus/
21:08srrubyAny opinion on the value of clojure conf? I have to pay from my own pocket from california. I'm an experienced Ruby dev. Thanks, John
21:10mlb-I feel like I'm missing something: aside from conj operating differently, what is the difference between lists and vectors?
21:14callenmlb-: they're different data structures with different performance characteristics and syntax.
21:14callenconj'ing a list is a head cons, conj'ing a vector is an append.
21:14callenmlb-: where's your book?
21:19jcromartiehad too much to drink, typed "hookup" instead of "hiccup"
21:19jcromartienot going to work
21:22schaefercore.logic question: i want some interop between a core logic program and clojure. core.logic/project nearly gives me what i want but if the lvar is not ground, i don't want to execute the code within the projection. ideally, i'd like project to fail if the listed lvars are not ground.
21:23schaeferhow can i write a goal that fails if the lvar is not ground?
21:23schaeferseems like this is a fairly common case. i'm figure i must be missing something in the library
21:23brehautschaefer: does a non-grounded lvar unify with itself?
21:24schaeferyep: (l/run 1 [q]
21:24schaefer (l/== q q))
21:24schaeferreturns (_0)
21:24hiredmanschaefer: I would recommend rewriting to avoid project
21:24Fretsejaz1Quick question, for the vim users in here, would you recommend https://bitbucket.org/kotarak/vimclojure for a setup?
21:25hiredmanschaefer: can you not express what you want purely using core.logic?
21:25brehautFretsejaz1: not a vim user, but i think tim pope and cemerick have the current popular choice?
21:25schaeferwould love to... here's what i'm trying to achieve: i want to use core logic to traverse a graph. i've got clojure functions to return the next and prev.
21:26schaeferfor toy programs, i could express the graph using defrel and facts but that's not going to fly in production
21:26hiredmanah, so you need next and prev relations then
21:27schaeferyes
21:27jcromartiewhy the heck is file-seq not in clojure.java.io
21:27hiredmanyeah, even dnolen isn't very keen on defrel and facts these days
21:27jcromartie:{ seems to be quite inextricably tied to java.io.File
21:27schaeferi was looking at using IUnifyTerms but that seems overkill for what i'm trying to do
21:27hiredmanschaefer: have you looked at the internals of core.logic yet?
21:28cemerickFretsejaz1: vim-fireplace is the current favorite AFAIK
21:28schaeferhiredman: heheh. yeah, i've looked but not groked :) if there is no straightforward answer, i'll spend more time studying the code
21:28hiredmanschaefer: dnolen has given some talks here and there on the internals
21:29schaeferhiredman: thanks. i'll check those out
21:29hiredmana core.logic goal/relation is a function that returns a substitution
21:30hiredmanso (core.logic/== x y) returns something like (fn [substitution] ....)
21:30hiredmanI should say it takes a substitution and returns it if the goal succeeds
21:31schaeferok. looks like i need to understand the substitution map data structure
21:36mlb-callen: okay, knowing they have different perfromance traits iswhat I didn't know. Also, no book. Just breifly going through tutorials as I can find them
21:37jcromartiemlb-: I can't blame you for the confusion
21:37jcromartieit is a little unclear why you'd ever choose a list
21:38jcromartieexcept when building code to be evaluated, as in a macro
21:38schaeferhiredman: fyi - turns out there are existing lvaro and nonlvaro goals (macros) which test whether an lvar is ground or not. hopefully, a clever combination of these and project will work
21:39jcromartiemlb-: conj'ing on the front combined with drop turns out to be a decent enough implemenation of a persistent stack structure
21:42schaeferyep, that was the trick: you have to use a lnonvaro in conjunction with project in order to ensure that the lvar is ground before passing it into the clojure fn
21:43schaeferi don't mind using project in this case since i have clojure functions for getting both successors and predecessors. i *think* this ensures the core.logic goal is relational
21:51brehautapropos nothing at all, does anyone have a recommendation for browser based presentation stuff?
21:52trinarybrehaut: make everything as big as possible: https://github.com/tmcw/big/
21:53brehautsorry, i meant software
21:53brehautunless that was a pun?
21:54trinarynot really a pun, bit of a joke but that will let you get slides in a browser in a very simple way. :)
21:55brehautright
21:56trinarydo you mean things that do slide layout, timers, notes, and so on?
21:56brehautyeah basic slide layout from a bunch of html
21:56brehauttimers i dont need so much but notes would potentially be nice
21:57hiredmanI spent a good deal of the last conj playing with impress to make slides for my lightening talk that ended up being in a room without a projector
21:57trinaryhah
21:58xeqiheh, but everyone still loved the robot
21:58hiredmanI think the guy behind me got motion sickness watching the transitions
21:58trinaryyeah impress.js lets you do a lot of crazy transforms prezi.com style, and I think has addons that do notes/layout helpers
21:58hiredmanhttp://thelibraryofcongress.s3.amazonaws.com/conj2012-robot/index.html
21:58trinarynice
21:59brehauthiredman: holy cats!
21:59hiredmanlike a michael bay movie
21:59brehauthaha
21:59brehautits beachballed firefox
22:01hiredman:|
22:01trinaryhttps://github.com/bartaz/impress.js/wiki/Examples-and-demos links to things that help make/use impress slides
22:01trinaryhttp://strut.io/ looks cool
22:01brehautyeah thats a lot better in chrome
22:02brehauthow often does sun.misc.Unsafe end in tears
22:04hiredmanhard to say, for me I have only ever used it hear, and it has worked out fine
22:05hiredmanit means the only jni I needed for fiddling with pins directly in memory instead of via the fs is exposing a simplified mmap interface to java
22:05brehautnice
22:40axle_512question for emacs users: Does anyone have something like a namespace browser within emacs?
22:41axle_512I suppose the autocompletion in an *nrepl* buffer is pretty close to a namespace browser
22:45ToBeReplacedis the right way to get the later of two datetimes (if (after? a b) a b)? ie, no "max" or comparable methods?
22:51gfredericksToBeReplaced: this is a question about clj-time?
22:51ToBeReplacedand/or joda-time
22:54gfredericks,(max (java.util.Date. 7) (java.util.Date. 842))
22:54clojurebot#<ClassCastException java.lang.ClassCastException: java.util.Date cannot be cast to java.lang.Number>
22:54gfredericks,(< (java.util.Date. 7) (java.util.Date. 842))
22:54clojurebot#<ClassCastException java.lang.ClassCastException: java.util.Date cannot be cast to java.lang.Number>
22:54gfredericks,(compare (java.util.Date. 7) (java.util.Date. 842))
22:54clojurebot-1
22:54ToBeReplacedgotta use compare for Date
22:54gfrederickshm
22:54gfrederickspresumably joda-time is similar
22:55ToBeReplacedjoda-time has a .isAfter method on instants, and clj-time wraps that into an after? method, which you can use
22:56ToBeReplacednothing wrong with what i typed above, it just felt like a common enough operation that i was expecting a shorthand
23:05uvtcJust noticed <https://github.com/clojure-emacs&gt; today. Seems to be the new home for all things Clojure+Emacs. Nice.
23:15futileoh
23:26futileThe paredit thread makes me sad.
23:26futileIt's like trying to explain to a BASIC programmer how wonderful lambdas are.
23:27futileThey take offense to it, and nobody wins.
23:27technomancyclojurebot: popcorn please
23:27clojurebotTitim gan éirí ort.
23:27futileNot that they aren't capable, in fact quite the opposite: they could learn it and love it if they just tried.
23:27futileThey just have the mindset of "it's not for me" and that's stopping them from experiencing how great it is.
23:28futilefin.
23:29axle_512futile: I generally prefer paredit, but I do occasionally get myself into a jam where I can't fix things without turning it off for a minute.
23:29axle_512futlie: that's probably my own fault, and I just need to learn paredit a little better.
23:29futileaxle_512: I've had that happen too, when I accidentally copy/paste a by lines rather than by s-expressions, etc.
23:29axle_512futle: yes, exactly
23:29cgagyeah that's a normal art of the process, occationally needing to turn it off
23:30cgagafaik
23:30futileBut that's true of any tool. Sometimes it bites you because no tool is perfect.
23:30futileBut this particular one is more true without paredit ;)
23:31jcromartieare there any really dumb Clojure text file template tools out there?
23:31jcromartieI just made one
23:31jcromartieit's real dumb
23:31technomancyclojurebot: paredit?
23:31clojurebotparedit is not for everyone, but what you need to understand ís how to become the kind of person that paredit ís for.
23:32uvtchehe
23:32technomancyclojurebot: botsnack
23:32clojurebotthanks; that was delicious. (nom nom nom)
23:32axle_512jcromartie: A template tool like YASnippet?
23:32jcromartieno, for arbitrary text files
23:32jcromartiestatic site generation
23:32axle_512I see
23:32jcromartieI saw misaki
23:33futiletechnomancy: http://bit.ly/13Uo4XJ
23:33jcromartiebut there's nothing quite as simple as ERB
23:33axle_512jcromartie: clostache?
23:33technomancyfutile: it's the truth
23:34futiletechnomancy: I know I just had that URL in my pasteboard and felt like it was a good opportunity
23:34jcromartieaxle_512: I like it
23:35axle_512jcromartie: cool. Yes, I've used it a bit and I like it quite a bit.
23:35jcromartieaxle_512: I'll see how this one I just rolled works out
23:35jcromartieI am not sure mustache is quite right
23:35axle_512jcromartie: is yours available on github?
23:35jcromartienot yet
23:35jcromartieit's just a namespace righ tnow
23:36axle_512ah ok
23:36jcromartieI need to work out the file generation part
23:36jcromartieI was looking at Jekyll but it seemed like they made a lot of decisions ahead of time like being blog-oriented
23:36jcromartieI could just build my site with Compojure and Hiccup
23:36jcromartieI guess
23:37jcromartieinstead of trying to do it with static pages
23:37jcromartiebut I like the idea of lightweight pre-rendered pages
23:37jcromartieI dunno, as long as I'm paying for Linode, might as well run Compojure
23:37technomancyjcromartie: the seajure website is a static html output thing
23:37futileI'm about to have a whole weekend with no family in the house. I need a biggish-sized side project to do.
23:38futileI'm leaning towards writing a Clojure IDE in Clojure.
23:38futileWith minimal features, only the main ones I want.
23:38technomancyfutile: why not nightcode?
23:38futiletechnomancy: not the same feature-set-priorities as me
23:38futile*as mine
23:39futileBut I'll definitely use Seesaw.
23:41jcromartietechnomancy
23:42jcromartietechnomancy: looks like a good use of enlive
23:42jcromartieI guess that's kind of the point of enlive huh?
23:42technomancywell TBH it's 100% cargo culted
23:42technomancybut sure =)
23:44callenjcromartie: https://github.com/yogthos/Selmer
23:44callenfutile: that already exists.
23:44callenfutile: it's called Clooj.
23:45technomancycallen: and nightweb, and waterfront.
23:45technomancy*nightcode
23:47futilewaterfront?
23:48futilehm
23:48futilelooks old
23:48technomancyhttp://javadots.blogspot.com/2009/03/stroy-of-waterfront.html
23:48technomancysuper old
23:48futileuses sf
23:48futiledoesnt seem to hold same priorities as me
23:50scottjwhat are your priorities, other than a really basic editor, obviously?
23:51futilescottj: Sorry can't answer, I have a bad cold and need to sleep.
23:51futileGood night.
23:52scottjfutile: sorry to hear that, hope you get better. gl
23:53axle_512hmm, he left with all that suspense
23:53axle_512that was cruel
23:53axle_512haha
23:55axle_512technomancy: what's special about seajure's site?
23:56ToBeReplacedi have [x y z] [[1 4 5] [2 7 8] [3 6 9]] are all monotonically increasing seqs ... i want a lazy-seq that takes the lowest element from the heads of x y z... thoughts?
23:56axle_512jcromartie: another interesting approach is to use something like angular.js instead of server-side template generation
23:56ToBeReplacedabove would yield [1 2 3 4 5 6 7 8 9]
23:58technomancyaxle_512: nothing; just boring static HTML
23:58axle_512technomancy: ah, gotcha