Hacker Newsnew | past | comments | ask | show | jobs | submit | nixpulvis's commentslogin

I don't think explicit naming of impls is wise. They will regularly be TraitImpl or similar and add no real value. If you want to distinguish traits, perhaps force them to be within separate modules and use mod_a::mod_b::<Trait for Type> syntax.

> An interesting outcome of removing coherence and having trait bound parameters is that there becomes a meaningful difference between having a trait bound on an impl or on a struct:

This seems unfortunate to me.


I don't think fully-qualified paths are enough on their own. You also need some way to designate that an impl is symbolically unique and has to be referred to by path. Otherwise, you still end up with a problem where the compiler doesn't know which implementation to use unless you precisely name it.

You depend on crates A and B. A impls Foo for Bar. You pass an instance of Bar to a function that accepts `impl Foo`. You are happy. Later crate B adds an impl of Foo for Bar. Clearly _at least_ one of these must be an orphan impl, but both could be. Suddenly it's ambiguous which implementation of Foo you're talking about, so you break because B added an impl.

There are many potential problems of this flavor with letting any `impl Trait for Type` be an orphan impl and then referenced by path. What happens, for example, if an impl that was an orphan impl in one version of A becomes a coherent impl in a later version of A?

I think there has to be special syntax for named/path-referenced/symbolic impls, even if the impl does not have an identifier name, so that the compiler can know "this impl only resolves if you tell me _specifically this impl_" and the impl provider has a way to create a solid consumer contract about how to use that impl in particular.

Also, not having an identifier name would mean you can't have different impls of Foo for Bar in the same module. That's probably not a limitation anyone would care about, but it's there.


Using the mod name would give it a unique name, just implicitly through the module, so I don't see the issue, unless you wanted to allow a single module to allow multiple impls of the same item.

I also don't see an issue with having multiple impls of the same trait, as long as they don't provide duplicate items inside a module. I often do multiple impl blocks to break up larger logic and organize docs, though this is generally not for trait impls, but I don't see why it couldn't be.

Let me be clear though, I'm not saying this is the best path forward on the coherence/orphan situation necessarily, just a minor critique of the blog posts position. This is a famously tricky issue, and I suspect there is no silver bullet here. Though I have always wanted some way to add flexibility to the orphan rule.


> You depend on crates A and B. A impls Foo for Bar. You pass an instance of Bar to a function that accepts `impl Foo`. You are happy. Later crate B adds an impl of Foo for Bar. Clearly _at least_ one of these must be an orphan impl, but both could be. Suddenly it's ambiguous which implementation of Foo you're talking about, so you break because B added an impl.

I think that's fine. Same as what happens if B adds a new function with the same name as a function in A that you were using unqualified.

> What happens, for example, if an impl that was an orphan impl in one version of A becomes a coherent impl in a later version of A?

Nothing much?


It's comical how much time I've spent convincing people that tabs are a window manager feature not an application feature. People in the Alacritty issue on the subject were pissed!

I've heard this a lot on HN over the years but it doesn't make much sense to me. Some thoughts:

1. App tabs improves UX for 99.999% of users who aren't using a WM with a good tab solution (if one even exists).

2. WM tabs means launching a new app instance for every tab you might want vs having lightweight app tabs.

3. App tabs can do all sorts of app-level things and UX polish that dumb WM tabs can't do because they are so general. My terminal emulator tabs show a badge count of bell notifications, can be dragged around into groups, or dragging into other tabs as split panes. My browser tabs show you which tab is playing music and can impl right click -> mute.

4. I bet even the biggest WM tab cheerleader still uses browser tabs.

5. WM tabs are a different concern than app tabs, not a replacement. WM tabs are useful when you want tabs and the app doesn't provide a good tab metaphor or when you want to tile/group app instances a certain way. That doesn't mean it's not useful for the app instances themselves to have app tabs when it makes sense.


Agree on all the points, except 4. There are even people out there who use lynx as their primary browser :)

Although while I usually like tabs for most apps, I don't use tabs for terminal and rely either on window manager or tmux. I guess the difference is that I often want a mix of tabs and having multiple terminals side by side, whereas I don't really need that for a browser (or very seldom)


Which window manager do you use?

Sway had the better, though often tedious, WM tab solution that I've tried. Niri had a useless one.

I really tried to love sway splits and tabs for terminal windows. But I finally admitted I'd rather just alt-tab to a few different terminal apps, each with its own concern (maybe one per project, this one for my remote machine), and best of all, each with its own internal tabs.

That said, tabs in kitty and tmux, for example, are so basic that you don't necessarily lose much if you were to use WM tabs instead.

On the other hand, tabs in iTerm2, Ghostty, Cmux, probably macOS Terminal -- a bit more powerful and intuitive since you can do things like drag them, and they can show info like terminal state. And in some of those apps, they can be displayed vertically which is my favorite.


My favorite is still AwesomeWM, although I haven't used it in years. Nowadays I'm on mac and my "tiling manager" is about 6-7 custom functions I wrote in hammerspoon. Basically just tile left/right, full size, "reasonable" size + centered, and a shortcut that distributes all my apps in the virtual spaces I've assigned to them.

One of the reasons why I use tmux rather than i.e. iterm2 tabs is that I don't have to change any of my habits or learn extra shortcuts when I'm working with ssh.


Are there any good, non-tiling window managers that support tabs? (I struggle with tiling ones like i3 because I am a small-brained mouse user)

Fluxbox has tabs and is a stacking window manager.

- https://fluxbox.org/features/



I mean, macOS supports tabs now. I wouldn't call it "good" though.

I like to manage tabs and windows through tmux and it suits my workflow very well. What are you going to do now?

Yes, we need tabs for RDR2 and Spotify.

I would love tabs for Spotify. I just discovered I can at least open new windows from the linux YouTube music client by middle clicking, a revelation !

Every application (or concept) can introduce “tabs”, but it means something wildly different for that particular application. Tabs (or instances) in an application immediately bumps into the concept of state (statefull vs stateless) in applications.

Sometimes, it makes perfect sense. The reason tabs made sense for web browsers since 2004 is because each web page could be thought of as a “stateless” instance of an application. You’re not asking for “tabs”, you wish every application could be “Stateless”. Stateless is a beautiful thing, until you understand what state is, and who needs to manage it.

If every “tab” of Spotify had no idea what the other “tab” is playing and you had to switch back and forth between tabs to pause-and-play songs, that would be a bug, not a feature. While 2 “windows” playing audio (if you instruct them to) is expected.


> Tabs (or instances) in an application immediately bumps into the concept of state (statefull vs stateless) in applications.

Agreed, and this is why tabs need to work at the app level, not window manager/os level.

That said, for Spotify specifically, it can already tell what I'm playing on an entirely different device. I think they can handle tabs.


So Apple Intelligence doesn't bother you?

FWIW, I clicked “skip” on a popup to set up apple intelligence and I didn’t see it again.

Of course this might change in future. And Mac OS has other popups where there is no “skip” and only “remind me later”.


Not technically under the umbrella of Apple Intelligence, but you might be surprised to find out what photoanalysisd is doing.

And if the surprise is unpleasant you can disable it by turning off memories and holidays in the settings of the photo app. Not so easy to escape Copilot on Windows.

That's not nearly comparable tho. I don't care it's watching my photo as long as it doesn't annoy me when I want to watch them. Copilot is everywhere, you got to actively avoid it like the plague it is.

I enabled it and it never bothers me. Writing tools exist, but aren’t really shoved in my face. Photos an extra tool to remove stuff from images.

I don’t use it often, but occasionally use the proofread option. Other than that, it stays out of my way.


That's more or less my experience with Copilot on Windows.

Even the linked blog post indicates that that is not the case. Windows has Copilot buttons on practically every built in application, a taskbar icon, and a dedicated physical keyboard key that people commonly accidentally hit (contractually required for OEMs to provide). They also actively promote Copilot in the OS (particularly Home Edition with nothing disabled e.g. "Tips," Notification Spam, Recommendations, etc).

Nobody can predict what Apple will do tomorrow, but as of today, they aren't really pushing Siri/Apple intelligence really hard particularly after initial setup. None of most of the above for example.


I have Pro Edition and for me Copilot only added two icons. One in Notepad and another one in Paint. I ignore both. There's also the Copilot app that I didn't even know I have installed.

I don't know what happens with Home Edition, but I though the pushback was mainly from Insider Preview?


You want to take a look at Microsoft office, my bad Microsoft copilot 365...

You can't even select a cell on notepad without a freaking copilot button pooping up every single time. Same on word, that's maddening !

You could argue that windows isn't Microsoft copilot 365, but then, why do people even use windows ? It's always because of the office, my bad, copilot 365 suite.


You can also get rid of both of them very easily with O&O Shutup 10++ (or any of many other GUIs or scripts designed for the same purpose of decrapifying Windows). I toggled off Copilot and Onedrive and haven't seen either in all the years I've been using Windows 11.

Apple Intelligence has a global off button that actually works. It's unobtrusive anyways. Copilot on the other hand...

So the issue isn't actually that it's baked into the OS, it's that you should have control over when it's used.

I'm not GP, so I can't comment on where their line is, but for me the difference between Copilot and Apple Intelligence is that I can turn off the latter and never see anything about it again. Copilot, on the other hand, is everywhere and it's almost all universally buggy garbage, even when it's disabled.

I actually trust the Apple Intelligence, when off, doesn't exfiltrate my data.


Oh yeah and even when you turn off preferences/settings/features in Windows, they mysteriously come back later in one of the unilateral forced updates, against your wishes.

Yea I respect that.

I too would not want any unprompted access to my files.

At the end of the day this issue is that we don't trust the OS and we cannot easily validate how it is designed to behave.


> So the issue isn't actually that it's baked into the OS, it's that you should have control over when it's used.

Baked into the OS implies that it's integral to its operation in a way that the two are fundamentally inseparable. Having a global off switch implies that's not true.

There are other irritating baked in aspects of the newest macos and other recent versions that are arguably less avoidable, like Tahoe's entire UI design, or the Settings app.


Apple intelligence even when activated is just not as annoying and obtrusive.

The real issue is copilot is implemented in their apps inconsistently. Very clear there’s little cross app planning. Apples solution is global and apps and hook into it or not. And if you turn it off apps done break.

Apple Intelligence is basically unseen in day to day use.

This is it. You can easily disable the whole thing with one toggle, and even when it's on it never gets in your face.

I use Macs for both work and personal use and I don't really notice Apple Intelligence.

Maybe it's doing stuff that doesn't rise to my level of attention, but it isn't actively annoying me.


I use apple products daily and apple intelligence has never interrupted me. I don't even know what it is. So, no.

Why would Apple Intelligence bother them? It's very unobtrusive and actually useful when it's visible. I literally don't notice it except when it's helpful.

I don’t think I’ve ever even noticed Siri/Apple intelligence on macOS. I’ve disabled it somehow (probably at install) and have not heard about it since

Is it incontrovertibly built in to macOS? I have an iPhone and have never enabled it or Siri, so maybe there is similar off switch for macOS.

It’s like Siri, or spell check, if you don’t use it you turn it off and it doesn’t bother you again.

You like it you turn it On, you don’t you turn it Off

Have you even tried it? I'm a Mac user for 20+ years and I'm running Tahoe. Not once have I ever thought about Apple Intelligence. I don't even notice it. I think you have to switch it on.

Yes, that's my point though. It's not about being built into the OS, it's about being controllable.

I never want to read another Bean or log4j config ever again.

Didn't they all switch to convention over configuration and dependency injection so now your configuration is your source code?

Some people did but that's actually worse. Your configuration comes magically out of nowhere and when it breaks you can't fix it.

Nobody ever wanted to wire up RPC endpoints, in the form of Enterprise JavaBeans(tm), using XML files. That is one for the history books of ridiculous technology.

XML files are bad. Invisible magic is worse. The sensible way to wire up a bunch of RPC endpoints is, like the sensible way to do most things, plain old code.

Agreed.

It's clear to me as a more seasoned engineer that I can prompt the LLM to do what I want (more or less) and it will catch generally small errors in my approach before I spend time trying them. I don't often feel like I ended up in a different place than I would have on my own. I just ended up there faster, making fewer concessions along the way.

I do worry I'll become lazy and spoiled. And then lose access to the LLM and feel crippled. That's concerning. I also worry that others aren't reading the patches the AI generates like I am before opening PRs, which is also concerning.


A junior engineer who might spend a few hours trying to understand why you added a mutex, reading blogs on common patterns, might come back with a question about why you locked it twice in one thread in some case you didn't consider. Just because someone lacks the experience and knowledge you have, doesn't mean they cannot learn and be helpful. Sometimes those with the most to learn are the most willing to put the hours in trying.

That's actually one of the best parts. You can trust some of the context you have loaded is side loaded in the LLM, making task switching feel less risky and often improving your ability to work on needed and/or related changes elsewhere.

Is the non-local reasoning here a limitation of Rust, async Rust, or the libraries built around async Rust?

I don't even think there is a sound notion of "sanitization" when it comes to LLM input from malicious actors.


You can sanitise a lab, but not a sewer.


And yet people keep not learning same lesson. It's like giving extremely gullible intern that signed no NDA admin rights to your everything and yet people keep doing it


Isn't it nice to have a USB-C port and then use the back panel inductive charging for this?

I don't see why I would want magsafe on my phone at this point.


> I don't see why I would want magsafe on my phone at this point.

I've been charging my 13 Pro exclusively via MagSafe for a couple of years... out of necessity. The charging port has... an issue... and I've yet to get it resolved.

Honestly the only time I miss being able to use the charging port is on flights, where I'm using someone else's charging solution (i.e. a port I can plug in to).

Everywhere else (bedside table, in the car, or even out and about) it's MagSafe.

The only downside to this approach is that you need to be more specific about which case you buy (they don't all support MagSafe) but in terms of convenience it's night and day better.


I have one of those magsafe multi charger things that let you charge your iphone, watch and whatever you can lie on the base of the charger. I absolutely love it, since it doubles up as a bedside clock for me and it's nicer to snap things on the charger than to fiddle with the cables. I only use USB-C charging for my phone only if I need to charge it fast before leaving somewhere.


The biggest thing for me is not having a fragile connector involved when charging and using it at the same time. A MagSafe puck is super easy to charge your phone while browsing.


MagSafe is a must for older cars.

Good for bedside table too, but not a game changer.


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

Search: