HN user

jibsen

68 karma
Posts0
Comments63
View on HN
No posts found.
[GET] "/api/user/jibsen/stories?hitsPerPage=30&page=0": 500 Failed to fetch user stories

This was a very convenient way to share files because links were direct. Some people even used the public folder to host small static sites.

Interestingly their help site lists the change as March 15, 2016 instead of 2017, but perhaps they got all the dates wrong there [1]. At least I got the same email.

[1] https://www.dropbox.com/help/16

Most importantly, whatever the language or codebase you are working in/on mandates.

I write a lot of C, and given the choice, I tend to prefer tabs for indentation and spaces for alignment. I use a tab-width of 8, so the code will look fine for anyone using a lower tab-width.

Converting from tabs to spaces is a simple search-and-replace, whereas the other way is more work (there was an article here recently about algorithms to guess indentation width).

The Mac version has gotten a lot of good response, so I tried installing the Windows version. It feels a bit like a beta sadly.

  - Backups to local folder do not work
  - Scheduled backups don't always run until you open the GUI
  - Open log viewer before any backups have been performed crashes the app
  - File-Exit does nothing
  - Wizard adds whole C:\ to first destination
  - Doesn't seem to backup (all) locked files
I've reported all of these, and the author seems responsive, so I hope it gets better.

It seems that the target option might be the one I was looking for.

The installed version defaults to x86_64-pc-windows-msvc, where the msvc at the end suggests it is looking for MSVC headers.

If you specify x86_64-w64-mingw32 as target, it uses the mingw-w64 headers.

What really confused me was that from the llvm front page, if you click Win Installer, you get a version that seems to expect MSVC headers, while if you click LLVM 3.8.0 you get the page you are linking, where the installers appear to expect MinGW headers.

Or perhaps there is some option in both of them to select the other?

Pointers to character types get some special treatment. They can be used to address the individual bytes of other objects (C11 6.3.2.3p7), and the strict aliasing rule allows character types to be used to access those bytes (6.5p7) (one interesting note is that uint8_t is not strictly required to be a character type [1]).

The problem with assuming things like a pointer working like an integer, is that compiler vendors may choose to start taking advantage of any undefined behavior and point to the standard if you complain.

[1] https://gist.github.com/jibsen/da6be27cde4d526ee564

Even computing pointers that point outside an array can be undefined behavior, like f - 1 + 1.

It is easy for people who understand the relatively strong correlation between C and the assembly language it generates to assume such things work. Also, compiler vendors did let us get away with them for many years.

I've played around with replacing the C library with something more lightweight for small programs (WCRT), but one issue is that you end up with executables that get flagged by some AV software for being "unusual".

I think unless you have a specific need for a small executable, it is usually not worth it.

I don't think tools like pngquant should be so easily dismissed. With the pixel density of todays monitors, the lossy changes they introduce can be very hard to see (which may be surprising for those of us who remember the pixelated horrors of Floyd-Steinberg from a couple of decades ago).

For some image types, lossy png has the huge advantage over jpg at the same file size that they have no jpg artifacts.

    671.012 original
    584.677 zopflipng -m
    580.180 zopflipng -m --lossy_transparent
    576.637 pngwolf --max-stagnate-time=0 --max-time=300 --normalize-alpha --strip-optional
    190.598 pngquant --speed 1
    179.638 pngquant + pngwolf

I tried using ligatured when Pragmata added them, but the issues made me return to the normal version.

If you use your editor for multiple languages and documentation as well, you may find things like lines in comment blocks made of '%', '#', or '-' to break from the ligatures. Also if your doc markup(-down) uses underlines of '-' or '=' for headings, they are affected.

On Windows, I found some editors where the ligatures were enabled, some where they weren't, and not many where you had any option to toggle either way.

I also stuck my nose down this rabbits hole about a year ago, while writing a blog post about TextMate color themes [1] (TL;DR: Some older TextMate color themes were made on the Mac when it was using Generic RGB and a gamma value of 1.8, and converting those themes directly to other editors can result in slightly off colors, because they likely assume RGB values to be sRGB with a gamma close to 2.2).

It is fascinating to learn about, but it feels a bit like you could always go deeper. I stopped when I got to the different methods for gamut mapping.

[1] http://www.hardtoc.com/archives/310