Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
rav
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
26 ms
·
241.
▲
by
rav
11y ago
Why is 1,060 KB of JavaScript required to display this wonderful text page? Is there a way to read just the text without any interactive elements?
242.
▲
by
rav
11y ago
Is the link dead? I get a 404.
243.
▲
by
rav
11y ago
There's something nice about a Master's thesis being developed on the master branch.
244.
▲
by
rav
11y ago
This kind of indirection is specifically not supported even with simple optimizations: https://developers.google.com/closure/compiler/docs/limitati...
245.
▲
by
rav
11y ago
Yes, it's quite possible: :args *.cpp " or any other list of files :set autowrite :argdo normal @@ :wq
246.
▲
by
rav
11y ago
I was surprised that Bay 12 Games (who make Dwarf Fortress) are the 22nd most earning creator on Patreon, even though they created their account only 3 months ago! Well done!
247.
▲
by
rav
11y ago
From a CS theory perspective, I would say it's two implementations of the same algorithm, or two ways of phrasing the same algorithm. The most natural formulation in your eyes is probably not the same as the most natural formulation in
248.
▲
by
rav
11y ago
That is essentially the same as the algorithm in the article, which was Figure 3: for (i is 1 to 52) Swap i with random position between i and 52 After i iterations, the first i entries are your "shuffled", an
249.
▲
by
rav
11y ago
The title should say "may trigger soaking winter storms in California".
250.
▲
by
rav
11y ago
They are documented in :help left-right-motions, which you can also read at http://vimdoc.sourceforge.net/htmldoc/motion.html#left-right... . fx moves the cursor to the next occurrence of x, and semicolon repeats the se
251.
▲
by
rav
11y ago
You need to know how dw, de, cw, ce relate to each other, when the cursor is on a token character vs. a whitespace character, and so on, in order for this to be truly useful -- but luckily, ordinary practice with those commands in Vim can l
252.
▲
by
rav
11y ago
I rarely resize windows, but when I do, I set mouse=a and use the mouse to drag the window borders around. There's also CTRL-W _ (underscore) to maximize the current window and CTRL-W = to make window sizes equal.
253.
▲
by
rav
11y ago
You can combine regexes with macros if you only wish to run your macro on a particular set of lines: :'<,'>g/foobar/norm @q will run the macro only on the subset of selected lines that match the regex &quo
254.
▲
by
rav
11y ago
I am sorry, but I don't know any resources... I have collected a few things on the following page: http://users-cs.au.dk/rav/vim/ Basically, I achieved my wizard-level C++, Vim and Git knowledge during my thr
255.
▲
by
rav
11y ago
Find first brace to the right of the cursor (be either an opening or closing brace) and jump to the matching one. If the cursor is at the beginning of a line of matched parentheses, % will go to the closing parenthesis of the first group, a
256.
▲
by
rav
11y ago
> I really do mean language, too. When I'm using vim, I feel a lot more like I'm communicating with my computer than trying to figure out how to do what I want to do. I tell people learning Vim or Emacs that they should treat i
257.
▲
by
rav
11y ago
Pardon, it might have been a trivial example. I managed to find a real-world example I encountered in February this year. The PAPI library has a utility program papi_avail which prints a table of supported performance counters. The lines ma
258.
▲
by
rav
11y ago
Can you explain what the mappings do? I usually use the asterisk to search for the token under the cursor, edit the sought token using cw and then n.n.n.n. to replace later occurrences. I don't see how the mapping makes this more effic
259.
▲
by
rav
11y ago
Suppose a range of lines contains function calls in some programming language: i = foo(a, 42, 1) j = bar(b, c, 100, 2) # this is a comment (well, duh) bazbar(etc, 3) You want to edit the last parameter in each function cal
260.
▲
by
rav
11y ago
In my 6 years of coding and writing LaTeX in Vim, I have found that the greatest boost to my Vim productivity is learning all about the vi and ex foundation of Vim. My Vim knowledge applies 100% to any default Vim installation on a modern d
261.
▲
by
rav
12y ago
But you should give the functions different names, since it is not valid to define the same symbol more than once (and there's no name mangling in C that enables function overloading).
262.
▲
by
rav
12y ago
The problem is that (correct me if I'm wrong) an expression like "&foo->bar" counts as a dereference of foo, even though the result of the expression is simple pointer arithmetic involving foo (adding the offset of the
263.
▲
by
rav
12y ago
CyanogenMod comes preinstalled on OnePlus One, so for me it is no longer a "custom ROM". Even though it is not rooted by default, Privacy Guard has been working for me out of the box from day one.
264.
▲
by
rav
12y ago
In 2013, LWN had an article on Optimization-unsafe code [1]. Essentially, after a pointer dereference, the compiler is allowed to optimize out any NULL-pointer checks, as dereferencing a NULL pointer is undefined behavior (and the compiler
265.
▲
by
rav
12y ago
Where Quicksort uses the recursion stack to maintain the `intervals` implicitly, Lampsort instead uses some set data structure to maintain this set of subproblems explicitly. It reminds me of the way you turn recursive depth-first search (r
266.
▲
by
rav
12y ago
> everything has to be declared inline to avoid violating the one definition rule. Actually, methods defined inside the class definition are implicitly marked inline.
267.
▲
by
rav
12y ago
With my CS background, I find this usage of "Data Structures" in the title confusing. I was expecting some sort of visualization framework for viewing tree/graph structures, so I think the title is a bit misleading.
268.
▲
by
rav
12y ago
The Danish Geodata Agency (Geodatastyrelsen, abbr. GST) provide point clouds, elevation rasters (both ground and surface), topographic maps and more in a national project that started in 2011. http://eng.gst.dk/maps-topograp
269.
▲
by
rav
12y ago
I was moderately shocked and confused at the pasta/cake illustration midway in the article.
270.
▲
by
rav
13y ago
Here is a sample implementation: git log --author=rav --numstat --no-merges --pretty=format: | awk -e '{ a += $1; b += $2; } END { print a; print b; print a-b; }' produces this output (sum additions, sum deletions
More ›