In this video we are going to run a thought experiment: "What if your code compiled only if it was in the right place?".
Export Java Symbols compiles, but fails at runtime with NoClassDefFoundError.
https://github.com/lampepfl/dotty/issues/12249
Table of Contents:
00:00 Intro
02:03 Project setup
02:53 Packages vs Namespaces
04:19 Top Level Definitions
09:54 Top Level Exports
14:02 The forced caked pattern
20:26 Why I prefer namespaces
22:03 Top Level Exports vs Package objects
23:05 Export Java terms bug https://github.com/lampepfl/dotty/issues/12249
24:33 Real Project Demo
35:54 Location Oriented Programming
37:45 Real Project Demo (continued)
Website: https://devinsideyou.com
Patreon: https://patreon.devinsideyou.com
Discord: https://discord.devinsideyou.com
Telegram: https://telegram.devinsideyou.com
Twitter: https://twitter.devinsideyou.com
GitHub: https://github.devinsideyou.com
LBRY: https://lbry.devinsideyou.com
Install scripts: https://install.devinsideyou.com
Giter8 templates: https://g8.devinsideyou.com
Spotify concentration playlist: https://code.radio.devinsideyou.com
Cheers and Happy Coding!
#scala #tutorial #programming
...
https://www.youtube.com/watch?v=dh61X4GZmvg
In this video we are going to learn about models of computation and why they matter. We will quickly walk through the most prominent models and in the next video we will look at two of them in depth. The models discussed in this video are: substitution (with both applicative- and normal-order evaluation), environment and stream-processing. We also take a glimpse at thread-based as well as event-based concurrency models and even mention the actor model of computation.
Structure and Interpretation of Computer Programs:
https://mitpress.mit.edu/sicp/
Website: https://devinsideyou.com
Patreon: https://patreon.devinsideyou.com
Discord: https://discord.devinsideyou.com
Twitter: https://twitter.devinsideyou.com
Github: https://github.devinsideyou.com
Install scripts: https://install.devinsideyou.com
Giter8 templates: https://g8.devinsideyou.com
Spotify concentration playlist: https://code.radio.devinsideyou.com
Cheers and Happy Coding!
#SICP
...
https://www.youtube.com/watch?v=tktx7itTB3k
In this video we are going to see how easy it is to manage your .dotfiles with GNU Stow - a symlinking command line tool. We will also learn how to manage directory layouts of arbitrary complexity and how to use other people's .dotfiles as if they were themes.
GNU Stow:
https://www.gnu.org/software/stow/
Your unofficial guide to dotfiles on GitHub:
https://dotfiles.github.io/
My .dotfiles:
https://github.com/agilesteel/.dotfiles
This video is part of the following playlist:
https://www.youtube.com/playlist?list=PLJGDHERh23x9DbNtd7AoGlvuuejBuxrPZ
Table of Contents
01:04 Introduction to .dotfiles
09:52 Managing .dotfiles with stow
22:04 Advanced layouts
26:56 Restoring .dotfiles on a new computer
29:54 Using .dotfiles of other people like themes
32:47 Crafting your own .dotfiles
Website: https://devinsideyou.com
Patreon: https://patreon.devinsideyou.com
Discord: https://discord.devinsideyou.com
Twitter: https://twitter.devinsideyou.com
Github: https://github.devinsideyou.com
Install scripts: https://install.devinsideyou.com
Giter8 templates: https://g8.devinsideyou.com
Spotify concentration playlist: https://code.radio.devinsideyou.com
Cheers and Happy Coding!
#tutorial
...
https://www.youtube.com/watch?v=CFzEuBGPPPg
In this video we are going to see a lot of different ways to encode opaque types in Scala including a library called NewType. We will also see support for opaque types in Scala 3.
Scala NewType:
https://github.com/estatico/scala-newtype
Haskell Newtype:
https://wiki.haskell.org/Newtype
A simple trick to improve type safety of your Scala code (the blog post that I mentioned):
https://blog.softwaremill.com/a-simple-trick-to-improve-type-safety-of-your-scala-code-ba80559ca092
Practical Functional Programming in Scala (the book that I mentioned):
https://leanpub.com/pfp-scala
Value Classes in Scala (AnyVal):
https://docs.scala-lang.org/overviews/core/value-classes.html
Table of Contents:
00:00 introduction
01:50 the type safety problem
02:58 wrappers to the rescue
04:28 the performance/latency problem
05:22 AnyVal
08:38 Tagged Types
15:43 https://github.com/estatico/scala-newtype
25:36 cats integration
27:44 refined integration
31:13 circe integration
33:57 Coercible
43:38 map extension
45:34 opaque type aliases in Scala3
Website: https://devinsideyou.com
Patreon: https://patreon.devinsideyou.com
Discord: https://discord.devinsideyou.com
Twitter: https://twitter.devinsideyou.com
Github: https://github.devinsideyou.com
LBRY: https://lbry.devinsideyou.com
Install scripts: https://install.devinsideyou.com
Giter8 templates: https://g8.devinsideyou.com
Spotify concentration playlist: https://code.radio.devinsideyou.com
Cheers and Happy Coding!
#NewType #tutorial
...
https://www.youtube.com/watch?v=WyvawRRuU2c
In this video we will discuss all the possible ways to handle errors in Scala. It is mostly focused on exceptions, but also covers other interesting Techniques like Option, Either, Try, util.control.Exception.catch and friends, home baked types, external libraries and many other things. Most importantly it provides some guidance for when to use which technique. This video got too long so it is split into 2 parts.
The throwable API is here:
https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html
The scala.util.control.Exception API is here:
https://www.scala-lang.org/api/2.12.4/scala/util/control/Exception$.html
The scala.util.control.NonFatal API is here:
https://github.com/scala/scala/blob/v2.12.4/src/library/scala/util/control/NonFatal.scala
The scalactic library is here:
http://www.scalactic.org/
This video is part of the following playlist:
https://www.youtube.com/playlist?list=PLJGDHERh23x-YBJ8LmYU_IGBFflvsKfLu
Website: https://devinsideyou.com
Patreon: https://patreon.devinsideyou.com
Discord: https://discord.devinsideyou.com
Twitter: https://twitter.devinsideyou.com
Github: https://github.devinsideyou.com
Install scripts: https://install.devinsideyou.com
Giter8 templates: https://g8.devinsideyou.com
Spotify concentration playlist: https://code.radio.devinsideyou.com
Cheers and Happy Coding!
#Exception #tutorial
...
https://www.youtube.com/watch?v=oOj7rfoDzJ0
This is the second video about objects vs data structures in which we will learn when to use which and most importantly what happens if YOU chose wrong! This video is very much related to the videos about subtype polymorphism and inversion of control. Among other things we will learn how Java lacks support for dealing with data structures whereas Scala comes prepared.
Uncle Bob's article is here:
https://sites.google.com/site/unclebobconsultingllc/active-record-vs-objects
The Wikipedia article about ANSI escape codes is here:
https://en.wikipedia.org/wiki/ANSI_escape_code
A nice tutorial about ANSI escape codes with examples in Python is here:
http://www.lihaoyi.com/post/BuildyourownCommandLinewithANSIescapecodes
The stackoverflow question is here:
https://stackoverflow.com/questions/11628852/how-does-pattern-matching-in-scala-overcome-duplication-that-switch-case-causes/11629599
The paper related to the expression problem is here:
http://zenger.org/papers/fool05.pdf
Website: https://devinsideyou.com
Patreon: https://patreon.devinsideyou.com
Discord: https://discord.devinsideyou.com
Twitter: https://twitter.devinsideyou.com
Github: https://github.devinsideyou.com
Install scripts: https://install.devinsideyou.com
Giter8 templates: https://g8.devinsideyou.com
Spotify concentration playlist: https://code.radio.devinsideyou.com
Cheers and Happy Coding!
#Object #DataStructure #tutorial
...
https://www.youtube.com/watch?v=N7mRU4nCDGw
Warning: there is so much syntactic sugar in this video that you might get diabetes! In this video we will learn what happens behind the scenes when we use (partial) function literals in Scala. We will learn about lambdas, function objects, anonymous classes, magic, partial functions and their use cases.
The specification for the Single Abstract Method (SAM) conversion is here:
https://www.scala-lang.org/files/archive/spec/2.12/06-expressions.html#sam-conversion
This video is part of the following playlist:
https://www.youtube.com/playlist?list=PLJGDHERh23x-YBJ8LmYU_IGBFflvsKfLu
Website: https://devinsideyou.com
Patreon: https://patreon.devinsideyou.com
Discord: https://discord.devinsideyou.com
Twitter: https://twitter.devinsideyou.com
Github: https://github.devinsideyou.com
Install scripts: https://install.devinsideyou.com
Giter8 templates: https://g8.devinsideyou.com
Spotify concentration playlist: https://code.radio.devinsideyou.com
Cheers and Happy Coding!
#Lambda #PartialFunction #tutorial
...
https://www.youtube.com/watch?v=nBm0J4ARIGo