Readit News logoReadit News
smallduck commented on Bill Atkinson: Polaroids Showing the Evolution of the Lisa GUI [video]   youtube.com/watch?v=Qg0mH... · Posted by u/zdw
smallduck · 3 months ago
To anyone who thought Apple simply copied what they called at Xerox Parc, check this one out.
smallduck commented on Republicans slam broadband discounts for poor people, threaten to kill program   arstechnica.com/tech-poli... · Posted by u/thunderbong
smallduck · 2 years ago
Are these subsidies to end users, contributing towards retail or perhaps discount service fees? This shouldn't be how it works. Services should be given free to qualifying users (at some service tier) and providers should be paid directly to offset their cost of that service.

Providers should not be making market-standard profits, or revenue that subsidize ventures other than the services rendered to those users, like media creation or M&A.

smallduck commented on The Graham-Warren Plan to Kill Innovation   wsj.com/articles/the-grah... · Posted by u/gardenfelder
smallduck · 2 years ago
"Recent leaks from Meta show that executives there worried that if they didn’t censor accurate information that the Biden administration didn’t like, the company could face severe consequences." dead giveaway about this article's author bias.
smallduck commented on What We Learned from Hating the Unvaccinated   susandunham.medium.com/wh... · Posted by u/johntfella
smallduck · 3 years ago
I live in Metropolitan Vancouver, somewhere with very low vaccination hesitancy, and still someone in my circle only got vaccinated because of restrictions. Restaurants were re-opening and she couldn't join in without getting the vaccine.

How knows how many avoided infection at all, severe symptoms, or even death because they were similarly convinced by restrictions and mandates. In this light, I really don't have much sympathy for some people who felt a little discriminated against. A public heath emergency doesn't care about your petty feelings.

smallduck commented on Ask HN: Why can't you undo changes after quitting and reloading an app?    · Posted by u/amichail
smallduck · 3 years ago
It would be nice if this was a common OS feature. For some platforms however, system APIs implement the undo stack by way of pointers into runtime objects. A macOS application, for example, has model functions for each kind of document change, and these end with constructing an undo stack item. This contains pointers to the model object and inverse model function, plus captured parameters for that function to perform the undo. (Elegantly, when the inverse functions are called during an undo, the undo stack items they make effectively build a redo stack)

To save this undo stack on this and similar platforms would also require changing the undo mechanism entirely, from using pointers into using static references having meaning across instances of the document model. The inverse model function would have to be identified by an enumeration, the object to change would have to be identified by a kind of search path. The details about saving the data, and where to save it, would be the tiniest part of this problem.

But even on these platforms, if an individual app wishes to implement a custom undo stack which supported this feature, that would be very possible. If cross-platform frameworks implemented support for this that could be a definite advantage over native APIs.

smallduck commented on D5 AA 96: the meaning of these three bytes   jameltayeb.com/2021/10/16... · Posted by u/homarp
smallduck · 4 years ago
"I will soon start a series of posts about the Apple IIgs, the most successful of the series." This https://retrocomputing.stackexchange.com/a/498 claims the 2e outsold the 2gs by more than 4 to 1. The former was in the market for far longer, was cheaper, and thus was the mainstay purchase for many mid/late-1980s schools.

Dead Comment

smallduck commented on Dangerous Logging in Swift   indiestack.com/2021/10/da... · Posted by u/ingve
david2ndaccount · 4 years ago
Always use a string literal as the first argument to NSLog or other printf type functions, but I don’t think the author correctly identified the cause of the crash. I believe floating point arguments are passed in registers, so you’ll just get whatever happens to be there. Besides, just reading value arguments like that should read junk from your stack, not a seg fault. Maybe he redacted the actual argument? An accidental %s or %n could lead to this behavior as it interprets junk as a pointer that is then accessed.
smallduck · 4 years ago
Indeed the intent, though not expressed in the Objective-C declaration through the type system, is that the format string is a string literal.

However the intent of the Swift call described in the article is indeed that of a string literal with 2 data "parameters".

So is the correct use of NSLog in this case is this:

    NSLog("%@", "Failed to get modification date at URL: \(url) - \(error)")
This should really be the behavior of NSLog in Swift, that it expands not to the variadic

    NSLog(format-string-parameter, objc-object-parameters..)
but to

    NSLog(@"%@", string-parameter)

u/smallduck

KarmaCake day24September 6, 2014
About
[ my public key: https://keybase.io/jpmhouston; my proof: https://keybase.io/jpmhouston/sigs/a2c3blx71zAzVZDCON3FcKzdSyPbShvt8IpY34R5h5w ]
View Original