pure lambda calculus is smaller than forth

pure lambda calculus is smaller than forth

A Conspiracy Theorist Is Talking Shirt $21.68

It's All Fucked Shirt $22.14

A Conspiracy Theorist Is Talking Shirt $21.68

  1. 2 weeks ago
    Anonymous

    Pure autism.

  2. 2 weeks ago
    Anonymous

    What's the point of learning Forth, what can I do with it?

    • 1 week ago
      Anonymous

      Its just the simplest possible language, I'd say if you're willing to write drivers its THE best language you can have, specially the more "modern" versions like machineforth and colorforth.

      • 1 week ago
        Anonymous

        Is it fast? I don't understand how it works

        • 1 week ago
          Anonymous

          The subroutine threaded ones are almost baremetal fast, I'd say about 3/4 of optimized C and you can write assembler directly for the last bit of performance. So yeah, its real fast specially on the lower end hardware like those $1 ARM chips but you're probably going to want to write one for yourself which is trivial but it requires understanding of the hardware.
          Then there's Gforth and win32forth and ANSI in general which represent a split in the schools of Forth thought, they wanted standards and portability so they're really slow while the other school just does whatever the frick it wants with Chuck Moore, the inventor of Forth being the first one to say that ANSI Forth is a disgrace.

          • 1 week ago
            Anonymous

            This sounds interesting, I have zero experience in low level dev or embedded or anything like that but it sounds very cool. I'll check it out, thanks anon
            Is this good https://skilldrick.github.io/easyforth/ ?

          • 1 week ago
            Anonymous

            Yeah its pretty good for basics, basically I started with Jonesforth knowing nothing about assembler and then wrote a complete OS on the next step, so it kinda props you up real quick.
            If you want to read more about the modern school of Forth check ultratechnology.com, the posts may sound cheesy but take into account they were doing the equivalent of baremetal programming but for chip making IE they made their own cad, simulator and then produced full-custom chips that ran about 5x faster than the best processor at the time.

          • 1 week ago
            Anonymous

            Much appreciated.

          • 1 week ago
            Anonymous

            >subroutine threaded
            what do you mean by that? it's hard to find good ressouce on various kinds of threaded code
            this?
            # supposing that rsi holds the program counter
            mov rax, rsi
            add rsi, 8
            jmp rax

          • 1 week ago
            Anonymous

            Its just using the actual instructions as the primitives ie
            the return stack is the actual stack and the ret instruction is the actual return from subroutine
            So for example lets say you have a word that is doing something like 1 2 + ; so disassembled it would be something like
            mov eax, ebx // prepare for pop
            mov [edi], eax // pop 2nd item from data stack
            add edi, 4 // data stack points to next item
            add eax, ebx // add to top of stack
            ret

            You can look up the sourcecode for colorforth or PC32 which is basically colorforth but with ASCII instead of packed words but its only 32bit

          • 1 week ago
            Anonymous

            >Its just using the actual instructions as the primitives ie
            you mean that, when compiling the program, pre-assembled sequences of instructions are appended into the program buffer instead of appending the address of the word definition?

            it took me a while to understand your code. you're using the Intel syntax but with the AT&T operand order.
            # top of the stack always in eax
            mov ebx, eax # store top of the stack into ebc
            mov eax, [edi] # pop the 2nd element into eax 1/2
            add edi, 4 # pop the 2nd element into eax 2/2
            add eax, ebx # add, result is in eax and eax is the top of the stack
            ret

          • 1 week ago
            Anonymous

            >store top of the stack into ebc
            *ebx

            >add edi, 4
            also the where the stacks are is not clear.
            the expression stack/"the stack" is the C call stack pre-alloacted when the process is created and the return stack is a heap allocated stack with esp pointing to the top of this heap allocated stack?

          • 1 week ago
            Anonymous

            You basically allocate some memory for whatever you want and compile there, either calls or inlined sequences of instructions that is up to the programmer for example the primitives make sense to have them inlined which you could use a color tag or have a flag that automatically does that for you.
            Dont take the code I wrote to heart, its been some time since I wrote assembler in mnemonics so I probably got the ordering in reverse, I use register numbers instead 0 is eax, 1 is ecx etc etc
            You got the gist of what am talking, the rest is up to your creativity, for example one trick I was particularly proud of was dropping to ecx so the counter variable would be ready for a rep loop or a swap command.

            Of course, you have to set up your stacks for ease of use, I used ESP for return stack and ESI for data stack plus you have to save EBP if you dont want to crash coming back into C or whatever you used to launch the compiler.
            Another trick I used was have the stacks growing into one another ESP grows down(pop) and ESI grows up(4+), that way they both can share space which makes stack related crashes a non issue most of the time

      • 1 week ago
        Anonymous

        Can it do what React.js does though?

  3. 2 weeks ago
    Anonymous

    Lambada calculus is not real, Forth in hardware is an actual thing

    • 1 week ago
      Anonymous

      this.

      Yeah its pretty good for basics, basically I started with Jonesforth knowing nothing about assembler and then wrote a complete OS on the next step, so it kinda props you up real quick.
      If you want to read more about the modern school of Forth check ultratechnology.com, the posts may sound cheesy but take into account they were doing the equivalent of baremetal programming but for chip making IE they made their own cad, simulator and then produced full-custom chips that ran about 5x faster than the best processor at the time.

      also forth rocks. jonesforth is a great starting place.

  4. 1 week ago
    Anonymous

Your email address will not be published. Required fields are marked *