Skip to content

Instantly share code, notes, and snippets.

View robinp's full-sized avatar

Robin Palotai robinp

  • Budapest, Hungary
View GitHub Profile
@robinp
robinp / lusta_legény.txt
Created October 13, 2023 07:04
A lusta legény (kocka mese)
View lusta_legény.txt
Hol volt, hol nem volt, volt egyszer egy lusta legény. Naphosszat a földön
feküdt és csak bámulta az eget. Egy nap, ahogy így fekszik ott, arra száll egy
szúnyog. Markába kapja, és talán még össze is lapítja, ha a szúnyog meg nem
szólal:
- Ne bánts engem te legény! Engedj szabadon, s meglásd, jó tett helyében jót
várj!
Gondolja a legény, nézzük, mi sül ki ebből! Elengedi hát, mire ezt zizegé a kis
szúnyog:
View line_pragma_plugin.hs
{-# LANGUAGE CPP #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}
@robinp
robinp / main.lua
Created April 13, 2020 14:07
Source for Lua+Löve game programming tutorial, part 01
View main.lua
print("Hello")
kartyak = 8
kartyaFelforditva = {
[1] = false,
[2] = false,
[3] = false,
[4] = false,
[5] = false,
@robinp
robinp / nixos-hydra-git.txt
Last active December 3, 2023 20:41
Hydra with Git setup links
View nixos-hydra-git.txt
Lots of goodies like <githubstatus> pinging.
https://github.com/input-output-hk/iohk-ops/blob/bc8195de286d8b9b55b06f2046ab5412307a51b6/modules/hydra-master-common.nix
Declarative jobset bootstrapping:
https://github.com/shlevy/declarative-hydra-example
Declarative jobset with Git PR evals:
https://github.com/cleverca22/hydra-configs/tree/master/toxvpn
Other notes:
@robinp
robinp / index-kythe.sh
Last active December 5, 2020 07:14
Indexing Kythe Go parts
View index-kythe.sh
bazel build kythe/go/languageserver/... --experimental_action_listener kythe/go/extractors/cmd/bazel:extract_kzip_go
./bazel-bin/kythe/go/indexer/cmd/go_indexer/go_indexer $(find bazel-out/k8-fastbuild/extra_actions -name '*.go.kzip') > go.ents
./bazel-bin/kythe/go/serving/tools/write_tables/write_tables --experimental_beam_pipeline --entries go.ents --out /data/kythe/beamed
# To serve it:
# Note: public_resources set to /tmp since not needed when only API is used.
./bazel-bin/kythe/go/serving/tools/http_server/http_server --serving_table /data/kythe/beamed --listen 0.0.0.0:8080 --public_resources /tmp
@robinp
robinp / Streaming.hs
Created March 31, 2019 09:19
LevelDB Stream merging and grouping
View Streaming.hs
{- Note: originally for treetide.com -}
{- Releasing under Apache 2.0 licence (https://www.apache.org/licenses/LICENSE-2.0), feel free to reuse accordingly. -}
{-# LANGUAGE TupleSections #-}
module Database.LevelDB.Streaming.Extended
( module X
, mergeStreams
, groupStream
)
where
@robinp
robinp / github-vertical-unspace.user.css
Last active April 17, 2020 07:19
Stylus script for to make github code review vertically more compact.
View github-vertical-unspace.user.css
/* Remove below comment in Stylus */
// Install Stylus, a minimal permissions CSS-modifier: https://chrome.google.com/webstore/detail/stylus/clngdbkpkpeebahjckkjfobafhncgmne//
// Set to use regex match https://github.com/.*/pull/.*/files
// also https://github.com/.*/commit/.*#diff-.*
body {
font-size: 12px;
}
.blob-num {
@robinp
robinp / run.bat
Created February 10, 2019 22:11
Converting image dirs to pdf using imagemagick on Windows
View run.bat
for /D %%f in (*) do (
cd %%f
mkdir annotated
magick mogrify -path annotated -set filename:xxx %%t -fill black -undercolor white -gravity southwest -pointsize 24 -annotate +0+0 "%%[filename:xxx]" *png *jpg
magick convert annotated/* ../%%~nf.pdf
rm -r annotated
cd ..
)
@robinp
robinp / Bazel build error
Created January 17, 2019 10:49
Bazel action_env gets lost somewhere
View Bazel build error
$ sh invoke-build.sh kythe/cxx/extractor/...
...
SUBCOMMAND: # //kythe/cxx/extractor:index_pack [action 'Compiling kythe/cxx/extractor/index_pack.cc [for host]']
(cd /home/ron/.cache/bazel/_bazel_ron/084c77e61dfc73e2d0fc7fb1fb9a9252/execroot/io_kythe && \
exec env - \
PATH=/nix/store/vs6d2fjkl4kb3jb7rwibsd76k9v2n4xy-bash-4.4-p23/bin:/nix/store/lvhndwdy2q09fhwgzykjjigz7yxq5yiv-coreutils-8.30/bin:/nix/store/5c2428hk25dwsgnifcmn5dvgrwvvgvrx-findutils-4.6.0/bin:/nix/store/9jjxqhwak78zi94m7gvwdw3gqzd1hr1b-gawk-4.2.1/bin:/nix/store/f7c1ijdv5czqb0dxi4mi5wkfvi1pc7rn-gnugrep-3.3/bin:/nix/store/4lvbww6zrphadhcbqidx8qskc0rsblg6-gnused-4.7/bin:/nix/store/mwc5mwvw080nbahpdc0xr1rk3mhkcdp1-which-2.21/bin:/nix/store/c39nikyab2qfifbqzy7hqqkhvk7k05ca-unzip-6.0/bin \
PWD=/proc/self/cwd \
/nix/store/isg8rxaxkijl9x3hr2gzsf8pqfnqxg3k-gcc-wrapper-7.4.0/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -B/nix/store/isg8rxaxkijl9x3hr2gzsf8pqfnqxg3k-gcc-wrapper-7.4.0/bin -B/usr/bin -Wunused-but-set-parameter -Wno-free-n
View Kythe-LSIF.txt
I'm not very familiar with LSP/LSIF so far, but gave a quick read and here's a summary of LSP/LSIF vs Kythe:
- Documentation: LSP/LSIF protocol seems well documented. Kythe schema is a bit more dense, protocol needs digging around in .proto files (which are OK though).
- Generally, Kythe pipeline needs more implicit knowledge to use - some online posts might address these though.
- Windows: Kythe serving tools run on Linux, though some Docker magic might be available.
- In Kythe, the storage format and the serving protocol are more separated, while LSIF tries to maintain serialized LSP responses.
- In fact, Kythe has no standard storage format (the reference implementation uses some columnar protobufs AFAIK)