F# values display badly in default formatting, esp plaintext
See original GitHub issueTherer are lots of cases where default formatting for F# values is way off. I’ll document a few here and try and make progress on this.
-
Evaluate a method info, e…d
match <@ display("") @> with Quotations.Patterns.Call(_,mi,_) -> mi
Expect: something reasonable Actual: a big mess
-
Evaluate “<@ 1 @>” in a notebook.
Expect: Some reasonable of the quotation.
Actual, a big mess, see image at bottomBest would really be just the
ToString()
I think:Value (1)
For reference FSI shows this, which is not great but not awful.
val it : Quotations.Expr<int> = Value (1) {CustomAttributes = [NewTuple (Value ("DebugRange"), NewTuple (Value ("stdin"), Value (1), Value (3), Value (1), Value (4)))]; Raw = ...; Type = System.Int32;}
Quotation image:
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:18 (15 by maintainers)
Top Results From Across the Web
How to properly read fixed-width format files
Construct two lists that show the value boundaries (we skip the "W"). These will be used to extract the substrings for the variables....
Read more >ESP8266 Troubleshooting Guide
The ESP8266 has a few common issues when you are trying to flash a new firmware, uploading a script or during normal usage...
Read more >86607 - UI option for disabling format=flowed
Sending format is not *your* preference, but the reciepient's one. If the recipient doesn't like f=f, he can disable it and see the...
Read more >eSchoolPlus+ Teacher Access Center (TAC) ...
This view displays the student's standardized test information. By default, only tests for which the student has scores are displayed. To display all...
Read more >Wireshark User's Guide
This menu controls the display of the captured data, including colorization of packets, zooming the font, showing a packet in a separate window,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
FWIW I think the best approach here in the short term would be “revert to printing plain text of F# values unless we are sure the result is going to look nice”
And use https://github.com/dotnet/interactive/issues/646 to control printing in plain text.
Exactly what this means in detail I’m not sure
My current thinking is that we can allow this decision to be different per subkernel by adding support for subkernels specifying their own formatting rules, so for example the
FSharpKernel
could prefer FSI-style printing. C# doesn’t have a comparable mechanism and perhaps because of that, the feedback has been that the tabular output is more useful thanToString
for most types.In the short term this should make the F# experience better and more familiar while decoupling from the timeline for finding a better set of defaults for C#.