2,613 karma · joined Nov 15, 2013 (13y ago) · 775 submissions
comment 8y ago · link · parent
Looks like this changed last month:
http://shenafu.com/smf/index.php?topic=89.msg2323;topicseen#...
comment 8y ago · link · parent
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
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
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
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
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
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
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
"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
comment 8y ago · link · parent
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
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
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
$ ./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
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
https://github.com/actix/actix/issues/52
Actix does pretty well too.
comment 8y ago · link · parent
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
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:
comment 8y ago · link · parent
#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
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
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
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
https://www.fool.com/investing/2017/03/07/repairing-my-tesla...
Discussion: