3 ms·
One of my programming assignments for a programming languages class happened to be creating a DFA for regular expressions by taking successive derivatives, exce
by saagarjha 8y ago
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…
- arethuza 8y agoI think university classes, especially more advances courses, are often strongly influenced by the research areas of the people doing the teaching.
- schwurb 8y ago> 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!