| Tag | Implication | Expectation |
|---|---|---|
| (no tag specified) | Free form, interpret it as you will. | Context dependent. |
| Bug | Reviewer is concerned that the code in question could cause problems in production. | Reviewer’s expectation is that the bug will be acknowledged, corrected or explained in some form. |
| Question | Reviewer has general questions that may warrant addressing before a merge. | Reviewer’s expectation is that the question will be acked or answered in some form. |
| Concern | This is something to consider an important issue and a response would be appreciated. | Reviewer’s expectation is that there will be a response most of the time. |
| Suggestion | Reviewer thinks code could be improved, but change is not necessary. | Reviewer expects submitter to consider if change is desirable/worthwhile and respond appropriately. |
| Nit | This is a weakly held opinion, I'm putting it out there, but if you ignore it, no big deal. | Reviewer has no expectatio |
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.effect.IO | |
| import java.io.ByteArrayOutputStream | |
| val out = new ByteArrayOutputStream | |
| val cookies = IO(println("cookies")) | |
| Console.withOut(out) { cookies.unsafeRunSync() } | |
| out.toString // "cookies\n" |
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._ | |
| import cats.implicits._ | |
| import cats.effect.IO | |
| import scala.io.StdIn | |
| // Port of https://gist.github.com/danidiaz/112c5de83dc9c9b2ece1bf4d3581da24 to Scala | |
| /** An algebraic data type for expressions to add and multiply integers. */ | |
| sealed trait Exp |
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
| final case class PasswordValue(value: String) { | |
| override def toString = "PasswordValue(****)" | |
| } | |
| object SafePassword { | |
| def resource[F[_]: Sync](value: String): F[Resource[F, PasswordValue]] = | |
| for { | |
| used <- Ref.of[F, Boolean](false) | |
| chars = value.toCharArray | |
| givePasswordAndNullify = Sync[F].delay { |
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.Applicative | |
| import cats.arrow.Arrow | |
| import cats.implicits._ | |
| /** | |
| Theorem 1.1 (Cayley representation for (Set) monoids) | |
| Every monoid (M,⊕,e) is a sub-monoid of the monoid of endomorphisms on M. | |
| Notions of Computation as Monoids | |
| EXEQUIEL RIVAS, MAURO JASKELIOFF |
- I set a breakpoint in pcap.dfdl.xsd on line 168 (first use of the Ethernet element).
- I start the debug session. This pauses at the beginning of the parse, and I hit "Continue" which then breaks on line 168 (Ethernet element).
- I open the ethernetIP.dfdl.xsd file via normal VSCode File->Open commands. I add a breakpoint to line 68 (declaration of MACDest element).
- I press "Continue" and the ethernet breakpoint is hit.
- If I click on the Call Stack where MACDest is at the top of the stack, a different view of MACDest is shown: it is from within the ethernetIP jar file. I suspect this is from a plugin I have installed locally (https://marketplace.visualstudio.com/items?itemName=wmanth.jar-viewer ?), but I'm not sure and would need external validation for.
I am surprised that the separately-opened xsd breakpoint is correctly mapped, but it seems to work for me.
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
| //> using scala 2 | |
| //> using toolkit typelevel:latest | |
| // https://practicalocaml.com/how-to-build-type-safe-state-machines-using-type-state/ | |
| // type 'state fsm = { state: 'state } | |
| case class Fsm[State](state: State) | |
| /* | |
| type id |
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
| <?xml version="1.0" encoding="UTF-8" ?> | |
| <configuration> | |
| <appender name="CONSOLE" | |
| class="ch.qos.logback.core.ConsoleAppender"> | |
| <layout class="ch.qos.logback.classic.PatternLayout"> | |
| <Pattern>%X{traceId} %X{spanId} - %m%n</Pattern> | |
| </layout> | |
| </appender> |
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
| //> using toolkit typelevel:latest | |
| //> using option -Ykind-projector | |
| //> using dep org.typelevel::monoids:0.2.0 | |
| import cats._ | |
| import cats.syntax.all._ | |
| import org.typelevel.monoids._ | |
| import cats.data.Store | |
| import cats.data.StoreT |
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://noelwelsh.com/talks/tagless-final-for-humans | |
| trait Algebra: | |
| type Ui[_] | |
| trait Controls extends Algebra: | |
| def text(prompt: String): Ui[String] | |
| def choice(prompt: String, options: (String, Boolean)*): Ui[Boolean] | |
| // etc... |