Hi - modest revision to the USING linter here
<https://gist.github.com/cwalston/f6da9cca0105f5d67483935380001d84>
Positive/negative feedback very welcome.
~cw

On Tue, Feb 6, 2018 at 5:48 PM, CW Alston <cwalsto...@gmail.com> wrote:

> Hi cat - I have a preliminary gist here
> <https://gist.github.com/cwalston/f6da9cca0105f5d67483935380001d84>. Feel
> free to take a look.
> I have a revision in progress, and I'll edit the gist soon. I've long
> pondered
> the un-needed vocabs conundrum, so thanks for bringing it up.
> John's regexp gave me the encouragement to have a go at a linter, but it's
> a thorny problem!
> ~cw
>
> On Tue, Feb 6, 2018 at 5:21 PM, cat via Factor-talk <factor-talk@lists.
> sourceforge.net> wrote:
>
>> I'd be interested to follow your development of that linter, I think you
>> should put it in a GitHub repository stat :)
>>
>>
>>
>> -------- Original Message --------
>> On February 6, 2018 7:56 PM, CW Alston <cwalsto...@gmail.com> wrote:
>>
>> Ah, thanks for the reassurance John -
>> This tells me that my own monkeying around must have caused my problem.
>> I'm trying to write a linter vocab for USING: ... ; forms ( see cat's
>> previous message),
>> building on your neat regexp suggestion:
>>
>>     "resource:core/math/math.factor" utf8 file-contents
>>     R/ USING:(\s+[^;]+)+\s+;/ all-matching-subseqs
>>     [ "USING:" ?head drop ";" ?tail drop " " split harvest ] map concat
>>
>> and part of my code does a *[ ".private" tail? ] reject* in rewriting
>> the USING list for the target source file.
>> I likely called that on "resource:core/math/math.factor" at some stage
>> of experimentation, and forgot
>> to restore the original text! 🤔
>> I saw this issue in testing my own work vocabs, and fixed it there, but
>> didn't realize I had borked the math file earlier.
>> Definitely a bad practice learning experience that I'll remember!
>>
>> If I get the linter working properly (& safely) I'll post a gist for
>> review.
>>
>> ~cw
>>
>> On Tue, Feb 6, 2018 at 4:19 PM, John Benediktsson <mrj...@gmail.com>
>> wrote:
>>
>>> That's weird because kernel.private has been there since March 2016
>>> (6b07e6caf22b290805ddf9acedd7163165860b3c).
>>>
>>> I also see it in the binary releases.
>>>
>>> On Mon, Feb 5, 2018 at 9:08 PM, CW Alston <cwalsto...@gmail.com> wrote:
>>>
>>>> Hi folks -
>>>> After doing a Factor git update via:
>>>>
>>>> cd factor
>>>> ./build.sh update
>>>>
>>>> - At Factor startup I got:
>>>>
>>>> Press F1 at any time for help.
>>>> Factor 0.98 x86.64 (1854, heads/master-3a23a92531, Sun Nov 26 20:04:26
>>>> 2017)
>>>> [Clang (GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1))] on
>>>> macosx
>>>>
>>>> - and then pressing F2 for a refresh (no work files loaded) I got:
>>>>
>>>> IN: scratchpad Command: refresh-all
>>>> Loading resource:core/math/math.factor ! <=======
>>>> IN: scratchpad Command: continue-restart
>>>> resource:core/math/math.factor:209: Note:
>>>> Added "kernel.private" vocabulary to search path
>>>>
>>>> Restarts were invoked adding vocabularies to the search path.
>>>> To avoid doing this in the future, add the following forms
>>>> at the top of the source file:
>>>>
>>>> USING: kernel kernel.private ;
>>>> IN: math
>>>>
>>>> IN: scratchpad
>>>>
>>>> - Checking the virgin "resource:core/math/math.factor" source file, I
>>>> found:
>>>>
>>>> USING: kernel ;
>>>> IN: math
>>>>
>>>> - After adding "kernel.private" to the source USING: list, saving,
>>>> quitting, re-launching & pressing F2 for a refresh, I get no restarts:
>>>>
>>>> Press F1 at any time for help.
>>>> Factor 0.98 x86.64 (1854, heads/master-3a23a92531, Sun Nov 26 20:04:26
>>>> 2017)
>>>> [Clang (GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1))] on
>>>> macosx
>>>>
>>>> IN: scratchpad Command: refresh-all
>>>> IN: scratchpad
>>>>
>>>> - Looks like "kernel.private" (recent change?) didn't get included in
>>>> the build.
>>>>
>>>> Smooth sailing with work vocabs after this fix, where I had
>>>> some surprising hangs before.
>>>>
>>>> Cheers,
>>>> ~cw
>>>>
>>>>
>>>> --
>>>> *~ Memento Amori*
>>>>
>>>> ------------------------------------------------------------
>>>> ------------------
>>>> Check out the vibrant tech community on one of the world's most
>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>> _______________________________________________
>>>> Factor-talk mailing list
>>>> Factor-talk@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/factor-talk
>>>>
>>>>
>>>
>>
>>
>> --
>> *~ Memento Amori*
>>
>>
>>
>> ------------------------------------------------------------
>> ------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Factor-talk mailing list
>> Factor-talk@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/factor-talk
>>
>>
>
>
> --
> *~ Memento Amori*
>



-- 
*~ Memento Amori*
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to