@bahmanm@lemmy.ml
@bahmanm@lemmy.ml avatar

bahmanm

@bahmanm@lemmy.ml

Husband, father, kabab lover, history buff, chess fan and software engineer. Believes creating software must resemble art: intuitive creation and joyful discovery.

๐ŸŒŽ linktr.ee/bahmanm

Views are my own.

This profile is from a federated server and may be incomplete. Browse more on the original instance.

bahmanm,
@bahmanm@lemmy.ml avatar

Something that Iโ€™ll definitely keep an eye on. Thanks for sharing!

bahmanm,
@bahmanm@lemmy.ml avatar

RE Go: Others have already mentioned the right way, thought Iโ€™d personally prefer ~/opt/go over what was suggested.


RE Perl: To instruct Perl to install to another directory, for example to ~/opt/perl5, put the following lines somewhere in your bash init files.


<span style="color:#323232;">export PERL5LIB="$HOME/opt/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"
</span><span style="color:#323232;">export PERL_LOCAL_LIB_ROOT="$HOME/opt/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"
</span><span style="color:#323232;">export PERL_MB_OPT="--install_base "$HOME/opt/perl5""
</span><span style="color:#323232;">export PERL_MM_OPT="INSTALL_BASE=$HOME/opt/perl5"
</span><span style="color:#323232;">export PATH="$HOME/opt/perl5/bin${PATH:+:${PATH}}"
</span>

Though you need to re-install the Perl packages you had previously installed.

bahmanm,
@bahmanm@lemmy.ml avatar

NB: I have never had the fortune to write Lisp in a professional setup.

For years, I used to use SBCL snippets for a whole set of automation tasks in my daily workflow, like updating git repos in batch, checking failing CI/CD pipelines per repo, organising my music collection, etc.

But gradually I switched to more specialised tools and, yes, Emacs Lisp to do what I needed to do. It just felt more ergonomic in my case.

The last time I seriously used SBCL was to solve some of Project Eulerโ€™s challenges back in 2018: github.com/bahmanm/euler-cl

Nowadays, Iโ€™ve got no non-elisp code left ๐Ÿ™‚ ๐Ÿคทโ€โ™‚๏ธ

bahmanm,
@bahmanm@lemmy.ml avatar

First off, I was ready to close the tab at the slightest suggestion of using Velocity as a metric. That didnโ€™t happen ๐Ÿ™‚


I like the idea that metrics should be contained and sustainable. Though I donโ€™t agree w/ the suggested metrics.

In general, it seems they are all designed around the process and not the product. In particular, thereโ€™s no mention of the โ€œvalue unlockedโ€ in each sprint: itโ€™s an important one for an Agile team as it holds Product accountable to understanding of what is the $$$ value of the teamโ€™s effort.

The suggested set, to my mind, is formed around the idea of a feature factory line and its efficiency (assuming it is measurable.) It leaves out the โ€œmeaningโ€ of what the team achieve w/ that efficiency.

My 2 cents.


Good read nonetheless ๐Ÿ‘ Got me thinking about this intriguing topic after a few years.

bahmanm,
@bahmanm@lemmy.ml avatar

This is fantastic! ๐Ÿ‘

I use Perl one-liners for record and text processing a lot and this will be definitely something I will keep coming back to - Iโ€™ve already learned a trick from โ€œContext Matchingโ€ (9) ๐Ÿ™‚

bahmanm,
@bahmanm@lemmy.ml avatar

Thanks for the link. Had no idea about that.

bahmanm,
@bahmanm@lemmy.ml avatar

beyond acceptable use

Since literally every aspect of lemmy-meter is configurable per instance, Iโ€™m not worried about that ๐Ÿ˜Ž The admins can tell me whatโ€™s the frequency/number theyโ€™re comfortable w/ and I can reconfigure the solution.

You can hit the endpoint /api/v3/site for information about an instance including the admins list.

Exactly what I was looking for. Thanks very much ๐Ÿ™

bahmanm, (edited )
@bahmanm@lemmy.ml avatar

sane defaults and a timeout period

I agree. This makes more sense.

Your name will be associated with abuse forevermore.

I was going to ignore your reply as a ๐ŸงŒ given itโ€™s an opt-in service for HTTP monitoring. But then you had a good point on the next line!

Letโ€™s use such important labels where they actually make sense ๐Ÿ™‚

bahmanm,
@bahmanm@lemmy.ml avatar

Agreed. It was a mix of too ambitious standards for up-to-date data and poor configuration on my side.

bahmanm, (edited )
@bahmanm@lemmy.ml avatar

Update 1

Thanks all for your feedback ๐Ÿ™ I think everybody made a valid point that the OOTB configuration of 33 requests/min was quite useless and we can do better than that.

I reconfigured timeouts and probes and tuned it down to 4 HTTP GET requests/minute out of the box - see the configuration for details.


๐ŸŒ A pre-release version is available at lemmy-meter.info.

For the moment, it only probes the test instances

  • enterprise.lemmy.ml
  • ds9.lemmy.ml
  • voyager.lemmy.ml

Iโ€™d very much appreciate your further thoughts and feedback.

bahmanm,
@bahmanm@lemmy.ml avatar

Iโ€™m not sure how this got cross-posted! I most certainly didnโ€™t do it ๐Ÿคทโ€โ™‚๏ธ

bahmanm,
@bahmanm@lemmy.ml avatar

Thanks for sharing your insights.


Thinking out loud hereโ€ฆ

In my experience with traditional logging and distributed systems, timestamps and request IDs do store the information required to partially reconstruct a timeline:

  • In the case of a linear (single branch) timeline you can always โ€œqueryโ€ by a request ID and order by the timestamps and thatโ€™s pretty much what tracing will do too.
  • Things, however, get complicated when youโ€™ve a timeline w/ multiple branches.
    For example, consider the following relatively simple diagram.
    Reconstructing the causality and join/fork relations between the executions nodes is almost impossible using traditional logs whereas a tracing solution will turn this into a nice visual w/ all the spans and sub-spans.

https://lemmy.ml/pictrs/image/9e00ce74-96e5-4961-8579-7a25f48f92ce.png

That said, logs do shine when things go wrong; when you start your investigation by using a stacktrace in the logs as a clue. That (stacktrace) is something that Iโ€™m not sure a tracing solution will be able to provide.


they should complement each other

Yes! You nailed it ๐Ÿ’ฏ

Logs are indispensable for troubleshooting (and potentially nothing else) while tracers are great for, well, tracing the data/request throughout the system and analyse the mutations.

bahmanm,
@bahmanm@lemmy.ml avatar

That was my case until I discovered that GNU tar has got a pretty decent online manual - itโ€™s way better written than the manpage. I rarely forget the options nowadays even though I dontโ€™ use tar that frequently.

bahmanm,
@bahmanm@lemmy.ml avatar

I cross-posted the same questions on Matrix and got the answer there.


The hook Iโ€™m using is invoked before the minor modes are setup - thatโ€™s why itโ€™s being overridden. The suggestion was to have a hook function for each minor mode that I want to control. Itโ€™s not clean but gets the job done.


Hereโ€™s the working snippet:


<span style="font-style:italic;color:#969896;">;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
</span><span style="color:#323232;">
</span><span style="color:#323232;">(</span><span style="font-weight:bold;color:#a71d5d;">defun </span><span style="font-weight:bold;color:#795da3;">bahman</span><span style="font-weight:bold;color:#a71d5d;">/</span><span style="color:#323232;">helm</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">major</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">mode.hook ()
</span><span style="color:#323232;"> (display</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">line</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">numbers</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">mode </span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#0086b3;">1</span><span style="color:#323232;">)
</span><span style="color:#323232;"> (puni</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">mode </span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#0086b3;">1</span><span style="color:#323232;">))
</span><span style="color:#323232;">
</span><span style="color:#323232;">(add</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">hook 'helm</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">major</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">mode</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">hook
</span><span style="color:#323232;">         </span><span style="color:#0086b3;">#'bahman/helm-major-mode.hook</span><span style="color:#323232;">)
</span><span style="color:#323232;">
</span><span style="font-style:italic;color:#969896;">;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
</span><span style="color:#323232;">
</span><span style="color:#323232;">(</span><span style="color:#62a35c;">defvar</span><span style="color:#323232;"> bahman</span><span style="font-weight:bold;color:#a71d5d;">/</span><span style="color:#323232;">display</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">line</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">numbers</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">mode.disabled</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">modes
</span><span style="color:#323232;"> '(vterm</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">mode erlang</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">shell</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">mode)
</span><span style="color:#323232;"> </span><span style="color:#183691;">"Disable `display-line-numbers' for the specified modes."</span><span style="color:#323232;">)
</span><span style="color:#323232;">
</span><span style="color:#323232;">(</span><span style="font-weight:bold;color:#a71d5d;">defun </span><span style="font-weight:bold;color:#795da3;">bahman</span><span style="font-weight:bold;color:#a71d5d;">/</span><span style="color:#323232;">display</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">line</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">numbers</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">mode.hook ()
</span><span style="color:#323232;"> (</span><span style="font-weight:bold;color:#a71d5d;">when </span><span style="color:#323232;">(seq</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">contains</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">p bahman</span><span style="font-weight:bold;color:#a71d5d;">/</span><span style="color:#323232;">display</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">line</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">numbers</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">mode.disabled</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">modes
</span><span style="color:#323232;">                       major</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">mode)
</span><span style="color:#323232;">     (display</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">line</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">numbers</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">mode </span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#0086b3;">1</span><span style="color:#323232;">)))
</span><span style="color:#323232;">
</span><span style="color:#323232;">(add</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">hook 'display</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">line</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">numbers</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">mode</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">hook
</span><span style="color:#323232;">         </span><span style="color:#0086b3;">#'bahman/display-line-numbers-mode.hook</span><span style="color:#323232;">)
</span><span style="color:#323232;">
</span><span style="font-style:italic;color:#969896;">;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
</span><span style="color:#323232;">
</span><span style="color:#323232;">(</span><span style="color:#62a35c;">defvar</span><span style="color:#323232;"> bahman</span><span style="font-weight:bold;color:#a71d5d;">/</span><span style="color:#323232;">puni</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">mode.disabled</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">modes
</span><span style="color:#323232;"> '(vterm</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">mode)
</span><span style="color:#323232;"> </span><span style="color:#183691;">"Disable `puni-mode' for the specificied modes."</span><span style="color:#323232;">)
</span><span style="color:#323232;">
</span><span style="color:#323232;">(</span><span style="font-weight:bold;color:#a71d5d;">defun </span><span style="font-weight:bold;color:#795da3;">bahman</span><span style="font-weight:bold;color:#a71d5d;">/</span><span style="color:#323232;">puni</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">mode.hook ()
</span><span style="color:#323232;"> (</span><span style="font-weight:bold;color:#a71d5d;">when </span><span style="color:#323232;">(seq</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">contains</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">p bahman</span><span style="font-weight:bold;color:#a71d5d;">/</span><span style="color:#323232;">puni</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">mode.disabled</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">modes
</span><span style="color:#323232;">                       major</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">mode)
</span><span style="color:#323232;">   (puni</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">mode </span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#0086b3;">1</span><span style="color:#323232;">)))
</span><span style="color:#323232;">
</span><span style="color:#323232;">(add</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">hook 'puni</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">mode</span><span style="font-weight:bold;color:#a71d5d;">-</span><span style="color:#323232;">hook
</span><span style="color:#323232;">         </span><span style="color:#0086b3;">#'bahman/puni-mode.hook</span><span style="color:#323232;">)
</span>
bahmanm,
@bahmanm@lemmy.ml avatar

This is quite intriguing. But DHH has left so many details out (at least in that post) as pointed out by @breadsmasher - it makes it difficult to relate to.

On the other hand, like DHH said, oneโ€™s mileage may vary: itโ€™s, in many ways, a case-by-case analysis that companies should do.

I know many businesses shrink the OPs team and hire less experienced OPs people to save $$$. But just to forward those saved $$$ to cloud providers. I can only assume DDHโ€™s team is comprised of a bunch of experienced well-payed OPs people who can pull such feats off.

Nonetheless, looking forward to, hopefully, a follow up post that lays out some more details. Pray share if you come across it ๐Ÿ™

bahmanm,
@bahmanm@lemmy.ml avatar

I think I understand where RMS was coming from RE โ€œrecursive variablesโ€. As I wrote in my blog:

Recursive variables are quite powerful as they introduce a pinch of imperative programming into the otherwise totally declarative nature of a Makefile.

They extend the capabilities of Make quite substantially. But like any other powerful tool, one needs to use them sparsely and responsibly or end up w/ a complex and hard to debug Makefile.

In my experience, most of the times I can avoid using recursive variables and instead lay out the rules and prerequisites in a way that does the same. However, occasionally, Iโ€™d have to resort to them and Iโ€™m thankful that RMS didnโ€™t win and they exist in GNU Make today ๐Ÿ˜… IMO purist solutions have a tendency to turn out impractical.

bahmanm,
@bahmanm@lemmy.ml avatar

That sounds a great starting point!

๐Ÿ—ฃThinking out loud hereโ€ฆ

Say, if a crate implements the AutomatedContentFlagger interface it would show up on the admin page as an โ€œAutomated Filterโ€ and the admin could dis/enable it on demand. That way we can have more filters than CSAM using the same interface.

bahmanm,
@bahmanm@lemmy.ml avatar

Thanks all for your feedback ๐Ÿ™

Iโ€™m going to stick to โ€œversion 2โ€ which, to my mind, reads more naturally. Iโ€™ll definitely consider the iterative suggestions for the sake of performance if I ever decide to submit a patch upstream. But for now, what Iโ€™ve got does the job for me dealing w/ sequences w/ less than 50 elements.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • โ€ข
  • anitta
  • thenastyranch
  • magazineikmin
  • InstantRegret
  • GTA5RPClips
  • Durango
  • Youngstown
  • khanakhh
  • slotface
  • ngwrru68w68
  • rosin
  • ethstaker
  • kavyap
  • DreamBathrooms
  • megavids
  • everett
  • modclub
  • cubers
  • tacticalgear
  • vwfavf
  • mdbf
  • normalnudes
  • cisconetworking
  • tester
  • provamag3
  • osvaldo12
  • Leos
  • JUstTest
  • All magazines