User talk:Wherrera: Difference between revisions

From Rosetta Code
Content added Content deleted
mNo edit summary
Line 19: Line 19:
has wrong output for 1,000,000 for digit 9.Maybe there is an Int64 overflow 91,189,796,469,798,119 = 9.1E16 [[User:Horst.h|Horst.h]] ([[User talk:Horst.h|talk]]) 10:39, 15 November 2019 (UTC)
has wrong output for 1,000,000 for digit 9.Maybe there is an Int64 overflow 91,189,796,469,798,119 = 9.1E16 [[User:Horst.h|Horst.h]] ([[User talk:Horst.h|talk]]) 10:39, 15 November 2019 (UTC)


== There should not be an overflow with 64 bit integers and those numbers. It may be a variation in generation order between implementations.
There should not be an overflow with 64 bit integers and those numbers. It may be a variation in generation order between implementations.
-- [[User:Wherrera|Wherrera]] 19:02, 15 November 2019 (UTC)
-- [[User:Wherrera|Wherrera]] 19:02, 15 November 2019 (UTC)

Revision as of 19:03, 15 November 2019

Hi, is there really a high chance that Julia users will see the word range on a site catering to multiple languages, and think the task ight be about Julia's range type? Python, Perl, and probably many more have something with that name, you pointing that out for Julia makes it seem as if you think Julia users might not otherwise be able to understand the difference. Odd? --Paddy3118 (talk) 21:15, 15 February 2019 (UTC)

reply to above

As mentioned in the discussion of the Ranges task, there is an ambiguity in the meaning of range since in computer languages it may mean either the bounds of some type of value or an iterator type. See for example the entry in Wikipedia: https://en.wikipedia.org/wiki/Range_(computer_programming). So the comment is reflecting on that ambiguity, though I doubt anyone would be misled once they read the task description. Someone landing on the page from a Google search, without the comment I put in, might have cause for brief confusion.

Thanks for the reply Wherrera, to me, it seems that every language examples to be examined in the context of the task being solved, which in these cases removes the ambiguity. But no harm is done 😉--Paddy3118 (talk) 01:03, 16 February 2019 (UTC)

Your Julia solution for the Chemical Calculator really blows my mind. Exactly what I was hoping for, when publishing the problem here at RC. Are there other languages that gives the same RegEx feeling? --ChristerNilsson (talk) 04:01, 19 March 2019 (UTC)

You may be able to implement the method in any language that has regexes and a way to evaluate a string as a program in the context of the running program. --Wherrera 07:00, 19 March 2019 (UTC)

Yes, I found out how to do it in CoffeeScript. But Nim will be harder as it lacks run time eval. eval is available only for compile time. I think it should be possible to enter new molecules without having to recompile. So, I guess, an interpreted language is needed.

Also, regexes seem to have very different apis between languages. They seem to be as quick as handwritten parsing, though. --ChristerNilsson (talk) 01:24, 20 March 2019 (UTC)

Your example for Palindromic gapful numbers

has wrong output for 1,000,000 for digit 9.Maybe there is an Int64 overflow 91,189,796,469,798,119 = 9.1E16 Horst.h (talk) 10:39, 15 November 2019 (UTC)

There should not be an overflow with 64 bit integers and those numbers. It may be a variation in generation order between implementations. -- Wherrera 19:02, 15 November 2019 (UTC)