🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). Log available at irclogs.raku.org/raku/live.html . If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 6 September 2022.
uzl[m] I started playing around with parsing a binary file format (i.e., DBF III w/o memo file) with Raku, and well it ended up turning into an article. Since I've a bunch of code snippets in it, I figured it made sense to make the whole thing a module/program the reader could tinker with so that's what I'm doing. However I'm... (full message at <libera.ems.host/_matrix/media/v3/d...9ae9e>) 02:28
tbrowder__ uzl[m]: i couldn't get the link, but i am interested in binary parsing, esp. for getting 11:30
* 11:31
access to common Windows output files. David Warring has large coverage of PDF, but there are other things to look at. 11:33
i guess PDF is not quite binary... 11:34
moritz
.oO( ternary PDF )
13:40
Voldenet iirc pdf can be mostly plaintext 14:32
Voldenet but most pdfs use compressed streams 14:35
tbrowder__ ternary, good description 14:49
moritz: you and jj and some of the other published authors ought to join forces and publish a short book on beginning programming in raku for youngsters to compete with the similar books using (cough, cough) python 14:53
get them started young and see what happens 14:54
lizmat and yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2023/05/15/2023-20-so-survey/ 15:40
moritz tbrowder__: I don't really have energy for writing atm :-( 15:56
nor do I feel I'm doing a good job explaining things to beginners
Nemokosch there was zero interest in at least compiling the existing materials into an accessible maintained list, even 16:00
tonyo rf: is it possible to swap out the backend server in hummingbird? would you prefer a PR if i go down that route? 16:38
tellable6 tonyo, I'll pass your message to rf
tbrowder__ moritz: i understand, take care 19:48
Voldenet tonyo: iirc hummingbird is supposed to be exposed via reverse proxy in that case 19:49
not that it's technically impossible to write alternative Request.decode method even using native call 19:54
rf tonyo: Yes I would be interested in a PR if you'd be up to it :) 20:26
tellable6 2023-05-15T16:38:53Z #raku <tonyo> rf: is it possible to swap out the backend server in hummingbird? would you prefer a PR if i go down that route?
rf That was something I was debating about, I think it is valuable. At the moment the backend is fairly simple/naive
I designed request, response like that on purpose to potentially allow for this later, but since I couldn't find a Plack/Rack style library I just rolled it myself. 20:29
tonyo the way this is designed is very choice. my routes read a lot like fp that just _does the right thing_ 20:44
Voldenet: mostly interested in a non-single threaded option, an nginx proxy is OK
rf tonyo++ Excited to see what you come up with 20:45
tonyo can you expose the query string params list somewhere? looks like it exists for headers and params but not for query() 20:46
rf Yeah I ran into that yesterday, I'll put it in 20:47
tonyo: Pull down 2.1.5 20:53
uzl[m] tbrowder__: Do you mean my github gist link? It should be accessible to any one who has the link 22:02
I'm using element/matrix to connect the the libera channel and after looking at the logs, it seems most of my message got cut off lol 22:06
I started playing around with parsing a binary file format (i.e., DBF III w/o memo file) with Raku, and well it ended up turning into an article. Since I've a bunch of code snippets in it, I figured it made sense to make the whole thing a module/program the reader could tinker with so that's what I'm doing. 22:07
However I'm trying to make sure if this layout makes sense.
Right now, I've a Header class that represents the header. Within the header, there's a subsection called the field array descriptor which contains an array of fields but I moved that to its own Fields class.
Then I've the DBF class which is the entry point: it creates a handle from the path in :r and :bin mode, and then passes it to Header and Fields objects (the file pointer is being moved so the order matters). 22:08
Next would be reading the records.
Anyways... I know TMTOWTDI but I'm wondering if this code layout makes sense (please tag me if you respond to this, otherwise I might lose track of it).
LINK: gist.github.com/uzluisf/d732072075...dde1db71b3
gfldex: What does "ENODOC" mean? Iguess it means not documented but first coming across that term/acronym 😅 22:16
*first time 22:17
tbrowder__: ref book for beginners: I think Rosenfeld's "Think in Raku" does quite a nice job at that, or do you mean something more basic than that? 22:20
[Coke] Error, NO DOC umentation 22:24
e.g. www.gnu.org/software/libc/manual/h...Codes.html 22:25
ENOENT, ENOEXEC, ENODEV, ENOSPC, etc. 22:26
uzl[m] Thanks!!! Quite the list :)
tbrowder__ uzl[m]: ref the first link it didn't work for me, safari reported something about unable to get a secure connection...the last link did 23:43
ref book: much more basic. jmerelo's book '' is a fairly 23:45
good start for high school and older, but maybe not for most middle school kids. 23:46
tonyo rf++ danke! 23:52
uzl[m] tbrowder__: Probably something like "Python for Kids" (nostarch.com/python-kids-2nd-edition). I gotta admit it might've been the first book I read, even though I was already in highschool haha. I don't remember finishing it though 23:58