wavebeem

world wide weirdo

Ā 

šŸ’• @hauntedlatte

šŸ  portland, or, usa

šŸ“† mid-30s

šŸ’¬ here to make friends and chat

Ā 


Ā 

šŸŽ® video games
šŸ‘©šŸ»ā€šŸ’» web development
šŸ‘©šŸ»ā€šŸ« teaching others

Ā 


Ā 

šŸŽØ digital aesthetics
šŸ’…šŸ» makeup & jewelry
šŸ‘— gothic fashion
šŸ‘©šŸ»ā€šŸŽØ making pixel art

Ā 


Ā 

šŸ¤˜šŸ» progressive metal
šŸŽø video game music

Ā 


Ā 

🟢 everything green
🌟 neon colors and transparent plastic

Ā 


blog + rss
wavebeem.com/
discord
@wavebeem

posts from @wavebeem tagged #cohost tools

also:

i've updated codehost to use the new version of my miasma theme :) it's also back as the default theme now.

new

// 3... 2... 1... Blast-off!
async function countdown(): Promise<void> {
  for (let i = 10; i > 0; i--) {
    console.log(i);
    await sleep(1000);
  }
  console.log("Blast-off!");
}

/**
 * `setTimeout` for `delay` miliseconds
 */
async function sleep(delay: number): Promise<void> {
  return new Promise((resolve) => {
    setTimeout(resolve, delay);
  });
}

countdown();
syntax highlighting by codehost

old

// 3... 2... 1... Blast-off!
async function countdown(): Promise<void> {
  for (let i = 10; i > 0; i--) {
    console.log(i);
    await sleep(1000);
  }
  console.log("Blast-off!");
}

/**
 * `setTimeout` for `delay` miliseconds
 */
async function sleep(delay: number): Promise<void> {
  return new Promise((resolve) => {
    setTimeout(resolve, delay);
  });
}

countdown();
syntax highlighting by codehost


  • codehost now supports every Prism.js language
  • improved footer to match code theme
  • improved Miasma to better match my vscode theme
  • removed other themes (sorry! i'm tired of maintaining more than one theme)

GDScript example

# Everything after "#" is a comment.
# A file is a class!

# (optional) icon to show in the editor dialogs:
@icon("res://path/to/optional/icon.svg")

# (optional) class definition:
class_name MyClass

# Inheritance:
extends BaseClass


# Member variables.
var a = 5
var s = "Hello"
var arr = [1, 2, 3]
var dict = {"key": "value", 2: 3}
var other_dict = {key = "value", other_key = 2}
var typed_var: int
var inferred_type := "String"

# Constants.
const ANSWER = 42
const THE_NAME = "Charly"

# Enums.
enum {UNIT_NEUTRAL, UNIT_ENEMY, UNIT_ALLY}
enum Named {THING_1, THING_2, ANOTHER_THING = -1}

# Built-in vector types.
var v2 = Vector2(1, 2)
var v3 = Vector3(1, 2, 3)


# Functions.
func some_function(param1, param2, param3):
    const local_const = 5

    if param1 < local_const:
        print(param1)
    elif param2 > 5:
        print(param2)
    else:
        print("Fail!")

    for i in range(20):
        print(i)

    while param2 != 0:
        param2 -= 1

    match param3:
        3:
            print("param3 is 3!")
        _:
            print("param3 is not 3!")

    var local_var = param1 + 3
    return local_var


# Functions override functions with the same name on the base/super class.
# If you still want to call them, use "super":
func something(p1, p2):
    super(p1, p2)


# It's also possible to call another function in the super class:
func other_something(p1, p2):
    super.something(p1, p2)


# Inner class
class Something:
    var a = 10


# Constructor
func _init():
    print("Constructed!")
    var lv = Something.new()
    print(lv.a)
syntax highlighting by codehost

Ā