Live data from Hacker News

Design and Implementation of Sprites

fly.io

31–40 of 111 posts

Re: Design and Implementation of Sprites

#32
post #13

Tried it. Docker wasn't preinstalled so asked Claude to do it and make sure it's running (supervisord or the likes isn't preinstalled). It neatly did so and "registered" it as a sprite service. Then I exited my session, waiting for the sprite to go idle, but I don't think it ever does.. Still have it active. Don't know how to idle it. Can't tell for sure if this means I'm losing credits as there is no billing usage s…

Just use container-os as your runtime image: https://hub.docker.com/r/miget/container-os and you should be good

Could you explain more about how this helps and how one might use a different runtime image on Sprites?

Re: Design and Implementation of Sprites

#33
post #26
post #19

Earlier quoted context omitted.

What's a sprite?

A graphical object composited just in time in display scanning process. (Or in other words, a graphical object on screen that is not present in a framebuffer of any kind.)

There was a time before 8bit video games.

https://www.merriam-webster.com/dictionary/sprite

I personally associate the term Shakespeare's The Tempest: https://en.wikipedia.org/wiki/Ariel_(The_Tempest)

Re: Design and Implementation of Sprites

#34
post #26
post #19

Earlier quoted context omitted.

What's a sprite?

A graphical object composited just in time in display scanning process. (Or in other words, a graphical object on screen that is not present in a framebuffer of any kind.)

This is immediately what popped into my head, and I clicked the link thinking it was going to be some old-school game dev content.

Re: Design and Implementation of Sprites

#36
post #29
post #25

Earlier quoted context omitted.

There's no way to stop sprites from the CLI. Supposedly they auto-stop when inactive. But I've tried multiple times and they don't stop, and it's not just Docker that prevents them from stopping. I created a new sprite and installed ffmpeg. Then exited. Next day I run `sprite ls` and it's been running continuously for 23 hours. No way to tell if I'm being billed for it or not. And the per-hour pricing is extremely ex…

Sprites are active when: * They're servicing an incoming HTTP request. * You're interacting with a console. They're hair-trigger inactive otherwise. They don't bill CPU unless they're active. The idea is that there isn't really any uncertainty about when it's running; when you stop interacting with it it stops metering. This is a new shape for a cloud computing thingy and there'll be snags this week with it, but we d…

No console activity, no HTTP requests, but it doesn't stop.

Can't find any place in CLI or web UI to see how many minutes are charged for CPU, memory, storage.

    $ sprite ls
    Sprites in organization :

    ┌────┬───────┬────────┐
    │NAME│STATUS │CREATED │
    ├────┼───────┼────────┤
    │duh │running│ 23h ago│
    └────┴───────┴────────┘

    Total: 1 sprite(s)

Re: Design and Implementation of Sprites

#37

Is there a way to copy files to/from the sprite? Couldn't see an option for that in the CLI

There's an FS API that shipped yesterday:

    /fs/read?path=X   | GET           | Read file (supports Range headers)           
    /fs/write?path=X  | PUT           | Write file (body = raw bytes)                
    /fs/list?path=X   | GET           | List directory 
    /fs/delete?path=X | DELETE/POST   | Delete files/dirs                            
    /fs/rename        | POST          | Rename/move                                  
    /fs/copy          | POST          | Copy files/dirs                              
    /fs/chmod         | POST          | Change permissions                           
    /fs/chown         | POST          | Change ownership                             
    /fs/watch         | GET (WebSock) | Watch for filesystem changes                 
It'll get CLI support very soon.

But I've just been using magic-wormhole for this.

Re: Design and Implementation of Sprites

#38
To me, this sounds more monolithic than containers. I think I'd like something less monolithic. However, those who like monorepos might be more quick to develop an interest in this. I could of course use containers within the MicroVM, which is what I really want anyways, because I want lighter weight containers than MicroVMs for sandboxes.

While looking into giving fly another shot as a cloud provider even though I think it's still pretty much a commodity for me, I found an issue in Google: I searched for "fly.io sao paolo" and the title of the first result on fly.io is "Regiones · Fly Docs", translated from english to Spanish. While I find the translation in titles on Google annoying, I haven't often seen the characters messed up like this. I reproduced this in Incognito at this URL: https://www.google.com/search?hl=es&q=fly.io%20sao%20paolo

Re: Design and Implementation of Sprites

#39
post #25

Earlier quoted context omitted.

There's no way to stop sprites from the CLI. Supposedly they auto-stop when inactive. But I've tried multiple times and they don't stop, and it's not just Docker that prevents them from stopping. I created a new sprite and installed ffmpeg. Then exited. Next day I run `sprite ls` and it's been running continuously for 23 hours. No way to tell if I'm being billed for it or not. And the per-hour pricing is extremely ex…

Yeah. My sprites never idled inspite of having nothing running in them and had to be destroyed. Ideally there should be two settings 1. A timeout after the last console session is exited 2. Force idle using the CLI

Just tried it again. Creation took a very long time, then errored.

    $ sprite version
    sprite version v0.0.1-rc30

    $ sprite create quk

     Error creating sprite: failed to create sprite: Post "https://api.sprites.dev/v1/sprites": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

But despite the error, the sprite was apparently created, and it runs continuously.

    $ sprite ls
    Sprites in organization :

    ┌────┬───────┬────────┐
    │NAME│STATUS │CREATED │
    ├────┼───────┼────────┤
    │quk │running│14m ago │
    └────┴───────┴────────┘

    Total: 1 sprite(s)

Re: Design and Implementation of Sprites

#40
post #16

The sprite is a pretty outdated thing these days, but is the term sufficiently unused to make it free for reuse?

It’s not even really outdated or unused. Just about everyone who makes 2D games still uses the term “sprite” all the time. The meaning has become slightly less specific, but otherwise is really the same.
Post reply on HN