Skip to content

Instantly share code, notes, and snippets.

View blacktaxi's full-sized avatar
🇺🇦
russia is a terrorist state, russians are a terrorist nation

Serhii Yavnyi blacktaxi

🇺🇦
russia is a terrorist state, russians are a terrorist nation
View GitHub Profile
@mrange
mrange / README.md
Last active January 20, 2022 20:33
Parsers combinators with F#6

Parsers combinators with F#6 [<InlineIfLambda>]

Thanks to manofstick peer reviewing the blog post.

Full source code at github

For F# Advent 2021 I wrote a blog post exploring how F#6 [<InlineIfLambda>] can improve data pipeline performance.

I was thinking of other places where [<InlineIfLambda>] can help and decided to try to build a parser combinator library with [<InlineIfLambda>].

@travisbrown
travisbrown / response-de-goes.md
Last active March 31, 2024 14:41
Response to cease and desist letter from John A. De Goes, CEO of Ziverge
@friedbrice
friedbrice / Payments.hs
Last active April 7, 2019 16:47
Java6-compatible algebraic data types via Church-Scott Encoding
module Payments where
data Customer = Customer { name :: String, age :: Int } deriving (Eq, Ord, Show)
-- I know partial record fields is an anti-pattern, but who's counting?
data Payment
= Cash { customer :: Customer, amount :: Double }
| Credit { customer :: Customer, amount :: Double, cardNumber :: Int }
| Check { customer :: Customer, amount :: Double, routingNumber :: Int, accountNumber :: Int }
deriving (Eq, Ord, Show)
@mrcoles
mrcoles / offset.js
Created June 18, 2018 22:27
Compute the offset of a DOM element taking into account CSS transforms and scrolled parents.
export const computeOffset = elt => {
let rect = elt.getBoundingClientRect();
let width = rect.width;
let height = rect.height;
let left = 0;
let top = 0;
let offsetParent = elt;
while (offsetParent) {
left += offsetParent.offsetLeft;
@taktoa
taktoa / haskell-pain-points.md
Last active October 26, 2019 04:18
A rant about pain points in Haskell, written as a response to https://redd.it/7rwuxb

I started writing this polemic to answer your question, but I ended up touching on most of my gripes with Haskell in general, not just in a corporate context.

GHC

GHC is a modern compiler with an amazing RTS and tons of features, but I have some issues with it.

Monolithic and Hard to Contribute To

@A-gambit
A-gambit / ReactiveConf2017.md
Last active June 19, 2021 16:57
Proposal for lightning talk at ReactiveConf 2017: How do you make friends with React and FRP? 🤔 Start to develop your application using Focal.

How do you make friends with React and FRP? 🤔 Start to develop your application using Focal.

This is a CFP for the ⚡️Lightning⚡️ talk at awesome ReactiveConf 2017. If you'd like to see this talk, please 🌟 star🌟 this summary and retweet my tweet 🙂 #ReactiveConf

image

Functional reactive programming (FRP) is very popular nowadays. The JavaScript community provides us with excellent tools like RxJS, Bacon, and Kefir. But, as we know, they have nothing to do with React. So how we can use the power of FRP in our React application? Using the correct state management, we can make friends with FRP and React and make our application truly reactive. In my lightning talk, I will talk about Focal

Applied Functional Programming with Scala - Notes

Copyright © 2016-2018 Fantasyland Institute of Learning. All rights reserved.

1. Mastering Functions

A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.

val square : Int => Int = x => x * x
@mrange
mrange / pc.fs
Last active April 27, 2016 09:50
Minimalistic Parser Combinators in F#
// Minimalistic Parser Combinator in F#
// Neither Performance nor Error Reporting has been considered
// For production code you are better off using http://www.quanttec.com/fparsec/
// Inspired by the classic: http://www.cs.nott.ac.uk/~pszgmh/monparsing.pdf
[<Measure>]
type ParserPos
type ParserResult<'T> = 'T option*int<ParserPos>
type Parser<'T> = string*int<ParserPos> -> ParserResult<'T>
module Parser =
@axemclion
axemclion / README.md
Last active December 6, 2023 10:07
Using Chrome Traces to Automate Rendering Performance

Using Chrome Traces to Automate Rendering Performance

Ten years ago, increasing the performance of a website usually meant tweaking the server side code to spit out responses faster. Web Performance engineering has come a long way since then. We have discovered patterns and practices that make the (perceived) performance of websites faster for users just by changing the way the front end code is structured, or tweaking the order of elements on a HTML page. Majority of the experiments and knowledge has been around delivering content to the user as fast as possible.

Today, web sites have grown to become complex applications that offer the same fidelity as applications installed on computers. Thus, consumers have also started to compare the user experience of native apps to the web applications. Providing a rich and fluid experience as users navigate web applications has started to play a major role in the success of the web.

Most modern browsers have excellent tools that help measure the runtime performa

@manigandham
manigandham / rich-text-html-editors.md
Last active March 13, 2024 23:51
Rich text / HTML editors and frameworks

Strictly Frameworks

Abstracted Editors

These use separate document structures instead of HTML, some are more modular libraries than full editors