- URL:: https://changelog.com/posts/petal-the-end-to-end-web-stack
- Related
- [[Thinking Elixir Podcast]] episode: https://podcasts.nu/avsnitt/thinking-elixir-podcast/tailwind-css-alpinejs-and-liveview-with-patrick-thompson-4_Z2xj-ngo
- [[Chris McCord]] article: https://dockyard.com/blog/2020/12/21/optimizing-user-experience-with-liveview
- All the links in this article are useful.
- My takeaways
- With [[elixir]] and [[phoenix]] the floor is low and the ceiling is basically non-existent.
- I consider [[JavaScript]] to be highly overused as a web technology. Building what amounts to two entirely separate applications that must somehow coordinate state has always seemed insane to me. This is what an [[SPA]] approach is. It's been highly optimized and improved by tools like [[React]], but it still seems like overkill to me.
- [[annotations]]
- > Whatsapp has built with Erlang to great success running an enormous system on a very small crew. With Elixir, we see companies like Discord th
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
aback | |
abase | |
abate | |
abbey | |
abbot | |
abhor | |
abide | |
abled | |
abode | |
abort |
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
aahed | |
aalii | |
aapas | |
aargh | |
aarti | |
abaca | |
abaci | |
aback | |
abacs | |
abaft |
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
" these settings work well for a simple outliner, indented with tabs | |
" nvim -S outliner.vim | |
set ai | |
set backspace=2 | |
set foldmethod=indent | |
set noexpandtab | |
set nosmarttab | |
set softtabstop=0 | |
set breakindent | |
set list |
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
# - [x] Display dialog at end | |
# - [x] Display dialog return value | |
# - [x] Capture output from dialog | |
# - [x] Actually snooze the timer | |
# - [ ] Smart update the UI | |
channel = Channel(String).new | |
now = Time.local | |
ends_at = now + 5.seconds |
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
def fib(n) | |
return n if n <= 1 | |
fib(n-1) + fib(n-2) | |
end | |
###################################################### | |
# Concurrent version: | |
# $: crystal build --release fibonacci.cr | |
# $: time ./fibonacci | |
# 701408732 |
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
defmodule CountdownSong do | |
def song(%{upper: upper, lower: lower}, verse_template) do | |
verses(upper, lower, verse_template) | |
end | |
def verses(upper, lower, verse_template) do | |
upper..lower | |
|> Enum.map(fn n -> verse(n, verse_template) end) | |
|> Enum.join("\n") | |
end |
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 Integer | |
def to_roman | |
RomanNumeral.for(self) | |
end | |
end | |
class RomanNumeral | |
ARABIC_ROMAN = { | |
1000 => 'M', | |
500 => 'D', |
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
# - Reusable, immutable objects | |
# - Inject dependencies in constructor | |
class UserQuery | |
attr_reader :query | |
def initialize(query) | |
@query = query | |
end |
I hereby claim:
- I am tjstankus on github.
- I am tjstankus (https://keybase.io/tjstankus) on keybase.
- I have a public key whose fingerprint is DEFC 99A1 E5B8 378C E73E E143 CC21 2ABD 83B5 AE2B
To claim this, I am signing this object:
NewerOlder