123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|448|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Theme of the Week -> RPG Week

Mon, 16 Jun 2025, 01:01
Socoder

RPG Week

Character development, storytelling, fantasy worlds

Meme Monday

Post or create a Meme that's somehow relevant to this week's theme.
Mon, 16 Jun 2025, 16:15
Pixel_Outlaw
As a long time RPG fan going back to the original.


Tue, 17 Jun 2025, 02:20
Socoder

Teaching Tuesday

Can you teach us something that's somehow relevant to this week's theme? Maybe a link to something useful, or even writing up a small tutorial.
Wed, 18 Jun 2025, 01:35
Socoder

Worklog Wednesday

What have you done this week? This needn't be relevant to this week's theme. Just let us know what you're up to.
Wed, 18 Jun 2025, 06:04
Jayenkai
I demolished and began restructuring Browsercade. It's going to be a long long trawl to get everything back the way it was.
Meanwhile, I set about adding an "Iterate" command into JSE (not uploaded yet). It's messy, and it pretty much only has the single purpose of drawing fractals.



Iterate(x,y,iterations,"Mandelbrot/Julia",extra parameters that I haven't settled on yet)
Again, not really sure of the purpose of this command. It's a bit slow, too, if I'm honest. (the above image took about 10 seconds!)

*shrugs*
If anyone knows of a reason to be able to iterate like this, let me know!

-=-=-
''Load, Next List!''
Wed, 18 Jun 2025, 15:47
Pixel_Outlaw
Looks like an interface to a collection such that you don't have to provide typical loops.

There is a time and place for loops but they can easily be removed in some cases by more elegant operations.
These operations usually are what's known as "higher order operations".

They take a function as a parameter to be used within the function itself.
Abstracting the looping for ONLY what you want to do to the collection.

Your code gets smaller and tigher this way.
BUT in order to do this properly you need to support "first class functions" which is where functions can be passed as parameters as any other "thing".

This was pioneered like most other things very early in the 1960s in Lisp.


For example (in pseudo code)

You might have code like so


and you get [2, 3, 4, 5, 6] .

However with higher order functions the loop is implicit.
Let us assume you have a function named "add1"
It takes a parameter and returns one more.

These now fold down into 1 liners with the loop implied.
I'll show two approaches.


Wed, 18 Jun 2025, 16:08
Pixel_Outlaw
Julia is essentially Lisp for people afraid of parens.
But since it supports first class functions you have a damned lot of power there as well.