tiflolinux.org - GNU Social
  • Login

Bienvenido

  • Public

    • Public
    • Network
    • Groups
    • Popular
    • People

Conversation

Notices

  1. Devine Lu Ator (neauoire@merveilles.town)'s status on Friday, 27-May-2022 16:05:02 CEST Devine Lu Ator Devine Lu Ator

    Wrote a quick linter for #uxn, that raises warning for common optimizations. I will add more recipes as we find them.

    Missing an optimization? Add it here: https://git.sr.ht/~rabbits/uxnlin/tree/main/item/src/uxnlin.tal#L178

    In conversation Friday, 27-May-2022 16:05:02 CEST from merveilles.town permalink
    • Kartik Agaram (akkartik@merveilles.town)'s status on Friday, 27-May-2022 16:04:59 CEST Kartik Agaram Kartik Agaram
      in reply to
      • Andy Alderwick

      @neauoire @alderwick There's an interesting discussion about tail call elimination in Forth at https://wiki.c2.com/?TailCallOptimization. Neither it nor Scheme provide for pragmas to disable optimizations, I believe ๐Ÿค”

      In conversation Friday, 27-May-2022 16:04:59 CEST permalink

      Attachments

      1. https://wiki.c2.com/?TailCallOptimization
    • Devine Lu Ator (neauoire@merveilles.town)'s status on Friday, 27-May-2022 16:04:59 CEST Devine Lu Ator Devine Lu Ator
      in reply to
      • Kartik Agaram
      • Andy Alderwick

      @akkartik @alderwick this is the clearest definition of tail-call optimization that I have ever read ๐Ÿ™

      In conversation Friday, 27-May-2022 16:04:59 CEST permalink
    • Devine Lu Ator (neauoire@merveilles.town)'s status on Friday, 27-May-2022 16:05:00 CEST Devine Lu Ator Devine Lu Ator
      in reply to
      • Kartik Agaram
      • Andy Alderwick

      @akkartik @alderwick It won't be nagging anyone unless they, like me, go about to assemble the linter and run their code through it. I made this for myself to see if I had some blindspots, and it turns out I do, I'm not saying I will obey all suggestions, but I will try to make the applications as fast as I possibly can for the user, even if that means making the code more convoluted.

      In conversation Friday, 27-May-2022 16:05:00 CEST permalink
    • Kartik Agaram (akkartik@merveilles.town)'s status on Friday, 27-May-2022 16:05:00 CEST Kartik Agaram Kartik Agaram
      in reply to
      • Andy Alderwick

      @neauoire @alderwick That makes sense ๐Ÿ‘ I just feel defensive with most linters ๐Ÿ˜„

      In conversation Friday, 27-May-2022 16:05:00 CEST permalink
    • Devine Lu Ator (neauoire@merveilles.town)'s status on Friday, 27-May-2022 16:05:00 CEST Devine Lu Ator Devine Lu Ator
      in reply to
      • Kartik Agaram
      • Andy Alderwick

      @akkartik @alderwick I've given in ๐Ÿคฆโ™€๏ธ
      https://git.sr.ht/~rabbits/uxn/commit/5a0e0c56aab08388833892129eae25be8e9dd208

      In conversation Friday, 27-May-2022 16:05:00 CEST permalink
    • Andy Alderwick (alderwick@merveilles.town)'s status on Friday, 27-May-2022 16:05:00 CEST Andy Alderwick Andy Alderwick
      in reply to
      • Kartik Agaram

      @neauoire @akkartik I like it! I'm used to doing that optimisation manually, but now I can have

      ;do-something JSR2
      JMP2r

      not worry about writing that optimisation, and now when I add โ€œ;do-something-more JSR2โ€ I can think less about changing the ending. ๐Ÿ˜Š

      However, we also have folx in IRC unhappy already about LIT merging, so to help them out we could incorporate a setting to turn all optimisations off somehow. Something both uxnasm and asma need to recognise per source file? ๐Ÿค”

      #uxn

      In conversation Friday, 27-May-2022 16:05:00 CEST permalink
    • Kartik Agaram (akkartik@merveilles.town)'s status on Friday, 27-May-2022 16:05:01 CEST Kartik Agaram Kartik Agaram
      in reply to

      @neauoire Turning "JSR2 JMP2r" into "JMP2" (tail call elimination) does feel like it makes the code a little harder to read. There's something reassuring about the way you have a function call per line at the moment.

      In conversation Friday, 27-May-2022 16:05:01 CEST permalink

      Attachments


      1. https://assets.merveilles.town/media_attachments/files/108/371/036/413/877/397/original/1413a73b47a9c8fc.png
    • Devine Lu Ator (neauoire@merveilles.town)'s status on Friday, 27-May-2022 16:05:01 CEST Devine Lu Ator Devine Lu Ator
      in reply to
      • Kartik Agaram
      • Andy Alderwick

      @akkartik I know right, I haven't really found a good way to handle that yet, it might be that the assemblers should handle that, but I'm not sure if that's the best idea.

      @alderwick and a few others have, from the very beginning, closed their routines in the same indent level as the body of the routine, and I'm starting to regret not catching on that habit earlier.

      In conversation Friday, 27-May-2022 16:05:01 CEST permalink
    • Kartik Agaram (akkartik@merveilles.town)'s status on Friday, 27-May-2022 16:05:01 CEST Kartik Agaram Kartik Agaram
      in reply to
      • Andy Alderwick

      @neauoire @alderwick Can I ask what the motivation is for the optimizations?

      Idea: distinguish between optimizations and _idioms_. If someone's writing something in an unncessarily convoluted way, a linter is a good way to remind them of features.

      But programs are often fast enough. Nagging about optimizations might seem heavy handed. Show that sort of advice outside of build.sh, only when asked. "My app is slow, do you have any suggestions?" That way also lies a profiler.

      In conversation Friday, 27-May-2022 16:05:01 CEST permalink
    • Devine Lu Ator (neauoire@merveilles.town)'s status on Friday, 27-May-2022 16:05:01 CEST Devine Lu Ator Devine Lu Ator
      in reply to
      • Kartik Agaram
      • Andy Alderwick

      @akkartik @alderwick this is not part of the assembler or anything, it's basically the tool you dig out when you're looking for optimizations.

      In conversation Friday, 27-May-2022 16:05:01 CEST permalink
    • Devine Lu Ator (neauoire@merveilles.town)'s status on Friday, 27-May-2022 16:05:02 CEST Devine Lu Ator Devine Lu Ator
      in reply to

      "My text editor is as optimized as it can be.."

      arg fuck me

      In conversation Friday, 27-May-2022 16:05:02 CEST permalink
    • Ekaitz Zรกrraga ๐Ÿ‘น (ekaitz_zarraga@mastodon.social)'s status on Friday, 27-May-2022 16:05:32 CEST Ekaitz Zárraga 👹 Ekaitz Zรกrraga ๐Ÿ‘น
      in reply to
      • Kartik Agaram
      • Andy Alderwick

      @neauoire @akkartik @alderwick I wrote about it a while ago, if you want to take a look... https://ekaitz.elenq.tech/call-me-maybe.html

      ๐Ÿค“

      In conversation Friday, 27-May-2022 16:05:32 CEST permalink

      Attachments

      1. No result found on File_thumbnail lookup.
        Ekaitz's tech blog

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

tiflolinux.org - GNU Social is a social network, courtesy of tiflolinux.org. It runs on GNU social, version 2.0.1-beta0, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All tiflolinux.org - GNU Social content and data are available under the Creative Commons Attribution 3.0 license.