spudlyo
spudlyo
  • Видео 7
  • Просмотров 109 864
Literate Documentation with Emacs and Org Mode
All the materials for this talk can be found at: gitlab.com/spudlyo/orgdemo2
When writing about programming or other technical subjects, you’re often weaving blocks of source code, program output, and raw data in with your prose. These supplementary materials are usually copied and pasted into your document from other sources, which can be difficult and tedious to keep up-to-date as things change. Inconsistencies and errors can easily creep in when you “hard-code” dynamic information like program output into your writing.
Wouldn’t it be great if the tool you used for writing knew how to run code in a variety of programming languages, collect and format output, and let you refer symbolically...
Просмотров: 3 675

Видео

Hello World for Songwriting
Просмотров 4433 года назад
This is a recording of a talk I gave at work for a lecture series designed to give folks a new hobby to engage with during the pandemic when everyone is stuck at home. Since this video is really long, I've put some chapter markers in so you can jump around to sections that might be of interest. 00:00 Introduction 00:43 Time: Bars & Beats 05:22 Our Song's Key 07:59 The Arrangement 12:00 Adding D...
Features of a Modern Terminal Emulator
Просмотров 7 тыс.3 года назад
This is a prerecorded talk of a presentation I gave on November 13th 2020 at the SeaGL conference. I hope you like it!
Consistent Technical Documents Using Emacs and Org Mode
Просмотров 58 тыс.4 года назад
Files used in the demo: gitlab.com/spudlyo/orgdemo My dotfiles: gitlab.com/spudlyo/dotfiles Read The Org: github.com/fniessen/org-html-themes Read The Docs: sphinx-rtd-theme.readthedocs.io/en/latest/installing.html Git from the Bits Up: ruclips.net/video/MYP56QJpDr4/видео.html
Spying on Apache and PHP with Strace
Просмотров 24 тыс.13 лет назад
This video shows how to use strace to determine why an apache worker loads a page slowly. Commands shown in this video: telnet localhost 80 lsof -p `pidof telnet` netstat -nap | grep pid strace -o /tmp/output -f -s4096 -r -p pid cat /tmp/output | cut -c12-16 | sort -rn | head
Getting More out of Top
Просмотров 16 тыс.13 лет назад
How to configure top(1) to show you interesting information. Some of the keys used in this video: z Turn on color H Show threads d Set the delay 1 Show SMP CPU info i Show only non-idle processes/threads f Add fields to your top display F Pick which field to sort on Handy things I missed: W Write out your config to a .toprc file The watch command I used was: watch -d cat /proc/interrupts

Комментарии

  • @neilclay5835
    @neilclay5835 25 дней назад

    You're very good at this. I hope you continue

  • @neilclay5835
    @neilclay5835 25 дней назад

    Very good

  • @ethernet764
    @ethernet764 2 месяца назад

    00:39 #+title: - in-buffer setting 01:13 what is org mode? 01:44 formatting syntax 02:18 org-export-dispatch (C-c C-e) as html 02:28 #+setupfile: - in-buffer setting 03:29 what is org babel? 03:35 #+begin_src and #+end_src - org babel code block 03:52 org-ctrl-c-ctrl-c (C-c C-c) execute org babel code block 04:28 :dir - code block header argument 04:48 #+property: - in-buffer setting; sets file-level header arguments 05:07 #+include: - in-buffer setting 05:23 # -- mode: -- - local variables in files 05:30 #+name: - code block directive 05:38 :exports - code block header argument 06:04 #+call: - in-buffer setting 06:22 why redirect stderr to stdout? 07:15 :results output - code block header argument 08:59 call_hello() - inline call to code block (prefix with "call_" and append the #+name: of the code block) 09:20 call_hello[:results raw]() - header arguments in inline call () 09:41 :noweb - code block header argument 10:36 :var - code block header argument 11:09 call_short_hash(line=hashobject) - inline call with argument 13:42 :noweb - call with argument 15:49 terminal vs gui - font size 16:35 org-edit-special (C-c ') 16:54 company-mode - emacs third-party package 17:28 :results - code block header argument 18:52 custom org publish function 21:06 org-publish 22:20 final thoughts on confluence editor

  • @WolfgangDeutsch
    @WolfgangDeutsch 3 месяца назад

    Hi Mike, well, that was mind blowing! Quick q if you don't mind: How do you switch between those VMs so quickly?

    • @elspuddo
      @elspuddo 2 месяца назад

      That’s the combined powers of SSH and Tmux!

  • @dolahn
    @dolahn 3 месяца назад

    Would have been helpful if you would have said which command you used to generate the HTML file @ 2:24.

    • @ethernet764
      @ethernet764 2 месяца назад

      The command is org-export-dispatch (C-c C-e)

  • @mauroandreolini5278
    @mauroandreolini5278 3 месяца назад

    Awesome demo, thanks! What's the font? Where can I download the background image from?

  • @MimiKLM
    @MimiKLM 6 месяцев назад

    That's great, again! Is there any chance you could discuss a bit more around export/dispatch customisation? Ie, having this great document, we'd like probably to publish it on our server (ftp?) where some css-es already are present. Or, perhaps, we have our WordPress blog and we'd like to publish this technical document as a post? Or publish it in confluence? Many thanks in advance. K.

  • @MimiKLM
    @MimiKLM 6 месяцев назад

    Many thanks Mike! Another great video about showing what pinacle of automation is possible at our fingertips (literally) and how much time we could save with pure, simple and ethernal tools like emacs, grep, LaTeX and other "stone age" non M$ Windows software. In your next video 😀may we ask you to discuss approach like this: A tech guy/lass has to write an article/documentation. In his/her task the data from the web has to be consumed, the graphs, tables have to be created, and along writing this article a few presenation slides (with the company marketing stuff like logo, bacground etc.) need to be created to "sell" the article in the meeting. It seems natural that during the article writing we could put some org-mode and LaTeX directives around fragments of the article, and using the dispatcher/exporter we could have and the article and the slides from one org file. Pretty popular scenario, isn't it?

    • @elspuddo
      @elspuddo 6 месяцев назад

      Having both slides and a document being sourced from the same org file seems like a great idea! I'll have to try that out.

  • @michaelutech4786
    @michaelutech4786 8 месяцев назад

    Just watched a 4 years old video of yours and then found this one. I just love the unassuming professionalism that your videos emit. I remember when I first installed Emacs from source sometimes around 1990 on an SCO UNIX (SCO didn't have a bad name at the time, it was just incredibly expensive - was lucky to get a copy from my part time employer then). SCO was not supported by the configure scripts, at least the development suite wasn't. After diving into this shell script you mentioned I learned that it's easier to first get a gcc. The bootstrap gcc didn't work with SCO's C compiler either, so I had to find a prebuild binary, which was incredibly hard at the time. The whole process took about a week, until I got emacs (as well as most of the GNU ecosystem, gmake, bison, flex, gm4, gawk, ...) to start the first time. Considering what I had to do, that was actually pretty fast. It kinda closes a loop, seeing how amazingly you employ emacs to create beautiful stuff. Org mode is amazing. That in turn reminds me on my attempts to use tangle and weave. Surprising how all the old tools and concepts seem to enjoy a revival in recent years. Make an old fart like myself feel modern and fancy :-)

  • @ВадимАгишев-д6я
    @ВадимАгишев-д6я 9 месяцев назад

    Great talk and work! Thanks very much for sharing your experience with us!

  • @HarishNarayanan
    @HarishNarayanan 9 месяцев назад

    Ok, this was genius. Thank you!

  • @johanwk
    @johanwk 10 месяцев назад

    Great video! I've been working with tangled documents since '95 or so, and still find a lot of good advice here. Will certainly bookmark this one.

  • @vassilispapavassiliou3597
    @vassilispapavassiliou3597 10 месяцев назад

    Great presentation, One question though: I followed you code samples and event downloaded the gitlab repo but pdf export does not actually work: Maybe you are using something other than the default org-latex-pdf-process command - - ie. latexmk -f -pdf -%latex -interaction=nonstopmode -output-directory=%o %f - ?

  • @weavermarquez1271
    @weavermarquez1271 10 месяцев назад

    Incredibly slick! I'm doing my best to learn and practice the literate programming approach, and your two videos have been amazingly helpful demos. Right now I'm trying to go through Advent of Code with elisp + a literate programming style.

  • @mbarton98
    @mbarton98 10 месяцев назад

    Really enjoyed the new tips presented. I’m saving this to refer to later, like your other video.

  • @lurgreen
    @lurgreen Год назад

    that theme are you using? In config file I have found this (load-theme 'modus-vivendi) but it's not that theme.

    • @elspuddo
      @elspuddo Год назад

      That's Zenburn with a darkened background.

  • @lurgreen
    @lurgreen Год назад

    extremely well prepared video tutorial - amazing job!

  • @TaoHansen
    @TaoHansen Год назад

    This is easily the best video on literate programming with Org Mode on the internet.

  • @rashie
    @rashie Год назад

    👍👍

  • @miggyshiggy
    @miggyshiggy Год назад

    awesome. thank you sir!

  • @ryuheechul
    @ryuheechul 2 года назад

    Thanks for the great video!

  • @KenGuest_IE
    @KenGuest_IE 2 года назад

    you can specify the file to cut instead of using cat and redirecting the output (and by using tail instead of head I don't have to type that one extra 'r': cut -c12-16 /tmp/output | sort -n | tail very cool demo though - I'd no idea about the -s argument that strace has - thank you!

    • @elspuddo
      @elspuddo 2 года назад

      Glad you liked it! It's amazing that folks are still getting something out of a 10 year old video. I continue to employ the "useless use of a cat" paradigm simply because I like pipes, and I find the explicit cat satisfying.

  • @tcroyce8128
    @tcroyce8128 2 года назад

    I went ahead and downloaded your video for backup 🙂

  • @tcroyce8128
    @tcroyce8128 2 года назад

    Damn cool topic and range of information covered, might have taken me years to get around it and then see the bigger picture but this what proper knowledge sharing feels like. Thanks a lot🤘

  • @JakubUrbanec
    @JakubUrbanec 2 года назад

    Thanks. I've been using terminals sice 1994 (VT220 ...) and I still live in terminals (and multiplexers like tmux). Still a cool presentation, thanks!

  • @totorotux3708
    @totorotux3708 3 года назад

    where is the complete video?? link

  • @michaelkohlhaas4427
    @michaelkohlhaas4427 3 года назад

    Awesome!

  • @michaelkohlhaas4427
    @michaelkohlhaas4427 3 года назад

    I like the video even before I watched it!

  • @x0rn312
    @x0rn312 3 года назад

    Are there conventions within the community regarding where to put those icons within the private use area?

  • @MMABeijing
    @MMABeijing 3 года назад

    Hi Mike, I am slowly following your tuto, I am now @13:50 and I was wondering if you could explain what the =file - = does. I looked at the file utility help page but I don't think it mentions the =file - = , thanks!

    • @elspuddo
      @elspuddo 3 года назад

      A lot of UNIX utilities that take a filename as an argument will accept a dash ("-") to mean "read from STDIN instead". That's why it says "/dev/stdin:" at the start of the output. Hope this helps!

    • @MMABeijing
      @MMABeijing Год назад

      @@elspuddo thank you ( I thought I had answered your kind explanation last year but I had not, sorry). This video is still a great reference for me, amazing job Mike

  • @geez6666
    @geez6666 3 года назад

    Killed it! Thing about Emacs and Org is there is always something better and new to learn. Especially from content published few years back, and just when you think there is nothing more to learn about these two....lol. Thanks

  • @MMABeijing
    @MMABeijing 3 года назад

    @9:58 Hi Mike, I followed along but when I try to echo the result of invoking the =hello= function (with "<<hello()>>") I am not getting the proper result, I am only getting the string "<<hello()>>". When within the code.inc file I can invoke the function hello and access the right message. Any idea? I tried to add the header-args ":noweb yes" but that did not help either. Cheers,

    • @elspuddo
      @elspuddo 3 года назад

      Check out the function "org-babel-lob-ingest" which tells org to add the function in that file to the "Library of Babel". If you look at my config, I have a function called "my-maybe-lob-ingest" which I run as an after-save-hook for Org mode. This makes it so when I save code.inc it automatically adds it to the LOB so you can call hello() from your main document. You'll notice @8:57 when I save it says "2 src blocks added to Library of Babel", that's my after-save-hook.

    • @MMABeijing
      @MMABeijing 3 года назад

      @@elspuddo gotcha, I will use the LOB from now on thank you. Yesterday I finally understood that I could also from <<code.inc:hello()>> and I was quite proud of myself haha, but yes LOB is easier. Thank you for the feedback. I have left issue on your github I was not sure which way you prefer using when giving feedback. Whichever way you prefer, cheers!

    • @elspuddo
      @elspuddo 3 года назад

      @@MMABeijing Very cool, I didn't know you could do that!

  • @nasseralkmim4394
    @nasseralkmim4394 3 года назад

    Really nice presentation. Good work!

  • @MMABeijing
    @MMABeijing 3 года назад

    Hi Mike, I am trying to follow that tutorial, however my orgmode setup is different from yours and your results do not match what I get. Ex: @4:02 when you execute your codeblock within your results there is a nested begin_example, I don't have that. WHen you export in html your results get exported and not mine. Can you point me in the right direction? thank you

    • @elspuddo
      @elspuddo 3 года назад

      Hey, sorry for the confusion on this. In my Emacs configuration I have manipulated the "org-babel-default-header-args" to change the default header args supplied to every code block. You can manually get the same results as me by doing: #+BEGIN_SRC shell :results output verbatim replace echo "My current working directory is: $(dirs +0)" ls -l #+END_SRC Hope this helps!

    • @MMABeijing
      @MMABeijing 3 года назад

      @@elspuddo It's not working for me :) Right now I m only using fniessen set up file to export to html. I tried your code but it won't output the name of my current file (it does it in orgmode, but not on html). Same thing with the output the codeblock: it is not showing within the html page.

    • @MMABeijing
      @MMABeijing 3 года назад

      update: might be a bug, but in my case the only way to displaying the output of the block is to make sure there is at least a text character between the babel codeblock and the output. Weird:)

    • @MMABeijing
      @MMABeijing 3 года назад

      @@elspuddo I really want to follow along your instructional, do you see any pb with the code below? #+NAME: hashobject #+begin_src sh :exports both :results output verbatim replace echo -n '<<hello()>>' | git hash-object --stdin -w #+end_src #+RESULTS: hashobject : 7435a4d4bbd4c88971f2b1929491abd8ca9da3bb ------------------ I don't understand why I am not able to export to html, am I missing something out?

  • @HimelPatel
    @HimelPatel 3 года назад

    Great talk, thanks!

  • @jaderanderson
    @jaderanderson 3 года назад

    My brain melted. Not very good brain

  • @PhilippeCarphin
    @PhilippeCarphin 3 года назад

    @14:41 "Looks good though" Quite the understatement!

  • @davidthe-developer8389
    @davidthe-developer8389 3 года назад

    Love it !! Best summary I've seen ;)

  • @Cowboy8625
    @Cowboy8625 3 года назад

    I live in the terminal my self. I really really like to do anything I can in the terminal from web browsing, email, reddit, discord, games like nethack to my everyday workflow of programing. I enjoy making things in the terminal over a GUI as well do to the limitations it brings make for a good challenge as a programmer. I haven't been much into Emacs my self but more of a Vim dude. I think both are good though, way better then the SUPER Clunky IDE's. Thanks for sharing your knowledge! The One thing i wish that the terminal supported with ESC Code's was a way to change the characters width and height. You can do this on windows with the help of the windows.h file but i wished it was a slandered. Would change terminal gaming a lot!

  • @johnhammer8668
    @johnhammer8668 3 года назад

    use let instead of setq in the my-publish function that would affect only locally

  • @KostasKolias
    @KostasKolias 3 года назад

    Dude, awesome job. Keep the good stuff coming...

  • @MMABeijing
    @MMABeijing 3 года назад

    Ok I want to pick you brains on your video editing :) what did you use to create the sound of the keyboard (unless you actually recorded your keyboard, but somehow I doubt it), also could you tell me what you used to speed up the input at certain moments of the video? thank you forehand!

    • @elspuddo
      @elspuddo 3 года назад

      I recorded the on-screen portions of the video separately from the narration, but I did have my microphone active (and my breath held) while I did it, so it picked up the sounds of my keyboard. I later recorded the narration separately and then edited it into the video timeline.

    • @MMABeijing
      @MMABeijing 3 года назад

      @@elspuddo did you use something special to have the fast-typing effect, or did you simply sped it up with your editing software? (btw which sw do you use for video edition?). But yeah you have a very interesting delivery, I am subbing to your channel just in case you come back to making more videos :), and yesterday night for the first time I tried to use erc/irc as you mentionned in the comment that's where people can find you. I have yet to register my nick properly, I am very new to that, but for what it 's worth you opened one person's eyes to irc, so thank you for that as well:)

    • @elspuddo
      @elspuddo 3 года назад

      The fast-typing comes from my keyboard, a Kinesis Advantage 2, which has a macro record/playback capability. So when it's going fast, I'm hitting my macro playback key. I use ScreenFlow on macOS for all my screen capture and video editing. I may try out an all Linux workflow, as I'm interested in trying out Kdenlive. The #emacs channel on Freenode is pretty great, there are very knowledgeable people there!

    • @chrysleague
      @chrysleague 2 года назад

      Haha, I waded into the comments specifically to find anyone talking about the keyboard sound. I was pretty sure I recognized it just by the sound, and indeed I did… I have the Kinesis Advantage 2 as well. It's not just the click of the switches, but the difference in tone on the thumb pads, I think.

    • @MMABeijing
      @MMABeijing 2 года назад

      @@elspuddo belated thank you for the recording tip, I managed to not notice it until today and really appreciate the information. :pray:

  • @MMABeijing
    @MMABeijing 3 года назад

    thank you YOutube, thank you Sir. You ability to story-tell and the quality of your video/sound made viewing that video as enjoyable as watching a short movie. You Sir had me on the edge of my seat and I learnt a lot as well. You are my new reference in terms of emacs. I am just gonna go ahead and sub/like, I am sure the rest of your channel rocks. Again, thank you !

    • @elspuddo
      @elspuddo 3 года назад

      I'm glad you liked it! These days I mostly make videos of the presentations I give at the yearly SeaGL conference, but I hope to stop being lazy and to make more at other times of year too :)

  • @worldgeektube
    @worldgeektube 3 года назад

    Didn't know that "modern" terminal emulators were so capable. Very useful.

  • @jan_harald
    @jan_harald 3 года назад

    256 colors is enough for basically anything, tbh, truecolor is mostly overkill... unicode is incredible, as long as you're not dealing with magic parts of it very sad sixel and such aren't supported tho, but there's drawille ;P abusing braille to show graphs and kinda show images (contrast can easily be seen if you try out "mapscii" and switch between drawille and normal box drawing), the "st" terminal has a patch to make braille characters fill up the cells (and one to make box drawing chars touch exactly, with no spaces, way more aesthetic), so it looks a lot better, you could also do that with a custom font

  • @d10valentin
    @d10valentin 3 года назад

    I would've loved to see you go through reGIS.

  • @ferviron97
    @ferviron97 3 года назад

    Wonderful talk and very entertaining too. If I am allowed some for of negative criticism, I would have loved to see the Tektronix terminal mentioned. Xterm has support for it still (4010). Most people hate it, since it is a very obsolete technology, but it is pretty cool none the less. And one can do some interesting plots/cad with it. Anyhow, very very nice one

    • @elspuddo
      @elspuddo 3 года назад

      I actually had a whole section on the Tektronix 4010, and some examples of using it with gnuplot, but sadly it had to be cut for time. I also think it's pretty cool.

    • @jan_harald
      @jan_harald 3 года назад

      @@elspuddo you could've made the youtube version extended, with a marker that "these parts were cut from the talk", or such ;P

    • @ferviron97
      @ferviron97 3 года назад

      @@elspuddo If you are willing to make that part for youtube, I am willing to watch it :) There is not much visual (videos) media from the Tek terminal. I love playing with the gnuplot samples, they are indeed very cool. If they were drawn faster, they could be usabe in today's world :)

  • @TheNuSkooler
    @TheNuSkooler 3 года назад

    Great video! Funny, I was just writing some 24-bit/truecolor to "xterm" and 16c mapping utility code in Node.js today as I ran across this!

  • @armynyus9123
    @armynyus9123 3 года назад

    20 years in the terminal - and still learned sth. Great as all talk of yours (the emacs lit programming one DOSed me for a month, now I'm in the church).

    • @MMABeijing
      @MMABeijing 3 года назад

      what does "DOSed me " mean? does it mean it was so overwhelming that it left you unable to do react?

  • @FractalMannequin
    @FractalMannequin 4 года назад

    I've been using Emacs and org for almost a year now and I've watched a lot of videos and tutorials. This is among the best ones around for this topic. Thank you a lot, I was looking forward to it.