Go to advanced search

by Heater
Sun Jun 16, 2019 10:27 pm
Forum: Other programming languages
Topic: ScriptBasic
Replies: 1073
Views: 26066

Re: ScriptBasic

Airr, Welcome to the forum. Great job on the ScriptBasic GMP extesion. What is that fibo algorithm you wrote? Is that the matrix formulation? The mkdist.sh file will copy over the sb.sh file, IF you have the latest version from the repo. My post on allbasic concludes by saying do a "git pull" to get...
by Heater
Sun Jun 16, 2019 8:22 pm
Forum: Other programming languages
Topic: ScriptBasic
Replies: 1073
Views: 26066

Re: ScriptBasic

That is AIR's script I guess. It does not look anything like the fibo we were discussing.
by Heater
Sun Jun 16, 2019 7:46 pm
Forum: Other programming languages
Topic: ScriptBasic
Replies: 1073
Views: 26066

Re: ScriptBasic

ScriptBasic, I already did the mkdist thing ages ago. That is why I have everything installed into an "sb" directory, not the download/build directory. BUT, that sb command is actually sb.sh and it does not get installed to the installed target directory as it should. What you have to do is: 1) Copy...
by Heater
Sun Jun 16, 2019 7:33 pm
Forum: Other programming languages
Topic: ScriptBasic
Replies: 1073
Views: 26066

Re: ScriptBasic

Nope:

Code: Select all

$ pwd
/mnt/c/Users/heater/Documents/fibo_4784969/BASIC/scriptbasic
$ ls
fibo.sb  sb  sb-dev-cleanup  sb-dev-cleanup.zip
$ cd sb-dev-cleanup
$ source sb.sh
$ cd ..
$ scriba fibo.sb
fibo.sb(1): error &H3e:Include file is not found
$
by Heater
Sun Jun 16, 2019 7:19 pm
Forum: Other programming languages
Topic: ScriptBasic
Replies: 1073
Views: 26066

Re: ScriptBasic

Code: Select all

$ sb fibo.sb
-bash: sb: command not found
$ find -name "sb"
./sb
There is no sb command here.

I do have a "./sb-dev-cleanup/sb.sh" but:

Code: Select all

$ ./sb-dev-cleanup/sb.sh fibo.sb
fibo.sb(1): error &H3e:Include file is not found
by Heater
Sun Jun 16, 2019 7:10 pm
Forum: Other programming languages
Topic: ScriptBasic
Replies: 1073
Views: 26066

Re: ScriptBasic

Already done that. I know where gmp things are.

Now, what is that conf file called, what do I put in it, and where do I put it???
by Heater
Sun Jun 16, 2019 6:58 pm
Forum: Other programming languages
Topic: ScriptBasic
Replies: 1073
Views: 26066

Re: ScriptBasic

ScriptBasic, OK. Now I can so this: $ pwd /mnt/c/Users/michael/Documents/fibo_4784969/BASIC/scriptbasic $ ls fibo.sb sb sb-dev-cleanup sb-dev-cleanup.zip $ ls sb bin include lib module $ scriba -D dll ".so" module "/mnt/c/Users/heater/Documents/fibo_4784969/BASIC/scriptbasic/sb-dev-cleanup/module/" ...
by Heater
Sun Jun 16, 2019 6:20 pm
Forum: Other programming languages
Topic: ScriptBasic
Replies: 1073
Views: 26066

Re: ScriptBasic

ScriptBasic, You want to do a .deb install if you have any plans creating additional extension modules. I have no such plans. Even if I did I see no reason why a .deb would be required. Those install instructions work for ANY Linux platform not just the RPi. No they don't. They start with a link to ...
by Heater
Sun Jun 16, 2019 6:03 pm
Forum: Off topic discussion
Topic: how heavy is raspbian ?
Replies: 19
Views: 461

Re: how heavy is raspbian ?

Whilst electrons have mass and our Raspbian is stored as a pattern of charges on the gates of transistors in the FLASH memory of SD cards, we cannot weigh the operating system. Given that the Pi and it's SD card will be electrically neutral no matter if the SD is programmed on blank, it will always ...
by Heater
Sun Jun 16, 2019 5:43 pm
Forum: Other programming languages
Topic: ScriptBasic
Replies: 1073
Views: 26066

Re: ScriptBasic

ScriptBasic, If you would have started HERE in the first place you would be running ScriptBasic long ago. Not here on my Intel PC I would not. I don't have a Pi to hand to try this on. The first post in this thread points to that page. That's great and all but why would I start reading this thread f...
by Heater
Sun Jun 16, 2019 5:09 pm
Forum: Other programming languages
Topic: ScriptBasic
Replies: 1073
Views: 26066

Re: ScriptBasic

ScriptBasic, I don't need root permissions to run mkdeb.sh. $ ./mkdeb.sh dpkg-deb: error: control directory has bad permissions 777 (must be >=0755 and <=0775) mv: cannot stat '/tmp/tmp.fUwg5elf6Z/scriptbasic-2.1-linux-amd64.deb': No such file or directory I have no idea where "control directory" is...
by Heater
Sun Jun 16, 2019 4:10 pm
Forum: Other programming languages
Topic: ScriptBasic
Replies: 1073
Views: 26066

Re: ScriptBasic

ScriptBasic Did everything build with. /setup? Yes, as far as I can tell: $ ./setup This is unix cwd=/mnt/c/Users/michael/Documents/fibo_4784969/BASIC/scriptbasic/sb-dev-cleanup/sb-dev-cleanup/ creating configure.jim creating subdirectories for compilation output files compiling Makefile using the J...
by Heater
Sun Jun 16, 2019 2:26 pm
Forum: Other programming languages
Topic: ScriptBasic
Replies: 1073
Views: 26066

Re: ScriptBasic

hippy, Thanks. Somehow I knew this was going to be a world of pain: $ ./setup --module=gmp2 This is unix cwd=/mnt/c/Users/heater/Documents/fibo_4784969/BASIC/scriptbasic/sb-dev-cleanup/sb-dev-cleanup/ executing headerer for the C files extracting header from interface.c creating the module object di...
by Heater
Sun Jun 16, 2019 9:38 am
Forum: Other programming languages
Topic: ScriptBasic
Replies: 1073
Views: 26066

Re: ScriptBasic

ScriptBasic, Can you tell me (again) how to install ScriptBasic? Here is what I have done so far: 1) Grabbed the "clean up" branch of sb-dev from here: https://sandbox.allbasic.info:8181/scriptbasic/sb-dev which I notice has a new GMP2 directory in the extensions directory. 2) Unpacked it and change...
by Heater
Sun Jun 16, 2019 9:06 am
Forum: General programming discussion
Topic: A Final Fibonacci Challenge
Replies: 521
Views: 13650

Re: A Final Fibonacci Challenge

Edit: Content deleted.

Moved to the ScriptBasic thread so as to avoid clutter here.
by Heater
Sat Jun 15, 2019 10:54 pm
Forum: General programming discussion
Topic: A Final Fibonacci Challenge
Replies: 521
Views: 13650

Re: A Final Fibonacci Challenge

If you mean simple recursion as in the solutions that contain something like:

return fibo(n-2) + fibo(n-1)

that soon gets millions of times slower than the schoolboy iterative addition solutions as n gets bigger. That "tree" of recursions grows out of hand.
by Heater
Sat Jun 15, 2019 10:42 pm
Forum: General programming discussion
Topic: A Final Fibonacci Challenge
Replies: 521
Views: 13650

Re: A Final Fibonacci Challenge

ScriptBasic, What other popular languages use GMP for BIGINT support? I have no idea. It would not surprise me if some did. Point is, it does not matter how they get their big integer types done. If big integer types are as much part of the language as int or char in C then it's an implementation de...
by Heater
Sat Jun 15, 2019 10:27 pm
Forum: General programming discussion
Topic: A Final Fibonacci Challenge
Replies: 521
Views: 13650

Re: A Final Fibonacci Challenge

Yes of course. I have said that more than once here recently. Originally I was reluctant because the big integer extension to ScriptBasic did not exist when the challenge was started. Indeed it has been created as a response to the challenge. As such it is a solution mostly not written in BASIC but ...
by Heater
Sat Jun 15, 2019 10:03 pm
Forum: General programming discussion
Topic: A Final Fibonacci Challenge
Replies: 521
Views: 13650

Re: A Final Fibonacci Challenge

ScriptBasic, Are you saying that the ScriptBasic GMP extension module assisted submission fails to meet the criteria of the challenge? We have had this discussion before. I posed the million digit Fibonacci number challenge to DavidS early in his thread "Why Avoid BASIC". David suggested the rule th...
by Heater
Sat Jun 15, 2019 9:12 pm
Forum: General programming discussion
Topic: A Final Fibonacci Challenge
Replies: 521
Views: 13650

Re: A Final Fibonacci Challenge

gkreidl,
Why don't you mention the possible use of GMT BIGINTs in Python...
Only because I don't have that version in my fibo(4784969) repository. It does not meet this criteria of the Fibonacci Challenge by virtue of using the GMP library.
by Heater
Sat Jun 15, 2019 8:56 pm
Forum: General programming discussion
Topic: A Final Fibonacci Challenge
Replies: 521
Views: 13650

Re: A Final Fibonacci Challenge

ejolson, All this talk of real world rabbits made me think that the schoolboy fibo algorithm is too abstract and theoretical. All that addition and stuff. No, what we need, in the spirit of modern scientific method of Physics and Cosmology, is a simulation. So I wrote a Finonacci rabbit simulator. R...
by Heater
Sat Jun 15, 2019 8:40 pm
Forum: General programming discussion
Topic: A Final Fibonacci Challenge
Replies: 521
Views: 13650

Re: A Final Fibonacci Challenge

To compare the speed of doing maths with big integers in Python and C we can look at the results of running ejolson's fibogmp.c and my fibo.py. Neither of these cheat by using any ready made fibo function, they just do regular maths operations on big ints. fibogmp.c $ time ./fibogmp | tail -c 100 GM...
by Heater
Sat Jun 15, 2019 6:25 pm
Forum: General programming discussion
Topic: A Final Fibonacci Challenge
Replies: 521
Views: 13650

Re: A Final Fibonacci Challenge

ejolson, While real-world experience may suggest otherwise, mathematically, if your breeding experiment starts with zero pairs of rabbits, then no baby rabbits will ever be produced. But, but, the resolution of that apparent paradox is in the very description of the rabbit breading experiment you qu...
by Heater
Sat Jun 15, 2019 3:58 pm
Forum: General programming discussion
Topic: A Final Fibonacci Challenge
Replies: 521
Views: 13650

Re: A Final Fibonacci Challenge

One could. Except one generally finds the Fibonacci sequence defined such that each number is the sum of the two preceding ones, starting from 0 and 1. For example: https://oeis.org/search?q=fibonacci&language=english&go=Search All that talk of negative fibo and non-integer fibo is stuff and nonsens...
by Heater
Sat Jun 15, 2019 12:16 pm
Forum: General programming discussion
Topic: A Final Fibonacci Challenge
Replies: 521
Views: 13650

Re: A Final Fibonacci Challenge

Looks like everything works.

Except fibo(0) will come out as 1 instead of 0 with the last code ScripBasic posted.

Go to advanced search