-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added version 0.1.0 of LSBF dump utility #3
Conversation
lsbfdump/src/test/scala/org/apache/daffodil/lsbfdump/LSBFDumpTest.scala
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Looks good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1. License should be fixed, everything else is a minor suggestion that can be ignored or done later.
I also wonder if there would be value in getting something like this merged into xxd or some other binary tool available on many linux distros. It would be nice to just have this capability on all linux machines. An added benefit is xxd can convert a hex dump back to a file, so it could be useful for creating LSBF files in addition to outputting them. Or maybe it's not worth the effort, which the assumption that VS Code extension will soon have this capability, plus the ability to decode strings/numbers as well.
lsbfdump/src/main/scala/org/apache/daffodil/lsbfDump/LSBFDump.scala
Outdated
Show resolved
Hide resolved
lsbfdump/src/main/scala/org/apache/daffodil/lsbfDump/LSBFDump.scala
Outdated
Show resolved
Hide resolved
lsbfdump/src/main/scala/org/apache/daffodil/lsbfDump/LSBFDump.scala
Outdated
Show resolved
Hide resolved
lsbfdump/src/main/scala/org/apache/daffodil/lsbfDump/LSBFDump.scala
Outdated
Show resolved
Hide resolved
lsbfdump/src/main/scala/org/apache/daffodil/lsbfDump/LSBFDump.scala
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see added comment about the fact that I used ChatGPT4 when writing this.
Worth considering, but I fear we'd end up having to teach the whole world about leastSignificantBitFirst and its issues to get it accepted. In any case that's an issue for another day. |
Most recent commit addresses all the functional and LICENSE issues that @stevedlawrence found. I will do a separate commit with proposed language about the ChatGPT4 content, notices, etc. |
# Generative AI Statement: This version contains code initially generated by Mike Beckerle (mbeckerle) using: ChatGPT 4.0 on 2023-12-13 but subsequently further modified by hand. ChatGPT 4.0 provided this statement with respect to originality of its contribution: > There are no direct citations or sources for this code, as **it was not taken from > copyrighted material or external sources.**
Please review the commit: which contains only the generative-AI notice, in the README.md (which is repeated in the commit message) I did not put "Generated By ChatGPT 4.0" because that's really overstating the contribution from that system. |
Reviewed, and looks good enough. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, I'm not sure how much I trust ChatGPTs statement to what it sourced (I'm not convinced it even knows what it sourced or their associated licenses), but nothing here looks obviously copied or would have licensing restrictions
I agree that I am more reassured by scanning the code it created, which at this point is pretty heavily modified. I also agree, in that these LLMs really are just trying to make what they say "sound good" w.r.t. all the text they've read. The heuristic is if it sounds good, it's likely to be correct (and make users happy). OTOH, comparable tools, like Google Bard, have grown attribution features, and I expect chatGPT will also at some point. Ex: Check out the citations from this google bard chat: https://g.co/bard/share/a20037e8491a - the latest google bard (came out last week) is also looking pretty useful. |
Uses GraalVM and sbt-native-image plugin to create a small fast-loading executable.
Per the README.md:
Creates a data dump at bits level for data that has dfdl:bitOrder="leastSignificantBitFirst".
For example:
The address (in hex) is on the right (its display is optional). The bytes start on the right and increase moving left and downward.
The least significant bit of each byte is on the right (as people usually write numbers).
The purpose of this is for use with data where the bit positions are numbered from right to left. I.e.,
the first bit (position 0, or position 1 if using 1-based indexing) in each byte is the rightmost bit.
Per the helptext: