人生苦悶,奇文共賞
腐朽和期待
只知道此刻愛妳
Fun with control characters and the web
Yesterday, I broke WanderingThoughts ' syndication feeds (and madethe main page not validate). I did this by accidentally putting a ^Dcharacter into an entry ; oneof the editors I use makes this unfortunately easy to do by accident,and hard to spot.
Neither HTML 4.01 Transitional nor XML (which the Atom syndicationformat is a dialect of) allow control characters (apart from tabs(and linefeeds)). A lot of things are forgiving of crappy HTML, butthings that eat Atom
請各位聯署,任何人都可以聯署
節同時異,我勞如何
還是應節吧。
〈寫給別人〉 夏宇
我在他的手心上寫字筆劃繁複
到成其為勾引而且還寫錯了
又擦掉重寫一橫一豎
一捺一撇勾勒摩擦引他
進入一個象形皮筏裏我把
皮筏的氣放掉我們沉入
湖裏我說我愛你
沒有
An advantage of using a non-standard shell
One of the surprising advantages of using a completely non-standardshell (in my case, Byron Rakitzis' Unix version of rc ) is all of the things that are not automatically set up for you by modern systems. As someone I read found out recently ,these days this includes colourized ls listings, colourizedsuper-intelligent vi , and so on.
(I might not mind colourization so much if it paid any attention to whatthe baseline terminal colours were, but I haven't seen that happen yet.
寫小說.做善事
GNU bc for the birthday paradox
So that I don't have to redo this again if I ever need it, the GNU bcmagic for the Birthday paradox stuff isas follows. First, you need to start GNU bc as bc -l to load the mathlibrary, then:
define p(n, m) {return 1 - e( (-(n * (n-1))) / (2*m))}define p32(n, m) {return p(n, 2^The problem with <pre>
Generally,
is a fine thing, and it's become the de-facto way ofwriting any number of 'computer' things; code, Unix sessions, evenequations, as as various WanderingThoughts entries illustrate. Butthere's a problem with it:text doesn't line-wrap .The consequence is that if you write a long
line, the browser willhappily force a line wider than the browser window, making the readereither widen their browser (Menu
![]()