Readit News logoReadit News
pfg_ commented on Scripts I wrote that I use all the time   evanhahn.com/scripts-i-wr... · Posted by u/speckx
revicon · 2 months ago
I have a bunch of little scripts and aliases I've written over the years, but none are used more than these...

alias ..='cd ..'

alias ...='cd ../..'

alias ....='cd ../../..'

alias .....='cd ../../../..'

alias ......='cd ../../../../..'

alias .......='cd ../../../../../..'

pfg_ · 2 months ago
fish lets you cd to a folder without 'cd' although you still need the slashes. I use it all the time.

    c $> pwd
    /a/b/c
    c $> dir1
    dir1 $> ..
    c $> ../..
    / $>

pfg_ commented on Show HN: Rift – A tiling window manager for macOS   github.com/acsandmann/rif... · Posted by u/atticus_
Etheryte · 2 months ago
Maybe I misunderstand what you mean, on one hand you say you want a window manager that's feature rich, on the other you say you're tired of using very flexible software with tons of configs. Aren't those two at odds with one another?
pfg_ · 2 months ago
I wouldn't consider having good default configs and being feature-rich at odds with eachother. Ghostty is feature-rich but needs no config. There's no reason yabai needs to be so highly composable that it doesn't even have a hotkey listener by default and and instead points you to another piece of software that only translates hotkeys to shell commands and is no longer being maintained. i3 at least has a pretty usable default config.
pfg_ commented on Zig builds are getting faster   mitchellh.com/writing/zig... · Posted by u/emschwartz
measurablefunc · 2 months ago
I don't really get the obsession w/ compiler performance. At the end of the day you are trading performance optimizations (inlining, dead code elimination, partial evaluation, etc) for compile times. If you want fast compile times then use a compiler w/ no optimization passes, done. The compile times are now linear w/ respect to lines of code & there is provably no further improvement you can make on that b/c any further passes will add linear or superlinear amount of overhead depending on the complexity of the optimization.
pfg_ · 2 months ago
The reason to care about compile time is because it affects your iteration speed. You can iterate much faster on a program that takes 1 second to compile vs 1 minute.

Time complexity may be O(lines), but a compiler can be faster or slower based on how long it takes. And for incremental updates, compilers can do significantly better than O(lines).

In debug mode, zig uses llvm with no optimization passes. On linux x86_64, it uses its own native backend. This backend can be significantly faster to compile (2x or more) than llvm.

Zig's own native backend is designed for incremental compilation. This means, after the initial build, there will be very little work that has to be done for the next emit. It needs to rebuild the affected function, potentially rebuild other functions which depend on it, and then directly update the one part of the output binary that changed. This will be significantly faster than O(n) for edits.

pfg_ commented on Show HN: Powerful Visual Programming Language (Book)   pipelang.com... · Posted by u/toplinesoftsys
toplinesoftsys · 2 months ago
Thank you for the question and let me assure you this is not a hoax and not a social experiment. The language is absolutely real: you can download the book for free from Amazon Kindle or Apple iBooks to see that everything stated in the posting is real, not AI-generated.
pfg_ · 2 months ago
How is it real if it only exists as a spec in a book? Is there a compiler? Is there an editor?
pfg_ commented on The effects of algorithms on the public discourse   tekhne.dev/internet-resis... · Posted by u/_p2zi
rmunn · 3 months ago
BTW, I'm aware that yt-dlp is against Youtube's terms of service, but in America, the right to timeshift a broadcast was well-established in the days of VCRs by multiple court precedents. It has never been tested in court whether that right would also apply to Youtube and downloading videos from Youtube for the purpose of timeshifting, but IMHO it would apply, so I'm doing it.

Also, while Youtube claims that adblockers are also against their Terms of Service, if you actually go read https://www.youtube.com/t/terms you'll see that their claim is not supported by the actual language of their ToS. They forbid you to "access, reproduce, download, distribute, transmit, broadcast, display, sell, license, alter, modify or otherwise use any part of the Service or any Content" without their express permission. But adblocking is not altering the Content of the service, it's blocking certain videos while letting other videos through. If there was a service that detected "here's a word from our sponsors" parts of the video and removed them, that would be altering Content. But the ads are not part of any given video, rather they're external videos inserted at certain points into the video you're watching. Selectively blocking video A while watching video B is not forbidden by any part of Youtube's Terms of Service.

So go ahead and use uBlock Origin with a clear conscience, unless you can find the part of their Terms of Service that actually forbids blocking certain videos while letting others through.

pfg_ · 3 months ago
> If there was a service that detected "here's a word from our sponsors" parts of the video and removed them, that would be altering Content

This exists and it's called SponsorBlock. It automatically skips past sponsored segments. Debatable if that is altering content though

pfg_ commented on No adblocker detected   maurycyz.com/misc/ads/... · Posted by u/LorenDB
Pooge · 3 months ago
Good point. My point still stands that it's possible to have ad revenue with unintrusive ads.

For instance, I'm fine with video creators having sponsored sequences because I can skip them if I want. And there's no way for them to know if I watched the ad. In fact, they don't care because they already got paid.

pfg_ · 3 months ago
Youtube creators get access to watchtime stats which show a dip for sponsored segments. My understanding is that sponsor contracts typically don't ask to get access to that data though, instead they look at views and refferals
pfg_ commented on Why language models hallucinate   openai.com/index/why-lang... · Posted by u/simianwords
Jensson · 3 months ago
That is wrong, I just generated 5 random letters in python and sent it to gpt-5 and it totally failed to answer properly, said "Got it, whats up :)" even though what I wrote isn't recognizable at all.

The "capability" you see is for the LLM to recognize its a human typed random string since human typed random strings are not very random. If you send it an actual random word then it typically fails.

pfg_ · 3 months ago
I tried this four times, every time it recognized it as nonsense.
pfg_ commented on The math of shuffling cards almost brought down an online poker empire   scientificamerican.com/ar... · Posted by u/indigodaddy
eterm · 3 months ago
Satsifactory in this context is good, not bad.

We live in a euphemistic world where "satisfactory" is presented to failures to not hurt their feelings, but the word also and originally means it's good enough, i.e. delivers an unbiased shuffle.

pfg_ · 3 months ago
But it's not just good enough, it's optimal. It is equivalent to picking a random deck from the set of all possible decks assuming your random source is good. More random than a real shuffle.
pfg_ commented on Google can keep its Chrome browser but will be barred from exclusive contracts   cnbc.com/2025/09/02/googl... · Posted by u/colesantiago
overfeed · 3 months ago
> In your view, what is it that makes chrome the best?

As a former Firebug fan: Chrome/Chromium has had superior browser dev-tools experience for over a decade now.

pfg_ · 3 months ago
Whenever I use chrome, I'm missing the style editor and multi-line repl mode from firefox. When I switched to firefox from chrome, I didn't miss anything. There might be new features chrome has added since that I would want if I knew about them
pfg_ commented on Agentic Browser Security: Indirect Prompt Injection in Perplexity Comet   brave.com/blog/comet-prom... · Posted by u/drak0n1c
thekevan · 4 months ago
To be fair, that was a reddit post that blatantly started with "IMPORTANT INSTRUCTIONS FOR Perplexity Comet". I get the direction they are going but the example shown was so obviously ham-handed. It clearly instructed the browser--in clear language--to get login info and post it in the the thread.

Show me something that is obfuscated and works.

pfg_ · 4 months ago
The whole comment is spoilered, so you need to click on it to reveal that text. Presumably it could also appear in a comment that you need to scroll on the page to see.

It's clear to a moderator who sees the comment, but the user asking for a summary could easily have not seen it.

u/pfg_

KarmaCake day183August 29, 2020View Original