Re: [Factor-talk] Factor interface to Spotlight

2013-11-17 Thread CW Alston
Hi all,

The Factor Spotlight interface is definitely getting somewhere. John B.
(mrjbq7) has
significantly streamlined the code, and whipped up a docs file to boot.
Take a look at
the revision on GitHub , and
give it a whirl. Looks like it may get merged.

Thanks & cheers!
~cw


On Sun, Nov 17, 2013 at 7:49 PM, CW Alston  wrote:

> Looks pretty dang good, John -
>
> Thanks for the emendations. Someday I'll get around to using the scaffold
> tool.
> If it's already in the latest build, I'll check out the new format.
>
> Much obliged,
> ~cw
>
>
> On Sun, Nov 17, 2013 at 6:17 PM, John Benediktsson wrote:
>
>> Sweet, I merged it and converted a bunch of your comments into help
>> documents for the various commands.
>>
>>
>> http://gitweb.factorcode.org/gitweb.cgi?p=factor;a=commitdiff;h=803d0d4968733ab17afe0207ee6fed63f91abcfc;hp=c6e217da0600b98e17cb09143c06675c51afddcd
>>
>> Let me know what you think.
>>
>> P.S. if you update from github you'll have to wait a bit for us to get
>> the sync script working as the factorcode server was upgraded and it looks
>> like it isn't working properly yet.
>>
>>
>>
>>
>> On Sat, Nov 16, 2013 at 7:40 PM, CW Alston  wrote:
>>
>>> Hi John,
>>>
>>>  That sounds great. I just now set up the code on 
>>> GitHub,
>>> and added the factorcode BSD license line.
>>> First time for me; hope I got the hairy thing right. Being brand new to
>>> collaborative coding, I don't know
>>> the etiquette on adding contributors names. I got so much help, I reckon
>>> other names should be added.
>>> Let me know what to do about that.
>>>
>>>  The solution to the problem of gathering all kMDItem atributes was
>>> staring me in the face, but I didn't
>>> see it until this evening. It's added in the GiHub code.
>>>
>>>  I hope folks can put spotlight.factor through its paces, & suggest
>>> improvements.
>>> Thanks to all for the patient help.
>>>
>>> Cheers!
>>> ~cw
>>>
>>>
>>> On Sat, Nov 16, 2013 at 4:13 PM, John Benediktsson wrote:
>>>
 Hi,

 I'd like to merge this into the main repository, i see that it is
 copyright you, would you like to make it available to us with BSD license
 like the other factorcode?

 Thanks,
 John.


 On Wed, Nov 13, 2013 at 4:58 PM, CW Alston wrote:

> A good point, Björn -
>
>  Since the number of elements is known beforehand in mdutil & mdls, an
> immutable array
> would suffice (& use less words). I carried the vector format over
> from a previous incarnation
> of , where I didn't know how many elems would be needed in
> the array.
>
> I'm not religious about mutating data structures, but your suggestion
> makes the code more succinct.
>
> Thanks,
> ~cw
>
>
> On Wed, Nov 13, 2013 at 5:04 AM, Björn Lindqvist wrote:
>
>> Here are some random tips from me. I'm also a Factor newbie so take it
>> with a grain of salt:
>>
>>  * Don't use vectors because normal sequences works just as well.
>>  * Be functional! Avoid words that mutate data structures because they
>> make the code harder to reason about.
>>
>> F.e. this piece of code in mdls:
>>
>> "mdls" 1vector swap suffix!
>>
>> can be written as just:
>>
>> "mdls" swap 2array
>>
>> Another example is your mdutil word:
>>
>> :: (mdutil) ( flags on|off volume root/owner -- seq )
>> root/owner 1vector "-" flags append suffix!
>> "-i" suffix! on|off suffix! volume suffix!
>>
>> It's a great showcase for local variables but can be better written
>> without array mutations:
>>
>> :: mdutil ( flags on|off volume root/owner -- seq )
>> root/owner flags "-" prepend "-i" on|off volume 5 narray
>>
>>
>> 2013/11/13 CW Alston :
>> >  I've posted a new gist for spotlight.factor w/ filename & Factor
>> > formatting.
>> > I think I dealt with most of Alex's red-lines, & I shed the string
>> > constants.
>> > The whole thing is much shorter. The included examples work on my
>> machine.
>> >
>> >  The file can be USE:d from the listener if you give it a folder in
>> your
>> > 'work'.
>> >
>> >  After a long divagation, looks like I've wound up back where John
>> & Alex
>> > suggested I start, 3 weeks ago. Well, like I was warned in the Boy
>> Scouts,
>> > when you wander lost in the woods, you tend to go 'round in circles.
>> > Just couldn't see how to get on from there without a compass (or
>> native
>> > guides),
>> > & I did learn a lot along the way. Still needs some improvement
>> (maybe bug
>> > fixes, too).
>> >
>> >  In particular, I'd like to memoize an API call to
>> > MDSchemaCopyAllAttributes(),
>> > but I'm better at Chinese than C. Pointers on alien-invoke, o

Re: [Factor-talk] docs.factorcode.org not doing a `load-all`?

2013-11-17 Thread John Benediktsson
@erg recently upgraded the factorcode.org server, and it looks like this
needs to be fixed.

Also noticed that the sync script that keeps the git repository on
factorcode in sync with github does not appear to be running properly.


On Sun, Nov 17, 2013 at 5:26 PM, Alex Vondrak  wrote:

> 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 words.
>  USE: formatting"
>
> Is it just this one vocab, or did something else change, like
> docs.factorcode.org not doing a `load-all`?  Or maybe the server
> started running with a different image recently?
>
> I can open an issue, if need be.  Thought it might be a quick enough
> fix to get an answer here.  If nothing else, consider this a PSA.
>
>
> --
> DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
> OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
> Free app hosting. Or install the open source package on any LAMP server.
> Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
> http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
> ___
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
--
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


[Factor-talk] docs.factorcode.org not doing a `load-all`?

2013-11-17 Thread Alex Vondrak
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 words.
 USE: formatting"

Is it just this one vocab, or did something else change, like
docs.factorcode.org not doing a `load-all`?  Or maybe the server
started running with a different image recently?

I can open an issue, if need be.  Thought it might be a quick enough
fix to get an answer here.  If nothing else, consider this a PSA.

--
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk