User talk:Thebigh/mysandbox: Difference between revisions

From Rosetta Code
Content added Content deleted
(Encourage FRACTRAN addition)
 
(reply, more questions than answers)
Line 2: Line 2:
Anyone may start a Category page just like they may provide solutions.
Anyone may start a Category page just like they may provide solutions.
<br />--[[User:GarveyPatrickD|GarveyPatrickD]] ([[User talk:GarveyPatrickD|talk]]) 04:26, 23 November 2021 (UTC)
<br />--[[User:GarveyPatrickD|GarveyPatrickD]] ([[User talk:GarveyPatrickD|talk]]) 04:26, 23 November 2021 (UTC)
*True. But there's a few things we'd need to work out first. The programs are just ordered lists of fractions, and there's no "official" compiler, so it's hard to settle on a consistent way of representing programs. For example, consider the program {105/2, 11/9, 1/3} called with the input 512. All this does is copy the exponent 9 into two other registers, and 4 into a third.

But what's the "correct" representation of this program, its input and output? I've seen all of the following during my frenzied googling:

* <lang>{105/2, 11/9, 1/3}</lang>
* <lang>(105, 11, 1)(2, 9, 3)</lang>
* <lang>(105, 2), (11,9), (1, 3)</lang>

and probably others, with and without numerators and denominators factored. And should the final state be reported as 1,153,939,765,794,921,875 or as 5^9 x 7^9 x 11^4? How to report "output" of nonterminating programs like Conway's prime game? What do you think?

After that we'd probably need to move the [[Fractran]] task to [[Execute Fractran]] to make room for a redirect to the new category.

I think I'd probably want to collect ten or twelve actual programs before it's ready to go live. [[User:Thebigh|Thebigh]] ([[User talk:Thebigh|talk]]) 10:14, 23 November 2021 (UTC)

Revision as of 10:14, 23 November 2021

FRACTRAN

Anyone may start a Category page just like they may provide solutions.
--GarveyPatrickD (talk) 04:26, 23 November 2021 (UTC)

  • True. But there's a few things we'd need to work out first. The programs are just ordered lists of fractions, and there's no "official" compiler, so it's hard to settle on a consistent way of representing programs. For example, consider the program {105/2, 11/9, 1/3} called with the input 512. All this does is copy the exponent 9 into two other registers, and 4 into a third.

But what's the "correct" representation of this program, its input and output? I've seen all of the following during my frenzied googling:

  • <lang>{105/2, 11/9, 1/3}</lang>
  • <lang>(105, 11, 1)(2, 9, 3)</lang>
  • <lang>(105, 2), (11,9), (1, 3)</lang>

and probably others, with and without numerators and denominators factored. And should the final state be reported as 1,153,939,765,794,921,875 or as 5^9 x 7^9 x 11^4? How to report "output" of nonterminating programs like Conway's prime game? What do you think?

After that we'd probably need to move the Fractran task to Execute Fractran to make room for a redirect to the new category.

I think I'd probably want to collect ten or twelve actual programs before it's ready to go live. Thebigh (talk) 10:14, 23 November 2021 (UTC)