Live data from Hacker News

Mechanical Watch

ciechanow.ski

361–370 of 425 posts

Re: Mechanical Watch

#361
How can I save the page with the interactive animations to my computer?

I'm using

  wget --page-requisites \
       --span-hosts \
       --execute robots=off \
       --adjust-extension \
       --convert-links \
       https://ciechanow.ski/mechanical-watch/
but I get "Loading..." messages in place of the animations when I open the saved html on Firefox.

Re: Mechanical Watch

#362
post #276

Earlier quoted context omitted.

Depending on one's skillset, you could use a dcc tool like Blender + three.js to make creation of these visuals and interactions much simpler. Have a look at gltfjsx + react-three-fiber [1] combination, which themselves are abstractions over vanilla three.js. With that said, the raw webGL approach here is arguably more educational, so goal achieved I think! [1] https://docs.pmnd.rs/react-three-fiber/getting-started/e…

Cool example, but all r3f is doing here is just providing the threejs camera, controls and the text with emoji, the watch itself is loaded as a .glb file, where I'd assume most people would be interested in learning about.

Yeah, I think exporting a scene from blender as glft/glb, and then using these tools to bring your exported 3D file to the web, is one of the more approachable abstractions.

The reason you'd use gltfjsx (which that example doesn't) is to have fine grained controls for every node in the scene graph. In the case of the watch, this would map to having a component for each mesh or gear, which can be controlled with mechanics/physics.

Re: Mechanical Watch

#363

Earlier quoted context omitted.

The tradeoff is that there is basically nobody else that has the expertise or time to do the same thing at a similar level of polish. We're not going to see more Ciechanowski-level posts unless new libraries and frameworks make it more accessible.

We definitely won't if people are taught that frameworks are the only option and never allowed to just write a full program on their own.

Nobody stopping you from not using a framework, and yet there is basically nobody else at Ciechanowski's level. It's not going to happen, you can't expect everyone to become a hardcore webgl expert (have you tried?). If we want more cool interactive visualizations, we have to make it easier. Otherwise, we're stuck waiting for those with the time and expertise to pull it off.

Re: Mechanical Watch

#364
post #257

Earlier quoted context omitted.

I strongly disagree that this is "the right way". I think that the platform provides low level primitives that are _designed_ to have abstractions built upon them. Doing it like this has the potential to be the most performant, but it does so in the same way as writing your programs directly in assembly is potentially performant. I also don't think that the source code is particularly readable for me, and contains lo…

> but it does so in the same way as writing your programs directly in assembly > contains lots of magic numbers and very imperative code Well, we really don't know if the code was written in this form by hand, don't we. It could have been compiled into this, to use your words, "assembly with magic numbers and imperative" from much more elegant form. We may see this form only because this is what browsers understand.…

It was.

https://twitter.com/BCiechanowski/status/1522067904522428417

Re: Mechanical Watch

#365
post #239

Earlier quoted context omitted.

minified js is not greatly smaller than gzipped js, I think the whole minification thing is a swing and a miss and now we have to deal with source maps and shit, and build pipelines and etc $ ls -la -rw-r--r-- 1 jack 197609 330905 May 4 22:56 watch.js -rw-r--r-- 1 jack 197609 152172 May 4 22:55 watch.min.js $ gzip watch.js $ gzip watch.min.js $ ls -la -rw-r--r-- 1 jack 197609 43690 May 4 22:56 watch.js.gz -rw-r--r--…

Of surprise to no one, Brotli does better on both: $ ls -l *.js -rw-r--r-- 1 mrd staff 330904 5 May 01:04 watch.js -rw-r--r-- 1 mrd staff 152172 5 May 01:10 watch.min.js $ brotli watch.js $ brotli watch.min.js $ ls -l *.br -rw-r--r-- 1 mrd staff 34461 5 May 01:04 watch.js.br -rw-r--r-- 1 mrd staff 27122 5 May 01:10 watch.min.js.br If I were serving this content, and if my web server and all of my target browsers supp…

> I'd be somewhat more content to ship an un-minified + Brotli-compressed file than an un-minified + gzip'd one.

Whoops, typo: I meant to say that I'd be somewhat more content to ship an un-minified + Brotli-compressed file than a minified + gzip'd one. That is, I'd be more happy to serve the 34.4KB watch.js.br than the 32.5KB watch.min.js.gz.

Re: Mechanical Watch

#366

Mechanical watch nerd here. This describe an ETA (swiss) movement, I really prefer the Japanese movement (I know mostly seikos). The mechanism are more simple and more robust. For instance, on ETA the crown mechanism is really sensitive, a lot of tiny fragile parts with a lot of tension in them, it go wrong easily. Also, seeing this web page I got frustrated by the fact it doesn't tackle what got me the hardest time:…

It doesn't go into a lot of detail but the article does say:

> Notice that when we turn the minute wheel only the cannon pinion turns. That pinion fits tightly inside its driving gear – it usually turns with that gear. However, when the driving gear can’t rotate because it’s blocked by the rest of the gear train, the cannon pinion can overpower the friction of that tight fit and rotate on its own. This lets us set time without interfering with the gear train, which could break the delicate parts.

Personally, I was wondering how one can wind the watch from the crown without engaging the weight of the autowinding mechanism. I'm guessing that winding with the crown causes the ratchet to slip on both pairs of blue/yellow gears.

Re: Mechanical Watch

#367
post #317

Earlier quoted context omitted.

it depends if you are doing something to get paid, or to last, or to be really good. only in the first case do i ever consider a heap of abstractions

Abstraction is the only thing that makes any of our advancements possible. Not even the simplest of math theses could be proves without a “framework” of relevant lemmas, nor could you write even a single hello world without the layers upon layers of abstractions written carefully over the decades. Sure, there is also bad abstraction, but the problem is the bad part, not the concept itself. Without abstractions you wo…

i mostly mean the heap of stuff people often throw at problems. of course you cant do anything without abstractions. it helps to understand them better though.

Re: Mechanical Watch

#368

Earlier quoted context omitted.

it depends if you are doing something to get paid, or to last, or to be really good. only in the first case do i ever consider a heap of abstractions

This is so backwards.

it really depends on what your doing mate!

Re: Mechanical Watch

#370
post #257

Earlier quoted context omitted.

I strongly disagree that this is "the right way". I think that the platform provides low level primitives that are _designed_ to have abstractions built upon them. Doing it like this has the potential to be the most performant, but it does so in the same way as writing your programs directly in assembly is potentially performant. I also don't think that the source code is particularly readable for me, and contains lo…

> but it does so in the same way as writing your programs directly in assembly > contains lots of magic numbers and very imperative code Well, we really don't know if the code was written in this form by hand, don't we. It could have been compiled into this, to use your words, "assembly with magic numbers and imperative" from much more elegant form. We may see this form only because this is what browsers understand.…

Graphics code tends to be imperative and have lots of magic numbers. I suppose it's the math-intensive nature of it.

Personally I'm not a fan of the magic numbers either but as I study more and more of it, it's everywhere

Post reply on HN