News for hackers. Stuff that matters.
Re:Bach's prelude in C major written in sed by notkaiho on Saturday March 14, 2020 @12:03PM (#22576263)
I, uh, applaud the sheer chutzpah and will that would go into making something like this.

Only after the piece finishes in full, not in between movements, of course.

Re:Bach's prelude in C major written in sed by sramsay on Saturday March 14, 2020 @05:42PM (#22578950)
I love showing students sed, and then teaching them regular expressions, then showing them sed again, and then showing them stuff like this. sedtris is another fun example:

https://github.com/uuner/sedtris

Re:Bach's prelude in C major written in sed by fortran77 on Saturday March 14, 2020 @04:45PM (#22578527)
Not quite. This piece has three voices. There are two half notes in each measure, that start on beats 1 and 3, and there is a dotted eight tied to a quarter note that starts on beats 1+1/16th and 3+1/16th

See: https://www.pianoshelf.com/sheetmusic/728/bach-bwv-846---wtc...

Re:Bach's prelude in C major written in sed by sramsay on Saturday March 14, 2020 @05:40PM (#22578934)
Definitely. I propose we do this properly using only GNU parallel and m4 macros.
Re:Bach's prelude in C major written in sed by andrei-mircea on Sunday March 15, 2020 @12:08PM (#22584187)
Re:Bach's prelude in C major written in sed by claudiawerner on Sunday March 15, 2020 @01:59PM (#22585205)
Amazing; I love the way he describes the usage of the program from first principles, and the programmatic translation of musical techniques, which is quite ingenious. Well worth a watch (and listen).
Re:Bach's prelude in C major written in sed by LessDmesg on Saturday March 14, 2020 @03:35PM (#22578023)
My compiler only supports C11, how do you compile C major?
Re:Bach's prelude in C major written in sed by lelf on Saturday March 14, 2020 @03:51PM (#22578141)
C11 (C—E—G—Bb—D—F) is a superset of C major (C—E—G), so just use it.
Re:Bach's prelude in C major written in sed by del_operator on Saturday March 14, 2020 @03:53PM (#22578153)
Oh, wow. Is it common that Bach Prelude refers to Well Tempered Clavier or was I just biased by my obsession with Gould and his WTC book 1 prelude?
Re:Bach's prelude in C major written in sed by pierrec on Saturday March 14, 2020 @04:44PM (#22578523)
It's correct, the WTC is a collection of preludes and fugues. The first one is the Prelude in C Major.
Re:Bach's prelude in C major written in sed by Wowfunhappy on Saturday March 14, 2020 @05:04PM (#22578683)
Can this be made to work with OS X’s built-in SED? I’m getting:

    sed: 34: bach.sed: RE error: invalid repetition count(s)
Re:Bach's prelude in C major written in sed by rubyn00bie on Sunday March 15, 2020 @01:49PM (#22585084)
Probably gonna need to install gnu-sed... the system one isn't very good.
Re:Bach's prelude in C major written in sed by codr7 on Saturday March 14, 2020 @06:42PM (#22579309)
I initially read that as "Bash's prelude in C", which still makes more sense to me.
Re:Bach's prelude in C major written in sed by ShorsHammer on Sunday March 15, 2020 @07:44AM (#22582892)
24 SLOC. Beautiful.