Skip to content
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
4 changes: 3 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"name": "scala",
"image": "sbtscala/scala-sbt:eclipse-temurin-17.0.4_1.7.1_3.2.0",
"build": {
"dockerfile": "../Dockerfile"
},
"customizations": {
"vscode": {
"extensions": [
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/scala.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: scala

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build:
runs-on: ubuntu-lates
steps:
- name: "Check Repository"
uses: actions/checkout@v4

- name: "Spell Check"
uses: rojopolis/spellcheck-github-actions@0.45.0
with:
output_file: spellcheck-output.txt

24 changes: 24 additions & 0 deletions .spellcheck_exceptions_dictionary.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# acronyms

# authors
Kernighan
Ritchie
praisetompane

# concepts


# course codes:


# technology:


# institutions:
roadmap
hackerrank


# urls:
https
src
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM sbtscala/scala-sbt:eclipse-temurin-alpine-21.0.6_7_1.10.7_3.6.3

WORKDIR /scala

COPY . .

RUN adduser -u 5678 --disabled-password --gecos "" scala && chown -R scala /scala
USER scala
10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Scala

**objective**: an in-depth study of Scala, its implementation and ecosystem.
**objective**: An in-depth study of Scala's implementation and ecosystem.

## Language Details:
- [language reference](https://docs.scala-lang.org/scala3/reference/)
Expand All @@ -22,13 +22,6 @@

## Use Cases:
- [Applications for Language]()
- Large Implementations:
- https://github.com/lichess-org
- https://github.com/twitter/util
- https://github.com/twitter/finagle
- https://github.com/twitter/the-algorithm
- Database Integration:
- Web Development:

## Learning Resources:
- roadmap:
Expand All @@ -40,6 +33,7 @@
- [scala cli](https://index.scala-lang.org/virtuslab/scala-cli)
- [learn-scala-3-the-fast-way-book](https://alvinalexander.com/scala/learn-scala-3-the-fast-way-book/)


## References:

**Disclaimer**: This is an ongoing and incomplete project to unpack these concepts and serve as my distributed memory.
3 changes: 0 additions & 3 deletions application_projects/README.md

This file was deleted.

3 changes: 3 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
sbt clean update compile
sbt test
sbt assembly
13 changes: 13 additions & 0 deletions spellcheck.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
matrix:
- name: English
aspell:
lang: en
ignore-case: false
dictionary:
wordlists:
- .spellcheck_exceptions_dictionary.txt
encoding: utf-8
sources:
- "**/*.md"
- "**/*.txt"
default_encoding: utf-8
4 changes: 2 additions & 2 deletions src/main/scala/5_collections_list_custom_length.scala
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import scala.annotation.tailrec
def length(arr: List[Int]): Int =
def length(lst: List[Int]): Int =
@tailrec
def _length(total: Int, objects: List[Int]): Int = objects match
case List() => total
case head :: tail => _length(total + 1, tail)

_length(0, arr)
_length(0, lst)


@main def main(): Unit =
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/5_collections_list_custom_reverse.scala
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
def reverse[T, L](arr: List[T]): List[T] = arr.zipWithIndex
def reverse[T, L](lst: List[T]): List[T] = lst.zipWithIndex
.sortWith { _._2 > _._2 }
.map { case (value, index) => value }

Expand Down
4 changes: 2 additions & 2 deletions src/main/scala/5_collections_list_filter_positions.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
def filter_out_odd_indices(arr: List[Int]): List[Int] =
def filter_out_odd_indices(lst: List[Int]): List[Int] =
def is_odd(number: Int) = number % 2 == 1
arr.zipWithIndex
lst.zipWithIndex
.filterNot { (value, index) => is_odd(index + 1) }
.map { (value, index) => value }

Expand Down