Better HN
topnewbestaskshowjobs
Log inSign up

thebelal

77 karma · joined Jan 2, 2014 (12y ago) · 39 submissions

https://github.com/jimhester
Submissions

comment 2mo ago · link · parent

Was not expecting to see my per-directory-history project mentioned in this, glad the author found it useful!

comment 1y ago · link · parent

There is a quarto-webr extension to do this. A bunch of real world examples are at https://quarto-webr.thecoatlessprofessor.com/qwebr-community...

comment 5y ago · link · parent

An earlier attempt of this is http://csvy.org/, but AFAIK it has never really caught on.

comment 5y ago · link · parent

One of the cancers they mention is pancreatic cancer.

A quick Google search suggests the prevalence of pancreatic cancer in the population is 13 per 100,000.

So if you gave this test with a 0.005 false positive rate and 0.5 true positive rate to 100,000 people it would miss diagnose 500 people and only correctly detect 7 cancers.

So given you had a positive test result there would be a 1-(7/500)=98.6% chance you did _not_ have pancreatic cancer.

Doesn't seem very useful in that light...

5.

Michael Chastain’s nearly omniscient debugging tool, PTRACE_SINGLESTEP_BACKWARDS(static.lwn.net ↗)

3 points · by thebelal · 5y ago · 1 comment

comment 6y ago · link · parent

I use right assignment in this way all the time, you should try it Joe :)

comment 7y ago · link · parent

FWIW `scan()` is going to be much faster if you are just reading doubles from standard input than `as.numeric(readLines())`.

comment 7y ago · link · parent

1632[0] is the first in a series of entertaining alternate history novels, where an entire West Virginian town is transported to the middle of the Thirty Years war. It touches on some of these problems in having to translate modern knowledge to people in the past.

0: https://en.wikipedia.org/wiki/1632_(novel)

9.

Tail Recursion in R with trampolines(tailrecursion.com ↗)

2 points · by thebelal · 8y ago · discuss

comment 9y ago · link · parent

While it is true that S was originally a macro layer around FORTRAN code R has always been primarily written in C. Very little of R core is in FORTRAN, and essentially none of it is C++.

The language statistics show a good deal of FORTRAN (%24.5) [0], however that is largely skewed by the included LAPACK code [1], which accounts for 221,921 / 259,773 lines of FORTRAN in R.

[0]: https://github.com/wch/r-source [1]: https://github.com/wch/r-source/tree/trunk/src/modules/lapac...

comment 9y ago · link · parent

While the order of the walls in Super Hexagon is random, each level has a predetermined set of walls. Once you identify which wall pattern is coming you know exactly the maneuver needed to traverse it.

This makes Super Hexagon more a game of quick pattern recognition than reaction time.

When I play it I am generally focused at the edges of the screen to quickly identify the next pattern and only using my peripheral vision to maneuver around the walls in the center.

comment 9y ago · link · parent

FWIW I have been using vim with Colemak for quite a few years now, with only movie remains needed to get movement back on the home row [0]

0: https://github.com/jimhester/dotfiles/blob/master/colemak/vi...

comment 9y ago · link · parent

Dvorak users in this thread should really give Colemak [1] a try. Dvorak has a number of issues [2] in modern usage and is also harder to learn; many more keys change from their QWERTY equivalents.

I have used QWERTY, Dvorak and Colemak for multiple years and Colemak is the clearly the best of the there for me.

[1]: https://colemak.com/

[2]:https://colemak.com/FAQ#What.27s_wrong_with_the_Dvorak_layou...

comment 9y ago · link · parent

"user:foo" will search an organisation named foo.

comment 9y ago · link · parent

Colemak changes relatively few keys from qwerty, especially compared to Dvorak. I use colemak full time and can still touch type qwerty reasonably fast.

comment 9y ago · link · parent

Agreed, if there was just a little more editor support and use early on the whole CSV mess could have been avoided.

They actually display fairly well in vim

17.

Libsixel – Graphics in your terminal(github.com ↗)

3 points · by thebelal · 9y ago · discuss

18.

Image Classification in R using trained TensorFlow models(randomthoughtsonr.blogspot.com ↗)

2 points · by thebelal · 10y ago · discuss

comment 10y ago · link · parent

Looks like you can play with the interactive editor as discussed in the paper at https://ohmlang.github.io/editor

comment 10y ago · link · parent

1. There is a log plot at the end of the article

2. The author posted the exact search terms used for all languages in an earlier post [0]

[0]: http://r4stats.com/articles/how-to-search-for-data-science-a...

comment 10y ago · link · parent

This is even easier to do with awk.

    awk -e '!a[$0]++'
This also preserves the original input order, which is a nice property.

comment 10y ago · link · parent

I personally would recommend colemak [1] rather than Dvorak. While both are improvements over QWERTY colemak only moves 17 keys from their QWERTY positions, while Dvorak moves nearly all of them. In particular Ctrl-Z, Ctrl-C, Ctrl-V require two hands in Dvorak which is very inconvenient. In some applications these shortcuts can be rebound, but in many others they cannot. In colemak their positions (and all of the left-bottom row keys) are the same as QWERTY.

I used Dvorak for ~2 years and then switched to using colemak for the last 3+. OS support for both is widespread.

You can get back up close to your QWERTY speed in about a month or so (maybe less if going from QWERTY straight to colemak).

I switched to the alternatives to reduce RSI rather than speed and found it helped me with both.

[1]: http://colemak.com/

comment 11y ago · link · parent

The rvest implementation was the main thing that seemed like an R port of the python implementation rather than best use of rvest.

An alternate (simpler) implementation of the rvest web scraping example is at https://gist.github.com/jimhester/01087e190618cc91a213

It would be even simpler but basketball-reference designs it's tables for humans rather than for easy scraping.

comment 11y ago · link · parent

This is IMHO the real benefit to zsh over bash. You can set zsh to share history between sessions and they are interleaved based on the time the commands were run. No more closing a session in the wrong order and losing half of your history for the day.

comment 11y ago · link · parent

Great to hear you find per-directory-history useful! (I wrote it)

On the topic of the article I have per directory history going back to ~2013 when I wrote the script.

comment 11y ago · link · parent

For those interested in viewing this code in context is is at (https://github.com/vim/vim/blob/db9bc0b7931d252cf578c1cd298a...)

Also note that RealWaitForChar has been completely removed from neovim since April of 2014 (https://github.com/neovim/neovim/pull/474/files)

comment 11y ago · link · parent

The axis are described in the text

> The x axis (log scaled) gives the number of speakers (plus one, so as not to make dead languages fall off the scale). The y axis, also log scaled, shows the adjusted wikipedia size.

As is the real ratio

> real ratio, defined as the number of ‘real’ pages divided by the total page count

Not sure why they couldn't put the above in the figure legend (or better yet label the plot directly). I agree it is poorly done.

comment 11y ago · link · parent

Carmack is one of my role models as well, but 0x5f3759df while neat did not originate from him, as it states multiple times in the Wikipedia article you cite.

comment 12y ago · link · parent

Completely agree with this. I actually think vims undo tree might be the most useful feature in vim for me. You can basically use it as version control lite with automatic commits.

comment 12y ago · link · parent

R (1976)[1] and Matlab (1984)[2] both predate Python (1991)[3], so I guess the answer is because the 'existing' language didn't exist.

As far as Julia goes it aims to bring strong typing and very fast native performance for numerical operations. Neither of which R, Matlab, or Python provide. Seems perfectly reasonable to me.

[1]: http://en.m.wikipedia.org/wiki/S_(programming_language)

[2]: http://en.m.wikipedia.org/wiki/MATLAB

[3]: http://en.m.wikipedia.org/wiki/Python_(programming_language)

12