is-odd
guix
Our great sponsors
is-odd | guix | |
---|---|---|
19 | 48 | |
155 | 271 | |
- | 0.7% | |
0.0 | 3.5 | |
about 5 years ago | 4 months ago | |
JavaScript | Scheme | |
MIT License | GNU General Public License v3.0 only |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
is-odd
-
Why Does 'Is-Number' Package Have 59M Weekly Downloads?
Ridiculous as it may be, my guess is that provides a unified way of number checking while avoiding the pitfalls or crazy consequences which could arise from divide-by-zero[1], which I guess might prevent less-experienced folks from tripping up on some of the Javascript gotchas? I'm not really sure. That being said, I have seen those package dependencies in some serious stuff.
Do I agree? I'm not really sure to be honest. Probably not.
[0] https://github.com/i-voted-for-trump/is-odd/blob/master/READ...
[1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
-
Weekly downloads of npm is-odd package
it gets worse: https://github.com/i-voted-for-trump/is-odd/blob/master/index.js
-
my first pull request got merged in a 2k stars project
So it disappeared and node apps stop building and it was a huge fiasco getting it restored. Just for reference, https://github.com/i-voted-for-trump/is-odd is a current fork of it and it has 34M downloads.
-
/* This post is a dig at Elon Musk who allegedly ranked employees by the number of lines they wrote. I then added some obviously made up code to hammer home the point that line counts don't always indicate good employees. I also added this 300 character title in case Reddit ranks by title length. */
Checks of this extensiveness would be mad for such a simple library. I mean, who would use a library with that extensive checks?
-
Vendor by Default (2021)
I think that this approach would cut down the amount of JS dependencies significantly. Things like is-even and is-odd come to mind. You don't want another leftpad or colors.js to happen to you and minimising dependencies is the most effective strategy to accomplish that.
So many leaf dependencies I've looked into are no more than a Stackoverflow answer in a JS file accompanied by six or seven metadata files (package.json + typescript files + linter config + readme + git config + ...). This file: https://github.com/i-voted-for-trump/is-odd/blob/master/inde... is downloaded over 400000 times per week (https://www.npmjs.com/package/is-odd) and while I don't have anythimg against the author for publishing a helpers function, I don't see why I would expose my project to risking a supply chain attack for something so minor. Here's another, with millions of downloads: https://github.com/inspect-js/is-date-object/blob/main/index...
I know that these are all downloaded so ofyen because theyre dependencies of dependencies but I'd appreciate it if bigger libraries would provide a vendored version of their packages that just collects these microdependencies instead of wasting npm's time by making it manage these tiny helper files. Don't vendor stuff like React or Vue or whatever framework you prefer but for the love of God don't add a dependency for 50 lines of code. Sometimes copy/paste is the right solution.
- GLIBC update broke EAC for most games that use it
- Javascript libraries be like
-
Code Smell 138 - Packages Dependency
$ npm install --save is-odd // https://www.npmjs.com/package/is-odd // This package has about 500k weekly downloads // https://github.com/i-voted-for-trump/is-odd/blob/master/index.js module.exports = function isOdd(value) { const n = Math.abs(value); return (n % 2) === 1; };
-
Oops!
I started reading your comment curious about the source code. But I finished reading your comment only more curious. So I went to GitHub's "is-odd" and I've come back to give everyone *is-odd'*s source code in it's entirety. And here it is:
- I made a Chrome extension to understand code in plain English
guix
- Nix – A One Pager
-
Pkl, a Programming Language for Configuration
> So what we are missing now is a 500GB framework that can write the config file for the programming language that is writing a config file for the actual program I wish to use.
That exists since 1960. It's called LISP. The e.g. https://guix.gnu.org/ uses with great success, the Guile Scheme dialect of LISP, to be precise. And FYI the "framework" is:
$ ls --human-readable --size $(readlink $(which guile))
-
NixOS: Declarative Builds and Deployments
> inventing a brand new purely functional language programming language.
ISTM that if you dislike that, then there's GUIX.
https://guix.gnu.org/
Very briefly, AFAICT, it's "Nix but using Scheme".
-
Linux saved my life
And just wait till you discover Arch Linux, Gentoo, Guix, or NixOS.
-
The nicest web browser of 2023 uses Lisp.
https://guix.gnu.org for example. It did load before an update but it doesn't anymore.
-
Java community welcomes kotlin, c/c++ community welcome rust and go and Javascript community welcomes typscript except emacs community who still refuse to welcome gnu guile.
Is it? Seems to me it's used for some pretty cool stuff, heard of Guix?
-
Lua: The Little Language That Could
I think a "competitor" to Lua would be Guile [1], but I am not sure if it gets close to Lua in terms of lightweightness... it was designed to be used in the GNU project, with similar objects as Lua: to be light, easily embeddable. It's a Scheme (Lisp) so maybe not for everyone's taste... its "coolest" use i know of is for configuring Guix [2] (the GNU version of Nix).
[1] https://www.gnu.org/software/guile/
[2] https://guix.gnu.org
-
Immutable OS suggestions
No one said Guix yet, might be worth a look: https://guix.gnu.org/
-
What are some of the more innovative linux distributions?
GNU Guix! A fully functional package manager and distro heavily inspire by Nix. The primary difference between it and Nix being that it is almost entirely written and configured in GNU Guile, an implementation of Scheme (Lisp) and the official extension language of the GNU Project (originally intended to be for GNU what emacs lisp is for emacs).
-
Rust Offline?
You should perhaps utilize guix for your projects. It provides rather acceptable rust resp. crates support and in a perfectly reproducible build environment. But be aware, that it even tries to build even the rust compiler from source by going through all this nasty steps of its iterative bootstrap process. This can be a little bit complex and time-consuming, if you need an up-to-date version of rustc.
What are some alternatives?
FizzBuzz Enterprise Edition - FizzBuzz Enterprise Edition is a no-nonsense implementation of FizzBuzz made by serious businessmen for serious business purposes.
nix - Nix, the purely functional package manager
deno-puppeteer - A port of puppeteer running on Deno
t2sde - T2 SDE Linux
is-even - I created this in 2014, when I was learning how to program.
live-bootstrap - Use of a Linux initramfs to fully automate the bootstrapping process
is-number - JavaScript/Node.js utility. Returns `true` if the value is a number or string number. Useful for checking regex match results, user input, parsed strings, etc.
ungoogled-chromium - Google Chromium, sans integration with Google
micromatch - Highly optimized wildcard and glob matching library. Faster, drop-in replacement to minimatch and multimatch. Used by square, webpack, babel core, yarn, jest, ract-native, taro, bulma, browser-sync, stylelint, nyc, ava, and many others! Follow micromatch's author: https://github.com/jonschlinkert
steam-runtime - A runtime environment for Steam applications
xUnit - xUnit.net is a free, open source, community-focused unit testing tool for .NET.
ublue - A familiar(ish) Ubuntu desktop for Fedora Silverblue.