HNHacker News
TopNewBestAskShowJobs

sixbrx

1,118 karma · joined November 5, 2011

submissionscomments
sixbrx··on Kotlin Data Classes 101: Understanding Syntax, Usage and Inheritance
One downside of Java records seems to be that they can't participate as the alternatives (subtypes) for a sealed abstract type, since they can't extend any classes other than Object. Ie. the very common "sum of product types" pattern can't use records as the product types - which they would have been great for! You can have normal wrapper classes as the subtypes of the sealed type, and have those wrappers use records internally, but all the brevity and clarity is lost that way IMO and it just becomes obfuscation.
sixbrx··on What not to write on your security clearance form (1988)
Many ATM's can actually detect that too much was given and report it as part of their communications protocol, it's called a "mis-dispense". Some used to even be configured to not allow opening the door to get the money on mis-dispense, requiring someone from the bank to come out to clear it. Source: I used to work on the bank software side of this communication, on IBM AS/400's.
sixbrx··on New video of Tesla crash demonstrates the problem of semi-automated driving
It's a real problem. If you leave a gap for safety (I like a 2 sec gap at least), the cars behind will take that as evidence that you don't care about keeping up with the car in front of you. Then they'll often tailgate extremely (communicating "get out of my way") for a bit, and then sometimes try to quickly maneuver around you and in the process getting dangerously close to you and/or the car in front of you.
sixbrx··on A Brief Defense of XML
Interesting thing about the position coordinates, is that the position really needs an "epoch" metadata attribute, like "2000" or "2050", because they are relative to the equinox which moves over the years. So maybe the fact that this kind of thing can rear its head unexpectedly might be an argument for favoring separate elements to group fields? If that new attribute were thrown in with the other attributes of "star" it looks like it qualifies the star, but it only really qualifies the coordinates.
sixbrx··on SvelteKit 1.0
More information about the reasons for the changes here:

"Fixing load, and tightening up SvelteKit's design before 1.0 #5748"

https://github.com/sveltejs/kit/discussions/5748

sixbrx··on A Bestiary of Loss
Agree, and this point, that the current age can't yet count as a mass extinction, was made well in the book "The Ends of the World", which is about the five major mass extinctions (and which was a good read). It's not that what we've done so far isn't a possible start on a mass extinction, it's just that the big five (and especially the end-Permian) were mind-bogglingly destructive "perfect storms". They killed most organisms of all types and sizes in all environments over the entire world. It's hard to imagine how that's even possible!
sixbrx··on Ask HN: Math books you recommend just for the way they are written?
Harold Edwards: Advanced Calculus: A Differential Forms Approach (https://www.maa.org/press/maa-reviews/advanced-calculus-a-di....)

Tristan Needham: Visual Complex Analysis (https://www.maa.org/press/maa-reviews/visual-complex-analysi...)

Tristan Needham: Visual Differential Geometry and Forms (https://press.princeton.edu/books/paperback/9780691203706/vi...)

sixbrx··on Retrofitting null-safety onto Java at Meta
Checker framework works fine on JDK 17 since not long after the release
sixbrx··on Browsers, JSON, and FormData
Together with allowing nested forms (finally), I think this would be great.
sixbrx··on Remix web framework aquired by Shopify
I've settled on using Java for backends since it's just so robust and performant. But damn if this new round of TS-enabled frameworks (Remix, Next, SvelteKit, QwikCity etc) isn't compelling with their full-stack type safety and easy development. Using same component-oriented vocabulary to seamlessly switch between and even combine client and server rendering, and co-locating client code with data loading all in TS with end to end type safety, is hard to beat. Makes me worry about being left out with non-TS backend like Java. Interested to see how this develops.
sixbrx··on From zero to 10M lines of Kotlin
In VSCode what's in the refactoring menu depends a lot on what you have selected or under the cursor. For example with a selection of a block of code you should get the "extract to method" menu item appear in the refactoring menu, etc. I don't remember there being quite as many as what IntelliJ has for Java though.
sixbrx··on Less Than 6 Hours of Sleep a Night Linked to Serious, Chronic Illness
I have not. I'll look into this, thanks for the link!
sixbrx··on Less Than 6 Hours of Sleep a Night Linked to Serious, Chronic Illness
The need to get up and urinate breaks my sleep into two parts on many nights, and sometimes it's hard to get back to sleep afterwards, leading to very little sleep for those days. I've tried not drinking liquids after noon, and it would still plague me pretty often. I guess it could be that I sleep too lightly between REM phases, maybe, so that minor disturbances wake me up?
sixbrx··on Ask HN: Technical forums that are not dominated by pedantry?
I think it was a joke :)
sixbrx··on The Little Typer (2018)
For others: I think what was meant was "The Reasoned Schemer": https://mitpress.mit.edu/9780262535519/the-reasoned-schemer/
sixbrx··on One more clue to the Moon’s origin
Re #1, one really cool thing is that the remains of Theia (the other body that collided with Earth) may be visible in a big way in Earth's mantle still, if recent study is correct. See https://skyandtelescope.org/astronomy-news/bits-of-theia-mig...
sixbrx··on Don’t call it a comeback: Java is still champ
Right, it requires a schema to even know whether whitespace is to be considered significant. And schemas are a whole nother can of worms...
sixbrx··on Researchers discover major roadblock in alleviating network congestion
Roadblocks don't block hypothetical flying cars either though.
sixbrx··on Earth sets new record for shortest day
> to again "point at the sun" (perhaps surprising to some NOT a full "360 degree" rotation

It's actually more than a 360 degree rotation because the earth rotates in the same sense that it revolves. So the sidereal day (1 earth rotation in physics sense) is ~ 23h 56m, and the 24 hour period is over-rotation to bring the sun back into same position, and that's more than 360 degrees of rotation.

sixbrx··on Statements vs. Expressions
I'd say Haskell didn't reinvent statements so much as it just modeled them. That allows manipulating them before they are interpreted, which is a good thing generally.
sixbrx··on SQLite or PostgreSQL? It's Complicated
Another cool thing is you can initialize the Postgres db when it starts the container with your own SQL (or sh) scripts to create your schemas, tables, views etc by just copying the scripts into /docker-entrypoint-initdb.d/.

Like:

FROM postgres:14.3

COPY pg/pg-config.sql /docker-entrypoint-initdb.d/000-pg-config.sql

COPY pg/schemas.sql /docker-entrypoint-initdb.d/010-schemas.sql

COPY pg/meddra-tables.sql /docker-entrypoint-initdb.d/020-meddra-tables.sql

# ...

RUN chmod a+r /docker-entrypoint-initdb.d/*

ENV POSTGRES_USER=myapp

ENV POSTGRES_PASSWORD=xxx

ENV POSTGRES_DB=mydb

sixbrx··on Android loses 8% of its global OS market share in five years
I use Foobar2000 on iOS where you can toggle its embedded FTP server to transfer files, either to its own music library or one shared with iTunes. It's very easy.
sixbrx··on Android loses 8% of its global OS market share in five years
Yep Foobar 2000 for iOS is free and plays Flac (and many others), and has a convenient built in FTP server that you can temporarily enable to tranfer them over the network into its music library.
sixbrx··on I hate Spring (2014)
Apparantly with the enterprise version of GraalVM which enables PGO, there's no longer any significant performance penalty, with GraalVM running at 97% of regular JVM throughput: https://www.infoq.com/articles/native-java-graalvm/ (section "Peak performance On Par with JVM")
sixbrx··on Java Development on an Apple M1 – A One Year Review
That leaves the whole setup of the application server that the EAR file needs out of the picture though. That stuff is not specified declaritively anywhere in the EAR, so it's just a wildcard that can make your application work or not work depending on version and configuration.
sixbrx··on What Is Tokenization?
> It’s generally not considered safe to expose the raw tokens

I think the article muddies the waters on this point because the the sentence defining tokens in the intro says they "are safe to expose".

sixbrx··on Ask HN: What is the most unique website you’ve come across on the internet?
I love this page about our Milky Way galaxy, with a lot of good information about what's currently known about it.

http://www.handprint.com/ASTRO/galaxy.html

sixbrx··on Ask HN: What is your “I don't care if this succeeds” project?
Source generator for nested data queries: Give typescript description of related tables to pull data from (Postgres, Oracle, MySQL), it generates the SQL (SQL/JSON) and matching result types for Java or TypeScript.

https://scharris.github.io/sqljson-query/

sixbrx··on High-order Virtual Machine (HVM): Massively parallel, optimal functional runtime
Don't forget Kind (https://github.com/Kindelia/Kind) which is mentioned in the "How can I Help?" section as a potential language for targeting HVM.
sixbrx··on Making the Web Better. With Blocks
There's not mention of previous/related work for the "blocks" idea, but it seems there have been related ideas already. For example how are blocks different from web components?
← PreviousPage 2 of 19Next →