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
class Node: | |
def __init__(self, val): | |
self.__value = val | |
self.__next = None | |
def add(self, next_): | |
self.__next = next_ | |
def value(self): | |
return self.__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
class ListSet: | |
def __init__(self): | |
self._values = [] | |
self.__index = 0 | |
def add(self, value): | |
if value in self._values: | |
return | |
self._values.append(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
class ListSet: | |
def __init__(self): | |
self._values = [] | |
self.__index = 0 | |
def add(self, value): | |
if value in self._values: | |
return | |
self._values.append(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
class ListSet: | |
def __init__(self): | |
self._values = [] | |
self.__index = 0 | |
def add(self, value): | |
if value in self._values: | |
return | |
self._values.append(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
--- | |
credentials: | |
- name: /concourse/main/credhub-server | |
type: value | |
value: <REPLACE-ME> | |
- name: /concourse/main/credhub-client | |
type: value | |
value: credhub_admin | |
- name: /concourse/main/credhub-secret | |
type: password |
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
set number | |
set linebreak | |
set showbreak=+++ | |
set textwidth=100 | |
set showmatch | |
set visualbell | |
set hlsearch | |
set smartcase | |
set ignorecase |
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
The Design of Everyday Things - https://www.amazon.fr/Design-Everyday-Things-Revised-Expanded/dp/0465050654 | |
The Fifth Discipline -- https://www.amazon.fr/Fifth-Discipline-Practice-Learning-Organization/dp/0385517254 | |
Zen and the Art of Motorcycle Maintenance -- https://www.amazon.fr/Zen-Art-Motorcycle-Maintenance-Inquiry/dp/0060589469 | |
Rich Hickey -- Hammock Driven Development -- https://www.youtube.com/watch?v=f84n5oFoZBc |
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
Scalar Replacement of Aggregates | |
================================ | |
Scalar replacement of aggregates makes other optimizations applicable to components of aggregates, such as C structures and Pascal records. It is a simple and effective optimization. It checks which components of the aggregate are simple scalars, and if they are not aliased (neither the components nor the whole aggregate), they are assigned to temporaries of the appropriate type. These temporaries become available to many optimizations. | |
The following example demonstrates how scalar replacement of Aggregates help other optimizations: | |
typedef enum { APPLE, BANANA, ORANGE } VARIETY; | |
typedef enum { LONG, ROUND } SHAPE; | |
typedef struct fruit { | |
VARIETY variety; |
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
#!/usr/bin/env bash | |
echo 'this will CERTAINLY not work without further modifications' | |
echo 'Dont even think about it' | |
exit 1 | |
echo 'make the changes you want to make' | |
git checkout solution | |
git lola |
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
effective programs - rich hickey | |
"if 100 people use this, it will be outrageous" | |
a look back at motivations behind clojure | |
takes time to understand what and why and what you were thinking | |
hot take : there was NO grand plan for clojure - it involved the community | |
clojure is opinionated "wow, this is forcing me, at every turn, to do something a certain way" | |
only a few strongly supported idioms, with a lot of support for them... | |
design is all about making choices | |
in clojure there was a big choice about what to leave out |
NewerOlder