HNHacker News
TopNewBestAskShowJobs

yogsototh

2,489 karma · joined June 7, 2010

- https://yannesposito.com - https://her.esy.fun
submissionscomments
yogsototh··on Logo Programming
I myself learned programming with logo, at my school when I was 8 or 10. And it was a delight, I am so grateful it existed.

But quite surprisingly, when later during my Ph.D. part of my time was dedicated to give exercises to students. And we used logo instead of the more usual programming languages. And I think it really helped them to really internalise programming a lot better. Typically, the latest exercices introduced recursion which is immediately visible as fractals.

    HIDETURTLE
    
    PENUP
    SETXY -200 0
    RIGHT 90
    PENDOWN
    
    to dragon :degree :size
        setpensize 1
        if :size>5  [setpensize 2]
        if :size>10 [setpensize 3]
        if :size>20 [setpensize 4]
        if :size>40 [setpensize 5]
        ifelse :degree=0 [
            fd :size
        ][
            left  45 dragon (:degree-1) (size/4)
            right 90 dragon (:degree-1) (size/2)
            left  90 dragon (:degree-1) (size/4)
            right 45
        ]
    end
    
    dragon 6 3000

if you want to give a try :)
yogsototh··on Ask HN: Alternatives to GitHub
I personally host a forgejo instance on a private VPS ; so far almost no maintenance except protecting it from ai-crawlers[#1]. If you don't want the hassle, codeberg.org is a public instance of forgejo.

[#1]: https://her.esy.fun/posts/0031-how-i-protect-my-forgejo-inst...

I configure my local repositories to push on both Github and my forgejo instance. I am not using the CI much for my private projects (local tests are enough in my case).

yogsototh··on A road to Lisp: Why Lisp
I wonder what side you would put Malbolge,

What side for python? Haskell? Idris? Clean? C? K?...

white/dark side is too much of a simplification to me.

Programming language equilibrium is a very complex subject and fascinating one.

After years of experimenting with many of them, it is all a matter of context of usage, personal preferences, objectives, etc.. there is no such thing as "the best programming language ever", neither "best for light side programming" nor "best for dark side programming".

Similarly, there is no such things as: Light side/Dark side in artistic painting. There are tons of paints some are clearly greater than others, but there is no such thing as "the best painting most beautiful for everyone seeing this paint comparatively to any pain".

[^Malbolge]: https://en.wikipedia.org/wiki/Malbolge

[^Clean]: https://en.wikipedia.org/wiki/Clean_(programming_language)

[^K]: https://en.wikipedia.org/wiki/K_(programming_language)

yogsototh··on Official Clojure Documentary page with Video, Shownotes, and Links
Personally this is a hidden trick I use.

Ask AI to build something. By default it will use python. Sometimes js or typescript.

Ask then to do the same thing in Clojure. The result is generally an order of magnitude better. Shorter, easier to read for both humans and llm. Easier to adapt to changes.

yogsototh··on Spaced repetition for efficient learning (2019)
I remember a documentary about learning things to kids, and in order to optimise learning efficiency the optimal ratio for difficult questions should be 1/4. So the children continue to feel good about themselves, while still improving.

So I guess this ratio about easy vs difficult question should be a parameter in such spaced repetition algorithms.

yogsototh··on Voyager 1 is about to reach one light-day from Earth
I think there are a few movies that made me realize how much the space is vast, empty and adverse to life.

I think it would be nice for people to take a look at them:

- Aniara (2018)

- High Life (2018)

and maybe in a less artistic view:

- Powers of Ten (1977) yt: https://www.youtube.com/watch?v=0fKBhvDjuy0

yogsototh··on Project Euler
I remember there were data loss, but my account appears to have been recovered. You may try to login again, and with luck, like me you will get back your history.
yogsototh··on GitHub was having issues
I host a forgejo instance and I feel it is great to embrace the distributed nature of git.

But be aware if you intend to host it you will need to protect it from recent AI web scrapers. I use anubis but there are other alternatives.

yogsototh··on Claude Code IDE integration for Emacs
I personally have great success with gptel + mcp + claude (via copilot due to corporate restrictions)

I wrote a short article about how I configured it there: https://her.esy.fun/posts/0029-ai-assistants-in-doom-emacs-3...

One thing I really appreciate with gptel is that it is very easy to switch from Claude to something else like a local llm (via ollama or gpt4all for example). And the interface will be similar.

yogsototh··on Job-seekers are dodging AI interviewers
I think this already exists and there are lot of them. Regarding stealth AI interview, there are many existing products.

Mainly they listen to the interview, and write down answers in an overlay for you to repeat. They ace leet code, etc...

I guess this is already pretty close.

yogsototh··on Git Bug: Distributed, Offline-First Bug Tracker Embedded in Git, with Bridges
I had the same idea for a talk a long time ago the result is https://git.esy.fun/yogsototh/gpm

I never used it seriously, but the concepts are easy enough to grasp.

Have a separate dedicated branch that contains all the metadata of your project. Like issues, todo-list, review comments, etc...

Hopefully, something decentralised like this could become more popular maybe.

yogsototh··on Why I Program in Lisp
"Purely Functional Programming", I guess mostly Haskell/Purescript.

So this only really mean:

Purely Functional Programming by default.

In most programming languages you can write

"hello " + readLine()

And this would intermix pure function (string concatenation) and impure effect (asking the user to write some text). And this would work perfectly.

By doing so, the order of evaluation becomes essential.

With a pure functional programming (by default).

you must explicitely separate the part of your program doing I/O and the part of your program doing only pure computation. And this is enforced using a type system focusing on I/O. Thus the difference between Haskell default `IO` and OCamL that does not need it for example.

in Haskell you are forced by the type system to write something like:

    do 
      name <- getLine
      let s = "Hello " <> name <> "!"
      putStrLn s
you cannot mix the `getLine` directly in the middle of the concatenation operation.

But while this is a very different style of programming, I/O are just more explicit, and they "cost" more, because writing code with I/O is not as elegant, and easy to manipulate than pure code. Thus it naturally induce a way of coding that try to really makes you conscious about the part of your program that need IO and the part that you could do with only pure function.

In practice, ... yep, you endup working in a "Specific to your application domain" Monad that looks a lot like the IO Monad, but will most often contains IO.

Another option is to use a free monad for your entire program that makes you able to write in your own domain language and control its evaluation (either using IO or another system that simulates IO but is not really IO, typically for testing purpose).

yogsototh··on Why Clojure?
For being an Haskell and Clojure dev. Data manipulation in Clojure requires a mind shift coming from Haskell. But it feels a lot more straightforward in Clojure. Even if `lens` is incredible. This is like Haskell lenses was were included in the core language if you want. Of course, not type-safe. This is just that, solving problems in Haskell or in Clojure does not really require the same approach. But both ways are delightful. And personally, Clojure has always felt more natural, even though, I also love the Haskell approach.
yogsototh··on Why Clojure?
One part of the joy that came with using Clojure is that there isn't really any bad choice. For example, I wanted a quick and dirty internal web application for admin purposes. I went with reframe. Why? Because I wanted to try it. And I knew, that I could get things done with it.

This is probably not the easiest "framework" (not sure this is a good name for it) but it was very fun. I think, if I had to progress from just a toy to a really strong, user facing UI, I think it would still be a pretty good choice. If some feature is missing, or something doesn't work as I would have liked, I know it will not be difficult to correct it myself.

I know that this could feel overwhelming, but this is freedom in a world where you expect there exists a single "best practice". As long as the tool is powerful enough it will be fine. On my end, I appreciate the fact there is not a single "web framework" in Clojure. Instead you have tons of libs you can use that work well together because they are all tied with a few common concepts (like ring for example). If you don't like to choose the libs. There are a few people that provide a starter pack with somewhat nice bundle of libs in a single system like pedestal or luminus for only citing two of them.

My recommendation is to not lose too much time looking for the best choice. Most of them will be good.

yogsototh··on I Received an AI Email
I am pretty confident the spammers will remove the `+` suffix from your email. And this is why I find the Apple fake email building solution a lot better because they build a fully different email per service. No way for the service to be able to cheat and discover my real email address from the one I give them.

Still a smart enough system might be able to discover a valid email from my other id info, like my name. But this start to be a lot of work, while just `s/+[^@]*@//` is easy enough to do.

yogsototh··on In Defense of Simple Architectures (2022)
I am very glad of the architecture we use at my current company. This is a monolith, BUT with the capacity to be deployed as microservices if needed.

The code is structured in such a way that you only start the sub services you need. We have node that launch almost all services, some only a few.

If we need to scale just a particular part of the system we can easily just scale the same node but configuring it just for the sub services we need.

yogsototh··on Why is Jepsen written in Clojure?
Let me talk about my experience. I was (yes was) mostly an Haskeller. I loved using Haskell, and even a long time ago (in 2007 I think) when I learned it, the book to learn the basic of the language had snipped that no longer worked.

But I still loved, it. And it changed every year, and I was even part of the proponent of the changes.

But after a while, you realise that your old project stop working. That if you want to use a new library, you also need to update many dependencies. But each one has breaking changes, so you start updating your code.

Mainly, if you wrote some code, and forget about it, it will no longer work or will be very hard to use with newer libraries. After a while this became very tedious.

In Clojure, the code I wrote 10 years ago is still working perfectly today. The application still launches.

If a bug is discovered and I need to fix it, for example, by upgrading or adding a new lib, I am not afraid to loose hours finding an fixing my existing code that suddenly become deprecated.

So yes, stability is VERY important for me now.

And last but not least, Rich Hickey talked about it in this talk and make a lot of very great points:

https://piped.video/watch?v=oyLBGkS5ICk

yogsototh··on Why is Jepsen written in Clojure?
Let me add my 2cents on this subject.

I feel that due to its functional nature or perhaps this is just the community bias, Clojurists tend to prefer mixing lower level libraries to build their web application instead of relying on a specific big web framework like RoR for example. Luminus would be one RoR-like system.

But today, I think people would probably choose reitit for the writing the API and use a clojurescript framework for the frontend or perhaps still use reitit to generate HTML pages using hiccup.

yogsototh··on Show HN: OPML list of Hacker News Users Personal Blogs
That's really great! Thank you for that.

I saw some people asking for a good RSS reader. Personally I will use elfeed, and I also use elfeed-org so I could import the OPML file and export it into my existing RSS feeds.

yogsototh··on Show HN: Hacker News user blogroll
This is pretty nice, but for my blog I noticed the latest article are wrong. Check yannesposito.com
yogsototh··on Ask HN: Could you share your personal blog here?
https://yannesposito.com (or its clone https://her.esy.fun)

I blog about functional programming (haskell, clojure), but also emacs org-mode, thing like these. I sometimes tell myself I should invest more time to write down more about my thoughts there.

I am happy to be part of the 512kb club.

Here are a few posts that were somehow popular:

- https://her.esy.fun/Scratch/en/blog/Learn-Vim-Progressively/

- https://her.esy.fun/Scratch/en/blog/Haskell-the-Hard-Way/ (updated by https://her.esy.fun/posts/0010-Haskell-Now/index.html )

- https://her.esy.fun/Scratch/en/blog/Yesod-tutorial-for-newbi...

yogsototh··on Why Lisp Syntax Works
Personally I find that LISP syntax remove a layer of complexity by directly exposing the AST to my brain instead of adding a layer of internal parsing.

    1 + x * 2 - 3 % x
is longer to decipher than

    (% (- (+ (* x 2) 1) 3) x)
which is itself harder than

    (-> x (* 2) (+ 1) (- 3) (% x))
But it takes a while to be used to it. And yes, it really helps writing macros, but I wouldn't say this as always be a good thing. Macros are far from being the alpha and omega of programming, as they add an implicit layer of transformation to your code making it easier to write but very often harder to read and reason about.
yogsototh··on The Death of Quanta Magazine
I still follow Quanta Magazine, but I kind of moved from it to SciTechDaily, which while still imperfect, generally has a direct link to the scientific article for which, if they have done their work correctly, is easier to follow after the blog article about it.

The positive side effect is that I am reading scientific articles more often since I'm doing this.

yogsototh··on Ask HN: How do you share your personal setup over different computers?
I use nix home-manager and yadm. Mostly on macOS.

I blogged about it here https://her.esy.fun/posts/0021-my-personal-environment-sync/...

yogsototh··on Ask HN: Where can we see simulations of a nuclear war?
not really a simulation but the movie “threads” gives what seems to be a very crude and realistic potential scenario viewed from the population standpoint.
yogsototh··on Ask HN: How to build a light weight personal blog?
I use a single Makefile with pandoc.

https://her.esy.fun/posts/0018-makefile-as-static-site-build...

I use org-mode instead of markdown. But this system is agnostic of your source. Low maintenance, and will probably still work in a long time in the future. The most fragile part of it is pandoc, which I think will be retro compatible for a long time.

yogsototh··on Obsidian – A knowledge base from a local folder of plain text Markdown files
From the description it looks like org-roam would be a good open-source alternative.
yogsototh··on Ask HN: What do you self-host?
On a scaleway (about 20€/month):

- my websites with nginx

- IRC (ngircd)

- ZNC

- espial for bookmarks and notes

- node-red to automate RSS -> twitter and espial -> pinboard

- transmission

- some reddit bots manager I’ve written in Haskell+Purescript.

- some private file upload system mostly to share images in IRC in our team

- goaccess to self host privacy respecting analytics

At home, Plex.

yogsototh··on KDE is adopting GitLab
I've made a short presentation about filling the gap between just pure git and something like gitlab.

https://her.esy.fun/slides/git-project-manager.html

Mostly, project-management features.

yogsototh··on Ask HN: How do you handle logging?
Basic: log to syslog

Advanced: log structured objects (keys and string values) to Riemann. Write smart rules in Riemann then send those to ES and explore structured object in Kibana.

Page 1 of 6Next →