Skip Navigation
Max_P Max-P @lemmy.max-p.me

Just some Internet guy

He/him/them 🏳️‍🌈

Posts 15
Comments 1.3K
Is this the electron-alternative we've been waiting for?
  • egui is cool but it's an immediate UI kind of thing, that's usually used in video games as you're constantly re-rendering the whole thing anyway.

    A more fitting UI library would be Iced, which is also what System76 is building their COSMIC desktop environment on.

    It does claim to support the web too, although not via HTML which brings some accessibility concerns. I'd expect performance to be very good otherwise.

  • Those without A/C, what are your tips to stay cool during the summer?
  • When I worked in a restaurant kitchen, we used to soak rags with water and freeze them in the walk in freezer, then once it's nice and frozen we'd wear the rag around our necks.

    There's large blood vessels in the neck feeding your brain, so if you're able to cool down the blood there, it'll spread to the whole body surprisingly fast.

    I actually managed to get cold in hot humid july summer in the kitchen with that method.

  • Optimizing a WiFi Network
  • I get about 350-400 both ways which AFAIK is what my Unifi AC-Lite tops at since it's WiFi 5 and it's only got 2 antennas and tops at 80MHz channels. I get about 200-250 on my phone (1+8T) which I think is single stream.

    Everything indicates me that's as best as it can be with the set of hardware I have. Signal is solid, latency is solid.

    You'll need 802.11ax and/or more MIMO streams to get higher speeds, and/or 160MHz/320MHz channels.

  • Résistance au changement et logiciels libres
  • C'est surtout un question de se débarrasser des responsabilités si quelque chose tourne mal. Pour une entreprise, si quelque chose arrive, souvent ils peuvent simplement passer le blâme entièrement au fournisseur du logiciel pour l'erreur, alors que si c'est un logiciel libre sans garantie, c'est l'entreprise qui est responsable.

    Le risque n'a rien à voir avec le logiciel mais plutôt entièrement le risque légal.

    Plus coûteux au final, mais un coût fixe. Si le logiciel propriétaire te fait perdre des millions, tu as recours contre le fournisseur pour ces pertes.

  • Is this the electron-alternative we've been waiting for?
  • I'm not saying to use native toolkits like Qt or GTK, those indeed have problems. What React Native does is somewhere in-between: it's an abstraction that produces decent results between platforms including the web.

    It uses slightly higher level abstractions that work a lot like the web for rendering, you still get your boxes and a subset of CSS properties. But on web it'll compile to flexbox or grids, on Android it'll compile to something like a LinearLayout or some other kind of layout the OS understands. On web a <Text> will compile to a <span>, on Android it'll compile to a native text element. On mobile where you need the performance the most, you otherwise end up rendering a web page that will then eventually end up doing the same thing back to display it natively, but with all the downsides of a web view.

    This performs way better with basically no downside for the web version, has the majority of the flexibility one needs for responsive layouts but it's way more lightweight when you do target native. On native you can just render it all yourself for really cheap, like any native toolkit would. You're your own toolkit.

    They will never look native, but at least all the rendering will be native. Most companies have their custom UI theme anyway, native widgets rarely gets used anyway.

    We're talking Electron replacement after all, it's not like apps made with it look anything native. But if at least they performed like native apps by skipping the web views and all the baggage it brings with it, that'd be great.

  • Is this the electron-alternative we've been waiting for?
  • For the end user, its main weakness is that complex pages can be pretty slow to render if not coded well. It's not that bad either. You wouldn't be like "oh this is a React site, yuck", they're all like that these days for the reasons you'd expect.

    As for React Native, its main issue is the communication between the JavaScript browser-ish environment and the Java/Kotlin native environment that can be costly because every has to be serialized (meaning, converted to some type of data structure both sides can understand) and deserialized, so complex screen updates don't scale too well.

    It's easy for developers to accidentally trigger much bigger and much more expensive rerenders than expected. If you see whole second long page hangs on some websites as new content loads in that's usually what happened.


    For developers, it's complicated, you kind of need to experience it to understand the footguns.

    React was born to solve one particular problem at Facebook: how can we make it so any developer can jump on any part of the UI code and add features without breaking everything. One of the most complicated aspects of a website is state management, in other words, making sure every part of the page are updated when something changes. For example, if you read a message in your inbox, the unread count needs to update a couple places on the page. That's hard because you need to make sure everything that can change that count is in agreement with everything that displays that count.

    React solves that problem by hiding it away from you. Its model is simple: given a set of inputs, you have a function that outputs how to display that. Every time the value changes, React re-renders every component that used that value, compares it with the previous result, and then modifies the page with the updated data. That's why it's called React, it reacts to changes and actions.

    The downside of that is if you're not very careful, you can place something in a non-ideal spot that can cascade into re-rendering the entire page every time that thing updates. At scale, it usually works out relatively okay, and it's not like rendering the whole page is that expensive. There's an upper cap on how bad it can be, it won't let you do re-render loops, but it can be slow.

    I regularly see startups with 25MB of JavaScript caused by React abuse and favoring new features over tracking down excessive renders. Loads the same data 5 times because "this should only render once" and that turned out to be false, but it displays correctly. I commonly see entire forms being re-rendered every character you type because the data is stored in the form's state, so it has to re-render that entire tree.

    But it's not that bad. It's entirely possible to make great and snappy sites with React. Arguably its problem isn't React itself but how much it is associated with horrible websites because of how tolerant to bad code it is. It's maybe a little bit too easy to learn, it gives bad developers an undeserved sense of confidence.

    E: And we have better solutions to this such as signals which SolidJS, Vue and Svelte make heavy use of. Most of the advantages with less problems.


    Anyway, that part wasn't relevant at all why I don't like React. The point is, skip the web, you don't really need the web. React Native skipped the whole HTML part, it's still JSX but for native app styled components for UI building. The web backend worked very well, your boxes became divs with some styles. It pretty much just worked. Do that but entirely in Rust since Rust can run natively on all platforms. Rust gets to skip all the compromises RN needed, and skip the embedded browser entirely. Make it desktop first then make the web version, it'll run just as well and might even generate better code than if a human wrote it. Making the web look native sucks but making native fit web is a lot easier than it looks. Letting go of HTML and CSS was a good call from React Native.

  • What will happen to all the USA TikTok creators once the ban on TikTok takes effect?
  • I do like the YouTube integration. A good chunk of them have a link to a main long form video which is nice when you don't want to watch a video in 50 parts. You can scroll and be like, that's a cool project let me watch the full 30 mins video.

  • Is this the electron-alternative we've been waiting for?
  • I wish we went the other way around: build for native and compile to HTML/CSS/WASM.

    For me the disadvantage of Electron is well, it doesn't have any advantage or performance improvement over the browser version for 99% of use cases, and when you shove that on a mobile phone it performs as horribly as the web version.

    People already use higher level components that ends up shitting out HTML and CSS anyway, why not skip the middleman and just render the box optimally from the start? Web browsers have become good, but if you can skip parsing HTML and CSS entirely and also skip maintaining their state, that's even better.

    I had the misfortune of developing a React Native app, and I'd say thinking in terms of rows and columns and boxes was nice. Most of RN's problems are because they still run JS and so you have to bundle node and have the native messaging bridge, and of course that it's tied to the turd that is React. But zero complains about the UI part when it doesn't involve the bridge: very smooth and snappy, much more than the browser. And the browser version was no different than standard React in performance.

    I like that it's not yet another Chromium one at least.

  • What will happen to all the USA TikTok creators once the ban on TikTok takes effect?
  • A lot of these are partial bans. Canada for example only bans it for government issued phones which makes sense, there shouldn't be any apps let alone social media apps on those devices.

  • What will happen to all the USA TikTok creators once the ban on TikTok takes effect?
  • Probably move on to YouTube Shorts or Instagram reels. I don't have Instagram but the YT Shorts are basically just TikTok crossposts anyway.

    Ideally Pixelfed would win but that's very hopeful, a lot of the creators are expecting to be paid.

    There's too much money to be made with the format for it to die yet.

  • how easy is it to install arch?
  • It'll depend a lot on your experience. I can just install Arch without reading the wiki at all in about 5 minutes for something fairly vanilla. If you're comfortable with Linux then following the wiki won't be too hard, took me maybe 2-3 hours on my first install before I had my DE and everything all set up (12 years ago). If you've never used Linux before and take the deep dive then it could take hours and days depending on how fast you can absorb all that information.

    "Easy" is very subjective, there's stuff that's so dumbed down for the sake of "easy" that it makes my life harder when I need to do more complex stuff. I know people for whom linear algebra in 11 dimensions is easy for them to do and solve. Easy is relative to your own personal experience level and what you're trying to accomplish.

    Install it in a VM as a test run, you'll see by yourself.

  • CloudFlare et OpenDNS censurent (sur décision de justice). Si vous voulez utiliser des DNS qui ne censurent pas (encore), vous pouvez utiliser les DNS de la FDN ou NextDNS
  • Il y a aussi toujours l'option de prendre les données directement à la source en hébergeant son propre DNS avec Unbound.

    Plus difficile à installer et à configurer, mais pratiquement impossible à censurer puisque les informations sont obtenues directement de la source: d'abord des serveurs globaux pour trouver .com, .net, .ca, .fr, etc., ensuite directement depuis les serveurs de .com, ensuite depuis les serveurs de example.com.

    Du coup ces sites ne peuvent être censurés qu'à la source, soit en supprimant le domaine soit en déconnectant le serveur du site en question.

    Pendant des années j'utilisais un Raspberry Pi, depuis j'ai mis à jours vers un routeur qui supporte OpenWRT et donc Unbound directement sur le routeur. Je crois que le projet PiHole supporte aussi Unbound et permet de bloquer les publicités et arnaques en bonus.

  • [email protected]: Do browsers block websites from uploading data that could be used for fingerprinting like resolution, installed fonts, etc.?
  • No, simply because even with pure CSS and even pure HTML you can find ways to leak some information about the browser. For example, a background image that only loads on 1920x1080, another for 2560x1440, and so on. Make hundreds of those for every possible resolution (they can be the same file on the server but at a different path), and there you go, you now figured that the client downloaded img/background/2448x1280.png from the server logs. You can use the same trick for fonts as well, you just apply the same trick on a box on the page that is sized based on text content. Repeat for every font you want to test for.

    There's just a ton of those little features that are for performance optimizations because loading a 4K background on a 480p phone is a bad experience for everyone involved. Sometimes you need to know the size of some elements to position other elements relative to it. You need the mouse cursor position to open popups at the right place. You need the window size to realign popups and modals. You'd have to go back to text based only sites like it's the 80s and 90s to avoid that kind of fingerprinting.

    And thus Tor's solution: everyone's got the same window size, same fonts and everything.

  • I tried to explain ADHD math to someone and they didn't understand at all
  • That's the smart way to do math. I mean not with such small numbers but you'd do the same thing adding up large numbers, you break down the numbers and rearrange them in a way that's easier to compute.

    Algebra probably feels intuitive to you.

    They're also trying to teach that in math classes (it gets called "new" math) but the boomers are freaking out because "why can't they just do normal additions like we used to, this is so complicated". And the answer to that is, 99% of the time you'll be doing algebra because we literally all carry a calculator in our pockets and sometimes on our wrists at all times and we never need to just do a long division. And that kind of thinking really makes it easy to break down formulas because your brain thinks in terms of moving stuff around in an equation.

  • EVs still have major quality problems, and it’s mostly about the software
  • And since when have you known any computer to be problem-free?

    Software that's not made from overworked engineers working 80 hours a week pressured to work even faster to complete this week's sprint.

    I'm so tired of "computers are buggy and everyone accepts that". No! Computers don't have to be buggy, you just have to not shove trash software on it made by morons doing the bare minimum.

    I have software that's been running on servers for literal years, not a single bug. The hardware's been sized appropriately and I wrote good, sustainable and maintainable code. My computers all can easily do weeks and months of uptime. I pick up my laptop and open the lid and 100% of the time it wakes up from sleep and it's ready to go.

    The overwhelming majority of "production" and "enterprise quality" code I work with is total garbage that should never have been written and its author never hired in the tech space. We repeatedly get reports on how X car manufacturer was pwned for not following best practices that are a decade or two old.

    Corporate greed makes EVs suck because it's developed for as cheap as possible and the target is "good enough customers tolerate it". Shit barely works properly when going through the happy path and the error path just... usually crashes your car.

    I've had to reboot my car at red lights way too fucking often and it's not even an EV. 2020 model and the infotainment reliably crashes if I have a Slack or Zoom call going because it tries to read the phone number off my phone over Bluetooth and doesn't know how to handle a null phone number = the radio crashes.

    It's not fucking rocket science.

  • Do your parents help you financially?
  • No, why would I? I'm a grown up, I don't need mommy's money.

  • 0.19.4 Prerequisites
  • Postgres 16 and pict-rs 0.5.16, but neither are critical it'll just miss features. Like if you use pict-rs 0.4.x then you can't use the image proxy, but you shouldn't anyway.

  • Test 0.19.4 comment nesting (after DB fix?)

    Testing, I broke the database so bad my posts were federating out but not saving on my local instance, fun stuff

    4

    Wayland windows can apparently vsync to multiple monitors at once at different refresh rates

    Neat little thing I just noticed, might be known but I never head of it before: apparently, a Wayland window can vsync to at least 3 monitors with different refresh rates at the same time.

    I have 3 monitors, at 60 Hz, 144 Hz, and 60 Hz from left to right. I was using glxgears to test something, and noticed when I put the window between the monitors, it'll sync to a weird refresh rate of about 193 fps. I stretched it to span all 3 monitors, and it locked at about 243 fps. It seems to oscillate between 242.5 and 243.5 gradually back and forth. So apparently, it's mixing the vsync signals together and ensuring every monitor's got a fresh frame while sharing frames when the vsyncs line up.

    I knew Wayland was big on "every frame is perfect", but I didn't expect that to work even across 3 monitors at once! We've come a long, long way in the graphics stack. I expected it to sync to the 144Hz monitor and just tear or hiccup on the other ones.

    7

    Wifi circuit breaker : a terrible idea

    All the protections in software, what an amazing idea!

    5

    [Bug] Viewing a comment (eg. from Inbox) doesn't have a "view parent" option

    It only shows "view all comments", so you can't see the full context of the comment tree.

    2

    [Feature Request] Sharing and copying links should let you copy a local instance link as well

    The current behaviour is correct, as the remote instance is the canonical source, but being able to copy/share a link to your home instance would be nice as well.

    Use case: maybe the comment is coming from an instance that is down, or one that you don't necessarily want to link to.

    If the user has more than one account, being able to select which would be nice as well, so maybe a submenu or per account or a global setting.

    0

    Testing federation

    Testing federation stuff after fixing NTP

    0