Skip to content

Instantly share code, notes, and snippets.

View Oregu's full-sized avatar

Oleg Prophet Oregu

View GitHub Profile
@sathishpaul
sathishpaul / Fluent2016.md
Last active March 18, 2016 22:33
Fluent Conference 2016

I had the opportunity to attend the Fluent Conference held at San Francisco from March 8th to 10th 2016.

Here is a brief summary of the various sessions I attended and what I learnt from them.

##Functional reactive JavaScript on the client and the server

  • Pete Hodgson from Thoughtworks gave a wonderful talk about what Reactive programming is. He focussed specifically on using Rx.js and explained what streams are and how they can be used to model everything - from a series of async values, to node streams, to even mouse clicks. Using one API to model everything as a stream is a huge benefit, but I find the Rx programming paradigm needs considerable effort in learning and mastering it. I am still trying to wrap my mind around what exactly does an 'Observable of Observables' mean. The takeaway for me was to start using Rx.js on a very small portion of an existing application and grow from there. 'Don't try to boil the ocean' is good advice.

My rating for this talk: 5/5 (based on topic relevance and speaker d

@tonymorris
tonymorris / fuck-you.md
Last active February 26, 2016 01:30
Ignorance has real-world practical effects.

I was just sitting in a doctor surgery 45 minutes ago with an orthopaedic spine surgeon, who is one of the few who has worked out how to use software to his advantage. We were measuring a deformity that the previous surgeon has created. After 20 minutes of drawing lines and measurements all over this DICOM image, the following happened

Access Violation at address 0xGOFUCKYOURSELF

…so now I have to go back in two weeks while he can restart a plan for a difficult corrective surgery.

@stantonk
stantonk / TestPropertiesInjection.java
Last active August 9, 2018 17:55
Example of loading a Java properties file and binding to @nAmed attributes in Guice. Handles default property settings as well. Adapted from code written by https://github.com/kylemcc
import com.google.inject.AbstractModule;
import com.google.inject.Guice;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import com.google.inject.name.Names;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;
@staltz
staltz / introrx.md
Last active November 17, 2024 01:08
The introduction to Reactive Programming you've been missing
@gelisam
gelisam / UnderstandingPipes.md
Last active May 16, 2019 13:48
Understanding the Pipes library

In response to this reddit post about failing to understand the Pipes library after a couple of hours. I wanted to show how an experienced haskeller does it, but I'm afraid it also took me quite a few hours, which is why the following list of steps goes on and on.

After all those hours, my opinion is that Pipes is not at all an easy library. I don't know if Conduit is any easier, but otherwise I side with your friend in advising to use something else (perhaps ordinary lazy IO?) instead of Pipes.

Anyway, here is the full brain dump of my steps as I tried to get your three snippets to fit together.

  • Since you say that you have a hard time combining the snippets, I assume that they must have complicated types. So my first goal is to figure out the type of your first snippet.
  • hoogle for parseUrl, withManager, etc. No results.
  • Google for haskell runEffect, find that it's a method from Pipes.Core,
@sdiehl
sdiehl / preamble.hs
Last active February 1, 2016 20:16
Modern Haskell Preamble
{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
@andrejbauer
andrejbauer / topology.v
Last active November 28, 2023 19:40
How to get started with point-set topology in Coq. This is not actually how one would do it, but it is an intuitive setup for a classical mathematician.
(* How do to topology in Coq if you are secretly an HOL fan.
We will not use type classes or canonical structures because they
count as "advanced" technology. But we will use notations.
*)
(* We think of subsets as propositional functions.
Thus, if [A] is a type [x : A] and [U] is a subset of [A],
[U x] means "[x] is an element of [U]".
*)
Definition P (A : Type) := A -> Prop.
@Oregu
Oregu / _.java
Last active August 29, 2015 14:02
Underscore java
/////////////////////////////////////////////////////
//
// Moved to repository:
// https://github.com/Oregu/_.java
//
/////////////////////////////////////////////////////
import java.util.function.BiFunction;
import java.util.function.Function;
@eugene-sy
eugene-sy / snakeToCammel.coffee
Created May 26, 2014 08:13
Convert string with snake_case to UpperCamelCase and lowerCamelCase
snakeToCamel: (s) ->
s.replace(/(_\w)/g, (m) -> return m[1].toUpperCase() )
snakeToUpperCamel: (s) ->
s.charAt(0).toUpperCase() + s.slice(1).replace(/(_\w)/g, (m) -> return m[1].toUpperCase() )
(ns turel.core
(:refer-clojure :exclude [==])
(:use clojure.core.logic))
(defn not-membero
[x l]
(conde [(emptyo l)]
[(fresh [head tail]
(conso head tail l)
(!= head x)