955 reputation
511
bio website
location
age
visits member for 3 years, 10 months
seen yesterday

Dec
29
comment Is a day really 24 hours long?
@ChrisF: The day does not end at 23:59:59, that's just a limitation of our quantised time representation. 23:59:59 is a point in time, not a period of time one second long. The point of time 00:00:00 is exactly at the boundary of two adjacent days.
Dec
20
comment How do we differentiate between a computer and a calculator?
@ManojR: Recursion is a form of looping construct.
Dec
16
comment What is the reason behind the if syntax of CoffeeScript?
@RossPatterson: CoffeeScript also has unless.
Dec
6
answered Is there a purpose for using pull requests on my own repo if I am the only developer?
Nov
15
comment Do functional generics exist and what is the correct name for them if they do?
My understanding of the example code was that Person and Car are types. Probably best to wait for the OP to clarify or respond.
Nov
15
comment Do functional generics exist and what is the correct name for them if they do?
I don't believe this question is about dependent types. None of the examples in the question require dependent types.
Nov
15
answered Do functional generics exist and what is the correct name for them if they do?
Nov
12
comment Is O(1) random access into variable length encoding strings useful?
@JoachimSauer: Yes, that's why I included the caveat: "In either case it'll only work for a subset of Unicode -- combining marks, bi-di text, complex shaping rules et c. will break it".
Nov
12
awarded  Enthusiast
Nov
11
comment Is O(1) random access into variable length encoding strings useful?
Ok, here is a specific example: if you're rendering with a monospace font, then being able to jump into the text by codepoint allows you to select a segment of the text to display a scrolling ticker/marquee, or place the cursor at the right codepoint boundary based on the position of a mouse click. (For the ticker, it's easier to store a byte-index directly, so it just turns into normal sequential iteration over the text which doesn't need random access. In either case it'll only work for a subset of Unicode -- combining marks, bi-di text, complex shaping rules et c. will break it)
Nov
11
comment Is O(1) random access into variable length encoding strings useful?
Sorry, did you forget to push the change? I don't see any specific example of an operation that benefits from random access, only mention of the general areas of word processing and text rendering.
Nov
11
comment Is O(1) random access into variable length encoding strings useful?
Could you give an example situation where random access to glyphs is useful?
Nov
11
comment projective geometry: how do I turn a projection of a rectangle in 3D into a 2D view
You are looking for a Homography. This can be computed directly from the four corner points of the rectangle in your input image, plus your (fixed) target points. I'm sorry I don't have time to write up a full answer, but this is a standard part of any computer vision course (for example, these lecture notes are relevant). For a library solution, OpenCV has findHomography.
Oct
25
comment What does it mean that StAX parsers aren't complete or correct?
Have you tried emailing the author of the slides for clarification? (Elliotte Harold). (If you get a response, perhaps you could post it as an answer here)
Oct
20
revised How to implement string matching based on a pattern
correcting a typo
Oct
20
revised How to implement string matching based on a pattern
Note that integer ranges can still be recognised as part of the regular language.
Oct
20
comment How to implement string matching based on a pattern
@PeterSmith: That also accepts '0', which is out of range.
Oct
19
answered How to implement string matching based on a pattern
Oct
19
comment Avoiding duplicate bug reports
I think, particularly in open source, you will occasionally come across developers who treat duplicate bug reports with contempt. They might just be having a bad day, or they might be too focused on their own concerns (e.g., a massive existing todo list) to recognise the value of bug reports, or they might be overestimating how easy it is to find the existing report (perhaps because they already know what search terms to use). Whatever the reason, don't let them make you feel bad -- reporting the bug is still the right thing to do.
Oct
19
comment Why did the ISO 8601 committee choose Monday as the first day of the week?
Sunday is part of the weekend. It wouldn't make much sense for the weekend to be at the beginning, would it? (only partly serious)