[Factor-talk] Multithreading

2014-06-19 Thread Andrea Ferretti
Hi all, I am new to Factor and I am just starting to dablle with it. I have to say that I am impressed that such a small community created a programming language this mature and all the libraries that surround it. I am trying to figure out the current situtation about multithreading. On the one

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

2014-06-25 Thread Andrea Ferretti
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 Fred Daoud fda...@proinbox.com: Seven More Languages in Seven Weeks[1] is now available in beta

[Factor-talk] Factor IO similar to Node?

2014-07-07 Thread Andrea Ferretti
I am trying to figure what is the Factor model to work with server applications. If I understand correctly, Factor is single threaded, but the underlying I/O facilities are not (I remember reading an article where it was compared to Java NIO). This resembles the model of Node applications: the

Re: [Factor-talk] Factor IO similar to Node?

2014-07-10 Thread Andrea Ferretti
Thank you for the explanation! It is nice to see that Factor does automatic task switching on i/o, avoiding the callback hell typical of Node applications 2014-07-10 6:08 GMT+02:00 Chris Double chris.dou...@double.co.nz: A Factor instance runs in a single thread. Blocking operations are done

[Factor-talk] Debugging factor

2014-10-11 Thread Andrea Ferretti
Hi, I am relatively new to Factor, and I am trying understand how to debug programs in it. Whenever I make an error, a popup suggests to Traceback and open the debugger. Now, I am used to the debugger in, say, Smalltalk, where I can browse the current local variables, step into code, edit

[Factor-talk] Multithreading in Factor

2014-10-13 Thread Andrea Ferretti
Hi, I have read in various places, including this mailing list, that Factor does not currently have support for (preemptive, kernel-level) multithreading, and that adding support for that would require a great deal of changes, since the underlying VM and many core words are not thread-safe. Can

Re: [Factor-talk] Multithreading in Factor

2014-10-18 Thread Andrea Ferretti
written below with a grain of salt. It mostly comes from what I've snapped up from varius places and reading the mailing list archive (eg http://search.gmane.org/?query=threadinggroup=comp.lang.factor.generalsort=relevance). 2014-10-13 18:14 GMT+02:00 Andrea Ferretti ferrettiand...@gmail.com: Hi, I

Re: [Factor-talk] Factor 0.97 now available

2014-11-04 Thread Andrea Ferretti
Congratulations for the great work! I would be glad to see a 1.0 release, if anything just for psychological reasons when I show Factor to my colleagues :-) Are there any plans to move the distribution to a model with a core + a package manager? I think at this point it would benefit the

Re: [Factor-talk] Factor 0.97 now available

2014-11-04 Thread Andrea Ferretti
By the way, I have the same issue as mr wzrd - on Ubuntu 14.04 64bit desktop edition. I *do* have a libgtk-x11-2.0.so.0, but it is under /usr/lib/x86_64-linux-gnu/ 2014-11-04 10:06 GMT+01:00 Andrea Ferretti ferrettiand...@gmail.com: Congratulations for the great work! I would be glad to see

Re: [Factor-talk] Factor 0.97 now available

2014-11-05 Thread Andrea Ferretti
It works for me too. Any chance this fix will be deployed in the official download? It is unforunate that the default download does not work out of the box on recent Ubuntus, as it may hinder adoption 2014-11-04 19:12 GMT+01:00 mr wzrd wzr...@gmail.com: On 11/04/2014 01:02 PM, Björn Lindqvist

Re: [Factor-talk] Multithreading in Factor

2014-11-19 Thread Andrea Ferretti
Andrea Ferretti ferrettiand...@gmail.com: Hi, I have read in various places, including this mailing list, that Factor does not currently have support for (preemptive, kernel-level) multithreading, and that adding support for that would require a great deal of changes, since the underlying VM

Re: [Factor-talk] Factor 0.97 now available

2014-11-20 Thread Andrea Ferretti
+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 Ferretti ferrettiand...@gmail.com wrote: It works for me too. Any chance this fix will be deployed

Re: [Factor-talk] Factor 0.97 now available

2014-11-20 Thread Andrea Ferretti
Yes, the download from the website fails both on Ubuntu 14.04 and 14.10. 2014-11-20 17:22 GMT+01:00 John Benediktsson mrj...@gmail.com: Did you try the download from the factorcode website? On Nov 20, 2014, at 7:43 AM, Andrea Ferretti ferrettiand...@gmail.com wrote: Yeah, the version

Re: [Factor-talk] Multithreading in Factor

2014-11-21 Thread Andrea Ferretti
, Andrea Ferretti ferrettiand...@gmail.com wrote: I am trying to make this work, but I have issues with the line myhost.com 9001 start-server Looks like the API for starting servers/nodes has changed quite a bit. If you look at the following file you'll see examples of current usage: basis

[Factor-talk] Factor tutorial

2014-11-22 Thread Andrea Ferretti
Hello, I have written a Factor tutorial, which you can find at http://andreaferretti.github.io/factor-tutorial/ (source https://github.com/andreaferretti/factor-tutorial ) Factor has a lot of documentation in the listener, but I have tried to cover some topics that are present in the official

Re: [Factor-talk] Factor tutorial

2014-11-23 Thread Andrea Ferretti
. On Sat, Nov 22, 2014 at 6:36 AM, Andrea Ferretti ferrettiand...@gmail.com wrote: Hello, I have written a Factor tutorial, which you can find at http://andreaferretti.github.io/factor-tutorial/ (source https://github.com/andreaferretti/factor-tutorial ) Factor has a lot

[Factor-talk] Output parameters in alien

2014-11-28 Thread Andrea Ferretti
I am trying to interface with C code. Everything seems to work more or less fine, until I have to deal with output parameters, that is, parameters in C functions which are meant to be passed buffers which are filled by the function. I have made a very basic example which only copies a string and

Re: [Factor-talk] Factor packaging for Ubuntu

2014-11-29 Thread Andrea Ferretti
Great, thanks! Il giorno 29/nov/2014 10:38, Björn Lindqvist bjou...@gmail.com ha scritto: Yes! Now there's a Utopic package there too. 2014-11-26 12:00 GMT+01:00 Andrea Ferretti ferrettiand...@gmail.com: Would it be possible to add a package for Ubuntu 14.10? 2014-11-25 19:39 GMT+01:00

Re: [Factor-talk] Output parameters in alien

2014-11-29 Thread Andrea Ferretti
of the errors you got: On Fri, Nov 28, 2014 at 5:14 PM, Andrea Ferretti ferrettiand...@gmail.com wrote: { { c-string } } [ hello world swap example_cp ] with-out-parameters The syntax of with-out-parameters is an array of elements, which are either a c-type, or a triple { c-type intial: value

Re: [Factor-talk] Output parameters in alien

2014-12-01 Thread Andrea Ferretti
, but I would like to have confirmation from more experienced users 2014-11-29 19:46 GMT+01:00 Andrea Ferretti ferrettiand...@gmail.com: Thank you! I am away now, but I will try all of your solutions on monday! :-) 2014-11-28 22:30 GMT+01:00 Jon Harper jon.harpe...@gmail.com: After investigating

[Factor-talk] Quotations and generics

2014-12-05 Thread Andrea Ferretti
Hi, I am trying to implement monoids in factor. A monoid is a set with a binary associative operation (and, depending on the defintiion, a neutral element for it). Typical examples are numbers (with either addition or multiplication) or sequences (with concatenation). Other examples can be

Re: [Factor-talk] Quotations and generics

2014-12-05 Thread Andrea Ferretti
`` vocabulary, so you could do something like this: http://re-factor.blogspot.com/2013/10/rock-paper-scissors.html On Fri, Dec 5, 2014 at 2:10 AM, Andrea Ferretti ferrettiand...@gmail.com wrote: Hi, I am trying to implement monoids in factor. A monoid is a set with a binary associative

Re: [Factor-talk] Quotations and generics

2014-12-05 Thread Andrea Ferretti
of sequence? So: [ * ] [ numberstring print ] append [ 3 9 ] dip call Does what you would expect. :) You can even add stack effects and the algebra will work out: ( x -- ) ( x x x -- x x ) compose-effects 2014-12-05 11:10 GMT+01:00 Andrea Ferretti ferrettiand...@gmail.com: Hi, I am trying

Re: [Factor-talk] Deploying application

2014-12-11 Thread Andrea Ferretti
The `reader-word` word does indeed use reflection to set word properties dynamically, see here http://docs.factorcode.org/content/word-reader-word,slots.html If I understand correctly, I think you could simply replace the list { deb:name deb:version deb:priority deb:section deb:maintainer

[Factor-talk] Changing global variables at parse time

2014-12-16 Thread Andrea Ferretti
Hi, I am trying to define some syntax words that should have effect on a global (or dynamic) variable. What I am trying to achieve is something similar to how the LIBRARY: word affects later occurrences of FUNCTION: The problem is, it does not seem to work. The simplest example I can make is up

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

2014-12-16 Thread Andrea Ferretti
. Doug On Tue, Dec 16, 2014 at 8:55 AM, Andrea Ferretti ferrettiand...@gmail.com wrote: Hi, I am trying to define some syntax words that should have effect on a global (or dynamic) variable. What I am trying to achieve is something similar to how the LIBRARY: word affects later occurrences

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

2014-12-16 Thread Andrea Ferretti
will initialize if not ``f``, the second will always set. On Tue, Dec 16, 2014 at 8:55 AM, Andrea Ferretti ferrettiand...@gmail.com wrote: Hi, I am trying to define some syntax words that should have effect on a global (or dynamic) variable. What I am trying to achieve is something similar to how

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

2014-12-17 Thread Andrea Ferretti
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 ferrettiand...@gmail.com wrote: Hi, I am trying to define some syntax words that should have effect on a global (or dynamic) variable. What I am trying

[Factor-talk] A stub of a package manager

2014-12-17 Thread Andrea Ferretti
Hi, following this [small discussion](https://news.ycombinator.com/item?id=8750720) I thought I might give a try at designing a simple package manager. It is inspired by [Metacello](https://code.google.com/p/metacello/) but delegates to existing source control management software such as git the

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

2014-12-17 Thread Andrea Ferretti
simple that encourages re-use of code is pretty great, we could probably share our testing infrastructure to support easy continuous integration for a project developed this way. More to come later when I have time. Best, John. On Wed, Dec 17, 2014 at 6:20 AM, Andrea Ferretti ferrettiand

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

2014-12-17 Thread Andrea Ferretti
: On 12/17/2014 09:20 AM, Andrea Ferretti wrote: Hi, following this [small discussion](https://news.ycombinator.com/item?id=8750720) I thought I might give a try at designing a simple package manager. Neat idea. One of the benefits to the one big tree that we have right now is that we

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

2014-12-18 Thread Andrea Ferretti
! :-) This version is slightly changed from the old one, but the basics are the same. I think now I will let it rest until some more experienced factorers (is this the right word?) decide if it can have any use. 2014-12-17 20:15 GMT+01:00 Andrea Ferretti ferrettiand...@gmail.com: I thought to use

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

2014-12-19 Thread Andrea Ferretti
Hi Björn, great points! Let me try to comment on them. 2014-12-19 5:14 GMT+01:00 Björn Lindqvist bjou...@gmail.com: Great work Andrea! Factor needs a package management system eventually. Programmers have this strange infatuation with packages and unless the language offers it, it's just not

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

2014-12-22 Thread Andrea Ferretti
. At the same time, I would like very much to help if I can. I took the freedom to stub a package manager because for me it was one of the main issue in really adopting Factor, but others may feel otherwise 2014-12-19 10:52 GMT+01:00 Andrea Ferretti ferrettiand...@gmail.com: Hi Björn, great points

[Factor-talk] Talk about Factor

2015-01-29 Thread Andrea Ferretti
Hi, I will be giving an introductory talk about Factor at the LambdaCon in Bologna (Italy) http://www.lambdacon.org/ Of course, I a not a Factor expert in any way, but I will make it clear and try to show the potentialities of Factor. I was thinking of following more or less parts of my

Re: [Factor-talk] Talk about Factor

2015-02-01 Thread Andrea Ferretti
/mrjbq7/re-factor/blob/master/telnet-server/telnet-server.factor And a paper presented at DLS 2010: http://factorcode.org/littledan/dls.pdf Anyway, good luck! Let us know how it goes! Best, John. On Thu, Jan 29, 2015 at 9:19 AM, Andrea Ferretti ferrettiand...@gmail.com wrote: Hi

[Factor-talk] Advice for talk

2015-03-11 Thread Andrea Ferretti
Hi, I was preparing a talk about Factor, and I recall having seen mentioned on this list two things that might turn out useful for the presentation. Unfortunately, I cannot find them anymore. 1) I remember someone mentioned a tool that would show the speculative status of the stack in realtime

Re: [Factor-talk] Advice for talk

2015-03-12 Thread Andrea Ferretti
Great, set-listener-font is exactly what I needed! About 1, I was meaning something different. It was an experimental UI gadget that would show the (speculative) status of the stack while the user keeps entering words. Or maybe my memory is at fault 2015-03-12 15:50 GMT+01:00 John

Re: [Factor-talk] Why does numberstring append .0 on my German system ?

2015-08-14 Thread Andrea Ferretti
By the way, I do not think it is a good idea to directly parse or format numbers based on locale, for portability. I would rather have different functions that also take a locale into account (not necessarily the system one) and a constant with the system locale 2015-08-14 18:52 GMT+02:00 Jon

[Factor-talk] Ubuntu 15.04

2015-10-23 Thread Andrea Ferretti
I have tried, without chance, to run factor on Ubuntu 15.04 (and I will move to 15.10 soon). The 0.97 version fails with Cannot resolve C library function Library: DLL" /usr/lib/libgtk-x11-2.0.so.0" Symbol: gtk_init On the dev version I get a memory error: An error occurred while drawing the

Re: [Factor-talk] Ubuntu 15.04

2015-10-23 Thread Andrea Ferretti
Unfortunately, still getting the error on devel 2015-10-23 15:00 GMT+02:00 Andrea Ferretti <ferrettiand...@gmail.com>: > Ok, it seems it depends on my Nvidia drivers. Launching 0.97 with the > gtk.ffi fix gave a more detailed explanation of the error > > Thank you! > > 20

Re: [Factor-talk] Ubuntu 15.04

2015-10-23 Thread Andrea Ferretti
gt; On Oct 23, 2015, at 5:40 AM, John Benediktsson <mrj...@gmail.com> wrote: >> >> For 0.97, can you try: >> >>$ ./factor -run=listener >>IN: scratchpad "gtk" reload save >> >> Then quit and try the UI again? >> >> We will h

Re: [Factor-talk] Ubuntu 15.04

2015-10-27 Thread Andrea Ferretti
and latest from git work nice. > > Best > > Martin > > -Ursprüngliche Nachricht- > Von: Andrea Ferretti [mailto:ferrettiand...@gmail.com] > Gesendet: Freitag, 23. Oktober 2015 15:07 > An: factor-talk@lists.sourceforge.net > Betreff: Re: [Factor-talk] Ubuntu 15.