Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regarding GSoC #11

Closed
satrana42 opened this issue Feb 17, 2016 · 6 comments
Closed

Regarding GSoC #11

satrana42 opened this issue Feb 17, 2016 · 6 comments

Comments

@satrana42
Copy link

Hey,

I am Satwant and am an undergrad at IIT Delhi. Over the past year I have become a Scala fan, primarily because of my internship work at the Allen Institute for Artificial Intelligence, and extended work in IIT Delhi's Data Analysis and Intelligence Research Group.

I am interested in working on the 'Super-charged for-comprehensions' project for GSoC 16. I was wondering how to begin with the proposal, and what kind of patches can I provide to show my interest and capabilities.

Thanks
Satwant Rana

@cvogt
Copy link
Owner

cvogt commented Feb 17, 2016

Hi Satwant Rana,

@clhodapp and I are currently working on an implementation ourselves, which we are going to present at the NEScala on March 2nd 2016. The GSoC project assumes, that until the application time of GSoC, ideas for additional features arise that could be covered by a GSoC project. Things may be clearer in a few weeks from now. It is not certain, that we are actually going to have something to work on in this topic, but if we do you can probably start reading the source code and discussing contributions 3 weeks from now. What you could do for now is read the source code of the alternative implementations our there listed here: #7 Understanding those will help a great deal.

Good preparation would also be learning how to write Scala macros yourself. Writing some blackbox macros. And learning about compilers and ASTs in general. It's is one of the hardest topics in the Scala space.

Cheers

Chris

@satrana42
Copy link
Author

Hi Chris,

I will read this to begin with.

I have done a course in Programming Languages which focused solely on functional programming, and implemented functions such as unification and a toy PROLOG interpreter in SML-NJ. I have a size-able public Scala codebase here. Also I host a Resume here.

You can see and decide if I can be an appropriate fit for a spin-off project worthy of GSoC. I don't wish to take your time right before your approaching deadline.

Thanks,
Satwant

@cvogt
Copy link
Owner

cvogt commented Feb 17, 2016

sounds good. I don't think either of us has studied the paper in depth. Bringing that knowledge to the table can be helpful.

@satrana42
Copy link
Author

I took a refresher on Haskell this weekend and on Monads in specific. I will start looking into this paper. Is there anything specific you want me to focus on?

@cvogt
Copy link
Owner

cvogt commented Feb 23, 2016

Not really, anything regarding the rules of extraction is interesting. Also when they allow extraction or if always.

@satrana42
Copy link
Author

I have read the first three sections of the paper so far, up to the desugaring codo part. I found the discussion on comonads significantly more challenging compared to monads, primarily because the topic hasn't been covered as nicely anywhere.

The comonad examples discussed in the paper had two notions of context, one through a cursor (an array comonad) and another through structure (binary tree comonad). Here, I'd like to ask how do you plan to incorporate comonads and codo blocks to improve for comprehensions in Scala? I have mostly used for comprehensions, for list comprehension tasks, which doesn't need the knowledge of monads. I wonder how you could add codo functionality without having to describe the notion of comonads, something like "tree / 2d array comprehensions"?

Meanwhile, the codo construct seems fairly general, and includes single and multiple variable environment. So you could have code blocks like,

some_calculation = codo x =>
    y <- square x
    z <- cube x
    x + y + z

Regarding when they allow extraction, the desugaring codo section talks of a general desugaring method for arbitrary codo blocks, and IMO it seems to cover most use cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants