HNHacker News
TopNewBestAskShowJobs

mantrax5

386 karma · joined April 29, 2014

submissionscomments
mantrax5··on Netflix replies to Verizon cease and desist letter
A business should be solvent, so of course they're in dollar units.

A business is a balancing act of many "should"s and "could"s.

But when your top priority, or god forbid, sole priority, becomes "maximizing" money, versus contributing in a meaningful way to society, your business no longer deserves to exist.

mantrax5··on Apple To Abandon Headphone Jack? Beats Deal Suddenly Makes Sense
Funny how you assume he assumes that?

The lightning port can do everything you can do with the headphone port, and more.

There are three problems with the headphone jack that Apple can see:

1. It's limited: it can stream analog stereo sound, and get back analog mono microphone. There's a nasty hack some headphones do so you can have a 2-3 buttons on a headphone (say, prev/next track, pause/play), but that's it. Analog sound over a long cable means you add noise. You get no noise cancelation, no surround sound, no other data streams etc. Maybe they have headphones with extra sensors in mind.

2. It's redundant: it takes space while doing a subset of what Lightning can do: that DAC circuitry takes space and wastes power, and the port itself is an ugly hole for no interesting reason than headphones don't currently support Lightning. If Apple removes the headphone port, it can use the extra power and space for more interesting things (like larger battery, more sensors etc.).

3. It's uncontrollable: Apple prefers vendors go through their programs to ensure quality and compliance, but we have players like Square, who use the headphone port for credit card swiping. They do it just so they don't have to pay Apple for licensing a Lightning solution.

mantrax5··on Netflix replies to Verizon cease and desist letter
> An ISP's job, as a private company, is to maximize shareholder value.

You lost me there.

"There is only one valid definition of a business purpose: to create a customer." ~Peter Drucker (whose writings contributed to the philosophical and practical foundations of the modern business corporation)

“On the face of it, shareholder value is the dumbest idea in the world. Shareholder value is a result, not a strategy… your main constituencies are your employees, your customers and your products. Managers and investors should not set share price increases as their overarching goal. … Short-term profits should be allied with an increase in the long-term value of a company.” ~Jack Welch (former very successful CEO of GE)

mantrax5··on When Can I Code Swift on the Server?
Apple is contributing heavily to LLVM and making the code open source. One easily visible example is Clang, a c/c++/obj-c compiler for LLVM, which is open-source and pretty much created and maintained by Apple:

http://llvm.org/devmtg/2007-05/09-Naroff-CFE.pdf

mantrax5··on When Can I Code Swift on the Server?
There are downsides.

If people start adopting a cross-platform subset of Swift, and Apple adds features to Swift which objectively require special platform support (and other platforms don't have it), people will not adopt these innovations in their apps even when targeting Apple platforms, out of fear their previously cross-platform Swift code will no longer be cross-platform.

This effect ties Apple's hands behind their back in their ability to guide and steer the platform's evolution going forward. They'll be adding improvements and no one will be using them.

Of course, since Swift is so tightly integrated with Objective-C and Cocoa already, Swift is already quite Apple-specific. And that's what Apple really needs. A good language that makes sense for their platforms. We already have various incarnations of Mono and Java and what not compiling to iOS if people want cross-platform code.

But the lesson is there are always two sides of the coin here. Remember when Android being "open" had no downsides, either? Witness the malware, fragmentation, and Google having to write really nasty contracts with their OEMs in order to be able to steer the platform in the right direction for Android's own good.

mantrax5··on Swift is coming to PaintCode
Of course.

You know Swift is just so natural to both Objective-C, Java, Scala, C# etc. devs already, and so much simpler than Objective-C, I have the feeling we'll see the fastest adoption of a brand new language in the history of computing here.

mantrax5··on Swift is coming to PaintCode
Let's say that this thing in their pocket was indeed them being happy to see an Objective-C replacement.

On a more serious note, Apple has a practice of cooperating with a small selection of developers (who sign a bunch of scary NDA's) when testing new technologies.

mantrax5··on Swift, and why it hurts you (from an GNUStep developer)
Open source is rarely the problem in the real world. But that's what you get from people who see divide the software world in "open" and "closed".

At one point or another your software needs to run on a piece of hardware. At least some of it won't be open, because as IBM learned in the 80s, you end up giving your hard earned lunch to your competitors.

mantrax5··on Swift is not
Wise people know to avoid micro-benchmarks, but this is not a even micro-benchmark, it's a nano-benchmark....

Testing isolated things like empty loops or ...a single assignment. Those really don't make sense for modern compilers. The dead giveaway is having to modify your code in weird ways, so you don't trigger dead code elimination. If you trigger dead code elimination it means you code isn't producing anything, and you're benchmarking various edge cases that won't occur in the real world.

You need to at least implement a simple algorithm or some small unit of functionality that makes sense in a real program. Swift's compiler is designed to aggressively inline and remove reference counting overhead in cohesive units of code, however if you test everything statement by statement, then whether you enable optimization or not, it can't optimize that much.

That said I don't mind the article. It might help Apple discover places where Swift might be made even faster.

mantrax5··on Swift Developers Community
They can send a cease and desist, but they're not required to.

Think like Apple - why on Earth would you kill a site with resources for their new language they're pushing? You wouldn't.

At most Apple might request that the lack of affiliation of the site with Apple be made more clear. After all who knows who this guy is? Tomorrow he might decide to post nazi jokes in there, you never know.

mantrax5··on Swift, and why it hurts you (from an GNUStep developer)
ActionScript 3 was open source.

- It was based upon ECMAScript 4.

- The ActionScript code was open source, and the actual reference code for ECMAScript 4.

- The JIT runtime of ActionScript 3 was open sourced (Tamarin) and "donated" to Mozilla to use as the basis for a faster JS runtime.

Also, your comparison of Flash with Apple's Cocoa/OS platform frankly makes no sense. The situation is vastly different. Swift is in exactly the same position as Objective-C. It's under no greater threat to disappear than Objective-C is.

mantrax5··on WebGL on iOS8 Safari and WebView
Those are not negative news, just the speculation of Some Dude on the Internet.

Apple is not abandoning OpenGL, heck, SpriteKit and SceneKit are both laid on top of OpenGL.

The fact is OpenGL doesn't allow the underlying hardware to be fully utilized, so now those demanding best performance can use Metal. A good example would be a high-end gaming engine like Unreal. And those who don't, can keep using OpenGL forever.

All the FUD about walled garden and proprietary APIs ignore how Metal is supposed to be used. Engines like Unreal already support OpenGL, DirectX, the PlayStation variation of OpenGL-ish API, Mantle (AMD) and so on.

Now it'll support also Metal.

People who use the Unreal engine can still write cross-platform games for it, but now they'll get even better performance under iOS thanks to Metal.

That's really it. No conspiracy theories.

mantrax5··on Introducing Swift
Three things.

First of all, while you can't do this:

    case val:
    case val:
    case val:
        ...
You can do this in Swift, which does the same thing:

    case val, val, val:
        ...
Second, you can fall through in Swift, but you need to ask for it:

    case val:
        ...
        fallthrough
    case val:
        ...
So don't be sad.

And third... Seriously now, it's a "very powerful programming concept"? I bet 9 times out of 10 you use this very powerful programming concept in other languages, you did it by accident, not because you needed its pawa.

mantrax5··on Apple Ditching OpenGL?
Apple never had their own desktop chips. PowerPC was an IBM architecture. They had created ARM to make chips for Newton, but that's it.
mantrax5··on Apple Ditching OpenGL?
They're ditching Intel and the discrete GPU chips that it needs.

This is the reason Metal isn't introduced on Mac. They're waiting. Waiting until their Macs run on ARM.

I'm not saying it'll happen tomorrow. It may take a few years.

mantrax5··on HomeKit
Dear "zmmmmm", it was Apple who kept inviting Google to every party they had. Default Google search in Safari, default Google Maps and YouTube on iPhone and so on and so on.

Who fucked it up? Google.

The whole world sees Google has rock solid services and technology and the whole world sees Nest has some great ideas going. But Google's historical behavior shows they use all this goodness to (pardon my French) surprise-buttfuck their partners again and again.

Point the fingers at Google.

mantrax5··on Introducing Swift
The "flaws" discovered in Java aren't in the language, but in the most popular JVM implementations, most of which - surprise - are implemented in C (for the lack of a better alternative).

Writing in Java still remains monumentally harder to fuck up in compared to writing all your code in C or C++.

Furthermore, while Java relies on said relatively complicated interpreter + JIT virtual machine for its execution, Swift has no such virtual machine. All code is analyzed statically and compiled to machine code. The Objective-C runtime which it uses (which is not new - it's the same fucking Objective-C runtime) is a tiny C library, which implements a few basic low-level routines, such as dynamic message-to-method resolution.

So next time it's best for you to shut your mouth if you're ignorant about an issue, than telling people who know better than you to "wait for conclusive evidence".

mantrax5··on Introducing Swift
And you're telling me... with a straight face... that Java's lack of direct pointer access, automatic memory management and bounds checking do not make it safer and more secure compared to C and C++?

You really should stop talking.

mantrax5··on Introducing Swift
It was clarified during the "State of the Union" talk immediately following the keynote.

The video should be available on Apple's site (or if not, very shortly).

mantrax5··on Introducing Swift
I'm not misrepresenting what he wrote, I'm directly responding to it.

While you may not be aware with recent language development and modern LLVM-based languages in general, to me and many others what was announced at WWDC today wasn't just a set of buzzwords and marketing speak.

Anyone who has been into language design and watched the keynote today can make a pretty good guess about the properties of Swift. There's a book with hundreds of pages of examples and description of the language semantics on iBooks right now. I've been reading it before I posted. I've been playing with the beta Xcode as well.

Swift is not revolutionary in terms of its feature set. But what makes it quite interesting is the fact this is now an official language for Apple app development, and it's quite a bit ahead of Objective-C in... yes. Safety, performance and conciseness. Fact.

mantrax5··on Introducing Swift
So you take a language with null pointers, unsafe pointer access, possibility of array and buffer overflows (C and Objective-C).

And then you take another where you have no null pointers, no direct pointer access, and no possibility for array and buffer overflows (Swift).

And you say "nah, I look at these two, and I can't objectively tell which is safer"? Are you fuckin' kidding me?

Regarding speed, it's been proven faster by benchmarks, and by the fact the very reason Swift doesn't mix C types and Objective-C types is so the compiler can better reason and optimize the resulting code.

mantrax5··on Introducing Swift
While half of the things you checked in that copy-paste are wrong, let me take the bait and say why it will work:

- it's not just an arbitrary language, it's the new officially sanctioned programming interface for Apple's gigantic, wildly profitable ecosystem

- it's much more concise than Objective-C

- it's faster than Objective-C

- it's safer than Objective-C

- it has more features than Objective-C

- ...yet it's fully compatible with Objective-C and C code running alongside in the same app.

And last, but not least, if you know how Apple works, you know that somewhere in the range of WWDC 2016-2018, Craig Federighi will be on stage, showing a pie chart and saying "Over 92% of developers have ported their apps to Swift, so screw the other 8%, we're discontinuing Objective-C".

Moving fast and constant change is the name of the game at Apple.

mantrax5··on Introducing Swift
It'll be available for all devices supported by iOS 8, so going back to iPhone 4S.

The runtime of Swift is also the runtime of Objective-C, but the runtime might need some upgrades to fully support the Swift semantics in a safe manner.

EDIT: Correction. It's available also on iOS 7. Just confirmed by Apple. Great :)

mantrax5··on Quality of a man’s sperm depends on how intelligent he is, and vice versa (2008)
"Quality of a man’s sperm depends on how intelligent he is, and vice versa"

I don't think people know what "depends" means anymore. Especially the "vice versa" part.

That means if you improve the quality of your sperm, as a direct consequence you will become more intelligent, which brings forward all kinds of interesting questions, such as do men really think with their balls?

mantrax5··on Why is 80 characters the 'standard' limit for code width?
It'd be nice if when people down-mod a post, they give a reason. The way it works is just useless.
mantrax5··on SQL vs. NoSQL
Yes, you need to write continuously. Basically you need a transaction log. Redis unfortunately botches that part a bit (it has no performant and reliable way of persisting every change before acknowledging a "commit"), but that's roughly the idea.

However not all of your state will be persistent, so you write only the persistent parts.

For example, if you need to have an index for quick access to items based on some criteria, you don't need to store the index on disk, you can always rebuild it on startup from the rest of the data.

While there's an upper limit for the amount of data you can store this way (it has to fit in RAM), it fits very favorably in web scenarios, where you have read-heavy write-light data access patterns, and you never have to touch the disk in order to read a piece of data (guaranteed).

mantrax5··on Why is 80 characters the 'standard' limit for code width?
Well context matters, especially if your language has you starting with at least two or three tabs for most of your code:

  package Foo {
      class Bar {
          void baz() {
              // Most code is nested *at least* this deep.
          }
      }
  }
mantrax5··on Why is 80 characters the 'standard' limit for code width?
The most popular text mode on older computers was 80 chars wide. That's really it. No other reason.

I use 120, plenty of space to fit two code windows side by side and one file browser.

With HD screens and the verbose languages we use these days (and verbosity is not always bad), it's a bit silly to try to stick to 80 char cols.

mantrax5··on SQL vs. NoSQL
Actor systems.

Actor systems allow this to scale and cross the machine boundary without having some dedicated database product doing it for us.

I've noticed that the more I work with actor systems (each actor is stateful and keeps its own state), the less I use databases.

In fact, the idea of keep state separate from the code reading it and changing it begins to look oddly broken as a concept.

mantrax5··on SQL vs. NoSQL
SQL remains a useful tool in the box, but while SQL and NoSQL are fighting it out to be the default go-to database technology, something else on the horizon is threatening the concept of having any database separate from the app at all: persistent in-application state.

We don't need a database if we can just load the application state in RAM and save it back via serialization. This works well in surprisingly many cases.

← PreviousPage 3 of 8Next →