Readit News logoReadit News
thu commented on Typing 118 WPM broke my brain in the right ways   balaji-amg.surge.sh/blog/... · Posted by u/b0a04gl
thu · 7 months ago
I've started to learn touch typing many times, but don't use it. The main problem is that as soon as I want to touch type while working (e.g. coding), I only know the letters, but not the symbols, numbers or even uppercase letters. I think I can force keybr to add those, but they are not part of real world examples, while the words are natural enough. Is there any progressive way to introduce those just like keybr introduces 1 letter at a time ?
thu commented on German parliament votes as a Git contribution graph   abstimmung.eu/git/2024... · Posted by u/mxschll
nikeee · 9 months ago
There are also a repository containing some laws in markdown format on GitHub. They even used PRs for actual changes proposed by the parties in the parliament. Also, the commits have their proper date, so you can `git blame` on the laws and even see which president signed-off that change.

Sadly, it is unmaintained.

https://github.com/bundestag/gesetze

thu · 9 months ago
I maintain a web site where I re-render to HTML a scrapped version of the (consolidated version of) the Official Belgian Journal[0].

One of the nice thing about having an underlying structured representation of those texts is that I can also render them to e.g. Markdown[1].

I've experimented about generating the Markdown files corresponding to multiple versions (archives) of a given text and committing them to the same Git repository to be able to see diffs or blames[2].

I would like to assign the proper dates to each commit, but given there are texts in e.g. 1791, it's not possible.

0: https://refli.be/fr/lex 1: https://github.com/hypered/iterata-md 2: https://github.com/hypered/iterata-archive

thu commented on Rewriting my website in plain HTML and CSS   vijayp.dev/blog/rewrite-p... · Posted by u/arnath
uncheckederror · a year ago
I've been maintaining my personal website as plain HTML for five years now. I must say, I quite like this method. There's no substitute for practice when it comes to maintaining your skills at editing HTML and CSS.

Yes, you must copy and paste content and not having layout page is annoying at times. But the overhead of just doing it yourself is surprisingly small in terms of the time commitment.

Typically, I'll draft a post in MS Word then open the git repo for my site, hosted on github pages, duplicate and rename the template.html page that includes the CSS, footer, and header for my site and then copy my content into it. When I'm happy with everything, I'll make my commit and then a minute later it's live at my custom domain. Seeing that it takes only 11KBs and 26ms to load my landing page strangely delightful.

thu · a year ago
> you must copy and paste content

I've started the Slab templating language[0] to be able to define reusable HTML fragments. It means using a dedicated tool but hopefully not needing to resort to a real programming language.

0: https://slab-lang.org/

thu commented on Git and Jujutsu: In Miniature   lottia.net/notes/0013-git... · Posted by u/todsacerdoti
mitchellh · a year ago
When people find out I use jj (Jujutsu), I often get asked some version of "how's it better than Git?" And while I can list a number of reasons why I think it's better and you could argue whether or not that reason is contrived or not, I think it's all missing the point.

I think it's better -- in the most pessimistic case -- to look at jj as reframing how you think about branches and commits in the same way that learning a type of Lisp reframes your thinking even if you're a full time Python developer and have zero intention of ever using a Lisp.

The idea of shuffling commits around without fear, changing your working train of thought mid-branch, etc. is natural... mindless, even. It's one command away and you get so much muscle memory executing that command you just do it automatically. (There's no fear because `jj undo` undoes any operation you did if you regret it. Of course there a ways to undo N operations back and so on too).

I use jj full time now, but even when I periodically go back to using git (for older projects I don't have a jj clone out for), it has altered the way I look at my stream of work. I think there's value in that.

That's the pessimistic case. The optimistic case is you should be using jj because it's better and there's almost zero downside to doing it (your coworkers don't even need to know).

(This blog post was great, I just expect and already see some people focusing on the minutia of how to Git golf your way to achieving the same thing easily when that doesn't invalidate that jj is good, in my opinion).

thu · a year ago
What do you mean by "jj clone" ? I assumed it was possible to start using jj on an existing Git repository, and continue using Git (and jj) afterwards. Isn't this the case ?
thu commented on Show HN: Slab – A programmable markup language for generating HTML   slab-lang.org/... · Posted by u/thu
gxonatano · a year ago
You don't need to make your markup language programmable. Just write a library for a full-featured programming language which outputs the markup you want. Then you don't have to re-implement parameters, variables, loops, and such. See Lucid or Blaze in Haskell for good HTML DSLs. You can do more in one of those, combined with all the features of Haskell, than you can with Slab, Haml, Pug, or whatever else. And you don't need to write plugins for VSCode, Vim, Emacs, or whatever else just to edit it. See also Elm, which has an HTML DSL built in.
thu · a year ago
(OP here.) This is true to a good extend but a library such as blaze-html can't offer at least two things I've in mind. One is the very lightweight syntax. You can for instance have a look at the reference page source code[1]. Writing that in blaze-html is a lot more verbose.

Two, although it's possible to introspect a blaze-html -generated tree, you can't easily have tooling to, say, list HTML fragments, where they are used, which one are full HTML documents (i.e. starting with a doctype)... One of my goal with Slab is to have a "refactorable" language to write "large" HTML code bases (I'm mainly thinking of design systems reference implementations). Having a tool that can "see" the tree structure, the fragment calls, the list of files, ... opens new tooling opportunities.

I'm one of those people that says syntax doesn't matter; we should talk about semantic instead (and thus just adopt s-expressions for syntax). Yet, in this case, I think that a very lightweight syntax that maps clearly to HTML, in particular for non-programmers (e.g. designers), is very valuable.

Note also that I make available a statically-linked `slab` binary that makes super easy to start using Slab. You don't need a programming environment with a compiler and so on. (I'd like to try to create a Cosmopolitan[2] binary in the future.)

The `slab` binary also has a "watch" feature that rebuilds pages and reload the browse as you edit `.slab` files. I guess I mean that having an integrated tool can offer a very good developer (or designer ?) experience.

[1]: https://github.com/hypered/slab/blob/main/content/reference....

[2]: https://github.com/jart/cosmopolitan

thu commented on Show HN: Slab – A programmable markup language for generating HTML   slab-lang.org/... · Posted by u/thu
type0 · a year ago
similar project https://pugjs.org
thu · a year ago
(OP here.) Indeed, Slab is a templating language, just like Pug or Haml are. Slab was initially a reimplementation of Pug, but it evolved a bit.

In particular, I tried to respect a principle often found in programming languages: user-defined elements (fragments) are no different than builtin ones. For example notice how `page` (which is user-defined) is used in the same way as as `body` (which is builtin) in the first code snippet of the introduction[1].

(In the future, I hope that instead of providing builtins, Slab will instead use libraries of elements. There is an undocumented feature to define elements[2].)

In Pug, to reuse bits of HTML, you can define mixins, but they are called with a `+` sign in front of their name. I also believe mixins can have expression arguments, but not other blocks of HTML. To pass blocks of HTML as "arguments", Pug provides the `extends` keyword, but I think it can only be used at the toplevel of a template. In Slab, the concept of fragments is a bit more uniform: a fragment can be used with expression arguments, and block arguments.

[1]: https://slab-lang.org/reference.html#introduction

[2]: https://github.com/hypered/slab/blob/main/examples/el.slab

thu commented on Ask HN: Freelancer? Seeking freelancer? (July 2024)    · Posted by u/whoishiring
thu · a year ago
SEEKING WORK | Belgium | Remote & On-Site in Belgium

+15 years of professional experience mainly with Python

+4 years of hands-on technical leadership

I'd love to work with Haskell and Nix (my side projects use them), although I've been using Python professionally for about 10 years. I like to get my hands dirty and have always worked with things like CI/CD pipelines, provisioning VMs, and so on (for example, I've been using Docker since 2013). I'm used to complicated code bases that need serious improvement.

I've got a lot of side projects visible on GitHub at https://github.com/noteed/ and https://github.com/hypered/. One of them is https://slab-lang.org/.

Please contact me at noteed at gmail.com.

thu commented on The Shunting-Yard Algorithm (2011)   reedbeta.com/blog/the-shu... · Posted by u/todsacerdoti
thu · 2 years ago
I've used that algorithm and extended it to handle distfix expressions[1]. For instance it can parse the expression

    1 + if true then 1 else a b + c
as (represented as an s-expr using some weird angle brackets):

    ⟨+ 1 ⟨if␣then␣else␣ true 1 ⟨+ ⟨a b⟩ c⟩⟩⟩
I thought it was cool and could be useful to a lot of simple use cases.

[1]: https://github.com/noteed/syntactical

u/thu

KarmaCake day980April 14, 2010
About
Võ Minh Thu - @noteed

Looking for work (freelance, from Belgium).

I build https://refli.be on the side, and have some other projects, including e.g. https://slab-lang.org.

My GitHub profile: https://github.com/noteed/ — The one of my freelancing company: https://github.com/hypered/

[ my public key: https://keybase.io/thu; my proof: https://keybase.io/thu/sigs/JeP2OIWF199YvdBYLUCAFc-VpjpJA-XzgmwtxG85IaQ ]

View Original