CookeyLang
h
Coder100 (10480)

CookeyLang

Hello! Today we are introducing a brand new language! This brand new language is very easy to understand and it takes many different features and ideas from different languages making it easy to understand yet still being powerful! We are sure you will have an amazing experience try this language, and transitioning from and to this language will not be a problem! But, what is this language called?

Introducing CookeyLang. CookeyLang is a fast interpreted general-purpose dynamic class-based strong language for beginners, but advanced users can use it as well!

Credits

Language

Design

Beta-Testers

About

CookeyLang was created for the 2020 language jam, but it will not stop there! We already have our very own GitHub repository and docs! We also plan to rewrite in C++ and maybe even a VM! Our plan is to add and update CookeyLang to make it even better! CookeyLang is a great language for beginners to learn!

Purposes

CookeyLang is meant as a general-purpose language for beginners. It promotes good coding practices and is similar to C, JS, C#, and Python for an easy transition to and from the languages. It also contains many new features of its own and new takes on many of the old features of other languages. It aims to solve the problem of python being too "austere" and JavaScript being too "sloppy". It also fixes the problem of semicolons by requiring them throughout the code.

Examples

Fibonacci

function fibonacci(num) {
  if (num <= 1) ret 1;

  ret fibonacci(num - 1) + fibonacci(num - 2);
}

for (var i = 0; i < 20; i ++) {
  printLine(fibonacci(i));
}

99 bottles of beer

function bottle(num) {
  ret num + " of bottles of beer on a wall, " + num + " of bottles of beer on a wall.";
}

function takeOneDown(num) {
  ret "Take one down, pass it around, " + num + " bottles of beer on the wall.";
}

var bottles = 100;

function init(bottles) {
  if (bottles > 0) {
    printLine(bottle(bottles));
    bottles --;
    printLine(takeOneDown(bottles));
    init(bottles);
  } el {
    printLine("No more bottles!");
  }
}

init(bottles);

Links

Documentation
NPM
Github
Repl.it
Tests
CookeyLang Make
Discord

Usage

npx cookeylang [file]

Easy as that!

You can also get a pretty welcome screen.

npx -p cookeylang welcome

Closing

I hope you enjoyed this language as much as we did making it!

You are viewing a single comment. View All
Answered by coderbot100 (76) [earned 5 cycles]
View Answer
Highwayman (1383)

It also fixes the problem of semicolons by requiring them throughout the code.

Perfection;

fuzzyastrocat (1195)

Why have semicolons when you could have completely fluid syntax, requiring no boundaries between statements? :D

Highwayman (1383)

Hm... idk I guess it’s just cause I’m used to semicolons lol
@fuzzyastrocat

Coder100 (10480)

oh yeah btw soon we will be adding warnings so we force camel_case as well @Highwayman

Coder100 (10480)

@fuzzyastrocat semicolons taste good nom nom

fuzzyastrocat (1195)

@Coder100 You have just irked me 9999%

oh yeah btw soon we will be adding warnings so we force camel_case as well

t h a t' s
s n e k
c a s e
(no hard feelings, iz joke)

As for semicolons, exactly! I save my semicolons for eating, not for coding :D (hint hint: i described Curta in my above post)

Coder100 (10480)

xDDD that was the point of the joke @fuzzyastrocat

fuzzyastrocat (1195)

@Coder100 Oh, I no get joke then. What was it in reference of? (JS?)

Highwayman (1383)

Bruh lol. Why for a paradigm? @Coder100

Coder100 (10480)

um it's irony, you see, camelCaseLooksLikeThis but I used its enemy, pythons_snake_case @fuzzyastrocat

fuzzyastrocat (1195)

@Coder100 Ah ok. I just didn't get the joke since I was expecting a more direct connection to the topic of this thread :D

? @Highwayman

fuzzyastrocat (1195)

:D @Coder100
Metasmiley - the return
coming to a theater near you

Highwayman (1383)

@fuzzyastrocat it’s funny because your language sounds like it’s going to the Max in the opposite direction (do anything it’s accepted)

fuzzyastrocat (1195)

@Highwayman Well, at least I'm not forcing a paradigm. And no, there are some rules obviously, but things aren't as strict. There's a balance point between insane amounts of syntax and insane lack thereof — when you get in the middle (which I'm not claiming to have done, in fact I'm almost sure I haven't) then you end up with a nice "clean" language.

Highwayman (1383)

like your having them have to use a certain naming convention. @Coder100

Coder100 (10480)

rust "forces" a paradigm by throwing warnings @fuzzyastrocat

Coder100 (10480)

personally that is a great idea I think, and then it can be turned off by doing "--no-var-warn" @fuzzyastrocat

fuzzyastrocat (1195)

@Coder100 Hmm, wonder why I'm not a big Rust fan :D

Ok jokes aside, I think that it's a good idea which should be scaled back. Rust should warn you when you try to do things that might affect the outcome of your code, not the style. However, many Rust warnings actually fill this role, so I'd argue that it's not entirely forcing a paradigm.

Codemonkey51 (884)

I use calmelCase and snek_case in python, also pascal case I like having it be unpredictable, also no spaces or underscores or caps functions just a bunch of words squished together :) @Coder100
useRandom_UnpridictableFunctionstyling()

fuzzyastrocat (1195)

@RohilPatel No, Python is actually not fluid. Python simply replaces the semicolon with the newline:

    x = 1
    y = 2

is perfectly valid but

    x = 2 y = 3

is not. However, in Curta you can separate statements any way you like, so if the above statements were valid Curta both would be allowed.