What Does it Mean to Work Hard? - <AUTHOR> http://www.ribbonfarm.com/2010/11/29/what-does-it-mean-to-work-hard/ <comment><USER2> I take issue with:

 _It is work if it will impact something that will be evaluated by others, and if their reactions will have consequences for you that you care about._

And:

 _Take 24 hours, subtract sleep time, subtract the time you are focused on doing something where there is no customer. The rest is work._

I believe it is more useful to divide between _leisure_ and _occupation_ , as Seneca (1 BC-65 AD) did in _On the Shortness of Life_. In this sense, one can be preoccupied entirely with his own thoughts and affairs and still not be at leisure.

The post's author, Venkat, appears to consider that a third party is necessary for an activity to be "work" but, as Seneca argues, would you consider "that man leisured who arranges with anxious precision his Corinthian bronzes"? Indeed, the first commenter on the article - `dybyedx` - similarly argues: _We sometimes do not realize how much work we do to satisfy our toughest customers — ourselves. In that sense, it is much easier to define relaxation and not work._

<comment><USER3> I suppose I'd say that the Corinthian bronzes are being arranged in order to impress somebody. It's a difficult line, I'll grant you -- a religious man is often rushing to serve God, for instance. That's an interesting line since the customer need not be human, nor observable in His reaction.

Perhaps more exactly, it impacts someone or something you _feel_ to be outside yourself? That's harder to measure for others, but may be exactly as easy to measure for you, as the worker or leisurer.

<comment><USER4> To use an outdated term, something is stressful if it impacts your _superego_ —whether or not there is a real person expecting some property X of you, the need to be/do/have X has been wired into you, through socialization, as a terminal goal that you must reach in order to be happy. Alternatively, something can be stressful if it impacts your _id_ (I use this term more for parallel structure than utility): you can instinctually crave X (such as high- calorie food, or sex, or status, or survival in the face of near death.) And either one will cause X to be considered stressful _along with_ as any pursuit instrumental to achieving X, however many levels removed.

On the other hand, if you can draw a line in your hierarchy of instrumental goals and say "goals below this line do not affect pursuits above this line, except in-so-much as I decide it to be so (through a bet or somesuch)", then you partition the stress into the hierarchy above, and create leisure in the hierarchy below. In game design, this line is termed the <http://en.wikipedia.org/wiki/Magic_Circle_(synthetic_worlds)> .

Of course, something can be both leisureful and stressful: if you take a stressful pursuit and then add the pursuit of _mastery_ within it, you can usually make it feel like (stressful) fun. The pursuit of mastery is simply the push, for its own sake, to work at a higher, and more quickly increasing, level of skill than you would if simply working for consequence; because of this, mastery sometimes overwhelms the need to recognize the consequences of the work at all, at which point the work becomes leisure (i.e., if you practice until you are winning tournaments 100% of the time, the consequences of losing a tournament cease to matter. If you grind levels in a video game, the bosses cease to matter. And so on.)

<comment><USER5> Is there any way I can take these principles and use them to motivate myself to work harder / get more done?

<comment><USER4> If you want to get more done at the expense of stress, you can easily find some way to attach your goals to a parent goal that will embody such stress into them. Make the affections of a member of the opposite sex dependent on completing your goal, for example (find someone who thinks chiseled abs are attractive, and set yourself to dating them => you will stress out about getting chiseled abs.) Hypothetically, if you knew this trick when you were a child, you could make your parents act disappointed if you didn't do X—that would impress into you a _great desire_ to do X, though you _would_ reject doing X for a period of about 10 years at some point or another, coming back to it afterward. Obviously, make eating dependent on X—this is one reason why startups can be "exhilarating."

If you want to get more done _without_ stress, the answer is simply game design. Make the "small matter" of your goals addictive. Guarantee yourself intermittent rewards for your work (entertaining TV episode every 1000SLOC committed, without any displayed statistic for how many SLOC you have to go, only a notification when you reach it), and so forth. Remove "lame duck" periods—times during which what you're doing won't change the outcome of the "game" (won't push you toward success or failure.) Work at the edge of your expertise, such that there is always a chance of failure, but a failure that is insulated from outer failure (your refactoring didn't work out, so you have to throw away your work and start again—but you don't have a deadline, so this is okay. It just stings a bit.)

</comment></comment></comment></comment></comment><comment><USER6> This article really hit home for me. Over the past month or so I have been blogging about my own side-projects and things I am reading about or playing with. But now that people are reading it (very few, but people nonetheless), I start feeling obligated to make progress or start a new and interesting project.

It is becoming a double edged sword -- I started blogging because I wanted some public accountability and motivation to finish projects or learn new things, but now I find it becoming less and less appealing. I now care what my readers think and how I present myself, especially since some of my readers are coworkers, and that is making it more like work and causing me to start avoiding it.

Anyone have thoughts on striking a good balance?

</comment><comment><USER7> My definition of "work" is that it is done for anything other than its own sake. It doesn't matter who it's done for or what the benefit of doing it is. Housework is work; writing a blog can be work; cleaning your tools after an enjoyable hobby is work. Anything done in support of something else, whether or not money or other people are involved, is work.

Only those things, like eating, sleeping, talking with friends, sex, play, that are done for their own sake are not work.

Note also that "effort" is not involved in the definition - I know many people that put more effort into their play than into their jobs.

<comment><USER8> Washing the dishes can be done for its own sake. Vacuuming can be done for its own sake. All things that are considered work can be done for their own sake and with the same amount of attentiveness and respect as things considered enjoyable hobbies.

</comment></comment><comment><USER9> That was hard work reading that article.</comment>


John Sculley Tells The Real Story of Steve Jobs' 'Firing' - <AUTHOR> http://www.forbes.com/sites/davidcoursey/2012/01/13/john-sculley-tells-the-real-story-of-steve-jobs-firing/

<comment><USER2> I wish this story would have been written while Jobs was alive.....makes you wonder if it's true!</comment>


An Entertaining to Data Structures and Algorithms - <AUTHOR> http://www.youtube.com/watch?v=RpRRUQFbePU

<comment><AUTHOR> If you find your education lacking, its now easier than ever to learn your way out of it. Universities all over the world put their lectures online. You can find one that teaches the topic of interest in a way that works for you.

And if you don't understand something, you can STOP the lecture and google it until you do. Replay the few seconds of video to make sure you heard it right. Do whatever it takes. You're in control.

Become a learning machine. Then no one can stop you.

Case in point. I lack a computer science background and get stumped when asked about basic software engineering concepts like sorting algorithms. And I'm a software engineer. Or at least I play one on TV. :-)

So I finally decided to do something about it. I've found several courses on the topic. This video from Australia is one of them.

All the world's knowledge is being made accessible to you. Seize the opportunity!</comment>


Single Page Applications using Rust - <AUTHOR> http://www.sheshbabu.com/posts/rust-wasm-yew-single-page-application/ <comment><USER2> From the article:

> Building UIs by composing components and passing data in a unidirectional > way is a paradigm shift in the frontend world. It's a huge improvement in > the way we reason about UI and it's very hard to go back to imperative DOM > manipulation once you get used to this.

IMO, UI structure and state management of the UI are orthogonal concerns. Trying to make these part of the same problem - a 'Component' \- is how you wind up in the Angular-style trap where you can never quite cover 100% of the use cases, so you have to keep adding new leaky abstractions to compensate for prior ones. Passing events back up the chain is a particularly egregious constraint when you are trying to do things with the UI that the modeling does not agree with on paper (i.e. modals, status bars and nav menus are children of whom? One big global component?).

I have made this realization recently when working with Blazor. The statefulness of a UI is a completely different thing from the visual presentation of the UI. We do one-way binding into UI (e.g. foreach over collections to build table rows). But, stateful concerns are injected as scoped services (i.e. per user session/request). UI events are passed into the state service methods directly, and the UI is redrawn on top of the updated state. Each state service can only be mutated by way of one of its public methods.

This approach allows for us to build & test our UI state machines to deterministic levels of correctness without a single line of HTML/JS/CSS or manual user testing being involved. Once we have the state machine figured out, we can build whatever arbitrary UI we want on top of it.

<comment><USER3> Have you used React? It also uses a "Component" approach, but it doesn't suffer from the same abstraction issues as Angular. Your approach seems basically equivalent to the "redux" approach except with an OO flavour rather than a functional one.

Personally I've found a mix of "component state" for things like UI state (e.g. is that modal open? is that checkbox checked?) and "external state" for actual product data (e.g. array of users) works pretty well.

<comment><USER2> I have not played around in the React space at all. I do agree that what you describe sounds similar to my ideology. The part that I would disagree with is the coupling of _any_ state with a UI component.

What happens if you want to move the confirmation checkbox from the modal back to the main view? Do you have to edit 2 state machines or 1?

<comment><USER4> I'd go further in pushing back and actually say I think the single global state store (or stores) like redux and others are an anti-pattern.

You actually do want your state to live inside components. The examples are numerous, but it basically all comes down to composability.

Here's a recent example:

You build a nice "autocomplete" for your site. In redux, you'd have it all in some namespace perhaps. But now you realize you need a second autocomplete somewhere. What do you do?

In the component model, you'd have already written the state such that there's an "autocomplete state managing component" that accepts the right props to initiate it. Adding the next autocomplete widget now is as trivial as adding a component. But in the global/redux model, you would be far more likely/prone to not only couple the initial props and logic to the initial data, but you may not even have designed any aspect of it to be composable because you never considered it to be independent. How do you extract your autocomplete and publish it for other teams to use? It's not possible, unless you do a lot of work and force them to use redux as well.

This may sound overly architected, but in fact it's less so in the React world. Redux is the additional dependency, and additional and different layer of logic. Keeping within the component model is simpler and grows and composes more easily. Especially once you get into things like parent/child components that want to share state specifically for that sub-tree.

My take here is global stores are a bad solution for UI where the goal is tree-specific composability and generally building flexibly re-usable lego blocks is the goal. Redux is an anti-pattern that is simpler initially but encourages bad patterns, calcifies your stack, and ultimately slows you down as the app grows.

<comment><USER3> Agreed. But redux is useful for some things like data on the currently logged in user, or the state of feature flags. These are bits of data that you may well need all over the place, and pulling them in from redux is easier than threading them through components as props.

<comment><USER5> Redux works through a first-class React feature -- the context api. You can utilize the context api yourself to create modular state wrappers that can exist side-by-side rather than being restricted to a single global store.

[https://reactjs.org/docs/context.html](https://reactjs.org/docs/context.html)

<comment><USER4> At that point you now have the downside of writing reducers (verbose, unintuitive) and the dependency on a large library with a lot of customization to get it even close to syntax you'd prefer.

Namespacing doesn't solve what I'm talking about here completely, you'd still be writing state away from the components that use it and in a reducer form, plus there are numerous pitfalls to doing this in redux (you'd end up with a whole toolkit of addons to get it to be what you want).

I'd recommend looking at something like zustand or recoil, both which are headed in the direction we should be at. There are others, check out dai-shi's work on a few different state systems (use-atom looks decent).

</comment></comment></comment></comment></comment></comment></comment><comment><USER6> The promise of Rust is safe and fast low-level development. What is the primary selling point of using rust for webdev? Speed? I can mainly see disadvantages when using rust for this scenario.

<comment><USER7> > Speed?

As surprising as it might sound -- not really. There's a small-but-non-trivial amount of overhead involved in calls between WASM code and the DOM API's, plus (de)serialization.

It's more of a familiarity/existing tooling thing. Same as Blazor in C# writing web apps in that. If your entire team only knows C# and you have all your existing tooling there then it could seem an appealing option.

But there's also the argument for more stringent safety with Rust compared to IE, Typescript.

<comment><USER8> This is true if you are writing code that has a lot of UI interaction, but one sweet spot for WASM I've found is if you just want to do a bunch of computation on the client and surface it. For example, I wrote a SPA for generating crossword puzzles[1]. Maybe I'm wrong, but I don't think I would have been able to get the same performance in JS even with modern optimization.

1\. [https://crossword.paulbutler.org/](https://crossword.paulbutler.org/)

<comment><USER9> That's really cool, thanks for sharing it. It found a 16x16 with a lot of complexity incredibly fast!

</comment></comment></comment></comment><comment><USER10> I am hopeful that Rust can achieve what Elm did not.

I really fell in love with Elm early on, back when it was an experimental language for functional reactive programming that just happened to compile to JavaScript. It was an outgrowth of failed experiments in FRP from the Haskell world. I thought it got so many things right -- and it totally did. But then, just as soon as it started gaining real traction, development on Elm went silent and became siloed, staggeringly slow, locked-down, and unresponsive to users. I understand why this happened and I don't even hold it against the Elm team, but it certainly stunted the language's growth and adoption.

Rust has a much more expressive type system than Elm. The Rust world is much more open, responsive, and caring about user concerns. Rust isn't afraid to offer unsafe escape hatches even if they're not pretty or elegant. With Rust you have the added advantage of being able to use the language for the entire stack, both front- and back-end. That's especially compelling because Rust is on its way to being one of the strongest languages for back-end development due to its combination of type safety, expressiveness, and performance.

<comment><USER11> Clojure has been there as a fullstack language for a lot longer. It also fulfills the story that Elm was trying to do for much longer. And Reagent is a much needed improvement on React.

The borrow-checker in Rust is kind of silly tool to use in the context of a managed language (that does GC) like Javascript. I don't get it. It's like using a backhoe to plant a few geraniums. Am I just not getting this?

<comment><USER12> Clojure is nice for heavy data engineering projects that require robust/stable/mature tech like the JVM. But for a full stack language for a web app it just adds a tons of complexity over just using JS.

In Clojurescript interacting with the JS ecosystem is painful cause of its reliance on the closure compiler.

In Clojure, is almost the same, most Java libs are over-engineered and horrible to use but you need to reach for them because Clojure lacks an ecosystem.

So while Clojure is a better/nicer language than JS, the tradeoffs are not worth it if you want only one language for your webapp (SPA and server).

<comment><USER13> What you see as negatives, I see as Clojure's main selling points.

I usually avoid languages that keep reinventing the wheel of established libraries on the platform, "'cause it isn't idiomatic".

<comment><USER12> Don't disagree with you but two things:

1\. Clojure doesn't have as good interop as Kotlin.

2\. For some heavy interop projects, it's simpler to write the thing Java.

<comment><USER13> What good interop does Kotlin have better than Clojure in what concerns calling Java code?

And on the other direction is just as fun, try to call Kotlin co-routines from Java without having to write wrappers for it, or Kotlin code without putting @Jvm... annotations everywhere.

</comment></comment></comment></comment></comment></comment><comment><USER14> It's worth noting that the WASM package takes up 476kb shipped and the wasm.js loader is another ~25kb. So this bare-bones site is already sitting at > 500kb of JavaScript shipped to the client.

I am glad to see things like this are possible now with WASM, but there is a lot of room for improvement here that I hope gets captured by browser vendors over time.

<comment><USER15> Just to clarify, 476kb of WebAssembly != 476kb of JavaScript. Still, your point stands in that wasm-based sites will likely never beat their pure JavaScript counterparts in terms of data transfer; you'll need to make up the increased cost of wasm somewhere else. One place that browsers attempt to make up the difference is in the use of streaming compilers, where the browser can start compiling wasm as it's coming in from the network, whereas with JavaScript browsers have to wait until the entire resource is delivered before the parsing stage can begin.

<comment><USER16> To expound on this difference: 476KB of WebAssembly loads like 476KB of images (that is, super fast) rather than like 476KB of JavaScript (which is pretty slow and blocks the main thread). [https://hacks.mozilla.org/2018/01/making- webassembly-even-fa...](https://hacks.mozilla.org/2018/01/making-webassembly- even-faster-firefoxs-new-streaming-and-tiering-compiler/) explains more.

</comment></comment></comment><comment><USER17> I like how this post uses diffs to demonstrate how the code changes at each step, it's much easier to follow along than with blog posts that just show the complete code at each step and leave mental diffing as an exercise for the reader.

<comment><USER18> Dug in the source, I believe they're using Prism's Diff Highlight plugin:

[https://prismjs.com/plugins/diff- highlight/](https://prismjs.com/plugins/diff-highlight/)

</comment></comment><comment><USER19> We're finally getting back to this point where you can choose whatever language you want to program for the web. It only took us 15 years of being flamed every time you pointed out you didn't like Javascript but were forced to use it to be part of the modern web. One of the motivations for Viaweb was being able to do Lisp, hopefully this gets the web back to that mindset of only the behavior mattering and whatever language you want to use go for it.

<comment><USER20> It's ironic because this is only possible due to the continued development of sophisticated web tooling, which is the biggest complaint made by people who complain about the state of web development.

<comment><USER21> People complaining about that are generally talking about the churn in front end web frameworks and JavaScript development in general.

None of that eas necessary for WebAssembly to be developed. Unless you mean that the annoyance of the constantly changing JS ecosystem motivated people to push for it.

<comment><USER20> Nobody wants to hand-write wasm, you need a tooling pipeline to make that type of development workflow practical, its not any different from babel or typescript in this respect; using rust instead of js is "churn" just as much as any of the other options available for building web pages that you don't have to use.

<comment><USER21> >Nobody wants to hand-write wasm, you need a tooling pipeline to make that type of development workflow practical,

Yes and nothing about the Babel or typescript or node was required for the creation of wasm or a wasm compiler.

People complain about churn in the JS ecosystem because of the rate that frameworks and tooling rise and then fall out of favor.

I don't see the irony at all in people complaining about one ecosystem while being excited that they are being given a way to bypass that ecosystem all together.

<comment><USER20> > _People complain about churn in the JS ecosystem because of the rate that > frameworks and tooling rise and then fall out of favor._

And building web pages with rust is just another example of this phenomenon, its ironic because somehow its viewed as a positive thing by people who commonly complain about the introduction of new tools into web development ecosystem, but the power of rust hype somehow obscures the fact that this is exactly the same thing such detractors always complain about.

For the record, I love rust and wasm and think this is great, but I have always been opposed to the framing that people creating new web development tools is a bad thing.

<comment><USER22> Agreed. I'm also completely onboard with what Rust is doing here. Language choice is fantastic, I think opening up the web to multiple programming languages is going to be very good for the web as an ecosystem.

But at the same time --

To all the people complaining that modern web browsers are too complicated for small teams to build and maintain, do you think WASM helped with that at all?

To all the people complaining that Javascript's lack of an extensive standard library makes it hard to quickly read/grok other people's code on Github, do you think that situation is going to get any better when people are using entirely separate _languages_ to program the same webapps?

To all the people complaining that there are too many frameworks and tools being released for the web to keep up with, do you think that's going to get any better when suddenly every programmer and their dog can start porting any Open Source UI toolkit/framework to the web with low-cost DOM bindings?

<comment><USER23> > To all the people complaining that modern web browsers are too complicated > for small teams to build and maintain, do you think WASM helped with that at > all?

Kind of yes.

For simple browser as a general application platform you need a simple base technology where much can be shipped as library level. It would be fun to see WASM only browser with JS and CSS layouting solutions run as WASM compiled libraries.

So in theory WASM could be used as a first step to more simple browser but in practise it's propably just a fantasy.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER24> I'll do just about anything to avoid JavaScript, including learning Rust.

<comment><USER25> While I do get annoyed at JS often, I get just as annoyed by Rust. Sometimes, I really just want to read a CSV and create a Map<String, String> from a few of the columns. But oh my god if Rust doesn't make that a nightmare. Is it a String? an &str? Do I want to allocate that string on the stack? I won't know the size of it at compile time, so of course not... right? So no to 'static? Give me a nice middle of the road like TypeScript, Kotlin, OCaml/Reason... Rust just goes SO FAR in the other direction that I don't find it a pleasant experience. I get that it's the ULTIMATE in performance, I just always question if I really need it for doing web work.

<comment><USER26> I think this Rust complaint is just inexperience.

You wanted a Map<String, String>, and that's exactly what you should have made. A String is a convenience wrapper for storing a &str on the heap, so storing a String on the heap is redundant. The other options are for performance concerns, which you haven't mentioned any.

<comment><USER27> Now make it a global thread safe hash map where the keys are references into a mutable memory map that can move it's address (be remapped.) That's currently where rust is making my life miserable today. In C++ this is quite straightforward, albiet full of footguns.

Every time I need a static mutable thread safe map in rust for a cache or registry or some such thing, I groan.

I have a love hate relationship with rust. I love a lot of things about it, but sometimes I get so fed up with the borrow checker I drop into unsafe and just write the problem off as something better not done safely.

<comment><USER28> Maybe I am misunderstanding your needs, but could you not just use a RwLock[0]? For being global you will need to use the lazy_static[1] crate. Admittedly, I have not tried doing this directly though.

[0] [https://doc.rust-lang.org/std/sync/struct.RwLock.html](https://doc.rust- lang.org/std/sync/struct.RwLock.html) [1] [https://crates.io/crates/lazy_static](https://crates.io/crates/lazy_static)

<comment><USER27> That's part of the solution I'm working towards.

I'm using 'static references for the map keys, but they're not really 'static, so I use unsafe transmute to create them and I rebuild the map when the memory map changes to a different address.

</comment></comment></comment></comment></comment></comment><comment><USER29> Great post.

I'd love to see one talking about building a full stack app using Yew and Actix (or Rocket). And good ways of sharing types between the frontend and the backend.

<comment><USER30> You should have a look to this project built with actix, diesel and yew:

[https://github.com/saschagrunert/webapp.rs](https://github.com/saschagrunert/webapp.rs)

<comment><USER29> This is great. Thank you!

</comment></comment></comment><comment><USER31> Until we fix the wasm->dom bridge to be just as fast as the js->dom bridge, js will still have a leg up.

AFAIK the hard bits are in bindgen which makes js structs look like wasm ones and vice versa.

I've been doing frontend for over a decade and quite bullish on wasm once that boundary isn't so expensive.

It should be possible to make super performant apps with wasm. Figma sticks out to me as someone really pushing the edge.

</comment><comment><USER32> I'm still baffled by the need for a boilerplate Javascript file to call into rust. Why can't I just include the wasm directly from HTML?

Seems like someone's feelings will be hurt when they realize that many developers want to skip JavaScript and just work with wasm.

<comment><USER33> The browser API requires it.

<comment><USER32> It's just two lines of JavaScript to call into wasm: 1 line to load the wasm, another to call a function in it.

This adds latency, and is easily replaced by a single tag.

</comment></comment></comment><comment><USER34> This is a big reason that I think wasm is a step in the wrong direction. It's basically nudging people into making things even more opaque.

How, for example, would you go about blocking ads in this kind of app?

<comment><USER35> If it's actually harder to block ads in apps built like this, that's a great reason for site owners to choose wasm.

<comment><USER36> You can still use normal adblockers with this. Most of them just have a blacklist of domains that they block the requests for. Wasm won't change anything about that.

The requests are still exactly the same as in JS, so blocking will work exactly the same.

</comment></comment></comment><comment><USER37> I've been going through _Programming WebAssembly with Rust_ , from Pragmatic Bookshelf and have been getting interested in the possibilities. Yew is just one part of the book, but it's a good crash course and motivation for digging in.

[https://pragprog.com/titles/khrust/](https://pragprog.com/titles/khrust/)

</comment><comment><USER38> I was thinking of a project I wanted to start, but I don't know if it would interest anyone.

Basically, I'd like to try to build all sort of app with program components similar to the Elm architecture (init, update, step, subscribe).

Those programs would be a bit similar to objects in OO except with stricter rules.

I did a proof of concept and it works very well for simple tasks (like subscribing to HttpServer.sub and getting messages for requests to your update function). The good side is that you can have very simple API (I'd really like it to be usable by anyone), it's very easy to go massive multi-threading, refactoring is easy, you never introduce hard dependency in your code and having a very strict model helps organizing code.

I wanted to support wasm with a subset of the API (that's why I think of it now).

But I stopped, because I realized it would certainly be of little interest except for show.

</comment><comment><USER39> Can anyone please tell me how the author able to use html syntax in rust?

I get that there are macros, but how are html tags valid syntax? Is rust just interpreting the html content as strings?

I've only ever seen C macros, and I don't remember seeing this kind of wizardry happening there.

<comment><USER40> It's using this: [https://yew.rs/docs/concepts/html](https://yew.rs/docs/concepts/html) and no, just like JSX, it's not HTML strings. It's building HTML-like AST in macro.

One great thing about JSX (and Yew) is that it's way more secure way to build an HTML, because you don't need to worry about escaping behaviors as much. (Sometimes you still need, like injecting inline CSS etc. but not that often)

<comment><USER39> whoa, so you can write like a DSL parser using the rust macro matcher syntax?

<comment><USER41> Essentially yes. Macros in Rust are very powerful, similar to Lisp macros (although they are naturally clunkier).

As you would expect, you will find macros for HTML, JSON etc. in libraries, but there are also quite a bunch of smaller, frequent macros that simply reduce common boilerplate.

<comment><USER42> And then there are the Rust macros that let you write code in Lisp syntax, although I don't recall that any of them had a defmacro form…

<comment><USER39> Oh god, what have I seen

<comment><USER42> I'm sorry; I should have thought about the more sensitive readers.

</comment></comment></comment></comment></comment></comment></comment><comment><USER43> waiting for a rails like framework that would let me use only one language full-stack.

<comment><USER44> F# does this via Fable.

<comment><USER45> This is a tangent, but does Fable still require you to manually toposort your module hierarchy in an XML file? That was my experience using the language with VS Code circa a year ago.

<comment><USER44> I've actually not been an actual user besides running a random repo to see how it all fits in nicely. But... i've been playing more with F# and it really is a fun language to use and capable.

I was able to compile a number of F# applications to "native" or as close as possible and they ended up getting significant performance improvements.

For instance a ray tracing application when compiled to native had improvements of 50%.

</comment></comment></comment></comment><comment><USER46> Hate to be that guy but with a such small SPA I was expecting a better file size, 136KB compressed with brotli 487KB uncompressed.

Being said that score in Page Speed Insights is pretty good (95).

Will be interesting how size increases with bigger/complex apps.

<comment><USER47> I wouldn't assume the growth in binary size is anything like linear with code size (i.e. there's probably a lot of fixed overhead). And they appear to be using the "\--dev" compiler profile, which is unoptimized and meant for debugging.

</comment></comment><comment><USER48> I remember back when people generated html with native code using CGI.pm and it was considered a bad idea. Don't mix languages they said. The current CGI.pm deprecated all of the HTML generating parts in fact.

The official justification:

      The rationale for this is that the HTML generation functions of CGI.pm are an obfuscation at best and a maintenance nightmare at worst. You should be using a template engine for better separation of concerns. See CGI::Alternatives for an example of using CGI.pm with the Template::Toolkit module.

</comment><comment><USER49> Can you load WASM modules dynamically like we in do in JS with import()?

<comment><USER33> In some sense, that's the only thing you can do in the browser, as you have to execute JS to instantiate the wasm.

The code in this post actually uses import to dynamically import said JS that imports the wasm.

<comment><USER49> Right, I guess the tooling would need to support code splitting into separated wasm modules like we do with Webpack or Rollup.

</comment></comment></comment><comment><USER50> Am I the only one that finds this REALLY verbose for doing some really simple stuff?

Forewarning, I'm a JS dev trying to get out of the "JS" box. I'm super interested in WASM for a lot of reasons (running ML models on the client in python, etc).

This syntax (and maybe it's just Yew) feels like it has SO much boilerplate. For you seasoned rustacians out there, is this something that could be reduced? It feels overkill for me. But then again, maybe I'm a spoiled JS dev with the wrong expectations.

Really curious to answers on this.

<comment><USER33> It's hard to say without knowing what specifically you find to be verbose. "verbose" is a very subjective measure.

</comment></comment><comment><USER51> Frameworks like this and other similar non-standard approaches like Elixir Phoenix and LiveView are awesome, however, I'm still lost as to how one should go about styling and / or dynamically structuring styling?

Does anyone have recommendations for guides or simple approaches that only focus on the pure UI side of the problem. I've never really "had" to learn JS and honestly every time I have to dip my toes in it leaves a very bad taste in my mouth.

</comment><comment><USER52> What is the size of the served wasm binaries?

<comment><USER53> Looking at the linked demo site[0] the wasm file is 476kb (133kb compressed with brotli).

[0] [https://rustmart-yew.netlify.app/](https://rustmart-yew.netlify.app/)

</comment></comment><comment><USER54> What are the debugging tools like for this?

</comment><comment><USER55> You build your website in Rust, I build 3 websites in that same time with Python/JavaScript.

<comment><USER56> In which time I build 30 websites using wordpress. Heaven forbid the author does something for any reason other than productivity gains

</comment></comment><comment><USER57> 136kb feels heavy for what this is

<comment><USER58> A lot of that comes from a few large libraries needed to provide base runtime functions (like memory allocation).

</comment></comment><comment><USER59> Anyone know when all browsers will support 64bit wasm and allow >4gb memory?

</comment><comment><USER60> Is blocking WASM a thing yet? I guess I wouldn't know if I've launched a WASM page, but I was curious if WASM was popular enough for IT security folks to block on enterprise computers.

<comment><USER2> Not to my knowledge. I don't see any reason for it to be blocked, even in theory. It's not like you get access to a more permissive API surface or anything. If someone is going to feed you malicious code to execute, all WASM will do is make it harder to inspect.

</comment></comment><comment><USER61> I've been hearing good things about zig, and someone mentioned that zig has better wasm support than rust, is it true? I wish rust had a js ecosystem too ...

</comment><comment><USER62> Cannot wait for the days where i no longer have to write JS

</comment><comment><USER63> That's interesting. But, IMO it has a lot of room for improvement to compete with frameworks like React, Vue, and Svelte.

Isn't it?

</comment><comment><USER64> Thanks for this. I was wanting to look into this, and this page is way more than enough to get me started.

</comment><comment><USER65> Sorry for being the pedantic one, but the article early on states "without writing a single line of JavaScript" and then, in the first code, after showing configuration files, one can read

        <script type="module">
          import init from "/wasm.js";
          init();
        </script>

So two lines of JavaScript ...

<comment><USER66> And some HTML as well. Yew seems to use a JSX-like template language, but it's got to hit the DOM eventually. Then you're gonna need to handle Events and style with CSS. How do you handle errors? What does all this look like in DevTools? People act like JS is the worst part of web development which is simply naive.

<comment><USER65> About HTML they made no claims. For a SPA HTML also is essential (they could use GL if they don't want to use (lots of) HTML)

And errors and events are handled in the Rust code.

</comment></comment></comment><comment><USER67> > without writing a single line of JavaScript

Looks like 680 lines to me:

[https://rustmart-yew.netlify.app/wasm.js](https://rustmart- yew.netlify.app/wasm.js)

<comment><USER33> You do not write that JavaScript, it is generated for you by the tooling.

<comment><USER67> If the end solution relies on hundreds of lines of JavaScript... its JavaScript. I will just write the whole thing in JavaScript instead of messing with something like this.

<comment><USER33> Sure, and you are very welcome to do so. That's not what the original post said, nor what you said in response, though.

</comment></comment></comment></comment><comment><USER68> The wasm on this page is 476 KB.

</comment><comment><USER69> I was hoping "single page" meant all the code fit on one page.

</comment><comment><USER70> Whats the point. Javascrupt cannot have memory errors and has no threading, so why bother with a memory safe language like Rust?

<comment><USER53> Well for one Rust has a very nice type system

</comment></comment><comment><USER71> Why create web apps in Rust? Won't that slow down development?

<comment><USER72> Depends who the developers are. My company has been acquired several times over the past decade and it has been for our backend. The frontend has been largely left to rot and is a seldom used nightmare at this point. Our backend devs that use Rust may be asked to build a simple SPA for a client relatively soon, so you can understand why they _may_ be happy to give this a try for the POC. My initial impression is that it would require a lot less KT/overhead to at least give them this option before shuffling another team in that really doesn't have the roadmap bandwidth to begin with.

<comment><USER71> Fair point. I just don't know that right now at the beginning will be a good time. A solid ecosystem can make all the difference.

</comment></comment></comment><comment><USER66> I eagerly await every single NPM package being rewritten in every single language just so someone can post a ShowHN about it.

<comment><USER73> It's demo day everyday like kindergarten.

</comment></comment><comment><USER74> zero overhead on the web or just zero and overkill for the web?

Seriously I don't get the appeal of doing frontend in Rust? Isomorphic you say, thought Json solved that problem? Hell, I'd rather choose typescript even.

</comment><comment><USER75> So as I understand it Rust is compelling because it is a safer alternative to C++ ( and sometimes C but mainly a C++ replacement ).

We wouldn't usually create a single page app in C++ right? So why would we want to do that in Rust ( other than, "just because" ). Right tool for the right job and all that.

<comment><USER76> Rust is much more like Ruby than C++ while retaining the characteristics of C++/C. The build system and ecosystem is also excellent, something that you cannot say for C++.

In terms of WASM Rust and C++/C are in the same boat i.e. the few languages you can realistically use because they don't require a heavy runtime or GC.

</comment></comment><comment><USER77> Full-stack Dlang framework [https://github.com/huntlabs/hunt- framework](https://github.com/huntlabs/hunt-framework)

<comment><USER78> No wasm stuff here though.

</comment></comment><comment><USER79> I have never understood why people find UI challenging, aside from accessibility and security.

State management is ridiculously easy. So easy that you are going to 10x greater effort reading your favorite framework's API.

To manage state store your state criteria in a central object. Save that to storage somewhere, such as localStorage. To restore state read the stored state object and apply each item to its respective area of the application.

Modules and components are ridiculously easy now too thanks to ECMAScript modules.</comment>


Bitcoin Miner Bitmain Recently Cut Mining Production by 88% - <AUTHOR> https://www.tomshardware.com/news/bitmain-reduces-bitcoin-mining-production-cryptocurrency,39295.html <comment><USER2> So not even selling axes and shovels is viable anymore. Another one bites the dust I guess. Lucky me that I sold me stake in Q1 18.</comment>


OK Go's new music video, featuring an insane Rube Goldberg machine - <AUTHOR> http://www.youtube.com/watch?v=qybUFnY7Y8w

<comment><USER2> For anyone who's never tried: Building Rube Goldberg machines is insanely hard. The idea is to build a machine that looks as difficult and improbable as possible. Pieces that are destroyed or completely changed during the operation are par for the course. For each run, the entire machine needs to be reset manually. If one piece fails, you have to reset the whole thing.

The whole design process is basically fighting against yourself--how insane and ridiculous can I get and still have the thing work.

tl;dr We lost the Rube Goldberg machine contest and I'm still bitter.

<comment><USER3> I grew up playing Mousetrap.

That was a sweet game. :)

<comment><USER4> Was it a game? I don't know anyone who actually played it, we just built the trap and set it off. :)

<comment><USER3> That's what made it so sweet. Fun had nothing to do with any rules of play.

</comment></comment></comment></comment><comment><AUTHOR> Something else to note is that OK Go got its way with the label, and this video is embeddable.

For reference, see <http://news.ycombinator.com/item?id=1060736>

<comment><USER5> Is that what happened? The plug for State Farm at the end makes me think they did an end-run around the label and got somebody else to pay for the video, thus the record company doesn't own the video and they can embed it? (But then they'd still own the rights to the _song_ , so maybe not)

<comment><USER6> Maybe the label was alright with embedding if they could do a sponsorship deal to sub in for the otherwise lost revenue. (Recall that YouTube only pays the label for video views in a YouTube-hosted page.)

</comment></comment></comment><comment><USER7> Also must-see when discussing commercial Rube Goldberg devices: Honda's "Cog" commercial at <http://www.youtube.com/watch?v=rYabfifhEPE>

(Interesting in part because of how trivial it is to translate to different language.)

<comment><USER8> I love that ad. It was part of the original "power of dreams" campaign (they are writing text books about that) and all those honda ads rocked.

The only sad thing is it isn't a true device; it was filmed in sections.

<comment><USER9> It has a single cut in it, because the entire thing wouldn't fit in their studio. Slightly disappointing, but entirely understandable.

</comment></comment></comment><comment><USER10> Dear Lord. I can't even set up a few Dominoes without knocking them over accidentally. Imagine setting up some of the massive contraptions they did in this video. Accidental set-off could literally kill someone.

</comment><comment><USER11> On the first couple views I thought it had a cut while they reset the room--- then I noticed that when they do the coloured fluid opening the drape they're actually going down a shaft to a different floor, and you can definitely see everything set up if you look for it. I think this might have actually been all one take (there certainly are enough destroyed TVs in the background to make this plausible!)

Wow.

<comment><AUTHOR> I'm pretty sure it was all one take - most of their videos are like that. It may have taken multiple tries to get everything right ('Here it goes again', their most popular video with the treadmills, took 17 attempts, but they captured it all in one take [source:Wikipedia]).

No word yet on how many attempts this took - hopefully they didn't drop too many pianos

<comment><USER12> it took honda 606 takes to do the "cog" advertisement.. hope they did it in less

<comment><USER13> Judging by the TV's in the film, they had 9 or 10 goes at it, and still had 4 more TV's to go.

</comment></comment></comment></comment><comment><USER14> The guys who made the Rube Goldberg machine are brilliant hackers based in LA: <http://syynlabs.com/>

<comment><USER15> OK Go and a bunch of Syyn Labs peeps will be at a party on Friday, March 5 at LACMA. It's a bit spendy ($160 for LACMA membership + "muse" status + ticket price, plus god-knows-what for parking and cash bar), but it looks awesome enough that I'm tempted to pull the trigger. Maybe I'll see you there. :-)

<comment><USER16> There's a "OK Go Video Release Party/Young Director's Night COMBO Ticket" option for $47 (tix + fees). <https://tx1.lacma.org/default.asp> (go to special events for 3/5)

</comment></comment></comment><comment><USER17> Apart from the machine itself, I love the camera work. It seems that:

\- it (most likely) had to be a person, not a simple arm with camera, to pass through tunnels, etc. (yet the movement is really soft)

\- the person had to keep avoiding strings along the way, which I imagine was quite hard while keeping the view on current action

<comment><USER18> You can see the camera man's reflection in the silver ball about 2m28s into the video.

</comment></comment><comment><USER19> You should also see: Der Lauf Der Dinge (The Way Things Go). Which is a 30-minute long Rube Goldberg machine, although filmed in several stitched takes. It's really interesting as well as it also includes chemical reacting stuff.

Here's a part of that movie: <http://www.youtube.com/watch?v=GXrRC3pfLnE>

<comment><USER20> What an interesting video.. plenty of fire.

Using a Rube Goldberg machine would make one heck of an interesting way to light the Olympic Cauldron wouldn't you think?

</comment></comment><comment><USER21> How the Rube Goldberg machine Was Built: <http://www.wired.com/gadgetlab/2010/03/ok-go-rube-goldberg/>

</comment><comment><USER22> Starting at 2:30 the music is timed perfectly with the banners. Certainly the machine's timing was not that precise. How they were able to keep it synced up? It's impressive that a machine that looks so rickety still works.

<comment><USER23> I imagine they slowed down and sped up the video's playback slightly to match with the song's beat.

</comment></comment><comment><USER24> I'd really like to build one of these that plays music by itself (the sound of the machine operating plays a recognizable tune). similar to this (self playing super mario world):

<http://www.youtube.com/watch?v=WXmNjB4-JdE>

this would be an order of magnitude more difficult than a regular RG machine in meatspace as the timing has to be precise.

<comment><USER25> Obviously not the same thing, but have you seen the installation of birds playing electric guitar?

<http://www.youtube.com/watch?v=89Kz8Nxb-Bg>

I had the same thought as you when I watched the video - have the machine produce the audio track entirely.

</comment></comment><comment><USER26> What does Synn labs DO? This is amazing. I don't think anything I've ever done could possibly be as hard as that shot.

</comment><comment><USER27> I've never noticed a youtube video before that was offered in 1080p. Great picture and it loaded quickly too. Although there were a few hiccups in the video during quick pans.

</comment><comment><USER28> Details about the video:

<http://www.wired.com/gadgetlab/2010/03/ok-go-rube-goldberg/>

</comment><comment><USER29> The Making Of videos are great as well.

<comment><AUTHOR> I agree. I believe that the people cheering at the end of the video is everyone that helped out from Mindshare/Synn Labs.

</comment></comment><comment><USER30> I love PeeWee Herman-esque machines, used to try and make them all the time out of Meccano when I was a kid :)

Laughed when I saw all the broken TVs against the wall too :D

</comment><comment><USER31> the video is cool and all but does anyone like the music? seems to get lost to me... i guess it's really not about the music though. not one comment before mine even mentioned it...

again awesome video but it's going to be hard for them to keep topping themselves but now it's their MO

</comment><comment><USER32> The bullseye was the kicker! Great video.

</comment><comment><USER33> Hmm OK Go seems to have broken YouTube

<comment><USER34> yea. anyone know what intermittent

      Http/1.1 Service Unavailable

implies?

</comment></comment><comment><USER35> That was awesome.</comment>


Why Has Bitcoin's Price Gone Up So Fast? - <AUTHOR> https://www.nytimes.com/2017/12/07/technology/bitcoin-price-rise.html <comment><USER2> The volatility aspect attracts more and more quants when compared to the death of volatility in the US equities markets. Or so I've been told by friends in a quant lab...

</comment><comment><USER3> A rather content-less article.

</comment><comment><USER4> Seems pretty simple, everyone wants in on the moon mission and it's gaining critical mass amongst 'regular people'. The majority of these people are only in it to cash out so it's use as a currency has been greatly reduced, see Steam dropping support.

</comment><comment><USER5> 'tis the nature of bubbles

</comment><comment><USER6> Take your best guess when Bitcoin will fall of the cliff: [https://twitter.com/BitcoinPlunge](https://twitter.com/BitcoinPlunge)

</comment><comment><USER7> Well that was a useless article...?

Maybe the purpose was just to incite discussion here.

</comment><comment><USER8> 6 upvotes to be #2 on frontpage? how does that happen?

<comment><USER9> Based in some part on the relative upvotes of other posts in a time period maybe? California users probably haven't waken up in mass yet.</comment></comment>


Why Silicon Valley is a temporary phenomenon - <AUTHOR> https://startupblog.wordpress.com/2016/02/28/why-silicon-valley-is-a-temporary-phenomenon/ <comment><USER2> tl;dr Silicon Valley is temporary because all things are temporary. A better article would convincingly argue about how, when, or why Silicon Valley would lose its prominence in tech entrepreneurship.

</comment><comment><USER3> This is really gross writing.</comment>


Startup That Sells Zero-Days to Governments Is Offering $1M for Tor Hacks - <AUTHOR> https://www.vice.com/en_us/article/7xkp8q/startup-that-sells-zero-days-to-governments-is-offering-dollar1-million-for-tor-hacks <comment><USER2> Seems morally dubious from every angle: \- paying way less for what it is when you sell it to "governments", a hefty fee for a black market loop whole to sell your hacks \- is any government hacking people (either citizens or foreign nationals) a good thing? \- hunting "bad guys" is always the image put forth, but never the whole image

</comment><comment><USER3> Seems rather over-priced considering a random guy was able to control 23% of the TOR network..

<comment><USER4> Reference: [https://www.securityweek.com/malicious-actor- controlled-23-t...](https://www.securityweek.com/malicious-actor- controlled-23-tor-exit-nodes)

Sounds more like a team of people that knew what they were doing.</comment></comment>


Can Windows 8 save the PC from extinction? - <AUTHOR> http://money.cnn.com/2011/09/14/technology/windows_8_pc/index.htm?hpt=hp_t2 <comment><USER2> I was unaware that the traditional PC was in danger of disappearing. I think PC sales are down because its been years since most people have had a real need for an upgrade. Hardware purchased in 2008 is still more than usable. Software doesn't seem to be driving the need for hardware upgrades the way it did a decade ago.

</comment><comment><USER3> What sensationalist claptrap. The author can't even find consistency between his title and the content of the article itself:

"Laptop and desktop PCs will never die off entirely; the keyboard and big- screen form factor is ideal for desk-bound tasks."

Wait, I thought the desktop PC was bound for extinction? Now it's never going to die off entirely? Isn't that the definition of "extinction"?

</comment><comment><USER4> I'm not a Windows fan, but if you watch some of the channel9 videos and see what they've done with Win8, they may be on to something [finally]. They tried some of this with Vista, but with iOS showing them the way, they may have stumbled onto something that will actually work.

</comment><comment><USER5> Can we stop this meme? Other point out, quite correctly, that we're in sort of a PC golden age where anything runs everything. That's why sales are bad and probably why media outlets are on a doom kick: they have nothing else to say.

</comment><comment><USER6> The traditional PC (even... the desktop!) isn't going anywhere for a long time.

</comment><comment><USER7> Maybe Microsoft will have to redesign both the operating system and the PC architecture so that the PC still does the stuff of old on one half and competes with the cloud on the other.

</comment><comment><USER8> Can the peanut gallery on sites like hacker news save us from the unnuanced, bloviating and sensationalist fanboyism that passes for professional reporting these days?

</comment><comment><USER9> No.

</comment><comment><USER10> CNN jumped the gun here. I'm asking myself why someone thought this deserved to be on HN?

</comment><comment><USER11> The PC is definitely not going extinct. What _was_ going extinct was the Windows interface/way of doing things. That being said, any good software developer knows that design and dev are not mutually exclusive. A product can look absolutely spectacular, but fall apart due to bugs and other issues. Unless Windows 8 manages to completely eliminate things like the BSOD and frequent crashes, a new interface won't change a whole lot.</comment>


Ask HN: How can I work against ReCaptcha? - <AUTHOR> Recaptcha by Google is preventing me from filing formal complaints on the FCC website. I firmly believe recaptcha is evil. I don't see how we've come this far.<p>I can't find any cause against this and I'm surely not alone, right? Is there any lobbying group (EFF maybe?) that is working against this? <comment><USER2> You're not alone and I sympathize. This subject has come up on HN before but I'm too lazy to search for it. The consensus seems to be that although many people including web developers hate captchas, spam is a genuine problem and there isn't a good enough alternative to captchas for opposing it in the worst cases. If you can think of a more effective and respectful method I'm sure many people would be interested in your solution.</comment>


Cigarette smoking: an underused tool in high-performance endurance training - <AUTHOR> http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3001541/ <comment><USER2> This was posted on LessWrong yesterday, [http://lesswrong.com/r/discussion/lw/8j1/how_to_prove_anythi...](http://lesswrong.com/r/discussion/lw/8j1/how_to_prove_anything_with_a_review_article/) , short, but interesting, discussion.

</comment><comment><USER3> This is quite funny, unfortunately this shouldn't have been published on any other day than April 1st.

In case of doubt see this quote: _With this in mind, smoking should be commenced at as young an age as is reasonably possible. Children who have not yet developed a pincer grasp might require modified cigarette holders, safety lighters or both._

<comment><USER4> The had me until that sentence.

Actually increased hemoglobin levels in smokers wouldn't be surprising. The problem is that all of the increase (and then some, most likely) is bound to carbon monoxide and effectively inert.

</comment></comment><comment><USER5> This is a good example of the problem with review articles and it's very well done. Totally straight-faced until the part about children smoking.

However, I think the use of nicotine as a performance enhancer (not smoking though) is a pretty interesting subject. I've tried chewing nicotine gum and using a patch just to see if I noticed a difference (just a brief experiment I would never do it chronically). I did. Much better concentration, focus, energy etc.

I'm curious to see how the "electric cigarette" phenomenon goes. That would be a way to deliver nicotine without the other risks of smoking.

From what I understand nicotine is a carcinogen on its on, but I don't know how strong of one it is.

It would also be fun to see if we could synthesize non-carcinogenic molecules based on the nicotine molecule with all the positive performance enhancing effects.

</comment><comment><USER6> The headline definite drives controversy and thus views, but wouldn't a much better headline have brought up the very real fact that this has nothing to do with smoking for performance gains and everything to do with exposing 'reviews' as unreliable.

<comment><USER6> Then again, using a misleading headline to direct traffic towards a journal article that is inherently misleading on purpose has a sort of meta- awesomeness to it. It's like inception, except with obfuscation.</comment></comment>


Why 2 Crises May Finally Force NYC Schools to Integrate - <AUTHOR> https://www.nytimes.com/2020/06/11/nyregion/coronavirus-nyc-schools-admissions.html <comment><USER2> I would have longed for the privilege of testing into a good highschool when I was young -- let alone some of the best schools in the country. It makes me a little sad to see the call for the system be dismantled.

</comment><comment> hakka-nyu-su "Integrate" here is used in an unusual way; to mean the abolition of competitive standardized tests that produce majority-Asian schools</comment>


GenX Are a Retirement Time Bomb for the American Economy - <AUTHOR> https://medium.com/utopiapress/genx-are-a-retirement-time-bomb-for-the-american-economy-8de323da970f <comment><USER2> It's important to keep in mind that current workers _always_ are the ones supporting current retirees. It doesn't matter if it's through taxes in a pay- as-you-go system like Social Security, or through the various investments a fully funded account would own. At the net macroeconomic level, workers make stuff and a portion of that gets redirected to taxes, debt repayment, and return-on-capital that non-workers then consume.

In other words, GenX getting squeezed by debt payments and cost-of-living etc isn't something that comes ex nihilo. It's deeply related to the demographic situation - large number of long-lived Baby Boomers compared to the demographic makeup of prior generations.

<comment><USER3> And to keep social security solvent for GenX would require squeezing Millennials even harder by increasing the taxes or reducing payouts or both.

<comment><USER4> Or, you know, the US could refrain from starting three trillion dollar wars, and cut the bloated military budget.

<comment><USER2> That only buys time against the long-term trend of increasing retirees per worker. Which is great and all, but there's only so much military budget bloat to cut. Eventually you need either higher taxes or savings, more workers per retiree (eg, through raising retirement age), higher worker productivity, or lower real consumption by retirees.

</comment></comment></comment></comment><comment><USER5> > Almost half of Gen X respondents, defined as ages 38 to 53, said they have > no money saved in a retirement account.

> Curiously, the Gen Xers were the least likely generation to say they would > save or invest an extra $1,000, instead using it to pay outstanding bills > and debt.

How is this "curiously"? The fact that GenX has high debt balances is why their marginal income is more likely to go to paying (high-interest) debt rather than going into (low-yield) retirement savings, which is also why they don't have retirement savings since their money has instead been going to debt repayment.

<comment><USER6> > (low-yield) retirement savings

Not sure about that. The last 20 years (most of Gen Xers working lives), returns in the stock market have been reasonably good, despite there having been multiple recessionary periods.

Jan 2000-April 2019 S&P500: 5.688% annualized (190.085% for the period)

[https://dqydj.com/sp-500-return-calculator/](https://dqydj.com/sp-500-return- calculator/)

<comment><USER5> Low yield compared to paying off debt. Reasonably good stock market yields are still well below lots of the debts people have; 5.688% isn't much more than interest on a lot of federally subsidized student loans, and far less than on lots of consumer debt.

</comment></comment></comment><comment><USER7> "U.S. households with any kind of debt — mortgage, credit cards, student loans, auto loans, etc. — owe an average $135,768"

So, if we exclude everyone who has no debt, and include mortgage debt as 'debt', Gen X has a scary-sounding level of debt! Whodathunkit?

I started a new job last year, and it's pretty scary to login and look at my 401k, where it says: "People My Age: Average Savings Rate: 6%. Account Balance: $29,428". Now, presumably, some/many of their account holders ALSO have other retirement accounts, but I imagine the average age of these accounts is probably more than the 1 year I have into it.

<comment><USER8> Would probably be more useful to know the relative size of the mortgage that remains to be paid compared to prior generations at the same age. Or even - the average amount of debt relative to the holder's average annual income and compare that against prior generations at that age.

</comment></comment><comment><USER9> I wonder if this in any sense reflects the Gen-X cynicism I associate with the 1990s, the expectation that the system that bore up their parents would crumble before their turn came. Had perhaps already crumbled. Were they right? Is this self-fulfilling prophecy?

<comment><USER10> As a Gen-Xer, I think that cynicism had its roots in both the 80s and 90s with the number of companies that left our parents out to dry with disappearing pensions and people doing the math to realize that Social Security was unsustainable and would be gone by the time we retire. And somehow our generation was expected to support all of society including the generation behind us.

I would postulate the opposite - I would have thought because we believe that neither companies nor the guvmint would be there to support us, we would have fended for ourselves better (I know that's how I personally took it, and many/most of my friends). But you might be right... sounds like an attitude of "ef it, we're doomed" set in.

<comment><USER11> Social Security will not be gone, and it is not unsustainable at a macro level. Currently configured, it will pay out ~75% of earned benefits once the trust fund is exhausted in 2034. Several small changes, in concert, remove any insolvency concerns. It keeps 22 million Americans out of poverty [1], and is very efficient in terms of admin costs vs distributed benefits. I posit it's cheaper to keep those benefits recipients out of poverty, versus paying for what happens if they aren't kept out of poverty.

Healthcare? Universal healthcare (Medicare For All), allowing for shedding the current jigsaw of healthcare benefits across the country. Less admin overhead, more care providers. If you're a pension that committed to healthcare expenses (state & local government, and manufacturers), you should be ringing the Medicare For All bell the hardest, to get the necessary infrastructure in place before your shortfalls arrive.

> I would postulate the opposite - I would have thought because we believe > that neither companies nor the guvmint would be there to support us, we > would have fended for ourselves better (I know that's how I personally took > it, and many/most of my friends). But you might be right... sounds like an > attitude of "ef it, we're doomed" set in.

Most Americans don't have the discretionary income after mandatory expenses to save to "fend for themselves" due to forty years of wage stagnation. This is why so many must rely on government programs to survive. [2]

[1] [https://www.cbpp.org/research/social-security/social- securit...](https://www.cbpp.org/research/social-security/social-security- lifts-more-americans-above-poverty-than-any-other-program) (Social Security Lifts More Americans Above Poverty Than Any Other Program)

[2] [https://www.pewresearch.org/fact-tank/2018/08/07/for-most- us...](https://www.pewresearch.org/fact-tank/2018/08/07/for-most-us-workers- real-wages-have-barely-budged-for-decades/) (For most U.S. workers, real wages have barely budged in decades)

<comment><USER12> >Social Security will not be gone, and it is not unsustainable. Currently configured, it will pay out ~75% of earned benefits once the trust fund is exhausted in 2034

The trust fund is the government loaning money to itself. Ultimately, it is an accounting fiction. Instead of tax payers having to shore up a SS shortfall they have to pay back T-Bills. Either way, there's about 3 trillion dollars missing that will need to be paid.

<comment><USER11> As long as the US government exists and has taxing authority, the general fund will survive and be able to support paying back special issues securities [1] that were provided to Social Security. You can't invest the same way as Vanguard and Blackrock at nation state scale (ie "let's throw it all in a three fund/target date fund and call it a day"), although the Bank of Japan is going to be a pioneer in acquiring and distributing the gains from public companies in Japan [2] due to their demographic situation (which all first world countries will eventually transition through).

I would agree there are lots of liabilities (somewhere between single and triple digital trillions) we should start paying back now versus later though, before the debt service becomes unmanageable and we steal from savers by inflating the debt away, but this is a policy issue. We must stop kicking the can down the road, as a society, as a country, and as a species.

[1] [https://www.ssa.gov/oact/progdata/fundFAQ.html](https://www.ssa.gov/oact/progdata/fundFAQ.html) (Frequently Asked Questions about the Social Security Trust Funds)

[2] [https://news.ycombinator.com/item?id=19686549](https://news.ycombinator.com/item?id=19686549) | [https://asia.nikkei.com/Business/Markets/Bank-of-Japan-to- be...](https://asia.nikkei.com/Business/Markets/Bank-of-Japan-to-be-top- shareholder-of-Japan-stocks) (Bank of Japan to be top shareholder of Japan stocks )

<comment><USER2> >You can't invest the same way as Vanguard and Blackrock at nation state scale

You can, it's just that current consumption is fulfilled by current production. Current production gets allocated to some combination of return to labor, return on capital, and taxes. All else equal, the state owning more capital will just squeeze out some combination of return to labor and return on capital. If you look at the cash flows, there's no difference between the government owning 1% more of your employer vs taxing an extra 1% of the company's overall value.

The biggest practical consideration is that taxation is a much more visible way of paying for benefits for current retirees, so replacing that with less obvious means is more politically viable.

<comment><USER13> Taxes also provide steady cash-flow. For much of equity you need to sell in order to get money back.

</comment></comment></comment></comment></comment></comment></comment><comment><USER14> I'm wondering how these two statements comport:

> Just over half (53%) of Gen Xers report having three months worth of salary > socked away — money that could be used as an emergency fund. What's more, > 48% of Gen Xers said they're living paycheck to paycheck

Since 48 + 53 > 100, either there is a rounding error or there are people who have 3 months' savings who are also living paycheck to paycheck. I don't see how it's possible to be living paycheck to paycheck and have significant savings, unless this implies a sudden and relatively recent change in circumstances. It would be interesting to see if there is more detail on this in the linked MetLife study (which I haven't got time to read right now, unfortunately).

<comment><USER15> Is the 3 months of salary socked away somewhere it is accessible? I have hundreds of thousands of dollars in 401k, but I live paycheck to paycheck and have no readily accessible savings.

<comment><USER16> Why did you do that? You should be funding an emergency savings account before funding your 401k.

Why? To avoid the situation you're in - no easy access to savings.

<comment><USER15> Because my employer does 5% matching. So I put in my 5% and they put in their 5%. I know I should have an emergency fund, I just don't have the means to fund it.

<comment><USER16> I see. That's risky.

If you have steady employment, might I suggest opening a line of credit with your bank? If you have good credit the rate is reasonable. It costs you nothing unless you use it. And if you have to liquidate your 401k, you can pay it back in days.

</comment></comment></comment></comment></comment><comment><USER17> Are those stats really that different from those at or near retirement in the boomer generation? They're also likely better (in the weakest sense possible) than the projected retirements for Millenials forward.

<comment><USER7> Hard to say. We keep hearing that millennials can't afford to buy a house or have kids; OTOH savings rates went way up after the 2008 recession and have continued to fare surprisingly well.

</comment></comment><comment><USER18> The only comparison made in the article between Gen X and other generations was the subjective statement of being spoiled by their parents. If this article meant to be useful, it would compare other statements, like how many of the previous generation had funded retirement accounts at this age. Instead, it's doom and gloom scare tactics but I feel it lacks substantial information to provide value.

</comment><comment><USER19> I'm a little older than Gen X, but I share many of the same concerns. When the economy crashed, I saw many people I know who had done everything right in terms of retirement savings get wiped out just as they were retiring. They were ruined.

It's awfully hard to have any sort of trust in a system that allows this to happen.

<comment><USER20> If you're near retirement and your investments are so volatile as to be "wiped out" and "ruined" by a short term economic downturn then they are absolutely not doing everything right. In fact it's pretty much the opposite.

<comment><USER21> "love to blame individuals for systemic issues."

<comment><USER20> If by "systemic" you mean that the universe itself does not coddle you and prevent you from making poor decisions, then yeah sure.

<comment><USER21> Did the Bankers deserve 29Tn bailout?

How's that for "coddling and preventing them from making poor decisions"

The yield curve has already inverted so we're looking down the barrel of "Recession The Sequel."

But yeah, keep blaming GenX (and presumably GenY and GenZ) for someone else's problem. Many of them aren't even earning a wage to save, _avocado toast_ aside.

</comment></comment></comment></comment></comment><comment><USER22> frankly I am quite skeptical of the macro-economic predictions of a 'blockchain mark consultant'

</comment><comment><USER3> Paywalled. :(

<comment><USER23> How else do you expect journalists to retire?

<comment><USER24> Ads give me ads!</comment></comment></comment>


Git Concurrency in GitHub Desktop - <AUTHOR> http://githubengineering.com/git-concurrency-in-github-desktop/ <comment><USER2> For people just looking for a git client on Macs, I've been using GitUp for the past couple month's and it's _amazing_.

\- In-app git implementation for all operations; does not use the git command line at all

\- Lightning fast* (*for reasonably sized repos; it's not yet optimized for super large repos)

\- Simple yet powerful UI -- treats git as a graph and let's you operate on that graph.

\- Commit graph visualization that's actually useful (IMO)

I used to use mostly the command line with fallback to magit in emacs; now I almost exclusively use GitUp.

Obviously I'm still in the honeymoon/fanboy phase, but I really feel like it deserves to be better-known. Check it out!

[http://gitup.co](http://gitup.co)

[https://github.com/git-up/GitUp](https://github.com/git-up/GitUp)

</comment><comment><USER3> Perhaps I'm just feeling like a Grump Old Guy today itching for some down votes, but, why was concurrency control like this not in the client in the first place? Seems like a pretty core thing to an application designed to do destructive things to large swaths of files.

I bet the devs could code algorithms on a whiteboard like nobody's business though! /s

On a less-grumpy note, we really need a way in this industry to disseminate knowledge through the generations. I can't believe how many posts like this I read every day where someone rediscovers the same truths over and over again, that those of us with more experience also "discovered", and those before us, and so on.

<comment><USER4> It sounds to me like they erred on the side of caution on this and initially only performed Git operations serially. Presumably this allowed them to iterate quickly on a product without doing destructive things, with the downside being an unresponsive application. It likely wasn't built in to the product in the first place because it was seen as premature optimization. As the product matured it became more apparent that optimization was needed.

I'm also not so sure that this concurrency model was rediscovered. Sure, they applied it to Git, and created their own implementation, but they probably borrowed the idea from the countless Grumpy Old Guy's that have done this in the past.

Of course, this is all speculation. Feel free to correct me if I'm wrong.

<comment><USER3> I've been a user of this client for quite some time, and I've always had to use it with a light touch. Click one thing, wait until done, click another thing. Basically serializing things myself, because even though the UI allowed the input, the state of things would get really screwed up if you did things concurrently.

If concurrency control in a multi-threaded, multi-process, app is a premature optimization, well, wow.

At the end of the article the author states: "Before these changes, GitHub Desktop suffered from race conditions as units of work would become interleaved in error.

Since implementing the concurrent/exclusive locks we have seen an improvement in stability and performance. "

Sounds like they used to just let the client spin up multiple concurrent operations fairly willy-nilly.</comment></comment></comment>


New E-Mails Rock The Global Warming Debate - <AUTHOR> http://www.forbes.com/sites/jamestaylor/2011/11/23/climategate-2-0-new-e-mails-rock-the-global-warming-debate/

<comment><USER2> _I am senior fellow for environment policy at the Heartland Institute_

The Heartland Institute, brought to you in part by the Koch brothers: [http://millermps.wordpress.com/2011/04/12/beware-of-the- hear...](http://millermps.wordpress.com/2011/04/12/beware-of-the-heartland- institute-brought-to-you-in-part-by-the-koch-brothers/)</comment>


Stitch Fix: Introducing Our Cultivating Algorithms Visualization - <AUTHOR> https://multithreaded.stitchfix.com/blog/2020/03/02/cultivating-algos <comment><USER2> the text of the article is great! the D3 is way too heavy handed and distracted!</comment>


Chinese Tourists Challenge Cash's Reign in Japan - <AUTHOR> https://www.wsj.com/articles/smartphone-wielding-chinese-tourists-challenge-cashs-reign-11551609002 <comment><USER2> I've been living in Japan for about 6 months and recently I've felt a very aggressive local push to get people to use these barcode payment apps. For example I recall in January PayPay were offering a discount at FamilyMart (a konbini/convenience store) for signing up and using their app, then a few weeks ago LINE Pay had a similar promotion. Both apps offer loyalty points for paying with them.

But what's strange is this feels like a backwards step; you can also pay with your train IC card in konbini and now that you can get Suica (one of the train IC cards) on Apple Pay and Google Pay it's significantly faster to use that than unlock your phone, open LINE/PayPay and get the barcode. LINE Pay also have their own prepaid card and Mercari just launched their own prepaid card built into Apple Pay too.

Still, I wonder which (if any) will come out the winner and how many more will pop up in the meantime.

<comment><USER3> >But what's strange is this feels like a backwards step

Because it really is. And yet this is again the cheaper, arguably good enough alternative won. I don't like this QR Code future either, and I am not sure if anything can be done at this point.

</comment></comment><comment><USER4> flagged for being paywalled

<comment><USER3> While I don't like Paywalled post, I dont think you should flag a post just for being paywalled. And that is not how it works here on HN. From the FAQ

>Are paywalls ok?

>It's ok to post stories from sites with paywalls that have workarounds.

>In comments, it's ok to ask how to read an article and to help other users do so. But please don't post complaints about paywalls. Those are off topic.

<comment><USER5> What is the WSJ workaround?

<comment><USER6> outline.com still works</comment></comment></comment></comment>


2012 Apple Design Award Winners - <AUTHOR> https://developer.apple.com/wwdc/awards

<comment><AUTHOR> Some good choices. Limbo is currently on sale in the Humble Bundle [1] (along with a bunch of other great games), if you want to try it.

FiftyThree (iPad app) looks really polished and fun to use, though I don't have a stylus. Is it still a stellar drawing app if you are just using your fingers?

[1] <http://www.humblebundle.com/></comment>