From 8821cc8fa6ac2e04fd2915c9ee16b44431bc9764 Mon Sep 17 00:00:00 2001 From: Sameer Rahmani Date: Wed, 14 Apr 2021 00:33:30 +0100 Subject: [PATCH] Update the recent posts on serene --- build.el | 17 ---- orgs/essays/beyond-the-big-bang.org | 31 +++++++ .../dark-matter-and-other-life-forms.org | 27 +++++++ orgs/essays/fatty-liver.org | 69 ++++++++++++++++ orgs/essays/serene-on-llvm.org | 81 +++++++++++++++++++ orgs/index.org | 15 ++-- orgs/sitemap.inc | 6 ++ thoughts.org | 7 ++ 8 files changed, 230 insertions(+), 23 deletions(-) create mode 100644 orgs/essays/beyond-the-big-bang.org create mode 100644 orgs/essays/dark-matter-and-other-life-forms.org create mode 100644 orgs/essays/fatty-liver.org create mode 100644 orgs/essays/serene-on-llvm.org create mode 100644 thoughts.org diff --git a/build.el b/build.el index 50a79b1..48ded57 100755 --- a/build.el +++ b/build.el @@ -256,23 +256,6 @@ Not pages." (setf org-html-link-home "") (setf org-html-scripts "") - ;; (org-babel-do-load-languages - ;; 'org-babel-load-languages - ;; '( - ;; (emacs-lisp . t) - ;; (org . t) - ;; (shell . t) - ;; (C . t) - ;; (python . t) - ;; (clojure .t) - ;; (lisp . t) - ;; (js . t) - ;; (awk . t))) - - ;; ;; Never export the code block evaluation - ;; (setq org-babel-default-header-args '((:eval . "never-export"))) - ;; (setq org-src-fontify-natively t) - (let ((build-dir (from-root "/build/")) (base-url (if (prod-p) "https://lxsameer.com" "http://localhost:3003"))) (copy-template (from-root "/templates/index.org") diff --git a/orgs/essays/beyond-the-big-bang.org b/orgs/essays/beyond-the-big-bang.org new file mode 100644 index 0000000..27be96a --- /dev/null +++ b/orgs/essays/beyond-the-big-bang.org @@ -0,0 +1,31 @@ +#+SETUPFILE: ../../config.org +#+TAGS: Physics(p) Thoughts(t) Astrophysics(a) +#+CATEGORY: Life +#+DATE: 2021-04-04 +#+TITLE: Beyond the big bang +#+DESC: My random thoughts on before the big bang +#+INCLUDE: ../../thoughts.org + +*** I was thinking ... :Physics:Thoughts:Astrophysics: + Today, [[https://pouyacode.net/][Pouya]] and I were talking randomly about the Doppler Effect on light and whether it causes + color shift or not (Spoiler alert, [[https://www.thoughtco.com/doppler-effect-in-light-red-shift-and-blue-shift-2699033][it does]]) and how the universe was before the big bang. + + After our discussion and during my workout and the post workout shower I couldn't stop thinking + about the universe before the big bang. What if the big bang is just another event in the universe, + a big big one, some thing that makes an ultra nova like zit pop in the scale of the universe ? + I mean what if there are more galaxies an objects in the universe, way way further out from the visible + universe of the stuff resulted from the big bang ? what if their gravitational forces are the reason + the universe as we know it is expanding ? If such entities exist, how they came to exist ? Do they + follow the same principles as our universe ? What a sec, is that the multiverse with no boundaries ? + + Some people believe that the universe is on the surface of sphere, which means one day the light from out + own past will reach us by cycling around the giant sphere. In that case what makes the inside of the sphere ? + + Who says that the universe has to have only 4 dimensions ? Many theories suggest higher dimensions. What if + the big bang is just a big big event in our visible dimensions which gave birth to our world but the universe + used to exist in other dimensions ? What if the dark energy is in fact the gravitational pull caused by entities + in other dimensions which we can't see. What if the vacuum effect in the quantum field theory is the ripples + made from event or objects in other dimensions ???? + + Well I just stood in the shower under the downfall of hot water and lost into my thoughts till the water started + to get cold and ruined my chain of thoughts :)). diff --git a/orgs/essays/dark-matter-and-other-life-forms.org b/orgs/essays/dark-matter-and-other-life-forms.org new file mode 100644 index 0000000..5d2c1dc --- /dev/null +++ b/orgs/essays/dark-matter-and-other-life-forms.org @@ -0,0 +1,27 @@ +#+SETUPFILE: ../../config.org +#+TAGS: Physics(p) Thoughts(t) +#+CATEGORY: Life +#+DATE: 2021-03-16 +#+TITLE: Dark matter and other life forms +#+DESC: My random thoughts on dark matter + +#+INCLUDE: ../../thoughts.org + +*** I was thinking ... :Physics:Thoughts: + about dark matter a bit earlier today. We know that the ordinary matter counts for +~5% of the mass of the universe and the rest is kinda on dark matter's shoulders. It doesn't +interact with light and in our knowledge almost with anything else as well yet it's there and +it's massive. We know that neutrinos which are very weakly interacting, electrically neutral particles +are part of the entity or thing that we call the "dark matter". But since it has very little mass +it would only take a relatively small amount of mass to account for all the dark matter out there. + +Anyway, I was thinking that we exist because of the asymmetry of matter and anit-matter and the +matter that creates us and the entire 4.5 billion years history of the earth is just about 5% of the +universe. Galaxies that look like a disk to us in fact are more like spheres that the rest of the sphere +is fill with the dark matter. What if the rest of a galaxy that we can't see is no just random dark +matter, I mean what if there are more to a galaxy rather that the starts that we see? what if there are +planetary systems made out of the dark matter ? What if these planetary systems grew their own life form +via evolution? A life form that doesn't interact with ordinary matter (ordinary to us) and light ? +How they might be ? How we might ever learn about them ? + +"As always these thoughts baffles me. I have to look into it." diff --git a/orgs/essays/fatty-liver.org b/orgs/essays/fatty-liver.org new file mode 100644 index 0000000..ca890df --- /dev/null +++ b/orgs/essays/fatty-liver.org @@ -0,0 +1,69 @@ +#+SETUPFILE: ../../config.org +#+TAGS: Life(l) Health(h) +#+CATEGORY: Life +#+DATE: 2013-10-29 +#+TITLE: Fatty Liver +#+DESC: My findings on a fatty liver + +#+BEgIN_QUOTE +*Disclaimer*: In no way, I'm an expert in medicine or medical science. I wrote this informal essay based +on my research in order to help myself. Read it with a grain of salt. Consult a doctor and do you own research +as well. +#+END_QUOTE + +#+BEGIN_QUOTE +This post has survived several rewrites of my website. Sadly, I've lost the references for my research. +#+END_QUOTE + +Years ago I used to be a professional basketball player, playing as a point guard. Some day, I broke my foot +in a match and I had to stay home for about 6 month. Back then, I thought eating more food equals to a +faster recovery from my injury ( Yeah I know I was young ). Before the injury, I was about 73Kg, and +after, I turned into a 117Kg ( Wow I knooww) monster. + +Long story short afterward I tried really hard to lose weight, I couldn't lose a considerable amount of weight. +As may most of you experienced before, might lose weight in while we're on a diet, but the lost weight will find +its way back when the diet finishes. + +After 3 years of that incident, I started *Kyokushin Karate*, one of the most brutal, heavy and tough sports +possible. Also I was in a diet most of the time. I lost weight a lot but as soon as I ended the diet, I +gained that lost weight again. I always was curious why is that ? Why as soon as I end the diet I gain weight +again even though I'm trying really hard. A week ago I found out the truth behind this problem.The liver, +is the most important body part responsible for storing extra energy of food as fat, and burn fat and +produce energy when body needs it. In this era, when people eat fast foods, breath poisonous air pollution +instead of clean air and lots of other reasons, Most of us are suffering from a fatty liver in different +levels. A fatty liver can't do its job perfectly, So it can't burn fat correctly and that's because +after a diet people gains weight again. No matter how hard they try. + +* OK, now what's can we do ? :Life:Health: +First of all, physical workout and training is very helpful for your liver and help you burn more fat. +Second of all fatty liver have much more fat stored in its cells which causes huge damage to the liver. +In order to heal the damaged cells, there are several drugs and medicines which you should take, For example: + +- Vitamin E +- Selenium +- Betaine +- Metformin +- Rosiglitazone +- Pioglitazone + +Using these medicines we can easily heal our liver cells within a 3 month period. Also there is an other +material which has a really incredible effect. [[https://en.wikipedia.org/wiki/Silybum_marianum][Silybum marianum]] is a kinda rare plant which grows mostly in +dry places. Silybum marianum is one of the well known rich sources for milk thistle. + +Research suggests that milk thistle extracts both prevents and repairs damage to the liver from toluene and/or +xylene. Workers who had been exposed to vapors from toluene and/or xylene for 5–20 years were given either +a standardized milk thistle extract (80% silymarin) or placebo for 30 days. The workers took the milk thistle +extract, showed significant improvement in their liver function tests (ALT and AST) and platelet counts vs +the placebo group. + +LiverGol is a commercial supplement which contains a great deal of Silybum marianum. There isn't any known +side effect for this supplement[fn:1][fn:2]. I easily healed my liver using. + +I tried to summarize everything and avoid blabbing, So long story short the key to a successful diet +is to have a healthy liver. + + +----- + +[fn:1] At least I couldn't find any side effect. +[fn:2] I don't have any affiliation with the company behind LiverGol. diff --git a/orgs/essays/serene-on-llvm.org b/orgs/essays/serene-on-llvm.org new file mode 100644 index 0000000..bf0e5a3 --- /dev/null +++ b/orgs/essays/serene-on-llvm.org @@ -0,0 +1,81 @@ +#+SETUPFILE: ../../config.org +#+TAGS: Serene Languages +#+CATEGORY: Engineering +#+DATE: 2021-04-13 +#+TITLE: Serene on the LLVM +#+DESC: The rational behind Serene + + +As you may know, I'm trying to build [[./my-new-programming-language.org][my new programming language]], after a ton of study and many experiments, I finally made +the decision on what platform I'll target for *Serene*. Here are the history and the +rational behind this decision. + +* A little bit of history :Languages:Serene: + After the initial effort on [[./choosing-the-target-platform.org][choosing the right platform]]. I studied a bit about the + GraalVM and experiment with it. While it's a nice tool and I see a bright future for + it, I wasn't happy with some aspects of it. The most important one being the fact + that Oracle is behind it (Why? Well, don't open that door :D) and some other technical + reasons which I get to them later. So I looked around again and re-evaluated my + choices. I came across the [[https://llvm.org][LLVM]]. Previously I didn't pay much attention to the LLVM because + I was blinded by the *GraalVM* and the fact the both work the same theoretically. I mean + using both, we need to create the compiler frontend and they would take care of the + backend for us (more or less). Initially, one of the reasons why I've picked the *GraalVM* + over *LLVM* was due to its support for the *LLVM* itself, and it seemed obvious that + later on we can bridge the LLVM world to *Serene*'s world via *GraalVM*. But It was + quite the opposite. + + This time, I looked into the *LLVM* more thoroughly and boy I was (still am) Impressed, + well designed tools and libraries to build a compiler. In compare to the *GraalVM* it + is very mature, well documented and quite modular. Aaand using the *LLVM* I still can + use *GraalVM* via its support for LLVM IR. Long story short the more I've read + about *LLVM* the more I got obsessed with it. So I've decide to move away from *GraalVM* + and start playing with *LLVM*. + + +* The challenge of the language again + With moving away from the *GraalVM*, I had to choose a host language again. While the + official language of the **LLVM* is *C++* I tried to avoid it, since I'm not skilled + enough in *C++*, So after a series of experiments (which all of them are available + in dedicated branches on the repo) I tried, *Rust*, *C*, *C++* (First attempt) and *Golang*. + I wrote the parser and an interpreter as an experiment and also to evaluate the + facilities of the language when it comes to working with the **LLVM API**. After many + iterations, I ended up using *Golang* to create an interpreter with a *FFI* interface + so we can write the compiler in *Serene* itself. + + At the same time I started a journey into mathematics to learn more about the + different type systems in theory and different options that we might have for *Serene* + (I'll write about that separately in the future). Most of my day went to my studies + and I felt really good. But I always had a voice in my head that kept bugging me about + [[https://mlir.llvm.org][MLIR]]. I kinda watched a few introductory talks on it before and I had a rough idea + about what it is and what it does. In order to shut that voice up, I've decided to + look it up and read more about it, while I'm blocked by my math study and to my surprise, + it totally blew me away. MLIR is such a brilliant tool, made out of the experience + gained in making several languages and compilers, and follows some conventional and + well designed principles to build intermediate representation languages. + + After I read more and more about the *MLIR* which by the way it's a sub project + of the *LLVM*, I still firmly believed that using *Golang* with should create + an interpreter as a bootstrap language an then provide a FFI interface via + the interpreter to use *MLIR*'s *C API* to interact with it. How naive I was. + + During the course of my study on *MLIR*, I came across a beautiful thing called + [[https://llvm.org/docs/TableGen/][TableGen]]. It's part of the LLVM and designed to generate *C++* based on some + description in general. It's a generic tool which developers write backends + for, in order to generate code for specific purposes and in the case of + *MLIR* to generate IR [[https://mlir.llvm.org/docs/Dialects/LLVM/][dialects]]. The way MLIR utilizes the TableGen to generate + dialects and a majority of the operations and types is truly amazing. It makes + the cumbersome task of making a multi-layer IR quite straightforward. *MLIR* + singlehandedly changed my mind about the approach I want to take to build + the compiler. All of a sudden *C++* seemed like a reliable option. So I've + decided to give it a go. I revived the old C++ branch, forked into a branch + called =mlir= and started to work with it a bit. Made a prototype and enhanced it. + After a lot of consideration I finally decided to merge the =mlir= branch into the + =master= and move the *Golang* implementation into its own branch =golang-impl=. + + I'm cleaning up the C++ implementation at the moment and I'll be adding a semantic + analysis phase to the compiler and I'll be aiming for a minimal lambda calculus + implementation to wire up everything in their most minimal state as the foundation + and build upon it. + + Also I'll write another essay dedicated to the technical aspects of why LLVM and + MLIR are great for our use cases in more detail. diff --git a/orgs/index.org b/orgs/index.org index 997c1fc..be39e2f 100644 --- a/orgs/index.org +++ b/orgs/index.org @@ -17,9 +17,12 @@ with me via email (check my [[./gpg.org][GPG]] info page). If you have a questio in the [[./faq.org][FAQs]] page. * Recent updates: - - [[https://lxsameer.com/essays/serene-simple-version.html][Serene (simple versoin)]] - - [[https://lxsameer.com/essays/choosing-the-target-platform.html][Choosing the target platform]] - - [[https://lxsameer.com/essays/rational-and-a-name.html][Rational and a name]] - - [[https://lxsameer.com/essays/my-new-programming-language.html][My new programming language]] - - [[https://lxsameer.com/essays/transaction-variants.html][Transaction Variants]] - - [[https://lxsameer.com/essays/fatty-liver.html][Fatty Liver]] + - [[http://localhost:3003/essays/serene-on-llvm.html][Serene on the LLVM]] + - [[http://localhost:3003/essays/beyond-the-big-bang.html][Beyond the big bang]] + - [[http://localhost:3003/essays/dark-matter-and-other-life-forms.html][Dark matter and other life forms]] + - [[http://localhost:3003/essays/serene-simple-version.html][Serene (simple versoin)]] + - [[http://localhost:3003/essays/choosing-the-target-platform.html][Choosing the target platform]] + - [[http://localhost:3003/essays/rational-and-a-name.html][Rational and a name]] + - [[http://localhost:3003/essays/my-new-programming-language.html][My new programming language]] + - [[http://localhost:3003/essays/transaction-variants.html][Transaction Variants]] + - [[http://localhost:3003/essays/fatty-liver.html][Fatty Liver]] diff --git a/orgs/sitemap.inc b/orgs/sitemap.inc index 9c55499..03efef0 100644 --- a/orgs/sitemap.inc +++ b/orgs/sitemap.inc @@ -1,5 +1,11 @@ #+TITLE: lxsameer's nest +- [[file:essays/serene-on-llvm.org][Serene on the LLVM]] +- [[file:tags/Astrophysics.org][Astrophysics]] +- [[file:essays/beyond-the-big-bang.org][Beyond the big bang]] +- [[file:tags/Thoughts.org][Thoughts]] +- [[file:tags/Physics.org][Physics]] +- [[file:essays/dark-matter-and-other-life-forms.org][Dark matter and other life forms]] - [[file:categories/Life.org][Life]] - [[file:tags/Life.org][Life]] - [[file:tags/Health.org][Health]] diff --git a/thoughts.org b/thoughts.org new file mode 100644 index 0000000..763da4d --- /dev/null +++ b/thoughts.org @@ -0,0 +1,7 @@ +#+begin_quote +I think a lot when I have a bit of time to spare. I like to write them down and +research about them if possible. These are just my thoughts, wrong or right, doesn't +matter. It doesn't matter, I think a lot... + +This post is a part of my thoughts series. +#+END_quote