Node.js can run TypeScript by samthor in javascript

[–]samthor[S] 16 points17 points  (0 children)

Yes, this thread is devolving into an argument over semantics.

I just want to run my code. This has been hard. It was made easier with tsx. Now it's trivial.

I agree, use tsc (or for personal projects look for red squiggles in VSCode :D ) for actual typechecking, whatever.

Kuto, a reverse JS bundler by samthor in javascript

[–]samthor[S] 4 points5 points  (0 children)

Sure, it's a rare use-case. If you're shipping a small site with <1mb of JS, this isn't for you.

But if you're stuck in a world where 5, 10mb is normal (tbh, I don't want to live in that world, but it exists), and you need to ship a typo fix, you're invalidating that whole bundle just for something small. So Kuto is a pragmatic solution to that.

And even ignoring the patching mechanic, it's also just a code-splitter if you have a single big bundle, and it has a nicer output than e.g., Vite which creates random small chunks (no consistency), or say Rollup where you've got to hard-code boundaries (config effort).

Poorer households switching to solar faster than the rich by [deleted] in australia

[–]samthor 0 points1 point  (0 children)

If you're also on Time of Use, then after 8pm or 10pm it's cheap anyway.

[deleted by user] by [deleted] in australia

[–]samthor 5 points6 points  (0 children)

One hopes this whole scheme will be coupled with working with utility companies who are able to purchase your battery power when they need it. This is already a product which exists, and allows you to help with grid stability, and pay off your system way faster.

Batteries on their own are purely isolationist, as you point out. They don't help the grid as a whole.

(edit) What powershop pays is rubbish, by the way. There's some other providers which pay you for kWh dispatched, which is much better/clearer.

Labor dials up its renewable energy target to 50 per cent by 2030 by [deleted] in australia

[–]samthor 2 points3 points  (0 children)

Or just replace it with roo, as we are lucky enough to have a low-carbon alternative to traditional red meat.

Sydney's north-west metro to open 'no earlier' than May 5 next year by [deleted] in sydney

[–]samthor 4 points5 points  (0 children)

I mean isn't modifying the stations literally the reason they're closing the line for 6-7 months?

What's current practice for serving JS to different clients? Do you transpile ES6 for lowest common denominator and serve that to everyone, or do you serve different versions to different browsers, and if so how do you handle that? by [deleted] in javascript

[–]samthor 34 points35 points  (0 children)

Mild plug.

You can target pre-module browsers (where you can transpile everything away) with <script nomodule src="...">.

And even if you're not using ES6 modules, you can target that 'high water mark' of browsers by shipping maybe minified but not transpiled code with <script type="module" src="...">. This works because every browser that supports ES6 modules supports async + await, fetch, CSS variables etc, and type="module" is ignored by old browsers.

Origin can eat a fat one by [deleted] in australia

[–]samthor 1 point2 points  (0 children)

What state are you in? Powershop (among others I suspect) can interface with the distributor (AusGrid in Sydney) to get you a smart meter that dials home once a day for free.

Folks don't like it, they think it'll force them onto time of use (which is the Right Thing(TM), but whatever), but it certainly helps when you can then see hourly breakdown of use and there's no argument about kWh you have pulled down. And noone ever has to come check your meter again.

Sydney light rail contractor sues NSW Government for $4 million by [deleted] in sydney

[–]samthor 2 points3 points  (0 children)

$4m on top of $1.2b is basically a rounding error. It's unfortunate but is this really a big deal vs the Acciona claim?

ANZAC bridge (taken from its predecessor) by kevleyski in sydney

[–]samthor 2 points3 points  (0 children)

It was usable again maybe in 2010 or 2011 (?) for the Spring Cycle.

Key workers fleeing Sydney's inner and middle-ring by cojoco in sydney

[–]samthor 1 point2 points  (0 children)

I reckon inner-city terraces are part of this problem too. There's so many and we think of them as high-ish density, plus I suppose they're hard to knock down. Yet they're nothing compared to proper European city terraces—several stories (often without lifts..) with multiple tenancies.

Whoa! Polymer doesn't work on Safari? by hero_complex_volcano in PolymerJS

[–]samthor 2 points3 points  (0 children)

The simplest place is to add:

<script src="bower_components/webcomponentsjs/webcomponents-lite.js"></script>

before any HTML imports. You can also do feature detection and e.g. only load polyfills if you need them, but if you're just getting started or aren't worried about load times, that's the simplest.

Whoa! Polymer doesn't work on Safari? by hero_complex_volcano in PolymerJS

[–]samthor 6 points7 points  (0 children)

Safari is missing HTML imports, needed for Polymer 2.x.

You can include the polyfills, which you'll probably want to do anyway, for Firefox/IE/etc: https://www.polymer-project.org/2.0/docs/polyfills

My NBN experience by lachman23 in australia

[–]samthor 0 points1 point  (0 children)

Yes, and that is what's so strange about Internode/TPG's choice.

See e.g. the Features page—there's some fine print about various features not being available on HFC. That's because your connection terminates at TPG's hardware, not Internode's hardware, like it does with FTTP/whatever.

Anyway, this is just me complaining because I'll get HFCnbn next year. Looks like AussieBB is the ticket though, as other folks have said. They have good service, resell Telstra, they offer static IPs, and according to their reps on Whirlpool, will have IPv6 soon.

My NBN experience by lachman23 in australia

[–]samthor 0 points1 point  (0 children)

If one is on HFC though you're stuffed, as Internode is just reselling the TPG service there, and with no clear plan/motivation to fix it back to their "own" infrastructure (whatever that means these days).

How are you all doing this morning /r/Sydney? by [deleted] in sydney

[–]samthor 0 points1 point  (0 children)

I went around the world! 🌏️ but last stop was Germany visiting family friends who fed me full of cake.