Better HN
topnewbestaskshowjobs
Log inSign up

SloopJon

2,613 karma · joined Nov 15, 2013 (13y ago) · 775 submissions

Submissions

comment 8y ago · link · parent

This links to deskthority.net, which says, "BEAKL 9 is currently the recommended layout for general audience." However, there is a link to the shenafu.com, which shows BEAKL 15 as the latest recommended layout.

Looks like this changed last month:

http://shenafu.com/smf/index.php?topic=89.msg2323;topicseen#...

comment 8y ago · link · parent

iBooks for Mac can read the epub, but Google Play Books rejects it: "This file cannot be processed."

The epubcheck utility reports more errors than I know what to do with. For example:

Error while parsing file 'value of attribute "lang" is invalid; must be an RFC 3066 language identifier'.

Error while parsing file 'value of attribute "id" is invalid; must be an XML name without colons'.

Error while parsing file 'element "figure" not allowed anywhere; expected the element end-tag, text or element "a", ..., "ul" or "var" (with xmlns:ns="http://www.w3.org/2000/svg")'.

Is this likely a problem in the sources, GitBook, or something else about how the submitter built it?

comment 8y ago · link · parent

For cluster headaches, a high rate of oxygen (like 10-12 liters per minute) acts as a vasoconstrictor, which can relieve pressure on the nerve.

comment 8y ago · link · parent

I know two people who suffer from chronic, debilitating migraines. As someone who gets episodic clusters, I am sympathetic / empathetic to their plight. My attacks (which only happen every two years or so) can be treated pretty effectively with oxygen and/or sumatriptan injections, so it's tempting to think that sumatriptan (primarily a migraine drug in the first place) should just work.

Everyone is different, and there is so much we don't understand about migraines (and clusters, which often benefit from migraine research). If you think that ginger, cannabis, or just avoiding your triggers is all it takes, that's not always (nor probably often) the case.

I hesitate to subject a friend's personal blog to the HN effect, but if you want to learn about chronic migraine from one firsthand account, read through some of the archives at thedailyheadache.com. She has been trying desperately and relentlessly to find peace for a long time.

comment 8y ago · link · parent

Meanwhile, RHEL 7 uses GCC 4.8, which first shipped five years ago. How about the Red Hat Developer Toolset? Is that pretty commonly used, or do most Red Hat users stick with the default packages?

comment 8y ago · link · parent

I found the CyberScoop article confusing. CNET, of all places, has a pretty good hands-on preview:

https://www.cnet.com/news/google-made-the-titan-key-to-tough...

It makes clear that there will in fact be two separate styles. It also includes a comment from Yubico that Bluetooth "does not provide the security assurance levels of NFC and USB, and requires batteries and pairing that offer a poor user experience."

comment 8y ago · link · parent

After dabbling a bit in C++ after college, then purposely avoiding it for about twenty years, I'm getting back into it for work. I'd say my favorite books for coming up to speed were C++ Common Knowledge, Effective C++ (3rd edition), and Effective Modern C++, more or less in that order. Discovering Modern C++, which I haven't finished yet, has not been as enjoyable.

I wouldn't get too hung up on skipping straight to "modern" C++. Yes, C++11 is a game changer, but the vast majority of what you'll find in the classic recommendations is still worth knowing. Things like type deduction, smart pointers, and move semantics won't be hard to pick up once you've got the basics. Although I haven't read it, Accelerated C++ sounds like a good fit for your situation.

comment 8y ago · link · parent

I can certainly relate to this, as I have to see a neurologist every two years or so for cluster headaches. When a cycle starts, I need a prescription for medicine and oxygen immediately, because I'm getting very painful headaches every day for two months or so.

The problem is, my neuros keep retiring, so I have to start over, begging for an appointment from a new one who doesn't have anything sooner than three months out. When I finally get in, I tell them my previous dosage, and they write me a script.

comment 8y ago · link · parent

Although I'm sure I've heard the term before, I forgot what it meant. Your comment helped me put it into context as a fault injection technique.

One point the paper makes in the introduction is that "coverage alone might be misleading, as in many cases where statements are covered but their consequences not asserted upon." To satisfy profile-guided coverage (e.g., gcov), the test doesn't have to be correct or useful, it just has to execute the line or take the branch.

comment 8y ago · link · parent

Right, and the much vaunted test suite is proprietary, so the typical end user can't reproduce this test of "every single instruction."

Not that I'm taking sides here. I'm really interested in both the extensive testing that the SQLite team does, and the analysis that John blogs about.

comment 8y ago · link · parent

This cracked me up:

"Python has different operators for bitwise and logical operations which C should copy (already copied with iso646.h except if you try to use them, men will stop shaking hands with you)."

Slightly related: I noticed the other day that VS Code does not highlight and, or, et al. as keywords in a C++ program.

comment 8y ago · link · parent

Can anyone recommend software to help generate quizzes, preferably with a spaced repetition component? So, instead of a single card that associates "agua" with "water", a set of cards like "____ es mojada" or "vaso de ____ fría". It might have a multiple choice interface where the order of the choices varies, and maybe the wrong choices vary as well.

comment 8y ago · link · parent

John Regehr wrote a post about checking for signed overflow a few years ago:

https://blog.regehr.org/archives/1139

HN discussion:

https://news.ycombinator.com/item?id=7665254

Your first suggestion is similar to his checked_add_1(). The Emacs macros are similar to his checked_add_4(). Presumably builtins are optimal, performance wise, for a given compiler.

comment 8y ago · link · parent

Type inference (or type deduction, as it's called in C++) is the number one reason for the resurgence of static typing these days. I for one would find C# and C++ much less pleasant both to write and read without it; so much so that I would probably use a dynamically typed language instead.

Your perspective is that type annotations are there for the reader. I agree with tzahola that type safety itself is valuable in its own right without forcing the user to type little reminders to himself everywhere. Thanks to language servers, I can hover an expression in a text editor and remove all doubt.

I also agree with the other responses that if any language benefits from type deduction, it's C++. No way would the code be more readable if you were forced to be explicit about some of the dependent types in the STL.

That said, you are obviously not alone in your perspective. I've heard the exact same arguments from experienced C# programmers.

comment 8y ago · link · parent

While I haven't read either of them, Pointers on C and Understanding and Using C Pointers both have good reviews.

comment 8y ago · link · parent

I was curious about what comprised the "etc." A little further down in the issue you linked, chrisdias said, "You can look at the product.json that is installed with the Visual Studio Code product to see what we configure."

I don't really know how to interpret this file, but the copy in VS Code 1.23.1 for Mac has 644 lines, compared to 23 in the repo.

comment 8y ago · link · parent

This is the first time I've ever heard that term used in the context of office romances.

comment 8y ago · link · parent

When I type help, the characters aren't echoed to the screen, but backslash commands are:

    $ ./usql
    Type "help" for help.
    
    (not connected)=>     
    You are using usql, ...
    Type:  \copyright for distribution terms
           \? for help with usql commands
           \g or terminate with semicolon ...
           \q to quit
    (not connected)=> \q
    $ 
Is this expected?

Edit: I'm using the binary package on macOS 10.12.6.

comment 8y ago · link · parent

I've been looking at key-value stores recently, and I wonder what people think about collating numbers of heterogeneous types.

FoundationDB tuples have type codes that segregate values of different types, so that the strings "1" and "2" sort before the integers 1 and 2, which sort before the single-precision floats 1.0f and 2.0f, which sort before the double-precision floats 1.0 and 2.0.

The database that I test supports double-precision IEEE floats, and a proprietary decimal float with a signed 64-bit significand and signed 8-bit exponent. When converted to string for use as keys, these collate as expected. The price of this is that you don't get shortest representations of the sort sought by this paper and others. Otherwise, a binary and decimal float that compare unequal could convert to the same string.

I guess it's kind of unusual to use floats as keys, and more unusual still to use both binary and decimal floats, but I wonder if there is another strategy for collating them.

comment 8y ago · link · parent

I know it's easy to snipe, as we often do here on HN, but a series of screenshots with no alt text is an accessibility disaster.

comment 8y ago · link · parent

I came across this the other day while looking into Flow, the C++ extension used to write FoundationDB. This Github issue asks about a benchmark on which Flow claims really good results:

https://github.com/actix/actix/issues/52

Actix does pretty well too.

comment 8y ago · link · parent

The rarity of UUID collisions depends on the quality of implementation. The Quora answers assume UUIDv4 with a high-quality RNG.

I was able to reproduce UUIDv1 collisions at will when the timestamp had microsecond resolution and the clock sequence had to be generated randomly each time. That is, I simply had to get two processes to generate the same fourteen bits within a microsecond.

comment 8y ago · link · parent

> C++ developers .. don't seem to be interested in actually improving the language

In his talks at the 2014 and 2017 conferences for the D programming langue, Scott Meyers noted the difference between what individual C++ committee members say they value, and what the process actually produces. Will a new standard every three years make this better or worse? They do seem open to deprecating things that don't work.

You might enjoy the 2014 talk, called "The Last Thing D Needs." I don't want to spoil the punchline, which actually struck me as kind of bittersweet, but Scott talked about the distinction that Fred Brooks made in "No Silver Bullet" between essential and accidental complexity. C++ does have a lot of the latter.

Edit: link for the 2014 talk:

https://www.youtube.com/watch?v=KAWA1DuvCnQ

and for the 2017 talk:

https://www.youtube.com/watch?v=RT46MpK39rQ

comment 8y ago · link · parent

I was too lazy to look up what these sequences represented, but I did a quick test with the Euro symbol example from Wikipedia, and it did indeed reject the overlong sequence:

    #include <stdbool.h>
    #include <string.h>
    #include <stdio.h>
    #include "simdutf8check.h"
    
    int
    main(int argc, char *argv[])
    {
        const char euro[] = "\xe2\x82\xac";
        const char eurolong[] = "\xf0\x82\x82\xac";
    
        bool valid = validate_utf8_fast(euro, sizeof euro);
        printf("validate_utf8_fast(euro): %d\n", valid);
    
        valid = validate_utf8_fast(eurolong, sizeof eurolong);
        printf("validate_utf8_fast(eurolong): %d\n", valid);
    
        return 0;
    }

comment 8y ago · link · parent

My first thought on seeing this was Bjoern Hoehrmann's UTF-8 decoder, which encodes a finite state machine into a byte array:

http://bjoern.hoehrmann.de/utf-8/decoder/dfa/

I happened to come across this decoder again recently in Niels Lohmann's JSON library for C++:

https://github.com/nlohmann/json

I see that this is mentioned in a previous post:

https://lemire.me/blog/2018/05/09/how-quickly-can-you-check-...

One thing I'd like to check in the new code is whether it's as picky about things like overlong sequences as Bjoern's code is.

comment 8y ago · link · parent

I notice that the submission contains a "?hn" query arg, which I'm pretty sure confuses the dupe detector.

comment 8y ago · link · parent

The drivers were great for a GTX 650Ti in 10.8 and 10.9. They worked fine for games like Borderlands 2 and Arkham Asylum.

The drivers are terrible for a GTX 1060 in 10.12. After running for a while, even basic desktop operations bog down to the point of being unusable. I haven't tried 10.13 yet.

comment 8y ago · link · parent

Any idea why they recommend TrueType over TrueType? Is that a general recommendation, or something specific to this typeface?

Edit: From BoldMonday's comment in issue 103: "TrueTypes can be - and in the case of IBM Plex are - specifically hinted for screen. OpenTypes with PostScript outlines are not able to do that."

comment 8y ago · link · parent

My concern is that constrained production and quality issues could lead to long repair times. There was a Motley Fool story last year about someone whose Model S was in the shop for over seven months:

https://www.fool.com/investing/2017/03/07/repairing-my-tesla...

Discussion:

https://news.ycombinator.com/item?id=13821109

comment 8y ago · link · parent

The last time I looked at Rust platforms, I was kind of surprised that AIX wasn't on the list at all.

It looks like the Solaris port got a nudge from Oracle, so I'm guessing that the most likely path to AIX support is a similar nudge from IBM.

1
151617
26