Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: What would mechanical programming look like? (mockmechanics.com)
719 points by felipereigosa 11 months ago | hide | past | favorite | 149 comments



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/


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!


I think what you're looking for is a "shed". It's a space in the real world where all the usual physics apply and you can make things using them. ;)

All jokes aside, this sandbox looks awesome and I want to play with it more. :)


Most importantly, the amount of things in your shed increases exponentially with respect to time.

In the blink of an eye, you'll have old lawnmower blades (for when I start forging), a full shelf of two stroke engines (shame to throw them away, when they almost run), at least 3 power tools that have been used a total of once (but they were on sale), a "random fasteners" drawer, and an entire woodworking area. *

* Woodworking area may only exist in your mind if you're younger than 50.


> Woodworking area may only exist in your mind if you're younger than 50

Why is that?


I believe that comment was to be written as "If you are younger than 50, woodworking area could be still in plans. If you are older, you definitaly already have woodworking area".


My tip for anyone in that position is to start buying stuff, I bought the biggest portable table saw (in retrospect, not the best approach) I could find and progressed from there. At the time I lived in a flat and worked on a balcony.


My first woodworking project was to make a wooden work bench on which I could do subsequent woodworking. The bench is still firm, solid and in use 15 years later.


My first project was a stand for the table saw. Working on the floor was a pain!


> a "shed". It's a space in the real world where all the usual physics apply and you can make things using them.

That sounds interesting; do you have a download link?


There are a few download links but it seems they all return HTTP status code 402.


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!


>... 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!


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!


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.


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 attributes. 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.


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!


In order to make it fully accessible you might want to start from scratch and make a more traditional site that's not doing so much with JS to manage what content is on screen. Which might be more than you have time to deal with. But generally, when showing/hiding/navigating with JS, you are short-circuiting a lot of stuff you get for free with the browser (focus reset, announcing of changes etc.) and you have to reimplement a bunch of stuff in JS to get the same effect.

Sometimes it's worth it if what you are doing with JS is highly interactive & there's a payoff. But in this case, each thing of content could be its own page, and that plus a little more semantic HTML would do wonders.


You're probably right, it's just that I'm more of a programmer than a web designer (this is my first site) so I just built everything with Clojure/Clojurescript. But I'll definitely do that once I have some time.


Sorry for the self promote, but this may be interesting for your usecase:

https://git.sr.ht/~evan-hoose/SSSSS

Feed it a directory structure with a couple of template files/markdown and it will spit out a website. It should be pretty simple to hack on. I've got a demo site [0], the source code for which is [1].

Feel free to shoot me an email if you've got questions, or if you want to tell me this is stupid, or if this looks like spam, or for whatever.

[0] a-shared-404.com

[1] https://git.sr.ht/~evan-hoose/a-shared-404


Is there any library you used on Clojure/Clojurescript? I had an abstract idea of building something similar to this.

Do I need any background in mechanics to build something like this?


I mentioned somewhere else here the libraries I used, search for jbullet with your browser and you'll find it. The rest I built myself. Clojurescript is just for the website. I don't have a background in mechanics, so no, not really. If anything I was trying to avoid the complications that real mechanical engineers have to deal with.


I'm available if you want to chat or work through anything in this space. Would be great if you can find a way to create your site that works for you and makes it accessible for everyone.


Thanks, I'll remember that offer when I'm doing that.


That's really cool feedback - and now I'm wondering if more projects shouldn't put their websites on GitHub (or similar) so people who want to contribute but who's skills are web/frontend focussed have an easy way to make updates and send pull requests?


I actually have started do this when I see an OSS project site that just needs some quick tweaks. It's easy to open the web editor and add missing labels or attributes or something.


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?


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.


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!


> Could you elaborate a bit more on “formalize mechanical devices”?

It made me remember yesterday's post about SparkFun's new Al La Carte thing ( https://news.ycombinator.com/item?id=24920043 ) - and now I want a service that lets me design a machine in this using it's "standard parts", and then order a physical version of it :-)

I wonder if some combination of lego/mechano style components, 3D printing, and magnetic electrical connections for batteries/switches/leds/motors could work? (Somewhat like this: https://www.pinterest.com.au/pin/178314466469771331/ which I had as a kid way back...)


You know I had actually considered this exact thing you want a while back as a way to move forward once I had the program working. You could design all the graphs, logical connections on the computer then load them and just snap all the parts together. The main drawback I encountered then was how to implement the wagon since it can move in an arbitrary track path circuit. I'm not sure how that could be done. Another idea that's a little out there is that if someone could implement the basic building blocks using molecular parts, then maybe that's how we build molecular machines!


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.


You should check out Shannon’s work on the differential analyser if you haven’t already. Before computers came along they used mechanical machines to solve differential equations etc. There are more papers with beautiful drawings of mechanical machines from that era.


I think the prior art you're looking for kinematics and robotics... and I distinctly remember that e.g. for multi-joints robotic arms you can actually use methods from the algebraic geometry instead of calculus (so you solve polynomial equations instead of differential equations).

Also, no one in this thread mentioned Opus Magnum from Zachtronics which has some quite neat mechanical movement in it.


I just saw the intro video for Opus Magnum and it looks really cool.


It looks more like a lean version of gary's mod. Although that game lets you build very complicated things a lot of people end up just playing premade games instead of building their own stuff, so there is still a lot of room for a more focused "maker" experience.


Yeah, Garry's Mod + Wiremod


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)


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.


I don't say this very often, but I think you're sitting on the next minecraft. You've captured that brilliant, simple, elegant, open ended thing-beyond-words which can be instantly recognized but rarely built.

Whatever you do, please never ruin the simplicity. Every object's state is defined by a single number. The logic of numbers is connected like plumbing. Never change this recipe.


Thank you so much! I won't, if anything sometimes I go too far trying to make things even simpler. For instance I use a track for both building wagon paths and as a motor, I thought maybe that's confusing but the track value wasn't being used for anything why add yet another part when it isn't necessary? In fact, there are things I know I can simplify. The button part for instance is completely unnecessary, I have built one that looks and works identically using a wagon on a short path and a few chips hidden in another layer. One of the things I may do is to make it a library part that can be imported instead.


Thinking of some ways you could build this product into a business, which I think is the best way to scale the positive impact of your work. First thought was building a network interface so folks could interact and collaborate within the environment. The other thought was to offer it as an educational tool, as a gateway to more advanced programming; for that to work, though, I think it’d need some sort of game-like attractions, to pique the interest of the user and create positive feedback loops so they delve deeper into the tooling. The Minecraft comparison resonated strongly for me; even if it’s not your long term vision, it seems an apt template to follow while you crystallize your ultimate product vision.


That's exactly how I have been thinking. What I was thinking was to make it a Steam game, but entirely open ended, maybe with a bit of resource scarcity so that people have to scramble to get what they want. I said to someone else yesterday maybe things like cities with user built transportation systems for rent, resource wars with medieval siege engines all designed in an arms race between users could evolve organically. In a way that combines the two things you mentioned: the shared aspect and the incentive to learn programming. When I was a kid I knew all the pokemon and their stats, why? Because it was required to advance in a game. Now suppose you have a castle and someone figured out a way to outsmart your defenses. Either use programming ideas to update your cannons or lose the castle... I could add a basic "building block" of damage to avatars like being hit with anything moving faster than x, then anything you can design that throws things could be a weapon, figure a way to store balls "under pressure" triggered by a step plate and you have a bomb/booby trap.

edit: (sorry I keep having ideas and editing the post) At some point the game itself might be open kinda like the internet, the reality of the game what things exist where, who has what can be agreed upon with some sort of blockchain system, then several "browsers" can be written to "plugin to the matrix" if you know what I mean.


This has to be one of the best show hns I have seen in quite a while. It looks amazing - congrats and thanks!


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.


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!


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!)


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_(seri...


Really cool project – but I found it took quite a bit of digging before I could work out just how cool it is.

Have you thought about making the gallery from videos or even gifs? The movement is sort of the best part, and a bunch of people (like me) might skip the long video on the homepage.


Interesting, I think I'll do that, I even already have the gif for the tetris machine, but I ended up not using it.


GIFs are inefficient and pretty resource intensive, if possible use video formats instead. Modern machines are optimized for running video so they work quite a bit better.


To fill in the missing step, you can play a real video format in the browser using the HTML <video> element, optionally with the `loop` attribute (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/vi...). <video> elements, like GIFs, are supported in all browsers.

You can choose a codec and container format to export your video to with the help of https://developer.mozilla.org/en-US/docs/Web/Media/Formats/V.... All of those formats make for much smaller files than GIF-format video files.



Vi Hart's EleVR research group had a similar concept in 2016 (implemented in VR of course), though they ran out of funding. https://web.archive.org/web/20190320232253/http://elevr.com/...


This is one of the first things I’ve seen in a looong time that got me genuinely excited. I can see so many possibilities for the future. Kudos and great work, I think you have beginnings of something great on your hands.


Thanks, we do :). From now on what the program can do depends on what people build, the library machines they create so that other people can use them as parts and so on.


Nice idea. Another related game i have been waiting for is Logic world[0].

[0] https://logicworld.net/


Awesome project. Can you share which libraries you are using with this project?


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.


This looks amazing... can't wait to go home and try it with my daughter. How long did it take to create this btw?


Thanks, it's a little hard to be sure, my first commit according to git is March 30th, 2018. On one hand, I did take months long breaks while I worked on other things since then, but I also have tried to build something like this once before, years and years ago, but it went nowhere back then.


Interesting. Thanks for sharing!


Dude this is great! I think this would be superb for teaching children physics, coding and design. Also, it could have minecraft type vibes of addictivity and fun


Thank you. Yes one of the directions I want to take this is to create an avatar you can move around just like minecraft and then interact with your machines like I show in the first video. I always thought educational gamefication is something that could be done better. When I was a kid I knew every pokemon, their evolutions, their powers and I wasn't even trying, I just wanted to play pokered. If I create something that makes people, especially kids, care that much about programming... To storm that castle you have to build a catapult and to do that you have to understand these programming ideas...


https://youtu.be/gwf5mAlI7Ug?t=697

https://youtu.be/gwf5mAlI7Ug?t=521

Mechanical algebraic computers for aiming systems


Looks amazing! I can imagine this become a wonderful sandbox game!

I try to run the app on macOS but it crashes immediately. Do you know why? Log: https://pastebin.com/amQgGz43


Thanks! I just looked up "sandbox game" on Wikipedia to refresh my memory and it gave me the idea of maybe adding challenges to make it one of those "solve this problem anyway you can" deals. Maybe a puzzle mode? I'll add it to my idea file.

Someone else mentioned that it crashes on mac but didn't provide the output yet so thanks for that. I don't have a mac but I'll have a look to see if I can fix it.


I emailed you the error log I see when trying to run the jar on macOS 10.14. It contains more errors than the log that trungdq88 posted does.

Oh, whoops, I see that the Download page says JRE 11 or newer must be installed. My JRE version was 8 (Java 1.8).

After switching to OpenJDK 14, I get the same errors as trungdq88.


Hey guys, I'm not sure if I should post this here or create a new post on the main page? I spent the morning implementing the music box that I talked about with @bigiain yesterday. I went even further and created a little submachine to load text file songs from the computer. I hope you like it. If you would like updates like this, follow me as MockMechanics on twitter and Instagram, and if you'd like to support my work I'm now on Patreon too.

Music player - https://youtu.be/Kz9GDBJuVwk


I was working on an mini-game just like this using Unity but with lasers, some sort of kids game to learn the basics of programming concepts by completing simple puzzles, I lost motivation so its idle, so far it looks like this: https://i.imgur.com/MN4xm4j.mp4 (the T-shaped object represents an if-else, if blue go left else...), I was thinking of making orbs to represent lists/arrays and so forth, anyway I'm glad you stuck with it and I think it has a lot of potential.


Your mini-game looks really cool! I think you should stick with it.


This is so cool. It would be great to use this as a teaching tool so students can visualize things. Keep at it man.


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!


My son have been programming since he just got 2 years. Started with code.org, then codeSpark and now scratchJr on iPad. Everything have to be visual, and small doses every week.

Love your work from the little I have tested now.

Anyway I can contribute for translating into other languages?


Thanks, if your son (or you!) builds anything with it I would love to see it and put it on the gallery on the website :)

Thanks for the offer, I'm dealing with so many moving parts here (pun intended) I hadn't even considered it. I think the most helpful would be translating the documentation, if you'd like to do that. Or posting a video explaining how to build something in the other language you speak would be great too.


Awesome, if you're looking for another language that "tries to formalize X", where X='3D Rigid object', look up OpenSCAD. You build complex shapes using primitives (using a descriptive language), but the idea is a bit different.

I like the mockup aspect of this: trying to capture functionality and abstracting away detailed looks or positions. I'm thinking of a system where mechanical ideas can be tried quickly to get a functional idea of whether they work, using a maximally abstract functionally-equivalent basis of elements.

I feel like common mechanical subsystems like cams (which, for example, allow a rod to follow an arbitrary velocity curve when you move a knob), gears, and other devices may be abstracted away by a simple primitive (plus something like a descriptive curve or function). Your system of 'wagons' and 'tracks' seems to achieve this, at least partially. It's like when, in programming, we use a high level, abstract description of behavior. Perhaps it would be possible to analogously "compile" wagons, tracks and probes into actual mechanical elements like gears, cams, rods and shafts.

Abstraction is a powerful tool! (for creativity, productivity, expressiveness, and fun)


> I feel like common mechanical subsystems like cams (which, for example, allow a rod to follow an arbitrary velocity curve when you move a knob), gears, and other devices may be abstracted away by a simple primitive

This is exactly how I was thinking before I pivoted the project to a more practical version, spot on. I feel like this project has moved on from that, but someone should really investigate this. Just off the top of my head imagine how easy it would be to run a genetic algorithm to find machines if we had an abstract description for them, or maybe there could be a whole branch of mathematics to prove that a certain machine does what we think it does (a lock is secure, this sort of thing).


The JAR-file can easily be decompiled: http://www.javadecompilers.com/data/30.10.20/77670d3f04408fb...

Should support the developer on Patreon (see he mention it, but can't find a link). I think this a great work that deserve to be supported!


Maybe this is moot as I'm thinking I may release the code as opensource anyway, but I didn't think I was giving much away by not using proguard, since the code comes from clojure? There is no link to Patreon because I haven't created an account there yet, let me do that right now. And thank you! If I can get some support on something like Patreon, crowdsourcing, youtube ads or something like this I definitely will release the code.


Here you go: https://www.patreon.com/mockmechanics

I'm super thankful already for all the support I received with all the comments from you guys. But if you want to support me a little more, now you can.


$100 on Patreon your way :)


Wow! I just saw the patreon notification and thought that was some kind of mistake. Thank you so much!


This is pretty interesting. One problem I think the field of mechanical engineering has is that there is no high-level hardware description language to describe mechanical devices. Sure we have things like modelica which come close, but there are some pretty big disadvantages. It is very difficult to describe a work piece being moved through a factory and having operations performed on it with modelica. It is even a challenge to formally describe what mechanical devices do!

Honestly, I think Charles Babbage may have made the most progress in this area with his mechanical notation[0]. It is crazy that Babbage was able to design a the difference engine without any CAD software!

[0]http://blog.plan28.org/2014/11/babbages-language-of-thought....


I noticed that you have a visual editor for connecting the parts.

Kosmos might provide some inspiration or insight given that it's a open source visual editor for clojure.

https://kosmos.antonvolkoff.com/


I came here originally thinking this was going to be about stuff like how before CNC, machining lathes had series of levers and knobs that controlled gearing that would then cut different patterns into the part being machined.

I watched a great video on Adam Savage's YouTube channel [1] about his lathe and setting up the levers to make nuts and bolts on it. Thus mechanically programming.

1: https://youtu.be/98MCz9gQaiE?t=622


My employer creates Simscape Multibody[0], which does kind of similar stuff, but it's more targeted towards business/research needs. This looks like a more fun variant of it!

This looks very interesting to me, and I'm sure my fellow colleagues would love playing around with this.

[0] https://www.mathworks.com/products/simmechanics.html


Simscape Multibody looks very cool and I can see how it and MockMechanics could complement each other: create something super fast without any real physics considerations on MockMechanics just to brainstorm an idea, then once you have narrowed it down, model it properly with Simscape Multibody.


I didn't see any mention of source or a license while browsing the site. Is it proprietary? Do you have any plans to license this as free software in the future?


Well things are a little fuzzy right now. I was just telling someone who asked me this, the plan is to make it open source eventually (after I refactor the code so that people can actually understand it!), but I would like to make a little money from it too (stupid covid!). So if I can make some money through patreon, crowdsourcing, youtube ads or something like that, then that's what I'm going to do.


Have you looked at ThingLab [1] ?

[1] https://en.wikipedia.org/wiki/ThingLab


Very nice. I use some very expensive cad packages and for training and certain applications i think this is better. In my opinion you hit a home run. Nice job


Thanks! If you already have experience building things with cad you probably can build super cool things using this, I can't wait to see it.


Reminds me of The pattern on the stone by W Daniel Hillis where he builds a tic-tac-toe computer out of mechanical components. It's a great book for explaining how computers actually work.

https://en.m.wikipedia.org/wiki/The_Pattern_on_the_Stone


This is so cool and exciting! I have always been fascinated by the idea of making a virtual world where you can build test actual machines so the cost of experimentation is really low. It would enable so many people to experiment innovate in the physical world.


Thanks! That's an interesting angle I hadn't thought about before. I mentioned in the site creating prototypes of real machines, but I was thinking more of you brainstorming your own ideas. Maybe people can create virtual machines, ask other users to use them in the virtual world, work out all the design bugs, then if people really like it (and it is physically feasible) build it in the real world.


Yes, that would be super interesting. Not sure about the specifics but it would be a great place where people could come and collaborate on projects (maybe in future). It's also such a great teaching tool for kids.

Just curious, is it a personal hobby project? How do you plan to sustain it?

This is definitely one of the most interesting project I have seen. Thanks for building it :)


Thanks, it started as a hobby project that gradually became more and more "the thing I do" as I noticed it's potential, whether it makes money or not. I'm investigating two routes right now, one is to see if I can get support through patreon, youtube ads and things like that and then eventually release it as open source. The other is to release it as a game on steam, maybe get funding first, but not necessarily. I'm leaning more towards the second one at the moment, people have pointed out that the project would have a wider impact that way.


This would be a fantastic way to teach programming to kids, in the same way that redstone or (for people of my age) wiremod makes programming tangible and feel more real. I’d love to see this adopted in schools or something. Really well-designed mental model for this kind of thing too.


Thanks, yeah a couple of people have been saying how they are going to try this with their kids, depending on how that goes I can think about how to take it further in that direction.



I saw that first one yesterday, it was one of the first things people posted on this thread. Very cool stuff. The second one will be a great reference for the kinds of movements to try to create once I get gear mode working. Thanks.


Just from watching the video it looks great :-)

What I like especially is the idea of teaching the keyboard shortcuts while using the software. In addition, the avatar mode sounds like it could be really fun.

Any chance of increasing the size of the world and making it like a first person gaming experience?


Thanks.

> Any chance of increasing the size of the world and making it like a first person gaming experience?

That's the plan, except it will be the most open ended game ever, what you do inside is up to you... want a epic battle game? Build medieval siege engines yourself and fight other people. Want a city simulation? build the transportation system yourself, charge people to use it...


I'm surprised this wasn't mentioned in the text because it looks like it is perfect for making them:

https://en.wikipedia.org/wiki/Rube_Goldberg_machine


The creator is very humble and didn't mention, so I will:

You can support this awesome work on the Patreon site: https://www.patreon.com/mockmechanics

Surely at least worth a few of your dollars.


Hey thanks for that, I hadn't seen the message until now, I really appreciate it!


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. ;-)


I went a bit further back when I saw "mechanical programming" and thought of this video. https://www.youtube.com/watch?v=gwf5mAlI7Ug

Mechanical analog computing FTW!


My thoughts too, amazing machines! To start one in MockMachines, we would need an integrator...


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 :)


You know, punched cards and/or pianola rolls was the first thing I thought of watching you piano video when you mentioned wanting to record it. (my second thought was one of those cylindrical hand wound chimey music box things - https://en.wikipedia.org/wiki/Music_box#/media/File:Music_bo... )


That's a good idea. When I recorded the piano I hadn't built the tetris machine yet so I didn't have the proximity-test library part. Now it would be so easy to test if there is a hole or not (or a bump) in a block working as a sheet as it moves down. And now that scripts have editing powers, I can see how I could add a block to where the "cursor" is when I'm recording the song.


I really love what you've put together. So much so that I'm going to boot up a VM to try it out. I'd echo the responses here that there may be a business in it to help you fund further exploration. Nice work.


Thanks, let me know how it goes!


This is awesome. Definitely, the best showHN I ve seen this year! Keep it up ;)

As a developer, I want to ask which programming languages did you used to build this & why. I think you didn't open sourced the tool or am I wrong?


Thanks! Clojure all the way. Why? Because lisp is awesome :) I haven't made it open source yet, and I'm not entirely sure I will, depends what's best for the project, if making it a paid game on Steam is the way to go... But even if I do I would have to refactor the code somewhat first.


Awesome. I'm a fan of functional programming too :D

I definitely think that there is a possibility to turn this project to a business. I would find it ideal if you can do both, turn it into a business and at the same time open source the code. Maybe you ll find a way. Good luck ;)


This is brilliant. Do you think it will be possible to have abstraction layers that can be commonly used by everyone? Like dependencies/modules that can be imported and tweaked on giving them parameters.


Thanks. Yeah, one of the great inspirations for this project is Emacs, which I love. Emacs is so good because of the different modes that everybody can write. In the future maybe anybody can write a mode for MockMechanics (like the Avatar Mode that I keep talking about), we'll see.

Unless you are talking about the machines themselves? The copier machine for instance can be set to copy in place or not, it has a toggle button for it. So, yeah, people can build library machines with all sorts of toggles, sliders etc to tweak their behaviour, and then you can use those to build even higher machine abstractions.


Just for fun, I created a poll of my top ideas from my idea text file, which one you think I should do next?

https://linkto.run/p/ZGHCIQW1


This is awesome. We are witnessing the birth of the Minecraft killer! For real this could really usurp it if they get to the point indicated in the video (shareable worlds, castles and building siege machines etc!)


Thanks, I'll try my best to get there, for now though I'm just the one guy doing it so it might take a while. If my plans work and I make the project opensource though, then we're talkin'.



...if you want to waste 100 hours without realising it.


This would probably be awesome as an immersive VR “game”.


In time, why not? One of the main aims of this program is to exploit people's natural physical intuition, making it VR is a step in the right direction.


This is one of the coolest Show HNs I’ve seen in years. This is awesome, I hope you turn this in to something incredible (which it already is).


Thanks, I'll do my best!


This looks so awesome! I was genuinely excited to use something like this after a long time but the jar crashed on my Mac. Is it Windows only?


It shoudn't be, I've include the lwjgl natives for macos, but I don't have a mac so I don't know. The jar works on ubuntu and windows, I did have an issue on windows initially due to the different path separators. If you run it from the command line, when it crashes does it say anything? Mail it to me if so and I'll have a look.


side note: after dabbling into electronics and electromechanics.. I tend to see them as programming already. You're coupling geometries in a mathematical way. If you do reactive/dataflow programming that's very very similar.

Also, army videos of 40s mechanical computers hint that way I think. (in a way the meaning of programming is quite blurry)


Those videos are amazing. Analog computers are computing by analogy, eg. rotation speed represents variable A, and the roatation position represents the integral of A. Programming an analog computer means setting up an analog of a system of differential equations, then the system computes the solution.


This is fantastic. I would have absolutely loved this as a kid. Thanks for all of your hard work!


Thanks, if I manage inspire some kids into coding just like I was, my work here is done :)


Very neat, shall give it a go. The site is buttery smooth as well, really nice job there


Very interesting - I'm going to show it to my 11yo son and see what we can build.


Cool! If you guys build anything you can send me pics so I can put in the gallery of the website.


wow. amazing. You have great skills. I bet that if you spent your time working on making programming tools easier, you will be able to beat most low-code, no code products in the market.


Thank you. One idea I thought I might implement is to have little special library machines to do things like read a file and create a physical representation of it so that other machines can manipulate it. Maybe a XML file can be represented by a physical tree which machines could prune and rearrange. You could make sure it works on a small test file then there should be a way to run the program without the expensive 3d rendering on bigger files.


This looks incredible. I’ll be testing this with my kids tomorrow


Great! Be sure to share pictures of anything cool you build. I should have mentioned this before, I'm on Twitter and Instagram as MockMechanics too if anybody wants to share anything with me. I haven't posted anything there yet, but I'll start tomorrow since people seem to have liked the program.


It would look like an automatic transmission


This looks awesome, great work!


Thanks!


nice it is like pure data for mechanics. thumbs up!!!


I learned something new from the article and that is that GCJ-02 - the coordinate system used in China - is terrifyingly terrible:

"'Topographic map non-linear confidentiality algorithm' is a geodetic datum formulated by the Chinese State Bureau of Surveying and Mapping, and based on WGS-84. It uses an obfuscation algorithm which adds apparently random offsets to both the latitude and longitude, with the alleged goal of improving national security. There is a license fee associated with using this mandatory algorithm in China."


Wrong thread; I think you meant to post here: https://news.ycombinator.com/item?id=24917394


How does that even happen? Server burp?


It could be that they had multiple tabs open, were drafting their comment in an external text editor, and hit Ctrl-Tab one too many times before pasting their comment into the textarea.




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

Search: