We’re pleased to announce that we’ve received cross-signatures from IdenTrust, which means that our certificates are now trusted by all major browsers. This is a significant milestone since it means that visitors to websites using Let’s Encrypt certificates can enjoy a secure browsing experience with no special configuration required.
defrecord Person, first_name: nil, last_name: "Dudington" do
def name record do # huh ?
"#{record.first_name} #{record.last_name}"
end
end
defrecord User, name: "José", age: 25
guy = Person.new first_name: "Guy"
guy.name
defmodule ListServer do
@moduledoc """
This module provides an easy to use ListServer, useful for keeping
lists of things.
"""
use GenServer.Behaviour
alias Foo.Bar
### Public API
@doc """
Starts and links a new ListServer, returning {:ok, pid}
## Example
iex> {:ok, pid} = ListServer.start_link
"""
def start_link do
:gen_server.start_link({:local, :list}, __MODULE__, [], [])
end
### GenServer API
def init(list) do
{:ok, list}
end
# Clear the list
def handle_cast :clear, list do
{:noreply, []}
end
end
{:ok, pid} = ListServer.start_link
pid <- {:foo, "bar"}
greeter = fn(x) -> IO.puts "hey #{x}" end
greeter.("Bob")
def generator(n : T)
channel = Channel(T).new
spawn do
loop do
sleep n
channel.send n
end
end
channel
end
ch1 = generator(1)
ch2 = generator(1.5)
ch3 = generator(5)
loop do
case ch = Channel.select(ch1, ch2, ch3)
when ch3
break
else
puts ch.receive
end
end