Skip Navigation
General Programming Discussion @lemmy.ml bahmanm @lemmy.ml
euler-cl now tracks coverage with Codecov

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

> Just wanted to share some (exciting) news about my Common Lisp project, euler-cl. I finally got the time to sit down and integrate it with Codecov! This means a couple of cool things: > > * 📈 Test Coverage Tracking: I can now see how well my code is tested over time, giving valuable insights into code quality. > * 🏅 Codecov Badge: euler-cl now sports a snazzy Codecov badge to show off! > * 📦 Reusable Setup: The code and setup process should be simple enough to be used as a reference to integrate Codecov (and potentially other services) into your own Common Lisp projects! > > If you're interested this commit is almost all you need: https://github.com/bahmanm/euler-cl/commit/855b014 > > Let me know in the comments if you have any questions or want to chat about integrating Codecov into your own projects!

0
General Programming Discussion @lemmy.ml bahmanm @lemmy.ml
Docker Image Fusions for Simpler Workflows!
github.com GitHub - bahmanm/bdockerimg: A collection of Docker images which are otherwise not easy to find.

A collection of Docker images which are otherwise not easy to find. - bahmanm/bdockerimg

GitHub - bahmanm/bdockerimg: A collection of Docker images which are otherwise not easy to find.

If you've found yourself manually crafting complex Docker images or repeatedly installing tools, I've got something for you 😁

Check out "fusions" in bdockerimg project (https://github.com/bahmanm/bdockerimg).

---

With fusions, you merge base images into powerful composite images.

Currently there are:

  • sdkman.bmakelib
  • quicklisp.bmakelib

---

Let me know what other fusions would make your Docker life easier 🙏

0
Could bdockerimg make your dev life easier?
  • Thanks for the pointer! Very interesting. I actually may end up doing a prototype and see how far I can get.

  • General Programming Discussion @lemmy.ml bahmanm @lemmy.ml
    Could bdockerimg make your dev life easier?

    I've been working on a small project called bdockerimg.

    It's a collection of pre-built Docker images for some less common development tools (currently bmakelib, QuickLisp, and SDKMAN).

    The idea is to streamline setup, especially for CI/CD pipelines, where I found myself repeating the same Dockerfile steps a lot. Basic functionality tests are included for a bit of extra peace of mind.

    ---

    👀 Here's the repo if you're interested: https://github.com/bahmanm/bdockerimg 🗣 And here's the the Matrix room: https://matrix.to/#/#bdockerimg:matrix.org

    ---

    I'm curious:

    • Does this seem like something you might find useful?
    • Are there any specific tools you'd love to see as easy-to-use Docker images?

    ---

    This project is still in its early stages, so any feedback or contributions are much appreciated 🙏

    2
    [HELP] Chess Programmes for Kids

    Do you know any chess clubs/programmes for a 5-7 year old in Vancouver/Richmond area?

    I would preferably want to be able to look up the coach(es) online or attend one of their lessons before enrolling my kid.

    PS: I know I may sound very picky, but I have witnessed first hand how a not great tutor in the early ages can ruin the enthusiasm for chess and change the future.

    0
    [ANN] Latency Indicators

    Latency, aka Roundtrip Time (RTT) or Time To Load (TTL), is the time it takes for the instance to respond to an HTTP request.

    ---

    Latency indicators have been added to the instance health breakdown dashboard, allowing you to view the latency of your favourite instance compared to itself:

    • Past 3 hours compared to the past 7 days
    • Past 24 hours compared to the past 30 days
    • Past 24 hours compared to the past 90 days

    ---

    Screenshot 1

    !

    Screenshot 2

    !

    0
    General Programming Discussion @lemmy.ml bahmanm @lemmy.ml
    [ANN] bmakelib v0.6.0 with enums
    github.com Release v0.6.0 · bahmanm/bmakelib

    The highlight of this release is the introduction of enum (aka variants or options) which can be used to limit and validate a variable's value. For example: Makefile: define-enum : bmakelib.enum.de...

    Release v0.6.0 · bahmanm/bmakelib

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

    > bmakelib is a collection of useful targets, recipes and variables you can use to augment your Makefiles. > > --- > > I just released bmakelib v0.6.0 w/ the main highlight being the ability to define enums and validate variable values against them. > > --- > > ➤ Makefile: > > Makefile > define-enum : bmakelib.enum.define( DEPLOY-ENV/dev,staging,prod ) > include define-enum > > deploy : bmakelib.enum.error-unless-member( DEPLOY-ENV,ENV ) > deploy : > @echo 🚀 Deploying to $(ENV)... > > > ➤ Shell: > > text > $ make ENV=local-laptop deploy > *** 'local-laptop' is not a member of enum 'DEPLOY-ENV'. Stop. > > $ make ENV=prod deploy > 🚀 Deploying to prod... >

    0
    [ANN] Uptime indicators

    As of a couple of days ago, uptime indicators have been added to the health breakdown page allowing you to glance at the availability of the instance during the past 7, 30 and 90 days.

    Screenshot 1

    !

    Screenshot 2

    !

    2
    Would you be interested in opting-in to lemmy-meter?
  • UPDATE: lemmy.ml is now on lemmy-meter 🥳

  • No money but want to contribute
  • Good question!

    IMO a good way to help a FOSS maintainer is to actually use the software (esp pre-release) and report bugs instead of working around them. Besides helping the project quality, I'd find it very heart-warming to receive feedback from users; it means people out there are actually not only using the software but care enough for it to take their time, report bugs and test patches.

  • [ANN] lemmy-synapse v1.0.0
  • "Announcment"

    It used to be quite common on mailing lists to categorise/tag threads by using subject prefixes such as "ANN", "HELP", "BUG" and "RESOLVED".

    It's just an old habit but I feel my messages/posts lack some clarity if I don't do it 😅

  • [ANN] lemmy-synapse v1.0.0
    github.com Release v1.0.0 · bahmanm/lemmy-synapse

    The very first stable version of lemmy-synapse 🎉 What is lemmy-synapse A humble bundle of observability and monitoring for your Lemmy cluster. Read more ... What's included Docker stats dashboard ...

    Release v1.0.0 · bahmanm/lemmy-synapse

    lemmy-synapse is a light-weight observability and monitoring stack for Lemmy servers.

    ---

    Using Prometheus and Grafana, it allows the admins to visualise and query the stats of their instance. v1.0.0 comes out of the box with 3 detailed dashboards:

    • Host stats (CPU, RAM, disk, network, ...)
    • PostgreSQL stats (connections, locks, transations, queries, ...)
    • Docker stats (container CPU, RAM, disk, network, OOM signals, ...)

    ---

    It runs as Docker compose cluster alongside the Lemmy cluster and does not require any changes to it in most cases. Uninstalling lemmy-synapse is as easy as tearing down its cluster and deleting its installation directory.

    ---

    Got questions/feedback? Pray drop a line:

    2
    [POLL] lemmy-meter.info alerts for instance admins

    As an instance admin, would you be interested in receiving alerts in case lemmy-meter detects your instance's health has deteriorated?

    The alerts could be sent to any combination of

    • a Matrix chat (private or channel)
    • a Discord server
    • an e-mail address

    For example, you could receive an alert if the landing page hasn't been loading for the past 5 minutes.

    ---

    The details of alerting levels and the conditions that'd trigger them will be ironed out later. At this stage I'd mostly would like to know if there's interest in this feature in the first place before getting to the implementation.

    ---

    Follow up on https://github.com/bahmanm/lemmy-meter/issues/71

    0
    How do you comment your makefiles?
  • I usually capture all my development-time "automation" in Make and Ansible files. I also use makefiles to provide a consisent set of commands for the CI/CD pipelines to work w/ in case different projects use different build tools. That way CI/CD only needs to know about make build, make test, make package, ... instead of Gradle/Maven/... specific commands.

    Most of the times, the makefiles are quite simple and don't need much comments. However, there are times that's not the case and hence the need to write a line of comment on particular targets and variables.

  • GNU Make - Unconditionally run a target before any other targets
  • Can you provide what you mean by check the environment, and why you’d need to do that before anything else?

    One recent example is a makefile (in a subproject), w/ a dozen of targets to provision machines and run Ansible playbooks. Almost all the targets need at least a few variables to be set. Additionally, I needed any fresh invocation to clean the "build" directory before starting the work.

    At first, I tried capturing those variables w/ a bunch of ifeqs, shells and defines. However, I wasn't satisfied w/ the results for a couple of reasons:

    1. Subjectively speaking, it didn't turn out as nice and easy-to-read as I wanted it to.
    2. I had to replicate my (admittedly simple) clean target as a shell command at the top of the file.

    Then I tried capturing that in a target using bmakelib.error-if-blank and bmakelib.default-if-blank as below.

    ##############
    
    .PHONY : ensure-variables
    
    ensure-variables : bmakelib.error-if-blank( VAR1 VAR2 )
    ensure-variables : bmakelib.default-if-blank( VAR3,foo )
    
    ##############
    
    .PHONY : ansible.run-playbook1
    
    ansible.run-playbook1 : ensure-variables cleanup-residue | $(ansible.venv)
    ansible.run-playbook1 : 
    	...
    
    ##############
    
    .PHONY : ansible.run-playbook2
    
    ansible.run-playbook2 : ensure-variables cleanup-residue | $(ansible.venv)
    ansible.run-playbook2 : 
    	...
    
    ##############
    

    But this was not DRY as I had to repeat myself.

    That's why I thought there may be a better way of doing this which led me to the manual and then the method I describe in the post.


    running specific targets or rules unconditionally can lead to trouble later as your Makefile grows up

    That is true! My concern is that when the number of targets which don't need that initialisation grows I may have to rethink my approach.

    I'll keep this thread posted of how this pans out as the makefile scales.


    Even though I’ve been writing GNU Makefiles for decades, I still am learning new stuff constantly, so if someone has better, different ways, I’m certainly up for studying them.

    Love the attitude! I'm on the same boat. I could have just kept doing what I already knew but I thought a bit of manual reading is going to be well worth it.

  • How do you comment your makefiles?
  • That's a great starting point - and a good read anyways!

    Thanks 🙏

  • General Programming Discussion @lemmy.ml bahmanm @lemmy.ml
    How do you comment your makefiles?

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

    > Fed up w/ my ad-hoc scripts to display the targets and variables in a > makefile(s), I've decided to write a reusable piece of code to do > that: https://github.com/bahmanm/bmakelib/issues/81 > > --- > > The first step toward that would be to understand the common commenting styles. So far I have identified 4 patterns in the wild which you can find below. > > Are there any style guides/conventions around this topic? Any references > to well-written makefiles I can get inspiration from? > > --- > > ### A > > > VAR1 = foo ## short one-liner comment > my-target: ## short one-liner comment > … > > > ### B > > > # longer comment which > # may span > # several lines > VAR1 = foo > > ## comments can be prefixed w/ more than # > ## lorem ipsum dolor > my-target: > … > > > ### C > > > ##### > # a comment block which is marked w/ several #s on > # an otherwise blank line > ##### > VAR1 = foo > > > ### D > > > ##### > #> # heading 1 > # This is a variation to have markdown comments > # inside makefile comments. > # > # ## It's a made-up style! > # I came up w/ this style and used it to document `bmakelib`. > # For example: https://is.gd/QtiqyA (opens github) > #< > ##### > VAR1 = foo >

    4
    General Programming Discussion @lemmy.ml bahmanm @lemmy.ml
    GNU Make - Unconditionally run a target before any other targets
    www.bahmanm.com GNU Make - Unconditionally run a target before any other targets

    When writing a (GNU) Makefile, there are times when you need a particular target(s) to be run before anything else.

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

    > > When writing a (GNU) Makefile, there are times when you need a particular target(s) to be run before anything else. That can be for example to check the environment, ensure variables are set or prepare a particular directory layout. > > > >... take advantage of GNU Make's mechanism of includeing and makeing makefiles which is described in details in the manual:

    4
    How to audit a shell-completion script?
  • Agree w/ you re trust.

  • How to audit a shell-completion script?
  • Thanks. At least I've got a few clues to look for when auditing such code.

  • General Programming Discussion @lemmy.ml bahmanm @lemmy.ml
    How to audit a shell-completion script?

    I just stumbled upon a collection of bash completions which can be quite handy: https://github.com/perlpunk/shell-completions

    I tried mojo, cpan and pip completions in a sandbox and they worked like a charm!

    The only question I've got is, has anyone ever done a security audit of the repository? Anyone has taken the time to look at the code? I could try auditing but I'm not even sure what to look for.

    I feel quite wary of letting an unknown source access to my bash session and what I type.

    4
    Sicilian Defense: Hyperaccelerated Dragon, Fianchetto, Pterodactyl Defense
  • I'm not an 1.e4 or Sicilian player but this smells like wild tactical variations early in the game.

  • Would you be interested in opting-in to lemmy-meter?
  • Done ✅

    Thanks for your interest 🙏


    Please do drop a line in either !lemmy_meter@lemmy.ml or #lemmy-meter:matrix.org if you've got feedback/ideas for a better lemmy-meter. I'd love to hear them!


    Oh and feel free to link back to lemmy-meter from Blåhaj if you'd like to, in case you'd prefer the community to know about it.

  • [HELP] v1.0.0-beta is out - would love your feedback/comments

    With most of the initial tasks done, I think 🌎 lemmy-meter.info is in a good place now.

    I just tagged v1.0.0-beta on the repository and will be focused mainly on polishing things and fixing potential bugs in the coming days before the release of v1.0.0.

    In the meantime, I'd love to know about your experience using lemmy-meter and any feedback/ideas you may have about the current version or any future versions.

    Thanks in adavnce 🙏

    0
    Would you be interested in opting-in to lemmy-meter.info?
  • Update 1

    ttrpg.network is now on lemmy-meter 🥳 Thanks for your interest 🙏

  • Would you be interested in opting-in to lemmy-meter.info?
  • To be precise, it's not 4 requests to the same endpoint.

    lemmy-meter probes 4 endpoints each once per minute:

    • The landing page
    • api.getPosts (limit=1)
    • api.getComments (limit=1)
    • api.getCommunities (limit=1)

    That's b/c I've frequently experienced cases when the landing page works but some mobile APIs don't and vice versa.

    Hope that makes sense.


    As I said, if after some time you feel like this is too much load, reach out to me and I can easily configure lemmy-meter to probe less frequently.

  • Would you be interested in opting-in to lemmy-meter.info?
  • Update 1

    lemmy.one is added to lemmy-meter 🥳


    Please do reach out if you've got feedback/suggestions/ideas for a better lemmy-meter 🙏

    You can always find me and other interested folks in

  • Would you be interested in opting-in to lemmy-meter.info?
  • Oh, sorry to hear that 😕

    I think I'll just go ahead and add you folks to lemmy-meter for now. In case you want to be removed, it should take only a few minutes.

    I'll keep this thread posted once things are done.

  • [HELP] ICCF Champions League - How to register

    I'm interested in registering for the tournament but I've got no clue as to where to begin? Where can I find the list of teams? How can I request to join a team?

    I'd appreciate any help/hint 🙏

    0
    Would you be interested in opting-in to lemmy-meter.info?

    Cross-posted from https://lemmy.ml/post/5719058

    ---

    I've been working on a simple opt-in solution, primarily for Lemmy end users like me (but also helpful for admins), to easily check the status/health of their favourite instance.

    🌎 lemmy-meter.info

    You can find the details of the implementation in ! lemmy-meter github repo.

    ---

    ❓ @admins: would you be interested in adding your instance to lemmy-meter?

    You don't need to do anything except confirming - I'll handle the rest. It should only take a few minutes for your instance to show up in lemmy-meter.

    Out of the box it will send only 4 HTTP GET requests per minute to your instance. However that is totally configurable if it sounds too much or too little.

    ---

    5
    What is lemmy-meter?

    💪 lemmy-meter aspires to be a one-stop webapp for Lemmy end-users (and hopefully admins), to check the status of their favourite instances.

    ---

    💡 The main idea is to provide the health check information in a opt-in way that is easy consume at a first glance (simple gauges) while offering users and power users more details in case they are interested.

    ---

    lemmy-meter is NOT affiliated w/ the Lemmy project.

    ---

    𝜷 Currently, lemmy-meter is in the beta stage while I'm working on proper documentation and mobile-friendly design.

    ---

    ! lemmy-meter is licensed under GPLv3 and is available on github.

    0
    Would you be interested in opting-in to lemmy-meter.info?

    Cross-posting from https://lemmy.ml/post/5719058

    ---

    I've been working on a simple opt-in solution, primarily for Lemmy end users like me (but also helpful for admins), to easily check the status/health of their favourite instance.

    🌎 lemmy-meter.info

    You can find the details of the implementation in lemmy-meter github repo.

    ---

    ❓ @admins: would you be interested in adding your instance to lemmy-meter?

    You don't need to do anything except confirming - I'll handle the rest. It should only take a few minutes for your instance to show up in lemmy-meter.

    Out of the box it will send only 4 HTTP GET requests per minute to your instance. However that is totally configurable if it sounds too much or too little.

    3
    Lemmy.ca Support / Questions @lemmy.ca bahmanm @lemmy.ml
    Would you be interested in opting-in to lemmy-meter?

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

    > Follow up on a previous post: [DISCUSS] Recent momentary outages > > --- > > I've been working on a simple opt-in solution, primarily for Lemmy end users like me (but also helpful for admins), to easily check the status/health of their favourite instance. > > 🌎 lemmy-meter.info > > You can find the details of the implementation in lemmy-meter github repo. > > --- > > ❓ @admins: would you be interested in adding your instance to lemmy-meter? > > You don't need to do anything except confirming - I'll handle the rest. It should only take a few minutes for your instance to show up in lemmy-meter. > > Out of the box it will send only 4 HTTP GET requests per minute to your instance. However that is totally configurable if it sounds too much or too little. > > --- > > PS: I wasn't sure how to reach out to the admins short of messaging them individually.

    0
    hexbear @hexbear.net bahmanm @lemmy.ml
    Would you be interested in opting-in to lemmy-meter?

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

    > Follow up on a previous post: [DISCUSS] Recent momentary outages > > --- > > I've been working on a simple opt-in solution, primarily for Lemmy end users like me (but also helpful for admins), to easily check the status/health of their favourite instance. > > 🌎 lemmy-meter.info > > You can find the details of the implementation in lemmy-meter github repo. > > --- > > ❓ @admins: would you be interested in adding your instance to lemmy-meter? > > You don't need to do anything except confirming - I'll handle the rest. It should only take a few minutes for your instance to show up in lemmy-meter. > > Out of the box it will send only 4 HTTP GET requests per minute to your instance. However that is totally configurable if it sounds too much or too little. > > --- > > PS: I wasn't sure how to reach out to the admins short of messaging them individually.

    0
    [DONE] Would you be interested in opting-in to lemmy-meter?
  • Update

    sh.itjust.works in now added to lemmy-meter 🥳 Thanks all.

  • [Help] go and perl5 folders in ~/
  • I didn't like the capitalised names so configured xdg to use all lowercase letters. That's why ~/opt fits in pretty nicely.

    You've got a point re ~/.local/opt but I personally like the idea of having the important bits right in my home dir. Here's my layout (which I'm quite used to now after all these years):

    $ ls ~
    bin  
    desktop  
    doc  
    downloads  
    mnt  
    music  
    opt 
    pictures  
    public  
    src  
    templates  
    tmp  
    videos  
    workspace
    

    where

    • bin is just a bunch of symlinks to frequently used apps from opt
    • src is where i keep clones of repos (but I don't do work in src)
    • workspace is a where I do my work on git worktrees (based off src)
  • Linux Mint Debian Edition officially released
  • Thanks! So much for my reading skills/attention span 😂

  • Linux Mint Debian Edition officially released
  • Which Debian version is it based on?

  • [DONE] Would you be interested in opting-in to lemmy-meter?

    Follow up on a previous post: [DISCUSS] Recent momentary outages

    ---

    I've been working on a simple opt-in solution, primarily for Lemmy end users like me (but also helpful for admins), to easily check the status/health of their favourite instance.

    🌎 lemmy-meter.info

    You can find the details of the implementation in lemmy-meter github repo.

    ---

    ❓ @admins: would you be interested in adding your instance to lemmy-meter?

    You don't need to do anything except confirming - I'll handle the rest. It should only take a few minutes for your instance to show up in lemmy-meter.

    Out of the box it will send only 4 HTTP GET requests per minute to your instance. However that is totally configurable if it sounds too much or too little.

    ---

    PS: I wasn't sure how to reach out to the admins short of messaging them individually.

    2
    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.

    Posts 76
    Comments 189
    Moderates