HNHacker News
TopNewBestAskShowJobs

ychen306

183 karma · joined November 11, 2017

submissionscomments
ychen306··on Fast Perfect Hashing
I really dislike posts like this one. For technical stuff like this people should start out with definition so everyone know what the author means by, for example, "perfect hashing".

> By implication, the hash must be at least as many bytes as the key and the function is theoretically reversible

No. At least not by the standard definition[1]. In standard context, the problem of constructing a perfect hash function is, given (ahead of time) a list of items, you find a hash function that can map them to a smaller "range" without collision.

[1] https://en.wikipedia.org/wiki/Perfect_hash_function

ychen306··on Why Swift for TensorFlow?
You are not wrong. For some "highly dynamic" applications, say, optimizing compiler IR where there are many different subclasses of IR nodes, dynamic dispatch is nice. But when you are running an ML model, scientific application where you already know which sparse matrix format you need, etc, you can do all of that statically with less overhead and performance predictability. This is in no way an argument against Julia; the point is that you don't need dynamic dispatch if you can statically determine what needs to happen.
ychen306··on Why Swift for TensorFlow?
Which you don't need most of the time in production because you can statically determine which operation needs to happen without the overhead of dynamically choosing the operation.
ychen306··on Why Swift for TensorFlow?
The problem comes down to how you use your model, which is all that matters. If there is a mismatch between the language in which your model is embedded in and the language in which your main application/interface is written in, then ideally you want a way to extract the model statically from the dev environment. It's not about type-checking per se, which is nice, but how you get the model out without having to, say, start a python interpreter in your server process just to do the inference (which is why in some aspect Tensorflow is more convenient).
ychen306··on Why Swift for TensorFlow?
I will say this in the risk of talking out of my ass as I have no experience in either language :). Having a statically typed language greatly simplifies the tooling because static analysis is much easier; graph program extraction involves one such analysis. When you have to deploy the trained model in production one would hope not to use Python or Julia.

I'd like to add that, with my limited experience in prototyping some of my ML models, having a static checker to check that your tensors have the right shape is much better than having to run your code.

ychen306··on Jeff Bezos Accuses National Enquirer of Blackmail
unfortunately yes
ychen306··on Outperforming everything with anything: Python? Sure, why not?
LLVM IR is not portable. LLVM's infrastructure allows you to write portable code generator, but the IR is definitely not portable.
ychen306··on Julia Language Co-Creators Win James H. Wilkinson Prize for Numerical Software
I don't even know or use Julia and find this confusing.

- I don't think Python added anything to PL theory or methodology either. At least Julia introduced multiple dispatch to a new audience.

- How is the name sexist or creepy?

ychen306··on CompCert – A formally verified C compiler
Eliminating undefined behavior from the language is a language design issue orthogonal to the problem CompCert is trying to solve.
ychen306··on Are We in the Middle of a Programming Bubble?
I wouldn't label the dot-com bubble as a CS bubble.
ychen306··on Predicting Variable Types in Dynamically Typed Programming Languages
Kind of disappointed that they don't include this kind of analysis as baseline. Especially that the types infer by traditional algorithms are usually sound, which is not what you can say for ML-based methods (so far).
ychen306··on An Amoeba-Based Computer Found Solutions to 8-City Traveling Salesman Problem
No to both. Note that these two problems are related because TSP is NP-hard to approximate.

> In this study, we show that the time taken by plasmodium to find a reasonably high-quality TSP solution grows linearly as the problem size increases from four to eight.

There is hardly any theoretical evidence to suggest a polynomial solution from this experiment.

ychen306··on Google’s Secret China Project “Effectively Ended” After Internal Confrontation
> but it'd also let the Big Brother know who was inappropriately curious.

This changed my opinion. I thought the controversy was unwarranted; after all it's what many people in China wants. It's good that Google doesn't follow through.

ychen306··on World's first fully electric bus fleet quietens Chinese megacity
> Large coal plants are more efficient than internal combustion

Wish more people know about this.

ychen306··on 9cc: A Small C Compiler
Generally speaking a chunk of memory you free is simply marked "free" for reuse but not given back to the OS. So in this regard, it is not a burden to the OS.
ychen306··on Code2vec: learning distributed representations of code
Assuming I understand their approach correctly, they are using little (one could argue none at all) semantic information.
ychen306··on I Quit Google Over Its Censored Chinese Search Engine
They know that (whether they are fine with it is another matter). Google was in China from 2006 to 2010, and pulled out partly due to censorship (among other reasons).
ychen306··on Why is 2 * (i * i) faster than 2 * i * i in Java?
It's usually a good idea to turn loop bound into a variable when benchmarking a compiler, lest it optimizes the whole thing away like in this case.
ychen306··on Spatial: A High Level Programming Language for FPGAs
It does not convert high-level procedural code to FPGA gates. It's na DSL, and in fact you still have to think like a hardware designer/computer architect.
ychen306··on Wisconsin’s $4.1B Foxconn factory boondoggle
At this rate of return, they could make college free, and still get a faster return of investment.
ychen306··on Wisconsin’s $4.1B Foxconn factory boondoggle
The article is fairly well-sourced. I am not saying this makes it unbiased; but if you are not-satisfied with the conclusion, you can verify the quotes and make up your own.
ychen306··on Wisconsin’s $4.1B Foxconn factory boondoggle
There people might as well be in an economic cult.
ychen306··on No Phd, No Problem: New Schemes Teach the Masses to Build AI
It takes a special kind of something to think that there's no correlation between intelligence and having a PhD.
ychen306··on A fun optimization trick from rsync
It's more inliner-friendly this way though.
ychen306··on How to use 1000 registers (1979) [pdf]
That would not be a good idea. The amount of analysis effort to analyze something in memory is significantly higher than keeping things in (virtual) registers.
ychen306··on China Once Looked Tough on Trade. Now Its Options Are Dwindling
Running a trade deficit doesn't inherently mean you are losing utility from the trade. Your trade deficit with Walmart (or Costco, or whatever) is negative but both of you gained from the trade. China cheats, and there is no doubt in that; but I am not convinced that US's trade deficit is purely or even mostly a result of that.
ychen306··on David Patterson Says It’s Time for New Computer Architectures and Languages
We need new languages; at the very least new ways to approach to optimization. We are at the point where even C doesn't give you the performance you want -- that's why people invented things like Halide, XLA (Tensorflow), etc.
ychen306··on Checked C: Making C Safer by Extension
It's about the control you can have. You can gradually add in annotations without having to rewrite the whole program as well as being able to selectively check buffer-overflows (i.e. checking everything vs checking code regions that you don't have security guarantee but would like to have). Additionally they also have features that allows you check overflow statically on limited cases.
ychen306··on Show HN: Portable matrix multiplication library
Seems like performance will suffer without tiling.
ychen306··on Automatic Algorithms Optimization via Fast Matrix Exponentiation (2015)
Unfortunately it only works for toy examples.

> cpmoptimize.recompiler.RecompilationError: Can't optimize loop: Unsupported instruction (LOAD_ATTR, 'b') at line 12 in fib, file "test.py"

← PreviousPage 2 of 4Next →