smores's recent activity

  1. Comment on Israel passes death penalty [as default] law for Palestinians convincted [in military court] of lethal attacks in ~society

    smores
    Link Parent
    I don't think so, but obviously I'm reading the same article you are so I could be misinterpreting: I'm interpreting this as saying there are circumstances under which judges are allowed to...

    I don't think so, but obviously I'm reading the same article you are so I could be misinterpreting:

    The original bill had mandated the death sentence for non-Israeli citizens convicted in West Bank military courts of deadly ‌terrorist acts. The ⁠revised legislation includes the option of life imprisonment.

    I'm interpreting this as saying there are circumstances under which judges are allowed to downgrade the sentence to life imprisonment, but if those conditions are not met, they must default to a death sentence.

    7 votes
  2. Comment on Making React ProseMirror really, really fast in ~comp

    smores
    Link Parent
    Oh! I can reproduce this, too. I wonder what the heck Gboard is doing here to cause this. I'll have to take a look!

    Oh! I can reproduce this, too. I wonder what the heck Gboard is doing here to cause this. I'll have to take a look!

  3. Comment on Growing a human: the first thirty weeks in ~life.women

    smores
    Link Parent
    Oh my god this drove my wife and INSANE. And you're giving by the far some of the most reasonable examples. What about a carrot? A zuchini? WHAT MEASUREMENT ARE YOU USING HERE?? Apparently I still...

    Oh my god this drove my wife and INSANE. And you're giving by the far some of the most reasonable examples. What about a carrot? A zuchini? WHAT MEASUREMENT ARE YOU USING HERE??

    Apparently I still have not processed this.

    11 votes
  4. Comment on Making React ProseMirror really, really fast in ~comp

    smores
    Link Parent
    Thank you! And thanks for testing it out a bit, good to have more data points. It's super interesting how variable this can be across different operating systems and browsers.

    Thank you! And thanks for testing it out a bit, good to have more data points. It's super interesting how variable this can be across different operating systems and browsers.

    1 vote
  5. Comment on Making React ProseMirror really, really fast in ~comp

    smores
    Link Parent
    Oh very cool! Shoot me a link when you publish it, I'd love to take a look!

    Oh very cool! Shoot me a link when you publish it, I'd love to take a look!

    2 votes
  6. Comment on Making React ProseMirror really, really fast in ~comp

    smores
    Link
    Ok, thanks everyone for the feedback! I have: Added some notes/caveats about issues that may crop up with the demo editors Configured the demo editors to truncate the document when unfocused, so...

    Ok, thanks everyone for the feedback! I have:

    1. Added some notes/caveats about issues that may crop up with the demo editors
    2. Configured the demo editors to truncate the document when unfocused, so that your browser isn’t rendering Moby Dick twice.

    Also discovered some interesting things:

    • I didn't really account for how much faster React's production build is than the development build. I basically can't type fast enough on my phone (Android or iPhone) to even notice the lag on the unmemoized editor
    • Firefox on macOS is just crazy slow for large documents, basically no matter what. Just putting Moby Dick in a plain contenteditable is slow, putting it in the unmemoized editor is slow, and putting it in the memoized editor is best but still pretty slow
    • Safari on macOS is crazy fast haha. I couldn't discern any lag at all on the unmemoized editor when I was testing on my m4 Mac Mini
    2 votes
  7. Comment on Britain mandates heat pumps and solar panels in new homes from 2028 in ~enviro

    smores
    Link Parent
    Yes, sorry, should have specified Fahrenheit. So -3 degrees Celsius.

    Yes, sorry, should have specified Fahrenheit. So -3 degrees Celsius.

    4 votes
  8. Comment on Making React ProseMirror really, really fast in ~comp

    smores
    Link Parent
    I think I should have anticipated that some browsers and some mobile devices wouldn't be able to handle a contenteditable with an entire novel in it. Sorry I crashed your browser :/ I'll truncate...

    I think I should have anticipated that some browsers and some mobile devices wouldn't be able to handle a contenteditable with an entire novel in it. Sorry I crashed your browser :/ I'll truncate the demo text and see if the point still gets across.

    2 votes
  9. Comment on Making React ProseMirror really, really fast in ~comp

    smores
    Link Parent
    Thanks! Glad to hear it. What kind of collaborative editing project are you working on?

    Thanks! Glad to hear it. What kind of collaborative editing project are you working on?

    1 vote
  10. Comment on Making React ProseMirror really, really fast in ~comp

    smores
    (edited )
    Link Parent
    Sorry, I was mixing up responses. Just making sure I understand, you're using Firefox on an Apple laptop/desktop? Or on iOS? Right, there's no point in using this for a plain textarea. The library...

    My guess is that this is an Android keyboard thing — Gboard, in my experience, works fine with React ProseMirror, but Swype and Samsung keyboard have issues. Maybe this will be my push to try to actually resolve these, I think it's gonna be a pain haha. Sorry, I was mixing up responses. Just making sure I understand, you're using Firefox on an Apple laptop/desktop? Or on iOS?

    Right, there's no point in using this for a plain textarea. The library is designed (and used) for complex rich text editors, like dskrpt.de, which uses it for their textbook editor (with inline quizzes and other interactive elements) and Moment which uses it for its rich markdown editor, including rather elaborate interactive code blocks. Web browsers don't have any native components for this (ultimately we're using contenteditable, but contenteditable on its own is not usable as a rich text editor).

    Even for just a simpler text editor, though, it's not necessarily as simple as "just use native web components." I definitely underestimated both the number of mobile Android users reading this and the variety of mobile Android experiences of React ProseMirror (always a mistake, web on Android is nothing if not chaos), but React ProseMirror is much faster than the native contenteditable element on desktop Firefox.

    Anyway, sorry the demos frustrated you, that obviously wasn't the goal (well, it was a little bit the goal for the first editor)! I

    2 votes
  11. Comment on Making React ProseMirror really, really fast in ~comp

    smores
    Link Parent
    We actually need completely different workarounds for Android keyboards, because we use beforeinput events (native ProseMirror does not) and several Android keyboards produce completely broken...

    We actually need completely different workarounds for Android keyboards, because we use beforeinput events (native ProseMirror does not) and several Android keyboards produce completely broken beforeinput event sequences on Android Chrome. Slate.js has worled out resolutions to this that we need to take a look at.

    1 vote
  12. Comment on Making React ProseMirror really, really fast in ~comp

    smores
    (edited )
    Link Parent
    I'm not sure if you saw the last section, but on (desktop) Firefox this is actually not true! React ProseMirror is much faster than Firefox's native contenteditable implementation, even without a...

    I'm not sure if you saw the last section, but on (desktop) Firefox this is actually not true! React ProseMirror is much faster than Firefox's native contenteditable implementation, even without a ProseMirror editor set up at all

    2 votes
  13. Comment on Making React ProseMirror really, really fast in ~comp

    smores
    Link Parent
    I think this is ultimately due to some Android devices just having trouble with rendering this many DOM elements in a contenteditable. Weirdly not an issue with Firefox on my Fairphone 5 at all —...

    I think this is ultimately due to some Android devices just having trouble with rendering this many DOM elements in a contenteditable. Weirdly not an issue with Firefox on my Fairphone 5 at all — even the first editor is surprisingly fast for me haha.

    I make this mistake a lot, unfortunately, of testing while I'm writing on my laptop and forgetting that phone have completely different performance characteristics.

    1 vote
  14. Comment on Making React ProseMirror really, really fast in ~comp

    smores
    (edited )
    Link Parent
    That's.. all incredibly odd haha. The website is fronted by Cloudflare, but I am not aware of any email protection settings (maybe it's on by default?), and I'm not personally seeing that even if...

    That's.. all incredibly odd haha. The website is fronted by Cloudflare, but I am not aware of any email protection settings (maybe it's on by default?), and I'm not personally seeing that even if I go off of WiFi. Let me poke around and see what I can find...

    Update:

    Seems like this is indeed enabled by default, and I should be able to turn it off for that string, as well as in general (I already have my own email obfuscation implemented on that site, so I don't have any need for it).

    However, the fact that you're seeing that at all is an indication that Cloudflare thinks you might be a bot, which I'm sure is exciting news. That might explain why the site loaded so much more slowly for you on your desktop, as well.

    2 votes
  15. Comment on Making React ProseMirror really, really fast in ~comp

    smores
    (edited )
    Link Parent
    Oh, huh. I guess I should test this on Safari — on both Chrome and Firefox (including on my Android) there is no lag at all for me on the second editor. There's no Shadow DOM on this page, so I'm...

    Oh, huh. I guess I should test this on Safari — on both Chrome and Firefox (including on my Android) there is no lag at all for me on the second editor.

    There's no Shadow DOM on this page, so I'm not exactly sure what you're referring to there!

    Just out of curiosity, do you also see slowness editing the document on https://handlewithcarecollective.github.io/react-prosemirror ? Maybe there's just an issue with my demo editor on the blog post.

    It's basically not possible for the second editor to be slower — it's doing like 1/100th the work. It is possible that your browser is struggling with rendering the entire contents of Moby Dick twice, though, which I didn't really think about. Maybe when you blur the editors I should actually truncate the document, in addition to making it static

    3 votes
  16. Comment on Making React ProseMirror really, really fast in ~comp

    smores
    Link
    I don't know if folks are interested in this kind of niche technical deep dive here, no worries if not. But I figured I would share in case anyone is, like, really into React development, or...

    I don't know if folks are interested in this kind of niche technical deep dive here, no worries if not. But I figured I would share in case anyone is, like, really into React development, or something!

    4 votes
  17. Comment on Britain mandates heat pumps and solar panels in new homes from 2028 in ~enviro

    smores
    (edited )
    Link Parent
    I mean, I have a brand new, upper end Bosch heat pump system. When it drops below 27 degrees (edit: Fahrenheit) outside, we have to switch to the natural gas furnace because the heat pump just...

    I mean, I have a brand new, upper end Bosch heat pump system. When it drops below 27 degrees (edit: Fahrenheit) outside, we have to switch to the natural gas furnace because the heat pump just stops effectively heating the house. I've done the math and when it's above freezing the heat pump does cost us the same or less (and obviously I really like that it's not burning natural gas), but the winters are increasingly unpredictable here, and we literally would not have survived the 4 straight weeks of sub-20-degree temps (something that did not happen once in my entire childhood living in this town) with only a heat pump.

    6 votes
  18. Comment on Ghostty 1.3.0 has been released in ~comp

    smores
    Link Parent
    I switched to Ghostty basically because I started using Zellij, Helix, and Yazi together in place of an IDE, and I was running into issues with the Gnome terminal (I honestly don't remember what...

    I switched to Ghostty basically because I started using Zellij, Helix, and Yazi together in place of an IDE, and I was running into issues with the Gnome terminal (I honestly don't remember what issues anymore). I tried Alacritty first, ran into some limitation there as well, then tried Ghostty and had no issues.

    That's probably not very helpful haha, but I guess my takeaway is that Ghostty just seems like a really well constructed terminal emulator. They care a lot about correctness (as can be seen from this post).

    1 vote
  19. Comment on Six months with Zen Browser in ~tech

    smores
    Link Parent
    I've been using Zen for a similar amount of time. I do contract work, usually for multiple clients at a time, and having a workspace per project (+ one for not-work and one for my actual business)...

    I've been using Zen for a similar amount of time. I do contract work, usually for multiple clients at a time, and having a workspace per project (+ one for not-work and one for my actual business) is a pretty huge boon for context switching. Feels a lot easier to switch back to a project when I can just swipe over to exactly the state of my tabs from when I left off.

    6 votes