Re: Alternate set literal syntax?

2012-03-25 Thread Cedric Greevey
On Mon, Mar 26, 2012 at 12:45 AM, Ambrose Bonnaire-Sergeant wrote: > On Mon, Mar 26, 2012 at 12:22 PM, Cedric Greevey wrote: >> Isn't this just another way of saying "humans will have to read to the >> end to see what the form is?" I provided a response to that objection >> already. > > Your resp

Re: the role of #_ reader macro in cljs.core

2012-03-25 Thread László Török
Thx, then why is it used at (deftype Vector [... ] ... ... IIndexed (-nth [coll n] (if (and (<= 0 n) (< n (.-length array))) (aget array n) #_(throw (js/Error. (str "No item " n " in vector of length " (.-length array)) where I would in fact expect an exception (to get the

Re:the role of #_ reader macro in cljs.core

2012-03-25 Thread Baishampayan Ghose
The #_ reader macro simply comments out the form, so it's a no op. Sent from phone, please excuse brevity. On Mar 26, 2012 10:23 AM, "László Török" wrote: > Hi, > > I'm trying to wrap my head around the role of the #_ macro and how it's > used in core.cljs. > > Can some explain, why it is used t

the role of #_ reader macro in cljs.core

2012-03-25 Thread László Török
Hi, I'm trying to wrap my head around the role of the #_ macro and how it's used in core.cljs. Can some explain, why it is used to prefix (throw.. ) in (deftype EmptyList [meta] ... ... IStack (-peek [coll] nil) (-pop [coll] #_(throw (js/Error. "Can't pop empty list"))) or in (deftype Vecto

Re: Alternate set literal syntax?

2012-03-25 Thread Ambrose Bonnaire-Sergeant
On Mon, Mar 26, 2012 at 12:22 PM, Cedric Greevey wrote: > On Sun, Mar 25, 2012 at 11:59 PM, Ambrose Bonnaire-Sergeant > wrote: > > On Mon, Mar 26, 2012 at 11:46 AM, Cedric Greevey > wrote: > >> > >> So ... any further objections, other than "it's unlikely anyone cares > >> enough to bother actu

Re: Alternate set literal syntax?

2012-03-25 Thread Cedric Greevey
On Sun, Mar 25, 2012 at 11:59 PM, Ambrose Bonnaire-Sergeant wrote: > On Mon, Mar 26, 2012 at 11:46 AM, Cedric Greevey wrote: >> >> So ... any further objections, other than "it's unlikely anyone cares >> enough to bother actually making such a change"? :) > > It breaks the uniformity of Clojure s

Re: core.logic now runs under ClojureScript

2012-03-25 Thread Devin Walters
It's the course recommended for freshmen seeking a career in Wonderful: 101 - Introduction to Awesome '(Devin Walters) On Mar 25, 2012, at 10:48 PM, Cedric Greevey wrote: > On Sun, Mar 25, 2012 at 11:36 PM, Devin Walters wrote: >> (inc 100) >> >> Well done, gents. > > 101? > > Or maybe you

Re: Alternate set literal syntax?

2012-03-25 Thread Ambrose Bonnaire-Sergeant
On Mon, Mar 26, 2012 at 11:46 AM, Cedric Greevey wrote: > So ... any further objections, other than "it's unlikely anyone cares > enough to bother actually making such a change"? :) It breaks the uniformity of Clojure syntax. Almost all sugar is prefix: you can identify syntax by looking to th

Re: core.logic now runs under ClojureScript

2012-03-25 Thread Cedric Greevey
On Sun, Mar 25, 2012 at 11:36 PM, Devin Walters wrote: > (inc 100) > > Well done, gents. 101? Or maybe you meant (partial + 100). :) -- 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

Re: Alternate set literal syntax?

2012-03-25 Thread Cedric Greevey
Embarrassingly, it took this long for me to realize there's a much tidier way to alter the reader: Where the exception throw is for map literals with odd numbers of key-or-value items, wrap the throw in a check that counts the number of additional consecutive } tokens, stopping when it hits a non-

Re: core.logic now runs under ClojureScript

2012-03-25 Thread Devin Walters
(inc 100) Well done, gents. '(Devin Walters) On Sunday, March 25, 2012 at 9:05 PM, Creighton Kirkendall wrote: > Amazing work! > > > On Saturday, March 24, 2012 10:19:41 PM UTC-4, David Nolen wrote: > > There's a lot of work left to do but I was able to successfully solve the > > zebra

Re: core.logic program doesn't terminate

2012-03-25 Thread David Nolen
I'll try to take a closer look soon - but first, did you try unifying c earlier? You have to be careful with recursive goals and fresh vars. David On Sun, Mar 25, 2012 at 4:59 PM, Reid Draper wrote: > I've been playing around with core.logic and > have written a few things that don't seem to >

Re: core.logic now runs under ClojureScript

2012-03-25 Thread Creighton Kirkendall
Amazing work! On Saturday, March 24, 2012 10:19:41 PM UTC-4, David Nolen wrote: > > There's a lot of work left to do but I was able to successfully solve the > zebra puzzle with core.logic running under JavaScript via V8 in ~170ms. > There's tons of performance optimization yet to do, but to

Re: core.logic now runs under ClojureScript

2012-03-25 Thread Stuart Sierra
Mega w00t! -S -- 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 first post. To unsubscribe from this group, send

core.logic program doesn't terminate

2012-03-25 Thread Reid Draper
I've been playing around with core.logic and have written a few things that don't seem to terminate. My intuition says they should work, but I imagine I'm either making a simple mistake, or abusing something. I've written the question as a gist, for better formatting https://gist.github.com/21994

Need help to find a bug in a genetic algorithm

2012-03-25 Thread Goldritter
For my little project I wanted to reprogramm the gentic algorithm from the book "Clojure" written by Stefan Kamphausen and Tim Oliver Kaiser. All the basicfunction like creating the population, selecting individuals, adding individuals, removing individuals and recombination works fine. During the

Appcache

2012-03-25 Thread Pierre-Henry Perret
How to disable/enable the appcache in One ? This is related to a manifest cache which is present in the root folder of the application. But in One, it seems to be automatically generated... -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to

Re: Alternate set literal syntax?

2012-03-25 Thread Brian Rowe
I think one of the strengths of clojure (over at least CL certainly) is it's a warm and helpful community. Please, let's not poison that. I think this response was not only not helpful, it was also, in some small way, damaging to the community. Please don't reply to legitimate questions in th

Re: Alternate set literal syntax?

2012-03-25 Thread Cedric Greevey
On Sun, Mar 25, 2012 at 8:36 PM, Cedric Greevey wrote: > How often do we get "What are the differences among 100, 0144, and > 0x64, and which should I use when?" ;) Nevermind: #^{:foo 42} thingy vs. ^{:foo 42} thingy; (deref foo) vs. @foo; #'bar vs. (var bar); #(+ %2 (* 2 %1)) vs. (fn [a b] (+ b

Re: Alternate set literal syntax?

2012-03-25 Thread Cedric Greevey
On Sun, Mar 25, 2012 at 5:24 PM, Evan Mezeske wrote: > Is there anything I could do with Clojure with an aesthetically different > (but functionally identical ) set notation that I cannot do with Clojure > right now? Attract 0.7 more people per 1000 on average to adopt the language, perhaps. :)

EuroClojure 2012 Programme published

2012-03-25 Thread Marco Abis
Dear all, just a quick note to let everyone know we've just published the programme for the first European Clojure conference: http://euroclojure.com/2012/programme/ You help in spreading the world is much appreciated :-) Thanks in advance -- Marco Abis -- You received this message beca

Re: Alternate set literal syntax?

2012-03-25 Thread Evan Mezeske
Doesn't this amount to arguing over what color the bike shed should be? [1] Is there anything I could do with Clojure with an aesthetically different (but functionally identical ) set notation that I cannot do with Clojure right now? Anyway, no matter how beautiful a new set notation might be (

Re: Alternate set literal syntax?

2012-03-25 Thread Ben Smith-Mannschott
On Sat, Mar 24, 2012 at 04:44, Cedric Greevey wrote: > #{foo bar baz} is somewhat ugly. It occurs to me that one could modify > the reader to additionally accept > > {{foo bar baz}} > > without breaking anything. It's not possible for it to be a valid map > literal, because the outer {...} pair ha

Re: New(er) Clojure cheatsheet hot off the presses

2012-03-25 Thread Moritz Ulrich
On Sun, Mar 25, 2012 at 20:40, DHM wrote: > Um... I don't want this to devolve into an argument, but can I voice > my support for going with the full docstring tooltip? > Having tried it, it seems really useful to me, and I don't see the > reason to reduce the text to something shorter. I don't th

Re: New(er) Clojure cheatsheet hot off the presses

2012-03-25 Thread DHM
> > > Remind me again: why do you want to put much of the docstring in > > there, and not just a quick precis that's enough to jog someone's > > memory and/or let them know whether they ought to click through or > > should skip that one based on what they're trying to find? > > I like that what I

Re: Alternate set literal syntax?

2012-03-25 Thread Cedric Greevey
On the contrary, discussing ideas relevant to Clojure is quite on topic here. Once again: if *you* find this thread useless or uninteresting, *you* can safely ignore it, but telling everyone else what to discuss and what not to discuss (when they're not straying from the list's official topic too

Re: New(er) Clojure cheatsheet hot off the presses

2012-03-25 Thread Andy Fingerhut
On Mar 25, 2012, at 12:15 AM, Cedric Greevey wrote: > On Sun, Mar 25, 2012 at 2:59 AM, Andy Fingerhut > wrote: >> I've tried again using links with doc strings as the values of the title >> attribute, but when the text in Firefox 11.0 it does not honor the line >> breaks in my text, but reflow

Re: core.logic now runs under ClojureScript

2012-03-25 Thread David Nolen
On Sun, Mar 25, 2012 at 5:14 AM, Evan Mezeske wrote: > For anyone like me that just immediately wants to see the code: > > > https://github.com/clojure/core.logic/blob/master/src/main/cljs/cljs/core/logic.cljs > > -Evan > I just want to say that the experience porting this library has been simpl

Re: Alternate set literal syntax?

2012-03-25 Thread Softaddicts
I follow this list mostly to avoid losing track of things as time passes and keep a record of significant things. I do not read every post, I filter at glance accoring to the subject and rarely by the initial poster. A jump in the number or replies in a thread also triggers my attention. I rarel

Re: New(er) Clojure cheatsheet hot off the presses

2012-03-25 Thread DHM
On Mar 24, 6:32 pm, Cedric Greevey wrote: > On Fri, Mar 23, 2012 at 4:43 PM, David Martin wrote: > > I agree that title attribute is the way to go. You shouldn't use the alt > > attribute for tooltips though, as this violates accessibility standards. Alt > > should either contain a literal descr

Re: 'contains?' on 'sorted-set-by' based on the comparator only? (possible bug?)

2012-03-25 Thread mnicky
Wow. Thanks, Cedric. I'll definitely look into those options... On Sunday, March 25, 2012 4:28:04 AM UTC+2, Cedric Greevey wrote: > > On Sat, Mar 24, 2012 at 9:39 PM, Cedric Greevey > wrote: > > In increasing order of difficulty... > > > > Option 1: > > > > Extend your comparator to sort first o

Re: Clojure cheatsheet with tooltips (alpha)

2012-03-25 Thread mnicky
On Sunday, March 25, 2012 1:41:29 PM UTC+2, Bost wrote: > > I personally find this one better: > > http://homepage.mac.com/​jafingerhut/files/cheatsheet-​clj-1.3.0-v1.4-tooltips/​cheatsheet-title-attribute.​html

Re: Clojure cheatsheet with tooltips (alpha)

2012-03-25 Thread Rostislav Svoboda
I personally find this one better: http://homepage.mac.com/jafingerhut/files/cheatsheet-clj-1.3.0-v1.4-tooltips/cheatsheet-title-attribute.html The tooltips appear right at the place where I'm looking and pointing my mouse, and they tend to appear always at the same place - below the mouse and lin

ANN: ringMon 0.1.2 released

2012-03-25 Thread zoka
Hi all. The ringMon 0.1.2 is available at Clojars. The ringMon is a Ring middleware that can be easily added to an existing Ring based (and any other, see bellow) Clojure application. It injects and drives a monitoring page that displays application data of interest (JMX and derived values). The

Re: removing a hash-map from a set using hash-map's field.

2012-03-25 Thread Philip Potter
On 23 March 2012 14:47, Leandro Oliveira wrote: > Thank you for all replies. > > Can I say that if you need remove an item you should use a map? It depends entirely on how you intend to look up your values. If your lookup is by the entire value, then sets make sense. If it's by only part of a val

Re: Clojure cheatsheet with tooltips (alpha)

2012-03-25 Thread Philip Potter
This looks great! Big usability win! Phil On 24 March 2012 10:15, Andy Fingerhut wrote: > There are still some problems with this, but it is ready for experimental > use, at least.  Alex, please don't put this on clojure.org -- it ain't ready > yet. > > http://homepage.mac.com/jafingerhut/file

Re: core.logic now runs under ClojureScript

2012-03-25 Thread Evan Mezeske
On Saturday, March 24, 2012 7:19:41 PM UTC-7, David Nolen wrote: > > There's a lot of work left to do but I was able to successfully solve the > zebra puzzle with core.logic running under JavaScript via V8 in ~170ms. > There's tons of performance optimization yet to do, but to give some > perspe

Re: New(er) Clojure cheatsheet hot off the presses

2012-03-25 Thread Cedric Greevey
On Sun, Mar 25, 2012 at 2:59 AM, Andy Fingerhut wrote: > I've tried again using links with doc strings as the values of the title > attribute, but when the text in Firefox 11.0 it does not honor the line > breaks in my text, but reflows it.  Try it out yourself at [1]: > > [1] > http://homepage

Re: New(er) Clojure cheatsheet hot off the presses

2012-03-25 Thread Andy Fingerhut
I've tried again using links with doc strings as the values of the title attribute, but when the text in Firefox 11.0 it does not honor the line breaks in my text, but reflows it. Try it out yourself at [1]: [1] http://homepage.mac.com/jafingerhut/files/cheatsheet-clj-1.3.0-v1.4-tooltips/cheat