« Back to channel list

#ruby - 19 November 2015

« Back 1 day Forward 1 day »
[00:03:03] Xeago: has joined #ruby
[00:03:08] tkuchiki: has joined #ruby
[00:04:45] simplyianm: has joined #ruby
[00:05:16] fowlduck: has joined #ruby
[00:05:43] s2013: has joined #ruby
[00:05:52] fowlduck: when I call OpenSSL::X509::Store#set_default_paths, is there any way to find out exactly what those paths are?
[00:06:17] demonlove: has joined #ruby
[00:07:21] jessemcgilallen: has joined #ruby
[00:08:23] Xeago: has joined #ruby
[00:08:28] jessemcgilallen: has joined #ruby
[00:08:47] howdoicomputer: has joined #ruby
[00:09:56] Can-ned_Food: has left #ruby: ("adios")
[00:10:45] ellisTAA: has joined #ruby
[00:10:56] mistermocha: has joined #ruby
[00:11:06] Ox0dea: fowlduck: Go on...
[00:11:14] fowlduck: http://ruby-doc.org/stdlib-2.2.3/libdoc/openssl/rdoc/OpenSSL/X509/Store.html#method-i-set_default_paths
[00:11:17] fowlduck: haha, sorry
[00:11:34] Ox0dea: How does that get you the paths?
[00:11:40] weemsledeux: has joined #ruby
[00:11:53] fowlduck: the docs say "Adds the default certificates to the certificate store. These certificates are loaded from the default configuration directory which can usually be determined by:"
[00:11:59] fowlduck: "File.dirname OpenSSL::Config::DEFAULT_CONFIG_FILE"
[00:12:18] Ox0dea: fowlduck: So you're gonna parse that config file?
[00:12:25] myztic: has joined #ruby
[00:12:33] fowlduck: nope, just looking for this specific instance
[00:12:38] dtordable: wheres the dude that told me one day here "learn ruby, man"
[00:13:38] myztic: has joined #ruby
[00:13:51] casadei: has joined #ruby
[00:15:20] xcesariox: has joined #ruby
[00:15:37] juddey: has joined #ruby
[00:16:27] riotjones: has joined #ruby
[00:17:15] shadoi: has joined #ruby
[00:20:00] krajos: has joined #ruby
[00:20:13] antoniobeyah: has joined #ruby
[00:22:55] freerobby: has joined #ruby
[00:23:31] grill: has joined #ruby
[00:24:10] grill: has joined #ruby
[00:26:26] idefine: has joined #ruby
[00:26:44] htmldrum: has joined #ruby
[00:27:42] tenderlo_: has joined #ruby
[00:28:06] casadei: has joined #ruby
[00:28:43] slash_nick: dtordable: the dude abides
[00:28:51] B1n4r10: has joined #ruby
[00:30:00] Radar: dtordable: which dude?
[00:30:12] Coraline: El Dudarino
[00:30:25] Coraline: If you're not into that whole brevity thing
[00:30:52] Ox0dea: La Dudarina.
[00:31:13] Coraline: Bruja de Ruby personally
[00:31:34] Ox0dea: "Brouhaha" is my favorite word that matches /(..)\1$/.
[00:32:46] TheNet: has joined #ruby
[00:35:07] TheNet: has left #ruby: ()
[00:35:39] johnzorn: has joined #ruby
[00:37:44] jamto11: has joined #ruby
[00:37:58] pwnd_nsfw: has joined #ruby
[00:39:24] tkuchiki: has joined #ruby
[00:41:48] lemur: has joined #ruby
[00:43:50] myztic: good learning resources for ruby? https://www.ruby-lang.org/en/documentation/ looks quite promising, or should I buy a book? Suggestions?
[00:44:05] RegulationD: has joined #ruby
[00:45:34] Rubie: has joined #ruby
[00:45:47] benlovell: has joined #ruby
[00:46:08] Rubie: hi all: anyone have any suggestions to solving this problem? https://leetcode.com/problems/longest-substring-without-repeating-characters/
[00:46:08] ismael_: has joined #ruby
[00:46:23] Scripore: has joined #ruby
[00:46:24] ledestin: has joined #ruby
[00:48:03] Ox0dea: myztic: https://pine.fm/LearnToProgram/ https://github.com/neo/ruby_koans
[00:48:07] Ox0dea: ?books myztic
[00:48:07] ruboto: myztic, You can find a list of recommended books at http://ruby-community.com/pages/links
[00:48:15] woebtz: has joined #ruby
[00:49:33] howdoicomputer: has joined #ruby
[00:50:45] patrick2: has joined #ruby
[00:51:50] myztic: Ox0dea: thanks
[00:52:13] Ox0dea: myztic: Sure thing.
[00:52:17] myztic: how important is it to have documentation for the current version? can I use something that was written fro version 1.8.2-15 or will the difference to now be massive?
[00:52:25] myztic: s/fro/for
[00:52:52] Ox0dea: Quite a bit has changed since 1.8.2.
[00:53:09] Ox0dea: Are you... running 1.8.2?
[00:53:17] woebtz: Hi, is anyone using ruby/gems in their Jenkins build pipeline? I'm having difficulty figuring out how to setup my builds to execute shell w/ different versions of ruby (?) [e.g. Compass CLI gem installed with 1.9.x and Compass CLI gem (a newer version) installed with 2.2.x]
[00:53:55] myztic: Ox0dea: no :D
[00:54:00] myztic: I currently have ruby 2.1.7p400 installed
[00:54:03] tkuchiki: has joined #ruby
[00:54:11] kies: has joined #ruby
[00:54:13] blueOxigen: has joined #ruby
[00:54:25] Ox0dea: myztic: Do you know about `ri`?
[00:55:15] Ox0dea: The documentation therein is virtually guaranteed to be applicable to your Ruby version.
[00:55:16] myztic: Ox0dea: I do now
[00:55:23] Ox0dea: It's pretty nifty.
[00:55:30] myztic: awesome, thanks :)
[00:56:02] TomPeed: has joined #ruby
[00:56:21] myztic: Ox0dea: So I will use Learn to Program, Pine; Will use ri tool, and the maybe some other stuff from the interwebs
[00:56:25] myztic: but that's the plan :)
[00:56:34] myztic: s/the/then
[00:56:38] Ox0dea: Sounds good. I'd also recommend the Koans, though.
[00:56:57] Ox0dea: With luck, you'll become addicted to red-green development.
[00:57:00] myztic: Ox0dea: noticed, bookmarked :)
[00:57:13] Linell: has joined #ruby
[00:57:14] benlieb: has joined #ruby
[00:57:48] baweaver: has joined #ruby
[00:58:06] nettoweb: has joined #ruby
[00:59:48] _blizzy_: has joined #ruby
[01:00:01] bluOxigen: has joined #ruby
[01:00:27] _blizzy_: has joined #ruby
[01:00:57] _blizzy_: has joined #ruby
[01:02:18] _blizzy_: has joined #ruby
[01:02:50] _blizzy_: has joined #ruby
[01:04:27] Linell: Is there are reason why sending a request locally with `X_AUTH_TOKEN` as a header is picked up by request.env but sending it to a server running the same code doesn't have that header set?
[01:05:07] Radar: Linell: codE?
[01:05:35] Linell: https://gist.github.com/Linell/78e89b758a594eea4ae0
[01:05:58] Linell: Locally that puts has HTTP_X_AUTH_TOKEN, on the server it don't
[01:06:50] benlovell: has joined #ruby
[01:07:01] Radar: Hm, I am not sure how that's happening then
[01:07:46] banister: has joined #ruby
[01:10:34] Axsuul: has joined #ruby
[01:12:16] Linell: It's super weird
[01:12:53] Ox0dea: rubie: Any progress?
[01:13:51] Rubie: ox0dea: been on it all day, lol so not really
[01:14:30] Ox0dea: rubie: Easiest would be to generate all the substrings, select the ones with no repeats, map those to their lengths, and grab the maximum thereof.
[01:14:51] Ox0dea: It's hardly the most efficient approach, of course, but it's arguably the simplest.
[01:15:13] Rubie: ox0dea: ya i've gotten that solution, looking to do it o(n)
[01:15:21] Ox0dea: rubie: You should've said as much. :P
[01:15:25] Rubie: using a hash
[01:16:01] Ox0dea: I vaguely recall there being some very clever XOR trick or something to do it without maintaining so much state.
[01:17:19] riotjones: has joined #ruby
[01:17:36] diegoviola: is there a channel for ruby documentation?
[01:18:05] Ox0dea: diegoviola: It's not entirely clear what you're asking.
[01:19:20] diegoviola: "If you want a language for easy object-oriented programming, or you don't like the Perl ugliness, or you do like the concept of LISP, but don't like too many parentheses, Ruby might be your language of choice."
[01:19:26] bruno-: has joined #ruby
[01:19:26] diegoviola: I was surprised to read this is in the ruby man page
[01:19:37] ellisTAA: has joined #ruby
[01:19:38] diegoviola: "Perl ugliness"
[01:19:46] chipotle: has joined #ruby
[01:19:49] diegoviola: unnecessary in my opinion
[01:20:01] Ox0dea: diegoviola: Are you serious?
[01:20:11] diegoviola: Ox0dea: why wouldn't I be?
[01:20:18] Ox0dea: diegoviola: http://i.imgur.com/94jou4v.png
[01:20:27] Ox0dea: What language do you think that program is written in? :P
[01:21:30] rickmasta: has joined #ruby
[01:21:31] Ox0dea: Oh, never mind. I misinterpreted your qualm with "Perl ugliness".
[01:21:42] Ox0dea: I thought you were defending Ruby, but you were championing Perl.
[01:22:03] craysiii: you pulled the trigger too soon Ox
[01:22:09] Ox0dea: That I did.
[01:22:17] Ox0dea: baweaver: Apologies if that's stirred up any bad memories.
[01:22:29] EminenceHC: has joined #ruby
[01:22:32] baweaver: just prefer not to have another Perl vs Ruby war
[01:22:34] diegoviola: Ox0dea: no, I'm not taking any sides, I like Ruby myself but I just don't see the point of mocking perl in the ruby man page
[01:22:54] baweaver: Then go submit a PR
[01:23:23] craysiii: there was a first war?
[01:23:33] Ox0dea: diegoviola: Perl is objectively noisier than most languages.
[01:23:35] baweaver: talking about changes does little, actually opening an issue for discussion is far better
[01:23:44] Yzguy: has joined #ruby
[01:23:45] bruce_lee2: has joined #ruby
[01:24:16] baweaver: ask yourself though: does it _really_ matter that that's in there?
[01:27:15] roxtrongo: has joined #ruby
[01:27:35] sucks: has joined #ruby
[01:27:55] benlovell: has joined #ruby
[01:28:12] sucks: has joined #ruby
[01:28:35] ellisTAA: has joined #ruby
[01:29:30] mistermocha: has joined #ruby
[01:30:38] mg^: One reason I moved away from Perl is the total lack of consistency in interfacing with third party code. Sometimes object oriented, often times not.
[01:31:21] mg^: So I'd end up with this... well, ugly... mixed code
[01:31:25] ixti: has joined #ruby
[01:32:39] diegoviola: baweaver: it's not a big deal, it just seems unprofessional/informal, that's all
[01:33:51] Rollabunna: has joined #ruby
[01:37:05] newdan: has joined #ruby
[01:37:24] baweaver: you have a very strange view of professionalism and marketing then
[01:37:34] baweaver: because pot shots at competitors are pretty common
[01:38:50] jamto11: has joined #ruby
[01:41:24] Ox0dea: rubie: This looks about right: https://eval.in/471451
[01:42:10] Ox0dea: The space complexity isn't so great. :<
[01:42:48] lemur: has joined #ruby
[01:43:20] pdoherty: has joined #ruby
[01:44:01] karapetyan: has joined #ruby
[01:44:15] Rubie: Ox0dea: nice!
[01:46:18] UniFreak: has joined #ruby
[01:46:20] sucks: has joined #ruby
[01:46:42] Croves: has joined #ruby
[01:48:04] knight_: any suggestions for handling referenced and nested models for Phoenix with Mongo?
[01:48:27] havenwood: knight_: Elixir Phoenix?
[01:48:47] havenwood: Ox0dea: How bought? :P https://gist.github.com/havenwood/1c3bb9aa53fcbc9e291b
[01:50:35] havenwood: ACTION feels lazy
[01:51:35] dlitvak: has joined #ruby
[01:52:14] havenwood: knight_: This is the #ruby channel. Did you mean to ask in #elixir-lang?
[01:52:27] griffindy: has joined #ruby
[01:52:34] knight_: Haha, yep, I totally did that by accident :)
[01:52:39] casadei: has joined #ruby
[01:52:47] diegoviola: baweaver: that stuff belongs in IRC conversations, not in man pages
[01:53:07] havenwood: ACTION transcribes irc conversations to manpages
[01:53:09] baweaver: then bring it up with them
[01:53:13] komanda3: has joined #ruby
[01:53:38] baweaver: lamenting the fact with us does you no good
[01:53:38] Ox0dea: havenwood: Aye, it's very pretty, but rubie was after an O(n) solution.
[01:54:10] Ox0dea: diegoviola: Perl doesn't need your services, soldier.
[01:54:18] havenwood: Ox0dea: ayup
[01:55:33] komanda: this ruby url rewrite code works fine for me for .html, but i would also like to use it for .php, what changes should i make to make this happen?
[01:55:35] komanda: http://stackoverflow.com/a/7115561
[01:56:09] komanda: regex & lambda stuff isnt my strong point :'(
[01:56:50] Scripore: has joined #ruby
[01:58:16] jhass: Komanda: wow that's ugly :P
[01:59:06] komanda: jhass: it's my first day in ruby, what would a more legant approach look like?
[01:59:34] Ox0dea: havenwood: https://eval.in/471459
[01:59:44] Ox0dea: What am I missing?
[01:59:45] diegoviola: Ox0dea: "services"?
[02:00:16] Ox0dea: diegoviola: What stands to be gained in changing that particular wording?
[02:00:23] Ox0dea: Will Perl be the better for it? Will Ruby?
[02:01:25] diegoviola: you are missing the point
[02:01:29] komanda: Rewrite Rules look to me like someone bashed their head through their keyboard
[02:02:20] CloCkWeRX1: has joined #ruby
[02:03:18] Ox0dea: diegoviola: Which is what?
[02:03:19] Icey: has joined #ruby
[02:03:34] diegoviola: Ox0dea: when you do `man bash` do you expect to see some shitty comments about how the Windows shell is a POS? Perl ugliness has nothing to do with Ruby
[02:03:55] baweaver: was bash based on windows?
[02:04:07] juddey: has joined #ruby
[02:04:14] baweaver: was ruby based on perl?
[02:04:35] baweaver: look at ack, ag, sift, and other search utils
[02:04:43] baweaver: their taglines are all "faster than x"
[02:04:53] Ox0dea: Wow, such disparaging.
[02:06:39] bubbys: has joined #ruby
[02:06:42] ellisTAA: has joined #ruby
[02:09:06] Respek: has joined #ruby
[02:09:08] jhass: Komanda: how about something like http://p.jhass.eu/z.rb
[02:10:43] havenwood: >> 'abcabcbb'.chars.uniq!.uniq!
[02:10:44] ruboto: havenwood # => nil (https://eval.in/471460)
[02:10:57] grill: question: is it better to open a file and then run an each loop (e.g. to run through an array), or to run through an array and do a file.open() each time?
[02:11:38] bruce_lee2: has joined #ruby
[02:11:53] freerobby: has joined #ruby
[02:11:54] tater: has joined #ruby
[02:12:33] komanda: jhass: hmm getting; NoMethodError: undefined method `call' for "index4":String ~/Desktop/reload/config.ru:12:in `find'
[02:12:59] grill: in other words, is it a bad idea to call a file.open inside a loop?
[02:13:22] iateadonut: has joined #ruby
[02:14:02] komanda: grill: first option if you have enough RAM available, second if you have fast SSD disks
[02:14:02] tater: has joined #ruby
[02:14:02] tater: has joined #ruby
[02:14:39] grill: Komanda could you expand on that?
[02:14:41] DarkBushido: has joined #ruby
[02:15:19] komanda: What code is optimal depends on the hardware below.
[02:15:21] hostess: has joined #ruby
[02:15:28] sucks: has joined #ruby
[02:15:38] grill: what if i have both enough ram and SSDs?
[02:16:10] woebtz: Agh... I wasn't sourcing my gem_path, my_ruby_home env variables correctly
[02:16:10] havenwood: Ox0dea: def lols s; s.size.downto(1).find { |n| s.each_char.each_cons(n).any? { |chars| !chars.uniq! } } end
[02:16:20] komanda: RAM is always faster, so if the file/array isnt that large go for first option
[02:16:37] TomPeed: has joined #ruby
[02:16:40] Ox0dea: havenwood: Such terrible beauty.
[02:16:48] havenwood: Ox0dea: A bang sammich.
[02:16:53] jhass: Komanda: that's weird
[02:16:54] grill: Komanda so you're saying is that the file gets opened and closed every single time with the second method?
[02:17:03] grill: *every single iteration through the loop
[02:17:06] casadei: has joined #ruby
[02:17:11] jhass: Komanda: I don't see how the original code wouldn't produce the same error
[02:17:11] nofxx: has joined #ruby
[02:17:16] Bellthoven: has joined #ruby
[02:17:45] komanda: jhass: playing a bit with the code currently, think i should get yours to work, thanks, will show my final version <3
[02:18:01] aibot: has joined #ruby
[02:18:04] riotjones: has joined #ruby
[02:18:06] komanda: grill: yeah, opening & closing files in a loop is always slower
[02:18:22] komanda: it's better to load an aray of data into memory, write to disk after
[02:18:24] woebtz: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[02:18:39] komanda: but if the file is large, you might want to use your second method
[02:18:52] komanda: it's faster to code, but slower to execute
[02:19:02] jhass: grill: what motivates the question, what's making opening and closing the file all the time possibly preferable in your mind?
[02:19:33] jhass: note that a File.open does not yet read the file into memory
[02:19:55] malconis: has joined #ruby
[02:20:06] weemsledeux: has joined #ruby
[02:20:10] sross07: has joined #ruby
[02:20:23] peteyg_: has joined #ruby
[02:20:54] grill: I have a method that will either output something to stdout or output to stdout and write to a file depending on the value of a param. I'd write less code if I could do the second way
[02:21:08] jessemcgilallen: has joined #ruby
[02:21:23] jhass: Komanda: ah derp, I see the issue, I'm not using the argument to Enumerable#find often enough :P
[02:21:30] PaulCape_: has joined #ruby
[02:21:37] aibot: has joined #ruby
[02:21:46] jhass: Komanda: http://p.jhass.eu/10.rb
[02:21:46] grill: here's the long version of the method
[02:21:48] grill: http://hastebin.com/nuvupezize.rb
[02:22:17] marcosantoniocar: has joined #ruby
[02:22:40] aibot: has joined #ruby
[02:22:53] deavid: has joined #ruby
[02:22:54] benlovell: has joined #ruby
[02:23:07] axsuul_: has joined #ruby
[02:23:12] bronson_: has joined #ruby
[02:23:48] lnx_: has joined #ruby
[02:23:51] monsieur1: has joined #ruby
[02:23:53] cyb3rspy: has joined #ruby
[02:23:57] neanderslob: has joined #ruby
[02:24:03] bytecrawler: has joined #ruby
[02:24:04] jinie: has joined #ruby
[02:24:08] tethra: has joined #ruby
[02:24:11] droptone: has joined #ruby
[02:24:12] gusrub: has joined #ruby
[02:24:14] stephenh: has joined #ruby
[02:24:17] nirix: has joined #ruby
[02:24:20] kramsee: has joined #ruby
[02:24:22] certainty: has joined #ruby
[02:24:24] gilesw: has joined #ruby
[02:24:26] Silex: has joined #ruby
[02:24:27] cliffstah: has joined #ruby
[02:24:28] kaspergrubbe: has joined #ruby
[02:24:36] chihhsin: has joined #ruby
[02:24:42] adamholt_: has joined #ruby
[02:24:43] hfp_work: has joined #ruby
[02:24:43] wedgwood: has joined #ruby
[02:24:44] Morrolan: has joined #ruby
[02:24:46] bnagy: has joined #ruby
[02:24:47] Rovanion_: has joined #ruby
[02:24:48] miah: has joined #ruby
[02:24:52] rickmasta: has joined #ruby
[02:24:55] varesa: has joined #ruby
[02:24:57] Azulinho: has joined #ruby
[02:25:00] jhass: grill: http://p.jhass.eu/11.rb
[02:25:05] ByronJohnson: has joined #ruby
[02:25:07] skakri: has joined #ruby
[02:25:09] rdema: has joined #ruby
[02:25:16] oddmunds: has joined #ruby
[02:25:21] tubbo: has joined #ruby
[02:25:24] jhass: eh, replace the . with a _, but you get the idea
[02:25:27] vbatts|work: has joined #ruby
[02:25:43] xnr: has joined #ruby
[02:25:43] sankaber: has joined #ruby
[02:25:45] komanda: jhass: Thank you so much, i have it working :D
[02:25:48] postmodern: has joined #ruby
[02:25:51] existensil: has joined #ruby
[02:25:59] vbatts|work: has joined #ruby
[02:26:04] CloCkWeRX: has joined #ruby
[02:26:21] grill: interesting
[02:26:23] skweek: has joined #ruby
[02:26:34] sjfhalskdfh: has joined #ruby
[02:26:36] grill: but that'll invoke an extra open and read, right?
[02:26:45] jhass: grill: no, how so?
[02:26:59] jhass: I assume file.checksum is cached of course
[02:27:12] komanda: thanks guys, i think i'm going to read up on ruby some more, it seems like it could accentuate my php&python skills :]
[02:27:19] komanda: cu around <3
[02:27:37] sucks: has joined #ruby
[02:27:59] Cache_Money: has joined #ruby
[02:28:02] roxtrongo: has joined #ruby
[02:28:03] grill: what is the write_file method?
[02:28:13] lokulin: has joined #ruby
[02:28:16] ellisTAA: has joined #ruby
[02:28:43] skullcrasher: has joined #ruby
[02:29:08] towski_: has joined #ruby
[02:29:30] antoniobeyah: has joined #ruby
[02:29:32] jhass: grill: as said typo, that . there wants to be a _
[02:31:00] cgfbee: has joined #ruby
[02:34:38] iamvery: has joined #ruby
[02:35:35] malcolmva: has joined #ruby
[02:35:35] ellisTAA: has joined #ruby
[02:36:11] favadi: has joined #ruby
[02:37:35] saddad: has joined #ruby
[02:43:49] casadei: has joined #ruby
[02:44:18] mistermocha: has joined #ruby
[02:45:10] mistermo_: has joined #ruby
[02:47:10] ellisTAA: has joined #ruby
[02:47:21] EminenceHC: has joined #ruby
[02:47:28] wldcordeiro: has joined #ruby
[02:47:55] seggy: has joined #ruby
[02:50:03] favadi: has joined #ruby
[02:52:08] chimpout: has joined #ruby
[02:55:17] jamto11: has joined #ruby
[02:56:02] framling: has joined #ruby
[02:59:27] Icey: has joined #ruby
[03:02:00] blubjr`: has joined #ruby
[03:03:54] icey_: has joined #ruby
[03:04:00] Cache_Money: has joined #ruby
[03:04:02] Musashi007: has joined #ruby
[03:04:37] Icey: has joined #ruby
[03:05:23] Icey: has joined #ruby
[03:05:50] idefine: has joined #ruby
[03:06:36] nisstyre: has joined #ruby
[03:07:29] tmtwd: has joined #ruby
[03:08:24] Icey: has joined #ruby
[03:09:50] mistermocha: has joined #ruby
[03:10:55] mistermo_: has joined #ruby
[03:11:16] benlieb: has joined #ruby
[03:14:24] droptone: Question: I have an array of hashes, example = [ {"Name" => "Bob", "Title" => "Boss"}, {"Name" => "Steve", "Title" => "Underling}]. What would the syntax be for the most efficient way to search the array to see if any values match, for example, "Name" => "Bob" and "Title" => "Boss"?
[03:15:32] chimpout: i want to help out the black community by creating a programming language
[03:15:40] chimpout: who wants to help out the black community?
[03:15:49] chimpout: let's create the ebonics scripting language
[03:15:51] chimpout: all reserved words will be derivatives of ebonics
[03:16:51] idefine: has joined #ruby
[03:18:55] riotjones: has joined #ruby
[03:19:36] mistermocha: has joined #ruby
[03:20:09] gambl0re: has joined #ruby
[03:21:38] mistermo_: has joined #ruby
[03:23:43] mistermocha: has joined #ruby
[03:24:36] mistermo_: has joined #ruby
[03:24:57] Icey: has joined #ruby
[03:28:39] Rollabunna: has joined #ruby
[03:29:17] mistermocha: has joined #ruby
[03:31:35] cmoneylulz: has joined #ruby
[03:31:42] bubbys: has joined #ruby
[03:33:46] mistermocha: has joined #ruby
[03:36:21] mistermocha: has joined #ruby
[03:37:46] baweaver: has joined #ruby
[03:39:06] mistermo_: has joined #ruby
[03:42:32] havenwood: droptone: In Ruby 2.3 you'll be able to: [{"Name" => "Bob", "Title" => "Boss", aim: true}, {"Name" => "Steve", "Title" => "Underling"}].any? { |h| h >= {"Name" => "Bob", "Title" => "Boss"} }
[03:43:54] droptone: Nice, thank you. What I ended up doing is example.find { |e| e["Name"] == "Bob" && e["Title"] == "Boss" }.nil?
[03:44:00] droptone: Is that acceptable?
[03:44:10] droptone: I should say, is that fast? I know certain methods are faster than others
[03:44:21] droptone: It seems to be returning the proper result. This project is on 2.2.1
[03:44:49] havenwood: droptone: example.any? { |h| h["Name"] == "Bob" && h["Title"] == "Boss" }
[03:44:58] droptone: .any? is quicker?
[03:45:08] droptone: Ok, so it allows me to drop the .nil
[03:45:16] casadei: has joined #ruby
[03:45:46] mistermo_: has joined #ruby
[03:45:53] diegoviola: ruby 2.3 should be usable with the latest rails right now, right?
[03:46:44] droptone: havenwood: thank you
[03:47:02] havenwood: droptone: you're welcome, anytime
[03:49:20] ellisTAA: has joined #ruby
[03:49:40] havenwood: diegoviola: Looking at the .travis.yml is a good way to see what's tested: https://github.com/rails/rails/blob/master/.travis.yml#L28
[03:50:14] diegoviola: havenwood: I see, thanks
[03:50:22] havenwood: diegoviola: np
[03:52:40] mistermocha: has joined #ruby
[03:52:45] djbkd: has joined #ruby
[03:52:48] armyriad: has joined #ruby
[03:53:07] havenwood: diegoviola: (Tests pass on this particular Rails 4.2 app on my machine with Ruby 2.3-preview1 for what it's worth. And they pass on Travis.
[03:54:52] EminenceHC: has joined #ruby
[03:56:07] jamto11: has joined #ruby
[03:57:30] baweaver: >> module Enumerable; def select_h(**kws) select { |h| h >= kws } end end; [{a:1,b:2},{a:3,c:3},{c:3,p:0}].select_h a: 1
[03:57:31] ruboto: baweaver # => undefined method `>=' for {:a=>1, :b=>2}:Hash (NoMethodError) ...check link for more (https://eval.in/471469)
[03:57:38] baweaver: worth a shot
[03:57:44] baweaver: guess it's not building with that yet
[03:57:47] Cache_Money: has joined #ruby
[03:58:12] baweaver: Treat a hash as a subset, and objects as a send(k) == v
[03:58:20] diegoviola: havenwood: cool
[03:58:21] baweaver: could be fun
[03:58:32] Icey: has joined #ruby
[03:58:57] baweaver: people.select name: 'bob', age: 20
[03:58:57] tubuliferous_: has joined #ruby
[03:59:05] baweaver: === would be more useful though...
[03:59:12] baweaver: if only that existed already
[03:59:28] baweaver: https://github.com/baweaver/izzy
[03:59:44] baweaver: toy gem, but still fun
[04:00:43] baweaver: granted this was a while back and I didn't know about certain parts of ruby yet
[04:01:38] casadei: has joined #ruby
[04:03:56] benlovell: has joined #ruby
[04:04:29] mistermocha: has joined #ruby
[04:07:13] chouhoulis: has joined #ruby
[04:12:42] mistermocha: has joined #ruby
[04:12:47] EminenceHC: has joined #ruby
[04:13:17] radgeRayden: has joined #ruby
[04:15:20] braincrash: has joined #ruby
[04:15:42] mistermocha: has joined #ruby
[04:16:53] rbowlby: has joined #ruby
[04:17:35] Axsuul: has joined #ruby
[04:18:23] arescorpio: has joined #ruby
[04:18:45] mistermocha: has joined #ruby
[04:19:43] riotjones: has joined #ruby
[04:22:07] Guest33405: has joined #ruby
[04:23:20] braincrash: has joined #ruby
[04:25:02] myztic: has joined #ruby
[04:25:02] benlovell: has joined #ruby
[04:27:14] duncannz: has joined #ruby
[04:27:48] ibouvousaime: has joined #ruby
[04:28:02] duncannz: has joined #ruby
[04:28:29] camilasan: has joined #ruby
[04:28:47] roxtrongo: has joined #ruby
[04:34:58] framling: has joined #ruby
[04:36:09] bruno-: has joined #ruby
[04:36:16] pkrnj: has joined #ruby
[04:36:20] duncannz: has joined #ruby
[04:37:02] cwong_on_irc: has joined #ruby
[04:37:21] krz: has joined #ruby
[04:37:37] duncannz: has joined #ruby
[04:40:02] fedexo: has joined #ruby
[04:40:15] duncanm: has joined #ruby
[04:40:22] shinenelson: has joined #ruby
[04:40:58] duncanm: has joined #ruby
[04:43:28] mary5030: has joined #ruby
[04:46:00] benlovell: has joined #ruby
[04:50:10] darkf: has joined #ruby
[04:51:09] varunwachaspati_: has joined #ruby
[04:51:49] diegoaguilar: has joined #ruby
[04:52:49] woodruffw: has joined #ruby
[04:53:05] Maletor: has joined #ruby
[04:53:22] build22_: has joined #ruby
[04:55:17] yfeldblum: has joined #ruby
[04:57:07] jamto11: has joined #ruby
[04:59:04] gix: has joined #ruby
[05:03:42] B1n4r10: has joined #ruby
[05:04:04] cmoneylulz: has joined #ruby
[05:07:23] VioletFace: has joined #ruby
[05:09:50] quazimodo: has joined #ruby
[05:09:58] yes`r: has joined #ruby
[05:11:15] cpup: has joined #ruby
[05:11:21] malconis: has joined #ruby
[05:14:14] tubuliferous_: has joined #ruby
[05:15:12] VioletFace: has left #ruby: ()
[05:15:27] aswin: has joined #ruby
[05:15:56] aswin: has left #ruby: ()
[05:17:30] dikaio: has joined #ruby
[05:18:19] ur5us: has joined #ruby
[05:19:06] chouhoulis: has joined #ruby
[05:19:56] trosborn: has joined #ruby
[05:20:30] riotjones: has joined #ruby
[05:20:45] juddey: has joined #ruby
[05:21:04] Melpaws: has joined #ruby
[05:21:54] djbkd: has joined #ruby
[05:22:03] benlovell: has joined #ruby
[05:22:57] krz: has joined #ruby
[05:23:16] Melpaws1: has joined #ruby
[05:26:34] johnny56: has joined #ruby
[05:29:31] roxtrongo: has joined #ruby
[05:35:02] diesel: has joined #ruby
[05:35:49] mistermocha: has joined #ruby
[05:37:07] bruno-: has joined #ruby
[05:39:31] Kabaka: has joined #ruby
[05:43:12] Helheim: has joined #ruby
[05:46:57] RegulationD: has joined #ruby
[05:48:26] howdoicomputer: has joined #ruby
[05:50:15] dionysus69: has joined #ruby
[05:51:40] tildes: has joined #ruby
[05:54:09] build22_: has joined #ruby
[05:55:55] grill: has joined #ruby
[05:57:46] jamto11: has joined #ruby
[05:58:30] favadi: has joined #ruby
[05:59:55] mclee: has joined #ruby
[06:01:29] ur5us: has joined #ruby
[06:04:53] mallu: has joined #ruby
[06:09:01] mallu: I have a method called test(date). I am calling it by test(Time.utc(2015, 11, 19, 0, 0, 0)). It seems like inside test method date is string. How can I convert it to time
[06:09:23] quazimodo: has joined #ruby
[06:13:13] shevy: try either of DateTime.parse Time.parse DateTime.strptime or one of Time.str*
[06:14:57] skade: has joined #ruby
[06:16:19] mallu: shevy: so inside my method I say t = DateTime.parse(date)?
[06:16:42] droptone: Man, I am having a very strange issue where an XMLRPC DateTime value is passing a !nil? test but when I call .to_time on it it's saying "not available for nil"
[06:16:52] bmalum: has joined #ruby
[06:17:02] droptone: I'm not going to begin to explain it, I"m just going to moan for a second. I'm done.
[06:17:02] benlovell: has joined #ruby
[06:17:37] droptone: This is odd as fuck.
[06:17:56] chrissonar: has joined #ruby
[06:18:43] dopie: has joined #ruby
[06:19:18] duncannz: has joined #ruby
[06:19:52] asianMike: has joined #ruby
[06:20:11] duncannz: has joined #ruby
[06:20:20] Fire-Dragon-DoL: has joined #ruby
[06:20:28] dhjondoh: has joined #ruby
[06:20:39] mallu: shevy: I don't want to parse anything.. I just want to get the method argument as time
[06:21:13] aeontech: has joined #ruby
[06:21:19] riotjones: has joined #ruby
[06:21:29] subscope: has joined #ruby
[06:21:47] shevy: yes you want some time object
[06:21:59] shevy: and you said you have a string
[06:22:03] shevy: so there you go
[06:23:55] mallu: def test(date) Time.at(date) do something end ... calling method test(Time.utc(2015, 11, 19, 0, 0, 0)). I 'm getting TypeError: no implicit conversion of Time into String
[06:24:30] shevy: http://ruby-doc.org/core-2.2.2/Time.html#method-c-at
[06:25:00] shevy: you get back a Time object
[06:25:18] shevy: Time + String would not work
[06:26:08] ruurd: has joined #ruby
[06:26:35] mary5030: has joined #ruby
[06:27:11] lxsameer: has joined #ruby
[06:28:50] brainfire: has joined #ruby
[06:29:01] aeontech: has joined #ruby
[06:29:37] lxsameer: has joined #ruby
[06:29:53] tubuliferous_: has joined #ruby
[06:30:52] symm-: has joined #ruby
[06:31:03] yoongkang: has joined #ruby
[06:32:44] lurch_: has joined #ruby
[06:34:49] grill: has joined #ruby
[06:35:18] mallu: shevy: please take a look at this https://gist.github.com/anonymous/c969eca9271f24580049
[06:35:35] duncannz: has joined #ruby
[06:36:03] yardenbar: has joined #ruby
[06:38:54] ahmetkapikiran: has joined #ruby
[06:39:34] bruno-: has joined #ruby
[06:40:00] shevy: so you call Time.utc(Time.utc(2011, 4, 25, 0, 0, 0))
[06:40:04] shevy: why twice Time.utc?
[06:40:36] shevy: by the way you can check inside your method what kind of object you pass, so you can design the method more flexible
[06:40:51] ibouvousaime: has joined #ruby
[06:42:58] ahmetkapikiran: has joined #ruby
[06:43:28] mallu: shevy: oh ok.. i see that I am callig time.utc twice
[06:43:38] benlovell: has joined #ruby
[06:45:54] ruurd: has joined #ruby
[06:46:25] ponga: has joined #ruby
[06:49:28] howdoicomputer: has joined #ruby
[06:49:31] woodruffw: has joined #ruby
[06:51:22] anisha: has joined #ruby
[06:51:54] tagrudev: has joined #ruby
[06:53:42] Pupp3tm4st3r: has joined #ruby
[06:56:08] build22_: has joined #ruby
[06:58:38] jamto11: has joined #ruby
[07:00:32] rickmasta: has joined #ruby
[07:00:59] Rubie: has joined #ruby
[07:02:17] mooe: has joined #ruby
[07:02:32] karapetyan: has joined #ruby
[07:03:04] yfeldblum: has joined #ruby
[07:04:31] emilkarl: has joined #ruby
[07:07:46] jessemcgilallen: has joined #ruby
[07:08:01] emilkarl: has joined #ruby
[07:09:25] codecop: has joined #ruby
[07:12:03] riotjones: has joined #ruby
[07:12:25] sanjayu: has joined #ruby
[07:12:52] emilkarl: has left #ruby: ()
[07:14:57] Musashi007: has joined #ruby
[07:20:01] sinkensabe: has joined #ruby
[07:23:08] krz: has joined #ruby
[07:23:55] simplyianm: has joined #ruby
[07:25:32] trosborn: has joined #ruby
[07:26:40] emilkarl: has joined #ruby
[07:26:40] howdoi: has joined #ruby
[07:28:12] aganov: has joined #ruby
[07:30:16] roxtrongo: has joined #ruby
[07:31:48] benhuda: has joined #ruby
[07:31:54] yoongkang: has joined #ruby
[07:34:34] djbkd: has joined #ruby
[07:34:36] tkuchiki: has joined #ruby
[07:34:58] montagne_goat: has joined #ruby
[07:39:25] skade: has joined #ruby
[07:40:18] karapetyan: has joined #ruby
[07:40:51] ur5us: has joined #ruby
[07:44:15] mloy: has joined #ruby
[07:46:03] CloCkWeRX: has joined #ruby
[07:50:27] howdoicomputer: has joined #ruby
[07:51:04] _djbkd: has joined #ruby
[07:56:32] wanttobeabetterp: has joined #ruby
[07:56:36] ereslibre: has joined #ruby
[07:56:36] ereslibre: has joined #ruby
[07:56:48] wanttobeabetterp: not specific to ruby, But how should I improve my focus while learning programming?
[07:56:50] Stan: has joined #ruby
[07:56:57] build22_: has joined #ruby
[07:59:10] jamto11: has joined #ruby
[08:01:29] htmldrum: has joined #ruby
[08:01:30] krz: has joined #ruby
[08:01:38] lulzmachine: has joined #ruby
[08:02:35] andikr: has joined #ruby
[08:02:57] aufi: has joined #ruby
[08:03:52] TomyWork: has joined #ruby
[08:05:13] ruurd: has joined #ruby
[08:07:15] mdih: has joined #ruby
[08:08:02] simplyianm: has joined #ruby
[08:08:10] vdamewood: has joined #ruby
[08:08:54] jsageryd: wanttobeabetterp: raise motivation?
[08:09:43] wanttobeabetterp: jsageryd: exactly
[08:09:50] jsageryd: wanttobeabetterp: make it fun; I always try to make a small project when learning a new language, that way I have a set goal
[08:10:51] jsageryd: wanttobeabetterp: and this is a shot in the dark, but maybe. https://en.wikipedia.org/wiki/Pomodoro_Technique and also http://teamodoro.com/ (even for one-person teams)
[08:11:34] wanttobeabetterp: aha! let me try that and see :)]
[08:12:25] skade: has joined #ruby
[08:12:39] jsageryd: happy rubying o/
[08:17:35] moei: has joined #ruby
[08:19:24] kimegede: has joined #ruby
[08:19:49] emilkarl: has joined #ruby
[08:20:24] Pumukel: has joined #ruby
[08:29:27] nettoweb: has joined #ruby
[08:30:14] norc: has joined #ruby
[08:30:19] norc: Good morning, folks.
[08:31:21] riotjones: has joined #ruby
[08:31:49] dravine_: has joined #ruby
[08:32:15] benlovell: has joined #ruby
[08:32:31] yoongkang: has joined #ruby
[08:32:52] helpa: has joined #ruby
[08:33:15] adac: has joined #ruby
[08:33:19] DoubleMalt: has joined #ruby
[08:33:25] sross_work|2: has joined #ruby
[08:34:06] yeshacker: has joined #ruby
[08:35:33] monsieurp: has joined #ruby
[08:35:34] shortdudey123_: has joined #ruby
[08:35:57] deg-: has joined #ruby
[08:38:14] ss_much: has joined #ruby
[08:39:11] KrzaQ: Is here anyone knowledgeable in ruby-graphviz? I'm trying to force position of nodes, but I have no idea how to achieve it, and the docs are less than useful, and so is the code.
[08:39:22] KrzaQ: Alternatively, I could use an another gem that could create images out of graphs
[08:40:06] marr: has joined #ruby
[08:40:42] vdamewood: has joined #ruby
[08:41:14] B1n4r10: has joined #ruby
[08:42:35] karapetyan: has joined #ruby
[08:46:00] roxtrongo: has joined #ruby
[08:50:01] nofxx1: has joined #ruby
[08:51:16] howdoicomputer: has joined #ruby
[08:51:55] Hounddog: has joined #ruby
[08:53:57] ruurd: Have a look at graphviz first.
[08:54:11] ruurd: You can generate pictures from it with dot IIRC
[08:55:38] SCHAAP137: has joined #ruby
[08:56:30] jsageryd: KrzaQ: a point of using graphviz is that you don't need to bother with positioning
[08:56:37] ruurd: www.graphviz.org
[08:57:09] ruurd: jsageryd he can if he writes his own layouter
[08:57:12] KrzaQ: jsageryd: do you know of an alternative where I have the ability to (be bothered with) position my nodes as I wish?
[08:57:19] jsageryd: KrzaQ: there are ways to align abd grouo nodes in different ways, though. Look at the examples for inspiration.
[08:57:42] build22_: has joined #ruby
[08:58:03] KrzaQ: ruby-graphviz's examples don't help, there is one using :pos option, but it seems to do nothing
[08:58:13] Hounddog: has joined #ruby
[08:58:39] jsageryd: KrzaQ: I don't know your use-case. Explore examples at link ruurd gave above
[08:58:51] Musashi007: has joined #ruby
[08:59:37] KrzaQ: oh, you mean the graphviz itself, not the gem
[08:59:42] KrzaQ: I will, I guess
[08:59:44] nofxx: has joined #ruby
[09:00:07] jamto11: has joined #ruby
[09:00:26] yashinbasement: has joined #ruby
[09:01:00] baweaver: has joined #ruby
[09:02:21] dmolina: has joined #ruby
[09:02:28] last_staff: has joined #ruby
[09:04:32] Lildirt: has joined #ruby
[09:06:06] jimms: has joined #ruby
[09:07:38] Hounddog: has joined #ruby
[09:08:25] curses: has joined #ruby
[09:10:55] Hounddog: has joined #ruby
[09:12:57] tomphp: has joined #ruby
[09:13:54] haxrbyte: has joined #ruby
[09:14:14] maasha: has joined #ruby
[09:14:46] maasha: I am looking for a way to extract Yard documentation for specific classes and render in Github markdown, ideas?
[09:15:48] casadei: has joined #ruby
[09:15:55] cyb3rspy: wanttobeabetterp: try this book http://learnrubythehardway.org/book/
[09:16:19] cyb3rspy: wanttobeabetterp: it has a methodology to learning any language which I find works really well for me.
[09:17:23] nertzy2: has joined #ruby
[09:19:03] adaedra: maasha: should be possible through a template. I don't know if there is a mardown template already existing, though.
[09:19:49] last_staff: has joined #ruby
[09:20:38] maasha: adaedra: indeed it should be possible, I was just looking to see if anyone knew before jumping though hoops
[09:21:15] skade: has joined #ruby
[09:23:53] krzkrz: has joined #ruby
[09:24:01] blueOxigen: has joined #ruby
[09:27:02] aspiers: has joined #ruby
[09:27:38] Peg-leg: has joined #ruby
[09:28:07] senayar: has joined #ruby
[09:32:32] casadei: has joined #ruby
[09:38:26] CloCkWeRX: has joined #ruby
[09:39:31] CloCkWeRX: has left #ruby: ()
[09:41:12] bruno-: has joined #ruby
[09:44:05] Kelzier: has joined #ruby
[09:45:46] tesuji: has joined #ruby
[09:48:20] ruurd: has joined #ruby
[09:48:34] RegulationD: has joined #ruby
[09:49:41] bayed: has joined #ruby
[09:52:13] howdoicomputer: has joined #ruby
[09:53:43] build22_: has joined #ruby
[09:57:16] emilkarl: has joined #ruby
[10:00:43] jamto11: has joined #ruby
[10:01:25] rodfersou: has joined #ruby
[10:03:41] baweaver: has joined #ruby
[10:03:46] shredding: has joined #ruby
[10:04:18] rdark: has joined #ruby
[10:04:18] rdark: has joined #ruby
[10:04:25] skade: has joined #ruby
[10:04:29] jimms: has left #ruby: ()
[10:04:35] karapetyan: has joined #ruby
[10:04:48] rdark: has joined #ruby
[10:07:05] nirix: has joined #ruby
[10:08:08] subscope: has joined #ruby
[10:11:45] bmalum: has joined #ruby
[10:14:17] colli5ion: has joined #ruby
[10:15:13] DoubleMalt: has joined #ruby
[10:16:46] roxtrongo: has joined #ruby
[10:20:24] huddy: has joined #ruby
[10:20:43] UniFreak: when tring to install hitimes in cygwin(although I don't know what's hitimes, but to run jekyll, I run `bundle install`, and bundle is tring to install hitimes), the error output is like this: http://paste.ubuntu.com/13343697/
[10:21:05] ibouvousaime: has joined #ruby
[10:21:18] moeabdol: has joined #ruby
[10:21:24] norc: UniFreak: Brave thing to use cygwin.
[10:22:21] platzhirsch: has joined #ruby
[10:22:38] UniFreak: any idea why? how could I fix this?
[10:22:49] UniFreak: I'm just trying to get jekyll run in cygwin
[10:22:54] emilkarl: I???d love some feedback on this. How could I improve this apply_filter method? http://pastie.org/10565322
[10:23:00] UniFreak: been stucked over here and there for days....
[10:23:38] norc: emilkarl: use a scope :)
[10:24:25] arup_r: has joined #ruby
[10:24:46] emilkarl: hmm k but apply in the example is just one???but the filter could be something other the event_date range. I just added that for the sake of it
[10:25:11] subscope: has joined #ruby
[10:25:38] norc: emilkarl: Still. Use scopes in your model.
[10:26:05] tubuliferous_: has joined #ruby
[10:26:32] emilkarl: how could it imrpove apply_filters method?
[10:27:02] emilkarl: but yes, i will add scopes
[10:28:01] KrzaQ: https://gist.github.com/KrzaQ/52c313b5b90bdc633618 Can I hide n from the global scope in a nicer way than wrapping it inside a lambda?
[10:28:25] norc: KrzaQ: use inject
[10:29:19] norc: KrzaQ: errr no. map.with_index
[10:29:23] norc: Probably easiest. :)
[10:29:30] TPBallbag: has joined #ruby
[10:30:03] norc: Or each_with_index.map - either way
[10:30:03] KrzaQ: oh, right
[10:31:08] emrox_: has joined #ruby
[10:32:54] KrzaQ: thanks, norc
[10:32:55] braincrash: has joined #ruby
[10:33:45] vdamewood: has joined #ruby
[10:34:01] yoongkang: has joined #ruby
[10:34:11] KrzaQ: it's map.with_index
[10:34:16] KrzaQ: Well, it works. Thanks again
[10:34:32] joonty: has joined #ruby
[10:36:08] ldnunes: has joined #ruby
[10:36:42] bkxd: has joined #ruby
[10:38:40] lubekpl: has joined #ruby
[10:39:55] yoongkang: has joined #ruby
[10:40:50] rdark: has joined #ruby
[10:42:34] go|dfish: has joined #ruby
[10:42:35] dramagods: has joined #ruby
[10:44:11] KrzaQ: Can I use % formatting with heredocs?
[10:44:55] tvw: has joined #ruby
[10:45:43] dlitvak: has joined #ruby
[10:46:08] FernandoBasso: has joined #ruby
[10:49:40] dlitvak_: has joined #ruby
[10:52:26] moeabdol: has joined #ruby
[10:52:58] howdoicomputer: has joined #ruby
[10:53:07] Bish: hi, is there some way i can provide a ftp server, which is safe?, all the ftp daemons in ruby tell me they're for testing purpose not for real use
[10:55:38] UtkarshRay: has joined #ruby
[10:57:02] ibouvousaime: has joined #ruby
[10:58:43] helpa-bot: has joined #ruby
[10:59:22] ddv: Bish: use sftp
[11:00:28] Bish: ddv, so there is a sftp server, but no ftp server?
[11:00:39] LoganG_: has joined #ruby
[11:00:45] AccordsLTN: has joined #ruby
[11:00:56] Bish: or do you want to tell me, because of encryption it's safe
[11:01:10] Downtime: has joined #ruby
[11:01:30] mhenrixon: has joined #ruby
[11:01:31] prasselpikachu: has joined #ruby
[11:01:37] havenn: has joined #ruby
[11:01:37] havenn: has joined #ruby
[11:01:38] Zarthus: has joined #ruby
[11:01:38] kitallis: has joined #ruby
[11:01:38] jamto11: has joined #ruby
[11:01:49] kalleth: has joined #ruby
[11:02:01] Antiarc: has joined #ruby
[11:02:01] Meeh: has joined #ruby
[11:02:04] Puffball: has joined #ruby
[11:02:08] heftig: has joined #ruby
[11:02:11] rodferso1: has joined #ruby
[11:02:12] contradictioned: has joined #ruby
[11:02:39] helpa: has joined #ruby
[11:03:21] rodferso1: has joined #ruby
[11:03:23] Prira: has joined #ruby
[11:04:29] norc: Bish: If safety is a concern, then you should look at a mature solution.
[11:04:34] ruid: has joined #ruby
[11:04:39] baweaver: has joined #ruby
[11:04:41] norc: I am not aware of any mature ftpd implementation in Ruby.
[11:04:57] karapetyan: has joined #ruby
[11:06:05] quazimodo: has joined #ruby
[11:06:09] akem: has joined #ruby
[11:06:15] roxtrongo: has joined #ruby
[11:07:14] UniFreak: has joined #ruby
[11:07:27] dlitvak: has joined #ruby
[11:07:42] Bish: norc, one of our clients wantttts a ftp upload it has to be ftp ( it's a web application )
[11:07:47] The_Phoenix: has joined #ruby
[11:07:57] norc: Bish: So? Set up a vsftpd, pureftpd or proftpd on your server.
[11:08:08] norc: Or any other ftpd you like.
[11:08:20] Bish: yes, then i will have them f*ing with my filesystem
[11:09:06] Bish: and i will have to create a ftp server for every client, or leave this feature to this only client
[11:09:15] Bish: im new to business :D no clue how i handle that
[11:10:16] norc: Bish: So what you want is either an orchestration solution in some VM environment like ansible, or use docker.
[11:11:19] ddv: Bish: you can chroot vsftpd
[11:11:40] ddv: Bish: this is pretty easy to do
[11:12:02] norc: Bish: And if you only need to provide FTP space to each client, just use docker.
[11:12:16] norc: If you insist on giving each his own ftpd.
[11:13:26] moeabdol: has joined #ruby
[11:14:56] matp: has joined #ruby
[11:15:37] ddv: 'just use docker lol'
[11:15:56] ddv: there is no reason to give each user its own ftpd daemon
[11:16:02] ddv: docker will overcomplicate this
[11:16:46] dhjondoh: has joined #ruby
[11:17:07] Bish: the software gets hosted on the clients server, each time, i already thought about using docker, right now i wanted to create a chroot for every client
[11:17:17] Bish: (i am still in developement)
[11:17:31] ddv: this is just a default feature of vsftpd
[11:17:54] Bish: you mean chrooting the ftpd?
[11:18:01] ddv: yes it will chroot each user
[11:18:13] karapetyan: has joined #ruby
[11:18:25] Bish: yeah i know vsftpd, used it several times, but i actually hate the fact that i would've to configure it for every client
[11:18:44] solocshaw: has joined #ruby
[11:19:37] codecop: has joined #ruby
[11:19:44] ddv: i would not use ftp anyways, it's not secure and ftps is very tricking with certain firewalls so just use sftp
[11:19:51] ddv: tricky*
[11:20:09] Bish: i wouldn't even use sftp, but this one client WANTS it, for stupid reasons
[11:20:20] Bish: what can i do
[11:20:28] rickmasta: has joined #ruby
[11:20:34] ddv: Bish: educate them
[11:20:36] ddv: show them the risks
[11:20:43] Bish: tried, failed
[11:20:48] Bish: as i said im new :3
[11:21:08] Bish: "ftp is faster"
[11:21:12] Bish: yeah rightl.
[11:21:45] bruno-: has joined #ruby
[11:22:44] ddv: try harder
[11:24:15] Darkchaos: has joined #ruby
[11:24:28] karapetyan: has joined #ruby
[11:24:47] dotix: has joined #ruby
[11:25:27] Ox0dea: has joined #ruby
[11:25:42] Darkchaos: Hey Guys. I am looking for a good way to spawn a new process and capture it's IO. I came across open3#popen3, my problem is, that I can't use Marshal.dump for the IO objects (STDIN, STDERR). Can i somehow serialize the PID and then open the Streams on Demand?
[11:25:59] Darkchaos: And/Or is there something returning a "Process" Object, where I can see if the process is still alive and open said streams?
[11:26:33] Ox0dea: Darkchaos: Not Windows, presumably?
[11:26:54] Darkchaos: Currently only Debian, but platform independant would be nice aswell
[11:27:02] pard: has joined #ruby
[11:27:26] Ox0dea: Darkchaos: Well, there's procfs on Linux, so you could just read and write to the file descriptors in /proc/PID/fd.
[11:27:42] Bish: Ox0dea, o/
[11:28:01] Ox0dea: \o, in any case. :P
[11:28:13] Ox0dea: Sorry, my name memory is shit. :<
[11:28:17] yoongkang: has joined #ruby
[11:28:31] Bish: somehow my it reminds me of nazi germany
[11:28:49] Bish: if you do it that way around, even if mine should be
[11:28:59] Bish: Ox0dea, im also arne or arne_ you helped me alot last weeks
[11:29:08] platzhirsch: in-flight WiFi, my first git push at 100,000 meters height. So exciting..
[11:29:11] Hounddog: has joined #ruby
[11:29:38] Bish: platzhirsch, cool!
[11:30:02] Bish: my 12h flight didn't have wifi :( atleast afaik.
[11:30:37] pard: is ~@ any diff from ~
[11:31:26] Darkchaos: 0x0dea: Ah good to know :) And then Process#spawn and Process#detach I guess?
[11:31:42] platzhirsch: better spend some time reading : D
[11:32:13] Ox0dea: pard: No, and neither `!@` from `!`..
[11:32:17] shlomo: has joined #ruby
[11:32:42] Ox0dea: We need more unary operators.
[11:33:09] roxtrongo: has joined #ruby
[11:33:10] Ox0dea: `*` and `**` technically count, but the context in which they're valid as such is quite limited.
[11:34:02] pard: i couldn't help asking why !@ when ! already takes just one op
[11:34:21] Hounddog: has joined #ruby
[11:34:39] Ox0dea: pard: Whale, it's consistent with `+@` and `-@`, and that's worth something.
[11:36:03] pard: eating shark fin is cruel :\
[11:36:05] Ox0dea: Darkchaos: Sorry, I missed your mis-ping, but yeah, something like that would do fine.
[11:36:38] Ox0dea: Be advised that normal processes aren't allowed to read arbitrarily from procfs.
[11:37:22] aryaching: has joined #ruby
[11:37:23] pard: why isn't there any decent manual on Ripper?
[11:37:36] platzhirsch: has left #ruby: ()
[11:37:55] Ox0dea: pard: You're not supposed to use it.
[11:37:59] stamina: has joined #ruby
[11:38:55] Darkchaos: Ox0dea: Oh it's an O instead of an 0 in the beginning :D
[11:39:00] dlitvak_: has joined #ruby
[11:39:09] platzhirsch: has joined #ruby
[11:39:15] Darkchaos: Ox0dea: But when I call Process#spawn they should be my child-process and as such I should have the permission?
[11:39:29] Darkchaos: Or is it the usual "root only" thing?
[11:39:53] Ox0dea: Darkchaos: No, that'll be fine; I didn't realize you were in control of these processes you meant to attach to.
[11:40:09] subscope: has joined #ruby
[11:40:11] Ox0dea: You need many of them at once, then?
[11:41:13] Darkchaos: Ox0dea: Yes. Infact I created something like a scheduler, which will start those processes, restart them if they crash/exit, and such. And I thought it would be nice to have the Output being read out aswell
[11:41:18] Amnez777_: has joined #ruby
[11:41:41] platzhirsch: has left #ruby: ()
[11:42:19] Amnez777_: has joined #ruby
[11:43:00] Hounddog: has joined #ruby
[11:43:05] Ox0dea: Darkchaos: That sounds pretty nifty; are you sure #popen3 was insufficient?
[11:43:31] Ox0dea: (Worst semicolon ever.)
[11:43:38] Amnez777_: has joined #ruby
[11:44:24] Darkchaos: Ox0dea: Well it uses a web-frontend and as such I need something to serialize to my DB. Unfortunately IO's are not serializable (Marshal.dump can't)
[11:44:48] Ox0dea: Darkchaos: Gotcha.
[11:44:59] Darkchaos: And as such I'd only need the PID and open the Stream only when someone wants to see what that particular process has done in the past
[11:45:49] Ox0dea: Darkchaos: Dead processes disappear from procfs, mind.
[11:47:57] bruno-: has joined #ruby
[11:48:02] Darkchaos: so having a short back-log would be nice, mh. on the other hand it's just to have a glimpse on what the process currently does. In case of error the process is restarted five times and then it's listed as errorneous
[11:48:14] solars: has joined #ruby
[11:48:47] jokester: has joined #ruby
[11:48:53] Amnez777: has joined #ruby
[11:49:43] lubarch: has joined #ruby
[11:49:59] Amnez777_: has joined #ruby
[11:50:32] rob_: has left #ruby: ()
[11:50:59] skade: has joined #ruby
[11:52:11] iateadonut: has joined #ruby
[11:52:16] Hounddog: has joined #ruby
[11:54:05] howdoicomputer: has joined #ruby
[11:54:52] zvive: has joined #ruby
[11:55:01] Amnez777_: has joined #ruby
[11:55:29] spiman: has joined #ruby
[11:57:16] Hounddog: has joined #ruby
[11:58:11] Scripore: has joined #ruby
[11:58:18] Darkchaos: Ox0dea: When a gem calls itself thread-safe I don't have to worry about anything, right? Just use it as I would without Threads?
[11:59:10] Zarthus_: has joined #ruby
[11:59:54] krz: has joined #ruby
[12:00:34] bmalum: has joined #ruby
[12:00:36] Amnez777: has joined #ruby
[12:01:08] moeabdol: has joined #ruby
[12:01:17] Ox0dea: Darkchaos: I am not omniscient. :P
[12:02:18] jamto11: has joined #ruby
[12:02:19] Amnez777: has joined #ruby
[12:03:11] Darkchaos: Ox0dea: Okay :P Maybe someone else knows. But basically that should be what thread safe means I guess :D
[12:03:22] circ-user-hgOzR: has joined #ruby
[12:03:35] Rubie: has joined #ruby
[12:05:12] circ-user-hgOzR: has left #ruby: ()
[12:07:07] rickmasta: has joined #ruby
[12:07:27] Hounddog: has joined #ruby
[12:08:54] ibouvousaime_: has joined #ruby
[12:09:36] diego2: has joined #ruby
[12:10:43] AlexRussia: has joined #ruby
[12:10:57] Amnez777: has joined #ruby
[12:13:19] diego3: has joined #ruby
[12:14:04] diego3: has joined #ruby
[12:15:03] tinyhippo: has left #ruby: ()
[12:15:42] Hounddog: has joined #ruby
[12:15:47] memph1s: has joined #ruby
[12:17:46] vondruch: has joined #ruby
[12:18:56] B1n4r10: has joined #ruby
[12:18:56] Hounddog: has joined #ruby
[12:19:32] cbetta: has joined #ruby
[12:20:29] Mon_Ouie: has joined #ruby
[12:20:45] omz: has joined #ruby
[12:21:49] adaedra: Ox0dea: you lie
[12:22:20] favadi: has joined #ruby
[12:22:25] Ox0dea: ACTION hides crystal ball.
[12:23:50] tulak: has joined #ruby
[12:26:52] emilkarl: has joined #ruby
[12:27:08] bob_f: Darkchaos: When a gem calls itself thread-safe it probably means it's not thread safe.
[12:27:34] yardenbar: has joined #ruby
[12:30:19] apeiros: Darkchaos: thread-safe does not mean "no worries". it means that concurrent access should not corrupt data. that's about all.
[12:30:43] bob_f: And that "should" is really important.
[12:30:44] jas02: has joined #ruby
[12:30:50] apeiros: and as for bob_f's comment - that's just a variation of "everything is buggy"
[12:31:21] apeiros: i.e., if it fails to do so - file a bug.
[12:31:34] bob_f: People don't write "bug free" in their readmes.
[12:31:42] bob_f: They do write "thread safe".
[12:31:42] apeiros: well, actually???
[12:32:04] yoongkang: has joined #ruby
[12:32:13] apeiros: yes. which is part of the description of the functionality.
[12:32:32] apeiros: perfectly sane. even if a bug means it isn't fully thread-safe.
[12:32:46] apeiros: it'd rather be insane to do the opposite.
[12:33:17] apeiros: or would you prefer software had completely empty descriptions because a bug might mean some of it doesn't do as it should?
[12:33:54] SCHAAP137: has joined #ruby
[12:34:00] bob_f: What I'm saying is that people explicitly write "thread safe" and people who don't know a great deal about threaded software might easily think "oh cool, i don't have to think about threads then".
[12:34:17] bob_f: No need to be so obtuse here.
[12:34:28] apeiros: !kick bob_f no insults
[12:34:29] ruboto: ruboto kicked bob_f: insults
[12:34:29] ruboto: -o ruboto
[12:34:41] bob_f: has joined #ruby
[12:35:12] apeiros: it's not the duty of the software developer to ensure that established language is understood by everybody.
[12:35:16] bob_f: I am insulted that you do not know what obtuse means.
[12:35:25] apeiros: bob_f: I can make that kick a ban too.
[12:35:36] apeiros: better you drop it and fix your attitude for the future.
[12:35:56] bob_f: Nah, you're representing the channel well; go ahead.
[12:36:44] bob_f: has left #ruby: ()
[12:37:08] pskosinski: has joined #ruby
[12:38:32] lkba: has joined #ruby
[12:38:51] Coldblackice: has joined #ruby
[12:38:55] apeiros: what a sad person.
[12:39:40] tubuliferous_: has joined #ruby
[12:39:45] Ox0dea: How do I update a local gem?
[12:39:58] UniFreak1: has joined #ruby
[12:40:12] skade: has joined #ruby
[12:40:30] suchness: Ox0dea: Can't you just gem checkout over the top of it?
[12:40:42] Ox0dea: suchness: I specifically want to invoke RubyGems' update process.
[12:41:20] suchness: Ox0dea: Ah, I am not sure you can, I think you need to update the installed version and then checkout over the top. I could be wrong though.
[12:41:30] Ox0dea: I'm doing something unorthodox upon installation and can't immediately tell whether it'll execute on update or not.
[12:41:35] suchness: Come to think of it I hope I am
[12:41:53] suchness: Seems like you should be able to do it...
[12:42:16] Ox0dea: It should arguably be as simple as `gem up -l`, and then it'd look for a new version in the same directory as the original.
[12:43:01] Ox0dea: `gem up -l` sounds like "je m'appelle".
[12:43:05] Ox0dea: adaedra: ^
[12:43:11] apeiros: Ox0dea: what do you mean, update a local gem? gem install path/to.gem
[12:43:19] Ox0dea: apeiros: That invokes installation.
[12:44:02] Ox0dea: I'm trying to determine exactly how install and update differ, because surely they must?
[12:44:11] prestorium: has joined #ruby
[12:44:14] apeiros: I don't think I've ever used `gem update` and was just wondering the same.
[12:44:27] pawnbox: has joined #ruby
[12:44:35] sdothum: has joined #ruby
[12:44:39] apeiros: oh, well, I used gem update --system. but that's the only one.
[12:44:53] kobain: has joined #ruby
[12:45:04] apeiros: I think the point of `gem update` is to use it to update all gems
[12:45:15] adaedra: Ox0dea: after some drinks, yes
[12:45:17] Ox0dea: Sure, but my one will be involved in that process.
[12:45:17] apeiros: `gem install` requires you to tell it which one to install (and hence update)
[12:45:52] daivyk: has joined #ruby
[12:45:55] apeiros: Ox0dea: then that'll probably result in "gem not found". and I don't think we can add local paths as source.
[12:45:58] banister: has joined #ruby
[12:46:00] apeiros: but maybe I'm wrong :)
[12:46:06] apeiros: hey banister
[12:46:09] Ox0dea: apeiros: I think you've just misunderstood.
[12:46:21] banister: apeiros hoi meneer, hoe gaat het?
[12:46:33] apeiros: banister: I don't speak dutch (that was dutch, right?)
[12:46:42] shevy: long live ruby!
[12:46:46] Ox0dea: I'm convincing `gem` to execute code post-installation, and I need to determine whether that same code will be executed post-update.
[12:47:01] shevy: are you trying to break something again Ox0dea
[12:47:04] Ox0dea: shevy: Always.
[12:47:12] shevy: you have my blessings then
[12:47:12] Ox0dea: (But not actually this time.)
[12:47:16] banister: apeiros oh, i thought all non-native english europeans spoke the same language, i wasn't sure what it was called, i just know that it's quaint
[12:47:26] Ox0dea: Yuropese.
[12:47:26] apeiros: Ox0dea: and `gem update path/to.gem` didn't work?
[12:47:32] shevy: http://cf.chucklesnetwork.com/items/8/1/5/2/5/original/break-all-the-things.jpg
[12:47:39] adaedra: banister: esperanto?
[12:47:44] Ox0dea: > Nothing to update
[12:47:52] apeiros: Ox0dea: did you change the version?
[12:47:53] Ox0dea: apeiros: Which makes sense, to be fair.
[12:48:34] Ox0dea: (Yes, I did.)
[12:48:55] apeiros: hm, ok. with different versions, I'd have expected that to work.
[12:49:21] apeiros: though, I am pretty sure that update will invoke installation
[12:49:34] apeiros: drbrain: ping - insights in Ox0dea's problem?
[12:50:33] slackbotgz: has joined #ruby
[12:50:47] Ox0dea: drbrain: I've added "Rakefile" as an extension to have my default task invoked post-installation; will that task be executed during an update?
[12:51:34] benlovell: has joined #ruby
[12:51:36] apeiros: mhm, I see the same here. `gem update -l path/to.gem` with a gem which has a newer version number "fails" with "nothing to update"
[12:51:49] Ox0dea: As it should, I would think.
[12:52:06] apeiros: and when I do `gem update gemname` it works (the newer version was pushed, i.e. is on the gem servers)
[12:52:19] apeiros: Ox0dea: hm? I'd expect it to update the gem.
[12:53:04] Ox0dea: apeiros: `gem update` takes the gem to update, not the gem to update to.
[12:53:10] xet7: has joined #ruby
[12:53:24] apeiros: what's the purpose of -l then?
[12:53:36] Ox0dea: Local overrides, I guess.
[12:53:36] roxtrongo: has joined #ruby
[12:53:40] apeiros: or rather -r, because you can't update a remote gem???
[12:53:48] Ox0dea: Not with that attitude.
[12:54:46] howdoicomputer: has joined #ruby
[12:55:32] apeiros: I mean, the part "takes the gem to update, not the gem to update to" makes sense. but I don't see how that should work together with -l/-r
[12:55:58] Ox0dea: We need a doctor.
[12:56:12] Melpaws: has joined #ruby
[12:56:45] apeiros: indeed. curious to read what drbrain has to say to this :)
[12:57:00] apeiros: `gem help update`leaves me none the wiser
[12:57:05] Ox0dea: Aye, same boat.
[12:57:07] casadei: has joined #ruby
[12:57:37] subscope: has joined #ruby
[12:57:51] apeiros: but given what I saw in my gem update, it does execute an installation. mine had a post-install message and that was shown.
[12:58:35] apeiros: i.e. I expect gem update to do something akin "find all gems which match REGEX, get current versions for them, install those"
[12:59:12] Ox0dea: Yeah, that sounds spot-on, but I'd like to become aware of any subtle differences.
[12:59:13] apeiros: until then - you could run a geminabox server
[12:59:27] apeiros: and use that as your only source, or as an added source
[12:59:42] doddok: has joined #ruby
[13:01:14] Ox0dea: Somebody recently tried to use geminabox and found it to be broken; Radar pointed them toward gemstash.
[13:01:21] emrox: has joined #ruby
[13:01:28] Ox0dea: I suppose I'll do that if the neurologist hasn't yet woken when I return.
[13:03:04] jamto11: has joined #ruby
[13:03:34] saab900: has joined #ruby
[13:03:41] saab900_: has joined #ruby
[13:05:52] k3asd`: has joined #ruby
[13:06:34] ruid: has joined #ruby
[13:07:17] baweaver: has joined #ruby
[13:07:19] PaulCapestany: has joined #ruby
[13:08:13] roxtrongo: has joined #ruby
[13:08:18] Icey: has left #ruby: ("undefined")
[13:08:23] Icey: has joined #ruby
[13:08:45] atomical: has joined #ruby
[13:10:24] synthroid: has joined #ruby
[13:12:18] sgambino: has joined #ruby
[13:14:28] emilkarl: has joined #ruby
[13:17:10] tesuji: has joined #ruby
[13:18:59] pawnbox: has joined #ruby
[13:19:02] Ilyes512: has joined #ruby
[13:21:06] donske: has joined #ruby
[13:21:30] howdoicomputer: has joined #ruby
[13:21:36] rgtk: has joined #ruby
[13:22:09] pawnbox: has joined #ruby
[13:23:39] kobain: has joined #ruby
[13:23:49] slackbotgz: has joined #ruby
[13:24:38] vondruch: has joined #ruby
[13:27:06] j416: has joined #ruby
[13:27:59] pawnbox: has joined #ruby
[13:28:01] _stu_: has joined #ruby
[13:28:21] diego2: has joined #ruby
[13:28:49] diego2: has joined #ruby
[13:28:56] Icey: has joined #ruby
[13:29:35] liuchun: has joined #ruby
[13:29:52] shredding: has joined #ruby
[13:30:57] brainfire: is there an easy predefined method to sort an array of arrays of two strings by one of the strings...?
[13:33:35] shevy: why do we not have a method called .prepend for array?
[13:34:16] shevy: k we have .unshift
[13:35:05] symm-: has joined #ruby
[13:35:35] gusTester: has joined #ruby
[13:36:08] gusTester: has left #ruby: ()
[13:36:31] banister: brainfire wat
[13:36:33] Ox0dea: >> 'oo'.prepend ?f
[13:36:34] ruboto: Ox0dea # => "foo" (https://eval.in/471870)
[13:36:36] banister: brainfire but probalby use sort_by
[13:36:36] djellemah: brainfire: sort_by
[13:36:38] Ox0dea: banister: huh?
[13:36:42] banzaikitten: has joined #ruby
[13:36:47] banzaikitten: i love you guys
[13:36:47] Ox0dea: Sorry, that was for brainfire.
[13:37:27] shevy: Ox0dea yeah for strings... was weird because [0,0]= works both on strings and arrays, but for putting stuff before anything, we have .prepend on String and .unshift for Arrays although both strike me as synonymous when we also have [0,0]=
[13:37:33] vondruch: has joined #ruby
[13:37:40] Ox0dea: shevy: You'd want String#push, then?
[13:37:43] GrammarFegelein: has joined #ruby
[13:37:44] j416: has joined #ruby
[13:37:54] linuxboytoo: has joined #ruby
[13:38:27] Ox0dea: Ruby doesn't take the notion that a string is a collection of characters as far as some might prefer.
[13:38:31] GrammarFegelein: has left #ruby: ("AndroIRC")
[13:38:45] shevy: .push .pop .shift .unshift seems heavily perl inspired
[13:38:52] Ox0dea: It's standard nomenclature.
[13:39:47] matp: has joined #ruby
[13:40:28] TomPeed: has joined #ruby
[13:41:30] brainfire: I have an array that looks like [[string1,string2],....] where string 1 may repeat for different string2s. I'm looking for some way to group all the string1s together
[13:42:06] Ox0dea: brainfire: foo.group_by(&:first)
[13:42:45] jschoolcraft: has joined #ruby
[13:43:17] brainfire: Ox0dea: group_by returns a hash, I'd like to keep it an array
[13:43:23] Ox0dea: brainfire: Are you sure?
[13:43:59] Amnez777: has joined #ruby
[13:44:05] brainfire: Ox0dea: I've already written other code that assumes it's an array >.<
[13:44:18] Ox0dea: Well, that was dumb. :<
[13:44:23] Ox0dea: Seems like you just need to sort the thing?
[13:44:31] edward_: has joined #ruby
[13:44:39] wprice: has joined #ruby
[13:45:11] Ox0dea: I'm having trouble taking your meaning.
[13:45:36] Ox0dea: Unless I've misunderstood, literally just calling #sort on an Array like that will get you the results you think you want.
[13:45:50] emrox: has joined #ruby
[13:46:12] brainfire: .sort! was the first thing I tried it doesn't work.
[13:46:18] dlitvak: has joined #ruby
[13:46:26] Ox0dea: > doesn't work
[13:46:47] banzaikitten: has left #ruby: ()
[13:46:54] howdoicomputer: has joined #ruby
[13:46:58] umgrosscol: has joined #ruby
[13:50:35] duoi: has joined #ruby
[13:52:10] malconis: has joined #ruby
[13:53:28] davedev24: has joined #ruby
[13:53:31] adac: has joined #ruby
[13:54:46] l4cr0ss: has joined #ruby
[13:55:07] kenpoint: has joined #ruby
[13:56:03] l4cr0ss: Documentation states that recvfrom "Receives up to maxlen bytes from udpsocket using recvfrom(2)". What are the circumstances that lead to recvfrom returning fewer than the maxlen number of bytes?
[13:56:50] Icey: has joined #ruby
[13:58:09] codecop: has joined #ruby
[13:58:37] l4cr0ss: Just whatever is available at the time the read is made?
[13:58:44] UtkarshRay: has joined #ruby
[13:59:10] mistermocha: has joined #ruby
[13:59:17] jhass: l4cr0ss: for example if the other side closed the connection
[14:00:58] dramagods: has joined #ruby
[14:01:23] brainfire: oops it does work. I was using the wrong fields
[14:01:45] malconis: has joined #ruby
[14:02:00] Icey: has joined #ruby
[14:02:04] djbkd: has joined #ruby
[14:03:28] zotherstupidguy: has joined #ruby
[14:03:35] zotherstupidguy: has joined #ruby
[14:03:51] jamto11: has joined #ruby
[14:07:34] Mia: has joined #ruby
[14:07:35] Mia: has joined #ruby
[14:07:35] B1n4r10: has joined #ruby
[14:07:59] ESpiney: has joined #ruby
[14:08:14] baweaver: has joined #ruby
[14:09:44] Ox0dea: has joined #ruby
[14:12:27] skade: has joined #ruby
[14:12:42] s2013: has joined #ruby
[14:14:27] sankaber: has joined #ruby
[14:17:18] htmldrum: has joined #ruby
[14:17:46] grill: has joined #ruby
[14:17:49] Icey: has joined #ruby
[14:18:06] nofxx: has joined #ruby
[14:19:04] sankaber: has joined #ruby
[14:19:42] cdg: has joined #ruby
[14:20:07] pandaant: has joined #ruby
[14:20:11] umgrosscol: has joined #ruby
[14:20:22] freerobby: has joined #ruby
[14:20:34] freerobby: has joined #ruby
[14:20:37] mary5030: has joined #ruby
[14:20:47] mistermocha: has joined #ruby
[14:22:30] pawnbox_: has joined #ruby
[14:23:26] roxtrongo: has joined #ruby
[14:26:33] vbatts: has left #ruby: ("found the other side of the rainbow")
[14:27:24] B1n4r10: has joined #ruby
[14:30:39] spiman: has joined #ruby
[14:31:45] moeabdol: has joined #ruby
[14:34:36] bruno-: has joined #ruby
[14:35:10] djcp: has joined #ruby
[14:35:36] ruurd: has joined #ruby
[14:36:32] adac: has joined #ruby
[14:38:11] vdamewood: has joined #ruby
[14:39:06] alexherbo2: has joined #ruby
[14:40:43] howdoicomputer: has joined #ruby
[14:42:33] CodingWolf: has joined #ruby
[14:44:09] babblebre: has joined #ruby
[14:47:15] maddmaxx: has joined #ruby
[14:48:28] nofxx: has joined #ruby
[14:48:49] spiman_: has joined #ruby
[14:48:55] ItSANgo: has joined #ruby
[14:49:26] yoongkang: has joined #ruby
[14:49:51] tmtwd: has joined #ruby
[14:51:14] roxtrongo: has joined #ruby
[14:51:37] RegulationD: has joined #ruby
[14:51:56] idefine: has joined #ruby
[14:52:19] decoponio: has joined #ruby
[14:52:34] ElSif: has joined #ruby
[14:53:48] weemsledeux: has joined #ruby
[14:54:45] braderhart: has joined #ruby
[14:55:47] dramagods: has joined #ruby
[14:57:32] chouhoulis: has joined #ruby
[14:58:21] TPBallbag: has joined #ruby
[14:58:34] bjmllr: has joined #ruby
[14:58:47] ellisTAA: has joined #ruby
[14:59:14] idefine: has joined #ruby
[15:01:45] brendan-: has joined #ruby
[15:03:22] k3asd`: has joined #ruby
[15:03:46] amoeba__: has joined #ruby
[15:04:11] err_ok: has joined #ruby
[15:04:28] jamto11: has joined #ruby
[15:04:40] Creator|away: has joined #ruby
[15:06:40] amirpro: has joined #ruby
[15:07:05] angiebadillo: has joined #ruby
[15:07:12] aphprentice: has joined #ruby
[15:07:51] simplyianm: has joined #ruby
[15:08:57] baweaver: has joined #ruby
[15:09:00] UtkarshRay: has joined #ruby
[15:09:29] karapetyan: has joined #ruby
[15:10:07] ibouvousaime: has joined #ruby
[15:10:19] benlovell: has joined #ruby
[15:10:38] jimbeaudoin: has joined #ruby
[15:12:21] tubuliferous_: has joined #ruby
[15:12:48] whippythellama: has joined #ruby
[15:12:56] momomomomo: has joined #ruby
[15:13:37] monthy: has joined #ruby
[15:13:47] ruurd: has joined #ruby
[15:14:08] banister: has joined #ruby
[15:14:09] akem: has joined #ruby
[15:14:56] yqt: has joined #ruby
[15:15:04] imperator: has joined #ruby
[15:15:05] rippa: has joined #ruby
[15:17:13] idefine: has joined #ruby
[15:18:58] ruurd_: has joined #ruby
[15:19:06] mbeasley: has joined #ruby
[15:19:29] mbeasley: has left #ruby: ()
[15:22:36] rgtk: has joined #ruby
[15:23:00] aryaching_: has joined #ruby
[15:24:18] joonty: has joined #ruby
[15:24:41] idefine: has joined #ruby
[15:24:46] sucks: has joined #ruby
[15:25:00] ruurd: has joined #ruby
[15:25:48] moeSeth: has joined #ruby
[15:26:02] mozzarella: has joined #ruby
[15:26:07] mjuszczak: has joined #ruby
[15:27:05] idefine_: has joined #ruby
[15:27:49] ByronJohnson: has joined #ruby
[15:29:08] ruby-lang277: has joined #ruby
[15:29:43] ruby-lang277: got simple email sending working via port 25 net/smtp but cant get it working via ssl 465 - can anyone help?
[15:29:58] ruby-lang277: (using godaddy smtpout)
[15:30:58] Luming: has joined #ruby
[15:31:52] big|bad|wolf: has joined #ruby
[15:33:33] arthurix: has joined #ruby
[15:34:47] jamto11: has joined #ruby
[15:35:35] jhass: ?anyone ruby-lang277
[15:35:35] ruboto: ruby-lang277, Just ask your question, if anyone has or can, they will respond.
[15:35:36] FernandoBasso: has joined #ruby
[15:37:00] ruby-lang277: got simple email sending working via port 25 (godaddy smtp server) with net/smtp but cant get it working via ssl 465 - can anyone help?
[15:37:17] idefine: has joined #ruby
[15:37:45] yeshacker: has joined #ruby
[15:39:02] jamto11_: has joined #ruby
[15:39:39] idefine: has joined #ruby
[15:40:14] tsunamie: has joined #ruby
[15:40:58] Rollabunna: has joined #ruby
[15:41:10] benlovell: has joined #ruby
[15:41:16] n00p: has joined #ruby
[15:42:13] idefine_: has joined #ruby
[15:44:07] varunwachaspati_: has joined #ruby
[15:44:28] idefine: has joined #ruby
[15:44:43] mjuszczak: has joined #ruby
[15:45:16] ruurd: has joined #ruby
[15:45:33] tubuliferous_: has joined #ruby
[15:45:56] axl_: has joined #ruby
[15:47:33] leslie: has joined #ruby
[15:47:33] leslie: has joined #ruby
[15:47:43] tsunamie: has joined #ruby
[15:50:26] Jardayn: has joined #ruby
[15:51:24] YankNYC: has joined #ruby
[15:53:21] idefine: has joined #ruby
[15:54:06] djbkd: has joined #ruby
[15:54:31] psye: has joined #ruby
[15:54:45] tsunamie: has joined #ruby
[15:55:37] psye: has joined #ruby
[15:55:43] idefine: has joined #ruby
[15:56:19] RegulationD: has joined #ruby
[15:56:34] Regulati_: has joined #ruby
[15:58:27] idefine: has joined #ruby
[15:59:36] dramagods: has joined #ruby
[16:02:10] Rubie: has joined #ruby
[16:03:43] CodingWolf: has joined #ruby
[16:03:58] diegoaguilar: has joined #ruby
[16:05:16] kirun: has joined #ruby
[16:06:37] ruurd: has joined #ruby
[16:06:49] arup_r: has joined #ruby
[16:08:53] AustinMatherne: has joined #ruby
[16:09:47] baweaver: has joined #ruby
[16:11:04] arthurix_: has joined #ruby
[16:11:13] tomphp: has joined #ruby
[16:11:53] maikowblue: has joined #ruby
[16:13:01] sankaber: has joined #ruby
[16:13:19] Kabaka: has joined #ruby
[16:13:27] AustinMatherne: has joined #ruby
[16:14:08] momomomomo: has joined #ruby
[16:14:34] banister: has joined #ruby
[16:14:51] matp: has joined #ruby
[16:15:08] Alayde: has joined #ruby
[16:15:30] Alayde: has left #ruby: ()
[16:15:41] jackjackdripper: has joined #ruby
[16:15:49] nofxx: has joined #ruby
[16:17:15] ruurd: has joined #ruby
[16:17:21] nofxx: has joined #ruby
[16:18:35] dramagods: has joined #ruby
[16:19:11] sepp2k: has joined #ruby
[16:19:37] i: has joined #ruby
[16:20:19] baweaver: has joined #ruby
[16:20:57] mjuszczak: has joined #ruby
[16:21:54] tomphp: has joined #ruby
[16:22:02] simplyianm: has joined #ruby
[16:22:13] skade: has joined #ruby
[16:22:59] uri: has joined #ruby
[16:23:07] howdoicomputer: has joined #ruby
[16:24:35] subscope: has joined #ruby
[16:24:51] tomphp_: has joined #ruby
[16:26:48] mistermocha: has joined #ruby
[16:29:09] big|bad|wolf: has joined #ruby
[16:29:14] pipework: has joined #ruby
[16:29:57] crazydiamond: has joined #ruby
[16:31:15] pipework: has joined #ruby
[16:31:28] gregf_: brainfire: did you manage to figure out that group_by?
[16:31:46] gregf_: oops, been a while :|
[16:31:52] nofxx: has joined #ruby
[16:32:11] idefine_: has joined #ruby
[16:32:36] brainfire: gregf_: I did, turned out I screwed up myself and .sort! actually worked how I wanted it to be. Just passed the wrong fields
[16:32:51] arthurix: has joined #ruby
[16:33:47] Macaveli: has joined #ruby
[16:34:39] idefine: has joined #ruby
[16:34:46] allcentury: has joined #ruby
[16:35:19] subscope: has joined #ruby
[16:37:37] idefine: has joined #ruby
[16:38:16] freerobby: has joined #ruby
[16:38:26] cwong_on_irc: has joined #ruby
[16:39:26] nofxx: has joined #ruby
[16:39:46] idefine: has joined #ruby
[16:39:51] Cache_Money: has joined #ruby
[16:40:29] gregf_: brainfire: ok, so you mean you used sort to group by the first element from an array of the form: [[string1, string2], [string1, string100], [string2, string5]]?
[16:41:04] brainfire: gregf_: yeah
[16:41:36] brainfire: gregf_: sorted it alphabetically by the first element is prob more precise
[16:42:17] rbowlby: has joined #ruby
[16:42:24] gregf_: brainfire: ok, whatever you wanted , if it worked then good ;). but did you want that to be [[string1, [string2, string100]], [string2, string5]]?
[16:42:59] brainfire: gregf_: no, I just wanted it sorted :)
[16:43:49] gregf_: >> [%w|string1 string2|, %w|string1 string100|, %w|string2 string5|].group_by(&:first).map { |k, v| [k, v.map(&:last)] } # like this
[16:43:50] ruboto: gregf_ # => [["string1", ["string2", "string100"]], ["string2", ["string5"]]] (https://eval.in/472089)
[16:44:19] dionysus69: has joined #ruby
[16:44:39] frozenfoxx: has joined #ruby
[16:45:02] bluOxigen: has joined #ruby
[16:45:10] slawrence00: has joined #ruby
[16:46:52] tubulife-: has joined #ruby
[16:48:04] Spami: has joined #ruby
[16:49:01] cgfbee: has joined #ruby
[16:49:31] skade: has joined #ruby
[16:49:42] idefine_: has joined #ruby
[16:51:28] beast: has joined #ruby
[16:51:40] frozenfoxx: Need some advice on using a websocket to connect a Ruby app to a Rails app, anyone here familiar with that stuff or could point me in the right direction?
[16:52:05] Rubie: has joined #ruby
[16:52:29] frozenfoxx: I've got a command-line Ruby app that sends some output, expects some input in real-time. I need to have a Rails app send the input to this program over a websocket, then change values and/or force a refresh in the rails app via the output of this program over teh websocket.
[16:52:38] frozenfoxx: Anyone have an example I could look off of for this sort of thing?
[16:52:58] yoongkang: has joined #ruby
[16:52:58] idefine: has joined #ruby
[16:53:06] Ilyes512: has joined #ruby
[16:53:17] gregf_: eventmachine i guess
[16:53:38] Ray`: the last time I did something like that I used Faye::WebSocket
[16:53:54] Ray`: it seemed to be the library that was most up to date
[16:54:27] frozenfoxx: Ray`: gotcha. For the program itself I was going to wrap it up with websocketd, but was having trouble finding examples of how to handle it on the Rails app side.
[16:54:38] momomomomo: frozenfoxx: don't spam your question on multiple ruby channels
[16:55:06] frozenfoxx: momomomomo: Sorry, not looking to spam it but since I'm not sure of if it's a Rails appropriate or Ruby appropriate I figured I'd ask in both
[16:55:30] frozenfoxx: momomomomo: most of the examples of anything even approaching it only discuss one side or the other, not both
[16:55:34] Musashi007: has joined #ruby
[16:55:49] momomomomo: frozenfoxx: The issue then is that neither side is coordinating to answer your question
[16:55:52] synthroid: has joined #ruby
[16:56:01] momomomomo: there's a bot command for this, but I can't remember it atm
[16:56:08] ruboto: see http://ruby-community.com/pages/channels for a list of Ruby related channels on Freenode
[16:56:12] ruboto: I don't know anything about multiple
[16:56:16] ruboto: I don't know anything about list
[16:56:52] strgbrew: has joined #ruby
[16:56:58] zenguy_pc: has joined #ruby
[16:58:02] ruboto: Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
[16:58:25] havenwood: momomomomo: ^ I think that's the one you were thinking of?
[16:59:14] momomomomo: thank you havenwood
[16:59:15] frozenfoxx: So it's not don't post a question to multiple channels, but don't leave them hanging about your question?
[16:59:19] [Butch]: has joined #ruby
[16:59:45] SCHAAP137: has joined #ruby
[16:59:57] evandrojr: has joined #ruby
[17:00:41] jhass: frozenfoxx: ensure that nobody wastes time by repeating something that was already told elsewhere and by having all sides on the same information level
[17:01:21] apeiros: aka: even if people offer their help for free, their time is valuable. don't waste it.
[17:01:56] frozenfoxx: If that's the case I'm not seeing what I did wrong considering I hadn't gotten a response yet?
[17:02:23] Papierkorb: Has someone in here experience with building applications with ejabberd?
[17:02:28] roxtrongo: has joined #ruby
[17:02:56] moted: has joined #ruby
[17:03:11] jhass: only a bit prosody
[17:03:45] frozenfoxx: Ray`: I'm having a look over teh Faye::Websocket stuff. I think this might be what I need.
[17:03:47] Papierkorb: jhass: XMPP pubsub?
[17:04:14] Papierkorb: jhass: thanks anyway. hard issues are hard to solve it seems :P
[17:04:20] apeiros: frozenfoxx: a) "I haven't gotten a response yet" != "nobody has thought about your question"., b) we do not see whether you have gotten an answer elsewhere yet. we do not know whether you're wasting our time.
[17:04:27] towski_: has joined #ruby
[17:05:06] shredding: has joined #ruby
[17:05:46] apeiros: by announcing that you crosspost, you tell people that you care about their time. by not announcing it you tell me that you don't and subsequently lose me as somebody who even looks at your question (of course, only if I notice by myself that you crossposted)
[17:06:09] Ray`: that's a good ettiquette point
[17:06:26] Ray`: I'll have to keep that in mind myself actually
[17:06:27] frozenfoxx: apeiros: okay, I think I understand.
[17:06:30] dotix: has joined #ruby
[17:06:43] guardian: what's the EOL of Ruby 2.1?
[17:06:50] frozenfoxx: apeiros: thank you.
[17:06:59] apeiros: and thanks for caring ;-)
[17:08:00] Ray`: frozenfoxx: Faye::Websocket worked for what I used it for, which was essentially a makeshift in-browser terminal that sent data from a page (via JS websockets) to a ruby server, I tried a few other libraries before that but ran into some problems and they seemed to be because the libraries were no longer maintained
[17:08:40] amclain: has joined #ruby
[17:10:25] aryaching: has joined #ruby
[17:10:27] Papierkorb: Okay, data structure problem: I've got subscriptions. It's a hash mapping from a channel name (String) to an array of users ("subscribers"). So, when I want to send something to subscribers, I something like: subscription_hash[channel_name].each{|user| send_to user}. Now, a user closes the TCP connection. In this case, I want to remove the user from all arrays in the subscription_hash, which with many channels and users, is costly. Has anyone an
[17:10:28] Papierkorb: idea if there is a better data structure for this, letting me quickly add/remove users?
[17:10:58] headius: yorickpeterse: I was checking on your Socket progress and saw in rbx gitter you seemed confused about EAGAINWaitReadable and friends
[17:11:06] headius: I can explain why they exist
[17:12:38] purplexed-: has joined #ruby
[17:13:33] dotix: has joined #ruby
[17:13:41] norc: has joined #ruby
[17:13:58] momomomomo_: has joined #ruby
[17:14:09] jschmid: has joined #ruby
[17:14:12] havenwood: guardian: I don't think the date has been announced but Feb 24, 2017 seems likely.
[17:14:20] ankhers: has joined #ruby
[17:14:25] EminenceHC: has joined #ruby
[17:14:33] norc: Hi. I am looking for a way to ship a self containing executable for a Ruby application for Windows 7, 8 and 10. Any recommendations based on experience?
[17:14:49] moted: has joined #ruby
[17:14:53] Axsuul: has joined #ruby
[17:14:55] havenwood: guardian: Ruby 2.0 is already in maintenance mode and will be EoL on Feb 24, 2016.
[17:15:23] havenwood: norc: https://phusion.github.io/traveling-ruby/
[17:15:30] parabolize: has joined #ruby
[17:15:38] machinewar: has joined #ruby
[17:15:59] tulak: has joined #ruby
[17:16:03] havenwood: norc: (Not based on my experience shipping to Win though.)
[17:16:27] norc: havenwood: Looked at that project already. Does not seem to be actively developed currently though.
[17:16:31] yorickpeterse: headius: euh, I don't fully remember what I was confused about
[17:17:23] headius: https://gitter.im/rubinius/rubinius?at=5620c6a83d5f024c41761de1
[17:17:29] rehat_: has joined #ruby
[17:17:38] havenwood: norc: It seems maintained at least.
[17:18:10] havenwood: norc: Last response on a Win issue from a maintainer was this week.
[17:18:20] headius: perhaps not confused but maybe you don't understand why they exist
[17:18:51] yorickpeterse: Ah, I think I was just surprised about the name
[17:18:54] doddok: has joined #ruby
[17:18:56] frozenfoxx: Ray`: that actually sounds almost exactly like what I need to do
[17:18:59] s2013: has joined #ruby
[17:19:28] norc: havenwood: "The Windows support so far is kind of a minimum viable product. [...] so for the time being I do not have any time for maintaining Traveling Ruby."
[17:19:34] norc: Sounds very reassuring. ;-)
[17:19:44] yorickpeterse: I still have to add it to rbx though, we have some crazy logic that figures out the Errno classes based on the system call errors
[17:19:46] havenwood: norc: Windows!
[17:19:51] yorickpeterse: hidden somewhere in the depths of C++
[17:19:59] idefine: has joined #ruby
[17:20:10] havenwood: norc: https://github.com/Spooner/releasy#readme
[17:20:13] headius: yorickpeterse: the original logic in MRI included WaitReadable et all on *every raise of EAGAIN*
[17:20:24] headius: EAGAINWaitReadable etc were my addition to avoid that
[17:20:39] yorickpeterse: headius: not sure if I'm following, what do you mean with they were included?
[17:20:40] norc: headius: Last commit was over a year ago on that project.
[17:20:41] frozenfoxx: Ray`: I won't stump for my project 'cause that's kinda rude, but basically things happen in an external program in realtime, that then needs to send commands to the web app to alter its behavior (present or remove links basically), then receive commands from the webserver based on what the users of said app click on
[17:20:42] yorickpeterse: You mean in the ancestor chain?
[17:20:44] norc: errr havenwood I mean
[17:20:48] Rubie: has joined #ruby
[17:20:53] headius: yorickpeterse I mean exception.extend(WaitReadable) every time
[17:21:06] headius: because EAGAIN is produced for both WaitReadable and WaitWritable cases
[17:21:15] norc: havenwood: I mean I can try out the projects myself and dig deeper. Was just hoping someone here had experience with various solutions. :)
[17:21:44] headius: the name is admittedly cumbersome but it's normally not seen...you either rescue EAGAIN or you rescue WaitReadable
[17:21:57] headius: obviously the extend every time was terrible
[17:22:19] headius: you can certainly just keep doing that if you like, but I'd recommend my approach :-)
[17:22:30] yorickpeterse: In that case I can probably just do something like EAGAINWatReadable.new(original_exception) or w/e
[17:22:54] yorickpeterse: Not there yet though, currently trying to get recvmsg/sendmsg to work
[17:23:00] yorickpeterse: which is like 80% done
[17:23:16] yorickpeterse: In fact, all that remains is figuring out how to read ancillary data since that relies on C macros (at least per the manuals)
[17:23:31] headius: why bother?
[17:23:31] rgtk: has joined #ruby
[17:23:34] haylon: has joined #ruby
[17:23:36] headius: what is it used for?
[17:23:37] jhass: Papierkorb: replacing your arrays with sets might help some
[17:24:05] karapetyan: has joined #ruby
[17:24:21] yorickpeterse: headius: it's used to pass PIDs and other shit in particular when using Unix sockets
[17:24:32] yorickpeterse: searching github sadly revealed code using it
[17:24:52] headius: huh...we've generally not bothered to implement these weird edges until someone comes to us with a bug
[17:24:56] headius: it's not worth it
[17:24:59] yorickpeterse: I looked at the macros and what they do shouldn't be too hard to replicate
[17:25:15] headius: and it consumes a lot of time for 0.001% use cases
[17:25:22] yorickpeterse: and yeah, there are a few parts where I already decided "fukit"
[17:25:39] yorickpeterse: e.g. MRI stuffs char pointers of structs in a few places, then converts those back to structs
[17:25:47] yorickpeterse: that data is exposed to Ruby because it's all stuffed in 1 spot
[17:25:59] yorickpeterse: I decided not to support that since we can't really do that (since we don't use said structs
[17:26:05] headius: also, a bit of explanation about things we're missing... we generally don't use native sockets or any native calls for socket data, so we have emulated most of these structures atop JDK equivalents
[17:26:15] headius: that's why there's pieces missing...JDK doesn't present many of those edges, options, etc
[17:26:32] baweaver: has joined #ruby
[17:26:46] headius: we didn't consciously decide not to do them or omit them out of laziness...we're just trying to avoid using native calls if they're not necessary
[17:26:56] headius: so far they have not been necessary and those edges and options have not been reported to us
[17:26:56] Jackneill: has joined #ruby
[17:26:59] yorickpeterse: Oh yeah I figured as much
[17:27:10] ruurd: has joined #ruby
[17:27:16] headius: as you know, once you go native you have all sorts of fun platform issues to figure out :-)
[17:27:34] velkoff: has joined #ruby
[17:27:47] yorickpeterse: https://github.com/rubysl/rubysl-socket/commit/2c9ff063e32cced618fe4aa7af4f2d7f907309df e.g. this I decided to not support
[17:27:53] yorickpeterse: oh I already had those yeah
[17:28:04] headius: anyway, good on you for working through this stuff...the specs will be useful to us at the very least, and parts of the impl may be too
[17:28:19] fedexo: has joined #ruby
[17:28:35] yorickpeterse: I'm aiming for at least making all lib/socket/* code independent of rbx
[17:28:39] norc: headius: I'm guessing you are a Rubinius contributor?
[17:28:42] headius: out of curiousity, why work on this right now? Did you have some need to inflict this pain on yourself?
[17:28:46] yorickpeterse: lib/rubysl/socket/* still uses rbx APIs for now, but those can be abstracted out
[17:28:48] headius: norc: no, but yorickpeterse is
[17:28:54] headius: I'm a jruby person
[17:29:04] yorickpeterse: headius: I started in March because we had a bunch of people reporting Socket methods missing
[17:29:12] yorickpeterse: and once you start it you kinda have to finish it
[17:29:16] norc: headius: Was getting confused about the talk between Rubinius and JDK stuff you kept bringing up.
[17:29:22] yorickpeterse: Also our Socket code is mostly from 1.8, so we _have_ to update it sooner or later
[17:29:29] headius: yorickpeterse: that could be very interesting as an independent library then...for folks that want more raw socket support, they might in theory be able to just load it into JRuby
[17:29:36] yorickpeterse: plus the code was just...really fucking stupid in many places
[17:29:42] headius: yorickpeterse: ugh...that's a big gap to fill
[17:29:46] ahmetkapikiran: has joined #ruby
[17:29:54] yorickpeterse: eventually any implementation that has a compatible FFI API should be able to run this
[17:29:54] headius: what I did on this stuff I did because it was *necessary* to pull in 2.2 stdlib
[17:30:00] yorickpeterse: heck, you can probably use the ffi Gem at some point
[17:30:03] headius: net/protocol et al using Addrinfo and stuff :-(
[17:30:05] trekr5_: has joined #ruby
[17:30:13] headius: that was a fun week
[17:30:14] yorickpeterse: it started because somebody wanted to use Socket.ip_address_list
[17:30:17] yorickpeterse: which uses Addrinfo
[17:30:20] yorickpeterse: which then started all this :P
[17:30:23] headius: ahh yep, similar here
[17:30:24] velkoff: has left #ruby: ()
[17:30:30] trekr5_: has anyone sent raw sql queries to a sql server db?
[17:30:33] headius: for us it was simply to get stdlib working without regressing on any tests
[17:30:41] headius: so I did minimum effort at the time :-)
[17:30:51] headius: net/http kinda needs to work for a release
[17:30:51] trekr5_: i'm using activerecord and tinytds gems
[17:30:54] yorickpeterse: Addrinfo wasn't too bad, except for the crazy logic regarding socket levels vs types and what to set to what and when
[17:31:04] norc: Ruby question: Is the op === used by rescue as per specification?
[17:31:06] headius: yeah, I know I have that wrong but it was super confusing
[17:31:09] jhass: ?anyone trekr5_
[17:31:09] ruboto: trekr5_, Just ask your question, if anyone has or can, they will respond.
[17:31:13] yorickpeterse: https://github.com/rubysl/rubysl-socket/blob/yak-address-list/lib/socket/addrinfo.rb#L45 I mean lol
[17:31:31] trekr5_: ok great will do
[17:31:35] headius: I saw your comment about type and family being used interchangably sometimes
[17:31:44] norc: Or is there a way to force rescue use other operators than === ?
[17:32:20] headius: there may be things we can clean up in MRI too after your specs are written...things that look obviously wrong we should fix the specs and MRI
[17:32:39] jackjackdripper: has joined #ruby
[17:34:02] yorickpeterse: headius: so my mistake was that the values for the types and families are the same
[17:34:05] atus_root_: has joined #ruby
[17:34:13] yorickpeterse: That is, Socket::AF_INET and Socket::PF_INET both have the same numeric value
[17:34:26] headius: is that on all platforms you've seen?
[17:34:33] headius: I was confused why they're even defined separately because of that
[17:34:35] atus_root_: hi need help to fix a code
[17:34:38] yorickpeterse: headius: only on Linux
[17:34:41] benlieb: has joined #ruby
[17:34:50] yorickpeterse: I think it's mostly a coincidence of how enums are typically defined in C
[17:34:57] dotix: has joined #ruby
[17:35:01] headius: that makes sense
[17:35:10] headius: they just happen to have same elements in same order on some platforms
[17:35:25] atus_root_: can someone help me sort this out class Person
[17:35:27] headius: I believe we are generating our copies of those constants across platforms
[17:35:28] atus_root_: def initialize(name)
[17:35:30] atus_root_: @name = "joe"
[17:35:36] atus_root_: def greet(other_name)
[17:35:36] jhass: !kick atus_root_ Please use https://gist.github.com
[17:35:37] ruboto: ruboto kicked atus_root_: use https://gist.github.com
[17:35:37] ruboto: -o ruboto
[17:35:43] mdih: has joined #ruby
[17:35:44] mjuszczak: has joined #ruby
[17:35:47] headius: and I did at least *in spirit* try to use the right ones
[17:36:52] trekr5_: hi guys, this is my gist require 'tiny_tds' require 'active_record' require 'activerecord-sqlserver-adapter' require 'logger' FILE = 'log3.txt' log = Logger.new(FILE) #FILE_2 = 'TextSantaManualReport.sql' ActiveRecord::Base.pluralize_table_names = false ActiveRecord::Base.establish_connection( :adapter => 'sqlserver', :database => 'BB01', :username => 'TextSantaReport', :password => 'd0FQ72$5tcX552m', :host => 'j
[17:36:55] simplyianm: has joined #ruby
[17:36:56] yorickpeterse: headius: same here, we have some code to generate the values for our FFI API
[17:37:05] jhass: ?gist trekr5_
[17:37:05] ruboto: trekr5_, https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[17:37:06] yorickpeterse: which basically just generates some C file, compiled it and grabs the values from it
[17:37:15] wilsonc91: has joined #ruby
[17:37:19] trekr5_: please ignore
[17:37:24] trekr5_: this is my gist https://gist.github.com/trekr5/3e09839090b51f76c034
[17:37:27] atus_root_: has joined #ruby
[17:37:29] jhass: trekr5_: also change that password now everywhere you use it
[17:37:39] yorickpeterse: then you get into all these fun things such as "oh platform X defines this struct in header A, platform Y has it in a #ifdef __USE_GNU guard"
[17:37:39] atus_root_: jhass https://gist.github.com/atussec/30ec999051e24f6cc819
[17:37:42] headius: yorickpeterse: yeah... jnr/jnr-constants uses some derivative of old rbx code to do this, I believe
[17:37:48] headius: obviously generating Java enums, but same idea
[17:38:02] headius: we've generated them for about a dozen platforms
[17:38:03] jhass: atus_root_: does "joe" equal "Joe"?
[17:38:22] pietr0: has joined #ruby
[17:38:54] B1n4r10: has joined #ruby
[17:39:10] atus_root_: jhas "Joe" is equal to "joe"
[17:39:23] jhass: trekr5_: I know shit about ms sql server stuff, but are you sure PRINT returns a query result?
[17:39:45] jhass: >> "joe" == "Joe" # atus_root_ no it's not
[17:39:46] ruboto: jhass # => false (https://eval.in/472141)
[17:40:27] atus_root_: so jhass how can i write, am a novice
[17:40:44] atmosx: has joined #ruby
[17:40:47] jhass: atus_root_: I don't have the feeling you're trying much
[17:41:00] jhass: atus_root_: read the error message, character by character
[17:41:02] trekr5_: it should return the value of @FundraisingId which is 250942
[17:41:16] norc: Also a somewhat related question, inspecting some more bytecode, it seems that ruby exceptions are just syntactic sugar around catch/throw logic - is this correct?
[17:41:19] jhass: trekr5_: you're sidestepping my question
[17:41:47] trekr5_: i've run the same query using tiny_tds and it returns the value of @fundraisingid
[17:42:04] atus_root_: jhas i did all posible way i know but to no avail
[17:42:23] thezanke: has joined #ruby
[17:42:27] norc: I mean adding a rescue block suddenly adds "rescue" and "retry" entries to the catch tables under ruby 2.2
[17:42:38] trekr5_: hi jhass not sidestepping the question
[17:42:42] norc: Which makes me wonder whether I can somehow throw directly into those blocks.
[17:42:57] norc: (via throw, rather than raise/retry)
[17:43:59] jhass: trekr5_: what exactly does return mean in this case?
[17:44:24] dramagods: has joined #ruby
[17:45:50] guardian: havenwood: thanks
[17:45:55] atus_root_: jhass could you help?
[17:46:39] jhass: atus_root_: I'm not sure, I already pointed out where the error is. How long have you been looking at this problem? Be honest
[17:46:56] atus_root_: for 30 minutes jhass
[17:47:10] trekr5_: jhass what line number are you looking at?
[17:47:15] tomphp: has joined #ruby
[17:47:21] jhass: atus_root_: and you still didn't notice the difference between j and J ?
[17:47:35] lxsameer: has joined #ruby
[17:48:03] zeroDivisible: has joined #ruby
[17:48:03] jhass: trekr5_: you said it works when using tiny_tds directly. How did your testcase and its result look like exactly?
[17:48:04] banister: has joined #ruby
[17:48:40] radgeRayden_: has joined #ruby
[17:48:54] ascarter: has joined #ruby
[17:49:05] atus_root_: one is in cap and the other in small
[17:49:18] jhass: atus_root_: so. Look at the error message _and_ your code again
[17:49:30] jhass: with that difference in mind
[17:49:42] norc: jhass: I feel bad for you. :(
[17:49:55] jwaldrip: has joined #ruby
[17:49:59] jhass: norc: you're allowed to help too :P
[17:50:40] norc: jhass: I dont know, I'm actually digging into Ruby source code myself because my question did not get answered. I kind of expect other people to have the same energy or drive... :/
[17:50:45] Melpaws: has joined #ruby
[17:50:46] ibouvousaime: has joined #ruby
[17:51:15] nixmaniack: has joined #ruby
[17:51:24] atus_root_: thank you jhas
[17:51:42] Papierkorb: jhass: good call
[17:52:45] ixti: has joined #ruby
[17:53:01] Melpaws1: has joined #ruby
[17:53:19] jhass: atus_root_: paying attention to such detail is an important skill for a programmer, train it. For example notice how you wrote my nick wrong in every single instance
[17:53:51] atus_root_: right thumbs up jhass
[17:54:01] Papierkorb: Huh, why isn't Set#classify in Array or Enumerable? #partition doesn't always cut it, and that's exactly what I would've needed multiple times now
[17:54:15] trosborn: has joined #ruby
[17:54:29] yxhuvud: Papierkorb: group_by
[17:54:37] jhass: beat me to it
[17:54:45] jhass: that's group_by
[17:54:53] chouhoulis: has joined #ruby
[17:55:40] dramagods: has joined #ruby
[17:56:35] Melpaws: has joined #ruby
[17:56:52] luksaur: has joined #ruby
[17:56:56] yxhuvud: it seems both exist on sets, but that classify create subsets, while group_by creates arrays.
[17:58:42] gusTester: has joined #ruby
[17:58:45] radgeRayden__: has joined #ruby
[17:58:55] trekr5_: jhass, looking at my config for the activerecord connection does that look correct?
[17:59:41] dramagods: has joined #ruby
[17:59:55] Musashi007: has joined #ruby
[18:00:07] gusTester: has left #ruby: ()
[18:00:24] baweaver: has joined #ruby
[18:00:32] trekr5_: jhass, i'm connecting using an sqladapter
[18:01:09] jhass: trekr5_: I doubt it's a configuration issue, you would get an exception while connecting otherwise, no?
[18:01:16] RegulationD: has joined #ruby
[18:01:56] saml: has joined #ruby
[18:02:00] saml: https://api.rubygems.org/ this down?
[18:02:02] trekr5_: jhass, appreciate yr help! unfortunately don't receive an exception. it looks like a connection is established
[18:02:13] baweaver: has joined #ruby
[18:02:21] saml: can't install anything. company's gonna bankrupt
[18:02:43] jhass: saml: http://downforeveryoneorjustme.com/api.rubygems.org
[18:02:54] jhass: saml: https://status.rubygems.org/
[18:03:24] jhass: trekr5_: so, what about my earlier two questions? You never really answered them
[18:03:36] trekr5_: jhaas, when i look at the documentation, it says that even when u test the connection (test.connection?) = false
[18:03:52] Papierkorb: jhass: a crude benchmark shows that Array#delete is a magnitude faster than SortedSet#delete Oo
[18:04:00] jhass: trekr5_: looks like half your sentence got lost there somehow ;)
[18:04:55] jhass: Papierkorb: well, the set probably resorts on delete? though that'd be dumb actually
[18:04:58] norc: Ah well. Seems like both throw and raise just end up longjmp'ing around.
[18:05:01] trekr5_: jhass sorry can i chat with u off this bulletin board?
[18:05:10] jhass: trekr5_: no
[18:05:31] tomphp: has joined #ruby
[18:05:51] trekr5_: jhass, i wanted to give u a bit more insight into my problem
[18:06:04] saml: jhass, thanks
[18:06:10] RegulationD: has joined #ruby
[18:06:19] jhass: trekr5_: as said I know shit about ms sql server, I'm just good at giving general pointers
[18:06:29] jhass: trekr5_: and that's what my questions aimed at
[18:07:25] jhass: Papierkorb: looks like it optimizes when the rbtree gem is available
[18:08:00] Rubie: has joined #ruby
[18:08:05] nofxx: trekr5_: use a decent DB
[18:08:18] Eiam: has joined #ruby
[18:08:24] Papierkorb: jhass: annot load such file -- rbtree (LoadError) ?
[18:08:29] dorei: has joined #ruby
[18:08:48] jhass: Papierkorb: so it's not available? ;)
[18:09:03] Papierkorb: jhass: a dependency on a external gem is .. quite weird
[18:09:22] trekr5_: hi nofxx, use a decent db?
[18:09:43] Guest97_: has joined #ruby
[18:10:19] _blizzy_: has joined #ruby
[18:10:22] jhass: Papierkorb: https://github.com/ruby/ruby/blob/trunk/lib/set.rb#L645-L649 but even without, not sure why it would be slower than Array#delete
[18:10:54] Papierkorb: jhass: https://gist.github.com/Papierkorb/3a00c4720d7eaa49efdf
[18:11:00] trekr5_: when i run my activerecord::base.establish_connection(...) i get an object returned with all of the config values i put int to establish the connection to the db
[18:11:07] rakm: has joined #ruby
[18:11:27] Guest97_: has joined #ruby
[18:11:54] Papierkorb: interesting though that MRI outperforms Jruby in this disclipine
[18:12:03] jhass: Papierkorb: how do you know it's not #clone that's much slower?
[18:12:03] nofxx: trekr5_: yup. postgresql.
[18:12:21] zly: has joined #ruby
[18:12:33] trekr5_: hi nofxx, unfortunately i don't have that option! it's a db that i have no control over
[18:12:46] ruurd: has joined #ruby
[18:14:38] nofxx: trekr5_: great opportunity to do more than you've been asked. Dump the csv, load on PG and show em increase in performance, security, whatnot
[18:14:51] nofxx: and charge a lil more =D
[18:15:19] trekr5_: hi nofxx can we have a chat off this bulletinboard?
[18:15:26] bjmllr: has joined #ruby
[18:15:46] headius: Papierkorb: I don't see MRI outperforming JRuby there
[18:16:11] Papierkorb: jhass: interesting. updated the gist. set *is* faster
[18:16:49] jhass: Papierkorb: doesn't surprise me much. I vaguely remember MRI does some CoW magic on Array#dup/clone ?
[18:17:20] Andrey: has joined #ruby
[18:17:28] jhass: anyway, copying a continious chunk of memory is always faster
[18:17:42] Papierkorb: jhass: well, a set could also be continous in memory
[18:17:50] trosborn: has joined #ruby
[18:18:04] Papierkorb: sure adding/removing would be slow, but looking at Array, actually not that bad
[18:18:18] Andrey: Is there some way in which you can specify your own name while installing a local gem?
[18:18:35] sucks: has joined #ruby
[18:18:45] Papierkorb: andrey: why do you want to do that?
[18:18:46] jhass: Papierkorb: well, the point of using a Set in most cases is less it's deduplication efforts, but O(1) CRUD operations
[18:18:48] sucks_: has joined #ruby
[18:19:19] Papierkorb: jhass: is it really O(1) amortized?
[18:19:30] NeverDie: has joined #ruby
[18:20:03] jhass: Set is basically an interface over a Hash with nil values
[18:20:06] Andrey: Papierkorb: I have a gem with that name already installed - I'd like to differentiate it from my local dev gem
[18:21:12] trekr5_: hi jhass, just did a simple select all from db using the activerecord connection and it executes correctly
[18:21:23] jhass: andrey: you don't need to install a gem to test it, just use ruby -Ipath/to/your/gem/lib, bundler's path or local git override option or patch up $LOAD_PATH
[18:21:42] rbowlby: has joined #ruby
[18:21:43] jhass: trekr5_: I'm not surprised
[18:21:49] predator217: has joined #ruby
[18:22:08] jwaldrip: has joined #ruby
[18:22:16] trekr5_: jhass, so the problem is the query. i'll look at it again. thanks!
[18:22:40] jhass: trekr5_: that's what I tried to point out by asking your whether you're 100% sure PRINT returns a query result
[18:22:54] nofxx: trekr5_: feel free to pm, but I pop in and out here all day. Not sure Ill answer right along
[18:23:03] karapetyan: has joined #ruby
[18:24:45] varunwachaspati_: has joined #ruby
[18:25:00] predator217: has left #ruby: ()
[18:25:45] momomomomo: has joined #ruby
[18:26:32] headius: Papierkorb: https://gist.github.com/headius/7bea003b2747e24a2bd8
[18:26:35] Andrey: jhass: Thanks; I didn't know about -I option
[18:27:09] headius: jhass, Papierkorb: both JRuby and MRI use COW for Array duplication and slicing
[18:27:21] headius: the cost you see is the eventual need to un-share the backing store
[18:27:34] headius: whereas Set (actually Hash) has to duplicate everything right away
[18:27:38] lemur: has joined #ruby
[18:27:40] Papierkorb: headius: interesting. apart from the 5.times, you didn't change anything, right?
[18:27:49] jhass: headius: yup that's what I thought, thanks for confirming
[18:27:58] spider-mario: has joined #ruby
[18:28:01] headius: Papierkorb: nothing... JRuby consistently outperforms MRI here
[18:28:13] ruurd: has joined #ruby
[18:28:20] headius: Array#dup cost should be nearly the same since we both COW
[18:28:26] kadoppe: has joined #ruby
[18:28:29] headius: it's just cost of the wrapper object in both cases
[18:29:11] Guest1815: has joined #ruby
[18:29:46] B1n4r10: has joined #ruby
[18:30:01] Papierkorb: headius: currently trying to come up with a reasonable benchmark for a system with quite some load. jruby is twice as fast for the first test (by the "real" time)
[18:30:13] err_ok: has joined #ruby
[18:30:27] headius: Papierkorb: well that's a whole other challenge :-)
[18:30:35] jottr: has joined #ruby
[18:31:05] blueOxigen: has joined #ruby
[18:32:07] sdwrage: has joined #ruby
[18:32:17] blue_deref: has joined #ruby
[18:33:26] Gnut: has joined #ruby
[18:35:11] Gnut: has joined #ruby
[18:35:21] poguez_: has joined #ruby
[18:35:47] tildes: has joined #ruby
[18:36:06] idefine: has joined #ruby
[18:36:26] Gnut: What's the preferred safe method for string interpolation?
[18:36:57] jhass: Gnut: safe in what manner?
[18:36:57] Papierkorb: Gnut: 'safe' method?
[18:38:15] jpfuentes2: has joined #ruby
[18:38:25] prestorium: has joined #ruby
[18:38:31] Gnut: I know python recommends the .format method to strictly enforce variables used to construct a string
[18:38:36] idefine: has joined #ruby
[18:38:52] aphprentice: has joined #ruby
[18:38:52] pwnd_nsfw: "#{just.do.it}"
[18:38:54] ur5us: has joined #ruby
[18:38:56] braderhart: has joined #ruby
[18:38:58] Papierkorb: Gnut: aha. "just do #{'it'}"
[18:39:10] Gnut: And i see the sprintf function
[18:39:11] pwnd_nsfw: yours actually runs
[18:39:20] Papierkorb: Gnut: no one really uses sprintf
[18:39:32] jhass: I use String#% sometimes
[18:39:34] shevy: so safe and secure
[18:39:57] pwnd_nsfw: string interpolate inject
[18:40:13] jhass: but "foo #{bar}" is the go to tool unless you need special features of something else
[18:40:43] skade: has joined #ruby
[18:41:07] idefine_: has joined #ruby
[18:45:14] amirpro: has joined #ruby
[18:46:03] grill: has joined #ruby
[18:46:26] angiebadillo: has joined #ruby
[18:46:32] Sembei: has joined #ruby
[18:46:55] jetpackjoe: has joined #ruby
[18:48:36] idefine: has joined #ruby
[18:48:51] jetpackjoe: has joined #ruby
[18:50:16] postmodern: has joined #ruby
[18:51:54] jwaldrip: has joined #ruby
[18:54:02] Axsuul: has joined #ruby
[18:55:55] EminenceHC: has joined #ruby
[18:55:56] yashinbasement: has joined #ruby
[18:56:35] yoongkang: has joined #ruby
[18:57:00] nofxx: has joined #ruby
[18:57:11] Rubie: has joined #ruby
[18:58:04] momomomomo: has joined #ruby
[18:58:59] f3ttX]: has joined #ruby
[19:00:26] skade: has joined #ruby
[19:00:38] idefine: has joined #ruby
[19:01:08] grill: yo are there any methods have a built in recursive/non-recursive switch for directory searching?
[19:01:52] apeiros: grill: Dir.glob with ** can recursively search
[19:02:02] ruurd: has joined #ruby
[19:02:19] grill: so. so i'd need to roll my own flag then
[19:02:21] grill: wonderbar
[19:02:45] nofxx: has joined #ruby
[19:03:19] NeverDie: has joined #ruby
[19:03:41] treehug88: has joined #ruby
[19:04:50] ibouvousaime_: has joined #ruby
[19:04:53] dmcp_: has joined #ruby
[19:05:30] Eiam: has joined #ruby
[19:05:32] mdih: has joined #ruby
[19:05:48] tildes: I'd like to create a message, say msg = 'My message is #{var}', so that I can create the "message templates" in one corner of the program, and evaluate them later, when the variables are actually set. How to achieve this, or something similar?
[19:05:49] idefine: has joined #ruby
[19:06:17] banister: has joined #ruby
[19:09:08] yeticry: has joined #ruby
[19:11:12] alem0lars: has joined #ruby
[19:12:42] zenguy_pc: has joined #ruby
[19:12:53] grill: what's glob's return type? the docs say "matches" but i have nfi what that is
[19:13:56] slash_nick: probably means MatchData
[19:14:24] bkxd: has joined #ruby
[19:14:25] greedo: has joined #ruby
[19:14:53] slash_nick: grill: it's just an Array
[19:15:05] vlunkr: has joined #ruby
[19:15:24] vlunkr: Is there a shorthand way to do this? testing_accounts.map { |a| a[:category] }
[19:15:35] ellisTAA: has joined #ruby
[19:15:38] tomphp: has joined #ruby
[19:15:40] Mon_Ouie: has joined #ruby
[19:15:45] econerd4ever: has joined #ruby
[19:15:54] vlunkr: like some_list.map &:some_prop
[19:16:10] idefine: has joined #ruby
[19:16:18] ruurd: has joined #ruby
[19:16:50] casadei: has joined #ruby
[19:16:50] tulak: has joined #ruby
[19:16:53] karapetyan: has joined #ruby
[19:17:52] grill: so, what's the best way to do a python-esque initialization? How can I use a module's methods in other code, but also run the module as a standalone program? in python, you'd use the __main__ method.
[19:17:58] Rubie: has joined #ruby
[19:18:03] tulak: has joined #ruby
[19:18:41] bubbys: has joined #ruby
[19:18:58] Papierkorb: grill: what's python-esque initialization?
[19:19:00] tulak: has joined #ruby
[19:19:32] grill: Papierkorb http://stackoverflow.com/questions/22492162/understanding-the-main-method-of-python
[19:19:34] Papierkorb: grill: 2) just use the module. has to be required before like any other file. 3) if $0 == __FILE__ ... end
[19:19:35] jhass: tildes: use %s and String#% / Kernel#sprintf
[19:20:01] jhass: vlunkr: no
[19:20:29] Papierkorb: grill: also make sure that rubys definition of a Module and yours (influenced by python?) match up. I don't know Py.
[19:21:26] vlunkr: dang, I thought I had seen that done before. thanks!
[19:21:43] jhass: grill: that's rarely done in Ruby though, most just have the module in lib/foo.rb and then bin/foo that just loads and runs it, often with just something like Foo::Cli.new(ARGV)
[19:22:39] jhass: vlunkr: you could short testing_accounts.map {|a| a.category } to testing_accounts.map(&:category)
[19:22:53] radgeRayden_: has joined #ruby
[19:22:56] moeabdol: has joined #ruby
[19:24:17] rgtk: has joined #ruby
[19:24:18] vlunkr: jhass: right, but I'm working with a hash in this case
[19:24:23] skade: has joined #ruby
[19:24:24] shinnya: has joined #ruby
[19:24:30] mjuszczak: has joined #ruby
[19:24:37] jhass: vlunkr: sure, just expanding on where you might have seen it ;)
[19:24:38] momomomomo: has joined #ruby
[19:24:58] tildes: jhass: thanks, sprintf works for me
[19:26:14] grill: here's a good one. wtf is up with this? undefined method `MissingArgument' for OptionParser:Class
[19:27:53] grill: this doesn't really make sense, do it?
[19:28:46] mdih: has joined #ruby
[19:28:56] jhass: depends, how to reproduce?
[19:29:03] moeabdol: has joined #ruby
[19:29:41] grill: i'll post my code in a sec. could it be because my requires are outside of the module closure?
[19:31:47] michaeldeol: has joined #ruby
[19:32:12] dmolina: has joined #ruby
[19:33:30] grill: jhass http://hastebin.com/kuyubocuxo.rb
[19:33:45] jhass: where you call require doesn't matter
[19:34:14] ruurd: has joined #ruby
[19:34:17] Musashi007: has joined #ruby
[19:35:03] grill: ok. anything obviously wrong with that code? ignore the method after parse_args in initialize
[19:35:04] jhass: grill: you're missing , on the raise calls
[19:35:25] jhass: so they become method calls
[19:35:39] grill: can I put the params in ()?
[19:35:49] jhass: just add , or .new
[19:36:59] VESTINST_: has joined #ruby
[19:37:08] grill: ok. that worked
[19:37:42] futilegames: has joined #ruby
[19:37:50] groundnuty: has joined #ruby
[19:38:10] groundnuty: hey, I'm in the need to write a technical and user documentation for my project
[19:38:11] B1n4r10: has joined #ruby
[19:38:17] groundnuty: anyone here uses sone nice tools for that?
[19:38:34] mjuszczak: has joined #ruby
[19:39:19] jwaldrip: has joined #ruby
[19:40:02] dfinninger: has joined #ruby
[19:40:35] arup_r: has joined #ruby
[19:41:29] craysiii: has joined #ruby
[19:41:32] shevy: people usually hate to write documentation
[19:42:12] Freijo: Who needs documentation?
[19:42:16] Freijo: Or commenting for that matter
[19:42:22] shevy: I still have not found a good way to document things properly either; I think for lack of better alternatives, markdown is quite ok for most end users as an initial start; working examples are also useful
[19:42:25] Freijo: The code speaks for itself
[19:42:29] dfinninger: hello, I'm looking to ensure that a second process is running along with the code I am writing. I'd like to shut down my process if the dependency dies. I can start this program myself and I was thinking about something along the lines of "fork { system('blah') }"
[19:42:42] dotix: has joined #ruby
[19:42:46] dfinninger: anyone have experience with this?
[19:43:11] allcentury: has joined #ruby
[19:43:47] EminenceHC: has joined #ruby
[19:44:16] sunya7a: has joined #ruby
[19:44:41] techietrash: has joined #ruby
[19:44:57] B1n4r10: has joined #ruby
[19:48:23] _stu_: has joined #ruby
[19:48:52] atmosx: has joined #ruby
[19:48:53] VeryBewitching: has joined #ruby
[19:49:03] benhuda: has joined #ruby
[19:49:13] chipotle: has joined #ruby
[19:49:59] uri: has joined #ruby
[19:50:49] bmalum: has joined #ruby
[19:51:41] norc: dfinninger: How does your process "die" or "end" ?
[19:52:36] dfinninger: Mine? On error, or if autoscaling kills the machine. The one I am watching? Error.
[19:53:11] norc: dfinninger: Is the one you are watching under your control?
[19:53:14] jhass: dfinninger: use Kernel#spawn, Process#waitpid in a Thread#new and Kernel#abort/Kernel#exit there
[19:53:52] Gustavo: has joined #ruby
[19:53:52] ruurd: has joined #ruby
[19:54:28] jhass: well, I guess you can also Kernel#system directly in new thread
[19:54:47] maxz: has joined #ruby
[19:54:53] gusTester: has joined #ruby
[19:55:08] norc: jhass: Wouldn't it better if the "watched" process just signalled a SIGTERM to the master if it dies?
[19:55:16] norc: Or much simpler anyway.
[19:55:29] jhass: but not necessarily possible
[19:55:32] jackjackdripper: has joined #ruby
[19:55:35] jhass: I guess you can also trap SIGCHILD
[19:55:35] aeontech: has joined #ruby
[19:56:07] dfinninger: I have a document converter running, and some ruby feeding it and dealing with the output
[19:56:09] karapetyan: has joined #ruby
[19:56:21] prestorium_: has joined #ruby
[19:56:45] xblade: has joined #ruby
[19:56:49] dfinninger: jhass: thanks, I'll look into it
[19:57:34] gusTester: has left #ruby: ()
[19:58:21] juddey: has joined #ruby
[20:00:10] dfinning_: has joined #ruby
[20:01:27] baweaver: has joined #ruby
[20:03:02] baweaver: has joined #ruby
[20:04:25] _blizzy_: has joined #ruby
[20:06:51] benlieb: has joined #ruby
[20:07:11] ruurd: has joined #ruby
[20:07:45] nertzy2: has joined #ruby
[20:09:35] ghoti: has joined #ruby
[20:10:00] yardenbar: has joined #ruby
[20:11:19] ibouvousaime_: has joined #ruby
[20:12:05] mjuszczak: has joined #ruby
[20:14:23] psye: has joined #ruby
[20:15:37] simplyia_: has joined #ruby
[20:16:22] psye: has joined #ruby
[20:17:22] psye: has joined #ruby
[20:18:06] norc: Okay... so evidently compiling with -CPDEBUG=10 takes a while..... :/
[20:19:22] jamto11_: has joined #ruby
[20:20:06] SCHAAP137: has joined #ruby
[20:20:09] norc: 10 minutes and counting :<
[20:20:21] BSaboia: has joined #ruby
[20:22:01] diegoaguilar: has joined #ruby
[20:23:10] djbkd: has joined #ruby
[20:23:25] pawnbox: has joined #ruby
[20:23:42] yfeldblum: has joined #ruby
[20:24:11] emilkarl: has joined #ruby
[20:24:14] Encapsulation: has joined #ruby
[20:26:38] unreal: has joined #ruby
[20:27:22] pwnd_nsfw: has joined #ruby
[20:29:14] lemur: has joined #ruby
[20:29:58] ruby-lang572: has joined #ruby
[20:30:58] r0x0rZ: has joined #ruby
[20:31:02] n_blownapart: has joined #ruby
[20:31:07] Puffball: has joined #ruby
[20:32:30] NeverDie: has joined #ruby
[20:34:54] norc: Well. A grand 17 minutes for the entire make and install process on current ruby trunk. (:
[20:35:05] norc: Makes me feel like its 1999 again.
[20:36:07] ruurd: has joined #ruby
[20:37:37] apeiros: norc: just compile some qt for funsies
[20:38:06] theery: has joined #ruby
[20:38:37] tildes: has joined #ruby
[20:39:23] norc: apeiros: Meh it isn't so bad. The issue is just by default it builds absolutely every combination of threading, linking etc.
[20:39:34] norc: So you end up compiling everything 9 times.
[20:39:54] norc: Just compile what you need without examples, and it's rather fast actually.
[20:40:13] jamto11_: has joined #ruby
[20:42:07] norc: err correction, just static/dynamic in both debug/release,
[20:42:10] norc: But still.
[20:43:03] yoongkang: has joined #ruby
[20:43:17] shevy: you reside in germany?
[20:43:51] norc: There may or may not be any truth to that rumor.
[20:45:19] tulak: has joined #ruby
[20:45:39] dtordable: norc: hello
[20:45:50] haxrbyte: has joined #ruby
[20:46:17] freerobby1: has joined #ruby
[20:46:30] norc: I just always remember 9 build targets for Qt because that is what we had in our large project. :)
[20:46:38] norc: dtordable: Hiyqa.
[20:46:43] ruurd: has joined #ruby
[20:46:50] nofxx: norc: nah, it doesnt take that long with multiple cores
[20:46:51] Phage: What would be the best/easiest way to swap two elements of an array?
[20:47:09] dtordable: are you the guy that a day told me to learn python?
[20:47:13] nertzy2: has joined #ruby
[20:47:13] nofxx: Phage: of a 2 obj array?
[20:47:46] jhass: Phage: a[i], a[j] = a[j], a[i]
[20:47:52] rakm: has joined #ruby
[20:48:16] Phage: jhass: Ah, thought so too. Just wanted to know, if there were some built-in function or something like that.
[20:49:15] EminenceHC: has joined #ruby
[20:49:46] chipotle: has joined #ruby
[20:50:29] imperator: has left #ruby: ("Leaving")
[20:51:40] baweaver: has joined #ruby
[20:52:00] dfinninger: has joined #ruby
[20:52:26] bkxd: has joined #ruby
[20:52:49] xblade: has joined #ruby
[20:53:00] norc: dtordable: I cannot recall any such recommendation.
[20:54:00] kobain: has joined #ruby
[20:54:42] norc: nofxx: It just did, but almost all that time was spent in the debugging functions, probably because of my terminal emulator
[20:55:03] norc: So it really was just miniruby. :)
[20:55:30] quazimodo: has joined #ruby
[20:55:41] rgtk: has joined #ruby
[20:56:03] rakm: is there a way to use the csv lib and specify the number of rows/lines that are headers? my CSV file has 7 rows of meta data that I want to exclude from some row operations
[20:56:37] idefine: has joined #ruby
[20:56:39] rakm: looks like there are some header options available for CSV.new
[20:56:46] nofxx: dtordable: python sux, it's boring, ugly and it's fallacy to call it OO. It's not.
[20:57:02] norc: nofxx: It does have nice looking decorators though.
[20:57:05] nofxx: rakm: it's just an array, you can use a range. Or next if something =~ // inside works too
[20:57:08] rakm: i could just skip over the first 7 rows and pretend there's no header rows, but wondering if this is built in
[20:57:23] beast_: has joined #ruby
[20:57:49] rakm: nofxx yeah that makes sense, that was my fallback. was wondering how sophisticated header parsing is in the lib
[20:58:16] nofxx: rakm: use that a lot, didn't even knew that option hehe.. gonna read more later
[20:58:24] symm-: has joined #ruby
[20:58:58] dstarh: has joined #ruby
[20:59:26] nofxx: norc: and worst... its a snake, even indiana jones hate snakes.
[20:59:32] kies: has joined #ruby
[20:59:41] Rubie: has joined #ruby
[21:01:40] DoubleMalt: has joined #ruby
[21:01:46] rbowlby: has joined #ruby
[21:01:54] rakm: eh, CSV.foreach does give you an index of the row? i have a large csv file and don't want to read it all into memory before operating on each row
[21:02:07] norc: >> class Exception; def ===(arg); return false; end; end; begin; raise Exception; rescue Exception; end
[21:02:08] ruboto: norc # => nil (https://eval.in/472243)
[21:02:10] rakm: but i want to skip the first 7 rows
[21:02:14] norc: Why does this still catch the Exception?
[21:02:56] jhass: rakm: CSV.foreach(...).drop(7).each do |row|
[21:03:24] rakm: jhass won't it need to laod the whole file to be able to drop the first 7?
[21:03:34] rakm: how does that work?
[21:03:44] jhass: return to_enum(__method__, path, options) unless block
[21:04:07] Rollabun_: has joined #ruby
[21:04:15] norc: YARV indicates that it just does if Foo.send(:"===", $!); end for the rescue block effectively
[21:04:46] norc: (Unsure what getinlinecache does though)
[21:05:35] dfockler: has joined #ruby
[21:06:12] ruurd: has joined #ruby
[21:08:24] norc: >> StandardError.send(:define_method, :===) { true }; begin; raise StandardError; rescue; end
[21:08:25] ruboto: norc # => nil (https://eval.in/472246)
[21:08:30] norc: ACTION scratches his head
[21:09:06] norc: >> puts RubyVM::InstructionSequence.compile('begin; rescue; end').disasm
[21:09:06] ruboto: norc # => == disasm: <RubyVM::InstructionSequence:<compiled>@<compiled>>========== ...check link for more (https://eval.in/472247)
[21:09:24] dmolina: has joined #ruby
[21:09:26] norc: Okay. Apparently this is an upcoming 2.3 thing.
[21:09:29] norc: Nevermind.
[21:09:33] Kreas: has joined #ruby
[21:11:28] tulak: has joined #ruby
[21:12:20] ellisTAA: has joined #ruby
[21:12:56] jamto11_: has joined #ruby
[21:13:29] Phage: Can I simply do array[1] = array[1+2] if I want to change the first and second object in the array
[21:13:51] Phage: array[i] = array[i+1] *
[21:14:02] adaedra: Did you try that?
[21:14:11] ddv: lol you can like try that
[21:14:53] norc: Phage: Let me give you the most wondeful tool any Ruby developer has (well starts out with)
[21:14:55] norc: Phage: irb
[21:15:17] mozzarella: did someone say "pry"?
[21:16:01] norc: mozzarella: I have a tendency to keep things vanilla with beginners. :P
[21:16:04] Axsuul: has joined #ruby
[21:16:22] momomomomo: has joined #ruby
[21:16:42] shevy: I like vanilla
[21:16:45] idefine: has joined #ruby
[21:16:55] shevy: and mozzarella
[21:17:00] shevy: this channel always makes me so hungry :(
[21:17:52] ddv: u make meh hungry sh
[21:18:00] Diabolik: o/ everyone
[21:18:25] trosborn: has joined #ruby
[21:18:31] segfalt``: has joined #ruby
[21:19:15] idefine: has joined #ruby
[21:19:52] dlitvak: has joined #ruby
[21:20:02] gambl0re: has joined #ruby
[21:20:44] k3asd`: has joined #ruby
[21:22:46] zotherstupidguy: has joined #ruby
[21:23:18] davejlon1: has joined #ruby
[21:23:47] davejlon1: Is there a way to take a Time object and change the timezone without changing the time? I want to change 12:49:30 +0000 to 12:49:30 -0400
[21:24:28] varunwachaspati_: has joined #ruby
[21:24:51] TTilus: has joined #ruby
[21:25:11] ruurd: has joined #ruby
[21:25:18] jhass: davejlon1: you could pluck out all the values and stuff them into Time.new, or .utc and add the old offset
[21:25:32] dmcp_: has joined #ruby
[21:27:10] slash_nick: >> Time.now.getlocal("-04:00")
[21:27:11] ruboto: slash_nick # => 2015-11-19 17:27:10 -0400 (https://eval.in/472260)
[21:29:00] Parko: has joined #ruby
[21:29:37] cdg: has joined #ruby
[21:29:53] wilsonc91: has joined #ruby
[21:30:04] lemur: has joined #ruby
[21:30:11] ta: has joined #ruby
[21:30:33] gigetoo: has joined #ruby
[21:31:52] idefine: has joined #ruby
[21:33:06] tildes: has joined #ruby
[21:33:31] nofxx: anyone else using limechat? do you need to register password everytime really? also why it's disconnecting from channels?
[21:33:39] nofxx: it's ruby before any OT complain =D
[21:34:05] shevy: come to xchat and hexchat!
[21:34:29] nofxx: shevy: brew has xchat? installing
[21:34:50] sepp2k: has joined #ruby
[21:35:02] idefine: has joined #ruby
[21:35:12] nofxx: shevy: brew cask install hexchat =D ty
[21:35:16] joonty: has joined #ruby
[21:35:24] shevy: come to linux!
[21:35:43] shevy: it's kinda cool that macsters got a ruby package manager via machomebrew
[21:35:50] nofxx: shevy: I'm just, but just about... 1 week with osx.. need to say. IT TOO SLOW!
[21:35:55] shevy: I sneakily look at the github changelog to see what is new and is to be updated next
[21:35:55] nofxx: linux is heaven
[21:36:11] shevy: I have no idea how osx is really, I assume it's not as bad as windows
[21:36:28] nofxx: shevy: it's not, bunch of nice tidbits... but slow
[21:36:33] nofxx: emacs is almost unusable
[21:36:51] adaedra: do you use the OS X provided emacs?
[21:36:57] nofxx: adaedra: last time I osxed there wasnt this cask thing... whats it?
[21:37:15] nofxx: adaedra: tryed first, way sloweer.... using the github brew one, slight faster
[21:37:15] adaedra: it's a way to install OS X apps (.app) through homebrew
[21:37:23] nofxx: but it's very lagged... magit is the worst
[21:37:27] sinkensabe: has joined #ruby
[21:37:37] adaedra: well, OS X comes with emacs 22
[21:37:52] adaedra: it's a bit rusty :>
[21:38:00] nofxx: adaedra: and not cocoa
[21:38:17] adaedra: what cocoa
[21:38:28] nofxx: usued to emacs outside terminal anyways.... adaedra not visual/window .. just on terminal
[21:38:49] nofxx: cocoa is qt/gtk ... window graphic system
[21:39:01] adaedra: yeah, I know what cocoa is
[21:39:18] adaedra: there's aquaemacs or something like that for OS X, iirc
[21:39:38] nofxx: gonna try it too... Im on 24.5.1 from brew
[21:39:50] Frem: has joined #ruby
[21:39:53] nofxx: it's usable, from dmg is not. But magit is very slow.
[21:40:00] nofxx: like 1 second at least for anything
[21:40:06] adaedra: I haven't used emacs for a while, tbh.
[21:40:09] zotherstupidguy: has joined #ruby
[21:40:50] nofxx: can't work w/o it... what yr using to code adaedra?
[21:41:04] shevy: you poor man
[21:41:05] ruurd: has joined #ruby
[21:41:16] idefine_: has joined #ruby
[21:41:22] momomomomo: solidarity my friend adaedra
[21:41:27] nofxx: adaedra: I will pray for your soul
[21:41:40] momomomomo: kidding? I use vim for haxe, go, ruby, scala
[21:41:41] Nilium: ACTION puts shevy in a trashccan
[21:41:52] shevy: only those 4?
[21:41:55] momomomomo: only thing I use an IDE for is java/c++
[21:42:00] benhuda: has joined #ruby
[21:42:12] Nilium: ACTION doesn't use an IDE for C++ because there are no good ones.
[21:42:13] momomomomo: and that's IDEA / XCode
[21:42:16] Xeago: has joined #ruby
[21:42:21] slash_nick: grep/vim is a great IDE
[21:42:24] momomomomo: well, xcode is wack
[21:42:29] Nilium: Xcode 3 was great.
[21:42:31] agent_white: has joined #ruby
[21:42:34] linuxboy_: has joined #ruby
[21:42:43] Nilium: Then they shoved everything into one frame and now I can't feel organized.
[21:43:15] zotherstupidguy: has joined #ruby
[21:43:23] nofxx: prob with xcode, vim and other is just that they are not emacs
[21:43:59] nofxx: unholy software
[21:44:04] Gustavo: has joined #ruby
[21:44:06] axl_: has joined #ruby
[21:44:09] Rubie: has joined #ruby
[21:44:13] momomomomo: why would I use an OS to edit text?
[21:44:17] quazimodo: has joined #ruby
[21:44:23] adaedra: we can discuss editors and all seriously as long as we're not attacking other people's choices, m'ok?
[21:44:34] momomomomo: we're just jesting
[21:44:44] adaedra: yeah, I know how it ends.
[21:45:02] idefine: has joined #ruby
[21:45:04] Nilium: I don't actually know any good emacs jokes.
[21:45:07] Nilium: Or vim jokes.
[21:45:30] craysiii: emacs is the joke.
[21:45:51] Nilium: I'll believe that when I stop seeing people using it well.
[21:45:54] adaedra: Nilium: let's do both. http://www.gnu.org/fun/jokes/ed-msg.html
[21:45:54] nofxx: yeah, comes down to the same always. But the truth is, vast majority of vim users never used emacs, but every emacs user used vim
[21:45:55] momomomomo: I used to use emacs, http://i.imgur.com/hw1n0DZ.jpg
[21:45:59] guest123: has joined #ruby
[21:46:26] momomomomo: that image stolen from reddit
[21:46:30] adaedra: nofxx: I've used emacs before using vim. I've never used vim before using emacs, though.
[21:46:34] nofxx: momomomomo: thing is: to actually use emacs you need more than a month. You need to rebind and customize it for you
[21:46:43] momomomomo: nofxx: I used it for 3 months
[21:46:56] momomomomo: nothing against it, It just wasn't for me
[21:46:57] nofxx: I have my bindings for all, don't use a single crazy M-x q t pq, 5 ones
[21:47:07] tvw: has joined #ruby
[21:47:08] Nilium: I just hop between vim and Sublime Text arbitrarily. Usually depends on how much time I'm spending in a terminal.
[21:47:29] Nilium: I used to use ConTEXT. That was a neat editor.
[21:47:42] adaedra: emacs has some sexy creator. http://rms.sexy
[21:47:48] craysiii: has anyone tried brackets for webby stuff
[21:48:03] momomomomo: a coworker of mine has been using it for wordpress stuff I think
[21:48:05] adaedra: once, didn't like it, but i'm difficult
[21:48:07] Nilium: I refuse to use browsers for code.
[21:48:11] momomomomo: he's usually a visual studio guy
[21:48:47] Nilium: http://c2.com/cgi/wiki?ExtraLegsOntoaDog ??? I'm still pretty sure these are my favorite programming jokes.
[21:48:58] Phage: https://gist.github.com/phildk/f4eaaee6dc51014d8978 can anyone tell me why this is supposed to be -2 and not -1?
[21:49:25] Nilium: Because you have list[i+1] in the loop.
[21:49:57] roxtrongo: has joined #ruby
[21:50:41] skade: has joined #ruby
[21:50:51] Phage: Nilium: Oh, for when you hit the end of the array?
[21:51:28] Nilium: For when you hit the element just before the end of the array.
[21:51:36] craysiii: you are testing i and i + 1, so you go up to list[i-2] so you dont get index out of bounds
[21:51:50] Nilium: Otherwise, if you had just N-1, you'd eventually hit N because you're doing i+1, and that's not a thing.
[21:51:59] ruurd: has joined #ruby
[21:52:02] Phage: Nilium: Alright, I understand now. Thanks!
[21:52:08] Nilium: It won't get you an index out of bounds, though, because Ruby's OK with this.
[21:52:20] Nilium: It'll probably just give you another harder to understand error.
[21:52:30] Nilium: Because of comparing something with nil.
[21:54:10] dfinninger: has joined #ruby
[21:56:27] momomomomo: Nilium: I like Lua's
[21:56:29] momomomomo: in that octopus link
[21:56:40] parabolize: has joined #ruby
[21:57:05] Nilium: I like Scheme's, but I also just like Scheme and cats in general.
[21:57:30] trosborn: has joined #ruby
[21:58:35] agent_white: has joined #ruby
[21:58:48] agent_white: has left #ruby: ()
[21:59:27] nofxx: that stallman sexy link is f* hilarious
[21:59:50] Scripore: has joined #ruby
[21:59:52] nofxx: thanks who posted =D
[22:00:16] sdothum: has joined #ruby
[22:00:28] Papierkorb: nofxx: I recently started to call it not Stallman/Sexy, but the Stallman plus sexy operating system and user environment.
[22:00:29] shazaum_: has joined #ruby
[22:06:41] xcesariox: has joined #ruby
[22:06:48] frozenfoxx: has left #ruby: ()
[22:07:28] rakm: has joined #ruby
[22:09:48] antoniobeyah: has joined #ruby
[22:10:28] tgandrews: has joined #ruby
[22:10:38] ruurd: has joined #ruby
[22:11:55] theery: has joined #ruby
[22:12:07] cirenyc: has joined #ruby
[22:15:25] Rubie: has joined #ruby
[22:17:00] Azure: has joined #ruby
[22:18:10] NIckGreGER: has joined #ruby
[22:18:27] banister: has joined #ruby
[22:19:38] lxsameer: has joined #ruby
[22:19:53] nofxx: has joined #ruby
[22:20:13] Gustavo: has joined #ruby
[22:20:30] NIckGreGER: hello everyone
[22:20:31] Cache_Money: has joined #ruby
[22:20:49] Ox0dea: has joined #ruby
[22:21:17] jhass: !kick NIckGreGER bye troll
[22:21:17] ruboto: ruboto kicked NIckGreGER: troll
[22:21:17] ruboto: -o ruboto
[22:21:18] NIckGreGER: has joined #ruby
[22:23:14] yorickpeterse: jhass: I don't get the troll part
[22:23:24] jhass: yorickpeterse: read the capitals
[22:23:55] yorickpeterse: FYI they re-joined so that might become a +b
[22:24:07] jhass: I'm aware
[22:25:08] djbkd: has joined #ruby
[22:27:35] Gustavo: has joined #ruby
[22:28:11] Gustavo: has joined #ruby
[22:28:12] adaedra: I look away 10 minutes and you get a troll in
[22:29:04] yorickpeterse: lousy policing here
[22:29:06] aeontech: has joined #ruby
[22:29:16] havenwood: ACTION glares at the troll
[22:29:17] yorickpeterse: back in my days!
[22:29:30] yorickpeterse: I imagine people like NIckGreGER just going "HAHAHAHAHA PENIS"
[22:29:39] yorickpeterse: aka I imagine them being 4 years old
[22:29:40] trosborn: has joined #ruby
[22:29:46] yorickpeterse: probably not far from the truth
[22:29:47] jhass: yorickpeterse: you're much worse than them atm
[22:29:53] yorickpeterse: jhass: oh shut up
[22:30:03] jhass: giving them the attention they want, I'd rather you shut u
[22:30:10] nofxx: has joined #ruby
[22:30:14] yorickpeterse: That's an interesting attitude there
[22:30:37] adaedra: Bonsoir Ox0dea
[22:30:50] ixti: has joined #ruby
[22:30:53] apeiros: Ox0dea: ssshhhh, it's gulls
[22:30:56] Ox0dea: adaedra: Au revoir, Shoshanna!
[22:31:00] adaedra: ugh, I don't want to work on this code
[22:31:04] ruurd: has joined #ruby
[22:31:09] adaedra: ugh, it's blocking
[22:31:13] apeiros: adaedra: del is your friend
[22:31:17] adaedra: ugh, I'm conflicted
[22:31:24] adaedra: ACTION deletes apeiros 
[22:31:31] adaedra: mh, wrong window.
[22:32:08] Ox0dea: Is he, really?
[22:32:12] apeiros^H^H^H^H^: why'd you do that?!?
[22:33:27] Ox0dea: # ls /lost+found
[22:34:16] Ox0dea: Close one.
[22:34:56] Xeago: has joined #ruby
[22:35:07] yoongkang: has joined #ruby
[22:35:32] Papierkorb: Where can I put constants for multiple rake tasks?
[22:35:32] rakm: has joined #ruby
[22:35:47] quazimodo: has joined #ruby
[22:35:58] Papierkorb: err, I have a bunch of constants, which I want to use from rake tasks (only from rake tasks, not app code), but from multiple ones
[22:36:19] apeiros: Papierkorb: I have PROJECT/rake/lib
[22:36:24] apeiros: (and /rake/tasks)
[22:36:52] jessemcgilallen: has joined #ruby
[22:36:57] Papierkorb: pretty similar, yeah, but where do you put the constants themselves? constants.rake file which just has those in it?
[22:37:16] Papierkorb: Not a rails app, I just adopted the scheme
[22:37:42] apeiros: in lib and properly namespace it
[22:37:44] VeryBewitching: Papierkorb: I'd make a module, imo, with the constants defined
[22:38:02] VeryBewitching: TaskConstants.SOME_CONST
[22:38:12] apeiros: that's a method, though :)
[22:38:36] yfeldblum: has joined #ruby
[22:38:58] idefine: has joined #ruby
[22:39:23] VeryBewitching: Oh, interesting.
[22:40:06] alto: has joined #ruby
[22:40:15] dr3w: has joined #ruby
[22:40:19] sdothum: has joined #ruby
[22:40:34] wilsonc91: has joined #ruby
[22:40:39] apeiros: you can invoke methods with ::, but you can't resolve constants with .
[22:41:28] baweaver: has joined #ruby
[22:41:31] adaedra: should be possible to go over with method_missing somehow, no? >:)
[22:41:51] apeiros: adaedra: still a method call :-p
[22:42:03] adaedra: technically
[22:42:10] jaequery: has joined #ruby
[22:42:46] darix: *stabs apeiros with a sharp stick*
[22:42:49] VeryBewitching: Papierkorb: So TaskConstants::SOME_CONST to access values defined there.
[22:42:51] Ropeney: has joined #ruby
[22:43:08] apeiros: darix: ay! right!
[22:43:15] CustosLimen: I dont get how to use Rack::Logger
[22:43:21] CustosLimen: http://www.rubydoc.info/github/rack/rack/Rack/Logger
[22:43:58] adaedra: What do you want from it?
[22:44:23] TheHodge: has joined #ruby
[22:45:26] CustosLimen: adeponte, I just want to log some stuff
[22:45:33] CustosLimen: adeponte, from inside sinatra app
[22:45:48] CustosLimen: adeponte, so I want to in config.ru do something that logs to a file
[22:46:02] adaedra: adeponte: I'm so sorry.
[22:46:34] adeponte: no worries, http://www.sinatrarb.com/configuration.html, search for logging might help
[22:46:36] dmolina1: has joined #ruby
[22:46:41] adaedra: CustosLimen: what did you try
[22:47:51] CustosLimen: adaedra, I dont know what to try: http://www.rubydoc.info/github/rack/rack/Rack/Logger - I'm looking at that and I can initialize it to get a new object and then it has method call - and I'm not sure what either of those really help - I'm expecting something like #info( level, msg )
[22:48:13] adaedra: It's a Rack middleware
[22:48:31] adaedra: You don't just instantiate an instance and use it
[22:48:42] mjuszczak: has joined #ruby
[22:48:46] adaedra: I'm not sure this is what you're really looking for, I'm afraid
[22:49:00] jhass: if you want a plain logger use the stdlib Logger
[22:50:33] whiteline: has joined #ruby
[22:52:29] Axsuul: has joined #ruby
[22:53:28] Fezzler: has joined #ruby
[22:56:04] ruurd: has joined #ruby
[22:57:23] CloCkWeRX: has joined #ruby
[22:57:39] altis: has joined #ruby
[22:59:11] baweaver: has joined #ruby
[22:59:16] pwnd_nsfw: has joined #ruby
[22:59:24] jessemcgilallen: has joined #ruby
[22:59:33] benlieb_: has joined #ruby
[22:59:46] dorei: has joined #ruby
[23:01:54] NeverDie: has joined #ruby
[23:02:47] neanderslob: has joined #ruby
[23:03:49] ruby-lang373: has joined #ruby
[23:03:58] Xeago: has joined #ruby
[23:05:17] Yzguy: has joined #ruby
[23:05:23] ruby-lang373: how do i pass this beer_id to the ratings controller?
[23:05:25] ruby-lang373: http://postimg.org/image/dnqcq4dhh/
[23:05:26] nofxx: has joined #ruby
[23:05:32] ruboto: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[23:05:45] ruby-lang373: yeah its rails
[23:05:49] adaedra: I didn't even have the time to click the link
[23:06:01] gambl0re: has joined #ruby
[23:06:02] Ox0dea: > controller
[23:06:17] jhass: > sharing problem with an image
[23:06:47] ruby-lang373: yeah how do i pass it tho
[23:06:58] Ox0dea: ?rails ruby-lang373
[23:06:58] ruboto: ruby-lang373, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[23:06:59] jhass: ?rails ruby-lang373
[23:06:59] ruboto: ruby-lang373, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[23:07:49] havenwood: ruby-lang373: https://freenode.net/faq.shtml#nicksetup
[23:08:50] FernandoBasso: has joined #ruby
[23:09:27] |ifei5good: has joined #ruby
[23:09:31] casadei: has joined #ruby
[23:09:43] leitz: has joined #ruby
[23:10:09] ruurd: has joined #ruby
[23:10:48] adaedra: ?rails shevy
[23:10:49] ruboto: shevy, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[23:10:56] shevy: ?spam adaedra
[23:10:56] ruboto: adaedra, I don't know anything about spam
[23:11:01] uxp: has joined #ruby
[23:11:16] leitz: What's the minimum to put in a hash value so that a hash[key].length doesn't return a NoMethodError for nil:NilClass
[23:11:24] aibot: has joined #ruby
[23:11:31] Ox0dea: leitz: hash[key]&.length
[23:11:34] adaedra: A length method?
[23:11:36] shevy: if you have a nil there?
[23:11:42] leitz: And spam is my role.
[23:11:49] shevy: >> nil.length
[23:11:50] ruboto: shevy # => undefined method `length' for nil:NilClass (NoMethodError) ...check link for more (https://eval.in/472272)
[23:11:55] jhass: hash.fetch(key).size
[23:11:57] leitz: It was a " " value
[23:12:11] jhass: >> " ".size
[23:12:12] ruboto: jhass # => 1 (https://eval.in/472273)
[23:12:21] iceden: has joined #ruby
[23:12:22] leitz: Most of them are longer strings but when it gets to a " " it chokes.
[23:12:23] shevy: ruboto is the ultimate truth bearer
[23:12:34] shevy: and leitz doubts ruboto!!!
[23:12:37] jhass: leitz: use p / insepct to debug print
[23:12:38] Ox0dea: >> ' ' == nil # leitz
[23:12:38] ruboto: Ox0dea # => false (https://eval.in/472274)
[23:12:57] dfinninger: has joined #ruby
[23:13:37] leitz: The test was: if cci_list.count > 0 || hash[control].length > 3 <then do stuff>
[23:13:52] unreal: has joined #ruby
[23:14:10] shevy: that is cool but
[23:14:10] ruboto: I'm the channel bot, linker of the rules, adept of the facts, wielder of the banhammer.
[23:14:19] shevy: if it had returned a ' '
[23:14:26] apeiros: should add "and beyond doubt."
[23:14:27] howdoicomputer: has joined #ruby
[23:14:36] shevy: then .length would have returned 1, see what jhass showed with ruboto leitz
[23:14:40] bluOxigen: has joined #ruby
[23:16:17] TeresaP: has joined #ruby
[23:16:23] sanjayu: has joined #ruby
[23:16:25] Axsuul: has joined #ruby
[23:16:38] CpuID: has joined #ruby
[23:16:55] adaedra: >> " ".length
[23:16:56] ruboto: adaedra # => 1 (https://eval.in/472275)
[23:17:23] niCKgREgGer: has joined #ruby
[23:18:11] TeresaP: Hey guys. Noob garbage collection question. If I create a thread, in an initialize method, what's the best practice for cleaning it up? I realize threadname.exit will clean up, but I'm wondering if I should just have a destructor or manually call a cleanup method to kill it or what
[23:18:45] leitz: Hmm...I may be on a false trail.
[23:18:58] jhass: TeresaP: if the code it runs is through it'll be cleaned automatically, don't worry about it
[23:19:11] TeresaP: We don't have to do Thread.exit?
[23:19:17] gambl0re: has joined #ruby
[23:19:26] TeresaP: jhass If we hit an exception it's cleaned automatically too, then?
[23:19:48] n_blownapart: has joined #ruby
[23:19:50] jhass: TeresaP: yes
[23:20:10] niCKgREgGer: hello everyone
[23:20:14] jhass: TeresaP: only slightly related, you might want to set Thread.abort_on_exceptions = true
[23:20:21] axl_: has left #ruby: ()
[23:20:26] jhass: !kick niCKgREgGer bye troll
[23:20:26] ruboto: ruboto kicked niCKgREgGer: troll
[23:20:26] ruboto: -o ruboto
[23:20:32] niCKgREgGer: has joined #ruby
[23:20:51] jhass: !ban niCKgREgGer !T 1w troll
[23:20:52] ChanServ: +b niCKgREgGer!*@*
[23:20:52] ChanServ: ChanServ kicked niCKgREgGer: troll
[23:21:17] TeresaP: Thanks a lot jhass. Feels weird not cleaning up
[23:22:40] ruurd: has joined #ruby
[23:23:40] bluOxigen: has joined #ruby
[23:24:21] TeresaP: shevy that seemed harsh, haha
[23:24:39] pglombardo: has joined #ruby
[23:24:42] leitz: Okay, size doesn't matter. It was another issue altogether.
[23:26:05] Mia: has joined #ruby
[23:26:05] Mia: has joined #ruby
[23:26:22] shevy: if only leitz would not be so doubtful of ruboto
[23:27:33] NeverDie: has joined #ruby
[23:29:58] leitz: Having met a lot of programmers I don't trust a lot of programs.
[23:30:25] Radar: Having written a lot of programs, I don't trust a lot of programmers ;)
[23:31:13] dviola: has joined #ruby
[23:31:46] pawnbox: has joined #ruby
[23:32:59] lemur: has joined #ruby
[23:33:24] djbkd: has joined #ruby
[23:33:48] wilsonc91: has joined #ruby
[23:34:25] banister: has joined #ruby
[23:37:05] hoopti: has joined #ruby
[23:37:33] yoongkang: has joined #ruby
[23:39:32] hoopti: has joined #ruby
[23:40:49] CloCkWeRX: has left #ruby: ()
[23:41:08] quazimodo: has joined #ruby
[23:42:22] ruurd: has joined #ruby
[23:45:51] _blizzy_: has joined #ruby
[23:47:55] atomical: has joined #ruby
[23:49:25] axl_: has joined #ruby
[23:49:28] iamvery: has joined #ruby
[23:53:55] cornerma1: has joined #ruby
[23:54:56] GarethAdams: has joined #ruby
[23:55:00] TeresaP: Another noob threading question if you don't mind. I am kicking off a thread with Thread.new { self.remove_old_screenshots}. If I have a "loop" (infinite loop) going inside that that checks for conditions before executing, what would prevent that loop from being executed more than once
[23:55:11] GarethAdams: has joined #ruby
[23:55:20] TeresaP: Besides those conditions not being met
[23:56:09] allcentury: has joined #ruby
[23:56:15] Radar: steps to reproduce the issue please
[23:56:26] mozzarella: blocking operation?
[23:56:31] jhass: Also set Thread.abort_on_exception = true
[23:57:36] mozzarella: >> sleep Float::INFINITY
[23:57:37] ruboto: mozzarella # => Inf out of Time range (RangeError) ...check link for more (https://eval.in/472285)
[23:57:42] TeresaP: I'm handling some exceptions that are due to an error in the parent test framework, so I'm not sure that's a good idea is it?
[23:58:16] TeresaP: Do I need to create a new thread if I'm not "raising" after hitting the exception?
[23:58:52] drewo: has joined #ruby
[23:59:20] TeresaP: jhass ^ (sorry, keep forgetting to tag)