Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: A web text-editor where you can write, compute and draw (lambdaway.free.fr)
218 points by martyalain on Aug 14, 2022 | hide | past | favorite | 40 comments


Is there a public code repository and issue tracker where fans and users can discuss and contribute?

Very neat, and impressive. The one downside I noticed for the exemplar page is the browser CPU load. constant 33% of 1 CPU on an AMD Ryzen 7 1800X with Firefox v103.0.2, and around 32% with Chromium v104.0.5112.79.

I guess that's fair though since the 'page' is playing Towers of Hanoi AND animating the Hilbert curve AND a linear watch (clock)!

I enjoy the presentation itself too - no wasted space, nice multi column, no space-wasting top-bar, no annoying sidebars.

Being able to invoke the code editor with the floating resizeable text-area feels so natural.

The one thing that would be good seeing as the page is a viewport onto a larger canvas is auto-scrolling the viewport when the pointer approaches the margins - so we don't have to chase, make visible, and manually grab the browser scroll bars. That would make the page naturally follow where our attention currently is.

Certainly brings a whole new meaning to "Single Page Application".

Not even going to attempt to view it on a small device though!

The only downside is requiring client-side Javascript to render - I wonder if there's a way to have a fallback to render server-side in that case?

I've been procrastinating over choice of some kind of simple wiki-like static site generator for recording many real-time stream-of-consciousness disparate unrelated bug investigations,fixes and code hacking across a wide range of open-source software.

This has a quirkiness to it that I like and it feels like a nice fit for someone with a coding ethos (even if not usually into functional!).

It may even conquer my preference for Markdown!

Time to explore!


Thank you. Try it in an tablet and a smartphone, it still works, even if it is in a downgraded mode. Lots of pages in the wiki were created on a tablet.

You write: "The one thing that would be good seeing as the page is a viewport onto a larger canvas is auto-scrolling the viewport when the pointer approaches the margins - so we don't have to chase, make visible, and manually grab the browser scroll bars. That would make the page naturally follow where our attention currently is." On my Powerbook I move the page using two fingers on the trackpad and on my iPad or smartphone I use one finger. No need scroll-bars.

You write: "The one downside I noticed for the exemplar page is the browser CPU load. constant 33% of 1 CPU on an AMD Ryzen 7 1800X with Firefox v103.0.2, and around 32% with Chromium v104.0.5112.79." In fact you can see on top of the frame-editor the cost of computing the page, it's about 30ms on my iPad. When the page is loaded no more CPU cost. The Hilbert curve CSS animation and the linear_watch (JS setInterval()) have a very small cost.


I sent you an email with details of the CPU usage but just got an unfriendly "550 spam detected" from your MTA!

  The mail system 
  
  <marty.alain@free.fr>: host mx1.free.fr[212.27.48.7] said: 550 spam detected
    (in reply to end of DATA command)


I am sorry, I have no idea why you got such an answer, you could try this other one "lambdaway at free.fr". Maybe a problem between the "free.fr" mail server and yours. You could also write in this open page http://lambdaway.free.fr/lambdawalks/?view=sandbox. Just click on the word "sandbox" in the title "lambdaway :: sandbox" to open the frame-editor, paste after the existing text (don't erase it) and save.


Added to the sandbox. I tried the alternative address but the problem is on the free.fr MTA and its Spam detection - it looks like it treats real 7-bit ASCII plain-text emails as spam. There are no embedded MIME parts stuffed with an HTML page in my emails!


You wrote « What a uniquely quirky way to communicate! » I often use the free.fr MTA called "zimbra.free.fr" working inside any web browser. I can understand why your mail was rejected by the free.fr MTA, but I don't understand why it was also rejected by the mail programs integrated in MacOS and iOS.

I like the idea of avoiding any application except the web browser. And I use emails as I use SMS on my smartphone, very small and, when developements have to be given, I just put the link to a wiki page created for this purpose, here it was in the page "sandox". It may be quirky but it is very practical when the developments are important, need to be well formatted, easy to memorize, if they need to allow for group work, etc...

You have noticed that I have eliminated the animation on the Hilbert curve, which reduces the processor load to very little. The load of the "JS setInterval()" used by the "linear watch" being very low I kept this watch.


Thanks, I don't know what happens between your mail server and mine. And you could have a look here: http://lambdaway.free.fr/lambdawalks/?view=sandbox


What a uniquely quirky way to communicate! Glad to see via your sandbox update that you identified the cause.

Now all you need do is write "lambda-mta" to take over email!

Seriously - that 'free.fr' MTA spam block needs fixing if it triggers on proper 7-bit ASCII email that doesn't contain MIME parts (which are usually stuffed with HTML and/or images).

I use Mozilla Thunderbird in "Plain Text" mode. One benefit is there is no possibility to embed hidden malicious links in plain text. Another is small size (some embedded HTML emails are HUGE!).


Re: scroll bars. Try using a regular workstation with a keyboard and mouse!


I agree with you, without a trackpad scroll-bars are required. But in workstations screens are often huge and I guess that it's possible to have a readable/comfortable display of the whole page at a 100% zoom. I have not a workstation, I use to work comfortably on a laptop (MacBook Pro or MacBook Air), a tablet (iPad Pro) in a degraded mode when I am lazily lying in bed in the middle of the night, and a smartphone, at a café, where editing is boring but reading is still rather comfortable using double-clicks to zoom in and out. So I can begin a page here and editing it anywhere else. It's funny.


The multi column layout actually lends very well to reading on mobile


Somebody asked "Is there a public code repository and issue tracker where fans and users can discuss and contribute?"

I have a slot in github, https://github.com/amarty66, but I don't work in it and it's an old version of the lambdaway project. Forking it would probably be a waste of time.

- the easiest and immediate way to test lambdatalk is to work in my wiki ( without saving anything ) just writing something like this: http://lambdaway.free.fr/lambdawalks/?view=my_test_page

- you can test and save in the sandbox http://lambdaway.free.fr/lambdawalks/?view=sandbox

- you can easily tell me something in this page http://lambdaway.free.fr/lambdawalks/?view=agora , even if it is not a true forum,

- you can mail me at marty.alain _at_ free.fr , sometimes host servers are not friends, most of the time they are and mails work fine.

- You can freely download and easily instal the lastest version of the lambdaway project from this link http://lambdaway.free.fr/lambdawalks/?view=download ; please respect the FSF licence http://lambdaway.free.fr/lambdawalks/?view=licence , and it would be nice if you give me a feedback if you like it and do something with it.

Thank you for your interest.


@hackernews guys: This is the first time in a very long time that I have received so many nice comments. Thank you. I will try to answer the questions as soon as I can.


I'd like to say that I love the freshness and obvious passion with which you present your ideas. I think it's a unique approach and I wish HTML was more like this. It already mixes data (page content) with computation (page layout), lisp is pretty obvious here. Thanks for opening my eyes to this idea!


Thank you very much, it encourages me to go further.


This is a very beautiful and interesting project, and contains some themes that I've been thinking about myself recently (representations of code vs. data, interactive development environments, text markup, wikis).

I'm curious as to your take on the following opinion:

Even if your representation for an imperative programming language and declarative markup language are the same (I quite like using a parenthesized prefix notation for both), it's beneficial to cleanly separate those two languages in order to preserve a clean and distinct set of semantics for both.

(you can also extend this to a "presentation language" - what I'm getting at is that you can take the view that the tripartite separation of HTML, CSS, and JS in web technologies is actually a feature because it leads to a cleaner design than trying to mix all of those languages together (although I think that all of those particular languages have their own sets of flaws))

λ way is a very interesting project and I'm curious to see where it will go!


Thank you. Even if Lambdatalk is built on the underlying javascript it is not imperative but functional. Data are immutable, except inside arrays with'primitives like {A.set! index value array} equivalent to array[index] = value.

About the tripartite separation of HTML, CSS and JS it's always possible using the two special forms "style" and "script". But sometimes I find better to mix both in user defined functions, easier to build and edit inside a kind of box, it's a matter of choice.

Lambdatalk hides the different syntax of HTML, CSS and JS behind a single one, s-expressions, 9 special forms, [lambda, def, if, let, quote, macro, style, script, require] and a set of primitives dealing with words, sentences and arrays in a coherent style. For instance {W.first word}, {S.first sentence} and {A.first array} get the first term of a word, a sentence and an array. Using Javascript you would write word.charAt(0), string.match( /[^\s]*\s/ ) and array[0] to get the first character of a word, the first word of a sentence, the first term of an array.

Where will the lambdaway project go? I don't know. I have been working with for years, quasi lonely, trying to ipprove it and it is useful for me, as a tool to create documents and/or to explore funny algorithms.


You may find Pollen (https://docs.racket-lang.org/pollen/big-picture.html) interesting. Pollen also blend text and program by Lisp, and can output HTML.

I loved the idea of creating my own text format by code, but now I think markdown + pandoc filters are enough for my need.


My problem with Pollen is ... Racket. Racket is much more powerful than my tiny homemade lambdatalk but Racket is dedicated to coding in a console and not to write in a text editor. I wanted to be able to write text as in any text editor (without quoting words, strings, ...) and I had to implement an inversed evaluator to do so, skipping words unevaluated and evaluating only expressions. In fact lambdatalk is nothing but an extended HTML in lisp clothes. The engine is essentially built on a single regexp, not on parser working on an AST.


> ... but Racket is dedicated to coding in a console and not to write in a text editor.

I am a bit surprised about this comment. Have you tried `racket-mode` in Emacs?

https://racket-mode.com/


edit: have a look to the origin of the lambdatalk's evaluator: http://lambdaway.free.fr/lambdawalks/?view=levithan , a single JS line using a single regular expression (regexp) to evaluate nested s-expressions from inside out. I just had to add 9 special forms [lambda, def, if, let, quote, macro, style, script, require] to extend it towards a programming language. I did not know that regular expressions were a bad choice to build an evaluator, so I tried them.


Take a look at Quarto: https://quarto.org/


Cool project. I wonder if this could be used as a Latex alternative? Can I typeset and display math equations? What about cross referencing (images, equations, sections, citations)?


I began to build a math library here: http://lambdaway.free.fr/lambdawalks/?view=formulas , it's just an idea.


I think this is great stuff. I have been thinking very much along these lines for a few months now as well, as a user interface for a logic I discovered. In the end, TeX does something very similar, just with a sharp focus on typesetting. I am not sure if the focus on Wiki is sharp enough to succeed similarly, but on the other hand, why not?


While a turing-complete language can be nice for document creation, it is a bad choice for document interchange. It opens up clients to abuse, because rendering/evaluating a document now requires performing arbitrary computations. It also tends to push computations to the client/receiver that would be more efficiently performed once by the server/sender. So one needs a “dumb”, non-turing-complete document format for interchange.

It’s easy to make everything a Lisp. What’s more interesting, and more challenging, is how to create expressive and expedient interchange formats that don’t turn into programming languages.


You are right, the danger is there. It's up to everyone to reduce the power of the special forms - here [lambda, def, if, let, quote, macro, style, script, require] - depending on the level of security required for the wiki. A good compromise between unlimited document creation and secure document sharing. Same thing concerning the choice of server or client for page calculation, personally I like the idea of offloading the former and loading the latter, the server being only a remote neutral storage. And you can instal the server inside your computer, it becomes a local application, you will be able to share dumbs file if you want.


> Currently lambdatalk comes with 9 special forms making it a true programming language

Love it :)

How does it feel to author prose with this? I noticed the text isn't directly editable (wysiwyg) and starting to think that's probably the right trade-off.


Currently text is not directly editable, you write in a (moovable, resizable) frame-editor and see "in real time" the result in the wiki page. And it's comfortable enough to write prose in long, for instance see this page http://lambdaway.free.fr/lambdawalks/?view=professeur and try to edit it. The homepage full of active codes was created from scratch without trouble. It works for me.


@all: Some people in this discussion have asked for a kind of tutorial to lambdatalk. I've written quite a few of them without ever being satisfied. Maybe this one could be useful: http://lambdaway.free.fr/lambdawalks/?view=prime_pattern .


To all of you: Thank you for all your nice comments on this project. They have led me to clarify the home page and above all have encouraged me to continue exploring, a little less alone.


This is really cool, but I the red font coloring is very hard for me to read. I have to highlight the text to be able to clearly read it.


I am sorry. At the end of the page's code is a style container where that could be changed. In fact the choice of a dark background is not the best, the default style in the wiki is a white background.


Hi, this looks very nice. It says "text-editor" in the HN title. Is there a way I can edit the linked page, or something like that?


Click 'start' in the upper left corner, and you can then edit the page's lambda-based source.


But you can't save it, happily. Try the sandbox http://lambdaway.free.fr/lambdawalks/?view=sandbox, please without erasing existing text. And you could freely install your own lambdaway wiki, see http://lambdaway.free.fr/lambdawalks/?view=download . Just a feedback would be nice.


Very cool. Is there any way to generate audio data like this one:

https://glicol.org/demo#chaos

I am very interested to see some audio/algorithmic composition applications with the language.


Sorry I didn't explore this way, just testing simple things like this: http://lambdaway.free.fr/workshop/?view=dodecaphony In fact lambdatalk is nothing but a dwarf on the shoulders of web browsers, you can use javascript in deep, and create interfaces with existing libraries doing audio.


Nice work! Possibly an alternative to TinyMCE. I can imagine using this in a variety of places that today I mostly provide a simple text box. The language component in particular is very powerful.


Pretty cool project! Although the UI is a bit funky




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

Search: