Hi Alex!

I've updated the code/article with your suggestions and the link to the
parser. I definitely need to take a look at it.

Thanks a lot for pointing this out!

Jan.

On Sun, Feb 24, 2013 at 6:07 PM, Alex Vondrak <ajvond...@gmail.com> wrote:

> Good work!  Glad you were able to learn enough from the docs & source
> alone.
>
> Only suggestion I have is that instead of `124`, you can use `CHAR: |`.
> If you try it out in the listener, you'll see that it just pushes `124`
> onto the stack.  But it obviously reads much better!  Unfortunately, the
> listener can be misleading, because when it shows you the source code of a
> word, it'll just show an integer even if the actual source code uses the
> `CHAR:` word.
>
> It also occurs to me that raw strings probably need to support some sort
> of escape sequences, if only for their delimiters (i.e., how do you include
> a pipe character in your string?).  For the use-case of Windows paths, this
> version of course does fine.  But just in case you want to get an idea of
> how Factor parses escape sequences in normal strings, take a look through
> https://github.com/slavapestov/factor/blob/master/core/strings/parser/parser.factor
>
> --Alex Vondrak
>
> On Sun, Feb 24, 2013 at 7:38 AM, Joan Arnaldich <jarnald...@gmail.com>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 so I can use unescaped backslashes for paths.
>>
>> I skimmed through the help system and couldn't find the feature, so I
>> decided to roll my own parsing word. All in all it was something easy
>> to do and an interesting experience for a beginner, so I blogged
>> about it: http://jarnaldich.me/2013/02/24/raw-strings-in-factor.html
>>
>> ... but, of course, being one of the first things I code in Factor,
>> maybe I just got it completely wrong... so any
>> corrections/comments/suggestions will be welcome.
>>
>> Thanks!
>>
>> Jan.
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Everyone hates slow websites. So do we.
>> Make your web apps faster with AppDynamics
>> Download AppDynamics Lite for free today:
>> http://p.sf.net/sfu/appdyn_d2d_feb
>> _______________________________________________
>> Factor-talk mailing list
>> Factor-talk@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/factor-talk
>>
>>
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
> _______________________________________________
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
>
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to