Re: [Factor-talk] The iota test

2015-10-09 Thread Alexander Ilin
Hello, Jon! 09.10.2015, 19:17, "Jon Harper" : > The graphical listener is simply not meant to be used like this. I see your point, but I thougt it wasn't meant to crash either. ---=--- Александр

Re: [Factor-talk] The iota test

2015-10-09 Thread Alexander Ilin
Hello! 09.10.2015, 20:18, "John Benediktsson" : > Are you running 32-bit factor on 32-bit or 64-bit windows? 32-bit Factor on 32-bit Windows XP Pro SP 3. ---=--- Александр --

[Factor-talk] The iota test

2015-10-09 Thread Alexander Ilin
Hello! Is it just me, or do you also can see this issue? I downloaded the latest development build for Windows: factor-windows-x86-32-2015-09-29-16-12.zip It reports this on startup: Factor 0.98 x86.32 (1717, heads/master-9a5cd7d13d, Tue Sep 29 16:12:54 2015) [Microsoft Visual C++

[Factor-talk] flat mapping

2015-09-16 Thread Alexander Ilin
Hello! When two functions (effectively) produce the same end result, I often prefer to use the one that is lighter on the computer resources. The following two functions are equivalent in my use case: map compose map-flat The latter one is from compiler.utilities, and it seems more

Re: [Factor-talk] file-readable?

2015-09-16 Thread Alexander Ilin
iles-by-breadth as a sequence, > act on each-file-breadth or each-file-depth, or filter-files-breadth or > filter-files-depth. > > Hope that helps. > > On Tue, Sep 15, 2015 at 9:32 AM, Alexander Ilin <ajs...@yandex.ru> wrote: >> Hello! >> >>   Is t

Re: [Factor-talk] flat mapping

2015-09-16 Thread Alexander Ilin
PC Explorer, and R2460 is one of the device types supported by my configuration generator in Factor. 16.09.2015, 17:00, "John Benediktsson" <mrj...@gmail.com>: > Hi Alexander, > > I'm not quite clear what functionality you are looking for, could you provide > a quick ex

Re: [Factor-talk] flat mapping

2015-09-16 Thread Alexander Ilin
;mrj...@gmail.com>: > I think map concat is a simpler approach: > > CONSTANT: R2460 $[ >     { "LL" "DL" "FWL" "BLL" "ULL" "LR" "VP" "MP" "LP" "AT" "VT" "SS" } >

[Factor-talk] Is it possible to post screenshots?

2015-09-16 Thread Alexander Ilin
Hello! Does this list accept screenshot attachments? ---=--- Александр -- Monitor Your Dynamic Infrastructure at Any Scale With Datadog! Get real-time metrics from all of your servers, apps and tools in one

Re: [Factor-talk] cartesian-glue Was: Is it possible to post screenshots?

2015-09-16 Thread Alexander Ilin
quot; <mrj...@gmail.com>: > I'm not sure - give it a try and if it doesn't maybe use imgur.com or another > image hosting website and just include a link to it? > > On Wed, Sep 16, 2015 at 8:33 AM, Alexander Ilin <ajs...@yandex.ru> wrote: >> Hello! >> >

[Factor-talk] PRIMITIVE:

2015-09-15 Thread Alexander Ilin
Hello! I was looking at some words, like , and I saw PRIMITIVE: IN: scratchpad \ see IN: kernel PRIMITIVE: ( obj -- wrapper ) foldable flushable But when I tried to look up PRIMITIVE:, here's what I saw: If I do IN: scratchpad \ PRIMITIVE: see USING: kernel ; IN: syntax SYNTAX:

Re: [Factor-talk] PRIMITIVE:

2015-09-15 Thread Alexander Ilin
ed) >     * vm/primities.hpp (exported) >     * vm/*.cpp (implemented) > > We have an issue for improving this, although we won't likely get to it right > away: > >     https://github.com/slavapestov/factor/issues/1134 > > Thanks, > John. > > On Tue, Sep 15, 2015

[Factor-talk] Recursive File Traversal

2015-09-15 Thread Alexander Ilin
Hello! Is there a virtual sequence for recursive traversal of all files in a folder and its subfolders? ---=--- Александр -- ___ Factor-talk mailing list

Re: [Factor-talk] ALUT.dll

2015-09-17 Thread Alexander Ilin
Awesome, Jon, thank you very much! 17.09.2015, 10:53, "Jon Harper" : > For windows users, we try to host all the dlls on: > - for 32bit http://downloads.factorcode.org/dlls/ > - for 64bit http://downloads.factorcode.org/dlls/64/ ---=--- Александр

Re: [Factor-talk] DLLs was: ALUT.dll

2015-09-17 Thread Alexander Ilin
Hello again, Jon! FYI, the chipmunk.dll is not there (used in the chipmunk.ffi vocab). 17.09.2015, 10:53, "Jon Harper" : > For windows users, we try to host all the dlls on: > - for 32bit http://downloads.factorcode.org/dlls/ > - for 64bit

[Factor-talk] Graphviz

2015-09-17 Thread Alexander Ilin
Hello! Yesterday, while browsing the extra/ folder, I found compiler.graphviz vocabulary. Trying to USE: it, however, produces an error message: "Current operating system not supported by this vocabulary" ... "requires { unix }" Two questions arise. 1. How do I mark a vocabulary to

[Factor-talk] ALUT.dll

2015-09-17 Thread Alexander Ilin
Hello! I was trying to load the Lunar Rescue game in Factor, but stumbled upon the ALUT.dll dependency. After some search on the 'net I found what it stands for, and even installed OpenAL v1.1, but I could not find ALUT binaries for Windows. Does anyone know of an official/reliable place

Re: [Factor-talk] Graphviz

2015-09-17 Thread Alexander Ilin
Hello! Thanks for the explanation. 17.09.2015, 14:22, "John Benediktsson" : > Vocabularies can have a platforms.txt file that has a list of OS that it > supports. If the platforms.txt file is not specified, we assume it runs > everywhere. > The "graphviz" vocabulary is

Re: [Factor-talk] ALUT.dll

2015-09-17 Thread Alexander Ilin
Hello again, my dear friends! 17.09.2015, 10:53, "Jon Harper" : > For windows users, we try to host all the dlls on: > - for 32bit http://downloads.factorcode.org/dlls/ > - for 64bit http://downloads.factorcode.org/dlls/64/ I have now tried using the tools.disassembler,

Re: [Factor-talk] Graphviz

2015-09-17 Thread Alexander Ilin
Hello, Alex! 17.09.2015, 17:26, "Alex Vondrak" : > Looks like you're running a very old version of the graphviz library that > used the Graphviz API through Factor's FFI. That turned out to have > headaches, so the library was reworked to instead spit out DOT code & call >

[Factor-talk] Factor in .Net

2015-09-15 Thread Alexander Ilin
Hello! I've heard that .Net supports functional languages. Is Factor available in .Net? ---=--- Александр -- ___ Factor-talk mailing list

[Factor-talk] Recursion

2015-09-15 Thread Alexander Ilin
Hello! I'm looking at the source of the numbers-game in (extra/), and I wonder about the following piece: : numbers-game-loop ( actual -- ) dup guess-prompt read-number judge-guess [ numbers-game-loop ] [ drop ] if ; Is it possible that the recursive call to the numbers-game-loop

Re: [Factor-talk] v0.98

2015-09-29 Thread Alexander Ilin
Hi! > 22.09.2015, 18:47, "John Benediktsson" : >>  We were debating how much to include in 0.98. >> >>  Everything that's been committed since 0.97 (see the nightly builds) will >> be in 0.98 and our plan right now is to fix bugs and cleanup in preparation >> for a release in

Re: [Factor-talk] Ctrl+Break

2015-10-01 Thread Alexander Ilin
Hello! 01.10.2015, 22:33, "HP wei" : > I try to hit Control-C but it continues to run. > *** How to exit a running words ? HP wei raises a very good point. Is there a way to interrupt an infinite loop or a long-running word? If such a mechanism is not there in Factor UI,

Re: [Factor-talk] Ctrl+Break

2015-10-01 Thread Alexander Ilin
istener and suspend the thread of the first > > we don't have a way to kill threads: > >     https://github.com/slavapestov/factor/issues/1387 > > or wait/join threads: > >     https://github.com/slavapestov/factor/issues/1407 > > On Thu, Oct 1, 2015 at 2:12 PM,

Re: [Factor-talk] Ctrl+Break

2015-10-02 Thread Alexander Ilin
Are we still talking about Factor on Windows? 02.10.2015, 13:11, "Jon Harper" : > You can also hit CTRL-C on the terminal, then press 't' to throw an exception > in factor. If the listener is doing a busy loop, it will get the exception > and it should work. If the

[Factor-talk] Concatenative wiki

2015-09-18 Thread Alexander Ilin
Hello! I registered myself at concatenative.org (AlexIlin) wiki to fix a typo in https://concatenative.org/wiki/revisions/Factor/FAQ/Libraries "You have to makes sure": should be "make" instead of "makes". I make the change, save the page, but the latest revision still shows the old text,

Re: [Factor-talk] Chris Double's Weblog

2015-09-21 Thread Alexander Ilin
Hey, Chris! 10.02.2015, 03:08, "Chris Double" : > http://bluishcoder.co.nz I noticed your weblog is down. Are you going to bring it up, or is it dead permanently? ---=--- Александр --

[Factor-talk] Create a Collection of Tuples

2015-09-23 Thread Alexander Ilin
Hello! I'd like to return a sequence of tuples. How do I approach this? Here's what I tried (and failed) so far: TUPLE: em id name path ; C: em : make-em-all ( -- seq ) { { 1 "x" "path" } { 2 "y" "math" } { 3 "z" "bath" } } [ ] map ; The problem here was that expects

Re: [Factor-talk] Create a Collection of Tuples

2015-09-23 Thread Alexander Ilin
  T{ em { id 1 } { name "x" } { path "path" } } >     T{ em { id 2 } { name "y" } { path "math" } } >     T{ em { id 3 } { name "z" } { path "bath" } } > } > > On Wed, Sep 23, 2015 at 8:25 AM, Alexander Ilin <ajs...

Re: [Factor-talk] v0.98

2015-09-22 Thread Alexander Ilin
Hi! 22.09.2015, 18:47, "John Benediktsson" : > We were debating how much to include in 0.98. > > Everything that's been committed since 0.97 (see the nightly builds) will be > in 0.98 and our plan right now is to fix bugs and cleanup in preparation for > a release in a week or

[Factor-talk] stream-read

2015-09-21 Thread Alexander Ilin
Hello! I need to read a head of a file (name provided) up to 1024 bytes (return shorter string if the file size is less than 1024). I will then hash the read data. I'd like to understand the difference between stream-read and stream-read-partial. Which one should I use for my task? Is the

[Factor-talk] v0.98

2015-09-22 Thread Alexander Ilin
Hello! Is there a release plan for v0.98? When will it happen (in terms of time or features finished)? ---=--- Александр -- ___ Factor-talk mailing list

Re: [Factor-talk] SHA-256

2015-09-21 Thread Alexander Ilin
Hello, John! 21.09.2015, 22:23, "John Benediktsson" : > I don't know what version of Factor you are using, but I made a couple > improvements improvements to sha checksums over the last year or two. Right! I keep forgetting that I'm on 0.96, which is wildly out of date,

Re: [Factor-talk] stream-read

2015-09-21 Thread Alexander Ilin
want: > >     "/path/to/file" utf8 [ 1024 read ] with-file-reader > > The stream-read-partial is used for some performance improvements in slurping > a whole file in chunks via each-stream-block. > > On Mon, Sep 21, 2015 at 8:35 AM, Alexander Ilin <ajs...@yandex.ru>

[Factor-talk] directory-files question

2015-09-18 Thread Alexander Ilin
Hello! Why does directory-files returns the names of subdirectories. Shouldn't it return file names only? ---=--- Александр -- ___ Factor-talk mailing list

Re: [Factor-talk] directory-files question

2015-09-18 Thread Alexander Ilin
;>  Most languages do this, for example python in its ``os.listdir`` function. >> >>  On Fri, Sep 18, 2015 at 10:04 AM, Alexander Ilin <ajs...@yandex.ru> wrote: >>>  H

Re: [Factor-talk] directory-files question

2015-09-18 Thread Alexander Ilin
Actually, directory-names makes a lot of sense to me. 18.09.2015, 20:27, "Alexander Ilin" <ajs...@yandex.ru>: > [fixing a typo, plus adding a suggestion below] > >   Thanks for the reply! > >   I see, so, it's a question of terminology. >   From readin

[Factor-talk] Persistence

2015-12-19 Thread Alexander Ilin
Hello!   Is it possible to store and retrieve tuples that have other tuples as fields (apart from date-time)?   For example, I'd like to track duplicate files found on my drive with the following structure: TUPLE: my-file hash paths ; TUPLE: my-file-path hash path ; The idea is the "paths"

Re: [Factor-talk] CONSTANT:s - foldable, flushable?

2016-05-25 Thread Alexander Ilin
utput is not used. Are you running into a problem with those constants you are trying to solve? On Tue, May 24, 2016 at 3:54 AM, Alexander Ilin <ajs...@yandex.ru> wrote:Hello!  I have some CONSTANT: words, which are used in more CONSTANT:s calculated at compile-time:IN: iqlink.const! Bits are r

Re: [Factor-talk] CONSTANT:s - foldable, flushable?

2016-05-25 Thread Alexander Ilin
Hello, John! 25.05.2016, 17:54, "John Benediktsson" :One way to work around dependencies like that is to use nested compilation units: << CONSTANT: half-bit-size 6 >><< CONSTANT: bit-size $[ 2 half-bit-size * ] >>CONSTANT: cell-height $[ 3 bit-size * ]CONSTANT: cell-width $[ 3

[Factor-talk] Concatenative.org Wiki

2016-05-26 Thread Alexander Ilin
Hello! Is it possible to contribute to the Concatenative.org Wiki? I can't login and "recover password" does not send me an e-mail. ---=--- Александр -- Mobile security can be enabling, not merely restricting.

Re: [Factor-talk] Issue #1573: interrupt a tight loop

2016-05-28 Thread Alexander Ilin
Hello, John! 28.05.2016, 00:10, "John Benediktsson" : IIRC, there are x86 (32-bit) and x64 (64-bit) versions of some of the VS Command Prompt shortcuts and they setup environment variables that will cause a 32-bit or 64-bit factor to be produced. Ah, good point. That might be it. 

Re: [Factor-talk] Issue #1573: interrupt a tight loop

2016-05-28 Thread Alexander Ilin
thread written in C++ in the VM using > start_thread() as long as you are careful not to mess with the > factor_vm object in unapproved ways. You can see how it is done in > start_sampling_profiler_timer() in vm/os-windows.cpp. > > I still don't understand how you can get th

Re: [Factor-talk] Issue #1573: interrupt a tight loop

2016-05-28 Thread Alexander Ilin
s the same. In place of 16 I saw similarly small even numbers: 10, 12, 16, 8. 28.05.2016, 13:26, "Alexander Ilin" <ajs...@yandex.ru>: > Hello! > >   A fun observation. Sometimes, when the Factor application is not > immediately terminated and an error di

Re: [Factor-talk] Issue #1573: interrupt a tight loop

2016-05-28 Thread Alexander Ilin
Hello! 28.05.2016, 14:14, "Björn Lindqvist" : > Hello, > > Here is some sample code to run: > > USING: alien io kernel threads.private windows.kernel32 > windows.types ; > IN: examples.windows.threads > > : eternity ( -- ) eternity ; > > : ( -- alien ) > DWORD { LPVOID }

Re: [Factor-talk] Hooking the Back End

2016-06-14 Thread Alexander Ilin
Hello, Doug! I'm a bit confused, because I found this code: IN: io.directories.windows M: windows copy-file ( from to -- )    dup parent-directory make-directories    [ normalize-path ] bi@ 0 CopyFile win32-error=0/f ; This code defines copy-file as a method on "windows", and the code you quoted

[Factor-talk] Hooking the Back End

2016-06-13 Thread Alexander Ilin
Hello! I'm having a bit of a fun problem, and I'd like you to help me with a solution. I want to create a custom io-backend. In my implementation all calls to copy-file, move-file and delete-file should be captured and queued for deferred and/or background batch processing. The

Re: [Factor-talk] Issue #1573: interrupt a tight loop

2016-05-27 Thread Alexander Ilin
tching on object: 1234 Should I wrap 1234 with an or something? 27.05.2016, 16:52, "John Benediktsson" <mrj...@gmail.com>:Note, your needs to use the name of the Callback (in this case "ThreadProc") I think: :     [ ] ThreadProc ;   On Fri, May 27, 2016 at 6:47 AM, Alexand

Re: [Factor-talk] Issue #1573: interrupt a tight loop

2016-05-27 Thread Alexander Ilin
27.05.2016, 12:56, "Björn Lindqvist" : > Yes. See > https://github.com/bjourne/playground-factor/wiki/Tips-and-Tricks-Alien#using-alien-callbacks > for an example on how to pass callbacks to c functions. > So if CreateThread has signature: > > FUNCTION: HANDLE CreateThread (

Re: [Factor-talk] Issue #1573: interrupt a tight loop

2016-05-27 Thread Alexander Ilin
Hello! 27.05.2016, 18:04, "John Benediktsson" : > Why do you have a busy loop on the callback? Why not just yield and return > out of it? The busy loop is there to keep the new thread alive long enough so that I can see it in the Process Explorer. The 100% CPU utilization

Re: [Factor-talk] Issue #1573: interrupt a tight loop

2016-05-27 Thread Alexander Ilin
Hello! 27.05.2016, 17:35, "John Benediktsson" :Since the 1234 is supposed to be a LPDWORD which I think should be a pointer wouldn't something like this work:     1234 DWORD   Note: I'm not a windows programmer, I just play one on TV.  Ha! : )) That parameter is actually

Re: [Factor-talk] Build Factor on Windows with Win7 SDK

2016-05-27 Thread Alexander Ilin
Hi again! 27.05.2016, 02:10, "Alexander Ilin" <ajs...@yandex.ru>:That I'll have to try tomorrow, I'm afraid. 2:30 a.m. here. VS 2015 Community Edition did the trick, although not before I fixed a C4800 warning (treated as error, thus failing the build).My first successful bootstr

Re: [Factor-talk] Issue #1573: interrupt a tight loop

2016-05-27 Thread Alexander Ilin
Hello, John! 27.05.2016, 18:55, "John Benediktsson" : > If you run it from the command prompt does it print an error message when it > exits? As I said, no message boxes, nothing on the console. ---=--- Александр

Re: [Factor-talk] Factor Code Analysis Tools

2016-05-26 Thread Alexander Ilin
Hello, Doug! I've read the lint vocab and I must say I'm impressed yet again by how simple things are in Factor.Thanks for the great tool! ---=---Александр  -- Mobile security can be enabling, not merely restricting.

Re: [Factor-talk] Factor Code Analysis Tools

2016-05-26 Thread Alexander Ilin
o haven't tested this since writing it, so not sure if it still works on the latest Factor.On May 25, 2016 6:01 AM, "Alexander Ilin" <ajs...@yandex.ru> wrote:Hello! That's great, John, thanks for the pointer! 25.05.2016, 00:57, "John Benediktsson" <mrj...@gmail.com>:Y

Re: [Factor-talk] Concatenative.org Wiki

2016-05-26 Thread Alexander Ilin
Hello! 26.05.2016, 17:55, "Alexander Ilin" <ajs...@yandex.ru>: >   Is it possible to contribute to the Concatenative.org Wiki? > >   I can't login and "recover password" does not send me an e-mail. I still did not get that e-mail, but my contribution was some

[Factor-talk] Issue #1573: interrupt a tight loop

2016-05-26 Thread Alexander Ilin
Hello again! To fix https://github.com/factor/factor/issues/1573 I need to know one thing: can I start a native thread (WinAPI CreateThread) within the Factor.exe process with Factor code running in it? If so, how do I do it? If not, I'll have to implement it in VM's C++ code. ---=---

[Factor-talk] Build Factor on Windows with Win7 SDK

2016-05-26 Thread Alexander Ilin
Hello! I wanted to build Factor, so I downloaded and installed the Win 7 SDK as suggested here: https://concatenative.org/wiki/view/Factor/Requirements I only selected two items during the installation: "Windows Headers and Libraries" and "Visual C++ Compilers". The nmake was in the latter

Re: [Factor-talk] Build Factor on Windows with Win7 SDK

2016-05-26 Thread Alexander Ilin
Hi! 27.05.2016, 01:11, "John Benediktsson" :The only thing you need is a recent Visual Studio (the community free one is fine).  OK, got it. Goodbye, 12.5Gb off my SSD, *sigh*, you will be missed. Then just run:     build.cmd latest That I'll have to try tomorrow, I'm afraid.

Re: [Factor-talk] Build Factor on Windows with Win7 SDK

2016-05-26 Thread Alexander Ilin
Hey, Doug! 27.05.2016, 00:54, "Doug Coleman" :We started using C++11 or C++14 features and this requires a newer compiler. Can you try with the latest Visual Studio?  I don't have anything installed, and I kinda liked the idea of only having an SDK.I'm not big on C++ or

Re: [Factor-talk] Issue #1573: interrupt a tight loop

2016-05-27 Thread Alexander Ilin
Hello! 27.05.2016, 02:48, "Björn Lindqvist" : > You could certainly wrap the CreateThread function and call it from > factor. See the windows.kernel32 vocab for how wrapping Windows system > functions are done. OK, good. When I call CreateThread, one of the parameters I need

Re: [Factor-talk] Hooking the Back End

2016-06-14 Thread Alexander Ilin
15.06.2016, 00:20, "Doug Coleman" :Methods on object work for any object, even ``f``, but any more specific type will override and get called instead. Methods on object are default methods, but the windows-specific method is worse since it blocks.  I see, that's good to

Re: [Factor-talk] Disposition

2016-06-21 Thread Alexander Ilin
Hello, John! I see. So those objects implementing a custom dispose are not inherited from disposable.Thank you! 22.06.2016, 02:58, "John Benediktsson" :If you notice the implementation of ``M\ object dispose``: ```M: object dispose [ t >>disposed dispose* ] unless-disposed ;``` 

[Factor-talk] Disposition

2016-06-21 Thread Alexander Ilin
Hello! I'm trying to get a grip on the destructors vocab. Looking at the bottom of the "\ dispose help" page I see things like: M: filter-writer dispose stream>> dispose ; or M: decoder dispose stream>> dispose ; Shouldn't ALL the objects inheriting from disposable override the

[Factor-talk] Are the -tests IN:?

2016-06-27 Thread Alexander Ilin
Hello! I'm confused. Should the *-tests.factor files contain the "IN: *.tests" line, or not? The codebase seems to be inconsistent at the moment. ---=--- Александр -- Attend Shape: An AT Tech Expo July

Re: [Factor-talk] How would I solve this better in Factor?

2016-02-24 Thread Alexander Ilin
Hi! > I struggled quite a lot coming up with this. Mainly in keeping things in > my head and figuring out what I needed to do to bring the stack in order > for the operations I was attempting.. > > Coming from an iterative programming background (with a little bit of > exposure to functional

[Factor-talk] CONSTANT: question

2016-02-22 Thread Alexander Ilin
Hello! The following code works the way I want it to: { 13 13 10 10 } { 13 } { 10 } replace -> { 10 10 10 10 } But when I tried to use named constants, it no longer works: CONSTANT: CR-char-code 13 CONSTANT: LF-char-code 10 { 13 13 10 10 } { CR-char-code } { LF-char-code } replace -> { 13

Re: [Factor-talk] CHAR: question

2016-02-22 Thread Alexander Ilin
22.02.2016, 17:40, "Jon Harper" : > You can see from the definition that is uses the name>char-hook, which > then uses the name>char word to lookup names, which in the end reads > and caches the basis/unicode/data/UnicodeData.txt file. Great! That explains why searching

[Factor-talk] Factor strengths

2016-02-22 Thread Alexander Ilin
Hello!   I recently told a friend of mine about Factor and how I'm studying it and writing little scripts in it. He asked me the usual questions, like, "why not Python" and "what's the main Factor strengths".   While I like Factor aesthetically, for its core simplicity, it got me wondering,

Re: [Factor-talk] CHAR: question

2016-02-22 Thread Alexander Ilin
lt;mrj...@gmail.com>: > CHAR: works with all named Unicode code points. In the listener use tab > completion to see, for example: > > CHAR: ex > > Where is press the tab key for tab completion. > >>  On Feb 22, 2016, at 6:07 AM, Alexander Ilin <ajs...@yandex.ru> wr

[Factor-talk] Message too large for the list

2016-02-23 Thread Alexander Ilin
Hello! There is a message from me that awaits moderation, because it's "too big". I've attached a couple of screenshots of the Factor crash to it, I hope that's OK. I was informed that it's less than 65Kb total. ---=--- Александр

Re: [Factor-talk] How would I solve this better in Factor?

2016-02-25 Thread Alexander Ilin
Hello, Jon! 25.02.2016, 20:02, "Jon Harper" : > I wrote a basic o(n^4) solution to see how simple it could get. The > code looks nice to me, but it's sllw :) like 1 hour on the 3200 > chars string.. http://paste.factorcode.org/paste?id=3843 Wow, your code looks very

Re: [Factor-talk] How would I solve this better in Factor?

2016-02-25 Thread Alexander Ilin
PPS: even shorter: : remove-after-underscore ( seq -- seq' ) "_" split1 drop ; ---=--- Александр -- Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App

[Factor-talk] Inlining - when?

2016-03-18 Thread Alexander Ilin
Hello!   Is there a reason to NOT mark everything with "inline"? ---=--- Александр -- Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library.

Re: [Factor-talk] Pretty Printing Question

2016-04-05 Thread Alexander Ilin
Thank you very much, it works! : ) 05.04.2016, 06:27, "John Benediktsson" : > The prettyprinter supports multi-line output, and is used to implement things > like ``see``. > > It looks like the line-breaks aren't used that much and work, but not in the > way you expect. > >

Re: [Factor-talk] Typed arguments

2016-03-19 Thread Alexander Ilin
Hello, John! 18.03.2016, 17:16, "John Benediktsson" : > The inline feature is mainly used for providing type propagation in Factor, > either because you want the word to know the type of its arguments or because > one of its arguments is a quotation and that requires inlining. 

[Factor-talk] Pretty Printing Question

2016-04-01 Thread Alexander Ilin
Hello! I'm trying to visualize some simple data structures, and I thought prettyprinting should fit my bill. Here's the thing I'm trying to show: USING: bit-sets ; IN: scratchpad TUPLE: cell { underlying bit-set } ; The idea is that a cell contains a set of 6 bits 0..5, each

[Factor-talk] OpenGL gadget question

2016-04-24 Thread Alexander Ilin
Hello! I've got the following gadget implementation: USING: kernel ui.gadgets ui.render opengl prettyprint namespaces ; IN: iqlink.gadget TUPLE: iqlink-gadget < gadget ; : ( -- gadget ) iqlink-gadget new ; M: iqlink-gadget pref-dim* drop { 900 600 } "pref-dim*" . ; M:

Re: [Factor-talk] OpenGL gadget question

2016-04-24 Thread Alexander Ilin
Thanks fore the reply! Could someone explain to me in a few words what is do-matrix used for? I'm not sure I need it, I just copied the code from the tetris example. 24.04.2016, 19:51, "John Benediktsson" : > You can log to the terminal/console standard output using: > >    

Re: [Factor-talk] OpenGL gadget question

2016-04-25 Thread Alexander Ilin
Thank you very much, Jon! I now have a working gadget, and a link to the OpenGL tutorial which I'm going to study in the background. Next question, if you don't mind. My gadget now displays some colored rectangles, and I need to add numbers to the output. How do I do that? To be very

Re: [Factor-talk] Listener on Windows - UI Corruption

2016-04-28 Thread Alexander Ilin
Hello! 28.04.2016, 06:52, "John Benediktsson" :That is odd, I've not seen anything like it. The "End" button that shows up doesn't seem like it comes from any of the windows Factor ships with.  Is that something from one of your UI's?  Could it be related to some code you've

Re: [Factor-talk] Listener on Windows - UI Corruption

2016-04-28 Thread Alexander Ilin
Here's the relevant part about the End button (the com-end word): listener-gadget "toolbar" f {    { f restart-listener }    { T{ key-down f { A+ } "u" } com-auto-use }    { T{ key-down f { A+ } "k" } clear-output }    { T{ key-down f { A+ } "K" } clear-stack }    { T{ key-down f { C+ } "d" }

[Factor-talk] Coordinates of child gadgets

2016-04-30 Thread Alexander Ilin
Hello! I have the following code: USING: kernel typed literals accessors assocs sequences math math.vectors opengl ui.gadgets ui.render colors colors.constants locals arrays namespaces ; IN: iqlink.field TUPLE: inner-gadget < gadget ; TUPLE: outer-gadget < gadget ; M: inner-gadget

Re: [Factor-talk] Coordinates of child gadgets

2016-04-30 Thread Alexander Ilin
Hello! >   I have the following code: Never mind that last post, I figured it out. I missed the fact that while drawing a child gadget the { 0 0 } coordinate is already at the top-left corner of the child. The additional shift by loc was messing things up. ---=--- Александр

Re: [Factor-talk] Listener on Windows - UI Corruption

2016-04-28 Thread Alexander Ilin
Hello! 28.04.2016, 19:08, "John Benediktsson" : > What version of Windows are you running? > > Could be an issue with 32-bit factor. Windows 8.1 64-bit, but same issue was in WinXP 32-bit. As seen in the video, Factor v0.98 x86.64. ---=--- Александр

[Factor-talk] Listener on Windows - UI Corruption

2016-04-26 Thread Alexander Ilin
Hello, you guys! I made a screencast of UI corruption that I regularly see after a long work session in Factor Listener, see video description: https://youtu.be/uqdERZRTJ4Y Have you experienced anything similar, or is it just me? The Factor version, as you can see in the video, is a

Re: [Factor-talk] OpenGL gadget question

2016-04-25 Thread Alexander Ilin
Hello, Jon! >> Also, if you don't use openGL functions that modify the current matrix >> (see >> http://docs.factorcode.org/content/article-opengl-modeling-transformations.html), >> the do-matrix word doesn't do anything for you. OK, that's the main point for me, thank you! 24.04.2016,

Re: [Factor-talk] Window Position

2016-05-18 Thread Alexander Ilin
w-loc`` property in ``world`` for each window to save/restore at appropriate points.  You might run into difficulty with a key, although using the ``title`` of the world would probably be good enough. On Sun, May 15, 2016 at 1:29 AM, Alexander Ilin <ajs...@yandex.ru> wrote:Hello!  Is th

[Factor-talk] CONSTANT:s - foldable, flushable?

2016-05-24 Thread Alexander Ilin
Hello! I have some CONSTANT: words, which are used in more CONSTANT:s calculated at compile-time: IN: iqlink.const ! Bits are rectangular, their size in pixels is here. ! All other constants are based on this one. CONSTANT: half-bit-size 6 USING: iqlink.const ; IN: iqlink.cell.gadget

[Factor-talk] Factor Code Analysis Tools

2016-05-24 Thread Alexander Ilin
Hello! Are there any tools that can produce/visualize a graph of vocabulary dependencies and/or call graphs (which words use which other words)? It would be particularly interesting to see cases when two large vocab groups depend on each other, where making a small common ground would

Re: [Factor-talk] Strange Code

2016-05-24 Thread Alexander Ilin
PLE under the stack and then proceeds to get > properties from the win32 data and set them into the TUPLE. > >>  On May 24, 2016, at 5:08 AM, Alexander Ilin <ajs...@yandex.ru> wrote: >> >>  Hello! >> >>   We have the following code in io.files.info.windows: >

Re: [Factor-talk] Window Position

2016-05-20 Thread Alexander Ilin
( -- path ) with-cache-directory ( quot -- ) The cache-directory seems to be a good place to store those configuration files I want. 19.05.2016, 14:54, "Alexander Ilin" <ajs...@yandex.ru>:Thank you, John! Is there a preferred way of automatically storing configuration files for Factor?

Re: [Factor-talk] Listener on Windows - UI Corruption

2016-05-10 Thread Alexander Ilin
Hello! The experiments with calling GC gave no useful results: no additional corruption was triggered. After working in that same Factor instance for many days and after having its memory grow up to 1.2Gb I saw nothing more than the broken End button. That video was recorded 2 weeks ago, on

[Factor-talk] Window Position

2016-05-15 Thread Alexander Ilin
Hello! Is there a vocab for Factor Listener to retain its main window position between runs? Store it in a config file or something? ---=--- Александр -- Mobile security can be enabling, not merely restricting.

Re: [Factor-talk] Listener on Windows - UI Corruption

2016-05-12 Thread Alexander Ilin
Hello! 11.05.2016, 01:22, "John Benediktsson" :Could you open an issue on github with links to the videos for us to track fixing this? I'll do it a little later, busy right now. ---=---Александр  --

[Factor-talk] Unit Testing

2016-05-03 Thread Alexander Ilin
Hello! I don't understand something about unit-testing. Please, help me. In a vocab I have this constant: IN: vocab CONSTANT: five 5 In vocab-tests I have the following test: USING: literals tools.test vocab ; IN: vocab.tests ${ five } $[ five ] unit-test Why does the test fail?

Re: [Factor-talk] Unit Testing

2016-05-03 Thread Alexander Ilin
Hey, Doug! 03.05.2016, 21:35, "Doug Coleman" : > You want this: > ${ five } [ five ] unit-test That works! Thank you very much! : ) ---=--- Александр -- Find and fix application

Re: [Factor-talk] Listener on Windows - UI Corruption

2016-05-03 Thread Alexander Ilin
Hello! 30.04.2016, 18:27, "Björn Lindqvist" : >>    How do I go about hunting for that kind of bug in Factor? > > You can never exclude anything, but it seems very unlikely that the GC > would be the problem. The GC copies objects so it is vulnerable to > shadow data bugs. That

[Factor-talk] Mouse Tolerance

2016-05-05 Thread Alexander Ilin
Hello! In Factor UI I'm often trying to click some link, only to find that I selected it instead. This happens if the mouse moves slightly in response to pressing the button as I click. Even one pixel shift starts selection. This is a problem, especially when mouse is on an uneven

[Factor-talk] Models et al

2016-05-04 Thread Alexander Ilin
Hello! From the documentation: "The models vocabulary provides basic support for dataflow programming." Question: is there a vocabulary with advanced support for dataflow programming? I'm interested in building GUIs and I'd like to learn about the possibilities that are already there.

  1   2   3   4   >