Compare commits

...

3 commits

Author SHA1 Message Date
liquidex b33cc14438 Hotland - Bad Opinion Zone is real 2024-11-12 23:38:36 +01:00
liquidex d13abe7afa restructuring page:index 2024-11-12 22:51:58 +01:00
liquidex e201ea7058 revamp the way page:treehouse/new works
- treehouse/new is now a regular page, not a special template
- most of the code related to the `new` badge in page:index has been removed
- you're meant to discern between pages you've read vs ones you haven't by looking at the colors of the links (blue vs purple)
2024-11-12 20:39:58 +01:00
16 changed files with 294 additions and 436 deletions

View file

@ -400,3 +400,6 @@
% id = "01HRD97CSJSQN78SGM691B6PNQ" % id = "01HRD97CSJSQN78SGM691B6PNQ"
- NOTE: not slanted anymore. `slnt` is 0. - NOTE: not slanted anymore. `slnt` is 0.
% id = "01JCGYHVMWWKKZ1532WC32DXNW"
- _NOTE: this page is quite old, so I moved it from the main page to the programming blog to reduce clutter. I deemed it wasn't important enough to have it on display so profoundly._

View file

@ -1,7 +1,7 @@
%% title = "who that! (about me)" %% title = "who that! (about me)"
% id = "01J09B2BZXJ989S2SGWBNZ397C" % id = "01J09B2BZXJ989S2SGWBNZ397C"
+ hello! I am *liquidex*. + I am *liquidex*.
% id = "01J09B2BZX54T2GSP8H3D62S6J" % id = "01J09B2BZX54T2GSP8H3D62S6J"
+ also known as *liquidex* + also known as *liquidex*
@ -113,16 +113,10 @@
% id = "01J09B2BZX39FGP634BM5HJ0FD" % id = "01J09B2BZX39FGP634BM5HJ0FD"
+ did I mention [music][page:music]? + did I mention [music][page:music]?
I also {-aspire to-} [make ][def:social/soundcloud][music][page:music][ sometimes][def:social/soundcloud]. I also [make ][def:social/soundcloud][music][page:music][ sometimes][def:social/soundcloud].
% id = "01J09B2BZXGG5HYVYDNPVFRKY1"
- I say aspire because I'd really like to be better at it, but _time_, man…
% id = "01J09B2BZXY6AN3242DYECK74Z" % id = "01J09B2BZXY6AN3242DYECK74Z"
+ from time to time I also try to draw things, but _time_, it's killing me, man… + from time to time I also try to draw things, but _time_, it's killing me, man...
% id = "01J09B2BZXN3263NEHCKQ931TS"
- I'm sure one day you'll see the results of my practice, (unless you've already seen them :ralsei_wave:,) but for now I keep them largely to myself.
% id = "hello" % id = "hello"
+ if all that sounds like an interesting bunch of words, feel free to come up to me and say hi! + if all that sounds like an interesting bunch of words, feel free to come up to me and say hi!

View file

@ -4,29 +4,20 @@
% id = "01H8V556P1PND8DQ73XBTZZJH7" % id = "01H8V556P1PND8DQ73XBTZZJH7"
- welcome! make yourself at home. [= --w-- =]{style="white-space: nowrap;"} - welcome! make yourself at home. [= --w-- =]{style="white-space: nowrap;"}
% id = "01H8VWEHX501SNYQTE61WX7YJC"
- :folder: [_"owo, what's this?"_][page:kuroneko]{.secret}
% id = "about"
content.link = "about"
+ ## about me
% id = "about-treehouse"
content.link = "about-treehouse"
+ ## about this
% id = "01H8V556P1GRAA3717VH3QJFMV"
classes.branch_children = "index:hobby-corners"
- :folder: hobby corners
``` =html ``` =html
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" style="display: none;"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" style="display: none;">
<defs> <defs>
<g id="index:icon:me">
<path d="M2 17C2.5 16 3 15 4.5 14.4963C4.5 12.5 4.5 8 5.5 5C8 7 10 10 10.5 13C11.5 13 12.5 13 13.5 13C14 10 16 7 18.5 5C19.5 8 19.4996 11.9442 19.4996 14.4405C21 15 21.5 16 22 17" stroke="currentColor" fill="none" stroke-width="2"/>
<path d="M2.84615 10.0635C1.46154 10.0635 1 10.5714 1 10.5714C1 10.5714 1.92308 12.0952 3.30769 12.0952C1.92308 12.6032 1.5 13.5 1.5 13.5C3.34615 14.0079 5.61538 14.127 7 13.619C6.53846 9.55556 3.76923 7.01587 1 6C1 7.52381 1.80769 9.04762 2.84615 10.0635Z" fill="currentColor"/>
<path d="M21.1538 10.0635C22.5385 10.0635 23 10.5714 23 10.5714C23 10.5714 22.0769 12.0952 20.6923 12.0952C22.0769 12.6032 22.5385 13.619 22.5385 13.619C20.6923 14.127 18.3846 14.127 17 13.619C17.4615 9.55556 20.2308 7.01587 23 6C23 7.52381 22.1923 9.04762 21.1538 10.0635Z" fill="currentColor"/>
<path d="M10 18C10 19.1046 9.55228 20 9 20C8.44772 20 8 19.1046 8 18C8 16.8954 8.44772 16 9 16C9.55228 16 10 16.8954 10 18Z" fill="currentColor"/>
<ellipse cx="15" cy="18" rx="1" ry="2" fill="currentColor"/>
</g>
<g id="index:icon:programming"> <g id="index:icon:programming">
<path fill-rule="evenodd" clip-rule="evenodd" <path d="M10 5H9C7.89543 5 7 5.89543 7 7V10L5 12L7 14V17C7 18.1046 7.89543 19 9 19H10" stroke="currentColor" fill="none" stroke-width="2"/>
d="M8.58579 11L5.29289 7.70711L6.70711 6.29289L11.4142 11L6.70711 15.7071L5.29289 14.2929L8.58579 11Z" <path d="M14 5H15C16.1046 5 17 5.89543 17 7V10L19 12L17 14V17C17 18.1046 16.1046 19 15 19H14" stroke="currentColor" fill="none" stroke-width="2"/>
fill="currentColor" />
<path fill-rule="evenodd" clip-rule="evenodd" d="M18 18H12V16H18V18Z" fill="currentColor" />
</g> </g>
<g id="index:icon:design"> <g id="index:icon:design">
@ -41,9 +32,7 @@
</g> </g>
<g id="index:icon:music"> <g id="index:icon:music">
<path fill-rule="evenodd" clip-rule="evenodd" <path fill-rule="evenodd" clip-rule="evenodd" d="M8 7L17 4L17 5V16C17 17.1046 15.8807 18 14.5 18C13.1193 18 12 17.1046 12 16C12 14.8954 13.1193 14 14.5 14C14.6712 14 14.8384 14.0138 15 14.04V8.16667L10 9.83333V18C10 19.1046 8.88071 20 7.5 20C6.11929 20 5 19.1046 5 18C5 16.8954 6.11929 16 7.5 16C7.67123 16 7.83844 16.0138 8 16.04L8 10.5V7Z" fill="currentColor"/>
d="M9 7L18 5V5.5V8.20002V15.5C18 16.6046 16.8807 17.5 15.5 17.5C14.1193 17.5 13 16.6046 13 15.5C13 14.3954 14.1193 13.5 15.5 13.5C15.6712 13.5 15.8384 13.5138 16 13.54V8.64446L11 9.75558V17.5C11 18.6046 9.88071 19.5 8.5 19.5C7.11929 19.5 6 18.6046 6 17.5C6 16.3954 7.11929 15.5 8.5 15.5C8.67123 15.5 8.83844 15.5138 9 15.54V10.2V7.5V7Z"
fill="currentColor" />
</g> </g>
<g id="index:icon:games"> <g id="index:icon:games">
@ -57,33 +46,43 @@
<path fill-rule="evenodd" clip-rule="evenodd" d="M9 8.5H7V10H5.5V12H7V13.5H9V12H10.5V10H9V8.5Z" <path fill-rule="evenodd" clip-rule="evenodd" d="M9 8.5H7V10H5.5V12H7V13.5H9V12H10.5V10H9V8.5Z"
fill="currentColor" /> fill="currentColor" />
</g> </g>
<g id="index:icon:shower">
<path d="M12 3V7" stroke="currentColor" stroke-width="2"/>
<path d="M5 12H19" stroke="currentColor" stroke-width="2"/>
<circle cx="8" cy="16" r="1" fill="currentColor"/>
<circle cx="6" cy="19" r="1" fill="currentColor"/>
<circle cx="12" cy="16" r="1" fill="currentColor"/>
<circle cx="10" cy="19" r="1" fill="currentColor"/>
<circle cx="16" cy="16" r="1" fill="currentColor"/>
<circle cx="14" cy="19" r="1" fill="currentColor"/>
<circle cx="18" cy="19" r="1" fill="currentColor"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M17 10C17 7.23858 14.7614 5 12 5C9.23858 5 7 7.23858 7 10H17Z" fill="currentColor"/>
</g>
</defs> </defs>
</svg> </svg>
``` ```
% id = "programming" % id = "about"
content.link = "programming" content.link = "about"
+ ## `<svg class="hobby-icon" width="24" height="24" viewBox="0 0 24 24"><use xlink:href="#index:icon:programming"></use></svg>`{=html}programming + ## `<svg class="hobby-icon" width="24" height="24" viewBox="0 0 24 24"><use xlink:href="#index:icon:me"></use></svg>`{=html}me
% id = "design" % id = "programming"
content.link = "design" content.link = "programming"
+ ## `<svg class="hobby-icon" width="24" height="24" viewBox="0 0 24 24"><use xlink:href="#index:icon:design"></use></svg>`{=html}design + ## `<svg class="hobby-icon" width="24" height="24" viewBox="0 0 24 24"><use xlink:href="#index:icon:programming"></use></svg>`{=html}programming
% id = "music" % id = "design"
content.link = "music" content.link = "design"
+ ## `<svg class="hobby-icon" width="24" height="24" viewBox="0 0 24 24"><use xlink:href="#index:icon:music"></use></svg>`{=html}music + ## `<svg class="hobby-icon" width="24" height="24" viewBox="0 0 24 24"><use xlink:href="#index:icon:design"></use></svg>`{=html}design
% id = "games" % id = "music"
content.link = "games" content.link = "music"
+ ## `<svg class="hobby-icon" width="24" height="24" viewBox="0 0 24 24"><use xlink:href="#index:icon:games"></use></svg>`{=html}games + ## `<svg class="hobby-icon" width="24" height="24" viewBox="0 0 24 24"><use xlink:href="#index:icon:music"></use></svg>`{=html}music
% id = "01HFYZKREWE2AM61ZRW3R501H6" % id = "games"
- :folder: /var content.link = "games"
+ ## `<svg class="hobby-icon" width="24" height="24" viewBox="0 0 24 24"><use xlink:href="#index:icon:games"></use></svg>`{=html}games
% id = "short-thoughts" % id = "philosophy"
content.link = "short-thoughts" content.link = "philosophy"
+ ## [sh](https://www.youtube.com/watch?v=rFL2VOdb944){.secret}ort thoughts + ## `<svg class="hobby-icon" width="24" height="24" viewBox="0 0 24 24"><use xlink:href="#index:icon:shower"></use></svg>`{=html}shower
% id = "philosophy"
content.link = "philosophy"
+ ## philosophy and worldview

View file

@ -6,19 +6,9 @@
% id = "01HFYZKREV1GSWT2Q07XFRTTBH" % id = "01HFYZKREV1GSWT2Q07XFRTTBH"
+ but if you've been wondering what makes my brain tick, you've come to the right place + but if you've been wondering what makes my brain tick, you've come to the right place
% id = "01HFYZKREVXY44MS45P5J0BRBE" % id = "01JCGZ4E7F5XPJHGWCY0N6A03Q"
- perhaps my thoughts here will be more than _just_ pure philosophy and worldview, who knows! - hey don't make this weird, okay.
showers are good for having thoughts.
% id = "01HFYZKREVSW8KTGVKN4R8GPKK"
- *perhaps this will be the most controversial branch of this tree, so maybe if you don't like to
get all fired up... stop reading here.*
% id = "01HFYZKREV1CYFWBF4ZM4R3Y15"
- but if you decide to stay please approach these thoughtfully and respectfully, with more
of a a "this is interesting" than "I disagree with this" vibe
% id = "01JBAK8GABBRYFED4AMGC4BKTB"
- there's a reason I don't include these branches in [page:treehouse/new][] alright
% content.link = "philosophy/furry" % content.link = "philosophy/furry"
id = "01JCGVBXVME8DC9T79GQPXFZ3C" id = "01JCGVBXVME8DC9T79GQPXFZ3C"
@ -47,3 +37,4 @@
% id = "01HFYZKREV634J021ZMCDSP7G4" % id = "01HFYZKREV634J021ZMCDSP7G4"
content.link = "philosophy/hedonic-treadmill" content.link = "philosophy/hedonic-treadmill"
+ :page: hedonic treadmill ([wikipedia](https://en.wikipedia.org/wiki/Hedonic_treadmill)) + :page: hedonic treadmill ([wikipedia](https://en.wikipedia.org/wiki/Hedonic_treadmill))

View file

@ -9,10 +9,6 @@
% id = "01HPD4XQQ5GPQ20C6BPA8G670F" % id = "01HPD4XQQ5GPQ20C6BPA8G670F"
- ### :folder: blog - ### :folder: blog
% content.link = "programming/blog/haku"
id = "01J4J4PAXRWZDP9PAZNGCQ9S3D"
+ [featured]{.badge .blue} :page: haku - writing a little programming language for fun
% content.link = "programming/blog/cstring-starts-with" % content.link = "programming/blog/cstring-starts-with"
id = "01JCGAM56KS2C6D4XZ1MRATXH4" id = "01JCGAM56KS2C6D4XZ1MRATXH4"
+ :page: prefix matches with C strings + :page: prefix matches with C strings
@ -21,6 +17,10 @@
id = "01J7BYKQHZKYQ969T3PH3V8HF1" id = "01J7BYKQHZKYQ969T3PH3V8HF1"
+ :page: not quite buildless + :page: not quite buildless
% content.link = "programming/blog/haku"
id = "01J4J4PAXRWZDP9PAZNGCQ9S3D"
+ :page: haku - writing a little programming language for fun
% content.link = "programming/blog/lvalues" % content.link = "programming/blog/lvalues"
id = "01HY5R1ZW0M0Y5KQ1E8F0Q73ZT" id = "01HY5R1ZW0M0Y5KQ1E8F0Q73ZT"
+ :page: places, or what is up with `*x` not always meaning the same thing + :page: places, or what is up with `*x` not always meaning the same thing
@ -37,6 +37,11 @@
id = "01HPD4XQQ5WM0APCAX014HM43V" id = "01HPD4XQQ5WM0APCAX014HM43V"
+ :page: tairu - an interactive exploration of 2D autotiling techniques + :page: tairu - an interactive exploration of 2D autotiling techniques
% content.link = "about-treehouse"
id = "01H89RFHCQ1YB7CXBBR6NDDAC1"
redirect_from = ["about-treehouse"]
+ :page: about the treehouse
% id = "programming/projects" % id = "programming/projects"
content.link = "programming/projects" content.link = "programming/projects"
+ ### :folder: projects + ### :folder: projects
@ -67,3 +72,4 @@
id = "programming/opinions" id = "programming/opinions"
+ ### :folder: opinions + ### :folder: opinions

View file

@ -1,4 +1,4 @@
%% title = "short thoughts" %% title = "`?` is not the only option"
% id = "01J4J6400Q4MWF2QPGX3P9Q2WQ" % id = "01J4J6400Q4MWF2QPGX3P9Q2WQ"
- if there's one thing I learned from Go... - if there's one thing I learned from Go...
@ -17,3 +17,4 @@ if !list.ok {
``` ```
...it's that `?` is not the only option. ...it's that `?` is not the only option.

View file

@ -1,7 +1,92 @@
%% title = "Hotland - Bad Opinion Zone" %% title = "Hotland - Bad Opinion Zone"
% id = "01HBTSXTTAAAHGKD4TZZW14KFK" % id = "01HBTSXTTAAAHGKD4TZZW14KFK"
- > "Hotland - Bad Opinion Zone" template = true
- ``` =html
<style>
@font-face {
font-family: "Determination Sans";
src: url('/static/font/DTM-Sans.otf?cache=b3-4fe96c14');
}
.undertale-save-box {
--icon-heart: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAQ0lEQVQY042P0QoAMARF7/X/3zzTsoW0nBRd5wHAUCs9DYQTM/rwMEssWCmrUodgwEjiPfIjSPqmEYj4chVZdmjEJGzAMxYAKMRofgAAAABJRU5ErkJggg==');
border: 6px solid white;
background: black;
color: white;
font-family: "Determination Sans";
font-size: 20pt;
line-height: 1;
width: 424px;
height: 174px;
padding: 20px 24px 17px 24px;
display: flex;
flex-direction: column;
&>ul.row {
padding-left: 0;
margin-left: 0;
display: flex;
flex-direction: row;
&.player-info { padding-bottom: 14px; }
&.buttons { margin-top: auto; }
&>li {
display: block;
&.player-name { width: 146px; }
&.love { width: 138px; }
&.button-save, &.button-return { width: 180px; }
}
&.buttons {
&>li {
padding-left: 30px;
cursor: pointer;
&:hover {
image-rendering: pixelated;
background-image: var(--icon-heart);
background-repeat: no-repeat;
background-size: 18px;
background-position: 2px 4px;
}
&>a {
text-decoration: none;
color: white;
}
}
}
}
&.file-saved {
color: #ff0;
}
}
</style>
<div class="undertale-save-box">
<ul class="row player-info">
<li class="player-name">SIGSEGV</li>
<li class="love">LV 1</li>
<li class="play-time">0:00</li>
</ul>
<ul class="row">
<li class="save-point">Hotland Bad Opinion Zone</li>
</ul>
<ul class="row buttons">
<li class="button-save">Save</li>
<li class="button-return"><a href="/">Return</a></li>
</ul>
</div>
```
% id = "01HBTSXTTAMWJ2BM6395YS72FN" % id = "01HBTSXTTAMWJ2BM6395YS72FN"
+ :page: log verbosity levels are stupid + :page: log verbosity levels are stupid

View file

@ -1,133 +1,159 @@
%% template = "_new.hbs" %% title = "a curated feed of updates to the house"
title = "a curated feed of updates to the house" styles = ["new.css"]
styles = ["new.css"]
feed = "news"
% id = "01J4J5N6WZQ03VTB3TZ51J7QZK" % id = "01JCGWPM6T73PAC5Q8YHPBEAA1"
- [featured]{.badge .blue} I was bored over a weekend, so I decided to write the tiniest programming language I could imagine. + hello!
it came out looking pretty Lispy, and I'm glad about that! if you've been wondering what I've been up to, you've come to the right place.
I learned a ton about Lisps in the process of researching it.
even though it didn't end up having macros...
### haku - writing a little programming language for fun % id = "01JCGWPM6T3W07KAGG3J29JMVF"
- posts are sorted from newest to oldest.
[read][page:programming/blog/haku] % id = "01JCGWPM6TGQ17JPSJW8G58SB0"
- you can keep track of which posts you've read by looking at the color of the links.
% id = "01JCGWPM6TMAJT0B50GQSA4BDW"
- there is currently no RSS or Atom feed for this page, sorry!
% id = "01JBAGZAZ30K443QYPK0XBNZWM" % id = "01JBAGZAZ30K443QYPK0XBNZWM"
- ### the curious case of Amon Tobin's Creatures - ### [the curious case of Amon Tobin's Creatures][page:music/creatures]
a weird anomaly I noticed while listening to some breaks % id = "01JBAGZAZ3NKBED4M9FANR5RPZ"
- a weird anomaly I noticed while listening to some breaks
[read][page:music/creatures]
% id = "01J8ZP2EG9TM8320R9E3K1GQEC" % id = "01J8ZP2EG9TM8320R9E3K1GQEC"
- I was listening to Oneohtrix Point Never's _Magic Oneohtrix Point Never_, and had some retrospective thoughts about the distorted vocals in... - ### [I Don't Love Me Anymore][page:music/reviews/opn/i-dont-love-me-anymore]
### I Don't Love Me Anymore % id = "01J8ZP2EG96VQ2ZK0XYK0FK1NR"
- I was listening to Oneohtrix Point Never's _Magic Oneohtrix Point Never_, and had some retrospective thoughts about the vocals in this song.
it's also a nice opportunity to say that I've refreshed the music section a bit! % id = "01J8ZP2EG92T1SM7F6MTCXZHNJ"
- it's also a nice opportunity to say that I've refreshed the music section a bit!
[read][page:music/reviews/opn/i-dont-love-me-anymore]
% id = "01J7C1KBZ58BR21AVFA1PMWV68" % id = "01J7C1KBZ58BR21AVFA1PMWV68"
- I like lean websites. did you know that? - ### [not quite buildless][page:programming/blog/buildsome]
I also really like lean websites that are simple in construction and deployment. did you know the treehouse is a website like that? % id = "01J7C1KBZ5XKZRN4V5BWFQTV6Y"
- I like lean websites. did you know that?
so I've decided to write up a few anecdotes and other cool stories about the treehouse's inner workings. % id = "01J7C1KBZ50EMBK9VPH9CE3F7H"
- I also really like lean websites that are simple in construction and deployment. did you know the treehouse is a website like that?
also, it's (way past) its one year anniversary! hooray! % id = "01J7C1KBZ5QCVM6DDT9G5KQGP2"
- so I've decided to write up a few anecdotes and other cool stories about the treehouse's inner workings.
### not quite buildless % id = "01J7C1KBZ5S0XTQXKY41VZNWJZ"
- also, it's (way past) its one year anniversary! hooray!
[read][page:programming/blog/buildsome]
% id = "01J73BSWA15KHTQ21T0S14NZW0" % id = "01J73BSWA15KHTQ21T0S14NZW0"
- I decided to write up some ideas on what sort of cool data analysis I could do on my [ListenBrainz data set][def:social/listenbrainz]. - ### [the ListenBrainz data set][page:music/brainz]
I haven't done any of it yet, but I thought it'd be cool to share my ideas anyways!
### the ListenBrainz data set % id = "01J73BSWA1EX7ZP28KCCG088DD"
- I decided to write up some ideas on what sort of cool data analysis I could do on my [ListenBrainz data set][def:social/listenbrainz].
[read][page:music/brainz] % id = "01J73BSWA1ANRQ31DNYHTNPSP5"
- I haven't done any of it yet, but I thought it'd be cool to share my ideas anyways!
% id = "01J4J5N6WZQ03VTB3TZ51J7QZK"
- ### [haku - writing a little programming language for fun][page:programming/blog/haku]
% id = "01J4J5N6WZQ1316WKDXB1M5W6E"
- I was bored over a weekend, so I decided to write the tiniest programming language I could imagine.
% id = "01J4J5N6WZ2RW32HJX1VBJM58X"
- it came out looking pretty Lispy, and I'm glad about that!
% id = "01J4J5N6WZV6E1AHF65PQ5J6GF"
- I learned a ton about Lisps in the process of researching it.
even though it didn't end up having macros...
% id = "01J293BFEBT15W0Z3XF1HEFGZT" % id = "01J293BFEBT15W0Z3XF1HEFGZT"
- sometimes people call me crazy for saying that bashing JavaScript is senseless and that it's not as bad of a language as people make it out to be. - ### [JavaScript is not as bad as people make it out to be][page:programming/languages/javascript]
so I decided to collect my thoughts into a nice little page I can link easily.
### JavaScript is not as bad as people make it out to be % id = "01J293BFEB4G7214N20SZA8V7W"
- sometimes people call me crazy for saying that bashing JavaScript is senseless and that it's not as bad of a language as people make it out to be.
[why dude why][page:programming/languages/javascript] % id = "01J293BFEBYSW4K7YHVN42J3WP"
- so I decided to collect my thoughts into a nice little page I can link easily.
% id = "01J0VNHPTRNC1HFXAQ790Y1EZB" % id = "01J0VNHPTRNC1HFXAQ790Y1EZB"
- a friend of mine asked if it makes sense to define your own wrapper class for `SDL_Window` the way [Lazy Foo](https://lazyfoo.net/tutorials/SDL/10_color_keying/index.php) does it. - ### [freeing C memory automatically using `std::unique_ptr` and `std::shared_ptr`][page:programming/languages/cxx/shared-unique-ptr-deleter]
I told him there's no reason to do that in modern C++, because `std::unique_ptr` can do everything for you anyways.
### freeing C memory automatically using `std::unique_ptr` and `std::shared_ptr` % id = "01J0VNHPTRP51XYDA4N2RPG58F"
- a friend of mine asked if it makes sense to define your own wrapper class for `SDL_Window` the way [Lazy Foo](https://lazyfoo.net/tutorials/SDL/10_color_keying/index.php) does it.
~on another note, I did read a blog post about this once somewhere, but couldn't be bothered to find it. so there you go! I made a post about this too.~ % id = "01J0VNHPTRW3XR4YG0GWGFF4N4"
- I told him there's no reason to do that in modern C++, because `std::unique_ptr` can do everything for you anyways.
[read][page:programming/languages/cxx/shared-unique-ptr-deleter] % id = "01J0VNHPTRMXFTH3F601R7V1S9"
- on another note, I did read a blog post about this once somewhere, but couldn't be bothered to find it. so there you go! I made a post about this too.
% id = "01J0KRPMV7SS48B64BFCJZK7VQ" % id = "01J0KRPMV7SS48B64BFCJZK7VQ"
- it's updatin' time! I took some time to clean up old pages and update my _about me_.\ - ### [about me (version 2)][page:about]
over time I've been learning how to write content on the treehouse effectively, and the new about me reflects that.
### about me (version 2) % id = "01J0KRPMV73K71D3QXFQ3GNY2N"
- it's updatin' time! I took some time to clean up old pages and update my _about me_.\
over time I've been learning how to write content on the treehouse effectively, and the new about me reflects that.
[read][page:about] [version 1][page:about/v1] % id = "01J0KRPMV7KD7X3HHXGKBS0VAX"
- [version 1][page:about/v1]
% id = "01HY5R1ZW2PYZSSP2J2KAA23DA" % id = "01HY5R1ZW2PYZSSP2J2KAA23DA"
- I recently got a question from my someone telling me they doesn't understand why `*x` does not read from the pointer `x` when on the left-hand side of an assignment. - ### [what's up with `*x` not always meaning the same thing in different contexts?][page:programming/blog/lvalues]
and that made me think,
### what's up with `*x` not always meaning the same thing in different contexts? % id = "01HY5R1ZW24YJ2NF2RYWRZG4ZT"
- I recently got a question from my someone telling me they doesn't understand why `*x` does not read from the pointer `x` when on the left-hand side of an assignment.
[read][page:programming/blog/lvalues] and that made me think, _why_ is that the case?
% id = "01HV1DGFHZ65GJVQRSREKR67J9" % id = "01HV1DGFHZ65GJVQRSREKR67J9"
- I've been thinking recently how cool it is to be able to single-step into Unreal Engine's source code and edit it while you're working with it, and how uncool it is that I can't do the same thing easily in the Rust world. - ### [systems are just a bunch of code][page:programming/blog/systems]
after all, aren't we just dealing with a bunch of code running on the computer? why not let me poke at it? % id = "01HV1DGFHZFFZSQNCVWBTJ1VHM"
- I've been thinking recently how cool it is to be able to single-step into Unreal Engine's source code and edit it while you're working with it, and how uncool it is that I can't do the same thing easily in the Rust world.
### systems are just a bunch of code % id = "01HV1DGFHZGFYWT5MMM57SEWNN"
- after all, aren't we just dealing with a bunch of code running on the computer? why not let me poke at it?
[can _you_ can read other people's code?][page:programming/blog/systems] [bonus: dismantling Unreal Engine's GENERATED_BODY][page:programming/technologies/unreal-engine/generated-body] % id = "01HV1DGFHZ2SDPDV3VYRR7VBRR"
- bonus: [dismantling Unreal Engine's `GENERATED_BODY`][page:programming/technologies/unreal-engine/generated-body]
% id = "01HTWNETT2S5NSBF3QR4HYA7HN" % id = "01HTWNETT2S5NSBF3QR4HYA7HN"
- last night I couldn't sleep because of type theory. in the process of trying to write down my thoughts, I ended up discovering a class of types which, to my knowledge, no language implements. - ### [OR-types][page:programming/blog/or-types]
### OR-types % id = "01HTWNETT2N8NPENETWYFBTXEM"
- last night I couldn't sleep because of type theory. in the process of trying to write down my thoughts, I ended up discovering a class of types which, to my knowledge, no language implements.
[what the hell do you mean, aren't sum types exactly that??][page:programming/blog/or-types]
% id = "01HRG3VN091V715A8T54QK5PVX" % id = "01HRG3VN091V715A8T54QK5PVX"
- I really like Lua, did you know that? but I get kind of tired of explaining why a thousand times to people who don't know the language, so… - ### [programming languages: Lua][page:programming/languages/lua]
### programming languages: Lua % id = "01HRG3VN095BNHERHWVX1TKS9K"
- I really like Lua, did you know that? but I get kind of tired of explaining why a thousand times to people who don't know the language, so here's a page with my thoughts!
[read why I like it so much][page:programming/languages/lua]
% id = "01HR9ZTS8RS4VJNJYSNRQYSKHZ" % id = "01HR9ZTS8RS4VJNJYSNRQYSKHZ"
- sidebars! also known as, _"enjoying the main content? how about I distract you from it so that you can't focus!"_\ - ### [design: sidebars][page:design/sidebars]
seriously though. I don't like them.
### design: sidebars % id = "01HR9ZTS8RY3N4EJM5W7WBTF0G"
- sidebars! also known as, _"enjoying the main content? how about I distract you from it so that you can't focus!"_
[read why I don't like them so much][page:design/sidebars] % id = "01HR9ZTS8RQ1EN0THYEVNQRY2A"
- seriously though. I don't like them.
% id = "01HQ8KV8T8GRCVFDJ3EP6QE163" % id = "01HQ8KV8T8GRCVFDJ3EP6QE163"
- I started a branch on user interface and user experience design, because I was working with mintty at work and had some thoughts about it. - ### [liquidex's treehouse: design][page:design]
"why does mintty always feel so _out of place_ compared to `cmd.exe`?" % id = "01HQ8KV8T8EEX6XBG2K1X3FGKW"
- I started a branch on user interface and user experience design, because I was working with mintty at work and had some thoughts about it.
### liquidex's treehouse: design "why does mintty always feel so _out of place_ compared to `cmd.exe`?"
[read: _on digital textures_][page:design/digital-textures] [go to branch][page:design] % id = "01HQ8KV8T865WKME5R9TD0DSTN"
- I also wrote a post summarising my thoughts: [_on digital textures_][page:design/digital-textures]
% id = "01HQ6G30PTVT5H0Z04VVRHEZQF" % id = "01HQ6G30PTVT5H0Z04VVRHEZQF"
- ever wondered how Terraria renders its worlds? or how editors like Tiled manage to make painting tiles so easy? - ### [tairu - an interactive exploration of 2D autotiling techniques][page:programming/blog/tairu]
### tairu - an interactive exploration of 2D autotiling techniques % id = "01HQ6G30PTG8QA5MAPEJPWSM14"
- ever wondered how Terraria renders its worlds? or how editors like Tiled manage to make painting tiles so easy?
[read][page:programming/blog/tairu] % id = "01HQ6G30PT1D729Z29NYVDCFDB"
- this post explores basically just that.

View file

@ -543,12 +543,16 @@ impl Generator {
feeds: &feeds, feeds: &feeds,
season: Season::current(), season: Season::current(),
}; };
let template_name = roots let mut template_name = roots
.attributes .attributes
.template .template
.clone() .clone()
.unwrap_or_else(|| "_tree.hbs".into()); .unwrap_or_else(|| "_tree.hbs".into());
if !template_file_ids.contains_key(&template_name) {
template_name = "_tree.hbs".into();
}
// Reinsert the stolen roots. // Reinsert the stolen roots.
treehouse.roots.insert(parsed_tree.root_key, roots); treehouse.roots.insert(parsed_tree.root_key, roots);

View file

@ -1,134 +1,33 @@
/* Give the intro and outro some breathing room. */ .tree .branch-container {
section { &:has(th-bc > h3) > th-bb {
padding: 1em 2em;
}
/* Style all links in the last paragraph as big buttons. */
.tree th-bc>p:last-child {
--transition-duration: 0.2s;
margin-top: var(--8px);
margin-bottom: var(--4px);
&>a {
display: inline-block;
padding: 0.5em 1.5em;
color: var(--text-color);
background-color: transparent;
border: var(--1px) solid var(--border-1);
border-radius: 2em;
text-decoration: none;
transition:
color var(--transition-duration),
background-color var(--transition-duration),
border-color var(--transition-duration);
&:hover,
&:focus {
color: white;
background-color: #058ef0;
border-color: white;
}
}
}
.tree li>div:first-child,
.tree li>details>summary:first-child {
--margin: 2.5em;
border: none;
margin-left: var(--tree-indent-width);
width: calc(100% - var(--tree-indent-width));
margin-top: var(--margin);
margin-bottom: var(--margin);
}
.tree th-bp {
display: none;
}
.tree th-bb {
opacity: 100%;
& .branch-date {
display: block !important;
}
}
@media (max-width: 600px) {
.tree .branch-container {
flex-direction: column-reverse;
}
}
section.settings {
& h3 {
display: inline;
}
& details>summary {
--recursive-wght: 700;
list-style: none;
cursor: pointer;
opacity: 50%;
transition: opacity var(--transition-duration);
&::-webkit-details-marker {
display: none;
}
&::before {
--recursive-casl: 0.0;
--recursive-mono: 1.0;
--recursive-slnt: 0.0;
content: '+';
margin-right: 0.3em;
opacity: 50%;
}
&:hover {
opacity: 100%;
}
}
& details[open]>summary {
opacity: 100%; opacity: 100%;
&::before { & .branch-date {
content: '-'; display: block !important;
} }
} }
}
& p {
margin-bottom: var(--8px); @media (max-width: 720px) {
} .tree .branch-container {
&:has(th-bc > h3) {
& button { flex-direction: column;
border: var(--1px) solid var(--border-1); padding-left: 1rem;
border-radius: 999px; padding-top: 0.25rem;
padding: var(--4px) var(--12px); padding-bottom: 0.25rem;
background: none;
color: var(--text-color); & > th-bp {
font-size: 1rem; display: none;
}
cursor: pointer;
& > th-bc > h3 {
transition: margin-top: 0;
color var(--transition-duration), margin-bottom: 0;
background-color var(--transition-duration), }
border-color var(--transition-duration);
& > th-bb {
&:hover { margin: 0;
color: white; }
background-color: #058ef0;
border-color: white;
} }
} }
} }

View file

@ -40,7 +40,7 @@ h1.page-title {
} }
} }
.index\:hobby-corners { main.tree > ul {
/* Optical text offset to make the icons look less misaligned. /* Optical text offset to make the icons look less misaligned.
This is adjusted per each hobby corner to fit the icons. This is adjusted per each hobby corner to fit the icons.
@ -49,6 +49,7 @@ h1.page-title {
This aims to improve the readability of that a bit without being too noticable. */ This aims to improve the readability of that a bit without being too noticable. */
--section-text-offset: 0em; --section-text-offset: 0em;
--section-icon-align: -30%;
& > li { & > li {
& > details > summary { & > details > summary {
@ -61,12 +62,16 @@ h1.page-title {
margin-right: calc(0.2em + var(--section-text-offset)); margin-right: calc(0.2em + var(--section-text-offset));
vertical-align: -38%; vertical-align: var(--section-icon-align);
} }
} }
} }
} }
#index\:about {
--section-color: #a7d5e0;
}
#index\:programming { #index\:programming {
--section-color: var(--liquidex-brand-red); --section-color: var(--liquidex-brand-red);
--section-text-offset: -0.1em; --section-text-offset: -0.1em;
@ -85,3 +90,7 @@ h1.page-title {
--section-color: var(--liquidex-brand-blue); --section-color: var(--liquidex-brand-blue);
--section-text-offset: 0.05em; --section-text-offset: 0.05em;
} }
#index\:philosophy {
--section-color: #c952f5;
}

BIN
static/font/DTM-Sans.otf Executable file

Binary file not shown.

View file

@ -1,71 +0,0 @@
// news.js because new.js makes the TypeScript language server flip out.
// Likely because `new` is a keyword, but also, what the fuck.
import { addSpell, spell } from "treehouse/spells.js";
import { getSettingValue } from "treehouse/settings.js";
import { Branch } from "treehouse/tree.js";
const seenStatesKey = "treehouse.news.seenBranches";
const seenStates = new Set(JSON.parse(localStorage.getItem(seenStatesKey)) || []);
let seenCount = seenStates.size;
let unseenCount = TREEHOUSE_NEWS_COUNT - seenCount;
function saveSeenStates() {
localStorage.setItem(seenStatesKey, JSON.stringify(Array.from(seenStates)));
}
function markAsRead(branch) {
let branchData = spell(branch, Branch);
if (!seenStates.has(branchData.namedID) && seenCount > 0) {
let badge = document.createElement("span");
badge.classList.add("badge", "red", "before-content");
badge.textContent = "new";
branchData.branchContent.firstChild.insertBefore(badge, branchData.branchContent.firstChild.firstChild);
}
seenStates.add(branchData.namedID);
}
export function initNewsPage() {
for (let [_, branch] of Branch.branchesByNamedID) {
markAsRead(branch);
}
saveSeenStates();
// If any branches are added past the initial load, add them to the seen set too.
Branch.onAdded.push(branch => {
markAsRead(branch);
saveSeenStates();
})
}
export function markAllAsUnread() {
localStorage.removeItem(seenStatesKey);
}
addSpell("new", class New {
constructor(element) {
// Do not show the badge to people who have never seen any news.
// It's just annoying in that case.
// In case you do not wish to see the badge anymore, go to the news page and uncheck the
// checkbox at the bottom.
let userSawNews = seenCount > 0;
let userWantsToSeeNews = getSettingValue("showNewPostIndicator");
if (userSawNews && userWantsToSeeNews && unseenCount > 0) {
this.newText = document.createElement("span");
this.newText.classList.add("new-text");
this.newText.textContent = element.textContent;
element.textContent = "";
element.appendChild(this.newText);
this.badge = document.createElement("span");
this.badge.classList.add("badge", "red");
this.badge.textContent = unseenCount.toString();
element.appendChild(this.badge);
element.classList.add("has-news");
}
}
});

View file

@ -1,72 +0,0 @@
<!DOCTYPE html>
<html lang="en-US" prefix="og: https://ogp.me/ns#">
<head>
{{> components/_head.hbs }}
</head>
<body>
{{#> components/_nav.hbs }}
{{!-- For /index, include a "new" link that goes to the curated news feed page. --}}
{{#if (eq page.tree_path "index")}}
<a href="{{ config.site }}/treehouse/new" data-cast="new">new</a>
{{/if}}
{{/ components/_nav.hbs }}
{{> components/_noscript.hbs }}
<section>
<p>welcome!</p>
<p>since you clicked here, you must be curious as to what's been going on since your last visit to the house. so
here's a recap just for you - enjoy!</p>
</section>
{{> components/_tree.hbs }}
<section>
<p>note that this page does not include any updates that were made to the website itself - for that, you can
visit <a href="{{ config.site }}/treehouse/changelog">the changelog</a>.
</p>
</section>
<section class="settings" data-cast="js">
<details>
<summary>
settings
</summary>
<section>
<p>if you find the newsfeed annoying, you can customize some aspects of it.</p>
<p>
<input type="checkbox" data-cast="setting-checkbox" id="showNewPostIndicator">
<label for="showNewPostIndicator">show the <span class="badge red">1</span> badge on the homepage
for
new posts you haven't read yet</label>
</p>
<p>
<button id="mark-all-as-unread"
title="Mostly useful for debugging purposes, but it's there if you really wanna do it.">
mark all as unread</button>
</p>
</section>
</details>
</section>
{{!-- For all pages except the one linked from the footer, include the footer icon. --}}
{{#if (ne page.tree_path "treehouse")}}
{{> components/_footer.hbs }}
{{/if}}
<script type="module" defer>
import { initNewsPage, markAllAsUnread } from "{{ config.site }}/static/js/news.js";
initNewsPage();
document.getElementById("mark-all-as-unread").addEventListener("click", () => {
markAllAsUnread();
alert("congration! you done it");
});
</script>
</body>
</html>

View file

@ -18,7 +18,6 @@ clever to do while browser vendors figure that out, we'll just have to do a cach
<script> <script>
const TREEHOUSE_SITE = `{{ config.site }}`; const TREEHOUSE_SITE = `{{ config.site }}`;
const TREEHOUSE_NEWS_COUNT = {{ len feeds.news.branches }};
{{!-- Yeah, this should probably be solved in a better way somehow. {{!-- Yeah, this should probably be solved in a better way somehow.
For now this is used to allow literate-programming.js to refer to syntax files with the ?cache attribute, For now this is used to allow literate-programming.js to refer to syntax files with the ?cache attribute,
@ -35,7 +34,6 @@ clever to do while browser vendors figure that out, we'll just have to do a cach
import "treehouse/settings.js"; import "treehouse/settings.js";
import "treehouse/tree.js"; import "treehouse/tree.js";
import "treehouse/emoji.js"; import "treehouse/emoji.js";
import "treehouse/news.js";
</script> </script>
<meta property="og:site_name" content="{{ config.user.title }}"> <meta property="og:site_name" content="{{ config.user.title }}">

View file

@ -3,17 +3,3 @@
{{{ include_static 'svg/object/logo.svg' }}} {{{ include_static 'svg/object/logo.svg' }}}
</a> </a>
</nav> </nav>
{{!--
I don't have any idea where to put this right now.
There's no obvious place, and even when it is there, I hate the hideous red badge on new entries.
No time to figure it out. Will do later.
{{#if (eq page.tree_path 'index')}}
<nav id="nav-links">
<a href="{{ config.site }}/treehouse/new" data-cast="new">new</a>
</nav>
{{/if}}
--}}