1 + 2 // 3
// int's class:
class int
func +(value: int): int
return CSharpMethods.pl(self, value)Another idea:
1 + 2 // 3| when :playerJoin do |activity,player| | |
| # Unlike Ruby, the `?` turns any datatype to a bool, depending on whether it has content | |
| # False -> | |
| # # 0, "", false, 0.0, [], {}, nil, undefined | |
| # True -> | |
| # # Everything else. | |
| if player.meta.banned? == true | |
| player.kick player.meta.banned | |
| activity.cancel | |
| else |
| body :: [String, String] := [ | |
| "name" := "example", | |
| "entry" := "Program.ot", | |
| "includes" :: [String] := [ | |
| "Program.ot" | |
| ] | |
| "out" := "program.exe" | |
| ] |
| class Program(args: [string]) | |
| func Program.con(): int { | |
| console.log("Ran program.") | |
| 0 | |
| } |
| import datetime | |
| gss = input("guess? ") | |
| def isornot(password): | |
| global gss | |
| if password == gss: | |
| return True | |
| else: | |
| return False |
| # use as require_relative "hi" | |
| def hi(name) | |
| puts "Hi #{name}, how you doing?" | |
| end |
| # Ruby is this: | |
| print "name?: " | |
| name = gets.chomp | |
| puts "Hi #{name}" | |
| # Tie is this, yes its type safe, but not OOP: | |
| gets "name?: " |> name # string is inferred due to gets returning string | |
| puts "Hi #{name}" |
| include("WebKit") | |
| include("FileKit") | |
| server: object = WebKit::establish("0.0.0.0", ~) | |
| server.request: func = string | context : set | | |
| if(context["path"].ends("/")) | |
| context["path"] += "index.html" | |
| FileKit::read(context["path"]) | |
| server.start() |
1 + 2 // 3
// int's class:
class int
func +(value: int): int
return CSharpMethods.pl(self, value)Another idea:
1 + 2 // 3| { | |
| "name": "Example Gist", | |
| "depends": [ | |
| "Console", | |
| "Stream", | |
| "File" | |
| ], | |
| "version": "0.0.0.1" | |
| } |
| import('request') | |
| import('io') | |
| every(60000) io('ip.json')write(request.https('api.ipify.org?format=json') end | |