Skip to content

Instantly share code, notes, and snippets.

Translation to Elixir of the article from this link: https://www.cs.princeton.edu/~dpw/courses/cos326-12/notes/reasoning.php

Reasoning About Programs

In the last note, we discussed the operational semantics of simple ML programs. This operational semantics provides us with a means to prove some simple things about our the programs we write. For example.

Theorem: The expression x = 1 ; y = x + 2 ; x + y evaluates to the value 4.

Proof: By the definition of the operational semantics of ML (Elixir):

Manually overriding the typeclass dictionary in Purescript

The reifySymbol from the purescript-symbols package

In my effort to understand the recently added RowToList Purescript feature, I have been reading Liam Goodacre's post, which made me take a closer look at the purescript-symbols package.

I was puzzled by the implementation of the reifySymbol function. Here it is:

defmodule SessionSm do
@moduledoc """
Documentation for SessionSm.
"""
@behaviour :gen_statem
@registered :session_sm
@chars Enum.concat([?A..?Z, ?a..?z, ?1..?9])
@Shakadak
Shakadak / trance-classics.txt
Created August 16, 2018 14:21 — forked from kangalio/trance-classics.txt
A list of all the songs the YouTube channel "Trance Classics" had uploaded before he was banned because of copyright strikes.
24 - The Longest Day (Armin Van Buuren Remix) [2004]
2HD - Sunflakes (Vincent De Moor Remix) [1998]
2Trance & Moonforce - Sunset On Ibiza (Original Mix) [2007]
3 Voices - Nightflight (Future Mix) [1994]
4 Strings - All Around The World
4 Strings - Catch A Fall (Club Mix)
4 Strings - Daytime (Gizeh Remix) [2000]
4 Strings - Desire (DJ 4 Strings Remix)
4 Strings - Desire (Original Mix)
4 Strings - Diving (Hiver & Hammer's Different Gear Remix) [2002]
import System.IO
import Control.Monad
import Data.Array
import Data.Maybe
activableCell :: Char
activableCell = '0'
data Direction = Row | Col
import System.IO
import Control.Monad
import Data.Ord
import Data.List
import Data.Maybe
main :: IO ()
main = do
hSetBuffering stdout NoBuffering -- DO NOT REMOVE
loop
// ==UserScript==
// @name [Leek Wars] Pinky
// @namespace http://tampermonkey.net/
// @version 0.1
// @description *onch*
// @author Ref
// @match https://leekwars.com/*
// @grant GM_addStyle
// ==/UserScript==

Leek Wars

Désirable

Archétypes

La notion de retrait de vie (life removal (LR)) est ici utilisé à la place de dégât dû au chevauchement avec l'effet du même nom. AFTEREFFECT, DAMAGE, DAMAGE_RETURN, POISON

Burst Life Remover (BLR): Une entitée avec la capacité de retirer une forte quantité de vie de manière périodique. Implique des temps de recharge (cooldown (CD)).

@Shakadak
Shakadak / APILeekwars.py
Last active July 16, 2017 08:53 — forked from CaptainTheDelta/APILeekwarsPump.py
API Leekwars pour python
# Original author: https://gist.github.com/CaptainTheDelta
import requests
class APIAi:
"""docstring for APIAi"""
def __init__(self, session):
self.session = session
self.url = "https://leekwars.com/api/ai"