Re: edn

2012-09-06 Thread Richard Lyman
On Thu, Sep 6, 2012 at 7:01 PM, Rich Hickey wrote: > I've started to document a subset of Clojure's data format in an effort to > get it more widely used as a data exchange format, e.g. as an alternative to > JSON. > > Please have a look: > > https://github.com/richhickey/edn > > Rich > Thanks

Re: Lightweight lib/way to strip html from text

2012-09-06 Thread Richard Lyman
On Thu, Sep 6, 2012 at 11:41 AM, jamieorc wrote: > Hey all, I'm looking for a lightweight way to strip html from a long String > of text and leave just the text. I've come across JSoup, but at over 300kb > for the lib, not quite lightweight. > > Suggestions? > > Cheers, > Jamie > When you say 'ht

Re: SaxParseException when using the Rome rss library

2012-08-19 Thread Richard Lyman
On Fri, Aug 17, 2012 at 5:26 PM, keedon wrote: > Hi, > I've got a clojure problem and I'm hoping someone can help: > > I'm trying to parse an rss feed which contains illegal characters and I'm > getting this error > > SAXParseException An invalid XML character (Unicode: 0x19) was found in the > el

Re: Can you make Amotoen faster?

2012-08-03 Thread Richard Lyman
On Thu, Jul 19, 2012 at 7:09 AM, David Nolen wrote: > On Wed, Jul 18, 2012 at 10:12 PM, Richard Lyman > wrote: >> All, >> >> There's not much code, and (sadly) not much documentation, but what's >> there needs some performance love. >> >>

Re: Can you make Amotoen faster?

2012-07-19 Thread Richard Lyman
On Thu, Jul 19, 2012 at 7:09 AM, David Nolen wrote: > On Wed, Jul 18, 2012 at 10:12 PM, Richard Lyman > wrote: >> All, >> >> There's not much code, and (sadly) not much documentation, but what's >> there needs some performance love. >> >>

Can you make Amotoen faster?

2012-07-18 Thread Richard Lyman
All, There's not much code, and (sadly) not much documentation, but what's there needs some performance love. https://github.com/richard-lyman/amotoen Notes: - jvisualvm doesn't like me this week so help there might be enough (I can't see anything other than clojure classe

Re: Creating parsers in clojure

2012-02-03 Thread Richard Lyman
The little information you've provided leaves the field pretty open... ... but when I'm 'toying' around with ASTs I like Amotoen ('course I'm probably biased. ;-)). https://github.com/richard-lyman/amotoen -Rich On Fri, Feb 3, 2012 at 6:21 AM, Anna wrote: > I

Re: Looking for parser generator library

2012-01-28 Thread Richard Lyman
Have you looked at amotoen? https://github.com/richard-lyman/amotoen I'm not sure what your needs are... -Rich On Sat, Jan 28, 2012 at 8:19 AM, Roman Perepelitsa wrote: > I'm looking for a parser generator library. I stumbled upon fnparse, but > unfortunately it doesn

Re: Building Clojure applications w/ Maven

2011-12-06 Thread Richard Lyman
Can you provide the pom you're using? By 'build' do you mean AOT? -Rich On Tue, Dec 6, 2011 at 3:35 PM, Riccardo wrote: > Hello, I am doing my dissertation project with Clojure and I am using > Maven to build. It works on REPL and it build successfully, but the > JAR file doesn't work, it say

Re: Handling of unsigned bytes

2011-02-11 Thread Richard Lyman
I have to deal with them when processing AMF packets, and I use the Netty library - it's amazing, you should look into it. http://www.jboss.org/netty -Rich On Fri, Feb 11, 2011 at 10:22 AM, timc wrote: > How on earth is one supposed to do communication programming (not to > mention handling bi

Re: getting started with clojure

2010-10-19 Thread Richard Lyman
On Tue, Oct 19, 2010 at 5:55 PM, ishkabible wrote: > lastly i have been messing around with new languages just to try them > out. Fantastic fun! I wish you the best of luck. > in trying out coljure (only functional language i have tried yet) > but i can compile anything longer than one line. Ar

[ANN] clj-peg is dead

2010-08-16 Thread Richard Lyman
Since Amotoen does everything that clj-peg did, and since Amotoen does it in a more maintainable way... http://github.com/richard-lyman/amotoen -Rich -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email

[ANN] Amotoen

2010-08-16 Thread Richard Lyman
First: http://github.com/richard-lyman/amotoen Second: Amotoen is a Clojure library that supports PEG style definitions of grammars that can produce parsers. While there are academic papers available that rigorously define PEG, I've found that PEGs, or Parsing Expression Grammar(s), are

Re: Flex as a Clojure Frontend

2010-08-16 Thread Richard Lyman
On Sun, Aug 15, 2010 at 9:13 PM, nchubrich wrote: > Thanks Rich--I'm actually interested in all kinds of configurations. > For the time being, it will be a Flex frontend in the browser > communicating with Clojure on the server.  In the future, we might > want to make the Clojure part into a Java

Re: Flex as a Clojure Frontend

2010-08-15 Thread Richard Lyman
On Sat, Aug 14, 2010 at 1:40 PM, nchubrich wrote: > I'm wondering if anyone has any experience developing Clojure > applications with a Flex interface, and if so, what is the best way of > going about it. > I have quite a bit of experience. I've been writing an internal implementation of the non-

Re: ClojureDocs.org

2010-07-11 Thread Richard Lyman
On Sun, Jul 11, 2010 at 8:14 AM, Phil Hagelberg wrote: > On Sat, Jul 10, 2010 at 11:23 PM, zkim wrote: >>> but what do you think about using Justin's codebase, or an Aleph-based >>> server to >>> host the thing instead of Ruby/Rails? (see the link above for more details) >> >> I'm inclined to mo

Re: DSL with a grammar

2010-07-08 Thread Richard Lyman
On Thu, Jul 8, 2010 at 1:34 PM, Nicolas Oury wrote: > Sorry, that's why I had quote around my parse. > I meant, use clojure reader to take a sequence in a macro and then "parse" > it for my own DSL. > So I shouldn't need any help from the reader (even if having some metas with > line and character

Re: Recommendations on prepping a library for 1.2 release?

2010-06-16 Thread Richard Lyman
On Wed, Jun 16, 2010 at 8:36 PM, David Nolen wrote: > On Wed, Jun 16, 2010 at 10:17 PM, Richard Lyman > wrote: >> >> Everything's on github - right? The simplest commands to grab the core >> (and contrib?) from github as well as the commands to keep updating >

Recommendations on prepping a library for 1.2 release?

2010-06-16 Thread Richard Lyman
I guess I'm mostly wondering where to get the best (continually update-able best) version of 1.2 core (and contrib?) before it's released. I'd rather not go Lein or Maven2 - just a vanilla checkout and Ant if that's still a supported build option. Everything's on github - right? The simplest comm

Re: Macros, any reading suggestion?

2010-06-03 Thread Richard Lyman
On Thu, Jun 3, 2010 at 1:24 PM, Miki wrote: > Hello alux, > >> I still have some technical questions, but the main issue seems to be >> that I need to dive more deeply into the whole area of macro >> programming. > You might find http://www.paulgraham.com/onlisp.html interesting. > (The PDF versio

Re: Calling for advice on a parser's location data

2010-05-02 Thread Richard Lyman
On Sun, May 2, 2010 at 6:29 PM, joshua-choi wrote: > I'm making a parsing library that can keep track of its location in a > stream of tokens, and the tokens can be of any type—character, map, > and so forth. I need advice on this question: > > Can you think of an instance where the location would

Re: jogl classpath not found

2010-03-11 Thread Richard Lyman
I'm not sure if this will help, but here's some tidbits from the day I spent toying around with JOGL... I think it was version 1.1.1. This is part of the Ant file that I used: ...

Re: map not working in loop

2010-03-05 Thread Richard Lyman
t; (map #(* % %) b))) > > I am taking the third parameter and squaring it. Isn't that a > modification? > > thx everybody for the help! > > On Mar 5, 7:15 am, Richard Lyman wrote: > > On Fri, Mar 5, 2010 at 7:05 AM, Glen Rubin wrote: > > > The following

Re: map not working in loop

2010-03-05 Thread Richard Lyman
On Fri, Mar 5, 2010 at 7:05 AM, Glen Rubin wrote: > The following code does not work, when using (range 1 5) as coll > input: > > > (defn pyt [coll] > (loop [b (rest (coll))] > >(map #(* % %) b))) > > > The real code was more complicated, but I refined it to its simplest > form while still

Re: [ANN] clj-peg 0.7 (switch to EPL)

2010-02-13 Thread Richard Lyman
On Sat, Feb 13, 2010 at 5:33 PM, Brendan Ribera wrote: > Cool! I'll probably make use of this soon. Any plans to get it set up on > github for contributions? > No plans right now. I'm open to the idea, but I'd like to see what it's like to work with contributions in the current setup. I'd like

[ANN] clj-peg 0.7 (switch to EPL)

2010-02-13 Thread Richard Lyman
All, I've switched the clj-peg library to be under the EPL. This project adds support in Clojure for Parsing Expression Grammars. In addition to the basic operators I've added tracking AST branches, referring to tracked branches, gathering

About releasing clj-peg under the EPL 1.0

2010-01-31 Thread Richard Lyman
I have a few questions I'm hoping to get some feedback on. = Releasing source code = If I understand the EPL 1.0 correctly, under section 3(b) part IV, I'm forced to release my source code - right? I _cannot_ just release an AOT JAR under the EPL 1.0 and keep the source code under a different l

Re: clj-peg v0.6 released

2010-01-10 Thread Richard Lyman
On Fri, Jan 8, 2010 at 11:07 AM, Paul Mooser wrote: > At some point, hopefully someone will write an open-source parsing > library with liberal licensing terms for clojure. > Would you mind elaborating on your definitions for the terms "open-source" and "liberal licensing"? I'm not sure I like

Re: [ANN] clj-peg v0.6 released

2010-01-08 Thread Richard Lyman
Currently I'm only providing the code in AOT form. If the JAR is on your classpath everything in the manual works just fine. Did that answer your question? -Rich 2010/1/7 Michał Kwiatkowski > On Mon, Jan 4, 2010 at 11:27 PM, Richard Lyman > wrote: > > This project adds s

Re: [ANN] clj-peg v0.6 released

2010-01-05 Thread Richard Lyman
For now I'd rather be compensated if someone were planning on using clj-peg commercially. I'm not sure how much I'd charge for a commercial-friendly license, and I don't have an automated process for handling billing and production of a differently licensed product, so I'm reluctant to move that di

Re: clj-peg v0.6 released

2010-01-05 Thread Richard Lyman
I'm not familiar with Scala's parser combinators, in addition, I'm fuzzy on the technical definition of a parser combinator. I think I'd call it a parser combinator, since the grammar is embedded in the code using native Clojure data structures, evaluation can be delayed, and grammar definitions c

Re: clj-peg v0.6 released

2010-01-04 Thread Richard Lyman
terested in pre-releases... thanks for the suggestion. Maybe adding RSS feeds back in should take a higher priority. -Rich On Mon, Jan 4, 2010 at 8:25 PM, Seth wrote: > An RSS feed might help early adopters test prereleases, but it's been > explicitly disabled? > > On Jan

Re: clj-peg v0.6 released

2010-01-04 Thread Richard Lyman
Oh, sorry! I was thinking about releasing this version last week - but with the new year likely taking precedence I thought I'd wait. Maybe next time I'll send you a version a few days before I announce it. ;-) -Rich On Mon, Jan 4, 2010 at 3:32 PM, Anniepoo wrote: > Sweet! > > Wish I'd had

[ANN] clj-peg v0.6 released

2010-01-04 Thread Richard Lyman
All, This project adds support in Clojure for Parsing Expression Grammars. You'll be able to write pseudo-ebnfs directly in your Clojure code. Currently, this... Expr <- [Sum $] Sum <- [Product (* [SumOp Product])] Product <- [Value (* [ProductOp Value])] Value <- (| Num Sum)

[ANN] clj-peg 0.4

2009-07-08 Thread Richard Lyman
Version 0.4 brings modifications to the syntax for declaring grammars as well as suggestions about avoiding the exponential runtimes that can occur. Here is a post walking through these changes . -Rich --~--~-

Re: Questions / guidelines for adopting Clojure

2009-07-07 Thread Richard Lyman
On Tue, Jul 7, 2009 at 6:08 AM, Roman Roelofsen < roman.roelof...@googlemail.com> wrote: > > Hi all! Hello! Welcome to the group. * Syntax * > > I never used a LISP-like language before and I can't read the clojure > code as fluent as code from different languages. Take for example this > sca

[ANN] clj-peg

2009-07-03 Thread Richard Lyman
I'm a little apprehensive about sharing this project with others, but I thought I might as well try. I'm very interested in any feedback, but for now the license is a bit-non-open. There are modifications that I'm still wanting to make to the core before I fully open the license. Here's a bit of

Re: How to call function (or Java method) using string name?

2009-04-27 Thread Richard Lyman
There's a section on the wiki with almost the exact same title: http://en.wikibooks.org/wiki/Clojure_Programming/Examples#Invoking_Java_method_through_method_name_as_a_String If I'm understanding the question correctly that should do what you're wanting to do. -Rich On Sun, Apr 26, 2009 at 11:

Re: [ANN] Compiling Clojure applications using Ant

2009-04-11 Thread Richard Lyman
at, Apr 11, 2009 at 3:49 PM, Richard Lyman > wrote: > > http://www.lithinos.com/Compiling-Clojure-applications-using-Ant.html > > > > What do you guys think? > > > > -Rich > > It's a bit simpler to use clojure.lang.Compile as a mai

[ANN] Compiling Clojure applications using Ant

2009-04-11 Thread Richard Lyman
Searching for 'clojure ant compile' returns pages that talk about the process of compiling the Clojure and Contrib JARs - but I couldn't find pointers on setting up a project to use Ant, so... http://www.lithinos.com/Compiling-Clojure-applications-using-Ant.html What do you guys think? -Rich --

Re: 6 + 7 = 13

2009-02-24 Thread Richard Lyman
It's probably already been changed. They've had a really fast response time here for things like that. -Richard On Tue, Feb 24, 2009 at 10:08 AM, Marko wrote: > > Strange, I'm sure I saw 7 this morning and not 36. Either I was > delusional or somebody changed it already. > > > --~--~---

[Solved] Re: Invoking Java method through method name as a String

2009-02-22 Thread Richard Lyman
I've added a section on the Wiki under the examples: http://en.wikibooks.org/wiki/Clojure_Programming/Examples#Invoking_Java_method_through_method_name_as_a_String Again, thanks! -Rich --~--~-~--~~~---~--~~ You received this message because you are subscribed to t

Re: Invoking Java method through method name as a String

2009-02-22 Thread Richard Lyman
This is _so_ awesome!! Thanks a ton for your patient help Tim, and others. In the end I also had to switch the use of into-array to to-array, since into-array expects all the elements to be the same type, and my args were of varying types. Using to-array worked since it cast each element to the O

Re: Invoking Java method through method name as a String

2009-02-21 Thread Richard Lyman
Cool... that looks like it got me past the 'method-as-a-string' problem, but now I'm getting errors with not finding a matching method on the class by that name. I'm guessing that this means there was a problem matching the type signature of the method. The arguments to the method are stored in a

Re: Clojure Questions

2009-02-21 Thread Richard Lyman
>From the http://clojure.org/getting_started page: "Clojure is delivered in a zip file containing a single .jar, clojure.jar, a readme, the CPL license and the source code in a src subdirectory. It uses the ASM 3.0 bytecode library , and the current alpha distribution in

Re: Invoking Java method through method name as a String

2009-02-21 Thread Richard Lyman
Thanks for the quick response! :-) This works fine when the method name is not in a var, but if you try: user=> (defmacro my-invoke [method-str instance & args] `(. ~instance ~(symbol method-str) ~...@args)) nil user=> (my-invoke "toString" 5) "5" user=> (def command "toString") #'user/command u

Invoking Java method through method name as a String

2009-02-21 Thread Richard Lyman
I have an instance of the Java class in a variable. I have the method arguments in a vector. I have the method name as a String. I've tried so many different ways to invoke that method on that class and pass those parameters. I've tried macros, reflection, and read/eval. None of the ways I've trie