Skip to content

Instantly share code, notes, and snippets.

@levinotik
levinotik / trace.log
Created November 1, 2022 04:07
pyenv install trace log
+(/Users/levinotik/.pyenv/bin/pyenv:23): enable -f /Users/levinotik/.pyenv/bin/../libexec/pyenv-realpath.dylib realpath
+(/Users/levinotik/.pyenv/bin/pyenv:58): '[' -z /Users/levinotik/.pyenv ']'
+(/Users/levinotik/.pyenv/bin/pyenv:61): PYENV_ROOT=/Users/levinotik/.pyenv
+(/Users/levinotik/.pyenv/bin/pyenv:63): export PYENV_ROOT
+(/Users/levinotik/.pyenv/bin/pyenv:65): '[' -z '' ']'
+(/Users/levinotik/.pyenv/bin/pyenv:66): PYENV_DIR=/Users/levinotik/dev/carson/api-load-testing
+(/Users/levinotik/.pyenv/bin/pyenv:69): '[' '!' -d /Users/levinotik/dev/carson/api-load-testing ']'
+(/Users/levinotik/.pyenv/bin/pyenv:69): '[' '!' -e /Users/levinotik/dev/carson/api-load-testing ']'
++(/Users/levinotik/.pyenv/bin/pyenv:73): cd /Users/levinotik/dev/carson/api-load-testing
++(/Users/levinotik/.pyenv/bin/pyenv:73): echo /Users/levinotik/dev/carson/api-load-testing
class Counter(val count: Int = 0) {
def inc = new Counter(count + 1)
def dec = new Counter(count - 1)
}
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
sudo apt-get install python3-setuptools
sudo easy_install3 pip # will be a Python3 pip
sudo pip install virtualenv # will be py3

An expression is said to be referentially transparent if it can be replaced with its value without changing the behavior of a program (in other words, yielding a program that has the same effects and output on the same input)

https://en.wikipedia.org/wiki/Referential_transparency

This example is taken from the book "Functional Programming in Scala"

The following is referentially transparent:

scala> val x = "hello, world"
@levinotik
levinotik / playground.rs
Created April 10, 2016 21:05 — forked from anonymous/playground.rs
Shared via Rust Playground
fn main() {
// No good because we move v to v2
// which creates a copy of the pointer
// which means we have two pointers
// to the content of the vector on the heap
// this violates safety guarantees
// by introducing a data race
// therefore Rust forbids using v after the move
@levinotik
levinotik / Folds.hs
Created January 19, 2016 02:31
Explicit recursion vs Folding
module Folding where
import Prelude hiding (length, sum, maximum, elem, null, product, reverse, all, any, (++), map, init, filter)
sum :: Num a => [a] -> a
sum [] = 0
sum (x:xs) = x + sum xs
sum' :: Num a => [a] -> a
sum' = foldl (+) 0
module TransformersPart1 where
import Control.Monad.Trans.Maybe
import Data.Functor
import Text.Read (readMaybe)
-- plain old Maybe example (avoiding division by zero)
ex1 :: Int -> Int -> Maybe Int
ex1 x y | y > 0 = Just (x `div` y)
| otherwise = Nothing

Hey there,

As a relatively new Haskell user, I've been pretty disappointed with the state of haskell.org. I know I'm preaching to the choir here, but with large portions of the site currently inaccessible and others taking an unreasonable amount of time to load (at least up until recently), haskell.org is far from usable. Members of #haskell-infrastructure were kind enough to answer some of my questions yesterday when I was trying to get the lay of the land and understand how things work and what the current process it. I know that there's currently a loose confederation of volunteers working on haskell.org as with any open-source project and I wanted to see how I might be able to help.

I have experience with devops -- not a ton, but enough. It may very well be that there's nothing I can help with and that everyone is already familiar with the issues and working on them. However, if part of the issue is lack of time then I'm here to offer some. I seem to be hearing people in #haskell-infrastructure say tha