Global Cache block

Small global cache block i’m sharing because it might be useful to someone, I guess. examples are here:

Interesting. I wish you wouldn’t use the name “function,” though, for a script that’s anything but functional in your examples. Maybe “action” or “mutator” or just “script”?

fixed!

Why don’t I use this instead of the global variable in the music ADT?

There is another pattern working the same way.


You can create and access multiple, named lists just wrapping it in a function

The _libray_config_X_ list must be handled by mutators


and is persistent ,i.e. is saved with the project.

I was wondering how to change that. do you know how?
second, what’s the point of the underscores? I think a space would be fine.

I think that there is no way to make it 'transient". Only delete all before save.

Underscore is a matter of personal preferences. I do not like a natural-like identifier. They tend to be long, making complex expressions unreadable. For languages with inflection, long identifiers form unnatural, invalid sentences or force even longer passive voice.

what is this?

It’s just a biased rant so do not take this too seriously…

Of course, that example wouldn’t be much improved by calling it
list_of_every_negative_elements_from_given_list
:~) I was expecting you to say that the underscores at the beginning and end of a name were to flag a global static variable. Traditionally, Lisp programmers have used asterisks for that, so the symbol representing a Boolean True value was *T*.

Ringified script variables referenced only inside of block variables aren’t saved with the project. There is probably a way to do something with that.

Your spelling is wrong, it’s not _libray_config_X_, it’s _library_config_X_.

I’ll try to make something like that.

Thə spelling doesn’t matter so much :slight_smile:

Thə spelling doesn’t matter so much :slight_smile:

… in a forum post. If this were code being proposed as an official library, then spelling corrections would be important. But, as I think you know, @onu032001, not everyone on the forum is a native English speaker, and it’s a bit rude to correct people’s spelling unless the spelling really matters to the conversation.


Is there anyone who can tell me why the background color of the tokens that mentions me is sky blue?

Always, or just from me? There’s something weird about my interaction with the forum, and one part of the weirdness is that I can’t just type @o and have it give me a menu of relevant usernames; I had to spell out your name in full. So I’m a little surprised you see a special background color altogether! I don’t:

Because it’s highlighting your username. It would highlight @ego-lay_atman-bay for me, but not for you.

That’s weird, cause it showed up for me.