Technically that case would be a matter of `supremum` handling empty
arrays, not `f` elements per se.
On Jun 21, 2017 8:48 AM, "Alexander Ilin" wrote:
```
{ f f f f } sift supremum
-> error is thrown
```
21.06.2017, 18:44, "Alex Vondrak" :
Or you could cal
Or you could call `sift supremum`:
http://docs.factorcode.org/content/word-sift,sequences.html
Might be instructive to give the codebase a search, see how often that
pattern is used. (Can't do it myself right now - on mobile.)
On Jun 21, 2017 8:39 AM, "Alexander Ilin" wrote:
> Hello!
>
> How
In case it helps, here's an ancient gist of mine where I did some basic
vocab dependency analysis: https://gist.github.com/ajvondrak/4158963 This
was to find circular dependencies, where loading the vocab would go into an
infinite loop. Thus I couldn't use the loaded vocab objects themselves, so
in
erything together into { … } for
> run-pipeline.
>
> By the way,
> Your suggestion in another email of implementing >process looks
> interesting to explore.
> Any example usage in this case ?
>
> Thanks
> HP
>
>
> On Sep 22, 2015, at 12:23 PM, Alex Vondrak wrote
ays with `make`, too.
On Tue, Sep 22, 2015 at 9:23 AM, Alex Vondrak wrote:
> Ultimately, I may also insert some factor quot in betweeen
>> str1 and str2 to do some processing before handing the
>> result to cmd2.
>
>
> Do you mean you want to take the output of running
>
> Ultimately, I may also insert some factor quot in betweeen
> str1 and str2 to do some processing before handing the
> result to cmd2.
Do you mean you want to take the output of running cmd1, manipulate it,
then pass *that* to cmd2? Because that sounds rather different from what
your example c
g with the compiler. Fun
story: tried to `USE: compiler.cfg.graphviz` just now, got some endless
loop of error windows that crashed my X11 session. But that's debugging for
another day, I'm afraid. :)
On Thu, Sep 17, 2015 at 7:25 AM, Alex Vondrak wrote:
> Is Alex Vondrak on the
>
> Is Alex Vondrak on the list?
Am I ever! Though you couldn't tell by looking... ;)
Would he be able to comment on how important that function is, and if we
> could work without it?
>
Looks like you're running a very old version of the graphviz library that
used th
7;s standalone executables are copies of the VM
executable (itself fairly small) + your compiled code.
Hope that helps,
--Alex Vondrak
On Sat, Feb 28, 2015 at 2:15 PM, wrote:
> Hello! I'm very interested in Factor. I don't quite understand how
> Factor's native code compiler w
See also: https://github.com/slavapestov/factor/issues/737
On Thu, Jan 29, 2015 at 6:35 AM, John Benediktsson wrote:
> 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
>
> Factor seems to encapsulate a lot of knowledge that a student of computer
> science might encounter.
>
Not sure quite what that means, but in a trivial sense, this would be true
of any (Turing complete) programming language. ;)
Does anyone else think that a university math course sequence is
To explain the error you got, though, the problem with
home
[ 0 [ file-info size>> + ] each ]
with-directory-files
1. `home` is pushed to the stack
2. `[ 0 [ file-info size>> + ] each ]` is pushed to the stack
3. `with-directory-files` executes `[ 0 [ file-info size>> + ] each ]` on
the sequence
Excited to see where this goes! I like the DSL - reminds me of how it feels
to use [Bundler](http://bundler.io/), where the language for dependency
management is the same as the language you're coding in. (Can you tell my
day job is in Ruby?)
I don't really have anything to add - I can't seem to f
1. What else are mailing lists for? :)
2. John's suggestion is good (to just rework the program), but in the
future / other situations, it may also make sense to look into the right
dataflow combinator (
http://docs.factorcode.org/content/article-dataflow-combinators.html). For
instance, instead o
for a "date" vs "datetime"
distinction---probably best as separate tuples.
On Fri, Sep 5, 2014 at 9:06 AM, Alex Vondrak wrote:
> On Fri, Sep 5, 2014 at 3:34 AM, Jon Harper wrote:
>
>> On Fri, Sep 5, 2014 at 9:52 AM, Alex Vondrak wrote:
>>
>>> O
On Fri, Sep 5, 2014 at 3:34 AM, Jon Harper wrote:
> On Fri, Sep 5, 2014 at 9:52 AM, Alex Vondrak wrote:
>
>> On Thu, Sep 4, 2014 at 4:06 PM, Jon Harper
>> wrote:
>>
>>> How about:
>>> : today ( -- timestamp ) now midnight instant >>gmt-offset
On Thu, Sep 4, 2014 at 4:06 PM, Jon Harper wrote:
> How about:
> : today ( -- timestamp ) now midnight instant >>gmt-offset ; inline
>
Or really just
: today ( -- timestamp ) gmt midnight ; inline
if I'm not mistaken. It's a short trip from `today`'s current definition:
http://docs.factorcode
014 at 1:22 AM, Georg Simon wrote:
> Am Tue, 2 Sep 2014 19:09:45 -0700
> schrieb Alex Vondrak :
>
> Thank you.
>
> > ...
> >
> > That is, if it weren't for the GMT bit, you could just say
> > `"2014-08-31"
> > ymd>timestamp ago durati
I don't have Factor installed on this machine, so I can't test my
suggestions. But I'll do my best.
`today` is defined as `now midnight` -
http://docs.factorcode.org/content/word-today,calendar.html
Notice that `now` uses `gmt`, then sets the offset -
http://docs.factorcode.org/content/word-now,c
split-Works-Fine-In-Command-Line-But-Ignores-Code-In-Ruby-Script%3F>that
> finds docsplit returning files in the root directory - on my system
> no files are winding up there.
> Let me see what I can do w/ your path/environment suggestions.
>
> Gonna be another long night...
>
gt; Factor. Help calls appear
> in
> Plone-Users<http://sourceforge.net/mailarchive/message.php?msg_id=29982797>
> and
> stackoverflow re
> python<http://stackoverflow.com/questions/18237442/execute-shell-commands-in-python-to-use-docsplit>.
> Let me dig around some mor
: scratchpad "/home/alex/factor/core" [ [ absolute-path . ] each ]
with-directory-files
"/home/alex/factor/core/generic"
"/home/alex/factor/core/parser"
"/home/alex/factor/core/sorting"
[etc]
```
On Sun, Feb 9, 2014 at 1:53 PM, Alex Vondrak wrote:
> It&
It's probably easiest to specify the full path to the file, like I did
in my previous message. Combined with the full path to the docsplit
binary/link (for your particular problem), it should theoretically
work fine:
"/full/path/to/docsplit text --no-clean -l chi_sim
/path/to/1_long_gu/long_gu001
t
IN: scratchpad "/tmp/cv.txt" exists? .
f
IN: scratchpad "docsplit text --no-clean -l eng /tmp/cv.pdf" try-process
IN: scratchpad "/tmp/cv.txt" exists? .
t
IN: scratchpad "/tmp/cv.txt" ascii file-lines first .
"Alex Vondrak"
```
On Sat, Feb 8, 20
Just noticed that something I linked to a short time ago is now 404ing
because the doc index seems to have been built with an incomplete
image. As of this writing,
http://docs.factorcode.org/content/vocab-formatting.html says "You
must first load this vocabulary to browse its documentation and wor
I have too much formatting (and email always has a way of wrecking
that), so I put a comment on the gist:
https://gist.github.com/cwalston/7368493#comment-948159
Have a good one,
--Alex Vondrak
On Mon, Nov 11, 2013 at 1:28 AM, CW Alston wrote:
> Hi all-
>
> Re-factoring 'sp
8 [ lines ] with-process-reader .
My point in the examples I gave you a few weeks ago was that the
*real* thing to watch out for here is unexpected input or results that
may give non-zero exit statuses. E.g., on my Linux box,
"find /proc -name blah" utf8 [ lines ] with-process-rea
tty wary of introducing regressions by
changing the logic without thinking it through a lot.
On Wed, Oct 30, 2013 at 7:58 PM, John Benediktsson wrote:
> Wow, Alex nice investigation!
>
> Thanks for looking into that.
>
>
>
>
> On Wed, Oct 30, 2013 at 7:46 PM, Alex Von
It's a common complaint, but the cynic in me thinks it's kind of how
the world works. I mean, (silly example, but) I probably wouldn't
like being a biologist having to search for info about pythons
(http://www.google.com/search?q=python); yet no one's going to change
the name of a genus. Not that
mitive is implemented:
https://github.com/slavapestov/factor/blob/master/vm/contexts.cpp#L274
Basically, the datastack before & after the call to `nfc` is exactly
the same, so it thinks the stack effect was `( -- )`. But with
"\xF1", this isn't the case, and the error is thu
rcode.org/content/article-io.launcher.redirection.html
and some examples in
http://docs.factorcode.org/content/article-io.launcher.examples.html
Hope that helps,
--Alex Vondrak
On Mon, Oct 21, 2013 at 2:26 AM, Björn Lindqvist wrote:
> 2013/10/21 CW Alston :
>> :: ( filename -- se
ntil someone with
a better answer comes along),
--Alex Vondrak
On Sun, Oct 13, 2013 at 10:43 PM, Alf Mikula wrote:
> Hey everybody,
>
> I'm having a little bit of trouble getting started, and I'd appreciate any
> help that anyone can offer.
>
> I'm looking for a s
able to just pass around a reference to the
hashtable in a more conventional iteration:
IN: scratchpad H{ } clone { 1 2 3 } over '[ dup 100 * _ set-at ] each .
H{ { 100 1 } { 200 2 } { 300 3 } }
Hope that helps & happy hacking,
--Alex Vondrak
On Wed, Oct 9, 2013 at 8:10 PM, Jon He
On Mon, Aug 26, 2013 at 12:45 AM, Björn Lindqvist wrote:
> The binary name "factor" was already taken by a program in coreutils
> so I had to change it to "factor-run".
How about something like "factor-lang" or "factor-l
```
Not perfect, but gives you a general idea. And the prettyprinter's output
for the above isn't awful.
Documenting these conventions would clearly be better, of course...
Hope that helps,
--Alex Vondrak
--
S
ind-all .
{
{
2
T{ tag
{ name "div" }
{ attributes H{ { "class" "food is good" } } }
}
}
}
```
Just some ideas; I'm sure this could/should all be factored out into the
proper helper words.
Regards,
--Ale
sure if html.parser is very mature compared to, say,
the XML vocab: http://docs.factorcode.org/content/article-xml.html
```
IN: scratchpad "bar" string>xml
"foo" "class" deep-tags-with-attr children-tags [
"Found: " write xml>string pr
enge / suggested improvement: instead of having a static `plot` word,
modify it so that a user can pass in their own quotation to do whatever
plotting they want---draw a pixel on the screen, set an array coordinate,
print a message, send commands to a robot, whatever. Essentially, turn the
`bresenham's-algor
I missed that part! You're right, that doesn't get along with locals.
> 5 - It's the Bresenham linedraw code taken from the Wikipedia page; the
> final optimised version on that page.
>
I had found that and am now spending my evening attempting to understand
Also
worth doing is declaring the "nested" stack-effects of the input
quotations. E.g.,
:: change-cell ( array x y quot: ( elt -- newelt ) -- ) ... ;
5. In general, I can't make heads or tails of do-line. Is there a working
C-style implementation you're trying to port? If so,
ly an academic exercise regardless, unless
you're an expert cryptographer working on an established crypto library.
Cf.
http://web.archive.org/web/20130121031415/http://chargen.matasano.com/chargen/2009/7/22/if-youre-typing-the-letters-a-e-s-into-your-code-youre-doing.html
Doesn't mean it's
were a good move!). Speaking of which, I
don't think `inv-sub-bytes` gets typed like `sub-bytes` (an untyped `[
inv-sbox nth ] map` vs the typed `sub-word`). In case it makes a
difference. :-)
Good stuff,
--Alex Vondrak
On Thu, Jun 6, 2013 at 8:42 AM, Gabriel Kerneis wrote:
> On Thu,
Also, using OpenSSL to compare was a great idea! And a good idea for a
real-world library besides---"never roll your own crypto" and all that.
But at least it's still fun to see AES done in Factor.
Regards,
--Alex Vondrak
On Thu, Jun 6, 2013 at 9:36 AM, Alex Vondrak wrote:
>
hat makes sense. Thanks for the clarification!
--Alex Vondrak
--
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers po
there...I'm no
cryptographer.
All in all, good work! I'm impressed by how short & simple all the word
definitions are, coming from grading Java implementations.
Nice job,
--Alex Vondrak
On Mon, May 27, 2013 at 10:39 AM, John Benediktsson wrote:
> Two general approaches, where
Oo, or even
: triples ( n -- seq )
iota rest 3 [ first3 triple? ] filter-combinations ;
On Mon, May 20, 2013 at 7:06 PM, Alex Vondrak wrote:
> Or, going by the algorithms in the wiki:
>
> ```
> USING: arrays kernel locals math math.ranges sequences
> sequences.extras ;
>
:
```
: triple? ( x y z -- ? )
[ sq ] tri@ [ + ] dip = ;
: triples ( n -- seq )
iota rest 3 all-combinations [ first3 triple? ] filter ;
```
Regards,
--Alex Vondrak
On Mon, May 20, 2013 at 8:18 AM, _ _ wrote:
> ! Copyright (C) 2013 Your name.
> ! See http://factorcode.org/licen
Looks like it's back now. I'm guessing it was this:
https://github.com/slavapestov/factor/issues/882
On Fri, May 3, 2013 at 11:35 PM, mr w wrote:
> Site down, no posts ... factorcode rapture?
>
>
> --
> Get 100% visibi
it read from standard-input. Except that
standard-input was bound to the output of the prior pipeline element (the
output of cat).
Hope that helps,
--Alex Vondrak
--
Precog is a next-generation analytics platform cap
-five-years-old.html
And we only have a few minor versions left to use!
Also, it occurs to me that we've yet to do a GSoC. Isn't that time
approaching soon? (This probably enters the scope of a different thread...)
--Alex Vondrak
On Sat, Apr 20, 2013 at 9:44 PM, John Benediktsson wr
is too confusing for the Real World."
"You have to read it backwards!"
"Infix languages are easier to read because I know an infix language."
"But what about arithmetic expressions? Betcha didn't think of that!"
"What's the point of having another lan
-to-n`:
: ij-to-n ( size row col -- n )
[ * ] dip + ! already adds the elements
+ ; ! stack effect error
- You've got an unmatched `]` in your tests.
Regards,
--Alex Vondrak
--
Precog is a next-gene
;
I'll have to step away now, before I make more of a fool of myself. :)
Spam spam spam,
--Alex Vondrak
On Wed, Apr 10, 2013 at 7:57 PM, Alex Vondrak wrote:
> Self bug-report:
>
> IN: scratchpad [ 1 2 3 ] [ 1 ] similarity .
> 1
>
> Oh well. Suppose we'd need
>
ittle ambiguous (treating sequences as n-ary trees). Just a
heuristic, I guess.
--Alex Vondrak
On Wed, Apr 10, 2013 at 7:51 PM, Alex Vondrak wrote:
> In case anyone's interested, attached is my interpretation of the "tree
> similarity" metric given in the paper I l
\ move-to-file \ usage word-similarity .
0
IN: scratchpad \ move-to-dir \ move-to-dir word-similarity .
1
It would be interesting to implement the rest of the algorithm. See how it
does in Factor.
Regards,
--Alex Vondrak
On Wed, Apr 10, 2013 at 6:35 PM, John Benediktsson wrote:
> You d
ctor words are just nested sequences (quotations), so they're
already a tree structure.
Wikipedia ( http://en.wikipedia.org/wiki/Duplicate_code ) points to an
interesting and very relevant paper:
http://www.semanticde
1 1 } { 2 2 } }
IN: scratchpad 1 over closure .
H{ { 1 1 } }
Now, the duplicated code in the classes vocab has a much shorter
explanation: that was John fucking around with speed improvements a couple
weeks back. :) [8] He uses HS{ } instead of H{ } to represent the sets,
since (as explained) H{ }
most other languages.
In the interest of "teaching a man to fish", I won't point out the issue
you're having, but it becomes pretty obvious when you take a look. Your
hunch is on the right track. :)
Hope that helps,
--Alex Vondrak
---
r/core/strings/parser/parser.factor
--Alex Vondrak
On Sun, Feb 24, 2013 at 7:38 AM, Joan Arnaldich wrote:
> Hi there!
>
> I'm beginning to give Factor a try as a replacement for the shell. We
> use Windows at work and wanted to have something like Python's raw
> string syntax
o
http://docs.factorcode.org/content/word-reversed%2Csequences.html
which gives you all the code actually used to implement the `reversed`
virtual sequence, with further links to documentation for the words whose
definitions you see (like `virtual@`).
Hope that helps,
--Alex V
if you aren't sure about how constructors are defined.
--Alex Vondrak
--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http
What about adding to the list at
https://github.com/slavapestov/factor/blob/master/basis/compiler/tree/propagation/known-words/known-words.factor#L224as
a stop gap?
--Alex Vondrak
On Sun, Jan 20, 2013 at 11:44 AM, John Benediktsson wrote:
> I noticed this before and made a patch:
>
>
arrays
: >array ( seq -- array ) { } clone-like ;
IN: scratchpad \ >string see
USING: sequences ;
IN: strings
: >string ( seq -- str ) "" clone-like ; inline
we notice that >array isn't inlined, while >string is. So perhaps the type
informati
n reasons). See
http://concatenative.org/wiki/view/Factor/FAQ/Implementation for more.
Regards,
--Alex Vondrak
--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep y
combinators to get rid of the last
iteration's "update" return values, so you don't have to drop them
explicitly.
Or, don't use smart combinators at all, and make explicit words like `for`,
`2for`, etc.
Regards,
--Alex Vondrak
On Sat, Jan 12, 2013 at 3:12
r variants; take a look through the words defined in vocabs
like `sequences`. All else fails, there's good ol' fashioned tail
recursion: http://docs.factorcode.org/content/article-tail-call-opt.html
Hope these help,
--Alex Vondrak
On Thu, Jan 10, 2013 at 1:42 AM, Leonard P w
Just forwarding this along to the list, because it probably gets better
visibility than an ancient github issue:
https://github.com/slavapestov/factor/issues/22#commit-ref-fdc2c16
Happy holidays,
--Alex Vondrak
--
Master
/article-command-line.html for more
flags, if you're curious (though I don't think any others particularly help
here).
Hope that helps,
--Alex Vondrak
On Sun, Dec 16, 2012 at 11:46 PM, Leonard P wrote:
> Is there a way to use vi to edit factor code?
>
> Graphical listener is
What about it didn't work? Did you get an error? Otherwise, what actually
happened, and how did that differ from what you expected?
--Alex Vondrak
On Mon, Dec 17, 2012 at 12:43 AM, Leonard P wrote:
> On Mon, Dec 17, 2012 at 2:46 AM, Leonard P wrote:
> > Is there a way to
t won't show up in the search
results. The docs.factorcode.org stuff is generated after a `load-all`,
which (as you might guess) loads every vocabulary, so a search there should
comb through everything.
Hope that helps,
--Alex Vondrak
On Sun, Dec 16, 2012 at 7:05 PM, Leonard P wrote:
>
http://docs.factorcode.org/content/word-run,vocabs.loader.html
E.g., `"terrain" run`
--Alex Vondrak
On Sun, Dec 16, 2012 at 6:49 PM, Leonard P wrote:
> Anyone know how to run a program from a file, with the listener?
>
> Wanted to see the terrain example.
>
> http
71 matches
Mail list logo