🐸
The best programming language since it's named after frogs
Table of Contents
Showcase
int jump =
map frog_ages =
vec swamp =
Frog wisest_frg =
frog_ages.iter.for_each
int jumps_remaining = jump
@print
Purpose
frg was made for one reason:
- The silly factor
Basically i took some Rust code, and sillyfied it. Heres an example
First, remove anything that doesn't have to be there in order to function. This includes any commas, semicolons, keywords, stuff like that
Next, seperate the declaration from the implementation (make it a closure)
// we still keep types!!
let jump: fn =
Lastly, rearrange everything and hide the exact data type (i32 -> int)
int jump =
You don't like not having an if keyword? Does that make you annoyed? Have three.
int jump =
You want to add another parameter? And a loop? Your greed is insulting.
int jump =
If you're insecure about the size of your -= or your >=, you should be, but also frg is perfect for you!
int jump =
If you can't comprehend the last expression in a function being the returned value, you can use the return keyword. Or the ret keyword. Or urn. Or anything that has the letters from the word function as long as they're in order.
return jumping_frg.leg_count
ret jumping_frg.leg_count
turn jumping_frg.leg_count
tr jumping_frg.leg_count
run jumping_frg.leg_count
"Oh but how does it know when one statement ends and one begins! I don't have my fucking semicolons!". This system works on hopes and dreams and is flawless.
int your_iq = 5 your_iq -=
But you can add semicolons if you want i guess.
int your_iq = 5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[!NOTE] semicolons can be used to guide treesitter since its stupid and needs them sometimes :(
More examples
Take some normal rust code, for example a vector declaration.
let mut number_list: = vec!
number_list -= number_list
(do everything above)
And done! Ideal frg code!
vec number_list =
number_list
The parser will not trust you after this one.
Features
Types
- Integers (
int) - Floats (
float) - Strings (
str) - Booleans (
bool) - Vectors (
vec(int)) - Maps (
map(str, int)) - Sets (
set(str)) - Functions (
int(str)) - Structs (
StructName) - References (
&int)
These type aliases since you'll forget map somehow:
map:obj,hashmap,dict,dictionaryvec:array,arr,list
Plagiarized
Some pointer bullshit you can probably pull off (from C):
// this is one of the tests in this projects
&people.pets.* += calculate >= threshold * active
Functions as values (from Java i think):
// this is also a test
int average_java_developer =
Parentheses (invented by Lisp):
Semicolons (invented by javascript because i hate javascript and i hate semicolons):
// scroll up to the part about semicolons i hate talking about them more than i need too
STRUCTS!! FROM HIT LANGUAGE RUST!!
Person josch =
Dereferencing from Zig bc that syntax is nicee
&int var = &5
void increment =
increment
If Statements
Keywords? I think? im not sure i blacked out when i was adding this part. this code might ont even run but its in my tests (from python? maybe lua?)
if thing else if other_thing else
wait no keywords are optional
if if if thing else else else if if other_thing else if if
[!NOTE]
elseis required due to technical limitations (treesitter). Getting rid ofifis fine though.thing { } else other_thing { } else { }
Structs and Maps
also maps and structs share the same syntax so they have to be declared in their declaration
// THIS IS FINE
Frog frg =
map slur_count =
// THIS WONT WORK
frg =
slur_count =
// I THINK REASSIGNING THEM IS FINE THOUGH
Frog frg =
map slur_count =
You can declare struct literals like its Rust if you need them inline:
Frog new_frg = mitose
Also from Zig, builtins:
@print: Uses Rust's string interpolotation to println!
@<type>: Try casting to a certain BUILT IN type
treesitter is begging for its dear life
Basically anytime you see something that doesn't need to be there you can probably remove it. Or add extra.
// example: commas in maps
map round_table =
Voiding Values
When you call a function, its required to use all of it's values. If you don't need to use them, assign them to the special _ variable, which discards its value when its set:
_ = returns_value
Theres a special keyword for this action: void
void returns_value
Yes, it's the same void as the type.
[!NOTE] The void keyword is optional
returns_value
Installation
[!IMPORTANT] Rust is required to use this project. You can install Rust through the official website.
Cargo (Recommended)
cargo install frg- Only 31 dependencies, installs quickly
- Execute with
frg -hanywhere
Linux
- Go to the latest release
- Download
frg-linux-[ARCH] - Rename to
frg - Execute with
./frg -hwhile in the directory with the binary
Linux
- Go to the latest release
- Download
frg-macos-[ARCH] - Rename to
frg - Execute with
./frg -hwhile in the directory with the binary
Windows
- Go to the latest release
- Download
frg-windows-[ARCH].exe - Rename to
frg.exe - Execute with
frg.exe -hwhile in the directory with the binary
Style Guide
fuck around and find out