Hacker Newsnew | past | comments | ask | show | jobs | submit | z5h's commentslogin

I’ve actually implemented a TUI in Prolog (because there wasn’t anything in the space and I wanted to make sure it respected the relational/logical nature of Prolog). I’m happy with performance and developer ergonomics. But before I publish it, I want to firm up some opinions on how TUIs should behave for end users. Do you have any suggestions other than “use Vim/Emacs and think about it”?

TUIs in Prolog sounds fun.

The great thing about TUIs is that a simple text component is a universal widget. If the user can display text and capture events they can implement any interface components they want in terms of that.

That said, whatever the framework provides pushes users in a particular direction. The core of the things I'm thinking of (some links below) is providing easily accessible context for the user right at the point where they are working. This can be completions at the cursor, or a quick key to pop up a command palette. Fuzzy search is standard.

Here are some examples:

* Corfu: https://github.com/minad/corfu

* Vertico: https://github.com/minad/vertico

* which-key: https://github.com/justbur/emacs-which-key

* LazyVim: https://www.lazyvim.org/

I've included links that have screenshots showing how they work. The list is biased to Emacs, because I'm an Emacs user (Doom Emacs in particular) and so more familiar with that ecosystem.

Hope that helps!


So, the S and P in LSP stands for Server and Protocol. The Protocol is to exchange JSON-RPC messages with a server. So to add a new language to Zed, we should just be able to direct Zed to the server to talk to right? No. You have to write an extension in Rust. https://zed.dev/docs/extensions/languages#language-servers.

Or am I missing something?


I get what you mean, but to be fair it seems like you can get away with copy pasting what's in the doc your linked pretty much if you don't care to customize any further.


Thank you! I've recently become a bit obsessed with the work of Blaise Agüera y Arcas and his BFF experiments (self-replicating (Brainfuck) programs emerging spontaneously from random noise). This got me thinking about running a similar experiment with Cellular Automata (efficiently on GPUs). So I'll definitely be playing with this.


Intense. I thought “lose it all” meant wiping your phone.


I tried exactly this idea a few years ago (inspired by how Bear app did Markdown at the time). But I never solved all the issues to get it working 100%.Eventually I just gave up and moved on. So bravo and thank you for making it work!!


When is a good time (in the timeline of mankind) to stop being adversarial with AI?


The real question is whether mankind can refrain from being adversarial. The ability must proceed the timing.


Apparently I'm a super smeller (always the first to detect gas leaks, food that's off, know the brand of shampoo a person uses if I'm 200ft down wind, know if you use scented dish soap to clean the bowl you used to make cookies in when I eat the cookie). And I just think the idea that adding smells to the world is absolutely insane. Can I beam my favourite colours directly into your eyes with a laser from across the room? What if I know you like that colour too?


I’m realized years ago I have full blown aphantasia. But I don’t suffer from autobiographical memory deficiencies. For me it’s akin to what happens when you close your eyes for a moment then open them again. I’m not shocked by everything in the room “appearing” suddenly. I knew it was all there, but not because I visualized it while my eyes were closed. So when I remember past events, it’s with that same sensation of being there but just having closed my eyes to it. I do dream with full imagery.


After spending a lot if time in Prolog, I want a nice way to implement and compose nondeterministic functions and also have a compile time type check. I’m eyeing all of these languages as a result. I’ll watch Ante as well. (Don’t forget developer tools like an LSP, tree-sitter or other editor plugins).


Author of Ante here - it actually already has an (extremely basic) LSP. Tooling more or less required for new languages out of the gate these days and I'm eyeing the debugging experience too to see if I can get replayability at least in debug mode by default.


A Prolog TUI library that sticks to relational/logical programming, is conceptually simple, complete, and performant. Only requires some core ansi features that exist or are easily implemented in most Prologs. Currently have stuff like nested scrollable areas, toggles, frames, buttons, layouts working.

Also, a visual programming language implemented as a PICO-8 script, where the "programming" is done fully in the sprite editor.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: