Skip to content

Instantly share code, notes, and snippets.

@ray-delossantos
ray-delossantos / gist:5e428c8e275cde6a01905b7dd9a26840
Created November 27, 2017 18:40
Trying Cordova with Barcode Scanner Plugin and Karax
# <Araq> I don't know what to say, callbacks are not special. a Nim proc is mapped to a JS function, just pass it around
# <Araq> proc takesCallback(x: proc()) {.importc.}
# <Araq> takesCallback proc =
# <Araq> echo "my code here"
include karax / prelude
from future import `=>`
import karax / errors
type
store Application {
property page : String = ""
property pages : Array(Ui.Pager.Item) = {
[
{
name = "home",
contents = <Home/>,
url = "/home",
icon = "fa-home",
arrangement = 10
const std = @import("std");
const net = std.net;
const Allocator = std.mem.Allocator;
pub const io_mode = .evented;
var client_id_counter: u32 = 0;
var should_server_close: bool = false;
pub fn main() !void {