Re: [Factor-talk] osx emacs FUEL

2015-06-01 Thread John Benediktsson
The .factor-boot-rc is used during bootstrap, but if you just download and use a release, you might want to put that code in .factor-rc which is run each time Factor starts. Also, I'm a bit confused -- your examples uses emacspath but the documentation for editors.emacs says to set the path to

Re: [Factor-talk] osx emacs FUEL

2015-06-01 Thread John Benediktsson
$ find . | grep emacsclient ./Contents/MacOS/bin-i386-10_5/emacsclient ./Contents/MacOS/bin-powerpc-10_4/emacsclient ./Contents/MacOS/bin-x86_64-10_5/emacsclient ./Contents/MacOS/bin-x86_64-10_7/emacsclient ./Contents/MacOS/bin-x86_64-10_9/emacsclient On Mon, Jun 1, 2015 at 8:04 AM, John Benediktsson

Re: [Factor-talk] Recent planet-factor articles on MIDI

2015-04-28 Thread John Benediktsson
Hi Harold, It would be nice to have some sound manipulation libraries in Factor, whether MIDI or Csound or something else. This just happened to be a little library I wrote while learning how MIDI file format worked. Given how easy MIDI files are to work with, you could easily build some sound

Re: [Factor-talk] Contributing to Factor

2015-04-09 Thread John Benediktsson
Hi Alexander, We love contributions, thanks! Pull requests on the GitHub repo (https://github.com/slavapestov/factor) are very welcome, or opening an issue with some sample code or changes that are important to you. Anything from documentation improvements, new test cases, vocabularies, etc.

Re: [Factor-talk] Rosetta Code

2015-04-09 Thread John Benediktsson
Random integer 1..5, can be done a few other ways (not sure if your floor creates bias). 5 random 1 + 5 [1,b] random Not sure you need ``integer`` conversion in dice7, should already be integers. Your ``roll`` word can be replaced with ``replicate``, is simpler, for example: 10 [

Re: [Factor-talk] How to pass a VarArg to a C function?

2015-04-09 Thread John Benediktsson
Doug Coleman noticed a similar return value in some of his testing, I'm not sure where it is coming from - any chance it is some kind of bitmask of response values? Hah, I don't use Windows much, and found some sample code that still worked (yay for backwards compatibility!), but would love to

Re: [Factor-talk] Factor version 0.97

2015-04-08 Thread John Benediktsson
Hi Fabian, Very sorry for the trouble you are having. This is a small bug with library paths and has been fixed in the latest nightly (which will become 0.98 soon). In the meantime, you can either try the nightly build (good and stable) or do this from a command line: $ ./factor

Re: [Factor-talk] How to pass a VarArg to a C function?

2015-04-07 Thread John Benediktsson
I ran into this while working on the file-picker vocabulary for cross-platform open and save dialogs. You can see how we did this for GTK: https://github.com/slavapestov/factor/blob/master/extra/file-picker/linux/linux.factor Basically, defined an alien function with the args we intended it to

Re: [Factor-talk] Advice for talk

2015-03-12 Thread John Benediktsson
2) I also remember a discussion about making the font in the listener bigger (I gave a talk at work, in order to prepare for the conference, and I ended up having to decrease the resolution in order for everyone to see, but then some contextual menus were partially hidden). IN:

Re: [Factor-talk] Advice for talk

2015-03-11 Thread John Benediktsson
1) I remember someone mentioned a tool that would show the speculative status of the stack in realtime while entering words. You might mean the watch word, although it writes to the input-stream so sometimes is a little difficult to use with the UI words: IN: scratchpad : foo ( x y -- z

Re: [Factor-talk] Glitch in stringxml example?

2015-03-03 Thread John Benediktsson
Well, this fails: bodybr/body stringxml But these both succeed: bodybr//body stringxml bodybr/br/body stringxml Looks like it's not proper XHTML? If it helps we have HTML5 parsers in html.parser, and words to work with it in html.parser.analyzer: bodybr/body parse-html

Re: [Factor-talk] printf - Stack effect declaration

2015-03-03 Thread John Benediktsson
Hi Georg, The ``printf`` word is a macro. You can see it starts with MACRO: definition. That means you can do this to see the code (``quot``) that is generated: [ Test\n printf ] expand-macros It also means that when you call it like you did, it will essentially generate and run that

Re: [Factor-talk] Turning a string into a char-array for C

2015-03-02 Thread John Benediktsson
You could do something like this to get a byte array to pass to the function if passing a string doesn't work: IN: scratchpad hello utf8 encode . B{ 104 101 108 108 111 } Other encodings are available, like ascii or utf16, etc.. On Mon, Mar 2, 2015 at 10:15 AM, Mark Green

Re: [Factor-talk] Turning a string into a char-array for C

2015-03-01 Thread John Benediktsson
The c-string type handles encoding and decoding to a known encoding like UTF8 which is the default I think. See the encode and decode words for under the covers how it works. On Mar 1, 2015, at 3:55 PM, Doug Coleman doug.cole...@gmail.com wrote: Hi Mark, You can try using the

Re: [Factor-talk] Desperate UI help

2015-02-21 Thread John Benediktsson
Hi Mark, The UI is a cross-platform interface built on OpenGL and we haven't implemented cross-platform popups or modal dialogs. The current popups are rendered into the window. However, we support on each platform calling any of the native UI's. So basically anything you can create on the

Re: [Factor-talk] ActiveX DLL

2015-02-21 Thread John Benediktsson
The online docs are unfortunately not generated by our builders cross-platform right now. Something our new parser should hopefully fix. I recommend doing: IN: scratchpad windows.com about And looking through those docs on your local Windows install. Best, John. On Sat, Feb 21, 2015 at

Re: [Factor-talk] connection to listener dropping in fuel mode in emacs

2015-02-09 Thread John Benediktsson
This bug hasn't been reported as far as I know and we have lots of users of fuel mode... maybe if you can try and figure out what triggers it and file a bug report on github so we can help you debug? https://github.com/slavapestov/factor/issues On Sun, Feb 8, 2015 at 8:30 PM, Michael Maul

Re: [Factor-talk] Exporting a C API

2015-02-09 Thread John Benediktsson
Should be possible as the FFI supports calls and callbacks, but I'm not aware of anyone who has tried. Love the idea, though! On Sat, Feb 7, 2015 at 6:22 AM, Marmaduke Woodman mmwood...@gmail.com wrote: Hi I'm curious as to the feasability of exporting a C API for a library written in

Re: [Factor-talk] read standard input line by line

2015-02-08 Thread John Benediktsson
Hi Vadim, That looks like a small bug in the UI listener with copy-paste, if you type ``readln readln`` and hit enter, and then type two lines (instead of pasting) it appears to work. Some workarounds, you generally will be writing I/O code that abstracts away from where you are reading, so you

Re: [Factor-talk] State of OpenCL bindings

2015-02-07 Thread John Benediktsson
Hmm, the tests seem to pass on the build machines, but it fails locally for me. Let me talk to @erg and see what we can find. Best, John. On Sat, Feb 7, 2015 at 6:19 AM, Marmaduke Woodman mmwood...@gmail.com wrote: Hi I'd like to use OpenCL, but the tests for Factor's bindings fail on two

Re: [Factor-talk] State of OpenCL bindings

2015-02-07 Thread John Benediktsson
Looks like the tests are failing - will have to look into why. They were being ignored on the build machines. On Feb 7, 2015, at 6:19 AM, Marmaduke Woodman mmwood...@gmail.com wrote: Hi I'd like to use OpenCL, but the tests for Factor's bindings fail on two machines (Win 7 Mac OS X)

Re: [Factor-talk] Naive loop optimization

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

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

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

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

2015-02-05 Thread John Benediktsson
Hi Jochen, Are you able to share what is on the error dialog? It is possible you don't have the right GTK dependencies (or that Factor is not able to find them). Have you tried a latest development release from factorcode.org? Thanks, John. On Thu, Feb 5, 2015 at 2:51 PM, Jochen Schmitt

Re: [Factor-talk] ! Comments

2015-01-29 Thread John Benediktsson
Right now the comment character is not hard-coded in the lexer which causes us to discover poor errors like this one in some syntax words that aren't comment-aware. There are a couple others we are planning on fixing also. Maybe you can add your test case to this issue:

Re: [Factor-talk] Talk about Factor

2015-01-29 Thread John Benediktsson
I think your tutorial will provide a good base for a presentation! There are a couple of talks available to look at: extra/chicago-talk extra/galois-talk extra/google-tech-talk extra/jvm-summit-talk extra/minneapolis-talk extra/otug-talk extra/tc-lisp-talk

Re: [Factor-talk] Minimal exe

2015-01-28 Thread John Benediktsson
28, 2015 at 8:09 AM, Alexander Iljin ajs...@yandex.ru wrote: Hi, John! 28.01.2015, 18:56, John Benediktsson mrj...@gmail.com: That gives you a hello-world binary of about 1 MB. The factor binary itself is about 480k, I think. So in general I agree with you that we could use some trim

Re: [Factor-talk] Minimal exe

2015-01-28 Thread John Benediktsson
Hi Alexander, I'm glad you're taking a look at Factor - the feedback is nice to get. Factor and Forth share similar-looking syntax, but Factor has a different set of internals and primitives that it builds with, for things like GC and arbitrary-sized integers (a bit like a high level memory

Re: [Factor-talk] ndrop

2015-01-28 Thread John Benediktsson
Feel free to ask more questions on the mailing list, or through a Github Issue if you'd like some help. On Wed, Jan 28, 2015 at 7:48 AM, Alexander Iljin ajs...@yandex.ru wrote: Hello, Jon! Thank you, you've explained a lot! It's funny that I stumbled into this on my second day of

Re: [Factor-talk] A performance challenge

2015-01-25 Thread John Benediktsson
If you want to avoid those dynamic type checks and not use TYPED, another alternative is declare: { object array fixnum } declare On Jan 25, 2015, at 9:12 AM, Björn Lindqvist bjou...@gmail.com wrote: 2015-01-18 2:44 GMT+00:00 John Benediktsson mrj...@gmail.com: Also, minor comment

Re: [Factor-talk] A performance challenge

2015-01-17 Thread John Benediktsson
Factor is pretty fast already, but there are also some pretty low-hanging fruit like these: * Lift generic dispatch out of loops, for example this 30% win for iterating over slices: https://github.com/slavapestov/factor/issues/1213 https://github.com/slavapestov/factor/issues/839 *

Re: [Factor-talk] Google+ Factor community and first question

2015-01-16 Thread John Benediktsson
You almost got it right in your original question, and you found the answer, but I wanted to explain further what was broken: This will break the same way your first version did: IN: scratchpad { factor is awesome } 0 [ length + ] each The problem is if you look at the stack effect for

Re: [Factor-talk] UI worlds and printing question

2015-01-16 Thread John Benediktsson
I'm not sure about your first question, our popups are just rendered in the window itself, I think we could easily support modal windows but I don't think support for this has been generalized to all windows. You can see an example of an application-modal window working like this (implemented as

Re: [Factor-talk] deploy no longer working with new nightly build

2014-12-24 Thread John Benediktsson
Oh, I'm sorry that I forgot to mention. This needs new staging images for deploy so you need to delete the old ones which are not compatible with the new handling of the arguments: USE: tools.deploy.backend delete-staging-images Let me know if that works for you? Thanks, John. On

Re: [Factor-talk] How to call up a terminal process to run script in OS X ?

2014-12-23 Thread John Benediktsson
The Factor launcher is for directly running processes. 1) You can run your rake command directly: { rake RubyMotionSamples/ios/Timer } try-process 2) Or if you want to run it in your Terminal.app, then maybe a bit of applescript: USE: cocoa.apple-script RubyMotionSamples/ios/Timer

Re: [Factor-talk] Variable command-line only contains arguments

2014-12-23 Thread John Benediktsson
:59 AM, Georg Simon georg.si...@auge.de wrote: Am Mon, 22 Dec 2014 22:45:55 -0800 schrieb John Benediktsson mrj...@gmail.com: Hi John, thank you. So I can wait for the next nightly build I assume. Georg Hi Georg, I pushed a fix to provide you the executable name. Basically

Re: [Factor-talk] Variable command-line only contains arguments

2014-12-22 Thread John Benediktsson
Hi Georg, I don't see a difference between deploy and when a script/vocabulary is run directly. Is your question about deploy, or how to obtain the command/executable name? Thanks, John. On Mon, Dec 22, 2014 at 2:21 AM, Georg Simon georg.si...@auge.de wrote:

Re: [Factor-talk] A stub of a package manager

2014-12-22 Thread John Benediktsson
Hi Andrea, I think it's a great idea! And I love that you built something we can start using and thinking about. My preference would be to keep it simple and iterate on it as often as you can. Start solving problems and when you come across some new problem that needs solving, well then solve

Re: [Factor-talk] Variable command-line only contains arguments

2014-12-22 Thread John Benediktsson
the build successfully uploads) On Dec 22, 2014, at 9:24 AM, Georg Simon georg.si...@auge.de wrote: Am Mon, 22 Dec 2014 06:51:22 -0800 schrieb John Benediktsson mrj...@gmail.com: Hi Georg, I don't see a difference between deploy and when a script/vocabulary is run directly. Is your

Re: [Factor-talk] Variable command-line only contains arguments

2014-12-22 Thread John Benediktsson
to the script. If you need the executable name, you can just call ``(command-line) first`` for right now. (Assuming you update to master) Best, John. On Mon, Dec 22, 2014 at 9:32 AM, John Benediktsson mrj...@gmail.com wrote: We try and make it consistent between deployed and non-deployed

Re: [Factor-talk] Some UI questions

2014-12-20 Thread John Benediktsson
Hi Mark, 1) There are several ways to accomplish this, the simple answer is: Hello, world label { 0 2 } border Testing open-window Longer answer, you can investigate ui.gadgets.grid and ui.gadgets.corners for other layouts that allow more control, but a border that expands in one

Re: [Factor-talk] Some UI questions

2014-12-20 Thread John Benediktsson
Hi Mark, I forked your project on Github and made some fixes so the drop menu works now for me. https://github.com/hyphz/fr8x-editor/pull/1 Best, John. On Sat, Dec 20, 2014 at 3:16 PM, Mark Green m...@antelope.nildram.co.uk wrote: Hi, Thanks very much for the help. This is really

Re: [Factor-talk] Not a Win32 Application?

2014-12-19 Thread John Benediktsson
Dang, sorry that 0.97 isn't working for you. We'll try and get that fixed for a new release in the next couple weeks. On Fri, Dec 19, 2014 at 4:50 PM, Alexander Iljin ajs...@yandex.ru wrote: Hi, Doug! 20.12.2014, 03:38, Doug Coleman doug.cole...@gmail.com: All the previous releases are

Re: [Factor-talk] Multiple quotation reduce?

2014-12-18 Thread John Benediktsson
Hi Mark, You could try this: { 1 2 3 } { [ f ] [ g ] [ h ] } { } [ call ] 2reduce On Thu, Dec 18, 2014 at 4:38 PM, Mark Green m...@antelope.nildram.co.uk wrote: Hi, Is there any version of reduce which accepts an array of values and an array of quotations, and performs reduce but rather

Re: [Factor-talk] Changing global variables at parse time

2014-12-16 Thread John Benediktsson
Also, I'm not sure why you need a parsing word for that, you can just: IN: foo SYMBOL: foo IN: bar foo [ hello ] initialize ... or hello foo set-global the first will initialize if not ``f``, the second will always set. On Tue, Dec 16, 2014 at 8:55 AM, Andrea Ferretti

Re: [Factor-talk] Changing global variables at parse time

2014-12-16 Thread John Benediktsson
If you want your code to work the way you intend, using a local namespace, then how about this: SYNTAX: FOO: scan-token '[ _ foo set ] append! ; That will set in the namespace that you want. On Tue, Dec 16, 2014 at 8:59 AM, John Benediktsson mrj...@gmail.com wrote: Also, I'm not sure why you

Re: [Factor-talk] Changing global variables at parse time

2014-12-16 Thread John Benediktsson
this works? BR kuo 於 2014/12/17 上午1:00, John Benediktsson 提到: If you want your code to work the way you intend, using a local namespace, then how about this: SYNTAX: FOO: scan-token '[ _ foo set ] append! ; That will set in the namespace that you want. On Tue, Dec 16, 2014 at 8

Re: [Factor-talk] Data format macro

2014-12-15 Thread John Benediktsson
Hi Mark, The UI is mostly built as a cross platform interface using OpenGL, rather than using system-specific things like dialog boxes, however Factor has a well used FFI interface that allows calling into C code cleanly and easily. It also supports conditional compilation, you'll see we have

Re: [Factor-talk] Sorry, another request for advice..

2014-12-14 Thread John Benediktsson
Well, you have a few things you could try off the top of my head for that: 4 7 bitreader bsread-string 8 7 bitreader bsread-string [ [ 4 7 ] dip bsread-string ] [ [ 8 7 ] dip bsread-string ] bi [ 4 7 rot bsread-string ] [ 8 7 rot bsread-string ] bi [ 4 7 8 7 ] dip [

Re: [Factor-talk] Fwd: Macros and unpacking bitstreams

2014-12-14 Thread John Benediktsson
A different approach that is more self-documenting might be to use accessors instead of a boa-constructor (perhaps just a tad less efficient, although likely not that you'd ever notice): scData new test SC get-chunk first { [ 4 7 bsread-string creator ] [ 4 7 bsread-string

Re: [Factor-talk] Data format macro

2014-12-14 Thread John Benediktsson
Hi Mark, You can pretty much do anything you want, defining a tuple class is relatively simple. I'm not a huge fan of making magical words (meaning creating read-scData is a side effect and you can't grep the source tree for it, but that might be okay for your use case). Below is one way where

Re: [Factor-talk] Sorry, another request for advice..

2014-12-13 Thread John Benediktsson
Cant' speak for all subscribers, but I don't mind the questions. How about this? : get-chunk ( alist id -- chunk ) swap at* [ first msb0-bit-reader ] [ Missing chunk type throw-set-loading-error ] if ; : bsread-string ( count width bitreader -- string ) '[ _ _

Re: [Factor-talk] Deploying application

2014-12-12 Thread John Benediktsson
John Benediktsson mrj...@gmail.com writes: You could also keep them like this: { name version ... } and use execute( x -- x ) to call them On Thu, Dec 11, 2014 at 4:06 AM, Roberto López roberto.lo...@acm.org wrote: Hi Andrea, Yes, I'm already working

Re: [Factor-talk] Code Check and UI request

2014-12-12 Thread John Benediktsson
Hi Mark, Just a couple comments: Those buttons are border buttons: IN: scratchpad The Label [ the action print ] border-button gadget. (also note the use of gadget. for displaying a gadget inline with the listener, kinda neat way to test UI stuff) Your code looks pretty nice, I would

Re: [Factor-talk] File Chooser

2014-12-12 Thread John Benediktsson
Yes, but that usually requires hooking into the platform directly. We have support in Mac OS X, for example: IN: scratchpad USE: cocoa.dialogs IN: scratchpad open-panel I'm not sure about the other platforms, but it might have been built already. On Fri, Dec 12, 2014 at 4:54 PM, Mark

Re: [Factor-talk] Deploying application

2014-12-11 Thread John Benediktsson
. John Benediktsson mrj...@gmail.com writes: Hi Robert, It's unlikely this is due to PEGs, for example this example I just now made from an old blog post works using Level 1 and deploy as console application: http://paste.factorcode.org/paste?id=3408 It is more likely

Re: [Factor-talk] Code check and UI request

2014-12-11 Thread John Benediktsson
You can look at the code directly, or the -tests for examples of usage. https://github.com/slavapestov/factor/blob/master/basis/bitstreams/bitstreams-tests.factor We always link to -docs (even if it doesn't exist, like in this case). It would be good to add some documentation for it. On Thu,

Re: [Factor-talk] Code check and UI request

2014-12-10 Thread John Benediktsson
Hi Mark, I did some quick cleanup without really trying to change any of your algorithm or anything here, you can scroll to the bottom for the cleanest one: http://paste.factorcode.org/paste?id=3409 Using locals is nice when it makes writing code quickly, but over time you'll find ways to

Re: [Factor-talk] Quotations and generics

2014-12-05 Thread John Benediktsson
You could use the stack-checker to infer the effect of the quotation and then dispatch like this: ``` M: quotation |+| dup infer in length { { 1 [ [ bi |+| ] 2curry ] } { 2 [ [ 2bi |+| ] 2curry ] } { 3 [ [ 3bi |+| ] 2curry ] } } case ; ``` But you might start

Re: [Factor-talk] Quotations and generics

2014-12-05 Thread John Benediktsson
And more generally, using the ``generalizations`` vocabulary: M: quotation |+| dup infer in length [ nbi |+| ] 3curry ; On Fri, Dec 5, 2014 at 7:22 AM, John Benediktsson mrj...@gmail.com wrote: You could use the stack-checker to infer the effect of the quotation and then dispatch like

Re: [Factor-talk] Quotations and generics

2014-12-05 Thread John Benediktsson
stop to surprise me! :-) 2014-12-05 16:23 GMT+01:00 John Benediktsson mrj...@gmail.com: And more generally, using the ``generalizations`` vocabulary: M: quotation |+| dup infer in length [ nbi |+| ] 3curry ; On Fri, Dec 5, 2014 at 7:22 AM, John Benediktsson mrj...@gmail.com wrote

Re: [Factor-talk] Help fix the Homebrew formula

2014-12-03 Thread John Benediktsson
Hi Andrew, Thanks for the bug report! I use homebrew, but didn't know about installing apps this way -- pretty neat! I've made a fix for this that will be in nightly builds, we didn't properly resolve all symlinks when looking for the factor executable, so trying to generate a symlink in

Re: [Factor-talk] Output parameters in alien

2014-11-28 Thread John Benediktsson
I think you won't be able to use with-out-parameters which seems to work really well with value types, but maybe not so well for your example. Part of the problem might be the way c-string automatically encodes and decodes using your encoding (utf8 by default I think). Factor strings are not the

Re: [Factor-talk] Factor tutorial

2014-11-22 Thread John Benediktsson
Hi Andrea, Wow, great contribution!! Some comments: You might avoid naming your factorial word ! or at least make a small comment to your readers that it shadows the ! token that is used for comments in the code (preventing its use as comments). IN: scratchpad ! a comment IN:

Re: [Factor-talk] Multithreading in Factor

2014-11-21 Thread John Benediktsson
- is it possible to start the second Factor instance from the first one? I guess this is possible using run-detached, but maybe there is something Factor specific. Phil Dawes spent some time working on a patchset to allow starting multiple Factor VM's in their own threads. You can see a

Re: [Factor-talk] Factor 0.97 now available

2014-11-20 Thread John Benediktsson
-05 18:01 GMT+01:00 Björn Lindqvist bjou...@gmail.com: Yeah that's probably needed. 2014-11-05 16:35 GMT+01:00 John Benediktsson mrj...@gmail.com: Hmm, maybe we should revert back to requiring development libraries for now, and do a 0.97.1 release. On Wed, Nov 5, 2014 at 1:07 AM, Andrea

Re: [Factor-talk] Factor 0.97 now available

2014-11-20 Thread John Benediktsson
-20 14:51 GMT+01:00 John Benediktsson mrj...@gmail.com: I believe it it fixed in the development release (could you check?), but we want to make sure before doing a small point release. Right now we are thinking of releasing master vs only backporting that patch. Master has some good changes

Re: [Factor-talk] Multithreading in Factor

2014-11-20 Thread John Benediktsson
I wrote a few posts about servers, here is one simple echo server example: http://re-factor.blogspot.com/2012/08/echo-server.html Also, this is a telnet server implemented fairly simply: https://github.com/mrjbq7/re-factor/blob/master/telnet-server/telnet-server.factor On Thu, Nov 20,

Re: [Factor-talk] Factor 0.97 now available

2014-11-05 Thread John Benediktsson
Hmm, maybe we should revert back to requiring development libraries for now, and do a 0.97.1 release. On Wed, Nov 5, 2014 at 1:07 AM, Andrea Ferretti ferrettiand...@gmail.com wrote: It works for me too. Any chance this fix will be deployed in the official download? It is unforunate that the

Re: [Factor-talk] Factor 0.97 now available

2014-11-03 Thread John Benediktsson
We've been brainstorming a few things. Not sure how much of it will be done and in what order, but some of the features I'd like us to work on: - new parser to allow parsing cross-platform vocabularies without loading them and development of useful refactoring tools - improve compiler for

Re: [Factor-talk] Factor 0.97 now available

2014-11-03 Thread John Benediktsson
behavior? Or both? Sorry it's not working! Thanks, John. On Nov 3, 2014, at 11:24 AM, mr wzrd wzr...@gmail.com wrote: Don't have /usr/lib/libgtk-x11-2.0.so.0. On 11/02/2014 11:11 PM, John Benediktsson wrote: Do you have a /usr/lib/libgtk-x11-2.0.so.0? On Sun, Nov 2, 2014 at 8:00 PM, mr

Re: [Factor-talk] Factor 0.97 now available

2014-11-03 Thread John Benediktsson
at 6:39 PM, mr wzrd wzr...@gmail.com wrote: On 11/03/2014 03:05 PM, John Benediktsson wrote: Okay, we switched to using alien.libraries.finder to look for C libraries instead of hard-coding their paths. Seems logical. Sounds like there is something about your setup that is not able

[Factor-talk] Factor 0.97 now available

2014-11-02 Thread John Benediktsson
individuals: Alex Vondrak, Andrew Pennebaker, Benjamin Pollack, Björn Lindqvist, CW Alston, Doug Coleman, Erik Charlebois, Fred Alger, Iskander Sitdikov, John Benediktsson, Jon Harper, Loryn Jenkins, Paul Woolcock, Roc King, Samuel Tardieu, Steven Stewart-Gallus, and @Profpatsch Besides

Re: [Factor-talk] Factor 0.97 now available

2014-11-02 Thread John Benediktsson
. From $HOME/Downloads/factor-0.97, ./factor causes the aforementioned error. - mrw On 11/02/2014 07:46 PM, John Benediktsson wrote: If birds can glide for long periods of time, then... why can’t I? - Orville Wright I'm very pleased to announce the release of Factor 0.97! You can find

Re: [Factor-talk] zlib1.dll

2014-10-26 Thread John Benediktsson
Hi Vadim, We have made some Windows DLLs available for convenience: 32-bit: http://downloads.factorcode.org/dlls/ 64-bit: http://downloads.factorcode.org/dlls/64/ You can also get the latest version of that particular DLL from the zlib project: http://www.zlib.net/DLL_FAQ.txt You

Re: [Factor-talk] Debugging factor

2014-10-11 Thread John Benediktsson
Hi Andrea, The dialog that pops up says data stack underflow, which given that all operations essentially compute on the data stack means you had insufficient objects on the stack for the computation. I just realized we don't document what this means in a very discoverable way:

Re: [Factor-talk] How to use another column-title-background ?

2014-09-21 Thread John Benediktsson
Hi Georg, Currently the UI colors and fonts are kinda hard-coded. You'll find them in a few places, we have an open issue to provide some themability (like dark backgrounds in the listener), but haven't yet gotten around to building that. You can probably put together a custom table by

Re: [Factor-talk] some command line arguments after a -run switch disappear

2014-09-14 Thread John Benediktsson
That looks like a bug, I opened an issue and provided a possible fix: https://github.com/slavapestov/factor/issues/1133 Seems we need to a few more tests for the command-line vocabulary than we have... On Sun, Sep 14, 2014 at 2:03 AM, Georg Simon georg.si...@auge.de wrote:

Re: [Factor-talk] how to calculate count of days

2014-09-04 Thread John Benediktsson
I think timestampymd just ignores the timezone information, and should produce the same output (in fact I think implemented the exact same way) as your timestampYMD. On Thu, Sep 4, 2014 at 9:44 AM, Georg Simon georg.si...@auge.de wrote: If I do understand the Factor code ymdtimestamp

Re: [Factor-talk] how to calculate count of days

2014-09-04 Thread John Benediktsson
Hmm, I think you're effectively doing today (in local time) minus today (in GMT), which is something sorta like this: today dup clone 0 hours gmt-offset time- durationhours (this should output the number of hours from GMT in your local timezone) The time- word takes timezones into account,

Re: [Factor-talk] Dollar amounts

2014-09-03 Thread John Benediktsson
The command line listener does not have keybindings for history or searching, you can get that two ways: 1) using ``rlwrap ./factor`` which has the effect of adding history and emacs ctrl-a/k/d/n/p keybindings 2) using ``./factor -run=readline-listener`` which has a per-session history, emacs

Re: [Factor-talk] how to calculate count of days

2014-09-03 Thread John Benediktsson
Perhaps simpler would be just converting to GMT first: today gmt 2014-08-31 ymdtimestamp time- durationdays On Wed, Sep 3, 2014 at 1:22 AM, Georg Simon georg.si...@auge.de wrote: Am Tue, 2 Sep 2014 19:09:45 -0700 schrieb Alex Vondrak ajvond...@gmail.com: Thank you. ... That is, if

Re: [Factor-talk] how to calculate count of days

2014-09-03 Thread John Benediktsson
to the API. We were trying to preserve timezone information as much as possible, so for example as you convert a YMD to a timestamp, it assumes GMT. Later, as you use it, the timezone is included for time differences and other words. On Wed, Sep 3, 2014 at 3:10 PM, John Benediktsson mrj

Re: [Factor-talk] Dollar amounts

2014-09-01 Thread John Benediktsson
If you use ``ui.clipboards``, you can do this: IN: scratchpad USE: ui.clipboards IN: scratchpad Factor is awesome clipboard get set-clipboard-content Now, just paste! (One could argue the api could be a little cleaner and hide the use of namespaces when using the standard system

Re: [Factor-talk] Multiuser Deployment of Factor

2014-08-21 Thread John Benediktsson
There are still one or two remaining issues to make factor work in multiuser environments. It's close though, here is one of the issues tracking it: https://github.com/slavapestov/factor/issues/495 Part of the problem is when a user runs save (since Factor is image-based, this saves the users

Re: [Factor-talk] Multiuser Deployment of Factor

2014-08-20 Thread John Benediktsson
One other note is that if you wish your students to use a different work directory, you can use the ~/.factor-roots file to list alternative vocabulary roots. On Aug 20, 2014, at 12:28 PM, Dave Carlton li...@polymicrosystems.com wrote: Glad to see some more interest in Factor. I have been

Re: [Factor-talk] Factor git repository update

2014-07-03 Thread John Benediktsson
We'd welcome any contributions towards 0.97, that list are a couple of the tougher ones. About the only critical one right now is a proposed change to modular arithmetic, where if you have something like: TYPED: fix+ { x: fixnum y: fixnum -- z ) + ; It will no longer guarantee that z is a

Re: [Factor-talk] new book including Factor chapter

2014-06-28 Thread John Benediktsson
to it. Best, John. On Wed, Jun 25, 2014 at 9:50 AM, Andrea Ferretti ferrettiand...@gmail.com wrote: Great news! Does a book centered only on Factor exist yet? I remember reading that someone (possibly John Benediktsson?) had started one, but I do not find a link anymore 2014-06-25 14:52 GMT+02:00

Re: [Factor-talk] cdr

2014-06-26 Thread John Benediktsson
Should be pretty easy to wrap ``libburn`` or other cd burning software. On Thu, Jun 26, 2014 at 9:49 PM, mr wzrd wzr...@gmail.com wrote: Er, I mean, burn a cd using Factor, from the listener. On 06/27/2014 12:43 AM, mr wzrd wrote: Is it possible to burn a cd from Factor?

Re: [Factor-talk] deployed Factor apps crash on launch on OSX 10.9.3

2014-06-18 Thread John Benediktsson
No, I mean I see the same error you see on my 10.9.3 laptop, but not our Mac OS X build machines that are running an earlier version of OS X (not sure exactly which). On Wed, Jun 18, 2014 at 6:23 AM, mikel evins mev...@me.com wrote: On Jun 18, 2014, at 8:20 AM, John Benediktsson mrj

Re: [Factor-talk] Running Factor under NixOS

2014-06-17 Thread John Benediktsson
By the way, we have fixed the issue with 32-bit in git master if you want to update for all platforms (Mac, Linux, Windows). Best, John. On Jun 17, 2014, at 2:46 PM, John Porubek jporu...@gmail.com wrote: On Thu, Jun 12, 2014 at 11:42 PM, Alexis Hazell alexis.haz...@gmail.com wrote:

Re: [Factor-talk] Problem with git repository

2014-04-25 Thread John Benediktsson
Hmm, works fine for me, if you still have problems you can try the GitHub mirrored git repository (https://github.com/slavapestov/factor): $ git clone git://factorcode.org/git/factor.git Cloning into 'factor'... remote: Counting objects: 248792, done. remote: Compressing objects: 100%

Re: [Factor-talk] [ planet-factor ] site down

2014-03-11 Thread John Benediktsson
There is some specific input that a spammer is making on paste.factorcode.org that seems to be taking down the server, not sure if this is a new bug that was introduced or an old one that is being exposed. It's related to the new-annotation url, but haven't been able to figure it out yet.

Re: [Factor-talk] [ planet-factor ] site down

2014-03-11 Thread John Benediktsson
It looks like we might have tracked down the issue. I have updated factorcode.org and will see if it stays running now. Best, John. On Tue, Mar 11, 2014 at 6:59 AM, John Benediktsson mrj...@gmail.com wrote: There is some specific input that a spammer is making on paste.factorcode.org

Re: [Factor-talk] Factor listener windows do not respond on mouse button click. Left.

2014-03-03 Thread John Benediktsson
This bug has been fixed - if you update to current master it should work. Thanks to Björn Lindqvist for the fix! On Wed, Dec 12, 2012 at 10:46 PM, John Benediktsson mrj...@gmail.comwrote: I'm sorry about this! First time we've gotten a report that mouse click doesn't work. Best repo

Re: [Factor-talk] test runner output lacks summary

2014-02-18 Thread John Benediktsson
You can tell if there are test failures, by something like this: test-failures get empty? PASS FAIL ? If all you want is to show the test-failures, you can do: :test-failures If you want to suppress output and only show the test failures: USING: io.streams.null ; [ vocab test

Re: [Factor-talk] How to reload help definitions?

2014-02-13 Thread John Benediktsson
Hi, We use file system change events to monitor for changed files. You can read about it here: http://docs.factorcode.org/content/article-io.monitors.html I'm curious if they are broken somehow on your system. Do you get any errors when running our tests? IN: scratchpad io.monitors

Re: [Factor-talk] Factor scripts - just leaking?

2014-02-11 Thread John Benediktsson
I don't get those warnings on 10.9.1, which Mac OS X version are you running? On Tue, Feb 11, 2014 at 2:17 AM, CW Alston cwalsto...@gmail.com wrote: Hi- I'm experimenting with writing/running executable Factor scripts. A simple script in a file titled hello - #! /Applications/factor/factor

Re: [Factor-talk] Compiling on Windows

2014-02-10 Thread John Benediktsson
Probably you could find some information here: http://msdn.microsoft.com/en-us/library/ft9x1kdx.aspx On Mon, Feb 10, 2014 at 6:55 AM, Jean-Marc Lugrin hb9...@lugrin.ch wrote: Hi, I try to compile from scratch on window 8 64 bits however there is an error compiling vm\os-windows-86.64.cpp

Re: [Factor-talk] Compiling on Windows

2014-02-10 Thread John Benediktsson
works fine on my system) -- hb9duj On Mon, Feb 10, 2014 at 4:44 PM, John Benediktsson mrj...@gmail.comwrote: Probably you could find some information here: http://msdn.microsoft.com/en-us/library/ft9x1kdx.aspx On Mon, Feb 10, 2014 at 6:55 AM, Jean-Marc Lugrin hb9...@lugrin.chwrote

<    1   2   3   4   5   6   >