Better HN
topnewbestaskshowjobs
Log inSign up

oguz-ismail

-8 karma · joined Jun 17, 2024 (2y ago) · 327 submissions

Submissions

comment 1y ago · link · parent

> rust is widely used by a lot of people

it's used for rewriting CLI utilities with more color by five or so people

comment 1y ago · link · parent

> How is anyone still arguing for C for new projects?

It just works

comment 1y ago · link · parent

    find . -name '.*?' -prune -o -name '*.foo' -exec grep bar /dev/null {} +
This is the POSIX way. You'd probably put it in a function in .bashrc

comment 1y ago · link · parent

What about them?

comment 1y ago · link · parent

> These are subsets of their respective languages, but

Pretty much every language has such a subset. Nothing new then, sigh...

comment 1y ago · link · parent

Nor is any other dime-a-dozen LLVM frontend with basically the same bullshit syntax. What is your point?

comment 1y ago · link · parent

> Its that there are languages with additional features which make it easier to have a high confidence. If you can remove entire classes of bugs automatically, why not do so?

Which languages remove which classes of bugs entirely? This vagueness is killing me

comment 1y ago · link · parent

> learn it

Waste of time. Have some "AI" write it for you

comment 1y ago · link · parent

Any big projects that doesn't compile without C23 support?

comment 1y ago · link · parent

> 24.04 LTS Beta

It's almost 2026. Yeesh

comment 1y ago · link · parent

> I’d have liked to see some benchmarking of the new core utils against the old,

Are they compatible enough yet? Last time I checked uutils wasn't honoring user locales at all.

comment 1y ago · link · parent

How is ssize_t any better? It's not part of standard C and is only guaranteed to be capable of holding values between -1 and SSIZE_MAX (minimum 32767, no relation to SIZE_MAX).

comment 1y ago · link · parent

It's more than 400 lines

comment 1y ago · link · parent

r->depth would have been initialized to zero here https://github.com/rxi/sj.h/blob/5cb5df45c8c37fd8c2322026a11...

comment 1y ago · link · parent

    diff --git a/sj.h b/sj.h
    index 60bea9e..25f6438 100644
    --- a/sj.h
    +++ b/sj.h
    @@ -85,6 +85,7 @@ top:
             return res;
     
         case '{': case '[':
    +        if (r->depth > 999) { r->error = "can't go deeper"; goto top; }
             res.type = (*r->cur == '{') ? SJ_OBJECT : SJ_ARRAY;
             res.depth = ++r->depth;
             r->cur++;
There, fixed it

comment 1y ago · link · parent

Why? Everything else works fine

comment 1y ago · link · parent

    $ ./murex-linux-arm64
    Loading profile `.murex_preload`
    SIGSYS: bad system call
    PC=0x18fd0 m=8 sigcode=1
    
    goroutine 498 gp=0x4000283340 m=8 mp=0x4000100808 [syscall]:
    syscall.Syscall6(0x1b7, 0xffffffffffffff9c, 0x40000227e0, 0x1, 0x200, 0x0, 0x0)
            /opt/hostedtoolcache/go/1.24.6/x64/src/syscall/syscall_linux.go:95 +0x2c fp=0x40001119c0 sp=0x4000111960 pc=0xa067c
    syscall.faccessat2(0xffffffffffffff9c, {0x4000359fb0?, 0x4000022780?}, 0x1, 0x200)
            /opt/hostedtoolcache/go/1.24.6/x64/src/syscall/zsyscall_linux_arm64.go:33 +0x84 fp=0x4000111a20 sp=0x40001119c0 pc=0x9df74
    syscall.Faccessat(0xffffffffffffff9c, {0x4000359fb0, 0x27}, 0x1, 0x200)
            /opt/hostedtoolcache/go/1.24.6/x64/src/syscall/syscall_linux.go:171 +0x3c fp=0x4000111b00 sp=0x4000111a20 pc=0x9c9ec
    internal/syscall/unix.Eaccess(...)
    ...
I'm tired boss

comment 1y ago · link · parent

https://en.wikipedia.org/wiki/De_facto_standard

comment 1y ago · link · parent

It's the de facto standard. No one knows how to use other flavors of tools like date, find, grep, sed etc.

comment 1y ago · link · parent

> I've been working on something similar...

but this is not a shell script...

12345
11