~siarie

Syntax Highlight

Demo syntax highlighting.

Golang

package main

import "fmt"

func main() {
	fmt.Println("Hello, world!")
	return;
}

PHP

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
<?php

require "class/DB.php";

$db = DB::init();

$stmt = $db->prepare(<<<SQL
	SELECT id, name, email, created_at
	FROM member
	WHERE id = :id
SQL);
$stmt->bindParam(":id", 12, PDO::PARAM_INT);
$stmt->execute();

$user = $stmt->fetch(PDO::FETCH_OBJ);
printf("ID\t:%s\n", $user->id);
printf("Name\t:%s\n", $user->name);
printf("Email\t:%s\n", $user->email);
printf("Joined at\t:%s\n", $user->created_at);

OCaml

1
2
3
4
5
type User = {id : int; name : string};; 
val user : User = {id = 1000; name = "siarie"};;

Printf.printf "ID\t: %d" user.id;; 
Printf.printf "Username\t: %s" user.name;;

Lisp/Scheme

;; Create variable with define
(define x 50)

;; Function
(define (multiply x) (* x x))
(multiply x)