1. eui 4.2.0 question
- Posted by axtens_bruce 2 weeks ago
- 189 views
I asked Grok to write me an interpreter in OpenEuphoria 4.1. When I ran it I got
>\Users\bugma\euphoria\bin\eui.exe qhand.ex C:\Users\bugma\Source\Repos\Present\Scripts\QHand\qhand.ex:225 <0132>:: Syntax error - expected to see possibly 'then', not '(' if start < 1 or length < 0 or start > length(qih) then ^
atom start = to_number(tokens[2]) atom length = to_number(tokens[3]) if start < 1 or length < 0 or start > length(qih) then printf(1, "Runtime error: Invalid substring range at line %d\n", {pc}) abort(1) end if
qih is a sequence.
Grok hallucinating again? The code is on Github if interested
-Bruce
2. Re: eui 4.2.0 question
- Posted by jmduro 2 weeks ago
- 180 views
If you want to enhance a Basic interpreter written in Euphoria, you can use NetBasic as a basis for it; https://github.com/jm-duro/NetBasic.
Unfortunately, the documentation is written in French.
Jean-Marc
Forked into: NetBasic ... on Linux
3. Re: eui 4.2.0 question
- Posted by ghaberek (admin) 2 weeks ago
- 168 views
I asked Grok to write me an interpreter in OpenEuphoria 4.1. When I ran it I got
>\Users\bugma\euphoria\bin\eui.exe qhand.ex C:\Users\bugma\Source\Repos\Present\Scripts\QHand\qhand.ex:225 <0132>:: Syntax error - expected to see possibly 'then', not '(' if start < 1 or length < 0 or start > length(qih) then ^
atom start = to_number(tokens[2]) atom length = to_number(tokens[3]) if start < 1 or length < 0 or start > length(qih) then printf(1, "Runtime error: Invalid substring range at line %d\n", {pc}) abort(1) end if
qih is a sequence.
The problem here is that you have a variable named length, which is a built-in function. There are a few cases that produce vague or unrelated error messages like this. Once I get 4.2 nightly builds working I can try to suss out these kind of issues.
Grok hallucinating again? The code is on Github if interested
Grok has got to be the most ironically-named technology product of all time. Large language models cannot grok.
-Greg