Warning: this is an htmlized version!
The original is here, and the conversion rules are here. |
-- This file: -- http://anggtwu.net/SUBTITLES/emacsconf2023-repls.lua.html -- http://anggtwu.net/SUBTITLES/emacsconf2023-repls.lua -- (find-angg "SUBTITLES/emacsconf2023-repls.lua") -- Author: Eduardo Ochs <eduardoochs@gmail.com> -- -- (defun l () (interactive) (find-angg "SUBTITLES/emacsconf2023-repls.lua")) -- (defun b () (interactive) (find-TH "emacsconf2023-repls")) -- (defun p () (interactive) (find-TH "{ee-subs-pagestem}")) -- (defun R () (interactive) (ee-recompile-SUBTITLES-0)) -- (defun r () (interactive) (ee-recompile-SUBTITLES-3)) -- (defun r () (interactive) (ee-recompile-SUBTITLES-1)) -- (define-key eev-mode-map (kbd "M-r") 'r) -- -- Skel: (find-subs-links "eev2023repls") -- Old: (find-editeevsubtitles-links-1 "eev2023repls") -- (find-efunction 'find-editeevsubtitles-links-1) -- Yttr: (find-yttranscript-links "eev2023repls" "IDBQo_YYfA8") -- Info: (find-1stclassvideo-links "eev2023repls") -- Play: (find-eev2023replsvideo "0:00") -- -- I use the code below to generate the subtitles in .vtt. -- ee_dofile "~/LUA/Subtitles.lua" -- (find-angg "LUA/Subtitles.lua") --[[ -- (find-angg "LUA/Subtitles.lua") ** Run the .lua and tell it to ** write the .vtt - by default in /tmp/ * * (eepitch-lua51) * (eepitch-kill) * (eepitch-lua51) dofile "emacsconf2023-repls.lua" sts = Subtitles.fromsexps(subs_bigstr):addtime("59:11") -- sts.lang = "pt-BR" = sts outfname = "$S/http/anggtwu.net/eev-videos/emacsconf2023-repls.vtt" outfname = "/tmp/emacsconf2023-repls.vtt" out = sts:vtt().."\n\n" ee_writefile(outfname, out) -- (find-fline "/tmp/emacsconf2023-repls.vtt") ** Test the .vtt ** (find-eev2023replsvideo "0:00") ** Select /tmp/ or ee-eevvideosdir ** (find-eevvideosfile "") ** (find-eevvideosfile "" "emacsconf2023-repls.mp4") ** (find-eevvideossh0 "cp -v emacsconf2023-repls.mp4 /tmp/") ** (code-video "eev2023replsvideo" "/tmp/emacsconf2023-repls.mp4") ** (code-video "eev2023replsvideo" "$S/http/anggtwu.net/eev-videos/emacsconf2023-repls.mp4") ** (find-eev2023replsvideo "0:00") ** Upload the emacsconf2023-repls.vtt ** to http://anggtwu.net/eev-videos/ * (eepitch-shell) * (eepitch-kill) * (eepitch-shell) cd /tmp/ scp emacsconf2023-repls.vtt $LINP/eev-videos/ scp emacsconf2023-repls.vtt $LINS/eev-videos/ Scp-np emacsconf2023-repls.vtt $TWUP/eev-videos/ Scp-np emacsconf2023-repls.vtt $TWUS/eev-videos/ ** Upload the subtitles to youtube ** http://www.youtube.com/watch?v=IDBQo_YYfA8 ** Check that the "psne subtitles" thing works ** (find-1stclassvideo-links "eev2023repls") --]] --[[ * (eepitch-lua51) * (eepitch-kill) * (eepitch-lua51) dofile "emacsconf2023-repls.lua" for li in subs_bigstr:gmatch("([^\n]+)") do local time,text = li:match('^.-"(.-)".-"(.*)"%)$') text = text:gsub("\\(.)", "%1") if time then print(" "..time.." "..text) end end --]] subs_bigstr = [==[ % (find-eev2023replsvideo "00:00" "Hi! My name is Eduardo Ochs") % (find-eev2023replsvideo "00:02" "and the title of this talk is: REPLs") % (find-eev2023replsvideo "00:05" "in strange places - Lua, LateX, LPeg, LPegRex,") % (find-eev2023replsvideo "00:09" "and TikZ. I'm the author of an Emacs") % (find-eev2023replsvideo "00:12" "package called eev, and this is a talk") % (find-eev2023replsvideo "00:15" "at the EmacsConf 2023, that is happening in") % (find-eev2023replsvideo "00:18" "December 2023, at the internets.") % (find-eev2023replsvideo "00:20" "And this is one of the") % (find-eev2023replsvideo "00:23" "examples of diagrams that we are") % (find-eev2023replsvideo "00:25" "going to see - let me show how I generate") % (find-eev2023replsvideo "00:27" "it... one second,") % (find-eev2023replsvideo "00:30" "I have to use a smaller font here...") % (find-eev2023replsvideo "00:34" "this is a file called ParseTree2.lua...") % (find-eev2023replsvideo "00:39" "let me go back to this block of tests again...") % (find-eev2023replsvideo "00:42" "and now if I run") % (find-eev2023replsvideo "00:44" "this...") % (find-eev2023replsvideo "00:46" "we get these outputs here at the") % (find-eev2023replsvideo "00:51" "right, and then in this line here it") % (find-eev2023replsvideo "00:53" "generates a PDF, and if I type f8 here it") % (find-eev2023replsvideo "00:58" "shows the PDF in the lower right window.") % (find-eev2023replsvideo "01:03" "Let me start by explaining") % (find-eev2023replsvideo "01:06" "briefly what is eev.") % (find-eev2023replsvideo "01:08" "First: it is something that") % (find-eev2023replsvideo "01:12" "appeared by accident in the mid-90s - I") % (find-eev2023replsvideo "01:14" "explained this story in my") % (find-eev2023replsvideo "01:16" "presentation at the EmacsConf 2019...") % (find-eev2023replsvideo "01:20" "it's a package... it's an Emacs") % (find-eev2023replsvideo "01:23" "package that is part of ELPA... it has at") % (find-eev2023replsvideo "01:26" "least 10 users - those are the ones") % (find-eev2023replsvideo "01:30" "that I know by name...") % (find-eev2023replsvideo "01:32" "eev means `emacs-execute-verbosely'...") % (find-eev2023replsvideo "01:37" "eev is something that treats eval-last-sexp") % (find-eev2023replsvideo "01:41" "as the central feature of Emacs...") % (find-eev2023replsvideo "01:43" "eev blurs the distinction between") % (find-eev2023replsvideo "01:45" "programmers and users, and it replaces") % (find-eev2023replsvideo "01:48" "the slogan \"users should not be forced to") % (find-eev2023replsvideo "01:51" "see Lisp\", that is something that Richard") % (find-eev2023replsvideo "01:54" "Stallman told me once, by \"users should see") % (find-eev2023replsvideo "01:57" "Lisp instead of buttons\" and \"new users") % (find-eev2023replsvideo "02:00" "should see Lisp in the first 5 minutes\"...") % (find-eev2023replsvideo "02:03" "I'm going to show") % (find-eev2023replsvideo "02:05" "some examples of that soon.") % (find-eev2023replsvideo "02:07" "Eev uses code in comments a lot,") % (find-eev2023replsvideo "02:11" "and also tests in comments...") % (find-eev2023replsvideo "02:13" "I changed my way of presenting it") % (find-eev2023replsvideo "02:16" "and it became very REPL-centric") % (find-eev2023replsvideo "02:18" "in the last few years, in the") % (find-eev2023replsvideo "02:21" "sense that I start by explaining its") % (find-eev2023replsvideo "02:24" "main features by its support for REPLs...") % (find-eev2023replsvideo "02:28" "eev supposes") % (find-eev2023replsvideo "02:30" "that we want to keep") % (find-eev2023replsvideo "02:32" "executable notes of everything - I'm also") % (find-eev2023replsvideo "02:35" "going to show examples of this in a") % (find-eev2023replsvideo "02:37" "second... eev has lots of \"videos for") % (find-eev2023replsvideo "02:40" "people who hate videos\", and it tries to") % (find-eev2023replsvideo "02:43" "do everything with very little magic and") % (find-eev2023replsvideo "02:46" "without black boxes - I'm going to explain") % (find-eev2023replsvideo "02:48" "many of these things very soon.") % (find-eev2023replsvideo "02:51" "This is a figure that that I'm going") % (find-eev2023replsvideo "02:55" "to show in details soon, that is") % (find-eev2023replsvideo "02:58" "about something important about Lua...") % (find-eev2023replsvideo "03:01" "the font is very bad now, so let me") % (find-eev2023replsvideo "03:04" "change the font... the figure is this one...") % (find-eev2023replsvideo "03:07" "and...") % (find-eev2023replsvideo "03:09" "what most people do when they") % (find-eev2023replsvideo "03:12" "visit a file with something") % (find-eev2023replsvideo "03:14" "interesting on it is that they just go") % (find-eev2023replsvideo "03:16" "there and they set a bookmark there, or") % (find-eev2023replsvideo "03:18" "they put the position in a register...") % (find-eev2023replsvideo "03:21" "but I prefer to keep") % (find-eev2023replsvideo "03:26" "links to everything that is interesting") % (find-eev2023replsvideo "03:29" "as elisp hyperlinks. So, for example, this is") % (find-eev2023replsvideo "03:31" "an elisp hyperlink to a file, that goes") % (find-eev2023replsvideo "03:34" "to this anchor here, and to this string") % (find-eev2023replsvideo "03:37" "after this anchor... this is a variant") % (find-eev2023replsvideo "03:41" "that opens that file in the window") % (find-eev2023replsvideo "03:44" "at the right -") % (find-eev2023replsvideo "03:46" "here... and this is") % (find-eev2023replsvideo "03:50" "a sexp that changes the font. I") % (find-eev2023replsvideo "03:53" "have a command with a very short name") % (find-eev2023replsvideo "03:56" "that does that, but I") % (find-eev2023replsvideo "03:58" "prefer to keep that as a one-liner.") % (find-eev2023replsvideo "04:03" "About the videos... we can see") % (find-eev2023replsvideo "04:07" "the list of first-class videos of eev") % (find-eev2023replsvideo "04:09" "by executing this, M-x find-1stclassvideos,") % (find-eev2023replsvideo "04:13" "or by running this alias here, M-x 1c...") % (find-eev2023replsvideo "04:16" "and then what we see is this...") % (find-eev2023replsvideo "04:19" "the first sexp here") % (find-eev2023replsvideo "04:24" "regenerates this buffer - so we can make a") % (find-eev2023replsvideo "04:27" "mess here and then run this and the") % (find-eev2023replsvideo "04:29" "original buffer is regenerated again in") % (find-eev2023replsvideo "04:32" "a clean way...") % (find-eev2023replsvideo "04:33" "each of these things here") % (find-eev2023replsvideo "04:38" "opens a buffer with information about") % (find-eev2023replsvideo "04:40" "a video... let me take a specific") % (find-eev2023replsvideo "04:43" "example here... this video here is about") % (find-eev2023replsvideo "04:48" "one of the ancestors of this talk, that") % (find-eev2023replsvideo "04:51" "is a library that I wrote") % (find-eev2023replsvideo "04:54" "for creating diagrams in LaTeX using") % (find-eev2023replsvideo "04:58" "a package called Pict2e using REPLs...") % (find-eev2023replsvideo "05:04" "anyway...") % (find-eev2023replsvideo "05:05" "the thing is that if we") % (find-eev2023replsvideo "05:09" "run a sexp like this one and we don't") % (find-eev2023replsvideo "05:12" "have a local copy of the video eev") % (find-eev2023replsvideo "05:15" "will try to download to the local copy -") % (find-eev2023replsvideo "05:17" "and instead of doing that by asking") % (find-eev2023replsvideo "05:20" "something like \"do you want me") % (find-eev2023replsvideo "05:21" "to download the local copy? Blah") % (find-eev2023replsvideo "05:23" "blah blah blah blah...\" it simply opens a") % (find-eev2023replsvideo "05:27" "buffer like this, I mean, if we don't") % (find-eev2023replsvideo "05:30" "have a local copy yet it will open a") % (find-eev2023replsvideo "05:33" "buffer like this one, in which these") % (find-eev2023replsvideo "05:37" "things here in comments are links to the") % (find-eev2023replsvideo "05:40" "documentation... I mean, this thing here") % (find-eev2023replsvideo "05:44" "explains the idea of local copies") % (find-eev2023replsvideo "05:46" "of files from the internet...") % (find-eev2023replsvideo "05:48" "there are more details here, and here...") % (find-eev2023replsvideo "05:52" "and this is a script that we") % (find-eev2023replsvideo "05:57" "can execute line by line, so instead of") % (find-eev2023replsvideo "06:00" "this script being hidden behind the") % (find-eev2023replsvideo "06:03" "button that we just press after a") % (find-eev2023replsvideo "06:06" "question like \"Do you want me to do") % (find-eev2023replsvideo "06:08" "something blah blah blah? Yes or no?\"") % (find-eev2023replsvideo "06:11" "the script is visible here and we can") % (find-eev2023replsvideo "06:13" "execute it step by step... it creates a") % (find-eev2023replsvideo "06:17" "terminal with a shell here in the") % (find-eev2023replsvideo "06:20" "right window, and when we type f8 in") % (find-eev2023replsvideo "06:24" "one of these lines here the lines are") % (find-eev2023replsvideo "06:27" "sent... (...) so this is going") % (find-eev2023replsvideo "06:31" "to download a copy of the video... the") % (find-eev2023replsvideo "06:34" "wget says that I already have a copy of") % (find-eev2023replsvideo "06:36" "the video and its subtitles... and so on.") % (find-eev2023replsvideo "06:40" "And after getting a copy of the video") % (find-eev2023replsvideo "06:43" "we can run this sexp here and it displays") % (find-eev2023replsvideo "06:47" "the video.") % (find-eev2023replsvideo "06:51" "I said that eev has lots of") % (find-eev2023replsvideo "06:55" "\"videos for people who hate videos\", and") % (find-eev2023replsvideo "06:58" "the idea is that very few") % (find-eev2023replsvideo "07:00" "people are going to watch the videos in") % (find-eev2023replsvideo "07:02" "real time... and most of the people that") % (find-eev2023replsvideo "07:05" "I know - or: most of the people that") % (find-eev2023replsvideo "07:07" "are interested in eev in some") % (find-eev2023replsvideo "07:10" "way... they are going to watch just") % (find-eev2023replsvideo "07:13" "small sections of the video, and most of") % (find-eev2023replsvideo "07:16" "the time they're just going to read the") % (find-eev2023replsvideo "07:17" "subtitles of the video. So, for each") % (find-eev2023replsvideo "07:20" "one of the videos we have a page") % (find-eev2023replsvideo "07:24" "about the video... let me see if I") % (find-eev2023replsvideo "07:27" "have internet here... yes. This is a") % (find-eev2023replsvideo "07:31" "page...") % (find-eev2023replsvideo "07:34" "and usually these pages have a link") % (find-eev2023replsvideo "07:37" "to another page that") % (find-eev2023replsvideo "07:40" "has all the subtitles of the") % (find-eev2023replsvideo "07:43" "video... uh, wherever... in this one") % (find-eev2023replsvideo "07:46" "it's not so visible...") % (find-eev2023replsvideo "07:48" "but anyway, there are several") % (find-eev2023replsvideo "07:50" "ways of accessing the subtitles of the") % (find-eev2023replsvideo "07:52" "video, and one of the ways is by running") % (find-eev2023replsvideo "07:56" "this sexp here,") % (find-eev2023replsvideo "07:58" "that opens a file in Lua that is") % (find-eev2023replsvideo "08:01" "what I use to generate the") % (find-eev2023replsvideo "08:04" "subtitles.") % (find-eev2023replsvideo "08:05" "Anyway... by the way, these things... each") % (find-eev2023replsvideo "08:09" "one of these things here is a hyperlink") % (find-eev2023replsvideo "08:12" "to a position of the video, so if I type") % (find-eev2023replsvideo "08:15" "this the right way it goes to that") % (find-eev2023replsvideo "08:19" "position. Anyway, let me go back...") % (find-eev2023replsvideo "08:22" "also, the tutorials of eev... the") % (find-eev2023replsvideo "08:27" "\"intros\" of eev, that start with \"find-\" and") % (find-eev2023replsvideo "08:31" "end with \"-intro\", they have lots of blocks") % (find-eev2023replsvideo "08:34" "that say \"[Video links:]\", like this one, and") % (find-eev2023replsvideo "08:38" "these blocks have links to positions") % (find-eev2023replsvideo "08:41" "in videos, and if we don't have a local") % (find-eev2023replsvideo "08:44" "copy of the video yet the thing shows") % (find-eev2023replsvideo "08:47" "us a script that lets us download the") % (find-eev2023replsvideo "08:49" "local copy.") % (find-eev2023replsvideo "08:51" "Anyway, I said that I was going") % (find-eev2023replsvideo "08:54" "to explain what I mean by \"magic\" and") % (find-eev2023replsvideo "08:58" "\"black boxes\".") % (find-eev2023replsvideo "09:01" "this is something that I've been") % (find-eev2023replsvideo "09:03" "trying to explain for a long time, and I") % (find-eev2023replsvideo "09:04" "think that I got a very good explanation") % (find-eev2023replsvideo "09:07" "about that in a video that I made") % (find-eev2023replsvideo "09:09" "about something called eev-wconfig, that") % (find-eev2023replsvideo "09:12" "is a tool for configuring eev on") % (find-eev2023replsvideo "09:16" "Windows without \"magic\" - without buttons") % (find-eev2023replsvideo "09:18" "that do things without explaining what") % (find-eev2023replsvideo "09:22" "they're doing.") % (find-eev2023replsvideo "09:23" "This is a part of the subtitles") % (find-eev2023replsvideo "09:26" "of the video, let me read that...") % (find-eev2023replsvideo "09:29" "eev-wconfig is an attempt to solve the") % (find-eev2023replsvideo "09:32" "problem of how to install these things") % (find-eev2023replsvideo "09:34" "on Windows both without magic and with") % (find-eev2023replsvideo "09:37" "very little") % (find-eev2023replsvideo "09:38" "magic. Remember this slogan: \"any") % (find-eev2023replsvideo "09:41" "sufficiently advanced technology is") % (find-eev2023replsvideo "09:44" "indistinguishable from") % (find-eev2023replsvideo "09:46" "magic\". Here in this video I'm going to") % (find-eev2023replsvideo "09:48" "use the term magic as a shorthand") % (find-eev2023replsvideo "09:52" "for sufficiently advanced technology,") % (find-eev2023replsvideo "09:55" "that is something that is complex and") % (find-eev2023replsvideo "09:57" "non-obvious and that is") % (find-eev2023replsvideo "10:00" "indistinguishable from magic in the") % (find-eev2023replsvideo "10:02" "sense of being almost impossible to") % (find-eev2023replsvideo "10:04" "understand. And I'm also going to use a") % (find-eev2023replsvideo "10:07" "the term \"black box\" as a near-synonym for") % (find-eev2023replsvideo "10:10" "magic, and sometimes the term") % (find-eev2023replsvideo "10:13" "\"black box\" is more convenient even though") % (find-eev2023replsvideo "10:15" "it's a bit longer - it has more") % (find-eev2023replsvideo "10:17" "letters - because when I use the term") % (find-eev2023replsvideo "10:20" "black box it invites us to use") % (find-eev2023replsvideo "10:22" "expressions like \"opening the black box\",") % (find-eev2023replsvideo "10:25" "and I'm going to use that") % (find-eev2023replsvideo "10:26" "expression a lot.") % (find-eev2023replsvideo "10:34" "Now let me try to explain what is...") % (find-eev2023replsvideo "10:37" "sorry, let me change the font...") % (find-eev2023replsvideo "10:43" "what is Lua. Lua is a minimalistic") % (find-eev2023replsvideo "10:47" "language, in the sense of") % (find-eev2023replsvideo "10:50" "\"batteries not included\"... it uses") % (find-eev2023replsvideo "10:53" "associative tables for most of its data") % (find-eev2023replsvideo "10:56" "structures...") % (find-eev2023replsvideo "10:58" "and it is so minimalistic") % (find-eev2023replsvideo "11:00" "that its default print function, when") % (find-eev2023replsvideo "11:03" "we tell... when we create an associative") % (find-eev2023replsvideo "11:07" "table and we ask it to print...") % (find-eev2023replsvideo "11:10" "when we ask \"print\" to print an") % (find-eev2023replsvideo "11:13" "associative table it just prints the") % (find-eev2023replsvideo "11:15" "address of the table. Here are some") % (find-eev2023replsvideo "11:18" "examples... here is a table, and when we") % (find-eev2023replsvideo "11:22" "ask \"print\" to print it it just says") % (find-eev2023replsvideo "11:24" "that it's the table at this address here.") % (find-eev2023replsvideo "11:27" "So, one of things that that most") % (find-eev2023replsvideo "11:30" "people do when they start using Lua is") % (find-eev2023replsvideo "11:32" "that either they download a package with") % (find-eev2023replsvideo "11:35" "a pretty-printing function or they write") % (find-eev2023replsvideo "11:37" "their own pretty-printing functions. My") % (find-eev2023replsvideo "11:39" "own pretty-printing function is called") % (find-eev2023replsvideo "11:41" "PP, with upper case letters, and it works") % (find-eev2023replsvideo "11:45" "like this...") % (find-eev2023replsvideo "11:46" "and it prints associative tables") % (find-eev2023replsvideo "11:50" "in a way like this. It says that for") % (find-eev2023replsvideo "11:53" "the key 1 the the value associated to") % (find-eev2023replsvideo "11:56" "it is 2, for the key 2 the value is") % (find-eev2023replsvideo "11:58" "3, and for the key 3 the value is 5.") % (find-eev2023replsvideo "12:07" "When I started using Lua one of my") % (find-eev2023replsvideo "12:11" "favorite languages was also a language") % (find-eev2023replsvideo "12:13" "that used associative tables a lot -") % (find-eev2023replsvideo "12:15" "it was called Icon...") % (find-eev2023replsvideo "12:17" "and I had to write my own") % (find-eev2023replsvideo "12:20" "pretty-printing functions for Icon, so") % (find-eev2023replsvideo "12:24" "I just had to port my pretty-printing") % (find-eev2023replsvideo "12:27" "functions to Lua... and my first") % (find-eev2023replsvideo "12:29" "version looked at something like this... it") % (find-eev2023replsvideo "12:32" "just had some some global functions... lots") % (find-eev2023replsvideo "12:35" "of them, actually...") % (find-eev2023replsvideo "12:38" "and after a while I rewrote it, and I") % (find-eev2023replsvideo "12:42" "rewrote it again, and again, and again, and") % (find-eev2023replsvideo "12:44" "this is one of the versions of that,") % (find-eev2023replsvideo "12:47" "is not even the default at this") % (find-eev2023replsvideo "12:49" "point...") % (find-eev2023replsvideo "12:51" "\"Tos\" is for \"to string\"...") % (find-eev2023replsvideo "12:55" "and this is a demo...") % (find-eev2023replsvideo "12:59" "it's very modular, so it's easy to replace") % (find-eev2023replsvideo "13:01" "parts of it, or to toggle flags... and this") % (find-eev2023replsvideo "13:05" "is an example. If I try to print the") % (find-eev2023replsvideo "13:08" "table of methods for a certain") % (find-eev2023replsvideo "13:10" "class... I will need a smaller font...") % (find-eev2023replsvideo "13:14" "it prints the table like this, with the") % (find-eev2023replsvideo "13:16" "names of the methods and then links to") % (find-eev2023replsvideo "13:19" "the source code of the functions...") % (find-eev2023replsvideo "13:22" "these links only make sense in Emacs and") % (find-eev2023replsvideo "13:24" "in eev...") % (find-eev2023replsvideo "13:26" "and when we run a link like this one...") % (find-eev2023replsvideo "13:29" "it shows the source code in the") % (find-eev2023replsvideo "13:32" "window at the right. So, for some") % (find-eev2023replsvideo "13:35" "functions the source code is three lines,") % (find-eev2023replsvideo "13:37" "for other ones it's one line... and") % (find-eev2023replsvideo "13:41" "whatever. Anyway, let me go") % (find-eev2023replsvideo "13:44" "back... Lua can be used in many different") % (find-eev2023replsvideo "13:47" "styles... most people hate other people's") % (find-eev2023replsvideo "13:50" "styles... when I started using it in the") % (find-eev2023replsvideo "13:54" "year 2000 I learned most of the basic") % (find-eev2023replsvideo "13:57" "language in a single day - it was very") % (find-eev2023replsvideo "13:59" "similar to things that I was already") % (find-eev2023replsvideo "14:01" "using... and then I rewrote the the mini-") % (find-eev2023replsvideo "14:06" "language that I was using to") % (find-eev2023replsvideo "14:08" "generate the HTML for my pages") % (find-eev2023replsvideo "14:13" "in Lua... actually I had to rewrite it") % (find-eev2023replsvideo "14:16" "many times, but the first version I") % (find-eev2023replsvideo "14:18" "certainly did in my first weeks or first") % (find-eev2023replsvideo "14:21" "months using Lua...") % (find-eev2023replsvideo "14:23" "In the beginning I was just using") % (find-eev2023replsvideo "14:27" "it for writing programs that either") % (find-eev2023replsvideo "14:30" "didn't take any input at all - because") % (find-eev2023replsvideo "14:32" "the input was already in the source file -") % (find-eev2023replsvideo "14:35" "or that worked as Unix programs,") % (find-eev2023replsvideo "14:39" "that would read files") % (find-eev2023replsvideo "14:42" "and process these files in some way") % (find-eev2023replsvideo "14:44" "and output something.") % (find-eev2023replsvideo "14:47" "I mentioned the \"basic language\" here...") % (find-eev2023replsvideo "14:51" "I only learned how to use closures,") % (find-eev2023replsvideo "14:54" "metatables, and coroutines many years later...") % (find-eev2023replsvideo "14:59" "in the beginning, when I started using Lua,") % (find-eev2023replsvideo "15:01" "it didn't have a package manager...") % (find-eev2023replsvideo "15:03" "it appeared later, it is called") % (find-eev2023replsvideo "15:05" "Luarocks... it has had this package") % (find-eev2023replsvideo "15:09" "manager for several years, most") % (find-eev2023replsvideo "15:13" "of the rocks for Luarocks are poorly") % (find-eev2023replsvideo "15:15" "documented and hacker-unfriendly,") % (find-eev2023replsvideo "15:18" "so you can't rely just on the") % (find-eev2023replsvideo "15:21" "documentation and you can't rely just on the") % (find-eev2023replsvideo "15:23" "source code, because, I mean... if you are") % (find-eev2023replsvideo "15:26" "a genius of course you can, but for") % (find-eev2023replsvideo "15:29" "people who are either lazy, or dumb, or") % (find-eev2023replsvideo "15:32" "whatever, like me, or unfocused...") % (find-eev2023replsvideo "15:34" "the source code is hard to") % (find-eev2023replsvideo "15:37" "understand and hard to tinker with.") % (find-eev2023replsvideo "15:40" "Some rocks are excellent. The") % (find-eev2023replsvideo "15:43" "best rocks are well documented") % (find-eev2023replsvideo "15:45" "but they are hacker-unfriendly") % (find-eev2023replsvideo "15:47" "in a sense that I hope that") % (find-eev2023replsvideo "15:50" "I'll be able to explain soon.") % (find-eev2023replsvideo "15:52" "The best rocks use local") % (find-eev2023replsvideo "15:56" "variables and metatables a lot -") % (find-eev2023replsvideo "15:59" "so if you are beginner") % (find-eev2023replsvideo "16:02" "learning Lua you're not going to") % (find-eev2023replsvideo "16:04" "understand what their source code do...") % (find-eev2023replsvideo "16:06" "they use lots of dirty tricks.") % (find-eev2023replsvideo "16:09" "Let me talk a bit about object") % (find-eev2023replsvideo "16:12" "orientation in Lua. It can be done in") % (find-eev2023replsvideo "16:15" "many ways...") % (find-eev2023replsvideo "16:16" "the main book about Lua, called") % (find-eev2023replsvideo "16:19" "\"Programming in Lua\", by one of the authors") % (find-eev2023replsvideo "16:21" "of the language, Roberto Ierusalimschy,") % (find-eev2023replsvideo "16:23" "presents several ways of doing") % (find-eev2023replsvideo "16:26" "object orientation in Lua... I hated all") % (find-eev2023replsvideo "16:30" "of these ways - and also the ways that I") % (find-eev2023replsvideo "16:32" "tried from the rocks.") % (find-eev2023replsvideo "16:34" "And then I wrote my own way") % (find-eev2023replsvideo "16:38" "of doing object orientation in Lua... it's") % (find-eev2023replsvideo "16:40" "very minimalistic, it's in this file here,") % (find-eev2023replsvideo "16:43" "eoo.lua... the main code is just this five") % (find-eev2023replsvideo "16:48" "lines here...") % (find-eev2023replsvideo "16:49" "and here's an example of how it works.") % (find-eev2023replsvideo "16:55" "Here we define the class Vector,") % (find-eev2023replsvideo "16:59" "with some metamethods...") % (find-eev2023replsvideo "17:01" "this metamethod here will tell Lua") % (find-eev2023replsvideo "17:04" "what to do when the") % (find-eev2023replsvideo "17:08" "user asks to add two vectors, this one") % (find-eev2023replsvideo "17:12" "here tells Lua what to do when the user") % (find-eev2023replsvideo "17:15" "asks Lua to convert a vector to a string,") % (find-eev2023replsvideo "17:18" "and... whatever, this one is") % (find-eev2023replsvideo "17:21" "something that I'm going to explain in a") % (find-eev2023replsvideo "17:24" "second. So, here we create a vector with") % (find-eev2023replsvideo "17:27" "these coordinates, 3 and 4... here we create") % (find-eev2023replsvideo "17:30" "another Vector... if we \"print\" here then Lua") % (find-eev2023replsvideo "17:33" "uses this function here, in the __tostring...") % (find-eev2023replsvideo "17:37" "if we add the two vectors it uses this") % (find-eev2023replsvideo "17:39" "function here, in the __add metamethod, and") % (find-eev2023replsvideo "17:43" "if we run the method :norm...") % (find-eev2023replsvideo "17:46" "it is defined here, in the table __index.") % (find-eev2023replsvideo "17:52" "Anyway...") % (find-eev2023replsvideo "18:00" "Even this thing being so small I used") % (find-eev2023replsvideo "18:02" "to forget how its innards worked all") % (find-eev2023replsvideo "18:04" "the time. Actually I always forget how") % (find-eev2023replsvideo "18:08" "things work and I have to remember them") % (find-eev2023replsvideo "18:09" "somehow... and I have to have") % (find-eev2023replsvideo "18:12" "tricks for remembering, and tricks for") % (find-eev2023replsvideo "18:16" "summarizing things, and diagrams, and so") % (find-eev2023replsvideo "18:19" "on. And every time that I forgot how this") % (find-eev2023replsvideo "18:22" "thing worked I went back to the") % (find-eev2023replsvideo "18:24" "source code, and then I looked at the") % (find-eev2023replsvideo "18:26" "diagrams... or, of course, in the") % (find-eev2023replsvideo "18:29" "first times I had to draw the diagrams...") % (find-eev2023replsvideo "18:32" "and I run the examples, and of course in") % (find-eev2023replsvideo "18:35" "in the beginning I thought that the code") % (find-eev2023replsvideo "18:36" "was clear and my examples were very") % (find-eev2023replsvideo "18:38" "brief, and so I had to rewrite the") % (find-eev2023replsvideo "18:40" "examples many times until they became,") % (find-eev2023replsvideo "18:45" "let's say...") % (find-eev2023replsvideo "18:47" "perfect.") % (find-eev2023replsvideo "18:49" "I was saying that Lua can be used in") % (find-eev2023replsvideo "18:52" "many ways, and in my way of using Lua - in") % (find-eev2023replsvideo "18:56" "my favorite way - everything can be") % (find-eev2023replsvideo "18:58" "inspected and modified from REPLs,") % (find-eev2023replsvideo "19:02" "like we can do in Emacs and in SmallTalk,") % (find-eev2023replsvideo "19:05" "or sort of. So, in my") % (find-eev2023replsvideo "19:08" "favorite way of using Lua there's no") % (find-eev2023replsvideo "19:10" "security at all, everything can be") % (find-eev2023replsvideo "19:12" "changed at all times.") % (find-eev2023replsvideo "19:16" "Of course most people hate that...") % (find-eev2023replsvideo "19:19" "My init file has lots of classes... by the") % (find-eev2023replsvideo "19:23" "way, instead of keeping many small files") % (find-eev2023replsvideo "19:26" "with many things I put lots of stuff") % (find-eev2023replsvideo "19:28" "in just one big init file.") % (find-eev2023replsvideo "19:31" "My init file has lots of classes,") % (find-eev2023replsvideo "19:35" "and lots of global functions, and") % (find-eev2023replsvideo "19:37" "lots of cruft - and people hate that,") % (find-eev2023replsvideo "19:40" "of course. This is an example...") % (find-eev2023replsvideo "19:43" "this is the index at the top") % (find-eev2023replsvideo "19:46" "of my init file,") % (find-eev2023replsvideo "19:49" "the classes start here, and then") % (find-eev2023replsvideo "19:54" "we have some functions, and") % (find-eev2023replsvideo "19:58" "then we have functions that load") % (find-eev2023replsvideo "20:01" "certain packages, and then we have... cruft.") % (find-eev2023replsvideo "20:04" "Whatever.") % (find-eev2023replsvideo "20:05" "Most people think that my style") % (find-eev2023replsvideo "20:07" "of using Lua is dirty, and dangerous...") % (find-eev2023replsvideo "20:10" "and they wouldn't touch my Lua code") % (find-eev2023replsvideo "20:12" "with a 10 feet pole... but most of the") % (find-eev2023replsvideo "20:16" "things that I'm going to present here in") % (find-eev2023replsvideo "20:18" "this presentation are ideas that should") % (find-eev2023replsvideo "20:20" "be easy to port to other environments") % (find-eev2023replsvideo "20:23" "and other languages, especially the") % (find-eev2023replsvideo "20:25" "diagrams... so the code is not so important.") % (find-eev2023replsvideo "20:30" "Now let me talk a bit about LuaLaTeX,") % (find-eev2023replsvideo "20:33" "that is LaTeX with a Lua interpreter") % (find-eev2023replsvideo "20:36" "embedded inside, and two ways") % (find-eev2023replsvideo "20:40" "of generating pictures in LaTeX: TikZ,") % (find-eev2023replsvideo "20:43" "that is very famous, and Pict2e, that is not") % (find-eev2023replsvideo "20:46" "very famous and that is very low level...") % (find-eev2023replsvideo "20:49" "and I think that not many people use it.") % (find-eev2023replsvideo "20:52" "I said before that when I") % (find-eev2023replsvideo "20:56" "learned Lua I realized that it was") % (find-eev2023replsvideo "20:59" "very good for writing little") % (find-eev2023replsvideo "21:01" "languages. I was doing my PhD at the") % (find-eev2023replsvideo "21:04" "time and typesetting the diagrams for") % (find-eev2023replsvideo "21:08" "my PhD thesis was very boring, so") % (find-eev2023replsvideo "21:11" "one of the things that I did was that I") % (find-eev2023replsvideo "21:13" "created a little language for typesetting") % (find-eev2023replsvideo "21:16" "the diagrams for me. it was") % (find-eev2023replsvideo "21:19" "called Dednat because initially") % (find-eev2023replsvideo "21:22" "it only generated diagrams for") % (find-eev2023replsvideo "21:25" "Natural Deduction, and then it had") % (find-eev2023replsvideo "21:27" "several versions...") % (find-eev2023replsvideo "21:28" "these are the slides for my") % (find-eev2023replsvideo "21:32" "presentation about Dednat6... \"Dednat6 is") % (find-eev2023replsvideo "21:35" "an extensible semi-preprocessor for") % (find-eev2023replsvideo "21:38" "LuaLaTeX that understands diagrams in") % (find-eev2023replsvideo "21:41" "ASCII art\"... in the sense that when I have") % (find-eev2023replsvideo "21:46" "a .tex file that has this, and when") % (find-eev2023replsvideo "21:50" "Dednat6 is loaded,") % (find-eev2023replsvideo "21:52" "when I give the right commands") % (find-eev2023replsvideo "21:54" "Dednat6 interprets this block here as") % (find-eev2023replsvideo "21:59" "something that defines this") % (find-eev2023replsvideo "22:01" "diagram... oops, sorry, it interprets this") % (find-eev2023replsvideo "22:07" "diagram here, this diagram in") % (find-eev2023replsvideo "22:10" "comments here, as something that defines") % (find-eev2023replsvideo "22:13" "a diagram called foo... a deduction called") % (find-eev2023replsvideo "22:16" "foo, and it generates this code here...") % (find-eev2023replsvideo "22:20" "so that we can just invoke") % (find-eev2023replsvideo "22:23" "the definition of the") % (find-eev2023replsvideo "22:27" "deduction by typing \\ded{foo}.") % (find-eev2023replsvideo "22:31" "And Dednat6 also") % (find-eev2023replsvideo "22:34" "supports another language for typesetting") % (find-eev2023replsvideo "22:37" "bidimensional diagrams with") % (find-eev2023replsvideo "22:40" "arrows and stuff for category Theory and") % (find-eev2023replsvideo "22:42" "blah blah blah... the specifications of") % (find-eev2023replsvideo "22:45" "these diagrams look like this...") % (find-eev2023replsvideo "22:47" "here is a... sorry, here is a very good") % (find-eev2023replsvideo "22:54" "example, this is a huge diagram...") % (find-eev2023replsvideo "22:58" "sorry, one second...") % (find-eev2023replsvideo "22:59" "so, the source code that generates") % (find-eev2023replsvideo "23:02" "this diagram here is just this thing at") % (find-eev2023replsvideo "23:04" "the left, so it's very visual... we can") % (find-eev2023replsvideo "23:09" "typeset the diagram in ASCII art here and") % (find-eev2023replsvideo "23:12" "then in this part here we tell how") % (find-eev2023replsvideo "23:15" "the nodes are to be joined, which") % (find-eev2023replsvideo "23:18" "arrows have to to have annotations, and") % (find-eev2023replsvideo "23:20" "so on...") % (find-eev2023replsvideo "23:21" "and this language is extensible in") % (find-eev2023replsvideo "23:24" "the sense that... uh, where's that...") % (find-eev2023replsvideo "23:32" "here: comments that start with \"%:\"") % (find-eev2023replsvideo "23:37" "are interpreted as") % (find-eev2023replsvideo "23:41" "definitions for tree diagrams,") % (find-eev2023replsvideo "23:43" "lines that start with \"%D\"") % (find-eev2023replsvideo "23:50" "define 2D diagrams with arrows and") % (find-eev2023replsvideo "23:53" "stuff, and lines that start with \"%L\"") % (find-eev2023replsvideo "23:56" "contain blocks of Lua code") % (find-eev2023replsvideo "23:59" "that we can use to extend the interpreter") % (find-eev2023replsvideo "24:02" "on-the-fly...") % (find-eev2023replsvideo "24:05" "anyway, here are some recent") % (find-eev2023replsvideo "24:08" "examples of diagrams that I used") % (find-eev2023replsvideo "24:13" "Dednat6 to typeset... this diagram") % (find-eev2023replsvideo "24:18" "here was generated by this") % (find-eev2023replsvideo "24:21" "specification here...") % (find-eev2023replsvideo "24:23" "and this diagram here with the") % (find-eev2023replsvideo "24:28" "curved arrows was generated by this") % (find-eev2023replsvideo "24:31" "specification here.") % (find-eev2023replsvideo "24:34" "So, Dednat6 was very easy to extend,") % (find-eev2023replsvideo "24:38" "and at some point I started to use it") % (find-eev2023replsvideo "24:41" "to generate diagrams using Pict2e -") % (find-eev2023replsvideo "24:44" "mainly for the classes that I give") % (find-eev2023replsvideo "24:47" "at the University... I teach mathematics and") % (find-eev2023replsvideo "24:49" "whatever... in a bad place. Whatever...") % (find-eev2023replsvideo "24:55" "Let me show an animation... here is a") % (find-eev2023replsvideo "24:59" "diagram that I generated with Dednat6,") % (find-eev2023replsvideo "25:03" "and it is a flip book animation, like... we") % (find-eev2023replsvideo "25:06" "type PgUp and PgDn and we go") % (find-eev2023replsvideo "25:09" "to the next page of the book and to the") % (find-eev2023replsvideo "25:11" "previous page of the book...") % (find-eev2023replsvideo "25:13" "and here is the source code that generates") % (find-eev2023replsvideo "25:15" "that. This source code is not very visual,") % (find-eev2023replsvideo "25:19" "so it's quite clumsy to edit that") % (find-eev2023replsvideo "25:21" "diagram directly in the .tex file like") % (find-eev2023replsvideo "25:26" "that...") % (find-eev2023replsvideo "25:27" "These diagrams were inspired") % (find-eev2023replsvideo "25:29" "by something called my Manim, that...") % (find-eev2023replsvideo "25:34" "I forgot the name of the guy, but") % (find-eev2023replsvideo "25:36" "it's a guy that makes many videos about") % (find-eev2023replsvideo "25:38" "Mathematics, and he created this library") % (find-eev2023replsvideo "25:41" "called Manim for generating his") % (find-eev2023replsvideo "25:43" "animations, and other people adapted") % (find-eev2023replsvideo "25:46" "his library to make it more accessible...") % (find-eev2023replsvideo "25:51" "I tried to learn it, but") % (find-eev2023replsvideo "25:54" "each animation, even an animation") % (find-eev2023replsvideo "25:57" "that has very few frames... each") % (find-eev2023replsvideo "25:59" "animation took ages to render, so it") % (find-eev2023replsvideo "26:02" "wasn't fun... and animations in PDFs can") % (find-eev2023replsvideo "26:05" "be rendered in seconds. So these") % (find-eev2023replsvideo "26:09" "things were fun for me, because my laptop") % (find-eev2023replsvideo "26:12" "is very very slow, and my Manim was not fun.") % (find-eev2023replsvideo "26:19" "Anyway, writing code like this") % (find-eev2023replsvideo "26:23" "inside a .tex file was not very") % (find-eev2023replsvideo "26:26" "fun because it was hard to") % (find-eev2023replsvideo "26:30" "debug... so in 2022 I started to play") % (find-eev2023replsvideo "26:35" "with ways of generating these") % (find-eev2023replsvideo "26:39" "diagrams from REPLs, and I found a") % (find-eev2023replsvideo "26:42" "way for Pict2e and a way for TikZ...") % (find-eev2023replsvideo "26:46" "each one of these ways became a video...") % (find-eev2023replsvideo "26:49" "if you go to the list of first-class") % (find-eev2023replsvideo "26:52" "videos of eev you're going to see") % (find-eev2023replsvideo "26:55" "that there's a video about Pict2e here") % (find-eev2023replsvideo "26:57" "here and a video about TikZ...") % (find-eev2023replsvideo "27:01" "here you have some some information") % (find-eev2023replsvideo "27:04" "like length, an explanation, etc...") % (find-eev2023replsvideo "27:08" "and here are the pages for these videos.") % (find-eev2023replsvideo "27:12" "My page about the video about Pict2e") % (find-eev2023replsvideo "27:15" "looks like this, it has some diagrams...") % (find-eev2023replsvideo "27:17" "whatever... and this one is much") % (find-eev2023replsvideo "27:19" "nicer, and a lot of people") % (find-eev2023replsvideo "27:24" "watched that video... I mean, I think") % (find-eev2023replsvideo "27:28" "that 250 people watched it - for me that's") % (find-eev2023replsvideo "27:32" "a million of people...") % (find-eev2023replsvideo "27:34" "and this video is about how to") % (find-eev2023replsvideo "27:38" "extract diagrams from the manual... from") % (find-eev2023replsvideo "27:41" "the TikZ manual and how to run those") % (find-eev2023replsvideo "27:45" "examples in a REPL and modify") % (find-eev2023replsvideo "27:48" "them bit by bit... this is a a") % (find-eev2023replsvideo "27:53" "screenshot... but let me go back.") % (find-eev2023replsvideo "27:58" "At that point these things were just") % (find-eev2023replsvideo "28:00" "prototypes, the code was not very nice...") % (find-eev2023replsvideo "28:03" "and in this year I wrote... I was able") % (find-eev2023replsvideo "28:08" "to unify those two ways of generating PDFs,") % (find-eev2023replsvideo "28:12" "the one for TikZ and the one for Pict2e,") % (find-eev2023replsvideo "28:16" "and I unified them with many other") % (find-eev2023replsvideo "28:19" "things that generated diagrams.") % (find-eev2023replsvideo "28:21" "The basis of these things is") % (find-eev2023replsvideo "28:24" "something called Show2.lua... I'm not going") % (find-eev2023replsvideo "28:28" "to show its details now, but its") % (find-eev2023replsvideo "28:34" "extension that generates TikZ code") % (find-eev2023replsvideo "28:38" "is just this, so we can specify a") % (find-eev2023replsvideo "28:42" "diagram with just a block like this,") % (find-eev2023replsvideo "28:45" "and then uh if we") % (find-eev2023replsvideo "28:49" "run :show00() it returns a string") % (find-eev2023replsvideo "28:54" "that is just the body... the inner") % (find-eev2023replsvideo "28:57" "body of the .tex file, if we run this we") % (find-eev2023replsvideo "29:00" "see the whole .tex file, and if we run") % (find-eev2023replsvideo "29:03" "this we save the .tex file and we") % (find-eev2023replsvideo "29:06" "compile the .tex file to generate a PDF...") % (find-eev2023replsvideo "29:08" "and if we run this we show the PDF in") % (find-eev2023replsvideo "29:12" "the lower right window.") % (find-eev2023replsvideo "29:15" "And that's the same thing for all") % (find-eev2023replsvideo "29:18" "my recent programs that generate") % (find-eev2023replsvideo "29:20" "PDFs - they are all") % (find-eev2023replsvideo "29:23" "integrated... here is the one that...") % (find-eev2023replsvideo "29:26" "the basis for all my modules that generate") % (find-eev2023replsvideo "29:29" "diagrams with Pict2e...") % (find-eev2023replsvideo "29:31" "its demos are not very interesting,") % (find-eev2023replsvideo "29:34" "so let me show some demos of") % (find-eev2023replsvideo "29:37" "extensions that do interesting things...") % (find-eev2023replsvideo "29:42" "so, this is a diagram that I created") % (find-eev2023replsvideo "29:45" "by editing it in a REPL...") % (find-eev2023replsvideo "29:47" "I create several Pict objects here...") % (find-eev2023replsvideo "29:51" "and if I execute this it") % (find-eev2023replsvideo "29:55" "compiles an object, generates a PDF, and") % (find-eev2023replsvideo "29:59" "if I tap this... here is the PDF.") % (find-eev2023replsvideo "30:02" "And if I just ask Lua to") % (find-eev2023replsvideo "30:07" "display what is \"pux\", here,") % (find-eev2023replsvideo "30:10" "it shows the source code in Pict2e") % (find-eev2023replsvideo "30:14" "of the diagram... and the") % (find-eev2023replsvideo "30:18" "nice thing is that it is indented, so") % (find-eev2023replsvideo "30:21" "it's easy to debug the Pict2e code.") % (find-eev2023replsvideo "30:23" "If anyone is interested the") % (find-eev2023replsvideo "30:26" "module that does the tricks for") % (find-eev2023replsvideo "30:29" "indentation is very easy to understand...") % (find-eev2023replsvideo "30:31" "it has lots of tests and test blocks,") % (find-eev2023replsvideo "30:34" "and I think that its data") % (find-eev2023replsvideo "30:37" "structures are easy to understand.") % (find-eev2023replsvideo "30:40" "Anyway... here is another") % (find-eev2023replsvideo "30:49" "example. The :show() is") % (find-eev2023replsvideo "30:52" "here... it generates a 3D diagram.") % (find-eev2023replsvideo "31:02" "Now let me talk about parsers and") % (find-eev2023replsvideo "31:06" "REPLs in VERY strange places... I mean,") % (find-eev2023replsvideo "31:09" "using REPLs to build parsers step by step") % (find-eev2023replsvideo "31:13" "and" replacing parts by more complex") % (find-eev2023replsvideo "31:19" "parts. So, I said that Lua is very") % (find-eev2023replsvideo "31:24" "minimalistic, and everybody knows that") % (find-eev2023replsvideo "31:27" "implementations of regular expressions") % (find-eev2023replsvideo "31:29" "are big and complex..") % (find-eev2023replsvideo "31:32" "so, instead of coming with") % (find-eev2023replsvideo "31:35" "full regular expressions Lua comes with") % (find-eev2023replsvideo "31:37" "something called \"patterns\" and a") % (find-eev2023replsvideo "31:41" "library function called \"string.match\".") % (find-eev2023replsvideo "31:44" "Here is") % (find-eev2023replsvideo "31:47" "a copy of the part of the manual that") % (find-eev2023replsvideo "31:50" "explains the syntax... a part of the") % (find-eev2023replsvideo "31:52" "syntax of of patterns... here's how") % (find-eev2023replsvideo "31:57" "string.match is described in the") % (find-eev2023replsvideo "31:59" "manual - it's just this... \"looks for") % (find-eev2023replsvideo "32:03" "the first match of pattern in the string") % (find-eev2023replsvideo "32:05" "as blah blah blah\"... and then we have to") % (find-eev2023replsvideo "32:08" "go to the other section of the menual") % (find-eev2023replsvideo "32:10" "that explains patterns.") % (find-eev2023replsvideo "32:15" "Lua patterns are so simple,") % (find-eev2023replsvideo "32:19" "so limited, that they don't even") % (find-eev2023replsvideo "32:22" "have the the alternation operator...") % (find-eev2023replsvideo "32:27" "here is how it is described in the") % (find-eev2023replsvideo "32:30" "elisp manual -") % (find-eev2023replsvideo "32:32" "backslash-pipe specifies") % (find-eev2023replsvideo "32:36" "an alternative, blah blah blah.") % (find-eev2023replsvideo "32:38" "When we want to to build more") % (find-eev2023replsvideo "32:43" "complex... regular expressions,") % (find-eev2023replsvideo "32:46" "patterns, grammars, etc... we have to use") % (find-eev2023replsvideo "32:49" "an external library for that... no,") % (find-eev2023replsvideo "32:53" "sorry, a library that is external") % (find-eev2023replsvideo "32:56" "but that was written by one of the") % (find-eev2023replsvideo "32:58" "authors of Lua itself. This library") % (find-eev2023replsvideo "33:02" "is called Lpeg, and its manual says...") % (find-eev2023replsvideo "33:07" "\"Lpeg is a new pattern matching library for") % (find-eev2023replsvideo "33:09" "Lua based on Parsing Expression Grammars") % (find-eev2023replsvideo "33:14" "(PEGs)\". The manual is very terse, I") % (find-eev2023replsvideo "33:18" "found it incredibly hard to read... it") % (find-eev2023replsvideo "33:22" "doesn't have any diagrams - it has some") % (find-eev2023replsvideo "33:24" "examples, though... and the Lua Wiki") % (find-eev2023replsvideo "33:29" "has a big page called Lpeg Tutorial") % (find-eev2023replsvideo "33:34" "with lots of examples...") % (find-eev2023replsvideo "33:36" "but it it also doesn't have") % (find-eev2023replsvideo "33:39" "diagrams and I found some things") % (find-eev2023replsvideo "33:41" "incredibly hard to understand.") % (find-eev2023replsvideo "33:43" "For example, this is something that is in") % (find-eev2023replsvideo "33:46" "the the manual of Lpeg that I saw and I") % (find-eev2023replsvideo "33:48" "thought: \"Wow, great! This makes all sense") % (find-eev2023replsvideo "33:51" "and is going to be very useful!\"...") % (find-eev2023replsvideo "33:53" "it's a way to to build") % (find-eev2023replsvideo "33:54" "grammars that can be recursive,") % (find-eev2023replsvideo "33:57" "and they sort of can encode BNF") % (find-eev2023replsvideo "34:01" "grammars... we just have to translate the") % (find-eev2023replsvideo "34:03" "BNF a bit to get rid of some") % (find-eev2023replsvideo "34:06" "recursions and to translate them to") % (find-eev2023replsvideo "34:08" "something else.") % (find-eev2023replsvideo "34:09" "And the manual also has some things") % (find-eev2023replsvideo "34:13" "that I thought: \"Oh, no! I don't have any") % (find-eev2023replsvideo "34:15" "idea of what this thing does\"... and in fact") % (find-eev2023replsvideo "34:18" "I saw these things for the first") % (find-eev2023replsvideo "34:20" "time more than 10 years ago and they") % (find-eev2023replsvideo "34:22" "only started to make sense one year ago.") % (find-eev2023replsvideo "34:28" "One example is group captures.") % (find-eev2023replsvideo "34:32" "Lpeg also comes with a") % (find-eev2023replsvideo "34:35" "module called the Re module... let me") % (find-eev2023replsvideo "34:38" "pronounce as it in Portuguese - the Re") % (find-eev2023replsvideo "34:40" "module... its manual says: \"The Re") % (find-eev2023replsvideo "34:45" "module (provided by the file re.lua in the") % (find-eev2023replsvideo "34:48" "distribution) supports a somewhat conventional") % (find-eev2023replsvideo "34:51" "regular expression syntax for pattern usage") % (find-eev2023replsvideo "34:54" "within lpeg\"... and") % (find-eev2023replsvideo "34:58" "this is a quick reference... this") % (find-eev2023replsvideo "35:04" "thing is very brief, it has some nice") % (find-eev2023replsvideo "35:06" "examples but it's hard to understand anyway...") % (find-eev2023replsvideo "35:09" "and here are some comments about") % (find-eev2023replsvideo "35:13" "my attempts to learn Re.lua. This is") % (find-eev2023replsvideo "35:18" "a class... in this case it's a very small") % (find-eev2023replsvideo "35:20" "class... this file implements a :pm()") % (find-eev2023replsvideo "35:25" "method - I'm going to show examples of") % (find-eev2023replsvideo "35:28" "other :pm() methods very soon - so, this is") % (find-eev2023replsvideo "35:32" "a :pm() method for Re.lua that lets us") % (find-eev2023replsvideo "35:35" "compare the syntax of Lua patterns, Lpeg,") % (find-eev2023replsvideo "35:39" "and Re... let's see this example here... so,") % (find-eev2023replsvideo "35:45" "if we run this it loads my version of") % (find-eev2023replsvideo "35:50" "lpeg... no, sorry, my version of lpegrex...") % (find-eev2023replsvideo "35:53" "and it shows that when we apply") % (find-eev2023replsvideo "35:57" "the :pm() method to this Lua pattern, this") % (find-eev2023replsvideo "36:01" "lpeg pattern, and this Re pattern") % (find-eev2023replsvideo "36:05" "they all give the same results. So we can") % (find-eev2023replsvideo "36:08" "use this thing... this kind of thing here") % (find-eev2023replsvideo "36:10" "to show how to translate from Lua") % (find-eev2023replsvideo "36:14" "patterns, that are familiar because") % (find-eev2023replsvideo "36:16" "they're similar to regular expressions,") % (find-eev2023replsvideo "36:19" "only weaker...") % (find-eev2023replsvideo "36:20" "to lpeg, that is super weird") % (find-eev2023replsvideo "36:24" "and to Re, that is not so weird.") % (find-eev2023replsvideo "36:28" "Anyway, the comment says that in 2012") % (find-eev2023replsvideo "36:34" "I had a project that needed a") % (find-eev2023replsvideo "36:37" "precedence passer that could parse") % (find-eev2023replsvideo "36:39" "arithmetical expressions with the right") % (find-eev2023replsvideo "36:44" "precedences... and at that point I was") % (find-eev2023replsvideo "36:47" "still struggling with pure lpeg, and I") % (find-eev2023replsvideo "36:49" "couldn't do much with it, so I tried to") % (find-eev2023replsvideo "36:52" "learn Re.lua instead, and I wrote this old") % (find-eev2023replsvideo "36:55" "class here...") % (find-eev2023replsvideo "36:58" "that allowed me to use a preprocessor") % (find-eev2023replsvideo "37:00" "on patterns for Lua. And the thing is that") % (find-eev2023replsvideo "37:03" "with this preprocessor I could") % (find-eev2023replsvideo "37:05" "specify precedence grammars using this") % (find-eev2023replsvideo "37:07" "thing here, that worked, but was super") % (find-eev2023replsvideo "37:11" "clumsy... and I gave up after a few attempts.") % (find-eev2023replsvideo "37:16" "and in 2022 I heard about something") % (find-eev2023replsvideo "37:19" "called lpegrex,") % (find-eev2023replsvideo "37:22" "that was a... a kind of extension or Re,") % (find-eev2023replsvideo "37:29" "and it was much more powerful than re.lua,") % (find-eev2023replsvideo "37:32" "but after a while I realized that it") % (find-eev2023replsvideo "37:35" "had the same defects as re.lua...") % (find-eev2023replsvideo "37:37" "and let me explain that, because") % (find-eev2023replsvideo "37:38" "it has all to do with the things about") % (find-eev2023replsvideo "37:44" "black boxes and magic that I told in the") % (find-eev2023replsvideo "37:48" "beginning. Both... I mean, sorry, neither") % (find-eev2023replsvideo "37:52" "re.lua or lpegrex had some features that") % (find-eev2023replsvideo "37:57" "I needed... they didn't let us explore...") % (find-eev2023replsvideo "38:01" "sorry, they received a pattern that was") % (find-eev2023replsvideo "38:03" "specified as a string, and it converted") % (find-eev2023replsvideo "38:06" "that into an lpeg pattern, but it didn't") % (find-eev2023replsvideo "38:09" "let us explore the the lpeg patterns") % (find-eev2023replsvideo "38:12" "that it generated...") % (find-eev2023replsvideo "38:13" "their code was written in a way") % (find-eev2023replsvideo "38:17" "that was REPL-unfriendly - I") % (find-eev2023replsvideo "38:21" "couldn't modify parts of the code") % (find-eev2023replsvideo "38:24" "bit by bit in a REPL and try to change") % (find-eev2023replsvideo "38:28" "the code without changing the") % (find-eev2023replsvideo "38:30" "original file... the code was very") % (find-eev2023replsvideo "38:34" "hard to explore, to hack, and to extend -") % (find-eev2023replsvideo "38:36" "in my opinion... the documentation was not") % (find-eev2023replsvideo "38:39" "very clear... and I sent one or two messages") % (find-eev2023replsvideo "38:43" "to the the developer of lpegrex and...") % (find-eev2023replsvideo "38:48" "he was too busy to help me. He") % (find-eev2023replsvideo "38:51" "answered it very briefly, and, uh, to be") % (find-eev2023replsvideo "38:54" "honest I felt... rejected. I felt that I") % (find-eev2023replsvideo "38:57" "wasn't doing anything interesting...") % (find-eev2023replsvideo "38:58" "whatever, whatever...") % (find-eev2023replsvideo "39:02" "So, in 2022 I was trying to learn lpegrex") % (find-eev2023replsvideo "39:09" "because I was thinking that it would") % (find-eev2023replsvideo "39:11" "solve my problems - but it didn't...") % (find-eev2023replsvideo "39:14" "it didn't have the features that I needed,") % (find-eev2023replsvideo "39:16" "it was hard to extend, hard to explore,") % (find-eev2023replsvideo "39:19" "and hard to debug, and I") % (find-eev2023replsvideo "39:23" "decided to rewrite it in a more") % (find-eev2023replsvideo "39:27" "hacker-friendly way - in the sense that...") % (find-eev2023replsvideo "39:31" "was modular, and I could replace any") % (find-eev2023replsvideo "39:33" "part of the module from a REPL...") % (find-eev2023replsvideo "39:35" "my version of it was called ELpeg1.lua...") % (find-eev2023replsvideo "39:43" "and I decided that in my version I") % (find-eev2023replsvideo "39:47" "wouldn't have the part that") % (find-eev2023replsvideo "39:50" "receives a grammar specified as a string") % (find-eev2023replsvideo "39:53" "and converts that to lpeg... I would") % (find-eev2023replsvideo "39:55" "just have the backend part, that are the") % (find-eev2023replsvideo "39:58" "functions in lpeg that let us specify") % (find-eev2023replsvideo "40:03" "powerful grammars.") % (find-eev2023replsvideo "40:09" "Let me go back. Let me explain a") % (find-eev2023replsvideo "40:13" "bit about lpeg... Lua has") % (find-eev2023replsvideo "40:17" "coercions: the + expects to receive") % (find-eev2023replsvideo "40:21" "true numbers, and if one of its arguments,") % (find-eev2023replsvideo "40:24" "or both of them, are strings, it converts") % (find-eev2023replsvideo "40:27" "the string... the strings to numbers so in") % (find-eev2023replsvideo "40:30" "this case here, 2+\"3\",") % (find-eev2023replsvideo "40:32" "it returns the number 5,") % (find-eev2023replsvideo "40:36" "and this is the concatenation") % (find-eev2023replsvideo "40:39" "operator... it expects to receive") % (find-eev2023replsvideo "40:42" "strings, so in this case it will") % (find-eev2023replsvideo "40:45" "convert the number 2 to the string \"2\",") % (find-eev2023replsvideo "40:47" "and the concatenation of thes two") % (find-eev2023replsvideo "40:50" "things will be 23... oops, sorry, \"23\"") % (find-eev2023replsvideo "40:53" "as a string.") % (find-eev2023replsvideo "40:55" "Lpeg also has some coercions.") % (find-eev2023replsvideo "40:58" "I usually set these") % (find-eev2023replsvideo "41:02" "globals to let me write my grammars") % (find-eev2023replsvideo "41:06" "in a very compact way, so instead") % (find-eev2023replsvideo "41:10" "of lpeg.B, lpeg.C, etc I use these globals,") % (find-eev2023replsvideo "41:15" "like uppercase B, uppercase C, and so on...") % (find-eev2023replsvideo "41:18" "and with these globals I can write") % (find-eev2023replsvideo "41:21" "things like this: C(1)*\"_\"...") % (find-eev2023replsvideo "41:28" "and lpeg knows that lpeg.C...") % (find-eev2023replsvideo "41:33" "it sort of expands this to lpeg.C,") % (find-eev2023replsvideo "41:37" "but lpeg.C expects to receive") % (find-eev2023replsvideo "41:42" "an lpeg pattern, and 1 is not yet an") % (find-eev2023replsvideo "41:44" "lpeg pattern, so it is coerced into an") % (find-eev2023replsvideo "41:48" "lpeg pattern by calling lpeg.P,") % (find-eev2023replsvideo "41:52" "so this short thing here becomes") % (find-eev2023replsvideo "41:57" "equivalent to lpeg.C(lpeg.P(1)), and the") % (find-eev2023replsvideo "42:04" "multiplication, when at least one of its") % (find-eev2023replsvideo "42:07" "arguments is an lpeg pattern... it expects") % (find-eev2023replsvideo "42:10" "to receive two lpeg patterns, and in") % (find-eev2023replsvideo "42:13" "this case the one at the right is") % (find-eev2023replsvideo "42:15" "just a string, so it is coerced to an lpeg") % (find-eev2023replsvideo "42:18" "pattern by using lpeg.P.") % (find-eev2023replsvideo "42:22" "With this idea we can sort of") % (find-eev2023replsvideo "42:25" "understand the comparison here. I mean,") % (find-eev2023replsvideo "42:28" "let me run it again... this first part is") % (find-eev2023replsvideo "42:32" "very similar to a regular expression") % (find-eev2023replsvideo "42:34" "here at the left...") % (find-eev2023replsvideo "42:35" "and when we apply this... Lua pattern") % (find-eev2023replsvideo "42:40" "to this subject here the result") % (find-eev2023replsvideo "42:49" "is this thing here, this thing, this") % (find-eev2023replsvideo "42:52" "thing and this thing... I'm going to") % (find-eev2023replsvideo "42:54" "call each one of these results") % (find-eev2023replsvideo "42:57" "\"captures\", so each of these things") % (find-eev2023replsvideo "43:00" "between parentheses \"captures\" a substring") % (find-eev2023replsvideo "43:03" "of the original string and these") % (find-eev2023replsvideo "43:06" "captured substrings are returned in a") % (find-eev2023replsvideo "43:08" "certain order. Here is how to express the") % (find-eev2023replsvideo "43:11" "same thing in lpeg...") % (find-eev2023replsvideo "43:13" "it's very cryptic but it's a") % (find-eev2023replsvideo "43:17" "good way to understand the some basic") % (find-eev2023replsvideo "43:20" "operators of lpeg, I mean we can look at") % (find-eev2023replsvideo "43:24" "the manual and understand and") % (find-eev2023replsvideo "43:26" "what C, S and R do, and also") % (find-eev2023replsvideo "43:35" "exponentiation... and this strange thing") % (find-eev2023replsvideo "43:38" "here receives this string here, runs") % (find-eev2023replsvideo "43:41" "a function that I have defined, that") % (find-eev2023replsvideo "43:43" "converts it to an object of a certain") % (find-eev2023replsvideo "43:46" "class, and that class") % (find-eev2023replsvideo "43:47" "represents Re patterns, so this thing") % (find-eev2023replsvideo "43:51" "is treated as a pattern for re.lua,") % (find-eev2023replsvideo "43:54" "and it is matched against the string,") % (find-eev2023replsvideo "43:57" "and it returns the same thing as the") % (find-eev2023replsvideo "43:59" "other one.") % (find-eev2023replsvideo "44:01" "Also, this thing here also has a") % (find-eev2023replsvideo "44:05" "comparison with lpegrex, but these") % (find-eev2023replsvideo "44:08" "patterns are very trivial, they") % (find-eev2023replsvideo "44:10" "don't do anything very strange...") % (find-eev2023replsvideo "44:13" "so let's go back and see what") % (find-eev2023replsvideo "44:15" "kinds of very strange things there are.") % (find-eev2023replsvideo "44:18" "Here is the page of lpegrex at github,") % (find-eev2023replsvideo "44:24" "here's the documentation...") % (find-eev2023replsvideo "44:29" "it's relatively brief,") % (find-eev2023replsvideo "44:32" "it explains lpegrex as being an") % (find-eev2023replsvideo "44:35" "extension of Re.lua, so it explains") % (find-eev2023replsvideo "44:40" "mainly the additional features... here is a") % (find-eev2023replsvideo "44:43" "quick reference that explains only the") % (find-eev2023replsvideo "44:45" "additional features...") % (find-eev2023replsvideo "44:46" "some of the these things") % (find-eev2023replsvideo "44:50" "I was able to understand") % (find-eev2023replsvideo "44:53" "by struggling a lot, and some I wasn't") % (find-eev2023replsvideo "44:58" "able to even by spending several evenings") % (find-eev2023replsvideo "45:02" "try to to build examples...") % (find-eev2023replsvideo "45:07" "and this is something very nice. Lpegrex") % (find-eev2023replsvideo "45:12" "comes with some example parsers... and") % (find-eev2023replsvideo "45:16" "here is a parser that parses the Lua") % (find-eev2023replsvideo "45:19" "grammar - I mean, this is the the grammar") % (find-eev2023replsvideo "45:22" "for Lua 5.4 at the end of the") % (find-eev2023replsvideo "45:27" "reference manual... it's just this... this") % (find-eev2023replsvideo "45:31" "is in a kind of BNF, and this is the BNF") % (find-eev2023replsvideo "45:34" "translated") % (find-eev2023replsvideo "45:36" "to the language of lpegrex, so this") % (find-eev2023replsvideo "45:40" "thing uses many constructions that are") % (find-eev2023replsvideo "45:43" "in re.lua and some extra constructions that") % (find-eev2023replsvideo "45:47" "are described here... and with these") % (find-eev2023replsvideo "45:51" "examples I was able to to understand") % (find-eev2023replsvideo "45:54" "some of the...") % (find-eev2023replsvideo "45:56" "of these things here that are") % (find-eev2023replsvideo "45:58" "described here in the quick") % (find-eev2023replsvideo "46:00" "reference - but not all.") % (find-eev2023replsvideo "46:05" "So, I wasn't able to use lpegrex") % (find-eev2023replsvideo "46:10" "by itself, because some things didn't") % (find-eev2023replsvideo "46:14" "make much sense, and I decided to") % (find-eev2023replsvideo "46:16" "reimplement it in my own style,") % (find-eev2023replsvideo "46:19" "because that would be a way to map...") % (find-eev2023replsvideo "46:24" "to at the very least map what I had") % (find-eev2023replsvideo "46:27" "understood and what I didn't, learn") % (find-eev2023replsvideo "46:30" "one feature at a time, do comparisons, and") % (find-eev2023replsvideo "46:32" "so on.") % (find-eev2023replsvideo "46:34" "Here I pointed to two features of lpeg...") % (find-eev2023replsvideo "46:38" "in one I said \"Oh, great! This thing can") % (find-eev2023replsvideo "46:41" "be used to to define grammars, even") % (find-eev2023replsvideo "46:44" "recursive grammars\", and so on...") % (find-eev2023replsvideo "46:47" "and this is an \"Oh, no!\" feature - one") % (find-eev2023replsvideo "46:50" "thing that didn't make any sense at all...") % (find-eev2023replsvideo "46:54" "group captures. One thing that I did to") % (find-eev2023replsvideo "46:56" "understand group captures was to") % (find-eev2023replsvideo "47:00" "represent them as diagrams. Of course in") % (find-eev2023replsvideo "47:02" "the beginning I was drawing these") % (find-eev2023replsvideo "47:04" "diagrams by hand, but then I realized") % (find-eev2023replsvideo "47:08" "that I could use the bits of lpeg") % (find-eev2023replsvideo "47:10" "that I already knew to build a grammar") % (find-eev2023replsvideo "47:14" "that would parse a little language and") % (find-eev2023replsvideo "47:17" "generate these diagrams in LaTeX, and I was") % (find-eev2023replsvideo "47:21" "able to make this.") % (find-eev2023replsvideo "47:23" "In this diagram here") % (find-eev2023replsvideo "47:26" "this thing above the arrow is Lua code...") % (find-eev2023replsvideo "47:30" "a piece of Lua code that") % (find-eev2023replsvideo "47:33" "specifies an lpeg pattern... this") % (find-eev2023replsvideo "47:37" "thing here at the top is the string that") % (find-eev2023replsvideo "47:40" "is being matched, and the things below") % (find-eev2023replsvideo "47:43" "the underbraces are the captures that") % (find-eev2023replsvideo "47:46" "each thing... sorry, that each thing") % (find-eev2023replsvideo "47:51" "captures.") % (find-eev2023replsvideo "47:53" "For example, this underbrace here") % (find-eev2023replsvideo "47:58" "corresponds to this pattern here,") % (find-eev2023replsvideo "48:00" "that parses a single character but") % (find-eev2023replsvideo "48:02" "doesn't return any captures, this thing") % (find-eev2023replsvideo "48:05" "here parses a single \"b\" and doesn't") % (find-eev2023replsvideo "48:09" "return any captures, this thing here") % (find-eev2023replsvideo "48:11" "parses a single character and captures") % (find-eev2023replsvideo "48:14" "it, and this thing here parses the") % (find-eev2023replsvideo "48:17" "character \"d\" and captures it... and this") % (find-eev2023replsvideo "48:21" "other thing here transforms this") % (find-eev2023replsvideo "48:24" "pattern into another pattern...") % (find-eev2023replsvideo "48:27" "returns first a capture with all") % (find-eev2023replsvideo "48:33" "the string that was parsed by this") % (find-eev2023replsvideo "48:35" "pattern here, and then all the captures") % (find-eev2023replsvideo "48:37" "returned by this thing here before") % (find-eev2023replsvideo "48:40" "the \":\".") % (find-eev2023replsvideo "48:42" "So, this was a way to build") % (find-eev2023replsvideo "48:46" "concrete examples for things that the") % (find-eev2023replsvideo "48:49" "lpag manual was explaining in a very terse") % (find-eev2023replsvideo "48:52" "way, and it worked for me - some things") % (find-eev2023replsvideo "48:55" "that were very") % (find-eev2023replsvideo "48:57" "mysterious started to make sense, and I") % (find-eev2023replsvideo "48:59" "started to have intelligent questions") % (find-eev2023replsvideo "49:02" "to ask in the mailing list.") % (find-eev2023replsvideo "49:08" "And with that I was able to") % (find-eev2023replsvideo "49:11" "understand what are group captures,") % (find-eev2023replsvideo "49:14" "and group captures that receive a name...") % (find-eev2023replsvideo "49:20" "Well, let me explain what this does.") % (find-eev2023replsvideo "49:23" "This thing here captures... sorry, parses") % (find-eev2023replsvideo "49:27" "the empty string and returns this as a") % (find-eev2023replsvideo "49:29" "constant... so, this is something that") % (find-eev2023replsvideo "49:32" "doesn't exist in regular expressions...") % (find-eev2023replsvideo "49:35" "it parses nothing and") % (find-eev2023replsvideo "49:38" "returns this as a capture... then this") % (find-eev2023replsvideo "49:41" "thing here returns these two") % (find-eev2023replsvideo "49:44" "constants here, and parses the empty") % (find-eev2023replsvideo "49:47" "string, and this thing here converts") % (find-eev2023replsvideo "49:51" "the results of this thing here into a") % (find-eev2023replsvideo "49:54" "group capture, and stores it in the label") % (find-eev2023replsvideo "50:00" "\"d\"... and then here's another constant") % (find-eev2023replsvideo "50:03" "capture. And I realized that these things") % (find-eev2023replsvideo "50:05" "here were similar to how Lua") % (find-eev2023replsvideo "50:09" "specifies building lists...") % (find-eev2023replsvideo "50:14" "when we build... sorry, tables. When") % (find-eev2023replsvideo "50:17" "we build a table, and we say that the") % (find-eev2023replsvideo "50:19" "first element of the table is here, this") % (find-eev2023replsvideo "50:21" "element is put at the end of the table...") % (find-eev2023replsvideo "50:24" "when after the that would say d=42...") % (find-eev2023replsvideo "50:27" "we are putting the 42") % (find-eev2023replsvideo "50:31" "in the the slot whose key is \"d\".") % (find-eev2023replsvideo "50:35" "This was happening with lpeg captures,") % (find-eev2023replsvideo "50:38" "but there was something very strange...") % (find-eev2023replsvideo "50:40" "these group captures could hold") % (find-eev2023replsvideo "50:46" "more than one capture - more than one") % (find-eev2023replsvideo "50:49" "value... so there was something between") % (find-eev2023replsvideo "50:52" "lists and tables. I started to use this") % (find-eev2023replsvideo "50:56" "notation to...") % (find-eev2023replsvideo "50:59" "explain in my notation what they") % (find-eev2023replsvideo "51:04" "were doing... many things started") % (find-eev2023replsvideo "51:07" "to make sense, many mysterious") % (find-eev2023replsvideo "51:10" "sentences in the manual started to") % (find-eev2023replsvideo "51:12" "make sense... but some didn't...") % (find-eev2023replsvideo "51:15" "but at least I was able to send") % (find-eev2023replsvideo "51:20" "some intelligent questions to the") % (find-eev2023replsvideo "51:22" "mailing lis,t and the author of Lua and") % (find-eev2023replsvideo "51:26" "lpeg answered some of them...") % (find-eev2023replsvideo "51:28" "he was not very happy about my") % (find-eev2023replsvideo "51:31" "questions - he... told me that those") % (find-eev2023replsvideo "51:35" "diagrams were a waste of time, the") % (find-eev2023replsvideo "51:38" "manual was perfectly clear, and so on...") % (find-eev2023replsvideo "51:41" "whatever - but I was able to...") % (find-eev2023replsvideo "51:45" "so, it was weird, but I was able to") % (find-eev2023replsvideo "51:49" "understand lots of things from his") % (find-eev2023replsvideo "51:52" "answers. This is a copy of one of") % (find-eev2023replsvideo "51:56" "my messages, then there's another one,") % (find-eev2023replsvideo "51:58" "another one, some of them had diagrams...") % (find-eev2023replsvideo "52:01" "then he complained about these diagrams,") % (find-eev2023replsvideo "52:04" "he said that these things here, that look") % (find-eev2023replsvideo "52:07" "like table constructors, \"do not exist\"...") % (find-eev2023replsvideo "52:14" "whatever... anyway, once I understood") % (find-eev2023replsvideo "52:17" "group captures many features") % (find-eev2023replsvideo "52:20" "were very easy to understand") % (find-eev2023replsvideo "52:23" "and I started to be able to use lpeg to") % (find-eev2023replsvideo "52:26" "to build some very interesting things...") % (find-eev2023replsvideo "52:29" "I was able to reproduce some") % (find-eev2023replsvideo "52:33" "of the features that I saw in lpegrex -") % (find-eev2023replsvideo "52:36" "remember that this... where is that?") % (find-eev2023replsvideo "52:41" "this is the syntax of Lua... here -") % (find-eev2023replsvideo "52:45" "I was able to understand") % (find-eev2023replsvideo "52:49" "how these things here were translated to") % (find-eev2023replsvideo "52:52" "lpeg code... to lpeg patterns") % (find-eev2023replsvideo "52:56" "by using group captures in a certain") % (find-eev2023replsvideo "52:58" "way... I was able to implement them") % (find-eev2023replsvideo "53:00" "in ELpeg1.lua...") % (find-eev2023replsvideo "53:05" "and after some time I was able to use") % (find-eev2023replsvideo "53:09" "ELpeg1.lua to build grammars that") % (find-eev2023replsvideo "53:13" "were able to parse") % (find-eev2023replsvideo "53:16" "arithmetical expressions with the") % (find-eev2023replsvideo "53:18" "right precedence... and here's an example") % (find-eev2023replsvideo "53:21" "in which I built the grammar step by step...") % (find-eev2023replsvideo "53:23" "and I test the current grammar, and I") % (find-eev2023replsvideo "53:26" "replace a bit, and then I test the new") % (find-eev2023replsvideo "53:28" "grammar and so on...") % (find-eev2023replsvideo "53:30" "and you can see that the result is") % (find-eev2023replsvideo "53:34" "always a tree that is drawn in a") % (find-eev2023replsvideo "53:37" "nice two dimensional way...") % (find-eev2023replsvideo "53:41" "At this point these powers here") % (find-eev2023replsvideo "53:46" "are returned as a list,") % (find-eev2023replsvideo "53:49" "as an operation \"pow\"") % (find-eev2023replsvideo "53:53" "with several arguments, here... and then") % (find-eev2023replsvideo "53:57" "I apply a kind of parsing combinator,") % (find-eev2023replsvideo "54:01" "here... that transforms these trees into") % (find-eev2023replsvideo "54:04" "other trees and with these combinators") % (find-eev2023replsvideo "54:08" "here I can specify that the \"^\" is") % (find-eev2023replsvideo "54:12" "associative in a certain direction...") % (find-eev2023replsvideo "54:15" "that the \"/\" is associative in") % (find-eev2023replsvideo "54:17" "another direction... the \"-\" uses") % (find-eev2023replsvideo "54:20" "the same direction as a the \"/\",") % (find-eev2023replsvideo "54:23" "and so on... and they have the") % (find-eev2023replsvideo "54:25" "right precedences.") % (find-eev2023replsvideo "54:27" "So, here are the tests...") % (find-eev2023replsvideo "54:31" "here is my file ELpeg1.lua... it has") % (find-eev2023replsvideo "54:37" "several classes, each class has tests") % (find-eev2023replsvideo "54:41" "after it...") % (find-eev2023replsvideo "54:43" "I was able to implement something") % (find-eev2023replsvideo "54:46" "that lpegrex has, that is called") % (find-eev2023replsvideo "54:50" "\"keywords\", that is very useful for parsing") % (find-eev2023replsvideo "54:54" "programs in programming languages...") % (find-eev2023replsvideo "54:57" "I was able to implement something") % (find-eev2023replsvideo "54:59" "similar to the debugger... to the") % (find-eev2023replsvideo "55:04" "lpeg debugger lpeg uses... I was") % (find-eev2023replsvideo "55:09" "frustrated by some limitations of") % (find-eev2023replsvideo "55:11" "the lpeg debugger, and I implemented") % (find-eev2023replsvideo "55:14" "my own that is, uh... much better!...") % (find-eev2023replsvideo "55:20" "Let me show something else... I was") % (find-eev2023replsvideo "55:24" "able to translate a good part of the") % (find-eev2023replsvideo "55:27" "Lua parser, here, to ELpeg1.lua... I haven't") % (find-eev2023replsvideo "55:34" "finished yet, but I have most of the") % (find-eev2023replsvideo "55:38" "the translation here...") % (find-eev2023replsvideo "55:41" "and after having all that I was able to") % (find-eev2023replsvideo "55:46" "build other grammars very quickly...") % (find-eev2023replsvideo "55:50" "writing new parsers finally became fun.") % (find-eev2023replsvideo "55:54" "And here's one example that I showed in the") % (find-eev2023replsvideo "56:00" "beginning.") % (find-eev2023replsvideo "56:03" "If I remember correctly...") % (find-eev2023replsvideo "56:07" "I took a figure from the Wikipedia...") % (find-eev2023replsvideo "56:10" "I don't have its link now...") % (find-eev2023replsvideo "56:12" "but I specified a grammar that parses") % (find-eev2023replsvideo "56:17" "exactly the example that appears") % (find-eev2023replsvideo "56:19" "in the Wikipedia...") % (find-eev2023replsvideo "56:22" "so, with my grammar, considering that") % (find-eev2023replsvideo "56:25" "the top level entry is \"Stmt\", when I") % (find-eev2023replsvideo "56:29" "parse this string here") % (find-eev2023replsvideo "56:32" "the result is this tree...") % (find-eev2023replsvideo "56:37" "and I can do some operations on that,") % (find-eev2023replsvideo "56:41" "I can define how this thing is to be") % (find-eev2023replsvideo "56:44" "converted into LaTeX,") % (find-eev2023replsvideo "56:46" "I can define other operations") % (find-eev2023replsvideo "56:49" "that convert trees into other trees, and") % (find-eev2023replsvideo "56:53" "here are some tests of these operations...") % (find-eev2023replsvideo "56:58" "This is what I showed in the beginning...") % (find-eev2023replsvideo "57:00" "I'm not going to explain all the details") % (find-eev2023replsvideo "57:02" "of this thing now...") % (find-eev2023replsvideo "57:05" "this :show() converts this thing") % (find-eev2023replsvideo "57:09" "into LaTeX in the way specified by these") % (find-eev2023replsvideo "57:13" "instructions here, that says that...") % (find-eev2023replsvideo "57:18" "well, whatever...") % (find-eev2023replsvideo "57:25" "and here's the result - the LaTeXed result...") % (find-eev2023replsvideo "57:35" "and these diagrams here are generated by") % (find-eev2023replsvideo "57:42" "this file here, that defines a simple") % (find-eev2023replsvideo "57:46" "grammar that parses this thing here,") % (find-eev2023replsvideo "57:49" "and then LaTeXes it in a certain way, and") % (find-eev2023replsvideo "57:52" "and also tests to check if this code here...") % (find-eev2023replsvideo "57:56" "this Lua code that generates an lpeg grammar...") % (find-eev2023replsvideo "58:01" "parses this subject here and") % (find-eev2023replsvideo "58:06" "returns the expected result...") % (find-eev2023replsvideo "58:11" "So: this is the code that I") % (find-eev2023replsvideo "58:14" "wanted to show. I wanted to show many") % (find-eev2023replsvideo "58:17" "more things but I wasn't able to prepare") % (find-eev2023replsvideo "58:20" "them before the conference... and I hope") % (find-eev2023replsvideo "58:23" "that soon - for some value of \"soon\" -") % (find-eev2023replsvideo "58:27" "I'll be able to create REPL-based") % (find-eev2023replsvideo "58:30" "tutorials for lpeg, Re, and ELpeg1.lua...") % (find-eev2023replsvideo "58:31" "where lpeg is something very famous,") % (find-eev2023replsvideo "58:35" "Re is a module of lpeg...") % (find-eev2023replsvideo "58:39" "I could also do something like this") % (find-eev2023replsvideo "58:42" "for lpegrex... and ELpeg1.lua is") % (find-eev2023replsvideo "58:47" "the thing that I wrote, the one that") % (find-eev2023replsvideo "58:52" "has test in comments, and the tests") % (find-eev2023replsvideo "58:57" "usually generate trees, and sometimes") % (find-eev2023replsvideo "58:59" "they generate TeX code.") % (find-eev2023replsvideo "59:01" "Yeah, so that's it! I wanted to") % (find-eev2023replsvideo "59:05" "present much more but I wasn't able to") % (find-eev2023replsvideo "59:07" "prepare it... so: sorry, thanks, bye! =)") ]==] unrevised_bigstr = [==[ (find-eev2023replsvideo "00:00" " ") ]==] -- Local Variables: -- coding: utf-8-unix -- End: