Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
wwwigham
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
1.
▲
by
wwwigham
2y ago
You can define a metatable on your objects of interest (or the root table meta table if you don't mind breaking the language's conventions and thus libraries) with __index and __newindex members. Then you can throw in those by cal
2.
▲
by
wwwigham
2y ago
You can use file:// or git:// versioned dependencies in normal npm `package.json`s today. People just don't , outside some edge cases (local packages, nightly versions) because the centralized registry has upsides
3.
▲
by
wwwigham
2y ago
> What's the business model, I wonder? Serverless functions, right? That's what deno deploy is billed as. Presumably the registry is a platform-adjacent investment to try and bring more serverless market-share to deno. Since it
4.
▲
by
wwwigham
2y ago
TypeScript _itself_ has a branded primitive string type it uses internally.[1] Dedicated syntax for creating unique subsets of a type that denote a particular refinement is a longstanding ask[2] - and very useful, we've experimented wi
5.
▲
Proposal: Types as Configuration
(github.com)
2 points
by
wwwigham
2y ago
|
0 comments
6.
▲
by
wwwigham
3y ago
Stock Pixel may not ship with it on by default for end users, but anyone can enable developer options and enable Memory Tagging Extensions - either until toggled off, or for a single session if you're trying to test a specific app - if
7.
▲
by
wwwigham
3y ago
> ESM was developed in the open and anyone could participate, including the TypeScript team. This point stings for me, personally, since _I_ was the TypeScript language dev _in_ this wg trying to make our concerns noted, because we certa
8.
▲
by
wwwigham
3y ago
I, too, thought http/2+ would encourage unbundled js, but unfortunately in a world where people are used to whole-program minification and dynamic app slicing, I don't think we'll _ever_ move away from bundlers. The build ste
9.
▲
by
wwwigham
3y ago
I think this is funny, since esm being "native" on browsers doesn't really matter until you can convince devs they don't actually need to use a bundler. So long as you're using a bundler, the browser's runtime
10.
▲
by
wwwigham
4y ago
At first, I was really excited, because I really wanted this pipeline to work well. I've wanted an automatic FPGA workload offloader for awhile. Then I read that their "JIT" FPGA bitstream still took 2 _hours_ to build becaus
11.
▲
by
wwwigham
4y ago
Contrary to what seems to be popular opinion here on HN, I think it's fine they'd entertain keeping their code as JS with JSDoc, rather than TS. It's still typesafe, which is what's important from a maintenance and docum
12.
▲
by
wwwigham
4y ago
Eh, wanting to dogfood the JS tooling you're writing is a fairly valid reason, imo. Would dogfooding on TS cover many JS usecases? Sure. But inevitably some things are different. I'm somewhat sympathetic.
13.
▲
by
wwwigham
4y ago
V8 stopped dropping free perf wins on the JS community every year a while ago, and people are clearly starting to notice and feel like they need to take matters into their own hands. For some, that means an adventurous rewrite of their libr
14.
▲
by
wwwigham
4y ago
Nope, it's not just you! Happens reliably a little bit after page load for me, using Chrome on Android, too!
15.
▲
by
wwwigham
4y ago
When you can write a busy beaver machine in the type system, LOC ceases to be a good indicator or how long something should take to typecheck, imo. If you're frustrated with your build, you should use the trace tools on the TS wiki[1
16.
▲
by
wwwigham
4y ago
Pattern matching is actually being discussed in tc39 for JS as a whole (where TS reps are some of the champions, ofc): https://github.com/tc39/proposal-pattern-matching The specifics of the proposal will likely shift a
17.
▲
by
wwwigham
4y ago
I run a media server with 100% passive cooling. Case is a small form factor case: https://hdplex.com/hdplex-h1-v3-fanless-computer-case.html You actually paste heat pipes from the CPU to the case itself, using the large fin
18.
▲
by
wwwigham
4y ago
`noErrorTruncation: true` in a tsconfig.[1] It also affects hover and quickinfo truncation. Technically it will still truncate, just at a way higher limit, like a million characters. [1] https://www.typescriptlang.org/tsconfi
19.
▲
by
wwwigham
4y ago
This tbh. If the compiler the Microsoft team maintains is open source (which most of the ones people have heard of are), having involvement in that open source community would probably also be a plus - it helps show the practical part of pr
20.
▲
by
wwwigham
4y ago
> To this day I haven't found a way of doing this in TS You use an ambient declaration to declare the missing classish part of the type. declare function myLibrary(arg: Type): myLibrary; declare class myLibrary { me
21.
▲
by
wwwigham
4y ago
Errr, why do you need any non-js-runtime tool for this? TS's normal `tsc` command line is a single js file - you can pull it straight from GitHub[1] or unpkg[2] and run it directly in node without installing a full package via a packag
22.
▲
by
wwwigham
4y ago
Oh man, a friend of mine did exactly the same thing back in college, but using a tessel instead of a rpi: https://github.com/JRJurman/automated-ticket-printer In action: https://www.youtube.com/watch?v=
23.
▲
by
wwwigham
4y ago
https://github.com/nodejs/node/issues/35711 Node's working on it.
24.
▲
by
wwwigham
5y ago
The `conformance` suite is the "set of tests people added when a feature was first released", usually without the decade of following regression tests in the `compiler` suite. In TS itself, the `conformance` and `compiler` suite a
25.
▲
by
wwwigham
5y ago
Deno has _very_ custom module resolution rules. The first thing you notice is the required `.ts` extensions and browser-esque URLs. Oh, and also the import maps proposal (which is its own can of worms). Then you dig a little deeper and lear
26.
▲
by
wwwigham
5y ago
> In TypeScript you can assign an instance of one class to an instance of another as long as they have compatible fields. Fun fact: If you add a private field to a class it'll behave nominally in TS. This is because private fields k
27.
▲
by
wwwigham
5y ago
Typescript takes less than a minute to build, and basic PR validations (the simple regression, conformance, and unit test suites) add around 10 minutes of test running to that (to be fair, I can run those locally in just under two minutes,
28.
▲
by
wwwigham
5y ago
Too bad nil/null _aren't_ typically bottom types or "base cases", but rather are real, runtime values that are sentinel values of some kind, rather than valid references to a value of some type. A distinct sentinel value
29.
▲
by
wwwigham
6y ago
Funny that the author mentions TypeScript, then complains that maintaining a system like this that "doesn't exist elsewhere" would be hard. TypeScript, in fact, does an analysis almost exactly like what is described in the ar
30.
▲
by
wwwigham
6y ago
The article mentions the importance of comments and documentation inline in code. I tend to agree - well-written code is great and all, but a good comment can bring in context external to the code and make _why_ code is what it is more clea
More ›