vbfox / coloredprintf Goto Github PK
View Code? Open in Web Editor NEWF# printf functions but with colors !
License: MIT License
F# printf functions but with colors !
License: MIT License
Greetings!
With .Net 5.0/F# 5.0 out FSharp.Core 5.0.0 has also been released.
When using ColoredPrintf from a project using the version above nuget warnings are issued (but otherwise working correctly)
NU1608
Detected package version outside of dependency constraint: BlackFox.ColoredPrintf 1.0.3 requires FSharp.Core (>= 4.2.3 && < 5.0.0) but version FSharp.Core 5.0.0 was resolved.
Please provide a newer release where this constraint is loosened/adjusted.
Thank you!
๐ Is ColoredPrintf
expected to work with F# 5 string interpolation?
(tasks
|> Array.iter (fun t -> colorprintf $"$gray[{t.Title}]"))
throws this error
Unhandled exception. System.Exception: Expected function with 1 arguments
at BlackFox.MasterOfFoo.Core.PrintfBuilding.go@356-3(Int32 n, Type[] buf, Type ty, Int32 i)
at BlackFox.MasterOfFoo.Core.PrintfBuilding.extractCurriedArguments(Type ty, Int32 n)
at BlackFox.MasterOfFoo.Core.PrintfBuilding.PrintfBuilder`3.parseFromFormatSpecifier(PrintableElement prefix, String s, Type funcTy, Int32 i)
at BlackFox.MasterOfFoo.Core.PrintfBuilding.PrintfBuilder`3.parseFormatString(String s, Type funcTy)
at BlackFox.MasterOfFoo.Core.PrintfBuilding.PrintfBuilder`3.Build[T](String s)
at BlackFox.MasterOfFoo.Core.PrintfCache.Cache`4.generate(String fmt)
at [email protected](String delegateArg0)
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
at BlackFox.MasterOfFoo.MasterOfFooModule.doPrintfFromEnv[Printer,State,Residue,Result,a](PrintfFormat`4 format, a env)
Hello Julian.
I'm trying to use your library. Thank interesting library.
Unfortunately found not stable behavior.
Correct behavior:
> printfn "1 2 3"
1 2 3
> colorprintfn "1 2 3"
1 2 3
Incorrect behavior:
// Partial reverse. Missing spaces.
> printfn "1 2 %d" 3
1 2 3
> colorprintfn "1 2 %d" 3
31 2
> printfn "1 %d %d" 2 3
1 2 3
> colorprintfn "1 %d %d" 2 3
231
// Missing spaces:
printfn "%d %d %d" 1 2 3
1 2 3
> colorprintfn "%d %d %d" 1 2 3
123
The lib should be separate in FoxSharp
, issue here : vbfox/FoxSharp#3
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.