HNHacker News
TopNewBestAskShowJobs

bsurmanski

250 karma · joined February 12, 2015

Brandon Surmanski

Computer Engineering Graduate from the University of Ottawa, Canada

Software Engineer at Google

Working on the OWL programming language: https://github.com/bsurmanski/wlc

twitter: bsurmanski

submissionscomments
bsurmanski··on Asus Zenbook Duo 2024
This would be amazing for Nintendo DS emulation
bsurmanski··on Google Fires Employee of over 16 Years with Automated Email
To stretch out the metaphor, asking a knowledgeable coworker could be "read from RAM", then documentation could be "read from disk"; or vice versa. But I find having someone to bounce questions off of easier than reading docs
bsurmanski··on Valve is paying open-source developers to work on Proton, Mesa, and more
Not op, but I bought one. It's essentially a Linux laptop with a control interface built in. For emulators and steam games, it's really nice to have an option to play on the tv (with the dock). I don't see it being an especially nice coding experience; you'd need an external keyboard, mouse, and monitor. And without a dock, all it has is a single USBC port. Though it has a full KDE desktop, so it should be feasible.
bsurmanski··on Ask HN: Is it the “worst” time to buy a house?
It mostly comes down to the fed, and their response to inflation.

If you think their response will reign inflation in check, we'll probably see the market 'crash' and a recession like the late 80s.

If you think their response will be soft, and persistent inflation is the new norm, we'll probably see the market act more like the 70s.

Maybe they walk the line, but I don't see how that's possible. Monetary policy is just so of-the-mark right now.

Another screwball is WFH. That could sap demand for large cities and push demand in suburbs and smaller towns.

bsurmanski··on Passwordle
I think for something this checking the source for the generation algorithm is fair game. here it is:

  function randomInt(n) {
    return Math.floor(Math.random() * n);
  }

  function randomPassword() {
    let letters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
    let digits = '0123456789';
    let punctuation = '!"#$%&\'()\*+,-./:;<=>?@[\\]^_`{|}~';
    let s = letters.repeat(7) + digits.repeat(4) + punctuation.repeat(3);
    let length = 14;
    let res = Array.from({length}, (() => 
      s[randomInt(s.length)])).join('');
    return res;
  }
looks like it's 14 characters long, and each character has an independent 72.8% / 8% / 19.2% chance of being a random letter / digit / punctuation. There are 94 symbols total, so 94^14 possible solutions; roughly 92 bits of entropy. Even if you assume 10 letters, 1 digit, 3 punctuations (the "likely" distribution) it's still 75 bits of entropy. You might be able to gain an advantage through knowledge of the PRNG state, but the PRNG in v8 (xorshift128+) has a period of 2^128 - 1.

So not great odds...

bsurmanski··on How Inuit parents teach kids to control their anger (2019)
The movie title is: "Anger Management", starring Jack Nicholson and Adam Sandler
bsurmanski··on Nikon is slowly discontinuing more Nikkor reflex F-mount lenses
I'd say it depends on what you're shooting. I have a d5600 and Z5.

The Z5 is better for baby pictures.

The d5600 is still better for hiking and travel pictures.

The Z5 is better under low-light and dynamic subject conditions. Particularly because the digital viewfinder is clearer in the dark, the eye/face autofocus and low light autofocus performance is much better (much fewer missed shots), the Z5 has sensor-shift stabilization, and there is no mirror slap affecting lower shutter speeds. For landscapes where there is lots of light, a lightweight and battery conservative d5600 still does the job excellently.

bsurmanski··on Jumping Frenchmen of Maine
There's a song titled "Jumping Frenchmen of Maine" by the instrumental post-rock band "El Ten Eleven". They're my goto coding music
bsurmanski··on In January, there were more real-estate agents than homes for sale in the U.S.
heh, good luck finding a house worth less than 30% of your net worth.
bsurmanski··on California to Require All New Vehicles Be Zero-Emission by 2035
Everyone is hesitant to make change because "it's going to cause too much economic impact". If someone demonstrates that it's possible to change without screwing over their economy, it's likely other states and countries will follow.

Just because the USA has federal administration that doesn't want to act on climate change right now doesn't mean that it won't get a greener administration in the future.

As for being a lost cause, isn't it preferable to minimize the effect, at least? would you rather the sea levels go up by 2.0 meters or 1.5 meters?

bsurmanski··on The University Is Like a CD in the Streaming Age
For me, the biggest benefit of the university structure was 1) teaching me things I didn't even know existed and 2) teaching me things I didn't think we're important (but turned out to be).

(1) might be solvable with an online curriculum, but (2) requires an evaluation or end-game credential to force me to do it.

Other than that, as you mentioned an even bigger benefit was social, the shared experiences with others, and the cross pollination of ideas from these other people

bsurmanski··on Quadratic Voting
This is the voting mechanism used in the game "Civilization VI" (Gathering Storm expansion), if you are interested in checking it out
bsurmanski··on Yelp lays off 1000, furloughs 1100
my guess is that people that are well off (rich) still have their income stream. A lot of tech workers, CEOs, etc are working from home. It's poor (or middle class) people (working in retail, tourism, food) that are disproportionately affected by this. In 2008, it hit rich people first, then "trickled down". So, the rich are seeing this as an opportunity to offload some extra cash onto the discounted markets.
bsurmanski··on Spot the Drowning Child (2015)
I just looked it up and turns out that's my favourite stroke! I didn't know it had a name, I just called it the "Jellyfish" :)

I don't think I was ever taught it. I think I just discovered it playing around in the water one day.

bsurmanski··on What Is Bitcoin: Internet’s Native Money or Asset for Speculation?
The main reason its only for illegal activities right now is because (for almost every case) it provides no advantage over using a credit card.

The biggest problem is the user now owns liability. With a credit card, if someone steals your card you can call up the provider and get the charges reversed. Without a centralized authority, if something goes wrong with your bitcoin account your out of luck.

Other than that, its somewhat inconvenient to get your hands on it. BTC exchanges feel a little shady. And it's not as private as you'd think. All of your transactions are public.

On the plus side, you don't need a credit card provider to bless your business, so sketchy or illegal businesses are free to transact online now. And lastly, it's decoupled from any one government. But that's not a benefit unless you live in a volatile region.

bsurmanski··on Ask HN: I think I’ve burnt out. What should I do?
A lot of people mention therapy. If you need specific recommendations, I am close friends with a therapist in Toronto that is starting up her own practice:

personal page (WIP): https://meganpsychotherapy.com/

Association page: http://thecalmcollective.ca/megan-lawrence-therapist/

I haven't visited her in a professional context, but I've known her for over 10 years and I have confidence in her abilities. She's very approachable and easy to talk to.

bsurmanski··on Financial Instability in China: Possible Pathways and Their Likelihood [pdf]
this is from 2017, should likely be noted in the title.
bsurmanski··on Why build this blog, or anything, on IPFS?
> From a certain perspective, the internet and the web as we know them (including fundamental technologies such as DNS, TCP/IP, HTTP, SMTP, and even Javascript) are flawed in fundamental ways. Leaving the technicalities aside, how do these flaws manifest? It is hard to stop bad actors from doing bad things: sending too many emails, stealing sensitive data, flooding websites with traffic, spreading false facts and bifurcating the shared reality that allowed for a democratic global order.

I would argue that this is even more of a problem with decentralized services because there is no one to define (or police for) spam or bad content.

bsurmanski··on A fitness watch that measures blood pressure
No, by cycles they mean charge cycles. 2-3 times a week is 166-250 weeks. About 3-5 years of active use.
bsurmanski··on The Strange Saga of Kowloon Walled City
my understanding was that it was in administrative limbo. Britain owned Hong Kong, and China claimed authority over just to spite them. So Britain left it alone. But China didn't care enough to actually administer it. And besides, it was disconnected from the mainland and only i tiny insignificant plot of land. So why bother setting up all the infrastructure just for a tiny slum?
bsurmanski··on A Primer on Shooting in Manual Mode: Aperture, Shutter Speed, and ISO [video]
Dumb question: with the first example (twilight), wouldn't raising the exposure in post be functionally equivalent and have the same amount of noise? You are taking the same signal and boosting it to a desired gain, whether in camera or in post. right?
bsurmanski··on Google Stadia requires $130 upfront, $10 per month at November launch
I think that's the implication.

Earlier they had demos of YouTube integration, so i imagine they would have demo's or some way to play before buying (?)

bsurmanski··on Google Stadia requires $130 upfront, $10 per month at November launch
This headline is misleading.

The $130 is for the "Founders Edition", which is an early access with additional hardware (controller + 4k chromecast).

The $10 a month is for 4k access (instead of the default 1080p) and free games (ala Xbox live gold).

You may use an existing controller (or keyboard/mouse) connected to a PC if you want.

Without the subscription, games access is by-purchase (like steam).

bsurmanski··on “I just started writing some Rust”
For anyone else looking into Rust, I've been experimenting in it for the past month. Heres my thoughts:

It advertises itself as a systems level language for the new age, but to me it feels like a functional language in disguise. The borrow checker enforces an unchained functional style (You may have 1 unique mutable reference or may have many immutable references). This sounds bad if you're used to pointer slinging, but once you get used to the peculiarities I find it forces me to write better quality code.

The package management is the most refreshing feature. It's a pain to rewrite my personal libraries in each language I use, but I found that most of the things I needed were already available at higher quality than I would have done. (And using them is a single config line).

For a 'low level language' they make it pretty hard to do some 'low level' things. Example's I've found include:

* writing a doubley linked-list. Consensus is "don't use linked-lists. The stdlib has better tools

* Reading a file into a struct. They make it surprisingly difficult to say "hey, read these 10 bytes, its this struct". Consensus is to use more structured file formats like json or protobufs. There's libraries for reading those things.

Error handling is similar in style to Go, but it get rid of a lot of the boilerplate. The '?' operator effectively acts as if err return err.

The macro system is really nice. I don't write many macros, but it does mean I can use other people's powerful macros. My favorite are 'include_bytes!', 'lazy_static!' and 'dbg!'. The new procedural macros are pretty wacky, essentially allowing you to parse or rewrite the AST. A powerful example I've seen is static checks; This [0] example writes a compile time check to assert that structs do not contain a member named 'bees'.

Overall it's been a fun language to mess around with.

[0] - https://tinkering.xyz/introduction-to-proc-macros/

bsurmanski··on Spruce beer continues to have a following
I've had spruce beer on a few occasions and it's exactly what it sounds like.

Bubbly liquid spruce. If you peel a few needles off of a Christmas tree and chew on them, you'd get the same flavour.

bsurmanski··on Facebook Says Hackers Stole Detailed Personal Data from 14M People
one idea:

attacker accesses recovery answers for site A. Sees that it is random characters. Attacker has access to site A.

Attacker phones sites B,C,D and E, trys social engineering. Attacker now has access to site B,C,D,E also.

bsurmanski··on Anatomy of a Killing
I imagine it depends on the resolution. Taking it to the extremes you can imagine the horizon matched by 2 points a straight line slope. That may match many ridgelines. To the other extreme you can imagine a resolution down to the millimeter of the ridge. Catching every stone and tree. I can't imagine many duplicate ridgelines there.
bsurmanski··on Show HN: Owl, a new kind of parser generator
I already made a language called OWL ;)

https://github.com/bsurmanski/wlc

bsurmanski··on Report of Active Shooter at YouTube HQ
21,190 suicides of 33,636 is 63%. And there is still a definite victim. Not to mention any affected loved ones they left behind.
bsurmanski··on Report of Active Shooter at YouTube HQ
10,265 people died a year in alcohol-impaired driving crashes (2015) [0]

33,636 persons died a year from firearm injuries, ~11200 homicides, ~21190 suicides (2013) [1]

Given these numbers from the CDC, it seems like your statement is incorrect and firearms are a serious issue. Care to address this?

[0] - https://www.cdc.gov/motorvehiclesafety/impaired_driving/impa...

[1] - https://www.cdc.gov/nchs/data/nvsr/nvsr64/nvsr64_02.pdf

Page 1 of 3Next →