use std::{env, path::PathBuf, time::Duration}; | |
use tokio::fs::File; | |
use tokio::io::{AsyncBufReadExt, AsyncSeekExt, BufReader, SeekFrom}; | |
use tokio::time::sleep; | |
#[tokio::main] | |
async fn main() { | |
let filename = get_filename(); | |
tail_file(filename).await; | |
} |
trait Compiler: | |
type Env = Map[String, BigDecimal] | |
@throws[ParserError] | |
def compile(formula: String): Env => BigDecimal | |
import scala.quoted.* | |
type Env = Map[String, BigDecimal] | |
type E[A] = Expr[Env] ?=> Expr[A] |
package fpmax | |
import scala.util.Try | |
import scala.io.StdIn.readLine | |
object App0 { | |
def main: Unit = { | |
println("What is your name?") | |
val name = readLine() |
Every once in a while I investigate low-level backend options for PL-s, although so far I haven't actually written any such backend for my projects. Recently I've been looking at precise garbage collection in popular backends, and I've been (like on previous occasions) annoyed by limitations and compromises.
I was compelled to think about a system which accommodates precise relocating GC as much as possible. In one extreme configuration, described in this note, there
Install Ubuntu Desktop 22.04, encrypted ZFS, with minimal packages.
We may want to do the rest of the installation/configuration from our laptop over ssh, so:
{-# language BlockArguments, LambdaCase, Strict, UnicodeSyntax #-} | |
{-| | |
Minimal dependent lambda caluclus with: | |
- HOAS-only representation | |
- Lossless printing | |
- Bidirectional checking | |
- Efficient evaluation & conversion checking | |
Inspired by https://gist.github.com/Hirrolot/27e6b02a051df333811a23b97c375196 |
#!/usr/bin/env -S jq -f -r | |
# | |
# This jq scripts transforms cabal's plan.json file into a series of fact that souffle can interpret. | |
# | |
# Example use | |
# | |
# $ ~/plan-to-datalog.jq <dist-newstyle/cache/plan.json >plan.dl | |
# | |
# Then create a file query.dl | |
# |
This Pre-SIP post proposes continuations as a new language feature in Scala 3.
It has been prepared by Jack Viers, Raul Raja and reviewed by the Scala 3 team at 47 Degrees. This doc is intended to be used as a way to gather community feedback and foster discussion.
Our observation in the industry and among our peers is that most programming in Scala today that involves async or I/O-based programs targets a monadic indirect boxed style.
{-# LANGUAGE DeriveAnyClass #-} | |
{-# LANGUAGE DeriveGeneric #-} | |
{-# LANGUAGE NamedFieldPuns #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE RecordWildCards #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
module Main where | |
import Data.Aeson (FromJSON, Object, Value (..), eitherDecodeFileStrict, parseJSON, (.:)) |