« Back to channel list

#ruby-offtopic - 15 November 2017

« Back 1 day Forward 1 day »
[00:06:18] baweaver: eam: We have a new Square :D
[00:08:16] nofxx: has joined #ruby-offtopic
[00:28:00] Technodrome: has joined #ruby-offtopic
[00:45:11] Technodrome: has joined #ruby-offtopic
[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
[02:51:22] nofxx: has joined #ruby-offtopic
[02:54:35] guacamole: has joined #ruby-offtopic
[03:09:40] guacamole: has joined #ruby-offtopic
[03:52:28] Technodrome: has joined #ruby-offtopic
[04:31:01] RickHull: DeBot_: !hangman ruby 4
[04:31:01] DeBot_: ␣␣␣␣␣␣␣␣␣ [] 0/4 (ruby)
[04:31:04] DeBot_: ␣␣␣␣␣␣␣␣␣ [e] 1/4 (ruby)
[04:31:08] DeBot_: ␣␣␣␣␣␣␣␣␣ [ea] 2/4 (ruby)
[04:31:15] DeBot_: ␣i␣␣␣␣␣␣␣ [ea] 2/4 (ruby)
[04:31:20] DeBot_: ␣i␣␣␣␣␣␣␣ [eao] 3/4 (ruby)
[04:31:23] DeBot_: ␣i␣␣u␣␣␣␣ [eao] 3/4 (ruby)
[04:31:42] DeBot_: Fixnum#** [eao_] 4/4 (ruby) You lost!
[04:32:20] RickHull: DeBot_: !hangman ruby 4
[04:32:20] DeBot_: ␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣ [] 0/4 (ruby)
[04:32:24] DeBot_: ␣␣␣␣e␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣ [] 0/4 (ruby)
[04:32:27] DeBot_: ␣␣␣␣e␣␣␣␣␣␣a␣␣␣␣␣␣␣a␣␣␣␣␣␣ [] 0/4 (ruby)
[04:32:33] DeBot_: ␣␣␣␣e␣␣␣␣␣␣a␣␣_␣␣␣␣a␣␣␣_␣␣ [] 0/4 (ruby)
[04:32:40] DeBot_: ␣␣␣␣e␣::␣␣␣a␣␣_␣␣␣␣a␣␣␣_␣␣ [] 0/4 (ruby)
[04:33:04] DeBot_: ␣␣␣␣et::␣␣␣a␣␣_␣␣␣␣a␣␣␣_␣␣ [] 0/4 (ruby)
[04:33:20] DeBot_: S␣␣␣et::␣␣␣a␣␣_s␣␣␣a␣␣␣_␣␣ [] 0/4 (ruby)
[04:33:38] DeBot_: S␣␣␣et::␣␣␣a␣␣_s␣␣␣a␣␣␣_␣␣ [i] 1/4 (ruby)
[04:33:49] DeBot_: S␣␣␣et::u␣␣a␣␣_s␣␣␣a␣␣␣_u␣ [i] 1/4 (ruby)
[04:34:00] DeBot_: So␣␣et::u␣␣a␣␣_so␣␣a␣␣␣_u␣ [i] 1/4 (ruby)
[04:34:10] DeBot_: So␣␣et::un␣a␣␣_so␣␣a␣␣␣_un [i] 1/4 (ruby)
[04:35:14] RickHull: what ends in "..._un" ?
[04:35:40] RickHull: also starts with un, heh
[04:35:56] DeBot_: Socket::un␣ack_socka␣␣␣_un [i] 1/4 (ruby)
[04:36:06] DeBot_: Socket::unpack_socka␣␣␣_un [i] 1/4 (ruby)
[04:36:42] DeBot_: Socket::unpack_sockaddr_un [i] 1/4 (ruby) You won!
[05:35:34] Exhiled: has joined #ruby-offtopic
[06:41:26] LongyanG: has joined #ruby-offtopic
[06:45:14] apeiros_: has joined #ruby-offtopic
[07:32:54] mikecmpbll: has joined #ruby-offtopic
[08:28:56] baweaver: RickHull: I don't have the heart to tell them that's not how algorithm timing works
[08:29:19] RickHull: i'll catch up in a few :)
[08:29:28] baweaver: not really worthwhile
[08:29:36] baweaver: basically said I'll do my thing
[08:30:08] elomatreb: "Regexp should be O(n)" I wish
[08:30:46] RickHull: i think there's something to be said for less powerful but syntax-similar PCRE
[08:30:52] RickHull: or maybe that's posix or egrep or whatever
[08:31:16] RickHull: there should be a friendly regex format that has limited pathological cases
[08:31:44] elomatreb: I think you can get pretty nasty regexes just with anchors and quantifiers, no special features necessary
[08:31:47] dminuoso: 09:21 scientes | well, is ruby's regexp O(n)?
[08:32:00] RickHull: in the original sense of a regular expression, without backreferences or whatever is pathological
[08:32:02] dminuoso: elomatreb: Indeed. With catastrophic backtracing they completely explode.
[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:32:44] elomatreb: Yeah that Stackoverflow from a while ago comes to mind
[08:33:06] apeiros_: elomatreb: regexp can happen to be sub O(n) btw. :)
[08:33:12] dminuoso: apeiros_: o/
[08:33:39] elomatreb: `//` should be pretty fast
[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:41] RickHull: but it turns out, he's just a pro wrestling president
[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:07] elomatreb: Also what's n, length/complexity of the expression or input
[08:35:36] apeiros: without added information I'd take it as length of string the regex tests against
[08:35:41] RickHull: where there is any doubt / ambiguity, it's always good to define n, m, o, p
[08:36:22] RickHull: j, k, l, m w/e
[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:36:55] RickHull: let n be the number of dimensions the multiverse occupies
[08:37:09] baweaver: The entire issue is the way they're using regex in there is silly
[08:38:06] apeiros: toplevel include Enumerable is lovely
[08:38:36] apeiros: and out.putc('\n') probably doesn't do what they want it to :D
[08:39:31] apeiros: baweaver: iirc `/literal_regex/ =~ string` is the fastest way to match. afair it's optimized at parse-time.
[08:39:40] apeiros: requires the regex to not have any interpolation iirc
[08:40:10] apeiros: dminuoso probably knows how to check whether what I just said is true :D
[08:40:29] apeiros: ACTION off to optimize a duplicate contact matching algorithm
[08:40:54] dminuoso: apeiros: I dont understand regular expressions at all sadly.
[08:41:51] RickHull: dminuoso: regular expressions are merely utterances of a regular grammar (maybe?)
[08:42:02] baweaver: "Starting to suspect you're not really here for advice"
[08:42:05] baweaver: ACTION whistles
[08:42:30] dminuoso: RickHull: Wow. :o
[08:42:43] dminuoso: RickHull: That was surpsiringly helpful.
[08:43:58] dminuoso: RickHull: From that follows that regular expressions construct parsers that parse the specified regular grammar?
[08:44:20] RickHull: presumably, but the devil is in the details
[08:44:38] RickHull: there is a law of regularity which PCRE violates
[08:45:07] RickHull: i haven't examined the details in a while
[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:45:21] RickHull: but apeiros can recall why regex can't/shouldn't parse html
[08:45:28] dminuoso: (Well and LR parsers as well, but those are annoyign as heck)
[08:46:51] apeiros: RickHull: because regex can't handle nested expressions in general. perl's regex engine can, though.
[08:46:52] dminuoso: RickHull: Oh its quite easy.
[08:46:57] RickHull: like you, my grammar theory is weak. I want to improve :)
[08:47:17] RickHull: apeiros: <3
[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:03] RickHull: oh dear, I'm going to have to save this for later
[08:48:13] dminuoso: (While the right side of a production rule must have at most one terminal and non-terminal symbol)
[08:48:27] dminuoso: Boy this looks weird.
[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:48:35] baweaver: https://rust-leipzig.github.io/regex/2017/03/28/comparison-of-regex-engines/
[08:48:50] dminuoso: They just lack lemurs.
[08:49:11] apeiros: for example, consider this: /<p>(.*?)</p>/ -> "<p>foo <!-- </p> --> bar</p>"
[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:26] apeiros: the regex seems trivial enough, yet it'll fail for the given example.
[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:34] baweaver: It's a to do
[08:50:35] apeiros: bad interpunctuation :D
[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:16] dminuoso: Or just give Matz his hat.
[08:51:39] baweaver: More than likely I'll give shoutouts to a few people in and around
[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
[08:53:20] baweaver: Namely because I can find pictures of them around too to adapt :D
[08:54:09] baweaver: Speaking of, still need to get a havenwood pic later to use there (*hint*)
[09:02:20] kapil___: has joined #ruby-offtopic
[09:40:27] apeiros: ok, oracle lolwtf again
[09:41:02] apeiros: CTE is executed multiple times. if I get that right, about 240x in my case.
[09:42:06] apeiros: ACTION will probably have to learn about which pragma forces oracle to temp store the result of a CTE :-|
[09:44:02] apeiros: ok, seems like `select /*+ materialize */ ... from` would do
[09:46:11] apeiros: interesting. now it runs the CTE 60x instead of 240x… still 59x more than I expected. the fuck.
[09:59:05] apeiros: oh, ok, my fault :D
[09:59:27] apeiros: the CTE was actually only executed 3x (once for each select in a union all statement)
[10:00:14] apeiros: typo, 4x (hence ~240 -> ~ 60)
[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)
[11:30:35] tcopeland: has joined #ruby-offtopic
[11:52:21] workmad3: has joined #ruby-offtopic
[12:33:31] tcopeland: has joined #ruby-offtopic
[12:53:39] dminuoso: baweaver: There was a talk on youtube.
[12:54:11] dminuoso: baweaver: Some minitalk about transducers.
[13:34:44] Mon_Ouie: has joined #ruby-offtopic
[13:52:43] workmad3: has joined #ruby-offtopic
[14:02:19] tcopeland: has joined #ruby-offtopic
[14:17:42] pwnd_nsfw`: has joined #ruby-offtopic
[14:42:13] workmad3: has joined #ruby-offtopic
[14:47:59] apeiros: TIL pragma autonomous_transaction
[14:48:09] apeiros: really useful when debugging oracle functions
[14:48:28] tcopeland: has joined #ruby-offtopic
[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:52:00] dminuoso: Dont get me started on oracle.
[14:52:07] dminuoso: It's the main reason we haven't switched to Elixir yet. :(
[14:53:01] apeiros: no driver?
[14:53:33] apeiros: I generally prefer postgresql, a lot. but I really wish pg had MERGE INTO (oracle does)
[14:53:55] dminuoso: apeiros: no stable ecto driver
[14:54:17] apeiros: oh, oy, already 1600? gotta run :-S
[15:08:57] pwnd_nsfw: has joined #ruby-offtopic
[15:17:29] apeiros: has joined #ruby-offtopic
[15:42:33] apeiros: has joined #ruby-offtopic
[16:03:19] apeiros: has joined #ruby-offtopic
[16:34:01] apeiros: has joined #ruby-offtopic
[16:35:39] apeiros: has joined #ruby-offtopic
[17:00:14] Exhiled: has joined #ruby-offtopic
[17:01:44] apeiros: has joined #ruby-offtopic
[17:06:05] apeiros: has joined #ruby-offtopic
[17:31:07] Technodrome: has joined #ruby-offtopic
[17:35:18] tcopeland: has joined #ruby-offtopic
[17:46:34] Exhiled: has joined #ruby-offtopic
[17:49:19] baweaver: dminuoso: It was havenwood
[17:50:22] baweaver: Well, rather Havenwood gave one
[17:50:27] baweaver: Might not be the one you saw though
[17:51:18] baweaver: How's RubyConf havenwood?
[17:51:29] baweaver: Still kicking myself that I didn't think of going
[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:53:44] havenwood: https://github.com/vnmakarov/ruby
[17:53:57] baweaver: He was talking a lot about VS Code's entire system of progressive type hinting
[17:54:05] havenwood: RTL MJIT is doing 2.8x Ruby 2.0 performance with 1.16x memory on optcarrot.
[17:55:44] eam: oh, is rubyconf why folks are talking about NOLA recently?
[17:56:54] baweaver: havenwood: Got a start date lined up?
[17:57:07] havenwood: baweaver: Writing the email right now!
[17:57:14] havenwood: Proposing I start on the 3rd!
[17:57:14] baweaver: Just get it in before Dec 8th :D
[17:57:21] baweaver: Holiday party \o/
[17:57:30] havenwood: \o/ /o/ \o/
[17:57:45] baweaver: what's up with the middle person?
[17:58:42] havenwood: I'm going to propose I come up from the 3rd to the 10th, so just sandwiching the party!
[17:59:56] baweaver: They typically have two start dates a month
[18:00:17] havenwood: Any idea what they are?
[18:00:29] baweaver: 1st and halfway
[18:00:38] baweaver: transposed to nearest weekday
[18:00:43] baweaver: well, Monday
[18:33:58] BenjaminK_: has joined #ruby-offtopic
[18:34:27] BenjaminK_: has left #ruby-offtopic: ()
[18:36:10] Exhiled: has joined #ruby-offtopic
[18:45:04] Technodrome: has joined #ruby-offtopic
[18:49:57] guacamole: has joined #ruby-offtopic
[19:33:21] Technodrome: has joined #ruby-offtopic
[19:55:42] Exhiled: has joined #ruby-offtopic
[20:16:18] mikecmpbll: has joined #ruby-offtopic
[20:26:54] apeiros: has joined #ruby-offtopic
[21:23:56] Exhiled: has joined #ruby-offtopic
[21:32:59] guacamole: has joined #ruby-offtopic
[21:52:43] pwnd_nsfw`: has joined #ruby-offtopic
[22:04:52] pwnd_nsfw: has joined #ruby-offtopic
[22:12:22] baweaver: RickHull: This could be the new game, reply in Haikus to everyone
[22:12:23] baweaver: used to be everything was a pun
[22:12:47] RickHull: ha, it's tough
[22:32:58] guacamole: has joined #ruby-offtopic
[22:51:55] kapil___: has joined #ruby-offtopic
[22:55:15] eckhardt: has joined #ruby-offtopic
[23:33:48] nofxx: has joined #ruby-offtopic
[23:35:41] eckhardt: has joined #ruby-offtopic
[23:35:59] naprimer2: has joined #ruby-offtopic