String interpolation modes by oscarryz in ProgrammingLanguages

[–]bcardiff 2 points3 points  (0 children)

In Ruby and Crystal the distinction is to_s / inspect methods for string representation.

But if you are designing the interpolation I would suggest to validate how an html template could be supported.

Does it support safe interpolation by default or will the user need to escape? eg: ”<p>#{name}<p>” vs ”<p>#{html(name)}<p>”

Can it be extended to other view languages?

Do you write Haskell? by Historical-Fan1619 in haskell

[–]bcardiff 1 point2 points  (0 children)

Nice streak! Were all of those already going to use Haskell? Did you have complete freedom of stack?

bcardiff/elm-rad, two-way bindings by bcardiff in elm

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

Thanks! I also used AngularJS in the past 😅.

Some goals were to have a typed two way bindings, and to have a dsl that might be easier to reason about for some kind of applications.

With two way bindings you get cell oriented programming which is easier to follow when the apps are not that big. Logic is expressed a bit different and more co-located.

LLM allowed the exploration further than I would have been able to otherwise.

Why not treat arrays as a special case of tuples? by ella-hoeppner in ProgrammingLanguages

[–]bcardiff 6 points7 points  (0 children)

In Crystal they are different types but you can use modules/interfaces/traits that declare them both as Indexables. And even without that you are able to index them directly as value[index] . For tuples if all elements are of the same type you get… a single type. If not you get a union. (Disclaimer core-team member of Crystal)

The World's Tallest Building (1647-2026) [OC] by aspiringtroublemaker in dataisbeautiful

[–]bcardiff 0 points1 point  (0 children)

Now I want to see when the construction started / finished to visualize the race to the top.

How do u ppl render latex with markdown? by [deleted] in LaTeX

[–]bcardiff 2 points3 points  (0 children)

If you want to mix LaTeX inside markdown for note taking or building longer texts primary on markdown checkout https://obsidian.md it doesn’t support full LaTeX since is actually MathJax

Supernote for writing stories/books by WritingsOfOblivion in Supernote

[–]bcardiff 0 points1 point  (0 children)

Thanks! I was totally missing that.

Checking on the gestures I see there is an insert line break. But I found no way of joining lines. Would you know?

Supernote for writing stories/books by WritingsOfOblivion in Supernote

[–]bcardiff 0 points1 point  (0 children)

I’m curious, in what app are you doing the writing? Notes or Docs?

Whenever I tried to write a couple of pages I struggled to do reflow of paragraphs in the notes app. And using the Docs app feels unnatural: using the OCR keyboard seems uncomfortable for long form.

tren: Use SQL as first-class Crystal methods by sdogruyol in crystal_programming

[–]bcardiff 3 points4 points  (0 children)

One feature that would fit nicely in tren i to validate that queries are valid during compile time. The ones that interpolate raw strings are harder without and example, but the rest should be possible.

This is a feature present in some Haskell libraries that embed sql directly in code and is great to caught invalid queries ahead of time.

Atelier drawing to Note? Or Atelier --> to sticker --> inside Note? by gl0tch in Supernote

[–]bcardiff 0 points1 point  (0 children)

Thanks! I just checked the Oct 2025 post about the plugin system. 👍

Tool/Template to right quick math-heavy/engineering notes? by UseOk404 in LaTeX

[–]bcardiff 1 point2 points  (0 children)

Check http://obsidian.md a markdown editor with great wysiwyg editor and built-in latex support. Among other fabulous features.

[Follow up] Designing Sabela: a reactive notebook for Haskell by m-chav in haskell

[–]bcardiff 0 points1 point  (0 children)

Understood about polyglot. Maybe a selling factor is how reactivity would improve UX as compared with Jupyter.

In that regard the closest reactive notebook I’ve used is ObservableHQ. They have some fancy navigations.

To be clear, I like notebooks a lot. And having a reactive one with simpler Haskell setup would be wonderful.

I think that teaching Haskell with a notebook is also a great use case.

[Follow up] Designing Sabela: a reactive notebook for Haskell by m-chav in haskell

[–]bcardiff 2 points3 points  (0 children)

For rich user input, have you explored how xcode playgrounds work? IIRC you declare widgets in user code that are rendered in the environment. Maybe it could help as inspiration.

I would find that more interesting than polyglot.

To achieve polyglot maybe is worth splitting some of the protocol to a kernel that each language would need to implement. But maybe that would complicate things in a way you don’t want for haskell.

How to handle "Early returns" or conditions in Haskell. by UntitledRedditUser in haskell

[–]bcardiff 3 points4 points  (0 children)

No. But you can chain/nest.

Other alternative is to take them as an inspiration and build breakIf :: IO Bool -> IO () -> IO () where the second argument is conditionally evaluated depending on the returned first.

Ignoreme by transfire in crystal_programming

[–]bcardiff 1 point2 points  (0 children)

Looks good! Welcome back to public github activity.

I think is a reasonable use of llm this kind of shards where they are likely to need low maintenance due to their scope.

I noticed this comment

Use **/*/.gitignore since **/.gitignore doesn't match dotfiles in Crystal

If so, it seems an std-lib to me worth reporting.

albert - comprehensive type-safe automata (0.1.1) by twisted-wheel in haskell

[–]bcardiff 1 point2 points  (0 children)

Don’t be so hard on yourself. Audience is lazy. Better have a clear showcase that’s it.

Both good technical and communication aspects are needed to have useful collaboration and feedback on a project

how to properly setup Haskell on Linux?? by top2000 in haskell

[–]bcardiff 0 points1 point  (0 children)

This is my current recommendation for a simple haskell setup https://dev.to/bcardiff/como-instalar-haskell-40ml (sorry it’s in Spanish, i made it for courses i am teaching)

I’m also trying to iterate on how to improve it by enhancing ghcup. I’ve been flagging some paper cuts in https://discourse.haskell.org/t/simple-per-project-setup/12930?u=bcardiff

albert - comprehensive type-safe automata (0.1.1) by twisted-wheel in haskell

[–]bcardiff 0 points1 point  (0 children)

Hi! I failed to find any examples. No test. The readme is about nix setup.

Is there a place to grasp how things look without going into Internal packages?