HNHacker News
TopNewBestAskShowJobs

Tanegashima

-13 karma · joined January 15, 2017

submissionscomments
Tanegashima··on The Guardian Pulls Out of Facebook’s Instant Articles and Apple News
Facebook doesn't show up posts based on the source. They do it at individual levels.

So even if you read the "Unbiased Times", you can get a biased selection of articles because of the algorithm.

Tanegashima··on Uber CEO Plays with Fire
Well, this site is free...what's the catch?
Tanegashima··on Hacking the Hivemind: Predicting Comment Karma on Internet Forums (2014) [pdf]
And I just upvoted your vote because I do agree... or it was because your post was top-voted?
Tanegashima··on Apple releases a bit of code to let you put Live Photos on your sites
Yeah, sure, the richest company in the world is going after your petty money with this.
Tanegashima··on Apple releases a bit of code to let you put Live Photos on your sites
Apple doesn't care about running in other platforms unless it's for profit, so Web technologies are very low priority.

As for services, their iTunes platform is really 1950s technology, but it works.

I don't know how a company that makes the world's most used Internet service in transactions per second (Apple Push Notifications Service), which works very well, may be "bad".

Tanegashima··on APFS filesystem format
It's violating GPLv3.
Tanegashima··on Apple Forces Recyclers to Shred All iPhones and Macbooks
Source?
Tanegashima··on Apple Forces Recyclers to Shred All iPhones and Macbooks
Who said they are "perfectly fine"?

Also, it's not up to you, the costumer decided to deliver the device for recycling and not for scrap.

Tanegashima··on Apple Forces Recyclers to Shred All iPhones and Macbooks
These devices are sold by the users to Apple for recycling, Apple can't do anything with them besides recycling.

Nothing to see here, conspiracy theorists.

Tanegashima··on APFS filesystem format
I have a case sensitive HFS+ and everything works fine.

That was a problem with older versions of Adobe suite, but since lots of people on Macs used Adobe Apps...

Tanegashima··on APFS filesystem format
Yes.
Tanegashima··on APFS filesystem format
Good.

GPLv3 software can't be on Apple products, yet every Chromebook ships with it, because Saint Google.

Tanegashima··on APFS filesystem format
Look, we get it, you bought an Android and you want to use iMessage and FaceTime.

That would be stupid, Apple doesn't make money from users data, Apple doesn't listen to conversations like Google does to sell ads.

So why would they support servers (and there are a lot more of android users than iOS users) for people that didn't bought anything from them? For people that bought Androids to like them? They don't need that.

It has nothing to do with open source, the open source community doesn't need this and Apple couldn't care less about the GNU types after GPLv3 incompatibilizes with their business (while Android OEMs break the license every single day, but the community turns a blind eye, because it's Google)

Also, they would lose a few of their product sales and lots of 30% shares on sticker packs and other Apps for iMessage they sell.

Tanegashima··on Oculus co-founder Palmer Luckey donated $100,000 to Trump’s inauguration
Then let's be coherent and respect what that man does on his private life with his private money.

Like Trump or not, Occulus is a real company with real people working there making money from selling a legitimate product. So don't associate the two things.

(God, why do I have to write this?)

Tanegashima··on Ask HN: What happened to binary sizes?
This is iTunes download.

When the user downloads, he downloads only the version that works with their CPU.

Tanegashima··on Ask HN: What happened to binary sizes?
I understand that.

But how could the executables? You know, the machine code, get so big.

And I'm comparing installers with just the app!

Tanegashima··on Ask HN: What happened to binary sizes?
Case: eBay for iOS

.app package: 112.9MB

Excluding all the frameworks, all the graphical resources, etc.

The binary is a whopping 30.7MB

Okay that it has armv7 and armv8, then again, it's already 15 megabyte per architecture.

And the App is really simple, specially compared to a fully featured web browser like Opera!

Tanegashima··on Top 20 Most Popular Programming Languages in 2017
There's absolutely no way that VB.Net is more popular than JS, anywhere you go.

It's not because of "liking", simple facts.

Tanegashima··on Apple's Achilles Heel
Figures are for quarterly sales in both cases, of course.

Sources

Apple: investor.apple.com IDC: IDC Worldwide Quarterly Personal Computing Device Tracker, April 11, 2017

Tanegashima··on Apple's Achilles Heel
Yes, because it's the exterior that counts?
Tanegashima··on Apple's Achilles Heel
According to IDC, iOS devices sell more than the whole Windows market (all brands).

PC sales were 60 million, taking Apple's share of 4.2 million, it's 56 million, give or take.

Last year, Apple in this period sold 51 million iPhones, 10 million iPads. And it was a "bad" year.

You might say "but I need my desktop, my IDE, my Photoshop, my etc."

Yeah, but you are one programmer or photographer or video editor, most people don't create anything, or just do some very light editing (like removing skin imperfections from photos), and thus, a media consumption device is most right.

We are in the Post-PC world, live with it.

Tanegashima··on Apple’s new APFS file system
Parity was never was common in PCs.
Tanegashima··on Apple’s new APFS file system
Since when Apple is a server company?

All their SSD's use their controllers.

As for external disks, Apple couldn't care less, for them, the future is cloud storage.

Tanegashima··on Apple’s new APFS file system
People keep forgetting that this FS was designed by Apple for use in their appliances.

Apple devices, save for their least sold model (MacPro), in their least sold product line (Mac) are consumer devices with no ECC RAM. Most people don't know what ECC RAM is, most don't care, and won't pay more for it.

For Apple, it doesn't make sense to switch to ECC for system memory, however, if they implement storage ECC at block level in their SSD controller (Apple designes their own SSD controllers), they can obtain the same functionality at much lower cost (only flash controller RAM needs to be ECC).

Tanegashima··on Apple Pages 6.1 adds equation support using LaTeX or MathML
The file is a zip and contains a PDF of the full document in case that happens.
Tanegashima··on Manifesto: Adding memory ownership to Swift
No, it's not.
Tanegashima··on Manifesto: Adding memory ownership to Swift
I know that, but there's a difference between those who do, and those who talk about it.

And all I see here is those who talk about it.

Tanegashima··on Manifesto: Adding memory ownership to Swift
Yes, let's rush the development of the language, just to say you can do X. /s
Tanegashima··on Manifesto: Adding memory ownership to Swift
Swift is an Applications programming language first, digging its way down to the system.

Rust on the other hand tries to be a system programming language, but with no success at that. And it's not a popular Applications programming language because there's no support from any major software platform vendor.

Swift doesn't have a runtime, a linked library isn't a runtime, if you think it is, then you don't have the qualifications to discuss this.

It is not a problem to store one 50meg file on my 32GB iPhone or 128GB server, it would be in a 32KB microcontroller, but nobody is trying to ship Swift as a language for those.

Tanegashima··on Manifesto: Adding memory ownership to Swift
That code executes 4 times.

That's not how you do things in Swift:

  class Dwizzle {

  	private let countQueue = DispatchQueue(label: "hey debugger! I'm here!")
  	private var count = 0 //type inference to Int

  	func fizzle() {
  		countQueue.sync {
  			if count > 3 { return }
  			count += 1
  		}
  	}
  }
See, no need for mutexes, or defers, or that lock_guard.

Just simple closures you already know.

Now you want to expose the count variable to other types, always in a non-negotiable thread-safe manner?

  	private let countQueue = DispatchQueue(label: "hey debugger! I'm here!")
  	private var _count = 0
  	public var count : Int {
  		get {
  			return countQueue.sync {
  				return _count
  			}
  		}
  		set(newValue){
  			if newValue >= 3 {
  				self.countQueue.sync {
  					self.count = newValue
  				}
  			}
  		}
  	}
And maintain the rest.

Now what if you want to clean up, and need to only one fizzling executing at a time in the whole process? Doesn't matter which process calls the fizzling?

  class Dwizzle {

  	private static let countQueue = DispatchQueue(label: "hey debugger! I'm here!")
  	private var _count = 0
  	public var count : Int {
  		get {
  			return Dwizzle.countQueue.sync {
  				return _count
  			}
  		}
  		set(newValue){
  			if newValue >= 3 {
  				Dwizzle.countQueue.sync {
  					self.count = newValue
  				}
  			}
  		}
  	}

  	func fizzle() {
  		if count > 3 { return }
  		count += 1
  	}
  }
To me, your code looks like a semaphore, let me introduce you to my over-the-knee fully-functional semaphore that can implement your Dwizzle class:

  class HackerNewsSemaphore {
  
  	private let queue = DispatchQueue(label: "sem queue")
  	private var count = 0

  	func up(){
  		queue.sync {
  			count += 1
  			if executeWhenUp && onlyExecuteWhen(count) {
  				execute(count)
  			}
  		}
  	}

  	func down(){
  		queue.sync {
  			count -= 1
  			if count > 0 && executeWhenDown && onlyExecuteWhen(count) {
  				execute(count)
  			}
  		}
  	}

  	var executeWhenUp : Bool
  	var executeWhenDown : Bool

  	var onlyExecuteWhen : (Int)->Bool

  	var execute : (Int)->Void

  	init(whenTrue: @escaping (Int)->Bool, whenUp: Bool, whenDown: Bool, execute: @escaping (Int)->Void) {
  		self.onlyExecuteWhen = whenTrue
  		self.executeWhenUp = whenUp
  		self.executeWhenDown = whenDown
  		self.execute = execute
  	}
  }


  //test
  let dwizzle = HackerNewsSemaphore(whenTrue: { (i) -> Bool in return i <= 3},
                                    whenUp: true,
                                    whenDown: true,
                                    execute: { i in print("fizzle \(i)") })

  for x in 0...10 {
  	dwizzle.up()
  }

  for x in 0...10 {
  	dwizzle.down()
  }

  //output:
  fizzle 1
  fizzle 2
  fizzle 3
  fizzle 3
  fizzle 2
  fizzle 1
← PreviousPage 2 of 3Next →