« Back to channel list

#ruby - 29 December 2015

« Back 1 day Forward 1 day »
[00:00:31] djbkd: has joined #ruby
[00:03:37] JACEK-BB: has joined #ruby
[00:04:00] djbkd_: has joined #ruby
[00:04:02] JACEK-BB: has left #ruby: ()
[00:05:37] riceandbeans: if I have a mysql object and I have a prepared statement and I'm doing the execute and it looks like this....
[00:05:43] monsieurp: has left #ruby: ()
[00:06:06] riceandbeans: statement.execute(foo, bar, baz, foobar, foobaz) is it possible to make that span multiple lines without breaking?
[00:06:14] B1n4r10: has joined #ruby
[00:06:51] dfinninger: has joined #ruby
[00:06:55] s00pcan_: has joined #ruby
[00:07:38] kfpratt: has joined #ruby
[00:10:19] graffix222: has joined #ruby
[00:10:44] vikas027: has left #ruby: ()
[00:13:35] wolffles: has joined #ruby
[00:19:53] B1n4r10: has joined #ruby
[00:20:33] houhoulis: has joined #ruby
[00:20:35] TheNet: has joined #ruby
[00:20:49] celly: has joined #ruby
[00:26:04] rvchangue: has joined #ruby
[00:26:05] B1n4r10: has joined #ruby
[00:27:09] nug-: has joined #ruby
[00:27:56] shevy: would it be sensible to subclass from class String?
[00:29:44] jnj: has joined #ruby
[00:29:51] trwyth: has joined #ruby
[00:30:36] jnj: What are some things I should be aware of when deciding to implement data structures and algorithms in ruby? I've used enumerable for my linked list, are there other things I should be aware of that is like that?
[00:31:17] mary5030: has joined #ruby
[00:32:11] wolffles: has left #ruby: ()
[00:32:22] wolffles: has joined #ruby
[00:32:25] jnj: i.e., what are some things I should know to implement dsa the "ruby way"
[00:33:57] kies^: has joined #ruby
[00:35:00] Channel6: has joined #ruby
[00:36:45] sgambino: has joined #ruby
[00:39:22] dotix: has joined #ruby
[00:39:28] baweaver: has joined #ruby
[00:41:17] DLSteve: has joined #ruby
[00:42:34] s00pcan_: has joined #ruby
[00:44:47] Phage: What regex type should I choose for ruby? Python, PHP or JS?
[00:44:54] selfflow: has joined #ruby
[00:45:15] bougyman: pcre-ish, anyway
[00:45:34] Phage: Alright, thanks!
[00:46:19] wolffles: has left #ruby: ()
[00:46:24] selfflow: has left #ruby: ()
[00:46:29] wolffles: has joined #ruby
[00:48:35] shevy: the rubular type! it's my regex god http://rubular.com/
[00:50:34] hxegon: how does this http data translate to ruby? product_property[property_name]=size
[00:50:54] hxegon: is that { product_property => { property_name => 'size' } }?
[00:50:57] devoldmx: has joined #ruby
[00:51:36] duckpuppy: has joined #ruby
[00:56:22] Melpaws: has joined #ruby
[00:57:57] wolffles: yay i can talk again
[00:58:50] havenwood: wolffles: hellooo
[00:59:41] jwinder: has joined #ruby
[01:00:01] pneuma: has joined #ruby
[01:02:19] shevy: hxegon the problem is that this is using the method call [] and you can define [] everywhere
[01:02:39] shevy: hxegon however, the most natural would be to assume a hash, where you just store a key->value entry
[01:03:01] shevy: it also depends on what the variable size would be
[01:03:10] shevy: if it is a string, then it would be 'size' but it could be any other object too
[01:03:33] lucid_: has joined #ruby
[01:03:37] hxegon: size would be a string in this case
[01:03:50] hxegon: really hate ambiguous docs.
[01:04:00] shevy: hmm what is property_name? in your above code it also must be a variable, or a method call
[01:04:31] djbkd_: has joined #ruby
[01:04:34] hxegon: that's quoted from the example in my docs for the spree api
[01:04:41] terminalrecluse: has joined #ruby
[01:05:32] wolfflez: has joined #ruby
[01:05:37] paradisaeidae: has joined #ruby
[01:07:25] moeabdol: has joined #ruby
[01:07:55] GlueC: has joined #ruby
[01:08:22] dfinninger: has joined #ruby
[01:10:13] wolfflez: has left #ruby: ()
[01:10:17] robh71: has joined #ruby
[01:11:01] GlueC: hey all. I have a hash where all values are just strings. I want to eliminate the keys where value is nil. I know I can .select{|n,v| v} , but I feel like I'm missing a useful keyword that does it cleaner. Is there one?
[01:11:48] hxegon: gluec I've used this: https://stackoverflow.com/questions/3450641/removing-all-empty-elements-from-a-hash-yaml
[01:12:21] hxegon: or you could just extract {}.delete_if { |_, v| v.nil? }
[01:12:35] Phage: Can anyone help me make it grap until the next TIL only? http://rubular.com/r/VqG3CQD39w
[01:12:45] Phage: The regex works perfectly in regex101, but not in rubular.
[01:12:51] s00pcan_: has joined #ruby
[01:12:52] shevy: gluec for arrays one could use .compact! ... not sure if such a thing exists for hashes too
[01:13:05] wolfflez: has joined #ruby
[01:13:17] hxegon: shevy gluec it doesn't in core, no.
[01:13:20] colegatron: has joined #ruby
[01:14:05] hxegon: Phage not sure what you want vs what is in the link here...
[01:14:07] shevy: Phage what is the = doing
[01:14:10] wolffles: has joined #ruby
[01:14:11] havenwood: Phage: What do you want different that what it's doing?
[01:14:24] Phage: I want to grap the first TIL
[01:14:29] Phage: It seems to grab way more than that
[01:14:33] shevy: no I mean
[01:14:42] hxegon: shevy it's a negative lookahead AFAIK
[01:14:51] wolffles: k im back, hey havenwood :D
[01:14:57] hxegon: shevy positive, sorry
[01:15:02] GlueC: Thanks hxegon, shevy. All clear now :)
[01:15:35] hxegon: no prob gluec
[01:15:41] krobzaur: has joined #ruby
[01:15:47] senayar: has joined #ruby
[01:15:48] senayar: has joined #ruby
[01:16:52] yfeldblum: has joined #ruby
[01:18:10] havenwood: Phage: http://rubular.com/r/pgv6etsfRJ
[01:18:53] Phage: I read somewhere that Ruby doesn't support negative and positive look-behind?
[01:19:01] Phage: havenwood: You're a wizard <3
[01:19:01] havenwood: Phage: Or I guess I should have just shown a simpler anchor: http://rubular.com/r/eHVEdAhfhD
[01:19:47] havenwood: Phage: Just to show stuff between TILs: http://rubular.com/r/2jHBhBwENQ
[01:20:05] havenwood: s/show/match
[01:20:13] Phage: That's interesting
[01:20:14] hxegon: is there a version of Hash#delete that returns the pair in a new hash?
[01:20:15] Jammy_Work: has joined #ruby
[01:21:16] wolffles: has joined #ruby
[01:21:59] radgeRayden: has joined #ruby
[01:26:01] havenwood: >> class Hash; def hxegon_delete k; {k => delete(k)} end end; h = {aim: true, lies: false}; h.hxegon_delete :aim
[01:26:02] ruboto: havenwood # => {:aim=>true} (https://eval.in/494507)
[01:26:57] nertzy: has joined #ruby
[01:26:59] StevenXL: has joined #ruby
[01:27:03] hxegon: I feel like that should be in core somewhere... thanks havenwood
[01:27:23] StevenXL: Guys - I need help extracting information from a string.
[01:27:25] StevenXL: "\u003cimg alt=\"\" src=\"https://secure.gravatar.com/avatar/b6a99906505214decf1cf8d549cd625c?secure=true\u0026size=38\" width=\"38\" height=\"38\" /\u003e"
[01:27:38] havenwood: hxegon: Well delete returns the value and you've provided the key so don't you have both parts already? Mmm.
[01:28:15] havenwood: stevenxl: That String looks suspiciously like HTML.
[01:28:34] hxegon: I feel a zalgo moment coming along
[01:28:44] StevenXL: havenwood: it is.
[01:29:09] hxegon: stevenxl and your trying to parse it with regex
[01:29:17] StevenXL: I can't insert that string directly because it is escaped, etc, so I just need to get the information out of it.
[01:29:30] TheNet: has joined #ruby
[01:29:39] StevenXL: hxegon: Yea I tried getting the first part of what I need (the url starting with https) with regex.
[01:29:47] StevenXL: I cant' get the result of that to stop in the correct place
[01:30:08] hxegon: stevenxl learn this lesson now: if you try to use regex on html, your asking the devil to come in and have tea.
[01:30:22] bougyman: only if you don't know your data well.
[01:30:38] bougyman: if you know your data, regex is a viable option for a simple match/extract
[01:30:44] hxegon: bougyman true, but for *very* limited cases that are extremely stable.
[01:31:01] StevenXL: hxegon: I believe you, but what are my options in that case?
[01:31:05] bougyman: agree, hxegon
[01:31:19] bougyman: and that's the other case... sometimes regex is the only option.
[01:31:21] hxegon: stevenxl nokogiri is great
[01:31:21] havenwood: stevenxl: What's the return value you're looking for? A single String? An Array of Strings?
[01:31:24] bougyman: malformed html and such.
[01:31:38] havenwood: stevenxl: Are you familiar with Nokogiri or Oga?
[01:32:17] StevenXL: havenwood: it's a single string. I have a view that uses a view helper called gravatar_image. I pass in a user and it automagically inserts that string in my view.
[01:32:44] havenwood: stevenxl: I mean what do you want out of it.
[01:32:50] havenwood: stevenxl: That's the input, what output do you want.
[01:32:52] StevenXL: But now, I need to take that information and return it as a JSON. So I use that helper (with Active Model Serializer) to get the string, and now i need to break it upt because the JSON is escaped and scary.
[01:33:00] StevenXL: havenwood: I need the src, width, height
[01:33:11] StevenXL: just those 3 things
[01:33:26] StevenXL: Then I'm just going to re-create that string from the JSON object in a Handlebars template.
[01:33:57] pabs: stevenxl: use nokogiri or soemthing comparable to parse the html fragment and extract the relevant attributes, then reserialize the result as json
[01:34:19] StevenXL: pabs: OK. You're the 2nd to mention that so I'll give that a try.
[01:34:57] pabs: stevenxl: sure, good luck
[01:37:36] andywojo: has joined #ruby
[01:38:28] slucx: has joined #ruby
[01:38:45] havenwood: stevenxl: require 'oga'; Oga.parse_html("\u003cimg alt=\"\" src=\"https://secure.gravatar.com/avatar/b6a99906505214decf1cf8d549cd625c?secure=true\u0026size=38\" width=\"38\" height=\"38\" /\u003e").children.first.attributes.map { |attribute| [attribute.name, attribute.value] }.to_h
[01:38:45] robh71: has joined #ruby
[01:39:39] havenwood: stevenxl: Give that ^ a try after a: gem install oga
[01:42:08] dingman: has joined #ruby
[01:45:26] houhoulis: has joined #ruby
[01:45:37] StevenXL: pabs: havenwood thank you, but this is not a personal project; it's an oss project and nokogiri is already installed.
[01:45:54] StevenXL: So I'll try and do this with that (if that doesn't pan out, it'l lmake a compelling case for oga)
[01:46:03] nunchuck: has joined #ruby
[01:46:05] havenwood: stevenxl: If Nokogiri is already a dep use that!
[01:46:24] StevenXL: pabs: is it a problem that that I'm feeding nokogiri a string instead of an html doc?
[01:46:47] StevenXL: it's missing <!DOCTYPE html>, etc.
[01:48:19] ElFerna: has joined #ruby
[01:49:13] wolffles: has joined #ruby
[01:49:21] Phage: havenwood: I made a few changes to the text, regex broke now :/ http://rubular.com/r/pLfbDjJh6d
[01:49:43] havenwood: Phage: http://rubular.com/r/Xu8suCuaOv
[01:50:16] Phage: havenwood: I need to catch the "TIL (...)" until the next "TIL" starts.
[01:51:47] seitensei: has joined #ruby
[01:56:29] skade: has joined #ruby
[01:56:51] pawnbox: has joined #ruby
[01:57:02] StevenXL: I still don't know to use nokogiri well, but it's definitely working
[01:57:19] hxegon: stevenxl :)
[01:57:22] StevenXL: just need to read the docs to figure out how to traverse the tree
[01:58:37] shakes: has joined #ruby
[01:58:51] wolffles: would anyone be interested in helping a brother out by showing me how to do this with ruby methods instead of logically. https://eval.in/494508
[01:58:54] hxegon: stevenxl I think it uses css selectors
[01:59:11] RegulationD: has joined #ruby
[02:01:14] hxegon: wolffles I'll take a crack @ it
[02:02:35] colegatron: has joined #ruby
[02:02:54] axisys: has joined #ruby
[02:05:33] djbkd_: has joined #ruby
[02:07:08] shevy: tasty waffles...
[02:07:23] StevenXL: hxegon: yea I was able to use css selectors, then use the attr method, then the value method to get to the actual value of the attribute I wanted
[02:07:34] StevenXL: Intuitive once you get the general concept
[02:07:39] wolffles: shevy do you own a chevy?
[02:07:47] havenwood: wolffles: to_s.each_char.map(&:to_i).slice_when { |*either| either.any? &:odd? }.map(&:join).join '-'
[02:08:25] StevenXL: But now I have a different issue - the link is escaped when it is sent to the client:
[02:08:28] StevenXL: https://secure.gravatar.com/avatar/37e4ccc584b932f01ebe28354ba960b5?secure=true\u0026size=38
[02:08:31] StevenXL: the \u0026.
[02:08:34] havenwood: wolffles: Or: to_s.each_char.map(&:to_i).chunk(&:itself).map { |_, v| v.join }.join '-'
[02:08:38] FooMunki: has joined #ruby
[02:08:59] celly: has joined #ruby
[02:09:01] baweaver: has joined #ruby
[02:09:09] dfinninger: has joined #ruby
[02:09:24] StevenXL: will it not be excaped when I try to render a handlebars template?
[02:10:06] havenwood: wolffles: The latter is wrong. Forgot the whole odd? bit. >.> Anyways the former.
[02:10:58] wolffles: i get this error with former (dasherize_number': undefined method `slice_when' for [0, 0, 0, 0]:Array (NoMethodError))
[02:11:07] havenwood: wolffles: What version of Ruby?
[02:11:19] wolffles: ohh wait yeah i didnt do string
[02:11:28] skcin7: has joined #ruby
[02:12:18] wolffles: yeah no i was wrong again lol, and im using v 2.0.0
[02:12:31] havenwood: 32231.to_s.each_char.map(&:to_i).slice_when { |*either| either.any? &:odd? }.map(&:join).join '-'
[02:12:35] havenwood: >> 32231.to_s.each_char.map(&:to_i).slice_when { |*either| either.any? &:odd? }.map(&:join).join '-'
[02:12:36] ruboto: havenwood # => "3-22-3-1" (https://eval.in/494513)
[02:12:38] ElFerna1: has joined #ruby
[02:12:51] havenwood: wolffles: For #slice_when you'll need a newer Ruby.
[02:13:02] hxegon: I'm like 20 seconds behind you https://eval.in/494512 havenwood
[02:13:05] hxegon: wolffles ^
[02:13:36] hxegon: like yours way better havenwood
[02:13:42] wolffles: time i upgrade
[02:14:00] havenwood: wolffles: Yeah, 2.0 is going to be end of life in less than two months!
[02:14:05] havenwood: wolffles: Ruby 2.3 or bust!
[02:14:35] jottr_: has joined #ruby
[02:14:40] havenwood: wolffles: (Or at least Ruby 2.2.4.)
[02:14:56] sanguisdex: has joined #ruby
[02:15:04] Axsuul: has joined #ruby
[02:16:19] hxegon: oops... just realized my example only works on palindrome numbers :P
[02:16:51] hxegon: forgot to rereverse
[02:17:01] havenwood: hxegon: Silly people using non-palindrome numbers!
[02:17:11] shakes: has joined #ruby
[02:17:14] hxegon: its a feature
[02:18:15] devoldmx: has joined #ruby
[02:19:35] kevinquinnyo1: has joined #ruby
[02:19:42] wolffles: sorry back was doing laundry
[02:19:55] wolffles: dat free wifi at the mat tho :D
[02:20:16] hxegon: wolffles be sure to use protection ;P
[02:20:49] wolffles: orgy.condom?
[02:21:26] hxegon: ruboto: wolffles # => 'VPN'
[02:22:42] wolffles: oh yeah hxegon it doesnt seem to fit the tests cuz its returning false D:
[02:23:35] kevinquinnyo1: hey everyone, I'm new to ruby and I'm wondering if my use of rescue is 'idiomatic' or the 'right way' with ruby. Here's a 5 line gist https://gist.github.com/kevinquinnyo/4d265852f80bc1f5246c
[02:24:30] kevinquinnyo1: dangit NickServ, i thought i authenticated as kevinquinnyo
[02:26:10] hxegon: kevinquinnyo1 what are the possible values of row['Processed'] ?
[02:27:12] dotix: has joined #ruby
[02:27:34] hxegon: kevinquinnyo1 also, if you are using a stdlib CSV::Table, then you can just say row['Processed'] and it will figure it out BTW
[02:28:07] charliesome: has joined #ruby
[02:28:18] hxegon: if your in fact dealing with a CSV table
[02:30:14] arescorpio: has joined #ruby
[02:31:33] kevinquinnyo1: hxegon: it's a value in a google spreadsheet right now, (using google_drive gem) -- it's kind of a proof of concept app at this point, but i wanted to validate that the 'Processed' value was actually processed, and since when I update it, I put in a valid Time, I figured the best way to 'validate' that it has been processed is to check if Time.parse() doesn't throw an exception
[02:32:15] hxegon: kevinquinnyo1 I'm guessing that if it isn't processed, then the row doesn't exist?
[02:32:23] unreal_: has joined #ruby
[02:33:43] gambl0re: has joined #ruby
[02:33:51] hxegon: !value.nil? would be good if referencing a non-existant row returns nil
[02:33:58] kevinquinnyo1: hxegon: well it exists, but it's empty, but if you manaually delete the value in google docs, something is left behind, maybe a '/r/n' or something. That's what led to me wanting to validate it in a way that's slightly better than using empty?
[02:35:50] yqt: has joined #ruby
[02:36:13] kevinquinnyo1: are there any problems using 'rescue' the way i did there, that i should be aware of?
[02:36:41] hxegon: it could cause weird behavior pretty easily
[02:36:48] andywojo: has joined #ruby
[02:37:03] hxegon: I would try #inspect on one of those empty rows and find out what it's leaving behind.
[02:37:42] tomchapin: has joined #ruby
[02:38:01] hxegon: but #empty would be the best way in my opinion.
[02:39:19] joneshf-laptop: has joined #ruby
[02:39:19] hxegon: kevinquinnyo1 also, I would double check to see if you can reference a column header name with that gem. Using indexes for named columns can be a huge headache.
[02:42:25] jackjackdripper: has joined #ruby
[02:42:54] kevinquinnyo1: hxegon: thanks, i will try inspect -- i forgot about inspect. And yes, if i can handle managing the column header names with the gem, it might make my code simple (i have a subroutine / function that handles it for now)
[02:43:43] kevinquinnyo1: hxegon: basically, instead of building an app, i just leveraged google forms + spreadsheets for a prototype
[02:43:52] kevinquinnyo1: because it was easy
[02:44:12] kevinquinnyo1: if you're wondering why i did that
[02:45:38] hahuang65: has joined #ruby
[02:47:15] shevy: you were young and needed the money
[02:47:47] shevy: wolffles aaaah that's always associated with my nick even though it had nothing to do with a chevy!
[02:48:42] juddey: has joined #ruby
[02:48:56] idefine: has joined #ruby
[02:50:12] jetblack: has joined #ruby
[02:52:21] duckpuppy: has joined #ruby
[02:55:33] wolffles: ah hxegon left already
[02:55:34] moeabdol: has joined #ruby
[02:56:03] s00pcan_: has joined #ruby
[02:56:04] hectortrope: has joined #ruby
[02:56:06] wolffles: i did it finally it only took me 40 mins :/
[02:57:10] jetblack: has joined #ruby
[02:57:34] ChanServ: +o havenwood
[02:58:00] pwnd_nsfw: has joined #ruby
[02:58:05] ChanServ: -o havenwood
[02:59:19] auzty: has joined #ruby
[03:05:23] lannonbr: has joined #ruby
[03:06:13] djbkd: has joined #ruby
[03:06:32] sankaber: has joined #ruby
[03:08:14] Yzguy: has joined #ruby
[03:08:20] jackjackdripper: has joined #ruby
[03:09:09] sankaber: has joined #ruby
[03:09:13] lacuna_: has joined #ruby
[03:09:54] dfinninger: has joined #ruby
[03:10:29] s00pcan_: has joined #ruby
[03:13:47] jottr_: has joined #ruby
[03:16:15] blackgoat: has joined #ruby
[03:17:04] pawnbox: has joined #ruby
[03:17:11] Melpaws: has joined #ruby
[03:17:23] blackgoat: has joined #ruby
[03:18:15] Trynemjoel: has joined #ruby
[03:19:21] shevy: hah this is funny
[03:19:29] shevy: Python 2.7.3 or greater (but not Python 3) is required to build. You are running Python 3.5.1.
[03:19:39] shevy: firefox source does not like a too new python version for its build
[03:21:01] Melpaws: has left #ruby: ()
[03:21:21] rahul_j: has joined #ruby
[03:22:35] gokul: has joined #ruby
[03:23:02] gokulnath: has joined #ruby
[03:25:18] havenwood: shevy: two snakes is too many snakes
[03:25:22] jackjackdripper: has joined #ruby
[03:27:36] s00pcan_: has joined #ruby
[03:27:41] mcmire: has joined #ruby
[03:28:43] robbyoconnor: has joined #ruby
[03:29:34] lacuna: has joined #ruby
[03:29:35] lacuna: has joined #ruby
[03:29:54] dfinninger: has joined #ruby
[03:30:03] davedev24: has joined #ruby
[03:32:00] davedev24: has joined #ruby
[03:37:37] krz: has joined #ruby
[03:44:07] s00pcan_: has joined #ruby
[03:46:53] djbkd: has joined #ruby
[03:48:52] gambl0re: has joined #ruby
[03:50:50] connor_goodwolf: has joined #ruby
[03:52:44] wolffles: has joined #ruby
[03:56:11] Dreamer3: has joined #ruby
[03:56:59] kalopsian: has joined #ruby
[03:57:05] celly: has joined #ruby
[03:59:26] devbug_: has joined #ruby
[04:00:03] radgeRayden: has joined #ruby
[04:00:48] hagabaka: has joined #ruby
[04:03:38] charliesome: has joined #ruby
[04:09:14] hahuang65: has joined #ruby
[04:09:17] rkazak: has joined #ruby
[04:11:07] ss_much: has joined #ruby
[04:15:29] JoshGlzBrk: has joined #ruby
[04:15:51] dotix: has joined #ruby
[04:16:35] pawnbox: has joined #ruby
[04:16:39] TheNet: has joined #ruby
[04:16:50] braincras: has joined #ruby
[04:20:54] seitensei: has joined #ruby
[04:20:54] seitensei: has joined #ruby
[04:22:04] yes`r: has joined #ruby
[04:22:26] devbug_: has joined #ruby
[04:25:18] yfeldblum: has joined #ruby
[04:27:26] rkazak: has joined #ruby
[04:28:10] kalopsian: has joined #ruby
[04:37:37] rkazak: has joined #ruby
[04:38:05] wolffles: has joined #ruby
[04:39:10] finisherr: has joined #ruby
[04:43:35] lacuna: has joined #ruby
[04:43:36] moeabdol: has joined #ruby
[04:49:09] robh71: has joined #ruby
[04:52:55] the_nick_me: has joined #ruby
[04:53:03] tjbiddle: has joined #ruby
[04:53:05] duckpuppy: has joined #ruby
[04:53:16] nisstyre: has joined #ruby
[04:56:18] hdmsuckscock: has joined #ruby
[04:56:28] pawnbox: has joined #ruby
[04:57:10] RegulationD: has joined #ruby
[04:57:32] gambl0re: has joined #ruby
[04:57:51] smactive: has joined #ruby
[04:58:26] waka: has joined #ruby
[04:58:56] shanemcd: has joined #ruby
[05:02:17] wolffles: has joined #ruby
[05:02:33] duckpuppy: has joined #ruby
[05:03:53] tildes: has joined #ruby
[05:04:24] redeeem: has joined #ruby
[05:08:56] nickjj: has joined #ruby
[05:09:19] moei: has joined #ruby
[05:12:58] lacuna: has joined #ruby
[05:12:58] lacuna: has joined #ruby
[05:15:13] freerobby: has joined #ruby
[05:15:18] arup_r: has joined #ruby
[05:18:33] devoldmx: has joined #ruby
[05:24:23] hagabaka: has joined #ruby
[05:26:26] pawnbox: has joined #ruby
[05:27:29] baweaver: has joined #ruby
[05:28:05] arup_r: has joined #ruby
[05:31:05] Nexus_x1: has joined #ruby
[05:35:00] moeabdol: has joined #ruby
[05:41:57] yes`r: has joined #ruby
[05:42:42] Aria: +b *!9e451997@gateway/web/freenode/ip.158.69.25.151
[05:42:42] Aria: Aria kicked hdmsuckscock: behavior is not conducive to the desired environment.
[05:42:48] Aria: Sorry that took so long
[05:45:17] celly: has joined #ruby
[05:49:33] juddey: has joined #ruby
[05:50:10] blub: hi shevy
[05:50:37] pabs: has joined #ruby
[05:50:53] darkf: has joined #ruby
[05:51:49] Ox0dea: has joined #ruby
[05:51:59] Ox0dea: https://0x0dea.lol/
[05:54:07] Ox0dea: has joined #ruby
[05:55:07] Ox0dea: I can hear you silently questioning my judgment.
[05:55:57] Nexus_x1: has joined #ruby
[05:56:31] pawnbox: has joined #ruby
[05:57:04] duckpuppy: has joined #ruby
[05:59:31] baweaver: ACTION is judging the center tag
[05:59:51] Ox0dea: http://motherfuckingwebsite.com/
[06:00:11] bkxd: has joined #ruby
[06:00:36] baweaver: seen it before
[06:00:47] baweaver: I'm biased, I was a designer originally.
[06:00:50] shevy: the perfect retrolook
[06:01:05] baweaver: http://www.webkinglasvegas.com/
[06:01:09] Ox0dea: ruboscis is the best possible name for a bot that evaluates Ruby on trunk.
[06:01:11] shevy: not even the marquee tag (if you spell it that way)
[06:01:48] baweaver: trying to do something mildly productive over vacation, failing horribly
[06:01:51] Ox0dea: http://bitfission.com/
[06:03:06] shevy: Ox0dea damn that brings back the 1990s
[06:03:40] Ox0dea: I have trouble remembering that you're old.
[06:03:47] dotix: has joined #ruby
[06:04:01] Ox0dea: But yes, nostalgia bombs everywhere.
[06:04:05] shevy: geocities was cool
[06:04:09] Ox0dea: It was great.
[06:04:52] Ox0dea: Please enjoy: https://www.youtube.com/watch?v=ucMDGKc00DA
[06:05:44] Ox0dea: I find her delightfully awkward, and her obvious passion for the better days is quite endearing.
[06:09:15] bkxd: has joined #ruby
[06:09:29] shevy: I am too scared to have nostalgia take over if I watch that
[06:09:37] dionysus69: has joined #ruby
[06:10:56] wolffles: has joined #ruby
[06:10:57] Ox0dea: I would often choose the "dragon" subdomain irrespective of its relevance.
[06:11:07] arup_r: has joined #ruby
[06:11:44] devbug_: has joined #ruby
[06:11:49] duckpuppy: has joined #ruby
[06:11:50] pabs: has joined #ruby
[06:12:08] Ox0dea: Derp. I conflated Geocities with Angelfire.
[06:13:05] senayar: has joined #ruby
[06:15:08] shevy: Angelcities!
[06:16:41] tvw: has joined #ruby
[06:17:25] Ox0dea: Geofire -> @geohot -> self-driving cars -> Elon Musk == Soviet spy?
[06:17:53] Ox0dea: Shame he doesn't own (/ hasn't "acquired") the Twitter handle.
[06:20:52] Encapsulation: has joined #ruby
[06:24:02] andywojo: has joined #ruby
[06:25:59] ur5us: has joined #ruby
[06:39:00] timonv: has joined #ruby
[06:39:38] dopie: has joined #ruby
[06:41:41] govg: has joined #ruby
[06:44:39] solocshaw: has joined #ruby
[06:47:27] smactive: has joined #ruby
[06:49:42] roshanavand: has joined #ruby
[06:50:10] roshanavand: has joined #ruby
[06:51:19] tmtwd: has joined #ruby
[06:52:12] norc: has joined #ruby
[06:52:13] domgetter: has joined #ruby
[06:56:07] pawnbox: has joined #ruby
[06:57:17] govg: has joined #ruby
[06:57:25] lacuna: has joined #ruby
[06:58:12] ur5us: has joined #ruby
[07:00:36] rkazak: has joined #ruby
[07:00:56] Axsuul: has joined #ruby
[07:03:03] pawnbox: has joined #ruby
[07:04:01] tagrudev: has joined #ruby
[07:04:51] solars: has joined #ruby
[07:09:03] roshanav_: has joined #ruby
[07:09:22] juddey: has joined #ruby
[07:11:20] dopie: has joined #ruby
[07:14:27] senayar: has joined #ruby
[07:14:32] Ishido: has joined #ruby
[07:14:44] pneuma: has joined #ruby
[07:14:58] wolffles: longest = %w{ cat sheep bear }.inject do |memo,word|
[07:14:59] wolffles: memo.length > word.length ? memo : word ??? can someone explain what is going on with ???? memo :word???
[07:15:03] sigurding: has joined #ruby
[07:16:05] pneuma: that looks like a ternary operator to me: condition ? block-true : block-false
[07:16:08] norc: >> %w{ cat sheep bear }.max_by(&:length)
[07:16:09] ruboto: norc # => "sheep" (https://eval.in/494579)
[07:16:21] norc: wolffles: That is the Ruby way of doing it by the way. And yes, it is a ternary operator.
[07:16:21] rippa: has joined #ruby
[07:16:25] codecop: has joined #ruby
[07:17:41] norc: wolffles: It is a shorthand for "if expr then ... else ..." :)
[07:18:37] SebastianThorn: %w is do handy, tyvm ruby
[07:19:00] norc: SebastianThorn: %i() is probably even more useful to most people. :)
[07:19:20] devoldmx: has joined #ruby
[07:20:15] SebastianThorn: never used that one, learn something new every day :)
[07:21:17] Ox0dea: norc: Is not?
[07:21:20] blub: symbols aren't tied to a namespace right
[07:21:41] Ox0dea: >> Symbol.all_symbols.size # blub
[07:21:42] ruboto: Ox0dea # => 2511 (https://eval.in/494581)
[07:22:10] norc: Ox0dea: To me it is, but then again I avoid strings like the pest they are.
[07:23:21] norc: By the way, I think I really need to brush up on my Bison, I cannot figure out why puts(1 if 0) does not parse.
[07:23:53] roshanavand: has joined #ruby
[07:24:11] norc: Need to patch this. :)
[07:26:21] Ox0dea: >> as = ObjectSpace.each_object Array; [String, Symbol].map { |c| as.count { |a| a.all? { |e| c === e } } }
[07:26:22] ruboto: Ox0dea # => [111, 73] (https://eval.in/494582)
[07:26:38] Ox0dea: norc: Not that that's much to go on, but still.
[07:27:32] Ox0dea: As an aside, it'd be nice if that could've just been `as.count c`.
[07:28:55] Ox0dea: Er, no, but yes on `as.count { |a| a.all? c }`.
[07:29:54] norc: Ox0dea: Would === make much sense as the default operator for all?
[07:30:10] Ox0dea: Absolutely.
[07:30:35] Ox0dea: https://bugs.ruby-lang.org/issues/11286
[07:31:50] norc: Ox0dea: The grep rationale makes a lot of sense.
[07:32:01] norc: Didn't even think about it.
[07:33:26] blub: ruby functions are so stiff
[07:33:28] celly: has joined #ruby
[07:34:18] Ox0dea: Are you sure?
[07:34:39] moeabdol: has joined #ruby
[07:35:13] Paedo: has joined #ruby
[07:35:20] Paedo: hello everyone :)
[07:35:25] blub: hi paedo
[07:35:42] Ox0dea: I expect trouble.
[07:35:52] Paedo: Ox0dea: what do you mean?
[07:36:14] Ox0dea: Why would you assume I was talking to/about you?
[07:36:29] Ox0dea: (Called it.)
[07:36:31] Paedo: i was just asking what do you mean by expecting trouble
[07:38:32] norc: Ox0dea: Until we get complete access to our VM (I really want to dynamically manipulate instructions) methods are really stiff. :-)
[07:39:08] symm-: has joined #ruby
[07:39:19] Ox0dea: norc: See: Ova.
[07:39:21] baweaver: I've learned to assume if it exists, Ox0dea has an issue on ruby-lang bugs already
[07:39:26] Ox0dea: I take your point, of course.
[07:39:34] Ox0dea: I have, like, four.
[07:39:38] baweaver: or is commenting on it
[07:39:49] Ox0dea: But this one's languishing is really frustrating.
[07:40:07] Ox0dea: There's simply no good reason for the query predicates not to do case equality. :<
[07:40:17] scepticulous: has joined #ruby
[07:40:28] baweaver: become enough of a C ninja to implement it?
[07:40:34] baweaver: ACTION is no where close to that
[07:40:43] norc: Ox0dea: Yeah you have shown me already. Though I think with our new load in RubyVM Ova could become a real think.
[07:40:49] norc: Thing even.
[07:40:53] Ox0dea: And then nobu improved it because nobu.
[07:41:24] Ox0dea: norc: "Real" here meaning less brittle?
[07:42:12] Ox0dea: Never mind that it still works on trunk. :P
[07:44:06] mary5030: has joined #ruby
[07:44:42] norc: Ox0dea: It is just a black box. Im hoping we will get to see some documentation on the VM soon, when users will begin to use to_binary/load.
[07:45:04] norc: Half the instructions have obscure descriptions in insn.def, if any.
[07:49:25] Ox0dea: norc: The black box is made of glass. ^_^
[07:50:00] QualityAddict: has joined #ruby
[07:51:31] norc: Ox0dea: Just browsing through I suddenly noticed we even have an answer instruction. :-)
[07:51:49] dotix: has joined #ruby
[07:52:24] norc: Ox0dea: https://github.com/ruby/ruby/blob/trunk/insns.def#L2048-L2089
[07:52:26] bnizzle: has joined #ruby
[07:52:28] norc: This is just an example of what I mean.
[07:52:33] bnizzle: has left #ruby: ()
[07:52:46] Ox0dea: norc: http://patshaughnessy.net/2012/2/29/the-joke-is-on-us-how-ruby-1-9-supports-the-goto-statement
[07:52:50] Ox0dea: You don't remember this?
[07:53:02] norc: Oh I do.
[07:53:50] Ox0dea: Making it an insn seems perfectly reasonable?
[07:55:48] vikas027: has joined #ruby
[07:55:56] Ox0dea: $ ruby -e "p RubyVM::INSTRUCTION_NAMES.join(' ').size"
[07:56:28] norc: I just mean the fact that the only hint that this has anything to do with a x.succ() method only comes from the code hint in the japanese comment.
[07:56:38] norc: Just gives me plain headaches.
[07:58:13] Cohedrin: has joined #ruby
[07:58:56] norc: Maybe Im just ranting because I spent too much time debugging a random seg fault I had yesterday through dozens of magical functions I had absolutely no clue what they did or why they are needed..
[07:59:21] nerium: has joined #ruby
[08:00:04] Ox0dea: Ruby is old and large. I'm not sure what you were expecting to find.
[08:00:16] norc: Dragons.
[08:00:37] Paedo: Ox0dea: you expect to find booty
[08:00:57] Ox0dea: Frozen string debug info gets stashed in secret ivars. :<
[08:02:19] norc: Ox0dea: That is not really a good argument. https://github.com/postgres/postgres/blob/master/src/backend/executor/execMain.c#L1253-L1324
[08:02:29] norc: And the whole code base is documented like that.
[08:02:32] duckpuppy: has joined #ruby
[08:02:33] norc: Maybe Im just spoiled.
[08:02:39] Ox0dea: No, you're right.
[08:02:43] Paedo: the best docs are the ones you write yourself
[08:02:48] Ox0dea: Ruby has accumulated an ungodly amount of cruft. :/
[08:03:50] Ox0dea: norc: Neoruby?
[08:05:50] tmtwd: has joined #ruby
[08:06:26] bnizzle: has joined #ruby
[08:06:36] bnizzle: has left #ruby: ()
[08:07:52] solars: has joined #ruby
[08:08:29] colegatron: has joined #ruby
[08:09:57] juddey: has joined #ruby
[08:10:01] lessless: has joined #ruby
[08:10:44] shevy: Paedo are you stalking Ox0dea?
[08:10:55] Paedo: no it's the other way around i think
[08:11:06] lessless: folks, how to detect whether string corresponds other string within range of one insertion/deletion or a one character swap?
[08:11:26] lessless: i.e swap = swwap = sap = sawp
[08:12:22] pabs: has joined #ruby
[08:12:37] jhn: has joined #ruby
[08:14:28] bkxd: has joined #ruby
[08:15:14] senayar: has joined #ruby
[08:16:15] Ox0dea: shevy: What made you ask?
[08:16:17] futilegames: has joined #ruby
[08:16:53] Ox0dea: lessless: Please clarify. Are you sure you wanted all =s there?
[08:17:37] lessless: all =s? don't understand :)
[08:17:54] Ox0dea: lessless: You want Levenshtein distance.
[08:18:29] Ox0dea: >> require 'rubygems/text'; include Gem::Text; levenshtein_distance 'swap', 'sap'
[08:18:30] ruboto: Ox0dea # => 1 (https://eval.in/494592)
[08:19:01] lessless: Ox0dea, thank you!
[08:19:06] Ox0dea: Happy to help. :)
[08:19:35] coffeecupp: has joined #ruby
[08:19:56] Ox0dea: lessless: Er, you want Damerau-Levenshtein if transposition should only count as one edit.
[08:20:06] Ox0dea: That one's not in the standard library. :<
[08:20:29] lessless: transposition means character swapping?
[08:21:08] lessless: ACTION increased IQ by 0.1 point 
[08:21:45] Paedo: ACTION farts on lessless's face and the methane causes lessless's IQ to drop by 50 points.
[08:22:35] lessless: how does that work?
[08:22:44] Ox0dea: It doesn't, but it increments you. :)
[08:23:45] mark1: has joined #ruby
[08:24:28] solocshaw: has joined #ruby
[08:24:41] Paedo: what is ++<<
[08:25:31] Ox0dea: << == lessless, to clarify.
[08:26:12] andywojo: has joined #ruby
[08:27:29] lessless: ah, got it :)
[08:27:31] techietrash: has joined #ruby
[08:27:32] techietrash: has joined #ruby
[08:27:45] al2o3-cr: has joined #ruby
[08:28:04] alphaatom: has joined #ruby
[08:29:19] alphaatom: has joined #ruby
[08:29:22] tjbiddle: has joined #ruby
[08:29:39] coffeecupp: has joined #ruby
[08:30:17] redeeem: has joined #ruby
[08:32:33] roshanavand: has joined #ruby
[08:33:01] blt: has joined #ruby
[08:33:02] norc: Here is another question, why does Rails advertise CoffeeScript so much?
[08:33:02] QualityAddict: has joined #ruby
[08:33:20] norc: Im really getting disgusted by these bloated egomaniac controlled frameworks.
[08:35:04] shanemcd: has joined #ruby
[08:36:31] djbkd: has joined #ruby
[08:36:32] roshanav_: has joined #ruby
[08:36:44] dionysus69: has joined #ruby
[08:37:42] dionysus69: I need a consulting on game development
[08:37:58] SCHAAP137: has joined #ruby
[08:38:00] jondot: has joined #ruby
[08:38:28] dionysus69: how would ruby handle making of a turn based strategy? and would it be cross platform? anyone here knowledgeable in this field?
[08:38:58] underplank: has joined #ruby
[08:39:17] TheBrayn: ruby is probably not the right choice for game development
[08:39:20] norc: dionysus69: Just like any other language pretty much. Ruby is fairly cross platform out of the box too.
[08:40:01] dionysus69: so should I go with c++ ? also can anyone explain to me how opengl game engine blender and all those tools fit together? I am confused
[08:40:02] sandstrom: has joined #ruby
[08:40:05] norc: dionysus69: And since you said turn based, things like the GIL will not give you many headaches. :-)
[08:40:26] TheBrayn: global interpreter lock
[08:40:33] dionysus69: ugh what is that
[08:40:56] norc: The thing preventing you from doing silly multithreading, because it is bad for you.
[08:40:59] TheBrayn: a multithread synchronisation mechanism
[08:41:12] yfeldblum: has joined #ruby
[08:41:17] norc: or rather it prevents you from doing any real concurrency in ruby.
[08:41:22] dionysus69: hmm ok never done multithreading in any language
[08:41:24] shevy: Ox0dea it was like tag-teaming, you write something, Paedo responds in ... odd ways
[08:41:59] dionysus69: so what about the tools I listed, you familiar with how those are used together to create a game?
[08:42:28] TheBrayn: creating a game is not an easy task
[08:42:41] dionysus69: I know so thats why I start from 0 :D
[08:44:06] shevy: go with c++
[08:44:14] norc: dionysus69: If you really want to do it yourself, I recommend you start with something simplistic. Say a chess simulator. :-)
[08:44:22] krz: has joined #ruby
[08:44:29] Anderson69s_Deb: has joined #ruby
[08:44:54] norc: shevy: And have him study C++ for the next 12 months? Im unsure how that is productive.
[08:45:06] Paedo: shevy: so what if we're tag-teaming it's better that you stay out of it
[08:45:24] solocshaw: has joined #ruby
[08:45:35] dionysus69: norc I am familiar with c++ so I could be learning on the wat
[08:45:44] dionysus69: I dont know ruby well either
[08:45:52] norc: dionysus69: Dont pick a game then.
[08:46:12] norc: Learn the language first perhaps?
[08:46:34] norc: Then you can maybe get started with some OpenGL, which by itself gives you between months and years just to get comfortable with.
[08:46:41] dfinninger: has joined #ruby
[08:46:46] shevy: you are so negative norc
[08:46:51] dionysus69: hmm so which one, lets say I go and become a ruby pro, would I be hindered too much in performance if I use opengl libraries (if I can at all)
[08:47:14] norc: dionysus69: There is OpenGL bindings for Ruby.
[08:47:29] TheBrayn: I think that you'll want a game engine
[08:47:35] shevy: this game was on reddit lately https://github.com/spacecamper/miny in C++ !
[08:48:04] TheBrayn: I have heard good things about l??ve, maybe there are some good tutorials for that
[08:48:13] norc: dionysus69: Let me teach you a first lesson about programming then.
[08:48:39] norc: dionysus69: Write code that works. Write tests for that code. Profile your code. Optimize your code. In that order.
[08:48:52] norc: dionysus69: Where does your question about "performance" fall in there? ;-)
[08:49:04] norc: If you don't even know these questions, its probably not relevnat to you
[08:49:09] yes`r: has joined #ruby
[08:49:18] mdw: has joined #ruby
[08:51:31] bkxd: has joined #ruby
[08:52:09] webus: has joined #ruby
[08:52:18] dionysus69: for example civ 5 performance sucks
[08:52:38] Paedo: and remember that if your code sucks it's because you might be homo
[08:52:40] dionysus69: I am not really aiming to make something like civ 5 in the first shot but I would want to start something that scales later
[08:53:08] vdamewood: has joined #ruby
[08:53:56] timonv: has joined #ruby
[08:54:10] dionysus69: so imagine civ 5 is written in ruby using opengl, would it be playable?
[08:54:28] Paedo: ruby sucks too much for taht
[08:54:34] Paedo: no optimized code
[08:54:46] Paedo: civ 5 must be written in assembly and c++
[08:55:11] blackms: has joined #ruby
[08:55:14] Ox0dea: >> RubyVM::INSTRUCTION_NAMES.grep /opt/
[08:55:15] ruboto: Ox0dea # => ["opt_str_freeze", "opt_send_without_block", "opt_case_dispatch", "opt_plus", "opt_minus", "opt_mult ...check link for more (https://eval.in/494618)
[08:55:26] Ox0dea: So many optimize!
[08:56:00] marr: has joined #ruby
[08:56:07] blackms: hello, someone here uses rubymine?
[08:56:10] Ox0dea: dionysus69: This is what happens if you don't start with the fundamentals: https://www.youtube.com/watch?v=TRqGmmCy8aU
[08:57:16] domgetter: dionysus69: I don't recommend using Ruby to make a performance-sensitive 3D video game.
[08:57:25] domgetter: Now, if you want to make a prototype, then Ruby's perfect
[08:57:33] Paedo: why do that
[08:57:38] Paedo: you'll have to rewrite it
[08:57:46] Paedo: might as well write it in the proper language
[08:57:57] domgetter: time and effort into making something that may never get funded
[08:58:11] domgetter: might as well spend as little time and effort as possible to get off the ground
[08:58:15] Paedo: if it's dog shit i won't get funded
[08:58:21] anisha_: has joined #ruby
[08:58:30] RegulationD: has joined #ruby
[08:58:34] BSaboia: has joined #ruby
[08:58:51] domgetter: the criteria for "dog shit" in a prototype is not performace or "it's written in C"
[08:59:06] dionysus69: domgetter: roger that ))
[08:59:06] Ox0dea: domgetter: You're feeding, mind.
[08:59:25] Paedo: Ox0dea: okay do we stop tag-teaming now?
[08:59:56] solocshaw1: has joined #ruby
[09:00:27] domgetter: Ox0dea: I don't understand what "I'm feeding, mind" means
[09:00:29] Paedo: Ox0dea: well i don't understand why you tell me to come troll the ruby channel with you and then say that i'm a troll
[09:00:51] Ox0dea: domgetter: Did that help?
[09:01:03] Paedo: Ox0dea: what are you trying to do here? i'm a bit confused
[09:01:17] gizless: has joined #ruby
[09:01:41] domgetter: what does "mind" mean in that context?
[09:02:02] domgetter: I get the first part, but I'm just trying to parse the statement in it's whole
[09:02:05] djbkd: has joined #ruby
[09:02:18] domgetter: is it a short version of "mind you"
[09:02:31] Paedo: domgetter: he told me to come troll this channel with him
[09:03:25] domgetter: Paedo: That's an assertion. A claim which may or may not be true.
[09:03:38] Paedo: domgetter: it's all in pms
[09:03:45] Hounddog: has joined #ruby
[09:03:57] Paedo: i don't care i am doing him a favor
[09:04:00] domgetter: Paedo: that neither proves nor disproves your statements
[09:04:23] tjbiddle: has joined #ruby
[09:04:25] Paedo: domgetter: he wants to become op of this channel and if he's seen as helpful he'll get that status just don't teoll anyone
[09:04:58] domgetter: Peedo: You got boring.
[09:05:15] iDavid: has joined #ruby
[09:07:53] al2o3-cr: has joined #ruby
[09:08:00] edwinvdgraaf: has joined #ruby
[09:10:55] blaxter: has joined #ruby
[09:12:00] dionysus69: i decided to get a hardcover ruby book, which one should I get? please offer me something that isnt very expensive
[09:12:38] tmtwd: has joined #ruby
[09:12:40] ruboto: http://ruby-community.com/pages/links
[09:12:44] adaedra: there are some here
[09:13:03] AlexRussia: has joined #ruby
[09:13:20] ljarvis: hello rubyists
[09:13:24] roshanavand: has joined #ruby
[09:13:28] adaedra: hi ljarvis
[09:13:38] ljarvis: how was your Christmas, adaedra?
[09:13:40] blub: hi ljarvis
[09:13:46] adaedra: ljarvis: it was ok.
[09:13:56] adaedra: ljarvis: what about you?
[09:13:56] Paedo: ljarvis: white power brother!
[09:14:07] adaedra: !kick Paedo Good bye.
[09:14:08] ruboto: ruboto kicked Paedo: bye.
[09:14:08] ruboto: -o ruboto
[09:14:26] ljarvis: adaedra: mine was pretty good, I just ate and drank a lot so no complaints!
[09:14:35] dionysus69: wtf just happened
[09:14:50] firstdayonthejob: has joined #ruby
[09:15:30] adaedra: nothing that matters.
[09:17:05] senayar: has joined #ruby
[09:18:14] Rinalds: has joined #ruby
[09:18:33] dionysus69: so still, I got that link adaedra but which book would you recommend? I am bad at choosing from 5 books I know nothing about :\
[09:18:59] adaedra: And this list is not even up to date :p
[09:19:08] yfeldblum: has joined #ruby
[09:20:02] devoldmx: has joined #ruby
[09:20:54] adaedra: here's the up-to-date list
[09:20:56] adaedra: https://github.com/apeiros/ruby-community/blob/master/app/views/pages/_links.html.slim#L65
[09:21:09] adaedra: I didn't learn from a book, so I can't give any advice on that
[09:21:16] ziyadb: has joined #ruby
[09:21:39] celly: has joined #ruby
[09:22:30] Begi: has joined #ruby
[09:24:38] c0m0: has joined #ruby
[09:25:12] cibs: has joined #ruby
[09:26:06] dwfait: has joined #ruby
[09:26:25] adaedra: ???This book documents Version 1.6 of Ruby??? we may throw that away now.
[09:27:39] adaedra: dionysus69: see, be sure to check the version before buying. Avoid everything <= 1.8.
[09:28:55] dionysus69: I am aiming for 2.0 :)
[09:29:07] bkxd: has joined #ruby
[09:30:43] shevy: we are at 2.3.0!
[09:31:23] adaedra: Books take time to write.
[09:31:40] solocshaw: has joined #ruby
[09:32:00] Ox0dea: Prove it.
[09:32:34] domgetter: Writing takes time. Books are written. QED
[09:33:06] Ox0dea: You demonstratumed the shit outta that quod.
[09:33:12] blt: has joined #ruby
[09:33:20] Ox0dea: charliesome: 2.3 incoming?
[09:34:04] dionysus69: i am sure there are some books already that cover version 2
[09:34:19] adaedra: I've seen 2.1 in the links provided.
[09:35:24] bmalum: has joined #ruby
[09:35:51] anisha_: has joined #ruby
[09:38:51] underplank: has joined #ruby
[09:39:50] kase: has joined #ruby
[09:40:10] skcin7: has joined #ruby
[09:40:41] kase: I tried to install rvm but when I add the gpg key I get a timeout
[09:40:49] kase: gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
[09:40:50] spider-mario: has joined #ruby
[09:40:51] Ox0dea: Excellent.
[09:41:03] adaedra: I don't remember this step from rvm.
[09:42:32] kase: adaedra: It's required
[09:42:42] Ox0dea: kase: Only for signed releases.
[09:42:49] adaedra: I see that.
[09:42:59] adaedra: I haven't installed a rvm in a long time tho.
[09:43:24] anisha_: has joined #ruby
[09:43:33] kase: Ox0dea: right, but all last released are signed
[09:43:54] Ox0dea: kase: Are you sure you want to use RVM?
[09:44:00] kase: Ox0dea: do you have a no signed release ?
[09:44:09] kase: Ox0dea: why not ?
[09:44:09] Ox0dea: kase: I use chruby + ruby-install.
[09:44:21] adaedra: +1 for chruby + ruby-install.
[09:44:26] kase: Ox0dea: I don't know chruby
[09:44:34] Ox0dea: kase: Nor RVM (yet). :P
[09:44:38] adaedra: Time to discover it then! \o/
[09:44:45] wolffles: has joined #ruby
[09:45:10] adaedra: Otherwise, rvm has a channel at #rvm
[09:45:32] kase: Ox0dea: It's like a chroot for ruby ?
[09:46:15] Gnut: has joined #ruby
[09:46:17] adaedra: Nope, it's a ruby version manager, like rvm, but light.
[09:46:20] norc: chruby + ruby-install is the way to go for the next 12 months. Then we will (again) have a new version manager.
[09:47:59] kase: Ok thanks for all, I'll look at this :)
[09:48:07] jschmid: has joined #ruby
[09:50:20] domgetter: I am chroot
[09:51:28] ruid: has joined #ruby
[09:51:29] ruid: has joined #ruby
[09:54:37] redeeem: has joined #ruby
[09:56:43] startupality: has joined #ruby
[09:58:49] Ox0dea: https://www.archlinux.org/packages/community/x86_64/schroot/
[09:59:08] Ox0dea: Pronounced "Schrute" for keks.
[09:59:24] vikas027: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[10:00:05] adaedra: Dammit Jim.
[10:02:21] cpup: has joined #ruby
[10:03:38] peeja: has joined #ruby
[10:04:32] duckpuppy: has joined #ruby
[10:06:47] AlexRussia: has joined #ruby
[10:08:33] Begi: has joined #ruby
[10:09:55] roshanavand: has joined #ruby
[10:14:08] Mon_Ouie: has joined #ruby
[10:14:59] DoubleMalt: has joined #ruby
[10:15:35] lictor36: has joined #ruby
[10:17:44] pawnbox: has joined #ruby
[10:17:56] senayar: has joined #ruby
[10:20:47] seitensei: has joined #ruby
[10:20:47] seitensei: has joined #ruby
[10:23:30] dotix: has joined #ruby
[10:25:13] smactive: has joined #ruby
[10:25:35] BSaboia: has joined #ruby
[10:26:57] andywojo: has joined #ruby
[10:28:25] kase: has left #ruby: ("Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is")
[10:28:35] yes`r: has joined #ruby
[10:29:06] bweston92: has joined #ruby
[10:31:04] leksster: has joined #ruby
[10:34:55] yfeldblum: has joined #ruby
[10:36:10] krz: has joined #ruby
[10:36:25] jinie_: has joined #ruby
[10:37:02] norc: apeiros: Would you happen to be around?
[10:37:45] CloCkWeRX: has joined #ruby
[10:43:09] blackms: has joined #ruby
[10:44:20] anisha_: has joined #ruby
[10:44:55] gagrio: has joined #ruby
[10:47:24] pawnbox_: has joined #ruby
[10:51:22] ElFerna: has joined #ruby
[10:53:52] bkxd: has joined #ruby
[10:56:22] ElFerna: has joined #ruby
[10:57:01] SenpaiSilver: has joined #ruby
[11:04:32] blackgoat: has joined #ruby
[11:05:13] senayar: has joined #ruby
[11:05:17] duckpuppy: has joined #ruby
[11:07:00] FernandoBasso: has joined #ruby
[11:07:45] dotix: has joined #ruby
[11:08:40] roshanav_: has joined #ruby
[11:09:45] solocshaw: has joined #ruby
[11:09:48] celly: has joined #ruby
[11:10:06] anisha_: has joined #ruby
[11:17:10] terlar: has joined #ruby
[11:18:50] anisha_: has joined #ruby
[11:20:09] phredus: has joined #ruby
[11:20:50] devoldmx: has joined #ruby
[11:23:22] skade: has joined #ruby
[11:25:37] bodgix: has joined #ruby
[11:27:03] bkxd: has joined #ruby
[11:29:34] rodfersou: has joined #ruby
[11:31:35] Mekkis: has joined #ruby
[11:32:47] brusora_: has joined #ruby
[11:35:03] roshanavand: has joined #ruby
[11:37:53] tomphp: has joined #ruby
[11:38:57] skcin7: has joined #ruby
[11:40:44] tvw: has joined #ruby
[11:44:46] roshanavand: has joined #ruby
[11:44:58] dionysus69: can I make GUI with QT and bind it to ruby?
[11:46:58] adaedra: There are Qt bindings, you can look into that
[11:48:48] BSaboia: has joined #ruby
[11:51:03] hectortrope: has joined #ruby
[11:51:58] startupality: has joined #ruby
[11:52:00] kobain: has joined #ruby
[11:52:28] norc: dionysus69: I looked into it, it is not worth the hassle unless you really must.
[11:53:13] dionysus69: norc: so what is best( meaning easiest/most feature) approach for gui making ? do you make gui apps yourself?
[11:53:21] norc: Not in Ruby.
[11:53:35] dionysus69: ok I guess ) in java ? :D
[11:53:56] adaedra: If you do things in Qt, C++ ?
[11:53:57] jondot: has joined #ruby
[11:54:35] adaedra: Also, it may be possible if you do things well to create a library that implements your GUI parts in C++ and expose a C API your Ruby code could use.
[11:54:56] adaedra: Not the most straightforward, but could be done, I guess.
[11:54:57] dionysus69: I guess, actually not doing QT, just downloaded QT maker and it looked good. I have done only one GUI app so far in java/netbeans which is good enough I just wondered if its worth learning in ruby
[11:55:12] adaedra: It's Qt, not QT.
[11:55:35] norc: adaedra: Considering how Qt works with events, I would consider this to be a really nasty business, unless you use some middleware like CORBA
[11:56:14] dionysus69: ok nevermind I am not a guy who would implement all that by myself :D
[11:56:38] adaedra: I tried GUIing in Ruby, it was not the nicest experience.
[11:57:03] adaedra: I go back to plain C++/Qt when I have to do GUI.
[11:57:11] norc: Best we have done was a seperate GUI application that talked with the application core through CORBA.
[11:57:18] norc: That was pretty easy. :)
[11:57:30] norc: (With the GUI being developed in Qt/C++)
[11:57:40] dionysus69: ^.^ not that I have to make gui apps, just wondered if I wanted to at some point
[11:57:55] dionysus69: i am agitated to learn something and I dont know where to start from
[11:58:04] dionysus69: life is too short
[11:58:07] dionysus69: fucking primates
[11:59:30] dionysus69: apologies for my censor breaking outburst, aghm
[11:59:42] hectortrope: has joined #ruby
[12:00:33] pandaant: has joined #ruby
[12:00:40] dwfait: has joined #ruby
[12:01:16] kobain: has joined #ruby
[12:02:02] kobain: has joined #ruby
[12:02:37] Contigi: has joined #ruby
[12:03:49] al2o3-cr: has joined #ruby
[12:05:26] mostlybadfly: has joined #ruby
[12:05:28] Begi: has joined #ruby
[12:05:55] phredus: Hello all, I am new to Ruby and programming, Could someone please tell me which versions of Ruby I should have installed on my system please
[12:06:05] DukeDave: has joined #ruby
[12:06:26] Ishido: I would say... The latest you can have ?
[12:06:28] prestorium: has joined #ruby
[12:06:49] weemsledeux: has joined #ruby
[12:06:54] felltir: has joined #ruby
[12:07:10] KervyN: has joined #ruby
[12:07:50] phredus: yes, nut I've heard that for compatability you should have a couple of the past versions, but I dont know if that is true and best is why I'm asking.
[12:07:58] tomphp: has joined #ruby
[12:08:40] Ishido: Oh, I see.
[12:08:44] JoshL: has joined #ruby
[12:09:05] [k-: has joined #ruby
[12:09:12] roshanavand: has joined #ruby
[12:09:12] Ishido: Sorry, I don't know. I??suppose someone else could answer your question.
[12:09:20] phredus: So does anyone have the real life truth
[12:10:25] andywojo: has joined #ruby
[12:10:25] phredus: Ishido: thank you I will keep asking till I find someone who knows
[12:10:44] Ishido: No problem.
[12:10:50] Kedare: has joined #ruby
[12:11:11] underplank: has joined #ruby
[12:11:52] jamo: phredus: usually everyone keeps on using the latest ruby, so install other/older versions only when you end up in a situtation when you really need it
[12:14:24] mdw: has joined #ruby
[12:15:05] norc: phredus: Latest is enough. You can install additional rubies when some project has a hard dependency for some reason.
[12:16:52] hakat: has joined #ruby
[12:17:34] norc: So go and enjoy our brand new 2.3. :-)
[12:18:00] dlitvak: has joined #ruby
[12:21:22] sundhell: has joined #ruby
[12:21:36] seitensei: has joined #ruby
[12:22:04] sdothum: has joined #ruby
[12:22:11] ajb: has joined #ruby
[12:22:37] ajb: has joined #ruby
[12:23:06] toretore: has joined #ruby
[12:23:44] bkxd: has joined #ruby
[12:26:40] svkurowski: has joined #ruby
[12:27:48] dlitvak: has joined #ruby
[12:28:03] dlitvak_: has joined #ruby
[12:29:46] roshanavand: has joined #ruby
[12:32:14] roshanavand: has joined #ruby
[12:36:36] whiteline: has joined #ruby
[12:37:39] apeiros: norc: it happens that I'm around now. what's up?
[12:38:07] Jardayn: has joined #ruby
[12:40:57] norc: apeiros: I have a rake task that reads an ASCII-8BIT string representing UTF8 to our Oracle database (with NLS_LANG set to English_Germany.WE8MSWIN1252). Now AR blindly assumes the source encoding to be windows-1252, causing a double encoding error.
[12:41:18] norc: *it reads and then writes to the oracle database
[12:42:01] apeiros: oy, not sure I'm awake enough for this kind of question :D
[12:42:03] skade: has joined #ruby
[12:42:38] apeiros: iirc oracle client and server have an independent encoding setting
[12:42:47] apeiros: and if they differ, they'll translate
[12:43:18] apeiros: on top of that sits AR which I don't know how much transcoding it does, but I'd assume it will translate from String#encoding to client's encoding
[12:44:18] norc: Thats the thing, the source encoding is ASCII-8BIT - so just based on this it seems a bit bizarre, it would simply force encode this to windows-1252
[12:44:32] apeiros: so now my question is: do you want the ascii-8bit translated, so it's correctly in the database (in win1252), or do you want the string as-is in the same binary code as it is, making it "incorrect" in the sense of characters in the db?
[12:44:37] redeeem: has joined #ruby
[12:45:04] norc: Well, the fix was easy (I just force encode the input to UTF-8 before passing it to Oracle).
[12:45:10] norc: But that seems more like a hotfix than anything.
[12:45:24] shanemcd: has joined #ruby
[12:45:38] apeiros: not quite sure what AR makes with binary, don't think I've ever tested that. but I think the assumption would be that it force-encodes to either oracle client's encoding, or to Encoding.default_internal
[12:46:09] apeiros: hm, no, if the data is indeed utf-8, then that's the correct thing to do
[12:46:55] apeiros: best is of course to already read the data with the correct encoding set
[12:47:53] norc: Is there such a thing as "base64 with utf8 inside" encoding ?
[12:48:32] underplank: has joined #ruby
[12:49:26] norc: apeiros: And yeah, based on my observation the oracle enhanced adapter seems to force-encode to the clients encoding, because Encoding.default_internal is UTF-8.
[12:49:46] apeiros: sure. you can put whatever into base64
[12:50:04] DoubleMalt: has joined #ruby
[12:52:42] norc: apeiros: Ah! Mail is indeed the culprit then. The mail contains 'Content-Type: text/plain; charset="utf-8"' - so mail.body.decode should assume that to be the encoding, rather than just returning a binary string.
[12:54:05] norc: Thanks for your feedback, I shall patch it and submit a pull request. :)
[12:54:51] anisha_: has joined #ruby
[12:56:17] alphaatom: has joined #ruby
[12:57:57] celly: has joined #ruby
[12:59:59] RegulationD: has joined #ruby
[13:02:40] Guest32: has joined #ruby
[13:06:02] duckpuppy: has joined #ruby
[13:06:13] anisha_: has joined #ruby
[13:07:33] dwfait: has joined #ruby
[13:08:35] Scripore: has joined #ruby
[13:11:17] synthroid: has joined #ruby
[13:11:58] underplank: has joined #ruby
[13:12:20] tomphp: has joined #ruby
[13:12:38] deuterium: has joined #ruby
[13:14:05] yes`r: has joined #ruby
[13:14:40] sigurding: has joined #ruby
[13:20:14] Jackneill: has joined #ruby
[13:20:51] krobzaur: has joined #ruby
[13:21:39] devoldmx: has joined #ruby
[13:22:43] ruid: has joined #ruby
[13:22:44] ruid: has joined #ruby
[13:24:14] dorei: has joined #ruby
[13:25:48] nfk|laptop: has joined #ruby
[13:32:37] dstarh: has joined #ruby
[13:32:45] sgambino: has joined #ruby
[13:34:16] anisha_: has joined #ruby
[13:36:26] sp1rs: has joined #ruby
[13:36:36] ElFerna: has joined #ruby
[13:36:38] krz: has joined #ruby
[13:36:54] aep: i'm scared of asking buuut... how do you do opencv stuff on ruby with the GIL? :/
[13:36:59] aep: like, everything's so CPU intensive
[13:37:42] aep: do people just shove the cpu parts into c++ or something?
[13:38:48] blackms_: has joined #ruby
[13:39:14] dotix: has joined #ruby
[13:39:38] blackms: has joined #ruby
[13:40:59] dotix: has joined #ruby
[13:41:37] FooMunki: has joined #ruby
[13:41:54] roshanav_: has joined #ruby
[13:42:30] Begi: has joined #ruby
[13:43:50] weemsledeux: has joined #ruby
[13:43:52] sankaber: has joined #ruby
[13:44:25] haraigoshi: has joined #ruby
[13:45:19] dlitvak: has joined #ruby
[13:46:04] anisha_: has joined #ruby
[13:46:42] ESpiney: has joined #ruby
[13:46:47] krobzaur: has joined #ruby
[13:47:04] TomyLobo: has joined #ruby
[13:50:44] ruid: has joined #ruby
[13:52:19] tomphp: has joined #ruby
[13:54:29] treehug88: has joined #ruby
[13:56:07] AustinMatherne: has joined #ruby
[13:56:27] jhass: pretty much
[13:57:04] cout: has joined #ruby
[13:58:05] constantinexvi: has joined #ruby
[13:58:06] rideh: has joined #ruby
[13:58:09] cschneid: has joined #ruby
[13:58:16] epochwolf: has joined #ruby
[13:58:25] GGMethos: has joined #ruby
[13:58:48] ceej: has joined #ruby
[13:59:00] demophoon: has joined #ruby
[13:59:18] ElFerna: has joined #ruby
[14:00:10] underplank: has joined #ruby
[14:00:24] [k-: has joined #ruby
[14:01:05] aegis3121: has joined #ruby
[14:01:12] survili: has joined #ruby
[14:01:45] bradland: has joined #ruby
[14:01:47] anisha_: has joined #ruby
[14:03:07] Jackneill: has joined #ruby
[14:03:21] survili: Hi all, sometimes when I install a gem, besides being able to use it's classes/api using require, sometimes the gem comes with a binary that I can use from command line. Example when installing rails gem, we also get rails command line executable. I was wondering, when installing some gem how can I know if it also installed some executable I can use ?
[14:03:46] Apocalypse: has joined #ruby
[14:04:38] mary5030: has joined #ruby
[14:04:51] Kamilion: has joined #ruby
[14:04:51] anisha_: has joined #ruby
[14:04:57] apeiros: survili: good question. sadly the best answer I'm aware of is "look at the gem contents". not very user friendly :-|
[14:05:02] apeiros: maybe there's a better way
[14:05:03] ElFerna: has joined #ruby
[14:06:47] duckpuppy: has joined #ruby
[14:06:53] survili: apeiros: when you say to take a look in gem's content, you mean to read the sources or in gemspec it is specified ?
[14:07:18] GinoManWorks: has joined #ruby
[14:07:48] apeiros: survili: sources, take a look at the 'bin' dir. gemspec often only contains a glob.
[14:08:11] apeiros: and while `gem specification X` exists, that looks rather unreadable.
[14:08:23] survili: apeiros: thank you, I will ask this question on SO as well
[14:08:24] colegatron: has joined #ruby
[14:08:57] apeiros: and while `gem specification X` exists, that looks rather unreadable. in case of rails it doesn't even list `rails` under executables
[14:09:28] havenwood: survili: You could guess that the executable is in the idiomatic bin/ dir: gem contents gem_name_here | grep /bin/
[14:09:30] apeiros: aha, because the executable comes via railties gem
[14:09:46] TomPeed: has joined #ruby
[14:09:58] rideh: has joined #ruby
[14:09:58] constantinexvi: has joined #ruby
[14:10:02] havenwood: I dunno what the heck bundler is up to these days with exe/ dir... >.>
[14:10:19] apeiros: oh dear, yes, fuck bundler for that.
[14:10:32] apeiros: iirc their reasoning was something along "because we fucked up and used bin differently"
[14:10:40] zotherstupidguy: has joined #ruby
[14:10:53] adaedra: because bundler, that's why.
[14:10:58] AustinMatherne: has joined #ruby
[14:11:58] apeiros: toppling over conventions can be healthy. but "we did it wrong so we fix it by doing wrong more" is stupid IMO.
[14:12:04] Apocalypse: has joined #ruby
[14:12:48] Axsuul: has joined #ruby
[14:14:06] havenwood: a fairy dies every time someone prepends ./bin to PATH
[14:14:07] ElFerna: has joined #ruby
[14:14:12] bgresham: has joined #ruby
[14:14:16] havenwood: I wish they'd stop with that nonsense.
[14:14:55] adaedra: path+=(./bin)
[14:15:13] demophoon: has joined #ruby
[14:15:17] apeiros: reminds me that I wanted to think about direnv???
[14:15:23] rodfersou: has joined #ruby
[14:15:28] FooMunki: has joined #ruby
[14:15:28] adaedra: I really like zsh's $path.
[14:15:42] apeiros: gut says "oh dear god, no", but then again, I use rvm which does about the same.
[14:15:50] havenwood: adaedra: I really like zsh's preexec function.
[14:16:01] ceej: has joined #ruby
[14:16:14] demophoon: has joined #ruby
[14:16:22] havenwood: Was just looking the other day at: https://github.com/rcaloras/bash-preexec
[14:16:33] adaedra: And precmd, too.
[14:16:59] adaedra: Also, add-zsh-hook to make it a bit more maintainable.
[14:18:06] AustinMatherne: has joined #ruby
[14:19:47] survili: havenwood: great! didn't know there was gem contents flag, thanks a lot
[14:20:03] bmalum: has joined #ruby
[14:20:05] ta0: has joined #ruby
[14:20:09] havenwood: survili: np
[14:21:20] ceej: has joined #ruby
[14:22:28] seitensei: has joined #ruby
[14:24:17] AustinMatherne: has joined #ruby
[14:24:54] ElFerna1: has joined #ruby
[14:25:54] DoubleMalt: has joined #ruby
[14:27:04] sgambino: has joined #ruby
[14:27:25] jottr_: has joined #ruby
[14:27:26] AustinIncognito: has joined #ruby
[14:28:49] Begi: has joined #ruby
[14:32:22] dotix: has joined #ruby
[14:33:28] Goose23: has joined #ruby
[14:34:52] Goose23: has joined #ruby
[14:36:13] Djole: has joined #ruby
[14:37:30] jottr_: has joined #ruby
[14:37:44] bmalum: has joined #ruby
[14:38:12] bensarz: has joined #ruby
[14:39:10] arup_r: has joined #ruby
[14:41:50] AustinMatherne: has joined #ruby
[14:42:38] whippythellama: has joined #ruby
[14:42:59] roshanavand: has joined #ruby
[14:46:07] celly: has joined #ruby
[14:49:06] mdw7: has joined #ruby
[14:49:51] Yzguy: has joined #ruby
[14:50:51] dhollinger: has joined #ruby
[14:51:08] krobzaur: has joined #ruby
[14:51:52] Begi2: has joined #ruby
[14:51:55] weemsledeux: has joined #ruby
[14:55:07] sankaber: has joined #ruby
[14:55:54] ceej: has joined #ruby
[14:56:20] freerobby: has joined #ruby
[14:56:49] rideh: has joined #ruby
[14:57:42] hinbody: has joined #ruby
[14:57:44] suffice: has joined #ruby
[14:58:00] ElFerna: has joined #ruby
[14:59:31] thesheff17: has joined #ruby
[14:59:36] blaxter: has joined #ruby
[14:59:51] justinweiss: has joined #ruby
[15:00:04] sankaber: has joined #ruby
[15:00:13] avahey: has joined #ruby
[15:00:57] freerobby: has joined #ruby
[15:01:00] bove: has joined #ruby
[15:01:26] bttf: has joined #ruby
[15:01:34] AustinMatherne: has joined #ruby
[15:02:07] hagabaka: has joined #ruby
[15:03:30] roshanavand: has joined #ruby
[15:03:34] kellabyte: has joined #ruby
[15:03:52] jevs: has joined #ruby
[15:04:20] stannard: has joined #ruby
[15:04:29] Lloyd: has joined #ruby
[15:04:33] shelling__: has joined #ruby
[15:04:48] bcavileer_: has joined #ruby
[15:05:20] frankS2: has joined #ruby
[15:05:51] roshanavand: has joined #ruby
[15:06:58] GGMethos: has joined #ruby
[15:07:30] deeprave: has joined #ruby
[15:07:46] kaleido: has joined #ruby
[15:08:19] zemmihates: has joined #ruby
[15:08:54] polishdub: has joined #ruby
[15:09:17] dwfait: has joined #ruby
[15:09:54] blackjid: has joined #ruby
[15:09:58] akaiiro: has joined #ruby
[15:13:46] alphaatom: has joined #ruby
[15:16:32] alphaatom: has joined #ruby
[15:17:37] babblebre: has joined #ruby
[15:18:25] alphaatom: has joined #ruby
[15:18:46] bmalum: has joined #ruby
[15:22:25] devoldmx: has joined #ruby
[15:22:31] Encapsulation: has joined #ruby
[15:22:37] alphaatom: has joined #ruby
[15:23:56] teoric: has joined #ruby
[15:25:37] teoric: has joined #ruby
[15:25:40] alphaatom: has joined #ruby
[15:26:34] nisstyre: has joined #ruby
[15:28:07] greenhat: direnv is great. ./bin is only in your path when you are in your project directory.
[15:28:27] cmckni3: has joined #ruby
[15:28:41] idefine: has joined #ruby
[15:30:08] trwyth: has joined #ruby
[15:30:15] atomical: has joined #ruby
[15:32:30] haraigoshi: has joined #ruby
[15:32:34] tjohnson: has joined #ruby
[15:32:52] edwinvdgraaf: has joined #ruby
[15:37:23] alphaatom: has joined #ruby
[15:40:54] idefine: has joined #ruby
[15:40:58] nateberkopec: has joined #ruby
[15:43:36] bmalum: has joined #ruby
[15:44:18] cyfr0n: has joined #ruby
[15:44:24] aegis3121: has joined #ruby
[15:45:13] Dimik: has joined #ruby
[15:46:05] kies^: has joined #ruby
[15:47:07] renderful: has joined #ruby
[15:49:10] atumzin: has joined #ruby
[15:49:10] atumzin: has joined #ruby
[15:53:29] roshanav_: has joined #ruby
[15:54:13] solocshaw: has joined #ruby
[15:55:38] devbug: has joined #ruby
[15:56:08] symm-: has joined #ruby
[15:56:21] aegis3121: has joined #ruby
[15:56:42] atomical: has joined #ruby
[15:58:14] RegulationD: has joined #ruby
[15:58:56] atumzin: has joined #ruby
[15:58:57] atumzin: has joined #ruby
[15:59:34] ElFerna: has joined #ruby
[16:00:39] TheBrayn: has joined #ruby
[16:02:03] bithon: has joined #ruby
[16:03:51] tomphp: has joined #ruby
[16:04:21] Jackneill: has joined #ruby
[16:04:27] TheBrayn: has joined #ruby
[16:05:04] PsionTheory: has joined #ruby
[16:07:27] Rodya_: has joined #ruby
[16:07:32] duckpuppy: has joined #ruby
[16:09:08] arup_r: has joined #ruby
[16:09:26] jordanm: has joined #ruby
[16:11:36] Guest38: has joined #ruby
[16:12:17] andywojo: has joined #ruby
[16:12:41] trwyth: has joined #ruby
[16:14:17] GGMethos: has joined #ruby
[16:14:25] jondot: has joined #ruby
[16:14:48] hagabaka: has joined #ruby
[16:14:55] idefine: has joined #ruby
[16:14:59] Axsuul: has joined #ruby
[16:15:36] aryaching: has joined #ruby
[16:15:57] azgil: has joined #ruby
[16:17:32] loincloth: has joined #ruby
[16:18:20] chouhoulis: has joined #ruby
[16:18:40] darkxploit: has joined #ruby
[16:18:52] Scripore: has joined #ruby
[16:20:31] snockerton: has joined #ruby
[16:20:32] ElFerna: has joined #ruby
[16:21:25] last_staff: has joined #ruby
[16:21:51] moeabdol1: has joined #ruby
[16:22:04] trwyth: has joined #ruby
[16:22:08] wrilain: has joined #ruby
[16:22:29] krobzaur: has joined #ruby
[16:23:24] seitensei: has joined #ruby
[16:25:40] chouhoulis: has joined #ruby
[16:26:00] curses: has joined #ruby
[16:26:03] puria: has joined #ruby
[16:26:10] jinie: has joined #ruby
[16:27:46] nertzy: has joined #ruby
[16:27:56] FernandoBasso: has joined #ruby
[16:29:21] dionysus69: has joined #ruby
[16:30:56] startupality: has joined #ruby
[16:32:09] stannard: has joined #ruby
[16:32:24] Jardayn: has joined #ruby
[16:32:43] guardian: hello, if I do s = 'the value of x = #{x}'
[16:32:55] guardian: then how do I dynamically evaluate that string and make the interpolation happen?
[16:33:20] ljarvis: guardian: you don't
[16:33:23] havenwood: guardian: Double quotes.
[16:33:25] aegis3121: https://rubymonk.com/learning/books/1-ruby-primer/chapters/5-strings/lessons/31-string-basics
[16:33:28] |ifei5g00d: has joined #ruby
[16:33:43] havenwood: guardian: Can't interpolate with single quotes.
[16:33:47] guardian: basically, I weant s to be a template and evaluate it multiple times with different values of x
[16:34:00] aegis3121: Sounds like a function.
[16:34:09] guardian: havenwood: I put simple quotes on purpose
[16:34:09] ljarvis: guardian: use a templating tool?
[16:34:17] celly: has joined #ruby
[16:34:26] ljarvis: otherwise you'll need to do substitutions
[16:34:29] guardian: no I don't need a full templating lib/tool
[16:34:31] havenwood: guardian: Are you familiar with ERB?
[16:34:36] ljarvis: you don't need one?
[16:34:39] adaedra: source.map do |n| "the value of x = #{x}" end
[16:34:44] guardian: yes I am familiar with ERB
[16:34:52] adaedra: err, s/n/x/
[16:35:45] aegis3121: def a_string(val) "the value of x = #{val}"; end
[16:36:30] guardian: well, I admit I'm simplifying in hope we could focus on late string interpolation :)
[16:36:44] guardian: the string s = "x = #{x}" comes from a config file
[16:37:07] ljarvis: do you control the syntax?
[16:37:23] renderful: has joined #ruby
[16:37:25] guardian: in the config file, which is not Ruby, nor an advanced DSL, the user can swap #{x} for #{y} or #{z} but it's a limited set of choices
[16:37:43] rkazak_: has joined #ruby
[16:37:46] jinie_: has joined #ruby
[16:37:54] guardian: x, y, z being variables of the program that reads the conf
[16:37:57] guardian: ljarvis: yes
[16:38:04] ljarvis: guardian: then change it to %{}
[16:38:15] ljarvis: guardian: and use string formatting
[16:38:17] gregf: has joined #ruby
[16:38:19] Ox0dea: This is all missing the point of guardian's question.
[16:38:22] ljarvis: >> "foo %{bar}" % { bar: "baz" } # guardian
[16:38:23] ruboto: ljarvis # => "foo baz" (https://eval.in/494882)
[16:38:32] Ox0dea: They want to do "late binding" in an interpolated string.
[16:39:07] constantinexvi: has joined #ruby
[16:39:40] guardian: ljarvis: ah nice, that would work, thanks
[16:40:10] Ox0dea: Well, that's what they said they wanted to do, anyway. :P
[16:40:42] adaedra: Too bad my crystal ball is broken.
[16:40:45] ljarvis: you can't interpret everything literally :)
[16:40:56] Ox0dea: Prove it.
[16:41:08] guardian: Ox0dea: well with what ljarvis suggested the syntax is a bit different but it achieves of replacing %{bar} after the fact
[16:41:08] timonv: has joined #ruby
[16:41:24] JoshGlzBrk: has joined #ruby
[16:41:34] Ox0dea: guardian: Not quite. It's still just interpolation.
[16:41:41] havenwood: adaedra: Maybe reimplement it in Crystal.
[16:41:52] alphaatom: has joined #ruby
[16:41:57] adaedra: It's not too late for the joke of the year.
[16:42:15] Ox0dea: guardian: Maybe you just want regular-ol' string formatting?
[16:42:21] Ox0dea: >> '%s %d' % ['foo', 42]
[16:42:22] ruboto: Ox0dea # => "foo 42" (https://eval.in/494885)
[16:43:45] Ox0dea: `%{bar}` is also just "regular-ol' string formatting", I suppose.
[16:44:08] guardian: which is enough for my current problem
[16:44:56] guardian: I thought about eval because that's what I would do in bash, but with ruby's string interpolation it solves my little problem just fine
[16:45:28] Ox0dea: But... we've just concluded that you want string formatting, not interpolation.
[16:45:40] trwyth: has joined #ruby
[16:46:12] tvw: has joined #ruby
[16:46:37] guardian: I want the string s to be = "x is %{foo}" read from a configuration file, and evaluate that and replace %{foo} by its actual value
[16:47:02] loincloth: has joined #ruby
[16:47:13] guardian: which is string formatting, as far as I understand right?
[16:47:17] roshanavand: has joined #ruby
[16:47:48] timonv: has joined #ruby
[16:48:15] luckyme: has joined #ruby
[16:48:55] jhass: guardian: yes, see docs for String#% and Kernel#sprintf
[16:49:00] roshanavand: has joined #ruby
[16:50:06] guardian: thanks for the help
[16:52:19] synthroid: has joined #ruby
[16:52:42] Guest37759: has joined #ruby
[16:53:17] codecop: has joined #ruby
[16:54:13] loren: has joined #ruby
[16:54:17] cdg: has joined #ruby
[16:54:19] loren321: has joined #ruby
[16:54:23] bithon: has joined #ruby
[16:55:39] norc: has joined #ruby
[16:58:41] livcd: cannot load such file -- zlib when i do gem install
[16:58:53] livcd: i have installed zlib1g-dev but that did not help
[16:59:04] Ox0dea: >> require 'zlib' # livcd
[16:59:05] ruboto: Ox0dea # => true (https://eval.in/494896)
[16:59:11] Ox0dea: It's part of the standard library.
[16:59:16] BTRE: has left #ruby: ("Leaving")
[16:59:18] bmalum: has joined #ruby
[16:59:25] livcd: i compiled ruby from source
[16:59:52] Mia: has joined #ruby
[16:59:52] Mia: has joined #ruby
[17:00:54] Ox0dea: I'm sorry to hear that.
[17:00:54] livcd: oh nvm found the solution
[17:01:14] kfpratt: has joined #ruby
[17:02:14] Axy: has joined #ruby
[17:02:15] Axy: has joined #ruby
[17:02:35] jobewan: has joined #ruby
[17:02:51] bmalum: has joined #ruby
[17:04:10] roshanavand: has joined #ruby
[17:04:15] kies^: has joined #ruby
[17:04:36] amclain: has joined #ruby
[17:05:39] shakes: has joined #ruby
[17:05:58] S1kx: has joined #ruby
[17:06:34] TomPeed: has joined #ruby
[17:06:49] cdg: has joined #ruby
[17:08:39] baroquebobcat: has joined #ruby
[17:11:20] ElFerna: has joined #ruby
[17:12:32] aryaching: has joined #ruby
[17:14:16] ElFerna: has joined #ruby
[17:14:31] alphaatom: has joined #ruby
[17:16:43] wolffles: has joined #ruby
[17:18:11] trwyth: has joined #ruby
[17:19:19] mdw: has joined #ruby
[17:20:33] haraigoshi: has joined #ruby
[17:21:24] loincloth: has joined #ruby
[17:23:06] devoldmx: has joined #ruby
[17:23:37] Scripore: has joined #ruby
[17:23:55] banister: has joined #ruby
[17:25:07] sigurding: has joined #ruby
[17:25:21] skcin7_: has joined #ruby
[17:28:19] roshanavand: has joined #ruby
[17:29:13] FooMunki_: has joined #ruby
[17:31:26] yes`r: has joined #ruby
[17:31:51] SCHAAP137: has joined #ruby
[17:34:51] [Butch]: has joined #ruby
[17:35:25] Wompy: has joined #ruby
[17:35:50] ta0: has joined #ruby
[17:36:27] baweaver: has joined #ruby
[17:37:31] shevy: long live ruby \o/
[17:38:15] roshanavand: has joined #ruby
[17:40:23] alphaatom: has joined #ruby
[17:40:25] smactive: has joined #ruby
[17:41:35] async_prince: has joined #ruby
[17:43:57] kknight: has joined #ruby
[17:44:48] ico: has joined #ruby
[17:45:13] async_prince: has joined #ruby
[17:48:11] roshanavand: has joined #ruby
[17:48:13] jackjackdripper: has joined #ruby
[17:48:22] adgtl: has joined #ruby
[17:49:48] adgtl: Guys I have list of input numbers as [30, 40, 20, 20, 30] and I want to select only numbers so that total matches to 120
[17:49:55] adgtl: or closer to 120
[17:50:16] adgtl: is there any way in Ruby to perform this kind of operation?
[17:50:39] ElFerna: has joined #ruby
[17:51:06] psye: has joined #ruby
[17:51:19] adgtl: Selected list should be [20, 30, 30, 40] as total is 120
[17:51:27] adgtl: instead of [20, 20, 30, 40]
[17:51:55] Ox0dea: >> [30, 40, 20, 20, 30].combination(4).select { |ns| ns.reduce(:+) == 120 } # adgtl
[17:51:56] ruboto: Ox0dea # => [[30, 40, 20, 30], [30, 40, 20, 30]] (https://eval.in/494921)
[17:52:00] Ox0dea: Something like that.
[17:52:05] startupality: has joined #ruby
[17:52:39] adgtl: Ox0dea: what is 4 in combincation
[17:52:43] Ox0dea: adgtl: Guess.
[17:52:45] adgtl: combination
[17:53:05] plsk: has joined #ruby
[17:53:07] puria: has joined #ruby
[17:53:23] aegis3121: has joined #ruby
[17:53:41] ElFerna: has joined #ruby
[17:54:36] adgtl: Ox0dea: yeah.. but I can't decide that 4
[17:54:41] lucid_: has joined #ruby
[17:55:19] adgtl: basically list can be big one
[17:55:28] adgtl: and instead of 120.. there could be another number
[17:55:30] Ox0dea: adgtl: I picked it at random. https://xkcd.com/221/
[17:55:43] Ox0dea: adgtl: How big?
[17:55:44] hxegon: has joined #ruby
[17:56:40] adgtl: e.g. [30, 45, 20, 20, 30, 50, 60, 45] and you have to find out best fit of numbers whose total is/near 200
[17:57:01] domgetter: has joined #ruby
[17:57:17] adgtl: Ox0dea: it doesnt need to be exactly same.. but total should be near (but less than) or equal to 200
[17:57:50] Ox0dea: adgtl: You want #combination and some effort.
[17:57:54] shanemcd: has joined #ruby
[17:57:55] aryaching: has joined #ruby
[17:59:57] idefine: has joined #ruby
[18:01:09] felltir: has joined #ruby
[18:01:55] kirun: has joined #ruby
[18:02:04] kies^: has joined #ruby
[18:05:46] demophoon: has joined #ruby
[18:06:38] rippa: has joined #ruby
[18:08:26] duckpuppy: has joined #ruby
[18:11:13] havenwood: adgtl: So maybe iterate from one up to the list size and flat map to a combo of the list of that size, selecting combos where sums are between the goal minus the tolerance and the goal plus the tolerance. Then limit it to the unique ones if you want to not have the same combos due to repeated numbers in a list.
[18:12:10] camillo: has joined #ruby
[18:12:13] adgtl: havenwood: exactly
[18:12:30] adgtl: havenwood: let me implement it and paste it here
[18:12:50] andywojo: has joined #ruby
[18:13:23] havenwood: adgtl: sounds good
[18:14:14] Ox0dea: havenwood: Why not #group_by the absolute difference with the target and take the min?
[18:14:44] havenwood: Ox0dea: mmm
[18:15:26] banister: has joined #ruby
[18:16:22] lacrosse: has joined #ruby
[18:16:30] pawnbox: has joined #ruby
[18:16:47] dingman: has joined #ruby
[18:18:12] dn5: has joined #ruby
[18:19:08] hobodave: has joined #ruby
[18:20:17] adgtl: Ox0dea: example?
[18:20:29] adgtl: I will be pasting one with combination
[18:20:40] Ox0dea: adgtl: https://eval.in/494935
[18:20:44] Ox0dea: That looks about right.
[18:20:58] moeabdol1: has joined #ruby
[18:21:16] Ox0dea: Please try to break it.
[18:21:51] isomorphismes: has joined #ruby
[18:22:23] Ox0dea: I suspect you're not allowed to go over the goal, so absolute difference isn't sufficient, but that's left as an exercise.
[18:22:26] celly: has joined #ruby
[18:22:47] pen: has joined #ruby
[18:23:04] davedev24: has joined #ruby
[18:23:07] rkazak_: has joined #ruby
[18:23:15] Ox0dea: As payment for services rendered, please add !~ to ruby-operators and call it the bangarang.
[18:24:17] seitensei: has joined #ruby
[18:25:18] yxby-: has joined #ruby
[18:26:25] bmalum: has joined #ruby
[18:27:18] Ox0dea: Oh, the #uniq really ought to go right after the #flat_map.
[18:27:35] alphaatom: has joined #ruby
[18:28:01] isomorphismes: I'm still using ruby v1.9.3p0 (Ubuntu's package version). Just trying to make a quickie Sinatra site. Do I need to switch up to v2 ?
[18:28:09] isomorphismes: And if so -- what's a "safe" way to do that?
[18:29:02] SenpaiSilver: has joined #ruby
[18:29:19] yxby-: has left #ruby: ()
[18:29:32] havenwood: isomorphismes: Usually Brightbox maintains up-to-date Ruby packages for Ubuntu but they're on Christmas break so no 2.3 yet: https://www.brightbox.com/docs/ruby/ubuntu/
[18:30:44] havenwood: isomorphismes: But they do have 2.2.4 and will have 2.3.0 soon.
[18:30:59] isomorphismes: havenwood: Thanks. How important is it to get off v1.9.3p0 ?
[18:31:20] idefine: has joined #ruby
[18:33:41] havenwood: isomorphismes: I think it's worth switching to a stable, supported Ruby.
[18:34:08] yxby: has joined #ruby
[18:34:32] havenwood: isomorphismes: 2.1.8, 2.2.4 or 2.3.0
[18:34:53] havenwood: (2.0.0-p648 is on its last legs)
[18:35:12] havenwood: (End-of-life in Feb)
[18:35:17] davedev24: has joined #ruby
[18:36:05] BSaboia: has joined #ruby
[18:36:09] wsewolod: has joined #ruby
[18:38:03] isomorphismes: havenwood: Thanks. Do I need to learn new commands> Last time I touched ruby was 2-3 yrs ago
[18:38:07] havenwood: isomorphismes: You might give Roda a look too (like Sinatra but with a routing tree and nifty plugin system): https://github.com/jeremyevans/roda#readme
[18:38:29] marcdel: has joined #ruby
[18:39:00] isomorphismes: Why is a routing tree better than Sinatra's way?
[18:39:05] havenwood: isomorphismes: There are a handful of new methods and some nice changes under the hood but you should be good.
[18:39:31] dopie: has joined #ruby
[18:39:34] yxby: has joined #ruby
[18:39:59] skcin7: has joined #ruby
[18:40:12] bmalum: has joined #ruby
[18:40:28] havenwood: isomorphismes: Sinatra runs a Regexp against each route so if you say have thousands it slows down substantially since it has to check each one every time. Typically it doesn't matter but it gives you flexibility.
[18:41:02] isomorphismes: https://github.com/rvm/rvm/commit/52018750763d5321b7b993e201c8589b98e090f9
[18:41:11] isomorphismes: still getting this error (posted 2011)
[18:41:39] shanemcd: has joined #ruby
[18:41:39] roshanavand: has joined #ruby
[18:41:41] isomorphismes: havenwood: cool. thanks
[18:41:42] blipz: has joined #ruby
[18:41:47] havenwood: isomorphismes: Don't use Ubuntu's RVM package! ;)
[18:41:53] yxby: has joined #ruby
[18:42:25] havenwood: isomorphismes: Roda's plugin system is really nice. You get to compose your own framework. It's really nicely made.
[18:42:35] arup_r: has joined #ruby
[18:42:49] havenwood: isomorphismes: Its creator is the maintainer of the Sequel gem so of course they work swimmingly together.
[18:43:13] mallu: has joined #ruby
[18:43:43] mallu: can someone please tell me how to convert date 8/11/2015 to milliseconds?
[18:44:27] havenwood: isomorphismes: ruby-install 0.6.0 is out now but this is a good writeup on chruby/ruby-install on Ubuntu: http://ryanbigg.com/2014/10/ubuntu-ruby-ruby-install-chruby-and-you//
[18:44:30] shevy: mallu you need a time object
[18:44:31] mallu: p DateTime.strptime("08/11/2015" '%Q') ArgumentError: invalid date
[18:45:08] shevy: mallu try Time.parse "08/11/2015" or another parse method; also use valid ruby syntax
[18:45:21] mallu: shevy: ok let me try that
[18:45:26] baweaver: has joined #ruby
[18:45:46] havenwood: isomorphismes: If you want to use RVM definitely uninstall the system package and install from master: \curl -sSL https://get.rvm.io | bash
[18:45:46] isomorphismes: Is there a way to get offline docs / man pages for ruby?
[18:45:59] havenwood: isomorphismes: Yeah, Ruby ships with rdoc and ri.
[18:46:11] isomorphismes: havenwood: what about rvm head && rvm smile? That was what an SO answer said.
[18:46:13] isomorphismes: havenwood: thanks
[18:46:33] Begi: has joined #ruby
[18:47:01] havenwood: isomorphismes: If you're using RVM to install: rvm docs generate
[18:47:10] shevy: mallu you may have to do require 'date' or require 'time' before some methods are available; it's best to have a look at the official documentation http://ruby-doc.org/stdlib-2.3.0/libdoc/date/rdoc/Date.html
[18:47:12] havenwood: isomorphismes: see: rvm help docs
[18:47:40] Ox0dea: mallu: Milliseconds since the Unix epoch, you mean?
[18:47:59] mallu: Ox0dea: yes
[18:48:02] hxegon: that feeling when after getting fed up with no reply from support your halfway through rolling your own API client and they email you back 2 weeks into it and say "The option to do that only appears for us."
[18:48:13] hxegon: ACTION starts calmly tearing his hair out
[18:48:13] baroquebobcat: has joined #ruby
[18:48:25] isomorphismes: havenwood: So that pointed me to: http://stackoverflow.com/questions/9056008/installed-ruby-1-9-3-with-rvm-but-command-line-doesnt-show-ruby-v/9056395#9056395
[18:49:12] havenwood: isomorphismes: Yeah, you don't want an apt-get version of RVM around. That's bad.
[18:49:21] idefine: has joined #ruby
[18:50:07] isomorphismes: ....which points to https://blog.coolaj86.com/articles/installing-ruby-on-ubuntu-12-04.html, which seems to be broken.
[18:50:14] havenwood: isomorphismes: Kill it with fire. Restart your computer and wash your hands. Then reinstall RVM (from master not stable): \curl -sSL https://get.rvm.io | bash
[18:50:27] isomorphismes: Well, it can't seem to find either now.
[18:50:31] centrx: has joined #ruby
[18:50:41] isomorphismes: I have the git clone in /opt, I can ust run it from there?
[18:51:12] dopie: has joined #ruby
[18:51:39] Ox0dea: >> require 'date'; d = '08/11/2015'; (Date.today - Date.strptime(d, '%m/%d/%Y')).to_i * 86_400_000 # mallu
[18:51:40] ruboto: Ox0dea # => 12096000000 (https://eval.in/494943)
[18:51:49] Ox0dea: But it's unclear why you'd need such a thing.
[18:51:54] mallu: Ox0dea: thank you
[18:52:42] Axsuul: has joined #ruby
[18:52:42] ghr: has joined #ruby
[18:52:52] havenwood: isomorphismes: I don't quite follow.
[18:52:59] nietzschette: has joined #ruby
[18:53:14] Ox0dea: mallu: Sorry, that's totally wrong.
[18:53:19] RegulationD: has joined #ruby
[18:53:25] Ox0dea: That's the number of milliseconds between then and now.
[18:54:01] Ox0dea: >> require 'date'; Date.strptime('08/11/2015', '%m/%d/%Y').strftime '%s000'
[18:54:02] ruboto: Ox0dea # => "1439251200000" (https://eval.in/494944)
[18:54:19] Ox0dea: See how wanting it as milliseconds seems a little weird?
[18:54:42] epochwolf: has joined #ruby
[18:55:47] centrx: What is the best project management tool?
[18:55:56] nietzschette: 0x0dea = 3562?
[18:56:02] Ox0dea: >> 0x0dea
[18:56:02] jhass: ?best centrx
[18:56:02] ruboto: centrx, "better" and "best" depend entirely on your context. Try to describe what quality would make one thing better than the other.
[18:56:03] ruboto: Ox0dea # => 3562 (https://eval.in/494946)
[18:56:06] isomorphismes: so I need to do \curl -L https://get.rvm.io | bash -s master --ruby --autolibs=enable --auto-dotfiles ?
[18:56:21] Ox0dea: Please don't.
[18:56:21] isomorphismes: I've never heard of \curl
[18:56:34] Ox0dea: It's to circumvent aliases.
[18:56:37] centrx: Yeah I'm looking for the best one of all time. I have no idea what qualities
[18:56:41] havenwood: isomorphismes: It's just curl. Backslash to avoid aliases.
[18:57:10] centrx: jhass, What project management tool(s) do you use?
[18:57:26] jhass: centrx: mostly Github
[18:57:39] centrx: hmm there's an idea
[18:57:40] ChameleonSix: has joined #ruby
[18:57:41] jhass: some redmine
[18:58:03] kaleido: has joined #ruby
[18:58:17] havenwood: isomorphismes: I believe --autolibs=enable and --auto-dotfiles are defaults. I usually install Ruby as a second step rather than all-in-one command.
[18:58:25] havenwood: isomorphismes: I'd just: \curl -sSL https://get.rvm.io | bash
[18:59:00] centrx: jhass, Thank you
[18:59:22] dopie: has joined #ruby
[18:59:25] Jardayn: has joined #ruby
[18:59:38] jhass: trello looks pretty neat for some usecases
[18:59:56] centrx: Trello was really basic and simple when I tried it
[19:00:12] ChameleonSix: Im going through koans right now
[19:00:46] hxegon: ?question
[19:00:46] ruboto: I don't know anything about question
[19:00:47] dopie: has joined #ruby
[19:00:54] hxegon: someone help me out here
[19:01:22] renderful: has joined #ruby
[19:01:42] ChameleonSix: why is ruboto on android different than irb on pc
[19:01:52] mallu: Ox0dea: thanks
[19:01:57] Ox0dea: Sure thing.
[19:02:28] nietzschette: when I feed a string literal into my gosu app, it draws just fine. when I read from $stdin, the app draws each character as seperate entries in an array. anybody know what's going on here?
[19:02:42] Ox0dea: hxegon: Hm?
[19:03:02] isomorphismes: havenwood: Right, when I did that I got message redirecting me to that SO answer, which redirected to https://web.archive.org/web/20140219110850/http://blog.coolaj86.com/articles/installing-ruby-on-ubuntu-12-04.html
[19:03:08] hxegon: Ox0dea isn't there a fact that says something like, don't ask to ask a question?
[19:03:13] Ox0dea: ?ask hxegon
[19:03:13] ruboto: hxegon, Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
[19:03:16] rideh: has joined #ruby
[19:03:42] havenwood: isomorphismes: Ah, I missed that part. Gotcha.
[19:03:46] hxegon: ChameleonSix do you mean ruboto the bot in this channel or ruboto the android ruby framework?
[19:03:56] ChameleonSix: ruboto the android...
[19:04:14] isomorphismes: But there's something wrong with stable and I should use master, or no? havenwood 0x0dea
[19:04:19] hxegon: "the password is fourwordsalluppercase"
[19:04:25] roshanavand: has joined #ruby
[19:04:46] havenwood: isomorphismes: stable is just old and has bugs that are fixed in master
[19:05:01] havenwood: isomorphismes: and doesn't have new rubies
[19:05:12] shevy: isomorphismes come to the future!
[19:05:14] hxegon: ChameleonSix so what are you trying to compare between the framework and IRB?
[19:05:26] jhass: and unicode
[19:05:30] isomorphismes: shevy: cool, that's the one I was thinking of getting. thx
[19:05:48] Ox0dea: https://youtu.be/bLE7zsJk4AI?t=36
[19:06:15] domgetter: nietzschette: can you make a gist of what you mean? https://gist.github.com/
[19:06:40] domgetter: How are you using gosu when you give it a literal, and how are you reading from stdin?
[19:06:48] hxegon: Ox0dea my fav rocketjump in quite a while
[19:07:12] hagabaka: has joined #ruby
[19:07:13] nietzschette: unfortunatly .chomp doesn't print anything
[19:07:13] isomorphismes: 18:56 < Ox0dea> Please don't. 19:04 < Ox0dea> NO! <---- Was that directed at me getting bash -s master ?
[19:07:17] hxegon: ChameleonSix can you be more specific?
[19:07:24] Cohedrin: has joined #ruby
[19:07:37] ChameleonSix: try it for yourself
[19:07:40] ChameleonSix: and you will see
[19:07:42] dopie: has joined #ruby
[19:07:42] Ox0dea: isomorphismes: More RVM in general, but I'll stop.
[19:07:55] shevy: ChameleonSix don't be so mean
[19:08:16] ChameleonSix: idk how to explain
[19:08:45] haraigoshi: has joined #ruby
[19:09:10] idefine: has joined #ruby
[19:09:17] hxegon: ChameleonSix I *can't* help you if the only thing I know is that your trying to see a difference between either ruboto the irc bot or the android framework and irb on pc, and it's 'gets.chomp'
[19:09:54] ChameleonSix: it doesnt work on ruboto
[19:10:20] Ox0dea: ChameleonSix: Why are you even using Ruboto?
[19:10:28] Ox0dea: Tasker + shell scripts, silly.
[19:10:30] redeeem: has joined #ruby
[19:10:41] nietzschette: https://gist.github.com/anonymous/227aff962d9e8c0868c5
[19:10:54] hxegon: adaedra ESCAPE WHILE YOU CAN
[19:11:09] ChameleonSix: shell scripts
[19:11:12] Ox0dea: nietzschette: You're using #getch, which reads one character at a time.
[19:11:14] isomorphismes: 0x0dea: So what's wrong with RVM?
[19:11:21] adaedra: nietzschette: change the file extension to .rb and get syntax colors!
[19:11:25] adaedra: isomorphismes: it's bloat.
[19:11:31] nietzschette: the problem remains
[19:11:39] havenwood: isomorphismes: It's over ten thousand lines of shell scripting.
[19:11:40] adaedra: hxegon: I'm only watching.
[19:11:53] shanemcd: has joined #ruby
[19:12:25] isomorphismes: 0x0dea: I'm just trying to do something pretty quick. My only decision criterion is will it work pretty much immediately with as close to 0 as possible effort/research
[19:12:27] domgetter: nietzschette: file extensions make it pretty: https://gist.github.com/domgetter/a4f7aa1f99ed1df07373 :)
[19:12:31] ChameleonSix: brb 20 mins??
[19:12:38] hxegon: ChameleonSix I found a super nice link that can explain it all http://goo.gl/MSVUKo
[19:12:40] Ox0dea: isomorphismes: That's a troubling mindset, but okay.
[19:12:58] nietzschette: that is pretty, thank you dom
[19:12:58] isomorphismes: 0x0dea: I'm not a ruby programmer
[19:13:17] domgetter: nietzschette: but yea, use gets.chomp
[19:13:28] Ox0dea: domgetter: That's obviously not what they want to do.
[19:13:36] nietzschette: gets.chomp does not print anything at all
[19:13:39] Ox0dea: This is for a game, where uncooked input is to be desired.
[19:13:58] Ox0dea: nietzschette: Could you link the declaration of this BottomFeeder class?
[19:14:12] tildes: has joined #ruby
[19:14:17] cinch: has joined #ruby
[19:14:21] havenwood: isomorphismes: The simplest way is the 2.2.4 Brightbox package. The next simplest would probably be `ruby-install --latest --system ruby` for a /usr/local install.
[19:14:28] havenwood: isomorphismes: Do you need more than one Ruby?
[19:14:32] dopie: has joined #ruby
[19:14:39] havenwood: isomorphismes: If you don't need more than one Ruby you don't need a switcher.
[19:15:10] isomorphismes: havenwood: I don't think so. Just wanted to check that v1.9.3p0 isn't so horribly out of date that it's actually broken.
[19:15:20] domgetter: nietzschette: how about this: until you read a newline character from getch, keep storing the input into a string, and then shove the resulting word into @words
[19:15:33] havenwood: isomorphismes: It's past End-of-Life but the sky won't fall.
[19:16:00] domgetter: wait, what the heck is getch?
[19:16:01] havenwood: isomorphismes: I'd say Brightbox package and be done with it.
[19:16:12] `derpy: http://ruby-doc.org/stdlib-2.2.4/libdoc/io/console/rdoc/IO.html#method-i-getch
[19:16:12] hxegon: havenwood is it possible to make a fact that takes a google search query and makes a shortened lmgtfy link?
[19:16:13] jondot: has joined #ruby
[19:16:16] havenwood: domgetter: Press a key, capture it.
[19:16:24] isomorphismes: havenwood: I already have it with rvm. Should I get rid of that now?
[19:16:27] nietzschette: the bottomfeeder class works fine when I test it using a string litteral "like this". but when I feed it input '["l", "i", "k", "e", " ", "t" , "h" ,"i", "s"]'
[19:16:32] domgetter: NoMethodError: undefined method `getch' for #<IO:<STDIN>>
[19:16:34] baweaver: has joined #ruby
[19:16:38] adaedra: hxegon: not a fact, a command, but see with apeiros.
[19:16:48] nietzschette: you have to require 'io/console'
[19:17:03] havenwood: hxegon: what adaedra said - not as a fact but such a command could be added to ruboto
[19:17:07] cinch: has joined #ruby
[19:17:28] hxegon: thanks adaedra, havenwood
[19:17:45] havenwood: isomorphismes: As long as you have 2.2 or 2.3 you're good.
[19:17:45] nietzschette: here is bottom feeder: it's prolly super confusing https://gist.github.com/anonymous/92e6ab0d55302c4e7a7d
[19:17:57] isomorphismes: havenwood: thanks
[19:17:58] havenwood: isomorphismes: There is more than one way to do it!
[19:18:03] havenwood: isomorphismes: you're welcome
[19:18:26] adaedra: do you even indent?
[19:18:40] stannard: has joined #ruby
[19:19:18] nietzschette: sorry, i don't usually indent, no
[19:20:18] Ox0dea: I can't even tell if that's sadism, masochism, or both.
[19:20:45] havenwood: The humanity!
[19:20:46] nietzschette: I'll leave extra newlines sometimes. But i am a bit of both so ..
[19:20:54] Ox0dea: In any case, `@words.in` starts life as a String and becomes an Array, but that can't happen if you're only ever shoveling (<<) into it, so the problem is elsewhere.
[19:21:00] adaedra: indent helps so much with readability
[19:21:05] Ox0dea: Prove it.
[19:21:29] nietzschette: it doesn't help me read it. i'm usually the only one reading it . .
[19:22:49] adaedra: Tada, readabler. https://gist.github.com/adaedra/cbaaf843203a51c33146
[19:23:08] isomorphismes: Now do I need to sudo gem update ?
[19:23:16] ruboto: I don't know anything about sudo
[19:23:19] ruboto: general advice in system administration: do not and that means never use sudo or root to "fix" things. Only use it if you exactly know why it would work and why it wouldn't work under any circumstances as normal user. Or if you're told to do it.
[19:23:22] domgetter: Ox0dea: huh? in never becomes an array
[19:23:23] ferr: has joined #ruby
[19:23:40] nietzschette: yeah, it stays a string
[19:23:54] devoldmx: has joined #ruby
[19:23:58] domgetter: >> a = ''; a << "h"; a.class
[19:23:59] ruboto: domgetter # => String (https://eval.in/494949)
[19:24:29] nietzschette: yet, somehow my characters are all padded with quotes, spereated by commas, and bracketed. it's so weird
[19:24:41] puria: has joined #ruby
[19:25:04] adaedra: that's an array.
[19:25:13] aegis3121: has joined #ruby
[19:25:18] domgetter: nietzschette: pro-tip: use .inspect when you want to see what something really looks like
[19:25:24] marius1234: has joined #ruby
[19:26:04] domgetter: nietzschette: I'm confused about the update method in your BottomFeeder class
[19:26:16] adaedra: Or `pp`, for clearer output.
[19:26:35] nietzschette: a = @in[@pos]
[19:26:40] tectonic: has joined #ruby
[19:26:54] nietzschette: it's because i'm reading character by character of the string, @in
[19:27:17] domgetter: okay go tit
[19:27:21] nietzschette: looking for newlines and measuring when to start a new line
[19:27:55] shevy: domgetter go tit!!!
[19:28:01] Ox0dea: Le tits now.
[19:28:30] Ox0dea: http://i.imgur.com/SRBO8cc.jpg
[19:28:51] adaedra: Too hot for that.
[19:28:52] aegis3121: has joined #ruby
[19:29:00] nietzschette: how does one tit? i mean as a verb.
[19:29:08] nietzschette: i must see demonstration
[19:29:09] hostess: has joined #ruby
[19:29:57] nickjj: has joined #ruby
[19:30:13] domgetter: that was seven lines of too much conversation for one typo
[19:30:24] demophoon: has joined #ruby
[19:30:25] mostlybadfly: has joined #ruby
[19:30:27] adaedra: that was good.
[19:30:58] nietzschette: freudian slip, not a mere typo i think
[19:30:59] lucid_: has joined #ruby
[19:31:14] adgtl: Ox0dea: here is my solution https://gist.github.com/anildigital/69673488a1b63779bbd5
[19:31:32] Ox0dea: nietzschette: To tit is to be the first to engage in tit-for-tat behavior.
[19:32:40] Ox0dea: > selected_talk_list_size = selected_talk_list.size
[19:32:42] nietzschette: 3562: brilliant
[19:32:45] Ox0dea: Great code.
[19:34:25] Ox0dea: adgtl: You're only ever choosing combinations of one particular size. I'm sure that's not what you want.
[19:34:44] adgtl: Ox0dea: great code :D
[19:34:51] adgtl: I mean.. it's not that clean anyways
[19:35:08] Ox0dea: It's just noise plastered over the proper solution I tried to give you. :<
[19:35:33] adgtl: Ox0dea: yeah
[19:36:06] osiutino_: has joined #ruby
[19:36:18] aspiers: has joined #ruby
[19:36:21] marius1234: has joined #ruby
[19:37:28] hagabaka: has joined #ruby
[19:37:34] havenwood: adgtl: 1.upto(list.size).flat_map { |size| list.combination(size).select { |combo| combo.inject(:+).between? goal - tolerance, goal } }
[19:37:50] marius1234: has joined #ruby
[19:38:04] marius1234: has joined #ruby
[19:38:23] adgtl: havenwood: thanks :)
[19:39:00] domgetter: havenwood: okay now lazily. and with transducers
[19:39:13] havenwood: domgetter: ;D
[19:39:42] bradleyprice: has joined #ruby
[19:39:53] marius1234: has joined #ruby
[19:40:57] bodgix: I can't figure out the syntax to end the exception handling: begin block without ending the code block nested within it. Is that even possible? https://gist.github.com/bodgix/0dfa6308d9747248b5ef
[19:41:58] andywojo: has joined #ruby
[19:42:13] ElFerna: has joined #ruby
[19:42:20] nietzschette: you can nest exception blocks just fine
[19:42:23] domgetter: bodgix: Is there a reason you don't want ldap.search in the begin block?
[19:42:38] tectonic: has joined #ruby
[19:42:57] domgetter: It's not like it's harmful
[19:43:01] synthroid: has joined #ruby
[19:43:04] bodgix: domgetter: I realized it makes sense to keep it there. But in general would it be possible to leave it out?
[19:43:37] jhass: bodgix: are you sure .search throws the same exception as the one open throws that you want to handle?
[19:43:48] hahuang65: has joined #ruby
[19:44:13] bodgix: I believe open doesn't create the actual connection so it shouldn't throw anything
[19:44:32] jhass: then just move the begin inside the block?
[19:44:39] bodgix: but in general, putting LDAP example aside, is it possible to do this?
[19:44:50] c355E3B: has joined #ruby
[19:44:54] jhass: you can set a flag and reraise depending on it, but meh
[19:45:00] bodgix: ok. good point. I could move it inside the block
[19:45:06] domgetter: bodgix: yea, blocks are "atomic" in that sense
[19:45:13] domgetter: you can't have half a block
[19:45:21] bodgix: I guess I could createa proc
[19:45:46] bodgix: hm. meh never mind that wouldn't make any difference???
[19:45:52] havenwood: Mm, curried Procs - I'm hungry...
[19:46:06] domgetter: does Net::LDAP.open return an ldap if you don't pass a block?
[19:46:23] pawnbox: has joined #ruby
[19:46:40] domgetter: if so, just run it without the block, and then things you want inside a begin block, and other things outside
[19:47:02] trwyth: has joined #ruby
[19:47:13] jhass: plus and ensure; ldap.close if ldap; probably
[19:48:29] domgetter: bodgix: like this: https://gist.github.com/domgetter/0a22c26723f58ebb27b4
[19:48:53] nietzschette: the LDAP object be destroyed after the do block |ldap| ends?
[19:49:26] bodgix: domgetter: afaik it doesn't. It's funny how diffferently an ldap handle behaves when constructed with new or when open is used with a block
[19:49:28] domgetter: nietzschette: if it's anything like passing a block to File.open, then the file is closed after the block is finished
[19:49:29] nietzschette: not in dom's example
[19:50:05] shanemcd: has joined #ruby
[19:50:20] bodgix: if you use ldap = Net::LDAP.new then it creates a new connection for every search/ add etc. If you use Net::LDAP.open { |ldap| ???} it creates a single session for the duration of the whole block
[19:51:15] domgetter: then I would say you want what new does, since you don't want the features of a block
[19:51:21] bodgix: it's in the docs but it's easy to get bitten by it imo anyway
[19:51:29] Cohedrin: has joined #ruby
[19:51:41] bodgix: but I don't want the "reconnect and bind" behavior
[19:52:10] domgetter: but you want to use the ldap in a new lexical context
[19:53:42] kmckelvin: has joined #ruby
[19:54:12] bodgix: actually I'm fine with the begin block spanning across the whole lifetime of LDAP. it makes sense here. However, this example made me wonder if it was possible to end the begin block in the middle of another block. I thought it wasn't possible since it would require a label or sth but thought I'd ask
[19:55:12] shanemcd: has joined #ruby
[19:55:26] GlueC: has joined #ruby
[19:55:27] nietzschette: no, but you can begin a new exception handler inside the block
[19:55:31] harai: has joined #ruby
[19:55:58] bodgix: nietzschette: thanks that's very interesting
[19:56:00] dopie: has joined #ruby
[19:56:10] bodgix: it doesn't override the outer block I giess?
[19:56:28] nietzschette: no, it prevents the outer block from recieving the exception
[19:56:43] kadoppe: has joined #ruby
[19:58:12] bodgix: ok got you. this is definitely a way to achieve this kind of fine-grained exception handling
[19:58:26] ur5us: has joined #ruby
[19:59:05] chouhoulis: has joined #ruby
[19:59:19] moeabdol1: has joined #ruby
[19:59:36] domgetter: Of course, you can re-raise the exception so that it can bubble up
[19:59:45] domgetter: but I don't know how "best practice" that is
[20:00:23] ni291187: has joined #ruby
[20:00:37] chouhoulis: has joined #ruby
[20:00:48] ni291187: has left #ruby: ()
[20:01:03] roshanavand: has joined #ruby
[20:02:14] devbug: has joined #ruby
[20:04:13] ur5us: has joined #ruby
[20:04:27] bodgix: Since rubocop warns to use raise to re-raise and fail in other situations iirc, it looks like re-raising is a valid technique. exception handlers nesting is what I was looking for. great suggestions, thanks everyone :)
[20:04:38] volty: has joined #ruby
[20:04:48] RobertBirnie: has joined #ruby
[20:07:14] dopie: has joined #ruby
[20:07:21] idefine: has joined #ruby
[20:07:47] djbkd: has joined #ruby
[20:08:15] juddey: has joined #ruby
[20:08:37] colegatron: has joined #ruby
[20:08:38] Starfoxxes: has joined #ruby
[20:09:02] duckpuppy: has joined #ruby
[20:10:38] celly: has joined #ruby
[20:11:38] nietzschette: https://gist.github.com/anonymous/c594ecaa5896d7570038 <-- example, with indents
[20:13:11] lucid_: has joined #ruby
[20:14:05] baweaver: has joined #ruby
[20:15:00] andywojo: has joined #ruby
[20:16:25] nfk|laptop: has joined #ruby
[20:17:49] Wompy: has joined #ruby
[20:19:41] shevy: what ways do we have to check if a variable consists of only numbers? one obvious is to apply regex... another one may be to use .to_i and compare to non 0 value, but do we have anything such as .is_numeric? or similar? like "033".is_numeric? should in this case yield true, if we are to assume that 033 are valid numbers, aka 0-9 even if it is a String
[20:20:40] Papierkorb: shevy: Well you could do Integer(the_string), which raises if it did not only consist of numbers
[20:20:48] yfeldblum: has joined #ruby
[20:21:00] dotix: has joined #ruby
[20:22:59] Ox0dea: Rather, if Ruby couldn't parse it as a number.
[20:23:19] nickjj_: has joined #ruby
[20:23:26] DarkBushido: has joined #ruby
[20:24:32] Ox0dea: >> Integer '-4_2'
[20:24:33] ruboto: Ox0dea # => -42 (https://eval.in/494996)
[20:24:56] nietzschette: tested: client works fine on linux, but not on windows: 'this' becomes : '["","t","h","i","s","\n"]'
[20:25:11] seitensei: has joined #ruby
[20:25:11] seitensei: has joined #ruby
[20:25:29] Ox0dea: nietzschette: That's not even how Ruby prints arrays, so what the heck is going on?
[20:25:46] nietzschette: the leading null string, i find, i especially curious
[20:26:01] Ox0dea: As are the spaces missing after the commas.
[20:26:14] nietzschette: I have N0idea, 0dea
[20:26:28] nietzschette: no, there are spaces after the comma
[20:27:13] jondot: has joined #ruby
[20:28:17] ChameleonSix: has joined #ruby
[20:28:22] davejlong: has joined #ruby
[20:28:29] ChameleonSix: If contact is a var and contacts is an array
[20:28:46] ChameleonSix: i add contact to contacts contact.push(contacts)
[20:28:57] ChameleonSix: or contacts.push(contact)
[20:30:01] ChameleonSix: nvm figured it out
[20:30:12] nietzschette: the owner of the method is the one modified
[20:31:18] steffkes: has joined #ruby
[20:31:40] idefine: has joined #ruby
[20:31:56] karapetyan: has joined #ruby
[20:32:38] shakes: has joined #ruby
[20:34:05] ur5us: has joined #ruby
[20:34:05] mdw: has joined #ruby
[20:34:14] yorickpeterse: Any OS X users here? If so, what's the output of: ruby -r socket -e 'p Socket::AF_UNIX'
[20:34:24] blackgoat: has joined #ruby
[20:36:09] Ox0dea: >> class Object; def push a; a << self end end; 2.push [1]
[20:36:10] ruboto: Ox0dea # => [1, 2] (https://eval.in/495000)
[20:36:11] pawnbox: has joined #ruby
[20:36:23] tildes: has joined #ruby
[20:36:45] _orangejuice: has joined #ruby
[20:36:59] Ox0dea: >> class Object; def >> a; a << self end end; :wtf >> [:lol]
[20:37:00] ruboto: Ox0dea # => [:lol, :wtf] (https://eval.in/495001)
[20:37:56] freerobby: has joined #ruby
[20:38:09] Ox0dea: nietzschette: Not when I'm around. ^_^
[20:39:22] snarkanoid: has joined #ruby
[20:40:43] shanemcd: has joined #ruby
[20:41:14] nietzschette: okay, i fixed my own problem. it now works. when testing the gosu app I was incrementing through a string litteral, but when I started reading from stdin it SOMEHOW exposed a flaw in my method of appending the display list. I don't understand why the former wouldn't expose the same flaw as the latter, though
[20:41:57] nickjj: has joined #ruby
[20:43:56] RobertBirnie: is there a way to get the epoch time for the current minute (not second)? Time.now.to_i / 10 * 10
[20:44:08] adaedra: Ox0dea: still have your no-letter todo app?
[20:44:15] Ox0dea: adaedra: I do.
[20:44:30] adaedra: Can I have a link?
[20:44:32] Ox0dea: http://i.imgur.com/94jou4v.png
[20:44:46] adaedra: thank you <3
[20:45:01] nietzschette: what the damn am i looking at?
[20:45:03] Ox0dea: https://eval.in/495014
[20:45:08] Ox0dea: It's a Sinatra app. ^_^
[20:45:14] DavidDudson: has joined #ruby
[20:45:33] RobertBirnie: aha, sorry. Time.now.to_i - Time.now.sec.to_i
[20:46:51] Ox0dea: >> t = Time.now.to_i; [t, t - t % 60] # RobertBirnie
[20:46:52] ruboto: Ox0dea # => [1451422011, 1451421960] (https://eval.in/495015)
[20:47:56] Ox0dea: nietzschette: See the LoadError? :P
[20:48:16] nietzschette: is it in the ?/ block?
[20:48:33] zacts: hello rubyists
[20:48:35] cdg: has joined #ruby
[20:49:16] Ox0dea: nietzschette: That's where the Sinatra route gets drawn, yeah.
[20:50:14] adaedra: yorickpeterse: 1
[20:50:16] stannard_: has joined #ruby
[20:51:08] Coldblackice: has joined #ruby
[20:51:21] tildes: has joined #ruby
[20:52:40] alphaatom: has joined #ruby
[20:52:43] nietzschette: does this build a string to be eval'd?
[20:53:09] roshanavand: has joined #ruby
[20:53:12] zacts: what is Sinatra?
[20:53:25] nietzschette: ol' blue eyes
[20:53:27] davejlong: has joined #ruby
[20:54:11] kaleido: zacts, its a web framework
[20:54:35] adaedra: mmh, I ponder about a &gem
[20:55:01] zacts: how does it compare in terms of what it aims to offer, in comparison to say ruby on rails?
[20:55:22] adaedra: apeiros: thoughts? A &gem command, to search rubygems, a bit like #rust has !cargo
[20:55:29] adaedra: zacts: way lighter.
[20:55:43] adaedra: I'd say the best way to see is to test it yourself.
[20:56:51] nietzschette: could you backquote a gem install command?
[20:57:14] jpfuentes2: has joined #ruby
[20:57:20] apeiros: adaedra: wouldn't that spam the channel? or only link perfect matches?
[20:57:25] nfk|laptop: has joined #ruby
[20:57:34] adaedra: apeiros: perfect matches, of course.
[20:57:48] apeiros: ok, so more show than search :)
[20:57:51] apeiros: sure, why not
[20:58:19] Guest72594: has joined #ruby
[20:59:01] gizmore: has joined #ruby
[21:00:08] gizmore|2: has joined #ruby
[21:01:40] ddubs: has joined #ruby
[21:01:45] sdwrage: has joined #ruby
[21:02:38] atomical_: has joined #ruby
[21:03:36] mallu: I'm using Net::HTTP::Delete.new(location) to delete some file. How can I get the response to see if it was sucessful?
[21:03:43] |ifei5good: has joined #ruby
[21:04:04] mallu: resp = Net::HTTP::Delete.new(location) puts resp gives me #<Net::HTTP::Delete:0x007f868500d1c0>
[21:04:41] S1kx: has joined #ruby
[21:04:58] Ox0dea: nietzschette: No, that would be cheating and lame.
[21:05:20] aryaching: has joined #ruby
[21:05:21] Ox0dea: It gets hold of #send as a Proc and invokes it all over the place with Proc#[].
[21:06:00] gizmore: has joined #ruby
[21:06:37] dwfait: has joined #ruby
[21:07:07] aegis3121: has joined #ruby
[21:07:41] volty: has left #ruby: ("Konversation terminated!")
[21:07:56] Ox0dea: >> -> &_ {_}[&:send]['101010', 'to_i', 2]
[21:07:57] ruboto: Ox0dea # => 42 (https://eval.in/495022)
[21:08:43] nietzschette: that clears out a few duds
[21:08:52] idefine: has joined #ruby
[21:08:57] domgetter: mallu: have you tried checking the response body?
[21:09:00] ericwood_: huh you can use a don't-care in the body of a block?
[21:09:04] domgetter: puts resp.body
[21:09:09] gizless: has joined #ruby
[21:09:16] Ox0dea: ericwood_: It's not a "don't-care" there.
[21:09:22] domgetter: ericwood_: you can use any destructuring in the body of a lambda
[21:09:57] domgetter: >> ["a"].map.with_index {|(e, i)| {e => i}}
[21:09:57] ericwood_: why the don't-care for the block arg tho
[21:09:58] ruboto: domgetter # => [{"a"=>nil}] (https://eval.in/495027)
[21:09:59] ledestin: has joined #ruby
[21:10:13] domgetter: >> {a: "a"}.map.with_index {|(e, i)| {e => i}}
[21:10:14] ruboto: domgetter # => [{:a=>"a"}] (https://eval.in/495029)
[21:10:20] ericwood_: why not just -> { _ }
[21:10:40] ericwood_: sorry, my ruby is rusty :|
[21:10:41] domgetter: >> {a: "a"}.map.with_index {|(k, v), i| {v => [k,i]}}
[21:10:42] ruboto: domgetter # => [{"a"=>[:a, 0]}] (https://eval.in/495033)
[21:10:48] Ox0dea: ericwood_: I do in fact need the argument.
[21:11:04] mallu: domgetter: resp.body is empty
[21:11:12] gizmore|2: has joined #ruby
[21:11:16] Ox0dea: ericwood_: I called it `_` in the actual code because one of the design goals was to contain no alphanumerics. ^_^
[21:11:42] ericwood_: wtf _ is valid as a var name
[21:11:48] ericwood_: when did that become a thing
[21:11:53] gizmore|3: has joined #ruby
[21:12:12] domgetter: ericwood_: Yea, it's used in irb as "the last evaluated value" just like $_ in perl
[21:12:21] domgetter: err, "sort of like"
[21:12:25] ericwood_: right, I use that a lot, I figured it was a builtin
[21:12:27] Ox0dea: ericwood_: Probably since the very beginning.
[21:12:32] ericwood_: well, cool, TIL
[21:12:37] ericwood_: I've always used it as a don't-care
[21:13:00] nietzschette: not like like rust's <_>
[21:13:53] gizmore: has joined #ruby
[21:13:57] Ox0dea: ericwood_: Personally, I think this is a better use for _: https://eval.in/495041
[21:14:41] nietzschette: every type in ruby is already an anytype
[21:14:54] domgetter: nietzschette: statically, yes
[21:14:57] ericwood_: Ox0dea: oh interesting
[21:15:12] domgetter: but dynamically (i.e. at runtime), there are different types
[21:15:31] mallu: anyone knows how I can get the response for Net::HTTP::Delete.new(location)
[21:15:51] synthroid: has joined #ruby
[21:16:01] gizless: has joined #ruby
[21:16:24] spider-mario: has joined #ruby
[21:16:40] Ox0dea: ericwood_: Note well that '_' is in fact "special" in parameter lists: https://eval.in/495047
[21:16:56] davejlong: has joined #ruby
[21:17:52] ericwood_: yeah, I was aware of that one...cool feature
[21:18:44] bkxd: has joined #ruby
[21:19:01] gizmore|2: has joined #ruby
[21:19:14] bollullera: has joined #ruby
[21:20:16] arooni-mobile: has joined #ruby
[21:21:18] domgetter: mallu: You need to send the request to a server
[21:21:41] domgetter: mallu: and then look at the body of the response
[21:22:00] domgetter: when you make a delete request object, it doesn't do anything, it's just sitting there
[21:22:01] mallu: isn't this sending the request to the server? Net::HTTP::Delete.new(location)
[21:22:11] bollullera: has left #ruby: ()
[21:22:18] mallu: location = https://....
[21:22:19] domgetter: no, that just creates a new object that is called a "delete request"
[21:23:03] domgetter: you then need to actually "request" the request object you made. (This is part of the reason no one likes nethttp)
[21:23:21] domgetter: (Personally I recommend the HTTParty gem for doing this stuff)
[21:23:49] mallu: domgetter: ok.. that make sense.. thanks
[21:24:09] domgetter: mallu yea it tripped my up when I first learned about nethttp too.
[21:24:10] idefine: has joined #ruby
[21:24:29] Ox0dea: mallu: Net::HTTP.new('example.com').delete('foo', ...)
[21:24:37] Ox0dea: You don't *have* to switch.
[21:24:39] devoldmx: has joined #ruby
[21:24:48] mallu: Ox0dea: ok thanls
[21:24:53] Ox0dea: All of the common verbs are available as instance methods.
[21:25:31] rgrmatt: has joined #ruby
[21:26:36] gizmore: has joined #ruby
[21:27:46] druonysus: has joined #ruby
[21:27:46] druonysus: has joined #ruby
[21:30:15] isomorphismes: havenwood: how do you get Roda to start a server? that's built into Sinatra
[21:30:26] isomorphismes: havenwood: maybe it's covered in Rack docs?
[21:31:37] kaleido: rackup config.ru i think
[21:31:48] kaleido: i prefer cuba but its very similar to roda
[21:33:24] isomorphismes: kaleido: thanks, that seems close but then /usr/local/lib/ruby/gems/2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:146:in `to_app': missing run or map statement (RuntimeError)
[21:34:13] adaedra: kaleido: rackup and friends look for config.ru by default. No need to write it.
[21:34:51] bkxd: has joined #ruby
[21:34:59] adaedra: isomorphismes: did you make a config.ru?
[21:35:05] gizless: has joined #ruby
[21:35:15] isomorphismes: adaedra: Yep, I just pasted the example to config.ru and then changed the secret
[21:35:47] gizmore|2: has joined #ruby
[21:35:51] adaedra: That's weird there's no run.
[21:35:54] isomorphismes: .ru is short for .rackup ?
[21:36:16] isomorphismes: adaedra: well, I just upgraded from stable ruby v1.9.3p0 to 2.3.0
[21:36:34] adaedra: try adding `run App` at the end of the config.ru
[21:36:34] rgrmatt: has joined #ruby
[21:36:52] dotix: has joined #ruby
[21:37:55] isomorphismes: perfect, thanks adaedra !
[21:38:52] gizmore: has joined #ruby
[21:39:38] atomical: has joined #ruby
[21:40:17] Azure: has joined #ruby
[21:40:29] isomorphismes: In Sinatra it seems you can specify layout and formatting at the bottom with @@ layout, @@ style, etc. Is this true in Cuba / Roda?
[21:40:48] adaedra: I'm not sure cuba and roda are much alike, are they?
[21:41:27] kaleido: isomorphismes, i am not sure
[21:41:53] gizless: has joined #ruby
[21:41:54] kaleido: adaedra, theyre similar mostly in how simple they are
[21:41:59] kaleido: not that sinatra is complicated
[21:42:11] isomorphismes: But it does seem Sinatra is no longer being supported as much (last relase mid 2014, and 3 different versions of documentation)
[21:42:14] build22: has joined #ruby
[21:42:21] adaedra: an eraser and a pen are both simple objects but with very different behaviors.
[21:43:14] adaedra: kaleido: I didn't look into Cuba or Roda. I tried Rails, I tried Sinatra, then I decided to roll my own on top of Rack :p
[21:43:33] kaleido: cuba just assumes the location of your layouts, etc, unless you specify differently
[21:44:00] kaleido: adaedra, the 3 are pretty similar in my opinion. i dont recall why i landed on cuba.
[21:44:15] isomorphismes: adaedra: right, Rack seems like somehow "the simplest" solution (barest bones)
[21:44:33] adaedra: And it's awesome to base yourself on.
[21:44:37] build22: has left #ruby: ()
[21:44:50] adaedra: But if you want to develop apps on top of it, having a generic layer is a good idea.
[21:44:54] gizmore|2: has joined #ruby
[21:45:25] firstdayonthejob: has joined #ruby
[21:45:26] niceperl: has joined #ruby
[21:45:28] kiloreux: has joined #ruby
[21:45:59] gizmore: has joined #ruby
[21:47:43] pawnbox: has joined #ruby
[21:47:46] hagabaka: has joined #ruby
[21:48:03] gizmore|3: has joined #ruby
[21:48:23] icarus: has joined #ruby
[21:49:01] gizless: has joined #ruby
[21:49:06] aegis3121: has joined #ruby
[21:51:56] mallu: can you please tell me why I am getting this error? https://gist.github.com/anonymous/de831a6565c9047a5440
[21:53:38] ledestin: has joined #ruby
[21:54:47] idefine: has joined #ruby
[21:55:47] banister: has joined #ruby
[21:56:21] mallu: i just want to delete this file https://artifactory.test.com/artifactory/api/storage/libs-snapshot-local/com/3.5.2-SNAPSHOT/av-shared-3.5.2-20140811.181542-9.pom
[21:57:34] lucid_: has joined #ruby
[21:57:50] mallu: I thought this would delete it https://gist.github.com/anonymous/de831a6565c9047a5440#file-art-rb-L8-L12
[21:58:44] celly: has joined #ruby
[21:59:11] mdw: has joined #ruby
[21:59:31] aegis3121: This seems like an error with the API/request you're making.
[22:00:28] mallu: aegis3121: hmm.. ok
[22:00:35] aegis3121: Not sure, though
[22:01:38] atomical: has joined #ruby
[22:01:57] n_blownapart: has joined #ruby
[22:02:36] Mckomo: has joined #ruby
[22:04:39] Scripore: has joined #ruby
[22:04:51] davedev24: has joined #ruby
[22:05:49] aegis3121: has joined #ruby
[22:06:31] trwyth: has joined #ruby
[22:08:44] freerobby: has joined #ruby
[22:09:48] duckpuppy: has joined #ruby
[22:14:26] nfk|laptop: has joined #ruby
[22:15:53] pwnd_nsfw: has joined #ruby
[22:19:15] senayar: has joined #ruby
[22:19:16] senayar: has joined #ruby
[22:19:45] neanderslob_: has joined #ruby
[22:20:34] atomical_: has joined #ruby
[22:20:37] neanderslob: has joined #ruby
[22:21:45] davejlong: has joined #ruby
[22:23:29] vikas027: has joined #ruby
[22:23:39] atomical: has joined #ruby
[22:27:11] ICantCook: has joined #ruby
[22:27:22] ruid: has joined #ruby
[22:27:22] ruid: has joined #ruby
[22:27:28] ohaibbq_: has joined #ruby
[22:28:06] renderful: has joined #ruby
[22:32:31] shanemcd: has joined #ruby
[22:37:43] renderful: has joined #ruby
[22:38:08] idefine: has joined #ruby
[22:41:21] kmckelvin: has joined #ruby
[22:41:24] yfeldblum: has joined #ruby
[22:43:10] davejlong: has joined #ruby
[22:44:23] davedev24: has joined #ruby
[22:44:45] zenlot4: has joined #ruby
[22:45:17] zquad: has joined #ruby
[22:45:21] zquad: I am pulling lots of social media mentions from twitter, facebook etc data and I need to store it locally to analyze and display it, any recommendation on an open source database?
[22:45:25] Begi2: has joined #ruby
[22:48:39] sdothum: has joined #ruby
[22:48:45] yqt: has joined #ruby
[22:49:41] zquad: has joined #ruby
[22:49:52] neanderslob_: has joined #ruby
[22:50:49] neanderslob: has joined #ruby
[22:50:57] sdothum: has joined #ruby
[22:54:53] sdothum: has joined #ruby
[22:55:46] RobertBirnie: has joined #ruby
[22:58:16] colegatron: has joined #ruby
[22:59:12] ruid: has joined #ruby
[22:59:13] ruid: has joined #ruby
[23:00:45] lubekpl: has joined #ruby
[23:02:02] jackjackdripper: has joined #ruby
[23:04:16] zquad: has left #ruby: ()
[23:05:11] rgrmatt: has joined #ruby
[23:11:20] Wompy: has joined #ruby
[23:12:14] joneshf-laptop: has joined #ruby
[23:14:08] bkxd: has joined #ruby
[23:15:03] luckyme: has joined #ruby
[23:17:39] pawnbox: has joined #ruby
[23:18:37] davejlong: has joined #ruby
[23:18:41] Guest38: has joined #ruby
[23:21:10] harai: has joined #ruby
[23:22:47] toretore: has joined #ruby
[23:24:50] Yzguy: has joined #ruby
[23:25:25] devoldmx: has joined #ruby
[23:26:46] ledestin: has joined #ruby
[23:29:21] marcdel: has joined #ruby
[23:34:11] kmckelvin: has joined #ruby
[23:35:30] CloCkWeRX: has joined #ruby
[23:37:35] ss_much: has joined #ruby
[23:42:16] TheBloke-: has joined #ruby
[23:42:48] FooMunki: has joined #ruby
[23:46:12] marcdel_: has joined #ruby
[23:46:53] celly: has joined #ruby
[23:53:02] ohaibbq: has joined #ruby
[23:53:58] stannard: has joined #ruby
[23:54:42] amoeba_: has joined #ruby
[23:56:36] davejlong: has joined #ruby
[23:57:04] zacts: is opal familiar?
[23:57:12] zacts: do people use it, or are there better alternatives?
[23:58:39] Scripore: has joined #ruby
[23:59:50] bradleyprice: has joined #ruby