unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: bokr@bokr.com
To: Luis Felipe <luis.felipe.la@protonmail.com>
Cc: Ryan Prior <rprior@protonmail.com>, jgart <jgart@dismail.de>,
	Maxime Devos <maximedevos@telenet.be>,
	Guix Devel <guix-devel@gnu.org>
Subject: Re: developing javascript with guix
Date: Sat, 30 Jul 2022 18:04:29 +0200	[thread overview]
Message-ID: <20220730160429.GA3642@LionPure> (raw)
In-Reply-To: <mhwV5r5YoT6ZMDnzRbPIc4rVUVwinpock6dLxWlAMLkY87oxmzHna_YHoH_LMH6AkkohiSDYP9aIArfczYZYrhPAfWKZ6m8hG7QbcQp_xq4=@protonmail.com>

On +2022-07-30 13:40:46 +0000, Luis Felipe wrote:
> Hello,
> 
> 
> On Wednesday, July 27th, 2022 at 23:15, Ryan Prior <rprior@protonmail.com> wrote:
> 
> > On Wednesday, July 27th, 2022 at 10:25 PM, jgart jgart@dismail.de wrote:
> > 
> 
> > > On Wed, 27 Jul 2022 11:33:43 +0200 Maxime Devos maximedevos@telenet.be wrote:
> > > 
> 
> > > Hi Maxime,
> > > 
> 
> > > Hope all is well.
> > > 
> 
> > > > Let's try not doing anything special:
> > > 
> 
> > > Thanks for the repl example and for trying out a Guix developer js
> > > workflow for me. Do you happen to know if the same approach works
> > > for erlang?
> > > 
> 
> > > I think we should have language developer documentation for
> > > general orientation of new Guix users. Ryan Prior, another Guix
> > > contributor/developer has mentioned this idea to me before.
> > 
> 
> > 
> 
> > Hey Guix! Since I'm mentioned here, I'll throw in a couple ideas.
> > 
> 
> > First, an issue about unexpected behavior. I tried running this:
> > 
> 
> > guix shell node-sqlite3 -- node <<<"console.log(require('sqlite3'))"
> > 
> 
> > It gave me an error saying it couldn't find the module sqlite3. Turns out it's because I was using node from my base profile and not from the shell. Running the shell with `--pure` makes it give a more helpful error, "node: command not found."
> > 
> 
> > Why isn't node a dependency for node-mersenne though? Is there really a use case for shipping the source code of a JavaScript library without the interpreter? At a minimum, can we make `guix shell` warn on stderr if you create a shell with one or more libraries but no interpreter?
> > 
> 
> > Second, a point about documentation. It's pretty obvious to most of us how to use JavaScript libraries (or Python, etc) with Guix, modulo small issues like the above. But Guix has two weaknesses here in comparison to other language-specific package managers:
> > 
> 
> > ## Explanation in context
> > 
> 
> > The language-specific package managers generally don't take for granted that people know anything about the language, because they're designed to be accessible to learners of the language. For example, PyPI's explanation for pip starts with the basic "can you even run Python?" and goes through a bunch of Python-specific package workflows: https://packaging.python.org/en/latest/tutorials/installing-packages/
> > 
> 
> > We could write a guide like that with information and example commands specific to Python packaging, and another for JavaScript, etc. These provide explanation in context so beginners and people who are confused for whatever reason can see concrete examples of what you're supposed to do.
> > 
> 
> > ## Specificity implies belonging
> > 
> 
> > A Python-specific package manager is full of references to Python, libraries for Python, tools for Python programmers. If you're doing Python, the PyPI shouts loud and clear: "you are in the right place!"
> > 
> 
> > Likewise for JavaScript and npm, Ruby and gems, etc. Landing on the pages for any of those package managers confirms that you are in a place where you will find information and tools that will help you with your language and package commons of choice. When you do a search for "MySQL" on PyPI, you only see Python MySQL packages, not random other stuff. The interface and search quickly confirm that you have found the right place with the right stuff for you.
> > 
> 
> > Meanwhile, in the Guix docs, everything is abstract. We don't name any specific library commons or restrict package search to any specific namespace, we don't even have tags or categories for them. There is no link to Guix documentation I can give to a Python hacker that assures them, in the way PyPI's website does, that Guix has the stuff they need and they can find it and make it work. So Guix requires more faith and experimentation from users, which means a lot of people will just bounce off it.
> > 
> 
> > I talk to somebody about once a week who says "oh I've heard of Guix and keep meaning to try it." The project has built up a lot of indistinct good faith that it has yet to make good on, so to speak. I think we can make a much better experience for users from the various language library commons if we build language-specific landing pages with instructions, documentation, and package search that affirm they are in the right place and will find the right stuff, and don't make much assumption that the person knows what they are doing.
> 
> I agree. 
> 
> 
> Using the original design of Guix website, this information could be accessible from "Home page → Guix in Your Field → Software developement". Clicking on that button would take the user to a Software Development page, which would link to language specific information to integrate Guix in one's workflow. So there would be URLs like these:
> 
> https://guix.gnu.org/en/software-development/
> https://guix.gnu.org/en/software-development/javascript/
> https://guix.gnu.org/en/software-development/python/
> https://guix.gnu.org/en/software-development/ruby/
> 
> The "Guix in Your Field" idea seems kind of forsaken, but I think it is quite important.
> 
> 
> > I'll pitch in on this effort! I have experience with Ruby, JavaScript and Python packaging and tooling and am to help build out all those areas. Our emerging teams can help lend some structure to this effort too, I imagine.
> 
> I'd say, pick one language and start :)

pub   RSA 2048/7A39C6A9 2020-07-23 luis.felipe.la@protonmail.com <luis.felipe.la@protonmail.com>
> sub   RSA 2048/E8573DB1 2020-07-23
> 

I like to have stuff available off line
(and therefore also serving as distributed backup if^H^H when things disappear :)

So whatever you provide on the internet, I would like an easy way to clone what's
being served, so I can see it in the same way but locally on my laptop or lan.

I think IWBN to import web site contents via installing/updating
a guix package, maybe based on a git repo of web site (so it's also
available to users not yet having guix installed, i.e., so a simple
snippet could also put it in
    http://localhost/guix/
) (with safety-sanitizing).

I notice that my laptop system (pureos derivative of debian) starts up
an instance of apache2. Maybe yours des too?
--8<---------------cut here---------------start------------->8---
[17:05 ~/bs]$ ps -ef|grep apache
root       791     1  0 13:53 ?        00:00:00 /usr/sbin/apache2 -k start
www-data   793   791  0 13:53 ?        00:00:00 /usr/sbin/apache2 -k start
www-data   794   791  0 13:53 ?        00:00:00 /usr/sbin/apache2 -k start
bokr      5531  2173  0 17:05 pts/0    00:00:00 grep apache
--8<---------------cut here---------------end--------------->8---

On my laptop, the command
--8<---------------cut here---------------start------------->8---
firefox-esr http://localhost/
--8<---------------cut here---------------end--------------->8---
brought up a default test page [1], which suggests to me that
we could make a guix package to install any desired docs or files
that apache2 can serve, and make them accessible to your
preferred browser via something like

--8<---------------cut here---------------start------------->8---
firefox-esr http://localhost/guix/index.html
--8<---------------cut here---------------end--------------->8---

WDYT?

[1] -- after the default page came up, I selected and copied the text
and got the following, justifying for better reading here (or interfering
with your presenter's line wrapper, sorry if so :)

--8<---------------cut here---------------start------------->8---
[17:05 ~/bs]$ wl-paste |tr -d $'\r'|blockjust -left=0 -width=60
--8<---------------cut here---------------end--------------->8---
produced:

--8<---------------cut here---------------start------------->8---
This is a modified index.html

This is the default welcome page used to test the correct
operation of the Apache2 server after installation on Debian
systems. If you can read this page, it means that the Apache
HTTP server installed at this site is working properly. You
should replace this file (located at
/var/www/html/index.html) before continuing to operate your
HTTP server.

If you are a normal user of this web site and don't know
what this page is about, this probably means that the site
is currently unavailable due to maintenance. If the problem
persists, please contact the site's administrator.

By default, Debian does not allow access through the web
browser to any file apart of those located in /var/www,
public_html directories (when enabled) and /usr/share (for
web applications). If your site is using a web document root
located elsewhere (such as in /srv) you may need to
whitelist your document root directory in
/etc/apache2/apache2.conf.

The default Debian document root is /var/www/html. You can
make your own virtual hosts under /var/www. This is
different to previous releases which provides better
security out of the box. Reporting Problems

Please use the reportbug tool to report bugs in the Apache2
package with Debian. However, check existing bug reports
before reporting a new bug.

Please report bugs specific to modules (such as PHP and
others) to respective packages, not to the web server
itself.
--8<---------------cut here---------------end--------------->8---

--
Regards,
Bengt Richter


  reply	other threads:[~2022-07-30 16:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-27  0:25 developing javascript with guix jgart
2022-07-27  9:33 ` Maxime Devos
2022-07-27 22:25   ` jgart
2022-07-27 23:15     ` Ryan Prior
2022-07-30 13:40       ` Luis Felipe
2022-07-30 16:04         ` bokr [this message]
2022-08-03 14:26         ` david larsson
2022-07-30 19:36       ` Maxime Devos
2022-07-30 19:44       ` Maxime Devos
2022-07-30 19:50       ` Maxime Devos
2022-07-30 20:22       ` Maxime Devos
2022-08-03 13:18       ` Giovanni Biscuolo
2022-07-30 19:35     ` Maxime Devos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220730160429.GA3642@LionPure \
    --to=bokr@bokr.com \
    --cc=guix-devel@gnu.org \
    --cc=jgart@dismail.de \
    --cc=luis.felipe.la@protonmail.com \
    --cc=maximedevos@telenet.be \
    --cc=rprior@protonmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).