Skip to content

pfhaupt/ylang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ylang - The language that makes you go "y?"

About

This is a language that I created on a weekend and some train rides, to explore dynamic languages and Interpreters a bit more.

I now know how JavaScript was written in 10 days.

  • Is it revolutionary? No.
  • Is it nice to use? Depends on your definition of nice.
  • Is it stable? Not more than my mental state.
  • Is it fast? Well, consider upgrading your hardware lol.
  • Was it fun to make? Absolutely, I learned so much during this time!

Features

  • Dynamically typed
  • Turing Complete
  • f is a builtin keyword
  • No Syntax Sugar, no bloat
    • No semicolons, no forced line breaks
    • Often used constructs such as if or logical and are defined in the standard library
    • while a > 0 a = a - 1 is a valid expression:
      • a > 0 is the condition
      • a = a - 1 is the body
  • Everything is an expression. Yes, everything.
  • Some special operations include:
    • <list> * <fn> returns a new list containing all elements of the original list, applied to the given function
    • <list> / <fn> returns a new list containing all elements that return 1 when applied to the given function
    • <number> * <fn> creates a list of length <number>, where each element is the result of the call to fn(index)
    • <list> . <number> gets the element at the given index
      • Note that you can't set the element (yet?), you'd have to create a new list for that.
  • Special support for intrinsics, my favorites:
    • noa(<string>) returns 1 if the argument does not contain a lowercase a (Thanks Noa!)
    • nel(<string>) returns 1 if the argument is not equal to lowercase l (Thanks Angelo!)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors