To display the current watson status in your i3 bar using conky:
- in the conky configuration, add:
{"full_text": "${texeci 5 ~/.config/i3/watson-status}"}
- in
~/.config/i3/watson-status
:
#!/bin/bash
watson status |
sed -r '
module TestObservable | |
function main = |args| { | |
let o1 = Observable(null) | |
let o2 = o1: map(|v| -> v + 1): onChange(|v| {println(v)}) | |
o1: set(0) | |
} |
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# Copyright © 2016 Yannick Loiseau <[email protected]> | |
# This work is free. You can redistribute it and/or modify it under the | |
# terms of the Do What The Fuck You Want To Public License, Version 2, | |
# as published by Sam Hocevar. See http://www.wtfpl.net/ for more details. | |
""" | |
on-modify hook for taskwarrior. | |
This hook connects taskwarrior and watson. |
To display the current watson status in your i3 bar using conky:
{"full_text": "${texeci 5 ~/.config/i3/watson-status}"}
~/.config/i3/watson-status
:#!/bin/bash
watson status |
sed -r '
#!/bin/bash | |
# | |
# Copyright © 2016 Yannick Loiseau <[email protected]> | |
# This work is free. You can redistribute it and/or modify it under the | |
# terms of the Do What The Fuck You Want To Public License, Version 2, | |
# as published by Sam Hocevar. See http://www.wtfpl.net/ for more details. | |
# | |
#============================================================================== | |
# Script to check if you are working on a project with Watson and display a | |
# notification when: |
module checks | |
function checkWithFallback = |log, message, predicate, fallback| -> |value| { | |
case { | |
when predicate(value) { | |
return value | |
} | |
otherwise { | |
log: add(message) | |
log: add("use %s instead": format(fallback)) |
Just a POC on a discussion we had with @Artpej
Given
module MyMod
function foo = |a, b| -> a + b
function bar = -> println("MyMod.bar")
module Test | |
# in reply to https://github.com/TypeUnsafe/golo-x/blob/master/main.functional.golo#L8 | |
import gololang.Errors | |
@result | |
function divide = |a,b| -> a / b |
Verifying that +yloiseau is my blockchain ID. https://onename.com/yloiseau |
What am I missing?
java:
import java.util.Random;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.ExecutorService;
import static java.util.concurrent.Executors.newCachedThreadPool;
Just a test for a macro to allow overloading existing functions! (actually, a multimethod generic dispatch)
NOTE: this is just a POC to eat my own dog food...
module A
function foo = |a, b, c| {
return "A::foo"
}