2013-01-29
| 00:01 | callenbot | Raynes: evaluation of Collapse Under the Empire? |
| 00:02 | Raynes | callenbot: It's a nice big musical thing. You'll learn this about me: I evaluate vocals because I am a vocalist and I know nothing about instrumentals. |
| 00:02 | callenbot | Raynes: oh fuck son. We're meant to fuse together like the power rangers and write a musical. |
| 00:03 | Raynes | lol |
| 00:04 | technomancy | if you haven't heard the protomen your life is incomplete: https://www.youtube.com/watch?v=mBcDoZnN8ac |
| 00:28 | hugod | ediff of clojure-test-mode failures https://gist.github.com/4662037 |
| 00:30 | technomancy | hugod: whoa cool |
| 00:32 | technomancy | I typically use lein difftest for that stuff |
| 00:33 | hugod | I have a hard time interpreting the results of difftest - they seem backward to me |
| 00:33 | technomancy | "At the time, we noticed a void in rock and roll. A hole that could only really be filled with grown men and women painting up like robots and playing some fierce and furious rock music based on a 1980s video game. We were fairly certain no one else was going to fill that hole. But, by god, it's filled now. You can thank us later." |
| 00:34 | xeqi | can I just plug that into my emacs config and have it work? |
| 00:35 | hugod | you may want a (define-key map (kbd "C-c C-'") 'clojure-test-ediff-result) or similar |
| 00:39 | technomancy | but yeah ediff sounds like a good idea |
| 00:40 | technomancy | man... nrepl.el has more open issues than leiningen =\ |
| 00:42 | hugod | I could do a pull request sometime - in the meantime it's here https://github.com/hugoduncan/clojure-mode/commit/a0f5520aee21aa7bd4d87ccc7a8b30c2d14b19ae |
| 01:56 | aphyr | OK, I know I've done this before... how do I call java functions which take List<SomeType>? |
| 01:56 | aphyr | Getting the usual "clojure.lang.PersistentVector cannot be cast to [LSomeType" |
| 02:00 | echo-area | aphyr: Create an instance of List and add objects into it. |
| 02:01 | aphyr | Ah, turned out to be my bad, [L is actually *array* |
| 02:01 | echo-area | Or should I say "Create an instance of List that have objects to be passed" |
| 02:39 | nonuby | newbie question, https://www.refheap.com/paste/9043, it seems I have a problem with add method in -> macro, any ideas? just trying to get it to run first (i.e. return 0 count)) |
| 02:40 | aphyr | nonuby: Drop the #? |
| 02:41 | aphyr | #() is an anonymous function, -> takes regular forms like (add :product1 1) |
| 02:42 | nonuby | isnt that what I want tho so %1 is subsituted with the cart from create-cart? |
| 02:42 | aphyr | -> does it for you |
| 02:42 | aphyr | (-> x (function arg)) becomes (function x arg) |
| 02:43 | nonuby | ah i see |
| 02:43 | nonuby | thanks very much |
| 03:20 | ivan | http://dev.clojure.org/jira/browse/CLJS-5 Chouser is a time traveler from 2020 |
| 03:25 | echo-area | Cool |
| 03:27 | xumingmingv | Cool.. |
| 03:30 | tomoj | is it only that ticket? |
| 03:30 | tomoj | I've always wondered why the charts were screwed up |
| 03:30 | tomoj | no, looks like it's more than one ticket |
| 03:40 | marianoguerra | hi, I define a class with gen-class on a module, let's say foo.model, the class is called foo.model.Temperature, how do I import/use/require and use it from the repl? |
| 03:41 | xumingmingv | marianoguerra: first require the namespace, then import the class |
| 03:45 | marianoguerra | xumingmingv: thanks! |
| 03:47 | josteink | technomancy: YES |
| 03:47 | josteink | yes yes yes yes yes |
| 04:18 | AndChat|552816 | hi all |
| 04:20 | AndChat|552816 | is there a library for generating high performance code from a subset of clojure. Sort of like scriptjure, sort of like lithium(assembler). I'm after a c-level abstraction |
| 04:20 | AndChat|552816 | c as in the language |
| 04:24 | xumingmingv | like this one: https://github.com/schani/clojurec? |
| 04:25 | AndChat|552816 | Oo, looks like the sort of thing. thanks :-) |
| 04:28 | AndChat|552816 | weird how the clojure community seems to be 90% on github |
| 04:28 | josteink | 100% of clojure is |
| 04:28 | AndChat|552816 | not that its bad. just the only other thing like it is javascript. |
| 04:28 | josteink | so why shouldnt the community? ;) |
| 04:28 | xumingmingv | and Ruby? |
| 04:29 | AndChat|552816 | Didn't know Ruby was there |
| 04:30 | xumingmingv | Ruby community utilize Ruby heavily, actually the language github team use is Ruby(not Confirmed) |
| 04:31 | AndChat|552816 | I suppose it's not as weird as the fact clojure is popular |
| 04:31 | josteink | xumingmingv: I thought that was confirmed? |
| 04:31 | josteink | xumingmingv: the rails exploit with a POC being someone granting themselves free access on github? |
| 04:33 | bizarrefish | gah, connection fail |
| 04:33 | xumingmingv | josteink: wow, dont know that news |
| 04:40 | _________ | xumingmingv Github is completely on ruby on rails |
| 04:41 | cquenx | https://github.com/blog/530-how-we-made-github-fast |
| 04:46 | xumingmingv | cquenx: thanks for the link |
| 05:20 | headshot | can someone point me to an appropriate way to do this? https://gist.github.com/4663275 |
| 05:23 | headshot | (locking ...) |
| 05:24 | headshot | hmm ... still getting illegalmonitorstate |
| 05:27 | headshot | works, thanks for the emotional support :D |
| 05:27 | xumingmingv | what's the solution? |
| 05:27 | headshot | (let [obj (Object.)] (locking obj (.wait obj))) |
| 05:28 | xumingmingv | what's the code looks like before? |
| 05:28 | headshot | the java code? |
| 05:29 | xumingmingv | you said you still getting illegalmonitorstate |
| 05:30 | headshot | i was missing x in (locking x & body) |
| 05:30 | xumingmingv | oh. that explains |
| 05:30 | headshot | yeah |
| 05:32 | headshot | now my camel example works |
| 05:34 | headshot | nice to be back in lispland |
| 06:07 | Anderkent | gaah why do people use version ranges on the clojure jar. So much pain |
| 08:10 | zby | is there a way to 'interpolate' a list into a map - I want to conditionally add a few keys to a map defined by a literal - I thought I would be able to do it like { :a "a" (if some-condition (:b "b") ())} |
| 08:18 | xumingmingv | &(into {:a "a"} [(if true [:b "b"] [])]) |
| 08:18 | lazybot | ⇒ {:a "a", :b "b"} |
| 08:18 | xumingmingv | &(into {:a "a"} [(if false [:b "b"] [])]) |
| 08:18 | lazybot | java.lang.IllegalArgumentException: Vector arg to map conj must be a pair |
| 08:20 | hyPiRion | zby: do ##(into {:a "a"} (filter (comp #{:b :c} first) [[:a 1] [:b 2] [:c 3]])) |
| 08:20 | lazybot | ⇒ {:a "a", :b 2, :c 3} |
| 08:22 | zby | &(into {:a "a"} [(if false [:b "b"] nil)]) |
| 08:22 | lazybot | ⇒ {:a "a"} |
| 08:22 | zby | thanks! |
| 08:28 | hyPiRion | oh, sweet. Didn't knew that nil worked as well. |
| 08:28 | hyPiRion | ,(conj {:a 1} nil) |
| 08:28 | clojurebot | {:a 1} |
| 08:39 | josteink | plain .net, not clojureclr |
| 08:42 | nurettin | josteink: is nuget anything close ? |
| 08:42 | josteink | right now Im nugetting something |
| 08:42 | josteink | slowly |
| 08:42 | josteink | very, very slowly |
| 08:43 | josteink | PM> install-package DotNotOpenOAuth |
| 08:43 | josteink | IMO that should not take 15 minutes |
| 08:44 | josteink | also nuget suffers from being not a declarative "this is how I want it" format. its a iterative/imperative set of powershell cmdlets you use to mutate your project |
| 08:44 | josteink | I dont like that |
| 08:44 | josteink | at least not as much as lein's handy way of doing things |
| 08:46 | nurettin | I like bundler |
| 08:47 | nurettin | I will probably like leinigen |
| 08:50 | josteink | leiningen is hard not to like once you get into it |
| 08:51 | marcellus123 | anyone know what I'm doing wrong in extending cljs.core protocols? |
| 08:51 | marcellus123 | https://www.refheap.com/paste/9047 |
| 08:51 | marcellus123 | getting a "Symbol IEncodeClojure is not a protocol..." warning |
| 08:52 | marcellus123 | (i just realized that should be for/map instead of doseq but that's not the problem anyway |
| 08:56 | gfredericks | marcellus123: do you know for sure that protocol exists in the hversion of cljs you're using? |
| 08:56 | zackzackzack | Are there any libraries for accessing git from within clojure? |
| 09:01 | augustl | are there any text editors other than emacs that has something like paredit-mode where you edit s-expressions, not lines and characters? |
| 09:03 | bltavare_ | augustl: vim + paredit plugin |
| 09:06 | marcellus123 | gfredericks: looks like that's what the problem is, thanks! |
| 09:19 | bosie | anyone can give me a tip why this happens with leiningen www.refheap.com/paste/7867/raw |
| 09:19 | bosie | when i try to compile/run it |
| 09:23 | gfredericks | bosie: I've seen (ns) typos give that exception |
| 09:24 | bosie | gfredericks: hm i only have one ns |
| 09:24 | bosie | and its the same i have in my :main |
| 09:25 | gfredericks | how about the clauses in it? |
| 09:25 | gfredericks | e.g., (ns foo.bar :okay) throws that error |
| 09:33 | ohpauleez | a little while back, there was a core.logic example blog post, that had to do with matching up teachers for classes |
| 09:33 | ohpauleez | the teachers were something like: socrates, plato, etc |
| 09:33 | ohpauleez | does anyone know what blog that was on? |
| 09:34 | ejackson | ohpauleez: that was me... |
| 09:34 | ejackson | 1 sec and I'll get you the link |
| 09:34 | ohpauleez | ejackson: BRILLIANT! |
| 09:35 | ejackson | ohpauleez: https://github.com/ejackson/EuroClojure-2012-Talk |
| 09:35 | ejackson | the pdf is there too |
| 09:35 | ohpauleez | ejackson: Thanks a ton! My Googling skills were failing me |
| 09:36 | ejackson | no sweat |
| 09:46 | augustl | trying eclpise with CCW for the first time. How do I tell eclipse to run "lein ring server-headless" instead lf "lein run"? |
| 09:54 | clgv | augustl: you have to do that from command lein. there is nothing built-in for lein plugins yet |
| 09:54 | clgv | lol. command line^^ |
| 09:58 | chronno | clgv: lol, muscle memory kickin' in |
| 09:59 | augustl | clgv: I see |
| 09:59 | augustl | clgv: so I won't be able to debug lein-ring in eclipse? |
| 09:59 | yedi | can someone link me to a primer on protocols, records, and types in clojure? (to complement the docs) |
| 09:59 | clgv | chronno: humm I think "lein" was too bold in the context (2 times in his short line) ;) |
| 10:00 | clgv | augustl: only if you fireup lein ring externally and connect to its nrepl |
| 10:00 | clgv | provided both use same nrepl versio or at least one with no differences in protocol |
| 10:00 | augustl | I see |
| 10:00 | clgv | augustl: you can use the replview to connect to an external nrepl |
| 10:12 | augustl | clgv: you happen to know if there's a way to edit the keybindings of the strict/paredit mode? |
| 10:12 | augustl | alt+r, alt+s and alt+j doesn't seem to do anything on os x |
| 10:14 | Anderkent | augustl: if it's ccw, all key bindings are managed by eclipse |
| 10:15 | augustl | found key bindings in eclipse settings, and option+r is bound, but it doesn't do anything when I press option+r in an editor |
| 10:15 | Anderkent | it's likely caught by the os and not forwarded to eclipse then |
| 10:15 | Anderkent | try remapping to something else |
| 10:16 | augustl | ah, it just didn't provide any feedback when used in a context where it doesn't do anything |
| 10:17 | augustl | seems the CCW paredit doesn't have nearly as many features as Emacs paredit though |
| 10:17 | Anderkent | yes, that's pretty much why I went back to vim+paredit and only fire up ccw if I need the debugger |
| 10:18 | augustl | https://www.refheap.com/paste/9052 for example, if I want the statement on the last line to be inside the let block, I put the cursor before the parenthesis that closes the let block and press C-right in emacs |
| 10:18 | augustl | doesn't seem to be anything like that in CCW |
| 10:19 | clgv | ALT*Arrowkeys should do somethign |
| 10:21 | augustl | clgv: alt + up/down just moves the entire line up and down |
| 10:21 | augustl | alt + right/left moves the cursor |
| 10:23 | augustl | there's something bound to command+shift+arrows but that just does text selection |
| 10:24 | nDuff | The attitude on the part of the maintainership seemed to be "I don't need those functions, so you don't either" when I noted things that were missing. |
| 10:24 | augustl | my current issue with emacs is its lack of a project mode. So I guess I should fix that ;) |
| 10:24 | augustl | I have 5-6 leiningen projects up at the same time, most of them have the file "core.clj" etc, it becomes hard to navigate after a while |
| 10:26 | augustl | hmm, seems CCW is focused around selection and doing the right thing when the s-expressions are first written, instead of arbitrarily moving them around at any time like emacs does |
| 10:26 | augustl | selecting something and typing ( wraps the selection in parens for example |
| 10:27 | Anderkent | augustl: unfortunately that means correcting any kind of error usually requires leaving paredit mode and manually adjusting the parens |
| 10:27 | Anderkent | which is meh |
| 10:27 | augustl | Anderkent: seems like you're right yeah.. |
| 10:28 | no7hing | @augustl doesn't emac prefix different files with the same filename with the directory they're in? |
| 10:29 | no7hing | which is different in most cases |
| 10:29 | augustl | no7hing: yeah but it's still anoying to navigate the 5 "something/blah/core.clj" files |
| 10:29 | Anderkent | stop calling everything core then :) |
| 10:30 | augustl | not going to give my files shitty names just because emacs doesn't know about projects :P |
| 10:30 | tmciver | I just use a separate emacs session for each of my projects. |
| 10:30 | augustl | that's just an example too, I currently work on two angularjs apps at the same time, and they both have home-controller.js home-controller.clj, and app.js, for example |
| 10:31 | llasram | augustl: Check out the `customize`-able variable `uniquify-buffer-name-style` |
| 10:31 | Anderkent | fuzzy search hj / hc / aj ? |
| 10:31 | augustl | llasram: I already use that one, yeah |
| 10:32 | augustl | Anderkent: I use tramp fuzzy search now, if I type hj, I get two files, one for each project |
| 10:32 | Anderkent | oh thats true, js and clj both match. hjs? |
| 10:32 | Anderkent | anyway :P |
| 10:32 | llasram | augustl: Ah. Huh. Then, I really don't see the problem, honestly... |
| 10:33 | dobladez | Anybody using configleaf and/or environ ? or any other suggestion for handling project configuration? |
| 10:33 | augustl | llasram: the problem is that I have multiple files with the same name, but in different projects |
| 10:33 | augustl | llasram: so I have to think when I switch buffers, I can't just M-x b hj RET |
| 10:33 | augustl | because that will occasionally give me the home-controller.js from the other project |
| 10:34 | dobladez | would be great to unify environ and configleaf by the way |
| 10:34 | augustl | dobladez: I just have a .clj file with a map that I read-string |
| 10:34 | augustl | dobladez: I read the actual file from classpath, so the environment gets to decide which file that should be read |
| 10:34 | llasram | augustl: I see. So you'd like the default to be the one in the same logical "project" as the current file? |
| 10:35 | augustl | llasram: that would be nice, or even better to have the buffer list only contain buffers for files in a certain directory (project) |
| 10:35 | augustl | then some way to easily switch between directories (projects) and turning it off for arbitrary poking |
| 10:35 | llasram | Have you seen technomancy's find-file-in-project? |
| 10:35 | llasram | And I've been using this guy instead: https://github.com/hoffstaetter/find-file-in-repository |
| 10:36 | augustl | is that just for opening new files, or for the buffer list too? |
| 10:36 | dobladez | augustl: thanks |
| 10:36 | augustl | llasram: looking them up, thanks :) |
| 10:36 | llasram | augustl: Just for "opening" files, but if you re-open an already-opened file, it just witches to the existing buffer |
| 10:36 | llasram | switches even |
| 10:37 | augustl | llasram: I'll check it out, hopefully it does fuzzy matching etc like tramp does :) |
| 10:37 | llasram | They both use ido, so the support whatever ido does |
| 10:37 | augustl | this also looks promising: https://github.com/tlh/workgroups.el |
| 10:37 | augustl | seems to be abandoned though |
| 10:44 | Foxboron | Is there any lists of Clojure keywords and/or libraries? available? |
| 10:44 | no7hing | maybe the cheat sheet? http://clojure.org/cheatsheet |
| 10:44 | no7hing | it's probably not comprehensive though |
| 10:45 | dnolen | Foxboron: http://www.clojure-toolbox.com |
| 10:45 | dnolen | Foxboron: and I recommend the cheatsheet |
| 10:45 | no7hing | now this looks comprehensive: http://clojure.github.com/clojure/ |
| 10:46 | Foxboron | dnolen: the problem with the cheatsheet is that, there are functions there also. Making a little auto-completion for Sublime. Also a list of Errors or whatnot would be awsome. |
| 10:47 | nDuff | Foxboron: Hmm. Going to be hard to compete with autocompletion on emacs (communicating over nrepl to see what's actually defined in active namespaces in practice). |
| 10:47 | JoeBeard | I'm about to setup a lubuntu VM to use with Clojure+NRepl+Emacs. Is there any advantage to use either 32bit or 64bit? |
| 10:48 | Foxboron | nDuff: yes i know. But its better then nothing ^^ |
| 10:48 | nDuff | JoeBeard: How much memory are you going to allocate it? |
| 10:48 | Foxboron | nDuff: allready been maintaining function snippets for Clojure along with a lein build file. Just expanding it while i am fixing a few things. |
| 10:49 | JoeBeard | It's sitting on an 8GB host, so somewhere in the 2-4GB range. What's ideal? |
| 10:49 | nDuff | JoeBeard: If it's a large VM, make it a 64-bit system -- then you'll be able to have apps efficiently address within it. If it's a small one, 32-bit -- code size is that much smaller, and you don't need the address space if you aren't going to allocate much RAM. |
| 10:49 | nDuff | JoeBeard: 2GB is small enough to be fine 32-bit. 4GB is where I'd probably make it 64-bit. |
| 10:50 | JoeBeard | nDuff: Any issues of library availability on both platforms? Or is memory the only concern? |
| 10:51 | nDuff | JoeBeard: No library availability issues relevant. |
| 10:51 | JoeBeard | I'd also like to play with ClojureScript later. Any issues there? |
| 10:51 | nDuff | JoeBeard: ...it's just a tradeoff between performance, memory efficiency and addressable space. |
| 10:52 | nDuff | (actually, your library availability is going to be better with a 64-bit OS install, since you can install 32-bit apps there). |
| 10:52 | JoeBeard | nDuff: yup, thanks. Just wanted to make sure there were not any Clojure-specific gotchas. |
| 11:01 | gfredericks | is there a better name for (fn map-nested [m k f] (update-in m [k] #(map f %)))? |
| 11:01 | gfredericks | maybe update-seq |
| 11:04 | TimMc | gfredericks: You're needing that pattern a lot? |
| 11:12 | gfredericks | TimMc: yep |
| 11:13 | arrdem | gfredericks: maybe (update-by-map obj path fn & args)? |
| 11:13 | gfredericks | I was also looking at adding the & args at the end |
| 11:13 | gfredericks | update-by-map sounds reasonable |
| 11:13 | gfredericks | or maybe update-map |
| 11:14 | arrdem | I toyed with update-map.. but it seems confusing since it's intended to be applied to a map the fact that (map) is used in the update isn't clear |
| 11:15 | gfredericks | hmm |
| 11:16 | arrdem | ,(doc partial) |
| 11:16 | clojurebot | "([f arg1] [f arg1 arg2] [f arg1 arg2 arg3] [f arg1 arg2 arg3 & ...]); Takes a function f and fewer than the normal arguments to f, and returns a fn that takes a variable number of additional args. When called, the returned function calls f with args + additional args." |
| 11:17 | arrdem | (defn update-by-map [obj path update-fn & args] |
| 11:17 | arrdem | (update-in obj path |
| 11:17 | arrdem | (fn [obj] |
| 11:17 | arrdem | (map (apply partial (cons update-fn args)) |
| 11:17 | arrdem | obj)))) |
| 11:17 | arrdem | I think |
| 11:18 | gfredericks | I don't think you can use partial there |
| 11:19 | arrdem | the (con) is probably wrong, but I think that partial is applicable. lemme kick off a repl and try. |
| 11:19 | gfredericks | the assumption is that the first arg to the update-fn is an element of the seq |
| 11:19 | gfredericks | you need some sort of butfirst-partial |
| 11:21 | clgv | gfredericks: how about `(partial map update-fn)` |
| 11:22 | gfredericks | clgv: as a replacement for update-by-map? |
| 11:22 | gfredericks | (update-in m [k] (partial map update-fn))? |
| 11:22 | clgv | yeah that will work |
| 11:22 | gfredericks | yeah I knew that was possible |
| 11:23 | gfredericks | I've got like 15 instances of this in my code so it seems worth having its own thing for it |
| 11:23 | arrdem | passes my test case... |
| 11:23 | arrdem | (inc clgv) |
| 11:23 | lazybot | ⇒ 5 |
| 11:23 | clgv | gfredericks: do they all have more similar semantic? that could help with naming it |
| 11:24 | gfredericks | the semantics are that my dataset has sequences under particular keys and I want to transform the elements in the sequence |
| 11:24 | clgv | for example if those were organization maps that assign jobs to worker, they could be called update-job-queue or similar |
| 11:25 | gfredericks | ah gotcha |
| 11:25 | gfredericks | no I don't think so |
| 11:25 | clgv | damn |
| 11:29 | zby | cemerick - I was thinking about adding the remember-me? from your TODO - but I don't see how this can be done without using the session wrapper inside friend code - do you have any plans about it? |
| 11:30 | z3phyr | anybody tried joxa? |
| 11:32 | clgv | z3phyr: looks very clojure-y - I think it was mentioned here a few times already |
| 11:33 | z3phyr | clgv the best thing about it is - Its self hosted from the start. and clojure is still seeking clojure in clojure |
| 11:34 | clgv | z3phyr: I think that's hardly an argument to convince me to use it ;) |
| 11:36 | marcellus123 | I asked this a few hours ago, but anyone know what I'm doing wrong here in my attempt to extend a protocol from core.cljs? turns out i AM using a correct version of cljs (I thought that this was the issue before but nope) |
| 11:37 | z3phyr | clgv I am talking about the language itself. Really it's worth a try for a clojorian |
| 11:37 | marcellus123 | https://www.refheap.com/paste/9047 |
| 11:37 | z3phyr | One could learn from a clojure with scheme like simplicity - that's Joxa |
| 11:37 | marcellus123 | (doseq should be for) |
| 11:37 | lucian | clgv: it's stopping me from trying clojurescript more seriously, though :) |
| 11:39 | lucian | every time i try to build something in it i am reminded how extremely annoying the jvm is |
| 11:39 | TimMc | z3phyr: Too many parens. :-P |
| 11:42 | z3phyr | TimMc Its a lisp ¡ |
| 11:43 | TimMc | z3phyr: I've gotten accustomed to the use of [] in Racket and Clojure. It makes the code more readable. I'm being picky, mind you, and more than slightly facetious. |
| 11:44 | z3phyr | TimMc [] {} makes code perlish to me. thats not a prob though. |
| 11:45 | TimMc | Perl-ish? You ain't seen nothin' yet. |
| 11:45 | TimMc | ~rest |
| 11:45 | clojurebot | rest is easy to write without alphanumerics: https://www.refheap.com/paste/5980 |
| 11:46 | TimMc | (scroll to the bottom) |
| 11:47 | clgv | TimMc: you were bored? :P |
| 11:47 | gfredericks | TimMc is the curator of swearjure |
| 11:47 | hyPiRion | He's the Rich Hickey for obfuscators. |
| 11:47 | hyPiRion | /s/for/of/ |
| 11:48 | gfredericks | anybody who wants to contribute to swearjure has to have signed TimMc's swearjure CA |
| 11:48 | gfredericks | he accepts patches on dev.swearjure.org/jira |
| 11:48 | hyPiRion | oh swearjure.org |
| 11:49 | hyPiRion | hahah, not taken |
| 11:49 | hyPiRion | TimMc: What are you waiting for? |
| 11:50 | clgv | TimMc: compile that to disk^^ how many java classes do you get? ;) |
| 11:51 | clgv | I am guessing 7 |
| 11:51 | clgv | lol swearjure exists |
| 11:57 | hyPiRion | ~swearjure |
| 11:57 | clojurebot | Swearjure is http://hypirion.com/swearjure |
| 11:58 | technomancy | josteink: let me know how it works for you =) |
| 12:12 | TimMc | clgv: "Bored" wouldn't quite be the right word for it. |
| 12:12 | seangrove | TimMc: Deeply angry with the world, and wanting to inflict suffering? |
| 12:13 | seangrove | What if some poor misguided soul read hyPiRion's post and thought, "Oh, this looks good for production?" |
| 12:13 | seangrove | Irresponsible with your great powers... |
| 12:13 | hiredman | dnolen: turns out to be my fault because I am using a copy of the defc macro without qualifying ::subst correctly |
| 12:14 | clgv | TimMc: what is the right word? |
| 12:15 | hiredman | I am attaching metadata to the reified constraint and when available using that to help generate a rest api call from a goal |
| 12:15 | TimMc | seangrove: What have I done?! |
| 12:17 | TimMc | clgv: Not sure there's a word for it, actually. Whimsical + hacker-minded (wanting to explore the boundaries of a system). |
| 12:17 | TimMc | Also wanting to make a monstrosity, in the manner of a mad scientist. |
| 12:17 | clgv | TimMc: so I'd go with "frankensteined" ;) |
| 12:19 | hyPiRion | seangrove: Then I have lived enough to see myself become the villain. |
| 12:20 | hyPiRion | long enough. |
| 12:20 | clgv | hyPiRion: well, then choose a proper lair ;) |
| 12:22 | hyPiRion | Isn't the "oh, even Clojure can be ugly" a perfect lair for a villain? That must be the most evil villain ever. |
| 12:23 | ravster | heloo everyone |
| 12:46 | seangrove | technomancy: Would you compare Pulse to riemann at all? |
| 12:46 | seangrove | Or do they serve completely different purposes? |
| 12:47 | dnolen | hiredman: gotcha - still would that namespaced keyword in defc resolve correctly - it seemed suspicious to me. |
| 12:47 | technomancy | seangrove: I haven't looked at riemann in detail, but it looks similar. probably better. |
| 12:47 | dysoco | What would you suggest as learning resource for someone who is new to Clojure and relatively new to the LISPs ? (I have used a little Scheme with SCIP, but not too much), I read good things about The Joy of Clojure but it doesn't look like an introductory article. |
| 12:47 | clojurebot | c'est bon! |
| 12:48 | craigbro | dysoco: i think it works as ne |
| 12:48 | dysoco | "as ne" ? |
| 12:48 | craigbro | dysoco: as an intro that is |
| 12:48 | dysoco | ah I see |
| 12:48 | hyPiRion | dysoco: http://www.clojurebook.com/ |
| 12:48 | dysoco | I'll take a look at clojure.org/getting_started |
| 12:48 | no7hing | i can recommend both joy of clojure and clojure in action |
| 12:49 | loganlinn | anybody aware of (command line) tools for renaming/moving namespaces? like a fancy search&replace. |
| 12:49 | hyPiRion | That's what recommend, I would not recommend Joy of Clojure as an intro to Lisp and Clojure. |
| 12:49 | technomancy | seangrove: pulse is being decommissioned in favour of https://github.com/ryandotsmith/l2met which is less flexible but dramatically simpler in that there is no server-side configuration; you change your metrics by changing the format of your logging. |
| 12:49 | hyPiRion | It's a great book, but not for learning Clojure. |
| 12:49 | dysoco | thanks then, I'll take a look at that one. |
| 12:50 | dysoco | and if I like Clojure I might read The Joy of Clojure later. |
| 12:50 | loganlinn | +1 for Joy of Clojure |
| 12:50 | dysoco | btw, what do you use as Editor/IDE? I'm more of an Emacs guy I assume you use that. |
| 12:50 | ejackson | "Clojure Programming" is all you need @clojurebook |
| 12:50 | technomancy | seangrove: I think consuming the log stream is a much better way to go vs having a specific event server, but if you don't already have good logging infrastructure in place it can be challenging |
| 12:50 | hiredman | dnolen: yeah, just fixing the namespacing on the keyword in my copy of the macro made it work |
| 12:51 | hyPiRion | dysoco: Well then, if you're using emacs then that's a plus because most tools are emacs tools. |
| 12:51 | bizarrefish | I gots to get my head around emacs... *sighs* . It's so freaking cool, but I seem to be pushing some kind of key combination memorization limit D: |
| 12:51 | hiredman | dnolen: so the reason you could not reproduce is the defc I was using was in a namespace that is not clojure.core.logic |
| 12:52 | hiredman | bizarrefish: I find myself using M-x with smex-mode more often then trying to remember key combos |
| 12:53 | hiredman | smex-mode gives ido style completeion to M-x commands |
| 12:53 | bizarrefish | smex mode...guess I should googles that |
| 12:53 | hiredman | makes it easy to discover commands |
| 12:53 | dysoco | I just find Emacs a pain to configure, your init.el file grows and then you have more than one file and it's a mess. |
| 12:54 | pisketti | dysoco: emacs-live saves the day |
| 12:54 | dysoco | I guess I'm starting clean now, and will try to configure it cleaner |
| 12:55 | technomancy | actually splitting things among multiple files in Emacs Lisp is substantially simpler than in Clojure |
| 12:55 | pisketti | I used to have my own configurations but after switching to emacs-live, I've never looked back |
| 12:55 | pisketti | especially for Clojure |
| 12:56 | technomancy | I recommend adding in third-party functionality slowly so you can have a chance to understand it in case it doesn't work as you expect. |
| 12:56 | pisketti | The "pack" concept makes it straight-forward to make your own configurations |
| 12:59 | pisketti | technomancy: I guessthat's true if you are willing to learn emacs inside out (and that is respectable goal) |
| 13:00 | technomancy | well, even if you just want to debug some behaviour you don't like |
| 13:00 | technomancy | if you dump a bunch of stuff in at once it can be much more difficult to track down the problem |
| 13:00 | technomancy | (speaking from experience with the starter kit) |
| 13:01 | dnolen | hiredman: yes, what I meant was more a question about general rule of thumb when writing macros |
| 13:02 | dnolen | hiredman: i.e. don't put :: keywords in them |
| 13:04 | jweiss | are there any graph libraries for clojure (as in replacements for clojure.contrib.graph)? i'm looking for functions to detect loops, give the path from one node to another, etc |
| 13:05 | dnolen | hiredman: and I was trying to see if you agreed w/ that principle :) |
| 13:08 | bosie | anyone can give me a tip why this happens with leiningen www.refheap.com/paste/7867/raw |
| 13:08 | bosie | when i try to compile/run it |
| 13:11 | dobladez | bosie: your namespace declaration is probably wrong |
| 13:12 | bosie | dobladez: i only have one file that has (ns blah-blah.core) |
| 13:12 | bosie | (ns blah_blah.core) actually |
| 13:13 | bosie | and project.clj has ":main blah_blah.core" |
| 13:13 | dobladez | _ should be - |
| 13:14 | bosie | that was it |
| 13:17 | bosie | dobladez: thx |
| 13:20 | pisketti | technomancy: 100% agreed. It's just it's a lot easier to start with a fully functional setup. |
| 13:21 | seangrove | technomancy: In your case, are you talking about something like logplex? |
| 13:21 | technomancy | seangrove: yeah |
| 13:22 | technomancy | setting up a separate event stream for human-readable stuff vs machine-readable stats isn't ideal IMO |
| 13:23 | technomancy | (but if you don't have a proper log stream that shouldn't stop you from setting up an event stream) |
| 13:23 | seangrove | What constitues a 'proper log stream'? Just logging off to a service that stores it? |
| 13:24 | seangrove | Having namespaced-logs...? |
| 13:24 | technomancy | seangrove: mostly just treating logs as a unified stream rather than a bunch of files sitting somewhere |
| 13:24 | technomancy | k/v pairs helps but isn't necessary |
| 13:41 | ChongLi | speaking of keys |
| 13:41 | ChongLi | how'd that key signing party at the conj go? |
| 13:42 | ChongLi | I just finished watching your talk on leiningen 2 |
| 13:42 | technomancy | oh man, the one where I was wracked by disease? =\ |
| 13:42 | ChongLi | yeah |
| 13:43 | ChongLi | it's extremely important for that web of trust to get built up |
| 13:43 | technomancy | ChongLi: it took all I had to make it through the talk; didn't have it in me to organize much beyond that =\ |
| 13:44 | ChongLi | perhaps eventually you'll turn on requiring signed and trusted deps by default? |
| 13:44 | technomancy | ChongLi: that's the idea behind the clojars releases repo |
| 13:44 | technomancy | unfortunately that turned out to be more work than expected, so we pushed it off beyond the lein 2.0.0 final release |
| 13:44 | ChongLi | that's fine |
| 13:45 | ChongLi | can't let feature creep dominate |
| 13:45 | ChongLi | the one question I have about the web of trust is this: |
| 13:45 | technomancy | so in lein3 signed deps will be required by default and limiting it to trusted deps will hopefully be easy to enable |
| 13:45 | ChongLi | what if the attacker also redirects the DNS for the key server |
| 13:46 | ChongLi | and re-creates a fake web of trust? |
| 13:46 | technomancy | that's why you have to verify the fingerprint in-person |
| 13:47 | technomancy | you can't just sign keys you get from the Internet without a face-to-face connection |
| 13:47 | ChongLi | right, I get that part |
| 13:47 | ChongLi | but this fake web of trust would be accompanied by a fake repo that mirrors everything |
| 13:48 | technomancy | if you get fake keys from a hostile key server they won't match up with the signatures you have locally |
| 13:48 | ChongLi | ahhh |
| 13:48 | ChongLi | so even a fresh leiningen install will be able to verify that? |
| 13:48 | technomancy | it'd be gpg's job rather than lein, but yeah |
| 13:49 | ChongLi | so the only real way to compromise it then would be to attack a user who had no local keys |
| 13:49 | technomancy | right; if you don't have a link into the web of trust you have no reason to trust it |
| 13:50 | ChongLi | although I suppose that's where we bring in help from the user's package manager |
| 13:50 | ChongLi | have a leiningen package on the repo that's trusted by their package manager |
| 13:50 | pjstadig | you don't have to trust any packages |
| 13:50 | ChongLi | and then you have an unbroken link; assuming the user's operating system is not compromised |
| 13:51 | pjstadig | you trust a key that you've verified in person, or some key in that transitive web of trust |
| 13:51 | technomancy | yeah, you could have apt-get bring in something since it has to be trusted implicitly. I haven't thought that angle through much myself |
| 13:51 | pjstadig | anything you download you verify against your web of trust |
| 13:51 | ChongLi | pjstadig: not every new clojure user will have met someone in person |
| 13:53 | gfredericks | 40% of all clojure users have never met another human |
| 13:53 | ChongLi | it seems reasonable that the source of trust might come from the same place the user got their JVM |
| 13:53 | pjstadig | gfredericks: i don't trust you until i've met you in person |
| 13:53 | arcatan | in fact, 23% of all clojure users are robots |
| 13:54 | pjstadig | ChongLi: i don't see how that would work |
| 13:55 | pjstadig | you would distribute a default WoT with leiningen that people would import into gpg? |
| 13:55 | ChongLi | people would have to trust wherever they got leiningen from |
| 13:55 | dnolen | so Java is GitHub lang #3 |
| 13:55 | pjstadig | the way gpg's WoT works *you* have to decide which keys you trust |
| 13:55 | gfredericks | dnolen: by project count or LoC? :) |
| 13:56 | SegFaultAX | dnolen: That's not really surprising, is it? |
| 13:56 | pjstadig | ChongLi: right, but for gpg to verify a jar you download from clojars you have to determine whether you trust the key with which that jar was signed |
| 13:56 | ChongLi | gfredericks: either way isn't a very accurate measure |
| 13:56 | technomancy | pjstadig: but you have to trust gpg itself as well as whatever source from which you obtained it. |
| 13:56 | pjstadig | sure |
| 13:56 | pjstadig | but that's not enough |
| 13:56 | pjstadig | you also need your own WoT |
| 13:56 | SegFaultAX | dnolen: (Also, I picked up the Reasoned Schemer this morning. Datomic has finally convinced me to learn logic programming properly) |
| 13:57 | technomancy | pjstadig: sure, it's just a matter of seeding it |
| 13:57 | ChongLi | I want to get the reasoned schemer as well |
| 13:57 | SegFaultAX | ChongLi: Can I make a suggestion? |
| 13:57 | dnolen | SegFaultAX: well it's taken some time for the popularity of GitHub to adjust to real world lang usage. |
| 13:57 | ChongLi | I'm leery of the ebook though; from what I heard it was bad |
| 13:58 | ChongLi | SegFaultAX: yes |
| 13:58 | dnolen | ChongLi: yes just get the paperback |
| 13:58 | technomancy | wow, when did JS beat Ruby? |
| 13:58 | SegFaultAX | ChongLi: DO NOT buy the kindle version. |
| 13:58 | dnolen | SegFaultAX: cool, tho Datalog & Prolog style Logic Programming is quite different. |
| 13:58 | pjstadig | technomancy: where "seeding it" could mean verifying a key in person, or importing someone else's WoT |
| 13:58 | dnolen | technomancy: probably a year ago |
| 13:58 | SegFaultAX | I regret that decision so much. |
| 13:58 | SegFaultAX | It's just impossible to read. |
| 13:58 | SegFaultAX | The text doesn't resize, and it's absolutely tiny. |
| 13:58 | ChongLi | that's a real shame |
| 13:59 | dnolen | Clojure's #23 which seems about right - tho 2 of the top watched Java repos are Clojure projects |
| 13:59 | technomancy | wow, things are really shaken up |
| 13:59 | ChongLi | it sounds like they ran it through one of those utilities that screenshots every page of a pdf or something |
| 13:59 | SegFaultAX | ChongLi: I think it's partially because of the format. It's more like a dialog with an unseen teacher. |
| 13:59 | technomancy | elisp used to be #11, and it dropped to #17 |
| 13:59 | technomancy | I wonder if they changed how it's calculated |
| 13:59 | ChongLi | technomancy: I thought the same |
| 13:59 | dnolen | technomancy: they have and not always for the better. Prolog is inexplicalby at #20 or something |
| 14:00 | SegFaultAX | dnolen: Of course. But I figure if I can at least understand miniKanren, that's probably more than enough to be effective with eg Datalog. |
| 14:00 | ChongLi | SegFaultAX: sounds interesting |
| 14:00 | SegFaultAX | dnolen: Not that Datalog is particularly complex. |
| 14:00 | SegFaultAX | dnolen: I'm only on the second chapter, but I'm having a hard time wrapping my mind around how unification must be implemented. |
| 14:01 | SegFaultAX | ChongLi: It's great. Except impossible to read on my Kindle Touch. :( |
| 14:01 | ChongLi | SegFaultAX: do you read a lot of academic papers on your kindle? |
| 14:01 | dnolen | SegFaultAX: recursive decent + updating / checking a map of known bindings |
| 14:01 | SegFaultAX | ChongLi: Almost never. |
| 14:01 | ChongLi | ah, I've been investigating different methods of converting them to fit |
| 14:02 | ChongLi | 2-column papers are problematic |
| 14:02 | SegFaultAX | dnolen: Is unification the most complicated operator? |
| 14:02 | bawr | ChongLi: if you find one that works, do tell |
| 14:02 | SegFaultAX | ChongLi: I always keep them in their source format and read them on my laptop. It's not worth trying to make it work on a kindle. |
| 14:02 | ChongLi | I tried amazon's conversion service and it seemed to work pretty well |
| 14:02 | bawr | SegFaultAX: not reallt, at least naive unification |
| 14:02 | ChongLi | it converted it to a single column with proper justification |
| 14:02 | dnolen | SegFaultAX: no unification is actually pretty easy to understand. the monadic search is way more of a brain teaser IMO |
| 14:03 | ChongLi | you email it to your_id@free.kindle.com |
| 14:03 | dnolen | SegFaultAX: the book fully explains the unification bits |
| 14:03 | SegFaultAX | dnolen: I'll hold off on asking about that until I get a little further along with miniKanren. :) |
| 14:03 | ChongLi | and make sure the subject line is convert |
| 14:03 | dnolen | SegFaultAX: and had waves the monadic search |
| 14:03 | dnolen | hand waves |
| 14:03 | ChongLi | I'm also going to try kindlegen |
| 14:03 | ChongLi | not sure if it's the same tool they run on their server or not |
| 14:04 | bawr | ChongLi: oh, that's pretty cool, didn't know about that |
| 14:04 | ChongLi | I'm about to dig into the flapjax paper |
| 14:04 | SegFaultAX | dnolen: Is the Datalog implementation used in Datomic open source? |
| 14:05 | ChongLi | I just got so sick of writing imperative event handling code |
| 14:05 | SegFaultAX | ChongLi: Link? |
| 14:05 | dnolen | SegFaultAX: it is not |
| 14:05 | ChongLi | http://www.cs.brown.edu/~sk/Publications/Papers/Published/mgbcgbk-flapjax/ |
| 14:06 | SegFaultAX | dnolen: Bummer. :/ Can core.logic do everything that Datalog can do? |
| 14:06 | dnolen | SegFaultAX: they have radically different goals - so only in a trivial sense. |
| 14:07 | SegFaultAX | dnolen: Would you mind expanding on that a little for me? I'm pretty new to the idea of logic programming. |
| 14:07 | dnolen | SegFaultAX: Datalog is set oriented so ideal for queries against something on disk. core.logic is tuple oriented, supports constraints, and can "generate" data. |
| 14:07 | AimHere | We live in a world where turing completeness is now trivial |
| 14:08 | Apage43 | wait did i hear something about de-double-columnizing academing papers for kindle |
| 14:08 | ChongLi | Apage43: yeah |
| 14:08 | Apage43 | *academic |
| 14:08 | SegFaultAX | dnolen: Does that imply that core.logic can do /at least/ everything that Datalog can do? |
| 14:08 | Apage43 | I would be all over that |
| 14:08 | ChongLi | email to your_id@free.kindle.com subject: convert |
| 14:08 | Apage43 | ah, and it'll do the magic? I gotta try this |
| 14:09 | ChongLi | it isn't perfect, but it's pretty good |
| 14:09 | dnolen | SegFaultAX: it can but it's not ideal - core.logic doesn't manipulate sets |
| 14:09 | dnolen | it works on one piece of data at a time |
| 14:09 | DigitalJack | ChongLi: don't you have to add the email address to "acceptable senders" list first? |
| 14:09 | SegFaultAX | dnolen: Ah, I see. |
| 14:10 | DigitalJack | as a spam prevention mechanism |
| 14:10 | ChongLi | DigitalJack: whatever your sending address is, yes |
| 14:10 | ChongLi | nobody can send stuff to your kindle unless they're on that list |
| 14:10 | ChongLi | and I'm pretty sure they verify the domain with SPF |
| 14:13 | ChongLi | I wonder if an attacker would ever be determined enough to show up at a conj impersonating someone in order to get their key signed |
| 14:24 | jsabeaudry | doseq that collects results? |
| 14:24 | jsabeaudry | or dotimes that ocllects results |
| 14:25 | dnolen | jsabeaudry: map or list comprehension (for) |
| 14:25 | jsabeaudry | dnolen, so (doall (for ...)) ? |
| 14:26 | dnolen | jsabeaudry: yes |
| 14:26 | jsabeaudry | dnolen, thanks! I was seraching for a (doall (for and couldnt find one! I can stop searching now :) |
| 14:29 | nathanic | hello folks, can anyone recommend a medium-sized clojure codebase (say on github) for an intermediate student of clojure? i'm looking for an example to show someone who knows the syntax but not how to design "clojurey" applications. |
| 14:33 | technomancy | nathanic: leiningen has some hairy bits, but it's an option. only about 3kloc. |
| 14:34 | technomancy | the leiningen-core/README.md file should give you a decent overview; start in leiningen.core.main/-main and go from there |
| 14:35 | nathanic | technomancy: hmm, i hadn't thought of lein, but that sounds very promising, particularly since it's such a useful tool. and it's something my friend has heard of. thanks! |
| 14:36 | technomancy | don't look too closely at the profile merge logic; it's intimidating |
| 14:37 | jcidaho | q about nrepl & nrepl.el - when output is being logged to the *nrepl-server* buffer it'd be nice to track the tail of the output - the cursor sticks to the tail of the output |
| 14:37 | jcidaho | ^ make sense? |
| 14:37 | jcidaho | this is the case with swank/slime |
| 14:37 | technomancy | jcidaho: yeah, that would be nice; not sure why it's not that way |
| 14:39 | jcidaho | k - I'm up for having a look - would've thought it's on someones hitlist |
| 14:49 | jballanc | memory fails me at the moment...I vaugely recall a Clojure tool to create DB seeds programmatically? |
| 14:49 | jballanc | anyone remember such a thing? |
| 15:15 | jsabeaudry | Is there a more idiomatic (let [r (something)] (dostuff) r) ? |
| 15:16 | Frozenlock | (do (dostuff) (something)) ? |
| 15:16 | nDuff | jsabeaudry: there's doto, but it's not quite for that use case. |
| 15:17 | amalloy | useful has (returning (dostuff) (something)), provided that you don't need r inside of dostuff |
| 15:17 | amalloy | er, i guess you wanted the opposite? anyway, whatever you put first gets returned |
| 15:18 | nathanic | jsabeaudry: it's not super mainstream, but you might enjoy the non-updating arrow from https://github.com/rplevy/swiss-arrows |
| 15:19 | jsabeaudry | amalloy, In what namespace can I find that? (clojure docs says swank.util ) |
| 15:20 | deg | Does Clojure have any issues running on OpenJDK? I'm rebuilding my dev environment, and am tempted to finally try OpenJDK instead of Oracle Java. |
| 15:20 | wink | anyone going to FOSDEM on the weekend? |
| 15:20 | jsabeaudry | deg, has been running flawlessly here |
| 15:20 | ChongLi | same here |
| 15:20 | amalloy | $google clojure useful github |
| 15:20 | lazybot | [flatland/useful · GitHub] https://github.com/flatland/useful |
| 15:21 | deg | jsabeaudry, ChongLi: Thanks, good to hear. Not to start an open-source or anti-Oracle flame war, but I'll be glad to move to open. |
| 15:21 | dbushenko | hi all |
| 15:22 | dbushenko | which is the best pattern matching library for clojure? |
| 15:22 | josteink | if Im trying to push something to heroku and it fails with something about nullpointer exceptions and failing to compile with profile production... |
| 15:22 | josteink | does that sound familar? |
| 15:22 | josteink | I did try to push it first, but tehn I saw it used lein 1.7, and only change I did was force it up to 2.0 |
| 15:22 | josteink | after that it failed |
| 15:22 | ChongLi | deg: haha, I don't think you'll find too many big supporters of oracle in here |
| 15:39 | wei_ | say there's a (def endpoint "/_fetch") in a library, and I wanted to change that def in my calls without modifying the library? would I be able to do that? |
| 15:39 | wei_ | (binding [endpoint "/my/_fetch"] …) doesn't seem to do it |
| 15:39 | ohpauleez | wei_: In shoreleave or fetch? |
| 15:40 | wei_ | yep. wanted to change the remote-uri |
| 15:40 | ohpauleez | hmm, that should definitely work |
| 15:40 | ohpauleez | (I've done it before on s prod system |
| 15:40 | ohpauleez | you have to change it on the client and the server |
| 15:40 | amalloy | uhm, if it's not declared dynamic... |
| 15:41 | ohpauleez | no it is |
| 15:41 | wei_ | binding works the same in cljs right? I'm getting a lot of cljs.main/remote-uri not declared ^:dynamic warnings |
| 15:41 | wei_ | ah, it's not declared dynamic in fetch |
| 15:41 | wei_ | https://github.com/ibdknox/fetch/blob/master/src/fetch/remotes.cljs |
| 15:42 | ohpauleez | On the ring handler (and in the latest Shoreleave on master) you specify a different endpoint at middleware setup time |
| 15:43 | ibdknox | I just set! it in fetch |
| 15:43 | ohpauleez | because he "don't give a f*%^&" |
| 15:43 | ohpauleez | :) |
| 15:44 | ibdknox | yep |
| 15:44 | ibdknox | lol |
| 15:44 | ivan | the Enfield logo is particularly clever http://blog.fogus.me/2013/01/21/enfield-a-programming-language-designed-for-pedagogy/ |
| 15:44 | ibdknox | in almost every case you really mean to say "I want the remote URL to be this at all times" |
| 15:44 | ivan | a good puzzle if you don't see it immediately and nobody spoils it ;) |
| 15:45 | wei_ | so ibdknox: (set! remote-uri "/my/_fetch") ? |
| 15:45 | wei_ | that doesn't seem to be working |
| 15:46 | ibdknox | (set! fetch.remotes/remote-uri "..") |
| 15:47 | technomancy | deg: leiningen is tested more or less exclusively on openjdk |
| 15:47 | wei_ | ibdknox: right. thanks! |
| 15:48 | technomancy | well, I guess some of the contributors test on macs which probably use oracle, but myself and most people pushing patches avoid oracle |
| 15:49 | technomancy | plus travis |
| 15:49 | rboyd | ivan: it appears to be a lambda tennis racquet. quite clever indeed! |
| 15:49 | rboyd | (I don't get it) |
| 15:50 | ivan | indeed. I had to sleep on it. |
| 15:50 | hyPiRion | hah, I didn't get it before you said it was a racquet. |
| 15:51 | rboyd | homage to racket the language? |
| 15:51 | rboyd | worst logo ever |
| 15:52 | ibdknox | rboyd: at the end he says he's describing racket |
| 15:53 | mybuddymichael | Anyone here using emacs-live on a Mac? |
| 15:54 | rboyd | oic |
| 15:57 | Frozenlock | Is it normal that clojure.string/split in cljs accepts a string as the separator, but accepts only a regexp in clj? |
| 16:03 | Phonatacid | oh hi. I'm trying to print laaarge data to files using the '*print-dup* true' binding (actually i'm serializing the data). But I want to be able to interrupt the process whenever i want. So I thought I'd subclass FileWriter and override the write method and check the thread's interrupted state every 1000 char/byte or so. But I'm not sure which method(s) I should override. The char[] one or the String one ? The code I'm |
| 16:03 | Phonatacid | using is very similar to that one : http://clojuredocs.org/clojure_core/clojure.core/*print-dup* |
| 16:04 | nDuff | Phonatacid: If you're using a BufferedWriter to map your Writer, you can afford to check more frequently... maybe even every call. |
| 16:05 | nDuff | Phonatacid: ...and given as the writer interface only has one virtual method, it's obvious what needs to be implemented. :) |
| 16:07 | dnolen | Frozenlock: probably just an oversight |
| 16:08 | Frozenlock | dnolen: Does this mean I should make sure I use a regexp instead of a string? |
| 16:11 | dnolen | Frozenlock: if you want to future proof your code so it works in both places yes. |
| 16:13 | Frozenlock | dnolen: Noted, thank you very much. |
| 16:19 | dyreshark | is there a function that can be used to make something a seqable object if it's not already? |
| 16:19 | dyreshark | i.e. it turns [1] -> [1], or 1 -> [1] |
| 16:20 | AimHere | Isn't seqable a protocol you can just extend? |
| 16:21 | tomoj | not on the jvm |
| 16:21 | technomancy | it's not, but even if it were you shouldn't extend protocols you don't own to types you don't own |
| 16:22 | AimHere | You shouldn't? There's been more than a few evangelical blogs touting that as a selling point of clojure! |
| 16:22 | ibdknox | ,(let [x 1] (if (coll? x) x [x])) |
| 16:22 | clojurebot | [1] |
| 16:22 | technomancy | AimHere: blogs! blogs will always mislead you. |
| 16:22 | ibdknox | ,(let [x [1 2 3]] (if (coll? x) x [x])) |
| 16:22 | clojurebot | [1 2 3] |
| 16:22 | tomoj | also, seq works on Seqable, null, Iterable, arrays, String, Map.. |
| 16:22 | technomancy | dyreshark: useful has a "fix" function that generalizes that pattern |
| 16:22 | ohpauleez | AimHere: I think it's ok if you REALLLY know what you're doing. It is indeed one of the selling points of protocols. But the protocol needs to be very well specified |
| 16:23 | ohpauleez | essentially it amounts to system safe monkey-patching |
| 16:23 | ohpauleez | and yes, one of the selling points - because it's there when you need it, and it's not broken like most common solutions in that space |
| 16:24 | tomoj | it's not safe if you don't own either the protocol or the type |
| 16:24 | dyreshark | technomancy: ibdknox: thanks |
| 16:24 | nDuff | AimHere: Extending protocols you don't own to types you do own is useful. Extending protocols you do own to types you don't own is useful. Are you sure the blogs you were reading weren't touting either of those things? |
| 16:24 | nDuff | s/useful/useful and sane/g |
| 16:25 | nDuff | ...except when I'm taking ownership of one or the other, ie. writing a Clojure library for $FOO |
| 16:25 | AimHere | I seem to recall the point was that if you owned the protocols or the types, then it wasn't vastly more impressive than what people did already in object orientated languages |
| 16:26 | AimHere | But my memory is hazy on these things |
| 16:26 | technomancy | AimHere: also: evangelistic blogs are especially untrustworthy |
| 16:26 | technomancy | even more so that blogs in general I mean |
| 16:26 | AimHere | Not like IRC, which is the fount of all wisdom! |
| 16:26 | technomancy | now you're getting it! =D |
| 16:26 | tomoj | "impressive" means like "ooh look a regex is a function now wow!"? |
| 16:27 | tomoj | I probably don't understand the point :) |
| 16:27 | technomancy | tomoj: dammit... that's the one thing I really wish protocols could offer, but they don't. =( |
| 16:27 | ibdknox | are there many evangelical clojure blogs? |
| 16:27 | tomoj | well, IFn isn't a protocol, so that's unfair :) |
| 16:27 | ibdknox | it works in CLJS, at least :) |
| 16:28 | technomancy | tomoj: never will be on the JVM, according to rich |
| 16:28 | ohpauleez | I know, that's one of the best part of CLJS |
| 16:28 | ibdknox | err evangelistic rather |
| 16:28 | tomoj | oh? why not |
| 16:28 | ohpauleez | IFn, count, all the things you want to be protocols |
| 16:28 | technomancy | because hotspot can't inline it away |
| 16:28 | tomoj | ouch |
| 16:29 | ohpauleez | AimHere - it's ala carte polymorphism, which other OO languages have, but it's often conflated with half implemented classes ala mixins |
| 16:30 | ohpauleez | What you get is fast generic dispatch based on type, and participation into an abstraction |
| 16:30 | ohpauleez | protocols allow you to participate in abstractions |
| 16:30 | ohpauleez | to that degree I think you should define and extend whatever protocols make sense, and allow you to program to the interface (the abstraction/the protocol) |
| 16:30 | weavejester | I've been considering writing a library of protocols around common database patterns. |
| 16:31 | weavejester | But I'm not sure if it's a good idea yet. |
| 16:31 | ohpauleez | it definitely could be, but it's unclear if you'd just be reimplementing JDBC's interface |
| 16:31 | weavejester | I was thinking something like... |
| 16:32 | weavejester | KeyValue protocol. LexicalOrdering protocol. etc. |
| 16:32 | weavejester | So S3 would be a key-value store with lexical ordering of keys. |
| 16:32 | weavejester | For example. |
| 16:32 | ohpauleez | that would definitely be cool - it'd make writing and composing services a lot easier |
| 16:33 | weavejester | Yes, assuming I can pigeonhole functionality effectively. The devil might be in the details. |
| 16:33 | ohpauleez | for sure |
| 16:33 | ohpauleez | I just created all the protocols for the Leap Motion |
| 16:34 | weavejester | But I'd like to be able to say, "I want a hierarchical data store for comments", and not have to care about the implementation so much. |
| 16:34 | weavejester | Leap Motion? |
| 16:34 | weavejester | Ohhh |
| 16:34 | weavejester | That thing. What's it like? |
| 16:34 | ohpauleez | https://github.com/shoreleave/shoreleave-baseline/blob/master/src/shoreleave/remotes/http_rpc.cljs |
| 16:34 | ohpauleez | whoops |
| 16:34 | ohpauleez | wrong url |
| 16:34 | Raynes | It's like unfair because ohpauleez has his and I don't have mine. |
| 16:34 | ohpauleez | https://leapmotion.com/ |
| 16:35 | ohpauleez | It's a total blast, but no one has taken the path that I've taken |
| 16:35 | ohpauleez | which is to extend the API with better predicates and ways to compose it together |
| 16:35 | filipncs | There are no math functions in clojure itself from 1.4, right? I need to pull in clojure.math.numeric-tower as an external dependency? |
| 16:35 | weavejester | Perhaps I'll call the library databstract |
| 16:35 | ohpauleez | and what naturally fell out was: smaller code size, and gestures |
| 16:35 | ibdknox | haha |
| 16:35 | ohpauleez | which seems so obvious to me haha |
| 16:36 | Raynes | ohpauleez: I just want to point at shit. |
| 16:36 | ibdknox | the clojure way = wrap APIs in composable data/fns :p |
| 16:36 | ibdknox | so they suck less. |
| 16:36 | ohpauleez | exactly |
| 16:37 | ohpauleez | literally my first weekend was a lot of, "Well this should just be a map - this should just take kw args, this needs a default. Really… this is a protocol" |
| 16:37 | ohpauleez | And now what takes people a mountain of bad C++ takes me 18 lines: https://github.com/ohpauleez/clojure-leap/blob/master/src/clojure_leap/example/higher_hand.clj |
| 16:38 | ibdknox | are you working with them to refine the API? |
| 16:38 | ohpauleez | yeah |
| 16:38 | ohpauleez | I just got a message offline, because I jumped in on gestures before they announced them |
| 16:38 | ohpauleez | so the next SDK should include some of them out of the box |
| 16:39 | ibdknox | ah |
| 16:39 | ohpauleez | also, because of JNI, casting up has TERRIBLE consequences (like loosing .equals and .hashCode functionality) |
| 16:39 | ohpauleez | so I have hacks in place around that |
| 16:39 | ibdknox | it's not clear to me what I'd do with one of these |
| 16:39 | ibdknox | barring some sort of 3d projection |
| 16:39 | ohpauleez | Remember when you only had a mouse? You were limited to single-point two dimensions |
| 16:40 | ohpauleez | then multi-touch touchpads came along |
| 16:40 | ohpauleez | and you were like, right this makes sense |
| 16:40 | ibdknox | hands held out in front of you in air are incredibly inaccurate |
| 16:40 | ohpauleez | I naturally want to interact and grow my "vocabulary" - I want more expression |
| 16:40 | ohpauleez | and now we're just adding a third dimension |
| 16:40 | Raynes | ibdknox: I want to use it as a pointing device because I'm a masochist. |
| 16:41 | ohpauleez | ibdknox: it's INSANELY accurate |
| 16:41 | ibdknox | that's not what I'm commenting on :) |
| 16:41 | ibdknox | *we* are inaccurate |
| 16:41 | ohpauleez | My experience has been different - but it also takes a little but of "living in the future" |
| 16:42 | ohpauleez | all of the obvious things are mostly bad ideas |
| 16:42 | technomancy | right, like a big problem with touch screens is that fingers are just beefy compared to mouse pointers. |
| 16:42 | ibdknox | yeah, that's why I said I have a hard time seeing what I'd use it for :) |
| 16:42 | ohpauleez | the exception - I can pinch windows from one monitor and move them in front of me very fast |
| 16:42 | ohpauleez | ala Minority report |
| 16:42 | ibdknox | haha |
| 16:42 | ohpauleez | haha |
| 16:43 | ohpauleez | gaming has been kind of fun with it |
| 16:43 | ibdknox | what kind of games? |
| 16:43 | ohpauleez | Killing Floor |
| 16:43 | Raynes | I'm prepared to play Doom 3 with it. |
| 16:43 | ohpauleez | and I watched someone's flight sim |
| 16:43 | Raynes | So I can slap myself in the face trying to turn around and run screaming. |
| 16:44 | ibdknox | Raynes: I ordered the oculus which comes with doom 3 whenever the KS ships |
| 16:44 | Raynes | Oh God. |
| 16:44 | ibdknox | I was curious if there's something neat I could do in LT with it |
| 16:44 | ohpauleez | Raynes: The novelty might wear off - the trick is to think about what you do with your body when you play |
| 16:44 | ohpauleez | the Leap can pick up your head and nose |
| 16:44 | Raynes | I've barely tolerated that game on a television. I'll explode into horrified bits if I played that thing with goggles. |
| 16:44 | ohpauleez | so you can map "crouching" t something |
| 16:45 | ohpauleez | it also is a little *too* sensitive sometimes - it'll pick up the cord to the earbuds and stuff |
| 16:45 | ohpauleez | the beer bottle |
| 16:45 | ohpauleez | etc |
| 16:45 | ohpauleez | … back to protocols :) |
| 16:46 | Raynes | If it sees me holding a beer bottle will it report me to the authorities? |
| 16:46 | ibdknox | Raynes: he's adding it to the API right now. |
| 16:46 | Raynes | Damn. |
| 16:46 | ohpauleez | (defprotocol IllegalDrinking ...) |
| 16:46 | Raynes | I'm going to miss all of these jokes in two years. |
| 16:47 | ohpauleez | I didn't commit it, but I had a gesture called: those-sons-of-bitches-are-going-down |
| 16:47 | ohpauleez | which is a very accurate gesture to capture |
| 16:47 | ohpauleez | We are too Raynes |
| 16:50 | bawr | seems like you need an approved developer account to see the Leap API, that sucks |
| 16:51 | technomancy | I get the feeling mobile input is where there's tons of low-hanging fruit |
| 16:51 | gfredericks | I'm going crazy; under what circumstances could I have (and (= x y) (not= (set x) (set y)))? |
| 16:51 | technomancy | the idea that you are expected to enter text by tapping tiny buttons with your thumb on a qwerty keyboard is absurd |
| 16:52 | ibdknox | definitely and obvious and well known problem, it's hard to imagine the solution though |
| 16:52 | Raynes | You should fix all of these things that are wrong with the universe. |
| 16:52 | amalloy | technomancy: android's swype is already a lot faster than actual thumb-tapping, even for untrained users |
| 16:53 | technomancy | amalloy: still uses only two thumbs though |
| 16:53 | ibdknox | technomancy: are you thinking something that is faster than typing or on par with typing? |
| 16:53 | technomancy | I suspect you could get tons of mileage out of a chording keyboard |
| 16:53 | ibdknox | chording keyboard? |
| 16:53 | Raynes | amalloy: I miss swipe on the iphone. |
| 16:53 | amalloy | i suspect it's too hard to hold the phone and also chord well |
| 16:53 | Raynes | swype* |
| 16:53 | amalloy | Raynes: unlock your phone and install whatever the iphone alternative is |
| 16:53 | bawr | ibdknox: press all the letters in a word at once, see it appear. I... think. |
| 16:53 | technomancy | ibdknox: something like this: http://www.loper-os.org/?p=861 |
| 16:53 | Raynes | Probably the only thing I miss about android. |
| 16:54 | technomancy | I mean, I think it would be *possible* to make something approaching a real keyboard for mobile input. I don't necessarily think it would be possible to successfully mass-produce it. |
| 16:54 | technomancy | because people hate giving up familiarity for efficiency |
| 16:55 | amalloy | technomancy: stenotype for mobile? |
| 16:55 | technomancy | amalloy: you can't reasonably use a software keyboard one-handedly anyway though |
| 16:55 | amalloy | i do it all the time |
| 16:55 | ohpauleez | bawr: Just look at clojure-leap |
| 16:55 | ohpauleez | the bare API is there too |
| 16:55 | ohpauleez | and some docs shhhhh |
| 16:56 | ibdknox | I feel like an idiot anytime I try to type on a phone |
| 16:57 | bawr | ohpauleez: actually... I did, I got so interested I forgot to thank you xD |
| 16:57 | amalloy | anyway it sounds like all the things you're asking for in a mobile keyboard are basically a stenotype machine, technomancy. i bet someone's written a touchscreen emulator for stenotypes |
| 16:57 | Hodapp | still lacks tactile feedback >_< |
| 16:57 | technomancy | yeah, tactile feedback and a way to see the screen while you're typing |
| 16:58 | technomancy | you'd need an external device to do it properly |
| 16:58 | amalloy | Hodapp: http://www.techradar.com/us/news/phone-and-communications/mobile-phones/mobile-computing/laptops/tactus-demonstrates-physical-button-technology-for-touchscreens-1084285 ? |
| 16:58 | technomancy | with a touchscreen there's always going to be tension between using more of the screen for better accuracy vs using less of the screen for more useful editing |
| 16:59 | rboyd | the solution is obviously an input device that takes advantage of the musculature of the human tongue |
| 16:59 | Hodapp | 'Tactus is hoping we'll be able to get our hands on devices using its screen technology by the middle of 2013...' |
| 16:59 | Hodapp | which means we won't see it. Ever. |
| 16:59 | rboyd | lick the touchscreen |
| 16:59 | technomancy | I could imagine something you just leave in your pocket and operate with the hand that isn't holding the mobile |
| 16:59 | bawr | rboyd: touching the lickscreen would be more fun |
| 17:00 | rboyd | lickscreen.io (YC S13) |
| 17:00 | technomancy | rboyd: unfortunately foot pedals are really only feasible while sitting |
| 17:00 | brainproxy | recommendation/s on how to make the font look better when running Emacs 24 on Windows? |
| 17:01 | hiredman | get a mac with a retina display |
| 17:01 | amalloy | brainproxy: presumably, a better definition of "look better" would be step one |
| 17:01 | brainproxy | looks all skinny and hard/er to read than what I'm used to looking at when running Emacs on my mac |
| 17:01 | rboyd | brainproxy: try a new font? |
| 17:02 | bawr | ohpauleez: so, did you have to show them something insaney cool to get to play with pre-release hardware? :) |
| 17:03 | brehaut | brainproxy: cocoas' font rendering tends to produce fatter forms than windows due to its hinting and antialiasing algorithms. |
| 17:03 | ohpauleez | bawr: No, I just told them my project and I guess it was audacious enough |
| 17:03 | ohpauleez | haha |
| 17:03 | brehaut | brainproxy: you either need a new font or just get used to it |
| 17:03 | bawr | ohpauleez: heh, that's even better ^^ |
| 17:03 | brainproxy | rboyd: was hunting around for how to do that, just figured I would give out a shout in chan, see if there's any collective wisdom on the subject |
| 17:05 | technomancy | "looks all skinny" in probably too much hinting? |
| 17:06 | rboyd | brainproxy: custom-set-faces and a monospaced font |
| 17:06 | brehaut | technomancy: probably; windows, especially cleartype(? — whatever the XP to vista renderer is), is super aggressive at hinting |
| 17:07 | brehaut | the new Windows 7ish era render does a fantastic job though |
| 17:09 | brehaut | early versions of safari for windows actually ported the cocoa renderer, and everyone complained that it was super blurry (even mac fans who liked that same rendering on a mac) |
| 17:09 | weavejester | Oh yeah, I remember that. |
| 17:09 | brehaut | short version: design stuff is always relative |
| 17:11 | gfredericks | so I have a {:foo 42} and a {:foo (Integer. 42)} |
| 17:11 | tomoj | hmm.. (:as (as-> x {:keys [foo bar] :as x} ...)) |
| 17:12 | gfredericks | they compare equal with =, but when I put them both in a set they are no longer equal |
| 17:12 | gfredericks | also I have trouble reproducing this. |
| 17:12 | bawr | I never had a problem with pixellated fonts, really. Maybe it's just me. |
| 17:14 | hiredman | gfredericks: what clojure version? |
| 17:14 | gfredericks | hiredman: 1.5.0-RC1 |
| 17:14 | hiredman | :/ |
| 17:14 | gfredericks | I've only seen this on my coworker's computer |
| 17:14 | gfredericks | still trying to reproduce on mine |
| 17:15 | hiredman | gfredericks: that means that sets are using .equals or .hashCode somewhere instead of using clojures hash and equiv |
| 17:16 | hiredman | because 42 is a Long and (Integer. 42) is an Integer and java may or may not do something dumb there |
| 17:16 | amalloy | hiredman: it does |
| 17:16 | hiredman | (of course) |
| 17:16 | ibdknox | static typing FTW! |
| 17:17 | gfredericks | still can't reproduce which is the weirdest part; I guess I should check his jvm version? |
| 17:17 | gfredericks | oh I bet he's on java7 and I'm on 6 |
| 17:18 | hiredman | gfredericks: I would double check the classpath of his clojure to see if he really is on whatever version |
| 17:18 | technomancy | equality is hard |
| 17:18 | technomancy | though you have to screw it up pretty spectacularly to get it wrong for value types =\ |
| 17:18 | gfredericks | nope still can't repro on java7 |
| 17:18 | gfredericks | he's also on a mac |
| 17:19 | hiredman | the problem with numbers is there is a existing well established domain with expectations of how they should behave, which does not match how they behave on computers at all |
| 17:20 | hiredman | which is due to things like width of presentation, floating point, and other performance trade offs |
| 17:20 | hiredman | width of representation |
| 17:21 | amalloy | gfredericks: none of that will matter across JVMs. it's entirely a clojure problem |
| 17:21 | gfredericks | amalloy: yeah? a known bug? |
| 17:21 | amalloy | not in 1.5 as far as i know |
| 17:21 | amalloy | i'm just saying, there's no way it matters what jvm or os he's on |
| 17:21 | amalloy | only what clojure version |
| 17:23 | amalloy | if he were using, say, 1.3, it would be a known bug |
| 17:31 | gfredericks | oh got it! |
| 17:31 | gfredericks | ,(= #{-80042} #{(Integer. -80042)}) |
| 17:31 | clojurebot | false |
| 17:32 | gfredericks | ,(= -80042 (Integer. -80042)) |
| 17:32 | clojurebot | true |
| 17:32 | gfredericks | that just took up ~10 man-hours |
| 17:33 | gfredericks | ,*clojure-version* |
| 17:33 | clojurebot | {:interim true, :major 1, :minor 4, :incremental 0, :qualifier "master"} |
| 17:33 | gfredericks | ,(= #{42} #{(Integer. 42)}) |
| 17:33 | clojurebot | true |
| 17:34 | gfredericks | amalloy: ^ that's why I had trouble reproducing. works fine for 42. |
| 17:34 | ibdknox | ,(= #{-1} #{(Integer. -1)}) |
| 17:34 | clojurebot | false |
| 17:34 | ibdknox | heh |
| 17:34 | ibdknox | that's awful |
| 17:34 | amalloy | caching of the first 128 integers? |
| 17:35 | hiredman | :/ |
| 17:35 | ibdknox | ,(= #{12345} #{(Integer. 12345)}) |
| 17:35 | clojurebot | true |
| 17:35 | gfredericks | ,(map #(= #{%} #{(Integer. %)}) [127 128 129]) |
| 17:35 | clojurebot | (true true true) |
| 17:35 | hiredman | phashset just calls equals |
| 17:35 | technomancy | I thought that only happened in runtimes with fixnums |
| 17:35 | amalloy | or...just an erroneous = comparison in clojure for negative integer objects. great |
| 17:36 | amalloy | technomancy: no, the first N integers, for some small N, are interned (although you can still avoid the intern pool by using Integer. instead of Integer/valueOf) |
| 17:36 | gfredericks | ,(= -80042 (Integer/valueOf -80042)) |
| 17:36 | clojurebot | true |
| 17:36 | technomancy | amalloy: similar to fixnums in practice then? |
| 17:36 | amalloy | *shrug* |
| 17:36 | amalloy | i don't know a lot about the details of fixnums |
| 17:37 | technomancy | I guess it's not like there's a canonical implementation of them |
| 17:37 | gfredericks | ,(= #{-80042} #{(Integer/valueOf -80042)}) |
| 17:37 | clojurebot | false |
| 17:38 | gfredericks | shall I make a jira ticket? |
| 17:38 | hiredman | it is due to sets being built on maps, and the sketchiness of using numbers as map keys |
| 17:38 | hiredman | yes |
| 17:38 | technomancy | https://blogs.oracle.com/jrose/entry/fixnums_in_the_vm |
| 17:38 | amalloy | gfredericks: IMO you should fly to rhickey's house and knock on his bedroom window; this bug is disastrous |
| 17:38 | pjstadig | technomancy: old news |
| 17:38 | technomancy | pjstadig: I prefer to think of it as "classic" |
| 17:38 | pjstadig | i read that blog post before it was cool |
| 17:39 | amalloy | i have a keylogger on jrose's computer and read it as he was writing it. competition over? |
| 17:39 | pjstadig | gfredericks: whoa what? |
| 17:39 | pjstadig | i thought i already opened a ticket for that one |
| 17:39 | Dark_Temple | helloo guys :) |
| 17:40 | gfredericks | pjstadig: for set equality problems? |
| 17:40 | pjstadig | yeah |
| 17:40 | gfredericks | pjstadig: I only just found out about this 10 minutes ago |
| 17:40 | pjstadig | or at least i independently discovered it |
| 17:40 | Dark_Temple | gfredericks i finished my first program,it converts a boolean formula to cnf form(if you know what that is),you helped me :) |
| 17:41 | pjstadig | but we discovered it a month or two ago, and i thought we determined that our case was an edge case, so maybe its different than yours |
| 17:41 | gfredericks | Dark_Temple: sweet |
| 17:41 | amalloy | pjstadig: link to jira ticket? |
| 17:41 | gfredericks | pjstadig: we're using sets to compare unordered sets of data |
| 17:41 | pjstadig | amalloy: trying to find it, but i may not have created it |
| 17:42 | technomancy | monkeypatch your JVM to automatically convert all Integers to Longs upon creation |
| 17:42 | gfredericks | in this case the integers were coming from jdbc |
| 17:42 | pjstadig | yes |
| 17:42 | pjstadig | ours was a jdbc issue too |
| 17:43 | pjstadig | i don't think we created a ticket for it |
| 17:43 | gfredericks | in our case the Integer was being created by jdbc so http://dev.clojure.org/jira/browse/JDBC-46 made it an easy fix |
| 17:43 | hiredman | pjstadig: I think for some reason we decided it was a jdbc issue? at least if we are thinking of the same thing |
| 17:45 | pjstadig | i remember we were spelunking through the java code and i saw this https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/APersistentSet.java#L77 |
| 17:45 | pjstadig | and it seemed not right |
| 17:47 | pjstadig | PHS doesn't override that definition of equiv |
| 17:49 | gfredericks | would this be good enough to slip into 1.5 final release? |
| 17:49 | TimMc | It's pretty egregious. |
| 17:50 | technomancy | that's what release candidates are for |
| 17:50 | gfredericks | well it was a bug in 1.4 too :P |
| 17:50 | technomancy | sorry, that was meant to be "that's what you're supposed to use release candidates for" |
| 17:51 | technomancy | not necessarily how they're used in practice =\ |
| 18:00 | gfredericks | why would this only break for negative numbers? |
| 18:00 | gfredericks | even large positives seem okay |
| 18:01 | hiredman | longs and ints only hash differently for negative numbers, I think |
| 18:01 | gfredericks | Jira: major, critical, or blocker? |
| 18:01 | hiredman | ,(.hashCode (Long. -10)) |
| 18:01 | clojurebot | 9 |
| 18:01 | hiredman | ,(.hashCode (Integer. -10)) |
| 18:01 | clojurebot | -10 |
| 18:01 | hiredman | ,(.hashCode (Integer. 10)) |
| 18:01 | clojurebot | 10 |
| 18:01 | hiredman | ,(.hashCode (Long. 10)) |
| 18:01 | clojurebot | 10 |
| 18:01 | hiredman | wonderful |
| 18:06 | TimMc | gfredericks: Major, I'd say. |
| 18:06 | gfredericks | k |
| 18:06 | TimMc | Of course, it would be critical to *someone's* app or lib, I'm sure. |
| 18:07 | TimMc | And then poke some folks in Core. |
| 18:07 | gfredericks | I wish "just cost me ten man-hours" were a priority level |
| 18:07 | gfredericks | abedra told me he'd phone up rhickey tomorrow :) |
| 18:08 | dyreshark | ,(let [[a b] [1]] (println b)) |
| 18:08 | clojurebot | nil\n |
| 18:08 | dyreshark | is there any way to tell the difference between nil-in-the-list and not-enough-elements in the above case ^ |
| 18:09 | dyreshark | other than :as some-lst (if (count some-lst ... |
| 18:09 | technomancy | dyreshark: destructuring doesn't have that ability, but multi-arity functions and pattern matching do |
| 18:10 | dyreshark | alright, i'll look into those then. thanks |
| 18:10 | TimMc | gfredericks: http://dev.clojure.org/jira/browse/CLJ-1106 is similar. |
| 18:12 | gfredericks | TimMc: k thanks |
| 18:16 | gfredericks | trying my failing test with his patch |
| 18:17 | gfredericks | can I bump that issue's priority? |
| 18:23 | TimMc | Sure, why not? :-P |
| 18:29 | seangrove | ohpauleez: Just met Aaron out here, didn't realize you guys were using shoreleave over there |
| 18:29 | seangrove | Thought it was primarily a python shop |
| 18:38 | seangrove | What's the python/clojure split? |
| 18:43 | DigitalJack | The Python Clojure Split (PCS) refers to a brief time period when Guido Van Rossum was writing yet another list processing language, and was struck by inspiration when he noticed that all the parenthesis resembled a python constricting around its prey. Thus his development efforts split off and the Python language was born. |
| 18:50 | yedi | can someone link me to a primer on protocols, records, and types in clojure? (to complement the docs) |
| 18:53 | technomancy | I wonder what ruby would look like without implicit "begin" everywhere |
| 18:53 | SegFaultAX | technomancy: My guess is it would have an explicit begin everywhere. |
| 18:53 | technomancy | if it was made explicit and people used a more functional style you could get rid of end end end everywhere but not have it be whitespace-dependent |
| 18:54 | dnolen | yedi: the books probably cover them better, not much on the web. |
| 18:56 | technomancy | SegFaultAX: I could imagine a parallel universe in which forcing an explicit begin (like explicit do in clojure) could encourage a more functional expression-oriented style |
| 19:00 | TimMc | Oh hey, once Clojure gets column metadata, we can have "^--- problem here"-style compiler messages. |
| 19:01 | cgag | technomancy: how would that encourage a more functional style? how does the implicit begin discourage it? |
| 19:03 | craigbro | awoooo |
| 19:03 | technomancy | cgag: `do` in clojure is only necessary when side-effects are present |
| 19:07 | cgag | ah yeah, i see what you mean now |
| 19:09 | technomancy | TimMc: really looking forward to http://pointerpointer.com integration |
| 19:11 | tmciver | technomancy: ha! where do you find this crap?! |
| 19:11 | technomancy | tmciver: somewhere on the tweeternets |
| 19:11 | dnolen | technomancy: wow that is hilarious |
| 19:12 | technomancy | dnolen: makes you wonder if the API or data set is open to other use |
| 19:13 | cgag | someone did a little video explaining how it works if you're interested: https://www.youtube.com/watch?v=Z2ZXW2HBLPM |
| 19:13 | tmciver | top-left corner is funny. |
| 19:14 | technomancy | cgag: coo |
| 19:14 | technomancy | l |
| 19:16 | amalloy | huh, the pointerpointer pictures are different from last time i looked |
| 19:16 | technomancy | oh, heh; it's not even an API, just a static json file |
| 19:16 | dnolen | technomancy: it's all clientside JS |
| 19:16 | dnolen | or at least seems so from the video |
| 19:17 | technomancy | even better for implementing clojure-error-pointer.el =) |
| 19:23 | TimMc | technomancy: I would pay so much money for that. |
| 19:24 | TimMc | (let [so-much 1, money :BTC] ...) |
| 19:24 | craigbro | I am still very confused about all the error message complaints |
| 19:25 | craigbro | I may be aclimated to such failings tho |
| 19:26 | TimMc | craigbro: (defn foo (vector 1 2 3)) |
| 19:26 | TimMc | "Parameter declaration vector should be a vector" (courtesy of amalloy) |
| 19:27 | craigbro | sensible to me |
| 19:27 | craigbro | that's a list |
| 19:27 | dnolen | craigbro: the only time I really find them annoying is compile time errors. these errors often don't give location. |
| 19:27 | amalloy | yes, i actually chose a pretty poor example of confusing error message |
| 19:27 | amalloy | try (defn foo (set 1 2 3)) |
| 19:28 | dnolen | craigbro: I don't think you'll get a good line number for that in CLJ. |
| 19:28 | craigbro | the ones that bug me are null exceptions that just kill everything |
| 19:28 | dnolen | craigbro: those are bad too, but I find it rare that I don't have an accurate stack trace in those cases. |
| 19:29 | hiredman | you can get NPE's where printing the stacktrace causes an NPE |
| 19:29 | amalloy | those make me so sad, hiredman |
| 19:29 | hiredman | they are tricky |
| 19:29 | craigbro | ok, got it now |
| 19:30 | craigbro | just wrote those to a file, tried to load the file, got error but no indication where |
| 19:30 | craigbro | hiredman: that explanation fits my experience |
| 19:34 | Sgeo | juxt is like a J verb train with the concat operator between every given function |
| 19:35 | TimMc | Sgeo: Well, that concludes it -- you're definitely a Markov chain bot of some sort. :-P |
| 19:36 | amalloy | hahaha |
| 19:36 | Sgeo | (<:,>:) 5 |
| 19:36 | Sgeo | 4 6 |
| 19:36 | Sgeo | Why is 5 my favorite example number? |
| 19:53 | TimMc | Hmm, good way to do weighted random choice? |
| 19:58 | gfredericks | TimMc: "good"? |
| 19:59 | TimMc | Efficient? |
| 19:59 | clojurebot | make a note of http://scienceblogs.com/goodmath/2006/11/the_c_is_efficient_language_fa.php it is yet another article about picking c or c++ for performance being naive |
| 19:59 | gfredericks | TimMc: as in sub-linear in the number of elements? |
| 19:59 | TimMc | Correct? |
| 20:00 | TimMc | Is sub-linear an option here? |
| 20:00 | gfredericks | yes |
| 20:00 | TimMc | wowzers |
| 20:01 | gfredericks | make a tree where each node knows its total weight |
| 20:01 | TimMc | Ah, I see. |
| 20:01 | gfredericks | then .... do the obvious thing. |
| 20:02 | TimMc | I'm going to be doing this a bunch of times with new data every time, so the setup cost doesn't get amortized away. |
| 20:03 | gfredericks | oh right |
| 20:03 | gfredericks | well the easy way if you know the total |
| 20:04 | gfredericks | is pick (rand total) and pull things off the front subtracting their weight from your number till something is bigger than it |
| 20:05 | TimMc | I *think* I can arrange things so that I know the total. |
| 20:08 | gfredericks | if you don't know the total I think it's fundamentally impossible |
| 20:08 | TimMc | *ahead of time |
| 20:11 | fakedrake | hello |
| 20:12 | ChongLi | hi |
| 20:12 | fakedrake | I was hoping someone could help me a bit with this |
| 20:12 | ChongLi | sure |
| 20:12 | fakedrake | I was going through the source of friend |
| 20:12 | fakedrake | https://github.com/cemerick/friend/blob/master/src/cemerick/friend/workflows.clj#L80 |
| 20:12 | SegFaultAX | fakedrake: Not until you tell us what you did with the real Drake. |
| 20:13 | fakedrake | (buried in the basement) |
| 20:13 | SegFaultAX | fakedrake: No, Drake... whyyyyy. Ok, I'm done. Proceed. |
| 20:13 | fakedrake | and i can't seem to get why cemerick calls this |
| 20:13 | fakedrake | make-auth |
| 20:14 | fakedrake | so basically the question is this: does it do something i do not get? |
| 20:15 | fakedrake | make-auth is defined aboce |
| 20:15 | fakedrake | above* |
| 20:15 | SegFaultAX | It returns a new auth object with the appropriate metadata set. |
| 20:15 | fakedrake | yes but it is not returned by the fn returned by the interactive form |
| 20:16 | fakedrake | it is just lost |
| 20:16 | fakedrake | aaah |
| 20:16 | cgag | it's in an if |
| 20:16 | fakedrake | now I get it |
| 20:16 | fakedrake | yes |
| 20:16 | fakedrake | sorry |
| 20:16 | fakedrake | \me feels quite stupid |
| 20:16 | SegFaultAX | fakedrake: &(and nil false 1) |
| 20:17 | SegFaultAX | &(and nil false 1) |
| 20:17 | lazybot | ⇒ nil |
| 20:17 | TimMc | SegFaultAX: You'll want ## for inline eval. |
| 20:17 | SegFaultAX | TimMc: Thanks |
| 20:17 | SegFaultAX | TimMc: Thanks |
| 20:17 | cgag | i'm pretty sure i thought the same thing when i first read through that source |
| 20:17 | SegFaultAX | &(or nil false 1) |
| 20:17 | lazybot | ⇒ 1 |
| 20:18 | SegFaultAX | &(and 1 2 3) |
| 20:18 | lazybot | ⇒ 3 |
| 20:18 | SegFaultAX | fakedrake: Does that help? |
| 20:18 | cgag | I don't remember for sure, but I dont' think you have to have that metadata if you don't want it, i think you just need to have :identity |
| 20:20 | fakedrake | yeah, thank you guys |
| 20:28 | TimMc | &(counted? (seq [1 2 3])) |
| 20:28 | lazybot | ⇒ false |
| 20:38 | TimMc | Raynes: Hey, when did flatland/useful grow a new namespace segment? |
| 20:43 | TimMc | I thought it was just useful/foo.clj, not flatland/useful/foo.clj. |
| 20:44 | fakedrake | I would like to insepct a request object in a repl is it possible? |
| 20:44 | fakedrake | rather what is the best way to do something like that? |
| 20:45 | hiredman | fakedrake: I often just slap in a middleware to print out request maps, but you can do anything like sticking them in a queue or just sticking them in a var |
| 20:48 | fakedrake | aha |
| 20:48 | fakedrake | i did not realize I could print those |
| 20:48 | hiredman | they are just maps |
| 20:49 | fakedrake | yeah... I meant the maps... |
| 20:49 | fakedrake | :S |
| 20:50 | cgag | i've just used pr-str on them and then pasted them back into the repl |
| 20:51 | dnolen | (run* [x y z :as q] ...) now supported in core.logic master |
| 20:51 | gfredericks | dnolen: woah nice |
| 20:51 | dnolen | will probably look into supporting maps at some point as well ... |
| 20:54 | dnolen | I forsee a lot of core.logic Clojure-fication / de-Scheme-ification for 2013 |
| 20:54 | gfredericks | dnolen: w00h my name is still in the git blame :P |
| 20:54 | dnolen | heh |
| 20:54 | gfredericks | down to 2 lines from 5 |
| 20:56 | dnolen | gfredericks: yeah, needed to move that unification up - otherwise unexpected stuff happens. |
| 20:57 | dnolen | slowness mostly |
| 20:57 | gfredericks | oh interesting; I wondered if there were tradeoffs there |
| 21:29 | Raynes | TimMc: Recently. |
| 21:29 | Raynes | TimMc: All of my projects are slowly growing me.raynes prefixes. |
| 21:32 | cgag | is there an easy way to restart nrepl in emacs? |
| 21:33 | Raynes | I just close the *nrepl-server* buffer and then jack in again. |
| 21:35 | xumingmingv | cgag: there is a command: nrepl-restart |
| 21:35 | xumingmingv | usually just (use 'your-namespace :reload-all) is enough? |
| 21:35 | Raynes | wat |
| 21:35 | Raynes | I didn't know there was an nrepl-restart. |
| 21:36 | fakedrake | is it bad practice to change an object's metadata? |
| 21:36 | Raynes | I wish there was a way to run nrepl in multiple projects at once. |
| 21:36 | cgag | it's not mentioned in the readme |
| 21:36 | Raynes | fakedrake: That's a strange question. If you have a reason to do it, sure. |
| 21:37 | TimMc | Raynes: Good on you. |
| 21:37 | xumingmingv | cgag: maybe just not all commands are mentioned in readme |
| 21:39 | fakedrake | Raynes: hmm, I want to gather errors from arbitrary places (like authentication or form validation or whatever) and attach them all to the ring request somehow |
| 21:39 | cgag | yeah i wasn't trying to say I didn't believe you or anything, just noting it |
| 21:40 | xumingmingv | cgag: ;) understand |
| 21:41 | fakedrake | i plan on using bootstap's alerts to rendering them but i do not want hiccup everywhere in my project |
| 21:41 | fakedrake | (now that I think of it even if i did i would still need to get those errors to the renderer) |
| 21:42 | cgag | i just pass errors as an optional param to my templates |
| 21:42 | cgag | i use hiccup though, it's great |
| 21:43 | fakedrake | yes i use hiccup too |
| 21:43 | fakedrake | hmm |
| 21:47 | cldwalker | hi all, anyone know how to install a lein2 dependency so that it overrides the built-in one? I'm trying to use a locally modified version of lein-newnew to no avail |
| 21:49 | cgag | i second that question |
| 21:50 | cldwalker | @Raynes: any thoughts? ^^ I tried modifying profiles.clj as suggested in the readme to no avail |
| 21:51 | Raynes | No clue. technomancy moved lein-newnew into Leiningen itself right before 2.0.0. |
| 21:51 | Raynes | I'm not sure how overriding it would work anymore. |
| 21:51 | technomancy | Raynes: hugod has a pull request supporting multiple nrepl connections in one emacs instance |
| 21:51 | technomancy | you should try it and give feedback on it |
| 21:51 | technomancy | kingtim needs help; there are like 12 open pull requests on nrepl.el |
| 21:52 | cgag | I just wasn't sure how to install a local version of a plugin. I tried removing the old one from .m2 and running lein install but it didn't seem to work |
| 21:52 | Raynes | I can give feedback on whether or not it works, but I don't really know any elisp. |
| 21:52 | technomancy | cldwalker: you would have to do that with a dev checkout of lein2 I think because otherwise everything lein ships with is on the bootclasspath and takes precedence always |
| 21:52 | Raynes | This is also a tough week. Moving cross country on Sunday. |
| 21:52 | technomancy | Raynes: yeah, that's what I was thinking |
| 21:52 | technomancy | just a y/n |
| 21:52 | Raynes | But I'm highly interested, so I'll take a look asap. Tomorrow probably. I wants it. |
| 21:53 | technomancy | https://github.com/kingtim/nrepl.el/pulls |
| 21:53 | cgag | where you heading to raynes? |
| 21:53 | Raynes | Los Angeles. |
| 21:53 | technomancy | oh man, I should test out #60 |
| 21:53 | technomancy | I didn't realize there was a pull for that. been wanting that forever. |
| 21:54 | brehaut | cgag: he's giving up software and is going to wait tables while he waits for his big break in film |
| 21:54 | technomancy | might be helpful to get more eyes on the list of nrepl.el pull requests |
| 21:54 | cgag | good decision |
| 21:59 | sgarrett|afk | So I was going to use Datomic for a new project of mine but from my understanding Datomic Free doesn't allow storage to any SQL or DynamoDB storage. :( |
| 22:06 | cldwalker | technomancy: ok, thanks |
| 22:07 | technomancy | cldwalker: one of the unfortunate drawbacks of bootclasspath, which really boosts boot time significantly |
| 22:15 | TimMc | Haha, I just pointed my Dissociated Press program at a README and the first line said "implemented by copying". :-D |
| 22:18 | xumingmingv | haha |
| 22:47 | TimMc | "break it does, forgot muggling to mvcc" |
| 22:47 | TimMc | Also, "SQLiterately" and "pointerprisey". |
| 22:50 | callen | Raynes: good luck with the move! |
| 22:50 | Raynes | callen: Thanks. |
| 22:52 | TimMc | Raynes: I'll try not to break lazybot while you're travelling. |
| 22:53 | callen | Raynes: I've done multiple big moves before, ping me if you need advice. You're moving to LA right? |
| 22:54 | callen | oh, *sees scroll* yes you are. |
| 22:58 | amalloy | lazybot is already safely in california |
| 23:00 | amalloy | in fremont, i guess |
| 23:01 | Raynes | TimMc: You'll have an 8 hour window to get yourself set up for a good ass kicking. |
| 23:01 | TimMc | heh |
| 23:01 | Raynes | amalloy: We never moved? |
| 23:01 | Raynes | We were thinking about it once. |
| 23:01 | amalloy | we were, but we didn't |
| 23:01 | Raynes | Then bravo on them fixing their shit. |
| 23:01 | Raynes | Nothing bad has happened in ages. |
| 23:04 | cemerick | sgarrett|afk: local H2-based storage is your option on free (technically SQL, but probably not what you're talking about) |
| 23:07 | sgarrett | cemerick: I think I'm going to go with PostgreSQL instead…I was hoping there wouldn't be a lot of restriction on the free Datomic but oh well. It was going to be more of an experiment using it anyway. |
| 23:08 | brehaut | huh, alex miller has an FP conference in aus later this year |
| 23:10 | sgarrett | cemerick: I appreciate the reply though. :) |
| 23:11 | cemerick | :-) |
| 23:32 | technomancy | good news: nrepl 0.1.6 is out. bad news: the patches targeted for it didn't get applied =\ |
| 23:39 | TimMc | I have two implementations of a fn that perform differently for different inputs. (Finding small substring matches in a large input string, either by indexOf or re-seq.) |
| 23:40 | TimMc | criterium gives me speed ratios of 0.5 to 5. |
| 23:41 | TimMc | Is there a way to switch off between implementations on the fly based on performance? |