HNHacker News
TopNewBestAskShowJobs

bernawil

454 karma · joined March 7, 2013

submissionscomments
bernawil··on Dozens of malicious PyPI packages discovered targeting developers
You're describing a chroot jail. key there is "process". Dealing with processes permissions is the OS's job.

A if a language wants to deal in library's security it should strive to make static analysis possible. Eg: the language guarantees that network and filesystem calls can only be done with a single function, statically so I can audit that leftpad indeed doesn't make network calls .

bernawil··on Dozens of malicious PyPI packages discovered targeting developers
A resource access model for dependencies doesn't make much sense to me, there's basically only 2 things you want to gate access for libraries: filesystem and network. And it's all-in. A library that needs network access may be legit today and after an update start exfiltrating data to a different url. It seems easier to grep for fs and network calls in the library code than any of that.
bernawil··on How Faithful Is Amazon’s Rings of Power to JRR Tolkien’s Books?
This is it. The writing is just awful in every sense. I mean, the story begins with Galadriel not wanting to leave Middle Earth. At that point I though: "okay already stranding off canon but let's keep an open mind. So she's going to return to Valinor, have a chat with the Elven higher ups, (maybe even the Valar!) and go back to Middle Earth to continue her mission with renewd support. They're really going to show off with those billion dollar sets of the blessed realm!". But nope, the writers really thought that having her jump overboard the ship into the open sea, just swiming, was a believable thing to write.

You can't write Tolkien elves like that. At this point in the story Galadriel is like 3000 years old yet her dialog is that of an inexperienced teenager when she has already seen everything (or knows someone who has) there is to see in the whole world.

Then there is the tone. The harfoot sections are the most unwatchable with an almost Dinsey vibe. The Numenoreas acting feels like the cringey dialog right before they start singing in a musical.

bernawil··on The new wave of React state management
I think this is a bad take on an old premise. It's not that "global state is bad", rather, "global MUTABLE state is bad". Which is kind of right but for the wrong reasons. Truth is, "mutable state" is bad and "mutable global state" is even worse. That comes from the old times of OOP when people insisted in "encapsulating" state and relied on mutation.

It's sort of a logical fallacy. How could global state be bad if reading from a database o an API is essentially that? The problem is mutation, that if global state is mutated somewhere, other places that read the same state don't know about it.

Modern state managment instead is immutable and is not even an original idea of React. Redux was basically copied from Elm's state management.

bernawil··on The new wave of React state management

  The state that remains is often simple enough that plain old React state management with useState/useReducer is sufficient
hah this is an understatement. For hooks, the React runtime already does a ton of non-standard-js things under the hood. useState gives a method to update and "subscribes" a component to updates on the hook's value. Put that code in a custom hook, export it and you re-invented Redux. In fact, exporting a single big useReducer for all your state gives you something almost identical to old style Redux.
bernawil··on Why hasn't Middle Earth had an Industrial Revolution?
This is pretty much it but it's larger than that. It's not just "magic", it's the whole nature of Tolkien's world. The world has a creator-all-powerful God and everybody in it knows it. He created all sentient creatures in it for his own entertainment. Everything that "is", is however he wants it to be and that's the nature of things, there's no Science to "discover". The world was flat like a thousand years ago until some men interfered with God's entertainment and he sank their island and reshaped the world round. Nobody doubts this too. There's many immortal beings out there you can ask firsthand (the Elves). Oh and those also know (or know someone who knows) the lesser gods that know the God. He's real.

Men in the world of Tolkien don't have any reason to "innovate" or even inquire about the world, really.

bernawil··on Elden Ring Succeeds by Ignoring 20 Years of Open-World Design

  I honestly don't get the appeal and cult-like following around them.
Dark Souls came out in 2011, right when Youtube started heavily promoting gameplay videos (Minecraft came out the same year). It was probably the only "hardcore" action-adventure game available in consoles, so it picked up a niche.

The basic formula is nothing special really: take any action-adventure game, give regular enemy mobs 5x the HP, 20X for bosses. Crank up enemy damage so that player dies in 3 hits, 4 tops. Boom, you've got a Souls game.

Lots of mechanics are very out of place for a modern game. Enemies just follow their very limited waypoints until you get into their aggro range, then chase using what is very outdated pathfinding: they won't climb trees or get to you if they're not in almost a straight line of sight. Often they'll stay in a walking animation as soon as finding an obstacle. Ladders seem to be an exepetion, though.

Combat AI is very old-timey too. Enemies have 2, 3 animations that they alternate. And they are very rigid: they'll perform their fixed animations through obstacles -clipping through-, like columns or trees, trying to get to the player in a straight line of sight.

I don't think it's fair to call it an open "world" either. A world almost entirely populated by barebone AIs that exist solely to patrol their 2 waypoint routes waiting to attack the player and respawn after resting at a checkpoint makes sense as a "world". Reminds of early 2000s MMOs, specially Lineage II.

Only the player character is actually doing stuff. Everything else just sits and waits.

It's like the game doesn't even pretend not to be a game. In that I think it's somwhere in the oposite of something like Assasin's Creed that tries to explain its videogameness away, where the assasin gameplay is explained as what happens when your character relieves their ancestor's memories.

But the Soulsbourne games scatch a particular itch...

the general sin of melee action games is how unchallenging the combat is. Most of the time feels like swinging a weightless sword with a baseball bat animation much too fast. Or shooting arrows with a bow will be like a machine gun for toothpicks. Show the game to the non-initiated and the first thing they'll mention is how it takes a long time to attack. Also one of the first games with shield mechanics. RPG games before basically slaped a +25% defence! and called it a day.

bernawil··on Blame Cronyism, Not Capitalism
Commerce, capitalism, etc. nothing works under extreme wealth inequality, prices just don't matter then. When someone has too much wealth compared to the others, it doens't even make sense to trade when the rest can only sway your wealth so little.

So when arguing about inequality, we're actually arguing just how much inequality exactly the system can work with.

bernawil··on Tips to grow your North Korean Startup
I'm saying public companies -as in trading in the stock market- (and to a lesser extent private ones too) and corporate culture is very similar to communist government.

Schumpeter said something in the lines of "it's ironic that in democratic free-market countries most economic activity happens under hierarchical top-down organizations".

bernawil··on Tips to grow your North Korean Startup
NK is really the odd one there with the hereditary thing and all. Almost all other communist "dictatorships" are really not that different from US style corporations. Basically, organizations staffed by common people jockeying for position. Sometimes climbing the ladder on merit, sometimes politicking but you get the point. Being family with the CEO helps proably as much as being family with the head of the politburo.

And if you think about it, how much of American culture in the 20th century was a result of things that came out of corporate boards?

bernawil··on Tips to grow your North Korean Startup
> If you were a Cuban that supported the Cuban regime and were happy, why would you leave, taking on so much risk and expense?

I met a Cuban like that. Simply put, to make more money. He knew the nuances of their system and was thankful for the good parts and the opportunities he had, but at the end of the day knew that for him individually it was more convenient to leave when he had the chance. It's just something that doesn't work for everybody by necessity.

I think he had a relative abroad that sponsored some sort of student visa, and he just never went back.

bernawil··on Ask HN: Who wants to be hired? (November 2021)

  Location: Buenos Aires, Argentina. GMT-3
  Remote: Yes
  Willing to relocate: No
  Technologies: NodeJs, React, Typescript, Docker, SQL, AWS (SQS, SNS, Lambda).
  Résumé/CV: https://tinyurl.com/87tu8w94
  
Full Stack developer. I love delivering complete features and taking full advantege of Cloud solutions. Experience includes ThreeJS (with react three fiber).
bernawil··on Ask HN: Who wants to be hired? (October 2021)

  Location: Buenos Aires, Argentina. GMT-3
  Remote: Yes
  Willing to relocate: No
  Technologies: NodeJs, React, Typescript, Docker, SQL, AWS (SQS, SNS, Lambda).
  Résumé/CV: https://tinyurl.com/87tu8w94
  
Full Stack developer. I love delivering complete features and taking full advantege of Cloud solutions. Experience includes ThreeJS (with react three fiber).
bernawil··on Intel breaks ground on $20B Arizona plants as U.S. chip factory race heats up
> which is in fact too pure to be just dumped back in the ground, needs to be re-mineralized before it can be dumped

how so? isn't rainwater also "pure H2O"?

bernawil··on Home Price to Income Ratio
people are arguing here that housing in Europe is even less affordable than in the US, so what is even the point?
bernawil··on Chery QQ Ice Cream goes on sale in China – a modern electric car for $4,600
This applies to mostly any other country in the world as I can't think of anywere where they regulate vehicle sizes. Yet you don't see nearly the same ammount of SUV in the roads. And in fact I think an SUV makes more sense in the third world: road maintenance is generally much worse with potholes everywhere; traffic enforcent much less effective, so speed bump everywhere too; a big truck is probably safer than a small car if you're about to get robbed in the street... the real "tragedy" of the US is people being too rich and things people worry about in other places like gas and financing being so cheap.
bernawil··on A Victoria man has gone two decades without money
The book (Debt, The First 5,000 Years) goes over this (IIRC it's in the Games with Sex and Death chapter). It says that these kinds of "weird money" examples like stone wheels in Micronesia, where not really used to trade for goods, but more or less to trade in social favors / honor systems.

The early mesopotamian cilivilazations got debt and credit before there was coinage. Farmers bought goods on credit, the debt set in grain for example, to be payed on harvest season. Grain, would be as good as money since that's what you paid your taxes in. The whole region had a sophisticated credit culture and the effects of debt were pervasive. That's why the old testament has provisions against usury, the jubilee, etc.

bernawil··on The Yoghurt Mafia
Here's my lazy technique.

Get the biggest thermos flask you have. Get as much milk as it fits.

Get any yogurt. So far literally anything has worked: flavored, with added sugar or even the cheap versions with lots of gelatin.

Heat the milk around until it boils. Add sugar until it's slightly sweet but not too much (this will feed the culture. It won't be sweet after). Let it chill until 40c or slightly above body temperature.

Now mix in the yogurt, you need like 6 teaspoons for a liter milk, but just pour the container you have for good measure.

Pour the mix in the thermos flask and leave for aprox 4 hours, or until the whey separates. After that, the longer you wait the more acidic the yogurt gets.

Now time to strain. I put a sheet of coffee filter paper on the bottom of a pasta colander and another container beneath to collect the liquid. Pour the yogurt there, leave overnight in the fridge and you get thick Greek yogurt.

bernawil··on Desertification in Romania (2020)
I first heard it in Short History of Progress. https://www.youtube.com/watch?v=AsPMaGdg_38

Wheat yields progressively fell as salt accumulated in the ground. They switched to barley until that crop failed too.

According to the book, almost all ancient agriculture was unsustainable. If not because of the irrigation, it was because plowing caused too much soil erosion. The only places that could get away with it long-term were Egypt and China, because of the flooding and lime replenished the soil.

bernawil··on We are publishing the tax secrets of the .001%
That's interesting, can you expand?
bernawil··on When six boys were shipwrecked for 15 months (2020)
Hunter gatherer societies fought all the time for control of hunting grounds.

What's interesting it's that researchers that lived with the Yanomami and other Amazonian peoples noted that most inter tribal conflicts weren't about competition for food sources-that was rather plenty- but instead for women. In polygamous societies, high status males acquired many wives and young males frequently kidnapped neighboring tribe's women which sparked constant retaliatory raids.

bernawil··on Helix: a post-modern modal text editor
there's two things that make my hands cringe: drag-clicking (e.g drag file to trashcan) and mouse-wheel click (close chrome tab).

I built a trackball into my split keyboard and now I move it with my right hand and perform al clicks on my left hand side of the keyboard.

bernawil··on France's 18-year-olds given €300 culture pass
probably because kebab is basically taco. Tacos with weat tortillas and the meat prepared in a cylinder were introduced by lebanese immigrants.
bernawil··on Companies may be punished for paying ransoms to sanctioned hackers
> For many countries such thing could never be enforced

so it follows that if a country bans ransoms payments criminals will just ingnore that country and focus on the next easiest target, putting pressure on every country to follow the example and ban it too.

I think this will be very effective at stopping the most sofisticated targeted attacks but won't have much effect on indiscriminate "viral" attacks because those attack indiscriminately and wrecking targets from banned countries at least would serve as detterrant for victims in countries that can.

bernawil··on Companies may be punished for paying ransoms to sanctioned hackers
it's a textbook prisoner's dilemma paradox.

If everybody agrees not to pay ransom and follows through, criminals won't try to hack companies to collect ransom.

But as an individual company, you can't coordinate with everybody else to prevent everybody from paying ransom, so not doing so puts you on disadvantage.

Philosophically, the usefulnes of government is to threaten violence to solve the coordination problems amongst individuals.

bernawil··on Was cancer less likely in a pre-industrial world?
I had the same question reading Tolkien. The Elves don't age. They live amogst deities and have first hand knowledge of the creator of the universe. More so, they even know beyond doubt the fate that awaits those who die from other means: awaiting the end of the world in the comparatively boresome Halls of Mandos. Why would any Elf go to war as often as they do in Tolkien's universe seemed unexplicable.
bernawil··on Rockstar thanks GTA Online player who fixed load times, official update coming
If a company knows that it'd actually cost 300k to hire the local kind of engineer that could make 150k in the Bay Area, that company is either going to move to the Bay Area or hire Bay Area-like engineers as remote contractors to get their 150k worth of engineer for 150k.
bernawil··on Monolith First (2015)
But how monolithic were our monoliths anyway? Take your bog-standard ecommerce solution, built with a LAMP stack.

Okay, we've got a php process. Let's put our business logic there.

Okay, I need a database. With current cloud practices, that's probably going to be deployed in a different machine. We've got our business logic service and our datastore separated by a network bound from the get go.

Okay this is not very performant, I need to cache some data. Let's add a redis instance in our cloud provider. I guess this we'll be our cache service.

Okay we need to do full-text search, let's add an elasticsearch cluster through our cloud provider.

Okay I need to store users. We can built that into our business logic core, of course, but screw that. We are using Auth0. I guess our "user service" is distributed now. Okay, my php process can't keep up with all this requests, let's scale this horizontally by deploying multiple php processes behind a load balancer!

Okay, now I need to do some batch processing after hours. I could add a cron job for that, but I don't want to deal with everything needed for retrying/reprocessing/failure handling plus now that it's a multi-instance deployment it's not even clear which process should do this! Let's put this work in a Lambda from our cloud provider.

So until now, we had a star architecture where everything talked to our business core. But adding this lambda that will talk directly to other services without consulting the core we've lost that.

Now, stripping out the business core into its constituent parts doesn't sound so strange, does it?

bernawil··on Cincinnati is home to the largest unused subway system in the world (2016)
That sounds fair, but another pov: I'm pretty much in favor of subways but I'd be opposed to any light rail project in a heartbeat.
bernawil··on Cincinnati is home to the largest unused subway system in the world (2016)
But is it fair to compare light rail with subways? Seems to me light rail is the worst of all worlds: Slow, low carrying capacity, subject to the same traffic as cars and probably expensive.
← PreviousPage 5 of 10Next →