Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typing a string literal in the console on Kubuntu 24.04 raises a syntax error #3456

Open
ncg777 opened this issue Dec 1, 2024 · 15 comments
Open

Comments

@ncg777
Copy link

ncg777 commented Dec 1, 2024

The title says it all. I've downgraded back to version 7.7b on Windows. I'm stuck with version 8 on linux though. So much crucial software is failing these days!!!

@nosuchtim
Copy link
Owner

I just recompiled the latest github main branch of keykit (i.e. version 8.2) on Windows 11 with the makewindows.bat script (i.e. visual studio 2019), and I can't reproduce any failure with typeof. Ditto with the existing pre-compiled binaries in dist/key82_win.zip file. In the gui version (key.exe) I can type:

print typeof("some string")
and it prints

string

Using the non-gui version (lowkey.exe), I can type:

lowkey -c "print(typeof(\"some string\"))"
and it produces the same output.

Please add more details to this issue to help reproduce the issue.

@ncg777
Copy link
Author

ncg777 commented Dec 2, 2024

It happens on my Kubuntu 24.04 setup. I indeed haven't observed this on Windows.

Here is a screenshot as proof:
image

@ncg777
Copy link
Author

ncg777 commented Dec 2, 2024

Wait a minute... I get a syntax error every time I try to write a string literal...
image

@nosuchtim
Copy link
Owner

nosuchtim commented Dec 2, 2024 via email

@ncg777
Copy link
Author

ncg777 commented Dec 2, 2024

I just thought typeof was failing. 🤷

Why do strings raise syntax errors?

@ncg777 ncg777 changed the title typeof("some string") always generate a "syntax error" error message in current version Typing a string literal in the console on Kubuntu 24.04 raise a syntax error Dec 4, 2024
@ncg777 ncg777 changed the title Typing a string literal in the console on Kubuntu 24.04 raise a syntax error Typing a string literal in the console on Kubuntu 24.04 raises a syntax error Dec 4, 2024
@ncg777
Copy link
Author

ncg777 commented Dec 6, 2024

I'm using the US international keyboard layout with dead keys. I don't know; it might be related...

@nosuchtim
Copy link
Owner

On Ubuntu 20.04.6 LTS (GNU/Linux 5.4.0-155-generic x86_64), I compile and execute lowkey and:
lowkey -c 'print(typeof("hi"))'
produces
hi
I don't have access to a linux machine with graphics, so can't test it in the GUI at the moment. I'm not sure what "dead keys" means. Can you try it with a different keyboard and/or keyboard layout?

@ncg777
Copy link
Author

ncg777 commented Dec 13, 2024

I just tried another layout and still have the problem, so it is unrelated to the layout apparently.
I think "dead keys" means that some characters, such as accented characters, requires the user to press many keys in order to produce them.

For example, to make an é, I press ' then e. With that layout, I can put accents on any character! Isn't that fun? But now I know it has nothing to do with the issue I am experiencing...

You don't have access to a linux machine with graphics? Really? Why not?

I'll try to look into this; I rarely ever coded in C or C++ but I may be able to solve this.

@ncg777
Copy link
Author

ncg777 commented Dec 13, 2024

Can lowkey be used as an interactive shell? That would be super useful if it not already the case. I never really used the graphical tools in keykit and a CLI shell would be all I'd use.

@nosuchtim
Copy link
Owner

nosuchtim commented Dec 13, 2024 via email

@nosuchtim
Copy link
Owner

nosuchtim commented Dec 13, 2024 via email

@ncg777
Copy link
Author

ncg777 commented Dec 13, 2024

I prefer windows too, but I own a PC which does not support Windows 11+ because of the TPM requirement so I installed Kubuntu on it and now I'm kind of hooked...

@ncg777
Copy link
Author

ncg777 commented Dec 16, 2024

By the way, my little lib does not seem to work with version 82 on Windows.

I set the KEYROOT environment var to the root of KeyKit, either version 77 or 82 and run key.exe from the root of my lib.

In the case of 77, my lib is loaded correctly but with 82, it is not loaded at all and function names are unrecognized.

@nosuchtim
Copy link
Owner

nosuchtim commented Dec 16, 2024 via email

@ncg777
Copy link
Author

ncg777 commented Dec 20, 2024

Oh no! Nevermind! My lib's loading works as intended with version 82; I must have forgotten to change some ENV variable last time I tried it.

That string bug on Linux is still an issue though...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants