Toy support library for primitive graphics programming.
araq / pixels Goto Github PK
View Code? Open in Web Editor NEWToy support library for primitive graphics programming.
License: MIT License
Toy support library for primitive graphics programming.
License: MIT License
Toy support library for primitive graphics programming.
I have the "Mastering Nim" book. Trying to run the first code example:
import pixels
# needed to install sdl2 and sdl2_tff
put_pixel(5, 9)
put_pixel(11, 18, Red)
(btw the book didn't say I needed the sdl2
and sdl2_tff
libraries; kept getting compilation errors until I figured it out)
Anyway, I run this example and a window appears, but nothing is in it. It just shows the background pixels fixed in place:
Is there anything else I need to install to make this work? Or some kind of config setting?
OS is Manjaro Linux KDE.
On Archlinux 5.18.14-zen1-1-zen, I need to install sdl2_ttf, otherwise I get a runtime error.
could not load: libSDL2_ttf(|-2.0).so(|.0)
(compile with -d:nimDebugDlOpen for more information)
Error: execution of an external program failed: '/home/kolmogorov/Documents/dev/mastering_nim/src/chapter1 '
I added import sdl2 on top of the first script of mastering nim example, and downloaded sdl2_ttf via pacman:
sudo pacman -S sdl2_ttf
I had also installed sdl2 nim package through nimble. I solved my problem by this installation of sdl2_ttf. The dependency sdl2_ttf should be added to pixels.nimble.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.