HNHacker News
TopNewBestAskShowJobs

luikore

97 karma · joined July 15, 2013

github.com/luikore
submissionscomments
luikore··on QBE – Compiler Backend – 1.3
Nearly ideal. The only stopper for me is missing a way to add source level debugging info.
luikore··on How can this 6 axis robot have a static accuracy of 0.05 mm? (2021) [video]
With direct drive (no gear box), do we still need the secondary encoder?
luikore··on Pfizer vaccine appears effective against mutation in new coronavirus variants
We still need Continuous Integration/Continuous Deployment in vaccine development.
luikore··on Ask HN: Who Is Firing?
Aminoapps fired all employees and is handing the app to an outsourcing company to scavenge the remaining user values.
luikore··on TextMate 2.0 (rc 10)
Seems you are not very familiar with TextMate.

For TextMate, cmd+E, cmd+F then the selection is in the search box. Or, you don't even have to open the search box with cmd+F, just cmd+G to next selection or cmd+opt+F to multi-cursor edit all occurrences.

The regex in TextMate is also very powerful (the unicode support is more powerful). New lines can be matched with \n. Another way is to select new line and repeat the cmd+E trick.

TextMate column selection is even better: you can enter column select mode simply by pressing opt. It is in fact multi-cursor editing, many editing commands like completion / copy / paste can work for each row individually.

Cmd+N or ctrl+cmd+N in TextMate.

The last one, not in TextMate. Though cmd+E then cmd+opt+F can highlight and start multi-edit on all instances of the word.

luikore··on TextMate 2.0 (rc 10)
You can copy the search results in TextMate, then paste and continue your second search.
luikore··on TextMate 2.0 (rc 10)
Some key advantages:

1. Fast and responsive 2. If you write a plugin, you know TextMate is Unix (forked child process, communicate through shared fd, you invoke a command named dialog2 to let TextMate popup any dialogs or completion menu...). You can add editor commands in any language -- you can even make TextMate display complex UI dialog with bash. 3. File browser is nearly a finder (drag and drop like finder, and most finder shortcuts work) 4. Search (there are some hidden shortcuts, but when you master it you feel very fluent)

There are weakness too: TextMate is losing the market, many bundle developers switched to other editors. You can't find many new bundles nowadays. It still doesn't support vim-like keyboard operation... etc

luikore··on Apple's investment into Clangd and refactoring tooling
Really? I desire a protocol which is not coupled with JSON-RPC.
luikore··on Webpack 4 Beta released
I also switched to parcel-bundler for a fresh start.
luikore··on The Death of Microservice Madness in 2018
I think another (important) cause of microservice is politics:

When every department wants the easiest job with max outcome and the boss decides to split the cake equally, then an easy job X can be cut into N services which are usually named "micro", resulting in a huge project of complexity (X/N)^N for each team.

luikore··on Announcing new tools, forums, and features
I suggest you use one repo with sub directories, one directory for API part, one directory for front end part, one for the server part ...

Then, when you change the API, you don't have to create 3 pull requests across 3 repos, just ONE pull request and teams can review all the changes together.

And your problem of searching for issues assigned to one person across multiple repos is not a problem any more.

There are already many good examples of managing multiple modules inside one repo:

https://github.com/apache/thrift

https://github.com/rails/rails

luikore··on Announcing new tools, forums, and features
One project with multiple repos just adds unnecessary work of integration and management. Or, your definition of project is something big, vague and blurry.

Some people are eager to divide their project into multiple repos in spite of git being a distributed version control system. Having many teams doesn't mean you should have many repos. Why not just let your team work on one small directory inside the repo?

luikore··on Tabs or Spaces? The Top Starred Repositories in GitHub Analysed
Spaces for the beauty of code

    foo : ( bar )
        | i just want to align this
        | when writing syntax definitions
luikore··on Kore: a fast web server for writing web apps in C
Really?

| Event driven architecture with per CPU core worker processes

So each process should be able to handle a lot of concurrent connections, just like nginx.

And I tried the websocket example, and saw only the first worker process responding whenever a websocket is created.

luikore··on Kore: a fast web server for writing web apps in C
Why not? I'd love to build web applications on a router with pure C.
luikore··on Kore: a fast web server for writing web apps in C
I think the authors want to avoid thundering herd. You can find this basic pattern in the book UNIX Network Programming.
luikore··on This project won China 2014 State Science and Technology Prize
I don't mean "non-sarcastic views will be deleted" at all.
luikore··on This project won China 2014 State Science and Technology Prize
They are being sarcastic.

In China's media, if some news is defined as "good news", then only comments like "好!支持!有希望了!" are displayed while doubting or opposing views are all deleted.

luikore··on Please don't denigrate what a beginner is currently learning
To start with assembly is great if one wants to learn programming instead of building websites.
luikore··on W3C HTML JSON form submission
I don't agree with Example 9, we should use data uri scheme for file content

    "files": [{
      "name": "dahut.txt",
      "src": "data:text/plain;base64,REFBQUFBQUFIVVVVVVVVVVVVVCEhIQo="
    }]
http://en.wikipedia.org/wiki/Data_URI_scheme
luikore··on Human Artifacts on the Moon
Private moon plan to send drones to steal those artifacts -- worth it?
luikore··on Angular 2 Core
Not all JSON are valid javascript: http://timelessrepo.com/json-isnt-a-javascript-subset
luikore··on “Did you mean?” Experience in Ruby
A spelling error in http request can cost more hours if using IDE.
luikore··on “The following surprisingly difficult problem was given to my son's Math Circle”
The ages can be:

    3 + 3 + 4 = 10
    1 + 4 + 9 = 14
    2 + 2 + 9 = 13
    1 + 6 + 6 = 13
If the sum is 10 or 14, B would have had enough information for the answer at once. So the sum should be 13.

And "oldest kid" is not "oldest kids", so 2, 2, 9 is the answer.

luikore··on “The following surprisingly difficult problem was given to my son's Math Circle”
The problem didn't say the price must be > 0. So they may all lowered the price to 0 after lunch time, so the price before lunch time can be $5, $7, or $35 in this case...

If the price must be > 0, assume the it is `a` cents before lunch, `b` cents after lunch, and farmers sold `x`, `y`, and `z` chickens before lunch, where `a`, `b`, `x`, `y`, `z` are all unsigned integers satisfying:

    ax + b(10-x) = 3500
    ay + b(16-y) = 3500
    az + b(26-z) = 3500
Note 10 + 16 - 26 = 0, we can sum the above equations into:

    (a-b)(x + y - z) = 3500
let c = a - b, we know that c is positive integer (price before lunch is higher than after lunch). There are two obvious facts:

1) c is a factor of 3500

2) since x + y - z <= 26, c must be >= 3500/26 = 134

We also know that 3500/c is integer, with the equations we know 10(b/c), 16(b/c), 26(b/c) are all unsigned integers, so 2b/c is unsigned integer, assume d = 2b/c, we have:

    x = 3500/c - 5d
    y = 3500/c - 8d
    z = 3500/c - 13d
Remember that we are investigating the cases of b > 0, so d > 0, so 3500/c >= 13, then we have the fact:

3) c <= 3500/13 = 269

with 1), 2), 3), c = 140, 175 or 250

when c = 140, 3500/c = 25, so d = 1, x = 25 - 5 * 1 = 20 > 10, not valid

when c = 175, 3500/c = 20, so d = 1, x = 20 - 5 * 1 = 15 > 10, not valid

when c = 250, 3500/c = 14, so d = 1, x, y, z are all valid, we get b = 125, a = 375

Answer: the price before lunch is $3.75, after lunch is $1.25

luikore··on AngularJS 1.3.0
> And as we announced back in December, AngularJS 1.3.0 no longer supports IE8. This allowed us to make improvements and performance enhancements that otherwise would not be possible.

It is possible, see how rivetsjs did that years ago. But it is still a very nice thing to drop IE8.

luikore··on Cling: an interactive C++ interpreter, built on top of Clang and LLVM
Sadly, for most compiled languages the semantics will be completely different when being interpreted.
luikore··on Eliminating GIL in Ruby Through Hardware Transactional Memory (2013)
Removing-VM-lock-with-HTM has nothing to do with dynamic or static, compiled or not compiled. Many "staic compiled languages" can have global VM lock too.
luikore··on A Diablo 3 Story
Money in bank is just a record in database, and they earn much more by trading money that do not exist.
luikore··on CSS Variables in Firefox 31 – new syntax
Variable is a BIG change in CSS. If a browser doesn't support variable, then new stylesheets are already broken in that browser. It makes little difference to make the syntax compatible.

Once an easy-to-use syntax is published, toolchains that parse CSS will update as fast as they can! But "--"? Everybody will stick to the old standard and never want to upgrade.

Page 1 of 3Next →