cross-posted from: https://lemmy.world/post/20670854

https://gitlab.com/christosangel/c-squares

c-squares written in the C language will render random coloured rectangulars in the terminal, while the font, speed, density, color, ratio and number of the shapes drawn are fully costumizable.

Every time a rectangular is complete, a new one starts to take shape.

Click on image to play video



Feel free to explore the endless variations.

You are viewing a single thread.
View all comments
2 points
*

This script written in the C language

C is not a scripting language.

permalink
report
reply
13 points

Every language is a scripting language if you’re brave enough.

permalink
report
parent
reply
7 points
*

Oh yeah? Then redo the classic doom code in pure bash.

permalink
report
parent
reply
11 points
*
#!/usr/env bash
~/doom-game/bin/doom
permalink
report
parent
reply
4 points

I do not get your point?

A script is more about the program rather than the language. You can write a script in assembly or C++ or whatever

permalink
report
parent
reply
1 point

Is it? I thought a script is a portable and instantly grokkable piece of code that can be easily modified by others, since it uses very little actual code in itself (e.g. by being reliant on larger imported frameworks), and thus not being a full-fledged application.

The above code is pretty much self-contained, and though it is impressively minimal, it is not instantly grokkable, and I would have a hard time modifying it.

permalink
report
parent
reply
2 points

Fair enough. For me, scripts are small reusable programs performing a very specific (sometimes trivial or common) task. Eg: making a wav file from PCM data, modifying byte sequences or formatted text in a particular way, etc. I mostly program in C so I have written most scripts in C. Need not necessarily be grokkable as long as its application and scope is clear

permalink
report
parent
reply
1 point

I stand corrected.

permalink
report
parent
reply

Linux

!linux@lemmy.ml

Create post

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

Community stats

  • 7.8K

    Monthly active users

  • 6.5K

    Posts

  • 179K

    Comments