Skip to content

Commit

Permalink
Add dates
Browse files Browse the repository at this point in the history
  • Loading branch information
leontrolski committed Feb 14, 2024
1 parent 1aa71f7 commit 6387609
Show file tree
Hide file tree
Showing 39 changed files with 146 additions and 79 deletions.
1 change: 1 addition & 0 deletions 33-line-react-thoughts.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
</head>
<body class="language-javascript">
<a href="index.html"><img style="height:2em" src="pic.png"/></a>
<p><i>2020-04-06</i></p>
<h1>33 line React - thoughts</h1>
<p>
<em><a href="33-line-react.html">Original post</a>, <a href="https://news.ycombinator.com/item?id=22776753">original discussion</a>.</em>
Expand Down
1 change: 1 addition & 0 deletions 33-line-react.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
</head>
<body class="language-javascript">
<a href="index.html"><img style="height:2em" src="pic.png"/></a>
<p><i>2020-04-03</i></p>
<h1>33 line React</h1>
<p>
<em><a href="33-line-react-thoughts.html">Thoughts</a> on reading through the hacker news <a href="https://news.ycombinator.com/item?id=22776753">response</a>. <a href="96-line-react-jsx.html">96 line</a> version with JSX compiler.</em>
Expand Down
1 change: 1 addition & 0 deletions 96-line-react-jsx.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
</head>
<body class="language-javascript">
<a href="index.html"><img style="height:2em" src="pic.png"/></a>
<p><i>2021-08-23</i></p>
<h1>96 line React with JSX</h1>
<p>
A while ago, I wrote a short post showing a minimal <a href="33-line-react.html">33 line React</a>. A lot of the comments focused on the <a href="https://mithril.js.org/">Mithril</a>-like syntax for the virtual DOM. So that we can ignore that aspect, here is a <a href="https://github.com/leontrolski/leontrolski.github.io/blob/master/96-line-react-jsx.js">96 line React with a JSX compiler</a>.
Expand Down
7 changes: 4 additions & 3 deletions alter.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
leontrolski - containing mutable data
</title>
<style>

body {margin: 5% auto; background: #fff7f7; color: #444444; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.8; max-width: 63%;}
@media screen and (max-width: 800px) {body {font-size: 14px; line-height: 1.4; max-width: 90%;}}
pre {width: 100%; border-top: 3px solid gray; border-bottom: 3px solid gray;}
Expand All @@ -14,7 +14,7 @@
.inline {background: #b3b2b226; padding-left: 0.3em; padding-right: 0.3em; white-space: nowrap;}
blockquote {font-style: italic;color:black;background-color:#f2f2f2;padding:2em;}
details {border-bottom:solid 5px gray;}

</style>
<link href="https://unpkg.com/[email protected]/themes/prism-vs.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.20.0/components/prism-core.min.js">
Expand All @@ -30,6 +30,7 @@
<img src="pic.png" style="height:2em">
</a>
<p><i>2021-02-21</i></p>
<h1>
Can we contain mutable data in imperative languages?
</h1>
Expand Down Expand Up @@ -124,7 +125,7 @@ <h2>
<p>
Then <code class="inline">array2[0]</code>
<em>
is
is
</em>
<code class="inline">foo</code>
, we didn&#39;t have to duplicate anything in memory. Under the hood, <code class="inline">array2</code>
Expand Down
7 changes: 4 additions & 3 deletions cmd-click-manifesto.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
<img src="pic.png" style="height:2em">
</a>
<p><i>2023-02-23</i></p>
<h1>The CMD-click manifesto</h1>
<small><em>Or CTRL-click or META-click or whatever.</em></small>
<ol>
Expand All @@ -43,11 +44,11 @@ <h1>The CMD-click manifesto</h1>
<li>Static analysis tooling should be easy to write.</li>
<li>Stack traces should correspond with the structure of the code.</li>
<li>Higher order functions break the golden property, use them as a last resort.
<pre class="language-python"><code>def do_something(data, f: Callable[...]):
<pre class="language-python"><code>def do_something(data, f: Callable[...]):
f(data) # I can&#39;t CMD-click f</code></pre>
</li>
<li>Trad Object Orientated code tends to break the golden property (this makes sense as <a href="https://leontrolski.github.io/poor-mans-object.html#:~:text=objects%20are%20a%20poor%20man%27s%20closures%20are%20a%20poor%20man%27s%20objects">objects are closures</a>), use it as a last resort.
<pre class="language-python" style="margin-bottom: 0.2em !important;"><code>def do_something(a: Animal):
<pre class="language-python" style="margin-bottom: 0.2em !important;"><code>def do_something(a: Animal):
a.meow() # I can&#39;t CMD-click meow</code></pre>
<small><em>This case it is ambiguous as <code>meow()</code> could be on any <code>Cat</code>, <code>Lion</code>, <code>Tiger</code>...</em></small>
</li>
Expand Down Expand Up @@ -78,7 +79,7 @@ <h1>The CMD-click manifesto</h1>
@app.route(&quot;/payments/inbound/v1/add&quot;) # good</code></pre>
</li>
<li>Good code expresses the smallest possible state space the program could operate in - <strong>YAGNI</strong>.
<pre class="language-python"><code>def do_something(data, f: Callable[...]):
<pre class="language-python"><code>def do_something(data, f: Callable[...]):
# f could be anything - big state space
f(data)

Expand Down
1 change: 1 addition & 0 deletions consciousness.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
</head>
<body>
<a href="index.html"><img style="height:2em" src="pic.png"/></a>
<p><i>2020-06-03</i></p>
<p><em>If you prefer videos, I did <a href="https://www.youtube.com/watch?v=XD3-7d8n0lw">a talk</a> that is basically a rehash of this post.</em></p>
<h1>A developer's summary of Consciousness and the Social Brain</em></h1>
<p>
Expand Down
5 changes: 3 additions & 2 deletions constraint-sudoku.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
leontrolski - sudoku constraint solver
</title>
<style>

body {margin: 5% auto; background: #fff7f7; color: #444444; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.8; max-width: 63%;}
@media screen and (max-width: 800px) {body {font-size: 14px; line-height: 1.4; max-width: 90%;}}
pre {width: 100%; border-top: 3px solid gray; border-bottom: 3px solid gray;}
Expand All @@ -14,7 +14,7 @@
.inline {background: #b3b2b226; padding-left: 0.3em; padding-right: 0.3em; white-space: nowrap;}
blockquote {font-style: italic;color:black;background-color:#f2f2f2;padding:2em;}
details {border-bottom:solid 5px gray;}

</style>
<link href="https://unpkg.com/[email protected]/themes/prism-vs.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.20.0/components/prism-core.min.js">
Expand All @@ -30,6 +30,7 @@
<img src="pic.png" style="height:2em">
</a>
<p><i>2022-03-01</i></p>
<h1>
Solving sudoku with a constraint solver
</h1>
Expand Down
1 change: 1 addition & 0 deletions contrair-articles.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
</head>
<body>
<a href="index.html"><img style="height:2em" src="pic.png"/></a>
<p><i>2020-04-27</i></p>
<p>
<em>Below are a collection of interesting articles/posts that counter certain premises.</em>
</p>
Expand Down
11 changes: 6 additions & 5 deletions cycling-in-london.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
leontrolski - cycling in London
</title>
<style>

body {margin: 5% auto; background: #fff7f7; color: #444444; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.8; max-width: 63%;}
@media screen and (max-width: 800px) {body {font-size: 14px; line-height: 1.4; max-width: 90%;}}
pre {width: 100%; border-top: 3px solid gray; border-bottom: 3px solid gray;}
Expand All @@ -14,7 +14,7 @@
.inline {background: #b3b2b226; padding-left: 0.3em; padding-right: 0.3em; white-space: nowrap;}
blockquote {font-style: italic;color:black;background-color:#f2f2f2;padding:2em;}
details {border-bottom:solid 5px gray;}

</style>
<link href="https://unpkg.com/[email protected]/themes/prism-vs.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.20.0/components/prism-core.min.js">
Expand All @@ -30,16 +30,17 @@
<img src="pic.png" style="height:2em">
</a>
<p><i>2022-07-28</i></p>
<h1>
Cycling in London for beginners
</h1>
<style>

.img-cycling-container{padding:4rem;}
.img-cycling{width:40vw;box-shadow: 0px 0px 4px 2px #00000045;}
@media screen and (max-width: 800px){.img-cycling{width:85vw;}}
@media screen and (max-width: 800px){.img-cycling-container{padding:0;}}

</style>
<em>
A compilation of tips for people considering/just starting cycling in London. If you want to make a friend and get advice from a real person, try London Cycle Campaign&#39;s <a href="https://lcc.org.uk/groups/cycle-buddies/">
Expand Down Expand Up @@ -201,7 +202,7 @@ <h2 id="staying-safe">
<li>
Be super-duper careful around trucks - considering how few of them there are, a crazy high proportion of bad cycling accidents involve them. <ul>
<li>
Don&#39;t undertake them.
Don&#39;t undertake them.
</li>
<li>
Don&#39;t plonk yourself right in front of them at the lights.
Expand Down
9 changes: 5 additions & 4 deletions cycling.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
leontrolski - cycling in the south east
</title>
<style>

body {margin: 5% auto; background: #fff7f7; color: #444444; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.8; max-width: 63%;}
@media screen and (max-width: 800px) {body {font-size: 14px; line-height: 1.4; max-width: 90%;}}
pre {width: 100%; border-top: 3px solid gray; border-bottom: 3px solid gray;}
Expand All @@ -14,7 +14,7 @@
.inline {background: #b3b2b226; padding-left: 0.3em; padding-right: 0.3em; white-space: nowrap;}
blockquote {font-style: italic;color:black;background-color:#f2f2f2;padding:2em;}
details {border-bottom:solid 5px gray;}

</style>
<link href="https://unpkg.com/[email protected]/themes/prism-vs.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.20.0/components/prism-core.min.js">
Expand All @@ -30,14 +30,15 @@
<img src="pic.png" style="height:2em">
</a>
<p><i>2022-04-04</i></p>
<h1>
Cycling day-trips from Central London
</h1>
<style>

.img-cycling{width:40vw;}
@media screen and (max-width: 800px){.img-cycling{width:85vw;}}

</style>
<p>
I like to go on one-day cycling trips on the weekend, both road bike and mountain bike. My priorities are:
Expand Down
39 changes: 39 additions & 0 deletions dates.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
33-line-react-thoughts.html
33-line-react.html
96-line-react-jsx.html
alter.html
cmd-click-manifesto.html
consciousness.html
constraint-sudoku.html
contrair-articles.html
cycling-in-london.html
cycling.html
dom-syntax.html
fake-data-frame.html
foreign-key-indexes.html
git-bisect.html
git-rebase-diff.html
lambda-calculus.html
leet.html
manipleservices.html
mostly-pointless.html
mypyc-quick.html
nested-sql.html
poor-mans-object.html
popper-reality.html
postgres-advisory-locks.html
postgres-as-queue.html
pratt-example.html
pratt-ts.html
pratt.html
pytest-helpful.html
recursing-with-yield.html
relational-superset.html
sane-config.html
semi-isomorphic.html
sqlalchemy-relationships-2.html
sqlalchemy-relationships.html
strongly-typed-http.html
test-zen.html
upset.html
virtualenvs-for-node-devs.html
1 change: 1 addition & 0 deletions dom-syntax.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
</head>
<body class="language-javascript">
<a href="index.html"><img style="height:2em" src="pic.png"/></a>
<p><i>2020-05-11</i></p>
<h1>What if we'd had better <code>html</code>-in-<code>js</code> syntax all along?</h1>
<p>
I have a theory that a grave mistake was made in 1995 - the decision not to have a neat, succinct and declarative way of representing html elements in javascript. <em>[On reading the <a href="https://news.ycombinator.com/item?id=23142300">hacker news comments</a> this is pretty historically inaccurate, however, I think this article still stands as "look just how close javascript object notation is to a reasonable way of representing html".]</em>
Expand Down
1 change: 1 addition & 0 deletions fake-data-frame.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
</head>
<body class="language-python">
<a href="index.html"><img style="height:2em" src="pic.png"/></a>
<p><i>2019-11-13</i></p>
<h1>How do pandas DataFrames work? (kinda)</h1>
<p>
When you're used to plain ol' <code>dict</code>s, <code>int</code>s, <code>list</code>s etc, <code>pandas.DataFrame</code>s exhibit some weirdo behaviour, particulary concerning assignment and operators. This page is a short walk-through of how some of these things happen (and a quick intro to Python's magic methods), you can see the outcome <a href="https://github.com/leontrolski/fake-data-frame">here</a>.
Expand Down
5 changes: 3 additions & 2 deletions foreign-key-indexes.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
leontrolski - foreign key indexes
</title>
<style>

body {margin: 5% auto; background: #fff7f7; color: #444444; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.8; max-width: 63%;}
@media screen and (max-width: 800px) {body {font-size: 14px; line-height: 1.4; max-width: 90%;}}
pre {width: 100%; border-top: 3px solid gray; border-bottom: 3px solid gray;}
Expand All @@ -14,7 +14,7 @@
.inline {background: #b3b2b226; padding-left: 0.3em; padding-right: 0.3em; white-space: nowrap;}
blockquote {font-style: italic;color:black;background-color:#f2f2f2;padding:2em;}
details {border-bottom:solid 5px gray;}

</style>
<link href="https://unpkg.com/[email protected]/themes/prism-vs.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.20.0/components/prism-core.min.js">
Expand All @@ -30,6 +30,7 @@
<img src="pic.png" style="height:2em">
</a>
<p><i>2021-07-15</i></p>
<h1>
Don&#39;t get bitten by missing foreign key indexes
</h1>
Expand Down
5 changes: 3 additions & 2 deletions git-bisect.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
leontrolski - succinct git bisect
</title>
<style>

body {margin: 5% auto; background: #fff7f7; color: #444444; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.8; max-width: 63%;}
@media screen and (max-width: 800px) {body {font-size: 14px; line-height: 1.4; max-width: 90%;}}
pre {width: 100%; border-top: 3px solid gray; border-bottom: 3px solid gray;}
Expand All @@ -14,7 +14,7 @@
.inline {background: #b3b2b226; padding-left: 0.3em; padding-right: 0.3em; white-space: nowrap;}
blockquote {font-style: italic;color:black;background-color:#f2f2f2;padding:2em;}
details {border-bottom:solid 5px gray;}

</style>
<link href="https://unpkg.com/[email protected]/themes/prism-vs.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.20.0/components/prism-core.min.js">
Expand All @@ -30,6 +30,7 @@
<img src="pic.png" style="height:2em">
</a>
<p><i>2021-02-02</i></p>
<h1>
<code class="inline">git bisect</code>
succinctly
Expand Down
5 changes: 3 additions & 2 deletions git-rebase-diff.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
leontrolski - diffing after rebase
</title>
<style>

body {margin: 5% auto; background: #fff7f7; color: #444444; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.8; max-width: 63%;}
@media screen and (max-width: 800px) {body {font-size: 14px; line-height: 1.4; max-width: 90%;}}
pre {width: 100%; border-top: 3px solid gray; border-bottom: 3px solid gray;}
Expand All @@ -14,7 +14,7 @@
.inline {background: #b3b2b226; padding-left: 0.3em; padding-right: 0.3em; white-space: nowrap;}
blockquote {font-style: italic;color:black;background-color:#f2f2f2;padding:2em;}
details {border-bottom:solid 5px gray;}

</style>
<link href="https://unpkg.com/[email protected]/themes/prism-vs.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.20.0/components/prism-core.min.js">
Expand All @@ -30,6 +30,7 @@
<img src="pic.png" style="height:2em">
</a>
<p><i>2022-04-19</i></p>
<h1>
<code class="inline">git diff</code>
after a rebase
Expand Down
5 changes: 3 additions & 2 deletions lambda-calculus.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
leontrolski - Lambda calculus succinctly
</title>
<style>

body {margin: 5% auto; background: #fff7f7; color: #444444; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.8; max-width: 63%;}
@media screen and (max-width: 800px) {body {font-size: 14px; line-height: 1.4; max-width: 90%;}}
pre {width: 100%; border-top: 3px solid gray; border-bottom: 3px solid gray;}
Expand All @@ -14,7 +14,7 @@
.inline {background: #b3b2b226; padding-left: 0.3em; padding-right: 0.3em; white-space: nowrap;}
blockquote {font-style: italic;color:black;background-color:#f2f2f2;padding:2em;}
details {border-bottom:solid 5px gray;}

</style>
<link href="https://unpkg.com/[email protected]/themes/prism-vs.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.20.0/components/prism-core.min.js">
Expand All @@ -30,6 +30,7 @@
<img src="pic.png" style="height:2em">
</a>
<p><i>2022-03-09</i></p>
<h1>
Lambda calculus succinctly in modern JavaScript
</h1>
Expand Down
Loading

0 comments on commit 6387609

Please sign in to comment.