#ruby #tips I just learn about $PROGRAM_NAME == __FILE__ trick and it makes me try a little something, which can be helpful sometime: how to bundle every aspect of a ruby app (libs, execs and tests) in a single file, which behaves differently following the caller context https://etienne.depar.is/a-ecrit/ruby-one-file-app.html
Milouse 😺
#ruby, #python and #lisp (#emacs) developper, ex #scout leader #sgdf, interested in #openweb, #semanticweb, #privacy and #socialeconomy.
Mainly here to discover and share new things about ruby and crystal languages.
My generic purpose account is @milouse@boitam.eu
I just published a new blog article about the integration of #RVM with #fishshell. It works very well together and I’m happy of my new setup :)
https://etienne.pflieger.bzh/a-ecrit/rvm-and-fish-shell.html
(⚠️ answers to this toot will appear on my blog as well)
I just published a new article on how to parse zsh history file. The subtility being how it stores some chars internally.
https://etienne.depar.is/a-ecrit/parse-zsh-history-file-in-ruby.html
💡 Answering to this message will make yours appear on my blog.
@remi@ruby.social I always wondered if they were not using some kind of old cross domain cookie setting, now ignored by browser cookie protection (on firefox at least, don't know for others)
Quick saturday night question. I have a little doubt about the best solution to concatenate lot of strings together.
Since a long time, I’m used to put all the strings in an array and call the join method on it:
["test", var1, "tutu", …].join
However I don’t find a lot of reference to this way of doing on the net… Every guides or benchmark seems to only considerate concatenation with + or string interpolation.
Is my method really bad? Does anyone else do the same?
I just learnt how object instanciation really work (i.e. what happen when calling .new on a class) 🤩 https://zverok.space/blog/2023-01-03-data-initialize.html
Just migrate my unshortening url service¹ from #sinatra to #roda without any trouble 😊
I also rewrite my stylesheet to be build upon my fork of #milligram ², now respecting user color scheme preference ☀️🌙
¹ https://unshorten.umaneti.net
² https://github.com/milouse/centigram
