Re: Implemented isa? as a protocol, makes multimethods more open

2012-07-10 Thread Leif
Thanks! The similarity is no accident: When you consider it, 'isa?' is a generalized subtyping relation: (isa? Double Number) ==> Double <: Number (isa? ::goat ::animal) ==> ::goat <: ::animal (isa? 1 x) ==> #{1} <: x, which makes sense if you define the value x to mean "the set of all things e

Re: Implemented isa? as a protocol, makes multimethods more open

2012-07-10 Thread Ambrose Bonnaire-Sergeant
This is cool :) It reminds me of subtyping between maps in Typed Clojure, where {:a 1, :b 2} <: {:a Number} Thanks, Ambrose On Wed, Jul 11, 2012 at 2:16 PM, Leif wrote: > Hi, everybody. I reimplemented the function isa? in terms of a protocol > Is-A. > > The reason why you would want to do t

Implemented isa? as a protocol, makes multimethods more open

2012-07-10 Thread Leif
Hi, everybody. I reimplemented the function isa? in terms of a protocol Is-A. The reason why you would want to do that is in the README at https://github.com/leifp/clj-isa-protocol tl;dr: One of the reasons why people are excited about predicate dispatch is the irritation caused by the dispa

Re: [ANN] ClojureC - A Clojure to C compiler - Work in Progress

2012-07-10 Thread kovas boguta
Looks like a lot of people are excited about this. For the specific purpose of cocoa apps, can someone explain how this is better/different than the other approaches? There are at least 3 other projects that promise some kind of c/objective-c interop, https://github.com/takeoutweight/clojure-sche

Re: ClojureC - A Clojure to C compiler - Work in Progress

2012-07-10 Thread Mark Probst
Hey Adam, > I've spent a couple of hours on this - and have run into a snag. I've got > libgc compiling/linking with arm iOS and the Xcode project compiles cljc.c > fine. The problem is glib. From what I've read, iOS can not use glib as it > must be statically linked into the app - but the LGP

Re: Parsing SGML

2012-07-10 Thread Alan Malloy
Just create a Reader over the file, and do something like (take-while identity (repeatedly #(read-one-wellformed-xml-tag the-reader))). It needs some fleshing out for boundary conditions, but I hope you get the general idea. On Tuesday, July 10, 2012 6:04:23 AM UTC-7, Wolodja Wentland wrote: >

Re: Help getting Clojure/Leiningen 2.0 building with LWJGL

2012-07-10 Thread Karl Smeltzer
On Tue, Jul 10, 2012 at 8:36 AM, George Oliver wrote: > > > On Sunday, July 8, 2012 7:26:05 PM UTC-7, Karl Smeltzer wrote: >> >> >> 3. Added :native-path "native" to my project.clj, although I'm not sure >> this is correct or working the way I expect >> >> > > Have a look at this, > > > http://sta

Re: ClojureC - A Clojure to C compiler - Work in Progress

2012-07-10 Thread Adam King
On Tue, Jul 10, 2012 at 2:09 PM, Timothy Baldridge wrote: > > Please don't bypass C! Almost all platforms have some sort of C > compiler - it's like javascript for native platforms, instead of the web. > With C output, I can probably get it working on iOS > > The same is true for LLVM. There's n

Re: ClojureC - A Clojure to C compiler - Work in Progress

2012-07-10 Thread Timothy Baldridge
> Please don't bypass C! Almost all platforms have some sort of C compiler - > it's like javascript for native platforms, instead of the web. With C > output, I can probably get it working on iOS The same is true for LLVM. There's no reason why LLVM can't target iOS. Timothy -- You received

Re: ClojureC - A Clojure to C compiler - Work in Progress

2012-07-10 Thread Adam King
Hi Mark: I've spent a couple of hours on this - and have run into a snag. I've got libgc compiling/linking with arm iOS and the Xcode project compiles cljc.c fine. The problem is glib. From what I've read, iOS can not use glib as it must be statically linked into the app - but the LGPL doesn't

Hiring clojure/haskell developer

2012-07-10 Thread Vagif Verdi
Hello. My company is looking to hire a haskell/clojure developer. South California (San Dimas), full time job, local only (no telecommute) We use yesod (haskell web framework) for internal web application and web services, and compojure (clojure web framework) for customer facing web site.

Re: [ANN] Nippy, a fast Clojure serializer and drop-in reader replacement

2012-07-10 Thread Peter Taoussanis
Hi Alex, Thanks for your input (and all your work on Carbonite)- much appreciated! 1) buffer reuse - reusing cached ThreadLocal byte[] for converting from > data to bytes is a nice trick and made possible in most serialization libs > but I don't that's possible in the current code. > I experim

Re: ClojureScript compiler generates incorrect javascript code for protocol function

2012-07-10 Thread David Nolen
On Tue, Jul 10, 2012 at 12:23 PM, Praki wrote: > Hi, > > The javascript code generated for the following clojurescript is wrong. The > problem is, if the protocol name is hyphenated, the generated name is > treating that as an arithmetic expression rather than translating the hyphen > to underscor

ClojureScript compiler generates incorrect javascript code for protocol function

2012-07-10 Thread Praki
Hi, The javascript code generated for the following clojurescript is wrong. The problem is, if the protocol name is hyphenated, the generated name is treating that as an arithmetic expression rather than translating the hyphen to underscore. The git tag of clojurescript is r1443. I am not very

Re: Help getting Clojure/Leiningen 2.0 building with LWJGL

2012-07-10 Thread George Oliver
On Sunday, July 8, 2012 7:26:05 PM UTC-7, Karl Smeltzer wrote: > > > 3. Added :native-path "native" to my project.clj, although I'm not sure > this is correct or working the way I expect > > Have a look at this, http://stackoverflow.com/questions/10558795/using-lwjgl-in-leiningen-clojure -

Re: [ANN] Nippy, a fast Clojure serializer and drop-in reader replacement

2012-07-10 Thread Alex Miller
If you are serializing data, then using the reader implies serializing to a string (by printing your data) and reading it from a string. It should be obvious that marshalling data to/from strings is neither fast nor small compared to other binary alternatives. Using the reader is nice for cer

Re: Parsing SGML

2012-07-10 Thread Tassilo Horn
Wolodja Wentland writes: Hi Wolodja, > valid XML apart from the fact that they lack a root tag. The whole issue is > complicated by the fact that the input files are pretty large (i.e. 9.1 GB > gzipped files) and that I therefore cannot read them completely into > memory. > > I am, however, unsu

Re: Give sequences it's own structure

2012-07-10 Thread Tassilo Horn
Timothy Baldridge writes: >> It's confusing that the REPL prints out a list structure when it's in >> fact a sequence: > > There's really only one key difference between seqs and lists is that > lists include a count private field. That's true for any seq that's not created by calling seq on a l

Re: strange lazy behaviour

2012-07-10 Thread Tassilo Horn
Andrew Rafas writes: Hi Andrew, > Just created this solution for the Number Maze problem on 4clojure: > http://www.4clojure.com/problem/106 > > ( > (fn [a b] > (letfn [(nummaze [a b len] > (cond >(= len 0) false >(= a b)

Re: Give sequences it's own structure

2012-07-10 Thread Timothy Baldridge
> It's confusing that the REPL prints out a list structure when it's in fact a > sequence: There's really only one key difference between seqs and lists is that lists include a count private field. So the only way that you will ever have a problem in this regard is when doing a count on the data.

ANN Monger 1.1.0

2012-07-10 Thread Michael Klishin
Monger is an idiomatic Clojure MongoDB driver for a more civilized age: with batteries included, sane defaults, solid documentation and excellent performance. 1.1.0 is a small release that includes * A new session store that works well with Friend * Alternative functions for inserting and savi

Re: ClojureC - A Clojure to C compiler - Work in Progress

2012-07-10 Thread Mark Probst
On Mon, Jul 9, 2012 at 7:03 PM, Adam King wrote: > However, thanks for your work on this! In the next couple of days, I'll > see if I can get it compiling and running under iOS. Wonderful! If you're interested in working on Objective-C interop, let me know - I have a few ideas. Mark -- You

[SemiOT] Using Clojure word into open source project name

2012-07-10 Thread Angel Java Lopez
Hi people! Is there any recommendation, flow to follow, requirements, to use "Clojure" word in an open source project? Or I can use it without any previous ceremony? Or there is any formal/informal "os-etiquette"? I'm not a lawyer (I understand code! ;-). I want to use the c** word ;-) in one o

strange behavior with seqs

2012-07-10 Thread Andrew Rafas
Hi! It is a second time I post this message, now I will not put a link into it so maybe it will get trough the spam filter... So I have solved the 106. 4clojure problem, the Number Maze, and my solution behaves rather strangely in the Counterclockwise REPL (and similar on 4clojure solution che

Re: critique my code!

2012-07-10 Thread Ivan Kozik
On Sun, Jul 8, 2012 at 4:58 PM, William Morgan wrote: > (E.g. surely people don't use the repl with single-line uninformative > error messages... what am I doing wrong?) (pst) ; that is, print stack trace Ivan -- You received this message because you are subscribed to the Google Groups "Cloju

Re: ClojureC - A Clojure to C compiler - Work in Progress

2012-07-10 Thread Adam King
Please don't bypass C! Almost all platforms have some sort of C compiler - it's like javascript for native platforms, instead of the web. With C output, I can probably get it working on iOS (my main work target platform, along with Android) - I had Boehm GC compiled and working sometime ago for

Re: ClojureC - A Clojure to C compiler - Work in Progress

2012-07-10 Thread charlie
I think the benefits outweight the negatives, yes it's more pure going straight to LLVM and takes out one more compilation step , but having it translate to C opens up the possibility of it running on any machine architecture that has a C compiler. On Mon, Jul 9, 2012 at 11:40 AM, Paulo Pinto w

Re: [ANN] ClojureC - A Clojure to C compiler - Work in Progress

2012-07-10 Thread Eduardo Bellani
I would take a look at bigloo and gambit, those implementations produce solid C code from a Scheme base. On 07/09/2012 08:50 AM, Baishampayan Ghose wrote: >> I'm excited to announce ClojureC, an effort to produce a Clojure >> implementation that targets C: >> >> https://github.com/schani/clojure

Give sequences it's own structure

2012-07-10 Thread wingy
It's confusing that the REPL prints out a list structure when it's in fact a sequence: Eg. (seq [1 2 3]) ;=> (1 2 3) People might think it's a list, but it's a sequence (logical list in memory only, not a new data structure). (seq? (seq [1 2 3])) ;=> true (list? (seq [1 2 3])) ;=> false I fe

Re: Clojure @ Prague?

2012-07-10 Thread Jiří Zůna
Hi guys, I, somehow, missed this thread but I am all up for clojure @ Prague On Thu, Jul 5, 2012 at 7:54 PM, Edward Tsech wrote: > HI Daniel, > > I'm interested in Clojure and I would like to meet some Clojurians in > Prague too! > > Ed > > > On Friday, June 29, 2012 12:21:58 PM UTC+2, Daniel Sk

HTML documentation

2012-07-10 Thread Isaac
Hi! I know I can type (odoc definst) and get the docs for definst. Is there an HTML version of the documentation for all of the functions and macros in the overtone framework? I can't find any. Thanks! -- You received this message because you are subscribed to the Google Groups "Clojure" grou

Help getting Clojure/Leiningen 2.0 building with LWJGL

2012-07-10 Thread Karl Smeltzer
Is anybody willing and able to walk me through getting a simple project compiling which correctly manages all the dependencies required by LWJGL [1]? It seems that Leiningen's handling of native dependencies has changed over time and so much of the already scant information on the web is no lon

Re: Creating a custom Closure UI component in Clojurescript

2012-07-10 Thread Brian Taylor
I just hit this issue myself and wrote a macro to make it a bit easier to extend google-closure provided classes. Here's the code: (ns move.macros (:require [cljs.compiler :as compiler] [cljs.core :as cljs])) (defmacro goog-extend [type base-type ctor & methods] `(do (defn ~

strange lazy behaviour

2012-07-10 Thread Andrew Rafas
Hi! Just created this solution for the Number Maze problem on 4clojure: http://www.4clojure.com/problem/106 ( (fn [a b] (letfn [(nummaze [a b len] (cond (= len 0) false (= a b) true (nummaze (* 2 a) b

Parsing SGML

2012-07-10 Thread Wolodja Wentland
Dear all, I am running into problems when I try to parse SGML documents [0] that are valid XML apart from the fact that they lack a root tag. The whole issue is complicated by the fact that the input files are pretty large (i.e. 9.1 GB gzipped files) and that I therefore cannot read them completel

Re: [ANN] ClojureC - A Clojure to C compiler - Work in Progress

2012-07-10 Thread Peter Taoussanis
Man- the day there's a mature, production-ready C(something) compiler, I'm going to flip out. Can't wait. Thank you for working on this! -- 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 No

Re: [ANN] Nippy, a fast Clojure serializer and drop-in reader replacement

2012-07-10 Thread Peter Taoussanis
Hey Frank, Thanks for getting in touch! With the tag literal support of 1.4+, is that kind of the idiomatic way of > the future to structure protocols for serialized clojure data/code? > Sorry, could you clarify what you're asking here - I'm not sure if I follow what you mean by "structure pr

Re: Light Table Playground got a lot more useful.

2012-07-10 Thread JuanManuel Gimeno Illa
Is saving supported? Because I have the save option disabled. Juan Manuel -- 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