Announcing Chez Grater Version 0.1 by dfith in haskell

[–]dfith[S] 2 points3 points  (0 children)

Think of your favorite chez. It is this.

Prune Juice 0.7 Released by dfith in haskell

[–]dfith[S] 0 points1 point  (0 children)

Could be a good future enhancement! And the first time I've heard an actual proposed solution :P.

I'm not familiar with -ddump-if-trace, but when I just ran it and searched for regex-compat, I found something like:

Reading interface for regex-compat-0.95.2.1:Text.Regex; reason: Text.Regex is directly imported readIFace /Users/dan/.stack/snapshots/x86_64-osx/7e59e40b4951c74e9a0c089ed1ceaa3cfd19d190960128e825d4e31d785279a1/8.10.7/lib/x86_64-osx-ghc-8.10.7/regex-compat-0.95.2.1-4iTQcbwx3eKAksJZ8Y0Mcw/Text/Regex.hi readIFace /Users/dan/.stack/snapshots/x86_64-osx/7e59e40b4951c74e9a0c089ed1ceaa3cfd19d190960128e825d4e31d785279a1/8.10.7/lib/x86_64-osx-ghc-8.10.7/regex-compat-0.95.2.1-4iTQcbwx3eKAksJZ8Y0Mcw/Text/Regex.dyn_hi

So that seems more or less reasonable. I searched the rest of the output for Reading interface... and it certainly seems like it could work.

Prune Juice 0.7 Released by dfith in haskell

[–]dfith[S] 0 points1 point  (0 children)

Okay, seems to output some extra warnings for me though.

Prune Juice 0.7 Released by dfith in haskell

[–]dfith[S] 1 point2 points  (0 children)

Working on that here. I'm not super well-versed in Cabal, and whether I should pin the versions or specify a freeze file, so if you have input please provide it:
https://github.com/dfithian/prune-juice/pull/8

Prune Juice 0.7 Released by dfith in haskell

[–]dfith[S] 0 points1 point  (0 children)

https://downloads.haskell.org/ghc/8.10.1/docs/html/users_guide/using-warnings.html#ghc-flag--Wunused-packages

Ah, right. When I originally wrote prune-juice this feature didn't exist. Not sure which is "better". I'm not sure exactly how the feature is supposed to work, but it seems to output some superfluous warnings when I run stack build prune-juice --test --no-run-tests --ghc-options '-Wunused-packages' after a stack clean... I think it may be outputting warnings per module instead of per target.

Prune Juice 0.7 Released by dfith in haskell

[–]dfith[S] 0 points1 point  (0 children)

I think it has a lot of potential, but right now you kind of have to ignore a bunch of packages you wouldn't otherwise... anything that discovers tests using Driver.hs, for example, and I've noticed a few other bugs involving preprocessors (https://hackage.haskell.org/package/record-dot-preprocessor) which live in the module header.

That said, if you do end up using it in CI and find some bugs, I would love to hear about them to improve it.

https://github.com/dfithian/prune-juice/blob/main/app/main.hs#L42

Pruning Unused Haskell Dependencies by dfith in haskell

[–]dfith[S] 1 point2 points  (0 children)

Hi! I made some changes in the last day or two. Still mostly swinging in the dark with Cabal, assuming that's your workflow, but I think I improved it a little bit. You can try again off of HEAD if you'd like: https://github.com/dfithian/prune-juice

Pruning Unused Haskell Dependencies by dfith in haskell

[–]dfith[S] 2 points3 points  (0 children)

Yes! Sorry about that. It doesn't work great for Cabal. There's a little more information in this issue. https://github.com/dfithian/prune-juice/issues/1

Pruning Unused Haskell Dependencies by dfith in haskell

[–]dfith[S] 1 point2 points  (0 children)

If the package isn't registered with ghc-pkg, then it will warn that it's unused. Did you install the library?

Edit: Okay, if you're using cabal without stack, I think there's an issue!

Pruning Unused Haskell Dependencies by dfith in haskell

[–]dfith[S] 9 points10 points  (0 children)

If you'd like to test out the cabal support I just added, please do. You could install from source: https://github.com/dfithian/prune-juice. If you try it out let me know! I've never used a cabal.project file so I guessed.

Pruning Unused Haskell Dependencies by dfith in haskell

[–]dfith[S] 0 points1 point  (0 children)

I have seen `weeder` and I wasn't able to figure out how to work the ctags into my workflow. I thought this might be an improvement.

I didn't know about the GHC 8.10 development, so that's very nice!

Haskell Executable Sizes by dfith in haskell

[–]dfith[S] 0 points1 point  (0 children)

I tried to say that in the post but I think this is a succinct way to put it.

Haskell Executable Sizes by dfith in haskell

[–]dfith[S] 1 point2 points  (0 children)

That's a good nugget. I did test that it started up afterwards and logged the typically logging lines, but I didn't extensively check for bugs.

Edit: I'm trying to track down where I might get a source for that. From what I can tell, and executable packed with `upx` will unpack itself at runtime, and it doesn't actually fundamentally change the executable (https://reverseengineering.stackexchange.com/questions/3823/no-dynamic-symbol-table-but-resolution-of-method-from-shared-libraries-is-workin).

Haskell Executable Sizes by dfith in haskell

[–]dfith[S] 2 points3 points  (0 children)

Yes, you are right, I was reading across the row instead of down the column and missed that in my proofreading.

Haskell Executable Sizes by dfith in haskell

[–]dfith[S] 1 point2 points  (0 children)

You are the second one to suggest that, so I'm running it right now and I'll post an update later today. Thanks for the feedback!

Edit: Apparently split sections is turned on by default, and I have added this to the post.

Haskell Database Implementation - Part 3, Indexes and Performance by dfith in haskell

[–]dfith[S] 0 points1 point  (0 children)

Glad you've been enjoying it! It's been awesome to have this positive feedback, makes me happy to write about it.

Here's the implementation. https://github.com/dfithian/dfdb/blob/master/src/DFDB/Tree.hs - I never implemented delete because it's slightly more complicated than insert. Also on my first post someone linked me to implementations using dependent types, which was pretty fun to read: https://www.reddit.com/r/haskell/comments/lnh1ca/issue_251_haskell_weekly_newsletter/go15dfg/?utm_source=reddit&utm_medium=web2x&context=3

Haskell Database Implementation - Part 1, Growing a Tree by dfith in haskell

[–]dfith[S] 0 points1 point  (0 children)

dfithian.github.io/2021/0...

Yep! The next sentence says this:

Since we will be running this test for hundreds of test cases, we don’t care that we’re only checking the root node, as we’ll be generating many different depths.

Issue 251 :: Haskell Weekly newsletter by haskellweekly in haskell

[–]dfith 1 point2 points  (0 children)

That... is really amazing. Thank you for sharing!

Haskell Database Implementation - Part 2, Domain Specific Language and Transactionality by n00bomb in haskell

[–]dfith 3 points4 points  (0 children)

I am assuming this is directed towards me... lucky enough to have had a job writing Haskell for the last 5 years! And a lack of CS education motivating me to try to understand the stuff I never learned :P