scratch
busybox-w32
Our great sponsors
scratch | busybox-w32 | |
---|---|---|
51 | 16 | |
333 | 640 | |
- | - | |
9.0 | 9.2 | |
2 days ago | 3 days ago | |
C | C | |
The Unlicense | GNU General Public License v3.0 or later |
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.
scratch
- Windows XP dedicated image viewer?
-
What Happens Before the Main Function is Called ?
pbmview, an image viewer (windows subsystem).
-
A couple freestanding parsers in C99
For comparison (for those following along): https://github.com/skeeto/scratch/blob/master/parsers/qoi.c https://github.com/skeeto/scratch/blob/master/parsers/ini.c
- (POSIX) theory and practice of the useless use of cat
- [2023-05-19] Challenge #400 [Intermediate] Practical Numbers
-
Difference in accuracy when compiling in windows and linux
Another option I learned a couple years ago is embedding a UTF-8 manifest ([details])[https://github.com/skeeto/scratch/tree/master/libwinsane]. Also put the console in UTF-8 mode (SetConsoleOutputCP(CP_UTF8)), and you're done. Works on Windows 10 and later. This covers everything: argv is UTF-8 and fopen accepts UTF-8 paths. (This is exactly how CRTs should have worked all along.)
-
I made this small program in C :)
I was thinking more about this and I realized it's quite easy to do it in arbitrary precision, so here's my take: https://github.com/skeeto/scratch/blob/master/misc/bswap.c
-
Beside SDL, is there an easier way to just show a custom rectangle with text, cross-platform?
As was linked from my QOI article, here's my full decoder with comments: qoi.c. Each pixel decodes to a 32-bit integer, ABGR. That corresponds to SDL's SDL_PIXELFORMAT_ABGR8888. SDL_UpdateTexture copies that data into the texture's internal storage, and font is no longer needed. (In a real program I'd allocate it in a scratch arena, reset after initialization.)
-
GitHub - pmkenned/pmk_string: A simple string library in C
A recent, interesting experience with function+context allocation: For more than a decade, Windows accidentally exposed part of zlib in a public DLL, and (overly-)clever applications can exploit this as a "system zlib." Though it doesn't export the "end" functions, so cleanup seems impossible. However, custom allocation works, so doesn't matter. I plugged it into an arena.
- decompressing a .deflate file?
busybox-w32
- The Awk Programming Language, Second Edition
-
POSIX sh is a better interpreter than python
Even in environments such as win32, we have https://frippery.org/busybox/ that is just fucking awesome. Staying the size below an 1mb while being extremely fast. Unlike the shitty python package which has 40mb archive size and leave breadcrumbs for me to cleanup all over my filesystem.
-
The amount of times I have accidentally done this...
Win32 port is here: https://frippery.org/busybox/
-
God's developer console
Look into busybox for windows https://frippery.org/busybox/. Pretty bad ass even with it’s downsides of missing applets and such
-
Does vim suck on windows?
Vim by itself means no supporting unix environment. It's useful to call out to powerful external tools not present by default on Windows. I fill that gap with busybox-w32. It's not a big deal once solved.
-
looking for a graphics library
Sure, it's not necessary, but a few simple, nice tools (<600kiB for an entire suite of extended unix utilities) makes thing a whole lot simpler on a platform devoid of nice tools.
-
Compress lots of files into lots of individual files?
To operate on many files you'll need better tools than what Windows gives you. One option is busybox-w32 (important caveat: doesn't support unicode paths), which will get you some basic command line tools. For example, to gzip compress every file under the current directory, including subdirectories (leaving the originals behind with -k):
-
Windows verison of cal
busybox-w32 includes a cal applet. If that's all you care about, you can just rename busybox.exe to cal.exe.
-
What's in your tool belt?
busybox-w32: standard unix utilities for Windows. It's a BusyBox port.
-
Makefile example project for Windows with source, include, libs and build folders. Also with a detailed explanation!
IHMO, even better is to just use POSIX sh in your Makefile and simply make it a build requirement. It's easy to obtain a reasonable sh even on Windows (Cygwin, MSYS2, busybox-w32), and to further support exactly this I include sh alongside make in my development kit distribution. This uniformity lets me hit all operating systems with the same Makefile. I use EXE from the environment to determine the binary file extension, if any.
What are some alternatives?
w64devkit - Portable C and C++ Development Kit for x64 (and x86) Windows
homebrew-emacs-plus - Emacs Plus formulae for the Homebrew package manager
BUSY - BUSY is a lean, statically typed, cross-platform, easily bootstrappable build system for GCC, CLANG and MSVC inspired by Google GN
notty - A new kind of terminal
PSCalendar - :calendar: A set of PowerShell commands for displaying calendars in the console.
oursh - Your comrade through the perilous world of UNIX.
cimgui - c-api for imgui (https://github.com/ocornut/imgui) Look at: https://github.com/cimgui for other widgets
csvinfo - A small util to show max column lengths for a passed CSV file.
gameinfojs - High level interface to the functionality provided by the other game* libraries
csvquote - Enables common unix utlities like cut, awk, wc, head to work correctly with csv data containing delimiters and newlines
PL3D-KC - A very fast and simple software renderer using only integers and fixed point math. PiSHi LE (PL) is a subset of the 3D software graphics library used in King's Crook.
awk - Random AWK code