« Back to channel list

#ruby - 08 July 2015

« Back 1 day Forward 1 day »
[00:00:21] Senjai: jhack: What zenspider said. But its really the individual, not the bootcamp
[00:00:26] zenspider: ferret_guy: I don't know how to determine whether passenger is actually being invoked or not, but it seems like it isn't in the pipeline
[00:00:30] zenspider: it's ALSO the bootcamp.
[00:00:46] zenspider: if they don't provide the structure, pedagogy, and support, it's gonna suck
[00:00:48] ferret_guy: @zenspider that's what I was thinking
[00:00:51] jhack: I've been working on the Odin project, on their courses
[00:01:07] jhack: Opinions on ways to prepare?
[00:01:09] zenspider: I can't speak for flatiron. I know a few around here in seattle, and ... uh... j3's school
[00:01:11] ferret_guy: @zenspider their is nothing in the log after startup from them
[00:01:17] bricker: ferret_guy: did you set DocRoot to "public" directory?
[00:01:37] hotpancakes: has joined #ruby
[00:01:43] ferret_guy: @bricker ya most updated config https://gist.github.com/markomo/9f8fc20aabe38f5d476a
[00:02:01] zenspider: I don't see a docroot
[00:02:03] bafbomb_1: has left #ruby: ()
[00:02:12] Senjai: jhack: zenspider I find https://www.youtube.com/watch?v=nmdGZk-fF98 is relevant (not entirely) but still worth watching
[00:02:54] zenspider: hrm... butter, lard, or butter and lard?
[00:02:58] jhack: Also, does anyone use Irc on their phones haha
[00:03:05] rodfersou: has joined #ruby
[00:03:06] bricker: ferret_guy: you also need "PassengerEnabled On" under the Location block
[00:03:12] ferret_guy: @zenspider used this doc to set it up https://www.phusionpassenger.com/documentation/Users%20guide%20Apache.html#deploying_rack_to_sub_uri
[00:03:17] Senjai: zenspider: I say splurge
[00:03:23] Senjai: You've been waiting for this
[00:03:25] JDiPierro: has joined #ruby
[00:03:26] Senjai: You DESERVE this
[00:03:44] zenspider: I _do_! I'm totally torn up from my workout yesterday. I need this
[00:04:44] dgutierrez1287: has joined #ruby
[00:05:18] zenspider: 3 more degrees... gonna saut?? up some garlic scapes to go with
[00:05:18] ferret_guy: @bricker no go still does not work :(
[00:05:33] zenspider: ferret_guy: not twitter. @ not needed
[00:05:45] bricker: is passenger running? show your latest config
[00:05:54] ferret_guy: zenspider: I know dumb habbit :)
[00:06:46] ferret_guy: @bricker https://gist.github.com/markomo/9f8fc20aabe38f5d476a
[00:08:50] JDiPierro: has joined #ruby
[00:09:06] mistermocha: has joined #ruby
[00:10:27] avril14th: has joined #ruby
[00:11:12] bricker: ferret_guy: try changing PassengerAppRoot to the root dir
[00:11:12] Senjai: zenspider: Seriously making me hungry
[00:11:17] bricker: /home/mark/dashboard
[00:11:23] Senjai: This might be the most distracting IRC conversation I've ever had
[00:11:45] bricker: ferret_guy: and you might need PassengerDocumentRoot pointing to public
[00:12:11] bricker: ferret_guy: just try the first suggestion though
[00:12:50] ferret_guy: I don't have a PassengerDocumentRoot, first suggestion did not work
[00:12:50] i8igmac: xpath("//h1[contains(@class, 'header')]").children.text
[00:12:58] sevenseacat: has joined #ruby
[00:13:59] i8igmac: this xpath example will output something like => " some name\n\n", "\t", "(","2009",")"
[00:14:15] ferret_guy: bricker should I have a PassengerDocumentRoot?
[00:14:31] bricker: ferret_guy: I don't know, just a thought
[00:14:41] bricker: I've only ever setup subdomains in passenger with nginx
[00:14:46] bricker: and I remember it being non-trivial
[00:14:51] ferret_guy: where might I add it? location?
[00:14:54] bricker: and that was 3 years ago
[00:15:54] hahuang65: has joined #ruby
[00:15:58] enebo: has joined #ruby
[00:16:50] ferret_guy: Invalid command 'PassengerDocumentRoot', perhaps misspelled or defined by a module not included in the server configuration
[00:17:19] Yiota: has joined #ruby
[00:17:21] hahuang65: has joined #ruby
[00:18:04] Yiota: has joined #ruby
[00:18:27] ferret_guy: bricker: might it be called something else?
[00:18:49] Brainling: has joined #ruby
[00:20:02] ferret_guy: no idea why the alias is not working though... should be dropping me into /public
[00:20:03] bodgix_wrk_: has joined #ruby
[00:20:09] bricker: dunno sorry
[00:20:29] bricker: if I had it all in front of me I could figure it out but this is a difficult problem to debug by proxy
[00:22:04] ferret_guy: bricker: thanks for your help! I think it has something to do with alias not working right if I dont get it figured out in the next several hours hopefully the passenger irc can help
[00:22:16] astrobun_: has joined #ruby
[00:22:25] eggoez: has joined #ruby
[00:23:36] ZoanthusR: has joined #ruby
[00:24:06] zenspider: omfg... so tasty
[00:24:10] meph: has joined #ruby
[00:24:31] zacstewart: has joined #ruby
[00:25:27] Senjai: zenspider: http://www.hahastop.com/pictures/Make_It_Stop.jpg
[00:26:05] nateberkopec: has joined #ruby
[00:26:44] hotpancakes: has joined #ruby
[00:28:14] symbol: has joined #ruby
[00:29:17] jhack: has joined #ruby
[00:29:44] hahuang65: has joined #ruby
[00:30:47] Feyn: has joined #ruby
[00:31:02] sphex: I assume the singleton classes are not allocated until they are needed?
[00:33:11] workmad3: has joined #ruby
[00:33:29] zenspider: sphex: don't think about it. it's magic
[00:33:51] wallerdev2: has joined #ruby
[00:34:08] sphex: ooohh.. now I want to know even more.
[00:34:13] j_mcnally: has joined #ruby
[00:35:22] CloCkWeRX: has joined #ruby
[00:36:49] olistik: has joined #ruby
[00:37:33] zenspider: all you really need to know: http://t.co/xXVyakyUH5
[00:39:31] baweaver: has joined #ruby
[00:40:15] Oog: has joined #ruby
[00:40:19] ferret_guy: bricker: still there?
[00:40:21] hahuang65: has joined #ruby
[00:40:45] keen__________14: has joined #ruby
[00:40:54] ferret_guy: bricker: so I got an error message form passenger, We're sorry, but something went wrong. We've been notified about this issue and we'll take a look at it shortly.
[00:41:07] hololeap: has joined #ruby
[00:41:17] ferret_guy: I found out I had 2 virtual hosts one in another file and one in the conf directory
[00:42:22] ferret_guy: bricker: moved my stuff to the other one from the main dir and that happened, new conf https://gist.github.com/markomo/c48f9908d320dede9446
[00:43:00] jaygen: has joined #ruby
[00:43:35] nateberkopec: has joined #ruby
[00:44:46] freerobby: has joined #ruby
[00:45:25] gambl0re: has joined #ruby
[00:45:38] casadei_: has joined #ruby
[00:47:01] sphex: zenspider: looks like it's allocated on-demand by singleton_class_of() in class.c
[00:47:14] hahuang65: has joined #ruby
[00:47:27] Igorshp: has joined #ruby
[00:47:41] zenspider: sphex: this is my "don't care" face. it just works.
[00:47:59] Channel6: has joined #ruby
[00:48:17] bricker: ferret_guy: that sounds like a Rails error, which is good because it means your app is running
[00:48:50] ferret_guy: bricker: yay! i'm enabling friendly error pages
[00:48:59] apt-get_: has joined #ruby
[00:49:31] sphex: it's attached to it via an internal instance variable, so it doesn't even waste memory for a pointer when not used. oh zenspider! isn't that fascinating?
[00:49:33] Papierkorb: Why is "Fixnum === Fixnum" 'false' ?
[00:50:00] chipotle: has joined #ruby
[00:50:21] zenspider: Papierkorb: because you're invoking Module#===
[00:50:31] zenspider: >> Fixnum === 42
[00:50:32] ruboto: zenspider # => true (https://eval.in/394571)
[00:50:37] zenspider: Class === Fixnum
[00:50:39] ferret_guy: bricker: yep took a dump
[00:50:43] zenspider: >> Class === Fixnum
[00:50:44] ruboto: zenspider # => true (https://eval.in/394572)
[00:50:49] zenspider: >> Fixnum === Fixnum
[00:50:50] ruboto: zenspider # => false (https://eval.in/394573)
[00:50:57] zenspider: gotta go to study group
[00:51:02] ferret_guy: bricker: where would I put lines, RailsAppSpawnerIdleTime 0 and PassengerMinInstances 1?
[00:51:24] kies^: has joined #ruby
[00:51:35] Papierkorb: zenspider: mh, ok, thanks
[00:52:06] zenspider: Papierkorb: make sense?
[00:52:09] bricker: ferret_guy: it can go pretty much anywhere
[00:52:27] bricker: ferret_guy: if you only have one app running it doesn't really matter
[00:53:13] Papierkorb: zenspider: Reading Module#=== ..
[00:53:17] sharpmachine: has joined #ruby
[00:53:43] ferret_guy: bricker: I jammed it in error message is: https://gist.github.com/markomo/c48f9908d320dede9446 I am still working on my ruby skills it's cripitic to me :)
[00:53:56] Papierkorb: >> Object === Fixnum
[00:53:57] ruboto: Papierkorb # => true (https://eval.in/394574)
[00:54:30] Papierkorb: zenspider: Yep, got it. thanks. Mh, so I have a type inside a variable 'type', and want to do a case over it.
[00:54:42] Papierkorb: Thinking about it, I think I want classes instead of a case.
[00:54:46] bricker: ferret_guy: invalid YAML syntax in history.yml
[00:55:20] chipotle: has joined #ruby
[00:55:33] ferret_guy: bricker: hmm my app starts w/o problems let me check what that does
[00:56:13] segmond: has joined #ruby
[00:56:49] RegulationD: has joined #ruby
[00:57:46] Cache_Money: has joined #ruby
[00:58:17] bruno-: has joined #ruby
[00:58:18] JeramyRR: has joined #ruby
[00:58:41] ferret_guy: bricker: fixed YAML, dashing is now redirecting me to /sample where the dashboard is but of coursr Apache has no idea how to handle that, what should I do?
[00:58:46] hotpancakes: has joined #ruby
[00:58:56] unreal: has joined #ruby
[00:59:00] sphex: hey. could anyone recommend some documentation about ruby's class system? I read some random bits here and there, but I'm not too confidant I could do metaprogramming right as it is.
[01:00:37] iwishiwerearobot: has joined #ruby
[01:01:02] kkeuning: has joined #ruby
[01:01:49] bricker: sphex: what kind of information are you looking for exactly?
[01:02:21] jpfuentes2: has joined #ruby
[01:02:56] sphex: *everything*!
[01:03:40] pontiki: everything2.com is for you, then
[01:04:26] sphex: I just figured out that classes do not have class methods; just instance methods and singleton instance methods. so I'm basically "there". I guess if there would be some doc that presented it from the start it would help me to reread it too. :/
[01:05:03] sphex: this is really neat and seems all really well thought out.. but still pretty confusing
[01:05:15] sarkyniin: has joined #ruby
[01:05:31] pontiki: anyone suggested metaprogramming ruby 2?
[01:05:39] CloCkWeRX: has left #ruby: ()
[01:06:45] bronson: has joined #ruby
[01:07:28] kreantos: has joined #ruby
[01:07:32] sphex: oh... yeah, I didn't check for real books yet. maybe I should.
[01:08:04] sphex: pontiki: can you recommend that one?
[01:09:18] Lucky_: has joined #ruby
[01:09:38] jxpx777: has joined #ruby
[01:10:46] ddarkpassenger: has joined #ruby
[01:11:26] sphex: well then
[01:11:38] snapfractalpop: has left #ruby: ("WeeChat 1.3-dev")
[01:12:57] sarkyniin: has joined #ruby
[01:13:03] balazs: has joined #ruby
[01:14:24] ferret_guy: it works!!!!!!!!
[01:14:36] hotpancakes: has joined #ruby
[01:14:41] rickmasta: has joined #ruby
[01:15:09] ferret_guy: has left #ruby: ()
[01:17:07] zendrix: has joined #ruby
[01:17:35] mistermocha: has joined #ruby
[01:21:15] dgutierrez1287: has joined #ruby
[01:21:31] stantonnet: has joined #ruby
[01:25:11] kkeuning: has joined #ruby
[01:25:24] Azulinho: has joined #ruby
[01:27:17] mistermocha: has joined #ruby
[01:27:32] kkeuning: has joined #ruby
[01:27:57] gambl0re: has joined #ruby
[01:28:39] zacstewart: has joined #ruby
[01:29:59] Lucky_: has joined #ruby
[01:31:56] Nick_joes_: has joined #ruby
[01:32:27] JeramyRR: has joined #ruby
[01:33:28] sepp2k: has joined #ruby
[01:35:54] jacaballero: has joined #ruby
[01:36:22] werelivinginthef: has joined #ruby
[01:40:15] hahuang65: has joined #ruby
[01:40:38] jhwhite: has joined #ruby
[01:46:26] lele: has joined #ruby
[01:46:46] nettoweb: has joined #ruby
[01:48:23] griffindy: has joined #ruby
[01:48:55] Igorshp: has joined #ruby
[01:54:12] christiandsg: has joined #ruby
[01:54:14] blokc: has joined #ruby
[01:57:03] kkeuning: has joined #ruby
[01:58:36] Antiarc: sphex: If you think of classes as instances of Class, which themselves have instance methods, then it becomes even more clear :)
[01:58:42] d0lph1n98: has joined #ruby
[01:59:08] GriffinHeart: has joined #ruby
[01:59:26] Antiarc: ("eigenclass" is a keyword that may serve you well)
[02:01:03] GriffinHeart: has joined #ruby
[02:01:03] JeramyRR: has joined #ruby
[02:01:29] GriffinHeart: has joined #ruby
[02:01:53] momomomomo: has joined #ruby
[02:03:34] werelivinginthef: has joined #ruby
[02:04:28] christiandsg: has joined #ruby
[02:05:21] Limix: has joined #ruby
[02:06:47] hotpancakes: has joined #ruby
[02:07:27] devbug: has joined #ruby
[02:07:55] astrobun_: has joined #ruby
[02:08:29] RegulationD: has joined #ruby
[02:08:45] prettiestPony11: has joined #ruby
[02:08:56] casadei_: has joined #ruby
[02:11:15] sphex: Antiarc: huh. I guess. I'm really having a hard time figuring all of this out. :/ maybe I just need to concentrate harder. my brain must be hardwired for simula/C++ style classes.
[02:13:53] Antiarc: sphex: The way I think about it (which isn't entirely correct, but works well enough 99% of the time) is just "instance methods and static methods"
[02:16:17] Antiarc: Is there something in particular you're struggling with, metaprogramming-wise?
[02:18:15] dstarh: has joined #ruby
[02:18:50] hotpancakes: has joined #ruby
[02:18:52] GriffinHeart: has joined #ruby
[02:19:02] Rixius: has joined #ruby
[02:20:43] transiency: has joined #ruby
[02:20:43] towski_: has joined #ruby
[02:21:45] c_nick: has joined #ruby
[02:21:53] workmad3: has joined #ruby
[02:22:39] bronson: has joined #ruby
[02:23:25] sphex: Antiarc: not at the time, but thanks! I get confused real easy when there are a lot of includes/extends happening. I prolly need to practice. or get a book. I guess understanding the eigenclass better will really help me though.
[02:23:34] c_nick: Active record where function is used but it takes all the column entries as parameters how can I send a like query in it
[02:24:31] eggoez: has joined #ruby
[02:24:51] louism2wash: has joined #ruby
[02:25:07] louism2wash: hey guys, what does the ** operator do in a file path?
[02:25:25] Oog: has joined #ruby
[02:25:41] c_nick: Louism2wash directories and subdirectories
[02:25:42] Antiarc: https://gist.github.com/cheald/17681f00f232016e9123 - does that help?
[02:25:52] Antiarc: louism2wash: that's used for a recursive glob, usually
[02:26:19] Oog: Date.parse('7/7/15') => Sun, 15 Jul 2007 wtf?!?!
[02:26:36] Antiarc: Oog: Makes perfect sense to me! y/m/d! :P
[02:26:37] blokc: Elegant Ruby is my favorite Ruby book @sphex
[02:26:43] sevenseacat: Oog: makes sense.
[02:27:47] hornairs_: has joined #ruby
[02:28:32] jesterfraud: has joined #ruby
[02:28:47] dopie: has joined #ruby
[02:29:17] sphex: Antiarc: hey thanks a lot, I'm doing to reread that a few times...
[02:29:45] Oog: Date.strptime('7/17/15', '%-m/%-d/%y') => invalid date.... ?
[02:30:26] c_nick: I want to query select * from students where name is Josh and address like %newyork% and age = 23
[02:31:30] Oog: i figured it out. that was a bad bug
[02:31:33] Oog: major problem there
[02:31:35] c_nick: But my active record function is like Student.where(name: sname, address: sadd age:sage)
[02:32:17] c_nick: How to get a like field in the address field
[02:32:32] blokc: Foo.where("bar LIKE ?", "%#{query}%")
[02:32:44] cout: mmm.. sage
[02:33:04] cout: ACTION licks his chops
[02:34:57] sphex: Antiarc: oh yeah.. it helps to see it work with an anonymous class too. it probably would have confused the s**t out of me if I saw it in the wild.
[02:35:04] c_nick: blokc: that would give me all students living in new York but how to filter it with Josh with age
[02:35:11] darkf: has joined #ruby
[02:35:54] c_nick: I had tried merge bit then this like query did not return anything also in rails u could traverse db using rails console how to try db in normal active records
[02:36:13] lessless: has joined #ruby
[02:37:05] eggoez: has joined #ruby
[02:37:09] rickmasta: has joined #ruby
[02:37:30] sevenseacat: c_nick: Student.where("name LIKE "%#{whatever}%").where(age: 25, address: whatever)
[02:41:36] jhwhite: has joined #ruby
[02:41:44] hololeap: has joined #ruby
[02:43:32] hahuang65: has joined #ruby
[02:44:20] c_nick: sevenseacat: name like ? Right ?
[02:44:39] weemsledeux: has joined #ruby
[02:44:40] sevenseacat: you get the idea. it wasnt exact code.
[02:44:56] jpfuentes2: has joined #ruby
[02:45:00] c_nick: Oh ok sorry I got a little skeptical hehe
[02:46:06] blokc: I feel like citing the Rails warning about SQL injection.
[02:46:08] blokc: Client.where("first_name LIKE '%#{params[:first_name]}%'") is not safe.
[02:46:27] hotpancakes: has joined #ruby
[02:46:51] sharpmachine: has joined #ruby
[02:46:53] freerobby: has joined #ruby
[02:47:50] c_nick: blokc had read that but what's the right approach then
[02:48:09] blokc: Yay, good question, I'm reading more now.
[02:48:09] blokc: http://guides.rubyonrails.org/active_record_querying.html
[02:48:34] blokc: It mentions handling conditions in an array.
[02:50:18] msnyon: has joined #ruby
[02:51:11] blokc: Ok so the safe way is to use the '?' syntax
[02:51:24] blokc: Student.where("name LIKE "%#{whatever}%").where(age: 25, address: whatever)
[02:51:47] blokc: The above query places the value as-is directly into the SQL that's built.
[02:51:51] Pupeno_: has joined #ruby
[02:52:20] blokc: Foo.where("bar LIKE ?", "%#{query}%")
[02:52:28] blokc: Foo.where("bar LIKE :query", query: "%#{query}%")
[02:52:35] blokc: http://stackoverflow.com/questions/26094430/safe-activerecord-like-query
[02:52:44] sevenseacat: yes, always parameterize your queries.
[02:52:47] baweaver: has joined #ruby
[02:52:51] NeverDie: has joined #ruby
[02:52:56] mistermocha: has joined #ruby
[02:53:06] alicef: has joined #ruby
[02:53:10] sevenseacat: I was not posting exact code to be used, which I thought was obvious by the fact I was using the wrong field names and the wrong variables.
[02:53:20] alicef: has left #ruby: ("Leaving")
[02:53:23] sevenseacat: I was showing how it could be done by chaining where queries.
[02:54:00] yfeldblum: has joined #ruby
[02:54:10] c_nick: The parameters need to be a hash ?_
[02:54:22] ruboto: also, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[02:55:11] kkeuning: has joined #ruby
[02:55:30] JoshuaPaling: has joined #ruby
[02:55:34] blokc: I'm in #rubyonrails too.
[02:55:44] c_nick: No seven I meant on the link blokc gave there it mentions name like :dname", {dname: name}
[02:56:08] hololeap: has joined #ruby
[02:56:16] c_nick: Blokc ActiveRecords is rails active record aint :)
[02:56:33] blokc: We need to move this to the RubyonRails Channel @c_nick
[02:57:39] c_nick: I will try these.
[02:57:59] c_nick: Thanks seven and blokc moving to rails channel
[02:58:06] blokc: True it's not rails @c_nick, but this discussion would benefit people in that channel more.
[02:58:27] blokc: I'm in that channel as well.
[02:58:42] c_nick: Cool no problem. :)
[02:59:05] charliesome: has joined #ruby
[03:00:21] hotpancakes: has joined #ruby
[03:01:56] jesterfraud: has joined #ruby
[03:03:06] balazs: has joined #ruby
[03:03:59] Scroff: has joined #ruby
[03:04:29] havenwood: Radar: sevenseacat: Hoping this might be interesting to Rubyists learning Elixir: https://github.com/havenwood/elixir.rb
[03:05:07] sevenseacat: havenwood: you're crazy lol
[03:05:15] havenwood: sevenseacat: ;)
[03:05:55] sevenseacat: also, "Fabulous run in 0.113416s, 2451.1581 runs/s, 3147.7102 assertions/s." nice.
[03:05:58] havenwood: OptionParser was hard :O
[03:06:03] havenwood: sevenseacat: :D
[03:07:17] sevenseacat: interesting idea
[03:09:05] havenwood: I'm learning some Elixir in the process, which I'm enjoying.
[03:09:41] havenwood: And some concurrent-ruby.
[03:09:42] sevenseacat: I'm enjoying it also, but I don't fully grok it yet
[03:10:07] sevenseacat: nor feel like I want to use it over ruby for anything
[03:10:08] casadei_: has joined #ruby
[03:10:13] sevenseacat: but its an enjoyable learning experience
[03:10:55] djbkd: has joined #ruby
[03:12:41] bungoman: has joined #ruby
[03:13:46] mistermocha: has joined #ruby
[03:14:02] werelivinginthef: has joined #ruby
[03:14:28] tkuchiki: has joined #ruby
[03:15:00] braincrash: has joined #ruby
[03:16:45] nathan: has joined #ruby
[03:19:54] t3k: has joined #ruby
[03:22:51] Sehryn: has joined #ruby
[03:24:49] astrobun_: has joined #ruby
[03:31:17] Spami: has joined #ruby
[03:36:23] Channel6: has joined #ruby
[03:36:28] dellavg: has joined #ruby
[03:39:45] slumos: has joined #ruby
[03:41:00] gix: has joined #ruby
[03:42:00] dgutierrez1287: has joined #ruby
[03:42:08] bronson: has joined #ruby
[03:42:13] aryaching: has joined #ruby
[03:45:59] penzur: has joined #ruby
[03:48:14] sharpmachine: has joined #ruby
[03:49:01] sebbers_: has joined #ruby
[03:50:14] jimmiejohnson48: has joined #ruby
[03:50:45] jimmiejohnson48: has left #ruby: ()
[03:50:56] j_mcnally: has joined #ruby
[03:51:00] momomomomo: has joined #ruby
[03:51:46] j_mcnally: has joined #ruby
[03:52:00] aryaching: has joined #ruby
[03:53:02] hotpancakes: has joined #ruby
[03:53:20] xxneolithicxx: has joined #ruby
[03:54:02] Soda: has joined #ruby
[03:55:20] bronson_: has joined #ruby
[03:57:25] RegulationD: has joined #ruby
[03:59:45] bhuvanaurora: has joined #ruby
[03:59:46] bhuvan_aurora: has joined #ruby
[04:01:21] christiandsg: has joined #ruby
[04:01:36] bungoman: has joined #ruby
[04:03:06] tvw: has joined #ruby
[04:04:55] metus: has joined #ruby
[04:04:57] Igorshp: has joined #ruby
[04:05:34] jfarmer: has joined #ruby
[04:07:32] j_mcnally: has joined #ruby
[04:07:41] swgillespie: has joined #ruby
[04:07:59] garysollin: has joined #ruby
[04:08:16] GriffinHeart: has joined #ruby
[04:10:37] workmad3: has joined #ruby
[04:10:43] casadei_: has joined #ruby
[04:13:04] garysollin: what we doing here
[04:14:20] t0rrieri: has joined #ruby
[04:15:48] nathan: has joined #ruby
[04:15:51] Scripore: has joined #ruby
[04:15:51] ivanskie: has joined #ruby
[04:16:38] nathan: has left #ruby: ()
[04:17:50] sigurding: has joined #ruby
[04:19:35] blokc: asking and answering questions
[04:19:39] jenrzzz: has joined #ruby
[04:19:40] blokc: chatting the general
[04:19:45] blokc: things of ruby and whatnot
[04:19:57] blokc: working on anything interesting with Ruby?
[04:19:57] jesterfraud: that and reusing terribly old IRC tropes
[04:20:01] jesterfraud: ACTION slaps blokc around a bit with a large trout
[04:20:31] blokc: righto, that's the spirit
[04:20:39] garysollin: learning from the begining with ruby
[04:20:53] blokc: very nice. can I recommend some sites and books?
[04:21:50] garysollin: yea, if something like the webside, or everything else, that will be awesome
[04:21:58] mistermocha: has joined #ruby
[04:22:13] blokc: http://tryruby.org/
[04:22:29] blokc: by the lucky stiff (and friends) is a classic
[04:23:01] blokc: the go to book I read once a week is 'Elegant Ruby' by Russ Olsen.
[04:23:16] blokc: That book will more than anything help you right in the style of Ruby.
[04:23:32] blokc: So if you're coming from another language that'll help.
[04:23:46] garysollin: great, I kind of like the interface
[04:24:41] sevenseacat: jesterfraud: lol
[04:25:03] GriffinHeart: has joined #ruby
[04:25:55] garysollin: learn by doing, lol
[04:27:20] blokc: makes sense to me. also key is to have fun.
[04:29:16] mistermocha: has joined #ruby
[04:29:49] garysollin: gotta work now, good luck guys
[04:30:55] iateadonut: has joined #ruby
[04:33:50] lessless: has joined #ruby
[04:33:59] lessless: has left #ruby: ()
[04:34:14] wallerdev: has joined #ruby
[04:38:36] balazs: has joined #ruby
[04:41:22] ohaibbq: has joined #ruby
[04:41:26] kfpratt: has joined #ruby
[04:42:10] Aeyrix: wtf bundler is being a little shit
[04:42:13] Aeyrix: demanding sudo
[04:42:24] blokc: could be permissions on your gem dir
[04:42:31] blokc: that's happened to me once
[04:42:36] jhwhite: has joined #ruby
[04:42:48] hotpancakes: has joined #ruby
[04:42:51] Aeyrix: Nah it's because this isn't my server.
[04:43:22] Aeyrix: fixed with `bundle install --path ~/.gem`
[04:43:40] Aeyrix: although this is probably going to break something fierce when I try and use system ruby with user gems.
[04:44:15] Azulinho: has joined #ruby
[04:45:09] mistermocha: has joined #ruby
[04:45:15] rickmasta: has joined #ruby
[04:45:55] GriffinHeart: has joined #ruby
[04:46:10] Aeyrix: what's your blog post url again
[04:46:15] Aeyrix: i actually need it for this stupid box
[04:46:21] Radar: Aeyrix: Google "Ryan Bigg ubuntu"
[04:46:22] Radar: first result
[04:47:08] sevenseacat: you're internet famous!
[04:47:15] Aeyrix: son of a bitch
[04:47:18] Aeyrix: oh christ, okay, so here's my issue
[04:47:24] Aeyrix: there's a system ruby installed already that I can't touch
[04:47:25] Aeyrix: I can't remove it
[04:47:28] Aeyrix: ruby 1.9.1
[04:47:41] Radar: Can't touch it? Why not?
[04:47:46] Aeyrix: Because this isn't my server.
[04:47:48] Aeyrix: I am but a tenant.
[04:47:55] Radar: Oh right, you've hacked into someone else's server :P
[04:47:59] Aeyrix: Actually no.
[04:48:06] Radar: Install ruby-install + chruby as your user.
[04:48:22] Aeyrix: Just throw them in ~/bin or something?
[04:48:24] Radar: It'll install all your gems in your home directory.
[04:48:35] Aeyrix: nvm misread
[04:48:39] Radar: Aeyrix: It will install it on a user-level unless you specify --system.
[04:48:41] Aeyrix: disregard me im shit
[04:48:46] Radar: hah no you're not
[04:48:48] Aeyrix: also does bundler install gems systemwide by default?
[04:49:01] Aeyrix: it appears to do so, isn't that bad practice according to basically everybody?
[04:49:03] Aeyrix: (inc. me)
[04:49:15] Radar: No, bundler installs them depending on your Ruby install. Use ruby-install + chruby and make sure that `which bundler` shows the one coming from your home directory and it should be fine.
[04:49:35] Radar: i.e. on my machine: `which ruby` shows as: /Users/ryanbigg/.rubies/ruby-2.2.2/bin/ruby
[04:49:50] Aeyrix: elliot@vega:~ $ which ruby
[04:49:56] Aeyrix: /usr/local/bin/ruby
[04:49:57] Radar: `which bundler` shows as /Users/ryanbigg/.gem/ruby/2.2.2/bin/bundler
[04:50:02] Aeyrix: Thanks homebrew!
[04:50:07] Radar: Do you chruby+ruby-install setup?
[04:50:15] Aeyrix: Nah this is my dev box - homebrew.
[04:50:15] Radar: Could be that chruby's autoswitching isn't turned on by default
[04:50:19] Aeyrix: Because I know I can nuke it at any time.
[04:50:26] Aeyrix: Servers I use your guide.
[04:50:40] Aeyrix: I'm gonna bash script that entire guide
[04:50:45] Aeyrix: out of pure laziness
[04:50:47] Radar: I'm writing a new guide atm for servers.
[04:51:04] Radar: https://gist.github.com/radar/5087f5210b13989af185
[04:51:10] Radar: Uses ruby-install + apache + Passenger
[04:51:17] Radar: Because it's simple
[04:51:21] Aeyrix: Is 0.5.0 the latest ruby-install still or something?
[04:51:32] Aeyrix: Can you encourage people to use our preference instead? :P
[04:51:39] Aeyrix: it's kind of cleaner, and nginx config really isn't hard
[04:51:40] Radar: another version of the guide would use nginx+unicorn :)
[04:52:51] Scroff: has joined #ruby
[04:53:34] Aeyrix: ruby-install ruby
[04:53:34] Aeyrix: >>> Installing ruby 2.1.3
[04:53:35] ruboto: Aeyrix # => /tmp/execpad-25372ae30b51/source-25372ae30b51:2: syntax error, unexpected '>' ...check link for more (https://eval.in/394613)
[04:53:37] Aeyrix: hshiiiiiieeeeet
[04:53:49] Radar: 2.1.3? wtf m8
[04:53:53] Radar: ruby-install ruby 2.2.2
[04:53:58] allomov: has joined #ruby
[04:54:05] Aeyrix: It asked for sudo.
[04:54:12] Oog: has joined #ruby
[04:54:20] Radar: it might be trying to install packages?
[04:54:36] Aeyrix: looks like i'll have to add this user to sudo
[04:54:43] zacstewart: has joined #ruby
[04:55:04] Aeyrix: >>> Installing ruby 2.2.2 into /home/arachni/.rubies/ruby-2.2.2 ...
[04:55:05] ruboto: Aeyrix # => /tmp/execpad-0744fa245968/source-0744fa245968:2: syntax error, unexpected '>' ...check link for more (https://eval.in/394614)
[04:55:11] Radar: shut up ruboto
[04:55:15] Radar: the humans are talking
[04:55:18] Aeyrix: My fault, sorry.
[04:55:23] Radar: All good.
[04:57:00] Aeyrix: vsnprintf.c:822:8: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
[04:57:26] LucasTT: has joined #ruby
[04:57:31] dopie: has joined #ruby
[04:57:32] Radar: patches welcome :D
[04:58:01] Radar: lucas__: yes hello this is dog
[04:58:02] Aeyrix: Yo lucas__ .
[04:58:27] LucasTT: Hey, is this a place where I can get some ruby help? I've been pounding my head on my desk on some homework lately
[04:58:39] LucasTT: holy moly thank goodness haha
[04:59:25] LucasTT: So, I've been trying to make a stupid mode calculator. I'm sorry if this is like, beginner stuff... I'm trying to learn
[05:00:16] LucasTT: should I just copy and paste what I have? I mean, it's super close, but I am a little hung up on the last part.
[05:00:18] baweaver: How dare you ask
[05:00:18] Aeyrix: @lucas__: We'll field any questions as long as there's a will to learn. :D
[05:00:25] Radar: lucas__: !gist
[05:00:25] helpa: lucas__: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[05:00:27] Radar: lucas__: ?gist
[05:00:35] baweaver: third time's a charm there
[05:00:36] Radar: Argh what's the command
[05:00:41] Radar: https://gist.github.com
[05:00:46] Radar: lucas__: Put your code there + give us the link
[05:01:00] Aeyrix: Help us help you! We need to see what you've tried. Push your code to https://gist.github.com/.
[05:01:03] Aeyrix: [ruboto intensifies ]
[05:01:10] LucasTT: https://gist.github.com/lucasrim/f4c7533394a66febf162
[05:01:18] mleung: has joined #ruby
[05:02:02] LucasTT: so, basically, here's the logic here. So, it takes an input of mode([5, 4, 3, 1, 1]) right? And it inputs all the values into the hash. then so the values of the hash is at a default 0, and it counts one by one
[05:02:56] LucasTT: and then it will return the value with the highest number. So I feel like I'm close... But the assignment says the output only should give back the "1", and not [0] 1, [1] 2
[05:03:00] LucasTT: I hope that makes sense....
[05:03:01] christiandsg: has joined #ruby
[05:03:56] LucasTT: and so i was thinking, well, it'll give back x, y, and so I just want the x, so I put in the .select... but that doesn't work, I guess
[05:04:02] sigurding: has joined #ruby
[05:04:24] bruno-: has joined #ruby
[05:04:31] mjuszczak: has joined #ruby
[05:04:34] bronson: has joined #ruby
[05:04:50] Aeyrix: Radar: `which bundle`
[05:05:00] Aeyrix: Mine's /usr/bin/bundle :(
[05:05:51] Radar: Aeyrix: chruby autoswitching turned on?
[05:05:59] LucasTT: I'm sorry?
[05:06:03] Aeyrix: $ ruby -v
[05:06:03] Aeyrix: ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux]
[05:06:15] Aeyrix: lucas__: He's talking to me, sorry. Resolving a separate issue at the same time.
[05:06:27] LucasTT: oh oh oh, no no! please don't let me interrupt
[05:06:38] Aeyrix: We can multitask. ;)
[05:06:39] bhuvanaurora: has joined #ruby
[05:06:41] Radar: lucas__: I can multithread, unlike Ruby
[05:06:43] LucasTT: I am gonna keep working on this! but I'll interrupt
[05:06:43] Radar: oooohhh burn
[05:06:50] Radar: lucas__: What should that produce?
[05:07:00] rht: has joined #ruby
[05:07:18] LucasTT: so.... what it should produce right now is:
[05:07:25] Radar: I'm guessing 1
[05:07:48] Radar: irb(main):008:0> mode [5,4,3,1,1]
[05:07:49] Radar: => [5, 1]
[05:07:52] LucasTT: but, I guess my frustrations are just.... I only need it to give me the 1
[05:08:17] bhuvan_aurora: has joined #ruby
[05:08:19] LucasTT: and I guess I just don't understand .select enough. the fool i am
[05:09:01] baweaver: >> puts "Radar, you can eval here"
[05:09:02] ruboto: baweaver # => Radar, you can eval here ...check link for more (https://eval.in/394619)
[05:09:06] Radar: baweaver: not a whole method
[05:09:24] baweaver: >> def lol; 'you sure?' end; lol
[05:09:25] ruboto: baweaver # => "you sure?" (https://eval.in/394620)
[05:09:31] Radar: Over multiple lines
[05:09:41] baweaver: there we go
[05:09:59] baweaver: Ox0dea has some oneliners though :P
[05:10:16] blokc: lucas__: looked at ruby docs on .select?
[05:10:29] blokc: http://ruby-doc.org/core-2.2.2/Enumerable.html
[05:10:38] blokc: best place to find yourself with a method you don't understand.
[05:10:43] blokc: that and here
[05:12:37] wallerdev: has joined #ruby
[05:12:54] lkba: has joined #ruby
[05:13:08] chrissonar: has joined #ruby
[05:13:18] LucasTT: hmm.... yeah, I guess my question is... I wasn't sure select would be the right method to use, but I really don't know what else to use here. I guess I just want a part of the output it's giving me, and I don't really know how to specify like, ruby, just give me this part
[05:13:43] LucasTT: I guess select is more like, if x is _____, then we will select it
[05:13:53] LucasTT: and i guess what i put in doesn't really follow that formula?
[05:14:02] Radar: result.max will return the wrong value I think
[05:14:07] Radar: Sorry, hash.max
[05:14:51] Radar: hash.to_a.sort { |k,(a,b)| a <=> b }.last
[05:14:55] Radar: That's my first attempt
[05:14:55] Aeyrix: help i've fallen and i can't get up
[05:14:58] Radar: There's a better way
[05:15:07] eggoez: has joined #ruby
[05:15:26] LucasTT: hmm.you know what. i think you're right. that would return the highest value in the hash.
[05:15:27] Radar: result.sort_by { |k,v| v } .last
[05:15:41] sevenseacat: ACTION picks Aeyrix up
[05:15:46] Aeyrix: Thank. :>
[05:15:51] Radar: That returns a 2-D array of the hash, with the value that appears the most being the last element of that array
[05:16:01] Radar: result.sort_by { |k,v| v }.last => [1,2]
[05:16:07] Radar: Which tells you that 1 appeared twice
[05:16:58] LucasTT: ohhh i see i see
[05:17:14] LucasTT: can you explain what a <=> b does?
[05:18:12] LucasTT: oh never mind i found something to read up on it
[05:18:23] LucasTT: I'm going to read this and then i'll get back on here
[05:18:59] iwishiwerearobot: has joined #ruby
[05:19:29] Aeyrix: ACTION is lost with this shit.
[05:19:32] Aeyrix: I think I broke something.
[05:19:44] Radar: Aeyrix: Walk me through it?
[05:19:50] blokc: Excellent, now learn how to break it some more.
[05:19:53] Aeyrix: Radar: https://gist.github.com/Aeyrix/79529820c97e49cea4be
[05:19:56] Aeyrix: blokc: My day job is breaking shit
[05:19:59] Aeyrix: that's why i'm confused
[05:19:59] blokc: err fix it. I meant fix it.
[05:20:07] Radar: Aeyrix: Did you install Bundler first?
[05:20:12] Aeyrix: Radar: yes
[05:20:20] Radar: Aeyrix: `which gem`?
[05:20:34] Aeyrix: $ which gem && which bundle
[05:20:40] Aeyrix: goddamn preslash
[05:20:41] ndrei: has joined #ruby
[05:20:53] Aeyrix: https://gist.github.com/Aeyrix/c00a360ed0ec3813465e
[05:21:04] Radar: yeah, that's weird
[05:21:13] mattp__: has joined #ruby
[05:21:15] Aeyrix: rm -rf incoming
[05:21:28] Aeyrix: chruby only has 2.2.2
[05:21:29] Radar: seems legit
[05:21:32] Radar: gem install bundler again?
[05:21:58] Aeyrix: Goes into 2.2.0
[05:22:22] Aeyrix: /home/elliot/.gem/ruby/2.2.0/bin/bundle
[05:23:28] Radar: nuke it from orbit
[05:23:49] Aeyrix: starting again
[05:25:39] burgestrand: has joined #ruby
[05:26:14] eggoez: has joined #ruby
[05:26:57] GriffinHeart: has joined #ruby
[05:26:58] allomov: has joined #ruby
[05:28:08] hmnhf: has joined #ruby
[05:28:50] davedev24_: has joined #ruby
[05:30:30] Aeyrix: Radar: zzz
[05:30:31] Aeyrix: still broke
[05:30:36] Aeyrix: now installed in 2.2.2 but more path errors
[05:30:54] Radar: ACTION watches as Aeyrix rips off his face, to reveal he is really Miesco
[05:31:01] Aeyrix: https://gist.github.com/Aeyrix/5f979d6060bcb74c9261
[05:31:10] Aeyrix: I'D HAVE GOTTEN AWAY WITH IT TOO
[05:31:15] Aeyrix: IF IT WEREN'T FOR YOU TYRANNICAL OPERS
[05:32:02] Aeyrix: Oh wait, no, I lie
[05:32:03] Aeyrix: back in 2.2.0
[05:32:06] Aeyrix: why is it doing that?
[05:32:19] havenwood: Aeyrix: echo $GEM_HOME
[05:32:30] Aeyrix: .gem/ruby/2.2.2
[05:32:45] Aeyrix: ACTION is confused as to why it's not 2.2.2, as that's the only version installed.
[05:32:49] LucasTT: Hey Radar, so basically, the logic behind the <=> is so when the value of the mode is equal... It will say both? Is that right?
[05:32:53] havenwood: Aeyrix: gem env gemdir
[05:32:59] Aeyrix: Same, havenwood .
[05:33:15] Radar: lucas__: >> 1 <=> 2
[05:33:25] Radar: ACTION cannot please ruboto
[05:33:25] havenwood: Aeyrix: echo $GEM_PATH
[05:33:27] Aeyrix: >> 1 <=> 2
[05:33:28] ruboto: Aeyrix # => -1 (https://eval.in/394635)
[05:33:38] arup_r: has joined #ruby
[05:33:38] Radar: >> 2 <=> 1
[05:33:39] ruboto: Radar # => 1 (https://eval.in/394636)
[05:33:42] Radar: >> 1 <=> 1
[05:33:43] ruboto: Radar # => 0 (https://eval.in/394637)
[05:33:50] Radar: lucas__: does that make more sense?
[05:33:50] Aeyrix: havenwood: /home/elliot/.gem/ruby/2.2.2:/home/elliot/.rubies/ruby-2.2.2/lib/ruby/gems/2.2.0
[05:34:11] Radar: Aeyrix: I think that's correct. All 2.2.0 gems are compatible with all other 2.2.2 gems.
[05:34:18] stardiviner: has joined #ruby
[05:34:26] havenwood: 2.2.0 is the ABI
[05:34:31] Radar: Aeyrix: gist `gem env`?
[05:35:12] Aeyrix: https://gist.github.com/Aeyrix/a0f0018ad166ea8b1c54
[05:35:27] khebbie: has joined #ruby
[05:35:43] Radar: - "gem" => "--user-install --no-documentation"
[05:35:46] Radar: Why the --user-install option?
[05:35:50] LucasTT: Yeah that makes sense.... Maybe I'm focusing on the wrong thing here
[05:36:02] Aeyrix: Radar: Because under no circumstances do I want to pollute anywhere other than ~
[05:36:15] pengin: has joined #ruby
[05:36:15] Radar: Aeyrix: It won't because the gem paths are set to your home directory.
[05:36:21] Aeyrix: So redundant?
[05:36:25] timonv: has joined #ruby
[05:36:27] Radar: Aeyrix: I'm guessing so.
[05:37:09] Aeyrix: what the fuck
[05:37:10] Aeyrix: removed it
[05:37:11] Aeyrix: it worked
[05:37:15] Aeyrix: ??????????
[05:37:26] Aeyrix: ????????????????????????????????
[05:37:40] Aeyrix: Thanks y'all.
[05:37:48] Aeyrix: Noooo idea why, but hey.
[05:37:57] sevenseacat: btw Radar's paypal address is... something <_<
[05:38:14] Radar: radarlistener@gmail.com
[05:38:16] Aeyrix: I still owe him for the new book.
[05:38:17] flughafen: radarlove@gmail.com
[05:38:19] Aeyrix: I just haven't gotten around to buying it.
[05:38:20] Radar: I also accept hugs.
[05:38:23] yardenbar: has joined #ruby
[05:38:29] havenwood: See: https://github.com/rubygems/rubygems/issues/1049
[05:38:31] Aeyrix: Radar: Next meetup, hugs it is.
[05:38:39] Aeyrix: I am hug enthusiast.
[05:38:55] Aeyrix: I would've said connoisseur but I had to Google the spelling.
[05:38:57] Radar: Aeyrix: If that --user-install option wasn't it then I would've had no clue at all
[05:39:04] Radar: it was the only thing that was different to my setup
[05:39:27] hotpancakes: has joined #ruby
[05:39:34] LucasTT: oh hey, I'm really grateful for the help! let me send ya a little somethin
[05:39:41] Radar: lucas__: awww thanks :D
[05:39:45] havenwood: Aeyrix: It'll work in the mysterious future. Need some RubyGems side changes first.
[05:39:46] bluOxigen: has joined #ruby
[05:41:16] riotjones: has joined #ruby
[05:41:29] LucasTT: Hey, can I ask one more question?
[05:42:01] Radar: Thanks lucas__ :)
[05:42:02] blokc: this is a choose your own adventure
[05:42:05] astrobun_: has joined #ruby
[05:42:09] LucasTT: I choose yes
[05:42:16] sevenseacat: ACTION turns to page 53
[05:42:28] LucasTT: did I die?
[05:42:40] blokc: nope, just some pages turned.
[05:42:47] havenwood: Aeyrix: Here's the issue to watch if you want to know when it's resolved. But it'll follow the upstream RubyGems issue above.
[05:42:51] blokc: great question
[05:42:51] havenwood: Aeyrix: https://github.com/postmodern/chruby/issues/235
[05:43:41] blokc: Ok I'm out \wave
[05:45:04] mhib: has joined #ruby
[05:45:13] havenwood: --env-shebang default ftw
[05:45:40] solars: has joined #ruby
[05:46:21] RegulationD: has joined #ruby
[05:47:13] wallerdev: has joined #ruby
[05:48:13] LucasTT: https://gist.github.com/lucasrim/d11b591988750960accd I guess I'm still having problems with my original question... if the input were mode([5, 4, 1, 1] it would output [0] 1, [1] 2, but I really only want the 0 line. is there a way to speicfy which part of the hash i want returned?
[05:48:21] dopieee: has joined #ruby
[05:48:52] mistermocha: has joined #ruby
[05:49:03] Xoro: has joined #ruby
[05:49:45] sharpmachine: has joined #ruby
[05:50:19] Ilyas: has joined #ruby
[05:50:48] burgestrand: lucas__: you want the number only, not its' count?
[05:52:17] mistermocha: has joined #ruby
[05:52:34] burgestrand: lucas__: yes there is a way, thing is, as soon as you've done to_a, it's no longer a hash, it's an array of [key, values], I'm guessing you've observed this?
[05:52:49] burgestrand: Sorry, bad pluralisation, [key, value]
[05:53:34] LucasTT: ahhhh you're right. you're right. yeah i want to return it as a hash, so I can just take that out.
[05:54:12] railsraider: has joined #ruby
[05:54:36] burgestrand: lucas__: so you go from [5, 4, 1, 1], into hash { 5 => 1, 4 => 1, 1 => 2 }, into array with to_a, [[5, 1], [4, 1], [1, 2]], you sort it (happens to end up in same order), and pick the last element, [1, 2]
[05:55:05] burgestrand: lucas__: (hint) your final step is you want the first element of that final result
[05:55:15] niemcu: has joined #ruby
[05:55:21] tagrudev: has joined #ruby
[05:55:39] Oog: has joined #ruby
[05:55:41] allomov: has joined #ruby
[05:56:10] Radar: first element or last element?
[05:56:17] Radar: ACTION reads again
[05:56:23] LucasTT: so can I just do... an .at(0) ?
[05:56:24] burgestrand: it wants the key
[05:56:31] Radar: lucas__: [0] is shorter :)
[05:56:57] burgestrand: lucas__: yes, there's also a .first that you can use, very similar to .last, except it's??? first :)
[05:57:10] aganov: has joined #ruby
[05:57:56] LucasTT: ohhh... So if I used [0], and if there was more than one mode.... would it return just the 1?
[05:58:27] burgestrand: lucas__: what is a mode, is each of 5, 4, 1, 1 a mode?
[05:58:45] LucasTT: no no, so i'm looking for the mode, so the mode would be 1
[05:59:01] burgestrand: lucas__: I don't know what a mode is.
[05:59:12] LucasTT: ohhh a mode is the number in the sequence that occurs most often
[05:59:22] workmad3: has joined #ruby
[05:59:34] LucasTT: so... if the input was 5, 4, 1, 1, 5, the mode would be both 5 and 1
[05:59:49] burgestrand: lucas__: so if there's a tie in the number of occurrences you want them all?
[06:00:01] Radar: that'd made it bimodal
[06:00:13] Radar: multimodal!
[06:00:15] Radar: MULTIBALL
[06:00:18] eGGsha: has joined #ruby
[06:00:47] Oog: has joined #ruby
[06:00:49] burgestrand: Getting all of them makes the problem so much trickier I guess. :)
[06:01:02] LucasTT: ideally. yeah. or however many ___modal...
[06:01:17] Radar: Not that much tricker
[06:01:20] LucasTT: m-m-m-m-monster modal
[06:01:30] Radar: Find the maximum count, then find all other keys in the hash with that value
[06:01:34] burgestrand: It's all relative to how accustomed you are to the programming and language
[06:01:48] Carnage\: has joined #ruby
[06:01:53] LucasTT: almost completely new.... this would be about 1 week in to learning :\
[06:02:00] LucasTT: on my own.
[06:02:07] burgestrand: lucas__: I believe it'd help with your understanding if you split up all your method calls into one line each, so you could observe what it looks like at every step
[06:02:13] burgestrand: lucas__: http://ideone.com/ca71sR
[06:02:18] LucasTT: so I'm not very good :(
[06:04:13] burgestrand: lucas__: so there's always multiple ways of doing this. Since you have an array in the end, there's no good way to just "pick this key" or "pick this count" from it, you'll need to walk through the list and pick out the parts you want.
[06:04:56] burgestrand: lucas__: because it's sorted, the items you want (those sharing the highest mode) will always be at the end of the list, you'll have at least one but you could have many.
[06:05:15] jacaballero: has joined #ruby
[06:07:20] LucasTT: okay. so... Uh okay, I think I have a better answer.... Give me one second to write this out
[06:07:23] rushed: has joined #ruby
[06:07:23] LucasTT: then i'll type it
[06:07:33] burgestrand: lucas__: I'll be here for at least 8 hours more, no hurry ;)
[06:08:54] allomov: has joined #ruby
[06:09:05] mistermocha: has joined #ruby
[06:09:51] LucasTT: Burgerstand: just checking if this works
[06:09:54] burgestrand: lucas__: there's a bug in your current code as well, but it might disappear if you retype your solution, we'll see :)
[06:09:55] balazs: has joined #ruby
[06:10:34] LucasTT: I'm gonna start from scratch, if you don't mind. Honestly, I've been staring at this code for 2 hours, and I would like to just start again.
[06:10:53] riotjones: has joined #ruby
[06:10:54] tkuchiki: has joined #ruby
[06:11:11] howdoi: has joined #ruby
[06:12:24] TinkerTyper: has joined #ruby
[06:13:06] arturaz: has joined #ruby
[06:14:45] Macaveli: has joined #ruby
[06:14:54] ivanskie: has joined #ruby
[06:17:52] LucasTT: also I'm not sure if that's the correct way to blip you.... I haven't really used irc
[06:18:10] Radar: lucas__: Type the first couple of characters of someone's name and hit tab
[06:18:12] Aeyrix: lucas__: Just type their name, or type some of it and press TAB.
[06:18:21] yeticry: has joined #ruby
[06:18:48] christiandsg: has joined #ruby
[06:18:50] burgestrand: Tap completion is very useful when you have a name that looks like burgerstand, but isn't ;).
[06:18:54] Xeago: has joined #ruby
[06:19:43] Aeyrix: ACTION actually thought it was Burgerstand.
[06:20:22] shevy: mhhmmm burgers
[06:20:30] shevy: this is strange, #ruby is a channel that makes me hungry
[06:20:54] LucasTT: hey i think i got it actually
[06:20:54] El3ktra: has joined #ruby
[06:21:27] LucasTT: let me write in some comments to explain my thoughts i guess
[06:21:32] hotpancakes: has joined #ruby
[06:26:53] icosa1: has joined #ruby
[06:28:27] Asher: has joined #ruby
[06:30:34] joonty: has joined #ruby
[06:32:59] burgestrand: A nice part about this channel is that you sometimes get small fun problems to solve, it's therapeutic.
[06:33:18] burgestrand: Writing ruby code just for the sake of throwing it away once done.
[06:33:48] roolo: has joined #ruby
[06:34:07] astrobun_: has joined #ruby
[06:37:06] shevy: for that purpose I usually store that ruby code in a .rb file, so that I can invoke it lateron through a call again, by calling the method there
[06:37:16] baweaver: Wow, Twitter must be Nirvana then
[06:37:39] LucasTT: Burgestrand https://gist.github.com/lucasrim/409bf8d10523b4dc5a81
[06:37:41] baweaver: they throw out lots of Ruby code :troll:
[06:38:22] burgestrand: lucas__: yeah, looks good, well done :)
[06:38:48] LucasTT: cool! very happy. Thank you guys so much! Radar and Burgestrand
[06:39:21] Radar: No worries mate :)
[06:40:19] roolo_: has joined #ruby
[06:40:37] shevy: we use a radar to find a burger...
[06:41:38] Scroff: has joined #ruby
[06:41:38] LucasTT: has joined #ruby
[06:41:44] ndrei: has joined #ruby
[06:42:08] dgutierrez1287: has joined #ruby
[06:42:39] bronson: has joined #ruby
[06:42:50] burgestrand: lucas__: in case you're interested, I also made one, https://repl.it/vu0, I wanted to try and reduce the number of iterations to a minimum
[06:43:27] jhwhite: has joined #ruby
[06:44:02] baweaver: group_by is a thing
[06:44:23] burgestrand: There are many things!
[06:44:35] baweaver: >> ["a", "b", "c", "c", "a"].group_by(&:itself)
[06:44:36] ruboto: baweaver # => {"a"=>["a", "a"], "b"=>["b"], "c"=>["c", "c"]} (https://eval.in/394669)
[06:45:26] jas02: has joined #ruby
[06:45:29] krz: has joined #ruby
[06:45:35] Bitcrusher01: has joined #ruby
[06:45:39] lucasicf: has joined #ruby
[06:47:45] baweaver: >> ["a", "b", "c", "c", "a"].group_by(&:itself).values.max_by(&:size) # though that ignores c
[06:47:46] ruboto: baweaver # => ["a", "a"] (https://eval.in/394673)
[06:47:50] andikr: has joined #ruby
[06:47:58] burgestrand: baweaver: yeah we can't have that.
[06:47:59] LucasTT: I am not familiar with "require 'set'" so I'm gonna read up on it now!
[06:48:11] burgestrand: lucas__: it's like an array, but it cannot contain duplicates.
[06:48:39] burgestrand: lucas__: and also it does not have an order, so there is no first element for example.
[06:49:17] Ox0dea: has joined #ruby
[06:49:24] jfarmer: has joined #ruby
[06:49:39] Ox0dea: Burgestrand: For what it's worth, Ruby's Set is a wrapper around Hash, and Ruby's hashes do preserve insertion order.
[06:49:57] sevenseacat: (unless you're using ruby < 1.9 iirc)
[06:49:59] burgestrand: Ox0dea: indeed, but Set is semantically not ordered, there's SortedSet for that.
[06:50:30] Ox0dea: Fair enough.
[06:50:31] rdark: has joined #ruby
[06:50:49] baweaver: >> ["a", "b", "c", "c", "a"].group_by(&:itself).map { |k,v| [k,v.size] } # gives you counts
[06:50:50] ruboto: baweaver # => [["a", 2], ["b", 1], ["c", 2]] (https://eval.in/394674)
[06:50:59] sharpmachine: has joined #ruby
[06:51:07] Ox0dea: The mode is the mean of the most frequently occurring element(s), is it not?
[06:51:37] Ox0dea: What's the mean of 'a' and 'b'? :)
[06:51:59] LucasTT: okay, I think I got it!
[06:52:16] LucasTT: Burgestrand Is there any way I can get you back?
[06:52:27] burgestrand: lucas__: Back?
[06:52:37] LucasTT: hmm.. like a paypal or something
[06:52:40] LucasTT: your help has been invaluable
[06:52:50] burgestrand: lucas__: ah, buy some strawberries and enjoy them
[06:53:11] LucasTT: :) thanks again! I've gotta head to bed now!
[06:53:17] Ox0dea: lucas__: But the mean!
[06:53:21] baweaver: pretty much just pay things forward
[06:53:36] codecop: has joined #ruby
[06:53:39] codecop_: has joined #ruby
[06:53:44] LucasTT: I'll try, I feel i'll have to learn a lot more before I feel useful
[06:54:07] mike___1234: has joined #ruby
[06:54:19] burgestrand: lucas__: if you meet yourself from one week ago in somebody else you can already be useful ;)
[06:54:24] fabrice31: has joined #ruby
[06:54:47] LucasTT: goodnight y'all
[06:54:51] konsolebox: has joined #ruby
[06:55:43] Ox0dea: baweaver: Reckon it's possible to get input a line at a time? I can do [*$<] to grab ARGF.lines, but then no interactivity. :/
[06:56:32] fabrice31: has joined #ruby
[06:56:44] baweaver: unless you can loop it somehow
[06:56:49] Ox0dea: It blocks.
[06:57:09] baweaver: ah, also writing a ruby book because fun
[06:58:06] randiman: has joined #ruby
[06:58:07] haxrbyte: has joined #ruby
[06:58:09] Ox0dea: baweaver: It's going to be a cross between __ and __, and maybe a little __.
[06:58:13] baweaver: and because apparently writing a 500+ page fiction book wasn't masochistic enough
[06:59:29] devbug_: has joined #ruby
[07:01:37] Ox0dea: No direct influences, then?
[07:02:25] Macaveli: has joined #ruby
[07:02:41] warriorkitty: has joined #ruby
[07:03:24] warriorkitty: Hi all. I need to get the time in New York (different time zone than mine)? What would be the easiest way? New York is in UTC-4 timezone. Thank you very much.
[07:05:35] iamninja: has joined #ruby
[07:05:37] eGGsha: has joined #ruby
[07:05:40] burgestrand: warriorkitty: I'm assuming you want it through ruby, and not by googling "time in new york"?
[07:05:57] warriorkitty: Burgestrand: Yes. :)
[07:06:15] warriorkitty: Burgestrand: http://api.rubyonrails.org/classes/ActiveSupport/TimeZone.html#method-i-parse Something like this?
[07:06:29] burgestrand: warriorkitty: are you using Rails?
[07:06:46] warriorkitty: Burgestrand: Yes, I'm doing it through rake as a task.
[07:07:40] gagrio: has joined #ruby
[07:07:43] iwishiwerearobot: has joined #ruby
[07:07:49] krz: has joined #ruby
[07:07:50] burgestrand: warriorkitty: in that case yes, that documentation is where you should look. I'm not sure I feel good setting it globally through Time.zone, so I'd look for an alternative, but in a pinch that should do.
[07:08:03] warriorkitty: Burgestrand: Thank you.
[07:10:38] tno: has joined #ruby
[07:11:50] jenrzzz: has joined #ruby
[07:14:24] jacaballero: has joined #ruby
[07:14:40] bhuvan_aurora: has joined #ruby
[07:15:14] bhuvanaurora: has joined #ruby
[07:16:28] Xeago: has joined #ruby
[07:16:44] ta: has joined #ruby
[07:17:37] jacaballero: has joined #ruby
[07:18:34] blueOxigen: has joined #ruby
[07:19:55] mistermocha: has joined #ruby
[07:20:53] unshadow: has joined #ruby
[07:23:49] dumdedum: has joined #ruby
[07:24:07] lxsameer: has joined #ruby
[07:24:15] t3k: has joined #ruby
[07:25:20] slucx: has joined #ruby
[07:25:37] troulouliou_dev: has joined #ruby
[07:26:12] xcesariox: has joined #ruby
[07:26:25] olistik: has joined #ruby
[07:27:30] slucx: has joined #ruby
[07:27:33] Musashi007: has joined #ruby
[07:28:21] slucx: has left #ruby: ()
[07:29:42] kies^: has joined #ruby
[07:31:12] anaeem1: has joined #ruby
[07:31:48] bosma: has joined #ruby
[07:34:13] jacaballero: has joined #ruby
[07:35:13] RegulationD: has joined #ruby
[07:35:40] workmad3: has joined #ruby
[07:36:58] shevy: jhass, crystal would be faster for GUI stuff such as gtk bindings because it is compiled rather than interpreted, such as ruby, right?
[07:37:42] senayar: has joined #ruby
[07:37:52] Oog: has joined #ruby
[07:37:57] alphaatom: has joined #ruby
[07:38:20] arup_r: has joined #ruby
[07:39:23] arup_r: I am always getting `401` error.. I am sure username/password is correct.. as I can login using browser .. what wrong with my code ? https://gist.github.com/aruprakshit/611ec7128ed5bee1e842
[07:39:37] mistermocha: has joined #ruby
[07:39:46] t3k: has joined #ruby
[07:39:53] arup_r: I was following this example http://ruby-doc.org/stdlib-2.2.2/libdoc/net/http/rdoc/Net/HTTP.html#class-Net::HTTP-label-HTTPS
[07:40:19] ValicekB: has joined #ruby
[07:40:49] k3asd`: has joined #ruby
[07:40:51] k3asd`_: has joined #ruby
[07:40:56] jhass: shevy: s/for gui stuff//, it's just faster for pretty much everything
[07:41:10] burgestrand: arup_r: your 'xxx' and 'xxxx!' are proxy parameters.
[07:41:18] T3: has joined #ruby
[07:41:41] arup_r: ah I see http://ruby-doc.org/stdlib-2.2.2/libdoc/net/http/rdoc/Net/HTTP.html#method-c-start
[07:41:41] burgestrand: arup_r: is that correct, or do you want to do http auth?
[07:41:54] arup_r: sI want to do http auth
[07:41:58] burgestrand: arup_r: http://ruby-doc.org/stdlib-2.2.2/libdoc/net/http/rdoc/Net/HTTP.html#class-Net::HTTP-label-Basic+Authentication
[07:42:03] alphaatom: has joined #ruby
[07:42:08] ljarvis: yeah those are proxy credentials
[07:43:25] krz: has joined #ruby
[07:43:55] arup_r: thanks Burgestrand.. I misread the doco
[07:44:00] dumdedum: has joined #ruby
[07:44:03] msgodf: has joined #ruby
[07:48:33] casadei_: has joined #ruby
[07:48:42] senayar: has joined #ruby
[07:48:44] senayar: has joined #ruby
[07:49:29] white_bear: has joined #ruby
[07:49:57] senayar: has joined #ruby
[07:50:07] Xeago: has joined #ruby
[07:50:36] haxrbyte_: has joined #ruby
[07:51:46] sharpmachine: has joined #ruby
[07:52:18] vondruch: has joined #ruby
[07:52:25] livathinos: has joined #ruby
[07:52:27] Igorshp: has joined #ruby
[07:52:55] anaeem1: has joined #ruby
[07:54:20] Feyn: has joined #ruby
[07:54:37] ta: has joined #ruby
[07:56:25] Scroff: has joined #ruby
[07:58:24] blackmesa: has joined #ruby
[07:58:56] Xzanron: has joined #ruby
[08:05:46] workmad3: has joined #ruby
[08:06:14] krz: has joined #ruby
[08:07:33] christiandsg: has joined #ruby
[08:07:47] haraoka: has joined #ruby
[08:11:37] michael_mbp: has joined #ruby
[08:12:20] dhjondoh: has joined #ruby
[08:14:03] eGGsha: has joined #ruby
[08:14:27] jacaballero: has joined #ruby
[08:15:07] iwishiwerearobot: has joined #ruby
[08:17:56] Spami: has joined #ruby
[08:18:00] ndrei: has joined #ruby
[08:21:39] intinig: has joined #ruby
[08:22:18] DaniG2k: has joined #ruby
[08:22:26] doerteDev: has joined #ruby
[08:23:02] yfeldblum: has joined #ruby
[08:23:37] michael_mbp: has joined #ruby
[08:23:51] Hounddog: has joined #ruby
[08:24:49] neanias: yorickpeterse: mornen
[08:25:39] hotpancakes: has joined #ruby
[08:27:25] tomphp: has joined #ruby
[08:27:43] chthon: has joined #ruby
[08:27:51] Siyfion: has joined #ruby
[08:28:04] hmnhf: has joined #ruby
[08:29:57] bayed: has joined #ruby
[08:30:14] zacstewart: has joined #ruby
[08:31:52] allomov: has joined #ruby
[08:32:38] allomov_: has joined #ruby
[08:33:07] axl__: has joined #ruby
[08:35:37] rushed: has joined #ruby
[08:35:55] Zai00: has joined #ruby
[08:36:10] RegulationD: has joined #ruby
[08:38:35] Spami: has joined #ruby
[08:42:10] lee-jon: has joined #ruby
[08:44:30] jhwhite: has joined #ruby
[08:45:13] yeticry: has joined #ruby
[08:48:18] renderful: has joined #ruby
[08:48:33] GPrime: has joined #ruby
[08:49:54] mistermocha: has joined #ruby
[08:50:10] Spami: has joined #ruby
[08:50:10] ferr: has joined #ruby
[08:50:59] quimrstorres: has joined #ruby
[08:52:06] ringarin: has joined #ruby
[08:52:38] sharpmachine: has joined #ruby
[08:52:51] anisha: has joined #ruby
[08:52:56] lkba_: has joined #ruby
[08:53:11] lkba_: has joined #ruby
[08:56:08] willhumphreys: has joined #ruby
[08:56:21] penzurx: has joined #ruby
[08:57:33] [SaM]: has joined #ruby
[08:57:37] senayar: has joined #ruby
[08:57:40] Oog: has joined #ruby
[08:58:36] Igorshp: has joined #ruby
[08:59:47] olistik: has joined #ruby
[09:01:42] ndrei: has joined #ruby
[09:04:37] senayar: has joined #ruby
[09:05:54] bruno-: has joined #ruby
[09:08:10] GriffinHeart: has joined #ruby
[09:09:06] dgutierrez1287: has joined #ruby
[09:09:55] zacts: has joined #ruby
[09:10:15] sevenseacat: has joined #ruby
[09:13:30] DoubleMalt: has joined #ruby
[09:14:19] mistermocha: has joined #ruby
[09:14:22] yardenbar: has joined #ruby
[09:19:56] khebbie: has joined #ruby
[09:20:05] hmnhf: has joined #ruby
[09:20:24] hotpancakes: has joined #ruby
[09:22:49] quimrstorres: has joined #ruby
[09:23:10] chinmay_dd_: has joined #ruby
[09:24:35] quimrstorres: has joined #ruby
[09:24:39] shredding: has joined #ruby
[09:25:11] dionysus69: has joined #ruby
[09:26:13] Xeago: has joined #ruby
[09:26:20] senayar: has joined #ruby
[09:26:32] ytti: what time series database solution would you recommend for rubyist?
[09:26:44] ytti: preferably performant solution
[09:26:55] ytti: but so that I can interface it with good ruby library
[09:30:12] mhib: has joined #ruby
[09:31:48] senayar: has joined #ruby
[09:32:37] izzol: hmm, there is a simply way to return the value in rspec from the is_expected ?
[09:32:53] Zai00: has joined #ruby
[09:32:59] izzol: I mean, I have something like: it { is_expected. bla bla bla .config(nameserver: dns) }
[09:33:04] xcesariox: has joined #ruby
[09:33:08] yorickpeterse: ytti: PostgreSQL
[09:33:16] izzol: where dns is from each or from the method.
[09:33:34] Drakevr: has joined #ruby
[09:33:35] izzol: And on the result/ouput I have only "dns", instead of the real value.
[09:33:45] arup_r: has joined #ruby
[09:33:50] izzol: And in this case I don't see which DNS I'm quering :)
[09:34:05] sigurding: has joined #ruby
[09:34:05] maloik: izzol: I didn't quite get your question, best option is to post some real code
[09:34:31] ruboto: Please show your real code to illustrate your problem. Using fake code often hides it or won't bring up the best possible solution.
[09:35:25] penz: has joined #ruby
[09:36:07] eGGsha: has joined #ruby
[09:36:14] foooobear: has joined #ruby
[09:37:18] Drakevr: has joined #ruby
[09:37:27] casadei_: has joined #ruby
[09:38:43] izzol: https://gist.github.com/wolfedale/167e347aaf99c2b76923
[09:38:57] izzol: The problem is that I don't see my DNS server on the output.
[09:39:02] izzol: but just the 'dns'.
[09:39:24] izzol: so basicialy I would like to see: config(nameserver: 8.8.8.8)
[09:40:45] maloik: try this: describe "test_host with #{dns} as the server" do
[09:41:37] ljarvis: what even is this syntax
[09:41:38] izzol: I did that but it doens't work
[09:41:38] ljarvis: dammit rspec
[09:41:44] ljarvis: when i thought i knew you
[09:42:02] maloik: still using should?
[09:42:25] izzol: it works when I changed '' to ""
[09:42:58] izzol: cool, now I see what I want to see :P
[09:43:01] maloik: yes, that's how interpolation works ;-)
[09:43:03] izzol: thanks maloik
[09:44:14] hotpancakes: has joined #ruby
[09:44:31] bhuvan_aurora: has joined #ruby
[09:44:32] bhuvanaurora: has joined #ruby
[09:44:38] yorickpeterse: ljarvis: yeah, the it { ... } form is really confusing
[09:44:59] maloik: yea, there's that
[09:45:11] ytti: yorickpeterse, do you think postgres is good for large time series?
[09:45:13] maloik: we hardly ever use that except for with the "is expected to validate presence of" things
[09:45:22] ytti: yorickpeterse, like billions of entries?
[09:46:08] workmad3: has joined #ruby
[09:46:49] quimrstorres: has joined #ruby
[09:46:56] rodfersou: has joined #ruby
[09:47:25] maloik: ytti: at the risk of sounding incredulous, is that an actual problem right now? billions of entries sounds like quite a lot ;)
[09:47:27] yorickpeterse: ytti: do you actually need a database for that?
[09:47:41] yorickpeterse: as in, will you actually reach that scale within now and the next ~2 years?
[09:48:34] Oog: has joined #ruby
[09:49:33] dangerousdave: has joined #ruby
[09:49:34] yorickpeterse: yay floats: [array of lots of integers supposedly adding up to 100].sum # => 100.00000000000001
[09:49:45] yorickpeterse: but surely float + float _always_ give back consistent decimals right?
[09:50:16] ytti: maloik, yorickpeterse yes
[09:50:34] ytti: tsdb scale usually is trillions
[09:50:45] yorickpeterse: "usually" != your use case
[09:50:51] ytti: when you want to collect persistent metrics from many datapoints, very frequently, and store them for lon
[09:50:52] yorickpeterse: Either way, if the data is small Pg can probably handle it just fine
[09:51:13] ytti: i'm asking for tsdb, because i know the dataset will be very large
[09:51:19] yorickpeterse: If you need zomgscale you'll have to look into whatever timeseries DB out of many out there suits your needs
[09:51:36] ytti: yes, and that is what i was asking, if people here have recommendation
[09:51:45] yorickpeterse: Row counts doesn't really matter also
[09:51:52] yorickpeterse: it's the size of each row that you need to be worried about
[09:51:55] yorickpeterse: and how much you intend to index
[09:53:06] AlexAltea: has joined #ruby
[09:53:32] last_staff: has joined #ruby
[09:54:34] decoponyo: has joined #ruby
[09:56:18] christiandsg: has joined #ruby
[09:57:20] chinmay_dd: has joined #ruby
[09:57:30] decoponyo: has joined #ruby
[09:59:05] Spami: has joined #ruby
[09:59:58] decoponio: has joined #ruby
[10:01:38] felixr: has joined #ruby
[10:02:26] sharpmachine: has joined #ruby
[10:02:30] zacstewart: has joined #ruby
[10:03:18] konsolebox: has joined #ruby
[10:05:44] decoponio: has joined #ruby
[10:06:11] marr: has joined #ruby
[10:06:27] bronson: has joined #ruby
[10:07:18] Xeago: has joined #ruby
[10:07:56] konsolebox: has joined #ruby
[10:08:36] adamski2600: has joined #ruby
[10:10:49] maloik: Our SSL provider's API is being routed through CloudFlare and returning a ton of http 525 errors because CloudFlare can't complete the SSL handshake with the provider's servers... something is not right here :/
[10:11:40] platzhirsch: has joined #ruby
[10:12:51] konsolebox: has joined #ruby
[10:13:19] krz: has joined #ruby
[10:16:06] Scroff: has joined #ruby
[10:17:07] Macaveli: has joined #ruby
[10:17:54] Oog: has joined #ruby
[10:18:47] yaw: has joined #ruby
[10:20:33] rickmasta: has joined #ruby
[10:21:30] Oog: has joined #ruby
[10:24:38] yorickpeterse: there's something satisfying to having decent spec descriptions
[10:24:46] yorickpeterse: besides it actually being easy to understand what the heck the specs do
[10:24:57] aryaching: has joined #ruby
[10:25:05] RegulationD: has joined #ruby
[10:25:20] chipotle: has joined #ruby
[10:25:24] lkba: has joined #ruby
[10:26:51] dhjondoh: has joined #ruby
[10:26:56] Oog: has joined #ruby
[10:27:38] mistermocha: has joined #ruby
[10:28:24] shadeslayer: has joined #ruby
[10:31:19] Timba-as: has joined #ruby
[10:33:41] khebbie: has joined #ruby
[10:34:28] eGGsha: has joined #ruby
[10:35:49] Bitcrusher01: I've got at quick question; I'm currently making some tests using serverspec, and found an example for testing a network interfaces netmask - I just don't understand the format the variable is in --- it { should have_ipv4_address("${2:ipaddress/netmask}") }
[10:36:02] nerium: has joined #ruby
[10:36:03] Bitcrusher01: can anyone explain it to me?
[10:36:42] Bitcrusher01: the ${2:ipaddress/netmask} part - I've only seen #{} till now
[10:38:11] sdothum: has joined #ruby
[10:38:58] mistermocha: has joined #ruby
[10:40:45] denver: has joined #ruby
[10:41:47] felixr: has joined #ruby
[10:42:17] apeiros: Bitcrusher01: that's not something which comes from ruby itself
[10:43:28] apeiros: i.e. it's probably something serverspec or whatever interpolates itself. e.g. using gsub.
[10:44:18] Bitcrusher01: apeiros: thanks :) I'll try to figure out what $ is when using serverspec
[10:44:55] apeiros: I assume it's some kind of template mechanism / variable substitution
[10:45:19] maloik: could very well be chef-specific? afaik, they embed some kind of ruby in the latest versions
[10:45:22] yaw: has joined #ruby
[10:45:30] jhwhite: has joined #ruby
[10:45:34] maloik: although im not sure to what end serverspec is linked to chef
[10:45:39] maloik: (if at all, for that matter)
[10:46:45] voker57: has joined #ruby
[10:47:06] Bitcrusher01: I have not installed chef directly (assuming it's a gem) - only if it's been installed as some king of mandatory dependency for server
[10:47:34] maloik: I just googled for that piece of code, the only place I've found a result for is a snippets file for what I believe to be a vim autocompletion plugin
[10:47:39] nfk: has joined #ruby
[10:47:47] maloik: is that .snip file the one you're looking at?
[10:47:50] Bitcrusher01: maloik: I found it here https://github.com/glidenote/serverspec-snippets/blob/master/ruby.serverspec.snip
[10:48:22] Bitcrusher01: oh! it's for a vim plugin so it supports serverspec!?!
[10:48:24] maloik: it's not quite an example for serverspec
[10:48:34] Bitcrusher01: damn, I missed that part
[10:48:49] Bitcrusher01: sorry about that
[10:49:07] maloik: probably has something to do with regexes in vim, or allowing you to quickly tab between the parts you can edit in that snippet or so
[10:49:18] zacstewart: has joined #ruby
[10:49:23] dangerousdave: has joined #ruby
[10:49:26] zenspider: Bitcrusher01: that looks like bash variables w/ default values if not set
[10:50:05] sigurding: has joined #ruby
[10:50:30] Bitcrusher01: ahh, I didn't know you could make default values for bash vars
[10:50:54] zenspider: there's a bunch of different ${blahblah} formats. doesn't mean this is one of them, but I bet they're related
[10:51:01] zenspider: ok. bed for me.
[10:51:19] Bitcrusher01: zenspider: good night then :)
[10:51:24] senayar: has joined #ruby
[10:53:45] decoponio: has joined #ruby
[10:54:18] bruno-: has joined #ruby
[10:55:33] yaw: has joined #ruby
[10:58:02] quimrstorres: has joined #ruby
[10:58:33] arturmartins: has joined #ruby
[10:58:55] idafyaid: has joined #ruby
[10:58:59] zeeraw: has joined #ruby
[11:00:18] cir0x: has joined #ruby
[11:00:20] bhuvanaurora: has joined #ruby
[11:01:18] bhuvan_aurora: has joined #ruby
[11:03:11] sharpmachine: has joined #ruby
[11:07:18] griffindy: has joined #ruby
[11:07:38] hotpancakes: has joined #ruby
[11:07:46] Muhannad: has joined #ruby
[11:08:12] codecop: has joined #ruby
[11:09:55] revath: has joined #ruby
[11:11:24] revath: has left #ruby: ()
[11:11:51] zacstewart: has joined #ruby
[11:12:20] centrx: has joined #ruby
[11:14:36] mandarinkin: has joined #ruby
[11:14:49] ndrei: has joined #ruby
[11:14:53] Xeago: has joined #ruby
[11:15:01] Yiota: has joined #ruby
[11:17:16] ebbflowgo: has joined #ruby
[11:20:07] dgutierrez1287: has joined #ruby
[11:22:40] anaeem1: has joined #ruby
[11:22:57] Xeago: has joined #ruby
[11:23:35] zacstewart: has joined #ruby
[11:23:36] Kully3xf: has joined #ruby
[11:23:42] arup_r1: has joined #ruby
[11:30:44] Oog: has joined #ruby
[11:31:14] arturmartins: has joined #ruby
[11:33:28] Igorshp: has joined #ruby
[11:33:50] zeeraw: has joined #ruby
[11:34:11] fabrice31: has joined #ruby
[11:34:28] phutchins: has joined #ruby
[11:34:43] fabrice31: has joined #ruby
[11:40:06] ldnunes: has joined #ruby
[11:40:15] fabrice31_: has joined #ruby
[11:40:53] fabrice31_: has joined #ruby
[11:42:58] felixrsmith: has joined #ruby
[11:45:01] christiandsg: has joined #ruby
[11:45:42] quazimodo: has joined #ruby
[11:47:48] niemcu: has joined #ruby
[11:48:13] ebbflowgo: has joined #ruby
[11:49:49] mistermocha: has joined #ruby
[11:53:18] symbol: has joined #ruby
[11:54:19] wallerdev: has joined #ruby
[11:56:15] senayar: has joined #ruby
[11:57:39] felixr: has joined #ruby
[11:59:10] Zai00: has joined #ruby
[12:00:03] Igorshp: has joined #ruby
[12:00:14] Aeyrix: has joined #ruby
[12:01:23] eGGsha: has joined #ruby
[12:02:26] dangerousdave: has joined #ruby
[12:02:35] yeticry: has joined #ruby
[12:02:49] JDiPierro: has joined #ruby
[12:03:56] sharpmachine: has joined #ruby
[12:05:52] bhuvanaurora: has joined #ruby
[12:05:59] bhuvan_aurora: has joined #ruby
[12:06:09] Musashi007: has joined #ruby
[12:06:40] sigurding: has joined #ruby
[12:07:19] bronson: has joined #ruby
[12:07:26] willhumphreys: has joined #ruby
[12:07:34] prettiestPony11: has joined #ruby
[12:07:57] nettoweb: has joined #ruby
[12:08:49] iamninja: has joined #ruby
[12:09:49] izzol: I installed ruby ruby 2.2.2p95 on C5 and after that servers is down :P
[12:10:05] stamina: has joined #ruby
[12:10:35] Aeyrix: has joined #ruby
[12:11:00] nateberkopec: has joined #ruby
[12:13:02] Papierkorb: has joined #ruby
[12:13:33] hotpancakes: has joined #ruby
[12:13:59] RegulationD: has joined #ruby
[12:14:29] leonardoajim: has joined #ruby
[12:14:37] mistermocha: has joined #ruby
[12:15:29] bruno-: has joined #ruby
[12:16:03] Scroff: has joined #ruby
[12:16:24] jakobhans: has joined #ruby
[12:16:26] jhwhite: has joined #ruby
[12:17:26] symm-: has joined #ruby
[12:17:31] eggoez: has joined #ruby
[12:18:58] Killerkeksdose: has joined #ruby
[12:19:28] hakunin: has joined #ruby
[12:20:07] Xeago: has joined #ruby
[12:20:16] zeeraw: has joined #ruby
[12:20:55] diegoviola: has joined #ruby
[12:21:03] tkuchiki: has joined #ruby
[12:21:54] andikr: has joined #ruby
[12:22:13] CloCkWeRX: has joined #ruby
[12:22:28] jhwhite: has joined #ruby
[12:25:44] Gadgetoid: has joined #ruby
[12:26:10] CloCkWeRX: has left #ruby: ()
[12:28:00] jonathanwallace: has joined #ruby
[12:30:48] Kully3xf: has joined #ruby
[12:32:23] stamina: has joined #ruby
[12:32:44] kkeuning: has joined #ruby
[12:33:29] mary5030: has joined #ruby
[12:34:50] bhorn1: has joined #ruby
[12:37:39] krz: has joined #ruby
[12:37:44] vt102: has joined #ruby
[12:40:20] anaeem1: has joined #ruby
[12:42:32] sgambino: has joined #ruby
[12:42:48] Sehryn: has joined #ruby
[12:43:09] yaw: has joined #ruby
[12:45:18] kies^: has joined #ruby
[12:47:06] dangerousdave: has joined #ruby
[12:47:58] bhuvan_aurora: has joined #ruby
[12:48:35] victortyau: has joined #ruby
[12:49:04] bhuvanaurora: has joined #ruby
[12:50:38] mjuszczak: has joined #ruby
[12:51:15] bruno-: has joined #ruby
[12:52:02] griffindy: has joined #ruby
[12:55:33] anaeem1: has joined #ruby
[12:57:43] livathinos: has joined #ruby
[12:57:43] bosma_: has joined #ruby
[12:57:56] anaeem1__: has joined #ruby
[12:57:58] felixr: has joined #ruby
[12:59:03] InternetFriend: has joined #ruby
[12:59:04] artmann_: has joined #ruby
[12:59:27] tobyx_: has joined #ruby
[12:59:30] AlexAltea: has joined #ruby
[13:00:32] Zarthus: has joined #ruby
[13:00:37] knikolov: has joined #ruby
[13:00:50] marsjaninzmarsa: has joined #ruby
[13:01:00] kiki_lamb: has joined #ruby
[13:01:05] hackeron: has joined #ruby
[13:01:07] jhass: has joined #ruby
[13:01:11] Hien: has joined #ruby
[13:01:28] ukd1: has joined #ruby
[13:01:28] felixr: has joined #ruby
[13:02:12] quimrstorres: has joined #ruby
[13:03:13] PlasmaStar: has joined #ruby
[13:03:28] Cork: has joined #ruby
[13:03:54] cir0x1: has joined #ruby
[13:04:50] bigkevmcd: has joined #ruby
[13:05:11] sharpmachine: has joined #ruby
[13:05:29] dblessing: has joined #ruby
[13:05:33] cir0x1: has left #ruby: ()
[13:06:16] eGGsha: has joined #ruby
[13:06:54] JDiPierro: has joined #ruby
[13:07:01] dangerousdave: has joined #ruby
[13:07:14] neanderslob: hi everyone, I'm attempting to install the latest version of a rather popular ruby gem but am being told when I run bundle install that the given version doesn't exist
[13:07:46] Scroff: has joined #ruby
[13:08:10] sevenseacat: is the command you ran, a big secret or something?
[13:08:16] t0rrieri: has joined #ruby
[13:08:17] nateberkopec: has joined #ruby
[13:08:27] apeiros: same question regarding the error you get???
[13:08:48] ddv: sexy gem?
[13:08:51] zacstewart: has joined #ruby
[13:09:24] neanderslob: sevenseacat: trying to install version 1.10 of cancan
[13:09:35] sevenseacat: there is no 1.10 version
[13:09:39] sevenseacat: latest is 1.6.10
[13:09:52] sevenseacat: that would be why :)
[13:09:59] neanderslob: sevenseacat: ok, that's consistent with what I'm finding :-P
[13:10:18] sevenseacat: ps. https://rubygems.org/gems/cancan
[13:11:02] neanderslob: sevenseacat: however this fork says that I should be able to install their latest version (1.10) by simply adding it to my gem file
[13:11:06] neanderslob: https://github.com/CanCanCommunity/cancancan
[13:11:12] sevenseacat: thats a different gem
[13:11:16] neanderslob: sevenseacat: are they way off, or am I missing a step
[13:11:18] sevenseacat: thats cancancan, which is also not the latest version
[13:11:24] ddv: cancancancan
[13:11:28] sevenseacat: https://rubygems.org/gems/cancancan
[13:11:43] neanderslob: missed a can there
[13:12:11] neanderslob: well thanks then!
[13:12:23] bungoman: has joined #ruby
[13:12:43] jhass: we should upload can that fixes any gem "cancan" to gem "cancancan"
[13:12:57] shevy: this is why we can't have nice names
[13:13:07] sevenseacat: we should tell anyone using cancan or cancancan to just use pundit instead
[13:13:41] tkuchiki: has joined #ruby
[13:13:47] felixrsmith: has joined #ruby
[13:14:05] tmtwd: has joined #ruby
[13:14:29] neanderslob: sevenseacat: not a cancan or cancancan fan I take it?
[13:14:36] sevenseacat: definitely not.
[13:14:41] jlast: has joined #ruby
[13:14:54] RegulationD: has joined #ruby
[13:15:30] balazs: has joined #ruby
[13:16:13] nertzy: has joined #ruby
[13:16:31] hotpancakes: has joined #ruby
[13:17:12] withnale_: has joined #ruby
[13:17:45] icebourg: has joined #ruby
[13:18:21] freerobby: has joined #ruby
[13:18:52] charliesome: has joined #ruby
[13:18:52] icflournoy: has joined #ruby
[13:19:14] jerius: has joined #ruby
[13:19:43] mistermocha: has joined #ruby
[13:19:57] JakFrist: has joined #ruby
[13:20:30] malconis: has joined #ruby
[13:20:53] ksjdflsjldf: has joined #ruby
[13:22:21] tomphp: has joined #ruby
[13:23:08] mistermocha: has joined #ruby
[13:23:53] Squarepy: has joined #ruby
[13:25:06] swills: has joined #ruby
[13:25:18] Xeago: has joined #ruby
[13:25:24] nateberkopec: has joined #ruby
[13:26:05] JDiPierro: has joined #ruby
[13:27:05] yashinbasement: has joined #ruby
[13:27:28] leonardoajim: has joined #ruby
[13:28:52] chthon: has joined #ruby
[13:30:04] krz: has joined #ruby
[13:30:14] devdazed: has joined #ruby
[13:31:38] prettiestPony11: has joined #ruby
[13:32:06] yaw: has joined #ruby
[13:33:13] jlast: has left #ruby: ("Leaving...")
[13:33:48] christiandsg: has joined #ruby
[13:35:04] willhumphreys: has joined #ruby
[13:35:11] nettoweb: has joined #ruby
[13:35:18] rbennacer: has joined #ruby
[13:35:20] hotpancakes: has joined #ruby
[13:36:09] ebbflowgo: has joined #ruby
[13:37:12] tkuchiki: has joined #ruby
[13:37:35] unshadow: has joined #ruby
[13:38:15] NeverDie: has joined #ruby
[13:38:22] duggiefresh: has joined #ruby
[13:38:22] Igorshp: has joined #ruby
[13:38:55] mistermocha: has joined #ruby
[13:39:58] whippythellama: has joined #ruby
[13:40:30] ESpiney: has joined #ruby
[13:40:48] JoshL: has joined #ruby
[13:42:52] acke: has joined #ruby
[13:44:15] failshell: has joined #ruby
[13:44:27] JDiPierro: has joined #ruby
[13:45:20] freerobby: has joined #ruby
[13:45:38] poguez_: has joined #ruby
[13:48:21] Xeago: has joined #ruby
[13:48:53] xcesariox: has joined #ruby
[13:49:22] nertzy: has joined #ruby
[13:49:40] dhjondoh: has joined #ruby
[13:50:08] diegoviola: https://gist.github.com/diegoviola/72a730b49aad222351a0
[13:50:15] diegoviola: I'm getting this when installing the treat gem, any ideas?
[13:50:46] Sehryn: has joined #ruby
[13:52:23] paulcsmith: has joined #ruby
[13:52:35] Soda: has joined #ruby
[13:54:40] Scripore: has joined #ruby
[13:54:51] jhass: probably GCC5
[13:55:04] ebbflowgo: has joined #ruby
[13:55:54] mdarby: has joined #ruby
[13:56:14] werelivinginthef: has joined #ruby
[13:56:20] fabrice31: has joined #ruby
[13:56:30] rapha: big_array_full_with_words.uniq.sort <= how could it happen that a word is still in there twice?
[13:56:46] axl_: has joined #ruby
[13:56:52] hinbody: has joined #ruby
[13:57:28] jhass: diegoviola: the issue you opened seems to be a duplicate of https://github.com/louismullie/treat/issues/91
[13:57:41] jhass: and it works for 2.1 here, so just broken on 2.2
[13:57:44] senayar: has joined #ruby
[13:58:10] davedev24_: has joined #ruby
[13:58:21] adaedra: rapha: unicode?
[13:58:23] jhass: rapha: you look at it with puts instead of p (.inspect)
[13:58:26] workmad3: has joined #ruby
[13:58:30] jhass: and don't realize they're in fact different
[13:58:54] rapha: adaedra: yes, Arabic text
[13:58:55] casadei_: has joined #ruby
[13:59:11] InternetFriend: has joined #ruby
[13:59:11] rapha: jhass: and yes, I .puts it into a file
[14:00:03] jhass: rapha: as said, they byte sequences will be different, due to invisible chars, things that look the same or something
[14:00:10] enebo: has joined #ruby
[14:00:40] rapha: jhass: you were right, they look exactly the same, but are slightly different forms of the same letter. thank you!
[14:00:44] jhass: copy paste the two "identical" words into your irb and do "foo".bytes
[14:02:22] Patrick_Bateman: has joined #ruby
[14:03:11] wlknsn: has joined #ruby
[14:03:23] linuxboytoo: has joined #ruby
[14:03:36] quimrstorres: has joined #ruby
[14:03:53] linuxboytoo: Hey all -- I had someone suggest using "%{}" instead of "#{}" for delayed interpolation however I am not finding it to actually work - anyone have input on this?
[14:03:58] cgrieger^away: has joined #ruby
[14:04:17] jhass: >> "%{foo}" % {foo: "bar"}
[14:04:19] ruboto: jhass # => "bar" (https://eval.in/394946)
[14:04:20] neanias: %{} doesn't do interpolation
[14:04:25] [H]unt3r: has joined #ruby
[14:04:29] jhass: String#% does replace it
[14:04:33] Xeago: has joined #ruby
[14:04:34] linuxboytoo: I didn't think so either but maybe I am missing something
[14:04:43] jhass: linuxboytoo: see my example
[14:04:55] charliesome: has joined #ruby
[14:04:56] linuxboytoo: @jhass -- OHHHHH I see
[14:05:13] cats: has joined #ruby
[14:05:14] linuxboytoo: its not %{} its the string thingie
[14:05:35] jhass: >> "%{foo}".%({foo: "bar"})
[14:05:36] ruboto: jhass # => "bar" (https://eval.in/394949)
[14:05:43] jhass: more clear what's happening?
[14:05:50] diegoviola: anyone familiar with opennlp? will this play well with jruby?
[14:06:04] sharpmachine: has joined #ruby
[14:06:24] yorickpeterse: Yeah you can bind it to JRuby just fine
[14:06:36] yorickpeterse: but it's pretty much a bring-your-own-beer library
[14:06:52] yorickpeterse: I think I have it somewhere talking to JRuby, lemme see
[14:06:54] diegoviola: you mean not many docs, etc?
[14:07:02] tjohnson: has joined #ruby
[14:07:29] ebbflowgo: has joined #ruby
[14:07:50] yorickpeterse: oh hm, that actually goes through Python to then start OpenNPL via the CLI
[14:07:58] senayar: has joined #ruby
[14:07:59] yorickpeterse: diegoviola: No as in, it's just the libraries
[14:08:09] yorickpeterse: They don't ship ready-made models and all that last I checked
[14:08:12] bronson: has joined #ruby
[14:08:14] yorickpeterse: If they do they're probably pretty basic
[14:08:24] mleung: has joined #ruby
[14:08:31] yorickpeterse: https://github.com/opener-project *COUGH COUGH* she aint pretty but can do quite a few languages
[14:08:36] yorickpeterse: complete with enterprise XML
[14:08:53] quimrstorres: has joined #ruby
[14:09:19] jpfuentes2: has joined #ruby
[14:09:35] yorickpeterse: ^ we use said code to do all our NLP
[14:09:43] yorickpeterse: which is euh lets see
[14:10:25] yorickpeterse: eugh lemme see how many documents we processed
[14:10:28] yorickpeterse: once new relic finishes loading...
[14:10:52] Kilo`byte: has joined #ruby
[14:10:55] yorickpeterse: 820 000 XML documents in the past month
[14:11:12] yorickpeterse: well, times the amount of components we run
[14:11:18] yorickpeterse: which is like 820 000 * 6 or so
[14:11:28] yorickpeterse: ^ also 820 000 documents processed by Oga
[14:11:32] rwilcox: has joined #ruby
[14:11:53] momomomomo: has joined #ruby
[14:11:54] yorickpeterse: I should probably Twitters that
[14:12:11] diegoviola: NLTK looks easy but I'd hate to write python
[14:12:13] millerti: has joined #ruby
[14:12:37] JakFrist: has joined #ruby
[14:12:41] neanias: It's a trade off
[14:12:50] neanias: Great NLP stuff, but python
[14:13:09] diegoviola: I asked whey I can't do print "foo" if ... in python and they were barking all day to me
[14:13:22] kobain: has joined #ruby
[14:13:28] diegoviola: well not really
[14:13:30] Spami: has joined #ruby
[14:14:12] diegoviola: meh I'll try NLTK
[14:14:36] dangerousdave: has joined #ruby
[14:14:51] neanias: Yeah, I missed that when having to do some NLTK stuff
[14:15:07] neanias: I think you can at least do if ... : print "foo"
[14:15:28] Scroff: has joined #ruby
[14:15:45] RegulationD: has joined #ruby
[14:15:49] fabrice31_: has joined #ruby
[14:15:57] t0rrieri: has joined #ruby
[14:15:59] neanias: >> puts "foo" if true
[14:16:00] ruboto: neanias # => foo ...check link for more (https://eval.in/394954)
[14:16:14] jpfuente_: has joined #ruby
[14:16:32] neoscene: has joined #ruby
[14:17:22] sigurding: has joined #ruby
[14:18:35] diegoviola: java might have a lot of this nlp stuff, maybe I can just use jruby then
[14:19:24] yorickpeterse: diegoviola: what are you trying to do?
[14:19:31] hotpancakes: has joined #ruby
[14:19:34] yorickpeterse: Because that opener-project thing works via Ruby
[14:19:45] yorickpeterse: (although we shell out to Python/Perl in a few cases, huehue)
[14:19:46] msnyon: has joined #ruby
[14:20:16] lokulin: has joined #ruby
[14:20:37] EagleDelta: has joined #ruby
[14:20:56] Al3ks: has joined #ruby
[14:21:32] Ox0dea: yorickpeterse: For Lingua?
[14:22:01] ksjdflsjldf: has joined #ruby
[14:22:02] yorickpeterse: Yeah no shit, what I meant was what specifically. Do they just want language detection, or the whole package of language -> pos -> opinion detection etc
[14:22:05] diegoviola: yorickpeterse: just trying to get started with NLP
[14:22:20] Ox0dea: yorickpeterse: What? I was asking you to clarify why you were shelling out to Perl for NLP.
[14:22:21] yorickpeterse: diegoviola: Ah, then opener might be a bit too much since the output is pretty raw
[14:22:26] yorickpeterse: Ox0dea: oh right
[14:22:33] bigkevmcd: has joined #ruby
[14:22:38] yorickpeterse: Some researcher wrote the underlying code and thought that was a good idea
[14:22:57] yorickpeterse: we've been replacing a bunch of parts with pure Ruby lately
[14:23:00] diegoviola: boss said "Go learn some NLP, we need it for some project" and here I am
[14:23:09] lee-jon: has left #ruby: ()
[14:23:11] yorickpeterse: https://github.com/opener-project/opinion-detector-basic used to be Python, is now pure Ruby
[14:23:17] ksjdflsjldf: has joined #ruby
[14:23:32] neoscene: has joined #ruby
[14:23:45] diegoviola: what do you recommend then? nltk?
[14:23:49] yorickpeterse: diegoviola: http://www.opener-project.eu/webservices/entrance.html you can use this to see what output you'd get, it's basically the same if you'd use it via Ruby
[14:23:52] Scroff: has joined #ruby
[14:23:54] yorickpeterse: diegoviola: No idea, never used nltk
[14:24:32] quazimodo: has joined #ruby
[14:24:38] DefV: more like opeNERD, amirite
[14:25:05] Ox0dea: DefV: That might make people think it's a daemon.
[14:25:29] yorickpeterse: it actually has daemons
[14:25:44] jhass: and clouds. and unicorns
[14:27:12] Scripore: has joined #ruby
[14:27:16] Sehryn: has joined #ruby
[14:27:19] yorickpeterse: worth mentioning I know basically fuck all about NLP, I just make it work
[14:27:34] yorickpeterse: our part in this project was to basically whip people, ship things, etc
[14:27:37] yokel: has joined #ruby
[14:27:41] yorickpeterse: Now we're basically the only ones left to maintain it :<
[14:27:44] yorickpeterse: because everybody else ran
[14:27:55] genpaku: has joined #ruby
[14:28:07] pontiki: especially the people whipping....
[14:28:10] DefV: as they should
[14:28:12] yorickpeterse: Funny that I actually predicted that at the start and everybody was like "nooooo that won't happen"
[14:28:18] yorickpeterse: 2 years later...
[14:29:01] Xeago: has joined #ruby
[14:29:25] mleung: has joined #ruby
[14:29:47] lokulin: has joined #ruby
[14:29:50] yorickpeterse: I was also once told we'd write a scientific paper, sadly that never happened
[14:29:54] diegoviola: "because everybody else ran" <-- how every project end up sooner or later
[14:29:59] yorickpeterse: I would've quite enjoyed having it published with exactly 0 degrees
[14:30:15] yorickpeterse: (as in, me not having any academic background)
[14:30:15] revath: has joined #ruby
[14:31:35] gthank: has joined #ruby
[14:32:34] bruno-: has joined #ruby
[14:32:35] nertzy: has joined #ruby
[14:33:02] tkuchiki: has joined #ruby
[14:34:23] davedev24: has joined #ruby
[14:34:35] Kully3xf_: has joined #ruby
[14:34:50] j_mcnally: has joined #ruby
[14:34:58] gthank: Is there a "standard" gem for patching .inspect to make it spit out JSON strings?
[14:35:14] RegulationD: has joined #ruby
[14:35:21] gthank: I've tried DDG and Google, and most of the top results are actually about install errors in the JSON gem
[14:35:47] konsolebox: has joined #ruby
[14:35:57] yorickpeterse: No, and you shouldn't
[14:36:01] yorickpeterse: "inspect" is meant for humans
[14:36:14] yorickpeterse: If you want JSON output of something, define a method called "to_json"
[14:36:28] eGGsha: has joined #ruby
[14:36:58] gthank: I find JSON far more readable than the haphazard, "human-friendly" stuff I get from a lot of objecgts
[14:37:04] penzur: has joined #ruby
[14:37:15] gthank: Especially if I'm going to be looking for stuff in logs that can be quite large
[14:39:43] jhass: gthank: http://idiosyncratic-ruby.com/12-more-inspections.html
[14:40:05] jhass: I'm sure pry has a similar hook
[14:41:51] JoshL_: has joined #ruby
[14:41:54] Agoldfish: has joined #ruby
[14:42:39] fabrice31: has joined #ruby
[14:43:04] shevy: hook hook hook it up!
[14:43:05] tkuchiki: has joined #ruby
[14:43:42] ccooke: the downside of course is that some objects *can't* be converted to json
[14:43:46] ccooke: or whatever
[14:43:53] redteam: has joined #ruby
[14:44:06] shevy: gthank should be simple to write a gem that would modify the inspect output upon an include-event
[14:44:50] shevy: I envision the name for this gem be ... "viral_json" :)
[14:44:52] pdoherty: has joined #ruby
[14:45:01] redteam: has joined #ruby
[14:45:06] ccooke: shevy: Nah, use objectspace to find every instance method called "inspect" and patch in a wrapper. It'll be easy!
[14:45:11] jgpawletko: has joined #ruby
[14:45:15] axl__: has joined #ruby
[14:45:19] Oog: has joined #ruby
[14:45:28] dgutierrez1287: has joined #ruby
[14:45:33] victortyau: has joined #ruby
[14:45:35] shevy: objectspace scares me
[14:45:43] jhass: why not use tracepoint to catch the inspect calls actually happening only, much more efficient
[14:45:51] ccooke: I had to use it recently. I love that it's *there*.
[14:46:27] ccooke: but I think that every single time I've used it, I've added a comment including exactly how long this particular dirty hack should be tolerated
[14:46:34] shevy: what did you have to do there? find some rogue objects?
[14:46:50] but3k4: has joined #ruby
[14:46:56] gthank: TracePoint looks like it would be **terribly** inefficient
[14:47:33] gthank: Isn't it adding (best-case) an operation to every single method invocation?
[14:47:49] ccooke: shevy: No. I had to patch an object to infect its exception handling with a .ignore method
[14:48:00] joaomdmoura: has joined #ruby
[14:48:10] shevy: that's actually great :)
[14:48:13] ccooke: A couple of weeks and *that* hack will be deleted :-)
[14:48:26] dopie: has joined #ruby
[14:48:26] dgutierrez1287: has joined #ruby
[14:48:28] jhwhite: has joined #ruby
[14:48:44] shevy: should be stored in "best of objectspace modifications - top 20"
[14:48:56] shevy: I am sure there will be lots more competition for it ccooke!
[14:49:08] Xeago: has joined #ruby
[14:49:43] ccooke: basically, we're building a complex infrastructure involving third party code and parts of it aren't there yet. I implemented a dirty hack to replace two web services that aren't there with the ability to recursively pull stuff from a git repo, but the object I could add this to was a cleanroom-style protected DSL
[14:49:55] shevy: gthank tracepoint stuff confuses me... last time I tried it, was through pickaxe playing with set_trace_var I think... and there is also set_trace_func? or something like that... when I used global variables less and less, it lost a lot of its appeal to continue to play with it
[14:50:00] jas02: has joined #ruby
[14:50:07] bodgix_wrk: has joined #ruby
[14:50:16] JoshL: has joined #ruby
[14:50:19] mistermocha: has joined #ruby
[14:50:22] anmeng: has joined #ruby
[14:50:22] bbeer: has joined #ruby
[14:50:54] kfpratt: has joined #ruby
[14:50:56] bbeer: Hello, anyone here. I'm trying to setup gitlab and I'm failing on the mysql "gem". I don't know anything about ruby, so....help?
[14:51:10] ccooke: said DSL would not allow you to add a method to it, because it would only call methods defined in the DSL's core file. Solution? Patch in .ignore, catch the no method exception, ignore it. :-)
[14:51:14] shevy: bbeer what error do you get
[14:51:15] renderful: has joined #ruby
[14:51:20] JoshL: has joined #ruby
[14:51:34] duggiefresh: has joined #ruby
[14:51:53] ccooke: shevy: http://timelessrepo.com/never-gonna-let-you-go
[14:52:01] mary5030: has joined #ruby
[14:52:24] bbeer: sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production
[14:52:33] tmtwd: has joined #ruby
[14:52:39] ccooke: shevy: This fact says a lot - good and bad - about Ruby: I had applied this, tested it and got it working within five minutes of deciding this was the best answer. It took me longer to write the comment explaining the why and when this should be deleted.
[14:52:45] bbeer: Could not find mysql2-0.3.16 in any of the sources
[14:52:51] mary5030: has joined #ruby
[14:52:57] shevy: wait... never gonna let you go
[14:53:02] shevy: isn't that rick rolling?
[14:53:06] anmeng: has left #ruby: ()
[14:53:08] tkuchiki: has joined #ruby
[14:53:10] shevy: do I dare to click on such an URL :D
[14:53:21] ccooke: the theme is used in the code :-)
[14:53:41] aryaching: has joined #ruby
[14:54:10] shevy: bbeer hmm so it's also related to bundler; I am sure someone else can help you with bundler, let me see if that mysql2 gem exists though
[14:54:46] hmnhf: has joined #ruby
[14:54:46] shevy: ok so the version are at: https://rubygems.org/gems/mysql2/versions and I do see 0.3.16, 0.3.16 - May 15, 2014 (47 KB)
[14:54:54] shevy: *the versions
[14:55:18] ytti: i've used this previously to automate CLI interactions - https://github.com/avdi/greenletters
[14:55:28] ytti: is this right tool for the job, or can someone recommend another tool
[14:55:51] shevy: you can click on the "0.3.16" part and download it there, then you have the .gem file, and perhaps you can do "gem install *.gem", or just pass the specific version to "gem" itself... gem install mysql2 -v 0.3.16 or so I think. but whether this works with bundler or not I have no idea, I have not been able to demystify bundler yet
[14:56:04] sigurding: has joined #ruby
[14:56:41] solars: has joined #ruby
[14:56:48] bbeer: shevy: All I see in the Gemfile is :gem "mysql2", group: :mysql
[14:57:00] bbeer: I'm so confused.
[14:57:06] jeanjack: has left #ruby: ()
[14:58:01] sepp2k: has joined #ruby
[14:58:10] shevy: yeah no idea sorry. The most recent version is 0.3.18 so I am not sure why it wants 0.3.16. jhass is a bundler expert, perhaps he knows
[14:58:21] sarkyniin: has joined #ruby
[14:59:10] bbeer: shevy: it still says mysql2 is not part of the Gemfile...
[14:59:23] jhass: bbeer: bundle -v?
[14:59:49] shevy: there also is #bundler by the way in the event that jhass sleeps but I just see he does not sleep!
[14:59:51] jhass: pardon, sudo -u git -H bundle -v
[15:00:16] bbeer: I might have another version of ruby installed. I thought I deleted it. Is there a way to remove ruby?
[15:00:27] bbeer: I had to do a source build.
[15:00:35] livathinos: has joined #ruby
[15:00:48] jhass: a sudo make install is not easy to undo, no
[15:00:48] linuxboytoo: has joined #ruby
[15:00:58] jhass: hence why it's discouraged
[15:01:40] linuxboytoo: has joined #ruby
[15:01:47] Xeago: has joined #ruby
[15:02:24] shevy: couldn't he do a make uninstall?
[15:02:47] DefV: shevy: if make uninstall is implemented
[15:03:16] j_mcnally: has joined #ruby
[15:03:17] balazs: has joined #ruby
[15:03:20] shevy: I trust my japanese ruby hackers!
[15:03:50] yokel: has joined #ruby
[15:03:56] bbeer: shevy: Make uninstall is not implemented.
[15:03:59] j_mcnally: has joined #ruby
[15:04:03] rippa: has joined #ruby
[15:04:38] genpaku: has joined #ruby
[15:05:26] shevy: ccooke lol I see it now... module NeverGonnaLetYouDown
[15:05:29] j_mcnally: has joined #ruby
[15:05:41] jhass: bbeer: so, what about my question? what's your bundler version?
[15:05:48] ccooke: shevy: indeed
[15:06:01] ccooke: shevy: it's quite nicely written, for what it does.
[15:06:13] allomov: has joined #ruby
[15:06:17] ccooke: shevy: Definitely an argument for or against Ruby ;-)
[15:06:39] chussenot: has joined #ruby
[15:07:40] bbeer: jhass: It segfaulted, so I deleted the ruby in /usr/local so the latest in /usr/ would work. But now it says /usr/local/ items doesn't exit.
[15:08:36] bbeer: jhass: I'm rebuilding 2.1.6 with --prefix=/usr/local maybe that will overwrite the old install?
[15:08:55] centrx: has joined #ruby
[15:10:28] Xeago: has joined #ruby
[15:10:34] serivich: has joined #ruby
[15:10:39] havenwood: There are: make clean && make distclean
[15:10:51] jhack: has joined #ruby
[15:10:54] havenwood: shevy: Sounds like a name for a supervisor gem.
[15:11:01] shevy: bbeer yeah, if you omit --prefix, then it will default to /usr/local
[15:11:08] momomomomo: has joined #ruby
[15:11:15] jhack: jhass: sasl auth?
[15:11:26] shevy: bbeer but you may have one ruby at /usr/bin/ruby and then one at /usr/local/bin/ruby
[15:12:03] Kully3xf: has joined #ruby
[15:12:40] shevy: bundle -v should not segfault though :)
[15:12:46] jhass: jhack: http://freenode.net/sasl/
[15:12:56] bbeer: shevy: It seems to search /usr/local before /usr, which seems weird to me.
[15:13:02] bbeer: backwards to me.
[15:13:27] renderful: has joined #ruby
[15:13:40] shevy: I just installed bundler to test... "bundle -v" # Output is -> Bundler version 1.9.4
[15:13:52] jhass: shevy: oO
[15:14:00] mistermo_: has joined #ruby
[15:14:02] jhass: "just installed" and you get an that old version?
[15:14:05] shevy: bbeer well, /usr/local would default to "user compiled programs", in the traditional FHS
[15:14:22] shevy: I install from my local repository usually, if I have to update, I grab a new version
[15:14:22] havenwood: shevy: Are you... time traveling?
[15:14:28] shevy: which happens only for gems I use!
[15:14:35] shevy: ok ok I do a gem install bundler now, you pests :P
[15:15:15] mesamoo: has joined #ruby
[15:15:27] bbeer: It looks like my server is out of space!
[15:15:51] shevy: ok so now ... "bundle -v" -> Bundler version 1.10.5
[15:16:06] bungoman: has joined #ruby
[15:16:06] shevy: bbeer if I can do it, you can too, without segfaulting!
[15:16:20] ght: Question: I have this simple function that pulls data from a MySQL DB, iterates through it, and appends it to an array via <<, as seen here: https://gist.github.com/anonymous/3ab91cc7f8ed9f95fa4d
[15:16:25] bbeer: shevy: I cant' complete the install. I'm out of space.
[15:16:41] shevy: bbeer delete something you don't need!
[15:16:52] ght: I'd like to add a new key, "execute_push", to each of those "tag" entries when they're stored in the array. It's temporary so it doesn't need to be written to the DB.
[15:17:08] ght: For some reason, the syntax for doing such is escaping me.
[15:17:09] yardenbar: has joined #ruby
[15:17:21] jhass: user_profile["mysql_client"] - that looks sooo wrong...
[15:17:34] ght: Don't worry about that part, that works.
[15:17:36] ljarvis: i always store my db clients in my user_profile
[15:17:38] ght: I'm worried about adding the key.
[15:17:50] jhass: ght: conceptually wrong, not technically
[15:18:20] linuxboytoo: has joined #ruby
[15:18:21] ljarvis: also using interpolation in an sql query = bad
[15:18:25] ght: Werd, so, in that .each loop for populating the user_profile["tags"] array with the entries from the table, it's working fine, but is there any way on each tag entry to add an "execute_push" boolean value?
[15:18:39] ght: On a per array entry, temporary basis.
[15:19:03] ght: I feel like there is but the technique is escaping me for some reason.
[15:19:04] bbeer: shevy: I need it all. It's a new server!
[15:19:19] InternetFriend: has joined #ruby
[15:19:23] nerium: has joined #ruby
[15:19:25] jhass: I hesitate to answer it, it sounds like doing the design mistake over and over again ...
[15:19:31] christiandsg: has joined #ruby
[15:19:42] ght: lol, dude, it works otherwise.
[15:19:50] ght: So does anyone know?
[15:19:59] j_mcnally: has joined #ruby
[15:20:30] ght: Ok, to keep you placated, I'll bite. What is the design mistake exactly in the code?
[15:20:36] shevy: ght I don't think I understood it. can't you just simply add more data to your array?
[15:20:42] ght: I add a reference to the mysql_client and pass it around functions because I execute queries in various sections.
[15:20:45] davedev24_: has joined #ruby
[15:20:56] but3k4: has joined #ruby
[15:21:18] shevy: if your current array is [['bananas','apples','peaches']] you could turn it into a [['bananas','yummy'],['apples','totally awesome'],['peaches','allergic to peaches']]
[15:21:26] ght: shevy: It's the .each loop. I'm doing myquery.tags.each do |tag|; myarray << tag; end;
[15:21:28] shevy: though that sounds more like a Hash
[15:21:29] ght: Essentially
[15:21:33] jhass: ght: user_profile, pretending to or being a hash should know shit about your database connection, it should only cater about the user profile data
[15:21:39] shevy: isn't that just a case for .map ?
[15:21:49] jhack: has joined #ruby
[15:21:52] ght: ok jhass, thanks for the tip.
[15:22:08] ght: shevy: Might be, I rarely use .map, I need to study that method more.
[15:22:23] shevy: I mean that just looks like a classical example
[15:22:24] jhass: ght: anyway... so what's tag.class that you think you can add more random attributes to it?
[15:22:33] shevy: you iterate over a collection, then modify parts of it via a << method call
[15:22:51] ght: user_profile["tags"] is an array
[15:23:34] jhass: yeah, not what I asked because not what you want stick stuff to
[15:23:38] tmtwd: has joined #ruby
[15:23:51] werelivinginthef: has joined #ruby
[15:23:54] shevy: >> array = %w( a b c ); array.map {|l| l+l.succ }
[15:23:55] ruboto: shevy # => ["ab", "bc", "cd"] (https://eval.in/394975)
[15:24:31] jhass: ght: you asked to add some random attribute ("execute_push", whatever that means) to the tag
[15:24:39] ght: That's correct.
[15:24:57] ljarvis: what is "tag"?
[15:24:58] ght: I suppose, before pushing the tag to the array, I could add that attribute?
[15:24:59] Spami: has joined #ruby
[15:25:05] jhass: so I wonder what tag is that makes you think it takes attributes in the first place
[15:25:20] ght: Tag... is a database record?
[15:25:24] jobewan: has joined #ruby
[15:25:27] ljarvis: what does that mean?
[15:25:28] ght: The code is right there, it's a query.
[15:25:29] momomomomo: has joined #ruby
[15:25:35] jhass: ght: the code shows nothing about that
[15:25:36] ght: Not you ljarvis.
[15:25:46] ljarvis: ght: excuse me?
[15:25:56] jhass: and you're the only one not needing to guess here, ask your code
[15:25:56] ght: jhass: line 2?
[15:25:57] ght: user_tags = user_profile["mysql_client"].query("SELECT * FROM tags WHERE profile_id='#{user_profile['id']}'")
[15:26:01] jhass: p tag.class
[15:26:18] sharpmachine: has joined #ruby
[15:26:18] jhass: ght: query is not a method defined on Object
[15:26:32] shevy: aha! a special object
[15:26:50] jhass: and Object is the only thing I can be fairly sure about that is included into whatever user_profile["mysql_client"] returns
[15:27:10] programmerq: has joined #ruby
[15:27:23] ght: Ok, thanks for the help, appreciated.
[15:27:49] jhass: I also hesitate on going on a hunt into what I guess would be the right docs to figure out what tag is if it takes you 15 seconds to find out by simply doing p tag.class
[15:28:17] Azulinho: has joined #ruby
[15:29:07] bungoman: has joined #ruby
[15:29:43] chouhoulis: has joined #ruby
[15:30:25] spider-mario: has joined #ruby
[15:31:45] rickmasta: has joined #ruby
[15:33:07] s2013: has joined #ruby
[15:33:10] cochise_: has joined #ruby
[15:33:55] khebbie: has joined #ruby
[15:35:09] sharpmachine: has joined #ruby
[15:35:34] alphaatom: has joined #ruby
[15:35:53] iamse7en: has joined #ruby
[15:36:11] txdv: has left #ruby: ()
[15:36:16] rqde: has joined #ruby
[15:37:10] Cache_Money: has joined #ruby
[15:38:06] rqde: Hey, I'm trying to deploy my first ruby app to openshift, but I've run into some problems. Help?
[15:39:03] ruboto: You can find an overview of my commands at http://ruby-community.com/ruboto/commands
[15:39:08] bronson: has joined #ruby
[15:39:11] ruboto: rqde, Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
[15:39:45] adamski2600: has joined #ruby
[15:40:29] joonty: has joined #ruby
[15:40:37] rcvalle: has joined #ruby
[15:40:53] jhass: is it rails 4.2? :P
[15:41:34] shevy: if it is then jhass has some mind reading powers
[15:41:42] bnizzle: has joined #ruby
[15:42:31] jhass: well, https://bugzilla.redhat.com/show_bug.cgi?id=1184179
[15:44:17] khebbie: has joined #ruby
[15:44:27] jamesaxl: has joined #ruby
[15:44:40] shevy: does anyone happen to know why .start_with? does not allow a // regex?
[15:44:55] haxrbyte: has joined #ruby
[15:45:01] Zai00: has joined #ruby
[15:45:02] shevy: I just wanted to check for a number... hmm now I probably have to use /^\d+/
[15:45:31] jhass: because we have .match /\A for that
[15:45:40] jhack: has joined #ruby
[15:45:50] havenwood: >> "x\n5"[/^\d+/]
[15:45:51] ruboto: havenwood # => "5" (https://eval.in/394985)
[15:45:58] shevy: too verbose!
[15:46:17] havenwood: shevy: /\A\d/
[15:46:30] icflournoy: has joined #ruby
[15:48:15] jhack: Is there a way where can i have sasl encryption with smuxi?
[15:48:29] jhass: better question for #freenode
[15:48:59] podman: has joined #ruby
[15:49:00] bungoman: has joined #ruby
[15:49:06] shevy: jhack and jhass... so similar nicks
[15:49:12] jhass: sasl isn't encryption btw, it's authentication. It just requires a TLS connection
[15:49:28] eam: what's the right way to make a string safe to print on a terminal?
[15:49:57] phutchins: has joined #ruby
[15:49:57] jhass: depends on the terminal I'd guess
[15:50:09] jhass: so, limit it to ascii?
[15:50:13] eam: let's say standard ansi-supporting vt100
[15:50:21] shevy: yay, colours!
[15:50:31] eam: jhass: what if I want to support unicode?
[15:50:48] eam: (because yeah, right now my stopgap is & 0x7F)
[15:50:49] jhack: has joined #ruby
[15:50:49] armyriad: has joined #ruby
[15:52:02] danman: has joined #ruby
[15:52:29] andrewstewart: has left #ruby: ()
[15:54:13] nerium: has joined #ruby
[15:54:44] sdothum: has joined #ruby
[15:55:12] symbole: has joined #ruby
[15:55:47] kies^: has joined #ruby
[15:56:10] woodennails: has joined #ruby
[15:57:14] Xeago: has joined #ruby
[15:57:20] amclain: has joined #ruby
[15:57:36] okdas: has joined #ruby
[15:57:36] okdas: has joined #ruby
[15:57:41] arturaz: has joined #ruby
[15:58:49] icebourg: has joined #ruby
[15:58:58] hotpancakes: has joined #ruby
[15:59:04] iamse7en: using Devise, i want to add a time_zone_select for :account_update but not :sign_up. I added the field to registrations/edit and put it in strong parameters for :account_update. however, when I do a sign up, it has error "Time zone is not included in the list". Time Zone isn't in sign_up because I don't want it there. how do I make it so it's not required for sign_up?
[15:59:11] shevy: [Silence in the channel after eam's unicode question.]
[15:59:35] adaedra: ?rails iamse7en
[15:59:35] ruboto: iamse7en, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[15:59:42] icebourg: has joined #ruby
[15:59:58] linuxboytoo: has joined #ruby
[16:01:49] werelivinginthef: has joined #ruby
[16:02:01] ccooke: eam: There are a few options at http://stackoverflow.com/questions/1268289/how-to-get-rid-of-non-ascii-characters-in-ruby if it helps
[16:02:15] timonv: has joined #ruby
[16:03:53] bmurt: has joined #ruby
[16:03:53] baweaver: has joined #ruby
[16:04:06] eam: well, I actually do want to allow the non-ascii characters
[16:04:15] eam: it's ansi escape sequences I'm concerned with
[16:04:15] Senjai: Good morning ruby
[16:04:42] ccooke: eam: ansi escape sequences are by definition valid for a terminal, though
[16:04:43] InternetFriend: has joined #ruby
[16:05:09] eam: just like html sequences are by definition valid for a web page, but there are often good reasons to filter or escape them ;)
[16:05:33] gambl0re: has joined #ruby
[16:05:34] eam: this is an untrusted input scenario
[16:05:42] __butch__: has joined #ruby
[16:05:49] ccooke: That's not the easiest thing to do
[16:06:05] eam: so & 0x7F keeps it ascii just fine, but then I can't support other languages
[16:06:05] ccooke: the *simplest* thing is to escape the escape characrer
[16:06:18] ccooke: There *are* other sequences, but they are rare
[16:06:31] ccooke: and hardware-dependant
[16:07:02] ccooke: and since 0x1b is never printable, it helps
[16:07:03] eam: well, just removing 0x1b is going to break unicode where that byte appears as part of a character, right?
[16:07:17] ccooke: no, not if you remove it sensibly
[16:07:26] ccooke: work on each character, not each byte
[16:07:42] eam: hm, that's probably adequate
[16:07:44] ccooke: if your string is encoded as unicode, there won't be an 0x1b in it unless there's actually an escape
[16:08:05] towski_: has joined #ruby
[16:08:34] ccooke: you should also remove anything from 0x00-0x1f and 0x7f
[16:09:03] ccooke: the "printable" range of ANSI is 0x20-0x7e
[16:09:15] Xeago: has joined #ruby
[16:09:33] eam: I suppose another complication is I don't know the encoding of this string ;)
[16:09:38] acke: has joined #ruby
[16:09:53] Ox0dea: ccooke: From a philosophical standpoint, it's difficult to say whether 0x20 should be considered "printable".
[16:09:59] ccooke: depending on what you need, you could also whitelist 0x09 (tab), 0x0a (newline)
[16:10:28] ccooke: Ox0dea: this is true, but from a *mechanical* standpoint it is definitely an expected character if you want sensible text :p-)
[16:10:46] eGGsha: has joined #ruby
[16:10:48] ccooke: eam: that is a much harder problem to solve.
[16:10:48] eam: ccooke: specifically, I want to print out /proc/*/cmdline on linux, for various other processes, and I don't want an attacker to mess with my terminal
[16:11:12] eam: eg by putting an arg into a command with an escape sequence
[16:11:15] jhass: eam: [[:print:]] perhaps?
[16:11:21] eam: jhass: oooh
[16:11:22] okdas: has joined #ruby
[16:11:23] okdas: has joined #ruby
[16:11:29] ccooke: jhass: nice.
[16:11:36] ccooke: that'll not sort out the encoding issue
[16:11:40] railsraider: has joined #ruby
[16:11:48] momomomomo: has joined #ruby
[16:11:52] eam: but, that depends on having a valid encoding, right? I guess what I'll do is try system default first, then fall back to 7bit clean bytes?
[16:12:00] jhass: never checked whether that considers the ANSI codes printable though
[16:12:06] ccooke: however, for /proc/*/cmdline... get the default system encoding, force the string to be encoded as that, then print it safely. worst case scenario, you'll have a bit of damage.
[16:13:02] Lucky_: has joined #ruby
[16:14:20] khebbie: has joined #ruby
[16:16:57] revath: has joined #ruby
[16:17:28] k3asd`: has joined #ruby
[16:17:30] k3asd`_: has joined #ruby
[16:17:40] blaines: has joined #ruby
[16:17:48] grey_beard: has joined #ruby
[16:20:21] JakFrist: has joined #ruby
[16:20:48] Ilyas: has joined #ruby
[16:20:54] mistermocha: has joined #ruby
[16:21:51] Agoldfish: has joined #ruby
[16:22:48] victortyau: has joined #ruby
[16:23:14] bricker: has joined #ruby
[16:23:37] riotjones: has joined #ruby
[16:26:01] Zai00: has joined #ruby
[16:27:10] benlieb: has joined #ruby
[16:27:36] revath: has joined #ruby
[16:28:57] Scripore: has joined #ruby
[16:29:18] nateberkopec: has joined #ruby
[16:29:28] lee-jon: has joined #ruby
[16:29:32] c_nick: has joined #ruby
[16:29:47] zendrix: has joined #ruby
[16:30:09] Spami: has joined #ruby
[16:30:35] cmisenas: has joined #ruby
[16:30:46] zendrix: has joined #ruby
[16:31:03] Igorshp: has joined #ruby
[16:31:06] jhack_: has joined #ruby
[16:31:11] jhack32: has joined #ruby
[16:31:17] jhack99: has joined #ruby
[16:31:34] quazimod1: has joined #ruby
[16:31:55] jhack411: has joined #ruby
[16:32:07] djbkd: has joined #ruby
[16:32:36] jhack: has joined #ruby
[16:33:08] LJT: has joined #ruby
[16:34:02] thiagovsk: has joined #ruby
[16:35:12] DoubleMalt: has joined #ruby
[16:35:44] hotpancakes: has joined #ruby
[16:36:23] Alayde: has joined #ruby
[16:37:14] revath: has joined #ruby
[16:38:29] nertzy: has joined #ruby
[16:39:05] NeverDie: has joined #ruby
[16:40:03] bronson: has joined #ruby
[16:43:00] j_mcnally: has joined #ruby
[16:43:45] hahuang65: has joined #ruby
[16:44:04] mistermocha: has joined #ruby
[16:44:16] bb010g: has joined #ruby
[16:46:00] Xeago: has joined #ruby
[16:46:43] bruno-: has joined #ruby
[16:47:09] SCHAAP137: has joined #ruby
[16:47:23] revath: has joined #ruby
[16:49:35] Liothen: has joined #ruby
[16:49:36] willhumphreys: has joined #ruby
[16:50:18] Liothen: has joined #ruby
[16:50:37] alphaatom: has joined #ruby
[16:50:57] kerrizor: has joined #ruby
[16:51:23] adamski2600: has joined #ruby
[16:51:30] jaroslav: has left #ruby: ()
[16:51:44] T3: has joined #ruby
[16:52:12] pengin: has joined #ruby
[16:52:25] yardenbar: has joined #ruby
[16:53:33] bruno-: has joined #ruby
[16:55:34] User458764: has joined #ruby
[16:55:59] momomomomo: has joined #ruby
[16:56:36] Scripore: has joined #ruby
[16:58:18] bungoman: has joined #ruby
[17:00:12] lee-jon: has left #ruby: ()
[17:00:29] livathinos: has joined #ruby
[17:00:38] christiandsg: has joined #ruby
[17:01:13] bocelli202: has joined #ruby
[17:01:16] shadoi: has joined #ruby
[17:01:23] jerius: has joined #ruby
[17:01:30] Senjai: What's the canonical way to determine if an argument is a class? E.g when a method needs to accept both MyClass and :my_class
[17:01:46] j_mcnally: has joined #ruby
[17:02:48] centrx: Senjai, Sounds like you want a case statement that tests against MyClass or Symbol
[17:02:56] slumos: has left #ruby: ()
[17:02:59] centrx: Senjai, or if x.is_a?(MyClass)
[17:03:44] jpfuentes2: has joined #ruby
[17:03:48] Senjai: c_nick: MyClass can by any class
[17:03:53] Senjai: centrx: **
[17:04:11] centrx: oh, all classes are of type Class right?
[17:04:30] Senjai: At the moment I'm at defined?(thing) == "constant"
[17:04:39] balazs: has joined #ruby
[17:05:01] jhass: .is_a? Class ?!
[17:05:24] Senjai: For some reason I thought that wouldn't work.
[17:05:53] victortyau: has joined #ruby
[17:06:00] jhass: or .respond_to? :new for some duck typing
[17:06:26] Senjai: In this case I could probably ductype on #activate!
[17:06:30] duggiefresh: has joined #ruby
[17:06:32] Senjai: but yeah, that'd work
[17:07:00] Senjai: Essentially if its a symbol, I need to constantize it, and if its a Class, I can do the ducktyping
[17:07:56] khebbie: has joined #ruby
[17:08:38] notalanturing: has joined #ruby
[17:08:51] dented42: has joined #ruby
[17:09:18] jtdoncas: has joined #ruby
[17:09:45] Ox0dea: Senjai: const_get(arg.to_sym) would cover both cases.
[17:09:54] enders: has joined #ruby
[17:09:59] RegulationD: has joined #ruby
[17:10:08] jonathanwallace: has joined #ruby
[17:10:33] victortyau: has joined #ruby
[17:10:35] Senjai: Ox0dea: I have some silly complexities that might prevent that. For example if it's a symbol, I need to constantize under a specific namespace.
[17:10:51] Senjai: E.g. :my_class should resolve to Namespace::Something::MyClass
[17:13:08] JDiPierro: has joined #ruby
[17:15:20] centrx: It shall work, with the Power of Ruby!
[17:15:22] yardenbar: has joined #ruby
[17:16:21] khebbie: has joined #ruby
[17:16:55] pullphinger: has joined #ruby
[17:17:12] Senjai: Eh, I'm not really big on this metaprogramming stuff
[17:17:19] Senjai: I dont really like having to write code like this
[17:18:50] hotpancakes: has joined #ruby
[17:19:11] bungoman: has joined #ruby
[17:19:26] dangerousdave: has joined #ruby
[17:20:09] revath: has joined #ruby
[17:21:00] Jackneill: has joined #ruby
[17:22:25] ht__: has joined #ruby
[17:23:28] alphaatom: has joined #ruby
[17:23:53] kobain: has joined #ruby
[17:25:09] lessless: has joined #ruby
[17:25:13] Ox0dea: >> ([Object] + %w[Resolv DNS Resource IN A]).reduce(:const_get)
[17:25:14] ruboto: Ox0dea # => uninitialized constant Resolv (NameError) ...check link for more (https://eval.in/395057)
[17:25:20] Ox0dea: >> require 'resolv'; ([Object] + %w[Resolv DNS Resource IN A]).reduce(:const_get)
[17:25:21] ruboto: Ox0dea # => Resolv::DNS::Resource::IN::A (https://eval.in/395058)
[17:25:26] Ox0dea: Interesting use for #reduce.
[17:25:34] lessless: folks, maybe somebody can help to generate signed url for s3?
[17:26:34] numberten: has left #ruby: ()
[17:28:03] sbhatore: has joined #ruby
[17:28:46] ht__: has joined #ruby
[17:29:24] rqde: Im a first time programmer trying to deploy a ruby app on OpenShift (this one: https://github.com/rqde/soundboard-demo/), but when I do I get "We're sorry, but something went wrong. We've been notified about this issue and we'll take a look at it shortly." - Is that a fault of mine?
[17:29:55] jhass: Ox0dea: .inject(Object, :const_get), no?
[17:30:23] jhass: rqde: you'll want to have a look at the log
[17:30:38] abuzze: has joined #ruby
[17:30:43] hmnhf: has joined #ruby
[17:30:46] revath: has joined #ruby
[17:31:04] jhass: rqde: one issue might be that your rack version is too new
[17:31:21] jhass: rqde: https://bugzilla.redhat.com/show_bug.cgi?id=1184179
[17:31:49] Soda: has joined #ruby
[17:32:23] Ox0dea: jhass: Aye, that'd've been better.
[17:32:39] gambl0re: has joined #ruby
[17:33:34] Ox0dea: http://i.imgur.com/PUq3P7T.jpg
[17:33:39] Ox0dea: What do all of these companies have in common?
[17:33:49] rqde: jhass: That link looks an awful lot like the output I got from doing a rhc train as suggested on openshift
[17:34:16] towski_: has joined #ruby
[17:35:26] centrx: They are all train aficionados!
[17:36:51] railsraider: has joined #ruby
[17:37:24] pengin: has joined #ruby
[17:37:31] wookiehangover: has joined #ruby
[17:37:52] bronson: has joined #ruby
[17:38:08] chipotles: has joined #ruby
[17:38:22] ta: has joined #ruby
[17:38:55] eGGsha: has joined #ruby
[17:41:22] Maletor: has joined #ruby
[17:41:24] christiandsg: has joined #ruby
[17:41:27] bungoman: has joined #ruby
[17:43:27] lkba_: has joined #ruby
[17:44:46] platzhirsch: has left #ruby: ()
[17:45:09] qubits: has left #ruby: ()
[17:45:23] neohunter: has joined #ruby
[17:47:57] kobain: has joined #ruby
[17:48:49] lkba: has joined #ruby
[17:49:02] zdman135: has joined #ruby
[17:49:54] j4d: has joined #ruby
[17:50:00] zacts: I'm a coltrane aficionado
[17:50:06] yaw: has joined #ruby
[17:50:13] freerobby: has joined #ruby
[17:50:50] Mendenhall: has joined #ruby
[17:51:52] mistermocha: has joined #ruby
[17:52:19] jhack: has joined #ruby
[17:52:50] lkba: has joined #ruby
[17:52:57] havenwood: Ox0dea: JRuby
[17:53:09] rbennacer: has joined #ruby
[17:53:20] reset: has joined #ruby
[17:53:39] bigkevmcd: has joined #ruby
[17:53:48] havenwood: https://github.com/postmodern/ruby-versions/commit/813ad032a5dd47ae7f8fcd2cb6c37719f0338574
[17:54:15] havenwood: metadata \o/
[17:54:27] lkba: has joined #ruby
[17:54:28] zacts: j'adore le francais
[17:54:44] InternetFriend: has joined #ruby
[17:55:06] last_staff: has joined #ruby
[17:56:38] bruno-: has joined #ruby
[17:56:45] jonathanwallace: has joined #ruby
[17:58:16] allomov: has joined #ruby
[17:58:49] zacstewart: has joined #ruby
[17:59:05] baweaver: has joined #ruby
[18:00:33] malcolmva: has joined #ruby
[18:02:03] mike___1234: has joined #ruby
[18:02:21] shevy: adaedra look
[18:03:42] c355E3B: has joined #ruby
[18:04:26] bigbadbear: has joined #ruby
[18:04:42] jhack: Does anyone use codewars.com? what do you think about it? useful?
[18:05:13] chipotle_: has joined #ruby
[18:05:19] hotpancakes: has joined #ruby
[18:05:51] mando: has joined #ruby
[18:07:41] dopie: has joined #ruby
[18:07:57] soxet: has joined #ruby
[18:08:11] iszak: jhack: is free?
[18:08:15] quimrstorres: has joined #ruby
[18:08:20] jhack: iszak: yeah
[18:08:24] monod: has joined #ruby
[18:08:39] jerius: has joined #ruby
[18:08:45] renderful: has joined #ruby
[18:09:00] iszak: jhack: I use codeacademy but they mostly suck for me (as a more seasoned developer)
[18:09:12] iszak: s/use/used/
[18:09:27] quimrstorres: has joined #ruby
[18:09:35] mleung: has joined #ruby
[18:09:35] mistermocha: has joined #ruby
[18:10:08] arcanez: has joined #ruby
[18:10:25] redondos: codewars is fun
[18:10:33] redondos: haven't visited it in quite a while but still
[18:10:33] arcanez: is there a shorter/better way to write: foo = bar if bar.present?
[18:10:56] zdman135: codewars is fun for like 20 min and then the novelty wears off
[18:11:14] redondos: aren't they all like that?
[18:11:15] zdman135: especially when you constantly get beat by people that are better than you
[18:11:16] riotjones: has joined #ruby
[18:11:28] jhack: wasn't really helpful in improving your ruby skills then?
[18:11:31] redondos: i enjoyed looking at better solutions
[18:11:33] iszak: there will /always/ be someone better than you
[18:11:35] redondos: it taught me quite a bit
[18:11:47] dstarh: has joined #ruby
[18:11:48] zdman135: yeah improved me some
[18:12:00] zdman135: if I cared to actually look into it
[18:12:05] zdman135: if it was ok I got beat whatever
[18:12:11] riotjones: has joined #ruby
[18:12:16] zdman135: then no i didn't learn a damn thing
[18:12:16] c_nick: has left #ruby: ()
[18:12:20] jhass: jhack: exercism.io seems to have the better community
[18:12:43] jhass: in that it forces review more than codewars does
[18:13:41] jhack: gonna take a look at exercism
[18:13:48] livathinos: has joined #ruby
[18:13:55] iszak: I think it just depends on how you like to learn
[18:14:20] iszak: all I can say is I wish there was this sort of resource around when I was learning to program, the barrier to entry is lower now than ever.
[18:14:34] iszak: unless you're talking f/e then you need to relearn everything every 6 months with different tools.
[18:15:14] rsty1: has joined #ruby
[18:16:02] khebbie: has joined #ruby
[18:16:07] rsty1: i am building my first sinatra app and for some reason, i cannot require the libraries i need. I get cannot load such file
[18:16:23] rsty1: only 3 out of 4 of them cause this error
[18:16:28] Scripore: has joined #ruby
[18:16:40] shevy: do you use bundler
[18:16:43] havenwood: rsty1: Do you have a Gemfile?
[18:16:50] Scroff: has joined #ruby
[18:17:07] rsty1: shevy: I have require "bundler" in my config.ru
[18:17:31] jhass: did you add the gems you need to your Gemfile?
[18:17:32] baweaver: has joined #ruby
[18:17:38] kobain: has joined #ruby
[18:17:53] rsty1: and then in my app.rb, i have the 4 libraries i need (yaml, net/netconf/jnpr, junos-ez/stdlib, junos-ez/srx)
[18:18:07] rsty1: let me see, i didn't touch gemfile though
[18:18:14] kies^: has joined #ruby
[18:18:38] rsty1: they aren't in my Gemfile
[18:18:44] jhass: then that's your issue
[18:18:53] rsty1: why does yaml work without being in Gemfile?
[18:18:58] jhass: because it's in stdlib
[18:19:06] rsty1: awesome... just the info i needed :)
[18:19:09] rsty1: ill test, thanks!
[18:19:22] ZeeNoodleyGamer: has joined #ruby
[18:19:47] werelivinginthef: has joined #ruby
[18:20:27] kiddora__: has joined #ruby
[18:21:02] jhack: has joined #ruby
[18:21:07] InternetFriend: has joined #ruby
[18:21:26] cabreraM516: has joined #ruby
[18:21:59] rsty1: jhass: thanks again. App works now :)
[18:22:11] Aryasam: has joined #ruby
[18:23:26] madzhuga: has joined #ruby
[18:23:55] Oog: has joined #ruby
[18:24:01] Oog: is there something like concat but returns a hash?
[18:24:05] acke: has joined #ruby
[18:24:08] Oog: inject will do it but such an odd function
[18:24:35] jhass: Oog: not clear, please provide inputs and desired outputs
[18:24:46] iinzg: has joined #ruby
[18:25:07] eggoez: has joined #ruby
[18:25:49] jpfuentes2: has joined #ruby
[18:28:39] Oog: hash = users.inject({}) { |memo, user| memo[user.id] = user.name; memo } - just seems odd but this does what i want
[18:29:43] Hanmac: Oog: why not that: hash = users.each_object({}) { |user, memo| memo[user.id] = user.name }
[18:29:49] jhass: users.map {|user| [user.id, user.name] }.to_h
[18:30:43] yfeldblum: has joined #ruby
[18:31:02] craysiii: has joined #ruby
[18:31:46] Oog: thanks. hanmacyou sure about each_object? i do you mean each_cons? i dont see docs
[18:31:48] nfk: has joined #ruby
[18:32:00] jhass: no, he means each_with_object
[18:32:43] JoshL: has joined #ruby
[18:33:05] Oog: thanks what is *args in each_with_object im looking at the docs
[18:33:47] snockerton: has joined #ruby
[18:33:57] jhass: the arguments yielded
[18:34:08] jhass: since it's in Enumerable that's variable
[18:34:39] swgillespie: has joined #ruby
[18:34:53] jhack: has joined #ruby
[18:35:23] Oog: so on a hash it is k,v ? why isnt .inject like that? inject just gives you each obj
[18:36:20] jhass: dunno, just a documentation inconsistency I guess
[18:38:18] jenrzzz: has joined #ruby
[18:38:32] tituspullo: has joined #ruby
[18:38:49] genpaku: has joined #ruby
[18:38:51] bungoman: has joined #ruby
[18:38:53] yokel: has joined #ruby
[18:39:35] Oog: ok thanks
[18:39:47] j_mcnally: has joined #ruby
[18:40:55] evanjs: has joined #ruby
[18:41:46] shtirlic: has joined #ruby
[18:41:53] jhack: has joined #ruby
[18:42:10] arcanez: is there a shorter/better way to write: foo = bar if bar.present?
[18:42:44] jhass: arcanez: nope
[18:43:15] pengin: has joined #ruby
[18:45:21] yardenbar: has joined #ruby
[18:45:38] whiteline: has joined #ruby
[18:45:46] arcanez: ruby, you let me down
[18:46:27] zendrix: has joined #ruby
[18:46:54] GPrime: has joined #ruby
[18:47:11] serivich: has joined #ruby
[18:47:17] jhack: has joined #ruby
[18:47:19] jhass: hey, still better than if (bar && bar.isPresent()) { foo = bar } :P
[18:47:38] shtirlic: has joined #ruby
[18:47:52] towski_: has joined #ruby
[18:48:15] iszak: that's not so bad
[18:48:20] foooobear: has joined #ruby
[18:48:37] arcanez: I think I read someone wrote ??= and !!=
[18:48:54] jhack: has joined #ruby
[18:48:57] jhass: don't see how that would parse
[18:49:12] Channel6: has joined #ruby
[18:49:20] gambl0re: has joined #ruby
[18:49:31] jhass: there are ||= and &&= but those conditionalize on the left hand side
[18:50:12] timonv: has joined #ruby
[18:52:10] jackjackdripper: has joined #ruby
[18:52:18] symm-: has joined #ruby
[18:52:47] bungoman: has joined #ruby
[18:53:06] shtirlic: has joined #ruby
[18:53:26] allomov: has joined #ruby
[18:55:22] t0rrieri: has joined #ruby
[18:55:51] monod: has joined #ruby
[18:56:14] hoofed: has joined #ruby
[18:56:27] mdarby: has joined #ruby
[18:56:48] c0ncealed: has joined #ruby
[18:57:14] msgodf: has joined #ruby
[18:58:01] craysiii: has joined #ruby
[18:59:09] diegoviola: hrm, I've tried NLTK in python but the support for other languages other than english is poor
[19:02:20] nofxx: has joined #ruby
[19:02:20] nofxx: has joined #ruby
[19:02:55] eggoez: has joined #ruby
[19:04:15] shevy: diegoviola are you still using windows at your new company?
[19:05:10] diegoviola: shevy: send me a SATA to USB cable and I will use my SSD with Arch instead :)
[19:06:03] diegoviola: I run Arch in VBox (fullscreen)
[19:06:15] diegoviola: so I don't really use windows, but it's running in the background
[19:06:48] icebourg: has joined #ruby
[19:07:18] lkba_: has joined #ruby
[19:07:36] icebourg: has joined #ruby
[19:07:55] mando: has joined #ruby
[19:08:18] hololeap: has joined #ruby
[19:08:24] icebourg: has joined #ruby
[19:10:47] gdakram: has joined #ruby
[19:11:13] rickmasta: has joined #ruby
[19:12:22] thelastinuit: has joined #ruby
[19:12:26] kith_: has joined #ruby
[19:13:03] swgillespie: has joined #ruby
[19:13:20] adamski2600: has joined #ruby
[19:13:57] KnownSyntax: has joined #ruby
[19:13:58] iszak: diegoviola: why don't you use your host?
[19:15:29] gambl0re: has joined #ruby
[19:16:28] jenrzzz: has joined #ruby
[19:16:39] diegoviola: iszak: I don't think my boss will allow me to install Linux on the host
[19:17:10] iszak: diegoviola: no good, what's your setup? terminal multiplexer? shell? etc.
[19:17:36] jinie: has joined #ruby
[19:17:40] aef: has joined #ruby
[19:19:03] anaeem1: has joined #ruby
[19:19:19] Alina-malina: has joined #ruby
[19:20:10] mhib: has joined #ruby
[19:20:28] allomov: has joined #ruby
[19:21:37] bougyman: has joined #ruby
[19:22:17] mistermocha: has joined #ruby
[19:22:25] zendrix: has joined #ruby
[19:22:52] bruno-: has joined #ruby
[19:23:28] diegoviola: iszak: i3wm with termite/bash/tmux/vim
[19:23:51] diegoviola: I miss a good graphics file manager sometimes
[19:24:08] diegoviola: I was using KDE a few months ago
[19:24:46] Ox0dea: diegoviola: Why?
[19:27:10] mistermocha: has joined #ruby
[19:27:10] diegoviola: what do you mean why?
[19:27:55] baweaver: has joined #ruby
[19:28:33] snockerton: has joined #ruby
[19:28:54] A205B064: has joined #ruby
[19:30:17] MVPhelp: has joined #ruby
[19:31:07] Ox0dea: diegoviola: If you miss having a graphical file manager, why don't you just use one?
[19:31:09] weaksauce: is $RUBY_VERSION always set?
[19:31:21] Scripore: has joined #ruby
[19:31:36] weaksauce: I am calling ruby from vim and that variable seems to not get set correctly and it is nil
[19:31:41] Channel6: has joined #ruby
[19:31:48] Ox0dea: diegoviola: Clicking this and this and right-clicking that and making sure you've caught everything that matches a certain pattern is much better than learning basic regular expressions. :)
[19:32:06] hahuang65: has joined #ruby
[19:32:31] Maletor: has joined #ruby
[19:32:34] Ox0dea: weaksauce: Ah, sorry, RUBY_VERSION is a constant available only from within Ruby; it's not a global or environment variable.
[19:32:51] weaksauce: yeah. I was using it from within ruby
[19:33:22] weaksauce: get a nil error just to see if the code was actually being called
[19:33:49] Ox0dea: weaksauce: Nix the $.
[19:33:55] Ox0dea: Global variables and constants are different things.
[19:34:03] diegoviola: Ox0dea: but which one would I use in i3?
[19:34:39] t0rrieri: has joined #ruby
[19:34:40] diegoviola: if I use a file manager I'd like to use a DE but when using a DE I miss i3wm
[19:35:08] weaksauce: ah nice. that worked. yeah i know that they are different but why does this work from the command line but not from inside a system call from vim?
[19:35:13] weaksauce: x=`ruby -e "puts '$RUBY_VERSION'"`
[19:35:20] v4n: has joined #ruby
[19:35:44] shevy: vim sucks!
[19:36:57] Ox0dea: weaksauce: Erm, I can't imagine that actually worked?
[19:37:20] lee-jon: has joined #ruby
[19:37:20] shevy: works in irb!
[19:37:47] Ox0dea: weaksauce: The double quotes expand $ variables at the shell, so it must be the case you have a RUBY_VERSION environment variable.
[19:38:06] weaksauce: perhaps yeah
[19:38:10] jonathanwallace: has joined #ruby
[19:38:11] Ox0dea: It must be so. :)
[19:38:30] nofxx: can't think of many things that sucks more than vim... lost an hour of my life 10 ys ago. Still can remember the agony.
[19:38:41] Ox0dea: You people are silly.
[19:38:53] weaksauce: nofxx wow a whole hour?!?!
[19:38:58] shevy: Emacs made me a better person.
[19:39:07] Ox0dea: shevy: Which is your favorite Lisp?
[19:39:17] warweasle: has joined #ruby
[19:39:19] nofxx: weaksauce, hope not. Swear was the only time in my life I punched the screen.
[19:39:20] ESpiney_: has joined #ruby
[19:39:20] shevy: The unwritten kind of Lisp.
[19:39:23] nofxx: luckly it was a crt
[19:39:39] diegoviola: shevy: Emacs is a good OS only lacking a good text editor
[19:39:42] Ox0dea: shevy: So you use an editor that you don't even know how to customize?
[19:39:49] nofxx: diegoviola, old bad joke but ok
[19:39:54] weaksauce: Ox0dea yeah there is an environment variable that was interfering with my best laid plans
[19:39:54] diegoviola: shevy: but there's evil-mode now, so good for you
[19:39:56] shevy: I don't use emacs
[19:40:06] Ox0dea: weaksauce: Alas, we are but men.
[19:40:11] diegoviola: nofxx: lol ikr
[19:40:14] warweasle: Student: Does emacs have Buddha nature? Master: Why the hell not. It has everything else.
[19:40:38] diegoviola: nofxx: emacs is nice, don't get me wrong
[19:41:13] duderonomy: has joined #ruby
[19:41:17] aryaching: has joined #ruby
[19:41:45] warweasle: Question about modernizer 2.0.2.sudo -u git -H bundle install --deployment --without development test postgres aws
[19:41:54] nofxx: it's simple: I change my editor, not the other way around. Those crazy emacs keybinding are like that for you to change, not to use em ;)
[19:42:12] warweasle: Could not find modernizr-2.6.2 in any of the sources
[19:42:22] warweasle: And I can't download the damn thing either.
[19:44:17] nofxx: diegoviola, thing with emacs is that you need a) find a good .emacs.d repo to start or b) give it a month to write yours
[19:45:01] lee-jon: has joined #ruby
[19:45:03] lee-jon: has left #ruby: ()
[19:45:13] nofxx: those inspired by mac/textmate RUBY guys are your best bet.
[19:47:27] warweasle: Can anyone describe how modernizer-2.6.2 is MISSING FROM RUBY? Why would you do that?
[19:47:49] nofxx: WarWeasle, if that version ever was it was yanked
[19:48:03] nofxx: check the site
[19:48:45] warweasle: nofxx: Yes. I've looked everywhere and I can't download it to install it.
[19:48:55] izzol: hmm, I'm getting Dnsruby::ServFail.
[19:48:57] momomomomo: has joined #ruby
[19:49:00] izzol: But not sure why:(
[19:49:14] mistermocha: has joined #ruby
[19:49:33] kies^: has joined #ruby
[19:49:58] izzol: I'm querying google NS 8.8.8.8 and all works fine. The thing is sometimes I'm getting this Dnsruby::ServFail.
[19:50:13] izzol: I don't think that there is a problem in google ;P
[19:50:16] peter_paule: has joined #ruby
[19:50:18] izzol: and in my DC as well.
[19:50:27] Antiarc: WarWeasle: https://rubygems.org/gems/modernizer - did you mean another gem perhaps?
[19:50:41] nofxx: izzol, what is Dnsruby ?
[19:50:43] eam: izzol: with what frequency?
[19:50:44] Antiarc: https://rubygems.org/gems/modernizr is at 2.6.2 and has been yanked
[19:51:08] izzol: eam: I got this 5 times from around 500 queries.
[19:51:16] warweasle: GitLab requires this "Gem".
[19:51:31] izzol: nofxx: I don't know:P I'm using rspec-dns :-)
[19:51:31] revath: has joined #ruby
[19:51:41] Antiarc: WarWeasle: Joshua Peek/@joshpeek on twitter is the author, so maybe tweet at him and ask
[19:52:03] Antiarc: That said it just provides the modernizr JS package so you can probably work around it pretty easily
[19:52:17] warweasle: Antiarc: I'm not even on twitter
[19:52:25] kadoppe: has joined #ruby
[19:52:26] eam: izzol: are you sure you don't have 1% packetloss along the route between you/google?
[19:52:28] warweasle: I found a download link, but the link is down.
[19:52:32] Antiarc: https://github.com/josh has his email.
[19:52:51] zendrix: has joined #ruby
[19:53:22] symm-: has joined #ruby
[19:53:34] bruno-: has joined #ruby
[19:54:09] izzol: eam: I'm sure. I'm running it from the Datacenter so I doubt that there is any packetloss. Anyway our monitoring is saying that network is fine. hmm.
[19:54:24] diegoviola: nofxx: same with vim I think, except that vim is already half way useful without a ~/.vimrc
[19:55:20] eam: izzol: mtr to 8.8.8.8?
[19:55:35] eam: "the network" is never fine, the internet's always a variable place
[19:55:37] warweasle: Antiarc: I just had a thought: I swiched gitlab to the master branch
[19:55:46] jenrzzz: has joined #ruby
[19:56:11] eam: izzol: you could also instrument and look for patterns in the errors
[19:57:11] Mendenhall: has joined #ruby
[19:57:34] Scripore: has joined #ruby
[19:58:05] jpfuentes2: has joined #ruby
[19:58:34] drewo: has joined #ruby
[19:59:11] spider-mario: has joined #ruby
[19:59:36] mjuszczak: has joined #ruby
[19:59:53] revath: has joined #ruby
[19:59:56] jgpawletko: has joined #ruby
[20:00:10] workmad3: has joined #ruby
[20:01:14] Papierkorb: has joined #ruby
[20:01:26] nofxx: diegoviola, the diff is that vim will continue half useful
[20:02:04] Ox0dea: nofxx: Pfft.
[20:02:45] hahuang65: has joined #ruby
[20:03:00] diegoviola: nofxx: vim is very capable editor, what are you talking about?
[20:03:02] multi_io: has joined #ruby
[20:03:51] diegoviola: but it's not like emacs that it's an editor and also a kitchen sink
[20:04:27] weaksauce: and a clawhand
[20:04:29] diegoviola: if you want the editor and the kitchen sink integrated with it, sure, vim is not capable... if all you want is a text editor, vim is good enough
[20:05:00] ballPointPenguin: has left #ruby: ()
[20:05:31] warweasle: diegoviola: Emacs is a programming language with an editor built in. It gets rediculous when you use slime with common lisp;.
[20:05:55] jmignault: has joined #ruby
[20:06:27] diegoviola: WarWeasle: yeah I know
[20:06:35] Ox0dea: diegoviola: If all you want is a text editor, Vim is far more than "good enough".
[20:06:46] diegoviola: Ox0dea: sure
[20:06:54] mjuszczak: has joined #ruby
[20:06:56] Ox0dea: Most people don't just want to edit text, though, and it's really quite easy to turn Vim into "more than a text editor".
[20:07:07] adaedra: ???but it is so hard to use??? ??? Sublime Text average user
[20:07:15] Ox0dea: Not the tool's fault.
[20:07:18] mando: has joined #ruby
[20:09:04] diegoviola: vim is not hard to use at all
[20:09:36] Antiarc: it is kind of amazing to me that it's 2015 and we're still squabbling over text editors
[20:10:04] slash_nick: why everyone doesn't just use "ed", i'll never understand
[20:10:09] diegoviola: some people try to use vim without understanding that it's a modal editor, and I think that's why they find it hard to use
[20:10:20] diegoviola: because they try to use it like other editors
[20:10:23] Scripore: has joined #ruby
[20:10:24] Ox0dea: diegoviola: Quick, name all the modes. :)
[20:10:37] Ox0dea: Well, how many are there?
[20:10:41] adaedra: because they /want/ it, no?
[20:10:47] jonathanwallace: has joined #ruby
[20:10:55] diegoviola: Ox0dea: no idea
[20:10:57] adaedra: mh, Normal, Insert, Replase, Visual, V-Line, V-Block, Command
[20:11:03] Antiarc: "it doesn't conform to my expectations" is a pretty standard definiton of "hard to use" for the average user, to be fair. Not just in editors, but in all UX.
[20:11:05] Ox0dea: adaedra: Select.
[20:11:07] Antiarc: And I say that as a vim user.
[20:11:16] adaedra: Ox0dea: that's visual, no?
[20:11:19] Ox0dea: It's not.
[20:11:23] chussenot: has joined #ruby
[20:11:25] Antiarc: vim is really good at subverting your expectations :P
[20:12:37] adaedra: vim is really good imo, and I know that I use it at such a low level of its possibilities :x
[20:12:38] tomphp: has joined #ruby
[20:13:24] Ox0dea: Neovim's :terminal command = <3
[20:13:33] diegoviola: "Why is not deleting my text when I keep pressing backspace key. This editor sucks, I'm going back to sublime." -- Averga sublime text user when using vim in normal mode
[20:13:43] felixr: has joined #ruby
[20:13:48] adaedra: NeoVim's usable now?
[20:13:50] Senjai: Ox0dea: we have one neovimmer that is all crazy about that
[20:14:00] Senjai: Ox0dea: The rest of us just use vim tmux navigator and vim dispatch
[20:14:13] Ox0dea: Senjai: Yep, I made the switch from precisely that setup.
[20:15:14] Ox0dea: I still use <C-\>, but now it's to switch to the most recently active terminal buffer and back again.
[20:15:42] freerobby: has joined #ruby
[20:15:50] bluOxigen: has joined #ruby
[20:15:52] diegoviola: sorry about that, I didn't want to offend any sublime users :)
[20:16:30] Senjai: You totally did
[20:16:34] Senjai: that's the whole point of your statement
[20:16:43] Senjai: not that i use sublime
[20:16:55] adaedra: diegoviola: you're not the first one ;)
[20:17:10] adaedra: altern with atom for best effects.
[20:17:15] diegoviola: adaedra: what do you mean?
[20:17:25] phat4life: has left #ruby: ("WeeChat 1.2")
[20:17:34] axisys: how do I get the name hlr-prod from here? http://dpaste.com/1CH3BQK.txt
[20:17:45] swgillespie: has joined #ruby
[20:17:46] adaedra: diegoviola: to pick on sublime users, I did it just above.
[20:17:56] Scroff: has joined #ruby
[20:17:58] diegoviola: adaedra: to offend them you mean?
[20:18:11] diegoviola: adaedra: yeah sorry about that
[20:18:17] christiandsg: has joined #ruby
[20:18:18] axisys: print clusters.name gets me undefined name
[20:18:18] adaedra: I'm sure it wasn't meant to do so :>
[20:18:54] icebourg: has joined #ruby
[20:19:30] pengin: has joined #ruby
[20:19:37] Senjai: axisys: Its in a hash thats stored in the object
[20:19:47] Senjai: You can do crazy things using instance_variable_get
[20:19:48] icebourg: has joined #ruby
[20:19:50] Senjai: but I dont recommend it
[20:19:56] Senjai: There should be some proper interface for doing so
[20:20:11] Senjai: thing.instance_variable_get(:@cached_hash)["name"]
[20:20:19] Senjai: but you're pretty much saying fuck you to encapsulation :P
[20:20:34] icebourg: has joined #ruby
[20:20:48] gambl0re: has joined #ruby
[20:21:20] icebourg: has joined #ruby
[20:21:34] Scripore: has joined #ruby
[20:21:36] Ox0dea: Senjai: That's a little off the mark; there are probably attribute readers set up for those instance variables.
[20:21:38] nofxx: oh, poor souls. There's still time: https://stallman.org/saintignucius.jpg
[20:21:45] Senjai: Ox0dea: I couldn't possibly know
[20:21:50] nofxx: but heck, ignorance is bliss.
[20:21:56] Senjai: Ox0dea: Also I said: "There should be some proper interface for doing so"
[20:22:08] BrianBoyko: has joined #ruby
[20:22:09] icebourg: has joined #ruby
[20:22:43] Ox0dea: The only reason for that TLD's existence.
[20:22:56] Senjai: https://imgflip.com/i/nydfl
[20:23:03] icebourg: has joined #ruby
[20:23:12] voker57: has joined #ruby
[20:23:22] sharpmachine: has joined #ruby
[20:23:25] bronson: has joined #ruby
[20:23:38] pfish: has joined #ruby
[20:23:56] icebourg: has joined #ruby
[20:23:58] pfish: is there a method to get the size of an arbitrary ruby object in c code?
[20:24:06] Ox0dea: pfish: ObjectSpace.memsize_of
[20:24:16] Ox0dea: Or did you mean from C?
[20:24:24] pfish: oh yeah from c...
[20:24:51] bnobu: has joined #ruby
[20:24:55] Antiarc: Do you mean the heap size or the rvalue size?
[20:25:08] pfish: the actual amount of memory it takes up
[20:25:15] pfish: so heap size?
[20:25:23] Antiarc: Just the object, or the object and all its fields (which will be other objects)
[20:25:32] Ox0dea: pfish: rb_obj_memsize_of() looks to be the function you want.
[20:25:44] roolo: has joined #ruby
[20:25:45] Lucky_: has joined #ruby
[20:26:05] pfish: and probably just the object
[20:26:15] pfish: yeah just the object
[20:27:15] MagePsycho: has joined #ruby
[20:28:02] senayar: has joined #ruby
[20:28:09] axisys: Senjai: puts clusters.name gives #<RbVmomi::VIM::ObjectContent:0x00000003d3cf18>
[20:28:27] Ox0dea: axisys: Please scroll up and read the advice you've been given on this matter.
[20:28:32] MagePsycho: form['reference[database]'] = 'magento#{mageVersion}_vanilla' -> not working
[20:28:48] Ox0dea: MagePsycho: Double quotes to enable interpolation.
[20:29:05] yeltzooo: has joined #ruby
[20:29:11] axisys: Ox0dea: referring to this? thing.instance_variable_get(:@cached_hash)["name"]
[20:29:12] MagePsycho: ah i missed :)
[20:29:30] Ox0dea: axisys: That was bad advice that led to good advice.
[20:30:02] TheHodge: has joined #ruby
[20:30:13] gix: has joined #ruby
[20:30:20] axisys: Ox0dea: hmm.. I do not see any other suggestion after that
[20:30:39] lkba: has joined #ruby
[20:30:45] axisys: Ox0dea: I am still learning this rbvmomi
[20:31:33] baweaver: has joined #ruby
[20:31:49] axisys: puts clusters["name"] gives `[]': can't convert String into Integer (TypeError)
[20:32:44] icebourg: has joined #ruby
[20:32:53] brettnem: has joined #ruby
[20:33:34] felixr: has joined #ruby
[20:34:09] Lucky_: has joined #ruby
[20:34:41] sphex: hey. since an object's singleton class has the object's class as its superclass, can one say that method lookups are done by recursing throught the singleton class (and thus only incidentally reach the object's class), or are the lookup rules more complicated?
[20:35:18] chouhoulis: has joined #ruby
[20:35:27] gambl0re: has joined #ruby
[20:35:27] Ox0dea: >> String.singleton_class.superclass
[20:35:28] ruboto: Ox0dea # => #<Class:Object> (https://eval.in/395086)
[20:35:32] Ox0dea: sphex: Your initial assumption was invalid.
[20:35:59] symm-: has joined #ruby
[20:36:10] Ox0dea: A singleton class's superclass is the singleton class of its superclass. :)
[20:36:29] sphex: I was only looking at ''.singleton_class.superclass
[20:36:54] j4d: has joined #ruby
[20:37:08] Ox0dea: Ah, right, then my previous statement isn't always true either.
[20:37:26] mjuszczak: has joined #ruby
[20:37:40] jimothy: has joined #ruby
[20:38:41] sphex: Ox0dea: I remembered reading the method lookup rules somewhere and they were a bit complicated. but I can't find it back. :/ I was wondering if they could actually have been simpler than that.
[20:38:55] j4d: has joined #ruby
[20:39:49] Ox0dea: sphex: Method lookup essentially just ascends the ancestor chain until it finds the method; if it doesn't find it anywhere, it starts over looking instead for a definition of #method_missing.
[20:40:06] Ox0dea: It's how the ancestor chain obtains its links that can be tricky.
[20:40:37] j4d: has joined #ruby
[20:41:28] cochise: has joined #ruby
[20:41:36] danzilio: has joined #ruby
[20:42:21] silkfox: has joined #ruby
[20:42:21] sumark: has joined #ruby
[20:44:24] tkuchiki: has joined #ruby
[20:44:49] hahuang65: has joined #ruby
[20:45:08] swgillespie: has joined #ruby
[20:45:14] Ox0dea: axisys: Does it help to point out that your `clusters` is an array of one element?
[20:45:31] tomphp: has joined #ruby
[20:46:06] mdarby: has joined #ruby
[20:46:22] axisys: puts clusters gives #<RbVmomi::VIM::ObjectContent:0x00000003906a98> and yes today it is but I like to prepare for multiples
[20:46:48] axisys: http://dpaste.com/22M20F2.txt
[20:46:55] solars: has joined #ruby
[20:47:13] Senjai: Ox0dea: It wasn't advice, it was an answer :P
[20:47:25] adamski2600: has joined #ruby
[20:48:25] Musashi007: has joined #ruby
[20:48:27] Ox0dea: An answer is arguably the platonic ideal of advisement.
[20:48:28] Kully3xf_: has joined #ruby
[20:51:12] jtdoncas: has joined #ruby
[20:51:27] jenrzzz: has joined #ruby
[20:51:38] Alayde: has joined #ruby
[20:52:29] mistermocha: has joined #ruby
[20:52:54] Hanmac: has joined #ruby
[20:53:23] lxsameer: has joined #ruby
[20:53:23] lxsameer: has joined #ruby
[20:54:20] bruno-: has joined #ruby
[20:56:07] postmodern: has joined #ruby
[20:56:23] gambl0re: has joined #ruby
[20:57:30] mwlang: has joined #ruby
[20:58:40] mistermocha: has joined #ruby
[20:58:48] sphex: if I ever figure out ruby's class system correctly.. I'm gonna write a tutorial. the one that I would have needed. "singleton classes for simpletons"
[20:59:00] vdamewood: has joined #ruby
[20:59:33] mwlang: So I???m going through a new project and I encountered this: https://gist.github.com/mwlang/84090a1c092ab152df55 (glance at it at your own sanity???s risk!)
[20:59:35] blueOxigen: has joined #ruby
[21:00:07] mwlang: I actually had to turn on soft-wrapping in my editor to fully appreciate that one.
[21:00:25] mike___1234: has joined #ruby
[21:00:31] Ox0dea: mwlang: Could be worse. http://code.iamcal.com/php/rfc822/full_regexp.txt
[21:00:34] apeiros: somebody doesn't know that regexen can be composited
[21:00:35] jhass: I like how fast it must be to that little backtracking
[21:01:21] apeiros: also superduper that all strings now know whether they're a valid email address???
[21:02:56] mwlang: most email validations I???ve seen are just simple one liners. I don???t know about y???all, but just validate it has the prerequisite components, send an email to the person and have ???em verify the email by clicking the token link.
[21:02:58] duncannz: has joined #ruby
[21:03:05] felixr: mwlang: http://regexpal.com/
[21:03:19] apeiros: mwlang: that strategy has a huge flaw
[21:03:19] eam: what are the prerequisite components?
[21:03:48] apeiros: a) in some places you don't want to send an email
[21:03:50] mwlang: alright, apeiros, enlighten me.
[21:04:06] mwlang: apeiros: this is for a new user sign up form???
[21:04:12] apeiros: b) in some places you get a huge drop in registrants due to invalid email addresses and people not fixing it
[21:04:23] Limix: has joined #ruby
[21:04:27] mwlang: so let???s say its for the purposes of collecting a ???real user???s??? email.
[21:05:09] eam: if you don't send an email and get positive confirmation the email very likely is bogus
[21:06:21] jonathanwallace: has joined #ruby
[21:07:30] mwlang: eam, I???ve used a few repexp over the years, but basically, just something like this: [A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}
[21:07:43] ixti: has joined #ruby
[21:08:03] hotpancakes: has joined #ruby
[21:08:04] sphex: mwlang: email addresses can have double-quotes and backslash escapes in their "local" component. but those are very rarely accepted by web forms.
[21:08:05] bruno-: has joined #ruby
[21:08:06] jhack: I'm a little confused with exercism.io lol
[21:08:22] jhack: I can't seem to see other peoples exercises that they're working on..?
[21:08:26] jhack: in the ruby section
[21:09:07] mwlang: jhack: for a moment I thought you were misspelling exorcism (which is what I def. want to do on this new project). :-)
[21:09:07] havenwood: jhack: Complete the exercise yourself first.
[21:09:11] Notte: has joined #ruby
[21:09:46] jhack: havenwood, i have completed the hello-world project already
[21:10:01] felixrsmith: has joined #ruby
[21:10:10] havenwood: jhack: And you can't see others' hello-world?
[21:10:33] jhack: its under Ntpick > Ruby, right?
[21:10:37] msgodf: has joined #ruby
[21:10:38] havenwood: jhack: Did you finalize it, or whatever it's called. Submit that you're done modifying it based on comments?
[21:10:46] jhack: havenwood: yeah
[21:11:10] MagePsycho: has joined #ruby
[21:11:54] shevy: havenwood you working on any cool projects lately?
[21:12:02] havenwood: jhack: Yeah, when I click the same I see what I've finished.
[21:12:04] mwlang: I guess my point with the regexp for email validation is why go to such extremes when the end goal is a user???s email you???re going to send an email to anyway? (in our case, new user signup). I personally can???t even read and understand that regexp.
[21:12:14] havenwood: shevy: Did you see my Elixir stdlib in Ruby thing?
[21:12:21] shevy: nope, what is that?
[21:12:27] mwlang: and I look at it and think, ???there???s guaranteed to be a bug there."
[21:12:43] jhack: havenwood: do you see other peoples projects?
[21:12:52] dagda1: has joined #ruby
[21:13:02] mdarby: has joined #ruby
[21:13:21] Antiarc: mwlang: Agreed; I just validate "something@anything.anything"
[21:13:29] jhack: havenwood: wth
[21:13:30] acke: has joined #ruby
[21:13:37] Antiarc: Valid emails can be completely nutso
[21:13:38] mistermocha: has joined #ruby
[21:14:12] mdarby: has joined #ruby
[21:14:16] apeiros: mwlang: nice. you disallow all IDN email addresses
[21:14:17] mwlang: now???.if I were a service like evite.com where one can paste a giant list of emails???.I could see something like this being a good idea.
[21:14:37] apeiros: mwlang: also probably a couple of the new TLDs
[21:15:39] platzhirsch: has joined #ruby
[21:15:39] yorickpeterse: The only valid Email regex is /[^@]+@[^@]+/
[21:15:46] yorickpeterse: or maybe just /.+/
[21:15:53] mwlang: apeiros: yeah. Important if you want International users???but most of my clients are solely concerned with US-based customers.
[21:16:11] bougyman: yorickpeterse: /@/ suffices
[21:16:25] havenwood: shevy: https://github.com/havenwood/elixir.rb
[21:16:49] danzilio: has joined #ruby
[21:16:54] shevy: you churn out lots of code!
[21:16:59] sharpmachine: has joined #ruby
[21:17:08] havenwood: shevy: Run the tests, Wheeee!
[21:17:15] yorickpeterse: bougyman: good point
[21:17:19] mwlang: yorickpeterse: I think I???ll just adopt your first form.
[21:17:28] gambl0re: has joined #ruby
[21:17:31] yorickpeterse: Seriously, just send an Email
[21:17:39] yorickpeterse: then you're absolutely sure it's actually valid _and_ working
[21:18:02] havenwood: shevy: e.g.: https://github.com/havenwood/elixir.rb/blob/master/lib/elixir/stream.rb
[21:18:11] apeiros: yorickpeterse: see above flaws. but yes, if you can send an email, even if you validate, do send one.
[21:19:01] christiandsg: has joined #ruby
[21:19:04] jhass: I wanted to save a nice image of it so you could print a poster, but it breaks the image export of https://jex.im/regulex :(
[21:19:06] havenwood: shevy: Try it out! :)
[21:19:17] gamename: has joined #ruby
[21:19:22] JMoir: has joined #ruby
[21:21:01] hotpancakes: has joined #ruby
[21:21:34] bruno-: has joined #ruby
[21:21:36] peter_paule: has joined #ruby
[21:22:10] Juanchito: has joined #ruby
[21:22:13] Scripore: has joined #ruby
[21:22:44] jtdoncas: has joined #ruby
[21:23:46] v4n: has joined #ruby
[21:24:01] tkuchiki: has joined #ruby
[21:25:07] v4n: Are Puma Threads and Workers synonyms? As I understand a Cluster is a forked process that runs Threads (Workers?).
[21:26:07] leonardoajim: has joined #ruby
[21:27:17] havenwood: v4n: Yes, each worker is a Thread in the pool.
[21:27:30] iamninja: has joined #ruby
[21:27:44] momomomomo: has joined #ruby
[21:27:45] vvgomes: has joined #ruby
[21:27:51] Kully3xf: has joined #ruby
[21:27:52] havenwood: v4n: https://github.com/puma/puma/blob/master/lib/puma/thread_pool.rb#L61-L117
[21:28:40] icebourg: has joined #ruby
[21:28:47] mwlang: jhass: are you saying you tried that massive regexp I gist???d to jex.im?
[21:28:53] v4n: havenwood: good to know. Any idea what's the benefit of having more than 1 Cluster? If I want more Concurrency I could just increase the Thread count.
[21:29:13] Antiarc: Are you on MRI or jruby?
[21:29:24] Antiarc: MRI can't use more than 1 core's worth of CPU per process
[21:29:25] quimrstorres: has joined #ruby
[21:29:31] jhass: mwlang: sure, it works fine if you replace the octal stuff with hex escapes
[21:29:39] jhass: except for the image export
[21:29:52] paulcsmith: has joined #ruby
[21:29:59] jhass: let's see if copy pasting the generated svg works
[21:30:23] mwlang: ah, I bet that???s a fun visual. I wouldn???t mind seeing it if you get it to save.
[21:31:22] mwlang: whatever happened to SMTP???s query email validity feature? I know that???s been around forever, but not all SMTP servers correctly implemented it, so it never really got adopted as a way to validate emails.
[21:31:34] shtirlic: has joined #ruby
[21:32:09] havenwood: v4n: ^ what Antiarc said. Here's a series of articles if you want to read about CRuby's GVL (Global VM Lock): http://www.jstorimer.com/blogs/workingwithcode/8085491-nobody-understands-the-gil
[21:32:21] djbkd: has joined #ruby
[21:32:42] v4n: Antiarc: I'm using MRI
[21:32:50] momomomomo: JRuby is pretty dope
[21:32:55] Antiarc: You will want 1 process per core in your CPU then
[21:32:58] v4n: havenwood: thanks
[21:33:00] Antiarc: To fully utilize the box
[21:33:06] Antiarc: Or use jruby and get all cores with one process :)
[21:33:43] shazaum_: has joined #ruby
[21:33:54] apeiros: havenwood: uh, no? each worker is a process. and each process has a thread-pool.
[21:33:57] Antiarc: threading in MRI is mostly nice for parallelizing IO-heavy work; it won't help you with CPU-intensive stuff.
[21:34:06] GPrime: has joined #ruby
[21:34:21] apeiros: havenwood: i.e. puma forks + threads
[21:34:24] momomomomo: apeiros: are we talking about straight ruby or something like puma
[21:34:45] dagda1: has joined #ruby
[21:34:54] momomomomo: apeiros: "On MRI, there is a Global Interpreter Lock (GIL) that ensures only one thread can be run at a time. But if you're doing a lot of blocking IO (such as HTTP calls to external APIs like Twitter), Puma still improves MRI's throughput by allowing blocking IO to be run concurrently (EventMachine-based servers such as Thin turn off this ability, requiring you to use special libraries). Your mileage may vary. In order to get the best throughput, it i
[21:34:54] momomomomo: highly recommended that you use a Ruby implementation with real threads like Rubinius or JRuby."
[21:34:58] momomomomo: from puma docs
[21:35:03] apeiros: momomomomo: I'm talking about "v4n: Are Puma Threads and Workers synonyms?" - "havenwood: v4n: Yes" - and that's wrong
[21:35:22] Antiarc: (ps jruby is awesome)
[21:35:39] momomomomo: ah gotta go meeting
[21:36:02] havenwood: apeiros: hrm?
[21:36:57] paulcsmith: has joined #ruby
[21:37:37] baweaver: has joined #ruby
[21:37:53] apeiros: havenwood: I'd love to answer your question, but can't do much with "hrm?" :-)
[21:38:05] Scripore: has joined #ruby
[21:38:21] paulcsmith: has joined #ruby
[21:39:06] havenwood: apeiros: The Puma ThreadPool is started with "workers" which are Threads.
[21:39:35] apeiros: unless they badly reuse the term worker, that's incorrect. workers are processes in puma.
[21:39:37] havenwood: apeiros: The code I linked above ^. I'm not following what you mean.
[21:39:39] apeiros: and each process has threads.
[21:40:28] apeiros: see https://github.com/puma/puma "Clustered Mode". --workers to control forking, -t to control threads per worker
[21:40:31] pengin: has joined #ruby
[21:40:36] Antiarc: per the puma doc, workers are the number of processes in a cluster
[21:40:44] crdpink2: has joined #ruby
[21:40:50] Antiarc: And each process runs a threadpool of -t threads
[21:41:05] havenwood: okay, so term reuse
[21:41:05] jhack: what does arr do again? finds the array?
[21:41:25] Antiarc: jhack: It emphasizes your point, if you're a pirate
[21:42:32] apeiros: havenwood: shame on them :<
[21:42:46] havenwood: v4n: So I retract what I said. I've contributed to the ThreadPool code so that's what I'm most familiar with. I got confused.
[21:42:56] olistik: has joined #ruby
[21:43:24] havenwood: apeiros: Thanks for the correction, I *should* have kept them straight. Looking at the command line args it's coming back to me.
[21:43:42] apeiros: masterpedant loves to correct
[21:43:50] Antiarc: you kids and your "clusters" and "threads" these days. Back in my day, we managed a pack of single-threaded mongrels manually. Uphill. Both ways. In the snow.
[21:45:12] mwlang: Antiarc: you forgot a bit???.???without electricity??? :-D
[21:45:29] Antiarc: Damn straight. If I wanted to serve a web request, I had to pull out the hand crank.
[21:45:48] mwlang: I still remember the night I switch an entire cluster of 70+ servers from mongrel to Passenger.
[21:46:03] Antiarc: I'll bet that was a good day.
[21:46:11] mando: has joined #ruby
[21:46:43] mwlang: That???s 70 different Rails apps???yeah, it was a great day???I went home at 4am, came in the next afternoon and everybody wanted to know what I did last night.
[21:46:51] sharpmachine: has joined #ruby
[21:47:00] gamename: has joined #ruby
[21:47:05] Jacky: "Just saved us a whole bunch of money by switching to Geico, that's what."
[21:47:15] mwlang: My first question was, ???why? what???s broke???? They said, ???nothing???its just that not one single crash report???s come in yet."
[21:47:55] mwlang: That comment made my year.
[21:47:58] Antiarc: OTOH, mongrel did a good job of forcing you to build redundant, monitored systems.
[21:48:17] havenwood: apeiros: Think I might submit a PR to clear up the nomenclature internally. Will ponder.
[21:48:38] mwlang: Antiarc: indeed. Mongrel is the reason I know how to virtualize the fluie out of everything.
[21:48:55] workmad3: has joined #ruby
[21:49:14] Antiarc: havenwood: Since you seem to have your fingers in puma, is there any plan for zero-downtime reloads under non-forking runtimes (ie, jruby)?
[21:49:18] mwlang: Xen would not be in my backpack without Mongrel.
[21:49:24] Antiarc: We're on torquebox right now but jboss makes me cry with many sads
[21:51:11] havenwood: Antiarc: How about fork and exec via ffi?
[21:51:43] Antiarc: The JVM doesn't support forking, I'm not sure you could even do it via ffi
[21:52:15] apeiros: havenwood: I'm curious - what will you use internally as name?
[21:52:20] zacstewart: has joined #ruby
[21:52:32] havenwood: apeiros: That's what I'd need to ponder. :O
[21:52:47] apeiros: I think I had the same problem before. trying to remember with what I settled.
[21:52:57] Antiarc: Whoa, okay, headius has a post on doing so
[21:52:59] Antiarc: Wellll now.
[21:53:02] Antiarc: I'm going to do some reasing.
[21:53:06] eam: you can fork the jvm
[21:53:26] havenwood: Antiarc: Yeah, I don't have experience setting it up personally. I'll have to try that.
[21:53:48] Antiarc: Ah, but that'd be multiple JVM instances. Hrm.
[21:54:06] havenwood: Line em up!
[21:54:08] eam: forking any GC'd language is fraught with peril
[21:54:21] Jamal: has joined #ruby
[21:54:23] apeiros: eam: hm? because of COW?
[21:54:43] havenwood: eam: though it's really not forking, just exec
[21:54:43] tilllt: has joined #ruby
[21:54:46] eam: because of non-determinism in finalizers
[21:55:12] eam: havenwood: oh, in that case just vfork / create_process
[21:55:36] eam: er, create_process? I mean posix_spawn
[21:56:00] eam: havenwood: is this starting up a new server without downtime in the old one?
[21:56:08] havenwood: bug sprayer coming through, must evacuate to safety
[21:56:36] apeiros: havenwood: best I came up with so far is "processor". not happy about it :-|
[21:56:56] havenwood: eam: sorry, i think i'm equivocating - puma internally just execs but i guess we're also discussing forking the jvm
[21:57:00] havenwood: back in a few
[21:57:23] jhass: mwlang: didn't manage to render a viewable PNG (stuff breaks at 70k x 2.5k pixels), but just enter http://paste.mrzyx.de/pkdukxsic/3rvjfc/raw into regulex and give your browser a minute or two to render
[21:57:47] baweaver: has joined #ruby
[21:57:57] mwlang: jhass: ok
[21:58:05] eam: so if it's a server re-exec'ing itself one neat trick is to spin up a new one and use IPC to pass the listening socket from one to the other
[21:58:11] eam: (vs inheriting it across an exec)
[21:58:32] eam: added bonus is you can warm-up the new server before the old one goes away, or even test-load traffic on it, entirely hitless
[21:59:21] eam: I have some example ruby code for that
[21:59:42] hotpancakes: has joined #ruby
[22:00:01] Mendenhall: has joined #ruby
[22:00:22] mwlang: jhass: looks like a lot of the same thing is repeated over and over.
[22:00:32] blaines: has joined #ruby
[22:01:52] mwlang: but this is a nice tool. You???ve introduced me to several regexp sites that are quite useful.
[22:04:02] danzilio: has joined #ruby
[22:04:02] jhass: I find it a bit weird how it seems to allow tabs and newlines everywhere
[22:04:04] tilllt: hi people. i am a ruby beginner and i fear the (simple) project i chose is beyond what i can figure out without some help. basically i want to write a program that copies a file from one place to another as quickly as possible, BUT creating checksums of the original and the destination file. i figured that the ???zero copy??? approach (http://www.bigfastblog.com/zero-copy-transfer-data-faster-in-ruby) probably is the fastest way possible for the copy process its
[22:04:05] tilllt: (at least while you are on linux) and xxHash (https://github.com/justinwsmith/xxhash) is the fastest hashing algorithm, so these two in combination could be a good approach. the IO.splice used for zero copy also comes with an IO.tee example, but i fail to understand if it is possible to ???pipe??? an input file to the hashing algorithm with tee and at the same time write it to a destination file??? by chance anyone here knows about these approaches and point me i
[22:04:06] tilllt: the right direction?
[22:04:10] ruboto: Please use https://gist.github.com for more than three lines of text!
[22:05:17] shevy: ?godzilla
[22:05:18] ruboto: I don't know anything about godzilla
[22:05:23] jhass: meh, it actually is three lines :D
[22:05:27] mwlang: jhass: yeah, I saw that. I really have no idea what the previous developers were thinking. It???s almost like they grabbed one of the RFC ones linked earlier.
[22:05:56] jhass: I've seen regex generators for some RFCs
[22:06:11] jhass: wouldn't be surprised if this is generated in fact
[22:06:15] baweaver: ? 'that, but I do know why kids love cinnamon toast crunch'
[22:06:24] baweaver: ?'that, but I do know why kids love cinnamon toast crunch'
[22:06:30] vdamewood: has joined #ruby
[22:06:50] al2o3-cr: tilllt: probably look at IO.copy_stream
[22:06:57] blaines: has joined #ruby
[22:07:19] al2o3-cr: that is, if you are using IO
[22:08:45] apeiros: jhass: regulex better than debuggex?
[22:08:51] vdamewood: has joined #ruby
[22:08:52] tilllt: al2o3-cr: i managed to use the IO.splice code fine and make a copy of a file, it is very fast, faster than linux ???cp??? i think.??? the question is, am i on the wrong path thinking that i could use IO.tee to additionally create a checksum while reading the file???
[22:09:09] jenrzzz: has joined #ruby
[22:09:29] j_mcnally: has joined #ruby
[22:09:32] mwlang: tilllt: if speed is your biggest concern, you may want to go with a compiled language ??? especially if you???re aiming to operate on entire disk volumes.
[22:09:33] jhass: apeiros: regulex renders nicer IMO (and handles bigger inputs if you give it some time), but it doesn't do anything beyond rendering
[22:09:56] apeiros: well, the mail regex rendered quickly enough :)
[22:10:09] al2o3-cr: well tee'ing is going to be considerably slowing things down
[22:10:15] jhass: most time is your browser rendering the generated svg, yeah
[22:10:26] polpak: has joined #ruby
[22:10:37] x1337807x: has joined #ruby
[22:10:53] mwlang: tilllt: doing zero-copy means your app isn???t interested in the data that???s being transferred, so you???re cutting the middle-man (your app) out of the process. The kernel does the work and lets you know when it???s done. However computing CRC means you are interested in the data, so the two seem mutually exclusive to me.
[22:11:32] zenspider: hard linking and shelling out to md5 cmdline seems the fastest in my mind (not measured)
[22:11:56] pengin: has joined #ruby
[22:13:06] tilllt: mwlang: thats what i feared, yes. still, zero copy is so much faster then a regular copy, that i think it might be still a good approach to copy the file and then create the checksum hashes afterwards. so i guess that zero copy also implies that the file is not cached, so successive reads will not access a cached version (and benefit from that, speedwise) but read the entire file again for hashing?
[22:13:15] FernandoBasso: has joined #ruby
[22:14:27] mwlang: tilllt: yeah, you???re going to read the file twice in your scenario, as far as I can tell.
[22:14:33] zenspider: you only need to hash one of them, right?
[22:14:47] mwlang: ???and without digging into Linux system level api docs???.
[22:14:56] tilllt: zenspider: no, both. i need to make sure the file is identical.
[22:15:26] zenspider: tilllt: why are you testing whether the copy worked? it'll error out if it didn't work
[22:15:31] NeverDie: has joined #ruby
[22:15:38] mwlang: tilllt: http://stackoverflow.com/questions/12900538/unix-fastest-way-to-tell-if-two-files-are-the-same
[22:15:39] eam: ruby is the wrong language for this level of optimization
[22:16:06] tilllt: zenspider: md5 is overkill (from my research for data integrity), i dont need a cryptographic hash. https://code.google.com/p/xxhash/
[22:16:21] freerobby1: has joined #ruby
[22:16:25] Timba-as: has joined #ruby
[22:16:32] davedev24_: has joined #ruby
[22:16:34] tilllt: zenspider: check the link to give you an idea of checksum algorithm speed comparison
[22:17:37] zenspider: still doesn't address my question
[22:17:43] postmodern: has joined #ruby
[22:18:51] havenwood: has joined #ruby
[22:19:49] christiandsg: has joined #ruby
[22:19:49] arcanez: has left #ruby: ()
[22:20:31] tilllt: i want to build a system that copies video / audio files, on-set, to several backup volumes (insurances usually require at least 3 copies). This data might then be transferred to other facilities and be processed again. if a file is corrputed on any of these steps, i need to be able to document on any of these distribution steps that the data is entirely intact. so i think there is no way around checksums.
[22:20:50] ixti: has joined #ruby
[22:21:16] Antiarc: I'd just use rsync ;)
[22:21:23] eam: tilllt: are the files larger than RAM?
[22:21:43] tilllt: think hundreds of GB
[22:21:46] mistermocha: has joined #ruby
[22:21:48] eam: yeah, it might make sense to build your own copy command then
[22:21:48] tilllt: in worst case
[22:21:56] duncannz: has joined #ruby
[22:22:02] eam: cp breaks down at edge cases with extremely large sets of files - so does rsync
[22:22:13] Scroff: has joined #ruby
[22:22:27] zenspider: there's a multi-dest rsync variant
[22:22:27] eam: tilllt: but, if you really care you should also make sure to use a filesystem which takes care of this for you
[22:22:36] zenspider: but I don't think you'll benefit if this is local volumes
[22:22:37] eam: like zfs
[22:22:48] zenspider: but, I'm not sure you can do zero-copy across volumes
[22:22:55] eam: see the CERN paper on bit-flips per GB, you'll get some at that size
[22:23:48] tilllt: eam: i cant force the people that are going to use the system to any kind of filesystem. this entirely depends on what they need to pass to their editors, so this might be NTFS / HFS / ext3 or whateve they need in their editing suites???
[22:24:27] eam: fair. So, you definitely want a rolling checksum as you copy
[22:24:55] tilllt: obviously zfs or btrFS would have some advantages for data integrity. but thats not the reality on a film-set :)
[22:24:55] eam: I wouldn't worry about the cost of copying -- the cost of writing to disk will be many orders of magnitude higher
[22:25:09] eam: you should be able to ignore the cost of copying the buffer in ram
[22:25:39] eam: zerocopy matters when it's a webserver serving the same file from vfs cache a million times
[22:25:49] eam: it won't help much when your dataset > RAM
[22:27:10] eggoez: has joined #ruby
[22:27:29] Leef_: has joined #ruby
[22:28:21] eam: tilllt: but, just running `md5` on the file post-copy is still probably the best
[22:28:32] tilllt: eam: so you are saying that if file > ram, i can just use any kind if IO read / write and it will be the same speed?
[22:28:34] zenspider: very interesting talk about video processing w/ huge datasets ... at... cascadia
[22:28:36] zenspider: https://www.youtube.com/watch?v=0y2Sok9ikj8
[22:28:42] mistermocha: has joined #ruby
[22:28:51] tilllt: zenspider: thanks i will take a look.
[22:29:00] zenspider: its gonna go through the same bottleneck every time
[22:29:05] xtsee: has joined #ruby
[22:29:22] eam: tilllt: essentially. https://gist.github.com/jboner/2841832
[22:29:43] techietrash: has joined #ruby
[22:29:47] momomomomo: has joined #ruby
[22:30:01] eam: the cost of putting 4k on disk is maybe 10,000 times more than the cost of copying 4k in memory (or the cost of checksumming it)
[22:30:15] tilllt: eam: from my research md5 is really not the optimal algorithm for my purpose, again: https://gist.github.com/tilllt/8fc9b9de1a037126bb7f
[22:30:22] eam: so if you're looking to optimize that memory copy, you're looking to do a 0.001% optimization
[22:30:31] eam: tilllt: again, that's a 0.01% speed issue
[22:30:41] eam: your overwhelming cost will be reading the bytes off the platters
[22:31:08] eam: it's like planning a road trip across the US, then arguing over which side of the gas station is faster to pull up to
[22:31:20] baweaver: has joined #ruby
[22:31:50] metus: has joined #ruby
[22:32:01] zenspider: that's a great analogy
[22:32:12] tilllt: well, the source media that contains the data files will probably anything from SSD???s to SD Cards, CFAST, CF ??? some of those (especially SSD) are quite fast???
[22:32:16] eam: car analogies ftw
[22:32:31] eam: tilllt: yeah, ssd can maybe get it to 100x
[22:32:38] eam: memory is still massively faster
[22:32:41] zenspider: not fast enough
[22:32:50] eam: (a top of the line ssd like a FusionIO)
[22:33:32] eam: tilllt: by all means, use the checksum you want, though
[22:33:50] eam: but benchmark your entire process before you put too much time into any optimization
[22:34:22] apeiros: xxhash seems to have a command utility too
[22:34:33] apeiros: at least one is in the PRs
[22:34:35] tilllt: it has a ruby gem ;)
[22:34:48] tilllt: https://github.com/justinwsmith/xxhash
[22:34:56] apeiros: ruby probably adds quite a bit of overhead too
[22:35:19] apeiros: i.e. reading with ruby and checksumming there is probably quite a bit slower than using the xxhash command utility
[22:35:23] eam: you can't really do zerocopy in ruby at all, unless the entire mechanism is hidden in an extension
[22:35:34] tilllt: io_splice ?
[22:35:49] tilllt: http://bogomips.org/ruby_io_splice/
[22:36:17] eam: that'd be one such extension
[22:36:22] eam: but then you can't read the data to checksum it
[22:36:35] havenwood: Release... the GVL!!
[22:36:39] mwlang: I???m so behind the times??? ???Note : as Google Code is closing, the new official xxHash repository is now on Github??????
[22:37:09] tilllt: apeiros: there is also a ruby wrapper around the c version of xxhash, i guess that should be pretty much the same as the command line version??? https://github.com/nashby/xxhash
[22:37:09] brettnem: has joined #ruby
[22:37:15] tilllt: speedwise
[22:37:55] al2o3-cr: it will be in ruby 3.0 (hopefully) :D
[22:38:10] al2o3-cr: ACTION crosses fingers
[22:38:11] eam: tilllt: note the ruby gem for xxhash requires you to have the entire file in memory :)
[22:38:34] eam: ah, no, there's a stream interface
[22:38:46] tilllt: yeah, thats what i was trying to use...
[22:39:01] bricker: has joined #ruby
[22:39:09] Ropeney: has joined #ruby
[22:39:12] eam: tilllt: if you're doing this in ruby, just read 4k chunks, and write them into the xxhash IO object and the destination file object
[22:39:21] eam: don't sweat the copying
[22:39:51] eam: the read/write will be even in the best case with a $10k FusionIO backing drive still 99% of the time spent
[22:40:11] Senjai: tilllt: Do you have a speed problem?
[22:40:12] eam: now, if you really want to go fast, you could investigate parallel copies
[22:40:28] Senjai: If you do, then worry about your algorithm, if you dont, waste all the resources you want
[22:40:44] eam: slice the file into N threads where N is the optimal parallelism for your storage device (say N spindles of disk drives)
[22:40:55] eam: and have each thread write 1/N of the file
[22:41:09] danzilio: has joined #ruby
[22:41:20] jimmiejohnson: has joined #ruby
[22:41:27] eam: that could give you potentially an order of magnitude speed boost
[22:42:19] tilllt: eam: this is possible in ruby?
[22:43:13] yizr: has joined #ruby
[22:43:14] tilllt: what do i have to look for when researching on parallelizing stuff in ruby?
[22:43:42] eam: you could thread or fork
[22:43:42] gambl0re: has joined #ruby
[22:44:03] mistermocha: has joined #ruby
[22:44:09] eam: you'll want to do a bunch of reading on how to do threaded programming before you tackle that approach though
[22:44:33] eam: it's one of the more complex paradigms folks struggle with
[22:46:15] Xeago: has joined #ruby
[22:46:20] tilllt: yeah, probably too much for me at this point but still a very interesting aspect???
[22:47:05] icebourg: has joined #ruby
[22:48:40] Senjai: tilllt: avdi wrote a decent book on threading
[22:49:25] Senjai: got the author wrong
[22:49:26] icebourg: has joined #ruby
[22:49:28] Senjai: Jesse Storimer
[22:49:32] Senjai: https://pragprog.com/book/jsthreads/working-with-ruby-threads
[22:49:34] Senjai: tilllt: ^
[22:50:06] sarkyniin: has joined #ruby
[22:50:08] tilllt: senja: sounds great, thanks for the link.
[22:50:10] Senjai: It is verry basic
[22:50:20] choke: has joined #ruby
[22:50:22] al2o3-cr: +1 Jesse Storimer
[22:50:25] Senjai: But if you want ruby specific, thats the one I would recommend
[22:50:26] tilllt: perfect for me then ;)
[22:50:48] Senjai: tilllt: After reading it, try writing an IRC bot. It's a great case for writing threaded code
[22:51:03] Senjai: *from scratch*
[22:52:30] avdi: Senjai: hahaha, I was all, I did what now??
[22:52:33] tilllt: i think i???ll centre my ruby learning around this video / audio backup thingy for the moment. sounded simple at first but proves to have a steeper leaning curve then i expected.
[22:52:44] eam: if you wish to write an irc bot from scratch you must first invent the universe
[22:53:14] tilllt: parallel universe?
[22:53:37] eam: tilllt: ;) interestingly, almost any mundane computing problem can become arbitrarily complex in corner cases
[22:53:47] Senjai: avdi: Sorry man, your books are good too
[22:53:50] jenrzzz: has joined #ruby
[22:54:20] Senjai: eam: The only crappiness is around message codes and format
[22:54:44] Senjai: eam: The whole respond while still reading input stuff is kind of a cute thing to do to learn how to write concurrent code
[22:55:07] Senjai: But yeah, you'll run into a lot of complexities with IRC
[22:55:12] but3k4: has joined #ruby
[22:55:20] eam: yeah, still relatively basic compared to say http though
[22:55:31] Senjai: like the fact your bot must respond to a PING every little while to prevent being disconnected
[22:55:34] eam: great for beginners, especially since you can talk to it
[22:55:45] Senjai: I'll leave the rest of the goodies to discover for you
[22:55:46] ramblinpeck: has joined #ruby
[22:56:19] swgillespie: has joined #ruby
[22:56:22] Senjai: When I did mine, I had a ping thread, a input thread, and a response thread
[22:57:01] duoi: has joined #ruby
[22:57:20] avdi: has joined #ruby
[22:57:38] frode15243: has joined #ruby
[22:57:41] vcoinminer: has joined #ruby
[22:57:42] waxjar: has joined #ruby
[22:57:46] alekst_: has joined #ruby
[22:57:56] saintcajetan: has joined #ruby
[22:58:08] skmp: has joined #ruby
[22:58:26] eam: bonus points: one thread, multiplex all the i/o interaction
[22:58:44] eam: parallelism vs concurrency
[22:59:15] rgs: has joined #ruby
[22:59:27] j_mcnally: has joined #ruby
[22:59:28] havenwood: Then use a FiberPool for something.
[23:00:03] bruno-: has joined #ruby
[23:01:02] jesterfraud: has joined #ruby
[23:02:36] vdamewood: has joined #ruby
[23:02:47] acke: has joined #ruby
[23:06:05] devdazed: has joined #ruby
[23:06:38] rqde: has joined #ruby
[23:09:00] Scripore: has joined #ruby
[23:09:01] workmad3: has joined #ruby
[23:09:41] hotpancakes: has joined #ruby
[23:11:00] quimrstorres: has joined #ruby
[23:11:27] rqde: I've pushed https://github.com/rqde/soundboard-demo to OpenShift, but I get a "Something went wrong" message once it's running. Doing rhc tail -a myapp I get this http://pastebin.com/hP7Gud2e . Im new to programming and I have no clue how to approach this (let alone fix it). Can you guys help?
[23:11:27] ruboto: rqde, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/403fcb2a82a3c1d78775
[23:11:27] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[23:11:48] mary5030: has joined #ruby
[23:12:39] pengin: has joined #ruby
[23:12:47] j_mcnally: has joined #ruby
[23:14:07] michael_mbp: has joined #ruby
[23:14:50] paulcsmith: has joined #ruby
[23:17:02] t0rrieri: has joined #ruby
[23:17:38] sharpmachine: has joined #ruby
[23:18:45] hackeron: has joined #ruby
[23:19:55] dstarh: has joined #ruby
[23:20:44] bubbys: has joined #ruby
[23:23:01] zacstewart: has joined #ruby
[23:24:23] Scroff: has joined #ruby
[23:25:40] diegoviola: has joined #ruby
[23:25:45] meph1: has joined #ruby
[23:26:33] ebbflowgo: has joined #ruby
[23:28:26] paulcsmith: has joined #ruby
[23:28:37] sphex: hey. does "extend" have somekind of hook in the source module (like "include" and "included")?
[23:30:21] nertzy2: has joined #ruby
[23:31:25] Channel6: has joined #ruby
[23:33:18] sphex: huh. nevermind. it's "extended". *DURR*
[23:33:19] Olipro: has joined #ruby
[23:35:19] dstarh: has joined #ruby
[23:35:33] zacstewart: has joined #ruby
[23:35:55] yizr: has joined #ruby
[23:37:16] bubbys: has joined #ruby
[23:38:21] havenwood: has joined #ruby
[23:38:44] iateadonut: has joined #ruby
[23:41:34] cndiv: has joined #ruby
[23:45:33] MichaelGG: has joined #ruby
[23:45:51] Olipro: has joined #ruby
[23:46:26] MichaelGG: Hi there! I'd like to use Ruby to use it to make a website (gonna make a simple blog/cms for my company). I've got a lot of experience programming, mostly C/C#/F#. Where should I start? If I use a RoR tutorial will I pickup enough Ruby on the way?
[23:46:41] mando: has joined #ruby
[23:46:55] MichaelGG: Or should I look into a ruby tutorial before touching rails?
[23:47:32] zenspider: probably depends on how you learn
[23:47:54] zenspider: there's a book by david black for teaching ruby to people who's already dove into rails
[23:48:08] Senjai: zenspider: Really
[23:48:19] Senjai: zenspider: Damn, I'd say there are books for everything in ruby these days
[23:48:55] Muhannad: has joined #ruby
[23:49:47] baweaver: I'm writing one too now :D
[23:51:03] MichaelGG: I guess I'm asking if the RoR tutorials from the ror site are suitable for also picking up Ruby or if I need to go learn ruby first. It looks easy enough
[23:51:47] MichaelGG: ive been in webdev for ~ 2 decades so i dont need a beginners guide just tell me what to do in ror/ruby
[23:52:42] cout: if you have experience you can pick up the basics of ruby in a day or so
[23:52:47] finisherr: has joined #ruby
[23:52:53] mistermocha: has joined #ruby
[23:53:34] MichaelGG: ok thanks ill dive in cheers
[23:53:41] baweaver: The Ruby Way and Eloquent Ruby
[23:53:59] t0rrieri: has joined #ruby
[23:54:13] Senjai: MichaelGG: The ones baweaver recommended would be good
[23:54:15] baweaver: The Ruby Way is more of a comprehensive guide, and Eloquent is more of how to do things like a Ruby programmer
[23:54:28] zacstewart: has joined #ruby
[23:54:36] baweaver: Rails 4 in Action was written by members on the channel, but I haven't read it myself yet
[23:54:48] Senjai: I can vouch for it
[23:54:54] baweaver: Radar: R4iA, more of a beginners book or what level in general?
[23:54:58] Senjai: I've read both R3IA and R4IA
[23:55:03] Senjai: It's a beginners book
[23:55:08] Senjai: But its "fast"
[23:55:17] Senjai: because you're actively writing an application while reading
[23:55:18] baweaver: I still need to read it later
[23:55:18] MichaelGG: beginner as in new to ruby/ror not new to programming
[23:55:21] Radar: baweaver: Beginners book for those who have experience with Ruby.
[23:55:22] howdoicomputer: has joined #ruby
[23:55:29] Radar: (basic experience)
[23:55:39] Radar: Say you've been toying around with Ruby for a week... you should be able to pick up R4IA and read it
[23:55:40] MichaelGG: thanks Radar
[23:55:42] baweaver: ^ is one of the authors
[23:55:51] Olipro: has joined #ruby
[23:56:03] Radar: MichaelGG: Read The Well-Grounded Rubyist first :)
[23:56:08] baweaver: sevenseacat whenever they're online too
[23:56:14] Radar: baweaver: in about 30 minutes iirc
[23:56:21] Radar: TWGR is the book that zenspider is thinking of I think
[23:56:30] MichaelGG: Radar, ok I'll do that now
[23:56:40] tkuchiki: has joined #ruby
[23:56:56] baweaver: David Black wrote it, so probably
[23:57:08] Radar: He might be thinking of a prequel to that book too, Ruby for Rails.
[23:57:15] lupine: has joined #ruby
[23:57:15] war_pigs: has joined #ruby
[23:57:15] MichaelGG: Just seems like for building little content sites, Ruby has more community, like it's easy to drop in A/B testing and stuff. Whereas ASP.NET MVC doesnt have that community and python's somewhere in the middle
[23:57:18] Radar: Which is not what I would recommend at all since it's very out of date.
[23:57:26] MichaelGG: should be fun since Ruby's on the other end of the spectrum from what I like
[23:58:19] baweaver: define what you like
[23:58:24] Senjai: MichaelGG: TBH there are more bad resources for learning ruby then there are good ones. Just ask us if a resource your considering is worthwhile.
[23:58:28] jeanlinux: has joined #ruby
[23:58:30] baweaver: because if you're already keen on F# you're going to notice things
[23:58:34] Senjai: It's also a simple language, so yeah.
[23:58:48] symbol: has joined #ruby
[23:59:26] MichaelGG: baweaver, yes I'm much more into statically typed functional programming. And Rust when I need C compat.
[23:59:33] mistermocha: has joined #ruby
[23:59:50] baweaver: http://egonschiele.github.io/contracts.ruby/ - If you _really_ want it
[23:59:59] baweaver: and spend too much time around Haskell