Re: [Factor-talk] restricting ratio literals

2016-10-24 Thread John Benediktsson
Those examples do look ugly -- maybe base 10 ratios only is not a bad idea. But would it support the 0d prefix? e.g. ``0d1+1/3``? On Mon, Oct 24, 2016 at 10:23 AM, Jon Harper wrote: > Hi list, > I'm reading the questions at

Re: [Factor-talk] Factor As Scripting Language

2016-10-24 Thread Alexander Ilin
Here's a small utility for you: USING: io.launcher io.encodings.utf8 sequences sets documents.private ;: user-groups ( -- seq/f )    "whoami /groups" utf8 [ contents ] with-process-reader split-lines    dup [ members "= " = ] find    [    [ 1 + tail ] dip    [ CHAR: space = ] find drop 

[Factor-talk] restricting ratio literals

2016-10-24 Thread Jon Harper
Hi list, I'm reading the questions at https://github.com/factor/factor/pull/1362 again I think we should only allow ratio literals in base 10. Currently we support 0xc+b/a or 0o4+7/3 or 0b1101+1101/110 but it looks ugly. What do you think ? Jon

Re: [Factor-talk] Factor As Scripting Language

2016-10-24 Thread Onorio Catenacci
Ok, thanks for the clarification folks. I guess I should have assumed anything other than f would be true. :) I'm a member of IEEE--mainly for the articles. :) > Yeah, Factor is pretty cool, I agree. : ) > > I see you are with IEEE. That's cool, too : ) > -- Onorio Catenacci

Re: [Factor-talk] Factor As Scripting Language

2016-10-24 Thread Alexander Ilin
24.10.2016, 19:08, "Onorio Catenacci" :Oh--ok. So I could tack on a "0 >" (minus the quotes of course) atthe end and that'd work out. In fact that's exactly what I want. :)Nope, `f 0 >` would throw an exception.You could use `>boolean` if you want strictly a `t` or `f` return

Re: [Factor-talk] Factor As Scripting Language

2016-10-24 Thread John Benediktsson
You shouldn't need to "0 >" because 641 is considered a "non false" value. On Mon, Oct 24, 2016 at 9:07 AM, Onorio Catenacci wrote: > Oh--ok. So I could tack on a "0 >" (minus the quotes of course) at > the end and that'd work out. In fact that's exactly what I want. :) >

Re: [Factor-talk] Factor As Scripting Language

2016-10-24 Thread Onorio Catenacci
Oh--ok. So I could tack on a "0 >" (minus the quotes of course) at the end and that'd work out. In fact that's exactly what I want. :) Yes, you can automate data entry into a website with Selenium. They've got bindings for C#, Java, Python and a few other languages. I was hoping that maybe

Re: [Factor-talk] Factor As Scripting Language

2016-10-24 Thread Alexander Ilin
Hi! 24.10.2016, 18:27, "Onorio Catenacci" :Thanks for the suggestion Александр! Oddly enough when I enter thatstring into the Repl on Windows 7 I get 641. I tried breaking up thecommand sequence over two lines (breaking at the ";") and the resultis the same.The entire output of

Re: [Factor-talk] Restricting number bases conversion to 36

2016-10-24 Thread John Benediktsson
I agree. Also that's a great example. > On Oct 24, 2016, at 7:12 AM, Jon Harper wrote: > > Hi list, > From the docs, http://docs.factorcode.org/content/article-number-strings.html > "Integers can be converted to and from arbitrary bases." > > Indeed, we have: > IN:

Re: [Factor-talk] Factor As Scripting Language

2016-10-24 Thread Onorio Catenacci
Thanks for the suggestion Александр! Oddly enough when I enter that string into the Repl on Windows 7 I get 641. I tried breaking up the command sequence over two lines (breaking at the ";") and the result is the same. The version of the Repl is: Factor 0.98 x86.64 (1788,

Re: [Factor-talk] Factor As Scripting Language

2016-10-24 Thread Alexander Ilin
Hi! 24.10.2016, 16:38, "Onorio Catenacci" :I want to be able to verify that the currently logged-in user hasadmin permissions. Any pointers to blog postings or vocabularies Imay want to look at? This will tell you if the current user is a member of the Administrators group: 

[Factor-talk] Restricting number bases conversion to 36

2016-10-24 Thread Jon Harper
Hi list, >From the docs, http://docs.factorcode.org/content/article-number-strings.html "Integers can be converted to and from arbitrary bases." Indeed, we have: IN: scratchpad 1835084090 9830 >base print i♥u and it round trips fine ! IN: scratchpad 1835084090 9830 [ >base ] [ base> ] bi .

[Factor-talk] Factor As Scripting Language

2016-10-24 Thread Onorio Catenacci
Hi all, Apologies for the broad questions but so far my Google-Fu has been less than effective. I want to use Factor as a scripting language for Windows. I want to be able to verify that the currently logged-in user has admin permissions. Any pointers to blog postings or vocabularies I may want