GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Notices by Leonard Ritter (lritter@mastodon.gamedev.place)

  1. Embed this notice
    Leonard Ritter (lritter@mastodon.gamedev.place)'s status on Friday, 02-May-2025 07:16:40 JST Leonard Ritter Leonard Ritter
    in reply to

    hating myself right now for having written so much code.

    a lot of this was written with the assumption that "it's only bootstrapping, no need to be dilligent, all this will be replaced".

    well guess what, dipshit. it's 10 years later and this is still the state of the art implementation.

    in soviet russia, corner cuts you.

    #devlog #scopes

    In conversation about 16 days ago from mastodon.gamedev.place permalink

    Attachments

    1. No result found on File_thumbnail lookup.
      implementation.in - このウェブサイトは販売用です! - India Implementation リソースおよび情報
      このウェブサイトは販売用です! implementation.in は、あなたがお探しの情報の全ての最新かつ最適なソースです。一般トピックからここから検索できる内容は、implementation.inが全てとなります。あなたがお探しの内容が見つかることを願っています!
  2. Embed this notice
    Leonard Ritter (lritter@mastodon.gamedev.place)'s status on Friday, 02-May-2025 07:16:37 JST Leonard Ritter Leonard Ritter

    sigh. i just have too much on my plate. i'm now just porting the Scope implementation almost as it is now and do this another day.

    funny, "porting" feels more correct here than "refactoring".

    #devlog #scopes

    In conversation about 16 days ago from mastodon.gamedev.place permalink
  3. Embed this notice
    Leonard Ritter (lritter@mastodon.gamedev.place)'s status on Friday, 02-May-2025 07:16:36 JST Leonard Ritter Leonard Ritter
    in reply to

    scope.cpp is ported, now we're moving on to a bunch of smaller types, until we're eventually arriving at value.cpp, which does a lot.

    it's easy to tell how far i'm along because the generated makefile compiles sources in lexicographic order. 11 sources left. :)

    #devlog #scopes

    In conversation about 16 days ago from gnusocial.jp permalink

    Attachments


  4. Embed this notice
    Leonard Ritter (lritter@mastodon.gamedev.place)'s status on Friday, 02-May-2025 07:16:32 JST Leonard Ritter Leonard Ritter

    today i'm beginning translating Scopes' internal OOP based system to datalog/database/ECS layout, that is, all pointers become enum-typed indices and object attributes are mapped in arrays.

    to begin, i'm writing a small DSL in Scopes to describe the datamodel, and then auto-translate it to C++

    this is the type tree from which classes and enums will be generated:
    https://paste.sr.ht/~duangle/31522a60cf978fe7483cfdd32f1fca7293daaffc

    next, we need index attributes (aka struct fields), and auxiliary tables (options, maps)

    #devlog #scopes

    In conversation about 16 days ago from mastodon.gamedev.place permalink

    Attachments



  5. Embed this notice
    Leonard Ritter (lritter@mastodon.gamedev.place)'s status on Friday, 02-May-2025 07:16:31 JST Leonard Ritter Leonard Ritter
    in reply to

    phew. five hours later, i've translated *all types* used by Scopes into this format, from which C++ definitions will be derived.

    what i like particularly here is that all sub-enums like ICmpKind or TypeKind, and even all error codes, are flattened into the main ValueKind one, but can still be their own enumerator types.

    many branch-dependent special cases are now unified this way.

    https://hg.sr.ht/~duangle/scopes/browse/src/Value.sx?rev=based

    #devlog #scopes

    In conversation about 16 days ago from gnusocial.jp permalink
  6. Embed this notice
    Leonard Ritter (lritter@mastodon.gamedev.place)'s status on Friday, 02-May-2025 07:16:30 JST Leonard Ritter Leonard Ritter
    in reply to

    the parser for Value.sx now fully parses the definition file in 455 lines.

    https://hg.sr.ht/~duangle/scopes/raw/lib/scopes/compiler/pilot/gencc.sc?rev=based

    now we need to generate some actual C++ code.

    #devlog #scopes

    In conversation about 16 days ago from mastodon.gamedev.place permalink
  7. Embed this notice
    Leonard Ritter (lritter@mastodon.gamedev.place)'s status on Friday, 02-May-2025 07:16:29 JST Leonard Ritter Leonard Ritter
    in reply to

    we have generated some code. instead of generating plain C++ expressions i employ the same technique i did with the scopes² prototype: generate macro expressions and let the preprocessor translate.

    left is an impression of what the output looks like (header file). right is the file used to translate it to C definitions. most of it is stubs so the code compiles at all.

    #devlog #scopes

    In conversation about 16 days ago from gnusocial.jp permalink

    Attachments


    1. https://cdn.masto.host/mastodongamedevplace/media_attachments/files/114/262/319/846/834/290/original/bf38bc51df656261.png

    2. https://cdn.masto.host/mastodongamedevplace/media_attachments/files/114/262/324/250/109/120/original/4627537e56be3321.png
  8. Embed this notice
    Leonard Ritter (lritter@mastodon.gamedev.place)'s status on Friday, 02-May-2025 07:16:28 JST Leonard Ritter Leonard Ritter
    in reply to

    in full refactoring flow now, as i replace explicit classes with generated types, turn methods into functions, figure out small extensions to the type generator, etc.

    as a result, codebase's getting smaller, which is always a good sign.

    #devlog #scopes

    In conversation about 16 days ago from mastodon.gamedev.place permalink

    Attachments

    1. No result found on File_thumbnail lookup.
      Parked at Loopia
  9. Embed this notice
    Leonard Ritter (lritter@mastodon.gamedev.place)'s status on Friday, 02-May-2025 07:16:27 JST Leonard Ritter Leonard Ritter
    in reply to

    lots of refactoring today. codebase is completely shot. changes everywhere. many deletions. into the rabbit hole i go.

    #devlog #scopes

    In conversation about 16 days ago from gnusocial.jp permalink
  10. Embed this notice
    Leonard Ritter (lritter@mastodon.gamedev.place)'s status on Friday, 02-May-2025 07:16:26 JST Leonard Ritter Leonard Ritter
    in reply to

    voting this the least helpful error message in C++ (it's a bit verbose because i use heavily templated types, and C++ doesn't know when to quit describing nesting structures).

    you get this when you use a type for STL hashmaps that's not supported by std::hash. it doesn't actually tell you where you made that mistake. it does in fact tell you nothing useful aside from the type used. you just have to know by experience.

    #devlog #scopes

    In conversation about 16 days ago from mastodon.gamedev.place permalink

    Attachments


    1. https://cdn.masto.host/mastodongamedevplace/media_attachments/files/114/285/429/455/666/781/original/a33811f6bf5ec425.png
  11. Embed this notice
    Leonard Ritter (lritter@mastodon.gamedev.place)'s status on Friday, 02-May-2025 07:16:25 JST Leonard Ritter Leonard Ritter
    in reply to

    expander.cpp is the first big module to be fully updated, now i'm updating gen_llvm.cpp. it's the mother of all refactorings.

    #devlog #scopes

    In conversation about 16 days ago from gnusocial.jp permalink
  12. Embed this notice
    Leonard Ritter (lritter@mastodon.gamedev.place)'s status on Friday, 02-May-2025 07:16:24 JST Leonard Ritter Leonard Ritter
    in reply to

    gen_llvm.cpp is updated, next is globals.cpp. this one implements the C API wrapper around the C++ parts of the compiler and also exports all API symbols to the client context, which looks like below.

    these 600+ lines of definitions are all manually maintained, but could be autogenerated from scopes.h alone, which i'll implement now.

    #devlog #scopes

    In conversation about 16 days ago from mastodon.gamedev.place permalink

    Attachments


    1. https://cdn.masto.host/mastodongamedevplace/media_attachments/files/114/331/078/916/002/310/original/597bfff8b078f07b.png
  13. Embed this notice
    Leonard Ritter (lritter@mastodon.gamedev.place)'s status on Friday, 02-May-2025 07:16:23 JST Leonard Ritter Leonard Ritter
    in reply to

    de-optimizing Scope objects to speed the refactor along (I have a much better optimization to apply later), and updating related API functions.

    #devlog #scopes

    In conversation about 16 days ago from gnusocial.jp permalink
  14. Embed this notice
    Leonard Ritter (lritter@mastodon.gamedev.place)'s status on Friday, 02-May-2025 07:16:22 JST Leonard Ritter Leonard Ritter
    in reply to

    and now it's time to eat my own dogfood

    #devlog #scopes

    In conversation about 16 days ago from mastodon.gamedev.place permalink

    Attachments


    1. https://cdn.masto.host/mastodongamedevplace/media_attachments/files/114/354/060/344/836/772/original/c1b19f403a2312ea.png
  15. Embed this notice
    Leonard Ritter (lritter@mastodon.gamedev.place)'s status on Friday, 02-May-2025 07:16:21 JST Leonard Ritter Leonard Ritter
    in reply to

    refactoring is intensifying

    #devlog #scopes

    In conversation about 16 days ago from gnusocial.jp permalink

    Attachments


    1. https://cdn.masto.host/mastodongamedevplace/media_attachments/files/114/375/532/508/239/498/original/9586b163f550a73b.png
  16. Embed this notice
    Leonard Ritter (lritter@mastodon.gamedev.place)'s status on Friday, 02-May-2025 07:16:20 JST Leonard Ritter Leonard Ritter
    in reply to

    i'm going to remove all the internal "homebrew exception" stuff from our C++ codebase and use C++ exceptions instead, which drastically simplifies a lot of the error handling code. we're already converting exceptions at the boundaries, this would be no different.

    honestly i no longer understand why i was so reluctant to use this in the first place. i guess i was afraid C++ exception support would leak into the scopes API but those worries were unfounded.

    #devlog #scopes

    In conversation about 16 days ago from mastodon.gamedev.place permalink
  17. Embed this notice
    Leonard Ritter (lritter@mastodon.gamedev.place)'s status on Friday, 02-May-2025 07:16:19 JST Leonard Ritter Leonard Ritter
    in reply to

    wrote some great sugar for the boundary so there's virtually no sweat translating exceptions.

    first pic is old way, second pic is new way

    #devlog #scopes

    In conversation about 16 days ago from gnusocial.jp permalink

    Attachments


    1. https://cdn.masto.host/mastodongamedevplace/media_attachments/files/114/377/211/390/296/002/original/db024bb34932d467.png

    2. https://cdn.masto.host/mastodongamedevplace/media_attachments/files/114/377/217/916/252/051/original/8645806b58ab807a.png
  18. Embed this notice
    Leonard Ritter (lritter@mastodon.gamedev.place)'s status on Friday, 02-May-2025 07:16:18 JST Leonard Ritter Leonard Ritter
    in reply to

    more refactoring. this is the mother of all refactorings. i will probably never get done.

    #devlog #scopes

    In conversation about 16 days ago from mastodon.gamedev.place permalink
  19. Embed this notice
    Leonard Ritter (lritter@mastodon.gamedev.place)'s status on Friday, 02-May-2025 07:16:17 JST Leonard Ritter Leonard Ritter
    in reply to

    getting to list.cpp. the existing implementation uses simple cons cells, and while i want to use something else in the future, i'll keep it as it is right now so we're going to get to working state sooner.

    what i would like to try in the next list impl is "wide cons cells", conceptually immutable arrays broken into multiple singly-linked pieces.

    #devlog #scopes

    In conversation about 16 days ago from gnusocial.jp permalink
  20. Embed this notice
    Leonard Ritter (lritter@mastodon.gamedev.place)'s status on Friday, 02-May-2025 07:16:16 JST Leonard Ritter Leonard Ritter
    in reply to

    lists done, platform ABI done. now we get to prover.cpp which is the typechecker, and at 4500 lines a behemoth, compared to other files.

    i wrote down a few regexes i used for replacement here, which save me a lot busy work.

    #devlog #scopes

    In conversation about 16 days ago from mastodon.gamedev.place permalink

    Attachments


    1. https://cdn.masto.host/mastodongamedevplace/media_attachments/files/114/387/298/460/525/031/original/11cc1691e82873bd.png
  • Before

User actions

    Leonard Ritter

    Leonard Ritter

    Arts, Maths & Metaprogramming; Game Developer at @duangle. paniq in the demoscene. Building Tukan, a procedural game engine, maintaining Scopes & gently going NowHere. (he/him, they/them)I mostly write in English, rarely in German.Migrated from @paniqMy avatar is the logo of the library I'm working on, a stylized toucan with a four-colored beak.

    Tags
    • (None)

    Following 0

      Followers 0

        Groups 0

          Statistics

          User ID
          11596
          Member since
          29 Sep 2022
          Notices
          135
          Daily average
          0

          Feeds

          • Atom
          • Help
          • About
          • FAQ
          • TOS
          • Privacy
          • Source
          • Version
          • Contact

          GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

          Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.