Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
oguz-ismail
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
61.
▲
by
oguz-ismail
1y ago
system() involves fork()ing, setting up signal handlers, exec()ing and wait()ing. You won't be replacing it with exec, most of the time you'll be reimplementing it for absolutely no reason.
62.
▲
by
oguz-ismail
1y ago
> subprocess.run(["bash", Not the same thing, this is vulnerable to $PATH interception. You can hardcode the path to bash to avoid that but there's no guarantee that it'll always be there. system() on the other hand i
63.
▲
by
oguz-ismail
1y ago
Or I can just use system() because it's there and not going anywhere
64.
▲
by
oguz-ismail
1y ago
Because I don't want to implement a shell???
65.
▲
by
oguz-ismail
1y ago
>Still, the system() function is a mistake. Use posix_spawn(). They are entirely different interfaces though. If you'd implemented system() using posix_spawn() it'd be just as bad as system()
66.
▲
by
oguz-ismail
1y ago
>I would assume pedo stuff is not really there Search for "lolicon"
67.
▲
by
oguz-ismail
1y ago
>Reading the ffmpeg twitter account is enough to turn me off using ffmpeg. What's the alternative?
68.
▲
by
oguz-ismail
1y ago
works on my machine
69.
▲
by
oguz-ismail
1y ago
>if (n + 1 < n) No one does this
70.
▲
by
oguz-ismail
1y ago
What language is that? Is it available everywhere (everywhere) C is?
71.
▲
by
oguz-ismail
1y ago
>professional study material What would that be for Spanish? I couldn't even find a decent dictionary app
72.
▲
by
oguz-ismail
2y ago
isn't it translated to microcode before being executed?
73.
▲
by
oguz-ismail
2y ago
not since they binned 2.7
74.
▲
by
oguz-ismail
2y ago
>whitespace is significant, like in Python hard pass
75.
▲
by
oguz-ismail
2y ago
>usually unnoticeable quality degregation Dunno I think it'd be too messy
76.
▲
by
oguz-ismail
2y ago
>Alpha channels in a lossy image? Why? >Animated lossy image? It's called a video
77.
▲
by
oguz-ismail
2y ago
I thought I was gonna see an error because the stat'd file and the opened one didn't match. How disappointing
78.
▲
by
oguz-ismail
2y ago
> if you were to try to "exploit" it the only thing that would happen is you get a different error message Can't reproduce this. If I do sudo strace -e inject=stat:delay_exit=30s:when=2 ./coreutils more foo o
79.
▲
by
oguz-ismail
2y ago
Good news for their huge userbase (3 people around the globe)
80.
▲
by
oguz-ismail
2y ago
>busybox Apples vs. oranges. Busybox is a suite of minimal tools for low-resource systems, lack of QoL features you wouldn't need in such an environment is its selling point. Besides you won't see anyone claiming individual bus
81.
▲
by
oguz-ismail
2y ago
> You can set an environment variable to control the encoding Yes, that's what LC_ALL is. Every other tool understands it except ripgrep. Even if you parse it by hand, there's no guarantee that ripgrep will support the encoding
82.
▲
by
oguz-ismail
2y ago
> you can disable Unicode mode in ripgrep And everything becomes a byte, that's not always what you want $ export LC_ALL=tr_TR.ISO-8859-9 $ echo $'O\xD0UZ' | grep -E '^[[:upper:]]{4}$' O�UZ >
83.
▲
by
oguz-ismail
2y ago
It is. Consider foo | grep -E '^.{4}$' | bar If foo prints $'O\u011Fuz' and LC_ALL is set to a valid UTF-8 locale, bar will receive what foo printed. If foo prints $'O\xF0uz' and LC_ALL is assigned a v
84.
▲
by
oguz-ismail
2y ago
> when you want to start providing features like case-insensitivity fd does that for English only. See the III/iii case in my comment; iii capitalizes to İİİ in Turkish, there's no way to have fd respect that.
85.
▲
by
oguz-ismail
2y ago
fd is assuming the argument to -e is valid UTF-8 while filenames can contain any byte but NUL and /
86.
▲
by
oguz-ismail
2y ago
$ touch $'a.\xFF' $ find -name $'*.\xFF' ./a.? $ ./fd -e $'\xFF' error: invalid UTF-8 was detected in one or more arguments Usage: fd [OPTIONS] [pattern] [path]... For
87.
▲
by
oguz-ismail
2y ago
> I'd be curious how the performance compares to this Rust jq clone Every once in a while I test jaq against jq and gojq with my jq solution to AoC 2022 day 13 https://gist.github.com/oguz-ismail/8d0957dfeecc4f8
88.
▲
by
oguz-ismail
2y ago
> I don't see why opening for readonly has to. If it didn't you'd have no way of telling if there's anyone at the write end of the pipe. Isn't it obvious?
89.
▲
by
oguz-ismail
2y ago
Yeah the segfault doesn't happen on other OSes, I believe it's an OpenBSD thing
90.
▲
by
oguz-ismail
2y ago
Without them it'll segfault on QEMU, IIRC OpenBSD libc uses them invariably as well. I don't know how it fares on real hardware
More ›