Hacker News new | past | comments | ask | show | jobs | submit | unilynx's comments login

> Iframes don’t expand to fit content

Actually, that was part of the original plan - https://caniuse.com/iframe-seamless


I used the seamless attribute extensively in the past, it still doesn't work the way GP intended, which is to fit in the layout flow, for example to take the full width provided by the parent, or automatically resize the height (the pain of years of my career)

It worked rather like a reverse shadow DOM, allowing CSS from the parent document to leak into the child, removing borders and other visual chrome that would make it distinguishable from the host, except you still had to use fixed CSS layouts and resize it with JS.


ugh. these kind of changes should not be made in a minor release..


Is it a breaking change?


Missing sarcasm tag?


We did this for a long time for our CMS - although we did simulate a filesystem structure. We also set up a git-like system to store versioning information and set up WebDav to mount it all and allow direct source code editing. It worked pretty well for years.

We eventually stopped because we were relying much more on external tools (eg npm, webpack) which had all sort of issues over webdav mounts. Maintaining all this code management infrastructure in parallel wasn't worth it in the end, and we moved the code back to disk, switched to git, etc.

And photoshop silently ignoring webdav I/O errors when saving designs didn't help either.

You already have tagging by type on the filesystem - the file extension. That allows you to limit file searches. Add extra metadata to extensions if the same extensions have different roles (.backend.ts, .frontend.ts, .html.template, .text.template)

These days I prefer to structure for easy removal of code - everything for eg. a widget (frontend, backend, css) goes into a folder and I only need to remove that folder when the widget is retired, and linting/validation will show me the few remaining path references I need to cleanup.


Because (accidentally) mailing an unsubscribed user hurts your deliverability. And because there are users out there that will attempt to add spam traps to your mailing lists, sou you keep them off the list

(double opt-in doesn't really help with the latter as you're still mailing it)


> Because (accidentally) mailing an unsubscribed user hurts your deliverability.

Simple solution: completely remove the email, and flush the cache. No accidental mailing.

As far as spamtraps go, I don’t think there’s a way to realistically address this. There’s a couple of well-known services, like spamex, but it’s easy to set them up, if you have your own domain.

I use spamex, because I want people to know it’s a spamtrap.


Even if they freeze typescript development after the native implementation, given that the current performance was apparently acceptable to the current users, type complexity will just grow to use up the headroom

Plus, using TS directly to do runtime validation of types will become a lot more viable without having to precompile anything. Not only serverside, we'll compile the whole thing to WASM and ship it to the client to do our runtime validation there.



This was discussed before and interesting but apparently the name of that instruction is misleading. Someone had chimed in and talked about how having Javascript in its name is entirely unnecessary as that exact same floating point representation is commonly used outside Javascript as well.

If you disassemble some armv8 binaries that aren't dealing with Javascript, you do see still see FJCVTZS.


All taxes are ultimately paid by the consumer, companies just collect them. So German consumers who buy American cars pay their tax to Germany.

When a company buys from another company, no net VAT is collected - it’s only collected when a consumer enters the picture.


> In 2004 you'd be shit outta luck trying to backup a mobile device as most were self contained and didn't interface to pc/mac.

True but ..

> Also mobile devices back then had limited storage, didn't have cameras, weren't Internet connected, etc.

which also means they didn't have a lot of data worth backupping

2004 mobile devices are usually either MP3 players or PDAs. Both synced over either a USB cable (or fancy infrared stuff) and were mostly just downloading from a PC. Not much was lost if the device crashed except your Bejeweled progress.


SEPA is not free - it's just often free for consumers (and likely until your bank considers your usage patterns to be 'too business like')

and it can't be free.. even though the systems might have no further marginal cost per transaction, banks still need to do anti-money laundering checks, and someone's gotta pay for that


> navigator.locks.request("my_resource", async (lock) => {

This would be so much more readable with `using`

  {
    using lock = navigator.lock('my_resource');
    await do_something();
    await do_something_else();
  }
(https://github.com/tc39/proposal-explicit-resource-managemen...)


It doesn't actually feel more readable to me. I find the idea that the lock declaration sits at the same level as the lock content confusing.


It's readable if you're familiar with the RAII pattern which is used in languages like C++ and Go.


It's also similar to C#'s "using ...;" without a block. Syntax sugar there rather than RAII, but looks the same.


C#'s using can be used without a block. It disposes the resource at the end of a current scope.


I always felt that pattern was a bit too clever than it was a good design.


Makes me wonder what part of the pattern you think is "too clever"? I think it is fairly easy to reason about when the lock is restricted to the encompassing block and automatically dropped when you leave the block.


It’s kind of a weird design that some of your variables (which you can define anywhere in the scope FWIW) just randomly define a critical section. I strongly prefer languages that do a

  with lock {
      // do stuff 
  }
design. This could be C++ too to be honest because lambdas exist but RAII is just too common for people to design their locks like this.


Well, Go doesn't quite support RAII.

This syntax looks more like Python or Rust.


It's not RAII, but closer to dynamic-wind.


Yes, it sits at the same level to signify the lifetime of the lock.


Why can't we just `await` the lock call?

Edit: Nevermind, release of the lock is automatic when the callback resolves its promise. I get it now.


If you really wanted it to be at the top level you could probably turn it into an explicit `release` call using a wrapper and two `Promise` constructors, though that would probably be a bad idea since it could introduce bugs


Subjectiveness aside on what’s more readable… your proposing a new language feature would be more readable than an API design. To me, the MDN proposal is declarative whereas your proposal is imperative. And with my subjectiveness, JavaScript shines in declarative programming.


   navigator whileLocked:'my_resource' do:{ :protected |
      protected doSomething.
      protected doOtherThing.
   }


You can probably wrap it to have that API


Sadly it needs a language feature that doesn't exist yet


What do you mean? You can definitely already wrap that into a Symbol.dispose-keyed object and use it via `using`


`using` is not a thing in JS


Uh, you are wrong. It absolutely is a thing and it has been in your browser and Node for longer than a year.

https://github.com/nodejs/node/pull/48518 https://github.com/tc39/proposal-explicit-resource-managemen...


s/yet/thankfully/. We don’t need it cause it solves no real problem and the solution is loaded with implicit complexity.


'using' fixes having to do cleanup in a finally {} handler, which you can a) forget, and b) often messes up scoping of variables as you need to move them outside the 'try' block.


It also creates additional finalization semantics for a using-ed value. Which has all sorts of implications. lock.do(async (lock) => {work}) is a similar construct - a scope-limited aquisition that requires nothing special.

Catch/finally not sharing a scope with try is a repeated mistake, that I surely agree with!


If it only weren’t for that crippled "using" syntax. On the other hand, though:

    const denialOfService = res => void navigator.lock(res);
I mean, one might write this just as well with the callback interface, but this is much easier to do accidentally.


Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: