Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

One of my programming assignments for a programming languages class happened to be creating a DFA for regular expressions by taking successive derivatives, except slightly modified to use ranges because the naïve method of taking derivatives isn't great when you have to take 2^(2^16) of them when your alphabet is UTF-16 characters.

Actually, now that I think about it, the entire class was strangely centered around taking derivatives of regular expressions…



I think university classes, especially more advances courses, are often strongly influenced by the research areas of the people doing the teaching.


> except slightly modified to use ranges because the naïve method of taking derivatives isn't great when you have to take 2^(2^16) of them when your alphabet is UTF-16 characters.

The paper we read described how instead of deriving by a single character, one could also derive by sets of characters. I then improvised the range approach by myself - it was very cool being able to handle unicode!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: