1274 points · by ent101 · 2y ago · 319 comments
https://puter.com/app/half-life-c3j01ag3pyd
It looks like it's using a build of the below, hosted on GitHub.io:
> […] your app will get a few things by default: […] An app directory in the user's cloud storage […] A key-value store in the user's space […]
> > Apps are sandboxed by default! Apps are not able to access any […]
https://docs.puter.com/security/
I guess that refers to the cloud storage/backend. Clientside apps seem to run as IFrames, so should be subjected to normal browser sandboxing (…and actually, I guess, multiprocessing too), with only explicit message-passing.
Honestly I think the developer API could have been better highlighted by this HN post. Puter's actually doing a bit more than the Desktop Environment mockup that's visually apparent, and not featuring that seems like a wasted opportunity to pick up some app developers.
I've seen many 'desktop in browser' type demos over the years, but never anything like this. This is impressive on so many levels.
https://kripken.github.io/misc-js-benchmarks/banana/index.ht...
https://wiki.mozilla.org/HTML5_Games/BananaBread
The Half Life "app" above actually just wraps an existing Emscripten port in an IFrame. Puter does provide an abstracted filesystem (and other "OS" features), but I don't think the app above uses that, so it's no different than if you went to `data:text/html,IntralexicalOS!<br><iframe src="https://pixelsuft.github.io/hl/" style="width:50%;height:50%">`.
But actually I think putting together such a simple technical concept that works this well is the impressive part, that hasn't been done before. You can now take any existing web build of any app, and by adding a couple calls to `puter.fs.write()`, deploy it to a familiar virtual workspace where you get multitasking, cloud storage, and interoperation with other apps, for free.
It's mind boggling how far one can torture the concept of markup documents to eventually arrive at something like this... just so users don't have to install software.
https://www.destroyallsoftware.com/talks/the-birth-and-death...
Convenience is the most powerful force in humanity.
A lot of natural fibers need a lot of strength to be spun into finer threads and we didn't really have that on a large scale until the 1800s.
Plus distribution was much harder so in many remote parts were stuck with whatever they made locally, which was most likely subpar even for their times.
Cotton tech in the 1800s really revolutionized clothing.
Efforts like Tim Berners-Lee's Solid seem like a great first step. There's also a variety of Mastodon clients one can run as PWAs, which both is an example but also a bit of a counter-examples: the page can dial anywhere! But then that Fediverse server intermediates & connects you out to the world. RSS readers too; dialing home to connect with the world. Instead we could perhaps have a client that reaches out directly. Then that activity of reading & browsing, keeping track of favorites and what not: that would have to be sent home or otherwise saved.
Using puter.js I was able to add full cloud storage for my design editor https://studio.polotno.com/ without messing up with auth, backend and databases.
Here's my understanding of how it works, based on the puter.js docs [1]:
If I'm developing a frontend app that could benefit from cloud storage, I can load in puter.js as my "backend". I don't need to worry about user auth because puter.js will automatically ask the user to create an account or log in. I also don't need to worry about managing & paying for cloud storage because puter.js will take care of that on a user-by-user basis - including asking the user for payment if they go over their free limits.
I haven't actually used puter.js yet. But if I understand correctly, this could be a really powerful model. As the developer of a niche app whose purpose is not to bring in revenue, puter.js seems like a very reasonable way to pass on cloud storage costs to end users, while also reducing development effort!
I can't speak to Dropbox integration, but every time I've looked at integrating with Google Drive I have felt my development effort growing, not shrinking.
Puter also seems to place a high value on privacy, which I like.
I didn't want to invest my resources into "cloud saving" feature (as it is a free app). Setup full authorization, setup database, setup servers and tons of other work to finish the cycle.
https://docs.puter.com/ gives a very simple, yet powerful client-side js SDK to enable full cloud saving and loading of data for my users. I spent a couple of days for integration. Doing everything by myself with full hosting would take weeks, if not months.
Also I'm confused about how you pay puter for the service. What if a million people suddenly use your app, and sign-up? As the app owner, do you have access to the users who signed up? Can you export those members in case you wanted to import them somewhere else if you moved your app?
If someone could combine Supabase + Postgrest or Hasura with an easy visual admin dashboard for them inside this, this could be a complete easy to access, easy to deploy platform.
jQuery?? I cannot imagine how difficult it is to not break this when you make the slightest change, hats off for managing with vanilla Javascript and jQuery! The best thing about React for me is to not have to worry about breaking the DOM or messing up with event handlers because some jQuery line, somewhere obscure is probably doing something funky that is really difficult to track down!
That and types. The only framework that's useful to JS is a better static type check system (and none of this lets-make-the-whole-damn-runtime-slow to support X feature, looking at you TypeScript).
Because the dom is notoriously hard to work with. The internet is full of blog posts and articles talking about how slow it is as an example, but in reality adding or removing a dom node is swapping a pointers which is extremely fast. What is slow is things like “layout”. When Javascript changes something and hands control back to the browser it invokes its CSS recalc, layout, repaint and finally recomposition algorithms to redraw the screen. The layout algorithm is quite complex and it's synchronous, which makes it stupidly easy to make thing slow.
This is why the virtual dom of react “won”. Not because you can’t fuck up with it, but because it’s much harder to do so.
TypeScript runtime? I don't think the deprecated code that sets up enum objects affects anything else...
But large blobs drawing to `canvas` aren't anything new at this point. The part that impressed me is doing it the simple way, using what the browser already provides, and getting it to work this well.
Working within the confines of HTML is way more impressive to me.
As a reference, here is a browser-adapted version of the https://cuis.st/ Smalltalk environment, which does its own rendering onto a canvas:
https://github.com/nmingotti/The-Cuis-CookBook/wiki/Run-Cuis...
Really nicely done.
I've been using this as a way of quickly putting a UI over an EC2 instance.
Could you advise on how you'd do the equivalent here? Eg., say I want to provide an EC2 machine with various packages installed (python, node,...) -- or, the equivalent docker image -- is there a way of using your UI to provide access to this?
Consider, eg., using an iPad with your UI in a browser. Could you advise a way that this could provide a complete development experience for datasci/seng? (As above, i'm using theia to do this in a quick-and-disposable way).
It would be nice if `~` was mapped to home directory (e.g. `cd ~/Desktop`)
Hard to resize windows. If I want to grab the right edge there is only 1 pixel to work with.
When printing with `cat` from terminal, it would be nice if there was a new line at the end of the text. The prompt shows up on the same line as cat's output.
Copy-paste from clipboard into puter instance.
How do I get python on here?
If a file doesn't have a newline at the end then `cat` will immediately start writing the prompt after the last line; this is the same behavior you'd expect from sh or bash. We might later improve this by having a "no newline"-indicator in the promptline instead.
Same problem exists for all browser shortcuts inside the OS.
besides the fact that now all browsers just display the uninformative "Your unsaved data may be lost" rather than any custom message, this would be a perfect addition.
Great stuff!
I remember I also created a custom Windows NT build for a company I worked for around 1999. They had about 6 different models of Compaq workstation, and a dozen different departments. They had a disk imaging solution, rather than implement automated pxe builds. That's fine, except that nobody in the team had any "craft". Because NT isn't plug and play and each department had different software, we had about 20+ NT images, each with its own personality (ie major flaws, like hard-coded WINS servers, being already joined to a domain, old user profiles, broken software installations, old drivers). The day I joined the team, the phone rang constantly from 8am to closing time. If you walked around the building to do a desk visit, 20 people would shout at you, "hey IT guy, take a look at this PC, will you?". Coming from a hardware support background I had installed MS stuff thousands of times and got my MCSE, but Lotus Notes, Sunguard, Bloomberg and their awful VB6 apps (unpackaged collecting of dlls and instructions) had a short learning curve. After I figured that stuff out I created a single NT build with everything working perfectly. I cleaned up, defragged, ran sysprep. It used NT's hardware profiles to make the build work on any model of desktop (which just required imaging a new model, creating a profile for it and installing all the drivers. Rinse and repeat 6 times). Then I burned the highly compressed NT image along with ghost.exe onto a CD, and handed copies to the other 2 helpdesk guys. Anyone who called IT over the few weeks, regardless of their issue, got a rebuild. Result? Immediate reduction in workload. So we proactively worked through the whole company. Things were so tranquil afterwards, we could go around to department heads asking if there was any "real" IT work that needed to be done.
That one disk, man.
Data recovery... virus removal... diagnostic tools... the works.
I'm partially there with VDI tools like Parsec, but being able to leverage local hardware would also be neat.
I would dearly love to find a use-case for this[0], which with a USB-HDMI might work almost as well
0: https://store.planetcom.co.uk/collections/gemini-pda/product...
My biggest issue with Dex is that it can manage only one large display. So if you have two, they are just being cloned. Otherwise, I like to use it sometimes when I don't want to start my PC.
How does it handle things like privilege escalation and sandboxing?
I'm assuming you mean remote access for a user account like a terminal server as opposed to server management.
Is that the case?
edit: and obviously you can play Doom on it
Alternatively, open the PuterPuter app, which contains itself: https://puter.com/app/puterputer
You're welcome
As someone who is doing something similar (https://gridwhale.com), I'd love to know what your goals were. Did you ever try to commercialize it? If not, why not? If yes, what happened?
Crossy Roads looks like another clone of Frogger, and clones of that game have been done since the 80s.
[0]: https://github.com/MercuryWorkshop/anuraOS [1]: https://copy.sh/v86/
For the first time in like a decade, I added and am using jQuery.
Honestly, I only thought to do after reading about the upcoming version 4.
This way you have the experience of sitting in front of your computer while wearing a VR headset anywhere in the world.
Is there a mobile mode coming?
This would be dope af if I could get a mobile-esque UI on mobile-like devices, or opt into one on tablet-like devices.
In all honesty, this is perfect for people like me (who are rarely away from a keyboard) but less than ideal for people who live a more 21st century computing lifestyle.
If this thing had a mobile mode it would be revolutionary.
As it stands, it's still definitely revolution-friendly :)
Be careful. If they're paying attention (and you just buried the needle on HN, so assume they are,) you're about to make some very powerful people very nervous. There will be offers, I predict. Not all of them wholesome.
But still, really incredible work.
What I mean is:
- there are strong, empirically tested usability reasons why a desktop-style UI is the pits on a mobile device
- generally, the move to mobile devices inclines to a different UI paradigm -- something finger-friendly and un-windowed (think iOS, Android, etc.)
- if there was a way that Puter could look kind of like a phone with some of the de-facto standard UI motifs and paradigms when it's on a phone, you could do cool shit like replace the Android shell with Puter, and have a pure web UI for your phone that runs web apps
- next step would be to add e.g. the ability to run Puter apps when offline, when reception is going in and out, etc. Sort of like Google Apps used to be (in Chrome)
- now you've got a cross-platform one-UI-to-rule-them-all breakout industry moment.
As it stands, Puter is already really cool, but if it turned into something that behaved a bit less like MacOS and a bit more like iOS at narrow resolutions, you'd have something that would make a lot of people very upset (and this is a good thing, they deserve to be upset)
Remember Windows CE? We've been down this road -- a windowing desktop on a phone is... hard to use, actually.
I setup a TrueNAS box for my dad recently and he was yearning for some kind of very light desktop environment for simple maintenance tasks. In hindsight I should have gotten him a Synology device.
Knowing how difficult it is to build something like this, Puter definitely deserves praise.
We use it daily for things like standups, sprint planning, all hands, operations dashboards, product roadmap discussions, dungeons and dragons sessions, watching videos together and more.
That being said I thought initially this would compete with ChromeOS, of the ill-fated Firefox OS; however, all other comments and FAQ are on about other things.
So brilliant, but I don't get it.
But where is this account created? Ah,just got an email that includes a link to puter.com so this created an account on a remote server. So it's not quite as local as advertised.
1. Emulating a desktop with windows so smoothly on both desktop and mobile. This webapp is much snappier than most webapps these days.
2. A storage and file explorer with a friendly API for third party apps. Now any app can use a cloud storage synced across devices where the storage costs are paid by the user.
Can't wait until more apps are available! I see some limitations like VS Code unable to open git repositories which seems a limitation of the storage API (append-only, cannot seek or download partially)? Hope it gets closer to native experience in the future
Seeing the reception of the newly-open-sourced desktop environment, releasing the open-source kernel is going to be a major priority. I'm personally very excited about that, and I'm happy to see that's how other people want to use Puter too.
Also, I ran your hosting example and ended up with a static site at https://quiet-morning-9156.puter.site/. How long will that site be there? I assume not forever?
That's right, logically centralized and physically distributed (on our cloud infrastructure). The open-source kernel will likely include a filesystem driver for local disk instead of cloud storage (which is more convenient for self-hosting) with the option to also use cloud storage provided by puter.com.
Storage limits for puter.com start at 500MB for new users, with the ability to gain 1GB of storage by referring users (you and the user referred each get +1GB).
Static sites will be available until you decide to remove them.
> It can be used to build remote desktop environments or serve as an interface for cloud storage services, remote servers, web hosting platforms, and more.
Seems like it might confuse normal folks though—a desktop in a browser. What do y'all think?
it's true, coding was easy with jQuery ...
What are some common applications for this, though? I can't think of a reason I'd want to access this versus, say, a remote vm?
Or EyeOS?
the back end of it would be a much better option than eletron apps btw. but they were too early to the container age, since the paradigm was syscalls proxies
Thanks for the mention https://www.youtube.com/@DustinBrett
Experimental operating systems seem to be dime a dozen by now, but we almost never see experimental GUIs or entirely new "desktop environments".
Just as how almost every "new" programming language is still stuck with semicolons and other C-isms that were ancient back when the Egyptians were laying down the pyramids, we're still stuck with either imitating the macOS GUI or the Windows GUI, or some weird Frankenstein's bastard of the two.
iOS, Android, consoles, and most recently the Vision Pro have proven that eschewing longstanding conventions can be successful — for example the vast majority of people on this planet don't need or care about scrollbars (or even menubars) anymore.
So why aren't the creators of experimental OSes being more experimental with the frontend? Come on guys, none but the nerds among us will be impressed with how it's made behind the scenes. The first impression that most people will get is that's just Yet Another WinMac-Looklike.
respect.
But why would someone use it?
I made (touched) a bunch of shit* files in ~/Desktop to amuse myself, which I guess is fine.
And then I made a few shit* files in ~, which should also be fine.
But when I try to mv my new shit* to ~/Desktop, it fails.
(ls shit* in ~ also fails.)
“ - Why isn't Puter built with React, Angular, Vue, etc.?
For performance reasons, Puter is built with vanilla JavaScript and jQuery. Additionally, we'd like to avoid complex abstractions and to remain in control of the entire stack, as much as possible.
Also partly inspired by some of our favorite projects that are not built with frameworks: VSCode, Photopea, and OnlyOffice.
- Why jQuery?
Puter interacts directly with the DOM and jQuery provides an elegant yet powerful API to manipulate the DOM, handle events, and much more. It's also fast, mature, and battle-tested.”
OnlyOffice works better than LibreOffice, which is a native app.
Photopea works better than GIMP, which is a native app.
These devs clearly know what they're doing.
React and all the packages you champion were created to foster job security by introducing needless complexity and performance issues.
It would be a better world if we had more Photopeas and less Enriques
This kind of reaction reminds me of people who can’t fathom why anyone would use a database without an ORM. (And meanwhile I’m confused because nearly everything I do with a database would be twice as difficult and ten times slower with an ORM in the way.)
I used to hate ORMs like you. But auto generated types were the killer feature.
That's not the point. The point is that it doesn't use a framework like React, Vue, etc., it instead directly creates and manipulates DOM elements, somewhat like Puter.
Like very nearly all FOSS, they were created to scratch their own developers' personal itches.
> ... and how to actually use them.
Their itches are not the same as everyone else's itches.
But it is 'just' a DE webapp right? From 'internet OS' here (which actually I don't think you use at TFA repo) I expected to be able to boot to it. I guess there is some other solution that would allow that, but not a package deal?
I suppose I'm just saying be careful/manage expectations with 'OS', but for what it actually is it's really cool.
It looks like there are other integrations between the DE/OS and its apps as well, like applications being able to set their window title dynamically (E.G. based on open file/tab), and an API allowing robust support for third-party apps. If you open one of the games like Doom, you'll see that it's usually hosted on a third-party site like DOS.Zone, but according to the query string using a custom build for Puter, which presumably has modifications to integrate with the desktop environment and filesystem. Other apps are hosted on Puter.site, .
So if you treat the browser as the "hardware" (and maybe also the backend services hosting a lot of the apps), maybe you could call it an "OS" in that it abstracts and manages a single environment for multiple other programs to run simultaneously and share information with each other.
I suppose `puter.js` is what passes for its LIBC, or the syscall interface:
To OP: The information on publishing third-party apps doesn't seem very discoverable. The only mention I saw is in the popup that shows the first time you launch Dev Center, and after closing that I can neither find it again nor find anything else about it on Google (other than the linked terms, and the app IFrame source, which I presume is from GoogleBot's temporary account):
No kidding. As far as I've seen, it's the best open paint app on android
It wasn't really an actual OS, but I managed to get a working desktop with a file browser, fake non functional web browser, and a task bar and start menu.
My flash application didn't accomplish anything, but I felt immensely proud of having been able to create a mock up of a UI, even though it was extremely kludgy and wasn't even able to read or write files in the fake applications.
...No offense to the creator though. I don't mean to compare my high school project to this one. This project is indeed very cool!
I too dream of one day inventing my own kind of spreadsheet and terminal hackery OS, so I salute this person for creating a proof of concept that looks good.
> Why isn't Puter built with React, Angular, Vue, etc.?
> For performance reasons, Puter is built with vanilla JavaScript and jQuery. Additionally, we'd like to avoid complex abstractions and to remain in control of the entire stack, as much as possible.
Absolute boss level.
Take it from a guy that regularly posts unpopular truths: people vote based on the way they feel after reading. It has almost nothing to do with the content.
Edit: for example, try posting a personal opinion about a controversial topic and you’ll still have people downvoting to disagree as if it’s possible to tell someone that they are in fact wrong about a statement of what their opinion on a topic is.
It’s a bit sad if you think about what voting like that means, as content is often amplified or suppressed based on votes. Echo chambers seem inevitable
Would that it were so. HN has a down/up pair, which is definitely used to express agreement and disagreement.
IMO, HN would gain a lot by allowing for more flexibility in down votes - eg. being like SO that a downvote is only a quarter of a vote.
The emergence of such front-end projects provides a profound glimpse into the maturation of front-end development and showcasing the incredible possibilities it offers today.
Another really cool project, somehow related, is DaedalOS [2].
Honorable mention, Windows 11 in Svelte [3]
1. https://news.ycombinator.com/item?id=33838179
2. https://news.ycombinator.com/item?id=38830132 & https://news.ycombinator.com/item?id=29779753
I was under the impression jQuery was for the IE5 days where not all browsers provided the same javascript APIs and doing an xmlhttprequest was more clunky than doing a fetch() call these days.
At least for my personal Jekyll based blog, I was able to replace 40-45 lines of jQuery with 50 lines of plain Javascript and was able to get rid of 33kb of jquery dependency.
And 33kb, you can probably gain that by changing your jpeg compresion level from 80 to 79.
I personally think there’s great value in the pattern of reactivity where parts of your DOM update based on bits of data. Developing, designing and testing components like this becomes way simpler.
/s
Pun appreciated.
You couldn't describe what was going on in an equivalent functional construction of a react version unless you first head off on a diatribe about signals/hooks/state-management-disaster-du-jour, the choice of use of which would have implications to both the event handlers in some way - though they likely couldn't be in-place here, they'd have to be passed down from parent context in a giant dance of inversion of control. At runtime the outcome would likely get parsed twice (once for shadow, once for insertion) if not more times under certain compositions. Here the jquery is almost incidental, and could be quickly replaced by something else - for example want to swap out htmx here, well, just add the markers to the DOM, delete the jquery lines and you're done. You'd probably need to spend at least an hour figuring out if you could fit something independent and platform-native into your react code base, hell I've seen people burn weeks on it.
IMHO, Vue is superior for both maintainability and readability than React. Especially because CSS, JS anda HTML are largely in separate blocks of the same file.
React CSS modules feel so unwieldy compared to Vue SFC's inline `scoped` CSS.
Vue's approach to templating using `v-for` and `v-if` means that you won't end up with a big block of logic mixed in with the template (you can still do it, but Vue's nature steers you away from it).
Not that I'm confident Flutter is worth the trade-offs.
It's not.
And the difference between duplicated and mirrored is ...
Note that most of these are aesthetic / non-CRUD.
jQuery is overdue for a comeback.
Fun fact: the Mitsubishi Pajero had to be marketed as Montero in Spanish speaking markets as "pajero" is Spanish for "wanker" [2].
Languages are fun :)
One was named PMS LLC and one had a product that was named xfriend.
Both names are very memorable, but not the best choice.
Xfriend was actually a pretty good software: https://xfriend.soft112.com/
(only description, not for download anymore)