More Monads

2008-12-02 Thread jim
27;monad-expr' to be a single call to 'reduce'. There's a quick explanation of monads at the beginning of the file. Thanks to Konrad for posting some good code. File is at: http://groups.google.com/group/clojure/web/monad-redux.clj Jim --~--~-~--~~--

Monadic Parsing

2008-12-03 Thread jim
up: monad transformers Jim --~--~-~--~~~---~--~~ 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 PROTECT

Re: neo4j-clojure

2008-12-06 Thread jim
Hey, I was just looking at neo4j last night. Can you point me to any papers about the theory behind those kinds of a databases? Thanks, Jim On Dec 6, 3:15 pm, Julian Morrison <[EMAIL PROTECTED]> wrote: > A wrapper for neo4j, which is a non-relational database using a > network o

Re: The return of the monads: lessons learned about macros

2008-12-11 Thread jim
... 26 more Caused by: java.lang.ClassNotFoundException: user $m_PLUS_m_seq_PLUS_m__252 (I snipped out some of the call stack.) Looking forward to digging into this later. Jim --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: The return of the monads: lessons learned about macros

2008-12-13 Thread jim
x27;m-bind '~'m-result '~'m-zero '~'m-plus ~...@args)) I'll probably have some more comments after I dig into the code. Jim --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cloj

Re: The return of the monads: lessons learned about macros

2008-12-13 Thread jim
ar apart to generate the other lists. All in all, a fine piece of code that I'll be using whenever I want to use monads in Clojure. I've also modified my parser combinator monad and uploaded a new version at: http://groups.google.com/group/clojure/web/monad-parser%20%282%29.clj Jim -

Re: The return of the monads: lessons learned about macros

2008-12-14 Thread jim
]) (notice the change to the bind function). This let me write the parser monad as: (def parser-m (stateT maybe)) If that stateT function isn't actually a monad transformer, it still is a slick way of combining the two monads. Jim --~--~-~--~~~---~--~

Re: The return of the monads: lessons learned about macros

2008-12-14 Thread jim
Also, I came across set-state and fetch-state being implemented in terms of update-state. (defn set-state [s] (update-state (fn [x] s))) (defn fetch-state [] (update-state identity)) Jim --~--~-~--~~~---~--~~ You received this message because

Re: The return of the monads: lessons learned about macros

2008-12-19 Thread jim
#x27;ve got some more thinking to do about transformers, when I get a chance. Jim --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.co

Re: December monads

2008-12-20 Thread jim
. So there's less motivation to understand them. But I found that once I understood them, they are a powerful addition to my conceptual toolbox. Jim r wrote: > Hi, > > Although I am not a big fan of monads (I can't help the feeling this > abstraction is more difficult than

Re: December monads

2008-12-23 Thread jim
et to that point, though. Jim On Dec 22, 1:51 am, Konrad Hinsen wrote: > I also think that some aspects of monads are clearer in Clojure than   > they are in Haskell. Haskell's way to implement monads as data types   > has some practical advantages, but it also obscures the algorithmi

Re: Functional way to implement a VM?

2009-01-17 Thread jim
Just saw this thread. It's in my mind to do, but I don't know when I'll get to it. I've got a ton of code to write before I get to that item on my TODO list. However, if there'd be a place to put it on the Clojure page, I'd bump it to the top. Jim On Dec 23 2008,

Re: Example of functional relational programming in clojure

2009-02-03 Thread jim
SBCL but after I switched to Clojure, I've found the need for something like it greatly reduced because Rich has put such an emphasis on making concurrent programming easy. Jim Jack Norimi wrote: > I found this document > http://www.scribd.com/doc/3566845/FRP-Presentation-Web > and

Re: SVN branches

2009-02-03 Thread jim
om the socket's input stream and then used lazy-cons to call it when needed. Look forward to using these lazy sequences. Jim Rich Hickey wrote: > On Feb 2, 2:27 pm, Chouser wrote: > > On Mon, Feb 2, 2009 at 2:05 PM, MikeM > > wrote: > > > > > There is a &

Re: Parsec style library

2009-02-04 Thread jim
Take a look at: http://clojure.googlegroups.com/web/monad-parser.clj It's the code from "Monadic Parsing in Haskell" written in Clojure. It'd have to be modified slightly to work with the new clojure.contrib.monads. But that would be easy to do. jim On Feb 3, 8:42 pm, sbk

Syslog

2009-02-13 Thread jim
Has anyone done logging using syslog from clojure or java? 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 To unsubscribe from thi

Re: Syslog

2009-02-13 Thread jim
Thanks Luc Prefontaine wrote: > We use apache common logging and log4j to do all our logging from both > Clojure and java components. > You can use the SyslogAppender iof log4j to log to syslog. > > To get log4j configured we use Spring but you could use the > -Dlog4j.configuration= when starting

Re: Fully lazy sequences are coming - feedback wanted!

2009-02-15 Thread jim
ot of cycles later on. I also prefer it on aesthetic grounds. Breaking compatibility doesn't bother me much. Jim --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, s

state monad transformer

2009-02-16 Thread jim
(fn [& stms] (fn [s] (apply m-plus (map #(% s) stms)) ])) I've also about finished with the first draft of a monad tutorial for Clojure based on clojure.contrib.monads. Jim --~--~-~--~~~---~--~~ You received this message b

Re: Parenscript in clojure?

2009-02-18 Thread jim
I've got something that's pretty close. There are some other things in the queue before I can get it cleaned up and ready for public consumption, but I'm working towards that. Jim On Feb 18, 2:39 am, Jan Rychter wrote: > Is anyone working on a Parenscript > (http://co

Re: Clojure.contrib: name changes in monads

2009-02-18 Thread jim
(fn [s] (apply m-plus (map #(% s) stms)) ])) Jim On Feb 18, 2:24 am, Konrad Hinsen wrote: > The latest Clojure version broke many of my code by introducing the   > function sequence whose name collided with my

Re: Clojure.contrib: name changes in monads

2009-02-19 Thread jim
sn't accept a list of monadic values but instead lets you call it with any number of mv's. Instead of: (m-seq [mv1 mv2 mv3]) you would write (m-seq mv1 mv2 mv3) That would make it be the same as the implementations of m-plus you've already done. Thanks On Feb 19, 1:45 am, Konrad H

Re: Contributing

2009-02-20 Thread jim
There's a logic programming module in the files section. It implements the system found in "The Reasoned Schemer". On Feb 18, 2:59 pm, Jeffrey Straszheim wrote: > Did you cover logic programming?  Any bottom up logic query techniques? > (My motives are probably transparent.) > > On Wed, Feb 18,

Re: Parenscript in clojure?

2009-02-22 Thread jim
Seeing your comments, I've decided to try to get my Javascript generator suitable for public use. It'll take a day or two, I think. Have you got a catchy name for it? Jim Dan wrote: > > It depends on common lisp instead of clojure? :) > > How does ClojureScript inte

Re: Parenscript in clojure?

2009-02-22 Thread jim
Looking at qooxdoo was down a little further on my list, since Kenny Tilton mentioned it. I'd like to do some web app type stuff, which why I took a crack at the parenscript thing in the first place. On Feb 22, 2:18 pm, Dan wrote: >  That would be great! My main reason to want this is for this

Becoming lazy

2009-02-22 Thread jim
Is there a summary of the changes to Clojure that the lazy sequences required. For instance fnseq doesn't exist any more, that I see. Also, lazy-cons went away. Jim --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google G

with-meta and concat

2009-02-22 Thread jim
In some old code, I did something like: (with-meta (concat [1 3] [8 4]) {:tail true})) which now fails. I believe it's because the result of concat is now some kind of reference. Does anyone have any advice on a workaround?

Re: Clojure.contrib: name changes in monads

2009-02-22 Thread jim
minor thing to adapt m-seq, so if there are other cases where the current implementation is easier, it's no big deal. Just felt like little rough edge. Jim On Feb 22, 3:10 pm, Konrad Hinsen wrote: > > Do you have a concrete use case where this would be advantageous? In   > my certa

Re: Becoming lazy

2009-02-22 Thread jim
Thanks, I had skimmed that link and then forgot about it. Jim On Feb 22, 3:13 pm, samppi wrote: > A good summary is here:http://clojure.org/lazier > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clo

Re: with-meta and concat

2009-02-22 Thread jim
Thanks! That was exactly what I needed to get my old code to pass my unit tests. Now it's on to making changes to bring it up to date with the new lazy stuff. Jim On Feb 22, 3:32 pm, Chouser wrote: > > LazySeq extends AFn, so you can't change the metadata once the object &g

Logic Programming Contrib

2009-02-24 Thread jim
? Rich, I sent a CA last week. If you haven't gotten it or there's a problem, let me know. Jim --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to

Re: Logic Programming Contrib

2009-02-24 Thread jim
tion using lazy sequences and monads. The unification routines are about 50/50 since I had to implement some things differently because of differences between Scheme and Clojure. Before I submit it, I'll go back and see about re-implementing the unification concepts. Jim Rich Hickey wrote: >

Re: Logic Programming Contrib

2009-02-24 Thread jim
Good to know. Thanks. Michel S. wrote: > On Feb 24, 11:03 am, Rich Hickey wrote: > Kanren / Mini Kanren (Mini is the version in Reasoned Schemer) are MIT- > licensed: > > http://kanren.sourceforge.net/#Availability > > so even a port is alright. When I took Dan Friedman's class based on > the b

Mini-Kanren

2009-02-25 Thread jim
ren making any suggestions for improvements for style or performance. Jim --~--~-~--~~~---~--~~ 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 un

Javascript generator

2009-02-25 Thread jim
ion I just uploaded. The file also includes a bunch of unit tests of the various functions. At the bottom, there are some examples of javascript functions being generated. Bug reports very much appreciated. Jim --~--~-~--~~~---~--~~ You received this message becau

Re: Mini-Kanren

2009-02-26 Thread jim
I don't have a Scheme here to check it out, but doesn't (cons 1) yield '(1) or am I wrong? In either case how could it be stated more accurately/clearly? Thanks Jim On Feb 26, 7:52 am, "Michel S." wrote: > Hi Jim, > > "In Scheme, passing cons one

Re: Mini-Kanren

2009-02-26 Thread jim
Looking at the code, lcons does indeed require two parms. I must've been zoned out when I wrote the comment. Thanks for catching that. On Feb 26, 9:10 am, Pierpaolo Bernardi wrote: > no. in scheme (and in all modern lisps), cons is a 2 arguments procedure. > Giving it 1 is an error. > > Some v

Re: Monad tutorial, part 1

2009-03-05 Thread jim
Konrad, I just finished a tutorial last week. It'll be interesting to compare notes. I'm waiting for my shiny new web server to get here, so I can put it on line. Jim Konrad Hinsen wrote: > For those who are interested in monads but don't want to learn > Haskell fi

Re: Monad tutorial, part 1

2009-03-05 Thread jim
Interesting take on explaining monads. I hadn't articulated the link between 'let' and 'domonad' . Looking forward to part 2. On Mar 5, 12:21 pm, Konrad Hinsen wrote: > For those who are interested in monads but don't want to learn   > Haskell first to understand the Haskell-based monad tutori

keys of struct-maps

2009-03-11 Thread jim
Is there a more efficient way of getting the keys of a struct-map besides creating an instance and passing it to keys: >(def ts (create-struct :a :b)) >(keys (struct ts)) (:a :b) Thanks, Jim --~--~-~--~~~---~--~~ You received this message because y

Re: keys of struct-maps

2009-03-11 Thread jim
Thanks. I found a way to accomplish what I needed, but I'll tuck that patch in my back pocket for later. Jim On Mar 11, 5:07 pm, Timothy Pratley wrote: > They are not currently exposed, but a trivial patch will achieve what > you want:http://groups.google.com/group/clojure/web/s

Re: March 20th 2009 Rich Hickey Appreciation Day!

2009-03-23 Thread jim
Ditto. > March 20th 2009 Rich Hickey Appreciation Day > > -Rayne --~--~-~--~~~---~--~~ 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

Blow up

2009-03-28 Thread jim
ats get deferred until needed and that the nested calls blow up the stack. Also, this works user=> (def tl (reduce #(conj %1 %2) [] (range 4000))) #'user/tl user=> (last tl) 3999 Jim --~--~-~--~~~---~--~~ You received this message because you are subs

Re: Nested loops

2009-04-04 Thread jim
I didn't take time to read your post in detail because I'm on my way to bed and my brain has already checked out. However, as I've gotten better at Clojure and functional programming, I find I use loops less and less. I just got done putting the finishing touches on a package to analyse stock ch

Scan function

2009-04-08 Thread jim
issed? Thanks, Jim --~--~-~--~~~---~--~~ 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 clojure+unsubscr...@g

Re: Javascript generator

2009-04-14 Thread jim
so they're not dependent on order. Have you seen anything else that needs to be fixed? Thanks Jim --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to cl

Re: Javascript generator

2009-04-14 Thread jim
I got my static IP today. I'm setting up the web server now. I'll setup the Git server ASAP. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups

Monads tutorial

2009-04-15 Thread jim
m here. Comments as well. Thanks, Jim --~--~-~--~~~---~--~~ 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 gro

Comment from a friend

2009-04-15 Thread jim
> On another note, "closure" is misspelled. If intentional, it should be more > like "clothure" since it is Lisp. :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send ema

Re: Monads tutorial

2009-04-16 Thread jim
The sample code is available now. Took a little bit to get it set. It's the code from the tutorial with a little bonus. I implemented an HTTP protocol parser, using the parser-m monad, as an example. Jim On Apr 16, 12:37 am, Baishampayan Ghose wrote: > The code pagehttp://intensivesys

Help

2009-04-16 Thread jim
Someone sent me an email about some issues with javascript generator I posted a couple of weeks ago. I have searched all my email locations and can't find any record of those emails or the response I know I sent. It that was you, would you mind emailing me again? Thanks

Re: Help

2009-04-16 Thread jim
Nevermind. On Apr 16, 3:28 pm, jim wrote: > Someone sent me an email about some issues with javascript generator I > posted a couple of weeks ago. I have searched all my email locations > and can't find any record of those emails or the response I know I > sent.  It that was yo

Monad mod

2009-04-18 Thread jim
a flash of inspiration and implemented with-monad as below. This makes all those functions actual function objects. What do you think? Jim http://groups.google.com/group/clojure/web/with-monad.clj --~--~-~--~~~---~--~~ You received this message because you are subscri

Re: Monad mod

2009-04-20 Thread jim
I see the point about being able to add new functions. If you do something like this, you still have defmonadfn available. I also think that m-lift can be written so that you don't need to pass it an argument count, which is another burr under my saddle.

vimclojure help

2009-04-27 Thread jim
n I do a :map. I got the nailgun server running. But I can't get gvim to start a REPL in a buffer. Could you point me to some docs or give a quick howto on getting that going? Thanks, Jim --~--~-~--~~~---~--~~ You received this message because you are subscr

Re: vimclojure help

2009-04-27 Thread jim
Thanks for the response. Here's specifically what's happening: I have vim 7.2, according to the :version command in gvim I start the nailgun server with: java -cp /home/jim/clojure/clojure.jar:/home/jim/clojure/ clojure.contrib/clojure-contrib.jar:/home/jim/clojure/vimc

Re: vimclojure help

2009-04-27 Thread jim
I forgot to say that I have: let clj_want_gorilla = 1 in my .vimrc On Apr 27, 12:08 pm, Meikel Brandmeyer wrote: > Hi Jim, > > Am 27.04.2009 um 18:08 schrieb jim: > > > I'm having a heck of a time getting started with VimClojure and it's > > probably all due

Re: vimclojure help

2009-04-27 Thread jim
I forgot to say that I have: let clj_want_gorilla = 1 let vimclojure#NailgunClient = "/home/jim/clojure/ng" in my .vimrc file. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. T

Re: vimclojure help

2009-04-27 Thread jim
7;m guessing the plugin isn't fully loaded or something. Is there a way to check that? Perhaps a way to attempt to start the REPL from the command prompt? Jim Meikel Brandmeyer wrote: > Hi, > > Am 27.04.2009 um 19:56 schrieb jim: > > > I forgot to say that I have: > &g

Re: vimclojure help

2009-04-27 Thread jim
m the .vimrc and the mappings go away. Reading the vimclojure plugin, I see that it checks for the existence of b:vimclojure_namespace before adding those mappings. When I do a :echo b:vimclojure_namespace, I get an undefined variable error. Jim On Apr 27, 3:09 pm, Meikel Brandmeyer wrote: > Hi

Re: Would it be worth rewriting a parser library to use monads?

2009-04-27 Thread jim
s going to be a steep learning curve at first. Jim On Apr 27, 5:48 pm, samppi wrote: > I have a library called FnParse, and I'm wondering if I should rewrite > it using monads. (You can see FnParse's documentation at wiki.github.com/joshua-choi/fnparse> and its implementation

Re: vimclojure help

2009-04-27 Thread jim
ntMap (wrong name: clojure/proxy/clojure/lang/APersistentMap) CLASSPATH for the server is: /home/jim/vimclojure-2.1.0/build/vimclojure.jar:src CLOJURE_EXT for the server is: /home/jim/clojure /home/jim/clojure contains clojure.jar and clojure-contrib.jar. On Apr 27, 4:29 pm, Meikel Brandmeyer wr

Re: cannot use swig native shared libraries

2009-04-27 Thread jim
to import my UID class. But when I tried to call the UID.setuid method, it gave me that UnsatisfiedLinkError. Did you find a solution to your problem? Jim On Apr 22, 8:41 am, "Antonio, Fabio Di Narzo" wrote: > Hi all. > I'm having problems with using swig-generated wrapp

Re: vimclojure help

2009-04-28 Thread jim
s still failing when I started a REPL from command mode. It was giving an error that it couldn't find /home/jim/vimclojure-2.0.1/ng. Instead of figuring out why, I just created the directory and put ng into it. After that, things worked. Jim On Apr 28, 10:52 am, Meikel Brandmeyer wrote: >

more vimclojure

2009-04-28 Thread jim
ns loaded previously are gone and you have a brand new environment to work in? Thanks, Jim --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@google

Re: more vimclojure

2009-04-28 Thread jim
got Java Service Wrapper, http://wrapper.tanukisoftware.org/doc/english/download.jsp, working with a network app of mine. Supposedly, it starts a JVM and restarts it if it crashes. If something like that was used, just killing the server would cause it to be restarted. Jim On Apr 28, 3:06 pm, Meikel

Re: more vimclojure

2009-04-29 Thread jim
Meikel, I'm liking what I've seen so far of vimclojure. One request is to have the preview window stay up all the time and keep adding to it with the \ef, \et, \eb, etc. commands. Having it come and go is distracting to me. My $0.02 Thanks, Jim On Apr 29, 12:07 pm, Meikel Brandme

Monads tutorial Part 2

2009-04-29 Thread jim
I've just posted the second part of my monads tutorial at: http://intensivesystems.net/tutorials/monads_201.html I need to proof it further, so if you see problems with content, grammar or spelling. Comment here or send me an email. Jim --~--~-~--~~~---~--~

Re: Help w/ monadic parser

2009-05-08 Thread jim
I'm trying to pack to leave town for a week. I'll try to post something, but Sunday will be the earliest since I'll be spending most of tomorrow in a small metal tube at 20,000 feet in the air. Jim Howard Lewis Ship wrote: > I've been struggling to create a monadic p

Re: Monad problems: finding an m-zero

2009-11-21 Thread jim
(first (drop-while nil? (map #(% strn) parsers)]) I explain it in: http://intensivesystems.net/tutorials/monads_101.html What kind of parsing are you doing? Jim -- You received this message because you are subscribed to the Goog

Re: Monad problems: finding an m-zero

2009-11-21 Thread jim
Glad you found that tutorial useful. I had to run this morning, so I couldn't really reply. I'll try to read your post more closely tomorrow and see if I can offer any useful insight. Jim -- You received this message because you are subscribed to the Google Groups "Clojure&quo

Re: Monad problems: finding an m-zero

2009-11-22 Thread jim
t it just needs one more tweak to get it right. That's what happened to me and I wasted a lot of effort before I finally tossed it out and really focused on understanding. If you'd like to post details of what you're doing, I'd guess some folks would lend some assistance. Jim

Re: Monad problems: finding an m-zero

2009-11-22 Thread jim
I wrote one specifically for monads in Clojure. http://intensivesystems.net/tutorials/monads_101.html There's also a second part. Also, Konrad Hinson wrote one: http://onclojure.com/2009/03/06/a-monad-tutorial-for-clojure-programmers-part-1 it's in 4 parts, I believe. John Harrop wrote: > On

Re: Monad problems: finding an m-zero

2009-11-23 Thread jim
Konrad, Glad to see you're still around doing monads in Clojure. :) Jim -- 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 - pl

Sneak Peek

2009-11-24 Thread jim
f you're having trouble sleeping. :) http://intensivesystems.net/tutorials/web_sessions.html One thing I love about FP in general and Clojure specifically is the density of code that is possible. This library is only about 80 lines of code. Jim -- You received this message because you are subs

Re: Sneak Peek

2009-11-25 Thread jim
t's hugely powerful. Using it, that library only took about 50 lines of code to write. Having to account for browser history took another 30. However, those 50 lines of code will turn your brain to mush if you don't have a handle on the continuation monad. :) Jim Graham Fawcett wrote: >

Re: Sneak Peek

2009-11-27 Thread jim
n be considered the mother of all monads: http://blog.sigfpe.com/2008/12/mother-of-all-monads.html But it will turn your brain to mush if you're not careful. Jim Martin Coxall wrote: > On Nov 25, 2:59 pm, Konrad Hinsen wrote: > > On 25.11.2009, at 15:32, jim wrote: > > >

ANN: Web application framework (beta)

2009-11-29 Thread jim
log up the code. Jim -- 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 f

Re: ANN: Web application framework (beta)

2009-11-29 Thread jim
have sparked a few thoughts. I've got to get the continuation monad tutorial written and then I may think about them. Jim Jim Powers wrote: > On Sun, Nov 29, 2009 at 7:21 PM, jim wrote: > > > I finally got time to find the bug in my web application framework. > > Here

Re: Web application framework (beta)

2009-11-30 Thread jim
Jim, I think I can see how to write a library that would scale across any number of servers and I don't think it would be too difficult. I've got other itches to scratch before I'd get to it, but if people started asking for it (or someone wanted to sponsor the work) I might

Continuation monad tutorial

2009-11-30 Thread jim
Just finished the tutorial explaining the continuation monad in clojure. Haven't even proofed it but I want to head to the gym. :) http://intensivesystems.net/tutorials/cont_m.html -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group

Re: Continuation monad tutorial

2009-12-01 Thread jim
Thanks. I'll add that comment. Konrad Hinsen wrote: > On 30 Nov 2009, at 23:07, jim wrote: > > > Just finished the tutorial explaining the continuation monad in > > clojure. Haven't even proofed it but I want to head to the gym. :) > > > > http://in

New tutorial: web framework internals

2009-12-05 Thread jim
Or how to use the continuation monad. I just posted the latest tutorial here: http://intensivesystems.net/tutorials/cont_m_web.html It covers the internals of the continuation-based web framework I wrote about here: http://intensivesystems.net/tutorials/web_sessions.html It's also a really goo

Why use monads

2009-12-21 Thread jim
Just posted a short piece on why monads are useful. This was prompted by some conversations last week with some folks. Comments, questions and criticisms welcome. http://intensivesystems.net/tutorials/why_monads.html Jim -- You received this message because you are subscribed to the Google

Re: Why use monads

2009-12-22 Thread jim
ing the monad functions. Don't have time to enumerate them now but might later. Jim On Dec 22, 3:14 pm, Chouser wrote: > > It's interesting to me that the definition of maybe-comp above is > arguably simpler that the definition of maybe-m, even without > counting the machiner

Stream processing

2009-12-23 Thread jim
s.net/tutorials/stream_proc.html This is only a quick overview with a few hints of what it could be used for, so don't expect too much from it. Merry Christmas, Jim -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send ema

Re: Why use monads

2009-12-23 Thread jim
I'll see what I can do. On Dec 23, 2:18 pm, Sean Devlin wrote: > +1 ataggart, Chouser > -- 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 - pl

Re: Why use monads

2009-12-23 Thread jim
I've expanded the tutorial a little. You can skip to "Another example" for the new stuff. I go through the same exercise using the probability monad. http://intensivesystems.net/tutorials/why_monads.html There are some corresponding additions to the sample code as well. Jim On

Probability Monad

2009-12-23 Thread jim
g monads to Clojure. Jim -- 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 f

Re: Probability Monad

2009-12-28 Thread jim
I figured you'd had a good reason for doing it the way you did. Konrad Hinsen wrote: > On 24.12.2009, at 05:18, jim wrote: > > > I was looking at the probability monad today and think this definition > > of m-bind might be easier to understand. > > > > (defmonad

Re: Why use monads

2009-12-28 Thread jim
d transformers seem to be the way forward, but that's open to debate as you've pointed out. Vagif Verdi wrote: > On Dec 22, 2:10 pm, jim wrote: > > Chouser, > > > > You're right that maybe-comp is simpler. Once you realize that the > > functions you want to

Language similarities

2009-12-28 Thread jim
pretty much the same. He looked at me like I was insane. :) :) I guess when you're looking back on the world from the vantage point of s-expressions, they do look the same. IMHO. :) Erlang and Haskell would have a similar effect, I would suspect. Jim -- You received this message because you a

Re: Understanding the continuation monad's bind operator

2010-01-04 Thread jim
s.net/tutorials/cont_m.html Jim Steven E. Harris wrote: > In clojure.contrib.monads, there's a monad defined called "cont-m" to > model continuations. Its bind operator -- `m-bind` -- is defined as > follows: > > , > | (fn m-bind-cont [mv f] > | (fn [c] > |

Re: Lift and bind (was: Understanding the continuation monad's bind operator)

2010-01-11 Thread jim
You know, I think you're right. I would refer you to part 2 of Konrad's monad tutorial, but the link is broken. Check google's cache, if you want to read an explanation immediately. I'll have to go change that. Thanks for pointing it out and sorry for any confusion. Jim St

Re: Question about how to write efficient code in functional style

2010-02-28 Thread jim
Here's a similar idea (also untested) (defn which-list [number] (let [by-5 (zero? (mod number 5))] (cond (and (odd? number) by-5) [:odd-5] by-5 [:even-5] (

Logic programming in Clojure

2010-03-23 Thread jim
logic_prog.html Jim -- 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

Re: The % Schemer Series - are they worth the money?

2010-03-23 Thread jim
Love 'em. Well worth the time and effort to go through them. They're often available used for good prices on Amazon. On Mar 23, 10:37 am, Sean Devlin wrote: > Hey folks, > I'm looking to add to my bookshelf.  I was wondering what this groups > experience with the Schemer series of books is? > > S

Re: Logic programming in Clojure

2010-03-23 Thread jim
and other projects using it. Like a business rules engine written in Clojure. Too many cool things to work on, not enough time. :) Jim On Mar 23, 12:26 pm, Quzanti wrote: > Very interesting write up. > > What advantages would prolog have over such a language. Or if we are > trying to mov

Re: Logic programming in Clojure

2010-03-26 Thread jim
No. That's one of the improvements I would make if I get back to working on it again. Jim On Mar 26, 1:37 pm, Sophie wrote: > > Is it aware of all Clojure structures, including maps etc? -- You received this message because you are subscribed to the Google Groups "Clojure&qu

Re: clojure unifier (also other symbolic reasoning support including rdf/owl/etc. ?)

2010-04-19 Thread jim
Kevin, Check out file:///home/jim/logic-prog.html Jim On Apr 18, 10:19 pm, Kevin Livingston wrote: > does anyone have a clojure implementation of a unifier, eg. something > that does this: > > http://norvig.com/paip/unify.lisp > > if not I'll do it, but just thought I&#x

  1   2   3   4   5   6   7   8   9   10   >