« Back to channel list

#ruby - 06 June 2017

« Back 1 day Forward 1 day »
[00:01:08] Trynemjoel: has joined #ruby
[00:03:20] jgnagy: has joined #ruby
[00:08:39] zotherstupidguy: has joined #ruby
[00:14:12] pb122: has joined #ruby
[00:14:31] bkxd: has joined #ruby
[00:17:00] nesoi: has joined #ruby
[00:18:21] Cohedrin: has joined #ruby
[00:20:36] iomotoko: has joined #ruby
[00:22:18] Bock: has joined #ruby
[00:27:26] iomotoko: has joined #ruby
[00:30:18] cschneid_: has joined #ruby
[00:31:09] charliesome: has joined #ruby
[00:31:22] nankyokusei: has joined #ruby
[00:34:25] dcluna: has joined #ruby
[00:37:31] chaugiang: has joined #ruby
[00:37:36] chaugiang: has left #ruby: ()
[00:41:00] zenspider: man... writing doco is BOOOORING
[00:41:19] centrx: has joined #ruby
[00:41:19] centrx: has joined #ruby
[00:43:23] nesoi: ok, so now I'm up to running rake again, and it's giving me this error:
[00:43:23] nesoi: rake aborted!
[00:43:23] nesoi: StandardError: An error has occurred, all later migrations canceled:
[00:43:23] nesoi: Directly inheriting from ActiveRecord::Migration is not supported. Please specify the Rails release the migration was written for:
[00:43:23] nesoi: the app wasn't written for any Rails release, it is a stand-alone that happens to use activerecord
[00:43:25] nesoi: so what can I do to fix this?
[00:43:26] nesoi: oops wrong channel. sorry!
[00:43:34] nesoi: sorry about that. trying to paste and clean it up
[00:44:06] nesoi: trying again.
[00:44:09] nesoi: ok, so now I'm up to running rake again, and it's giving me this error:
[00:44:10] nesoi: rake aborted!
[00:44:10] nesoi: StandardError: An error has occurred, all later migrations canceled:
[00:44:10] nesoi: Directly inheriting from ActiveRecord::Migration is not supported. Please specify the Rails release the migration was written for:
[00:44:10] nesoi: the app wasn't written for any Rails release, it is a stand-alone that happens to use activerecord
[00:44:10] nesoi: so what can I do to fix this?
[00:44:52] r3vDev: has joined #ruby
[00:44:55] nesoi: it took me a long time to get mysql to work, some old files were left over and interfering :(
[00:45:40] segmond: has joined #ruby
[00:48:14] nettoweb__: has joined #ruby
[00:50:03] Radar: nesoi: hi
[00:50:15] Radar: You need to inherit from ActiveRecord::Migration[5.0]
[00:51:06] nesoi: how do I do that?
[00:51:19] nesoi: currently it says:
[00:51:20] nesoi: require 'active_record'
[00:51:20] nesoi: require 'active_support/all'
[00:52:07] Radar: class YourMigration
[00:52:15] Radar: class YourMigration < ActiveRecord::Migration[5.0]
[00:52:41] bkxd_: has joined #ruby
[00:55:05] zenspider: still not ruby issues...
[00:56:16] nesoi: radar, so code like this would be modified?
[00:56:34] nesoi: task :default => :migrate
[00:56:34] nesoi: task :migrate => :environment do
[00:56:34] nesoi: ActiveRecord::Migrator.migrate(File.join("db", "migrate"), ENV["VERSION"] ? ENV["VERSION"].to_i : nil )
[00:56:39] Radar: ?gist nesoi
[00:56:39] ruby[bot]: nesoi: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[00:56:45] zenspider: nesoi: stop pasting crap in here
[00:56:59] Radar: nesoi: The code in the migration would need to be modified, yes.
[00:57:03] nesoi: zenguy_pc: that was 4 lines, isn't that ok?
[00:57:08] Radar: nesoi: no.
[00:57:08] nesoi: I mean zenspider
[00:57:11] Radar: Gist anything over 2.
[00:57:12] nesoi: ok, sorry!
[00:57:22] Radar: nesoi: Also since this is about parts of the Rails framework, take it to #rubyonrails.
[00:57:45] nesoi: it's not done in rails though
[00:57:52] zenspider: it IS rails code
[00:58:06] nesoi: there's no rails in the actual applications
[00:58:09] nesoi: just activerecord
[00:58:13] zenspider: which is... rails
[00:58:44] elomatreb: Folks in #RubyOnRails will probably still know more about it
[00:59:14] nesoi: radar: you seemed to know though, rather than starting over, how would I modify these so that they can run?
[00:59:34] Radar: +q nesoi!*@*
[00:59:37] Radar: Before zenspider beats me to it.
[00:59:43] Radar: nesoi: please, let's take this into #rubyonrails.
[00:59:59] nesoi: has left #ruby: ()
[01:03:13] Kneecaps: has joined #ruby
[01:04:57] zenspider: this might be common sense but I'm the whitest-hat ever... if I'm in-place encrypting a disk (a time machine disk) ... will it be proportional to the data or space?
[01:05:28] zenspider: it isn't unmounting or anything either... voodoo I tell you
[01:11:00] centrx: has joined #ruby
[01:11:01] centrx: has joined #ruby
[01:12:04] duderonomy: has joined #ruby
[01:12:08] d3d1rty: has joined #ruby
[01:17:25] charliesome: has joined #ruby
[01:21:13] jenrzzz_: has joined #ruby
[01:22:25] Radar: zenspider: #ruby-offtopic please
[01:22:38] zenspider: um... it's backing up ruby files
[01:23:11] zenspider: hrm... style issue. Should my main doco be on the class or should it be on the factory method that's creating it? The entry point is definitely the latter.
[01:23:18] jgnagy: has joined #ruby
[01:24:19] Arahael: I'd say, the class.
[01:25:19] zenspider: I tend to agree... but I suspect that most ppl wouldn't even see the class (or know there WAS one) if I'm doing this right
[01:26:02] zenspider: oh fucking hell rdoc... moot point. The class is missing from the rdoc entirely
[01:26:37] dasher00: has joined #ruby
[01:26:37] zenspider: what? just from the index
[01:26:54] zenspider: is there a ruby doco system that does NOT suck?
[01:27:06] zenspider: if you say "yard"... I will kick you for being so very very wrong
[01:27:58] texasmynsted: has joined #ruby
[01:28:30] texasmynsted: is it possible to paste a multi-line block of code into IRB repl?
[01:29:00] zenspider: texasmynsted: did you try it?
[01:30:07] bruce_lee: has joined #ruby
[01:30:07] bruce_lee: has joined #ruby
[01:33:38] texasmynsted: Just broke all over the screen
[01:33:57] texasmynsted: Was looking for something like the :past command from the scala repl
[01:35:05] d^sh: has joined #ruby
[01:35:21] enterprisey: has joined #ruby
[01:35:55] havenwood: texasmynsted: You should be able to paste multiple lines just fine. I wonder if your readline is borked?
[01:36:15] havenwood: texasmynsted: Pry is also a popular irb alternative.
[01:36:16] havenwood: ?pry texasmynsted
[01:36:16] ruby[bot]: texasmynsted: Pry, the better IRB, provides easy object inspection `ls`, `history`, viewing docs `?`, viewing source `$`, syntax highlighting and other features (see `help` for more). Put `binding.pry` in your source code for easy debugging. Install Pry (https://pryrepl.org/): gem install pry pry-do
[01:37:51] texasmynsted: wow, Pry is pretty amazing
[01:38:35] texasmynsted: Thank you. I will try pry and maybe sometime, go back and see what what happening with irb
[01:40:21] Arahael: zenspider: If people don't know about the class, then perhaps they don't need the docs for it if they never interact with it.
[01:41:24] meshsmith: has joined #ruby
[01:44:53] Cohedrin: has joined #ruby
[01:47:58] rkazak: has joined #ruby
[01:50:14] Vingador: has joined #ruby
[01:50:37] arescorpio: has joined #ruby
[01:56:34] robnester: has joined #ruby
[01:56:39] chopin: has joined #ruby
[02:02:35] charliesome: has joined #ruby
[02:05:53] dtzuzu: has joined #ruby
[02:07:20] haylon: has joined #ruby
[02:09:50] poloych: has joined #ruby
[02:16:26] harfangk: has joined #ruby
[02:20:24] user: has joined #ruby
[02:20:24] genpaku: has joined #ruby
[02:25:07] rkazak: has joined #ruby
[02:32:14] nankyokusei: has joined #ruby
[02:32:17] Mia: has joined #ruby
[02:39:19] haylon: has joined #ruby
[02:42:30] Jayson_Virissimo: has joined #ruby
[02:43:22] jackjackdripper: has joined #ruby
[02:44:42] jackjackdripper: has joined #ruby
[02:52:39] ElFerna: has joined #ruby
[02:56:02] mim1k: has joined #ruby
[02:59:34] Derperperd: has joined #ruby
[02:59:43] SuperTux88: has joined #ruby
[03:00:05] jackjackdripper1: has joined #ruby
[03:01:04] jackjackdripper2: has joined #ruby
[03:04:20] jackjackdripper: has joined #ruby
[03:04:26] sspreitz: has joined #ruby
[03:05:01] herbmillerjr: has joined #ruby
[03:08:03] dlitvak: has joined #ruby
[03:15:32] perniciouscaffei: has joined #ruby
[03:18:13] herbmillerjr: has joined #ruby
[03:20:21] ivanskie-hom: has joined #ruby
[03:20:26] uZiel: has joined #ruby
[03:20:36] ivanskie-hom: can I do a file open with callback?
[03:20:57] ivanskie-hom: CSV.read(getFile(url)) #getFile(url) yields file contents after downloading it
[03:21:44] ivanskie-hom: I'm getting a getFile no block given error. first time trying to do callback for realz
[03:23:11] ivanskie-hom: or do i have to do... getFile(url) do |file| contents = CSV.read(file)...... ?
[03:23:22] ivanskie-hom: hmm i think i'm almost at the aha momement
[03:24:12] chopin: has joined #ruby
[03:25:15] ivanskie-hom: dude if this works it'll be a day to celebrate
[03:26:07] minimalism: has joined #ruby
[03:26:23] gix: has joined #ruby
[03:26:52] audy: has left #ruby: ()
[03:30:12] _whitelogger: has joined #ruby
[03:30:53] ivanskie-hom: no so fast :(
[03:31:08] cfec0b8d: has joined #ruby
[03:31:57] ivanskie-hom: i can't just point it to csv file online, i have to do digest auth first. so.. argh
[03:32:06] duderonomy: has joined #ruby
[03:34:08] nanoz: has joined #ruby
[03:34:31] im0nde: has joined #ruby
[03:38:35] AnoHito: has joined #ruby
[03:42:04] brucebag: has joined #ruby
[03:42:04] brucebag: has joined #ruby
[03:42:27] AnoHito_: has joined #ruby
[03:48:28] dcluna: has joined #ruby
[03:55:10] perniciouscaffei: has joined #ruby
[03:58:35] Radar: ivanskie-hom: hi.
[03:58:40] Radar: what is getFile?
[03:58:53] ivanskie-hom: hows it going!?
[03:59:04] ivanskie-hom: ok nevermind the !
[03:59:32] chopin: has joined #ruby
[04:00:06] Radar: It's going well, thanks :)
[04:00:27] Radar: We've just hired a junior who I've been mentoring here over the last couple of weeks.
[04:05:10] haylon: has joined #ruby
[04:06:50] texasmynsted: has joined #ruby
[04:07:26] ivanskie-hom: time for a glass of wine! I just figured this shit out on my own without getting someone else to fill in the blanks for me.
[04:08:50] ivanskie-hom: only took me ~4 hours to get the script to work. lol
[04:09:27] ivanskie-hom: took me a few hours to figure out its not basic auth too tho. thanks to a suggestion to look at headers here earlier.
[04:12:30] duderonomy: has joined #ruby
[04:12:45] nertzy: has joined #ruby
[04:12:47] nanoz: has joined #ruby
[04:12:47] nanoz: has joined #ruby
[04:16:14] theunraveler: has joined #ruby
[04:16:50] robnester: has joined #ruby
[04:18:55] jgnagy: has joined #ruby
[04:23:28] renchan: has joined #ruby
[04:24:14] Cohedrin: has joined #ruby
[04:24:42] JoshS: has joined #ruby
[04:27:01] robnester: has joined #ruby
[04:28:59] zenspider: ivanskie-hom: I recommend to people I mentor/teach to set a 30 minute threshold for being stuck. After 30 minutes, you need to walk away for at least 20 minutes and then you have to ask for help.
[04:33:00] nankyokusei: has joined #ruby
[04:35:14] charliesome: has joined #ruby
[04:36:44] dasher00: has joined #ruby
[04:37:03] djbkd: has joined #ruby
[04:38:08] ignarps: has joined #ruby
[04:49:55] AnoHito: has joined #ruby
[04:54:48] AnoHito_: has joined #ruby
[04:56:35] mim1k: has joined #ruby
[04:58:27] AnoHito: has joined #ruby
[05:01:50] AnoHito_: has joined #ruby
[05:04:58] bvcosta_: has joined #ruby
[05:05:10] Cohedrin: has joined #ruby
[05:05:35] AnoHito: has joined #ruby
[05:06:37] djbkd: has joined #ruby
[05:08:49] ascarter: has joined #ruby
[05:10:50] zenspider: >> /(?-mix:\w)|(?-mix:\d)/ == /\w|\d/
[05:10:51] ruby[bot]: zenspider: # => false (https://eval.in/812347)
[05:10:57] zenspider: but... but why?
[05:16:25] ShekharReddy: has joined #ruby
[05:19:16] cschneid_: has joined #ruby
[05:25:18] rohitpaulk: has joined #ruby
[05:27:01] ledestin: has joined #ruby
[05:27:11] Radar: zenspider: guessing it's because it checks the length
[05:27:22] Radar: https://github.com/ruby/ruby/blob/trunk/re.c#L2929
[05:28:15] KnownSyntax: has joined #ruby
[05:28:16] KnownSyntax: has joined #ruby
[05:28:16] Radar: I don't know what the KCODE_FIXED thing is doing. options + encoding are equal (at least on my local 2.4.1 install). So it's either the length or the kcode_fixed thing
[05:29:32] Radar: >> /(?-mix:\w)|(?-mix:\d)/.source
[05:29:33] ruby[bot]: Radar: # => "(?-mix:\\w)|(?-mix:\\d)" (https://eval.in/812355)
[05:29:35] Radar: >> /\w|\d/.source
[05:29:36] jenrzzz: has joined #ruby
[05:29:37] ruby[bot]: Radar: # => "\\w|\\d" (https://eval.in/812356)
[05:30:08] Radar: TIL about Regexp#source
[05:34:35] jgt2: has joined #ruby
[05:40:56] dcluna: has joined #ruby
[05:44:46] cfec0b8d: has joined #ruby
[05:46:19] AnoHito_: has joined #ruby
[05:46:50] dasher00: has joined #ruby
[05:51:56] rohitpaulk: has joined #ruby
[05:54:38] dcluna: has joined #ruby
[05:55:05] yogg-saron: has joined #ruby
[05:55:23] zenspider: Radar: seems dumb... should be comparing the state machine
[05:58:42] anisha: has joined #ruby
[06:07:08] anisha: has joined #ruby
[06:07:33] charliesome: has joined #ruby
[06:09:47] roshanavand: has joined #ruby
[06:11:00] jackjackdripper: has joined #ruby
[06:11:13] chopin: has joined #ruby
[06:12:26] djbkd: has joined #ruby
[06:15:23] djbkd: has joined #ruby
[06:18:22] rohitpaulk: has joined #ruby
[06:19:45] user__: has joined #ruby
[06:32:07] im0nde: has joined #ruby
[06:33:34] cfec0b8d: has joined #ruby
[06:33:44] im0nde: has joined #ruby
[06:33:57] nankyokusei: has joined #ruby
[06:42:47] conta: has joined #ruby
[06:43:00] Guest73: has joined #ruby
[06:43:10] Hanmac: has joined #ruby
[06:43:22] lostapathy: has joined #ruby
[06:43:49] Guest73: has left #ruby: ()
[06:44:12] Xadren: has joined #ruby
[06:47:40] armyriad: has joined #ruby
[06:47:43] jgt3: has joined #ruby
[06:47:43] scorphus`: has joined #ruby
[06:47:46] atmosx: has joined #ruby
[06:49:10] mmasaki: has joined #ruby
[06:50:02] marcellus: has joined #ruby
[06:50:33] uranellus: has joined #ruby
[06:50:33] uranellus: has joined #ruby
[06:50:40] sjums: has joined #ruby
[06:50:58] Sirecote: has joined #ruby
[06:51:43] rohitpaulk: has joined #ruby
[06:51:46] uZiel: has joined #ruby
[06:52:43] r3vDev: has joined #ruby
[06:53:25] andikr: has joined #ruby
[06:54:47] rohitpaulk: has joined #ruby
[06:55:31] dionysus69: has joined #ruby
[06:57:01] Bhootrk_: has joined #ruby
[06:57:07] mim1k: has joined #ruby
[07:00:00] nertzy: has joined #ruby
[07:01:35] vali: has joined #ruby
[07:05:41] tvw: has joined #ruby
[07:10:34] mochiyoda: has joined #ruby
[07:12:44] psychicist__: has joined #ruby
[07:15:17] Silthias: has joined #ruby
[07:15:50] zipace: has joined #ruby
[07:16:32] charliesome: has joined #ruby
[07:17:13] Xadren: has joined #ruby
[07:17:29] ur5us: has joined #ruby
[07:20:49] jcao219: has joined #ruby
[07:23:20] User458764: has joined #ruby
[07:23:58] Silthias1: has joined #ruby
[07:24:01] Mortomes|Work: has joined #ruby
[07:25:10] def_jam: has joined #ruby
[07:25:18] eb0t_: has joined #ruby
[07:26:42] chopin: has joined #ruby
[07:26:43] Cohedrin_: has joined #ruby
[07:29:19] mark_66: has joined #ruby
[07:29:31] bvcosta: has joined #ruby
[07:31:55] aufi: has joined #ruby
[07:34:22] dcluna: has joined #ruby
[07:37:39] zotherstupidguy: has left #ruby: ()
[07:37:56] mtkd: has joined #ruby
[07:39:04] bkxd: has joined #ruby
[07:41:01] Nahra: has joined #ruby
[07:42:17] cgfbee: has joined #ruby
[07:42:52] nertzy: has joined #ruby
[07:43:24] frank_o: has joined #ruby
[07:43:37] SaschaVoid: has joined #ruby
[07:43:38] aupadhye: has joined #ruby
[07:44:16] antgel: has joined #ruby
[07:44:24] bkxd: has joined #ruby
[07:47:59] rohitpaulk: has joined #ruby
[07:49:54] SaschaVoid: has joined #ruby
[07:50:52] Cohedrin: has joined #ruby
[07:51:39] Joufflu: has joined #ruby
[07:54:44] dcluna: has joined #ruby
[07:58:02] ferr1: has joined #ruby
[07:58:44] mikecmpbll: has joined #ruby
[08:03:58] frank_o: has joined #ruby
[08:04:45] mim1k: has joined #ruby
[08:05:34] haylon: has joined #ruby
[08:07:51] Xadren: has joined #ruby
[08:12:16] sleetdrop: has joined #ruby
[08:17:25] sligli: has joined #ruby
[08:19:57] nalread: has joined #ruby
[08:20:40] jgnagy: has joined #ruby
[08:24:52] howdoi_: has joined #ruby
[08:24:59] Xadren: has joined #ruby
[08:25:41] Silthias: has joined #ruby
[08:25:43] mikecmpb_: has joined #ruby
[08:26:54] howdoi: has joined #ruby
[08:32:50] dcunit3d: has joined #ruby
[08:34:37] TheHodge: has joined #ruby
[08:35:47] nadir: has joined #ruby
[08:37:36] agentsmith: has joined #ruby
[08:38:47] vali: has joined #ruby
[08:42:01] chopin: has joined #ruby
[08:47:51] Beams: has joined #ruby
[08:48:41] mim1k: has joined #ruby
[08:51:41] chichou: has joined #ruby
[08:51:57] Axy: has joined #ruby
[08:52:25] Lyubo1: has joined #ruby
[08:53:10] bauruine: has joined #ruby
[08:55:57] Mia: has joined #ruby
[08:56:00] Mia: has joined #ruby
[08:56:16] kies: has joined #ruby
[08:58:12] dionysus69: has joined #ruby
[08:58:38] glejeune: has joined #ruby
[09:05:28] lxsameer: has joined #ruby
[09:07:08] Kug3lis: has joined #ruby
[09:07:32] brent__: has joined #ruby
[09:08:37] tomphp: has joined #ruby
[09:10:46] romank: has joined #ruby
[09:16:31] shortdudey123: has joined #ruby
[09:17:49] dcluna: has joined #ruby
[09:19:26] Pumukel: has joined #ruby
[09:20:29] cschneid_: has joined #ruby
[09:22:25] Joufflu_: has joined #ruby
[09:22:42] nanoz: has joined #ruby
[09:22:42] nanoz: has joined #ruby
[09:23:14] anisha: has joined #ruby
[09:25:06] Mia: has joined #ruby
[09:25:06] Mia: has joined #ruby
[09:25:25] Cork: has joined #ruby
[09:27:55] Kug3lis: has joined #ruby
[09:28:59] jgt3: has joined #ruby
[09:30:30] Axy: has joined #ruby
[09:33:30] AlexRussia: has joined #ruby
[09:37:12] jjaii9: has joined #ruby
[09:38:00] Cork: has joined #ruby
[09:38:20] charliesome: has joined #ruby
[09:44:42] pandaant: has joined #ruby
[09:47:14] ur5us: has joined #ruby
[09:51:00] Mia: has joined #ruby
[09:51:01] Mia: has joined #ruby
[09:51:29] mikecmpbll: is there a standard way to ship ruby system software?
[09:51:49] mikecmpbll: package it up with a version of ruby some how?
[09:53:52] charliesome: has joined #ruby
[09:54:31] Axy: has joined #ruby
[09:55:00] universa1: uhmm... not really iirc... there was/is some project by one of the passenger guys, but it seems to be stagnant right now. then there was shoes (the gui stuff, haven't followed it in a long time, worked in the past (~5years ago)
[09:55:37] universa1: but warbler might work for you, packages your stuff with jruby into a jar and java is most of the times there :-)
[09:55:47] mikecmpbll: i'm looking at https://github.com/chef/omnibus but couldn't tell in 5 mins if it's what i'm after so thought i'd ask :)
[09:55:49] mikecmpbll: interesting, i'll check it out.
[09:57:05] universa1: an installer which installs a "packaged" ruby might also work
[09:57:30] chopin: has joined #ruby
[09:57:34] universa1: mikecmpbll: http://phusion.github.io/traveling-ruby/
[09:58:33] mikecmpbll: universa1 : looks neat!
[10:06:47] dcluna: has joined #ruby
[10:09:05] anisha: has joined #ruby
[10:15:05] antgel: has joined #ruby
[10:16:17] rohitpaulk: has joined #ruby
[10:38:58] charliesome: has joined #ruby
[10:44:00] nettoweb__: has joined #ruby
[10:53:05] cyclonis: has joined #ruby
[10:53:12] cyclonis: anyone penetration testers here ?
[10:57:03] paddor: has joined #ruby
[10:57:21] dasher00: has joined #ruby
[11:00:08] paddor: Hi. I'm reverse engineering the authentication procedudure of a software product where the communication happens in XML documents over HTTP. It derives a shared secret using DHM to then encrypt the credentials to make up for environments where HTTPS is unavailable (so the documentation). Anyway... the response to the first "Connect" request contains the server's public key (encoded as a little-endian number, in Base64). I'm trying to use Ruby's OpenSSL::PKey::DH
[11:00:09] paddor: to calculate the shared secret, but it expects more than just Bob's public key. According to its example http://bit.ly/2qX10eP, it already expects some of Bob's DER-encoded information during initializiation. Which is which? How to feed it what I have? I thought using the same prime and generator, plus Bob's "public key" (the public number) is enough to calculate the same shared secret. But they're always different when I try it without DER-encoded information.
[11:00:09] paddor: Even just making the non-commented lines in this snippet work would be nice: https://gist.github.com/paddor/8fcf1d61fc6b436b61fcf27f886c6df8 Thanks for any input.
[11:04:58] milardovich: has joined #ruby
[11:05:20] haylon: has joined #ruby
[11:09:40] mim1k: has joined #ruby
[11:12:20] jenrzzz: has joined #ruby
[11:12:20] jenrzzz: has joined #ruby
[11:13:32] chopin: has joined #ruby
[11:16:31] paddor: Alright. Apparently `DH.new(1024)` it will actually generate a prime number. A different one every time. That, of course, has to be the same for Alice and Bob. I guess I can use #set_pgq to do that, instead of reading that information from a DER or PEM encoded string.
[11:18:08] petruff: has joined #ruby
[11:20:36] dcluna: has joined #ruby
[11:22:52] paddor: * OpenSSL::PKey::DH#set_pqg. Anyone an idea what q is?
[11:23:32] GodFather: has joined #ruby
[11:23:45] normie1: has joined #ruby
[11:25:22] arquebus: has joined #ruby
[11:27:57] marr: has joined #ruby
[11:28:03] Fernando-Basso: has joined #ruby
[11:31:02] dionysus69: has joined #ruby
[11:36:44] isene: has joined #ruby
[11:38:45] ElFerna: has joined #ruby
[11:43:05] isene: I have an imap mail filter program that I've written in Ruby. It's fetching mail from various accounts and filtering them into local mail folders. It's been working flawlessly for years but this weekend it stopped working. I have narrowed it down to a problem with the "UNSEEN" flag (I am matching against only UNSEEN messages in my gmail accounts) - also ("NOT, "SEEN") fails: http://dpaste.com/3XT85GD
[11:45:19] bvcosta: has joined #ruby
[11:47:32] isene: Hmm.... I found that the problem is not with the "UNSEEN" flag at all, but rather with matching "" (anything) - because matching with "*" and the UNSEEN flag does work
[11:49:28] HoierM: has joined #ruby
[11:51:56] brent__: has joined #ruby
[11:54:23] glejeune: has joined #ruby
[11:57:54] ur5us: has joined #ruby
[11:57:57] vali: has joined #ruby
[11:57:58] isene: This means that with a recent update of Ruby, it is no longer possible to match with "" in NET::imap.search, you must match with "*" as a catch-all. I haven't seen this in any documentation (or any Google searches). FYI
[11:58:29] isene: Recent update => ruby 2.3.3p222
[11:59:10] vuoto: has joined #ruby
[12:01:28] Coldblackice: has joined #ruby
[12:02:11] SpiffTR: has joined #ruby
[12:03:01] charliesome: has joined #ruby
[12:03:08] ur5us_: has joined #ruby
[12:03:54] Coldblackice: has joined #ruby
[12:04:33] Coldblackice: has joined #ruby
[12:04:57] matthewd: isene: Which Ruby version was previously working differently? AFAIK those more obscure stdlib libraries don't change much these days
[12:05:10] Coldblackice: has joined #ruby
[12:06:53] Coldblackice: has joined #ruby
[12:07:05] brunocosta: has joined #ruby
[12:08:13] ElFerna: has joined #ruby
[12:10:40] cfec0b8d: has joined #ruby
[12:11:40] psychicist__: has joined #ruby
[12:12:07] benjen: has joined #ruby
[12:13:14] anisha: has joined #ruby
[12:16:40] dcluna: has joined #ruby
[12:17:59] ddffg: has joined #ruby
[12:19:12] Kug3lis_: has joined #ruby
[12:20:01] rgr: has joined #ruby
[12:20:30] JacKass77: has joined #ruby
[12:21:37] JacKass77: has left #ruby: ()
[12:22:02] BSAlb: has joined #ruby
[12:22:10] Gabemo: has joined #ruby
[12:22:25] jgnagy: has joined #ruby
[12:23:35] jgt3: has joined #ruby
[12:23:55] isene: matthewd: I'm actually not quite sure which version was running previous to my apt-get distupgrade... I could dig a bit to find that out. It could also be gmail that fails on sending a "" to match instead of "*" (?)
[12:28:58] yogg-saron: has joined #ruby
[12:29:50] chopin: has joined #ruby
[12:30:29] pupsicle: has joined #ruby
[12:31:07] bvcosta: has joined #ruby
[12:34:28] rohitpaulk: has joined #ruby
[12:34:35] ElFerna: has joined #ruby
[12:34:42] bvcosta: has joined #ruby
[12:35:42] nowhere_man: has joined #ruby
[12:43:25] bvcosta: has joined #ruby
[12:45:15] gnufied: has joined #ruby
[12:46:08] bvcosta: has joined #ruby
[12:49:03] ikoma: has joined #ruby
[12:50:12] BTRE: has joined #ruby
[12:51:24] bvcosta: has joined #ruby
[12:53:11] minimalism: has joined #ruby
[12:54:30] bvcosta: has joined #ruby
[13:09:41] mim1k: has joined #ruby
[13:14:33] haylon: has joined #ruby
[13:15:20] jenrzzz: has joined #ruby
[13:15:59] dcluna: has joined #ruby
[13:30:11] djbkd: has joined #ruby
[13:31:12] DLSteve: has joined #ruby
[13:33:35] hexian: has joined #ruby
[13:35:18] nowhere_man: has joined #ruby
[13:35:24] hexian: can anyone tell me if it's possible to yield from a fiber in a method which is called from a C extension? it seems like it is not possible but I can't find any details about fibers and extensions, or anything useful about the exception that gets raised "fiber called across stack rewinding barrier"
[13:36:25] shinnya: has joined #ruby
[13:37:38] griffindy: has joined #ruby
[13:38:07] oleo: has joined #ruby
[13:40:12] hexian: I really wanted to use the oj gem to parse a large JSON stream, since it is far better optimized than all alternatives, but it seems like this isn't possible since it only supports reading from IO objects and if the #readpartial method yields out of the fiber, that exception gets raised
[13:41:28] dcluna: has joined #ruby
[13:45:03] chopin: has joined #ruby
[13:51:47] Kneecaps: has joined #ruby
[13:53:35] guardianx: has joined #ruby
[13:54:09] rohitpaulk: has joined #ruby
[13:56:30] mrconfused: has joined #ruby
[14:00:14] __Yiota: has joined #ruby
[14:02:51] chouhoulis: has joined #ruby
[14:04:34] GodFather: has joined #ruby
[14:08:40] agentsmith: has joined #ruby
[14:09:31] mim1k: has joined #ruby
[14:09:59] MarkBilk_: has joined #ruby
[14:10:48] rkoller: has joined #ruby
[14:13:47] guardianx: has left #ruby: ()
[14:14:24] ldnunes: has joined #ruby
[14:16:50] Alina-malina: has joined #ruby
[14:17:28] bash2: has joined #ruby
[14:18:52] cyphase: has joined #ruby
[14:21:46] MarkBilk__: has joined #ruby
[14:21:54] Alina-malina: has joined #ruby
[14:21:57] ElFerna: has joined #ruby
[14:23:11] gizmore: has joined #ruby
[14:23:58] jgnagy: has joined #ruby
[14:25:39] jgt3: has joined #ruby
[14:26:52] hexian: well this is disappointing, out of all the high performance JSON gems, none of them can be used to parse a subset of data from a huge JSON stream
[14:27:13] hexian: seems like my only option is to use the pure ruby json-stream gem, which is going to have an insane amount of overhead
[14:28:29] conta: has joined #ruby
[14:29:11] Kug3lis: has joined #ruby
[14:32:08] mikecmpb_: has joined #ruby
[14:32:56] jgnagy: has joined #ruby
[14:33:19] cyphase: has joined #ruby
[14:33:49] dionysus69: has joined #ruby
[14:36:06] Silthias: has joined #ruby
[14:37:14] patarr: has joined #ruby
[14:40:40] __Yiota: has joined #ruby
[14:40:46] chaugiang: has joined #ruby
[14:40:48] chaugiang: has left #ruby: ()
[14:47:16] uZiel: has joined #ruby
[14:47:44] GinoMan: has joined #ruby
[14:49:03] tomphp: has joined #ruby
[14:50:50] amclain: has joined #ruby
[14:53:26] ElFerna: has joined #ruby
[14:55:17] mikecmpbll: has joined #ruby
[14:57:50] rippa: has joined #ruby
[15:04:48] oleo: has joined #ruby
[15:05:00] jusa: has joined #ruby
[15:07:12] psychicist__: has joined #ruby
[15:07:46] ule: hey guys.. how can I get ':foo' here? [:aaa, :bbb, {:foo => [:ccc, :ddd] } ]
[15:08:12] ule: I can't use .last
[15:08:20] ule: because it's dinamically
[15:09:26] jcao219: has joined #ruby
[15:09:49] hexian: ule: arr.last.keys.first
[15:09:54] patientj: has joined #ruby
[15:10:00] ElFerna: has joined #ruby
[15:10:19] elomatreb: ule: `your_array.grep(Hash).flat_map(&:keys)` if there is more than one or you don't know the position
[15:11:18] mikecmpbll: has joined #ruby
[15:11:37] cschneid_: has joined #ruby
[15:12:17] hexian: his question was not very clear, but whatever he is trying to do can probably be solved more efficiently than that
[15:12:58] ule: hexian: sorry and thanks
[15:13:01] bvcosta: has joined #ruby
[15:13:01] ule: elomatreb: +++++++
[15:13:07] ule: thank you very much
[15:14:27] elomatreb: hexian: "<ule> I can't use .last [because it's dinamically]"
[15:15:29] hexian: yeah well that could mean a lot of things
[15:15:37] ule: elomatreb: how can I get the value of :foo now?
[15:15:54] hexian: is there only a single hash in any position or can there be multiple hashes?
[15:16:06] ule: hexian: can have multimples
[15:16:29] hexian: then you'll need something along the linesof what elomatreb suggested
[15:16:49] elomatreb: I'd strongly advise you to reconsider your data structures, mixing different types with probably different meaning leads to the messy code we're discussing
[15:16:58] ule: elomatreb: agree
[15:17:08] jenrzzz: has joined #ruby
[15:17:08] jenrzzz: has joined #ruby
[15:17:46] elomatreb: The problem with "the value of :foo" is that there may be more than one
[15:18:21] elomatreb: >> [ { foo: 1 }, { foo: 2 } ].grep(Hash).flat_map(&:keys)
[15:18:22] ruby[bot]: elomatreb: # => [:foo, :foo] (https://eval.in/812814)
[15:18:46] mikecmpb_: has joined #ruby
[15:19:00] ule: oh man.. someone created this code 4 years ago
[15:19:08] ule: now I have to fix everything lol
[15:19:32] God: has joined #ruby
[15:20:29] my123_: has joined #ruby
[15:20:30] my123_: has joined #ruby
[15:21:02] ule: maybe if I just convert everything dinamically to hash or array
[15:21:27] ule: unifying the data structure to just one like you guys said
[15:23:46] adam12: I wonder why net-telnet ever became bundled with Ruby.
[15:24:09] jgnagy: has joined #ruby
[15:28:28] belmoussaoui: has joined #ruby
[15:28:31] matthewd: adam12: It was a different time
[15:28:35] user__: has joined #ruby
[15:29:02] adam12: I wonder if it was a proof of concept for TCPSocket
[15:29:19] elomatreb: Things like consumer routers still frequently use telnet for advanced administration
[15:29:31] kies: has joined #ruby
[15:30:03] apeiros: ule: it's dynamical btw., not dinamical
[15:30:21] mim1k: has joined #ruby
[15:30:26] apeiros: oh, weird, that backlog is from forever, why did znc replay it just now? o0
[15:30:41] apeiros: oooh, I think I have to fix the datetime on my znc server :D
[15:30:41] elomatreb: It's from 15min ago?
[15:30:44] adam12: I wonder if expect is still packaged with ruby.
[15:30:55] apeiros: adam12: require and see
[15:31:10] adam12: apeiros: Just wondering aloud. Not actually curious.
[15:31:39] matthewd: apeiros: Well, it's dynamic :)
[15:32:51] cdg: has joined #ruby
[15:34:44] ule: Hash[*[:aaa, :bbb, {:foo => [:ccc, :ddd]}].grep(Hash).flatten(1)][:foo]
[15:34:51] ule: => [:ccc, :ddd]
[15:35:11] ule: ugly as hell but
[15:35:57] apeiros: I think the look is not the bad part
[15:37:09] ule: it's not working
[15:37:15] nchambers: has joined #ruby
[15:37:22] ule: because in the real live I have :foo, :foo2
[15:37:24] nchambers: has joined #ruby
[15:37:32] apeiros: I think you should not provide us fake data
[15:38:04] ule: [:name, :tip, {:answers_attributes=>[:id, :name]}, {:media_attributes=>[:link]}]
[15:38:07] ule: here we go
[15:38:23] ascarter: has joined #ruby
[15:38:24] ule: I need :media_attribute values
[15:38:59] apeiros: do you have anything in the code which gives a name to those things?
[15:39:14] apeiros: also, do you have more examples?
[15:39:20] brent__: has joined #ruby
[15:39:39] apeiros: I ask because with this single example, the structure makes no sense.
[15:39:47] apeiros: I mean, why have two hashes?
[15:40:00] ule: unfortunatelly, that's the way they created this shit
[15:40:47] apeiros: it's not necessarily shit just because you haven't yet figured out the idea behind it (it may of course indeed be shit)
[15:40:51] hobodave: has joined #ruby
[15:41:20] ule: this is being passed to .permit method in rails.. this is a list of allowed parameters they want to allow in the controller
[15:41:25] apeiros: first thing you have to do when working with foreign code is trying to figure out the ideas. why were things done the way they are?
[15:41:47] PresidentBiscuit: has joined #ruby
[15:41:52] ule: apeiros: they should use only hash if I understood well
[15:42:16] ule: I don't have enough time to refactor every code using this hash
[15:42:19] apeiros: and from what are they dynamically building that array?
[15:42:21] ule: hash/array
[15:42:41] ule: apeiros: it's a constant.. it's a kind of whitelist of allowed parameters
[15:43:01] apeiros: a constant? that doesn't sound very dynamic?
[15:43:05] ule: but people could change in the future
[15:43:29] apeiros: "stored in a central place" != "dynamic"
[15:43:40] sleetdrop: has joined #ruby
[15:44:22] ule: ok so... how can I get the freaking media_attributes values there?
[15:44:41] apeiros: how do you know you need media_attributes' values?
[15:45:00] apeiros: from the name?
[15:45:35] hutch34: has joined #ruby
[15:46:45] ule: apeiros: I'll do something like.. if media_attributes.include? :link... do something
[15:47:01] apeiros: no, that's not what I'm asking
[15:47:13] apeiros: you want media_attributes values - why?
[15:47:23] apeiros: why those values? why not answer_attributes' values?
[15:47:51] ule: apeiros: because I will only perform updates for :link parameters inside media_attributes
[15:47:55] nalread: has joined #ruby
[15:48:22] apeiros: ok, that's what you want to use it for - but again, how do you know it's :media_attributes you want?
[15:50:38] matthewd: ule: What is the high-level thing you're doing?
[15:52:42] ule: apeiros: because I know
[15:52:49] chalkmonster: has joined #ruby
[15:52:53] apeiros: ok, so that's fixed, given information
[15:52:56] ule: apeiros: I want to get media_attributes and deal with the data
[15:53:07] ule: that's it
[15:53:24] apeiros: you said that array is defined in one place, like `PermittedParams = [:name, :tip, {:answers_attributes=>[:id, :name]}, {:media_attributes=>[:link]}]`?
[15:53:27] ule: if I have media_attributes[:link] then I'll get this link and update my db
[15:55:03] Jayson_Virissimo: has joined #ruby
[15:56:10] ule: If I do: my_data_structure_var[:media_attributes]
[15:56:11] ule: *** TypeError Exception: no implicit conversion of Symbol into Integer
[15:56:22] matthewd: ule: What is the high-level thing you're doing?
[15:57:00] apeiros: well, I want to do other things and answers roll in slowly, so here is my assumption:
[15:57:00] apeiros: you want to keep that information in one place, hence you try to extract from PermittedParams
[15:57:00] apeiros: My suggestion would be to do: `PermittedMediaParams = {:media_attributes=>[:link]}; PermittedParams = [:name, :tip, {:answers_attributes=>[:id, :name]}, PermittedMediaParams]
[15:57:25] apeiros: and then use PermittedMediaParams directly in the places you need it - instead of extracting.
[15:57:54] apeiros: ACTION around but potentially not attentive
[15:58:48] patientj: has left #ruby: ()
[15:59:13] Kug3lis: has joined #ruby
[15:59:17] ule: I can definitelly refactor this data structure
[15:59:23] ule: but that's not what I want
[15:59:37] ule: I want to just do something like foo[:media_attributes] and receive :link
[16:00:40] dionysus69: has joined #ruby
[16:01:06] sepp2k: has joined #ruby
[16:01:33] apeiros: Array#find, but IMO a bad idea. but then again, my knowledge and understanding of your problem scope are limited.
[16:02:22] bvcosta: has joined #ruby
[16:02:55] ule: .grep(Hash).select { |x| x[:media_attributes] }[0][:media_attributes]
[16:02:58] ule: there we go
[16:03:48] ule: matthewd: sorry, I was trying some codes here..
[16:03:55] PatrikasZvaigzde: has joined #ruby
[16:04:01] ule: apeiros matthewd hexian elomatreb thanks!
[16:05:07] statu: has joined #ruby
[16:06:35] statu: I have a doubt about Capistrano. I'm not sure if this is the correct place. If it isn't, sorry!
[16:06:36] statu: I have Rake task imported. If I run `cap -T` I can see it but I want to run it as part of the deploys. Just before deploy:updated. I tried adding Rake::Task['deploy:updated'].prerequisites.push('my:task') in deploy.rb but it does not execute it.
[16:07:25] marxarelli: has joined #ruby
[16:07:55] Coldblackice: has joined #ruby
[16:08:51] Renich: has joined #ruby
[16:10:41] KeyJoo: has joined #ruby
[16:11:05] mrconfused: has joined #ruby
[16:12:43] mim1k: has joined #ruby
[16:12:50] roshanavand: has joined #ruby
[16:17:53] jenrzzz: has joined #ruby
[16:17:53] jenrzzz: has joined #ruby
[16:21:49] nowhereman: has joined #ruby
[16:23:12] nitric: has joined #ruby
[16:23:50] cdg: has joined #ruby
[16:25:26] chopin: has joined #ruby
[16:25:45] rohitpaulk: has joined #ruby
[16:26:22] jgt3: has joined #ruby
[16:28:11] nanoz: has joined #ruby
[16:29:31] al2o3-cr: has joined #ruby
[16:40:17] marxarelli: has joined #ruby
[16:41:22] Kneecaps: has left #ruby: ()
[16:42:56] ldnunes: has joined #ruby
[16:43:25] Renich: has joined #ruby
[16:43:56] pb122: has joined #ruby
[16:45:33] SeepingN: has joined #ruby
[16:48:07] synthroid: has joined #ruby
[16:48:21] cdg: has joined #ruby
[16:48:51] marr: has joined #ruby
[16:49:55] SilentNinja1: has joined #ruby
[16:50:02] [Butch]: has joined #ruby
[16:52:55] BTRE: has joined #ruby
[16:53:48] GodFather: has joined #ruby
[16:57:23] ledestin: has joined #ruby
[16:57:35] haylon: has joined #ruby
[16:58:34] Frem: has joined #ruby
[17:00:27] ahrs: has joined #ruby
[17:01:09] hahuang65: has joined #ruby
[17:07:14] sds__: has joined #ruby
[17:07:51] Authenticator: I'm using Typhoeus (libcurl based) to make multiple Mutual-TLS connections to the same server. However, I need to connect with two sets of client certs and Typhoeus reuses the connection between them, meaning that all calls come from the same "user". I can't even get forbid_reuse to work, but I don't want that anyways. I want two separate connections both using keepalive properly.
[17:08:27] cyclonis: has joined #ruby
[17:09:02] sds__: i'm facing an issue with the fonction sock.put (related to the metasploit framework)
[17:09:18] sds__: it seems like the script just hang here
[17:09:43] sds__: is there something to do in order to make it work? could it be a permission issue, network, etc?
[17:10:00] SilentNinja1: Hi Does Anyone know how I get Semantic Logger working? I already included the required gems semantic_logger
[17:10:50] SilentNinja1: include SemanticLogger::Loggable
[17:11:28] SilentNinja1: and call logger.info(" This is a message")
[17:11:57] FastJack: has joined #ruby
[17:13:59] Authenticator: SilentNinja1: What fails? Do you just not see the logs anywhere?
[17:15:29] jackjackdripper: has joined #ruby
[17:21:03] Renich: has joined #ruby
[17:21:44] marxarelli: has joined #ruby
[17:23:03] jenrzzz: has joined #ruby
[17:23:03] jenrzzz: has joined #ruby
[17:23:42] gusrub: has joined #ruby
[17:23:51] Cohedrin: has joined #ruby
[17:24:02] nickjj_: has joined #ruby
[17:24:19] balazs: has joined #ruby
[17:24:29] SilentNinja1: yeah, I don't see any logs
[17:24:36] snath: has joined #ruby
[17:24:46] SilentNinja1: I do see the log file created
[17:25:49] SilentNinja1: I put the following in the config/application.rb file
[17:26:58] balazs_: has joined #ruby
[17:27:05] jgt3: has joined #ruby
[17:27:52] SilentNinja1: https://hastebin.com/obupibemec.rb
[17:28:20] synthroid: has joined #ruby
[17:28:41] SilentNinja1: I included the semantic_logger gem and awesome_print
[17:29:20] SilentNinja1: since I'm running the older version of Rails
[17:29:43] SilentNinja1: version 3.2.22.2
[17:30:10] MrBismuth: has joined #ruby
[17:30:18] SilentNinja1: so rails_semantic_logger only work on Rails 4.2 or higher?
[17:41:11] bkxd: has joined #ruby
[17:43:06] ikoma: has joined #ruby
[17:45:42] SilentNinja1: works from console but not in App
[17:46:15] Authenticator: SilentNinja1: Yeah, I just tried it in Pry and it works for me. Dunno about Rails.
[17:46:38] SilentNinja1: If I set logger = SemanticLogger['MyClass'], does that mean I only need to include
[17:47:28] duderonomy: has joined #ruby
[17:47:57] SilentNinja1: include SemanticLogger::Loggable
[17:48:13] SilentNinja1: for all the Classes I want to call the logger?
[17:50:14] Authenticator: That seems to be all you need to do.
[17:52:57] [Butch]_: has joined #ruby
[17:53:06] jobewan: has joined #ruby
[17:53:45] [Butch]_: has joined #ruby
[17:55:24] SilentNinja1: Yeah, works from Rails Console, but not in my app
[17:55:37] SilentNinja1: am I missing anything from the config/application.rb settings?
[17:57:13] Authenticator: Sorry, I don't know the Rails side of it.
[17:59:27] vuoto: has joined #ruby
[17:59:36] jackjackdripper: has joined #ruby
[18:00:00] mrconfused: has joined #ruby
[18:02:05] cyclonis: has joined #ruby
[18:02:25] cfec0b8d: has joined #ruby
[18:03:51] Otti: has joined #ruby
[18:05:50] tweezer: has joined #ruby
[18:08:32] jackjackdripper1: has joined #ruby
[18:09:39] jgnagy: has joined #ruby
[18:09:51] __Yiota: has joined #ruby
[18:10:41] nicesignal: has joined #ruby
[18:15:39] taurgal: has joined #ruby
[18:16:15] jackjackdripper: has joined #ruby
[18:17:19] jackjackdripper: has joined #ruby
[18:18:04] glejeune: has joined #ruby
[18:19:52] dcunit3d: has joined #ruby
[18:22:39] __Yiota: has joined #ruby
[18:24:25] ostera: has joined #ruby
[18:27:06] bathtub_shark: has joined #ruby
[18:29:49] mikecmpbll: has joined #ruby
[18:31:40] Ishido: has joined #ruby
[18:34:19] Cohedrin: has joined #ruby
[18:34:36] jcao219: has joined #ruby
[18:39:39] cyclonis: has joined #ruby
[18:40:07] rohitpaulk: has joined #ruby
[18:41:06] nankyokusei: has joined #ruby
[18:41:46] bvcosta: has joined #ruby
[18:42:31] dionysus69: has joined #ruby
[18:44:19] tjbiddle: has joined #ruby
[18:44:37] cjhowe7: has joined #ruby
[18:53:33] mim1k: has joined #ruby
[18:54:45] cyclonis: has joined #ruby
[18:56:35] minimalism: has joined #ruby
[18:58:19] GodFather: has joined #ruby
[18:59:53] rohitpaulk: has joined #ruby
[19:01:59] rkazak: has joined #ruby
[19:03:14] hobodave_: has joined #ruby
[19:08:36] aufi: has joined #ruby
[19:09:01] vali: has joined #ruby
[19:10:42] kurajber: has joined #ruby
[19:11:00] kurajber: has joined #ruby
[19:11:33] blackwind_123: has joined #ruby
[19:11:43] swills: has joined #ruby
[19:12:06] haylon: has joined #ruby
[19:12:55] dcunit3d: has joined #ruby
[19:17:28] haylon: When using Thor, is there a way to make it depend on another Thor task being ran first, similar to Rake's dependency thing?
[19:18:05] HoierM: has joined #ruby
[19:20:03] LastWhisper____: has joined #ruby
[19:20:21] jackjackdripper: has joined #ruby
[19:20:29] im0nde: has joined #ruby
[19:22:55] jackjackdripper: has joined #ruby
[19:23:51] glejeune: has joined #ruby
[19:24:02] kies: has joined #ruby
[19:24:50] patarr: Hi all. If I have a gem method that takes a block like Gem.do_thing(p1, p2, p3, p4) do |f| ...., how can I create an alias for this? All the code in the file calls this with the same arguments, so I want to DRY it up
[19:25:15] ur5us: has joined #ruby
[19:25:46] muelleme: has joined #ruby
[19:26:05] patarr: I don't know how to create a method that receives a block and then passes that block to the call within it
[19:26:22] apeiros: alias existing_name new_name
[19:26:26] matthewd: patarr: &block
[19:26:52] apeiros: and ^ if you actually want to do more than just alias
[19:26:52] patarr: apeiros: afaik, that only helps me alias a method, but not the call with arguments
[19:27:33] apeiros: ah, you indeed don't want an alias then
[19:27:51] jgt3: has joined #ruby
[19:29:49] patarr: matthewd: so let's say I defined my_method(&block). Inside, I will call Gem.do_thing(1,2..) block ?
[19:30:08] apeiros: do_thing(1, 2, &block)
[19:33:44] dennisvennink: has joined #ruby
[19:34:31] patarr: apeiros: do I need to include the &? What does that do?
[19:34:45] apeiros: it tells ruby that it's the block argument
[19:36:54] ikoma: has joined #ruby
[19:38:51] dennisvennink: I'm trying to get a list of all available objects (in 2.4.1). `Object.const_get` does the trick, but prints deprecation warnings for ::Fixnum, ::Bignum, etc. Is there a workaround?
[19:39:37] apeiros: use :Integer instead
[19:39:43] patarr: apeiros: thanks that worked
[19:39:50] apeiros: also const_get certainly does not get you all available objects
[19:39:57] eam: all objects or all classes?
[19:40:00] apeiros: ObjectSpace.each_object does
[19:40:08] apeiros: eam: not even the latter
[19:40:19] eam: apeiros: oh I agree, just trying to help find the right question
[19:40:21] apeiros: cost_get is about constants, what they reference is irrelevant
[19:40:32] apeiros: I see, makes sense I guess.
[19:42:30] matthewd: You could also just turn off the warnings :)
[19:42:57] matthewd: dennisvennink: So yeah, really depends what you actually need
[19:44:30] dennisvennink: My bad. I meant `Object.constants`. `ObjectSpace.each_object` does the trick and doesn't print deprecation warnings. :—)
[19:44:53] apeiros: I do have the impression that you're doing it wrong
[19:44:55] Otti: has joined #ruby
[19:45:08] apeiros: but since I don't exactly know what you want to do…
[19:47:44] bvcosta: has joined #ruby
[19:48:12] dennisvennink: I should have worded it better. Problem is fixed though. Thanks. ;—)
[19:48:33] apeiros: "fixed". well, ok.
[19:48:51] nhhc: has joined #ruby
[19:49:06] kies: has joined #ruby
[19:49:14] centrx: has joined #ruby
[19:49:15] centrx: has joined #ruby
[19:52:55] dennisvennink: `Object.constants` contains deprecated constants of deprecated classes. That's all.
[19:53:02] taurgal: has joined #ruby
[19:53:07] arup_r: has joined #ruby
[19:53:26] bvcosta: has joined #ruby
[19:53:34] arup_r: I am using savon gem. And getting error https://gist.github.com/aruprakshit/bcb8510f9f19071e6af19803d85315f2 .. Any idea what I need to fix?
[19:53:40] belmoussaoui_: has joined #ruby
[19:56:09] patarr: Has anyone ever had problems with Dir.mktmpdir? I keep getting an error like so: #<Errno::EISDIR: Is a directory @ rb_sysopen - /var/folders/8s/c8f1
[19:56:20] patarr: (rest of the path truncated - it looks random)
[19:56:34] jamesaxl: has joined #ruby
[19:57:37] cyclonis: has joined #ruby
[20:00:03] dionysus69: has joined #ruby
[20:00:03] hutch34: has joined #ruby
[20:00:09] cdg_: has joined #ruby
[20:00:27] jamesaxl: has joined #ruby
[20:00:56] centrx: patarr: Did you do a search online for that error message?
[20:02:53] hobodave: has joined #ruby
[20:04:07] bvcosta: has joined #ruby
[20:04:50] cyclonis: has joined #ruby
[20:08:43] vondruch: has joined #ruby
[20:09:09] jenrzzz: has joined #ruby
[20:09:12] arup_r: nvm I solved it
[20:11:48] patarr: centrx: sure did. Turns out I wasn't able to reason about why it was happening because the stacktrace was all jacked up due to it being in a block
[20:11:56] patarr: That's my one gripe with blocks >:(
[20:13:15] vondruch: has joined #ruby
[20:15:56] belmoussaoui: has joined #ruby
[20:17:12] cdg: has joined #ruby
[20:18:42] kies: has joined #ruby
[20:19:51] RobertBirnie: has joined #ruby
[20:21:45] duderono_: has joined #ruby
[20:22:01] dc2: has joined #ruby
[20:23:09] nowhere_man: has joined #ruby
[20:23:43] ur5us: has joined #ruby
[20:24:26] __Yiota: has joined #ruby
[20:24:43] vondruch: has joined #ruby
[20:28:13] vondruch: has joined #ruby
[20:29:25] mrconfused: has joined #ruby
[20:31:17] __Yiota: has joined #ruby
[20:32:18] DEac-: has joined #ruby
[20:34:03] belmoussaoui_: has joined #ruby
[20:34:10] theunraveler: has joined #ruby
[20:34:50] bvcosta: has joined #ruby
[20:35:12] ejnahc: has joined #ruby
[20:35:54] __Yiota: has joined #ruby
[20:37:21] lxsameer: has joined #ruby
[20:37:38] sagax: has joined #ruby
[20:37:43] nowhere_man: has joined #ruby
[20:43:44] al2o3-cr: has joined #ruby
[20:44:23] nowhere_man: has joined #ruby
[20:45:56] belmoussaoui: has joined #ruby
[20:46:13] jenrzzz: has joined #ruby
[20:46:13] jenrzzz: has joined #ruby
[20:46:56] poloych: has joined #ruby
[20:47:49] nowhereman: has joined #ruby
[20:49:00] blackmesa: has joined #ruby
[20:50:21] mahlon: has joined #ruby
[20:52:02] rikkipitt: has joined #ruby
[20:53:50] olivier__: has joined #ruby
[20:56:16] __Yiota: has joined #ruby
[20:56:24] ascarter: has joined #ruby
[20:57:53] brent__: has joined #ruby
[21:02:33] belmoussaoui_: has joined #ruby
[21:03:49] __Yiota: has joined #ruby
[21:06:42] belmoussaoui: has joined #ruby
[21:09:02] t-recx: has joined #ruby
[21:09:15] __Yiota: has joined #ruby
[21:09:49] Mia: has joined #ruby
[21:10:36] Mia: has joined #ruby
[21:12:33] Mia: has joined #ruby
[21:13:04] Xiti: has joined #ruby
[21:13:27] jenrzzz: has joined #ruby
[21:21:06] __Yiota: has joined #ruby
[21:23:10] SilentNinja1: has joined #ruby
[21:23:29] SilentNinja1: hi is there a way to make stdout goto Semantic Logger? Thanks
[21:23:34] lazyatom: has joined #ruby
[21:23:58] jgt3: has joined #ruby
[21:24:13] apeiros: if semantic logger provides a proper interface, probably something like $stdout = Semantic::Logger.new
[21:24:20] apeiros: don't they have docs describing that?
[21:25:04] DEac-: has joined #ruby
[21:26:04] faelkle: has joined #ruby
[21:26:05] DEac-: has joined #ruby
[21:26:53] Pierreb|home: has joined #ruby
[21:28:13] dennisvennink: has joined #ruby
[21:28:57] Talltree: has joined #ruby
[21:29:17] dennisvennink: has joined #ruby
[21:29:47] dances_with_taco: has joined #ruby
[21:29:53] SilentNinja1: didn't see one for for stdout
[21:30:12] dennisvennink: has joined #ruby
[21:30:28] SilentNinja1: actually they do have it. all good thanks!
[21:32:28] Nahra: has joined #ruby
[21:33:05] ascarter: has joined #ruby
[21:34:38] mim1k: has joined #ruby
[21:37:14] jgnagy: has joined #ruby
[21:40:24] nowhere_man: has joined #ruby
[21:40:27] haylon: has joined #ruby
[21:40:43] tomphp: has joined #ruby
[21:41:46] jackjackdripper: has joined #ruby
[21:50:13] HoierM: has joined #ruby
[21:54:54] LastWhisper____: has joined #ruby
[21:56:07] kies: has joined #ruby
[21:56:23] nankyokusei: has joined #ruby
[21:56:34] dtzuzu: has joined #ruby
[21:58:28] __Yiota: has joined #ruby
[22:01:11] RobertBi_: has joined #ruby
[22:01:35] hahuang65: has joined #ruby
[22:01:40] dances_with_taco: has joined #ruby
[22:01:56] nertzy: has joined #ruby
[22:03:09] al2o3-cr: has joined #ruby
[22:03:34] olivier__: has joined #ruby
[22:05:30] t-recx: has joined #ruby
[22:05:38] olivier__: has joined #ruby
[22:07:47] God: has joined #ruby
[22:08:14] jgt3: has joined #ruby
[22:14:25] Cohedrin: has joined #ruby
[22:15:50] nowhere_man: has joined #ruby
[22:16:27] olivier__: has joined #ruby
[22:27:22] al2o3-cr: >> 2.3.remainder(0.6) == 2.3-0.6*(2.3/0.6)
[22:27:23] ruby[bot]: al2o3-cr: # => false (https://eval.in/812961)
[22:27:35] al2o3-cr: why oh why oh why
[22:27:49] bvcosta: has joined #ruby
[22:27:49] al2o3-cr: >> 2.3.remainder(0.6) == 2.3-0.6*(2.3/0.6).truncate
[22:27:51] ruby[bot]: al2o3-cr: # => false (https://eval.in/812962)
[22:27:54] al2o3-cr: why oh why oh why
[22:29:05] apeiros: because floats
[22:29:06] hashrocket: has joined #ruby
[22:29:12] apeiros: and because you should never ever do Float#==
[22:29:23] al2o3-cr: why exist then?
[22:29:34] apeiros: because ruby is not about protecting your feet
[22:29:43] al2o3-cr: lol :P nice call
[22:29:45] apeiros: if you want to shoot them, ruby will gladly hand you a rocket launcher for better effect.
[22:31:21] al2o3-cr: apeiros: how to get the bit reprentation of a double?
[22:31:40] apeiros: not sure which letter it was, ri will help
[22:31:54] apeiros: wouldn't know a format with sprintf
[22:32:22] al2o3-cr: apeiros: how can i be sure with pack?
[22:32:33] jackjackdripper: has joined #ruby
[22:32:34] al2o3-cr: what i'm doing is this
[22:32:37] apeiros: >> [Math::PI].pack("G").unpack("B*")
[22:32:38] ruby[bot]: apeiros: # => ["0100000000001001001000011111101101010100010001000010110100011000"] (https://eval.in/812963)
[22:32:47] apeiros: I don't know how you can be sure
[22:33:15] al2o3-cr: >> "i love you man"
[22:33:17] ruby[bot]: al2o3-cr: # => "i love you man" (https://eval.in/812964)
[22:33:39] elomatreb: >> "the machine does not love you back"
[22:33:40] ruby[bot]: elomatreb: # => "the machine does not love you back" (https://eval.in/812965)
[22:34:01] al2o3-cr: the machine lol :p
[22:34:24] al2o3-cr: apeiros: when you upgrading to 2.4?
[22:34:35] elomatreb: 2.4>> "test"
[22:34:57] apeiros: anytime soon
[22:36:21] p0p0pr37: has joined #ruby
[22:36:49] bvcosta: has joined #ruby
[22:36:50] al2o3-cr: apeiros: it's a 2 second job know, nice to know you're not on peice work ;)
[22:37:33] DEac-: has joined #ruby
[22:37:56] Emmanuel_Chanel: has joined #ruby
[22:38:39] bkxd: has joined #ruby
[22:38:44] al2o3-cr: some cool features in 2.4#
[22:38:55] amclain: has joined #ruby
[22:39:30] al2o3-cr: (1..10).sum(*args)
[22:39:47] knight33: has joined #ruby
[22:39:53] al2o3-cr: String#unpack1
[22:40:45] al2o3-cr: Hash#transform_values (should be keys too)
[22:41:04] al2o3-cr: Hash performance lookup
[22:41:35] al2o3-cr: deprecation of this that and tother
[22:42:30] jcao219: has joined #ruby
[22:42:39] al2o3-cr: nice thing that was added was buffer arg to Array#pack decent
[22:43:04] stormbytes: has joined #ruby
[22:43:36] al2o3-cr: b = "".b; [1,2].pack('C2', buffer: b); b #=> "\x01\x02"
[22:43:40] stormbytes: trying to grab a random array element, using arr.rand(0**arr.length) is there some other way to do this?
[22:43:59] al2o3-cr: stormbytes: sample
[22:44:09] stormbytes: array.sample?
[22:44:11] al2o3-cr: &ri Array#sample
[22:44:11] `derpy: http://ruby-doc.org/core-2.4.1/Array.html#method-i-sample
[22:44:50] moei: has joined #ruby
[22:45:26] patarr: has joined #ruby
[22:45:30] stormbytes: sample randomizes the elements and returns the entire array, is there a way to limit it just 1 elem?
[22:45:48] al2o3-cr: stormbytes: no it doesn't
[22:45:52] Radar: >> [1,2,3,4,5].sample
[22:45:57] Radar: Come again?
[22:45:58] ruby[bot]: Radar: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
[22:46:01] stormbytes: nevermind i used the nrg number as random seed
[22:46:03] stormbytes: brain fart..
[22:46:05] Radar: ruby[bot]: why do not hate me
[22:46:10] Radar: why do you*
[22:47:31] apeiros: it's eval.in which hates you, not ruby[bot] :(
[22:47:45] segmond: has joined #ruby
[22:47:50] al2o3-cr: apeiros: carc.in good shit
[22:48:27] AnoHito: has joined #ruby
[22:48:29] al2o3-cr: apeiros: crystal, ruby and C
[22:49:39] al2o3-cr: that error souldn't even be
[22:50:32] al2o3-cr: something wrong with ruby[bot] i think
[22:50:56] al2o3-cr: NoMethodError:undefined method blah....
[22:51:29] apeiros: it's an error in handling an error message from eval.in
[22:51:31] snath: has left #ruby: ("Leaving")
[22:52:03] olivier__: has joined #ruby
[22:52:04] al2o3-cr: something is wrong, terribly wrong apeiros
[22:52:19] blackwind_123: has joined #ruby
[22:52:40] DEac-: has joined #ruby
[22:52:42] al2o3-cr: that's not eval.in
[22:53:34] apeiros: *sob*, yeah, sure, you know better than me about my bot.
[22:54:03] al2o3-cr: i use eval.in
[22:54:18] al2o3-cr: i alse use carc.in
[22:54:53] patarr: has joined #ruby
[22:55:05] al2o3-cr: i'd double check
[22:55:05] apeiros: and I use a pillow now. toodles.
[22:55:28] al2o3-cr: apeiros: nice
[22:56:49] al2o3-cr: i mean nomethoderror for [] nilclass ???
[22:57:30] al2o3-cr: but whatever
[22:59:14] cadillac_: has joined #ruby
[23:01:34] al2o3-cr: experience is making mistake and learning from them
[23:02:08] hutch34: has joined #ruby
[23:02:10] nadir: has joined #ruby
[23:03:38] Cohedrin: has joined #ruby
[23:04:00] herbmillerjr: has joined #ruby
[23:05:38] poloych: has joined #ruby
[23:08:36] mkaito: has joined #ruby
[23:09:55] wnd: has joined #ruby
[23:17:20] perniciouscaffei: has joined #ruby
[23:23:42] jenrzzz: has joined #ruby
[23:23:42] jenrzzz: has joined #ruby
[23:25:34] ascarter: has joined #ruby
[23:26:19] bkxd: has joined #ruby
[23:26:45] dances_with_taco: has joined #ruby
[23:29:32] brent__: has joined #ruby
[23:30:39] shinnya: has joined #ruby
[23:35:06] zenguy_pc: has joined #ruby
[23:36:07] blackwind_123: has joined #ruby
[23:38:37] jgnagy: has joined #ruby
[23:39:00] hobodave: has joined #ruby
[23:39:48] im0nde: has joined #ruby
[23:50:24] knight33: has joined #ruby
[23:52:00] Cohedrin: has joined #ruby
[23:53:22] haylon: has joined #ruby
[23:53:35] alveric3: has joined #ruby
[23:54:56] nowhere_man: has joined #ruby
[23:57:14] nankyokusei: has joined #ruby
[23:59:15] ascarter: has joined #ruby