|
Post by tsh73 on Jul 24, 2023 15:29:38 GMT -5
Just ventured into that facebook group. (somehow got past that "you must register" nag screen, hardly could repeat that) Seen recent posts by Carl, mentioning LB / LB5. (recent if timing is showing correct on cite / in my browser) So at least he is alive.
|
|
|
Post by badbug on Aug 9, 2023 8:10:10 GMT -5
As a novice to LB, I'm trying to leverage the power of LB by converting some of my old RB programs. Years ago I wrote a Rosetta Code program to deal cards. It is a simple program and is not a web app. RC-card dealCan someone show me how to do this in LB. Thank your..
|
|
|
Post by tsh73 on Aug 9, 2023 10:05:36 GMT -5
1) could you share your cards resource? I found some zip file on HDD but cards are numbered 1..52, not as in your code 2) it'll require separate thread
|
|
|
Post by badbug on Aug 9, 2023 13:14:25 GMT -5
It was a long time ago. I can't find the cards resource. It looked something like the link. The code to pick it apart should be fairly easy to change. I'll have a look at the code. However I've got some commitments for the rest of the week and won't be able to change the code until next week sometime.. cards resource url
|
|
|
Post by tsh73 on Aug 9, 2023 16:07:07 GMT -5
|
|
|
Post by badbug on Aug 10, 2023 7:02:22 GMT -5
I have another program I'm trying to convert. Originally it was a program to display photos. Now shows any media like music, movies, photos. The program displays a grid of 5 x 5. Any image you click shows bigger to the right.
You can grab the edge of the display and shrink or enlarge it. All the images automatically follow the size to fit the changed size. Amy media other than photos shows to the right with the appropriate buttons to start and stop the media. I know this is probably simple in LB, but as a newbie I have problems with clicking the edge of the display and dragging it to a new size with all the images following the size to fit the 5x5 grid. In RB you show it in a <table> with a width of 100% where it always fills the resized display to 100% or any percent you pick. To make media play with buttons to start, move to a position, stop I use "<EMBED SRC=";mediaPath$;"autoplay=true>" To do images I use "<IMG SRC=";mediaPath$;" width=100%>"
So I don't need the whole program. Just how to make a resizable display and have all the images resize. Also I need to play music and movies with controls. Any help will be appreciated.
|
|
|
Post by Rod on Aug 10, 2023 7:51:57 GMT -5
I think you have two ways forwards. First is stick with your html code and push it at an ATL browser. So Liberty puts up a browser and it runs your code. Not done much of that myself but there are folks who might help. The browser demo is on the LBPE. I think the problem with the ATL browser is getting feedback from it. If it can all be done in the browser great but don’t think you will be able to dip in and out of Liberty. libertybasiccom.proboards.com/thread/597/challenge-rosetta-code-aggregatorThe second route is to adopt the blitter code to draw your resized graphics to a graphicbox. The hurdle is that you may not be used to the blitter which is API call from Liberty. What you describe is pretty straight forwards but not perhaps for new to Liberty. libertybasiccom.proboards.com/thread/1011/enlargerment-bmpThe media playing is best handled using the MMI via API from Liberty. libertybasiccom.proboards.com/thread/291/project-music-soundI will add links where I can. All in all it seems daunting but if I can get some time on my pc I will code a demo of what you discuss. Might take a week or so. Perhaps a new thread next time round so we keep subject matter grouped.
|
|
|
Post by badbug on Aug 10, 2023 20:14:58 GMT -5
Based on all the comments, I realize that LB is way more powerful than RB. I have another system I'm trying to convert. It's a winery management system. Not a big system. It only has about 80 programs and the database has about 50 tables. Most wineries only have about 300 users, so it's kinda small. How do I leverage the power of LB and get this converted. Winery DocumentationThanks for the help..
|
|
|
Post by Rod on Aug 11, 2023 3:03:07 GMT -5
You have to keep in mind that Liberty is a single threaded pc application. So three hundred users online all at once all updating a single database may be hard. The issue is file access and locking. Windows will reject requests if the file is already in use by another user. Liberty has no tools to lock and unlock the file or check and retry. There is SQLite to search out but examples of working database code are thin on the ground and SQL is a language in its own rite. With Liberty some folks have had success sending update files to the server which it occasionally picks up and updates. I also played with binary mode access which surprisingly seemed to work. But you would be well advised to set up some test access before committing to serious coding. libertybasiccom.proboards.com/thread/1413/shared-file-accessLiberty cannot handle server paths, each pc must see the server as a standard windows path like D:/
|
|
|
Post by badbug on Aug 11, 2023 3:44:13 GMT -5
Thanks for the update. No way can I use flat files for the system. One of the requirements of the system is that it must work 24/7 every day. No way can you take the system down even for backup. I was using SQLite, but moved to mySQL. mySQL uses replication and failover. - Replication - When something is changed, the data is replicated on another system. - Failover - If the computer goes down for any reason it automatically fails over to the backup server to serve the users. They don't even know the system went down. Sense everything is replicated, it is up to date. Once the computer is fixed, mySQL syncs the data lost during the downtime, and falls back to the base computer. I have 3 servers. - Server 1 is where the system runs, the base. - Server 2 replicates data from Server 1 - Server 3 replicates data from Server 2. Every time someone changes something on Server 1 it is automatically updated on Server 2. Server 2 then sees that it changed and is replicated on Server 3. This way there are always 2 backups, and 2 failovers. The servers of course cannot be in the same area because of fires, power, floods or other reasons. Mine are located in separate towns. People want to control the realestate of their screens. Maybe they are running other apps. Therefore all screens must be resizable, and all the data, graphs, images must resize to fit the screens. Bottom Line.. From everything I've seen LB is no were near the power of RB. I wrote conversions from RB to Python, PHP, and Red Lang. About 80% to 85% conversion. I like Red Lang the best, but it suffers from the same problem LB has - not updated much. So it's probably between Python and PHP and lately I'm leaning toward Python..
I wish everyone good luck. Bottom line.. I'm moving on. LB needs to mature. Maybe bring over some stuff from RB. Anyway this is what I see. Thanks for all the help
|
|
|
Post by tsh73 on Aug 11, 2023 8:16:51 GMT -5
badbug, There is no golden hammer. LB never posed itself as one, anyway. You just outgrow it's intended purpose. That of "hobbist language"
Good luck in big guy's world.
|
|
|
Post by Rod on Aug 11, 2023 8:17:50 GMT -5
Good choice, right tool for the right job. We however shall continue having great, if simpler fun with BASIC.
|
|
|
Post by Brandon Parker on Aug 11, 2023 16:49:37 GMT -5
Good choice, right tool for the right job. We however shall continue having great, if simpler fun with BASIC. Rod, Was this meant for a different thread? It seems like it was meant for a thread where badbug is leaving...again... {:0) Brandon Parker
|
|
|
Post by badbug on Aug 13, 2023 5:54:21 GMT -5
Sorry for the confusion. I left again, because somewhere is was posted that "Liberty Basic was way more powerful than Run Basic". I like the BASIC dialect, and wanted LB to work. So I decided to take another look. Being a newbie to LB, I had no idea what it could or could not do. If LB does what you want and you like it, I'll be one of the first to tell you to stick with it. Anyway I have a lot of conversion, and a Basic dialect would be the easiest for me to convert. I looked at PureBasic, PowerBasic, BBC basic, rebol, RedLang, python, PHP and a few others. Like any language they all had things they really did will and things they suck at. Not speaking for anyone else, RedLang works best for me and looks more like Basic than some of the other basic languages. For me there is only 2 things LB needs to do. Get a html interface, and some kind of web presence. Seems like it could get a copy of Flask from android and modify it to work with LB. Personally I think Apache with a CGI interface would be great. If LB does something like this, I'll be the first to be back. And again if it don't do what I need, I may quit ... again ... Good luck and happy coding.
|
|
|
Post by Brandon Parker on Aug 14, 2023 20:24:47 GMT -5
No worries... We wish you luck in all of your programming adventures...
I, for one, completely thought I was posting in a different thread...unless something was moved on me.
{:0)
Brandon Parker
|
|