Skip to content

Instantly share code, notes, and snippets.

View chshersh's full-sized avatar
🕵️‍♂️
Working on a super-secret OCaml project

Dmitrii Kovanikov chshersh

🕵️‍♂️
Working on a super-secret OCaml project
View GitHub Profile
@saurabhnanda
saurabhnanda / haskell-interhsip.md
Last active November 18, 2018 15:42
Haskell Internship Bounty Program

Attention

This page has been moved to http://www.vacationlabs.com/haskell-bounty-program

Haskell Internship Bounty Program

Here's the general idea:

  • Solve a pre-defined problem (could be an open source contribution OR an internal tool) for a bounty (basically success-fee). Not looking at GSoC level funding or problems, but something that can be done in 1-2 weeks with a 50-250$ bounty.
  • Supported by mentoring and general help over slack/IRC.
@maksbotan
maksbotan / generic-validation.md
Last active July 5, 2020 20:34
Generic validation of nested data

Generic validation of nested data

TLDR

This technique helps validate arbitrary conditions in deeply nested structures without writing additional code — with the help of Haskell Generics.

It boils down to this pattern:

@vrom911
vrom911 / ChrisPenner.hs
Created October 19, 2020 20:43
My solutions to the Chris Penner's 'Silly Job Interview Questions In Haskell' post: https://chrispenner.ca/posts/interview
module ChrisPenner where
import Data.Array ((!))
import Data.Foldable (for_, foldl', maximumBy)
import Data.List (sort)
import Data.Map.Strict (Map)
import Data.Ord (comparing)
import qualified Data.Array as A
import qualified Data.Map.Strict as Map

So the basic thing you need to start working with org-mode is to install org-mode. Emacs > 24.??? already have it bundled and if you're not going to use some cool features like org-drill and stuff, that should be enough.

Basically, org-mode operates with org files. Create one (work.org for example). Org files' markup is simple -- there are headers with info. Header format is '*'{1..} TODO-kw Description. To create entry just write it. Also C-c RET does something similar (I never use it tho). So, stars are indentation -- more indented

@ChrisPenner
ChrisPenner / git-transplant
Last active February 12, 2021 15:26
Transplant commits from one source to another
#!/bin/bash
if [[ $# -ne 2 ]]; then
cat >&2 <<EOF
Transplant a branch from one root to another.
Handy if you've done a squash-merge and need to rebase <from> the old branch <onto> the new master.
Usage:
git transplant <from> <to>
where:
@AlexeyRaga
AlexeyRaga / 1CPrelude.hs
Created March 31, 2020 06:15
1с-подобный Хаскель
---------------- Базовое ----------------------
type Число = Int
type Строка = Text
type Строчное = Show
type ИО = IO
type Сравнимое = Eq
type Упорядоченное = Ord
печатать :: Строчное значение => значение -> ИО ()
печатать = print
@chiroptical
chiroptical / babyShark.hs
Last active February 3, 2023 15:23
Baby shark as a Haskell program
{-# LANGUAGE BlockArguments #-}
module Main where
main :: IO ()
main = do
babyShark
do do do do do do babyShark
do do do do do do babyShark
do do do do do do babyShark
@evincarofautumn
evincarofautumn / InlineDoBind.md
Last active April 20, 2023 21:16
Thoughts on an InlineDoBind extension

Thoughts on an InlineDoBind extension

An expression beginning with a left arrow (<-) inside a do block statement is desugared to a monadic binding. This is syntactically a superset of existing Haskell, including extensions. It admits a clean notation that subsumes existing patterns and comes with few downsides.

Examples

do
  f (<- x) (<- y)
-- ===
@brendanzab
brendanzab / gist:d41c3ae485d66c07178749eaeeb9e5f7
Last active July 19, 2023 04:28
My personal list of Rust grievances (September 2021)

September 2022:

This has spread to a far wider audience than I had anticipated - probably my fault for using a title that is in hindsight catnip for link aggregators. I wrote this back in 2021 just as a bunch of personal thoughts of my experiences using Rust over the years (not always well thought through), and don't intend on trying to push them further, outside of personal experiments and projects.

Managing a living language is challenging and difficult work, and I am grateful for all the hard work that the Rust community and contributors put in given the difficult constraints they work within. Many of the things I listed below are not new, and there's been plenty of difficult discussions about many of them over the years, and some are being worked on or postponed, or rejected for various good reasons. For more thoughts, please see my comment below.

My personal list of Rust gr

@kazu-yamamoto
kazu-yamamoto / gist:8120392
Created December 25, 2013 05:21
Simple JSON parser in Haskell
-- | This JSON package retains the order of array elements.
-- JSON: http://www.ietf.org/rfc/rfc4627.txt
module JSON (
JSON(..)
, parseJSON
) where
import Control.Applicative ((<*),(*>),(<$>),(<$))
import Control.Monad (void)