I hereby claim:
- I am nugend on github.
- I am nugend (https://keybase.io/nugend) on keybase.
- I have a public key whose fingerprint is 44BB 73BA DAC6 92AE 70DB C682 F989 0EB8 B179 5EC6
To claim this, I am signing this object:
alias q='rlwrap --multi-line --multi-line-ext=.q --filter=/path/to/remove_newline.pl --no-warnings q' |
I hereby claim:
To claim this, I am signing this object:
Script for removing newlines in multi-line input on rlwrap:
rlwrap --multi-line --filter=/path/to/remove_newline.pl --no-warnings
Use Ctrl-6 (or Ctrl-^ if you prefer) to enter multi-line mode (see rlwrap man page for more info)
// Graylog Collector example configuration. | |
// URL to REST API of Graylog server this collector registers at | |
server-url = "http://XXXXX:12900" | |
// Enable registration with the Graylog server. (enabled by default) | |
//enable-registration = true | |
// The id used to identify this collector. Can be either a string which is used as id, | |
// or the location of a file if prefixed with "file:". If the file does not exist, |
[2015-07-15 12:10:21,156] INFO started processing 4 offers, launching at most 1 tasks per offer and 1000 tasks in total (mesosphere.marathon.tasks.IterativeOfferMatcher$:124) | |
[2015-07-15 12:10:21,157] INFO Launched 0 tasks on 0 offers, declining 4 (mesosphere.marathon.tasks.IterativeOfferMatcher$:216) | |
[2015-07-15 12:10:21,546] INFO 10.68.103.51 - - [15/Jul/2015:16:10:20 +0000] "GET /v2/apps HTTP/1.1" 200 4069 "http://nj1dtickdb01:8080/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.132 Safari/537.36" (mesosphere.chaos.http.ChaosRequestLog:15) | |
[2015-07-15 12:10:21,623] INFO 10.68.103.51 - - [15/Jul/2015:16:10:21 +0000] "GET /v2/deployments HTTP/1.1" 200 2 "http://nj1dtickdb01:8080/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.132 Safari/537.36" (mesosphere.chaos.http.ChaosRequestLog:15) | |
[2015-07-15 12:10:23,025] INFO 10.0.3.66 - - [15/Jul/2015:16:10:22 +0000] "GET /v2/apps HTTP/1.1" 200 4069 "http://nj1dvtickr |
""" | |
Copyright (c) 2011, Giuseppe Tribulato. | |
License: MIT (see http://www.opensource.org/licenses/mit-license.php for details) | |
""" | |
import functools | |
import inspect | |
import bottle | |
def check_params(**types): | |
def decorate(f): |
Monads are complicated because the word "monad" bears too much weight in any discussion about them.
There is a category theoretical concept of a monad. This is largely irrelevant in a practical explanation of monads since Monads are usually talked about in terms of another category theoretical concept called the Kleisli Category or Kleisli Triple. However, if someone starts talking about "monad laws", they're probably referring to the theoretical sense of this.
There is, in Haskell at any rate, a typeclass called the Monad (note the capital "M"). This is mostly important because when a type is an instance of this category, the Haskell do-notation is useful. Aside from that, you can only use the handful of operations that the Monad typeclass implements that you don't have to implement yourself for it to be an instance of Monad.
There are Monad type constructors, such as Maybe, IO, and State. This is where things actually start getting interesting for the practitioner, because each provides a specif
computation:{[k;v]k v} | |
cAp:{[v;comp];v,comp} | |
delay:{[comp;v]v,computation[comp]} | |
.q.cDot:{[l;r]; | |
computation[l],$[1 <> count r; r; computation[r]] | |
} | |
compute:{ |
mfby:{@[count[y]#x[0] . 0#'1 _ x;g;:;'[x 0].(1 _ x)@\:g:value group y]} |
.utl.getOrElse:{$[y in key x;x y;z]} |