I hereby claim:
- I am hencjo on github.
- I am hencjo (https://keybase.io/hencjo) on keybase.
- I have a public key whose fingerprint is 0ED3 422A 8A83 44D9 AFA8 9555 F3E4 0507 6AC8 541D
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
import java.util.function.Function; | |
import static java.util.Objects.requireNonNull; | |
public class SumTypeDemo { | |
//Evaluate | |
private static int evaluate(Expression expression) { | |
return expression.expression.destruct( | |
constant -> constant.value, | |
add -> evaluate(add.a) + evaluate(add.b), |
# Use xinput to find your keyboards. | |
$ xinput | |
⎡ Virtual core pointer id=2 [master pointer (3)] | |
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] | |
⎜ ↳ SynPS/2 Synaptics TouchPad id=11 [slave pointer (2)] | |
⎜ ↳ TPPS/2 IBM TrackPoint id=12 [slave pointer (2)] | |
⎜ ↳ Logitech Performance MX id=14 [slave pointer (2)] | |
⎜ ↳ E-Signal USB Gaming Keyboard id=16 [slave pointer (2)] | |
⎣ Virtual core keyboard id=3 [master keyboard (2)] |
package debouncer; | |
import java.util.HashMap; | |
import java.util.concurrent.locks.ReentrantLock; | |
/** | |
* Utility class guarding a task to be execute by a single thread synchronized on some key. | |
* | |
* Other threads can try to schedule execution of task while the task is executing on the original thread. | |
* The first thread to do so will block and subsequently get unblocked to execute the task again as soon |