- PersonResource Driver-Side Adapter
- PostgresPersonRepository Driven-Side Adapter
At the beginning of 2030, I found this essay in my archives. From what I know today, I think it was very insightful at the moment of writing. And I feel it should be published because it can teach us, Rust developers, how to prevent that sad story from happening again.
What killed Haskell, could kill Rust, too
What killed Haskell, could kill Rust, too. Why would I even mention Haskell in this context? Well, Haskell and Rust are deeply related. Not because Rust is Haskell without HKTs. (Some of you know what that means, and the rest of you will wonder for a very long time). Much of the style of Rust is similar in many ways to the style of Haskell. In some sense Rust is a reincarnation of Haskell, with a little bit of C-ish like syntax, a very small amount.
Is Haskell dead?
#!/usr/bin/env python3 | |
# | |
# Copyright (C) 2016 - Francesco Frassinelli | |
# | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, |
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
- By Edmond Lau
- Highly Recommended 👍
- http://www.theeffectiveengineer.com/
public class binarytrees { | |
public static void main(String[] args) throws Exception { | |
int n = args.length > 0 ? Integer.parseInt(args[0]) : 0; | |
int minDepth = 4; | |
int maxDepth = Math.max(minDepth + 2, n); | |
int stretchDepth = maxDepth + 1; | |
int check = (TreeNode.create(0, stretchDepth)).check(); | |
System.out.println("stretch tree of depth " + (maxDepth + 1) + "\t check: " + check); |
Conversation about lifetimes on #rust, on mozilla's irc network, | |
prompted by hamnox and lahwran attempting to understand lifetimes. | |
Timestamps are in Mountain time. | |
1-30 07:09.06pm <lahwran> so we're reading this http://doc.rust-lang.org/book/ownership.html | |
1-30 07:09.28pm <lahwran> it mentions lifetimes a lot, and gives examples of where to use lifetimes, and the effects of lifetimes, but it has yet to actually, you know, describe what a lifetime is | |
1-30 07:09.48pm <theme> lahwran, I actually treat lifetimes as dependency markers | |
1-30 07:10.05pm <lahwran> we (my partner and I) have made several guesses as we read as to what lifetimes are, based on inference, but then we got to the point where a function used a lifetime both for an input and an output | |
1-30 07:10.06pm <Havvy> They're descriptions to how long a value lives. |
import numpy as np | |
import pylab as pl | |
from numpy import fft | |
def fourierExtrapolation(x, n_predict): | |
n = x.size | |
n_harm = 10 # number of harmonics in model | |
t = np.arange(0, n) | |
p = np.polyfit(t, x, 1) # find linear trend in x | |
x_notrend = x - p[0] * t # detrended x |
When using ArchLinux, I typically prefer to use an AUR helper like pacaur or yaourt to automate away the process of installing a community package.
Ansible's pacman module is
great, but it doesn't support AUR packages or pacman's -U
flag.
Installing AUR packages with Ansible seemed to be left as an exercise to
the user, and since AUR helpers do not come with a fresh Arch install, I
- https://code.google.com/p/go-wiki/wiki/Projects
- play.golang.org
- godoc.org
- go-search.org
- gopkg.in - http://godoc.org/gopkg.in/v1/docs
- golangprojects.com