Re: Phix, numbers, printf, log10

new topic     » goto parent     » topic index » view thread      » older message » newer message

The sad fact is that I have no Linux experience whatever, have no Linux system that I could use for testing, and even if I had, I'd never know if I did things right. So, I'm glad to hear that at least you got Hypatia running!

axtens_bruce said...

This stackoverflow posting describes ways of getting the terminal's dimensions.

I'll take another look at it, but at first glance I don't understand how to use this within a Phix program. To know the window width would be helpful, but for the input editor I'd also need to be able to control the cursor (see below).

axtens_bruce said...

I found it a little counter intuitive to have hy.ini in the same folder as phix itself. But it's there now

It's not meant to be. I can only speak for Windows, but this happens when Phix runs the source code. The compiled hy.exe uses the program folder for input and output, unless you call it with the -c option, then it uses the current folder (but doesn't create an empty hy.ini if none exists). When you use Phix to run hy.exw, then cmd[1] returns the Phix folder as the program folder, so this is where hy.ini goes (and all other files will be written or read). Should you have compiled hypatia and it still uses the Phix folder, then this is a Linux issue that needs looking into.

axtens_bruce said...

Hmmm ... no command line editing. And apparently then no history of commands. Or is it just that Hypatia hasn't been clued in to the relevant keystrokes?

Doesn't work with Linux, at least not for now. The input editor needs video_config() for the screen width, but even more important are get_position() and position() for the cursor, and since they don't work under Linux, Hypatia doesn't even try - that is, under Linux it simply calls Phix's prompt_string() instead of my own prompt_string_ed(). Someone would have to tell me how to get and how to set the cursor location under Linux in a Phix program, if it can be done.

So, sorry, currently Hypatia and Linux don't go together very well, which is a pity, but I'd need help to do anything about it. Anyway, thank you for looking into it and for your feedback!

Robert

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu