Skip to content

Instantly share code, notes, and snippets.

@dullbananas
dullbananas / Main.love
Last active April 26, 2020 17:08
love - programming language
module Main exporting
- main
procedure main =
file : Io.stream <- loop getFilename:
case do Util.promptFileName:
Ok stream ->
Loop.exit getFilename stream
@dullbananas
dullbananas / basics.ts
Last active May 13, 2020 19:56
EditSC extension API concept
declare const editsc; // Tells TypeScript that this variable is defined elsewhere
editsc.init({
useVersion: "1.0", // The version of the extension API to use
name: "Basics",
});
// Defines an action allowing the user to select a
// block and replace it with a different block
editsc.action({
@dullbananas
dullbananas / EA.elm
Created June 9, 2020 19:24
EA Ports. It's in the game.
module EA exposing (..)
port ea0 : Int -> Cmd msg
port ea1 : Int -> Cmd msg
port ea2 : Int -> Cmd msg
port ea3 : Int -> Cmd msg
port ea4 : Int -> Cmd msg
port ea5 : Int -> Cmd msg
@dullbananas
dullbananas / Main.elm
Created February 28, 2021 20:35
Impure function in Elm
random : Value -> Float
random =
decodeValue (field "random" float)
@dullbananas
dullbananas / index.js
Created January 16, 2022 21:04
minimal deta micro example
const app = function(request, response) {
response.writeHead(200, {
"Content-Type": "text/html",
});
response.end("Hello world");
};
module.exports = app;