What programing/scripting languages do you use and why?

Yeah, Reaper was good fun with the programming side of things. Mixbus/Ardour has Lua scripting too, although I wish they’d all use LuaJIT.

You can always learn C itself. C++ and languages like it are big by comparison so learning something like C and Lua would be an alternative strategy. Seeing the negatives of C would let you know why the features and abstractions in other languages exist.

That was my plan since C is a small language,
but as soon as I tried to use default arguments and found them missing,
I started compiling my .c files to .cpp instead. :smiley:

Then I started reading how much easier and safer vectors , strings, references and auto were to use than their C counterparts
And moved back to C++ :grimacing:
I will try and finish my C learning as well

@brainio I would just stick to your plan bro
You were up to the good GUI stuff already
You’re gonna need to hook into C or C++ for any other language (eg Python) whenever you need performance
I don’t know if you still do electronics, but they rule there also

C would be much nicer with namespaces and methods. The C overlords decided not to have a standard library beyond the basics which is understandable, but it also makes other languages look good for having better ones. It’s the same with Lua, they want to keep it really small but don’t seem to want to bless any library.

Similarly, the denizens of the C++ committee don’t want to standardise or bless any package manager or build system which also makes other languages look good for having nice integration. In steps xmake though!

Speaking of xmake and C libs, Ruki has written the tbox C library which has vectors n (a lot of other) stuff. It’s what the low level parts of xmake are written with.

White space in Python can make a grown man cry.

Python shines while working with heaps of data
You can think of jupyter books as a super snazzy spreedsheet

Here’s javascript take on jupyterbooks

Sounds like you a curating an eighties museum!
I noodled with basic on a Commodore 128. It had c64 mode.
Memories

Well I know I said I didn’t want to waste time setting up vim or emacs

But I just installed Doom Emacs on Ubuntu 20.04 on WSL2/Win 10, running in a GUI,
no latency, and it all seems to work :smiley:

(Doom is a fast well-designed config of Emacs for Vim lovers, with EVIL Mode enabled (cloning Vim shortcuts and actions)


I followed this to get the GUI working (it runs other linux apps too eg I tested firefox):
GitHub - hubisan/emacs-wsl: Install and run Emacs with the Windows Subsystem for Linux (WSL) in Windows 10..

And this to install Doom:

Jupyter seems to have made a name for itself, I hadn’t heard of Observable. I sometimes wonder how much credit can be given to Python and JavaScript’s package managers for their success, there’s certainly lots of innovative software being made with them.

@Bevo : grrr @ emacs! Seriously though, never used it beyond installing it and not learning it.

Behold the Shader Lord (not my code and see below for link to see it in action)!:

(ps I know the code is on the page, but it’s worth taking a moment of respect for the code, alone and without distractions. :slight_smile: )

#define T texture(iChannel0, uv
#define W vec2

#define time iTime
    float alpha;
#define res iResolution
vec4 bloom = vec4(0), blur = vec4(0);

#define GA 2.399
mat2 rot = mat2(cos(GA),sin(GA),-sin(GA),cos(GA));
vec3 pixel=vec3(.001*8./6.,.001, 0) * .05;

float intensity(vec4 col) {
	return dot(col.rgb, vec3(0.2126, 0.7152, 0.0722));
}

// 	simplified version of Dave Hoskins blur
void dof(sampler2D tex, vec2 uv, float rad, vec4 org)
{
	vec2 angle=vec2(0,rad);
    rad=1.;
    float bc = 1.;
	for (int j=0;j<60;j++)
    {  
        rad += 1./rad;
	    angle*=rot;
        
        vec4 col=texture(tex,uv+pixel.xy*(rad-1.)*angle);
        if (intensity(col) > .8) {            
			bloom += col;
        }
        blur += col;
	}
	blur /= 96.;
}

//-------------------------------------------------------------------------------------------
void mainImage(out vec4 fragColor,in vec2 fragCoord)
{
	vec2 uv = gl_FragCoord.xy / res.xy;
    
    vec4 orgColor = (
        texture(iChannel0,uv) 
    	+ (texture(iChannel0,uv + pixel.xz)
        	+ texture(iChannel0,uv + pixel.zx)
        	+ texture(iChannel0,uv - pixel.xz)
        	+ texture(iChannel0,uv - pixel.zx)
         ) * .25
    ) / 2.,
        
    oo = orgColor;
    alpha = texture(iChannel0,uv).a;
    dof(iChannel0,uv, 40., orgColor);
    orgColor += bloom * 0.03;
   
    orgColor = mix(
        orgColor, 
        blur, 
        clamp(
        	min(1., 1. - pow(abs(alpha - .6) * 2., 2.)),
            0.,
            1.
        )
    );
    
    orgColor = mix(
        orgColor, 
        blur.bgra, 
        clamp(
        	min(1., pow(length(uv -.5) * 1.4, 2.)),
            0.,
            1.
        )
    );
 
 	//fragColor = oo;
    fragColor = orgColor;    
}

I love how it’s readable.

So often code is so cryptic that I’m never sure if it’s really sophisticated or the dev is having a wank.

Lookee! :smiley:
Code evaluates in the same window, out of the box in Doom
No terminal required
Just type:
SPC c e … and voila

@Snookoda if you can handle SPC as your Vim leader, you’ll love it
I used SPC as leader last time on Nano , so it suits me
Works exactly like Vim AFAICT
I may have to learn elisp now to make the tweaking faster

Yeah, I’m not a fan of all of that squishing as much as possible into one line with no spaces, as if that makes stuff faster. It’s borderline obfuscation, which could be the point!

The things people are doing with shaders is impressive. I’m just beginning to add some effects to a game so am dipping a toe in and don’t plan or have the ability to get fully soaked. :slight_smile:

@Bevo : I don’t know what an SPC is and even if I did I wouldn’t use emacs!!!

I’m not really a hardcore vimmer, I just use :E or :e to navigate around and enjoy the editing commands. Still not 100% sure how to exit it. :smiley:

@Snookoda and @Bevo. Both look like nifty stuff.

I’m a vim simpleton too. For that matter, I probably don’t use more than a dozen or so keys in any given application. That seems to be about my cutoff ratio of personal usefulness to thinking too much about the application. I had no idea about the leader key. It does look to be very useful.

@Gazza, that shader business looks pretty alien to me.

I think Bevo might be a tool boss/junkie.

I may be seeing some of the value in his ways.

I think a useful little program might be one to flash key bindings or other info to meat memory using the Leitner system (spaced repetition), at least for the memory challenged (aye!). https://en.wikipedia.org/wiki/Leitner_system

@Bevo posted an app that does that in the Software thread!

https://apps.ankiweb.net/ - flashcard app for memorising

I have used Anki in the past, and I wasn’t a fan of it. I might have to give it another go though.

I might give it a whirl to learn something or other. We could make a deck of subjects covered here to share with @drumphil! :smiley:

snicker

nevermind

I’m brain dead today. I haven’t updated lately.

20 posts were split to a new topic: emacs / doom / editor group therapy