HNHacker News
TopNewBestAskShowJobs

38

200 karma · joined July 12, 2023

submissionscomments
38··on Curl-Impersonate
that's exactly why I stopped using C/C++. building is many times a nightmare, and the language teams seems to have no interest in improving the situation
38··on Ghostty 1.0
For the 10th time WSL is not windows, it's a Linux emulator.
38··on Introducing S2
Yep. Just tack "serverless" onto something that already exists and charge for it
38··on A liar who always lies says "All my hats are green."
You aren't reading the same article. It's obviously ambiguous
38··on Himalaya: CLI to Manage Emails
last release 2017, good game. also only works on Windows with Linux emulator.
38··on I algorithmically donated $5000 to Open Source
5000 is not that much anymore, especially in the US. would have been better to split into $1000 chunks instead of $200
38··on Show HN: Banan-OS, an Unix-like operating system written from scratch
oh fun, a guessing game :|
38··on Why Golang slices still surprise me – Blog – build-your-own.org
> The worst example is pointers since they're used to represent both references and optional values.

using a pointer as an optional value is an anti-pattern. correct idiom is to return a tuple:

    type positive struct{}
    
    func new_positive(i int) (*positive, bool) {
       if i >= 0 {
          return positive{}, true
       }
       return nil, false
    }
38··on Looking for a Job Is Tough
server is extremely slow
38··on Backdoor attempt on Exolabs GitHub repo through an innocent looking PR
banned

https://github.com/evildojo666

38··on A Golang pipeline abomination
The problem is 100% ffmpeg, Go has nothing to do with it other than it's being used as a better shell script. Also some errors are checked and not others, and a large amount of files are opened and never closed
38··on Go library for in-process vector search and embeddings with llama.cpp
Is this a joke? Go has built in support for importing 3rd party code
38··on Go library for in-process vector search and embeddings with llama.cpp
> git submodule update --init --recursive

nope. this looks cool, but Git submodules are cursed

38··on Amazon Says It Has a First Amendment Right to Union Bust
why is exactly why corporations should not be "people", to prevent this idiocy.
38··on Self-Documenting Code
This isn't about Go. This is about a language construct (&& and ||) that I would argue is terrible and should never be used. Its mainly just sugar, and in my experience code heavy on these is harder to read and write. Couple that with truthiness and it's even worse.
38··on Self-Documenting Code
just because a footgun exists, doesn't mean you should use it
38··on Self-Documenting Code
I would go further to say that syntax should never be used. for example with Go:

> cheapFunction(...) || expensiveFunction(...)

is not valid unless both functions return bool

> car = car || "bmw"

is not valid at all, because both types would need to be bool

> funcA(...) && funcB_WhichMightBreakWithoutFuncA(...)

not valid unless functions return bool. I think Go smartly realized this syntax is just sugar that causes more problems than it solves.

38··on Show HN: Agent.exe, a cross-platform app to let 3.5 Sonnet control your machine
this is such a hilariously bad idea, its like knowingly installing malware on your computer - malware that has access to your bank account. please god, any sane person reading this do not install this, you've been warned.
38··on Steve's Jujutsu Tutorial
OK but again thats awful, because @ IS A COMMIT, so you are only a "git push" away from accidentally pushing arbitrary garbage instead of proper changes
38··on Steve's Jujutsu Tutorial
OK but again thats awful, because @ IS A COMMIT, so you are only a "git push" away from accidentally pushing arbitrary garbage instead of proper changes
38··on Steve's Jujutsu Tutorial
Jujutsu is terrible in my opinion. people hate the index, but I think they just dont get it. to me a commit is something that is ready to push, and the index is for stuff that is done but not ready to push. just because I wrote one line that I am happy with, doesn't mean I am ready to commit and push that. I prefer to add stuff thats done, then when enough is done I can commit and push. if you remove the index it makes it too easy to push half done stuff
38··on C++ proposal: There are exactly 8 bits in a byte
the fact that this isn't already done after all these years is one of the reasons why I no longer use C/C++. it takes years and years to get anything done, even the tiniest, most obvious drama free changes. contrast with Go, which has had this since version 1, in 2012:

https://pkg.go.dev/builtin@go1#byte

38··on Spotify Will Keep Remote Working – EDMTunes
wow you sound like a great boss :|
38··on Running WolfSSL and Curl on Windows 2000
a basic GET request doesn't mean I am smart, but you go ahead
38··on Running WolfSSL and Curl on Windows 2000
and this is exactly why I dont use C anymore. why go through the trouble of this blog post, when you can just use a modern language? HTTPS is a solved problem. here is a Go program, 15 lines:

    package main
    
    import (
       "net/http"
       "os"
    )
    
    func main() {
       resp, err := http.Get("https://example.com")
       if err != nil {
          panic(err)
       }
       defer resp.Body.Close()
       resp.Write(os.Stdout)
    }
no messing with cURL, no messing with picking out a TLS module.
38··on Mitmproxy 11: Full HTTP/3 Support
uh:

https://github.com/mitmproxy/mitmproxy/issues/4170

38··on Evolving GitHub Issues
if GitHub really wants to fix issues, fix the god damn pagination. the current system is basically:

    comment
    comment
    [bunch of hidden comments]
    comment
    comment
this is not better, at all. to get all comments, you have to constantly click "more" until all are loaded, IN A SINGLE page. then if you accidentally refresh or navigate away from the page, boom you have to redo the entire process.
38··on I Want Process-Aware Types
> By default, you’re one fmt.(Sp|P)rintf("%v\n", session) away from including a user’s password hash in your logs, writing it to a file, or returning it in a server response.

nope. just use a custom String method:

    func (UserSession) String() string {
       return "hello world"
    }
or a custom type:

    type UserSession struct {
       Username string
       pwHash password
    }
    
    type password string
    
    func (password) String() string {
       return "[redact]"
    }
38··on The perils of transition to 64-bit time_t
your comment has the tone of this being an elegant solution, but it reads to me like an awful hack. typeless macros are a nightmare I never want to deal with again.
38··on Lesser known tricks, quirks and features of C
> Github by itself is not enough; there are orders of magnitude more code outside of it and hence your assumption is wrong. Also most C/C++ folks prefer to keep code local (proprietary and personal reasons) and hence are not sampled.

"you're wrong man, C totally has a bunch of code being used thats private, I swear". you could say that about every single other language. only thing that matter is what can be measured. C is dead man, you are just in denial. its an old crap language that hasn't been relevant in at least a decade. if you need some evidence, just look to the fact that after decades it still doesn't have a package manager, so many people laughably just vendor code when working with C projects.

← PreviousPage 3 of 23Next →