|
Post by tenochtitlanuk on Feb 3, 2022 14:34:59 GMT -5
If I'm out and about I often track my path by mobile phone. The software can output a file as a GPX file, and I've been playing with the data as visual displays to show where I lost time or went wrong. The images below show the map I was following with my overall score ( second of two competing as males over 75) and a colour coded animation of the route I actually took. It was not helped by my eyesight misleading me to going from 5 to 9 when it should have been to 6- I was at this point holding the map upside down....
|
|
|
Post by tenochtitlanuk on Feb 3, 2022 14:23:02 GMT -5
|
|
|
Post by tenochtitlanuk on Jan 30, 2022 3:51:46 GMT -5
Just adding to the mystery, I get the same fail in Wine/LB4.5. I'd never watched the debugger before on strings with leading and trailing " characters- gets very confusing.
As a workaround that needs no dlls or exotica, I wrote a sub that works for me. Save the code in a new folder and add a file called 'long' and run the code. If you have the directory folder open you'll see the name change. For my set up anyway!! I should probably have added a 'ifFileExists' check...
nomainwin
call rename "long", "short" notice "'long' now 'short'"
call rename "short", "long" notice "'short' now 'long' again."
call rename "long", "sh ort" notice "'long' now 'sh ort''"
call rename "sh ort", "long" notice "'sh ort' now 'long' again."
wait
sub rename f1$, f2$ open f1$ for input as #fIn content$ =input$( #fIn, lof( #fIn)) close #fIn open f2$ for output as #fOut #fOut content$; close #fOut kill f1$ end sub
|
|
|
Post by tenochtitlanuk on Jan 20, 2022 7:14:44 GMT -5
I'll be interested in your progress. I nearly bought one of these purely for interest. When we found LB's rnd() was showing a systematic ( but tiny) bias I investigated all sorts of RNGs. Have you tried it with software like Teraterm/Minicom/w.h.y. to see the data stream? The DTR seems to just turn off/on the stream of bytes- best viewed in hex mode I'd guess. There's relevant stuff in reviews of the device at www.amazon.com/TrueRNG-V3-Hardware-Random-Generator/product-reviews/B01KR2JHTA?reviewerType=all_reviewsNot all the users seem to understand what it is doing.... PS Possibly relevant- I had an ADC that supplied serial data via USB- looking at the datastream via a terminal got me going with that.. See my page at www.diga.me.uk/serialADCreadLinux.html
|
|
|
Post by tenochtitlanuk on Dec 31, 2021 12:19:31 GMT -5
I noticed yesterday in April 2021 Scientific American an article about the idea of percolation as seen by modern mathematics. It is relevant to things like spreading of ground water; extraction of oil and gas; polymerisation; and the world wide web... Imagine a rock layer. On on side is high pressure water. On the other, the surface. If the rock is intact, no water escapes.
Fracture the rock a bit and water will penetrate some way, but not enough to emerge.
Fracture it a great deal and the water passes easily. ( but some bits may not link to the main path the water follows) It looked fun to simulate as a screen animation. I get results as shown. Gave me a fun few hours- hope other LB-ers may enjoy trying it. Happy New Year, anyway! Blwyddyn Newydd Dda!
|
|
|
Post by tenochtitlanuk on Dec 25, 2021 5:53:45 GMT -5
Just a note that if you download version 3 you need to change two references to 'lbbrowse.dll' to 'lbbrowse3.dll'.
|
|
|
Post by tenochtitlanuk on Dec 12, 2021 6:37:33 GMT -5
Another Rosetta Code suggested task- analyse supplied COVID death data and fit to the 'logistics curve'. Gave me an hour or two of fun with LB's graphics.
|
|
|
Post by tenochtitlanuk on Nov 28, 2021 14:19:42 GMT -5
My browser barfed at the double slash in the supplied URL...
|
|
|
Post by tenochtitlanuk on Nov 28, 2021 3:53:26 GMT -5
Downloaded fine and it is impressive. The GUI front-end makes it very easily useable. I'll be playing with it when I have time. johnf PS thanks for the mention! LB and this forum have always been great places to share, help and admire!
|
|
|
Post by tenochtitlanuk on Nov 26, 2021 8:40:06 GMT -5
Just to note I've added a page on this, which was prompted by tsh73's post on the JB forum.
Cheerful graphics for Thanksgiving, and the approach of Christmas.
|
|
|
Post by tenochtitlanuk on Nov 21, 2021 17:28:47 GMT -5
A more normal way would be to use a subroutine as below. You also need the 'end' to avoid 'falling into' the definition of the sub. It also helps if you post LB code within the 'code' tags..
nomainwin
CToInput$ ="-2" if val( CToInput$) < 1 then call Notify
end
sub Notify notice "NOTICE!" + chr$(13) + "All information must be filled in " + chr$(13) + "before calculations can begin!" BadInfo = 1 end sub
|
|
|
Post by tenochtitlanuk on Nov 14, 2021 12:44:28 GMT -5
It looks like an interesting reference, but rather beyond me. There's a lot there and well worth dipping into. The pseudo-code is quite easy to follow. Keep us in touch if you get anywhere... I've coded things like HILL-CLIMBING and SIMULATED-ANNEALING. I'd certainly have been helped by a reference work like this one... The vocabularly has become specialised. Luckily Wikipedia helped me! 'A percept is the input that an intelligent agent is perceiving at any given moment.
In artificial intelligence, an intelligent agent (IA) is anything which perceives its environment, takes actions autonomously in order to achieve goals, and may improve its performance with learning or may use knowledge.'
EDIT I particlularly liked the examples of Language Processing. Also note it is a work-in-progress with many chapter headings with no content. I'll certainly be browsing it further, however.
|
|
|
Post by tenochtitlanuk on Nov 13, 2021 11:08:46 GMT -5
I've done several animations, including graphic Xmas trees at my web site Xmas animation and stained glass windows whose colours change. Fun to be getting seasonal!
|
|
|
Post by tenochtitlanuk on Nov 9, 2021 17:21:45 GMT -5
Yup, it IS quite fast! What I found most interesting is LB's performance in terms of precision. If you specify 'print using( "##.#######################", h), you can see it is expressing wrongly the least significant figures, but internally representing them precisely. Hence by working backwards from the result you get back to EXACTLY 1!
The first twenty harmonic numbers are: 0.99999999999999991611392 by adding 0.99999999999999991611392 1.49999999999999987417088 by adding 0.49999999999999995805696 1.83333333333333289992192 by adding 0.33333333333333327740928 2.08333333333333296283648 by adding 0.24999999999999997902848 2.28333333333333287895040 by adding 0.20000000000000000000000 2.44999999999999947571200 by adding 0.16666666666666663870464 2.59285714285714212913152 by adding 0.14285714285714284216320 2.71785714285714232836096 by adding 0.12499999999999998951424 2.82896825396825350471680 by adding 0.11111111111111109246976 2.92896825396825346277376 by adding 0.10000000000000000000000 3.01987734487734442524672 by adding 0.09090909090909089955840 3.10321067821067789139968 by adding 0.08333333333333331935232 3.18013375513375467896832 by adding 0.07692307692307692388352 3.25156232656232650899456 by adding 0.07142857142857142108160 3.31822899322899314769920 by adding 0.06666666666666665967616 3.38072899322899324731392 by adding 0.06249999999999999475712 3.43955252264075765219328 by adding 0.05882352941176469848064 3.49510807819631307259904 by adding 0.05555555555555554623488 3.54773965714368178946048 by adding 0.05263157894736841277440 3.59773965714368160071680 by adding 0.05000000000000000000000
3.547739657143682 by subtracting 0.05000000000000000000000 3.495108078196313 by subtracting 0.05263157894736841277440 3.439552522640758 by subtracting 0.05555555555555554623488 3.380728993228994 by subtracting 0.05882352941176469848064 3.318228993228994 by subtracting 0.06249999999999999475712 3.251562326562327 by subtracting 0.06666666666666665967616 3.180133755133755 by subtracting 0.07142857142857142108160 3.103210678210678 by subtracting 0.07692307692307692388352 3.019877344877345 by subtracting 0.08333333333333331935232 2.928968253968254 by subtracting 0.09090909090909089955840 2.828968253968254 by subtracting 0.10000000000000000000000 2.717857142857143 by subtracting 0.11111111111111109246976 2.592857142857143 by subtracting 0.12499999999999998951424 2.450000000000000 by subtracting 0.14285714285714284216320 2.283333333333333 by subtracting 0.16666666666666663870464 2.083333333333333 by subtracting 0.20000000000000000000000 1.833333333333333 by subtracting 0.24999999999999997902848 1.500000000000000 by subtracting 0.33333333333333327740928 1.000000000000000 by subtracting 0.49999999999999995805696 0.000000000000000 by subtracting 0.99999999999999991611392
|
|
|
Post by tenochtitlanuk on Nov 9, 2021 14:58:57 GMT -5
I've had fun before with high-precision arithmetic. See High Precision on my site. Series where the sign of each term alternates +/- are not so immediately obvious... Clearly anything where you keep adding is going to be unbounded. See my quoted page and the line 'The harmonic series is divergent, albeit quite slowly, and grows toward infinity.'
The interest is in seeing the total reaching two digit numbers and more in finite computing time.
|
|