Search found 54 matches

by amigo
Sat May 13, 2023 3:17 pm
Forum: Programming
Topic: Chroot: Is there a way to allow access to one external folder?
Replies: 5
Views: 510

Re: Chroot: Is there a way to allow access to one external folder?

'mount --bind' is probably what you want. Any chroot script is 'bound' to be using it mount /proc, /sys and /dev, etc. What it does is make a single directory or mount point visible in more than one place in the filesystem.

by amigo
Sat Apr 15, 2023 2:11 pm
Forum: Programming
Topic: firmware & driver cutter - removing unwanted firmware and drivers
Replies: 6
Views: 633

Re: firmware & driver cutter

Thanks for the Honorable Mention -I just stumbled over this. I'm less capable these days than in 2010, but I'll try to be helpful. As I recall, the zdrv was just kernel modules, at least that was what my code addressed. Third party firmware was and is a separate matter, and neither has anything to d...
by amigo
Mon Jan 17, 2022 6:22 pm
Forum: Engineering/Science/Simulation
Topic: AI - Puppy Style
Replies: 4
Views: 1448

Re: AI - Puppy Style

Now, let's make it interesting for all Puppy users, even without bc or awk. In fact, you can do all that fancy math from within your initrd -anywhere you have a shell. I've attached a very small archive with all the needed files. It contains: neuralnetweights.ssv and predict.ash, as above. And it co...
by amigo
Mon Jan 17, 2022 5:02 pm
Forum: Engineering/Science/Simulation
Topic: AI - Puppy Style
Replies: 4
Views: 1448

Re: AI - Puppy Style

Thanks for asking. The first line shows the beginning values of the weights 0.8 0.4 .... and at the end the beginning certainty of the guess -of course zero at the start. Then the calculations begin. Each line shows then shows the updated weights and at the end the certainty of the guess. Note that ...
by amigo
Mon Jan 17, 2022 1:14 pm
Forum: Engineering/Science/Simulation
Topic: AI - Puppy Style
Replies: 4
Views: 1448

AI - Puppy Style

Some time ago, I wanted to learn more about neural-network principles by reading others' code. Most ai programming is done in python, C or C++, etc., none of which I 'speak' fluently. But I enjoy shell-scripting, so immediately I wondered if anyone had demonstrated a real learning AI in shell. It to...
by amigo
Wed Jan 05, 2022 10:56 am
Forum: Programming
Topic: IQ4sh - Calculator for CLI or scripts -Testers wanted
Replies: 85
Views: 5376

Re: IQ4sh - Calculator for CLI or scripts -Testers wanted

So, I've had my name is the linux ChangeLog twice. Do you suppose that happened by writing to the LKML with questions that show I don't understand how it works, with suggestions for changes -but no patches to show what I mean? Or by criticizing their unique coding-style rules? No one will even look ...
by amigo
Tue Jan 04, 2022 1:47 pm
Forum: Programming
Topic: IQ4sh - Calculator for CLI or scripts -Testers wanted
Replies: 85
Views: 5376

Re: IQ4sh - Calculator for CLI or scripts -Testers wanted

I'm not saying their is no faster way to do anything. I know very well that there are several places to could be optimized. But, first everything has to work correctly -and with numbers longer than 19-digits. mul consists of triple-nested while loops -which are difficult to get right, at best. Are y...
by amigo
Sat Jan 01, 2022 6:42 pm
Forum: Programming
Topic: IQ4sh - Calculator for CLI or scripts -Testers wanted
Replies: 85
Views: 5376

Re: IQ4sh - Calculator for CLI or scripts -Testers wanted

Sorry about the fpow mixup -I had coded til nearly midnight last nite and just quickly looked here. Yeah, computationally difficult, like working out the honest computation of the 1000th root of -anything. Anyone can understand that longer strings of digits could, at least, take longer than short nu...
by amigo
Fri Dec 31, 2021 10:44 pm
Forum: Programming
Topic: IQ4sh - Calculator for CLI or scripts -Testers wanted
Replies: 85
Views: 5376

Re: IQ4sh - Calculator for CLI or scripts -Testers wanted

Great, multiply 2 200+ digit numbers. I really don't mind the time -the correctness is more important. If time can be improved -even better. Meanwhile I'm writing an exhaustive all-in-one sanity check which fits in the execution block. This will lessen the need for in-function sanity checks. You men...
by amigo
Fri Dec 31, 2021 4:07 pm
Forum: Programming
Topic: IQ4sh - Calculator for CLI or scripts -Testers wanted
Replies: 85
Views: 5376

Re: IQ4sh - Calculator for CLI or scripts -Testers wanted

Just one more bit - in math everything boils down to increment/decrement -everything reduces to addition. For any iq function, if the numbers are really long, it will be done ~entirely by +/+ (even mul chunking uses add for every column). pow is superfluous for integer exponents, but as soon as you ...
by amigo
Fri Dec 31, 2021 2:24 pm
Forum: Programming
Topic: IQ4sh - Calculator for CLI or scripts -Testers wanted
Replies: 85
Views: 5376

Re: IQ4sh - Calculator for CLI or scripts -Testers wanted

@MM, thanks very much for everything. Yes pow4 is still to come -it uses an a^x = e^(various possible ways). The original pow does a real calculation of the answer to a^x, but by using any variation exp (e^?) we can use an approximation. We've had an exp for awhile -a Taylor and a MacLaurin series w...
by amigo
Thu Dec 30, 2021 9:01 pm
Forum: Programming
Topic: IQ4sh - Calculator for CLI or scripts -Testers wanted
Replies: 85
Views: 5376

Re: IQ4sh - Calculator for CLI or scripts -Testers wanted

Sorry, had to fix a regression after applying a (wrong)fix suggested by shellcheck. I'm hoping for a new year without regressions...
If you pullled after last post, pull again.

by amigo
Thu Dec 30, 2021 2:14 pm
Forum: Programming
Topic: IQ4sh - Calculator for CLI or scripts -Testers wanted
Replies: 85
Views: 5376

Re: IQ4sh - Calculator for CLI or scripts -Testers wanted

Guys, I've just pushed changes from the last 3-4 days, so update your copy. About rounding, I used to do that, as well as fancy output padding (think dollar format), but it gets too complex and slow. Questions about the correct way to round, in X situation, etc., make it all too much for my needs. I...
by amigo
Thu Dec 30, 2021 9:24 am
Forum: Programming
Topic: IQ4sh - Calculator for CLI or scripts -Testers wanted
Replies: 85
Views: 5376

Re: IQ4sh - Calculator for CLI or scripts -Testers wanted

Thanks 6502 and misko. I wasn't really aware of: $(( n=20, n=n+30 )). I have seen $(( n>=20 ? var1 : var2 )), before and it works under all my target shells: bash, zsh, posh, dash and ksh. $(( n=20, n=n+30 )) works under all except dash, which means we can't use it. About the github projects, bcalc ...
by amigo
Wed Dec 29, 2021 6:11 pm
Forum: Programming
Topic: IQ4sh - Calculator for CLI or scripts -Testers wanted
Replies: 85
Views: 5376

Re: IQ4sh - Calculator for CLI or scripts -Testers wanted

6502coder Since shell math is integer-only, the techniques are kind of like bignum. We reduce as much as possible to text-processing , which is also bignum-ish. I didn't really intend to make an arbitrary-scale calculator, But I certainly wanted to be able to work with numbers long enough to calcul...
by amigo
Tue Dec 28, 2021 4:44 pm
Forum: Programming
Topic: IQ4sh - Calculator for CLI or scripts -Testers wanted
Replies: 85
Views: 5376

Re: IQ4sh - Calculator for CLI or scripts -Testers wanted

More concerning than this: time ./iq+_1.69.sh mul 127357181233333333333332678 .1 0.0000000001 0 0.0 real 0m0.024s time echo "( 127357181233333333333332678 * .1 * 0.0000000001 * 0 )" |bc 0 real 0m0.004s is this: time ./iq+_1.69.sh mul 127357181233333333333332678 .1 0.0000000001 127357181233...
by amigo
Mon Dec 27, 2021 1:42 pm
Forum: Programming
Topic: IQ4sh - Calculator for CLI or scripts -Testers wanted
Replies: 85
Views: 5376

Re: IQ4sh - Calculator for CLI or scripts -Testers wanted

All fixed now, with other minor things I found. About the single-dot with mul - '.' is used as a multiplication operator in some circles/countries, so for mul it is considered a valid operator. Perhaps I will change that so that it is more consistent with elsewhere. bc handles that the same way as w...
by amigo
Sun Dec 26, 2021 7:26 pm
Forum: Programming
Topic: IQ4sh - Calculator for CLI or scripts -Testers wanted
Replies: 85
Views: 5376

Re: IQ4sh - Calculator for CLI or scripts -Testers wanted

Okay, I just pushed the fix, in iq, for mul and another fix for div -we are approaching the last that matter. There are also changes in iq+. I found a really great Pade approximation(thanks Zeda Thomas), which is small, fast and super accurate. It completely replaces the former implementation. misko...
by amigo
Sat Dec 25, 2021 11:30 am
Forum: Programming
Topic: IQ4sh - Calculator for CLI or scripts -Testers wanted
Replies: 85
Views: 5376

Re: IQ4sh - Calculator for CLI or scripts -Testers wanted

Total digits in output can't exceed 19: echo $((999999999999999999 * 99)) misko_2083 That bashbc is quite a find -but it is certainly full of bashisms. Maybe it works under zsh/ksh -I'll be looking at it for goodies, for sure. I don't immediately see how it works - a quick test shows it is slow, and...
by amigo
Fri Dec 24, 2021 5:10 pm
Forum: Programming
Topic: IQ4sh - Calculator for CLI or scripts -Testers wanted
Replies: 85
Views: 5376

Re: IQ4sh - Calculator for CLI or scripts -Testers wanted

welcome @misko_2083 I looked into using vedic techniques, and learned some stuff that has helped. I've looked into anything which might be faster, mental-techniques, CORDIC routines, anything with 'fast code' in it. My basic exponentiation routine was ported from ruby, other stuff from python, C -an...
by amigo
Fri Dec 24, 2021 9:27 am
Forum: Programming
Topic: IQ4sh - Calculator for CLI or scripts -Testers wanted
Replies: 85
Views: 5376

Re: IQ4sh - Calculator for CLI or scripts -Testers wanted

Looks like I'm missing a check for x*0 or 0*x. Since you're running with bash, your times are always gonna be long. If you're going to have a go at writing your own, I probably won't hear much from you for a while... I actually started with division, but quickly realized that working with numbers ov...
by amigo
Thu Dec 23, 2021 9:34 pm
Forum: Programming
Topic: IQ4sh - Calculator for CLI or scripts -Testers wanted
Replies: 85
Views: 5376

Re: IQ4sh - Calculator for CLI or scripts -Testers wanted

Yeah, thanks. I applied those fixes to iq+. I also found and fixed an obscure problem in div and applied a speedup, both in the routine for short numbers. So, I've pushed those changes which were already done yesterday. I spent today on a new exp function, which delivers precision up to ~69 places i...
by amigo
Wed Dec 22, 2021 2:28 pm
Forum: Programming
Topic: IQ4sh - Calculator for CLI or scripts -Testers wanted
Replies: 85
Views: 5376

Re: IQ4sh - Calculator for CLI or scripts -Testers wanted

Strange, I can't duplicate that error here: ./iq+ pow -s5 3.14 ^ -4.12 0.00896 How are you getting access to pow through iq, since it is now in iq+? Are you sourcing iq+ into iq? Have you sourced iq/iq+ into your shell session? If you call iq+ directly it should source in iq itself. I usually run th...
by amigo
Tue Dec 21, 2021 1:53 pm
Forum: Programming
Topic: IQ4sh - Calculator for CLI or scripts -Testers wanted
Replies: 85
Views: 5376

Re: IQ4sh - Calculator for CLI or scripts -Testers wanted

I appreciate your engagement. All those errors come under a single class of input, some of which I did handle in iq-1.62. But not all those cases. The thorough checks needed to cull out nonsense inputs, slow down every function immensely. I think such checks belong in a more user-oriented, interacti...
by amigo
Sun Dec 19, 2021 3:39 pm
Forum: Programming
Topic: IQ4sh - Calculator for CLI or scripts -Testers wanted
Replies: 85
Views: 5376

Re: IQ4sh - Calculator for CLI or scripts -Testers wanted

Best wishes to the daisies, but not at my expense just yet. Guys, I just pushed the new versions of iq and iq+ to github. I also added files with the AI activation-functions and trigonometry functions. The code was reorganized and help functionality is changed. Also re-named some functions in iq+. I...
by amigo
Tue Dec 14, 2021 9:13 pm
Forum: Programming
Topic: IQ4sh - Calculator for CLI or scripts -Testers wanted
Replies: 85
Views: 5376

Re: IQ4sh - Calculator for CLI or scripts -Testers wanted

Doing better, thanks. I've done a significant re-write of div today which is shorter and cleaner and appears to be working correctly for all cases, but need to check more and polish.

by amigo
Sun Dec 12, 2021 6:04 pm
Forum: Off-Topic Area
Topic: Here is Practical Explanation about Next Life,
Replies: 4
Views: 368

Re: Here is Practical Explanation about Next Life,

Didn't you mean Krish Kringle? :?

by amigo
Sun Dec 12, 2021 5:53 pm
Forum: Programming
Topic: IQ4sh - Calculator for CLI or scripts -Testers wanted
Replies: 85
Views: 5376

Re: IQ4sh - Calculator for CLI or scripts -Testers wanted

No, not dead -just feeling dead. I've been sick for 2 weeks and the wife had a surgery last week. I have made some progress the last 2 days. Thanks for asking, and I hope to push in a couple of days.

by amigo
Mon Nov 29, 2021 3:26 pm
Forum: Programming
Topic: Is there a "VCS" where each version update is an arbitrary script
Replies: 11
Views: 1499

Re: Is there a "VCS" where each version update is an arbitrary script

Umm, that actually kind sounds like slackware... where each update is a README. What would your system do about faulty builds, or how should it know which intermediate packages exist?

by amigo
Fri Nov 26, 2021 5:29 pm
Forum: Programming
Topic: IQ4sh - Calculator for CLI or scripts -Testers wanted
Replies: 85
Views: 5376

Re: IQ4sh - Calculator for CLI or scripts -Testers wanted

Very sorry, :oops: I was in a hurry and something got corrupted there. I've tracked it down and will push to github tomorrow, nice and slowly...

Go to advanced search