Re: Data types in Clojure

2008-10-22 Thread [EMAIL PROTECTED]
On Oct 22, 6:45 pm, Chouser <[EMAIL PROTECTED]> wrote: > Don't dismiss clojure/zip to easily.  The functions defined there > largely defer to functions stored in metadata on the object.  This > means a new type of zip tree can be provided by anyone in any > namespace, simply by returning an objec

Re: Currying for Clojure

2008-10-22 Thread André Thieme
On 23 Okt., 00:28, wwmorgan <[EMAIL PROTECTED]> wrote: > You can get most of the functionality you're looking for with partial Yes sure. The thing is that currying is nothing but syntactical sugar. It's not the functionality I am missing, but it’s brevity which makes sense in functional programmi

Re: Currying for Clojure

2008-10-22 Thread wwmorgan
You can get most of the functionality you're looking for with partial (map (partial * 3) (range 10)) => (0 3 6 9 12 15 18 21 24 27) (map (partial apply max 0) (partition 3 1 (range -5 5))) => (0 0 0 0 1 2 3 4) On Oct 22, 5:40 pm, André Thieme <[EMAIL PROTECTED]> wrote: > On 22 Okt., 23:24, André

Re: Reader + Macros on untrusted S Expressions: Security considerations?

2008-10-22 Thread Brett Morgan
I was heading in the direction of generating javascript on the server for page generation, so it makes some sense to keep using that technique for communication as well. In this model the webclient is trusting the javascript the server is generating, so I have to be diligent in my code generation n

Re: Currying for Clojure

2008-10-22 Thread André Thieme
On 22 Okt., 23:24, André Thieme <[EMAIL PROTECTED]> wrote: > This version of replace-placeholders still misses the numbered > args %1, %2, .. as the reader would also steal those from me. > In the end the #(..) macro would do it, instead of §. So what I just did was extending it for this demostr

Currying for Clojure

2008-10-22 Thread André Thieme
I would like to suggest to improve currying. Right now Clojure already comes with a nice way to do something that is nearly as good as currying, but still not fully. In a very functional programming style this makes sense to have good currying support. Here is my proposal for extending the #(...)

Re: Testing Clojure (was Re: Bug? Strange set equality (r1075))

2008-10-22 Thread Stephen C. Gilardi
On Oct 22, 2008, at 8:22 AM, J. McConnell wrote: > >> Run tests with: >> >> (require 'clojure.contrib.test-clojure) > > I don't see clojure.contrib.test-clojure. Are you going to be > committing that? It's up now. Once your CA is in to Rich, I'll be happy to accept patches to extend it

Re: ikvm and .NET

2008-10-22 Thread Shawn Hoover
On Wed, Oct 22, 2008 at 8:30 AM, Mark J P <[EMAIL PROTECTED]> wrote: > > Steps for running clojure as a .NET app and instantiating .NET types. > > - I converted the clojure.jar to clojure.dll: ikvmc -target:library c: > \path\to\clojure.jar (this creates clojure.dll) > - Convert mscorlib.dll to m

Re: Data types in Clojure

2008-10-22 Thread mb
Hi Konrad, On 22 Okt., 18:07, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > But assume I wanto to provide two implementations for such an > interface, in two separate namespaces. Can I then write client code > that will work with either one? I would have to pass it the namespace > as an argume

Re: ikvm and .NET

2008-10-22 Thread Mark J P
Forgot to include this step: Add a reference to IKVM.OpenJDK.ClassLibrary.dll in the .NET Project On Oct 22, 11:30 am, Mark J P <[EMAIL PROTECTED]> wrote: > Steps for running clojure as a .NET app and instantiating .NET types. > > - I converted the clojure.jar to clojure.dll: ikvmc -target:libr

Re: Data types in Clojure

2008-10-22 Thread Matthias Benkard
Hi, > But assume I wanto to provide two implementations for such an > interface, in two separate namespaces. Personally, I'd define multimethods as the “interface“, in a single namespace, and implement them for any set of data structures that I wanted to support. At least, this is the CLOS way,

Re: Data types in Clojure

2008-10-22 Thread Chouser
On Wed, Oct 22, 2008 at 12:07 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > For interfaces with a single implementation, this sounds fine. And > closure/zip is a fine example. > > But assume I wanto to provide two implementations for such an > interface, in two separate namespaces. Can I th

Re: ikvm and .NET

2008-10-22 Thread Mark J P
hmmm, the .NET String thing isn't quite working for some reason. Seems like it converts to the java string. I can work with StringBuilder though: (def sb (new cli.System.Text.StringBuilder)) (. sb (Append "asdf")) On Oct 22, 11:30 am, Mark J P <[EMAIL PROTECTED]> wrote: > Steps for running clo

Re: Data types in Clojure

2008-10-22 Thread [EMAIL PROTECTED]
Hi Meikel, thanks for your comments! > Well on the one hand you can define interfaces "by documentation". > Define the interface in the documentation and export the functions > which do things as advertised from your namespace. For interfaces with a single implementation, this sounds fine. And

ikvm and .NET

2008-10-22 Thread Mark J P
Steps for running clojure as a .NET app and instantiating .NET types. - I converted the clojure.jar to clojure.dll: ikvmc -target:library c: \path\to\clojure.jar (this creates clojure.dll) - Convert mscorlib.dll to mscorlib.jar: ikvmstub mscorlib.dll - Create a .net c# console app, and add refer

Re: Reader + Macros on untrusted S Expressions: Security considerations?

2008-10-22 Thread Chouser
On Wed, Oct 22, 2008 at 9:41 AM, Randall R Schulz <[EMAIL PROTECTED]> wrote: > > On Wednesday 22 October 2008 06:27, .Bill Smith wrote: >> Would you have S-expressions going from the server back to the client >> as well? > > If that client is a Web browser, then presumably it would require an > S-

Re: Reader + Macros on untrusted S Expressions: Security considerations?

2008-10-22 Thread Randall R Schulz
On Wednesday 22 October 2008 06:27, .Bill Smith wrote: > Would you have S-expressions going from the server back to the client > as well? If that client is a Web browser, then presumably it would require an S-Expression reader written in JavaScript to decode them. That would be a nice thing to

Re: Reader + Macros on untrusted S Expressions: Security considerations?

2008-10-22 Thread .Bill Smith
Would you have S-expressions going from the server back to the client as well? Bill --~--~-~--~~~---~--~~ 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 To u

Re: offtopic - where are you come from? (poll)

2008-10-22 Thread perdalum
Aarhus, Denmark On 17 Okt., 11:27, "Rastislav Kassak" <[EMAIL PROTECTED]> wrote: > Hello Clojurians, > > I think after 1st year of Clojure life it's good to check how far has > Clojure spread all over the world. > > So wherever are you come from, be proud and say it. > > I'm from Slovakia. :) > >

Re: Reader + Macros on untrusted S Expressions: Security considerations?

2008-10-22 Thread Rich Hickey
On Wed, Oct 22, 2008 at 6:55 AM, Brett Morgan <[EMAIL PROTECTED]> wrote: > > > On Wed, Oct 22, 2008 at 9:54 PM, Parth Malwankar <[EMAIL PROTECTED]> > wrote: >> >> >> >> On Oct 22, 3:42 pm, Parth Malwankar <[EMAIL PROTECTED]> wrote: >> > On Oct 22, 1:30 pm, "Brett Morgan" <[EMAIL PROTECTED]> wrote:

Re: Reader + Macros on untrusted S Expressions: Security considerations?

2008-10-22 Thread Chouser
On Wed, Oct 22, 2008 at 4:30 AM, Brett Morgan <[EMAIL PROTECTED]> wrote: > > I understand the lisp way is to use the reader plus macros to interpret the > incoming data stream. This is hella cool in that it seriously cuts down on > the amount of development work I have to do. The reader is already

Re: Testing Clojure (was Re: Bug? Strange set equality (r1075))

2008-10-22 Thread J. McConnell
> Run tests with: > >(require 'clojure.contrib.test-clojure) I don't see clojure.contrib.test-clojure. Are you going to be committing that? Thanks, - J. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clo

Re: Testing Clojure (was Re: Bug? Strange set equality (r1075))

2008-10-22 Thread mb
Hello Stuart, On 21 Okt., 16:37, Stuart Halloway <[EMAIL PROTECTED]> wrote: > Since there is now a movement afoot to write a comprehensive test   > suite, I want to re-post the spike I did earlier on ClojureCheck. > > It would be cool to use check-style tests for at least part of the   > Clojure

Re: [EMAIL PROTECTED]

2008-10-22 Thread Krukow
Rich, Was this presentation recorded? Any chance you can upload the slides and/or video for those of us that didn't participate in Lisp50. Thanks - Karl --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" grou

Re: Data types in Clojure

2008-10-22 Thread mb
Hi Konrad, On 22 Okt., 12:49, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > However, there is one point that is not clear to me: how does Clojure > deal with data types in general, and abstract data types in > particular? How would one implement a library for tree operations, a > graph library

Re: offtopic - where are you come from? (poll)

2008-10-22 Thread Matteo Pradella
Milano, Italy On Oct 17, 11:27 am, "Rastislav Kassak" <[EMAIL PROTECTED]> wrote: > Hello Clojurians, > > I think after 1st year of Clojure life it's good to check how far has > Clojure spread all over the world. > > So wherever are you come from, be proud and say it. > > I'm from Slovakia. :) > >

Re: offtopic - where are you come from? (poll)

2008-10-22 Thread Crsteen
Wellington, New Zealand "since 1989" --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send email to [EMAIL

Re: [EMAIL PROTECTED]

2008-10-22 Thread Eric
I second the thanks. The Clojure presentation was perfectly timed. After a whole day of talking about how Lisp was always about innovation. That Common Lisp was never supposed to be an end---it was a practical compromise not a technical ideal. That Lisp needs something new. Then you talked ab

Data types in Clojure

2008-10-22 Thread Konrad Hinsen
Hi everyone, I recently discovered Clojure (largely by accident) and investigated a bit by reading the on-line material and playing around with simple expressions (I have used other Lisps in the past, but never seriously). I am quite impressed with what I have seen - this looks like the f

Data types in Clojure

2008-10-22 Thread [EMAIL PROTECTED]
Hi everyone, I recently discovered Clojure (largely by accident) and investigated a bit by reading the on-line material and playing around with simple expressions (I have used other Lisps in the past, but never seriously). I am quite impressed with what I have seen - this looks like the first Lis

LispCast's assessment of Lisp50

2008-10-22 Thread graham
Very positive about Clojure! http://www.lispcast.com/drupal/node/77 --~--~-~--~~~---~--~~ 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 To unsubscribe from

Re: [EMAIL PROTECTED]

2008-10-22 Thread Eric
I second the thanks. The presentation was perfectly timed. The presentations that preceded it built the perfect mood. The idea in the air was that Lisp was about innovation and making programming easier. That Common Lisp was never meant to be the end. That Lisp needs something new. And here

Re: Reader + Macros on untrusted S Expressions: Security considerations?

2008-10-22 Thread Brett Morgan
On Wed, Oct 22, 2008 at 9:54 PM, Parth Malwankar <[EMAIL PROTECTED]>wrote: > > > > On Oct 22, 3:42 pm, Parth Malwankar <[EMAIL PROTECTED]> wrote: > > On Oct 22, 1:30 pm, "Brett Morgan" <[EMAIL PROTECTED]> wrote: > > > > - Recently the #= reader macro was added. This makes the reader > > do the e

Re: Reader + Macros on untrusted S Expressions: Security considerations?

2008-10-22 Thread Parth Malwankar
On Oct 22, 3:42 pm, Parth Malwankar <[EMAIL PROTECTED]> wrote: > On Oct 22, 1:30 pm, "Brett Morgan" <[EMAIL PROTECTED]> wrote: > > - Recently the #= reader macro was added. This makes the reader >   do the evaluation before using the value. You may want to >   disable this. E.g. > >   user=> #=(

Re: Reader + Macros on untrusted S Expressions: Security considerations?

2008-10-22 Thread Parth Malwankar
On Oct 22, 1:30 pm, "Brett Morgan" <[EMAIL PROTECTED]> wrote: > Hi all, > > I am thinking about a potential architecture for a webapp where in the > server gets s expressions posted from an ajax web client. > > From a security standpoint, the s expressions are coming from an untrusted > computer

Re: Reader + Macros on untrusted S Expressions: Security considerations?

2008-10-22 Thread Brett Morgan
I was honestly thinking of using S expressions purely as a replacement for the current trend to use JSON for everything. JSON basically is S expressions, except using hashmaps as the base type. The advantage being that I get a parser and tree walker language for free. On Wed, Oct 22, 2008 at 9:04

Re: Reader + Macros on untrusted S Expressions: Security considerations?

2008-10-22 Thread Christian Vest Hansen
If your untrusted S-expressions are expected to be pure functions on some input to some output, then you can use the existing java sandboxing features[1] to execute/read/whatever them in threads that are locked down tight. Then after sanitizing the output (which should be raw data), and you're don

Reader + Macros on untrusted S Expressions: Security considerations?

2008-10-22 Thread Brett Morgan
Hi all, I am thinking about a potential architecture for a webapp where in the server gets s expressions posted from an ajax web client. >From a security standpoint, the s expressions are coming from an untrusted computer, and thus are in need of careful vetting. With my java dev hat on, i'd mov