#clojure logs

2011-12-13

00:09amalloyone way that lisp makes it easy to think about your problem is exactly the "notorious" parens. there are no special-cases for special syntax built into the language (eg, java's for loop). instead, everything is just (operator arg arg arg). this means that when you add new domain-oriented constructs, they look *exactly* like the built-ins you're used to reading and writing. at that point the language can "get out of your way" and you only have
00:20Turtl3boihuh?
00:21Turtl3boijava's for loop has special syntax?
00:21companion_cubeyes, for iterators
00:22amalloyjava's for loop *is* special syntax. for (x = 1; x < 10; x++) {...}
00:22amalloycan you add a similar construct to the language yourself? no; all you can do is write methods and classes
00:23Turtl3boiAhh i see
00:23Turtl3boiwell i don't get exactly what you're saying, not until i go see a lisp in action
00:24amalloywhereas in lisp, suppose you're writing a card-game player. you can easily define something called each-card such that you can write (each-card [rank suit] (...do something with rank and suit...)) - now it looks like each-card is a language built-in
00:50Turtl3boidamn i should've gotten some experience in a Lisp sooner
00:50Turtl3boibut i do suppose Matlab is like that to an extent
03:07replacadoes anyone with a deeper understanding than I have know why clojure.reflect doesn't seem to work on classes created with deftype?
03:08replacais it a class loader problem?
03:22replacaahh yes (if anyone cares), you need to specify :reflector (clojure.reflect.JavaReflector. (cloj\
03:22replacaure.lang.DynamicClassLoader.))
03:23replaca(that \ was an articat of cutting and pating from a terminal
03:23replaca*pasting
03:42AWizzArdMoin
03:43AWizzArdreplaca: what would you like to reflect about?
03:51replacaAWizzArd: I'm extended autodoc to understand protocols, types and records
03:51replaca*extending
03:52replacabut now I need to go to sleep :)
05:58lnostdalit's really not possible to "subclass" (i guess sub-deftype, or something) a class defined using deftype? .. i have to copy/paste the body to the new deftype and add protocols to it? .. hmm
05:58lnostdalperhaps i'm looking for extend
05:59lnostdal..or something
06:25bsteuberlnostdal: yes extend seems the way to go
06:26bsteuberif that's too low-level for you feel free to build some macros on top of that
07:59radswhen you compile clojurescript with advanced optimizations, what exactly gets included with your application code? a clojurescript runtime? google closure?
08:08Fossii'd guess both, if you use them
08:08Fossithe closure compiler only pulls in the parts you use though
08:09thearthurnot sure how much of the runtime makes it into the final either?
08:11radsit seems like a lot of javascript to include if I wanted to use both clojurescript and jquery
08:12rads34kb for clojurescript runtime and 31kb for jquery before any application code. is that too much?
08:12Fossidepends
08:12Fossialso: who needs jquery anyway? :>
08:13BorkdudeHas anyone read "Test Driven Development By Example" and has it near him/her?
08:13radsFossi: what do you recommend instead? closure's dom stuff?
08:13raekin theory, only the parts of the clojurescript standard library you use should be included, right?
08:14rads34kb seems to be the minimum from my tests
08:14Fossii'd always use closure instead of jquery these days
08:14radshow come?
08:14raekrads: JQuery cannot be compiled in the advanced mode, so the compiler cannot use remove the parts of JQuery you don't use
08:14Fossiit just feels better and has the saner design
08:15Fossialso most jquery plugins are a mess
08:15lucianFossi: have you used it from js?
08:15Fossieven the ui stuff is not really nice (weird hidden config options if you extend for example)
08:15radsmaybe I'll take a look at closure then. I just wanted to use jquery because it's a lot more popular and I'm more familiar with it
08:16Fossiit's different
08:16Fossibut i like it better
08:18raekbut because you can hot-link JQuery from google, it's also very likely that the browser alread has it cached
08:19lucianraek: for some cases, that's not an option (phonegap)
08:19kephalewhat graph libraries are folks using?
08:19cemerickDoes hiccup not provide a way to get a "standard" clojure.xml-style representation given a hiccup-style representation?
08:20BorkdudeNever mind, I just had to read a bit further.
10:04jeremyheiler2Anybody see this? http://blog.8thlight.com/uncle-bob/2011/12/11/The-Barbarians-are-at-the-Gates.html
10:06samaaronjeremyheiler2: yep, i read it the other day
10:14jeremyheiler2samaaron: Now I am interested in how someone would properly scale Clojure across 1024 CPUs.
10:15raekit would be interesting if clojure would run on a platform that performs automatic parallelization
10:16raekclojure make concurrency easy excellently, but not parallelism
10:17jeremyheiler2raek: maybe with an event-loop similar to node.js?
10:19raekjeremyheiler2: one event queue but with one event processing loop per CPU?
10:22jeremyheiler2raek: yeah; something like that. essentially allow the CPUs to greedily steal work from whatever processes are running.
10:24gtrak``jeremyheiler2, ever heard of amdahl's law?
10:25raekfor purely functional code, the language runtime could even do that for expression evaluation
10:25raekwhich I think some SML and Haskell implementations does
10:26gtrak``are the 1024 cpus NUMA?
10:26luciangtrak``: amdahl's law doesn't entirely apply to event loops, since they already do work in small increments
10:27gtrak``i think the limit for cache-coherency is like 128 cores
10:27lucianso you'd "just" need a distributed event loop
10:27gtrak``well, the real issue with that many cores is memory
10:28TimMcgtrak``: Yay persistent data structures.
10:29gtrak``TimMc, well, :-)... that might not be all you need. Think of unified memory as requiring a lot of protocol overhead. Message passing becomes more natural than shared memory at some point
10:30gtrak``the message passing to sync up state is there whether you want it to be or not, but maybe you can have more control if you do it yourself, that's what I'm trying to say
10:32gtrak``so, if avout ends up being a good idea, you could apply a similar model for inter-core state
10:33gtrak``but having it transparently might not work as well
10:38gtrak``http://en.wikipedia.org/wiki/Non-Uniform_Memory_Access
10:39gtrak``it even has the pic :-) http://en.wikipedia.org/wiki/File:AmdahlsLaw.svg
10:41gtrak``95% parallizable asymptotes at 20x, clojure helps us to get there more effectively, but there's still a limit
10:42jeremyheiler2gtrak``: interesting stuff.
10:42gtrak``it's why i'm interested in clojure in the first place :-)
10:46gtrak``jeremyheiler2, speaking of event loops, you read the LMAX article?
10:46jeremyheiler2gtrak``: i have not
10:47gtrak``http://martinfowler.com/articles/lmax.html
10:47gtrak``totally badass
10:47gtrak``i think the insight here is they took control of the transaction model and made different assumptions than a RDBMS would
10:49jeremyheiler2nice, i think i gonna get a coffee and read through this
11:05pjstadignot every algorithm can be parallelized
11:05pjstadigand even if it can there are limits
11:05pjstadig...aaaand this is something that has been well researched
11:06pjstadigyet another thing that we'll benefit from that was solved in the 70's and 80's
11:16pjstadighmm...NUMA...didn't some guy do a youtube video about that? http://www.youtube.com/watch?v=KmtzQCSh6xk :)
11:21gtrak``pjstadig, numa numa yay.. he must have been talking about computer architecture
11:25otremblayHi, this is probably not the right place to ask this, but I'm setting up emacs with clojure, and I wondered when I pressed C-x C-e where did my println output go?
11:34gtrak``otremblay, probably the swank repl buffer?
11:34gtrak``slime repl, i mean
11:35otremblayI'm going to try again
11:35gtrak``do you have the repl buffer open?
11:36otremblayIn about 5 seconds I will
11:36gtrak``it looks like it's just C-x e, not C-x C-e
11:36otremblayOh
11:36gtrak``ah wait, that's a thing, too, nevermind
11:36gtrak``C-x C-e evaluate the expression behind the cursor
11:36otremblayWhen I do C-x e, it doesn't do anything, no kbd macro defined
11:37otremblayI get a message in my Message buffer when I do C-x C-e
11:37otremblayin my slime-repl clojure buffer, not a thing
11:37gtrak``ah
11:38otremblayThe command goes through in my code buffer, I get "#'clojure-loc.core/clojure-loc" in my message buffer, but nothing anywhere else.
11:38otremblayNo error, no nothing
11:39gtrak``is there a println in the code itself?
11:41otremblayThe code I execute is just (println "lol")
11:42otremblayI honestly can't explain why I used an acronym for the expression of laughter, but I can't see it printed nowhere. No lols for me.
11:42gtrak``despair is when you println but there is no println
11:44gtrak``otremblay, it shows up for me in the slime repl buffer
11:45otremblayConfiguration is wrong then. Oh, the indignity.
11:45otremblayWait
11:46otremblayOh, no, false hope. It "showed up" right after my slime version number.
11:46gtrak``otremblay, make sure you've got clojure-mode on
11:46gtrak``otremblay, that's right
11:46otremblayHow do I do that?
11:46gtrak``try it again, and it'll be under that
11:46otremblayNo, it doesn't work.
11:46gtrak``yes it does
11:47gtrak``you just said it 'showed up' right after your slime version number
11:47otremblayIt does when I load slime.
11:47otremblayI have this in my .emacs
11:47otremblay(add-to-list 'load-path "~/opt/clojure-mode")
11:47otremblay(require 'clojure-mode)
11:48gtrak``ah
11:48gtrak``you can always load clojure-mode manually with M-x clojure-mode
11:50otremblayWhen I compile the code using C-c C-k it shows up in my repl window under the version number
11:51gtrak``yea, compiling the namespace runs the init for the namespace, which will run that line
11:51gtrak``rather, compile and run are kind of the same thing, though C-c C-k does more
11:52otremblayI don't understand why it doesn't throw it in my repl when I C-x C-e
12:04otremblayI think I'll make do with C-c C-k until I'm at least two orders of magnitude more proficient in the use of emacs.
12:10gfredericksanybody know if I can turn an aleph channel into an input stream or something?
12:14duck1123gfredericks: is this a ChannelBuffer?
12:14gfredericksor synchronously slurp a channel...
12:14gfredericksduck1123: no, it's not
12:14gfredericksduck1123: this is an http server which is receiving a req with a streaming body
12:15gfredericksI'm trying to forward the request, so any manner of getting the channel to feed into my synchronous call to clj-http would be acceptable
12:16gfredericksI should probably try using aleph client stuff instead of clj-http, but now is not a good time for refactoring...
12:16duck1123ok, look in aleph.formats, there's a ton of useful fns there
12:16gfredericksk
12:17gfredericksholy crap look at all that
12:17duck1123Unfortunately, many of them are private on 0.2.0, but that changed in the clj-1.3 branch
12:19duck1123of course, if this is a normal lamina channel, you'll probably want to look at pipelines. (I'm still not very good with pipelines)
12:19gfrederickshrm....
12:19gtrak``nothing in clojure is really private
12:20gfredericksgtrak``: yes but it indicates the intentions of the author
12:20gfredericksduck1123: the format functions seem to be only useful after I already have the content
12:21tomojbytes->input-stream ?
12:21gfredericksdon't have bytes, just have channel
12:21duck1123where is this channel coming from?
12:21gfredericksbytes are preferable to input-stream actually
12:22tomojmap* it?
12:22gfredericksaleph wiki says: Streamed requests will have a channel as their body. To check for this, see if (channel? body) returns true.
12:22tomojhmm
12:22tomojthat would be odd
12:22gfredericksby which I mean bytes are easier atm, not simpler :)
12:22gfredericksThis present moment is all about easy.
12:23duck1123and you're trying to take that channel and send it over http somewhere else, right?
12:23gfredericksyeah, using clj-http
12:23gfredericksatm clj-http is expecting a byte-array, which is the only reason that's preferable
12:24gfredericksobviously a stream is better performance
12:24gfrederickstomoj: does map* not return a new channel?
12:25tomojyeah, it does, but each message will be an input stream. don't think that's what you want..
12:25duck1123gfredericks: then you can take that channel and get a lazy seq
12:26gfredericksduck1123: yeah? (seq ch)?
12:27duck1123lazy-channel-seq
12:27duck1123gfredericks: must read: https://github.com/ztellman/lamina/wiki/Channels
12:28gfredericksduck1123: I must!
12:36dnolenif anyone is interested in hacking on a CLJS debugger, I've started sketching things out here https://github.com/swannodette/cljs-debug
12:41samaarondnolen: just looking at it now
12:41samaaronvery exciting
12:42dnolensamaaron: hardly anything there yet :) but hopefully I can get someone else excited enough to help out.
12:42samaaron:-)
12:43samaaroni've not used cljs beyond following basic tutorials atm
12:43dnolensamaaron: the WRDP (webkit remote debugging protocol) really makes it trivial to build a robust debugger.
12:43samaaronbut i do have a large project which i'm intending to use it for
12:44dnolensamaaron: setting breakpoints in the JS and instrumenting top level forms will be simple - the real challenge will be around getting a sensible sexpr level debugging behavior.
12:45samaaronwhat's the impedance mismatch between JS and CLJS?
12:45samaaronwithin the context of the dubugger
12:45dnolensamaaron: in CLJS you have macros - how we debug those? do we debug the macroexpanding source?
12:46dnolensamaaron: simple CLJS sexprs map to multiple JS statements, how map multiple JS steps to a simple CLJS one?
12:46dnolenstuff like that
12:47dnolenideally it would be very robust for user. you only deal w/ stepping through sexprs
12:47samaaroncool
12:47dnolenyou can ask to macroexpand an expression and step through macroexpanded source.
12:47samaaroni guess that's always the issue with a hosted language
12:48dnolensamaaron: yeah, I'm optimistic though, we have a very easy to use analyzer
12:48samaaronyou have to be able to interprete errors/operations in the host and understand how they correlate to operations in the hosted language
12:48dnolensamaaron: yup.
12:50technomancyanyone want to take a look at http://dev.clojure.org/jira/browse/CLJ-879 and possibly +1 it?
12:52samaarontechnomancy: what's the lein way of overriding jar deps with local projects in folders?
12:52samaaroncan I do it without using symlinks or changing my project.clj?
12:52technomancysamaaron: it's called checkout dependencies; I think it's covered in the readme or tutorial
12:53technomancytypically symlinks are used, but there's no reason you couldn't place the original directory right in the checkouts/ dir
12:53samaaronoh
12:53samaaroni don't want to do either of those really
12:53samaaronwith cake i could just add projects to my classpath in a config file
12:53technomancywhy not?
12:54samaaronbecause i'd have to teach my .gitignore about my checkout deps
12:54samaaronwhereas with cake i just teach .gitignore globally about .cake dirs
12:54TimMcjust the checkouts dir
12:54technomancyyeah, it's just a single line in gitignore
12:54samaaronoh ok, so i have a checkouts dir, but then i have to put symlinks in that?
12:54technomancyright
12:55technomancyit should already be in the gitignore of a fresh project
12:55samaaronsure, but that sounds like more effort than the cake approach
12:55TimMc...
12:56technomancyif it sounds like a nontrivial amount of effort you may be misunderstanding =)
12:56samaaronactually i might just be being unecessarily frictionful
12:56samaaron:-)
12:56solussdhow do I require the clojure.math library in my source file?
12:56samaaronso if i created a checkouts dir, woudl lein just pick it up automatically and favour that over any jar in the lib dir?
12:57technomancysamaaron: it reads the project.clj file from each dir in checkouts/ and places the :source-path and :resources-path on the classpath ahead of all jars
12:57samaaronoh, but i don't want to edit the project.clj with dev stuff
12:58samaaronbecause i check that into a repo that everyone else including non-dev people use
12:58TimMcsamaaron: No editing involved.
12:58samaaronoh sorry, i misunderstood
12:58technomancysure if there's no :source-path etc, it will use the defaults
13:00samaarontechnomancy: so if i placed the source of a subproject in my checkouts dir of a parent project, it would take precidence over the jar of the same project in the lib directory of the parent project without having to add :source-path and :resources-path statements to any project.clj file?
13:01technomancyright
13:01samaaronperfect
13:01technomancyI should look into revamping the checkout deps docs; people always get confused over them.
13:02technomancythough it's usually from people who think that adding checkout deps means they should drop it from project.clj.
13:02samaaronah, sure
13:02samaaroni guess people don't know which would take priority
13:02samaaronso drop it from project.clj to make sure
13:03TimMctechnomancy: What happens when they do that?
13:03technomancyTimMc: it works for them, but not for anyone else
13:03TimMcNice.
13:03samaaron:-)
13:03technomancysamaaron: aha, so clarifying the precedence should help in that case.
13:03samaarontechnomancy: definitely
13:04TimMctechnomancy: Is there any way to tell someone is doing that? Like checking the group.artifact?
13:04TimMcs/\./\//
13:04technomancyTimMc: hmm... yeah, issuing a warning would be possible I suppose
13:05TimMc`lein lint` :-)
13:05technomancyI'd rather make it clearer in the docs, but maybe misunderstanding is inevitable
13:05technomancyyeah
13:06technomancyhttps://github.com/technomancy/leiningen/commit/26be8a23fee3eef865ebe956c3ce1d6353172c03
13:36samaarondnolen: is WRDP supported in Chrome?
13:40dnolensamaaron: I've only got it to work in the Chromium builds
13:40samaaronperhaps it might work with Safari?
13:40dnolensamaaron: I'm planning on creating exact instructions soon on how to play w/ the repo
13:41samaaronor at least the Webkit nightlies?
13:41dnolensamaaron: yes it should, but I haven't figured out how to get it to work yet.
13:41samaaron:-)
13:41samaaronwhy not? it's not like you do much with your spare time...
13:42samaaron;-)
13:42dnolenheh
13:42samaaronto be honest i'm flabberghasted by the amount of stuff you hack on
13:42samaaronit's extraordinary
13:42samaaronyou could probably hack up overtone in a few weekends :-)
13:43dnolensamaaron: ha! no way, overtone is like 3 years of work :)
13:44samaarondid you see that someone used overtone to make a simple sequencer in their first night of hacking?
13:44dnolenno but that's great, it's really cool to see it taking off.
13:45samaaronand someone else sequenced Prokofiev's Troika with full bell synthesis in one gist: https://gist.github.com/1467356/886db6ce94fc393877629620659f3af81739ac1b
13:45samaaroninsanely cool
13:49dnolenwow
13:50samaaronstuff like that totally makes my day
13:51samaaronright, home time :-)
14:00seancorfieldquick emacs Q: I want to this Pig mode https://github.com/motus/pig-mode/blob/master/pig-mode.el but I'm not sure where to put the file - what's "site-list"?
14:01seancorfields/want to/want to add/
14:01technomancyseancorfield: try M-x package-install-file first; if that doesn't work you'll need a manual install
14:02seancorfieldpig isn't on the package list (hence that question :)
14:04seancorfieldmisread that... site-lisp... is there a standard place i'll find that? somewhere inside ~/.emacs.d ?
14:06technomancyit just means put it on your load-path somewhere
14:06technomancy~/.emacs.d is fine
14:06clojurebotIn Ordnung
14:06technomancy...
14:07Bronsalol
14:07technomancyclojurebot: forget /.emacs.d |is| fine
14:07clojurebotI forgot that /.emacs.d is fine
14:16ljosI was just wondering, what is the rational for having the doc-string before the arg-list in a function declaration and not after? I think it looks tidier with it after, but there might be a good explenation for why?
14:17arohnerljos: because if you have a fn with multiple arities, where should the docstring go?
14:17arohner(defn foo "a doc string" ([x] (+ x 2)) ([x y] (+ x y))
14:18Bronsawhy not?
14:18Bronsaoh
14:18Bronsathat's right
14:20ljosThat looks like a good explenation, but the two are distinct. In the event of multiple arities it should be before, but when the arity is 1 it should be after. It looks cleaner imo.
14:20ljosThough I see that that might cause confusion.
14:21technomancybetter to be consistent
14:26ljosI agree with that usually, but in this case I just think it makes it less readable when you have arity 1, and in my experience most functions have arity of 1. What I could imagine though is the possibility to choose where to put the meta-data yourself by using the tag in the outmost body. Like this: (defn foo [x] ^:doc "A doc string" (+ x x))
14:31tmcivercleanliness is in the eye of the beholder. Consistency is cleaner to me.
14:35technomancyhttp://neptune.cocollage.com/people/jmeowmeow/items/6252/
14:35technomancyjust saw that come up on the screen at the coffee shop I'm at.
14:35technomancylooks like midje has a new logo?
14:37ljosWhat I mean by consistent and cleaner is that when I the docstring after the arg-list I just have to look at the first line to know how to access the function, but with the other I will not know if I have to look at the first or the second. But I agree it is more consistent; and consistancy is usually better.
14:38duck1123personally, I prefer my arg lists to almost always be on their own line. (with the exception of very short fns)
14:40ljosEither way it is still cleaner. In my case you will always know that it is the next argument in the defn that is the arg list, but not so in how it is now since there might be a docstring or not.
14:41duck1123but if you have multiple arities, then the next element is a list, so it's not that easy already
14:42duck1123(defn foo "calculate foo" ([] 0) ([x] x))
14:43ljosThat is true, but with multiple arities you already have the problem with finding the arg-list.
14:44amalloysince we're on the topic of defns, am i the only one who thinks it's crazy that defn (a) allows attr-map at all, and (b) allows it before-or-after the docstring? does this feature predate an easy way to attach reader metadata?
14:45technomancyI'm guessing yes on the latter.
14:47hiredmantechnomancy: I don't think it does
14:51TimMcamalloy: Why is it crazy to allow attr-map? (You mean (defn foo ^{:foo :bar} [x] x), right?)
14:51amalloyTimMc: no, i mean (defn foo {:foo :bar} [x] )
14:51amalloyhiredman: maybe it predates the implicit copying of symbol-name meta onto the var meta?
14:52TimMcOh, I see -- no caret, of course.
14:52amalloyit just seems so weird to me that you would add this feature if it were already possible&easy with metadata
14:53TimMcAnd apparently the attr-map can go after the body too.
14:53amalloyno way, really?
14:54TimMcyep, in the explicit-arities verison
14:54amalloyi know you can have per-arity attr-maps, but those are after the arglist, not the body
14:54TimMc&(doc defn)
14:54lazybot⇒ "Macro ([name doc-string? attr-map? [params*] body] [name doc-string? attr-map? ([params*] body) + attr-map?]); Same as (def name (fn [params* ] exprs*)) or (def name (fn ([params* ] exprs*)+)) with any doc-string or attrs added to the var metadata"
14:55TimMcThe second form allows (defn foo ([x] x) {:foo :bar}) -- just tested it.
14:56amalloygratuitous inconsistency!
14:56TimMcWhere does it allow it before the docstring?
14:56amalloyTimMc: am i wrong? i thought it did
14:56TimMcI tried adding 3 attr-maps and it didn't work.
14:57amalloyapparently i'm wrong. fair enough
14:57TimMcStill pretty weird.
14:57amalloyTimMc: you could squeeze in ~23 attr-maps in a multi-arity function :P
14:58TimMcI don't see how to add attr-maps per-arity.
14:58amalloyman am i wrong about this too? i thought the point was to have different preconditions for different arglists
14:59TimMcGood point.
14:59amalloyah, yes
14:59amalloyhttp://clojure.org/special_forms#fn
15:01ambrosebsI brought up the attr map after the body with rhickey, he was saying he thought it would be nice if you had a ton of metadata so it didn't dominate the start of the fn. But it's a little known and unused feature
15:01technomancyin 1.7.8: "git diff learned --function-context option to show the whole function as context that was affected by a change" <- I wonder if this is extensible or just assumes an ALGOL-like.
15:01Raynesambrosebs: Your logic tutorial thing is directed at people with no prior experience with logic programming, right?
15:02ambrosebsRaynes: yes, I tried
15:02TimMc(defn foo "doc" {:a 2} ([x] {:b 4} x) {:c 3}) <- but :b never makes it into (meta #'foo), of course
15:02Raynesambrosebs: Then thank you and I'll read it later. I'm tired of not having any clue what the big deal is.
15:02`fogusTimMc: It wouldn't. That's a pre/post map
15:03Turtl3boiwhat is the definition of "meta data"
15:03TimMcCan it contain arbitrary keys/values?
15:03Raynes`fogus: I've decided to call our little marginalia console app 'marg'. Is that appropriate?
15:04Raynes`fogus: I figured the command would be 'marg', so naming the project itself that made sense.
15:04ambrosebsRaynes: also check out the Lojic series on clojure.org by stuartsierra
15:05`fogusTimMc: The pre/post map? Yes, it's a regular map. The :pre/:post keys are privileged, the rest go bai
15:05TimMcaha
15:05`fogusRaynes: Marg++
15:05RaynesI did. It was fun, but a little too brief and I didn't really get the "oh, so that's the point" feeling from it.
15:05RaynesMore posts will probably fix that.
15:05arohnerTurtl3boi: metadata is extra data you can attach to a value that doesn't change its value
15:06Turtl3boiis this something for the compiler usually
15:06TimMcIn practice, yes.
15:06TimMcYou attach metadata to the lists and vectors and maps that make up your code's structure.
15:06ambrosebsRaynes: that's the trick. It's hard to convince people this stuff is useful without first doing the hard yards
15:07gfredericksTurtl3boi: ##(= [1 2 3] (with-meta [1 2 3] {:foo "bar"}))
15:07lazybot⇒ true
15:08Turtl3boiwhat is that? like a #define?
15:08Raynesambrosebs: I think the problem is that when you're so passionate about a certain technology, it can become difficult to explain why it is so great to other people. I sometimes get a "why don't they just get it naturally!" feeling sometimes.
15:08gfredericksTurtl3boi: no ## is what lazybot uses for inline eval
15:09Turtl3boiso what's going on there? are you attaching metadata to [1 2 3]
15:09gfredericksTurtl3boi: so I was just getting it to evaluate (= [1 2 3] (with-meta [1 2 3] {:foo "bar"}))
15:09gfredericksyep
15:09Turtl3boiwhat's the metadata in this case? the {:foo "bar"} ?
15:09gfredericksyep
15:09gfredericks,((juxt meta first) (with-meta [1 2 3] {:foo "bar"}))
15:09Turtl3boinow tell me WHY you would want to do that in this case
15:09clojurebot[{:foo "bar"} 1]
15:10TimMc,(instance? clojure.lang.IMeta [1 2 3])
15:10clojurebottrue
15:10gfredericksTurtl3boi: no reason :) I was just demonstrating that it doesn't change the value
15:10ambrosebsRaynes: I'm usually lost for words when people ask. I wrote that tutorial while I was learning logic programming, so I'd hope I covered the common misunderstandings
15:11arohnerTurtl3boi: metadata is used for a lot of fun things. docstrings are metadata, the debug information about file and line number are metadata
15:11arohnerand it's left open so users can discover new uses for it
15:11Raynesambrosebs: It should be great. As long as there are no more than 2 uses of the word 'cheeky' in it. Are all aussies attached so attached to that word? :P
15:11ambrosebs:D
15:11RaynesMinus one attached. Donating that one to charity.
15:12TimMceither one?
15:12TimMcI guess it makes sense either way.
15:13amalloyTimMc: Raynes tries to write fault-tolerant IRC messages
15:14RaynesFault tolerance! Speaking of that, Tentacles has that now. Doesn't throw exceptions every time Github flips you off anymore.
15:14RaynesAnd oauth2 support, given arohner.
15:14Raynes<3
15:14`fogusRaynes: Thanks for taking marg BTW.
15:15`foguss/taking/tackling/
15:15RaynesIf people don't start writing tentacles crap soon, I might just explode.
15:15Raynes`fogus: I'm taking it to the bank.
15:15ambrosebschaching
15:16Raynes`fogus: Without needing to copy run-marginalia, it's like a 6 line application. I'm just lazy. Should have had it done by now.
15:17danielhttps://gist.github.com/1473695 can anyone see why im getting this error?
15:20ambrosebsthis will probably interest a few here (if you know haskell, think protocol=typeclass) https://github.com/frenchy64/typed-clojure/blob/813e8c0e0b7b1beec522bbc70e90034111a8b674/src/typed_clojure/test.clj#L11
15:20brehautwhoa
15:20`fogusRaynes: Understood. 6 lines of code. 635 lines of marg docs!
15:21brehautambrosebs: is all that working‽
15:21ambrosebsexperimenting with syntax of course, but I have got a very simple type checker working
15:21ambrosebsno
15:22TimMcdaniel: Where is that error originating?
15:22dnolenambrosebs: nice
15:22pjstadig`fogus: i ran into a bug in unk yesterday
15:23pjstadigat least i think it's a bug
15:23danielTimMc: when i try to open /:id/login in my browser, seems to originate from the (defpartial login line
15:23pjstadignot sure how to handle it mid transition to contrib
15:23danielI have another partial which is giving me a different error: Wrong number of args (2) passed to: notepad$lock - (class clojure.lang.ArityException)
15:23daniel(defpartial lock [{:keys [id password]}]
15:24daniel(2 args) is what it should be
15:25`foguspjstadig: A ticket at http://dev.clojure.org/jira/browse/CMEMOIZE would be great
15:26brehautwhat is this clojurescript analyzer that typed-clojure's readme mentions?
15:26TimMcdaniel: Well, login expects a map, but (login id) is probably not passing it one.
15:26nickmbaileyis there an idiomatic way to take a map of properties and convert it to 'setProp' calls on a java option for interop?
15:27ambrosebshttps://github.com/frenchy64/typed-clojure/blob/874ab3f5ab62a15f0cafa1006f8c5b3c00eec7d1/src/clojure_analyzer/compiler.clj
15:27ambrosebsI've converted the CLJS compiler (analyzer portion) to work on CLojure code
15:27ambrosebsexample usage: https://github.com/frenchy64/typed-clojure/blob/874ab3f5ab62a15f0cafa1006f8c5b3c00eec7d1/src/clojure_analyzer/docstrings.clj
15:28ambrosebsnot all things work, but enough to get some work done
15:28nickmbaileylike {:prop1 100 :prop2 200} -> (doto (new Object) (.setProp1 100) (.setProp2 200))?
15:28TimMcnickmbailey: Basically, convert to bean accessors?
15:28danielTimMc: same error if i change to (defpartial login [id]
15:28nickmbaileybean setters yeah
15:28brehaut(map munge params) <- lol
15:29nickmbaileydammit i have to leave for a sec but thanks in advance for any advice
15:29ambrosebsbrehaut: heh, (def munge identity)
15:29brehauthaha
15:30ambrosebsthe whole thing is a bit of a hack of course
15:30ambrosebs(my conversion)
15:30ambrosebsI'll start a serious attempt soon
15:31brehautambrosebs: what information does the analyzer produce?
15:32brehautoh. dont worry, i just found analyze and its docstring
15:32ambrosebsit's lots of fun to play with
15:35pjstadig`fogus: http://dev.clojure.org/jira/browse/CMEMOIZE-3
15:37danielit seems like my error is due to the form-to helper, i have another partial which works fine
15:37danielalso uses a map of :keys
15:45TimMcdaniel: "Named" indicates something is calling (name ...), perhaps for a map key or a field name. "Character" means maybe a string is getting turned into a seq.
15:52danielTimMc: think i've found the problem, i need to pass form-to a vector
15:52danielthanks
15:52`fogusmember:pjstadig: Thanks! Even better would be to assume that the underlying cache is an associative structure. So maybe it's enough to get the snapshot via (into {} (.cache @cache))
15:53`foguspjstadig: ^^^
15:54pjstadig`fogus: oh right, yeah that would be better
15:55`fogusBut, yes. Patches welcomed. :-)
15:59pjstadig`fogus: actually wouldn't (into {} x) treat x as a seq, maybe just returning (.cache @cache) is all that's needed if the underlying cache can be assumed to be associative?
15:59pyr`fogus: I see that you mention AsyncCacheProtocol in the core.cache 0.5.0 announcement
15:59pjstadigi guess we have to deref the delays though
16:03`foguspjstadig: We can return the cache directly if it's immutable I suppose, but they might not all be.
16:03`foguspyr: Indeed
16:03`fogusgotta run gentle-persons
16:04`fogusbai now
16:11danielcan anyone enlighten me on this error? Key must be integer - (class java.lang.IllegalArgumentException)
16:13danielnevermind, i think im passing around anull value somewhere
16:15amalloydaniel: you will get about twenty times as much help with errors if you gist an actual stacktrace instead of excerpting the part you think might be relevant
16:16amalloyfor this particular error it's easy though: you're looking up an index in a vector, and the index isn't an integer
16:16amalloy&(get [1 2 3] 1)
16:16lazybot⇒ 2
16:16amalloy&(get [1 2 3] "test")
16:16lazybot⇒ nil
16:16amalloy&([1 2 3] "test")
16:16lazybotjava.lang.IllegalArgumentException: Key must be integer
16:32Turtl3boi OH "Lisp" stands for "List processing"
16:32danielamalloy: thanks
16:33Somelauwjohn mccarty died this year in october
16:33SomelauwHe was the inventor of lisp
16:34TimMcdaniel: Ah, so your string *was* getting seq called on it, and then name was getting called on the first char.
16:34Turtl3boiawww man
16:34Turtl3boii didn't even know that
16:35SomelauwI didn't saw it in any newspapers and learned it by actually visiting wikipedia.
16:36danielwell they were busy reporting on Steve Jobs
16:37Turtl3boiwell i should've known more about the Lisp language
16:37amalloyre mccarthy: https://twitter.com/#!/danbernier/status/128599665737338882
16:39amalloy(point being, i guess, that the CS "media" was pretty busy at the time)
16:40SomelauwWhat!? Is Ritchie dead as well?
16:40amalloyyes
16:40amalloyoctober was a sad month
17:25lobotomyargh, how the heck is binding supposed to work
17:26lobotomyis it not supposed to cascade down function calls? or is there something else wrong here
17:27cgrayin compojure, is it possible to have a route like "/foo/:bar" and have that get called when the url is "/foo/bar.baz"?
17:28cgrayi.e., have dots in the url
17:30cgrayaha, it looks like you can with ["/foo/:bar" #"[a-zA-Z0-9\.]*"] or so
17:31cgrayoops ["/foo/:bar" :bar #"[a-zA-Z0-9\.]*"]
17:32amalloycgray: fwiw, the \ in \. there is irrelevant
17:32cgrayamalloy: thanks
17:33cgrayand I guess it should be + instead of * at the end, so that the empty string isn't accepted
17:33amalloyactually that whole regex is #"[\w.]+"
17:33amalloyi think? you can put \w inside character classes, right?
17:34nickiksome emacs hacker around?
17:34amalloy&(re-seq #"[\w.]+" "words. more words.")
17:34lazybot⇒ ("words." "more" "words.")
17:34amalloy~anyone
17:34clojurebotJust 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:38cgraycan the percent symbol not go in a character class?
17:39lobotomyon binding: why doesn't the following code work? -> http://pastebin.com/NZegZQSw
17:39cgray&(re-seq #"[\w.+-\%]+" "words.+with-pluses%")
17:39lazybotjava.util.regex.PatternSyntaxException: Illegal character range near index 7[\w.+-\%]+ ^
17:39cgrayneeded another \
17:39amalloycgray: \%, really? take all the \s out of your regexes :P
17:39cgrayamalloy: didn't work that way
17:40amalloywell \\% is certifiably crazy if you just want to allow %. it's identical to % except that it also allows backslashes
17:41amalloyit's the - that's causing you problems
17:41cgraydamn it
17:41amalloy#[-\w.+%]
17:41amalloy#"[-\w.+%]"
17:41cgrayyep, you're right
17:41_ulisesahoy
17:42lobotomy(also, how the hell do i disable the pause in emacs after slime returns an error)
17:42amalloylobotomy: i think it's fair to say that the odds of anyone reading-and-executing all that code and telling you what's wrong is roughly 0%.
17:43_uliseslobotomy: ref. 1st question, that's quite some code, which bit doesn't work?
17:43_ulisesoh, heh
17:43lobotomythe last 15 lines are the relevant ones
17:43amalloybut you're probably experiencing issues related to the interaction between laziness and binding
17:43amalloyyes, definitely
17:43lobotomybinding works when i do one thing, when i do multiple things it doesn't
17:44lobotomyif i put the for inside a binding, that also doesn't work
17:44amalloyno, it works when you do N things, but you are doing 0 things. for returns a lazy sequence
17:44weavejestercgray: The latest RC of Compojure supports "." in keywords.
17:44weavejesterBy default
17:44lobotomyeven though all the things work individually
17:44amalloyby the time elements of that lazy sequence are evaluated, the binding is no longer in place
17:44lobotomymy theory is that whoever coded up this stuff is even less capable with clojure than i am
17:45amalloyno, it's just you
17:45cgrayweavejester: good to know, though I am hacking on 4clojure, so I guess it's up to the team if they want to use the RC
17:45_ulisesnice theory
17:45lobotomyi mean, that isn't my code
17:45lobotomyexcept for the last 15 or so lines
17:45amalloycgray: the only issue is in the last 15 or so lines
17:46amalloycgray: what are you adding?
17:46cgrayamalloy: openid support
17:46amalloyer, lobotomy: the only issue is in the last 15 or so lines
17:46amalloynice, thanks
17:46lobotomyso you mean i can't use for in the code?
17:46cgrayamalloy: thank me when it's done :P
17:46lobotomywhat do i do then, use doseq instead?
17:46amalloylobotomy: you need to understand how lazy sequences and binding interact. once you understand that, you can use for whenever you want
17:47lobotomywell, how do they interact?
17:47amalloyfor immediately returns a lazy sequence. by the time elements of that lazy sequence are evaluated, the binding is no longer in place
17:47lobotomyyes, i got that
17:47amalloyit's the difference between lexical scope and dynamic scope
17:48amalloy&(let [f (binding [*clojure-version* 10] (fn [] *clojure-version*))] (f))
17:48lazybotjava.lang.SecurityException: You tripped the alarm! pop-thread-bindings is bad!
17:48amalloy,(let [f (binding [*clojure-version* 10] (fn [] *clojure-version*))] (f))
17:48clojurebot{:major 1, :minor 3, :incremental 0, :qualifier nil}
17:49amalloy,(let [f (let [*clojure-version* 10] (fn [] *clojure-version*))] (f))
17:49clojurebot10
17:49lobotomynow that i've understood that, how do i get for to work?
17:50amalloyany number of ways. you could wrap a doall around the body of try-things
17:51amalloyyou could have try-things capture *game-info* lexically, and then rebind it dynamically at each iteration of the for
17:58SomelauwSomething that really annoys me is that all lisp dialects have a different order in which to supply the arguments to reduce.
18:06amalloySomelauw: really? what do scheme and CL use?
18:09amalloyfwiw, haskell uses the same order clojure does, for both foldl and foldr
18:10brehautit happens to be the most useful order for partial application
18:11Somelauwamalloy: scheme does (foldl cons '() '(1 2 3))
18:11Somelauw'(3 2 1)
18:11amalloythat's the same order as clojure?
18:11SomelauwCL does (reduce #'cons '(1 2 3))
18:11Somelauw((1 . 2) . 3)
18:12Somelauwclojure does lisp order, but clojure can't use cons that way
18:12brehaut,(reduce conj () '(1 2 3))
18:12clojurebot(3 2 1)
18:12Somelauw(reduce list [] [1 2 3])
18:12Somelauw((([] 1) 2) 3)
18:12brehauti think you mean that the reduce function takes the arguments in reverse order
18:12weavejesterIf I want to remove a piece of data from a vector whilst maintaining its order...
18:13amalloyweavejester: don't use a vector :P
18:13weavejesterIs there a better way than just (vec (remove (partial = blah) d))
18:13weavejesteramalloy: What would I use instead?
18:13kephalecant you use ordered.set?
18:13weavejesterThere's an ordered set?
18:13amalloynah, ordered.set is pretty bad at disjoins too
18:13amalloyweavejester: i implemented one; it keeps a backing set and vector internally
18:14weavejesterI'm not worried about performance; it's more an example.
18:14amalloyupdates both, reads from one or the other, depending whether you want ordering or membership test
18:14amalloyweavejester: i don't think a good data structure for what you want really exists ready-made (in clojure)
18:15amalloya vector would be fine for an example, though using seqs probably makes more sense if you're going to be doing much removing
18:15weavejesteramalloy: So is (vec (remove (partial = item) coll)) the best way of writing it, do you think?
18:15SomelauwThe code for cl was wrong, it should be: (reduce #'cons '(1 2 3) :initial-value '())
18:15Somelauw(((NIL . 1) . 2) . 3)
18:16amalloyweavejester: well, unless you have duplicates in the list
18:16weavejesteramalloy: Fortunately nope
18:17amalloyif you wanted to be careful about that case you could write ##(let [v [1 2 3 1 2 3] [before [x after]] (split-with (complement #{3}) v)] (vec (concat before after)))
18:17lazybotjava.lang.IllegalArgumentException: Don't know how to create ISeq from: java.lang.Long
18:18amalloyor...apparently not actually that, but something close?
18:18SomelauwAnd clojure and scheme don't use the same order. conj just takes the arguments in opposite order than cons.
18:19brehautSomelauw: _reduce_ takes the functions in the same order, the function to reduce takes them in reverse order
18:19_ulisesamalloy: would you mind explaining to me the interaction between lazy seqs and bindings? I've been bitten before with binding and threading so I wouldn't mind understanding a bit more about the interplay there. Alternatively, I'm happy with an RTFM and a pointer :)
18:20amalloyif you've already read my explanation to lobotomy i'm not really up to something more detailed
18:20amalloy&(let [v [1 2 3 1 2 3] [before [x & after]] (split-with (complement #{3}) v)] (vec (concat before after))) ;; forgot the &
18:20lazybot⇒ [1 2 1 2 3]
18:20_ulisesok, no worries, thanks anyway :)
18:31lobotomyi went with doall, seems to work and is simple enough for now
18:38cgrayamalloy: if you want to play with the openid code, have a look at the openid branch in my github https://github.com/chrismgray/4clojure/tree/openid ... I think it's getting pretty complete
18:38sdeobaldDoes anyone know if clojure.math.expt has found a new home yet in 1.3?
18:43amalloycgray: if you're interested in getting feedback or a dialog about your changes, you can open a pull request. if the feature isn't "done" yet, then just make a note that you don't want it actually pulled. pull requests are great for review/discussion, because they're a centralized place to have a discussion
19:14cgrayamalloy: ok, will do
20:19wiseenis there a logging library (like tools.logging) for clojurescript ?
20:22cgraywiseen: I don't know tools.logging, but for simple logging, you can use (.log js/console foo)
20:25wiseencgray, will that work cross browser ?
20:25wiseenby work I mean not fail :)
20:27cgraywiseen: I think so
20:27cgrayit works on chrome and firefox
20:28amalloyi think console.log is part of the js spec (and a part that is actually implemented by everyone)
20:33dnolencgray: console.log will not work on < IE 8, if that matters.
20:34cgraydnolen: it doesn't to me, it might to wiseen :)
20:36wiseenwill just add dummy log-error and log-info to my lib
20:36wiseenso I can turn it off/on when I want
20:57TimMcIt's only available if you have a debugging tool, AFAIK.
20:58TimMcIE 8 and Chrome come with dev tools by default.
21:25TimMcgtrak```: I think it is (abstract (singleton ((proxy factory) bean)))
21:25TimMcafter much deliberation
21:48jhirnThis may be unorthodox, but is it possible to bind the result of a :when test to return in a list comprehension.
21:48jhirnEX; (for [x xs :when (fn x y)] [x (fn x y)])
21:49licenserjhirn: map it beforehand?
21:50licenser(for [[x r] (map (fm [x] [x (f xs)) xs) :when r] [x r])
21:50licenseror along the line
21:50jhirnLet me see if that works for my case
21:51licensernot when you just copy since I messed yup f and fn ^^
21:51licenseralso I forgot your y
21:51jhirn=) I'll interpolate
21:51licenserfine fein :)
21:51licenser*pets on the head and tosses a cookie* good programmer, what a goooood programmer
21:56jhirnStill working on it, pulling a function out atm
21:57licenser^^
21:57dnolenambrosebs: starting to dig into the CLJS analyzer, it's pretty nice how much is already there. do you use the cljs.compiler/namespaces atom at all?
22:06jhirnSo this is my actual comprehension. I'm not convinced it has to be a comprehension but this is the wall my head is currently cozy with.
22:06jhirn(for [original-filename (:deleted-files files)
22:06jhirn :when (moved-file-location original-filename (:new-files files)) ]
22:06jhirn [original-filename, (moved-file-location original-filename (:new-files files))])
22:09brehautjhirn: i think (keep (fn [original-filename] (when-let [loc (moved-file-location original-filename (:new-files files))] [original-filename loc])) (:deleted-files files))
22:09brehautis equivalent
22:10jhirnit passes the test, thanks.
22:11brehautjhirn: you might find :let useful in your comprehension version too
22:11jhirnah.... can you combine :let and :when?
22:12brehaut,(for [a (range 10) :let [b (* a 3)] :when (odd? b)] b)
22:12clojurebot(3 9 15 21 27)
22:15jhirnThat is exactly what was I was looking for brehaut!
22:15jhirnMany thx.
22:21reiddraperAny ideas why defrecord and deftype don't take docstrings? Or am I missing something?
22:28meliponehi! what's the best way to find an element in a collection in clojure?
22:28brehautreiddraper: presumably because they generate classes, and classes come from javaland and thus cant have meta data
22:28brehautmelipone: it depends on the collection
22:28meliponemsg brehaut how about '(a b c d e f) and I want to find the position of d?
22:29brehautmelipone: its uncommon to use a list for a list in clojure, you probably mean a vector or a seq?
22:29meliponebrehaut: yes
22:30brehaut(that was terribly imprecise english)
22:31meliponeLOL
22:31brehautso with a vector you can do
22:31brehaut,(.indexOf [1 2 3 4] 3)
22:31clojurebot2
22:31meliponeoh, I can do that?
22:31reiddraperbrehaut: that makes sense, thanks
22:32meliponethanks, I thought that indexOf was only for strings
22:32meliponebut strings are vectors too ...
22:32brehautmelipone: clojure's collections implement the appropriate java collections api methods
22:32brehautmelipone: strings are assuredly not vectors
22:33brehautbut both are able to be coerced into sequences
22:35brehautmelipone: i dont know how you would find the index of something in sequence though
22:35brehauthuh. apparently .indexOf works again
22:35brehautmelipone: in both cases i would expect it to be an O(N) operation
22:40brehautmelipone: the other comment is that if you are using either a seq or a vector and wanting the index of things, you are probably using the wrong datastructure
22:48amalloybrehaut: java.util.List has .indexOf - vectors and seqs implement that, but maps don't
22:49brehautamalloy: yeah i realised that vectors didnt, i wasnt aware that seqs did
22:49amalloyList being, basically, "an ordered Collection"
22:51gtrak```TimMc, glad we got that cleared up :-)
22:52amalloybut i'd like to echo brehaut's last point: if you're trying to look up something's index in a collection, you're probably using either a bad algorithm or a bad data structure. i tried to make that point myself but apparently wasn't connected to irc at the time :P
23:01meliponeamalloy: what should I be using then?
23:01amalloyimpossible to answer in isolation
23:17reiddraperis autodoc popular outside of clojure.org? It seems that people have been putting their own releases on clojars because there haven't been official releases in forever
23:28technomancy_reiddraper: yeah, there are issues with autodoc. most people seem to prefer marginalia.
23:29reiddrapertechnomancy_: thanks, i think marginalia is awesome, and was hoping to have both types of documentation. oh well
23:31technomancy_I never really saw the point; having docstrings available at runtime always seemed a lot more convenient than reading HTML
23:31technomancy_unless you need to send a link to someone, I guess
23:32reiddrapertechnomancy_: the point of marg or autodoc?
23:32technomancy_mostly autodoc, but I guess the same point applies to marginalia
23:33technomancy_marginalia is a bit different since it's all on one page though, which you don't get with reading source
23:33reiddraperI think there is something to having the "public" api in one place, which is what i was hoping to get from autodoc
23:34technomancy_do you use slime?
23:34reiddrapernope
23:34reiddrapervim user
23:36reiddrapereither way having html docs is nice for new users who haven't even necessarily got a repl open with your project, just starting to see if it's well documented, etc.
23:36technomancy_yeah, I guess so
23:39reiddrapertechnomancy_: otherwise why would heroku have html docs :)
23:40technomancy_welllll...
23:40reiddraperhehe
23:40technomancy_documenting an application is very different from documenting a library
23:40technomancy_lots of docs here: https://github.com/technomancy/leiningen/tree/master/doc
23:41tmciverI've got a project with a print method and when I use it I get a warning that 'print already refers to clojure.core/print' which is fine. But when I (use :reload my-ns) I get an IllegalStateException. What should I do about that?
23:41dnolenanyone got opinions about this ClojureScript enhancement? https://github.com/clojure/clojurescript/compare/master...analyzer-plus, it brings back some of the functionality that was lost from Vars and Namespaces not being reified in ClojureScript.
23:42reiddrapertechnomancy_: and those are another great type of documentation. I sort of like the idea that there are three types of documentation. 1. high level tutorial or narrative type. 2. public api ala clojure.org 3. code comments
23:43technomancy_reiddraper: yeah, I just think most of the time reading comments from the files themselves is more convenient than a web page
23:46reiddrapertechnomancy_: sure, fair enough
23:51ambrosebsdnolen: what exactly is it doing?
23:51dnolenambrosebs: storing the line numbers of all defs
23:51dnolenambrosebs: that's normally done on vars in Clojure
23:51ambrosebsah cool
23:52dnolenambrosebs: but really it's more than just about line numbers, cljs.compiler/namespaces becomes the place to go after running cljs.compiler/analyze-file
23:53technomancy_ambrosebs: curious what the rationale for not using type hints for typed-clojure is
23:53ambrosebstechnomancy_: heh, actually still juggling. It's starting to look like an ok idea
23:54technomancy_ambrosebs: if it were me I would have just taken it for granted, so it's good that you're thinking it through. =)
23:55ambrosebstechnomancy_: seemed funny to me to use a compiler "hint" as static type information
23:55ambrosebsbut it's clean
23:55ambrosebsand has type information :)
23:56technomancy_yeah, I can see how you wouldn't want to complect "here's something to help you avoid reflection" with "help me tell if this program is correct" but I don't really see them diverging at all in practice
23:57ambrosebsexactly, I just need a little more convincing
23:58technomancy_technically right now types that don't match the hint are not bugs by definition, but it's hard to imagine real cases where they are intended.
23:58technomancy_best-case is they're harmless.
23:59ambrosebsyes