HNHacker News
TopNewBestAskShowJobs

yamaneko

421 karma · joined October 3, 2012

submissionscomments
yamaneko··on Chrome Won
They are disabled:

    Multiprocess Windows 	0/1 (Disabled by add-ons)
    Asynchronous Pan/Zoom	none
How can I enable them?

EDIT: I tried toggling browser.tabs.remote.autostart to true in about:config, but it still gives the same message. Looking into it now.

EDIT2: I did it!

    Multiprocess Windows 	1/1 (Enabled by user)
    Asynchronous Pan/Zoom	wheel input enabled
Besides disabling all my extensions (except for uBlock) I had to disable Ubuntu Modifications.

EDIT3: Wow!! This is so much better! I didn't know project Electrolysis was already out. Thanks!

yamaneko··on Chrome Won
I switched to Firefox because Chrome was keeping my fan always busy (high CPU usage and temperature) and using too much RAM. It was always around 5GB for my common usage. In Firefox it's always around 2.7GB. There were some privacy concerns too.

Having said that, Firefox also has its issues. It is so unresponsive sometimes, giving long hangs. That's the main problem to me. There are others, like it being slower in some pages and some of its extensions UI give me a pre-web 2.0 vibe or look abandoned. (But its Mendeley importer extension is way better than Chrome's).

yamaneko··on Why do many math books have so much detail and so little enlightenment? (2010)
Having participated frequently in SO and others, I understand why it is necessary. But, I feel that so much is wasted with such a qualified audience. There is so much potential to be explored there.

I don't have a solution either. I just wish I had.

yamaneko··on Why do many math books have so much detail and so little enlightenment? (2010)
In search for books like these in the past, I found "Understanding Analysis" (Stephen Abbott). I went through the first two chapters and I liked it. It is written in a narrative which is both entertaining and instructive. He explains the problem, why is it relevant, ways of approaching it, etc. "It is designed to capture the intellectual imagination."

From the preface: "This book is an introductory text. The only prerequisite is a robust understand- ing of the results from single-variable calculus. The theorems of linear algebra are not needed, but the exposure to abstract arguments and proof writing that usually comes with this course would be a valuable asset. Complex numbers are never used.

The proofs in Understanding Analysis are written with the beginning student firmly in mind. Brevity and other stylistic concerns are postponed in favor of including a significant level of detail. Most proofs come with a generous amount of discussion about the context of the argument. What should the proof entail? Which definitions are relevant? What is the overall strategy? Whenever there is a choice, efficiency is traded for an opportunity to reinforce some previously learned technique. Especially familiar or predictable arguments are often deferred to the exercises.

The search for recurring ideas exists at the proof-writing level and also on the larger expository level. I have tried to give the course a narrative tone by picking up on the unifying themes of approximation and the transition from the finite to the infinite. Often when we ask a question in analysis the answer is “sometimes.” Can the order of a double summation be exchanged? Is term-by- term differentiation of an infinite series allowed? By focusing on this recurring pattern, each successive topic builds on the intuition of the previous one. The questions seem more natural, and a coherent story emerges from what might otherwise appear as a long list of theorems and proofs."

yamaneko··on “Google Is as Close to a Natural Monopoly as the Bell System Was in 1956″
Don't forget Android.

EDIT: doesn't make your point about switching search engines less valid. It is orders of magnitude easier to change than an OS. But Google now spans other areas besides search.

yamaneko··on NeoVim 0.2.0 released
I've been looking for something like this in vim for a while (something like Emacs + ESS). I've found a few plugins and workarounds using tmux, but nothing as smooth as you said. I'll try it out.
yamaneko··on We Can Do Better
I revoked access two years ago, but I don't recall going through the steps for deleting my data. Does anyone have any advice? Should I sign up again and ensure that everything was deleted, then revoke access again?
yamaneko··on Tmux and Vim – better together
Has anyone tried VsVim [1]? It is the best vim experience I've had in any other editor. And I've already tried Sublime's, VSCode's, and others. Most of the vim functions I use are there, but it's been a while since the last time I used VisualStudio, so I don't recall the ones with problem. You can even plug in relative line numbers [2].

[1]: https://marketplace.visualstudio.com/items?itemName=JaredPar...

[2]: https://marketplace.visualstudio.com/items?itemName=ZoltanKl...

yamaneko··on Chrome 59 has cross-platform headless support
After his announcement, Vitaly answered to the team: https://groups.google.com/d/msg/phantomjs-dev/S-mEBwuSgKQ/PQ...

> >Is there interest on your side in adopting Chromium as a runtime? There's some existing documentation [2] around the API and embedding, but admittedly, this would be some work.

> We are interested. But I am afraid not in the current state. Currently, PhantomJS heavily relies on Qt and QtWebKit. It's not that easy to adopt Chrome as a new runtime.

> But I think we could implement PhantomJS as a completely new (with the same API) project that will use Chrome - Phantomium!

yamaneko··on Ubuntu Unity is dead: Desktop will switch back to GNOME next year
That will be great for Gnome3 extensions too. Although they are great and there are some very useful ones, I have this feeling that a few of them look a bit abandoned. There's much potential there to be explored.

By the way, I miss a few functionalities from Gnome2 in Gnome3. These extensions make it complete for me.

- [AlternateTab][1]. I can't get used to grouping windows by application. It requires one extra step to get to a target window. I think workspaces do a better job for organizing windows.

- [WorkspaceGrid][2]. I like this way workspaces are organized better than a single line. Makes them more accessible in a 4x4 setup.

- [TaskBar][3]. I miss the task bar from Gnome2. I still use 'Activities', but it requires one extra step to get to a window. It's great for having an overview of your applications, though. I enable a single taskbar at the top.

- [PixelSaver][4]. Remove the title bar and blends the close button with the task bar. Saves a few pixels when the window is maximized.

[1]: https://extensions.gnome.org/extension/15/alternatetab/

[2]: https://extensions.gnome.org/extension/484/workspace-grid/

[3]: https://extensions.gnome.org/extension/584/taskbar/

[4]: https://extensions.gnome.org/extension/723/pixel-saver/

yamaneko··on What I Heard from Trump Supporters
Facing tantrums with tantrums only makes both sides more angry. In general, if I confront someone in a rude way, it is more probable that the other person will get defensive and the discussion derails.

Don't get me wrong, it's not about being quiet either, but I think there are better ways of exposing your point of view¹. Before I became more left-aligned, I had to read several articles and listen a lot, but the tone wasn't abrasive as in most discussions. (Sometimes it was and it made me get defensive, but I knew from past experience that maybe I was wrong again, then I had to listen to see their point. After a few days, it clicked and I started understanding it better).

Of course, if someone doesn't want to be helped, it's not you who is going to change it. But, I think the 'adversary' is always more compelling to learn if you express it in a sincere way, more neutral/polite instead of attacking. And you will learn too.

¹Just to be clear, I'm talking about discussions on the Internet or in person.

yamaneko··on Master C++ Programming with Open-Source Books
SO launched a new feature recently called Documentation. Check out the C++ section [1]. Personally, I'm enjoying it a lot. I think they managed to find a very concise way of showing the basic grips of a language and some advanced ones. Most stuff are through examples, which I think works better when you're already familiar with the language, and just wants to do some specific thing. From time to time, I find myself on the page surfing through the C++ topics.

[1]: http://stackoverflow.com/documentation/c%2b%2b/topics

yamaneko··on The Essence of Linear Algebra [video]
3Blue1Brown explanation of eigenvectors and eigenvalues is very insightful and intuitive [1]. One of my favorite videos from his channel is "Who cares about topology? (Inscribed rectangle problem)" [2]. They way a Torus and Möbius Strip come up as solution to the problem is so elegant.

[1]: https://www.youtube.com/watch?v=PFDu9oVAE-g&list=PLZHQObOWTQ...

[2]: https://www.youtube.com/watch?v=AmgkSdhK4K8

yamaneko··on Posix Has Become Outdated (2016) [pdf]
Just curious, can you give me some examples of GNU-isms/macOS-isms? I have a suspicion what they might be, but I'm not sure.
yamaneko··on Mastering Bash and Terminal
That's right! Sorry for the late reply.
yamaneko··on Uber Hires Former Google Search Chief Amit Singhal as SVP of Engineering
Why the downvotes? I saw a couple replies why this isn't a viable strategy for Uber, but it doesn't make his post of low quality, does it?
yamaneko··on Mastering Bash and Terminal
There is Ctrl-y for pasting deleted strings, which goes along very well with these commands:

  Ctrl-k      delete to end of line
  Ctrl-u      delete to beginning of line
  Alt-d       delete to end of word
  Ctrl-w      delete to beginning of word
  Alt-Backspc same
Bash keybindings behave like Emacs by default, hence every time you invoke one of these, it will put the string into a buffer, which can be later pasted using Ctrl-y.

This is very useful. For instance, if you remembered that you didn't `mkdir /mnt/disk` while in the middle of the command `mount /dev/sdb /mnt/disk`, you can delete what you have already typed with Ctrl-u; issue `mkdir /mnt/disk`; than you can paste the previous command with Ctrl-y. Very useful and I use it all the time! (Ctrl-u have never tied to my muscle memory, so I usually do Ctrl-a Ctrl-k to move to the beginning of the line and delete what comes next).

Other tips:

  cd            goes to home dir
  Ctrl-]        moves cursor to character (such as vim f)
  Ctrl+Meta+]   moves to character backwards (vim F)
I also put these in my .bashrc for searching history pressing up/down.

  "\e[A": history-search-backward 
  "\e[B": history-search-forward 
This is different of searching with Ctrl-r. When you type part of a command, such as

  mkdir /dev
and press up, it will complete with previous ocurrences of commands starting with `mkdir /dev`. It is faster than Ctrl-r if you already know what to do.
yamaneko··on Efficient Wi-Fi Phishing Attacks
> (I use this as pre-doorbell warning sometimes, waiting for my parents or girlfriend to connect when nearby)

That's such a great idea! Could you give more details of how are you doing that? Which tools did you use?

yamaneko··on George Hotz Is Giving Away Self-Driving Software
Also, if you're late to work and can't find a free parking spot, you can let the car circulating until it finds one, while you can head to work.

But this would add other problems to cope.

yamaneko··on Sweden proposes ban on ride-sharing services that make profits
Such a simple explanation, makes perfect sense.
yamaneko··on Watch out: ɢoogle.com isn’t the same as Google.com
Awesome site, by the way. I'm just checking out your tutorial on LDA.
yamaneko··on Getting the Best Performance Out of NumPy
TL;DR

- Avoid implicit copy operations

  # implicity-copy
  b = a * 2
  # in-place
  a *= 2
- Reshaping involves a copy when also transposing

  # triggers a copy due to transpose
  c = a.T.reshape((1, -1))
  # does not trigger a copy
  b = a.reshape((1, -1))
- flatten always returns a copy. Use ravel, when possible

  # flatten
  d = a.flatten()
  e = a.ravel()
- Use broadcasting instead of np.tile

- Fancy indexing yields a copy

  b1 = a[::10]                 # array view: does not yield a copy, takes 804 ns per loop
  b2 = a[np.arange(0, n, 10)]  # fancy indexing: creates a copy, takes 14.1 ms per loop
- Logical indexing can be done using np.compress, which is faster than fancy indexing

  i = np.random.random_sample(n) < .5
  b1 = a[i]                       # fancy indexing: 59.8 ms per loop
  b2 = np.compress(i, a, axis=0)  # takes 24.1 ms per loop
- Use np.take as alternative to fancy indexing, when possible

  i = np.arange(0, n, 10)
  b1 = a[i]                   # 13 ms per loop
  b2 = np.take(a, i, axis=0)  # 4.87 ms per loop
yamaneko··on Vim Anti-Patterns
I tried to use J, but it's somewhat tied to my muscle memory already (and I'm surprised I use it quite often joining comments and stuff). If you're like me, remember that you can abbreviate :join to just :j.

The advantage of using J and K is that they're very vim movements, but if can't because of :join, another workaround would be to use <PageUp> and <PageDown> since they're redundantly bounded to <Ctrl-B> and <Ctrl-F>:

    nnoremap <PageDown> 7j
    nnoremap <PageUp> 7k
    vnoremap <PageDown> 7j
    vnoremap <PageUp> 7k
yamaneko··on Announcing new tools, forums, and features
Plus, not too long ago, GitHub restricted the number of free private repositories, for users and educational organizations. Although they offered educational plans for labs, it still had its limitations. Thus, free self-hosting was what attracted us to use GitLab in our lab.
yamaneko··on “It's The Future”
> A small team starting a new project should not waste a single second considering microservices unless there's something that is so completely obviously decoupled in a way that not splitting it into a microservice will lead to extra work.

That's a good point. I think this thought extrapolates to other parts of software engineering as well. Sometimes writing very modular and decoupled software from the beginning is very hard for a small team, and we can't see well if this is the best approach since it's also hard to grasp the big picture.

I'm currently facing this issue. I'm trying to write very modular and reusable applications, but now I'm paralyzed trying to picture the best patterns to use, where should I use a facade, a decorator, etc. I think I'll adopt this strategy for myself--only focus on modularizing from the beginning if it'd lead to extra work otherwise.

yamaneko··on Men Are Better at Maps Until Women Take This Course
Such a great advice! Thank you.

Do you engage yourself on different hobbies such as you suggested? When do you stop one hobbie and move to another one?

yamaneko··on Google’s look, evolved
It's actually not querying anything, since it works for any query you pass. What happens is that you're bypassing cache because you're loading a different page, as explained by sirn above.

https://www.google.com/favicon.ico?anyquery

yamaneko··on I made an NES emulator – What I learned about the original Nintendo
I would like to learn how to do that. For curiosity, why did you use Go? Is it a matter of speed or libraries? Would you get the same result if you used Python?
yamaneko··on Manyland
Really cool!

Just a small suggestion: could the sound of forbidden actions be replaced by something smoother?

yamaneko··on Gravity Simulator
I've been playing with it too: http://imgur.com/VAHTfg9

It took a little bit to generate this one.

← PreviousPage 2 of 3Next →