https://medium.com/@walkert/fun-building-shared-libraries-in-go-639500a6a669
https://www.darkcoding.net/software/building-shared-libraries-in-go-part-2/
| // Sample usage of tingygo's go-llvm package to generate a | |
| // function and generate a bit of code | |
| // In order to compile this sample llvm needs to be installed first, the instructions here should be followed | |
| // to install to the system: https://tinygo.org/docs/guides/build/bring-your-own-llvm/ | |
| package main | |
| import ( | |
| "fmt" | |
| "tinygo.org/x/go-llvm" |
| (use-modules | |
| (chickadee) | |
| (chickadee math vector) | |
| (chickadee graphics texture) | |
| (chickadee graphics sprite)) | |
| (define sprite #f) | |
| (define load (lambda () | |
| (set! sprite (load-image "chickadee.png")))) |
| -- Xmobar (http://projects.haskell.org/xmobar/) | |
| -- This is one of the xmobar configurations for DTOS. | |
| -- This config is packaged in the DTOS repo as 'dtos-xmobar' | |
| -- Color scheme: Doom One | |
| -- Dependencies: | |
| -- otf-font-awesome | |
| -- ttf-mononoki | |
| -- ttf-ubuntu-font-family | |
| -- htop | |
| -- emacs |
| -- Base | |
| import XMonad | |
| import System.Directory | |
| import System.IO (hPutStrLn) | |
| import System.Exit (exitSuccess) | |
| import qualified XMonad.StackSet as W | |
| -- Actions | |
| import XMonad.Actions.CopyWindow (kill1) | |
| import XMonad.Actions.CycleWS (Direction1D(..), moveTo, shiftTo, WSType(..), nextScreen, prevScreen) |
| /* See LICENSE file for copyright and license details. */ | |
| /* | |
| * appearance | |
| * | |
| * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html | |
| */ | |
| //static char *font = "xft:SauceCodePro Nerd Font Mono:regular:size=9:antialias=true:hinting=true"; | |
| static char *font = "Liberation Mono:regular:size=13:antialias=true:hinting=true"; | |
| //Liberation Mono:pixelsize=12:antialias=true:autohint=true"; |
| module coral.component.filetree; | |
| import core.thread; | |
| import gdk.Pixbuf : Pixbuf; | |
| import gtk.IconTheme : IconTheme; | |
| import gtk.TreeIter : TreeIter; | |
| import gtk.TreeStore : TreeStore; | |
| import gtk.TreeView : TreeView; | |
| import gtkc.gtk : GtkIconLookupFlags; |
| const char* metatableName = "AppWindowMetaTable"; | |
| void registerMainWindow(State luaState, AppWindow initialWindow) | |
| { | |
| lua_State* state = luaState.state; | |
| AppWindow* window = cast(AppWindow*)lua_newuserdata( | |
| state, initialWindow.sizeof); | |
| *window = initialWindow; |
| #include <unistd.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <sys/wait.h> | |
| #include <string> | |
| int main() | |
| { | |
| int my_pipe[2]; | |
| if (pipe(my_pipe) == -1) { |