|
Post by bigbass on Oct 27, 2020 19:53:00 GMT 1
clean link if you want to do your own thing cocalc.com/appOne I did to test on cocalc.com/projects/e67b0d76-34ed-44c1-a220-b28373a6ade0/files/Welcome%20to%20CoCalc.term?session=defaultit's very easy to do this it took me about a minute 1.) you select file and upload bacon.sh you can get it from fossil 2.)then you upload a test file b.bacforgot to change permissions first but can do it online also if needed have fun could come in handy if you are not at home or you want to show someone an example how it works without the setup process of compiling (can think about some new users that don't have a compiler set up yet or you are not on a linux box ) also could be helpful to confirm if something works outside of your personal computer Joe P.S I did that without signing up and will look for other sites that allow uploads ============================================ just in case you want to confirm the steps any bac file would work here is the bacon file b.bac OPTION BASE 1 LOCAL dimension
str$ = "some text we want to convert to an array then count how many words it has" SPLIT str$ BY " " TO array$ SIZE dimension FOR i = 1 TO dimension PRINT array$[i] NEXT PRINT "array count = ",i -1
|
|
|
Post by bigbass on Oct 27, 2020 23:44:10 GMT 1
I found another better option repl.it/languages/bashjust upload bacon.sh and any bacon demo.bac you want to test the user interface is straight forward and easy to use if any doubts look at the screenshot I didn't have to sign up to use this Joe for example I am using the raspberrypi 3 for my personal testing but now I can test with GNU bash, version 4.4.20(1)-release (x86_64-pc-linux-gnu) to see if there are any differences and avoid bugs for x86 64 I signed up no cost just to send the working example demo repl.it/talk/share/online-bacon/60259they also have for node.js (if you need it) one more if you want to test from the command line feed it some arguments ./split some text we want to convert to an array then count how many words it has call it split.bac SPLIT ARGUMENT$ BY " " TO TOK$ SIZE len_array
FOR i = 0 TO len_array - 1 PRINT TOK$[i] NEXT i
PRINT PRINT len_array - 1
|
|
|
Post by bigbass on Oct 28, 2020 15:59:49 GMT 1
Hello bacon world I was curious to see if I could actually build bacon.bac to have the compiled version too and yes ! it takes 15 min to build not bad for online *the RPI3 takes longer a screen shot says a thousand words I guess this could be very useful to walk people though problems to see how it should work with the minimum clutter of details also if someone just wanted to test the latest beta version and see if the latest version would solve the problem or not on a clean machine now anyone could test bacon online Joe P.S once you have the bacon binary you can now easily get files from the URL and compile them in one small step ./bacon http://www.basic-converter.org/sinus.bac and run it in the terminal it works! ./sinus
|
|
|
Post by Pjot on Oct 29, 2020 20:09:20 GMT 1
Thanks Joe,
That's actually very convenient! And cool for demonstration purposes.
Thanks for pointing out this possibility.
Best regards Peter
|
|
|
Post by bigbass on Oct 30, 2020 18:16:11 GMT 1
Hello Peter thanks for the feedback (hope this can be useful for bacon users) *for my first attempt I manually uploaded the needed files from fossil but I wanted to show how we could build from source (why for example the raspberry pi doesn't have an official a bacon deb ) and we are forced to build from source to even try bacon for the first time so I made a virtual build script that compiles bacon in the virtual bash online web site its called source-installerit skips the make install (and the debian installer) and the bacon binary just gets copied to the virtual home directory ( so its safe to use online or in a sandbox ) repl.it/talk/share/online-bacon/60259there are a few extra steps just to check if all went well if you are curious you could check the config.log virtual from inside the sandbox source-installer./source-installer
|
|
|
Post by bigbass on Nov 21, 2020 16:15:17 GMT 1
Hello What's nice here is we can share a working environment not just a code example this means it can show how it works in real time then its up to you to get the same results on your box the code demos confirm that they are working on an independent sand boxed machine I know that javascript and node are not popular with some bacon users probably because it is thought that we can't mix them or use them together but we can I wrote a javascript bacon app compiler using node called compile.jsto show that this can be done even in a remote sandbox Note: in the remote sanbox I can't install bacon into the system so I need to prefix the bacon command ./bacon but if you use this on your personal computer we can call the system bacon directly without the ./ how do I test this ? easy just type this command in the terminal node compile.js it wlll compile a.bac and then run the program ./a for you automatically I already did this step so you don't have to do it the code is all on this site everything is 100% transparent and we can install using npm! for example I first installed node npm install node then the other node dependencies repl.it/talk/share/bacon-app-compile-using-javascript-and-node/81353have fun this means bacon can be used with javascript and node which can open up new doors where they were closed before Joe now working with a link compile.js code
|
|