tau-prolog icon indicating copy to clipboard operation
tau-prolog copied to clipboard

(^)/2 incorrect overflow

Open UWN opened this issue 2 years ago • 9 comments

X is 3^3^4.
uncaught exception: error(type_error(float,3),is/2), unexpected

BTW, is there some simple way/instruction to use Tau from a Linux-shell? I am not really accustomed with all these net-technologies.

UWN avatar May 10 '22 06:05 UWN

BTW, is there some simple way/instruction to use Tau from a Linux-shell? I am not really accustomed with all these net-technologies.

I just added the REPL script that we use with Logtalk. There are things to improve, but it can do the job. Clone the repo and run the command node taupl.js (you need node.js).

jariazavalverde avatar May 11 '22 13:05 jariazavalverde

So far:

ulrich@TU-Wien:/opt/gupu/tau-prolog$ node taupl.js 
module.js:549
    throw err;
    ^

Error: Cannot find module 'readline-sync'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/opt/gupu/tau-prolog/taupl.js:1:82)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
ulrich@TU-Wien:/opt/gupu/tau-prolog$ node --version
v8.10.0

UWN avatar May 11 '22 13:05 UWN

You need to install the readline-sync package.

npm install -g readline-sync

jariazavalverde avatar May 11 '22 13:05 jariazavalverde

 2023  node taupl.js 
 2024  node --version
 2025  npm install -g readline-sync
 2026  sudo apt install npm
 2027  npm install -g readline-sync
 2028  sudo npm install -g readline-sync
 2029  node taupl.js ~
 2030  node taupl.js

Still same error

UWN avatar May 11 '22 13:05 UWN

Ok, then just run npm i on the repo.

jariazavalverde avatar May 11 '22 13:05 jariazavalverde

ulrich@TU-Wien:/opt/gupu/tau-prolog$ npm i
loadDep:readline-sync → 2 ▄ ╢████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine [email protected]: wanted: {"node":">=10"} (current: {"node":"8.1npm ERR! Linux 5.4.0-107-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "i"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! code EMISSINGARG

npm ERR! typeerror Error: Missing required argument #1
npm ERR! typeerror     at andLogAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:31:3)
npm ERR! typeerror     at fetchPackageMetadata (/usr/share/npm/lib/fetch-package-metadata.js:51:22)
npm ERR! typeerror     at resolveWithNewModule (/usr/share/npm/lib/install/deps.js:456:12)
npm ERR! typeerror     at /usr/share/npm/lib/install/deps.js:457:7
npm ERR! typeerror     at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror     at /usr/share/npm/lib/fetch-package-metadata.js:37:12
npm ERR! typeerror     at addRequestedAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:82:5)
npm ERR! typeerror     at returnAndAddMetadata (/usr/share/npm/lib/fetch-package-metadata.js:117:7)
npm ERR! typeerror     at pickVersionFromRegistryDocument (/usr/share/npm/lib/fetch-package-metadata.js:134:20)
npm ERR! typeerror     at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror This is an error with npm itself. Please report this error at:
npm ERR! typeerror     <http://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /opt/gupu/tau-prolog/npm-debug.log

UWN avatar May 11 '22 13:05 UWN

Mmm, try to install locally readline-sync with npm install readline-sync. If not, you have to update node to the latest version and run npm i again.

jariazavalverde avatar May 11 '22 13:05 jariazavalverde

Thanks anyway. Tried it on Ubuntu 18.04.5 LTS and Ubuntu 21.10.

UWN avatar May 11 '22 13:05 UWN

(on 21.10 it's now running,thx)

UWN avatar May 16 '22 15:05 UWN