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

First pass at an F# Trill sample #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pshrosbree
Copy link

@pshrosbree pshrosbree commented Dec 22, 2018

@cybertyche I have a simple port to F# of some of the HelloWorld sample.

I created a module of functions that map some of the main Streamable functions. These take F# functions and are in a form that is more suitable for currying. Where Trill takes Expression I have used F# lambdas as the F# Co piker seems to do a mapping for us. This defeats some of the optimizations in Trill, of course, but it is just the first pass. We may like to take a look at directly supporting quotations here. For now I have punted on optional parameters, etc.

Note, that since this was written in Rider on MacOS I had to disable the .NET Framework projects in the solution. However, I do not expect this PR to be merged. It is only to start a discussion.

Add optional parameters to toStreamable
Map some overloads to F# functions
Copy link

@fredeil fredeil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should probably factor out the helper methods in a different file, otherwise it looks like a good start.

I would also argue that instead of creating TrillSamples/HelloWorldFS/, the structure should be: TrillSamples/FSharp/HelloWorld

@pshrosbree
Copy link
Author

pshrosbree commented Jan 3, 2019 via email

Copy link

@fredeil fredeil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree on that, they should probably be separated in "CSharp" and FSharp".
This is used around the Microsoft repos, like https://github.com/Microsoft/FASTER

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

Successfully merging this pull request may close these issues.

3 participants