@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 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, 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 CSS
@DiazCarrete@hachyderm.io avatar

I've found tricky to set a vertical scrollbar on a component, when we don't want to set an explicit height in the component itself, and instead want it to consume leftover vertical space from an ancestor that has "height: 100vh;"

I've managed to achieve it by spraying "display: flex" and "flex-grow: 1" across the ancestor chain, but I wonder if there's a better way. 🤔

JSFiddle 🔗 https://jsfiddle.net/cm6rL1ny/
GitHub 🔗 https://github.com/danidiaz/html-experiments/blob/1434d95f1c1b4c9ab2124b52b8d06557b1f01bf3/vertical-scrollbar/index.html#L5

DiazCarrete, to random
@DiazCarrete@hachyderm.io avatar

CSS has made me afraid of heights 😔📏

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

"a language for describing the rendering of structured documents [...] on screen, on paper, etc"

"renders it onto a canvas such as your screen, a piece of paper, or an audio stream."

"Each box in the box tree represents its corresponding element [...] in space and/or time on the canvas"

"the aural box tree"

🔗 https://www.w3.org/TR/css-display-3/
🔗 https://www.w3.org/TR/CSS/#terms
🔗https://stackoverflow.com/questions/16936297/when-does-a-box-establish-an-inline-formatting-context
🔗 https://developer.mozilla.org/en-US/docs/Web/CSS/Inline_formatting_context
🔗 https://developer.mozilla.org/en-US/docs/Glossary/Inline-level_content

DiazCarrete,
@DiazCarrete@hachyderm.io avatar

"each contiguous sequence of sibling text nodes generates a text sequence containing their text contents, which is assigned the same styles as the generating text nodes" 🔗 https://www.w3.org/TR/css-display-3/

I wonder in what situation there can be sibling text nodes 🤔 this SO gives an example, but it's not clear why that happens 🔗 https://stackoverflow.com/questions/29245503/multiple-text-nodes-in-a-single-element

DiazCarrete, to CSS
@DiazCarrete@hachyderm.io avatar

A loop in an element's css height property calculation, with unexpected results.

📽️ 🔗 https://youtu.be/6aHKdahOfCc?t=198

DiazCarrete,
@DiazCarrete@hachyderm.io avatar

"Sometimes the size of a percentage-sized box’s containing block depends on the intrinsic size contribution of the box itself, creating a cyclic dependency"
https://www.w3.org/TR/css-sizing-3/#cyclic-percentage-contribution

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • kavyap
  • DreamBathrooms
  • Durango
  • magazineikmin
  • InstantRegret
  • ngwrru68w68
  • Youngstown
  • everett
  • slotface
  • tacticalgear
  • cisconetworking
  • khanakhh
  • rosin
  • anitta
  • thenastyranch
  • vwfavf
  • osvaldo12
  • mdbf
  • modclub
  • GTA5RPClips
  • Leos
  • normalnudes
  • cubers
  • ethstaker
  • tester
  • provamag3
  • JUstTest
  • All magazines