SmartMath Plugin - Real-time Calculations in AkelPad

Discuss and announce AkelPad plugins
  • Author
  • Message
DV
Offline
Posts: 1347
Joined: Thu Nov 16, 2006 11:53 am
Location: Kyiv, Ukraine

Re: SmartMath Plugin - Real-time Calculations in AkelPad

Post by DV »

I've created a new branch for the Active on Current Tab feature:
https://github.com/d0vgan/AkelPad-Smart ... urrent-tab

Currently it's mostly working.
The implementation is raw, some parts must go to the "SmartMath_Menu.bas", some parts must be refactored.

Now I can't deliver changes as quick as before because my eyes are _very_ overloaded. And it's not only the need of stronger glasses, it's also high eye pressure. (There are special devices to measure the eye pressure, did you know it?). I have to give more rest to my eyes.

DV
Offline
Posts: 1347
Joined: Thu Nov 16, 2006 11:53 am
Location: Kyiv, Ukraine

Re: SmartMath Plugin - Real-time Calculations in AkelPad

Post by DV »

Here you go:
- "Active on Current Tab" menu item has been added instead of the document mark.
- "Active on Current Tab" menu item state is preserved after AkelPad is restarted.

The latest binaries are here:
https://drive.google.com/file/d/1eVTidE ... drive_link

If no issues reported, I'll raise a pull request.

DV
Offline
Posts: 1347
Joined: Thu Nov 16, 2006 11:53 am
Location: Kyiv, Ukraine

Re: SmartMath Plugin - Real-time Calculations in AkelPad

Post by DV »

The pull request has been created.

DV
Offline
Posts: 1347
Joined: Thu Nov 16, 2006 11:53 am
Location: Kyiv, Ukraine

Re: SmartMath Plugin - Real-time Calculations in AkelPad

Post by DV »

I've updated the same feature branch with a few new things: `len`, `range`, `repeat` and Python-style array slicing.
Examples:

Code: Select all

len((10, 20, 30)) -> 3
range(1,11) -> (1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
range(1,11,3) -> (1, 4, 7, 10)
repeat((1,2), 3) -> (1, 2, 1, 2, 1, 2)
(1, 2, 3, 4, 5)[1:-1] -> (2, 3, 4)
(1, 2, 3, 4, 5)[::2] -> (1, 3, 5)

a = unpack(repeat(1, 100), repeat(10, 10), repeat(1000, 1))
avg(a) -> 10.81081081081081
median(a) -> 1.0
a[:10] -> (1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
a[-10:] -> (10, 10, 10, 10, 10, 10, 10, 10, 10, 1000)
n = len(a) -> 111
The latest source code is here:
https://github.com/d0vgan/AkelPad-Smart ... urrent-tab

DV
Offline
Posts: 1347
Joined: Thu Nov 16, 2006 11:53 am
Location: Kyiv, Ukraine

Re: SmartMath Plugin - Real-time Calculations in AkelPad

Post by DV »


DV
Offline
Posts: 1347
Joined: Thu Nov 16, 2006 11:53 am
Location: Kyiv, Ukraine

Re: SmartMath Plugin - Real-time Calculations in AkelPad

Post by DV »

New function: `flat`.
The intended usage is the following (and the comparison with `unpack`):

Code: Select all

a = (1,2)
b = (4,5)
x = flat(a,3,b,6)      // (1, 2, 3, 4, 5, 6)
fact(x)                // (1, 2, 6, 24, 120, 720)
y = unpack(a,3,b,6)    // (1, 2, 3, 4, 5, 6)
fact(y)                // fact() expects 1 argument(s), 6 given
The latest binaries are here:
https://drive.google.com/file/d/16WdqpO ... drive_link

DV
Offline
Posts: 1347
Joined: Thu Nov 16, 2006 11:53 am
Location: Kyiv, Ukraine

Re: SmartMath Plugin - Real-time Calculations in AkelPad

Post by DV »

Finally, significant improvements in reducing the blinking/flickering, as well as improvements in caching.

All the changes are in the same git branch:
https://github.com/d0vgan/AkelPad-Smart ... urrent-tab

The latest binaries are here:
https://drive.google.com/file/d/1y36tDh ... drive_link
Post Reply