5 comments

  • CJefferson3 hours ago
    Wow, that might be the worst name for a project I’ve ever seen. I think every programmer who sees this is going to assume it’s a Python thing.<p>With regards the library itself —- I think it’s generally known the c++ standard library is a poorly designed mess in places but if you make an entirely new one you lose all the software already written, at which point why use C++ nowadays?
    • smokel3 hours ago
      It is a Python thing, in the sense that it is Python-inspired:<p><i>&gt; design-wise copy the Python standard library&#x27;s APIs whenever possible</i> [1]<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;jpakkane&#x2F;pystd" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;jpakkane&#x2F;pystd</a>
      • asalahli2 hours ago
        This is giving the same vibe as Windows Subsystem for Linux[0] - it kinda makes sense once somebody explains it, but is confusing as hell when you first see it<p>0. <a href="https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;bashonubuntuonwindows&#x2F;comments&#x2F;t952ar&#x2F;comment&#x2F;i08wzec&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;bashonubuntuonwindows&#x2F;comments&#x2F;t952...</a>
        • nok22kon2 hours ago
          Just like Windows storing 64-bit binaries in System32 dir and 32-bit binaries in SysWOW64 dir kind of makes sense (if you are insane)
          • JdeBP1 hour ago
            Also: You boot from the &#x27;system&#x27; volume, and the operating system is stored on the &#x27;boot&#x27; volume. (-:<p>* <a href="https:&#x2F;&#x2F;jdebp.uk&#x2F;FGA&#x2F;boot-and-system-volumes.html" rel="nofollow">https:&#x2F;&#x2F;jdebp.uk&#x2F;FGA&#x2F;boot-and-system-volumes.html</a><p>&#x27;Windows subsystem for&#x27; actually has a similar sort of logic behind it.<p>* <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=11417059">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=11417059</a><p>Although Microsoft then spoiled that explanation a couple of years later by switching to a virtual machine system instead of the NT kernel emulating the not-present Linux kernel.
      • IshKebab1 hour ago
        That is a bizarre principle. The Python standard library APIs are mediocre at best.<p>Surely copy the Rust APIs? Or maybe Go?
    • integricho3 hours ago
      Agreed, I thought this is a wrapper for STL under Python, what does the py prefix stand for here actually?<p>As for the why c++ at all, as long as one falls into the &quot;don&#x27;t care&quot; category, it works fine.. lately I found myself I rather build my apps in C with NODEFAULTLIB (under Windows at least), and creating my own size-optimized standard library which on Windows wraps the Win32 API wherever possible. The size savings are incredible, my executable is in the ~500KB range, ultra small and ultra fast. This is unattainable with normal modern C++.
      • pjmlp2 hours ago
        I instead, use VC++ latest with C++23 <i>import std</i>.<p>As for the size requirements, and having Windows experience all the way back to Windows 3.0, you can do exactly the same tricks with C++.
        • integricho1 hour ago
          Have you checked what dll dependencies you get if you build such an app? And have you actually tried running such an executable on win9x?
          • pjmlp1 hour ago
            If you use only Win32 APIs from C++ just like since Petzold books, the dlls are already there, there is also static linking for other stuff.<p>Win 9x is a dead OS, why would I bother with that outside retro computing?
            • integricho1 hour ago
              Understood, yes, but I described my reasons in my reply to another comment already. Your proposed solution is not equivalent to what I am doing, it cannot work on all the systems I support, and would never be as dependency free.
              • pjmlp1 hour ago
                I fail to see why, as I have been doing C++ on Windows since Windows 3.0.<p>I only don&#x27;t consider legacy Windows platforms something to care about, and put the required effort into making something like that happen.
                • integricho46 minutes ago
                  Even trivial stuff causes the linking to vcruntime, this is an extra dll dependency that I don&#x27;t tolerate, no msvcrt, no vcruntime, nothing except core Win32 dlls are allowed on the platform. Static linking can relieve some of this pain, but that bloats the binary. C++ simply does not allow the same level of minimalism that can be achieved by C, and for many these are unimportant details, for me they are deal breakers and this is a core pillar of my architecture.
      • dsab3 hours ago
        Out of curiosity what are your projects written in C for Windows? GUI apps?
        • integricho3 hours ago
          Yes, I am building GUI apps. This &quot;standard library&quot; of mine is built from the ground up in a cross platform manner, such that it compiles on Windows wrapping Win32, with Windows 95 being the CI machine, making sure it works on the whole Windows family upwards, and it wraps POSIX under Linux&#x2F;MacOS&#x2F;any POSIX system. The goal being to reuse the available shared library dependencies that are always present on these platforms anyway, giving me these ultra small binaries.
          • nok22kon2 hours ago
            why support Win9x? actual users? as a fun thing to do?
            • integricho1 hour ago
              For the last couple of years I got into retro computing, realized how much more I enjoyed the 9x era Windows systems compared to anything that came later, and made it a personal goal that if I build anything, it will have to work on Windows 95 as well. I realize the actual number of 9x users would be really small, but they still exist, e.g. seeing the vogons community, they are still using lots of such apps and would value support.
  • pjmlp2 hours ago
    &gt; C++ is actually very fast to compile, the slowdowns come mostly from the way the standard library is implemented.<p>Only if using classical headers, std as module is already a reality on VC++.
    • nok22kon2 hours ago
      wasn&#x27;t there a lot of talk that modules are still not really working, in practice I mean?
      • pjmlp1 hour ago
        Depends on where you are.<p>VC++ and clang latest with MSBuild or CMake&#x2F;ninja are there, minus some bugs or code completion misbehaving (but bearable).<p>GCC 16 is mostly ok now, also with CMake&#x2F;ninja.<p>All my hobby coding in C++ makes use of modules, at work it is a different matter, where libraries to be consumed by Java&#x2F;.NET&#x2F;nodejs, are still using C++17 as baseline.<p>You can easily check, <a href="https:&#x2F;&#x2F;github.com&#x2F;pjmlp&#x2F;RaytracingWeekend-CPP" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;pjmlp&#x2F;RaytracingWeekend-CPP</a><p>Note the CMake version was tested initially with clang 17, and we&#x27;re already on clang 22, so some of those comments are irrelevant nowadays, I haven&#x27;t bothered to update the project.<p>Naturally if you cannot be on latest compiler releases, or suffer from CMake phobia, the support isn&#x27;t there.
  • JdeBP1 hour ago
    Given what is discussed in the commentary to the post, I wonder whether the author would be amenable to some Doxygen.
  • Asooka40 minutes ago
    Would be helpful to show how this compares to other C++ std replacements, e.g. Abseil and Folly.
  • squirrellous2 hours ago
    Love to see someone implementing pathlib in c++. It is what stdfs could have been.