Re: [Factor-talk] interfacing to FMOD.DLL

2007-03-21 Thread Doug Coleman
Anton, You recompiled, but you should have bootstrapped again since it's all on the Factor side. Bootstrap again with the two dlls in the directory with your f.exe and it should work. From the blog, the step is listed in the ingredients section at the top and as a bullet: *

Re: [Factor-talk] interfacing to FMOD.DLL

2007-03-21 Thread Doug Coleman
Anton, Your previous message says you copied the files and recompiled only, with no mention of bootstrap. Every time I have had this problem a bootstrap has fixed it. What about doing f -shell=tty and trying 'recompile' or 'compile-all'? Then 'save' your image, of course. Also, try

[Factor-talk] Tetris bug

2007-03-21 Thread Doug Coleman
Alex, I was testing apps/tetris and got it into a state where the pieces have stopped dropping but i can still move them and get points. Each piece appears and sits there. This happened when I was near the top -- perhaps the game thinks I lost even though I didn't? Doug

Re: [Factor-talk] FMOD.DLL and callbacks

2007-04-02 Thread Doug Coleman
Anton, . does not flush; perhaps that's what Slava was getting at. However, you are also doing things way wrong...your function expects four arguments yet you leave them on the stack! : stream-callback ( -- object ) char { void* void* int void* } stdcall [ callbak'd! print flush

Re: [Factor-talk] SMTP Library

2007-05-24 Thread Doug Coleman
: Hi, On 5/24/07, Doug Coleman [EMAIL PROTECTED] wrote: Did you look at libs/crypto/hmac.factor? I think we already have the equivalent of this code. It's more complicated because I tried to optimize md5-hmac to open streams less but I didn't benchmark to see if it's even much faster. Nope

Re: [Factor-talk] Unable to compile amd64 image in Factor 0.89

2007-08-13 Thread Doug Coleman
Kio, To bootstrap with the latest darcs change this line: ./Factor/core/cpu/x86/32/32.factor 254 -4 x86-backend compiler-backend set-global +T{ x86-backend f 4 } compiler-backend set-global Similarly for 64bit: ./Factor/core/cpu/x86/64/64.factor -8 x86-backend compiler-backend set-global +T{

Re: [Factor-talk] unit tests

2007-11-06 Thread Doug Coleman
Hi, If unit-test worked like you wanted, your first unit test wouldn't test much besides does the quotation I'm testing throw an exception, because if [ 2 3 + ] somehow returned 7 it would still pass. So a better unit test would involve checking a known answer, like [ 5 ] [ 2 3 + ]

Re: [Factor-talk] freetype problem with cygwin

2007-11-20 Thread Doug Coleman
I had this problem with Cygwin recently. I believe that the ownership on your dlls is wrong. chmod can't fix it, you have to change the ACL in the Windows Security panel from file manager, or else don't wget the files, delete them, and download again through a browser. I have no idea

Re: [Factor-talk] trouble bootstrapping

2007-11-20 Thread Doug Coleman
There's probably an empty directory in one of the roots. Windows git has an error where it won't delete the directories; I didn't know it happened on Mac too. On Nov 20, 2007, at 4:24 PM, Alex Chapman wrote: Hi, I'm having trouble bootstrapping the latest git on osx: git pull make

Re: [Factor-talk] [PATCH] curl support in factor.sh

2008-02-13 Thread Doug Coleman
Jorge, misc/factor.sh now uses curl if it's available. Thanks for the patch. Doug On Feb 7, 2008, at 3:12 AM, Jorge Acereda Maciá wrote: Hi, This patch adds support for curl (installed by default on Mac OS X). Greetings, Jorge Acereda curl.patch

Re: [Factor-talk] Standard string representation protocol

2008-02-27 Thread Doug Coleman
You can do numberstring for numbers and unparse for most anything else. SYMBOL: foo foo unparse 24.5 numberstring Doug On Feb 27, 2008, at 8:51 AM, Nikhil Marathe wrote: Hello all, I'm new to factor, and I was wondering if there is an equivalent for Python's __repr__ or __str__ or Java's

Re: [Factor-talk] Platform support

2008-03-27 Thread Doug Coleman
FreeBSD 64 works too! Doug On 3/27/08, Slava Pestov [EMAIL PROTECTED] wrote: Hi all, Doug and I invested some effort into getting Factor running on (Net|Open|Free)BSD, 32-bit and 64-bit x86, with the exception of FreeBSD x86-64. All unit tests pass; we'll take care of 64-bit FreeBSD soon.

Re: [Factor-talk] smooth editing

2008-04-01 Thread Doug Coleman
Hi Nikhil, There's a tutorial in the Factor UI that describes a typical workflow. If you hit alt-2 and the cookbook appears, it's called Your first program under Starting points. Here's an example. You might decide to make a physics directory, so you'd first make this file:

Re: [Factor-talk] Windows/x86 bug?

2008-04-10 Thread Doug Coleman
Hi Leon, In regards to (a), I'm not sure if that was intentional or overlooked. However, (b) is certiainly a feature, as we have disallowed tabs in favor of spaces only. Of course you can use tabs in string and character literals: \twhy tabs? CHAR: \t Doug On 4/10/08, [EMAIL

Re: [Factor-talk] Windows/x86 binary now available

2008-04-11 Thread Doug Coleman
Hi John, I pushed a patch that might fix your problem. Now the WM_SYSCOMMAND message is parsed for window minimize, maximize, and restore, and the window drawing is turned off when it's minimized. To test, please bootstrap with -exclude=io because file monitors are broken on windows right

Re: [Factor-talk] git on cygwin

2008-05-05 Thread Doug Coleman
Windows can't overwrite the file if it's in use. If I know factor.sh has changed, on a Windows box i'll do git pull; ./build-support/factor.sh update To restore the file just: git checkout build-support/factor.sh This might be a good one for the faq. Doug On May 5, 2008, at

Re: [Factor-talk] linux ppc build problem

2008-06-02 Thread Doug Coleman
Try using the tty listener: ./factor -run=listener I have never had arithmetic calculations mess up like that. Can you narrow down the problem if it's broken in the tty? Doug On Jun 2, 2008, at 12:11 PM, Doug Nichols [EMAIL PROTECTED] wrote: I built factor on an old G3 ibook that runs

Re: [Factor-talk] Help for 'font'

2008-08-29 Thread Doug Coleman
Slava suggested { $snippet ascent }, and this looks OK, but maybe we should make a new type for it? { $setter ascent } { $getter ascent } Doug On Aug 29, 2008, at 3:58 PM, Eduardo Cavazos wrote: Slava, Check out the help for 'font' from 'ui.freetype'. It mentions slots by the old

Re: [Factor-talk] RESOLVE: form

2008-08-31 Thread Doug Coleman
I didn't see any compiler errors when I added the 'ALIAS: second seconds' to calendar. In fact, Factor didn't even throw the popup exception until I bootstrapped again. I could have been using the same image for a few more days and made lots of commits before ever having to bootstrap

[Factor-talk] Invitation to join Factor Developers

2008-09-08 Thread Doug Coleman
Hi all, I created a Factor Developers group on Linkedin.com. I'll have to approve you and there is no way around it. Just out of curiosity, does anyone have an opinion about Linkedin? I have a profile but I hardly ever use the site. I find their interface a bit confusing, like they

Re: [Factor-talk] Callbacks not preserving %rbx on x86-64

2008-09-13 Thread Doug Coleman
Hi Joe, I added a way to set your target platform in the command line. If you run the script as usual but with a second parameter, the script parses this parameter and overrides the OS, ARCH, and WORD variables for all options. For example, both of these should work now:

Re: [Factor-talk] Bad libfreetype.6.dylib?

2008-09-20 Thread Doug Coleman
Factor recently started using the Objective C 2.0 bridge, so Mac OS X 10.5 is required. This means we should have 64bit binaries on Intel Mac soon. Our official position is that 10.4 users should upgrade to 10.5, but unofficially I guess if someone wanted to maintain the 10.4 port then

Re: [Factor-talk] OpenGL error

2008-09-30 Thread Doug Coleman
Hi Joe, I'm running x64 Ubuntu 8.04 with a GeForce 8600 GT and the NVIDIA driver. The two required extensions are reported by gl-extensions, but the spheres doesn't work. Running spheres gives me a black spheres window and a popup window saying: An error occurred while drawing the world T{

Re: [Factor-talk] OpenGL error

2008-10-15 Thread Doug Coleman
Joe, Sorry for taking so long to reply. I get three popups when doing spheres run: 1 - The spheres window itself (pops up black) 2 - Required OpenGL version 2.0 not supported (1.4 available) Required OpenGL extensions not supported: GL_ARB_shader_objects 3 - An error occurred while

Re: [Factor-talk] Class names

2008-11-30 Thread Doug Coleman
On Nov 30, 2008, at 4:32 PM, Slava Pestov wrote: On Sun, Nov 30, 2008 at 4:17 PM, Chris Double [EMAIL PROTECTED] wrote: I don't really like this. Creating objects is common and I think escaping things with \ should be rare. I agree. Actually, \ is invisible to me, but maybe I've done

Re: [Factor-talk] Class names

2008-11-30 Thread Doug Coleman
However, always using '\' isn't a substitute for a real convention. Seeing a backslash doesn't necessarily signify a class name, which is the point of a naming convention. I just realized there are two issues here. 1) Having a convention for class names 2) Making it safe to define

Re: [Factor-talk] Layout change in latest Factor

2008-12-02 Thread Doug Coleman
We're redoing the UI to feel more like the command-line listener. The tabbed approach is likely to go to, with individual browser, walker, profiler windows replacing it. You can turn the stack printout off with: display-stacks? off The best place to see the changes is the git log.

[Factor-talk] Three new words in core/

2008-12-03 Thread Doug Coleman
Hi all, I added a word 'glue' to sequences: : glue ( seq1 seq2 seq3 -- newseq ) swap 3append ; Instead of: a b , swap 3append . a,b you can do: a b , glue . a,b The third parameter glues the other two sequences together. The other sequences word is called surround: :

Re: [Factor-talk] refresh-all after a new build

2008-12-23 Thread Doug Coleman
the boot image is stale but recent enough for bootstrap to succeed. the fix is to upload new images, and a longterm fix could involve mason detecting this somehow and not uploading binaries. Doug On Dec 23, 2008, at 21:44, Eduardo Cavazos wayo.cava...@gmail.com wrote: Hello,

Re: [Factor-talk] factor-bgt repository

2008-12-26 Thread Doug Coleman
Jeff, I tried your 4DNav app -- it's really cool! One thing I had to change to get it working is in extra/4DNav/ 4DNav.factor -extra/4DNav +resource:extra/4DNav The resource: is interpreted by the normalize-path word and replaced with the Factor directory. Pathnames are

Re: [Factor-talk] An alternative for foldable?

2008-12-29 Thread Doug Coleman
call it as a toplevel form and drop the result. Doug On Dec 29, 2008, at 12:10, Samuel Tardieu s...@rfc1149.net wrote: Slava == Slava Pestov sl...@factorcode.org writes: Slava Make it a MEMO: word. Then the result will only be computed Slava once. Done, you can pull from

[Factor-talk] Emacs highlighting

2009-01-12 Thread Doug Coleman
Hi Jose, Here's a real nit-picky one: SYMBOLS: c d e f g t ; f and t are highlighted like they're false and true. This also happens in TUPLE:, VARS:, etc. Then there's the question of which ``f'' is in scope after the SYMBOLS: definition... Doug

Re: [Factor-talk] Generators?

2009-01-15 Thread Doug Coleman
How about extra/pack? You can do something like: B{ 4 0 0 0 6 0 0 0 8 0 0 0 3 0 0 0 0 0 0 0 0 } iiicq unpack-le . { 4 6 8 3 0 } I just added a new way to read packed bytes from a stream directly: B{ 4 0 0 0 6 0 0 0 8 0 0 0 } binary byte-reader [ iii read-packed-le ]

Re: [Factor-talk] Editor integration on Windows

2009-01-16 Thread Doug Coleman
Hi Paul, For some reason I thought I pushed a fix for this already. The problem is that Windows 64 has both Program files and Program files (x86) but the shell32 API errors out on Windows 32 if you try to look up the second program files directory. The error handler was also wrong,

[Factor-talk] Word renamings

2009-01-29 Thread Doug Coleman
Hi, I've renamed some words -- contains? is now any?, which is parallel in name with all?. The left and right versions of padding and trimming words should really have operated on heads and tails, since some languages are written right to left. Here's the list: contains? - any?

Re: [Factor-talk] at* parameters

2009-02-02 Thread Doug Coleman
Steve, Yes, I thought of this too and discussed it with Slava. My use case was: ERROR: no-foo key ; : lookup-foo ( key assoc -- value ) at* [ no-foo ] unless ; You really want the bad key included in the error tuple, and like you said, it's tough to do this currently. Like if* and

Re: [Factor-talk] blas on Windows

2009-02-04 Thread Doug Coleman
Hi, I'm just following up on these instructions for 64-bit Windows. gfortran is availble in the mingw-w64 build of gcc from http://sourceforge.net/projects/mingw-w64 In the Makefile.in Joe describes for CBLAS, make all his changes and also change g77 to gfortran. I copied the cblas_WINDOWS.a

Re: [Factor-talk] FUEL broken?

2009-02-08 Thread Doug Coleman
That's the plan, but we might have to change a line or two of code in the deployment tool. Doug On Feb 8, 2009, at 4:55 PM, Adam wrote: Doug, can the console app be deployed as *.exe though? On Sun, Feb 8, 2009 at 2:09 PM, Doug Coleman doug.cole...@gmail.com wrote: Yes, the change

Re: [Factor-talk] randomize word is broken?

2009-02-14 Thread Doug Coleman
Thanks for the bug report. This is fixed now -- the randomize word could not exchange an element with itself, so two element sequences would always just reverse. There's a unit test to make sure this doesn't happen again. Doug On Feb 14, 2009, at 2:29 AM, study.ana...@gmail.com wrote:

Re: [Factor-talk] Macro puzzle

2009-02-14 Thread Doug Coleman
Hi Matt, You don't need a macro to do what you're doing: : print-with-suffix ( str -- ) append print ; is correct as is. Macros are for expanding code at compile-time. In the UI, do macros about and read the docs. Some good examples of macros are in basis/generalizations and

[Factor-talk] editors.emacs Windows integration

2009-02-20 Thread Doug Coleman
Hi, The Emacs integration for Windows now tries to find your emacsclient binary by recursively searching through the Program Files\Emacs and Program Files(x86)\Emacs directories. This is the default path for emacs-w32, which is the emacs that worked the best out of the box on Windows and

Re: [Factor-talk] editor length

2009-03-31 Thread Doug Coleman
A fix for this bug has been in the repository for a couple of days now and new Windows binaries should upload within an few hours. If you are using a version you bootstrapped today from the git repository and the bug is still there, let me know. Doug On Mar 31, 2009, at 2:55 PM, Hegedűs

Re: [Factor-talk] defining computed constants at parse time

2009-04-19 Thread Doug Coleman
Alex, Take a look at Joe's extra/literals. You can do something like: CONSTANT: morse-code-table $[ H{ { CHAR: a .- } } biassoc ] Doug On Apr 19, 2009, at 9:18 PM, Alex Chapman wrote: Hi All, Sometimes I want to define an object in my program which is intended to be a constant, but

[Factor-talk] Renamed some words

2009-05-01 Thread Doug Coleman
Hi, I renamed some words for consistency. The previous word ``lines'' is now called ``stream-lines''. The new ``lines'' word reads from input-stream. Likewise, ``contents'' is now named ``stream-contents'' and the new word ``contents'' reads from the input-stream. IN: io : stream-lines

Re: [Factor-talk] Factor-talk Digest, Vol 37, Issue 1

2009-05-01 Thread Doug Coleman
Hugh, Here are some answers to your questions: EXIT From the docs on with-return ( \ with-return help ) Examples Only Hi will print: USING: prettyprint continuations io ; [ Hi print return Bye print ] with-return Hi This is currently a bit slow (uses continuations) but it could

Re: [Factor-talk] Executable images

2009-05-01 Thread Doug Coleman
I uploaded new boot images less than an hour ago. Can you try bootstrapping again with the latest image and let me know if it works? Doug On May 1, 2009, at 4:10 PM, zimbatm wrote: Ok, thx for the help. I got this on OSX (commit 685ee8767a71f6880d2cdd5f413e9693e6f901b4 ): ./factor

Re: [Factor-talk] multiple selection in table views

2009-05-14 Thread Doug Coleman
Sam, Try running gesture-logger run in the UI. The black window captures keyboard and mouse gestures to the white logging window. That should help you debug things. Doug On May 14, 2009, at 9:23 AM, anklesa...@gmail.com wrote: For some reason, the button-up handler isn't getting called

Re: [Factor-talk] Red Browser

2009-05-19 Thread Doug Coleman
I want to believe. :) It works on VirtualBox on my Mac and on my desktop, so it sounds like your case is not the norm. Which video card/driver are you running and which version of Windows? Also, you mean that if you run factor.exe from the most recent binary package that the window that

[Factor-talk] Another renaming: peek - last

2009-05-25 Thread Doug Coleman
Hi again, Tthere were less usages of ``peek'' than I thought, so ``peek'' has now been renamed to ``last'', and it returns the last element of a sequence or throws an out-of-bounds error. Affected words are: peek - last set-peek - set-last first-or-peek - first-or-last This ``peek'' change

Re: [Factor-talk] Changes to core/

2009-05-25 Thread Doug Coleman
] [ range-max ] bi clamp ; Alex 2009/5/26 Doug Coleman doug.cole...@gmail.com Hi everyone, I added a ``clamp'' word to math.order for clamping a value to an interval. Writing min/max by hand is error-prone and the pattern comes up fairly often. ( scratchpad ) -20 0 100 clamp . 0 ( scratchpad ) 20

Re: [Factor-talk] input-stream dynamic var by default? (csv)

2009-05-26 Thread Doug Coleman
Hi Phil, The CSV parser is missing some features that would make it more usable. Also, the code no longer looks idiomatic to me -- maybe a rewrite is in order? * Take a look at Python's CSV API http://www.python.org/dev/peps/pep-0305/ where they define dialects to be a set of TUPLE:

Re: [Factor-talk] MinGW

2009-05-30 Thread Doug Coleman
Ricardo, Thank you for reporting this problem. I've applied a similar patch to factor.sh: +MINGW32*) OS=winnt;; Please let me know if it doesn't work. Doug On May 29, 2009, at 9:46 PM, Ricardo Boccato Alves wrote: +MINGW32_NT-6.0) OS=winnt;;

[Factor-talk] FUEL's scaffold-vocab is overwriting developer-name

2009-06-01 Thread Doug Coleman
Hi Jose, I'm trying to switch to Emacs again and I found that the developer- name variable is getting overwritten by FUEL when creating a new vocabulary. The developer-name is supposed to be set once in .factor- boot-rc and then all the tools can use this variable instead of

Re: [Factor-talk] Bug in factor? - die called in console application

2009-06-06 Thread Doug Coleman
Hi Morgan, You're using the ``.'' word which is part of the prettyprinter. By default this vocabulary is not deployed. You can choose to deploy with it by running ``tests.temperature-converter deploy-tool'' and selecting this option. Alternately, you don't really need the ``.'' word --

Re: [Factor-talk] alien.inline

2009-08-01 Thread Doug Coleman
Jeremy, On Windows, including -fPIC in the compiler flags causes a harmless warning that spams the console: warning: -fPIC ignored for target (all code is position independent) Otherwise, looks good! Doug On Jul 31, 2009, at 7:43 PM, Slava Pestov wrote: Hi Jeremy, I noticed that changing

[Factor-talk] if-zero, when-zero, unless-zero, 10^, log10

2009-08-11 Thread Doug Coleman
Hi Everybody, The if-empty combinator was quite a success, so I went ahead and added if-zero as well. From the (split) word, dup zero? [ drop ] [ tail ] if-[ tail ] unless-zero Also, the pattern '10 swap ^' also came up a few times so this word is now 10^ and lives in

[Factor-talk] removed 1+ and 1-

2009-08-14 Thread Doug Coleman
Hi, Now that the compiler is better, we don't really need a 1+ or a 1- since it's the same as just calling + or -. You could possibly argue that 1+ can be read increment and 1- decrement, but it doesn't seem like that useful a distinction and you can still read 1 + in this way. ?1+ will

Re: [Factor-talk] M: winnt file-systems produces duplicate entry under Windows 7

2009-09-08 Thread Doug Coleman
Brad, Thanks for taking a look at this. I couldn't reproduce it on my Windows 7 box because I don't have an empty string mount point. The problem is we're calling normalize-path in the file-system-info word. We want to pass the raw pathnames returned from the find- volumes word, but on

[Factor-talk] Multiline strings in core/

2009-09-23 Thread Doug Coleman
Hi, Factor's strings are now multiline and a new syntax -- Triple quoted strings -- is allowed. The parsing word checks if the string is single or triple-quoted and behaves accordingly. On a triple-quoted string, you don't have to escape the double-quotes inside the string, and if your

Re: [Factor-talk] help.markup: $nl

2009-10-04 Thread Doug Coleman
$nl is easy to type and it's like a newline -- it adds space between your markup elements. So it's a Factor help markup newline, which isn't easy to confuse with the 'nl' word. The implementation is just a detail, imo the important thing is that the word name describes what it does

Re: [Factor-talk] Factor vs. Forth --- the book

2009-10-05 Thread Doug Coleman
Hi Hugh, Your Factor examples looks too much like Forth. Ideally there would be no stack shuffling at all: : par ( r1 r2 -- r ) [ * ] [ + ] 2bi / ; : pars ( seq -- val ) [ ] [ par ] map-reduce ; Chris Double's version of pars is also nice. Doug On Oct 5, 2009, at 8:50 PM, Hugh Aguilar

Re: [Factor-talk] Factor Versus Forth --- the book

2009-10-10 Thread Doug Coleman
Hi Hugh, In your book, you state that you know about the */ word in Forth, allowing you to quickly solve the resistor problem. Why not go the whole hog and ship a new word in every Forth implementation: : *+/ ( x y -- z ) 2dup + */ ; This directly solves the problem -- any competent Forth

Re: [Factor-talk] os threading locks vocab

2009-10-21 Thread Doug Coleman
Phil, I think it makes sense to totally separate out all of the new threading from the green threads implementation like we do for native/ libc io so we can bootstrap with either one until all of the issues are resolved. The current API can probably be a starting point, but I think the

[Factor-talk] More consistent word names

2009-10-28 Thread Doug Coleman
We've talked about renaming the destructive versions of words to be more consistent with the non-destructive versions for quite some time, but until now, little has been done in this direction. First off, I renamed change-each to map! and made map! return the sequence so the stack effect is

Re: [Factor-talk] More consistent word names

2009-10-28 Thread Doug Coleman
repository, I consider it a target for removal. Unused words from core/ are almost certainly going to be removed sooner or later. Doug On Oct 28, 2009, at 4:20 PM, Chris Double wrote: On Thu, Oct 29, 2009 at 9:35 AM, Doug Coleman doug.cole...@gmail.com wrote: I removed a couple of unused

[Factor-talk] A couple more changes

2009-10-28 Thread Doug Coleman
I went ahead and added a new in-place accumulate word. accumulate! ( seq identity quot -- final seq ) Some more words have been renamed: (normalize-path) - absolute-path canonicalize-path - resolve-symlinks The difference between normalize-path and absolute-path is that normalize-path

[Factor-talk] Yet another word renamed

2009-10-29 Thread Doug Coleman
I renamed sigma to map-sum. While sigma is a cute name, it's kind of obscure and just another thing to remember. For those of you who never used the sigma (now map-sum) word, the map-sum word is just a more efficient version of map sum that doesn't construct an intermediate sequence.

[Factor-talk] System time vs monotonic counters

2009-11-18 Thread Doug Coleman
Hi, I moved the monotonic counter code to the VM and adapted the threads vocabulary to use it. The reason for moving to the VM is so that threads works with the non-optimizing compiler. Previously, we had a VM primitive 'micros' and a utility word 'millis', which returned system time, and

Re: [Factor-talk] Problems with Factor on Win XP

2009-12-28 Thread Doug Coleman
Terribly sorry you had to suffer Linux for a few days... Glad it works! Have fun, Doug On Dec 28, 2009, at 6:17 PM, Joseph Moschini wrote: Doug Coleman doug.cole...@... writes: Joseph, Please try the next binary that uploads after factor-winnt-x86-32-2009-12-27-20-09.zip My fix

[Factor-talk] renaming a couple words in sequences

2010-01-22 Thread Doug Coleman
Hi, Slava recommended we rename accumulator to collector and pusher to selector so that these word names are more meaningful. accumulator [ each ] dip is like map pusher [ each ] dip is like filter In Smalltalk, Factor's map is called collect, and Factor's filter is called select, so it seems

Re: [Factor-talk] HTML parsing vocabulary

2010-03-08 Thread Doug Coleman
Hi Paul, There's an html parser with a word that should do exactly what you want already. USE: html.parser.analyzer http://reddit.com; scrape-html find-hrefs I had a better html parser but I reverted the code by accident... Doug On Mar 8, 2010, at 12:56 PM, Paul Moore wrote: Is there a

Re: [Factor-talk] HTML parsing vocabulary

2010-03-08 Thread Doug Coleman
I forgot to mention that there's also a spider library in extra/spider that might be useful. On Mar 8, 2010, at 12:56 PM, Paul Moore wrote: Is there a HTML parsing vocabulary for Factor? I guess I might be able to get away with read-xml at a pinch, but given the state of most HTML out

[Factor-talk] flags - flags{

2010-04-01 Thread Doug Coleman
Hi, I changed the flags macro to be a flags{ parsing word in order to make it more useful and clean up a bunch of places where we define actual words instead of using CONSTANT:. Instead of doing this: CONSTANT: a HEX: 2 CONSTANT: b HEX: 4 CONSTANT: c HEX: 8 : foo ( -- n ) { a b c } flags ;

[Factor-talk] flags - flags{

2010-04-01 Thread Doug Coleman
Hi, I changed the flags macro to be a flags{ parsing word in order to make it more useful and clean up a bunch of places where we define actual words instead of using CONSTANT:. Instead of doing this: CONSTANT: a HEX: 2 CONSTANT: b HEX: 4 CONSTANT: c HEX: 8 : foo ( -- n ) { a b c } flags ;

Re: [Factor-talk] Difference between MACRO: and define-transform

2010-09-19 Thread Doug Coleman
Hi Jon, I merged your branch in my local repository, but I renamed the vocabulary from random.combinators to combinators.random, changed the spacing slightly, and added an execute-random word. Great job! Sorry it took so long to merge. Doug On Sun, Sep 12, 2010 at 3:00 PM, Jon Harper

Re: [Factor-talk] Web app examples - address already in use [newbe question]

2010-09-22 Thread Doug Coleman
Hi, I recently made it a requirement that a server either start on all the ports specified or none of them. The server code attempts to bind to and immediately close an ipv6 port, and if it's successful, a server will also bind ipv6. Binding the same port on ipv4 and ipv6 shouldn't be a

[Factor-talk] Factor downloads

2010-09-27 Thread Doug Coleman
Hi, The Dreamhost server hosting downloads.factorcode.org changed IPs. DNS has been updated, but it might take a day to propagate etc etc. Doug -- Start uncovering the many advantages of virtual appliances and start

Re: [Factor-talk] Newbie: using mongodb

2010-09-27 Thread Doug Coleman
Hi, You can compile and bootstrap a working Factor by using the scripts in build-support from the git repository. On Windows: build-support\factor.cmd On Unix: build-support\factor.sh You will need Windows SDK installed on Windows, and g++ on Unix systems. Doug On Sep 27, 2010, at 3:07 AM,

Re: [Factor-talk] mysql?

2010-10-04 Thread Doug Coleman
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.

Re: [Factor-talk] The image refers to a library or symbol that was not found at load time

2010-10-05 Thread doug . coleman
Run it in the command line: ./factor -run=listener Then run the ui word: ui Then hit :c to hopefully see the error. It's probably libpango or some gl library Doug Sent from my iPhone On Oct 5, 2010, at 10:15 AM, Jim mack j...@less2do.com wrote: Until you get a better answer, I had this

[Factor-talk] alien.c-types removal

2010-10-25 Thread Doug Coleman
Hi, I've removed all of the generated words that construct/dereference the basic c-types. So, words like uint, void*, *int are gone and have been replaced. Instead, to pass pointers to c-types to the ffi, you use the ``ref'' word, and to dereference the return value you use ``deref''.

Re: [Factor-talk] Factor text-editor text-styler and formatter; building Factor

2010-10-31 Thread Doug Coleman
Hi Shaping, When you install the Windows SDK, it makes a cmd prompt link in the start menu. Try compiling it from there. I think their prompt does more than just set the PATH, but I haven't researched it. Once you get nmake working, there's a script that can build and bootstrap Factor:

Re: [Factor-talk] let, let* |

2010-11-11 Thread Doug Coleman
Try ``USE: locals'' first. Also, you are getting restarts, no? Find the option that looks good, highlight it, and hit enter. No word named “[let” found in current vocabulary search path - Abort - Use the locals vocabulary this one :-) - Defer word in current vocabulary Doug On

Re: [Factor-talk] What should I call to issue [ 8080 httpd ] in-thread again, after closing factor reopening?

2010-11-15 Thread Doug Coleman
Except, Factor already sets the REUSE flag with setsockopt. So maybe you have a Factor running in the background? Can you make a test case? Doug On Nov 15, 2010, at 2:01 PM, Jim mack wrote: Thank you! I was looking at this more as a potential regression in factor, but I think it more

Re: [Factor-talk] How do I construct a sequence from values on thestack

2010-11-16 Thread Doug Coleman
``[ ] each'' won't compile in a Factor word. You can use it in the repl, but even this may chnage in the future if repl expressions are compiled with the optimizing compiler before being executed. All Factor code should know the stack height difference after a word executes. In this case, the

Re: [Factor-talk] Using Factor to communicate over a serial port

2011-06-08 Thread Doug Coleman
Hi, There's some support for unix serial devices. You can look at the example in extra/io/serial/ unix/unix-tests.factor. Basically you make a serial object, set the path to the device, something like /dev/ttyS0 (you will need permissions, chmod /det/ttyS0 ...), set the baud rate, flags, etc.

Re: [Factor-talk] Idiomatic way of selecting multiple elements from array

2011-08-16 Thread Doug Coleman
You can do something like this: : statsitem-info ( stats -- item-info) { 0 1 3 } swap nths \ item-info slotstuple ; Doug On Tue, Aug 16, 2011 at 4:57 PM, Larry Coleman all.are.wond...@gmail.com wrote: This works, but I'm pretty sure it's not idiomatic factor, and I'll need to do something

Re: [Factor-talk] USE/USING and scripting

2011-08-19 Thread Doug Coleman
You can add your own vocabulary root, and if you put it in .factor-boot-rc then it will get run every time you bootstrap: USE: vocabs.loader /Users/erg/sekrets add-vocab-root Doug On Aug 19, 2011, at 8:26 AM, Andrew Pennebaker wrote: Is there an import command that doesn't require moving my

[Factor-talk] Graphviz gvplugin_list and dlls for Windows

2011-09-07 Thread Doug Coleman
Graphviz is one of the libraries currently holding up binary release on Windows and Mac. If we can find a fix for these problems, we can release Factor .95 soon. 1) graphviz.render is calling supported-engines as a top-level form, but my dlls don't have a gvplugin_list() call in gvc.dll. I

[Factor-talk] bootstrap error

2011-09-13 Thread Doug Coleman
alien.syntax depends on alien.libraries, and alien.libraries.unix depends on alien.syntax It's causing bootstrap to fail; not sure how we want to fix it. Doug -- BlackBerryreg; DevCon Americas, Oct. 18-20, San

Re: [Factor-talk] Strange xml error

2011-10-04 Thread Doug Coleman
Hi Michele, If you try the latest build things might work better: /Users/erg/Desktop/ex2.xml filexml XML parsing error Line: 5 Column: 9 Namespace sp has not been declared Let me know if this works for you too! Doug On Oct 4, 2011, at 9:24 AM, Michele Pes wrote: Hi to all! While parsing

Re: [Factor-talk] io.serial example

2011-10-08 Thread Doug Coleman
Right now it only works on Unix machines, so I hope you have a Linux box handy. I updated the serial library a bit -- do a `git pull' and look in extra/io/serial/unix/unix-tests.factor for how to use it. I don't have a serial port handy, so I hope the code still works after my refactoring of

Re: [Factor-talk] Simple keyboard input

2011-11-04 Thread Doug Coleman
There are two ways you can run Factor: in the terminal, or using our UI. For the terminal, you will have to set the input mode to non-canonical using tcsetattr and termios. We don't usually do this... http://tldp.org/HOWTO/Serial-Programming-HOWTO/x115.html Or you can uses curses, specifically

Re: [Factor-talk] domain specific language

2011-11-05 Thread Doug Coleman
http://factor-language.blogspot.com/2009/09/survey-of-domain-specific-languages-in.html Take a look. On Sat, Nov 5, 2011 at 11:13 AM, L N leonardne...@gmail.com wrote: Found an article about domain specific languages ... http://www.onboard.jetbrains.com/articles/04/10/lop/ The argument is

Re: [Factor-talk] Simple keyboard input

2011-11-08 Thread Doug Coleman
Those words are not relevant for this task. Doug On Nov 8, 2011, at 2:52 PM, John Porubek wrote: On Fri, Nov 4, 2011 at 6:22 PM, P. uploa...@gmail.com wrote: If we ignore the fact that that looks like a weird program for someone to want to replicate in any language... ;) It was an

Re: [Factor-talk] Windows path syntax and global variables

2012-02-20 Thread Doug Coleman
USE: tools.scaffold scaffold-factor-rc Scite should just work, it's a bug that it can't find your path. I'll check it out. There may be syntax highlighting in misc/. On Feb 20, 2012 4:29 AM, Robert Herman rpjher...@gmail.com wrote: It turns out the mixing of the escaped back slash mixed with

Re: [Factor-talk] Declarative-style code

2012-02-20 Thread Doug Coleman
CONSTANT: reception-per-head 60 USE: literals ${ venue-hire reception } sum Etc. Good luck! On Feb 20, 2012 4:20 AM, Luke Worth l...@worth.id.au wrote: Hi, As a long time Haskell fan, I've often wanted to write simple declarative code but found this a little too verbose in Factor. e.g.

Re: [Factor-talk] Crashes in Win32

2012-03-08 Thread Doug Coleman
I'm sorry to hear you're having trouble finding a good version of win32 Factor to run. You tried the latest build? What do you mean about unreliable? http://builds.factorcode.org/package?os=windowscpu=x86.32 Doug On Thu, Mar 8, 2012 at 1:25 PM, Richard Stewart rstewart2...@gmail.com wrote: I

Re: [Factor-talk] Crashes in Win32

2012-03-08 Thread Doug Coleman
My bad, I sent it that too soon. Here's the archive of past builds. Some of the ones in 2011 should be pretty stable. http://downloads.factorcode.org/windows-x86-32/ Doug On Thu, Mar 8, 2012 at 1:34 PM, Doug Coleman doug.cole...@gmail.com wrote: I'm sorry to hear you're having trouble

Re: [Factor-talk] build farm down?

2012-05-24 Thread Doug Coleman
I'm running a build farm for Linux32/64 and Windows32/64. There's a Mac Pro nearby that I'll set up for Mac32/64 soon. If you look at the dashboard (http://builds.factorcode.org/dashboard) you can see which tests are failing and which machines are up. It says the crashed build machines are Linux

  1   2   3   >