HNHacker News
TopNewBestAskShowJobs

Ashanmaril

702 karma · joined September 16, 2016

submissionscomments
Ashanmaril··on The ecosystem of the Go programming language
>If the variable already exists in the current scope and the type matches, it will get reused.

That's good to know. I suppose that would probably be the cleanest way of doing it. Thank you!

Ashanmaril··on The ecosystem of the Go programming language
That's smart, I never thought of that. Thanks!
Ashanmaril··on The ecosystem of the Go programming language
I've been using Go for a personal project of mine recently. I had briefly used it at the tail end of my internship while getting my degree, but nothing particularly in-depth, and it was some pretty simple server code that never really challenged me.

There's definitely some nice stuff about it, but there's also some stuff that's a bit of a pain. For one thing, being straight up unable to compile a program if there's an unused variable, not even a debug compiler flag or anything to allow it while testing. There's a lot of cases where I just want to move one thing around, or I'm partway through writing a function and just want to see what state something is in at a point, so I want to throw a breakpoint on a line and run the program up to that point. But even though my code is technically all valid, because the variable I want to look at is unused, or I commented out a line that makes something else unused, I now can't compile at all. So there's a lot of times I'll have to throw in a random fmt.Print of a random property of index zero of an array or something, which might crash anyway if it's reached, but at least it'll compile. It maybe doesn't seem like it would be that big of a deal, but when you've got a train of thought going, and you're trying to iterate fast, it can really pull you out of the flow of things.

There's also a lot of weird situations where I find it hard to keep things clean. For instance, I like using this shorthand:

  if err := doThing(bar); err != nil {
    // handle error  
  }
But if you're doing it in a case where your function returns a result and an error, i.e.

  if foo, err := doThing(bar); err != nil {
    // handle error  
  }
That's indeed valid code, but foo only exists in the scope of that error handling. So you'd have to declare it above with its type

  var foo FooType
  if foo, err := doThing(bar); err != nil {
    // handle error  
  }
But you can't actually do this because when using type inference, both return values have to not be declared beforehand. So you have to pull err out into a declared var with a type, and remove the type inference altogether like this

  var foo FooType
  var err Error
  if foo, err = doThing(bar); err != nil {
    // handle error  
  }
And from that point on, if you're using this pattern again anywhere else below in that function and you want to continue using that slick error handling shorthand, there's barely any point because err already exists in your scope, and you'd just be redeclaring it.

Perhaps there's some tricks I don't know about, but I tend to run into situations like this a lot, and I spend so much time trying to appease weird edge-cases of the compiler's strict rules that is really throws a wrench in my workflow.

Ashanmaril··on Show HN: Sorted CSS Colors – Sort the named CSS colors in a nice way
It's more descriptive, but usually you design UIs for the user, not for the developer writing the CSS
Ashanmaril··on Experience with Apple Silicon M1 MacBook Pro as a Software Developer
Shrink the 1.7em font-size, it's way too big for reading

I think that's honestly a bigger issue than paragraph width

Ashanmaril··on Experience with Apple Silicon M1 MacBook Pro as a Software Developer
Boy, the font size on this blog is... something!
Ashanmaril··on Fuckin' user interface design, I swear
I've never actually had the Cmd+Q issue with my browser because Chrome overrides the system Cmd+Q, popping up a message to hold it if you want to actually close the browser.

I just check with Firefox which he was complaining about, and while it doesn't do this, it at least by default prompts you to confirm you want to close multiple tabs which should hopefully prevent you from quitting out by accident.

Ashanmaril··on Tauri: An Electron alternative written in Rust
Web notifications do exist, they're horrible though
Ashanmaril··on 31.2˝ Color EPaper Display
Forgive me if I'm misremembering details, but I think the way color e-ink displays work is they have the black/white "ink" capsules that are pushed up/down by magnetic charges, just like a regular black/white e-ink display, except for in the colored ones, each "pixel" also has a red or green or blue color filter over it (one of each in a cluster). But that means the pixels per inch drops because now 3 black/white "pixels" have to work together to be one single color "pixel"

I'm not really sure how they measure resolution with this, that could still just be a mistake. But I do know e-ink displays sacrifice resolution for that colour with current technology.

Ashanmaril··on MasterCard to open up network to cryptocurrencies
Everyone who had money before now owes 250% of it.

But people who were in debt are doing great!

Ashanmaril··on Plex Arcade
What gets me is their servers have to be up in order for your Plex server to work, even locally within your own Network (or on the device hosting the server).

It happens occasionally that their servers go down and nobody is able to stream anything. I don't know why their servers are a dependancy in that chain at all, I probably looked it up before but I don't recall it being a good reason.

Ashanmaril··on Google has been testing a replacement for third-party cookies
Can Google tell me who these people are so we can start hanging out? These dudes sound sick
Ashanmaril··on Apple reportedly dropped plan for encrypting backups after FBI complained (2020)
It would be nice to have some indication as to whether or not the other person has backups enabled, but the issue is it wouldn't be a with-certainty indicator that your conversation won't be backed up since the other person could have it disabled but then turn on backups later.

Ideally it would be nice if you could opt yourself out of having any conversations backed up, but I'm sure to Apple the privacy benefits doesn't outweigh the amount of customer support hours that would be wasted explaining to people why some of their conversations aren't transferring to their new iPhone.

Ashanmaril··on Show HN: Nothingly – The gift of nothing
So basically Reddit Gold
Ashanmaril··on Null
I'm pretty sure I subconsciously try to use my software safely and as-intended cause I don't want to crash it. Obviously saying out loud I know this is dumb, but why would I want to break something I created?!

There aren't any bugs as long as I don't look for them!

Ashanmaril··on My personal wishlist for a decentralized social network
The issue is we're already doing too much chasing down individual "bad actors." It's like the #1 hobby these days, everyone is looking for the next person to step out of line so they can drag them into the village square for their stoning. There aren't enough "bad actors" to satiate the mob any more so the definition of "bad actor" has to be continually expanded by the day.

Just the last week a musician tweeted something dumb about making his daughter learn how to use a can opener to open beans, and within a day, the very successful podcast he did the theme song for, where his track was used for the past like 10 years disowned him and stopped using the song. Then he was kicked off the cruise gathering where he was good friends with the guy who ran it and has been a regular headliner for years.

The internet has created a culture problem that I'm not convinced decentralized social networks will fix. At best, if one was created that people actually used, we wouldn't have situations we've seen with Alex Jones and Trump where all the platforms unperson someone on the same day, cause they could still at least keep their audience on the decentralized platform.

Ashanmaril··on Why Isn’t Telegram End-to-End Encrypted by Default (2017)
>It doesn't do e2ee by default.

I read the article and he claims it does? It's just that the default uses their cloud backup where Telegram has access to the private keys.

Ashanmaril··on WhatsApp Beaten by Apple’s New iMessage Privacy Update
But if anyone you're talking to has it enabled, your messages are still gonna be on Apple's servers, right?
Ashanmaril··on Working from Bed
There's an ever-growing cult of people who are so obsessed with the idea that everyone needs to be shopping for a therapist and popping mind-altering drugs, and anyone that suggests that there are basic bad habits you could put some work in to fix like exercising or not laying in bed all day is anti-"science"

The last paragraph basically claims "it's not working from bed that's bad, it's the stigma against working from bed that's bad!"

Ashanmaril··on We rendered a million web pages to find out what makes the web slow
Good to know, thanks. Maybe I'll have to give it a shot. I suppose $2 isn't that big of a risk given what some apps on the Mac App Store cost
Ashanmaril··on Google's new logos are bad
I was just cursing at my phone the other day for this happening!

It's not necessarily anything new for Google though. I remember for years on YouTube there would be a giant square ad to the right of YouTube videos that would pop in after a few seconds and push the recommended videos all down, so you'd frequently go to click a video and suddenly an ad pops under your cursor and you click that instead

Ashanmaril··on Google's new logos are bad
Doesn't surprise me, the less you see of these icons, the better they are
Ashanmaril··on Apple’s A14 Packs 134M Transistors/mm²
"What Andy giveth, Bill taketh away."
Ashanmaril··on How Satya Nadella turned Microsoft around
I don't even bother with Windows search any more

There's a tool called Everything that somehow does a search across all files instantaneously and I haven't touched start since then

Ashanmaril··on Google will discontinue its Trusted Contacts app in December
Unsurprising from the Stadia subreddit.

Reading that subreddit is a guilty pleasure of mine. It reminds me a lot of how the Windows Phone subreddit was while that was still around.

Ashanmaril··on Dr.Mario 64's gzip implementation is taken almost verbatim from gzip source code
It was within the final 10 games released for the N64
Ashanmaril··on Dr.Mario 64's gzip implementation is taken almost verbatim from gzip source code
There's been a bunch of Nintendo source code leaked recently.

It's how they found an old unused Luigi model for Mario 64!

Ashanmaril··on Twitter and Facebook's action over Joe Biden article reignites bias claims
Woke people think they're Galileo but they're really the church

The book burning going on lately is insane

Ashanmaril··on What Working At Stripe Has Been Like
I don't know about "most companies." Maybe most really big tech companies, places that are constantly getting crazy amounts of applications. And if you're living in a heavily populated city.

I live in a place with a fairly small population, and I got offers at 3/3 programming jobs I've applied for since my first in 2017.

Ashanmaril··on Coding for Kids Is Not Just Another Fad
I think a lot of it comes down to whether or not it interests you. Basically every programmer I've ever known naturally got into programming because they screwed around on the computer in their free time and eventually stumbled onto some task they wanted to do that took them down that road. Who knows how many people are in the field now because they wanted to play around with Minecraft mods 10 years ago.

I think if the power of a computer is put at your fingertips and you don't want to dig deeper, or see what else you're capable of creating, that's just how it is. I don't think it's any different from how some people never get into sports. It's fine to introduce kids to it and I'm sure it'll take with some of them, but there's no need to force it any more than you would with any other field.

← PreviousPage 4 of 5Next →