Re: [Factor-talk] Factor shyness on Mac
I think this bug is now fixed. Let me know if the latest binary solves the problem. It looks like the latest version is not able to Hide (Cmd-H)? Is anyone else having that problem? Thanks, John. -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] easy-help example
I just tried the example, and it looks like it chomps the first character of each line? eq sequence xemplar sequence ewseq a new sequence .. utputs... Is that just me? On Wed, Dec 24, 2008 at 1:12 AM, Eduardo Cavazos wayo.cava...@gmail.com wrote: Hello, Here is the help markup for the word 'like' in sequences-docs.factor : HELP: like { $values { seq sequence } { exemplar sequence } { newseq a new sequence } } { $contract Outputs a sequence with the same elements as { $snippet seq } , but { $emphasis like } the template sequence, in the sense that it either has the same class as the template sequence, or if the template sequence is a virtual sequence, the same class as the template sequence's underlying sequence. $nl The default implementation does nothing. } { $notes Unlike { $link clone-like } , the output sequence might share storage with the input sequence. } ; Here it is using easy-help. This example is real. I pasted it into the sequences-docs.factor and it renders. Word: like Values: seq sequence exemplar sequence newseq a new sequence .. Contract: Outputs a sequence with the same elements as { $snippet seq } , but { $emphasis like } the template sequence, in the sense that it either has the same class as the template sequence, or if the template sequence is a virtual sequence, the same class as the template sequence's underlying sequence. The default implementation does nothing. .. Notes: Unlike { $link clone-like } , the output sequence might share storage with the input sequence. .. ; Ed -- ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
[Factor-talk] Listener bug?
Got the following bug from running the console version of Factor on Mac OSX. To reproduce: 1) Start ./factor 2) Type something (e.g., asdfsadf) 3) Type Ctrl-A 4) Type Ctrl-D ( scratchpad ) asdfasdfsadf^A Error in thread 6 (I/O wait, [ ~quotation~ ~quotation~ while ]): Fall-through in case object 4294967295 [ init-catchstack [ 2 setenv call ] keep - wait-to-return ] [ over [ call ] dip - ] [ 3drop 0 mx get kqueue-mx wait-for-events - reset-run-loop yield ] handle-kevents handle-kevent no-case [ 63 getenv error-thread set-global continuation - error-continuation set-global rethrow ] The die word was called by the library. Unless you called it yourself, you have triggered a bug in Factor. Please report. -- OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Build error on OS X 10.6?
The assertion in question is guarded by a #ifdef FACTOR_DEBUG. Why is this being set? Do you have 'DEBUG=1' in your environment? Yes - I had DEBUG set for another application I was working with, and hadn't noticed. That works now. Thanks! John. -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Factor UI tweaks - pull request
Hi Keith, I really like the UI changes you've been making to syntax highlight Factor source code. Perhaps you could have a look at the docs website, which is pretty useful, and use a similar stylesheet? Thanks, John. -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] New help color scheme in docs.factorcode.org
Also, I noticed that some of the vocab links produce 404 Not Found - for example: http://docs.factorcode.org/content/vocab-sequences.private.html On Mon, Sep 14, 2009 at 12:56 PM, Keith Lazuka klaz...@gmail.com wrote: Hey Slava, I fixed the black border around the 'next/prev' links in the autogenerated HTML documentation. Please pull the fix from my ui branch (http://github.com/klazuka/factor/tree/ui). One thing that I noticed with the online docs is that the left search frame appears to be using a different CSS stylesheet. Presumably this is part of the web application that serves the documentation content. Could you please update the link colors in the web app's search frame to match the link colors in the help content? The new blue color is #104e8b. -keith -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
[Factor-talk] Symlinks
It appears that Factor isn't able to detect file modifications (using refresh-all) for files that are contained in a directory through a symlink. To reproduce: 1) Make a directory my-vocab, with a my-vocab.factor file. 2) Make a symlink from inside of work to that directory. 3) Confirm that USE: my-vocab loads properly from ${FACTOR}/work/my-vocab. 4) Change something inside of my-vocab.factor. 5) Try to refresh-all, and see that it did not pick up the changes. If there is something I'm missing, please let me know? Thanks, John. -- Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] mysql?
I have an almost working db.mysql. I have a few things to add, but I would welcome the help in finishing. Interested? On Oct 4, 2010, at 7:47 AM, Doug Coleman doug.cole...@gmail.com wrote: Hi Jörg, I've just always used Postgres instead of Mysql. There are tons of comparisons between the two, but it used to be that Postgres was more correct and had more SQL features. Also, I don't like the GPL, but I believe there are no license conflicts with supporting Mysql if you want. I'd welcome a Mysql library. Let me know if you have any questions about writing it. Doug On Oct 4, 2010, at 4:15 AM, Jörg Plewe wrote: Hi list! I saw that Factor supports sqlite and PostgresSQL but not MySQL (true?). Is there a strategic reasoning behing that? I felt that MySQL would be the first to consider? - Jörg -- Virtualization is moving to the mainstream and overtaking non-virtualized environment for deploying applications. Does it make network security easier or more difficult to achieve? Read this whitepaper to separate the two and get a better understanding. http://p.sf.net/sfu/hp-phase2-d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Virtualization is moving to the mainstream and overtaking non-virtualized environment for deploying applications. Does it make network security easier or more difficult to achieve? Read this whitepaper to separate the two and get a better understanding. http://p.sf.net/sfu/hp-phase2-d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Virtualization is moving to the mainstream and overtaking non-virtualized environment for deploying applications. Does it make network security easier or more difficult to achieve? Read this whitepaper to separate the two and get a better understanding. http://p.sf.net/sfu/hp-phase2-d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Furnace
Hi Shaping, SSL does not yet work on Windows. It works fine on Linux and Mac OS X. I wrote a blogpost about some basic examples of using the Factor web framework: http://re-factor.blogspot.com/2010/08/hello-web.html You might also like to follow the factor-blog-tutorial which builds up a blog web application over a series of GIT commits that should be easy to follow. http://github.com/malu/factor-blog-gitutorial Regarding the SQLite error, where did you put the DLL? Try C:\Path\To\Factor Good luck. Thanks, John. -- The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book Blueprint to a Billion shares his insights and actions to help propel your business during the next growth cycle. Listen Now! http://p.sf.net/sfu/SAP-dev2dev___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Problems with the Hello World and timer-server examples.
I created the file Hello-world.factor from here http://gitweb.factorcode.org/gitweb.cgi?p=factor;a=blob;f=extra/hello-world/hello-world.factor;hb=HEAD 1 USE: io 2 IN: hello-world 3 4 : hello ( -- ) Hello world print ; 5 6 MAIN: hello This works in the Listener. However when I run from the command line Factor hello-world.factor If you run it like that, it does not execute the MAIN: word. Try running it like: ./factor -run=hello-world Or, if you'd rather run it as a single file script, remove MAIN: and just call the hello word at the end of the file. Thanks, John. -- The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book Blueprint to a Billion shares his insights and actions to help propel your business during the next growth cycle. Listen Now! http://p.sf.net/sfu/SAP-dev2dev___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
[Factor-talk] Size of Collections
Hi, Do sets support a method to determine their size? Using members length is not a very efficient way to get it... Is there some interest in merging length, assoc-size, and the answer to the above question? Thanks, John. -- Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Size of Collections
I propose adding GENERIC: cardinality ( set -- n ) Would you like to try your hand at this, or should I work on it? I'd be happy to work on this -- it fits nicely with some other changes I'm working on. Thanks, John. -- Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Count repetition in sequence
Try: ( scratchpad ) USE: math.statistics ( scratchpad ) { a a a cc cc def } histogram . H{ { cc 2 } { a 3 } { def 1 } } 2011/1/3 Steve Tsai 蔡福安 tsa...@familysearch.org: I want to define a word that can count the number of repetition of elements in a sorted sequence. For example Input: { “a” “a” “a” “cc” “cc” “def” } Output: { { “a” 3 } { “cc” 2 } { “def” 1 } } Can anyone guide me on it? Thanks, Steve Tsai NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. -- Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] heap-size question
I wrote a packed struct vocabulary that aligns to single bytes, if you need that behavior. https://github.com/mrjbq7/re-factor/blob/master/classes/struct/packed Using it, you can see that: ( scratchpad ) PACKED-STRUCT: packed-junk { a char } { b ushort } ; ( scratchpad ) packed-junk heap-size . 3 On Wed, Jul 13, 2011 at 10:34 AM, john.whitta...@kc.rr.com wrote: Ahhh, thanks. Joe Groff arc...@gmail.com wrote: On Jul 13, 2011, at 7:03 AM, john.whitta...@kc.rr.com john.whitta...@kc.rr.com wrote: Suppose I have the following STRUCT: definition: STRUCT: junk { a char } { b ushort } ; I expected the heap-size of junk to be 3, but it turns out to be 4. Does alignment have something to do with this or is it something else? Structs follow C alignment rules. ushorts are 2-byte-aligned. -Joe -- AppSumo Presents a FREE Video for the SourceForge Community by Eric Ries, the creator of the Lean Startup Methodology on Lean Startup Secrets Revealed. This video shows you how to validate your ideas, optimize your ideas and identify your business strategy. http://p.sf.net/sfu/appsumosfdev2dev ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- AppSumo Presents a FREE Video for the SourceForge Community by Eric Ries, the creator of the Lean Startup Methodology on Lean Startup Secrets Revealed. This video shows you how to validate your ideas, optimize your ideas and identify your business strategy. http://p.sf.net/sfu/appsumosfdev2dev ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- AppSumo Presents a FREE Video for the SourceForge Community by Eric Ries, the creator of the Lean Startup Methodology on Lean Startup Secrets Revealed. This video shows you how to validate your ideas, optimize your ideas and identify your business strategy. http://p.sf.net/sfu/appsumosfdev2dev___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Errata
When I tried to load your file in the Factor listener (e.g., USE: file-copier), I got a few errors (press F3 to see them). The following minor changes fixed it for me: $ diff ~/Downloads/file-copier.factor file-copier.factor 105,106c105,106 [ g-source get file-name g-destination set ] [ dup second g-destination set ] --- [ drop g-source get file-name g-destination set ] [ second g-destination set ] 114c114 g-destination get dup exists? --- g-destination get exists? 116c116 file-info directory? --- g-destination get file-info directory? Hope that helps, Best, John. On Wed, Jul 27, 2011 at 3:29 AM, Michele Pes mp8...@rambler.ru wrote: Hi, xml-validator now correctly deploy, excuse me for trivial error. File copier correctly deploy, but immediately exit with a run-time error. When I run it as script, no errors are shown. Please help, michele pes -- Got Input? Slashdot Needs You. Take our quick survey online. Come on, we don't ask for help often. Plus, you'll get a chance to win $100 to spend on ThinkGeek. http://p.sf.net/sfu/slashdot-survey ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Got Input? Slashdot Needs You. Take our quick survey online. Come on, we don't ask for help often. Plus, you'll get a chance to win $100 to spend on ThinkGeek. http://p.sf.net/sfu/slashdot-survey ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Errata
Hi Michele, Below is a file copy program that can be deployed and works. I don't know if it differs from your requirements, but you might find it useful to look through: http://paste.factorcode.org/paste?id=2334 Best, John. On Wed, Jul 27, 2011 at 8:24 AM, John Benediktsson mrj...@gmail.com wrote: When I tried to load your file in the Factor listener (e.g., USE: file-copier), I got a few errors (press F3 to see them). The following minor changes fixed it for me: $ diff ~/Downloads/file-copier.factor file-copier.factor 105,106c105,106 [ g-source get file-name g-destination set ] [ dup second g-destination set ] --- [ drop g-source get file-name g-destination set ] [ second g-destination set ] 114c114 g-destination get dup exists? --- g-destination get exists? 116c116 file-info directory? --- g-destination get file-info directory? Hope that helps, Best, John. On Wed, Jul 27, 2011 at 3:29 AM, Michele Pes mp8...@rambler.ru wrote: Hi, xml-validator now correctly deploy, excuse me for trivial error. File copier correctly deploy, but immediately exit with a run-time error. When I run it as script, no errors are shown. Please help, michele pes -- Got Input? Slashdot Needs You. Take our quick survey online. Come on, we don't ask for help often. Plus, you'll get a chance to win $100 to spend on ThinkGeek. http://p.sf.net/sfu/slashdot-survey ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Got Input? Slashdot Needs You. Take our quick survey online. Come on, we don't ask for help often. Plus, you'll get a chance to win $100 to spend on ThinkGeek. http://p.sf.net/sfu/slashdot-survey___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] USE/USING and scripting
Hi Andrew, It would help if you attached some code, but you should be able to get your code to work if you put the files in the work folder of Factor like this: /work/ant/ant.factor /work/antfarm/antfarm.factor When you USE: ant, it will look through the vocabulary roots (core, basis, extra, work, etc.) for a directory ant with an ant.factor file in it. Best, John. On Thu, Aug 18, 2011 at 10:14 PM, Andrew Pennebaker andrew.penneba...@gmail.com wrote: ant.factor contains code manipulating ant objects. antfarm.factor is a demo of a hundred ants. How does antfarm.factor import code from ant.factor? I tried USING: ant ;but Factor complains Vocabulary does not exist name ant. Cheers, Andrew Pennebaker www.yellosoft.us -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] USE/USING and scripting
You could define this syntax word: SYNTAX: INCLUDE: scan-object parse-file append ; Then use it: INCLUDE: foo.factor It adds all words from foo.factor into the current vocab. On Fri, Aug 19, 2011 at 6:06 PM, Andrew Pennebaker andrew.penneba...@gmail.com wrote: Could you tweak the RELATIVE macro so that it doesn't require blob.factor to be in blob/ ? Cheers, Andrew Pennebaker www.yellosoft.us On Fri, Aug 19, 2011 at 8:22 PM, Joe Groff arc...@gmail.com wrote: On Aug 19, 2011, at 5:14 PM, Andrew Pennebaker wrote: The RELATIVE trick looks promising. Though, it gives me an error. scriptedmain.factor https://github.com/mcandre/scriptedmain/blob/master/scriptedmain.factor test.factor https://github.com/mcandre/scriptedmain/blob/master/test.factor $ ./test.factor Loading /Users/andrew/.factor-rc ./test.factor 4: USING: scriptedmain ; ^ Vocabulary does not exist name scriptedmain scriptedmain.factor needs to be in a scriptedmain subdirectory: mkdir scriptedmain mv scriptedmain.factor scriptedmain/ Side note: Could the Loading /Users/andrew/.factor-rc message be silenced so that it doesn't obscure a script's command line interface? That looks like a bug—in script mode, loading messages should be suppressed. I'll fix it. -Joe -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] USE/USING and scripting
Try with a string: INCLUDE: scriptedmain On Fri, Aug 19, 2011 at 6:53 PM, Andrew Pennebaker andrew.penneba...@gmail.com wrote: I'm trying to tweak INCLUDE so that it appends .factor for you (and thereby looks more natural, like USE/USING). $ cat ~/.factor-rc ! An INCLUDE macro that imports source code files in the current directory USING: accessors io.pathnames namespaces source-files vocabs.loader parser sequences ; IN: syntax SYNTAX: INCLUDE: scan-object .factor append parse-file append ; $ ./test.factor Loading /Users/andrew/.factor-rc ./test.factor 3: INCLUDE: scriptedmain ^ No word named “scriptedmain” found in current vocabulary search path By the way, aren't USE and USING redundant? Would it make sense to deprecate USE? Cheers, Andrew Pennebaker www.yellosoft.us On Fri, Aug 19, 2011 at 9:15 PM, John Benediktsson mrj...@gmail.comwrote: You could define this syntax word: SYNTAX: INCLUDE: scan-object parse-file append ; Then use it: INCLUDE: foo.factor It adds all words from foo.factor into the current vocab. On Fri, Aug 19, 2011 at 6:06 PM, Andrew Pennebaker andrew.penneba...@gmail.com wrote: Could you tweak the RELATIVE macro so that it doesn't require blob.factor to be in blob/ ? Cheers, Andrew Pennebaker www.yellosoft.us On Fri, Aug 19, 2011 at 8:22 PM, Joe Groff arc...@gmail.com wrote: On Aug 19, 2011, at 5:14 PM, Andrew Pennebaker wrote: The RELATIVE trick looks promising. Though, it gives me an error. scriptedmain.factor https://github.com/mcandre/scriptedmain/blob/master/scriptedmain.factor test.factor https://github.com/mcandre/scriptedmain/blob/master/test.factor $ ./test.factor Loading /Users/andrew/.factor-rc ./test.factor 4: USING: scriptedmain ; ^ Vocabulary does not exist name scriptedmain scriptedmain.factor needs to be in a scriptedmain subdirectory: mkdir scriptedmain mv scriptedmain.factor scriptedmain/ Side note: Could the Loading /Users/andrew/.factor-rc message be silenced so that it doesn't obscure a script's command line interface? That looks like a bug—in script mode, loading messages should be suppressed. I'll fix it. -Joe -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] getopt; commandline parsing Re: Invoke MAIN: from commandline script file?
If you want to use your arg get code, you can: USE: command-line : main ( -- ) command-line get parse-command-line help get . ; In this case, command-line is the list of arguments to your script. Best, John. On Sat, Aug 20, 2011 at 9:42 AM, Andrew Pennebaker andrew.penneba...@gmail.com wrote: Okay, factor -help ios7crypt.factor works. It seems Factor ignores arguments after the first script name. How can I rearrange the shebang so that ./ios7crypt.factor -help sends the argument to factor after the script name? For example, in Common Lisp a multilineshebang rearranges arguments so that the script name is forcibly passed twice: #!/bin/bash #| exec clisp -q -q $0 $0 ${1+$@} exit |# If there's a way to do multiline shebangs in Factor, then ./ios7crypt.factor -help can be run correctly. Cheers, Andrew Pennebaker www.yellosoft.us On Sat, Aug 20, 2011 at 12:37 PM, Andrew Pennebaker andrew.penneba...@gmail.com wrote: This works in the interpreter, but I'm having trouble passing command line arguments to my scripts. For some reason, Factor isn't setting the global variable help when I pass it -help. $ cat ios7crypt.factor #! /usr/bin/env factor USING: kernel namespaces io prettyprint ; IN: ios7crypt : usage ( -- ) Usage: ios7crypt.factor [options] print -encrypt password print -decrypt hash print -test print -help print ; : main ( -- ) help get . ; MAIN: main $ ./ios7crypt.factor Loading /Users/andrew/.factor-rc f $ ./ios7crypt.factor -help Loading /Users/andrew/.factor-rc f Cheers, Andrew Pennebaker www.yellosoft.us On Thu, Aug 18, 2011 at 1:50 AM, Joe Groff arc...@gmail.com wrote: On Aug 17, 2011, at 10:32 PM, Andrew Pennebaker wrote: Awesome! By the way, I don't get any usage info for Factor that would list the -script option. (no factor -h, factor --help, etc.) Is there a getopt for Factor? I think -script was a relic of the past; it doesn't appear to be necessary anymore. The main remaining caveat with #! is that it needs to be followed by whitespace. There might be a getopt-like parser library, but I don't know of it. Maybe someone else does. However, the VM will parse options of the form -foo or -foo=bar and set them as variables in the global namespace for you, which you can access with the get function. For example: $ ./factor -foo -zim=zang -flux=rad ( scratchpad ) foo get . t ( scratchpad ) zim get . zang ( scratchpad ) flux get . rad -Joe -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] sequences and the stack
Also, for your case a sequence of two elements can be treated a bit like a map of key/value pairs. You can use the assocs vocabulary to manipulate your sequence (called an association list or 'alist' in the documentation). Try: ( scratchpad ) USE: assocs ( scratchpad ) \ assoc-map help ( scratchpad ) \ assoc-each help On Aug 21, 2011, at 11:26 AM, Alexander J. Vondrak ajvond...@csupomona.edu wrote: first2: http://docs.factorcode.org/content/word-first2,sequences.html In general, firstn: http://docs.factorcode.org/content/word-firstn,sequences.generalizations.html Regards, --Alex Vondrak From: Andrew Pennebaker [andrew.penneba...@gmail.com] Sent: Sunday, August 21, 2011 11:20 AM To: Factor Subject: [Factor-talk] sequences and the stack The stack contains a sequence of number pairs: { { x1 y1 } { x2 y2 } { x3 y3 } ... } I want to map over the pairs, accessing xi and yi. [ ! stack = { xi yi } ! ... ! stack = xi yi ] map What's the code that goes in !... ? Other than using nth, how can I do this? Is there a word that pops the elements of a sequence onto the stack? Cheers, Andrew Pennebaker www.yellosoft.ushttp://www.yellosoft.us -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] traslation
This works for your particular task: { 1 2 3 } [ { a b c } [ append ] with map join print ] each On Sun, Aug 21, 2011 at 12:49 PM, Arkady Rost arkr...@gmail.com wrote: Hi! I'm looking for a more elegant solution of the following task. for i in rangeA { for j in rangeB { foo(param, i, j); } bar(); } I need to translate this to factor. foo(param, y, x) = x y param foo I have a solution: rangeA rangeB param [ foo ] curry [ swapd [ call ] 2curry each bar ] 2curry each For example, rangeA = { a b c } rangeB = { 1 2 3 } param = foo = append append write ; bar = print ; { a b c } { 1 2 3 }[ append append write ] curry [ swapd [ call ] 2curry each print ] 2curry each Result is : 1a 2a 3a 1b 2b 3b 1c 2c 3c I think my solution is bloated with partial applications. Maybe someone can provide a better way to solve this task. Cheers, Ark. Rost -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] traslation
Well, here's three versions for inspiration. 1) Given a 'foo' quotation that takes elements from each and prints it out: : foo ( a b foo: ( x y -- z ) -- ) [ with map join print ] 2curry each ; inline ( scratchpad ) { 1 2 3 } { a b c } [ append ] foo 2) Given a 'foo' and a 'bar' that acts on the resulting sequence from 'foo'ing: : bar ( a b foo: ( x y -- z ) bar: ( z -- ) -- ) [ [ with map ] 2curry ] dip compose each ; inline ( scratchpad ) { 1 2 3 } { a b c } [ append ] [ join print ] bar 3) Taking version #2 and rewriting with fry quotations: USE: fry : bar ( a b foo: ( x y -- z ) bar: ( z -- ) -- ) '[ _ with map @ ] curry each ; inline On Sun, Aug 21, 2011 at 1:13 PM, Arkady Rost arkr...@gmail.com wrote: The original task is more complicated that's why I've used foo and bar in definition of the problem. Thanks for attention but I'm looking for a better solution in the general case. -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] TryRuby, etc.
This Factor Playground provides some basics on how Factor works, although I believe its a clone in Javascript (so it isn't making calls into a true Factor process). http://personal.inet.fi/koti/egaga/jsfactor/playground.html On Wed, Aug 24, 2011 at 1:19 PM, Michael Clagett mclag...@hotmail.comwrote: Yes I guess it is. Probably better to use on-line documentation for more up-to-date info. Still, I found this a pretty useful read on the train. Much of what's here, though, is in the Reference section of the on-line docs. Date: Wed, 24 Aug 2011 13:03:11 -0700 From: sl...@factorcode.org To: factor-talk@lists.sourceforge.net Subject: Re: [Factor-talk] TryRuby, etc. I can't load that link right now, but IIRC this is just the old Factor 0.72 docs in PDF format. On Wed, Aug 24, 2011 at 1:00 PM, Andrew Pennebaker andrew.penneba...@gmail.com wrote: Note that this handbook is not a tutorial... --Forward to the Factor Developer's Handbook It's still a valuable resource. Thanks. Cheers, Andrew Pennebaker www.yellosoft.us On Tue, Aug 23, 2011 at 11:15 PM, Michael Clagett mclag...@hotmail.com wrote: Hi Andrew -- Not a video tutorial, but I found this useful: http://www.bluishcoder.co.nz/handbook.pdf Regards, Mike From: andrew.penneba...@gmail.com Date: Tue, 23 Aug 2011 20:25:58 -0400 To: factor-talk@lists.sourceforge.net Subject: [Factor-talk] TryRuby, etc. Has anyone made an interactive online tutorial for Factor comparable to TryRuby? Cheers, Andrew Pennebaker www.yellosoft.us -- EMC VNX: the world's simplest storage, starting under $10K The only unified storage solution that offers unified management Up to 160% more powerful than alternatives and 25% more efficient. Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- EMC VNX: the world's simplest storage, starting under $10K The only unified storage solution that offers unified management Up to 160% more powerful than alternatives and 25% more efficient. Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- EMC VNX: the world's simplest storage, starting under $10K The only unified storage solution that offers unified management Up to 160% more powerful than alternatives and 25% more efficient. Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- EMC VNX: the world's simplest storage, starting under $10K The only unified storage solution that offers unified management Up to 160% more powerful than alternatives and 25% more efficient. Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- EMC VNX: the world's simplest storage, starting under $10K The only unified storage solution that offers unified management Up to 160% more powerful than alternatives and 25% more efficient. Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- EMC VNX: the world's simplest storage, starting under $10K The only unified storage solution that offers unified management Up to 160% more powerful than alternatives and 25% more efficient. Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] pull request
Thanks, merged. On Wed, Aug 24, 2011 at 3:48 PM, Jon Harper jon.harpe...@gmail.com wrote: jon@zephyr:~/factor$ git request-pull -p origin/master g...@github.com:jonenst/factor.git master The following changes since commit 45df73a0caebb4ff3b93c6f6d3bf9b2a78028ce7: fjsc: display the proper namespace when using set_in. (2011-08-24 15:20:51 -0700) are available in the git repository at: g...@github.com:jonenst/factor.git master Jon Harper (1): sequences, fix stack effect of (accumulate) core/sequences/sequences.factor |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/core/sequences/sequences.factor b/core/sequences/sequences.factor index 493365d..6ac1ffc 100644 --- a/core/sequences/sequences.factor +++ b/core/sequences/sequences.factor @@ -403,7 +403,7 @@ PRIVATE [ 2drop f f ] if ; inline -: (accumulate) ( seq identity quot -- seq identity quot ) +: (accumulate) ( seq identity quot -- identity seq quot ) [ swap ] dip [ curry keep ] curry ; inline PRIVATE -- EMC VNX: the world's simplest storage, starting under $10K The only unified storage solution that offers unified management Up to 160% more powerful than alternatives and 25% more efficient. Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- EMC VNX: the world's simplest storage, starting under $10K The only unified storage solution that offers unified management Up to 160% more powerful than alternatives and 25% more efficient. Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] sequences and the stack
Typically there are better ways to operate on sequences than to put all the elements on the stack, but you could: ( scratchpad ) { 0 1 2 3 } dup length firstn Better might be to use some combinators to act on the sequence each grabbing the element that they need (bi, tri, or the more general cleave): ( scratchpad ) { 0 1 2 3 } { [ first ] [ second ] [ third ] } cleave On Wed, Aug 24, 2011 at 6:50 PM, Andrew Pennebaker andrew.penneba...@gmail.com wrote: Is there a word more general than firstn? I'd like to push all the elements of a sequence onto the stack. Cheers, Andrew Pennebaker www.yellosoft.us On Sun, Aug 21, 2011 at 2:26 PM, Alexander J. Vondrak ajvond...@csupomona.edu wrote: first2: http://docs.factorcode.org/content/word-first2,sequences.html In general, firstn: http://docs.factorcode.org/content/word-firstn,sequences.generalizations.html Regards, --Alex Vondrak From: Andrew Pennebaker [andrew.penneba...@gmail.com] Sent: Sunday, August 21, 2011 11:20 AM To: Factor Subject: [Factor-talk] sequences and the stack The stack contains a sequence of number pairs: { { x1 y1 } { x2 y2 } { x3 y3 } ... } I want to map over the pairs, accessing xi and yi. [ ! stack = { xi yi } ! ... ! stack = xi yi ] map What's the code that goes in !... ? Other than using nth, how can I do this? Is there a word that pops the elements of a sequence onto the stack? Cheers, Andrew Pennebaker www.yellosoft.ushttp://www.yellosoft.us -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- EMC VNX: the world's simplest storage, starting under $10K The only unified storage solution that offers unified management Up to 160% more powerful than alternatives and 25% more efficient. Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- EMC VNX: the world's simplest storage, starting under $10K The only unified storage solution that offers unified management Up to 160% more powerful than alternatives and 25% more efficient. Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] sequences and the stack
Look at inputsequence from combinators.smart. On Wed, Aug 24, 2011 at 7:19 PM, Andrew Pennebaker andrew.penneba...@gmail.com wrote: I've got a function that I want to call over a sequence of values (both are determined at run time). Is there something like call that accepts a sequence of arguments? Something like this: f args call-seq Cheers, Andrew Pennebaker www.yellosoft.us On Wed, Aug 24, 2011 at 10:04 PM, John Benediktsson mrj...@gmail.comwrote: Typically there are better ways to operate on sequences than to put all the elements on the stack, but you could: ( scratchpad ) { 0 1 2 3 } dup length firstn Better might be to use some combinators to act on the sequence each grabbing the element that they need (bi, tri, or the more general cleave): ( scratchpad ) { 0 1 2 3 } { [ first ] [ second ] [ third ] } cleave On Wed, Aug 24, 2011 at 6:50 PM, Andrew Pennebaker andrew.penneba...@gmail.com wrote: Is there a word more general than firstn? I'd like to push all the elements of a sequence onto the stack. Cheers, Andrew Pennebaker www.yellosoft.us On Sun, Aug 21, 2011 at 2:26 PM, Alexander J. Vondrak ajvond...@csupomona.edu wrote: first2: http://docs.factorcode.org/content/word-first2,sequences.html In general, firstn: http://docs.factorcode.org/content/word-firstn,sequences.generalizations.html Regards, --Alex Vondrak From: Andrew Pennebaker [andrew.penneba...@gmail.com] Sent: Sunday, August 21, 2011 11:20 AM To: Factor Subject: [Factor-talk] sequences and the stack The stack contains a sequence of number pairs: { { x1 y1 } { x2 y2 } { x3 y3 } ... } I want to map over the pairs, accessing xi and yi. [ ! stack = { xi yi } ! ... ! stack = xi yi ] map What's the code that goes in !... ? Other than using nth, how can I do this? Is there a word that pops the elements of a sequence onto the stack? Cheers, Andrew Pennebaker www.yellosoft.ushttp://www.yellosoft.us -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- EMC VNX: the world's simplest storage, starting under $10K The only unified storage solution that offers unified management Up to 160% more powerful than alternatives and 25% more efficient. Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- EMC VNX: the world's simplest storage, starting under $10K The only unified storage solution that offers unified management Up to 160% more powerful than alternatives and 25% more efficient. Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- EMC VNX: the world's simplest storage, starting under $10K The only unified storage solution that offers unified management Up to 160% more powerful than alternatives and 25% more efficient. Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- EMC VNX: the world's simplest storage, starting under $10K The only unified storage solution that offers unified management Up to 160% more powerful than alternatives and 25% more efficient. Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Metadata
I don't think versioning the vocabularies included in Factor is necessary. You don't see versions in standard libraries of other languages. However, it would be nice if released versions of Factor reported their version numbers properly. On Aug 27, 2011, at 12:32 PM, Matt Gushee m...@gushee.net wrote: Hi, all-- I'm wondering what the Factor community would think of including certain kinds of metadata in the source code for vocabularies and for the Factor itself. My starting point for this line of thinking was that I had played with Factor for a while a couple of years ago, then dropped it for a while ... and I wanted to know what version I had installed. So my first thought was to go to the listener and try version Nope. Okay, how about factor-version ? No again. And so on through several variations ... nothing. Nor could I find anything in the online help. Nor any file in the source directory to indicate the version (or revision date). And it occurs to now, which should be obvious, that I can probably use Git to find out some pertinent info. However: * Not everyone is using Git. * Version info is useful, not just for the purpose I mentioned, but also for debugging. * It seems desirable to be able to query version info via the listener, and probably also programatically for the purpose of checking dependencies among vocabularies. Furthermore, there is probably other metadata that would be a good idea to maintain. For example, if Factor becomes widely used, there might be a situation where different developers distribute similarly- or identically-named vocabularies. So we should have the developer's name, or email address, or some other identifier that serves to distinguish a given vocabulary from a different one with the same name. Personally, I feel pretty strongly about this; if I were in charge of development I would make at least the above-mentioned items *mandatory* for all language components, such that a vocabulary would fail to load or compile if it didn't include the required metadata. But I think I've said enough. I will leave it up to more experienced folks to decide whether and how to implement this idea. Thanks for reading! -- Matt Gushee m...@gushee.net -- EMC VNX: the world's simplest storage, starting under $10K The only unified storage solution that offers unified management Up to 160% more powerful than alternatives and 25% more efficient. Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- EMC VNX: the world's simplest storage, starting under $10K The only unified storage solution that offers unified management Up to 160% more powerful than alternatives and 25% more efficient. Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] TryRuby, etc.
As a newcomer, I have to agree somewhat. It's frustrating when examples from Help don't work because Factor has changed since the help was written. However, even with errors (inconsistencies?) Factor's Help system is very useful. What examples from help do not work? Generally all the examples you find in Factor's Help (or on docs.factorcode.org) should work. Best, John. -- EMC VNX: the world's simplest storage, starting under $10K The only unified storage solution that offers unified management Up to 160% more powerful than alternatives and 25% more efficient. Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] frequency of vocabularies
Keep in mind that tools.test is largely used for unit tests (-tests.factor files) and the help vocabularies are used for documentation (-docs.factor files). Also, to be more complete, you can look for USE: instructions (less common) that are like USING: but for a single vocabulary. On Sep 11, 2011, at 3:42 PM, Patrick Mc(avery patr...@spellingbeewinnars.org wrote: Like other languages with large libraries, it takes time to learn them and it is not always obvious what they do. I am trying to focus on learning the most common vocabularies. I copied all the factor files from the factor source directory: cp $(find -name *.factor) /home/patrick/my_Factor Then I used these commands to count and sort the vocabularies used: cat * | tr -s ' ' | tr 'A-Z' 'a-z' | grep using: | tr ' ' '\n' | sort | uniq -c | sort /home/patrick/factorVocabulary.csv After some tweaking in a spreadsheet I have a long list. Here is the the top 50. Referencing the using count of 5575 do the other counts seem reasonable? (some may be junk from my commands) Thanks-Patrick 5575 using: 3128 kernel 1634 math 1582 accessors 1420 sequences 1176 tools.test 1080 help.markup 1052 help.syntax 1040 arrays 860 prettyprint 814 assocs 676 namespaces 542 io 524 alien.c-types 466 combinators 378 fry 354 strings 322 alien 314 alien.syntax 244 locals 234 words 224 math.parser 206 io.files 206 calendar 192 math.functions 190 math.order 180 continuations 172 hashtables 164 byte-arrays 160 quotations 158 classes.struct 154 classes 144 make 134 math.ranges 132 project-euler.common 120 io.streams.string 114 ui.gadgets 112 grouping 110 generic 110 destructors 104 parser 98 system 96 definitions 92 combinators.short-circuit 90 threads 88 math.vectors 88 io.pathnames 84 compiler.units 82 splitting -- Using storage to extend the benefits of virtualization and iSCSI Virtualization increases hardware utilization and delivers a new level of agility. Learn what those decisions are and how to modernize your storage and backup environments for virtualization. http://www.accelacomm.com/jaw/sfnl/114/51434361/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Using storage to extend the benefits of virtualization and iSCSI Virtualization increases hardware utilization and delivers a new level of agility. Learn what those decisions are and how to modernize your storage and backup environments for virtualization. http://www.accelacomm.com/jaw/sfnl/114/51434361/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Printing the docs
Which parts of the documentation are you looking for? I wrote some code to generate PDF's from parts of the Factor documentation: First Program ( first-program help ) https://github.com/mrjbq7/re-factor/raw/master/docs/first-program.pdf Cookbook ( cookbook help ) https://github.com/mrjbq7/re-factor/raw/master/docs/cookbook.pdf Language ( handbook-language-reference help ) https://github.com/mrjbq7/re-factor/raw/master/docs/handbook.pdf System ( handbook-system-reference help ) https://github.com/mrjbq7/re-factor/raw/master/docs/system.pdf Tools ( handbook-tools-reference help ) https://github.com/mrjbq7/re-factor/raw/master/docs/tools.pdf Best, John. On Sun, Sep 18, 2011 at 9:54 AM, Patrick Mc(avery patr...@spellingbeewinnars.org wrote: I would like a hard copy of the documentation and I asked for help on the IRC last night and got some help: documentation is in **/*-docs.factor. you can run USE: help.html generate-help to generate HTML help, which will give you the same thing that's on docs.factorcode.org I tried to run this in the listener but if it generated the documentation in a folder I can't find it. Sorry to be so dumb, if someone could tell me how to print the documentation I promise not to ask so many dumb question :) -Patrick -- BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA http://p.sf.net/sfu/rim-devcon-copy2 ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA http://p.sf.net/sfu/rim-devcon-copy2___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Graphviz unit tests
- The current tests pass on my machine. But then, my machine = a Debian box with Graphviz 2.26.3 installed (since I guess 2.28 is too bleeding-edge for Debian) and erg's plugin-list fix reverted (which I'm certainly thankful for, but 2.26 doesn't have the gvPluginList function; ugh). So, grain of salt I guess. I get a kernel-error trying to run the first smoke-test (5 K_n), with Graphviz 2.28.0 on Mac OS X 10.7.1 x86_64. And running graphviz test causes Factor to quit unexpectedly... which might be a different bug? -- BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA Learn about the latest advances in developing for the BlackBerryreg; mobile platform with sessions, labs more. See new tools and technologies. Register for BlackBerryreg; DevCon today! http://p.sf.net/sfu/rim-devcon-copy1 ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Graphviz unit tests
Unfortunately, this is all I get from the command-line. I'll need to do more debugging at some point: ( scratchpad ) USE: graphviz ( scratchpad ) graphviz test Unit Test: { { t } [ 5 K_n smoke-test ] } factor(53761,0x7fff7512c960) malloc: *** error for object 0xc000: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug Abort trap: 6 On Sun, Sep 18, 2011 at 7:43 PM, Alexander James Vondrak ajvond...@csupomona.edu wrote: I get a kernel-error trying to run the first smoke-test (5 K_n), with Graphviz 2.28.0 on Mac OS X 10.7.1 x86_64. And running graphviz test causes Factor to quit unexpectedly... which might be a different bug? I hate Graphviz. I really, really do. I'm not sure about the kernel-error, but if the unexpected quitting is anything like previous issues I've come across, their source code habitually calls exit(), which kills the UI listener since they share the same process (I experimented once with forking the FFI calls, but that's a no-go on Windows, so). If you -run=listener to test, you might be able to see if a message gets printed by Graphviz to stderr. Maybe that'll give us more info? (If it's further similar to other problems I've had with Graphviz, the error message will be a single line buried in some undocumented corner of some messy source code that hasn't been discussed anywhere that's indexed by Google. Joy. I hope for Graphviz's sake that I'm just really incompetent at reading C code.) Thanks for testing, --Alex Vondrak -- BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA Learn about the latest advances in developing for the BlackBerryreg; mobile platform with sessions, labs more. See new tools and technologies. Register for BlackBerryreg; DevCon today! http://p.sf.net/sfu/rim-devcon-copy1 ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA Learn about the latest advances in developing for the BlackBerryreg; mobile platform with sessions, labs more. See new tools and technologies. Register for BlackBerryreg; DevCon today! http://p.sf.net/sfu/rim-devcon-copy1 ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Cannot Run Emacs23 from Factor
Does this command work in a shell? $ emacsclient --no-wait +5 /home/hokan/stwork/DuDang/DuDang.factor On Oct 1, 2011, at 5:13 AM, Steve Tsai 蔡福安tsa...@familysearch.org wrote: When I tried to jump to definitions from the listener, I got following error message: Process exited with error code 1 Launch descriptor: T{ process { command { emacsclient --no-wait +5 /home/hokan/stwork/DuDang/DuDang.factor } } { environment H{ } } { environment-mode +append-environment+ } { status 1 } OS: Ubuntu 10.04 Editor: Emacs23 Can anyone guide me to solve this problem? NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. -- All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2dcopy2 ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2dcopy2___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Cannot Run Emacs23 from Factor
I suppose you could add that to your .emacs file. Alternatively, feel free to change the command line that is used to launch emacs in editors.emacs for your own use. 2011/10/2 Steve Tsai 蔡福安 tsa...@familysearch.org John, Following are the messages I got when I ran the command in a shall: ** ** hokan@ubuntu:~$ emacsclient --no-wait +5 /home/hokan/stwork/DuDang/DuDang.factoremacsclient: can't find socket; have you started the server? To start the server in Emacs, type M-x server-start. emacsclient: No socket or alternate editor. Please use: ** ** --socket-name --server-file (or environment variable EMACS_SERVER_FILE) --alternate-editor (or environment variable ALTERNATE_EDITOR) -- If I run Emacs and type M-x server-start beforehand, then I can jump to the definition successfully. But I don’t like the additional steps. NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. -- All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2dcopy2 ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2dcopy2___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Using combinators as a substitute for loops
Hi Michael, You might also be interested in some of the words in sequences which handle this particular use-case. For example, see find, find-from, and find-last. ( scratchpad ) { bread eggs milk } [ eggs = ] find --- Data stack: 1 eggs If you're curious how it is implemented, you can type: \ find see and then click on different parts of the word definition to see its implementation. Best, John. On Sun, Oct 9, 2011 at 6:06 AM, Michael Clagett mclag...@hotmail.comwrote: Hi --- Finally getting around to developing my first serious Factor code and I have a quick question. I'm a Forth programmer (although of late it has been mostly my own bastardized version of Forth). I'm thinking of one immediate use of Combinators as a way of eliminating some of the unsightly procedural code that lives in the kind of Forth function I would write inside of, say, a Begin While Repeat loop. But if what I would have wanted to do with my loop is loop through every item in a collection of some sort until some condition was true and at that point exit the loop early, is there a way to do this using Combinators? Are there versions of the primary ones that will operate on the target sequence only until a condition is reached? I will of course peruse the documentation, but I thought I would just ask in case someone could steer me there more quickly (and in case some other newbie has the same question). Thanks much. Mike -- All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2dcopy2 ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2dcopy2___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Finding words with given stack effect
Well, you could do this: ( scratchpad ) all-words [ stack-effect (( x p q -- )) effect= ] filter But, it only checks for arity (meaning it would match an effect (( a b c -- )) also). If you want to check the stack names in the effect, you can do this: : my-effect= ( effect1 effect2 -- ? ) { [ effect= ] [ [ in ] bi@ = ] [ [ out ] bi@ = ] } 2 ; ( scratchpad ) all-words [ stack-effect (( x p q -- ) my-effect= ] filter . { bi } On Thu, Nov 10, 2011 at 9:03 AM, missingfaktor rahul.phulore@gmail.comwrote: 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' and other words with that effect. -- Cheers, missingfaktor http://twitter.com/#!/missingfaktor. When you stand for what you believe in, you can change the world. -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Where can I get this Factor Listener?
What about it is less convenient? IIRC, one of the main motivations for the change was to show what the stack looks like between computations, rather than just the current values. On Sat, Nov 19, 2011 at 5:16 AM, missingfaktor rahul.phulore@gmail.comwrote: Where can I get the Factor Listener used in this video: http://www.youtube.com/watch?v=f_0QlhYlS8g? The one I downloaded from the project site is different and less convenient to use. -- Cheers, missingfaktor http://twitter.com/#!/missingfaktor. When you stand for what you believe in, you can change the world. -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] group-by word
You might also be interested in this blog post, which walks through how to build a group-by word: http://re-factor.blogspot.com/2011/04/group-by.html On Sat, Nov 19, 2011 at 10:19 AM, Joe Groff arc...@gmail.com wrote: You can look at math.statistics:collect-by as a reference: USE: math.statistics { hello hola ball scala java factor python } [ length ] collect-by -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] ternary-search-tries confusion
I updated re-factor to work with the latest Factor which changes stack effect declarations to be single parentheses. If you want it to work with your version, change accessors.maybe from ( object quot: ( -- x ) -- value ) to (( object quot: ( -- x ) -- value )). Best, John. On Sunday, December 11, 2011 at 12:13 AM, CW Alston wrote: Greetings, Factorials - I've been working through mrjbq7's re-factor utilities, particularly a pet interest of mine, ternary search trees. Thrilled to see an implementation in Factor, but I can't get the code to compile. Here's the error I get with USE: ternary-search-trees in the listener: resource:work/ternary-search-trees/ternary-search-trees.factor 9: 12: ^ The word define-maybe cannot be executed because it failed to compile The input quotations to “if” don't match their expected effects InputExpected Got [ ~quotation~ ~quotation~ make define-inline ] (( ..a -- ..b )) (( x x -- )) [ 2drop ](( ..a -- ..b )) (( x -- )) 'define-maybe' is in the required file, accessors.maybe -- I planted all code in the 'work' directory of factor. The untouched code there reads: - USING: accessors arrays kernel make quotations sequences slots words ; IN: accessors.maybe : maybe-word ( name -- word ) maybe- prepend accessors create ; : define-maybe ( name -- ) dup maybe-word dup deferred? [ [ over setter-word \ drop 2array quotation [ keep ] curry , \ compose , swap reader-word [ dup ] swap 1quotation compose [ [ nip ] ] compose , \ dip , \ if* , ] [ ] make ( object quot: ( -- x ) -- value ) define-inline ] [ 2drop ] if ; : define-maybe-accessors ( class -- ) slots word-prop [ dup read-only [ drop ] [ name define-maybe ] if ] each ; - I just can't untangle the stack effects in 'define-maybe' to see where the stack is disrupted. Any insights from folks better initiated? Note that: --- 9: 12: ^ --- in the error output (lines 9-12) points to: --- TUPLE: tree-node ch value exists lt eq gt ; tree-node define-maybe-accessors --- in file 'ternary-search-trees.factor' . Thanks, all, and keep up the good work, CW Alston -- ~ Memento Amori -- Learn Windows Azure Live! Tuesday, Dec 13, 2011 Microsoft is holding a special Learn Windows Azure training event for developers. It will provide a great way to learn Windows Azure and what it provides. You can attend the event by watching it streamed LIVE online. Learn more at http://p.sf.net/sfu/ms-windowsazure ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net (mailto:Factor-talk@lists.sourceforge.net) https://lists.sourceforge.net/lists/listinfo/factor-talk -- Learn Windows Azure Live! Tuesday, Dec 13, 2011 Microsoft is holding a special Learn Windows Azure training event for developers. It will provide a great way to learn Windows Azure and what it provides. You can attend the event by watching it streamed LIVE online. Learn more at http://p.sf.net/sfu/ms-windowsazure___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Factor for Dummies
Also, you might find the First Program example interesting (its available in your Help browser, and also on the online documentation web site): http://docs.factorcode.org/content/article-first-program.html On Saturday, February 18, 2012 at 8:27 AM, Marshall Lochbaum wrote: In terms of tools to use, the listener is for interactive evaluation. Since Factor programs are often short enough to fit on a few lines, you can type them into the listener and see what they do. Programming in a concatenative language is very different. You certainly don't want to think in terms of variables and assignment. Instead, think about the intermediate results you want, and how to put them onto the stack. In this case, the relevant result is the sum of the list, but you also need to keep the original list around. After you have those two, you divide. Using the math.vectors command v/n (vector divided by scalar), we get { 1 2 3 } ! the list dup! make a copy of the list length ! get the length of the copy v/n ! divide the two Words like dup are only suitable for very simple tasks since they are confusing when used excessively. Instead, the combinators cleave, spread, apply and their derivatives like bi, bi*, tri@, etc. should be used. The listener prints the stack effect of each command at the bottom, so if you forget which one is which, you can type them in and see. In this case the program becomes { 1 2 3 } [ ] [ length ] bi v/n . Marshall On Sat, Feb 18, 2012 at 3:52 AM, Вадим Тукаев vadim_tuk...@bk.ru (mailto:vadim_tuk...@bk.ru) wrote: Please help me to begin programming. I can't do even one step. I have no experience in concatenative programming. I now read the book by Brodie, but I understand it badly. And that little bits of information, that I understand, I can not translate in the Factor. Please give me (and other newbies) simple manual. How to write first program step by step. Some questions: 1. What is best win-editor for Factor? Oh no, not Emacs! I mean something like Programmer's Notepad. 2. What is Listener? It can be used as the editor? I open Listener, Browser, Errors... 3. I need some simple program. For example, calculation of a percentage parity of numbers. Input data: 1, 2, 3. Output data must be 0.167, 0.333, 0.5. How to create such program? I don't ask, that you have solved this problem for me. Show, how it is necessary to argue. My brain slip. -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net (mailto:Factor-talk@lists.sourceforge.net) https://lists.sourceforge.net/lists/listinfo/factor-talk -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net (mailto:Factor-talk@lists.sourceforge.net) https://lists.sourceforge.net/lists/listinfo/factor-talk -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] What's with the moderation queue?
Hi Tim, I don't have access to the moderation queue, but if you resend (since it appears your emails are now getting through), we can help now? On Feb 19, 2012, at 6:28 PM, Tim Allen screwt...@froup.com wrote: A while ago I sent a message to the list, except it turns out that I'd subscribed to the list from a different email address than I currently use as my default, and messages from non-subscribed addresses get held for moderation. I immediately unsubscribed with my old address and resubscribed with my new address, but that obviously wasn't enough to unblock my message stuck in the moderation queue. I figured in a few days the list moderator would get around to cleaning out the queue, and my question would get an answer, but it's been a couple of weeks now, and I haven't heard anything. Perhaps somebody out there with moderator permissions could give the queue a nudge? -- Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2 ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2 ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Learning Factor - string, array and io handling - beginner
I am unsure how to check for an empty string and skip it if it is empty. empty? I have been unsuccessful in getting it to write to a single file in an append mode, or to create a sequence of files as it goest through 'each' 'with-directory-files'. /tmp/foo ascii [ hello world print ] with-file-appender The people who have entered the data mixed mm/dd/ with dd/mm/ in the original Excel sheets that I created my CSV sheets from. Of course it is easy to check for numbers 12, but dates like 10/10/2010 are problematic. I had to use file-lines vs. filecsv to bring in the data, or else I could not get my regexp working on the CSV from filecsv. The csv vocab makes sequences of strings. The regexp vocab only works on strings. IN: scratchpad a,b,c stringcsv . { { a b c } } You might want to look into words like find, find-from, or other sequence operations if you want regexp like searching or matching. Not really an issue, but are there any cominators or other commands that could consolidate all of the 'swap drop swap' commands I have resorted to using. Or 'first second' commands? I wish there was more Factor code out there on the web to learn from... Well, swap drop swap is nip swap. But often when you are using stack shuffling words, you are not taking advantage of higher level words or combinators. Try reading: IN: scratchpad combinators help Also, you might find this blog post I wrote on refactoring a word that has ugly stack shuffling to be useful: http://re-factor.blogspot.com/2010/05/evenly-partition-integer.html resource:work/thodw/data [ [ utf8 file-lines [ R/ Date|Ticket|\Show Time:\/ re-contains? ] filter dup 0 swap nth stringcsv first second 10 cut swap , append swap drop swap dup 1 swap nth stringcsv first second 5 cut swap , append swap drop swap 2 swap nth stringcsv dup first second , append swap first 4 swap nth 3append append print #! utf8 csvfile ] each ] with-directory-files You might find something like this makes it cleaner: utf8 file-lines [ regexp ] filter { 0 1 2 } swap nths [ stringcsv ] map Also, if you are appending and then printing, you can just write the strings as they happen, or try looking into the make vocabulary: [ Hello % CHAR: \s , World % ] make . Best, John. -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] format-float and locale decimal point
Perhaps another approach would be to add a check in fix-float for a , similar to the current . check? On Sun, May 20, 2012 at 8:24 AM, Jon Harper jon.harpe...@gmail.com wrote: Hi list, using a french locale (fr_FR.UTF-8) breaks printing of floats: IN: scratchpad 3.5 . 3,5.0 This is because the decimal point in french is ,, so the output of (format-float) is 3,5 and fix-float explicitly checks for . The locale is forced by gtk to the environnement variables. However, the old X11 backend also forced the locale (in basis/x11/x11.factor) so this is should not be new with the gtk backend.. So I guess the best solution is to force LC_NUMERIC to a locale that has a . as the numeric separator right after gtk_init (for example set_locale LC_NUMERIC C). Here's a patch that does that: http://paste.factorcode.org/paste?id=2595 Please feel free to modify/improve the patch... Jon -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] format-float and locale decimal point
Good points. Btw, your patch is linux specific for those constants, on OS X, locale.h has this: #define LC_ALL 0 #define LC_COLLATE 1 #define LC_CTYPE2 #define LC_MONETARY 3 #define LC_NUMERIC 4 #define LC_TIME 5 #define LC_MESSAGES 6 #define _LC_LAST7 /* marks end */ On Mon, May 21, 2012 at 9:13 AM, Jon Harper jon.harpe...@gmail.com wrote: Only allowing . seems a lot simpler. If we use the locale dependant decimal point when we print numbers, what should we do when parsing numbers ? If the parser also uses the locale decimal point, then source code compiles differently depending on the locale. If the parser doesn't use the locale decimal point, then numberstring stringnumber isnt identity anymore. The solution would be to have 2 different words to parse number in canonical source code form and numbers in locale dependant form. Also, the parser currently hardcodes , as thousands separtor, but it's also locale dependant... Jon On Mon, May 21, 2012 at 5:31 PM, John Benediktsson mrj...@gmail.com wrote: Perhaps another approach would be to add a check in fix-float for a , similar to the current . check? On Sun, May 20, 2012 at 8:24 AM, Jon Harper jon.harpe...@gmail.com wrote: Hi list, using a french locale (fr_FR.UTF-8) breaks printing of floats: IN: scratchpad 3.5 . 3,5.0 This is because the decimal point in french is ,, so the output of (format-float) is 3,5 and fix-float explicitly checks for . The locale is forced by gtk to the environnement variables. However, the old X11 backend also forced the locale (in basis/x11/x11.factor) so this is should not be new with the gtk backend.. So I guess the best solution is to force LC_NUMERIC to a locale that has a . as the numeric separator right after gtk_init (for example set_locale LC_NUMERIC C). Here's a patch that does that: http://paste.factorcode.org/paste?id=2595 Please feel free to modify/improve the patch... Jon -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] sqlite on linux
Where is the open-db word defined? Are you doing something like: USE: db.sqlite /path/to/db sqlite-db Do you have the right 32- or 64-bit library installed to match your machine and Factor? On Mon, Jun 18, 2012 at 2:16 PM, Grisha Freilikhman grish...@gmail.comwrote: Hi, I have a linux machine with sqlite3 installed on it. However factor dosn't want to run open-db word. Is there any special things I should do make it work? Thanks. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Would anyone like to review a program by a beginner?
Welcome! I would be glad if someone could look at the source and tell me what beginner mistakes I made. https://github.com/tohava/cpuguard/blob/master/cpuguard.factor You might find your code looks nicer if you use wrap text at 72-80 character lines, for long words you can put the contents of the word on the line following its stack effect. This is a convention that the factor codebase uses generally. Some feedback: 1) Since objects that are not f are considered true, you don't need to use boolean in your numeric? word. 2) In tokens, the code ``[ = not ] filter`` is pretty much the same as harvest. 3) In the stack effect for if*-empty, you might use true and false for the quotation names instead of quott and quotf (or perhaps true-quot, false-quot). 4) Generally, the factor convention prefers dashes to underscores (e.g., pid-file instead of pid_file). 5) In limits_with_pids, you can use sift instead of ``[ ] filter``. 6) Sometimes there are simpler stack shuffling you can do, instead of this: [ arr1 ] [ arr2 ] bi pick swap [ nth ] 2bi@ You might try this: [ arr1 over ] [ arr2 ] bi [ nth ] 2bi@ Or even this: [ arr1 nth ] [ arr2 nth ] bi-curry bi 7) You can use the private namespace to keep words that you are only used by your vocabulary and not anticipated to be used by anyone else. Surround the words that are private with PRIVATE and PRIVATE. See this for more information: http://docs.factorcode.org/content/article-word-search-private.html 8) Using fry and some combinators can simplify words, for example: : update_arr2 ( arr2 pids -- ) [ dup pid_and_total_time swap stringnumber pick set-nth ] each drop ; Could become this: : update-arr2 ( arr2 pids -- ) '[ [ pid-and-total-time ] [ stringnumber ] bi _ set-nth ] each ; Alternatively, if you keep pids as a sequence of numbers instead of strings, it's even simpler: : update-arr2 ( arr2 pids -- ) '[ [ pid-and-total-time ] keep _ set-nth ] each ; p.s. where is there info about how to run this program as an executable instead of from the factor IDE You should read through these pages: http://docs.factorcode.org/content/article-tools.deploy.html If this is the first time you are deploying a vocabulary as a binary, you can choose deploy options using: cpuguard deploy-tool Alternatively, you can just do cpuguard deploy which uses either defaults or your previously saved deploy settings. Best, John. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Stack Depth
I want to divide an integer by 2 until it gets to 1. I have this snippet of code that goes into a loop. dup 1 [ dup 2 /i ] [ ] if When it gets to 1 I want to push the elements into a sequence. Take a look at the produce word: : divide-until-2 ( n -- seq ) [ dup 1 ] [ 2 /i dup ] produce nip ; -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Stack Depth
If you are concerned about performance (suffix makes a new array each time), then you can use vectors and push onto them, or use the make vocabulary which provides some convenience mechanisms for that. Or look into collector-for which the produce word uses... On Tue, Jun 19, 2012 at 8:09 PM, Marshall Lochbaum mwlochb...@gmail.comwrote: I figured there would be a word designed for that already... Here's my take on this anyway. I would append the items to a sequence as the algorithm goes along: { } swap [ dup 1 ] [ dup 2 /i [ suffix ] dip ] while suffix accomplishes the task. Marshall On Tue, Jun 19, 2012 at 10:50 PM, Graham Telfer gakouse...@hotmail.comwrote: Doug Coleman doug.coleman@... writes: In general, you shouldn't want to do this, as all Factor words (besides the one I'm about to show you) need a fixed number of parameters at compile-time. Macros expand at compile-time, so that's one way to get around the restriction. The other way it to use a slow word called with-datastack: { 1 2 } [ + ] with-datastack You can also use smart combinators: [ 2 1 - 3 ] sum-outputs This works because the quotation infers at compile-time, and sum-outputs is a smart combinator that expands based on the number of outputs inferred. You are trying to do a C varargs function, basically, and just as in C, most Factor words are not varags. If you have more details about what you want to program, we could help you! Doug Hi Doug, I want to divide an integer by 2 until it gets to 1. I have this snippet of code that goes into a loop. dup 1 [ dup 2 /i ] [ ] if When it gets to 1 I want to push the elements into a sequence. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Global Value Numbering
This is great work! I'm looking forward to having it merged! There are perhaps some other nice places to contribute in the compiler afterwards, too! Thanks, John. On Tue, Aug 7, 2012 at 9:16 AM, Alexander J. Vondrak ajvond...@csupomona.edu wrote: Thank you very much! As a minor update: I ported the old units tests to work with the new gvn code. There are a few possible regressions concerning SIMD instructions, which I hope will explain the failing math.vectors.simd tests. My next move is to fix those regressions (or decide if they unit test itself needs to change), then add some new unit tests to exercise the global part of the value numbering algorithm. Regards, --Alex Vondrak From: Eduardo Cavazos [wayo.cava...@gmail.com] Sent: Sunday, August 05, 2012 10:16 AM To: factor-talk@lists.sourceforge.net Subject: Re: [Factor-talk] Global Value Numbering Alex, Very impressive thesis. Congratulations! Ed -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] changing help browser font size
If you look in help.stylesheet, there are styles used for various parts of the help system. You can see font-family and font-sizes that are used. Thanks, that works great. Btw, if you update, Cmd: +/- work to increase or decrease font size (it uses the Alt key on Windows/Linux) in the browser. It would be great to get this working for the listener as well, and other windows, but its a bit more work... -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Any way of making sense of what's in the boot image?
You might also find it useful to try the Walker which allows you to step through Factor code: http://docs.factorcode.org/content/article-ui-walker.html On Fri, Aug 10, 2012 at 10:29 AM, Michael Clagett mclag...@hotmail.comwrote: Not a problem any more. WinDbg does the trick just fine. It was just Visual Studio. -- From: mclag...@hotmail.com To: factor-talk@lists.sourceforge.net Date: Fri, 10 Aug 2012 11:51:00 + Subject: Re: [Factor-talk] Any way of making sense of what's in the boot image? P.S. Incidentally, while I am on the subject, I find myself able to trace through the VM startup code in Visual Studio with no problem at all, until I get to the factor_vm::c_to_factor, which wraps a c-to-factor sub-primitive inside of a callback stub and then invokes that function. On both a Windows 7 platform and a Windows Server 2008 platform, my Visual Studio blows up when the callback address loaded into EDX is called. Anybody ever encountered this and any idea how to get around it? Factor code doesn't follow the C calling convention so it's unlikely that a debugger will be able to walk a stack with Factor frames. In recent versions of Factor you can trigger Factor's own low-level debugger with ^C, which will let you backtrace and step through Factor frames. -Joe If I'm understanding this correctly, you are suggesting that if I'm in the Factor development environment, I can drop into Factor's own low-level debugger. But what do people do (you language maintainer, for example) when you need to debug the startup code that builds an image that needs to be in place for the development environment even to be launched? Am I correctly understanding you, that I can't use a Windows debugger to step through the init sequence, but don't have Factor's debugger available yet either? Or am I missing something? Any insights would be greatly appreciated. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Any way of making sense of what's in the boot image?
Typically the architecture is a combination of os and arch: IN: scratchpad my-arch . unix-x86.64 You can use the my-arch word to make an image for your architecture: IN: scratchpad my-arch make-image On Fri, Aug 10, 2012 at 1:56 PM, Michael Clagett mclag...@hotmail.comwrote: Hi -- I've been trying to run the make-image word from the Listener and got as far as this trace: IN: scratchpad Command: restart 1: Note: Added bootstrap.image vocabulary to search path x86.32 make-image Loading resource:/core/bootstrap/stage1.factor Bootstrap stage 1... Loading vocab:bootstrap/primitives.factor Creating primitives and basic runtime structures... Loading vocab:bootstrap/syntax.factor From Traceback: Data Stack: [ ~quotation~ with-compilation-unit ] Bad architecture: x86.32 Call Stack: (U) Quotation: [ set-namestack init-catchstack self quot call - stop ] (O) Word: listener-thread (O) Word: listener (O) Word: (listener) (U) Quotation: [ [ ~quotation~ dip swap ~quotation~ dip ] dip swap [ call datastack ] dip - swap [ set-datastack ] dip ] (U) Quotation: [ call - datastack ] (O) Word: make-image (U) Quotation: [ Bootstrap stage 1... print flush vocab:bootstrap/primitives.factor run-file - load-help? off { resource:core } vocab-roots set [ ~quotation~ % math.integers require math.floats require memory require io.streams.c require vocabs.loader require syntax require bootstrap.layouts require ~quotation~ % ] [ ] make bootstrap-startup-quot set ] (U) Quotation: [ Creating primitives and basic runtime structures... print flush H{ } clone sub-primitives set vocab:bootstrap/syntax.factor parse-file architecture get { ~array~ ~array~ ~array~ ~array~ ~array~ ~array~ } ?at [ Bad architecture: prepend throw ] unless - vocab:cpu/ /bootstrap.factor surround parse-file vocab:bootstrap/layouts/layouts.factor parse-file syntax lookup-vocab vocab-words bootstrap-syntax set H{ } clone dictionary set H{ } clone root-cache set H{ } clone source-files set H{ } clone update-map set H{ } clone implementors-map set init-caches bootstrapping? on ( -- ) call-effect ( -- ) call-effect accessors create-vocab drop num-types get f array builtins set [ ( -- ) call-effect ~array~ ~quotation~ each fixnum math create register-builtin bignum math create register-builtin tuple kernel create register-builtin float math create register-builtin f syntax lookup-word register-builtin array arrays create register-builtin wrapper kernel create register-builtin callstack kernel create register-builtin string strings create register-builtin quotation quotations create register-builtin dll alien create register-builtin alien alien create register-builtin word words create register-builtin byte-array byte-arrays create register-builtin f syntax lookup-word ~array~ define-builtin f syntax create ~quotation~ predicate set-word-prop f? syntax vocab-words delete-at t syntax lookup-word define-singleton-class c-ptr alien create ~quotation~ ~array~ make define-union-class array-capacity sequences.private create fixnum math lookup-word ~quotation~ ~quotation~ make define-predicate-class array-capacity sequences.private lookup-word ~195 more~ ] with-compilation-unit ] (O) Method: M\ object throw (U) Quotation: [ OBJ-CURRENT-THREAD special-object error-thread set-global current-continuation *-* error-continuation set-global [ original-error set-global ] [ rethrow ] bi ] Anyone have any ideas? -- From: mclag...@hotmail.com To: factor-talk@lists.sourceforge.net Date: Fri, 10 Aug 2012 17:50:12 + Subject: Re: [Factor-talk] Any way of making sense of what's in the boot image? Thanks for the reference. I assume that will be helpful once I get past stepping through the bootstrapping code and am in the Listener environment. -- From: mrj...@gmail.com Date: Fri, 10 Aug 2012 10:40:28 -0700 To: factor-talk@lists.sourceforge.net Subject: Re: [Factor-talk] Any way of making sense of what's in the boot image? You might also find it useful to try the Walker which allows you to step through Factor code: http://docs.factorcode.org/content/article-ui-walker.html On Fri, Aug 10, 2012 at 10:29 AM, Michael Clagett mclag...@hotmail.comwrote: Not a problem any more. WinDbg does the trick just fine. It was just Visual Studio. -- From: mclag...@hotmail.com To: factor-talk@lists.sourceforge.net Date: Fri, 10 Aug 2012 11:51:00 + Subject: Re: [Factor-talk] Any way of making sense of what's in the
Re: [Factor-talk] Any way of making sense of what's in the boot image?
Write my-arch make-image in listener. Then type Ctrl-W to walk it. Step across my-arch Into into make-image Rinse, repeat. :) On Fri, Aug 10, 2012 at 2:08 PM, Michael Clagett mclag...@hotmail.comwrote: Quick question, if you're still on the horn. How do I trace into myarch make-image from the Listener. If I hit enter it just executes. I'm sure there must be any easy way to step into it, which I'm sure I can find by searching the documentation. But perhaps you could save me five minutes. -- From: mrj...@gmail.com Date: Fri, 10 Aug 2012 14:01:58 -0700 To: factor-talk@lists.sourceforge.net Subject: Re: [Factor-talk] Any way of making sense of what's in the boot image? Typically the architecture is a combination of os and arch: IN: scratchpad my-arch . unix-x86.64 You can use the my-arch word to make an image for your architecture: IN: scratchpad my-arch make-image On Fri, Aug 10, 2012 at 1:56 PM, Michael Clagett mclag...@hotmail.comwrote: Hi -- I've been trying to run the make-image word from the Listener and got as far as this trace: IN: scratchpad Command: restart 1: Note: Added bootstrap.image vocabulary to search path x86.32 make-image Loading resource:/core/bootstrap/stage1.factor Bootstrap stage 1... Loading vocab:bootstrap/primitives.factor Creating primitives and basic runtime structures... Loading vocab:bootstrap/syntax.factor From Traceback: Data Stack: [ ~quotation~ with-compilation-unit ] Bad architecture: x86.32 Call Stack: (U) Quotation: [ set-namestack init-catchstack self quot call - stop ] (O) Word: listener-thread (O) Word: listener (O) Word: (listener) (U) Quotation: [ [ ~quotation~ dip swap ~quotation~ dip ] dip swap [ call datastack ] dip - swap [ set-datastack ] dip ] (U) Quotation: [ call - datastack ] (O) Word: make-image (U) Quotation: [ Bootstrap stage 1... print flush vocab:bootstrap/primitives.factor run-file - load-help? off { resource:core } vocab-roots set [ ~quotation~ % math.integers require math.floats require memory require io.streams.c require vocabs.loader require syntax require bootstrap.layouts require ~quotation~ % ] [ ] make bootstrap-startup-quot set ] (U) Quotation: [ Creating primitives and basic runtime structures... print flush H{ } clone sub-primitives set vocab:bootstrap/syntax.factor parse-file architecture get { ~array~ ~array~ ~array~ ~array~ ~array~ ~array~ } ?at [ Bad architecture: prepend throw ] unless - vocab:cpu/ /bootstrap.factor surround parse-file vocab:bootstrap/layouts/layouts.factor parse-file syntax lookup-vocab vocab-words bootstrap-syntax set H{ } clone dictionary set H{ } clone root-cache set H{ } clone source-files set H{ } clone update-map set H{ } clone implementors-map set init-caches bootstrapping? on ( -- ) call-effect ( -- ) call-effect accessors create-vocab drop num-types get f array builtins set [ ( -- ) call-effect ~array~ ~quotation~ each fixnum math create register-builtin bignum math create register-builtin tuple kernel create register-builtin float math create register-builtin f syntax lookup-word register-builtin array arrays create register-builtin wrapper kernel create register-builtin callstack kernel create register-builtin string strings create register-builtin quotation quotations create register-builtin dll alien create register-builtin alien alien create register-builtin word words create register-builtin byte-array byte-arrays create register-builtin f syntax lookup-word ~array~ define-builtin f syntax create ~quotation~ predicate set-word-prop f? syntax vocab-words delete-at t syntax lookup-word define-singleton-class c-ptr alien create ~quotation~ ~array~ make define-union-class array-capacity sequences.private create fixnum math lookup-word ~quotation~ ~quotation~ make define-predicate-class array-capacity sequences.private lookup-word ~195 more~ ] with-compilation-unit ] (O) Method: M\ object throw (U) Quotation: [ OBJ-CURRENT-THREAD special-object error-thread set-global current-continuation *-* error-continuation set-global [ original-error set-global ] [ rethrow ] bi ] Anyone have any ideas? -- From: mclag...@hotmail.com To: factor-talk@lists.sourceforge.net Date: Fri, 10 Aug 2012 17:50:12 + Subject: Re: [Factor-talk] Any way of making sense of what's in the boot image? Thanks for the reference. I assume that will be helpful once I get past stepping through the bootstrapping code and am in the Listener environment.
Re: [Factor-talk] Any way of making sense of what's in the boot image?
Thanks much. This should keep me occupied and out of everyone's hair for a while. No worries, keep the questions coming! -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Any way of making sense of what's in the boot image?
Any documentation that you write as part of your investigation would be welcome contributions. On Tue, Aug 14, 2012 at 5:27 PM, Michael Clagett mclag...@hotmail.comwrote: One constructive criticism type comment, if you'll permit me. While what I say directly below is absolutely true, it's true on a micro level. At the broader level, the heavy use of (sometimes lengthy) quotations to feed workhorse words like define-sub-primitive make understanding what's going on quite difficult. Although I realize the bootstrapping mechanism is not a general area of interest to many, I think something on the order of about 25 well-placed comments prefacing some of the more extensive quotations would help improve readability tremendously, just in case someone needs to understand the internals of this mechanism. Just a thought, offered in a spirit of complete good will and overall general awe at the care and discipline that has gone into this work. -- From: mclag...@hotmail.com To: factor-talk@lists.sourceforge.net Subject: RE: [Factor-talk] Any way of making sense of what's in the boot image? Date: Tue, 14 Aug 2012 05:28:45 + Been looking at some of the x86 assembler code. Damn! All I can say is that I wish to hell I had had Factor when I wrote my own. Quite a bit different approach, but the clarity and succinctness is tantalizing. -- From: mclag...@hotmail.com To: factor-talk@lists.sourceforge.net Date: Mon, 13 Aug 2012 16:46:38 + Subject: Re: [Factor-talk] Any way of making sense of what's in the boot image? Thank you, Joe, for the quick response. It was actually the information in the such as clause of your last sentence that I was looking for. I don't mean for you to take the time out to document the meaning of these different constants, but if it is documented somewhere other than in the creators' heads, I would love to be directed to it. Not a big deal, because I'm sure that when I get to seeing them used in the boot-image initialization code, all will become clear. Still, it might help me better understand what's being done at the make-image level to know. Date: Mon, 13 Aug 2012 12:21:52 -0400 From: arc...@gmail.com To: factor-talk@lists.sourceforge.net Subject: Re: [Factor-talk] Any way of making sense of what's in the boot image? On Mon, Aug 13, 2012 at 11:52 AM, Michael Clagett mclag...@hotmail.com wrote: Here's an obscure question that is of interest to me in my current quest, but probably not to anyone else. So if there is a better forum for me to ask such things, I would love to be instructed; until I hear otherwise, however, I will continue to use this list. Is there any place where I can penetrate the meaning of the following constants: CONSTANT: rt-dlsym 0 CONSTANT: rt-entry-point 1 CONSTANT: rt-entry-point-pic 2 CONSTANT: rt-entry-point-pic-tail 3 CONSTANT: rt-here 4 CONSTANT: rt-this 5 CONSTANT: rt-literal 6 CONSTANT: rt-untagged 7 CONSTANT: rt-megamorphic-cache-hits 8 CONSTANT: rt-vm 9 CONSTANT: rt-cards-offset 10 CONSTANT: rt-decks-offset 11 CONSTANT: rt-exception-handler 12 CONSTANT: rt-dlsym-toc 13 CONSTANT: rt-inline-cache-miss 14 CONSTANT: rt-safepoint 15 So far I've only encountered rt-here and I've only seen it encoded into a relocation entry and not really used anywhere yet. But this strikes me as the kind of thing it would be useful to know as I am slogging through this stuff. Not a hugely pressing question, as I'm sure I'll muddle through it. But if anyone has a moment to illuminate, it would be nice. Those are relocation record types. When the compiler generates code for a word, it also needs to generate relocation entries every time it references another word in a jump or call statement, much like a native C compiler needs to do for symbols in other modules. The VM uses these relocation entries to update the operands of jump and call instructions when code is written to the code heap, when the code heap is compacted, or if code is moved in memory for any reason. The different rt-* constants are used to describe what kind of object a relocation refers to, such as a foreign function in a DLL (dlsym), a word entry point (entry-point-*), the current address (here), etc. -Joe -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net
Re: [Factor-talk] Any way of making sense of what's in the boot image?
If you want all numbers to print in hex, the easiest way is: ``` IN: scratchpad 16 number-base set-global ``` On Wed, Aug 15, 2012 at 4:04 AM, Michael Clagett mclag...@hotmail.comwrote: Quick question. Any way of having the data and retain stack panes of the Walker display values in hex? Date: Mon, 13 Aug 2012 12:21:52 -0400 From: arc...@gmail.com To: factor-talk@lists.sourceforge.net Subject: Re: [Factor-talk] Any way of making sense of what's in the boot image? On Mon, Aug 13, 2012 at 11:52 AM, Michael Clagett mclag...@hotmail.com wrote: Here's an obscure question that is of interest to me in my current quest, but probably not to anyone else. So if there is a better forum for me to ask such things, I would love to be instructed; until I hear otherwise, however, I will continue to use this list. Is there any place where I can penetrate the meaning of the following constants: CONSTANT: rt-dlsym 0 CONSTANT: rt-entry-point 1 CONSTANT: rt-entry-point-pic 2 CONSTANT: rt-entry-point-pic-tail 3 CONSTANT: rt-here 4 CONSTANT: rt-this 5 CONSTANT: rt-literal 6 CONSTANT: rt-untagged 7 CONSTANT: rt-megamorphic-cache-hits 8 CONSTANT: rt-vm 9 CONSTANT: rt-cards-offset 10 CONSTANT: rt-decks-offset 11 CONSTANT: rt-exception-handler 12 CONSTANT: rt-dlsym-toc 13 CONSTANT: rt-inline-cache-miss 14 CONSTANT: rt-safepoint 15 So far I've only encountered rt-here and I've only seen it encoded into a relocation entry and not really used anywhere yet. But this strikes me as the kind of thing it would be useful to know as I am slogging through this stuff. Not a hugely pressing question, as I'm sure I'll muddle through it. But if anyone has a moment to illuminate, it would be nice. Those are relocation record types. When the compiler generates code for a word, it also needs to generate relocation entries every time it references another word in a jump or call statement, much like a native C compiler needs to do for symbols in other modules. The VM uses these relocation entries to update the operands of jump and call instructions when code is written to the code heap, when the code heap is compacted, or if code is moved in memory for any reason. The different rt-* constants are used to describe what kind of object a relocation refers to, such as a foreign function in a DLL (dlsym), a word entry point (entry-point-*), the current address (here), etc. -Joe -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Any way of making sense of what's in the boot image?
there must be a way to set that up? Sent from my iPhone On Aug 15, 2012, at 11:01 AM, John Benediktsson mrj...@gmail.com wrote: If you want all numbers to print in hex, the easiest way is: ``` IN: scratchpad 16 number-base set-global ``` On Wed, Aug 15, 2012 at 4:04 AM, Michael Clagett mclag...@hotmail.com wrote: Quick question. Any way of having the data and retain stack panes of the Walker display values in hex? Date: Mon, 13 Aug 2012 12:21:52 -0400 From: arc...@gmail.com To: factor-talk@lists.sourceforge.net Subject: Re: [Factor-talk] Any way of making sense of what's in the boot image? On Mon, Aug 13, 2012 at 11:52 AM, Michael Clagett mclag...@hotmail.com wrote: Here's an obscure question that is of interest to me in my current quest, but probably not to anyone else. So if there is a better forum for me to ask such things, I would love to be instructed; until I hear otherwise, however, I will continue to use this list. Is there any place where I can penetrate the meaning of the following constants: CONSTANT: rt-dlsym 0 CONSTANT: rt-entry-point 1 CONSTANT: rt-entry-point-pic 2 CONSTANT: rt-entry-point-pic-tail 3 CONSTANT: rt-here 4 CONSTANT: rt-this 5 CONSTANT: rt-literal 6 CONSTANT: rt-untagged 7 CONSTANT: rt-megamorphic-cache-hits 8 CONSTANT: rt-vm 9 CONSTANT: rt-cards-offset 10 CONSTANT: rt-decks-offset 11 CONSTANT: rt-exception-handler 12 CONSTANT: rt-dlsym-toc 13 CONSTANT: rt-inline-cache-miss 14 CONSTANT: rt-safepoint 15 So far I've only encountered rt-here and I've only seen it encoded into a relocation entry and not really used anywhere yet. But this strikes me as the kind of thing it would be useful to know as I am slogging through this stuff. Not a hugely pressing question, as I'm sure I'll muddle through it. But if anyone has a moment to illuminate, it would be nice. Those are relocation record types. When the compiler generates code for a word, it also needs to generate relocation entries every time it references another word in a jump or call statement, much like a native C compiler needs to do for symbols in other modules. The VM uses these relocation entries to update the operands of jump and call instructions when code is written to the code heap, when the code heap is compacted, or if code is moved in memory for any reason. The different rt-* constants are used to describe what kind of object a relocation refers to, such as a foreign function in a DLL (dlsym), a word entry point (entry-point-*), the current address (here), etc. -Joe -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest
Re: [Factor-talk] Any way of making sense of what's in the boot image?
that appear occupy two adjacent array slots. But I'm completely mystified as to how the contents of the hash-table got mapped to the array slots they now occupy (there doesn't seem to be any rhyme or reason). And I have little insight into the code that accomplished this. Moreover I apparently can't see the 4th slot of the original object in the Inspector, as it only shows me three slots on the data stack trace, but organizes them alphabetically when I double-click to open the Inspector window. Don't know if any of this was intelligble. But maybe one of you compiler guys can give me a clue as to how I can understand this. I'm having to reverse engineer my understanding of all of this, so a break in the logical chain presents difficulties. Sorry for the long post. Regards, Mike Date: Wed, 15 Aug 2012 08:30:10 -0700 From: doug.cole...@gmail.com To: factor-talk@lists.sourceforge.net Subject: Re: [Factor-talk] Any way of making sense of what's in the boot image? 1) Factor loads a ~/.factor-rc file every time it starts. You can put things there: USE: tools.scaffold scaffold-factor-rc Click it, edit it and add: USING: prettyprint.config namespaces ; 16 number-base set-global 2) Alternately, there's a boot rc file that gets loaded after bootstrap: USE: tools.scaffold scaffold-factor-boot-rc Click it, edit it and add: USING: prettyprint.config namespaces ; 16 number-base set-global To load it without bootstrapping, call 'run-bootstrap-init' and then 'save' your image. Doug On Wed, Aug 15, 2012 at 8:22 AM, Michael Clagett mclag...@hotmail.com wrote: Thanks. I knew it had to be something like that. And if I want it to be the default every time I load the Listener, I'm sure there must be a way to set that up? Sent from my iPhone On Aug 15, 2012, at 11:01 AM, John Benediktsson mrj...@gmail.com wrote: If you want all numbers to print in hex, the easiest way is: ``` IN: scratchpad 16 number-base set-global ``` On Wed, Aug 15, 2012 at 4:04 AM, Michael Clagett mclag...@hotmail.com wrote: Quick question. Any way of having the data and retain stack panes of the Walker display values in hex? Date: Mon, 13 Aug 2012 12:21:52 -0400 From: arc...@gmail.com To: factor-talk@lists.sourceforge.net Subject: Re: [Factor-talk] Any way of making sense of what's in the boot image? On Mon, Aug 13, 2012 at 11:52 AM, Michael Clagett mclag...@hotmail.com wrote: Here's an obscure question that is of interest to me in my current quest, but probably not to anyone else. So if there is a better forum for me to ask such things, I would love to be instructed; until I hear otherwise, however, I will continue to use this list. Is there any place where I can penetrate the meaning of the following constants: CONSTANT: rt-dlsym 0 CONSTANT: rt-entry-point 1 CONSTANT: rt-entry-point-pic 2 CONSTANT: rt-entry-point-pic-tail 3 CONSTANT: rt-here 4 CONSTANT: rt-this 5 CONSTANT: rt-literal 6 CONSTANT: rt-untagged 7 CONSTANT: rt-megamorphic-cache-hits 8 CONSTANT: rt-vm 9 CONSTANT: rt-cards-offset 10 CONSTANT: rt-decks-offset 11 CONSTANT: rt-exception-handler 12 CONSTANT: rt-dlsym-toc 13 CONSTANT: rt-inline-cache-miss 14 CONSTANT: rt-safepoint 15 So far I've only encountered rt-here and I've only seen it encoded into a relocation entry and not really used anywhere yet. But this strikes me as the kind of thing it would be useful to know as I am slogging through this stuff. Not a hugely pressing question, as I'm sure I'll muddle through it. But if anyone has a moment to illuminate, it would be nice. Those are relocation record types. When the compiler generates code for a word, it also needs to generate relocation entries every time it references another word in a jump or call statement, much like a native C compiler needs to do for symbols in other modules. The VM uses these relocation entries to update the operands of jump and call instructions when code is written to the code heap, when the code heap is compacted, or if code is moved in memory for any reason. The different rt-* constants are used to describe what kind of object a relocation refers to, such as a foreign function in a DLL (dlsym), a word entry point (entry-point-*), the current address (here), etc. -Joe -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest
Re: [Factor-talk] Any way of making sense of what's in the boot image?
So then, John, does that mean that in the [ 4 slot { array} declare ], that I'm getting the slot named array which is at offset 4 (and then declaring that to be an array, so as to disable some of the type safety checks)? Yes, the hashtable code is written at a bit lower level and thus maybe a little harder to read than one might normally write in Factor since it is one of the building blocks that everything is built upon. It is also possible that some of the compiler optimizations that have been written in the last couple of years make some of those declarations unnecessary, although I'd have to look into it more to know for sure. Also, due to the bootstrapping mechanism, some of the higher level language constructs like locals and fry quotations are not available yet. That is something we hope to fix at some future point. Here it says slot takes two incoming values: an obj and a non-negative fixnum, which is the nth slot. In the hashtable slot-specs you list below there are only three slots listed, but it does say that the slot named array is at offset 4. Is it this offset number that is being specified by the m parameter? And thus is the array I am seeing in my original description the contents of the array slot of the hashtable that was originally on the stack? That makes sense to me. And the fact that the array is 128 slots long (allowing flattened representation of 64 key-value pairs) just means that the underlying array in the hashtable has 64 buckets. Is this a correct interpretation. If it is, it makes sense that the actual 26 values stored in the hash table would be dispersed throught the 64 buckets, because this is what a hashtable does. Yes, exactly! The slot-spec tuple provides a generic description of what is to be found in this case at offset 4. Best, John. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
[Factor-talk] Factor 0.95 now available
The reports of my death are greatly exaggerated - Mark Twain I'm very pleased to announce the release of Factor 0.95! You can find download links on the Factor website: http://factorcode.org This release is brought to you with over 2,500 commits by the following individuals: Alex Vondrak, Alfredo Beaumont, Andrew Pennebaker, Anton Gorenko, Brennan Cheung, Chris Double, Daniel Ehrenberg, Doug Coleman, Eric Charlebois, Eungju Park, Hugo Schmitt, Joe Groff, John Benediktsson, Jon Harper, Keita Haga, Maximilian Lupke, Philip Searle, Philipp Brüschweiler, Rupert Swarbrick, Sascha Matzke, Slava Pestov, @8byte-jose, @yac, @otoburb, @rien In addition to lots (and lots!) of bug fixes and improvements, I want to highlight the following features: * GTK-based UI backend * Native image loaders using Cocoa, GTK, and GDI+ * Sampling profiler replacing counting profiler * Code coverage tool to improve unit tests * VM and application-level signal handlers * ICMP support and an IPv4 ping implementation * DNS client and host implementation * Support frexp and log of really big numbers * Cross-platform open URL in webbrowser * Cross-platform send file to trash * Speedup bignum GCD and ratio operations * Speedup in thread yield performance on Mac OS X * CSV library is 3x faster * XML library is 2x faster * JSON library is 2-3x faster * Many documentation improvements * Many stability and performance enhancements Some possible backwards compatibility issues: * Change alien references from int to int ref and *int to int deref * Removed Windows CE, BSD, and Solaris platform support * Natively support binary (0b), octal (0o), and hexadecimal (0x) number syntax * Unify ( -- ) and (( -- )) stack effect syntax * Change prepend to return type of first sequence to match append behavior * Change .factor-rc to be .factor-rc on all platforms * Cleanup specialized array syntax to be more generic and consistent * Change to quadratic probing instead of linear probing in hashtables * Allow dispatching on anonymous intersections/unions For more details, please see the full announcement at: http://re-factor.blogspot.com/2012/08/factor-095-now-available.html -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Factor 0.95 now available
The contents of the Factor folder built from git sports the following items not appearing in the .95 binary Factor folder: -files: boot.unix-x86.32.image, factor.image.fresh, GNUmakeile, Nmakefile; These are: 1) boot image downloaded to create a complete factor image file for your platform (32-bit unix). 2) copy of the factor.image file to allow reverting if you want to have a clean environment 3) make file to build on unix platforms 4) make file to build on windows -folders: build-support, unmaintained, vm 5) a directory with build it, scotty files for all platforms. 6) a directory with not working but maybe in the future code 7) a directory with C++ code for the VM that produces the ./factor binary I don't know if they are necessary, so I'm not gonna touch them while I check my .94 project code compatibility. Any thoughts on the differences? I'll keep you posted, if anything unrecoverable pops up. Thanks so much to all for your work. Onward! Glad it works for you, these files are not released in the binary releases but all contain or are related to the source build process. Best! John. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Factor 0.95 now available
Gracias, John - De nada ;) Comforting to know what's up. Any ideas on what prevents the .95 binary from launching on my aged machine? First time I've encountered this problem. I've successfully launched from incremental development releases through July. Likely related to upgrading to Mac OS X 10.8 and XCode 4.4 on the build farm. It wasn't intentional, but we're trying to figure out if we can make XCode 4.4 build against 10.6 SDK or downgrade to a configuration that will work properly... once we get it working we can make new binaries... Best, John. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Time for some Tutorials
Not bad ideas, we'd welcome any contributions you'd like to make in this area. Besides some future, currently unavailable, tutorials, I would suggest you look at: * Reading Factor Cookbook ( http://docs.factorcode.org/content/article-cookbook.html) * Creating Your First Program ( http://docs.factorcode.org/content/article-first-program.html) I have quite a few blog posts on my blog that might interest you whether it be: * simple RPG game (http://re-factor.blogspot.com/2011/02/simple-rpg.html) * simple website (http://re-factor.blogspot.com/2010/08/hello-web.html) * calculator w/ gui ( http://re-factor.blogspot.com/2010/08/calculator-with-gui.html) * using EBNF (http://re-factor.blogspot.com/2010/07/rolling-dice.html) * Norvig's spelling ( http://re-factor.blogspot.com/2010/03/how-to-write-spelling-corrector.html) As well as some optimization tips through: * powers of 2 (http://re-factor.blogspot.com/2011/04/powers-of-2.html) * wc -l (http://re-factor.blogspot.com/2011/11/wc-l.html) * factor-like ( http://re-factor.blogspot.com/2010/05/evenly-partition-integer.html) In any case, I would recommend picking a project that you are familiar with or interested in and trying to implement it in Factor. If you need help, feel free to reach out to the mailing list or #concatenative IRC channel. I would also note that the scary list of improvements shouldn't make you as a beginner more wary, since they don't make the language more complicated. In fact, the changes are largely making the language more stable and the libraries more robust. Best, John. On Mon, Aug 20, 2012 at 6:33 PM, graham telfer gakouse...@hotmail.comwrote: I down loaded and installed the latest version of Factor. The list of improvements and new libraries is impressive but pretty scary to a casual user of Factor like myself. Isn't it time there were some tutorials available? I would like to see 3 initially: a beginner's tutorial in the manner of Starting Forth, a tutorial that looks more to specification and design of programs in a functional style with Factor and a version of Real World Haskell for Factor. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Illegal instruction
I'm sorry to hear that, unfortunately it looks like the Mac OS X binaries unintentionally require 10.8 or greater, due to an upgrade of our build farm. If you want to use it on 10.6 or 10.7 before we make a fix, you can build from source: git clone https://github.com/slavapestov/factor.git cd factor \ ./build-support/factor.sh update Best, John. On Wed, Aug 22, 2012 at 4:09 AM, Marmaduke Woodman mmwood...@gmail.comwrote: Hi I have tried both 32-bit and 64-bit versions of the stable and development releases on Mac 10.6.8. On executing ./factor, I have immediately Illegal instruction. Have I missed something? On Linux or Win, there's no problem.. thanks, Marmaduke -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Is there a Factor.js ?
There is a Factor Playground implemented in Javascript: http://personal.inet.fi/koti/egaga/jsfactor/playground.html It does not work with Factor's extensive library, however. Its not worth getting into a philosophical discussion about Javascript, but I would note that Factor is portable (linux, mac, windows), open source (bsd license), and reliable (extensive library and test suites). Best, John. On Wed, Aug 22, 2012 at 7:44 PM, H.C. Chen hcchen5...@gmail.com wrote: I tried to find factor.js for a while, nothing found so far. What in my mind is the Processing programming language established on JavaScript. Include Processing.js into your .html turns it into processing aware. script src=processing-1.3.6.js /script Refer to http://processingjs.org/ We have Forth.js too. It run under Windows DOS box JScript interpreter. Like this: cscript.exe jeforth.js OK To work in a shell is very useful. The reason I like anything.JS is the portability, open source, and reliable. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Is there a Factor.js ?
Hi Michael, I'm enjoying these conversations and your investigations :) Regarding Javascript, I can see the benefit of a Factor-like language. It might be that using Clojure and Clojurescript as an analogy would be a good one. Obviously some parts may be harder to get compatible when bootstrapping from various JS engines, similar to trying to bootstrap from JVM or CLR. Language interoperability is a nice concept when you can get it working well. Can't wait to here more about your ideas as they develop... Best, John. On Thu, Aug 23, 2012 at 11:50 AM, Michael Clagett mclag...@hotmail.comwrote: Yes. In fact that is how I'm intending to target the CLR and JVM in my own environment -- whether I successfully implement the ability to use Factor (the language) inside my platform or not. I was envisioning something like a combination of direct byte code generation (either MSIL or JVM byte code) together with whatever programmatic facilities are necessary for fixing up metadata tokens, invoking the respective jit compilers and the like. This could just as easily be done from the existing Factor environment as any custom environment I manage to construct and in a perfect world Factor code created in either environment would compile and execute in the other just fine. You Factor guru types might be scratching your heads and wondering why on earth I would want to reproduce the factor booting mechanism in my own environment and build it on top of my own foundations instead of just using what Slava has already put so much work into. The answer is that while I'm not sure that this will be necessary (i might be able to get away with the DLL-ized version of Factor itself; I'm in major research mode about it as we speak), I suspect I may need to roll my own in order to integrate at as deep a level as I need with other language facilities I already have in place. That's as much as I'm going to say about it, because I don't want to commandeer the FactorCode.org airwaves to talk about my stuff. But whatever I end up doing, I do expect to give back to the community in the way of documentation of what I learn along the way. Sent from my iPhone On Aug 23, 2012, at 1:42 PM, Joe Groff arc...@gmail.com wrote: On Thu, Aug 23, 2012 at 11:46 AM, Michael Clagett mclag...@hotmail.com wrote: That, I would guess, is a result of its being implemented in C#. But what you lose at that point is the ability for the language to be used outside of the CLR and the extreme portability of something like Factor. What I'm envisioning is something closer to Microsoft's C++, which now has built-in support for generating MSIL, while still remaining completely viable on a native code platform. Such a capability for Factor (with the ability to generate JVM byte code as well) would allow Factor to act as a DSL layer above real-world code bases that organizations are always going to be using for a significant portion of their development. The JVM and CLR both have native code interfaces a Factor bridge could take advantage of. I think that would be a more realistic avenue toward interfacing with those platforms than rearchitecting Factor to target the JVM or CLR directly. -Joe -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Modules/packages for Factor
I think there is a danger in proliferation of too many packages with too many versions here. One advantage that Factor has had, albeit a mixed advantage due to reduced resources at times, is one main codebase that can be improved in wide cross-cutting ways. That has resulted in a lot of common vocabulary improvements instead of forks. We should support packages, and versions, and freezing of requirements for your application, but lets not lose sight of the benefits we've enjoyed thus far. As an aside, the CPAN testing infrastructure is something to be copied. Every time someone uploads a new module it goes through various automated testing on different architectures, and produces a build report back to you. That combined with some kind of cross-module lint tool might be able to yield the strong commons that I appreciate in Factor. Best, John. P.S. Let's not paint ourselves into a dependency hell situation either... On Fri, Aug 24, 2012 at 12:27 PM, P. uploa...@gmail.com wrote: I remember your describing that idea! I think it's great - it would allow us to express the interface not only in a more flexible way as you put it, but in a more detailed way (much more than a type system could provide). You have my vote. What are the downsides? (there's no language doing 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 they call their dependency interfaces? An idea I had was to use test suites to describe dependencies. You could say if this package implementation passes this test suite, then it fulfills this dependency. Whether it's practical to write detailed enough test suites in practice is a good question, but in theory it could allow you to express implementation requirements in a more flexible way than module signatures or version numbers. -Joe -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Out of memory error
It might be worth only loading and testing vocabularies in core and basis, to see if GVN works? On Aug 24, 2012, at 6:50 PM, Alexander J. Vondrak ajvond...@csupomona.edu wrote: It seems to fail soon after the tools.deploy tests. I tried at one point disabling those, but I think it still crashed. I should check again... From: Doug Coleman [doug.cole...@gmail.com] Sent: Friday, August 24, 2012 6:44 PM To: factor-talk@lists.sourceforge.net Subject: Re: [Factor-talk] Out of memory error 8gb outta be enough for anybody. But It's not, I guess. Try with more RAM or patch the part that grows to only grow to as much as you have. Maybe something is using way too much On Aug 24, 2012 6:01 PM, Alexander J. Vondrak ajvond...@csupomona.edumailto:ajvond...@csupomona.edu wrote: Hey all, Mini-update: got the unit tests for the global value numbering pass more up-to-snuff awhile ago (it's like test-driven development in reverse!). Still seems like I should be doing more to test the new capabilities, but I'm not sure if I could do much more than what's there. My efforts as of late have been focused on some GVN improvements. But for the past way-too-long, I thought I had broken something catastrophic because `load-all test-all` would invariably crash the listener with an out of memory error: Out of memory Nursery: Start=831c, size=10, end=832c Aging: Start=82fc, size=20, end=831c Tenured: Start=50c8, size=3214, end=82dc Cards:base=b44d0008, size=326800 Aborted After a lot of very slow debugging (them's the breaks when running all the unit tests, I guess) that was ultimately fruitless, I finally tried out Factor 0.95 straight from the build farm---none of my changes, no .git, just a clean download of the linux-x86-32 tarchive. And, what do you know, `load-all test-all` still crashes with the same error. It hadn't done that before, so I think the issue may be an intervening OS update I did. I'm running a fully up-to-date Debian testing, kernel 3.2.0-3-686-pae. 1) Can anyone reproduce this error? Or is my machine just that jacked up? I'd be happy to provide other diagnostic info, if it'd help. 2) Any coping mechanisms? I considered just throwing a bunch of memory at it with command line switches (-young=, -aging=, -tenured=, etc.), but wasn't really sure how much would do the trick, since it just started crashing like this out of the blue anyway. Thanks, --Alex Vondrak -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.netmailto:Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Out of memory error
If this is happening of 0.95 release than I wonder if we have a slow leak rather than corruption - all of our builders produce consistent clean builds (load-all test-all) and have for awhile. Perhaps we don't notice due to 16+ GB of RAM...? On Aug 25, 2012, at 11:06 AM, Joe Groff arc...@gmail.com wrote: On Sat, Aug 25, 2012 at 1:36 PM, Jim Mack j...@less2do.com wrote: In a way, too many possible culprits mask each other. I remember a problem like this that I solved by reducing the amount of memory so the problem would show quickly, then testing small things in isolation and volume. Pick a subset of tests and run them multiple times at low memory until it fails or becomes clear it won't. Rinse and repeat. An out of memory error could also be caused by things other than a lack of memory. If the heap is getting corrupted or there is a compiler bug, the system could end up passing a garbage size to malloc or mmap that is too big to be fulfilled. -Joe -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Literate Programming
I just pushed a vocab with some ideas that might help you get started: USE: literate LITERATE This is a section that is mostly text... you can even include factor stuff that doesn't get parsed like the following: : does-this-work? ( -- x ) no it doesn't! ; But, then if you want to run some code, you can do this: : this-totally-works! ( -- x ) 12345 ; And then some more text, for fun... LITERATE Try it and you'll see that the first definition is ignored, but the second is parsed: IN: scratchpad \ does-this-work? see No word named “does-this-work?” found in current vocabulary search path IN: scratchpad \ this-totally-works! see : this-totally-works! ( -- x ) 12345 ; Is something like this what you're looking for? On Wed, Aug 29, 2012 at 11:07 AM, P. uploa...@gmail.com wrote: 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.comwrote: Short answer: no. The factor documentation system is described here: http://docs.factorcode.org/content/article-writing-help.html Interestingly, the documentation system is written in factor and documented using itself, so this html page is a good example of the output it produces. Jon On Wed, Aug 29, 2012 at 1:41 AM, graham telfer gakouse...@hotmail.comwrote: Does Factor have any tools to develop programs using a literate programming method? Something like Bird notation used with Haskell or a document generator like DocGen with VFXForth. The usual thing in code is to mark the comments and leave the code, but in a literate programming approach (where there is going to be more comment than code) marking the code explicitly would be better. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Literate Programming
You're not alone at all, I completely agree -- a printed page worth of code in factor is often much more elegant due to separate documentation. On Wed, Aug 29, 2012 at 1:33 PM, Alexander J. Vondrak ajvond...@csupomona.edu wrote: Tangential thought, but I always loved that Factor's documentation is separate from the actual source code (i.e., that foo.factor's docs live in foo-docs.factor). In really any other language I can think of, you have to clutter what might otherwise be easy-to-read code with gobs of explanations, examples, warnings, doctests, markup, etc. I always wondered why using inline comments for documentation generation is the default for various programming languages, when it seems so ugly. Not that other modes of documentation aren't useful. I just sometimes feel like I'm alone in appreciating this particular point. :P Carry on, --Alex Vondrak From: Jon Harper [jon.harpe...@gmail.com] Sent: Wednesday, August 29, 2012 11:03 AM To: factor-talk@lists.sourceforge.net Subject: Re: [Factor-talk] Literate Programming Short answer: no. The factor documentation system is described here: http://docs.factorcode.org/content/article-writing-help.html Interestingly, the documentation system is written in factor and documented using itself, so this html page is a good example of the output it produces. Jon On Wed, Aug 29, 2012 at 1:41 AM, graham telfer gakouse...@hotmail.com mailto:gakouse...@hotmail.com wrote: Does Factor have any tools to develop programs using a literate programming method? Something like Bird notation used with Haskell or a document generator like DocGen with VFXForth. The usual thing in code is to mark the comments and leave the code, but in a literate programming approach (where there is going to be more comment than code) marking the code explicitly would be better. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.netmailto:Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Comments on 'Your First Program'
This is a good place, the tutorial has had a few contributors to it and we welcome more - and questions, too! If you want to submit your improvements here or through Github, either is fine. Best, John. On Fri, Aug 31, 2012 at 1:52 AM, Mike Parr mikep...@live.com wrote: Hi I'm very new to factor - around 2 days - so I hope you don't mind me mailing so early. I have some comments/improvements/corrections not sure which) to the series of docs entitled Getting Started / Your First Program (i.e the palindrome stuff). Should I post them here, or discuss them with the author? Who would that be? Best Wishes Mike -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Comments on 'Your First Program
Hi Mike, Great input, thanks! A few questions - 'Writing some logic in your first program' After it says 'Place this definition at the end of your source file.' I suggest adding: 'Note that a space is significant in Factor.' What exactly are you trying to communicate with this -- that we require spaces to tokenize? Multiple spaces are treated the same as a single space, indentation doesn't matter (although tabs are disallowed as blank characters). Where it says: 'Enter dup in the listener's input area, and press C+h.' This didn't work, so I wondered what C+h actually meant. I have never seen Ctrl and Alt shortened to C and A before. It turned out that I had to highlight dup, so I suggest replace the sentence by: 'Enter dup in the listener's input area, highlight it, then press Ctrl+h.' You can also position your cursor on or immediately after the word you want to Ctrl+h. Best, John. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Out of memory error
I'd love to help you work on merging your GVN patches, where did we leave it? Best, John. On Sat, Aug 25, 2012 at 7:05 PM, Alexander J. Vondrak ajvond...@csupomona.edu wrote: Good idea, but still no dice. --Alex Vondrak From: Doug Coleman [doug.cole...@gmail.com] Sent: Saturday, August 25, 2012 4:28 PM To: factor-talk@lists.sourceforge.net Subject: Re: [Factor-talk] Out of memory error Are you running it in the shell listener? It might save memory. ./factor -run=listener load-all test-all Doug On Sat, Aug 25, 2012 at 1:36 PM, Alexander J. Vondrak ajvond...@csupomona.edu wrote: Just did a load-all test-all with 0.94, and that crashes, too. I know that I've run those tests before without running out of memory, so I suspect it's either an OS update issue (who knows?) or how my setup is interacting with my new hardware (inherited some 64-bit hardware, still using my old 32-bit Debian install because I've been lazy about ditching it/upgrading/what-have-you). Don't know if that would make sense, per se, but hell, it's not the first problem I've had with my current OS setup. If no one can reproduce, it's probably some combination of things on my end... I'll be trying the unit tests out again once I get Arch configured on another hard drive on this machine. Thanks for the feedback everyone, --Alex Vondrak From: John Benediktsson [mrj...@gmail.com] Sent: Saturday, August 25, 2012 11:11 AM To: factor-talk@lists.sourceforge.net Cc: factor-talk@lists.sourceforge.net Subject: Re: [Factor-talk] Out of memory error If this is happening of 0.95 release than I wonder if we have a slow leak rather than corruption - all of our builders produce consistent clean builds (load-all test-all) and have for awhile. Perhaps we don't notice due to 16+ GB of RAM...? On Aug 25, 2012, at 11:06 AM, Joe Groff arc...@gmail.com wrote: On Sat, Aug 25, 2012 at 1:36 PM, Jim Mack j...@less2do.com wrote: In a way, too many possible culprits mask each other. I remember a problem like this that I solved by reducing the amount of memory so the problem would show quickly, then testing small things in isolation and volume. Pick a subset of tests and run them multiple times at low memory until it fails or becomes clear it won't. Rinse and repeat. An out of memory error could also be caused by things other than a lack of memory. If the heap is getting corrupted or there is a compiler bug, the system could end up passing a garbage size to malloc or mmap that is too big to be fulfilled. -Joe -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor
Re: [Factor-talk] Out of memory error
I can confirm that it speeds up some benchmarks! But also that it has math.simd failures: https://github.com/slavapestov/factor/issues/671 How should we go about debugging this for merging? Btw, awesome work! On Mon, Sep 10, 2012 at 9:35 AM, Alexander J. Vondrak ajvond...@csupomona.edu wrote: Latest working* code was at https://github.com/ajvondrak/factor/tree/gvn *I haven't pushed any of the stuff I was experimenting on when I started having problems with `load-all test-all`. But before those issues, I gave up on figuring out why math.vectors.simd tests (specifically around the check-vector-ops tests) were causing memory protection faults with GVN enabled (they don't with it disabled), hoping that getting gvn-tests.factor up to date would resolve issues. But, I got gvn-tests.factor working without needing any changes to the GVN pass itself, so I reckon the math.vectors.simd tests will still fail. Hopefully one of you knows more about how to go around debugging those tests than I do? (If you can reproduce, anyway.) As for the code itself, I started by copying over basis/compiler/cfg/value-numbering/ to extra/compiler/cfg/gvn/ and changing it there. It was easier during development to not touch an existing compiler pass, lest the whole listener break. The diff between the gvn value-numbering stuff is actually pretty small. But since they're different files, it might be a bit of a pain to figure some stuff out (to make sure you like it or whatever). I've found myself doing a lot of `git diff --no-index` and `git merge-file basis/stuff /dev/null/ extra/stuff` to resolve discrepancies. Pretty sure I took care of the few changes made to the value-numbering vocab while I was working on gvn: https://github.com/ajvondrak/factor/commit/beff2088132d992c983ddebe5860183f01bc8b5e Otherwise, it should be a drop-in replacement of value-numbering: just change references to compiler.cfg.value-numbering into compiler.cfg.gvn in math.simd.vectors.intrinsics and compiler.cfg.optimizer. Extra things I can think of: - I needed to make a minor change to compiler.cfg.copy-prop due to the GVN changes, so that'll be in there. - The reason I wrote the graphviz vocab was to facilitate the fun stuff in https://github.com/ajvondrak/factor/blob/gvn/extra/compiler/cfg/graphviz and https://github.com/ajvondrak/factor/tree/gvn/extra/compiler/cfg/gvn/testing so I could include CFG diagrams in my thesis. - Just last night, I tried out a fresh 0.95 download's `load-all test-all` (in ./factor -run=listener) on my x86_64, up-to-date Arch install (same hardware as before). Still crashed, but instead of getting out of memory I got a memory protection fault from the gc. I hope to be improving the GVN pass some once I can get these errors figured out. :-/ I notice there's been an issue opened about load-all test-all running out of memory (https://github.com/slavapestov/factor/issues/633); don't know if that's in response to what I brought up or not. So, I guess I kind of just went text dump mode there, but let me know if you have any questions or if there's anything I can do to help. Regards, --Alex Vondrak From: John Benediktsson [mrj...@gmail.com] Sent: Sunday, September 09, 2012 6:58 PM To: factor-talk@lists.sourceforge.net Subject: Re: [Factor-talk] Out of memory error I'd love to help you work on merging your GVN patches, where did we leave it? Best, John. On Sat, Aug 25, 2012 at 7:05 PM, Alexander J. Vondrak ajvond...@csupomona.edumailto:ajvond...@csupomona.edu wrote: Good idea, but still no dice. --Alex Vondrak From: Doug Coleman [doug.cole...@gmail.commailto:doug.cole...@gmail.com] Sent: Saturday, August 25, 2012 4:28 PM To: factor-talk@lists.sourceforge.netmailto: factor-talk@lists.sourceforge.net Subject: Re: [Factor-talk] Out of memory error Are you running it in the shell listener? It might save memory. ./factor -run=listener load-all test-all Doug On Sat, Aug 25, 2012 at 1:36 PM, Alexander J. Vondrak ajvond...@csupomona.edumailto:ajvond...@csupomona.edu wrote: Just did a load-all test-all with 0.94, and that crashes, too. I know that I've run those tests before without running out of memory, so I suspect it's either an OS update issue (who knows?) or how my setup is interacting with my new hardware (inherited some 64-bit hardware, still using my old 32-bit Debian install because I've been lazy about ditching it/upgrading/what-have-you). Don't know if that would make sense, per se, but hell, it's not the first problem I've had with my current OS setup. If no one can reproduce, it's probably some combination of things on my end... I'll be trying the unit tests out again once I get Arch configured on another hard drive on this machine. Thanks
Re: [Factor-talk] GUI examples
You might find these two posts useful: http://re-factor.blogspot.com/2010/08/calculator-with-gui.html http://re-factor.blogspot.com/2011/04/mail-with-gui.html In particular, the second one embeds a text editor gadget (in my case for writing emails, but in your case perhaps for editing a text file). If you have specific questions or examples you are looking for, let us know. Also, if you are interested in how certain layout contains work, it is sometimes useful to see how they are used in the listener UI. Best, John. On Tue, Sep 25, 2012 at 12:52 PM, Mike Parr mikep...@live.com wrote: I'm looking to create some little gui programs in factor, such as a text editor with a text widget, and a few buttons and menus. I'm wondering if there is any DSL in factor that lets me describe containers inside containers, that might be useful for gui stuff. I'm also interested in the model idea - presumably to simplify coding. I've found the graphics demos, but am more interested in layouts, events etc. Thanks Mike Parr -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] glitch in smtp/mail/ui, redux
Hi cw, Thanks for the report! I'm glad you got it working, sorry that it was a bit bugged (we changed prepend to make the type of the first argument and this apparently broke). I just committed a fix for it, making plain-auth-string return a string, instead of a byte-array. Let me know if you run into any other problems! Best, John. On Fri, Sep 28, 2012 at 6:47 PM, CW Alston cwalsto...@gmail.com wrote: Greetings, Factoristas - (Slimmed-down revision of earlier bloated post) Found a small bug in smtp.factor, and suggest a fix. I ran into a glitch trying out the mail-ui vocab, from the recent Re: Factor blog (mrjbq7-re-factor-ac166fe). I did note the necessity of setting up SMTP to use gmail, though I couldn't get that to happen via .factor-boot-rc. Instead, I just added the set-up code to mail-ui.factor, to be called from the top-level word, open-compose-window: -- USING: smtp namespaces io.sockets ; : setup-smtp ( -- ) cwalsto...@gmail.com mail-password plain-auth smtp-auth set-global smtp.gmail.com 587 inet smtp-server set-global t smtp-tls? set-global ; --- ~So far, so good. The 'compose' window comes up and accepts text just fine. But clicking the 'send' button throws this error: Generic word aux does not define a method for the byte-array class. Dispatching on object: B{ 65 85 84 72 32 80 76 65 73 78 32 65 71 78 51 ~36 more~ } ~Error occurs where the slot accessor aux fails on the base64 auth byte-array, looking for a string instead. So, I made a small change to the send-auth method of plain-auth in smtp.factor to output a string rather than a byte-array and succeeded in a soliloquy with my gmail account: --- M: plain-auth send-auth [ username ] [ password ] bi plain-auth-string !AUTH PLAIN prepend command get-ok ---*CHANGED TO*: * AUTH PLAIN prepend-as* command get-ok ; --- ~Now I've got mail! Cheers, ~cw -- *~ Memento Amori* -- How fast is your code? 3 out of 4 devs don\\\'t know how their code performs in production. Find out how slow your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219672;13503038;z? http://info.appdynamics.com/FreeJavaPerformanceDownload.html ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- How fast is your code? 3 out of 4 devs don\\\'t know how their code performs in production. Find out how slow your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219672;13503038;z? http://info.appdynamics.com/FreeJavaPerformanceDownload.html___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Quick Question For Chris Double
Given these caveats, here’s an introductory list of topics (in no particular order) I would propose to cover. Any feedback on suitability and valuable additions/deletions would be greatly appreciated: Defining by combination in Factor and effective use of Higher Order Functions Partial parameterization and Currying Effective use of Pattern matching Effective alternation (if/else, switch, etc.) Iteration in Factor Induction and Recursion Lists, Tuples, Records and Arrays in Factor Effective use of named stack parameters and local variables Overloading – effective use of Factor’s Generics List and array comprehensions and lazy sequences in Factor Creating and using effective algebraic data structures ** I think this would be a nice structure, there are probably bits and pieces of these sections in the Factor documentation (for example, the Factor cookbook http://docs.factorcode.org/content/article-cookbook.html or The languagehttp://docs.factorcode.org/content/article-handbook-language-reference.html articles). Sorry about the long post. It seemed potentially worthwhile, however. I agree! -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://ad.doubleclick.net/clk;258768047;13503038;j? http://info.appdynamics.com/FreeJavaPerformanceDownload.html___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] regexp words on string slices
Probably the restrictions to strings were a performance optimization...? It should be pretty easy to get the behavior you want: IN: scratchpad 0 4 foo slice R/ foo/ first-match . T{ slice { from 0 } { to 3 } { seq foo } } Using this diff makes it work, but causes the regexp benchmark to be 20-30% slower...: ```diff diff --git a/basis/regexp/compiler/compiler.factor b/basis/regexp/compiler/compi index a8b3c91..fb5fa4f 100644 --- a/basis/regexp/compiler/compiler.factor +++ b/basis/regexp/compiler/compiler.factor @@ -101,7 +101,7 @@ C: box box : transitionsquot ( transitions final-state? -- quot ) dup shortest? get and [ 2drop [ drop nip ] ] [ [ split-literals swap casequot ] dip backwards? get -'[ { fixnum string } declare _ _ _ step ] +'[ { fixnum sequence } declare _ _ _ step ] ] if ; : wordquot ( word dfa -- quot ) diff --git a/basis/regexp/regexp.factor b/basis/regexp/regexp.factor index 6070921..3e66785 100644 --- a/basis/regexp/regexp.factor +++ b/basis/regexp/regexp.factor @@ -29,7 +29,7 @@ M: lookbehind questionquot ! Returns ( index string -- ? ) : check-string ( string -- string ) ! Make this configurable -dup string? [ String required throw ] unless ; +dup sequence? [ String required throw ] unless ; : match-index-from ( i string regexp -- index/f ) ! This word is unsafe. It assumes that i is a fixnum @@ -166,7 +166,7 @@ DEFER: compile-next-match dup '[ dup \ next-initial-word = [ drop _ [ compile-regexp dfa def ] [ reverse-regexp? ] bi -'[ { array-capacity string regexp } declare _ _ next-match ] +'[ { array-capacity sequence regexp } declare _ _ next-match ] ( i string regexp -- start end string ) define-temp ] when ] change-next-match ; ``` On Fri, Nov 30, 2012 at 5:43 PM, Naveen Garg naveen.g...@gmail.com wrote: Any reason slices are not allowed to be passed to regexp words like first-match ? I tried modifiying the word: : check-string ( string -- string ) ! Make this configurable ! dup string? [ String required throw ] unless ; dup dup string? swap regexp? or [ String required throw ] unless ; but doing a refresh-all doesn't change anything, running 0 4 foo slice R/ foo/ first-match still throws error string required For the curious, I am working on an optimized / space efficient version of the re-pair semi-static dictionary compression algorithm ( http://www.cbrc.jp/~rwan/en/restore.html) . I have it working in autohotkey, trying to port it to factor to see if I get any performance gains, and just for fun / learn factor. -- Keep yourself connected to Go Parallel: INSIGHTS What's next for parallel hardware, programming and related areas? Interviews and blogs by thought leaders keep you ahead of the curve. http://goparallel.sourceforge.net ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Keep yourself connected to Go Parallel: INSIGHTS What's next for parallel hardware, programming and related areas? Interviews and blogs by thought leaders keep you ahead of the curve. http://goparallel.sourceforge.net___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Factor new icons
I ran a 99designs.com contest and the artist transferred copyright to me per their terms of service, I put the icons into the Factor project with the BSD license like Elie Chaftari had done previously. I will try and upload the original artwork to Factorcode on Monday. On Sun, Dec 2, 2012 at 9:40 AM, Jon Harper jon.harpe...@gmail.com wrote: Hi list, and more specifically John, I think uploading the .psd files on factorcode.org would be really nice. Also, I was wondering how these icons were made. Did you have to pay for them ? Did the artist transfer the copyright to you ? cheers, Jon -- Keep yourself connected to Go Parallel: DESIGN Expert tips on starting your parallel project right. http://goparallel.sourceforge.net/ ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Keep yourself connected to Go Parallel: DESIGN Expert tips on starting your parallel project right. http://goparallel.sourceforge.net/___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Factor just goes away
Hi Leon, I seem to have missed this message, sorry for not noticing it earlier! Have you resolved this problem? If you watch memory usage, do you see the Factor process growing? When it dies, does it produce any output in the terminal? What version of Factor are you using? Thanks, John. On Sat, Nov 24, 2012 at 8:34 AM, Leon Konings fac...@koningssoftware.comwrote: Hi, I have got another problem with the project I am working on. The project is about a simulator for arrayForth. There is a grid representing 144 processors. I show information about every processor in this grid. In one of my simulations the program runs fine until I am at about 100,000 iterations. Then Factor just goes away. The program stops always at about the same point, but not exactly. When I log things the program keeps working fine. I am thinking of a memory leak, but have not been able to find it yet. How can I find this bug? Any suggestion is very welcome! Best regards, Leon -- Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- Keep yourself connected to Go Parallel: BUILD Helping you discover the best ways to construct your parallel projects. http://goparallel.sourceforge.net___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Shebang syntax
This is no longer true: $ cat test.factor #!/path/to/factor USE: io hello, world print $ ./test.factor hello, world On Thu, Dec 6, 2012 at 8:43 AM, Andrew Pennebaker andrew.penneba...@gmail.com wrote: Can we remove the requirement that shebang arguments be preceded by a space? Most programming languages don't require this, so Factor's shebang syntax is a bit unintuitive. http://rosettacode.org/wiki/Multiline_shebang#Factor -- Cheers, Andrew Pennebaker www.yellosoft.us -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Shebang syntax
It was added in November 2011 and is part of the 0.95 release. https://github.com/slavapestov/factor/commit/cd5f4f9b35d21e79300599804bb1009a477d2936 On Thu, Dec 6, 2012 at 9:25 AM, Andrew Pennebaker andrew.penneba...@gmail.com wrote: Wonderful! Which version added this? On Dec 6, 2012 12:18 PM, John Benediktsson mrj...@gmail.com wrote: This is no longer true: $ cat test.factor #!/path/to/factor USE: io hello, world print $ ./test.factor hello, world On Thu, Dec 6, 2012 at 8:43 AM, Andrew Pennebaker andrew.penneba...@gmail.com wrote: Can we remove the requirement that shebang arguments be preceded by a space? Most programming languages don't require this, so Factor's shebang syntax is a bit unintuitive. http://rosettacode.org/wiki/Multiline_shebang#Factor -- Cheers, Andrew Pennebaker www.yellosoft.us -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Vector logo
Unfortunately, the current logo (and the previous one) are not vector-based. Out of curiosity, is there some particular use-case you have for this? Or just preparing for a higher resolution future? Best, John. On Thu, Dec 6, 2012 at 8:42 AM, Andrew Pennebaker andrew.penneba...@gmail.com wrote: Can we adopt a vector logo, one that's scalable? For example: http://www.yellosoft.us/logos#factor -- Cheers, Andrew Pennebaker www.yellosoft.us -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Vector logo
I see - I will investigate how easy it would be to make a vector version. On Thu, Dec 6, 2012 at 12:02 PM, Andrew Pennebaker andrew.penneba...@gmail.com wrote: Making any derivative artwork is a hassle. E.g. wallpapers, icons marking download links. SVG or EPS would go a long way for anyone who wants to put Factor logos in Web tutorials, blog articles, t-shirts... On Dec 6, 2012 12:37 PM, John Benediktsson mrj...@gmail.com wrote: Unfortunately, the current logo (and the previous one) are not vector-based. Out of curiosity, is there some particular use-case you have for this? Or just preparing for a higher resolution future? Best, John. On Thu, Dec 6, 2012 at 8:42 AM, Andrew Pennebaker andrew.penneba...@gmail.com wrote: Can we adopt a vector logo, one that's scalable? For example: http://www.yellosoft.us/logos#factor -- Cheers, Andrew Pennebaker www.yellosoft.us -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Vector logo
Hi Marek, You mean to work within Gnome Shell? Isn't that just a matter of including up to 256x256 icons in your package and .desktop file? On Thu, Dec 6, 2012 at 2:27 PM, Marek Kubica ma...@xivilization.net wrote: On Thu, 6 Dec 2012 09:34:12 -0800 John Benediktsson mrj...@gmail.com wrote: Out of curiosity, is there some particular use-case you have for this? Or just preparing for a higher resolution future? Well, for one I'd be cool if the icon for the Factor shell in Linux distributions was scalable. Currently I ship the old logo in the Arch Linux package and it is a bitmap and looks quite ugly. Andrew, your collection of icons is pretty awesome. Wish I knew about it one week ago when I laser-etched my laptop. regards, Marek -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Game programming in Factor
I suggest you look at the game.loop vocabulary (in addition to general opengl things). Joe Groff has some blogs about it, one of the first is here: http://duriansoftware.com/joe/The-Factor-game-framework.html These demos might be useful to look at: IN: scratchpad tetris run IN: scratchpad boids run IN: scratchpad terrain run Also, there are some demos using the GPU: IN: scratchpad: gpu.demos.bunny run IN: scratchpad: gpu.demos.raytrace run Also, this is a fun little game demo built by Joe: https://github.com/jckarter/papier On Fri, Dec 7, 2012 at 6:57 AM, Samuel Proulx proulxsam...@gmail.comwrote: Hi, I was wondering what was the best way to make simple 2D games with Factor. I've been programming simple games in Python using either Pygame or Pyglet, which is pretty easy and straightforward. Although, in Factor, I doesn't appear to work the same way. My questions are the following: 1. Which vocabulary should I use? I'm guessing I should use the OpenGl vocabulary in combinaison with the game vocabulary for things such as the main loop. Is that right? 2. Are there any tutorial about game programming in Factor? / Where shall I start? Thanks in advance, Samuel -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Factor listener windows do not respond on mouse button click. Left.
Hi Damian, Do you mean that left click on the buttons at the top of the listener, for example, doesn't work? On Fri, Dec 7, 2012 at 5:19 PM, Damian Dobroczyński qoo...@gmail.comwrote: Hi list! I've just updated my Factor installation (from git repo) and found strange behavior. Left mouse button click causes no reaction at all. Right button is ok (popup menu appears). All links and buttons reacts as should while hovering but I cannot have the window to react on left click. Somone has had such issue? My box is ubuntu 12.10, graphics card is ATI Radeon, using open source driver. -- D. -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Factor listener windows do not respond on mouse button click. Left.
Very strange, have not heard of this before. Would you open a Github issue and maybe we can triage there? On Dec 8, 2012, at 12:57 AM, Damian Dobroczyński qoo...@gmail.com wrote: W dniu 08.12.2012 02:25, John Benediktsson pisze: Hi Damian, Do you mean that left click on the buttons at the top of the listener, for example, doesn't work? Top buttons, in the middle (source snippets), links etc. Everything which is activated through left-click. Right-click - works just fine...Hm, let check it one more time... (. some time went on ) Yes. Left-click sucks. Right is ok. Popup menus pop-ups - but no way to choose something from it 'cause left-click is dead. Checked using Ubuntu Unity and Gnome Shell. -- D. PS. By the way - if someone think that something is wrong with my mouse - I can assure - this mail is created using a number of left-clicking. So it's not THE case. On Fri, Dec 7, 2012 at 5:19 PM, Damian Dobroczyński qoo...@gmail.com wrote: Hi list! I've just updated my Factor installation (from git repo) and found strange behavior. Left mouse button click causes no reaction at all. Right button is ok (popup menu appears). All links and buttons reacts as should while hovering but I cannot have the window to react on left click. Somone has had such issue? My box is ubuntu 12.10, graphics card is ATI Radeon, using open source driver. -- D. -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Namespaces in Factor
Typically, you would need to specify which word you mean: Given: IN: vocab-a : foo ( -- x ) 12 ; IN: vocab-b : foo ( -- x ) 14 ; IN: vocab-c : bar ( -- x ) foo ; This would happen: IN: scratchpad USE: vocab-c Loading resource:work/vocab-c/vocab-c.factor Loading resource:work/vocab-a/vocab-a.factor Loading resource:work/vocab-b/vocab-b.factor 1: USE: vocab-c ^ resource:work/vocab-c/vocab-c.factor 6: : bar ( -- x ) foo ; ^ More than one vocabulary defines a word named “foo” The following restarts are available: :1 Use the vocab-a vocabulary :2 Use the vocab-b vocabulary :3 Load resource:work/vocab-c/vocab-c.factor again You can fix this by adding something like: FROM: vocab-a = foo ; Or using QUALIFIED: or QUALIFIED-WITH: to fix the ambiguity. Best, John. On Wed, Dec 12, 2012 at 8:47 AM, nitralime nitral...@googlemail.com wrote: Hi folks! How do the namespaces work in Factor? What happens if USING: vocab-a vocab-b ; leads to conflicting word definitions in these two vocabularies? Regards Nik -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Factor listener windows do not respond on mouse button click. Left.
I'm sorry about this! First time we've gotten a report that mouse click doesn't work. Best repo is Slava's: https://github.com/slavapestov/factor On Dec 12, 2012, at 10:13 PM, Damian Dobroczyński qoo...@gmail.com wrote: W dniu 08.12.2012 16:55, John Benediktsson pisze: Very strange, have not heard of this before. Would you open a Github issue and maybe we can triage there? Since it still behaves the same way (I thought maybe Ubuntu updates related to X stuff would do) I'm forced to enter GitHub: which repo clone is the best to raise this issue? Slava's? -- D. On Dec 8, 2012, at 12:57 AM, Damian Dobroczyński qoo...@gmail.com wrote: W dniu 08.12.2012 02:25, John Benediktsson pisze: Hi Damian, Do you mean that left click on the buttons at the top of the listener, for example, doesn't work? Top buttons, in the middle (source snippets), links etc. Everything which is activated through left-click. Right-click - works just fine...Hm, let check it one more time... (. some time went on ) Yes. Left-click sucks. Right is ok. Popup menus pop-ups - but no way to choose something from it 'cause left-click is dead. Checked using Ubuntu Unity and Gnome Shell. -- D. PS. By the way - if someone think that something is wrong with my mouse - I can assure - this mail is created using a number of left-clicking. So it's not THE case. On Fri, Dec 7, 2012 at 5:19 PM, Damian Dobroczyński qoo...@gmail.com wrote: Hi list! I've just updated my Factor installation (from git repo) and found strange behavior. Left mouse button click causes no reaction at all. Right button is ok (popup menu appears). All links and buttons reacts as should while hovering but I cannot have the window to react on left click. Somone has had such issue? My box is ubuntu 12.10, graphics card is ATI Radeon, using open source driver. -- D. -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- 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 delivering more value-add services Discover what
Re: [Factor-talk] Documentation
Which parts of the documentation are you looking for? Much of it is available in the Listener and on the web: http://docs.factorcode.org/content/article-handbook.html I wrote some code to generate PDF's from various parts of the Factor documentation, which might be useful to you: First Program ( first-program help ) https://github.com/mrjbq7/re-factor/raw/master/docs/first-program.pdf Cookbook ( cookbook help ) https://github.com/mrjbq7/re-factor/raw/master/docs/cookbook.pdf Language ( handbook-language-reference help ) https://github.com/mrjbq7/re-factor/raw/master/docs/handbook.pdf System ( handbook-system-reference help ) https://github.com/mrjbq7/re-factor/raw/master/docs/system.pdf Tools ( handbook-tools-reference help ) https://github.com/mrjbq7/re-factor/raw/master/docs/tools.pdf Best, John. On Fri, Dec 14, 2012 at 3:16 AM, nitralime nitral...@googlemail.com wrote: Hello! Is there Factor documentation in PDF format? If not, is there a way to convert it to a acceptable/usable PDF format? Regards Nik -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Border-button quotation
For convenience, the quotation is called with the button object that was clicked. If you don't want it, you can just drop it. Press [ *drop *The button has been pressed. print ] border-button gadget. On Sun, Dec 16, 2012 at 4:01 PM, Samuel Proulx proulxsam...@gmail.comwrote: Hi, I'm sorry to spam the mailing list so much those last few days, I just have a project in mind but I'm having such a hard figuring it out in Factor. I've been trying to make a border-button for a UI. I looked at the help ( \ border-button help ). I don't understand its quot parameter. It says it's a quotation with stack effect ( button -- ). Since I don't really understand the part with a stack effect, I decided to try something: Press [ The button has been pressed. print ] border-button gadget. The button appears correctly, but when I click on it, I get the error Quotation's stack effect does not match call site. Can someone tell what I did wrong? Thanks in advance, Samuel -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Border-button quotation
What Doug said. Also, feel free to send your questions, we're here to help. It's not spam. On Sun, Dec 16, 2012 at 5:02 PM, Doug Coleman doug.cole...@gmail.comwrote: You can print to the global namespace and it should show up in the terminal (Windows, Linux) or in Console (Mac). Press [ *drop [ *The button has been pressed. print ] with-global ] border-button gadget. Doug On Sun, Dec 16, 2012 at 4:58 PM, Samuel Proulx proulxsam...@gmail.comwrote: Thank you for your answer! I don't get the error message anymore. Although, is it normal if the message The button has been pressed doesn't show in the listener? Le dimanche 16 décembre 2012, John Benediktsson a écrit : For convenience, the quotation is called with the button object that was clicked. If you don't want it, you can just drop it. Press [ *drop *The button has been pressed. print ] border-button gadget. On Sun, Dec 16, 2012 at 4:01 PM, Samuel Proulx proulxsam...@gmail.comwrote: Hi, I'm sorry to spam the mailing list so much those last few days, I just have a project in mind but I'm having such a hard figuring it out in Factor. I've been trying to make a border-button for a UI. I looked at the help ( \ border-button help ). I don't understand its quot parameter. It says it's a quotation with stack effect ( button -- ). Since I don't really understand the part with a stack effect, I decided to try something: Press [ The button has been pressed. print ] border-button gadget. The button appears correctly, but when I click on it, I get the error Quotation's stack effect does not match call site. Can someone tell what I did wrong? Thanks in advance, Samuel -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] terrain example
That works fine for me, using latest development branch of Factor and Mac OS X 10.8.2. What versions are you using? On Sun, Dec 16, 2012 at 7:02 PM, Leonard P leonard14...@gmail.com wrote: On Sun, Dec 16, 2012 at 9:59 PM, Alex Vondrak ajvond...@gmail.com wrote: http://docs.factorcode.org/content/word-run,vocabs.loader.html E.g., `terrain run` --Alex Vondrak Anyone else get the error message, too many vertices? -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] editors
Factor source code is loaded from files, which can be edited in VI or your favorite editor. And linked via the edit word so you can open code into your editor. In this article: http://docs.factorcode.org/content/article-first-program-start.html, you create your palindrome.factor file using our scaffold tool (you can also create it manually, this just makes the tutorial easier): resource:work palindrome scaffold-vocab If you just typed the code into the listener, you probably got this error message: Vocabulary does not exist (name palindrome) That means that the vocabulary was either never created, or doesn't exist on the file system, I think. Best, John. On Mon, Dec 17, 2012 at 12:43 AM, Leonard P leonard14...@gmail.com wrote: 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-test.html Couldn't get this to work ... palindrome scaffold-tests -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Button stack effect problem
If you use global values, this should work: SYMBOL: a 1 a set-global Press [ drop a get-global ... ] border-button gadget. The problem with set and get, is that the 'set' is using the namespace of the listener which may (likely not) be the namespace of the quotation being executed by the quotation. Namespaces are hierarchical, so you want to make sure that the value is set in either the current scope or one of the outer scopes to be accessible. Does that make sense? By the way, there are several ways to get your code to work, through currying as was mentioned previously, namespaces like you are trying now, or even subclassing a button and storing your value in a slot, e.g: TUPLE: a-button button a ; : a-button ( label quot -- button ) a-button new-button border-button-theme ; Press [ a ... ] a-button 1 a gadget. Best, John. On Tue, Dec 18, 2012 at 10:26 AM, Samuel Proulx proulxsam...@gmail.comwrote: I've been experimenting with it and I now have another question. I've figured a way to use symbols in the quotations like so: SYMBOL: a 1 a set Press *a get* *'*[ drop *_* ... ] border-button gadget. I don't know if that's the best the way to do it but it works. Although, what I would like to do is to set the value of the symbol a from inside the quotation. How can I do that? 2012/12/17 Samuel Proulx proulxsam...@gmail.com I see! Thank you for your help and your explanations! 2012/12/17 Jon Harper jon.harpe...@gmail.com The quotation you pass to the border-button constructor gets called by the system when the button is pressed. At this time, the stack has nothing to do with the stack shown in the listener. So you don't have the reference to the label. To have a reference to the label when the quotation is called, you should make a closure. This can be done with curry (or, in this case, the more appropriate with): Test label dup gadget. Press [ drop Worked text drop ] with border-button gadget. Other ways of creating closures are fried quotations ( http://docs.factorcode.org/content/article-fry.html) or local variables (http://docs.factorcode.org/content/article-locals.html) Cheers, Jon On Mon, Dec 17, 2012 at 10:48 PM, Samuel Proulx proulxsam...@gmail.comwrote: Hi, Yet another problem... Hopefully the last though. I tried to make a button that changes the text slot of a previously made label. Here's what I did: Test label dup gadget. Press [ drop Worked text ] border-button gadget. I got an error message saying Data stack underflow when I clicked it. So I checked the quotation stack effect: [ drop Worked text ] infer. ( x x -- x ) It should take the button, drop it since I don't need it, take the label, and then change its text to Worked. It doesn't do it though. What did I do wrong? Thanks in advance, Samuel -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d___ Factor-talk mailing list Factor-talk@lists.sourceforge.net
Re: [Factor-talk] Border child
Try this, you need to remove all the children first, then add the label: Test label { 5 5 } border dup gadget. dup children [ unparent ] each dup Worked label add-gadget On Wed, Dec 19, 2012 at 8:14 AM, Samuel Proulx proulxsam...@gmail.comwrote: Hi, I tried to change the child of a border. Judging by the help ( \ border help ), I only need to change the child slot. So I tried this: Test label { 5 5 } border dup gadget. Worked label child Error : Generic word child does not define a method for the border class. What does that mean? What did I do wrong? Thanks in advance, Samuel -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Border child
The scroller uses a viewport slot to hold the children gadgets, I believe: Foo label scroller dup gadget. dup viewport Bar label 1vector children drop On Wed, Dec 19, 2012 at 9:10 AM, Samuel Proulx proulxsam...@gmail.comwrote: It worked fine with borders, so I thought it would be the same with scrollers. I tried the same thing you proposed me for the borders with the scrollers. It doesn't work. What do I do if I want to change the gadget slot of a scroller ( \ scroller help ) ? 2012/12/19 Samuel Proulx proulxsam...@gmail.com I see! Thank you guys! 2012/12/19 PGGB grizzlysc...@gmail.com If you inspect the border on the stack you will notice, that the slot you are trying to change is actually called children, which is a vector that contains the label. So this would work: Test label { 5 5 } border dup gadget. Worked label 1vector children On 19.12.2012, at 17:14, Samuel Proulx proulxsam...@gmail.com wrote: Hi, I tried to change the child of a border. Judging by the help ( \ border help ), I only need to change the child slot. So I tried this: Test label { 5 5 } border dup gadget. Worked label child Error : Generic word child does not define a method for the border class. What does that mean? What did I do wrong? Thanks in advance, Samuel -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- 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 delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk