[Factor-talk] stack effect

2015-07-29 Thread Iain Gray
why do I get the following error? Stack effect declaration is wrong inferred ( x x x -- x x ) declared ( amount coins -- ways ) from this lexical variable :: cc ( amount coins -- ways ) 0 amount = [ 1 ] [ 0 amount 0 coins = or [ 0 ] [ amount coins 1 - cc amount coins

Re: [Factor-talk] stack effect

2015-07-29 Thread Iain Gray
+1 +1+10 -1 -1 +1+1 -1 [ amount coins 1 - cc amount coins denominations at* drop - coins cc + ] 1 + 1 + 1 - 1 + 1 + 1 + 1 + 1 + 0 - 1 - 1 + 1 + 1 - 1 = +5 2015-07-29 9:44 GMT+02:00 Iain Gray iaing...@ednet.co.uk: why do I get the following error? Stack

Re: [Factor-talk] nested nil lists

2015-07-04 Thread Iain Gray
sequence where the first element is f (~= nil): IN: scratchpad f 1array Or just use a literal: IN: scratchpad { f } 2015-07-03 11:14 GMT+02:00 Iain Gray iaing...@ednet.co.uk: in Scheme I can evaluate (list ‘()) to get ‘(()) as a nested null list Factor supplies nil (+nil+) but I

Re: [Factor-talk] nested nil lists

2015-07-04 Thread Iain Gray
thanks On 3 Jul 2015, at 18:52, Jon Harper jon.harpe...@gmail.com wrote: yes. Which is the same as ```nil 1list```. Jon On Fri, Jul 3, 2015 at 11:40 AM, Iain Gray iaing...@ednet.co.uk mailto:iaing...@ednet.co.uk wrote: is nil nil cons ok? On 3 Jul 2015, at 10:14, Iain Gray iaing

[Factor-talk] nested nil lists

2015-07-03 Thread Iain Gray
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

Re: [Factor-talk] nested nil lists

2015-07-03 Thread Iain Gray
is nil nil cons ok? On 3 Jul 2015, at 10:14, Iain Gray iaing...@ednet.co.uk 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

[Factor-talk] displaying Lisp like nested lists

2015-06-29 Thread Iain Gray
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

Re: [Factor-talk] displaying Lisp like nested lists

2015-06-29 Thread Iain Gray
that gave me { ~cons-state~ ~cons-state~ } On 29 Jun 2015, at 15:22, John Benediktsson 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

Re: [Factor-talk] displaying Lisp like nested lists

2015-06-29 Thread Iain Gray
( 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

Re: [Factor-talk] displaying Lisp like nested lists

2015-06-29 Thread Iain Gray
77 swons 10 swons 20 swons listarray . { 20 10 77 } 2015-06-29 14:37 GMT+02:00 Iain Gray iaing...@ednet.co.uk: 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

[Factor-talk] the Genuine Sieve of Erastothenes

2015-06-08 Thread Iain Gray
John Having read your weblog I wondered if you were aware of https://www.cs.hmc.edu/~oneill/papers/Sieve-JFP.pdf https://www.cs.hmc.edu/~oneill/papers/Sieve-JFP.pdf .It surfaced in the Scheme/Racket/Haskel community a few years ago. Regards

[Factor-talk] editting scaffold tests

2015-06-07 Thread Iain Gray
I have USING: namespaces tools.scaffold ; “my-trig” scaffold-work “my-trig” scaffold-tests duly create my-trig.factor and my-trig-tests.factor however “my-trig” edit opens in emacs while “my-trig-tests” edit doesn’t but I can still open it in emacs what have I done wrong?

Re: [Factor-talk] editting scaffold tests

2015-06-07 Thread Iain Gray
, this will work: \ foo edit Best, John. On Sun, Jun 7, 2015 at 4:09 AM, Iain Gray iaing...@ednet.co.uk mailto:iaing...@ednet.co.uk wrote: I have USING: namespaces tools.scaffold ; “my-trig” scaffold-work “my-trig” scaffold-tests duly create my-trig.factor and my-trig-tests.factor

Re: [Factor-talk] osx emacs FUEL

2015-06-05 Thread Iain Gray
, John. On Jun 4, 2015, at 7:21 AM, Iain Gray iaing...@ednet.co.uk wrote: Doug your email has gone missing, retrieved from archive success! thank you all for your advice and patience with a newcomer

Re: [Factor-talk] .factor-rc initialisatio

2015-06-05 Thread Iain Gray
: USE: namespaces On Jun 5, 2015, at 10:05 AM, Iain Gray iaing...@ednet.co.uk wrote: My .factor-rc contains USE: editors.emacs /Applications/Languages/Emacs.app/Contents/MacOS/bin-x86_64-10_9/emacsclient \ emacsclient-path set-global when these are typed in the listener followed

Re: [Factor-talk] osx emacs FUEL

2015-06-05 Thread Iain Gray
sorry fond email On 5 Jun 2015, at 12:21, Iain Gray iaing...@ednet.co.uk wrote: June to my thred Re: [Factor-talk] osx emacs FUEL as it has gone missing here. thanks Iain maailserver boounced request On 4 Jun 2015, at 15:34, John Benediktsson mrj...@gmail.com wrote: Excellent! Glad

Re: [Factor-talk] osx emacs FUEL

2015-06-04 Thread Iain Gray
Doug your email has gone missing, retrieved from archive success! thank you all for your advice and patience with a newcomer On 3 Jun 2015, at 18:01, Iain Gray iaing...@ednet.co.uk wrote: Sorry to try your patience again I found emacsclient locally in /usr/bin so my .factor-rc

Re: [Factor-talk] osx emacs FUEL

2015-06-03 Thread Iain Gray
/MacOS On Jun 2, 2015, at 8:42 AM, Iain Gray iaing...@ednet.co.uk mailto:iaing...@ednet.co.uk wrote: I get a similar error Process exited with error code 255 Launch descriptor: T{ process { command { /Applications/Languages/factor

Re: [Factor-talk] osx emacs FUEL

2015-06-02 Thread Iain Gray
, 2015 at 7:53 AM, Iain Gray iaing...@ednet.co.uk mailto:iaing...@ednet.co.uk wrote: still doesn’t work sorry I found emacsclient deep inside Emacs,app On 1 Jun 2015, at 13:00, Björn Lindqvist bjou...@gmail.com mailto:bjou...@gmail.com wrote: You shouldn't need to set emacs-path

Re: [Factor-talk] osx emacs FUEL

2015-06-02 Thread Iain Gray
. On Tue, Jun 2, 2015 at 4:26 AM, Iain Gray iaing...@ednet.co.uk mailto:iaing...@ednet.co.uk wrote: My .factor-rc reads USING: editors.emacs namespaces ; “/Applications/languages/Emacs.app/Contents/MacOS/bin-i386-10_5” emacsclient-path set-global after doing all suggestions I still get

Re: [Factor-talk] osx emacs FUEL

2015-06-02 Thread Iain Gray
from your .factor-rc into your Factor Listener and trying ``io edit`` again. 2) Make sure .factor-rc is in your home directory and readable when you start Factor. On Tue, Jun 2, 2015 at 7:46 AM, Iain Gray iaing...@ednet.co.uk mailto:iaing...@ednet.co.uk wrote: that works if I do

Re: [Factor-talk] osx emacs FUEL

2015-06-01 Thread Iain Gray
what your problem is? 2015-05-30 19:04 GMT+02:00 Iain Gray iaing...@ednet.co.uk: I have successfully integrated FUEL in emacs but cannot seem get it integrated with Factor. My emacs is 24..4.1 and an aoo and my os is OS X 10.3. Any advice appreciated. Iain

Re: [Factor-talk] osx emacs FUEL

2015-06-01 Thread Iain Gray
, but as a workaround you can start the server manually. First start emacs and in it type M-x server-start. Then you should be able to run io edit in the Factor gui and have the file shown in emacs. 2015-06-01 10:54 GMT+02:00 Iain Gray iaing...@ednet.co.uk: I have setup the file .factor-boot-rc as USING