HNHacker News
TopNewBestAskShowJobs

marcianx

230 karma · joined April 6, 2013

submissionscomments
marcianx··on Color for the color-challenged
Alternatively, leave the FFs and increase the other channels to 80 and above to desaturate for a nice pastel look.
marcianx··on Fastest branchless binary search
I'm pretty sure it's not undefined behavior in rust in release mode if it does overflow. It's fully specified behavior, I believe.
marcianx··on Turning my hobby into a business made me hate it
I don't take it that way, and I'm deeply fortunate to be living the life suggested by GP. If I get to do what I'm passionate about even if it includes the closely-related grungy part to make it successful (not an altogether different job like marketing) and I am paid enough money to not have to worry about my daily needs and retirement savings, then I have a chance to spend a solid part of my productive day on it, engaging deeply, and building a deeper intuition, all the while not having the personal worries of stability at the back of my mind. My passion no longer needs to compete with my work for my mental energy. And I get to work with talented people who complement my skill, doing the part they enjoy and I don't, to make what we collectively build successful.

That being said, I'm a software engineer, and that's a really fortunate occupation to be passionate above due to the breadth of its applicability (e.g. allowing one to work more closely on my topic of interest) and salary potential.

marcianx··on Language models still struggle with the concept of negation
Actually, no species of bats lay eggs - they are mammals, and not the egg-laying kind (platypus or echidna).
marcianx··on iPhones and action discoverability
Haha, yes! I'm a software engineer and it took me a decade of smartphone usage before I realized that long-pressing various keys (e.g. vowels, symbols) shows a pop-up allowing you to enter related characters (e.g. á, æ, ¡, ₹, ±, ·, ½, ²)†. Blew my tiny little mind! If I were using a language that required the variants menu in its native keyboard layout, I might have discovered this a decade before by explicitly searching for how to enter certain characters.

† Typed these on mobile, of course. Android, in case you're wondering.

marcianx··on Ask HN: Higher order derivatives in everyday life?
0th derivative = position

1st derivative = velocity

2nd derivative = acceleration

3rd derivative = jerk

4th derivative = snap

5th derivative = crackle

6th derivative = pop

I just learned the last 3 due to this discussion and Wikipedia[1][2].

[1]: https://en.wikipedia.org/wiki/Fourth,_fifth,_and_sixth_deriv...

[2]: https://en.wikipedia.org/wiki/Snap,_Crackle_and_Pop

marcianx··on Crimes against transhumanity
Is that last point not obviated by not building AIs that "suffer"? Shouldn't that be the responsibility of its creator to not create "suffering", whatever that is?
marcianx··on Happy 10th Birthday Compiler Explorer
I wonder whether he was demonstrating this: https://youtu.be/w0sz5WbS5AM?t=1168
marcianx··on FTC sues Intuit for its deceptive TurboTax “free” filing campaign
You don't need another license. You just need to either (1) not require a CLA, or (2) if you do, write the CLA so that it prevents you from doing that with others' contributions.
marcianx··on Hardy, Ramanujan and Taxi No. 1729
Indeed, that's exactly why there's no uninteresting number!

https://en.wikipedia.org/wiki/Interesting_number_paradox

marcianx··on How bad is my gas stove?
I've seen a bunch in NYC, especially in older apartment studios.
marcianx··on Maxima (Software)
Transforming a linear matrix equation to Reduced Row Echelon Form (rref) [1] allows solving it very easily or writing a minimal set of variables in terms of others if you don't have enough independent equations or discovering that the set of equations is contradictory. You naturally arrive at this form if you were to do manual Gaussian Elimination, but linear algebra libraries have additional efficient ways to arrive at this depending on the structure of the matrix. So it's common to just ask the algebra system to get it there and then use the matrix either programmatically or by hand depending on what you're trying to do.

[1]: See https://en.wikipedia.org/wiki/Row_echelon_form

marcianx··on Reasons to switch from Windows to Linux
Linux desktop already came for me personally a long while back. I've been single-booting Linux and gaming for an incredibly long time.

CodeWeavers[1] has done amazingly for the Linux gaming scene via

- Steam's Proton (Steam pays CodeWeavers for development, and I happily throw my money at Valve for that) and

- their own CrossOver product which I use for non-Stream games. (I paid for their lifetime subscription[2] because I wanted to support them so much.)

Stream's Proton works well for many games that don't officially support it (one can check others' reports in protodb). Examples of games I've played recently that don't officially support Proton include Iron Danger and Horizon Zero Dawn. The latter runs surprisingly smoothly given what I'd heard about its PC performance issues from when it first came out. Granted, I'm playing both of these 1 year after their PC release, but I've already got a long Steam backlog of games to play, so that's not bothered me.

For reference, I run PopOS on a System76 Thelio with an 8-core AMD processor and Radeon RX 580.

[1]: https://www.codeweavers.com/

[2]: https://www.codeweavers.com/store

marcianx··on Humans are more dependent on water than many other mammals
Thanks for linking. Per the Wikipedia article, the drug was also to blame due to it suppressing her ability to urinate. It also quotes:

"If Leah had taken the drug alone, she might well have survived. If she had drunk the amount of water alone, she would have survived."

marcianx··on Amtrak's 2035 map has people talking about the future of U.S. train travel
NYC to Montreal (~370mi) takes ~8 hours by bus and 11 hours by train, though granted, times at Customs is more variable for the bus than for the train. I'm often surprised at how much the train shakes side to side on the occasions it's going "fast".

Contrast that to the TGV in France, which zooms around at 200mph and covered one of my trips between Paris and Avignon (~430mi) in ~2.75hrs about a decade ago. US train infrastructure feels extremely behind in comparison. Perhaps it's because of a greater emphasis on highway travel.

marcianx··on “Hello, World” in zero lines of code
Oh, in that case, I have an even shorter "program":

  Hello world
Run it with `cat`. ;)
marcianx··on Sum-of-Three-Cubes Problem Solved for ‘Stubborn’ Number 33 (2019)
The article touches on this with:

> k = x³ + y³ + z³ is what number theorists call a Diophantine equation — a kind of algebraic structure whose properties have fascinated mathematicians for millennia. “They’re rich enough to encode [other mathematical] statements that have nothing to do with Diophantine equations,” said Browning. “They’re rich enough to simulate computers.”

More specifically, equations of such form come up in a proof of Godel's first incompleteness theorem. That being said, yeah, this effort is mostly a mathematical curiosity, mapping out the domain of knowledge of mathematics increasingly more completely. Sometimes an application comes about where either the solution or novel techniques used to arrive to the solution can become useful, but pure math research isn't typically driven by any existing applications as much as a "because it's there" attitude.

marcianx··on All the jobs I failed to get
If you can't do the curriculum standard, how will you build the non-standard? CS is very much an on-the-shoulder-of-giants field.
marcianx··on Laws of UX
Some (hopefully) constructive feedback based on my experience on this site:

- At first, the site looked like a slideshow with prominent prev/next at the top and a title content that takes the entirely of my desktop monitor. So, naturally, I hit the keyboard right arrow (like most slideshow web pages) to get to the next slide for content, and nothing happened.

- Then at the bottom left, there's a down button. So I scrolled down to find the content there. I read it, and still subconsciously hit keyboard right for the next slide...oops, I mean, page...because of the prev/next at the top (sure, pebkac and all that; but it's also expectations-setting).

- Then I clicked on "next" to get another page that again takes the full monitor for the title, requiring scrolling down to get to the content, all of which can easily fit on a single screen. It seems unnecessarily "distracting", in a sense, since the expectation is that the user would actually go through the content and not just the titles which themselves are not very informative.

- One way I tried to improve ergonomics was to hitting page-down to read the content and then tab a couple times to get to the next button (almost automatic). However...the focus indicator for the "next button" has been removed in CSS, which is another usability nono.

Of at least tangential relevance here are Doherty Threshold (slide 2) and Jakob's law (slide 5). Just my 2c.

marcianx··on An update on our security incident
Employees can revoke access for any of their keys/dongles once they realize they are missing. The company can also send an automated warning and auto-expire a key that's not been used for a while.
marcianx··on On eve of bankruptcy, US firms shower executives with bonuses
How can you? One is taking about 80% of the work and the other is talking about half the work. You would need a distribution of the work impact across the employee population first.
marcianx··on Generics and Compile-Time in Rust
> first, modern CPUs have invested a lot of silicon into branch prediction, so if a function pointer has been called recently it will likely be predicted correctly the next time and called quickly

Huh, TIL. Branch prediction is normally about predicting which branch an `if` would take. But apparently this applies to indirect jumps as well: https://stackoverflow.com/a/26240197/1082652

marcianx··on Microsoft's Linux Kernel
FWIW, I have given major conference talks years back on my linux laptop with PowerPoint running via Crossover Office (wine), mostly due to my advisor's insistence on using PowerPoint. So that has already been a thing for a long while.
marcianx··on Rust – Compile Time Memory Safety
Yes, it's completely safe and its rust equivalent is

    let x = vec![1, 2, 3];
    process(std::mem::replace(&mut x, Vec::new()));
    x.push(4);
https://doc.rust-lang.org/std/mem/fn.replace.html
marcianx··on Modern C++ Won't Save Us
Yes, a borrowed string slice `&str`, whose lifetime is tracked precisely by the compiler to avoid use-after-free errors. https://doc.rust-lang.org/book/ch04-03-slices.html#string-sl...
marcianx··on Python overtakes JavaScript as most questioned language on StackOverflow
I don't think mutability is a concern if your goal is to get a bidi map between strings and (mutable) _instances_; i.e. if you just want to use the reference to the dict itself as the hash rather than the contents of the dict itself.
marcianx··on Build your own old-school 3D shooter in a weekend
I'm far more inclined toward

  img.assign(w*h, color);
myself.
marcianx··on Rust Ownership Explained with Python
Rust does have these abstractions. The corresponding rust traits are `IntoIterator<Item=T>` and `Iterator<Item=T>`. For example:

  - Vec<T> implements IntoIterator<Item=T>
  - &Vec<T> implements IntoIterator<Item=&T>
  - &mut Vec<T> implements IntoIterator<Item=&mut T>
and consequently,

  - vec.into_iter() implements Iterator<Item=T>
  - (&vec).into_iter() (or vec.iter()) implements Iterator<Item=&T>
  - (&mut vec).into_iter() (or vec.iter_mut()) implements Iterator<Item=&mut T>
← PreviousPage 2 of 2