2012-02-20
| 00:02 | michaelr525 | hello |
| 00:03 | emezeske | michaelr525: Hello indeed. |
| 00:04 | emezeske | Woohoo, I built myself a Heisenbug. This should be fun! ^_^ |
| 00:13 | michaelr525 | Heisenbug? |
| 00:14 | emezeske | michaelr525: A bug that changes it's behavior, or disappears entirely, when you try to observe it. Sort like Heisenberg's uncertainty principle. |
| 00:16 | michaelr525 | oooh |
| 00:16 | emezeske | A lot of race conditions are like that... You add some logging code or whatever, and it screws up the timing just enough that the bug goes away. Ugg! |
| 00:19 | technomancy | amalloy: do you think that ordered bug would be hard to fix? |
| 00:20 | amalloy | technomancy: what bug is that? |
| 00:20 | technomancy | https://github.com/flatland/ordered/issues/2 |
| 00:20 | technomancy | assumed you were watching that repo like a hawk =) |
| 00:21 | devn | overtone is fun. |
| 00:21 | technomancy | btw, does anyone still need a Leiningen sticker? |
| 00:21 | amalloy | i used to stay on top of github notifications, but they changed their UI in some subtle way that makes me completely ignore them |
| 00:21 | technomancy | amalloy: understandable |
| 00:21 | technomancy | the only way I keep up with them now is via email |
| 00:21 | devn | technomancy: ah, yes, so long as it has a heavy duty moustache |
| 00:21 | technomancy | since I can actually sort and filter that stuff |
| 00:21 | technomancy | I've been saving a really easy issue for a beginner |
| 00:21 | technomancy | devn: moustache thickness guaranteed |
| 00:22 | devn | !!! |
| 00:22 | devn | that is exciting. |
| 00:22 | devn | technomancy: i would like to sponsor leiningen contributors |
| 00:22 | technomancy | devn: basically I want you to be able to customize which java is used from within project.clj itself |
| 00:23 | devn | for every leiningen contributor you get I will send them some spirit gum and a big burly glue-on theatre-quality stache |
| 00:23 | technomancy | now there's an idea |
| 00:23 | devn | im not joking. get adresses and the staches will flow like water |
| 00:24 | devn | technomancy: that's pretty hardcore. who has that use case? |
| 00:24 | devn | (not saying it's not valid, just never have even thought about it) |
| 00:24 | technomancy | devn: basically I want to be able to do lein-multi-type stuff across JDK versions |
| 00:25 | technomancy | easy to test across Clojure versions: https://gist.github.com/1846759 |
| 00:25 | devn | *nod*, but why? is that a big problem for people? |
| 00:25 | technomancy | I've had a couple bugs in Leiningen that only surfaced on 1.5 |
| 00:26 | devn | how old is that? |
| 00:26 | technomancy | right now 1.7 hasn't been around long, but when 1.8 hits that's potentially 4 different JDKs, plus more if you're crazy enough to care about the IBM ones etc. |
| 00:26 | technomancy | it's ancient, but Clojure supports it |
| 00:26 | amalloy | technomancy: a fix is just five characters. still researching whether that's the right fix though |
| 00:26 | emezeske | Hey, I want to repeatedly run a function every N seconds from a background thread, while the main thread does other stuff. Is there an idiomatic way to do that? I thought futures might help, but my future never seems to get executed, as I never dereference it. |
| 00:26 | amalloy | emezeske: futures run whether you deref them or not |
| 00:26 | technomancy | devn: anyway, I've pretty much decided to drop 1.5 support, but it would be nice if I found out about the breakage some other way than someone bitching about it in #emacs |
| 00:26 | devn | technomancy: does it make sense to support 1.5? why not be opinionated and force an upgrade? |
| 00:27 | emezeske | amalloy: So that should work? I must be doing something crazy |
| 00:27 | devn | technomancy: if the bug report you received came as a msg on #emacs then I would probably downgrade it even further :) |
| 00:28 | technomancy | devn: so do you want to send this patch or should I do it myself? =) |
| 00:28 | devn | :X |
| 00:29 | amalloy | technomancy: so the right fix is to duplicate the crazy behavior of APersistentMap.cons, where it checks for MapEntries, then for Vectors, then for a seqable thing of MapEntries. but the general consensus seems to be that that was a crazy thing to do in the first place, so i'm not super-keen on copying it |
| 00:29 | devn | I think I'm advocating not doing it all |
| 00:29 | devn | doing it at all* |
| 00:29 | technomancy | antares_: what do you think? you mentioned offering support for multiple JDKs in Travis, right? |
| 00:30 | devn | as a stakeholder of leiningen I want new features and increased stability, not legacy support |
| 00:30 | technomancy | what if it was just another profile value that you could set? then a single lein with-profiles call could test against them all |
| 00:30 | devn | but that's just me |
| 00:30 | technomancy | devn: I don't care about 1.5 at all; I'm thinking 6-8 |
| 00:30 | amalloy | because (merge m ()) comes down to (conj m nil). hash-map handles that by pretending nil is an empty map, whereas i pretend it's a two-element vector with nil k/v |
| 00:30 | devn | technomancy: ah |
| 00:31 | devn | amalloy: ick |
| 00:31 | technomancy | wow, that's gross |
| 00:31 | devn | yeah, seriously, fuck that. |
| 00:31 | jaimef | devn that you david? |
| 00:31 | devn | jaimef: nope. |
| 00:31 | technomancy | amalloy: if you put it that way I can work around it in lein |
| 00:32 | amalloy | technomancy: i can easily fix this exact scenario, in a way that doesn't bother me |
| 00:32 | technomancy | amalloy: would into have the same problem? |
| 00:32 | amalloy | (into {} ())? no, that would be fine |
| 00:32 | devn | jaimef: why do you ask? |
| 00:33 | technomancy | amalloy: ok, I'll use that for now then |
| 00:33 | amalloy | in the meantime, i can choose to do nothing when you conj nil, and not fix the behavior when given a map to conj |
| 00:33 | amalloy | well. not "fix" it |
| 00:38 | devn | technomancy: what's new on the clojars front? ;) |
| 00:39 | devn | technomancy: i say that in jest only because i havent seen much change. clojars really needs an overhaul. we need rubygems-esque 1:1 dependency + require behavior |
| 00:39 | technomancy | devn: it's next on my plate after getting the lein2 preview out |
| 00:39 | devn | whenever i am showing someone clojure we come up with a project and i say: great! i know of a library we can use! |
| 00:40 | devn | we hit clojars, find it under some ridiculous nested: org.manythings.andmore.frederick/alibrary |
| 00:40 | devn | oh right...how do we use it in our project? (ns ... (:require [...])) |
| 00:41 | devn | "hold on a sec, i need to inspect the jar to figure out which freaking namespace this lives in" |
| 00:41 | technomancy | devn: so one thought is to keep the current repository and have a separate "releases" repository that has a higher bar for uploads |
| 00:41 | devn | that is deadly to noobs |
| 00:41 | technomancy | it will accept uploads over HTTP, which will mean that it will be trivial to check out and hack on yourself without compiling nailgun, setting up a new unix user, etc |
| 00:42 | technomancy | so that means adding support for features like HTML doc hosting would be way easier |
| 00:42 | amalloy | technomancy: 1.1.0 is on github and clojars now |
| 00:42 | devn | is there any way around the problem of: name of dependency does not match thing you actually use or require |
| 00:42 | technomancy | devn: because what you're describing is a documentation problem |
| 00:42 | technomancy | amalloy: superb; thanks |
| 00:42 | technomancy | amalloy: that's not a simple bugfix bump? |
| 00:43 | amalloy | meh. it changes behavior that wasn't well-defined; whether it's a bug or a new feature or a compatibility break is not defined either |
| 00:43 | devn | technomancy: *nod*, i suppose it is -- i'm evangelizing clojure like a sonofabitch, but sometimes the dependency stuff is like 2/3rds of the time I spend working with someone on clojure. it seems crazy. |
| 00:43 | amalloy | so i averaged |
| 00:44 | devn | technomancy: if the other person im pairing with is driving i need to show them how jars are things we can navigate to determine what namespace needs to be required. i can't overstate this: it's crazy. |
| 00:45 | technomancy | hm; that's the one disadvantage of not having jars in lib |
| 00:45 | technomancy | you can't just pop over to emacs with them |
| 00:46 | devn | (at least for people coming from ruby who say: gem install foo, vim thing.rb, "require 'foo'" -- i realize there are some mismatches there as well, but in clojure land sometimes it is 3x as hard -- you dont have to guess where the - or the _ is, you have to guess at where the _ or - is in 4 different dot-separated portions of the dependency |
| 00:46 | devn | and then guess at whether the library creator used .core as the default |
| 00:47 | technomancy | huh? you never have _ in require calls? |
| 00:47 | devn | that's crazy talk from me, just riffing here. |
| 00:47 | technomancy | that seems like a tooling problem though |
| 00:47 | devn | i mean, i can't be the only one who sees this when teaching new people the language |
| 00:47 | technomancy | well, a combination of tooling and crappy docs |
| 00:49 | devn | "oh right, you want to use enlive, so you need to type: (:require [net.cgrand.enlive-html :as enlive]) |
| 00:49 | technomancy | so what we need is for slime and nrepl to offer tab completion on require and use calls |
| 00:49 | technomancy | doesn't help for people who insist on reverse-domain-style namespaces |
| 00:49 | technomancy | but there's not much hope for them |
| 00:50 | technomancy | right now tab completion only works for stuff that's already required |
| 00:50 | devn | we have the power to redistribute. people who submit that style should automatically have their repo searched and replaced and have that release cut under "clojars" |
| 00:51 | devn | like vimscript does it |
| 00:51 | devn | granted that's not 1:1, but they at least say: "okay, we have this zip file, we put it on github for you under vimscript" |
| 00:51 | technomancy | I don't know anything about vimscript |
| 00:52 | technomancy | this is the first time I've heard it used in any context other than "it's the worst thing I've ever seen oh no make the hurting stop" |
| 00:52 | devn | honestly me either! i've written trace amounts of it and embarassed to say so |
| 00:52 | devn | and am* |
| 00:53 | devn | either way, if you go to the "canonical" website for vim scripts, you find lots of ways they're being distributed. vim-scripts created a github account where they "mirror" them |
| 00:53 | Scriptor | using lein with mingw32 here, having it crash because of no class def found for jline |
| 00:54 | Scriptor | otherwise lein works fine if I use the batch script from cmd |
| 00:54 | ibdknox | technomancy: what do you use for your blog? |
| 00:54 | Scriptor | please help me not have to use cmd |
| 00:54 | technomancy | Scriptor: is it possible to install rlwrap? |
| 00:54 | technomancy | ibdknox: http://p.hagelb.org/Rakefile.html |
| 00:54 | devn | technomancy: i think we have a problem in our community when it comes to finding what we want, and how to use it *right now*. yes, I realize that is instant gratification territory, but even still |
| 00:54 | ibdknox | haha |
| 00:54 | devn | there are like 3-4 sites that keep track of libraries, how to get them via lein, etc. |
| 00:55 | devn | that's a smell |
| 00:55 | ibdknox | nice |
| 00:55 | technomancy | devn: there are? |
| 00:55 | Scriptor | technomancy: any binaries for it available? I don't have gcc or make installed right now |
| 00:55 | devn | technomancy: im referring to sites like the clojure-toolbox, etc. |
| 00:55 | devn | there are others, dont have links off the top of my head |
| 00:55 | technomancy | devn: oh yeah, we definitely need to merge clojars and clojuresphere |
| 00:55 | technomancy | that's on my list too |
| 00:56 | technomancy | Scriptor: don't know; sorry |
| 00:57 | ibdknox | emezeske: me too |
| 00:57 | emezeske | ibdknox: I sent a nice note to the maintainer, didn't hear back. Maybe he's in the bahamas :) |
| 00:57 | technomancy | it's OSS =) |
| 00:57 | ibdknox | who wrote it again? |
| 00:57 | devn | technomancy: i wish i could be more helpful on this front. it seems like the hole just gets bigger every day though. |
| 00:57 | technomancy | ibdknox: jkkramer |
| 00:58 | emezeske | technomancy: There's already several versions floating around, I don't want to add another |
| 00:58 | emezeske | Also, I'm lazy |
| 00:58 | technomancy | devn: well I'll be sure to bug you when I get a fully-http clojars working |
| 00:58 | devn | im not trying to be a downer, but the crazy way we all share clojure code is not making it easy to say: "hey, beginner, wanna learn clojure?" |
| 00:59 | ibdknox | wait |
| 00:59 | technomancy | devn: oddly enough "difficulty finding dependencies" didn't rank very highly on the list of annoyances in http://lein-survey.herokuapp.com/results |
| 00:59 | ibdknox | what's wrong with the way we share clojure code? |
| 00:59 | ibdknox | github works nicely :) |
| 01:00 | devn | ibdknox: tell me, how many README.md have instructions for building and installing and using it in their project? |
| 01:00 | devn | where it is the library... |
| 01:01 | devn | ibdknox: it's layers of garbage people dont have to deal with in other environments |
| 01:01 | technomancy | how do you not have this issue in Java? |
| 01:01 | ibdknox | not sure I understand |
| 01:01 | devn | "What's a SNAPSHOT? Why can't I require the name of the dependency in my (ns) macro?" |
| 01:01 | ibdknox | that's true regardless of the mechanism we use. There will always be libraries that will be better documented |
| 01:01 | technomancy | there are plenty of java projects that don't even publish to a maven repo ffs |
| 01:01 | ibdknox | and made "easy" |
| 01:02 | devn | so wait, java *is* a requirement for clojure? |
| 01:02 | ibdknox | but that takes effort, and more people will have to invest in Clojure for more such libs to exist |
| 01:02 | clojurebot | Excuse me? |
| 01:02 | devn | for learning* clojure |
| 01:02 | technomancy | devn: no, just responding to "other languages don't have this problem" |
| 01:02 | technomancy | python has like three different mechanisms for fetching dependencies |
| 01:02 | ibdknox | other languages absolutely have the same problem |
| 01:02 | devn | oh, right on |
| 01:02 | devn | yeah, agreed |
| 01:02 | technomancy | ocaml has ... oh man, I don't even want to talk about it |
| 01:03 | ibdknox | haha |
| 01:03 | devn | yeah, they're all less than great |
| 01:03 | devn | but i think we can do a lot better |
| 01:03 | ibdknox | we do pretty well |
| 01:03 | technomancy | ruby has rvm, which redefines your shell's cd command |
| 01:03 | ibdknox | haha really? |
| 01:03 | devn | that's a trump card |
| 01:04 | devn | it's flashy, but i don't think it's related to our problem |
| 01:04 | dnolen | devn: lein is really good compared to what most other languages have. |
| 01:04 | dnolen | technomancy: argh |
| 01:04 | Scriptor | technomancy: where exactly does it look for jline? Does it look for a classpath variable? |
| 01:04 | technomancy | did you know you can't shell out to a rake task from one project using bundler to another project using bundler without hunting down a bunch of environment variables to unset first? |
| 01:05 | technomancy | Scriptor: jline comes included in the leiningen standalone jar |
| 01:05 | devn | dnolen: im just getting crazy about this because ive been scheduling time with people to work with them on clojure projects. i end up explaining more about requiring a lib than anything else |
| 01:05 | devn | i mean, i spend 4 hours talking to them about FP too |
| 01:06 | devn | but when we're just trying to hack on something and see something work, that becomes this whole discussion |
| 01:06 | Scriptor | any reason why it wouldn't find it? I used lein self-install and it fetched 1.7.0 |
| 01:06 | dnolen | devn: why does talking about adding a lib take more than a minute? |
| 01:07 | devn | dnolen: because we go out to clojars, find that someone released a version of the lib under org.foo.bar.efjdsaio/hello-world "0.2.6" |
| 01:07 | devn | and then i need to explain to them how we put that in the project.clj, and then how the thing we put in project.clj has nothing to do with how we actually require or use it |
| 01:07 | devn | it seems schizophrenic |
| 01:07 | technomancy | Scriptor: can't imagine why; what's the precise class? |
| 01:07 | Scriptor | jline/ConsoleRunner |
| 01:07 | technomancy | devn: "some people upload crazy shit. EOF." |
| 01:08 | devn | technomancy: yes, but apparently /everyone/ uploads crazy shit |
| 01:08 | technomancy | o_O |
| 01:08 | emezeske | O_o |
| 01:08 | technomancy | Scriptor: perhaps the jar it's trying to find doesn't exist at all? |
| 01:08 | devn | oo_oo |
| 01:10 | Scriptor | technomancy: the leiningen stand-alone jar exists, isn't that what jline should be bundled with? |
| 01:10 | michaelr525 | has anyone tried running clojurescript one on windows? after running 'lein repl' i get this error: |
| 01:10 | michaelr525 | FileNotFoundException Could not locate one/tools__init.class or one/tools.clj on |
| 01:10 | michaelr525 | classpath: clojure.lang.RT.load (RT.java:430) |
| 01:11 | technomancy | Scriptor: yes; I just checked and it's present here |
| 01:11 | dnolen | not a bad showing for Clojure, http://thecodegeneral.wordpress.com/2012/02/19/jvm-language-popularity/ |
| 01:11 | technomancy | Scriptor: sha1sum ~/.lein/self-installs/leiningen-1.7.0-standalone.jar # gives me 5ae81a504cb7f0d003bbbf27034913b54f6f272d |
| 01:12 | devn | dnolen: congrats on the ink, btw. |
| 01:12 | dnolen | devn: ink? |
| 01:12 | devn | newspaper |
| 01:13 | dnolen | devn: oh thanks! |
| 01:13 | devn | it was cool to read about. much respect. |
| 01:14 | devn | it reminds me a bit of trying to start a clojure group in madison, WI -- sometimes we have 15 people show up, others we have 3 |
| 01:15 | devn | but who cares? im going to do it whether im the only one there or not. |
| 01:19 | alexbaranosky | devn: that's the way I feel too about our local baznex group - as long as there's one other person there I'm happy |
| 01:19 | technomancy | alexbaranosky: I need to head off, but I'd like to get your help testing midje on leiningen 2 |
| 01:20 | alexbaranosky | technomancy, what do you need from me? I'm all for it |
| 01:21 | technomancy | alexbaranosky: there are a few breaking changes in lein2 and I want to go over the most common plugins to make sure they've been updated for compatibility |
| 01:21 | technomancy | I wrote a compatibility guide for 1.x and 2.x |
| 01:22 | technomancy | near the bottom of https://github.com/technomancy/leiningen/blob/master/doc/PLUGINS.md |
| 01:22 | technomancy | anyway, if you get a chance it would be great to hear how midje fares with that |
| 01:22 | technomancy | plus any other projects you feel like testing on lein2 |
| 01:22 | alexbaranosky | I'll take a give it a shot |
| 01:23 | devn | alexbaranosky: technomancy: I have 20% time tomorrow. if you guys want me to test projects for a few hours im in |
| 01:23 | technomancy | won't be around much tomorrow but should be able to help you after that if you run into anything |
| 01:23 | technomancy | devn: yeah if you've got projects you could try on lein2 that would be great |
| 01:24 | technomancy | once you have a checkout on the master branch, the "Building" section at the bottom of the readme should have everything you need to get going |
| 01:24 | technomancy | if you can't get help in #leiningen when I'm not around please ping the mailing list |
| 01:24 | devn | i have a project im working on to make the clojure cheat sheet more of a living document, so you can say: (cheat "foo") |
| 01:24 | devn | it sees java.lang.String and replies with the table of create/use/change/etc. |
| 01:24 | technomancy | ah, handy |
| 01:24 | technomancy | well, gotta head off; catch you folks later |
| 01:25 | devn | ciao technomancy |
| 01:25 | devn | alexbaranosky: i need to run as well, getting late here, but ill be on IRC tomorrow all day. let's try and coordinate and we can test projects against lein2 |
| 01:26 | devn | 'night all |
| 01:26 | alexbaranosky | devn: sure thing. |
| 01:40 | Scriptor | technomancy: not sure if you're still here, but sha1sums were the same |
| 01:55 | Raynes | Scriptor: He's off for the night. |
| 01:55 | Raynes | He doesn't have time for mere peasants like you and I. |
| 01:55 | tjgillies | does clojure have a built in timer function like javascript's setTimeout? |
| 01:57 | Raynes | tjgillies: Doesn't setTimeout just wait n milliseconds and then execute something? |
| 01:57 | Raynes | If that's the case, you can just use Thread/sleep |
| 01:58 | emezeske | tjgillies: Maybe something like (future (do (Thread/sleep 500) (my-thing))) |
| 01:58 | tjgillies | Raynes: emezeske: thnx |
| 01:58 | Raynes | Man, futures are the devil for spinning up threads. |
| 01:59 | emezeske | Raynes: They're bad? |
| 02:00 | Raynes | Well, if you plan to deref them, no. I've ran into issues where I used a future to spin off a thread that did nothing but side effects (and thus was never deref'd). Errors that occur in a future don't bubble up until you've deref'd them. |
| 02:01 | Raynes | So if you never deref them, any errors that occur that could otherwise break your program are impossible to find unless you happen to check the value of the future. |
| 02:01 | emezeske | Raynes: Ah, yeah, that is a problem -- probably not a bad idea to wrap the body of the future in a try/catch and print errors or something |
| 02:04 | tjgillies | all my future is gonna do is tell an atom to update peridoically |
| 02:05 | tjgillies | i have a hashmap and i want one of the keys to go to zero every x seconds |
| 02:08 | Raynes | $seen amalloy |
| 02:08 | lazybot | amalloy was last seen talking on #clojure 1 hour and 24 minutes ago. |
| 02:08 | Raynes | Huh. I didn't know he had been here. |
| 02:08 | amalloy | stalkerbot |
| 02:08 | Raynes | I also didn't know that plugin still worked. |
| 02:08 | Raynes | I guess it's max that doesn't work. |
| 02:08 | Raynes | $max |
| 02:08 | Raynes | $max #clojure |
| 02:08 | clojurebot | Huh? |
| 02:08 | Raynes | Yeah, it's still broken. |
| 02:09 | ibdknox | looks like xhr is broken in firefox for CLJS :/ |
| 02:09 | amalloy | fwiw, the body of a future is wrapped in an implicit 'do |
| 02:10 | emezeske | amalloy: nice, thanks |
| 03:02 | mvid_ | any idea why this is happening? |
| 03:02 | mvid_ | http://dpaste.com/705556/ |
| 03:02 | mvid_ | those are all of the files that exist in the project |
| 03:02 | mvid_ | i can't tell which lib is tripping it up |
| 03:04 | mvid_ | nvm |
| 03:04 | Raynes | mvid_: Don't quote the vector after :require |
| 03:04 | mvid_ | yea, just noticed that |
| 03:05 | mvid_ | that line must have been from a repl |
| 03:59 | Blkt | good morning everyone |
| 07:09 | claj | I'm having problems with åäö in aquamacs && swank-clojure 1.4.0 |
| 07:10 | claj | using slime-20100404, through elpa. is that to antique? |
| 07:22 | claj | getting this error: byte-code("\302\300\"\210\303 \304\"\210\300\305\"\207" [error process debug slime-net-close t "net-read error: %S"] 3) |
| 07:23 | claj | very strange, since I've got it working on other mac os x:es just fine |
| 07:23 | tomoj | do you have slime-net-coding-system set? |
| 07:24 | tomoj | I'm using the same version of slime (though not mac) |
| 07:24 | claj | hmm, says iso-latin-1. not the same... |
| 07:24 | claj | thx |
| 07:25 | tomoj | I setq that to 'utf-8-unix |
| 07:25 | claj | works. thanks a lot. |
| 07:26 | claj | miss-spelled this in a conf file. |
| 08:33 | osa1_ | `lein deps` started to give this error after adding data.xml to dependencies: http://paste.pocoo.org/show/553929/ can anyone help? |
| 08:37 | Bronsa | this is because there's no public release of data.xml yet |
| 08:40 | osa1_ | Bronsa: is it because it's not stable enough? I was planning to use it in a project |
| 08:44 | Bronsa | honestly, i have no idea. |
| 08:44 | jkkramer | osa1_: I cloned the github repo and installed locally (mvn install). it's stable enough for my purposes. the latest version is much better about not using more memory than needed to parse large xml files lazily |
| 09:21 | osa1_ | how can I use a record from other namespaces? I tried ns/Record. but didn't work. seems like (use ..) doesn't import records to my namespace |
| 09:24 | algernon | amro: (import namespace.Record) |
| 09:25 | osa1_ | strange, I'm getting ClassNotFoundException this time |
| 09:25 | osa1_ | oh ok, found it. thanks |
| 09:26 | algernon | osa1_: \o/ |
| 09:36 | Bronsa | osa1_: if you're using clojure >= 1.3.0 you can use ns/->Record |
| 09:41 | osa1_ | Bronsa: is it a special syntax? how do you use it? |
| 09:41 | Bronsa | it's a factory function created when you create a record |
| 09:42 | Bronsa | so instead of importing the record and doing (MyRecord. fields) you can simply use/require the namespace and do (ns/->MyRecord fields) |
| 09:44 | osa1_ | wow, that's nice. thanks. |
| 09:47 | osa1_ | how can I restart SLIME REPL(or swank session, or whatever I need to restart to reset all definitions I made) |
| 09:47 | osa1_ | I was using ,restart in common lisp SLIME but it didn't work for Clojure |
| 09:48 | osa1_ | whatever, I just run `slime-disconnect` and the M-x clojure-jack-in again |
| 09:52 | jcromartie | Clojure may as well have a splash screen while it's starting up :) |
| 09:52 | osa1_ | is there a way to use same generic method for multiple dispatch values? |
| 09:53 | osa1_ | or do I have to create a function and call it from different multimethods? |
| 09:59 | osa1 | damn I've disconnected just after asked a question, did anybody answer my question? |
| 09:59 | osa1 | <osa1_> is there a way to use same generic method for multiple dispatch values? |
| 10:01 | jcromartie | so could Clojure's small startup time be related to loading nearly 3K classes right away? |
| 10:01 | jcromartie | err |
| 10:01 | jcromartie | big startup time |
| 10:01 | jcromartie | not small at all |
| 10:04 | jcromartie | ~2300 classes |
| 10:04 | clojurebot | Excuse me? |
| 10:04 | jcromartie | clojurebot: I wasn't talking to you, silly bot |
| 10:04 | clojurebot | Cool story bro. |
| 10:05 | pipeline | heh |
| 10:05 | pipeline | I actually could answer his question |
| 10:05 | pipeline | whoops |
| 10:10 | Bronsa | osa1_: you could probably use derive to get that |
| 10:11 | Bronsa | 16:10:25 Bronsa: osa1_: you could probably use derive to get that |
| 10:37 | osa1_ | anyone here know a library to generate graphiz files? like s-dot for common lisp |
| 10:41 | Bronsa | osa1_: https://github.com/daveray/dorothy |
| 10:46 | osa1_ | Bronsa: I found this API https://github.com/pallix/lacij easier but I couldn't (use ) or (require ) it even though I added it to project.clj and run lein deps |
| 10:48 | Bronsa | osa1_: what are you useing? |
| 10:49 | osa1_ | Bronsa: (use lacij) |
| 10:49 | Bronsa | indeed |
| 10:49 | Bronsa | osa1_: https://github.com/pallix/lacij/tree/master/src/lacij |
| 10:49 | Bronsa | you see how the namespaces are split |
| 10:49 | raek | osa1_: I tried "loom" a time ago. it did what I needed. (https://github.com/jkk/loom) |
| 10:50 | Bronsa | you have to (use 'lacij.geom.core) etc according to your neds |
| 10:50 | Bronsa | *needs |
| 10:50 | osa1_ | Bronsa: yeah, thanks |
| 10:51 | osa1_ | raek: thanks. I think I liked lijic's API and I will go with it, I've added this as an alternative though |
| 10:52 | raek | someone should open an issue for lacij regarding that what namespace you are supposed to use is not mentioned in the readme |
| 10:52 | raek | why is this so common? |
| 10:52 | Bronsa | because reading clojure is so easy, it's easier than understanding a doc |
| 10:53 | osa1_ | raek: yeah I would do that when I arrive home(which takes about 2 hours) |
| 10:53 | osa1_ | Bronsa: this way you make your users read the code instead of docs |
| 10:53 | Bronsa | osa1_: i was using sarcasm |
| 10:53 | Bronsa | not easy to understand sarcasm on the internet i guess |
| 10:55 | osa1_ | now I have to find which namespace contains create-graph function ... |
| 10:58 | Bronsa | osa1_: lacij.graph.svg.graph |
| 10:58 | Bronsa | woah. |
| 10:58 | Bronsa | osa1_: lacij.graph.svg.graph |
| 11:18 | lypanov | (re-pattern "blah") == #"blah" ? |
| 11:18 | lypanov | repl says so but just to verify. the docs are a bit mystifying. |
| 11:21 | dnolen | ,(doc re-pattern) |
| 11:21 | clojurebot | "([s]); Returns an instance of java.util.regex.Pattern, for use, e.g. in re-matcher." |
| 11:23 | lypanov | dnolen: just taking time to get used to the host symbiosis. |
| 11:24 | lypanov | just spotted "A regex pattern is read and compiled at read time. The resulting object is of type java.util.regex.Pattern." which makes the above re-pattern doc which i read earlier make sense :) |
| 11:28 | ivan | what's different in the second case? http://paste.lisp.org/display/127877 |
| 11:30 | ivan | oh right, (println (pr-str names)) |
| 11:31 | gfredericks | ivan: (println (pr-str names)) should be equiv to (prn names) |
| 11:31 | raek | and more efficient |
| 11:31 | ivan | thanks |
| 11:32 | gfredericks | raek: cuz it doesn't build a string up on the heap? |
| 11:32 | raek | gfredericks: yep |
| 11:33 | raek | (println (pr-str ...)) will create a string writer, print the data to it, create a string from it, and then print that string |
| 11:59 | chawks | Hey. Anyone know why something like (seq? [1 2 3]) returns false? |
| 12:02 | mdeboard | ,(seq? []) |
| 12:02 | clojurebot | false |
| 12:02 | mdeboard | vectors aren't sequences |
| 12:03 | chawks | they're not? I was under the impression list, vectors are seqs |
| 12:03 | chawks | ,(seq? '()) |
| 12:03 | clojurebot | true |
| 12:03 | chawks | so what is a sequence except for lists? |
| 12:04 | mdeboard | ,(seq? (cycle (range 5))) |
| 12:04 | clojurebot | true |
| 12:04 | mdeboard | ,(seq? (iterate inc 0)) |
| 12:04 | clojurebot | true |
| 12:04 | mdeboard | iterators and lists |
| 12:05 | mdeboard | ,(filter (partial seq?) [[] '() {} #{}]) |
| 12:05 | clojurebot | #<ArityException clojure.lang.ArityException: Wrong number of args (1) passed to: core$partial> |
| 12:05 | mdeboard | ,(filter #(seq? %) [[] '() {} #{}]) |
| 12:05 | clojurebot | (()) |
| 12:06 | devn | anyone know their way around enlive? |
| 12:06 | chawks | I see... so... is there another way to check if something is either a vector or a list? |
| 12:06 | gfredericks | chawks: vector? and list? should work |
| 12:06 | chawks | except explicitly calling vector?/list? |
| 12:06 | chawks | okay... I guess that actually covers it, so should be good |
| 12:06 | gfredericks | what would motivate you to not use those functions? |
| 12:07 | mdeboard | chawks: Er, why not-- |
| 12:07 | chawks | gfredericks: Nothing, you're right. It's fine that way |
| 12:07 | Bronsa | chawks: you can (some-fn vector? list?) |
| 12:07 | TimMc | chawks: Depends. list? is pretty bad |
| 12:08 | chawks | TimMc: How come? |
| 12:08 | TimMc | What you probably want is sequential? |
| 12:09 | TimMc | chawks: lists and seqs get conflated in a lot of the Clojure core codebase. |
| 12:10 | chawks | TimMc: Thanks:) |
| 12:10 | TimMc | &(map sequential? [[5] '(6) (range) #{:set} {:m :ap}]) |
| 12:10 | lazybot | ⇒ (true true true false false) |
| 12:10 | TimMc | http://www.brainonfire.net/files/seqs-and-colls/main.html |
| 12:17 | jaley | Is there a way to control the path the 'lein deps' will try to deploy to? I need to make the artifact name match some arbitray rules for a company repo :/ |
| 12:18 | jaley | sorry, I meant 'lein deploy' |
| 12:32 | TimMc | artifact name is controlled by the first line in project.clj, no? |
| 12:33 | TimMc | Oh, not artifact ID, sorry. |
| 12:45 | leafw | what is the fastest outputstream class or nested stream classes to write a ~100kb file with java? |
| 12:45 | jaley | TimMc: well.. the problem is that the repo host has the pattern matching thing set up, where it expects a build number in the jar's file name |
| 13:14 | poincare101 | Hi everyone. I'm having a bit of trouble with learning clojure: http://pastie.org/3421981 <- Why is that functioning returning nil? According to the guide I'm following (http://pragprog.com/magazines/2011-07/growing-a-dsl-with-clojure), it should be returning a proper value. |
| 13:17 | ibdknox | that can be done in a much nicer way |
| 13:18 | poincare101 | I know, but, why isn't that particular approach working? |
| 13:18 | ibdknox | poincare101: because of this bug http://groups.google.com/group/clojure-dev/browse_thread/thread/1e80f6eee88527 |
| 13:19 | poincare101 | was the bug introduced recently? |
| 13:19 | ibdknox | in that particular case, it makes more sense just to call (str a) |
| 13:19 | ibdknox | no |
| 13:20 | poincare101 | oh. well, the guide I'm following isn't that old. |
| 13:20 | poincare101 | are there any other places I can learn to write DSLs in Clojure from? |
| 13:21 | ibdknox | that's actually a good article, perhaps at some point that actually did work |
| 13:21 | ibdknox | and once you get to the multi-method version of things, everything will be fine |
| 13:21 | ibdknox | alternatively, you can look at how I wrote Korma |
| 13:22 | ibdknox | but you'd be digging through source for that |
| 13:23 | poincare101 | That's fine, I'll read through Korma. |
| 13:23 | poincare101 | Wow, you're the guy that wrote Korma. You're like a celebrity. |
| 13:24 | ibdknox | lol |
| 13:24 | poincare101 | any docs on "multimethod version of things"? |
| 13:24 | ibdknox | further down in that article he replaced the case statement |
| 13:24 | ibdknox | with multi-methods, which is a much cleaner solution |
| 13:24 | poincare101 | I'll look at that. |
| 13:27 | poincare101 | ibdknox: oh I get it, multimethods are a bit like guards in Haskell |
| 13:28 | pandeiro | ibdknox: i saw your response about noir memory usage... when you say the jvm will consume what you give it, does that mean one should be setting that when deploying a noir app? |
| 13:28 | ibdknox | pandeiro: probably |
| 13:28 | ibdknox | I've not had any issues with my sites |
| 13:28 | pandeiro | ibdknox: as a jvm newb how do i know how much to give it? |
| 13:29 | ibdknox | well, I would give it as much as you're willing to part with :) |
| 13:29 | ibdknox | it will actually decrease over time |
| 13:29 | ibdknox | and run at something reasonable |
| 13:29 | TimMc | Hmm, does 'case require *compile*-time literals, or *read*-time literals? |
| 13:29 | poincare101 | + |
| 13:30 | ibdknox | pandeiro: at RFZ we run on a really beefy machine, so we give it tons of memory. In general though setting Xmx to around 400 seems to do fine |
| 13:30 | ibdknox | you can definitely go lower |
| 13:30 | ibdknox | but I've always had enough available just to leave it around there |
| 13:31 | juhu_chapa | Hi everybody! |
| 13:31 | pandeiro | ibdknox: thanks, i'll take that as a rough guideline |
| 13:31 | juhu_chapa | How is the recommended way to write a byte into a socket output stream? |
| 13:31 | ibdknox | pandeiro: fwiw, that's the default on heroku |
| 13:31 | pandeiro | ibdknox: i didn't know you could tweak the jvm on heroku |
| 13:32 | ibdknox | you're given a process that you can mostly do whatever you want with through buildpacks |
| 13:32 | ibdknox | but there's a set of config options where you can set the JVM_OPTS |
| 13:33 | pandeiro | ibdknox: getting OT but if you were building a prototype would you choose heroku over a vps? |
| 13:33 | ibdknox | yes |
| 13:33 | ibdknox | the latest few things I've built, I did on top of heroku |
| 13:33 | pandeiro | are you paying for heroku or using a free tier service? |
| 13:33 | ibdknox | free |
| 13:34 | pandeiro | is that a consideration? |
| 13:34 | pandeiro | just b/c i already have a vps locked down for the year |
| 13:34 | ibdknox | I have several and still used it :) |
| 13:35 | ibdknox | I don't like to think about ops stuff, it's distracting |
| 13:35 | ibdknox | but it's definitely a trade |
| 13:35 | ibdknox | Heroku is quite a bit more expensive than running your own EC2 |
| 13:35 | pandeiro | ibdknox: i'm still so new to linux i enjoy being the boss of everything :) |
| 13:35 | ibdknox | if you're not using the free tier |
| 13:35 | pandeiro | and EC2 is more expensive than eg linode, yeah? |
| 13:35 | lynaghk`` | pandeiro: you'll get over that =) |
| 13:35 | ibdknox | not that I'm aware |
| 13:36 | ibdknox | last comparison I did, EC2 was far cheaper than everyone else |
| 13:36 | ibdknox | though I was only looking at the low end |
| 13:36 | lynaghk`` | pandeiro: in general yeah. If you know you're going to want a server 24/7 I think getting a Linode is much cheaper for the computational resources you get. |
| 13:36 | ibdknox | definitely true |
| 13:37 | pandeiro | lynaghk``: that was the impression i got but yeah i know squat about how EC2 charges |
| 13:37 | ibdknox | heroku = ease for money |
| 13:37 | pandeiro | ibdknox: yeah and learning the API |
| 13:37 | lynaghk`` | pandeiro: by the hour. |
| 13:38 | ibdknox | using it is pretty trivial, I don't think that's a barrier to entry :) Learning how to set up nginx is several orders of magnitude the greater investment |
| 13:38 | lynaghk`` | The real advantage of EC2 is being able to spin up tons of new instances when you need 'em |
| 13:38 | chewbranca | ec2 is actually pretty expensive, you can get more performant dedicated hardware for cheaper |
| 13:38 | pandeiro | lynaghk``: right, that's how i saw it |
| 13:38 | ibdknox | I guess I should've qualified that with instantly scalable |
| 13:39 | pandeiro | and since nothing i make is used by *anyone* at this point... |
| 13:39 | ibdknox | static resources don't really work for me :) |
| 13:39 | pandeiro | ibdknox: heroku is also 'just add money' to scale kinda thing? |
| 13:39 | chewbranca | but you get more along the lines of stand alone machines that an elastic cloud, so you defintiely pay overhead to be able to easily treat ec2 as an actual cloud, just like with heroku you pay more to treat hosting a black box you magically adjust some sliders for |
| 13:39 | ibdknox | pandeiro: yep :) |
| 13:39 | ibdknox | pandeiro: there's no downside to using the free heroku stuff |
| 13:40 | chewbranca | I'm a big fan of heroku though, I think there make a dyno out of your app approach is awesome, and I think they have the right idea with the addon api system |
| 13:40 | pandeiro | ibdknox: only that my brain is saturated learning tex, clojure, lua, bash, etc and it's one more API |
| 13:40 | pandeiro | same to be said for GAE |
| 13:40 | lynaghk`` | ibdknox: well, except you get addicted to their excellent services |
| 13:40 | pandeiro | i think heroku is more interesting than gae but it's a similar decision to make |
| 13:40 | ibdknox | pandeiro: gae is much more difficult |
| 13:41 | ibdknox | their sandbox is really annoying |
| 13:41 | ibdknox | lynaghk``: indeed :) |
| 13:41 | pandeiro | lynaghk``: how did you start to learn d3? |
| 13:41 | ibdknox | pandeiro: build a graph! ;) |
| 13:42 | pandeiro | i took a stab at it for the first time the other day |
| 13:42 | lynaghk`` | pandeiro: the tutorials are pretty good. |
| 13:42 | pandeiro | i was like 'this is SO easy!' |
| 13:42 | pandeiro | 3 hours later i gave up |
| 13:42 | lynaghk`` | ahh |
| 13:42 | lynaghk`` | what part did you have trouble with? |
| 13:42 | pandeiro | i wanted to create a simple visualization over a time period |
| 13:42 | pandeiro | i realize time is a tricky mfer |
| 13:42 | lynaghk`` | heh |
| 13:42 | pandeiro | but say i had data for things that happened over the past week |
| 13:43 | lynaghk`` | yeah, the real value in D3 is all of the helpers. There is a pretty solid time scaling library in there now |
| 13:43 | pandeiro | i wanted a graph showing how many times each thing happened each day |
| 13:43 | pandeiro | w/out going through the source i realized maybe d3 doesn't help so much with that kind of thing? |
| 13:44 | pandeiro | (think something like the github repo activity visualization) |
| 13:44 | lynaghk`` | nah, it's a very low level library. You need to handle aggregation yourself |
| 13:44 | lynaghk`` | I mean, there are some helpers like histograms, &c. |
| 13:44 | lynaghk`` | but I would process the data in whatever language you're most familiar with, then use D3 for the actual plotting |
| 13:45 | lynaghk`` | so once you have a dataset like [{:day "Mon" :count 17}, {:day "Tue" :count 122} ...], write that out to JSON and use D3 to visualize |
| 13:45 | pandeiro | using svg probably as the vehicle? |
| 13:45 | lynaghk`` | depends, SVG or HTML would work for a bar chart. |
| 13:46 | pandeiro | i actually had a rough time with HTML - there's a way to bottom-align a div i must be forgetting i guess |
| 13:46 | pandeiro | otherwise you're stuck with inverted bar graphs :) |
| 13:46 | lynaghk`` | though, totally self-serving annoucement here, I'll be open sourcing a D3-like library in ClojureScript at Clojure/West in a month. So if you want to hold tight for a few weeks... |
| 13:47 | pandeiro | lynaghk``: well i am wanting to look through your cljs-d3 as well... |
| 13:47 | lynaghk`` | ah, yeah. In SVG you could make a <g transform="scale(0,-1)"> to hold your bars |
| 13:47 | pandeiro | but at this rate i think your announcement will probably beat me to it |
| 13:47 | lynaghk`` | pandeiro: don't it's getting totally depreciated. = ) |
| 13:47 | pandeiro | are you ditching d3 altogether? |
| 13:47 | lynaghk`` | or in HTML you could just use absolute positioning with CSS like "bottom: 0" |
| 13:48 | lynaghk`` | yeah pretty much. I mean, taking the core idea of mapping data to a DOM tree, but there is no shared code as of right now |
| 13:48 | pandeiro | ah yeah sure, position: absolute... reminds me of that quote about programmers having a problem and wanting to use regex, now they have 2 problems |
| 13:48 | dnolen | lynaghk``: looking forward to it! |
| 13:48 | ibdknox | lynaghk``: I'm excited to see what you came up with |
| 13:49 | lynaghk`` | dnolen, ibdknox: I just cut a draft talk for clj/west, so if you're okay with spoiling the surprise I can send you two copies (I'd love to hear your feedback) |
| 13:49 | ibdknox | dnolen: later today I'm going to put up a screencast of me building an ipad overtone controller in CLJS :) |
| 13:49 | ibdknox | lynaghk``: I'd be happy to |
| 13:49 | dnolen | lynaghk``: yes! |
| 13:49 | dnolen | ibdknox: haha, awesome :) |
| 13:49 | pandeiro | ibdknox: that sounds awesome |
| 13:49 | lynaghk`` | Chris, are we going to have to have CLJS iPad fights-to-the-death? |
| 13:49 | lynaghk`` | because that's what we've been working on too =P |
| 13:50 | ibdknox | haha |
| 13:50 | pandeiro | overtone the clojure lib? |
| 13:50 | ibdknox | pandeiro: yeah |
| 13:50 | pandeiro | it runs on a server somewhere? surely not on the ipad? |
| 13:50 | ibdknox | lynaghk``: I mean, I'm ready for it :p |
| 13:50 | ibdknox | correct |
| 13:50 | pandeiro | sweet |
| 13:50 | ibdknox | it uses noir + jayq/fetch |
| 13:50 | ibdknox | and builds a little interface to control a piano and a dubstep thing |
| 13:50 | ibdknox | much like the monome that Sam used at the conj |
| 13:51 | pandeiro | ibdknox: will you build my prototype? |
| 13:52 | pandeiro | ibdknox: do you write code while you sleep? |
| 13:52 | ibdknox | pandeiro: not currently taking on anything new :) Things are changing quite a bit for me in the next month |
| 13:52 | ibdknox | haha |
| 13:52 | ibdknox | my girlfriend makes fun of me, because I kind of do |
| 13:52 | ibdknox | I often wake up with solutions |
| 13:52 | pandeiro | you must be doing that thing rich talked about, figuring out some of the background stuff |
| 13:52 | lynaghk`` | ibdknox: that's why I take siestas every day after lunch |
| 13:53 | pandeiro | ibdknox: how long have you been programming? |
| 13:53 | ibdknox | 15 years |
| 13:53 | ibdknox | since I was 10 :) |
| 13:53 | ibdknox | lynaghk``: yeah, it's something I've done for a long time. I believe it's a skill, more so than most people think |
| 13:53 | pandeiro | and when did you become a superhuman? |
| 13:54 | `fogus | when he entered our solar system |
| 13:54 | ibdknox | haha well still human, but I think taking a couple years to teach myself how to learn probably helped :) |
| 13:54 | TimMc | ibdknox: 25, and you've already lead projects at Microsoft? o.O |
| 13:55 | ibdknox | TimMc: C# and VB no less ;) I was actually as surprised as you are |
| 13:55 | TimMc | :-D |
| 13:55 | ibdknox | that transition was a very interesting month |
| 13:56 | pandeiro | gates has a quote about knowing if someone has what it takes to be a good programmer after 4 years... i'm approaching that soon... |
| 13:56 | TimMc | VB to C#? |
| 13:56 | pandeiro | maybe i will have to go ask him |
| 13:56 | ibdknox | TimMc: I was supposed to go off and work on some future thinking stuff after working on the editor |
| 13:56 | ibdknox | TimMc: but the guy who was supposed to take over C# left and then the guy who was supposed to take on VB just stopped showing up to work |
| 13:56 | ibdknox | lol |
| 13:57 | pandeiro | ibdknox: so instead you turned on, tuned in, and dropped out? |
| 13:57 | TimMc | ibdknox: "left", "stopped showing up to work" |
| 13:57 | TimMc | Mob connections much? :-P |
| 13:57 | ibdknox | TimMc: one transfered to bing |
| 13:57 | ibdknox | the other guy was just a flake, not sure how he got hired |
| 13:58 | ibdknox | my boss was like.. well these teams have never been merged before... I'm sure Chris can do it! |
| 13:58 | ibdknox | lol |
| 13:59 | ibdknox | still ended up working on far future stuff, which I don't think made it anywhere after I left :( But ended up unifying and running those two for a while |
| 14:01 | ibdknox | I'd love to work on dev tools again :) |
| 14:01 | TimMc | It's satisfying stuff. |
| 14:02 | ibdknox | with lots of room for improvement |
| 14:17 | pandeiro | ibdknox: you could always build us that awesome web-based clojurescript IDE with heroku integration built in :) |
| 14:18 | ibdknox | haha |
| 14:18 | ibdknox | maybe some day :) |
| 14:18 | pandeiro | i was actually toying with the basic compile-cljs-via-http-request idea and got hung up on how to do it |
| 14:18 | TimMc | Me too. |
| 14:19 | pandeiro | because the compilation takes a while |
| 14:19 | TimMc | See the moldering remains of trycljs on my github. |
| 14:19 | pandeiro | so maybe the right way to do it would be passing messages |
| 14:19 | pandeiro | TimMc: i would like to |
| 14:19 | pandeiro | link? |
| 14:19 | lnostdal | i still do not understand how to get DB transactions to work well with Clojure transactions.. no matter which way i "flip" things it'll end up wrong it seems |
| 14:19 | TimMc | pandeiro: https://github.com/baznex/trycljs |
| 14:19 | TimMc | I guess it's actually not under my account. |
| 14:20 | lnostdal | i can't put any dosync inside a DB transaction; not even at the very end because the DB transaction might still roll back without the Clojure one doing so |
| 14:21 | gfredericks | lnostdal: the DB transaction can roll back without you finding out? |
| 14:22 | lnostdal | i can "find it out", but i don't see how that can help me |
| 14:22 | pandeiro | TimMc: you remember where you were derailed with that? |
| 14:23 | gfredericks | lnostdal: you couldn't then about the clojure transaction? |
| 14:23 | gfredericks | s/about/abort |
| 14:23 | llasram | lnostdal: Why do you need to interweave them? I haven't thought about this too but what's the use case? |
| 14:23 | llasram | s,too,too deeply, |
| 14:23 | TimMc | pandeiro: Yes, I couldn't get namespace resolution working properly. Also, there's an annoying misfeature in GClosure that fucks with REPL usage model. |
| 14:24 | lnostdal | they have to overlap somehow |
| 14:25 | lnostdal | one of them have to "finish", then give room for the other to finish .. before the first one "really finishes" .. or something |
| 14:25 | pandeiro | TimMc: I imagined namespace functionality would be limited, like you would have to shoehorn all user cljs code into one ns... |
| 14:25 | gfredericks | if you commit the DB transaction at the end of the clojure transaction, what's going to go wrong? |
| 14:25 | llasram | lnostdal: Could you give a specific example? |
| 14:26 | TimMc | gfredericks: Network failure, commit conflict... |
| 14:26 | lnostdal | not really, llasram .. because all my examples are wrong |
| 14:26 | jsabeaudry | All of a sudden, firefox says my clojurescript function is undefined although I see it defined 5 lines earlier in Firebug. I'm really puzzled! |
| 14:26 | lnostdal | and i can't seem to find any right way of doing this |
| 14:26 | gfredericks | TimMc: but if something goes wrong with the DB transaction then at least clojure should throw an exception, no? |
| 14:26 | TimMc | lnostdal: A use-case example, not a solution. |
| 14:27 | gfredericks | TimMc: or do you mean DB succeeds but then clojure fails? |
| 14:27 | TimMc | gfredericks: That's the other option, yes. |
| 14:27 | gfredericks | oh, or commit conflict on clojure's side, I see |
| 14:27 | lnostdal | even trivial stuff .. start a db transaction, make a decision based on some SELECT .. then write to some Clojure refs based on the decision |
| 14:28 | gfredericks | lnostdal: I think they're asking why you need to coordinate these things? |
| 14:28 | llasram | gfredericks: +1 |
| 14:28 | llasram | I'm not saying you don't -- I just want to understand why you do |
| 14:28 | lnostdal | what else would i do? .. i can't do a "SELECT" vs. in-memory data |
| 14:30 | lnostdal | so i got to have both transactions working together |
| 14:30 | TimMc | lnostdal: Friggin' example, please. |
| 14:30 | gfredericks | lnostdal: like what sort of data do you have on DB vs in memory |
| 14:30 | llasram | TimMc: No need for such language! |
| 14:31 | TimMc | :-P |
| 14:32 | lnostdal | well, type of data? "items" .. *sigh* .. .does it matter? .. (with-db (with-query-results res ["SELECT ...;" ...] (if res-is-something (dosync this) (dosync that)) |
| 14:33 | lnostdal | ..with-db is just a the typical BEGIN + COMMIT type macro |
| 14:33 | gfredericks | so there are items in the db, and what're you tracking in memory? |
| 14:35 | lnostdal | ok, yeah, so i got to not have these things in memory at all? .. |
| 14:36 | llasram | I guess the fundamental idea is that you have multiple coordinating threads, which are moving things between the database and the STM-managed data-structures, and you want to keep the in-memory data structures and the database completely synchronized at all times? |
| 14:36 | lnostdal | yes, llasram |
| 14:36 | llasram | Ok, an easy one. That's impossible. |
| 14:36 | lnostdal | i don't want to ask the DB for trivial stuff over and over again... |
| 14:36 | lnostdal | ok, that sucks thes |
| 14:36 | llasram | Ok, that was a flip answer, and I may be wrong |
| 14:37 | TimMc | Is there a way to tell the STM manager, "this transaction has failed, please retry it"? |
| 14:37 | lnostdal | i guess it's a lack in the DB .. i can only see it working if i had some time semi-after the DB transaction |
| 14:37 | gfredericks | lnostdal: and I think he means impossible generally, not because of a clojure shortcoming |
| 14:37 | llasram | gfredericks: +1; that's my initial reaction as well |
| 14:37 | lnostdal | ok, this isn't good enough then .. i can't use postgresql for this |
| 14:37 | llasram | Oh, you're just interpreting me. Well, I definitely agree with you :-) |
| 14:37 | lnostdal | screw all this .. so fed up .. gah x) |
| 14:38 | TimMc | CAP theorem, am I right? |
| 14:38 | gfredericks | isn't there some fundamental theorem of faulty communication channels where you can never have identical shared knowledge? |
| 14:38 | gfredericks | TimMc: I don't think so |
| 14:39 | llasram | lnostdal: Don't give up! Can you back off describe at a higher level what you're trying to do, outside of the synchronizing memory vs DB problem? |
| 14:39 | TimMc | Two Generals' Dilemma, yes. |
| 14:39 | gfredericks | yeah there it is |
| 14:40 | dnolen | lnostdal: llasram: gfredericks: http://groups.google.com/group/clojure/browse_thread/thread/aa22a709501a64ac/b578f0915b55c4be?#b578f0915b55c4be |
| 14:40 | dnolen | it's an interesting idea, but no one's actually done the legwork yet. |
| 14:41 | lnostdal | yes, that's the other option; if i could control the clojure STM better it would also work out i think |
| 14:42 | lnostdal | i think i'll just "give up" and move everything down to the DB for now |
| 14:44 | llasram | dnolen: Interesting... That would be pretty cool, although I'm not entirely sure it applies to this case though. Extending the semantics of transactions doesn't seem quite the same as interweaving the transactions of two unrelated systems |
| 14:44 | lnostdal | or wait, what's this; http://www.postgresql.org/docs/9.1/static/sql-prepare-transaction.html |
| 14:44 | lnostdal | hum |
| 14:47 | gfredericks | cljs doesn't have a release yet does it? |
| 14:49 | _phil | hey, if anyone is interested, i just made a menubar time tracker for mac os as a weekend project in clojure |
| 14:49 | _phil | https://github.com/pkamenarsky/atea |
| 14:49 | _phil | it should work but i havent tested it extensively |
| 14:59 | llasram | lnostdal: Just out of curiosity, what are you doing that need this hard synchronization between DB and memory? |
| 15:00 | mklappstuhl | hey... I am thinking about packaging leiningen for Archlinux - the Debian dependency chain looks wierd and I can find no good description of what leiningen acutally needs. Is it enough (and not only a workaround) to copy the binary into $PATH? |
| 15:00 | TimMc | technomancy: Ping, mklappstuhl discussing packaging lein for Arch |
| 15:03 | mklappstuhl | TimMc, technomancy: I'll be away for half an hour, msg/mention me, I will respond then. |
| 15:06 | lnostdal | llasram, auction site |
| 15:23 | gfredericks | lein-cljsbuild doesn't have a repl :( |
| 15:26 | mrBliss | ibdknox: how can I test file uploads with send-request in noir? Passing a File doesn't seem to work. |
| 15:31 | pandeiro | gfredericks: what do you mean? |
| 15:32 | gfredericks | pandeiro: a rhino-based clojurescript repl |
| 15:33 | pandeiro | gfredericks: doesn't clojurescript come with a script to launch that? |
| 15:34 | gfredericks | yes; but part of the appeal of cljsbuild is to have the project be self contained and not need clojurescript "installed" somewhere |
| 15:36 | pandeiro | gfredericks: not to mention i can't even get the script/repljs to work anymore with the up-to-date cljs repo |
| 15:36 | pandeiro | it used to work |
| 15:37 | pandeiro | anyway yeah cljsbuild uses a jar of a certain cljs commit? |
| 15:38 | gfredericks | I don't see that it's put it in my project anywhere |
| 15:38 | gfredericks | so I guess it's bundled up in the jar off in the ~/.m2 |
| 15:40 | brehaut | morning talios |
| 15:40 | lamed | java.lang.String cannot be cast to clojure.lang.IFn :P |
| 15:40 | dnolen | pandeiro: hmm, repljs is working fine on master for me. |
| 15:41 | talios | Mornin brehaut |
| 15:41 | brehaut | lamed: werent you pasting these errors into irc yesterday too? |
| 15:41 | dnolen | the ClojureScript One folks were having some trouble as well but I checked and they have no problems with master either |
| 15:41 | lamed | brehaut: nope |
| 15:43 | antares_ | just a little announcement here: travis-ci.org Clojure builds now have a separate machine. So, keep those builds coming! |
| 15:44 | pandeiro | dnolen: probably my side, sorry... throws a java.lang.ClassNotFoundException: org.mozilla.javascript.Context though |
| 15:45 | dnolen | pandeiro: hmm that doesn't make sense, did you try a fresh checkout? |
| 15:45 | pandeiro | dnolen: just realized maybe i need to run the build script again? it is a fresh checkout |
| 15:45 | dnolen | pandeiro: not a bad idea |
| 15:45 | pandeiro | err, bootstrap, not build |
| 15:48 | lamed | (Integer/toString 10) ;; obviously |
| 15:50 | graphbum | is there any way to tell swing to resize a buffered image in response to a window size changing? |
| 15:51 | graphbum | I've seen some swing examples from the clojure community, but none of them deal with dynamically resizing the display |
| 15:56 | aphyr | I suspect my clojure application is slowly leaking memory. I've dumped the heap with jmap; jhat suggests my top memory allocations are (by an order of magnitude) clojure.lang.LazySeq and clojure.lang.Cons. |
| 15:56 | aphyr | Sort of lost as to where to go from here. Any advice? |
| 15:57 | brehaut | graphbum: based on a quick googling i think you need to use either a windowlistener or componentlistener and implement componentResized |
| 15:57 | brehaut | aphyr: holding onto the head of a seq while traversing / realizing it is a great way to leak memory. |
| 15:58 | aphyr | I've tried to avoid that, but this isn't exactly a trivial app: https://github.com/aphyr/reimann |
| 15:59 | aphyr | I dunno if it's somewhere inside my code, aleph, lamina, postal, protobuf... |
| 15:59 | graphbum | brehaut: thanks for the googling :/ I've spent about a week on this stupid 2d rendering project....I know more about Swing than I ever wanted to. I have some stuff hooked up via component listeners, which mutates the image buffer, but it's crap and doesn't "quite" accomplish what I'm looking for. |
| 16:00 | graphbum | brehaut: lau jensen and some other folks have good samples, but all of them seem to have statically sized views. |
| 16:00 | brehaut | graphbum: my j2d knowledge is weak and extremely out of date (i last used it in earnest in 2003 / 1.4, so grain of salt) but i recall that J2d is quite operation ordering sensitive |
| 16:00 | brehaut | graphbum: have you looked at any of the seesaw stuff? they might have some relevant examples? |
| 16:01 | brehaut | graphbum: github.com/daveray/seesaw |
| 16:01 | graphbum | brehaut: I did look at seesaw (excellent lib). |
| 16:01 | graphbum | brehaut: was going to use it, but I didn't need the extra size (i.e. the miglayout stuff). |
| 16:02 | graphbum | brehaut: ended up wrapping the nifty gui library in Joy of Clojure, with my own extensions... |
| 16:03 | dnolen | aphyr: you might want to take a look at JVisualVM or YourKit |
| 16:03 | graphbum | brehaut: other option is to just lock the window size for now and get on with my life. |
| 16:04 | ibdknox | gfredericks: emezeske was working on adding repl support the other day |
| 16:04 | devn | anyone know if i need to do anything fancy with clojail beyond use the secure tester? What if I use the secure tester and my policy gives all permissions? |
| 16:05 | emezeske | ibdknox: It's actually finished code-wise, although I still need to document/release |
| 16:05 | ibdknox | emezeske: sweet |
| 16:05 | emezeske | ibdknox: If you're curious, check out https://github.com/emezeske/lein-cljsbuild/blob/0.1.0/doc/REPL.md |
| 16:05 | emezeske | I'm also adding test support in the next release |
| 16:06 | gfredericks | emezeske: writing CLJS tests in CLJS? |
| 16:06 | emezeske | gfredericks: Yeah, and running them in PhantomJS |
| 16:06 | ibdknox | emezeske: I'm glad someone took this up in my stead :) |
| 16:06 | emezeske | ^_^ |
| 16:06 | gfredericks | emezeske: crossover tests for crossover code? |
| 16:06 | emezeske | gfredericks: I guess crossovers could be tested in either CLJ or CLJS |
| 16:07 | emezeske | gfredericks: I think you could write crossover tests too actually, which is.. interesting! |
| 16:07 | gfredericks | emezeske: yeah I would only feel half confident if I had only tested my crossover code on one host |
| 16:07 | emezeske | gfredericks: Although they'd be limited to the CLJ/CLJS feature intersection :) |
| 16:08 | gfredericks | and there isn't a clojure.test in cljs is there? |
| 16:08 | emezeske | gfredericks: I haven't dug into that too much yet; I'm just laying the foundation to run things |
| 16:08 | emezeske | gfredericks: Hoping other people will work on those tools :) |
| 16:09 | gfredericks | okeedoke, just curious what exactly "test support" meant |
| 16:09 | emezeske | gfredericks: Really it just means a way to launch tests, with lein hooks, and a decent example of how to make it work |
| 16:10 | emezeske | gfredericks: I'm pretty stoked to type "lein test" and see my CLJS get tested! |
| 16:10 | gfredericks | emezeske: I was heading toward putting together a similar library and one feature I had completed was generating a duplicate namespace for calling functions from vanilla JS; is that a feature you think would fit in cljsbuild, or is it a terrible idea? |
| 16:11 | gfredericks | (by "from vanilla JS" I primarily mean that it translated data structures) |
| 16:11 | emezeske | gfredericks: I might not understand what you mean; I've been doing that with (defn ^:export myfn [] ...) |
| 16:11 | emezeske | Ah, is this an OSS thing that I could look at? |
| 16:12 | gfredericks | oh I hope I didn't delete that project once I saw cljsbuild |
| 16:12 | emezeske | haha |
| 16:12 | gfredericks | I think I did but I have a copy on this computer over here in my bag I think, give me a second |
| 16:13 | gfredericks | emezeske: the idea was that for your (ns foo.bar) it would generate a (ns foo.bar-js) with function wrappers calling into the original |
| 16:14 | gfredericks | I had it running and could successfully call cljs code from coffeescript |
| 16:15 | emezeske | gfredericks: I see, so the wrappers automatically did a clojure->javascript translation for the return values and such? |
| 16:15 | gfredericks | yeah, and js->clojure for the args |
| 16:17 | emezeske | That's very interesting. I'm not sure lein-cljsbuild would be the place for that. But I'm also not sure if that could be implemented outside of the build system (?) |
| 16:18 | gfredericks | emezeske: the project is here, though I'm not sure if you'll learn anything further by looking at it: https://github.com/fredericksgary/lib-4642 |
| 16:19 | gfredericks | the translator functions are in resources/cljs.cljs |
| 16:19 | emezeske | gfredericks: Cool, thanks! |
| 16:20 | gfredericks | yep; let me know if you decide you like the idea, I'd be happy to work on it. I'll probably have to set up something equivalent for my current project regardless. |
| 16:20 | osa1 | is there a find or search function to use instead of (first (filter ...)) ? |
| 16:20 | gfredericks | osa1: I don't think so |
| 16:21 | gfredericks | osa1: lazybot has a good tool for questions like that |
| 16:21 | gfredericks | $findfn [3, 8, 5, -5, -3, 2] neg? -5 |
| 16:21 | lazybot | [] |
| 16:21 | brehaut | (def first-match (comp first filter)) ;) |
| 16:22 | gfredericks | amalloy: lazybot should return results from useful as well :) |
| 16:23 | amalloy | it'd be more interesting if he tried some combinations of comp/juxt/partial |
| 16:24 | brehaut | amalloy: or employed core.logic for friedman-byrd results |
| 16:25 | Raynes | alexbaranosky: namespaces-matching is there. |
| 16:25 | Raynes | alexbaranosky: Use the :prefix option to the… whatever function. |
| 16:26 | alexbaranosky | Raynes, thanks for clarifying that |
| 16:26 | Raynes | alexbaranosky: I just streamlined it all when I moved it out of Leiningen. It's one function that does everything based on the keyword options given. The README has examples. |
| 16:27 | alexbaranosky | yeah I see it now. |
| 16:28 | devn | howdy alexbaranosky |
| 16:28 | Raynes | devn: Did you get my messages in #flatland? |
| 16:28 | alexbaranosky | devn: what's up |
| 16:28 | alexbaranosky | devn, I'm looking at fixing up lein-midje at the moment |
| 16:29 | alexbaranosky | using bultitude for some ns utils the plugin depended on that have been moved |
| 16:38 | devn | alexbaranosky: ill be ready to look at that in a few -- im in the middle of trying resurrect my walton project from a couple of years ago |
| 16:39 | devn | currently running /a lot/ of code in clojail |
| 16:39 | TimMc | devn: For what purpose? |
| 16:40 | Raynes | TimMc: His walton project reads #clojure logs for the past 5 years and evaluates code to see what works and then forms them into structured examples of clojure libraries. |
| 16:41 | TimMc | Wild. |
| 16:41 | brehaut | devn: so you've got it going now? |
| 16:43 | alexbaranosky | devn: that's pretty interesting sounding! github link? |
| 16:44 | devn | the code that is out on github is disgusting (and old) |
| 16:44 | devn | https://github.com/devn/walton |
| 16:46 | devn | it's been dead in the water for awhile -- im not parsing text logs anymore, am going to use a real store of some kind, currently playing with redis, but that's really just because it was handy |
| 16:47 | Raynes | devn: Redis is probably pretty fast for this. |
| 16:47 | devn | yeah, i was laughing with the guys i work with: "[35484] 20 Feb 14:28:18 * 10000 changes in 60 seconds. Saving..." |
| 16:47 | devn | the only problem is doing fuzzy text search on it is kind of a PITA |
| 16:48 | devn | i'd like for people to be able to search for +, and not only see (+ 1 1), but also see something like (nested (form (that (uses (+ ...))))) |
| 16:48 | TimMc | and (map + (range 100)) ? |
| 16:48 | osa1 | &(map #([(keyword %) (keyword "blaah")]) '("ok" "bir")) |
| 16:48 | lazybot | clojure.lang.ArityException: Wrong number of args (0) passed to: PersistentVector |
| 16:49 | osa1 | what's wrong with this code? |
| 16:49 | devn | *nod*, lots of ways to search would be nice |
| 16:49 | devn | by class, type, symbols used, etc. |
| 16:49 | TimMc | osa1: The #() form has to be a function call. |
| 16:50 | TimMc | &([1 2 3]) <- osa1: the same thing is wrong here |
| 16:50 | lazybot | clojure.lang.ArityException: Wrong number of args (0) passed to: PersistentVector |
| 16:50 | devn | ultimately i'd like to wrap it into another project im working on that will let you use the clojure cheat sheet + findfn + clojuredocs API from the repl |
| 16:50 | osa1 | TimMc: weird. thanks. |
| 16:50 | TimMc | &(#()) |
| 16:50 | lazybot | ⇒ () |
| 16:50 | devn | btw, fun stuff: clojure.inspector just opened two windows |
| 16:51 | devn | :) |
| 16:51 | brehaut | ,(map #(-> [%]) [1 2 3]) |
| 16:51 | clojurebot | ([1] [2] [3]) |
| 16:51 | TimMc | brehaut: That's hot. |
| 16:51 | brehaut | TimMc: blatently stolen from Joy of Clojure |
| 16:52 | TimMc | &(map #(doto [%]) [1 2 3]) |
| 16:52 | lazybot | ⇒ ([1] [2] [3]) |
| 16:52 | amalloy | are we using -> instead of do just to be confusing? |
| 16:52 | TimMc | Oh yeah, do... |
| 16:52 | Scriptor | but that uses letters |
| 16:52 | TimMc | I've actually used that, too. >_< |
| 16:53 | brehaut | TimMc: footnote 14 page 102 |
| 16:53 | TimMc | Don't own it. :-( |
| 16:53 | amalloy | &(map (comp vec hash-set first list) [1 2 3]) |
| 16:53 | lazybot | ⇒ ([1] [2] [3]) |
| 16:53 | amalloy | super-efficient |
| 16:54 | TimMc | partial map ... |
| 16:54 | TimMc | because why not? |
| 16:55 | Scriptor | ,(for x in [1 2 3] [x]) |
| 16:55 | clojurebot | #<ExecutionException java.util.concurrent.ExecutionException: clojure.lang.ArityException: Wrong number of args (4) passed to: core$for> |
| 16:56 | TimMc | ... |
| 16:56 | Scriptor | ,(for [x in [1 2 3]] [x]) |
| 16:56 | clojurebot | #<ExecutionException java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: for requires an even number of forms in binding vector in sandbox:> |
| 16:56 | TimMc | s/ in// |
| 16:56 | Scriptor | ... |
| 16:56 | TimMc | This isn't JS. :-P |
| 16:57 | Scriptor | shut up, I just got done talking python :p |
| 16:57 | TimMc | aha |
| 16:59 | brehaut | huh. pods are kind of like a conjugation based on mutation |
| 17:01 | TimMc | brehaut: In a way that transients aren't? |
| 17:02 | brehaut | TimMc: not really. im just months behind everyone else, because ive had to wait for the video of rich's conj keynote |
| 17:02 | TimMc | Oh, it's up now? |
| 17:02 | brehaut | http://blip.tv/clojure/rich-hickey-keynote-5970064 |
| 17:03 | brehaut | which is to say, yes |
| 17:03 | franks | (doc clojure.core) |
| 17:03 | clojurebot | #<ExecutionException java.util.concurrent.ExecutionException: java.security.PrivilegedActionException: java.lang.ClassNotFoundException: clojure.core> |
| 17:04 | TimMc | &(-> 'clojure.core the-ns meta :doc) |
| 17:04 | lazybot | java.lang.SecurityException: You tripped the alarm! the-ns is bad! |
| 17:04 | TimMc | ,(-> 'clojure.core the-ns meta :doc) |
| 17:04 | clojurebot | "Fundamental library of the Clojure language" |
| 17:05 | devn | &(use 'clojure.repl) |
| 17:05 | lazybot | ⇒ nil |
| 17:05 | devn | &(doc +) |
| 17:05 | lazybot | ⇒ ------------------------- clojure.core/+ ([] [x] [x y] [x y & more]) Returns the sum of nums. (+) returns 0. Does not auto-promote longs, will throw on overflow. See also: +' nil |
| 17:06 | TimMc | Whoa, Rich apologized to cemerick in the keynote. Didn't know that. |
| 17:07 | franks | TimMc: right - I'm confused... I was looking at source code for clojure.repl/doc - I have the feeling that (cond...(resolve...(find-ns... should be reversed to (cond...(find-ns...(resolve... |
| 17:08 | TimMc | Well, now I'm distracted by a Conj video. :-P |
| 17:08 | franks | TimMc: if you do the find-ns first, then you can do a (doc clojure.core) |
| 17:20 | rbanffy | Hi folks. Returning to Clojure from the pre-1.3 era. Where did clojure.contrib.string/substring? went? |
| 17:20 | TimMc | rbanffy: Try clojure.string |
| 17:20 | TimMc | and in general... |
| 17:20 | TimMc | ~contrib |
| 17:20 | clojurebot | Monolithic clojure.contrib has been split up in favor of smaller, actually-maintained libs. Transition notes here: http://dev.clojure.org/display/design/Where+Did+Clojure.Contrib+Go |
| 17:21 | brehaut | that particular case is subs right? |
| 17:21 | rbanffy | TimMc, nope. No substring? there |
| 17:21 | brehaut | oh. no it isnt |
| 17:21 | amalloy | $javadoc String contains |
| 17:21 | lazybot | http://download.oracle.com/javase/6/docs/api/java/lang/String.html#contains(java.lang.CharSequence) |
| 17:25 | franks | How do I recompile clojure.repl/doc in a running image? Trying (binding [*ns* (find-ns 'clojure.repl)] (defmacro doc..., but that tells me "CompilerException java.lang.IllegalStateException: doc already refers to: #'clojure.repl/doc in namespace: user..." |
| 17:26 | amalloy | binding happens at runtime, and defmacro happens at compile-time |
| 17:27 | amalloy | well. sorta. it's a little more complicated than that, i guess. but the short answer is: (in-ns 'clojure.repl) (defmacro ...) |
| 17:28 | TimMc | amalloy: Presumably just the def happens at compile time? |
| 17:30 | TimMc | My understanding is: read, macro-expand, parse sexps into AST + hoist defs, emit/eval |
| 17:31 | TimMc | franks: in-ns, not ns |
| 17:31 | franks | TimMc: same error |
| 17:35 | franks | TimMc: used an old trick that you taught me to get around private functions ;-) - substituted namespace-doc by #'namespace-doc and it works |
| 17:40 | franks | Pls see "https://gist.github.com/1872000" - which would make (doc clojure.core) work - feels like a bug - pls someone confirm |
| 17:47 | uvtc | Hi #clojure. I just noticed that you can optionally pass `fn` a "name". As in: `(def a (fn foobar [x] (* x x)))`. How is this name used? What is the common use of it? |
| 17:47 | uvtc | In the above case, the symbol `a` refers to my fn. What use is the "foobar" name? |
| 17:48 | brehaut | uvtc: you can use it like any other local |
| 17:48 | brehaut | usually you wont be passing it to a def though |
| 17:48 | uvtc | brehaut, but `(foobar 3)` doesn't return 9... |
| 17:48 | uvtc | Clojure is unable to resolve the symbol "foobar". |
| 17:49 | brehaut | uvtc: its local to the fn, not global to the NS |
| 17:49 | brehaut | ,((fn fac [n] (if (= 1 n) 1 (* n (fac (dec n))))) 5) |
| 17:49 | clojurebot | 120 |
| 17:50 | TimMc | &((fn introspect [] (class introspect))) |
| 17:50 | lazybot | ⇒ sandbox6832$eval10921$introspect__10922 |
| 17:50 | brehaut | uvtc: sometimes you want to have a anonymous function that knows about itself, eg for recursion |
| 17:50 | TimMc | Also it makes for more readable stack traces. :-P |
| 17:50 | brehaut | TimMc: ah yes, good point! |
| 17:51 | uvtc | brehaut, thanks for that `fac` example ... When I saw it, I thought, "wouldn't I just use `recur` for that?" |
| 17:51 | brehaut | uvtc: you would! |
| 17:52 | brehaut | uvtc: but if it was an indirect recursion you wouldnt be able to |
| 17:52 | TimMc | There are definitely times when it is useful for a fn to pass itself to something else. |
| 17:52 | TimMc | Nothing off the top of my head, though. |
| 17:53 | uvtc | brehaut, in your `fac` example, using `recur` doesn't work, with Clojure telling me that I of course can only recur from the tail pos. |
| 17:54 | brehaut | uvtc: sure, but you'd rewrite it to use an accumulator |
| 17:54 | brehaut | actually thats a use right there |
| 17:55 | uvtc | Agh, ... kids, dinner,.. can't ... hold ... out ... much longer ....... thanks for the help! |
| 17:55 | brehaut | ,((fn fac ([n] (fac (dec n) n)) ([n acc] (if (<= n 1) acc (recur (dec n) (* n acc))))) 5) |
| 17:55 | clojurebot | 120 |
| 17:55 | brehaut | bah |
| 17:55 | brehaut | a minute to late |
| 17:56 | bweaver | fwiw, naming a `fn` is really useful in this case: (fn foo ([] (foo default-value)) ([val] (do-something val))) |
| 17:56 | TimMc | ooh, right |
| 18:03 | amalloy | brehaut: isn't that just an ugly way to write a loop/recur? |
| 18:04 | brehaut | amalloy: i guess thats true |
| 18:04 | TimMc | brehaut: Were you referring to the value->transient and transient->value stuff as conjugation, or something later? |
| 18:04 | brehaut | bweaver's example made more sense |
| 18:04 | Raynes | amalloy: List comprehensions are bad. :P |
| 18:05 | Raynes | Just throwing that out there. |
| 18:05 | brehaut | TimMc: thats stuff and the pod stuff that follows |
| 18:05 | TimMc | OK |
| 18:05 | amalloy | TimMc: correct, re: the def. but since the point of the binding was to change the def's namespace, the important part of defmacro happens at compile-time |
| 18:06 | TimMc | Agreed. |
| 18:06 | amalloy | Raynes: what? is that somehow related to anything, or are you just flamebaiting? |
| 18:07 | TimMc | Probably directed at Scriptor |
| 18:07 | Raynes | amalloy: It was a reference to our discussion with alexbaranosky at the conj. |
| 18:07 | Raynes | At least, I think it was alexbaranosky, right? |
| 18:07 | Raynes | Maybe it was lynaghk`` |
| 18:07 | Raynes | At the art place? You remember. |
| 18:07 | amalloy | him and rplevy. but alex was easily convinced that for might be nice, whereas rplevy was like "wut i hate for loops it's like java" |
| 18:07 | alexbaranosky | that was both myself and lynaghk`` |
| 18:08 | Raynes | I apologize. I'm not great with names and faces. |
| 18:08 | alexbaranosky | my argument was that there are times for both |
| 18:08 | Raynes | I know there was somebody there who was just totally "it sux" |
| 18:08 | Raynes | At least at first. |
| 18:08 | Scriptor | I think for is more readable for the example people were discussing earlier |
| 18:08 | qbg | I need a list of CSci books relating to Clojure without too much overlap. I already have "The Reasoned Schemer". Anything else? |
| 18:08 | Scriptor | turning a list into a list of lists |
| 18:08 | alexbaranosky | who knows, it might have been me; I was drinking |
| 18:09 | amalloy | Scriptor: oh, the #(do [%]) thing? yeah, i wouldn't recommend anyone actually do that |
| 18:09 | alexbaranosky | I like for especially for times when I want to utilize destructuring -- in other words, mapping over an anonymous fn that destructures is a code smell to me |
| 18:10 | amalloy | but i'd prefer (map vector [1 2 3]) to (for [x [1 2 3]] [x]), personally |
| 18:10 | alexbaranosky | amalloy, absolutely |
| 18:10 | amalloy | just because all the brackets mush together and i have to squint to see what's happening |
| 18:10 | Scriptor | true, using vector is way cleaner |
| 18:11 | amalloy | i think (hope) TimMc and brehaut were just fooling around looking for short/interesting ways to write it |
| 18:11 | brehaut | amalloy: yes |
| 18:13 | amalloy | i don't know of anyone who has ever written #(do ...) in real code and lived to tell the tale...because anyone who does that, i murder |
| 18:13 | qbg | So do #(list %) instead? |
| 18:15 | Scriptor | there's also #([[%]] 0) |
| 18:15 | amalloy | haha |
| 18:16 | TimMc | niiiice |
| 18:21 | PntBlnk | Hi all, I'm having some difficulty modifying a macro in the Korma library and wonder if someone could have a peek at https://gist.github.com/1872212 and tell me what I'm doing wrong. I can't seem to get evaluation to happen in the right order. |
| 18:23 | qbg | If only transpose was built in. (transpose [[1 2 3]]) |
| 18:25 | amalloy | &(let [transpose (partial apply map vector)] (transpose [[1 2 3]])) |
| 18:25 | lazybot | ⇒ ([1] [2] [3]) |
| 18:25 | amalloy | it's built in, it just has a slightly longer name :P |
| 18:26 | Scriptor | is there a function that returns vector or list depending on the collection type you passed it? |
| 18:26 | qbg | &(empty [1 2 3]) |
| 18:26 | lazybot | ⇒ [] |
| 18:26 | Scriptor | *type of the collection |
| 18:26 | qbg | &(empty '(1 2 3)) |
| 18:26 | lazybot | ⇒ () |
| 18:27 | qbg | Good enough? |
| 18:27 | Scriptor | as in the functions list or vector themselves |
| 18:27 | TimMc | Scriptor: associative? |
| 18:27 | TimMc | if you know it is either a list/seq or a vector |
| 18:27 | Scriptor | so you could do ((f [1 2 3]) 4) -> [4] |
| 18:28 | qbg | #(partial apply conj (empty %)) ? :p |
| 18:28 | qbg | &(let [foo #(partial apply conj (empty %))] ((foo [1 2 3]) 4)) |
| 18:28 | lazybot | java.lang.IllegalArgumentException: Don't know how to create ISeq from: java.lang.Long |
| 18:28 | amalloy | i think you just want conj, not apply conj |
| 18:28 | qbg | &(let [foo #(partial conj (empty %))] ((foo [1 2 3]) 4)) |
| 18:28 | lazybot | ⇒ [4] |
| 18:29 | qbg | Yep. For bonus points make it varargs |
| 18:29 | amalloy | it already is |
| 18:29 | qbg | &(let [foo #(partial conj (empty %))] ((foo [1 2 3]) 4 5 6)) |
| 18:29 | lazybot | ⇒ [4 5 6] |
| 18:29 | qbg | You are correct! |
| 18:30 | qbg | Never did use partial much... |
| 18:30 | qbg | &(let [foo #(partial conj (empty %))] ((foo '(1 2 3)) 4 5 6)) |
| 18:30 | lazybot | ⇒ (6 5 4) |
| 18:30 | amalloy | partial is not as cool as juxt, but it's pretty handy |
| 18:31 | amalloy | oh hah. right |
| 18:31 | qbg | New bonus points: make it return it in the right order |
| 18:32 | TimMc | Of course, none of this is what Scriptor actually asked for. |
| 18:32 | amalloy | (comp {() list [] vector} empty) |
| 18:32 | amalloy | TimMc: i think it actually is? |
| 18:32 | Scriptor | how do you copy in emacs with the starter kit settings? |
| 18:32 | Scriptor | TimMc: close enough, and it's not something I need right now |
| 18:32 | TimMc | Oh, so it is. |
| 18:32 | qbg | &(let [foo (comp {() list [] vector} empty)] [((foo '(1 2 3)) 1 2 3) ((foo [1 2 3]) 1 2 3)]) |
| 18:32 | lazybot | java.lang.IllegalArgumentException: Duplicate key: clojure.lang.PersistentList$EmptyList@1 |
| 18:32 | PntBlnk | Calling again for help with macro evaluation: https://gist.github.com/1872212. I'm embarrassed by the amount of time I've spent failing to understand how to solve the problem. |
| 18:33 | qbg | Yeah, not good enough |
| 18:33 | amalloy | oh man |
| 18:33 | qbg | PntBlnk: What do you mean by 'I want this to be evaluated before pred-map'? |
| 18:34 | qbg | &(type []) |
| 18:34 | lazybot | ⇒ clojure.lang.PersistentVector |
| 18:35 | qbg | amalloy: I guess you could go from the type names, but eww |
| 18:35 | amalloy | yeah, i thought of that first but it's so gross |
| 18:35 | amalloy | welcome to #clojure, where we can't tell how to make collections |
| 18:36 | PntBlnk | Oh yay, thanks! Well the pred-map is getting the parse-where function instead of the result.. |
| 18:36 | jweiss | in the REPL is there anything that can be done to stop the memory use from ever-increasing? (System/gc) gives back nothing and my jvm is at 780m |
| 18:37 | TimMc | &(let [f (fn [x] {:pre [(sequential? x)]} (if (associative? x) vector list))] (map f [[1 2 3] (range 10)])) |
| 18:37 | lazybot | ⇒ (#<core$vector clojure.core$vector@5e119c> #< clojure.lang.PersistentList$1@4dc33c>) |
| 18:37 | qbg | jweiss: Sounds you you're holding onto some big object |
| 18:38 | TimMc | jweiss: Start unmapping namespaces and defs. |
| 18:38 | jweiss | TimMc: i was about to ask whether it's typically data or code that takes up a lot of space |
| 18:38 | jweiss | sounds like code is a part of it |
| 18:38 | jweiss | significant part i mean |
| 18:39 | qbg | jweiss: What have you done in your repl session? I've only ever gotten that big by def'ing a huge object |
| 18:39 | TimMc | Good question. Start VisualVM or whatever and find out! |
| 18:39 | amalloy | you guys are assuming that the jvm gives memory back to the OS when it's done GCing. unless you give it a max heap size at startup, it often won't do that |
| 18:39 | jweiss | i'm installing visualvm now |
| 18:39 | qbg | Do you have the JDK installed? |
| 18:39 | qbg | If so, you already have it |
| 18:39 | jweiss | amalloy: good point, i need to ask the jvm rather than linux |
| 18:40 | jweiss | qbg: separate package on my distro, apparently |
| 18:40 | qbg | Yeah, it is sort of a random addition :p |
| 18:41 | qbg | PntBlnk: Does manually invoking the effective eng/parse-where call work? |
| 18:41 | jweiss | PSYoungGen total 598208K, used 157197K |
| 18:42 | PntBlnk | Yes, as follows in a sec... |
| 18:42 | wubo | pretty awesome talk on JVM memory tuning and what the generations (like PSYoungGen) mean: http://www.infoq.com/presentations/JVM-Performance-Tuning-twitter |
| 18:43 | qbg | jweiss: You can do a heap dump and see what is using what |
| 18:43 | qbg | (probably want to compute retained sizes) |
| 18:43 | jweiss | qbg: i think what i pasted shows the jvm isn't actually using it |
| 18:44 | jweiss | but it's not giving anything back to the os, so i think i need to lower Xmx |
| 18:44 | jweiss | currently at 512mb |
| 18:44 | qbg | Do you really need the jvm to give up that virtual memory? |
| 18:44 | jweiss | still, kinda surprised at 780m memory use |
| 18:44 | jweiss | qbg: i think that's res not virtual |
| 18:45 | jweiss | on this box, i have plenty of mem, but i want other people to be able to do the same without using embarrassing amounts |
| 18:45 | qbg | If you have plenty of memory, I'm not surprised that linux is keeping most of the unused mem resident |
| 18:45 | duck1123 | with lein-cljsbuild, I should be able to just specify clojurescript libraries in my project and it should find them, or does it not work that easily jet? |
| 18:46 | jweiss | i guess i should just not try to solve this problem until it's actually a problem :) |
| 18:46 | gfredericks | duck1123: I think that's advertised in the README |
| 18:47 | qbg | Probably be better to find the peak amount of mem your app uses |
| 18:47 | Scriptor | is there an equivalent to & rest but for #(do %) style functions? |
| 18:47 | gfredericks | duck1123: I take it back |
| 18:47 | qbg | You don't want to set Xmx too low or else you'll get GC overhead limit exceeded exceptions. |
| 18:47 | duck1123 | I've tried that, and it doesn't seem to work. Can't find jayq.core |
| 18:47 | PntBlnk | If I call (select call (where (like :assignee "ab"))), the parse where is evaluated and the pred-map function gets (korma.sql.fns/pred-like :assigned_to "ab"). |
| 18:47 | qbg | &(#(do %&) 1 2 3) |
| 18:47 | lazybot | ⇒ (1 2 3) |
| 18:48 | Scriptor | ooh |
| 18:48 | ibdknox | duck1123: it does work that easily :) |
| 18:48 | PntBlnk | The parse-where function takes a the predicate and replaces it with a function. What I want it to get is the resulting map: {:korma.sql.utils/pred #<engine$do_infix korma.sql.engine$do_infix@19e17b0>, :korma.sql.utils/args [:assigned_to "LIKE" "ab"]} |
| 18:50 | PntBlnk | Sorry, I wasn't clear. I would like pred-map to get the resulting map from evaluating the function returned by parse-where. |
| 18:51 | qbg | PntBlnk: Do you really want to be passing parse-where a list of the form (unalias-form ...)?\ |
| 18:51 | PntBlnk | Nope, what you see there is the result of many painful experiments and misunderstandings. |
| 18:52 | qbg | You just want to call parse-where with the result of unalias-form I presume? |
| 18:52 | PntBlnk | The unalias-form function returns the same form with replacements. |
| 18:53 | qbg | Does replace that section with (unalias-form form query) work? |
| 18:54 | newb_cl | Hi, does aleph work with clojure 1.3? |
| 18:54 | PntBlnk | Yes. But I was having lots of trouble getting form to stay as it is and forcing the query to evaluate. Unevaluated the query is something like (select* call). I want the form to stay unevaluated, because of course it has to be processed by the parse-where... |
| 18:55 | PntBlnk | You you suggest completely unquoting the bottom line? |
| 18:55 | duck1123 | Well, It appears I simply needed a more recent copy of clojurescript. I apologize for suggesting that something may not be easy. Now to hack some clojurescript |
| 18:56 | qbg | PntBlnk: Yeah, so you'll passing the result of unalias-form to parse-where |
| 18:56 | ibdknox | duck1123: I'm about to put up a video of me building an app from start to finish :) |
| 18:57 | ibdknox | I guess I should probably narrate it though |
| 18:57 | ibdknox | hm |
| 18:57 | gfredericks | ibdknox: you finish apps? |
| 18:57 | ibdknox | upon occasion ;) |
| 18:57 | PntBlnk | qbg: That gets back to my previous issue. |
| 18:57 | gfredericks | you could sell that. |
| 18:57 | duck1123 | that would be very cool to watch. I've been holding off on doing much javascript until I could actually, you know, get any dependencies to work |
| 18:58 | qbg | Does replacing ~(eng/parse-where ...) with '~(eng/parse-where ...) help with your previous issue? |
| 18:58 | PntBlnk | The form gets passed okay, but the query is unevaluated. |
| 18:59 | qbg | PntBlnk: What does query look like? |
| 18:59 | PntBlnk | Massive. You don't want it posted here :) |
| 19:00 | PntBlnk | Korma uses pretty complicated nested maps for queries and tables. |
| 19:01 | ibdknox | oh, you guys are talking about korma.. maybe I should pay attention lol |
| 19:01 | PntBlnk | Feel free to have a look at my Korma fork if you'd like to see what I've been up to. I'm working on the field-aliases branch. https://github.com/pauldorman/Korma |
| 19:01 | ibdknox | what are you guys trying to accomplish? |
| 19:02 | qbg | https://gist.github.com/1872212 |
| 19:02 | qbg | PntBlnk: Are you essentially wanting to use (unalias-form form q#) instead of (unalias-form form query)? |
| 19:03 | PntBlnk | qbg: If I quote the parse-where line the form gets evaluated... |
| 19:03 | ibdknox | lol or don't tell me :) |
| 19:03 | qbg | ibdknox: The second macro isn't working correctly |
| 19:03 | ibdknox | sure |
| 19:04 | ibdknox | I don't know what that does :) |
| 19:04 | ibdknox | what is the ultimate goal? |
| 19:04 | PntBlnk | ibdknox: I've almost got this licked, just having a fight with the 'where' macro. |
| 19:05 | franks | Is there a way to see if a var refers to a protocol ? (doc or meta doesn't seem to provide any clue...) |
| 19:05 | PntBlnk | The 'field-aliases TLDR': Enable the definition of default aliases for entities (using the 'aliases' function) which can be used in place of actual field names for all Korma functions. |
| 19:07 | franks | A protocol function, however, does have a meta :protocol meta member... |
| 19:07 | ibdknox | couldn't you just do (def myalias :some-crazy-long-field) and use that all over? |
| 19:08 | franks | Sorry, not function but : A protocol interface definition, however, does have a meta :protocol meta member... |
| 19:08 | qbg | PntBlnk: Did you write unalias-form? |
| 19:08 | PntBlnk | All of the existing tests pass (with a couple of minor changes). |
| 19:08 | PntBlnk | Sure, but why not do it at the entity? |
| 19:09 | ibdknox | because it adds another layer of indirection, and I would assume complicates the implementation a fair amount |
| 19:09 | PntBlnk | Actually, the changes are pretty minor aside from the functions I've added. |
| 19:10 | qbg | If you wrote unalias-form, do you have to do it before parse-where? |
| 19:10 | ibdknox | complexity isn't always measured in the size of a change :) |
| 19:10 | PntBlnk | I'd love it if you'd have a peek, though it's not ready for a pull request yet ;) |
| 19:10 | devn | take for instance the code i just rewrote |
| 19:11 | PntBlnk | qbg: yep, because parse where needs the unaliased form. |
| 19:11 | qbg | Is unalias-form out in that repo? If so, where? |
| 19:12 | PntBlnk | qbg: It's in the field-aliases branch. |
| 19:12 | PntBlnk | https://github.com/pauldorman/Korma/tree/field-aliases |
| 19:13 | weavejester | Does anyone happen to know of an easy way of running an interactive shell script from a Gist? |
| 19:13 | weavejester | My usual "wget -O - http://blah | bash" doesn't work due to the pipe |
| 19:14 | amalloy | curl http://blah > foo && chmod +x foo && bash ./foo? |
| 19:15 | weavejester | amalloy: Yeah… but… that's kinda ugly… *whines* |
| 19:16 | brehaut | isnt theres some sort of parenthesised file source notation in bash? |
| 19:16 | amalloy | there is, but i don't remember it |
| 19:16 | brehaut | liekwise |
| 19:16 | brehaut | $(…) or something? |
| 19:16 | amalloy | bash <(curl http://blah) maybe |
| 19:16 | weavejester | Hm… |
| 19:16 | brehaut | yes |
| 19:17 | brehaut | echo "echo \"hello, world\"" > test.sh; bash <(cat test.sh) |
| 19:17 | brehaut | works for me |
| 19:17 | amalloy | yeah |
| 19:17 | qbg | PntBlnk: Are you sure parse-where needs the unaliased form? I'm not seeing how from a quick peek at the source of parse-where |
| 19:18 | brehaut | i think http://mywiki.wooledge.org/BashSheet looks bookmark worthy |
| 19:18 | weavejester | Yep, it works! |
| 19:18 | weavejester | bash <(echo "read -p 'Username: ' username") |
| 19:19 | PntBlnk | Well, this is possibly my non-lazy thinking, but shouldn't parse-where get the expected form rather than a function call to unalias-form? |
| 19:19 | weavejester | brehaut, amalloy: Thanks for the help |
| 19:19 | amalloy | i've learned enough cool bash tricks that i no longer feel a pressing need to better myself |
| 19:20 | TimMc | I use diff <(svn cat or whatever) <(etc) all the time. |
| 19:20 | brehaut | i have learnt that bash frightens me enough that i dont want to learn any more |
| 19:21 | amalloy | aw. the bash syntax is a complete hodgepodge, but it's amazingly powerful and concise |
| 19:21 | brehaut | hah yes |
| 19:21 | brehaut | i also havent learnt apl ;) |
| 19:22 | amalloy | but clojure!? i hear those guys just use parentheses for everything, even to represent numbers! |
| 19:22 | brehaut | oleg numbers for life! |
| 19:22 | qbg | PntBlnk: If I'm understanding this correctly, the issue here is that query is not evaluated before it is passed to unalias-form (if you do (unalias-form form query)). |
| 19:22 | PntBlnk | Yes, exactly |
| 19:23 | qbg | If that is the case, I think you might be out of luck because you've made a big complecting of runtime and macroexpansion time as far as I can see |
| 19:23 | PntBlnk | I clearly have expert help. Thank you. |
| 19:23 | TimMc | Are you saying PntBlnk has an ugly complexion? |
| 19:24 | qbg | You'd probably have to add an interpreter to Korma to do what you want in that case |
| 19:24 | qbg | Or do some big restructuring |
| 19:24 | PntBlnk | Hmm. |
| 19:24 | amalloy | is unalias-form a macro? |
| 19:24 | qbg | function |
| 19:24 | PntBlnk | Not yet :) |
| 19:25 | amalloy | okay good. i haven't been paying much attention but it seems like it should be a function, and you're saying things that sound like accidental-macros |
| 19:25 | qbg | Because you want to get the runtime value of query at macroexpansion time currently (to determine the aliases) |
| 19:25 | ibdknox | in theory, if it walked the form and just replaced keywords with other keywords, you'd get most of the way there |
| 19:25 | TimMc | technomancy: By the way, I finally figured out how to do temp-namespace sandboxing for my tests: https://github.com/timmc/handy/blob/v1.1.0/src/org/timmc/handy.clj#L53 |
| 19:25 | qbg | But the mappings are determined at runtime currently |
| 19:26 | ibdknox | yep |
| 19:26 | qbg | And Korma is basically a compiler... |
| 19:26 | qbg | So we need to invent time travel |
| 19:26 | ibdknox | it *is* a compiler :) |
| 19:26 | ibdknox | mostly |
| 19:26 | ibdknox | heh |
| 19:26 | PntBlnk | I've been avoiding macros as much as possible - partly because of where I am in Clojure development, and partly because I haven't needed to learn much about them yet. |
| 19:27 | TimMc | Macros are extensions to the compiler. |
| 19:28 | qbg | Korma is at the 'put a compiler into the macro system' level of compilerception. |
| 19:29 | ibdknox | you can use korma without any macros at all actually |
| 19:29 | ibdknox | they just make it slightly nicer |
| 19:29 | ibdknox | so you can use = instead of pred-= |
| 19:29 | ibdknox | and (select ...) instead of (-> select) |
| 19:29 | qbg | But we're touching the macro part here |
| 19:29 | ibdknox | yeah :( |
| 19:30 | PntBlnk | qbg: Well I have done similar with the realias-fields function. |
| 19:31 | PntBlnk | It was necessary to keep with Korma's goal of being very composable |
| 19:31 | TimMc | qbg: At one point I was going to help someone rewrite a macro that expanded from a CFG definition into a parser. Is Korma fancier than that? :-P |
| 19:32 | qbg | Not really |
| 19:32 | qbg | From my quick look at it |
| 19:32 | PntBlnk | Thank you very much for your help qbg and ibdknox. I'll take a different tack and see where that get's me. |
| 19:32 | TimMc | qbg: http://www.shivers.com/~shivers/scheme04/tmp/scheme04/article/05-lexparse.pdf |
| 19:33 | ibdknox | TimMc: I actively tried to make korma not be fancy |
| 19:33 | TimMc | It's crazy shit. |
| 19:33 | qbg | Not having read that paper (at least recently), I'd think the way you'd go is expand into code that builds up the parser using parser combinators |
| 19:33 | PntBlnk | ibdknox: I've also got a pred-between branch on my Korma fork, implementing inclusive ('between'), and exclusive ('between!') predicates. Let me know if you think they might be suitable for a pull request :) |
| 19:34 | qbg | I've basically done that before when working on an implementation of something like syntax-parse |
| 19:36 | TimMc | qbg: I actually don't remember much about the details. At the time, I was trying to learn Scheme48, advanced macros, and Emacs all at the same time. That was ill-fated enough without also trying to grok the existing (apparently somewhat heinous) codebase and learn how to write parsers at the same time. |
| 19:37 | qbg | parser combinators are cool :) |
| 19:37 | TimMc | Oh, and there was something about CPS macros or some such. o.O |
| 19:37 | TimMc | qbg: I bet. |
| 19:37 | qbg | Oh fun! |
| 19:38 | qbg | In my attempt to create something like syntax-parse, I discovered that syntax-parse is way too complected |
| 19:38 | qbg | All what Clojure really needs is a good parser generator library that works on sexps |
| 19:39 | TimMc | :-) |
| 19:39 | qbg | And the hard part about writing such a parser is providing the good error messages that syntax-parse provides |
| 19:40 | qbg | (more like awesome error messages) |
| 19:40 | TimMc | Oh yeah, errors are hard. |
| 19:41 | qbg | At the same time, defmacro provides for 90% of the use cases, the other 10% being macros on the order of defn for example |
| 19:43 | qbg | And defn seems to be essentially hard if you think about it |
| 19:44 | TimMc | You mean, making something like defn? |
| 19:44 | qbg | It is all about normalizing the macro call into something that is easier to use |
| 19:44 | qbg | Yeah |
| 19:45 | TimMc | Well, all the hard stuff is really in fn. Sort of. |
| 19:45 | qbg | I've done a basically complete port of defn to my macro system for Clojure |
| 19:45 | qbg | Well, you have a ton of different forms to handle |
| 19:46 | TimMc | I had a look at the impl. It was brimming with ugliness. |
| 19:46 | TimMc | ...but that's largely because of the large number of weird formats it can take. |
| 19:47 | qbg | Here is what I did: https://github.com/qbg/syntax-rules/wiki/defn-implementation See how ugly it is :) |
| 19:48 | qbg | Need to rewrite that library from scratch at some point in time, and bring it up to Clojure 1.3 :) |
| 20:08 | tjgillies | im working on http://cl.ly/2P121e1Z0R020n0O1k0W and (map raise subneurons) in the fire function isn't causing the subneuron to increment |
| 20:08 | tjgillies | is it because you can't do a dosync inside a dosync? |
| 20:11 | brehaut | you can definately do a dosync in a dosync; thats half the point of the primative |
| 20:11 | brehaut | although its restart semantics might suprise some people |
| 20:12 | tjgillies | weird |
| 20:12 | brehaut | but i cant actually see your code (dunno why) |
| 20:13 | TimMc | Yeah, there's nothing there. |
| 20:13 | tjgillies | hrm |
| 20:13 | tjgillies | odd |
| 20:13 | tjgillies | oh weird just disspeared for me too |
| 20:13 | tjgillies | was there |
| 20:13 | tjgillies | must be a glitch in cloudapp |
| 20:13 | TimMc | tjgillies: Try https://refheap.com/paste |
| 20:13 | tjgillies | have to go i'll come back later and paste |
| 20:14 | tjgillies | refheap uses browserid |
| 20:14 | tjgillies | nice |
| 20:14 | tjgillies | ive been waiting for more actual uses of it before i use it myself |
| 20:15 | TimMc | Raynes: Remind me again of my opinion of browserid? |
| 20:25 | Scriptor | oh come on, clojure-jack-in doesn't work because " 'lein' is not recognized as an internal or external command,\noperable program or batch file." |
| 20:26 | Scriptor | M-x slime-connect works fine |
| 20:26 | TimMc | Scriptor: And lein is on your PATH? |
| 20:27 | Scriptor | TimMc: yep, it works fine in cmd |
| 21:07 | muhoo | with a lein in your path and a spring in your step. |
| 21:08 | muhoo | ibdknox: does korma handle tables with composite primary keys? |
| 21:09 | ibdknox | not implicitly |
| 21:09 | ibdknox | you can make it do so explicitly though |
| 21:10 | ibdknox | (join some-ent (and (= k1 se.k1) (= k2 se.k2))) |
| 21:10 | ibdknox | or just add a where |
| 21:11 | muhoo | thanks |
| 21:12 | muhoo | did your demo of the cljs synth front-end ever get published anywhere? |
| 21:38 | ibdknox | muhoo: I'm finishing up a couple things and then it goes live :) |
| 21:48 | brehaut | what is the autocomplete mode sam aaron uses in his overtone vid? |
| 21:58 | devn | brehaut: this is just a guess, but maybe slime-fuzzy? |
| 21:58 | ibdknox | As requested: http://news.ycombinator.com/item?id=3615022 |
| 21:58 | devn | brehaut: his dotfiles are online |
| 21:58 | devn | overtone-emacs i believe is the repo name |
| 21:58 | brehaut | devn: oh right. thanks :) |
| 21:58 | devn | brehaut: if you want something really fancy for live coding you have to check out hilight-tail-mode |
| 21:58 | ibdknox | along with the video is an epic blog post |
| 21:59 | brehaut | ibdknox: oh, the jekyll blog? |
| 21:59 | brehaut | that was fast |
| 21:59 | ibdknox | No point in waiting around ;) |
| 21:59 | brehaut | nope ;P |
| 22:00 | ibdknox | that should provide a pretty good intro for those looking to mess around with CLJS though |
| 22:00 | ibdknox | lots of good tidbits in there |
| 22:01 | brehaut | ibdknox: pygments highlighting? |
| 22:01 | ibdknox | yessir |
| 22:02 | jimduey | ibdknox: nice job on the blog and the app. |
| 22:03 | jimduey | I thought about doing an app like that, but buried it deep in my TODO stack. Glad to see you do it. |
| 22:03 | ibdknox | :) |
| 22:03 | ibdknox | it was fun and quick |
| 22:04 | jimduey | What did you think of Jekyll? |
| 22:05 | ibdknox | it took me a bit to get it "right" |
| 22:05 | ibdknox | I tried starting from that bootstrap thing, but it just seemed like there was way too much there |
| 22:05 | brehaut | ibdknox: surely you'll still be getting it 'right' for the next 6 months or more :P |
| 22:05 | ibdknox | now that it works, I like it |
| 22:05 | ibdknox | brehaut: there's nothing to mess with! I'm pretty happy with the design |
| 22:06 | ibdknox | the content for projects could probably be a little better |
| 22:06 | ibdknox | I threw most of those together pretty quickly |
| 22:06 | brehaut | ibdknox: haha. ive been happy with the design every time i refreshed my site, but still found heaps of stuff to tweak after not too long |
| 22:10 | devn | ,(def yall? every?) |
| 22:10 | clojurebot | #<Exception java.lang.Exception: SANBOX DENIED> |
| 22:10 | devn | &(def yall? every?) |
| 22:10 | lazybot | java.lang.SecurityException: You tripped the alarm! def is bad! |
| 22:10 | devn | :( |
| 22:11 | devn | i stole that from gnuvince: http://clojure-log.n01se.net/date/2009-02-05.html |
| 22:11 | devn | i need to make a redneck clojure, (def ygot? contains?) |
| 22:25 | devn | ,(let [foo (let [bar 2] (str bar))] foo) |
| 22:25 | clojurebot | "2" |
| 22:28 | muhoo | is there any clojure library for interfacing directly with git? |
| 22:28 | muhoo | other than maybe using java interop and jgit, perhaps. |
| 22:28 | devn | muhoo: not probably what you're after, but: https://github.com/Raynes/tentacles |
| 22:29 | devn | muhoo: also, checkout clojars, seems to be a few things worth looking into including: [quickbeam "1.0.0-SNAPSHOT"] |
| 22:30 | devn | muhoo: https://github.com/technomancy/quickbeam |
| 22:31 | muhoo | cool. thanks. |
| 22:31 | devn | np, looks like it uses jgit |
| 22:31 | devn | pretty tiny lib, but probably ripe for commits if you feel so inclined :) |
| 22:34 | tjgillies | when neuron2 fires its not increasign neuron1 https://refheap.com/paste/783 |
| 22:34 | tjgillies | increasing* |
| 22:34 | devn | huzzah! |
| 22:35 | devn | let the neurons fire! |
| 22:35 | pandeiro | ibdknox: does your jekyll site automatically make a post to hn too and generate the link at the bottom? |
| 22:35 | ibdknox | nope, I did that |
| 22:35 | pandeiro | but you intend to let hn handle the comments for your posts? |
| 22:35 | devn | ibdknox: reading back up in my buffer now -- i never liked jekyll |
| 22:35 | devn | i found it to be a pain in the ass |
| 22:35 | devn | :X |
| 22:35 | ibdknox | so far I really do |
| 22:36 | devn | i tried almost as many times as i tried emacs |
| 22:36 | ibdknox | what was the problem? |
| 22:36 | ibdknox | it seems like now that I have it in this state, all I do is add posts |
| 22:36 | devn | honestly I'm not sure, it just felt like most of the time I was plumbing and not doing |
| 22:36 | devn | err not "adding value" |
| 22:36 | devn | it took long enough to setup that i was like...great, why didn't i use wordpress? |
| 22:37 | muhoo | ibdknox: that cljs app is fantastic. thanks for documenting it so clearly. actually, all of your stuff seems really well documented to me. thanks for that. |
| 22:37 | devn | +10, ibdknox's docs rule |
| 22:37 | devn | model clojurian |
| 22:37 | ibdknox | :) |
| 22:38 | devn | his color scheme choices are fun too |
| 22:38 | devn | ibdknox: do you have a donate button somewhere on your repos? |
| 22:38 | pandeiro | ibdknox: all the comments for your blog will be through hn then? |
| 22:38 | ibdknox | pandeiro: probably, I never found it useful to have them on my own site |
| 22:38 | ibdknox | devn: I keep forgetting to do that |
| 22:40 | devn | ibdknox: i work at a small company and we have a sort of internal "give other people company money" sort of thing. tooting my own horn: I gave to a couple of open source projects recently and noticed that a half dozen of my favorite clojure projects have no way to donate |
| 22:40 | devn | i want a world where we all get paid to work on open source |
| 22:40 | devn | so get them buttons up, ibdknox! :D |
| 22:42 | Scriptor | donations raise a whole bunch of issues though, like being more partial to the donator's wants, even if you don't realize it |
| 22:46 | ibdknox | it'd have to be anonymous |
| 22:46 | muhoo | i don't think that's necessarily a bad thing. i like to eat. others do too, i'm told. |
| 22:46 | brehaut | muhoo: thats a ridiculous liberal media conspiracy |
| 22:46 | muhoo | :-) |
| 22:47 | brehaut | super-pac? is that some sort of american thing? |
| 22:47 | gfredericks | quite |
| 22:47 | muhoo | brehaut: you don't want to know :-/ |
| 22:47 | brehaut | probably right |
| 22:48 | gfredericks | don't google it it would just make you sad |
| 22:48 | brehaut | gfredericks: most of your political system makes me sad |
| 22:48 | Scriptor | has anyone used clojurescript's reader on its own? |
| 22:48 | muhoo | one dollar, one vote! |
| 22:48 | Scriptor | or are there any guides to do so? |
| 22:55 | devn | Scriptor: There is a degree of being partial to donors' wants that is healthy. |
| 22:56 | devn | Scriptor: some projects do not have donors and cater to themselves exclusively. Balance is healthy. |
| 22:59 | pandeiro | ibdknox: did you mute your mic or are you really that zen when all this crap keeps throwing exceptions and screwing up? |
| 22:59 | ibdknox | haha |
| 22:59 | ibdknox | no muting |
| 22:59 | muhoo | i think anyone with experience in web dev is used to that |
| 23:00 | pandeiro | yeah i guess you gotta be in the zone |
| 23:00 | pandeiro | but i don't even hear a sigh, nothing |
| 23:00 | pandeiro | you gotta swear at the compiler or it's not programming i thought |
| 23:01 | muhoo | web dev, usually does not involve a compiler. it usually involves multiple broken browsers and broken languages. |
| 23:02 | mrevil | what do people use for building rest clients? |
| 23:02 | brehaut | mrevil: in clj or cljs? |
| 23:02 | mrevil | clj |
| 23:02 | brehaut | clj-http is probably a good start |
| 23:02 | brehaut | http://github.com/dakrone/clj-http/ i think? |
| 23:02 | pandeiro | muhoo: in this case talking about the cljs compiler |
| 23:03 | muhoo | oh, well my understanding it that cljs is still very alpha. so maybe that's still the norm. |
| 23:04 | mrevil | no higher level abstraction? |
| 23:04 | muhoo | mrevil: noir? ring? |
| 23:04 | mrevil | i thought that was server side |
| 23:05 | muhoo | clj, yes, server side. cljs is client-side. |
| 23:07 | brehaut | mrevil: higher level? rest is an architectural style, not a protocol. there really isnt a 'higher level' than http for rest in general |
| 23:07 | TimMc | devn: So, should I put a bitcoin address on all my READMEs or what? :-P |
| 23:08 | mrevil | no, but take for instance httparty for ruby, there are abstractions that make writing rest clients easier/faster. |
| 23:08 | devn | TimMc: I look around at some of the projects I really love and people support them, allow them to work full time on a particular project. I don't think some people care to be tied down their open source projects. I think there are others who would like that very much. |
| 23:09 | devn | down by their* |
| 23:09 | TimMc | Maintainership can be a real bear, yes. |
| 23:09 | TimMc | Sometimes I want to release code anonymously. :-P |
| 23:09 | brehaut | mrevil: a quick look at some docs for that and it looks horrible! specific urls‽ thats not restful |
| 23:10 | devn | I think we all sort of do that TimMc |
| 23:10 | TimMc | More seriously, how to handle multi-contributer projects? |
| 23:11 | devn | IRC is sort of like this oracle. You can walk into this room, and if people are around you can wind up with some really great answers to problems you never asked to be answered. |
| 23:11 | devn | TimMc: I have no idea |
| 23:11 | devn | TimMc: a lot of real communication? |
| 23:12 | TimMc | Let's say I put a donation button on org.baznex/imports, which started out as a clojure.contrib migration but is now largely code written by me, with some code and ideas from tmciver and a bunch of ideas from the channel. |
| 23:12 | devn | point taken |
| 23:12 | devn | but also, meh. |
| 23:12 | TimMc | I think the easiest thing to do would be to have a donation button that actually sends the money to some explicitly listed charity, and all the contributors just get a boost by seeing donations that come in. |
| 23:13 | brehaut | TimMc: that sounds like a great idea |
| 23:13 | devn | TimMc: I think that should be everyone's choice |
| 23:13 | devn | If someone becomes an addict maintainer, who is to say that I should stop them? |
| 23:14 | TimMc | haha |
| 23:14 | devn | If someone can make it a job and help the community a ton by asking for modest donations that seems like a net win. |
| 23:14 | TimMc | I *want* it to be easy for people to make money from this stuff, but figuring out non-poisonous incentive structures is hard. |
| 23:16 | devn | yeah, totally agree. at the end of the day I think I really feel like if someone has a dream to maintain the hell of out projects, then I think we should encourage that. There shouldn't be whispers around it. |
| 23:16 | devn | It's sort of like people are afraid to get paid a living wage for doing what they love. |
| 23:18 | TimMc | 1) Project owner takes all: People would probably feel a little weird doing significant contributions. 2) Proportional take by LOC/issues closed/etc.: Skews what works is done (probably! or could be in a good way!) 3) renegotiate percentages occasionally |
| 23:18 | TimMc | Maybe (1) + project owner puts a bounty on issues. |
| 23:18 | devn | TimMc: There is a middle ground still though, maybe? |
| 23:19 | TimMc | I should have labeled those A B and C, by the way -- those are alternatives, if it wasn't clear. |
| 23:19 | devn | Think of Heroku, AWS. You can get a free micro, or free hosting, the base platform, but there's a buiness model outside of it that builds *with* the community behind it.. |
| 23:20 | TimMc | Right, it has a good incentive model, just like NFSN |
| 23:20 | TimMc | pay-for-what-you-use |
| 23:20 | devn | I'm not familiar |
| 23:20 | TimMc | NearlyFreeSpeech.net, a web host I use. |
| 23:21 | devn | TimMc: *nod* -- I like that. Here's the guts. You could build this yourself. Most of it is open source, the rest would be useless to organize. |
| 23:21 | TimMc | Prepay, and bandwidth, storage, and other site fees are deducted penny by penny. |
| 23:21 | devn | but, hey, if you want some of that stuff, we're plumbing the system together. |
| 23:21 | TimMc | Not following. |
| 23:22 | devn | puts quotes around everything I just said from "Here's the guts." on... |
| 23:22 | devn | TimMc: I'm speaking from the perspective of a Heroku or AWS. |
| 23:23 | TimMc | Hmm, OK. I got confused by the dual role of "open source" in this conversation. |
| 23:23 | tjgillies | heroku is expensive for more than one dyno |
| 23:23 | devn | *nod* -- sorry, I realize I'm a confusing typist. I write like I speak a lot of the time and it gets me in constant trouble. |
| 23:23 | TimMc | tjgillies: Yeah, I'd love a middle ground. |
| 23:24 | TimMc | devn: Oh, I figured out that you were summing up their sales pitch. |
| 23:24 | devn | TimMc: As I wrote that I had changed my tone, inflection to clearly be another person. |
| 23:24 | devn | :) |
| 23:24 | tjgillies | clearly |
| 23:24 | devn | TimMc: I mean, that's not far off. |
| 23:24 | TimMc | devn: Are you suggesting a pay-for-customization model? |
| 23:25 | devn | I don't know. I don't know enough about that to have a reasonable opinion. |
| 23:25 | devn | What is the Heroku, AWS model in your opinion? |
| 23:26 | ibdknox | PaaS |
| 23:26 | devn | Not to assume they're the same... They might be very different. I guess I personally see them as similar, but would be curious to know your take. |
| 23:26 | tjgillies | so weird. on line 17 https://refheap.com/paste/784#L-17 it works with an anonymous function, but if i try to map over the vector of refs it doesn't do anything |
| 23:26 | TimMc | ibdknox: "P" == ? |
| 23:26 | ibdknox | Platform |
| 23:26 | TimMc | plumbing? |
| 23:26 | devn | haha |
| 23:26 | brehaut | poodles |
| 23:27 | devn | parsnips |
| 23:27 | tjgillies | plojure |
| 23:27 | devn | "i hear plojure is really making a splash these days" |
| 23:28 | TimMc | tjgillies: Those dangling parens after (inside?) the dosync make it hard to see the structure. |
| 23:28 | tjgillies | TimMc: i'll rewrite that section |
| 23:28 | brehaut | tjgillies: why are you using an anon fn in a let anyway? |
| 23:29 | TimMc | tjgillies: Anyway, you call that fn with (first subneurons), right? |
| 23:29 | devn | tjgillies: it seems a little weird to me that your arities are reversed |
| 23:29 | TimMc | tjgillies: At this point, all I can offer is doall around any side-effecting maps, or maybe just a doseq |
| 23:30 | devn | tjgillies: why is [popularity] after [popularity subneurons] |
| 23:30 | TimMc | devn: polarity |
| 23:30 | devn | either way, it struck me as being sort of odd, just saying... |
| 23:31 | tjgillies | devn: because im a clojure noob thats why |
| 23:31 | TimMc | I can see it either way. Most general case first, helpers later? (No implication of "forward reference".) |
| 23:32 | TimMc | When writing chaining Java constructors, I can never decide which order to put them in. |
| 23:32 | devn | tjgillies: nah it's fine, i don't mean to nitpick |
| 23:32 | devn | TimMc: im just cargo culting -- i see that most people go low to high. that seems to be a common pattern in clojure |
| 23:32 | tjgillies | TimMc: https://refheap.com/paste/785 |
| 23:32 | devn | it's an unspoken idiom |
| 23:33 | tjgillies | i cleared that function up to its easier to see structure |
| 23:33 | tjgillies | so it's* |
| 23:33 | brehaut | tjgillies: you (dosync (alter subneuron…)) can be rewritten as (dosync (alter subneuron update-in [:value] inc)) |
| 23:33 | tjgillies | brehaut: thnx |
| 23:33 | brehaut | update-in is magic :) |
| 23:34 | devn | select-keys too |
| 23:34 | brehaut | tjgillies: you might even find (fnil inc 0) useful too |
| 23:34 | TimMc | brehaut: especially when combined with fnil |
| 23:34 | devn | :) |
| 23:34 | TimMc | bah! |
| 23:34 | brehaut | ,(update-in {} [:value] (fnil inc 0)) |
| 23:34 | clojurebot | {:value 1} |
| 23:34 | brehaut | ,(update-in {:value 100} [:value] (fnil inc 0)) |
| 23:34 | clojurebot | {:value 101} |
| 23:34 | TimMc | Sniped by a kiwi! My internet must be super-laggy tonight. |
| 23:34 | brehaut | TimMc: ahaha |
| 23:34 | devn | "f nil" seems to be fitting |
| 23:34 | tjgillies | my question was i don't understand why my anonymous function alters the ref, but when i try to map over subneurons nothing happens |
| 23:34 | brehaut | stephen fry says yes |
| 23:35 | brehaut | tjgillies: im not sure i understand why you are creating a fn in the let and then executing it it imiediately? |
| 23:35 | TimMc | tjgillies: Show the attempt at using map. |
| 23:36 | brehaut | why ont just (let [[subneuron & _] (:subneurons @neuron)] (dosync …)) ? |
| 23:36 | TimMc | and remember that map is lazy |
| 23:37 | tjgillies | TimMc: here it is with the map: https://refheap.com/paste/786 |
| 23:37 | TimMc | tjgillies: Right, put a (doall ...) around that map, see what happens. |
| 23:38 | tjgillies | ok not sure what doall is |
| 23:38 | brehaut | , (let [{[subneuron & _] :neurons} {:neurons [:magic 2 3]}] subneuron) ;; more magic |
| 23:38 | clojurebot | :magic |
| 23:38 | tjgillies | lemme try it |
| 23:38 | brehaut | tjgillies: doall forces the realization of a lazy sequence |
| 23:38 | tjgillies | i wish i could use doall on people |
| 23:38 | brehaut | baha |
| 23:40 | tjgillies | TimMc: sweet its working now |
| 23:40 | TimMc | tjgillies: Now replace the doall and map with https://refheap.com/paste/787 |
| 23:40 | tjgillies | im not used to working with lazy stuff |
| 23:40 | tjgillies | im a ruby guy |
| 23:40 | TimMc | You were throwing away the return values anyway, right? |
| 23:41 | tjgillies | yeah i was essentially using it as for-each |
| 23:41 | TimMc | doseq = dorun map |
| 23:41 | brehaut | doseq = dorun for |
| 23:41 | tjgillies | whats dorun? |
| 23:41 | tjgillies | so many do* functions in clojure |
| 23:42 | brehaut | like doall but it discards the sequence rather than returning the head |
| 23:42 | tjgillies | ah, is that more efficient? |
| 23:42 | brehaut | it wont consume memory for no reason |
| 23:42 | Scriptor | so dorun is only for side effects? |
| 23:42 | tjgillies | i'll take that as a yes |
| 23:43 | brehaut | Scriptor: yes |
| 23:43 | brehaut | tjgillies: it was a specific yes ;) |
| 23:45 | tjgillies | TimMc: awesome thanks |
| 23:46 | TimMc | tjgillies: Make sure you learn the difference between dorun and doall and why they exist; what it means for doall to "hold onto the head" of the seq. |
| 23:47 | tjgillies | ok |
| 23:49 | tjgillies | whats the best way to clear all the values in clojure-swank? just reload it? |
| 23:49 | tjgillies | swank-clojure rather |
| 23:52 | tjgillies | oh looks like c-c c-k clears the values as well as compiling |
| 23:53 | Scriptor | is there a list joining function or is (reduce str ...) the idiomatic way? |
| 23:54 | lynaghk`` | for a list of strings? |
| 23:54 | lynaghk`` | clojure.string/join |
| 23:54 | ibdknox | lynaghk``: did you catch my blog post? :) |
| 23:55 | lynaghk`` | yeah, I just saw it on HN |
| 23:55 | lynaghk`` | I'm tempted to crank out my own iPad overtone controller |
| 23:55 | lynaghk`` | in our iFight. |
| 23:55 | ibdknox | haha |
| 23:55 | lynaghk`` | LUCKILY for you Chris, I'm slammed with other work |
| 23:55 | lynaghk`` | =P |
| 23:55 | ibdknox | I am too, I'll probably regret losing the day to making this |
| 23:55 | ibdknox | lol |
| 23:55 | ibdknox | oh well, for the good of the community and all |
| 23:56 | pandeiro | ibdknox: so this didn't all happen in 23 minutes you mean? |
| 23:56 | ibdknox | building it did |
| 23:56 | pandeiro | i saw that ipadtest vim session boy... |
| 23:56 | pandeiro | ;) |
| 23:56 | ibdknox | then writing the blog post and cleaning up the blog and blah blah |
| 23:56 | ibdknox | lol |
| 23:56 | ibdknox | that one was actually faster |
| 23:56 | ibdknox | oddly enough |
| 23:57 | ibdknox | took me about 15 minutes |
| 23:57 | ibdknox | apparently my computer can't take recording an HD screencast and getting deps at the same time |
| 23:57 | ibdknox | lol |
| 23:57 | ibdknox | the screencap at two cores the whole time :/ |
| 23:58 | Scriptor | is there a function that returns whether a value is an atom (not Atom), so if it's a string, integer, boolean, etc. |
| 23:58 | Scriptor | atom? seems to do the trick |
| 23:59 | pandeiro | ibdknox: awesome that you also did the write up... one thing still foggy in my mind is what the remotes middleware is doing |