• Zangoose@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    4 months ago

    Screw it. Let’s actually make python script an ISA that gets run on physical hardware with no higher level tooling. Then we can have the python virtual environment which runs this for fools who don’t have the right hardware. Finally, when people start complaining about naming we make Python Script 2.1, which is a JIT language built on top of IL that looks nothing like either of them but can emulate both python and python script with the performance cost of being a quarter as fast as both.

    • nexussapphire@lemm.ee
      link
      fedilink
      English
      arrow-up
      0
      ·
      4 months ago

      Honestly if someone irons out the edge cases, python probably could JIT compile to machine code via cython. It would take a fair bit of memory and probably a bit slow on low powered systems but it would be so much faster if cached.

      • Zangoose@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        4 months ago

        Technically I think python already has an intermediate step that it uses before it starts running a script that compiles it into a lower-ish language (at least the cpython interpreter does this, it probably isn’t a part of the language specification though)

        The actual line between JIT languages and interpreted languages is pretty thin since I think most interpreted languages do something similar to minimize the amount that needs to be done at runtime

        • nexussapphire@lemm.ee
          link
          fedilink
          English
          arrow-up
          0
          ·
          edit-2
          4 months ago

          I think at this point in time it JIT compiles into byte code and cached which is more efficiently interpreted the next time that function is called.

  • Australis13@fedia.io
    link
    fedilink
    arrow-up
    0
    ·
    4 months ago

    Make sure it’s not whitespace sensitive and requires explicit typing, just to mess with everyone.

  • manucode@infosec.pub
    link
    fedilink
    arrow-up
    0
    ·
    4 months ago

    It uses XML-like syntax:

    <fun>
      <name>sum</name>
      <in>
        <int>foo</int>
        <int>bar=0</int>
      </in>
      <out><int>foo+bar</int></out>
    </fun>
    
    • Pilon23@feddit.dk
      link
      fedilink
      arrow-up
      0
      ·
      4 months ago

      Can you please link to a medium article on how this will help utilize AI blockchain so i can show it to management on Monday?

    • JackbyDev@programming.dev
      link
      fedilink
      English
      arrow-up
      0
      ·
      4 months ago

      Make sure to make ample use of mixed content elements.

      <statement><var>bar</var> = <int>0</int></statement>
      
    • ZILtoid1991@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      4 months ago

      I almost did similar with SDLang as I was very desperate for a scripting language, but now I have a wasmtime API for D.

    • lone_faerie@lemmy.blahaj.zone
      link
      fedilink
      English
      arrow-up
      0
      ·
      4 months ago

      That’s basically how the Android app Tasker works. You do the programming through its UI, but when you export/share your tasks, they’re saved as xml

    • notabot@lemm.ee
      link
      fedilink
      arrow-up
      0
      ·
      4 months ago

      I like it, this is clearly very enterprisey and solution focused, but I would like to suggest a couple of amendments if I may?

      • Namespaces We should make full use of namespaces. Make the structural tags be in a language specific namespace (to be referenced in every function spec, obviously) but change the in an out params to use the parameter name as the tag, namespaced to the function they’re for, with a type attribute.

      • In memory message queues Have all function invocations be marshaled as xml documents posted to an in memory message queue. Said documents should use a schema that validates the structure and a function specific schema to validate the types of arguments being passed. Namespace everything.

      I reckon we could power a medium sided country if we could generate energy from the programmers despair.

    • VitaminF@feddit.org
      link
      fedilink
      arrow-up
      0
      ·
      4 months ago
      <fun>
        <name>sum</name>
        <in>
          <int>
            <name>foo</name>
          </int>
          <int>
            <name>bar</name>
            <default_value>
              <int>0</int>
            </default_value>
          </int>
        </in>
        <out>
          <int>
            <calculation>
              <numerical_operation>
                <operator_plus>
                  <operand>
                    <var>foo</var>
                  </operand>
                  <operand>
                    <var>bar</var>
                  </operand>
                </operator_plus>
              </numerical_operation>
            </calculation>
          </int>
        </out>
      </fun>
      
    • A_Very_Big_Fan@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      4 months ago

      I took every coding class my highschool offered, and the only thing that drove me more crazy than this syntax was trying to use CSS.

  • umbraroze@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    4 months ago

    Just today I heard someone whining about how in LinkedIn and other recruitment sites there’s like five bazillion profile tag options for RDMBSes and various dialects of SQL… when in actuality the recruiters are probably only concerned if the developer can do a bloody SELECT and stuff.