HNHacker News
TopNewBestAskShowJobs

strkek

122 karma · joined February 9, 2018

submissionscomments
strkek··on Python Idioms in Rust
There's also strings.

    'foo ' + bar
    'foo {}'.format(bar)
    'foo %s' % bar
    f'foo {bar}'
strkek··on Sl: a mirror version of ls
> grpe

Every. Single. Time. Sometimes I even typo it many times in a row.

There must be //something// in that combination of letters, because I don't recall ever having that many mistakes with any other commands.

strkek··on The Evolutionary Argument Against Reality (2016)
> how do I know the color “blue” that I see is the same one my friend sees?

This. Also "how do I know the words I hear sound the same to you?".

Mindblowing stuff.

strkek··on A Proposal for Package Versioning in Go
I don't feel like Git is "the one true way" to DVCS though. For example using SHA1 as hashing algorithm doesn't seem like a good idea. Or calculating "packfiles" ad-hoc on clone operations, that's wasteful and makes cloning big repos on unstable connections a PITA.

But it's certainly true that Git is the "current best practice" in the DVCS landscape.

strkek··on A Proposal for Package Versioning in Go
Well, you'll always have to trust some point on being immutable.

A git repository can mutate, but so can a central registry or a proxy. Once a version is cached in a registry or a proxy, nothing stops people with enough privileges from modifying that cached version.

So really the only thing that changes is just who you trust.

strkek··on A Proposal for Package Versioning in Go
To me, the one thing I'd like to change about Cargo is that required initial clone of a 100MB+ git repository before you can even install something.

IIRC this was because a libgit2 issue preventing them from doing a shallow clone though, so there's no way around it for now.

Disclaimer: I use both Go and Rust on a daily basis and think both are nice in their own way.

strkek··on Blocklist Facebook domains
You might want to take a look at dnsmasq. It's a nice choice for when you want a DNS server but BIND is overkill.
strkek··on How to avoid humiliating newcomers: A guide for advanced developers

    [09:00] <Someone> Hi.
    [09:16] <Me> Hey, what's up.
    [09:23] <Someone> I have a problem, do you have some time?
    [09:24] <Me> Sure, what's it about?
    [09:27] <Someone> Have you worked with X thing before? I have to do Y thing but don't know how.
    [09:28] <Me> So, I just googled "how to do Y thing in X thing" and got this blog entry explaining in detail, and also this other Stack Overflow answer with a very similar problem.
    [09:29] <Someone> Sec, gonna try that.
    [09:35] <Someone> I got this error "someVariable is not defined". What's it mean?
sigh

    [09:36] <Me> You're trying to use a variable that doesn't exist. Can you paste the code you're using?
    [09:37] <Someone> (Code)
    [09:37] <Me> Replace "someVariable" for "someOtherVariable" and it should work.
    [09:38] <Someone> It works, thanks!
I really, really try to be nice, but there's a limit on how many situations like this I can handle before losing my sanity.
strkek··on Why Is SQLite Coded in C? (2017)
I don't like the many-compilers-in-one approach for the same reason I wouldn't like an `ls` program with bundled support for LDAP, SSH, Git, SVN and CVS, for example.

Sure, some way or another all those can fall under the category "list directory contents", but I'd rather use separate programs for every one of those.

Programs that I will install if and when I need them.

strkek··on Why Is SQLite Coded in C? (2017)
Yup, but I'd like to remove the Objective-C{,++} support I'm almost definitely not gonna use in the foreseeable future, for example.

Take it as my obsession for minimalism.

strkek··on Why Is SQLite Coded in C? (2017)
What I mean is more like they're not "C compilers", but "C/C++/Objective-C/Java/Rust/Perl/Bash/Fortran compilers".
strkek··on Why Is SQLite Coded in C? (2017)
My problem with C isn't even the language; it's the ecosystem around it. Glibc, auto{conf,tools,*}, CMake, etc.

Writing Makefiles by hand works for small projects, but for bigger ones you're forced to choose the lesser of all evils. And if you're on linux you'll still have to deal with glibc most of the time.

And of course you can only choose between compilers that do too much (as in, not "C compilers" but "compilers that happen to support C as well"), compilers that don't even aim for standards compliance, or proprietary compilers.

strkek··on Mozilla working on in-page popup blocker for Firefox
You can golf away 8 characters by replacing

    [].foreach.call(a, b) -> a.forEach(b)
... since the value returned by `querySelectorAll` has a `forEach` method. And 5 more if you replace:

    'body *' -> '*'
strkek··on Concurrency I can finally understand and write correctly
> Funny how important syntax is. So easy to look at code in another style/language and go THATS NOT RIGHT!!

I'm waaay too picky in this aspect. I once was reading about Ada (before my bias towards C-like languages kicked in). It looked interesting and all, and I was like "Hmm, not bad, learning this might be interesti--"

> Put_Line

Nope.

The irony here is, my current language of choice is Go, and tests must be named like `TestType_Method` and I'm like "arrrgggghhh".

EDIT: Btw I don't really mind indentation styles, brace placement, "dot placement" (like your example) and those things, as long as they're consistent across the codebase.

strkek··on Concurrency I can finally understand and write correctly
It's not "wrong"; it just doesn't appeal me.

- `elsif`

- `end`

- `unless`

- `a unless b`

- `f 1` vs `f(1)`

- Implicit method calls (`f` vs `self.f`). I know both have different behavior, I just don't like this "implicit self".

... etc.

I find Python okay-ish though, as paradoxical and nonsensical as that might sound. But in my toolchain Python has been reduced to little more than a calculator, since it's been replaced by Go for most of my automation needs.

Btw, friendly reminder that this is my subjective opinion regarding my own tastes, not absolute truth on aesthetics.

EDIT: Formatting.

strkek··on Concurrency I can finally understand and write correctly
Haha yeah, I've become too used to C-like syntax (C, Go, Rust, etc).

I wouldn't mind a Lisp syntax too, but Ruby and ML are definitely a "no" from me. I just can't bring myself to like them. Their syntax feels too "loose", not sure if that makes sense.

Btw, I know there are some Lisp-like implementations out there, but same criteria applies: still not mainstream enough as of now.

strkek··on Concurrency I can finally understand and write correctly
The _only_ downside I find of Elixir is that it looks too Ruby-ish to my taste. I'm still waiting for the day a C-like language that runs on BEAM becomes mainstream enough.
strkek··on Slack's bait and switch
Also:

- Mentions: Many times I've tried to mention someone but Slack goes and picks the wrong person. If I'm typing `@johnd`, then it should be fairly evident that I'm trying to mention `@johndoe`; don't make me go through that UI when you should have enough info already.

- Buggy snippets: Why do I have to go through a slow UI just to paste some code, when triple-backtick should be enough?

- Triple-backtick: No code highlighting. And just try to copy its content; you'll be surprised when your clipboard looks as if passed through an `s/\n/\n\n/g` filter.

- Scroll up: Scrolling up many pages above causes some weird jumps.

---

Incidentally, the Discord people got all these things right.

strkek··on After over a decade of Vim, I’m hooked on Emacs
Bonus points for using vim mode on browser editors like CodeMirror or ACE, and then trying to delete a word via <C-w>.
strkek··on Porn is not the worst thing on Musical.ly
Or until they learn enough to understand how these filters work and figure out some way to bypass them.

At that point things would start to get hella fun on both sides.

strkek··on Tell HN: Slack decides to close down IRC and XMPP gateways
This is what I use. Unfortunately as soon as you load previous Slack messages, the log file gets all messed up with their message order, so you can't rely on it as-is.
strkek··on Node v9.8.0
Hey this is cool! How come I haven't heard of <script type="module"> before.

I guess I should seriously subscribe to a newsletter or something.

strkek··on Helping Cairo, the rendering library
I didn't get that impression at all, though. If people want to contribute they only need (1) the source code, and (2) a way to contact the authors. Both conditions are met, so there's really no need for redundant lip service, especially on a minimalist, straight-to-the-point website like that.
strkek··on Location-based ads are growing
I don't use Facebook but yes, from the url I think that's exactly the sort of thing I want. I think Google lets you tailor their ads too, but these giants are more like the exception.

Some websites use different ad networks, so ideally I'd like something like that but as a browser setting. For example some predefined list of topics (the same way there's a list of TLDs), and making the browser send a header like "Advertising: 1,20,6,78,9481" and then ad networks would adhere to those categories.

Of course that's way too idealistic and there's no way something like that will ever happen, but if people want me to disable my ad blocker, that's the only way I'd agree to it. Otherwise is an instant "no".

strkek··on Ask HN: Best way to learn modern C++?
Indeed.

I still haven't grasped Rust as much as I'd like, but I have to admit that at least it feels like every part of the language fits nicely together with the others, as opposed to the "messy spaghetti" feel I get from C++ (though this is of course my subjective impression).

There are things I'd like they do, like removing the Python 2 dependency for building from source, or actually writing a spec. But I guess that'll come with time.

strkek··on Location-based ads are growing
Thank you, cases like this really make me want to disable uMatrix.

If there was a way to make all the ads actually display the kind of thing I like, even if it's via some network-specific checkboxes or something like that, I'd gladly disable uMatrix and any ad blocking.

But then I remember the ads with sounds, or the mining ads, or ads that don't even have anything to do with the websites I visit nor the one I'm currently in... no thanks.

strkek··on Show HN: My Weekend Project – Automatically determine date format string
There's Fucking Go Date Format [1], which is close enough. Btw, as a Go developer myself, I still can't remember Go's format.

[1]: http://fuckinggodateformat.com/

strkek··on GitHub shouldn't allow username reuse
I read somewhere that big companies use BitTorrent internally to update their codebase.

But yeah, I'd really like for someone to develop a VCS like that (even more if it's in Go, with no Cgo, and under BSD, MIT or Apache license). It'd make distribution, immutability and mirroring so much easier.

strkek··on GitHub shouldn't allow username reuse
The only drawback I see to this approach is that adding a new method is not trivial, and requires recompiling the `go` executable.

Makes it more difficult to implement a handler for the BitTorrent protocol to `go get` from a DHT, just for the sake of mad science.

strkek··on GitHub shouldn't allow username reuse
Call me paranoid, but I've always assumed urls are not permanent. Domains can change, usernames can change, and published things can be taken down.

For example, I may publish something as an online backup or a mirror of my real repositories, without any kind of guarantee whatsoever. ONLY sharing because I want people to be able to see how the things I do were made. I mean, even most FOSS licenses explicitly state that there are no guarantees of any kind.

IMHO I think people should stop with the "if it's on internet, it must retain compatibility" mindset, and instead switch to a "this will break or disappear at any time unless explicitly stated otherwise" mindset.

← PreviousPage 2 of 3Next →