This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyDBContext( | |
dataSource: DataSource with Closeable, | |
ec: ExecutionContextWithExecutor | |
) extends PostgresJdbcContext(SnakeCase, dataSource) | |
with Queries with Quotes with JsonB with Codecs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package zowo_shared.lib.compat | |
import kotlinx.collections.immutable.ImmutableCollection | |
import kotlinx.collections.immutable.ImmutableSet | |
import kotlinx.collections.immutable.PersistentMap | |
import kotlinx.collections.immutable.persistentMapOf | |
import zowo_shared.lib.functional.ZOption | |
interface ICompatPersistentMap<K, V> { | |
val entries: ImmutableSet<Map.Entry<K, V>> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/tinylabproductions/tlplib/commit/3d96ea5e6d90d168ea41bc0d2470c7b2d86b74b0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.nio.charset.StandardCharsets | |
import java.nio.file.{Files, Path, Paths} | |
case class Identifier(ticker: String, isin: String) | |
val DescriptionRe = """^(.+?)\s*\((.+?)\).*$""".r | |
def read(path: Path): Map[Identifier, Vector[BigDecimal]] = { | |
val lines = Files.readAllLines(path, StandardCharsets.UTF_8) | |
var map = Map.empty[Identifier, Vector[BigDecimal]].withDefaultValue(Vector.empty) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using com.tinylabproductions.TLPLib.Data; | |
using Quantum; | |
namespace Game.code.quantum_bind { | |
public static class Conversions { | |
public static unsafe QGuid toQGuid(this SerializableGUID guid) { | |
var srcBytes = stackalloc byte[16]; | |
var dstBytes = stackalloc byte[16]; | |
*((ulong*) srcBytes) = guid.long1; | |
*((ulong*) (srcBytes + 8)) = guid.long2; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// photon does not serialize ulong by default | |
public static readonly IPhotonProperty<QGuid> PROP_USER_ID = | |
PhotonProperty.a(new TypedKey<long>("UserId_p0")) | |
.add( | |
PhotonProperty.a(new TypedKey<long>("UserId_p1")), | |
(l1, l2) => new QGuid((ulong) l1, (ulong) l2), | |
id => (long) id.long1, | |
id => (long) id.long2 | |
); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Why | |
* programmers are religious people | |
* people seem hostile to new ideas | |
* "it worked for me before, why change?" | |
- HomeToGo JS vs TS | |
- JUG vs FP | |
### What |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package app | |
import shapeless.ops.hlist.{ConstMapper, Intersection, Union, ZipWith} | |
import shapeless.{::, HList, HNil, Poly2} | |
case class Params() | |
sealed trait EvaluatableGeneratorFilter[+Result] { | |
def eval(p: Params): Result | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package app | |
import shapeless.ops.hlist.{ConstMapper, Mapper, ZipWith} | |
import shapeless.{::, HList, HNil, Poly2} | |
case class Params() | |
sealed trait EvaluatableGeneratorFilter[+Result] { | |
def eval(p: Params): Result | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package app | |
import shapeless.ops.hlist.Mapper | |
import shapeless.{::, HList, HNil, Poly2} | |
case class Params() | |
sealed trait EvaluatableGeneratorFilter[+Result] { | |
def eval(p: Params): Result | |
} |