Re: [Factor-talk] Presentation and installation issues on Slackware64-14.1 Linux

2013-12-10 Thread Luis P. Mendes
Hi all, 2013/12/8 Jon Harper jon.harpe...@gmail.com: The reason factor needs *-dev packages is that factor needs a plain .so symlink in a directory searched by dlopen and Debian packages typically put these in dev packages whereas normal packages only install a *.so.soversion symlink. I

[Factor-talk] teaching

2013-04-08 Thread Leonard P
Stacks, objects, collections, continuations, higher-order functions ... Anyone else think that Factor would make an ideal language for teaching CS? -- Precog is a next-generation analytics platform capable of advanced

Re: [Factor-talk] furnace

2013-03-05 Thread Leonard P
Maybe something for amazon web store, like this ... http://docs.factorcode.org:8080/content/article-s3.html -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite

[Factor-talk] furnace

2013-03-04 Thread Leonard P
Anyone using factor/furnace for ecommerce? Are there any shopping cart vocabularies out there? - Leonard -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite

Re: [Factor-talk] Raw string syntax in Factor

2013-02-25 Thread Leonard P
http://jarnaldich.me/2013/02/24/raw-strings-in-factor.html Might also be written as a rule in a tokenizer. http://docs.factorcode.org/content/article-peg.ebnf.tokenizers.html -- Everyone hates slow websites. So do we.

Re: [Factor-talk] matrices

2013-02-20 Thread Leonard P
On Tue, Feb 19, 2013 at 10:38 PM, Leonard P leonard14...@gmail.com wrote: On Tue, Feb 5, 2013 at 6:23 PM, John Benediktsson mrj...@gmail.comwrote: I think you'd want virtual sequences as well, so getrow wouldn't necessary copy data. Doing the API right would involve walking through various

Re: [Factor-talk] matrices

2013-02-20 Thread Leonard P
On Wed, Feb 20, 2013 at 1:10 PM, Leonard P leonard14...@gmail.com wrote: On Tue, Feb 19, 2013 at 10:38 PM, Leonard P leonard14...@gmail.comwrote: On Tue, Feb 5, 2013 at 6:23 PM, John Benediktsson mrj...@gmail.comwrote: I think you'd want virtual sequences as well, so getrow wouldn't

Re: [Factor-talk] matrices

2013-02-19 Thread Leonard P
Dear Doug, Humbly request that your next planet-factor blog post be about arrays.shaped. Need some examples to get started. Shaped arrays could be an important building block in the language, it seems. Cheers, Leonard

Re: [Factor-talk] matrices

2013-02-19 Thread Leonard P
On Tue, Feb 5, 2013 at 6:23 PM, John Benediktsson mrj...@gmail.com wrote: I think you'd want virtual sequences as well, so getrow wouldn't necessary copy data. Doing the API right would involve walking through various numerical programming examples. We'd love any contributions you'd want to

Re: [Factor-talk] matrices

2013-02-07 Thread Leonard P
The tuple is defined ... TUPLE: matrix { coefficient initial: 1 } { #rows integer initial: 0 } { #cols integer initial: 0 } { data } ; The idea is to store an n-by-m matrix as a flat sequence, instead of an array of arrays. To accomplish this we map element subscripts, (row, col), to a

Re: [Factor-talk] matrices

2013-02-07 Thread Leonard P
Also looking for an example implementation of a virtual sequence. -- Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more.

Re: [Factor-talk] matrices

2013-02-07 Thread Leonard P
The high-level-stack-language is so beautiful, and Factor is the only one around afaik. Given a large enough vocabulary, Factor would outshine Python, Numpy, Matlab, Mathematica, etc. -- Free Next-Gen Firewall Hardware

Re: [Factor-talk] matrices

2013-02-07 Thread Leonard P
Would like to see math.matrices implemented with shaped arrays one day. -- Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more.

Re: [Factor-talk] matrices

2013-02-05 Thread Leonard P
On Tue, Feb 5, 2013 at 4:32 PM, Leonard P leonard14...@gmail.com wrote: Anyone know off-hand of an idiomatic way to do the Laplace expansion of an nxn matrix? In the spirit of Java, I would create a matrix class that is backed by a single mutable vector. Rows, columns, and individual

Re: [Factor-talk] matrices

2013-02-05 Thread Leonard P
On Tue, Feb 5, 2013 at 5:58 PM, Doug Coleman doug.cole...@gmail.com wrote: If you interested in finding the determinant of a matrix, the easiest way is probably to bind to LAPACK or LINPACK using our Fortran FFI. Take a look at extra/math/blas/ffi for an example. If you have time, try

Re: [Factor-talk] matrices

2013-02-05 Thread Leonard P
On Tue, Feb 5, 2013 at 6:08 PM, Doug Coleman doug.cole...@gmail.com wrote: The style could be better, but we're lacking a bunch of words I'd want for working with matrices efficiently. We'd need real n-dimensional arrays like numpy has to do it properly, which is what I started in

Re: [Factor-talk] matrices

2013-02-05 Thread Leonard P
On Tue, Feb 5, 2013 at 6:23 PM, John Benediktsson mrj...@gmail.com wrote: I think you'd want virtual sequences as well, so getrow wouldn't necessary copy data. Doing the API right would involve walking through various numerical programming examples. We'd love any contributions you'd want to

Re: [Factor-talk] matrices

2013-02-05 Thread Leonard P
On Tue, Feb 5, 2013 at 6:25 PM, Leonard P leonard14...@gmail.com wrote: On Tue, Feb 5, 2013 at 6:23 PM, John Benediktsson mrj...@gmail.comwrote: I think you'd want virtual sequences as well, so getrow wouldn't necessary copy data. Doing the API right would involve walking through various

Re: [Factor-talk] matrices

2013-02-05 Thread Leonard P
On Tue, Feb 5, 2013 at 6:23 PM, John Benediktsson mrj...@gmail.com wrote: I think you'd want virtual sequences as well, so getrow wouldn't necessary copy data. Doing the API right would involve walking through various numerical programming examples. We'd love any contributions you'd want to

Re: [Factor-talk] matrices

2013-02-05 Thread Leonard P
Is there a word that takes a sequence, and fills it with copies of an object? : fill ( seq object -- seq ) ... ; -- Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and

Re: [Factor-talk] matrices

2013-02-05 Thread Leonard P
: IN: scratchpad 10 [ random-32 ] replicate . { 2098808057 346443215 3307050344 1882029266 2737379981 4203127047 3606510406 3285608987 3361776623 979717385 } On Tue, Feb 5, 2013 at 4:42 PM, Leonard P leonard14...@gmail.com wrote: Nevermind

Re: [Factor-talk] math.matrices

2013-02-02 Thread Leonard P
Just reinstalled from scratch and still can't call square-matrix. *square-matrix? -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today:

Re: [Factor-talk] math.matrices

2013-02-02 Thread Leonard P
Also, m^n works, but matrix does not. On Sat, Feb 2, 2013 at 10:11 PM, John Benediktsson mrj...@gmail.com wrote: Perhaps you have some compile errors? Do you have local edits to math.matrices? It works for me: IN: scratchpad USE: math.matrices IN: scratchpad 3 3 zero-matrix . { { 0 0 0

Re: [Factor-talk] math.matrices

2013-02-02 Thread Leonard P
Aha, installed the development version, and it works. -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today:

Re: [Factor-talk] math.matrices

2013-02-02 Thread Leonard P
On Sun, Feb 3, 2013 at 12:30 AM, John Benediktsson mrj...@gmail.com wrote: Does that mean the 0.95 release had the errors but the development version works? That's odd. The 0.95 release is missing a lot of words in math.matrices.

Re: [Factor-talk] determinant

2013-02-02 Thread Leonard P
Any good ways to compute a submatrix, besides using flatten and modular arithmetic? http://en.wikipedia.org/wiki/Submatrix -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download

Re: [Factor-talk] nice

2013-01-16 Thread Leonard P
On Wed, Jan 16, 2013 at 3:44 AM, Alfredo Beaumont alfredo.beaum...@gmail.com wrote: A more concise version[1]: 2 1000 ^ numberdigits sum cheers Awesome. Seems like Factor would be a great tool for teaching math. Anyone get the graphviz gallery to work?

Re: [Factor-talk] nice

2013-01-16 Thread Leonard P
Anyone get the graphviz gallery to work? Er, nm... works now. -- Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery and much more. Keep your Java skills current with LearnJavaNow - 200+ hours of

Re: [Factor-talk] matrices

2013-01-16 Thread Leonard P
On Thu, Jan 10, 2013 at 11:44 AM, Alex Vondrak ajvond...@gmail.com wrote: Haven't looked at the code, but to answer your question about `for`-loops... for each loops: http://docs.factorcode.org/content/word-each,sequences.html for i = 0 up to n loops: use `each` with

Re: [Factor-talk] matrices

2013-01-16 Thread Leonard P
Was wondering if there could be a variation of for i = 0 up to n, when n is unknown. Named it index-pump. Instead of looping over a body of code, we are index-pumping a function. : index-pump ( quot -- m ) 1 swap [ dup ] prepose [ 1 + ] while ; inline Er, seems like this already

Re: [Factor-talk] matrices

2013-01-16 Thread Leonard P
Ok list. I've done enough wrangling. It's time for me to sit back, let the language sink in, and read some code examples. Apologies if I've overtaxed your inbox. For someone used to Java, Factor takes some getting used to, but it is an exciting paradigm. My hope for Factor is that its

Re: [Factor-talk] matrices

2013-01-12 Thread Leonard P
On Fri, Jan 11, 2013 at 9:47 AM, John Benediktsson mrj...@gmail.comwrote: This should be a direct translation of that method, I think :: fibonacci? ( n ) 1 [ dup fibonacci n ] [ 1 + ] while fibonacci n = ; Factored this to have only one reference to a local. :: closest-upper-index (

Re: [Factor-talk] matrices

2013-01-12 Thread Leonard P
Fascinating. -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by

Re: [Factor-talk] matrices

2013-01-12 Thread Leonard P
/Turing_completeness ''Computability theory https://en.wikipedia.org/wiki/Computability_theoryincludes the closely related concept of Turing equivalence https://en.wikipedia.org/wiki/Turing_equivalence. Two computers P and Q are called Turing equivalent if P can simulate Q and Q can simulate P

Re: [Factor-talk] matrices

2013-01-12 Thread Leonard P
One awesome thing about Factor is its rich library. It seems like any public version of Forth doesn't come close to offering the functionality of the Factor vocabulary. Considering only Turing completeness, it should be possible to implement most of Factor on top of an existing Forth.

Re: [Factor-talk] matrices

2013-01-12 Thread Leonard P
Why not implement Factor on top of an existing Forth? It's entirely possible, sure. Heck, Factor used to be written atop the JVM. The reason to use C++ is really more social than technical. C++ is much more ubiquitous than Forth, so people won't need to install a dependency they don't

Re: [Factor-talk] matrices

2013-01-12 Thread Leonard P
Some interesting questions come to mind. What features does Factor have that RetroForth does not? Of these features, how many are possible to implement in RetroForth? How many are possible to implement with new forth words and vocabularies? How many require changing the forth compiler?

Re: [Factor-talk] matrices

2013-01-11 Thread Leonard P
On Fri, Jan 11, 2013 at 9:47 AM, John Benediktsson mrj...@gmail.com wrote: This should be a direct translation of that method, I think :: fibonacci? ( n ) 1 [ dup fibonacci n ] [ 1 + ] while fibonacci n = ; Awesome.

Re: [Factor-talk] matrices

2013-01-10 Thread Leonard P
Closest thing to a for loop that I could find, lol ... USING: kernel prettyprint math ; 3 [ dup . 7 + 11 mod dup 3 = not ] loop drop 3 10 6 2 9 5 1 8 4 0 7 -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012,

Re: [Factor-talk] matrices

2013-01-10 Thread Leonard P
Here's what I got so far ... fibonacci.factor Description: Binary data fibonacci-tests.factor Description: Binary data -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps,

Re: [Factor-talk] matrices

2013-01-10 Thread Leonard P
Here's a better one. Just needs a for loop. fibonacci.factor Description: Binary data fibonacci-tests.factor Description: Binary data -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC,

Re: [Factor-talk] matrices

2013-01-10 Thread Leonard P
Here's the algorithm ... Given n, generate successive fibonacci numbers, until a number greater than or equal to n is reached. If the number is equal to n, then n is a fibonacci number. If the number is greater than n, then n is not a fibonacci number. Sounds simple, but I don't see a way to do

Re: [Factor-talk] matrices

2013-01-10 Thread Leonard P
On Thu, Jan 10, 2013 at 11:44 AM, Alex Vondrak ajvond...@gmail.com wrote: Haven't looked at the code, but to answer your question about `for`-loops... for each loops: http://docs.factorcode.org/content/word-each,sequences.html for i = 0 up to n loops: use `each` with

Re: [Factor-talk] matrices

2013-01-10 Thread Leonard P
Maybe just need a counter object. -- Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and much more. Get web development skills now with LearnDevNow - 350+ hours of step-by-step video tutorials by Microsoft

[Factor-talk] matrices

2013-01-09 Thread Leonard P
Anyone know how to instantiate a 2x2 matrix? - Leonard -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow -

Re: [Factor-talk] matrices

2013-01-09 Thread Leonard P
Was thinking of writing a word called fibonacci? ( n -- ? ). The definition would iteratively compute m^n of { { 0 1 } { 1 1 }. The iteration terminates when the matrix either contains n or a value greater than n. If the matrix contains n, then push t. If the matrix contains a value greater

Re: [Factor-talk] matrices

2013-01-09 Thread Leonard P
On Wed, Jan 9, 2013 at 11:32 PM, John Benediktsson mrj...@gmail.com wrote: If you want to flatten, you could do this: IN: scratchpad { { 1 2 } { 3 4 } } concat . { 1 2 3 4 } If you want to just check the rows for membership, you could do this (which checks if any of the rows

Re: [Factor-talk] matrices

2013-01-09 Thread Leonard P
Is there a word to do the inverse of concat? (i.e. build a sequence of sequences from a flat sequence) -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more.

Re: [Factor-talk] matrices

2013-01-09 Thread Leonard P
On Thu, Jan 10, 2013 at 12:05 AM, John Benediktsson mrj...@gmail.comwrote: In the grouping vocabulary: IN: scratchpad { 1 2 3 4 } 2 group . { { 1 2 } { 3 4 } } Nice. -- Master Visual Studio, SharePoint, SQL,

Re: [Factor-talk] matrices

2013-01-09 Thread Leonard P
IN: scratchpad 5 { { 1 2 } { 3 4 } } [ member? ] with any? I'm really going to give away my newb status with this question. How does one turn the above into a method? Something like this ... : matrix-contains? ( m n -- ? ) n m [ member? ] with any?

Re: [Factor-talk] matrices

2013-01-09 Thread Leonard P
Er, this seems to work ... : matrix-contains? ( m n -- ? ) [ member? ] with any? -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills

Re: [Factor-talk] matrices

2013-01-09 Thread Leonard P
On Wed, Jan 9, 2013 at 11:32 PM, John Benediktsson mrj...@gmail.com wrote: If you want to flatten, you could do this: IN: scratchpad { { 1 2 } { 3 4 } } concat . { 1 2 3 4 } If you want to just check the rows for membership, you could do this (which checks if any of the rows

Re: [Factor-talk] matrices

2013-01-09 Thread Leonard P
Is there an idiom for a for loop? -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video

Re: [Factor-talk] matrices

2013-01-09 Thread Leonard P
Also, this is offtopic, but I wanted to ask if the calculator GUI example could be changed to an RPN calculator. -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and

[Factor-talk] Another cool project

2013-01-03 Thread Leonard P
Another cool project would be to redo Minecraft in Factor. - Leonard -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with

Re: [Factor-talk] Quotation stack effect

2012-12-26 Thread P.
Hi Samuel, Use \ map ( http://docs.factorcode.org/content/word-map,sequences.html ) instead of \ each . Peter On Wed, Dec 26, 2012 at 1:47 PM, Samuel Proulx proulxsam...@gmail.comwrote: Hi, I just have a quick question. Is it possible to make an each quotation have a stack effect such as (

Re: [Factor-talk] 9p

2012-12-25 Thread Leonard P
On Tue, Dec 25, 2012 at 12:20 PM, Leonard P leonard14...@gmail.com wrote: On Tue, Dec 25, 2012 at 12:19 PM, John Benediktsson mrj...@gmail.com wrote: That would be a cool project! You can call it Plan 9 in Factor space

[Factor-talk] UI example

2012-12-22 Thread Leonard P
Any simple UI examples out there? - Leonard -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on

[Factor-talk] teaching

2012-12-22 Thread Leonard P
Does anyone else think that Factor is an ideal language for teaching programming at the university level? Are any universities out there teaching Factor? - Leonard -- LogMeIn Rescue: Anywhere, Anytime Remote support

Re: [Factor-talk] editors

2012-12-17 Thread Leonard P
On Mon, Dec 17, 2012 at 2:46 AM, Leonard P leonard14...@gmail.com wrote: Is there a way to use vi to edit factor code? Graphical listener is slow on old machine. - Leonard Eh, sorry, dumb question. Tried running the example at ... http://docs.factorcode.org/content/article-first-program

Re: [Factor-talk] editors

2012-12-17 Thread Leonard P
On Mon, Dec 17, 2012 at 10:53 AM, Alex Vondrak ajvond...@gmail.com wrote: What about it didn't work? Did you get an error? Otherwise, what actually happened, and how did that differ from what you expected? --Alex Vondrak No word named “scaffold-tests” found in current vocabulary search

Re: [Factor-talk] editors

2012-12-17 Thread Leonard P
On Mon, Dec 17, 2012 at 2:44 PM, Doug Coleman doug.cole...@gmail.com wrote: USE: tools.scaffold Thanks. -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and

Re: [Factor-talk] terrain example

2012-12-16 Thread Leonard P
On Sun, Dec 16, 2012 at 11:37 PM, John Benediktsson mrj...@gmail.com wrote: That works fine for me, using latest development branch of Factor and Mac OS X 10.8.2. What versions are you using? Lates downloaded binary and Ubuntu 12.

[Factor-talk] editors

2012-12-16 Thread Leonard P
Is there a way to use vi to edit factor code? Graphical listener is slow on old machine. - Leonard -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and

Re: [Factor-talk] Factor-talk Digest, Vol 79, Issue 7

2012-12-09 Thread Leonard P
On Sat, Dec 8, 2012 at 10:41 PM, Leonard P leonard14...@gmail.com wrote: Message: 3 Date: Sat, 8 Dec 2012 15:48:33 +0100 From: Marek Kubica ma...@xivilization.net Subject: Re: [Factor-talk] Running factor To: factor-talk@lists.sourceforge.net Message-ID: 20121208154833.6b57a

Re: [Factor-talk] Factor-talk Digest, Vol 79, Issue 7

2012-12-08 Thread Leonard P
:30:56 -0500 Leonard P leonard14...@gmail.com wrote: $ ls -l /lib/libc-*.so /lib/libc.so* -rwxr-xr-x 1 root root 1437064 Jun 6 2012 /lib/libc-2.11.3.so lrwxrwxrwx 1 root root 14 Dec 6 06:47 /lib/libc.so.6 - libc-2.11.3.so This kinda looks ancient. How did you install Factor? You might

Re: [Factor-talk] Factor-talk Digest, Vol 79, Issue 7

2012-12-08 Thread Leonard P
On Sat, Dec 8, 2012 at 10:41 PM, Leonard P leonard14...@gmail.com wrote: Message: 3 Date: Sat, 8 Dec 2012 15:48:33 +0100 From: Marek Kubica ma...@xivilization.net Subject: Re: [Factor-talk] Running factor To: factor-talk@lists.sourceforge.net Message-ID: 20121208154833.6b57a

[Factor-talk] Running factor

2012-12-07 Thread Leonard P
What system are you running ? Is your system fully updated ? Jon $ uname -a Linux crunchbang 2.6.32-5-amd64 #1 SMP Thu Mar 22 17:26:33 UTC 2012 x86_64 GNU/Linux $ gcc -v Using built-in specs. Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Debian 4.4.5-8'

Re: [Factor-talk] Literate Programming

2012-08-29 Thread P.
And just to add that thanks to the ability to manipulate the lexer in Factor, you can write a literate programming syntax library and it could be however you want it, including exactly like Haskell's. - rien On Wed, Aug 29, 2012 at 2:03 PM, Jon Harper jon.harpe...@gmail.com wrote: Short

Re: [Factor-talk] Modules/packages for Factor

2012-08-24 Thread P.
Here's an unpopular vote, but I'll say it anyway. How about portable packages? As in, if you download package P that is dependent on packages D, E, F, then package P comes with the correct versions of D, E, F embedded in it? That way we do away with dependencies altogether. (yes, there'll

Re: [Factor-talk] Modules/packages for Factor

2012-08-24 Thread P.
Hey Doug, thanks for the link, I'll read it when I'm not at work. (oops :P) What about mimicking something like OCaml's functors or whatever they call their dependency interfaces? On Fri, Aug 24, 2012 at 3:02 PM, Joe Groff arc...@gmail.com wrote: On Fri, Aug 24, 2012 at 2:56 PM, P. uploa

Re: [Factor-talk] Modules/packages for Factor

2012-08-24 Thread P.
thing (like the example I gave with P and E, D, F). So it's hard for me to follow. - rien On Fri, Aug 24, 2012 at 3:05 PM, P. uploa...@gmail.com wrote: Hey Doug, thanks for the link, I'll read it when I'm not at work. (oops :P) What about mimicking something like OCaml's functors or whatever

Re: [Factor-talk] Modules/packages for Factor

2012-08-24 Thread P.
that now, right?) - rien On Fri, Aug 24, 2012 at 3:13 PM, Joe Groff arc...@gmail.com wrote: On Fri, Aug 24, 2012 at 3:05 PM, P. uploa...@gmail.com wrote: Hey Doug, thanks for the link, I'll read it when I'm not at work. (oops :P) What about mimicking something like OCaml's functors or whatever

Re: [Factor-talk] Short-circuiting boolean operators?

2011-12-20 Thread P.
combinators.short-circuit help rien On Dec 20, 2011, at 3:41 PM, missingfaktor wrote: I was unable to find short-circuiting boolean operators in Factor's standard vocabs. Does it not have them? If not, why not? If yes, where are they? -- Cheers, missingfaktor.

Re: [Factor-talk] A word that lets me ommit stack comments

2011-12-18 Thread P.
I've wondered the same. Theoretically, since Factor can infer stack effects, one should be able to leave them out. On Dec 18, 2011, at 3:44 PM, missingfaktor wrote: Is there a parsing word that lets you define words without a stack effect declaration? -- Cheers, missingfaktor.

Re: [Factor-talk] More than one obj quot recovery

2011-12-05 Thread P.
I believe \ recover is the word for that. \ try is built on top of recover. There's also \ cleanup , but because that rethrows the error it might not be for you. I'm not sure what you need. If you want to handle the error and continue executing, then use \ recover. If you want to cleanup before

Re: [Factor-talk] Weird behavior on button-up

2011-11-21 Thread P.
Drag-drop events are not usually implemented in terms of mouse-up. At least when I did VB I remember there were events specifically for dragging. That might be the same in Factor - I don't really know. Regarding the other thing not working, that should be considered a bug as far as I can see.

Re: [Factor-talk] Weird behavior on button-up

2011-11-21 Thread P.
22:17 schrieb P.: Drag-drop events are not usually implemented in terms of mouse-up. At least when I did VB I remember there were events specifically for dragging. That might be the same in Factor - I don't really know. Regarding the other thing not working, that should be considered

Re: [Factor-talk] Weird behavior on button-up

2011-11-21 Thread P.
-button-down, not for the drop itself. I'll have to accept that button-up does not work and find some workaround. The price one has to pay for working with a newish language. -- Ben Schlingelhof benseins.de Am Montag, 21. November 2011 um 22:17 schrieb P.: Drag-drop events are not usually

Re: [Factor-talk] group-by word

2011-11-19 Thread P.
Do it step by step - think about the steps you need to take. I would first sort the array by length. Then I would group them by length (look at the monotonic-split word for that). That would be very close to what you want. On Nov 19, 2011, at 12:49 PM, missingfaktor wrote: I want to write a

Re: [Factor-talk] Finding words with given stack effect

2011-11-10 Thread P.
} It is ad hoc and thus will not always find what you're looking for. On Thu, Nov 10, 2011 at 12:03 PM, missingfaktor rahul.phulore@gmail.com wrote: Does Factor have a word for searching words given a stack-effect? Something like: (( x p q -- )) words-with-stack-effect will list out 'bi

Re: [Factor-talk] manos

2011-11-05 Thread P.
Here's a taste of what it could possibly look like: http://rwmj.wordpress.com/2010/08/07/jonesforth-git-repository/ Look at the links below The original tutorial is in two parts. rien On Sat, Nov 5, 2011 at 1:48 PM, L N leonardne...@gmail.com wrote: Found this awhile back from a google search

Re: [Factor-talk] Simple keyboard input

2011-11-04 Thread P.
If we ignore the fact that that looks like a weird program for someone to want to replicate in any language... ;) ... then what ?key seems to be is a non-blocking stdin-read function. I don't know if Factor has non-blocking peek/read, to be honest. So I guess I'm not of any help beyond naming the

Re: [Factor-talk] Simple keyboard input

2011-11-04 Thread P.
Here are some words you might want to research: refill refill-stdin buffer-empty? Remember that you can't test code that uses stdin on the listener, since it doesn't emulate stdin well. rien On Fri, Nov 4, 2011 at 6:22 PM, P. uploa...@gmail.com wrote: If we ignore the fact that that looks

Re: [Factor-talk] slots

2011-11-01 Thread P.
The article you want can be found by typing the following in the listener and pressing enter: accessors help A bit about objects in Factor: First take a look at this example from the homepage (the code sample is different at each reload, keep trying): USING: accessors kernel math