Neomacs: Structural Lisp IDE/browser/computing environment

125 points
1/21/1970
17 days ago
by kscarlet

Comments


Y_Y

This is going to be a hard sell:

> Neomacs relies on Electron...

Tired flamebait aside, this looks cool. I'd like to know how it's different from Lem and Emacs-NG.

I gladly welcome "macsen" and note some other great programs in the tradition:

    Emacs (OG)
    Genera (OS)
    Climacs (CL)
    TeXmacs (DTP)
Honorable mention: Plan 9, Pharo, gforth. Anything I missed?

This store or using the computer is vastly more satisfying than rigid, compiled button-driven interfaces and makes me feel like my computer is much more a "bicycle for the mind" than a on-rails haunted house ride for the mind. I'm using Spacemacs with EXWM as my "desktop" in Guix these days and loving it.

10 days ago

lejalv

Kudos for remembering TeXmacs, for some reason it seems to be seldomly know outside of math-heavy STEM circles although it is a Scheme-programmable structured tree editor worth checking out for general document authoring.

TeXmacs does technical typesetting with similar or better quality than LaTeX (and it does not use LaTeX behind the scenes for typesetting, unlike LyX) and keeps a live representation of the document as a tree that you can query and modify (e.g. using PEGs). It is also fully WYSIWYG (unlike, say, Typst).

Using the graphical mode one can freely position math and images and text on slides with perfect typesetting. And the switch-and-fold environments let you build trees of visibility for arbitrary parts of the document (the most obvious application being having exercises that can be switched to show the solutions).

What is more: in TeXmacs one can be enforce a certain degree (to the extent permitted by the ambiguity in mathematical notation) of semantics for math, so that good-looking expressions can be directly sent to a computer algebra system (CAS) for evaluation (and printed back in a way you can read).

So TeXmacs can interface to CASs and in general any programming language.

In fact, thinking about code editing, am not sure why TeXmacs could not, in principle, be the Scheme-based Emacs that some people have dreamt of (cf. the defunct Guilemacs effort, https://news.ycombinator.com/item?id=23304457). Maybe it will: a dedicated community of hackers led by Darcy is doing experiments in this direction in a friendly fork under the name “Mogan” - https://mogan.app/guide/what-is-mogan.html, although I have no idea what are the plans for Mogan Code.

TeXmacs does not use Electron, so while it does import HTML reasonably, it won't render websites in their full glory. But there was a recent job offer for somebody to work on improving the rudimentary capabilities for collaborative editing, so it might end up offering an alternative to Overleaf.

10 days ago

sourcepluck

Downloading and trying TeXmacs after this comment. It was on the todo list, but got ripped to the top reading this. Cheers for describing the lay of the land!

10 days ago

bluepoint

I love TexMacs for taking math notes. It has great keyboard shortcuts too. I am wondering if it is still actively developed though…

9 days ago

Y_Y

TeXmacs has a release earlier this year: https://lists.texmacs.org/wws/arc/texmacs-info/2024-04/msg00...

But I think it's not going anywhere fast, after reaching feature stability there maybe isn't much to do except the hard work of upgrading dependencies (like Guile and Qt) that maybe isn't appealing to the devs.

8 days ago

Y_Y

Honestly I haven't used TeXmacs in a while. I was an avid user of LyX for a long time, until Overleaf enshittified its way into everything and became mandatory for at least the collaborations I was involved in.

TeXmacs always appealed to me, but I couldn't manage to get it to tangle out source code the way I wanted and ended up falling back on lesser tools like Jupyter for typesetting-CAS-code interaction. I really should revisit it, it's definitely an underappreciated gem.

I'm also delighted to note that Guile Emacs is scheduled to rise from its grave next week and I'm quite optimistic about its success this time round. Robin Templeton is apparently back working on it and they'll give a talk at Emacsconf: https://emacsconf.org/2024/talks/guile/

10 days ago

Conscat

> I'm also delighted to note that Guile Emacs is scheduled to rise from its grave next week

Not to sound pessimistic, because Guile Emacs is an exciting project, but I'm pretty sure I've heard that before.

10 days ago

tmtvl

Guile Emacs already is fully usable, and has been for a while, but because basically nobody is using it, it bitrots right quick and there's nobody hyping it up; which results in nobody using it and it gradually withers away until the next push to revive it.

10 days ago

fn-mote

> until Overleaf enshittified its way into everything and became mandatory[…]

This seems overly harsh criticism for something that could almost be replaced by a git repository.

If everyone is using it, they’re obviously getting value out of it.

When all of the diagram-drawing libraries are locked behind extra subscription fees, then I’ll listen to your enshittification talk.

10 days ago

setopt

Speaking as one of the mostly satisfied Overleaf users: I mainly use its Git sync feature and edit locally in Emacs.

But many collaborators were not using version control in the first place, which meant that Overleaf was a huge step up from our previous workflow of emailing manuscript_v12.tex around and waiting to receive edits.

Not to mention the issues we previously had trying to get it to compile equally on every machine, where coauthors use different TeX distributions with different packages available and different versions installed on different operating systems.

Overall, I think Overleaf struck a pretty good trade-off between being usable by both techies and non-techies. My main pain point now is having to open the web browser to create or clone new projects, which I don’t do that often, but I wish they had a command line interface or something for that.

10 days ago

kscarlet

> how it's different from Lem and Emacs-NG.

Neomacs is not a GNU Emacs clone. It changes the fundamental edited model from text (with text properties) to structured document (i.e. trees). Things done with ASCII art hack and things impossible in Emacs can now be done effortlessly in Neomacs.

> > Neomacs relies on Electron

I wish not either, but it's the pragmatic option for now, to make things work. There's no reason someone couldn’t port it to, say Tauri, or even build a browser engine in Lisp, given enough effort.

> some other great programs

Yes! They inspire me a lot and I learn from them!

10 days ago

sourcepluck

> There's no reason someone couldn’t port it to, say Tauri, or even build a browser engine in Lisp

Have there ever been browser engines done in Lisp? Don't think I've seen anything like that.

Nyxt springs to mind, I wonder if they're eventually planning to attempt one.

10 days ago

cmrdporcupine

Could it not use a linked web view via dll to webkit on Linux (and Mac) and embedded Edge webview on Windows? Why the whole electron bundling?

10 days ago

kscarlet

Probably, it's just someone made a pretty good Electron binding for Common Lisp (https://github.com/cermaic/ceramic), so I used it instead of inventing my own wheel.

10 days ago

sourcepluck

https://project-mage.org/ deserves a mention, but it's at the prototypical idea stage for now as far as I know, although the guy seems serious and sincere.

10 days ago

Y_Y

I was keen to see the outcome of that, but looking at the most recent updates it looks like the developer has been pulled away by burnout or some other external cause and progress has dried up.

9 days ago

sourcepluck

Had a look for updates there - it seems to be in stasis yes. Fingers crossed that it's only temporary, and that the developer is doing alright. He was a very exciting writer anyway, I found.

9 days ago

stevekemp

This is a hard sell:

      sudo chown root electron/chrome-sandbox
      sudo chmod 4755 electron/chrome-sandbox
Installing a new setuid root binary? I guess that the sandbox process is small, and not really electron, but just hearing "electron" and "setuid" in the same sentence is enough to make me run away!
10 days ago

kscarlet

It's known issue for any application that uses Electron but don't have enough money to get Ubuntu to whitelist it (I believe?)

I heard that this can be worked around if someone submit a package to the distro. I have no experience in packaging for distros, and help is welcomed!

10 days ago

nurettin

> It's known issue for any application that uses Electron but don't have enough money to get Ubuntu to whitelist it (I believe?)

for the laymen can you cite a source for this?

8 days ago

mdaniel

> I have no experience in packaging for distros, and help is welcomed!

Do you have an issue tracking what is currently happening and what you want to happen instead?

I'm really perplexed by your talk about "having enough money for allowlisting" because I have never heard of anyone paying a distro any amount of money for any purpose, and that's not even getting into the obvious fact that Ubuntu isn't the only distro out there

10 days ago

kscarlet

Sure! Sorry for saying something probably totally wrong -- I don't know much about packaging at all. I opened an issue here https://github.com/neomacs-project/neomacs/issues/80

10 days ago

nine_k

What happens uf you don't setuid it?

10 days ago

kscarlet

Electron won't start. Or it could start with --no-sandbox flag but that is even more insecure.

10 days ago

nine_k

Won't it be more reasonable to run it inside bubblewrap then?

10 days ago

az09mugen

While I'm not an Emacs user I like the philosophy of it. And I like text editors.

That said, I use orgmode on android (orgzly) and used it on sublime text (orgextended), that's a nice feature. I know one guy who uses emacs and when I heard of lem (https://github.com/lem-project/lem) I told him. (Lem is also in CL)

He was quite enthusiastic of it, but 2 or 3 things were missing at the time, the first of all you guessed it, it's org-mode, second was magit but he could use lem without it and finally it was a plugin manager (but we agreed it is a lot of work).

I don't know what are your plans but I hope I could give you some ideas.

13 days ago

vindarel

> magit

Since last year we have what's a start of Magit in Lem: https://lem-project.github.io/usage/usage/#version-control-w...

It has a status buffer, it can push/pull/commit, stage files and parts of hunks (no arbitrary region yet), list commits (with a handy pagination), manage stashes, do an interactive rebase (no reword yet). It's fast for big codebases (linux kernel) as it doesn't call the git binary a lot. We watch the performance and we have plans to read git blobs natively. I contributed it (https://lisp-journey.gitlab.io/blog/oh-no-i-started-a-magit-...). Working on it is a pleasure as the Lem codebase is very clean and introspectable (and specially so through Lem).

10 days ago

mark_l_watson

I like the name ‘legit’ for your project and I look forward to trying it.

To be honest, I live in regular Emacs for all productivity things, but I have also spent a fair amount of time using Lem when coding in Common Lisp. Such a cool project!

10 days ago

kscarlet

Thanks for your input! I don't org-mode myself but I know it's a killer feature for many. In fact, I think if someone commit to it, they can likely build an even more powerful version of org-mode with a lot less and cleaner code, because Neomacs use arbitrary HTML DOM as its editing representation, and no need for regex/text-property hack. See https://github.com/neomacs-project/neomacs/issues/53 for an example.

That being said, Neomacs definitely need a user base and eco-system for that to happen, but I hope so!

As for magit, I wish one day Neomacs get one as well. For now one can use Neomacs's built in terminal for git.

11 days ago

Y_Y

If you're not using the Orgzly Revived fork then I recommend giving it a try.

9 days ago

mdaniel

The license-less submissions have really ramped up recently :-(

Also https://github.com/neomacs-project/neomacs#:~:text=Neomacs%2...

16 days ago

kscarlet

Thanks for noting this! I added a copy of the GPL license.

16 days ago

torwag2

Nowadays I'm a normal Emacs user. Was a heavy emacs and org-mode user some years ago, with hundred of lines of customized lisp code to tweak Emacs. That said, looking at the repro, I still didn't get exactly what Neomacs is actually doing.

I would really appreciate some short Screencast, a bit more introduction, some examples, to get an idea what we are looking at. Maybe it is just me, but I feel that Neomacs is great and might get a user base, if potential users been able to understand within a few seconds what they are looking at.

You know, our attention span went downhill since YouTube shorts and TikTok videos

10 days ago

kscarlet

Sure! Screencast sounds like a good idea. Are you able to get Neomacs running? If so, the prebuilt one will start up with a intro buffer which is a good place to start (locally built one will need `M-x manual` to build the manual). There's also an online version at https://neomacs-project.github.io/doc/intro.html

10 days ago

joshcho

What does neomacs offer that emacs + lispy can't?

https://github.com/abo-abo/lispy

10 days ago

kscarlet

They're not the same level things. Neomacs has an Emacs-y browser inside it, for example. It is also possible to embed arbitrary content in buffer (multiple modes, real tables, canvas, etc) while Emacs is restricted to plain text plus some display property hack to support image. It's possible to have a much more powerful org-mode in Neomacs, although we definitely need a user base and contributors to make that happen... Currently, the API and the model is there, so is the possibility.

10 days ago

a1o

I get that the name is similar to neovim but for a second I thought it was the nomacs image viewer

10 days ago

TacticalCoder

> Neomacs relies on Electron which has known permission issues on some Linux distros. Try the following workaround: > sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 > sudo sysctl kernel.unprivileged_userns_clone=1

WTF? What in the world is wrong with Electron? Why is this needed and why is it only needed on some distro? Is that for all Electron apps?

10 days ago

kscarlet

I think so unless the Electron app is rich enough to get them whitelisted. Or running with sandbox disabled, but that is even more insecure and I don't feel like to make it default.

10 days ago