2012-04-15
| 00:10 | jakko | anyone have any recent instructions (e.g. a blog post) for setting up emacs+slime+clojure on ubuntu 12.04? |
| 00:10 | jakko | thx |
| 00:14 | crassus | jakko: http://www.tekbot.com/clojure-simple-start.pdf |
| 00:14 | crassus | jakko: http://www.unexpected-vortices.com/clojure/brief-beginners-guide/ |
| 02:34 | eggsby | what's the simplest way to give a function parameter a default value? |
| 02:40 | eggsby | specifically I have a function that takes [[arg OPTIONAL_ARG] some-other &args], how can I say 'if optional arg isnt provided set it at some default value' ? |
| 02:41 | eggsby | I guess by using :keys and :or ? |
| 02:49 | jakko | crassus: thank you |
| 02:52 | zii-prime | I have (in essence) (defn called-with-some-sort-of-input [name val] (eval `(def ~name ~(do-processing-on val)))); is there any clean way to avoid the eval? I'm only using it because def is (like) a macro. |
| 02:55 | michaelr525 | heya |
| 03:08 | zii-prime | in short: Wrapping a macro in a function, like say (fn [& args] (eval `(def ~@args))): is there any clean way to avoid the eval? |
| 03:49 | muhoo | somewhat off-topic, but note the presence of "like" and "dislike" keys on the far right of symbolics lisp keyboards, long before mark zuckerberg was born: http://upload.wikimedia.org/wikipedia/commons/4/47/Space-cadet.jpg |
| 03:54 | AimHere | The 'It wasn't me, it was that guy next to me' keys below the like and dislike keys have yet to find their implementation on the greater internet even now. Truly, the Lisp machines were ahead of their time |
| 03:57 | muhoo | i think those are the "i'm with stupid" keys |
| 03:57 | muhoo | indeed, they are coming. |
| 04:17 | laurus | Is there a network analysis library for Clojure? |
| 04:49 | espeed | How do you use defmulti to create a function that can have zero, one, or two arguments? |
| 04:52 | thorwil | espeed: you don't need defmulti for that, a normal function with several signatures/bodies will do |
| 04:54 | espeed | Normally yes, but I need to use type hinting to distinguish between a single Integer arg and a single Map arg |
| 04:55 | espeed | (I'm wrapping a Java method) |
| 05:03 | Hali_3031 | hi! how to :use a protocol? I mean what's the easiest way to :use all methods of a protocol ? |
| 05:13 | raek | Hali_3031: if you have (defprotocol P (a ...) (b ...) (c ...)) in namespace foo, then you can access a, b, and c from foo like if they were defns |
| 05:13 | raek | for example, (ns bar (:use [foo :only [a b c]])) |
| 05:29 | pooya72 | hello, i'm trying to compile a simply program, but I get a "NoClassDefFoundError" http://pastebin.com/5FHhRU6t |
| 05:32 | tomoj | what do you run that produces that error? |
| 05:33 | pooya72 | java -cp [programname].standalone.jar "sample text" |
| 05:35 | pooya72 | tomoj: java -cp [programname].standalone.jar "sample text" |
| 05:38 | tomoj | hhmm |
| 05:39 | tomoj | can you paste the exact command you ran? |
| 05:39 | tomoj | the error seems to be caused by incorrect arguments to java, but what you just wrote looks correct to me.. |
| 05:39 | tomoj | oh, no |
| 05:40 | tomoj | you need `java -cp scribee-1.0.0-SNAPSHOT.jar class.name.to.run "sample text"` I think |
| 05:40 | tomoj | where class.name.to.run in your example would be program.core I think |
| 05:41 | pooya72 | tomoj: you da man |
| 05:41 | pooya72 | it worked |
| 05:42 | pooya72 | any way to do it without needing the classname at the command line? |
| 05:42 | tomoj | are you using leiningen? |
| 05:42 | pooya72 | yes |
| 05:43 | pooya72 | lein uberjar |
| 05:43 | tomoj | oh, then if you specify :main in your project.clj |
| 05:43 | tomoj | it will set up the uberjar main-class |
| 05:43 | tomoj | so that you can `java -jar uberjar.jar "sample text"` |
| 05:44 | pooya72 | yeah, i have added that |
| 05:44 | pooya72 | :main program.core |
| 05:51 | tomoj | so using -jar instead of -cp should make what you originally had work |
| 05:52 | tomoj | you should also be able to do `lein run -- "sample text"` |
| 05:52 | tomoj | even without an uberjar |
| 05:54 | pooya72 | yeah I didn't know about lein run |
| 05:54 | pooya72 | it works perfect with that |
| 05:54 | pooya72 | with java it still needs the classname |
| 05:55 | tomoj | even when you use -jar instead of -cp? |
| 05:56 | tomoj | it should either say "Failed to load Main-Class manifest attribute..." or run your main class |
| 05:57 | pooya72 | tomoj: no you're right, it works fine! thanks!! |
| 05:58 | tomoj | don't thank me, thank təchnomancy :) |
| 05:58 | pooya72 | first command line program made http://www.memecreator.net/images/success-kid.jpg ! |
| 05:58 | laurus | I am getting the error "Could not find artifact net.sf.jung:jung2:jar:2.0.1 in central (http://repo1.maven.org/maven2)". But according to the web site, it's there. What is wrong? |
| 06:00 | raek | laurus: what did you put in the :dependencies in your project.clj file? |
| 06:00 | laurus | raek, [net.sf.jung/jung2 "2.0.1"] |
| 06:01 | tomoj | there is no jar there |
| 06:01 | tomoj | only a pom |
| 06:01 | laurus | tomoj, oh, weird. Why? |
| 06:01 | tomoj | dunno, ask jung.sf.net.. :/ |
| 06:01 | laurus | Hah. OK. But how do I fix the problem in the meantime? |
| 06:01 | raek | I think it is one of those poms that contains sub-poms |
| 06:02 | raek | (I don't know the correct maven terminology) |
| 06:02 | tomoj | yeah.. |
| 06:02 | tomoj | so.. does that mean you have to go find the actual jars you want and add them to deps manually? |
| 06:02 | raek | I wouldn't expect so |
| 06:03 | tomoj | I don't think lein1 can traverse pom dependencies like maven |
| 06:03 | laurus | I am on lein2. |
| 06:03 | tomoj | I don't think lein2 can either, but I don't use it and don't know :) |
| 06:03 | laurus | tomoj, it's ok. But should I just download the .jar and put it into that directory? |
| 06:03 | tomoj | well, if you can find the jars you really want in http://repo1.maven.org/maven2/net/sf/jung/ |
| 06:04 | tomoj | you can just add them to :dependencies like normal |
| 06:04 | raek | laurus: I think it would be safer to put all the sub-projects in :depednencies instead |
| 06:04 | raek | downloading jars manually is rarely worth the effort |
| 06:05 | laurus | Interesting. Maybe "jung2" isn't even a real thing, it's just a name for a bunch of smaller libraries. |
| 06:05 | raek | yes, I think so |
| 06:05 | raek | look at "<modules>" here: http://jarvana.com/jarvana/inspect-pom/net/sf/jung/jung2/2.0.1/jung2-2.0.1.pom |
| 06:06 | raek | it's weird. I'm pretty sure contrib used this approach at one time. |
| 06:07 | laurus | It's funny, people complain a lot about this Maven stuff, but in some ways it seems better than the Python Package Index in that you can control all this stuff |
| 06:07 | laurus | With PyPI as I recall if you use easy_install it just installs things right into the OS, making a mess |
| 06:07 | raek | hrm, it has "profiles". maybe you need to qualify the [net.sf.jung/jung2 "2.0.1"] line with "all", "awt, or "j3s" somehow |
| 06:08 | laurus | Ah I see that part. |
| 06:08 | laurus | Well it's ok. I'll just use the partial ones for now. |
| 06:08 | laurus | I've never even used this library before so I don't know what I'm doing anyway. |
| 06:08 | laurus | :) |
| 06:10 | raek | laurus: you can also try asking here (or in #leiningen) again in a couple of hours |
| 06:11 | raek | at this time, it's usually just the europeans who are active |
| 06:11 | laurus | Ah ok. :) |
| 06:11 | laurus | That reminds me of that recent video of Larry Wall when he talks about how they even have a Perl programmer in Antarctica. |
| 06:12 | fliebel | There must be some sort of algo for generating raster/integer/step/pixel values for a line, right? |
| 06:14 | tomoj | fliebel: one is http://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm |
| 06:14 | fliebel | tomoj: Thanks |
| 06:15 | fliebel | What I'm trying to do is move 2 stepper motors in a diagonal line. They take input in the form of a byte, with a bit for every motor. |
| 06:16 | fliebel | So I need to figure out a pattern that will move them the correct angle. |
| 06:19 | tomoj | is there a more abstract way to describe that? |
| 06:21 | laurus | I have the jung-api listed in dependencies for the project. I have run lein repl. How do I use that library now? (or is there somewhere that explains this in detail for newcomers?) |
| 06:28 | fliebel | tomoj: Well, I need to translate a line into a sequence of commands like 'wait', 'up', 'down' |
| 06:33 | fliebel | So of a line goes diagonal, it's just 11,11,11, but it might also need to go 11,10,11,10, or even more elaborate patterns. |
| 06:36 | tomoj | I don't see how 11,11,11 corresponds to a diagonal line. each bit is a command to a stepper motor, but what do the commands mean? |
| 06:37 | fliebel | tomoj: Make one step. there is another command to set the direction. So 0 means no step, 1 means step. |
| 06:39 | fliebel | hehe, probabilistic method: make a list of steps al steps in the x and y direction, shuffle it. :D |
| 06:43 | laurus | I am running (:import [edu.uci.ics.jung.graph SparseGraph]) but receiving ClassNotFoundException. However, the library has been properly installed through lein in Maven. What is going on? |
| 06:46 | tomoj | laurus: jar tf deps/the-jar-you-think-the-class-is-in.jar |
| 06:46 | tomoj | (| grep SparseGraph) |
| 06:47 | tomoj | also, did you restart your jvm after installing the dep? |
| 06:48 | laurus | tomoj, what is that line of code? |
| 06:48 | laurus | And yes I restarted the JVM, thanks. |
| 06:48 | tomoj | `jar tf foo.jar` lists the contents of foo.jar |
| 06:49 | tomoj | if you do `jar tf foo.jar | grep SparseGraph` (assuming you're not on windows), it should show you whether or not foo.jar contains a class named SparseGraph |
| 06:49 | laurus | Wait a sec. The name of the thing in Maven is different from the package. |
| 06:50 | laurus | tomoj, yes, it shows that it does contain it. |
| 06:51 | tomoj | and `lein classpath` includes the jar that contains the class? |
| 06:51 | tomoj | I can't explain that |
| 06:52 | laurus | Let me check that. |
| 06:52 | laurus | Yes, it does contain it. |
| 06:52 | laurus | I'm using inferior-lisp mode. Is that part of the problem? |
| 06:54 | tomoj | the only explanations I can think of are: you didn't restart the jvm, or the class (and package) name you are trying to import does not match the one in the jar |
| 06:54 | laurus | How do I restart the JVM from the command line? |
| 06:54 | tomoj | dunno, how did you start it? |
| 06:54 | laurus | I just ran "lein repl" |
| 06:55 | tomoj | then ctrl+c or ctrl+d should work |
| 06:55 | laurus | Right, let me try that again. |
| 06:55 | tomoj | followed by `lein repl` again, which I assume you did.. |
| 06:55 | fliebel | Wow, what a clusterfuck. http://rosettacode.org/wiki/Bitmap/Bresenham's_line_algorithm#Clojure |
| 06:56 | laurus | Ah, I see the problem. |
| 06:56 | laurus | How do I make lein use a dependency for any project? |
| 06:57 | tomoj | put the dependency in that project's project.clj? |
| 06:59 | laurus | It still failed. |
| 06:59 | laurus | But I'm running "lein repl" from a directory that isn't the one for the project that includes that dependency. |
| 06:59 | laurus | Does that make a difference? |
| 06:59 | tomoj | ..yes |
| 06:59 | laurus | Right, so how do I make lein load a dependency for *any* project? |
| 07:00 | tomoj | put the dependency in *that* project's project.clj |
| 07:00 | laurus | Hmm. The problem is that I don't know how to control "where" the lein command is run from. |
| 07:00 | tomoj | plugins can be installed globally |
| 07:01 | laurus | Right now it's (setq inferior-lisp-program "lein repl"))) |
| 07:01 | laurus | Wait, plugin? |
| 07:01 | tomoj | why aren't you using clojure-jack-in? |
| 07:01 | Hali_3031 | raek: sorry for the late answer. with regards to protocol :use-ing, importing the method names one by one is what I'd like to avoid. Is there some syntax for importing protocol P and then later referring to P's method with some syntax like P/methodname? |
| 07:02 | Hali_3031 | as if P were a namespace |
| 07:02 | laurus | tomoj, I never had a problem with just using inferior-lisp mode until now |
| 07:02 | tomoj | because you never used any dependencies outside the one project that `lein repl` happens to get called in (the place you started emacs?)? |
| 07:02 | laurus | tomoj, yeah I guess that's why :) |
| 07:03 | laurus | Also, I didn't know that people had separated things from SLIME. |
| 07:03 | tomoj | do you have a function called clojure-jack-in available? |
| 07:03 | laurus | Not yet. Let me set that up now |
| 07:04 | tomoj | the readme here is the best I think https://github.com/technomancy/swank-clojure |
| 07:04 | laurus | Yes, reading it now, thanks :) |
| 07:05 | fliebel | tomoj: This looks more like it: http://www.cb.uu.se/~cris/blog/index.php/archives/400 Although it does some implicit array magic... |
| 07:05 | laurus | Does lein2 support this? |
| 07:08 | fliebel | Clojure kept giving me syntax errors, until I realized I was in the Python shell. |
| 07:08 | tomoj | I haven't upgraded yet, but `lein2 swank` seems to work here |
| 07:09 | laurus | Thank goodness. It worked. |
| 07:09 | laurus | tomoj, thank you so much! |
| 07:21 | fliebel | hrm, why doesn't Clojure have arithmetic operations on lists? That matlab code looks soo sweet. |
| 07:22 | Iceland_jack | fliebel: what do you mean? |
| 07:22 | fliebel | Iceland_jack: http://www.cb.uu.se/~cris/blog/index.php/archives/400 |
| 07:22 | fliebel | I need to do all sorts of apply/map/reduce combos. |
| 07:23 | Iceland_jack | For real... |
| 08:17 | raek | Hali_3031: no. the protocol methods are vars in their containing namespace. |
| 08:17 | raek | Hali_3031: but you can use the regular 'require' and 'use' to access them more conveniently |
| 08:18 | raek | (ns bar (:require [namespace.that.defines.the.protocol :as p])) (p/method ...) |
| 08:18 | raek | (ns bar (:use [namespace.that.defines.the.protocol :only [method]])) (method ...) |
| 08:18 | raek | (ns bar (:use [namespace.that.defines.the.protocol])) (method ...) |
| 08:18 | raek | the last one is discouraged |
| 08:19 | raek | I'd recommend going with 'require' and an :as prefix |
| 08:23 | raek | name structure is much more flat in clojure than in languages with classes |
| 08:27 | Bahman | Hi all! |
| 08:27 | Bahman | How can I call a function if I have only its fully qualified name like "someapp.somens.foo"? |
| 08:29 | raek | Bahman: if you have the name as a symbol, you can use 'resolve' |
| 08:29 | raek | &(resolve 'clojure.core/print) |
| 08:29 | lazybot | java.lang.SecurityException: You tripped the alarm! resolve is bad! |
| 08:30 | Bahman | raek: What if its namespace is not imported/required/used? |
| 08:30 | raek | Bahman: beware of the security implications of doing this. there is a good reason that the bots don't allow it. |
| 08:30 | raek | Bahman: then you need to require it first |
| 08:30 | Bahman | raek: I understand. I have it fully under control. |
| 08:30 | Bahman | raek: But is it possible during runtime? |
| 08:32 | raek | if you have a fully qualified symbol in "sym", it should be as simple as (do (require (namespace sym)) ((resolve sym) ...)) |
| 08:32 | raek | Bahman: certainly |
| 08:32 | Bahman | raek: Thank you very much! |
| 08:32 | _KY_ | Can someone guide me to install emacs clojure mode on windows? |
| 08:33 | raek | _KY_: sure, have you followed the instructions on https://github.com/technomancy/clojure-mode ? |
| 08:33 | _KY_ | I think I did it before... but I forgot |
| 08:33 | _KY_ | I'm not even sure if I'm in clojure mode or not |
| 08:34 | raek | _KY_: the mode-line should include "Clojure" when you visit a .clj file if it is installed |
| 08:35 | _KY_ | Oh yes... it has (Clojure) |
| 08:38 | raek | you can also do M-: (clojure-mode-version) <RET> to determine which version you have |
| 08:39 | raek | _KY_: another pointer: when you want to run clojure in emacs, follow the official docs for swank-clojure https://github.com/technomancy/swank-clojure |
| 08:42 | _KY_ | Not sure if I have Leiningen yet... can I install it on windows? |
| 08:42 | raek | yes |
| 08:53 | _KY_ | Where is my project.clj? |
| 08:54 | Licenser | _KY_ in theory in your poject folder |
| 08:54 | _KY_ | Is it emacs? |
| 08:55 | Bahman | raek: It works wonderfully! https://gist.github.com/2392610 |
| 08:56 | mdeboard | _KY_: No it's just a file on your hard drive |
| 08:57 | _KY_ | But where is its path? |
| 08:58 | unlink | Is there a better idiom for this? (if (some-condition) x (-> x (f) (g))) |
| 08:59 | unlink | i.e. conditionally thread x based on |
| 08:59 | raek | _KY_: even if you just want to play with the clojure repl you need to create a project |
| 09:00 | _KY_ | I'm talking about this line: Aed [lein-swank "one.4.4"] to the :plugins section of either project.clj or your user profile. |
| 09:00 | raek | _KY_: the project.clj file specifies the version of clojure and libraries to use |
| 09:00 | raek | _KY_: so you need to do something like "lein new tinkering" |
| 09:01 | _KY_ | I see... got it... |
| 09:02 | mdeboard | Does compiling Clojure seem like a brittle process to anyone else? |
| 09:02 | mdeboard | I have a hell of a time getting my standalone jars to run at all, and the error message is never useful |
| 09:03 | mdeboard | "Could not find the main class: datdoop.core. Program will exit." |
| 09:03 | mdeboard | Oh ok, thanks |
| 09:03 | raek | mdeboard: is this an uberjar? |
| 09:04 | raek | _KY_: you can add lein-swank both in your user profile or in the project file. it's recommended to keep it in your user settings, but I don't know where that file is on windows |
| 09:05 | _KY_ | So it's lein's user profile? |
| 09:05 | raek | on unix-like OSes it is in ~/.lein/profiles.clj |
| 09:06 | raek | _KY_: yes. you want to tell leiningen that you would like to have lein-swank available in all projects you work with |
| 09:06 | _KY_ | I see... |
| 09:07 | raek | so profiles.clj should contain {:user {:plugins [[lein-swank "1.4.3"]]}} |
| 09:10 | raek | _KY_: sorry, did you install the stable (1.7.1) or the preview (2.0.0) version? |
| 09:20 | _KY_ | I got a "could not start swank server" error in emacs |
| 09:22 | raek | _KY_: profiles is a new fieature of lein2. if you installed the stable version you need to run `lein plugin install lein-swank 1.4.4` instead of adding it to the profiles file |
| 09:24 | raek | things are a bit messy now in the lein1 -> lein2 transition period |
| 09:25 | raek | _KY_: you could try running `lein swank` in the project directory to see what the error is |
| 09:25 | _KY_ | It says unable to find lein-swank:jar:one.4.4 in repository central |
| 09:25 | raek | after it is solved, you can kill the swank server and go back to clojure-jack-in |
| 09:26 | raek | that line isn't an error. that just maven spitting out it thoughts. |
| 09:26 | raek | (leiningen searches multiple repositories) |
| 09:26 | _KY_ | So it says "created lein-swank-1.4.4.jar |
| 09:27 | _KY_ | But when I do "lein swank" in project dir, java throws an exception "no source file" |
| 09:28 | raek | _KY_: can you paste the stacktrace somewhere? |
| 09:28 | raek | what does the exception say? |
| 09:28 | _KY_ | "Dependencies must be specified as vector:lein-swank" |
| 09:30 | raek | sounds like you wrote :plugins [lein-swank "1.4.4"] instead of :plugins [[lein-swank "1.4.4"]] |
| 09:30 | _KY_ | Oh... hold on =) |
| 09:35 | _KY_ | Ok it says "connection opened on 4005" |
| 09:36 | _KY_ | So "lein swank" works? |
| 09:37 | _KY_ | I closed that now |
| 09:37 | raek | good. yes. |
| 09:37 | raek | clojure-jack-in should work now |
| 09:37 | _KY_ | It still doesn't work... |
| 09:37 | _KY_ | (Error "Could not start swank server: '$SHELL' is not recognized as an internal or external command, |
| 09:37 | _KY_ | Operable program or batch file. |
| 09:40 | raek | _KY_: which version of clojure-mode are you using? |
| 09:41 | _KY_ | How do I find out? |
| 09:41 | raek | in emacs, do M-: (clojure-mode-version) <RET> |
| 09:42 | volton | ,24 |
| 09:42 | clojurebot | 24 |
| 09:42 | volton | Hi, why doesn't this work? |
| 09:42 | volton | ,(def (symbol "fourty two") 42) |
| 09:42 | clojurebot | #<Exception java.lang.Exception: SANBOX DENIED> |
| 09:42 | volton | well, you get the point ;-) |
| 09:42 | llasram | volton: What do you expect it to do? |
| 09:42 | raek | volton: because the 'def' special form does not evaluate its first argument |
| 09:43 | volton | raek: A-ha! |
| 09:43 | volton | and why is that? |
| 09:43 | raek | I don't think def is meant to be called programmatically |
| 09:44 | raek | volton: are you doing some kind of meta-programming? |
| 09:44 | _KY_ | Is that M-:? |
| 09:44 | raek | yeah, alt + colon |
| 09:45 | volton | raek: No, I just wanted to try if I could bind something to fourty two |
| 09:45 | raek | heh I should have put quotes around that.. :) |
| 09:46 | volton | which would be logical in a way since fourty two is a symbol but illogical in another way since I don't know how you could evaluate that symbol |
| 09:46 | _KY_ | "1.11.5" |
| 09:46 | raek | volton: yeah, clojure does not enforce symbol name rules very strictly |
| 09:47 | raek | you can do (intern *ns* (symbol "fourty two")) |
| 09:47 | AimHere | I think you can make your own def with (defmacro mydef [a & body] `(def ~(quote a) ~@body)) |
| 09:47 | raek | but you cannot use that var in ordinary code (because of the space) |
| 09:47 | AimHere | That'll resolve the expression |
| 09:47 | raek | sorry, (intern *ns* (symbol "fourty two") 42) |
| 09:48 | raek | but you can still access it programmatically: (deref (resolve (symbol "fourty two"))) |
| 09:50 | raek | _KY_: I think the error is in clojure-mode, since lein swank started without errors |
| 09:50 | _KY_ | It says "Debugger entered--Lisp error: ...." |
| 09:51 | volton | AimHere: your code leads to 42 getting bound to the symbol a |
| 09:52 | gfredericks | AimHere: yeah I think you meant for ~a not ~(quote a) |
| 09:52 | gfredericks | though I don't think that macro buys you anything over def |
| 09:53 | volton | So I guess the thing to learn here is to always create symbos implicitly and not call (symbol)? |
| 09:53 | AimHere | Yeah, I made a mistake |
| 09:53 | Chousuke | you can use symbol but you have to be careful that the created symbols are valid |
| 09:53 | Chousuke | since there are no checks |
| 09:54 | raek | _KY_: the problem seems to come from here: https://github.com/technomancy/clojure-mode/blob/master/clojure-mode.el#L967 |
| 09:55 | volton | Chousuke: that seems illogical to me: why does symbol create invalid symbols? |
| 09:56 | raek | _KY_: is the lein.bat file on the PATH so emacs can find it? |
| 09:56 | Chousuke | volton: because it doesn't check if the input strings are valid |
| 09:56 | _KY_ | Ahh... I have lein in cygwin... |
| 09:56 | _KY_ | But I'm running emacs in windows |
| 09:56 | _KY_ | Could that be the problem? |
| 09:56 | Chousuke | volton: basically, if you give it invalid parameters, you get invalid symbols |
| 09:56 | volton | Chousuke: well and I guess the symbol is not really invalid sine it can be used for intern just fine |
| 09:57 | Chousuke | it is invalid in that your program might stop working one day |
| 09:57 | Chousuke | it's like C's undefined behaviour |
| 09:57 | Chousuke | it executes, but the results are not guaranteed |
| 09:58 | volton | So you say that (intern)'s behaviour is not defined in this regard? |
| 09:58 | Chousuke | what does intern do? :/ |
| 09:58 | raek | _KY_: I suspect so. I think all clojure-mode needs is for the lein script to be on the path |
| 09:58 | Hali_3031 | raek: yes I know methods are regular functions as seen from the outside, however my problem is the following: I'd like to re-use a specific overloaded version of a protocol method. For example I'd like to call "method" that dispatches on java.lang.String WITHOUT actually having a string. i just know the class, but don't have an instance. is this possible? |
| 09:58 | volton | ,(doc intern) |
| 09:58 | Chousuke | anyway, it's just symbol. you can give it strings that have invalid symbol characters in them like spaces |
| 09:58 | clojurebot | "([ns name] [ns name val]); Finds or creates a var named by the symbol name in the namespace ns (which can be a symbol or a namespace), setting its root binding to val if supplied. The namespace must exist. The var will adopt any metadata from the name symbol. Returns the var." |
| 09:59 | Chousuke | right, that can break too if you give it an invalid symbol |
| 09:59 | Chousuke | currently it works I think but it might not |
| 09:59 | Chousuke | so if you use symbol, you should take care not to create invalid symbols with it |
| 09:59 | raek | Hali_3031: I don't think so. not unless the protocol implementation is also available as a function |
| 10:00 | volton | Chousuke: okay :-) |
| 10:00 | volton | well I leaned something new today, thanks everybody! |
| 10:01 | Chousuke | I think there's an issue about making symbol validate its input |
| 10:01 | Chousuke | but no-one has got around to doing it. |
| 10:01 | Hali_3031 | raek: I see, thanks. I'll look into some workaround then |
| 10:01 | volton | well, actually I think that symbol should always return a valid symbol |
| 10:02 | volton | Chousuke: Do you think I should open an issue? |
| 10:02 | Chousuke | volton: there already is one |
| 10:02 | Chousuke | volton: it just doesn't matter enough to get solved |
| 10:03 | _KY_ | I started emacs in cygwin, but now clojure mode is lost |
| 10:03 | Chousuke | part of symbol's contract is that you don't call it with invalid input :p |
| 10:03 | raek | ah, different environment variables... |
| 10:04 | volton | would there be any harm in having (symbol "my pretty symbol") return my-pretty-symbol? |
| 10:05 | raek | _KY_: you could try adding (setenv "PATH" (concat (getenv "PATH") "path/here")) (setq exec-path (append exec-path '("path/here"))) you your non-cygwin emacs configuration |
| 10:05 | Chousuke | volton: yeah, that makes no sense. |
| 10:05 | Chousuke | volton: it's too magical |
| 10:05 | raek | where "path/here" is the path to the directory that contains lein.bat |
| 10:06 | Chousuke | volton: symbol should just throw an exception in a case like that |
| 10:06 | Chousuke | there are other invalid symbols too, like "..." or ",,," |
| 10:06 | volton | Chousuke: You are probably right |
| 10:07 | raek | _KY_: I also think you can use M-x customize-variable <RET> clojure-swank-command |
| 10:07 | raek | and set the command to "C:\path\here\lein.bat jack-in %s" |
| 10:07 | volton | Chousuke: Where can I find the corresponding issue? |
| 10:08 | _KY_ | The current command is: |
| 10:08 | _KY_ | echo "lein jack-in %s" | $SHELL -l |
| 10:09 | raek | yup. that won't work on windows... |
| 10:09 | _KY_ | So I just replace the whole line with yours? |
| 10:09 | raek | if I understand the elisp code correctly, clojure-mode resorts to that approach if it can't find leiningen on the path |
| 10:09 | raek | yeah |
| 10:10 | _KY_ | With or without quotes? |
| 10:10 | raek | without |
| 10:10 | raek | if you enter it through the customization interface |
| 10:11 | _KY_ | But my lein needs cygwin to invoke |
| 10:11 | _KY_ | So it's not lein.bat |
| 10:11 | raek | I see |
| 10:11 | raek | then it's probably wiser to start emacs from cygwin |
| 10:12 | raek | but with an option that tells it where to find you .emacs files |
| 10:12 | raek | did you install emacs through cygwin too? |
| 10:13 | _KY_ | No emacs was installed in windows I think |
| 10:13 | groovemonkey | hi guys; having a problem with altering a ref (hashmap): |
| 10:13 | groovemonkey | clojure.core=> @test |
| 10:13 | groovemonkey | {} |
| 10:13 | groovemonkey | clojure.core=> (dosync (alter test (assoc-in @test [:new :stuff] ["in here" :now]))) |
| 10:13 | raek | (man, why is always so messy to set up dev tools on windows?) |
| 10:13 | groovemonkey | nil |
| 10:13 | groovemonkey | clojure.core=> @test |
| 10:13 | groovemonkey | nil |
| 10:13 | volton | _KY_: Do you need swank? I find clojure-mode to be sufficient... |
| 10:14 | _KY_ | Not sure yet... |
| 10:14 | groovemonkey | is assoc-in returning nil for some reason and that's being bound to @test? |
| 10:15 | raek | volton: how do you reload function definitions and try them after you have changed them? |
| 10:15 | raek | groovemonkey: alter does not take a new value, it takes a function from the old value to the new value |
| 10:16 | raek | (dosync (alter test assoc-in [:new :stuff] ["in here" :now])) |
| 10:16 | raek | or (dosync (alter test (fn [old] (assoc-in old [:new :stuff] ["in here" :now])))) |
| 10:17 | volton | raek: I don't. I'm a noob :-P |
| 10:17 | _KY_ | Maybe I should re-install lein on windows? |
| 10:17 | groovemonkey | raek: ahhh, thanks. I tried a horrible mix of those two suggestions. |
| 10:17 | groovemonkey | namely |
| 10:17 | groovemonkey | (dosync (alter test assoc-in @test [:new :stuff] ["in here" :now])) |
| 10:17 | groovemonkey | thanks!! |
| 10:17 | raek | there is also 'ref-set' which behaves as your "alter" in the first example |
| 10:18 | raek | but using alter is more ideomatic here |
| 10:18 | groovemonkey | ah, thank you for that tip. |
| 10:18 | clojurebot | Huh? |
| 10:22 | raek | _KY_: probably a good idea. mixing stuff from cygwin-land and windows-land has mostly resulted in pain for me personally |
| 10:27 | _KY_ | Now "lein swank" in windows says "this is not a task" |
| 10:29 | raek | _KY_: the location of the .lein directory is probably different |
| 10:30 | raek | _KY_: did you end up using profiles.clj or "lein plugin install ..."? |
| 10:30 | volton | ,(clojure.string/split "abc" #"") |
| 10:30 | _KY_ | Oh I didn't do that yet |
| 10:31 | clojurebot | ["" "a" "b" "c"] |
| 10:31 | volton | why does it return the "" at the front? |
| 10:32 | raek | probably comes from java |
| 10:32 | raek | you can also do ##(seq "abc") |
| 10:32 | lazybot | ⇒ (\a \b \c) |
| 10:32 | _KY_ | Lein plugin install swank-clojure 1.4.4 right? |
| 10:32 | raek | lein-swank, I think |
| 10:32 | raek | depending on which version you use |
| 10:33 | volton | raek: that is a lot better, thanks |
| 10:33 | raek | this has also changed recently :-) |
| 10:33 | raek | or ##(map str "abc") ; if you want the letters as strings |
| 10:33 | lazybot | ⇒ ("a" "b" "c") |
| 10:35 | _KY_ | Oh I did swank-clojure 1.4.2 |
| 10:35 | _KY_ | And now emacs clojure-jack-in works |
| 10:36 | _KY_ | Should I re-do lein plugin install lein-swank 1.4.4? |
| 10:36 | _KY_ | Or just leave it at that? |
| 10:36 | raek | you could probably just leave it like that |
| 10:37 | raek | if you decide to upgrade, remember to remove the older version |
| 10:37 | _KY_ | Ok looks good now... =) |
| 10:37 | raek | _KY_: happy hacking! |
| 10:37 | _KY_ | So it lets me evaluate clojure expressions from the buffer? |
| 10:38 | raek | yes |
| 10:38 | raek | a lot of useful commands are listed in the swank-clojure docs |
| 10:38 | _KY_ | Ok=) |
| 10:39 | raek | if you did "lein new tinkering", a good place to start playing around is the src/tinkering/core.clj file |
| 10:40 | raek | if you have it open, press C-c C-k to load the contents of it |
| 10:40 | _KY_ | I'm already writing my project now... =) |
| 10:40 | raek | and then C-c M-p to cause the repl to be in the tinkering.core namespace |
| 10:41 | raek | when you change a def, just press C-M-x while having the point in it to reevaluate it |
| 10:41 | volton | raek: you are right, clojure.string/split behaves identical to Java :-/ |
| 10:58 | _KY_ | I can't compile file in emacs swank... any idea? |
| 10:58 | _KY_ | "Compilation failed - no warnings" |
| 10:59 | solussd | ibdknox: any chance of light table becoming a kickstarter project? I know several people in the clojure community would be more than willing to donate to compensate you for your time (and I personally tihnk that that is important). The kickback would be an open source implementation. I don't know if I can program another day in a world without something like light table being my IDE. :D |
| 11:02 | zamaterian | solussd, ibdknox wrote earlier that he has submitted a kickstart project |
| 11:02 | solussd | zamaterian: ha. I must have missed that! |
| 11:10 | mdeboard | Any cascalog users here? |
| 11:14 | raek | _KY_: are there any messages in the *SLIME Compilation* buffer? |
| 11:14 | _KY_ | Compile-load file works |
| 11:15 | _KY_ | But "compile file" fails... guess it doesn't matter |
| 11:44 | autodidakto | once I add a plugin to lein2's profiles.clj, what command do I run to install (missing) plugins? |
| 11:49 | krsanky | ive been doing the 4clojure questions, its cool seeing how other people answer the same problems |
| 11:49 | mdeboard | ya |
| 11:50 | krsanky | my 1st ones were super complicated, and id see others with like 2 word answers |
| 11:51 | krsanky | (fn enth [s n] (loop [cnt n sq s] (if (zero? cnt) (first sq) (recur (dec cnt) (rest sq))))) |
| 11:51 | krsanky | thats 21 (rewrite nth without nth) |
| 11:54 | ddlp | dear #clojure ... i'm looking at compiler plugins (gcc, ghc, scala) and wondering if is there any plan or work for a clojure compiler plugin API? |
| 12:03 | autodidakto | technomancy: Once I add a plugin to profiles.clj, how do I tell lein2 "ok, download it" |
| 12:05 | mfex | autodidakto, often with lein2 the old explicit "lein deps" step happens whenever it is required. Does the plugin not just work already? |
| 12:06 | autodidakto | it's lein-newnew + a template I'm trying to use |
| 12:07 | autodidakto | So, it, like, goes, without checking... the "new" commands doesn't download lein newnew, and it takes my template name to mean project/src/template-name |
| 12:10 | mfex | I haven't used newnew myself, but "lein2 new your-template-name project-name" fails? |
| 12:10 | autodidakto | mfex: for example, with lein1 -> lein plugin install lein-newnew 0.2.6 will download the jar and over-ride lein new right away, but with lein2, adding lein-newnew to profiles doesnt |
| 12:11 | xeqi | autodidakto: does `lein deps` get it? |
| 12:11 | xeqi | *download |
| 12:11 | mdeboard | ddlp: What sort of things would you like plugins for? |
| 12:12 | autodidakto | it does fail, but it lein new is still expecting "Expected ([project-name] [project-name project-dir])" |
| 12:12 | autodidakto | xeqi: "Couldn't find project.clj, which is needed for deps" |
| 12:12 | mdeboard | ddlp: I think (completley ignorant of the topic so this is a guess) if you use leiningen to build your projects, leiningen supports plugins... presumably plugins to effect compile-time behavior |
| 12:13 | autodidakto | I'll nuke lein1/2 and reinstall to make sure I dont have some weird conflict... |
| 12:22 | krsanky | /statusbar window add usercount |
| 12:22 | krsanky | woops |
| 12:22 | krsanky | <-- irc noob |
| 12:24 | autodidakto | krsanky: it happens to the best of us |
| 12:25 | autodidakto | /msg Obama I'm tellin you bro, fo' mo' years. It's in the bag |
| 12:26 | krsanky | i pasted my nick password in yesterday :) |
| 12:27 | yoklov | i'm always worried i'll do /join #someotherchannel |
| 12:27 | yoklov | with a space before it |
| 12:29 | yoklov | hrm, I feel like clojurescript should have some sort of way of making async a bit less awkward. |
| 12:29 | yoklov | callbacks feel un-idiomatic, but the browser demands it. |
| 12:30 | ddlp | mdeboard: to add or modify new features to the compiler without having to modify the compiler itself |
| 12:32 | yoklov | hm maybe i should use ibdknox's state machine library |
| 12:37 | ddlp | mdeboard: i don't know if lein modifies the compiler itself. |
| 12:38 | ddlp | mdeboard: but, for example, ibdknox mentions using "a modified version of the Clojure compiler" for Light Table. |
| 12:38 | mdeboard | ddlp: Ah I see, yeah I don't know. I'm sure he would have an answer for you. |
| 12:39 | yoklov | the clojurescript compiler's weird to include though. definitely not as seamless integration as, clojure, for example |
| 12:40 | yoklov | plugins to extend compile behavior would be interesting. |
| 12:50 | ddlp | yoklov: yes, a unified api to extend/modify compiler behavior when needed |
| 12:50 | yoklov | eh |
| 12:51 | yoklov | actually |
| 12:51 | yoklov | you know |
| 12:51 | yoklov | that sounds like it would be un-namespaceable |
| 12:51 | yoklov | and it would make code incompatible with other code |
| 12:52 | yoklov | you can probably do a large portion of that already with macros too. |
| 12:53 | yoklov | i know in racket, some macros end up being basically compiler extensions/directives, and i don't see why the same thing couldn't be true of clojure, unless you _really_ wanted to change things |
| 12:57 | autodidakto | Ok, so where does lein2 save the plugins to? |
| 13:00 | raek | autodidakto: everything is kept in the .m2 directory |
| 13:00 | autodidakto | raek: ahh ok, so no more plugins/ directory with lein2? |
| 13:00 | raek | yeah |
| 13:00 | raek | at least this is the case for :dependencies and lib/ |
| 13:01 | autodidakto | and :plugins in .lein/profiles.clj ? |
| 13:02 | raek | it didn't add any plugins there for me |
| 13:02 | autodidakto | same here. Ok, that helps, thanks |
| 13:02 | raek | lein-swank worked (from :plugins) with an empty .lein/plugins |
| 13:04 | autodidakto | yeah same here. Making the transition to lein2, and it was really confusing me... |
| 13:07 | ibdknox | ddlp: I modified and rebuilt the compiler |
| 13:07 | ibdknox | to preserve some metadata |
| 13:08 | ibdknox | so instead of using clojure 1.3.0 I'm using ibdknox/clojure |
| 13:23 | autodidakto | xeqi, mfex: I think my hangup was not understanding the lein2 installs to .m2, and I already had the plugins inside .m2 because of installing them previously with lein1 |
| 13:24 | autodidakto | "i hear idbknox is going to implement REAL reader macros" |
| 13:24 | ddlp | heh |
| 13:25 | gfredericks | what is unreal about clojure's reader macros? |
| 13:26 | autodidakto | their nonexistance |
| 13:26 | autodidakto | 1.4 will have an alternative |
| 13:26 | gfredericks | so what is #() and #' and etc? |
| 13:26 | autodidakto | but 1.4 CLOJURE-TO-THE-KNOX, will have REAL reader macros! |
| 13:26 | autodidakto | you can't make your own |
| 13:27 | gfredericks | so clojure has reader macros but because it's not extensible we say that clojure does not have reader macros? |
| 13:27 | autodidakto | or maybe "their existance" is unreal... tricksy... |
| 13:27 | gfredericks | I'm just trying to figure out terminology |
| 13:27 | autodidakto | gfredericks: correct |
| 13:27 | autodidakto | Rich hickey does, we don't... clojure do.does..nt... yeah I think we say "it doesn't" |
| 13:28 | autodidakto | at least, people will say "CL has reader macros, but clojure doesn't" |
| 13:28 | autodidakto | $seen rhickey |
| 13:28 | lazybot | rhickey was last seen joining on clojure 6 days and 5 hours ago. |
| 13:29 | autodidakto | I'm gunning for you, rhickey! |
| 13:30 | _KY_ | I'm using enclojure and got "Error occurred during initialization of VM" not enough heap space |
| 13:31 | ddlp | ibdknox: yes. a compiler plugin api would be useful only for features that are not suitable for inclusion in the main compiler. |
| 13:31 | ddlp | bbl |
| 13:35 | TimMc | gfredericks: People talk about #-stuff being reader macros, but it's really just part of the parser. |
| 13:36 | gfredericks | TimMc: I definitely don't know the diff between "reader" and "parser" |
| 13:36 | gfredericks | unless the reader eats strings and the parser eats tokens |
| 13:36 | TimMc | eh |
| 13:37 | TimMc | The "reader" is an API-level construct. |
| 13:37 | TimMc | lexers and parsers are implementation-level |
| 13:38 | Chousuke | the reader is what takes a string and gives you a data structure |
| 13:38 | Chousuke | it's usually implemented with a parser :P |
| 13:38 | Chousuke | well, string or input stream |
| 13:38 | gfredericks | TimMc: I still don't understand your earlier statement then |
| 13:38 | gfredericks | of course something at the API level is "really" just part of a lower level |
| 13:40 | TimMc | Hmm. I guess I kind of object to the term "reader macro" in general. |
| 13:40 | TimMc | They should really be called parser plugins, or lexer plugins. |
| 13:41 | gfredericks | well. okay. |
| 13:44 | gfredericks | so what does 1.4 have in this area then? |
| 13:44 | TimMc | gfredericks: I actually don't know much about how Clojure's reader works. |
| 13:46 | autodidakto | gfredericks: extensible reader -> http://www.infoq.com/interviews/hickey-clojure-reader |
| 13:46 | hsteak | hello |
| 13:46 | autodidakto | hsteak: yo |
| 13:51 | gfredericks | so is #=() still around? |
| 13:51 | dnolen | bbloom: hey I applied your patch to master but there's a small issue that didn't crop up from just running the tests. |
| 13:53 | ibdknox | dnolen: are there any thoughts on having compiler modes? E.g. can there be a flag that adds position information on all forms? not just lists. |
| 13:54 | ibdknox | dnolen: I understand the size issue, so it probably shouldn't be on normally, but for tools.. |
| 13:55 | dnolen | ibdknox: something like that sounds reasonble to me - still need to happen in the CLJ reader first. |
| 13:56 | ibdknox | yeah, I'm more interested in the reader anyways |
| 13:57 | ibdknox | if the analyzer was just better about keeping meta, that would be all that needed to happen |
| 13:57 | dnolen | ibdknox: I'm not convinced there's a size issue - we work on code one top level form at a time. |
| 13:58 | ibdknox | dnolen: having all those meta entries has to take up space at runtime though, right? |
| 13:59 | dnolen | ibdknox: those meta entries don't exist at runtime. |
| 13:59 | ibdknox | oh? |
| 13:59 | ibdknox | oh right |
| 13:59 | ibdknox | duh |
| 13:59 | ibdknox | dnolen: I retract my size statement then |
| 13:59 | ibdknox | dnolen: can we just have position information on all forms? :D |
| 14:00 | ibdknox | haha |
| 14:00 | dnolen | ibdknox: yes, want. |
| 14:00 | ibdknox | dnolen: I started messing around with esprima, their parse trees are so much more complicated ;) |
| 14:00 | ibdknox | code rewriting is going to be interesting |
| 14:01 | dnolen | ibdknox: heh yeah JS ain't simple. |
| 14:02 | ibdknox | seems doable, just definitely not a 6 day prototype lol |
| 14:02 | _KY_ | Im using Enclojure and maven cannot start the JVM due to insufficient heap space... what should I do? |
| 14:05 | yoklov | #"regex" still doesn't work in cljs, right? |
| 14:06 | dnolen | bbloom: basically the REPL is broken at the moment. |
| 14:06 | rodnaph | anyone got tips for dealing with cljs compile error? there is literally no useful info, and reverting everything I can remember doing in the last few minutes hasn't helped... HELP! :) |
| 14:07 | dnolen | rodnaph: what's the error? |
| 14:07 | ibdknox | rodnaph: a compile error or a runtime error? |
| 14:07 | rodnaph | java.lang.UnsupportedOperationException: nth not supported on this type: Symbol |
| 14:08 | rodnaph | i'm using lein cljsbuild and getting that during compile (along with a stacktrace from clojure.* and cljs.* |
| 14:08 | ibdknox | rodnaph: you probably have an incorrect number of args in a defn |
| 14:08 | yoklov | check your function arguments to make sure they're a vector, also try the (:use [foo :only [bar baz]]) forms to make sure [bar baz] is a vector |
| 14:09 | yoklov | usually the later one complains about a seq |
| 14:09 | rodnaph | ok thanks yoklov i'll check that! |
| 14:10 | rodnaph | is there any way of getting some more useful info from the compiler though? (file/line/etc...) if not maybe a page of common problems would be helpful, i'll start putting one together |
| 14:10 | yoklov | i don't know of any :/ |
| 14:12 | yoklov | trying stuff out in a repl first helps catch errors |
| 14:12 | rodnaph | GAH! ok i had (:use jayq.core :only [$]) |
| 14:12 | rodnaph | thanks yoklov |
| 14:13 | yoklov | np, you get somewhat used to the errors it throws at you, though better messages would be amazing |
| 14:13 | yoklov | the weirdest thing is the google closure compiler running out of memory all the time. |
| 14:14 | ibdknox | I've never had that happen |
| 14:14 | yoklov | no? |
| 14:14 | clojurebot | no is tufflax: there was a question somewhere in there, the answer |
| 14:14 | yoklov | hrm. |
| 14:14 | rodnaph | yah defo - the eternal problem of someone not passing up the message, always bugs me. "unknown error" - SOMEONE BLOODY KNOWS!! hehe |
| 14:14 | yoklov | after usng lein cljsbuild auto for a while, i'll eventually get "java.lang.OutOfMemoryError: Java heap space" followed by a stack trace deep in the closure compiler |
| 14:15 | yoklov | "TokenStream.java:1256 com.google.javascript.jscomp.mozilla.rhino.TokenStream.getStringFromBuffer" or stuff like that. not the same place always either. |
| 14:16 | rodnaph | ibdknox: any idea on when we'll be able to try lighttable out? :) |
| 14:16 | ibdknox | it'll be a bit |
| 14:16 | ibdknox | writing an IDE from scratch is a lot of work |
| 14:16 | ibdknox | 2000 people work on Visual Studio ;) |
| 14:16 | rodnaph | is that like when my wife says she'll clean up in a bit? or when by boss says i'll get a payrise in a bit? :D |
| 14:17 | dnolen | bbloom: no worries, I went ahead and fixed the REPL in master |
| 14:17 | rodnaph | yah i bet! well we'll be waiting. |
| 14:17 | ibdknox | rodnaph: I'm hoping for a solid beta by end of year |
| 14:17 | ibdknox | but that's me naively estimating right now |
| 14:17 | ibdknox | it could be way faster, could be a little longer |
| 14:18 | rodnaph | i understand, well good luck anyway, prototype looks fascinating. |
| 14:18 | dsantiago | ibdknox: Are you using a web view as the display component? |
| 14:19 | ibdknox | dsantiago: yep, it seems dumb to me not to at this point |
| 14:19 | ibdknox | it's also the fastest path to something decent |
| 14:19 | dsantiago | I agree. |
| 14:19 | dnolen | CLJS users - I'm thinking about pushing the static fn optimization into the :advanced opimization phase only. you can of course start up a custom REPL with the static fn optimizations on. |
| 14:19 | dnolen | opinions? |
| 14:20 | dsantiago | But I was afraid that it might not be flexible enough to enable a really advanced text editor. But I don't know about that stuff. |
| 14:20 | ibdknox | dnolen: is it slow? or is it just that it munges code too much? |
| 14:20 | yoklov | dnolen: static fn optimization? |
| 14:20 | dnolen | ibdknox: no my main concern is that it stinks for redefinition. |
| 14:21 | dnolen | yoklov: direct calling fns, and well as direct dispatching to a particular arity. |
| 14:21 | ibdknox | dsantiago: I think it'll work out, it'll take some time, but eh - that's how it goes |
| 14:21 | ibdknox | dnolen: good point. That sounds reasonable |
| 14:22 | yoklov | dnolen: right, okay. hm. yeah, sounds fairly reasonable |
| 14:30 | ibdknox | dnolen: is there some trick to getting cljs working with node? I keep getting: Cannot set property 'Unicode' of undefined |
| 14:30 | clojurebot | You don't have to tell me twice. |
| 14:30 | dnolen | k fn optimizations now only applied under advanced optimizations in CLJ master. Redef in peace. |
| 14:31 | dnolen | CLJS master I mean of course. |
| 14:31 | dnolen | ibdknox: yeah you'll see that if you use :simple or :whitespace optimizations I think. |
| 14:32 | dnolen | ibdknox: one second while I remind myself of the issue. |
| 14:35 | dnolen | ibdknox: yes I think the issue is "goog.global = this;" under Node.js |
| 14:35 | ibdknox | I see |
| 14:35 | ibdknox | so I need to use advanced then? |
| 14:38 | dnolen | ibdknox: looking seems like you should be able to set goog.global to something else. |
| 14:57 | dnolen | ibdknox: I think you just have to avoid using only :whitespace optimizations, :simple works. |
| 14:58 | dnolen | ibdknox: the issue is that goog.provide is somewhat meaningless under node |
| 15:08 | hcumberdale | Hi ;) |
| 15:08 | hcumberdale | I'm getting error messages like "Could not find artifact org.clojure:clojure:pom:1.+ in central (http://repo1.maven.org/maven2)" with lein2 |
| 15:22 | bbloom | dnolen: d'oh! Sorry about that |
| 15:24 | bbloom | dnolen: thanks for fixing it. Although the presence of emit-str makes me fear that someone may use it in the compiler itself ;-) I guess we'll just need to get source maps implemented quickly, so that the position tracking logic doesn't have a chance to break :-) |
| 15:25 | bbloom | dnolen: Maybe it should throw an exception if *position* is not nil? |
| 15:33 | hcumberdale | I do not understand the whole (and (or thing ... https://github.com/kremers/mongodb-session/blob/master/src/hozumi/mongodb_session.clj |
| 15:34 | dnolen | bbloom: emit-str not used in the compiler itself, I think CLJS compiler hackers can figure it out. |
| 15:34 | bbloom | dnolen: fair enough :-) |
| 15:35 | hcumberdale | let [entity (and key (congo/fetch-one << ?? why "and key" what does it mean |
| 15:36 | dnolen | bbloom: and since you're here, I'm curious about your workflow as you've described on the ML. |
| 15:36 | antares_ | hcumberdale: that code seems to guard against nil key values that way. It's not idiomatic Clojure if you ask me. |
| 15:36 | bbloom | yeah, let's talk about it |
| 15:36 | dnolen | bbloom: so I take it you don't watch the files and run the REPL at the same time? |
| 15:36 | bbloom | nope |
| 15:36 | antares_ | hcumberdale: if key is nil, and will not evaluate subsequent values |
| 15:36 | bbloom | i like to evaluate individual forms as i work |
| 15:37 | dnolen | bbloom: hmm yeah, that's what I do to avoid the specific situation you're talking about. |
| 15:37 | bbloom | because sometimes i have various functions in half finished states |
| 15:37 | antares_ | hcumberdale: looks like we need to add support for that thing to Monger, huh |
| 15:37 | dnolen | bbloom: but in general I use the REPL a lot as well. |
| 15:37 | bbloom | so in my personal cljs fork, i have dynamic Vars ;-) and those vars implement IWatchable |
| 15:37 | bbloom | so in the little project i'm working on, redefining certain vars can cause parts of the dom to automatically re-render |
| 15:38 | bbloom | but only those rendered by the redefined function! |
| 15:38 | eggsby | Hey #clojure, what sort of questions can I ask about exceptions? |
| 15:38 | bbloom | in order for that to work right, i need to know which symbols go to Var objects and which go to plain old javascript variables |
| 15:39 | antares_ | hcumberdale: monger now has a clojure.core.cache implementation which is similar implementation-wise to this session store. Take a look at monger.cache, maybe code there will be easier to follow ;) |
| 15:39 | eggsby | I'm trying to make an exception logging client and it expects a json dict of 'exception_class', 'backtrace', 'message', 'environment', 'data', and 'url', how could I ask those questions about a given exception? |
| 15:39 | dnolen | bbloom: it's still not clear to me why just watching an re-analyzing the files wouldn't work for you, especially if there was defonce support. |
| 15:40 | hcumberdale | antares_, thx |
| 15:40 | antares_ | hcumberdale: so support for ring session stores will be very similar to support for clojure.core.cache |
| 15:40 | hcumberdale | antares_, I try to rewrite it |
| 15:40 | bbloom | dnolen: it's got to do with the fact that i don't always recall when i last ran the build process… it may have been HOURS ago :-P so what i do, as part of the build process, is save the analysis results to the "out" directory. |
| 15:40 | antares_ | hcumberdale: if you file an issue about this for Monger, I will get to it some time next week |
| 15:41 | bbloom | dnolen: so basically when the browser refreshes, i have a file which matches the state of the browser |
| 15:41 | hcumberdale | yeah, I try to port the session store so it uses monger |
| 15:41 | dnolen | bbloom: oh so you actually try to debug multiple files? |
| 15:41 | yoklov | eggsby: clojure uses its host exceptions, so on the JVM you have java exceptions and in cljs you have JS exceptions |
| 15:41 | antares_ | hcumberdale: very nice. Don't worry about code quality, I will be happy to give you advice or rewrite some bits if necessary. It took us all some time to learn. |
| 15:41 | bbloom | dnolen: oh yeah, it's a various file project with various namespaces |
| 15:42 | antares_ | hcumberdale: by the way, I think this can go to monger.ring.sessions |
| 15:42 | dnolen | bbloom: so how would source mapping affect that? you could easily debug multiple files even if you have a single file in reality. |
| 15:43 | hcumberdale | yeah! |
| 15:43 | bbloom | dnolen: it doesn't really matter if it's one or more files. what matters is that when the repl connects to the browser, the repl has some compiler state and the browser assumes some other compiler state |
| 15:43 | hcumberdale | I'll try me best. The code quality of the existing adapter seems not to be the golden grail |
| 15:43 | bbloom | dnolen: either i can re-analyze what i *think* is the right code. or i can load the exact state that was assumed by the browser |
| 15:44 | bbloom | dnolen: again, consider the debug symbols analogy in the C/C++ world. |
| 15:44 | bbloom | dnolen: I can say "ok, i'm running a release build of commit 12345… so ill git co that version and then rebuild my symbols…. then i'll attach my debugger" |
| 15:45 | bbloom | dnolen: all i'm doing is copying my symbols to the output directory and loading them on attach |
| 15:45 | bbloom | dnolen: make sense? |
| 15:46 | unlink_ | When I run lein ring server, it deletes my java-source-file-compiled classes. lein ring war works. |
| 15:46 | bbloom | dnolen: so i have a :repl key in my project.clj and that repl file just has: (reset! compiler/namespaces (read-string (slurp "out/namespaces.clj"))) |
| 15:46 | bbloom | dnolen: which is produced by my build code with (spit "out/namespaces.clj" (prn-str @compiler/namespaces)) |
| 15:46 | bbloom | dnolen: works a treat :-) |
| 15:48 | dnolen | bbloom: yes, I got that from your ML post - that's pretty interesting. perhaps a feature request for lein-cljsbuild. |
| 15:49 | dnolen | bbloom: I take it you building a largish project in CLJS |
| 15:49 | bbloom | dolen: i'm not using cljsbuild, but only b/c i haven't even looked at it yet |
| 15:50 | dnolen | bbloom: there's lots of stuff better handled by an external tool. I suspected something like lein-cljsbuild could fill holes in what the CLJS compiler provides out of the box. And I think it's turned out to be very true. |
| 15:50 | bbloom | dnolen: and i'd *like to* build a largest project in cljs… but right now, i'm mostly just tinkering with it. my startup runs on ruby, coffeescript, and a hodgepodge of make/bash/sed/awk/whatever, but i'm trying to find an excuse to use some clojure :-) |
| 15:52 | bbloom | dnolen: ok, i'll study cljsbuild a bit |
| 15:52 | bbloom | dnolen: is emezeske the current maintainer? |
| 15:52 | dnolen | bbloom: yes |
| 15:54 | bbloom | dnolen: does he hang out here at all? |
| 15:55 | bbloom | dnolen: anyway, gotta run. thanks for merging my patch! cheers |
| 15:56 | dnolen | bbloom: he does! np, thx much. later. |
| 15:58 | unlink_ | with `lein ring server`, I get Exception in thread "main" java.lang.RuntimeException: java.lang.ClassNotFoundException <my java class> |
| 16:00 | hcumberdale | What means _ here? [_ key data] |
| 16:00 | hcumberdale | (parameter list) |
| 16:00 | unlink_ | hcumberdale: bind the first argument and ignore the value |
| 16:01 | Chousuke | hcumberdale: it's just an idiomatic way to indicate an unused parameter |
| 16:01 | hcumberdale | ahh thx |
| 16:01 | bpr | i'm trying to write a function that takes a function f and returns the arglists of f. My first attempt https://refheap.com/paste/2136 doesn't compile, because f isn't a var. I know this is possible, because the slime repl provides agrname hints. Does anyone have any suggestions? Maybe a pointer to the relevant sections of slime/swank? |
| 16:02 | gfredericks | bpr: the metadata for that is stored on the var, not the function |
| 16:02 | bpr | yes |
| 16:02 | gfredericks | which means if all you have is the function, you can't get much |
| 16:02 | gfredericks | so there's a couple ways to go from there depending on what you can control |
| 16:03 | bpr | how does slime do it then? |
| 16:03 | gfredericks | I assume slime obtains the var one way or another |
| 16:03 | gfredericks | if you know the qualified symbol that points to the var you can get it |
| 16:03 | gfredericks | but if you just have a function with no name or anything... |
| 16:04 | bpr | ok. I'm doing this from within a macro, so I should have the qualified symbol |
| 16:04 | gfredericks | ,(resolve 'clojure.core/for) |
| 16:04 | clojurebot | #'clojure.core/for |
| 16:05 | bpr | thanks |
| 16:05 | gfredericks | well that does something |
| 16:05 | gfredericks | I'm not 100% sure that's` what you want but it might well be |
| 16:06 | bpr | https://refheap.com/paste/2136 <-- seems to be good enough for my uses |
| 16:06 | bpr | thanks, gfredericks |
| 16:06 | gfredericks | bpr: yep |
| 16:08 | mfex | bpr, this is how (doc ...) does it: https://github.com/clojure/clojure/blob/553f4879cad019dd9dc1727165d8a41c216bd086/src/clj/clojure/repl.clj#L120 |
| 16:09 | bpr | mfex: nice. thank you |
| 16:10 | gfredericks | ooh it _does_ involve resolve :) |
| 16:10 | bpr | :-) |
| 16:13 | hcumberdale | mhhh seems the old mongodb session stuff does rely on another ring version |
| 16:14 | hcumberdale | https://github.com/mmcgrana/ring/blob/master/ring-core/src/ring/middleware/session/store.clj << in the tests is something like (write-session store nil {:foo "bar"}) |
| 16:15 | krsanky | ibdknox still here ? |
| 16:32 | hcumberdale | antares_, what can lead to java.lang.ClassCastException: clojure.lang.Keyword cannot be cast to java.lang.String ? |
| 16:32 | antares_ | hcumberdale: you are passing a keyword somewhere when a string is expected |
| 16:32 | hcumberdale | the line is: (mng/insert collection-name (merge data { :_id newkey :_date (Date.) })) |
| 16:33 | antares_ | possibly collection-name is a keyword |
| 16:33 | antares_ | monger always uses strings |
| 16:33 | hcumberdale | ahhh, sec i'll have a look |
| 16:33 | antares_ | if you get a keyword somehow, use (name kwd) to turn it into a string |
| 16:33 | antares_ | not (str kwd) |
| 16:34 | hcumberdale | okay, thx antares_...! |
| 16:38 | hcumberdale | antares_ you were right! |
| 16:39 | ibdknox | krsanky: pong |
| 16:52 | hcumberdale | https://github.com/kremers/monger-session |
| 16:52 | mdeboard | Can you specify a single test to run with lein test? |
| 16:55 | hcumberdale | antares_, works with the tests defined for the old congomongo-session things |
| 16:56 | antares_ | hcumberdale: woohoo! great job! |
| 16:58 | hcumberdale | I get addicted |
| 17:00 | hcumberdale | oO java.lang.IllegalArgumentException: can't serialize class clojure.lang.Keyword |
| 17:00 | hcumberdale | at org.bson.BasicBSONEncoder._putObjectField(BasicBSONEncoder.java:234) ~[mongo-java-driver-2.7.3.jar:na] |
| 17:01 | espeed | How do you use defmulti to create a function that can have zero, one, or two arguments? |
| 17:01 | espeed | (I'm wrapping a Java method) |
| 17:02 | mdeboard | espeed: This is about the only topic that I think the CLojure docs do a good job of explaining |
| 17:02 | mdeboard | espeed: http://clojure.org/multimethods |
| 17:04 | hcumberdale | antares_ I thought keywords can be serialized with monger? |
| 17:06 | antares_ | hcumberdale: they can |
| 17:06 | antares_ | in document values |
| 17:06 | antares_ | but you cannot use them as collection names |
| 17:06 | hcumberdale | okay, I'll try to trace it down |
| 17:12 | groovemonkey | I'm having a problem where (read-line) works fine at the REPL but when I do 'lein run', the terminal doesn't seem to be registering any input (I don't see any letters as I type, and have to ctrl-c out of the process). |
| 17:12 | hcumberdale | antares_ what is going to be written: |
| 17:12 | hcumberdale | {:_flash {:login {:form [Username and password do not match!], :form-data {:roles #{:admin}}}}, :_id 6d591e4f-0967-4f30-b2c8-002a489f36e5, :_date #<Date Sun Apr 15 22:55:30 CEST 2012>, :_sandbar_session {:auth-redirect-uri /admin}} |
| 17:12 | hcumberdale | the data has to be escaped, right? |
| 17:12 | antares_ | hcumberdale: from what I see in this example, no |
| 17:13 | groovemonkey | is stdin mapped differently in a REPL session than when I run from lein? |
| 17:13 | antares_ | as long as it is useful as is |
| 17:13 | ibdknox | groovemonkey: lein trampoline run |
| 17:13 | ibdknox | groovemonkey: you need lein's JVM to get out of the way |
| 17:13 | dabd | I'm trying to create a standalone jar. My -main function has [& args] signature and I want to pass 3 args: one string, one sequence of strings and another string. How can I pass the seq from the linux shell? java -jar myjar "str1" ["a" "b"] "str2" does not work |
| 17:13 | groovemonkey | d'oh, thanks! |
| 17:14 | hcumberdale | antares_ here the complete stacktrace: https://refheap.com/paste/2139 |
| 17:16 | hcumberdale | antares_ and here the file. Error occurs on line 24 https://github.com/kremers/monger-session/blob/master/src/kremers/monger_session.clj |
| 17:18 | antares_ | hcumberdale: hm… |
| 17:18 | antares_ | hcumberdale: can you add a test for monger that stores a similar map and reproduces the issue? |
| 17:18 | antares_ | hcumberdale: actually, I'll do it |
| 17:19 | antares_ | hcumberdale: keep in mind that once we store a keyword, it will really be stored as a string |
| 17:20 | antares_ | hcumberdale: so when loaded back, it will be a string. I think for all intents and purposes, that's fine |
| 17:21 | antares_ | hcumberdale: https://github.com/michaelklishin/monger/commit/5c62e47de77717cf22ad1beca8ebe81e13734428 |
| 17:21 | antares_ | hcumberdale: I pushed a new snapshot, maybe this is something the most recent beta does not support, I don't really remember |
| 17:22 | espeed | mdeboard: thanks. maybe I'm overlooking something, but I don't see anything about defmulti or defmethod taking a variable number of arguments |
| 17:24 | mdeboard | well, that's what they're for. You define one method per signature, iirc anyway. I've never used them seriously. I'm sure someone else has some better info for you than me |
| 17:31 | hcumberdale | antares_, okay I'll write a test for you |
| 17:32 | antares_ | hcumberdale: I already pushed one :) |
| 17:40 | hcumberdale | huh antares_ can't find it. Or do you mean the new snapshot? |
| 17:40 | antares_ | hcumberdale: https://github.com/michaelklishin/monger/commit/5c62e47de77717cf22ad1beca8ebe81e13734428 |
| 17:46 | hcumberdale | antares_ and it works against the test? |
| 17:46 | antares_ | hcumberdale: it does |
| 17:46 | hcumberdale | antares_: see https://github.com/kremers/monger-session/blob/master/test/kremers/test_mongodb_session.clj |
| 17:47 | hcumberdale | (deftest mongoserializablekeywords |
| 17:47 | hcumberdale | this is exactly what is generated by sandbar |
| 17:47 | hcumberdale | I serialized it using (str (binding [*print-dup* true] (prn-str data))) |
| 17:48 | antares_ | hcumberdale: that's what I am saying, try with SNAPSHOT |
| 17:48 | antares_ | maybe it is something specific to master |
| 17:48 | antares_ | I am not sure |
| 17:48 | hcumberdale | okay, I'll try |
| 17:49 | hcumberdale | ERROR in (mongoserializablekeywords) (BasicBSONEncoder.java:234) |
| 17:49 | hcumberdale | Uncaught exception, not in assertion. |
| 17:50 | hcumberdale | My test is still failing, also with the most up to date snapshot |
| 18:01 | Xorlev | clj-zoo-service-tracker -- interesting... |
| 18:08 | pastime | Any positive experience with incanter (Excel lib) http://clojars.org/incanter/incanter-excel |
| 18:10 | zenom | Anyone familiar with leiningen? I am trying to do lein uberjar and when I run the jar with java -jar <filename> I get NoClassDefFoundError |
| 18:13 | gfredericks | zenom: does your class appear in `jar tf <filename>`? |
| 18:13 | zenom | checking |
| 18:14 | zenom | https://gist.github.com/2395056 |
| 18:15 | zenom | its smuggler/core.clj |
| 18:15 | zenom | plus after that is a bunch of more clojure stuff and clojure-contrib |
| 18:15 | gfredericks | zenom: did you set up (:gen-class) for your main ns? |
| 18:15 | zenom | https://github.com/zenom/clojure-knapsack |
| 18:16 | zenom | there is the project right there |
| 18:16 | zenom | I have (ns smuggler.core) in src/smuggler/core.clj |
| 18:16 | gfredericks | that is handy |
| 18:16 | gfredericks | change to (ns smuggler.core (:gen-class)) |
| 18:17 | gfredericks | that tells the compiler to generate the class for which your -main function will be the main method |
| 18:17 | zenom | ah ok, let me do a clean and re-uberjar :) |
| 18:17 | S11001001 | and for a smaller jar, add :clean-non-project-classes true to the project.clj |
| 18:18 | zenom | S11001001: will do |
| 18:18 | zenom | gfredericks: thanks that worked :) |
| 18:18 | gfredericks | zenom: happy smuggling |
| 18:18 | zenom | hehe |
| 18:18 | zenom | its an interesting challenege |
| 18:18 | zenom | never used clojure before this weekend |
| 18:19 | zenom | would love to figure out how to streamline some of the code as well |
| 18:19 | zenom | if you have hints :) |
| 18:19 | S11001001 | com.keminglabs/c2 sounds like a client for the PPR |
| 18:19 | S11001001 | zenom: get-random-number is a slow rand-int |
| 18:19 | zenom | So once I have the standalone jar I can just send that off to someone right? they don't nee anything else? |
| 18:19 | S11001001 | zenom: don't put trailing ) on their own line, ever |
| 18:19 | zenom | S11001001: i just didn't want a 0 possible |
| 18:20 | S11001001 | zenom: then add 1 |
| 18:20 | hcumberdale | antares_ have you seen my test case? |
| 18:20 | gfredericks | zenom: yes the uberjar is self-contained |
| 18:20 | zenom | gfredericks: thanks |
| 18:20 | antares_ | hcumberdale: no |
| 18:20 | zenom | S11001001: ok , will change up the get-random-number and such |
| 18:20 | gfredericks | zenom: avoid def-ing inside a function; you should be able to replace those with let |
| 18:20 | S11001001 | sorry, this is going to be style-wise |
| 18:21 | S11001001 | never use _ for your names, always use - |
| 18:21 | zenom | yeah i thought I changed all those, I guess not |
| 18:21 | zenom | even for vars? |
| 18:21 | zenom | or just methods? |
| 18:21 | zenom | (let [{doll_weight or (let [{doll-weight ? |
| 18:21 | gfredericks | clojure prefers - for everything, unless you have something externally you're coordinating with |
| 18:21 | zenom | gotcha |
| 18:22 | gfredericks | they're prettier :) |
| 18:22 | zenom | I am a ruby/python guy mostly |
| 18:22 | zenom | so used to _ :) |
| 18:22 | zenom | but will change those |
| 18:22 | gfredericks | yeah |
| 18:22 | gfredericks | my snooty opinion is that - is better and would be used in other languages except those languages have an incompatible syntax |
| 18:23 | gfredericks | e.g. in ruby foo-bar is equivalent to foo - bar which obviously means something different |
| 18:23 | zenom | right |
| 18:23 | S11001001 | truth |
| 18:24 | zenom | (+ (rand-int maxsize) 1)) |
| 18:24 | antares_ | hcumberdale: just paste me a value |
| 18:24 | zenom | is that bettre than what I had? |
| 18:24 | gfredericks | zenom: you could use inc instead of +1, but otherwise yeah |
| 18:25 | S11001001 | (dec maxsize) too |
| 18:25 | zenom | ok |
| 18:25 | gfredericks | S11001001: really? |
| 18:25 | zenom | is inc faster / better than + ? |
| 18:25 | S11001001 | ,(vec (take 20 (repeatedly #(inc (rand-int 10))))) |
| 18:25 | gfredericks | eh, just idiomatic I think |
| 18:25 | clojurebot | [7 10 6 2 2 ...] |
| 18:25 | S11001001 | ugh |
| 18:25 | clojurebot | I don't understand. |
| 18:25 | S11001001 | so there's a 10 in there |
| 18:26 | gfredericks | S11001001: I assumed maxsize was inclusive |
| 18:26 | gfredericks | so |
| 18:26 | gfredericks | I guess we both know what we're talking about then |
| 18:26 | S11001001 | not in original get-random-number |
| 18:26 | S11001001 | though I suppose it's up to zenom whether it's meant to be inclusive or exclusive, really |
| 18:26 | hcumberdale | antares_ see : https://github.com/kremers/monger-session/blob/master/test/kremers/test_mongodb_session.clj |
| 18:26 | zenom | basically when i pass 10, I want 1-10 (inclusive) |
| 18:26 | S11001001 | then don't dec |
| 18:27 | S11001001 | but also know your original func was inclusive-exclusive :) |
| 18:27 | dnolen | zenom: inc + will be much the same perf wise. |
| 18:27 | antares_ | hcumberdale: it may be :roles #{:admin}. I am not sure why you needed to use Java methods to build maps, though |
| 18:28 | antares_ | hcumberdale: I will take a look tomorrow |
| 18:28 | hcumberdale | antares_ it is what sandbar creates |
| 18:30 | S11001001 | zenom: you are from ruby, you're familiar with collect, select, and such? |
| 18:31 | zenom | S11001001: collect yes |
| 18:31 | zenom | never messed with select so much |
| 18:31 | S11001001 | these are strongly preferred in clojure |
| 18:31 | S11001001 | generate-shipment is (vec (map #(hash-map :name (str "doll-" %) ...) (range 1 (inc total-dolls)))) |
| 18:32 | antares_ | hcumberdale: I can reproduce it, it is an issue with sets of keywords. I'd recommend that you convert them to strings anyway |
| 18:32 | zenom | will check that out in a min; trying to clean up my _'s :) |
| 18:32 | antares_ | hcumberdale: although I will try to find a solution |
| 18:35 | hcumberdale | antares_ with (binding [*print-dup* true] (prn-str .. ? or what is the best way to do this? |
| 18:36 | antares_ | hcumberdale: I have a fix |
| 18:36 | antares_ | hcumberdale: (map str set-of-keywords) |
| 18:36 | antares_ | sorry |
| 18:36 | antares_ | map by clojure.core/name |
| 18:37 | hcumberdale | (map name set-of-keywords) ? |
| 18:37 | S11001001 | ,(name 42) |
| 18:37 | clojurebot | #<ClassCastException java.lang.ClassCastException: java.lang.Long cannot be cast to clojure.lang.Named> |
| 18:37 | S11001001 | ,(name "42") |
| 18:37 | clojurebot | "42" |
| 18:38 | S11001001 | following Brucio's REEPL method of understanding lisp, name is clearly a function that checks whether its arg is a string, returning it if so, throwing an exception otherwise |
| 18:40 | antares_ | hcumberdale: https://github.com/michaelklishin/monger/commit/6a2698dce2684355fbc2c43b7e580a99c0d2033d |
| 18:40 | antares_ | hcumberdale: yes. But I've pushed a new snapshot that should resolve your issue anyway. Good catch. |
| 18:42 | hcumberdale | okay, pushed new snapshot? |
| 18:43 | Lajla | hcumberdale, you taste like poo. |
| 18:43 | Lajla | Boy, you must get that a lot. |
| 18:46 | hcumberdale | Lajla? |
| 18:47 | dnolen | hcumberdale: Lajla is a troll, just ignore him. |
| 18:48 | hcumberdale | ahhhh |
| 18:49 | laurus | Why can't I use the doc function in the clojure-jack-in repl? |
| 18:50 | gfredericks | laurus: (use 'clojure.repl) |
| 18:51 | laurus | gfredericks, thanks. So I have to run that every time? |
| 18:51 | autodidakto | gfredericks: lein-swank doesn't automatically require it? isn't there a line you can add somewhere to make it do that? |
| 18:51 | autodidakto | I coulda sworn there was... |
| 18:51 | gfredericks | laurus: I think there's a way that autodidakto is alluding to, but I don't know the details |
| 18:51 | gfredericks | well more than alluding |
| 18:52 | gfredericks | he is explicitly talking about it |
| 18:52 | autodidakto | Turn on the technomany signal! And go through the docs just in cas! |
| 18:52 | laurus | Well this will do for now, thanks! Is there anything else I should include? |
| 18:52 | laurus | clojure.somethingelse I mean |
| 18:52 | gfredericks | technomancy: would probably just say to use the emaxy-swank-whatsit functions instead |
| 18:52 | gfredericks | C-x C-d M-x M-u C-d or something |
| 18:52 | autodidakto | laurus: for doc, no |
| 18:52 | laurus | autodidakto, I mean, for other useful things. |
| 18:53 | autodidakto | gfredericks: lol, i think in this case it goes in your init.clj/project.clj or something |
| 18:53 | laurus | autodidakto, l |
| 18:53 | autodidakto | laurus: you'll find them in time. pprint is common |
| 18:53 | laurus | clojure.pprint? |
| 18:53 | autodidakto | think so |
| 18:53 | gfredericks | yeah |
| 18:53 | laurus | Thanks. |
| 18:54 | antares_ | hcumberdale: does the most recent snapshot work for you? |
| 18:55 | autodidakto | The technomancy bat signal -> triggering all his keywords at once -> "technomany, emacs, vim, heroku, xmonads, leingingen, debian" ... hmm what else? |
| 18:55 | ibdknox | to answer some of the questions on Light Table: http://www.chris-granger.com/2012/04/15/light-tables-numbers/ |
| 18:55 | autodidakto | bah, misspelled his name anyways |
| 18:55 | autodidakto | leiningingiengienge |
| 18:55 | gfredericks | "technomany" is his plural name |
| 18:55 | autodidakto | Must be slavic |
| 18:56 | autodidakto | Or his undead computer army |
| 18:56 | zenom | Ok, any ideas how to clean up the fill-handbag? :) |
| 18:56 | zenom | https://github.com/zenom/clojure-knapsack/blob/master/src/smuggler/core.clj |
| 18:56 | zenom | i cleaned up the rest, and greatly appreciate your help guys |
| 18:57 | gfredericks | (= 0) is (zero?) |
| 18:58 | zenom | ok let me look that up, im assuming thats just a helper for = 0 |
| 18:58 | zenom | but increases readability |
| 18:58 | gfredericks | yeah that's all |
| 18:59 | gfredericks | there's a lot of stuff like that when learning clojure |
| 18:59 | gfredericks | not too important I guess |
| 19:03 | gfredericks | zenom: it's much better than I'd expect for someone starting out |
| 19:03 | Lajla | hcumberdale, it's not from salad fingers? |
| 19:03 | Lajla | THe cartoon? |
| 19:03 | Lajla | There's a chatracter called humbert cumberdale in iot |
| 19:03 | zenom | cool, still want to figure out how to clean up fill-handbag, so going to try and look around more |
| 19:03 | zenom | seems bulky to me. like it needs a refactor hehe |
| 19:04 | hcumberdale | Lajla, cartoon spoon |
| 19:05 | hcumberdale | yes |
| 19:05 | hcumberdale | It is from salad fingers |
| 19:07 | Lajla | hcumberdale, ah yes |
| 19:08 | Lajla | Well, Salad Finger says in it 'Ohhh, Huber Cumberdale, you taste like poo' when he tastes him |
| 19:08 | Lajla | which, dnolen is by the way why the word 'troll' is completely overrated and nowadays just sprayed around by every person who doesn't understand what some-one means. |
| 19:11 | hcumberdale | he really said this? |
| 19:12 | Lajla | Yes |
| 19:12 | Lajla | in the episode cumberdale was introduced in |
| 19:13 | Lajla | hcumberdale, http://www.youtube.com/watch?v=cuCw5k-Lph0&feature=fvsr seconmd episode apparently |
| 19:17 | emacs_newb | so I recently tried using slime + clojure |
| 19:17 | emacs_newb | mind = blown |
| 19:18 | emacs_newb | it's amazing; I can't believe I haven't used this for the past 10 years |
| 19:18 | hcumberdale | yeah! |
| 19:18 | hcumberdale | it works now |
| 19:19 | emacs_newb | life without slime :: life with clojure = using a keyboard :: having computer read my mind |
| 19:19 | emacs_newb | s/clojure/slime |
| 19:19 | emacs_newb | there's something about having a live repl that just increases flow / focus |
| 19:21 | hcumberdale | Lajla, super awesome |
| 19:24 | hcumberdale | Is there a tool to get rid of all things I do not use from my .jar files? |
| 19:25 | hcumberdale | slamhound is nice for imports but it does not work in my project |
| 19:28 | S11001001 | hcumberdale: no; clojure tree-shaking is a reduction of the halting problem |
| 19:28 | hcumberdale | antares_ it's working! |
| 19:28 | hcumberdale | I pushed the latest version to github and clojars |
| 19:28 | antares_ | hcumberdale: cool. We will release next beta soon. |
| 19:31 | hcumberdale | I also changed it to work with strings ,... ;) |
| 19:31 | hcumberdale | super-super-awesome |
| 19:31 | hcumberdale | now it's time to go to bed |
| 19:31 | hcumberdale | 01:26 ... |
| 19:35 | _KY_ | Is 2Gb memory too small for Enclojure to compile projects? |
| 19:48 | zenom | does clojure 1.3 have a min java version or anything? |
| 19:53 | septomin_ | ibdknox: looking forward to seeing the reward tiers |
| 19:53 | ibdknox | here's the preview: http://www.kickstarter.com/projects/306316578/698018053?token=27376c21 |
| 19:54 | ibdknox | if there are suggestions for the rewards, I'd be interested in hearing them :) |
| 19:59 | septomin_ | hmm, maybe some kind of fancy printed manual |
| 19:59 | aperiodic | stickers! |
| 19:59 | aperiodic | everybody loves stickers |
| 20:00 | brehaut | ibdknox: have raynes and amalloy complained about the color scheme yet? |
| 20:01 | ibdknox | lol |
| 20:01 | brehaut | :) |
| 20:01 | ibdknox | people and their damn colors :p |
| 20:01 | ibdknox | aperiodic: oo, I did forget stickers... |
| 20:03 | ibdknox | septomin_: that's an interesting idea too |
| 20:04 | ibdknox | we used to give out shortcut cards for VS |
| 20:17 | ibdknox | rofl |
| 20:17 | ibdknox | I just got this email: https://refheap.com/paste/2140 |
| 20:21 | _KY_ | How can I change directory in the REPL? |
| 20:22 | brehaut | ibdknox: thats… wow |
| 20:22 | gfredericks | _KY_: jvm doesn't let you change working directory |
| 20:22 | gfredericks | $google github raynes fs |
| 20:22 | lazybot | [Raynes/fs · GitHub] https://github.com/Raynes/fs |
| 20:23 | Licenser | ibdknox seriousely? |
| 20:23 | gfredericks | but that ^ might interest you |
| 20:23 | Licenser | I mean the people thing .NET is a language o.O |
| 20:23 | Licenser | *think |
| 20:23 | brehaut | i presume he wants support for .NET IL |
| 20:23 | devn | 200k? |
| 20:24 | ibdknox | brehaut: that still doesn't really make sense |
| 20:24 | ibdknox | lol |
| 20:24 | ibdknox | CLR IL would, I guess |
| 20:25 | ibdknox | though you couldn't do anything meaningful with *just* that |
| 20:25 | ibdknox | in any case I loved the "clojure is outdated" |
| 20:25 | brehaut | especially compared to python |
| 20:26 | ibdknox | half a decade = time to deprecate ;) |
| 20:26 | brehaut | in favour of a decade and a half old language |
| 20:27 | septomin_ | ibdknox: maybe tutorial videos? |
| 20:27 | ibdknox | I thought of doing some totally different things |
| 20:27 | septomin_ | or an in-person thing, you're in SF right? |
| 20:27 | ibdknox | yeah I was thinking of something like that |
| 20:27 | _KY_ | How do I display the classpath in REPL? |
| 20:27 | ibdknox | one of the company ones would be have me come in and speak |
| 20:28 | ibdknox | or more startupy one, use me for a day to solve a problem |
| 20:28 | ibdknox | not sure if those are interesting though |
| 20:29 | TimMc | &(find {:a 1 :b 2 :c 3} :b) |
| 20:29 | lazybot | ⇒ [:b 2] |
| 20:29 | TimMc | Huh. |
| 20:29 | ibdknox | devn: were you questioning the 200k goal? |
| 20:29 | ibdknox | ,(doc find) |
| 20:29 | clojurebot | "([map key]); Returns the map entry for key, or nil if key not present." |
| 20:30 | ibdknox | TimMc: ? |
| 20:30 | TimMc | Oh, it's just new to me, that's all. |
| 20:30 | gfredericks | ,(-> {:a 1} (find :a) type) |
| 20:30 | clojurebot | clojure.lang.MapEntry |
| 20:30 | ibdknox | I knew it existed, but have never cared to use it |
| 20:30 | ibdknox | lol |
| 20:31 | gfredericks | I can't imagine it has any high-level use |
| 20:31 | gfredericks | well _maaaay_be |
| 20:31 | TimMc | I discovered it when a defn collided with it. |
| 20:31 | ibdknox | me too |
| 20:31 | ibdknox | lol |
| 20:31 | TimMc | like an uncharted shoal |
| 20:32 | bpr | haha |
| 20:32 | gfredericks | I guess it might be the easiest way to filter a map by a set of keys? |
| 20:32 | gfredericks | as in (into {} (map #(find m %) my-keys)) |
| 20:33 | ibdknox | gfredericks: select-keys |
| 20:33 | ibdknox | ,(doc select-keys) |
| 20:33 | clojurebot | "([map keyseq]); Returns a map containing only those entries in map whose key is in keys" |
| 20:33 | gfredericks | crap and I even know all about select keys |
| 20:33 | gfredericks | find has foiled me again |
| 20:33 | ibdknox | lol |
| 20:34 | ibdknox | ,(source select-keys) |
| 20:34 | clojurebot | Source not found |
| 20:34 | ibdknox | &(source select-keys) |
| 20:34 | lazybot | java.lang.RuntimeException: Unable to resolve symbol: source in this context |
| 20:34 | ibdknox | aw |
| 20:34 | gfredericks | you bots are worthless |
| 20:34 | ibdknox | I was wondering if maybe it used find under the covers |
| 20:34 | gfredericks | $source select-keys |
| 20:34 | lazybot | select-keys is http://is.gd/SzyhyJ |
| 20:34 | gfredericks | I bet the link goes to the wrong line |
| 20:35 | ibdknox | yeah not even close |
| 20:35 | gfredericks | ibdknox: it does! |
| 20:35 | gfredericks | I mean it does use find |
| 20:35 | ibdknox | well there you go |
| 20:35 | gfredericks | but that contradicts my "high-level" qualification |
| 20:35 | gfredericks | so maybe we're back to it's worthless |
| 20:36 | gfredericks | well it does keep TimMc from using nice simple function names |
| 20:37 | ibdknox | so that's a win really :p |
| 20:40 | _KY_ | Can someone tell me how to run a simple clj file? just using the REPL or java -cp ? |
| 20:40 | gfredericks | load-file from the repl should work |
| 20:41 | _KY_ | Thanks... |
| 21:00 | Licenser | if I've a syntax error in a cljs project can I find out where the problem is? |
| 21:03 | TimMc | _KY_: There's also a one-off plugin for leiningen |
| 21:04 | krsanky | ibdknox: nice email u must have fans :P |
| 21:04 | _KY_ | I'm trying to use enclojure... but the JVM won't start because of low memory... I have 2GB RAM, dunno why |
| 21:05 | yoklov | Licenser: not really |
| 21:05 | Licenser | :( |
| 21:06 | septomin_ | is there a shortcut for (partial keep identity)? |
| 21:06 | yoklov | what's the problem? |
| 21:06 | krsanky | sry ibdnox im just reading your posts because im all up in noir |
| 21:07 | ibdknox | krsanky: lol, I get some weird emails sometimes ;) |
| 21:07 | yoklov | Licenser, i've found that running the repl helps a lot, as does compiling frequently. you also get good at telling what the errors mean |
| 21:07 | krsanky | that means your doing something right ! |
| 21:07 | ibdknox | haha |
| 21:07 | ibdknox | does anyone know if python devs still outnumber ruby ones? |
| 21:07 | Licenser | yoklov yea I have a bad {} in there somewhere |
| 21:07 | krsanky | i LOVE python |
| 21:08 | ibdknox | krsanky: what's your favorite python dev tool? |
| 21:08 | krsanky | ? |
| 21:08 | septomin_ | that's probably going to depend a lot on how you define "python dev" |
| 21:08 | krsanky | i learned python just for django way back |
| 21:09 | ibdknox | krsanky: what editor/IDE did you or do you use for it, is what I was asking :) |
| 21:09 | krsanky | but ii use vim or emacs |
| 21:09 | ibdknox | septomin_: I know for the longest time academia pushed it well above ruby |
| 21:09 | Licenser | is there a way to run a remote reply on a node.js deployment? |
| 21:10 | septomin_ | ibdknox: well, that and a lot of scripting |
| 21:10 | ibdknox | also true |
| 21:10 | septomin_ | not many people consider themselves bash devs |
| 21:10 | krsanky | i do! |
| 21:10 | ibdknox | lol |
| 21:10 | krsanky | im a sysadmin 1st |
| 21:10 | ibdknox | I'm just thinking around what the next language might be |
| 21:10 | krsanky | clojure duh ! |
| 21:11 | septomin_ | the python IDEs were all quite bad the last i looked |
| 21:11 | ibdknox | krsanky: clojure + JS are first ;) |
| 21:11 | krsanky | python is just easier and doesnt have the startup time problem |
| 21:11 | yoklov | Licenser: hm, no clue, maybe someone else knows. There also might be something in the https://github.com/emezeske/lein-cljsbuild docs. |
| 21:11 | krsanky | clojure makes me smile when i do get it |
| 21:12 | Licenser | yoklov thanks :) sadly not using lein |
| 21:12 | septomin_ | i think the main reason is that it's very hard to do static type analysis well in python |
| 21:13 | krsanky | dont lisp people shun IDEs ? |
| 21:13 | ibdknox | lisp has had quite a few interesting dev envs over the years |
| 21:14 | krsanky | yeah i spoke fast i saw an old vid with steele and some others steele liked the IDEs |
| 21:14 | clojurebot | It's greek to me. |
| 21:15 | krsanky | ive only liked using the MS one way back |
| 21:15 | krsanky | eclipse kinda is not fun |
| 21:15 | yoklov | i really like that you can view changes in your code live in eclipse. |
| 21:15 | yoklov | live == when you save |
| 21:15 | krsanky | is that the counterclockwise one ? |
| 21:15 | ibdknox | yoklov: hm? |
| 21:15 | septomin_ | ibdknox: so generally I think something like lighttable is most interesting where people are mainly using text editors |
| 21:16 | ivan | ibdknox: why would you want to suffer the pain of Python? |
| 21:16 | ivan | (and IntelliJ/PyCharm is nice) |
| 21:16 | ibdknox | septomin_: I believe that's mostly true |
| 21:17 | ibdknox | ivan: python's a decent enough language :) I was mostly thinking in terms of expanding reach |
| 21:17 | ibdknox | no one collects good stats on the number of devs for things it seems |
| 21:17 | yoklov | ibdknox: if you are running in debug mode, you can edit some method in a class, save the file, and then next time that method gets called, the change occurs. i've found it quite useful for UI/game development |
| 21:17 | septomin_ | i'm also kind of skeptical of performance on something like a large C++ project |
| 21:17 | ivan | I have used Python for large applications and you run into pretty much all of the problems that Clojure has solved |
| 21:17 | ibdknox | I know there are around 6 million .NET folks out there |
| 21:17 | krsanky | ibdnox: i dont envy you trying to make a paradigm shifting editor/env |
| 21:17 | ivan | plus it is slow |
| 21:18 | ivan | and does not really compile to JS |
| 21:18 | ibdknox | yoklov: ah, that |
| 21:18 | krsanky | id for sure try it |
| 21:18 | ibdknox | krsanky: I have at least some idea of the mess I've gotten myself into ;) |
| 21:19 | krsanky | ibdknox: you can do it! |
| 21:19 | krsanky | :) |
| 21:19 | septomin_ | why do you think it is that the state of the art is so bad, anyway |
| 21:20 | yoklov | ibdknox: yeah, it's quite limited but still more powerful than a lot of other ways of doing gui development… tragically. (hopefully you'll change that though :) |
| 21:21 | ibdknox | septomin_: are you asking me? |
| 21:22 | ivan | ibdknox: if you get into Python, #twisted is where the cool people hang out. #python is agony. |
| 21:22 | ibdknox | I wrote a fair amount of stuff in python a couple years ago |
| 21:22 | septomin_ | i just mean in general |
| 21:22 | kovasb | for clojure the state of the art is emacs, which is showing its age.. |
| 21:23 | kovasb | not great for webdev or graphics |
| 21:23 | septomin_ | why we still have largely the same compilation model as in the 70s |
| 21:23 | ivan | Sublime Text has brought some really cool editor innovations that no one is copying |
| 21:23 | yoklov | kovas: why do you say its bad for graphics? |
| 21:23 | ivan | multiple cursors/selections, especially |
| 21:23 | ivan | Emacs can't even keep the cursor outside of the viewport |
| 21:23 | ibdknox | ivan: we had that in VS :) |
| 21:23 | ivan | ibdknox: really? did it ship? |
| 21:23 | ibdknox | septomin_: a number of reasons |
| 21:23 | ibdknox | yeah |
| 21:24 | ivan | whoa. how come it's not on reddit and stuff? |
| 21:24 | ibdknox | nobody likes VS :p |
| 21:24 | ibdknox | well correction, the people on HN and Reddit don't like VS |
| 21:24 | yoklov | kovasb: (whoops, had spelt your name wrong)why do you say emacs is bad for graphics |
| 21:24 | kovasb | yoklov: if you are calling outside packages to render your graphics, that is suboptimal in many ways |
| 21:24 | ivan | ibdknox: I see "multiple line". does it handle multiple cursors in the same line? |
| 21:25 | ibdknox | that might have ended up as an extension, but it definitely exists |
| 21:25 | ivan | okay |
| 21:25 | ibdknox | I think it was called multi-stream selection or something |
| 21:25 | kovasb | yoklov: the consequence is that the graphics is no longer integrated into the working environment, its in an outside box somewhere |
| 21:25 | yoklov | kovasb: hm, not quite sure what you mean, outside packages as in… not rendering in an emacs buffer |
| 21:25 | ibdknox | septomin_: I think one of the main reasons our tools are the way they are is because only devs care about them and in my experience design and dev are a very rare combination of skill sets |
| 21:26 | kovasb | yoklov: yes, the choice is either to use emacs directly for graphics (which no one does for clojure), or use a JVM-based graphics lib |
| 21:26 | yoklov | kovasb: ah, okay, i agree that that sucks, however i don't know how much better newer tools are for that. (aside from full-blown IDEs) |
| 21:27 | kovasb | yoklov: I used / worked for Mathematica for many years, its light years better |
| 21:27 | ibdknox | wooooow |
| 21:27 | ibdknox | what a troll |
| 21:27 | kovasb | yoklov: but there are other beefs with emacs besides that. Its just showing its age in many ways |
| 21:28 | gfredericks | I used bananas for eating for many years; they're light years better |
| 21:28 | kovasb | lol |
| 21:29 | ibdknox | http://groups.google.com/group/light-table/browse_thread/thread/f3109d5fdfea5f90 |
| 21:29 | ibdknox | it is way too early for that shit |
| 21:29 | ibdknox | lol |
| 21:29 | kovasb | loool |
| 21:30 | kovasb | looks like the honeymoon is over :) |
| 21:30 | ibdknox | haha |
| 21:30 | yoklov | kovasb: i'll agree web development can be a bit awkward, especially if you don't have control over the file (e.g. someone used a <style> or <script> tag, as MuMaMo et al. are awkward) |
| 21:31 | kovasb | yoklov: yeah. I mean I like emacs. But its a problem when you can't natively/easily represent the stuff you are trying to create |
| 21:31 | gfredericks | I like "Chris himself" |
| 21:32 | kovasb | I mean, he has a point about size of market |
| 21:32 | kovasb | but funny |
| 21:32 | kovasb | how big is the lua market anyway?? |
| 21:32 | lazybot | kovasb: Definitely not. |
| 21:32 | ibdknox | kovasb: hence JS |
| 21:32 | kovasb | yea exactly |
| 21:33 | ibdknox | lowest level of annoyance for highest return |
| 21:33 | ibdknox | support JS will be at least one if not two orders of magnitude harder than Clojure |
| 21:34 | ibdknox | in any case, the more money it raises, the more people I can hire to expand the languages out |
| 21:34 | ibdknox | that will address itself |
| 21:34 | ibdknox | especially with it being an open platform |
| 21:34 | gfredericks | ibdknox: separate kickstarter for each language :) |
| 21:34 | ibdknox | haha that would be interesting only in order to see how it played out |
| 21:35 | ibdknox | it would be a very good way to understand the market associated with each sector of the dev world |
| 21:35 | ibdknox | but I have plans for more than just the IDE portion :) |
| 21:36 | kovasb | henceforth I will refer to myself as "a member of the code writing industry" |
| 21:36 | kovasb | clearly this guy programs in java for a living |
| 21:36 | ibdknox | lol |
| 21:36 | kovasb | how many lines of code did you produce today, huh?? |
| 21:36 | lazybot | kovasb: Definitely not. |
| 21:37 | gfredericks | kovasb: why do you always have to trigger lazybot's boolean replies??? |
| 21:37 | lazybot | gfredericks: Oh, absolutely. |
| 21:38 | kovasb | gfredericks: i haven't read the source yet |
| 21:38 | kovasb | gfredericks: either that or it has it out for me |
| 21:38 | gfredericks | kovasb: I was facetiously complaining; just wanted to trigger it myself. it's just the repeat question makrs at the end |
| 21:39 | gfredericks | right lazybot??? |
| 21:39 | lazybot | gfredericks: Yes, 100% for sure. |
| 21:39 | ivan | Are you sure it's just that?? |
| 21:39 | lazybot | ivan: What are you, crazy? Of course not! |
| 21:39 | gfredericks | I miss sexpbot |
| 21:39 | yoklov | lol |
| 21:39 | yoklov | great name |
| 21:39 | kovasb | Anyway I came into the room because I have a serious question |
| 21:40 | kovasb | I'm getting the cljs "Can't recur here" error |
| 21:40 | ibdknox | you AOT'd the compiler |
| 21:40 | kovasb | its not the "delete the classes folder" solution |
| 21:40 | ibdknox | delete classes |
| 21:40 | ibdknox | hm |
| 21:40 | kovasb | I'm trying to combine several cljs projects |
| 21:40 | ibdknox | you need to add the skip-aot thing too |
| 21:41 | kovasb | ok will try that |
| 21:41 | kovasb | but that error = aot'ing the compiler? |
| 21:42 | ibdknox | usually |
| 21:42 | ibdknox | or you're actually recuring someplace you can't |
| 21:42 | ibdknox | but that's pretty hard to do |
| 21:42 | kovasb | its weird because it seems transient |
| 21:42 | ibdknox | it's likely the AOT stuff then |
| 21:42 | kovasb | I'm using noir-cljs and himera |
| 21:42 | ibdknox | if the cljs compiler gets aot'd terrible things happen |
| 21:42 | kovasb | id did some exclusions and i thought i fixed it.. |
| 21:43 | kovasb | ibdknox: does noir-cljs do the same thing as the lein cljsbuild once? |
| 21:43 | ibdknox | no, it watches |
| 21:43 | kovasb | right, but once its starts to compile |
| 21:44 | kovasb | i think i have clojurescript in 3 places here |
| 21:44 | ibdknox | could be version mismatches or something then |
| 21:44 | kovasb | cljsbuild, noir-cljs, and himera |
| 21:45 | kovasb | i guess i will try excluding more libs until it works again |
| 21:48 | ibdknox | I suspect CodeMirror is about to get a shit ton better |
| 21:48 | ibdknox | lol |
| 21:49 | kovasb | that would be awesome |
| 21:49 | kovasb | what made you choose that over ace? |
| 21:49 | ibdknox | haha someone asked that on the latest HN thread: http://news.ycombinator.com/item?id=3845316 |
| 21:50 | ibdknox | tldr: it had better clojure support and wasn't a pain in the ass to setup |
| 21:50 | ibdknox | either I was just doing it wrong or the ACE instructions are terrible (haven't checked in a while, maybe it got better) |
| 21:50 | ibdknox | Something about the CodeMirror project just made me like it more too |
| 21:52 | kovasb | I spent an evening looking at the various options |
| 21:52 | kovasb | I like how ace highlights closing brackets |
| 21:52 | ibdknox | so does codemirror :) |
| 21:52 | ibdknox | you just have to turn it on |
| 21:52 | kovasb | ah :) |
| 21:52 | ibdknox | I'm really hoping someone writes paredit for it :) |
| 21:53 | ibdknox | shouldn't be *that* hard |
| 21:53 | kovasb | i was able to get it to work easily but the ace api does look a bit ughly |
| 21:53 | kovasb | i would kill for that |
| 21:53 | ibdknox | and might be a neat exercise |
| 21:53 | ibdknox | lol maybe that should be one of the filters for hiring |
| 21:53 | ibdknox | write paredit for CodeMirror |
| 21:54 | ibdknox | I'm really interested in how the balancing act between open source and business plays out here. |
| 21:54 | ivan | wishlist: variable-width fonts in CodeMirror with automatically fixed alignment |
| 21:55 | kovasb | there is always the hosting route |
| 21:55 | kovasb | people create cool shit with your tool.. want it hosted somewhere |
| 21:55 | septomin_ | it might be nice to clarify what a license entails |
| 21:56 | ibdknox | septomin_: I agree |
| 21:56 | kovasb | in terms of quick wins, could get bought by heroku/salesforce |
| 21:56 | ibdknox | longer term vision is a lot bigger than a quick win, which I think I would want to stick out for |
| 21:57 | kovasb | how are all these other projects getting funded |
| 21:57 | kovasb | firebase etc |
| 21:57 | ibdknox | they're YC |
| 21:57 | kovasb | ah |
| 21:57 | ibdknox | which I may be too, we'll have to see. |
| 21:57 | ibdknox | septomin_: I think to download the actual thing (not the source) you will need a license, but ultimately I expect that will probably be a pay what you think it is worth model. |
| 21:58 | eggsby | I know the biz I work for is really interested in clj, they're pretty ~enterprisey~, then there's stuff like runa too |
| 21:58 | ibdknox | septomin_: in terms of the future I think there are plugins that would be worth a lot in specific domains |
| 21:58 | eggsby | ibdknox: just go the jetbrains route of community version and licensed |
| 21:59 | ibdknox | oh man, I completely forgot they did this |
| 21:59 | ibdknox | eggsby: good call, I should talk to those guys. I worked with them at MSFT |
| 22:03 | muhoo | ibdknox: i'd suggest, write it in cljs. do it for clojure. then hire someone to port it to js |
| 22:03 | gfredericks | licensed version supports vectors and maps |
| 22:03 | muhoo | who wants to do that? someone who actually likes js, that's who. |
| 22:03 | ivan | why would you need to port it to JS? |
| 22:04 | muhoo | well, not port it, but add the modules to make it handle editing js |
| 22:04 | ivan | ah |
| 22:04 | muhoo | but if you do all the design and productization stuff in cljs, really finish it up, not only will it go faster, and be more fun, but it'll be awesome for all of us :-) |
| 22:05 | muhoo | then, like i said, shouldn't be hard to find someone who just LOOOVES js. they seem to be everywhere. and your cljs code serves as a design document and interface document. |
| 22:06 | spoon16 | Anyone know how to get clojurescript to output a comment at the top of the compiled output.js file? http://stackoverflow.com/questions/10167896/building-a-user-script-for-chrome-using-clojurescript-how-can-i-get-the-userscr |
| 22:09 | echo-area | How to specify compilerarg for javac-opts in leiningen? |
| 22:14 | espeed | Anyone working with Datomic yet? |
| 22:16 | kovasb | espeed: I'm holding off until the dynamodb version is released |
| 22:17 | espeed | any idea when that will be? |
| 22:19 | kovasb | i hope in the next month or two, but who knows |
| 22:19 | kovasb | they are probably spending a lot of time on debugging and testing |
| 22:26 | y3di | granger on a roll |
| 22:27 | unlink_ | I can't seem to get lein ring war working with leiningen 2. http://dpaste.com/732296/ /cc weavejester |
| 22:28 | krsanky | i am a level 23 magic user and here come the fireballs to the emacs haters |
| 22:29 | krsanky | its one thing to improve in a thing ... |
| 22:29 | krsanky | on* |
| 22:40 | zenlike | Anyone there? I need a spot of help. |
| 22:40 | zenlike | Can't figure out how to store functions sequentially... |
| 22:40 | zenlike | this works fine: |
| 22:40 | zenlike | ,(list + - * /) |
| 22:40 | clojurebot | (#<core$_PLUS_ clojure.core$_PLUS_@1b04ab2> #<core$_ clojure.core$_@cbee0d> #<core$_STAR_ clojure.core$_STAR_@91bc33> #<core$_SLASH_ clojure.core$_SLASH_@103cd1b>) |
| 22:41 | zenlike | but I can't figure out how to get, say, a sin function in that list |
| 22:41 | zenlike | this works: |
| 22:41 | zenlike | ,(Math/sin 3.14) |
| 22:41 | clojurebot | 0.0015926529164868282 |
| 22:41 | kovasb | Math/sin is not a function |
| 22:41 | zenlike | but this throws an exception: |
| 22:41 | gfredericks | oh you want a java method |
| 22:41 | zenlike | it's a java method, not a clojure function? |
| 22:42 | gfredericks | what's the function that makes a function from a java method :/ |
| 22:42 | gfredericks | zenlike: yeah |
| 22:42 | kovasb | try #(Math/sin %) |
| 22:42 | gfredericks | well that'll work |
| 22:42 | zenlike | ,(list #(Math/sin %) + - /) |
| 22:42 | clojurebot | (#<sandbox$eval80$fn__81 sandbox$eval80$fn__81@181392b> #<core$_PLUS_ clojure.core$_PLUS_@1b04ab2> #<core$_ clojure.core$_@cbee0d> #<core$_SLASH_ clojure.core$_SLASH_@103cd1b>) |
| 22:42 | zenlike | cool, that seemed to work |
| 22:42 | zenlike | kovasb: care to elaborate a bit on that syntax? |
| 22:42 | zenlike | or point me to good references? |
| 22:43 | kovasb | yes, thats shorthand for (fn [x] (Math/sin x)) |
| 22:43 | zenlike | interesting |
| 22:43 | zenlike | is there info about that in the clojure docs? |
| 22:43 | zenlike | that shorthand, i mean. |
| 22:43 | gfredericks | that's generic anonymous function syntax |
| 22:43 | gfredericks | equivalent to (fn [x] (Math/sin x)) |
| 22:44 | kovasb | sort of. its under the "reader" section |
| 22:44 | zenlike | gfredericks: So the # demarcates that as a function, and the % is "anonymous args"? |
| 22:44 | zenlike | *demarcates as an anon function |
| 22:44 | devn | zenlike: % is 1 arg |
| 22:45 | zenlike | would %(+ % %) be for a two argument function? |
| 22:45 | zenlike | whoops, i meant #(+ % %) |
| 22:45 | eggsby | % is all args isn't it? |
| 22:45 | eggsby | and %1 %2 %3 for nth of the forms |
| 22:46 | devn | ,(#(+ %1 %2 %3) 1 2 3) |
| 22:46 | gfredericks | %& is all |
| 22:46 | clojurebot | 6 |
| 22:46 | gfredericks | ,(#(vector % %1 %2 %3 %&) 1 2 3) |
| 22:46 | clojurebot | [1 1 2 3 nil] |
| 22:46 | gfredericks | hrmph |
| 22:46 | devn | ,(#(apply + %&) 1 2 3) |
| 22:46 | clojurebot | 6 |
| 22:47 | gfredericks | ,(#(vector % %1 %2 %3 %&) 1 2 3 4 5 6) |
| 22:47 | clojurebot | [1 1 2 3 (4 5 6)] |
| 22:47 | kovasb | you repeated %1 |
| 22:47 | kovasb | % = %1 |
| 22:47 | gfredericks | I guess %& is the rest of the ones you didn't mention |
| 22:47 | gfredericks | ,(#(vector %3 %&) 1 2 3 4 5 6) |
| 22:47 | clojurebot | [3 (4 5 6)] |
| 22:47 | devn | yes |
| 22:47 | devn | %& is the same as & args |
| 22:47 | gfredericks | so there isn't an all-the-args form |
| 22:47 | zenlike | interesting. thanks for the help. |
| 22:48 | zenlike | so using that / syntax, as in #(Math/sin %), that "/" indicates a method of a java module, in this case Math? |
| 22:49 | kovasb | its a static method |
| 22:49 | gfredericks | zenlike: the slash indicates a fully-qualified symbol |
| 22:50 | gfredericks | the first part can be one of several different things |
| 22:50 | kovasb | if Math was a class instance, then you would use (.sin Math x) |
| 22:50 | zenlike | so what is Math? a library? |
| 22:50 | TimMc | ibdknox: I'm getting my introduction to Noir by writing a wedding gift registry site for myself and my fiancée. :-D |
| 22:50 | gfredericks | zenlike: Math is a class |
| 22:50 | zenlike | ah, i see. |
| 22:50 | zakwilson | Noir is good stuff. |
| 22:50 | zenlike | in java you can just use methods from classes like that without having to make an instance? |
| 22:51 | zakwilson | Static methods. |
| 22:51 | gfredericks | zenlike: that's the difference between "static" and "instance" methods |
| 22:51 | ibdknox | TimMc: nice! |
| 22:51 | zenlike | i see. |
| 22:51 | TimMc | ibdknox: and Korma, and Hiccup... |
| 22:52 | TimMc | Gonna check out Lobos at some point too. |
| 22:52 | ibdknox | I love the Clojure community :) |
| 22:52 | TimMc | amen |
| 22:52 | TimMc | 200 lines of code, and I almost have a gift registry |
| 22:52 | TimMc | just need to handle one more POST |
| 22:53 | kovasb | i don't understand why clojure doesn't provide a standard library for all that math stuff |
| 22:53 | ibdknox | I'd call that a win |
| 22:53 | TimMc | Adding administrative stuff would take a bunch more code, so we'll just edit the SQLite DB directly. :-P |
| 22:53 | eggsby | How do you guys write tests for the routes in noir/compojure ? |
| 22:53 | kovasb | why require people to learn about java for basic things.. |
| 22:54 | zenlike | kovasb: yeah, that kind of confuses me too. do you think it's because the language is still pretty young, or because it's supposed to be set up that way? |
| 22:54 | TimMc | and calling it a night. |
| 22:54 | eggsby | kovasb: meh, it's generally useful information and helps you learn about interoperability features too |
| 22:54 | zenlike | like, if i didn't have any previous OO or java experience i'd be really lost trying to pick up clojure |
| 22:54 | gfredericks | the folk don't like wrapping things just for the sake of wrapping them |
| 22:54 | kovasb | zenlike: i think that the core clojure team just doesn't feel the pain of the newbie |
| 22:55 | ibdknox | I think people just aren't doing that much math? |
| 22:55 | ibdknox | not enough for a full-featured lib to exist |
| 22:55 | zenlike | kovasb: haha. |
| 22:55 | ibdknox | someone just needs to get fed up and write it |
| 22:55 | eggsby | Hmm, interesting point kovasb, do you think that clojure would be a suitable first language? |
| 22:55 | kovasb | eggsby: yes, every language has its warts |
| 22:55 | zenlike | TimMc: So are you going to write ClojureMyAdmin? :))) |
| 22:55 | eggsby | ibdknox: ~clojure in clojure~ |
| 22:56 | kovasb | eggsby: clojure makes up for it with simplicity where it counts |
| 22:56 | ibdknox | not it |
| 22:56 | ibdknox | lol |
| 22:56 | ibdknox | eggsby: absolutely |
| 22:56 | ibdknox | I think I can teach people to code much faster in Clojure than most other languages |
| 22:56 | ibdknox | assuming no prior knowledge |
| 22:56 | gfredericks | let's write an "unhosted-clojure" |
| 22:57 | ibdknox | lol |
| 22:57 | zakwilson | You can avoid the underlying platform leaking through a lot more now than when I started using Clojure. |
| 22:57 | septomin_ | do you think their head will explode with the first error message? |
| 22:57 | gfredericks | terrible performance, but ideal everything |
| 22:57 | zenlike | zakwilson: how so? |
| 22:57 | eggsby | that recent interview with rhickey on infoq, he had some words about clojure in clojure and the work cljs was doing |
| 22:57 | ibdknox | septomin_: your first error messages suck no matter what language you're using |
| 22:57 | zakwilson | zenlike: you don't have to know Java to read a file, for example. |
| 22:57 | septomin_ | sure, but some suck more than others |
| 22:58 | zakwilson | slurp wasn't always in core. |
| 22:58 | ibdknox | you haven't yet learned how to understand failure in this case |
| 22:58 | septomin_ | i just have flashbacks of trying to use STL as a 16 year old |
| 22:58 | zenlike | zakwilson: I have been trying to figure out how to use slurp. |
| 22:58 | ibdknox | programming is unique in that regard, I think |
| 22:58 | zenlike | septomin_: HAHA! I am familiar with that |
| 22:58 | gfredericks | zakwilson: if slurp were a core java method they probably might not have bothered |
| 22:58 | eggsby | heh, I couldn't get slurp to work how I wanted without declaring a java io resource :) |
| 22:58 | zakwilson | zenlike: slurp takes a path and returns a string of its contents. What's to figure out? |
| 22:59 | gfredericks | ,(slurp "/etc/passwd") |
| 22:59 | zenlike | when I try to (slurp "core.clj") i get an exception that says... (hang on please) |
| 22:59 | zakwilson | gfredericks: quite possibly. |
| 22:59 | clojurebot | #<AccessControlException java.security.AccessControlException: access denied (java.io.FilePermission /etc/passwd read)> |
| 22:59 | zenlike | Unable to resolve slurp, no such file or directory |
| 23:00 | zenlike | I'm pretty sure I'm in the right directory. What am I missing here? |
| 23:00 | zakwilson | zenlike: pastebin the whole stacktrace |
| 23:00 | yoklov | my hunch would be that you're not in the right directory |
| 23:01 | zenlike | What's that code for the stack trace again? (.exception e) or something... sorry, I'm blanking |
| 23:02 | zakwilson | How are you running Clojure? |
| 23:02 | zenlike | In the leiningen REPL. |
| 23:03 | zakwilson | I'd expect it to just print the stacktrace when you attempt to run code that throws an exception. |
| 23:04 | zenlike | I don't get the whole stacktrace, just one line. |
| 23:05 | zakwilson | I'm not sure about your specific situation, but try giving it a full absolute path to a file you're sure exists. |
| 23:06 | espeed | I'm new to Clojure and am working on getting Clojure 1.3, Datomic, and Leinigen 2.0 to play nicely together, but I'm getting a java.lang.NoSuchMethodError: clojure.lang.Util.equiv(CC)Z error when running lein test. |
| 23:08 | espeed | I put the code in a Datomic Skeleton project on GitHub (https://github.com/espeed/dskel) -- would someone take a look at it and let me know what I'm missing? |
| 23:09 | zenlike | zakwilson: absolute paths did it. |
| 23:10 | zenlike | thanks for the help. |
| 23:11 | cmajor7 | how much category theoretical elements are used in clojure? (e.g. applicative functors, monads, semigroups, etc..) |
| 23:11 | kovasb | cmajor7: very few if any |
| 23:12 | zakwilson | zenlike: You're probably confused as to your current working directory. Try (get (System/getenv) "PWD") |
| 23:12 | kovasb | cmajor: though there are people doing stuff with monads etc |
| 23:12 | ibdknox | jimduey is preaching the monad gospel, so there's a little |
| 23:12 | ibdknox | but not much |
| 23:12 | ibdknox | there are other mechanisms that make them less important, I think |
| 23:12 | ibdknox | but you should talk to brehaut or someone who knows more than I do on the subject :) |
| 23:12 | zakwilson | I've found Clojure to be fairly low-theory high-getting-stuff-done. |
| 23:13 | xeqi | espeed: that datomic requires 1.4.0-beta3 |
| 23:13 | cmajor7 | right, I saw some clojure takes on monad, but it did not really look very monadic.. would that be because of the dynamic dispatch? |
| 23:13 | cmajor7 | e.g. no need for higher kinds, etc.. |
| 23:13 | zenlike | zakwilson: Yeah, PWD is how I got the absolute path to work, I think it'd just that relative paths don't work at all? or at least don't seem to on my system. |
| 23:13 | xeqi | I've seen that error when I did a 1.4 aot and tried to run it on 1.3 |
| 23:13 | zakwilson | zenlike: relative paths *should* work. |
| 23:14 | espeed | xeqi: ahh...ok |
| 23:14 | xeqi | with another project |
| 23:14 | brehaut | cmajor7: theres a functors somewhere as well as monads, but most of the categorical classes are absent (or implicit) |
| 23:14 | zakwilson | I have production code using slurp and relying on relative paths. |
| 23:15 | cmajor7 | brehaut, I see.. what would be a reason for the absence (dynamic typing)? |
| 23:15 | zenlike | zakwilson: but not in the REPL, I think is what my problem might be? probably will work with code in core.clj but not in the REPL. |
| 23:15 | brehaut | cmajor7: theres nothing unmonadic about the clojure monad library though, its a bit more unweildy than haskells (because it has to use dynamic binding and explicit monad declarations rather than return type based polymorphism) but the operations you perform are exactly the same |
| 23:15 | zenlike | because my lein is actually is /usr/bin i think |
| 23:15 | brehaut | cmajor7: the biggest rason for the absence is that a lot of the uses of monads in particular are needed in clojure because the problems are solved in other ways |
| 23:16 | zenlike | so maybe paths used in the REPL need to be relative to usr/bin? |
| 23:16 | zakwilson | zenlike: it should be relative to your current working directory. |
| 23:16 | cmajor7 | brehaut: you mean "are _not_ needed"? |
| 23:16 | brehaut | cmajor7: there are still times when something like the state or maybe monad is useful and those of us who know about them do reach for them |
| 23:16 | cmajor7 | brehaut: would IO monad be one of such cases? |
| 23:16 | brehaut | yeah |
| 23:16 | brehaut | and yes re:IO |
| 23:17 | brehaut | that also goes for STM and ST |
| 23:17 | cmajor7 | right.. STM is a natural monad.. |
| 23:17 | cmajor7 | interesting |
| 23:17 | brehaut | a lot of operations are implictly nil aware so maybe-m isnt as useful |
| 23:17 | brehaut | (and fnil covers a lot of the remaining cases) |
| 23:17 | brehaut | finally we have for which is list comprehensions / monad anyway |
| 23:18 | cmajor7 | right.. |
| 23:18 | brehaut | the biggest disadvantage is that when you dont use the monadic interface you dont get some of the generality that monads provide |
| 23:18 | brehaut | on the other hand, its less unweildy |
| 23:18 | brehaut | which is great if you dont need that generality |
| 23:18 | emacs_newb | is there any project to implement an editor, say emacs, in clojure? |
| 23:18 | cmajor7 | so it seems in clojure, a monad is just something implicit and "not to worry about" |
| 23:18 | emacs_newb | it would be great to have an entire clojure based IDE |
| 23:19 | cmajor7 | brehaut: can you give an example (a link is cool), on how an IO monad used on clojure? |
| 23:19 | brehaut | cmajor7: there is no IO monad in clojure |
| 23:19 | emacs_newb | you don't need monads in clojure |
| 23:19 | kovasb | emacs_newb: http://www.chris-granger.com/2012/04/12/light-table---a-new-ide-concept/ |
| 23:19 | emacs_newb | you can do IO without the IO monad |
| 23:19 | brehaut | cmajor7: its implicit in the strict evaluation with side effects model |
| 23:20 | emacs_newb | kovasb: I'm throwing my credit card at my monitor, but nothing is happening |
| 23:21 | cmajor7 | I see.. "with side effects" => that means it actually does not wrap into an "abstract IO type".. is there any case you would not want that.. I am thinking "something within a transaction" (but not STM, e.g. Transactional Monad) |
| 23:21 | brehaut | cmajor7: in clojure you might us a monad when you want an alternative reasoning strategy: eg a backtracking parser (state-t maybe-m) or a logic engine (core.logic has monadic underpinnings, although its not iimplemented in terms of algo.monads for performance reasons) |
| 23:21 | kovasb | emacs_newb: throw it at ibdknox |
| 23:22 | brehaut | cmajor7: the io! macro allows you to wrap up side effecting code to cause an error when its used in a transaction |
| 23:22 | kovasb | emacs_newb: there should be a kickstarter announcement imminently |
| 23:22 | ibdknox | I have no idea how long they take to review them, hopefully it'll be up tomorrow? |
| 23:24 | brehaut | cmajor7: have you looked at the tutorials on clojure.net ? |
| 23:25 | cmajor7 | brehaut: niice.. (to io! macro and http://www.clojure.net/2012/02/02/Monads-in-Clojure/) reading… but in general, when you say "problems are solved in other ways", would you say these "ways" are more side effect approving/tolerant? |
| 23:26 | brehaut | well the side effecting stuff yes |
| 23:26 | brehaut | in particular atoms, agents and stm refs |
| 23:26 | brehaut | for stuff that you would use IO,ST and STM monads for in haskell |
| 23:27 | cmajor7 | where I am coming from is "are these other ways" lose the way to be as composable as e.g. with a category pitch languages? |
| 23:28 | brehaut | i dont see your argument |
| 23:28 | brehaut | if you need monadic composition |
| 23:28 | brehaut | use a monad |
| 23:28 | brehaut | and clojures stm without a monad is composable anyway |
| 23:29 | emacs_newb | without intending to start a flamewar -- did smalltalk really have all these features? |
| 23:29 | emacs_newb | if so, what caused it to fail, the child-like UI? |
| 23:29 | emacs_newb | (in reference to HN comments on "everything in light table = already existed in smalltalk") |
| 23:29 | kovasb | emacs_newb: there was an extinction event around 1990 |
| 23:29 | kovasb | smalltalk, lisp |
| 23:30 | emacs_newb | kovasb: are you referring to symbolics? |
| 23:30 | kovasb | much broader than just that |
| 23:30 | pipeline | emacs_newb: bad vendor support, ai winter, lousy performance |
| 23:30 | kovasb | "ai winter" |
| 23:30 | kovasb | other platforms took off |
| 23:30 | pipeline | emacs_newb: let us not forget: much of lisp's early success in the 80s was based in custom hardware |
| 23:31 | pipeline | kovasb: what platforms took off in the 80s besides as/400 |
| 23:31 | emacs_newb | so basically, if the symbolics or smalltalks guys |
| 23:31 | emacs_newb | thought to port their work to java vm |
| 23:31 | emacs_newb | the world could be a very different place |
| 23:31 | pipeline | symbolics actually survived the ai winter |
| 23:31 | pipeline | they were killed off by idiot real estate deals |
| 23:31 | pipeline | and they had a working VM predating the jvm |
| 23:31 | pipeline | aka opengenera |
| 23:31 | kovasb | possibly, though it took a long time for the JVM to become awesome |
| 23:32 | cmajor7 | brehaut: no argument. all questions. the biggest pitch for haskell / scalaz / etc.. is composability => use higher kinds (via e.g. type constructors) / wrap everything into another "pure" type and "fmap" (e.g. tranform) everything to return a wrapped world.. which allows for most if not everything to be referentially transparent. clojure is a lot simpler and cleaner (in my opinion), but what I'd like to understand is "which "other ways" is |
| 23:32 | pipeline | i'm not even kidding here, and a little bit of google can confirm it for you |
| 23:32 | kovasb | also, programming languages research abandoned that tradition as well |
| 23:32 | pipeline | symbolics bit it in large part becouse of a bad office real estate deal |
| 23:32 | kovasb | getting more into type theory, monad stuff :) |
| 23:32 | pipeline | at the time that they bit it, they were selling two of their most compelling products: opengenera, lisp targeting a VM, and embedded ivory processors for network switching |
| 23:34 | kovasb | pipeline: if they were doing well, that wouldn't have killed them tho |
| 23:35 | kovasb | cmajor: clojure is the most composable language i've seen |
| 23:35 | kovasb | cmajor: there is a lot more to it besides nice mathematical properties |
| 23:36 | kovasb | cmajor: check out the "simple made easy" talk by rich hicket |
| 23:36 | kovasb | y |
| 23:36 | cmajor7 | kovasb: I'd like to agree with you, just wanted some comparative feedback |
| 23:36 | kovasb | cmajor: yeah, totally |
| 23:36 | kovasb | cmajor: rich does talk about certain things that are easier in haskell |
| 23:37 | kovasb | i believe its brought up in the talk, but i don't remember for sure |
| 23:38 | kovasb | the closest thing to a composability "silver bullet" is immutability |
| 23:38 | kovasb | and functions |
| 23:39 | cmajor7 | right, but there are also side effects.. |
| 23:39 | kovasb | but beyond that its all about designing a multitude of things right |
| 23:40 | kovasb | side effects can potentially be broken down into classes of problems |
| 23:40 | espeed | xeqi: thanks, it works now. |
| 23:41 | kovasb | trying to cram the whole space of them into a single solution might not be ideal |
| 23:41 | kovasb | but I'm just one guy talking |
| 23:41 | kovasb | if your side effect is "change this value in memory" then the stm is a potential solution for that class |
| 23:42 | kovasb | other kinds of side effects might have different solution |
| 23:42 | kovasb | like resource management |
| 23:43 | kovasb | maybe monads are the best thing for io, but its a problem that does not come up that often for me personally |
| 23:43 | eggsby | it's a subset of problems, when you need them you need them |
| 23:44 | eggsby | the guys who work almost exclusively w/ derivatives/trading seem to love them tho |
| 23:47 | kovasb | interesting. i did not know that |
| 23:47 | kovasb | i thought they generally code in languages that don't support them |
| 23:47 | kovasb | the guys i know use java, python |
| 23:55 | cmajor7 | kovasb: makes sense, thanks for thoughts.. |
| 23:55 | kovasb | cmajor7: sure! |
| 23:56 | yoklov | ibdknox: is it normal for waltz to say "WARNING: Use of undeclared Var waltz.state/get-in-sm at line 30" the first time it gets compiled? |
| 23:56 | yoklov | weirdly it only complains the first time, and it always works |
| 23:56 | ibdknox | never seen that |
| 23:57 | ibdknox | but I think I have those off |
| 23:57 | ibdknox | or rather, they weren't on by default |
| 23:57 | ibdknox | JS doesn't have the same limitations as Clojure does |
| 23:57 | ibdknox | so I probably did something stupid clojure-wise |
| 23:57 | ibdknox | that works fine in javascript :) |
| 23:57 | kovasb | i think that is a new warning |
| 23:57 | ibdknox | likely just need to reorder the var |
| 23:57 | kovasb | i just started seeing it today |
| 23:57 | yoklov | they catch bugs where i mispell names, i don't think that i have it turned on... |
| 23:58 | yoklov | i'm using cljs master though |
| 23:58 | yoklov | i really like waltz though. |
| 23:59 | ibdknox | I need to add the deterministic mode |
| 23:59 | ibdknox | so much to do :) |
| 23:59 | yoklov | yeah, i'm using it as a deterministic fsa |