1

Hypothetically, if I knew all the elements of a functioning programming language runtime, language syntax and semantics… do I need anything other than a parser generator to make my own?

Comments
  • 1
    A parser generator is only apart, a runtime involves quite a lot more, but in theory ypu can always create your own runtime, but its likely not going to be as efficient.

    And if its an oracle language you risk getting sued ;)
  • 0
    @Voxera thanks for the advice. I know it’s socially looked at as kind of egotistical/narcissistic, but I shamelessly assume knowledge until intercepted by experience… pretty sure it’s a learned behavior yet, how i learn… so, now that i have kind attention, what the hell is a runtime then?… I thought it was just a programming languages “live” source; I.e. for reference when programming in different environments?
  • 1
    Try to find out how a lexer works
  • 1
    @retoor
    parser☑️
    Lexer ☑️
    😁anything else?🙏
  • 1
  • 1
  • 1
    I asked chatgpt in a billion ways before asking people… It’s all coming together 👹😅
  • 2
    The most important prerequisite to making a functional language is making a functional language.

    Just do it. Doesn't matter whether you fail or not. Your first language will not be a language you will like to use ten years later. Use the knowledge you have right now, choose a _finite_ set of features to implement and write the compiler and whatever else you need to get the first few example programs running.

    If you want an easier start, make a transpiler first. Choose a target language that is simple and fast. You probably don't want to implement automatic memory management from scratch in your first language. So choose a target language that has that if you want this feature.
  • 1
    @Oktokolo thank you! I’ve found something else to look into😁 (I’m doing my own version control over here😂)
  • 1
    @sureAzure the enthusiasm in your posts make me jealous. Wish I still had that
  • 1
    @retoor 😅I’ve felt stupid as shit a lot in my life… but I’ve felt smart too. Maybe I’m 1 or 2 mental hospitals over you, under my belt…🤷🏻‍♂️😎lol
  • 0
    @sureAzure will your version control have some special functionality?
  • 1
    @retoor it felt good to confirm they trap ions for quantum hardware; I assumed…
  • 1
    @retoor it will have independent functionality. It will be mine.
  • 1
  • 1
    @retoor I like you… I have to go get an epidural… but stick around.
  • 0
    @retoor all i want to say specifically about it, is I’m aiming for something like a middle level language… and I know I’m a beginner; I know the road is long and highly likely… yes… a tough one to traverse, but… I’m fuckin crazy. ❤️
  • 1
    @sureAzure I've wrote my own language. Almost had the OOP complete. There was nothing good about the language and it had kinda python performance. But damn, it was fun to write. I advise you to do it! I wrote in C what was kinda hardcore. I'm the linked list master
  • 1
    @retoor let’s just say I may or may not have a challenge that was relatively recent in presenting itself (In general)

    I’m definitely going to attempt repeatedly until success. I expect a long process for extra physical components alone… but knowing me, i might snap in a night and finish it all… also, knowing me… that moment could be 10 years from now (although, that night might prove 7 waisted lol 🤡)
  • 1
    @retoor that’s really cool though. What’s it called?
  • 0
    @sureAzure sadly, the name was foxyc. I like foxes.

    The lexer wil cost you ten rewrites and nights. Believe me. It's a brain fuck.

    Also parsing this: 2+3*(2+1) in the right sequence in a beautiful way will cost some time.
  • 1
    @retoor I like foxes too. 🙏and I appreciate the lens of clarity into aspects of a lexers processing… I’ve yet to look into that part.
  • 1
  • 1
    @retoor cool. I can’t move my spine… I’ll watch later on my computer😅
  • 1
    @retoor one of my foreign friends asked for that (my art)
  • 1
    @retoor probono artist if we talk enough.
  • 1
  • 1
    @sureAzure A parser transforms the text into a data structure usually called Abstract Syntax Tree

    This is a structured description of the code.

    This can then be interpreted directly by a runtime or further compiled into some other more computer efficient format with native binaries being the most low level.

    The AST can also be processed to simplify, like turning all loops into a while so the runtime only needs one loop solution.

    And a runtime for some intermediate level can be targeted by many different parsers.

    Like c# and vb.net both get parsed and compiled into IL that is then run by the CLR common language runtime.

    Or java, scala and kotlin that all run on the java virtual machine where the VM is the runtime but all the languages have their own parsers.
  • 0
    @Voxera thank you so much for keeping me in mind 🙏 I have done some digging since this post, and although you may not know this attribute of my mind, the reiteration of specific aspects actually does better my understanding and direction of practice.✊🤜🤛
  • 0
    I’m high rn
  • 0
    @sureAzure proud of you. On what you're high?
  • 1
    @retoor couple things
Add Comment