programming

My ToDo List for 2024 (daily updates)

waffarx cash back

Zig Will Succeed

To understand why I say Zig will be a successful programming language, we need to know why all popular languages are that popular. How popular programming languages get popular ? 🔗 In a talk by Richard Feldman, he talked about why isn’t functional programming the norm . And he answered the question “how did they get popular?” by this answer. Killer App C as a systems programming language because UNIX is written in C.

Zig Programming Language

Zig is a general-purpose programming language and toolchain for maintaining robust, optimal, and reusable software. A Simple Language 🔗 Focus on debugging your application rather than debugging your programming language knowledge. No hidden control flow. No hidden memory allocations. No preprocessor, no macros. Comptime 🔗 A fresh approach to metaprogramming based on compile-time code execution and lazy evaluation. Call any function at compile-time. Manipulate types as values without runtime overhead. Comptime emulates the target architecture.

[OS] Windows 7, 8, 8.1, 10, 11

Microsoft Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for servers, and Windows IoT for embedded systems. Microsoft Windows for consumers has popular releases which are Windows XP, Windows 7, Windows 8.1, Windows 10 and the latest one, Windows 11. Microsoft developed Windows OS after DOS by Bill Gates.

Measuring website responsiveness : Interaction to Next Paint (INP), next year

There is web vitals which indicates the website health and performance. It is like health vitals in medicine which indicates the human health stats and performance metrics such as blood pressure. Core Web Vitals has many metrics such as First Contentful Paint (FCP), Largest Contentful Paint (LCP), Total Blocking Time (TBT) and Cumulative Layout Shift (CLS). Currently, we use First Input Delay (FID) to measure website responsiveness. But next year, we will use Interaction to Next Paint (INP) instead.

[OS] GNU Linux : A Whole Category of Operating Systems

GNU Linux is a category of all operating systems with a Linux kernel inside. The Linux kernel first released on September 17, 1991, by Linus Torvalds. GNU Linux operating systems are — for example — Ubuntu, Debian, Linux Mint, Arch Linux, Pop!_OS, Elementary OS, Fedora Linux, Zorin OS, Manjaro, RedHat Entreprise Linux (RHEL), Deepin, Solus. If you like any of them, you can try it out from a live bootable USB drive without installation.

[update][tutorial] reduce memory usage in Google Chrome Browser

Google Chrome informed me that the great suspender extension contains malware. Here is a screenshot of the malware alert. I installed this extension to save memory by suspending inactive tabs. But Google Chrome browser, now, has a similar functionality, so, I don’t need this extension anymore. I uninstalled the Chrome extension. Then checked Memory Saver option in Chrome Settings (as you can see in the below image). Memory Saver option is to free up memory from inactive tabs.

[tutorial] How to rate limit http requests in Laravel ?

Rate Limiting is the process of limiting the number of requests per minute sent to a web application is often necessary to protect against attacks trying to saturate your server or to brute force authentication forms. So Laravel framework has a rate limiting mechanism, which we will use now to rate limit http requests per minute for all routes or some of them. You can rate limit for all users or per user.

convert old('d') to $model->d in Laravel using regular expressions (RegEx)

While developing a website in PHP Laravel, I reused create.blade.php as edit.blade.php. So I need to edit some things, especially the input values. In create.blade.php we use old('something') to retain the current <input> value by the user. But in edit.blade.php we use $model->something to get the <input> value from the project backend. So, I need to convert every old() to $model. But I am too lazy to rewrite all of them manually.

Git Delete Remote Branch – How to Remove a Remote Branch in Git

To show branches, use git branch. If you want to show all branches even the remote ones, use git branch -a. To delete a branch, use git branch -d <branch-name>. If the branch name is refactor-feature-x, so the command will be git branch -d refactor-feature-x. But this command deletes the local branch only. The branch on your local machine. What about deleting the remote branch? The branch on the remote machine/repo.

[fixed] Error: lulu: uninstall script /Applications/LuLu.app/Contents/Resources/LuLu Uninstaller.app/Contents/MacOS/LuLu Uninstaller does not exist.

When I tried to upgrade LuLu the firewall with command brew upgrade lulu, I faced this error. Error: lulu: uninstall script /Applications/LuLu.app/Contents/Resources/LuLu Uni nstaller.app/Contents/MacOS/LuLu Uninstaller does not exist. Then thought of trying to remove/uninstall lulu, then re-install it. So, I ran brew remove --cask lulu using homebrew package manager. But the same error occurred. I thought maybe it did not upgrade as I did not use --cask in the first command.