@DiazCarrete@hachyderm.io avatar

DiazCarrete

@DiazCarrete@hachyderm.io

This profile is from a federated server and may be incomplete. Browse more on the original instance.

DiazCarrete, to random
@DiazCarrete@hachyderm.io avatar

If your branch has a good number of commits since it diverged from main, rebasing can sometimes seem like a Sisyphean task. Because each commit is applied independently, you often end up resolving merge conflicts again and again in the same places, conflicts that a merge would make you resolve together in one go.

To avoid that, I sometimes squash together all the commits in my branch before rebasing on top of main. But then of course I lose the structure of the separate commits.

DiazCarrete,
@DiazCarrete@hachyderm.io avatar

@nshephard Thanks! Although my understanding is that "rerere" mostly helps when you do repeat merges/rebases and discard the results. The docs say:

"With rerere enabled, you can attempt the occasional merge, resolve the conflicts, then back out of the merge."

In my case, I just want to perform the rebase and be done with it. The problem is merging the individual commits one by one. I dislike having to resolve the extra conflicts, even the first time!

DiazCarrete,
@DiazCarrete@hachyderm.io avatar

@BoydStephenSmithJr That "partial squash" technique sounds interesting! Is there a more detailed description of it somewhere? How does "resolving a conflict [...] to a version further down" work?

DiazCarrete, to random
@DiazCarrete@hachyderm.io avatar

4:40 "I'm a huge fan of debugging"
๐Ÿ“ฝ๏ธ ๐Ÿ”— https://www.youtube.com/watch?v=javGxN-h9VQ

DiazCarrete, to random
@DiazCarrete@hachyderm.io avatar

Adding type safety to object IDs in TypeScript ๐Ÿ”— https://www.kravchyk.com/adding-type-safety-to-object-ids-typescript/ https://news.ycombinator.com/item?id=39174998
strongly-typed ids in a DDD book ๐Ÿฆ ๐Ÿ”— https://twitter.com/DiazCarrete/status/1426817945418833920

DiazCarrete, (edited ) to random
@DiazCarrete@hachyderm.io avatar
DiazCarrete, to haskell
@DiazCarrete@hachyderm.io avatar
DiazCarrete, (edited ) to random
@DiazCarrete@hachyderm.io avatar

Researching some doubts I had about serialized theading mode and prepared statements.

It seems that sharing a prepared statement between threads is bad news, even in serialized mode.
๐Ÿ”— https://www.sqlite.org/threadsafe.html
๐Ÿ”— https://sqlite.org/forum/forumpost/9d87fe7c8e
๐Ÿ”— https://sqlite-users.sqlite.narkive.com/6l92EAHJ/serialized-prepared-statement-clarification

DiazCarrete,
@DiazCarrete@hachyderm.io avatar

"the interesting features of SQLite are far more connection-oriented than most client-server databases" ๐Ÿ”— https://crawshaw.io/blog/go-and-sqlite

Making SQLite faster in Go ๐Ÿ”— https://turriate.com/articles/making-sqlite-faster-in-go

GitHub issue for some ORM ๐Ÿ”— https://github.com/typeorm/typeorm/issues/1884

DiazCarrete, to haskell
@DiazCarrete@hachyderm.io avatar

> writes dynamically typed code example
> only compiles it, doesn't even run it once ๐Ÿคท
๐Ÿ”— https://discourse.haskell.org/t/implementing-type-safe-heterogeneous-collections/8605/5
๐Ÿ”— https://github.com/danidiaz/toyframes/blob/main/README.md

DiazCarrete, (edited ) to haskell
@DiazCarrete@hachyderm.io avatar

Still getting the hang of pattern synonyms.

๐Ÿ”— https://downloads.haskell.org/ghc/latest/docs/users_guide/exts/pattern_synonyms.html
๐Ÿ”— https://gitlab.haskell.org/ghc/ghc/-/wikis/pattern-synonyms#explicitly-bidirectional-pattern-synonyms
the paper ๐Ÿ”— https://repository.brynmawr.edu/compsci_pubs/68/

It seems that, if you want to check for some value-level condition when matching, you need to bring in ViewPatterns. This is mentioned in the wiki but not (explicitly) in the GHC user guide.

DiazCarrete, to haskell
@DiazCarrete@hachyderm.io avatar

"I recently merged linear let- and where-bindings in GHC. Which means that weโ€™ll have these in GHC 9.10"
๐Ÿ”— https://www.tweag.io/blog/2024-01-18-linear-desugaring/

DiazCarrete, (edited ) to random
@DiazCarrete@hachyderm.io avatar
DiazCarrete,
@DiazCarrete@hachyderm.io avatar
DiazCarrete,
@DiazCarrete@hachyderm.io avatar

I didn't have luck configuring cabal-docspec on CI, even as it worked fine locally.

I had more luck configuring the traditional "doctest" package ๐Ÿ”— https://hackage.haskell.org/package/doctest following the recommended instructions.

๐Ÿ”— https://github.com/danidiaz/cauldron/blob/9ada1f7a3c62ab71fd7763e10f3930f30ea0e635/.github/workflows/haskell-ci.yml#L66
๐Ÿ”— https://github.com/danidiaz/cauldron/blob/9ada1f7a3c62ab71fd7763e10f3930f30ea0e635/.github/workflows/haskell-ci.yml#L182

One advantage of "doctest" is that it's on Hackage.

DiazCarrete, to programming
@DiazCarrete@hachyderm.io avatar

"Open inversion of control demands exception transparency"โ€”Kevlin Henney ๐Ÿ”— https://medium.com/97-things/uncheck-your-exceptions-ec37a722f5ad

"exception values are shared secrets [...] the perennial suggestion to put exception-raising information into types makes no sense to me"โ€”Robert Harper ๐Ÿ”— https://existentialtype.wordpress.com/2012/12/03/exceptions-are-shared-secrets/

DiazCarrete, to programming
@DiazCarrete@hachyderm.io avatar
DiazCarrete, (edited ) to haskell
@DiazCarrete@hachyderm.io avatar
DiazCarrete, to haskell
@DiazCarrete@hachyderm.io avatar

In lucid2, repeated "class" attributes are combined with a space inbeetwen. Repeated "style" attributes are combined with a ";" inbetween.
https://hackage.haskell.org/package/lucid2-0.0.20230706/docs/src/Lucid.Base.html#local-6989586621679058240

DiazCarrete, to random
@DiazCarrete@hachyderm.io avatar

How I refactor knowing object keys in my serialized JSON are not directly derived from record field names.

DiazCarrete, to random
@DiazCarrete@hachyderm.io avatar

When representing "subtype" relationships in , "The primary keys of subtype tables are also foreign keys, referencing the primary key of [the main table]"

๐Ÿ“– ๐Ÿ”— https://www.oreilly.com/library/view/the-art-of/0596008945/ch01.html https://www.goodreads.com/book/show/1032724.The_Art_of_SQL

DiazCarrete, to vim
@DiazCarrete@hachyderm.io avatar

9.1 released, including support for classes in Vimscript! Now I can finally adopt it as my my primary programming language. (Just kidding, of course... It already was.)
๐Ÿ”— https://www.vim.org/vim-9.1-released.php
๐Ÿ”— https://vimhelp.org/vim9class.txt.html#vim9-class

DiazCarrete,
@DiazCarrete@hachyderm.io avatar

Unironically good programming advice from :h vim9-class

DiazCarrete,
@DiazCarrete@hachyderm.io avatar

@jaror So kinda like with typeclass instances in Haskell, in a way?

pmidden, to haskell
@pmidden@fosstodon.org avatar

Not sure why trailing commas aren't more common in programming languages and formats. Does it make the parser simpler? Can't imagine. (current example: )

DiazCarrete, (edited )
@DiazCarrete@hachyderm.io avatar

@jaror @pmidden I sorely miss trailing commas in records, and wouldn't mind a bit of syntactic inconsistency to have them.

DiazCarrete, to haskell
@DiazCarrete@hachyderm.io avatar

Wrote a toy dependency injection library for . inductive tuples, graph topological sorting and dynamic typing under the hood.
https://discourse.haskell.org/t/cauldron-a-toy-dependency-injection-framework/8092

DiazCarrete,
@DiazCarrete@hachyderm.io avatar
  • All
  • Subscribed
  • Moderated
  • Favorites
  • โ€ข
  • megavids
  • everett
  • ethstaker
  • thenastyranch
  • magazineikmin
  • cisconetworking
  • rosin
  • khanakhh
  • osvaldo12
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • DreamBathrooms
  • JUstTest
  • ngwrru68w68
  • tacticalgear
  • InstantRegret
  • normalnudes
  • GTA5RPClips
  • mdbf
  • tester
  • cubers
  • provamag3
  • Leos
  • modclub
  • anitta
  • lostlight
  • All magazines