Hacker News new | past | comments | ask | show | jobs | submit login
Vim rendered on a cube for no reason (github.com/oakes)
480 points by ohjeez on March 31, 2020 | hide | past | favorite | 113 comments



"I think that it’s extraordinarily important that we in computer science keep fun in computing. When it started out it was an awful lot of fun. Of course the paying customers got shafted every now and then and after a while we began to take their complaints seriously. We began to feel as if we really were responsible for the successful error-free perfect use of these machines. I don’t think we are. I think we’re responsible for stretching them setting them off in new directions and keeping fun in the house."

- Alan J. Perlis


"How dare you insinuate that my latest amateur radio transceiver firmware is capable of loading a working copy of Contra for the NES!"

-People who give me hope

https://www.youtube.com/watch?v=VBE-BQNaCh4


I've been trying to change my MacBook startup chime to the Contra intro sound for quite a while now...


Dang didn't know I wanted this. Would be real cool to get the SEGA startup from the Megadrive.


I believe the MacBook startup chime is in ROM, somehow, or at least it used to be.


That’s awesome, though I’m a bit disappointed it wasn’t Metal Gear!



Feynman wrote that his Nobel prize came from his determination to have fun while computing.

To quote, he makes the following observation:

“Physics disgusts me a little bit now, but I used to enjoy doing physics. Why did I enjoy it? I used to play with it. I used to do whatever I felt like doing–it didn’t have to do with whether it was important for the development of nuclear physics, but whether it was interesting and amusing for me to play with...

I’m going to play with physics, whenever I want to, without worrying about any importance whatsoever.”

He started looking to have fun with physics, and claims the breakthroughs came from that.


When I founded my previous start-up, I used to describe my job as "professional creative play". I got some serious anger from a few employees about that description. So I stopped saying that's what I do, but it's exactly what I do.


As the founder of the company you serieus anger from YOUR employees?

Huh?


It's a compelling quote but I think the seriousness came when bugs in software started to cause major mayhem in the real world. Yes please keep fun in computing, but keep the fun where fun belongs.


Like most things in life, I believe the answer involves finding balance between the two :)


I think this Perlis comment is not really related to the subject, which is clearly a bit of fun and good on it for being so, but the bit about Perlis feeling not responsible for "successful error-free perfect use of these machines" badly puts my back up. I'd say over my career I've lost literally years to shitty software and its twin, shitty documentation.

To the extent that you are responsible for the errors in these you are very responsible, else you're wasting amounts of human capacity (and generating it's twin, unhappiness) proportional to the size of your user base, and that can be absolutely huge.

Or could be I'm taking his quote just a bit too seriously.


Ha! I would agree that you might be taking it a bit too seriously. I was trying to make the point that sometimes things that might seem purposeless are useful simply because they are fun, scratch an itch, and might lead to a new way of looking at something. That exploratory process might be worth it in certain projects even if it introduces more bugs accidentally. I should have elaborated more rather than just leaving a quote. After all, quotation in absence of analysis contributes very little novelty.


The quote says "we in computer science". I'm not sure I've been impacted by computer scientists in that way. Although, I don't think of any random person with a CS degree as being "in computer science".


From the Q&A:

  How do i stop the cube from spinning

  no


Really, the whole FAQ is gold.


Make sure to sure to check the issues as well.


It was a wonderful chaser to https://xkcd.com/2287/ , which I encountered minutes before.

Humans are good.


I suspect that cartoon implies a deep and chilling insight. COVID-19, or HIV, people notice. But does that mean we notice everything? The greatest vulnerability of pathogens is our brains, so wouldn't that mean strong evolutionary pressure to mess with our brains in such a way that we don't notice we're ill? How much of human social evolution is driven by that?



I don't think the molecular tools available to wildlife are sophisticated enough to achieve what you are describing (i.e. messing with higher-ish cognitive functions). This would be like modifying our proprioception but ALSO the perception of others ?


I'm just worried that a T4 bacteriophage (a virus that infects bacteria) is talking about infecting humans...


Ctrl-X Ctrl-C


millions of other devs: "how do i exit vim"?


I've been using vim for years...because I can't figure out how to close it.


Esc : q


The issues are great, but especially https://github.com/oakes/vim_cubed/issues/1


Oh man - that is the best first post. The issues are fantastic.


This is awesome. The best kind of programming: doing something for the fun of it.

Also, what is Nim? How popular is it? What popular products is it used in?

Would it be a useful language for a python developer to learn? I have a friend who is a python dev and he has lamented that he’d like to learn something else. Should I recommend nim? Is it good for numerical analysis?


Nim is a relatively small programming language that uses a Pythonic style of syntax. It adds some features that make it better suited to systems development, like type safety and better performance. It can be compiled using a few backends, to eg C or JavaScript.

Nim recently hit 1.0 and has grown a lot of the years, but it still isn't particularly common to see in industry. You can see some Nim related projects on GitHub: https://github.com/topics/nim

I used it to write a few things/just play around with in the pre-1.0 days, and found it quite nice to write and easy to read.

Regarding your question about numerical analysis and Python, this post touches on using Nim for tasks that you might reach for numpy for: http://rnduja.github.io/2015/10/21/scientific-nim/

This one has a brief comparison of Nim and Python + numpy: https://narimiran.github.io/2018/05/10/python-numpy-nim.html

Note that both are for pre-1.0 Nim.

Nim's site: https://nim-lang.org/


Nim is not a “small language”; it’s huge in scope, both domain and range. It is well thought out, so that you don’t need to be aware of all of it to be effective, though.

It’s community is comparatively small, but it is incredibly helpful, smart and capable.


> isn't particularly common to see in industry

You're completely right, but I can say I've introduced it for writing custom developer tooling across three companies, including one very large rather well known one in the travel space (though that was pre 1.0)!


What was your experience like using Nim for those projects?


Wonderful; though I've been using it for quite literally years at this point. It's pretty rapid compile times, coupled with easy-as-anything C integration meant writing performant CLI tools or daemons with it was a breeze.

The nicest part of Nim I feel is that it was super easy for non-Nim programmers to pick up and understand. The team would regularly contribute to the tooling despite not using it anywhere near as extensively as myself, which I think speaks volumes to it's ease-of-use


How does it compare with Go and Rust?


I haven't written any Go, and only a little Rust, but it competes with both of them in a way.

It's safe and GC'd by default, but you can trivially swap GC or you can run entirely without GC and do everything manually. It's idiomatic to use managed references but you can do unsafe pointers if you want. Interoperability with C is easy but not seamless like with for instance Zig.

Compile times are excellent compared to Rust, as are binary sizes, making static binaries is trivial (which is harder in Go from what I understand).

I find the syntax easier/better than Rust with fewer special characters, but compared to Go I think the syntax is a wash.

It requires very little boiler plate, and let's you do things that cut down on code size like using `var` or `let` statements in blocks:

    var
      intVal: int
      strVal: string

I like the distinction of var vs. let over Rust's let mut/let as well.

The two major weaknesses at this point are package availability and documentation. There's a package for everything in Go and Rust land, and there's lots of documentation for everything. There's quite a handy standard library in Nim and most of what you typically need in the Nimble package manager, but sometimes you'll run into the situation of having to roll your own X.


It's a pleasure to use compared to Go. (Also, has generics).


What are Nim's compile times like? I write a lot of C++, and by far my biggest issue is compile times for large projects. I'd love a systems language that had decent compile times for template-heavy code.


As girvo mentioned, compile times are really fast. Might not be as fast if you're heavy user of metaprogramming but it's still really good.

For example see: https://github.com/mratsim/Arraymancer in the README it mentions:

> Note: While Nim is compiled and does not offer an interactive REPL yet (like Jupyter), it allows much faster prototyping than C++ due to extremely fast compilation times. Arraymancer compiles in about 5 seconds on my dual-core MacBook.


Really fast! Even with heavy meta-programming it stays fast. As an example bootstrapping the latest stable release on my machine takes 1m06s. This is a process that involves compiling the compiler multiple times, just compiling the compiler takes 41s (i7-4770K, so not a sloth of a processor, but still).


For a fun example of some Nim action, check out this DSL that can generate SVG files and GIF animations:

https://github.com/bluenote10/NimSvg

Pretty cool!


As someone who loves Nim and uses it a lot, I'm a little wary of recommending it as a faster Python. Nim takes from Python its whitespace sensitive syntax, as well as its "batteries included" standard library. But other than that, the two are very different languages with some major philosophical and semantic differences. That said, I much prefer Nim to Python. If you can live without a robust library ecosystem and are interested in a fast, easy to use language, Nim is a great fit.


> Would it be a useful language for a python developer to learn

Does he only know python? If so I'd say yes, Nim looks like Python but it's semantics are quite different and it performance a lot better. Also Nim <-> Python interop is nice too. Besides what eindiran said, your friend could also take a quick peek at: https://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programm... and for numerical stuff Nim's ecosystem is quite young for it but people are working hard on it: https://github.com/HugoGranstrom/numericalnim

I'd say go for it!


Nim has a heavy focus on metaprogramming using both templates and macros, and so the syntax is designed to be very permissive, and parse (but not understand) a very wide grammar so that users can write macros/templates to transform them. Kind of a middle ground between lisps which have very little syntax, and complete syntax extensions to languages which require compiler extensions so the compiler can even parse the file.


Funny thing is, I think this is just about as useful as every attempt I've ever seen (real or Hollywood) to add value to GUI by adding 3D gfx...


I actually really liked the 3d view in firefox (https://developer.mozilla.org/en-US/docs/Tools/3D_View)

A lot of people said it was silly, and I think IIRC the help pages for it used to have cheeky comments like "Why? Because we can." There's probably a good reason it was deprecated, but I thought it was useful for debugging my often deeply nested DOM layers.


I wanted to try this out, and the closest thing I found is this bookmarklet for Chrome:

https://github.com/chrisprice/explodz

It appears to still work and it even sort-of works on Firefox except for the mouse-click feature that shows the sides. Clearly not as polished as the old Firefox feature though.


Chromium Edge reimplemented it in their devtools: https://blogs.windows.com/msedgedev/2020/01/23/debug-z-index...


I miss that view! It was so useful, especially debugging z-index issues.


Gosh darn it! Now that I learned that it used to exist, I wish I could use it now to help my kids learn how web pages work!


Xcode’s view hierarchy debugger lets you do something similar and it’s quite useful: https://help.apple.com/xcode/mac/current/#/dev4dfdedb7a


Whatever man, compiz-fusion was the best productivity tool around when I was a kid.


I loved compiz-fusion for productivity -- especially being able to draw on the screen was super useful for meetings and presentations. Being able to zoom the screen was also useful.

It's a pity it's no longer maintained.


Alas, I never got the chance to give a presentation and draw on the screen with fire. I always wanted to.

KDE has zooming built in nowadays.


Longest part of any new install was finding the perfect window decorations.


I miss the cube with the workspaces on it. I actually think it was helpful for remembering which stuff was on which one.


exactly. having different workspaces mapped onto the cube was actually a practical effect.

the same with wobbly windows. they'd only wobble when moved, which makes the effect practical, as it doesn't get in the way.

i hoped this vim cube would do that too. map different buffers onto the faces, and rotate the cube as you switch buffers, but otherwise stay out of the way to actually let me work


I had a transparent cube desktop so I could see what was going on the other faces of the cube.

Being a master hacker during that time was fun.


Beryl was the shit when I was in high school. Those wobbly windows were mind-blowing at the time.


KDE still has the ability to have wobbly windows...it's always one of the first things I change...normal windows are boring.


Sorry to harsh your mellow in these trying times dude


Yeah, thinking we'll see this in Hollywood soon. Maybe "Jurassic Virus: The Beginning".


Must not do much CAD


This is a really funny comment to me for many reasons.

I've been saying this since Jurassic Park came out and the Unix UI was basically 3D. Around that time I had some labmates in the mid 90's that thought GUI logins should be skeumorphs that involved doors, keys, and tunnels. And it got worse from there.

Fast forward from 1993 to 2013 and I met a guy working on a 3D version of ... Atom editor I think? I was a fucking trainwreck to look at, but damn he was putting his all into it.


Now we just need to render Emacs onto a tesseract.


Is that what the `C-x 4` keybinding is really for? /s


M-x apropos tesseract


Or the lament configuration.


If you consider arrow keys as 2D, and the Vim's edit/control mode as a 3rd dimension, EMACS is already up to... 12 dimensions? Good enough! Ship it! :)


In the 2000s we used to do this, but with the proverbial Linux Desktop.


I remember compiz! https://launchpad.net/compiz. Looks to be still actively maintained


Oh man, compiz-fusion is what got me interested in Linux. I remember seeing videos circa 2007-8 of people's desktops with all sorts of crazy stuff. Cube desktops, wobbly windows, fire trails, etc. I spent forever figuring out how to dual boot Ubuntu 8.04 and Windows and learned a ton so I could setup these effects. Fast forward 12 years and now I only use Linux on servers without a desktop interface at all.

While this stuff may seem silly and pointless, you'll never know who it'll inspire to dive in to a whole new world. I'm glad it's being maintained still


Same here, compiz was directly responsible for me trying out Linux on CD


It’s silly but loads of fun. My first Linux was also Ubuntu c. 2007-2008 and I got a kick out of using a cube desktop that neither Windows nor Mac had.


Whatever happened to the promise of cube desktops with wobbly windows?


I am using Wobbly Windows right now in KDE. Desktop Cube works too but I don't like it (I use 16 desktops instead of 4 :).

When I have to use Windows every once in a while I am viscerally disgusted by the lack of wobbly windows. Moving windows just feels wrong - very, very wrong. Takes a second to realize they're not wobbling. To me it makes the computer seem less robotic and more natural in a way, I guess. Like haptic feedback on smartphones when you tap stuff.


Exactly what I told my sister few months ago. The windows just feel stiff and unnatural.


I don't know about you, but I've been running wobbly windows up until about a month ago, when I disabled KWin's compositor in favour of picom for performance reasons. I hope to get them back when I'm able to start using KWin on Wayland.


I still use both on KDE Plasma desktop. Life is great.

Many other options like fire-on-window-close and zooming are also available.

I believe you could get them just using kwin the window manager.


FWIW, if you don't see them as options: make sure that the KWin compositor is set to OpenGL mode, rather than XRender.


I'm very late to this discussion, but... in 1999 we did this at Microsoft running unmodified Windows apps in a custom 3D environment.

https://www.microsoft.com/en-us/research/publication/the-tas...


And here I was making fun of the Swordfish hack scene [1]. Turns out he was just assembling the crypto algorithm using vim.

[1]: https://www.youtube.com/watch?v=u1Ds9CeG-VY


Can someone make this work in VR and multiplayer? I can imagine it’d increase productivity if you could fly to someone’s cube and collaborate by doing Minority Report gestures.


Yeah if people stopping by my desk in an open office is good then people dropping in to my desktop environment must be better.


It’s basically the remote work equivalent of asking for TPS Reports


Judging by the feature requests in the open issues, I'd say we are witnessing the inception of the text editor of the century.


https://github.com/paranim/paravim - A Vim-based editor for Nim https://sekao.net/paravim/nim/

https://github.com/paranim/pvim - A Vim-based editor for Nim https://sekao.net/paravim/nim/

So what the fuck is what? paranim? paravim? pvim?


Cool. Looking forward to seeing Vim on a torus some day.


Remembers me an effect I wrote (in text mode) for neercs, a GNU screen clone https://www.youtube.com/watch?v=sQr42LjaNCY


This is weird combo of "movie hacking" and "real hacking".


Technically you're still using it in "two dimensions", only the topology of S^2 requires an embedding dimension 3.

You're still a pleb, only "richer".


Perfect for slowing down those pesky 10x developers.


Thanks for the comic relief of the day; sure needed it. I like your goofy sense of humor. Please keep doing fun stuff like this.


When Compiz came out about several years ago this kind of thing was all the rage.


Ah, classic BeOS, love it!


Is this the lockdown speaking? Thanks, I needed something light.


There's also vim^4 which is great for writing in Forth


This is like Hacker's computer in movies!


VIM BORG CUBE!


:set resistance=futile


Well done


it's funny.


whats the cmd to exit vim3?


One of the issues suggests holding down your device's power button.


Almost as useless as this comment.


This makes it to the front page? Guess it's a slow day on HN land. Is everyone else waiting for the April job threads too?


> This makes it to the front page?

Yes. Any particular reason you think it shouldn't?

I prefer to see people's personal fun hacking projects on HN to news I can read elsewhere.

> Is everyone else waiting for the April job threads too?

An early one went up last week https://news.ycombinator.com/item?id=22665398


I quite appreciate these kinds of posts. Fun and silly, yet make you think about the way computers work outside the box.


Outside the box... Oh thanks...


I much prefer to see fun hacking projects here over all the non-tech submissions that increasingly take over the front page.


This is great, especially the Q & A.


Your username reminded me what was once my favourite clothes shop in London. Their aesthetic is a bit further from a spinning-cube-Vim than it used to be.

https://www.cyberdog.net/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: