|
Post by Pjot on Mar 6, 2020 19:05:54 GMT 1
I see what you mean, and think you have diagnosed it properly as some kind of maxargs problem. Peter suggested that it might be a problem with the PI environment - i.e. shell environment, IFS etc., but I have played with those bits and not had any success. In any case, eliminating var$[5] fixes it With this problem I was unable to reproduce the crash. Also, valgrind did not show any memory errors, and all seem to be working fine. But thanks to the remarks of Alex I could trace down a problem in the argument handling in ALIGN$, though I am not sure if this actually fixes the crash in RPI. So, the last argument to ALIGN$ was obtained by BaCon using the variable argument API from libc, and BaCon assumed it always is an "int" type. However, the VAL function used in BISH returns a float type. Therefore, the last argument to ALIGN$ was not set correctly by libc and defaulted to 0. If you fetch the latest version 4.0.1 beta from fossil and try again, then this problem should be fixed. I am curious to see if this also fixes the issue in RPI.... BR Peter
|
|
|
Post by vovchik on Mar 6, 2020 19:37:46 GMT 1
Dear Peter,
I just compiled the new bacon from fossil and then compiled bish on my Pi4. Perfect and THANKS!!!! It all now works as it had on my Intel Mint installation. Great for bish!!!!
With thanks again and kind regards, vovchik
|
|
|
Post by vovchik on Mar 7, 2020 15:19:38 GMT 1
Dear all, This might be regarded as total overkill and pure fetishism, but here is more bish-bash, now with aliases, so even bash looks much like BaCon. Adjust the locations of the includes for your system within 'alias-bish'. Have fun... #!/bin/bash
# ****************************************************** # BISH SHORTCUTS and ALIASES # change these locations for your particular setup # ******************************************************
shortcuts="$HOME/Public/bacon-tst/bacon-shell/bish.inc" aliases="$HOME/Public/bacon-tst/bacon-shell/baliases.inc" source $shortcuts source $aliases
# *********************** # INITIALIZATION # ***********************
year=$($YEAR $($NOW)) feb29="This is a leap year. February has 29 days." feb28="This is not a leap year. February has 28 days."
# *********************** # MAIN # ***********************
PRINT "The year is: $year" PRINT IF [ $($COMP_NUM $($MOD '$year' '400') "EQ" '0') ]; THEN PRINT "$feb29" ELIF [ $($COMP_NUM $($MOD '$year' '4') "EQ" '0') ]; THEN IF [ $($COMP_NUM $($MOD '$year' '100') "NE" '0') ]; THEN PRINT "$feb29" ELSE PRINT "$feb28" ENDIF ELSE PRINT "$feb28" ENDIF END With kind regards, vovchik Attachments:alias-bish.tar.gz (4.04 KB)
|
|
|
Post by vovchik on Mar 8, 2020 11:31:04 GMT 1
Dear all,
I updated bish and added another function: TIME_UTC. It returns the UTC time (arg1 = 0) or date (arg1 = 1) as provided by a NIST server. The updated source is in the first post.
With kind regards, vovchik
|
|
|
Post by vovchik on Mar 8, 2020 14:20:27 GMT 1
Dear all,
I updated bish and added two new functions/keywords: COMP_NUM and COMP_STR. They are used for comparisons (and useful in scripts). The syntax is explained in 'bish help comp_num' and 'bish help comp_str'. The new bish source is available in the first post.
With kind regards, vovchik
|
|
|
Post by vovchik on Mar 12, 2020 14:39:28 GMT 1
Dear all,
Thanks to Joe and Rik. I added the RM_EXTRA keyword/function. The updated bish source is in the first post.
With kind regards, vovchik
|
|
|
Post by alexfish on Mar 24, 2020 17:16:13 GMT 1
Hi Vovchik
whilst on with the cairo canvas I made some improvements to the strip html
one thing I added was a simple 'get mark up text'
Not sure if better than yours
but you & others may find it useful
BR Alex
note from the html strip the text quotes are converted to "'"
SUB GetMarkUpText( STRING text) LOCAL t TYPE int LOCAL can=1 TYPE int
FOR t = 0 TO LEN(text)-1
IF CHR$(text[t]) = ">" THEN INCR t can = 1 END IF
IF CHR$(text[t]) = "<" THEN can = 0 END IF
IF can THEN PRINT CHR$(text[t]); END IF
NEXT
END SUB
'=== MAIN ========================================= LOCAL str$ TYPE STRING
str$ ="<p id='welcome'> Welcome Guest. Please <a href='https://login.proboards.com/login/3081746/1'> Login</a> or <a href='https://login.proboards.com/register/3081746'> Register</a> .</p>" GetMarkUpText(str$) PRINT
|
|
|
Post by vovchik on Mar 26, 2020 11:47:38 GMT 1
Dear all, I have worked on two little bish-based scripts - BBC Meteo and Corona. One now fetches BBC data - with a 3-day forecast for locations of your choice. The Corona script fetches case data from ECDC (EU). You need the latest bish and the includes in the archives (the includes are identical, so you only need to place them into your preferred location, and they work for both scripts - in fact, all of my bish-bash scripts). Look at the sources and you will see where you can add/modify weather locations in BBC-meteo. I will add and parse more locations for corona data from other sources soon. It is, like the pandemic, still a work in progress. Hope you and your dear ones are healthy. With kind regards, vovchik
|
|
|
Post by Pjot on Mar 26, 2020 18:26:19 GMT 1
Thanks vovchik!
Works perfectly fine BR Peter Attachments:
|
|
|
Post by bigbass on Mar 26, 2020 20:05:41 GMT 1
Hello vovchik Thanks looks great and works well! the weather here is cool in very early morning very hot max temp 34 c in the afternoon and sunglasses required P.S I had some trouble with the Pi3 unrelated issues did the official update upgrade and it booted me to a black screen and stayed there .... so did a reinstall of the latest rpi3 and did the set up so I was a bit slow to respond all is working well and setup my web cam so I can make some video calls (now that we here stuck in the house) minimum setup on a clean box so I don't forget mkdir -p $HOME/Public/bacon-tst/bacon-shell cp bish.inc baliases.inc $HOME/Public/bacon-tst/bacon-shell
sudo apt install yad xcowsay xclip
sudo cp bish /usr/bin
Hope all is well with you there! Joe
|
|
|
Post by vovchik on Apr 4, 2020 20:44:02 GMT 1
Dear all, The corona virus is not a joke. A very close friend of mine was just hospitalized with all the symptoms, including acute respiratory failure (sudden double pneumonia). He's a great scientist, and, apart from his many very serious books (he lost out to Sir Richard Penrose for best book in science in either 2017 or 2018, coming in second place), was one of the first to identify the scope and scale of environmental radionuclide contamination (e.g. plutonium and strontium-90) resulting from atmospheric nuclear testing in the late 1960s and early 1970s. I hope he pulls through. Here is a revised bish/yad script that shows infections by country, which, unlike the previous version, makes use of lists that can be sorted. Only the first entry in the pull-down menu (data from ECDC) works for now, but I am working on other sources. ECDC update their info at 15:00 CET daily. I hope all of you are well and self-distancing. With kind regards, vovchik Attachments:yad-corona-ecdc.tar.gz (6.97 KB)
|
|
|
Post by bigbass on Apr 5, 2020 16:45:45 GMT 1
Hello vovchik
Sorry to hear what happened to your friend any type of a respiratory failure is very serious even if it is not caused by corona virus many people are getting colds and the flu that have not been sick in years and their concerns are being tested for corona virus I hope he recovers quickly
on another note I tested your bish +yad script and it looks great and runs well its amazing what could be done forcing (overloading) a gtk dialog (for example what could be done with gtkdialog or yad and the shell) a very useful demo
Joe
|
|
|
Post by vovchik on Apr 5, 2020 19:40:58 GMT 1
Dear Joe,
Thanks for testing and staying well. As for that friend, there is good and bad news. The first is, after four days in a clinic, my friend got released and is undergoing antibiotic treatment at home. They tested for CORONA and the test came back, one and a half days later, as being negative. In the meantime, because of his symptoms, doctors had placed him in the CORONA ward, so he is now quarantined for 14 days and hopes he did not pick up the infection at the hospital. We'll see. All that took place in San Diego.
With kind regards, vovchik
|
|
|
Post by Pjot on Apr 5, 2020 20:00:52 GMT 1
The corona virus is not a joke. A very close friend of mine was just hospitalized with all the symptoms, including acute respiratory failure (sudden double pneumonia). He's a great scientist, and, apart from his many very serious books (he lost out to Sir Richard Penrose for best book in science in either 2017 or 2018, coming in second place), was one of the first to identify the scope and scale of environmental radionuclide contamination (e.g. plutonium and strontium-90) resulting from atmospheric nuclear testing in the late 1960s and early 1970s. I hope he pulls through. Thanks vovchik, Your program works fine on my 64bit Mageia distro. It is always a disaster when a close friend gets into trouble. I sincerely hope your relatives and loved ones remain in good health and survive.
Best regards Peter PS from my personal perspective, the whole corona situation has an upside, because I actually like the regulations which are enforced in my country (Netherlands). We are to stay at home, work from home, and be in a supermarket as little as possible. On the street, we are to keep distance from other people as much as possible. Good! This is what I am doing anyways, also before the corona virus appeared. At my job, I actually took holidays this month, three weeks until the end of April, and while colleagues were asking if I needed to change my schedule, I volunteered to leave the planning as it is, because I do enjoy the whole lock-down situation. Yes, I like staying at home - and if it wasn't for the virus, the lock-down may last for the whole year as far as I am concerned....
|
|
|
Post by vovchik on Apr 5, 2020 20:53:38 GMT 1
Dear Peter,
Good health to you and thanks for testing. Like you, I also enjoy self-distancing, as it is now called, and am most productive when at home alone and not distracted. There is also the side-benefit, observed the world over, of less atmospheric and noise pollution, which is a welcome development. Even seismologists have observed less background noise being transmitted through the Earth's crust. Animals with more actue hearing, such as cats and dogs in cities, must also be happy to be hearing less of that ever-present and disturbing noise. So, as you say, there is also an upside to all of this, while the downsides are very serious, too.
Stay healthy.
With kind regards, vovchik
|
|