Is it true that in Factor the quotation has access to the parent function's
local variables?
Over on comp.lang.forth Bernd Payson has said that in Factor quotations do not
have access to the parent function's local variables --- he uses this argument
to justify that his "quotations" (just :NONAME with some syntactic sugar) don't
need to have access to the parent function's locals.
Anyway, in LOTD my quotations have access to the parent function's local
variables.
regards --- Hugh
On Friday, July 3, 2015 10:53 AM,
"[email protected]"
<[email protected]> wrote:
Send Factor-talk mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/factor-talk
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Factor-talk digest..."
Today's Topics:
1. Re: displaying Lisp like nested lists (Iain Gray)
2. Re: displaying Lisp like nested lists (Bj?rn Lindqvist)
3. Re: displaying Lisp like nested lists (Iain Gray)
4. nested nil lists (Iain Gray)
5. Re: nested nil lists (Iain Gray)
6. Re: nested nil lists (Jon Harper)
----------------------------------------------------------------------
Message: 1
Date: Mon, 29 Jun 2015 16:49:03 +0100
From: Iain Gray <[email protected]>
Subject: Re: [Factor-talk] displaying Lisp like nested lists
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="us-ascii"
that worked thanks
now just to sort my prefix Scheme code into postfix Factor
> On 29 Jun 2015, at 16:33, Jon Harper <[email protected]> wrote:
>
> Looking at list>array,
> : list>array ( list -- array ) [ ] lmap>array ;
>
> You can adapt it to recurse on lists:
> IN: scratchpad : deeplist>array ( list -- array ) [ dup list? [
> deeplist>array ] when ] lmap>array ;
>
> IN: scratchpad 1 nil cons 2 nil cons nil cons nil cons cons deeplist>array .
> { { 1 } { { 2 } } }
>
> Hope that helps,
> Jon
>
> Jon
>
> On Mon, Jun 29, 2015 at 5:03 PM, Iain Gray <[email protected]
> <mailto:[email protected]>> wrote:
> that gave me
>
> { ~cons-state~ ~cons-state~ }
>
>> On 29 Jun 2015, at 15:22, John Benediktsson <[email protected]
>> <mailto:[email protected]>> wrote:
>>
>> I think you need one more "cons" at the end, but list>array should work fine
>> recursively.
>>
>>
>>
>> On Mon, Jun 29, 2015 at 5:37 AM, Iain Gray <[email protected]
>> <mailto:[email protected]>> wrote:
>> I make a list with
>>
>> 1 nil cons 2 nil cons nil cons nil cons
>>
>> but list>array displays only top level, can it descend recursively?
>>
>> ------------------------------------------------------------------------------
>> Monitor 25 network devices or servers for free with OpManager!
>> OpManager is web-based network management software that monitors
>> network devices and physical & virtual servers, alerts via email & sms
>> for fault. Monitor 25 devices for free with no restriction. Download now
>> http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
>> <http://ad.doubleclick.net/ddm/clk/292181274;119417398;o>
>> _______________________________________________
>> Factor-talk mailing list
>> [email protected] <mailto:[email protected]>
>> https://lists.sourceforge.net/lists/listinfo/factor-talk
>> <https://lists.sourceforge.net/lists/listinfo/factor-talk>
>>
>> ------------------------------------------------------------------------------
>> Monitor 25 network devices or servers for free with OpManager!
>> OpManager is web-based network management software that monitors
>> network devices and physical & virtual servers, alerts via email & sms
>> for fault. Monitor 25 devices for free with no restriction. Download now
>> http://ad.doubleclick.net/ddm/clk/292181274;119417398;o_______________________________________________
>>
>> <http://ad.doubleclick.net/ddm/clk/292181274;119417398;o_______________________________________________>
>> Factor-talk mailing list
>> [email protected] <mailto:[email protected]>
>> https://lists.sourceforge.net/lists/listinfo/factor-talk
>> <https://lists.sourceforge.net/lists/listinfo/factor-talk>
>
>
> ------------------------------------------------------------------------------
> Monitor 25 network devices or servers for free with OpManager!
> OpManager is web-based network management software that monitors
> network devices and physical & virtual servers, alerts via email & sms
> for fault. Monitor 25 devices for free with no restriction. Download now
> http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
> <http://ad.doubleclick.net/ddm/clk/292181274;119417398;o>
> _______________________________________________
> Factor-talk mailing list
> [email protected] <mailto:[email protected]>
> https://lists.sourceforge.net/lists/listinfo/factor-talk
> <https://lists.sourceforge.net/lists/listinfo/factor-talk>
>
>
> ------------------------------------------------------------------------------
> Monitor 25 network devices or servers for free with OpManager!
> OpManager is web-based network management software that monitors
> network devices and physical & virtual servers, alerts via email & sms
> for fault. Monitor 25 devices for free with no restriction. Download now
> http://ad.doubleclick.net/ddm/clk/292181274;119417398;o_______________________________________________
> Factor-talk mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/factor-talk
-------------- next part --------------
An HTML attachment was scrubbed...
------------------------------
Message: 2
Date: Mon, 29 Jun 2015 17:55:53 +0200
From: Bj?rn Lindqvist <[email protected]>
Subject: Re: [Factor-talk] displaying Lisp like nested lists
To: [email protected]
Message-ID:
<calg+76d6a3h8zfv-epwcnobo1zh5tscnebm800zpw8cnqzq...@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8
In addition to the other suggestions, maybe you really want swons?
IN: scratchpad nil 77 swons 10 swons 20 swons list>array .
{ 20 10 77 }
2015-06-29 14:37 GMT+02:00 Iain Gray <[email protected]>:
> I make a list with
>
> 1 nil cons 2 nil cons nil cons nil cons
>
> but list>array displays only top level, can it descend recursively?
>
> ------------------------------------------------------------------------------
> Monitor 25 network devices or servers for free with OpManager!
> OpManager is web-based network management software that monitors
> network devices and physical & virtual servers, alerts via email & sms
> for fault. Monitor 25 devices for free with no restriction. Download now
> http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
> _______________________________________________
> Factor-talk mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/factor-talk
--
mvh/best regards Bj?rn Lindqvist
------------------------------
Message: 3
Date: Mon, 29 Jun 2015 17:15:51 +0100
From: Iain Gray <[email protected]>
Subject: Re: [Factor-talk] displaying Lisp like nested lists
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8
unfortunately not for nested lists
IN: scratchpad nil nil 7 swons nil 8 swons swons list>array
--- Data stack:
+nil+
{ ~cons-state~ 7 }
> On 29 Jun 2015, at 16:55, Bj?rn Lindqvist <[email protected]> wrote:
>
> In addition to the other suggestions, maybe you really want swons?
>
> IN: scratchpad nil 77 swons 10 swons 20 swons list>array .
> { 20 10 77 }
>
> 2015-06-29 14:37 GMT+02:00 Iain Gray <[email protected]>:
>> I make a list with
>>
>> 1 nil cons 2 nil cons nil cons nil cons
>>
>> but list>array displays only top level, can it descend recursively?
>>
>> ------------------------------------------------------------------------------
>> Monitor 25 network devices or servers for free with OpManager!
>> OpManager is web-based network management software that monitors
>> network devices and physical & virtual servers, alerts via email & sms
>> for fault. Monitor 25 devices for free with no restriction. Download now
>> http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
>> _______________________________________________
>> Factor-talk mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
>
>
> --
> mvh/best regards Bj?rn Lindqvist
>
> ------------------------------------------------------------------------------
> Monitor 25 network devices or servers for free with OpManager!
> OpManager is web-based network management software that monitors
> network devices and physical & virtual servers, alerts via email & sms
> for fault. Monitor 25 devices for free with no restriction. Download now
> http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
> _______________________________________________
> Factor-talk mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/factor-talk
------------------------------
Message: 4
Date: Fri, 3 Jul 2015 10:14:45 +0100
From: Iain Gray <[email protected]>
Subject: [Factor-talk] nested nil lists
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8
in Scheme I can evaluate (list ?()) to get ?(())
as a nested null list
Factor supplies nil (+nil+) but I can?t seem to get the above using cons, 1list
etc.
is this not the natural way to do this in Factor?
------------------------------
Message: 5
Date: Fri, 3 Jul 2015 10:40:33 +0100
From: Iain Gray <[email protected]>
Subject: Re: [Factor-talk] nested nil lists
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8
is nil nil cons ok?
> On 3 Jul 2015, at 10:14, Iain Gray <[email protected]> wrote:
>
> in Scheme I can evaluate (list ?()) to get ?(())
> as a nested null list
>
> Factor supplies nil (+nil+) but I can?t seem to get the above using cons,
> 1list etc.
> is this not the natural way to do this in Factor?
> ------------------------------------------------------------------------------
> Don't Limit Your Business. Reach for the Cloud.
> GigeNET's Cloud Solutions provide you with the tools and support that
> you need to offload your IT needs and focus on growing your business.
> Configured For All Businesses. Start Your Cloud Today.
> https://www.gigenetcloud.com/
> _______________________________________________
> Factor-talk mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/factor-talk
------------------------------
Message: 6
Date: Fri, 3 Jul 2015 19:52:27 +0200
From: Jon Harper <[email protected]>
Subject: Re: [Factor-talk] nested nil lists
To: "[email protected]"
<[email protected]>
Message-ID:
<CAK8-Ou87p=ceenn9ezy0d2myabfnw9rj5sl2n+h5whm2smm...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
yes. Which is the same as ```nil 1list```.
Jon
On Fri, Jul 3, 2015 at 11:40 AM, Iain Gray <[email protected]> wrote:
> is nil nil cons ok?
>
> > On 3 Jul 2015, at 10:14, Iain Gray <[email protected]> wrote:
> >
> > in Scheme I can evaluate (list ?()) to get ?(())
> > as a nested null list
> >
> > Factor supplies nil (+nil+) but I can?t seem to get the above using
> cons, 1list etc.
> > is this not the natural way to do this in Factor?
> >
> ------------------------------------------------------------------------------
> > Don't Limit Your Business. Reach for the Cloud.
> > GigeNET's Cloud Solutions provide you with the tools and support that
> > you need to offload your IT needs and focus on growing your business.
> > Configured For All Businesses. Start Your Cloud Today.
> > https://www.gigenetcloud.com/
> > _______________________________________________
> > Factor-talk mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/factor-talk
>
>
>
> ------------------------------------------------------------------------------
> Don't Limit Your Business. Reach for the Cloud.
> GigeNET's Cloud Solutions provide you with the tools and support that
> you need to offload your IT needs and focus on growing your business.
> Configured For All Businesses. Start Your Cloud Today.
> https://www.gigenetcloud.com/
> _______________________________________________
> Factor-talk mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
------------------------------
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
------------------------------
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk
End of Factor-talk Digest, Vol 109, Issue 1
*******************************************
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk