Send Beginners mailing list submissions to
        beginners@haskell.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
        beginners-requ...@haskell.org

You can reach the person managing the list at
        beginners-ow...@haskell.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."


Today's Topics:

   1.  [Call for Contributions] Haskell Communities and Activities
      Report, May 2018 edition (34th edition) (Mihai Maruseac)
   2.  how to split a list (PICCA Frederic-Emmanuel)
   3. Re:  how to split a list (Francesco Ariis)
   4. Re:  how to split a list (Francesco Ariis)
   5. Re:  how to split a list (PICCA Frederic-Emmanuel)
   6. Re:  how to split a list (Francesco Ariis)
   7. Re:  how to split a list (PICCA Frederic-Emmanuel)


----------------------------------------------------------------------

Message: 1
Date: Mon, 26 Mar 2018 07:04:53 -0700
From: Mihai Maruseac <mihai.marus...@gmail.com>
To: haskell <haskell-c...@haskell.org>, Haskell Beginners
        <beginners@haskell.org>, Haskell <hask...@haskell.org>
Subject: [Haskell-beginners] [Call for Contributions] Haskell
        Communities and Activities Report, May 2018 edition (34th edition)
Message-ID:
        <CAOMsUM+RmzUt-FBzjXNbeGTnSUEbZ6bH9o4FRVmEufc=gf2...@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"

Dear all,

We would like to collect contributions for the 34th edition of the

============================================================
               Haskell Communities & Activities Report

http://www.haskell.org/haskellwiki/Haskell_Communities_and_Activities_Report

                Submission deadline: 30 April 2018

           (please send your contributions to hcar at haskell.org,
            in plain text or LaTeX format, both are equally accepted)
============================================================

This is the short story:

* If you are working on any project that is in some way related to
Haskell, please write a short entry and submit it. Even if the project
is very small or unfinished or you think it is not important enough
--- please reconsider and submit an entry anyway!

* If you are interested in an existing project related to Haskell that
has not previously been mentioned in the HCAR, please tell us, so that
we can contact the project leaders and ask them to submit an entry.

* If you are working on a project that is looking for contributors,
please write a short entry and submit it, mentioning that your are
looking for contributors.

* Feel free to pass on this call for contributions to others that
might be interested.

More detailed information:

The Haskell Communities & Activities Report is a bi-annual overview of
the state of Haskell as well as Haskell-related projects over the
last, and possibly the upcoming six months. If you have only recently
been exposed to Haskell, it might be a good idea to browse the
previous edition --- you will find interesting projects described as
well as several starting points and links that may provide answers to
many questions.

Contributions will be collected until the submission deadline. They
will then be compiled into a coherent report that is published online
as soon as it is ready. As always, this is a great opportunity to
update your webpages, make new releases, announce or even start new
projects, or to talk about developments you want every Haskeller to
know about!

Looking forward to your contributions,

Mihai Maruseac


FAQ:

Q: What format should I write in?

A: The usual format is a LaTeX source file, adhering to the template
that is available at:

     http://haskell.org/communities/11-2017/template.tex

There is also a LaTeX style file at

     http://haskell.org/communities/11-2017/hcar.sty

that you can use to preview your entry.

If you do not know LaTeX or don't want to use it or don't have time to
translate your entry into it, then please use plain text, it is better
to have an entry in plain-text which we will translate than not have
it at all.

If you modify an old entry that you have written for an earlier
edition of the report, you should soon receive your old entry as a
template (provided we have your valid email address). Please modify
that template, rather than using your own version of the old entry as
a template.

Q: Can I include Haskell code?

A: Yes. Please use lhs2tex syntax
(http://www.andres-loeh.de/lhs2tex/). The report is compiled in mode
polycode.fmt.

Q: Can I include images?

A: Yes, you are even encouraged to do so. Please use .jpg or .png
format, then. PNG is preferred for simplicity.

Q: Should I send files in .zip archives or similar?

A: No, plain file attachments are the way.

Q: How much should I write?

A: Authors are asked to limit entries to about one column of text. A
general introduction is helpful. Apart from that, you should focus on
recent or upcoming developments. Pointers to online content can be
given for more comprehensive or "historic" overviews of a project.
Images do not count towards the length limit, so you may want to use
this opportunity to pep up entries. There is no minimum length of an
entry! The report aims for being as complete as possible, so please
consider writing an entry, even if it is only a few lines long.

Q: Which topics are relevant?

A: All topics which are related to Haskell in some way are relevant.
We usually had reports from users of Haskell (private, academic, or
commercial), from authors or contributors to projects related to
Haskell, from people working on the Haskell language, libraries, on
language extensions or variants. We also like reports about
distributions of Haskell software, Haskell infrastructure, books and
tutorials on Haskell. Reports on past and upcoming events related to
Haskell are also relevant. Finally, there might be new topics we do
not even think about. As a rule of thumb: if in doubt, then it
probably is relevant and has a place in the HCAR. You can also simply
ask us.

Q: Is unfinished work relevant? Are ideas for projects relevant?

A: Yes! You can use the HCAR to talk about projects you are currently
working on. You can use it to look for other developers that might
help you. You can use HCAR to ask for more contributors to your
project, it is a good way to gain visibility and traction.

Q: If I do not update my entry, but want to keep it in the report,
what should I do?

A: Tell us that there are no changes. The old entry will typically be
reused in this case, but it might be dropped if it is older than a
year, to give more room and more attention to projects that change a
lot. Do not resend complete entries if you have not changed them.

Q: Will I get confirmation if I send an entry? How do I know whether
my email has even reached its destination, and not ended up in a spam
folder?

A: Prior to publication of the final report, we will send a draft to
all contributors, for possible corrections. So if you do not hear from
us within two weeks after the deadline, it is safer to send another
mail and check whether your first one was received.

-- 
Mihai Maruseac (MM)
"If you can't solve a problem, then there's an easier problem you can
solve: find it." -- George Polya


------------------------------

Message: 2
Date: Mon, 26 Mar 2018 17:52:58 +0000
From: PICCA Frederic-Emmanuel
        <frederic-emmanuel.pi...@synchrotron-soleil.fr>
To: Haskell Beginners <beginners@haskell.org>
Subject: [Haskell-beginners] how to split a list
Message-ID:
        
<a2a20ec3b8560d408356cac2fc148e530107dd3...@sun-dag3.synchrotron-soleil.fr>
        
Content-Type: text/plain; charset="us-ascii"

Hello, I try to achieve this but I can not find a convenient (elegant solution)

let l =[1,2, 3, 4, 6, 7, 9, 10]

I want this

[[1, 2, 3, 4][6, 7],[9, 10]]

In fact I want to split a list with all consecutive series.

I imagine that it existe a one-liner for this but I did not find it :))

Cheers and thanks for your help

Frederic


------------------------------

Message: 3
Date: Mon, 26 Mar 2018 20:11:44 +0200
From: Francesco Ariis <fa...@ariis.it>
To: beginners@haskell.org
Subject: Re: [Haskell-beginners] how to split a list
Message-ID: <20180326181144.kyuiipcf73nzi...@x60s.casa>
Content-Type: text/plain; charset=utf-8

On Mon, Mar 26, 2018 at 05:52:58PM +0000, PICCA Frederic-Emmanuel wrote:
> Hello, I try to achieve this but I can not find a convenient (elegant 
> solution)
> 
> let l =[1,2, 3, 4, 6, 7, 9, 10]
> 
> I want this
> 
> [[1, 2, 3, 4][6, 7],[9, 10]]

There's the usual zip trick

    λ> l = [1,2, 3, 4, 6, 7, 9, 10]
    λ> zipWith (-) l [1..]
    [0,0,0,0,1,1,2,2]
    λ> zip l it
    [(1,0),(2,0),(3,0),(4,0),(6,1),(7,1),(9,2),(10,2)]

Now you can groupBy on the second element. I am not sure there is a shorter
method!


------------------------------

Message: 4
Date: Mon, 26 Mar 2018 20:18:29 +0200
From: Francesco Ariis <fa...@ariis.it>
To: beginners@haskell.org
Subject: Re: [Haskell-beginners] how to split a list
Message-ID: <20180326181829.4lfasqt7iey7r...@x60s.casa>
Content-Type: text/plain; charset=utf-8

On Mon, Mar 26, 2018 at 08:11:44PM +0200, Francesco Ariis wrote:
> There's the usual zip trick
> 
>     λ> l = [1,2, 3, 4, 6, 7, 9, 10]
>     λ> zipWith (-) l [1..]
>     [0,0,0,0,1,1,2,2]
>     λ> zip l it
>     [(1,0),(2,0),(3,0),(4,0),(6,1),(7,1),(9,2),(10,2)]

To be more explicit:

    λ> :m +Data.List (groupBy)
    λ> :m +Data.Function (on)
    λ> l = [1,2, 3, 4, 6, 7, 9, 10]
    λ> map (map snd) $ groupBy ((==) `on` snd) $ zip l (zipWith (-) l [1..])
    [[0,0,0,0],[1,1],[2,2]]

Maybe with some lens or with a foldr you can end up with something shorter
than this (69 characters).


------------------------------

Message: 5
Date: Mon, 26 Mar 2018 18:26:19 +0000
From: PICCA Frederic-Emmanuel
        <frederic-emmanuel.pi...@synchrotron-soleil.fr>
To: "The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell" <beginners@haskell.org>
Subject: Re: [Haskell-beginners] how to split a list
Message-ID:
        
<a2a20ec3b8560d408356cac2fc148e530107dd3...@sun-dag3.synchrotron-soleil.fr>
        
Content-Type: text/plain; charset="iso-8859-7"

> To be more explicit:

>    λ> :m +Data.List (groupBy)
>    λ> :m +Data.Function (on)
>    λ> l = [1,2, 3, 4, 6, 7, 9, 10]
>    λ> map (map snd) $ groupBy ((==) `on` snd) $ zip l (zipWith (-) l [1..])
>    [[0,0,0,0],[1,1],[2,2]]

I imagine that you mean fst instead of snd in order to produce the right output 
:)

How can I check if this code produce list copies and is efficient with big 
lists ?


thanks


Frederic

------------------------------

Message: 6
Date: Mon, 26 Mar 2018 21:01:48 +0200
From: Francesco Ariis <fa...@ariis.it>
To: beginners@haskell.org
Subject: Re: [Haskell-beginners] how to split a list
Message-ID: <20180326190148.4upitvbavpfvo...@x60s.casa>
Content-Type: text/plain; charset=us-ascii

On Mon, Mar 26, 2018 at 06:26:19PM +0000, PICCA Frederic-Emmanuel wrote:
> I imagine that you mean fst instead of snd in order to produce the right 
> output :)

Indeed :P

> How can I check if this code produce list copies and is efficient with big 
> lists ?

`time` and profiling tools provided by GHC [1]

If you feel lost, shout and I'll set up and example

[1] http://book.realworldhaskell.org/read/profiling-and-optimization.html


------------------------------

Message: 7
Date: Mon, 26 Mar 2018 19:21:22 +0000
From: PICCA Frederic-Emmanuel
        <frederic-emmanuel.pi...@synchrotron-soleil.fr>
To: "The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell" <beginners@haskell.org>
Subject: Re: [Haskell-beginners] how to split a list
Message-ID:
        
<a2a20ec3b8560d408356cac2fc148e530107dd3...@sun-dag3.synchrotron-soleil.fr>
        
Content-Type: text/plain; charset="us-ascii"

Just one question about this.

I do not want to put a print in order to generate the newList object.


let l = []
let newList = superChnker l
print newList


How Can I tell to haskell, produce the result even if I do not use it.


------------------------------

Subject: Digest Footer

_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners


------------------------------

End of Beginners Digest, Vol 117, Issue 13
******************************************

Reply via email to