Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
begriffs
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
31.
▲
by
begriffs
6y ago
Would the following be a correct way to determine whether there's a problem? * First call setlocale(LC_CTYPE, "en_US.UTF-8") * Next feed the UTF-8 string representation of every Unicode codepoint one at a time to mbstowcs() a
32.
▲
by
begriffs
6y ago
What does the presence or absence of __STDC_ISO_10646__ indicate exactly? I found this part of the C99 spec obscure. For instance, the macOS clang environment does not define this symbol. Is their implementation of wchar_t or <wctype.h&g
33.
▲
Concurrent Programming, with Examples
(begriffs.com)
330 points
by
begriffs
7y ago
|
88 comments
34.
▲
by
begriffs
7y ago
It's hard to beat this list of quality books: http://iso-9899.info/wiki/Books#Learning_C Read some and do the exercises. You'll learn to write portable code to a standard rather than stuff that "accident
35.
▲
Ask HN: As a programmer, how to help medicine?
2 points
by
begriffs
7y ago
|
1 comments
36.
▲
by
begriffs
7y ago
OP has an extravagant threat model. Yeah if I were trying to hide communications from some dictator where even the metadata of recipient and timestamp is damning then of course email is out. PGP is a good way to communicate under the right
37.
▲
The most evil Lisp macro
(nickdrozd.github.io)
3 points
by
begriffs
7y ago
|
0 comments
38.
▲
by
begriffs
7y ago
That's awesome, thanks for sharing. :) There's always someone smarter...
39.
▲
by
begriffs
7y ago
Even supposing they beat the GNU wc, that's not too hard... try beating this one: https://github.com/begriffs/wc I wrote it in reply to an earlier post, where someone "beat C" with Haskell.
40.
▲
by
begriffs
7y ago
/me smiles, continues using OpenBSD
41.
▲
by
begriffs
7y ago
Although I use a mac for work, I have a spare thinkpad with openbsd, which I think of as my "forever system." I put stable software on it and generally go with the OS defaults. Over time I patiently refine the configuration files,
42.
▲
by
begriffs
7y ago
> If your buffer isn't a NUL-terminated, then don't call a function that is only defined for NUL-terminated buffers. It's not that people want to pass strncpy source buffers that lack NUL termination, it's that strncp
43.
▲
by
begriffs
7y ago
> the same expression broke on a lot of compilers as soon as optimization was turned on C is not a "try it and see" language. If you stray from the spec then things will act differently and break between compilers. Section 7.13
44.
▲
by
begriffs
7y ago
> you can jump anywhere, not limited to the same function Outside of the current function, yes. Anywhere, no. Longjmp allows you to return to places you’ve already been and have saved with setjmp. Also attempting to longjmp to a function
45.
▲
by
begriffs
7y ago
Vim can also edit remote files, with its built-in netrw module. It can do ssh, ftp, dav, fetch, http, rcp, rsync. vim scp://remoteuser@server.tld//absolute/path/to/document :help netrw-start
46.
▲
by
begriffs
7y ago
Yes, this is a good idea, although I'd like to note there is more nuance. * `encoding` is what vim uses internally -- the way buffers and registers are stored in memory. Default value is latin1 as you mention, but it will also pick up
47.
▲
by
begriffs
7y ago
Thanks for the correction, can you give me a more precise date for nvi? I can update the article.
48.
▲
by
begriffs
7y ago
Sorry, the way I phrased that was sloppy. I should have said, "main author abandoned, saying NeoBundle ripped off code." http://www.gmarik.info/blog/2014/why-i-stopped-contributing-...
49.
▲
History and Effective Use of Vim
(begriffs.com)
593 points
by
begriffs
7y ago
|
218 comments
50.
▲
History and Effective Use of Vim
(begriffs.com)
2 points
by
begriffs
7y ago
|
0 comments
51.
▲
by
begriffs
7y ago
Rather: don't presume anything, read the language specification for the version you are writing (C89, C99, etc). "Measuring" is exactly the wrong thing to do because often it is indicative of only your specific architecture&#
52.
▲
by
begriffs
7y ago
Your article mentions: > Unicode is pretty established, some use it with the wchar_t API in POSIX, some more as non-POSIX via external non-standardized utf-8 libraries Just wanted to note that wchar_t is not POSIX per se, but comes from
53.
▲
by
begriffs
7y ago
As it says in the article: > The examples in this article conform to the C89 standard, but we specify C99 in the Makefile because the ICU header files use C99-style (//) comments.
54.
▲
Unicode Programming in Depth
(begriffs.com)
1 points
by
begriffs
7y ago
|
0 comments
55.
▲
How Unicode Works (With Examples)
(begriffs.com)
3 points
by
begriffs
7y ago
|
0 comments
56.
▲
Unicode Programming, with Examples
(begriffs.com)
1 points
by
begriffs
7y ago
|
0 comments
57.
▲
by
begriffs
8y ago
Good point, there are URIs for other protocols (like FTP, Gopher etc).
58.
▲
by
begriffs
8y ago
Every email message has a unique identifier called the Message-Id, but SMTP does not host messages with an HTTP URI. Serving public URIs for messages must be done by separate web servers like a webmail client, or a mail archiving tool such
59.
▲
by
begriffs
8y ago
> The promise of AMP for Email is that it’ll turn basic messages into a surface for actually getting things done. Oh god no, please don't turn email into a "surface." > That means you’ll be able to do [x, y, z] right fr
60.
▲
Trusting Unicode strings like SSH fingerprints
(github.com)
2 points
by
begriffs
8y ago
|
0 comments
More ›