Re: [Factor-talk] Cookbook and Learning

2013-06-19 Thread Dario Bertini
FWIW, I was using the 64bit binary tarball downloaded from
http://factorcode.org/

about #3: I waited more than 5 minutes, and with no new output, I
assumed it hanged... I'll try again eventually

--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


Re: [Factor-talk] Cookbook and Learning

2013-06-18 Thread Doug Coleman
The using list is reset upon every run.

You should be able to ``USE: roman`` and watch it load and compile,
``save``, then restart Factor. When you ``USE: roman`` again it will only
add it to the using list, not compile again.

You can also check the vm and image paths with: ``USE: system vm`` and
``USE: system image``. Make sure they're what you want.

Doug


On Tue, Jun 18, 2013 at 12:22 PM, Gabriel Kerneis wrote:

> On Tue, Jun 18, 2013 at 11:20:41AM -0700, Doug Coleman wrote:
> > In your home directory, do:
> > git clone g...@github.com:slavapestov/factor.git
> > cd factor
> > ./build-support/factor.sh update
> >
> > It will probably solve problems 1, 2, 4.
>
> If I remember correctly, I experienced problems 1 and 4 as well, with a
> github
> clone.  I'll try and reproduce it from scratch, then report a bug.
>
> Note that problem 1 is that vocabularies loaded with USE: are not
> available in
> the saved image; words declared directly in the scratchpad are saved
> correctly
> (at least in my case).
>
> Maybe the loaded vocabularies are in fact saved correctly, but one needs
> to call
> "USE" again for namespace reasons (even if it is compiled already)?
>
> --
> Gabriel
>
>
> --
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> ___
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


Re: [Factor-talk] Cookbook and Learning

2013-06-18 Thread Gabriel Kerneis
On Tue, Jun 18, 2013 at 11:20:41AM -0700, Doug Coleman wrote:
> In your home directory, do:
> git clone g...@github.com:slavapestov/factor.git
> cd factor
> ./build-support/factor.sh update
> 
> It will probably solve problems 1, 2, 4.

If I remember correctly, I experienced problems 1 and 4 as well, with a github
clone.  I'll try and reproduce it from scratch, then report a bug.

Note that problem 1 is that vocabularies loaded with USE: are not available in
the saved image; words declared directly in the scratchpad are saved correctly
(at least in my case).

Maybe the loaded vocabularies are in fact saved correctly, but one needs to call
"USE" again for namespace reasons (even if it is compiled already)?

-- 
Gabriel

--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


Re: [Factor-talk] Cookbook and Learning

2013-06-18 Thread Doug Coleman
Hi Dario,

It sounds like you have path problems. I think I read in the logs that you
(?) were using a Factor binary of some sort, if so which one? We don't
officially support anything except the downloads off factorcode.org or
building from git. If you're not already using it, I would recommend using
the github version.

In your home directory, do:
git clone g...@github.com:slavapestov/factor.git
cd factor
./build-support/factor.sh update

You'll get a working Factor after it bootstraps.

It will probably solve problems 1, 2, 4. For problem 3, you probably didn't
let it run long enough. Deploying can take as long as bootstrap, since it
basically bootstraps the deployed vocabulary along with the supporting
vocabularies it needs, which is most of the system.

Doug


On Sun, Jun 16, 2013 at 8:15 AM, Dario Bertini  wrote:

> Hi, I tried to follow along the documentation, but I found some stumbling
> blocks
>
> 1- I tried to save an image with the regexp vocabulary already loaded,
> like suggested here:
>
> http://docs.factorcode.org/content/article-cookbook-scripts.html
>
> but when loading factor again, the vocabulary still has to be loaded
> manually
>
> 2- I tried to use add-vocab-root as explained here:
>
> http://docs.factorcode.org/content/article-add-vocab-roots.html
>
> to load some code from outside the work/ directory, but the listener
> is unable to find it
>
> 3- I modified the palindrome code from the "Your First Program" to
> have a dummy word, and added that as the MAIN word, but when trying to
> use the deploy-tool, it gets stuck after
>
> "Loading resource:basis/cpu/x86/sse/sse.factor"
>
> 4- I modified the grep code from
> http://docs.factorcode.org/content/article-cookbook-scripts.html
>
> to put the code inside a grep word, and added that as the MAIN... I
> put it inside work/grep/grep.factor, but when trying to do `"grep"
> run` in the listener, it's unable to find it... so apparently, the
> scaffold-work tool does something else that I'm missing
>
>
>
> Overall, I started first with the Cookbook and then with the "Your
> First Program" tutorial, since they were listed in this order inside
> http://concatenative.org/wiki/view/Factor/Learning
>
> but the tutorial seems to be way gentler than the cookbook... maybe
> just because the latter is out-of-date according to the 0.96 release.
>
> So I'd suggest, to help newcomers, to put more emphasis on the
> tutorial rather than to the cookbook
>
>
> --
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> ___
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


Re: [Factor-talk] Cookbook and Learning

2013-06-17 Thread graham telfer
I would initially like to see 2 tutorials: one which teaches the basics of 
Factor in the manner of "Learn you a Haskell for Great Good" stressing the 
functional programming paradigm. It should get a beginner to the point of being 
able to think about problems in a functional way and compose functions to solve 
those problems in the Factor idiom.

A second tutorial emphasising real world problems with somewhat longer examples 
exemplified by some of John Benediktsson's blog posts would be my choice of a 
follow-up.

After that some more academic books using Factor in a traditional computer 
science course and video lectures to match the many using Python or Haskell is 
a wish list. --
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


Re: [Factor-talk] Cookbook and Learning

2013-06-17 Thread Jim Mack
construct a hello visitor web page
construct a hello visitor gui

Use factor ide as best rpm calculator ever!




On Mon, Jun 17, 2013 at 1:29 PM, Loryn Jenkins  wrote:

> Graham
>
> What type of tutorials would you find useful?
>
> Loryn Jenkins
>
>
> On Mon, Jun 17, 2013 at 10:34 PM, graham telfer wrote:
>
>> The lack of tutorials for Factor is a major bugbear. I have found The
>> Rosetta Code site very useful because you can compare Factor code with a
>> language you already know for many different problems.
>>
>> Chapter 4 of Thinking Forth is also useful because it has a lot of good
>> advice about factoring code.
>>
>>
>> --
>> This SF.net email is sponsored by Windows:
>>
>> Build for Windows Store.
>>
>> http://p.sf.net/sfu/windows-dev2dev
>> ___
>> Factor-talk mailing list
>> Factor-talk@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/factor-talk
>>
>
>
>
> --
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> ___
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
>
--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


Re: [Factor-talk] Cookbook and Learning

2013-06-17 Thread Loryn Jenkins
Graham

What type of tutorials would you find useful?

Loryn Jenkins


On Mon, Jun 17, 2013 at 10:34 PM, graham telfer wrote:

> The lack of tutorials for Factor is a major bugbear. I have found The
> Rosetta Code site very useful because you can compare Factor code with a
> language you already know for many different problems.
>
> Chapter 4 of Thinking Forth is also useful because it has a lot of good
> advice about factoring code.
>
>
> --
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> ___
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


[Factor-talk] Cookbook and Learning

2013-06-17 Thread graham telfer
The lack of tutorials for Factor is a major bugbear. I have found The Rosetta 
Code site very useful because you can compare Factor code with a language you 
already know for many different problems.

Chapter 4 of Thinking Forth is also useful because it has a lot of good advice 
about factoring code.

--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


[Factor-talk] Cookbook and Learning

2013-06-16 Thread Dario Bertini
Hi, I tried to follow along the documentation, but I found some stumbling blocks

1- I tried to save an image with the regexp vocabulary already loaded,
like suggested here:

http://docs.factorcode.org/content/article-cookbook-scripts.html

but when loading factor again, the vocabulary still has to be loaded manually

2- I tried to use add-vocab-root as explained here:

http://docs.factorcode.org/content/article-add-vocab-roots.html

to load some code from outside the work/ directory, but the listener
is unable to find it

3- I modified the palindrome code from the "Your First Program" to
have a dummy word, and added that as the MAIN word, but when trying to
use the deploy-tool, it gets stuck after

"Loading resource:basis/cpu/x86/sse/sse.factor"

4- I modified the grep code from
http://docs.factorcode.org/content/article-cookbook-scripts.html

to put the code inside a grep word, and added that as the MAIN... I
put it inside work/grep/grep.factor, but when trying to do `"grep"
run` in the listener, it's unable to find it... so apparently, the
scaffold-work tool does something else that I'm missing



Overall, I started first with the Cookbook and then with the "Your
First Program" tutorial, since they were listed in this order inside
http://concatenative.org/wiki/view/Factor/Learning

but the tutorial seems to be way gentler than the cookbook... maybe
just because the latter is out-of-date according to the 0.96 release.

So I'd suggest, to help newcomers, to put more emphasis on the
tutorial rather than to the cookbook

--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk