你是誰?
莫強求
An example of an API that you can't do with C stdargs
(This is a followup to yesterday's entry .)
Update : I'm actually completely wrong about this, both in practiceon x86 machines with gcc and, I believe, in standards-compliant theory,as brought to my attention by nothings in comments.
One general class of impossible-in-C varargs APIs is heavily polymorphicdispatch APIs where you need to dispatch to one of several differentvarargs functions that have different constant arguments. Here is agratuitous (and probably bad) API example:
The limitations of C's varargs support
I've noted before that dealing with varargs functionsin C is vaguely annoying (although not as annoying as in the days beforethe ANSI C stdarg support). One of those annoyances is that C's stdargsupport is limited compared to what you can do in languages with firstclass support for variable argument counts.
The core limitation in C is that you can't manipulate the list ofvariable arguments that your function gets. Instead you have twochoices; you can pass it completely unaltered to a function that
Using Google's New Font Library for Headings...
Today Google announced they'd help advance web typography by hosting open-sourced fonts on their CDN, and by giving the code to easily embed fonts on websites on a new website, the Google Font Directory .
It was amazingly simple: just copy the code and paste it in your template's header, then set any element on your page to use the Google-provided font(s). I started using OFL Sorts Mill Goudy TT , and I like the look (except for the lower
Mindset
Inevitably, the priority of daily exercise tends to get eclipsed by the stressful job, examination, family and many other obligations. Be that as it may, our well-being depends on how we process our lives on the inside – on our thinking or mindset. I remember reading once an interesting psychology experiment by the researchers at
兒戲的中國哲學
昨天有個學生到我的辦公室,問我可不可以當他的honors thesis的指導教授。我問他打算寫甚麼,他說中國哲學,而找我是因為全系的教授中只有我在這方面有能力指