Better HN
topnewbestaskshowjobs
Log inSign up

lj3

1,746 karma · joined Apr 27, 2016 (10y ago) · 1,002 submissions

hn@lj3.me
Submissions

comment 7y ago · link · parent

Please don't commit the genetic fallacy here of all places.

comment 7y ago · link · parent

I do not imply the use of Context. useState() hooks into the local state of whatever component runs it. For example, if you have the following hook:

    function useMagicNumber(default) {
      const [magicNumber, setMagicNumber] = useState(default)

      return [magicNumber, setMagicNumber]
    }
And the following two components that use said hook:

    function ExampleA({}) => {
      const [magicNumber, setMagicNumber] = useMagicNumber(1)
      console.log(magicNumber) // 1
    }

    function ExampleB({}) => {
      const [magicNumber, setMagicNumber] = useMagicNumber(2)
      console.log(magicNumber) // 2
    }
ExampleA and ExampleB share the same code that's run in the hook useMagicNumber, but the state reflected is unique to the component.

comment 7y ago · link · parent

> I expected a deeper dive into the complexities of these arguments.

Public intellectuals are attempting to appeal to the public at large, the majority of which don't change their minds based on new information. They change their minds based on how that information makes them feel. Trying to convince most people to change their minds with a complex argument is a lot like trying to convince most people to change their minds by talking in Italian instead of English.

comment 7y ago · link · parent

Maybe something similar to what we have now, but exposes much lower level aspects of the browser and gives you more fine grained control over it. WASM is a good starting point in that it lets you use whatever language you want. Now, we need a browser API that will let us draw directly to the window if we want to. I think a lot could be accomplished by creating the UI portions of a site programatically then dumping the content into a "renderMarkdown()" function.

That's just my idea, though. Hopefully, the current sad state of the web and the coming browser monoculture will spur others to experiment too. I know some gaming companies have experimented with the distributing and executing of x64 binary executables using the browser. I know others are looking into ways to chop up and do progressive loading on binary executables.

comment 7y ago · link · parent

> as multiple independent components might want to share state or listen to shared events, etc.

If you recall, I said...

> Hooks are great because it keeps the state local, but it can be re-used across components if we need to.

The use case you just defined is exactly why hooks were created.

comment 7y ago · link · parent

> am simply using redux to manage all state

This only works in small apps. I work on a medium sized app at work and we started that way too. It becomes a huge, sloppy mess in short order. Putting everything in Redux is akin to a desktop application that uses nothing but global state. Hooks are great because it keeps the state local, but it can be re-used across components if we need to.

comment 7y ago · link · parent

> UI has typically been considered one of the areas where OOP is well suited for

Without any evidence to support it. It's one of those phrases that gets repeated without critical thought.

comment 7y ago · link · parent

This could be a huge opportunity. We have a web monoculture now. It's only going to get increasingly so over the next few years. Google will let the platform stagnate, as it has little to no reason to compete. It's time to come up with something better. Something designed for both documents and applications.

comment 7y ago · link · parent

I wonder if we'll see a resurgence of "real work" ui for desktops and laptops now that most of the "everyone else"/"the mainstream" has shifted to mobile.

comment 7y ago · link · parent

> and bring the country to a grinding halt.

And if it didn't come to a grinding halt? They risk demonstrating how worthless their jobs are.

comment 7y ago · link · parent

I think 3d holographic projections will be bigger than both.

comment 7y ago · link · parent

Can confirm. I fondly remember late nights hacking the Gentoo kernel so my college radio station could reliably live stream shows via icecast and darkice.

13.

Jonathan Blow on Linux Game Development(twitter.com ↗)

4 points · by lj3 · 7y ago · discuss

comment 7y ago · link · parent

> Yikes, when did HN become so full of haters?

Since at least 2007. I'm sure we all remember the warm reception the Dropbox Show HN[0] got?

[0]: https://news.ycombinator.com/item?id=8863

comment 7y ago · link · parent

Don't forget a blood boy. You gotta have a blood boy.

comment 7y ago · link · parent

I would love to if the US had the same food quality laws that European countries have. By HN standards, I'm a right wing nutcase and am in favor of as small a government as we can stand, but our food is killing us.

Bread has sugar in it. If you want bread without sugar in it, you must either pay more for the organic stuff or make it yourself. If you want bread without any additives or preservatives at all, you must buy your wheat from outside the country. Wheat in the US is fortified with iron and vitamin B by law.

comment 7y ago · link · parent

Human labor is still cheaper and more consistent than current AI and ML systems.

comment 7y ago · link · parent

interesting. Thanks!

comment 7y ago · link · parent

> The end of copper clad fiberglass boards are in sight

Where can I read more about that? My google searches have not been fruitful.

comment 7y ago · link · parent

I hate to be that guy, but... https://news.ycombinator.com/item?id=15703544

There's a reason enrichment of foods is illegal in most of Europe.

comment 7y ago · link · parent

Initially, I balked at your suggestion that the 3rd amendment is not relevant anymore. Then I thought about it for a few minutes and realized you're right. In the age of 4th generation insurgency warfare, housing your military in private homes is a very, very bad idea.

comment 7y ago · link · parent

What's the alternative? Arming the kids?

comment 7y ago · link · parent

This already exists. It's called a concealed carry permit. Giving somebody who has no law enforcement powers a badge is a bad idea.

comment 7y ago · link · parent

Exactly the same here with my 4 nephews (into minecraft, distracted by breath of the wild for a bit, then back to minecraft) with one exception: they're also into all things lego.

My niece, which is the same age as two of the nephews, is far more into her dolls than video games. Although, she does like the occasional game of mario kart or kirby and the rainbow curse.

comment 7y ago · link · parent

Have they fixed the git corruption issue yet? I switched from WSL to MacOS specifically because, if the computer blue screens while I'm working in WSL, something in the .git directory corrupts itself and I have to check out the repo again.

comment 7y ago · link · parent

I worked my way through grad school with a 17 inch macbook pro. I would work in between classes by sitting in a chair in the lounge, putting the laptop on my lap and working. The height of the arms of this one chair was perfectly level with the top of the laptop. The angle of the chair back put the screen straight ahead in my vision. The ergonomics were almost as good as working at a desk.

Ikea doesn't sell that chair anymore and apple doesn't sell that laptop anymore. sigh

12345
34