[HN Gopher] Show HN: What would mechanical programming look like?
       ___________________________________________________________________
        
       Show HN: What would mechanical programming look like?
        
       Author : felipereigosa
       Score  : 138 points
       Date   : 2020-10-29 19:40 UTC (3 hours ago)
        
 (HTM) web link (mockmechanics.com)
 (TXT) w3m dump (mockmechanics.com)
        
       | theodric wrote:
       | It would look like an automatic transmission
        
       | rjsw wrote:
       | Have you looked at ThingLab [1] ?
       | 
       | [1] https://en.wikipedia.org/wiki/ThingLab
        
       | doinathing wrote:
       | This looks amazing! Please consider making your website more
       | accessible... the menu cannot be focused with the tab key, the
       | images in your gallery do not have alt tags. Those are some low
       | hanging fruit you can correct. The overall strategy of toggling
       | the main content with CSS might need some aria announcing so
       | folks at least know different stuff is on screen as you move from
       | one thing to another.
       | 
       | Again, AMAZINGLY COOL project, not wanting to take anything away
       | from that. Just want everybody to be able to learn about it, even
       | if they are not mouse users, not sighted, etc.
        
         | felipereigosa wrote:
         | Not at all, this is exactly what I want, some good feedback, I
         | hadn't even considered those things you mentioned, I'll look
         | into it thanks!
        
       | ArekDymalski wrote:
       | Very interesting - I'm going to show it to my 11yo son and see
       | what we can build.
        
         | felipereigosa wrote:
         | Cool! If you guys build anything you can send me pics so I can
         | put in the gallery of the website.
        
       | felipereigosa wrote:
       | Hey guys, I've been working on this Clojure project for a while
       | now, honestly I'm not even entirely sure what it is, a game? a
       | game engine? a 3d editor? a visual programming language? Anyway,
       | it's a system to create mechanical contraptions and interact with
       | them. I built a few test machines and you can see them in the
       | first video I posted on my channel [1]. For instance you can
       | create a fully functional piano in 5 minutes and play it, the
       | keys move, it plays the sounds as you would expect. And this
       | system turned out surprisingly powerful, to build these machines
       | it often does not require any coding which was kind of
       | surprising. I created this tetris game in half an hour [2]. It's
       | not perfect but it is functional and again it required only a
       | tiny snippet of code to coordinate the different submachines and
       | even that might be unnecessary. The "programs" i.e. the machines
       | created also interact in a way that you usually only see with
       | command line programs. You can create a machine then someone else
       | can use that machine as a part for a more powerful machine, for
       | instance that lever that turns the tetris game on and off doesn't
       | "come standard" with the system, I build it separately then
       | imported it. Using the program is a lot like programming,
       | thinking logically, coming up with solutions to problems, fixing
       | bugs, but it's entirely visual so you can use your physical
       | intuition to figure things out, maybe that's why it's possible to
       | do things so fast. Anyway I was hoping some of you would give it
       | a try and give me some feedback. I need people to see what they
       | can build with it, I don't even know what's possible at this
       | point. And if you want to give it a go and get stuck, feel free
       | to contact me with any questions.
       | 
       | [1] MockMechanics Introduction Video -
       | https://www.youtube.com/watch?v=HrwxbQj5mj0&t=193s
       | 
       | [2] Tetris Machine Video -
       | https://www.youtube.com/watch?v=cSPm1xxQ-qY
       | 
       | [3] https://mockmechanics.com/
        
         | gitgud wrote:
         | One of the best things I've seen in a long time on here. It
         | reminds me of a few different games; "Little Big Planet", "The
         | Incredible Machine" and of course "Factorio" but this
         | synthesises the best part... Inventing machines!
        
           | c22 wrote:
           | Yeah, this makes me think of an "open-map" version of The
           | Incredible Machine [0].
           | 
           | Very impressive!
           | 
           | [0] https://en.m.wikipedia.org/wiki/The_Incredible_Machine_(s
           | eri...
        
           | felipereigosa wrote:
           | Thanks, one of the great things about creating a program
           | where other people can create things is seeing them inventing
           | things you wouldn't even think of, it's so open ended. Alan
           | Turing and those other guys had no clue what we would do with
           | his idea. I'm looking forward to see what people will make
           | with this. (Not that I'm comparing myself to Alan Turing!)
        
         | frompdx wrote:
         | Awesome project. Can you share which libraries you are using
         | with this project?
        
           | felipereigosa wrote:
           | org.clojure/clojure obviously, org.clojars.nakkaya/vecmath,
           | org.clojars.nakkaya/jbullet, batik and lwjgl. All the other
           | stuff, the opengl shapes and whatnot I wrote myself over the
           | years, mostly to learn how to do it. In fact I probably can
           | speed up this program a lot by not using my own code for
           | those parts where libraries are available.
        
         | dkersten wrote:
         | That's pretty cool! It seems like a weird mixture of physical
         | contraptions (lego/meccano etc) or minecraft redstone circuits,
         | and something you'd see in Media Molecules' Dreams (especially
         | the graph-motion).
         | 
         | I just watched the Tetris video and it reminded me of this
         | mechanical pong game:
         | https://www.youtube.com/watch?v=iBoe3yM9IKs
         | 
         | What inspired you to create this?
        
           | felipereigosa wrote:
           | Thanks and that pong game is a great idea for my next
           | machine, unless someone beats me to it! If I recall correctly
           | the very first thought that led to this project was thinking
           | about how to formalize mechanical devices, they have a
           | language of sorts to describe chess games, same with
           | choreographed dance I think. I was thinking how can I do that
           | for machines without all the extra stuff like heat and
           | friction, but I pivoted a lot since then and ended up with
           | this.
        
             | luminati wrote:
             | Could you elaborate a bit more on "formalize mechanical
             | devices"? That has really piqued my interest especially
             | since you mentioned dance choreography as an example. Do
             | you have any examples/prior art you found interesting?
             | 
             | One of the topics I occasionally like to think about is how
             | to formally describe manufacturing steps in some
             | structured/programming language. Maybe your program could
             | be it. Would love to hear other folks' thoughts on this
             | too!
        
               | felipereigosa wrote:
               | Well, I was really into formalizing stuff when I was in
               | college, you know proving that a cryptographic algorithm
               | was correct by formalizing them as black boxes talking to
               | each other, that sort of thing. Then I just started
               | thinking about how to formalize mechanical things. One of
               | the very things I remember is coming to the conclusion
               | that all motions of a machine can be implemented as a
               | combination of linear and rotational motions (and that's
               | where the two things that move on mockmechanics, the
               | track and the wagon, come from), but I don't know if that
               | is true. But I don't really have any prior art, I had a
               | 2d version that didn't work years ago but I think I lost
               | it.
        
         | amelius wrote:
         | This reminds me of logic gates based on pulleys and weights:
         | 
         | https://www.youtube.com/watch?v=CNbScb8v-MI
         | 
         | (someone posted this here on HN a few weeks ago)
        
           | felipereigosa wrote:
           | It's interesting you'd mention that, because most of the
           | program is "mechanical", you manipulate things in 3d, but for
           | some things you have to go into a window and connect a few 2d
           | nodes like the gates in motherboard mode. I was thinking
           | maybe I should use 3d manipulation for everything, maybe the
           | video you posted could serve as inspiration for 3d gates.
        
         | mikevin wrote:
         | >... honestly I'm not even entirely sure what it is, a game? a
         | game engine? a 3d editor? a visual programming language?
         | Anyway...
         | 
         | It's refreshing to see this kind of exploratory project. Every
         | now and then, I need to be reminded there's room for play and
         | exploring in life, not just productivity and producing. Thank
         | you for reminding me!
        
           | felipereigosa wrote:
           | You're welcome :) I remember someone saying somewhere that
           | most of the great computer programs probably haven't been
           | written yet, if we remember that maybe we'll be the ones to
           | write them!
        
         | JoshTriplett wrote:
         | This looks amazing. Several times in the last couple of
         | decades, as graphics and physics engines have evolved, I've
         | built little prototypes whose main goal was "this should work
         | using real physics and mechanics", and then built things like
         | marble machines. Games like Crayon Physics always felt so
         | limiting; they were _only_ about things bouncing off each
         | other. I 'd like gears that turn and mesh, light that
         | diffracts, motors that naturally work in reverse as generators,
         | and the ability to build machines that use more than one of
         | those effects without any special-casing.
         | 
         | I look forward to playing with this, and extending it!
        
           | felipereigosa wrote:
           | Thanks, once you are familiar with it you can start extending
           | it right away, a couple of motherboards running custom short
           | scripts could implement all those things you mentioned and
           | then you could make that machine (for example the
           | motor/generator) available for others to use on their own
           | machines!
        
         | vagrantJin wrote:
         | This is so cool. It would be great to use this as a teaching
         | tool so students can visualize things. Keep at it man.
        
           | felipereigosa wrote:
           | Yeah, as an introduction to programming, it could even be
           | used with very, very young kids, apparently people are born
           | with an intuitive physics module (babies are surprised by
           | things that don't make physical sense), so who knows? Maybe
           | someone may claim one day that she has been programming since
           | age 2!
        
       | Animats wrote:
       | That looks like Working Model, from Knowledge Revolution, from
       | the early 1990s. That was a great little program for Macs that
       | let you build 2D machines. It was too slow and the physics engine
       | was primitive, but I used it to figure out how to do robotic
       | legged running up hills.
       | 
       | The CEO went on to found Roblox, which is much more successful.
        
       | gbasin wrote:
       | This looks awesome, great work!
        
         | felipereigosa wrote:
         | Thanks!
        
       | NikolaeVarius wrote:
       | You can also play factorio
       | https://www.youtube.com/watch?v=28UzqVz1r24&t=145s
        
       | dllthomas wrote:
       | https://en.wikipedia.org/wiki/The_Incredible_Machine_(series...
        
       | traceroute66 wrote:
       | Surely I can't be the only one who saw the title "Show HN: What
       | would mechanical programming look like?" and thought ... sure
       | mate, just go back to the 70's and you've got mechanical
       | programming galore in the form of punch cards. ;-)
        
         | felipereigosa wrote:
         | Haha... I remember talking to a teacher in college that used
         | punch cards when he was young and I thought it was awesome,
         | people were closer to the hardware you know? Hopefully my
         | version of mechanical programming is a little more convenient
         | :)
        
       | luminati wrote:
       | This has to be one of the best show hns I have seen in quite a
       | while. It looks amazing - congrats and thanks!
        
         | felipereigosa wrote:
         | Thank you so much! I've been working hard for quite a while on
         | this, you don't know how much it means to me that people liked
         | it.
        
       | issa wrote:
       | This is fantastic. I would have absolutely loved this as a kid.
       | Thanks for all of your hard work!
        
         | felipereigosa wrote:
         | Thanks, if I manage inspire some kids into coding just like I
         | was, my work here is done :)
        
       ___________________________________________________________________
       (page generated 2020-10-29 23:00 UTC)