Skip to content

Instantly share code, notes, and snippets.

View bigos's full-sized avatar

Jacek Podkanski bigos

  • North West England
View GitHub Profile
@bigos
bigos / simple-ui.lisp
Created June 26, 2022 21:30
Example simple UI key driven app written in Common Lisp
(declaim (optimize (speed 1) (safety 2) (debug 3)))
(eval-when (:compile-toplevel :load-toplevel :execute)
(ql:quickload '(:draw-cons-tree :alexandria :serapeum :cl-cffi-gtk :defclass-std)))
(require 'sb-concurrency)
(defpackage :struct-ui-device
(:use #:cl
#:cffi
@bigos
bigos / sbcl-win-gtk-notes.org
Created April 23, 2019 21:55
Notes for creating gtk executable on windows 10

Prequisites

Msys2

Emacs

quicklisp

local-projects

We are going to use version that is not part of quicklisp. In local project place neccesary code executing the below example in a Msys2 terminal.

cd c:/Users/IEUser/quicklisp/local-projects/
@bigos
bigos / windowsSBCLnotes.org
Last active April 21, 2019 21:27
running example gtk cairo game on windows and sbcl 1.4.14

Notes

install sbcl and quicklisp

make sure you have the all libraries

$ ls /c/msys64/mingw64/bin/*dll
/c/msys64/mingw64/bin/edit.dll                           /c/msys64/mingw64/bin/libjson-glib-1.0-0.dll
/c/msys64/mingw64/bin/libaspell-15.dll                   /c/msys64/mingw64/bin/liblcms2-2.dll
/c/msys64/mingw64/bin/libasprintf-0.dll                  /c/msys64/mingw64/bin/liblqr-1-0.dll
/c/msys64/mingw64/bin/libatk-1.0-0.dll                   /c/msys64/mingw64/bin/libltdl-7.dll
/c/msys64/mingw64/bin/libatomic-1.dll                    /c/msys64/mingw64/bin/liblzma-5.dll

Installing SBCL from source on Windows

This tutorial assumes you have installed binary version of SBCL downloaded from http://www.sbcl.org/platform-table.html

Also, it assumes you have Msys2 installed. https://www.msys2.org/ And all the tools needed for compilation are there.

On top of that I used Windows cmd started from a bat file that adds Msys2 paths.

#!/usr/local/bin/sbcl --script
(define-alien-routine gtk_application_window_new (* t) (app (* t)))
(define-alien-routine gtk_application_new (* t) (txt c-string) (flags int))
(define-alien-routine g_application_run int
(app (* t)) (argc int) (argv (* t)))
(define-alien-routine g_signal_connect_data int ;
@bigos
bigos / elm-turbolinks.org
Created October 26, 2018 10:56
Description of my attempt to make turbolinks play nicely with elm
@bigos
bigos / Java8netbeans.org
Created September 4, 2018 20:16
Java 8 and Netbeans

Java

Assumptions

This write-up assumes Ubuntu 18.04 or similar, with OpenJDK installed

links

jacek@jacek-ixtreme-M5850:~/Desktop$ ls -al /usr/bin/java
lrwxrwxrwx 1 root root 22 Jul  9 20:09 /usr/bin/java -> /etc/alternatives/java
@bigos
bigos / nestedIfs.hs
Created August 26, 2018 23:51
problem with nesting if statements in haskell
check_if_proceed configFolders = do
let emacsdf = "/home/jacek/.emacs.d"
traceM ("calling check_if_proceed " ++ show ("ccc",configFolders))
exists <- doesDirectoryExist emacsdf
symlink <- pathIsSymbolicLink emacsdf
let confemp = configFolders == []
let result = False
if exists
then do
{
@bigos
bigos / Main.elm
Last active August 16, 2018 22:31
Elm code for parsing json data
module Main exposing (..)
import Html exposing (Html, text, div, h1, img, p, ul, li, hr)
import Html.Attributes exposing (src)
import Json.Decode exposing (..)
import ISO8601
---- MODEL ----
@bigos
bigos / README.md
Created June 18, 2018 11:57 — forked from cypriss/README.md
Rails 2.3.14 Ruby 1.9.3 - Monkey Patches

How we upgraded UserVoice, a Rails 2.3.14 app, to Ruby 1.9.3.

Blog post here