bug with the "hPutChar h (chr 0)"
Hello , the following programs shows the bug in the WinHugs20051031 - it doesn't write the '\0' chars to the files. this error shows only in winhugs.exe, but not in hugs.exe nor in runhugs.exe import Data.Char import System.IO main = do h <- openBinaryFile "test" WriteMode hPutChar h (chr 0) hClose h ps: btw, Neil, there is one more small suggestion about WinHugs - in the window showing the class hierarchy the scroller bar at the right is not working properly. you know, it's the same bug, that was in the WinHugs2003 with the scroller in main window -- Best regards, Bulat mailto:bulatz@HotPOP.com
Hi Bulat,
the following programs shows the bug in the WinHugs20051031 - it doesn't write the '\0' chars to the files. this error shows only in winhugs.exe, but not in hugs.exe nor in runhugs.exe Ah ha! Yes, I see what I've done there - I moved from character IO to String IO - and the string is \0 delimited - I'll fix it up tomorrow.
ps: btw, Neil, there is one more small suggestion about WinHugs - in the window showing the class hierarchy the scroller bar at the right is not working properly. you know, it's the same bug, that was in the WinHugs2003 with the scroller in main window
Indeed, the reason being that the entire Browse menu is something I never use, hence none of the code in that has been touched beyond just making sure it still works at some basic level. All the code has been moved into a file called Legacy.c and I've put a comment at the top saying I don't have a clue what its doing. I'm hoping that Hoogle http://www.haskell.org/hoogle/ will be able to do this by version 4, so I'm just waiting til then. If there is anything that is really important to people, let me know and I'll try to fix it - but I probably won't make any polish improvements to it. Thanks Neil
Hi,
the following programs shows the bug in the WinHugs20051031 - it doesn't write the '\0' chars to the files. this error shows only in winhugs.exe, but not in hugs.exe nor in runhugs.exe
Fixed, and committed to the CVS. I have recompiled WinHugs, and put it on the web - http://www-users.york.ac.uk/~ndm500/temp/winhugs.exe - just replace your existing winhugs.exe file. I have had a report that WinHugs doesn't work on Windows 98, once I've fixed that I'll create a new snapshot with this change in, since this fix is pretty important. Thanks - and I very much appreciate the test case Neil
Hello Neil, Wednesday, January 18, 2006, 11:31:38 PM, you wrote:
the following programs shows the bug in the WinHugs20051031 - it doesn't write the '\0' chars to the files. this error shows only in winhugs.exe, but not in hugs.exe nor in runhugs.exe
NM> Fixed, and committed to the CVS. I have recompiled WinHugs, and put it
NM> on the web - http://www-users.york.ac.uk/~ndm500/temp/winhugs.exe -
NM> just replace your existing winhugs.exe file.
yes, it fixed the problem.
btw, "putChar '\0'" in WinHugs still prints nothing, in contrast to
"putChar '\1'". i also reported you about problems with recalling from
history command after using "open" command from menu. these three
errors although is not critical, but serious for me
also i want to suggest saving history of commands in the registry (or
disk file) - this proved to be very useful in other shells. and about
window with list of all commands - my shell (FAR manager) saves all the
commands i use (now this list contains ~5000 ones!) and when i open
this list and start to type some word, it just filers whole list and
show only commands which contains this sequence of letters. that is
damn useful. just for example i open this window and typed "hugs" -
FAR filters out 146 commands which includes this word:
---------------------------- Commands history *[hugs](146/5144) --------------------------
t C:\Base\Compiler\Hugs\runhugs.exe +st.qkoOuI -98 nocmt.hs
Hi Bulat,
btw, "putChar '\0'" in WinHugs still prints nothing, in contrast to "putChar '\1'". Indeed it will. I can't actually display a \0 (and I doubt many people really want a \0 on their screen), so I'll flip it to a \1, or maybe a '?' ?
i also reported you about problems with recalling from history command after using "open" command from menu. I don't remember that and can't seem to find it in my list of bugs. I have started a new bug tracking page on the wiki at http://www.haskell.org/haskellwiki/WinHugs/Bugs , so please re-add that bug back on the list, and I can keep that as a record of an ongoing discussion about all bugs known in WinHugs. Hopefully this way I won't loose any information!
also i want to suggest saving history of commands in the registry (or disk file) - this proved to be very useful in other shells. and about window with list of all commands Sounds doable, and could be quite useful. There are only two issues - privacy (although i can't imagine many people care that much) and user interface. I might have a go at it in the future - I've added it to the list.
Thanks Neil
participants (2)
-
Bulat Ziganshin -
Neil Mitchell