HNHacker News
TopNewBestAskShowJobs

Ralfp

1,999 karma · joined October 16, 2013

xstack developer working with Python and JavaScript

I've created Misago open source forum software which I am actively improving in my spare time: https://github.com/rafalp/Misago

submissionscomments
Ralfp··on TailwindCSS v2.0
Windows updates are replacing that with Edge on Chromium, even on "unsupported" systems like Windows 7, so here's that.
Ralfp··on TailwindCSS v2.0
I have a Windows 7 machine around that used to run IE 11, but one day it silently updated that to "Edgium", which is great.
Ralfp··on How to deal with extreme physical pain
As migraine sufferer, I find relief in only two thoughts:

- my migraines last 4 hours and happen once every 3-6 months, and there are people who have 72hs long migraines, or migraine every few days

- I could've had cluster headache instead. People suffering from those call them "suicide headache" and are known to hit their head against different objects, because losing consciousness or felling other pain is preferable to it: https://www.youtube.com/watch?v=OO5oDaG45kE

Ralfp··on What’s so exciting about Postgres?
Few years back I've had friend explain the difference between MySQL and PostgreSQL like this:

- MySQL: do it fast, then make it right - PSQL: do it right, then make it fast

Ralfp··on [dead]
Oh, much I wish there was a re-release of original Blair Witch game (and Nocturne as well):

https://www.youtube.com/watch?v=LjOEWP_Zl_g

Those games are very hard to get by legally, and it takes plenty of effort to run them on modern systems.

Ralfp··on Peter Elson: Science Fiction Illustrator
Homeworld from 1999 was heavily inspired by Elson's work:

http://www.peterelson.co.uk/images/gallery/large/PebbleInThe...

vs

https://www.mobygames.com/images/covers/l/3936-homeworld-gam...

There is even character named "Group Captain Elson" as tribute to Peter.

Ralfp··on Big Bounce Simulations Challenge the Big Bang
> Can you prove we aren’t in a simulation?

In context of scientific debate, no Simulation theory exists. Only hipothesis, and a very weak one, considered it’s not falsifiable. Hence its treatment as curiosity and thought experiment by scientific community.

Your hypothesis needs to meet some requirements in order to be scientifically viable to research. You cannot throw out scientific method out of window because it appears „close-minded” to you.

Until proof appears that singularity is not errasing information, scientific approach is to find a proof that there’s no singularity as threshold between old and new universe within a cycle. And argument for that is currently based on interpretation of some features pf cosmic background, which is scientifically debated.

Ralfp··on Big Bounce Simulations Challenge the Big Bang
I truly dyslike when somebody uses that particular phrase, because it frames other participant as somehow close minded.

The fact that Penrose’s work is possible and ongoing is proof enough that scientific discourse on the matter is open and possible.

Ralfp··on Big Bounce Simulations Challenge the Big Bang
Scientific approach to the matter is actually simple: its scientifically impossible to research state before the big bang because no information from before original singularity is available. This makes question non-scientific.

We have wiggle room for planck epoch because that time was after singularity, meaning that we have information from that time (however little of it is left).

Closest we got to science here is by extending the time and space axis across the diagrams point of origin. This is where idea of singularity being in heart of higher level universe black hole (or past universe’s collapse) comes from. Its inpossible to verify black hole idea due to deletion of information, but collapse/crunch should be observable in distant future of the universe. Perhaps dark energy still has some tricks up its sleeve?

Ralfp··on The New ‘Gold Rush in Space’
SpaceX launch cost is roughtly half of competitions for same payload: 40mil USD vs 90mil (Ariane Space).

40mil is far more affordable than 90mil, and they are promising lower prices in future.

Ralfp··on Django 3.1
Apache or FCGI?

In python world you have few Django processes spawned by WSGI/ASGI app container, and those processes spawn python threads to handle requests. Because python uses GIL, no more than single thread is executed at single time per process. At specific times GIL stops running bytecode for one thread and moves to next one (eg when you do IO). This means other threads keep running, but in theory you can run out of threads.

In async you use tasks instead of threads for http requests, so single process can handle multiple requests at same time, only spawning threads at limited number of situations.

Ralfp··on Bootstrap 5 alpha
Bootstrap is so much more than grid. It has plenty of useful components too.
Ralfp··on Async Python is not faster
Django is not async yet. You can run it over ASGI but parts of it (eg ORM) need extra compat layer (sync_to_async wrapper) for async to work.
Ralfp··on Apple’s butterfly keyboard failed by prioritizing form over function
It was... okay until it failed... and then replacement also failed few months later.
Ralfp··on Roman mosaic floor found under Italian vineyard
This is not really true. The rich (patricians) formed entire houses and used combination of wealth and political influence to maintain their positions. Even if their number wasnt greater than few thousands, they de-facto owned the Italy during Roman Republic.

Relatively speaking, they were most numerous within Rome, but they also owned lands they had lower class people and slaves farm for them that they sometimes visited.

Ralfp··on Roman mosaic floor found under Italian vineyard
Oh, but it was conmoditized even then. Roman society was suprisingly „modern” on many fields, and their approach to art was no exception. Rich paid the creators to create such art on their properties to increase their value.
Ralfp··on Christopher Tolkien has died
I would assume not being paid for those movies had something to do with it?

In February 2008, the Tolkien Trust sued New Line Cinema, the studio behind the Lord of the Rings trilogy, for £75 million claiming they had not received "even one penny" from the films. A request for punitive damages was denied in September 2008. (In March 2008, New Line Cinema became a unit of Warner Bros. Entertainment.) The case was resolved out of court on 8 September 2009 with the terms not made public.

In a press release, Christopher Tolkien stated, "The Trustees regret that legal action was necessary, but are glad that this dispute has been settled on satisfactory terms that will allow the Tolkien Trust properly to pursue its charitable objectives. The Trustees acknowledge that New Line may now proceed with its proposed films of 'The Hobbit.'"

https://www.telegraph.co.uk/news/worldnews/1578442/JRR-Tolki...

Ralfp··on Apple's secrecy doesn't work for Apple TV+
No built-in mechanism but I’ve had zero problem using system’s screenshot feature to catch interesting scenes and share those with others.
Ralfp··on FDA approves new treatment for adults with migraine
> A migraine is your body telling you something is wrong with your most valuable asset. > Are you sure you want to sweep this problem under the rug? > Good luck with your search for health and wellbeing.

Not saying you are quack, these days reading things like this sets off an alarm for me. I've learned all too-well by my years of dealings with "health-conscious self-help" community that a lot of it is just step away from medical quackery. I suspect the reason for this is D-K effect in people who think that by reading up things in internet they can somehow out-do existing research in the field. I know a person with masters degree in CS who managed to convince himself through the reading of wikipedia and "self-help" books that he was feeling bad due to levels of acidy in his body, condition which he "keeps under control" by drinking bottle of vinegar a day. That was weird, but nothing bad (I believe?), but over few months he became extremely preachy about modern medicine is a scam developed to sell people pills, and it's all solvable by diet and healthy living.

We don't know what causes migraines, and the subject is very hard to research because no there are no apparent differences in anatomy and bio-chemistry between people who suffer migraines and those who don't, and you would need to run tests on sufferer during migraine as it leaves no trace in the body few hours after it ends.

There been many leads that turned out as flukes over the years. Maybe it's something with hormones? Nope. Maybe its blood circulation in the brain? Nope. Pressure on blood vessels in the neck? Nope. Latest discovery is different levels of calcium in brain-spinal fluid in those that suffer migraines and those who don't... so naturally migrainers on Facebookgroups are now all the rage about removing salt from your diet (oh, but this from the top of the mountain salt ten times the price is good for you!).

Ralfp··on Django 3
Can you explain why asyncio is not good?
Ralfp··on Volkswagen Axes All Non-Electric Racing Programs Worldwide
They no longer do this. In yesterday’s race Felipe Massa finished with 0.5% of charge left, but most of competition was at 3%.

It’s a league with a lot of overtaking, small circuits and confusing realisation - its super hard to know who’s who on track without prior research because they never display which car number is who during race - something that’s a must have when most of the grid is black and red variation. Also because circuits are small and street tracks, there is a lot of camera hopping which makes it hard to get idea of the pace.

I feel they should do three races 35min+1 lap on proper race track instead, but maybe theres reason against it?

Ralfp··on Volkswagen Axes All Non-Electric Racing Programs Worldwide
Racing car market is much bigger than WRC.

Look at any semi-successfull touring car series: its prettu much guaranteed that a third of grid will be race cars from VW group.

Ralfp··on MacBook Pro 16" 2019 Teardown
I've got my MBP in November 2016, as soon as it became available in my country. I was using it at home and office, carrying between both of those locations using sleeve, taking extra care to don't mess my precious new laptop up. Its keyboard worked perfectly all this time.

Reading about all the keyboard woes others had, I've been wondering if I am just lucky. In November 2018 I've traveled to another town with my laptop (in the sleeve, as usual). This was single day travel and it turned out that I've didn't even have to pull it from the bag a single time. After coming home 10 hours later I've pulled my laptop from the sleeve and pressed "R" key. It didn't "click". I've pressed it again. It didn't click either, but it sticked to the tip of my finger and popped out of its slot. I was now part of the people blessed with keyboard fault.

Ralfp··on World on Fire: The Oral History of Fallout and Fallout 2
> zero dynamic content

This is true, but the reason why Fallout 2 is considered great (and why so is New Vegas), was in number possible paths that player can take during gameplay. Writing in those games was all about presenting gray and grayer dilemmas to the player and leaving it up to them to follow quest lines for either of those.

It was rarely things like "take the lost kitten from a tree or set the tree on fire" types of "good and evil" pseudo-dilemmas that end with player being a paragon of justice or chaotic evil, something that keeps plaguing role-playing games to this day.

Ralfp··on PayPal stops payouts to models on Pornhub
In EU there is an anti-money laundering directive, but it’s mostly up to member countries how they’ll implement it.

As usual some countries implemented it reasonably while others didn’t.

Ralfp··on Merkel wants Germany to have 1m electric car charging points by 2030
Not everyone, but thats how trends were in recent decades: people moving to large urban centers raising land prices in those and areas around making anything but apartment blocks unfeasible economically.

In some places even single-house areas are being invaded by real-estate developers building multi-floor apartment buildings roght next to single-family houses.

Ralfp··on Python adopts a 12-month release cycle
Removing GIL will break ecosystem in worse way than Python 2->3 ever did, as both interpreter and compiled libraries rely on it for thread safety.

There are other paths for improving performance that Python is embrancing: asyncio provides considerable performance gains to IO bound apps, and memory-sharing between processes allows for relatively cheap sidestep for those who find threads too slow for their use-case.

Ralfp··on GraphQL Performance Monitoring Is Hard
> Are things like query depth, width and cost limiting available as parameters to common libraries?

No, they are mostly 3rd party utils. I those exist for Apollo server.

> Would you follow a similar strategy in GraphQL? Generic auth in a middleware for a user, then specific access management auth inside specific resolvers later on?

Yes. Or I would move auth check up a level, and implement schema directive like "@authenticated" or "@hasPerm("perm")" so resolver would do only data resolution, but each approach has advantages and downsides.

Ralfp··on GraphQL Performance Monitoring Is Hard
Unlimited query complexity:

- graphql() function takes "validators" argument for a reason ;) There are multiple strategies for limiting complexity, but common ones are boxing (limiting depth and width of query) or query cost limitation.

For auth, you authenticate user using custom middleware before entering the query executor. Inside query executor you can do one of many things, depending on what makes sense for you: error field resolution, return "null", or return custom type like "ObjectNotFoundError".

For caching, you cache inside resolvers that do something costful, or in data loaders those resolvers call.

Ralfp··on Ubisoft joins Blender Development Fund to support open-source animation
Ton Roosendaal (Blender creator) estimated in 2018 interview that 3D software market is very small, and pulled up Autodesk's (3DsMax/Maya, etc) business results from that time, which amounted to 25000 - 30000 yearly licenses. He also claimed that Maya has "maybe 20" developers behind with things being similar for other products.

https://www.youtube.com/watch?v=qJEWOTZnFeg (jump to 1h mark)

← PreviousPage 9 of 15Next →