Skip to content

Conversation

@forki
Copy link
Collaborator

@forki forki commented Jan 10, 2017

No description provided.

@forki
Copy link
Collaborator Author

forki commented Jan 10, 2017

@alfonsogarciacaro this is interesting. I guess bigints are not supported, but the build doesn't show the concrete error message

@alfonsogarciacaro
Copy link
Member

Yes, bigint is not supported. @ncave added proper support for long integers by including an external JS library and adding the necessary bindings. I guess something similar could be done for BigInt, though I don't have it in the roadmap at the moment.

About the error message, that's a bug I unfortunately introduced while changing the format of the error messages. It should be fixed in 0.7.28.

@ncave
Copy link
Collaborator

ncave commented Jan 10, 2017

@forki If you really need bigint right now, you can grab the one from FSharp.Core and compile it with Fable in your solution, it works.

@forki
Copy link
Collaborator Author

forki commented Jan 10, 2017

I just asked for @gentauro

@ghost
Copy link

ghost commented Jan 10, 2017

@ncave that's pretty awesome if we are just able to write stuff in F# with BigInts and it just get transpiled to JavaScript. Do you have any test cases I can look at? Just to ensure correctness and stuff? 👍

@alfonsogarciacaro
Copy link
Member

Ah, interesting! I didn't know FSharp.Core had its own BigInt implementation (I thought the C# one in the BCL had to be translated to JS). Thanks for the tip, @ncave! It shouldn't be too difficult to compile it with Fable and add it to fable-core as you say (I did something similar for F# Set and Map), keeping an eye to PR #600 to see what needs to be changed. Tests can be adapted from that PR too.

@ncave
Copy link
Collaborator

ncave commented Jan 10, 2017

@gentauro Proper support for decimals and bigints is not there yet in Fable (not hard to do, just pending).
I was just saying that if you really need bigints before support is added to Fable, you can add the bigint F# implementation from FSharp.Core to your solution and compile with Fable.
Here is a version that compiles for sure, but technically any version should work with small tweaks.

@alfonsogarciacaro
Copy link
Member

OMG! This confirms my suspicious that @ncave is secretly working in compiling FCS with Fable! 😮

@forki
Copy link
Collaborator Author

forki commented Jan 10, 2017 via email

@ncave
Copy link
Collaborator

ncave commented Jan 10, 2017

Compiling FCS with Fable is basically done, I've already switched on compiling Fable with Fable :)
Almost there, shouldn't be long now...

@forki
Copy link
Collaborator Author

forki commented Jan 10, 2017 via email

@ghost
Copy link

ghost commented Jan 10, 2017

Compiling FCS with Fable is basically done, I've already switched on compiling Fable with Fable :)
Almost there, shouldn't be long now...

@ncave so you are saying that we can compile F# (Fable) from our browsers? This would be a major breakthrough (web intellisense, ad-hoc compilation and stuff). Good work 👍

@ncave
Copy link
Collaborator

ncave commented Jan 10, 2017

@forki Well, more of a POC, there are a few cut corners here and there but none are showstoppers, it works. I'll post more details when I have the whole pipeline working with Fable.

@forki
Copy link
Collaborator Author

forki commented Jan 10, 2017

Amazing.

@alfonsogarciacaro
Copy link
Member

alfonsogarciacaro commented Jan 13, 2017

(Initial) BigInteger support has been added in fable-compiler 0.7.29 👍 Though I must say conversion from BigInt to other numeric formats is not done yet, maybe @ncave could use his expertise here?

Sorry, I'm closing the PR because it's conflicting with latest master and also because Assert.AreNotEqual is not implemented ;)

@forki forki reopened this Jan 13, 2017
@forki
Copy link
Collaborator Author

forki commented Jan 13, 2017

Can we still try to get the test in?

@alfonsogarciacaro alfonsogarciacaro merged commit 80ef57d into master Jan 13, 2017
@alfonsogarciacaro
Copy link
Member

Sure! There it is :)

@ncave
Copy link
Collaborator

ncave commented Jan 14, 2017

@alfonsogarciacaro Added bigint conversions #650

@alfonsogarciacaro alfonsogarciacaro deleted the bigint branch March 31, 2017 20:15
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.

4 participants