Skip to content

Instantly share code, notes, and snippets.

Avatar

Dmitrii Kosarev Kakadu

View GitHub Profile
View gist:6b4d4b71eb5aaf2a44c66749f671481e
➜ /tmp echo "" > a.ml && ocamlfind opt -output-obj a.ml -o camlcode.o
➜ /tmp gcc -m32 -o myprog camlcode.o -L`ocamlc -where` -lasmrun -ldl -lm
➜ /tmp which ocamlc
/home/kakadu/.opam/4.11.2+32bit/bin/ocamlc
➜ /tmp file myprog
myprog: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, BuildID[sha1]=e9f3726edcbf6201667f87a20fb45700e1219763, for GNU/Linux 3.2.0, with debug_info, not stripped
View log.txt
This file has been truncated, but you can view the full file.
➜ embox git:(master) make confload-x86/qemu && make -j3
Config complete
MKGEN mk_core_def.mk
MKGEN mk_core_obj.mk
MKGEN mk_util.mk
MKGEN mk_gold_engine.mk
MKGEN mk_model.mk
MKGEN mk_annotations_core.mk
@Kakadu
Kakadu / config.txt
Created Mar 17, 2021
Qt build results
View config.txt
➜ qt-lite-build ../configure-qt-lite QMAKE_FXXLAGS=-no-exceptions
+ cd qtbase
+ /home/kakadu/prog/qt/qt5/qtbase/configure -top-level -ltcg -make libs -no-pch -opensource -confirm-license -no-feature-itemmodeltester -no-feature-sqlmodel -no-feature-tuiotouch -no-feature-vulkan -no-feature-imageformat_ppm -no-feature-colordialog -no-feature-dialog -no-feature-dialogbuttonbox -no-feature-errormessage -no-feature-fontdialog -no-feature-inputdialog -no-feature-messagebox -no-feature-printdialog -no-feature-printpreviewdialog -no-feature-progressdialog -no-feature-wizard -no-feature-dom -no-feature-filedialog -no-feature-filesystemmodel -no-feature-filesystemwatcher -no-feature-dirmodel -no-feature-iconv -no-feature-big_codecs -no-feature-codecs -no-feature-translation -no-feature-sharedmemory -no-feature-systemsemaphore -no-feature-concurrent -no-feature-textmarkdownreader -no-feature-textmarkdownwriter -no-feature-sessionmanager -no-feature-textodfwriter -no-feature-cssparser -no-feature-texthtmlparser -no-featu
@Kakadu
Kakadu / qt-config-log.txt
Last active Mar 17, 2021
Trying to configure Qt5: xkbcommon-x11 not found, so no xcb QPA plugin
View qt-config-log.txt
➜ qt-lite-build /usr/bin/pkg-config --exists xkbcommon-x11
➜ qt-lite-build /usr/bin/pkg-config --libs xkbcommon-x11
-lxkbcommon-x11 -lxkbcommon
➜ qt-lite-build
➜ qt-lite-build
➜ qt-lite-build
➜ qt-lite-build
➜ qt-lite-build
➜ qt-lite-build
➜ qt-lite-build ../configure-qt-lite -v -feature-thread -feature-xkbcommon-x11 -xcb
View txt
➜ gt-dune git:(master) ✗ opam pin
aez.0.3 rsync file:///media/oldhome/kakadu/prog/asp/aez-0.3
bitvector-mk.0.1.0 (uninstalled) git git+file:///media/oldhome/kakadu/prog/asp/bitvector-mk#master
github-workflow.~dev git git+https://github.com/patricoferris/opam-github-workflow.git
GT.0.4.2 git git+file:///media/oldhome/kakadu/prog/asp/gt-dune#master
lablqml.0.6.2 (uninstalled) git git+file:///media/oldhome/kakadu/prog/ocaml/lablqml#master
noCanren.0.2.0 git git+file:///media/oldhome/kakadu/prog/asp/noCanren#4.10
ocaml-version.dev git git+https://github.com/ocurrent/ocaml-version
opam-github-workflow.~dev (uninstalled) git git+https://github.com/patricoferris/opam-github-workflow.git
pa_ppx.0.07 (uninstalled) git git+https://github.com/camlp5/pa_ppx.git
View gist:c1f50c21801e9582f22e5c54725884ba
✗ find / -iname "*libgcc*" -xdev 2>/dev/null
/var/lib/dpkg/info/libgcc-s1:i386.md5sums
/var/lib/dpkg/info/libgcc-s1:i386.shlibs
/var/lib/dpkg/info/libgcc-s1:i386.symbols
/var/lib/dpkg/info/libgcc-s1:amd64.md5sums
/var/lib/dpkg/info/libgcc-s1:amd64.shlibs
/var/lib/dpkg/info/libgcc-s1:amd64.symbols
/var/lib/dpkg/info/libgcc-s1:amd64.triggers
/var/lib/dpkg/info/libgcc-s1:amd64.list
/var/lib/dpkg/info/libgcc-s1:i386.triggers
View gist:29d28cac066e36b8ad4de58d02dff46c
✗ CMAKE_MODULE_PATH=/home/kakadu/prog/qt/qt_off/6.0.1/gcc_64/lib/cmake/ cmake --find-package -DNAME="Qt6" -DCOMPILER_ID=GNU -DMODE=EXIST -DLANGUAGE=CXX
CMake Error at /usr/share/cmake-3.16/Modules/FindThreads.cmake:49 (message):
FindThreads only works if either C or CXX language is enabled
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/CMakeFindDependencyMacro.cmake:47 (find_package)
/home/kakadu/prog/qt/qt_off/6.0.1/gcc_64/lib/cmake/Qt6/Qt6Dependencies.cmake:41 (find_dependency)
/home/kakadu/prog/qt/qt_off/6.0.1/gcc_64/lib/cmake/Qt6/Qt6Config.cmake:76 (include)
/usr/share/cmake-3.16/Modules/CMakeFindPackageMode.cmake:183 (find_package)
@Kakadu
Kakadu / or.scala
Created Jan 25, 2021
Scala 2 with or type
View or.scala
sealed trait AST
case class ConstInt(x: Int) extends AST
case class ConstDouble(x: Double) extends AST
case class SomethingElse() extends AST
type ¬[A] = A => Nothing
type [T, U] = ¬[¬[T] with ¬[U]]
type ¬¬[A] = ¬[¬[A]]
type |∨|[T, U] = { type λ[X] = ¬¬[X] <:< (TU) }
@Kakadu
Kakadu / merlin.log.json
Created Jan 13, 2021
Testing camlp5 with merlin
View merlin.log.json
# 0.03 New_merlin - run
changed directory to "/media/oldhome/kakadu/prog/asp/camlp5_pp_demo"
# 0.03 Mconfig - normalize
{
"ocaml": {
"include_dirs": [],
"no_std_include": false,
"unsafe": false,
"classic": false,
"principal": false,
@Kakadu
Kakadu / dune
Created Jan 12, 2021
demo with camlp5 rewriter for OCaml
View dune
(env
(dev
(flags (:standard -rectypes -warn-error -A -w -33))
))
(library
(name lib1)
(modules lib1)
(preprocess (action
(run %{project_root}/rewriter.exe %{input-file})))