Skip to content

Commit ee3c6a8

Browse files
committed
Deploying to gh-pages from @ endbasic/homepage@0c1d1c1 🚀
1 parent a3cea10 commit ee3c6a8

File tree

10 files changed

+49
-21
lines changed

10 files changed

+49
-21
lines changed

2024/07/endbasic-0.11.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
</span></span><span class=line><span class=cl>Ready
4040
</span></span><span class=line><span class=cl>
4141
</span></span></code></pre></div><h1 id=lcd-console>LCD console</h1><p>The other big change in EndBASIC has to do with a new backend for its console.</p><p>Two years ago, when I was <a href=/2021/02/endbasic-0.6.html>adding GPIO support to EndBASIC</a>, I bought a little LCD for my Raspberry Pi and I envisioned using it to display the EndBASIC console. I did not get to it at the time but, this year, having spent too much time exclusively on <a href=https://blogsystem5.substack.com/>Blog System/5</a>, I needed to get back to coding. Working on a driver for the LCD is what sparked my interest to hack EndBASIC again and is what ended up triggering the chain of events that brought you 0.11 today.</p><p>I won&rsquo;t bore you too much with the details about this because I already published a <a href=/2024/04/endbasic-st7735s.html>separate blog post</a> that goes into the full story. To recap, let me just show you how this looks like in action:</p><figure><video width=100% controls>
42-
<source src=/images/2024-04-26-endbasic-st7735s-snake.mov type=video/mp4></video><figcaption>EndBASIC running the snake game on the Raspberry Pi with the ST7735s console, showing the final graphics support as well as interaction with the physical buttons.</figcaption></figure><h1 id=known-issues>Known issues</h1><p>There is one big issue that has come up last minute, and it is that the graphics console does <em>not</em> work on macOS anymore. My understanding is that my SDL driver violates fundamental assumptions of macOS (and possibly Windows as well) by driving the SDL interactions from a <em>secondary</em> thread. I suspect something has changed in macOS that makes this break. I&rsquo;m not sure if my theory is true though, but even proving the theory is not trivial at all&mdash;so I have chosen to ship 0.11 &ldquo;as is&rdquo; even if this is broken because 0.10 and earlier are broken too. If you happen to use macOS, I&rsquo;m sorry, you&rsquo;ll have to fall back to the web interpreter.</p><p>Also, retrofitting bytecode execution into the AST-based evaluator has not been easy and, as a result, the code has accrued significant technical debt. Many things can still be simplified in the codebase and those would yield much faster runtime execution. But once again, I have had to draw a line and call the current implementation &ldquo;good enough&rdquo; in order to ship. Rewrites are never a good idea, but I&rsquo;m at a point where a rewrite of the VM (<em>not</em> anything else!) from scratch would be beneficial.</p><p>And to be honest: I need a little break. I have spent all of my free time during the last 5 months on EndBASIC and I have neglected other things I want to do. In particular, Blog System/5 has suffered quite a bit and there are a bunch of topics I want to blog about. So I have had to force the 0.11 release in order to breathe for a little bit. But don&rsquo;t worry: I&rsquo;ll be back for more.</p><p>In any case, EndBASIC 0.11 should be the best EndBASIC to date. Go forth and play!</p><a class="btn btn-primary btn-lg" href=https://repl.endbasic.dev/ target=_new>Launch interpreter</a><div class="row post-links"><div class="col-6 text-center"><span></span></div><div class="col-6 text-center"><span><a href=https://www.endbasic.dev/2024/07/new-blog.html>Previous post &#187;</a></span></div></div></article><footer class="pt-5 pb-3"><div class=container><div class=row><div class="col-md-8 text-left"><form class=form-inline action=https://hugo-dynamic.endbasic.dev/api/sites/6a633c2c-7fda-11ec-86e4-1cfd087199c2/subscribers/add method=post><input type=text name=email placeholder="Enter your email" class="form-control input-sm text-center mx-1" size=20>
42+
<source src=/images/2024-04-26-endbasic-st7735s-snake.mov type=video/mp4></video><figcaption>EndBASIC running the snake game on the Raspberry Pi with the ST7735s console, showing the final graphics support as well as interaction with the physical buttons.</figcaption></figure><h1 id=known-issues>Known issues</h1><p>There is one big issue that has come up last minute, and it is that the graphics console does <em>not</em> work on macOS anymore. My understanding is that my SDL driver violates fundamental assumptions of macOS (and possibly Windows as well) by driving the SDL interactions from a <em>secondary</em> thread. I suspect something has changed in macOS that makes this break. I&rsquo;m not sure if my theory is true though, but even proving the theory is not trivial at all&mdash;so I have chosen to ship 0.11 &ldquo;as is&rdquo; even if this is broken because 0.10 and earlier are broken too. If you happen to use macOS, I&rsquo;m sorry, you&rsquo;ll have to fall back to the web interpreter.</p><p>Also, retrofitting bytecode execution into the AST-based evaluator has not been easy and, as a result, the code has accrued significant technical debt. Many things can still be simplified in the codebase and those would yield much faster runtime execution. But once again, I have had to draw a line and call the current implementation &ldquo;good enough&rdquo; in order to ship. Rewrites are never a good idea, but I&rsquo;m at a point where a rewrite of the VM (<em>not</em> anything else!) from scratch would be beneficial.</p><p>And to be honest: I need a little break. I have spent all of my free time during the last 5 months on EndBASIC and I have neglected other things I want to do. In particular, Blog System/5 has suffered quite a bit and there are a bunch of topics I want to blog about. So I have had to force the 0.11 release in order to breathe for a little bit. But don&rsquo;t worry: I&rsquo;ll be back for more.</p><p>In any case, EndBASIC 0.11 should be the best EndBASIC to date. Go forth and play!</p><a class="btn btn-primary btn-lg" href=https://repl.endbasic.dev/ target=_new>Launch interpreter</a><div class="row post-links"><div class="col-6 text-center"><span><a href=https://www.endbasic.dev/2025/05/new-gallery.html>&#171; Next post</a></span></div><div class="col-6 text-center"><span><a href=https://www.endbasic.dev/2024/07/new-blog.html>Previous post &#187;</a></span></div></div></article><footer class="pt-5 pb-3"><div class=container><div class=row><div class="col-md-8 text-left"><form class=form-inline action=https://hugo-dynamic.endbasic.dev/api/sites/6a633c2c-7fda-11ec-86e4-1cfd087199c2/subscribers/add method=post><input type=text name=email placeholder="Enter your email" class="form-control input-sm text-center mx-1" size=20>
4343
<button type=submit class="btn btn-sm btn-light mx-1">Subscribe to updates</button></form></div><div class="col-md-4 text-right">EndBASIC
4444
<small class="d-block text-muted">Julio Merino &copy; 2020&ndash;2025</small></div></div></div></footer><script type=module>
4545
const SITE_ID = '6a633c2c-7fda-11ec-86e4-1cfd087199c2';

2025/05/new-gallery.html

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!doctype html><html lang=en xmlns:fb=http://ogp.me/ns/fb#><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta property="og:site_name" content="EndBASIC"><title>New online projects gallery - EndBASIC</title>
2+
<meta property="og:title" content="New online projects gallery - EndBASIC"><meta name=description content="Back in 2021, the distinguishing feature of the then-current EndBASIC 0.7 release was that it was &ldquo;cloud-ready&rdquo;: I created a file-sharing service and integrated it with EndBASIC so that you all had a mechanism to publish your creations with others.
3+
It then took the arrival of EndBASIC 0.9, which wasn&rsquo;t released until a year later, to have the ability to automatically launch shared projects via an specially-crafted URL. But even with that feature, projects written and shared from within EndBASIC were stuck in a pretty obscure garden. Nobody was able to discover them unless they signed up for an EndBASIC account and used the command line interface to inspect the cloud, or unless you explicitly shared those URLs somehow. A&mldr; very tall order.
4+
The situation changes today as I have modified the Gallery section of the EndBASIC website to display a dynamic view of projects. Visit it now to have some fun or read on for more details on how this unfolded!
5+
"><meta property="og:description" content="Back in 2021, the distinguishing feature of the then-current EndBASIC 0.7 release was that it was &ldquo;cloud-ready&rdquo;: I created a file-sharing service and integrated it with EndBASIC so that you all had a mechanism to publish your creations with others.
6+
It then took the arrival of EndBASIC 0.9, which wasn&rsquo;t released until a year later, to have the ability to automatically launch shared projects via an specially-crafted URL. But even with that feature, projects written and shared from within EndBASIC were stuck in a pretty obscure garden. Nobody was able to discover them unless they signed up for an EndBASIC account and used the command line interface to inspect the cloud, or unless you explicitly shared those URLs somehow. A&mldr; very tall order.
7+
The situation changes today as I have modified the Gallery section of the EndBASIC website to display a dynamic view of projects. Visit it now to have some fun or read on for more details on how this unfolded!
8+
"><meta name=author content="Julio Merino"><meta name=generator content="Hugo 0.145.0"><meta property="og:url" content="https://www.endbasic.dev/2025/05/new-gallery.html"><meta property="og:type" content="website"><link rel=canonical href=https://www.endbasic.dev/2025/05/new-gallery.html><link rel=alternate type=application/rss+xml title=EndBASIC href=https://www.endbasic.dev/feed.xml><link rel=stylesheet href=/sass/main.min.94bc0f965501d55c079e718289275e84eb7e29b2c86db96ac84f98a76cd28a79.css><link rel=stylesheet href=/css/chroma.css></head><body><nav class="navbar navbar-expand-sm navbar-dark bg-dark sticky-top"><a class=navbar-brand href=/>EndBASIC</a>
9+
<button class=navbar-toggler type=button data-toggle=collapse data-target=#navbarToggler aria-controls=navbarToggler aria-expanded=false aria-label="Toggle navigation">
10+
<span class=navbar-toggler-icon></span></button><div class="collapse navbar-collapse" id=navbarToggler><ul class="navbar-nav mr-auto mt-2 mt-lg-0"><li class=nav-item><a class=nav-link href=/about.html>About</a></li><li class=nav-item><a class=nav-link href=/blog.html>Blog</a></li><li class=nav-item><a class=nav-link href=/gallery.html>Gallery</a></li><li class=nav-item><a class=nav-link href=/download.html>Download</a></li><li class=nav-item><a class=nav-link href=/docs.html>Documentation</a></li><li class=nav-item><a class=nav-link href=/community.html>Community</a></li></ul></div></nav><div class="position-relative overflow-hidden p-3 p-md-5 m-md-3 text-center bg-dark bg-grid"><div class="p-lg-1 mx-auto my-1 text-white text-left"><h1 class="title font-weight-normal">Ready<br>RUN "BLOG"<br>> New online projects gallery&#9608;</h1></div></div><article class=container><p class="text-muted text-right">Published on: May 4, 2025</p><p>Back in 2021, the distinguishing feature of the then-current <a href=/2021/07/endbasic-0.7.html>EndBASIC 0.7</a> release was that it was &ldquo;cloud-ready&rdquo;: I created a file-sharing service and integrated it with EndBASIC so that you all had a mechanism to publish your creations with others.</p><p>It then took the arrival of <a href=/2022/06/endbasic-0.9.html>EndBASIC 0.9</a>, which wasn&rsquo;t released until a year later, to have the ability to automatically launch shared projects via an specially-crafted URL. But even with that feature, projects written and shared from within EndBASIC were stuck in a pretty obscure garden. Nobody was able to discover them unless they signed up for an EndBASIC account and used the command line interface to inspect the cloud, or unless you explicitly shared those URLs somehow. A&mldr; very tall order.</p><p>The situation changes today as I have modified <a href=/gallery.html>the Gallery section of the EndBASIC website</a> to display a dynamic view of projects. Visit it now to have some fun or read on for more details on how this unfolded!</p><h1 id=how-does-the-gallery-work>How does the gallery work?</h1><p>The online gallery offers two new features: one is a project browser and the other is a file browser.</p><p>The <strong>project browser</strong> uses a new API in the backend service to query all published projects. A project is defined as a group of three files (a <code>.BAS</code>, a <code>.PNG</code>, and a <code>.TXT</code>) with the same base name, all shared with the same set of people (or the public). These files provide the source of the project, a thumbnail for display, and a public description of the project.</p><p>So, for example, if I store the files <code>LIFE.BAS</code>, <code>LIFE.PNG</code>, and <code>LIFE.TXT</code> in my cloud drive and I use the <code>SHARE</code> command to add the <code>public+r</code> ACL to them, there will be a new tile in the projects gallery that displays <code>LIFE.PNG</code> as its thumbnail, uses <code>LIFE.TXT</code> to explain what it is about, and provides a link to <a href="https://repl.endbasic.dev/?run=jmmv/life.bas">launch <code>LIFE.BAS</code></a>.</p><p>The <strong>file browser</strong> uses a new API to query the list of users that are sharing any files with the public, and then uses pre-existing APIs to list the files that they share. Nothing surprising there, but I did have to rewrite the &ldquo;get file&rdquo; API to expose file downloads as a traditional HTTP server does: the previous implementation wrapped the file content in JSON and this had been&mldr; not a wise design decision (to put it mildly) years back.</p><p>With these new APIs in place, all I had to do was write some old-fashioned jQuery-based JavaScript and some rudimentary AJAX queries to create the two views in the gallery.</p><h1 id=changes-to-the-client>Changes to the client</h1><p>The work to make the projects gallery possible didn&rsquo;t end with the changes to the backend and the website. As you may have noticed above, two of the files in a project definition are text files, but one of them is a binary image. And, for reasons that I can&rsquo;t remember, I made the unfortunate decision years ago to only support text files in the internal EndBASIC storage interfaces. This, combined with the lack of a primitive to copy files, meant that I could not upload images to my cloud drive.</p><p>Fixing this was pretty mechanical because there was no reason to restrict the storage interfaces to dealing with text only. However, what this means is that until I publish EndBASIC 0.12 later this year, you&rsquo;ll have to build the EndBASIC CLI from source to leverage <a href=https://github.com/endbasic/endbasic/pull/272>the fixes</a>, and then use the new <code>COPY</code> command to upload thumbnails into your drive. Let me know if you need help with any of these.</p><p>As for the future, the new &ldquo;get users&rdquo; API that I added to the backend should let me improve the experience in EndBASIC to navigate cloud files: I don&rsquo;t quite like how you have to <code>MOUNT</code> each user as a new drive today, and I&rsquo;d much rather expose a directory interface. But that&rsquo;s a lot of work.</p><p>Until then&mldr; <a class="btn btn-primary btn-lg" href=/gallery.html>Visit the gallery</a> or: <a class="btn btn-primary btn-lg" href=/docs.html#cloud>Read the cloud docs</a></p><div class="row post-links"><div class="col-6 text-center"><span></span></div><div class="col-6 text-center"><span><a href=https://www.endbasic.dev/2024/07/endbasic-0.11.html>Previous post &#187;</a></span></div></div></article><footer class="pt-5 pb-3"><div class=container><div class=row><div class="col-md-8 text-left"><form class=form-inline action=https://hugo-dynamic.endbasic.dev/api/sites/6a633c2c-7fda-11ec-86e4-1cfd087199c2/subscribers/add method=post><input type=text name=email placeholder="Enter your email" class="form-control input-sm text-center mx-1" size=20>
11+
<button type=submit class="btn btn-sm btn-light mx-1">Subscribe to updates</button></form></div><div class="col-md-4 text-right">EndBASIC
12+
<small class="d-block text-muted">Julio Merino &copy; 2020&ndash;2025</small></div></div></div></footer><script type=module>
13+
const SITE_ID = '6a633c2c-7fda-11ec-86e4-1cfd087199c2';
14+
15+
import { addAnchorsToHeaders, RequestsClient } from "\/js\/main.401f0b9ece66070cd6f0313349349320e8f07f87ba76262d59bb3e2093c49b58.js";
16+
new RequestsClient(SITE_ID).saveRequest();
17+
18+
addAnchorsToHeaders();
19+
</script><noscript><img src="https://hugo-dynamic.endbasic.dev/api/sites/6a633c2c-7fda-11ec-86e4-1cfd087199c2/pages/aHR0cHM6Ly93d3cuZW5kYmFzaWMuZGV2LzIwMjUvMDUvbmV3LWdhbGxlcnkuaHRtbA==/stamp.gif" style=display:none></noscript></body></html>

0 commit comments

Comments
 (0)