Nitrogen reveals too much things + one flaw into external JS

40 views
Skip to first unread message

12u...@gmail.com

unread,
Feb 16, 2022, 9:02:07 AM2/16/22
to Nitrogen Project / The Nitrogen Web Framework for Erlang
Hi Nitrogeners,

I use the OSWAP ZAPROXY scanner to see which security headers and other things have to be corrected to get a good security.

The reflected XSS test is causing a problem : it crashes the nitrogen worker (@line# 188 of lib/nitrogen_core/src/wf_ccore.erl), ok, what is happening into the console stays into the console, but what is bothering me is that it gives the same output one the server :

```erlang
<h2>&#9888; There was an error processing this page &#9888;</h2><code><pre>exit:{failure_to_deserialize_page_context,
         [{serialized_page_context,<<"<img src=x onerror=prompt()>">>},
          {suggestion,
              "The most common cause of this is that nitro_cache is not started. Try running: application:start(nitro_cache)."}]}
--------------------------
[{wf_core,deserialize_context,1,
          [{file,"/home/niff/ERLANG/SITES_NITROGEN/emploi/lib/nitrogen_core/src/wf_core.erl"},
           {line,188}]},
 {wf_core,run_catched,0,
          [{file,"/home/niff/ERLANG/SITES_NITROGEN/emploi/lib/nitrogen_core/src/wf_core.erl"},
           {line,85}]},
 {wf_core,run,0,
          [{file,"/home/niff/ERLANG/SITES_NITROGEN/emploi/lib/nitrogen_core/src/wf_core.erl"},
           {line,23}]},
 {cowboy_simple_bridge_anchor,init,2,
                              [{file,"src/cowboy_bridge_modules/cowboy_simple_bridge_anchor.erl"},
                               {line,36}]},
 {cowboy_handler,execute,2,[{file,"src/cowboy_handler.erl"},{line,41}]},
 {cowboy_stream_h,execute,3,[{file,"src/cowboy_stream_h.erl"},{line,320}]},
 {cowboy_stream_h,request_process,3,
                  [{file,"src/cowboy_stream_h.erl"},{line,302}]},
 {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]</pre></code>
```

which is a problem as it blatantly shows that the attack has done something to the server :/

Is there a way to mitigate that, still showing the problem into the console, but reflect nothing to the outside world or eg: return to the `index` page, something like that.

I'm not good enough to figure out the code that could alert on one hand and show nothing on the other.


There's also a concern about `https://code.jquery.com/ui/1.12.1/jquery-ui.min.js` (I replaced the embedded one by this one 'cos my Internet connection is ADSL), as it's `#datepicker` is subject to XSS : https://bugs.jqueryui.com/ticket/15284 - unfortunately, I don't know a jack about JS and the latest version of this file (1.13) doesn't work out of the box (#datepicker doesn't show it's calendar, autocomplete doesn't work anymore and certainly other problems).

Is it a dangerous issue or not ? And if yes, could you, Jesse, make the evolution ?

Other than that, Nitrogen is awesome, as my most bloated page still makes around 47 requests per second (measured with ab) on a Raspberry Pi 4 Model B 8 GB pushed to 1900 MHz :)

Jean-Yves

PS: If someone knows how to reach the devs of gogol groups, I'd like to have their email address, as the "new conversation" button stays completely hidden on a 1366×768 screen :/

Jesse Gumm

unread,
Feb 16, 2022, 9:15:37 AM2/16/22
to nitrogenweb
Hey Jean-Yves,

For the error exposing the nature of the errors, have a look at adding a custom crash handler: https://nitrogenproject.com/doc/crash.md

The crash handler that's enabled out of the box is the debug_crash_handler, which reveals the error for easier debugging. (https://github.com/nitrogen/nitrogen_core/blob/master/src/handlers/crash/debug_crash_handler.erl)

For production, the simplest example you could use is the default_crash_handler (https://github.com/nitrogen/nitrogen_core/blob/master/src/handlers/crash/default_crash_handler.erl)


As for the jquery-ui XSS error, if I'm reading this correctly, it doesn't appear to be a significant attack vector, unless you are passing unsanitized user-entered data to the datepickers.

That said, I'll look into the JQ-UI-1.3 issue and see what it'll take to upgrade.


I'm so glad to hear Nitrogen is working well for you, and that 47-requests per second on a Raspberry Pi is excellent!

-Jesse


--
You received this message because you are subscribed to the Google Groups "Nitrogen Project / The Nitrogen Web Framework for Erlang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nitrogenweb...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nitrogenweb/84ab16b2-736b-49db-9d11-12efeafa7878n%40googlegroups.com.


--
Jesse Gumm
Owner, Sigma Star Systems
414.940.4866 || sigma-star.com || @jessegumm

12u...@gmail.com

unread,
Feb 16, 2022, 10:36:11 AM2/16/22
to Nitrogen Project / The Nitrogen Web Framework for Erlang
> Hey Jean-Yves,
>
> For the error exposing the nature of the errors, have a look at adding a custom crash handler: https://nitrogenproject.com/doc/crash.md
>
> The crash handler that's enabled out of the box is the debug_crash_handler, which reveals the error for easier debugging. (https://github.com/nitrogen/nitrogen_core/blob/master/src/handlers/crash/debug_crash_handler.erl)
>
> For production, the simplest example you could use is the default_crash_handler (https://github.com/nitrogen/nitrogen_core/blob/master/src/handlers/crash/default_crash_handler.erl)

Hey Jesse,

my bad, I still miss some reflexes  - well, I've quite a buzzing head at this time, as I have to learn all about HTML, css, security, headers, Erlang in general, Nitrogen in particular, so my evolution is a bit slow - also my bad, as I delayed this moment too much, but hey, this is an adventure ! ;-)

> As for the jquery-ui XSS error, if I'm reading this correctly, it doesn't appear to be a significant attack vector, unless you are passing unsanitized user-entered data to the datepickers.

OK, it was my conclusion.

For security sake, I do not submit anything that is not previously sanitized , I even modified nitrogen_core_/lib/wf_convert.erl to encode some suspects I've got from security articles : space, !, % (, ), +, =, @, $, [, ],{, }, `, |, ^, *, ,, ;   with a special dash I found by pure luck (regular being : &#45;) : &#8208; that looks exactly the same but is rejected by Postgresql as a comment indication when doubled :)

> That said, I'll look into the JQ-UI-1.3 issue and see what it'll take to upgrade.

Thanks Jesse.

> I'm so glad to hear Nitrogen is working well for you, and that 47-requests per second on a Raspberry Pi is excellent!

Woops, CORRECTION, that was the numbers for my old laptop (i5-4210M @ 2.6 GHz, 2 phys core + 2 logical core), the RPI4 having 4 phys cores @1.9 GHz and doing : ~77 Requests/sec (w/ a concurrency of 100 simultaneous connections, 98 % of the requests fitting within 2060 ms).

On the index page, that is much lighter, it reaches ~335 Req/s (same conditions, 98 % of the requests within 685 ms) - but I do not despair to make it better, as this one is geared with Raspberry OS 32 bits (makes a nice desktop w/ XFCE BTW, not that slow as one could have thought - the current consumption is terrific : 12.2 W @ 100% load, taking in account a switching power supply efficiency of 78 % - less than 4.1 W idle with several daemons running + XFCE) and I had the luck to purchase another one just before the general shortage, which will get the 64 bit version (time and HDMI hub is missing to install it:/)

I certainly will come back to you one day about Nitrogen-on-a-farm, but not until I could purchase at least 3 more (my contention is, with 4 of them I can build a very capable H.A. cluster).

Again, thanks for your swift answers, I'm now diving into the crash handlers Nitrogenaurus world :)

Jean-Yves

Lloyd R. Prentice

unread,
Feb 16, 2022, 12:43:03 PM2/16/22
to nitro...@googlegroups.com

Hi jean-Yves,

You might take a look at:


https://discuss.linuxcontainers.org/t/lxd-cluster-on-raspberry-pi-4/9076

Love to hear your experience if you fire it up.

Best wishes,

LRP

Sent from my iPad

12u...@gmail.com

unread,
Feb 16, 2022, 1:27:21 PM2/16/22
to Nitrogen Project / The Nitrogen Web Framework for Erlang
> You might take a look at:
>
>
> https://discuss.linuxcontainers.org/t/lxd-cluster-on-raspberry-pi-4/9076
>
> Love to hear your experience if you fire it up.

Goody ! I didn't knew about what looks like a very simple cluster to set up.

At first, I was more thinking about a "cooperative cluster" (much more an assembly of servers w/ haproxy as a frontend), but this seems like a better solution, thanks for that, Jesse.

> Love to hear your experience if you fire it up.

I for sure won't forget to keep you aware if I can build such a cluster :)

Jean-Yves

12u...@gmail.com

unread,
Feb 16, 2022, 1:32:11 PM2/16/22
to Nitrogen Project / The Nitrogen Web Framework for Erlang
Oops, thanks LLoyd (I missed the header) !

Lloyd R. prentice

unread,
Feb 16, 2022, 4:23:06 PM2/16/22
to nitro...@googlegroups.com
Hi Jean-Yves,

Building an LXD appliance has been on my to-do list for sometime, but too many projects further up the queue.

There's also an LXD appliance for Intel NUCs. I use a NUC from System76 as my main workstation and love it. I'm thinking of picking up a used NUC, upgrading RAM and ssd, and installing the LXD appliance.

It's possible to build out the most recent NUCs with 64GB of RAM and up to 16TB of RAM. Beyond my budget at the moment, but seems like that such a configuration would support mega LXC containers.

But first step would be simply bringing up Nitrogen in a single container and configuring the network to talk  it to the world.

Anyway, do keep me posted.

All  the  best,

L.

12u...@gmail.com

unread,
Feb 16, 2022, 5:58:32 PM2/16/22
to Nitrogen Project / The Nitrogen Web Framework for Erlang
Hi Lloyd,

System76 meer6 NUC looks very nice, as their laptops, however since I bought my first Raspberry Pi 4 8 GB I fell in love with ARM, simple, power efficient with an outstanding ratio power/capacities.

At this time, my dream workstation would be a laptop with an ARM with 16 cores (with full core autostop and blazing fast awakening + manual control of those for travels) and on the other side, I'd like an application server using two Marvell (ex-Cavium) ThunderX2 w/ 64 cores/128 threads each, a bunch of memory and a mix of NVM and HDD (or an EPYC w/ 2-CPU, but it sucks a lot of juice when staying up 24/7).

This is funny, because I observed that old farts like us, that fell quite early into IT, have a split tendency about hardware : very small or huge and (almost) nothing in between ;)

Anyway, my future cluster of tiny machines is also beyond my budget at this time - I hope that today's shortage will not last too long, but I fear an explosion in prices - in less than one year (9 months), the RPI 4 8 GB took +7 % and most of official dealers have no more stock since the last quarter of 2021. Knowing that a single regular container shipment jumped from ~$2,000 to around $23,000, the odds are not very good for the near future :/

Have a nice eveniday (or mornight),

Jean-Yves

Lloyd R. Prentice

unread,
Feb 16, 2022, 6:38:32 PM2/16/22
to nitro...@googlegroups.com
Yes,

My hero and mentor was Chuck Moore, developer of Forth. His genius is challenging conditional consensus and solving the problem at hand with minimal computational resources. In early days he wrote all of the software for a major radio telescope installation in forth.  I don’t know if you know the story, but he developed his own chip-design CAD system in forth, then went on to develop a whole line of amazing chips. The GreenArrays  G144A12 is, I believe, his latest.

Keep trucking,

Lloyd



Sent from my iPad

On Feb 16, 2022, at 3:58 PM, 12u...@gmail.com <12u...@gmail.com> wrote:



12u...@gmail.com

unread,
Feb 17, 2022, 9:46:52 AM2/17/22
to Nitrogen Project / The Nitrogen Web Framework for Erlang
Hehe, a friend of mine (excellent Erlang programmer BTW, won the 2nd place in a contest of Erlang obfuscation) likes very much Forth and deplores it was relegated far from sight - IIRC, PDP 11 was based upon it and some early Sun stations had a BIOS written in Forth.
The chip seems also impressive.

This leads to what you and I already know : new doesn't mean better (and mostly nowadays, far from it).


Cheers,

Jean-Yves

Lloyd R. Prentice

unread,
Feb 17, 2022, 4:43:12 PM2/17/22
to nitro...@googlegroups.com
Hi Jean-Yves,

Thanks for the links. I’d love to get back to forth, but my work these days centers around self-publishing and the web. I’m guessing that it would take man-years to replace LaTeX with forth. And broad enthusiasm for forth petered out before the web era

My own programming skills are more dilettantish than professional. But all too-many years ago I launched and managed a company that developed shrink-wrapped educational and consumer software in forth for major publishers—over 100 titles that ran on Apple Ii and competitors. We could put more content and interaction on floppy disks than our competitors so won many of the juiciest dev contracts of the time.

Love to hear what you’re working on and ambitions for Erlang/Nitrogen.

All the best,

Lloyd

Sent from my iPad

On Feb 17, 2022, at 7:46 AM, 12u...@gmail.com <12u...@gmail.com> wrote:



12u...@gmail.com

unread,
Feb 17, 2022, 10:50:29 PM2/17/22
to Nitrogen Project / The Nitrogen Web Framework for Erlang
Hi Lloyd,

> Love to hear what you’re working on and ambitions for Erlang/Nitrogen.

Well, I abandoned my restaurant idea, as the context situation is not very good at the very least - not a loss of time though, as the doc I browsed and collected is helping me now.

Right now, I'm using an old abandoned small project that I'm refactoring and finishing after seeing a video from Garreth Smith about how to explode a large function into small pieces smartly, I'm also taking a bunch of notes into each page about what I found/do and why - in fact, I intend to use it as a memento for further projects and as a real training, as I spend all my free time on it.

I'm glad, 'cos the more I write in Nitrogen, the easier it comes - I still have a long way to go, but I'm optimistic, even if Erlang doc is an almost useless nightmare - it must be useful when you already fully know the language, but at the same time, it is the moment where you don't really need it anymore. This by itself induces a enormous loss of time for almost nothing :( Elixir is a piece of shit, but at least it's creators took the doc quite seriously and made an effort to make it readable and usable.

For example, in Nitrogen, I can't stand the way sasl is writing logs to the disk that is forcing to make use of rb, so I'd like to change the disk logger to something more human, such as Lager or whatever, even the kernel embedded logger, provided it can write logs in clear text, but I don't fully understand what the doc says about doing that (with the new  logger_disk_log_h logger, but how !?) as there not a single line of example nor some tracks about how to write that :((( I let it be, as I don't wanna spend 2 or 3 days to search everywhere without even knowing if there a snippet of code doing that somewhere.
I think I'll comme back to my first idea : install Lager, zap every logging line that doesn't fit my need from Nitrogen and add Lager lines where I need them, this will go much faster than trying to do things by the (insane) rules.

Speaking about doc, do you know if there's an Erlang O'Reilly digest/memento small book (just listing all primitives of the language with a short description) ? I searched the web, but found nothing relevant.

Further projects are, may be a blog, before attacking the big piece, a project that lies around for years, a full ERP with a web store and documents crafted by PHP servers using the wonderful TCPDF library - but for that, I would need an up to date nitrogen_element, jqgrid from : https://github.com/RomanShestakov/nitrogen_elements, I guess, because jqgrid has a lot of versions and the element git is last dated to october 2013 :/) (see what it does @ http://www.trirand.com/blog/jqgrid/jqgrid.html), but I've enough things to do and learn and absolutely don't want to dive into JS - sooo, I don't know what to do, as I'm much more a brick assembler than a developer - I could do without jqgrid, but it wouldn't be as easy, especially because, among many interesting things, it has clickable columns headers to trigger the wanted sort, pagination, multi-level display of tabular data (such as normal rows are invoices with total price and VAT, but you have a small icon that once clicked shows the lines of the invoice, etc).

Upon that, I also have to learn eunit and common test and how to correctly use them - that's quite a lot when you pile all these things up - and it's not finished, I also have to learn how to dispatch copies of a program to other machines, how to migrate a running program from one machine to another one, how to hot-load a new version of a module and see which library is good enough to connect much more than 60 machines together, which is more or less the limit of the intrinsic inter-communication framework and, last but not the least, learn the OTP way in deep, arrrggghhhhhhhh !).

Jean-Yves

12u...@gmail.com

unread,
Feb 17, 2022, 10:53:59 PM2/17/22
to Nitrogen Project / The Nitrogen Web Framework for Erlang
I forgot one other thing : learn how to use Tsung.

Lloyd R. Prentice

unread,
Feb 18, 2022, 1:19:42 AM2/18/22
to nitro...@googlegroups.com
Ah, Jean-Yves,

We have a significant common interest.

I learned Erlang to implement a web project that has been long on my mind. That led me to Zotonic. I spent a year trying to understand and develop my project in Zotonic. But one day my computer ate everything I’d written (don’t ask). Nobody could help me understand what happened. But I realized that Zotonic had a serious single point of failure.

That led me to Nitrogen. I made a deal with Jesse that I’d co-write a book with him in exchange for mentoring. Took far longer than I anticipated due to demands on Jesse’s time, but that led to our book Build It with Nitrogen.  

Now I’m turning my interest back to Erlang, realizing that I need to relearn much that once sort of knew. I learn best by writing about what I’m trying to learn.  So once I’ve launched the book I’m working on now I intend to start two new books—Erlang Lab Notes and Nitrogen Lab Notes. The idea is to work my way back up through Erlang and Nitrogen one experiment at a time, carefully document every experiment as I go.  

In parallel I’ll be developing the web project that has obsessed me for more than a decade.

So, would you like to combine forces and share author credits on Erlang Lab Notes?

Best,

Lloyd 



Sent from my iPad

On Feb 17, 2022, at 8:54 PM, 12u...@gmail.com <12u...@gmail.com> wrote:

I forgot one other thing : learn how to use Tsung.

Marc Worrell

unread,
Feb 18, 2022, 2:17:45 AM2/18/22
to nitro...@googlegroups.com

On 18 Feb 2022, at 04:50, 12u...@gmail.com <12u...@gmail.com> wrote:

For example, in Nitrogen, I can't stand the way sasl is writing logs to the disk that is forcing to make use of rb, so I'd like to change the disk logger to something more human, such as Lager or whatever, even the kernel embedded logger, provided it can write logs in clear text, but I don't fully understand what the doc says about doing that (with the new  logger_disk_log_h logger, but how !?) as there not a single line of example nor some tracks about how to write that :((( I let it be, as I don't wanna spend 2 or 3 days to search everywhere without even knowing if there a snippet of code doing that somewhere.
I think I'll comme back to my first idea : install Lager, zap every logging line that doesn't fit my need from Nitrogen and add Lager lines where I need them, this will go much faster than trying to do things by the (insane) rules.

In Zotonic we recently removed all use of lager.

Lager is now superseded by the Erlang OTP Logger application.
Besides that lager doesn’t play nice with qlc and apps that use Logger.

For your log files you can use logjam to format the messages in readable format.
There is a Hex package, and a git repo:


In Zotonic we use our own formatter (based on logjam), which knows a bit more about the concepts of sites and other system specifics.


Cheers,

Marc

12u...@gmail.com

unread,
Feb 18, 2022, 9:42:19 AM2/18/22
to Nitrogen Project / The Nitrogen Web Framework for Erlang
Hi Lloyd,

> We have a significant common interest.

That was also my impression :)

> That led me to Zotonic.

I took the same path, unfortunately, just like Django for Python, Zotonic is a framework that goes a bit too far in such a way that it's learning curve is quite high, add that to the language learning and you end up lost in space easy. One thing I really hate, whatever the language, is the presence of an ORM, which is an heresy to my eyes.
My impression is, it is nice and allows you to do a lot… when you know it from top to bottom, which isn't the case with Nitrogen, that leaves you much more freedom to do things your own way (yep, I also hate strong guidelines 'cos in a way, I'm a bit of an anarchist;-p)

>  I learn best by writing about what I’m trying to learn.

Welkhomm toooo ze klub !
Do you also forget the first name of people, despite the fact you know them for decades, even from school, because you see their face with all details through your 3rd eye, and are you also numbers-dyslexic ? If so, that means your memory is 95  % visual - I need to write down things if I want to remember them well (hence the lot of notes into my pages, fortunately, as Erlang is a semi-compiled and it's compiler eliminate comments, opposite to Python, where you have to stipulate it, this is not a problem).
Oh, and do you flounder a lot a certain amount of time and poofff! you understand the whole thing at once ?

> I’m working on now I intend to start two new books—Erlang Lab Notes and Nitrogen Lab Notes.

Excellent news, but please use another format than the one you've chosen with "Build it with Nitrogen", it remember's me bad memories of maths class, where some profs used this "stepping method" to drive you to the solution - as my memory is essentially visual, this way of writing parasites it a lot - in a word, go straight to the solution, and explain why you took this particular path instead of another after. Some books do that (sorry, no specific title in mind), they present the essential in a block with a border that is clearly identifiable and if you need more information, everything that is after this block are detailed explanations. Also don't forget to process what almost all others are leaving floating in the limbo i.e.: what is an Erlang behavior and how does it work (intimately), how to write a "gen_something" (with a thorough explanation about choices taken), etc, with all the little tricks that save the day.

> So, would you like to combine forces and share author credits on Erlang Lab Notes?

At this time, this is a no, as, if my life is actually more than quiet, I sense it will not stay this way too long, so engaging into a close cooperation without knowing if I will be able to push it to the end would be foolish and possibly a disappointment for the both of us.
However, if you do like Jesse has done, publishing it in the raw, this would be an easy way to complement it if I can, especially when it will cross my own path.

For example, this night I conducted a reflexion about JS and also began to look after pieces to work seriously, such as jqgrid, which I need up to date to benefit from all it's goodies, and a gallery with thumbnails with a zoom function (just like the one of mamazon) - for the gallery, I noticed the doc was not too bad and that there are not very much methods exposed to the outside, so I changed my mind as it might not force me to learn a lot about JS (provided it is well written AND without any security flaw, which is another story :~), just to learn how Nitrogen hooks itself on JS and how it process it's events.
I also grepped the code and saw the bindings to JS are minimal - I now have to fully understand the whole process in order to dive into writing my own elements - if I succeed, correction, when I'll have succeeded, which can take… some time, I will be able to write about it.

One thing just popped into my mind, why not making a book(s) in the form of a/some binder(s), publish it's pages as a bundle for the general sections and after that, chapter by chapter ?
I know this in an uncommon way to do, but when it is about a language that covers so much, it might help to gather very good programmers' way of doing things.
This would also allow to add an unattended chapter as people tend to usually have strong and weak skills in the language, allowing them to be expert in something and (almost) learners in another thing (of course I'm making a transfer of my own mind !;)

Yours,

Jean-Yves

12u...@gmail.com

unread,
Feb 18, 2022, 11:22:03 AM2/18/22
to Nitrogen Project / The Nitrogen Web Framework for Erlang
Hi Marc,

> Lager is now superseded by the Erlang OTP Logger application.

Yep I read the whole shebang from Erlang lame doc and concluded that it does the same, almost surely in a better way, as Lager - this was the point where I was gone mad because of the lack of implementation example or at least a detailed todo list on how to use the director that write in clear to the HDD (BTW, strange thing open-source people decided to write binaries instead of clear text, reminds me with a huge POS named shytstemd, which is also a threat to almost every people that use Linux (well, it will be for sure a good way for some services to penetrate each and every computer if this day happens :(

> For your log files you can use logjam to format the messages in readable format.

Thanks for this URL, the screenshot looks very nice, a color code being an excellent idea to catch your eyes only on what needs vigilance :)

I'll give it a look when I will have figured how to implement the other director of error_logger :/ (unless this git does it).

Cheers,

Jean-Yves

12u...@gmail.com

unread,
Feb 18, 2022, 11:36:03 AM2/18/22
to Nitrogen Project / The Nitrogen Web Framework for Erlang
Thanks Marc !

I hadn't read all before answering you, this nice logger has all that I want, included the piece of code to replace sasl (well, as far as my guess is correct : it is possible to add another log pool using logger_disk_log_h on the exact same model as the one described that uses logger_std_h just below it).

Cheers,

Jean-Yves

Jesse Gumm

unread,
Feb 18, 2022, 5:44:05 PM2/18/22
to nitrogenweb
Thanks, Marc, for sharing logjam and the Zotonic error handler.  That's very insightful and inspiring stuff.  Also, I love that logjam is written in LFE - that makes me smile!

Regarding logging in Nitrogen and Erlang, I've been planning on implementing a logger error handler that uses the splunk.com API (as that's the logging platform almost all of my work uses).

Also, Jean-Yves, regarding the Erlang docs, I can understand where you're coming from in terms of the docs being more of a reference (that's how I use them).

That said, I've been using Zeal/Dash (Zeal on Linux and Windows, Dash on Mac) with the Erlang docs (and the Nitrogen docs can be installed as well for both Dash and Zeal - with the work Bunny Lushington did a while back).  I find it tremendously helpful.  To install the Nitrogen docs on Zeal, you have to manually load a .tgz file, though that file can be generated directly from the nitrogen_core repo, or just downloaded from http://sanfrancisco.kapeli.com/feeds/zzz/user_contributed/build/Nitrogen/Nitrogen.tgz and installed manually:

1) Go to Edit > Preferences
2) Look at the Directory for Docset Storage
4) In that directory, extract that tarball with `tar xvzf Nitrogen.tgz`
5) Remove the old tarball, it's not needed any longer
5) Profit! (If Zeal is running, restart Zeal)

Then you have a nice little searcable Nitrogen and Erlang docs on your desktop.

-Jesse



--
You received this message because you are subscribed to the Google Groups "Nitrogen Project / The Nitrogen Web Framework for Erlang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nitrogenweb...@googlegroups.com.

Marc Worrell

unread,
Feb 18, 2022, 6:23:36 PM2/18/22
to nitro...@googlegroups.com
Hi Jesse, 

You are welcome :)

I started using Erlang-LS with my editor (and dash) and it works great.
Easily navigate definitions and implementations, get hints directly in your editor and see the specs + Docs of all functions.

I would recommend to give it a try.

Cheers, Marc



Sent from my iPad

On 18 Feb 2022, at 23:44, Jesse Gumm <gu...@sigma-star.com> wrote:



12u...@gmail.com

unread,
Feb 18, 2022, 6:36:40 PM2/18/22
to Nitrogen Project / The Nitrogen Web Framework for Erlang
Hi Jesse,

Thanks for Zeal, I didn't knew it's existence. I was struggling with a lot of open tabs in Firefox, but it is now finished, great idea and software - all docs at once is a dream come true :)

Cheers,
Jean-Yves

Lloyd R. Prentice

unread,
Feb 19, 2022, 3:23:30 PM2/19/22
to nitro...@googlegroups.com
Hi Jean-Yves,

Re memory: 

Yes, mine is certainly not as retentive as it one was. Ever more I need notes and lists to keep me grounded in this world of copious tech and life administrivia.

Re Lab Notes

I’m thinking very much cookbook-style. Perhaps I should call them Erlang/Nitrogen How Tos.

The books would be based on the old saw, “If you ain’t done it. You don’t know it.”

So how can you learn/re-learn Erlang and Nitrogen in 15-minute chunks of do-it experimentation that lead to “aha!” success?

Welcome your thoughts.

Incidentally, I did some work on Nitrogen awhile back based on using markdown in templates to significantly reduce visual noise in modules—prototyped it in bash. Shows promise, I believe, I lack the tech chops to carry through to full implementation.

All the best,

Lloyd

Sent from my iPad

On Feb 18, 2022, at 7:42 AM, 12u...@gmail.com <12u...@gmail.com> wrote:


--
You received this message because you are subscribed to the Google Groups "Nitrogen Project / The Nitrogen Web Framework for Erlang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nitrogenweb...@googlegroups.com.

12u...@gmail.com

unread,
Feb 19, 2022, 4:24:04 PM2/19/22
to Nitrogen Project / The Nitrogen Web Framework for Erlang
Hey Lloyd

> Yes, mine is certainly not as retentive as it one was.

It's because you're not old enough to fall back into childhood :)
Remember (?!?), at this time, we learned one thing at a time. It's funny, because I had a long consideration about that years ago, coming from the same feeling - I end up sorting it : it's because we want to learn many things at once, it is possible, but the brain throughput is exactly like a faucet : if you open 10 of them that are connected to the same line, they'll all flow 1/10th of only one…
However, we do not have a real choice, as we must know more or less a bit of each things that are related in programming.
So, no sweat, 'cos if you dive deep into yourself, you'll find it is in fact the inverse of your thought : you're able to learn much faster than before and gulp a lot more info too in a shorter time - forgetting a part of that is also normal, less time passed on a matter leads to less memory quality (there's a nice (general) sentence about that in france : "le temps ne respecte que les choses pour lesquelles on prend le temps", which translates to : "time only respects things for which we take the time")
BTW, what was Alzheimer first name ? ;-p)

> I’m thinking very much cookbook-style.

Yup, good idea, as far as it is exhaustive, ie: like Jesse has done for events wiring, presenting a whole panel of solutions w/ examples of each one.

> “If you ain’t done it. You don’t know it.”

This is utterly true - I have a facility to think complex things but even is the schema is correct, the execution is sometimes laborious.

> Incidentally, I did some work on Nitrogen awhile back based on using markdown in templates to significantly reduce visual noise in modules—prototyped it in bash. Shows promise, I believe, I lack the tech chops to carry through to full implementation.

I always have had problems with things that I don't really need, those stays to the project stage - conversely, I can sleep one night on two if I'm enthusiastic.


Cheers,

Jean-Yves
Reply all
Reply to author
Forward
0 new messages