This file contains 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 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 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 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 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 | |
} |
This file contains 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.utils | |
import scala.collection.generic.CanBuildFrom | |
import scala.language.higherKinds | |
object EitherUtils { | |
def sequence[ | |
OuterTraversable[X1] <: TraversableOnce[X1], | |
InnerTraversable[X2] <: TraversableOnce[X2], | |
A, B |
This file contains 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 System; | |
using System.Collections.Generic; | |
using System.Collections.Immutable; | |
using System.Linq; | |
using com.tinylabproductions.TLPLib.Collection; | |
using com.tinylabproductions.TLPLib.Data; | |
using com.tinylabproductions.TLPLib.Extensions; | |
using com.tinylabproductions.TLPLib.Functional; | |
using com.tinylabproductions.TLPLib.Utilities; |
This file contains 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 System; | |
namespace main { | |
// Modeled against | |
// https://medium.com/@olxc/free-monads-explained-pt-1-a5c45fbdac30 | |
// | |
// Higher kind simulation from https://medium.com/@johnmcclean/simulating-higher-kinded-types-in-java-b52a18b72c74 | |
static class Id { | |
public struct W {} |
This file contains 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
x11@haven:~/work/budget-tracker/app$ cat build.gradle | |
apply plugin: 'com.android.application' | |
apply plugin: 'kotlin-android' | |
apply plugin: 'kotlin-android-extensions' | |
apply plugin: 'kotlin-kapt' | |
apply from: rootProject.file('gradle/generated-kotlin-sources.gradle') |
This file contains 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
<android.support.constraint.ConstraintLayout | |
android:layout_width="match_parent" | |
android:layout_height="85dp" | |
android:padding="8dp" | |
app:layout_behavior="android.support.design.widget.BottomSheetBehavior" | |
android:elevation="4dp" | |
android:background="#eeeeee" | |
android:id="@+id/bottom_shelf" | |
app:behavior_hideable="false" | |
app:behavior_peekHeight="40dp" |