Skip to content

Instantly share code, notes, and snippets.

View jdegoes's full-sized avatar

John A. De Goes jdegoes

View GitHub Profile

Introduction to the Rust Programming Language

Rust is a systems programming language designed for safety, concurrency, and performance. It has gained popularity for its innovative features that prevent memory-related bugs and allow for low-latency, performant, and efficient computation. Understanding Rust can provide new perspectives and approaches to building robust, concurrent, and high-performance applications.

In this 3-day workshop, attendees will receive a beginner-level introduction to Rust. By the end of the course, all participants, regardless of background, will have a solid entry-level foundation in Rust and be able to confidently use it for various real-world programming tasks.

NOTE: Although no familiarity with Scala is required, special attention will be given to the similarities and differences between Scala and Rust.

Who Should Attend


This Speaker Engagement Agreement ("Agreement") is made and entered into by and between ____________________ ("Speaker"), whose principal place of residence is __________________________________, and ____________________ ("Organizer"), whose primary mailing address is __________________________________, on ___________ ("Effective Date").

WHEREAS, the Speaker has knowledge, experience, and skills of interest to Organizer, and has been invited by the Organizer to present a talk at ____________________ ("Conference"), held on ___________ ("Conference Dates"); and

WHEREAS, the Organizer desires to have Speaker present a talk to an audience invited by Organizer, and the Speaker, to present this talk to said audience, and to other audiences across the Internet;

import zio._
sealed trait Config[+A] { self =>
def ++ [B](that: Config[B])(implicit zippable: Zippable[A, B]): Config[zippable.Out] =
Config.Zipped[A, B, zippable.Out](self, that, zippable)
def || [A1 >: A](that: Config[A1]): Config[A1] = Config.Fallback(self, that)
def ?? (label: String): Config[A] = Config.Labelled(self, label)
object TheMonadProblem {
sealed trait Parser[+A] { self =>
def map[B](f: A => B): Parser[B] = self.flatMap(a => Parser.succeed(f(a)))
def flatMap[B](f: A => Parser[B]): Parser[B] = Parser.FlatMap(self, f)
object Parser {
def succeed[A](a: A): Parser[A] = Succeed(a)

+------------+-------+--------+------+--------------+ | data type | input | output | done | dual | +------------+-------+--------+------+--------------+ | channel | Y | Y | Y | (not useful) | +------------+-------+--------+------+--------------+ | stream | N | Y | N | sink | +------------+-------+--------+------+--------------+ | sink | Y | N | Y | stream | +------------+-------+--------+------+--------------+ | transducer | Y | Y | N | zio |

jdegoes / Zippable.scala
Created March 17, 2021 20:36
Compositional zipping
package spartans.zipped
object Zipped {
sealed trait Zippable[-A, -B] {
type Out
def zip(left: A, right: B): Out
object Zippable extends ZippableLowPriority {
type Out[-A, -B, C] = Zippable[A, B] { type Out = C }
jdegoes / Cron.scala
Last active December 8, 2020 16:28
package zio.cron
import java.time.{ Month => JMonth }
import java.time.{ DayOfWeek => JDayOfWeek }
import zio.Schedule
// 0 16 1,15 * * echo Timesheets Due > /dev/console
final case class CronSchedule(
minute: CronSchedule.Minute,
package zio.prelude
trait FunctionBoth[:=>[-_, +_]] extends IdentityCompose[:=>] {
def both[A, B, C, D](f: A :=> B, g: C :=> D): (A, C) :=> (B, D)
def toRightBoth[A]: (Unit, A) :=> A
def toLeftBoth[A]: (A, Unit) :=> A
def lassocBoth[A, B, C]: (A, (B, C)) :=> ((A, B), C)
def rassocBoth[A, B, C]: ((A, B), C) :=> (A, (B, C))
package zio.connect
import zio._
trait S3Connector {
// Powered by ZIO S3
type S3Connector
type S3Credentials
type S3Exception
package zio.cron
import java.time.Instant
final case class Cron(moh: Option[MinuteOfHour], hod: Option[HourOfDay], dom: Option[DayOfMonth], moy: Option[MonthOfYear], dow: Option[DayOfWeek]) {
* Returns a `Cron` that describes execution only when both this `Cron` and
* the specified `Cron` would run.