HNHacker News
TopNewBestAskShowJobs

dkarapetyan

1 karma · joined December 4, 2019

submissionscomments
dkarapetyan··on Unreasonable Ineffectiveness of Machine Learning in Computer Systems Research
I have also seen genetic algorithms used for these kinds of optimization problems. In fact there is a module in postgres that uses genetic algorithms to optimize query plans (https://www.postgresql.org/docs/9.6/static/geqo-pg-intro.htm...).

But I don't put genetic algorithms in the same bucket. Genetic algorithms are a different breed of optimization algorithm compared to neural nets and gradient descent which is what the modern crop of AI is basically all about.

dkarapetyan··on The Utter Uselessness of Job Interviews
> The key psychological insight here is that people have no trouble turning any information into a coherent narrative. This is true when, as in the case of my friend, the information (i.e., her tardiness) is incorrect. And this is true, as in our experiments, when the information is random. People can’t help seeing signals, even in noise.

People see patterns where there are none. I think this is fundamentally why humans fail at statistics. If every fiber of your being wants to see patterns then you will see patterns. Probably why people hallucinate when in sensory deprivation tanks as well. The brain will make up patterns just so it can continue to see them.

The paragraph right after follows up with the statistical failure that pattern seeking leads to

> They most often ranked no interview last. In other words, a majority felt they would rather base their predictions on an interview they knew to be random than to have to base their predictions on background information alone.

So people would rather do busy work in order to continue to satisfy established pattern seeking habits than figure out a better way.

dkarapetyan··on Unreasonable Ineffectiveness of Machine Learning in Computer Systems Research
I think this is because the kinds of problems that arise in system design are logical and symbolic in nature and the current crop of "AI" has no symbolic reasoning capabilities. All the current hype is about pattern matching. Very good pattern matching but just pattern matching nonetheless. Whereas when constructing a compiler or a JIT it's more like what mathematicians do by setting down some axioms and exploring the resulting theoretical landscape. None of the current hype is about theorem proving or the kinds of inductive constructions that crop up in the process of proving theorems or designing compilers and JITs.

For an example of the kind of logical problem optimizers solve you can take a look at: https://github.com/google/souper.

So I don't see how you can take the current neural nets and get them to design a more efficient CPU architecture or a better JIT.

dkarapetyan··on Ask HN: First time in 4 years I lost interest working for startup. What do I do?
Take a break and if you still don't care find something else. Pretty simple really.
dkarapetyan··on Rust Optimizations That C++ Can't Do
Let me know when you manage to optimize "if (collatz(n) == 1) { ... }" to just "{ ... }" since you seem to think issues of logic like independence and termination and how all of that is tied into the type system have no bearing on optimization.

The fact that you don't know if "collatz(n)" is always 1 or not means you are limited by the compiler's termination limit for inling and simplifying certain expressions. So the fact that the compiler terminates indeed has a lot of bearing on what kinds of optimizations are allowed and derivable in the absence of an expressive enough type system.

Some people might object to that example but the fact remains that logic and type systems are intimately tied to program analysis and optimization. In the domain of pointer alias analysis there is something known as separation logic which allows for statically analyzing aliasing relations. Now if this information is encoded as part of the type system then certain mechanical derivations about aliasing become much simpler which leads to more optimization opportunities. Rust's type system I believe is more related to affine logic but similar arguments still apply. You can not express the invariants that can be expressed with Rust's type system in C++. Actually I take that back. You could in theory encode affine or separation logic with the template system and then encode your program using those templates but that's basically the same work as re-implementing Rust in C++. This means Rust's type system allows for program optimizations that would not be possible otherwise. Similar to how knowing "collatz(n)" always being 1 allows you to elide that condition entirely. No amount of inlining and simplifying will allow you to perform that same optimization.

dkarapetyan··on Rust Optimizations That C++ Can't Do
I don't know what detached means. If it is still visible it's kinda out of context now but I can't delete or edit so can it be detached further to not be visible at all?

Oh, nm. I can edit.

dkarapetyan··on Rust Optimizations That C++ Can't Do
I didn't have insights. Everything I said is pretty standard fare in optimizing compiler design. You can't turn the optimizer crank without assumptions that the type system lets the programmer express and that the compiler can mechanically verify.

Information for optimization passes doesn't come for free and as terminating programs compilers can only fill-in so many holes before the programmer must fill-in the rest or barring that pay a performance penalty which is what happens in dynamic languages even with a JIT.

dkarapetyan··on Rust Optimizations That C++ Can't Do
We indeed could have had a conversation but you opened right out of the gate with "This is trivially wrong". Instead of assuming good faith and seeing the example for what it was, a stand-in for sufficiently complicated code with sufficiently complicated code paths that a compiler would be unable to sufficiently analyze and be sufficiently clever with unless the programmer gave the compiler more information.

Instead you made a bunch of disparaging remarks, trivialized large swaths of CS theory, and failed to see the actual point of my comment in connecting type annotations as mechanically verifiable invariants/assumptions that can be used in optimization pipelines.

dkarapetyan··on Rust Optimizations That C++ Can't Do
Oh, `always_inline` looks like a programmer annotation to me? Am I correct? I don't know. You're the compiler writer who knows about these "sufficiently smart" compilers that should have filled all of that in for me.
dkarapetyan··on Rust Optimizations That C++ Can't Do
You know I have some Ruby code that could use your skills. I really do wish my Ruby would run as fast as my C and you seem to know the magic to making that happen. Can I see some of that code and those papers? I really do want the dynamism of Ruby but combined with the runtime static goodness of C with none of the runtime checking I currently have to deal with. Your confident tone has convinced me those type system folks are a bunch of quacks. The compiler really doesn't need all that information to optimize anything.

Seems like all I need to do is bone up on alias analysis, JITing, and inlining and I'm good to go.

dkarapetyan··on Rust Optimizations That C++ Can't Do
We must be using different compilers then. Last time I checked there are some heuristics about what gets inlined and when exactly those heuristics are triggered. Something about compilers being terminating programs and stack depth not being an unbounded resource. I don't know though. Maybe I was reading the wrong literature. What are your sources?
dkarapetyan··on Rust Optimizations That C++ Can't Do
Really? It's that simple? I wonder then why all these compiler writers spend so much time on getting the type system right if all they need to do is just add some if statements and then add a JIT.

Guess I can also solve all pointer aliasing problems by just adding "if p != q {...}".

dkarapetyan··on Rust Optimizations That C++ Can't Do
That language with your described properties already exists and is called SBCL (http://www.sbcl.org/). I'm not sure what you're arguing at this point though and don't quite get what point you're making.

Compilers, optimizations, type systems, and proof systems are all very closely related and if you want correct optimizations then you must annotate your code with types that the compiler can verify and use as assumptions in an optimization pipeline. These things are not easy to engineer. Saying just JIT it doesn't make much sense.

dkarapetyan··on Rust Optimizations That C++ Can't Do
At which point you are hoping the black box known as the compiler is "sufficiently smart". It's nice to hope but not in the context of compilers.
dkarapetyan··on Rust Optimizations That C++ Can't Do
It's not just about the compiler being smart. There is nothing more you can do with x -> 2 + x other than compile it as is. Now if I somehow prove that x will never be greater than 10 then all of a sudden the compiler can in theory just turn that addition into a lookup table or do all sorts of other things I couldn't think of.

So it's more than just sufficient cleverness. It is also about the language providing you the tools to express certain invariants that the compiler can mechanically verify and then use in an optimization pipeline.

Edit: This is mostly out of context now and can be ignored.

dkarapetyan··on Why I will not exercise my GitLab stock options
I don't remember who told me this but if you are gonna write an angry letter then write it but let it sit there for at least a day. If the next day you come back and still think it is good idea to send it then do it, otherwise just hit delete.
dkarapetyan··on Google claims Levandowski launched competing projects long before Otto
And I think board members are not supposed to have conflicts of interest through insider connections and yet the VC ecosystem mostly operates by insider connections.

I'm not condoning what this guy did but the reason he was able to do all of that is not because he was being shady (although from a specific perspective he was being shady I think it is a matter of degrees when it comes to this stuff). It is because the system is set up to enable exactly this kind of behavior and he just happened to overstep a few too many boundaries whereas the people that have been playing this game for a while have a much more measured approach.

So instead of jumping on the bandwagon and burning this guy maybe we should reflect on how the ecosystem operates as a whole and whether the rules are slightly rigged. He'll have his day in court but if the rest of us don't learn from the experience then not really sure if all the wasted bits on the matter are worth it in the end.

dkarapetyan··on Google claims Levandowski launched competing projects long before Otto
How is that any different from VCs being board members of various startups and those same startups "magically" being acquired by the more successful one?

Why is it OK when VCs do it and not OK when a rank-and-file engineer does it? I think you too are focusing on the wrong things. The startup and VC ecosystem is all sorts of retarded. This case blowing up just gives you a small glimpse into the startup shell game.

dkarapetyan··on Google claims Levandowski launched competing projects long before Otto
$120M. Google basically paid this guy's lawyer fees and then some. They literally enabled and financed their own court case through this guy's salary. Since this is white collar crime this guy will not spend any time in jail, the lawyers will get rich, and either it will be settled or like Oracle case will be dragged out for a decade until Uber is out of business but since all the higher-ups are friends I'm guessing it will be settled.
dkarapetyan··on Every attempt to manage academia makes it worse
In theory this is always the right thing to do no matter what industry you are in. Do you want to build a good software organization then hire smart people and get out of their way but in practice it is basically impossible.

First to know what smart looks like you have to be smart yourself before you can hire more smart people. Second you have to be really cognizant to not hire more people like yourself because not all smart looks the same way. Third whatever position you're hiring for you need to understand well enough to recognize the same kind of skill in others but this kinda conflicts with the second point because expertise always introduces bias. Fourth you have to be ruthless when it comes to firing people because every so often you will make a mistake and hire a bozo that looked smart and people really don't like firing people.

Basically all the cards are stacked against you and what I've observed in most software organizations is that you'll be lucky if you manage to make 10% of your workforce satisfy the "smart" metric.

dkarapetyan··on The Case for More Intellectual Humility
That baffles you? Because of Romania's anti-vaccination movement 17 children are now dead: http://globalnews.ca/news/3345439/deadly-measles-outbreak-sp.... At the end of the day humans are just apes.
dkarapetyan··on Milk that lasts for months
And honey lasts forever.
dkarapetyan··on The Case for More Intellectual Humility
Whatever can be said on the matter was already neatly captured by Feynman

> The first principle is that you must not fool yourself — and you are the easiest person to fool.

dkarapetyan··on Elon Musk has launched a company that hopes to link your brain to a computer
The road to hell is paved with good intentions. Elon preaches the safe AI bible but somehow misses the obvious issues with linking your brain to a computer.
dkarapetyan··on Please stop writing new serialization protocols
I have now seen enough deployments of puppet, salt, ansible, etc. to last me a lifetime and then some. Trust me. People have managed to turn configuration formats into unreadable monstrosities as well. At least with a real programming language I would have sensible debugging capabilities and maybe some refactoring tools to help but with a half-baked YAML programming language I have no such recourse.
dkarapetyan··on Please stop writing new serialization protocols
It's not hairy at all. All these "orchestration" things written in some weird YAML format end up doing the same thing. Re-inventing their own syntax for modules. Re-inventing their own querying language. Re-inventing idempotent building blocks and then forcing you to compose it all in some YAML format.

I'm tired of these state of affairs. All of the above can be done in real programming languages, with real syntax. There is no need for yet another external DSL when an embedded DSL in the form of a library will suffice.

dkarapetyan··on Please stop writing new serialization protocols
Or you know they could just write a library in a real programming language instead of forcing people to write YAML. Don't quite get the fascination with YAML. Give me actual fucking syntax instead of some bastardized serialization format that is badly trying to ape lisp.
dkarapetyan··on Please stop writing new serialization protocols
Along a similar vain please stop writing external DSLs. Especially in the DevOps ecosystem. I'm really tired of learning yet another syntax for (bash + ssh).
dkarapetyan··on Cancer Isn’t a Logic Problem
Stable/unstable/negative/positive feedback loops are technical terms in control theory (https://en.wikipedia.org/wiki/Negative_feedback). I'm using those terms for specific reasons. I don't quite see what you're objecting too. Studying biology in the context of systems and control theory is a pretty well-trodden path (https://simple.wikipedia.org/wiki/Krebs_cycle). Much of modern pharmaceutical research is actually about uncovering the chemical governing loops (another technical term) and affecting them to achieve positive outcomes.

Cell division is an unstable positive loop that requires dampening with negative feedback loops at higher organization levels. When those negative feedback loops break down you get an unstable positive loop in the form of cancer.

So you see how having cell division in a multi-cellular context can not be "cured" of cancer? You'd need to stop cell division and somehow figure out a way around entropy. Cells divide to renew/reset and shed accumulated environmental damage. So no matter what you do as long as you have a system organized around unstable processes like this you will always have a control problem when the negative control mechanisms stop working.

dkarapetyan··on Cancer Isn’t a Logic Problem
Never? Really? https://www.nytimes.com/2016/02/20/science/two-naked-mole-ra...
← PreviousPage 6 of 34Next →