Skip to content

Instantly share code, notes, and snippets.

View Kakadu's full-sized avatar

Dmitrii Kosarev Kakadu

  • (ex-)JetBrains Research
  • Saint-Petersburg, Russia
View GitHub Profile
@Kakadu
Kakadu / qt_install.sh
Last active August 29, 2015 14:03
Travis script to install qt.
#!/usr/bin/env bash
set +x +e
TAR=qt-everywhere-opensource-src-5.3.1
wget http://download.qt-project.org/archive/qt/5.3/5.3.1/single/$TAR.tar.xz
echo Unpacking....
tar -xf $TAR.tar.xz
cd $TAR
@Kakadu
Kakadu / get_qt.sh
Last active June 21, 2019 21:22
Script to install Qt 5.2.1 on Ubuntu 12.04 LTS
#!/usr/bin/env bash
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu trusty universe"
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu trusty main"
sudo apt-get update
sudo apt-get install qdbus qmlscene qt5-default qt5-qmake qtbase5-dev-tools qtchooser qtdeclarative5-dev xbitmaps xterm libqt5svg5-dev qttools5-dev qtscript5-dev qtdeclarative5-folderlistmodel-plugin qtdeclarative5-controls-plugin -y
@Kakadu
Kakadu / get_qt5.sh
Last active August 29, 2015 14:04
Installing Qt5 on 12.04 with abandoning package dependencies.
#!/usr/bin/env bash
set -x -e
lsb_release -a
uname -a
UBUNTU_PREFIX=http://fr.archive.ubuntu.com/ubuntu/pool/main
PACKAGES="\
$UBUNTU_PREFIX/i/icu/libicu52_52.1-3_amd64.deb \
@Kakadu
Kakadu / Test.qml
Last active August 29, 2015 14:04
Demo for opening a dialog. I can't set initial directory for the fialog. Is it a bug?
import QtQuick 2.1
import QtQuick.Controls 1.0
import QtQuick.Layouts 1.0
import QtQuick.Dialogs 1.0
ApplicationWindow {
width: 640
height: 480
FileDialog {
@Kakadu
Kakadu / APP.log
Last active August 29, 2015 14:08
Civ5 crash
[0.326] DBG: Command Line Args:
@Kakadu
Kakadu / log
Last active August 29, 2015 14:16
Craft the world under wine crashes.
......
_xgeWireToEvent: Unknown extension 148, this should never happen.
fixme:dbghelp_msc:codeview_fetch_type Cannot locate type 103
fixme:dbghelp_msc:codeview_fetch_type Cannot locate type 103
fixme:dbghelp_msc:codeview_get_type Returning NULL symt for type-id 103
fixme:dbghelp_msc:codeview_snarf S-Udt nullptr_t: couldn't find type 0x103
fixme:dbghelp_msc:codeview_snarf Unsupported symbol id 114c
fixme:dbghelp_msc:dump 00000000: 06 00 4c 11 0a 10 00 00 ..L.....
@Kakadu
Kakadu / exanding1.log
Created March 14, 2015 13:00
Scala code with FastParsers library and macro expanding with `-Ymacro-debug-lite`
Piece of code which was expanded.
val trueValue = "true".toCharArray
val falseValue = "false".toCharArray
object KParser1 {
import fastparsers.framework.implementations.FastParsersCharArray._
val kparser = FastParsersCharArray {
def func1: Parser[Any] = func1 | falseValue
@Kakadu
Kakadu / gist:aa747c54eb6d3ef39551
Created November 18, 2015 00:01
Js_of_ocaml toplevel compilation log
➜ toplevel git:(toplevel-experiment) ✗ make clean all
rm -f *.cm[io] *.byte *.native *.js
ocamlfind ocamlc -c -package js_of_ocaml,js_of_ocaml.tyxml colorize.mli
cppo -D ocpindent -D higlo -D graphics colorize.cppo.ml -o colorize.ml
ocamlfind ocamlc -c -syntax camlp4o -package bytes \
-package js_of_ocaml.syntax,lwt,js_of_ocaml.tyxml,js_of_ocaml.toplevel \
-package base64 \
-I camlp4 \
-package ocp-indent.lib -package higlo.ocaml -rectypes \
colorize.ml -c colorize.cmo
@Kakadu
Kakadu / gist:4eb426217a49a059364b
Created January 25, 2016 17:05
OCaml 4.02.3 with modular implicits
module type Show = sig
type t
val show : t -> unit
end;;
let print {S : Show} x = S.show x;;
implicit module Show_float = struct
type t = float
let show x = Printf.printf "Show_float: %f\n" x
@Kakadu
Kakadu / madness.ml
Last active March 11, 2016 10:06
type madness 1: in OCaml and functional unparsing.
module List = struct
include List
let take : int -> 'a list -> 'a list = fun _ _ -> failwith "omitted because we only need types"
end
let id x = x;;
type 'a logic = Var of int | Value of 'a
(* State also contains some information about logic variables' bindings but is is omitted for simplicity *)