Better session history features

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
BarryG
Addict
Addict
Posts: 3292
Joined: Thu Apr 18, 2019 8:17 am

Better session history features

Post by BarryG »

I would like to request some better session history features, because right now it's basically just a non-navigable viewer and nothing else. My problems with it:

(1) Some entries show nothing? Why even list them, then?
(2) Not searchable from within the PureBasic environment to find something from an unknown session.
(3) No procedure browser for a shown source (this would be very useful for navigating a shown session).
(4) No way to Ctrl + double-click a procedure name to jump to it (also useful for navigating a shown session).
(5) No way to quickly copy a shown session's source; we need to Ctrl+A, and then Ctrl+C. How about a button?
(6) Similarly, how about two buttons to load the session's source into a new IDE tab, and as a new PureBasic instance?

Thanks for reading.
User avatar
kenmo
Addict
Addict
Posts: 1967
Joined: Tue Dec 23, 2003 3:54 am

Re: Better session history features

Post by kenmo »

Hi Barry, I pretty much agree!

(1) I posted about empty session history in 2016, including a code snippet to remove them. Zero responses, so I guess nobody minds it.
viewtopic.php?f=3&t=65019
(2) Similar, somebody asked about searching the session history so I posted some code.
viewtopic.php?f=3&t=70287
(3) + (4) I don't know if the session viewer really needs these..? but:
(5) Agree, a Copy All button like the debug window would be nice.
(6) Agree, I'm surprised there's not a button to load the file into the main IDE window. (I wouldn't launch in a new IDE instance, personally)

Once you've loaded the source by (5) or (6), then the procedure browsing features of (3) and (4) would apply.
BarryG
Addict
Addict
Posts: 3292
Joined: Thu Apr 18, 2019 8:17 am

Re: Better session history features

Post by BarryG »

kenmo wrote:(3) + (4) I don't know if the session viewer really needs these..?
It's useful because I like to compare current code to older versions, so jumping around the old code in history is extremely handy. At the moment I need to drag the scrollbar and manually look for what I want to compare, which is a horrendous task.
Last edited by BarryG on Sun Oct 03, 2021 12:51 pm, edited 1 time in total.
User avatar
NicTheQuick
Addict
Addict
Posts: 1224
Joined: Sun Jun 22, 2003 7:43 pm
Location: Germany, Saarbrücken
Contact:

Re: Better session history features

Post by NicTheQuick »

I also want that button you mentioned in point (6).
There is also this thread from me where I mentioned it last year: viewtopic.php?f=23&t=71937
The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.
mestnyi
Addict
Addict
Posts: 995
Joined: Mon Nov 25, 2013 6:41 am

Re: Better session history features

Post by mestnyi »

+1
User avatar
skywalk
Addict
Addict
Posts: 3972
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Better session history features

Post by skywalk »

For a complete experience, invest in a VCS like Fossil. Check in and check out as often as you need and view the code diff's in a simple browser gui or your preferred diff tool. And you get multiple repositories for local and remote storage.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
BarryG
Addict
Addict
Posts: 3292
Joined: Thu Apr 18, 2019 8:17 am

Re: Better session history features

Post by BarryG »

I'll look for a free VCS for now, but I'd really prefer a PureBasic-only solution. I don't want to have to install third-party apps on every PC that I use PureBasic, just to do what PureBasic could do. The beauty of PureBasic is that I can simply drag its folder to any PC and start coding, without needing to install supporting products. It's so convenient!
User avatar
skywalk
Addict
Addict
Posts: 3972
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Better session history features

Post by skywalk »

Fossil is free. I meant "invest" in understanding how it works.
PureBasic's session features will never come close to the power you will get with a DVCS.
There is no installation per se. Fossil.exe is a standalone 32-bit app that you place in a folder recognized by the PATH. C:\Windows\SysWOW64\ or some other path you prefer.
You can compile the amalgamated source to x64, but I've had no limitations with the pre-compiled x86 version on the download site.
Aside: git is much more complex installation and use model.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
User avatar
kenmo
Addict
Addict
Posts: 1967
Joined: Tue Dec 23, 2003 3:54 am

Re: Better session history features

Post by kenmo »

VCS is great and definitely recommended for any serious project! (I've used Mercurial for years but also Git for work / recent PB code.)

But source control is not practical for every one-off code or tiny project.

Sometimes you just whip up a quick PB program, and a month later you want to dig it up. The IDE already tracks it for you, so it might as well include a couple search and load features. :)
User avatar
skywalk
Addict
Addict
Posts: 3972
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Better session history features

Post by skywalk »

I kinda disagree. There is already a lot on the PureBasic plate. Adding incremental version storage and retrieval with diffs and the like are optimized elsewhere. All my apps, big and small, use common libs within the shared repository. That way I can reuse optimized code throughout. And better, when I fix bugs or add features in 1 app, it cascades to all others sharing that code. True, when I fiddle with new algorithms, I don't add them to a repo unless they produce a common benefit.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
User avatar
kenmo
Addict
Addict
Posts: 1967
Joined: Tue Dec 23, 2003 3:54 am

Re: Better session history features

Post by kenmo »

skywalk wrote:I kinda disagree. There is already a lot on the PureBasic plate. Adding incremental version storage and retrieval with diffs and the like are optimized elsewhere.
The IDE already does basic versioning (by timestamp), retrieval, diff... BarryG's request is for relatively simple features on top of what already exists. Nobody's asking the team to develop their own VCS system :)

The rest of what you said (folder of common libs, improvements cascade to all projects, commit to repos) is all good advice I agree with.
User avatar
skywalk
Addict
Addict
Posts: 3972
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Better session history features

Post by skywalk »

I get it. I am just trying to see the forest through the trees. Every small request that does not culminate in a robust end product is a distraction and lost opportunity for critical bug fixes(given the size of dev team). I use the IDE for its strengths, but recognize when it's more efficient to offload some tasks to better tools.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
User avatar
kenmo
Addict
Addict
Posts: 1967
Joined: Tue Dec 23, 2003 3:54 am

Re: Better session history features

Post by kenmo »

BarryG wrote:(1) Some entries show nothing? Why even list them, then?
Fixed in the Open Sourced IDE :D should be in the official PB 5.72 release
https://github.com/fantaisie-software/purebasic/pull/34
BarryG
Addict
Addict
Posts: 3292
Joined: Thu Apr 18, 2019 8:17 am

Re: Better session history features

Post by BarryG »

Thanks, kenmo! Any chance to do some other of my requests? Mainly I'd love to search the session shown, so I can quickly find some old code (in a procedure) that I since deleted but that the session would still have.
User avatar
kenmo
Addict
Addict
Posts: 1967
Joined: Tue Dec 23, 2003 3:54 am

Re: Better session history features

Post by kenmo »

Definitely possible. I'll add it to my long todo list (not guaranteed!)

The Copy and Open In Tab buttons would be simple.

The search would be a little harder because it would have to manipulate the GUI and TreeGadget items. (But as I linked above, I've actually implemented the search part before, as an external tool)
Post Reply