HNHacker News
TopNewBestAskShowJobs

jayrhynas

353 karma · joined February 8, 2013

[ my public key: https://keybase.io/jayrhynas; my proof: https://keybase.io/jayrhynas/sigs/9TnNcLmaXnv01lsuzwO0Ptol003uOfs3HXF3XbTh2LE ]
submissionscomments
jayrhynas··on Show HN: Apply HN Aggregator
Until OP adds that, you could use this: https://hn.algolia.com/?query=%22apply%20hn%22&sort=byDate&d...
jayrhynas··on iOS Dev Tools
Marco did an interview with Computerphile today: http://youtu.be/yVRtJbXQsL8
jayrhynas··on Show HN: Wired Logic – a pixel-based logic simulator
Looks similar to Wireworld[1], although the rules are different

1: https://en.wikipedia.org/wiki/Wireworld

jayrhynas··on Milligram: A minimalist CSS framework
iOS 9 - looks fine, other than the logo being under the toolbar. Probably needs a min-height on the header section
jayrhynas··on Swift: Commonly Rejected Changes
There's a few more details in the linked mailing list post[0]:

Exactly which statements should be included (certainly if and switch, any others)?

Further, it is important to consider whether the code written using this will actually be better than the code written with these things as statements. For example, the “switch” blocks tend to be very large, and turning them into expressions encourages additional indentation. Swift already allows ‘let’ values to be initialized on multiple paths, so is the win actually that great?

Given that statements-as-expressions would provide another way to do things (they are a purely syntax extension) the barrier should high to add them. They will add complexity and surface area to the language, so they need to pay that complexity.

[0] https://lists.swift.org/pipermail/swift-evolution/2015-Decem...

jayrhynas··on Swift 2 Apps in the App Store
I think this[1] does what you want, unless I'm not understanding your problem description. AFAIK you are correct about protocol extensions not holding state. So I don't think you can implement the `var serialCode = generateSerialCode()` with just a protocol. But you could do it with a protocol + base class.

[1]: https://gist.github.com/jayrhynas/49945331e41314fc3ede

Edit: I just realized that with this method, the protocol extension is useless, you could just define `move` on Robot. So protocol extensions can give you a mix of abstract & default methods but if you need to inherit state you need to use a base class.

jayrhynas··on Swift 2 Apps in the App Store
Wouldn't you define gas() and whatever class-specific methods in the class itself, instead of in extensions on the protocol?

    class SunnyRobot : Robot {
      func gas() { ... }
      func findSun() { ... }
    }
jayrhynas··on M, a personal digital assistant inside Facebook Messenger
Even the old one isn't a proper mobius strip. In the transparent version[1] you can see that the strip twists behind the crossing making it a normal loop.

[1]: http://www.multidmedia.com/common/img/Features/SDK.png

jayrhynas··on C++: Return value optimization vs. std::move
I'm not sure if he updated the article since you read it, but he does have a note about that:

> Note: We should not use this way in the real development, because it is a reference to a local object. Here just show how to make RVO happened.

jayrhynas··on Chord progressions of 25,000 songs
The way I interpreted it, the first chord starts at the second column. The "start" state is necessary so you can see the distribution of songs among the first chords.
jayrhynas··on Ask HN: Why isn't the GitHub attack being covered by the news?
I've had troubles with the web interface and with pushing/pulling on and off since Friday
jayrhynas··on FinderPath
I use this bash function to get the same effect [1]

[1]: http://git.io/hFmk

jayrhynas··on Signs that you're a bad programmer (2012)
> Your program produces output to be read by another (eg: a browser), or implements a network protocol, and relies on the other party's software to be significantly tolerant to spec violations

The problem isn't producing output for another program, but relying on that other problem to catch your mistakes

jayrhynas··on Git-Stats – A local GitHub-like contributions calendar
git-stats-importer also only imports commits by the user set in the global user.email config. Since you haven't made any commits to the git-stats repo, it doesn't show anything.

Edit: it will use the local user.email if that is set. It also will use the GIT_AUTHOR_EMAIL but only as a fallback if user.email is unset

jayrhynas··on Git-Stats – A local GitHub-like contributions calendar
You have to import your commits first: https://github.com/IonicaBizau/git-stats#importing-and-delet...
jayrhynas··on A Xenon flash will cause the Raspberry Pi 2 to freeze
The most recent post [1] seems to indicate that covering one of the chips with blu-tac prevents the freeze

[1] http://www.raspberrypi.org/forums/viewtopic.php?f=28&t=99042...

jayrhynas··on Apple Maps Connect
I was able to log in with no issues. YMMV
jayrhynas··on Hacker's Guide to Setting Up Your Mac
not to mention that many scripts & apps often hardcode the system bash (i.e. /bin/bash) so they won't use the homebrew version
jayrhynas··on A pro tip for reducing visual noise in OS X
A different approach to this is Bartender [1]. It hides the menubar apps on the right but keeps the menus on the left.

[1] http://www.macbartender.com/

jayrhynas··on Devicons, an iconic font made for developers
Well, the selector is "devicons-netmagazine" so it seems intentional
jayrhynas··on Using Swift with Cocoa and Objective-C
From what I've been able to figure out just by playing around, the following rules are used:

1. Return type is `instancetype` or `MyClassName *`

2. Method takes at least one argument

3. Method name starts with a "class suffix"; that is, a suffix of the class name, with the restriction that you can't have partial words. The first letter may optionally be lower case.

The class suffix (optionally followed by "With" like in the `initWith` conversion) is stripped off and the rest of the method name is used for the first parameter, with the first letter lower-cased.

For example, the following conversions apply:

  +[MyClassName myClassNameWithObject:obj] -> MyClassName(object: obj)
  +[MyClassName classNameWithObject:obj] -> MyClassName(object: obj)
  +[MyClassName nameObject:obj] -> MyClassName(object: obj);
However, since those all map to the same swift initializer, only one will be available (generally the first one declared)
jayrhynas··on Online Color Challenge: How Well Do You See Color?
I got a 241... Good thing I already knew I was colourblind
jayrhynas··on Show HN: We're releasing SoundBrush, an app that lets you draw music
thanks for the feedback, we'll take a look into making that clearer
jayrhynas··on Show HN: We're releasing SoundBrush, an app that lets you draw music
Drawing waveforms is a neat approach to visualizing music, but we decided to take a different direction for more casual users
jayrhynas··on Show HN: We're releasing SoundBrush, an app that lets you draw music
We actually do have the ability to constrain notes to a scale (the default for new songs is in fact C Major Pentatonic, not chromatic). We're also working on MIDI and other import/export options for future releases.
jayrhynas··on Show HN: We're releasing SoundBrush, an app that lets you draw music
very cool interpretation of drawing music!
jayrhynas··on Show HN: We're releasing SoundBrush, an app that lets you draw music
Well, it's less of the camera and more of the iPad 1's processing power and memory. We do have an iPad 1 in the dev office - but no matter what we tried, we couldn't get it to run properly on it. Sorry, but this is something we probably won't be able to support in the future.
jayrhynas··on Show HN: We're releasing SoundBrush, an app that lets you draw music
The app is free to download and includes all functionality and 1 free instrument. You can get additional instruments by liking us on Facebook and tweeting, or through in-app purchases
jayrhynas··on Show HN: We're releasing SoundBrush, an app that lets you draw music
Those are some great ideas. We actually do have a realtime component - the note labels on the left side can be played like a piano without messing up your drawing.
jayrhynas··on Show HN: We're releasing SoundBrush, an app that lets you draw music
We're definitely planning MIDI export and possible CoreMIDI support, stay tuned! The new Inter-App Audio in iOS7 also looks interesting...

In terms of sharing, Facebook definitely isn't required - you can email the song to your friends or you can upload it to our Discover service and share the link.

← PreviousPage 3 of 4Next →