HNHacker News
TopNewBestAskShowJobs

stefco_

1,309 karma · joined February 22, 2017

Physics Ph.D. Candidate at Columbia University working on Multi-messenger Astrophysics (MMA) with Gravitational Waves (GW) from LIGO/Virgo and neutrinos from IceCube.

https://stc.sh/

submissionscomments
stefco_··on 8chan Is a Normal Part of Mass Shootings Now
> This applies to a very small minority of men. The confident, attractive types with great bodies. An average woman will still get lots of attention on dating website and have a lot of guys to pick from, an average guy won't really get any attention on such websites.

I don't know where you live/what dating pool you have experience with, but here are some contrasting anecdotal observations from NYC:

1) Straight women I know here get way more swipes than straight guys, but lots of straight guys will swipe indiscriminately and immediately unmatch, or will send extremely lazy or off-putting, salacious messages a ton of the time. It's not everyone, but it's common enough to be extremely obnoxious and discourage straight women from swiping right on guys or messaging them. They get more swipes, but more of those are noise.

2) Straight guys will get way fewer matches, and straight women will tend not to message them first/respond very often. This encourages some guys to swipe indiscriminately (see above), though my straight guy friends who are more measured have far more success.

3) Attractive/hip people tend to date each other. The hot guys aren't out there dating less attractive women/taking them out of the dating pool for less conventionally-attractive guys.

4) I've seen awkward, conventionally unattractive straight guys get tons of dates online. It seems a bit harder than if they are conventionally attractive, but none of them seem to have any trouble finding dates.

5) Some of my friends have unrealistic standards for their partners, whom they expect to be more attractive, socially graceful, fashionable, intelligent, and/or wealthy than themselves. These friends either reject everyone they might have a chance with on dating sites or complain about their partners.

6) I've seen plenty of really hot women with homely men and vice versa in couples I know. I can't say I've noticed that women have an easier time than men "dating up" in terms of conventional attractiveness. It seems like conventional attractiveness is just a starting point, but good presentation, social graces, and wealth markers can push overall attractiveness arbitrarily far in either direction.

It probably varies a lot from place to place, but in my slice of NYC, it's not particularly dominated by conventional attractiveness, and overall outcomes seem similar across genders (despite the swiping behavior differences noted at first). Standards of conventional attractiveness also vary widely of course.

stefco_··on 8chan Is a Normal Part of Mass Shootings Now
Yeah. Men are still, to a huge extent, discouraged from sharing and expressing their emotions as much as women (since that behavior is seen as inherently feminine). People still make fun of guys for crying and other healthy ways of expressing distress. The "strong silent type" still seems to be many people's masculine ideal. This is exacerbated on hate-filled sites like 4chan and 8chan, where guys who express feelings nonviolently are regularly mocked as "soyboys" or whatever; putting that sort of rhetoric alongside racist propaganda is, as other people have commented, an effective way to promote racial resentment and, in turn, violent outbursts.

The problem of discouraging men from expressing their emotions nonviolently is definitely not confined to these boards, however. I see tons of characters in media and people in real life who model the idea that anger or violence, while bad, are understandable ways for a man to express feelings (the same sentiment for women is much rarer). It might be bad that a man did something violent, but it doesn't undermine his very identity by eroding his masculinity in the same way that weeping and sobbing and being sensitive might.

I can't count the number of times I saw guys punching walls in movies growing up, often in circumstances where their characters were really feeling sad or hopeless or hurt. Women in movies under the same circumstances would often cry or be consoled. Or to put it another way, in a movie scene with a man and woman under extreme stress in a room together, I've never seen the woman punching holes in her own walls while the man sits on the bed crying. There are tons of other examples of stress reactions that are usually modeled in media along gender lines in this same way.

I think this stuff is self-fulfilling. Guys are discouraged from acknowledging difficult feelings except through stoicism or anger, and in turn people continue to associate that behavior with guys. When men on 8chan start buying into racist ideology and feeling like they can only express their distress through anger and violence, it seems inevitable that things like shootings will follow. The copycat effect with shootings that already happened only encourages it (see how this shooter cited the NZ shooter as inspiration).

I think things are improving, but I think that until guys are trained to express a full spectrum of emotions openly and without shame, and people in general are acclimated to supporting and validating men's feelings, it's going to keep encouraging this sort of snapping behavior.

stefco_··on Amazon allegedly scammed out of $370K by 22-year-old's return shipments of dirt
> a zillion NASA engineers didn't really think it through when lives were on the line

The in-depth investigation following the Challenger disaster [0] actually reached a slightly different conclusion: engineers tended to estimate ~1/100 launches would end in failure, while management estimates were about 3-6 orders of magnitude lower. The engineers did think it through; it was management that failed utterly and completely in their assigned task.

Anyway, I think your point is correct, but in this case it was management who learned that they could keep ignoring engineering expertise and get away with it until it literally blew up in their faces. Anyone who's had their boss urge them to rush bad code out the door (only to get chewed out when it fails as catastrophically as they knew it would) is familiar with this.

[0] https://en.wikipedia.org/wiki/Rogers_Commission_Report

stefco_··on Every Noise at Once
Yeah for sure. I mean I was just trying to make a joke about divergent series and how "Every Noise at Once" is a deeply vague statement. But you're right that in the discrete arena it is literally a finite sum that can cancel perfectly (assuming that every sound has exactly one representable "opposite" sound in your storage format).
stefco_··on Every Noise at Once
I'm not missing arbitrary frequency components; please reread the penultimate paragraph, where I mention them explicitly. As I said there, you can extend my argument about a single frequency to include all multiples of that base frequency, and since you can set the coefficient for each frequency arbitrarily based on your ordering, you can set the fourier coefficients arbitrarily and in so doing recover any waveform you want.

Also, your point about commutativity is more subtle than you think; it fails for an infinite sum because you have an infinite space in which to rearrange things. Sure, the terms cancel eventually, but you can keep sticking the negative terms farther and farther back in a pattern so that by the time they've cancelled earlier positive terms, there's already a bunch of new positive terms to take their place. The subtlety comes from the fact that you can keep doing this forever, and you can do it in a way where the sum eventually converges to a specific value.

But don't take my word for it. This is an extremely well-known and basic result in mathematical analysis (the fancy math term for calculus and related topics). Again, see links above, or go straight to a proof [0]. If you want a deeper understanding, check out Rudin's Principle's of Mathematical Analysis [1], which explains this and other fun math stuff very well.

[edit] Just to be crystal clear, the Riemann series theorem does not apply to partial sums, which is what you are saying; if you do an infinite sum on a conditionally convergent series (like the alternating harmonic sum, a variation on which I used in my example), then your final result can literally be any number you want based on how you order the terms in the series. You can set it up so that the infinite sum keeps getting closer an closer to an arbitrary value. If this sounds nonintuitive, it's because infinite phenomena are subtle and nonintuitive!! This is a very cool example of how weird things get once you start dealing with the infinite.

[0] https://en.wikipedia.org/wiki/Riemann_series_theorem#Proof

[1] https://www.amazon.com/Principles-Mathematical-Analysis-Inte...

stefco_··on iTerm2 3.3
I think I've thanked you before in the HN comments for it, but thank you again!! itermplot is one of those great tools that actually makes things just work in a pinch. I wrote/maintain a low-latency gravitational wave/high-energy neutrino joint source search, and crazy stuff is always happening. Being able to throw together plots and just see them in my terminal right away helps me maintain my sanity ^_^
stefco_··on Every Noise at Once
Well, for starters, it's physically impossible to have an infinite number of speakers playing an infinite number of waveforms simultaneously, so this silly idea does require mathematical abstraction to be meaningful. That shouldn't be too surprising because there are many places in the physical world where we use infinite series to calculate simple finite physical quantities, e.g. when we integrate to find the area of a region.

My point is that if you really sum every possible waveform, the resulting value may or may not converge depending on the order in which you sum them; in fact, it's a well-known property of such conditionally-convergent series that you can actually get any limiting value you want based on how your order them [0]! (let's ignore the fact that the fourier coefficients can take on a continuous set of values). For example, even if you were only allowed to play a single frequency sound wave sin(x) at volumes that are the inverse of some integer value multiplied by a max volume of 1 (in arbitrary units), you may or may not have them cancel depending on how you group the terms in the sum:

  sum = 1*sin(x) + -1*sin(x) + (1/2)*sin(x) + -(1/2)*sin(x) ...
were the ith term in the sequence (starting at i=1) is

  a_i = (2/n-1)*sin(x) for odd x
  a_i = -(2/n)*sin(x) for even x
This is a conditionally-converging series that will hit all positive and negative harmonic coefficients 1/n and -1/n: the even terms cancel each preceding odd term, and the Nth partial sums therefore alternate between 0 and 2 * sin(x)/(N+1), which itself tends towards zero. But you can group these terms in a different order and get a different limit for the sum; in fact, you can group them to get whatever final value you want!

Now, if you extend this thinking to every frequency of sinusoidal wave, you can start summing every pure tone in arbitrary order to get an arbitrary coefficient for each frequency. By picking your limit for each frequency correctly, you can sum your sine waves in a fourier series [1] to get any song you could ever want! And this is while limiting ourselves to discrete frequencies and alternating harmonic coefficients (since it allows us to take a discrete infinite sum).

So the unexplained punchline to my previous comment is that the problem is ill-defined, or rather, that you can view any song as just a specific ordering of an infinite series of other sounds. (You don't have to use sine waves as your basis, by the way; you can use a bunch of different waveforms that look more like "noise" as long as their combination spans the same infinite-dimensional linear space as pure sine waves; you just end up with different coefficients. For example, in quantum mechanics, you can get a sine wave (momentum eigenstate) by summing energy eigenstates (non-sine waves with a specific form) with the correct coefficients.)

[0] https://en.wikipedia.org/wiki/Riemann_series_theorem#Alterna...

[1] http://mathworld.wolfram.com/FourierSeries.html

stefco_··on iTerm2 3.3
iTerm2 is incredible. I recently tried alacritty, though, and was amazed by how much faster it is with screen redraws on my 2014 Macbook Pro. I was shocked the first time I used mouse scrolling in vim through Alacritty and found that it was as snappy as in a native app; it never occurred to me that, even for a small pane, the bottleneck was in the emulator. I had to reimplement some of my favorite shortcuts for tab/pane management in tmux, but overall everything is running lightning fast thanks to alacritty's optimized, GPU-accelerated rendering. Alacritty also uses a dirt-simply YAML file for config (which I prefer to a GUI solution) and is cross-platform (which means I'll be able to install this same setup, with tweaked shortcuts, on my Windows box next time I use it).

The new iTerm features sound really awesome, but the one thing I'm already missing badly is inline image-rendering via escape codes. I had a great workflow set up on for viewing astrophysical data products on a remote analysis server using the itermplot matplotlib backend to render plots directly in my terminal from ipython. I'm still planning on firing up iTerm2 for that use case.

All that said, iTerm2 is the best terminal emulator I've ever used, especially when you're first learning things. I probably wouldn't have been able to switch to tmux as easily if I hadn't already used it a bunch through iTerm2's beautiful tmux integration (I'd already configured some tmux functionality for that use case). The aforementioned image-rendering should be a universal feature for terminals. And though the input and redraw lag are higher than Alacritty or Terminal.app, it's always been fast enough. I still recommend it to people with Macs who are just starting to program.

That said, if you're a speed addict and want something with limited but easily-configurable features, give Alacritty a try!

[edit] I should also mention that, if you're willing to put in more effort, you can implement a ton of iTerm2's visual bonuses (like the status bar and pretty icons) with a combination of a Nerd font [0] (particularly a pretty modern one like Iosevka [1]) and an advanced tmux configuration [2].

[0] https://github.com/ryanoasis/nerd-fonts

[1] https://github.com/ryanoasis/nerd-fonts/tree/master/patched-...

[2] https://github.com/samoshkin/tmux-config

stefco_··on Every Noise at Once
Depends how you take the sum!

https://en.wikipedia.org/wiki/Divergent_series#Absolute_conv...

[edit] See my comment below: my joke is about the fact that, depending on the order in which you sum an infinite sequence of waveforms, you can create a sequence that converges to any sound you want [1] (as long as those waveforms together span the full frequency space). Note also that a sum over a truly continuous space of arbitrary waveforms is even more ill-defined.

[1] https://en.wikipedia.org/wiki/Riemann_series_theorem

stefco_··on Known packings of equal circles in a circle
The PDFs are vector image based.
stefco_··on CSS Houdini Interactive Introduction
I tried those too... after three seconds of waiting and watching the "Downloading..." message with no app loaded, I felt the same dreadful feeling I used to get when I'd see a Java applet. I'm sure there are some use cases that will benefit from this, but I'm bummed thinking about how much crap is going to be needlessly delivered in a clunky way if we return to that HTML-as-bootloader app paradigm.
stefco_··on Some progress on CO2 sequestration technologies
> Pumping CO2 into the ground sounds like it works great on paper, but I think we're fooling ourselves that it won't reenter the atmosphere.

Sequestration alone shouldn't be the solution, but if we can find a thermodynamically feasible way to store CO2 for at least thousands of years while getting away from new CO2 emission, it won't matter that the solution isn't fully permanent. Some proposed solutions are expected to be stable on long enough timescales that the CO2 can (under proper geologic conditions) turn into rock. Other solutions rely on keeping it in oxygen-poor environments where it won't oxidize (which is what happened with carbon that became fossil fuels in the first place; clearly that carbon was not permanently sequestered, since we're burning it now!).

As long as it's thermodynamically feasible to store carbon (read: our net carbon emission goes down and it doesn't cost too much in alternative energy sources), a relatively short (on geological timescales at least) storage solution is more than sufficient (again, as long as it's coupled with critically necessary reductions in new CO2 emission).

[edit] There are, to be clear, many geological formations that are more than stable enough to store volatile materials on longer timescales than are necessary (look at how effectively salt domes trap oil through a combination of buoyancy and impermeability of certain types of rock). The deep, possibly inescapable problem is the thermodynamic difficulty of extracting CO2 from the atmosphere (where its concentration is low, and hence extraction is inefficient) vs. the relative ease of releasing energy from highly-concentrated carbon stores like fossil fuels. It's like trying to unmix your cream from your coffee; it's just much much easier to avoid pouring the cream in in the first place. As others have mentioned, we can rely on the fact that nature already gives us cheap distributed solar farms with built in sequestration abilities (also known as "plants"); non-biological methods don't come with the built in solar energy converter, and so we need to consider the harrowing reality of thermodynamics when trying to make them scalable.

stefco_··on Exploiting pseudo-RNGs in slot machines (2017)
Unless I'm misunderstanding what you're saying, that wouldn't be pseudo-random; cosmic-ray arrival times are random * (in the sense that we don't have a formula for finding their arrival times).

* Unless you can figure out where cosmic rays come from and model their propagation mechanism accurately, in which case you'll solve some long-standing astrophysics questions.

stefco_··on Japan approves first human-animal embryo experiments
The sheer number of animals abused and killed for food [0][1] is 3 orders of magnitude larger than the number for research [2] (at least in USA). Animal research is more abstractly upsetting-sounding than killing animals for food (perhaps because we've been doing it for a briefer part of our species's existence), but the horrid conditions of most livestock raised for food in the US don't seem any better than those of lab animals; at least rats are anesthetized for the more gruesome experiments. There's also no clear reason to eat meat other than pleasure and food tradition, whereas animal medical experiments provide a unique means to massively improve our physical wellbeing.

I think that once we've reduced our meat consumption by 99.9%, then it might make some sense to spend energy coming up with alternatives to animal testing for medicine. For now, it's hard for me to see animal testing as the key bottleneck. If you profiled your code and found that one badly-implemented function was taking up 99.9% of your execution time, why would you ever waste any time optimizing the 0.1% function?

[0] https://www.nass.usda.gov/Publications/Todays_Reports/report...

[1] https://www.nass.usda.gov/Publications/Todays_Reports/report...

[2] https://www.ncbi.nlm.nih.gov/books/NBK218261/

stefco_··on YourLanguageSucks
gp's approach works best when you know that the argument is a list or tuple (something which can be empty). Of course, due to python's lack of typing, you should only use that approach when the function is being used in well-understood contexts.
stefco_··on YourLanguageSucks
This is the idiomatic way to add mutable defaults.
stefco_··on YourLanguageSucks
Python is generally terrible at providing immutable types and workflows. No such thing as a constant, class variables are mutable by default, no built-in immutable dictionary class, etc.

I use a linter to catch this sort of thing and subclass `collections.namedtuple(...)` whenever I need to at least try to abolish mutability. It's one of the worst things about the language.

[edit] You can argue that there would be use cases for mutable defaults, and as with any edge use case you'd be right in asserting its existence. Unfortunately, I can't think of any solution (typing, changing function argument evaluation rules, etc) that wouldn't fundamentally change the language and break just about every sizable python library in existence. This looseness is baked deep into the language as far as I can see.

stefco_··on YourLanguageSucks
Functions in most popular languages behave this way. `get` is just a method; its arguments will never be short-circuited. If you wanted short-circuiting, use the ternary operator:

  my_dict['existing_key'] if 'existing_key' in my_dict else foo()
You could also define a `get_lazy` method that does the above, taking a nullary function as its key and evaluating it if the key is missing. But then you would need to wrap your default values in a lambda, which would look absurd for the common use case of calling `get` with some constant default value. Seems unnecessary when the ternary operator works fine.
stefco_··on Two Years With Emacs as a CEO and now CTO (2018)
I found the main problem was at the interface with other people. I never got org's iOS app working properly and generally missed the multimedia flexibility of Notes (nothing beats scanning PDFs and instantly having them show up in your document, ready to share with others from your phone). It's messy, but in practice it's actually lower friction. I ended up generally dropping org mode and just using LaTeX to-do lists based on a template I wrote.
stefco_··on YouTube was launched as a dating site
Right? Totally nonintuitive! But easy enough to remember and type. I figured I wasn't the only one who found it a bit surprising ^_^
stefco_··on YouTube was launched as a dating site
In vim: :%s/\<div\>/p/g (add C at the end if you want to confirm each change)
stefco_··on Equifax Is Said to Be Near $650M Settlement for Data Breach
I second this! I'm sure there's lots of people on HN who would find this really useful. There's so little corporate accountability that individual legal action might actually prove significant. And as far as applying economic pressure, a ton of small-claims cases could prove more costly than a single class-action suit (and hence provide more deterrence).
stefco_··on Equifax Is Said to Be Near $650M Settlement for Data Breach
IIRC you had to agree not to join class action suits to take advantage. Seems like a pretty self-serving tactic given that we're the ones who have to deal with their idiocy.
stefco_··on History and Effective Use of Vim
This is partly a matter of taste, and since I don't find it distracting at all, there's no downside for me. But as far as value added, I find it super convenient. I like that gitgutter gives a quick indication of what chunks I've been working on and lets me quickly navigate between them (without having to remember to mark them/hit ^O) by hitting ]c or [c (I think these are defaults, but I might have overridden them). I also like that it lets you effortlessly interactively stage changes (in case you have a good hunk you want to commit before trying something more experimental out) as well as previews that show you diffs of specific hunks as well as the ability to selectively undo hunks. It also is a great way to immediately verify that a file is unchanged without hitting ^Z and running `git diff FILE` for the file I was editing. It's also an easy confirmation that I didn't accidentally change or break something accidentally. Obviously I run a `git diff` and tests before a commit, but for me, nothing beats seeing my diffs in the full context of the file to confirm that, yes, those were all things I did on purpose.
stefco_··on History and Effective Use of Vim
I haven't had any problems with gitgutter so far, but I'll give it a look! I think gitgutter can also be configured to only update on save, though I actually like the live updating and have never had issues with it (IIRC I set it to wait a second before updating to keep it from constantly running git commands).
stefco_··on History and Effective Use of Vim
I've taken this approach halfway and only install plugins/config that I can easily do without. Things like git-gutter [0] and a line at the 80th column [1] are great, but I don't depend on them when I log into a remote machine. If I really want some features, I have them somewhat organized in my .vimrc [2]. It's a great compromise; I find that I haven't thought about major editor configuration in a couple of years.

[0] https://github.com/airblade/vim-gitgutter

[1] set colorcolumn=80 textwidth=79

[2] https://github.com/stefco/dotfiles/blob/master/linkfiles/.vi...

[edit] Just want to add that I 100% agree that erring towards vanilla vim is a great idea; I used to use emacs and switched to vim precisely because the starting point fit my use style far better than vanilla emacs.

stefco_··on Alaska’s Engineering Colleges Prepare to Slash Programs, Lay Off Faculty
That's a fair point, but you can also flip it the other way: someone with 5 years left on Earth might be much more interested in improving things for future generations. Thinking about how your impact will live on after your death is an enduring human strategy for dealing with the terror of impending nonexistence. Another way to flip it: someone who's 40 has plenty of time left to live hedonistically without having to face really long-term consequences of their actions.

It's also worth noting that short-vs-long-term planning is just a paradigm for thinking about your politics; in practice, absolutely horrible things can arise from both strategies. Long-term thinking can manifest as clinging to tradition (since you now feel ownership over future generations and want to impose your own world-views on them). It can manifest as early optimization. Both of these things can be good (maintaining culinary/aesthetic culture, infrastructure investment) or bad (maintaining brutal and oppressive traditions, prematurely and hence inefficiently optimizing things at tremendous economic/social cost).

I'm not saying the status quo is anywhere near optimal. I think it's a very interesting (read: hard) and probably culturally-dependent question of what age groups are able to minimize the societal happiness cost function (and of what that cost function even is). It's incredibly difficult to say anything generally meaningful about how you might do this well. The one-person-one-vote system is at least a simple solution that seems acceptable to most, which is an important feature (not that each person's vote counts the same in practice in USA, but that's a whole other problem).

stefco_··on Argdown
...as one of the rendering backends. The syntax is what I assume was being referred to.
stefco_··on Argdown
Like I said, I agree for verbose cases like complex logical arguments, where the contents of each node are longer and should look more paragraph-like. You're also picking an example with tons of formatting in it. If you have a bit less formatting, shorter node labels, and proper indentation, it looks great. From the second library I linked's demo page [0]:

  digraph G {
  
   subgraph cluster_0 {
    style=filled;
    color=lightgrey;
    node [style=filled,color=white];
    a0 -> a1 -> a2 -> a3;
    label = "process #1";
   }
  
   subgraph cluster_1 {
    node [style=filled];
    b0 -> b1 -> b2 -> b3;
    label = "process #2";
    color=blue
   }
   start -> a0;
   start -> b0;
   a1 -> b3;
   b2 -> a3;
   a3 -> a0;
   a3 -> end;
   b3 -> end;
  
   start [shape=Mdiamond];
   end [shape=Msquare];
  }
Or, if you don't care about colors and shapes (which you probably don't on a first pass-through):

  digraph G {
  
   subgraph cluster_0 {
    a0 -> a1 -> a2 -> a3;
    label = "process #1";
   }
  
   subgraph cluster_1 {
    b0 -> b1 -> b2 -> b3;
    label = "process #2";
   }
   start -> a0;
   start -> b0;
   a1 -> b3;
   b2 -> a3;
   a3 -> a0;
   a3 -> end;
   b3 -> end;
  }
It's not the prettiest once you start using the advanced formatting features (some of which are already present in the first example), but it's simple and straightforward enough for manual or scripted graph layout/rendering across a broad range of use cases, and I highly recommend it as a go-to. I use it to autogenerate DAG plots in my multi-messenger astrophysics library documentation [1] and also manually to reason through things, though, again, I agree that Argdown's syntax looks better for the latter verbose use case.

I was just disagreeing with the notion that Argdown is useful in the general case, where I find that graphviz .dot format is already closer to what I would want a general graph-layout markup language to look like (despite being far-from-perfect). It's less optimized for the verbose case, but it starts pretty minimal and can be extended without too much pain in whatever direction is best.

[0] http://viz-js.com

[1] https://multimessenger.science/llama.pipeline.html

stefco_··on Argdown
The dot language used by graphviz is simple enough and portable to web implementations [0][1]. I think this is more useful for its specific domain.

[0] https://github.com/dagrejs/dagre-d3/wiki

[1] https://github.com/mdaines/viz.js

← PreviousPage 3 of 7Next →