GithubHelp home page GithubHelp logo

dotnet / corefxlab Goto Github PK

View Code? Open in Web Editor NEW
1.5K 294.0 348.0 60.27 MB

This repo is for experimentation and exploring new ideas that may or may not make it into the main corefx repo.

License: MIT License

C# 97.90% Batchfile 0.01% PowerShell 1.50% Shell 0.59%
dotnet corefx experimentation c-sharp

corefxlab's Introduction

corefxlab's People

Contributors

adamsitnik avatar ahsonkhan avatar alexanderkozlenko avatar atsushikan avatar axxu avatar benaadams avatar dalbanhi avatar davidfowl avatar dotnet-maestro-bot avatar dotnet-maestro[bot] avatar eerhardt avatar ericstj avatar jeremykuhne avatar joshfree avatar krwq avatar krzysztofcwalina avatar livarcocc avatar mattjohnsonpint avatar mellinoe avatar misinformeddna avatar omariom avatar pakrym avatar shiftylogic avatar stephentoub avatar t-roblo avatar tarekgh avatar terrajobst avatar vedin avatar vsadov avatar weshaggard avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

corefxlab's Issues

Create core geometry, drawing and imaging libraries

This issue follows from the discussion at https://github.com/dotnet/corefx/issues/1563.

It is proposed to create a legacy-free library or set of libraries that would eventually be incorporated into corefx. The libraries would define primitive types and interfaces in the 2D and/or 3D geometry, drawing and image processing areas that are complementary to corefx. Such definitions would encourage compatibility of use and implementation across platforms and between libraries that target corefx in these areas.

The coreclr and corefx newly define SIMD-optimized types in System.Numerics that have special processing by the JIT compiler. These types include Vector2/3/4 and related Matrix and geometry types. The new primitive types defined for geometry, drawing and image processing could make use of these optimized types where appropriate.

Some of the use cases that would fall under this topic are:

  • Image processing libraries for asp.net and other server scenarios
  • Cross-platform 2D drawing libraries similar in scope to the Win2D library for Universal Windows Apps
  • 2D and 3D geometry libraries that perform computational geometry or mesh processing

The proposal is not to provide comprehensive cross-platform implementations to cover these areas. Rather, the intention is to define common types and API patterns (perhaps in the style of OWIN for http handlers) that various implementations could align with. These libraries should consolidate work done for corefx that fall within the geometry, drawing and image processing scope.

There are many questions:

  1. What are the use cases for such libraries?
  2. What is an appropriate breakdown of the areas covered? How do the bitmap and vector worlds interact?
  3. How wide should the scope be? Should it include color, fonts, text layout, UI? Now or later?
  4. How should the new libraries relate to existing open-source implementations (single platform and cross-platform) in these areas (both pure .NET and managed wrapper libraries)?
  5. What are the first steps and how should the effort proceed and be managed?

Can we make a list of existing .NET (open-source or otherwise) libraries in this space:

  1. How popular and active is the library?
  2. Is it likely to target corefx in the future?
  3. What primitive types and interfaces would be relevant to that library?

System.Numerics.Matrices does not build

The project does not build currently as it's using C# 6 features (string interpolation) which is not supported by the current engineering system in corefxlab.

Implement numeric 'R' format

Repro:

  1. Uncomment //GenerateTest(writer, type, 'R', maxPrecision); in src\System.Text.Formatting\GenerateCompatibilityTests\Program.cs
  2. Run the program. It will generate additional format tests
  3. Build the formatting library and run the test (run build.cmd from command line)
    Result:
    Some formatting tests will fail.

Number formatting "N' format does output the first decimal separator

Repro:

  1. Uncomment line //GenerateTest(writer, type, 'N', maxPrecision); // TODO: this is implemented, but has bugs in src\System.Text.Formatting\GenerateCompatibilityTests\Program.cs
  2. Run the program. It will generate additional 'N' format tests
  3. Build the formatting library and run the test (run build.cmd from command line)
    Result:
    Some 'N' formatting tests will fail.

Marshal descriptors on CilFields and CilParameters and on System.Reflection.Metadata.Cil

Need to decode marshal descriptors on CilFields and on CilParameters.

See:

https://github.com/dotnet/corefxlab/blob/master/src/System.Reflection.Metadata.Cil/src/CilField.cs#L144-L158

https://github.com/dotnet/corefxlab/blob/master/src/System.Reflection.Metadata.Cil/src/CilParameter.cs#L121-L135

In order to be able to do this it is needed to have a Marshal Decoder on System.Reflection.Metadata.Decoding, issue #2688

cc @AlexGhiondea

x86

I have a Windows 10 x64 Preview machine running Visual Studio 2015. When I git clone the corefxlab project, I am able to compile a 64bit version of the console application and it works perfectly including nuget grabbing all necessary files. If I set application to compile as x86, the application compiles but close immediately. Would you expect that this would work with x86?

Consider porting the codebase to ByteSpan

The whole codebase needs to be ported to ByteSpan. Otherwise it's not possible to make UTF8 encoding of small strings competitive with native code implementation, as there are too many calls to pin and unpin the byte[] buffers.

For this to happen, ByteSpan needs to be made public and BufferPool needs to probably use native memory instead of pinning. I am not sure if these tradeoffs are worth it.

Alternatively, I would need to wait for a real GC tracked Span before seeing great runtime perf.

Simplify BufferPool

The pool is quite complex and I don't think the complexity is worth it. Interlocked operations are very expensive, and I think performance sensitive scenarios should use a pool per thread. Also, the interlocked synchronization is not much faster than locks but it causes some buffers to be dropped on the heap.

Add support for surrogates

One of the tests has the following line commented:
//utf8Writer.Append("\uD950\uDF21"); // TODO: surrogate pair; this is NIY

Uncommenting this and running tests will cause test failures. This is because the library does not support surrogates. The fix should be moderately difficult.

Implement numeric "F" format

Repro:

  1. Uncomment //GenerateTest(writer, type, 'F', maxPrecision); in src\System.Text.Formatting\GenerateCompatibilityTests\Program.cs
  2. Run the program. It will generate additional format tests
  3. Build the formatting library and run the test (run build.cmd from command line)
    Result:
    Some formatting tests will fail.

HTTP headers are ASCII not UTF8

https://tools.ietf.org/html/rfc7230#section-3.2.4

Historically, HTTP has allowed field content with text in the
ISO-8859-1 charset [ISO-8859-1], supporting other charsets only
through use of [RFC2047] encoding. In practice, most HTTP header
field values use only a subset of the US-ASCII charset [USASCII].
Newly defined header fields SHOULD limit their field values to
US-ASCII octets. A recipient SHOULD treat other octets in field
content (obs-text) as opaque data.

So https://github.com/dotnet/corefxlab/blob/master/demos/LowAllocationWebServer/HttpRequestParser.cs
should be parsing bytes based on US-ASCII rather than UTF8 data

Run HelloWorld on the CoreCLR my own build

I did the following steps described at http://blogs.msdn.com/b/dotnet/archive/2015/02/03/coreclr-is-now-open-source.aspx?Redirected=true&PageIndex=2

  1. Modify CoreCLR to your heart’s content
  2. Build CoreCLR via build.cmd x64 release
  3. Copy the following files from coreclr\binaries\x64\release to corfxlab\demos\CoreClrConsoleApplications\HelloWorld\NotYetPackages\CoreCLR:
    coreclr.dll
    CoreConsole.exe
    mscorlib.dll
  4. Rebuild HelloWorld.sln (either using the command line or in VS)
    It seems nothing happen. Why should I copy files to the folder 'NotYetPackages\CoreCLR', and how the HelloWorld.exe find the newly added dlls/exes?

Argument Exception when trying to run dnu restore

Hi I am trying to run the demo Hello World program on Centos7 but getting the error. It isn't able to install the dependencies.

⇒ dnu install System.Console
Microsoft .NET Development Utility CoreCLR-x64-1.0.0-beta7-12264

GET https://www.nuget.org/api/v2/
GET https://www.nuget.org/api/v2/FindPackagesById()?id='System.Console'
Warning: FindPackagesById: System.Console
The AddressFamily 117 is not valid for the System.Net.IPEndPoint end point, use InterNetwork instead.
Parameter name: socketAddress
GET https://www.nuget.org/api/v2/FindPackagesById()?id='System.Console'
Warning: FindPackagesById: System.Console
The AddressFamily 117 is not valid for the System.Net.IPEndPoint end point, use InterNetwork instead.
Parameter name: socketAddress
GET https://www.nuget.org/api/v2/FindPackagesById()?id='System.Console'
Error: FindPackagesById: System.Console
The AddressFamily 117 is not valid for the System.Net.IPEndPoint end point, use InterNetwork instead.
Parameter name: socketAddress
System.ArgumentException: The AddressFamily 117 is not valid for the System.Net.IPEndPoint end point, use InterNetwork instead.
Parameter name: socketAddress

Implement numeric 'E' format

Repro:

  1. Uncomment //GenerateTest(writer, type, 'E', maxPrecision); in src\System.Text.Formatting\GenerateCompatibilityTests\Program.cs
  2. Run the program. It will generate additional format tests
  3. Build the formatting library and run the test (run build.cmd from command line)
    Result:
    Some formatting tests will fail.

Move off hacky parsers

The formatting library uses several small hacky parsers (mainly to parse composite formatting strings). We should create a real non-allocating parsing library and use it instead.

System.Numerics.Matrices projects don't build

When I try to build the main and test projects, I get the following error:
.\corefxlab\src\System.Numerics.Matrices\test\System.Numerics.Matrices.Tests.csproj : error MSB4057: The target "BuildAndTest" does not exist in the project.
.\corefxlab\src\System.Numerics.Matrices\src\System.Numerics.Matrices.csproj : error MSB4057: The target "BuildAndTest" does not exist in the project.

Write more performance tests and optimize runtime performance

  1. Formatting UTF8 strings does not have performance tests
  2. Number formatter is calling ToUpper on the format character. This regressed perf a bit in the past.
  3. Math.DivRem (used in hot formatting loop) generates two idiv instructions. it should be just one.
  4. It would be worth to again profile the perf tests. There were significant changes since last time.
  5. Composite formatting does not have perf or memory tests.

Add support for non-invariant cultures

There needs to be a way to get FormattingData instances for other cultures.
There are two ways to do it: either get the data from .NET CultureInfo or write a parser for the standard Unicode database.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.