HNHacker News
TopNewBestAskShowJobs

plq

1,366 karma · joined April 2, 2010

github.com/plq ext-hn@burakarslan.com
submissionscomments
plq··on Distcc: A fast, free distributed C/C++ compiler
If you distribute preprocessed code, you need LAN speeds/latency for it to be faster than a local compilation. Otherwise, you need to have the exact same headers in addition to the exact same compiler installed everywhere. It MAY work otherwise, until it breaks in a subtle / obscure way one day and after tracking it down you will think maybe compilation doesn't take THAT long on a single machine :)

So all in all, I wouldn't say works outside of a well-controlled cluster on a LAN.

plq··on JMAP – a modern email open standard
> Every time I give out my email address, behind the scenes a single-source permission/token is created.

How would this work exactly? You send the token to the recipient's email address? Doesn't that become a chicken/egg problem because the recipient could very well have the same requirement?

plq··on A terminal case of Linux
> You write "cat filename" and you can free your mind and focus on the rest of the pipes. Without cat, you have to keep filename in your mind while you write the first command.

In bash (don't know about other shells) the < operator sets the stdin of the process to the given file.

    < filename.json jq
Here, data is read directly from the given file.

As for the | operator, the stdout of the left-hand process and the stdin of the right-hand process become a pipe:

    cat filename.json | jq
Here, data is read from file, copied to a pipe buffer, the other process is notified (in most cases, by being woken up) that there is incoming data and then it finally reads the data.

Not that any of this matters in today's world of pocket supercomputers but I just don't see how any of your points back up the useless use of cat. It's still useless :)

plq··on 20 Years of Gentoo
Arch is not bad but last I looked it didn't have what Portage calls "slotting" ie the ability to have multiple versions of the same package installed side-by-side. It's especially helpful when eg. you are upgrading postgres and need multiple versions operational for the cross-version dump/restore.

How would that work on arch?

plq··on 20 Years of Gentoo
Next time this happens, switch to git as synchronization method for the gentoo portage tree and checkout a tree that is, say, 3 months ahead of the last update date. Once that update is done, fast forward another 3 months and repeat until recent. It'll take significantly longer to update this way but it'll be relatively painless.
plq··on New C features in GCC 13
All quite reasonable additions to the language, kudos to the GCC team.

I'm /very/ sad to see the unprototyped functions to go though -- that was my favourite way to catch newbies off-guard! Oh well ...

As for those who like to spend their Friday afternoon feeling sad about C++isms creeping into C: You are very late! You should have done that when GCC implemented ``__attribute__((cleanup))`` years^Wdecades ago.

edit: https://gcc.gnu.org/legacy-ml/gcc/2003-05/msg00528.html

plq··on Shoot the arrow, then paint the target around it
Oh sure, do that. But don't forget that these kinds of articles are written by lucky people whose "targets" were of interest to others. Would you care if I told you I held a world record in the 98m sprint?

Embrace your weirdness, but unless you are lucky enough to have a weirdness that resonates with people, you are just an outcast.

Enjoy everything in moderation, including your qualities that may come off as unusual to others, whatever they may be.

You are probably an ordinary person. Chill out and just do your best.

plq··on KDE Plasma Widget for external monitor brightness adjustment
I never use pip for the system site-packages, that's the job of the distro package manager.

As for pip install --user, I sometimes nuke the local repo so wouldn't be a robust solution given my workflow.

plq··on KDE Plasma Widget for external monitor brightness adjustment
If your distro doesn't have a package for the backend of this plasmoid yet, it invokes the backend with[1]:

    python3 -m ddcci_plasmoid_backend
So you can probably get away with this:

    git clone https://github.com/davidhi7/ddcci-plasmoid \
        && cd $(python3 -c "import site; print(site.getsitepackages()[0])") \
        && ln -s $(cd -)/ddcci-plasmoid/backend/ddcci_plasmoid_backend .
[1]: https://github.com/davidhi7/ddcci-plasmoid/blob/3c002d9822ce...
plq··on No-cost access to the latest PDF standard: ISO 32000-2 (PDF 2.0)
So I'm supposed to have a PDF reader to implement a PDF reader? What's the bootstrapping strategy here? tsk.
plq··on Why MMAP in llama.cpp hides true memory usage
mmap() basically adds a new swap file that is only to be used for the contents of that specific file.

This means it does page eviction on memory pressure and also results in deduplication as mmap'd memory of the same file can be used by any process that has access to it.

If the data access is sequential in nature (or at least has some form of locality in function of time) it could end up using less memory indeed, even if the whole file ends up being read during the training process, because unused pages will be evicted by the OS to make room for needed ones.

What is interesting to me here is that it's such a marvel to these ML guys. It's a fundamental OS facility and looks like using mmap() instead of using read() on malloc()'d memory should have been the strategy here from the start.

plq··on Cyberabad cops nab man who stole personal info of 66.9 cr people in 24 states
So that's what he was wearing while waiting for the db dump to finish, I guess?

Man, tech reporters are killing me sometimes.

plq··on Godot 4.0 Released
And that's the exact joke I expected to find when I clicked on this post :)

Anyhoo, kudos to the team for shipping. Building a generic game engine for the global audience is a massive undertaking.

plq··on I Will Fucking Dropkick You If You Use That Spreadsheet
His "arguments" are at the "This Is Gatekeeping" paragraph. It boils down to "spreadsheets are too fragile to be the foundation of any business-critical data pipeline"
plq··on Lesser known tricks, quirks and features of C
In principle, they are not enabled by default because a C compiler must be able to compile standard C by default.

One practical reason I can think of is because not everyone compiles their own code.

You must most definitely look for and enable such flags as they become available in your own projects. (eg I was rooting for -Wlifetime but it did not land for various reasons)

But when you compile other people's code, your breaking your local build doesn't help anyone. Best you can do is to submit a bug report, which may or may not be ignored.

plq··on AMD CEO: The Next Challenge Is Energy Efficiency
This sounds like an exokernel design. What forces you to use the compiler that generates the trusted code to replace the MMU?
plq··on Making macOS Apps Uninstallable
Ah yes, of course. A "mental" typo from my part, I guess.
plq··on Making macOS Apps Uninstallable
> Also, "uninstallable" means "cannot be installed"

Nope. In writing, it's technically ambiguous -- it could mean both "can't be installed" or "can't be uninstalled" but to me it means "can't be uninstalled". In spoken language, it depends how you stress the first syllable and both could be used, I guess.

That's why if you want to denote the installability of something, you should use the nonambiguous installable-noninstallable pair and leave the word "uninstallable" for the "can't be uninstalled" meaning. AFAICT, whether you should spell it as "non-installable" or "noninstallable" (note the hyphen) is up to you.

Again, in my personal experience, uninstallable definitely means 2 in [1]: "uninstall-able". Pretty sure I never saw that word used as "un-installable".

[1]: https://en.wiktionary.org/wiki/uninstallable

plq··on A Gentle Introduction to CRDTs
> decentralized != untrusted

You can only trust the nodes that you control. That's not what I'd call a decentralized system.

plq··on A Gentle Introduction to CRDTs
I'll try to explain with an example: If you have an object at position (x1,y1,z1), at some time t1, and you want to move this object to a different position so that at time t2, it's at position (x2,y2,z2), you must have t2>t1. If t2==t1 then (x1,y1,z1)==(x2,y2,z2).

So when time stops, everything else stops. It is tautological when you think about it, but I find that it's an easy way to explain why logical clocks work.

Am I wrong to reason this way?

plq··on Gentoo Linux 2022 Retrospective
Gentoo rocks. Installing Gentoo is a wonderful learning experience and it's the most flexible distro out there -- especially if you need to run a patched userland.

Not mentioned: Gentoo Prefix project is useful for managing a Gentoo installation that is at a path other than /. We use it for building our Linux development environment.

See [1] to give it a try. Warning! It will compile almost everything so it's going to take a bit of time!

[1]: https://wiki.gentoo.org/wiki/Project:Prefix/Bootstrap#Perfor...

plq··on A Gentle Introduction to CRDTs
Think of it this way: If we say that we perceive the world in 3D space and 1D time (x,y,z,t), the t dimension is special: You can't change x,y,z if you don't advance t. Inversely, if x,y,z is constant, t doesn't need to advance. That's why it's enough for the logical clocks to count the number of committed transactions.

This said, in a truly decentralized setting, where CRDTs make most sense, logical clocks are not useful as they are not not byzantine fault tolerant. You need merkle trees.

plq··on Flutter desktop isn’t there yet
Hey, first let me be clear that I think it's great that Google is developing Flutter in the open, publishes it under a permissive license while also trying to get along with other contributors.

However, it's not a community project, by any definition of community, because there is a power imbalance between Google and other contributors. Accepting patches or even allowing non-Google people to accept patches from anyone is not enough.

> There is a CLA, so that folk can attest that contributions are theirs, and that they're free to be used by others, and that everyone who uses Flutter can feel comfortable that there are no patent or IP rights reserved by contributors.

No, there is a CLA so that Google keeps the ability to relicense future Flutter releases however it seems fit.

Of course everybody owns their own contributions, git log clearly shows who owns what. BSD license already assures that they are free to be used by others, and if patents were a concern, AFAIK the Apache license would've been a better option (IANAL). You don't need a CLA for any of that.

Users and contributors are bound by the BSD license. Google however gets special treatment:

""" Grant of Copyright License. Subject to the terms and conditions of this Agreement, You hereby grant to Google and to recipients of software distributed by Google a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Your Contributions and such derivative works. """

I hope the power imbalance is clear this time?

Again, it's great that Google develops open source software under a permissive license. Mad respect. I'd happily sign the CLA were I to send code to Flutter. I'm also not saying that Google shouldn't have a CLA, I fully understand, and maybe I'd do the same (maybe not). But let's call it what it is.

> but the spirit that we work under is that the "Flutter team" is everyone who contributes code.

Sorry but you sound like that boomer SMB owner who keeps saying "we are a family".

plq··on Flutter desktop isn’t there yet
Is there a CLA? Do I have to waive ownership of my contributions for my code to be merged? If yes then it's not a community project. Domain ownership has little to do with it. Look at who owns github.com :)
plq··on Forthcoming OpenSSL Releases 3.0.8, 1.1.1T and 1.0.2zg
That's insightful, thanks. I contributed a script for building NSS on windows to vcpkg and even the build system in use (GYP, abandonware at this point) is technical debt in and of itself.
plq··on Forthcoming OpenSSL Releases 3.0.8, 1.1.1T and 1.0.2zg
While OpenSSL is among the building blocks of the Internet, I find NSS to be a higher quality library, mostly because it doesn't break API like OpenSSL does, but also because it's a more complete solution that comes with an OS abstraction layer (thanks to NSPR) a certificate storage component, and lots of other goodies. Not to mention the elephant in the room that is OpenSSL's abysmal track record, but that can change very fast for NSS as well so I don't think it's the biggest factor when comparing the two. At the end of the day, both are well-supported libraries.

The only area where OpenSSL wins hands down vs NSS is documentation, and by extension of its popularity, the easiness of googling a problem and finding its solution. As a comparison, I don't even know what the official NSS homepage is. But IME the source code of NSS is quite readable, so consider having another look at NSS if you need to deal with cryptography in your code.

Not a cryptographer, just a happy user, so YMMV.

plq··on Show HN: QuadSort, Esoteric Fast Sort
> someone actually _DOES_ it.

Sure, but my point stands: It still doesn't matter as a production platform :)

    hncat 34568832 | sed "s/runs production code on WSL/cares about WSL as a production platform/g" 
if you will.

edit: https://github.com/plq/hncat :)

plq··on Show HN: QuadSort, Esoteric Fast Sort
> WSL 2 gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)

Why not run the benchmarks in an environment that matters? Latest stable gcc is 12 and I wouldn't think anybody runs production code on WSL.

plq··on New Sony Walkman music player
It's an Android device. It has wifi. I really don't see how Sony could prevent its owner from using Spotify (or any other Android app for that matter) on it.
plq··on SGCL: Real-time garbage collector for C++
Well that'd work too :)

The adoption of a particular memory allocation strategy depends on a lot factors. This is C++ after all.

← PreviousPage 3 of 13Next →