Data update

This commit is contained in:
Ingy döt Net 2025-02-27 18:35:13 -05:00
parent 8e4e15fa56
commit 72eb4943cb
1853 changed files with 35514 additions and 9441 deletions

View file

@ -1,6 +0,0 @@
/* Hostname.wren */
class Host {
foreign static name() // the code for this is provided by Go
}
System.print(Host.name())

View file

@ -1,25 +0,0 @@
/* Hostname.go */
package main
import (
wren "github.com/crazyinfin8/WrenGo"
"os"
)
type any = interface{}
func hostname(vm *wren.VM, parameters []any) (any, error) {
name, _ := os.Hostname()
return name, nil
}
func main() {
vm := wren.NewVM()
fileName := "Hostname.wren"
methodMap := wren.MethodMap{"static name()": hostname}
classMap := wren.ClassMap{"Host": wren.NewClass(nil, nil, methodMap)}
module := wren.NewModule(classMap)
vm.SetModule(fileName, module)
vm.InterpretFile(fileName)
vm.Free()
}

View file

@ -0,0 +1,3 @@
import "os" for Platform
System.print(Platform.hostName)