cloc
kilo
Our great sponsors
cloc | kilo | |
---|---|---|
28 | 18 | |
18,452 | 7,106 | |
- | - | |
8.7 | 0.0 | |
about 1 month ago | 3 months ago | |
Perl | C | |
GNU General Public License v3.0 only | BSD 2-clause "Simplified" License |
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.
cloc
- cloc counts blank lines, comment lines, and physical lines of source code in many programming languages
-
Underrated tools & practices
Cloc - https://github.com/AlDanial/cloc
-
Show HN: Cloc as a Service
and get the results on the cli.
Let me know what you think. :)
0: https://github.com/AlDanial/cloc
-
erdtree: A modern, multi-threaded, and ️🌈aesthetic️🌈 alternative to tree and du - v1.7.0 release ️
Awesome stuff, thank you! I‘d love some flags/options for cloc integration if it can be detected, maybe a summary of the top N languages for directories (67% Rust, 13% Html, 9% Bash) or something. Just a suggestion/idea. Gonna install it anyway, it‘s shiny!
- How can I see what % of my project is written in Kotlin vs Java?
-
I created a Blazor server-side application that has processed its first $1k in sales volume
The solution I am using is currently comprised of 145 projects, 141k+ lines of C#, and 37k+ lines of Razor, courtesy of cloc:
-
Can anyone give me an idea of the size ration between a high level language and assembly code?
Just out of curiosity, I downloaded the latest version of GNU coreutils and compared the line count between a few source files and the resulting disassembled object files (using cloc to exclude blank lines and comments). It looks like the ratio is very approximately 2 assembly instructions per line of C code. Obviously, that will depend a lot on what the code is doing and the coding style.
-
Take More Screenshots
When I started making a game [0] last year, first thing I did was write a little Unity script that takes a screenshot of the opening scene, counts current lines of code using CLOC [1] (for fun, not as a true measure of anything), and occasionally renders it all out to an image file.
With that I'm able to create some pretty fun time lapses of progress. I've been doing this at an arbitrary milestone, whenever my Luau [2] LOC surpasses C++ by another factor. This post reminded me I'm overdue for another now that Luau > 3x C++ LOC.
I find it rewarding to look back at my progress. I'll share in case it's interesting for you too [3].
[0] https://store.steampowered.com/app/2168330/Helmscape/
[1] https://github.com/AlDanial/cloc
[2] https://luau-lang.org
[3] https://twitter.com/kineticpoet/status/1619508466212831232
-
Is there any way to get an average of number of lines added/removed (basically how large a change is) in user commits
My manager just asked me about this a few days ago (sigh) cloc is good for this - you can pass it a hash or two hashes and it will give you counts accordingly. https://github.com/AlDanial/cloc
-
350 Stars: A Categorization and Mega-Guide
Finally, since I'm limited on the character-length of this post, I'll post an individual comment for each year with a table of data. The "All Rank" column will rank the problem by difficulty (measured by leaderboard close time) across all years, with 1 being longest. The "Yr Rank" column will be similar, but ranked only within that year. The "P1 LOC" and "P2 LOC" columns show the numbers of lines of code in my solutions for each part as measured by cloc (each part is stand-alone so there will be some duplication, especially for Intcode). Other columns should be self-explanatory.
kilo
-
A nano like text editor built with pure C
Most of that is probably attributable to being based on Kilo: https://github.com/antirez/kilo (kinda strange they didn't link directly in their readme) - a tiny text editor written by antirez who notably also created Redis. Antirez has a bunch of really interesting side projects if you dig into their github repo.
-
Micro – A Modern Alternative to Nano
Yeah, "micro" for an editor would be 11 kilo bytes. I bet it's possible to do a half-decent editor in C in 11KB. Antirez's "kilo" (~1000 lines of C) is 36KB when compiled with standard gcc (https://github.com/antirez/kilo).
That said, for many server-type use cases these days, 11MB isn't a huge deal. Still, I wonder if micro could be compiled on / ported to TinyGo and end up a few hundred KB? It looks like TinyGo can produce some pretty small binaries: https://tinygo.org/docs/guides/optimizing-binaries/
- Ask HN: Does this exist? Courses explaining well written codebases?
-
What happens when you press a key in your terminal?
Anyone interested in the machinations of all of this terminal stuff should look at antirez’ kilo, a terminal text editor in under 1000 lines of code: https://github.com/antirez/kilo
There is a nice tutorial that walks through how one might write it from scratch: https://viewsourcecode.org/snaptoken/kilo/
-
Vim sucks
kilo 1k of C
-
A simple terminal game
I always wondered how people get stuff animated on the terminal but I never had the time to look into it up until a few years ago when someone on the internet released an awesome guide on how to create a text editor in less than 1000 lines of C. What caught my attention about this was that it was based on Antirez' kilo - which is a terminal based editor.
-
Ask HN: How to learn about text editor architectures and implementations?
You could start by looking at something super simple like Kilo:
https://github.com/antirez/kilo
Even I could understand this one pretty well and that's no small matter.
-
Ginkgo: A WIP small text editor built entirely in Rust with cursor control and select Vim features
I just started learning Rust 2 weeks ago, and I wanted to apply my learning towards a project.Ginkgo is a small text editor built entirely in Rust. It takes inspiration from the famous tiny C-based text editor, Kilo. It also includes many Vim inspired keybindings and features such as normal/insert modes. For convenience, it also has added mouse cursor support!
- What would one need to know in order to develop an in-shell VIM like code editor?
-
Any interesting project ideas in c language
Write your own editor. As an example: kilo
What are some alternatives?
tokei - Count your code, quickly.
wasm3 - 🚀 A fast WebAssembly interpreter and the most universal WASM runtime
scc - Sloc, Cloc and Code: scc is a very fast accurate code counter with complexity calculations and COCOMO estimates written in pure Go
luastatic - Build a standalone executable from a Lua program.
sbcl - Mirror of Steel Bank Common Lisp (SBCL)'s official repository
luar - Script Kakoune using Lua
gui - Bitcoin Core GUI staging repository
wac - WebAssembly interpreter in C
kakoune-python-bridge - Send selections to python while keeping history of previous commands
visidata - A terminal spreadsheet multitool for discovering and arranging data
termux-create-package - Python script to create Termux packages easily.
sn - Simple Notes using fzf