Skip to content

Instantly share code, notes, and snippets.

View kachayev's full-sized avatar
🇺🇦
Fighting for freedom

Oleksii Kachaiev kachayev

🇺🇦
Fighting for freedom
View GitHub Profile
@chrisdone
chrisdone / typing.md
Last active March 22, 2024 23:24
Typing Haskell in Haskell

Typing Haskell in Haskell

MARK P. JONES

Pacific Software Research Center

Department of Computer Science and Engineering

Oregon Graduate Institute of Science and Technology

@paf31
paf31 / node-haskell.md
Last active April 14, 2021 18:42
Reimplementing a NodeJS Service in Haskell

Introduction

At DICOM Grid, we recently made the decision to use Haskell for some of our newer projects, mostly small, independent web services. This isn't the first time I've had the opportunity to use Haskell at work - I had previously used Haskell to write tools to automate some processes like generation of documentation for TypeScript code - but this is the first time we will be deploying Haskell code into production.

Over the past few months, I have been working on two Haskell services:

  • A reimplementation of an existing socket.io service, previously written for NodeJS using TypeScript.
  • A new service, which would interact with third-party components using standard data formats from the medical industry.

I will write here mostly about the first project, since it is a self-contained project which provides a good example of the power of Haskell. Moreover, the proces

@kachayev
kachayev / concurrency-in-go.md
Last active March 11, 2024 11:27
Channels Are Not Enough or Why Pipelining Is Not That Easy
@kachayev
kachayev / css-parser.md
Last active November 12, 2022 04:20
Parsing CSS file with monadic parser in Clojure
(ns kleene)
;;
;; Inspired by "Regexes, Kleene Algebras and Real Ultimate Power"
;; http://plastic-idolatry.com/erik/oslo2014.pdf
;;
;; What do we want to do?...
;;
;; (def p1 (times (Var. "w") (Var. "o") (Var. "w"))
;; (matches? p1 "wow") ;; true
@philandstuff
philandstuff / euroclojure2014.org
Last active February 19, 2024 05:12
Euroclojure 2014

EuroClojure 2014, Krakow

Fergal Byrne, Clortex: Machine Intelligence based on Jeff Hawkins’ HTM Theory

  • @fergbyrne
  • HTM = Hierarchical Temporal Memory
  • Slides

big data

  • big data is like teenage sex
    • noone knows how to do it
    • everyone thinks everyone else is doing it
## Alexey Kachayev, 2014
## Link to slides:
## http://goo.gl/n4ylC4
## Basic:
## type Parser = String -> Tree
## Composition
## type Parser = String -> (Tree, String)
@kachayev
kachayev / pipes_example.ex
Created September 2, 2013 08:24
Push Notifications sending with #riak_pipe #Elixir #Pipes
import Pipes
# defservice Profile do ... end
# defservice Device do ... end
# defservice Push do ... end
send = pipe do
profile <- Profile.all &1
badge <- Profile.get_badge_size profile
device <- Device.sessions profile
@kachayev
kachayev / auth_file_server.go
Created August 16, 2013 14:27
Basic Authentication for http.FileServer
package main
import (
"fmt"
"net/http"
auth "github.com/abbot/go-http-auth"
)
func Secret(user, realm string) string {
if user == "john" {
@kachayev
kachayev / PairingHeap.py
Last active October 7, 2017 13:28
Pairing Heap implementation in Python
##
## Pairing heap data structure
## More information on wiki:
## http://en.wikipedia.org/wiki/Pairing_heap
##
## Data types
## Heap :: (Elem | None, Subs)
## Subs :: None | (Heap, Subs)
##