Re: DDJ for Clojure/Lisp/FP

2011-03-15 Thread patrickdlogan
The ACM published Lisp Pointers, I think from around 1988 to 1995. That was 
along these lines of a semi-formally peer-reviewed journal. They are in the 
ACM Digital Library. If you have access, they might serve as inspiration for 
overall flow and/or specific kinds of articles.

-- 
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 email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Implementing "ClojureScript" - command-line/sys-admin scripting with Clojure

2011-03-05 Thread patrickdlogan
Well, reviving scsh and writing some clojure-ish macros for a lightweight, 
fast-starting scheme (e.g. gambit which can compile small utilities, has 
excellent unix process, file, and networking already) would be a *lot* 
easier than the effort to get any JVM language up to par for the same goal.

Just saying. Choosing a good set of tools for the specific job is often half 
the battle.

-- 
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 email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Tailing a file in Clojure

2010-12-03 Thread patrickdlogan


On Dec 3, 4:42 am, Alex Osborne  wrote:
> patrickdlogan  writes:
> > Java has a file watch API to avoid polling.
>
> I assume you're talking about the NIO 2 watch service?  That's not
> yet in a released version of Java, it's coming in Java 7.

oh I see.

-- 
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 email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Quene in Clojure

2010-12-03 Thread patrickdlogan
It is not a shared, concurrent data structure. In and of itself it can
not be used to mutate a shared collection of data.

You could use something like Java's ConcurrentLinkedQueue.

On Dec 3, 2:17 pm, Andreas Kostler 
wrote:
> Hi All,
> May I cite an Author of a populer Clojure book:
>
> "If you find yourself wishing yourself to repeatedly check a work
> queue to see if there's an item of work to be popped off,
> or if you want to use a queue to send a task to another thread, you do
> *not* want the PersistenQueue discussed in this section"
>
> Why do I not want to use clojure.lang.PersistentQueue for that purpose
> and what would I want to use instead?
> Can anyone fill me in please?

-- 
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 email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Tailing a file in Clojure

2010-12-02 Thread patrickdlogan
Java has a file watch API to avoid polling. Stuart Sierra uses it to
good effect in lazytest.


On Dec 2, 9:14 am, Alex Osborne  wrote:
> viksit  writes:
> > What would you recommend as the best method to tail a file using
> > Clojure? Are there any built in functions in contrib or core that
> > allow a program to read the last line of a file as it is appended to?
> > If not - how do people solve a problem like this?
>
> > My aim is simple - I've got a log file and I'd like to parse it as it
> > gets appended to.
>
> Tail just polls the file every 1 second or whatever (it's configurable
> -s option) and check's if the file's length has changed.  You can do
> this yourself easily enough.
>
> Some discussion here (it's Java, but you'd do exactly the same in Clojure):
>
> http://stackoverflow.com/questions/557844/java-io-implementation-of-u...
>
> When I've had this problem myself (on unix), I've just been lazy and
> implemented it by doing:
>
> tail -f somefile.log | java ...
>
> Or shelling out to `tail' from within the program.  Ugly perhaps, but I
> know GNU tail behaves the way I want when the file is truncated and
> such. :-P

-- 
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 email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Conj arrivals and Thursday night...

2010-10-19 Thread patrickdlogan
I should be at the hotel around 6pm. Code, coffee, drinks,
conversation all sound equally fine to me.

On Oct 18, 9:32 am, Andrew Gwozdziewycz  wrote:
> Hey Conj goers,
>
> I'm scheduled to arrive around 6:30, and after I check in am planning
> to spend the rest of the night writing code. Anyone want to help
> commandeer a random lobby to join in on the fun?
>
> Andrew
> --http://www.apgwoz.com

-- 
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 email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: cool compiler-project?

2010-08-19 Thread patrickdlogan
You might consider some kind of "whole-program" optimizations along
the lines of the Stalin compiler for Scheme. Stalin compiles Scheme to
C and makes a lot of representation decisions, unboxing, as well as a
lot of call-stack-aware memory allocations/deallocations. Not all of
these would be applicable to the same degree running on the JVM or
CLR, but many would.


On Aug 18, 5:35 am, Sreeraj a  wrote:
> Hi,
> I am a post-grad student looking for a cool compiler - project to do.
> I am getting comfortable with clojure and would really like to help
>
> Ideas anyone?
> or, Is there a to-do list where can i start?
>
> Cheers
> Sreeraj

-- 
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 email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: do clojure and la(tex) have something in common ?

2010-05-27 Thread patrickdlogan
See http://www-sop.inria.fr/members/Manuel.Serrano/scribe/

On May 23, 6:55 am, faenvie  wrote:
> today i read this statement in a blog-post:
>
> "... remarkably (La)TeX is much better suited for composing and
> distributing most types of documents than any other modern
> word processor on the market that I am aware of. Just like
> programming languages tend to converge towards Lisp because
> it got things right the first time around, so do the Word
> Processors tend to converge towards (La)TeX."
>
> what about combining (la=)tex and clojure for implememting
> extraordinary document-processing ?
>
> either by run (A) Clojure scripts from (La)TeX documents
> and use Clojures output to generate document's content. This
> can be used to read/convert data, generate tables and figures,
> do on-the-fly calculations.
>
> or by (B) implementing a clojure-based DSL that can produce
> (La)Tex documents.
>
> any thoughts ?
>
> --
> 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 email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://groups.google.com/group/clojure?hl=en

-- 
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 email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Actors not good for concurrency model

2010-05-17 Thread patrickdlogan
> i don't expect it would be hard to write an Erlang program with 2
> actors that would deadlock.

Of course it wouldn't.

> as far as i know, people use timeouts on
> message handling to sweep it under the carpet.

Most people probably use the OTP library with well-defined "behaviors"
is what they call them. You write the functions for your application
and plug them into the libraries of well-defined messaging behavior.

-- 
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 email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Actors not good for concurrency model

2010-05-16 Thread patrickdlogan
Nice diatribe against actors by someone who's apparently never...
actually... used... actors. Clojure is really nice, but that doesn't
mean I'm going to buy into weak arguments against features it doesn't
have in its core.


On May 16, 12:19 pm, Fabio Kaminski  wrote:
> Sorry about using the list like twitter..
>
> but i thought this is a pretty good "article" about functional programming
> side effects, and why actors are not very good design decision..
>
> Actors not good for concurrency model 
> :http://pchiusano.blogspot.com/2010/01/actors-are-not-good-concurrency...
>
> just another prove that Rich thoughts are pretty concise ,
> and that all are pretty well materialized in clojure's framework.
>
> what convinced me to embrace clojure, is that it choose to make the right
> thing , instead of the popular one..
>
> as haskell community says wisely : "avoid success at all costs " :)
>
> --
> 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 email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://groups.google.com/group/clojure?hl=en

-- 
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 email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Erlang like environment

2010-04-17 Thread patrickdlogan
I have used blitz javaspaces quite a bit, but not yet with clojure. I
believe they would we be a good fit. Javaspaces are a dynamic,
flexible, by-value, distributed coordination mechanism.


On Apr 14, 5:42 pm, gary ng  wrote:
> Hi,
>
> I just start to learn about clojure and is wondering if there is any erlang
> like environment for clojure ? By that, I mean not just the messaging
> passing(which as far as I can tell for clojure is within the same process)
> but its live update and sending symbols(and as far as I know functions as
> well) across process/vm instances(which can be on the same machine or
> another machine within a private network).

-- 
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 email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Jersey REST with Clojure is it possible?

2010-04-12 Thread patrickdlogan
Also I have had good success with Restlet using Java as well as Groovy
in production apps. I wrote a v.small example in Clojure some time
ago... should work fine. Annotations are optional in Restlet, so no
problem there.


On Apr 12, 10:57 am, Shantanu Kumar  wrote:
> > or suggest me a nice rest framework  for clojure
>
> > i really like jersey, i want to use it though?
>
> Jersey makes quite heavy use of annotations. Annotations are not
> supported in Clojure yet. You may like to take a look at Taimen for
> writing RESTful services:
>
> http://code.google.com/p/bitumenframework/
>
> You can find a comparison chart 
> here:http://code.google.com/p/implementing-rest/wiki/ByLanguage
>
> Regards,
> Shantanu

-- 
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 email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

To unsubscribe, reply using "remove me" as the subject.


Re: ANN: Clojure API for AllegroGraph

2009-11-25 Thread patrickdlogan
Thanks Mike. No big hurry on my part - I'll look at the tutorial code.


On Nov 24, 4:39 pm, Mike Hinchey  wrote:
> You're right, the tests have not been converted to 3.2, so they are not
> running at this time.  The best thing to look at is the tutorial.clj - most
> of these work properly, but example6 doesn't return correct results.  The
> ones that don't work is where the clj code is incomplete, so I still have
> some work to do.  I'll get these fixed or documented in the next few days.
>
> -Mike
>
> On Tue, Nov 24, 2009 at 3:31 PM, patrickdlogan wrote:
>
> > Hi Mike - thanks for this.
>
> > I am fairly new to git, but from what I can tell, I have the agraph32
> > branch as current. The clojure code on the agraph32 branch still seems
> > to be using the AG 4.0 API. For example...
>
> >http://github.com/franzinc/agraph-java-client/blob/agraph32/clojure/t...
>
> > Running this against the agraph32 branch java jar results in a class
> > not found exception...
>
> > java.lang.ClassNotFoundException:
> > com.franz.agraph.repository.AGCatalog (agtest.clj:0)

-- 
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 email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: ANN: Clojure API for AllegroGraph

2009-11-24 Thread patrickdlogan
Hi Mike - thanks for this.

I am fairly new to git, but from what I can tell, I have the agraph32
branch as current. The clojure code on the agraph32 branch still seems
to be using the AG 4.0 API. For example...

http://github.com/franzinc/agraph-java-client/blob/agraph32/clojure/test/com/franz/agraph/agtest.clj

Running this against the agraph32 branch java jar results in a class
not found exception...

java.lang.ClassNotFoundException:
com.franz.agraph.repository.AGCatalog (agtest.clj:0)





On Nov 14, 4:05 pm, Mike Hinchey  wrote:
> Franz Inc and I just put the AllegroGraph 3.2 Java API on github with my new
> Clojure API.  The clojure is a wrapper of the java client, which is an
> implementation of openrdf/sesame.  The wrapper is mostly to make it more
> idiomatic clojure so you don't have to deal with so many java classes,
> mutable objects, and resources that have to be closed.  It's a
> work-in-progress, of course, and any feedback is appreciated.
>
> The master branch is for the future release AG 4.0, so you'll want to use
> the agraph32 branch for the current 
> release.http://github.com/franzinc/agraph-java-client/tree/agraph32
>
> This is the code I'll be presenting tomorrow at the Semantic Web
> installfest.http://www.meetup.com/The-San-Francisco-Semantic-Web-Meetup/calendar/...
>
> My future plans for this are to have more advance ways of manipulating
> triples, especially having them linked up in trees rather than a flat lists
> referring to each other, which is what you get back from a query.
>
> By the way, I included the clojure-1.0.jar because I assume this will be
> used by companies that need a stable release, but last I checked, the code
> works fine with master, and I'm happy to officially support master if that's
> what anyone wants.
>
> -Mike

-- 
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 email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: JScheme

2009-11-18 Thread patrickdlogan
There are other lisps (including schemes) but the three I have some
experience with are JScheme, SISC, and Clojure. Based on that I would
answer it this way...

* Use SISC if you want a full implementation of Scheme on the JVM.
(It's been reliable in the past but I have not used it for a couple of
years - it may no longer be actively supported.) Speedier but more
compliant and more complex than JScheme.

* Use JScheme if you want a Lisp or Scheme-ish language, mostly for
writing Java-esque applications in Lisp. (Again it has been a while,
worked well for me in the past, and I don't know it's current support
level.)

* Use Clojure if you want a Lisp or other "mostly functional" and/or
"highly concurrent" language for the JVM, under active development,
etc. So far I have found its Java interop to be at least as expressive
as JScheme's. But I would say use JScheme if you just want a
"traditional" Lisp language that can "use Java" - the shift to
Clojure's mostly functional style is more dramatic than that of
JScheme's.



On Nov 17, 3:33 pm, Michael Jaaka 
wrote:
> Can anyone defend Clojure in comparision to JScheme?
> I want to see all pros why to learn Clojure instead of JScheme.
> I've found out that the java methods invocation and rest of syntax is
> very similar, which satisfies me since it is easier to work with lisp
> family languages.

-- 
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 email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: delays are forced by deref too early?

2009-09-21 Thread patrickdlogan

> (force del) ; note that @del would be equivalent here

This is at the core of my question. I did not understand that a delay
is something that can be deref'd until I read the source.

Knowing now that a delay does behave this way, I can work with it as
such. Given the doc string for delay, I wasn't sure whether this was
accidental behavior due to the implementation, or by design.

Thanks

--~--~-~--~~~---~--~~
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 email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~--~~~~--~~--~--~---



delays are forced by deref too early?

2009-09-21 Thread patrickdlogan

I expected a delay only to be forced by an explicit call to force.
instead it looks like, being a kind of IDeref, a delay will be forced
by the REPL.

e.g.

user=> (def del (delay (println "printed") (+ 2 3)))
#'user/del
user=> del
printed
#
user=> (force del)
5

The documentation seems to imply the only way to force a delay is
through the force procedure...

" Takes a body of expressions and yields a Delay object that will
  invoke the body only the first time it is forced (with force), and
  will cache the result and return it on all subsequent force
  calls."

--~--~-~--~~~---~--~~
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 email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~--~~~~--~~--~--~---



Re: Modeling Data Associations in Clojure?

2009-09-16 Thread patrickdlogan

re: "clojure.contrib.datalog"

Also note that some graph databases like AllegroGraph (not to over
promote that specific product, but it is free to use up to 50M triples
or somesuch)...

Anyway, such graph databases often provide a Prolog or Prolog-ish
inferencing capability (among other algorithms). And these backward-
chaining engines are not unlike datalog's. So there is somewhat of a
migration path I would suspect from the clojure in-memory datalog
library up to a full-featured graph database. YMMV

--~--~-~--~~~---~--~~
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 email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~--~~~~--~~--~--~---



Re: Modeling Data Associations in Clojure?

2009-09-16 Thread patrickdlogan

Insurance policies, etc. are complicated graphs even for a relational
database model. I am not convinced you have to use clojure's
functional data structures for these graphs. I've seen good ORM
frameworks run out of steam on insurance apps as well.

As part of the _processing_ of insurance functions, I would use the
functional structures for sure. But the full graphs (insurance
documents) themselves? Not so much.

After working with various insurance implementations, I currently
believe one of the best representations is a good graph database
(whether durable on disk or just in memory). Something like
AllegroGraph provides additional features like querying and inference
over v.large graphs.

It's real hard building insurance graph processing from scratch but
clojure can use the java API to AllegroGraph, and there are other good
open source graph/semantic systems as well.

--~--~-~--~~~---~--~~
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 email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~--~~~~--~~--~--~---