Re: [Factor-talk] Questions of a newcomer

2016-11-07 Thread Jon Harper
Hi Peter,

On Mon, Nov 7, 2016 at 3:07 PM,  wrote:

> Hello,
>
> I am tinkering with factor and was wondering if it is OK to pick your
> brains here? As I play around with the language questions come up that
> are probably easy for you to answer. I don't see much action on the
> #concatenative IRC channel so I thought the maling list might be a
> better place?
>
> Questions are always welcome. The mailing list or #concatenative on IRC
are both good places to ask. Several people read the logs of #concatenative
and may answer your questions some time after you sent it, so don't give up.

As a starter:
>
> - I see a common pattern in definitions of using `dip` instead of
> `swap`. Is there some special reason for that? Is it more performant? I
> know the words aren't interchangeable but e.g. `with-directory-files`
> has `[ [ "" directory-files ] ] dip` which as far as I can tell is
> equivalent to `[ "" directory-files ] swap`. I saw this pattern in more
> definitions.
>
I guess it's a matter of personal style. I would argue that the 'meaning'
of swap ( x y -- y x ) is that there's the same importance on pushing y
down the stack than on puling x up the stack. Whereas [ y ] dip would focus
more putting y down the stack.

Regarding the performance, you can often see for yourself using the
optimized. word of compiler.tree.debugger. You could even install libudis
and use the disassemble word of tools.disassembler.
I would be surprised if the performance of swap vs dip mattered in a real
application.


>
> - is there any sequence generator/iterator vocabulary? Something that
> gives or computes values on demand. One can find it in many languages
> with a bit different flavor, e.g. Scheme, Rust, Python. I saw that there
> is lists.lazy which can serve a similar purpose but is a bit more heavy
> weight in some cases. Maybe this isn't needed in factor at all and you
> use a different pattern to solve a similar problem?
>
I've seen discussions on this mailing list about the extra/cursors
vocabulary about that. I've never used it though. For example Joe talked
about it in 2009: https://sourceforge.net/p/factor/mailman/message/23878123

Cheers,
Jon
--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


Re: [Factor-talk] Factor Build Machine

2016-11-07 Thread Alexander Ilin


05.11.2016, 17:17, "John Benediktsson" :
> Hmm, we should look at that. It normally just takes 5-10 minutes to 
> bootstrap, another few minutes to load all the libraries, and then running 
> all our tests can take maybe 45 minutes or longer. Sometimes a little longer 
> if using a slow VM. 4 days is an anomaly.

  Hey, y'all!

  I've just downloaded the latest build from here: 
http://builds.factorcode.org/package?os=windows=x86.32

  Just FYI, it contains num-test-bad.db, which I believe is a file left over 
from an sqlite unit-test.

  Also, the sqlite.dll is v3.12, and we've had 3.13 for a while now.

---=--- 
 Александр

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


[Factor-talk] Questions of a newcomer

2016-11-07 Thread petern
Hello,

I am tinkering with factor and was wondering if it is OK to pick your 
brains here? As I play around with the language questions come up that 
are probably easy for you to answer. I don't see much action on the 
#concatenative IRC channel so I thought the maling list might be a 
better place?

As a starter:

- I see a common pattern in definitions of using `dip` instead of 
`swap`. Is there some special reason for that? Is it more performant? I 
know the words aren't interchangeable but e.g. `with-directory-files` 
has `[ [ "" directory-files ] ] dip` which as far as I can tell is 
equivalent to `[ "" directory-files ] swap`. I saw this pattern in more 
definitions.

- is there any sequence generator/iterator vocabulary? Something that 
gives or computes values on demand. One can find it in many languages 
with a bit different flavor, e.g. Scheme, Rust, Python. I saw that there 
is lists.lazy which can serve a similar purpose but is a bit more heavy 
weight in some cases. Maybe this isn't needed in factor at all and you 
use a different pattern to solve a similar problem?

All in all the language is quite fun, I like it when one has to fight 
his own brain to get something done because one often learns so much 
along the way.

Any tips welcome, thank you

-- 

   Peter Nagy


--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk