HNHacker News
TopNewBestAskShowJobs

saeranv

1,976 karma · joined March 14, 2012

Senior Machine Learning Engineer with focus on machine and statistical learning-based generative design and energy performance optimization.

blog: saeranv.github.io

work: github.com/saeranv/

contact: saeranv [at] gmail.com

submissionscomments
saeranv··on Effective Spaced Repetition
Slightly off topic, but am I the only one that dislikes the GUI-based method for adding and reviewing anki cards? Anyone find a decent terminal-based plugin for anki? I've actively looked in the past, and surprisingly there are some partial solutions (can review on terminal but can't add), or hacks, but no complete terminal based SRS...
saeranv··on Making Python faster with Rust
I wonder if being able to quickly retrieve a numpy array of the polygon centers would make an equivalent difference. Since then you could at least retrieve the centers from the polygon as an array you could just use numpy operations for the closest polygon operation:

``` centers = get_centers(polgons) # M x 3 array close_idx = np.where( np.linalg.norm(centers - point, axis=1) < max_dist)[0] close_polygons = polygons[close_idx,:] ```

That's one reason I prefer for to use arrays for polygons, rather then abstract it into a Python object. Fundamentally geometries are sequences of points, and with some zero-padding to account for irregular point counts, you can still keep them in a nice, efficient array representation.

saeranv··on Elusive ‘Einstein’ Solves a Longstanding Math Problem
Cool! Is this the same aperiodic tiling problem Fraa Jad solved in (Neal Stephenson's) Anathem?
saeranv··on US teens say they have new proof for 2k-year-old mathematical theorem
Which is good! They're backing that claim by submitting it for peer review. It may seem like they're leapfrogging the process by getting published in the Guardian before getting validation but: a. The Guardian is promoting them, not the students themselves, I believe. b. It's genuinely impressive that high school students worked out a proof, (for something so common like the Pythagoreas theorem!) that wasn't immediately rejected on first sight by professionals. Even if is eventually rejected, getting to this point is worth noting and appreciating.
saeranv··on Use GNU Emacs
I guess I need to experiment with this. I'm fairly conservative when it comes to experimenting with files since I find it always ends up triggering .swp file recoveries, which is not just annoying[1], but has also resulted in me accidently losing work before.

[1] Why can't we just delete the extra file after we recovered the .swp!

saeranv··on Use GNU Emacs
> - Emacs/vim's fantastic buffer/window concept, where open files are not owned by their windows. I miss this whenever I use anything else.

Why is this useful? I basically treat my nvim buffers like windows. What am I missing?

saeranv··on A Spiritual Successor to Emacs
Did you try using leader keys? The issue with key binding in vim is that because it's a modal editor, custom shortcuts with the usual modifier keys (ctrl/shift) may conflict with existing shortcuts. But that's what the leader key is for, it allows you to bind an alternative key as a modifier, and use that for all your shortcuts!
saeranv··on A Spiritual Successor to Emacs
What do you mean when you say "interactivity"? I'm a vim user, so I feel like I'm missing some context about how emacs is used or understood here...
saeranv··on Ask HN: Are we morally obligated to give freedom to AGI?
Of course. Anyone who agrees that the AGI is conscious, and answers no is advocating for slavery.

To answer the question of whether it's conscious or not, I would think of it in terms of John Rawl's veil of ignorance[1]: you can set any test, or heuristic that you want to determine consciousness, with the only condition being that you will also be subjected to the same tests, and suffer the same consequences.

So I'm okay with setting the bar for consciousness really, really low.

1. https://en.wikipedia.org/wiki/Original_position

saeranv··on I want to lose every debate
But what about the person who argues that you should want to win every debate!?!?
saeranv··on The window trick of Las Vegas hotels
Yeah, the post-modernists had some good ideas about offsetting the monolitic, scaleness nature of modernist design, like for example, bringing back ornamentation. Personally, I'm more partial to the dutch structuralists reactions to modernism, which tried to reconcile the same critique without also lapsing into kitsch.

Also, Corbusier's Unite d'Habitation doesn't belong in the article's list of "ugly, distressing" buildings. Corb's built work was actually built explictly and thoughtfully around human proportions. I've walked around (and in) it, and it doesn't feel monolithic, and oppressive at all. Cutting a section across it reveals it's real cleverness - the apartment units are linked in such a way that each unit can have 2 floors, so you get a diversity of environments typical apartment units don't provide.

saeranv··on India invokes emergency laws to ban BBC Modi documentary
There is real opposition to Modi's authoritarianism in India, since as a democracy, states have some relative autonomy. Tamil Nadu's DMK party is really interesting in this regard, and have a history pushing back against Modi's hindi/hindutva nationalism.
saeranv··on Show HN: Cosh – concatenative command-line shell
I'm really intrigued by this, because I like postfix notation and would love to be able to work more with in. Unfortunately, I only somewhat understand the examples!

Question: Does the postfix notation allow you to chain commands together that in bash would have to be nested in brackets, like actual postfix math?

So for example, rather than the infix need of brackets to resolve ambiguity in this expression ((1 + 2) * 3) = 9, postfix just writes it like this: 1 2 + 3 * = 9.

saeranv··on Modern Polars: A comparison of the Polars and Pandas dataframe libraries
Does anyone else find the Polars syntax kind of clunky and ambiguous?

For example, from the link, here's how Polars and Pandas handles manipulating data in a subset of a dataframe:

  f = pl.DataFrame({'a': [1,2,3,4,5], 'b':[10,20,30,40,50]})
  # Polars
  f.with_column(
      pl.when(pl.col("a") <= 3)
      .then(pl.col("b") // 10)
      .otherwise(pl.col("b"))
  )
  # Pandas
  f.loc[f['a'] <= 3, "b"] = f['b'] // 10
Its not clear in the Polars approach that the column "b" is being modified. An additional minor nitpick here is the use of when/then/otherwise for their conditional logic. Aren't these just if/else-if/else conditions? It's seems more in line with mathematical/python convention to use if/else... am I missing something?

The Pandas equivalent, on the other hand, is much more concise, and more explicit. It also seems more mathematical to me. Polars mutates the dataframe, whereas in Pandas a function is applied to a dataframe indexed like a matrix. Pandas also benefits from it's reliance on symbolic notation, it makes everything visually clearer, whereas in Polars, the use of pl.col("b") and other similar methods contribute to multiple nested brackets and redundant naming calls contributing to less interpretability.

I know there's a lot of thought thats been put into Polars, so I assume I'm missing some of the advantages of the Polars approach, and would appreciate anyone who can shed some light on it.

I do understand, and partially agree, with the idea that indexing in Pandas leads to a lot of bugs. But in the example above, Pandas isn't really using indexing, it's using a boolean map to "index" the values from the same dataframe, so should be fairly robust. Is there a reason why Polars is trying to avoid this kind of filtering in the row/column indices?

saeranv··on The Linux Command Line
This is what made me interested in using Linux for the first time!
saeranv··on Ask HN: What was the best software that you used during 2022?
- WSLtty (https://github.com/mintty/wsltty)

Better than the Windows Terminal for WSL. You can work in tmux without getting strange visual artifacts, and allows you to view sixel graphics in console! Fair warning though, I only installed it about two weeks ago, so I can't claim I've battle-tested it though.

ETA: The one thing it doesn't allow me to do is change font programmatically, which would allow me to switch fonts to render non-english characters. I'm very much a beginner in terminals, so if anyone has a solution to this, I would love to hear it.

saeranv··on Ask HN: I prefer single letter variables
The main argument I see for short variable names is that it's easier to read, and interpret (yes, ironically the exact same case the other side makes). In certain contexts (for small functions, math) code is a lot easier to read when using simple, or single variable names. Every now and then I see someone writing out math formulas with long names, and it's so difficult to grok the equation. Just use single variable names so we can grasp the whole thing in a single glance!
saeranv··on Ask HN: I prefer single letter variables
Yeap, me too. Especially when dealing with math/physics. Full named variables for math and physics is incredibly difficult to grok, once you're used to reading it in traditional math form.
saeranv··on Hidden tech of the Nest Thermostat
> I'm looking for something that has a 1 degree (F not C) hysteresis...

Maybe not what you're looking for, but if you're just looking for a 1F degree lag in temperature change, you can also try just increasing the heat stored in your house's thermal mass. For example you could add something with high thermal mass (i.e. concrete) to the place you want higher thermal lag, and position it so it soaks up a lot of solar radiation. That'll buffer out your temperatures.

saeranv··on Jennifer was bullied until someone unexpected stepped in
Just to give another perspective: Bullying was very, very common in my school. I bullied in Grade 2*, and over the years got bullied back. Personally, I don't think your possible causes could have applied to everyone. I just think most small children don't have fully developed empathy, and are uncritical about ethics, and so will cruelly bully someone for very little reason.

This kind of in-group, out-group dynamic seems like a default for humanity. It's pretty easy to lapse into xenophobia - since that's our default. Trying to widen the circle of the "in-group" status is hard, and goes against our instincts.

* ETA: Thinking back on this period, I recall our teacher trying her best to combat the bullying of one girl in particular. She would do things like sit us down as a class and explain to us why it was cruel, with the girl in her lap, and reading stories to us about bullying. None of it worked, I literally remember sitting there, nodding along, and being frankly too dumb to connect this back to my own bullying. In hindsight, the one thing that I think would have worked is if she had publically reprimanded us everytime she had caught us in the act. I think that kind of repeated, instant feedback would finally gotten through to us.

saeranv··on SBF Arrested by Bahamian Authorities
If I recall correctly, the best strategy for repetitive prisoners dilemma *with communication*, is cooperation though.
saeranv··on A crash course in Python “comprehensions” and “generators”
I guess I'm lacking some background to understand this.

So, I recognize fold, from the above operations ('reduce' in python), what makes it a "functional transformation"?

I'm googling function/functional transformations, and the results refer to translating, flipping or scaling a function, like transforming f(x) to f(x + 2) or f(x) + 2. It doesn't seem like it has anything to do with what you guys are referring to, but correct me if I'm wrong.

saeranv··on Debunking common myths about the Autobahn
> There are good points to discuss on this topic, but my opinion is that this "debunking" is full of junk with twisted facts or "opinion" being confused with facts.

You should carefully reread your own post, its actually all opinion being confused for facts! It's very striking, since the original article not only supports its claims with data and cited sources, but specifically refutes the points your making. Did you just read the title and decide to refute it?

saeranv··on A crash course in Python “comprehensions” and “generators”
What's a functional transformation?
saeranv··on What is spacetime made of?
I don't think this criticism is fair. For example, the article in the section quoted below clarifies that string theory hasn't been proven experimentally, and is being investigated mathematically, here:

> But string theory is difficult to understand—it lives in mathematical territory that has taken physicists and mathematicians decades to explore. Much of the theory’s structure is still uncharted, expeditions still planned and maps left to be made. Within this new realm, the main technique for navigation is through mathematical dualities—correspondences between one kind of system and another.

saeranv··on Sridhar Vembu built Zoho by questioning the conventional wisdom
I'm a Tamil speaker (but raised in Canada so, not as fluent as a native speaker), and agree, there's a lot of information loss when going from Tamil to English simply because there's multiple letters that either have no English equivalent, or are aren't distinguished in English.

I would translate மத்தளம்பாறை as MaththalampaaRai, rather than Mathalamparai. The a's have different lengths, so single a's are short (as in "ma"), and double a's are long. Double consonants like "த்த" are pronounced separately, so "Matha-" should be "Maththa". And finally, the "R" at the end is a rolling r, distinguished from the regular r "ர" - a good example of a Tamil letter with no equivalent letter in English!

And, I know this is unrelated, but in terms of syntax, I find Tamil to English translation really suffers from the way Tamil reverse subject object verb order (Tamil is to Reverse Polish Notation (RPA) as English is to regular, clunky, bracket notation), and the option multiple words into a single verb with recursively adding suffixes. Tamil basically offers a lot more degrees of freedom then English, which makes it far more expressive, but also adds a lot of cost to mastering correct grammar. The majority of 1st generation Tamils can only speak a simpler subset of the language. Personally, I find Tamil tends to be less clunky, and have quicker, more pleasing rhythm, then any English equivalent.

saeranv··on At 4.4 miles, Wyoming team sets new rifle shot world record
> “The bullet is coming down so slowly, and at about a 48-degree angle, it was just penetrating into the ground without kicking up dust.”

I have no shooting experience, but the arc they have to put into the shot to travel 4.4 miles (~7 km), seems so counter-intuitive to what I associate with shooting. Really impressive work by this team, to have all this calculated out so that they can hit it within 69 shots.

I'm really curious what the success rate of their shot is. From the video, it sounds like the unsuccessful shots were still relatively close by, enough that they seemed confident in being able to still guide it in, so around 1/100 sounds about right, as a crude prior estimate.

saeranv··on We're not even close to ready for the population growth we're getting
I'll speak about Toronto, since it's the city I know the best. You could easily resolve the housing scarcity by densifying the suburbs, but it's artifically constrained because:

(a) It's legitimately hard to retroactively densify suburban areas, especially the newer suburbs like Markham, where the inefficient use of space combines with the restricted mixed-use zoning, would make re-densified residential areas difficult to support with the sparse commercial/public/transportation resources. I think it's possible, but requires some aggressive changes.

(b) Politicians don't want to risk angering the elderly, NIMBY, home-owning middle-class that compose the voting base.

I think it can be done, but the political incentives are not appealing. Still, we are seeing some hopeful signs from increasingly radicalized youth, cut off from the housing market, being converted into potential political capital by the NDP.

saeranv··on WikiHouse – Open source, modular, wood based, zero carbon housing
Cool, fascinating to get such detailed insights from actual practise.

> ... and the floor treatment rejects both vapor and spills.

That's a good point I didn't consider. Drying out the inner surface works well for interior vapour that gets into the enclosure, but won't handle spills, or standing water well.

saeranv··on WikiHouse – Open source, modular, wood based, zero carbon housing
> Wall-to-wall sheet vinyl floor treatments in all of the rooms where water is a thing.

Doesn't this risk any water that does end up getting in, to accumulate and cause more damage over time since there's no route for it to dry out?

I was always taught in my building science courses to put the water/air/vapour control layer inside the wall, before the insulation, so vapour can dry out from both sides.

← PreviousPage 2 of 17Next →