leventerkok / cracknum Goto Github PK
View Code? Open in Web Editor NEWConvert to/from IEEE-754 HP/SP/DP formats
License: Other
Convert to/from IEEE-754 HP/SP/DP formats
License: Other
Thanks for creating the most awesome number converter on the planet. It has helped immensely as I need to convert a lot of binary/hex-/decimal values to their respective hex layout. It is faster then Python and gives all sorts of interesting details as output.
And therein lies the rub: would crackNum be faster when less verbose, skipping other calculations ? Asking because I am converting more and more data and at some piont it might take weeks to convert the data on a dedicated rig. All I need is the hexdecimal layout.
Might not be a big win but I thought it might not hurt to ask. Project's Git
Until two weeks ago I could build crackNum straight from github without fail. When building today I was greeted with the following error:
code that is executed is
RUN cd crackNum && stack path --local-bin && stack setup && stack init && stack build && stack install && stack clean && rm -R /crackNum
here
It mentiones the returned value is a value, not a string. Any idea here ?
Due to: LeventErkok/sbv#414
Probably move the required functionality directly into 'CrackNum' itself and expose it via the library portion; and then SBV can just use it from here.
In light of new SBV support for all floating-point types; I think it's time to rewrite crackNum so it handles all those cases, simply by piggy-backing on what SBV does.
Having SBV as a dependency is rather large for crackNum
, but I think we can afford it.
On the stackage build server there was a build failure on the crackNum
executable (due to specifying -Werror
in Main.hs
):
Building executable 'crackNum' for crackNum-3.4..
[1 of 3] Compiling CrackNum.TestSuite
[2 of 3] Compiling Paths_crackNum
[3 of 3] Compiling Main
/Users/dan/scratch/crackNum-3.4/src/CrackNum/Main.hs:340:78: error: [GHC-63394] [-Wx-partial, -Werror=x-partial]
In the use of ‘tail’
(imported from Prelude, but defined in GHC.List):
"This is a partial function, it throws an error on empty lists. Replace it with drop 1, or use pattern matching or Data.List.uncons instead. Consider refactoring to use Data.List.NonEmpty."
|
340 | trim xs | "[" `isPrefixOf` xs && "]" `isSuffixOf` xs = init (tail xs)
| ^^^^
I was able to reproduce this locally like so:
stack unpack crackNum-3.4 && cd crackNum-3.4
edit stack.yaml # add the following stack.yaml
stack build --test --bench --no-run-benchmarks --fast
# stack.yaml
resolver: nightly-2024-01-11
extra-deps:
- sbv-10.3@sha256:d869a49fd8e6303a81f7f704bb8669deff20d000e4644f93ddc64749d4bc0f9a,23712
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.