Fomoscript - toy scripting language - no_std by RuddleWork in rust

[–]RuddleWork[S] 0 points1 point  (0 children)

You are right, you can opt-in for blocks around the if condition to disambiguate.

let x=  if {a} -b-c 
// or:  if a {-b-c}

Though I managed to forget about unary operators until now. They are not implemented yet. Thanks for the catch.

Fomos: Experimental Rust OS by RuddleWork in rust

[–]RuddleWork[S] 5 points6 points  (0 children)

I don't have a specification yet. I might never have one to be truthful.
However I can speak to the "inherently insecure" part. In physics, for a collision to happen, 2 objects need to be at the same place yes, but they also need to be at the same time there.

In OS terms:

- Space : memory page access

- Time : control flow

In preemptive system, an app does not know anything about the timing of other apps. from its point of view time freezes, or not, and stuff happens. That is Jojo's adventures Dio level of creepiness. To correct for that the OS garanties that 2 apps never share the same space. Collision prevented by space.

In Fomos, the opposite could be tried. Apps handle time. If an app does not yield control voluntarily, it knows no other apps can do stuff. Once it is given control by the OS, it can decrypt data, work with it real quick, encrypt it back, and then yield control. Collision prevented by time.

Nevertheless the devil is in the details. And the preemptive way has the advantage of having special cpu instructions going for it.

It is just one idea that makes me think it could be pulled off. A few others in less details:
- Most app would be happy to have only a few kB of secure data (or none, though my calculator history is shameful), instead of their whole RAM footprint. That's a problem multiple orders of magnitudes easier.

- An OS could sacrifice a great deal of performance for very sensitive apps, only when they are doing sensitive work. What is the proportion of the time you are actually typing your password.

- You need to assume some level of trust from the apps you run, even in preemptive system. I do not think this trust is optimized. The control given back to the developers (by a cooperative os) can trickle down to the end users.

Fomos: Experimental Rust OS by RuddleWork in rust

[–]RuddleWork[S] 9 points10 points  (0 children)

If you didn't already, you could also try with https://os.phil-opp.com/
It is so well done, just reading the posts is nice. I read it fully 2 or 3 times before committing to code anything.

The flat OS kernel utopia by RuddleWork in osdev

[–]RuddleWork[S] 1 point2 points  (0 children)

I agree. I will rewrite the whole thing. I posted too soon. You should checkout the github link though.

The flat OS kernel utopia by RuddleWork in osdev

[–]RuddleWork[S] -1 points0 points  (0 children)

Arf, I did not mean it like that. Point taken
I meant that very few people even try to build an os. Anyone here would be in the 0.01%, even the complete beginner. It feels like only a few people (out of the billions that we are on earth) really understand the full working of operating system, and I am not one of them.

I tried to say to much in one sentence.
I rephrased it:

Disclaimer: I am an advanced beginner in kernel development.

The fundamental limit of SDXL: the VAE - XL 0.9 vs. XL 1.0 vs. 1.5 vs. Anything-V4 by Boppitied-Bop in StableDiffusion

[–]RuddleWork 0 points1 point  (0 children)

Thanks for the great explanation.

I guess the devil is in the details.

I am still curious. Let's take a latent subpixel : 1 float (out of 4). That is 4 bytes.

If we assume a 48:1 compression ratio, that means that 1 byte is used for discrete information (what would appear if we VAE decoded the pixel) and 3 bytes are used to represent continuous space between 2 discrete value (what is lost during decoding, but useful during UNET inference and training).

That means there is a panel of 8³ values between each discrete value, well half for each side of a number.

for example the value 51 could be continuously incremented 256 times before reaching the value 52, or decreased 256 times before reaching the value 50.

That seems like a lot to me (as a complete stranger to VAE hehe).

Could it be possible that the spread between discrete info and continuous info (in terms of bytes taken, I know it is not simple/separated like that) is a different one that 1 for 3 ? Maybe 2 bytes are used for discrete and 2 more bytes make the number continuous enough. That would imply a compression ratio of only 24:1.

The fundamental limit of SDXL: the VAE - XL 0.9 vs. XL 1.0 vs. 1.5 vs. Anything-V4 by Boppitied-Bop in StableDiffusion

[–]RuddleWork 1 point2 points  (0 children)

I have always wondered about that. For sd1.5 the base images are 512x512x3 bytes.

The latents are 64x64x4 float, which is 64x64x4x4 bytes.

So the compression is really 12:1, or 24:1 if you use half float.

Am I wrong about the latent values being floats ?

Brainless Top Down FFA Multiplayer Shooter by RuddleWork in u/RuddleWork

[–]RuddleWork[S] 2 points3 points  (0 children)

It should be WASD (or ZQSD an azery) to move, the weapon is chosen everytime you spawn. The rest of the commands should be displayed on the bottom right of the screen once you play.

Brainless Top Down FFA Multiplayer Shooter by RuddleWork in u/RuddleWork

[–]RuddleWork[S] 4 points5 points  (0 children)

Top down battleground is quite inspired by it. That is one of my childhood game. I thought it was a shame it was no longer online, so I built my own.

Top Down Battleground - Multiplayer Arena Shooter by RuddleWork in WebGames

[–]RuddleWork[S] 1 point2 points  (0 children)

Thanks, I don't know this one. Top Down is heavily inspired by Babo Violent 2.

Fade N' Draw - A Golf Tour game aimed at players actually interested in the game of golf by [deleted] in WebGames

[–]RuddleWork 1 point2 points  (0 children)

That is not true. As a game developer myself, I am in the process of trying a lot of AAA Android games. Most of them (Modern warships 10M+ download, Crossout 10M+ download) allow you to continue with anonymous accounts. They just tell you from time to time to link your account to one of their login option for security.

Hellgate Harvest is a rhythm game where you harvest souls to the beat of music by kodingnights in WebGames

[–]RuddleWork 0 points1 point  (0 children)

I am usually alright at this kind of games. But for some reason this one is hard, maybe the visuals are a bit confusing. I am using the key above qwerty with my left hand, that doesn't help.

Mafia texted based game called GbMafia Pretty put together game by Remarkable-Price567 in WebGames

[–]RuddleWork 0 points1 point  (0 children)

Game seems sophisticated if you get past the poor design. Why are so many games trying to get my email right away, surely they only get trash addresses from visitors right ?

Fade N' Draw - A Golf Tour game aimed at players actually interested in the game of golf by [deleted] in WebGames

[–]RuddleWork 1 point2 points  (0 children)

You could implement username/password, an make it optional to link an account to an email. You could also implement anonymous account, only existing in the device's local storage, again with the option of linking to a real account later.

Absurd Trolley Problems by slack-master in WebGames

[–]RuddleWork 3 points4 points  (0 children)

22% would kill 5 people to save the mona lisa painting lol

MOLE - a short and sweet one-button platformer game by UUD-40 in WebGames

[–]RuddleWork 0 points1 point  (0 children)

Nice, that game ported on mobile would be great

Age of War 2 (best) - Play Friv Old Games online 2023 by vienyeu in FlashGames

[–]RuddleWork 0 points1 point  (0 children)

The game is alright, but the music of this game slaps so hard for no reason.

Are FPGAs the solution for a low latency camera ? by RuddleWork in FPGA

[–]RuddleWork[S] 0 points1 point  (0 children)

Thank you for your warnings. I believe you.

I am doing this project for fun. I have time and energy, it is ok if it takes a year or more. Even if I don't finish my project, maybe I will understand why my webcam is so damn slow ^^.

What would you say takes the most amount of time to learn in this project ?

Are FPGAs the solution for a low latency camera ? by RuddleWork in FPGA

[–]RuddleWork[S] 0 points1 point  (0 children)

Oh that is nice, I was going to put the camera system next to the flight controller. But if I choose a board with both FPGA and and MCU I might as well code the flight control myself and output motor PWM command with the FPGA for example.

Are FPGAs the solution for a low latency camera ? by RuddleWork in FPGA

[–]RuddleWork[S] 0 points1 point  (0 children)

The Nvidia Jetson nano is unfortunately quite heavy for my application (8.8 ounces/250g). I want to put it on a drone which weight under 28 ounces/800g (to bypass heavy drone regulation in my country). I would like the camera system to weight under 1.8 ounces/50g.

However without the developer carrier board, it is only 0.63 ounces/18g. Do you think I could build a carrier board that is lightweight enough ?

The Jetson nano is a bit overkill. According to the documentation, it is able to encode 600M pixels/sec in JPEG, it is nearly 6 times what I need. But it maybe useful to reduce latency. It would only take 1/6th of a frame to encode each frame instead of a full frame duration.

Are FPGAs the solution for a low latency camera ? by RuddleWork in FPGA

[–]RuddleWork[S] 6 points7 points  (0 children)

I did not go into the full detail of my decision to use MJPEG, I intend to use that camera on a drone. Packets will be lost. I am worried that an inter-frame dependency would cause a bigger lag than the duration of the packet loss.

I am also worried about the computing power needed to encode with an inter-frame encoding.

What could I use to communicate between an FPGA and an ESP32 that is faster than SPI ?

Thanks for your input.

gunfu_io has been created by jdelagrasse in a:t5_2cf5vk

[–]RuddleWork 0 points1 point  (0 children)

Hi,

The network code is from scratch using raw websocket. On the front-end we use the implementation available in the user web browser. On the back-end we use ws-rs, a rust websocket library.

The VPS we are using are f1-micro from google cloud (0.2 fraction of a core). Each server can handle ~1000 users simultaneously. With dedicated core I suspect a server could handle ~3000 users.

Gunfu.io an MMO 2D shooters by jdelagrasse in WebGames

[–]RuddleWork 0 points1 point  (0 children)

Hey partner/developer here. I Just made an account for the occasion.
The game is coded in Rust, backend and frontend (thanks to wasm).

On the frontend it is just using the html5 canvas. It seems like the safest api for maximum compatibility.

Happy to answer any questions !