I hereby claim:
- I am loverdos on github.
- I am loverdos (https://keybase.io/loverdos) on keybase.
- I have a public key ASAi41-Ewm_fgf0UGtN1aQEgDix-sDJp3LSsEyuXv4kgRgo
To claim this, I am signing this object:
// Author: github.com/loverdos | |
// SPDX-License-Identifier: Apache-2.0 | |
import java.io.PrintStream | |
final class Logger(out: PrintStream = System.out) { | |
private var ctx = List[String]() | |
private val indent_chunk = " " | |
private def ctx_size = ctx.length |
mvn help:evaluate -Dexpression=project.version | grep -e '^[^\[]' |
// Parallel port scanner using parallel collections (just for the side-effect) | |
// @author = @loverdos | |
(1 to 65536).par.map { case port ⇒ | |
try { | |
val socket = new java.net.Socket("127.0.0.1", port) | |
socket.close() | |
println(port) | |
port | |
} catch { |
I hereby claim:
To claim this, I am signing this object:
#!/bin/sh | |
# Re-copy text as email-quoted | |
pbpaste | sed 's/^/>/' | pbcopy |
git log --since=2012-10-01 --until=2012-10-31 --author=loverdos --reverse --pretty=format:"%H%x09%ae%x09%ad%x09%s" --date=short |
external (|>) : 'a -> ('a -> 'b) -> 'b = "%revapply" |
-- All files (and the folders they belong to) recursively | |
with recursive q as ( | |
select folder, | |
1 as level, | |
'' || folder.name as folder_path, | |
'' || folder.name || '/' || file.name as file_path, | |
folder.id as folder_id, | |
folder.parent_id as parent_folder_id, | |
file.id as file_id | |
from folder, |
The official project page is here. For convience, the code repo is represented here and if you prefer Github, I maintain a synchronized copy. The following code-related links are from the github repo, for convenience.
I setup Akka using a special service. Note that all the main functionality is represented as services. An example of an actor is our UserActor. It handles the messages reflectively via logic defined in ReflectiveActor, so our receive()
is defined once and for all there.
What an actor can handle is defined in an [ActorR
class RichValueD[T](value: T) { | |
def decide[V](f: T => Boolean) | |
(gTrue: T => V) | |
(gFalse: T => V):V = if(f(value)) gTrue(value) else gFalse(value) | |
} | |
implicit def anyToRichValueD[T](value: T): RichValueD[T] = new RichValueD(value) |