News for hackers. Stuff that matters.
Re:Hello system, a FreeBSD-based OS designed to resemble Mac by aduitsis on Wednesday February 10, 2021 @01:31PM (#26092973)
My favourite small detail on the Mac, is how the clipboard interacts with the filesystem. You can select some text, drag it into the Desktop and it will become a .Clipping. Now, if you drag and drop that clipping into a text field (e.g. textedit), it will be as if it was pasted.
Re:Hello system, a FreeBSD-based OS designed to resemble Mac by hamburglar on Wednesday February 10, 2021 @02:23PM (#26093507)
This is certainly true for data types that the system knows how to serialize and deserialize, but (at least back when clippings were introduced) for others, the app that owns the clipboard data must provide the hook for the serialization and deserialization. Back in my first programming job, we were about to ship a shrink-wrapped software product that I will not name but you’ve almost certainly used, and we discovered that we “needed” to support clippings or else (I can’t remember if this was some Apple compatibility rule or some marketing person’s rule). We didn’t have much time, and we also didn’t have serialization code for this very complicated data structure that was on the clipboard, and my manager told me to just implement it by sticking THE POINTER in the clipping. I objected and was overruled. I did it, it shipped that way, and I will always be ashamed. You could only use a clipping in the same process that created it. I had to add code on the deserialize that checked to see if the pointer was valid. It still makes me sick to think about.
Re:Hello system, a FreeBSD-based OS designed to resemble Mac by marmaduke on Wednesday February 10, 2021 @03:02PM (#26093927)
That’s the practical approach .. and you are lucky to have a manager who is technical enough to make suggestions like that
Re:Hello system, a FreeBSD-based OS designed to resemble Mac by hamburglar on Wednesday February 10, 2021 @04:27PM (#26095053)
There is nothing practical about writing a pointer value to a file. This was a quick hack that made the feature appear to work rather than actually work. It's really bad engineering.
Re:Hello system, a FreeBSD-based OS designed to resemble Mac by marmaduke on Thursday February 11, 2021 @01:46AM (#26098927)
I agree with you, before the external constraints enter the picture. But as you said, it had to be delivered with this feature on a shorter timeline than a better solution allowed for. The choice between delivering something and delivering nothing, how do you proceed there?
Re:Hello system, a FreeBSD-based OS designed to resemble Mac by hamburglar on Thursday February 11, 2021 @05:21PM (#26108200)
Slip it or cut it. Doing it in a way that loses data for users is a bad call.
Re:Hello system, a FreeBSD-based OS designed to resemble Mac by Wowfunhappy on Wednesday February 10, 2021 @03:33PM (#26094369)
This is also why Mac apps built using frameworks other than Cocoa (or Carbon) never feel quite right!

Sure, you may have recreated the copy and paste menu so it looks and feels identical. But did you remember to handle .clipping files? What about File > New From Clipboard? What about the system-wide custom keyboard shortcuts? Oh, and don't forget to make it all behave properly with Voiceover!

Re:Hello system, a FreeBSD-based OS designed to resemble Mac by kridsdale1 on Wednesday February 10, 2021 @04:32PM (#26095099)
This is why it sucks so much that many important "apps" are electron shells.
Re:Hello system, a FreeBSD-based OS designed to resemble Mac by danellis on Wednesday February 10, 2021 @06:52PM (#26096446)
Advocates of Electron sometimes claim that it unifies the look of the application across platforms. This should not be a goal. Most people are far more like to use several applications on one platform than use one application on several platforms. It is the platform that the apps should be conforming to, not themselves.
Re:Hello system, a FreeBSD-based OS designed to resemble Mac by yepthatsreality on Wednesday February 10, 2021 @08:09PM (#26097010)
This isn’t true, the reason devs use Electron is for market share not some design-usage principle.
Re:Hello system, a FreeBSD-based OS designed to resemble Mac by noobquestion81 on Wednesday February 10, 2021 @10:52PM (#26098071)
This isn’t true either. If market share is your goal, just write 3 native apps. No, devs choose electron to speed up development of apps that need to be cross-platform. They only write one app instead of three. Faster dev cycle. In doing so, they aim for the middleground UX between all the platforms and end up with something that kinda sucks on each one. Its a tradeoff that is usually overlooked, and indeed is often sold later as “a unified look”, which doesn’t do anything for typical users that work within a single platform.
Re:Hello system, a FreeBSD-based OS designed to resemble Mac by danellis on Saturday February 13, 2021 @04:49PM (#26127293)
Which part are you saying isn't true? That Electron advocates sometimes claim that, or that applications should conform to the OS they're on?
Re:Hello system, a FreeBSD-based OS designed to resemble Mac by saagarjha on Wednesday February 10, 2021 @11:10PM (#26098173)
Yes, but sometimes you're not in a position where your users are willing to tolerate "we cut corners to save time and money so your experience is worse as a result".
Re:Hello system, a FreeBSD-based OS designed to resemble Mac by yagya on Wednesday February 10, 2021 @07:53PM (#26096899)
Exactly why I prefer Seaglass over Element for Matrix chat, even though Seaglass hasn't been updated in a while. Same with Telegram Desktop and Telegram for macOS.
Re:Hello system, a FreeBSD-based OS designed to resemble Mac by saagarjha on Wednesday February 10, 2021 @11:11PM (#26098176)
I have yet to find a Telegram client that is a good Mac citizen :/
Re:Hello system, a FreeBSD-based OS designed to resemble Mac by quietbritishjim on Wednesday February 10, 2021 @03:35PM (#26094390)
Windows had a very similar idea to that, called "shell scraps" [1]. The feature was removed because basically nobody ever used it (and it was a vector for viruses) [2].

[1] https://en.wikipedia.org/wiki/Shell_Scrap_Object_File

[2] https://docs.microsoft.com/en-us/previous-versions/technet-m...

Re:Hello system, a FreeBSD-based OS designed to resemble Mac by heavyset_go on Wednesday February 10, 2021 @04:11PM (#26094875)
KDE's Plasma Desktop allows you to do this. You can drag text from any app to the desktop, and it will turn it into a Note.

You can right-click and paste, or Ctrl+V, on the desktop or the file manager, too, and it will save your clipboard contents as a file for you.

Same thing works for images, videos etc.

Re:Hello system, a FreeBSD-based OS designed to resemble Mac by akdor1154 on Wednesday February 10, 2021 @09:13PM (#26097469)
Now copy and paste that file into kedit or kword.. what happens?
Re:Hello system, a FreeBSD-based OS designed to resemble Mac by heavyset_go on Thursday February 11, 2021 @01:22PM (#26105206)
I just dragged a text file into Kate and Kate opened it.
Re:Hello system, a FreeBSD-based OS designed to resemble Mac by toomanyducks on Wednesday February 10, 2021 @03:13PM (#26094079)
Sort of reminds me of Plan 9, with the ability to treat text as executable, where execution can include opening a file in a designated application. I haven't used either OS for more than a cumulative 10 minutes, but this was definitely my favorite part of Plan 9.
Re:Hello system, a FreeBSD-based OS designed to resemble Mac by MisterTea on Wednesday February 10, 2021 @04:23PM (#26095011)
Text isn't executable in plan 9 but it plays a major role in the design of how you interact with the system.

The functionality you describe sounds like a mixture of Acme(1) text editor and the plumber(4) file server.

Acme editor allows you to exec highlighted text so long as the highlighted portion is a valid command string. For example: if you wanted the date printed in the Acme window from date(1) all you do is type <date, highlight it, middle click it, and date's stdout is redirected into the editor and the highlighted text is replaced with the output of date. Without the '<', the output would redirect to a new window. You can also put commands into the tag bar and right click them to execute. So when I'm writing plan 9 programs, I put mk into the tag bar of the programs directory and just click mk. Of course Acme works hand in hand with the plumber and you can send plumb messages from Acme too. Right clicking text in Acme plumbs it.

The plumber is a really neat program. All it does is listen for messages that are plain old text, tries to match the message to a rule, and that rule has an associated action. You load the rules by simply copying the rule file to the plumber rule file. So for example, you send a url to plumber, it's rule looks for http://, matches it to a rule that says open mothra or netsurf and use the url as an argument and the website open in the browser. If you're inside acme and right click a header file in acme, plumber then just tells acme to open that file (assuming acme is in your rules file for text)

Re:Hello system, a FreeBSD-based OS designed to resemble Mac by mst on Wednesday February 10, 2021 @04:46PM (#26095242)
Do you know of a good video of this in action? I've managed to get a much better handle on smalltalk and slime by watching videos of people using them, but I dunno where to find one for acme (I looked, the ones I found didn't quite help me get my brain around it).
Re:Hello system, a FreeBSD-based OS designed to resemble Mac by mburns on Wednesday February 10, 2021 @06:52PM (#26096447)
Re:Hello system, a FreeBSD-based OS designed to resemble Mac by ithkuil on Wednesday February 10, 2021 @03:56PM (#26094659)
You can play with a user space port called plan9port (https://9fans.github.io/plan9port/) where you can run the "plumber" executable, edit your rule file and then just invoke the plumb command with some text and context and have it do things. It also comes with the acme editor and other tools.

This way you can have some of the fun of plan9 but keep your modern amenities such as wifi, a browser and whatnot.

Re:Hello system, a FreeBSD-based OS designed to resemble Mac by amatecha on Wednesday February 10, 2021 @08:48PM (#26097291)
Ah yeah, text clippings are an amazing feature. The feature was added in 1994, for System 7.0 or newer[0]. Super useful. I used to be in the midst of a conversation with someone on Hotline and want to save a snippet of text. Select it, drag to desktop, done. Saved for later as a file I can refer to or even drag & drop to some other program.

[0] http://asa.max1zzz.co.uk/English-North_American/Macintosh/Sy...

Re:Hello system, a FreeBSD-based OS designed to resemble Mac by anthk on Wednesday February 10, 2021 @02:18PM (#26093465)
KDE used to work like that too.
Re:Hello system, a FreeBSD-based OS designed to resemble Mac by heavyset_go on Wednesday February 10, 2021 @04:59PM (#26095371)
It still does.