Skip to content

Commit

Permalink
Almost finished with the slides.
Browse files Browse the repository at this point in the history
  • Loading branch information
debiatan committed Dec 18, 2014
1 parent f4dd64b commit 7420839
Show file tree
Hide file tree
Showing 4 changed files with 169 additions and 51 deletions.
13 changes: 13 additions & 0 deletions all_defs.exh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
add: ((number number) number (define add (lambda (a b) (if a (add (pred a) (succ b)) b))))
mul: ((number number) number (define mul (lambda (a b) (if a (add (mul (pred a) b) b) 0))))
logical_not: ((number) number (define logical_not (lambda (a) (if a 0 (succ a)))))
logical_or: ((number number) number (define logical_or (lambda (a b) (if a a b))))
logical_and: ((number number) number (define logical_and (lambda (a b) (if a b 0))))
logical_nand: ((number number) number (define logical_nand (lambda (a b) (logical_not (logical_and b a)))))
logical_xor: ((number number) number (define logical_xor (lambda (a b) (if a (logical_not b) b))))
logical_parity: ((list) number (define logical_parity (lambda (l) (if l (logical_xor (logical_parity (cdr l)) (car l)) 0))))
index: ((list number) S-expression (define index (lambda (l a) (if a (index (cdr l) (pred a)) (car l)))))
length: ((list) number (define length (lambda (l) (if l (succ (length (cdr l))) 0))))
sum: ((list) number (define sum (lambda (l) (if l (add (sum (cdr l)) (car l)) 0))))
power: ((number number) number (define power (lambda (a b) (if b (mul (power a (pred b)) a) 1))))
factorial: ((number) number (define factorial (lambda (n) (if n (mul (factorial (pred n)) n) 1))))
12 changes: 0 additions & 12 deletions defs.exh
Original file line number Diff line number Diff line change
@@ -1,13 +1 @@
add: ((number number) number (define add (lambda (a b) (if a (add (pred a) (succ b)) b))))
mul: ((number number) number (define mul (lambda (a b) (if a (add (mul (pred a) b) b) 0))))
logical_not: ((number) number (define logical_not (lambda (a) (if a 0 (succ a)))))
logical_or: ((number number) number (define logical_or (lambda (a b) (if a a b))))
logical_and: ((number number) number (define logical_and (lambda (a b) (if a b 0))))
logical_nand: ((number number) number (define logical_nand (lambda (a b) (logical_not (logical_and b a)))))
logical_xor: ((number number) number (define logical_xor (lambda (a b) (if a (logical_not b) b))))
logical_parity: ((list) number (define logical_parity (lambda (l) (if l (logical_xor (logical_parity (cdr l)) (car l)) 0))))
index: ((list number) S-expression (define index (lambda (l a) (if a (index (cdr l) (pred a)) (car l)))))
length: ((list) number (define length (lambda (l) (if l (succ (length (cdr l))) 0))))
sum: ((list) number (define sum (lambda (l) (if l (add (sum (cdr l)) (car l)) 0))))
power: ((number number) number (define power (lambda (a b) (if b (mul (power a (pred b)) a) 1))))
factorial: ((number) number (define factorial (lambda (n) (if n (mul (factorial (pred n)) n) 1))))
179 changes: 140 additions & 39 deletions doc/2014-12-18_python-meetup/main.tex
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,38 @@
\end{pythoncode*}
}
\defverbatim[colored]\codeLengthExampleA{
\begin{pythoncode*}{fontsize=\scriptsize}
@UTBP
def length(l):
"""
length(()) == 0
"""
\end{pythoncode*}
}
\defverbatim[colored]\codeLengthExampleB{
\begin{pythoncode*}{fontsize=\scriptsize}
@UTBP
def length(l):
"""
length(()) == 0
length((2,)) == 1
"""
\end{pythoncode*}
}
\defverbatim[colored]\codeLengthExampleC{
\begin{pythoncode*}{fontsize=\scriptsize}
@UTBP
def length(l):
"""
length(()) == 0
length((2,)) == 1
length((2, 3)) == 2
"""
\end{pythoncode*}
}
Expand Down Expand Up @@ -211,7 +242,7 @@ \subsection{Pero\ldots ¿cómo?}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\scshape Discusión sesuda}
\section{\scshape Premisas}
\subsection{Toda función se puede escribir de forma recursiva}
\begin{frame}{Funciones: todas recursivas}
Expand Down Expand Up @@ -277,68 +308,138 @@ \subsection{Toda función recursiva puede representarse mediante un árbol}
) │ └── l
else: return 0 └── 0
\end{Verbatim}
\end{frame}
\subsection{Brain-body-niche}
\begin{frame}{Brain-body-niche}
\subsection{Los árboles se pueden enumerar en order creciente de complejidad \pause}
\begin{frame}[fragile]
\frametitle{Árboles: enumerables}
\begin{Verbatim}[commandchars=\\\{\},codes={\catcode`$=3\catcode`_=8}]
[\textbf{1}] [ \textbf{2} ] [ \textbf{3} ]
r r r r
└── l └── b ├── l0
└── l └── l1
\end{Verbatim}
\pause
\begin{Verbatim}[commandchars=\\\{\},codes={\catcode`$=3\catcode`_=8}]
[ \textbf{4} ]
r r r
└── b0 └── b0 ├── b0
└── b1 ├── l0 │ └── l0
└── l0 └── l1 └── l1
r r
├── b0 ├── l0
└── b1 ├── l1
└── l0 └── l2
\end{Verbatim}
\begin{itemize}
\item \emph{No need to dissociate brain from body or body from environment}
\item \emph{Who needs internal representations when you're part of the system you're trying to represent?}
\item \emph{No computation}
\end{itemize}
\end{frame}
\subsection{Multifractal fractality}
\begin{frame}{Multifractal fractality}
\begin{itemize}
\item \emph{Power-laws imply complexity. Exponents, exponents!}
\item \emph{Forget about computation. Let's talk about energy flow.}
\item \emph{No computation}
\end{itemize}
\end{frame}
\section{\scshape Criticism}
\subsection{Criticism}
\begin{frame}{Criticism}
Approach taken by three of the articles
\section{\scshape Ingredientes}
\subsection{Ingredientes}
\begin{frame}{Ingredientes}
\begin{itemize}
\item \emph{Detect 1/f noise in time series of human performance}
\item Árboles \pause \emph{(déjà vu)} \pause \textcolor{gray}{\scriptsize(de jabugo)} \pause
\item Tipos: \pause
\begin{itemize}
\item Competing models?
\item Frailty of the measure
\item Números naturales no negativos \pause
\item Listas, posiblemente anidadas
\end{itemize}
\item \emph{The presence of 1/f noise implies an interaction dominant system}
\item Operaciones
\begin{itemize}
\item Other systems can also generate 1/f noise
\item Generation of 1/f noise in complex systems depends on specific circumstances
\item Funciones aritméticas (e.g. \texttt{succ})
\item Manipulación de listas (e.g. \texttt{cdr})
\item Formas especiales (\texttt{if})
\end{itemize}
\item \emph{Cognition is interaction-dominant and traditional approaches should be abandoned}
\item Constantes
\begin{itemize}
\item The complex systems approach should explain something that traditional approaches cannot explain.
\item Model instead of ``solving'' by dropping terms like self-organized criticality
\item \texttt{0}
\item \texttt{()}
\end{itemize}
\end{itemize}
\end{frame}
\subsection{Piles of rice and salt}
\begin{frame}{Piles of rice and salt}
\section{\scshape Ejemplo de uso}
\subsection{Ejemplo}
\begin{frame}[fragile]
\frametitle{Ejemplo de uso -- Longitud de una lista}
\begin{columns}
\begin{column}{.50\linewidth}
\begin{block}
\codeLengthExampleA
\end{block}
\end{column}\pause
\begin{column}{.50\linewidth}
\begin{verbatim}
define
├── length
└── lambda
├── l
└── 0
\end{verbatim}
\end{column}
\end{columns}\pause
\begin{columns}
\begin{column}{.50\linewidth}
\begin{block}
\codeLengthExampleB
\end{block}
\end{column}\pause
\begin{column}{.50\linewidth}
\begin{verbatim}
define
├── length
└── lambda
├── l
└── if
├── l
├── list?
│ └── l
└── 0
\end{verbatim}
\end{column}
\end{columns}
\end{frame}
\subsection{Does this apply to us?}
\begin{frame}{Does this apply to us?}
I don't think much of the discussion applies to us (the original Frontiers article should not have confronted Wagenmakers and Friston and we \emph{do} talk about components as well as their interactions), however\ldots
\begin{itemize}
\item Do we make our best effort to disprove criticality? Competing hypotheses.
\item Do we try to model something other than 1/f?
\end{itemize}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Ejemplo}
\begin{frame}[fragile]
\frametitle{Ejemplo de uso -- Longitud de una lista}
\begin{columns}
\begin{column}{.50\linewidth}
\begin{block}
\codeLengthExampleC
\end{block}
\end{column}\pause
\begin{column}{.50\linewidth}
\begin{verbatim}
define
├── length
└── lambda
├── l
└── if
├── l
├── succ
│ └── length
│ └── cdr
│ └── l
└── 0
\end{verbatim}
\end{column}
\end{columns}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\scshape Doubts}
\subsection{Doubts}
\begin{frame}{Doubts}
Expand Down
16 changes: 16 additions & 0 deletions ex_presentacion.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from utbp import UTBP

@UTBP
def length(l):
"""
length(()) == 0
"""

if __name__ == '__main__':
l = (4, 4, 4)
n = length(l)
print 'La longitud de la lista l es', n, 'porque el código de length es:'
print length

0 comments on commit 7420839

Please sign in to comment.