Skip to content

Instantly share code, notes, and snippets.

@EncodePanda
EncodePanda / gist:81168f1c9b6e82be45ab5c399ab4761e
Last active February 6, 2019 20:50
Formal verification applied (with TLA+)
1 Formal specification applied (with TLA+)
=========================================
1.1 Elevator Pitch
~~~~~~~~~~~~~~~~~~
Formal verification promises software without bugs. At the same time
even its name scares programmers away ("It's math! run for your
lives!"). This talk will familiarize you with one form of formal
verification: a model checker - one that is available in a formal
@EncodePanda
EncodePanda / rchain_runtime_for_testing
Created January 8, 2019 22:01
rchain_runtime_for_testing
rn_stop() {
echo "stop all existing rnode processes"
kill $(ps aux | grep '[r]node' | awk '{print $2}')
}
rn_clean() {
echo "clean .rnode folders"
echo .rnode*
rm -rf .rnode*
echo "create bootstrap rnode folder"
./bin/rnode run -b "rnode://c61769b39d368cbcbc9499634e030386c79d5b02@52.119.8.108?protocol=40400&discovery=40404" --validator-private-key 31729a39827aab4e56fde610216628b09bc442b9d441c29f4c5e07a3e4014bdc
16:22:17.471 [main] INFO c.r.n.configuration.Configuration$ - Using configuration file: /Users/rabbit/.rnode/rnode.toml
16:22:17.809 [main] WARN c.r.n.configuration.Configuration$ - Configuration file /Users/rabbit/.rnode/rnode.toml not found
16:22:17.862 [main] INFO c.r.n.configuration.Configuration$ - Starting with profile default
16:22:18.366 [main] INFO coop.rchain.node.NodeEnvironment$ - Using data dir: /Users/rabbit/.rnode
16:22:18.631 [main] INFO coop.rchain.comm.UPnP$ - trying to open ports using UPnP....
16:22:18.806 [main] INFO coop.rchain.comm.UPnP$ - Available gateway devices: RT-AC68U
16:22:18.807 [main] INFO coop.rchain.comm.UPnP$ - Picking RT-AC68U as gateway
16:22:18.814 [main] INFO coop.rchain.comm.UPnP$ - Gateway's external IP address is from a public address block.
16:22:18.855 [main

I have a function that looks like this

app ::
     ( MonadReader Config m
     , Weather m
     , Console m
     , MonadError Error m
     , MonadState Requests m
     )
  => m ()

I have a function that looks like this

app ::
     ( MonadReader Config m
     , Weather m
     , Console m
     , MonadError Error m
     , MonadState Requests m
     )
  => m ()
@EncodePanda
EncodePanda / Scala and Emacs with Ensime. Guide for frustrated IDEA users.md
Last active June 13, 2018 08:04
Scala and Emacs with Ensime. Guide for frustrated IDEA users.

So this

class TryProveDanielWrong {

  def attempt1(pf1: PartialFunction[Int, Boolean], pf2:PartialFunction[Int, Boolean]): Boolean =
    (pf1.isDefinedAt(10), pf2.isDefinedAt(10)) match {
      case  (true, true) => true
      case (true, false) => pf1(10)
      case (false, true) => pf2(10)

CompileQuery

DirPath

/hdfs/workspaces/a.slam/

Vars

(fromFoldable [])

Working workspaces

Working workspaces are those which currently have valid qscript and we could render proper results

Conditional Input

/invoke (GET): format FileIn(DirIn(DirIn(DirIn(DirIn(DirIn(Root,DirName(hdfs)),DirName(workspaces)),DirName(✓ - Conditional Input.slam)),DirName(.tmp)),DirName(outfae59abe-799a-44e4-ae8d-86503c55b948)),FileName(cardfae59abe799a44e4ae8d86503c55b948)), args: Map(minage -> 40., maxage -> 55., state -> "CO", gender -> "both"), offset: 0, limit: Some(300), format: JsonContentType(Readable,SingleArray,None)

/mount (PUT) req: Request(method=PUT, uri=/hdfs/workspaces/%E2%9C%93%20-%20Conditional%20Input.slam/.tmp/out77a0fabd-0848-4acc-9afe-bbffb4b4bf0e/, headers=Headers(Host: serv1.demo.slamdata.com, Connection: keep-alive, Content-Length: 646, Origin: http://serv1.demo.slamdata.com, User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36, Content-Type: text/plain;charset=UTF-8, Accept: */*, Refe