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.
bubbleos
-
Niklaus Wirth Passed Away
do you think writing st is an achievement that merits a turing award
because i've also written a terminal emulator, and it compiles from source in 0.98 seconds https://gitlab.com/kragen/bubbleos/blob/master/yeso/admu-she... screenshot at https://gitlab.com/kragen/bubbleos/blob/master/yeso/admu_she...
(steps to reproduce: install dependencies; make; rm admu-shell admu-shell-fb admu-shell-wercam admu admu.o admu-shell.o admu_tv_typewriter.o; time make -j. it only takes 0.37 seconds if you only make -j admu-shell)
i wrote pretty much all of it on october 12 and 13 of 02018 so forgive me if i don't think that this is an achievement worthy of a turing award. even if it were as great as st
-
Write Your Own Terminal
nice! probably magenta on a red background is undesirable, though; maybe switch to colors with better contrasts
i hate x11 visuals and in https://gitlab.com/kragen/bubbleos/blob/master/yeso/yeso-xli... i just assume that everything is 32-bit bgra. i need to get around to fixing that at some point
what do you think an idiomatic ruby binding for yeso would look like? so far i only have lua, c, and python bindings. my ruby experience is both limited (only a few thousand lines of code) and over a decade ago
-
Minetest: An open source voxel game engine
debian and ubuntu ship an implementation of tetris in the bsdgames package (and bsd has included it since the 80s), gnu emacs has included tetris.el for 25 years (despite removing yow lines), and debian also includes bastet, blocks of the undead, crack-attack, gtkboard, kblocks (which is part of kde), ltris, netris, petris, stax, termtris, tetrinet, tint, vdr-plugin-games, vitetris, /usr/share/vim-scripts/plugin/tetris.vim, and quadrapassel (which is part of the official gnome release)
you've been able to buy cheap '9999 in 1 block game' hardware at any import port with 200 nematic pixels for at least 15 years
i've written two tetris clones myself, http://canonical.org/~kragen/sw/inexorable-misc/tetris and https://gitlab.com/kragen/bubbleos/blob/master/yeso/tetris.c, and no lawsuits have yet arrived
also, minecraft is just an infiniminer clone, and there are fifty zillion clones of each of pacman, space invaders, breakout, snake, doom, and super mario
so these novel legal precedents you mention are at least still being very narrowly applied in practice
-
Minimal Cross-Platform Graphics
since everyone else is posting links to their similar libraries, i thought i'd post mine too, https://gitlab.com/kragen/bubbleos/-/tree/master/yeso
it's probably a bit more efficient than fenster on x-windows because it uses shared memory, and i think the programming interface is a little nicer (see the readme above for code examples)
apps i've written in yeso include an adm-3a terminal emulator, a tetris game, a raytracer, an rpn calculator, a fractal explorer, and so on
i haven't ported yeso to win32/64, macos, android, or the browser canvas yet, just x-windows, the linux framebuffer (partly), and a window system implemented in yeso called wercam
it includes bindings for c, python (via cffi), and lua (via luajit's ffi), and presumably you could use it from zig or rust in the same way as fenster, but i haven't tried
- If one GUI's not enough for your SPARC workstation, try four
-
Turns are better than radians
If you're not using derivatives, integrals, or complex numbers, maybe you'd be better off using Wildberger's "rational trigonometry" with quadrances and spreads instead of angles? I haven't actually tried it myself. Wildberger's motivation is a sort of ultra-strict Platonism mixed with the desire to extend analytic geometry to fields other than the real numbers, though, so it wouldn't be surprising if it wasn't actually a simpler way to write Asteroids.
Alternatively you can just directly represent angles as unit vectors in the desired direction, which is pretty much the same as using complex numbers. Angle addition is complex multiplication, angle bisection is complex square root, and computing the sine and cosine is simplicity itself. (This takes twice as much space. If you choose to store only the real part of the complex number, you can only represent angles up to half a turn, same as in Wildberger's approach, you lose some precision near the limits, and the other operations require some extra computations.) I have tried this, for example in http://canonical.org/~kragen/sw/aspmisc/my-very-first-raytra... and https://gitlab.com/kragen/bubbleos/-/blob/master/yeso/sdf.lu..., and in the cases I've tried it, it works great.
I'm interested to hear other people's experiences on this count!
-
Take More Screenshots
> There at least three small Wasm interpreters in Rust
None of those are small; the smallest one you found is 500 lines of code, and doesn't include the peripherals. The UM interpreter in the Cult of the Bound Variable paper was I think 55 lines of C (also, not including peripherals). My dumb Chifir interpreter was 75 lines of code; adding Yeso graphical output was another 30 lines https://gitlab.com/kragen/bubbleos/blob/master/yeso/chifir-y....
I agree that UM, Chifir, and uxn are Art, and that wasm is a great platform to run this kind of archival virtual machine on top of, as well as having some very interesting ideas about how to design a VM instruction set to be amenable to efficient implementation. RISC-V is a good source of ideas for that, too!
Why am I being so unreasonable about the amount of code? After all, a few hundred lines of C is something that you can write in an afternoon, right, so what's the big deal about 500 lines of code for something you'll use for decades?
The problem is that, to parody Perlis's epigram, if your virtual machine definition has 500 lines of code, you probably forgot some. If a platform includes that much functionality, you have designed it so that that functionality has to live in the base platform rather than being implemented in programs that run on the platform. And that means that you will be strongly tempted to add stuff to the base platform, which is how you break programs that used to work.
In the case of MS-DOS or NES emulation this is limited by the fact that Nintendo couldn't go out and patch all the Famicoms and NESes in people's houses, so if they wanted to change things, well, too bad. NES emulator authors have very little incentive to add new functionality because the existing ROMs won't use it, and that's what they want to run.
One of the interesting ideas in the RISC-V ecosystem is that a Cray-style vector instruction set (RV64V) can give you SIMD-instruction-like performance without SIMD-instruction-like instruction set inflation. And, as the APL family shows, such vector instructions can include scalar math as a special case. I haven't been able to come up with a way to define such a vector instruction set that wouldn't be unacceptably bug-prone, though; https://dercuano.github.io/notes/vector-vm.html describes some of the things I tried that didn't work.
- The SQLite Code of Ethics
-
GPU ray tracing tutorial – 10 articles
I've written several smaller raytracers than 200 lines of C++, though quite likely they're worse pedagogically than Jaco's slashdotted tutorial:
http://canonical.org/~kragen/sw/aspmisc/my-very-first-raytra... 184 lines of C, including vector arithmetic, input parsing, and PPM output. I'm not sure what you mean by "excluding the headers" — this one doesn't have any headers of its own (why would a 200-line program have headers of its own?) but it #includes math.h, stdio.h, stdlib.h, and string.h, which total almost 1800 lines of code on my machine and presumably 15× that by the time you count their transitive includes.
http://canonical.org/~kragen/sw/dev3/circle.clj 39 lines of Clojure, including the model, which is a single sphere; it uses java.awt.image for JPEG output. About half of the code is implementing basic vector math by hand. A minified version is under 1K: http://canonical.org/~kragen/sw/dev3/raytracer1k.clj
https://gitlab.com/kragen/bubbleos/blob/master/yeso/sdf.lua 51 lines of Lua for an SDF raymarcher including animation, the model itself, and live graphical output.
I feel like basic raytracing is a little simpler than basic rasterizing, but I don't think the difference is hugely dramatic:
http://canonical.org/~kragen/sw/torus is a basic rasterizer in 261 lines of JS, which is larger than the three raytracers I mentioned above, but about 60% of that is 3-D modeling rather than rendering, and another 5% or so is DOM manipulation.
http://canonical.org/~kragen/sw/netbook-misc-devel/rotcube.p... The smallest I've been able to get a basic rasterizer down to, 15 lines of Python, just rotating a point cloud.
http://canonical.org/~kragen/sw/dev3/rotcube.cpp in C++ it's 41 lines, and
http://canonical.org/~kragen/sw/dev3/braillecube.py with wireframes in Braille Unicode art it's 24 lines of Python.
So I think that the core of either a (polygon!) rasterizer or a raytracer, without optimizations, is only about 20 lines of code if your ecosystem provides you with the stuff around the edges: graphical display (or image file output), model input, linear algebra, color arithmetic.
For a rasterizer, it's something like:
tpoints = [camera_transform @ point for point in points]
-
How much boilerplate code you need to write a ray-tracer?
https://gitlab.com/kragen/bubbleos/blob/master/yeso/sdf.lua one page of Lua, runs in real time at a lousy framerate
http://canonical.org/~kragen/sw/dev3/ about five pages of C
Opal
-
RubyJS-Vite
It's been a long time dream for me since about 2013 when I started getting deep into Ruby and Rails, to be able to write Ruby code for the frontend instead of JavaScript. I was a lover and adopter of CoffeeScript (which had it's flaws and imperfections), but that mostly got killed by ES6. I wrote some PoCs with Opal[1] that felt pretty good to write, but the overhead was rough (this was many years ago so things might be different now) and I never really felt like I didn't have to know about or care about the underlying javascript. I tend to discard leaky abstractions as I feel they often add more complexity than they were meant to cover in the first place.
Has anybody used this or Opal or anything else? What is the state of "write your frontend in Ruby" nowadays?
[1]: https://github.com/opal/opal
-
Non-code contributions are the secret to open source success
Every time I see a respectable project use a Code of Conduct I remind myself that, unfortunately, Caroline Ada won[1]
[1] https://github.com/opal/opal/issues/941
-
Coming to grips with JS: a Rubyist's deep dive
But we shouldn't overstate the difference: the JS and Ruby object models are actually similar in how dynamic both of them are. This makes Ruby-to-JS compilers like Opal easier to implement, according to an Opal maintainer.
-
Opal – a Ruby to JavaScript source-to-source compiler
This is an interview with the author of Opal, here's the project:
https://github.com/opal/opal
-
GCC Adopts a Code of Conduct
Not the OP, but from what I remember they would seek out every possible opportunity in every single possible open source community they could find and propose the CoC that they wrote. 0 contributions to the projects, with the exception of demanding that people implement incredibly verbose CoC's in their projects under the guise of "protecting the minorities contributing to the projects".
Most infamous instance is probably this one, in the Opal repo: https://github.com/opal/opal/issues/941
As well as this thread in the Ruby issue tracker that devolves into pure chaos with Ada refusing to actually participate in any of the valid points others bring up: https://bugs.ruby-lang.org/issues/12004
And I'm sure there's many other instances if you look around a bit.
-
Hackers Flood NPM with Bogus Packages Causing a DoS Attack
My experience with ruby for front end web dev is via https://opalrb.com/
-
The Rust Trademark Borrow Checker : Rust Foundation Solicits Feedback on Updated Policy for Trademarks
Here's an example of the creator of the most adopted CoC (the Contributor Covenant) trying to get an open source contributor removed from a project due to his political opinions expressed on Twitter which she didn't like and found offensive.
-
Launch HN: Pynecone (YC W23) – Web Apps in Pure Python
So ruby has a JS transpiler - opal - https://opalrb.com/
I tried using it a little bit but the reality is if you need JS to make your app more interactable it's really worth it to just learn some JS. As soon as you need something complex the extra layer of abstraction just gets in the way and becomes more of a headache, and if you don't need anything complex then you don't need JS in the first place.
-
DebunkThis: Coraline Ada Ehmke hasn't really contributed that much as far as code goes
I stumbled upon this thing from years ago. I did some more digging to see what other communities thought about it. Turns out that a lot of people are really against Coraline's side.
- All web applications may be created in the optimal environment created by Ruby, JS, and Vite.
What are some alternatives?
learn-fpga - Learning FPGA, yosys, nextpnr, and RISC-V
MRuby - Lightweight Ruby
gnu-units - GNU Units (mirror)
JRuby - JRuby, an implementation of Ruby on the JVM
electron-vlog - Take video recordings, screenshots and time-lapses of your Electron app with ease
Rubinius - The Rubinius Language Platform
WasmCert-Isabelle - A mechanisation of Wasm in Isabelle.
Reactrb
rust-wasm - A simple and spec-compliant WebAssembly interpreter
yjit - Optimizing JIT compiler built inside CRuby
Carp - A statically typed lisp, without a GC, for real-time applications.
natalie - a work-in-progress Ruby compiler, written in Ruby and C++