Re: Mini Beast - Overtone + Quil

2012-07-05 Thread Thomas
Sam, Could you make a video for us available? Cheers. Thomas -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your

Re: read-string and timestamps

2012-07-05 Thread keeds
Many thanks Dave. That all made sense. I've just updated my project to use Clojure 1.4 (had to upgrade Noir to latest beta) and we are all golden. Thanks, Andrew On Wednesday, 4 July 2012 19:50:34 UTC+1, David Powell wrote: > > > > > Please excuse my ignorance. This is the first time I've played

Re: Protocol specific type hierarchy

2012-07-05 Thread Warren Lynn
Ok, it seems I cannot make it work unless the "get-method" for protocol is available, The reason is, in the example by Michal, the return value from "(get-in IFoo [:impls user.Bar :foo])" is a Java function, not a true Clojure function with true dynamic typing. So, take the same example: (def

Re: Light Table on Windows XP

2012-07-05 Thread Andrew
fwiw, here's what I see on Windows XP. There are instructions for running LightTable without Powershell? What are they? --- PS C:\Documents and Settings\user\lighttable> .\light.ps1 table Security Warning Run only scripts that you trust. While scripts from the Internet can be useful, this scri

Re: Clojure Sticker

2012-07-05 Thread Dima Sabanin
+1 here too. On Thu, Jul 5, 2012 at 9:40 AM, David Della Costa wrote: > +1, wants sticker. > > 2012/7/4 Eric Scrivner : >> +1 I was just looking for this the other day and was disappointed to find I >> could only get a t-shirt. >> >> >> On Saturday, June 9, 2012 6:03:46 PM UTC-7, aboy021 wrote: >

Re: Light Table on Windows XP

2012-07-05 Thread Mark Rathwell
My guess on this is that you need PowerShell 2.0, just a guess though. It can be download as a part of this package: http://www.microsoft.com/en-us/download/details.aspx?id=16818 On Thu, Jul 5, 2012 at 10:21 AM, Andrew wrote: > fwiw, here's what I see on Windows XP. There are instructions for

Re: Including core.cache in clojurescript?

2012-07-05 Thread Michael Fogus
It looks like the presence of the defcache macro in the core.cache namespace is causing mass confusion. I'm not familiar with the way that crossovers work, so it's not apparent to me how this might be fixed. Any suggestions? -- You received this message because you are subscribed to the Google Gr

Re: Help a newbie with his first babysteps... Understanding a function.

2012-07-05 Thread Sean Corfield
On Thu, Jul 5, 2012 at 10:11 AM, Jacobo Polavieja wrote: >> (defn neighbors >> ([size yx] (neighbors [[-1 0] [1 0] [0 -1] [0 1]] size yx)) >> ([deltas size yx] >> (filter (fn [new-yx] >> >> (every? #(< -1 % size) new-yx)) (map #(map + yx %) deltas Let's take your second qu

Re: Help a newbie with his first babysteps... Understanding a function.

2012-07-05 Thread Sean Corfield
On Thu, Jul 5, 2012 at 10:35 AM, Sean Corfield wrote: > (defn inc-by [n x] (+ n x)) > > (defn inc-all-by [n xs] (map (partial inc-by n) xs)) Ugh! Got this wrong. #(map + yx %) is adding elements of yx and elements of the argument, not just adding a single value. Sorry. (defn inc-pairs [ns xs] (m

Re: Help a newbie with his first babysteps... Understanding a function.

2012-07-05 Thread Jeremy Heiler
On Thu, Jul 5, 2012 at 1:11 PM, Jacobo Polavieja wrote: > 1. What is the value of that [new-yx] ? The value of `new-yx` in the anonymous function that is used with `filter` is whatever value `filter` is invoking the function with from its second argument. In this case, the second argument is a se

Re: Help a newbie with his first babysteps... Understanding a function.

2012-07-05 Thread Jeremy Heiler
On Thu, Jul 5, 2012 at 1:40 PM, Jeremy Heiler wrote: > (= x (#(%) x)) ;=> true I lied when I said that :-) But invoking #(%) will return the value passed in as the first argument. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this grou

Re: Help a newbie with his first babysteps... Understanding a function.

2012-07-05 Thread Jeremy Heiler
On Thu, Jul 5, 2012 at 1:44 PM, Jeremy Heiler wrote: > On Thu, Jul 5, 2012 at 1:40 PM, Jeremy Heiler wrote: >> (= x (#(%) x)) ;=> true > > I lied when I said that :-) > > But invoking #(%) will return the value passed in as the first argument. Maybe I should check things before I say them. (+ (

Re: Protocol specific type hierarchy

2012-07-05 Thread Vinzent
> You can get hold of a protocol's implementation for a particular type > if it was attached to a type with extend / extend-type / > extend-protocol: > Yes, but it's unofficial, undocumented and, as you've stated already, can't be used with inlined implementations. > Implementations spec

[ANN] Immutant 0.2.0 released

2012-07-05 Thread Jim Crossley
We released our second version of Immutant today. Read all about it here: http://bit.ly/immutant020 For those unfamiliar with Immutant, here are the high points: - Simple functions with side effects triggering JBoss AS7 services - Very dynamic, no XML or YAML config, just Clojure - Depl

Re: Help a newbie with his first babysteps... Understanding a function.

2012-07-05 Thread Jacobo Polavieja
Many thanks to you both Sean and Jeremy, I think I finally got it. After understanding it better I think most of my confussion comes from the fact that in F# it's typical to "pipeline" and therefore we don't have to define everything at once (specially the implicit values which are what lost m

Re: Help a newbie with his first babysteps... Understanding a function.

2012-07-05 Thread Jacobo Polavieja
On Thursday, July 5, 2012 11:52:52 PM UTC+2, Jacobo Polavieja wrote: > > Many thanks to you both Sean and Jeremy, I think I finally got it. > > After understanding it better I think most of my confussion comes from the > fact that in F# it's typical to "pipeline" and therefore we don't have to

clojure.java.jdbc not handling datetime correctly?

2012-07-05 Thread László Török
Hi, I can't get c.j.jdbc to save a java.sql.Date correctly, as it only saves the date part not the time. Reproducible on mysql 5.1: CREATE TABLE test (inst DATETIME) then from the repl (sql/with-connection db (sql/insert-record :test {:ts (java.sql.Date. 1338029307000)})) however, in th

Re: clojure.java.jdbc not handling datetime correctly?

2012-07-05 Thread László Török
Disregard my email, apparently java.sql.Date maps to SQL Date, time value is truncated. L 2012/7/6 László Török > Hi, > > I can't get c.j.jdbc to save a java.sql.Date correctly, as it only saves > the date part not the time. > > Reproducible on mysql 5.1: > > CREATE TABLE test (inst DATETIME)

Re: Help a newbie with his first babysteps... Understanding a function.

2012-07-05 Thread Benny Tsai
Indeed! You can use ->> (like ->, but inserts into the last position of each form) to do something like: (defn neighbors ([size yx] (neighbors [[-1 0] [1 0] [0 -1] [0 1]] size yx)) ([deltas size yx] (let [in-matrix? (fn [new-yx] (every? #(< -1 % size) new-yx))] (->> deltas

Re: Jade / Jade4J

2012-07-05 Thread Leif
I know this doesn't answer your question, but why are you contemplating using Jade in Clojure, instead of Hiccup or Enlive, which seem like better markup solutions (for different reasons)? Is it just for the sake of uniformity throughout your codebase? On Wednesday, July 4, 2012 10:32:17 PM UT

clojurescript failing silently?

2012-07-05 Thread kovas boguta
Upgrading to build 1424, it seems like errors that were once displayed in the browser console are now somehow suppressed. When I'm at the cljs repl, I get the the errors. But thats not nearly as useful, since I have to manually poke around and figure out why my app didn't load correctly. Is this

Re: clojurescript failing silently?

2012-07-05 Thread David Nolen
Can you be more precise? On Friday, July 6, 2012, kovas boguta wrote: > Upgrading to build 1424, it seems like errors that were once displayed > in the browser console are now somehow suppressed. > > When I'm at the cljs repl, I get the the errors. But thats not nearly > as useful, since I have t

Re: clojurescript failing silently?

2012-07-05 Thread kovas boguta
The little red checkbox in the chrome developer tools would light up, referencing the places in my compiled cljs code that blew up. It doesn't do that anymore. On Fri, Jul 6, 2012 at 1:35 AM, David Nolen wrote: > Can you be more precise? > > > On Friday, July 6, 2012, kovas boguta wrote: >> >> U

Re: [ANN] Immutant 0.2.0 released

2012-07-05 Thread Murtaza Husain
Hi Jim, "Multiple apps can be deployed to a single Immutant, each with its own isolated runtime" How much cost in terms of memory does the isolated runtime extract ? I assume by isolated runtime it means that all dependencies are laded in a separate runtime. usually starting a separate JVM for

Re: clojurescript failing silently?

2012-07-05 Thread kovas boguta
In this particular case it looks like read-string is failing silently, and stopping the execution of my program. Which to me looks like it throws an exception that gets eaten somewhere. The odd thing is, when I evaluate the same input at the js repl in the terminal, it works. So now there are two

Re: clojurescript failing silently?

2012-07-05 Thread kovas boguta
> The odd thing is, when I evaluate the same input at the js repl in the > terminal, it works. So now there are two problems :0 > Sorry, the js repl in the browser. Getting late. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group,

Re: clojurescript failing silently?

2012-07-05 Thread David Nolen
Sounds like we need more information. Have you tried git bisect to determine the specific revision? David On Fri, Jul 6, 2012 at 2:27 AM, kovas boguta wrote: >> The odd thing is, when I evaluate the same input at the js repl in the >> terminal, it works. So now there are two problems :0 >> > > S

Re: clojurescript failing silently?

2012-07-05 Thread kovas boguta
I found the bug in my program. I was calling a function that didn't exist in the given namespace. (this is called on startup) Just to confirm, the expected behavior is that this will produce a stacktrace in the js console? I can try using git bisect if this is supposed to work. On Fri, Jul 6, 2

Re: clojurescript failing silently?

2012-07-05 Thread David Nolen
lein-cljsbuild isn't warning you about this? On Fri, Jul 6, 2012 at 2:37 AM, kovas boguta wrote: > I found the bug in my program. > > I was calling a function that didn't exist in the given namespace. > (this is called on startup) > > Just to confirm, the expected behavior is that this will produ

Re: clojurescript failing silently?

2012-07-05 Thread kovas boguta
Yes, but it complains about other things that are not problems so I've started to ignore it. For instance the protocol in the namespace that I forget to quality doesn't get recognized: WARNING: Symbol mvc/IMVC is not a protocol at line 38 src/cljs/client/subsession.cljs yet it works anyway. (have

Re: clojurescript failing silently?

2012-07-05 Thread David Nolen
On Fri, Jul 6, 2012 at 2:43 AM, kovas boguta wrote: > For instance the protocol in the namespace that I forget to quality > doesn't get recognized: > WARNING: Symbol mvc/IMVC is not a protocol at line 38 > src/cljs/client/subsession.cljs > > yet it works anyway. (have no idea how to make that go a