Re: GSOC 2016: FastParse library

Haoyi Li <[email protected]> Tue, 5 Apr 2016 18:12:07 +0800
Newsgroups gmane.comp.lang.scala
Message-ID <CALruUQL9D=Q_M8X7urk9p4ewbk2Nuu548Oa==prKabOKc7b-=A@mail.gmail.com>
Yep, that looks good!

The next step would be broadening the parser to accept more test input: 1-2
more large-ish css files from 3rd party projects like Bootstrap or JQuery
UI. After that works, put together a simple test suite and send a pull
request to include your CSS parser and tests as a sample parser in the
FastParse repo.

On Thu, Mar 31, 2016 at 11:50 PM, Vladimir Polushin <[email protected]>
wrote:

> Hello!
>
> I wrote simple PrettyPrinter
> <https://github.com/vovapolu/CssParser/blob/master/src/main/scala/cssparser/PrettyPrinter.scala>
> for my AST tree, so now it can parse this <http://pastebin.com/7EHUyu52> into
> this <http://pastebin.com/2wqfh6ev> . Is it okay for the task?
> (Sorry for the long answer, I had an important assignment at the
> university)
>
> пятница, 25 марта 2016 г., 17:33:24 UTC+3 пользователь Haoyi Li написал:
>>
>> No worries about local cuts, we can discuss that more when GSOC starts if
>> we get a slot =)
>>
>> With regard to the CSS parser, the original goal still stands:
>>
>> """
>> Lastly, w.r.t. the CSS parser, the end goal would be to have your parser
>> be complete enough to parse
>>
>>    -
>>    https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css
>>
>> into an AST, which can then be used to pretty-print it the same way this
>> does:
>>
>>    - http://www.dirtymarkup.com/
>>
>> Along with 1-2 more test CSS files of your choosing from other well-known
>> open source projects. After that, send a PR and we'll merge the parser
>> along with tests into the FastParse codebase.
>>
>> Note that you don't need to do this now - the proposal is probably more
>> urgent since it's due on the 25th of March - but this should happen by
>> mid-April when the student acceptance decisions are due.
>>
>> Note that this is a non-trivial amount of work, and I can't guarantee you
>> a spot on GSOC even if you do it (that's up to the kind mercies of Google
>> and the Scala org) but it will no doubt leave you proficient working with
>> this library and writing parsers.
>> """
>>
>> Can your CSS parser parse bootstrap.min.css into one big AST, and
>> serialize it out again pretty-printed? If not, that's what to make it do
>> next =) After that the next step would be contributing it to the FastParse
>> repo as a bundled parser/example
>>
>>
>> On Fri, Mar 25, 2016 at 8:18 PM, Vladimir Polushin <[email protected]>
>> wrote:
>>
>>> Haoyi, hello!
>>>
>>> In my proposal you have written about "local" cuts, but I don't cleary
>>> understand this case. Can you give me some example?
>>>
>>> And I will continue to work on CSS Parser, what should I do next in it?
>>>
>>> понедельник, 21 марта 2016 г., 22:56:54 UTC+3 пользователь Vladimir
>>> Polushin написал:
>>>
>>>> Hello! I've just shared the proposal
>>>>  https://docs.google.com/document/d/1DebYhXZ3wRfT6yPjv3tIEtacvmUKo25zhr-unJjjNhc/edit?usp=sharing
>>>> <https://docs.google.com/document/d/1DebYhXZ3wRfT6yPjv3tIEtacvmUKo25zhr-unJjjNhc/edit?usp=sharing> .
>>>> Could you review it and give me some feedback?
>>>>
>>>> четверг, 17 марта 2016 г., 17:59:28 UTC+3 пользователь Haoyi Li написал:
>>>>>
>>>>> Lastly, w.r.t. the CSS parser, the end goal would be to have your
>>>>> parser be complete enough to parse
>>>>>
>>>>>    -
>>>>>    https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.cs
>>>>>
>>>>> into an AST, which can then be used to pretty-print it the same way
>>>>> this does:
>>>>>
>>>>>    - http://www.dirtymarkup.com/
>>>>>
>>>>> Along with 1-2 more test CSS files of your choosing from other
>>>>> well-known open source projects. After that, send a PR and we'll merge the
>>>>> parser along with tests into the FastParse codebase.
>>>>>
>>>>> Note that you don't need to do this now - the proposal is probably
>>>>> more urgent since it's due on the 25th of March - but this should happen by
>>>>> mid-April when the student acceptance decisions are due.
>>>>>
>>>>> Note that this is a non-trivial amount of work, and I can't guarantee
>>>>> you a spot on GSOC even if you do it (that's up to the kind mercies of
>>>>> Google and the Scala org) but it will no doubt leave you proficient working
>>>>> with this library and writing parsers.
>>>>>
>>>>>
>>>>>
>>>>> On Thu, Mar 17, 2016 at 10:37 PM, Haoyi Li <[email protected]> wrote:
>>>>>
>>>>>> All three cases are more or less the same idea: you will need to make
>>>>>> FastParse generic enough to work with non String/Char data.
>>>>>>
>>>>>> Yes, you should dig into the code a bit and come up with some ideas
>>>>>> of how you would implement it. It's likely our plan will change if/when you
>>>>>> get accepted an GSOC starts, since we would have more time to go deeper
>>>>>> into things. Nevertheless, the exercise of putting together the proposal
>>>>>> will be valuable
>>>>>>
>>>>>> On Thu, Mar 17, 2016 at 12:07 AM, Vladimir Polushin <
>>>>>> [email protected]> wrote:
>>>>>>
>>>>>>> Great :) Then I will start to write a proposal. And I would like to
>>>>>>> clarify about this: If I understand correctly, there are 3 main cases in
>>>>>>> idea, and in proposal I should describe how I will implement they with some
>>>>>>> rough plan?
>>>>>>>
>>>>>>> среда, 16 марта 2016 г., 16:02:06 UTC+3 пользователь Haoyi Li
>>>>>>> написал:
>>>>>>>>
>>>>>>>> That's a good start. A lot more work would go into that if we want
>>>>>>>> to get that into the main repo (and I do). If you've already put together a
>>>>>>>> proposal we can discuss how to take it further, if not you probably should
>>>>>>>> put together a proposal before the March 25th deadline and we can keep
>>>>>>>> working on it after.
>>>>>>>>
>>>>>>>>
>>>>>>>> On Wed, Mar 16, 2016 at 7:25 PM, Vladimir Polushin <
>>>>>>>> [email protected]> wrote:
>>>>>>>>
>>>>>>>>> I wrote basic version of CSS parser
>>>>>>>>> https://github.com/vovapolu/CssParser . According to
>>>>>>>>> https://www.w3.org/TR/css-syntax-3/ it only breaks css into
>>>>>>>>> simple elements like words and delimiters and it also can handle blocks in
>>>>>>>>> brackets. Now I am planning to add more tests and to try to implement some
>>>>>>>>> complex structures (selectors, other rules) in parser, but I think it will
>>>>>>>>> be pretty hard given all these rules and requirements.
>>>>>>>>>
>>>>>>>>> вторник, 15 марта 2016 г., 6:05:14 UTC+3 пользователь Haoyi Li
>>>>>>>>> написал:
>>>>>>>>>>
>>>>>>>>>> A CSS parser would serve the purpose as well and could plausibly
>>>>>>>>>> be useful. I think a Smalltalk parser would be a bit obscure I don't think
>>>>>>>>>> it would serve well: people won't be familiar enough to use it as an
>>>>>>>>>> example, nor would they find it useful in real life for parsing their
>>>>>>>>>> smalltalk code (since they won't have any)
>>>>>>>>>>
>>>>>>>>>> I'm not totally convinced that a CSS parser would be simpler than
>>>>>>>>>> a Markdown parser though. The CSS3 Grammar:
>>>>>>>>>>
>>>>>>>>>>    - https://www.w3.org/TR/css-syntax-3/
>>>>>>>>>>
>>>>>>>>>> Certainly looks awfully complicated!
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Tue, Mar 15, 2016 at 10:55 AM, Naftoli Gugenheim <
>>>>>>>>>> [email protected]> wrote:
>>>>>>>>>>
>>>>>>>>>>> Have you seen CommonMark (http://commonmark.org/)?
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Mon, Mar 14, 2016 at 6:59 PM Vladimir Polushin <
>>>>>>>>>>> [email protected]> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Hello!
>>>>>>>>>>>>
>>>>>>>>>>>> Several days ago I started to write markdown parser, but now
>>>>>>>>>>>> this task seems to me very hard to implement. I tried to google grammars of
>>>>>>>>>>>> markdown or some specification, but markdown literally doesn't have any
>>>>>>>>>>>> standard and any grammar I found is quite large and complicated for the
>>>>>>>>>>>> first experience with library. So may I write CSS or Smalltalk parser
>>>>>>>>>>>> first? They have clear and concise grammars, which won't cause difficulties
>>>>>>>>>>>> in the implemenation.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> пятница, 11 марта 2016 г., 7:24:06 UTC+3 пользователь Haoyi Li
>>>>>>>>>>>> написал:
>>>>>>>>>>>>
>>>>>>>>>>>>> Hello! I wrote FastParse.
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>> A good first contribution to FastParse would probably be some
>>>>>>>>>>>>> kind of example parser. The project already has Scala, Python, JSON and XML
>>>>>>>>>>>>> parsers, but it would be nice to add to the collection.
>>>>>>>>>>>>>
>>>>>>>>>>>>> For example, a FastParse based Markdown parser would both very
>>>>>>>>>>>>> useful as well as serve to introduce you to the FastParse library and build
>>>>>>>>>>>>> you up to a reasonably high level of expertise. You would gain a much
>>>>>>>>>>>>> deeper understanding of its behavior and internals, the "why"s of the
>>>>>>>>>>>>> library, and be in a much better position to contribute significantly.
>>>>>>>>>>>>>
>>>>>>>>>>>> On Fri, Mar 11, 2016 at 3:59 AM, Vladimir Polushin <
>>>>>>>>>>>>> [email protected]> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>> Hello!
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I am a third-year undergraduate Computer Science student at
>>>>>>>>>>>>>> the Moscow State University. I've been working with scala for a year and
>>>>>>>>>>>>>> now I want to start contributing to the Scala community. I looked thought
>>>>>>>>>>>>>> the list of ideas for GSOC, and I liked The FastParse library. I've already
>>>>>>>>>>>>>> used Scala Parser Combinators and I have a basic knowledge about formal
>>>>>>>>>>>>>> grammars and compilers. So where can I start? Should I fix some bug in that
>>>>>>>>>>>>>> repository first?
>>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>>>> You received this message because you are subscribed to the
>>>>>>>>>>>>>> Google Groups "scala-language" group.
>>>>>>>>>>>>>>
>>>>>>>>>>>>> To unsubscribe from this group and stop receiving emails from
>>>>>>>>>>>>>> it, send an email to [email protected].
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>> You received this message because you are subscribed to the
>>>>>>>>>>>> Google Groups "scala-language" group.
>>>>>>>>>>>> To unsubscribe from this group and stop receiving emails from
>>>>>>>>>>>> it, send an email to [email protected].
>>>>>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> You received this message because you are subscribed to the
>>>>>>>>>>> Google Groups "scala-language" group.
>>>>>>>>>>> To unsubscribe from this group and stop receiving emails from
>>>>>>>>>>> it, send an email to [email protected].
>>>>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>> You received this message because you are subscribed to the Google
>>>>>>>>> Groups "scala-language" group.
>>>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>>>> send an email to [email protected].
>>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>> You received this message because you are subscribed to the Google
>>>>>>> Groups "scala-language" group.
>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>> send an email to [email protected].
>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>
>>>>>>
>>>>>>
>>>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "scala-language" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "scala-language" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "scala-language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.