You could also keep them like this:

{
    name>>
    version>>
    ...
}

and use execute( x -- x ) to call them

On Thu, Dec 11, 2014 at 4:06 AM, Roberto López <roberto.lo...@acm.org>
wrote:

> Hi Andrea,
>
> Yes, I'm already working on it. Reflection is always a risky practice.
>
> Anyway, the deployment process (level 1) should have failed or warned
> the programmer.
>
> Regards,
> Roberto
>
> Andrea Ferretti <ferrettiand...@gmail.com> writes:
>
> > 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"
> >     "deb:filename" "deb:md5sum" "deb:description" "deb:homepage"
> "deb:depends"
> >     "deb:pre-depends" "deb:suggests" "deb:conflicts" "deb:recommends"
> > "deb:breaks"
> >     "deb:replaces" "deb:provides" "deb:provided-by" "deb:tags"
> "deb:enhances"
> >   }
> >
> > which you are trying to map into actual accessors with the list of
> > accessors itself, like
> >
> > { [ >>name ] [ >>version ] ... }
> >
> > It should be as concise and avoid reflection
> >
> >
> > 2014-12-11 12:08 GMT+01:00 Roberto López <roberto.lo...@acm.org>:
> >> Hi John,
> >>
> >> I've just shared a reduced version of my code. No PEG, no sense but it
> >> doesn't need any input data.
> >>
> >>   http://paste.factorcode.org/paste?id=3410
> >>
> >> I've detected the die word is called when reading-word is executed. I
> >> hope it helps.
> >>
> >> Regards,
> >> Roberto.
> >>
> >> John Benediktsson <mrj...@gmail.com> writes:
> >>
> >>> Hi Robert,
> >>>
> >>> It's unlikely this is due to PEGs, for example this example I just now
> made
> >>> from an old blog post works using Level 1 and deploy as console
> application:
> >>>
> >>>     http://paste.factorcode.org/paste?id=3408
> >>>
> >>> It is more likely that you are trying to use a feature like prettyprint
> >>> (used by the "." word) or something else that requires a higher level
> of
> >>> reflection about the system.  In factor, my first example used "."
> instead
> >>> of "number>string print" and had a very similar error at Level 1 as
> yours.
> >>>
> >>> If you'd like to share some of your code either in public or in
> private, I
> >>> could help you figure it out?
> >>>
> >>> We should spend some more time with deploy, it hasn't gotten as much
> love
> >>> as other parts of the system and so might feel a little fragile or
> magical
> >>> sometimes.
> >>>
> >>> Best,
> >>> John.
> >>>
> >>> On Wed, Dec 10, 2014 at 1:55 AM, Roberto López <roberto.lo...@acm.org>
> >>> wrote:
> >>>
> >>>> Hi,
> >>>>
> >>>> I am trying to deploy a console application using the awesome PEG
> >>>> vocabulary. If I choose to deploy using "Level 1 - No reflection" the
> >>>> application fails when I run it with. The message is...
> >>>>
> >>>> | The die word was called by the library. Unless you called it
> yourself,
> >>>> | you have triggered a bug in Factor. Please report.
> >>>> | Starting low level debugger...
> >>>> | Basic commands:
> >>>> |   q ^D             -- quit Factor
> >>>> |   c                -- continue executing Factor - NOT SAFE
> >>>> |   t                -- throw exception in Factor - NOT SAFE
> >>>> |   .s .r .c         -- print data, retain, call stacks
> >>>> |   help             -- full help, including advanced commands
> >>>> |
> >>>> | > ==== DATA STACK:
> >>>> | T{ #<not a string: f> accessors:name>> }
> >>>> | T{ #<not a string: f> accessors:name>> }
> >>>> | ==== RETAIN STACK:
> >>>> | ==== CALL STACK:
> >>>> |
> >>>> | frame: 0x7f41b94b5f38 size 32
> >>>> | executing: f
> >>>> | scan: f
> >>>> | word/quot addr: 1
> >>>> | word/quot xt: 7f419e5a3500
> >>>> | return address: 7f419e5a3531
> >>>> |
> >>>> | frame: 0x7f41b94b5f58 size 32
> >>>> | executing: [ #<not a string: f> 1 #<not a string: f> ]
> >>>> | scan: 0
> >>>> | word/quot addr: 7f41a2aaec64
> >>>> | word/quot xt: 7f419e7312e0
> >>>> | return address: 7f419e7312ef
> >>>> |
> >>>> | frame: 0x7f41b94b5f78 size 16
> >>>> | executing: f
> >>>> | scan: f
> >>>> | word/quot addr: 1
> >>>> | word/quot xt: 7f419e69fb60
> >>>> | return address: 7f419e69fb80
> >>>> |
> >>>> | frame: 0x7f41b94b5f88 size 16
> >>>> | executing: f
> >>>> | scan: f
> >>>> | word/quot addr: 1
> >>>> | word/quot xt: 7f419e723dc0
> >>>> | return address: 7f419e723df1
> >>>> |
> >>>> | frame: 0x7f41b94b5f98 size 32
> >>>> | executing: [ #<not a string: f> T{ #<not a string: f> 0 0 { T{
> #<not a
> >>>> string: f> f } T{ #<not a string: f> f } T{ #<not a string: f> f } T{
> #<not
> >>>> a string: f> f } T{ #<not a string: f> f } T{ #<not a string: f> f }
> T{
> >>>> #<not a string: f> f } T{ #<not a string: f> f } } } #<not a string:
> f>
> >>>> #<not a string: f> #<not a string: f> T{ #<not a string: f> 0 0 { T{
> #<not
> >>>> a string: f> f } T{ #<not a string: f> f } T{ #<not a string: f> f }
> T{
> >>>> #<not a string: f> f } } } #<not a string: f> #<not a string: f>
> #<not a
> >>>> string: f> T{ #<not a string: f> { } 0 }... ]
> >>>> | scan: 58
> >>>> | word/quot addr: 7f41a2b95814
> >>>> | word/quot xt: 7f419e72e800
> >>>> | return address: 7f419e72e9c1
> >>>> |
> >>>> | frame: 0x7f41b94b5fb8 size 32
> >>>> | executing: f
> >>>> | scan: f
> >>>> | word/quot addr: 1
> >>>> | word/quot xt: 7f419e549060
> >>>> | return address: 7f419e549084
> >>>>
> >>>> But If I choose to deploy using "Level 6 - Full environment" the
> >>>> application runs correctly. No problem with this level but the
> >>>> executable is too big.
> >>>>
> >>>> Any idea to get a smaller executable?
> >>>>
> >>>>
> >>>>
> ------------------------------------------------------------------------------
> >>>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> >>>> from Actuate! Instantly Supercharge Your Business Reports and
> Dashboards
> >>>> with Interactivity, Sharing, Native Excel Exports, App Integration &
> more
> >>>> Get technology previously reserved for billion-dollar corporations,
> FREE
> >>>>
> >>>>
> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
> >>>> _______________________________________________
> >>>> Factor-talk mailing list
> >>>> Factor-talk@lists.sourceforge.net
> >>>> https://lists.sourceforge.net/lists/listinfo/factor-talk
> >>>>
> >>>
> ------------------------------------------------------------------------------
> >>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> >>> from Actuate! Instantly Supercharge Your Business Reports and
> Dashboards
> >>> with Interactivity, Sharing, Native Excel Exports, App Integration &
> more
> >>> Get technology previously reserved for billion-dollar corporations,
> FREE
> >>>
> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
> >>> _______________________________________________
> >>> Factor-talk mailing list
> >>> Factor-talk@lists.sourceforge.net
> >>> https://lists.sourceforge.net/lists/listinfo/factor-talk
> >>
> >>
> ------------------------------------------------------------------------------
> >> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> >> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> >> with Interactivity, Sharing, Native Excel Exports, App Integration &
> more
> >> Get technology previously reserved for billion-dollar corporations, FREE
> >>
> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
> >> _______________________________________________
> >> Factor-talk mailing list
> >> Factor-talk@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/factor-talk
> >
> >
> ------------------------------------------------------------------------------
> > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> > from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> > with Interactivity, Sharing, Native Excel Exports, App Integration & more
> > Get technology previously reserved for billion-dollar corporations, FREE
> >
> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
> > _______________________________________________
> > Factor-talk mailing list
> > Factor-talk@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/factor-talk
>
>
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
>
> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
> _______________________________________________
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to