home.social

#includes โ€” Public Fediverse posts

Live and recent posts from across the Fediverse tagged #includes, aggregated by home.social.

fetched live
  1. OK, I just saw a header file (.h) that #includes a C file (.c). What kind of horror show is this?

  2. @Ichinin True, it's kind of an evolution: bigger labels made it easier to write code, DLLs and #includes allowed for more robustness, now everything is NPM packages that are well defined.

    Now we're able to take whole concepts ("secure authentication") and just have something *write the code* in context...

  3. oooooh shiiit I think I'm about to write a streaming C-preprocessor to deal with the #includes in GROMACS top and itp files.[1]

    (Experimenting with deriving total system charge from a system's top file to make charge-neutral solvation trivial with bentopy-solvate. nbd.)

    [1]: manual.gromacs.org/documentati

  4. They made a few interesting decisions:

    1. Rather than installing every SDK on everyone's computer, they just send the compiler along with the sources to compile

    2. They use something that sounded like a regex search to find the #includes, and package all these headers up with the file to be compiled. This ended up not working very well because they're not actually running a full preprocessor, so they can't handle things like #ifdefs. (For comparison, distcc runs the preprocessor locally)

    2/3

  5. @econmaett.bsky.social #๐’พ๐“ƒ๐’ธ๐“๐“Š๐’น๐‘’๐“ˆ <๐’ธ๐“ˆ๐“‰๐’น๐‘’๐’ถ> ๐’ฌ๐“Š๐’พ๐“‰๐‘’ ๐“‚๐’ถ๐’พ๐“ƒ() { ๐“…๐“‡๐’พ๐“ƒ๐“‰๐‘’๐“‡("โ„‹๐‘’๐“๐“๐‘œ ๐’ฒ๐‘œ๐“‡๐“๐’น."); ๐“‡๐‘’๐“‰๐“Š๐“‡๐“ƒ 0; } But I believe you are wrong, mein Herr: github.com/JulianBohne/...

    github.com/JulianBohne/ge...

  6. Git ็š„ hasconfig:remote.*.url:

    ๅœจใ€ŒHow I configure my Git identities (benji.dog)ใ€้€™้‚Š็œ‹ๅˆฐ็š„ๆ–‡็ซ ๏ผšใ€ŒHow I configure my Git identitiesใ€ใ€‚

    ่ฃก้ขๅœจ่ฌ› Git ็š„่จญๅฎš๏ผŒไปฅๅพ€ๆˆ‘ๅ€‘็ฟ’ๆ…ฃไพๆ“š็’ฐๅขƒๆ”พๅˆฐไธๅŒ็›ฎ้Œ„่ฃก (ๅƒๆ˜ฏๅ…ฌๅธ็š„ repository ๆ”พๅˆฐ work/)๏ผŒๅ†ๅŠ ไธŠ includeIf ๅŽป้‡ๅฐไธๅŒ็›ฎ้Œ„็ตฆไธๅŒ็š„ๅ€ผ (ๅƒๆ˜ฏ email)๏ผŒ้€™ๅ€‹ๅŠŸ่ƒฝๆ˜ฏๅœจ 2017 ๅนดไบ”ๆœˆๅ‡บ็š„ Git 2.13 ๅผ•ๅ…ฅ็š„๏ผŒ็•ถๅˆ GitHub ไนŸๆœ‰้‡ๅฐ้€™ๅ€‹ๅŠŸ่ƒฝๅฏซไบ†ไธ€็ฏ‡ไป‹็ดน๏ผšใ€ŒGit 2

    blog.gslin.org/archives/2024/1

    #Computer #Murmuring #Network #Programming #Software #conditional #git #hasconfig #identity #includes #remote #url

  7. On the edge of thinking that #includes in C/C++, usings in C#, imports in Java and similar things in other languages should not compile if they are not ordered alphabetically.
    Standard library may stuff may be at the top, directories in #includes is another matter, but dammit, is it that damn hard to order things?

    #programming #rant #Cpp #CSharp #Java

  8. Alright first steps into creating a set of shareable #Makefile #includes, I'm already hating it and myself for going down the path:

  9. For anyone to follow along the kernel side (the compile fixes for the userspace stuff is just missing #includes and header definitions really, I'll publish those separately): github.com/Doridian/linux/tree

  10. when running out of design system metaphors, good old "partials" and server-side-#includes come to the rescue.

  11. I was just thinking that 4GiB is probably a reasonable compiler limit for a single source code file, but I think I will have to change my mind.

    Similarly I was thinking that 65k was probably a similarly good enough upper limit for number of #Includes in a single file, but...

  12. @lxsameer Module partitions solve recursion. You can't do that with mere modules.

    Module partitions solve partitioning. Mere modules introduce artificial barriers.

    Traditional #includes lump everything together, so you need other means to figure them apart. Now you've conflated logical partitioning with physical partitioning.

  13. @profoundlynerdy @PurpleJillybeans Makefiles for special-purpose projects like embedded systems or consoles are generally fine. Two pitfalls I see rather frequently are regarding header dependency generation (either including `$(wildcard *.d)` or not having a `%.h:;` dummy rule will cause it to break when removing .h files, even if you remove all its . The other is using `cmd $< > $@` and forgetting to remove the output file when it fails (it remains empty otherwise).

  14. @singe @WPalant can't make the source out, but #includes in the middle of actual code smells very bad to me.

  15. "In 2007, build engineers at Google instrumented the compilation of a major Google binary. The file contained about two thousand files that, if simply concatenated together, totaled 4.2 megabytes. By the time the #includes had been expanded, over 8 gigabytes were being delivered to the input of the compiler, a blow-up of 2000 bytes for every C++ source byte."
    go.dev/talks/2012/splash.artic

  16. Dear Friends of a Good Time, ๐ŸŽ‰
    As we may know many people, we may be 2.7 of them, could do with a
    #goodtime ... โœ”๏ธ
    As someone,
    #includes everyone, is here for a short #time, what #works #constructively for our well-being? For me, it is:
    -
    #Living #well and well #within my #means and #situation.
    - Be of good
    #cheer and #cheering
    -
    #Care for my #environment
    - Use less well rather than more wastefully
    -
    #Walk and #listen
    - Care about people,
    #animals, #art ... and more ...
    -
    #Laugh as much as you can โ€‹:ablobcatmaracasevil:โ€‹
    -
    #Change your #music, change your #mood ๐Ÿ’ฌ

  17. @Migueldeicaza #3 is the kind of thing I see a lot, along with obviously-missing header #includes. Itโ€™s often a header hygiene thing thatโ€™s good for the C++ code to clean up anyway, so while itโ€™s workโ€”I donโ€™t feel bad about it.

    For #2, is the problem that Clang is rejecting the #include within the class because the header isnโ€™t โ€œmodularโ€? If so, thereโ€™s an โ€œexclude headerโ€ directive in the module map that tells Clang to treat it like a textual include.

    For #1 Iโ€™ll have to ask around a bit.

    Thanks!

  18. Stephan is busy, so I'm on my private "๐Ÿž STL Bug Bash II" as he calls it.

    With
    * a simple fix in <chrono> ๐Ÿฅฒ
    * a hacky ๐Ÿ˜ฆ workaround in <chrono>
    * and a compatible (!) attachment in module 'std' of all the entities from the C++ standard library ๐Ÿ™„

    I can mix #includes and import std from the modularized ms-stl ๐ŸŽ‰๐Ÿš€โœจ

    Gradual adoption of a modularized #cpp20 or #cpp23 standard library is now possible as soon as said issues are fixed and publicly available!

  19. @thephd There is none (like with headers!). #includes and imports just 'nominate'. The connection between module names and their BMIs is done by 'module maps', e.g. generated by CMake after a module dependency scan.
    Macros go into *any* module TU only from the commandline. Header units (stay away from them!) leak macros, named modules don't.
    Please see my upcoming talk in Kongsberg.