7 ms·
Cbonsai: Grow bonsai trees in your terminal
- zaik 6y agoThis somehow made me feel that I should take up Dwarf Fortress again.
- smoldesu 6y agoMaybe you'd be interested in Rimworld? It's not free, but it does a great job of bringing Dwarf-Fortress into the 21st century, both figuratively and literally. I'm a fan of both games, but the modding community behind Rimworld already challenges the 20 years of Dwarf Fortress content around. Really impressive stuff, and a fun game overall.
- spijdar 6y agoI love rimworld, and have never been able to get into dwarf fortress properly, but I'd characterize DF as way more advanced than rimworld in terms of mechanics and simulation. Rimworld sacrifices a lot of complexity in favor of a simpler UI and a more streamlined game. I haven't modded rimworld to oblivion yet, but I don't think you can e.g. make rimworld 3D in any convincing sense through mods. That said, I recommend rimworld anyway.
- feanaro 6y agoin case you are not aware, Dwarf Fortress is getting an official UX and graphical makeover which will be released on Steam: https://store.steampowered.com/app/975370/Dwarf_Fortress/ https://store.steampowered.com/app/975370/Dwarf_Fortress/
- monkeydust 6y agoI was googling bonsai trees earlier today to add some greenery the my desk. Guess I don't need to bother now, just find a spare screen and fire this up.
- SilverRed 6y agoMost bonsai trees do not like indoors so keep that in mind
- Jtsummers 6y agoGrow lights help. But the one I had survived well until it wasn’t watered during a longer trip with a north facing window in the US south. So it got very little direct light.
- monkeydust 6y agoYea thats what my research also said. So given up on the indoor idea. I live in the UK. Sun is a luxury :-(
- Jtsummers 6y agoFair enough. Like I said, mine was doing well until a house sitter didn't show up to water it while I was gone. It never quite recovered from that. But it did well for the 2 prior years. Now that I have a house with south facing windows I want to get another one but haven't yet, also the cats my wife wanted have a tendency to eat plants so I'll need a cage for the poor tree or it'll be wrecked.
- engineer_22 6y agoThis is great
- amasad 6y agoCool! I set it up on Repl.it. Just hit run to try it: https://repl.it/@amasad/cbonsai https://repl.it/@amasad/cbonsai
- smoldesu 6y agoThis is actually pretty cute, I just wish there was perhaps a "patience" mode that would just be a slower version of the screensaver mode. I'd love to leave this on my second display and let it grow over the course of an hour or a work day.
- viraptor 6y agoDoesn't this option solve it? -t, --time=TIME in live mode, wait TIME secs between steps of growth
- smoldesu 6y agoYep! I just figured out that I would need a combination of flags to get it to work the way I wanted, thank you for the help. Aliasing the whole command has basically given me all the functionality I could ask for.
- cmeacham98 6y agoThere's a --time parameter for the delay between each step. You'd have to figure out roughly how many steps it takes to build a tree though.
- curiouser2 6y agoI'll give you one better, I wrote a plant life simulator that takes place over 4 or 5 days: https://github.com/jifunks/botany https://github.com/jifunks/botany
- jmchuster 6y agoVery interesting. My initial thought was that this should be something that runs in the background and grows very slowly, and then you could check it from time to time by running `cbonsai` from the console, or have it show on your desktop or screen saver. You know, kind of like a real plant, but it grows slightly faster and you have no maintenance.
- feanaro 6y agoThis was my thought as well. I feel like there should be a mode for this.
- knivets 6y agoWe need more stuff like that
- selimthegrim 6y agoHmm, a pruning feature would be in demand methinks (depending on timescale)
- IggleSniggle 6y agoI feel like a pruning feature would be essential to make it really bonsai!
- kettro 6y agoI remember when this was bonsai.sh, a couple years ago. I love having a little tree in my terminal.
- abotsis 6y agoI’m going to port this to Python for use as a progress bar ala tqdm.
- ninjin 6y agoAbsolutely adorable, it goes straight into my “games” category with `bb` and `oneko`. As it only takes a minute, is good practice, and may be helpful for others, here is a quick minimal Nix expression: # vim: set ts=8 sw=2 sts=2 et: # # nix-build --no-out-link -E 'with import <nixpkgs> {}; callPackage ./default.nix {}' { pkgs ? import <nixpkgs> { }, ncurses, pkg-config, stdenv }: stdenv.mkDerivation rec { version = "1.0.0"; pname = "cbonsai"; src = pkgs.fetchFromGitLab { owner = "jallbrit"; repo = pname; rev = "v${version}"; sha256 = "1jc34j627pnyjgs8hjxqaa89j24gyf0rq9w61mkhgg0kria62as7"; }; nativeBuildInputs = [ pkg-config ]; buildInputs = [ ncurses ]; installFlags = [ "PREFIX=$(out)" ]; }
- manveru 6y agoThere you go: https://github.com/NixOS/nixpkgs/pull/115062 https://github.com/NixOS/nixpkgs/pull/115062
- ninjin 6y agoThank you very much, I just did not want to stand as maintainer unless I ended up using it frequently and deeply appreciate that you “stepped up”. =)
- pvaldes 6y agoYep, that was definitely a vimsai. Different pruning technique :qp:
- abalaji 6y agoThis is really neat, would be interesting if someone turned it into a terminal version of a productivity app like Forest. https://apps.apple.com/us/app/forest-stay-focused/id866450515 https://apps.apple.com/us/app/forest-stay-focused/id86645051...
- encryptluks2 6y agoPlease see if you can get a trusted user to add this to the official Arch repos. Not that I won't install and use an AUR, but I'm trying my best to limit the AURs I use these days.
- sevencolors 6y ago> cbonsai is a bunch of if statements homemade algorithm
- ipkarthik 6y agoHi
- atum47 6y agoMan, I haven't heard of ncurses in ages. I wrote my first C game using ncurses. Cool project, thanks for sharing.
- maxmaio 6y agounable to get this running on macOS... anyone else having issues?
- jallbrit 6y agoHey, I'm the creator. Can you share what errors you're getting?
- maxmaio 6y agoHey there, was getting linker errors because panel.pc wasn't in Pkg-config. Turns out installing ncurses with homebrew gives you ncurses v6 which doesn't have .pc files. https://mrcook.uk/how-to-install-go-ncurses-on-mac-osx https://mrcook.uk/how-to-install-go-ncurses-on-mac-osx ^ this guide is really helpful and explains how to fix the issue
- maxmaio 6y agoSuper cool program by the way!
- Honga 6y agoShameless self plug: we also planted a tree in the arctic using a similar method! https://github.com/tmf-code/arctic-tree https://github.com/tmf-code/arctic-tree
- shrx 6y agoWould it be possible to pass a shell command to the message argument so it is executed each time a new tree is starting to grow?
- student2k 6y agoNice one, unfortunately there are so little contemplating games, i would love a dwarf fortress style game running in my background , with almost no gameplay intervention. watching the rise and fall on an empire/colony. There are galimulatore and worldbox, but we need more.
- hannofcart 6y agoNot sure if it fits the bill exactly, but globulation2 comes close to what you describe. Sometimes it feels more of a simulation than a game.
- Cthulhu_ 6y agoKinda reminds me of SimAnt, which if I recall correctly would basically play itself but you could 'help' by throwing down food or digging tunnels for the ants.
- algorias 6y agoYou might be interested in biogenesis, a 0-player game that simulates evolution at microorganism scale.
- Hammershaft 6y agoI love these types of games. Some options: - Paradox games in spectate mode. You begin to see flaws in the model where nations conquer & hold in implausible ways which leads to stagnation, but still an interesting model. - Gridworld on Steam: https://store.steampowered.com/app/396890/Gridworld/ https://store.steampowered.com/app/396890/Gridworld/ - AIbattle on Youtube: https://www.youtube.com/channel/UC6oT1a9Kqfor47HA3_ItCjQ https://www.youtube.com/channel/UC6oT1a9Kqfor47HA3_ItCjQ - Cell Lab on Android: https://cell-lab.net/ https://cell-lab.net/ I would enjoy a passive zero player game like this that then has a game aspect as a meta layer where players compete in betting markets on making the most accurate predictions of the model.
- KarishmaAgarwal 6y ago<a href="https://www.google.com/ https://www.google.com/"> Test </a> [url=https://www.google.com/]Test[/url] https://www.google.com/]Test[/url] https://www.google.com/ https://www.google.com/
- Pawka 6y agoWelcome to Hacker News.
- Haga 6y agoWish these would grow and wither on terminal activity..
- nojvek 6y agoOh this is really neat. Gonna play with it. Making terminal animations is a ton of fun. I built matrix rain since I was a huge fan of the movie. Shameless plug: https://github.com/nojvek/matrix-rain https://github.com/nojvek/matrix-rain
- matthewfelgate 6y agoOh I'm disappointed this doesn't grow over time like a tamagotchi. And you have to water and prune it.
- stiray 6y agoOmg, this not only looks like a bonsai but also as a bash fork bomb :D Who will execute it first? :D
- fuball63 6y agoIf you're on Ubuntu 18.04 trying to build from source, the readme says "sudo apt install ncurses", but I had to do "sudo apt install libncurses-dev". It's a fun little program, I like it a lot.
- jallbrit 6y agoThanks for this, someone reached out and showed me this comment so I fixed the installation instructions.
- cableclasper 6y agoVery neat! For a deeper appreciation, check out "The Algorithmic Beauty of Plants": http://algorithmicbotany.org/papers/#abop http://algorithmicbotany.org/papers/#abop
- nojvek 6y agoMy first CS assignments were based on this book. Using linked lists in C + opengl we made some pretty nice looking trees. If not for this book and assignments, I would probably have switched to another major.
- jallbrit 6y agoHey, I'm the one that built this! Thanks for sharing with this community, and it was nice to read all your kind comments!
- andai 6y agoHello! Thank you for crediting me btw! :) I was very pleased to see this on HN today. My site's down at the moment, but the JS version is now back online on GitHub: https://avelican.github.io/bonsai/ https://avelican.github.io/bonsai/ I will update it to link to your new projects!
- jallbrit 6y agoHey- it's so cool to re-connect after these couple years! I was also pleased to see this... it wasn't even me that posted it! I'll update my README to link to your new URL- thanks for linking to my projects!