#ruby - 12 June 2019
« Back 1 day Forward 1 day »
[01:56:54] zxq2: with TLS, using an ephemeral key exchange algorithm, the ServerKeyExchange message is digitally signed using the key from the server's certificate, right?
[03:06:56] comet23: I would like to call a class method from within another class during the initialization process
[07:35:50] xco: hi! I need help making this if clause a one-liner https://gist.github.com/xcobar/23d919440b2779cf10c7c88a87a0076f
[09:02:29] phaul: xco: in that example the return is not needed as there is nothing in the method that's after it
[09:07:21] phaul: one has to know what do_something! does to see what this code does, which makes it worse than the original imho
[10:07:54] NL3limin4t0r: xco: If you don't mind returning the value of `do_something!` you can do `return do_something! if something?`. Alternatively if you really want a oneliner and you know the result of `do_something!` is always truthy you can do `do_something! and return if something?`. You could also stick the contents in a helper `def validate_something; return true unless something?; do_something!; false; end` then `return
[10:11:05] xco: NL3limin4t0r: thanks. i ended up doing `return do_something! if something?` anyway :)
[11:19:38] cek: /usr/include/features.h:330:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp] # warning _FORTIFY_SOURCE requires compiling with optimization (-O)
[11:23:58] cek: trying to understand why 2.4.3, which is higher than r43439 , doesn't experience https://redmine.ruby-lang.org/issues/12950 , but 2.4.4 and higher do
[19:59:16] rokra: Hey I m getting an error by doing an insert into : You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'error_log' Safe Mode Restriction-Bypass Issue'
[20:13:55] liKe2k1: Hey guys, how can I optimize multiple regex group matches. Currently 16 matches (sperate lines with line =~ regex) takes about 2 seconds..
[20:17:13] liKe2k1: body.each_line do |chunk] ... if body ~= regex do ...is not the best to reach the goal
[20:17:56] havenwood: liKe2k1: If you're not using the match data from ~=, it's faster to use #match? too.