« Back to channel list

#ruby - 19 August 2015

« Back 1 day Forward 1 day »
[00:00:49] andywojo: has joined #ruby
[00:01:02] Motoservo: has joined #ruby
[00:02:09] fgo: has joined #ruby
[00:07:09] Ox0dea: bootstrappm: Process just sticks some of its class methods in the global namespace.
[00:08:10] Ox0dea: https://github.com/ruby/ruby/blob/trunk/process.c#L7484-L7491
[00:08:36] RickHull: is there a way to see here http://ruby-doc.org/core-2.2.2/Process.html that Process is itself a module?
[00:08:41] zenspider: havenwood: there's a method called display for that
[00:09:00] zenspider: >> [1, 2, 3].each &:display
[00:09:01] ruboto: zenspider # => 123[1, 2, 3] (https://eval.in/418488)
[00:09:05] zenspider: tho it is more like print, than puts
[00:09:50] choke: has joined #ruby
[00:10:35] bootstrappm: thanks Ox0dea
[00:10:43] bootstrappm: RickHull now as far as I can tell
[00:11:24] Ox0dea: >> Process.class # RickHull?
[00:11:25] ruboto: Ox0dea # => Module (https://eval.in/418489)
[00:13:17] RegulationD: has joined #ruby
[00:13:22] dstarh: has joined #ruby
[00:14:47] Ropeney: has joined #ruby
[00:15:43] SenpaiSilver: has joined #ruby
[00:15:52] msnyon: has joined #ruby
[00:19:59] linuxboytoo: has joined #ruby
[00:25:08] christiandsg: has joined #ruby
[00:27:34] elton: has joined #ruby
[00:27:50] keen_______: has joined #ruby
[00:28:25] baweaver: has joined #ruby
[00:28:33] atomical: has joined #ruby
[00:29:10] mistermocha: has joined #ruby
[00:30:53] roolo: has joined #ruby
[00:32:44] CloCkWeRX: has joined #ruby
[00:33:19] uris: has joined #ruby
[00:33:45] ndrei: has joined #ruby
[00:34:18] radgeRayden: has joined #ruby
[00:35:21] Ox0sd: has joined #ruby
[00:35:31] christiandsg: has joined #ruby
[00:36:49] diegoviola: has joined #ruby
[00:37:28] Feyn: has joined #ruby
[00:40:16] shevy: ruby ruby ruby
[00:40:34] Oog: has joined #ruby
[00:41:19] ivanf: has joined #ruby
[00:42:16] Rubie: has joined #ruby
[00:42:45] sevenseacat: has joined #ruby
[00:43:13] richardburton: has joined #ruby
[00:44:35] dimasg: has joined #ruby
[00:44:39] finisherr: has joined #ruby
[00:44:40] Ox0dea: shevy: Relevant: https://github.com/tric/trick2013/blob/master/yhara2/entry.rb
[00:48:04] RickHull: ruby can't fail
[00:48:13] cajone: has joined #ruby
[00:48:15] Azure: has joined #ruby
[00:48:29] luckyme: has joined #ruby
[00:48:36] ght: Ruby can't fail? Is there talk of Ruby failing?
[00:48:44] rbowlby: has joined #ruby
[00:49:52] RickHull: some smurfs smurfed the smurf smurf so instead Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo
[00:51:10] ght: ACTION 's head explodes
[00:51:53] Ox0dea: ght: Buffalo bison [that] Buffalo bison bully bully [other] Buffalo bison.
[00:52:07] ght: ACTION is away - dead
[00:52:45] Ox0dea: Any number of consecutive instances of "buffalo" greater than three forms a valid English sentence.
[00:52:49] dstarh: has joined #ruby
[00:52:51] shevy: Ox0dea what the ... is this link
[00:52:59] Ox0dea: +or equal to three
[00:53:01] ght: I've heard the buffalo thing, yes.
[00:53:03] shevy: why are there arrays populated with the word ruby
[00:53:05] RickHull: shevy: what's the output?
[00:53:12] Ox0dea: shevy: Why not?
[00:53:14] RickHull: >> ruby ruby ruby
[00:53:14] shevy: RickHull I am way too scared to run it
[00:53:15] ruboto: RickHull # => undefined local variable or method `ruby' for main:Object (NameError) ...check link for more (https://eval.in/418495)
[00:53:27] shevy: ruby ruby.ruby(ruby.Ruby)
[00:53:30] Ox0dea: shevy: It's not malicious, and it's in fact quite humorous.
[00:53:35] mary5030: has joined #ruby
[00:53:42] iloverubynoob: has joined #ruby
[00:53:53] shevy: module Ruby :: class Ruby :: module Ruby
[00:54:18] Xiti`: has joined #ruby
[00:54:22] richardburton: has left #ruby: ()
[00:54:43] fgo: has joined #ruby
[00:56:10] Rubie: has joined #ruby
[00:57:28] devoldmx: has joined #ruby
[00:57:48] nofxx: Ox0dea, that's rancid... destination unknown, ruby ruby ruby soho
[00:58:13] elton_: has joined #ruby
[00:58:39] BraddPitt: will this work? https://gist.github.com/anonymous/0a32e2b0195c01316b10
[00:59:12] BraddPitt: will the super call in the child class still cause its build_phone_number implementation to be used?
[00:59:17] BraddPitt: or will the exception be raised?
[00:59:25] rehat: has joined #ruby
[00:59:34] icharlie: has joined #ruby
[00:59:39] sevenseacat: easy way to find out!
[00:59:46] shevy: let the cat try for you!!!
[00:59:58] rehat: has joined #ruby
[01:00:19] shevy: well I did not run it yet but
[01:00:36] shevy: you redefine the method or? since you don't call super I would assume that the parent method is not being run
[01:00:41] BraddPitt: (I should really just paste my shit into IRB and try it )
[01:00:54] shevy: you were scared
[01:00:59] sevenseacat: yes, you should
[01:01:00] jtdoncas: has joined #ruby
[01:01:02] BraddPitt: super was called, shevy
[01:01:12] shevy: in initialize
[01:01:17] shevy: not in the other method
[01:01:24] BraddPitt: in the Child class?
[01:01:53] gh0strider: has joined #ruby
[01:02:13] nofxx: BraddPitt, we forgive you that. But we'll never forgive world war z
[01:02:28] shevy: BraddPitt well you run that code without error yes?
[01:02:55] shevy: aka no raise is being invoked
[01:02:57] techsethi: has joined #ruby
[01:03:22] atomical: has joined #ruby
[01:04:43] bootstrappm: has left #ruby: ()
[01:04:50] abdoudjanifresh: has joined #ruby
[01:05:40] niko: has joined #ruby
[01:06:06] dopamean_: has joined #ruby
[01:08:24] skydiver: has joined #ruby
[01:09:51] jamesaxl|2: has joined #ruby
[01:10:33] BraddPitt: if I call Child.new
[01:10:39] BraddPitt: if I call Parent.new i get the raised exception
[01:10:41] BraddPitt: so working as intended
[01:10:55] uris: has joined #ruby
[01:11:30] shevy: if you add super() in the method of the child then the parent method will be called
[01:12:18] Axsuul: has joined #ruby
[01:12:45] Ox0dea: shevy: Did you really not run it?
[01:12:56] shevy: the strange code?
[01:13:00] shevy: with the ruby things?
[01:13:01] bmurt: has joined #ruby
[01:13:05] shevy: I am scared by that
[01:13:11] pontiki: hi, folks o/
[01:13:13] Axsuul: has joined #ruby
[01:13:13] Ox0dea: It just prints a link to this video: https://youtu.be/qObzgUfCl28?t=50
[01:13:18] shevy: I did run BraddPitt's code, it seemed simple
[01:13:24] shevy: hey tikiponters
[01:13:24] saddad: has joined #ruby
[01:13:33] Oog: has joined #ruby
[01:13:39] shevy: Ox0dea I am also scared to click on that link :D
[01:14:01] shevy: I let BraddPitt click on it, if he declares it is safe, I'll trust him
[01:14:43] troyready: has joined #ruby
[01:15:19] BraddPitt: which of these is faster? https://gist.github.com/anonymous/c9639b8dc0b83e962112
[01:15:40] ruboto: Why don't you try it and see for yourself?
[01:15:42] BraddPitt: ahahahaha Ox0dea
[01:15:43] shevy: probably .any?
[01:15:55] BraddPitt: my gf sings that every time I mention I'm coding in ruby
[01:16:03] BraddPitt: she yells 'RUBAY RUBAY RUBAY"
[01:16:09] shevy: what the ... is rubya
[01:16:11] shevy: erm rubay
[01:16:50] BraddPitt: https://www.youtube.com/watch?v=qObzgUfCl28
[01:17:34] BraddPitt: is there a better way of checking? Like maybe intersection of arrays
[01:18:45] shevy: the only way of real testing is if you run via Benchmarks
[01:19:00] freerobby: has joined #ruby
[01:19:28] frozen3: has joined #ruby
[01:21:42] cluelesscoder: has joined #ruby
[01:24:31] stevednd: has joined #ruby
[01:24:46] devdazed: has joined #ruby
[01:25:42] cluelesscoder: so I'm running into this certificate issue (described at http://stackoverflow.com/a/10430331) and one of the recommendations is to do `gem update --system` - but that gives me the same security issue!
[01:26:00] cluelesscoder: how can I find the relevant Gemfile and change it from https to http?
[01:26:12] cluelesscoder: I'm trying the find utility and coming up empty
[01:26:24] jenrzzz: has joined #ruby
[01:26:31] rickmasta: has joined #ruby
[01:26:34] freerobby: has joined #ruby
[01:26:45] houhoulis: has joined #ruby
[01:28:28] cluelesscoder: my understanding is that Gemfiles are typically at project roots, but is there a systemwide Gemfile?
[01:29:17] sdwrage: has joined #ruby
[01:32:11] gz_rain: has joined #ruby
[01:32:30] BraddPitt: Gemfiles are per-project/repo
[01:32:43] BraddPitt: wherever you are running `bundle install` from, that is where your gemfile woudl be
[01:32:48] mistermocha: has joined #ruby
[01:33:27] cluelesscoder: I know hardly anything about ruby, but if I type gem list and I have a bunch of "local gems" - is there necessarily a Gemfile for these?
[01:34:29] Aeyrix: I think you're misunderstanding what a Gemfile does.
[01:35:08] Aeyrix: A Gemfile is, for lack of a better definition, a list of gems that the application (that you've written in Ruby) requires to run.
[01:35:09] shevy: cluelesscoder usually a Gemfile came through bundler-based projects, the .gemspec file predated Gemfile files
[01:36:11] cluelesscoder: yeah, it's probably not applicable for me, but workaround #1 at http://railsapps.github.io/openssl-certificate-verify-failed.html suggests changing the Gemfile to source http rather than https
[01:36:26] iamninja: has joined #ruby
[01:36:38] cluelesscoder: I just want to fix this openssl error
[01:36:39] Aeyrix: You're installing Ruby on Windows, aren't you?
[01:36:49] Aeyrix: I only ever see this error on Windows.
[01:36:59] cluelesscoder: this is inside a CentOS virtualbox loaded up using vagrant
[01:37:10] northfurr: has joined #ruby
[01:37:11] Aeyrix: CentOS for development?
[01:37:16] Aeyrix: Oh wait, Vagrant, right, ok
[01:37:17] Aeyrix: never mind
[01:38:01] Aeyrix: cluelesscoder: Use workaround #3.
[01:38:06] wldcordeiro: has joined #ruby
[01:38:18] shevy: helping made easy
[01:38:21] shevy: we just link to the # :)
[01:38:54] akash89: has joined #ruby
[01:39:22] sdwrage: has joined #ruby
[01:39:40] vdamewood: has joined #ruby
[01:39:58] Vile`: has joined #ruby
[01:40:44] Aeyrix: The best solution is to grab the correct cacert.pem file and store it appropriately
[01:41:29] Aeyrix: Off the top of my head it'd be `curl http://curl.haxx.se/ca/cacert.pem -o /etc/pki/tls/certs/ca-bundle.crt`
[01:43:27] BraddPitt: whew, done with a big refactor
[01:43:31] BraddPitt: code is much cleaner and logical now
[01:44:08] EminenceHC: has joined #ruby
[01:45:31] olyx: has joined #ruby
[01:46:25] GPrime: has joined #ruby
[01:46:37] BraddPitt: rejected from YC Fellowship though :(
[01:48:19] olyx: has left #ruby: ()
[01:49:10] veduardo: has joined #ruby
[01:52:07] Rubie: has joined #ruby
[01:53:25] pontiki: is that your church?
[01:54:04] finisherr: has joined #ruby
[01:54:15] cluelesscoder: Aeyrix: thanks, that changed the error to "gem update --system Updating rubygems-update ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) bad response Not Found 404 (https://your-dns-needs-immediate-attention.dev/quick/Marshal.4.8/rubygems-update-2.4.8.gemspec.rz)"
[01:54:27] iloverubynoob: has joined #ruby
[01:54:30] Ox0dea: pontiki: Does pg worship Saint IGNUcius?
[01:54:40] wldcordeiro: has joined #ruby
[01:55:06] Ox0dea: He uses vi, apparently: https://usesthis.com/interviews/paul.graham/
[01:59:19] Musashi007: has joined #ruby
[01:59:27] Ox0sd: has left #ruby: ("WeeChat 1.2")
[01:59:38] ReK2: has joined #ruby
[02:00:10] pontiki: wonder if anything has changed for him since 2009
[02:00:34] tkuchiki: has joined #ruby
[02:02:10] northfurr: has joined #ruby
[02:03:49] Aeyrix: cluelesscoder: http://triple-networks.com/2015/03/26/your-dns-needs-immediate-attention/
[02:03:56] Aeyrix: Not a Ruby / Rails issue as far as I know.
[02:04:12] Vile`: has joined #ruby
[02:06:29] dimasg: has joined #ruby
[02:09:23] modern: has joined #ruby
[02:09:52] choke: has joined #ruby
[02:10:44] tkuchiki: has joined #ruby
[02:11:50] bronson: has joined #ruby
[02:12:42] wldcordeiro: has joined #ruby
[02:16:28] shevy: is there a way to do attr_reader for methods that end via '?' such as: attr_reader :foo?
[02:16:41] lannonbr: has joined #ruby
[02:17:10] fgo: has joined #ruby
[02:17:17] hmsimha_: has joined #ruby
[02:17:43] RickHull: :"foo?" maybe
[02:17:59] RickHull: but how can you make an accessor for a method?
[02:18:03] Ox0dea: RickHull: Why? :foo? is a valid Symbol.
[02:18:29] shevy: NameError: invalid attribute name `foo?'
[02:18:38] RickHull: quotes are free and i've been neglecting my keycap
[02:18:58] RickHull: shevy: attr_* are for ivars, not methods
[02:19:01] roolo: has joined #ruby
[02:19:20] renderful: has joined #ruby
[02:19:33] rbowlby: has joined #ruby
[02:19:34] Ox0dea: shevy: Maybe relevant: https://bugs.ruby-lang.org/issues/11326
[02:21:00] Ox0dea: But yeah, RickHull's observation is sound:
[02:21:01] Ox0dea: >> instance_variable_set('@foo?', 42) rescue $!
[02:21:02] ruboto: Ox0dea # => #<NameError: `@foo?' is not allowed as an instance variable name> (https://eval.in/418502)
[02:22:19] devoldmx: has joined #ruby
[02:22:19] rbennacer: has joined #ruby
[02:23:19] Feyn: has joined #ruby
[02:26:21] _metamp: has joined #ruby
[02:26:50] devbug: has joined #ruby
[02:27:59] siemprefresco: has joined #ruby
[02:28:36] elton: has joined #ruby
[02:29:08] skydiver: has joined #ruby
[02:30:40] wldcordeiro: has joined #ruby
[02:32:00] Oog: has joined #ruby
[02:41:13] wprice: has joined #ruby
[02:42:07] Axsuul: has joined #ruby
[02:42:25] baweaver: has joined #ruby
[02:42:42] luckyme: has joined #ruby
[02:44:57] Fezzler: has joined #ruby
[02:45:36] abdoudjanifresh: has joined #ruby
[02:46:12] tmtwd: has joined #ruby
[02:47:10] hydrozen: has joined #ruby
[02:47:17] cluelesscoder: Aeyrix: yeah, I traced it down to https://github.com/rubygems/rubygems.org/issues/834#issuecomment-68956885 altho haven't quite fixed it yet
[02:49:02] cgrieger^away: has joined #ruby
[02:55:14] iloverubynoob: has joined #ruby
[02:57:33] Eleeleth: has joined #ruby
[02:57:41] tmoor: has joined #ruby
[02:58:07] benlieb: has joined #ruby
[02:59:20] jeadr: has joined #ruby
[03:02:40] AccordLTN: has joined #ruby
[03:04:04] PaulCapestany: has joined #ruby
[03:04:18] jesterfraud: has joined #ruby
[03:05:38] darkf: has joined #ruby
[03:05:47] ahmetkapikiran: has joined #ruby
[03:06:00] rakm: has joined #ruby
[03:06:14] jesterfraud: has joined #ruby
[03:06:43] arup_r: has joined #ruby
[03:06:57] sphex_: has joined #ruby
[03:08:52] hotpancakes: has joined #ruby
[03:09:48] wldcordeiro: has joined #ruby
[03:10:20] bruno-: has joined #ruby
[03:10:46] bap1313: has joined #ruby
[03:10:50] braincrash: has joined #ruby
[03:13:15] pen: has joined #ruby
[03:19:20] xxx: has joined #ruby
[03:20:54] low-profile: has joined #ruby
[03:20:54] Sthebig: has joined #ruby
[03:20:54] Sthebig: has joined #ruby
[03:21:09] oddalot: has joined #ruby
[03:21:29] gf3: has joined #ruby
[03:23:01] dopie: has joined #ruby
[03:26:04] qiukun: has joined #ruby
[03:26:57] devoldmx: has joined #ruby
[03:28:50] gf3: has joined #ruby
[03:28:57] xcesariox: has joined #ruby
[03:28:59] gsingh93: has joined #ruby
[03:29:00] C0deMaver1ck: has joined #ruby
[03:29:04] jesterfraud: has joined #ruby
[03:29:21] ericwood: has joined #ruby
[03:29:42] bhorn1|away: has joined #ruby
[03:29:49] cscheib: has joined #ruby
[03:30:12] sshuff|gone: has joined #ruby
[03:30:53] jtdowney: has joined #ruby
[03:30:53] jtdowney: has joined #ruby
[03:31:01] sparr: has joined #ruby
[03:31:07] chrisarcand: has joined #ruby
[03:34:05] diegoviola: building 2.2.3
[03:34:15] Musashi007: has joined #ruby
[03:34:16] diegoviola: thanks ruby-install
[03:34:47] Oog: has joined #ruby
[03:35:01] Hijiri: has joined #ruby
[03:36:11] techsethi: has joined #ruby
[03:37:05] sevenseacat: whoa, 2.2.3 came out?
[03:37:19] RickHull: one small patch for CVE IIRC
[03:37:31] RickHull: one giant leap for rubykind
[03:37:40] mistermocha: has joined #ruby
[03:38:00] michaeldeol: has joined #ruby
[03:38:14] diegoviola: sevenseacat: y
[03:38:23] RickHull: https://www.ruby-lang.org/en/news/2015/08/18/ruby-2-2-3-released/ http://svn.ruby-lang.org/repos/ruby/tags/v2_2_3/ChangeLog
[03:38:24] mary5030: has joined #ruby
[03:38:29] RickHull: described as a TEENY version release
[03:38:44] Oog: has joined #ruby
[03:40:11] cynosures: has joined #ruby
[03:40:21] RickHull: interesting that the changelog goes back to December 2013
[03:40:26] havenwood: ruby-install ruby 2.2.3 --sha256 c745cb98b29127d7f19f1bf9e0a63c384736f4d303b83c4f4bda3c2ee3c5e41f
[03:40:55] dopamean_: has joined #ruby
[03:41:08] RickHull: it would be nice to see the changes *since the previous release* i.e. 2.2.2 (presumably)
[03:41:41] babykosh: has joined #ruby
[03:41:46] diegoviola: havenwood: I've only did: ruby-install ruby 2.2.3 -- do I want the --sha256 to sign the file or something?
[03:41:53] Ox0dea: RickHull: https://github.com/ruby/ruby/tree/v2_2_2
[03:42:06] Ox0dea: The 2.2.3 release hasn't been tagged yet, but it'll happen eventually.
[03:42:24] Oog: has joined #ruby
[03:42:27] havenwood: diegoviola: Just to validate the checksum of the archive.
[03:42:31] havenwood: diegoviola: You don't have to.
[03:42:36] diegoviola: havenwood: ok thanks
[03:42:46] havenwood: diegoviola: Or you can check more than one, like md5 and sha512.
[03:42:54] RickHull: unless you want cosmic rays in your codebase killing ur doodz
[03:43:06] Ox0dea: TIL `defined?(yield)` is another way to spell `block_given?`.
[03:43:10] Ox0dea: Which is a little scary?
[03:43:31] Ox0dea: >> def foo; defined? yield end; [foo, foo {}]
[03:43:32] ruboto: Ox0dea # => [nil, "yield"] (https://eval.in/418511)
[03:44:04] msnyon: has joined #ruby
[03:44:16] pencilcheck: has joined #ruby
[03:44:58] icharlie: has joined #ruby
[03:45:03] _blizzy_: has joined #ruby
[03:45:41] RickHull: don't you need a semicolon after `defined? yield` ?
[03:45:46] Ox0dea: Obviously.
[03:46:00] RickHull: for ruboto to give output, obviously not
[03:46:08] RickHull: but for your intended behavior, why not?
[03:46:22] Oog: has joined #ruby
[03:46:28] RickHull: why do you need a semicolon after `def foo` ?
[03:46:28] Oog: has joined #ruby
[03:46:40] Ox0dea: parse.y says so.
[03:46:54] RickHull: ah, the man behind the curtain
[03:46:56] RickHull: fair enough
[03:47:09] Ox0dea: Really, it's necessary to distinguist between parameters and method bodies.
[03:47:12] Ox0dea: *distinguish
[03:47:28] astrobun_: has joined #ruby
[03:47:48] RickHull: i just instinctively replace newlines with semicolons when writing contrived oneliners
[03:48:04] Ox0dea: I've gotten into the habit of writing code for ruboto to execute.
[03:48:16] RickHull: and not for people to read?!
[03:48:55] Ox0dea: Y'got me.
[03:49:04] Ox0dea: >> module Foo 1 end
[03:49:05] ruboto: Ox0dea # => 1 (https://eval.in/418517)
[03:49:11] Ox0dea: Note the non-necessity of the semicolon there.
[03:49:22] Ox0dea: Because no need to disambiguate.
[03:49:23] jenrzzz: has joined #ruby
[03:49:24] cantaberry: has joined #ruby
[03:49:34] Ox0dea: Same for classes as of a few days ago.
[03:50:16] hotpancakes: has joined #ruby
[03:50:19] Oog: has joined #ruby
[03:50:50] rbowlby: has joined #ruby
[03:54:37] Oog: has joined #ruby
[03:55:00] Musashi007: has joined #ruby
[03:55:03] s00pcan: has joined #ruby
[03:55:59] iloverubynoob: has joined #ruby
[03:56:13] gix: has joined #ruby
[03:56:20] demonlove: has joined #ruby
[03:56:24] n_blownapart: has joined #ruby
[03:57:05] dimasg: has joined #ruby
[03:57:21] jeadr: has joined #ruby
[03:57:59] tlarevo: has joined #ruby
[03:58:55] xxneolithicxx: has joined #ruby
[03:59:57] Maletor: has joined #ruby
[04:01:20] xxneolithicxx: has joined #ruby
[04:03:15] Oka: has joined #ruby
[04:05:24] robbyoconnor: has joined #ruby
[04:06:34] Oog: has joined #ruby
[04:07:07] roolo: has joined #ruby
[04:07:11] jeadr: has joined #ruby
[04:07:34] astrobun_: has joined #ruby
[04:08:35] siemprefresco: has joined #ruby
[04:09:08] radgeRayden: has joined #ruby
[04:09:26] djbkd: has joined #ruby
[04:09:53] RickHull: has left #ruby: ()
[04:10:11] workmad3: has joined #ruby
[04:10:23] Oog: has joined #ruby
[04:11:10] GPrime: has joined #ruby
[04:12:02] choke: has joined #ruby
[04:12:43] bronson: has joined #ruby
[04:14:04] Oog: has joined #ruby
[04:15:35] jpfuentes2: has joined #ruby
[04:16:07] siemprefresco: has joined #ruby
[04:17:53] Oog: has joined #ruby
[04:19:26] GPrime: has joined #ruby
[04:19:27] jtdowney: has joined #ruby
[04:19:27] jtdowney: has joined #ruby
[04:20:13] EminenceHC: has joined #ruby
[04:20:29] psye: has joined #ruby
[04:20:37] sinkensabe: has joined #ruby
[04:20:40] gf3: has joined #ruby
[04:21:00] josh4: has joined #ruby
[04:21:10] Sthebig: has joined #ruby
[04:21:10] Sthebig: has joined #ruby
[04:21:52] Oog: has joined #ruby
[04:22:00] astrobun_: has joined #ruby
[04:23:00] astrobun_: has joined #ruby
[04:23:31] towski_: has joined #ruby
[04:23:48] cscheib: has joined #ruby
[04:24:00] gsingh93: has joined #ruby
[04:25:06] zz_Outlastsheep: has joined #ruby
[04:25:14] xcesariox: has joined #ruby
[04:27:20] sparr: has joined #ruby
[04:27:21] codecop: has joined #ruby
[04:27:58] charliesome: has joined #ruby
[04:28:16] sshuff|gone: has joined #ruby
[04:29:06] iateadonut: has joined #ruby
[04:31:51] bluOxigen: has joined #ruby
[04:33:02] blueOxigen: has joined #ruby
[04:33:35] jeadr: has joined #ruby
[04:33:36] low-profile: has joined #ruby
[04:34:06] Olipro-: has joined #ruby
[04:34:30] amystephen: has joined #ruby
[04:35:13] jeanlinux: has joined #ruby
[04:37:12] Norelec: has joined #ruby
[04:37:59] Rubie: has joined #ruby
[04:38:26] Oog: has joined #ruby
[04:38:49] lxsameer: has joined #ruby
[04:38:49] lxsameer: has joined #ruby
[04:40:22] qiukun: has joined #ruby
[04:42:08] sameerynho: has joined #ruby
[04:42:48] Oog: has joined #ruby
[04:43:58] mistermocha: has joined #ruby
[04:45:48] techsethi: has joined #ruby
[04:47:49] charliesome: has joined #ruby
[04:47:58] Oog: has joined #ruby
[04:48:38] neanderslob_: has joined #ruby
[04:48:59] mary5030: has joined #ruby
[04:50:33] pawnbox: has joined #ruby
[04:51:16] Sthebig: has joined #ruby
[04:51:16] Sthebig: has joined #ruby
[04:52:33] Oog: has joined #ruby
[04:53:43] qiukun: has joined #ruby
[04:55:03] jenrzzz: has joined #ruby
[04:55:04] gf3: has joined #ruby
[04:55:06] C0deMaver1ck: has joined #ruby
[04:55:06] davidcelis: has joined #ruby
[04:55:07] davidcelis: has joined #ruby
[04:56:44] iloverubynoob: has joined #ruby
[04:57:18] lxsameer_: has joined #ruby
[04:58:38] neanderslob_: has joined #ruby
[04:58:56] Oog: has joined #ruby
[04:59:13] neanderslob: has joined #ruby
[05:01:08] gamov: has joined #ruby
[05:01:12] icharlie: has joined #ruby
[05:06:16] roolo: has joined #ruby
[05:07:30] skydiver: has joined #ruby
[05:08:01] n008f4g_: has joined #ruby
[05:08:15] riotjones: has joined #ruby
[05:10:17] lxsameer_: has joined #ruby
[05:11:24] chrissonar: has joined #ruby
[05:11:42] bruno-: has joined #ruby
[05:11:47] sameerynho: has joined #ruby
[05:13:59] bluOxigen: has joined #ruby
[05:14:44] pawnbox: has joined #ruby
[05:14:57] choke: has joined #ruby
[05:16:15] lxsameer_: has joined #ruby
[05:16:30] kellray: has joined #ruby
[05:16:35] kellray: has left #ruby: ()
[05:20:04] skydiver: has joined #ruby
[05:20:06] j_mcnally: has joined #ruby
[05:20:11] charliesome: has joined #ruby
[05:20:42] towski_: has joined #ruby
[05:20:54] j_mcnally: has joined #ruby
[05:22:10] kies: has joined #ruby
[05:22:31] cornerma1: has joined #ruby
[05:24:48] dhjondoh: has joined #ruby
[05:25:21] hydrozen: has joined #ruby
[05:25:33] xxx: has joined #ruby
[05:26:34] pen: has joined #ruby
[05:26:56] Hijiri: has joined #ruby
[05:28:55] sameerynho: has joined #ruby
[05:29:15] hotpancakes: has joined #ruby
[05:29:51] icharlie: has joined #ruby
[05:30:47] grotewold: has joined #ruby
[05:31:24] amystephen: has joined #ruby
[05:31:25] ramfjord: has joined #ruby
[05:31:51] Oka: has joined #ruby
[05:32:20] ferhaty: has joined #ruby
[05:32:50] jenrzzz: has joined #ruby
[05:33:52] fgo: has joined #ruby
[05:35:56] keen________: has joined #ruby
[05:36:02] skade: has joined #ruby
[05:37:48] Rutix: has joined #ruby
[05:37:49] Rutix: has joined #ruby
[05:38:17] aganov: has joined #ruby
[05:38:23] shadoi: has joined #ruby
[05:38:30] ahmetkapikiran: has joined #ruby
[05:38:51] icarus: has joined #ruby
[05:38:53] Oka: has joined #ruby
[05:41:20] hotpancakes: has joined #ruby
[05:42:09] yardenbar: has joined #ruby
[05:43:23] TomyLobo: has joined #ruby
[05:44:19] fsvehla: has joined #ruby
[05:46:25] sdfgsdfg: has joined #ruby
[05:49:30] Oog: has joined #ruby
[05:49:54] davedev24: has joined #ruby
[05:50:01] nofxx: has joined #ruby
[05:51:23] Frem: has joined #ruby
[05:52:04] AlxAltea: has joined #ruby
[05:52:12] Pupp3tm4st3r: has joined #ruby
[05:52:28] grvgr: has joined #ruby
[05:52:55] shadoi: has joined #ruby
[05:53:38] qiukun: has joined #ruby
[05:54:05] Sheperson: has joined #ruby
[05:54:59] skydiver: has joined #ruby
[05:55:11] fgo: has joined #ruby
[05:55:27] wprice: has joined #ruby
[05:57:29] iloverubynoob: has joined #ruby
[05:59:01] workmad3: has joined #ruby
[06:00:58] eGGsha: has joined #ruby
[06:02:33] Oog: has joined #ruby
[06:05:13] casadei: has joined #ruby
[06:05:54] _aeris_: has joined #ruby
[06:05:57] solars: has joined #ruby
[06:08:47] Hijiri: has joined #ruby
[06:08:48] slani: hello, is there any easy way to check if number 7 in all doc has value 0 , if true then remove 7 from all doc in docs http://paste.ubuntu.com/12122432/
[06:10:20] hotpancakes: has joined #ruby
[06:10:52] baweaver: what have you tried?
[06:11:32] crowell: has joined #ruby
[06:12:04] iloverubynoob: has joined #ruby
[06:12:25] baweaver: and I have a sneaking feeling you're doing something really off to get to this format of datastructure
[06:12:35] baweaver: back up, what exactly are you trying to do?
[06:13:37] bronson: has joined #ruby
[06:13:53] baweaver: and better yet, what code is producing this and what is the input?
[06:14:17] tkuchiki: has joined #ruby
[06:14:52] Guest32: has joined #ruby
[06:15:36] tkuchiki: has joined #ruby
[06:15:54] slani: baweaver: I need to geat average for doc1, doc2, but if user has 0 vaule on all docs it should not be included in average for any doc
[06:16:07] baweaver: you didn't see all of that
[06:16:33] baweaver: What is an example input for your program, and what is the program that generates this datastructure you provided?
[06:16:53] slani: this is reads from database
[06:17:04] SolarSailor: has joined #ruby
[06:17:14] slani: and I put them into hash
[06:17:54] baweaver: what code are you using to do this?
[06:18:38] ta: has joined #ruby
[06:18:43] slani: baweaver: I didn't wrrite code for readint from database
[06:18:57] User458764: has joined #ruby
[06:18:59] baweaver: Do you have the code though?
[06:19:17] baweaver: you do realize how incredibly vague this all is
[06:19:26] slani: baweaver: yes I know
[06:19:44] slani: but I can't do any thing abouth this
[06:19:48] baweaver: what have you tried so far.
[06:20:01] slani: I just need average
[06:20:09] baweaver: what have you tried
[06:20:56] lsmola: has joined #ruby
[06:21:11] charliesome: has joined #ruby
[06:21:36] slani: I know how to slove this problem, but code will be very ugly.
[06:21:41] renderful: has joined #ruby
[06:21:43] baweaver: then show me
[06:21:59] hs366: has joined #ruby
[06:22:01] baweaver: ugly code can be improved upon
[06:22:07] baweaver: no code does neither of us any good
[06:23:12] slani: baweaver: I didn't write it yet. but ugly approach is to iterate more times and save stuf in new hashs
[06:23:27] baweaver: then do that, and show me
[06:23:35] jeadr: has joined #ruby
[06:23:42] slani: baweaver: ok. it will take some time
[06:23:53] cheniel: has joined #ruby
[06:24:35] howdoi: has joined #ruby
[06:26:26] JoshGlzBrk: has joined #ruby
[06:26:40] Rubie: has joined #ruby
[06:27:18] devoldmx: has joined #ruby
[06:27:56] kies: has joined #ruby
[06:29:48] pawnbox_: has joined #ruby
[06:29:59] Pupp3tm4st3r: has joined #ruby
[06:30:51] AlexRussia_: has joined #ruby
[06:32:49] _blizzy_: has joined #ruby
[06:33:39] arup_r: has joined #ruby
[06:34:09] wprice: has joined #ruby
[06:34:39] Musashi007: has joined #ruby
[06:35:05] Macaveli: has joined #ruby
[06:36:40] psye: has joined #ruby
[06:39:15] Pupp3tm4_: has joined #ruby
[06:40:27] kp666: has joined #ruby
[06:41:19] Oog: has joined #ruby
[06:41:20] _blizzy_: has joined #ruby
[06:45:19] dionysus69: has joined #ruby
[06:51:04] Macaveli: has joined #ruby
[06:51:25] mistermocha: has joined #ruby
[06:52:54] Synthbread: has joined #ruby
[06:53:19] ta: has joined #ruby
[06:56:42] CloCkWeRX: has joined #ruby
[06:57:24] iloverubynoob: has joined #ruby
[06:58:28] mutuma: has joined #ruby
[06:59:13] Oog: has joined #ruby
[07:00:43] roolo: has joined #ruby
[07:01:13] Pupp3tm4st3r: has joined #ruby
[07:01:14] TomyWork: has joined #ruby
[07:02:50] rht: has joined #ruby
[07:03:15] Musashi007: has joined #ruby
[07:08:05] slani: why this dosen't work http://paste.ubuntu.com/12122679/
[07:08:14] Neon: has joined #ruby
[07:08:22] XF: https://gist.github.com/xfisthebest/b833c689d97c4f3863d7 anyone help
[07:08:22] krz: has joined #ruby
[07:09:00] Pupp3tm4st3r: has joined #ruby
[07:09:02] armyriad: has joined #ruby
[07:09:25] sevenseacat: XF: you removed the error
[07:09:28] Ilyes512: has joined #ruby
[07:09:31] sevenseacat: so.... no-one can
[07:09:53] XF: sevenseacat what?
[07:09:53] arup_r: has joined #ruby
[07:10:13] sevenseacat: and you also missed the code that causes it.
[07:10:36] XF: which code?
[07:10:38] XF: help please
[07:10:49] sevenseacat: the code that the error that we can't see, points to
[07:10:53] Norelec: has left #ruby: ("Leaving")
[07:11:04] sevenseacat: whatever was on the line that you cut off on line 1
[07:12:12] XF: ok let me paste whole
[07:12:44] hotpancakes: has joined #ruby
[07:12:54] Pupp3tm4st3r: has joined #ruby
[07:13:44] ta: has joined #ruby
[07:14:52] slani: why this dosen't work http://paste.ubuntu.com/12122679/
[07:15:08] slani: why I get error Array can't be coerced into Fixnum
[07:15:08] blueOxigen: has joined #ruby
[07:15:31] sevenseacat: slani: because date.values is an array
[07:15:36] sevenseacat: and you're trying to add it to 0
[07:16:19] slani: sevenseacat: if i puts date.values I get numbers 0.20652173913043478
[07:16:29] sevenseacat: what does the "s" stand for in puts ?
[07:16:34] sevenseacat: (hint: string)
[07:16:39] sevenseacat: so it will convert your array into a string
[07:16:50] slani: sevenseacat: thanks
[07:17:13] apeiros: slani: puts is inadequate to inspect objects
[07:17:24] apeiros: slani: either use `p obj` or `puts obj.inspect`
[07:18:04] bnagy: slani: doesn't matter if it's numbers or strings, that's irrelevant
[07:18:15] bnagy: you can't add arrays of anything to a number
[07:18:33] bnagy: date.values is always going to be an array
[07:19:11] slani: ok then I can do val[0] or how can I get number directly from date.values
[07:19:36] bnagy: about 20 ways, I guess
[07:19:41] Violentr: has joined #ruby
[07:19:53] Neon: Please have a look at https://gist.github.com/Neosublimation/55c68ee7d62155a2f56d (15 lines), where I'm trying to describe what I want to do. Any ideas how I can achieve that? I've tried using IRB::Irb, but it always runs into code that is missing some methods.
[07:19:55] slani: bnagy: the best way
[07:19:55] bnagy: if you don't know how to do that you need to go back to basics
[07:20:09] Oog: has joined #ruby
[07:20:48] charliesome: has joined #ruby
[07:22:33] timonv: has joined #ruby
[07:25:11] shay-: has joined #ruby
[07:27:00] XF: sevenseacat https://gist.github.com/xfisthebest/7d8f3897c7dcbf667c49
[07:27:07] Rubie: has joined #ruby
[07:27:12] shay-: hi, I want to listen on a unix domain socket. I can make it working using UNIXServer.open, but this creates a new socket file. How can I resue a already existing socket file?
[07:27:34] Oog: has joined #ruby
[07:27:36] sevenseacat: XF: so the first line of the error message references calling downcase on nil, on line 315 of lib/requests.rb
[07:27:54] sevenseacat: XF: so why is something nil that you're calling downcase on?
[07:28:02] XF: ok wait
[07:28:26] bnagy: shay-: I don't think you can
[07:28:28] skade: has joined #ruby
[07:28:30] Ox0dea: shay-: UNIXSocket.new, no?
[07:28:30] [k-: has joined #ruby
[07:28:45] bnagy: at least not easily. Creating the sock is part of listening. You can _connect_ to an existing now
[07:28:59] XF: sevenseacat the line on 315 is if a.downcase == ip.downcase
[07:29:00] bnagy: maybe you can do fd tricks *shrug*
[07:29:07] sevenseacat: XF: so either a or ip is nil
[07:29:42] bnagy: but at the libc level sockfiles aren't supposed to exist when you bind, I think
[07:30:01] _metamp: has joined #ruby
[07:30:09] terlar: has joined #ruby
[07:32:31] ruby-lang022: has joined #ruby
[07:32:43] ishahnaz: has joined #ruby
[07:33:09] amystephen: has joined #ruby
[07:33:24] nux443: has joined #ruby
[07:35:07] corpsicle: im trying to execute a script like "scl enable ruby193 *absolute_path_to_script* *argument_to_script*" but i get "/etc/scl/prefixes/" added to the script path. what am i doing wrong?
[07:35:19] tommek: has left #ruby: ()
[07:36:00] c0m0: has joined #ruby
[07:36:09] anisha: has joined #ruby
[07:36:16] Ox0dea: Using scl?
[07:36:41] corpsicle: why is that bad?
[07:36:45] ruby-lang022: I want to place my ruby vaiable @id in ftp.getbinaryfile. how can I place it in <% ftp.getbinaryfile("file."+"<%= @id %>"+".dynamicScanreport") %>
[07:37:06] workmad3: has joined #ruby
[07:37:45] Thermatix: has joined #ruby
[07:38:22] Ilyes512: has joined #ruby
[07:38:37] [k-: you mean file.686445780?
[07:39:16] [k-: "file.#{@id}" would do the trick
[07:39:40] Ox0dea: As would "file.#@id", but don't tell anybody.
[07:39:43] nuttermb: has joined #ruby
[07:39:56] apeiros: ah yes, please don't :)
[07:40:06] jeanlinux: has joined #ruby
[07:40:11] [k-: ACTION erases that from memory yet again
[07:40:28] Neon: ACTION notes it down.
[07:40:43] [k-: anybody is jhass
[07:41:55] Pupp3tm4st3r: has joined #ruby
[07:43:22] Neon: Doesn't this documentation say that IRB.irb createa a new IRB::Irb? http://ruby-doc.org/stdlib-2.0.0/libdoc/irb/rdoc/IRB.html#method-c-irb
[07:43:48] Neon: I'm getting a NoMethodError when trying to access IRB.irb
[07:44:05] Ox0dea: >> IRB.methods.include?(:irb) # Neon
[07:44:06] ruboto: Ox0dea # => uninitialized constant IRB (NameError) ...check link for more (https://eval.in/418635)
[07:44:12] Ox0dea: >> require 'irb'; IRB.methods.include?(:irb) # Neon
[07:44:13] ruboto: Ox0dea # => (https://eval.in/418636)
[07:44:21] Ox0dea: What even?
[07:44:27] corpsicle: so how do i force SCL to see my absolute path as absolute?
[07:44:42] Neon: Oh so this is a Module to be included again. Why?
[07:45:10] Iskarlar: has joined #ruby
[07:45:23] ruby-lang022: it is not working. Actually i am getting the file through ftp server. I am having files like file.1.dynamicscanreport, file.2.dynamicscanreport ... etc here 1,2,3, ... are ids. so i want to place dynamically with @id
[07:45:31] [k-: `forbiddebn access to file`
[07:45:50] [k-: corpsicle maybe try a leading slash?
[07:46:33] BloodyHistory: has joined #ruby
[07:46:37] BloodyHi_: has joined #ruby
[07:46:45] [k-: ruby-lang022: that sounds like it's working?
[07:46:50] r0x0rZ: has joined #ruby
[07:46:50] Ox0dea: Neon: The documentation does say that method should exist, but it doesn't.
[07:47:02] Ox0dea: just use IRB::Irb.new?
[07:47:08] duncannz: has joined #ruby
[07:47:20] [k-: Ox0dea have you tried it on your local irb?
[07:47:37] Ox0dea: The most recent suggestion?
[07:47:47] Neon: Ox0dea, my problem is that I can't find the right way of using IRB::Irb. I'll upload the snippet I've come up with so far.
[07:48:06] senayar: has joined #ruby
[07:48:11] paradoja: has joined #ruby
[07:48:15] [k-: yes, if your most recent suggestion is the one im thinking about
[07:49:42] Pupp3tm4st3r: has joined #ruby
[07:49:45] [k-: ruby-lang022: do you want to insert the id into the string or get it out of the filename
[07:49:59] [k-: what do you mean by place dynamically
[07:50:16] DoubleMalt: has joined #ruby
[07:50:25] Salehi: has joined #ruby
[07:51:25] Neon: https://gist.github.com/Neosublimation/78fbb738be5ae58583a6 - Any ideas, Ox0dea?
[07:52:17] Pupeno: has joined #ruby
[07:52:25] Neon: The IRB.CurrentContext method (http://ruby-doc.org/stdlib-2.0.0/libdoc/irb/rdoc/IRB.html#method-c-CurrentContext) is returning nil and so I assume I'm doing something wrong.
[07:52:28] ruby-lang022: it is working fine when i try to call statically <% ftp.getbinaryfile("file.1.dynamicScanreport") %>
[07:52:54] mistermocha: has joined #ruby
[07:53:25] Ox0dea: >> @id = 42; "file.#{@id}.blah" # ruby-lang022
[07:53:26] ruboto: Ox0dea # => "file.42.blah" (https://eval.in/418638)
[07:53:42] Pupp3tm4st3r: has joined #ruby
[07:54:26] casadei: has joined #ruby
[07:54:28] joonty: has joined #ruby
[07:54:40] Ox0dea: Neon: Are you getting the NoMethodError on #last_value?
[07:55:25] mistermocha: has joined #ruby
[07:55:58] Neon: Ox0dea, yes, it's basically this code causing the error: @workspace.evaluate self, "_ = IRB.CurrentContext.last_value" (in lib/ruby/2.0.0/irb/context.rb:264)
[07:56:08] lxsameer_: has joined #ruby
[07:56:55] Axsuul: has joined #ruby
[07:57:01] Neon: (in IRB::Context#set_last_value)
[07:57:34] Ox0dea: > Maybe IRB bug!
[07:57:40] Neon: I don't know what they mean with last_value unfortunately. I couldn't find an elaborate documentation on how the IRB class/module works.
[07:58:03] Ox0dea: #last_value returns, well, the value of the most recently evaluated expression.
[07:58:06] Neon: Ox0dea, yeah, that's the default output when an error is raised somewhere in the IRB module.
[07:58:15] Ox0dea: It gets stored in _ for convenience.
[07:58:18] last_staff: has joined #ruby
[07:58:32] slani: why this doesn't work
[07:58:41] slani: http://paste.ubuntu.com/12122908/
[07:59:12] Ox0dea: Neon: Sorry, nothing jumps out as egregiously incorrect. :/
[07:59:18] sevenseacat: slani: h[1] is nil.
[07:59:26] sevenseacat: seems pretty obvious, no?
[07:59:43] Neon: Maybe I can simply assign a Context to IRB.conf[:MAIN_CONTEXT] manually as this is the field IRB.CurrentContext gets the context from.
[08:00:04] sevenseacat: slani: if h = {}, then h[1] is always nil.
[08:00:16] Ox0dea: slani: Are you coming from Perl?
[08:00:41] fgo: has joined #ruby
[08:00:52] pen: has joined #ruby
[08:01:02] Oog: has joined #ruby
[08:01:14] slani: Ox0dea: no
[08:01:44] Ox0dea: Okay. I only ask because Perl lets you magically insert into hashes like that.
[08:01:56] Ox0dea: It's called autovivification.
[08:02:12] slani: sevenseacat: how can I then create a nested hash
[08:02:31] Ox0dea: >> auto = Hash.new { |h, k| h[k] = Hash.new &h.default_proc }; auto[1][:a][2] = :b; auto
[08:02:32] ruboto: Ox0dea # => {1=>{:a=>{2=>:b}}} (https://eval.in/418640)
[08:02:56] sevenseacat: that kind of auto-vivication is quite dangerous... I've seen it go very wrong.
[08:03:05] Ox0dea: It's not the greatest idea.
[08:03:20] faces: has joined #ruby
[08:03:21] apeiros: it's just a tribute
[08:03:29] sevenseacat: you should always be in control of your data.
[08:04:15] Ox0dea: sevenseacat: Then again, using ||= to check for existence and create if not isn't very pretty either.
[08:04:21] Ox0dea: >> h = {}; (h[1] ||= {})[:a] = 10; h
[08:04:22] ruboto: Ox0dea # => {1=>{:a=>10}} (https://eval.in/418641)
[08:04:40] ndrei: has joined #ruby
[08:04:40] sevenseacat: if you put it in a one-liner like that, sure
[08:05:11] Ox0dea: I get to blame the tool this time.
[08:05:13] sevenseacat: >> h = Hash.new({}); h[1] = "foo"; h
[08:05:14] ruboto: sevenseacat # => {1=>"foo"} (https://eval.in/418642)
[08:05:23] sevenseacat: I see no problem of doing one level like that
[08:05:26] Ox0dea: That ain't no nested hash.
[08:05:44] sevenseacat: what slani wants to do isn't a nested hash either
[08:05:56] bumbar_: has joined #ruby
[08:06:00] sevenseacat: wait, i fooked it up
[08:06:24] slani: If I understand it is better to avoid this
[08:06:27] sevenseacat: ACTION goes back into hole
[08:06:41] sevenseacat: s/hole/punching Draper in the face/
[08:06:44] Ox0dea: slani: It's fine if you know what you're doing, but that's almost tautological.
[08:07:17] workmad3: has joined #ruby
[08:07:29] Ox0dea: Generally, if your thing can be of arbitrary depth, something has already gone wrong.
[08:08:50] hotpancakes: has joined #ruby
[08:08:59] Macaveli: has joined #ruby
[08:10:08] dopamean_: has joined #ruby
[08:10:58] Neon: Tell this a file system developer.
[08:11:19] Oog: has joined #ruby
[08:11:38] sheldonh: has joined #ruby
[08:12:59] sheldonh: on linux, when i set ENV["HOME"]="scrubbed", i still see the original value of HOME in /proc/PID/environ. does mutation of ENV affect the process's environment? is /proc/PID/environ just a copy of the env that was given to the exec syscall?
[08:13:09] Ox0dea: Where will you be when you will be where you will be when you will be where you will be when the recursion hits?
[08:13:41] jeanlinux: has joined #ruby
[08:14:04] ahmetkapikiran: has joined #ruby
[08:15:28] c0m0: sheldonh: because the environ file is populated when the process begin created
[08:15:34] bronson: has joined #ruby
[08:16:09] jeanlinux: has joined #ruby
[08:16:35] sheldonh: c0m0: okay cool. so /proc/PID/environ is not a view into the current environment; it's a copy of the env argument to the exec syscall. yes?
[08:16:50] Ox0dea: I'm not sure that's right.
[08:16:56] sheldonh: the proc(5) manpage is inconclusive
[08:16:56] Ox0dea: At least, /proc/PID/cmdline is "dynamic".
[08:17:09] sheldonh: Ox0dea: yes, that's what confused me
[08:17:13] c0m0: environ isn't dinamic
[08:17:54] sheldonh: Ox0dea: fire up this process: ruby -e 'ENV["HOME"] = "scrubbed"; puts $$; sleep'
[08:18:15] sheldonh: Ox0dea: then take the pid printed and do: tr '\0' '\n' /proc/PID/environ | grep HOME
[08:18:31] XF: sevenseacat there?
[08:18:48] Ox0dea: sheldonh: Aye, it hasn't changed.
[08:18:54] XF: sevenseacat if i give you my ssh details can you fix erros please?
[08:19:13] XF: im just getting one error
[08:19:17] adaedra: XF: never give your ssh access to strangers,
[08:19:20] XF: idk how to fix
[08:19:23] sevenseacat: right, and I've helped you determine exactly whats causing it
[08:19:40] sevenseacat: now you need to fix it
[08:19:50] XF: idk where the ip is missing
[08:20:02] sevenseacat: neither do we, because you havent shown any code.
[08:20:15] sevenseacat: we haven't even established if its the ip thats missing.
[08:20:25] Ox0dea: sheldonh: Mucking with **argv in C does change the value in /proc/PID/cmdline, but I can't test the same in Ruby.
[08:20:26] tno: has joined #ruby
[08:20:37] Ox0dea: ARGV's elements are frozen strings and thawing them causes the interpreter to segfault.
[08:20:50] XF: seven can i give the github source code of the scripts
[08:21:54] XF: sevenseacat can i give the github source code of the scripts
[08:21:58] kr3ssh: has joined #ruby
[08:22:11] sevenseacat: sure. if someone wants to trawl the whole project to fix your problem for you, is a whole different question though.
[08:22:13] wasamasa: ACTION just learned about syscall() in ruby
[08:22:22] zeroDivisible: has joined #ruby
[08:22:31] wasamasa: is it possible to use the syscalls requiring pointers to structs as arguments though?
[08:22:38] sevenseacat: XF: you're verging on the 'hire someone to fix my problem' solution
[08:22:46] ruby-lang022: @<Ox0dea>, @<[k-> it is working fine with local textfile like test.1.txt but when i try to connect to ftp server to get file -- I'm getting error "invalid byte sequence in UTF-8"
[08:22:56] Soda: has joined #ruby
[08:23:07] XF: i thought u are trusted
[08:23:11] wasamasa: I've tried using gettimeofday with a variable containing an empty string and promptly got a segfault
[08:23:16] Ox0dea: ruby-lang022: Thousands of people have had your problem.
[08:23:24] sevenseacat: XF: you have not shown any kind of competency at fixing your own problem
[08:23:25] Ox0dea: They have left a trail of knowledge in their wake.
[08:23:31] TheHodge: has joined #ruby
[08:23:48] sheldonh: Ox0dea: yeah, i don't care about cmdline. i'm trying to protect some environment variables (used to configure a configuration service client) from accidental exposure in programs that dump ENV in their exception handlers. stupid, but common
[08:23:53] sevenseacat: ergo we can determine you are not a programmer and should hire someone who is
[08:24:02] Ox0dea: sheldonh: /proc/PID/environ is dynamic.
[08:24:06] Neon: All people whose nicknames end with 'cat' are officially trusted.
[08:24:19] ruby-lang022: and i was confused it is working fine when i directly given that filename
[08:24:20] Ox0dea: Using the "third argument" (char **environ) to main(), I can modify its values.
[08:24:20] sheldonh: Ox0dea: how have you tested that claim?
[08:24:27] Ox0dea: sheldonh: See above.
[08:24:58] XF: sevenseacat i got bot scripts from github idk how to use but tried and i am at end
[08:25:06] XF: just 1 error to solve and whole done
[08:25:27] sheldonh: Ox0dea: ah. so you're saying the kernel supports it, but ruby doesn't bother
[08:25:36] Ox0dea: That does seem to be the case, yes.
[08:26:30] c0m0: Ox0dea: but if you change a variable when your process is up && running, the change to env variable isn't show in environ file
[08:26:31] Neon: wasamasa, don't you think you're doing it wrong? :S
[08:26:46] XF: sevenseacat :/
[08:26:54] r0x0rZ: hi i'm just starting out with Ruby. I was wondering how can I read documentation in terminal emulator? (something like pydoc in python)
[08:26:55] wasamasa: Neon: oh, sure
[08:27:04] sevenseacat: r0x0rZ: you probably want ri
[08:27:05] Ox0dea: c0m0: Perhaps not from Ruby, but a very simple C program will demonstrate that it is indeed possible.
[08:27:11] wasamasa: Neon: not like I'd get a segfault for no reason :v
[08:27:23] r0x0rZ: sevenseacat: oh yeah that's it. thanks
[08:27:29] Oog: has joined #ruby
[08:27:33] c0m0: show me C code
[08:27:48] sevenseacat: show me teh codez
[08:27:52] XF: what should i do?
[08:28:00] sevenseacat: XF: hire someone to fix your script.
[08:28:04] devoldmx: has joined #ruby
[08:28:21] XF: sevenseacat where can i find?
[08:28:30] Neon: wasamasa, I mean if you operate on that layer you shouldn't be using Ruby probably. Although I must say I'm curious about the pointer thing. :P
[08:28:32] chipotle: has joined #ruby
[08:28:34] sevenseacat: XF: not here.
[08:28:45] wasamasa: Neon: well, of course
[08:29:02] Ox0dea: Neon: https://github.com/yahoo/rtrace
[08:29:03] wasamasa: Neon: I'm currently preparing a talk for my operating systems class about syscalls and wanted to show something different from C for a change
[08:29:26] yardenbar: has joined #ruby
[08:29:26] Neon: wasamasa, have you tried using malloc and getting the pointer value and passing that?
[08:29:35] XF: sevenseacat where then?
[08:29:48] sideshowcoder: has joined #ruby
[08:29:54] sevenseacat: XF: please stop pestering me, or I'll mute you.
[08:30:13] conor_: has joined #ruby
[08:30:57] riotjones: has joined #ruby
[08:30:58] wasamasa: Neon: I've heard a similiar argument against FFI, citing that most don't support structs or pointers to them, rendering a good amount of libraries useless
[08:31:14] wasamasa: Neon: that person then argued for the module approach
[08:31:22] AndroUser: has joined #ruby
[08:32:28] DoubleMalt: has joined #ruby
[08:32:30] sheldonh: c0m0, Ox0dea thanks for helping me work through it
[08:32:38] Ox0dea: Sure thing.
[08:33:09] bright_day: has joined #ruby
[08:33:36] rdark: has joined #ruby
[08:34:10] banister: has joined #ruby
[08:34:18] livcd: in theory if i would be looking to reimplement an authentication system like Devise where should i start first ?
[08:34:44] c0m0: Maybe you can find the way to change the environ file, but I'm doing some test with a simple c program like this http://hastebin.com/gitefujune.tex
[08:34:57] c0m0: gcc -o sleep sleep.c -g
[08:35:14] mutuma: has joined #ruby
[08:35:16] c0m0: and now, gdb -q ./sleep
[08:35:16] c0m0: Reading symbols from /home/c0m0/programmin/C/sleep...(no debugging symbols found)...done
[08:35:32] Ox0dea: c0m0: https://gist.github.com/0x0dea/fe6363fccbc5e3664e06
[08:36:05] Ox0dea: Environment variable names cannot contain '=', so that little program should be sufficiently demonstrative.
[08:36:07] c0m0: sorry that was the wrong output, Reading symbols from /home/c0m0/programmin/C/sleep...done.
[08:36:07] Neon: wasamasa, oh I'm not against FFI in general. It just appeared to me as if you were to kind of reinventing the wheel with syscalls, but if you're doing it for a class it's probably pretty cool (although maybe, depending on the people you're teaching, it might more confuse them).
[08:36:31] wasamasa: Neon: haha, no
[08:36:36] c0m0: And i put a breakpoint in line 8
[08:36:36] jgt1: has joined #ruby
[08:36:49] wasamasa: Neon: this isn't for any serious programming, just to fill up 45 minutes of standing in front of my bored classmates
[08:37:33] c0m0: now I will try to change the HOME ENV, http://hastebin.com/ufufileqik.coffee
[08:37:43] Iskarlar: has joined #ruby
[08:38:08] mutuma_: has joined #ruby
[08:38:55] c0m0: Now i going to check If the variable change in environ file: result http://hastebin.com/ajabukigak.rb
[08:39:52] Hounddog: has joined #ruby
[08:40:00] volk: has joined #ruby
[08:40:02] sdwrage: has joined #ruby
[08:40:15] XF: anyone can fix my ruby scripts please only 1 error :)
[08:40:28] charliesome: has joined #ruby
[08:40:50] paradoja: has joined #ruby
[08:41:04] volk: has joined #ruby
[08:42:04] c0m0: 0x0dea: why If I use the syscall setenv nothing is begin to be changed and using the array of pointer yes?
[08:42:26] volk: has joined #ruby
[08:42:59] platzhirsch: has joined #ruby
[08:43:15] volk: has left #ruby: ()
[08:43:28] Ox0dea: c0m0: Writing into the pointer directly modifies the memory at that location.
[08:43:43] Ox0dea: Using the "proper" environment manipulators works on copies, more or less.
[08:44:24] Ox0dea: It's these copies which get passed to children, so mucking about in /proc/self/environ is both silly and largely pointless.
[08:44:57] c0m0: 0x0dea: do you have some deep documentation about that? I was asking me the same question some month ago
[08:45:15] radgeRayden: has joined #ruby
[08:45:28] Ox0dea: I suppose I could go looking for where it's spelled out explicitly, but proofs by observation are so simple. :P
[08:46:26] SolarSailor: has joined #ruby
[08:47:51] charliesome: has joined #ruby
[08:48:42] wasamasa: TLPI is a good resource for these kinds of things
[08:48:49] roolo: has joined #ruby
[08:51:25] c0m0: wasamasa: sorry for my ignorant, but what is TLPI?
[08:51:40] charliesome: has joined #ruby
[08:51:56] wasamasa: c0m0: http://www.man7.org/tlpi/
[08:52:09] Neon: Do you know of a way to use eval with partial statements? Like eval 'a.each do |i|'; eval 'puts i'; eval 'end'; so the last one actually executes the code?
[08:52:50] Ox0dea: Neon: Isn't that why you're using IRB?
[08:53:00] Neon: Ox0dea, exactly.
[08:53:36] jbw: has joined #ruby
[08:53:45] Neon: I've got to a point where it kind of works, but I'm not sure if it's stable. It's not documented well and IRB appears to be a singleton-like thing as relevant references are stored in the global IRB object.
[08:54:12] corpsicle: [k-: sorry for late answer, yea i have absolute path already, thats not helping. its wierd though, if i run from commandline it helps to put "" around the path. but when executing from pyton subprocess that doesnt seem to help
[08:55:07] Ox0dea: Neon: Aye, I think banister would've made pry piggy-back on IRB if it were sensible to do so.
[08:55:09] Neon: And now I'm looking for a cooler alternative, before I go the dirty path. I found out that eval accepts a Binding, which is kind of a context that can hold variables etc. so I can carry a state over from one eval to another, but my statements may not be complete at the time of evaluation.
[08:55:54] Ox0dea: Neon: In that case, you might consider wrapping them in begin blocks and rescuing Exception until the code doesn't raise.
[08:56:00] Ox0dea: That's a little crazy, though.
[08:56:02] Karpah: has joined #ruby
[08:56:47] sameerynho: has joined #ruby
[08:56:56] Neon: Yeah, I thought of that as well, but that path is probably not much cleaner. Also if a part contains both a partial that ends the previous statement and starts a new one it will raise an Error as well, although the first statement is complete already.
[08:57:10] dumdedum: has joined #ruby
[08:57:29] Ox0dea: Well, how would IRB help with that?
[08:57:41] Pupp3tm4st3r: has joined #ruby
[08:57:52] Ox0dea: If you complete a statement and begin a new one on the same line, the "completed" value gets discarded.
[08:58:08] charliesome: has joined #ruby
[08:58:31] DoubleMalt: has joined #ruby
[08:58:50] Neon: Ox0dea, hm, right, it waits until the second one is complete as well before execution
[08:59:19] Ox0dea: Neon: No, it'll execute the first, but the value won't be accessible.
[08:59:30] chipotle: has joined #ruby
[08:59:42] Ox0dea: Of course, any stateful effects will have been performed.
[08:59:55] Neon: Ox0dea, I don't care about return values.
[09:00:00] DoubleMalt: has joined #ruby
[09:00:10] Neon: So that's not an issue.
[09:00:30] Ox0dea: Neon: I suppose now's as good a time as any to ask you what you're trying to do.
[09:00:33] Neon: Maybe there's a sytax checker?
[09:00:42] Ox0dea: There are several.
[09:01:15] Neon: So I can make a string buffer and append my partial statements until the syntax checker says "Yup, here you go"
[09:01:36] fgo: has joined #ruby
[09:01:40] Ox0dea: Neon: ruby has a -c flag for checking syntax.
[09:01:43] marr: has joined #ruby
[09:02:02] Neon: Ox0dea, so that would mean I'd start a new ruby process for each check. :S
[09:02:14] Ox0dea: I admit, it's not the best option.
[09:03:43] Ox0dea: Neon: whitequark/parser or seattlerb/ruby_parser would obviate the need to shell out.
[09:04:02] Ox0dea: Then again, SyntaxError can be rescued. :)
[09:05:28] Neon: I just wonder why there's no easy access to the native syntax checker.
[09:06:11] Stan: has joined #ruby
[09:07:18] ferhaty: has joined #ruby
[09:07:34] suchness: has joined #ruby
[09:07:46] jeanlinux: has joined #ruby
[09:08:30] Ox0dea: Neon: It essentially works by asking Bison whether anything went wrong.
[09:08:30] Neon: Maybe I'll simply go for the SyntaxError-rescue-approach.
[09:09:22] Ox0dea: Neon: http://git.io/vsqM2
[09:10:10] Ox0dea: It's what fast_method_source does to decide what constitutes a method definition, so it's at least workable.
[09:10:57] iloverubynoob: has joined #ruby
[09:11:09] platzhirsch: has joined #ruby
[09:11:10] abdoudjanifresh: has joined #ruby
[09:11:51] chipotle: has joined #ruby
[09:12:57] bruno-: has joined #ruby
[09:13:21] elepedus: has joined #ruby
[09:16:07] Iskarlar: has joined #ruby
[09:17:22] einarj: has joined #ruby
[09:19:42] tvw: has joined #ruby
[09:19:59] conor_: has joined #ruby
[09:21:35] mikecmpbll: has joined #ruby
[09:21:45] finisherr: has joined #ruby
[09:21:46] dumdedum: has joined #ruby
[09:21:56] workmad3: has joined #ruby
[09:24:50] benlovell: has joined #ruby
[09:25:16] Timba-as: has joined #ruby
[09:25:17] Aeyrix: Yo anyone here write C# on the regular?
[09:25:21] Aeyrix: ACTION hopes.
[09:25:32] Aeyrix: paging Ox0dea because I know you do weird programming shit a lot.
[09:25:57] Ox0dea: Aeyrix: Alas, not that weird. :P
[09:25:58] hotpancakes: has joined #ruby
[09:26:09] Aeyrix: Do we have a .tell bot?
[09:26:11] Aeyrix: I think bnagy may do.
[09:26:12] `derpy: http://www.rubydoc.info/stdlib/csv/CSV#open-class_method
[09:26:44] Ox0dea: `derpy: Are you open-source?
[09:26:47] gregf_: Aeyrix: one of havenwood/canton7 maybe
[09:27:08] Aeyrix: gregf_: Good point! Thank you.
[09:27:15] canton7: ACTION waves
[09:27:19] Aeyrix: You do C#?
[09:27:31] Aeyrix: How well-versed are you?
[09:27:47] rmrrn: Aeyrix: he is the man for c# ;)
[09:27:48] canton7: depends on the area, heh. pretty good
[09:27:53] Aeyrix: Nothing serious, I just was looking to bug someone on ocassion for (probably really dumb) C# questions for a university course.
[09:27:57] Aeyrix: I have nothing to offer in return.
[09:28:05] Aeyrix: Unless you want $, I guess.
[09:28:13] Aeyrix: Not asking you to do it or anything just to clarify.
[09:28:18] Aeyrix: I just find the language very convoluted.
[09:28:36] canton7: ##csharp exists, but homework is banned
[09:28:52] canton7: (but if you're nice and don't phrase it as homework, you can often get away with it)
[09:29:29] canton7: but yeah, if I'm around, I'm happy to answer sensible questions
[09:30:32] Neon: Some learn to do C#, others just get glasses.
[09:31:05] Ox0dea: /part /r/ProgrammerHumor
[09:31:26] AndroUser: has left #ruby: ("Quit")
[09:31:44] pawnbox: has joined #ruby
[09:32:11] charliesome: has joined #ruby
[09:32:52] Aeyrix: Illegal channel name.
[09:33:01] UtkarshRay: has joined #ruby
[09:33:15] ljarvis: uh, I don't really understand the Ruby bugfix version release notes
[09:33:52] mandarinkin: has joined #ruby
[09:34:04] ljarvis: does this Rubygems issue affect everyone?
[09:35:27] livathinos: has joined #ruby
[09:36:17] pawnbox: has joined #ruby
[09:37:42] Meow-J: has joined #ruby
[09:38:20] workmad3: has joined #ruby
[09:39:39] Pupp3tm4st3r: has joined #ruby
[09:39:53] Neon: So is is possible to get a Binding that is completely isolated from the global Binding?
[09:40:38] Neon: Or, at point of creation, a clone/copy of the global Binding?
[09:41:21] Ox0dea: >> TOPLEVEL_BINDING.clone # Neon
[09:41:22] ruboto: Ox0dea # => #<Binding:0x410f0334> (https://eval.in/418681)
[09:42:20] yorickpeterse: ljarvis: if you're not on the latest version, yes
[09:42:27] yorickpeterse: but you can just `gem update --system` IIRC
[09:42:44] Neon: My test is basically: bnd = TOPLEVEL_BINDING.clone; x = 5; eval 'puts x', bnd; and I want it to puts nil.
[09:42:54] Neon: Ox0dea: and it puts 5.
[09:43:04] ljarvis: yorickpeterse: if it requires SRV validation wouldn't it only affect if you were using an untrusted source? (or someone change rubygems.org SRV)
[09:43:12] Ox0dea: Neon: I'm afraid I don't follow.
[09:43:29] yorickpeterse: ljarvis: not sure
[09:43:51] Neon: Ox0dea: Well, I'd expect x to not be defined in the context I pass to eval.
[09:44:11] Neon: So puts nil was wrong, it should raise a not defined error.
[09:44:29] Ox0dea: Oh, right. You're trying to be very tricksy.
[09:44:52] Neon: Probably clone does only a flat clone and copies references.
[09:45:26] Neon: I thought about making a subprocess and sending it to eternal sleep, then getting it's Binding somehow.
[09:45:39] ljarvis: yorickpeterse: yeah me either, vague post is vague
[09:46:55] Ox0dea: Neon: You could use a BEGIN block to grab as empty a Binding as is feasible?
[09:46:57] ljarvis: looking at the commit tells me i'll be fine without upgrading unless i'm using a custom source
[09:47:06] DEac-: has joined #ruby
[09:47:48] codecop: has joined #ruby
[09:47:50] EminenceHC: has joined #ruby
[09:47:51] codecop_: has joined #ruby
[09:48:30] Neon: Ox0dea: I don't know about BEGIN-blocks.
[09:48:32] adaedra: Ox0dea: the doc plugin is open-source, yes
[09:48:54] Neon: I just know =BEGIN and =END can be used to make ugly multi-line comments.
[09:49:02] Oog: has joined #ruby
[09:49:24] Ox0dea: Neon: BEGIN { foo } will execute before anything else, more or less.
[09:49:56] r0x0rZ: what could be a reason for not having syntax highlighting in Pry? I installed it via `gem install pry` and my user shell is ZSH with a theme (could that be aconflict?)
[09:50:53] Neon: Ox0dea: Okay, but I don't think that'd solve the problem. binding.clone doesn't seem to make a proper clone but rather create a new set of the same reference as modifying it's origin will affect the clone as well.
[09:51:04] Neon: references*
[09:51:19] sgambino: has joined #ruby
[09:51:39] jeadr: has joined #ruby
[09:51:46] Ox0dea: Neon: Ah, yeah, I derped there.
[09:51:53] Neon: Hm, i could try using a subprocess and IPC.
[09:52:31] Ox0dea: I was going to suggest that you probably just want to drive an external process a while back.
[09:52:48] ReK2: has joined #ruby
[09:52:48] ReK2: has joined #ruby
[09:53:11] Ox0dea: It seemed inappropriate given how close you seemed to have gotten with IRB.
[09:54:32] Neon: Ox0dea: I don't like the IRB solution. It's not meant to be used like that (thus may hold some surprises) and it comes with the whole formatting and prompt overhead.
[09:55:07] Neon: I'd use that if nothing else worked.
[09:55:17] Ox0dea: Neon: And it remains the case that you're interested only in side effects?
[09:56:25] DEac-: has joined #ruby
[09:56:26] Neon: Ox0dea: Not completely, but if there are statements chained with semicolons I want to have only the last output and I think eval will give that to me.
[09:56:48] CloCkWeRX: has joined #ruby
[09:58:56] Oog: has joined #ruby
[09:59:52] Pupp3tm4_: has joined #ruby
[10:00:46] Ox0dea: Neon: Open3 + irb is arguably the "right" way to do it, but shoveling into a buffer until it doesn't constitute a SyntaxError isn't as terrible as it might seem for such purposes.
[10:01:57] Macaveli: has joined #ruby
[10:03:04] fgo: has joined #ruby
[10:04:32] Neon: Ox0dea: So you think I should rather run IRB in the subprocess?
[10:05:01] Ox0dea: It's an option.
[10:05:18] ascarter: has joined #ruby
[10:06:09] mistermocha: has joined #ruby
[10:06:57] robbyoconnor: has joined #ruby
[10:07:02] Ox0dea: Neon: https://gist.github.com/0x0dea/dbcee26173872efa6a51
[10:07:21] hahuang65: has joined #ruby
[10:07:38] hotpancakes: has joined #ruby
[10:08:12] wookiehangover: has joined #ruby
[10:08:46] Shidash: has joined #ruby
[10:09:05] Neon: Ox0dea: Is it magic? ;D
[10:09:32] Ox0dea: Neon: "After all, He-Who-Must-Not-Be-Named did great things ??? terrible, yes, but great."
[10:10:11] Neon: Ox0dea: And he did it by rescuing SyntaxErrors.
[10:10:20] Ox0dea: It is known.
[10:10:59] jbw_: has joined #ruby
[10:11:15] stamina: has joined #ruby
[10:12:30] sfr^: has joined #ruby
[10:12:40] pawnbox: has joined #ruby
[10:13:00] universa1: has joined #ruby
[10:13:25] Neon: Ox0dea: And is that a minecrafty avatar you're using on GitHub?
[10:13:29] conor_: has joined #ruby
[10:13:36] BLuEGoD: has joined #ruby
[10:13:41] tonini: has joined #ruby
[10:14:06] Ox0dea: Neon: That's my face...
[10:14:59] Neon: Ox0dea: ...in Minecraft?
[10:15:13] `derpy: That's one of the default avatars
[10:15:17] rodfersou: has joined #ruby
[10:15:18] `derpy: Oops, wrong window
[10:15:24] workmad3: Neon: gravatar default avatar
[10:15:35] [k-: has joined #ruby
[10:16:20] bronson: has joined #ruby
[10:16:48] Neon: It would've been a weird Minecraft skin, but I've seen weirder.
[10:17:52] workmad3: Neon: https://en.gravatar.com/site/implement/images/ the options for default styles of gravatar are there... I wish that github was using monsterid or wavatar personally :(
[10:18:34] pawnbox: has joined #ruby
[10:18:46] maasha: has joined #ruby
[10:19:14] maasha: How do you check the if the mode of a unix file is 640 in Ruby?
[10:19:27] pawnbox_: has joined #ruby
[10:19:42] maasha: File.stat can do certains things ...
[10:21:02] adaedra: .mode & 0777 == 0640
[10:21:18] benlovell: has joined #ruby
[10:22:35] workmad3: adaedra: I don't like octal... .mode & 511 == 420 looks much nicer... right? :D
[10:22:57] ruboto: adaedra # => 416 (https://eval.in/418699)
[10:23:07] workmad3: oh right, I was checking for 0644
[10:23:15] workmad3: in my quick test ;)
[10:23:23] conor_: has joined #ruby
[10:23:25] adaedra: But it's clearer in octal!
[10:24:34] workmad3: adaedra: bah... how about hex then?
[10:24:48] workmad3: .mode & 0x1ff == 0x1a0 <-- see how nice that is :D
[10:25:10] adaedra: What about binary? Reads almost like rwxrwxrwx !
[10:25:22] workmad3: ACTION stops tormenting adaedra and goes back to crappy JS
[10:26:06] chris2: that will accept 01640 too btw, may not be what you want
[10:26:18] elepedus: has joined #ruby
[10:26:23] workmad3: adaedra: oh, you mean like `.mode & 0b111111111 == 0b110100000`
[10:26:47] adaedra: Oh wait, I don't even remember what I wrote 5 mn before -_-'
[10:27:05] chris2: if you and the higher bits away...
[10:27:17] chris2: just use ==...
[10:27:20] workmad3: adaedra: hehe :) `.mode & 0b111_111_111 == 0b111_100_100` actually doesn't look too bad!
[10:27:25] maasha: wow, rsync is stupid
[10:27:59] adaedra: workmad3: _100_000*
[10:28:05] maasha: or rather, the chmod syntax is convoluted big time
[10:28:09] workmad3: adaedra: :D
[10:28:51] devoldmx: has joined #ruby
[10:28:55] workmad3: adaedra: you missed the other error too ;)
[10:28:57] ferhaty: has joined #ruby
[10:29:54] workmad3: adaedra: still... it's pretty nice that you can actually specify bit-masks as bit-masks, rather than having to store them converted into some other representation
[10:30:25] workmad3: I'll need to remember that if I'm ever doing bit-masking again
[10:31:47] fgo: has joined #ruby
[10:32:55] qiukun: has joined #ruby
[10:34:08] ahmetkapikiran: has joined #ruby
[10:34:43] pawnbox: has joined #ruby
[10:34:46] krisquigley: has joined #ruby
[10:37:00] roolo: has joined #ruby
[10:38:28] yfeldblum: has joined #ruby
[10:38:59] fgo_: has joined #ruby
[10:41:24] yfeldblum: has joined #ruby
[10:41:49] whiteline: has joined #ruby
[10:42:32] Iskarlar: has joined #ruby
[10:43:27] maasha: anisha: hm, a file with -rw-r--r-- == 644 permissions and .mode & 0777 returns 420?
[10:43:37] ruboto: adaedra # => 420 (https://eval.in/418708)
[10:44:01] Pupp3tm4st3r: has joined #ruby
[10:44:03] adaedra: File modes are octal
[10:44:11] Ilyes512: has joined #ruby
[10:44:22] adaedra: The heading 0 is not optional
[10:50:33] Salehi: has joined #ruby
[10:54:36] _blizzy_: has joined #ruby
[10:56:02] nettoweb: has joined #ruby
[10:56:42] jeadr: has joined #ruby
[10:57:52] volk: has joined #ruby
[10:58:10] Macaveli: has joined #ruby
[10:59:51] psye: has joined #ruby
[11:01:45] arup_r: has joined #ruby
[11:03:00] Rubie: has joined #ruby
[11:05:12] Oog: has joined #ruby
[11:07:17] tkuchiki: has joined #ruby
[11:07:59] Pupp3tm4st3r: has joined #ruby
[11:09:30] jgt1: has joined #ruby
[11:10:03] pawnbox: has joined #ruby
[11:10:09] hotpancakes: has joined #ruby
[11:10:26] sdothum: has joined #ruby
[11:10:28] kt2: has joined #ruby
[11:10:30] phutchins: has joined #ruby
[11:10:58] benlovell: has joined #ruby
[11:13:13] kt2: has joined #ruby
[11:15:58] lxsameer_: has joined #ruby
[11:17:06] r0x0rZ: has joined #ruby
[11:18:01] User458764: has joined #ruby
[11:18:59] greg: has joined #ruby
[11:19:08] leafybasil: has joined #ruby
[11:20:38] Pupp3tm4st3r: has joined #ruby
[11:23:21] bruno-: has joined #ruby
[11:23:29] pawnbox: has joined #ruby
[11:24:04] SenpaiSilver: has joined #ruby
[11:24:57] dgutierrez1287: has joined #ruby
[11:26:52] conor_: has joined #ruby
[11:27:06] msnyon: has joined #ruby
[11:27:11] nuttermb: has joined #ruby
[11:33:07] gnarf: has joined #ruby
[11:33:09] voker57: has joined #ruby
[11:37:37] Cust0sLim3n: has joined #ruby
[11:38:42] Iskarlar: has joined #ruby
[11:40:45] shay-: has left #ruby: ()
[11:41:49] AlxAltea: has joined #ruby
[11:42:13] patrick_star: has joined #ruby
[11:44:14] pawnbox: has joined #ruby
[11:44:19] bruno-: has joined #ruby
[11:45:21] iloverubynoob: has joined #ruby
[11:46:46] iloverub_: has joined #ruby
[11:47:24] tkuchiki: has joined #ruby
[11:49:10] IceyEC: has joined #ruby
[11:49:10] psye: has joined #ruby
[11:49:37] pawnbox: has joined #ruby
[11:49:57] charliesome: has joined #ruby
[11:51:47] Coldblackice: has joined #ruby
[11:52:49] charliesome: has joined #ruby
[11:55:28] vdamewood: has joined #ruby
[11:57:38] iamninja: has joined #ruby
[11:58:07] pawnbox: has joined #ruby
[11:59:09] but3k4: has joined #ruby
[11:59:42] Pwnna: has joined #ruby
[12:01:36] conor_: has joined #ruby
[12:02:33] rideh: has joined #ruby
[12:04:05] frozen3: has joined #ruby
[12:04:35] platzhirsch: has joined #ruby
[12:05:37] platzhirsch: has joined #ruby
[12:07:24] tkuchiki: has joined #ruby
[12:07:38] blackjid: has joined #ruby
[12:07:47] lele: has joined #ruby
[12:08:12] bayed: has joined #ruby
[12:08:40] hotpancakes: has joined #ruby
[12:10:11] mistermocha: has joined #ruby
[12:11:08] blackjid: has joined #ruby
[12:11:24] absolutejam: has joined #ruby
[12:11:29] sameerynho: has joined #ruby
[12:11:40] tvw: has joined #ruby
[12:12:08] rodfersou: has joined #ruby
[12:13:09] amystephen: has joined #ruby
[12:14:40] blackjid: has joined #ruby
[12:15:27] tmtwd: has joined #ruby
[12:16:54] volk: has joined #ruby
[12:17:14] bronson: has joined #ruby
[12:17:24] dhjondoh: has joined #ruby
[12:17:40] ldnunes: has joined #ruby
[12:17:41] pawnbox: has joined #ruby
[12:18:17] RegulationD: has joined #ruby
[12:19:38] dimasg: has joined #ruby
[12:21:35] s00pcan: has joined #ruby
[12:23:53] pawnbox: has joined #ruby
[12:23:54] renderful: has joined #ruby
[12:24:36] lxsameer_: has joined #ruby
[12:24:51] shevy: good morning ruby
[12:25:05] roolo: has joined #ruby
[12:25:21] [k-: ?ugt shevy
[12:25:22] ruboto: shevy, it's morning, see http://www.total-knowledge.com/~ilya/mips/ugt.html
[12:25:34] diegoaguilar: has joined #ruby
[12:26:55] Pupp3tm4st3r: has joined #ruby
[12:29:00] conor_: has joined #ruby
[12:29:34] devoldmx: has joined #ruby
[12:30:58] Tempesta: has joined #ruby
[12:31:10] leafybasil: has joined #ruby
[12:32:19] krisquigley: has joined #ruby
[12:32:20] dstarh: has joined #ruby
[12:33:05] Cust0sLim3n: has joined #ruby
[12:33:05] linuxboytoo: has joined #ruby
[12:35:14] R1ck: has joined #ruby
[12:35:39] lannonbr: has joined #ruby
[12:36:22] R1ck: hi. when running rake db:migratie, I get a lot of warnings like "rake.rb:24: warning: already initialized constant Rake::VERSION" and eventually "rake aborted! SystemStackError: stack level too deep" - whats the cause of this?
[12:36:22] chinmay_dd: has joined #ruby
[12:37:54] apeiros: R1ck: the two are unrelated. one means that you redefine a constant, the other that you do something recursively and have too many recursions.
[12:40:22] apeiros: (though, of course, the recursion could include the code which redefines the constant - so they could be related in that way)
[12:41:19] R1ck: well.. one thing at a time.. I have an app in the directory "app" - how can I test if this app runs at all?
[12:42:20] atomical: has joined #ruby
[12:42:25] apeiros: well, rails channel is #rubyonrails
[12:42:32] R1ck: oh, thanks
[12:43:52] R1ck: it looks like there are two rake gems, one installed at /usr/local/lib/ruby/... and one in the application directory vendor/bundle
[12:44:03] ahmetkapikiran: has joined #ruby
[12:45:27] sarkyniin: has joined #ruby
[12:46:27] Iskarlar: has joined #ruby
[12:47:55] blue_deref: has joined #ruby
[12:48:44] lxsameer: has joined #ruby
[12:48:46] lxsameer: has joined #ruby
[12:48:53] Kallis: has joined #ruby
[12:51:27] jeanlinux: has joined #ruby
[12:51:44] Rubie: has joined #ruby
[12:52:25] Thermatix: has joined #ruby
[12:53:54] banister: has joined #ruby
[12:53:57] jeremy04: has joined #ruby
[12:54:28] nuttermb: has joined #ruby
[12:56:18] sdwrage: has joined #ruby
[12:56:26] rbennacer: has joined #ruby
[12:57:21] Pwnna: has left #ruby: ("Leaving")
[12:57:52] sanguisdex: has joined #ruby
[12:58:22] pawnbox: has joined #ruby
[12:59:11] CloCkWeRX: has joined #ruby
[13:00:11] havenwood: has joined #ruby
[13:00:53] terlar: has joined #ruby
[13:01:16] bmurt: has joined #ruby
[13:02:38] rbennacer: has joined #ruby
[13:03:09] jtdoncas: has joined #ruby
[13:03:45] victortyau: has joined #ruby
[13:04:20] shevy: does a typical .json file have a trailing \n? I just generated a .json via ruby ...
[13:04:48] [k-: like all files
[13:05:16] Psi-Jack: Not needed.
[13:08:06] sarkyniin: has joined #ruby
[13:08:16] Pupp3tm4st3r: has joined #ruby
[13:09:09] hotpancakes: has joined #ruby
[13:10:39] krz: has joined #ruby
[13:10:45] jgt1: has joined #ruby
[13:10:56] Torrieri: has joined #ruby
[13:10:56] Torrieri: has joined #ruby
[13:11:31] sepp2k: has joined #ruby
[13:11:56] unver: has joined #ruby
[13:12:14] chicken_wangs: has left #ruby: ("Leaving")
[13:13:06] northfurr: has joined #ruby
[13:13:17] joonty: has joined #ruby
[13:13:21] bnizzle: has joined #ruby
[13:13:56] gamename: has joined #ruby
[13:14:11] ItSANgo: has joined #ruby
[13:14:13] mistermocha: has joined #ruby
[13:16:29] tonios57: has joined #ruby
[13:16:52] dhjondoh: has joined #ruby
[13:18:08] Cust0sLim3n: has joined #ruby
[13:19:09] ljarvis: bleh, i need some kind of Hash#verified_merge
[13:19:20] malconis: has joined #ruby
[13:19:50] [k-: verified_merge?
[13:20:41] ljarvis: safe_merge might be a better name, although less obvious
[13:20:55] M-mistake: has joined #ruby
[13:20:55] M-prosodyContext: has joined #ruby
[13:20:57] [k-: safe_merge?
[13:21:33] [k-: merge already provides ways to address conflicts?
[13:21:33] dblessing: has joined #ruby
[13:21:34] jhass: neither seems obvious :P
[13:22:13] hinbody: has joined #ruby
[13:22:35] droidburgundy: has joined #ruby
[13:23:01] ljarvis: heh, having "verified" in the name means the keys are known/verified.. thus more obvious than "safe"
[13:23:20] whippythellama: has joined #ruby
[13:23:22] Kedare: has joined #ruby
[13:23:30] freerobby: has joined #ruby
[13:23:32] ljarvis: but yes it was just an example
[13:23:34] jhass: I have no idea what a "verified key" would be
[13:23:41] dhjondoh: has joined #ruby
[13:23:58] [k-: has_only_these_keys
[13:24:09] ljarvis: and key that is verified? seriously? :|
[13:24:29] [k-: WHAT IS A KEY THAT IS VERIFIED GODDAMNIT
[13:24:51] dstarh: has joined #ruby
[13:25:10] [k-: that seems like an awful move on my paet
[13:25:19] dhjondoh: has joined #ruby
[13:25:29] jhass: ACTION puts [k- in a pink room
[13:26:25] tobiasvl: ljarvis: what functionality are you looking for?
[13:27:26] ljarvis: tobiasvl: I spotted a bug where keys are not being overwritten, so for a.merge(b) i'd prefer to verify that keys in b exist in a (hence looking for a better method name)
[13:27:44] ljarvis: (not replace)
[13:27:44] XF: anyone here knows about znc?
[13:28:03] ljarvis: ?anyone XF
[13:28:03] ruboto: XF, Just ask your question, if anyone has or can, they will respond.
[13:28:19] ljarvis: XF: that's not Ruby related (if you're talking about the irc bouncer)
[13:28:37] ljarvis: please take non Ruby discussion to #ruby-offtopic or look for the znc channel
[13:28:56] knrz: has joined #ruby
[13:29:20] [k-: b.keys & a.keys == b.keys.size?
[13:30:01] [k-: your first description was completely off
[13:30:04] ljarvis: I know how to write the code anyway, I was just making a comment
[13:30:44] fgo_: has joined #ruby
[13:30:48] [k-: we dont need a verified_merge if merge does its job properly
[13:30:51] jhass: mmh, if Hash#update weren't an alias already...
[13:31:04] ljarvis: [k-: please stop
[13:31:12] ljarvis: jhass: right
[13:31:45] jeremy04: has joined #ruby
[13:32:33] juanpaucar: has joined #ruby
[13:32:35] Ropeney: has joined #ruby
[13:32:40] ljarvis: a.fetch(key) && b[key] = value is fair enough
[13:32:57] ljarvis: er other way around
[13:33:08] bronson: has joined #ruby
[13:33:29] jhass: a[key] = value if a.has_key? key ?
[13:34:02] ljarvis: yeah works well enough
[13:34:06] jerius: has joined #ruby
[13:34:16] kitfox: has joined #ruby
[13:34:23] [k-: so, you want to merge keys that are only present in the original hash
[13:34:58] [k-: people in production ;-; i dont get you
[13:36:10] ljarvis: ACTION redefines Hash#update and waits to get fired
[13:36:35] socialjackie: has joined #ruby
[13:37:15] jhass: in rails: a.merge(b.slice(*a.keys))
[13:38:13] ljarvis: to be honest, i just added a spec and forgot about it, but it's worth considering where else it might have caught me
[13:38:50] timonv: has joined #ruby
[13:39:41] [k-: a.keys.zip(b.values_at(*a.keys)) maybe?
[13:39:59] [k-: oh god im horrible
[13:40:16] nettoweb: has joined #ruby
[13:41:08] amystephen: has joined #ruby
[13:41:35] [k-: might as well use select, which is more expressive, but its O(n)
[13:44:23] casadei: has joined #ruby
[13:44:57] neohunter: has joined #ruby
[13:45:11] pawnbox: has joined #ruby
[13:45:46] ahmetkapikiran: has joined #ruby
[13:46:20] Ropeney: has joined #ruby
[13:49:08] cashnguns: has joined #ruby
[13:49:11] cash_n_guns: has joined #ruby
[13:49:25] Iskarlar: has joined #ruby
[13:49:53] northfurr: has joined #ruby
[13:50:14] patrick_star: has joined #ruby
[13:50:15] nofxx: has joined #ruby
[13:50:34] CloCkWeRX: has joined #ruby
[13:52:13] d10n-work: has joined #ruby
[13:52:18] Rubie: has joined #ruby
[13:53:44] hotpancakes: has joined #ruby
[13:54:29] Ropeney: has joined #ruby
[13:54:41] pawnbox: has joined #ruby
[13:56:46] bigbadbear: has joined #ruby
[13:58:10] iCyb3r: has joined #ruby
[13:58:18] podman: has joined #ruby
[13:58:34] AlxAltea: has joined #ruby
[13:59:04] fibbel: has joined #ruby
[13:59:31] iCyb3r: http://g88k.blogspot.com/2015/08/blog-post_63.html
[14:00:10] iCyb3r: http://g88k.blogspot.com/2015/03/blog-post_5.html
[14:00:24] ruboto: apeiros, fflush, banisterfiend, seanstickle, Mon_Ouie, zzak, Radar, jhass, Havenn, sevenseacat, miah, workmad3, Coraline, drbrain, rubyhacker1, slyphon, zenspider, Aria, ljarvis
[14:00:26] havenwood: !mute iCyb3r
[14:00:26] ruboto: +q iCyb3r!*@*
[14:00:27] ruboto: -o ruboto
[14:00:29] icharlie: has joined #ruby
[14:00:39] adaedra: thanks, havenwood
[14:01:43] iCyb3r: has left #ruby: ()
[14:01:46] [k-: could havenwood have responded in just 2 seconds?
[14:02:11] adaedra: look in the !ops line, no havenwood
[14:02:20] pipework: [k-: More likely that he saw the same thing that in the history
[14:02:26] pipework: s/history/scroll/
[14:02:27] ItSANgo_: has joined #ruby
[14:02:27] ItSANgo: has joined #ruby
[14:02:39] [k-: havenwood is havenn :(
[14:02:48] havenwood: adaedra: I do get pinged for havenn. ;)
[14:02:54] jhass: yeah, apeiros still didn't deploy my fix
[14:03:00] adaedra: havenwood: oh ok.
[14:03:09] adaedra: jhass: apeiros deploy things? :p
[14:03:41] rbennacer: has joined #ruby
[14:03:44] havenwood: pipework: spied you in #elixir :D
[14:03:47] [k-: patent pending
[14:03:53] pipework: havenwood: Please forgive me!
[14:03:56] adaedra: ACTION patents [k- 
[14:03:57] jhass: havenwood: btw http://paste.mrzyx.de/pwulwqauk/rf2dto/raw getting a CentOS 6 chroot was the hardest part :P
[14:04:09] havenwood: jhass: ahahaha
[14:04:20] adaedra: lxc-create -t download -n centos6
[14:04:23] adaedra: select centos6
[14:04:37] pipework: You lost me at centos6
[14:04:46] arup_r: has joined #ruby
[14:04:46] paulcsmith_: has joined #ruby
[14:05:00] Macaveli: has joined #ruby
[14:05:29] jhass: I ended up downloaded the qcow2 cloud image, mounting it and copy stuff out
[14:05:34] JoshL: has joined #ruby
[14:05:51] pipework: centos\d* really
[14:05:54] jhass: because the yum version in the AUR is too new obviously
[14:06:39] jhass: adaedra: meh, lxc has too much config file
[14:07:03] jhass: systemd-nspawn has none, can hardly beat that :P
[14:07:18] blackjid: has joined #ruby
[14:07:26] adaedra: I got a working setup with one line to edit so it uses libvirt's bridge, then I let the templates do it for me
[14:07:43] adaedra: Only problem I had is that centos7 template uses settings from centos6 which makes it unusable
[14:09:05] rbennacer: has joined #ruby
[14:09:19] gard: has joined #ruby
[14:09:22] davedev24: has joined #ruby
[14:09:59] lannonbr: has joined #ruby
[14:10:05] jtdoncas: has joined #ruby
[14:10:47] rbennacer: has joined #ruby
[14:11:24] choke: has joined #ruby
[14:11:45] ckinniburgh: has joined #ruby
[14:12:12] rbennacer: has joined #ruby
[14:13:09] moss: has joined #ruby
[14:13:14] roolo: has joined #ruby
[14:13:15] shmilan: has joined #ruby
[14:13:25] xhosae: has joined #ruby
[14:15:18] jeanlinux: has joined #ruby
[14:15:34] benlovell: has joined #ruby
[14:16:56] jordanm: has joined #ruby
[14:17:59] banister: has joined #ruby
[14:18:28] melter: has joined #ruby
[14:20:29] mistermocha: has joined #ruby
[14:20:57] jerius: has joined #ruby
[14:22:30] atmosx: has joined #ruby
[14:22:58] qwertme: has joined #ruby
[14:23:18] fgo_: has joined #ruby
[14:23:58] jimms: has joined #ruby
[14:25:11] juanpaucar: has joined #ruby
[14:25:15] Illusioneer: has joined #ruby
[14:25:51] freerobby: has joined #ruby
[14:25:54] mrj: has joined #ruby
[14:26:41] mrj: has joined #ruby
[14:26:41] mrj: has joined #ruby
[14:27:46] marsjaninzmarsa: has joined #ruby
[14:27:53] ips|malc: has joined #ruby
[14:28:03] mrj: has joined #ruby
[14:28:03] mrj: has joined #ruby
[14:28:11] chuy: has joined #ruby
[14:28:16] joonty: has joined #ruby
[14:28:43] iamninja: has joined #ruby
[14:28:53] platzhirsch: has joined #ruby
[14:28:58] Spami: has joined #ruby
[14:28:58] mrj: has joined #ruby
[14:28:58] mrj: has joined #ruby
[14:29:14] R1ck: has left #ruby: ()
[14:29:22] hotpancakes: has joined #ruby
[14:30:08] dopamean_: has joined #ruby
[14:30:19] devoldmx: has joined #ruby
[14:30:39] Guest683: has joined #ruby
[14:30:43] mrj: has joined #ruby
[14:31:35] Rubie: has joined #ruby
[14:33:01] devdazed: has joined #ruby
[14:33:10] gamename: has joined #ruby
[14:34:26] qwertme: has joined #ruby
[14:34:55] rideh: has joined #ruby
[14:35:07] kies: has joined #ruby
[14:35:10] shevy: ewww systemd
[14:36:00] The_Phoenix: has joined #ruby
[14:36:45] adaedra: what, systemd
[14:37:12] freerobby: has joined #ruby
[14:37:46] Chau: has joined #ruby
[14:39:30] Guest683: has joined #ruby
[14:39:34] mrj: has joined #ruby
[14:39:36] dopie: has joined #ruby
[14:39:56] tvw: has joined #ruby
[14:43:00] EminenceHC: has joined #ruby
[14:43:17] user1138_: has joined #ruby
[14:44:10] Ariadeno: has joined #ruby
[14:44:58] jcutrell: has joined #ruby
[14:45:59] timonv: has joined #ruby
[14:47:30] fgo: has joined #ruby
[14:49:07] skade: has joined #ruby
[14:49:34] platzhirsch: has joined #ruby
[14:50:59] diegoviola: has joined #ruby
[14:51:01] hmsimha_: has joined #ruby
[14:52:28] kellray: has joined #ruby
[14:52:54] casadei: has joined #ruby
[14:53:00] fedexo: has joined #ruby
[14:53:05] RegulationD: has joined #ruby
[14:53:05] kellray: has left #ruby: ()
[14:53:12] pawnbox: has joined #ruby
[14:53:37] nscheurich: has joined #ruby
[14:54:25] choke: has joined #ruby
[14:56:42] northfurr: has joined #ruby
[14:57:58] bruno-: has joined #ruby
[14:58:58] xhosae_: has joined #ruby
[14:59:14] mary5030: has joined #ruby
[14:59:17] nettoweb: has joined #ruby
[15:00:01] jpfuentes2: has joined #ruby
[15:01:10] nofxx: ??? I win
[15:01:12] paulcsmith_: has joined #ruby
[15:01:31] nofxx: there;s dominoes in utf8... did you know? =D heh
[15:01:45] kitfox: has joined #ruby
[15:01:50] kitfox: has left #ruby: ()
[15:01:53] mary5030: has joined #ruby
[15:01:55] shevy: there is a lot of useful stuff
[15:01:57] shevy: like the snowman
[15:02:05] tkuchiki: has joined #ruby
[15:02:05] shevy: you can build whole games with utf8
[15:02:13] `derpy: ACTION rolls a dice??? got 3. Total: 3
[15:02:17] nofxx: ???? shevy I win again
[15:02:32] adaedra: ACTION ponders putting unicode dice into the dice plugin
[15:02:33] nofxx: adaedra, hey, let's utf8 that bot
[15:02:53] adaedra: nofxx: It only works for 6-faced dice
[15:03:04] nofxx: shevy, very true. There's also whole chess
[15:03:22] adaedra: shevy: you finally accepted unicode?
[15:03:30] nofxx: adaedra, yup, only up to 6 I see here
[15:03:31] chouhoul_: has joined #ruby
[15:03:36] nofxx: no RPG for you
[15:03:47] hotpancakes: has joined #ruby
[15:05:32] adaedra: funny nofxx, your second "I win" does not display on the logs
[15:05:44] nofxx: haha, ok this is the best utf8 char ever: ???? can almost hear motorhead playing
[15:06:02] nofxx: adaedra, ahh..dominoes might be more exotic.. how about the card?
[15:06:13] adaedra: cut the message too
[15:06:15] shevy: adaedra accepted? what do you mean
[15:07:24] xhosae: has joined #ruby
[15:09:40] skade: has joined #ruby
[15:10:09] malconis: has joined #ruby
[15:10:40] cschneid_: has joined #ruby
[15:11:31] jgt1: has joined #ruby
[15:11:39] tvw: has joined #ruby
[15:12:23] iloverubynoob: has joined #ruby
[15:12:29] r0x0rZ: has joined #ruby
[15:12:36] flegercovateam: has joined #ruby
[15:13:00] bluOxigen: has joined #ruby
[15:13:22] erts: has joined #ruby
[15:14:29] ndrei: has joined #ruby
[15:14:50] michaeldeol: has joined #ruby
[15:16:13] jtdoncas: has joined #ruby
[15:16:50] paulcsmith_: has joined #ruby
[15:16:51] michaeldeol: has joined #ruby
[15:17:54] tkuchiki: has joined #ruby
[15:18:12] foureight84_____: has joined #ruby
[15:18:33] dgutierrez1287: has joined #ruby
[15:19:32] socialjackie: has joined #ruby
[15:19:35] jeadr: has joined #ruby
[15:20:05] Torrieri: has joined #ruby
[15:20:05] Torrieri: has joined #ruby
[15:20:59] ndrei: has joined #ruby
[15:22:59] mistermocha: has joined #ruby
[15:24:06] r0x0rZ: how can I access first numeral of any Fixnum number? let's say I have 25 and I want to know what the first digit is.
[15:24:27] haxrbyte: has joined #ruby
[15:24:59] ta: has joined #ruby
[15:25:04] [k-: 25.to_s[0].to_i
[15:25:39] r0x0rZ: [k-: was hoping there's a Fixnum method for that but this will work too
[15:25:57] terlar: has joined #ruby
[15:25:57] luksaur: has joined #ruby
[15:25:59] r0x0rZ: [k-: is there something like 25.length?
[15:26:19] [k-: or, a = 25; while a > 10; a /= 10.0; end; a.floor
[15:26:27] hoov: has joined #ruby
[15:26:35] clarkenciel: has joined #ruby
[15:26:47] [k-: r0x0rZ: no such thing unfortunately
[15:26:59] _blizzy_: has joined #ruby
[15:27:49] [k-: https://github.com/forgecrafted/finishing_moves/wiki/Numeric#integerlength
[15:28:31] dimasg: has joined #ruby
[15:29:11] rbennacer: has joined #ruby
[15:29:42] [k-: https://github.com/forgecrafted/finishing_moves/blob/master/lib/finishing_moves/numeric.rb#L19-L21
[15:30:04] jgt1: has joined #ruby
[15:30:11] [k-: clever people
[15:30:23] ndrei: has joined #ruby
[15:30:43] xhosae_: has joined #ruby
[15:30:45] tkuchiki: has joined #ruby
[15:31:16] DoubleMalt: has joined #ruby
[15:31:44] melter_: has joined #ruby
[15:32:08] qwertme_: has joined #ruby
[15:32:29] melter: has joined #ruby
[15:32:46] techsethi: has joined #ruby
[15:33:16] hobodave: has joined #ruby
[15:34:05] bronson: has joined #ruby
[15:35:14] _blizzy_: has joined #ruby
[15:35:25] hobodave: has joined #ruby
[15:36:58] xhosae: has joined #ruby
[15:37:03] jiada: has joined #ruby
[15:37:40] rehat: has joined #ruby
[15:38:20] mwlang: has joined #ruby
[15:38:33] EagleDelta: has joined #ruby
[15:39:10] Cache_Money: has joined #ruby
[15:40:27] [k-: did he quit before he saw the links? D:
[15:41:16] Motoservo: has joined #ruby
[15:42:23] [k-: i wonder how __LINE__ is used by people
[15:42:39] skade: has joined #ruby
[15:42:53] hotpancakes: has joined #ruby
[15:42:54] cashnguns: does anyone have experience converting application/msword; charset=binary files to ASCII in ruby ?
[15:42:59] erts: has joined #ruby
[15:43:17] Maletor: has joined #ruby
[15:43:54] Rubie: has joined #ruby
[15:43:54] AlexRussia_: has joined #ruby
[15:45:45] blue_deref: has joined #ruby
[15:46:08] benlieb: has joined #ruby
[15:48:53] DoubleMalt: has joined #ruby
[15:48:56] luckyruby: has joined #ruby
[15:49:07] r0x0rZ: has joined #ruby
[15:49:33] adaedra: you need a library that can read msword documents
[15:50:51] dfockler: has joined #ruby
[15:51:24] XF: has joined #ruby
[15:51:24] renderful: has joined #ruby
[15:53:08] XF: has joined #ruby
[15:53:35] cashnguns: does that mean I can't do it on linux?
[15:53:48] Violentr: has joined #ruby
[15:56:14] dman777_alter: has joined #ruby
[15:57:04] cashnguns: okay, so I saved it as an rtf seems fine
[15:57:10] chouhoulis: has joined #ruby
[15:58:43] dimasg: has joined #ruby
[15:59:00] momomomomo: has joined #ruby
[15:59:14] ellisTAA: has joined #ruby
[15:59:27] dman777_alter: is there a way to detect between json object and json string?
[15:59:32] ellisTAA: what???s the name of the off topic ruby channel?
[16:00:31] adaedra: ?ot EllisTAA
[16:00:31] ruboto: EllisTAA, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[16:00:34] towski_: has joined #ruby
[16:00:34] shevy: dman777_alter isn't a json string just a '' string in ruby?
[16:00:39] Torrieri: has joined #ruby
[16:00:52] amclain: has joined #ruby
[16:01:17] centrx: has joined #ruby
[16:01:20] [k-: if JSON.parse gives you some sort of reasonable looking thing, it is a JSON String
[16:01:21] adaedra: dman777_alter: a JSON string is a string, of class String. Decoded, it can be anything.
[16:01:24] roolo: has joined #ruby
[16:01:26] [k-: huehuehue
[16:03:10] r0x0rZ: has joined #ruby
[16:03:43] djhal3: has joined #ruby
[16:03:52] sdothum: has joined #ruby
[16:04:35] fibbel: has joined #ruby
[16:05:08] ruby-lang373: has joined #ruby
[16:05:23] chinmay_dd: has joined #ruby
[16:05:24] flegercovateam: has left #ruby: ()
[16:09:28] saddad: has joined #ruby
[16:09:51] RobertBirnie: has joined #ruby
[16:10:39] nux443: has joined #ruby
[16:11:01] chinmay_dd: has joined #ruby
[16:11:04] momomomomo: has joined #ruby
[16:11:42] jpfuentes2: has joined #ruby
[16:12:13] dman777_alter: man... I have body = { 'template' => attributes }.to_json but when I puts body it's a string {"template":"{\"content\": \"aaa\", \"type\": \"adx_running\", \"name\": \"n2\", \"user\": \"Admin Test\"}"}
[16:13:00] [k-: of course its a string
[16:13:26] Maletor: has joined #ruby
[16:14:12] shevy: it must be a string
[16:14:33] shevy: { 'template' => :attributes }.to_json.class # => String
[16:14:35] jeadr: has joined #ruby
[16:14:52] [k-: json is text
[16:14:58] [k-: so it is a string
[16:15:03] malconis: has joined #ruby
[16:15:33] shevy: dman777_alter you can use JSON# related activities such as JSON.parse() ruby-doc.org/stdlib-2.0.0/libdoc/json/rdoc/JSON.html
[16:15:58] malconis: has joined #ruby
[16:16:03] shevy: btw why did they not use yaml?
[16:16:24] dman777_alter: the recieving server of the json is complaining (undefined method `each_pair' for #<String:0x007f54d246cb10>) so I'm not sure why it's not converting it to a ruby hash
[16:16:30] [k-: you dont transmit yml over the internets
[16:16:57] [k-: Hash#to_json -> String
[16:17:07] [k-: JSON.parse -> Hash
[16:17:28] [k-: this is how it works
[16:17:57] skade: has joined #ruby
[16:18:08] shevy: we even transmit xml over the internets! and cats
[16:18:10] [k-: JSON is natively represented as a Hash in Ruby
[16:18:14] dman777_alter: it will convert {"template":{"name":"foo,"content":"apple","user":"Admin Test"}} to a hash with no issues. but not {"template":"{\"content\": \"aaa\".....
[16:18:43] [k-: you have to unescape the string first
[16:18:53] zekriad: has joined #ruby
[16:19:14] dman777_alter: both were using body = { 'template' => attributes }.to_json
[16:20:05] bricker: has joined #ruby
[16:20:07] Oka: has joined #ruby
[16:20:11] [k-: note: "{\"content is a string, not a hash
[16:20:22] sinkensabe: has joined #ruby
[16:20:30] lannonbr: has joined #ruby
[16:20:40] dman777_alter: but {"template":{"name":"foo,"content":"apple","user":"Admin Test"}} is a string also, correct? since it also came from body = { 'template' => attributes }.to_json
[16:21:55] [k-: >> {"template":{"name":"foo,"content":"apple","user":"Admin Test"}}
[16:21:56] [Butch]: has joined #ruby
[16:21:56] ruboto: [k- # => /tmp/execpad-37c00334b5a9/source-37c00334b5a9:2: syntax error, unexpected tIDENTIFIER, expecting '}' ...check link for more (https://eval.in/419072)
[16:21:59] haylon: has joined #ruby
[16:22:03] Hanmac: has joined #ruby
[16:22:30] haylon: Has anyone here successfully setup Razor server without using Puppet? I'm not getting much of a response in the #puppet-razor channel
[16:22:39] [k-: should have parsed correctly :/
[16:22:49] mleung: has joined #ruby
[16:23:00] [k-: oh i see the mistake
[16:23:10] [k-: >> {"template":{"name":"foo","content":"apple","user":"Admin Test"}}
[16:23:11] ruboto: [k- # => {:template=>{:name=>"foo", :content=>"apple", :user=>"Admin Test"}} (https://eval.in/419073)
[16:23:18] [k-: this, is a hash
[16:23:46] [k-: >> require "json"; {"template":{"name":"foo","content":"apple","user":"Admin Test"}}.to_json
[16:23:47] ruboto: [k- # => "{\"template\":{\"name\":\"foo\",\"content\":\"apple\",\"user\":\"Admin Test\"}}" (https://eval.in/419074)
[16:23:51] [k-: this is a string
[16:24:16] [k-: If you pass this to json.parse, it will work
[16:24:31] skade: has joined #ruby
[16:24:41] Musashi007: has joined #ruby
[16:24:44] kellray_: has joined #ruby
[16:25:03] jimms: has joined #ruby
[16:25:46] dman777_alter: [k-: thanks! I see now
[16:27:16] mistermocha: has joined #ruby
[16:29:24] hotpancakes: has joined #ruby
[16:29:56] chinmay_dd_: has joined #ruby
[16:30:27] rideh: has joined #ruby
[16:31:05] devoldmx: has joined #ruby
[16:31:37] shevy: [k- is the man
[16:32:02] that1guy: has joined #ruby
[16:32:44] hinbody: has joined #ruby
[16:33:10] ivanskie: has joined #ruby
[16:33:57] dojobo: has joined #ruby
[16:33:58] ivanskie: anyone know if this is any standard, or an easy way to parse this time stamp? "13:46:35.143 PDT Tue May 12 2015"
[16:35:04] bronson: has joined #ruby
[16:35:32] shevy: hmm odd format
[16:35:41] ivanskie: its from a cisco cdr file
[16:35:46] shevy: Time.parse "13:46:35.143 PDT Tue May 12 2015" # => 2015-05-12 13:46:35 -0700
[16:35:48] ivanskie: i've tried time and datetime..
[16:35:48] shevy: is that right?
[16:36:22] ivanskie: ya if only that worked..
[16:36:40] shevy: what does not work
[16:36:55] ivanskie: Time.parse "13:46:35.143 PDT Tue May 12 2015"
[16:36:57] ivanskie: this doesnt
[16:37:04] jhass: >> require "time"; Time.strptime("13:46:35.143 PDT Tue May 12 2015", "%H:%M:%S.%N %Z %a %B %d %Y")
[16:37:05] ruboto: jhass # => 2015-05-12 13:46:35 -0700 (https://eval.in/419076)
[16:37:32] devdazed: has joined #ruby
[16:38:09] shevy: ivanskie weird, my above line was copy pasted directly from irb
[16:39:19] ivanskie: forgot the format
[16:40:01] sarkyniin: has joined #ruby
[16:40:07] ivanskie: of course would help to change chruby to correct 2.2.2 also
[16:41:03] episage: has joined #ruby
[16:41:37] techsethi: has joined #ruby
[16:41:39] jacaballero: has joined #ruby
[16:41:48] benlieb: has joined #ruby
[16:42:01] ahmetkapikiran: has joined #ruby
[16:42:10] shevy: you can even upgrade to 2.2.3 now
[16:42:12] shevy: ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux] \o/
[16:42:44] jtdoncas: has joined #ruby
[16:43:31] havenwood: ivanskie: ruby-install ruby 2.2.3 --sha256 c745cb98b29127d7f19f1bf9e0a63c384736f4d303b83c4f4bda3c2ee3c5e41f
[16:43:42] ivanskie: interesting, now some of the cells are nil, i tried doing the Time.strp.... || " ".. but realized that wont negate the fact that Time still tries to parse a nil column..
[16:44:11] ivanskie: i'm trying to parse a csv file full of cdr, call detail record..
[16:44:26] ivanskie: i can't really pass an empty string to Time either can I/
[16:44:57] ivanskie: documentation where are thou
[16:45:09] [k-: false && (not parsed); false || (parsed)
[16:45:16] riotjones: has joined #ruby
[16:45:30] fgo: has joined #ruby
[16:45:44] mary5030: has joined #ruby
[16:45:51] jhass: time = Time.strptime(...) unless time.empty?
[16:45:56] ledestin: has joined #ruby
[16:46:12] Axsuul: has joined #ruby
[16:47:07] ivanskie: i see what u
[16:47:37] pietr0: has joined #ruby
[16:48:39] EminenceHC: has joined #ruby
[16:48:40] shevy: why do you mix english and german
[16:48:45] [k-: true && (parsed); true || (not parsed)
[16:48:48] shevy: this will totally verwirren jhass
[16:48:58] ivanskie: i don't actually speak german lol
[16:49:03] jhass: don't && / || for control flow
[16:49:05] ivanskie: just like to say nein sometimes
[16:49:33] adaedra: nein, nein, nein, nein, NEIN!
[16:49:37] [k-: if unless else and or
[16:49:48] rbennacer: has joined #ruby
[16:49:51] jhass: and don't and/or at all :P
[16:49:53] [k-: adaedra is Hitlerv2
[16:50:13] jhass: yeah, crossed the line there
[16:50:46] shevy: can we kick him!
[16:50:54] jhass: no you can't
[16:52:12] bootstrappm: has joined #ruby
[16:53:29] shevy: hi bootstrapper
[16:53:40] Guest50: has joined #ruby
[16:53:42] sdwrage: has joined #ruby
[16:53:58] ellisTAA: has joined #ruby
[16:54:17] [k-: you misspelled their name
[16:55:36] ivanskie: https://gist.github.com/i5okie/141fe2f5b780d2686244
[16:56:02] techsethi: has joined #ruby
[16:56:03] ivanskie: thats code without all the attempts at avoiding nil
[16:56:37] andywojo: has joined #ruby
[16:56:39] sarkyniin: has joined #ruby
[16:56:46] jhass: what do you want to do if it's nil?
[16:56:51] tvw: has joined #ruby
[16:56:51] youch: has joined #ruby
[16:56:52] choke: has joined #ruby
[16:57:26] jhass: next if row[9].nil? || row[10].nil?
[16:57:42] jhass: and get rid of that silly false ||
[16:57:55] lannonbr: Maybe try using the null object pattern instead of checking for nil?
[16:58:00] ivanskie: oh yeah meant to remove that
[16:58:59] ivanskie: thanks jhass
[17:00:05] josh4: has joined #ruby
[17:00:33] blackjid: has joined #ruby
[17:00:43] rakm: has joined #ruby
[17:01:48] spider-mario: has joined #ruby
[17:02:37] dorei: has joined #ruby
[17:02:39] umgrosscol: has joined #ruby
[17:02:56] dorei: >> "ab\xA0cd\xc2\xa0ef".gsub(/\xC2?\xA0/,' ')
[17:02:57] ruboto: dorei # => /tmp/execpad-9b474f7738ca/source-9b474f7738ca:2: too short escaped multibyte character: /\xC2?\xA0/ (https://eval.in/419089)
[17:03:27] shadoi: has joined #ruby
[17:03:29] dorei: any idea why this fails with mri >= 2.0 but doesnt fail with 1.9.3 ? for 1.9.3: https://eval.in/419087
[17:03:57] ndrei: has joined #ruby
[17:04:03] shevy: works fine here
[17:04:16] shevy: ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux]
[17:04:17] dorei: shevy: which mri version?
[17:04:22] user1138: has joined #ruby
[17:04:33] shevy: >> RUBY_VERSION
[17:04:34] ruboto: shevy # => "2.2.0" (https://eval.in/419092)
[17:05:20] dorei: it fails at my ruby 2.1.1p76 and also fails at eval.in 2.2
[17:05:52] juanpaucar: has joined #ruby
[17:06:17] juanpaucar: has joined #ruby
[17:06:33] alphaatom: has joined #ruby
[17:06:57] jhass: >> "ab\xA0cd\xc2\xa0ef".b.gsub(/\xC2?\xA0/n,' ')
[17:06:58] ruboto: jhass # => "ab cd ef" (https://eval.in/419095)
[17:07:50] jhass: shortcut for .force_encoding('ASCII-8bit') basically
[17:09:46] chinmay_dd_: has joined #ruby
[17:10:57] sdwrage: has joined #ruby
[17:11:10] unver: has joined #ruby
[17:13:09] _djbkd: has joined #ruby
[17:13:52] hotpancakes: has joined #ruby
[17:15:46] rideh: has joined #ruby
[17:16:02] ips|malc: has joined #ruby
[17:16:17] radgeRayden_: has joined #ruby
[17:16:44] millerti: has joined #ruby
[17:17:40] jhack: has joined #ruby
[17:18:12] hinbody: has joined #ruby
[17:18:46] codecop: has joined #ruby
[17:19:48] EminenceHC: has joined #ruby
[17:19:55] ht__: has joined #ruby
[17:20:20] lodgenbd: has joined #ruby
[17:20:57] Cust0sLim3n: has joined #ruby
[17:21:42] northfurr: has joined #ruby
[17:21:43] krisquigley: has joined #ruby
[17:21:59] Norrin: When people say that ruby is dynamically typed.... they just mean that there's no type safety until runtime right?
[17:22:19] Norrin: but a scripting language only ever checks anything at runtime.... so how can ruby ever be statically typed?
[17:22:28] Norrin: or any scripting language for that matter
[17:22:42] shevy: didn't know about .b()
[17:22:42] arup_r: has joined #ruby
[17:22:51] jonee: has joined #ruby
[17:23:12] shevy: Norrin don't think that the term types is a good one. what exactly is a "type" in ruby?
[17:23:20] bricker: has joined #ruby
[17:24:11] Norrin: in ruby, pretty synonomous with 'Class'
[17:25:02] Norrin: i don't wan to be pedantic though. a type in a fully OO language is a collection of methods and properties
[17:25:34] jackjackdripper: has joined #ruby
[17:26:03] Norrin: so without being pedantic, how can any scripting language be considered anything other than dynamically typed?
[17:26:34] puppeh_: has joined #ruby
[17:26:37] Norrin: meh never mind. i'm thinking of dynamic linking
[17:27:12] puppeh_: `URI('file:///foo/bar').to_s # => "file:/foo/bar"` <-- isn't this wrong? shouldn't it print "file:///foo/bar"?
[17:27:12] gamename: has joined #ruby
[17:27:13] yfeldblum: has joined #ruby
[17:27:20] jeanlinux: has joined #ruby
[17:27:49] Norrin: wow roubyconf is cheap
[17:27:53] Norrin: rubyconf*
[17:27:56] shevy: well the compiled languages require the extra information
[17:28:02] skade: has joined #ruby
[17:28:08] shevy: like how much to allocate
[17:28:23] gamename: has joined #ruby
[17:28:36] blueOxigen: has joined #ruby
[17:28:37] gamename: has joined #ruby
[17:28:38] cornerma1: has joined #ruby
[17:28:40] radgeRayden: has joined #ruby
[17:29:55] jackjackdripper: has joined #ruby
[17:30:21] Pupp3tm4st3r: has joined #ruby
[17:30:32] krisquigley: has joined #ruby
[17:30:35] tubbo: Norrin: it's all about syntax
[17:30:42] tubbo: nothing much to do with how it's actually implemented
[17:31:11] tubbo: strongly-typed languages aren't faster because the compiler/interpreter/et. al. "knows" what type it is beforehand and can allocate enough RAM for that
[17:31:23] mistermocha: has joined #ruby
[17:31:27] tubbo: the way code is parsed, the compiler would already know that information by inferring it through how the var is used throughout the codebase
[17:31:33] Norrin: funny to me, one article seemed to think ruby becoming more statically typed would improve code reuseability
[17:31:47] tubbo: the argument for strong typing is readability and compile-time error catching
[17:31:50] freerobby: has joined #ruby
[17:31:53] tubbo: you tried to pass nil into a String attribute? error.
[17:32:03] tubbo: you tried to pass a String into an Integer attr? error.
[17:32:13] tubbo: this, for better or worse, does not happen with RUby
[17:32:58] banister: has joined #ruby
[17:33:04] nscheurich: has joined #ruby
[17:33:35] Norrin: actually i guess it could. you can require types on parameters and ensure more safety, causing errors that would be caught earlier on in development
[17:33:56] Norrin: i've always found ruby very hard to read. not sure its due to types though
[17:34:36] marr: has joined #ruby
[17:34:45] puppeh_: https://bugs.ruby-lang.org/issues/9912
[17:34:50] puppeh_: isn't this a bug ^ ?
[17:35:12] Norrin: the fact that parenthesizes can be excluded from parameter lists, blocks, and in-line hashes i think are the main reasons
[17:35:37] casadei: has joined #ruby
[17:35:49] Norrin: and symbols and hashes look too similar when hashes have no parens
[17:37:07] postmodern: has joined #ruby
[17:37:48] chouhoul_: has joined #ruby
[17:39:25] mikecmpbll: has joined #ruby
[17:40:24] choke: has joined #ruby
[17:40:57] northfurr: has joined #ruby
[17:41:07] amystephen: has joined #ruby
[17:41:32] Jackneill: has joined #ruby
[17:41:55] jhack: has joined #ruby
[17:42:35] jeadr: has joined #ruby
[17:45:08] atmosx: hello people!
[17:45:20] atmosx: does this look okay? https://gist.github.com/atmosx/54a7e4904d4b36aea3bb I wanna recursively enter a dir and print the dir.
[17:45:30] atmosx: hm, come to think of it, better save the output to a file.
[17:47:11] dopie: has joined #ruby
[17:47:27] skade: has joined #ruby
[17:47:44] casadei: has joined #ruby
[17:48:55] chohe: has joined #ruby
[17:49:02] Novice201y: has joined #ruby
[17:49:23] chohe: in general are there any major differences between different -p's i.e p647 or are you generally safe to upgrade to the latest patch level?
[17:49:30] roolo: has joined #ruby
[17:49:58] Soda: has joined #ruby
[17:50:06] Novice201y: Hello. I did "rbenv install 2.2.2" (from https://gorails.com/setup/ubuntu/15.04 ), but it just printed "Installing ruby-2.2.2" and for few minutes nothing more. How to solve this?
[17:51:24] phenrique: has joined #ruby
[17:52:16] hinbody_: has joined #ruby
[17:52:31] atmosx: Novice201y: you buy a new computer? :-P it's probably compiling
[17:52:45] atmosx: please check the processes running on your system (e.g. ps auwx)
[17:53:40] havenwood: chohe: Ruby has been semantically versioned starting with 2.1. Read more here: https://www.ruby-lang.org/en/news/2013/12/21/ruby-version-policy-changes-with-2-1-0/
[17:53:58] shevy: Norrin you can use parens as you wish, so if you find them to be better, use them :)
[17:54:22] ndrei: has joined #ruby
[17:54:27] alankis: has joined #ruby
[17:54:35] ChoiKyuSang: has joined #ruby
[17:54:48] tonios57_: has joined #ruby
[17:54:52] _Cronon_: has joined #ruby
[17:55:18] havenwood: Novice201y: Ruby 2.2.3 has just recently been released. That would be the one to start with if you're compiling today.
[17:55:20] sarkyniin: has joined #ruby
[17:55:24] ivanskie: was looking on how to get csv into table.. found this on the webs. is the .map(&:to_hash) depricated? http://qiita.com/labocho/items/fdfcc3ba26857b45d066
[17:55:37] SenpaiSilver_: has joined #ruby
[17:56:04] nickjj_: has joined #ruby
[17:56:07] valeri_ufo: has joined #ruby
[17:56:19] baweaver: has joined #ruby
[17:56:29] Novice201y: atmosx: top says that make takes about 0,3 of CPU
[17:56:32] shevy: ivanskie this runs .to_hash
[17:56:50] shevy: ivanskie so it depends on whether the elements in your collection do respond to .to_hash
[17:57:02] modern: has joined #ruby
[17:57:25] ivanskie: k gonna try something different.. I don't have headers in my csv.. so that code won't work, since nothing to hash
[17:57:28] Norrin: shevy, that doesn't change what others do
[17:57:37] Norrin: that's why what the lang allows is so critical
[17:58:02] sarkyniin: has joined #ruby
[17:58:12] shevy: Norrin in other languages people write code that is hard to read too
[17:58:32] Norrin: same thing with the auto agruments like $0 and etc. $_ and stuff. there's more isoteric ones... i actually know what those two mean. but perl and ruby have gone that route to dislike of many
[17:58:37] chohe: havenwood: that is much appreciated but doesn't really answer my question of whether or not I should be concerned when upgrading between patch versions :)
[17:58:38] shevy: and when you restrict freedom, you also enforce the restriction onto other people
[17:58:39] Norrin: even swift has some stuff like that though
[17:58:48] armyriad: has joined #ruby
[17:58:49] Norrin: auto agruments that give no hint as to what they mean
[17:58:49] alankis: Hello everyone
[17:58:51] shevy: the $ variables were a lot inherited from perl
[17:58:51] sarkyniin: has joined #ruby
[17:59:03] shevy: matz said that he didn't overly like them
[17:59:11] Norrin: shevy, the rules of a language can greatly enhance readability
[17:59:12] havenwood: chohe: For Ruby 2.0?
[17:59:26] kirun: has joined #ruby
[17:59:27] chohe: yup we were using RVM which was installing 643 i believe
[17:59:28] Norrin: convention plays a major part also
[17:59:30] shevy: Norrin you still find lots of alternatives in python too
[17:59:38] chohe: and i just upgraded to 647 because of an ASCII error issue when using grunt
[17:59:40] havenwood: chohe: Yeah, all the 2.0s are compatible.
[17:59:50] havenwood: chohe: Then semantic versioning after that.
[17:59:57] Norrin: shevy, what 'alternatives'?
[18:00:12] linduxed: has joined #ruby
[18:00:40] shevy: http://biopython.org/DIST/docs/tutorial/Tutorial.html#htoc7
[18:00:49] shevy: 'One thing to note about Biopython is that it often provides multiple ways of ?doing the same thing.?'
[18:01:00] havenwood: chohe: It's in maintenance mode, so no bug fixes, but the 2.0 to use is 2.0.0-p647.
[18:01:08] jerius_: has joined #ruby
[18:01:11] alankis: I have some strange issue when trying to install pgsql gem, (migrated app from win dev env to ubuntu)
[18:01:12] Norrin: shevy, lol... you mean a modified version of python?
[18:01:26] Norrin: yeah a cool core tenant of python is 'there's only 1 way to do things'.
[18:01:36] shevy: Norrin nah, they defaulted to python, the philosophy is "there should be one way and only one way" and they couldn't really comply
[18:01:38] alankis: gist of gem_make.out is here https://gist.github.com/alankis/66fe0b3d80d0373dc01e
[18:01:42] havenwood: chohe: You may find it *just works* in 2.1.7 and 2.2.3. Depends.
[18:01:43] Novice201y: atmosx: but cc1 takes about 60% of CPU. Thanks
[18:02:11] shevy: it's really a difference in philosophy
[18:02:15] Norrin: shevy, i'm not sure what you're trying to say
[18:02:24] havenwood: Norrin: How many CPUs?
[18:02:36] doctorly: has joined #ruby
[18:02:42] shevy: Norrin your argument was that code will be more readable when there are less possibilities
[18:02:43] havenwood: Norrin: make -j 8
[18:02:58] shevy: I found that other people write a lot of awful code in every language
[18:03:22] malconis_: has joined #ruby
[18:03:33] havenwood: -j [jobs], --jobs[=jobs] Specifies the number of jobs (commands) to run simultaneously.
[18:03:50] Norrin: i didn't bring up possibilities until just recently. i do like the python opinion of possibilities.
[18:04:16] Norrin: you brought up python and i can't understand what your message is there
[18:04:35] jeadr: has joined #ruby
[18:04:36] shevy: it was not me who said that mandatory parens improve readability
[18:04:49] havenwood: shevy: ruby-install -j8 --system ruby 2.2.3
[18:04:58] shevy: havenwood I have 2.2.3!
[18:05:01] Norrin: but anyway, yes you can write crap code in any language. but lang syntax and convention play a huge part in how easy it is to read the language on average
[18:05:11] fullofcaffeine: has joined #ruby
[18:05:29] havenwood: shevy: I'm just slowly trying to get you accustomed to ruby-install until you accidentally use it without realizing.
[18:05:40] Rubie: has joined #ruby
[18:05:49] shevy: but I don't need it
[18:05:52] havenwood: shevy: You'd just add the -j8 to your make step. :P
[18:05:57] shevy: I can have versioned appdirs for all programs thanks to gobolinux
[18:06:00] Anon_: whats the difference between running a ruby script like this: "bundle exec ruby myRubyScript.rb" and "ruby myRubyScript.rb" ?
[18:06:33] shevy: what is the -j8, is that a multiprocessor thingy?
[18:06:35] Norrin: my parens statement wasnt about possibilities. simply put, the parens are easy to run. its got nothing to do with whether there's a choice or not
[18:06:42] Norrin: easy to read*
[18:06:43] havenwood: anon_: Bundler is a gem that lets you run your_ruby_script.rb in the "context of your Bundle."
[18:06:48] shevy: easy to run :)
[18:06:54] wprice: has joined #ruby
[18:07:21] shevy: Norrin I for instance use parens in def: statements, but I don't want them to be mandatory all the time for non-def statements
[18:07:29] havenwood: anon_: If resolves dependencies for gems listed in your Gemfile file and creates a Gemfile.lock file with resolved versions locked in.
[18:07:34] shevy: cat.jump_to :tree
[18:07:36] shevy: cat.jump_to(:tree)
[18:07:42] shevy: thanks I prefer the non-paren variant there
[18:08:17] havenwood: anon_: By default it will install gems to your $GEM_HOME but you can set a path that it remembers to "vendor" your gems separately than your regular gems.
[18:08:28] Anon_: havenwood, so if i have requireers in my file it will gem install them
[18:08:48] havenwood: anon_: When you prefix `bundle exec` you're using the gem versions from the Bundle .
[18:08:53] havenwood: (Gemfile.lock)
[18:08:55] Norrin: i really prefer it with parens, because without them, if :tree was some variable instead, you can't tell that its an argument
[18:09:20] havenwood: anon_: Read a bit about Gemfiles: http://bundler.io/gemfile.html
[18:09:21] Anon_: havenwood, oh so bundle already has a bundle of gems
[18:09:21] shevy: I can easily tell that it is an argument
[18:09:35] shevy: and :tree is a symbol always
[18:09:49] Norrin: i know. that's why i said if it was a variable identifier instead
[18:09:57] Norrin: it can get confusing
[18:10:05] havenwood: anon_: Modern RubyGems can resolve dependencies from the Gemfile and create the Gemfile.lock so you practically don't need Bundler except for Rails, which hardcodes to it.
[18:10:10] shevy: I see that you know symbols :)
[18:10:19] havenwood: anon_: That said, Bundler is very widely used.
[18:10:26] jimms: has joined #ruby
[18:10:33] havenwood: anon_: It's good to learn how it works.
[18:11:16] paulcsmith: has joined #ruby
[18:11:32] juanpaucar: has joined #ruby
[18:11:36] youch: has joined #ruby
[18:12:08] havenwood: anon_: Try installing Bundler (`gem install bundler`), creating a Gemfile (that ^ link), creating a Gemfile.lock (`bundle install`) and then running a Ruby command in the context of the Bundle (`bundle exec <command>`).
[18:12:17] einarj: has joined #ruby
[18:12:19] _djbkd: has joined #ruby
[18:12:25] JohnBat26: has joined #ruby
[18:12:55] ramfjord: has joined #ruby
[18:13:20] baweaver: has joined #ruby
[18:15:03] Timba-as: has joined #ruby
[18:15:59] r0x0rZ: has joined #ruby
[18:16:34] benlieb: has joined #ruby
[18:16:42] skade: has joined #ruby
[18:16:45] neilnorthrop: has joined #ruby
[18:18:05] amystephen: has joined #ruby
[18:18:38] dgutierrez1287: has joined #ruby
[18:18:58] banister: has joined #ruby
[18:19:41] jgt1: has joined #ruby
[18:19:58] crazydiamond: has joined #ruby
[18:20:04] platzhirsch: has joined #ruby
[18:22:01] youngbaks: has joined #ruby
[18:22:25] ndrei: has joined #ruby
[18:23:06] Guest50: has joined #ruby
[18:23:13] rikkipitt: has joined #ruby
[18:23:50] hotpancakes: has joined #ruby
[18:27:29] akash89: has joined #ruby
[18:28:01] anonoz: has joined #ruby
[18:28:41] rippa: has joined #ruby
[18:28:54] Guest50: has joined #ruby
[18:29:51] puppeh_: has joined #ruby
[18:30:05] puppeh_: is this expected behavior or a bug in URI? https://bugs.ruby-lang.org/issues/9912
[18:30:39] DoubleMalt: has joined #ruby
[18:31:18] einarj: has joined #ruby
[18:31:37] ivanskie: can someone lend me a second set of eyes plz? i'm trying to convert a block to a one liner for irb play.. but im doing something wrong.. https://gist.github.com/i5okie/92e813eb10ccb40bd3fa
[18:31:51] devoldmx: has joined #ruby
[18:32:07] jhass: irb accepts multiline input
[18:32:22] jhass: but you have an extra do there
[18:32:28] jhass: it's foo do end or foo { }
[18:32:41] wheresmyjetpack: has joined #ruby
[18:33:18] ivanskie: i tried just pasting the whole block into irb but it refused to cooperate
[18:33:29] shevy: you should make a newline after your starting { eventually
[18:33:53] shevy: you have 207 characters in one line there
[18:33:57] RegulationD: has joined #ruby
[18:34:13] JakFrist: has joined #ruby
[18:34:28] ivanskie: and thats bad?
[18:34:36] ndrei: has joined #ruby
[18:34:40] yfeldblum: has joined #ruby
[18:34:42] ivanskie: i thought we add ; instead of new line when inside {}
[18:35:02] shevy: it's making it harder to read
[18:35:09] mistermocha: has joined #ruby
[18:35:31] matp: has joined #ruby
[18:35:43] shevy: you can use newlines \o/
[18:35:52] Thermatix: has joined #ruby
[18:35:54] dman777_alter: why is params.merge({ 'user' => current_user.try(:display_name) }) adding {"format"=>:json?
[18:35:54] bronson: has joined #ruby
[18:35:58] shevy: jhass is young, he has sharp eyes so he noticed it
[18:35:58] dstarh: has joined #ruby
[18:36:04] ivanskie: i really need to buy "The ruby way" book..
[18:36:14] jgt1: has joined #ruby
[18:36:15] silkfox: has joined #ruby
[18:36:18] jenrzzz: has joined #ruby
[18:36:19] shevy: dman777_alter what does params contain prior to that call?
[18:36:38] shevy: or respectively what is .try doing there
[18:36:45] shevy: but whatever it is, either of these two must add that key
[18:36:48] platzhirsch: has joined #ruby
[18:37:30] baroquebobcat: has joined #ruby
[18:37:33] chinmay_dd_: has joined #ruby
[18:37:36] jeadr: has joined #ruby
[18:37:53] nuttermb: has joined #ruby
[18:37:58] dman777_alter: shevy: {"content"=>"aaa", "type"=>"adx_running", "name"=>"n2"}
[18:37:58] dman777_alter: shevy: it's just adding a user to the json
[18:38:23] gavit: has joined #ruby
[18:38:27] jhass: dman777_alter: how did you verify that?
[18:38:32] ivanskie: man... jhass genius
[18:38:40] gavit: anyone care to look at why my script seems to run so slow? https://gist.github.com/gavit/0a4a88e1424996f1bf9c
[18:38:48] dman777_alter: shevy: it's used as so.... params.merge(JSON.parse(request.body.read)) with def params_with_user(params={}) params.merge({ 'user' => current_user.try(:display_name) }) end
[18:38:58] ivanskie: k now to figure out why table_print doesn't like my array
[18:39:00] dman777_alter: jhass: with the puts statment before and after
[18:39:20] shevy: gavit no idea but you can simplify that
[18:39:30] shevy: File.read() directly for instance
[18:39:38] jhass: dman777_alter: given it's called params ... is it actually an ActionController::Parameters ?
[18:39:49] toretore: gavit: what is the input?
[18:39:52] shevy: and apply the .gsub only when you really need it, the regex engine is not very light weight compared to other parts
[18:39:53] gavit: shevy: it's only a 72K file I'm reading
[18:40:05] dman777_alter: jhass: almost...using MongoId instead
[18:40:07] einarj_: has joined #ruby
[18:40:10] jhass: gavit: try to use File.foreach
[18:40:10] toretore: and what is "slow"?
[18:40:11] gavit: toretore: the output of this: https://www.telesur.sr/mijn-telesur/telefoonboek/
[18:40:21] jhass: oh, mmh, nvm
[18:40:27] gavit: jhass: I am only placing 1 file in :p
[18:40:36] jhass: dman777_alter: so what's params.class ?
[18:40:56] gavit: toretore: after 5 mins still just a "I was passed: filename"
[18:41:03] jhass: gavit: [\s\S]* is everything
[18:41:11] benlovell: has joined #ruby
[18:41:19] gavit: jhass: but then I need to add /m?
[18:41:46] dman777_alter: jhass: ActiveSupport::HashWithIndifferentAccess
[18:42:01] jhass: dman777_alter: so whats p params.to_h printing prior?
[18:42:16] toretore: gavit: how do i get it to output exactly what you're using?
[18:42:45] dman777_alter: jhass: {"format"=>:json, "action"=>"update", "controller"=>"api/templates", "id"=>"57d950119d000000"}
[18:42:45] DLSteve: has joined #ruby
[18:42:49] gavit: toretore: I entered 'chm' as input for name
[18:43:00] rbennacer: has joined #ruby
[18:43:00] jhass: dman777_alter: there you go
[18:43:05] dman777_alter: jhass: fascinating....why doesn't it print that with JSON.parse(request.body.read)?
[18:43:06] jhass: that's where it comes from
[18:43:18] jhass: because it's in params?!
[18:43:19] gavit: toretore: and then downloaded the file and ran the myfile.rb mydownloadedfile.html
[18:43:33] skade: has joined #ruby
[18:43:34] jhass: dman777_alter: ever ran rake routes?
[18:43:35] NeverDie: has joined #ruby
[18:43:44] nertzy: has joined #ruby
[18:44:25] toretore: gavit: you should probably use something like nokogiri for that
[18:44:28] freerobby: has joined #ruby
[18:44:37] dman777_alter: jhass: ah! I see... I was thinking params didn't exist before. Thanks!
[18:45:05] toretore: and possibly some web automation thingamajiggy because it uses retarded js navigation
[18:46:19] DCameronMauch: has joined #ruby
[18:46:21] gavit: toretore: I'm don't even care about the navigation :P
[18:46:33] gavit: I'm just trying to read the first 20 'entries'
[18:47:14] camm: has joined #ruby
[18:47:20] diegoviola: I want to make a vending machine in ruby
[18:48:44] tmtwd: has joined #ruby
[18:49:37] pipework: diegoviola: Have it vend advice for people who want to make vending machines in ruby.
[18:50:01] pipework: It'd be fantastically circular. Points for self-deprecating vending machine advice.
[18:50:33] failshell: has joined #ruby
[18:50:48] ne1l: has joined #ruby
[18:50:57] camm: Hello everyone, I'm just learning about ruby and rails. I have a question: when I use $bundle I install the gems that are described in my Gemfile, but what is the difference using $bundle install? Is the same or not?
[18:51:18] diegoviola: pipework: not sure I get what you mean
[18:51:40] pipework: camm: I'm not sure what you mean. Are you asking about the difference between `bundle` and `bundle install`?
[18:51:48] pipework: If so, it's nothing. They're equivalent.
[18:52:00] hydrozen: has joined #ruby
[18:52:14] camm: pipework: Yes, thats my question exactly.
[18:52:53] shevy: perhaps bundle without a command defaults to 'install'
[18:53:07] cabreraM516: has joined #ruby
[18:53:18] shevy: or it shows the help menu
[18:53:19] shevy: let's see
[18:53:30] pipework: shevy: It defaults to install
[18:53:38] shevy: hmm "bundle" without command tries to do something "Could not locate Gemfile or .bundle/ directory"
[18:53:45] pipework: ACTION would rather it show help, but whatevskies
[18:53:52] einarj: has joined #ruby
[18:53:53] shevy: and that is the same I get via "bundle install" \o/
[18:53:54] nei1: has left #ruby: ()
[18:53:57] r0x0rZ: has joined #ruby
[18:53:57] shevy: yeah, "gem" alone shows help
[18:54:26] jhass: camm: install is the default subcommand of bundle
[18:55:12] diegoviola: pipework: I'm not really looking for advice about how to write one
[18:55:21] bruno-: has joined #ruby
[18:55:25] pipework: diegoviola: So?
[18:55:30] lordkryss: has joined #ruby
[18:55:32] hotpancakes: has joined #ruby
[18:55:41] camm: Thanks guys.
[18:56:10] pipework: You offered an unsolicited idea to a public channel, I offered an unsolicited idea on the public channel. Free exchange of ideas has been reached.
[18:56:31] jhass: ?guys camm
[18:56:32] ruboto: camm, Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
[18:56:40] diegoviola: pipework: ok
[18:56:53] JakFrist: has joined #ruby
[18:57:19] ivanskie: has joined #ruby
[18:57:59] kidoz: has joined #ruby
[18:58:28] gavit: toretore: https://gist.github.com/gavit/0a4a88e1424996f1bf9c <- I tried copying from vi to the browser :p
[18:58:38] n3il: has joined #ruby
[18:59:16] andywojo: has joined #ruby
[18:59:17] northfurr: has joined #ruby
[18:59:45] gavit: This is where my first match should arrive: https://gist.github.com/gavit/0a4a88e1424996f1bf9c#file-input-html-L297
[19:00:37] toretore: gavit: cat t | ruby -rnokogiri -e'p Nokogiri::HTML(STDIN.read).css("table.troitabelmedium tr").select{|tr| tr.css(".listingname").any? }.map{|tr| %w[.listingname .listingaddress].map{|s| tr.css(s).inner_html } }'
[19:00:57] camm: has left #ruby: ()
[19:01:40] renderful: has joined #ruby
[19:02:24] northfurr: has joined #ruby
[19:02:57] JakFrist: has joined #ruby
[19:02:58] gavit: toretore: I'm assuming I should replace t with my file?
[19:03:08] gavit: the regex seems to work on rubular though
[19:03:14] toretore: fuck the regex
[19:03:57] ivanskie: i don't even know how to ask google this. but i tried. uh, if my csv file does not have files.. and i want to end up with an array of hashes with my own headers (csv has over 120 columns, i'm only using like 5...). how would one do that? i have an idea.. but i think its an ugly one
[19:04:08] gavit: lemme check if I have nokogiri, cause I get a blank output
[19:04:26] clarkenciel: has joined #ruby
[19:04:37] Guest50: has joined #ruby
[19:04:39] kies: has joined #ruby
[19:05:15] toretore: ivanskie: 1) create array 2) iterate through csv entries 3) take the fields you're interested in and stick them in a hash and then in the array
[19:05:16] jhass: ivanskie: imo just assign a bunch of constants with the indexes, START_DATE = 9; END_DATE = 10; row[START_DATE]; row[END_DATE]
[19:05:44] n3il: has joined #ruby
[19:05:54] Ox0dea: ivanskie: Consider #values_at as well.
[19:06:05] hobodave: has joined #ruby
[19:06:12] hinbody: has joined #ruby
[19:07:04] djbkd: has joined #ruby
[19:07:20] jamesaxl: has joined #ruby
[19:07:26] rodfersou: has joined #ruby
[19:07:31] n3il: has joined #ruby
[19:09:00] leafybasil: has joined #ruby
[19:09:58] araujo: has joined #ruby
[19:11:49] iateadonut1: has joined #ruby
[19:12:22] n3il: has joined #ruby
[19:13:04] nfk: has joined #ruby
[19:14:00] ne1l: has joined #ruby
[19:14:06] benlovell: has joined #ruby
[19:15:12] kt2: has joined #ruby
[19:15:18] hackeron: has joined #ruby
[19:16:09] Dreamer3: has joined #ruby
[19:16:43] skade: has joined #ruby
[19:16:51] SenpaiSilver: has joined #ruby
[19:18:14] icarus: has joined #ruby
[19:19:15] kadoppe: has joined #ruby
[19:19:18] atomical: has joined #ruby
[19:20:04] devdazed: has joined #ruby
[19:20:59] einarj: has joined #ruby
[19:21:37] baweaver: has joined #ruby
[19:21:55] gavit: toretore: disceting this oneline of yours :P
[19:22:02] yqt: has joined #ruby
[19:22:59] joonty: has joined #ruby
[19:23:48] gavit: I think your oneliner assumes listingaddress is a part of listingname, but I think they ae both on the same level
[19:24:16] ivanskie: uhm so back to csv to array of hashes.... i couldn't really wrap my head around how to do what u guys suggested.. but this is basically what I'd like to end up with: https://gist.github.com/i5okie/92e813eb10ccb40bd3fa
[19:24:31] jhass: ?guys ivanskie
[19:24:31] ruboto: ivanskie, Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
[19:24:46] benlieb: has joined #ruby
[19:24:52] northfurr: has joined #ruby
[19:25:15] Axsuul: has joined #ruby
[19:25:20] ivanskie: csv has no headers, so i made my own hash with symbol values. so how would you end up with something like that?
[19:25:50] powersurge: has joined #ruby
[19:26:09] powersurge: in delayed_job is there a way to get the id of a job just after enqueuing it? having a bear of a time working out how to do it
[19:27:57] ivanskie: oh i think i have an idea (about the hash thing)
[19:28:40] yardenbar: has joined #ruby
[19:29:34] ivanskie: lol that was easy
[19:29:46] ishahnaz: has joined #ruby
[19:31:21] krisquigley: has joined #ruby
[19:32:28] CorySimmons: has joined #ruby
[19:32:37] roolo: has joined #ruby
[19:33:47] pen: has joined #ruby
[19:34:21] baweaver: has joined #ruby
[19:34:33] lwu_: has joined #ruby
[19:34:58] lkba: has joined #ruby
[19:35:24] sdwrage: has joined #ruby
[19:35:38] arturhoo: has joined #ruby
[19:36:08] Guest50: has joined #ruby
[19:36:35] leafybasil: has joined #ruby
[19:36:38] benlovell: has joined #ruby
[19:36:51] bronson: has joined #ruby
[19:37:41] Illusioneer1: has joined #ruby
[19:37:45] jgt1: has joined #ruby
[19:39:39] hobodave: has joined #ruby
[19:40:17] einarj: has joined #ruby
[19:40:19] yasha0x80: has joined #ruby
[19:40:21] lkba: has joined #ruby
[19:40:32] mistermocha: has joined #ruby
[19:40:38] jbw_: has joined #ruby
[19:41:28] dabradley: has joined #ruby
[19:41:31] Sdwrage_: has joined #ruby
[19:42:18] lwu_: has joined #ruby
[19:42:36] pragmatism: has joined #ruby
[19:43:45] jerius: has joined #ruby
[19:45:34] JoshGlzBrk: has joined #ruby
[19:45:56] flegercovateam: has joined #ruby
[19:46:22] jeadr: has joined #ruby
[19:47:17] imperator: has joined #ruby
[19:47:37] shadoi: has joined #ruby
[19:49:01] jacaballero: has joined #ruby
[19:49:22] meliboo: has joined #ruby
[19:49:23] matcouto: has joined #ruby
[19:49:36] benlieb: has joined #ruby
[19:49:41] droidburgundy: has joined #ruby
[19:50:00] EminenceHC: has joined #ruby
[19:50:54] meliboo: has left #ruby: ()
[19:51:10] luksaur: has joined #ruby
[19:51:28] AlxAltea: has joined #ruby
[19:53:56] icharlie: has joined #ruby
[19:54:29] JoshGlzBrk: has joined #ruby
[19:54:49] bigkevmcd: has joined #ruby
[19:56:54] jimms: has joined #ruby
[19:56:58] atmosx: has joined #ruby
[19:57:03] Lingo: has joined #ruby
[19:57:46] Lingo: Hello. I'm trying to require a file in some code I'm working on, and I'm getting strange errors. Would anyone happen to know what the issue is? https://gist.github.com/dkindler/6347e33f067c551f4b82
[19:58:08] kies: has joined #ruby
[19:59:08] n008f4g_: has joined #ruby
[19:59:36] saddad: if that's your file you need to use require_relative
[19:59:54] hotpancakes: has joined #ruby
[19:59:58] jhass: Lingo: use require_relative or better yet add the directory euler-help.rb lives in to the $LOAD_PATH
[20:00:21] Lingo: but euler-help is in the same dir as this file, does that matter?
[20:00:33] jhass: Lingo: protip: gist supports syntax highlighting and multiple files
[20:00:57] saddad: require_relative gets files that aren't in your $LOAD_PATH
[20:01:09] Lingo: oh, got it
[20:01:12] Lingo: and will do next time
[20:01:16] Lingo: thanks guys!
[20:01:21] jhass: ?guys Lingo
[20:01:21] ruboto: Lingo, Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
[20:01:30] gavit: toretore: solved!
[20:02:45] Lingo: Uh ok. Where i'm from you can use the term "guys" to refer to a group of people, not really a gender-related thing
[20:02:49] gavit: now, I have a string "De naam '.*' heeft (\d+) vermeldingen. <- should I do this with regex?
[20:02:50] Lingo: but sure, thank you both!
[20:03:37] shinnya: has joined #ruby
[20:04:12] pipework: saddad: It also doesn't even check the $LOAD_PATH
[20:04:31] pipework: so it can be beneficial for startup time and whatnot
[20:04:54] rikkipitt: has joined #ruby
[20:05:36] chouhoulis: has joined #ruby
[20:06:09] ashleyhindle: Ruby is pretty nice
[20:06:29] ashleyhindle: Though map(&:downcase) looks odd
[20:06:38] shevy: you can write .map {|e| e.downcase }
[20:06:51] ashleyhindle: I might stick to that with my own stuff for now :D
[20:07:04] shevy: nah you will use the shorter variant quickly
[20:07:07] shevy: because it's shorter :D
[20:07:21] shevy: it's slower though so perhaps you should indeed use the longer variant
[20:07:46] ashleyhindle: It looks really weird, though I suppose I'll get used to it eventually
[20:08:05] shevy: yeah the & disturbs me too
[20:08:15] Ox0dea: ashleyhindle: It only "looks weird" because you don't yet understand its component parts.
[20:08:44] Ox0dea: Symbols are useful for denoting "static strings" like method names, and & is "to/from Proc".
[20:08:54] ellisTAA: has joined #ruby
[20:10:08] radgeRayden: has joined #ruby
[20:10:23] ashleyhindle: I get symbols but not "to/from Proc"
[20:10:27] ashleyhindle: I shall google
[20:10:27] Ox0dea: shevy: https://github.com/JuanitoFatas/fast-ruby#proc--block
[20:10:38] Ox0dea: Explicit blocks are actually slower.
[20:11:05] svdb64: has joined #ruby
[20:11:36] Ox0dea: ashleyhindle: Blocks aren't actually "arguments" in the purest sense, so you can't always pass a Proc to a method expecting a block.
[20:11:39] krisquigley: has joined #ruby
[20:11:47] Ox0dea: Not weird at all.
[20:11:52] shevy: I could swear that other benchmarks I saw were totally opposite of these results
[20:12:01] Ox0dea: You might be thinking of 1.8.7?
[20:12:25] lwu_: has joined #ruby
[20:12:48] shevy: no in general
[20:12:50] shevy: lemme google
[20:13:42] Ox0dea: It's a pretty trivial optimization, really. MRI caches Symbol#to_proc invocations, whereas blocks must be explicitly created each time.
[20:16:26] northfurr: has joined #ruby
[20:16:56] rbennacer: has joined #ruby
[20:17:08] r0x0rZ: has joined #ruby
[20:17:30] Axsuul: has joined #ruby
[20:18:12] shevy: I got other results
[20:18:25] Coldblackice: has joined #ruby
[20:18:45] shevy: http://pastie.org/pastes/10362315/text
[20:19:00] Ox0dea: shevy: Needs more benchmark/ips.
[20:19:03] shevy: .map(&:one) versus .map {|x| x.one }
[20:19:10] shevy: .map(&:one) is slower
[20:19:25] bradland: i think it's because of the call to Symbol#to_proc
[20:19:45] gerep: has joined #ruby
[20:19:50] ivanskie: has joined #ruby
[20:20:04] shmilan: has joined #ruby
[20:20:20] bradland: Ox0dea's suggestion to use benchmark/ips is a good one though, because you may just be seing overhead artifacts
[20:20:28] devdazed: has joined #ruby
[20:20:36] bradland: which is another way of saying, you must construct additional pylons
[20:20:53] gerep: Hi all. I have the 1.9.3 version installed and upgrade to 2.0.0 using "yum upgrate ruby", the upgrade was OK but when I try to run bundle it says: "-bash: /usr/bin/bundle: No such file or directory" and I need to restart the machine for it to work, any ideas?
[20:21:02] gerep: I'm using RedHat 6.6
[20:21:11] ivanskie: anyone know of an alternative to this https://github.com/davetron5000/methadone for windows?
[20:21:44] imperator: ACTION can't remember how to do inline search & replace
[20:22:05] weaksauce: gerep consider using a proper ruby manager and bundler
[20:22:20] weaksauce: look at ruby-install and chruby gerep
[20:22:25] imperator: ivanskie, i'd just use powershell ;)
[20:22:30] bradland: gerep: you'll probably have better luck in the RedHat channel for that one, since it sounds like a dist concern
[20:22:43] gerep: weaksauce, no doubt it is a good idea but I can't use that right now :(
[20:22:48] gerep: bradland, good point
[20:22:55] gerep: Thank you all! :D
[20:22:55] mleung: has joined #ruby
[20:22:57] bradland: the error you've received indicates that bundler is not installed
[20:22:59] ivanskie: yeah already doing that. just had a thought of maybe writing it in ruby, and make it look better (backup script, with better progress representation than whats available)
[20:23:03] shevy: bundler is normally a standalone .gem
[20:23:18] ledestin: has joined #ruby
[20:23:21] gerep: bradland, but why it works when I restart?
[20:23:29] ivanskie: and better error handling... right now i can't really automate my ps script cause if it errors out or doesnt finish. it just sits there in an open window.
[20:23:33] gerep: Oh!!! Forgot to say, I have also updated rubygem-bundler
[20:23:34] shevy: the homepage at rubygems.org is at https://rubygems.org/gems/bundler - you can also download the gem on the right hand side, then install it
[20:23:48] imperator: ivanskie, use sys-proctable :)
[20:23:56] bradland: gerep: does it actually work when you restart? when does it stop working again?
[20:23:59] ivanskie: but if it succeeds it emails me.
[20:24:05] shevy: imperator are you still using ruby on windows by the way?
[20:24:07] benlieb: has joined #ruby
[20:24:14] imperator: shevy, i use ruby on all platforms
[20:24:51] gerep: bradland, yes it does work, it doesn't work when I finish the upgrade
[20:26:09] shevy: so yum fails
[20:26:09] imperator: ruby -ne "s/Hello/Goodbye/g" temp.txt - doesn't seem to like that
[20:26:20] shevy: yum is even written in ruby these days I think
[20:26:21] Ox0dea: shevy: It seems Symbol#to_proc is only faster for "built-in" methods.
[20:26:29] shevy: Ox0dea heisenspeed!
[20:26:35] shevy: sometimes faster sometimes not!
[20:26:35] jeadr: has joined #ruby
[20:26:42] Ox0dea: Blame BASIC_OP_UNREDEFINED_P().
[20:26:55] shevy: I don't dare to dig into the internals like you do :D
[20:26:56] Ox0dea: It checks whether a "core" method hasn't been redefined and so can be optimized.
[20:27:19] shevy: I see you will be having a word with nobu again
[20:27:38] baroquebobcat: has joined #ruby
[20:27:42] Ox0dea: I don't know how to optimize arbitrary methods to Ruby bytecode.
[20:27:50] ivanskie: would be nice to have this on windows http://backup.github.io/backup/v4/ without having to pay some company $$$$$$$$$$$$$ for some gui based bs
[20:27:50] Ox0dea: (I don't think anybody does?)
[20:28:07] devdazed: has joined #ruby
[20:28:20] bradland: gerep: so, you finish the upgrade, restart, and it works again?
[20:28:30] gerep: bradland, yes hahaha
[20:28:36] gerep: bradland, weird, isn't it?!
[20:28:36] michael_mbp: has joined #ruby
[20:28:40] bradland: you said it works when you restart. so, presumably, it'd have to stop working again at some point, right?
[20:28:41] Rubie: has joined #ruby
[20:28:46] bradland: when does it stop working again?
[20:28:53] lannonbr: has joined #ruby
[20:29:07] mleung: has joined #ruby
[20:29:18] tmtwd: has joined #ruby
[20:29:28] shevy: can't you run "yum" in a verbose manner gerep?
[20:29:59] gerep: bradland, I can't tell you when it stop working but I'm going to try that again and see if I can find something
[20:30:05] gerep: shevy, I'm not sure, will check that
[20:30:21] shevy: I mixed up yum with yast
[20:30:50] Ox0dea: >> def foo; defined?(yield); end; [foo, foo {}]
[20:30:51] ruboto: Ox0dea # => [nil, "yield"] (https://eval.in/419212)
[20:30:51] bradland: gerep: the situation you're describing presents a paradox. i think you've missed a critical part of your description that would allow us to understand your problem
[20:30:53] Ox0dea: How does this even?!
[20:31:05] shevy: yast is definitely written in ruby though - you can see that here https://github.com/yast/yast-storage/tree/master/src/clients
[20:31:28] shevy: Yast.import "Popup"
[20:31:41] Guest50: has joined #ruby
[20:31:49] shevy: Ox0dea are you still trying to break ruby?
[20:31:54] shevy: you took over hanmac's job!
[20:32:35] devoldmx: has joined #ruby
[20:32:38] darix: shevy: there is even an irc channel for it if i recall correctly
[20:32:40] michael_mbp: has joined #ruby
[20:32:59] shevy: I approve that it is written in ruby
[20:33:10] qhartman: has joined #ruby
[20:33:12] Ox0dea: shevy: No, just learning new things even now.
[20:33:24] opensource_ninja: has joined #ruby
[20:33:24] Ox0dea: defined? is a little crazy.
[20:33:29] shevy: I don't know how to get all components though, a single "gem install yast" would be nice
[20:33:29] bradland: i cannot wait to here the explanation for this one
[20:33:39] Ox0dea: bradland: Hm?
[20:33:42] yorickpeterse: Ox0dea: haha yeah, defined? is messed up
[20:33:49] Ox0dea: yorickpeterse: Special cases for days.
[20:33:53] darix: shevy: i would be happy if they would switch to gems :p
[20:33:55] bradland: Ox0dea: i'm presuming that someone smart is going to come along and explain it :)
[20:34:10] shevy: darix hmm lookst like 'yast' namespace has been occupied by inactivity :(
[20:34:10] Ox0dea: bradland: I know what's happening, it's just... well, it's not even surprising now.
[20:34:14] casadei_: has joined #ruby
[20:34:15] shevy: https://rubygems.org/gems/yast
[20:34:43] Ox0dea: yorickpeterse: Do you know offhand whether `defined?(yield)` was valid before the advent of `block_given?`?
[20:34:44] darix: shevy: i know
[20:35:08] shevy: would be nice if secondary namespaces would be possible for rubygems.org
[20:35:31] Guest50: has joined #ruby
[20:35:45] bradland: where is `defined?`? i don't see it in Module.
[20:35:51] Ox0dea: bradland: It's not a method.
[20:35:56] Ox0dea: It's a VM instruction, actually.
[20:36:16] Ox0dea: bradland: https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L2480-L2483
[20:36:22] baweaver: has joined #ruby
[20:36:22] bradland: ah, thx. this'll be my stop then. cya! :)
[20:36:23] Ox0dea: And there's where it's defined exactly like block_given?.
[20:36:28] shevy: haha yeah bradland
[20:36:38] shevy: only the brave Ox0dea is still on his journey into the ruby neverland lands
[20:36:48] Ox0dea: Fuck curiosity, right?
[20:36:55] bradland: ACTION casts lvl 3 unsee
[20:37:00] darix: curiosity killed the cat
[20:37:03] shevy: case DEFINED_ZSUPER:
[20:37:06] shevy: what the ... is ZSUPER
[20:37:08] Ox0dea: darix: Unnecessarily morbid?
[20:37:15] Ox0dea: shevy: Let's go find out!
[20:37:25] dede: has joined #ruby
[20:37:42] bradland: shevy: it's how christopher walts says super
[20:37:44] darix: hmm i think i block the OBS a bit with the ruby version updates *whistles*
[20:38:13] shevy: darix what ruby version do you use right now?
[20:38:20] darix: shevy: depends
[20:38:30] jgt1: has joined #ruby
[20:38:42] powersurge: anyone ever have to execute a job after an array of other jobs complete with delayed job?
[20:38:48] powersurge: having a hard time finding a good solution
[20:39:15] darix: shevy: but it doesnt matter much. you can get ruby 2.2 e.g. from http://download.opensuse.org/repositories/devel:/languages:/ruby/ + a lot of packaged gems from http://download.opensuse.org/repositories/devel:/languages:/ruby:/extensions/
[20:40:02] bradland: powersurge: something like this? https://github.com/Bill/orchestrated
[20:41:09] darix: shevy: i actually got rubinius building and soon the gems should be building for it too
[20:41:31] powersurge: maybe! I'll take a peek bradland
[20:41:31] skade: has joined #ruby
[20:41:34] powersurge: thanks for the lead
[20:41:57] programmerq: has joined #ruby
[20:42:07] baroquebobcat: has joined #ruby
[20:42:58] helpa: has joined #ruby
[20:43:25] helpa: has joined #ruby
[20:43:27] gerep: bradland, I made a test that worked but I'll check it again. I have installed rubygem-bundler first and then ruby
[20:43:39] gerep: bradland, I'll do the process again and make sure that's the reason
[20:43:46] gerep: bradland, does it sound possible? hahah
[20:43:52] baroquebobcat_: has joined #ruby
[20:45:30] Frem: has joined #ruby
[20:45:34] ashleyhindle: Is there a well written, up to date, smallish ruby library/app that you've used recently that I could study?
[20:45:41] dgutierrez1287: has joined #ruby
[20:46:01] [gmi]: has joined #ruby
[20:46:17] mistermocha: has joined #ruby
[20:47:35] shevy: gerep make sure to check "gem env" output too, and try to find out how many ruby versions + have, and how many install paths you use for your local .gem files (when you download a .gem, it is stored locally too in a directory)
[20:47:58] gerep: shevy, ok
[20:48:02] Averna: has joined #ruby
[20:49:36] snockerton: has joined #ruby
[20:50:11] dfockler: ashleyhindle: frappuchino is interesting, and it's up to date ish
[20:50:27] ashleyhindle: Thanks dfockler I'll look
[20:50:47] dfockler: I think it's actually spelled frappuccino
[20:50:50] dotix: has joined #ruby
[20:51:49] einarj_: has joined #ruby
[20:52:20] northfurr: has joined #ruby
[20:53:05] benlieb: has joined #ruby
[20:53:39] bruno-: has joined #ruby
[20:53:50] TheNet: has joined #ruby
[20:54:41] rfizzle: has joined #ruby
[20:57:42] eam: spelled "starbucks intends to vigorously defend our trademarks"
[20:58:17] dojobo: has joined #ruby
[20:59:19] jenrzzz: has joined #ruby
[20:59:48] Motoservo: has joined #ruby
[20:59:59] sheldonh: has joined #ruby
[21:00:48] skade: has joined #ruby
[21:01:09] sheldonh: i'm struggling to get my docs to hyperlink class and method names on rubydoc.info, which i understand uses yard. yard says its compatible with rdoc, but i seem to have to wrap class and method names in braces to get them linked, which then breaks linking in rdoc
[21:01:13] rehat: has joined #ruby
[21:01:18] jackjackdripper: has joined #ruby
[21:01:25] rideh: has joined #ruby
[21:02:18] josh4: has joined #ruby
[21:02:43] benlovell: has joined #ruby
[21:05:18] benlieb: has joined #ruby
[21:05:30] yeticry: has joined #ruby
[21:05:31] Jamo_: has joined #ruby
[21:06:01] mary5030: has joined #ruby
[21:07:17] tenderlove: has joined #ruby
[21:09:29] renderful: has joined #ruby
[21:10:45] snockerton: any tips for finding a missing 'end' ?
[21:10:53] Ox0dea: snockerton: gg=G
[21:10:57] pipework: snockerton: align your code and then read it.
[21:10:59] snockerton: in a huge nested structure
[21:11:11] pipework: Reading is fundamental.
[21:11:39] Ox0dea: snockerton: Install Vim, open the file, gg=G, look for the first sign of wonkiness.
[21:12:19] finisherr: has joined #ruby
[21:12:21] Ox0dea: Perhaps there's some Vim as a Service you could use to avoid having to install it.
[21:12:42] devdazed: has joined #ruby
[21:12:47] northfurr: has joined #ruby
[21:12:57] snockerton: i'm morally opposed to installing vim
[21:13:08] pipework: Not everyone can have good taste.
[21:13:16] toretore: cast him into the fire
[21:13:18] pipework: snockerton: Align your code and then read it. Use whatever you want.
[21:13:55] eam: Ox0dea: M-x viper-mode
[21:14:10] Ox0dea: Needs more VimL.
[21:14:31] Ox0dea: (Not really, obviously.)
[21:14:42] snockerton: i would expect rubucop to do this for me
[21:14:51] rideh: has joined #ruby
[21:15:01] snockerton: but it prefers to complain about more useful issues like column length...
[21:15:03] pipework: snockerton: I'd expect it to do my job for me so I can retire early.
[21:15:17] Ox0dea: > My tools are to blame.
[21:15:19] pipework: I got what I paid for though. :(
[21:15:41] snockerton: pipework: i don't deny being lazy
[21:15:49] pipework: Ox0dea: I don't know what you're talking, I just use ( in lisp and then automatically close all ) so I don't have to type them.
[21:16:05] Ox0dea: pipework: To clarify, I was castigating VimL, not Lisp.
[21:16:08] pipework: snockerton: Whale, it's also a funny thing to suggest if you think about how to actually get that to work.
[21:16:18] shevy: (stop(making(fun(of(lisp(already
[21:16:20] pipework: Ox0dea: Was just a lul about not wanting to put closing stuff where it belongs.
[21:17:01] Ox0dea: snockerton: Do you know how to auto-align your entire file?
[21:17:05] bap1313: has joined #ruby
[21:17:32] iloverubynoob: has joined #ruby
[21:17:59] snockerton: atom has auto-indent
[21:18:20] Ox0dea: Do you know how to invoke it?
[21:18:25] Ox0dea: pipework: Do you use electric-indent-mode?
[21:18:36] abdoudjanifresh: has joined #ruby
[21:18:36] pipework: Ox0dea: I don't know what that is.
[21:18:45] Ox0dea: But you use Emacs?
[21:18:50] pipework: What made you think I use emacs?
[21:18:51] snockerton: yea i click on "Auto Indent"
[21:19:02] Ox0dea: pipework: Shit, I conflated you with eam, it seems.
[21:19:04] pipework: snockerton: the presence of the word 'click' is telling.
[21:19:09] snockerton: pipework: because all ass holes use emacs
[21:19:12] pipework: snockerton: Anyways, fix your code!
[21:19:19] pipework: Stop screwing up!
[21:19:38] pipework: There are other perfectly good directions you can choose from.
[21:20:19] snockerton: there i just created a key binding for auto-indent
[21:20:23] binaryplease: has joined #ruby
[21:20:36] Ox0dea: So fookin' h4xx0r, mate.
[21:20:55] snockerton: i know right
[21:21:15] Ox0dea: In any case, it should become quite obvious where you're missing an `end` after you've aligned your code.
[21:21:36] snockerton: i just want to live up to the folks in #ruby
[21:21:40] Ox0dea: A method definition will go on much longer than it ought to, or something along those lines.
[21:21:52] rideh: has joined #ruby
[21:22:00] Ox0dea: snockerton: We're considering sacrificing you to the red god.
[21:22:20] blackmesa: has joined #ruby
[21:22:23] cndiv: has joined #ruby
[21:22:46] bronson: has joined #ruby
[21:22:58] sheldonh: sometimes i get "expecting keyword_end" because i opened with do but closed with a brace. fun times
[21:23:02] snockerton: sry, already done in #rubyonrails
[21:23:02] cndiv: Hey all, is there a great Ruby "cheat sheet / basic defintions" PDF that you all know about? Something for me to stare at, tacked to my wall?
[21:23:41] Ox0dea: ?quickref cndiv
[21:23:41] ruboto: cndiv, http://www.zenspider.com/Languages/Ruby/QuickRef.html
[21:24:15] sheldonh: cndiv: also, well worth becoming familiar with the documentation for String, Numeric, Array, Hash and Enumerable. they will take you far
[21:24:25] cndiv: Ox0dea: I've seen that, it's great! What about the same idea, but reduced to something designed for printing out on a wall?
[21:24:43] Ox0dea: cndiv: A loving hand + wkhtmltopdf, I suppose.
[21:24:44] cndiv: I benefit from having a stereotype poster to stare at in early stages.
[21:25:07] sheldonh: cndiv: i meant Integer, not Numeric
[21:25:15] cndiv: Ox0dea: That might be it.
[21:25:22] cndiv: sheldonh: note taken, thank you.
[21:25:31] icarus: has joined #ruby
[21:25:47] solars: has joined #ruby
[21:25:48] cndiv: I'll give those a try, thank you all.
[21:26:00] dorei: is there some gem that would help me convert \r\n to \n, remove/collapse whitespaces/nbsp, remove html entities, etc from strings? too lazy to reinvent the wheel
[21:26:00] baweaver: has joined #ruby
[21:26:05] sheldonh: so it looks like i have to choose between rdoc and yard. meh
[21:26:14] snockerton: finally found it, was because I had a blah.each do |x| if stuff
[21:26:23] Ox0dea: dorei: require 'cgi'
[21:26:37] dorei: really? cgi is what i'm looking for? :O
[21:26:42] dorei: let me check :)
[21:26:45] Ox0dea: dorei: Well, it's got lots of relevant convenience methods.
[21:26:47] shevy: Ox0dea do you use Go? they had a new release
[21:26:55] Ox0dea: 1.6, you mean?
[21:27:07] shevy: dorei yeah CGI.... hmmm.. escape_html or something
[21:27:15] shevy: it has all those thingies
[21:27:57] skade: has joined #ruby
[21:28:39] Ox0dea: >> ObjectSpace.each_object(Class).select { |c| c < Numeric } # sheldonh
[21:28:40] ruboto: Ox0dea # => [Complex, Rational, Bignum, Float, Fixnum, Integer] (https://eval.in/419214)
[21:28:40] shevy: "The compiler tool chain was translated from C to Go"
[21:29:00] Ox0dea: shevy: That's very old news?
[21:29:22] miah: http://tip.golang.org/doc/go1.5
[21:29:26] miah: is the recent news.
[21:30:02] jenrzzz: has joined #ruby
[21:30:14] miah: says "The compiler and runtime are now written entirely in Go (with a little assembler). C is no longer involved in the implementation, and so the C compiler that was once necessary for building the distribution is gone. "
[21:30:34] Limix: has joined #ruby
[21:30:34] miah: anyways. this is OT =)
[21:31:21] shevy: Ox0dea quit living in the future man!
[21:31:36] shevy: everything is old news now to him :(
[21:31:51] sheldonh: Ox0dea: the reason i suggest Integer is that it has methods that are useful for control flow and a few useful predicates
[21:32:02] sheldonh: dorei: you could try the sanitize gem
[21:33:10] symm-: has joined #ruby
[21:33:25] yfeldblum: has joined #ruby
[21:34:04] shevy: redirecting stdin and stdout taxes my poor brain
[21:35:20] Ox0dea: sheldonh: Sure, I was mostly just clarifying your correction.
[21:36:02] sheldonh: Ox0dea: shush, you're clarifying something else :P
[21:36:46] baweaver: #rubychannelinanutshell
[21:37:20] sheldonh: baweaver: you're late. the text editor conversation was ages ago ;)
[21:37:37] imperator: has left #ruby: ("Leaving")
[21:37:37] baweaver: it was, and we decided vim
[21:37:44] baweaver: are people still pretending that's an issue?
[21:37:59] FernandoBasso: has joined #ruby
[21:38:12] bougyman: I see a lot more variety in editor choices these days, not less.
[21:38:25] bougyman: surely there's some emacsers in here.
[21:38:26] platzhirsch: has left #ruby: ()
[21:38:27] Azure: has joined #ruby
[21:38:46] baweaver: ACTION holds up cross and splashes holy water on screen
[21:38:56] shevy: vim and emacs are fossil coders
[21:39:11] bougyman: shevy: you're using atom, aren't you?
[21:39:19] shevy: bluefish 1.0.7!
[21:39:27] shevy: I'd like to switch though
[21:39:33] devdazed: has joined #ruby
[21:39:51] shevy: It would be cool if one could cherry pick from among all existing editors out there
[21:39:54] bougyman: that loks horrible
[21:40:06] baweaver: ACTION started as a SysAdmin and is used to Headless Servers
[21:40:22] bougyman: if it can't run in a tmux it's not an option, for me.
[21:40:36] bougyman: and of those that can i'm best with vim.
[21:40:45] Ox0dea: </thread>
[21:40:47] kies: has joined #ruby
[21:41:00] blackmesa: has joined #ruby
[21:41:12] baweaver: <thread topic="text-editors">
[21:41:36] hotpancakes: has joined #ruby
[21:41:46] Ox0dea: :terminal is fookin' awesome.
[21:41:51] adaedra: MorpheusVim
[21:41:51] Aria: <4 neovim
[21:42:52] baweaver: I still think it's funny that XBox tried to get XBox One to be called 'The One' and we all contributed to getting it redubbed the XBone
[21:42:56] iamninja: has joined #ruby
[21:46:05] havenwood: has joined #ruby
[21:46:28] bootstrappm: has left #ruby: ()
[21:48:53] mistermocha: has joined #ruby
[21:49:13] kr3ssh: has joined #ruby
[21:49:42] KnownSyntax: has joined #ruby
[21:50:37] cschneid_: when does ruby parse regexp literals? I have a `if RUBY_VERSION newer than 1.9 then use fancy regexp, otherwise use boring`. But ruby 1.8 still attempts to parse the fancy one at boot (and fails & errors)
[21:51:20] jhass: time to drop 1.8 support \o/
[21:51:33] baweaver: 1.8 is a massive security hole
[21:51:37] baweaver: deprecated long ago
[21:51:50] Aria: Are there open CVEs against it?
[21:52:00] cschneid_: yeah, I'm aware. but I need to do this. I'm more curious about the parse-time of regex literals
[21:52:10] cschneid_: if condition then /abc/ else /xyz/ end
[21:52:17] cschneid_: no matter the condition, both seem to be parsed?
[21:52:29] baweaver: you need to upgrade
[21:52:56] jhass: Aria: iirc some minor ones, yes. Basically it's also affected by the last couple of things fixed in the last security releases for 1.9 iirc
[21:53:02] chichou: has joined #ruby
[21:53:13] baweaver: 2.2.3 just came out, trying to mitigate against ancient bugs is ill-advised
[21:53:25] baweaver: that should be your priority
[21:54:00] sheldonh: cschneid_: i wouldn't be surprised if ruby performed some syntax checking of regular expressiong while loading a source file
[21:54:03] jhass: cschneid_: you could probably workaround with Regexp.new, but please just upgrade instead
[21:54:28] sheldonh: cschneid_: put the regular expression in each of two files and require the right one based on ruby version
[21:54:29] cschneid_: yeah, not my code. Writing a plugin to a customer who I don't have any control over.
[21:54:37] lwu_: has joined #ruby
[21:54:52] cschneid_: regexp.new is probably the easiest workaround, but you're right that it's annoying to work around ancient rubies.
[21:54:59] sheldonh: cschneid_: in a constant in a module in each of two files, obviously :)
[21:55:20] hydrozen: has joined #ruby
[21:56:02] ivanskie: has joined #ruby
[21:56:25] whiteline: has joined #ruby
[21:57:31] chichou: has joined #ruby
[21:58:54] greenride: has joined #ruby
[21:59:17] zenspider: cschneid: (least tab completable nick here) ... it'll parse regardless of your RUBY_VERSION trap (has to be able to parse to find the end of the conditional). You can stringify both regexps, pop them in DATA, or separate files. I prefer stringify myself
[22:00:07] Ox0dea: zenspider: Your client doesn't prioritize recent speakers for completion?
[22:01:23] platzhirsch: has joined #ruby
[22:01:24] pipework: Haha, just you wait until I /nick to |work for a long while.
[22:02:00] bogn: has joined #ruby
[22:03:45] zenspider: don't think so... also "csch" is hella-awkward on dvorak.
[22:03:51] zenspider: tho, doesn't look much better on qwerty
[22:04:06] zenspider: at least it is two handed there
[22:05:30] platzhirsch: what is a nice generic name for some webserver instances
[22:05:53] jenrzzz: has joined #ruby
[22:06:20] radgeRayden: has joined #ruby
[22:06:23] Thermatix: has joined #ruby
[22:06:34] jbw: has joined #ruby
[22:07:22] cschneid_: zenspider: sorry my name offends your IRC :) I ended up doing the multi-file require since it least interferes with the 99% case of newer rubies.
[22:07:32] sepp2k: has joined #ruby
[22:07:48] cschneid_: was just surprising that it did regex literal verification at parse time, not run time.
[22:07:50] ellisTAA: has joined #ruby
[22:09:22] lagweezle: phreakocious_: webserver_instance_<some hash here>
[22:09:38] jgt1: has joined #ruby
[22:09:48] lagweezle: That ... was the wrong name.
[22:09:57] lagweezle: platzhirsch: webserver_instance_<some hash here>
[22:10:02] lagweezle: ACTION goes in search of caffeine.
[22:10:16] platzhirsch: ACTION follows lagweezle
[22:10:22] devdazed: has joined #ruby
[22:10:42] Ox0dea: cschneid_: Were you getting a SyntaxError?
[22:11:37] cschneid_: Ox0dea: SyntaxError: compile error (irb):1: undefined (?...) sequence:
[22:11:56] cschneid_: I was using a negative lookbehind in a regex, and it bit me when trying to go for our one customer still running 1.8
[22:12:17] Ox0dea: Right, I think that's to be expected, honestly. It's not as if Ruby's regexen aren't part of the language proper.
[22:13:06] cschneid_: Ox0dea: yeah, and they did the wholesale engine swap in ... 1.9?
[22:14:09] yfeldblum: has joined #ruby
[22:14:31] Ox0dea: cschneid_: From Oniguruma to Onigmo, you mean?
[22:14:38] cschneid_: yeah, that.
[22:14:45] Ox0dea: I thought that was much more recent?
[22:14:52] cschneid_: and it brought along some of the fancier regex features like lookbehinds.
[22:14:54] hfp: Hey all, is there something like this http://api.rubyonrails.org/classes/ActionView/Helpers/DateHelper.html#method-i-distance_of_time_in_words but for plain numbers (i.e. 1.83 return "about 2")? Before you tell me #RoR: I'm not using Rails :)
[22:15:10] jbw: has joined #ruby
[22:15:11] chichou: has joined #ruby
[22:15:21] Ox0dea: hfp: Fixnum#round?
[22:15:50] cschneid_: Ox0dea: looks like it was from Something (1.8) => Oniguruma (1.9) http://stackoverflow.com/questions/7484748/is-ruby-1-9-2s-new-regex-engine-oniguruma-very-slow
[22:17:02] Ox0dea: >> def human n; (r = n.round) == n ? n.to_s : "about #{r}" end; [human(2), human(1.83)] # hfp
[22:17:04] ruboto: Ox0dea # => ["2", "about 2"] (https://eval.in/419223)
[22:19:54] Averna: has joined #ruby
[22:20:03] hotpancakes: has joined #ruby
[22:23:41] akkad: has joined #ruby
[22:24:01] charliesome: has joined #ruby
[22:25:14] shevy: stringio confuses me
[22:25:45] doublemalt_: has joined #ruby
[22:25:59] Oka: has joined #ruby
[22:26:04] c0ncealed: has joined #ruby
[22:26:07] EminenceHC: has joined #ruby
[22:27:47] shevy: why does this not output anything? http://pastie.org/10362599
[22:28:35] banister: has joined #ruby
[22:29:29] radgeRayden_: has joined #ruby
[22:29:47] Ox0dea: shevy: It... does?
[22:30:21] rakm: has joined #ruby
[22:30:37] Ox0dea: Check the value of `Bar.new.tap(&:test).string`.
[22:30:41] ivanskie: has joined #ruby
[22:30:56] rideh: has joined #ruby
[22:31:02] andywojo: has joined #ruby
[22:31:13] shevy: now I am confused
[22:31:51] shevy: can I not get any output from a StringIO object?
[22:32:27] Ox0dea: You seem to have misunderstood the thing's purpose.
[22:32:33] shevy: hmm it is stored in string
[22:32:53] shevy: yeah. I thought it would be a simple toggle
[22:33:21] devoldmx: has joined #ruby
[22:33:47] Ox0dea: Well, yes, that's one way to get at its data, but you can also interact with it more or less like any other IO object.
[22:35:42] bodgix: has left #ruby: ()
[22:36:07] jtdoncas: has joined #ruby
[22:36:24] hotpancakes: has joined #ruby
[22:36:33] diegoaguilar: has joined #ruby
[22:37:39] zenspider: shevy: what are you ACTUALLY trying to do?
[22:37:40] shevy: so all puts and print will be redirected in such a sublcass
[22:37:53] shevy: I am trying to redirect all puts and print into an @ivar
[22:38:12] zenspider: shevy: go steal my captureio method from minitest
[22:38:14] roolo: has joined #ruby
[22:38:18] shevy: ok lemme see
[22:38:32] pencilcheck: has joined #ruby
[22:38:33] zenspider: or... use minitest. :P
[22:39:43] skade: has joined #ruby
[22:40:40] zenspider: >> require "minitest/assertions"; include Minitest::Assertions; capture_io { puts "woot" }
[22:40:40] ruboto: zenspider # => ["woot\n", ""] (https://eval.in/419224)
[22:40:48] zenspider: hah. I didn't exactly expect that to work
[22:43:27] zenspider: there's some synchronization code in there but the default is implemented as `yield`
[22:43:33] hs366: has joined #ruby
[22:44:53] havenwood: >> require 'minitest/assertions'; include Minitest::Assertions; module Minitest::Assertions; attr_accessor :assertions end; @assertions = 0; assert true
[22:44:54] ruboto: havenwood # => true (https://eval.in/419225)
[22:46:03] havenwood: zenspider: It'd be nifty to have a single module to include to get top level assertions for playing.
[22:46:55] havenwood: <3 Minitest
[22:47:01] einarj: has joined #ruby
[22:48:19] kr3ssh: has joined #ruby
[22:49:46] Ox0dea: zenspider: Did you know about defined?(yield)?
[22:50:30] decaff: has joined #ruby
[22:50:48] banister: has joined #ruby
[22:51:00] Wolland: has joined #ruby
[22:51:07] banister: Ox0dea is that the same as block_given?
[22:51:28] havenwood: Ox0dea: block_given? seems so much more refined and sophisticated :P
[22:51:42] zenspider: block_given? is much more expressive to intent
[22:52:08] jpfuentes2: has joined #ruby
[22:52:13] Ox0dea: Yes to all.
[22:52:31] zenspider: havenwood: like, writing assertions in irb?
[22:52:37] havenwood: zenspider: yup
[22:52:39] zenspider: not really sure what'd that get you
[22:52:47] zenspider: failed assertions raise. it'd be messy
[22:53:05] jbw: has joined #ruby
[22:53:13] havenwood: zenspider: mostly just newcomers or playing with assertions you're not sure on
[22:54:06] havenwood: zenspider: you can of course always run your tests, just the super tight feedback loop of the REPL makes trying each assertion quick
[22:54:15] mistermocha: has joined #ruby
[22:54:57] havenwood: zenspider: or Pry to explore the assertions then try them
[22:55:20] drbrain: might not be so terrible if you augmented irb to rescue the exception and print only the message
[22:56:08] greymeister: has joined #ruby
[22:56:48] chohe: has joined #ruby
[22:57:15] hydrozen: has joined #ruby
[22:57:26] bodgix: has joined #ruby
[22:57:37] choke: has joined #ruby
[22:57:51] benlovell: has joined #ruby
[22:58:29] jenrzzz: has joined #ruby
[22:59:33] baweaver: has joined #ruby
[23:00:01] jimms: has joined #ruby
[23:01:47] abdoudjanifresh: has joined #ruby
[23:02:04] TheRealHansonE: has joined #ruby
[23:02:16] dopie: has joined #ruby
[23:02:37] zenspider: havenwood: it'd be nice if irb/pry had a logging mode that helped you capture the exploration better...
[23:02:49] zenspider: that could be interesting... log the results as comments or something
[23:03:53] Timba-as: has joined #ruby
[23:04:22] rakm: has joined #ruby
[23:05:22] symm-: has joined #ruby
[23:05:41] Schmidt: has joined #ruby
[23:05:58] hotpancakes: has joined #ruby
[23:06:33] ivanskie: has joined #ruby
[23:08:15] whiteline: has joined #ruby
[23:09:28] baweaver: zenspider: context?
[23:09:39] baweaver: ACTION works on pry on occasion.
[23:11:50] einarj: has joined #ruby
[23:12:16] djbkd: has joined #ruby
[23:12:38] dgutierrez1287: has joined #ruby
[23:13:02] Log1x: has joined #ruby
[23:13:14] patrick99e99: has joined #ruby
[23:13:52] patrick99e99: Hey there ruby friends.. I am trying to spy in a test that sleep gets called, and I can't seem to make my test pass: expect(Kernel).to have_received(:sleep) ................ Unless I actually do Kernel.sleep in my real code
[23:14:07] patrick99e99: Why is calling "sleep" not delegating to Kernel?
[23:15:17] workmad3: patrick99e99: because Kernel.sleep is the class method on Kernel, not the instance method of the object you're trying to stub it on
[23:15:32] nertzy: has joined #ruby
[23:15:55] drbrain: ??? while they're the same implementation, how you get there is different
[23:15:56] patrick99e99: yeah.. I guess I as assuming under the hood was something like --> def sleep(*args); Kernel.sleep(args); end
[23:16:15] drbrain: Kernel uses module_function to have both #sleep and ::sleep
[23:16:30] iloverubynoob: has joined #ruby
[23:16:40] baweaver: >> Object.ancestors
[23:16:41] ruboto: baweaver # => [Object, Kernel, BasicObject] (https://eval.in/419277)
[23:16:48] patrick99e99: hmm so how can I stub this?
[23:16:52] jbw: has joined #ruby
[23:17:06] baweaver: expect(subject).to receive(:sleep)
[23:17:26] jackjackdripper: has joined #ruby
[23:17:37] icarus: has joined #ruby
[23:17:56] ivanskie: has joined #ruby
[23:18:26] drbrain: fun fact: you can also def subject.sleep; end and prevent sleeping in your tests
[23:18:58] benlieb: has joined #ruby
[23:19:18] patrick99e99: yeah expect(subject).to receive(:sleep) does not work...............
[23:19:26] patrick99e99: but I think def subject.sleep will... Ill try that
[23:21:24] jiada: has joined #ruby
[23:21:32] Cronon: has joined #ruby
[23:21:32] blackjid: has joined #ruby
[23:22:31] omegahm_: has joined #ruby
[23:22:40] charliesome: has joined #ruby
[23:23:42] jzigmund_: has joined #ruby
[23:23:43] bronson: has joined #ruby
[23:24:51] zenspider: patrick99e99: does that seem like a valuable test to you?
[23:25:33] zenspider: patrick99e99: you can also test a subclass that defines its own override of sleep that does nothing
[23:26:16] GeissT: has joined #ruby
[23:27:25] r0x0rZ: has joined #ruby
[23:27:58] pontiki: if i'm the subject, that test definitely fails
[23:29:11] jacaballero: has joined #ruby
[23:30:59] zenspider: pontiki: hah
[23:31:54] diegoviola: has joined #ruby
[23:35:18] kt2: has joined #ruby
[23:35:26] einarj: has joined #ruby
[23:36:48] ramfjord: has joined #ruby
[23:37:13] fedexo: has joined #ruby
[23:37:33] jbw: has joined #ruby
[23:38:45] phutchins: has joined #ruby
[23:40:49] leafybasil: has joined #ruby
[23:43:17] IceyEC: has joined #ruby
[23:43:36] mary5030: has joined #ruby
[23:44:07] matled: has joined #ruby
[23:44:28] jgt1: has joined #ruby
[23:44:40] dopamean_: has joined #ruby
[23:50:51] binaryplease: has joined #ruby
[23:52:19] dimasg: has joined #ruby
[23:53:42] Motoservo: has joined #ruby
[23:54:06] M0ni: has joined #ruby
[23:55:09] chichou: has joined #ruby
[23:55:19] blackmesa: has joined #ruby
[23:56:02] mistermocha: has joined #ruby
[23:57:19] pen_: has joined #ruby
[23:57:46] ivanskie: ook i think i need a reminder.. lol uuh how do u do a wildcard of string? in my ruby i'm iterating through list of files, i need to skip all starting with .* ... without listing everything manually this doesnt work https://github.com/i5okie/CDR/blob/master/app#L18
[23:58:15] ivanskie: Im trying to scan my memory for all those codeschool and teamtreehouse lessons i watched now. argh
[23:58:37] josh4: has joined #ruby
[23:58:48] ICantCook: has joined #ruby
[23:59:35] hotpancakes: has joined #ruby
[23:59:48] RegulationD: has joined #ruby