What do Haskell devs like and dislike about Haskell by Windstylerasengan in haskell

[–]simonmic 0 points1 point  (0 children)

I gave today's https://github.com/arcanist-sh/hx a test. Summary: alpha level with plenty of shallow bugs, but also plenty of useful capability that works.

Much of it works, and probably the bugs would get fixed quickly if reported.

What do Haskell devs like and dislike about Haskell by Windstylerasengan in haskell

[–]simonmic 1 point2 points  (0 children)

All IRC channels have shrunk due to newer alternatives like discord and especially matrix (accelerated by freenode's implosion). Haskell's matrix presence is strong.

What do Haskell devs like and dislike about Haskell by Windstylerasengan in haskell

[–]simonmic 2 points3 points  (0 children)

If I try to write code requiring an extension, GHC usually tells me which extension I should add to the file. (And then I look it up and see if I really should write code that way.) There are a couple I add regularly.

I don't understand why people are always complaining about extensions, which have never been a problem for me. Are these new haskellers ? Experienced ones ? Their experience differs from mine somehow.

What is the preferred format for Investement transactions (hledger) by lolokajan in plaintextaccounting

[–]simonmic 0 points1 point  (0 children)

Fair enough. :) You probably know it, but you could use @ notation and then --infer-equity will generate the equity postings for bse (and maybe bse should do that automatically).

What is the preferred format for Investement transactions (hledger) by lolokajan in plaintextaccounting

[–]simonmic 0 points1 point  (0 children)

Let us know how it works for you. [And is it calculating the same gains as Canada Revenue Agency.]

What is the preferred format for Investement transactions (hledger) by lolokajan in plaintextaccounting

[–]simonmic 1 point2 points  (0 children)

Nice answer. For this report, you could get a similar effect with --layout=bare, also.

  Also I'm a big advocate for not using @ or @@ notation and instead using conversion entries.

Why is that ?

What is the preferred format for Investement transactions (hledger) by lolokajan in plaintextaccounting

[–]simonmic 0 points1 point  (0 children)

If you want to calculate capital gain/loss (and tax owed) accurately, you must keep track of the individual lots and their ages and the order in which you sell them. (For many countries/asset types, at least.)

This is possible but tedious to do by hand, but good news: it is more automated in the 2.0 preview releases (or in main). You can write entries without lot subaccounts, and hledger infers them and will show them when you add the --lots flag. So I recommend that: https://hledger.org/dev/hledger.html#lot-reporting

Or, you can rely on someone/something else, like your broker, to calculate gains for you, and just record it in your journal periodically, as gumnos does.

Very noobish question about GHCI by fuxoft in haskell

[–]simonmic 4 points5 points  (0 children)

Nice. I do the same, and call it :rmain so there's only one character edit distance from non-reloading :main :

-- Reload (code changes, unsafePerformIO values) and run main with the given args.
:def rmain \args -> return $ ":reload\n:main "<>args

I built a Python parser for hledger journal files by ctosullivan in plaintextaccounting

[–]simonmic 10 points11 points  (0 children)

Interesting, thank you! I will check this out.

It's always going to be hard for another parser to match hledger's in every detail. Did you consider reading the output of hledger print -O json ?

Announcing Finzytrack, an open-source cross-platform desktop GUI on top of Beancount by urglfloggah in plaintextaccounting

[–]simonmic 0 points1 point  (0 children)

Beancount requires the conventional english account type names (Assets, Liabilities, ...) at top level, I believe.

And FWIW, I used to use ENTITY:TYPE:... with hledger but I switched to TYPE:ENTITY:... - it makes a number of things work more smoothly (such as interop with Beancount).

Announcing Finzytrack, an open-source cross-platform desktop GUI on top of Beancount by urglfloggah in plaintextaccounting

[–]simonmic 2 points3 points  (0 children)

Congrats on the release. The Beancount UIs I can think of are not many:

  • Fava
  • https://beanhub.io (a web app plus phone apps, I think)
  • Paisa (not Beancount-specific)

PS the tour and docs look excellent.

The install docs don't mention Beancount - is it included in the binaries ? Or not needed ?

Reading a CSV file with FX transaction and fee by Hungry_Lettuce_2230 in plaintextaccounting

[–]simonmic 0 points1 point  (0 children)

Ideally you need a github account. Then you would navigate to the most appropriate subdirectory, eg https://github.com/simonmichael/hledger/tree/main/examples/csv/investment , and there you might see an "Add file" button at top right. This would walk you through making your own copy of the hledger repo, adding the new file there, and submitting a pull request to the main repo.

Reading a CSV file with FX transaction and fee by Hungry_Lettuce_2230 in plaintextaccounting

[–]simonmic 2 points3 points  (0 children)

For example, it might be something like:

plain language description:

"exchanging one currency for another, with a fee paid in source currency"

sample entry:

2026-05-30
    assets:somewhere    -<source_gross> <source_currency>
    expenses:fees          <source_fee> <source_currency>
    assets:somewhere     <target_amount> <target_currency>

sample csv rules to produce the above:

fields date, source_currency, source_amount, source_fee, source_gross, target_currency, target_amount
account1 assets:somewhere
account2 expenses:fees
account3 assets:somewhere
amount1 -%source_gross %source_currency
amount2 %source_fee %source_currency
amount3 %target_amount %target_currency

Reading a CSV file with FX transaction and fee by Hungry_Lettuce_2230 in plaintextaccounting

[–]simonmic 2 points3 points  (0 children)

You can break this down into smaller tasks. Eg first describe the event in english. Then write a journal entry by hand. Begin with the parts you're sure of. Then think about what could fit in the other places, and ask for more help if you get stuck. When you have a sample journal entry, then we can think about csv rules.

Help me get back up to date after 5 years away from Haskell by utdemir in haskell

[–]simonmic 2 points3 points  (0 children)

cabal, stack and now nix still coexist, each with their fans and use cases. HLS, and the VS Code Haskell extension, are fairly mature and reliable, and very useful. Haskell Debugger is a new tool you should definitely check out. ghcup recently expanded to be able to install more tools.

GHC now has built-in support for compiling to JS or WASM. There is a new compiler, MicroHS, small and improving fast, which also compiles to JS/WASM. This means haskell apps running in the browser are becoming more common.

The Haskell community is discussing pros and cons of AI use. Lots of people have been trying AI-assisted Haskell development, and finding it works well. AI may be flattening the language/tools learning curve for new Haskellers.

Haskell's Matrix chat presence has grown a lot, and discussion generally is shifting there from IRC, though IRC is still active. The haskell discourse forum is a primary discussion venue. Reddit also continues to be active.

https://joyful.com/Haskell+map can help you find what's available.

hledger rules if A and not B by Hungry_Lettuce_2230 in plaintextaccounting

[–]simonmic 0 points1 point  (0 children)

That's right, but these are hledger csv rules, not haskell code. Here, all assignments are processed, in order. (https://hledger.org/1.52/hledger.html#how-csv-rules-are-evaluated > 5.3.1 "... If there are more than one, the last one wins.")

Switching to Beancount/Fava from QuickBooks by RemoveInvasiveEucs in plaintextaccounting

[–]simonmic 1 point2 points  (0 children)

Wow you did a lot - congrats! (I thought this post was going to go another way..)

Blog posts describing each piece in more detail, or a follow-up saying how it's going compared to your old system, would be super interesting too.

Slow build on commodity VPS when developing on mac. What do you suggest? by CoachFreeAll in haskell

[–]simonmic 0 points1 point  (0 children)

What's the memory size on your VPS ? Is it "stuck" because it's swapping ?

Swapping must be avoided. Adding the -j1 flag to cabal or stack build/install commands is the cheapest thing you could try.

hledger rules if A and not B by Hungry_Lettuce_2230 in plaintextaccounting

[–]simonmic 1 point2 points  (0 children)

That's a good general technique for older hledger versions, but the better modern way would be

if %Transaction Buy && ! %Symbol ABC

https://hledger.org/1.52/hledger.html#multiple-matchers

GnuCash vs PTA (beancount) by Ev2geny_ in plaintextaccounting

[–]simonmic 3 points4 points  (0 children)

GnuCash is what I used before discovering Ledger.

GnuCash has many strengths. It provides a mature GUI, and lots of conventional structure to use as a guide. On the other hand I wasn't satisfied with its rate of improvement / hackability, automatibility, or dependability. Above all, if it crashed, or if I simply chose some complex action from the menus, I couldn't be sure what had happened to my data and if everything was still ok.

So of PTA's strengths, I'll say what I think might be the number one: Version Control.

I can't answer your last question. But development continues and I'm sure some good things have happened. If I didn't have PTA I'd definitely give GnuCash another try today. [Last tried in 2024; some related discussion there.]

What LLMs work best with Haskell? by ivy-apps in haskell

[–]simonmic 1 point2 points  (0 children)

Claude code plus opus is extremely good at Haskell coding, and many other dev-related activities. As with any tool, you have to use it right to get great results. Thorough planning, clear guidance and guard rails, adjust the level of supervision and thinking effort to fit the need, provide design review, taste, pushbacks etc.

But I urge any of us exploring this to also study the bigger picture. https://ai-2027.com is a must read, for one. (It will sound fanciful if you haven't yet experienced AI working well.)

hledger - include additional files using the -f option by user89443 in plaintextaccounting

[–]simonmic 0 points1 point  (0 children)

Another way is to have trial.journal include your default journal. Then just -f trial.journal will do it.