Skip to content

Instantly share code, notes, and snippets.

Seth Tisue SethTisue

View GitHub Profile
View array-view
scala> Array("a", "b", "c", "d")
res0: Array[String] = Array(a, b, c, d)
scala> res0.view.slice(1, 3)
res1: scala.collection.mutable.IndexedSeqView[String,Array[String]] = SeqViewS(...)
scala> res1.toList
res2: List[String] = List(b, c)
scala> res1(0) = "zzz"
@SethTisue
SethTisue / 7234.txt
Created Jun 26, 2017
is this scala/bug#7234 or something else?
View 7234.txt
scala> trait T; class C[T2 <: T](val t: T2, b: Boolean = true, n: Int = 0)
defined trait T
defined class C
scala> val t = new T { }
t: T = $anon$1@f2a1813
scala> new C[t.type](t)
res0: C[<refinement>.type] = C@7645f03e
View -
* 049f0ec06c (origin/HEAD, origin/2.12.x) Merge pull request #5936 from adriaanm/i10244-bitmaps-for-fields
|\
| * 5f86b1d94d Drive bitmap computation from field, not accessor
* | e72ab5ad07 Merge pull request #5940 from janekdb/topic/2.12/intellij-code-analysis-unused-format-args
|\ \
| * | 7eb861cb22 Remove unused format arg in interpreter echo
| |/
* | 2c50123696 Merge pull request #5822 from lrytz/t9937
|\ \
| * | 04d4f4c61a SI-9937 find nested java classes if InnnerClass entry is missing
View -
* 049f0ec06c (origin/HEAD, origin/2.12.x) Merge pull request #5936 from adriaanm/i10244-bitmaps-for-fields
|\
| * 5f86b1d94d Drive bitmap computation from field, not accessor
* | e72ab5ad07 Merge pull request #5940 from janekdb/topic/2.12/intellij-code-analysis-unused-format-args
|\ \
| * | 7eb861cb22 Remove unused format arg in interpreter echo
| |/
* | 2c50123696 Merge pull request #5822 from lrytz/t9937
|\ \
| * | 04d4f4c61a SI-9937 find nested java classes if InnnerClass entry is missing
View -
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<config xmlns="http://artifactory.jfrog.org/xsd/1.7.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.jfrog.org/xsd/artifactory-v1_7_3.xsd">
<offlineMode>false</offlineMode>
<helpLinksEnabled>true</helpLinksEnabled>
<fileUploadMaxSizeMb>100</fileUploadMaxSizeMb>
<dateFormat>dd-MM-yy HH:mm:ss z</dateFormat>
<addons>
<showAddonsInfo>true</showAddonsInfo>
<showAddonsInfoCookie>1430275670992</showAddonsInfoCookie>
</addons>
@SethTisue
SethTisue / scalawags-40.md
Created Aug 19, 2016
Scalawags #40: Endless Summer
View scalawags-40.md
View boolean-fold.scala
~/tmp/scalaz-fold % sbt
[info] Loading global plugins from /Users/tisue/.sbt/0.13/plugins
[info] Set current project to scalaz-fold (in build file:/Users/tisue/tmp/scalaz-fold/)
> set scalaVersion := "2.11.8"
[info] Defining *:scalaVersion
[info] The new value will be used by *:Additional arguments for the presentation compiler., *:allDependencies and 24 others.
[info] Run `last` for details.
[info] Reapplying settings...
[info] Set current project to scalaz-fold (in build file:/Users/tisue/tmp/scalaz-fold/)
> set libraryDependencies += "org.scalaz" %% "scalaz-core" % "7.2.4"
@SethTisue
SethTisue / scalawags-39.md
Last active Dec 30, 2019
Scalawags #39: Scala Center + Scala Days
View scalawags-39.md
View reflect.scala
scala> import scala.language.reflectiveCalls
import scala.language.reflectiveCalls
scala> type Structural = { def foo: Int; def foo_=(x: Int): Unit }
defined type alias Structural
scala> object O { var foo = 5 }
defined object O
scala> (O: Any).asInstanceOf[Structural].foo = 10
@SethTisue
SethTisue / scalawags-38.md
Last active Jul 3, 2016
Scalawags #38: The Sound of Dotty
View scalawags-38.md
You can’t perform that action at this time.