Re: [Factor-talk] FLUSH bug

2009-10-22 Thread Slava Pestov
Hugh, If you run the benchmark from the UI, no output will be displayed until the test word completes. This is because Factor uses co-operative threading and your word does not yield. This is not a big in flush (in fact, writing to the UI output stream, flush has no effect). Slava On Thu, Oct 2

[Factor-talk] FLUSH bug

2009-10-22 Thread Hugh Aguilar
My understanding of the FLUSH word is that it is supposed to flush the output buffer before proceeding. The documentation says: "Waits for any pending output on output-stream to complete." This isn't happening on my Windows system (the 10-20-09 download). I noticed this in regard to Slava's ver

[Factor-talk] LC53 --- trash the assembly-language

2009-10-22 Thread Hugh Aguilar
Here is a new version of LC53: www.rosycrew.org/LC53.4th I removed the assembly-language because it tended to clutter up the source-code. It was originally included to provide a baseline benchmark, but that is not particularly interesting and assembly-language is beyond the scope of the book th

Re: [Factor-talk] Newbie questions: Objects in Factor

2009-10-22 Thread Slava Pestov
There are three cases where this can come up. First of all, inheritance; TUPLE: animal ; TUPLE: cat < animal ; cat new animal? . => t cat new cat? . => t Here the new instance of cat is both a cat and an animal. The second is unions and mixins: TUPLE: chicken < animal ; TUPLE: cow < animal ; U

[Factor-talk] markup examples in help-docs.factor wreck parent/sibling links for "sequences", each and nth

2009-10-22 Thread Joe Groff
If you look at the docs for "each" or "nth" in a fresh image, they show up as subsections of the $subsections word, because the $subsections word contains these $subsections definitions in its $examples section: { $examples { $markup-example { $subsections "sequences" nth each } } } ;

Re: [Factor-talk] Newbie questions: Objects in Factor

2009-10-22 Thread Jon Harper
Hi, one the of things that makes factor great is it's documentation system. In your case, you should find all the explanations you want in the "Objects" help article, and more specifically in the "Classes" help article. If you have factor installed, you must have already used the help system. Just

[Factor-talk] Newbie questions: Objects in Factor

2009-10-22 Thread Elisabeth Wittek
Hello, at the moment I´m writing a paper about the object-oriented system in Factor for my studies. I´ve got a question about an object being an instance of more than one class. Can you give me a short example where this is realized or any further information? I don´t get it at all ;) Thanks a lo

Re: [Factor-talk] Idea for GIL lock (blog post)

2009-10-22 Thread Phil Dawes
Slava Pestov wrote: > On Thu, Oct 22, 2009 at 3:09 AM, Phil Dawes wrote: >> Yep. It's the latter I'm looking at at the moment, which requires >> native-thread notifications for message delivery (I think) and is iirc >> how we got onto the topic of a factor GIL. > > You could make an interim imple

Re: [Factor-talk] Idea for GIL lock (blog post)

2009-10-22 Thread Slava Pestov
On Thu, Oct 22, 2009 at 3:09 AM, Phil Dawes wrote: > Yep. It's the latter I'm looking at at the moment, which requires > native-thread notifications for message delivery (I think) and is iirc > how we got onto the topic of a factor GIL. You could make an interim implementation that uses pipes to

Re: [Factor-talk] Idea for GIL lock (blog post)

2009-10-22 Thread Phil Dawes
Slava Pestov wrote: > Phil, > > I think you're jumping the gun here. "GIL"-style threading will > require extensive changes to the VM. A first step is to move > co-operative thread scheduling out of the library and into the VM. > Second, we need to remove the ability to pass byte arrays to FFI > f