HNHacker News
TopNewBestAskShowJobs

HardyLeung

1,758 karma · joined September 5, 2010

Hardy Leung is the creator of Tagxedo (http://www.tagxedo.com) Twitter: @tagxedo
submissionscomments
HardyLeung··on U.S. Wins First Place at International Mathematics Competition in Hong Kong
The USAMO winner list is here:

http://www.maa.org/sites/default/files/USAMO_Winners_2016_1....

Apparently the final team was not chosen strictly from the top 12 (Michael Kural and Ashwin Sah were Honorable Mentions).

HardyLeung··on Lee Sedol Beats AlphaGo in Game 4
Lee Sedol winning, and keeping his cool and not make any mistakes. AlphaGo, on the other hand, went bonker especially towards the end but it got into bad territory not because of silly mistakes but brilliant play by Lee Sedol.

Could it possibly be that both of the mistakes were bugs? Perhaps it suggested a non-sensical position such as (25.23, 13.15), and it was snapped to (19, 13) :D

HardyLeung··on SVGnest: Efficient packing of irregular shapes with JavaScript
This is interesting. I wrote Tagxedo http://www.tagxedo.com which is another kind of constrained packing problem and there is a bit of similarity in the approaches. This is the first time I've heard of CNC packing and part nesting... May I ask what kind of software and how much they are selling for?
HardyLeung··on Generating Word Search Puzzles
Nice. One improvement would be to throw in letters in frequencies proportional to the likelihood of appearance in actual text. For example:

http://www.math.cornell.edu/~mec/2003-2004/cryptography/subs...

Though this is a simple problem, if you are picky there are actually other considerations... how well do the words intersect (do you prefer more of a sparse tree-like structure, or maximal mesh-like intersection). What is the optimal dimension of a puzzle given the input. How the order of words (random vs. longest word first) affect the quality of the puzzle. etc. I have a half-done word search puzzle app (with a twist) so this piques my interest.

But I like this one nice and clean.

HardyLeung··on Show HN: Easily create, edit and share SVG designs online with Inline
I tried out the zooming capability (nice) but it seems like your stroke width does not change in response to the zoom level (at least not in lock step)? So the redness in the lady's dress changes as you zoom. Isn't that a problem?
HardyLeung··on 0h n0 – A new game from the makers of 0h h1
It seems to be the case.
HardyLeung··on 0h n0 – A new game from the makers of 0h h1
It is a balance between playability and automation. Even minesweeper does that (auto deduce that a large region can be opened up). What I described is only the first-order "convenience" checking to avoid the pain of going way back because of a miscounting.

Regarding the hint button. I don't want to use it precisely because I don't want to "win" by repeatedly getting hints.

HardyLeung··on 0h n0 – A new game from the makers of 0h h1
Another feature request... if a tile is already illegal (too many committed blue in line of sight, or no way to commit more blue to satisfy requirement), flag it already. I think the biggest pain is the counting. Otherwise, a nice game!
HardyLeung··on Show HN: My first painting app
I see that this is very similar to Paper by 53 in several aspects... Is that what you are trying to compete with? In that case, I wonder the logic of an upfront price instead of Paper's strategy which is to give you something to try out... At $4.99 a pop, it is much harder for someone to take the plunge.
HardyLeung··on Image Triangulation Experiment
Yes, linear gradient within each triangle. It has a non-gradient mode but not turned on. The difference is minor though: Gradient = more "silky" and less triangular. No gradient = a bit more flat.
HardyLeung··on Image Triangulation Experiment
Neat. I have a related project called Polygonian -- http://www.polygonian.com -- runs on browser and requires Chrome Native Client that does something similar. Here's the output of a Lincoln portrait using similar point count:

http://imgur.com/lpKVILV

HardyLeung··on Performance comparison of Functional C++ 11, Java 8, JavaScript and Wolfram
This is indeed an interesting problem. I don't know what the runtime breakdown is, most likely in the sorting routine, but if that's the case the problem can be solved much faster but not resorting to generic stable_sort().

I summarize the author's algorithm as follows: take an array of R^3 vectors, and for each element in the vector, perform the [+,-,-], [-,+,-], and [-,-,+] transform. So N numbers become 3N numbers, which is followed by a duplicate removal process faciliated by the sorting.

The improvement is that the duplicate removal can be accomplished without sorting.

Let's say you have an array of R^3 already sorted. Then say you create 3 arrays each of which is created by "shifting" the array in each of the 3 directions. Call the original A, and the derived B0, B1, B2. Note that B0, B1, and B2 are each sorted since element within each array is adjusted in the same direction. Then all you need to do is to do a 3-way merge, which takes linear time.

I bet by doing this, the runtime could be significantly reduced. My guess is that it runs in the range of 10-30 seconds (instead of 335 seconds).

HardyLeung··on The //* /*/ //*/ comment toggle trick
As a long-time C++ developer I wish people don't use any commenting tricks such as this, and I wish people don't use /* * / to comment their code, even if you develop in C. Instead, use // in modern C/C++.

The reason is that we often need to comment OUT code during development. In C++, the 4 choices are: (1) #ifdef, (2) bool dothis = false; if (dothis) { ... }, (3) /* * /, (4) // ...

Among them, I would say the best and least-confusing way to comment out a block of code is /* * /. #ifdef's are very confusing especially if you have multiple of them; // needs to be applied to every line so only works in small scale; if (dothis) doesn't work across multiple functions, and at a glance it is harder to discern whether this is a "comment-out", or a legit condition.

However, by using /* * / in your comments, you eliminate the possibility of commenting out blocks of code that contains /* * / comments. The problem, of course, is due to how the opening and closing symbols are matched.

HardyLeung··on Microsoft BizSpark includes free Azure access
Steve Jobs killed Silverlight (and Flash). Not by providing a strictly superior technology, but by declaring that the category (rich web client) is unimportant. I'm unhappy that Silverlight is dead but not because of Microsoft.
HardyLeung··on Stuff (2007)
Gotta watch this: http://www.youtube.com/watch?v=MvgN5gCuLac
HardyLeung··on Developers: Don't Treat the Windows Store like the iOS App Store
Despite all the criticism in this thread, I thank you for writing this, and I hope you are right.
HardyLeung··on Walt Mossberg's Windows 8 Review
That's right! Thanks!
HardyLeung··on Walt Mossberg's Windows 8 Review
Yes now I can getting use to this. I agree this is not bad way to start.
HardyLeung··on Walt Mossberg's Windows 8 Review
> One other subtle thing I miss from Windows 7 is that shortcuts to apps like Notepad will start multiple instances of the app. For some unfathomable reason, the Windows 8 start screen always goes to the first instance of the app if you try to start Notepad or the like multiple times. That would be OK but I can't find any way to override it and easily start multiple instances. Start8 brings back the old behavior here.

You can do that by right clicking the icon on the bottom taskbar and click the app to start. It did drive me crazy until I figured this out.

HardyLeung··on Walt Mossberg's Windows 8 Review
I have been running Windows 8 (RTM version) on my laptop for two weeks (as I am a MSDN subscriber, thanks to BizSpark). The Metro interface is cute but after a while, I am completely back to the Desktop environment. To my surprise, it is exactly like Windows 7, minus the start menu. I even wonder whether this is because I upgraded from Windows 7?

So I would say, if you are worried that it'll destroy your Windows experience as you know it, don't. It's still there. Really still there, with some minor improvements (e.g. task menu). If I didn't get this for free, I would have felt cheated (as in, this is just an UI skin over my existing Windows 7). What I miss the most is the start menu, and I guess I'll download some start-menu app to replace that.

I don't use my laptop as a tablet so I can't comment on the Metro interface, other than that it's fluid (like the Windows Phone). I don't see there is any chance I'd buy the Surface RT though... The App Store is very limiting at this point. But then, I am not their RT audience.

HardyLeung··on Custom t-shirt site I've been working on the past few months.
You gotta fix your website (I'm using Chrome, and the background image took forever to load, and for the longest time I was puzzled by the small window to the right with some text). Not leaving a very good impression... Plus $29?
HardyLeung··on RIM promises $10k to devs if BlackBerry 10 app earns $1k
How about: Build $1001 app, purchase 1 copy; profit! No?
HardyLeung··on Google’s Marissa Mayer Tapped as Yahoo’s Chief
Marissa Mayer: "it was a reasonably easy decision" ...

This is probably what went through her mind... If Larry can lead Google, and I being the smarter one of the two ...

Despite all her flaws, she may actually succeed at Yahoo! just to prove her critics wrong. So congrats, and best of luck!

HardyLeung··on Super-resolution from a single image
This algorithm is likely very slow. In fact, the authors didn't mention runtime at all.
HardyLeung··on No Windows 8 Update for Existing WP7 Users
I don't think this is entirely correct. If you write in Native (C/C++) then true, it won't run on WP7. But if you write in C#/Xaml you could have targeted your app to WP7 and I believe it will run on both WP7 and WP8 -- of course this will preclude you from using whatever now hardware capabilities in WP8 only.

I think the Native C/C++ is the right move though. The "easy to port to IOS/Android" point is important, and I think going forward that would/should be the model for web development, unless Webapp is sufficient for your purpose, or that you're willing to develop your app in 3 languages (ObjC, Java, C/C#).

That said, I'm sad that my (otherwise very nice) Lumia 800 is getting the WP6.5 treatment.

HardyLeung··on Ask HN: Can I ask for a coding interview do-over?
It doesn't hurt to do that. Be frank about it. If done right they might even see this as a positive.
HardyLeung··on Crazy But True: A $4,000 Facebook Limit Order
Definitely. Not even "putting in a large number so I'll get whatever market clearing price". At $4,000 Facebook will be worth $10T.
HardyLeung··on Ask HN: I was fired from a startup I helped found, I'm fucked
Your bottomline is probably somewhere X months of equity, where 3.5 < X < 11. Why don't you (politely) email them that you are a reasonable person and believe it fairness. You don't expect full cliff vesting per agreement, but a 3.5 month compensation is simply not fair. Counter them something like 8 months worth of equity + expense report. Project a tone that you are reasonable and professional about it, but out of personal principle, you will fight against unfair offers.

Give them a hint (but don't say you are talking to a lawyer) that if the arrangement is unreasonable, you'll not just walk away. You'll spend the time and energy to right the wrongs. Give them hints that investors, public laundry, and/or legal means are within consideration (but don't do any of these yet) -- even at the expense of potentially not getting anything at all.

I think if the founders are serious about continuing with the startup, they'll think twice about this. What you are asking them is to just be reasonable, so they shouldn't have a problem with it. They would be far more worried about all these things you hint at (investors, public laundry, legal means).

If they counter with something -- say 6 months. Take it. Heck, if you do this correctly, you lose no karma, not even the relationship with them.

BTW the equity... probably worthless anyway. So, the other approach is to simply move on. I agree with others that this may actually be the better route, but it depends on your situation.

HardyLeung··on Why should I have written ZeroMQ in C, not C++
The reasoning is very poor. I thought he was going to say something along the line of portability. Nope. It was about exception.

Granted, exception is problematic. I don't use exception for similar reasons. However, given the nature of this project, it should have been clear that exception should not have been used in the first place. Instead, be very explicit about error handling. This is really a poor design choice. How is it the conclusion that the answer is C, rather than "C++ without exception?".

HardyLeung··on How LinkedIn built its new iPad app
A nitpick on the title, cuz it annoys me. Why would anyone say "You'll never believe X"? The X in question (95% HTML) is actually not that unusual to begin with.

But even if X is mind-blowing, the fact is that the article was written to show readers this mind-blowing fact. And after reading said article, should I still be in the "never believe" camp, making it an unconvincing article? Or should I now believe it, thereby invalidating the premise that X is something "I'll never believe"?

I know. Exaggeration sells. But still.

Page 1 of 8Next →