Talk:Deadfish

From Esolang
Jump to navigation Jump to search

Hello, Deadfish~

Hi fellow users. I have just created Deadfish~, a super-set version of Deadfish. It is unimplemented as of yet. --(this comment by Jonskinner at 18:59, June 6, 2007 UTC; please sign your comments with ~~~~)

Thanks

Just want to give a big thanks to all contributers and to all those who have worked on Deadfish in any way possible. I didn't think Deadfish would make it even this far! Great job! I must move on now to bigger projects though... Use the esolang wiki as your up-to-date resource on Deadfish since it's doing a better job then my archive and plus it's better this way! :-) - JTS




Hi, can someone implement Deadfish in another programming language such as Perl or Python. Then could you post it up on this wiki along with the C source or mail it to me(jonathanskinner@linuxmail.org) to post it on my website.

Update: I've just created a Python implementation and it is now posted! - JTS

- JTS

I've written an interpreter, designed to do the same as the C interpreter, in Befunge-93 (which is 'another programming language', but maybe not the one you were expecting). Does that do what you want? ais523 12:42, 26 Feb 2007 (UTC)
Thanks, it's even better it was written in an esoteric programming language. Good job! :-) -JTS
I just fixed up EgoBot to run it on irc://irc.freenode.org/esoteric as well, due to the requirement for 'highly interactive programs'; you can't get much more interactive than IRC in such cases. ais523 13:59, 26 Feb 2007 (UTC)
That sounds awesome. Happy hacking. -JTS

Incompatibilities

The Python interpreter seems not to be compatible with the C one. Its boundary checks are different in the d, i and s cases. Slightly more sane really, but I don't think Deadfish was meant to be sane... --Ørjan 17:47, 2 May 2007 (UTC)

Just edited that I think that should fix that problem :-) - JTS

The Ruby interpreter doesn't seem to implement the special case for 256. Which, by the way, would be nice to have noted in English somewhere. I would also certainly be interested in the motivation behind it -- it feels like it could have been added to remain compatibility with some implementation that stored the number in a single byte only... but then, it would be mod 256, not just if-equal-to 256, surely? --Chris Pressey 05:09, 17 November 2010 (UTC)

In actual fact, the reason for it is that the language is not very...umm...refined. Specifically I don't think the designer realised that in the original interpreter it was possible to go above 256 with that check. —ehird 15:21, 17 November 2010 (UTC)
Fixed now -- I couldn't resist. --Chris Pressey 01:06, 1 December 2010 (UTC)

The Java version does not seem to be consistent with the C version (in particular, the program iissso would give 256 as output in the Java version). —A visitor, 25 February 2013

Credit for the Python interpreter

The Python interpreter seems to contain contradictory licence information. Something licenced under public domain can't put any conditions on the code at all, not even attributing the author. Your options are either changing the attribution requirement to be optional but encouraged (e.g. "I'd appreciate it if you mentioned the author in copies, but this is not requied", or removing the source code from this wiki and instead linking to a copy on an external site. --ais523 17:53, 2 May 2007 (UTC)

Fixed! - JTS

XKCD Variation

I implemented the XKCD variation in dc. There is a real reason other than just that nobody else has done so. --Zzo38 23:02, 6 May 2011 (UTC)

The idso version can be implemented IF you're allowed to say that the 's' must be followed by something (not newline). The code is 11?IO11iAi10oz+2*+ and it gives different values on the TOS for each command; it's a pity about the 's' command. Rdebath (talk) 15:47, 10 November 2013 (UTC)
Yes, and that is the actual reason I did not implement the normal version; it is because I didn't want to say that the 's' must be followed by something (not newline). --Zzo38 (talk) 21:05, 10 November 2013 (UTC)

JDK 1.0 implementation

Dug up a few corpses, found MS Java 1.1, which implements JDK 1.0. I feel like laughing, but BufferedReader is 1.1. Anyone have some older stuff? Java is not my speciality. --(this comment by 192.30.35.246 at 17:20, 3 March 2013‎ UTC; please sign your comments with ~~~~)

Does it at least have InputStream? The Reader family of classes implements things like understanding encodings other than ASCII and Latin-1, and BufferedReader implements reading multiple characters at once. You don't need either of those features to implement Deadfish, so you can probably use the methods from InputStream directly. --ais523 22:28, 3 March 2013 (UTC)

Arithmetic questions (storage, overflow)

Are the numbers stored as bytes, 16-bit, 32-bit or 64-bit? Are they signed or unsigned? Do they overflow or give an Error? --(this comment by Hq9++fan at 18:45, 24 March 2018‎ UTC; please sign your comments with ~~~~)

Deadfish is normally taken to use unbounded integers because that's what the first implementation did. (The fact that -1 becomes 0 and 256 becomes 0 seems to be a special property of those two numbers; numbers greater than 256 can be created by squaring numbers in the 17 to 255 range.) It wouldn't surprise me if implementations other than the original put a limit of 32 bits or so, but that can't be viewed as being part of the language. (On the other hand, 8-bit numbers should be disallowed because being able to go beyond 256 definitely is part of the language by this point.) --ais523 22:41, 24 March 2018 (UTC)
Update: apparently the first implementation was the C one, which wraps at the limit of an int (typically 2³² on modern systems). (I was assuming it was the Python, but that came second.) I guess the correct answer is therefore "don't worry about overflow as long as the limit is fairly large". --ais523 22:49, 24 March 2018 (UTC)
Oops, sorry for the extra space; that was a mistake. Hq9++fan (talk) 06:50, 27 March 2018 (UTC)
Different implementations seem to do it differently. Some have a limit of sixteen bits, at least one (METAFONT) only twelve bits, some thirty-two bits or more, some have no limit. At least one works in decimal. And in some cases, such as C and OASYS, the limit can depend on the target computer. Overflow is also different in different cases, whether it is an error or if it wraps or does something else (some programming languages may work internally with floating numbers, and so it works like that instead). Deadfish should be implemented with more than eight bits. --Zzo38 (talk) 05:39, 25 March 2018 (UTC)

Is there a Deadfish variant that uses bytes for its numbers, and operations overflow? (for example, 0-1=255, 255+1=0, 16²=0, 17²=33, 18²=68, etc.) Hq9++fan (talk) 17:09, 26 March 2018 (UTC)

If Deadfish had been that way, no one would have cared about it – it's the quirks that make it funny. --Ørjan (talk) 02:17, 27 March 2018 (UTC)
Don't try to be funny by misinterpreting a yes/no question. Hq9++fan (talk) 05:25, 27 March 2018 (UTC)

Move implementations?

I think we should move the implementations to a separate article, preferably a sub-page; it draws attention away from the language itself. --This was made by Not Applicable (talk) 20:10, 25 March 2021 (UTC)

INTERCAL and TECO

There are no implementations of Deadfish in INTERCAL or TECO listed in here yet. If you know how to write it and have time, then maybe you will do so. (Some other programming languages that some people might want to write it in include ZILF, Inform7, Malbolge, Apollo Guidance Computer, BANCStar, VAX, VAX microcode, Gravity, Inferno, etc.) --Zzo38 (talk) 23:26, 25 March 2021 (UTC)