... or Why Pipelining Is Not That Easy
Golang Concurrency Patterns for brave and smart.
By @kachayev
| module Main | |
| {- Divide x by y, as long as there is a proof that y is non-zero. The | |
| 'auto' keyword on the 'p' argument means that when safe_div is called, | |
| Idris will search for a proof. Either y will be statically known, in | |
| which case this is easy, otherwise there must be a proof in the context. | |
| 'so : Bool -> Type' is a predicate on booleans which only holds if the | |
| boolean is true. Essentially, we are making it a requirement in the type | |
| that a necessary dynamic type is done before we call the function -} |
... or Why Pipelining Is Not That Easy
Golang Concurrency Patterns for brave and smart.
By @kachayev
| %%%------------------------------------------------------------------- | |
| %%% @author aardvocate | |
| %%% @copyright (C) 2014, <COMPANY> | |
| %%% @doc | |
| %%% | |
| %%% @end | |
| %%% Created : 03. Sep 2014 11:02 PM | |
| %%%------------------------------------------------------------------- | |
| %%% | |
| %%% This module provides a method will add new mnesia columns to an already running mnesia instance without losing data. |
| -module(test_tcp). | |
| -export([run_tcp/3, recv_tcp/3, send_tcp/4]). | |
| -define(SOCKET_OPTS, [{active, false}, binary, {delay_send, true}, {packet, 4}]). | |
| run_tcp(Port, P, N) -> | |
| spawn_link(fun() -> | |
| recv_tcp(Port, P, N) | |
| end), |
$ ssh remote-host "epmd -names"
epmd: up and running on port 4369 with data:
name some_node at port 58769
Note the running on port for epmd itself and the port of the node you're interested in debugging. Reconnect to the remote host with these ports forwarded:
$ ssh -L 4369:localhost:4369 -L 58769:localhost:58769 remote-host
| -module(my_class). | |
| -export([new/1]). | |
| -export([value/1]). | |
| -export([version/1]). | |
| -export([set_value/2]). | |
| -record(self, { | |
| version :: pos_integer(), | |
| value :: string() | |
| }). |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent| {-# LANGUAGE DataKinds, PolyKinds, TypeOperators #-} | |
| {-# LANGUAGE TypeFamilies, FlexibleInstances, ScopedTypeVariables #-} | |
| {-# LANGUAGE InstanceSigs #-} | |
| module CmdLiner where | |
| import GHC.TypeLits | |
| -- Grammar | |
| -- I care about the following: |
| # <type>: (If applied, this commit will...) <subject> (Max 50 char) | |
| # |<---- Using a Maximum Of 50 Characters ---->| | |
| # Explain why this change is being made | |
| # |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->| | |
| # Provide links or keys to any relevant tickets, articles or other resources | |
| # Example: Github issue #23 |
Upon completion you will have a sane, productive Haskell environment adhering to best practices.
sudo apt-get install libtinfo-dev libghc-zlib-dev libghc-zlib-bindings-dev