bahmanm

joined 2 years ago
MODERATOR OF
[–] [email protected] 2 points 2 years ago

Feedack from Emacs Matrix room:

The code will fail if a sequence contains duplicates
Also, seq-* implies that it is assuming to work on any sequence type, not just lists

[–] [email protected] 2 points 2 years ago

Now that I know which endpoints I'm interested in and which arguments I need to pass, exporting them to Prometheus is my next step. Though I wasn't sure where to begin w/ - I was thinking about writing the HTTP requests in Java or Python and export the results from there.

Blackbox exporter is definitely easier and cleaner. Thanks for the tip 💯

[–] [email protected] 2 points 2 years ago

Thanks all for the input 🙏

I did a quick experiment w/ the APIs and I think I have identified the ones I'd need. Obviously, all is open source (GPLv3) available on github: lemmy-clerk

As the next step, I'm going to expose that data to Prometheus for scraping.

[–] [email protected] 2 points 2 years ago

I still haven't made up my mind as to what is a good interval. But I think I'll take a per-endpoint approach, hitting more expensive ones less frequently.

So far I can only think of 4-5 endpoints/URLs that I should hit in every iteration as outlined in the post above.

web/mobile home feed
web/mobile create post/comment
web/mobile search

I think those will cover most of the usecases.

[–] [email protected] 1 points 2 years ago

OK, I think I see your point more clearly now. I suppose that's what many others do (apparently I don't represent the norm ever 😂.)

So tags can be useful for not only listening but also discovery.

I guess my concern RE tag & community competing. But I've got no prior experience designing a social/community based application to be confident to take my case to the RFC.

Hopefully time will prove me wrong.

[–] [email protected] 3 points 2 years ago (3 children)

Thanks. Yes, lemmy-status.org was where I got the initial idea 💯

automatic list

For the website I'm thinking about, I'd rather keep it exclusively opt-in. I don't wish to add any extra load since most of the instances are running off of enthusiasts' pockets.

[–] [email protected] 2 points 2 years ago

That's a fair point 👍 I just wanted to point out that I'm not the author.

As I said, I very much like the idea. It helps raise awareness around the current trend of switching licenses to curb competition/make $$$.

[–] [email protected] 1 points 2 years ago

I articulated my thoughts on the topic in a separate post: [DISCUSS] Website to monitor Lemmy servers' performance/availability

Please share your thoughts/feedback over there.

[–] [email protected] 1 points 2 years ago (2 children)

That's a fair use-case.

You see memes in your feed (despite not subscribing to meme'y communities). Three things come to my mind, thinking out loud here:

(1) Could it be b/c the community is not granular enough? Remember we're in the early stages of Lemmy w/ big "holistic" communities. I'd suppose as we grow, a overarching community will specialise and be split into several more specific ones?

(2) Creating "filters" based on tag/content is a fair usecase and I would second the idea as long as the main dimension of organisation remains "community." I'm a bit over-attached to "community" b/c I feel that's a defining element of Lemmy experience & am afraid that touching that balance may change the essence.

(3) Tags can be used to achieve (2) indeed but is the added complexity (❓) to the codebase and UI/UX worth it?

[–] [email protected] 2 points 2 years ago (2 children)

a list or database of projects that were open but then closed down

That's a great idea! Esp if the list is actively maintained & updated.

Since I am NOT the author of this extension, do you think you could write down your thoughts on the project's issue tracker?

[–] [email protected] 2 points 2 years ago (4 children)

I'm not sure I understand the value of tags for Lemmy (or Reddit in a similar vein.)

Lemmy's main (& sole?) dimension of organisation is the concept of "community." You subscribe to communities to automatically receive their updates on your feed.

Now, tags are going to add another dimension for organisation which allows one to curate their feed w/o subscribing.

The good thing about tags is that they simplify "listening." No need to keep searching for communities or keep scrolling through your feed to find the content you're interested in.

The downside of tags, IMO, is that it fundamentally competes w/ the concept of "communities" in the sense that, why would I bother w/ finding communities and "explore", and consequently, potentially contribute to the content of a community where I can simply listen to tags I'm interested in and forget about the rest.
IMO, the reason that tags (moderated or not) are working so beautifully on Mastodon is the lack of communities: listening is the only option.

I stand to be corrected, but it (tags and communities) very much feels like an either/or situation.

PS: Despite its quality and friendliness, Lemmy's user base and the content they creates is still small. That means, for the time being, communities may work just fine. As we grow and so does our volume of content, we'd probably need new strategies to augment communities. Though I wouldn't call that a concern of now or near future.

My 2 cents.

 

cross-posted from: https://lemmy.ml/post/4027414

TIL that I can use Perl's Benchmark module to time and compare the performance of different commands in an OS-agnostic way, ie as long as Perl is installed.

For example, to benchmark curl, wget and httpie you could simply run:

$ perl -MBenchmark=:all \
     -E '$cmd_wget    = sub { system("wget  https://google.com > /dev/null 2>&1") };' \
     -E '$cmd_curl    = sub { system("curl  https://google.com > /dev/null 2>&1") };' \
     -E '$cmd_httpie  = sub { system("https https://google.com > /dev/null 2>&1") };' \
     -E '$timeresult  = timethese(15, { "wget" => $cmd_wget, "curl" => $cmd_curl, "httpie" => $cmd_httpie });' \
     -E 'cmpthese($timeresult)'

which on my old T530 produces:

Benchmark: timing 15 iterations of curl, httpie, wget...

      curl:  2 wallclock secs ( 0.00 usr  0.00 sys +  0.42 cusr  0.11 csys =  0.53 CPU) @ 28.30/s (n=15)
    httpie:  8 wallclock secs ( 0.00 usr  0.01 sys +  4.63 cusr  0.79 csys =  5.43 CPU) @  2.76/s (n=15)
      wget:  3 wallclock secs ( 0.00 usr  0.00 sys +  0.53 cusr  0.19 csys =  0.72 CPU) @ 20.83/s (n=15)
    
         Rate httpie   wget   curl
httpie 2.76/s     --   -87%   -90%
wget   20.8/s   654%     --   -26%
curl   28.3/s   925%    36%     --

Very handy indeed ❤

 

TIL that I can use Perl's Benchmark module to time and compare the performance of different commands in an OS-agnostic way, ie as long as Perl is installed.

For example, to benchmark curl, wget and httpie you could simply run:

$ perl -MBenchmark=:all \
     -E '$cmd_wget    = sub { system("wget  https://google.com > /dev/null 2>&1") };' \
     -E '$cmd_curl    = sub { system("curl  https://google.com > /dev/null 2>&1") };' \
     -E '$cmd_httpie  = sub { system("https https://google.com > /dev/null 2>&1") };' \
     -E '$timeresult  = timethese(15, { "wget" => $cmd_wget, "curl" => $cmd_curl, "httpie" => $cmd_httpie });' \
     -E 'cmpthese($timeresult)'

which on my old T530 produces:

Benchmark: timing 15 iterations of curl, httpie, wget...

      curl:  2 wallclock secs ( 0.00 usr  0.00 sys +  0.42 cusr  0.11 csys =  0.53 CPU) @ 28.30/s (n=15)
    httpie:  8 wallclock secs ( 0.00 usr  0.01 sys +  4.63 cusr  0.79 csys =  5.43 CPU) @  2.76/s (n=15)
      wget:  3 wallclock secs ( 0.00 usr  0.00 sys +  0.53 cusr  0.19 csys =  0.72 CPU) @ 20.83/s (n=15)
    
         Rate httpie   wget   curl
httpie 2.76/s     --   -87%   -90%
wget   20.8/s   654%     --   -26%
curl   28.3/s   925%    36%     --

Very handy indeed ❤

 

cross-posted from: https://lemmy.ml/post/3972223

I come from a generally dry country and the concepts of drought & conserving the water are not new to me.


One of the things that have stunned/upset me ever since I set foot in Canada (both east & west coasts) is watching people washing their cars using a hose and tap water:

For starters, tap water is not cheap. Moreover, one definitely doesn't need sanitised water to wash their car.

But more importantly, washing cars using a hose at home is very inefficient compared to taking it to an automatic car wash: something which is programmed to make every second of operation and every litre of water count (that's how they make a margin after all.)


TBH I'm not sure about the real impact this has on our water reserves & if there have been any studies on similar water-inefficiencies but I have yet to watch/read/hear a advertisement, newspaper column or radio talk on this topic: these dry seasons take extra measures as, IMHO, they're going to stay w/ us for the foreseeable future.


Am I being too sensitive about water shortage b/c of my background? What are your thoughts?

Image from Wikipedia

 

cross-posted from: https://lemmy.ml/post/3919105

bmakelib is a minimalist standard library for writing Makefiles.

What do you think about being able to easily generate µsecond precision timestamps in a Makefile?

Please take a second to look at https://github.com/bahmanm/bmakelib/issues/42 & share your thoughts/emojis 🙏

 

bmakelib is a minimalist standard library for writing Makefiles.

What do you think about being able to easily generate µsecond precision timestamps in a Makefile?

Please take a second to look at https://github.com/bahmanm/bmakelib/issues/42 & share your thoughts/emojis 🙏

 

A good introduction to memory management in PG. The material on pg_backend_memory_contexts eas totally new to me.

 

My FIDE rating is ~1300. Take everything I say w/ a grain of salt 😂


I watched Carlsen's games for the first time back in 2016 during his match w/ Karjakin.

I have been following his performance ever since and I've never been able to shake off the feeling, even for a second, that he is to modern chess what Dr. Lasker used to be to chess during his long chess career: "never losing his head" as Tartakower once said.

Match after match, Carlsen has proven to be a head and shoulder above his contemporaries and irrespective of the style of his opponent (aggressive, defensive, slow, fast, tactical, ...) he's always been able to pull it off no matter how tense the position/match got.

Just like Dr. Lasker, he seems to have developed an understanding of the game and style which is not well understood by his opponents.

IMO the chess world is not going to see a new "best" player, until either he loses interest in the game (like Dr. Lasker did) or a new generation of players arise and are able to challenge him beyond what he's been through.

Perhaps Pragg or Firouzja in a decade or so w/ more experience and stronger nerves can do that?

 

After I restarted my Emacs daemon (after a couple of months uptime), I started getting plenty of errors like below during the initialisation and most of my keys stopped working:

Key sequence C-c [...] starts with non-prefix key C-c

A quick search indicated that error means the "non-prefix key" is already used. In my case, it was C-c which sounded quite weird.

I ran ag on ~/.emacs.d & luckily was able to find the culprit after a few minutes.

I had this somewhere in my init files:

(global-set-key (kbd "C-c 
s a") #'avy-goto-char-2)

Note the newline after C-c - I must have pressed ENTER by mistake and saved the file w/o paying attention.

I thought I'd share this as this may save some fellow Emacs denizens a few minutes confusing minutes.

My immediate reaction was to blame it on the upgrade to 29.1 🤦‍♂️ The morale of the story is find the blame w/i and not in Emacs!

 

Found these 2 at the local grocery store for $2 each. Admittedly very cheap plastic but still make a pleasant sight to see on my desk 😀

34
submitted 2 years ago* (last edited 2 years ago) by [email protected] to c/[email protected]
 

cross-posted from: https://lemmy.ml/post/3758187

It's not the 1st time a language/tool will be lost to the annals of the job market, eg VB6 or FoxPro. Though previously all such cases used to happen gradually, giving most people enough time to adapt to the changes.

I wonder what's it going to be like this time now that the machine, w/ the help of humans of course, can accomplish an otherwise multi-month risky corporate project much faster? What happens to all those COBOL developer jobs?

Pray share your thoughts, esp if you're a COBOL professional and have more context around the implication of this announcement 🙏

220
submitted 2 years ago* (last edited 2 years ago) by [email protected] to c/[email protected]
 

It's not the 1st time a language/tool will be lost to the annals of the job market, eg VB6 or FoxPro. Though previously all such cases used to happen gradually, giving most people enough time to adapt to the changes.

I wonder what's it going to be like this time now that the machine, w/ the help of humans of course, can accomplish an otherwise multi-month risky corporate project much faster? What happens to all those COBOL developer jobs?

Pray share your thoughts, esp if you're a COBOL professional and have more context around the implication of this announcement 🙏

 

cross-posted from: https://lemmy.ml/post/3731915

Over the past 2 decades I've been trying various medications to help me w/ my long running major depression & crippling ADHD. And none have seemed to work.

Recently, the doctor I'm working w/ nowadays suggested that she's practically running out of options to offer me & that I should take a pharmacogenetics test to help her figure out what should she prescribe.

I took the (expensive) test and the results were eye-opening! The results came out a couple of weeks later w/ a detailed list of some few hundreds medications of various sorts (from pain killers to blood pressure control) along w/ their efficacy for my case. The physician's version also included a list of suggestions and alternatives for each medicine.

In my particular case, it essentially indicated that any medication that I had tried before was supposed to be either useless or to have limited impact on my body. That part is true.

Please note that I've only started a new set of prescriptions since a couple of weeks ago and as such can't really vouch for the accuracy of the suggestions.

I struggled a lot w/ myself to post something this personal. But I thought maybe there are people out there who've got no idea such tests exist and it might turn out to be helpful to some.

view more: ‹ prev next ›