Francesco Petrogalli | 5 Nov 18:27 2009
Picon

looping on arrays

Hi everybody,

is there a way to loop over the element of an array, something like
what is possible to do with hash tables?

(loop for key being the hash-keys of hashtable using (hash-value
value) etc etc etc...

Thank you,

Francesco

--

-- 
Francesco Petrogalli
PhD student
Dipartimento di Matematica e Informatica
Universita' degli Studi di Perugia
via Vanvitelli 1, Perugia (Italy)
phone: +39 075 585 5039
fax:   +39 075 585 5024
email: francesco.petrogalli@...
       francesco.petrogalli@...

Linux Registered User: #414858

P Funking Band
http://www.perugiafunkingband.it
http://www.myspace.com/perugiafunkingband
Peter Seibel | 5 Nov 18:32 2009

Re: looping on arrays

(loop across ...)

-Peter

On Thu, Nov 5, 2009 at 9:27 AM, Francesco Petrogalli
<francesco.petrogalli@...> wrote:
> Hi everybody,
>
> is there a way to loop over the element of an array, something like
> what is possible to do with hash tables?
>
> (loop for key being the hash-keys of hashtable using (hash-value
> value) etc etc etc...
>
>
> Thank you,
>
> Francesco
>
> --
> Francesco Petrogalli
> PhD student
> Dipartimento di Matematica e Informatica
> Universita' degli Studi di Perugia
> via Vanvitelli 1, Perugia (Italy)
> phone: +39 075 585 5039
> fax:   +39 075 585 5024
> email: francesco.petrogalli@...
>       francesco.petrogalli@...
>
(Continue reading)

JP Massar | 5 Nov 18:39 2009
Picon

Re: looping on arrays

At 09:32 AM 11/5/2009, Peter Seibel wrote:
>(loop across ...)
>
>-Peter
>
>On Thu, Nov 5, 2009 at 9:27 AM, Francesco Petrogalli
><francesco.petrogalli@...> wrote:
> > Hi everybody,
> >
> > is there a way to loop over the element of an array, something like
> > what is possible to do with hash tables?
> >
> > (loop for key being the hash-keys of hashtable using (hash-value
> > value) etc etc etc...

If you're talking about an N-dimensional array, take a look at

ROW-MAJOR-AREF

(loop for j from 0 below (array-total-size array) as elem = 
(row-major-aref array j) do ...)

or similar 
JP Massar | 5 Nov 18:39 2009
Picon

Re: looping on arrays

At 09:32 AM 11/5/2009, Peter Seibel wrote:
>(loop across ...)
>
>-Peter
>
>On Thu, Nov 5, 2009 at 9:27 AM, Francesco Petrogalli
><francesco.petrogalli@...> wrote:
> > Hi everybody,
> >
> > is there a way to loop over the element of an array, something like
> > what is possible to do with hash tables?
> >
> > (loop for key being the hash-keys of hashtable using (hash-value
> > value) etc etc etc...

If you're talking about an N-dimensional array, take a look at

ROW-MAJOR-AREF

(loop for j from 0 below (array-total-size array) as elem = 
(row-major-aref array j) do ...)

or similar 
Francesco Petrogalli | 5 Nov 18:40 2009
Picon

Re: looping on arrays

> (loop across ...)

This works for simple vectors, like (loop for i across #(1 2 3))

 I need it for 2D arrays, this gives an error!

(loop for i across (make-array (list 2 3)))

franZ

--

-- 
Francesco Petrogalli
PhD student
Dipartimento di Matematica e Informatica
Universita' degli Studi di Perugia
via Vanvitelli 1, Perugia (Italy)
phone: +39 075 585 5039
fax:   +39 075 585 5024
email: francesco.petrogalli@...
       francesco.petrogalli@...

Linux Registered User: #414858

P Funking Band
http://www.perugiafunkingband.it
http://www.myspace.com/perugiafunkingband
Daniel Herring | 6 Nov 05:53 2009

ALU wiki

Hi all,

The ALU wiki has been hosted on lisp-based wiki for a few years now.  One 
year ago, the server's drive was lost; and the wiki contents had to be 
reconstructed by scraping the web.

The current result is a hard-to-use, buggy wiki with many broken pages. 
Drew Crampsie has been very helpful throughout the restoration and fight 
with spammers; but he just doesn't have time to do all the coding required 
to make ucliki (the current wiki software) a full-featured product. 
Significant effort would be required; I would estimate a few man-months to 
address the issues on my bug/wishlist.

Instead, I propose that we move the wiki contents to a MediaWiki.  This 
gives immediate access to an industrial-strength wiki for hosting content; 
and it has an easily-parsed archival format for the lisp wiki of the 
future to slurp back in.

Now is a good time to switch wiki formats.  Many (most?) pages on the ALU 
wiki already require manual editing to fix conversion issues in the 
restoration.  Others didn't even make the transfer.
http://web.archive.org/web/20080417121424/http://wiki.alu.org/Gardeners_Projects

To prototype what this might look like, I set up a temporary wiki at
http://aluwiki.tentpost.com

This has been seeded with part of the Road to Lisp Survey.  Feel free to 
create an account and make your own changes.  If people like the new site, 
we can arrange to transfer its contents to a different address/server, 
announce it to the world, and convert all contents off the old site.  If 
(Continue reading)

Gary King | 6 Nov 13:18 2009

Re: ALU wiki

> The ALU wiki has been hosted on lisp-based wiki for a few years  
> now.  One
> year ago, the server's drive was lost; and the wiki contents had to be
> reconstructed by scraping the web.

For a moment I thought you said scrapping the web and thought, "wow,  
that was a bigger problem than I thought." <smile>

> Instead, I propose that we move the wiki contents to a MediaWiki.

Noooooooooo. Depressing but almost certainly the right thing to do.  
The Lisp based wikis are sadly sucky. I guess the only question is  
which seems worse: "a lisp based sucky wiki or that Lisp needed to use  
a non-lisp to be non-sucky." Neither speaks highly of our favorite  
language.

> This
> gives immediate access to an industrial-strength wiki for hosting  
> content;
> and it has an easily-parsed archival format for the lisp wiki of the
> future to slurp back in.

Though I don't like it, I think moving the wiki is a good idea. Maybe  
someday someone will have time to make a better wiki but it doesn't  
seem like that will happen anytime soon.

thanks Daniel for championing  this idea,
--
Gary Warren King, metabang.com
Cell: (413) 559 8738
(Continue reading)

Russ Tyndall | 6 Nov 15:50 2009
Picon

Re: ALU wiki


Instead, I propose that we move the wiki contents to a MediaWiki.
Noooooooooo. Depressing but almost certainly the right thing to do. The Lisp based wikis are sadly sucky. I guess the only question is which seems worse: "a lisp based sucky wiki or that Lisp needed to use a non-lisp to be non-sucky." Neither speaks highly of our favorite language.
I think this is somewhat a false dichotomy.  MediaWiki really is about the best wiki software out there especially when combined with user familiarity and an entire environment of plugins, templates and other helpful additions.  I personally think that it speaks fairly well of the community they would rather provide a "standard", fully featured wiki that everyone knows over writing a half implemented "non-standard" wiki that is difficult to interact with (just so we could claim that it was written in lisp).  It seems fairly obvious at this point that no one in the lisp community wants to write wiki software (we all have better things to do), so I agree that going to MediaWiki is probably the best decision.
This gives immediate access to an industrial-strength wiki for hosting content; and it has an easily-parsed archival format for the lisp wiki of the future to slurp back in.
Though I don't like it, I think moving the wiki is a good idea. Maybe someday someone will have time to make a better wiki but it doesn't seem like that will happen anytime soon. thanks Daniel for championing this idea,
Agreed, thanks for taking initiative on this.

Russ Tyndall
Software Developer
Acceleration.net

_______________________________________________
Gardeners mailing list
Gardeners@...
http://www.lispniks.com/mailman/listinfo/gardeners
Gary King | 6 Nov 15:52 2009

Re: ALU wiki

> I think this is somewhat a false dichotomy.  MediaWiki really is  
> about the best wiki software out there especially when combined with  
> user familiarity and an entire environment of plugins, templates and  
> other helpful additions.  I personally think that it speaks fairly  
> well of the community they would rather provide a "standard", fully  
> featured wiki that everyone knows over writing a half implemented  
> "non-standard" wiki that is difficult to interact with (just so we  
> could claim that it was written in lisp).

That's a good point and I agree; In the best of all possible worlds,  
we'd offer a great wiki that was wonderful to interact with, etc.,  
etc. <smile> but that's not going to happen and using the MediaWiki  
would be way better than what we use now.

--
Gary Warren King, metabang.com
Cell: (413) 559 8738
Fax: (206) 338-4052
gwkkwg on Skype * garethsan on AIM * gwking on twitter
Ryan Davis | 6 Nov 16:09 2009
Picon

Re: [Spam] Re: ALU wiki


On 11/6/2009 9:52 AM, Gary King wrote:
> That's a good point and I agree; In the best of all possible worlds,  
> we'd offer a great wiki that was wonderful to interact with, etc.,  
> etc. <smile> but that's not going to happen and using the MediaWiki  
> would be way better than what we use now.
>   
I agree as well.  We've got some tools to interact with Mediawiki API
from lisp: http://www.cliki.net/CL-MediaWiki

Ryan Davis
Acceleration.net
Director of Programming Services
2831 NW 41st street, suite B
Gainesville, FL 32606

Office: 352-335-6500 x 124
Fax: 352-335-6506

Gmane