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
// If I want to take the code here to build a Table using context functions and convert it to compile time check using macros, to validate rows / cell values etc how do i do that. | |
// https://docs.scala-lang.org/scala3/reference/contextual/context-functions.html | |
class Table: | |
val rows = new ArrayBuffer[Row] | |
def add(r: Row): Unit = rows += r | |
override def toString = rows.mkString("Table(", ", ", ")") | |
class Row: | |
val cells = new ArrayBuffer[Cell] | |
def add(c: Cell): Unit = cells += c |
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 com.symphony.framework.akkastreams.v1; | |
import akka.stream.Attributes; | |
import akka.stream.FlowShape; | |
import akka.stream.Inlet; | |
import akka.stream.Outlet; | |
import akka.stream.stage.GraphStage; | |
import akka.stream.stage.GraphStageLogic; | |
import akka.stream.stage.InHandler; | |
import akka.stream.stage.OutHandler; |
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
sudo apt-get install --assume-yes python-software-properties | |
sudo apt-add-repository ppa:chris-lea/node.js | |
sudo apt-get update | |
sudo apt-get install --assume-yes nodejs | |
sudo apt-get install --assume-yes git | |
# Install Graphite | |
sudo apt-get install python-dev ruby-dev bundler build-essential libpcre3-dev graphite-carbon graphite-web | |
cat >> /tmp/graphite-carbon << EOF | |
# Change to true, to enable carbon-cache on boot |