[Factor-talk] "Current" front page HackerNews post on Factor

2015-02-06 Thread Mitchell N Charity
"Factor – A practical stack language (factorcode.org)"https://news.ycombinator.com/item?id=9008472 is currently on the HN front page. A chance to answer questions, raise awareness, etc. FWIW, Mitchell -- Dive into th

Re: [Factor-talk] Trouble to run Factor on Fedora on X11

2015-02-06 Thread Chris Double
On Fri, Feb 6, 2015 at 12:11 PM, John Benediktsson wrote: > Are you able to share what is on the error dialog? I suspect it's this: "An error occurred while drawing the world T{ world f ~array~ ~array~ f f ~vector~ ~array~ ~debugger~ t t f This world has been deactivated to prevent cascading

Re: [Factor-talk] Naive loop optimization

2015-02-06 Thread John Benediktsson
> > 1) are specialized arrays the way to go? ie. do the nth & set-nth words > generate memory access as efficient as with pointer dereferencing in C? > Specialized arrays can be useful because they store untagged floats, which can take up less memory than a tagged float in a normal factor array. B

Re: [Factor-talk] Naive loop optimization

2015-02-06 Thread Marmaduke Woodman
Ah really nice. Thanks for the abundant information. The context of such a word is a neural network simulator where between hundreds and thousands of nodes need to be updated in place. Usually, the state of the network is stored as a big array of floats. The size of the network is known ahead of t

Re: [Factor-talk] Trouble to run Factor on Fedora on X11

2015-02-06 Thread John Benediktsson
Hi Jochen, I wonder if this is due to not supporting retina on linux, we support retina on OS X but I forgot that Linux might need that. A couple fixes you can try: IN: scratchpad "monospace" 18 set-listener-font If that works for you, it has to be run every time, or you can put it in your

Re: [Factor-talk] Naive loop optimization

2015-02-06 Thread John Benediktsson
Some thoughts for you: No, ``dup`` does not do anything but duplicate essentially a pointer to the object. Part of the reason it is slow is that you are operating on a kind of box by keeping your { x y } pairs in arrays (and in some cases unboxing ``first2`` and re-boxing ``2array``). Each of th

Re: [Factor-talk] Trouble to run Factor on Fedora on X11

2015-02-06 Thread Jochen Schmitt
On Thu, Feb 05, 2015 at 03:11:51PM -0800, John Benediktsson wrote: > Are you able to share what is on the error dialog? > > It is possible you don't have the right GTK dependencies (or that Factor is > not able to find them). I have foind a solution for my issue. I have installed the package xor

[Factor-talk] Naive loop optimization

2015-02-06 Thread Marmaduke Woodman
Hi, I've attempted to write a perhaps naive ODE integration loop in Factor, http://paste.factorcode.org/paste?id=3428 but it seems quite slow: the `bench1` word reports running time of ~3 s, which is an order of magnitude off equivalent OCaml & Haskell, so I imagine due to my lack of Factor ex