unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxime Devos <maximedevos@telenet.be>
To: jgart <jgart@dismail.de>, Guix Devel <guix-devel@gnu.org>
Subject: Re: developing javascript with guix
Date: Wed, 27 Jul 2022 11:33:43 +0200	[thread overview]
Message-ID: <8a535734-0a7d-9276-8091-4c4312abe8a3@telenet.be> (raw)
In-Reply-To: <20220726192504.GB7293@gac>


[-- Attachment #1.1.1: Type: text/plain, Size: 1467 bytes --]

On 27-07-2022 02:25, jgart wrote:

> Should we make a guide for developing with js and guix?
>
> For example, how does a js developer use `guix shell` to load a js lib like
> node-rimraf in a repl currently?
This one is not in Guix, so I'll replace it by node-mersenne.
> There's currently no doc for getting started with that iirc

Let's try not doing anything special:

$ guix shell node-mersenne node
$ node
 > mersenne = require('mersenne')
{
   MersenneTwister19937: [Function:think we need documentati 
MersenneTwister19937],
   rand: [Function (anonymous)],
   seed: [Function (anonymous)],
   seed_array: [Function (anonymous)]
}
 > mersenne.MersenneTwister19937
[Function: MersenneTwister19937]

No setup appears to be required beyond simply installing node and the 
node library and using node's 'require' function, so I don't think we 
need documentation for this in Guix (I'm assuming that node documents 
'require'), though I suppose we could have it for completeness  (*).  If 
doing that is considered a good thing, it seems to me that it should 
then also be done for Guile, Python, C/C++/etc, Minetest, Vim, ...

Greetings,
Maxime.

(*) E.g., when looking for the 'require' function, there was initially 
some slight confusion with 'require' accepting relative and absolute 
file names so I was fearing it might need to be passed 
$GUIX_ENVIRONMENT/lib/node_modules, but this turned out to be unfounded.


[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

  reply	other threads:[~2022-07-27  9:46 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 [this message]
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
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=8a535734-0a7d-9276-8091-4c4312abe8a3@telenet.be \
    --to=maximedevos@telenet.be \
    --cc=guix-devel@gnu.org \
    --cc=jgart@dismail.de \
    /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).