Programming Leftovers


-
A limitation on what 'go install' can install (as of Go 1.18)
What is happening here is that internally, gospy uses packages from its own repository (module) and one of them, github.com/monsterxx03/gospy/pkg/term, in turn uses github.com/gizak/termui/v3. However, the github.com/monsterxx03/gospy module has a replace directive for this termui module that changes it to github.com/monsterxx03/termui/v3.
If you clone the repository and run 'go install' inside it, everything works and you wind up with a gospy binary in your $HOME/go/bin. However, as we see here 'go install ...@latest' works differently enough that the replace directive causes this error. To fix the problem (ie, to build gospy or any program like it), you must clone the repository and run 'go install' in the right place inside the repository.
(Alternately you can file bugs with the upstream to get them to fix this, for example by dropping the replace directive and directly using the replacement in their code. But if the upstream is neglected, this may not work very well.)
Unsurprisingly, there is a long standing but closed Go issue on this 'go install' behavior, cmd/go: go install cmd@version errors out when module with main package has replace directive #44840.
-
ongoing by Tim Bray · Small Tables
Computer programs organize bits and bytes into “data structures”. In software of any import, the data structures are usually more interesting than the code around them. This part of the Quamina Diary takes a close look at a very simple data structure that I have greatly enjoyed using to build finite automata, and which I think has lessons to teach; it’s called smallTable.
-
Difference between Brute Force and Dynamic Programming
-
Why do we need Prefix and Postfix notations?
Prefix notation is the notation in which operators are placed before the corresponding operands in the expression.
-
What To Do (And Not to Do) with Modeling Proportions/Fractional Outcomes
Limited dependent variables, or continuous variables with lower and upper bounds, are quite common in the social sciences but do not fit easily with existing statistical models. In this Rmarkdown document, I show why these issues are important to consider when modeling your data, discuss existing R packages useful for fitting these models, and also present ordbetareg, an R package with a new variant of Beta regression that builds on and simplifies existing approaches (see paper here that is forthcoming in Political Analysis). In essence, ordbetareg offers a drop-in replacement for OLS that respects the bounds of a dependent variable.
I will be presenting this post as part of Leanne Powner’s Methods Cafe workshops via Zoom on Friday, July 1st, at 12 pm EST. You can find more info on the workshop along with Zoom links here. You can also get a copy of the Rmarkdown document here if you want to run the file yourself.
Although I argue that ordbetareg is as useful or more useful than existing packages, I provide a broad overview in this document so that the reader can gain an appreciation for the range of work on this topic, as well as the pros and cons of existing models.
-
May 2022: “Top 40” New CRAN Packages | R-bloggers
One hundred seventy-nine new packages made it to CRAN in May. Here are my “Top 40” picks in twelve categories: Computational Methods, Data, Ecology, Epidemiology, Finance, Machine Learning, Networks, Science, Statistics, Time Series, Utilities, and Visualization.
-
How to Find Unmatched Records in R | R-bloggers
How to Find Unmatched Records in R?, To retrieve all rows in one data frame that do not have matching values in another data frame, use R’s anti_join() function from the dplyr package.
-
R Lille Group Organizer, Mickaël Canouil, Talks About Guiding New Users | R-bloggers
R Consortium talks to Mickaël Canouil about the idea of reproducible teaching tools, cross-platform support, and the use of package building in his community. Mickaël says one of the most important things we can do to ensure that a language stays relevant is to ensure that we have new people using the language.
-
Tips for Rearranging Columns in R | R-bloggers
Tips for Rearranging Columns in R, you might frequently want to reorder the columns in a data frame.
The select() function from the dplyr package, fortunately, makes this simple to accomplish.
-
Experimenting with Quarto
Quarto is the up-and-coming “next generation version of R Markdown” being developed by RStudio. It’s more or less a superset of R Markdown/knitr that’s suited to programming languages besides R. Quarto’s heading towards a 0.1, and I’ve started experimenting for a few client projects.
So far I like the system a lot, and at this point I really think Quarto’s worth a try; especially since it’s available with the recent versions of RStudio.
-
Algorithms with Predictions
The theoretical study of algorithms and data structures has been bolstered by worst-case analysis, where we prove bounds on the running time, space, approximation ratio, competitive ratio, or other measure that holds even in the worst case. Worst-case analysis has proven invaluable for understanding aspects of both the complexity and practicality of algorithms, providing useful features like the ability to use algorithms as building blocks and subroutines with a clear picture of the worst-case performance. More and more, however, the limitations of worst-case analysis become apparent and create new challenges. In practice, we often do not face worst-case scenarios, and the question arises of how we can tune our algorithms to work even better on the kinds of instances we are likely to see, while ideally keeping a rigorous formal framework similar to what we have developed through worst-case analysis.
A key issue is how we can define the subset of "instances we are likely to see." Here we look at a recent trend in research that draws on machine learning to answer this question. Machine learning is fundamentally about generalizing and predicting from small sets of examples, and so we model additional information about our algorithm's input as a "prediction" about our problem instance to guide and hopefully improve our algorithm. Of course, while ML performance has made tremendous strides in a short amount of time, ML predictions can be error-prone, with unexpected results, so we must take care in how much our algorithms trust their predictors. Also, while we suggest ML-based predictors, predictions really can come from anywhere, and simple predictors may not need sophisticated machine learning techniques. For example, just as yesterday's weather may be a good predictor of today's weather, if we are given a sequence of similar problems to solve, the solution from the last instance may be a good guide for the next.
-
The 7 Best Linux Text Editors and Gedit Alternatives [Ed: Truly terrible list. promotes Microsoft's proprietary software (spyware even), Microsoft's soon-to-be-dead editor that's bloat, and a bunch of non-free stuff before getting to good options]
Gedit, the default text editor for Ubuntu and the GNOME desktop environment, is a nifty little app that's pretty handy indeed. However, it's not the only text editor available to Linux users.
If you've been using Gedit for all these years, and want a text editor that's better suited to your needs, you should really consider switching to one of the other Linux editing apps. They're far more powerful and will make you twice, even thrice, as productive as before.
So, let's explore some of the best Linux text editors that are great Gedit alternatives.
-
Introduction Test::Excel
My first contribution to CPAN was Test::Excel. It was initiated as we had requirement for such at work at that time.
It has gone through many changes, thanks to all for reporting issues and providing patches..
-
Let's Get to Rework
Our new Hot-Air Rework Station is here along with a new LED Project Kit, RPi Picos, and Third-Hand Kit!
Hello, everyone! We're back this week with more new products! If you stopped by yesterday, you probably already know about the new Raspberry Pi announcement with the addition of wireless capabilities and headers on two unique Pico boards. On top of that, we have a brand new version of our popular Hot-Air Rework Station with a new set of features that modernizes the instrument for todays standards. Following that, we have have a new LED Project Kit that is ideal for developing minds to start in electronics, as well as a new third hand kit! Alright, let's jump in and take a closer look!
-

- Login or register to post comments
Printer-friendly version- 1502 reads
PDF version
More in Tux Machines
- Highlights
- Front Page
- Latest Headlines
- Archive
- Recent comments
- All-Time Popular Stories
- Hot Topics
- New Members
today's howtos
|
Open Hardware: XON/XOFF and Raspberry Pi Pico
|
Security Leftovers
|
How to Apply Accent Colour in Ubuntu Desktop
A step-by-step tutorial on how to apply accent colour in Ubuntu desktop (GNOME) with tips for Kubuntu and others.
|





This section of TuxMachines will no longer have new stories in it (with some caveats, including this post). To see the latest stories go to 

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

Recent comments
2 days 15 min ago
2 days 4 hours ago
2 days 4 hours ago
3 days 11 hours ago
3 days 12 hours ago
3 days 13 hours ago
3 days 13 hours ago
3 days 13 hours ago
3 days 16 hours ago
3 days 18 hours ago