Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ttfkam
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
69 ms
·
871.
▲
by
ttfkam
4y ago
I swear, folks and their JSX have me convinced they have Stockholm Syndrome. HTML+CSS in JS was always a pragmatic choice back in 2015, never the most elegant or most maintainable one. It's like the folks who refused to use anything bu
872.
▲
by
ttfkam
4y ago
JSX. This was never zero cognitive overhead as compared to plain HTML. Folks have simply had 10 years of practice with their Stockholm Syndrome. With Svelte, you see a script tag with 99% plain JS, some HTML with some basic control and bind
873.
▲
by
ttfkam
4y ago
Let's compare lines of code, because more lines invariably leads to more bugs. Contents of Beers.svelte: <script> export let bottles = 99; </script> {#if bottles > 0} <span class=&q
874.
▲
by
ttfkam
4y ago
I honestly don't believe you've actually used Svelte even in an experimental context to make such a comment. Go check out the tutorial on the Svelte site and get back to us. It's literally >90% just HTML, CSS, and JS. The
875.
▲
by
ttfkam
4y ago
SVG: Draw rectangles and triangles. If you don't have a script tag in it, totally declarative. You don't draw line by line. You describe what you want and have the engine work it out. Just because that description can be complex s
876.
▲
by
ttfkam
4y ago
And there's the crux of it all. Nothing is pure in this world except perhaps some parts of math. Everything else is an approximation or a corruption. Point to any programming language that is supposed to be a pure example of anything a
877.
▲
by
ttfkam
4y ago
Very often literally as well.
878.
▲
by
ttfkam
4y ago
Declarative: giving your order to the waiter and having the food returned to you fully prepared. SQL: describing the subsets of related data you want and not caring if that data is on disk, in memory, indexed, located on another server, or
879.
▲
by
ttfkam
4y ago
And today's physicists will say that's a perfectly adequate approximation in your local frame of reference far below the speed of light. SQL describes WHAT data you want returned. A functional language describes HOW you retrieve t
880.
▲
by
ttfkam
4y ago
3. Does the solution require more thought and library expertise to get the same task done? Compilers were a huge boon over hand-built machine code and assembly. In specific hot spots, someone can eke out better performance sometimes, but co
881.
▲
by
ttfkam
4y ago
Are you calling a C compiler overhead as well? Ahead of time compilation is not runtime overhead, and for users of the web, runtime and network latency are all that matters with regard to the perception of speed.
882.
▲
by
ttfkam
4y ago
Yep, Solid is among the fastest but requires more cognitive overhead. Svelte requires very little over and above HTML and JS while still being closer to Solid in performance than React, Vue, or Angular. And the latest interactions of React
883.
▲
by
ttfkam
4y ago
Tell us you've never tried Svelte without actually saying you've never tried Svelte. You would have likely not said this if you had ever looked at Svelte-compiled JS. The amount of mutation is surprisingly small and easy to follow
884.
▲
by
ttfkam
4y ago
innerHTML doesn't preserve event handlers. So you're either reassigning event handlers over and over or relying on delegate handlers everywhere. And while your statement makes intuitive sense regarding performance, actual measurem
885.
▲
by
ttfkam
4y ago
FYI: MySQL has CREATE EVENT. Postgres has pg_cron. DB2, Oracle, and MS SQL all have built in schedulers (aka time-based triggers) as well.
886.
▲
by
ttfkam
4y ago
Comments inline with column and table definition. And simple idempotent DDL. AFFIRM TABLE product_category ( category_id smallserial PRIMARY KEY , name text NOT NULL ) COMMEN
887.
▲
by
ttfkam
4y ago
System-versioned temporal tables would address this and more I think.
888.
▲
by
ttfkam
4y ago
I tend to write SELECT a.foo , b.bar , array_agg(z.gumball) gumballs FROM zoo z INNER JOIN alpha a ON (z.z_id = a.z_id) LEFT JOIN baker b ON (a.a_id = b.a_id) WHERE z.last_
889.
▲
by
ttfkam
4y ago
So does Postgres. Unbeknownst to the OP, supported it since at least v7.2 (aka a looooooong time ago). https://www.postgresql.org/docs/7.2/queries-table-expression...
890.
▲
by
ttfkam
4y ago
AWS-only, but if you're running in that environment, you've got the apg_plan_mgmt extension. https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide...
891.
▲
by
ttfkam
4y ago
Not that much slower than bigint as long as you replace the top one or two bytes in the UUID with a rotating per-minute counter. You keep 106 bits of entropy (from v4's 122 bits) while largely eliminating page faults. Walkability is el
892.
▲
by
ttfkam
4y ago
> Both UUIDv8 and UUIDv4 only specify that the version and variant bits are in their correct location. The difference is that UUIDv4 specifies that the remaining 122 bits be pseudo-randomly generated. UUIDv8 suggests that the generated v
893.
▲
by
ttfkam
4y ago
And no "Watchmen", "Dune"… not even X-Men comics. Certainly not "Maus". No "Native Son", no "Farewell to Manzanar". No "The Good Earth". No "The Grapes of Wrath". No &quo
894.
▲
by
ttfkam
4y ago
I think you really need an "Intermediate" section. For example, "Rust for Rustaceans" was written explicitly for folks who had finished "The Rust Book" but long before "The Rustinomicon". I would put
895.
▲
by
ttfkam
4y ago
Last year's M1 Pro and M1 Max already give this. The Pro allows two external monitors in addition to the laptop screen. The Max allows four external, five total.
896.
▲
by
ttfkam
4y ago
Are you putting indexes on your temporary tables? Are you including the time it takes to create them? I can't speak for others, but most of my CTEs tend to be small enough where an index wouldn't help much. Of course toggling MATE
897.
▲
by
ttfkam
4y ago
That's because Redshift doesn't support MATERIALIZED CTEs. In mainline Postgres, a MATERIALIZED CTE acts more like a temporary table with the performance characteristics you're looking for.
898.
▲
by
ttfkam
4y ago
C++ is not object oriented; it's a multi-paradigm language that supports OO, generic, even some functional, etc. It is a schizophrenic beast that will go (and take you) in any direction you do and do not wish to go. For example, the ST
899.
▲
by
ttfkam
4y ago
Reader is for text/characters while InputStream is for bytes. An InputStream always lays at the heart of a Reader. Java's I/O may not be the most elegant of simplest, but it makes additive sense assuming you don't just h
900.
▲
by
ttfkam
4y ago
Almost 50 years ago in fact. And there were alternatives all along that timeline and many before it. SQL is the first and possibly the only successful fourth gen programming language, and the most substantive complaints generally boil down
More ›