<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Blog on Hieu Phay</title><link>https://hieuphay.com/en/blog/</link><description>Recent content in Blog on Hieu Phay</description><generator>Hugo</generator><language>en</language><managingEditor>Nguyen Duc Hieu</managingEditor><webMaster>Nguyen Duc Hieu</webMaster><atom:link href="https://hieuphay.com/en/blog/index.xml" rel="self" type="application/rss+xml"/><item><title>Org-mode as a Swiss-army publishing tool</title><link>https://hieuphay.com/en/org-publishing-latex-hugo/</link><pubDate>Mon, 22 May 2023 00:00:00 +0000</pubDate><guid>https://hieuphay.com/en/org-publishing-latex-hugo/</guid><description>&lt;div class="ox-hugo-toc toc has-section-numbers"&gt;&#10;&lt;div class="heading"&gt;Table of Contents&lt;/div&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;span class="section-num"&gt;1&lt;/span&gt; &lt;a href="https://hieuphay.com/en/org-publishing-latex-hugo/#footnotes-and-sidenotes"&gt;Footnotes and Sidenotes&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;span class="section-num"&gt;2&lt;/span&gt; &lt;a href="https://hieuphay.com/en/org-publishing-latex-hugo/#boxes"&gt;Boxes!&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/div&gt;&#10;&lt;!--endtoc--&gt;&#10;&lt;p&gt;I have two large publishing needs: (1) creating &lt;span class='smallcap'&gt;pdf&lt;/span&gt;&lt;small&gt;s&lt;/small&gt; by LaTeX and (2) writing stuffs on this Hugo-powered website i.e. to write Blackfriday-compatible Markdown files.&lt;/p&gt;&#10;&lt;p&gt;Nowadays, I neither write LaTeX or Markdown documents directly, but instead write in Emacs Org-mode and convert the document to my desired format.&#10;I mentioned my Org-mode setups for &lt;span class='smallcap'&gt;pdf&lt;/span&gt;&lt;small&gt;s&lt;/small&gt; on this website &lt;a href="../export-orgmode-latex/"&gt;5 years ago&lt;/a&gt; and my configurations have slowly evolves since then.&#10;On the website publishing side, the excellent package &lt;a href="https://ox-hugo.scripter.co/"&gt;ox-hugo&lt;/a&gt; works nicely.&lt;/p&gt;</description></item><item><title>Advent of Code 2021 in Julia – Day 18: Snailfish</title><link>https://hieuphay.com/AoC2021-day18/</link><pubDate>Sun, 19 Dec 2021 00:00:00 +0000</pubDate><guid>https://hieuphay.com/AoC2021-day18/</guid><description>&lt;div class="ox-hugo-toc toc"&gt;&#10;&lt;div class="heading"&gt;Table of Contents&lt;/div&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://hieuphay.com/AoC2021-day18/#part-1"&gt;Part 1&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://hieuphay.com/AoC2021-day18/#part-2"&gt;Part 2&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/div&gt;&#10;&lt;!--endtoc--&gt;&#10;&lt;p&gt;This one was quite difficult.&#10;It took me 2 days to solve this one.&lt;/p&gt;&#10;&lt;h2 id="part-1"&gt;&#10; Part 1&#10; &lt;a class="heading-link" href="#part-1" aria-labelledby="part-1"&gt;&#10; &lt;i class="fa fa-link" aria-hidden="true"&gt;&lt;/i&gt;&#10; &lt;/a&gt;&#10;&lt;/h2&gt;&#10;&lt;details&gt;&#10;&lt;summary&gt;Show challenge - day 18, part 1&lt;/summary&gt;&#10;&lt;div class="details"&gt;&#10;&lt;p&gt;You descend into the ocean trench and encounter some &lt;a href="https://en.wikipedia.org/wiki/Snailfish"&gt;snailfish&lt;/a&gt;.&#10;They say they saw the sleigh keys!&#10;They&amp;rsquo;ll even tell you which direction the keys went if you help one of the smaller snailfish with his &lt;strong&gt;math homework&lt;/strong&gt;.&lt;/p&gt;</description></item><item><title>Advent of Code 2021 in Julia – Day 17: Trick Shot</title><link>https://hieuphay.com/AoC2021-day17/</link><pubDate>Fri, 17 Dec 2021 00:00:00 +0000</pubDate><guid>https://hieuphay.com/AoC2021-day17/</guid><description>&lt;div class="ox-hugo-toc toc"&gt;&#10;&lt;div&gt;&lt;/div&gt;&#10;&lt;div class="heading"&gt;Table of Contents&lt;/div&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://hieuphay.com/AoC2021-day17/#part-1"&gt;Part 1&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://hieuphay.com/AoC2021-day17/#part-2"&gt;Part 2&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/div&gt;&#10;&lt;!--endtoc--&gt;&#10;&lt;p&gt;An easy puzzle for today&amp;rsquo;s.&#10;I wonder if there is a more clever solution&amp;hellip;&lt;/p&gt;&#10;&lt;h2 id="part-1"&gt;&#10; Part 1&#10; &lt;a class="heading-link" href="#part-1" aria-labelledby="part-1"&gt;&#10; &lt;i class="fa fa-link" aria-hidden="true"&gt;&lt;/i&gt;&#10; &lt;/a&gt;&#10;&lt;/h2&gt;&#10;&lt;details&gt;&#10;&lt;summary&gt;&#10;Show challenge - day 17, part 1&#10;&lt;/summary&gt;&#10;&lt;div class="details"&gt;&#10;&lt;p&gt;You finally decode the Elves&amp;rsquo; message.&#10;&lt;code&gt;HI&lt;/code&gt;, the message says.&#10;You continue searching for the sleigh keys.&lt;/p&gt;&#10;&lt;p&gt;Ahead of you is what appears to be a large &lt;a href="https://en.wikipedia.org/wiki/Oceanic%5Ftrench"&gt;ocean trench&lt;/a&gt;.&#10;Could the keys have fallen into it? You&amp;rsquo;d better send a probe to investigate.&lt;/p&gt;</description></item><item><title>Advent of Code 2021 in Julia – Day 16: Packet Decoder</title><link>https://hieuphay.com/AoC2021-day16/</link><pubDate>Thu, 16 Dec 2021 00:00:00 +0000</pubDate><guid>https://hieuphay.com/AoC2021-day16/</guid><description>&lt;div class="ox-hugo-toc toc"&gt;&#10;&lt;div&gt;&lt;/div&gt;&#10;&lt;div class="heading"&gt;Table of Contents&lt;/div&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://hieuphay.com/AoC2021-day16/#part-1"&gt;Part 1&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://hieuphay.com/AoC2021-day16/#part-2"&gt;Part 2&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/div&gt;&#10;&lt;!--endtoc--&gt;&#10;&lt;p&gt;I can feel the difficulty ramping up in the last few days.&#10;For the second part of the puzzle, I had to utilized Julia&amp;rsquo;s meta-programming capacity.&#10;It&amp;rsquo;s the first time I touched the meta-programming section in the Julia documentation.&#10;Fortunately my code worked fine this time, and I can still keep up with solving the puzzles during the same day they&amp;rsquo;re released.&lt;/p&gt;</description></item><item><title>Advent of Code 2021 in Julia – Day 15: Chiton</title><link>https://hieuphay.com/AoC2021-day15/</link><pubDate>Wed, 15 Dec 2021 00:00:00 +0000</pubDate><guid>https://hieuphay.com/AoC2021-day15/</guid><description>&lt;div class="ox-hugo-toc toc"&gt;&#10;&lt;div&gt;&lt;/div&gt;&#10;&lt;div class="heading"&gt;Table of Contents&lt;/div&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://hieuphay.com/AoC2021-day15/#part-1"&gt;Part 1&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://hieuphay.com/AoC2021-day15/#part-2"&gt;Part 2&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/div&gt;&#10;&lt;!--endtoc--&gt;&#10;&lt;p&gt;The one today is difficult but fun!&#10;It provided a very nice example for dynamic programming.&#10;I would probably revisit this puzzle again if I have the time.&lt;/p&gt;&#10;&lt;h2 id="part-1"&gt;&#10; Part 1&#10; &lt;a class="heading-link" href="#part-1" aria-labelledby="part-1"&gt;&#10; &lt;i class="fa fa-link" aria-hidden="true"&gt;&lt;/i&gt;&#10; &lt;/a&gt;&#10;&lt;/h2&gt;&#10;&lt;details&gt;&#10;&lt;summary&gt;&#10;Show challenge - day 15, part 1&#10;&lt;/summary&gt;&#10;&lt;div class="details"&gt;&#10;&lt;p&gt;You&amp;rsquo;ve almost reached the exit of the cave, but the walls are getting closer together.&#10;Your submarine can barely still fit, though; the main problem is that the walls of the cave are covered in &lt;a href="https://en.wikipedia.org/wiki/Chiton"&gt;chitons&lt;/a&gt;, and it would be best not to bump any of them.&lt;/p&gt;</description></item><item><title>Advent of Code 2021 in Julia – Day 14: Extended Polymerization</title><link>https://hieuphay.com/AoC2021-day14/</link><pubDate>Tue, 14 Dec 2021 00:00:00 +0000</pubDate><guid>https://hieuphay.com/AoC2021-day14/</guid><description>&lt;div class="ox-hugo-toc toc"&gt;&#10;&lt;div&gt;&lt;/div&gt;&#10;&lt;div class="heading"&gt;Table of Contents&lt;/div&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://hieuphay.com/AoC2021-day14/#part-1"&gt;Part 1&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://hieuphay.com/AoC2021-day14/#part-2"&gt;Part 2&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/div&gt;&#10;&lt;!--endtoc--&gt;&#10;&lt;p&gt;The puzzle today is akin to that in &lt;a href="https://hieuphay.com/AoC2021-day6/"&gt;day 6&lt;/a&gt;: A naive, recursive implementation works for part 1, but is too intensive for part 2, and requires a different approach.&lt;/p&gt;&#10;&lt;h2 id="part-1"&gt;&#10; Part 1&#10; &lt;a class="heading-link" href="#part-1" aria-labelledby="part-1"&gt;&#10; &lt;i class="fa fa-link" aria-hidden="true"&gt;&lt;/i&gt;&#10; &lt;/a&gt;&#10;&lt;/h2&gt;&#10;&lt;details&gt;&#10;&lt;summary&gt;&#10;Show challenge - day 14, part 1&#10;&lt;/summary&gt;&#10;&lt;div class="details"&gt;&#10;&lt;p&gt;The incredible pressures at this depth are starting to put a strain on your submarine.&#10;The submarine has &lt;a href="https://en.wikipedia.org/wiki/Polymerization"&gt;polymerization&lt;/a&gt; equipment that would produce suitable materials to reinforce the submarine, and the nearby volcanically-active caves should even have the necessary input elements in sufficient quantities.&lt;/p&gt;</description></item><item><title>Advent of Code 2021 in Julia – Day 13: Transparent Origami</title><link>https://hieuphay.com/AoC2021-day13/</link><pubDate>Mon, 13 Dec 2021 00:00:00 +0000</pubDate><guid>https://hieuphay.com/AoC2021-day13/</guid><description>&lt;div class="ox-hugo-toc toc"&gt;&#10;&lt;div&gt;&lt;/div&gt;&#10;&lt;div class="heading"&gt;Table of Contents&lt;/div&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://hieuphay.com/AoC2021-day13/#part-1"&gt;Part 1&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://hieuphay.com/AoC2021-day13/#part-2"&gt;Part 2&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/div&gt;&#10;&lt;!--endtoc--&gt;&#10;&lt;p&gt;Alright! We&amp;rsquo;re halfway through!&#10;The puzzle today is easier than the last, as a &amp;ldquo;monday&amp;rdquo; puzzle would, but it is fun nontheless.&#10;The puzzle format break out from the tradition of &amp;ldquo;compute in this method and return this number.&amp;rdquo;&#10;To solve for the puzzle today, you actually have to visualize to see the output.&lt;/p&gt;&#10;&lt;h2 id="part-1"&gt;&#10; Part 1&#10; &lt;a class="heading-link" href="#part-1" aria-labelledby="part-1"&gt;&#10; &lt;i class="fa fa-link" aria-hidden="true"&gt;&lt;/i&gt;&#10; &lt;/a&gt;&#10;&lt;/h2&gt;&#10;&lt;details&gt;&#10;&lt;summary&gt;&#10;Show challenge - day 13, part 1&#10;&lt;/summary&gt;&#10;&lt;div class="details"&gt;&#10;&lt;p&gt;You reach another volcanically active part of the cave.&#10;It would be nice if you could do some kind of thermal imaging so you could tell ahead of time which caves are too hot to safely enter.&lt;/p&gt;</description></item><item><title>Advent of Code 2021 in Julia – Day 12: Passage Pathing</title><link>https://hieuphay.com/AoC2021-day12/</link><pubDate>Sun, 12 Dec 2021 00:00:00 +0000</pubDate><guid>https://hieuphay.com/AoC2021-day12/</guid><description>&lt;div class="ox-hugo-toc toc"&gt;&#10;&lt;div&gt;&lt;/div&gt;&#10;&lt;div class="heading"&gt;Table of Contents&lt;/div&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://hieuphay.com/AoC2021-day12/#part-1"&gt;Part 1&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://hieuphay.com/AoC2021-day12/#part-2"&gt;Part 2&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/div&gt;&#10;&lt;!--endtoc--&gt;&#10;&lt;p&gt;The puzzle today competely wrecked me!&#10;I spent like three hours on this one.&lt;/p&gt;&#10;&lt;h2 id="part-1"&gt;&#10; Part 1&#10; &lt;a class="heading-link" href="#part-1" aria-labelledby="part-1"&gt;&#10; &lt;i class="fa fa-link" aria-hidden="true"&gt;&lt;/i&gt;&#10; &lt;/a&gt;&#10;&lt;/h2&gt;&#10;&lt;details&gt;&#10;&lt;summary&gt;&#10;Show challenge - day 12, part 1&#10;&lt;/summary&gt;&#10;&lt;div class="details"&gt;&#10;&lt;p&gt;With your submarine&amp;rsquo;s subterranean subsystems subsisting suboptimally, the only way you&amp;rsquo;re getting out of this cave anytime soon is by finding a path yourself.&#10;Not just &lt;strong&gt;a&lt;/strong&gt; path - the only way to know if you&amp;rsquo;ve found the &lt;strong&gt;best&lt;/strong&gt; path is to find &lt;strong&gt;all&lt;/strong&gt; of them.&lt;/p&gt;</description></item><item><title>Advent of Code 2021 in Julia – Day 11: Dumbo Octopus</title><link>https://hieuphay.com/AoC2021-day11/</link><pubDate>Sat, 11 Dec 2021 00:00:00 +0000</pubDate><guid>https://hieuphay.com/AoC2021-day11/</guid><description>&lt;div class="ox-hugo-toc toc"&gt;&#10;&lt;div&gt;&lt;/div&gt;&#10;&lt;div class="heading"&gt;Table of Contents&lt;/div&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://hieuphay.com/AoC2021-day11/#part-1"&gt;Part 1&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://hieuphay.com/AoC2021-day11/#part-2"&gt;Part 2&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/div&gt;&#10;&lt;!--endtoc--&gt;&#10;&lt;p&gt;I like the concept behind the puzzle today.&#10;It&amp;rsquo;s about autonomous synchronization.&#10;It happens in the nature all the time, see &lt;a href="https://ncase.me/fireflies/"&gt;this simulation&lt;/a&gt;.&lt;/p&gt;&#10;&lt;h2 id="part-1"&gt;&#10; Part 1&#10; &lt;a class="heading-link" href="#part-1" aria-labelledby="part-1"&gt;&#10; &lt;i class="fa fa-link" aria-hidden="true"&gt;&lt;/i&gt;&#10; &lt;/a&gt;&#10;&lt;/h2&gt;&#10;&lt;details&gt;&#10;&lt;summary&gt;&#10;Show challenge - day 11, part 1&#10;&lt;/summary&gt;&#10;&lt;div class="details"&gt;&#10;&lt;p&gt;You enter a large cavern full of rare bioluminescent &lt;a href="https://www.youtube.com/watch?v=eih-VSaS2g0"&gt;dumbo octopuses&lt;/a&gt;!&#10;They seem to not like the Christmas lights on your submarine, so you turn them off for now.&lt;/p&gt;</description></item><item><title>Advent of Code 2021 in Julia – Day 10: Syntax Scoring</title><link>https://hieuphay.com/AoC2021-day10/</link><pubDate>Fri, 10 Dec 2021 00:00:00 +0000</pubDate><guid>https://hieuphay.com/AoC2021-day10/</guid><description>&lt;div class="ox-hugo-toc toc"&gt;&#10;&lt;div&gt;&lt;/div&gt;&#10;&lt;div class="heading"&gt;Table of Contents&lt;/div&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://hieuphay.com/AoC2021-day10/#part-1"&gt;Part 1&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://hieuphay.com/AoC2021-day10/#part-2"&gt;Part 2&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/div&gt;&#10;&lt;!--endtoc--&gt;&#10;&lt;p&gt;The puzzle today was sort of interesting, because my solution is quite unique.&#10;Because this puzzle is inspired by real-life &lt;a href="https://code.visualstudio.com/blogs/2021/09/29/bracket-pair-colorization"&gt;bracket pairing problems&lt;/a&gt;, people typically implement an algorithm along that line.&#10;But I was completely oblivious of those algorithm, so I had another approach!&#10;My attempt works fine for this puzzle, but i&amp;rsquo;s probably useless if I want to expand my solution to a full-fledge parser.&lt;/p&gt;</description></item><item><title>Advent of Code 2021 in Julia – Day 9: Smoke Basin</title><link>https://hieuphay.com/AoC2021-day9/</link><pubDate>Thu, 09 Dec 2021 00:00:00 +0000</pubDate><guid>https://hieuphay.com/AoC2021-day9/</guid><description>&lt;div class="ox-hugo-toc toc"&gt;&#10;&lt;div&gt;&lt;/div&gt;&#10;&lt;div class="heading"&gt;Table of Contents&lt;/div&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://hieuphay.com/AoC2021-day9/#part-1"&gt;Part 1&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://hieuphay.com/AoC2021-day9/#part-2"&gt;Part 2&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/div&gt;&#10;&lt;!--endtoc--&gt;&#10;&lt;p&gt;I feel like it&amp;rsquo;s almost everyday that I can say something like:&#10;&amp;ldquo;Oooh, I thought it was going to be easy, but then it&amp;rsquo;s &lt;span class='smallcap'&gt;not&lt;/span&gt;!&amp;rdquo;&#10;Well&amp;hellip; That&amp;rsquo;s certainly the case for today.&lt;/p&gt;&#10;&lt;h2 id="part-1"&gt;&#10; Part 1&#10; &lt;a class="heading-link" href="#part-1" aria-labelledby="part-1"&gt;&#10; &lt;i class="fa fa-link" aria-hidden="true"&gt;&lt;/i&gt;&#10; &lt;/a&gt;&#10;&lt;/h2&gt;&#10;&lt;details&gt;&#10;&lt;summary&gt;&#10;Show challenge - day 9, part 1&#10;&lt;/summary&gt;&#10;&lt;div class="details"&gt;&#10;&lt;p&gt;These caves seem to be &lt;a href="https://en.wikipedia.org/wiki/Lava%5Ftube"&gt;lava tubes&lt;/a&gt;.&#10;Parts are even still volcanically active; small hydrothermal vents release smoke into the caves that slowly settles like rain.&lt;/p&gt;</description></item><item><title>Advent of Code 2021 in Julia – Day 8: Seven Segment Search</title><link>https://hieuphay.com/AoC2021-day8/</link><pubDate>Wed, 08 Dec 2021 00:00:00 +0000</pubDate><guid>https://hieuphay.com/AoC2021-day8/</guid><description>&lt;div class="ox-hugo-toc toc"&gt;&#10;&lt;div&gt;&lt;/div&gt;&#10;&lt;div class="heading"&gt;Table of Contents&lt;/div&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://hieuphay.com/AoC2021-day8/#part-1"&gt;Part 1&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://hieuphay.com/AoC2021-day8/#part-2"&gt;Part 2&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://hieuphay.com/AoC2021-day8/#benchmark"&gt;Benchmark&lt;/a&gt;:ATTACH:&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/div&gt;&#10;&lt;!--endtoc--&gt;&#10;&lt;p&gt;This one is not too hard, but a brain teaser nonetheless.&#10;The key thing I learnt today is that strings in Julia are arrays of characters, so you can use set operators to check for things like &lt;code&gt;&amp;quot;ab&amp;quot; ⊆ &amp;quot;cab&amp;quot;&lt;/code&gt;, which should return &lt;code&gt;true&lt;/code&gt;.&lt;/p&gt;&#10;&lt;h2 id="part-1"&gt;&#10; Part 1&#10; &lt;a class="heading-link" href="#part-1" aria-labelledby="part-1"&gt;&#10; &lt;i class="fa fa-link" aria-hidden="true"&gt;&lt;/i&gt;&#10; &lt;/a&gt;&#10;&lt;/h2&gt;&#10;&lt;details&gt;&#10;&lt;summary&gt;&#10;Show challenge - day 8, part 1&#10;&lt;/summary&gt;&#10;&lt;div class="details"&gt;&#10;&lt;p&gt;You barely reach the safety of the cave when the whale smashes into the cave mouth, collapsing it.&#10;Sensors indicate another exit to this cave at a much greater depth, so you have no choice but to press on.&lt;/p&gt;</description></item><item><title>Advent of Code 2021 in Julia – Day 7: The Treachery of Whales</title><link>https://hieuphay.com/AoC2021-day7/</link><pubDate>Tue, 07 Dec 2021 00:00:00 +0000</pubDate><guid>https://hieuphay.com/AoC2021-day7/</guid><description>&lt;div class="ox-hugo-toc toc"&gt;&#10;&lt;div&gt;&lt;/div&gt;&#10;&lt;div class="heading"&gt;Table of Contents&lt;/div&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://hieuphay.com/AoC2021-day7/#part-1"&gt;Part 1&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://hieuphay.com/AoC2021-day7/#part-2"&gt;Part 2&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/div&gt;&#10;&lt;!--endtoc--&gt;&#10;&lt;p&gt;Today&amp;rsquo;s challenge is quite simple.&#10;Blame Julia for having a good set of defaults.&lt;/p&gt;&#10;&lt;h2 id="part-1"&gt;&#10; Part 1&#10; &lt;a class="heading-link" href="#part-1" aria-labelledby="part-1"&gt;&#10; &lt;i class="fa fa-link" aria-hidden="true"&gt;&lt;/i&gt;&#10; &lt;/a&gt;&#10;&lt;/h2&gt;&#10;&lt;details&gt;&#10;&lt;summary&gt;&#10;Show challenge - day 7, part 1&#10;&lt;/summary&gt;&#10;&lt;div class="details"&gt;&#10;&lt;p&gt;A giant &lt;a href="https://en.wikipedia.org/wiki/Sperm%5Fwhale"&gt;whale&lt;/a&gt; has decided your submarine is its next meal, and it&amp;rsquo;s much faster than you are.&#10;There&amp;rsquo;s nowhere to run!&lt;/p&gt;&#10;&lt;p&gt;Suddenly, a swarm of crabs (each in its own tiny submarine - it&amp;rsquo;s too deep for them otherwise) zooms in to rescue you!&#10;They seem to be preparing to blast a hole in the ocean floor; sensors indicate a &lt;strong&gt;massive underground cave system&lt;/strong&gt; just beyond where they&amp;rsquo;re aiming!&lt;/p&gt;</description></item><item><title>Advent of Code 2021 in Julia – Day 6: Lanternfish</title><link>https://hieuphay.com/AoC2021-day6/</link><pubDate>Mon, 06 Dec 2021 00:00:00 +0000</pubDate><guid>https://hieuphay.com/AoC2021-day6/</guid><description>&lt;div class="ox-hugo-toc toc"&gt;&#10;&lt;div class="heading"&gt;Table of Contents&lt;/div&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://hieuphay.com/AoC2021-day6/#part-1"&gt;Part 1&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://hieuphay.com/AoC2021-day6/#part-2"&gt;Part 2&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://hieuphay.com/AoC2021-day6/#bonus-boids-simulation"&gt;Bonus: Boids simulation&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/div&gt;&#10;&lt;!--endtoc--&gt;&#10;&lt;p&gt;The problem today is a bit of a breather. (Puzzles are easier on weekdays.)&#10;Still, I fell right into their trap!&#10;But it&amp;rsquo;s alright.&#10;In fact, I really like this puzzle, because I had tons of fun toying with its visualization!&lt;/p&gt;&#10;&lt;h2 id="part-1"&gt;&#10; Part 1&#10; &lt;a class="heading-link" href="#part-1" aria-labelledby="part-1"&gt;&#10; &lt;i class="fa fa-link" aria-hidden="true"&gt;&lt;/i&gt;&#10; &lt;/a&gt;&#10;&lt;/h2&gt;&#10;&lt;details&gt;&#10;&lt;summary&gt;Show challenge - day 6, part 1&lt;/summary&gt;&#10;&lt;div class="details"&gt;&#10;&lt;p&gt;The sea floor is getting steeper.&#10;Maybe the sleigh keys got carried this way?&lt;/p&gt;</description></item><item><title>Advent of Code 2021 in Julia – Day 5: Hydrothermal Venture</title><link>https://hieuphay.com/AoC2021-day5/</link><pubDate>Sun, 05 Dec 2021 00:00:00 +0000</pubDate><guid>https://hieuphay.com/AoC2021-day5/</guid><description>&lt;div class="ox-hugo-toc toc"&gt;&#10;&lt;div&gt;&lt;/div&gt;&#10;&lt;div class="heading"&gt;Table of Contents&lt;/div&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://hieuphay.com/AoC2021-day5/#part-1"&gt;Part 1&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://hieuphay.com/AoC2021-day5/#part-2"&gt;Part 2&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://hieuphay.com/AoC2021-day5/#bonus-animations"&gt;Bonus: Animations!&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/div&gt;&#10;&lt;!--endtoc--&gt;&#10;&lt;p&gt;I thought the challenge today would be easy, but in the end I spent too much time on it.&#10;Around halfway through I realized that I forgot to offset the index, because Julia indexes begin at 1 instead of 0.&#10;On the other hand, I learnt how slurping and splatting with &lt;code&gt;...&lt;/code&gt; works, which provide shorthand for &amp;ldquo;unwrapping&amp;rdquo; arrays, to be used inside functions.&lt;/p&gt;</description></item><item><title>Advent of Code 2021 in Julia – Day 4: Giant Squid</title><link>https://hieuphay.com/AoC2021-day4/</link><pubDate>Sat, 04 Dec 2021 00:00:00 +0000</pubDate><guid>https://hieuphay.com/AoC2021-day4/</guid><description>&lt;div class="ox-hugo-toc toc"&gt;&#10;&lt;div&gt;&lt;/div&gt;&#10;&lt;div class="heading"&gt;Table of Contents&lt;/div&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://hieuphay.com/AoC2021-day4/#part-1"&gt;Part 1&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://hieuphay.com/AoC2021-day4/#part-2"&gt;Part 2&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/div&gt;&#10;&lt;!--endtoc--&gt;&#10;&lt;p&gt;The challenge today is a bigger one.&#10;You basically have to write a Bingo verifier.&#10;It&amp;rsquo;s the first one that I had to resort to importing another library (&lt;code&gt;DelimitedFiles&lt;/code&gt;), but I would argue that because &lt;code&gt;DelimitedFiles&lt;/code&gt; is bundled within Julia installation, it&amp;rsquo;s not a cheat ;)&#10;The library did not play any role in the meat of the puzzle anyway.&lt;/p&gt;&#10;&lt;h2 id="part-1"&gt;&#10; Part 1&#10; &lt;a class="heading-link" href="#part-1" aria-labelledby="part-1"&gt;&#10; &lt;i class="fa fa-link" aria-hidden="true"&gt;&lt;/i&gt;&#10; &lt;/a&gt;&#10;&lt;/h2&gt;&#10;&lt;details&gt;&#10;&lt;summary&gt;&#10;Show challenge - day 4, part 1&#10;&lt;/summary&gt;&#10;&lt;div class="details"&gt;&#10;&lt;p&gt;You&amp;rsquo;re already almost 1.5km (almost a mile) below the surface of the ocean, already so deep that you can&amp;rsquo;t see any sunlight. What you &lt;strong&gt;can&lt;/strong&gt; see, however, is a giant squid that has attached itself to the outside of your submarine.&lt;/p&gt;</description></item><item><title>Advent of Code 2021 in Julia – Day 3: Binary Diagnostic</title><link>https://hieuphay.com/AoC2021-day3/</link><pubDate>Fri, 03 Dec 2021 00:00:00 +0000</pubDate><guid>https://hieuphay.com/AoC2021-day3/</guid><description>&lt;div class="ox-hugo-toc toc"&gt;&#10;&lt;div&gt;&lt;/div&gt;&#10;&lt;div class="heading"&gt;Table of Contents&lt;/div&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://hieuphay.com/AoC2021-day3/#part-1"&gt;Part 1&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://hieuphay.com/AoC2021-day3/#part-2"&gt;Part 2&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/div&gt;&#10;&lt;!--endtoc--&gt;&#10;&lt;p&gt;It&amp;rsquo;s getting interesting!&#10;Today&amp;rsquo;s problem got me stucked for a while &amp;ndash; mainly because I didn&amp;rsquo;t read the question closely enough.&#10;For this excercise I work with matrices, which Julia handles really well.&lt;/p&gt;&#10;&lt;h2 id="part-1"&gt;&#10; Part 1&#10; &lt;a class="heading-link" href="#part-1" aria-labelledby="part-1"&gt;&#10; &lt;i class="fa fa-link" aria-hidden="true"&gt;&lt;/i&gt;&#10; &lt;/a&gt;&#10;&lt;/h2&gt;&#10;&lt;details&gt;&#10;&lt;summary&gt;&#10;Show challenge - day 3, part 1&#10;&lt;/summary&gt;&#10;&lt;div class="details"&gt;&#10;&lt;p&gt;The submarine has been making some odd creaking noises, so you ask it to produce a diagnostic report just in case.&lt;/p&gt;</description></item><item><title>Advent of Code 2021 in Julia – Day 2: Dive!</title><link>https://hieuphay.com/AoC2021-day2/</link><pubDate>Thu, 02 Dec 2021 00:00:00 +0000</pubDate><guid>https://hieuphay.com/AoC2021-day2/</guid><description>&lt;div class="ox-hugo-toc toc"&gt;&#10;&lt;div&gt;&lt;/div&gt;&#10;&lt;div class="heading"&gt;Table of Contents&lt;/div&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://hieuphay.com/AoC2021-day2/#part-1"&gt;Part 1&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://hieuphay.com/AoC2021-day2/#part-2"&gt;Part 2&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/div&gt;&#10;&lt;!--endtoc--&gt;&#10;&lt;h2 id="part-1"&gt;&#10; Part 1&#10; &lt;a class="heading-link" href="#part-1" aria-labelledby="part-1"&gt;&#10; &lt;i class="fa fa-link" aria-hidden="true"&gt;&lt;/i&gt;&#10; &lt;/a&gt;&#10;&lt;/h2&gt;&#10;&lt;details&gt;&#10;&lt;summary&gt;&#10;Show challenge - day 2, part 1&#10;&lt;/summary&gt;&#10;&lt;div class="details"&gt;&#10;&lt;p&gt;Now, you need to figure out how to pilot this thing.&lt;/p&gt;&#10;&lt;p&gt;It seems like the submarine can take a series of commands like forward 1, down 2, or up 3:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;forward X increases the horizontal position by X units.&lt;/li&gt;&#10;&lt;li&gt;down X increases the depth by X units.&lt;/li&gt;&#10;&lt;li&gt;up X decreases the depth by X units.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Note that since you&amp;rsquo;re on a submarine, down and up affect your depth, and so they have the opposite result of what you might expect.&lt;/p&gt;</description></item><item><title>Advent of Code 2021 in Julia – Day 1: Sonar Sweep</title><link>https://hieuphay.com/AoC2021-day1/</link><pubDate>Wed, 01 Dec 2021 00:00:00 +0000</pubDate><guid>https://hieuphay.com/AoC2021-day1/</guid><description>&lt;div class="ox-hugo-toc toc"&gt;&#10;&lt;div&gt;&lt;/div&gt;&#10;&lt;div class="heading"&gt;Table of Contents&lt;/div&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://hieuphay.com/AoC2021-day1/#part-1"&gt;Part 1:&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://hieuphay.com/AoC2021-day1/#part-2"&gt;Part 2&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/div&gt;&#10;&lt;!--endtoc--&gt;&#10;&lt;p&gt;This is my attempt to the &lt;a href="https://adventofcode.com/2021/about"&gt;Advent of Code&lt;/a&gt; challenge.&#10;It is a yearly event where you solve coding puzzles every day from December 1st until December 25th.&#10;The puzzles are not too hard or technical, and you can use any language you like to solve them &amp;ndash; a perfect opportunity for me to learn a new language.&#10;And who can turn down some fun puzzles anyway?&lt;/p&gt;</description></item><item><title>GRE Quant difficulty</title><link>https://hieuphay.com/GRE-Quant/</link><pubDate>Thu, 21 Oct 2021 00:00:00 +0000</pubDate><guid>https://hieuphay.com/GRE-Quant/</guid><description>&lt;p&gt;I took the test yesterday and got an unofficial results of 170Q 159V.&lt;/p&gt;&#10;&lt;p&gt;Some people said that &lt;span class='smallcap'&gt;ets&lt;/span&gt; recently increased their quant difficulty, but I don&amp;rsquo;t think that&amp;rsquo;s really the case.&#10;Here&amp;rsquo;s what I felt:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;The knowledge required to answer the questions are the same. This is obvious and should be expected.&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;The complexity (as in the time it takes to answer questions) are roughly the same. I took an official mock test only 5 days before the real test. In both attempts, it took me ~28 minutes to complete the first Q section and ~33 minutes to complete the second, harder Q section. I am confident in math so pressure is not a relevant factor here.&lt;/p&gt;</description></item><item><title>Site functionality demo</title><link>https://hieuphay.com/en/blog/org-demo/</link><pubDate>Sun, 28 Mar 2021 00:00:00 +0000</pubDate><guid>https://hieuphay.com/en/blog/org-demo/</guid><description>&lt;div class="ox-hugo-toc toc has-section-numbers"&gt;&#10;&lt;div class="heading"&gt;Table of Contents&lt;/div&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;span class="section-num"&gt;1&lt;/span&gt; &lt;a href="https://hieuphay.com/en/blog/org-demo/#this-is-the-highest-level-not-accounting-for-the-title"&gt;This is the highest level, not accounting for the title&lt;/a&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;span class="section-num"&gt;1.1&lt;/span&gt; &lt;a href="https://hieuphay.com/en/blog/org-demo/#the-second-heading-most-common-ones"&gt;The second heading - most common ones&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&lt;span class="section-num"&gt;2&lt;/span&gt; &lt;a href="https://hieuphay.com/en/blog/org-demo/#text-features"&gt;Text features&lt;/a&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;span class="section-num"&gt;2.1&lt;/span&gt; &lt;a href="https://hieuphay.com/en/blog/org-demo/#i-can-eat-glass"&gt;I can eat glass&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;span class="section-num"&gt;2.2&lt;/span&gt; &lt;a href="https://hieuphay.com/en/blog/org-demo/#blockquotes"&gt;Blockquotes&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;span class="section-num"&gt;2.3&lt;/span&gt; &lt;a href="https://hieuphay.com/en/blog/org-demo/#notices"&gt;Notices&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;span class="section-num"&gt;2.4&lt;/span&gt; &lt;a href="https://hieuphay.com/en/blog/org-demo/#code"&gt;Code&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;span class="section-num"&gt;2.5&lt;/span&gt; &lt;a href="https://hieuphay.com/en/blog/org-demo/#details"&gt;Details&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&lt;span class="section-num"&gt;3&lt;/span&gt; &lt;a href="https://hieuphay.com/en/blog/org-demo/#media-embeddings"&gt;Media embeddings&lt;/a&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;span class="section-num"&gt;3.1&lt;/span&gt; &lt;a href="https://hieuphay.com/en/blog/org-demo/#fullwidth-image"&gt;Fullwidth image&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;span class="section-num"&gt;3.2&lt;/span&gt; &lt;a href="https://hieuphay.com/en/blog/org-demo/#instagram"&gt;Instagram&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&lt;span class="section-num"&gt;4&lt;/span&gt; &lt;a href="https://hieuphay.com/en/blog/org-demo/#shortcodes"&gt;Shortcodes&lt;/a&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;span class="section-num"&gt;4.1&lt;/span&gt; &lt;a href="https://hieuphay.com/en/blog/org-demo/#list-tag"&gt;List tag&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;span class="section-num"&gt;4.2&lt;/span&gt; &lt;a href="https://hieuphay.com/en/blog/org-demo/#tabs"&gt;Tabs&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;span class="section-num"&gt;4.3&lt;/span&gt; &lt;a href="https://hieuphay.com/en/blog/org-demo/#mermaid"&gt;Mermaid&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;span class="section-num"&gt;4.4&lt;/span&gt; &lt;a href="https://hieuphay.com/en/blog/org-demo/#icons"&gt;Icons&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/div&gt;&#10;&lt;!--endtoc--&gt;&#10;&lt;hr&gt;&#10;&lt;h2 id="this-is-the-highest-level-not-accounting-for-the-title"&gt;&#10; &lt;span class="section-num"&gt;1&lt;/span&gt; This is the highest level, not accounting for the title&#10; &lt;a class="heading-link" href="#this-is-the-highest-level-not-accounting-for-the-title" aria-labelledby="this-is-the-highest-level-not-accounting-for-the-title"&gt;&#10; &lt;i class="fa fa-link" aria-hidden="true"&gt;&lt;/i&gt;&#10; &lt;/a&gt;&#10;&lt;/h2&gt;&#10;&lt;h3 id="the-second-heading-most-common-ones"&gt;&#10; &lt;span class="section-num"&gt;1.1&lt;/span&gt; The second heading - most common ones&#10; &lt;a class="heading-link" href="#the-second-heading-most-common-ones" aria-labelledby="the-second-heading-most-common-ones"&gt;&#10; &lt;i class="fa fa-link" aria-hidden="true"&gt;&lt;/i&gt;&#10; &lt;/a&gt;&#10;&lt;/h3&gt;&#10;&lt;h4 id="the-post-should-be-comprehendship-when-this-shows-up"&gt;&#10; &lt;span class="section-num"&gt;1.1.1&lt;/span&gt; The post should be comprehendship when this shows up&#10; &lt;a class="heading-link" href="#the-post-should-be-comprehendship-when-this-shows-up" aria-labelledby="the-post-should-be-comprehendship-when-this-shows-up"&gt;&#10; &lt;i class="fa fa-link" aria-hidden="true"&gt;&lt;/i&gt;&#10; &lt;/a&gt;&#10;&lt;/h4&gt;&#10;&lt;!--list-separator--&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Another level? Are you mad?&lt;/p&gt;</description></item><item><title>Batch translations via Google Translate</title><link>https://hieuphay.com/en/blog/2020-10-30_google-translation/</link><pubDate>Fri, 30 Oct 2020 00:00:00 +0000</pubDate><guid>https://hieuphay.com/en/blog/2020-10-30_google-translation/</guid><description>&lt;p&gt;Slightly related to my &lt;a href="https://hieuphay.com/en/blog/2020-10-01_python-polyglot-detect-and-tokenize/"&gt;previous post&lt;/a&gt;, one of my tasks today was to translate a list of keywords into different languages. The inputs I received generally looks something like below. There were many more, but I truncated the bulk of it to provide a simpler example:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- Institutions: disputes, grievance, court, penal, judicial, prosecutorial, punishment, lawyer, attorney&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- Infrastructure: railways, traffic, trucks, cars, vehicles, road, taxi, public transportation, port, logistics, collision, passenger&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;[...]&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="reshape-the-text-into-a-processible-format"&gt;&#10; Reshape the text into a processible format&#10; &lt;a class="heading-link" href="#reshape-the-text-into-a-processible-format" aria-labelledby="reshape-the-text-into-a-processible-format"&gt;&#10; &lt;i class="fa fa-link" aria-hidden="true"&gt;&lt;/i&gt;&#10; &lt;/a&gt;&#10;&lt;/h2&gt;&#10;&lt;p&gt;Firstly, I need to transform these texts into a better format. A good text editor certainly helps. I was able to quickly convert these texts into &lt;code&gt;csv&lt;/code&gt; format, using Emacs&amp;rsquo; macro functionality and Vi&amp;rsquo;s keybindings.&lt;/p&gt;</description></item><item><title>Notes on using Python for language detection and tokenization</title><link>https://hieuphay.com/en/blog/2020-10-01_python-polyglot-detect-and-tokenize/</link><pubDate>Thu, 01 Oct 2020 00:00:00 +0000</pubDate><guid>https://hieuphay.com/en/blog/2020-10-01_python-polyglot-detect-and-tokenize/</guid><description>&lt;p&gt;My upcoming works involves some text analysis so I&amp;rsquo;m exploring some of the available tools in Python. Today I tested some of the basic operations with the &lt;code&gt;polyglot&lt;/code&gt; package.&lt;/p&gt;&#10;&lt;h2 id="installation"&gt;&#10; Installation&#10; &lt;a class="heading-link" href="#installation" aria-labelledby="installation"&gt;&#10; &lt;i class="fa fa-link" aria-hidden="true"&gt;&lt;/i&gt;&#10; &lt;/a&gt;&#10;&lt;/h2&gt;&#10;&lt;p&gt;Following the &lt;a href="https://polyglot.readthedocs.io/en/latest/Installation.html"&gt;installation instructions&lt;/a&gt;, I install the dependencies for &lt;code&gt;polyglot&lt;/code&gt; on my Ubuntu 20.04 machine with:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo apt-get install python-numpy libicu-dev&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;But I still got an &lt;code&gt;ModuleNotFoundError&lt;/code&gt; for &lt;code&gt;icu&lt;/code&gt; when I try to import &lt;code&gt;polyglot&lt;/code&gt; in, so I fixed this by installing the module with &lt;code&gt;pip&lt;/code&gt;:&lt;/p&gt;</description></item><item><title>Anki burnout</title><link>https://hieuphay.com/anki-burntout/</link><pubDate>Thu, 07 May 2020 00:00:00 +0000</pubDate><guid>https://hieuphay.com/anki-burntout/</guid><description>&lt;p&gt;I have been learning Hanzi characters (actually, more like Sino-Vietnamese) as a hobby since the beginning of this year. Last year, when I helped one of my colleages with learning &lt;span class='smallcap'&gt;gre&lt;/span&gt; vocabulary, the interest for Anki sparked again in me and I started working on my Hanzi deck.&lt;/p&gt;&#10;&lt;p&gt;In order to make learning fun (or maybe just less tedious), I practiced the habit to wake up at 6am everyday to do my Anki reviews. This takes approximately 30 minutes each day, and I am rewarded with a positive sensation after having learned something to start off the day. It was great.&lt;/p&gt;</description></item><item><title>Writing LaTeX PDF documents using Emacs Org-Mode</title><link>https://hieuphay.com/export-orgmode-latex/</link><pubDate>Thu, 17 May 2018 05:47:23 +0700</pubDate><guid>https://hieuphay.com/export-orgmode-latex/</guid><description>&lt;p&gt;I love &lt;a href="https://www.gnu.org/software/emacs/"&gt;Emacs&lt;/a&gt;. It is a programmable text editor that streamlined many of my workflows. Nowadays, I do most of my computer-related tasks via Emacs, and writing is one of them.&lt;/p&gt;&#10;&lt;p&gt;&lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mtext&gt;LaTeX&lt;/mtext&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\LaTeX&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;span class="katex-html" aria-hidden="true"&gt;&lt;span class="base"&gt;&lt;span class="strut" style="height:0.8988em;vertical-align:-0.2155em;"&gt;&lt;/span&gt;&lt;span class="mord text"&gt;&lt;span class="mord textrm"&gt;L&lt;/span&gt;&lt;span class="mspace" style="margin-right:-0.36em;"&gt;&lt;/span&gt;&lt;span class="vlist-t"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist" style="height:0.6833em;"&gt;&lt;span style="top:-2.905em;"&gt;&lt;span class="pstrut" style="height:2.7em;"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord textrm mtight sizing reset-size6 size3"&gt;A&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mspace" style="margin-right:-0.15em;"&gt;&lt;/span&gt;&lt;span class="mord text"&gt;&lt;span class="mord textrm"&gt;T&lt;/span&gt;&lt;span class="mspace" style="margin-right:-0.1667em;"&gt;&lt;/span&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist" style="height:0.4678em;"&gt;&lt;span style="top:-2.7845em;"&gt;&lt;span class="pstrut" style="height:3em;"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord textrm"&gt;E&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist" style="height:0.2155em;"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mspace" style="margin-right:-0.125em;"&gt;&lt;/span&gt;&lt;span class="mord textrm"&gt;X&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; is the industry standard when it comes to publishing scientific documents. The problem is, sometimes writing &lt;code&gt;.tex&lt;/code&gt; documents can be tedious due to LaTeX&amp;rsquo;s complicated syntax. That is why I use simpler markup formats (like &lt;code&gt;.org&lt;/code&gt; or &lt;code&gt;.markdown&lt;/code&gt;) to write documents, convert them to &lt;code&gt;.tex&lt;/code&gt; and later compile the converted &lt;code&gt;.tex&lt;/code&gt; into &lt;span class='acr'&gt;pdf&lt;/span&gt; files.&lt;/p&gt;</description></item><item><title>A bubbly look at the Bitcoin bubble</title><link>https://hieuphay.com/bitcoin-bubble-plot/</link><pubDate>Tue, 02 Jan 2018 00:00:00 +0000</pubDate><guid>https://hieuphay.com/bitcoin-bubble-plot/</guid><description>&lt;p&gt;2017 was an insane year in the cryptocurrency world as bitcoin and other cryptocurrencies (so-called &lt;em&gt;altcoins&lt;/em&gt;) caught the attention of mainstream media.&#10;This is associated to the fact that Bitcoin and other cryptos&amp;rsquo; prices surged exponentially in a historically short period.&#10;Bitcoin went from less than 1000 &lt;span class='smallcap'&gt;usd&lt;/span&gt; per coin in January 2017 to 13500 &lt;span class='smallcap'&gt;usd&lt;/span&gt; by the end of the year, with its peak even reached 20000 at sometime during December.&lt;/p&gt;</description></item></channel></rss>