PassMark OSForensics Professional 11.1 Crack [Latest]
taniyaali162
24 views
29 slides
Aug 27, 2025
Slide 1 of 29
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
About This Presentation
🌍👉 COPY & PASTE LINK 🌎👉 https://up-community.wiki/ds/
PassMark OSForensics Professional is a digital forensic software toolkit that enables users to conduct digital investigations by acquiring, analyzing, and reporting on evidence from computers and other digital devices. It offers ...
🌍👉 COPY & PASTE LINK 🌎👉 https://up-community.wiki/ds/
PassMark OSForensics Professional is a digital forensic software toolkit that enables users to conduct digital investigations by acquiring, analyzing, and reporting on evidence from computers and other digital devices. It offers features such as high-speed file searching and indexing, hash and signature analysis, password and file decryption, deleted file recovery, timeline creation, and comprehensive case management and reporting tools to support field triage through to final reports.
🌐 COPY THIS LINK INTO BROWSER 🟢==►► https://up-community.wiki/ds/
Size: 361.97 KB
Language: en
Added: Aug 27, 2025
Slides: 29 pages
Slide Content
Type Class
Derivation in
Scala 3
by José Luis Pintado Barbero
/jospint
Type classes
Type classes are “Type system constructs that support ad hoc polymorphism”.
In simpler terms:
●Defining behaviour for a group of types, without modifying those types, no inheritance.
●Custom implementation for each type.
●Generate instances that uses those implementations.
More specifically:
●A trait that defines the operations.
●Implicit instances that provide implementations for specific types.
●Methods that use the declared implicit instances.
Type classes in Scala 2
trait Encoder[E] {
def encode(value: E): String
}
implicit val booleanEncoder: Encoder[Boolean] = new Encoder[Boolean] {
def encode(value: Boolean): String = if (value) "yes" else "no"
}
def display[E](value: E)(implicit encoder: Encoder[E]): Unit =
println(encoder.encoder(value))
Type classes in Scala 3
trait Encoder[E]:
def encode(value: E): String
given Encoder[Boolean] with
def encode(value: Boolean): String = if (value) "yes" else "no"
def display[E](value: E)(using encoder: Encoder[E]): Unit =
println(encoder.encode(value))
val amIHuman = true
display(amIHuman) // yes
Defining more encoders with given/using clauses
given Encoder[Boolean] with
def encode(element: Boolean): String = if (element) "yes" else "no"
given Encoder[String] with
def encode(element: String): String = element
given Encoder[Int] with
def encode(element: Int): String = element.toString
Deriving given/using clauses
given encodeList[E](using encoder: Encoder[E]): Encoder[List[E]] with
def encode(element: List[E]): String =
element.map(encoder.encode).mkString( "[", ", ", "]")
given encodeOption[E](using encoder: Encoder[E]): Encoder[Option[E]] with
def encode(element: Option[E]): String =
element match { case Some(e) => encoder.encode(e) case None => "None" }
Defining even more encoders… ?
case class Car(brand: String, year: Int, isNew: Boolean)
given encodePerson(using s: Encoder[String], i: Encoder[Int], b: Encoder[Boolean]
): Encoder[Car] with
def encode(element: Car): String = {
element match
case Car(brand, year, isNew) => {
List("brand: " + s.encode(brand), "year: " + i.encode(year),
"isNew: " + b.encode(isNew)
).mkString("{", ", ", "}")
}
}
Can we save ourselves from this boilerplate nightmare?
Yes
Type class derivation
●Automatically generate given instances for type classes which satisfy some simple
conditions.
●Keyword in Scala: derives.
●Implementation using derived method.
case class Car(brand: String, year: Int, isNew: Boolean) derives Encoder
●We want to able to derive any case classes and enums automatically deriving Encoder!
●But first… let’s refresh/introduce some concepts before that…
Summoning instances
●summon Keyword used to requests given values.
●Similar to implicitly.
●summon can return a more precise type than the type it was asked for, compared to
implicitly.
Inlines
●Marking a method definition as inline will, at compile time, copy the right hand side of a
method at the place where is used, instead of invoking it.
●One can have inline arguments, expanding the variable without computing it first.
●You can have conditional inlines and match inlines
●Usages:
○Performance optimizations.
○Information that inlines surfaces at compile time.
Inlines example
inline def inlineSquare(x: Int): Int = x * x
def normalSquare(x: Int): Int = x * x
val a = InlinesDemo.inlineSquare(5)
val b = InlinesDemo.normalSquare(5)
val a: Int = 25:Int
val b: Int = com.dixa.meetup.InlinesDemo.normalSquare(5)
Inlines example
inline def inlinedLog(inline level: String, message:
String): Unit =
inline if level == "debug" then
println(s"[DEBUG] $message")
else if level == "info" then
println(s"[INFO] $message")
else println(s"[UNKNOWN] $message")
def regularLog(level: String, message: String): Unit =
if level == "debug" then
println(s"[DEBUG] $message")
else if level == "info" then
println(s"[INFO] $message")
else println(s"[UNKNOWN] $message")
Compile-time operations (scala.compiletime)
Helper definitions that provide support for compile-time operations over values
●summonInline
○Delays summoning to the call site of the function, when the type will be concrete to
the compiler so it can know whether is possible to summon or not.
○Used in conjunction with inline methods.
summonInline example
def display[E](value: E)(using encoder: Encoder[E]) = {
println(encoder.encode(value)) // It works!
}
def displaySummonDoesNotCompile [E](value: E) = {
println(summon[Encoder[E]].encode(value))
// No given instance of type com.dixa.meetup.Encoder[E] was found...
}
inline def displaySummonInline [E](value: E) ={
println(summonInline[ Encoder[E]].encode(value)) // It works!
}
Compile-time operations (scala.compiletime)
Helper definitions that provide support for compile-time operations over values
●summonInline
○Delays summoning to the call site of the function, when the type will be concrete to
the compiler so it can know whether is possible to summon or not.
○Used in conjunction with inline methods.
●constValue
○Produces the constant value represented by a type.
○Needs to be constant!
constValue example
inline def printSize[N <: Int]: Unit = println(s"Size is ${constValue[N]}")
printSize[5] // 5
printSize[Int] // Int is not a constant type; cannot take constValue
Compile-time operations (scala.compiletime)
Helper definitions that provide support for compile-time operations over values
●summonInline
○Delays summoning to the call site of the function, when the type will be concrete to
the compiler so it can know whether is possible to summon or not.
○Used in conjunction with inline methods.
●constValue
○Produces the constant value represented by a type.
○Needs to be constant!
●erasedValue
○Type erasure is a process where the compiler removes type information during
compilation. In the JVM, generic type parameters are erased at runtime.
○erasedValue returns a “fake” literal value that can be used for inline matching
○It cannot be be used at runtime, only at compile time!
erasedValue example
inline def describe[T]: String = inline erasedValue[T] match {
case _: Int => "This is an Int"
case _: String => "This is a String"
case _: List[?] => "This is a List"
case _ => "Unknown type"
}
val intDesc = describe[Int] // "This is an Int"
val strDesc = describe[String] // "This is a String"
val listDesc = describe[List[Int]] // "This is a List"
Mirrors
●Mirrors provides type level information about:
○Product types: Case classes.
○Sum types: Sealed traits, enums.
Mirrors
case class Person(name: String, age: Int)
val mirror = summon[Mirror.ProductOf[Person]]
type Labels = mirror.MirroredElemLabels // ("name", "age")
type Types = mirror.MirroredElemTypes // (String, Int)
val label = constValue[mirror.MirroredLabel] // "Person"
val jose: Person = mirror.fromTuple(("José", 37))
val aTuple: (String, Int) = Tuple.fromProductTyped(jose) // ("José", 37)
Type class derivation
●Automatically generate given instances for type classes which satisfy some simple
conditions.
●Keyword in Scala: derives.
●Implementation using derived method.
case class Car(brand: String, year: Int, isNew: Boolean) derives Encoder
●Goal: being able to derive case classes and enums automatically deriving Encoder!
Live Demo
Real life applications
●PureConfig
import pureconfig._
import pureconfig.generic.derivation.default._
import
pureconfig.generic.derivation.EnumConfigReader
sealed trait AnimalConf derives ConfigReader
case class DogConf(age: Int) extends AnimalConf
case class BirdConf(canFly: Boolean) extends
AnimalConf
ConfigSource.string("{ type: dog-conf, age: 4
}").load[AnimalConf]
import pureconfig.generic.derivation.EnumConfigReader
enum Season derives EnumConfigReader {
case Spring, Summer, Autumn, Winter
}
case class MyConf(list: List[Season]) derives ConfigReader
ConfigSource.string("{ list: [spring, summer, autumn,
winter] }").load[MyConf]
Real life applications
●uPickle
case class Dog(name: String, age: Int) derives ReadWriter
upickle.default.write( Dog("Ball", 2)) // """{"name":"Ball","age":2}"""
upickle.default.read[ Dog]("""{"name":"Ball","age":2}""" ) // Dog("Ball", 2)
Further material
●Code for the presentation
https://github.com/jospint/scala-3-type-class-derivation
●RockTheJVM: Scala Macros and Metaprogramming
https://rockthejvm.com/courses/scala-macros-and-metaprogramming
●RockTheJVM: Type classes
https://www.youtube.com/watch?v=bupBZKJT0EA
●Riskified Tech: Type class Derivation in Scala 3
https://medium.com/riskified-technology/type-class-derivation-in-scala-3-ba3c7c41d3ef
●Scala 3 Reference: Type class Derivation
https://docs.scala-lang.org/scala3/reference/contextual/derivation.html