@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.

b0rk, to random
@b0rk@jvns.ca avatar

working on a very short list of helpful command line git tools. so far I have:

what am I missing?

(I think GUI git tools are great too but that's not my focus right now)

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

@b0rk I often use fzf in my git aliases, to help select files/branches. It even allows multi-selection.
https://github.com/danidiaz/miscellany/blob/a2623794433aa8bd9df5eca48a4b495dd507fbf3/linux/.gitconfig#L22

DiazCarrete, to programming
@DiazCarrete@hachyderm.io avatar
DiazCarrete,
@DiazCarrete@hachyderm.io avatar

@clementd Yeah, I can see how it would be useful. "package by layer" wins in that case I guess.

DiazCarrete,
@DiazCarrete@hachyderm.io avatar

I generally prefer package-by-feature. But: I also like -first development (generating controller interfaces using Generator for example) and I feel it clashes a little with the package-by-feature approach, because you generate an entire "layer" (the controllers) in one go, and all the results tend to be put in the same package.
https://openapi-generator.tech/docs/generators/spring/
How to resolve this apparent tension?

DiazCarrete, to random
@DiazCarrete@hachyderm.io avatar
DiazCarrete,
@DiazCarrete@hachyderm.io avatar
DiazCarrete, to random
@DiazCarrete@hachyderm.io avatar

cabal init --non-interactive --no-comments --dependency="base, servant, servant-server, servant-blaze, blaze-html, blaze-htmx"

DiazCarrete,
@DiazCarrete@hachyderm.io avatar

@clementd Do you know of any comparison between blaze-html and lucid2?

DiazCarrete, to haskell
@DiazCarrete@hachyderm.io avatar

Even after enabling the DuplicateRecordFields, NoFieldSelectors and OverloadedRecordDot triad, record update for ambiguous fields remains a pain, often alleviated with lens libraries like "generic-lens".

Explicitly deconstructing and constructing values might be an alternative in some cases.
🔗 https://discourse.haskell.org/t/first-release-of-derive-has-field-derive-hasfield-instances-for-records/7723/6?u=danidiaz
🔗 https://gist.github.com/danidiaz/1659defe71d5d51ae042e001c98014ae

DiazCarrete,
@DiazCarrete@hachyderm.io avatar

Alas, this RecordWildcards-based solution might cause spurious warnings in combination with -Wname-shadowing

DiazCarrete,
@DiazCarrete@hachyderm.io avatar

Renaming a record field update
📽️ 🔗 https://www.youtube.com/watch?v=1ClZ0ySPHtI&t=1735s

DiazCarrete, to haskell
@DiazCarrete@hachyderm.io avatar
DiazCarrete,
@DiazCarrete@hachyderm.io avatar

Found this lexi_lambda video about worker/wrapper which gives an example of optimizing records away:
https://youtu.be/XiTO1EGKrhE?t=1030

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

currently engaged in a RESTological disquisition

Why isn't HTTP PUT allowed to do partial updates in a REST API?
🔗 https://stackoverflow.com/questions/19732423/why-isnt-http-put-allowed-to-do-partial-updates-in-a-rest-api

Why PATCH is neither safe nor idempotent?
🔗 https://stackoverflow.com/questions/41390997/why-patch-is-neither-safe-nor-idempotent

Same representation for GET and PUT?
🔗 https://stackoverflow.com/questions/36498982/same-representation-for-get-and-put

I might even consult the holy RFCs themselves
🔗 https://developer.mozilla.org/en-US/docs/Web/HTTP/Resources_and_specifications

#rest #http

DiazCarrete,
@DiazCarrete@hachyderm.io avatar

I might be splitting hairs about the semantics of PUT, but there seems to be a slight contradiction in

On one hand, a GET after a PUT should return the exact representation that was set by the PUT.

On the other hand, a PUT "might also cause links to be added between the related resources" which seems to say that the representation might be enriched with extra links.

DiazCarrete, to random
@DiazCarrete@hachyderm.io avatar

"he could not think this way, he had to take a sheet of paper, and he started writing"
https://lobste.rs/s/qgjisu/software_engineering_is_about_thinking#c_wzkfko

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

"Accessible, Typesafe, Progressively Enhanced Modern Web Forms"
https://www.epicweb.dev/accessible-typesafe-progressively-enhanced-modern-web-forms

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

Functional programming concepts as music videos:

DiazCarrete, to random
@DiazCarrete@hachyderm.io avatar

A History of Subtyping—Benjamin C. Pierce
🔗 📽️ https://www.youtube.com/watch?v=SiUBXvpo2eI

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

"The architect planned the construction [of the Sagrada Família] in phases because he believed that this would make it more difficult to abandon the project."

So, if I'm reading this correctly, Gaudí planned to complete the Nativity Facade before continuing with other parts of the building, to avoid a "everything started, nothing completed, project ultimately abandoned" kind of situation.

He tackled the project using a (literal) "vertical slice" strategy!

🔗 https://www.nationalgeographic.es/historia/sagrada-familia-diez-curiosidades

DiazCarrete, to random
@DiazCarrete@hachyderm.io avatar

"By default, an element that causes a request will include its value if it has one. If the element is a form it will include the values of all inputs within it."
https://htmx.org/docs/#parameters

What if want to use "formaction" for supporting different target URLs in the form (like "delete all" / "export all" buttons) ?
https://github.com/bigskysoftware/htmx/issues/623
https://github.com/bigskysoftware/htmx/pull/1777

DiazCarrete, to random
@DiazCarrete@hachyderm.io avatar

Interesting: it seems that is moving towards typechecking desugared expressions in some cases, instead of typechecking the surface syntax.

The tricky part is not making the error messages worse.

https://youtu.be/LFIL0myeOlo?list=PLyrlk8Xaylp5ahGXwF_NvYEhVOnedRIAs&t=469

DiazCarrete, to haskell
@DiazCarrete@hachyderm.io avatar

"I wonder at which point we should simply require whitespace between most lexemes, like Agda."
https://github.com/ghc-proposals/ghc-proposals/pull/451#issuecomment-954250714

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

Checking if the "algebraic-graphs" library allows vertices to connect to themselves. (It does.)

And if you remove an edge, the vertices stay in the graph.

So, if I wanted to remove self-loops (to be able to perform topological sorting) I could get the list of vertices and repeatedly call "removeEdge".

https://hackage.haskell.org/package/algebraic-graphs

DiazCarrete, to postgres
@DiazCarrete@hachyderm.io avatar

"How to work with pg_stat_statements"
🐦🔗 https://twitter.com/samokhvalov/status/1709069225762095258

DiazCarrete, to haskell
@DiazCarrete@hachyderm.io avatar

"the very definition of the GHC profiler makes it of limited use when estimating time on two classes of computations: firstly, those that need to do blocking IO; and secondly, some computations that invoke functions written in other programming languages."
https://www.tweag.io/blog/2022-07-28-timestats/
Sometimes you have to turn to the eventlog
https://well-typed.com/blog/2019/09/eventful-ghc/
https://hackage.haskell.org/package/ghc-events
https://downloads.haskell.org/ghc/latest/docs/users_guide/eventlog-formats.html

DiazCarrete, to random
@DiazCarrete@hachyderm.io avatar

"DON'T return arrays as top level responses" seems like a worthy candidate for the list of "YAGNI exceptions", among classics like "You might as well timestamp it".

🔗 https://github.com/stickfigure/blog/wiki/How-to-(and-how-not-to)-design-REST-APIs#rule-4-dont-return-arrays-as-top-level-responses
🔗 https://lukeplant.me.uk/blog/posts/yagni-exceptions/
🔗 https://changelog.com/posts/you-might-as-well-timestamp-it

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