« Back to channel list

#ruby - 18 September 2018

« Back 1 day Forward 1 day »
[00:01:23] raul7821: has joined #ruby
[00:02:00] raul7821: has joined #ruby
[00:02:30] cagomez: has joined #ruby
[00:10:11] knight33: has joined #ruby
[00:11:59] thy0: has joined #ruby
[00:24:07] bmurt: has joined #ruby
[00:27:41] nfk: the code i'm writing looks so evil i'm glowing from the lovecraftian glee
[00:28:07] SeepingN: is it indented to look like a pentagram or something?
[00:28:29] nfk: no, that will be for another time but it took two irb instances and hours to prototype
[00:29:04] nfk: this is one part of the prototype code: (h.method :fetch).call(:home).method(:merge!).call(test: {})
[00:29:24] nfk: and this is another: p.ascend.inject([]) { |a, e| p a << e.basename.to_s }.reverse
[00:29:46] nfk: i should feel bad about my actions, right?
[00:32:38] nfk: ACTION does the Burns gesture as they contemplate how to iterate on this wretched array
[00:35:59] beeman: has joined #ruby
[00:38:01] eckhardt_: has joined #ruby
[00:53:23] ZzZombo_: has joined #ruby
[00:53:48] weaksauce: has joined #ruby
[01:17:00] jottr: has joined #ruby
[01:35:55] JasonO: has joined #ruby
[01:36:08] lxsameer: has joined #ruby
[01:40:23] white_lilies: has joined #ruby
[01:44:04] pskosinski: has joined #ruby
[01:45:08] knight33: has joined #ruby
[01:52:08] jottr: has joined #ruby
[01:52:20] nfk: https://paste.ubuntu.com/p/dcTrTMdkwK/ // behold, do i qualify for the cabal of the unspeakable one yet?!
[01:54:50] nfk: hohoho, it even works if set it to a directory deep in my filesystem hierarchy
[02:01:55] ShekharReddy: has joined #ruby
[02:06:52] esrse: has joined #ruby
[02:20:58] cadillac_: has joined #ruby
[02:22:24] Azure: has joined #ruby
[02:29:53] darkhanb: has joined #ruby
[02:39:32] knight33: How do I install the latest version of Ruby on Ubuntu? apt-get install ruby or ruby-full just installed 1.9. So confused right now.
[02:49:32] lektrik: has joined #ruby
[02:51:15] havenwood: knight33: Brightbox maintains up-to-date Ruby packages for Ubuntu: https://launchpad.net/~brightbox/+archive/ubuntu/ruby-ng
[02:51:50] havenwood: knight33: That's a nice way to get modern Ruby on older Ubuntu.
[02:52:26] havenwood: knight33: Or if it's a dev box consider ruby-install and chruby: https://ryanbigg.com/2014/10/ubuntu-ruby-ruby-install-chruby-and-you
[02:55:56] knight33: Alright, I'll give it a shot :)
[03:00:41] cadillac_: has joined #ruby
[03:10:08] braincrash: has joined #ruby
[03:12:21] cagomez: has joined #ruby
[03:17:15] duderonomy: has joined #ruby
[03:22:01] mynameisdebian: has joined #ruby
[03:23:57] knight33: has joined #ruby
[03:26:43] gix: has joined #ruby
[03:27:29] nfk: havenwood, wouldn't such an outdated version of ubuntu be long past security updates?
[03:36:45] lxsameer: has joined #ruby
[03:37:08] mynameisdebian: has joined #ruby
[03:52:50] havenwood: nfk: Maybe not an LTS version. Brightbox does backport security fixes if it's an older version of Ruby that you're using.
[03:53:02] jottr: has joined #ruby
[03:53:10] tdy: has joined #ruby
[03:53:13] havenwood: Ubuntu LTS backports security fixes.
[03:54:29] dellavg_: has joined #ruby
[03:55:51] havenwood: nfk: But yeah, that old of a Ruby should be beyond even LTS EoL...
[03:57:18] havenwood: nfk: Actually, no - 14.04.5 LTS isn't EoL until April 2019.
[03:58:18] havenwood: And that's 1.9.3.
[04:01:29] nfk: on one hand it's cool they support stuff for 5 whole years. on the other hand software that old is dreadful
[04:02:09] nfk: the coolest thing you get to play there is the shorthand for defining hashes
[04:02:19] nfk: *with there
[04:03:02] samscam7: has joined #ruby
[04:03:47] samscam7: Would anyone know which direction to point me to to try and figure out why `binding.pry` wont break my app?
[04:03:53] nfk: speaking of dreadful software, i got to listing folders right below sysroot in sinatra, which i can't say about the tk GUI
[04:03:58] Radar: samscam7: ?rule0
[04:04:08] Radar: samscam7: Can you show us what you mean?
[04:05:03] samscam7: can u post code snippets in irc?
[04:05:03] nfk: also long overdue good night, everyone
[04:05:22] havenwood: samscam7: If you're on Github, a Gist is better. Or: https://dpaste.de/
[04:05:51] havenwood: Paste 4+ lines of text to https://dpaste.de/
[04:06:37] samscam7: https://gist.github.com/99Probl3ms/d8226643debe69ea9b88c53eafabe899
[04:07:07] samscam7: I've tried putting it in a couple of places and none of them seem to work
[04:07:29] havenwood: samscam7: Don't put it in backticks.
[04:07:30] al2o3-cr: why the backticks?
[04:08:51] samscam7: i thought i saw it like that in the wiki
[04:08:59] havenwood: samscam7: Backticks mean, "this is code."
[04:09:31] havenwood: samscam7: Actually using the backticks in the context you did will call the Kernel#` method and shell out.
[04:09:44] samscam7: but it hasn't
[04:10:00] havenwood: samscam7: Just plain 'ole: binding.pry
[04:10:28] havenwood: samscam7: Is that supposed to be lower case `def create`? You have `def Create`, which looks wrong.
[04:10:44] havenwood: samscam7: Method names are generally snake_case.
[04:11:13] samscam7: there is prob so much wrong with this
[04:11:32] havenwood: samscam7: I suspect the #create method is getting called, not #Create - so it never shelled out to give you: #!> Errno::ENOENT: No such file or directory - binding.pry
[04:12:10] havenwood: samscam7: Lowercase the method name and get rid of the backticks and see what happens.
[04:14:55] samscam7: ok one seconf
[04:17:35] samscam7: ok so that fixed my first error
[04:17:46] samscam7: but now i have a new one
[04:18:42] hey_YOU: has joined #ruby
[04:19:01] havenwood: hey_YOU: hey you
[04:22:05] hey_YOU: I am trying out ruby... Andi didn't wantto gt kicked out of ##linux. heh
[04:25:23] esrse: has joined #ruby
[04:35:25] lxsameer: has joined #ruby
[04:36:52] old_relik: has joined #ruby
[04:37:17] old_relik: what is the purpose of having "25px".to_i return 25? isn't that confusing?
[04:39:58] al2o3-cr: old_relik: use Integer() for strict conversion
[04:40:26] old_relik: I get that, but isn't the other way around broken
[04:40:49] al2o3-cr: old_relik: no
[04:40:50] old_relik: why wouldn't I ever want the conversion to be strict
[04:41:57] al2o3-cr: old_relik: read the docs on String#to_i
[04:42:29] al2o3-cr: it will tell you what you need to know.
[04:43:05] old_relik: I did, and I know it mentions that it ignores characters past the end of a valid number
[04:43:12] old_relik: it just seems unintuitive
[04:43:35] old_relik: and a use-case that shouldn't be a standard library especially something calles String#to_i
[04:49:07] havenwood: old_relik: What do you want it to return?
[04:53:46] samscam7: havenwood your a bloody genius
[04:53:55] havenwood: ACTION bows
[05:02:51] duderonomy: has joined #ruby
[05:18:24] reber: has joined #ruby
[05:19:30] gr33n7007h: has joined #ruby
[05:26:00] baweaver: ACTION wanders in
[05:39:03] icarus: I'm using sinatra to query endpoints that response in json requests, and need to validate two things: a 200 response and json schema, IE that it send me a json response and not someother html error (to clarify, sinatra will return whatever get /page is handed by response.body)
[05:41:59] baweaver: icarus: You can check the response code, then you could just JSON.parse the output
[05:42:06] baweaver: if it raises an exception, bingo
[05:44:00] icarus: httparty has a neat response.code tidbid
[05:44:26] baweaver: Most HTTP libraries do
[05:44:33] icarus: I still would like to lint test a json response before passing it to a client
[05:44:47] baweaver: clarify that
[05:44:59] icarus: Like rubocop .. for json
[05:45:20] baweaver: What are you testing for?
[05:46:10] MoritaShinobu: has joined #ruby
[05:46:22] icarus: because ... one can not trust endpoints to do their homework, im getting passed html errors occasionally and it spits out ugly sinatra garbage, thus the wont to test specifically for json, and that it be in a non-erroroneous format
[05:47:08] icarus: response = HTTParty.get('https://someendpoint/file.json')
[05:47:41] icarus: ^ i want to make SURE its json, if not, fill response with a custom json error
[05:48:25] baweaver: Then that's not linting
[05:48:29] baweaver: That's validation
[05:48:35] baweaver: Just JSON.parse it
[05:48:40] Radar: baweaver: but what if it's HTML
[05:48:43] baweaver: If it raises an exception then it's not valid
[05:49:09] baweaver: >> require 'json'; JSON.parse("<html></html>")
[05:49:11] icarus: thats incredibly lazy, it could be html or xml, i dont want to catch general exceptions, i want to catch valid or non-valid json
[05:49:11] ruby[bot]: baweaver: # => 784: unexpected token at '<html></html>' (JSON::ParserError) ...check link for more (https://eval.in/1058506)
[05:50:34] baweaver: That catches non-valid JSON
[05:50:37] Radar: https://stackoverflow.com/questions/26232909/checking-if-a-string-is-valid-json-before-trying-to-parse-it
[05:50:53] Radar: icarus: You won't be catching general exceptions if you do it that way, rescuing JSON::ParserError.
[05:51:21] Radar: Bet you could probably pair that up with a bit of a Result class from dry-monads to have the same API for valid / non-valid responses too.
[05:51:40] Radar: But I am probably suggesting something too fanciful there
[05:52:37] icarus: Ok, i see what you mean by JSON.parse, JSON::ParserError can be a clear exception to watch for
[05:54:28] baweaver: (that said I dislike exceptions in general for flow control like that)
[05:55:31] snickers: has joined #ruby
[05:55:38] icarus: all the (this) sinatra endpoint is meant to do act as a microserver to wrap other json endpoints
[05:55:46] jottr: has joined #ruby
[05:55:56] icarus: its replacing a bash script using jq/csvkit
[05:55:58] baweaver: I'd likely make a method out of that then
[06:03:39] icarus: I'll figure it out
[06:04:14] icarus: one question i really cant get to the bottom of, how to output sprintf without quotes! > p sprintf '%0.8f' % "123"
[06:09:25] aupadhye: has joined #ruby
[06:20:15] mooe: has joined #ruby
[06:26:00] DK2: has joined #ruby
[06:27:34] mark-6: has joined #ruby
[06:27:58] baweaver: don't use sprintf?
[06:27:59] baweaver: >> '%0.8f' % "123"
[06:28:00] ruby[bot]: baweaver: # => "123.00000000" (https://eval.in/1058527)
[06:28:20] baweaver: modulo and sprintf do the same thing
[06:28:51] mark-6: has left #ruby: ()
[06:34:54] za1b1tsu: has joined #ruby
[06:41:28] tdy: has joined #ruby
[06:42:58] lomex: has joined #ruby
[06:43:40] alem0lars: has joined #ruby
[06:43:53] icarus: >> ("123").round(8)
[06:43:54] ruby[bot]: icarus: # => undefined method `round' for "123":String (NoMethodError) ...check link for more (https://eval.in/1058535)
[06:44:03] icarus: >> (123).round(8)
[06:44:04] ruby[bot]: icarus: # => 123.0 (https://eval.in/1058536)
[06:44:20] icarus: ^ apparently .round will suffice
[06:45:10] icarus: Im so used to thinking in awk/cli terms: | awk '{print sprintf("%0.8f", $1);}'
[06:50:52] Mortomes|Work: has joined #ruby
[06:58:35] clemens3: has joined #ruby
[07:07:03] johnny56: has joined #ruby
[07:08:02] Mike11: has joined #ruby
[07:10:14] esrse: has joined #ruby
[07:13:24] sysvalve: has joined #ruby
[07:16:22] baweaver: Woo, rebuilding Ruby environment on new mac
[07:36:20] aufi: has joined #ruby
[07:52:09] akem: has joined #ruby
[07:54:25] nowhere_man: has joined #ruby
[07:56:07] cliluw: has joined #ruby
[08:10:37] shadeslayer: has joined #ruby
[08:10:55] shoogz: has joined #ruby
[08:12:26] xfbs: has joined #ruby
[08:13:34] ua: has joined #ruby
[08:24:05] venmx: has joined #ruby
[08:25:34] lxsameer: has joined #ruby
[08:31:02] chichou: has joined #ruby
[08:46:26] RougeR: has joined #ruby
[08:52:35] Beams: has joined #ruby
[08:54:06] Nicmavr: has joined #ruby
[08:55:27] apeiros: has joined #ruby
[08:58:41] tuor: has joined #ruby
[09:00:27] Mike111: has joined #ruby
[09:02:37] NL3limin4t0r: has joined #ruby
[09:08:54] mikecmpbll: has joined #ruby
[09:14:49] RedNifre_: has joined #ruby
[09:14:58] RougeR: has joined #ruby
[09:16:30] alem0lars: has joined #ruby
[09:16:33] cadillac_: has joined #ruby
[09:17:43] alem0lars: has joined #ruby
[09:22:49] ur5us: has joined #ruby
[09:30:46] apeiros: RougeR: that's my nick, yes. but I'll be offline for ~40min now :)
[09:41:13] kapil___: has joined #ruby
[09:45:30] alem0lars: has joined #ruby
[09:46:25] alem0lars: has joined #ruby
[09:51:16] johnny56: has joined #ruby
[10:00:55] RedNifre_: has joined #ruby
[10:09:03] xfbs: has joined #ruby
[10:11:45] evdubs: has joined #ruby
[10:12:05] apeiros_: has joined #ruby
[10:12:37] apeiros_: wow, that was quite precise (40min)
[10:13:56] tristanp: has joined #ruby
[10:14:04] TvL2386: well, 42min to be exact
[10:29:01] yohji: has joined #ruby
[10:29:53] esrse: has joined #ruby
[10:35:51] jottr: has joined #ruby
[10:42:34] apparition: has joined #ruby
[10:58:46] evdubs: has joined #ruby
[11:02:31] RedNifre_: has joined #ruby
[11:08:13] tuor: has joined #ruby
[11:20:28] MaiconVieira: has joined #ruby
[11:21:11] Mike11: has joined #ruby
[11:26:28] AJA4350: has joined #ruby
[11:56:53] nowhere_man: has joined #ruby
[11:57:14] GodFather: has joined #ruby
[11:59:48] jottr: has joined #ruby
[12:07:14] jottr: has joined #ruby
[12:14:44] tristanp: has joined #ruby
[12:19:18] thy0: has joined #ruby
[12:20:00] GodFather: has joined #ruby
[12:25:00] knight33: has joined #ruby
[12:28:16] akem: has joined #ruby
[12:36:06] venmx: has joined #ruby
[12:42:30] vondruch: has joined #ruby
[12:43:49] IanMalcolm: has joined #ruby
[12:49:03] modin: has joined #ruby
[12:50:18] marahin: has joined #ruby
[12:59:24] modin: has joined #ruby
[13:23:22] GodFather: has joined #ruby
[13:29:53] knight33: has joined #ruby
[13:36:00] Pisuke: has joined #ruby
[13:39:22] gnufied: has joined #ruby
[13:40:59] nowhere_man: has joined #ruby
[13:50:59] Rapture: has joined #ruby
[13:52:57] alireza: has joined #ruby
[13:53:06] alireza: Hey ammigos
[13:53:10] yohji: has joined #ruby
[13:53:16] alireza: I've created a Checkout class
[13:53:22] alireza: which accepts a list of promotions
[13:53:31] alireza: or as you would say promotional rules
[13:53:58] alireza: then I created a Promotion class which has two methods `applicable?` and `apply?`
[13:55:03] alireza: and in Checkout class everytime `total` being called I iterate through promotions
[13:55:15] alireza: and call apply with `items` and `total` passed
[13:55:31] alireza: let me give you an url
[13:55:49] alireza: http://dpaste.com/0CTFSSH
[13:56:19] alireza: lxsameer: ping
[14:05:58] za1b1tsu: has joined #ruby
[14:07:10] RedNifre_: has joined #ruby
[14:09:33] Inside: has joined #ruby
[14:29:48] alireza: has left #ruby: ("WeeChat 2.1")
[14:36:52] Inline: has joined #ruby
[14:38:13] Inline: has joined #ruby
[14:46:07] chouhoulis: has joined #ruby
[14:47:11] DTZUZO_: has joined #ruby
[14:50:34] desperek: has joined #ruby
[14:50:39] bmurt: has joined #ruby
[14:51:01] thomasfedb: has joined #ruby
[14:52:00] nowhere_man: has joined #ruby
[14:53:56] lomex: has joined #ruby
[14:59:18] lytol_: has joined #ruby
[15:06:12] apeiros_: has joined #ruby
[15:10:10] cschneid_: has joined #ruby
[15:11:20] Mike11: has joined #ruby
[15:26:41] TomyLobo: has joined #ruby
[15:37:02] ivanskie: has joined #ruby
[15:45:18] jordanm: has joined #ruby
[15:49:32] cagomez: has joined #ruby
[15:55:41] cagomez: has joined #ruby
[15:56:27] cagomez: has joined #ruby
[15:57:03] cagomez: has joined #ruby
[15:57:37] cagomez: has joined #ruby
[15:58:17] cagomez: has joined #ruby
[15:58:57] cagomez: has joined #ruby
[16:05:06] snickers: has joined #ruby
[16:09:35] Dbugger: has joined #ruby
[16:15:11] pwnd_nsfw: has joined #ruby
[16:15:41] tdy1: has joined #ruby
[16:39:37] eckhardt_: has joined #ruby
[16:39:53] DTZUZO_: has joined #ruby
[16:46:01] ineb: has joined #ruby
[16:51:22] darkhanb: has joined #ruby
[16:51:41] ineb: whats the best way to make a ruby cli project binary include necessary code?
[16:51:59] ineb: i saw $LOAD_PATH.unshift 'lib' which obviously only works if one is inside the project dir
[16:52:22] xfbs: has joined #ruby
[16:53:06] ineb: actually, that is what 'bundle gem testbin --bin' does
[16:55:27] RougeR: has joined #ruby
[16:56:16] ineb: shouldnt that be '$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../lib"' or something?
[16:57:34] ineb: https://github.com/raeoks/ruby-skeleton/blob/master/bin/skeleton thats what i mean
[16:57:57] ineb: $LOAD_PATH.unshift 'lib' makes assumptions about the current directory. or am i missing something with bundler here?
[17:16:12] mikecmpbll: has joined #ruby
[17:21:21] havenwood: ineb: In a gem, lib/ should be in your LOAD_PATH, so just: require 'skeleton'
[17:21:48] havenwood: ineb: For example: https://github.com/havenwood/digest-sip_hash/blob/master/bin/siphash#L5
[17:22:24] havenwood: ineb: I sometimes check if it's already in LOAD_PATH, but I can't quite decide whether it's worth doing that: https://github.com/havenwood/digest-sip_hash/blob/master/digest-sip_hash.gemspec#L3-L4
[17:22:47] havenwood: ineb: A simpler way is just: $LOAD_PATH.prepend File.expand_path 'lib', __dir__
[17:23:23] havenwood: I kinda prefer not being defensive about duplicates in LOAD_PATH, since require should handle that by not loading it twice.
[17:24:23] havenwood: ineb: Use #unshift instead of the nicer-reading #prepend if you need to support earlier than Ruby 2.5.
[17:24:49] havenwood: ineb: __dir__ was introduced in Ruby 2.0, so I use it broadly
[17:24:56] ShekharReddy: has joined #ruby
[17:25:04] havenwood: $LOAD_PATH.unshift File.expand_path 'lib', __dir__
[17:25:37] ineb: here is where my confusion starts. binaries in bin/ are meant to be called from CLI and like the bundle gem skeleton, i also get `require': cannot load such file -- digest/sip_hash on your gem when calling it via ./bin/siphash
[17:25:53] havenwood: ineb: oh, hah - did I mess up?
[17:26:07] havenwood: ineb: ooooh, you mean when you don't use it as a gem
[17:26:30] havenwood: ineb: Yeah, I'm relying on the gem providing the executable: https://github.com/havenwood/digest-sip_hash/blob/master/digest-sip_hash.gemspec#L18
[17:27:32] Fusl: has joined #ruby
[17:27:48] havenwood: ineb: If you want to be able to execute it without installing the gem, maybe: $LOAD_PATH.unshift File.expand_path '../lib', __dir__
[17:28:13] havenwood: ineb: Then when you use it as a gem, you'll actually be putting lib in LOAD_PATH twice, so maybe the trick above would be good
[17:28:25] impermanence: has joined #ruby
[17:28:35] havenwood: ineb: Like this, but '../lib': https://github.com/havenwood/digest-sip_hash/blob/master/digest-sip_hash.gemspec#L3-L4
[17:28:59] havenwood: ineb: Or maybe `require_relative`, hmm.
[17:29:05] impermanence: we're having a stupid debate on my team. which is better or more current: rvm or rbenv. I say rvm, the other guy says rbenv. I know it's stupid, but is there a consensus?
[17:29:13] havenwood: impermanence: chruby
[17:29:42] ineb: havenwood: i see. i missed the part where gemspec sets up the load path and provides auto-generated binaries
[17:31:44] nowhere_man: has joined #ruby
[17:31:57] alem0lars: has joined #ruby
[17:32:38] RougeR: has joined #ruby
[17:33:18] akemot: has joined #ruby
[17:40:13] cats: has joined #ruby
[17:41:51] SeepingN: has joined #ruby
[17:42:57] impermanence: has joined #ruby
[17:43:14] impermanence: has left #ruby: ()
[17:43:30] impermanence: has joined #ruby
[17:43:59] catsed: has joined #ruby
[17:45:35] duderonomy: has joined #ruby
[17:48:14] GodFather: has joined #ruby
[17:48:37] lxsameer: has joined #ruby
[17:57:47] akemot: has joined #ruby
[17:58:42] lxsameer: has joined #ruby
[18:04:54] MaiconVieira: has joined #ruby
[18:07:06] johnny56: has joined #ruby
[18:08:46] lxsameer: has joined #ruby
[18:10:51] gr33n7007h: has joined #ruby
[18:11:25] conta1: has joined #ruby
[18:13:01] icarus: has joined #ruby
[18:13:13] evdubs: has joined #ruby
[18:17:22] za1b1tsu: has joined #ruby
[18:18:47] lxsameer: has joined #ruby
[18:20:54] weaksauce: has joined #ruby
[18:20:55] deathwishdave: has joined #ruby
[18:22:47] apeiros_: has joined #ruby
[18:27:37] apeiros_: has joined #ruby
[18:28:41] icarus: has joined #ruby
[18:28:47] lxsameer: has joined #ruby
[18:31:00] blackmesa: has joined #ruby
[18:38:49] lxsameer: has joined #ruby
[18:48:51] lxsameer: has joined #ruby
[18:49:31] krawchyk: has joined #ruby
[18:51:22] za1b1tsu: has joined #ruby
[18:54:32] cthulchu: has joined #ruby
[18:56:19] jottr: has joined #ruby
[18:57:15] havenwood: http://rubies.travis-ci.org/osx/10.10/x86_64/ruby-2.5.1
[18:58:47] lxsameer: has joined #ruby
[19:00:11] lomex: has joined #ruby
[19:08:45] lxsameer: has joined #ruby
[19:11:51] oft_gegong: has joined #ruby
[19:12:31] oft_gegong: when programming ruby on the web, by default does it use the <% %> brackets to contain the ruby language semantics/syntax?
[19:12:54] havenwood: oft_gegong: That's an ERB thing.
[19:13:12] bmurt: has joined #ruby
[19:13:29] oft_gegong: I quit internet searches, what does ERB mean? it depends on the web server configuration?
[19:15:17] havenwood: oft_gegong: https://docs.ruby-lang.org/en/2.5.0/ERB.html
[19:16:26] Mike11: has joined #ruby
[19:18:35] lxsameer: has joined #ruby
[19:19:43] howdoicomputer: has joined #ruby
[19:21:32] howdoicomputer: has joined #ruby
[19:25:29] sauvin: has joined #ruby
[19:27:17] za1b1tsu: has joined #ruby
[19:28:00] howdoicomputer: has joined #ruby
[19:28:10] howdoicomputer: has joined #ruby
[19:28:49] lxsameer: has joined #ruby
[19:29:32] howdoicomputer: has joined #ruby
[19:31:56] howdoicomputer: has joined #ruby
[19:32:06] howdoicomputer: has joined #ruby
[19:33:18] howdoicomputer: has joined #ruby
[19:34:16] Nicmavr: has joined #ruby
[19:35:32] howdoicomputer: has joined #ruby
[19:38:39] lxsameer: has joined #ruby
[19:39:10] siaw23: has joined #ruby
[19:40:17] siaw23: hi i have an array like this [1, 4, 3, 5, 7, 10] is there a way i can iterate it in pairs like so [1,4], [4,3], [3,5], [5,7], [7,10]
[19:41:30] code_zombie: has joined #ruby
[19:42:23] al2o3-cr: siaw23: use each_slice(2)
[19:43:06] havenwood: siaw23: each_cons(2)
[19:43:29] al2o3-cr: oh, sorry yeah, each_cons(2) my bad ;)
[19:43:54] siaw23: yeah each_cons is what i was looking for!!!
[19:43:58] siaw23: havenwood: thank you!!!
[19:44:08] havenwood: siaw23: you're welcome
[19:44:30] siaw23: al2o3-cr: each_slice is too easy :P trie working with that but knew there was something better
[19:44:39] siaw23: thanks guys
[19:46:57] akem: has joined #ruby
[19:47:35] sanscoeur: has joined #ruby
[19:48:10] siaw23: havenwood is like one of those guys that have the whole ruby doc inscribed on their brain
[19:48:51] lxsameer: has joined #ruby
[19:49:28] al2o3-cr: siaw23: he sure is.
[19:50:13] sanscoeur: has joined #ruby
[19:54:04] cthulchu: has joined #ruby
[19:58:50] lxsameer: has joined #ruby
[20:00:05] cagomez: has joined #ruby
[20:01:08] cagomez: has joined #ruby
[20:01:45] cagomez: has joined #ruby
[20:02:28] cagomez: has joined #ruby
[20:03:26] cagomez: has joined #ruby
[20:04:01] cagomez: has joined #ruby
[20:08:52] lxsameer: has joined #ruby
[20:13:24] moei: has joined #ruby
[20:16:04] tdy: has joined #ruby
[20:18:46] lxsameer: has joined #ruby
[20:22:04] jottr: has joined #ruby
[20:26:05] tdy1: has joined #ruby
[20:28:38] savolla: has joined #ruby
[20:28:46] lxsameer: has joined #ruby
[20:38:58] lxsameer: has joined #ruby
[20:44:36] venmx: has joined #ruby
[20:47:28] blackmesa: has joined #ruby
[20:50:04] tdy1: has joined #ruby
[20:52:13] jaequery: has joined #ruby
[20:59:58] jottr: has joined #ruby
[21:04:05] weaksauce: has joined #ruby
[21:04:42] cd: has joined #ruby
[21:06:19] ur5us: has joined #ruby
[21:08:18] akem: has joined #ruby
[21:11:28] roshanavand: has joined #ruby
[21:19:40] jottr: has joined #ruby
[21:23:06] cadillac_: has joined #ruby
[21:23:34] Jakoonce: has joined #ruby
[21:25:51] tdy1: has joined #ruby
[21:51:06] venmx: has joined #ruby
[21:54:04] jottr: has joined #ruby
[22:03:05] eckhardt_: has joined #ruby
[22:05:58] blackmesa: has joined #ruby
[22:06:28] Sembei: has joined #ruby
[22:08:17] blackmesa1: has joined #ruby
[22:09:39] ndr0s: has joined #ruby
[22:13:06] eckhardt_: has joined #ruby
[22:16:14] agent_white: has joined #ruby
[22:16:23] nine_milli_: has joined #ruby
[22:16:35] nine_milli_: is php better than ruby?
[22:18:31] AJA4350: has joined #ruby
[22:20:12] venmx: has joined #ruby
[22:21:36] sdegutis: has joined #ruby
[22:21:43] sdegutis: has left #ruby: ()
[22:22:01] al2o3-cr: nine_milli_: what's php?
[22:24:46] apeiros_: probably one of those newfangled javascript frameworks
[22:30:50] mikecmpbll: has joined #ruby
[22:37:07] gr33n7007h: has joined #ruby
[22:38:25] DTZUZO_: has joined #ruby
[22:44:19] sameerynho: has joined #ruby
[22:45:03] eckhardt_: has joined #ruby
[22:54:32] eckhardt_: has joined #ruby
[23:02:02] eckhardt_: has joined #ruby
[23:04:25] sauvin: has joined #ruby
[23:14:45] mynameisdebian: has joined #ruby
[23:17:52] kujira: has joined #ruby
[23:23:39] fluxAeon: has joined #ruby
[23:24:29] mynameisdebian: has joined #ruby
[23:27:35] sanscoeur: has joined #ruby
[23:29:25] evdubs_: has joined #ruby
[23:39:22] TheBloke: has joined #ruby
[23:41:53] mynameisdebian: has joined #ruby
[23:44:49] blackmesa: has joined #ruby
[23:48:02] baweaver_away: Aw, they left.
[23:54:59] jottr: has joined #ruby
[23:55:39] zapata: has joined #ruby
[23:59:03] darkhanb: has joined #ruby