HNHacker News
TopNewBestAskShowJobs

williamvds

324 karma · joined November 4, 2019

Contact: hn@williamvds.me
submissionscomments
williamvds··on DALL-E 2 open source implementation
I'd much prefer tech being open to everyone rather than kept to megacorporations that OpenAI deems worthy (and has received funding from). A neural network isn't a lethal weapon, the potential for malicious use is much more limited than its potential positive creative applications.
williamvds··on Django: Reformatted code with Black
Smudge & clean might do the trick, but it could be dirty. The smudge -> clean process might produce additional changes that aren't related to the purpose of your commit. Whitespace in particular could be a problem, especially where there's ambiguity in how it should be used. black isn't as bad because it has stricter rules on whitespace. Still, if you aren't checking style rules before every merge someone using smudge and clean could end up reformatting entire files.

IMO the next next step is, as others have discussed on HN, getting your version control to store and abstract syntax tree. tree-sitter could make this easier nowadays, but I think it'd need more invasive changes in Git than just using the filters.

See this HN thread https://news.ycombinator.com/item?id=28670372

williamvds··on Make your monorepo feel small with Git’s sparse index
Is unshallowing any more expensive than a normal clone? The shallow clone is for the benefit of the user so they can get to work sooner.
williamvds··on Make your monorepo feel small with Git’s sparse index
Per my understanding of SVN, a checkout only downloads the lastest version of all the files ("pristines"). Git on the other hand clones just about everything from the remote repository, giving you a fully-fledged repository locally. SVN operations that need more history like log and blame will communicate with the repository for that info.
williamvds··on Make your monorepo feel small with Git’s sparse index
With shallow checkouts cloning is much quicker. You could try combining it with sparse checkouts too. You can even have Git fetch the full history in the background, and from a quick test you can do stuff like commit while it's fetching. Obviously the limited history means commands like log and blame will be inaccurate until it's done.

  $ git clone --depth=1 <url>
  $ cd repo
  $ git fetch --unshallow &
  $ <do work>
williamvds··on strcpy: A niche function you don't need
Unfortunately C is locked into null-terminated strings, given that all the printf-style functions work on the assumption there'll be a null terminator. C++ has std::string_view which is pointer + length, but you've still got the same problem if you need to call older printf-style functions.
williamvds··on SQLite is 35% Faster Than The Filesystem (2017)
Most people don't buy Windows - it just comes with their computer, thanks to Microsoft's deals with OEMs.

Kids get accustomed to Windows and Microsoft Office in schools thanks to Microsoft's lobbying, so when they grow up they keep using Windows and pay for Office.

Everyone uses Windows and Microsoft Office, so most companies and organizations have to pay for licenses for each of their employees.

People know Windows, so they develop on Windows, so they get locked into yet more Microsoft products and libraries and have to run Windows on servers. That's yet more licenses for a Windows and for Visual Studio.

Their business strategy would almost be impressive if it weren't terrifyingly harmful.

williamvds··on How to handle secrets on the command line
Dealing with secrets on a Linux desktop is quite a mess right now. E.g. for my SSH and GPG keys I use some concoction of gnome-keyring and gpg-agent, and I must admit I don't really understand how it works. Himitsu[0] is an interesting approach to a secrets manager. It apparently uses an "agent" to do authentication/whatever and passes on the resource to the application that requested it, meaning applications don't have to touch the secrets themselves.

[0] https://git.sr.ht/~sircmpwn/himitsu

williamvds··on Microsoft duplicates data from Firefox without asking
Anecdotal data point: I live in the UK and I got this Edge advert when I updated my Windows VM a few days ago. I imagine Microsoft are hoping these tactics will gain them more permanent users (i.e. those who don't know any better) before European regulators belatedly catch up to them.
williamvds··on Autocomplete as an Interface (2015)
For a better autocomplete experience in Bash (and other programs that use the readline library) I can recommend that you put some of the following in ~/.inputrc:

    set editing-mode vi # if you're a fan of VI-style editors
    set visible-stats on
    set colored-stats on
    set show-all-if-ambiguous on
    set completion-ignore-case on
    set colored-completion-prefix on
    set completion-prefix-display-length 1
    set menu-complete-display-prefix on
    tab: menu-complete
    "\e\t": menu-complete-backward
    "\e[Z": menu-complete-backward
williamvds··on LineageOS Android Distribution
Had a similar issue with GPS on LineageOS 16. Setting the GPS mode to 'Device only' fixed it for me. My guess is the other settings have a hidden dependency on Google Play Services, causing GPS to silently stop working if Play services isn't available.
williamvds··on Designing the Facebook Company Brand
Most marketing material like this makes my head start spinning after only a minute or so. I can only imagine what extended periods of _thinking_ in marketing/PR-speak can do to someone
← PreviousPage 3 of 3