Programming: JS, Java, Rust and Lots More

-
QMI and MBIM in Python, Javascript…
The libqmi and libmbim libraries are every day getting more popular to control your QMI or MBIM based devices. One of the things I’ve noticed, though, is that lots of users are writing applications in e.g. Python but then running qmicli or mbimcli commands, and parsing the outputs. This approach may work, but there is absolutely no guarantee that the format of the output printed by the command line programs will be kept stable across new releases. And also, the way these operations are performed may be suboptimal (e.g. allocating QMI clients for each operation, instead of reusing them).
Since the new stable libqmi 1.26 and libmbim 1.24 releases, these libraries integrate GObject Introspection support for all their types, and that provides a much better integration within Python applications (or really, any other language supported by GObject Introspection).
The only drawback of using the libraries in this way, if you’re already using and parsing command line interface commands, is that you would need to go deep into how the protocol works in order to use them.
-
NodeJS on Ubuntu: Installation and First Steps
Every time we read something about web development, the subject of NodeJS always comes up. But this is not bad, because it is quite an important technology that is the basis of many current applications. So if you want to develop web applications you probably need to install NodeJS on Ubuntu or another system.
NodeJS is a server-side implementation of javascript. It is event-driven and asynchronous so it is often used as a partial replacement for PHP.
NodeJS is cross-platform so installing it on Ubuntu is not difficult. However, it is always useful to know.
-
Top 10 Java stories of May: TIOBE Index, Spring Boot 2.3, Java 16 plans & more
Every month, we take a look back at our top ten most clicked topics. Last month was packed full of exciting news such as more info on Java 16 with its upcoming migration to Git and GitHub. Other top news include interviews on the programming language Julia, the visualization platform Grafana and the Node alternative Deno. In May, we also learned how to analyze big data using Java and saw C pass Java in the monthly TIOBE Index.
-
This Week in Rust 341
-
Programming languages: Rust enters top 20 popularity rankings for the first time
Programming language Rust has entered the top 20 of the Tiobe popularity index for the first time, but it's still five spots behind systems programming rival Go.
[...]
Paul Jansen, CEO of Tiobe software, said Rust's rise is because it's a systems programming language that is "done right".
"All the verbose programming and sharp edges of other languages are solved by Rust while being statically strongly typed. Its type system prevents run-time null pointer exceptions and memory management is calculated compile-time," said Jansen.
"So no garbage collection that suddenly kicks in. We have D, Lua and Julia trying to beat C and C++, but Rust seems to be the first one to come really close."
[...]
The rankings roughly line up with Stack Overflow's list of most commonly used languages, which were JavaScript, HTML/CSS, SQL, Python, Java, Bash/Shell/PowerShell, C#, PHP, TypeScript, C++, C, and Go.
-
The joys and perils of aliasing in C and C++, Part 2
In the previous article, I discussed the benefits of C and C++ language restrictions in optimized code. In this second half, I present a variety of programming language exemptions and compiler extensions that developers can use to get around aliasing restrictions more or less safely. I will also discuss the common pitfalls of aliasing, both resulting from the extensions as well as from misuses of standard language constructs, and illustrate common problems these pitfalls might cause.
-
Status update - Tie up loose ends before starting
Besides e-mail, IRC chat, and Telegram, my mentor (Siqueira) and I are meeting every Wednesday on Jitsi, where we also use tmate for terminal sharing. We also use, together with Trevor, a spreadsheet to schedule tasks, report my daily activity, and write any suggestions.
[...]
My first project task is to find out why it is not possible to access debugfs files when running kms_cursor_crc (and fix it). Two things could help me solve it: learning about debugfs and dissecting kms_cursor_crc. To guide my studies, my mentor suggested taking a look at a patchset for the IGT write-back test implementation that CI reported a crash on debugfs_test for i915. For this investigation, I installed on another machine (an old netbook) a Debian without a graphical environment, and, accessing via ssh, I applied the patches and ran the test. Well, everything seemed to work (and the subtests passed). Perhaps something has been fixed or changed in IGT since the patchset was sent. Nothing more to do here.
-
littler 0.3.10: Some more updates
The eleventh release of littler as a CRAN package is now available, following in the fourteen-ish year history as a package started by Jeff in 2006, and joined by me a few weeks later.
littler is the first command-line interface for R as it predates Rscript. It allows for piping as well for shebang scripting via #!, uses command-line arguments more consistently and still starts faster. It also always loaded the methods package which Rscript only started to do in recent years.
littler lives on Linux and Unix, has its difficulties on macOS due to yet-another-braindeadedness there (who ever thought case-insensitive filesystems as a default where a good idea?) and simply does not exist on Windows (yet – the build system could be extended – see RInside for an existence proof, and volunteers are welcome!). See the FAQ vignette on how to add it to your PATH.
-
Exploring Algol 68 in the 21st century
Perhaps this quote carries particular weight for me as I, too, was a first-year student in 1973-1974, though at a different institution—the University of British Columbia. Moreover, "back in those days," the introductory computer science course at UBC was taught in the second year using Waterloo FORTRAN with a bit of IBM 360 Assembler thrown in; nothing so exotic as Algol 68. In my case, I didn't encounter Algol 68 until my third year. Maybe this wait, along with experiences in other programming languages, contributed to my lifelong fascination with this underrated and wonderful programming language. And thanks to Marcel van der Veer, who has created a very fine implementation of Algol 68 called Algol 68 Genie, that is now in my distro's repositories, at long last, I've been able to explore Algol 68 at my leisure. I should also mention that Marcel's book, Learning Algol 68 Genie, is of great utility both for newcomers and as a refresher course in Algol 68.
-
Float/String Conversion in Picolibc: Enter “Ryū”
I recently wrote about this topic having concluded that the best route for now was to use the malloc-free, but imprecise, conversion routines in the tinystdio alternative.
-
Jonathan Dowland: using Template Haskell to generate boilerplate
Here's a practical example of applying Template Haskell to reduce the amount of boilerplate code that is otherwise required. I wrote the below after following this excellent blog post by Matt Parsons. This post will be much higher-level, read Matt's blog for the gorier details.
-
Learning APIs with curl: Posting to social media
To demonstrate how to utilize curl in a real-world scenario, here's a quick example of interacting with a social network platform. Mastodon is an open-source, federated social network and microblogging platform, and features a rich API to read, write, and manage your account. Other social networks may have similar features, and while the exact API commands differ from site to site, Mastodon provides a reasonable example of the process, and in just three simple steps.
If you want to try this process yourself, you must sign up for a Mastodon account (and if you do, be sure to follow the opensource.com bot to see a shell and curl-based bot in action).
-

- Login or register to post comments
Printer-friendly version- 2488 reads
PDF version
More in Tux Machines
- Highlights
- Front Page
- Latest Headlines
- Archive
- Recent comments
- All-Time Popular Stories
- Hot Topics
- New Members
digiKam 7.7.0 is released
After three months of active maintenance and another bug triage, the digiKam team is proud to present version 7.7.0 of its open source digital photo manager. See below the list of most important features coming with this release.
|
Dilution and Misuse of the "Linux" Brand
|
Samsung, Red Hat to Work on Linux Drivers for Future Tech
The metaverse is expected to uproot system design as we know it, and Samsung is one of many hardware vendors re-imagining data center infrastructure in preparation for a parallel 3D world.
Samsung is working on new memory technologies that provide faster bandwidth inside hardware for data to travel between CPUs, storage and other computing resources. The company also announced it was partnering with Red Hat to ensure these technologies have Linux compatibility.
|
today's howtos
|








.svg_.png)
Content (where original) is available under CC-BY-SA, copyrighted by original author/s.

Recent comments
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago