Comments (8)
Its not opinionated its just the standard format for hex bytes. Anything else would be opinionated and specific. If theres an option for binary formatted bytes then why not a hex format.
from fsharp.
Could it be possible to do something like .ToString("H")
or is that all coming from .Net side?
When you are e.g. debugging a byte array content, you would need something that is already there, not needing to trust a random intrnet site still has maybe a working part you have to plugin to your source code.
from fsharp.
fsi
output for any array should definitely stay[|...; ...; ...|]
.
String is a seq of characters and still the fsi output is not like [| 72; 101; 108; 108; 111; 32; 87; 111; 114; 108; ... |]
.
Why? Because no-one finds that useful, exactly like bytes [|116uy; 104uy; ... |]
.
from fsharp.
We're unlikely to take it to standard library (FSharp.Core), it's too specific and opinionated. It belongs to some sort of helpers library/module, now the question if we want to ship something like it alongside the fsi? Fsi printing is extensible, so shouldn't be a problem to just have a DLL for it?
from fsharp.
Its not opinionated its just the standard format for hex bytes.
Right, in hex editor, where you can render it by columns and synchronise cursor between them, so it's actually useful.
In F# REPL I prefer to see closer to how it would've been defined, so I can copy easily and do something with it.
Does any other REPL have this as standard output?
from fsharp.
What Im saying is viewing bytes in hex is not opinionated, its a very sensible and standard way of viewing bytes. In my emulator code I use this too:
let mpf68901 = 0xFFFA00u
etc, it would be extremely unnatural to use ints
from fsharp.
What Im saying is viewing bytes in hex is not opinionated, it's a very sensible and standard way of viewing bytes.
What I meant is that it can be confusing as standard view option in repl, but fine as a function/method, but we don't really have a standardised way of shipping such helpers with fsi.
from fsharp.
Indeed the above getBytesTable
is a nice helper function for building specific tools. But the standard fsi
output for any array should definitely stay [|...; ...; ...|]
.
fssnip.net
is a good place to post / search such functions.
from fsharp.
Related Issues (20)
- [Automated] PRs inserted in VS build main-34920.14
- Impossible viable fork HOT 2
- Impossible viable fork HOT 14
- Compiler allows non-functions to be bound to active pattern names HOT 4
- Consider deprecating desktop framework version of the F# compiler and FSI program HOT 6
- [Automated] PRs inserted in VS build feature.debugger.main-34920.221
- `MultipleDiagnosticsLoggers.Parallel` deadlock HOT 1
- #nowarn does not support the FS prefix on error codes to disable warning about HOT 1
- dotnet fsi crashes with lines longer than terminal width HOT 4
- Inline warning resulting in run time error (NotSupportedException) HOT 2
- An F# or C# shebang executable should use a cached binary on subsequent runs HOT 1
- F# files moved with by dragging HOT 1
- Enable F# Code Metrics and Analysis
- Improve onhover tooltip for visual studio HOT 1
- Support / fix replacing reference (Refactor -> Rename) of F# operator HOT 1
- [Feature request] Support solution view where projects are ordered based on number of dependent projects. HOT 2
- F# - Add Function Dependency Status to Functions/IntelliSense for F# (like C# has) HOT 1
- Internal error when dotting into delegate with 2 or more type parameters
- I'm getting unwanted navigation when holding `Ctrl` and hovering over operators like `&&` or `>`. Not sure if caused by this PR or a bug in VS. HOT 3
- Incorrect TailCall warning on async recursive functions HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fsharp.