Go Back   Rhinocerus > Newsgroup > Newsgroup comp.lang.lisp

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 11-03-2008, 04:54 AM
Scott Burson
Guest
 
Posts: n/a
Default FSet 1.2 released!

I am pleased to announce the release of version 1.2 of FSet, my
functional set-theoretic collections library for Common Lisp.

http://common-lisp.net/project/fset/

There is a new tutorial, which should make it easier to get going with
FSet.

Please give it a try -- and please do let me know if you have any
trouble.

-- Scott
Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

  #2 (permalink)  
Old 11-04-2008, 12:48 AM
Matthew D Swank
Guest
 
Posts: n/a
Default Re: FSet 1.2 released!

On Sun, 02 Nov 2008 21:54:44 -0800, Scott Burson wrote:

> I am pleased to announce the release of version 1.2 of FSet, my
> functional set-theoretic collections library for Common Lisp.
>
> http://common-lisp.net/project/fset/
>
> There is a new tutorial, which should make it easier to get going with
> FSet.
>
> Please give it a try -- and please do let me know if you have any
> trouble.
>
> -- Scott


It seems to be missing :lexical-contexts, and the tinaa doc link, http://
common-lisp.net/project/fset/Site/Tinaa-Doc-1.2/index.html gives a 404
error.

Matt



--
When angry, count four; when very angry, swear.
-- Mark Twain, "Pudd'nhead Wilson's Calendar"
Reply With Quote
  #3 (permalink)  
Old 11-04-2008, 01:21 AM
Matthew D Swank
Guest
 
Posts: n/a
Default Re: FSet 1.2 released!

On Tue, 04 Nov 2008 01:48:27 +0000, Matthew D Swank wrote:

> On Sun, 02 Nov 2008 21:54:44 -0800, Scott Burson wrote:
>
>> I am pleased to announce the release of version 1.2 of FSet, my
>> functional set-theoretic collections library for Common Lisp.
>>
>> http://common-lisp.net/project/fset/
>>
>> There is a new tutorial, which should make it easier to get going with
>> FSet.
>>
>> Please give it a try -- and please do let me know if you have any
>> trouble.
>>
>> -- Scott

>
> It seems to be missing :lexical-contexts, and the tinaa doc link,
> http:// common-lisp.net/project/fset/Site/Tinaa-Doc-1.2/index.html gives
> a 404 error.
>
> Matt


In Code/port.lisp you use mp:with-process-lock in the
#+(and sbcl sb-thread) section of the portability code. This not in the
current threading API, though I'm not sure what the current equivalent is.

Matt.
Reply With Quote
  #4 (permalink)  
Old 11-04-2008, 01:40 AM
Scott Burson
Guest
 
Posts: n/a
Default Re: FSet 1.2 released!

On Nov 3, 5:48*pm, Matthew D Swank <akopa.gmane.pos...@gmail.com>
wrote:
> On Sun, 02 Nov 2008 21:54:44 -0800, Scott Burson wrote:
> > I am pleased to announce the release of version 1.2 of FSet, my
> > functional set-theoretic collections library for Common Lisp.

>
> >http://common-lisp.net/project/fset/

>
> > There is a new tutorial, which should make it easier to get going with
> > FSet.

>
> > Please give it a try -- and please do let me know if you have any
> > trouble.

>
> It seems to be missing :lexical-contexts, and the tinaa doc link, http://
> common-lisp.net/project/fset/Site/Tinaa-Doc-1.2/index.html gives a 404
> error.


Thanks for the note.

Okay, I've fixed the Tinaa doc link. Re lexical-contexts: how are you
downloading it -- are you using ASDF-Install? If not, sounds like you
need to update your copy of Misc-Extensions.

-- Scott
Reply With Quote
  #5 (permalink)  
Old 11-04-2008, 01:46 AM
Scott Burson
Guest
 
Posts: n/a
Default Re: FSet 1.2 released!

On Nov 3, 6:21*pm, Matthew D Swank <akopa.gmane.pos...@gmail.com>
wrote:
>
> In Code/port.lisp you use mp:with-process-lock in the
> #+(and sbcl sb-thread) section of the portability code. *This not in the
> current threading API, though I'm not sure what the current equivalent is..


Oops -- it should be `sb-thread:with-mutex'.

I haven't actually tested on SBCL with threads. I don't have a
threaded build handy; could I trouble you to make the above change,
recompile, and then do

(in-package :fset)
(run-test-suite 100)

?

-- Scott
Reply With Quote
  #6 (permalink)  
Old 11-04-2008, 02:23 AM
Matthew D Swank
Guest
 
Posts: n/a
Default Re: FSet 1.2 released!

On Mon, 03 Nov 2008 18:46:21 -0800, Scott Burson wrote:

> On Nov 3, 6:21Â*pm, Matthew D Swank <akopa.gmane.pos...@gmail.com> wrote:
>>
>> In Code/port.lisp you use mp:with-process-lock in the #+(and sbcl
>> sb-thread) section of the portability code. Â*This not in the current
>> threading API, though I'm not sure what the current equivalent is.

>
> Oops -- it should be `sb-thread:with-mutex'.
>
> I haven't actually tested on SBCL with threads. I don't have a threaded
> build handy; could I trouble you to make the above change, recompile,
> and then do
>
> (in-package :fset)
> (run-test-suite 100)
>
> ?
>
> -- Scott


FSET> (run-test-suite 100)
=> NIL

-----------------------------------------%<------------------------
Index: Code/port.lisp
================================================== =================
--- Code/port.lisp (revision 22)
+++ Code/port.lisp (working copy)
@@ -106,11 +106,11 @@
(deflex *Memory-Barrier-Lock*
(sb-thread:make-mutex :name "Memory Barrier Lock"))
(defmacro read-memory-barrier ()
- '(mp:with-process-lock (*Memory-Barrier-Lock*)
- nil))
+ '(sb-thread:with-mutex (*Memory-Barrier-Lock*)
+ nil))
(defmacro write-memory-barrier ()
- '(mp:with-process-lock (*Memory-Barrier-Lock*)
- nil)))
+ '(sb-thread:with-mutex (*Memory-Barrier-Lock*)
+ nil)))


#+scl
-----------------------------------------%<------------------------




--
The devil can cite Scripture for his purpose.
-- William Shakespeare, "The Merchant of Venice"
Reply With Quote
  #7 (permalink)  
Old 11-04-2008, 02:27 AM
Matthew D Swank
Guest
 
Posts: n/a
Default Re: FSet 1.2 released!

On Mon, 03 Nov 2008 18:40:22 -0800, Scott Burson wrote:

> On Nov 3, 5:48Â*pm, Matthew D Swank <akopa.gmane.pos...@gmail.com> wrote:
>> On Sun, 02 Nov 2008 21:54:44 -0800, Scott Burson wrote:
>> > I am pleased to announce the release of version 1.2 of FSet, my
>> > functional set-theoretic collections library for Common Lisp.

>>
>> >http://common-lisp.net/project/fset/

>>
>> > There is a new tutorial, which should make it easier to get going
>> > with FSet.

>>
>> > Please give it a try -- and please do let me know if you have any
>> > trouble.

>>
>> It seems to be missing :lexical-contexts

....

> Re lexical-contexts: how are you downloading it -- are you using
> ASDF-Install? If not, sounds like you need to update your copy of
> Misc-Extensions.
>
> -- Scott



Yes, updating misc-extensions fixes that.

Matt

--
Q: How can you tell when a Burroughs salesman is lying?
A: When his lips move.
Reply With Quote
  #8 (permalink)  
Old 11-04-2008, 04:27 AM
Scott Burson
Guest
 
Posts: n/a
Default Re: FSet 1.2 released!

On Nov 3, 7:23*pm, Matthew D Swank <akopa.gmane.pos...@gmail.com>
wrote:
>
> FSET> *(run-test-suite 100)
> => NIL


Great, thanks!! (Heh -- I suppose I should make it return T on
success. Had it failed it would have signalled an error -- don't know
if that's obvious.)

And thanks for the reports. I'll get the patch out right away.

-- Scott
Reply With Quote
  #9 (permalink)  
Old 11-06-2008, 03:35 PM
Scott Burson
Guest
 
Posts: n/a
Default Re: FSet 1.2 released!

So, are you actually trying out FSet, or just helping me check the
release (which I certainly appreciate)?

-- Scott
Reply With Quote
  #10 (permalink)  
Old 11-07-2008, 04:02 AM
Matthew D Swank
Guest
 
Posts: n/a
Default Re: FSet 1.2 released!

On Thu, 06 Nov 2008 08:35:19 -0800, Scott Burson wrote:

> So, are you actually trying out FSet, or just helping me check the
> release (which I certainly appreciate)?
>
> -- Scott


It's on my "to try" list as I favor functional lisp. However, it is a
highly idiosyncratic library, and the span of my attention is short

Matt

--
You will be married within a year, and divorced within two.
Reply With Quote
  #11 (permalink)  
Old 11-07-2008, 04:29 PM
J Kenneth King
Guest
 
Posts: n/a
Default Re: FSet 1.2 released!

Scott Burson <FSet.SLB@gmail.com> writes:

> So, are you actually trying out FSet, or just helping me check the
> release (which I certainly appreciate)?
>
> -- Scott


I will certainly poke around with it in the coming weeks. Maybe my first
presentation at the local lisp group will be on it.

Keep up the good work.
Reply With Quote
  #12 (permalink)  
Old 11-07-2008, 10:20 PM
Scott Burson
Guest
 
Posts: n/a
Default Re: FSet 1.2 released!

On Nov 7, 9:29*am, J Kenneth King <ja...@agentultra.com> wrote:
>
> I will certainly poke around with it in the coming weeks. Maybe my first
> presentation at the local lisp group will be on it.
>
> Keep up the good work.


Thanks!

-- Scott
Reply With Quote
  #13 (permalink)  
Old 11-14-2008, 05:21 AM
Feng
Guest
 
Posts: n/a
Default Re: FSet 1.2 released!

On Nov 3, 12:54*am, Scott Burson <FSet....@gmail.com> wrote:
> I am pleased to announce the release of version 1.2 of FSet, my
> functional set-theoretic collections library for Common Lisp.
>
> http://common-lisp.net/project/fset/
>
> There is a new tutorial, which should make it easier to get going with
> FSet.
>
> Please give it a try -- and please do let me know if you have any
> trouble.
>
> -- Scott


Hi Scott,

Thanks for sharing the nicely done library!

I've been using it for a while, mostly text book kind of programs to
get a feeling of functional style in CL. I can say FSet goes a long
way to make it a pleasant experience.

As much as I like functional style iterations that FSet provides, I
was curious how FSet and iterate macro play together. It seems FSet
iterator is all I needed to write iterate drivers. Here is the code.

(iter:defmacro-driver (FOR var IN-FSEQ s)
(let ((iter (gensym))
(kwd (if iter:generate 'iter:generate 'iter:for)))
`(progn
(iter:with ,iter = (iterator ,s))
(,kwd ,var next (if (funcall ,iter :done?)
(iter:terminate)
(funcall ,iter :get))))))

;;; a sample run

(iter (for i in-fseq (seq 1 4 7 2 5 8 3 6))
(maximize i))
=> 8

(iter:defmacro-driver (FOR pair IN-FMAP m)
(unless (consp pair)
(error "FOR var is not in the form of (key val)."))
(let ((iter (gensym))
(kwd (if iter:generate 'iter:generate 'iter:for)))
`(progn
(iter:with ,iter = (cond ((map? ,m) (iterator ,m))
((bag? ,m) (iterator ,m airs? t))
(t (error "The collection is neither map nor bag."))))
(,kwd ,pair do-next (if (funcall ,iter :done?)
(iter:terminate)
(multiple-value-setq ,pair (funcall ,iter :get)))))))

;;; a sample run

(iter (for (k v) in-fmap (map (:a 1) (:b 3) (:c 2)))
(finding k maximizing v))
=> :B

A few questions:

1) Although FSet iterators are stateful, iterate clause effectively
hides them from iterate body, and more important, any possibility of
aliasing iterators. This seems a safe (thus good) style to use
iterators. Do you agree?

2) It appears that FSet iterators are snapshot consistent w.r.t the
time they created from collection. Is this true if iterate body, or
even other threads update the collection concurrently? If not, how
hard to make it so.

3) I wish to enhance iterate clauses to iterate sub range of
collections, or backwards. such as,

(for i in-fseq a-seq from start-elt) ;iterate a-seq from member start-
elt to the end.

or

(for i in-fseq a-seq from start-elt downto end-elt) ;iterate a-seq
from start-elt to end-elt backwards.

I tried to do it using rant/at-rank/iterator, but haven't been
success. One possible solution is to make iterator find the position
of start-elt, as well as considering direction, something like
(iterator collection &key :start-from start-elt :decending t). Then,
iterate macro can use it and (compare? current-elt stop-elt) to
control where to start, where to stop. Do you consider this as a
possible enhancement?

Regards,

- Feng

Reply With Quote
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
A WorkLife FrameWork 2.0 for Mathematica released by Scientific Arts, LLC dbreiss@gmail.com Newsgroup comp.soft-sys.sas 0 07-19-2007 08:42 PM
Re: OT: UltraEdit-32 v11.10 Released! - New Look! Pardee, Roy Newsgroup comp.soft-sys.sas 3 08-02-2005 11:53 PM
Re: OT: UltraEdit-32 v11.10 Released! - New Look! Bob Abelson Newsgroup comp.soft-sys.sas 1 06-25-2005 07:46 AM
OT: UltraEdit-32 v11.10 Released! - New Look! Fehd, Ronald J Newsgroup comp.soft-sys.sas 1 06-24-2005 04:34 PM
Re: UltraEdit-32 v11.10 Released! - New Look! Alan Churchill Newsgroup comp.soft-sys.sas 0 06-24-2005 01:12 PM



All times are GMT. The time now is 09:11 AM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.