Re: Help getting started with first contribution

2017-05-08 Thread André


On 08/05/17 17:34, Catonano wrote:
> 2017-05-08 5:25 GMT+02:00 André >:
>
> Hi there, fellow Geeks!
>
>
> I've been using Guix and GuixSD recently and I'd like to contribute!
>
> I do know both Common Lisp and Clojure, so using Guile shouldn't
> be a problem.
>
>
> It won't be. I also learned Clojure before Scheme
>  
>
> I'd like to start with small tasks, like adding a few simple
> packages, then move to bigger packages, then write some services,
> and so on.
>
>
> Good plan. That's what I thought for me too.
>  
>
> However, I'm not familiar  at all with mailing list workflows
> (this is the first mailing list I actually subscribed to), so I
> may need some guidance with that.
>
>
> Wow, you must be quite young !
>  
Not that much, actually. I've been programming for 3-4 years, but mostly
in a GitHub-centric world.
>
>
> I thought about starting by creating a Guix package for
> git-remote-gcrypt
> (https://spwhitton.name/tech/code/git-remote-gcrypt/
> ). The
> package definition should be fairly simple, since the main program
> is just a shell script with no compilation dependencies.
>
> I've read the section 8.5 "Submitting Patches" of the manual, so I
> think I'm good to go.
>
> Is there any specific example of a similar simple package that I
> should base mine on? Is there anything else that I should be aware of?
>
>
> An immediate reccomendation is to use the guix-patc...@gnu.org
>  mailing list
>
> That's the mailing list for patches
>
> guix-devel is ust for discussions
>
> You might want to use git send-mail instead o your usual email client.
> It's not required, but it helps you to make your submission more
> conformant to expected formats
Thanks for the tip.
>
> Especially if you want to submit a patches series and not a single
> patch, that can be very useful.
>  
> If your first package is a siingle patch, you can just attach the
> patch to an email message to the guix-patches mailing list.
>
> Pay attention to the ormat if the log message (take a look at other
> log messages in the git log, here iis a web version
> https://git.savannah.gnu.org/cgit/guix.git/log/ )
>
> Configuring git send-email and possibly GNUs is a whole topic and it
> probably beyond my strength right now
>
Thanks, I'll figure out how to configure it properly.
> When your message (with the attached patch) will be received, someone
> will review it and likely suggest modifications
>
> You will reply with a new version (as an attached patch as usual)
>
> When your patch will be ready, someone with committ permission will
> commit it for you
>
> When your patch will be committed, you will see it in the git log as
> authored by you and signed by the committer who committed it or you
>
> Hope this helps !
>
>
> I'm looking forward to being part of this community.
>
> Thanks in advance,
> André.
>
>
> Welcome !
Thanks :)


Re: Help getting started with first contribution

2017-05-08 Thread Catonano
2017-05-08 5:25 GMT+02:00 André :

> Hi there, fellow Geeks!
>
>
> I've been using Guix and GuixSD recently and I'd like to contribute!
>
> I do know both Common Lisp and Clojure, so using Guile shouldn't be a
> problem.
>

It won't be. I also learned Clojure before Scheme


> I'd like to start with small tasks, like adding a few simple packages,
> then move to bigger packages, then write some services, and so on.
>

Good plan. That's what I thought for me too.


> However, I'm not familiar  at all with mailing list workflows (this is the
> first mailing list I actually subscribed to), so I may need some guidance
> with that.
>

Wow, you must be quite young !


>
> I thought about starting by creating a Guix package for git-remote-gcrypt (
> https://spwhitton.name/tech/code/git-remote-gcrypt/). The package
> definition should be fairly simple, since the main program is just a shell
> script with no compilation dependencies.
>
> I've read the section 8.5 "Submitting Patches" of the manual, so I think
> I'm good to go.
>
> Is there any specific example of a similar simple package that I should
> base mine on? Is there anything else that I should be aware of?
>

An immediate reccomendation is to use the guix-patc...@gnu.org mailing list

That's the mailing list for patches

guix-devel is ust for discussions

You might want to use git send-mail instead o your usual email client. It's
not required, but it helps you to make your submission more conformant to
expected formats

Especially if you want to submit a patches series and not a single patch,
that can be very useful.

If your first package is a siingle patch, you can just attach the patch to
an email message to the guix-patches mailing list.

Pay attention to the ormat if the log message (take a look at other log
messages in the git log, here iis a web version
https://git.savannah.gnu.org/cgit/guix.git/log/ )

Configuring git send-email and possibly GNUs is a whole topic and it
probably beyond my strength right now

When your message (with the attached patch) will be received, someone will
review it and likely suggest modifications

You will reply with a new version (as an attached patch as usual)

When your patch will be ready, someone with committ permission will commit
it for you

When your patch will be committed, you will see it in the git log as
authored by you and signed by the committer who committed it or you

Hope this helps !


> I'm looking forward to being part of this community.
>
> Thanks in advance,
> André.
>
>
Welcome !


Re: tree doesn't get called

2017-05-08 Thread Ricardo Wurmus

Here’s a version that works for me:

--8<---cut here---start->8---
(define-public guile-miniadapton
  (let ((commit "1b5749422304567c96ac5367f2221dda9eff5880")
(revision "1"))
(package
  (name "guile-miniadapton")
  (version (string-append "0-" revision "." (string-take commit 9)))
  (source (origin
(method git-fetch)
(uri (git-reference
  (url "https://github.com/fisherdj/miniAdapton.git;)
  (commit commit)))
(file-name (string-append name "-" version "-checkout"))
(sha256
 (base32
  "09q51zkw2fypad5xixskfzw2cjhjgs5cswdp3i7cpp651rb3zndh"
  (build-system gnu-build-system)
  (arguments
   `(#:modules ((guix build utils)
(ice-9 popen)
(ice-9 rdelim)
(srfi srfi-1)
(guix build gnu-build-system))
 #:tests? #f; there is no test target
 #:phases
 (modify-phases %standard-phases
   (delete 'configure)
   (delete 'build)
   (replace 'install
 (lambda* (#:key outputs #:allow-other-keys)
   (let* ((cwd(getcwd))
  (scm-files  (find-files "." "\\.scm$"))
  (effective  (read-line
   (open-pipe* OPEN_READ
   "guile" "-c"
   "(display 
(effective-version))")))
  (module-dir (string-append (assoc-ref outputs "out")
 "/share/guile/site/"
 effective)))

 ;; Make installation directories.
 (mkdir-p module-dir)

 (setenv "GUILE_AUTO_COMPILE" "0")

 ;; Compile .scm files and install.
 (every (lambda (file)
  (let ((go-file (string-append module-dir "/"
(basename file ".scm") 
".go")))
;; Install source module.
(install-file file module-dir)
;; Compile and install module.
(zero? (system* "guild" "compile" "-L" cwd
"-o" go-file file
scm-files)))
  (inputs
   `(("guile" ,guile-2.2)))
  (home-page "https://github.com/fisherdj/miniAdapton;)
  (synopsis "Minimal implementation of incremental computation in Guile
Scheme")
  (description "This package provides a complete Scheme implementation of
miniAdapton, which implements the core functionality of the Adapton system for
incremental computation (also known as self-adjusting computation).  Like
Adapton, miniAdapton allows programmers to safely combine mutation and
memoization.  miniAdapton is built on top of an even simpler system,
microAdapton.  Both miniAdapton and microAdapton are designed to be easy to
understand, extend, and port to host languages other than Scheme.")
  (license license:expat
--8<---cut here---end--->8---

If you have any questions about this just ask!

-- 
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net




Re: tree doesn't get called

2017-05-08 Thread Ricardo Wurmus

Catonano  writes:

> In fact, I'd paste code even on IRC channels, I don't do so because I have
> been requested to abstain from pasting code in chat channels in the past
>
> But I don't understand the reason why that is not desirable, inconvenient
> and frown upon.

IRC is for real-time conversations, and pasting many lines of code there
makes it hard to converse.  A channel can be very crowded even without
pasting code snippets, so it’s best to keep excess text to a minimum.  I
guess that’s why it’s customary on IRC to paste code elsewhere and just
link to it.

For mails it’s fine (and desirable) to include code snippets inline or
as attachments.

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net




Re: tree doesn't get called

2017-05-08 Thread Catonano
Mark,

2017-05-08 9:34 GMT+02:00 Mark H Weaver :

> Catonano  writes:
> > So here's the package
> > http://paste.lisp.org/display/345871
> >
> > What is wrong with it ?
>
> Please always include the relevant code snippets in the email itself,
> rather than using a paste site.  Paste sites are useful for contexts
> such as IRC where pasting more than a few lines is inconvenient and
> generally frowned upon, and where the discussions are ephemeral.
>
> On the other hand, these email lists are archived and we would like the
> archives to be comprehensible to future readers.  That will not be
> possible for the emails in this thread after the code under discussion
> has been deleted from the paste site, or the paste site goes offline.
>
> There are also privacy implications to forcing the readers of your email
> to click on a link, thus creating network traffic and a log on someone's
> server, in order to see the core content of your message.
>
> What do you think?
>

I'm ready to adhere to any guidelines set set by the community

I have no problem in pasting pieces of code directly in the emails body

I just hadn't considered the concerns you are raising

In fact, I'd paste code even on IRC channels, I don't do so because I have
been requested to abstain from pasting code in chat channels in the past

But I don't understand the reason why that is not desirable, inconvenient
and frown upon.

I just adhere to a costme that seems to be common and widely accepted, or
even assumed.

I can do te same for mailing lists of course. I just thought the set of
assumptions was the same

So I will follow your lead in the future, I have begun already !

In this same thread I reported errors and pieces of code pasting the wole
thing in the email body

It's even more practical, like this !


Re: tree doesn't get called

2017-05-08 Thread Catonano
2017-05-08 8:08 GMT+02:00 Ricardo Wurmus :

>
>
> It looks like you first need to create the target directory (with
> “mkdir-p”).
>

wonderful, thanks


>
> BTW: instead of an explicit list for scm-files you could use this:
>
> (find-files "." "\\.scm$")
>

Thanks, Ricardo.

This is the new error

ice-9/eval.scm:386:9: In procedure eval:
ice-9/eval.scm:386:9: Throw to key `match-error' with args `("match" "no
matching pattern" ("" "/include" "scm"))'.


I guess the culprit is this


(for-each (lambda (file)
(let* ((dest-file ...)
   (go-file (match (string-split file #\.)
   ((base _)
(string-append module-dir "/" base ".go")...)))

The first file processed is "include.scm"

I'm not sure what "no matching pattern" means
The spliitting in "include" and "scm" seems corretc (where does that slash
come from ?)

And i I switch back to the explicit list of files, I get:

wrote
`/gnu/store/mdirmfqcs2cadk8ram89j7i0z9zlrqvb-guile-miniadapton-master/share/guile/site/2.2/include.go'

So the first file ("include.scm") gets correctly written

But then:

Backtrace:
In ice-9/boot-9.scm:
 160: 16 [catch #t # ...]
In unknown file:
   ?: 15 [apply-smob/1 #]
In ice-9/boot-9.scm:
  66: 14 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
 432: 13 [eval # #]
In ice-9/boot-9.scm:
2412: 12 [save-module-excursion #]
4089: 11 [#]
1734: 10 [%start-stack load-stack #]
1739: 9 [#]
In unknown file:
   ?: 8 [primitive-load
"/gnu/store/a0z8jd9sxxi6gnip6sfhrm3i06s6c9vv-guile-miniadapton-master-guile-builder"]
In ice-9/eval.scm:
 387: 7 [eval # ()]
In srfi/srfi-1.scm:
 827: 6 [every1 # ...]
In
/gnu/store/a42pfdz8w5qxdkp6xz8783ydywmp0p8p-module-import/guix/build/gnu-build-system.scm:
 653: 5 [# #]
In ice-9/eval.scm:
 432: 4 [eval # #]
In ice-9/boot-9.scm:
 778: 3 [for-each # #]
In ice-9/eval.scm:
 399: 2 [eval # #]
 387: 1 [eval # #]
In unknown file:
   ?: 0 [0 0]

ERROR: In procedure 0:
ERROR: Wrong type to apply: 0


what does this error message mean ?

Why the second file causes an error ?

Maybe I'm being petty, I'm sorry

I'm just a bit confused


Help getting started with first contribution

2017-05-08 Thread André
Hi there, fellow Geeks!


I've been using Guix and GuixSD recently and I'd like to contribute!

I do know both Common Lisp and Clojure, so using Guile shouldn't be a problem.

I'd like to start with small tasks, like adding a few simple packages, then 
move to bigger packages, then write some services, and so on.

However, I'm not familiar  at all with mailing list workflows (this is the 
first mailing list I actually subscribed to), so I may need some guidance with 
that.

I thought about starting by creating a Guix package for git-remote-gcrypt 
(https://spwhitton.name/tech/code/git-remote-gcrypt/). The package definition 
should be fairly simple, since the main program is just a shell script with no 
compilation dependencies.

I've read the section 8.5 "Submitting Patches" of the manual, so I think I'm 
good to go.

Is there any specific example of a similar simple package that I should base 
mine on? Is there anything else that I should be aware of?

I'm looking forward to being part of this community.

Thanks in advance,
André.




Re: tree doesn't get called

2017-05-08 Thread Mark H Weaver
Catonano  writes:
> So here's the package
> http://paste.lisp.org/display/345871
>
> What is wrong with it ?

Please always include the relevant code snippets in the email itself,
rather than using a paste site.  Paste sites are useful for contexts
such as IRC where pasting more than a few lines is inconvenient and
generally frowned upon, and where the discussions are ephemeral.

On the other hand, these email lists are archived and we would like the
archives to be comprehensible to future readers.  That will not be
possible for the emails in this thread after the code under discussion
has been deleted from the paste site, or the paste site goes offline.

There are also privacy implications to forcing the readers of your email
to click on a link, thus creating network traffic and a log on someone's
server, in order to see the core content of your message.

What do you think?

Regards,
  Mark



Re: tree doesn't get called

2017-05-08 Thread Ricardo Wurmus

Catonano  writes:

> Would you mind to take a look at this new version ?
>
> http://paste.lisp.org/display/346142
>
> The
>
> (copy-file file
>dest-file)
>
> piece fails with
>
> ...
> In unknown file:
>?: 0 [copy-file "include.scm" ...]
>
> ERROR: In procedure copy-file:
> ERROR: In procedure copy-file: No such file or directory
>
> But as you can see on te "tree" output, include.scm is there indeed

It looks like you first need to create the target directory (with
“mkdir-p”).

BTW: instead of an explicit list for scm-files you could use this:

(find-files "." "\\.scm$")

--
Ricardo

  GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
  https://elephly.net