Re: [Factor-talk] Factor-talk Digest, Vol 109, Issue 1

2015-07-06 Thread Hugh Aguilar
Yes --- that is a good example.
I am actually well aware that Factor quotations do have access to the parent 
function's local variables --- I remember this from my brief foray into Factor 
about 5 or 6 years ago --- I just wanted to confirm it because, as I said, the 
Forth-200x committee is faking up :NONAME as a quotation and saying that Factor 
also has similar fake quotations (no access to the parent function's local 
variables).
To a large extent, my FMITE was designed for the purpose of proving that at 
least one Forth programmer in the world knows what quotations are --- I would 
like to see it implemented in an FPGA, but even if it doesn't come to fruition, 
I will have still made my point that true quotations are possible.
regards --- Hugh

 On Sunday, July 5, 2015 8:32 PM, John Benediktsson mrj...@gmail.com 
wrote:
   
 

 I'm not sure what you mean, but I assume something like this:
    :: foo ( seq -- seq' )
        1 : temp
        seq [ temp + ] map ;
    IN: scratchpad { 1 3 5 } foo .    { 2 4 6 }
Yes, that works.
If thats not what you meant, can you clarify?
On Fri, Jul 3, 2015 at 3:58 PM, Hugh Aguilar hughaguila...@yahoo.com wrote:

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


 
  --
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
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


Re: [Factor-talk] Factor-talk Digest, Vol 109, Issue 1

2015-07-05 Thread John Benediktsson
I'm not sure what you mean, but I assume something like this:

:: foo ( seq -- seq' )
1 : temp
seq [ temp + ] map ;

IN: scratchpad { 1 3 5 } foo .
{ 2 4 6 }

Yes, that works.

If thats not what you meant, can you clarify?

On Fri, Jul 3, 2015 at 3:58 PM, Hugh Aguilar hughaguila...@yahoo.com
wrote:

 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

--
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
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


Re: [Factor-talk] Factor-talk Digest, Vol 109, Issue 1

2015-07-03 Thread Hugh Aguilar
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, 
factor-talk-requ...@lists.sourceforge.net 
factor-talk-requ...@lists.sourceforge.net wrote:
   
 

 Send Factor-talk mailing list submissions to
    factor-talk@lists.sourceforge.net

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
    factor-talk-requ...@lists.sourceforge.net

You can reach the person managing the list at
    factor-talk-ow...@lists.sourceforge.net

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 iaing...@ednet.co.uk
Subject: Re: [Factor-talk] displaying Lisp like nested lists
To: factor-talk@lists.sourceforge.net
Message-ID: 272b8268-5938-4c23-bdbc-0408c5d97...@ednet.co.uk
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 jon.harpe...@gmail.com wrote:
 
 Looking at listarray,
 : listarray ( list -- array ) [ ] lmaparray ;
 
 You can adapt it to recurse on lists:
 IN: scratchpad : deeplistarray ( list -- array ) [ dup list? [ 
 deeplistarray ] when ] lmaparray ;
 
 IN: scratchpad 1 nil cons 2 nil cons nil cons nil cons cons deeplistarray .
 { { 1 } { { 2 } } }
 
 Hope that helps,
 Jon
 
 Jon
 
 On Mon, Jun 29, 2015 at 5:03 PM, Iain Gray iaing...@ednet.co.uk 
 mailto:iaing...@ednet.co.uk wrote:
 that gave me
 
 { ~cons-state~ ~cons-state~ }
 
 On 29 Jun 2015, at 15:22, John Benediktsson mrj...@gmail.com 
 mailto:mrj...@gmail.com wrote:
 
 I think you need one more cons at the end, but listarray should work fine 
 recursively.
 
 
 
 On Mon, Jun 29, 2015 at 5:37 AM, Iain Gray iaing...@ednet.co.uk 
 mailto:iaing...@ednet.co.uk wrote:
 I make a list with
 
 1 nil cons 2 nil cons nil cons nil cons
 
 but listarray 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
 Factor-talk@lists.sourceforge.net mailto:Factor-talk@lists.sourceforge.net
 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
 Factor-talk@lists.sourceforge.net mailto:Factor-talk@lists.sourceforge.net
 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
 Factor-talk@lists.sourceforge.net