Better HN
topnewbestaskshowjobs
Log inSign up

anreekoh

63 karma · joined Sep 15, 2018 (8y ago) · 20 submissions

Submissions

comment 6y ago · link · parent

Check out Kakoune[1] for a different take on an editor’s scripting language. It offloads as much as possible to existing Unix tools such as bash, sort, fmt, etc. It uses a clever system of string substitutions that’s a bit unintuitive at first, but not too difficult to grasp quickly. I spent two weeks trying to fix a bug in a Vim plugin that ended up being a 3 line change. After that I felt like I barely understood just a small section of vimscript.

I ended up switching to Kakoune after trying it for a bit because I realized that in the two weeks of me exploring it I had entirely understood it’s “scripting language”, or at the very least understood how to use the onboard docs to write any plugin I wanted to.

[1]: https://github.com/mawww/kakoune

comment 6y ago · link · parent

Seeing how that kid went about that problem, seeing how interested he seems, makes me want to teach. It's impressive how natural the discussion was with the kid, the two were on exactly the same page throughout the entire discussion. This video doesn't really show that all kids can get this interested in math, but it does show that for the right kids, of which I suspect there are a substantial number, we can be teaching concepts much much earlier.

comment 6y ago · link · parent

Disclaimer: I’ve started reading the Lean guide for the past month or two.

For me the most magical texts I have ever read were TAPL by Pierce, or the Lean Theorem Prover (tutorial/guide?) [1].

Just from a software standpoint, Lean seems like one of the most magical things ever built. For something that is built by mathematically-oriented programmers for pure mathematicians, it is /extremely/ well designed. So much thought has seemed to go into the user experience; it’s rest a joy to use.

Every chapter in that guide, has blown my mind more than the previous. It is super accessible as well to anyone with the math background found in any undergrad CS program.

[1]: https://leanprover.github.io/theorem_proving_in_lean/introdu...

comment 6y ago · link · parent

Deepcell[1] is a framework I worked on for a bit during my undergrad. It can do cell segmentation & tracking for different imaging types.

[1]: https://github.com/vanvalenlab/deepcell-tf/blob/master/READM...

comment 7y ago · link · parent

If you want git on the command-line, but don’t want to remember commands, try lazygit[0], it’s changed what I’m comfortable doing with git because it can tell me at any given moment what I can do.

[0]: https://github.com/jesseduffield/lazygit

comment 7y ago · link · parent

OP here, this is just a tool I wanted because I often find myself wanting to send a small equation or two to friends, and couldn't find anything online that could do that. Everything is wrapped in a \begin{align} ... \end{align} (even though I haven't really made that clear...)

7.

QuickTeX – Quickly Render a LaTeX Equation(ezb.io ↗)

1 points · by anreekoh · 7y ago · 1 comment

comment 7y ago · link · parent

IMO when anything is rewritten (usually in a modern language), it's faster than the original implementation. That's usually because you have much better hindsight since the entire implementation is finished before the rewrite is started.

I'm sure the more modern languages also help though, but I don't think that using a modern language is the major reason for the speedup.

comment 7y ago · link · parent

This looks really cool! Is it a coincidence that this has the same name as the Aphex Twin song?

comment 7y ago · link · parent

Sorry, I meant that the chemical makeup of beef is distinct from that of plants. I wasn't referring to additives. I meant the proteins/enzymes, etc.

comment 7y ago · link · parent

1. Surely there are other chemical compounds that are present in the fast food meats and not the plant based meats, and vice versa, but that aren’t listed in the article’s table.

2. The plant-based meats are intended to imitate real meat as much as possible, and I would imagine an intuitive way to do this is to include the same amount of ingredients as on the table presented.

3. “Healthiness” is probably unfortunately best measured through a large and well intentioned study, and not objectively by comparing a limited list of ingredients.

comment 7y ago · link · parent

I have no background in quantum anything at all, just cs & some undergrad math, and I found this article and the one preceding it extremely accessible.

comment 7y ago · link · parent

I still sometimes have the A<esc> anti-pattern. It's slowly been disappearing since I added gl. The kakoune keybindings were designed with a lot of thought behind them. They seem extremely natural.

Also, I meant to say that the my replacements for 0, $, gg, and G are gh, gl, gk, gj. 'g' for 'go' and 'hjkl' for the standard up, down, left, or right.

comment 7y ago · link · parent

Using kakoune for the first time made me understand how much better the vim keybindings could be. I switched the weird begin & end of line navigations (0 and $) to (gl and gr) as they are in Kakoune, and I also added the move view (v* in kakoune) commands to vim.

Also my goodness having built-in multiple cursors is fantastic. Kakoune multiple cursors is much much better than the vim plugins for multiple cursors.

As other people have said though, there are some plugins that have yet to be ported to kakoune. iirc smooth scrolling (comfortable-motion) and vim-wiki to name the ones that come to my mind.

15.

Compiler from type annotated Python to C extensions(github.com ↗)

4 points · by anreekoh · 8y ago · discuss

16.

Show HN: The Journey of a Wannabe High School Mathematician(ezb.io ↗)

4 points · by anreekoh · 8y ago · discuss

17.

Show HN: The Journey of a Wannabe High School Mathematician(ezb.io ↗)

1 points · by anreekoh · 8y ago · discuss

comment 8y ago · link · parent

Finally. Man I’ve had this feature on my jailbroken devices for over 4 years. And every update I would hope they would add this. Clicking around with the cursor was always so stupid because almost all quick cursor changes would be ~10 characters back, aka not a huge amount of movement.

Some keyboards have this feature like Nintype (which is over engineered imo), but I’ve always wanted this natively. Glad to see it coming.

comment 8y ago · link · parent

The benefits of xonsh are more than just the quick math, but I'm glad fish is getting something like this. I've had a Python script that does math for me, something like this [0]

I do think something like a Python shell is the best solution (for me), however, simply because of the ease of use with modifying the current state of the shell (environment variables, etc).

[0] https://gist.github.com/wackywendell/919042f19ab6932447df

comment 8y ago · link · parent

Ugh. I have so many conflicting opinions on this question.

So, Xonsh is superior in the manipulation of shell objects. I felt super at home changing the shell prompt and configuring/extending the default Xonsh functionality. This is all because it's literally a superset of Python.

Fish however, blows Xonsh out of the water when it comes to autocomplete and navigation. Xonsh's autocomplete / suggestions are very very weak in comparison to fish's. You feel bogged down when trying to navigate directories quickly with Xonsh. I wrote a small blog post about it here [0]

There was a piece of software I was trying to write that was meant to be Xonsh but with Fish's autocomplete [1], but really didn't succeed and have slightly abandoned it for the time being. But maybe I'll pick it back up soon.

[0] https://ezb.io/thoughts/programming/mollusk/mollusk_1.html

[1] https://github.com/enricozb/mollusk