-
Title: What the BEAM: Introduction to the Erlang/Elixir Virtual Machine
-
Abstract: Per sfruttare al massimo Erlang/Elixir non é sufficiente conoscere il linguaggio, la semantica di questi linguaggi é indissolubilmente legata al loro runtime: la virtual machine BEAM. Un corso di due giorni per esplorare la BEAM, le sue carateristiche, come sfruttarla al meglio e cosa evitare. Il corso é rivolto a tutte quelle persone che hanno messo gli occhi su Erlang/Elixir e vogliono fare un passo avanti per poter realizzare software production ready.
-
What: Il corso durerá due giorni e sará strutturato come segue
- Primo giorno
- Overview sulla BEAM
- Cosa è un nodo Erlang/Elixir
- Processi
- Primo giorno
-
Cosa sono
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define (range-rec from to) | |
(if (> from to) | |
() | |
(cons from | |
(range-rec (+ 1 from) | |
to)))) | |
(define (range from to) | |
(define (range-iter from to result) | |
(if (> from to) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyTupleIntTest | |
{ | |
[Fact] | |
public void should_retain_values() | |
{ | |
var tuple = MyTuple.Build(44, 100); | |
tuple.First().Should().Be(44); | |
tuple.Second().Should().Be(100); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using FluentAssertions; | |
using Xunit; | |
namespace SamuraiTDD.WithSum | |
{ | |
public class MyTupleIntTest | |
{ | |
[Fact] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define (mezzo-index ns) | |
(define sum | |
(lambda (l) | |
(if (null? l) | |
0 | |
(+ (car l) (sum (cdr l)))))) | |
(define (iter sn dx) | |
(cond ((null? dx) (length sn)) | |
((>= (sum sn) (sum dx)) (length sn)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gulp.task('test', "Run all the tests", ["build", "tools:download:xunit-runner"], function() { | |
console.log(config.tools.xunit.path) | |
var options = { | |
executable: config.tools.xunit.path, | |
options: { | |
nologo: true, | |
xml: config.testResult | |
} | |
} | |
var assemblies = [`../**/bin/${config.buildConfiguration}/*.Test.dll`] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def flatten(ls: List[_]): List[Int] = ls match { | |
case Nil => Nil | |
case (a: Int) :: tail => a :: flatten(tail) | |
case (a: List[_]) :: tail => flatten(a) ::: flatten(tail) | |
case _ :: tail => flatten(tail) | |
} | |
// oppure adforittura |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.FileOutputStream; | |
import java.io.PrintStream; | |
class Bar { | |
public static void Main() throws Exception { | |
StringChecker.CheckFirstCharacter("Foobar"); | |
} | |
static class StringChecker { | |
public static void CheckFirstCharacter(String name) throws Exception {{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Exercise2 { | |
public static void main(String[] args) { | |
int nums[] = new int[]{1, 2, 42, 4, 5, 6}; | |
boolean value = SecretOfLife.lookFor(nums); | |
System.out.println(value); | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace MyMax2 | |
{ | |
public class Maximizer | |
{ | |
public int Max(int a, int b) | |
{ |