Re: [Factor-talk] images: new words to handle sprites and extract parts of an image

2015-11-30 Thread Joe Groff
I don't believe I ever implemented atlases in that demo. I did write a quick and dirty atlas generator in extra/images/atlas you might be able to start with: http://docs.factorcode.org/content/vocab-images.atlas.html On Monday, November 30, 2015, John Benediktsson wrote: > We welcome all contri

Re: [Factor-talk] ActiveX DLL

2015-02-19 Thread Joe Groff
Factor has a simple COM bridge which may help. Check out the windows.com vocabulary. On Thursday, February 19, 2015, John Sampson wrote: > Can third-party ActiveX DLL's be called from Factor? I have a > proprietary program with a command interface in the form of an ActiveX > DLL. The author > in

Re: [Factor-talk] What exactly is the retain stack?

2014-05-16 Thread Joe Groff
On Fri, May 16, 2014 at 7:38 AM, Björn Lindqvist wrote: > 2014-05-16 0:29 GMT+02:00 Jon Purdy : > >> Is that it's only use? Then why? dip can easily be formulated using > >> non-retain stack using primitives: > >> > >> For example: "a" "b" "c" [ append ] dip -> "a" "b" "c" -rot append swap > >> >

Re: [Factor-talk] OCR via docsplit in Factor

2014-02-08 Thread Joe Groff
On Sat, Feb 8, 2014 at 7:30 PM, CW Alston wrote: > Hi - > Ok, I've upgraded using factor-macosx-x86-32-2013-07-25-14-21.dmg, > still Version 0.97. Same issue with Factor's "which": > > IN: scratchpad USE: tools.which > IN: scratchpad "couchdb" which . > f > > IN: scratchpad "python" which . > "/u

Re: [Factor-talk] building factor with mingw?

2013-09-28 Thread Joe Groff
You should build Factor for Windows using the platform SDK or Visual Studio. Mingw isn't supported. -Joe On Saturday, September 28, 2013, michikaze wrote: > Anybody know how? Can somebody write a makefile? > > > -- > Oct

Re: [Factor-talk] A Factor tutorial

2013-07-09 Thread Joe Groff
On Tue, Jul 9, 2013 at 4:35 AM, Björn Lindqvist wrote: > I didn't know that was a convention! Is there any page in the manual for > "special characters?" "?" obviously indicates a boolean predicate but > what about the other characters? Would ">>word" be a setter for example? > > For example, I'v

Re: [Factor-talk] n-slice

2013-04-14 Thread Joe Groff
will give you a sequences-of-sequences view over an existing sequence. -Joe On Sun, Apr 14, 2013 at 6:18 AM, mr w wrote: > On Sun, Apr 14, 2013 at 9:10 AM, Samuel Tardieu wrote: > > > > > > > > 2013/4/14 Boyko Bantchev > >> > >> On 14 April 2013 15:03, Samuel Tardieu wrote: > >> > If you s

Re: [Factor-talk] optimizing refactorer

2013-04-10 Thread Joe Groff
There's an implementation of "Pattern matching as inverse" in the 'inverse' vocabulary. -Joe On Tue, Apr 9, 2013 at 9:05 PM, leonard wrote: > On Tue, Apr 9, 2013 at 11:59 PM, John Benediktsson > wrote: > >> Apologies for thinking out loud. > > > > > > Not a problem! > > > > Keep thinking and

Re: [Factor-talk] using PREDICATEs

2013-03-08 Thread Joe Groff
On Friday, March 8, 2013, Loryn Jenkins wrote: > I was playing around with predicates today. > > It seems that when I attempt to run a default constructor directly on a > predicate type, I get a macro expansion error. > > I quickly grepped through the codebase in basis and extras, and couldn't > f

Re: [Factor-talk] Iterating over arrays and string

2013-01-20 Thread Joe Groff
On Sun, Jan 20, 2013 at 8:20 AM, Alex Vondrak wrote: > and noticed the same types being inferred (object vs string). So, looking > at the definitions, > > IN: scratchpad \ >array see > USING: sequences ; > IN: arrays > : >array ( seq -- array ) { } clone-like ; > IN: scratchpad \ >stri

Re: [Factor-talk] Iterating over arrays and string

2013-01-19 Thread Joe Groff
On Sat, Jan 19, 2013 at 5:35 PM, Jon Harper wrote: > Here are my questions: > 1) in bar1, "" like is enough to allow the compiler to infer type and > generate code using string-nth-fast and set-string-nth-fast instead of > nth-unsafe and set-nth-unsafe (just like using TYPED: in bar2); However, i

Re: [Factor-talk] OpenGL version in OSX

2012-10-13 Thread Joe Groff
On Sat, Oct 13, 2012 at 8:27 AM, PGGB wrote: > I have encountered a new problem. > Generating and binding vertex arrays seems to be broken with core-profile. > The problem is that in core-profile it needs to use gl3.h and not gl.h (I had > the same problem with GLFW in C++) which I assume is the

Re: [Factor-talk] OpenGL version in OSX

2012-10-12 Thread Joe Groff
On Fri, Oct 12, 2012 at 2:32 PM, PGGB wrote: > I've made big progress! I googled for the invalid-pixel-format-attributes > error on a whim and I ended up on some Java forum. Apparently the > core-profile flags clash with the windowed flag. Removing that I can create > now a window where > >

Re: [Factor-talk] OpenGL version in OSX

2012-10-12 Thread Joe Groff
On Fri, Oct 12, 2012 at 2:09 PM, PGGB wrote: > I did 'build-support/factor.sh bootstrap' but it still gives me the same > error. > When I add core-profile to my gl-tut program I get another error: > > T{ gl-error { code 1280 } { string "Invalid enumerant" } } That's probably because the

Re: [Factor-talk] OpenGL version in OSX

2012-10-12 Thread Joe Groff
On Fri, Oct 12, 2012 at 1:24 PM, PGGB wrote: > Yes it does, it is a Geforce 9400M. I have been using OpenGL 3.2 in C++ code > before. OK, just making sure. Because of some limitations of the metaprogramming features the ui.pixel-formats code uses, you may need to force-reload the `ui.pixel-forma

Re: [Factor-talk] OpenGL version in OSX

2012-10-12 Thread Joe Groff
On Fri, Oct 12, 2012 at 1:04 PM, PGGB wrote: > Thanks so much, I missed that bit! > It is working now, if I can get the core-profile to work it will be perfect. > :) Does your graphics card driver actually support 3.2? IIRC Apple only supports 3.2 for the discrete nVidia/AMD GPUs and the latest-

Re: [Factor-talk] OpenGL version in OSX

2012-10-11 Thread Joe Groff
On Thu, Oct 11, 2012 at 8:39 AM, PGGB wrote: > I've been messing around with Factor the last couple weeks and it is a lot of > fun. At the same time I am learning some graphics programming with OpenGL. > Now even though version 3.2 was added with Lion, the windows Factor creates > only seem to

Re: [Factor-talk] Mac OS X

2012-10-02 Thread Joe Groff
On Tue, Oct 2, 2012 at 3:47 PM, Brian Prentice wrote: > The page here: > > http://factorcode.org/ > > States that "Factor applications are portable between all common platforms", > but the stable release of Factor 0.95 requires Mac OS X 10.5 Leopard. > > Apple has released three new versions of

Re: [Factor-talk] Comments on 'Your First Program

2012-08-31 Thread Joe Groff
On Fri, Aug 31, 2012 at 6:33 PM, Michael Clagett wrote: > Okay, never mind. Not being a Mac guy, I must not understand it well > enough. But on my wife's and daughter's MacBook Pros I usually find that > Command + some key is roughly equivalent to Ctrl + the same key on the PC. > Never noticed

Re: [Factor-talk] Comments on 'Your First Program

2012-08-31 Thread Joe Groff
On Fri, Aug 31, 2012 at 6:25 PM, Michael Clagett wrote: > I just meant that it's not called control, it's called command. So you > could probably get by with something like Ctrl(Cmd)-C. Or Cmd(Ctrl)-C, if > you favor Macs. Or you could stick with the C-c and just explain somewhere > at the top

Re: [Factor-talk] Comments on 'Your First Program

2012-08-31 Thread Joe Groff
On Fri, Aug 31, 2012 at 5:19 PM, Michael Clagett wrote: > Just thought I would mention that there is no Ctrl key on the Mac, so this > change might not be so good for the Mac folks. Yes, there is. (Unless you mean the original Mac 128k and 512k, which Factor does not yet support.) -Joe

Re: [Factor-talk] Literate Programming

2012-08-29 Thread Joe Groff
On Wed, Aug 29, 2012 at 12:22 PM, John Benediktsson wrote: > I just pushed a vocab with some ideas that might help you get started: > > USE: 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-wo

Re: [Factor-talk] Out of memory error

2012-08-25 Thread Joe Groff
On Sat, Aug 25, 2012 at 1:36 PM, Jim Mack 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 tes

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

2012-08-24 Thread Joe Groff
On Fri, Aug 24, 2012 at 3:13 PM, P. wrote: > Joe, I was looking for something more enforced than that - so that I can > expect a package I download to "just work" and not waste time with > dependence issues. A package metadata file could perhaps have a `self-contained` flag that would restrict th

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

2012-08-24 Thread Joe Groff
On Fri, Aug 24, 2012 at 3:05 PM, P. 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

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

2012-08-24 Thread Joe Groff
On Fri, Aug 24, 2012 at 2:56 PM, P. wrote: > Here's an unpopular vote, but I'll say it anyway. > How about portable packages? > As in, if you download package P that is dependent on packages D, E, F, then > package P comes with the correct versions of D, E, F embedded in it? > That way we do away

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

2012-08-24 Thread Joe Groff
On Fri, Aug 24, 2012 at 12:33 AM, Tim Allen wrote: > I'm no expert in these matters, but it worries me a little that you > mention Ruby Gems as one potential inspiration: I know that (for > example) Debian doesn't package many Ruby libraries because the Gem > system interacts poorly with a system-

[Factor-talk] Modules/packages for Factor

2012-08-23 Thread Joe Groff
Doug and I were discussing an overhaul of Factor's vocabulary system to make it easier to work with source code outside of the Factor repository and to enable gem or npm-style package management down the line. I've sketched out a proposed design and pasted it to a Gist: https://gist.github.com/344

Re: [Factor-talk] Is there a Factor.js ?

2012-08-23 Thread Joe Groff
On Thu, Aug 23, 2012 at 11:46 AM, Michael Clagett 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 > envisioni

Re: [Factor-talk] Time for some Tutorials

2012-08-21 Thread Joe Groff
On Tue, Aug 21, 2012 at 9:27 PM, Market 0ne-Source.com wrote: > Thanks, > > I did just that, that's when the compiler error popped up. Can the issue be > over the version of the DLL ? The error you posted is an OpenGL error and has nothing to do with OpenAL. Are you using the latest OpenGL driver

Re: [Factor-talk] Any way of making sense of what's in the boot image?

2012-08-13 Thread Joe Groff
On Mon, Aug 13, 2012 at 11:52 AM, Michael Clagett 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 wi

Re: [Factor-talk] Any way of making sense of what's in the boot image?

2012-08-09 Thread Joe Groff
On Wed, Aug 8, 2012 at 9:56 PM, Michael Clagett wrote: > Hi Joe -- > > Thank you so much for your guidance. I'm assuming that it is the > basis\bootstrap\image\image.factor and the core\bootstrap\primitives.factor, > stage1.factor and syntax.factor that you are referring to? > > One question just

Re: [Factor-talk] Any way of making sense of what's in the boot image?

2012-08-08 Thread Joe Groff
On Wed, Aug 8, 2012 at 8:23 PM, Joe Groff wrote: > > The code in the bootstrap.image module outputs the bootstrap image as > a binary blob. You can get a sense for the format of the bootstrap > image and its contents by looking at that module. To clarify, by "output as a binary

Re: [Factor-talk] Any way of making sense of what's in the boot image?

2012-08-08 Thread Joe Groff
On Wed, Aug 8, 2012 at 3:24 PM, Michael Clagett wrote: > Hi -- > > I've been tracing through the initial vm initialization code trying to get a > picture of how Factor bootstraps itself. Does anyone know if there is a way > to resolve code in the initial boot image that is being jit-compiled by >

Re: [Factor-talk] Factor on multicores

2012-05-30 Thread Joe Groff
On May 29, 2012, at 11:47 PM, Konrad Hinsen wrote: Is there support for memory-mapped files? I'd have to be able to create data structures in such memory areas. Yes. Factor has a full-featured C FFI, and you can define and use structs and packed arrays that live in mapped or malloced memory. T

Re: [Factor-talk] Factor on multicores

2012-05-29 Thread Joe Groff
On May 29, 2012, at 12:42 PM, Konrad Hinsen wrote: > What I couldn't figure out is how Factor programmers deal with > today's multicore processors. Threads are apparently cooperative, > so that's not the answer. That leaves communicating processes > as an option, but is there some support library

Re: [Factor-talk] Beginner question about style and stack shuffling

2012-03-12 Thread Joe Groff
On Mon, Mar 12, 2012 at 6:00 AM, nicolas.o...@gmail.com wrote: > I quite like the style of something along the lines of: > > : swap-element ( i1 array1 i2 array2 -- ) >  [  [ nth  ] 2keep  ] 2bi@ [ set-nth ] 2 smart-apply ; > > because it shows the dataflow better than with lexical variables.

Re: [Factor-talk] Learning Factor - string, array and io handling - beginner

2012-03-11 Thread Joe Groff
> I am still not clear on the use of USE: or USING: when I am coding in SciTE > and > copying and pasting to the Listener. Also, now that I have a working bunch of > code lines, I would like to be able to execute it, but when I type '"filename" > run' or '"filename" load' it faults. I know I need

Re: [Factor-talk] Learning Factor - string, array and io handling - beginner

2012-03-10 Thread Joe Groff
On Sat, Mar 10, 2012 at 4:44 AM, Robert Herman wrote: > I solved Windows-specific installation issues I had with Factor How did you end up solving these problems? > Any tips on other functions or structures would be most appreciated. I tried > slice, joins, the CSV library,and some others, but m

Re: [Factor-talk] stack effect

2012-03-02 Thread Joe Groff
On Fri, Mar 2, 2012 at 1:32 PM, Arkady Rost wrote: > Hi! > Today I was trying to write some factor code and it turned out that I can > write such code: > 1 5 4 3 2 [ 5 = not ] loop > It works and produces stack with one element 1. I expect that at least I > would have a warning because loop word t

Re: [Factor-talk] Trying factor

2012-02-24 Thread Joe Groff
On Fri, Feb 24, 2012 at 6:59 AM, Yuri D'Elia wrote: > (U) Quotation: [ set-namestack init-catchstack self quot>> call -> stop ] > (O) Word: update-ui-loop > (O) Word: update-ui > (O) Word: notify-queued > (O) Method: M\ world graft* > (O) Word: set-up-window > (O) Method: M\ bunny-world begin-worl

Re: [Factor-talk] Trying factor

2012-02-23 Thread Joe Groff
On Thursday, February 23, 2012, Yuri D'Elia wrote: > > GL_VERSION: 3.3.0 NVIDIA 295.20 > GL_VENDOR: NVIDIA Corporation > GL_RENDERER: Quadro NVS 290/PCIe/SSE2 > > This is the binary nvidia's driver. But like I said I don't think it's a > GL issue. The nehe examples do work (and I do GL develo

Re: [Factor-talk] Trying factor

2012-02-23 Thread Joe Groff
On Thursday, February 23, 2012, Yuri D'Elia wrote: > > GL_VERSION: 3.3.0 NVIDIA 295.20 > GL_VENDOR: NVIDIA Corporation > GL_RENDERER: Quadro NVS 290/PCIe/SSE2 > > This is the binary nvidia's driver. But like I said I don't think it's a > GL issue. The nehe examples do work (and I do GL develo

Re: [Factor-talk] Trying factor

2012-02-21 Thread Joe Groff
On Tue, Feb 21, 2012 at 1:52 AM, Yuri D'Elia wrote: > I've cloned git master directly. What video card and drivers are you using? Do the demos work with OpenGL acceleration disabled? -Joe -- Keep Your Developer Skills C

Re: [Factor-talk] Trying factor

2012-02-20 Thread Joe Groff
On Mon, Feb 20, 2012 at 6:49 AM, Yuri D'Elia wrote: > I'm just trying them at work here and I have the same issue, so maybe there > is a problem with the examples themselves? If you're using 0.94, try upgrading to git master. -Joe ---

Re: [Factor-talk] Teaching myself Factor - code review, please?

2012-02-20 Thread Joe Groff
You could use `each-morsel` from the io module to implement the input loop, which would be a bit cleaner. Try laying your code out something like this: : each-window ( quot: ( index packet -- ) -- ) [ WINDOW read ] each-morsel ; inline : main ( -- ) binary decode-input bin

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

2011-12-18 Thread Joe Groff
On Sun, Dec 18, 2011 at 2:32 PM, P. wrote: > I've wondered the same. Theoretically, since Factor can infer stack > effects, one should be able to leave them out. > Stack effects can't be fully inferred in a safe manner. I forget the full details, but somewhere in the archives or his blog, Slava

Re: [Factor-talk] listener color theme

2011-12-05 Thread Joe Groff
On Mon, Dec 5, 2011 at 11:20 AM, L N wrote: > Anyone know how to change the color theme of the listener, in linux? > > - Leonard > You can't change the color scheme without hacking the source code. ui.gadgets.worlds:initial-background-color controls the background color, while individual method

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

2011-12-05 Thread Joe Groff
On Mon, Dec 5, 2011 at 8:50 AM, Michele Pes wrote: > Hi! > In my latest factor source, I encountered copy-file, which takes 2 input > strings. > At first I used recover, but the try quot takes 1 argument only. > recover's "try" quotation can take any number of inputs. "..a" in a stack effect rep

Re: [Factor-talk] Shared libraries considered harmful

2011-11-21 Thread Joe Groff
On Mon, Nov 21, 2011 at 5:09 PM, Michael Clagett wrote: > As for integration, I can see from your description of Factor's host > integration that we may indeed have different notions about this. Compared > to Lisp or Scheme I'm sure that Factor comes out ahead, no doubt about it. > When I speak a

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

2011-11-21 Thread Joe Groff
On Mon, Nov 21, 2011 at 1:33 PM, Ben Schlingelhof wrote: > Yes, I understand. I could learn cocoa and win32 apis but that's a lot of > work for one guy and my customers are an impatient bunch. Also these apis > seem not to be supported very high-level on the factor side either, or am I > overseei

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

2011-11-21 Thread Joe Groff
On Mon, Nov 21, 2011 at 1:21 PM, Ben Schlingelhof wrote: > Yeah, I agree. Special events would be wonderful. Factor does not seem to > have them, though. There's a drag gesture, but that is only for > motion-while-button-down, not for the drop itself. I'll have to accept that > button-up does not

Re: [Factor-talk] Trouble getting fuel and emacs setup

2011-11-20 Thread Joe Groff
On Sun, Nov 20, 2011 at 1:18 PM, spike wrote: > (setq fuel-listener-factor-binary "/Applications/factor/Factor.app") > You need to refer to the actual Factor binary, not the app bundle directory. Try "/Applications/factor/Factor.app/Contents/MacOS/factor". -Joe

Re: [Factor-talk] "group-by" word

2011-11-19 Thread Joe Groff
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 infrastruc

Re: [Factor-talk] Where can I get this Factor Listener?

2011-11-19 Thread Joe Groff
On Sat, Nov 19, 2011 at 5:16 AM, missingfaktor wrote: > 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. > The listener you get now is the same one as in

Re: [Factor-talk] Abstraction like Clojure's protocols?

2011-11-17 Thread Joe Groff
On Thu, Nov 17, 2011 at 12:44 PM, missingfaktor wrote: > Factor's generic words are similar to Clojure's multimethods. However > there are times when protocols (in Clojure speak) are more appropriate > abstraction. Does Factor support a construct similar to protocols? > There is a protocol const

Re: [Factor-talk] Shared libraries considered harmful

2011-11-17 Thread Joe Groff
On Thu, Nov 17, 2011 at 6:36 AM, Michael Clagett wrote: > That brings a cost, however, as I've seen up to this point. It > distributes responsibility for documenting behavior across a community that > like most communiteis is uneven in its fulfillment of responsibility. The > greater the depende

Re: [Factor-talk] MetaCat

2011-11-05 Thread Joe Groff
On Sat, Nov 5, 2011 at 11:21 AM, L N wrote: > Wondering if Factor has something similar. > For trivial things like rewriting 'swap swap', we let the compiler's optimizer deal with those. It performs many of those optimizations. To implement your own compile-time transforms, you can use Factor's

Re: [Factor-talk] type-checking

2011-11-05 Thread Joe Groff
On Sat, Nov 5, 2011 at 11:35 AM, L N wrote: > Wondering if there is a way to do type-checking in Factor. > > Sorry for the inundation of questions. > > Factor is a fascinating new environment. > > Runtime type checking is provided by the `typed` module: USE: typed TYPED: f+ ( x: float y: float

Re: [Factor-talk] docs.factorcode.org

2011-11-04 Thread Joe Groff
On Fri, Nov 4, 2011 at 5:49 PM, Fred Alger wrote: > > Hey, just noticed something odd — the documentation URLs have changed at > docs.factorcode.org. I have links from my blog pointing to, for example: > > http://docs.factorcode.org/content/word-map,sequences.html > > These now 404. The documen

Re: [Factor-talk] conditional combinator proposal

2011-09-30 Thread Joe Groff
On Sep 30, 2011, at 2:53 PM, Michele Pes wrote: > Hi to all! > While writing my little factor programs, I often find a situation in > which I have an object, > I test it and if test is ok then some action is performed on it, else it > is simply dropped. > > Ex.: (obj on top of stack) > dup test-

Re: [Factor-talk] building a native factor GUI toolkit

2011-09-29 Thread Joe Groff
On Sep 29, 2011, at 6:21 AM, Patrick Mc(avery wrote: > FLTK is small but is still 90,305 SLOC, so it would be a huge task to > port all the code to factor but if this was done I was thinking that it > might give the community something to build on. It sounds like factors > ability to reuse c

Re: [Factor-talk] Printing the docs

2011-09-18 Thread Joe Groff
On Sep 18, 2011, at 3:03 PM, Patrick Mc(avery wrote: > I'm not joking, I am thinking about factor at night when I dream, it's > absolutely fascinating but I am having a hard time learning it. With > most languages you can learn the core first and the libraries later, > with factor the line b

Re: [Factor-talk] Printing the docs

2011-09-18 Thread Joe Groff
On Sep 18, 2011, at 9:54 AM, Patrick Mc(avery 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

Re: [Factor-talk] Use of While Loop

2011-09-15 Thread Joe Groff
On Sep 15, 2011, at 8:58 PM, graham telfer wrote: > Hi, > > I am trying to get to grips with Factor. My first attempt is to write a > program to the following spec: > > Pick some positive integer and call it n. > If n is odd, multiply it by three and add one. > If n is even, divide it by two.

Re: [Factor-talk] Raven link

2011-09-14 Thread Joe Groff
On Sep 14, 2011, at 5:46 PM, Patrick Mc(avery wrote: > Not sure if this is the right place for it but there is a bad link on : > > http://concatenative.org/wiki/view/Raven > > > Raven: is a link farm now > http://mythago.net/language.html Thank you for the report. Note that concatenative.org

Re: [Factor-talk] Understanding FFI

2011-09-14 Thread Joe Groff
On Sep 14, 2011, at 3:17 PM, Slava Pestov wrote: > If you run Factor in one thread and your C code in another, then you > should be able to just use pthread mutexes. Use the Factor FFI to bind > to the pthread API, and put a lock inside your struct. Take the lock > when you modify it. The compile

Re: [Factor-talk] bootstrap error

2011-09-13 Thread Joe Groff
On Sep 13, 2011, at 11:12 AM, Slava Pestov wrote: > Hi Joe, > > Did you actually check that Factor bootstraps with your patch? It > looks like it tries to call dlerror before it's been compiled. It's a > chicken and egg problem. You'll need to move dlerror into the VM to > fix this. Factor boot

Re: [Factor-talk] bootstrap error

2011-09-13 Thread Joe Groff
On Sep 13, 2011, at 9:17 AM, Doug Coleman wrote: > 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. Fixed it by eliminating the alien.syntax dependency in alien.libraries.unix. -Joe

Re: [Factor-talk] frequency of vocabularies

2011-09-11 Thread Joe Groff
On Sep 11, 2011, at 1:42 PM, Patrick Mc(avery wrote: > Referencing the "using" count of 5575 do the other counts seem > reasonable? (some may be junk from my commands) Those numbers look believable. You could check them against the cross-reference information Factor keeps itself using the voc

Re: [Factor-talk] exe deploy files

2011-09-06 Thread Joe Groff
On Sep 6, 2011, at 2:34 AM, Michele Pes wrote: > Hi to all! > AFAIK, the deployed exe need a second file, the image file I think. > If I rename/delete this file, the app quits showing an error message. Rename both the .exe and .image so they have the same name without their extensions. > Is the

Re: [Factor-talk] Unused USE's

2011-09-02 Thread Joe Groff
On Sep 2, 2011, at 11:06 AM, John Benediktsson wrote: > Is there a way to tell for a given vocabulary what is USE'd, but not required > (i.e., unused imports)? The only way I know is to remove a vocab's imports then reload it with auto-use enabled, to get an automatically generated, shrinkwrapp

Re: [Factor-talk] Factor.NET?

2011-08-29 Thread Joe Groff
On Aug 29, 2011, at 11:43 AM, Larry Coleman wrote: > Are there any plans for a port of Factor to the .NET CLR or for a > bridge to .NET? Not that I know of. On Windows, you could perhaps interface with .NET code through the COM bridge. -Joe smime.p7s Description: S/MIME cryptographic signature

Re: [Factor-talk] TryRuby, etc.

2011-08-28 Thread Joe Groff
On Aug 28, 2011, at 5:22 PM, John Porubek wrote: > By the way, I come from a Forth background where I could implement a > simple delay word by using a simple "do loop" for something quick and > dirty or use a hardware timer for something more efficient. I know I'm > not in Kansas anymore, but wha

Re: [Factor-talk] TryRuby, etc.

2011-08-28 Thread Joe Groff
On Aug 28, 2011, at 3:07 PM, John Porubek wrote: > Thanks Joe for pointing me in the right direction. I hadn't thought of > using Factor to transcribe it's own help system. I'll let you (all) > know if I'm successful. Sure thing. You might also be interested in the "codebook" vocabulary, which

Re: [Factor-talk] Merged native-image-loader branch

2011-08-28 Thread Joe Groff
On Aug 27, 2011, at 8:21 PM, Anton Gorenko wrote: > Hi all! > > I'll take a look at these errors soon (not today, but soon). > About gdk_pixbuf_get_pixels: it seems that definition of this function > is incorrect (in GdkPixbuf-2.0.gir). Maybe it's already fixed in the > latest version. Thanks f

Re: [Factor-talk] TryRuby, etc.

2011-08-28 Thread Joe Groff
On Aug 28, 2011, at 1:56 PM, John Porubek wrote: > It's dated February 27,2008, FWIW. > > I think there would be value in a Factor 0.94 PDF. Does one exist? Could it > be easily created from the online reference? > > A PDF is a serviceable format when using a Kindle to carry documentation > al

Re: [Factor-talk] Merged native-image-loader branch

2011-08-27 Thread Joe Groff
On Aug 27, 2011, at 6:32 PM, Slava Pestov wrote: > resource:basis/gdk/pixbuf/ffi/ffi.factor > > 27: f { { pointer: GError initial: f } } > ^ > More than one vocabulary defines a word named “GError” > > The following restarts are available: > > :1 Use the gl

Re: [Factor-talk] Merged native-image-loader branch

2011-08-27 Thread Joe Groff
On Aug 27, 2011, at 5:42 PM, Slava Pestov wrote: > I'm not sure how to fix the gtk problem. It looks like there was a bad > merge. For example, now both glib.ffi and > gobject-introspection.standard-types define the guint8, etc types. It looks like the glib.ffi version got factored out after Blei

Re: [Factor-talk] Merged native-image-loader branch

2011-08-27 Thread Joe Groff
On Aug 27, 2011, at 5:15 PM, Slava Pestov wrote: > Hi Joe, > > I saw you merged your changes. However bootstrap fails on Linux now: I thought you said you tested them... Regardless, I also went ahead and moved the pure Factor image libraries to extra/ as you suggested. -Joe smime.p7s Descri

Re: [Factor-talk] Metadata

2011-08-27 Thread Joe Groff
On Aug 27, 2011, at 2:36 PM, John Benediktsson wrote: > I don't think versioning the vocabularies included in Factor is necessary. > You don't see versions in standard libraries of other languages. Sure, but some sane and convenient mechanism for loading and versioning third-party modules is

[Factor-talk] Merged native-image-loader branch

2011-08-27 Thread Joe Groff
I updated and merged my old native-image-loader branch, which makes Factor use the native Cocoa/Win32 facilities for loading images, along with Philipp Brueschweiler's gtk-image-loader branch that adds the same functionality for the GTK backend. I've tested that Windows and OS X work; could somebod

Re: [Factor-talk] Metadata

2011-08-27 Thread Joe Groff
On Aug 27, 2011, at 12:32 PM, Matt Gushee wrote: > * Version info is useful, not just for the purpose I mentioned, but > also for debugging. I agree that there ought to be a user-readable version number available programmatically. There is a build number in the image (accessible by USE: kernel

Re: [Factor-talk] Relative vocab roots

2011-08-26 Thread Joe Groff
On Aug 26, 2011, at 8:39 AM, John Benediktsson wrote: > Why are you prepending vocab-base-directory to all the roots, rather than > just putting the current directory in the list of vocab-roots and keeping the > other logic the same? That's definitely simpler, but I think that being able to ch

Re: [Factor-talk] Relative vocab roots

2011-08-25 Thread Joe Groff
On Aug 25, 2011, at 7:26 PM, Slava Pestov wrote: > Hi Joe, > > This looks good. I assume you tested it :-) My only objection is the > name vocab-base-directory. Is there a better name for this? I'm not crazy about the name either, but I couldn't think of anything better. My other choice was "i

[Factor-talk] Relative vocab roots

2011-08-25 Thread Joe Groff
Here's a patch to have the vocab loader save Factor's initial current directory at startup time and use it as the base for relative vocab roots such as ".". That way, the program changing the current directory as part of its normal operation won't affect the vocab loader. https://github.com/jck

Re: [Factor-talk] sequences and the stack

2011-08-25 Thread Joe Groff
On Aug 25, 2011, at 11:23 AM, Andrew Pennebaker wrote: > factcheck fully functional > https://github.com/mcandre/factcheck > > How should I package it so that others can install it? > > How does one install a Factor package? The Factor community's pretty tiny, so we just throw everything under

Re: [Factor-talk] sequences and the stack

2011-08-25 Thread Joe Groff
On Aug 25, 2011, at 12:34 AM, Andrew Pennebaker wrote: > Aha! How could I rewrite for-all? so that it prints the first stack that > fails the predicate? The most straightforward thing I can think of is to package up the generated values with output>sequence, then feed the array to the predicat

Re: [Factor-talk] sequences and the stack

2011-08-24 Thread Joe Groff
On Aug 24, 2011, at 10:05 PM, Andrew Pennebaker wrote: > Joe, your for-all? looks promising (and it's incredibly short). However, when > I try it, I'm still getting that macro error. In your "main" you missed the [ ] around prop-even. This line: https://github.com/mcandre/factcheck/blob/master

Re: [Factor-talk] sequences and the stack

2011-08-24 Thread Joe Groff
On Aug 24, 2011, at 9:50 PM, Andrew Pennebaker wrote: > The exemplar idea is attractive, especially since it's idiomatic in Factor. > However, an exemplar of 1 may not be precise enough for certain predicates. True. Unfortunately Factor doesn't support CLOS-style eq generics, otherwise you cou

Re: [Factor-talk] sequences and the stack

2011-08-24 Thread Joe Groff
On Aug 24, 2011, at 9:30 PM, Andrew Pennebaker wrote: > predicate { gen-type1 gen-type2 gen-type3 ... } for-all The generators needn't be in an array; they could be a simple quotation. Simply calling each generator function in turn will line up their outputs on the stack in the proper order. A

Re: [Factor-talk] sequences and the stack

2011-08-24 Thread Joe Groff
On Aug 24, 2011, at 8:44 PM, Andrew Pennebaker wrote: > Aye, it's a bit awkward, but I know that Haskell can do it because that's how > Haskell's QuickCheck library works. It even goes one step further and creates > the appropriate list of value generators according to the predicate's type. Pe

Re: [Factor-talk] sequences and the stack

2011-08-24 Thread Joe Groff
On Aug 24, 2011, at 8:38 PM, Andrew Pennebaker wrote: > $ ./example.factor > Loading /Users/andrew/.factor-rc > The word for-all cannot be executed because it failed to compile > > Cannot apply “input macro input smime.p7s Description: S/MIME cryptographic signature

Re: [Factor-talk] sequences and the stack

2011-08-24 Thread Joe Groff
On Aug 24, 2011, at 6:50 PM, Andrew Pennebaker wrote: > Is there a word more general than firstn? I'd like to push all the elements > of a sequence onto the stack. Asking for a function that pushes all the elements of an arbitrary sequence onto the stack is like asking for an [a] -> (a,a,a,...

Re: [Factor-talk] No word named “--” found in current vocabulary search path

2011-08-24 Thread Joe Groff
On Aug 24, 2011, at 3:16 PM, Slava Pestov wrote: > Hi Andrew, > > You're using the old convention (from handbook.pdf? :-) ) Please > review recent docs: > > http://docs.factorcode.org/content/article-inference.html > http://docs.factorcode.org/content/article-effects.html Even I'm having troub

Re: [Factor-talk] getopt; commandline parsing Re: Invoke MAIN: from commandline script file?

2011-08-20 Thread Joe Groff
On Aug 20, 2011, at 9:42 AM, Andrew Pennebaker wrote: > Okay, factor -help ios7crypt.factor works. It seems Factor ignores arguments > after the first script name. It looks like arguments after the script name aren't ignored, but put into a command-line variable unprocessed, and the script nam

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

2011-08-19 Thread Joe Groff
On Aug 19, 2011, at 9:46 PM, Slava Pestov wrote: > Well, using vocabulary roots you can use USING: for everything. Read > the article I linked you to, it's pretty easy to add your own > directories to the search path. Well, Andrew is objecting to a couple of things with how the vocab loader work

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

2011-08-19 Thread Joe Groff
On Aug 19, 2011, at 8:30 PM, Andrew Pennebaker wrote: > It would really be neat if you didn't have to use INCLUDE/INCLUDING for user > code and USE/USING for Factor's standard library code. The differences are: - INCLUDE: looks only in the current directory; USE: looks in the search path - INC

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

2011-08-19 Thread Joe Groff
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.

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

2011-08-19 Thread Joe Groff
On Aug 19, 2011, at 3:51 PM, Andrew Pennebaker wrote: > The parse-time trick is helpful, but it's not perfect. I'm getting an error: > > Generic word length does not define a method for the source-file class. Oops, that was a typo on my part. Should be: << USING: accessors io.pathnames namespa

  1   2   3   4   >