Post ARdWFMoYNVn4aC4DD6 by outsidecontext@fosstodon.org
(DIR) More posts by outsidecontext@fosstodon.org
(DIR) Post #ARdWFMoYNVn4aC4DD6 by outsidecontext@fosstodon.org
2023-01-09T19:06:37Z
0 likes, 1 repeats
It has become kind of a habit that if I try a new programming language first thing is I interface it with the #MusicBrainz libdiscid library. libdiscid has a small API I know very well, using it in a new language and trying to provide a language typical interface for it teaches me some basics, and I can easily compare the language with other languages for which I did the same.Well, I looked at #harelang, and guess what I did?https://git.sr.ht/~phw/hare-discid
(DIR) Post #ARdWFOwQTDHBBBlWl6 by outsidecontext@fosstodon.org
2023-01-09T19:08:54Z
0 likes, 0 repeats
Hare is close enough to C that this is not really necessary, though. Accessing the C functions is straight forward. But there is a bit of cstring conversion and Hare typical error handling.
(DIR) Post #ARdWFRnJrWm41oWnTs by outsidecontext@fosstodon.org
2023-01-10T06:58:14Z
0 likes, 0 repeats
[1/2] Learning a new language by always doing the same small but real programming task you can finish in under a day, like I do it with the libdiscid libraries, can be a quick way of getting a feeling for the language and can teach you more then just the syntax:- How is code structured, e.g. with modules or packages?- How is documentation and testing handled?- How is the tooling in general?- How is code in this language installed and distributed?- How is the documentation?
(DIR) Post #ARdWFTUFZOi1HFcb2G by outsidecontext@fosstodon.org
2023-01-10T06:58:25Z
0 likes, 0 repeats
[2/2] Always doing the same for different languages also gives you a quick feeling for the language by comparison. And it gives you the good feeling of having done something real with the language instead of just artificial example code. Of course there is a lot missing and this can only be the first step if you really want to get into that language.
(DIR) Post #ARdXveAOLxeIW50RJg by torresjrjr@qoto.org
2023-01-14T14:43:24Z
0 likes, 0 repeats
@outsidecontext Nice, looks great and idiomatic for a new Hare project. Another one for the ecosystem.See also https://sr.ht/~vladh/hare-project-library/
(DIR) Post #ARdblURG4AxJGaJ7rc by outsidecontext@fosstodon.org
2023-01-14T15:26:22Z
0 likes, 0 repeats
@torresjrjr Thanks a lot of looking at my code. I'll consider submitting it to the hare-project-library. Not sure what category to put it in, maybe needs some general library category or such.
(DIR) Post #ARdrXLWU15dapM1re4 by torresjrjr@qoto.org
2023-01-14T18:23:07Z
0 likes, 0 repeats
@outsidecontext You can ask @vladh, the maintainer. I'd probably say the "file format" section, though he could maybe make more generic headings.