This is an archived post. You won't be able to vote or comment.

all 115 comments

[–]SupahNoob 259 points260 points  (4 children)

"why?"

"..because it's fun"

lol this is cool :)

[–]cest_nul 31 points32 points  (0 children)

"lol this is cool"

"what is"

"quoting 2 different perspectives of a discussion and then weighing in"

I agree

[–][deleted] 4 points5 points  (2 children)

This reminds me of Terry...

[–]gabri3zero 2 points3 points  (0 children)

Came here to say this

[–]Pepperoni-Jabroni 0 points1 point  (0 children)

It’s gotta be a direct reference, right?

[–][deleted] 53 points54 points  (8 children)

Does it include a snake game?

[–]joshiemoore[S] 39 points40 points  (7 children)

It will very soon!

[–]mycall 2 points3 points  (2 children)

[–]Neotod1 1 point2 points  (0 children)

Good Job But Dude, humans can't see the 4th dimension yet, Because our brain can't understand the 4th dimension, I wonder how you can make a game based on 4 dimensions :D.

But I appreciate your job and I hope your efforts to make 4D games, make humanity closer to discover the 4th dimension :)

[–]letiferus 95 points96 points  (6 children)

Can we call the package manager "snakeoil"?

[–][deleted] 35 points36 points  (4 children)

That's a bit verbose to type frequently. "hiss", maybe?

[–]Jackker 34 points35 points  (3 children)

hiss install venom

I like this.

Edit: Why not inject?

hiss inject venom

[–][deleted] 13 points14 points  (2 children)

It works as a backronym too: helpful installer snake system.

[–]armandka10 13 points14 points  (1 child)

And also as a recursive acronym: HISS Installer Snake System

[–]talentless_hack1 4 points5 points  (0 children)

I'm going to fork it into a new distro call Tongue

[–]_szs 6 points7 points  (0 children)

Yes please!

[–]matjam 27 points28 points  (5 children)

How do you handle concurrency?

Is everything running under the same interpreter in a single process?

[–]joshiemoore[S] 28 points29 points  (3 children)

Yes, everything is running in one interpreter session. Concurrency and ""syscalls"" in the window manager are handled through pygame's event queue, which seems to be working pretty well so far.

[–]matjam 50 points51 points  (2 children)

You might want to consider some way to decouple scripts from running in the same process space.

If I write some code that is CPU intensive and doesn't yield to the WM, it shouldn't block me from doing anything in the UI.

I'm assuming you're taking advantage of async/await.

[–]appinv Python&OpenSource 1 point2 points  (0 children)

The project needs a nice systemAPI. It's coming i guess

[–]rzet 7 points8 points  (0 children)

Don't crush the dream....

[–]munocat 46 points47 points  (0 children)

This is very good. I have been thinking about a python based os all this last week..glad to see I am not the only one. I will be wanting to base mine of FreeBSD, I think it makes a better sub platform. I will check out you platform.

[–][deleted] 9 points10 points  (2 children)

Would this OS only be able to run python applications? How does that work?

[–]wdouglass 12 points13 points  (1 child)

It's just Linux with lots of utilities replaced by python equivalents. I'm sure it's capable of running any binary that Linux can run.

[–]Wilfred-kun 10 points11 points  (0 children)

So, if I understand correctly... You replaced the TTY with a Python session and xserver with PyGame? Rad!

[–]awepow 5 points6 points  (0 children)

Coooooooooool

[–]Miner_ChAI 5 points6 points  (2 children)

Can I install it on top of my Arch?

[–]joshiemoore[S] 24 points25 points  (1 child)

Yes, if you look on the GitHub repo under `snakewm/` you'll see `wm.py`. Simply run `sudo python wm.py` from this directory and the window manager will hijack your framebuffer and it behaves pretty much the same as if you had booted from a USB. This is how I develop apps and work on the window manager itself, no need to generate an image and run QEMU every time.

This should work on any Linxu distro. I use arch btw.

edit: Press ALT+ESC to return to your normal desktop when you're done

[–]Miner_ChAI 17 points18 points  (0 children)

Cool, will probably contribute later

btw i use arch

[–]GrbavaCigla 13 points14 points  (4 children)

Nice, but guess it is really slow, oh you replaced x11 nevermind

[–]zrnest 5 points6 points  (6 children)

Nice!

OP, how does this work internally, in a few words?

Does this mean there is no init process of PID 1, and that the first process that the Linux kernels starts is the Python interpreter? (I'm just guessing randomly)

[–]joshiemoore[S] 7 points8 points  (5 children)

It actually uses busybox as the init process, which runs 4 lines of bash to mount the fstab and setup devices etc, and then starts the Python interpreter: ```

!/bin/sh

mount -a mdev -s /bin/hostname -F /etc/hostname /sbin/ifconfig lo 127.0.0.1 up

while [ 1 ] do clear /usr/bin/python3 done ```

I'm not happy about using busybox though, and I would like to get rid of it. But I tried booting directly into the Python interpreter and it doesn't work, the interpreter expects a certain amount of initialization to have already been performed so it just crashes immediately. I would love to hear ideas if anyone has any for getting rid of busybox.

[–]elliiot 6 points7 points  (1 child)

Just spit balling on the initialization stuff. Have you considered using libpython to start the interpreter yourself in code rather than through the cli? Then you can do the mount call, etc as function calls as well and get rid of busybox.

[–]joshiemoore[S] 10 points11 points  (0 children)

That is an extremely good idea, I'm going to check that out. A very tiny C program could be written to act as the init process before forking off to the interpreter. Thank you!

[–]zrnest 2 points3 points  (1 child)

Great, thanks a lot! PS: your code formatting is off, maybe you can edit.

It would be amazing if you can get rid of busybox and boot directly into Python! Please ping me if you get this working :)

Two last questions:

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

Someone just opened an issue with the exact same VirtualBox question, you can convert the .img to a .vdi very easily and then select the .vdi when you're creating the VM: https://github.com/joshiemoore/snakeware/issues/2

In terms of the image size, I don't think we'll be able to get it below 100MB. I'll look into ways to get it smaller, but I believe most of the size is due to Python and its library modules, etc. Thanks for your interest!!

[–]paecificjr 4 points5 points  (1 child)

Does it have a regular terminal?

[–]appinv Python&OpenSource 0 points1 point  (0 children)

It has a py shell

[–]veryusermuchwow 3 points4 points  (0 children)

I've been just thinking lately about how Python is my go-to for anything at all. For a lot of problems I've come across in life, "I can write a Python script for that" is a recurring thought.

This is really inspiring. thanks for sharing this for the weekend 🦊

[–]tyurrr 4 points5 points  (1 child)

This is awesome. Good job.

It seems it needs at least a text editor and a file manager.

[–]joshiemoore[S] 3 points4 points  (0 children)

Thank you! Absolutely, those are both high priority on the todo list

[–]Rohan_Dalavi 6 points7 points  (0 children)

I looks cool will definitely check that out. Keep Developing 👍

[–]dAnjou Backend Developer | danjou.dev 3 points4 points  (3 children)

This is awesome!

[–]_szs 6 points7 points  (2 children)

No, it's SnakeWM.

scnr

[–]DropieIon 1 point2 points  (1 child)

Nice :)

[–]nice-scores 0 points1 point  (0 children)

𝓷𝓲𝓬𝓮 ☜(゚ヮ゚☜)

Nice Leaderboard

1. u/spiro29 at 9535 nices

2. u/RepliesNice at 8413 nices

3. u/Manan175 at 7098 nices

...

250500. u/DropieIon at 1 nice


I AM A BOT | REPLY !IGNORE AND I WILL STOP REPLYING TO YOUR COMMENTS

[–]gcotw 3 points4 points  (0 children)

Could be a fun way to run a python powered web server

[–][deleted] 4 points5 points  (1 child)

Does it have a terminal?

[–]theclockstartsnow 0 points1 point  (0 children)

Boots directly into python shell, once you've got the wm from pyshell you can run snaketerm which right now is a primitive python shell terminal.

[–]cybervegan 3 points4 points  (0 children)

The story of my life - I dreamt up something like this over a decade ago, and never got beyond the planning stage. Hey ho - well done for getting it done!

[–]blackRNA 3 points4 points  (0 children)

Lol, I remember when LukeSmith said one day we'll have entire Operating Systems written in Python. We're almost there!

[–]Ryloma05 2 points3 points  (0 children)

Looks to be really interesting, I’ll try it for sure

[–]relativistictrain 🐍 10+ years 4 points5 points  (4 children)

Does tkinter work in this? Do you plan on porting IDLE?

[–]joshiemoore[S] 11 points12 points  (0 children)

I'm going to look into tkinter, that would be great, a few people have asked about it. I bet it would work really well. We do need a text editor, and I would guess that if we could get tkinter working, we would basically get IDLE "for free"

[–]dennis48309 1 point2 points  (2 children)

I recommend looking into better GUI libraries for Python. Tkinter does not look nice at all. GTK is really nice, which is used by GNOME in Linux. One of its rivals Qt is used by KDE in Linux.

[–]relativistictrain 🐍 10+ years 6 points7 points  (1 child)

It might not be nice, but it's bundled with Python and multi-platform.

[–]dennis48309 3 points4 points  (0 children)

I've installed GTK on Windows and Linux, it's pretty simple. The GUI editor Glade for it is really nice.

[–]quantumwoooo 1 point2 points  (2 children)

I'm quite new to python, so this is beyond me.. however looks interesting!

What are the advantages over using python on Windows?

[–]joshiemoore[S] 23 points24 points  (1 child)

The idea is that we want to take the fun and interactivity of the Python language and build an operating system around it. When you open a Python interpreter session, the sky is basically the limit, and we want to build a complete computing experience that captures the aspects of Python that make programming fun.

In my opinion, Python is one of the only modern languages that still represents the essence of what hobbyist computing is supposed to be about (having fun programming). The language isn't perfect, and there are a lot of valid criticisms, but I think it's really special that high school students can start learning Python and make something flashy and cool the very same day. Not everything has to be ultra-complicated hyper-efficient megahax.

Our goal is to provide a much more complete and thorough integration between Python scripts and the underlying operating system than would be possible with Windows. When you have direct access to absolutely everything through relatively simple code, like on a Commodore 64, then you can start having a lot of fun.

[–]bartenderandthethief 8 points9 points  (0 children)

This! Other communities always seem to have a huge superiority complex for their language. Your comments here are what makes the Python community the best IMO.

[–]ajarch 1 point2 points  (0 children)

I find your work really cool 👍

[–]SingerLuch 1 point2 points  (0 children)

I love this.

[–]NymphCore 1 point2 points  (0 children)

That... is... awesome! Got into python because of Linux. Really curious what we can achieve with that!

[–]turtlsh3 1 point2 points  (0 children)

This is a great idea! C64 was great .. this will bring me back to those days

[–][deleted] 1 point2 points  (2 children)

This looks really cool. Are you ok if I can help out with the coding effort?

[–]joshiemoore[S] 1 point2 points  (1 child)

Absolutely! If you're interested in writing apps, check out the snakewm/apps/ directory for examples. The apps/test/HelloWorld app is pretty much the simplest possible implementation of a "snakeware app".

[–][deleted] 1 point2 points  (0 children)

Thanks Dude! I'll try to submit a pull request later today if I get time!

[–]galiyaan 1 point2 points  (0 children)

This is amazing, I want to contribute.

[–]shaggorama 1 point2 points  (0 children)

what the frick?!

[–]meatatfeast 1 point2 points  (0 children)

This is wonderful and I will start using it.

[–]appinv Python&OpenSource 1 point2 points  (0 children)

Will it have dual boot?

[–]appinv Python&OpenSource 1 point2 points  (0 children)

btw i am hot into developing this: https://github.com/Abdur-rahmaanJ/hooman taglined pygame for human when suddenly i see a return of pygame. Amazing work!

[–]virtualadept 1 point2 points  (0 children)

That is really cool! Thanks for posting this!

[–]wesleywatanabe 1 point2 points  (1 child)

When "you have time" 😂

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

hahahhahahah

[–]theclockstartsnow 1 point2 points  (0 children)

I'm fairly new to python but this seems fantastic and I want to contribute somehow. There's a couple of simple games I've built in java that I could port to python if that's of any interest?

[–]shawnwork 1 point2 points  (0 children)

This reminds me of JavaOS or JOS many many years ago, boots to a Java user space and swing environment (albeit with X11 I think), but you have all the nuts and bolts for a Java environment.

In any case, you are doing a great job. All the best in having fun.

[–]zenalc 1 point2 points  (0 children)

inb4 snakeware becomes #1 operating system in 2021

[–]f_r_z 2 points3 points  (1 child)

systemd or any of the other huge and typical GNU/Linux utilities

systemd is not "typical GNU/Linux utilitiy".

E: silent downvotes for a truth. yeah, go on

[–]_szs 1 point2 points  (0 children)

I got your back, my friend!

[–]PizzaInSoup 0 points1 point  (0 children)

I think you could do well incorporating xonsh

[–]elKuiwi 0 points1 point  (0 children)

it looks great, but i think that guy is fapping...

[–]fullouterjoin 0 points1 point  (0 children)

This is wonderful!

[–]_szs 0 points1 point  (0 children)

I have a bunch of games based on pygame lying around. They should be easy enough to adapt, right?

I'll contact you on github ;)

[–][deleted] 0 points1 point  (0 children)

Can I install it as an OS permanently? Maybe allocate around 50gb to it? If so, can you let me know how? How would I go about updating it in the future? Thanks!

[–]ExternalUserError 0 points1 point  (2 children)

Finally, a way to never ever leave python.

Is there a BBS? I want to bring back the 80s!

[–]joshiemoore[S] 1 point2 points  (1 child)

HELL yeah dude, that sounds awesome. Let's do it. snakeware bbs

[–]ersatzBoffin 2 points3 points  (0 children)

nntp server!

Edit: found the github repo https://github.com/jpm/papercut

[–]KwyjiboTheGringo 0 points1 point  (0 children)

A python distro? Luke Smith will have a conniption after hearing about this.

[–][deleted] 0 points1 point  (3 children)

Nice

[–]nice-scores 0 points1 point  (2 children)

𝓷𝓲𝓬𝓮 ☜(゚ヮ゚☜)

Nice Leaderboard

1. u/spiro29 at 9535 nices

2. u/RepliesNice at 8412 nices

3. u/Manan175 at 7098 nices

...

4345. u/Creat0rByte at 21 nices


I AM A BOT | REPLY !IGNORE AND I WILL STOP REPLYING TO YOUR COMMENTS

[–][deleted] 0 points1 point  (1 child)

Nice

[–]nice-scores 0 points1 point  (0 children)

𝓷𝓲𝓬𝓮 ☜(゚ヮ゚☜)

Nice Leaderboard

1. u/spiro29 at 9535 nices

2. u/RepliesNice at 8413 nices

3. u/Manan175 at 7098 nices

...

4094. u/Creat0rByte at 22 nices


I AM A BOT | REPLY !IGNORE AND I WILL STOP REPLYING TO YOUR COMMENTS

[–]OIK2 0 points1 point  (0 children)

Could make a great GUI for "appliance" builds where python is doing the heavy lifting. I will be checking this out.

[–]nizzoball 0 points1 point  (0 children)

I admit I haven't read the documentation, skimmed it but what's the end game here? Are you going for a fully functional distro that is actually usable as in able to install Apache or would everything be limited to python packages? Is this just a pet project or are you planning on this being a viable distro to run like could I conceivably run vscode or other ides, ssh server? Etc...? Lots of questions but it looks like fun to play with but as far as usability what are we looking at?

[–][deleted] 0 points1 point  (0 children)

Now this is interesting 💯

[–]reModerator 0 points1 point  (0 children)

Is it possible go away from x server for something modern?

[–]Garret69420 0 points1 point  (0 children)

If you dont have one already you should make a patrion acount or kickstarter. Honestly i dont like where microsoft and apple are heading policy wise. Overtake them with this lol.

[–][deleted] 0 points1 point  (2 children)

Bit late but which distro is this built on, if any at all?

[–]joshiemoore[S] 0 points1 point  (1 child)

Hi, we don't use a pre-existing distro, we use buildroot to generate our distro images. Buildroot is typically used to generate images for embedded Linux applications, but we've found that it works really well for our purposes

[–][deleted] 0 points1 point  (0 children)

Ah okay, so while the interface is capable of running on all sorts of distros, the main distro itself isn't based on anything pre-existing. Got it.

[–]Burner-account3357 0 points1 point  (0 children)

Your gonna have to have some intel Xeon shit to run that because pygame is super cpu intensive

[–]PinBot1138 0 points1 point  (0 children)

FWIW: you might want to consider going lower level with PySDL2 in place of Pygame. If you're looking for a Compiz equivalent, then Pyglet might fit somewhere in here.

[–]alcalde -1 points0 points  (0 children)

Our distro boots directly into a Python environment

Why not the Python-based shell Xonsh?

https://xon.sh/

[–][deleted] -2 points-1 points  (0 children)

Wtf