#ruby-offtopic - 15 November 2017
« Back 1 day Forward 1 day »
[00:58:47] baweaver: https://baweaver.gitbooks.io/an-illustrated-guide-to-ruby/content/assets/whoa_leamur.png
[01:03:35] RickHull: if you need musical accompaniment, "whoa a lemur" to the tune of https://www.youtube.com/watch?v=OTz8g8yh8GY
[08:28:56] baweaver: RickHull: I don't have the heart to tell them that's not how algorithm timing works
[08:31:44] elomatreb: I think you can get pretty nasty regexes just with anchors and quantifiers, no special features necessary
[08:32:00] RickHull: in the original sense of a regular expression, without backreferences or whatever is pathological
[08:32:30] dminuoso: Ive seen numerous denial-of-service attacks where input is passed to unsound regular expressions, by just abusing catastrophic backtracing.
[08:34:12] apeiros: heh. yeah. but I was actually referring to substring searches. some regex engines optimize those.
[08:34:32] RickHull: btw, this is a surprisingly good interview https://www.youtube.com/watch?v=sb-mU6wgeF8 I always thought billy corgan was a weirdo
[08:34:47] apeiros: but yeah, asking for whether regexen *in general* are O(n) betrays ignorance about either O notation, regexen or both
[08:35:36] apeiros: without added information I'd take it as length of string the regex tests against
[08:36:23] elomatreb: We just used n for everything including space complexity, we just had to define n at the start of every proof/operation
[08:39:31] apeiros: baweaver: iirc `/literal_regex/ =~ string` is the fastest way to match. afair it's optimized at parse-time.
[08:41:51] RickHull: dminuoso: regular expressions are merely utterances of a regular grammar (maybe?)
[08:43:58] dminuoso: RickHull: From that follows that regular expressions construct parsers that parse the specified regular grammar?
[08:45:17] dminuoso: Well, my grammar theory is rather weak. I know enough to construct recursive descend parser and why to avoid left recursive grammars.
[08:46:51] apeiros: RickHull: because regex can't handle nested expressions in general. perl's regex engine can, though.
[08:47:48] dminuoso: RickHull: Reason has to do with the constraint on non-terminals on the left side of a right regular grammar it seems.
[08:48:13] dminuoso: (While the right side of a production rule must have at most one terminal and non-terminal symbol)
[08:48:28] apeiros: you can fuzz your way around limited cases, but it's easy to make mistakes, why it's even in those cases usually not advisable to use a regex for html
[08:49:17] baweaver: Speaking of, new images and most of the way through to Arrays: https://baweaver.gitbooks.io/an-illustrated-guide-to-ruby/content/chapter1.html
[08:49:38] baweaver: Even made me a Matz - https://baweaver.gitbooks.io/an-illustrated-guide-to-ruby/content/assets/matz.png
[08:50:16] apeiros: baweaver: nice. why not use "do" in the times example? it'd read nicer, no? "eight times do print"
[08:50:53] dminuoso: baweaver: Can you juxtapose that face with this? https://image.ibb.co/n41h56/King_julien_all_hail_king_julien.jpg
[08:51:58] baweaver: Tenderlove will likely get his hotdog hat if I find a good reason to sneak him in there
[08:52:54] baweaver: Metz, Mai, Owen, Rook, Radar, Tenderlove, and a few others are on the likely quote list
[09:42:06] apeiros: ACTION will probably have to learn about which pragma forces oracle to temp store the result of a CTE :-|
[09:46:11] apeiros: interesting. now it runs the CTE 60x instead of 240x… still 59x more than I expected. the fuck.
[09:59:27] apeiros: the CTE was actually only executed 3x (once for each select in a union all statement)
[10:01:17] apeiros: was lead astray by sql developer not actually executing a function in a select for each row the select *would* return since it only loads the first N records
[10:01:47] apeiros: (i.e. select would touch 1000 records, but since sql developer pages, it only actually touched the first 50 records)
[14:48:34] apeiros: what I used it for was to insert data into a log table from within a function which was called repeatedly in a select
[14:48:53] apeiros: without that pragma, the query will fail, telling you that dml statements in a select are invalid :)
[14:53:33] apeiros: I generally prefer postgresql, a lot. but I really wish pg had MERGE INTO (oracle does)
[17:52:31] havenwood: Good! There're a lot more people than last year. Either Ruby is getting more popular or maybe people like New Orleans more than Cleveland. ;-0
[17:53:10] havenwood: baweaver: Matz gave a big nod to the spike for a register rather than stack-based VM and a JIT to go along with it.
[17:58:42] havenwood: I'm going to propose I come up from the 3rd to the 10th, so just sandwiching the party!