import Data.Functor.Yoneda
import Data.Char
import Data.Kind
infixr 5
·
type List :: (Type -> Type) -> Constraint
class List f where
This file contains hidden or 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
syntax = "proto3"; | |
option java_multiple_files = true; | |
option java_package = "fr.canal.rocket.configuration.grpc"; | |
option java_outer_classname = "IngestRulesProto"; | |
package ingestrule; | |
enum TransportType { | |
ASPERA = 0; |
This file contains hidden or 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
import akka.actor.ActorSystem | |
import akka.stream._ | |
import akka.stream.scaladsl._ | |
import scala.io.StdIn | |
import scala.util.Random | |
object SimplePartitionSample extends App { | |
implicit val system = ActorSystem() |
This file contains hidden or 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
; | |
; the "monitor ROM" of an apple 1 fit in one page (256 bytes). | |
; | |
; this is my attempt to take the disassembled code, give names to the | |
; variables and routines, and try to document how it worked. | |
; | |
; | |
; an apple 1 had 8KB of RAM (more, if you hacked on the motherboard), and a | |
; peripheral chip that drove the keyboard and video. the video was run by a | |
; side processor that could treat the display as an append-only terminal that |
This file contains hidden or 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
/* | |
https://scalafiddle.io/sf/sniohcZ/3 | |
(old version: https://scalafiddle.io/sf/sniohcZ/1) | |
Use PassThroughFlow when you have a message that should be used in a | |
flow that trasform it but you want to maintain the original message for | |
another following flow. | |
For example if you consume messages from Kafka (CommittableMessage). | |
You process the message (transform, save it inside a database, ...) and then you need again the original message | |
to commit the offset. |
There exist several DI frameworks / libraries
in the Scala
ecosystem. But the more functional code you write the more you'll realize there's no need to use any of them.
A few of the most claimed benefits are the following:
- Dependency Injection.
- Life cycle management.
- Dependency graph rewriting.
This file contains hidden or 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
; D O O M | |
;%%%%% %%%%% %%%% %%%%%% %% %% _---_ %%% %%% %%%% %%%%%% %%%% %% %% | |
;%% %% %% %% %% %% %% %% ." ". %%%%%%%% %% %% %% %% %% %% | |
;%% ## #### ###### ## ###%%% | () () | %% %# ## ###### ## ## ###%%% | |
;## ,## ## ## ## ## ## `## \ A / ## #= ## ## ## ## ## ## `## | |
;####= =###= =# #= =# =# ## |"+++"| ## =- #= =# #= =# ###= =# ## | |
;##= =# "---" #= =# | |
; WAD RANKING | |
.name "dwarf" |
This file contains hidden or 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
#include <stdio.h> | |
int | |
main(int argc, char *argv[]) | |
{ | |
int i = 0; | |
i ^= i&~-~i|~i&-~i; | |
printf("%d\n", i); | |
return (0); |
This file contains hidden or 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
import cats.Monad | |
import cats.data.StateT | |
import cats.effect._ | |
import cats.implicits._ | |
import cats.mtl._ | |
import cats.mtl.implicits._ | |
import shapeless._ | |
import scala.language.higherKinds | |
case class Health(num: Int) |
This file contains hidden or 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
# source:http://geocities.com/SiliconValley/heights/7052/opcode.txt | |
From: [email protected] (Mark Hopkins) | |
Newsgroups: alt.lang.asm | |
Subject: A Summary of the 80486 Opcodes and Instructions | |
(1) The 80x86 is an Octal Machine | |
This is a follow-up and revision of an article posted in alt.lang.asm on | |
7-5-92 concerning the 80x86 instruction encoding. | |
The only proper way to understand 80x86 coding is to realize that ALL 80x86 |