HNHacker News
TopNewBestAskShowJobs

shabbyrobe

640 karma · joined August 15, 2012

submissionscomments
shabbyrobe··on We’re happy with SQLite and not urgently interested in a fancier DBMS (2016)
Or Miller: https://github.com/johnkerl/miller
shabbyrobe··on Mozilla tries ads in Firefox again, now powered by Pocket recommendations
Firefox was the last of the players that mattered that could still be described as a "user agent". That's no longer true.
shabbyrobe··on Notes on structured concurrency, or: Go statement considered harmful
Thank you! I had no idea about this package! I rolled my own similar thing, but I'd much rather be using something semi-blessed. Looks like I have some refactoring to do, but that's not always a bad thing.
shabbyrobe··on A Proposal for Package Versioning in Go
Yeah for sure, it's definitely got its warts. I suspect the import thing was far easier to code as an error than to compute whether they need to be pruned. Gotta love those go build times though! With vim-go and goimports, it's handled automatically for me on save so I don't find that an issue any more. Unused variables, on the other hand...
shabbyrobe··on A Proposal for Package Versioning in Go
I definitely see this with Go decisions too, but I think that same "pigheadedness" has also been a driving factor behind a lot of what makes Go so effective to work with. They've thrown out an awful lot of stuff, which sometimes makes me bristle but I usually have to admit they were right.

I think they threw out a bit too much, but that's only a problem if the gaps don't get filled or the compromises aren't adequately explained. What's left is a very pragmatic selection of extremely useful tools that can be used to cut a tonne of working code very, very quickly. I can't say I always like it, but I benefit tremendously from it.

shabbyrobe··on Decode Like It's 1999: MPEG-1 Decoder in JavaScript
Please be careful, this library has hidden GPL encumbrance issues. See my prior comment for details: https://news.ycombinator.com/item?id=13556718
shabbyrobe··on Go accepts patches from GitHub pull requests now
https://github.com/golang/go/issues/23745
shabbyrobe··on Go accepts patches from GitHub pull requests now
Great to see the high-friction barriers falling. The move to Github for issues has been a massive improvement.

Hopefully they can do something about getting rid of Google groups now. It's an extraordinarily poor organ of record. The low-friction Github issue tracker is full to bursting with high-ranking results for things that amount to support requests, but the pat response is a slightly-too-curt "ask this on golang-nuts, closed, kthxbye", and that's where the trail ends.

shabbyrobe··on Memory Safety in Rust: A Case Study with C
A lot of point-missing here about the example C program. Maybe everyone else in the world is a perfect C coder who never makes a mistake, but I've found every single one of those mistakes in my own code at one point or another (though of course, not at quite the same density). The point is that they're easy to make, and though there is tooling, it's extremely cumbersome and imperfect.

Worse, over time as a codebase gets more complicated and older - and only if you're one of the few lucky enough to start with C code that isn't an unholy, inconsistent no-warnings disaster-mess slop bucket of horror - some of those warnings have a nasty habit of getting disabled so some middle manager can expedite some unreasonable commitment out a door to tick a box.

Call me a masochist but I enjoy writing C, particularly with valgrind, *san, afl, et al at my back. But I felt the point was well made by the author and I find it hard not to feel like a world where these problems simply didn't exist at all might be a bit nicer

shabbyrobe··on How Apple fumbled a five-year lead in voice control
Hehe yep but the major difference here is that I was chuckling the whole time I was typing. Can you imagine how bad chuckling would make the end result if you were speaking it? Chance of success: -1 billion.
shabbyrobe··on How Apple fumbled a five-year lead in voice control
> In the AR and VR future we won’t be typing.

Oh please god no full stop imagine how hard it would be to even write a simple hello world program example ellipsis linebreak linebreak three backticks no not that delete word delete word backtick backtick backtick c linebreak void main open bracket int argc comma char asterisk argv close bracket space open curly bracket line break tab print-EFF open bracket double-quote percent d backslash n double-quote comma argc close bracket semi-colon line break backtick backtick backtick

Chance of success? Zero. Time taken? Three minutes.

shabbyrobe··on Firefox 58
I've been using uMatrix for this job for a while now. I find it much better than I ever found RequestPolicy, but of course YMMV.

https://addons.mozilla.org/en-US/firefox/addon/umatrix/

shabbyrobe··on Buffered Channels in Go: Tips and Tricks
Channels can be really useful but are massively oversold. Fortunately it has cooled off a bit in recent years but I still see heaps of go code that bends over backwards to use channels because "share memory by communicating blah blah blah", even in cases where using another synchronisation mechanism instead would radically simplify things.
shabbyrobe··on Bleve: full-text search and indexing for Go
Nice one! I'll keep my eyes peeled for a release and give it another crack. I think all those creaky old scripts still work.
shabbyrobe··on Bleve: full-text search and indexing for Go
I ran into some significant performance issues with Bleve during a weekend hackathon a few months ago. I was trying to index the stackoverflow data dump for fun and I couldn't get it to successfully complete. I'm guessing i was running into some boltdb related limitations but I didn't have the time to dig deeper before the party ended and I had to get back to the day job.

SQLite's FTS5 allowed me to load the entire data set without breaking a sweat, but query performance was unexpectedly poor for some combinations of terms with no apparent consistency, and it became unusable due to a temp table I couldn't work out how to avoid when attempting to search in descending primary key order.

It was many months ago now and I have forgotten some of the particulars but thought it might make an interesting jumping-off point for discussion about any ideas anyone might have for indexing 60gb of data into a flat file setup like Bleve or SQLite uses.

Would the new scorch experiment perform better with an index of that size than the boltdb backend?

shabbyrobe··on Rust in 2017: what we achieved
This is encouraging! In my experience, getting to this stage - where you've actually seen the thing successfully hit a breakpoint - is 95% of the hard work with debugging. I'm not a heavy debugger user, I prefer trace logging, rich type systems and tests for most problems, but then that one time when you have no choice but to "use it in anger", it simply has to be there.

I seem to run afoul of some obscure, ungooglable edge case almost every time I try to start a debugger I don't use very often, regardless of the platform. Of course this happens when I'm frustrated enough to be considering using a debugger in the first place, which is exactly when you don't want to be rage-googling why your debugger refuses to print symbol names, but only when you start it with exactly the arguments you need to start it with to trigger the bug. Or when you try to send an email more than 500 miles away Or print on a Tuesday. By that point, your debugger problem is worse than your original bug.

There's a strong sense from a vocal portion of the software development community that debuggers aren't really needed (not suggesting that this is you, just a general observation). Coupled with the fact that building a functioning debugging tool is no easy task, we end up in a situation where far too many platforms treat debugging as a second class citizen when it's really an essential feature, even if for some of us it's a feature of last resort.

shabbyrobe··on Show HN: Joy – a Go to JavaScript compiler
Awesome, do you have any more info about them you'd be willing to share? By the time my mate was around they weren't common enough in the humanities dept for him to have ever seen one before Manfred's. He's likely at least as curious as I am!
shabbyrobe··on Show HN: Joy – a Go to JavaScript compiler
My mate has an awesome story about providing technical support to him on campus. I hope neither he nor the deceased mind me relating it.

"Hello. Tech support? This is Manfred von Thun. My computer is not working."

"OK, no problem, do you have a PC or a Mac?"

"Neither."

<Pause>

"Neither?"

"Yes. Neither."

"Ok, what do you have, then?"

"I have a terminal which connects to the mainframe."

<Pause>

"OK, I'll be right over."

Sure enough, he gets there and there's some godforsaken yellowing text-only terminal thing with a wire plugged into some weird port he'd never seen before, presumably wending its way into the bowels of the university to some long-lost, dusty piece of big iron from computing's distant past.

My mate was incredulous. "So what do you do with this, exactly?"

"I write papers, I write programs, I make web pages."

"Web pages!?"

"Yes, web pages. But I don't believe in graphics."

In spite of his protestations about GUIs, he was eventually given a brand spanking new eMac (this was around about the time he was creating Joy). Once he saw Terminal.app, he no longer seemed particularly concerned.

shabbyrobe··on The State of JavaScript 2017
Ubuntu 16.04 + Firefox 57, Ubuntu 16.04 + Chromium 62.0.3202.89, macOS Sierra + Firefox 57. Inaccessible to me on all - the font is too thin for me to read. I can't scale the font size up high enough either as the layout breaks. I used the `font-weight` hack initially, but after I clicked a couple of internal links that reset the override, I gave up.
shabbyrobe··on The State of JavaScript 2017
I can't read the text on this site. Does anyone know a way to permanently disable "font-weight: <=300" for all websites in firefox without resorting to anything as heavy as Stylish, or will I need to write my own extension? There's a minimum font size preference, but not a minimum weight.
shabbyrobe··on Show HN: Joy – a Go to JavaScript compiler
Alas, Manfred von Thun is no longer with us. Seems unlikely there will be another release.
shabbyrobe··on Go 1.10 Beta 1 is released
That's a good point. It's more useful for config files than APIs I reckon. That's why I've been hanging for it.
shabbyrobe··on Go 1.10 Beta 1 is released
You can have whatever default value you like by initialising the struct before you pass it to json.Unmarshal. If the key isn't present, it won't be set:

    type Test struct {
        Foo string
        Bar string
    }

    func NewTest() *Test {
        return &Test{Foo: "a"}
    }

    func main() {
        t := NewTest()
        if err := json.Unmarshal([]byte(`{"Bar": "b"}`), t); err != nil {
            log.Fatal(err)
        }
        fmt.Printf("%#v\n", t)
    }
Output:

    &main.Test{Foo:"a", Bar:"b"}
shabbyrobe··on Go 1.10 Beta 1 is released
Looks like it was because an internal structure in the runtime had a fixed size, but that has changed: https://stackoverflow.com/questions/40943065/golang-why-runt... https://github.com/golang/go/commit/ee55000f6c45d2f5c38d9167... https://github.com/golang/go/issues/15131
shabbyrobe··on Go 1.10 Beta 1 is released
This release finally brings a way to raise an error when an unknown key is encountered in a JSON object: https://go-review.googlesource.com/c/go/+/74830

The error's text is close to useless for even a moderately complex JSON object, but at least it's possible to catch this condition now.

shabbyrobe··on System76 ME Firmware Updates Plan
It’s the way the wind is blowing. Even Firefox is infested with invasive, on-by-default telemetry now. The price of freedom from it is eternal vigilance. I’d very much prefer Canonical not to get it into their heads that it’s OK to do it again.
shabbyrobe··on Show HN: Quickfix, the best stupid idea for fixing problems in Node modules
Watch out! The "pure and perfect git history is more important than any other consideration" crowd are going to take you apart for this heretical notion!
shabbyrobe··on Firefox 57.0 Released
It's uber slow for me too. Similar specs. Several hundred millisecond tab switches with a clean profile. Typing into slack is like typing into an SSH session over a bad dialup connection. Adding Tree Style Tabs kept my CPU over 20% and my fans running permanently. Maybe it's faster for people on Windows or Linux, but on macOS it's a major regression.
shabbyrobe··on Firefox 57.0 Released
Just installed it, looks like the update overrode my previously set default of a blank "new tab" page in favour of their overly fancy, ad infested "new tab experience" page. Looks like it's time for another scan of about:config for any other nasties they decided to sneak in there this time.
shabbyrobe··on Go, don't collect my garbage
So that you can mostly avoid having to carefully avoid allocation!
← PreviousPage 3 of 6Next →