Skip to content

Instantly share code, notes, and snippets.

View mwja's full-sized avatar
🏔️

Jacob MacKenzie-Websdale mwja

🏔️
View GitHub Profile
@mwja
mwja / Code.spade.rb
Last active May 7, 2017 10:48
An example of Spade programming language for Bukkit
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
@mwja
mwja / Details.oton.rb
Last active April 9, 2017 17:37
An example program in Otter, ruby extension for highlighting.
body :: [String, String] := [
"name" := "example",
"entry" := "Program.ot",
"includes" :: [String] := [
"Program.ot"
]
"out" := "program.exe"
]
@mwja
mwja / project.st
Created April 6, 2017 09:30
program.st
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
@mwja
mwja / hi.rb
Created February 23, 2017 08:23
Hi!
# use as require_relative "hi"
def hi(name)
puts "Hi #{name}, how you doing?"
end
@mwja
mwja / code.rb
Last active February 22, 2017 18:56
It's new Ruby, it's Tie
# 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}"
@mwja
mwja / code.tie
Last active February 22, 2017 17:12
project of tie (using the final stated design) - just a web server app.
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()
@mwja
mwja / code.md
Last active February 22, 2017 08:32
Tie lang
1 + 2 // 3
// int's class:
class int
  func +(value: int): int
    return CSharpMethods.pl(self, value)

Another idea:

1 + 2 // 3
@mwja
mwja / Otter.otterproj
Last active February 2, 2017 08:03
A program written in Otter
{
"name": "Example Gist",
"depends": [
"Console",
"Stream",
"File"
],
"version": "0.0.0.1"
}
@mwja
mwja / script.stitch
Created October 29, 2016 11:09
Stitch program to automate dynamic up grabbing.
import('request')
import('io')
every(60000) io('ip.json')write(request.https('api.ipify.org?format=json') end