benjaminjackman

Joined 13 years ago

Karma
1,013
Submissions
343
Member since
Jun 15
View on Hacker News

Recent submissions

Comment · 1 year ago
Maybe you can associate html files with or use open with to pass them into a script that calls python -m http.server and creates and opens a url to the file via the python server in the browser.
Comment · 3 years ago
That's exciting about Firefox, though I really wish that firefox would support OPFS in such a way as to allow selecting the directory where the files are located, beyond just persistence, there are some use cases where that is required (vscode.dev for example).
Comment · 4 years ago
Precisely, or even find a way not to require commas.

I don't think we've seen a language that is explicitly designed to be as ergonomic / accommodating as possible to developers.

Something that is the good protocol truism equivalent of "be liberal in accepted input and strict produced output".

Granted that flies in the face of another programming language design best practice of having 1 way to do a particular thing.

Comment · 4 years ago
Comment · 4 years ago
Sounds like Godot 4 is replacing GDNative with GDExtension. Just wondering if you have tried it out and have any thoughts. Is it a smoother experience / about the same etc.
Comment · 4 years ago
maybe combine them with user defined !bang commands like on duckduckgo, !hn search_term (searches hn sites list from above).
Comment · 4 years ago
For Lesson 1: I think the general pattern that ought to be followed is to "prefer undo to warnings." Undo is often harder to implement, however it's usually a superior experience.
Comment · 4 years ago
I don't think it's clear cut that it should be out of band 100% of the time. I think there are use cases where inline is useful.

Cycles are definitely an issue, I am not sure there is even way to work around that, except to pull the cycles apart (which may not always be possible but is usually not a bad programming practice when it is). However at the library level, libraries tend not to circularly import each other. If it's being done at the inside a project level the build tool would be generating it so dealing with the module graph being invalidated may not be a hassle (or even necessarily a bad thing), in that case it could modify the files or it could be generating a lock file / import map (which I agree has benefits at that level of not forcing every source to be transpiled, but some of that probably still has to happen for module reloading e.g. appended search parameters to the module path for cache invalidation / module reloading during development like vite.js does for example, and realistically given the nature of the ecosystem some transpilation is going to have to happen either because of .ts or just because of browser differences).

For a top-level deps.ts / dep.js file pattern there probably won't be any cycles. That pattern is to declare a root deps.js file for your project that locks things down and re-exports from third party libraries a use the exports from that as the basis for other imports. For this pattern I think SRI would be extremely helpful and add enough benefit to justify it (even though SRI may not be used in the cases you listed).

Also for smaller projects or main modules having the SRI hash inline is really helpful.

Comment · 4 years ago
Ok that makes a lot of sense, the link you shared helped explain things in denoland quite well (and reminds me that I really need to give it another go).

From the link I see this example:

    in src/deps.ts

    // Add a new dependency to "src/deps.ts", used somewhere else.
    export { xyz } from "https://unpkg.com/[email protected]/lib.ts";

    Then essentially a create/update lock-file command is run. 

    Then the lock file is checked into version control. 

    Then another developer checks it out and runs a cache reload command.
As you mentioned in practice it's definitely a bit too manual, but should be one of those things that can be automated so it's not the end of the world.

Having said I think having it in the import syntax would provide a few benefits:

1. No extra steps need to be run & hopefully IDEs could auto-complete the hash.

2. Would hopefully be standardized with the browser allowing for native browser support as well (or perhaps lock.json could be standardized with something like import maps)

3. Having it right there provides an extra level of assurance that the integrity hash is going to be used (especially in files intended to be used in the browser and in deno ... not sure how common that is though).

Comment · 4 years ago
Hi Luca - congratulations! I have a quick question, have their been any proposals to add Subresource Integrity hashes (https://developer.mozilla.org/en-US/docs/Web/Security/Subres...) to the import syntax? I think this effects Deno more acutely than other projects since Deno supports / (encourages?) directly importing from a url with a precise version number encoded in the url. It would be nice to add another layer of safety on top and be able to assert that the module received is exactly as expected. Thanks!
Comment · 5 years ago
Genuinely curious what the use case(s) of reading from uninitialized are. Performance?
Comment · 5 years ago
It could be possible that [some, (0,100]%, portion of the benefit provided by] the vaccines wear off after a certain amount of time. This makes statistics like 99.7% of Waterford have been vaccinated perhaps less insightful than something like 34% (or whatever the actual number is) have been vaccinated in the last 6 months.

edit: added [some portion, (0,100]%, of the benefit provided by]

Comment · 5 years ago
My understanding and it could be wrong is that they can't lower their rates, (and might actually have to increase to compensate for more vacancy) because it will affect their ability to finance the buildings if they have lower rates from whatever math is used to calculate the soundness of the loans. That could be causing the stickiness on price you are seeing (if it's not apocryphal).

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton