Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Cyborg)
  • No Skin
Collapse
Brand Logo

CIRCLE WITH A DOT

  1. Home
  2. Uncategorized
  3. A r e y o u r e a d y t o h a v e s o m e f u n ?

A r e y o u r e a d y t o h a v e s o m e f u n ?

Scheduled Pinned Locked Moved Uncategorized
65 Posts 12 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • thephd@pony.socialT thephd@pony.social

    A r e y o u r e a d y t o h a v e s o m e f u n ?

    :3

    Link Preview Image
    monniauxd@social.sciences.reM This user is from outside of this forum
    monniauxd@social.sciences.reM This user is from outside of this forum
    monniauxd@social.sciences.re
    wrote last edited by
    #5

    @thephd I feel totally incompetent I cannot make head or tail of this.

    thephd@pony.socialT 1 Reply Last reply
    0
    • monniauxd@social.sciences.reM monniauxd@social.sciences.re

      @thephd I feel totally incompetent I cannot make head or tail of this.

      thephd@pony.socialT This user is from outside of this forum
      thephd@pony.socialT This user is from outside of this forum
      thephd@pony.social
      wrote last edited by
      #6

      @MonniauxD we are parsing Lua, including the "require" statement, at compile-time in C++. I can not only access a single file, but parse it and walk into other required/imported/included files, before the execution of the program ever begins.

      1 Reply Last reply
      0
      • thephd@pony.socialT thephd@pony.social

        "This is going to destroy my build system"

        Nope! It's able to determine everything that will be processed by the Phase 7 compile-time-computed strings by Phase 4, and presents all of that information through already-available means, meaning CMake/build2/meson/make/ninja/etc. can all understand the dependency chain here natively!

        Link Preview Image
        thephd@pony.socialT This user is from outside of this forum
        thephd@pony.socialT This user is from outside of this forum
        thephd@pony.social
        wrote last edited by
        #7

        Ultimately, this means we can process files -- recursively -- at compile-time, meaning that rather than embedded shaders with #​includes that can't be touched, we can process those includes and make true single blobs without extra build steps.

        compile-time python with imports is VERY possible.

        uecker@mastodon.socialU photex@icosahedron.websiteP erisceleste@tech.lgbtE 3 Replies Last reply
        0
        • thephd@pony.socialT thephd@pony.social

          Ultimately, this means we can process files -- recursively -- at compile-time, meaning that rather than embedded shaders with #​includes that can't be touched, we can process those includes and make true single blobs without extra build steps.

          compile-time python with imports is VERY possible.

          uecker@mastodon.socialU This user is from outside of this forum
          uecker@mastodon.socialU This user is from outside of this forum
          uecker@mastodon.social
          wrote last edited by
          #8

          @thephd Cool, but why?

          thephd@pony.socialT 1 Reply Last reply
          0
          • thephd@pony.socialT thephd@pony.social

            Ultimately, this means we can process files -- recursively -- at compile-time, meaning that rather than embedded shaders with #​includes that can't be touched, we can process those includes and make true single blobs without extra build steps.

            compile-time python with imports is VERY possible.

            photex@icosahedron.websiteP This user is from outside of this forum
            photex@icosahedron.websiteP This user is from outside of this forum
            photex@icosahedron.website
            wrote last edited by
            #9

            @thephd whoa.gif

            1 Reply Last reply
            0
            • uecker@mastodon.socialU uecker@mastodon.social

              @thephd Cool, but why?

              thephd@pony.socialT This user is from outside of this forum
              thephd@pony.socialT This user is from outside of this forum
              thephd@pony.social
              wrote last edited by
              #10

              @uecker C++ has capabilities that can make great use of this. A perfect example is using (Generative) reflection to generate, at compile-time, the perfect FFI that maps to Python, or Lua, or JavaScript, with all of the utility that comes from having it mapped perfectly to C(++) interfaces and fully type-checked while always being generated directly from said Lua or Python or JavaScript source code.

              This also applies to things like e.g. Rust and C++ interop, which has also been the topic of discussion and monetary investment. (Not that they're paying me; I wish they would, I could do a lot more for them than just std::embed.)

              C doesn't have the systems in place to do things like this, so in most cases they'd just have to rely on the usual techniques used today: code generators, hand-written parsers, fresh data files and description files used to drive code generation (like e.g. SWIG). Certainly not bad, but not nearly as "automated luxury FFI" as C++ can make it.

              uecker@mastodon.socialU 1 Reply Last reply
              0
              • thephd@pony.socialT thephd@pony.social

                @uecker C++ has capabilities that can make great use of this. A perfect example is using (Generative) reflection to generate, at compile-time, the perfect FFI that maps to Python, or Lua, or JavaScript, with all of the utility that comes from having it mapped perfectly to C(++) interfaces and fully type-checked while always being generated directly from said Lua or Python or JavaScript source code.

                This also applies to things like e.g. Rust and C++ interop, which has also been the topic of discussion and monetary investment. (Not that they're paying me; I wish they would, I could do a lot more for them than just std::embed.)

                C doesn't have the systems in place to do things like this, so in most cases they'd just have to rely on the usual techniques used today: code generators, hand-written parsers, fresh data files and description files used to drive code generation (like e.g. SWIG). Certainly not bad, but not nearly as "automated luxury FFI" as C++ can make it.

                uecker@mastodon.socialU This user is from outside of this forum
                uecker@mastodon.socialU This user is from outside of this forum
                uecker@mastodon.social
                wrote last edited by
                #11

                @thephd What I do not understand is why the extra build step is a problem.

                thephd@pony.socialT manx@mastodon.onlineM 2 Replies Last reply
                0
                • uecker@mastodon.socialU uecker@mastodon.social

                  @thephd What I do not understand is why the extra build step is a problem.

                  thephd@pony.socialT This user is from outside of this forum
                  thephd@pony.socialT This user is from outside of this forum
                  thephd@pony.social
                  wrote last edited by
                  #12

                  @uecker I don't think the extra build step is the problem. I think the ability to e.g. parse C++ or C code and generate the proper FFI to connect to other languages, or vice versa, is a tooling investment that isn't really a fully solved problem.

                  uecker@mastodon.socialU 1 Reply Last reply
                  0
                  • thephd@pony.socialT thephd@pony.social

                    @uecker I don't think the extra build step is the problem. I think the ability to e.g. parse C++ or C code and generate the proper FFI to connect to other languages, or vice versa, is a tooling investment that isn't really a fully solved problem.

                    uecker@mastodon.socialU This user is from outside of this forum
                    uecker@mastodon.socialU This user is from outside of this forum
                    uecker@mastodon.social
                    wrote last edited by
                    #13

                    @thephd Ok, but why does it need to be solved by compile-time interpretation and not simply be a tool one runs during built? To me, this seems to solve the problem at the wrong place and using poorly suited tools (a compiler is not a good interpreter). And my only explanation so far is that people are nerd-sniped into doing it.

                    thephd@pony.socialT 1 Reply Last reply
                    0
                    • uecker@mastodon.socialU uecker@mastodon.social

                      @thephd Ok, but why does it need to be solved by compile-time interpretation and not simply be a tool one runs during built? To me, this seems to solve the problem at the wrong place and using poorly suited tools (a compiler is not a good interpreter). And my only explanation so far is that people are nerd-sniped into doing it.

                      thephd@pony.socialT This user is from outside of this forum
                      thephd@pony.socialT This user is from outside of this forum
                      thephd@pony.social
                      wrote last edited by
                      #14

                      @uecker If that's all you took from this, okay!

                      mia@shrimptest.0x0.stM 1 Reply Last reply
                      0
                      • uecker@mastodon.socialU uecker@mastodon.social

                        @thephd What I do not understand is why the extra build step is a problem.

                        manx@mastodon.onlineM This user is from outside of this forum
                        manx@mastodon.onlineM This user is from outside of this forum
                        manx@mastodon.online
                        wrote last edited by
                        #15

                        @uecker @thephd https://mastodon.online/@manx/116261044523322289

                        manx@mastodon.onlineM 1 Reply Last reply
                        0
                        • manx@mastodon.onlineM manx@mastodon.online

                          @uecker @thephd https://mastodon.online/@manx/116261044523322289

                          manx@mastodon.onlineM This user is from outside of this forum
                          manx@mastodon.onlineM This user is from outside of this forum
                          manx@mastodon.online
                          wrote last edited by
                          #16

                          @uecker @thephd This exact extra backwards cyclic dependency is probably the single most significant reason why building C and C++ code is hard.

                          uecker@mastodon.socialU 1 Reply Last reply
                          0
                          • manx@mastodon.onlineM manx@mastodon.online

                            @uecker @thephd This exact extra backwards cyclic dependency is probably the single most significant reason why building C and C++ code is hard.

                            uecker@mastodon.socialU This user is from outside of this forum
                            uecker@mastodon.socialU This user is from outside of this forum
                            uecker@mastodon.social
                            wrote last edited by
                            #17

                            @manx @thephd Can you explain what you mean? I do not generally find building C code hard - not even when it runs code (which it rarely does).

                            uecker@mastodon.socialU manx@mastodon.onlineM 2 Replies Last reply
                            0
                            • uecker@mastodon.socialU uecker@mastodon.social

                              @manx @thephd Can you explain what you mean? I do not generally find building C code hard - not even when it runs code (which it rarely does).

                              uecker@mastodon.socialU This user is from outside of this forum
                              uecker@mastodon.socialU This user is from outside of this forum
                              uecker@mastodon.social
                              wrote last edited by
                              #18

                              @manx @thephd You could turn this around "Do not feel proud about your clever compile-time meta programming. You should feel ashamed that you have been tricked into using your compiler as a poor interpreter."

                              manx@mastodon.onlineM 1 Reply Last reply
                              0
                              • uecker@mastodon.socialU uecker@mastodon.social

                                @manx @thephd Can you explain what you mean? I do not generally find building C code hard - not even when it runs code (which it rarely does).

                                manx@mastodon.onlineM This user is from outside of this forum
                                manx@mastodon.onlineM This user is from outside of this forum
                                manx@mastodon.online
                                wrote last edited by
                                #19

                                @uecker @thephd
                                make
                                ninja
                                cmake
                                msbuild
                                premake5
                                autotools
                                vcpkg
                                conan
                                apt
                                yum
                                rpm
                                ...

                                Having a reverse dependency on the build system multiplies this nonsense, especially when cross-compiling and interacting between different build systems.

                                Compare this to any (really any) other language.

                                This is really not fixable if every build system invents its own mechanism for generating code at build time, thereby locking any project into build system vendor specific mechanisms.

                                uecker@mastodon.socialU manx@mastodon.onlineM 2 Replies Last reply
                                0
                                • manx@mastodon.onlineM manx@mastodon.online

                                  @uecker @thephd
                                  make
                                  ninja
                                  cmake
                                  msbuild
                                  premake5
                                  autotools
                                  vcpkg
                                  conan
                                  apt
                                  yum
                                  rpm
                                  ...

                                  Having a reverse dependency on the build system multiplies this nonsense, especially when cross-compiling and interacting between different build systems.

                                  Compare this to any (really any) other language.

                                  This is really not fixable if every build system invents its own mechanism for generating code at build time, thereby locking any project into build system vendor specific mechanisms.

                                  uecker@mastodon.socialU This user is from outside of this forum
                                  uecker@mastodon.socialU This user is from outside of this forum
                                  uecker@mastodon.social
                                  wrote last edited by
                                  #20

                                  @manx I agree that the lack of standardization of build systems is a problem.

                                  uecker@mastodon.socialU 1 Reply Last reply
                                  0
                                  • manx@mastodon.onlineM manx@mastodon.online

                                    @uecker @thephd
                                    make
                                    ninja
                                    cmake
                                    msbuild
                                    premake5
                                    autotools
                                    vcpkg
                                    conan
                                    apt
                                    yum
                                    rpm
                                    ...

                                    Having a reverse dependency on the build system multiplies this nonsense, especially when cross-compiling and interacting between different build systems.

                                    Compare this to any (really any) other language.

                                    This is really not fixable if every build system invents its own mechanism for generating code at build time, thereby locking any project into build system vendor specific mechanisms.

                                    manx@mastodon.onlineM This user is from outside of this forum
                                    manx@mastodon.onlineM This user is from outside of this forum
                                    manx@mastodon.online
                                    wrote last edited by
                                    #21

                                    @uecker @thephd If you are cross-compiling, you are running the interpreter and code generator on the build host instead of on the build target, which means, if it requires any platform-specific knowledge (like the size and alignment of fundamental types), you have to manually duplicate this knowledge into your custom interpreter.

                                    Inside the target language itself, this information is naturally trivially available.

                                    uecker@mastodon.socialU 1 Reply Last reply
                                    0
                                    • uecker@mastodon.socialU uecker@mastodon.social

                                      @manx I agree that the lack of standardization of build systems is a problem.

                                      uecker@mastodon.socialU This user is from outside of this forum
                                      uecker@mastodon.socialU This user is from outside of this forum
                                      uecker@mastodon.social
                                      wrote last edited by
                                      #22

                                      @manx But I think it partially also reflects the size of the ecosystem. I really do not like many other languages that provide a framework that locks you into a specific way of doing things.

                                      1 Reply Last reply
                                      0
                                      • manx@mastodon.onlineM manx@mastodon.online

                                        @uecker @thephd If you are cross-compiling, you are running the interpreter and code generator on the build host instead of on the build target, which means, if it requires any platform-specific knowledge (like the size and alignment of fundamental types), you have to manually duplicate this knowledge into your custom interpreter.

                                        Inside the target language itself, this information is naturally trivially available.

                                        uecker@mastodon.socialU This user is from outside of this forum
                                        uecker@mastodon.socialU This user is from outside of this forum
                                        uecker@mastodon.social
                                        wrote last edited by
                                        #23

                                        @manx @thephd Cross-compilation is a good argument, but it is still not clear to me that this would not be better solved at a different level.

                                        manx@mastodon.onlineM 1 Reply Last reply
                                        0
                                        • thephd@pony.socialT thephd@pony.social

                                          @uecker If that's all you took from this, okay!

                                          mia@shrimptest.0x0.stM This user is from outside of this forum
                                          mia@shrimptest.0x0.stM This user is from outside of this forum
                                          mia@shrimptest.0x0.st
                                          wrote last edited by
                                          #24
                                          @thephd @uecker take a look at fftw3’s build system and i think several use cases for this kind of compile-time functionality will become apparrent. for example, it currently uses some arcane OCaml code generators to turn customizable rules into SIMD code. it’s so unwieldy that the project’s README recommends users only ever build from tarballs with the sources already generated.

                                          (after exchanging some emails i ported that whole mess to meson to make it usable but then that didn’t get reviewed at all and i stopped caring)
                                          mia@shrimptest.0x0.stM uecker@mastodon.socialU 2 Replies Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups