News for hackers. Stuff that matters.
Re:Your live coding demo is boring me (2015) by tenaciousDaniel on Friday January 25, 2019 @03:23PM (#19002134)
Someone steal my idea:

A text editor but with "record" and "stop" buttons. Click "record", write all your code, then click "stop". Now you can go back in time and play it all from the beginning, and you can also select certain stopping points as frames.

Then in your live demo, just navigate from one frame to the next, and everyone can watch the pre-recorded code being typed as if it were being done in real time.

Bam. Problem solved.

Re:Your live coding demo is boring me (2015) by orblivion on Friday January 25, 2019 @03:36PM (#19002257)
I once saw a presentation that used a Python shell. The guy typed _super_ fast and didn't make any mistakes. It was pretty impressive.

But then afterwards he told us that he had written a tool that typed out something prewritten as he mashed the keyboard.

Re:Your live coding demo is boring me (2015) by jordigh on Friday January 25, 2019 @03:40PM (#19002291)
Re:Your live coding demo is boring me (2015) by orblivion on Friday January 25, 2019 @04:17PM (#19002555)
Very cool, though what I saw was someone else, probably over a decade ago, who must have had the same idea independently. Though I don't know that he released it as you did.
Re:Your live coding demo is boring me (2015) by pimlottc on Friday January 25, 2019 @06:14PM (#19003530)
Perhaps you're thinking of Pete Fein's lightning talk at PyCon 2019 in Atlanta?

https://www.youtube.com/watch?v=MVzTcQkMNXg

Re:Your live coding demo is boring me (2015) by jordigh on Friday January 25, 2019 @05:59PM (#19003439)
Ah, probably using playerpiano. Same idea, but I wanted it for bash.
Re:Your live coding demo is boring me (2015) by orblivion on Friday January 25, 2019 @06:04PM (#19003473)
Ah, yes, and in fact the presentation was from Pete Fein himself! I guess he did release it after all.
Re:Your live coding demo is boring me (2015) by chipperyman573 on Friday January 25, 2019 @05:36PM (#19003268)
You should post a show HN of this. It's really cool and I definitely will be using this in about a month. I wouldn't have found it if not for this comment.
Re:Your live coding demo is boring me (2015) by jordigh on Friday January 25, 2019 @06:04PM (#19003472)
I didn't make it. I made a quick personal hack a few minutes before my lightning talk and Steven Loria later turned it into a real package. I'm just listed in the kudos:

https://doitlive.readthedocs.io/en/latest/kudos.html

Re:Your live coding demo is boring me (2015) by tenaciousDaniel on Friday January 25, 2019 @03:42PM (#19002304)
this is awesome! nice work
Re:Your live coding demo is boring me (2015) by onion2k on Friday January 25, 2019 @03:42PM (#19002303)
Http://hackertyper.net does that for silly Hacker text, or http://geektyper.com/mobile/ for mobile.
Re:Your live coding demo is boring me (2015) by me_again on Friday January 25, 2019 @05:22PM (#19003149)
There's something similar for PowerShell: https://www.powershellgallery.com/packages/Start-Demo/1.0.1
Re:Your live coding demo is boring me (2015) by kstenerud on Friday January 25, 2019 @04:00PM (#19002438)
Please no. That's the equivalent of presenting an unedited video recording onstage and saying it's all cool because you can fast forward and pause it.

Take the time to build a proper, edited presentation.

Re:Your live coding demo is boring me (2015) by jungler on Friday January 25, 2019 @03:29PM (#19002184)
This is more-or-less the format Bisquit uses in his tutorial videos, e.g.

https://youtu.be/vkUwT9U1GzA

Somewhere he explained that he made a custom tool to make and play back a "perfect recording" of his edits.

Re:Your live coding demo is boring me (2015) by tenaciousDaniel on Friday January 25, 2019 @03:32PM (#19002213)
I love how epic the music is
Re:Your live coding demo is boring me (2015) by pritambaral on Friday January 25, 2019 @03:50PM (#19002376)
1. asciinema[0] has the ability to record a terminal (and thus, terminal-based editors) and replay it. By default, the replay comes with pause (via <SPACE>) and play-single-frame (via <.>).

2. Vim has Mundo[1] and Emacs has undo-tree[2] which allow you to step backwards-and-forwards through your changes.

As I see it, adding explicitly-selected frames to any of these features should be possible.

0: https://asciinema.org

1: https://simnalamburt.github.io/vim-mundo/

2: https://www.emacswiki.org/emacs/UndoTree

Re:Your live coding demo is boring me (2015) by apk-d on Friday January 25, 2019 @03:48PM (#19002357)
There's a vscode extension that does exactly this. Haven't tested it, but it looks like it should work for live coding presentations.

https://marketplace.visualstudio.com/items?itemName=jevakall...

Re:Your live coding demo is boring me (2015) by nayaketo on Saturday January 26, 2019 @12:22AM (#19004908)
Here's a demo of that in action. https://youtu.be/rO8-cgtkZSw?t=295
Re:Your live coding demo is boring me (2015) by explainplease on Friday January 25, 2019 @07:21PM (#19003861)
The emacs-gif-screencast package does this very well. Each keystroke (technically, each command) is recorded as a frame, with timestamps used to set the appropriate duration of each frame. e.g. if you stare at the screen for 30 seconds, no additional frames are captured, and that frame lasts 30 seconds (which you can then edit the duration of later in other software).

Note that I don't know how well it would work for long sessions. Theoretically it would be fine, but the way it uses ImageMagick to convert the frames to an animation can be heavy on memory, so that could be a problem. However, the frames could be stitched together with other software that didn't present that problem...

Re:Your live coding demo is boring me (2015) by anonytrary on Friday January 25, 2019 @05:08PM (#19003017)
Haha neat idea :) Can't you simulate this in git?

  1. git checkout -b demo
  2. write some code and/or comments
  3. git commit -am "message of what we did in this step"
  4. Go to step 2 if not finished with demo.
  5. Cycle through commits with script, each one a frame.
I probably didn't think about it enough (commit granularity too fine == annoying), but that seems like it might work, and you have the added bonus of having everything in git.
Re:Your live coding demo is boring me (2015) by tenaciousDaniel on Friday January 25, 2019 @05:24PM (#19003176)
Ah yeah, that would do the same thing basically.
Re:Your live coding demo is boring me (2015) by sametmax on Friday January 25, 2019 @03:50PM (#19002373)
asciinema does that for the terminal: https://asciinema.org/
Re:Your live coding demo is boring me (2015) by nargella on Friday January 25, 2019 @03:43PM (#19002307)
You know what's funny to me is Mr. Robot does their scenes in.... flash. Even their mobile phone shots are done via flash.
Re:Your live coding demo is boring me (2015) by tenaciousDaniel on Friday January 25, 2019 @05:26PM (#19003186)
that's incredible. I didn't even know that Adobe was still maintaining and releasing new versions of Flash.
Re:Your live coding demo is boring me (2015) by egypturnash on Friday January 25, 2019 @06:09PM (#19003502)
They call it “Animate” now. Once they got their HTML exporter working they changed the name.
Re:Your live coding demo is boring me (2015) by jolmg on Friday January 25, 2019 @07:10PM (#19003823)
Open vim, type code. Done. Hold `u` for playing backwards, or `Ctrl-r` for playing forwards. If you want to show your undos too, then remap `g-` and `g+` to something you can hold and use those instead. If you want to save that undo history, set options `undofile` and `undodir` and perhaps `undolevels` if 1000 is too little.
Re:Your live coding demo is boring me (2015) by auto on Friday January 25, 2019 @03:47PM (#19002341)
Sounds like a cool VIM plugin to write, basically just a key logger that when ran against a file recreates what was done.

Even simpler, a key logger with some control, wouldn't even need integration into a specific editor.

Re:Your live coding demo is boring me (2015) by mjbrownie on Friday January 25, 2019 @08:23PM (#19004098)
heres a weekend script I wrote as a prank. it just remaps your a-z keys and reads in from a renamed version of a file.

https://github.com/mjbrownie/hackertyper.vim

Re:Your live coding demo is boring me (2015) by eterm on Friday January 25, 2019 @03:29PM (#19002192)
Re:Your live coding demo is boring me (2015) by SketchySeaBeast on Friday January 25, 2019 @03:47PM (#19002350)
Wouldn't that just be watching you type the mistakes again, but this time without the cursing?

Edit, I see you can manually update stuff.

Re:Your live coding demo is boring me (2015) by sbr464 on Friday January 25, 2019 @08:12PM (#19004057)
This app works pretty well. I turn it on during hackathons etc, to show work done.

http://getscreenninja.com

Re:Your live coding demo is boring me (2015) by exlurker on Friday January 25, 2019 @03:26PM (#19002156)
And don't record Ctrl+X and DEL and it's going to be more interesting. And mute that nerdy vocal frier. :)
Re:Your live coding demo is boring me (2015) by lhorie on Friday January 25, 2019 @03:44PM (#19002320)
scrimba.com comes to mind
Re:Your live coding demo is boring me (2015) by sciencewolf on Friday January 25, 2019 @03:47PM (#19002343)
Came here to say this, Scrimba is a thing and it's very well done. I just took a look, and it seems like their original premise didn't really take hold-- they're mostly pushing tutorials now, which is probably the most common use case.
Re:Your live coding demo is boring me (2015) by anonytrary on Friday January 25, 2019 @05:11PM (#19003039)
I thought they were primarily for tutorials. What was their original premise? Do you mean the whole "use our framework instead of react" thing?
Re:Your live coding demo is boring me (2015) by RcouF1uZ4gsC on Friday January 25, 2019 @07:28PM (#19003894)
You could probably do something like that using vim macros.
Re:Your live coding demo is boring me (2015) by brlewis on Friday January 25, 2019 @04:15PM (#19002539)

   script -r
   script -p
Re:Your live coding demo is boring me (2015) by yorwba on Friday January 25, 2019 @04:29PM (#19002678)
Which version of script are you using? Mine replies to script --version with "script from util-linux 2.31.1". It doesn't support those flags.

However, I can use it like this:

  script --command='vim code.py' --timing=typescript.timing typescript
  scriptreplay -t typescript.timing -s typescript
Re:Your live coding demo is boring me (2015) by brlewis on Friday January 25, 2019 @04:47PM (#19002839)
I'm on a Mac running High Sierra at the moment.