1. eui 4.2.0 question

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

new topic     » topic index » view message » categorize

2. Re: eui 4.2.0 question

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

new topic     » goto parent     » topic index » view message » categorize

3. Re: eui 4.2.0 question

axtens_bruce said...

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.

axtens_bruce said...

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

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu