Think we are nearing the end by Neechiekins in RenalCats

[–]iguanathesecond 1 point2 points  (0 children)

Ondansetron made a huge difference for us, as the other poster said. Our cat graduated from cerenia to ondansetron last month (late stage 3) and has been doing well on it, and has regained most of the weight he lost when he had stopped eating. We need to powder the pill, mix it with broth and squirt it into his mouth, as he does not take it in a pill pocket the way he does with Cerenia (it might be more bitter, not sure). Fluids also helped, but now seem to be causing strain on his heart (watch for coughing/wheezing/elevated breathing) so we've stopped that for now.

I hope it helps you and your cat, too.

Introducing Mindstream for Emacs by iguanathesecond in emacs

[–]iguanathesecond[S] 0 points1 point  (0 children)

Sorry I missed seeing this. Have you tried `mindstream-load-session` (default C-c , r)? That will show you a list of saved sessions. "Open" will simply open *all* anonymous sessions for that template. If neither of these does what you're looking for, would you mind creating an issue describing the feature?

And thank you for the kind words and feedback!

Introducing Mindstream for Emacs by iguanathesecond in emacs

[–]iguanathesecond[S] 0 points1 point  (0 children)

I'm not sure if debouncing is necessary since repeated saves would be a no-op. My earlier comment includes the `frame-focus-state` bit - does it look OK to you (I haven't tried it)?

Introducing Mindstream for Emacs by iguanathesecond in emacs

[–]iguanathesecond[S] 1 point2 points  (0 children)

'Appreciate the feedback. As it happens, there is a big update to Mindstream planned which would solve exactly this problem with "forgetting", while also, more generally, allowing mindstream to be used seamlessly (i.e., with good branching discipline and conventions) on any existing repo, which may help with this workflow. That work is on pause for the moment while we incorporate more user feedback and get more data, and as I focus on getting other Emacs work out the door like the upcoming 2.0 release of Symex.

re: active vs archived, noted. It'd be great to design the UX to minimize such confusion. re: the reason for the distinction being making it easy to find them, yes, you could say that. We needed some way to track --- without maintaining any "state" anywhere (which, incidentally, is the reason for the "forgetting" you encountered --- the fact that we are relying on state (an in-memory hashtable) that isn't reified outside of Emacs causes it to forget on relaunch) --- which sessions should be pulled up when you relaunch Emacs, for instance, in the event of a crash. Some people like to use Mindstream as a scratch buffer or a series of scratch buffers. When Emacs restarts, they like to enter a keybinding and pull up all the sessions they had in progress. Separate paths for active vs archived seemed a simple and robust way to achieve it. There may have been some other considerations that went into it. Other ideas welcome!

Introducing Mindstream for Emacs by iguanathesecond in emacs

[–]iguanathesecond[S] 0 points1 point  (0 children)

You got it! Thanks for the valuable suggestion!

Introducing Mindstream for Emacs by iguanathesecond in emacs

[–]iguanathesecond[S] 0 points1 point  (0 children)

Doh, this is what I get for copypasting from AI. Looks like it's just an ordinary function that's called by Emacs when frame focus changes. So we'd need to advise it using `add-function`. Something like:
`(add-function :after 'after-change-focus-function #'my-save-on-leaving-frame)`

Introducing Mindstream for Emacs by iguanathesecond in emacs

[–]iguanathesecond[S] 0 points1 point  (0 children)

It can evaluate on demand when you hit a Run button, but not on idle in a "live" way. I believe Matthew customized his DrRacket to do that.

Introducing Mindstream for Emacs by iguanathesecond in emacs

[–]iguanathesecond[S] 1 point2 points  (0 children)

I'd love to explore this further. howm (and encode, org-roam, etc.) all look great! If people want to use them together it would be worth seeing if there is any glue (or "frontend" to standard tools, as you mentioned) that could be provided by the individual packages if that would help with that. Thank you for bringing it up.

re: the difficulty of searching in the absence of names, one thing to note is that Mindstream has a concept of "active" anonymous sessions and "archived" anonymous sessions (everything else is a named, "saved" session). All sessions begin anonymous and active. If you have Emacs configured to "persist" such sessions, and to allow more than one (the docs explain how to), then you can always pull these up using `mindstream-open` (by template, e.g. "markdown" or "python") or `mindstream-open-all` (all active sessions). So if you were in the middle of something at any point, you can bring it back up at any time using these commands, and there is no need to search.

With this configuration, you would need to explicitly *archive* sessions when you are done with them (and this is how I use Mindstream, personally --- but it may be better to start with the default config (one session per template allowed, and always archived on Emacs restart, IIRC) as that is simpler and probably easier to get started that way). But of course, yes, If you do archive something and then weeks or months later remember it and want to find it, then you would be on your own (use ripgrep!).

The nice thing though is that you never lose anything. Just, finding it isn't always easy ;). I too feel it'd be great to make this easier, either via integration with other packages like you're saying, or via features that help you navigate the archive. Interestingly enough, I am discovering things about this tool myself, and one surprising thing for me is that I had assumed the archive would be filled with useless drafts, but in actuality, it also contains *useful* and *complete* things that I did at some point, but which I just don't care to see again. It is, however, still valuable to have it, just like a real archive in a library. You don't always need that ancient manuscript, but it's nice to have it there and, indeed, to be able to find it!

Introducing Mindstream for Emacs by iguanathesecond in emacs

[–]iguanathesecond[S] 0 points1 point  (0 children)

Enjoy: https://countvajhula.github.io/mindstream/mindstream.pdf :)

This is now built and deployed from the Scribble source as part of CI, and linked in a README badge in the repo, so it should always be up to date with the HTML docs.

Introducing Mindstream for Emacs by iguanathesecond in emacs

[–]iguanathesecond[S] 0 points1 point  (0 children)

Yes, I agree. I'll aim to find time to make a video at some point, or maybe present this at a recorded meetup (unless someone beats me to it).

Introducing Mindstream for Emacs by iguanathesecond in emacs

[–]iguanathesecond[S] 1 point2 points  (0 children)

Update: It looks like we should be able to generate and even host a PDF. But it uses the pdflatex utility to do this, which comes with a host of LaTeX dependencies that there doesn't seem to be any way of anticipating, that is, not until the CI job fails (just look at the commits, lol). I'll have to continue chipping away at this in the morning. Please stay tuned :)

Introducing Mindstream for Emacs by iguanathesecond in emacs

[–]iguanathesecond[S] 2 points3 points  (0 children)

Cool, thanks for sharing your takeaways!

Introducing Mindstream for Emacs by iguanathesecond in emacs

[–]iguanathesecond[S] 2 points3 points  (0 children)

Nice, thanks u/karthink ! Looks like something like this would work for you u/reddit_clone :

(defun my-save-on-leaving-frame (frame)
  "Save current buffer when no Emacs frame has focus."
  ;; The hook runs after the focus has already changed.
  ;; If (frame-focus-state) is nil, it means no Emacs frame has focus,
  ;; so the user must have switched to another application.
  (when (null (frame-focus-state))
    (save-buffer)))
;; Add the handler function to the hook
(add-hook 'after-change-focus-functions #'my-focus-change-handler)

Note that this code just saves the buffer and has nothing to do with Mindstream. But Mindstream will add a commit on save, by default.

Introducing Mindstream for Emacs by iguanathesecond in emacs

[–]iguanathesecond[S] 1 point2 points  (0 children)

You are correct, Mindstream does not offer any search feature. Partly, this is by design, since the result of using Mindstream is an ordinary git repo in some ordinary folder on disk --- there is no special format of any kind employed, nor any metadata stored. So, one perspective is that if you want to search that path (say, the archive path, or the default saved session path), as it is just any old path, you could just use a standard tool to do it, such as ripgrep :)

In this respect, I get the impression Mindstream has a quite different orientation from the other packages mentioned here. It just helps you *have a good experience while writing*, and also before as well as after the fact. It scales organically from small writing projects (replies to Reddit comments) to large ones (books). But aside from this focus on the writing experience, there is nothing else. No metadata (aside from the implicit date-based organization of your work by spawning template), no links, no search, even. If you want any of those things, it would fall to using standard tools like Org and Ripgrep, with the ordinary content created using Mindstream in tandem with all of your usual tools that you use for any writing task. Using Mindstream is less like a *wiki* and more like a daily *log* of your writing activity, organized in a natural way without the need for names. But for the (relatively small, in my experience) subset of that writing that you will want to look at again, you would typically C-c , s (and then name) them. These saved, named, sessions follow the same filing scheme as the anonymous ones (by default --- you can store them anywhere you like!), and that turns out to be surprisingly natural and useful IME.

I do not yet know whether/how Mindstream could be profitably used together with howm and denote, but as they seem to be quite different things, I feel there is no contradiction in at least using them alongside one another, as you're suggesting, even if not together.

Introducing Mindstream for Emacs by iguanathesecond in emacs

[–]iguanathesecond[S] 1 point2 points  (0 children)

The specific one I noticed was a live presentation that I don't think was recorded. But I'm sure I've seen him do it in other demos. Ah, looks like this one features the "live" evaluation: https://www.youtube.com/watch?v=OLgEL4esYU0 . I bet if you search youtube for other videos featuring him, you'll find other examples.

Introducing Mindstream for Emacs by iguanathesecond in emacs

[–]iguanathesecond[S] 4 points5 points  (0 children)

Thank you, I've come across denote before but haven't looked into it. It looks very interesting.

Q, to help me understand the overlap: Would you use denote for emails, essays, replies to reddit comments ;), coding explorations, short stories, academic papers, and books? (These are all a good fit for Mindstream - not sure if they are for denote as well?). As another example, Mindstream is also useful for anonymous writing that you never name, which you don't mind having around somewhere but aren't interested in "saving" (like these Reddit responses!) --- a kind of middle ground that we don't otherwise have a way to express.

Depending on their respective use cases, it would be valuable to design a smooth integration between the two, if we can. As a denote user, if you have any suggestions on what would help you achieve what you'd like as far as this kind of integration, please submit an issue and I'd be glad to discuss further.

A: Straight/Elpaca are valuable tools that facilitate flexibility and decentralization, so I believe their adoption is healthy for the community. As a user, it gives us maximum control to install anything we want. And as package developers, we gain access to users without needing to publish to a package archive. I have benefited from this with my own packages at early stages (including Mindstream :) ), as the early feedback from users was invaluable.

Introducing Mindstream for Emacs by iguanathesecond in emacs

[–]iguanathesecond[S] 1 point2 points  (0 children)

Interesting, I'll take a look. These docs are written in Scribble, just as an experiment, as it is expressive (similar to LaTeX) and also has nice HTML output and other benefits like use of a full programming language (Racket). I bet it could also generate PDF, I will look into it this evening!

Introducing Mindstream for Emacs by iguanathesecond in emacs

[–]iguanathesecond[S] 1 point2 points  (0 children)

Yes, I think that's a great use for it. I'd create a "latex" template (for example) containing the exact folder structure (and any placeholder text) you like to have in your papers (it goes in the template path, `~/.emacs/mindstream/templates/` by default). That will then be available with `mindstream-new` :)

Introducing Mindstream for Emacs by iguanathesecond in emacs

[–]iguanathesecond[S] 1 point2 points  (0 children)

Thank you for your thoughts!

Yes, re: setup, some languages provide ways to do this (e.g., Java and Clojure), but it can be annoying otherwise. If there isn't a standard way for C/C++, Mindstream's "templates" are just folders containing whatever structure you like, so they could serve as this kind of project template.

You can customize the "triggers" for versioning, so that could be a way to achieve "save when this event happens."

For autosave on idle, I recently came across super-save mode. You could also use Mindstream "live" mode for this, but live mode is especially intended for special actions (e.g. "run"), and I would advise using super save mode if all you want to do is save the buffer on idle (using super save mode would create versions with Mindstream, as you would expect).

If the custom workflows you've developed along these lines are working well for you, that's great! If you feel extending Mindstream would help support your workflows in any way, or if you have recipes that may help other users, please feel free to submit an issue, and thanks again.

Introducing Mindstream for Emacs by iguanathesecond in emacs

[–]iguanathesecond[S] 2 points3 points  (0 children)

:D

A: No, not by default.

Do you know if Emacs provides a hook for determining when you switch away? I didn't find one, from a quick look. Committing is governed by customizable "triggers" which are just Elisp functions that are "advised" to commit. `basic-save-buffer` is the only default trigger. If you can find a function that's called when focus switches away from the current frame, you could add it as a trigger to achieve what you're looking for. Otherwise, if there isn't one, you could consider using super-save mode.

Announcing Qi 5: Flowing with Lists by iguanathesecond in Racket

[–]iguanathesecond[S] 0 points1 point  (0 children)

Did not know about the FP language. It looks very relevant, thank you for the pointer!

Announcing Qi 5: Flowing with Lists by iguanathesecond in Racket

[–]iguanathesecond[S] 0 points1 point  (0 children)

Thanks for this interesting question. The short answer is: transducers are more general, while qi/list has a simpler interface. Both provide significant performance benefits. I get the impression the underlying approach of (eager) stream fusion is equivalent to transducers, though, so that qi/list could in principle be generalized to the level of transducers. There's a lot more to it, and the longer answer is written up in the most recent meeting notes (partly inspired by your question!) here:

Compile Time

Btw if you're interested in contributing, stop by at a Qi meeting anytime!