Giter Club home page Giter Club logo

visual-scala-reference's Introduction

Visual Scala Reference

An awesome visual guide to some of the most common Scala functions.

https://superruzafa.github.io/visual-scala-reference

Build Status

Development

This guide uses Hugo as render engine.

To launch the server in your local machine just launch the following command:

$ hugo server

and browse http://localhost:1313/visual-scala-reference

The function diagrams are written using the TeX TikZ library. In order to build the images you must have configured a TeX environment (or build and use the image from the provided Dockerfile).

Then, from the project's root dir just launch the following command:

$ make

It will transform the .tex files into .svg images.

visual-scala-reference's People

Contributors

dependabot[bot] avatar janpfeiffer92 avatar jsonzilla avatar kinshotomoya avatar lelysi avatar mgx0612 avatar superruzafa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

visual-scala-reference's Issues

Add a notice for simplification about Collection.someMethod

There are some entries for methods defined in object like Collection.concat and Collection.empty.

I think it might be confusing for new-comers since there is no Collection object actually.
In reality, such methods are defined not inCollection but in the specific collection objects, e.g. List.concat or Set.empty.

I first imagined that each signatures have a note like

object COLLECTION {
  def empty[A]: COLLECTION[A]
}
// COLLECTION could be actual collection type, like List or Set.

but this is not ideal since the signatures requires translations.
So I would suggest to add

  • A dedicated page regarding this simplification somewhre.
  • Links to the page in the functions

For methods in trait, such simplification is fine, I think !!

Non-standard library functions

Would you consider non-standard functions like traverse and sequence typical to libraries like cats? Is that more of a seperate site/project?

"See also" that guides users to related functions

There are some comibinations of functions that are related to each other, e.g.

  • compose and andThen in Function
  • drop | dropRight | dropWhile | take | takeRight | takeWhile in Collection
  • head | headOption | last | lastOption in Collection
  • ...

I think adding a see-also table or something to each page would be helpful for readers, so that they can find related functions even if they don't know names of all functions.

Such goal could be realized by mentioning related function in page.
But I think it could be error-prone and tedious... especially when accounting translation into.
So it would be nicer if relations between functions are generated by Jekyl for all pages in all translations, in single source of truth, like see-also.yml or something like that.

see-also:
  group1: [compose,andThen]
  group2: [drop,dropRight,dropWhile,take,takeRight,takeWhile]
  group3: [head,headOption,last,lastOption]
  ...

I don't know Jekyll much... it may have such feature ?

RUN tlmgr update --self fails in Dockerfile

I tried to run the docker build with the following code:

docker build --compress -t visual-scala-reference .

Which failed on step 3:

 => [2/8] RUN apk update && apk add --no-cache make hugo inotify-tools                                                                                                                                                                    10.9s
 => ERROR [3/8] RUN tlmgr update --self                                                                                                                                                                                                    4.5s
------
 > [3/8] RUN tlmgr update --self:
4.394
4.394 tlmgr: Local TeX Live (2020) is older than remote repository (2023).
4.394 Cross release updates are only supported with
4.394   update-tlmgr-latest(.sh/.exe) --update
4.394 See https://tug.org/texlive/upgrade.html for details.
------
Dockerfile:5
--------------------
   3 |     RUN apk update && apk add --no-cache make hugo inotify-tools
   4 |
   5 | >>> RUN tlmgr update --self
   6 |     RUN tlmgr install standalone
   7 |     RUN tlmgr install pgf
--------------------
ERROR: failed to solve: process "/bin/sh -c tlmgr update --self" did not complete successfully: exit code: 1

The logs link to https://tug.org/texlive/upgrade.html which suggests a way of upgrading, alternatively it suggests building with the newer TexLive installation.

This Dockerfile uses this repos Docker image as a base: https://github.com/superruzafa/docker-tinytex

Perhaps the source image needs updating? DockerHub lists a 0.5 tag that was updated a year ago compared to the 0.2 tag from 3 years ago but switching to it still results in the error:

 tlmgr: Local TeX Live (2022) is older than remote repository (2023).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.