« first day (3176 days earlier)      last day (1758 days later) » 

9:00 PM
if you use mac or linux or similar i can she you the delimiter thing with awk really easily
 
@tjt263 using it for english assignments is so obnoxious and pretentious but pretty fun. I used it for a presentation once and that was fun too, even though i had to learn how to use beamer; of course it was turned in like a week late, but whatever.
 
@texdr.aft haha just one week. you must be fast
 
\documentclass{article}
\begin{document}
\saveimageresource {example-image.pdf} %ok
%\saveimageresource {"example-image.pdf"} %nok
%\saveimageresource {"example-image".pdf} %nok

xxx
\end{document}
@DavidCarlisle ^^^^
 
@tjt263 i try to write code but i'm not good at it.
 
i was worried it might seem pretentious, but i dunno. good is good
 
9:02 PM
@UlrikeFischer hmm
 
awk is like sed right
 
@texdr.aft
well, both.. absolutely.. and not at all
it's used for similar things
and they both utilise regex i.e. regular expressions
which i think is also a donald knuth thing
or maybe dennis ritchie or ken thompson
 
dennis ritchie i believe
he introduced the unix world to regex with ed
have you every tried ed?
 
well sed is based on ed
 
@DavidCarlisle but \saveimageresource{Neuer Ordner/bild mit leerzeichen.pdf} works fine.
 
9:05 PM
@yo' -- Good. (You can ask your friend a question for me. I once "failed" a canoe "certification" by being unable to swamp a canoe. The test was to swamp the thing, then shake it out and get back in. I could jump out and get back in without flipping it, and I could shake out a water-filled canoe, but I never did manage to fill one with water. Would your friend let me pass the test?)
 
i have used ed, but i don't.
i use vim
and only recently
 
Knuth didn't really have anything to do with regex, but he did invent LR parsing
 
i don't know what that is either
 
ed is almost impossible to use nowadays
 
whys that
 
9:06 PM
@UlrikeFischer yes I had this working (but maybe that was part of the code I never merged over top Franks utf8 and space branch) not the primitive of course but in teh latex back end removing all "
 
i think i just use bash like people use ed
 
@tjt263 eek go away we all use emacs here (@PauloCereda)
 
you do?
 
yo'
@barbarabeeton sorry, I'm afraid I'm lost with vocabulary there (and I'm losing against time, I get up in 7.5 hours)
 
well i believe that sed and definitely awk are parsed using yacc which is an LR-based parser generator
 
9:08 PM
is anyone else impressed this kid is still in highschool
 
whatever
 
i think i had one interest in highschool, and it wasn't computer science
 
oh also in metafont you can actually enter systems of equations and it will automatically define the variables by solving it
 
@yo' -- "swamp" = fill with water, but don't necessarily sink. "shake out" = while one is in the water, slosh the water-filled canoe back and forth to get as much water out of it as possible. Does that help? Anyhow, sleep well and travel safely.
 
i just have a lot of time
 
9:11 PM
you have all the time. but you won't always. try to use it wisely, i wish i did
 
and a+b+2c=3 will define a b and c with "dependencies" on the other variables if they aren't defined yet
 
that seems appropriate
 
also that isn't an assignment statement
 
did knuth ever work with ritchie. i'm thinking no, but maybe he should have
 
assignments are with the algol := operator
 
9:12 PM
oh
what is it then
 
it's an equation
metafont just has equations as a language construct
 
but you said it defines a and b and c right?
that sounds like assignment
 
3=5 evaluates to true and 3=x sets x to 3
it does assign values
 
yeah, the sounds like it is assignment
 
yo'
@barbarabeeton oh. Swamping is pretty useless IMHO, you don't need that on WW1 or WW2; can be useful as a measure you can well manipulate the boat for >WW2.
 
9:13 PM
by definition
 
that's true :)
 
so, can you draw SVGs with metafont
 
sadly no
 
draw something like.. a figure 8
oh
wha's it even good for then
 
tex fonts
you can fake drawings by defining a font with just a few huge characters
 
9:15 PM
that seems like a highly specific thing to be interested in for someone who doesn't really use latex
 
i don't use it because i have no need to
 
i'm only interested in it because i use it
 
i managed to get the entire computers and typesetting series and i'm reading it now so it's relevant
 
and even then i'm so bored and frustrated with it i'd never do it by choice!
 
"reading" as much as one can read TeX the program
try plain tex
 
9:17 PM
i mean, I'm interested in this conversation on another level, but still
 
i think knuth's setup is a format built off of plain tex and metapost
 
so what can you do with metafont (or is it meta post) exactly. show me a cool thing that you can do. prog
write a little program to demo it
 
i mean
i don't know the language
 
sounds like you do
 
if you look at most (la)tex-produced output they'll use the computer modern typeface and you can see what it does there
 
9:20 PM
i mean i write in other languages, and i don't fully understand them. i don't think anybody does really. you just know enough to do what you need to do, and if you don't you figure it out. it never really stops
 
not enough to actually use it though
 
i think you might surprise yourself if you actually have a task
that's how it usually works with programming
in the beginning anyway
you don't know what to do until you have to do.. something
i think that's why they call it hacking
it's like hacking through a jungle with a machete
 
i agree completely
for most languages
not metafont
 
"necessity is the mother of invention" is something i heard somewhere. it's kinda like that
 
but as a substitute for my inability
the following page shows the output of the program listing there
 
9:25 PM
where'd @marmot go
 
the document says page 7 but it's logically page 21
 
@texdr.aft hey you might be interested to read about Pierre Bézier if you haven't already
 
i'm familiar with bezier curves but if there's something else about him then i will
 
like how you are interested in knuth and this stuff]
i think you might find it interesting is all
 
a while ago I was trying to begin to develop a program for music notation but one that's actually good
so i learned about bezier curves
for drawing slurs which i now realize is probably a special case of the problem metafont solved
 
9:29 PM
you mean treble clefs and crotchets and quavers etc
or midi piano roll stuff
 
specifically i mean the curvy things here:
if you're familiar with notation then i don't mean to be patronizing
but anyway it turns out it's pretty difficult to automatically draw them and make them attractive
with no human intervention
 
i don't think thats true
 
lilypond has a whole essay about it
 
to draw this shape
(
 
for instance, imagine automatically producing this:
 
9:33 PM
its an arc
 
it's not an arc
well some of them are
but it varies in thickness and extrema
 
I've never seen it like that
i think theres a simple solution maybe
 
using the highest points of everything as control points?
and then trying to avoid collisions
 
are you drawing a path around it and filling it in
 
i'd divide the problem into two parts
 
9:35 PM
or are you drawing the centre line as an open path
 
one is determining the path
the other is making the thickness look natural
what do you mean by that?
wait nevermind
the latter
here you can see the variation in thickness i'm stressing
 
yeah, good, so the problem is what you might call the profile
 
the arrow is irrelevant and i didn't add it
 
exactly like that good example
 
the simple method doesn't work for many cases
 
9:38 PM
do you have adobe illustrator
 
i don't
this one "bottoms out" which the program would have to be able to do
 
@DavidCarlisle oi
 
it's quite simple to make this shape -- as a human
well it's simple to make the shape as a computer too
it's simple to make it generally and make it look good as a human
but not as a computer
 
@yo' Yay!
 
@texdr.aft Related to an earlier conversation you were having (about the TeX program): you may also be interested in this, someone's relatively clean manual translation of tex.web into C++: github.com/nadder/rstex/blob/3a324aa/rstex.cpp.pre
 
9:40 PM
@PauloCereda C-x C-s
 
@tjt263 look at the curvature of this one:
 
@DavidCarlisle :wq
 
@ShreevatsaR thanks
 
@PauloCereda ah, the secret escape code
 
@ShreevatsaR I stumbled across your repository of other tex implementations on github the other day
 
yo'
9:41 PM
@texdr.aft this one is a tie, not a slur
 
@tjt263 if the "pathfinding" were entirely based on avoiding collisions with high points, then it wouldn't be such an extreme shape
i'm speaking of the ridiculous thing connecting the g in the pickup measure to something we can't see in this picture
here's what lilypond does
even better:
in lilypond each slur starts at a different distance from the initial note, but in sibelius they start from the same point (or close to it)
 
@texdr.aft Ah ok, let me know if you find more :-)
 
lilypond is more attractive than sibelius here
maybe making it more curved like sibelius does is the way to go, but the thickness is imbalanced
the lowest point isn't the visual midpoint of the slur at all, and the thickest part should generally be centered
lllypond's slurs are too anemic to make any comment about their thickness
 
@ShreevatsaR hi mr. velociraptor!
 
@PauloCereda hi, long time since I was here… you welcome me every time :)
 
9:50 PM
@ShreevatsaR :)
 
@texdr.aft i'll show you something
 
the first slur in this image is an example of a good computer-generated slur
sadly it's occluded by the staff; ideally we'd take this into account too
@tjt263 oh?
someone on here asked about setting page layout according to some rule given in a 19th century manual or something, and someone responded "you mean where everything on the page depends on everything else on the page?" that's how i'd describe music notation when approached from an algorithmic/programming perspective
honestly i'd argue that "breaking systems of staves into lines" is slightly more complicated of a problem to formulate than breaking paragraphs into lines
(i definintely haven't solved anything, but it's just how it seems)
 
yo'
@texdr.aft It is much more complicated!
 
spacing should be determined at the system level, which means that, paradoxically, line breaks must be determined long before the actual spacing happens
i suppose that's how text justification works though
i'm trying to come up with an adequate way to describe the issue
 
Hi, I get a linebreak between \approx and 5 in \SI{\approx5}{\micro\metre} is this a bug?
 
9:59 PM
this one is beautiful (not computer-engraved)
 
yo'
@JonasStein Ask @JosephWright
 
spacing actually happens on multiple levels, which i think is what makes it complicated
the spacing is disrupted by bars and key/time signatures, so these need to be taken into account
and then the actual space between the notes is determined, which is its own issue, and we need to allocate space for every interrupting element that can be moved (accidentals)
one that's done we can determine line breaks, but doing it like this requires respacing the lines that we've broken
i don't think at all that that's the best way but it's relatively simple
it's made much more difficult when we need to somehow make sure "bad" page breaks don't happen (fast runs across a page and there's no way to turn to the next one without an assistant)
oh and lyrics ruin everything. they are the reason that an automatic music engraving program needs to have a hyphenation algorithm implemented, and they also affect the spacing of everything.
 
yo'
@texdr.aft don't be foolish; hyphenation has nothing to do with breaking lyrics into syllables.
 
@JonasStein Example?
 
Ted Ross says that a music proofreader should have a dictionary with them to check hyphenation, so they were related at some point
 
10:13 PM
oh yea what does bob ross have to say about it
 
(In his "The art of music engraving and processing" from 1971)
 
yo'
@texdr.aft yep; but he has to rely on his sense of syllables, as especially English is crazy considering hyphenation
 
fair enough
 
hehe. bob ross was the man
 
yo'
Czech has simpler rules, for instance, but it also has complications of its own; vowel-less syllables being only one of them.
 
10:15 PM
@yo' do you know of any cases where hyphenation points don't correspond to lyric syllable division points?
i mean any cases where not a single one does
 
yo'
@texdr.aft well, consider for instance that blessed is sometimes one syllable and sometimes two, and only some typesetters typeset the latter as blessèd. How could an automated system decide this?
 
that's a good point @yo'
but it can if the music is expressed unambiguously (and it must be)
 
yo'
and there are many such words: vegetables is 2 or 3, for instance
 
from the information, how to appropriately divide a word may be determined
 
yo'
10:17 PM
and there's record: broken as re-cord as a verb and rec-ord as a noun.
 
that is definitely an undecidable case
without some analysis of the text
which is beyond the scope of most things
 
yo'
@texdr.aft even with it; there are sentences in which you need a very wide context to decide what is a verb and what is a noun. (I don't have examples atm)
 
of course
i feel like NLP in a music notation program is a little unnecessary
 
@texdr.aft see you you can assign profiles to the stroke and the curve
 
@tjt263 yes i was just about to respond
so that would be integrated into the "drawing slurs" system
or are you just demonstrating something
 
10:22 PM
the latter? maybe both? i dunno
 
@yo' in cases where the program can't determine syllable boundaries (which is a necessary part of music engraving, while in typesetting one can get away without hyphenation if they'll accept lower-quality output) it should just say "! Syllable boundaries ambiguous in 'record'" or something similar
when entering lyrics, the user can mark division points with hyphens
@tjt263 some of the final curves would be acceptable as a part of a slur
 
yo'
@texdr.aft not that I would ever be willing to rely on such a system; I would much more prefer to have a text editor fu to do this: syllabilize the lyrics automatically, show me the result (still in the text editor) and let me do what I wish to do with it.
 
but i think it can be automated is the point
yeah they're identical though
 
@yo' fair enough
 
it's been scaled is all
 
yo'
10:26 PM
@texdr.aft I can live with some loss of control in text typsetting (when it's automated, for instance). But I don't consider it acceptable in music typesetting
 
but you could also scale stroke weight as a ratio of the length
 
when preparing music using the very obscure method known as "autography" it is suggested to draw the start and end points and then connected
 
i think you want just a basic symmetrical taper
 
@yo' i think the user should be able to have total control over at least setting lyrics; they can choose whether they trust the program enough
 
yo'
@texdr.aft lyrics is only the very last thing. All over, music typsetting is either bad, or full of small touches and fine tuning.
 
10:28 PM
@tjt263 not necessarily; sometimes slurs are asymmetric and still look good
@yo' that's what everyone says, but i'm still interested in the problem
 
yeah, because of the curve
the taper is symmetrical, the line is curved
so the taper ends up skewed
 
yo'
@texdr.aft well, for most bad (or not perfect) music I can tell you what's wrong with it :-) but it's hundreds and hundreds of little things.
 
same
@tjt263 i want to try something, if you're up for it
here's an image of music with only a few slurs
nope
i wonder how using your curves to add a slur to this would look
oh and i remembered another complicating factor: vertical whitespace is very, very significant
 
10:51 PM
@texdr.aft it will look ideal
i took a bunch of shots.
all that is at the end, is a plain bezier curve with a symmetrically tapered profile
you should be able to do it with tikz ,etc
 
right
also i think i answered a question i asked a long time ago: does metafont allow you to manipulate n-order bezier curves. the answer is kind of
 
you can also do things like this imgur.com/a/UelhYSm
 
i'm curious about what the ridiculously complicated slurs would look like
but not as complicated as the real examples
 
show me one
 
just one where it "changes direction"
okay hold on
 
11:04 PM
high resolution
it's difficult dealing with rasters
actually i'm sure theres a latex package for music notation
 
there is
 
no good?
 
also here's a picture though idk if it's high enough resolution
i've already sent it but still
and no it's not very good
 
not really , i was looking at that one just now
but it'll have to do
 
it's impressive and amazing from a technical point of view but compared to other programs' output, it is lacking
but it's not quite as extreme
 
11:16 PM
@texdr.aft
its a nice 3 point bezier curve. with a tapered profile. very simple to draw mathematically as a vector
actually i drew it with 5 points inthink
can probably be done with 3
 
it probably doesn't really matter
 
of course it does
 
i mean it doesn't matter yet
 
we're talking about form
 
i'm messing with metafont and there's another weird/cool feature
and end-of-line doesn't really end anything. a statement only ends with a semicolon
it makes sense, but i expected a syntax error and didn't get one
 
11:25 PM
that's normal
 
yeah but i'm doing this in the command line
like metafont's repl
 
yeah.. i image you would be. sure
do you know C
 
ostensibly
but i only use python (because it's easier)
 
yeah, i can tell. well python is written in C, so it abstracts that kind of thing
 
i know
i mostly look at old, low-level code which is usually in c
i just don't really like the "modern" programming environment or whatever
 
11:29 PM
sure, but i can see there is something that you don't know. i have to set the stage for context somehow. anyway, the semicolon isn't EOL. it's just for the compiler really, i think
i think EOL is \0
what do you mean by that
 
like a hundred twenty-line files spread across ten directories
 
that is the old way
 
TeX is a single file
 
it can be
it all can be
 
meanwhile the modern re-implementations spread it out
 
11:31 PM
it's mostly for abstraction as well, and compartmentalisation. that's why you import modules. it's annoying sometimes but it pays off
 
oh i know. I just really like the idea of things being completely self-contained
 
thats what the header files are for (.h)
yeah, me too, but they never really are
nothing ever really is. it's all a bunch of things connected to other things. so we tend to look at things in layers
 
Going through the SAILDART archives, I came across the code for the pascal compiler they used (which was used to first compile tex) and it's a giant file of pdp-11 (i think) assembly code
it's cool
 
an apple is fully self contained to the average person, but not to a biologist, even less so to a chemist, and again to a physicist. programming is a lot like that
yeah, so that would be another layer. getting pretty atomic there
so i hope that was helpful, re: vector curves etc
 
yes for sure
 
11:39 PM
vectors are quite elegant compared to bitmapped rasters
 
metafont is internally all vectors
 
good
 
it's actually kind of impressive
but then it converts everything to raster font files
 
if you export to svg or pdf or eps etc it will be quite nice
 
does pdf support graphics as postscript does
 
11:52 PM
what do you mean
 
postscript can pretty much be used as a programming language to draw things
pdf is similar but i don't know if it can be used in the same way
obviously pdfs can contain graphics
 
well, it's compiled
mostly
post script isn't
you probably can't just type up a pdf. like you can postscript
 
you can open them in a text editor and see the commands
sometimes the entire file is compressed though
 
if you do strings 'file.ps' || cat 'file.ps' you'll probably be able to read the whole thing. with a pdf, you will get mostly garbled nonsense
 
right
most text in pdfs is compressed in some way (i forget exactly how)
 

« first day (3176 days earlier)      last day (1758 days later) »