Skip to content

Remove remaining references to scalafiddle #2460

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
source 'https://rubygems.org'
gem 'jekyll-redirect-from'
gem 'jekyll-scalafiddle'
gem 'html-proofer'
gem 'kramdown-parser-gfm'
# gem 'html-proofer' # link-checking: bundle exec htmlproofer ./_site/ --only-4xx --empty-alt-ignore --allow-hash-href
Expand Down
79 changes: 37 additions & 42 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,93 +4,88 @@ GEM
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
colorator (1.1.0)
concurrent-ruby (1.1.8)
em-websocket (0.5.2)
concurrent-ruby (1.1.10)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
ethon (0.12.0)
ffi (>= 1.3.0)
http_parser.rb (~> 0)
ethon (0.15.0)
ffi (>= 1.15.0)
eventmachine (1.2.7)
ffi (1.15.0)
ffi (1.15.5)
forwardable-extended (2.6.0)
html-proofer (3.15.3)
html-proofer (3.19.4)
addressable (~> 2.3)
mercenary (~> 0.3)
nokogumbo (~> 2.0)
parallel (~> 1.3)
nokogiri (~> 1.13)
parallel (~> 1.10)
rainbow (~> 3.0)
typhoeus (~> 1.3)
yell (~> 2.0)
http_parser.rb (0.6.0)
i18n (0.9.5)
http_parser.rb (0.8.0)
i18n (1.10.0)
concurrent-ruby (~> 1.0)
jekyll (3.9.1)
jekyll (4.2.2)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (~> 0.7)
jekyll-sass-converter (~> 1.0)
i18n (~> 1.0)
jekyll-sass-converter (~> 2.0)
jekyll-watch (~> 2.0)
kramdown (>= 1.17, < 3)
kramdown (~> 2.3)
kramdown-parser-gfm (~> 1.0)
liquid (~> 4.0)
mercenary (~> 0.3.3)
mercenary (~> 0.4.0)
pathutil (~> 0.9)
rouge (>= 1.7, < 4)
rouge (~> 3.0)
safe_yaml (~> 1.0)
terminal-table (~> 2.0)
jekyll-redirect-from (0.16.0)
jekyll (>= 3.3, < 5.0)
jekyll-sass-converter (1.5.2)
sass (~> 3.4)
jekyll-scalafiddle (1.0.1)
jekyll (~> 3.0)
jekyll-sass-converter (2.2.0)
sassc (> 2.0.1, < 3.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
kramdown (2.3.1)
kramdown (2.4.0)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.3)
listen (3.5.1)
listen (3.7.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.3.6)
mini_portile2 (2.8.0)
nokogiri (1.13.6)
mini_portile2 (~> 2.8.0)
mercenary (0.4.0)
nokogiri (1.13.6-x86_64-linux)
racc (~> 1.4)
nokogumbo (2.0.2)
nokogiri (~> 1.8, >= 1.8.4)
parallel (1.19.2)
parallel (1.22.1)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (4.0.6)
public_suffix (4.0.7)
racc (1.6.0)
rainbow (3.0.0)
rb-fsevent (0.11.0)
rainbow (3.1.1)
rb-fsevent (0.11.1)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.5)
rouge (3.26.0)
rouge (3.29.0)
safe_yaml (1.0.5)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sassc (2.4.0)
ffi (~> 1.9)
terminal-table (2.0.0)
unicode-display_width (~> 1.1, >= 1.1.1)
typhoeus (1.4.0)
ethon (>= 0.9.0)
unicode-display_width (1.8.0)
webrick (1.7.0)
yell (2.2.2)

PLATFORMS
ruby
x86_64-linux

DEPENDENCIES
html-proofer
jekyll-redirect-from
jekyll-scalafiddle
kramdown-parser-gfm
webrick (~> 1.7)

BUNDLED WITH
2.3.6
2.3.10
2 changes: 0 additions & 2 deletions _ba/tour/basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,15 +157,13 @@ Postoje i neke druge razlike, ali zasad, možete misliti o njima kao nečemu sli

Metode mogu imati višelinijske izraze također.

{% scalafiddle %}
```scala mdoc
def getSquareString(input: Double): String = {
val square = input * input
square.toString
}
println(getSquareString(2.5)) // 6.25
```
{% endscalafiddle %}

Zadnjo izraz u tijelu metode je povratna vrijednost metode. (Scala ima ključnu riječ `return`, ali se rijetko koristi.)

Expand Down
1 change: 0 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,4 +206,3 @@ scala3ref: "https://docs.scala-lang.org/scala3/reference"
exclude: ["vendor"]
plugins:
- jekyll-redirect-from
- jekyll-scalafiddle
14 changes: 0 additions & 14 deletions _es/tour/basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,12 @@ Las expresiones son sentencias computables.

Se puede ver el resultado de evaluar expresiones usando `println`.

{% scalafiddle %}
```scala mdoc
println(1) // 1
println(1 + 1) // 2
println("Hello!") // Hello!
println("Hello," + " world!") // Hello, world!
```
{% endscalafiddle %}

## Valores

Expand Down Expand Up @@ -110,21 +108,17 @@ La lista de parámetros de la función está a la izquierda de la flecha `=>`, y

También podemos asignarle un nombre a la función.

{% scalafiddle %}
```scala mdoc
val addOne = (x: Int) => x + 1
println(addOne(1)) // 2
```
{% endscalafiddle %}

Las funciones pueden tomar varios parámetros.

{% scalafiddle %}
```scala mdoc
val add = (x: Int, y: Int) => x + y
println(add(1, 2)) // 3
```
{% endscalafiddle %}

O ninguno.

Expand All @@ -139,23 +133,19 @@ Los métodos se parecen y comportan casi como a las funciones, pero se diferenci

Un método se define con la palabra reservada `def`, seguida por el nombre del método, la lista de parámetros, el tipo de valores que el método devuelve, y el cuerpo del método.

{% scalafiddle %}
```scala mdoc:nest
def add(x: Int, y: Int): Int = x + y
println(add(1, 2)) // 3
```
{% endscalafiddle %}

Observe que el tipo de retorno se declara _después_ de la lista de parámetros, y separado con dos puntos, p.ej. `: Int`.

Un método puede tener varias listas de parámetros.

{% scalafiddle %}
```scala mdoc
def addThenMultiply(x: Int, y: Int)(multiplier: Int): Int = (x + y) * multiplier
println(addThenMultiply(1, 2)(3)) // 9
```
{% endscalafiddle %}

O ninguna lista de parámetros.

Expand All @@ -168,15 +158,13 @@ Hay otras diferencias, pero para simplificar, podemos pensar que son similares a

Los métodos también pueden tener expresiones de varias lineas.

{% scalafiddle %}
```scala mdoc
def getSquareString(input: Double): String = {
val square = input * input
square.toString
}
println(getSquareString(2.5)) // 6.25
```
{% endscalafiddle %}

La ultima expresión en el cuerpo del método es el valor de retorno del mismo.
(Scala tiene una palabra reservada `return`, pero se usa raramente y no se aconseja usarla)
Expand Down Expand Up @@ -279,7 +267,6 @@ trait Greeter {

Un `trait` también puede definir un método, o un valor, con una implementación por defecto.

{% scalafiddle %}
```scala mdoc:reset
trait Greeter {
def greet(name: String): Unit =
Expand All @@ -304,7 +291,6 @@ greeter.greet("Scala developer") // Hello, Scala developer!
val customGreeter = new CustomizableGreeter("How are you, ", "?")
customGreeter.greet("Scala developer") // How are you, Scala developer?
```
{% endscalafiddle %}

Aquí, `DefaultGreeter` extiende un solo trait, pero puede extender múltiples traits.

Expand Down
4 changes: 0 additions & 4 deletions _es/tour/multiple-parameter-lists.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,15 @@ def foldLeft[B](z: B)(op: (B, A) => B): B

Comenzando con un valor inicial 0, `foldLeft` aplica la función `(m, n) => m + n` a cada uno de los elementos de la lista y al valor acumulado previo.

{% scalafiddle %}
```scala mdoc
val numbers = List(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
val res = numbers.foldLeft(0)((m, n) => m + n)
println(res) // 55
```
{% endscalafiddle %}


A continuación se muestra otro ejemplo:

{% scalafiddle %}
```scala mdoc
object CurryTest extends App {

Expand All @@ -53,7 +50,6 @@ A continuación se muestra otro ejemplo:
println(filter(nums, modN(3)))
}
```
{% endscalafiddle %}

_Nota: el método `modN` está parcialmente aplicado en las dos llamadas a `filter`; esto significa que solo su primer argumento es realmente aplicado. El término `modN(2)` devuelve una función de tipo `Int => Boolean` y es por eso un posible candidato para el segundo argumento de la función `filter`._

Expand Down
14 changes: 0 additions & 14 deletions _ja/tour/basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,12 @@ Scastieを利用することでブラウザ上でScalaを実行することが
```
`println`を使うことで、式の結果を出力できます。

{% scalafiddle %}
```scala mdoc
println(1) // 1
println(1 + 1) // 2
println("Hello!") // Hello!
println("Hello," + " world!") // Hello, world!
```
{% endscalafiddle %}

### 値

Expand Down Expand Up @@ -110,21 +108,17 @@ println({

関数には名前をつけることもできます。

{% scalafiddle %}
```scala mdoc
val addOne = (x: Int) => x + 1
println(addOne(1)) // 2
```
{% endscalafiddle %}

関数は複数のパラメーターをとることもできます。

{% scalafiddle %}
```scala mdoc
val add = (x: Int, y: Int) => x + y
println(add(1, 2)) // 3
```
{% endscalafiddle %}

またパラメーターを取らないこともありえます。

Expand All @@ -139,23 +133,19 @@ println(getTheAnswer()) // 42

メソッドは `def` キーワードで定義されます。 `def` の後ろには名前、パラメーターリスト、戻り値の型、処理の内容が続きます。

{% scalafiddle %}
```scala mdoc:nest
def add(x: Int, y: Int): Int = x + y
println(add(1, 2)) // 3
```
{% endscalafiddle %}

戻り値の型は引数リストとコロンの「後ろ」に宣言することに注意してください。`: Int`

メソッドは複数のパラメーターリストを受け取ることができます。

{% scalafiddle %}
```scala mdoc
def addThenMultiply(x: Int, y: Int)(multiplier: Int): Int = (x + y) * multiplier
println(addThenMultiply(1, 2)(3)) // 9
```
{% endscalafiddle %}

また、パラメーターリストを一切受け取らないこともあります。

Expand All @@ -167,15 +157,13 @@ println("Hello, " + name + "!")

メソッドは複数行の式も持つことができます。

{% scalafiddle %}
```scala mdoc
def getSquareString(input: Double): String = {
val square = input * input
square.toString
}
println(getSquareString(2.5)) // 6.25
```
{% endscalafiddle %}

メソッド本体にある最後の式はメソッドの戻り値になります。(Scalaには`return`キーワードはありますが、めったに使われません。)

Expand Down Expand Up @@ -278,7 +266,6 @@ trait Greeter {

トレイトはデフォルトの実装を持つこともできます。

{% scalafiddle %}
```scala mdoc:reset
trait Greeter {
def greet(name: String): Unit =
Expand All @@ -303,7 +290,6 @@ greeter.greet("Scala developer") // Hello, Scala developer!
val customGreeter = new CustomizableGreeter("How are you, ", "?")
customGreeter.greet("Scala developer") // How are you, Scala developer?
```
{% endscalafiddle %}

ここでは、`DefaultGreeter`は一つのトレイトだけを継承していますが、複数のトレイトを継承することもできます。

Expand Down
2 changes: 0 additions & 2 deletions _ja/tour/multiple-parameter-lists.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,11 @@ def foldLeft[B](z: B)(op: (B, A) => B): B

初期値0から始まり、`foldLeft`はここではリスト内の各要素とその一つ前の累積値に関数`(m, n) => m + n`を適用します。

{% scalafiddle %}
```scala mdoc
val numbers = List(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
val res = numbers.foldLeft(0)((m, n) => m + n)
println(res) // 55
```
{% endscalafiddle %}

### ユースケース
推奨される複数パラメータリストのユースケースは次の通りです。
Expand Down
Loading