Hacker News .hnnew | past | comments | ask | show | jobs | submit | jitl's commentslogin

Really? Pretty much all atomics i’ve used have load, store of various integer sizes. I wrote a ring buffer in Go that’s very similar to the final design here using similar atomics.

https://pkg.go.dev/sync/atomic#Int64


Nice one, thanks for sharing. Do you wanna share the ring buffer code itself?

They generally map directly to concepts in the CPU architecture. On many architectures, load/store instructions are already guaranteed to be atomic as long as the address is properly aligned, so atomic load/store is just a load/store. Non-relaxed ordering may emit a variant load/store instruction or a separate barrier instruction. Compare-exchange will usually emit a compare and swap, or load-linked/store-conditional sequence. Things like atomic add/subtract often map to single instructions, or might be implemented as a compare-exchange in a loop.

The exact syntax and naming will of course differ, but any language that exposes low-level atomics at all is going to provide a pretty similar set of operations.


100% agree +1

yeah that’s why i was surprised by grandparent saying the atomics were c++ specific

i didn’t buy a steam deck since so i can run Microsoft Office. i like that there’s freedom to open up desktop mode to tinker / install 3rd party software, but not to use it as a business machine.

I just talked about using it on Desktop mode like a PC. I never said anything about doing business on it or using it as your Work PC.

Even the announcement "trailer" of the steammachine showed it getting used on a Computer monitor with mouse and keyboard in desktop mode. They even said they want to improve the "Desktop mode only" experience iirc and for there more apps than just games are important.

And i personally probably wouldnt have bought a steamdeck if it wasnt possible to just go into desktop mode and do whatever.


If the Electron app is pure JS with no native extensions it can be doable. However, many Electron apps contain platform-specific js code, since features for stuff like Dock on Mac and Taskbar icons on Windows differ. Electron apps like Notion also contain native extensions - compiled C/C++/Objective-C code that are platform specific. For example in Notion, we use sqlite via better-sqlite3 (potentially replaceable since it’s open source, but will need more work than “just” repackaging js), but we also write our own native support libraries to use OS-specific APIs for microphone recording in meeting notes feature.

Thank you for the thorough reply :)

I really like the comments on HN, they are very often really interesting and you actually often learn something new that actually matters.


I have seen many people porting such apps, like there is aur package for notion, figma

It's cool that arch users give porting Notion a valiant effort. But as I predicted, custom native extensions will be [a problem](https://aur.archlinux.org/packages/notion-app-electron#comme...):

> Could it be possible to make the relatively new AI meeting notes feature to work?

> Right now I get the following error when I click the "start transcribing" button:

    Error occurred in handler for 'notion:get-media-access-status': TypeError: s.systemPreferences.getMediaAccessStatus is not a function
        at /usr/lib/notion-app/app.asar/.webpack/main/index.js:2:631015
        at WebContents.<anonymous> (node:electron/js2c/browser_init:2:87444)
        at WebContents.emit (node:events:524:28)

it sounds like the app already does what you need it to do. developers can spend a few hours on something other than #1 most pressing core feature every now and then.

the app has so many bugs and missing features, I'm not a heavy user just like 60 flights a year but I love and hate flighty

thank goodness Kubernetes got support for swap; zswap has been a great boon for one of my workloads

It's cool to see a brand-new WIYSIWYG editor on the web, especially one using canvas for rendering from the start. How did you go about architecting the rendering and input layer? What are you using for text shaping and layout?

Bugs I found:

- <tab> when in a 3rd-level indented list loses focus

- Double-click and drag gesture does not extend text selection

- Selection highlight is offset for indented paragraphs. If you select a range you can see the highlight incorrectly extended into the right-hand margin.

- Inconsistent repro: had some cases where select -> delete -> cmd-z would not fully restore my removed text (this could be my mistake)

- Toggling list style of a single indented list item can un-indent entire list, removing hierarchy; I would expect toggling to eventually return me to my original state.

- Frustration: cannot set range of indented list to ordered list without affecting all adjacent list items

- Frustration: cannot resize table rows vertically

- Frustration: on macOS, ctrl-a selects all, where the platform native behavior would be to move selection to the start of the current paragraph. ctrl-e should move selection to the end of the current paragraph, but does nothing. (macOS silently supports readline/emacs style keybinds for text editing)


haha wow this is an awesome list of bugs. thank you. yes all of this was built from scratch, as you can see :D

I will get all of these fixed

regarding rendering/text layout, it’s all based on measureText in the Canvas API. the layout engine is my own. documents are made up of “blocks” like lists and paragraphs and each implements its own rendering, cursor movement, and layout logic.

I am going to start a dev blog where I get into the weeds. but will fix these bugs first.

if you find more like that please email me art@revise.io


Pages.app on Apple platforms is free-as-in-beer, native & instantly responsive UI, launches in a handful of milliseconds, collaborative. Unsure if you would consider it a bloated mess or not; the UI is pretty minimal but still competent for most work.

We would like it to be good. Whichever way to achieve goodness - either be backwards compat, or ship all the stable versions, I don't care but the current situation is silly. Apple gets flack for this and that, but their UI toolkit situation is lightyears ahead; you just pick the OS version you want to target in your app build settings and it will work that way for everyone.

100 MB per runtime, for everyone, and the majority of them are out of support. Is that really the good option? Why not the option the author dismissed: a 9 MB AOT-compiled executable which doesn't need a separate runtime?

On Apple platforms is very uncommon to find apps that only support light mode. The only one on my phone is the app for my old Chinese robot vacuum.

OpenCode works this way too

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

Search: