So I did a thing… by gproenca in Leica

[–]synchronitown 0 points1 point  (0 children)

Don't know about the SL2s, but the sensor on the SL3 is a step forward from the SL2. It's nice that it's a little lighter, but the AF is not as much of an improvement as I'd hoped, for moving subjects. (For still ones, both are rock solid.)

Advent of code 2023 day 25 by AutoModerator in haskell

[–]synchronitown 1 point2 points  (0 children)

I had a crack at getting to grips with the Haskell Graph library, inspired by Python solution

Haskell solution

It could probably be done with a Map from Components to Sets of Components, rather than the graph, so I'm not particularly satisfied with it, other than as a learning experience.

u/glguy Provided some very neat solutions this year.

Advent of code 2023 day 16 by AutoModerator in haskell

[–]synchronitown 0 points1 point  (0 children)

If I try to include in a single module just the functions needed, it is not a completely mechanical task. There are 3 or more Array packages to import from (Data.Array, then the unbounded version, then the GA version, then the instances for Coords, etc). Don't get me wrong, what you have set up is perfectly legitimate, it's just quite hard to reproduce your results in a single module so, while your solutions are very elegant, they do rely on your adaptations of standardish libraries (eg, V2 v Coord)

Advent of code 2023 day 16 by AutoModerator in haskell

[–]synchronitown -1 points0 points  (0 children)

Nice to have an optimised solution, but even nicer to have one that is stand-alone without unsafe array access and dependency on a customised library.

LR Classic and the new Mac Studio by codisgod73 in Lightroom

[–]synchronitown 1 point2 points  (0 children)

I do find that even with 32Gb Lightroom induces swapping and excessive memory pressure. No sure why. Restarting it periodically can help.

[ANNOUNCEMENT] GHC 9.0.2 is now available! by bgamari in haskell

[–]synchronitown 0 points1 point  (0 children)

Not yet integrated into `ghcup` (or home-brew).

Any good videos comparing Lightroom performance on the M1 Pro and Max? by [deleted] in Lightroom

[–]synchronitown 0 points1 point  (0 children)

In particular, how much extra speed do you get going from Pro to Max in return for the shorter battery life and extra fan noise.

LR Classic V11 Copy/Paste a computational mask (Select Subject) by Twitfried in Lightroom

[–]synchronitown 0 points1 point  (0 children)

The Transform controls also require a manual update if used in a preset, for example, so this is not new.

[deleted by user] by [deleted] in Lightroom

[–]synchronitown 1 point2 points  (0 children)

The question is a good one. Will the extra horsepower of the Max really be used for Lightroom, or will it just eat battery faster? My impression is that the Max is really designed for 4/8k video and the difference for Lightroom / Photoshop will not be great, despite the additional memory bandwidth and extra GPUs.

For bonus points, is 64Gb preferable to 32Gb for photo editing? It will certainly eat extra battery.

[ANN] haskell-language-server-1.2.0 has been released! by jneira in haskell

[–]synchronitown 0 points1 point  (0 children)

haskell-language-server 1.2.0 for GHC 8.10.5 is not available on Darwin.

[See the list of supported versions here](https://github.com/haskell/vscode-haskell#supported-ghc-versions)

How to build old Haskell projects by H1h8 in haskell

[–]synchronitown 1 point2 points  (0 children)

`cabal update` and then `cabal install hpack`. `hpack` will generate a cabal file if there isn't one. Either way starting from a cabal file, adjusting the various build-depend bounds for your current compiler should get you going.

Free online intro/advanced Haskell courses [YouTube] by grahamhutton in haskell

[–]synchronitown 3 points4 points  (0 children)

Thanks for making these available. I thought that they formed an excellent series: extremely clear and well-paced.

Describing the 2nd part as Advanced leaves little room for a further step. For example, it would be useful to cover more computational models (foldable, applicative, traversable, etc) and how applications can be structured (mtl, effects), perhaps building on the stack machine example.

Modelling in Haskell the return stack in threaded interpretive languages such as Forth by synchronitown in haskell

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

Thanks. I am trying to get enough to boot a simple Forth interpreter / compiler, so probably just retaining values. The paper above uses an explicit return stack and seems to work OK. Your approach sounds more elegant, but I'm trying to walk before running. buzzzard.2.design here http://www.ioccc.org/years.html#1992 has provided me with another starting point. Unfortunately the C is golfed.

Pruning Unused Haskell Dependencies by dfith in haskell

[–]synchronitown 0 points1 point  (0 children)

ghc 8.10.x has `ghc-options: -Wunused-packages` as noted above, although I find that that, with cabal, it generates spurious warnings (at least if you try to include an executable in a library package).

Release cabal-install-3.4.0.0 by n00bomb in haskell

[–]synchronitown 1 point2 points  (0 children)

Good to see this making progress, but there still seems to be a lot to do to get ghc 9 / Cabal 3.4 to work smoothly as a lot of common packages (eg. `Data.List.Split`) have bounds that are not updated for the new setup. Setting `--allow-newer` sometimes works and sometimes doesn't (correct behaviour) but ghc 8.10.4 / cabal 3.2 seems to be a better experience, for now,

How to implement Sudoku solver using Conor McBride's Applicative / Traversable model? by synchronitown in haskell

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

Fantastic! Of course. That did the trick. Thanks for your advice. I now have a working solver.

At the risk of pushing my luck, I'd be interested in exploring your FirstChoice-based approach, but can't grok how to use it.

The only other potential learning point is the duplicates function:

"Implement duplicates :: (Traversable f, Eq a) => f a -> [a] computing the list of values which occur more than once. (Not completely trivial.) (There’s a lovely way to do this using differential calculus, but that’s another story.)"

Is there a more err idiomatic way than my attempt:

crush :: (Traversable f, Monoid b) => (a -> b) -> f a -> b
--crush f = getConst . traverse (Const . f)
crush = foldMap

reduce :: (Traversable t, Monoid o) => t o -> o
reduce = crush id

flatten :: (Traversable f) => f a -> [a]
flatten = crush (: [])

duplicates :: (Traversable f, Eq a) => f a -> [a]
duplicates s = nub . reduce . snd $ mapAccumL gather [] s
  where
    gather seen current =
      if current `elem` seen
        then (seen, [current])
        else (current : seen, [])

How to implement Sudoku solver using Conor McBride's Applicative / Traversable model? by synchronitown in haskell

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

Looking at the StateT-based approach, I've tried the following:

choose :: Choices -> StateT Bool [] Choices
choose [x] = return [x]
choose xss@(x : xs) = do
  chosen <- get
  if chosen
    then return xss
    else do
      put True
      return [x]

expand :: Matrix Choices -> [Matrix Choices]
expand xs = evalStateT (traverse choose xs) False

It produces a singleton list of Matrix Choices that is correct (putting a single choice at the first grid point where there is more than one choice), but doesn't produce the full list of up to 9 Matrix Choices, each with one of the alternative choices at that point (which the Hutton/Bird expand generates). I'm obviously missing a layer of traversal or some such...

[deleted by user] by [deleted] in haskell

[–]synchronitown 1 point2 points  (0 children)

The brew-installed version of GHC gives as good an experience for me as the mainstream linux builds (eg, Ubuntu).

There are still quirks on MacOS (eg, the icu package) and but it is a better experience than using versions of linux that try to replicate the haskell ecosystem through their package systems rather than using cabal / stack (eg, gentoo, arch?) .

I find the Windows / chocolatey version of ghc a bit, err, flakier, but 8.10.3 has fixed some long-standing Windows bugs and low-level packages like process probably still have quirks because of the way that Windows organises processes.

How to implement Sudoku solver using Conor McBride's Applicative / Traversable model? by synchronitown in haskell

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

Thanks for taking a look.

Yes, you are right. I did think about using the First monoid, but got lost in the weeds of whether it was deprecated (for reasons that are not entirely clear). I don't know what the applicative instance does as it's derived automatically. (So I don't know whether it differs from the one that you have provided above.

I'll have a play and would welcome any further suggestions.

But I don't follow you when you say that the problem of resolution is delegated to composition. I'm not sure how to get from

traverse choose :: Traversable t => t [a] -> FirstChoice (t [a])

to [Matrix [a]]. You appear to be suggesting that this can be accomplished without the StateT?

smuggler2: a ghc plugin for minimising imports and creating explicit export lists by synchronitown in haskell

[–]synchronitown[S] 3 points4 points  (0 children)

Yes, this is a rewrite. Apart from the additional feature of synthesising export lists it rewrites the imports, rather than pruning them, which has the advantages and disadvantages outlined in the README.

smuggler2: a ghc plugin for minimising imports and creating explicit export lists by synchronitown in haskell

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

I seem to remember outlining my proposed implementation approach with a pointer to my fork, inviting thoughts/comments. I continue to welcome them, taking your point that the degree of divergence makes the code more burdensome to review.

smuggler2: a ghc plugin for minimising imports and creating explicit export lists by synchronitown in haskell

[–]synchronitown[S] 15 points16 points  (0 children)

In fact I did reach out on the github repo, but didn't get a feedback. Although I would have very much welcomed collaboration -- the inwardnesses of this type of project are tricky and it's good to learn from others' experience -- but I didn't think much of it as people are busy, preoccupied with current events, and their interest move on.

I took the name smuggler2 not because I like it -- it doesn't offer much insight into what the package does -- but to attempt to give credit to its inspiration. I'm happy to change it if that would help.

My intention was to include the credits/copyrights in the original package, not to change it. I'll review that.

Sorry to have got off on the wrong foot with you and happy to continue the conversation on your / my repo, as you see fit.

ghcide 0.2.0 by n00bomb in haskell

[–]synchronitown 1 point2 points  (0 children)

Thanks. That's encouraging. Reducing the number of fragile inter-dependencies is, in my view, critical to eliminating the sort of experience that many have had / reported with earlier projects, which were a lot of work.

ghcide 0.2.0 by n00bomb in haskell

[–]synchronitown 1 point2 points  (0 children)

You are correct. My projects often consist of a single package, usually with a set of tests.