Hacker Newsnew | past | comments | ask | show | jobs | submit | metaltyphoon's commentslogin

Why are you just pasting LLM answers :(? I see this constantly in Slack DMs to every day from work. It hurts

this is not llm writing. there's no need to startle at the sight of an em-dash

This is genuinely how I write :'(

It is probably because I read tons and tons of LLM output.


It's ok, it is slightly llm-like but not in the worst way, like it was edited after. You aren't Claude at least.

>You aren't Claude at least.

I absorbed so many different models at this point :)

Thank you for the kind words.


C# solves this so elegantly

   string text = """
      This is a long comment
      But I can split it
      And keep my indentation.
      """;

I believe the prefixed literals are a direct response to this style of multiline string. The style you showed is pretty common in a programming languages, but language implementers are faces with a tradeoff:

- Keep the initial indentation for each line in the string literal; or

- Track the indentation level and attempt to remove the whitespace for each line.

For a lot of strings, extra whitespace doesn't matter (eg. SQL), but when you don't want it, you end up removing the indentation in the string literal, and having a string like this:

    fn f() {
        text = "This is a decent way to format strings,
    but surely it could be a little nicer indentation-wise,
    right?";
        print(text);
    }
The prefixed lines have the disadvantage of being a pain to use if your editor doesn't have nice multi-line editing like Vim or Sublime. But I think it's a nice option when it's available.

Very aggressive. "Will you $FAVORITE_LANG people ever shut up?"


10… it is 10 now


Meanwhile using it via GCP Vertex it was down terribly for 2 days last week


Well, printf flushes when \n is encountered. Does zig have something similar?


No, printf does not flush when \n is encountered, unless you specify it with setvbuf(stdout, NULL, _IOLBF, 0);

And data files don't generally end with a newline.

POSIX buffers aren't generally flushed until fflush or fclose is called (or when the buffer is full). fclose is automatically called on exit(), which is why explicit flushing isn't usually needed. Note that this requires stdio to maintain a global list of open files, which is something that the Zig stdlib doesn't do for numerous good reasons.


> No, printf does not flush when \n is encountered, unless you specify it with setvbuf(stdout, NULL, _IOLBF, 0);

If stdout is connected to a terminal, it is already line buffered and one doesn’t need to setvbuf at all


Not relevant.


I think when people mention generics, they don’t mean builtins from the language but a language construct for generics.


C# was meant to have generics in day one, but it didn’t make the cut and it was introduced on the next version (2.0)


Mark? AwareDigital 2013?


Hey drop me an email


Funny enough, in their both latest versions. C# AOT has a smaller runtime than Go one


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: