Re: [Factor-talk] restricting ratio literals
I think there is value in having such in important word (string>number) have a documented behavior. Right now it's hard to document all the things that are correctly parsed by this word... Jon On Wed, Oct 26, 2016 at 9:40 AM, Björn Lindqvistwrote: > Imho, choose based on what makes the implementation better. If the > parser can be written in a simpler (and probably faster) way by > dropping support for ratios in uncommon bases, then let's do it. Tbh, > I don't think any ratios other than those on the format int1/int2 > needs to be supported. > > 2016-10-24 19:23 GMT+02:00 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 > > > > > -- > > 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 > > > > > > -- > mvh/best regards Björn Lindqvist > > > -- > The Command Line: Reinvented for Modern Developers > Did the resurgence of CLI tooling catch you by surprise? > Reconnect with the command line and become more productive. > Learn the new .NET and ASP.NET CLI. Get your free copy! > http://sdm.link/telerik > ___ > Factor-talk mailing list > Factor-talk@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/factor-talk > -- The Command Line: Reinvented for Modern Developers Did the resurgence of CLI tooling catch you by surprise? Reconnect with the command line and become more productive. Learn the new .NET and ASP.NET CLI. Get your free copy! http://sdm.link/telerik___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] restricting ratio literals
Imho, choose based on what makes the implementation better. If the parser can be written in a simpler (and probably faster) way by dropping support for ratios in uncommon bases, then let's do it. Tbh, I don't think any ratios other than those on the format int1/int2 needs to be supported. 2016-10-24 19:23 GMT+02:00 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 > > -- > 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 > -- mvh/best regards Björn Lindqvist -- The Command Line: Reinvented for Modern Developers Did the resurgence of CLI tooling catch you by surprise? Reconnect with the command line and become more productive. Learn the new .NET and ASP.NET CLI. Get your free copy! http://sdm.link/telerik ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] restricting ratio literals
I would say no prefix at all for ratios, only base 10. Also do people in the US consider 1+13/2 a number? Or is it really only written as 7+1/2? I think the number literals should only express what people consider as numbers. They should not replace arbitrary mathematical operations (like your 60/2.5 example) which are folded by the compiler anyway. What do you think? Le 25 oct. 2016 02:22, "John Benediktsson"a écrit : 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 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 > > > -- > 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 > > -- The Command Line: Reinvented for Modern Developers Did the resurgence of CLI tooling catch you by surprise? Reconnect with the command line and become more productive. Learn the new .NET and ASP.NET CLI. Get your free copy! http://sdm.link/telerik ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- The Command Line: Reinvented for Modern Developers Did the resurgence of CLI tooling catch you by surprise? Reconnect with the command line and become more productive. Learn the new .NET and ASP.NET CLI. Get your free copy! http://sdm.link/telerik___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] restricting ratio literals
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 Harperwrote: > 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 > > > -- > 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 > > -- The Command Line: Reinvented for Modern Developers Did the resurgence of CLI tooling catch you by surprise? Reconnect with the command line and become more productive. Learn the new .NET and ASP.NET CLI. Get your free copy! http://sdm.link/telerik___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk