« Back to channel list

#ruby - 02 June 2016

« Back 1 day Forward 1 day »
[00:00:01] Radar: al2o3-cr: ban must've expired. It won't happen again.
[00:01:26] kies: has joined #ruby
[00:02:54] al2o3-cr: Radar: first class, if you know what i mean.
[00:05:08] danostrowski: has joined #ruby
[00:05:31] al2o3-cr: Radar: mind a PM?
[00:05:36] Radar: al2o3-cr: go ahead
[00:08:11] Akagi201: has joined #ruby
[00:10:14] hutch34: has joined #ruby
[00:10:36] chouhoulis: has joined #ruby
[00:12:03] cpup: has joined #ruby
[00:13:19] aryanayra: has joined #ruby
[00:21:58] vikaton: has joined #ruby
[00:24:41] roamingdog: has joined #ruby
[00:24:59] aupadhye: has joined #ruby
[00:25:56] mesamoo: has joined #ruby
[00:26:11] rickmasta: has joined #ruby
[00:28:42] nat2610: has joined #ruby
[00:29:55] zapata: has joined #ruby
[00:32:50] nankyokusei: has joined #ruby
[00:33:39] lightt: has joined #ruby
[00:34:04] lightt: has joined #ruby
[00:35:46] shevy: al2o3-cr I use ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]; in general these days I can use the latest official ruby release without problem
[00:37:08] shevy: oddly enough, after the 1.8.x to 1.9.x to 2.x, I actually don't really have any need for multiple different ruby versions. I got sorta complacent though, my code makes use of new syntax-featurs too, like foo: :bar for hashes. Sometimes I think that this is actually more readable than the => or perhaps just shorter - I use => too though
[00:38:11] al2o3-cr: shevy: totally agree if you do
[00:39:42] CloCkWeRX: has joined #ruby
[00:40:43] maletor3: has joined #ruby
[00:43:00] Radar: I use { symbol: value } where I can, but I find oftentimes switching back to "
[00:43:13] Radar: "string" => value when parsing stuff like JSON
[00:43:22] RegulationD: has joined #ruby
[00:44:06] nat2610: has joined #ruby
[00:44:36] idefine_: has joined #ruby
[00:44:38] cd83x: has joined #ruby
[00:45:04] roamingdog: has joined #ruby
[00:47:49] Phaenix: How could I improve this implementation so I don't need to provide multiple fields? https://gist.github.com/phaenix/f0508014f6e95f517c21463e5b4d0fc7
[00:48:32] jenrzzz: has joined #ruby
[00:51:47] hahuang61: has joined #ruby
[00:53:40] roamingdog: has joined #ruby
[00:54:42] roamingdog: has joined #ruby
[00:55:49] nettoweb: has joined #ruby
[00:56:21] ReK2: has joined #ruby
[00:57:34] tenderlo_: has joined #ruby
[00:59:34] Radar: ?rails Phaenix
[00:59:35] ruby[bot]: Phaenix: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[00:59:58] Phaenix: Kay, cheers!
[01:03:40] lightt: has joined #ruby
[01:05:45] solocshaw: has joined #ruby
[01:06:35] agent_white: has joined #ruby
[01:07:57] shevy: agent white is in the house
[01:09:07] roamingdog: has joined #ruby
[01:09:45] al2o3-cr: agent_white: big bird calling big bird
[01:10:00] agent_white: al2o3-cr: Droppin' dinner in 2
[01:10:16] douglasc_: has joined #ruby
[01:10:22] agent_white: ACTION doesn't know army things
[01:10:31] al2o3-cr: big bird only eats seed
[01:11:32] martee: has joined #ruby
[01:12:54] JJM: has joined #ruby
[01:17:54] roamingdog: has joined #ruby
[01:18:56] jrafanie: has joined #ruby
[01:19:05] djbkd: has joined #ruby
[01:20:26] Ropeney: has joined #ruby
[01:20:51] al2o3-cr: >> require 'fiddle'; x = "*"*23; Fiddle::Pointer[Fiddle.dlwrap(x)][16,x.size]
[01:20:53] ruby[bot]: al2o3-cr: # => "\x17\x00\x00\x00e(\x90 \x90\x80\x12A\x11\x00\x00\x00xI\x19A\x11\x00\x00" (https://eval.in/581697)
[01:24:07] ramfjord: has joined #ruby
[01:25:08] roamingdog: has joined #ruby
[01:26:15] uberbrodt: has joined #ruby
[01:32:16] rafadc: has joined #ruby
[01:33:46] nat2610: has joined #ruby
[01:34:28] roamingdog: has joined #ruby
[01:35:04] Spami_: has joined #ruby
[01:35:58] jancel: has joined #ruby
[01:36:23] roamingdog: has joined #ruby
[01:37:12] jenrzzz: has joined #ruby
[01:38:50] cd83x: has joined #ruby
[01:39:47] jeyraof: has joined #ruby
[01:40:05] diegoaguilar: has joined #ruby
[01:40:14] electrostat: has joined #ruby
[01:41:05] nat2610: has joined #ruby
[01:41:20] arlek: has joined #ruby
[01:41:29] maletor3: has joined #ruby
[01:41:49] Yiota: has joined #ruby
[01:41:55] roamingdog: has joined #ruby
[01:42:12] karmatr0n: has joined #ruby
[01:43:54] devbug: has joined #ruby
[01:44:31] RobertBirnie: has joined #ruby
[01:46:04] Maletor: has joined #ruby
[01:50:04] Spami_: has joined #ruby
[01:52:35] infinitone: has joined #ruby
[01:53:13] cd83x: has joined #ruby
[01:56:10] flashpoint9: has joined #ruby
[01:56:17] Akagi201: has joined #ruby
[01:57:53] davedev24: has joined #ruby
[01:58:13] rkazak: has joined #ruby
[02:03:15] jphase: Radar: I seem to have forgotten to bookmark the link you gave me to your book the other day. Help a brother out?
[02:03:41] CloCkWeRX: has left #ruby: ()
[02:03:41] Radar: jphase: https://www.manning.com/books/rails-4-in-action
[02:03:46] jphase: Radar: thank you sir
[02:04:17] jphase: sir/maam/gender neutral
[02:12:24] der-landgraf: has joined #ruby
[02:14:48] mattwashere: has joined #ruby
[02:16:34] gtsai: has joined #ruby
[02:16:44] Vingador_: has joined #ruby
[02:23:22] Devalo: has joined #ruby
[02:24:55] jancel: has joined #ruby
[02:25:12] jphase: has joined #ruby
[02:28:45] watersoul: has joined #ruby
[02:29:45] jrafanie: has joined #ruby
[02:31:15] jaguarmagenta: has joined #ruby
[02:31:18] SilverKey: has joined #ruby
[02:32:17] watersoul: has joined #ruby
[02:33:25] snockerton: has joined #ruby
[02:33:37] nankyokusei: has joined #ruby
[02:37:53] nat2610: has joined #ruby
[02:42:15] maletor3: has joined #ruby
[02:44:00] ramfjord_: has joined #ruby
[02:46:41] gtsai: has joined #ruby
[02:49:14] kraken: has joined #ruby
[02:49:52] krakenr: When do you guys use a double space and when do you guys use tabs? Do you use double space for methods and tabs for conditionals and for loops?
[02:50:40] Eiam_: has joined #ruby
[02:51:11] arescorpio: has joined #ruby
[02:52:23] nat2610: has joined #ruby
[02:52:28] jphase: ?tabs kraken_
[02:52:28] hahuang61: has joined #ruby
[02:52:29] ruby[bot]: kraken_: Ruby community standards recommend using 2 spaces as indentation (see https://github.com/bbatsov/ruby-style-guide#spaces-indentation and https://ukupat.github.io/tabs-or-spaces/).
[02:53:13] krakenr: ah so 2 spacse
[02:53:14] crystal77: has joined #ruby
[02:58:09] sorah: has joined #ruby
[02:59:26] jnoob22: Weird thing I've found .... should 2.2.0 be 3 times faster than 2.3.1? my script is only going through a demo of array methods with a very small size array but should it be that much faster going over the same code?
[03:03:51] scottschecter: has joined #ruby
[03:08:20] Cohedrin: has joined #ruby
[03:15:54] yfeldblum: has joined #ruby
[03:16:29] braincrash: has joined #ruby
[03:18:40] idefine: has joined #ruby
[03:18:55] yfeldblum: has joined #ruby
[03:20:33] launch: has joined #ruby
[03:20:51] nat2610: has joined #ruby
[03:20:55] k3rn31: has joined #ruby
[03:25:53] chouhoulis: has joined #ruby
[03:26:36] floatingpoint: has joined #ruby
[03:26:36] arlek: has joined #ruby
[03:28:30] chouhoulis: has joined #ruby
[03:29:07] nanoz: has joined #ruby
[03:29:54] crystal77: has joined #ruby
[03:32:41] domgetter: has joined #ruby
[03:33:21] Radar: jnoob22: no that shouldn't be the case at all. Do you have some example code?
[03:34:11] rafadc: has joined #ruby
[03:36:13] chipotle: has joined #ruby
[03:43:00] maletor3: has joined #ruby
[03:44:55] jnoob22: Radar, yeah just a sec... ill post on a paste bin
[03:45:00] jnoob22: you guys here have one you prefer?
[03:45:25] aries_liuxueyang: has joined #ruby
[03:45:27] Radar: ?gist jnoob22
[03:45:28] ruby[bot]: jnoob22: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[03:46:11] idefine: has joined #ruby
[03:46:16] jnoob22: Radar, how about this -> http://paste.ofcode.org/TmtdqGiviJ5iU9JMap3YjM
[03:46:37] jnoob22: Radar, let me get the versions for you
[03:47:32] jnoob22: $ ruby --version
[03:47:32] jnoob22: ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]
[03:47:32] jnoob22: $ ruby2 --version
[03:47:32] jnoob22: ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux]
[03:47:42] nat2610: has joined #ruby
[03:47:45] Radar: jnoob22: And how are you timing it?
[03:48:26] Corrosive__: has joined #ruby
[03:48:37] jnoob22: 2.2.0 is faster by a longshot on my laptop
[03:48:37] jnoob22: about 3x time faster
[03:48:46] AnoHito_: has joined #ruby
[03:48:47] jnoob22: just using Linux `time`
[03:48:50] chouhoul_: has joined #ruby
[03:48:59] Radar: What output do you see?
[03:49:05] jnoob22: just a sec
[03:49:10] Radar: on 2.2.3, this is what I see: ruby jnoob.rb 0.04s user 0.01s system 93% cpu 0.051 total
[03:49:20] jnoob22: this is ... 2.3.1 ...
[03:49:22] jnoob22: real 0m0.191s
[03:49:22] jnoob22: user 0m0.103s
[03:49:22] jnoob22: sys 0m0.094s
[03:49:28] beilabs: has joined #ruby
[03:49:28] Radar: On 2.3.1, I see this: ruby jnoob.rb 0.06s user 0.01s system 94% cpu 0.076 total
[03:49:38] Vingador: has joined #ruby
[03:49:39] jnoob22: this is 2.2.0 ...
[03:49:41] jnoob22: real 0m0.071s
[03:49:41] jnoob22: user 0m0.064s
[03:49:41] jnoob22: sys 0m0.004s
[03:50:38] Radar: Yeah, I can see this code running about 0.026 faster under Ruby 2.2.3 than Ruby 2.3.1 on my machine.
[03:50:51] Radar: I'd advise you to file a bug about it on https://bugs.ruby-lang.org/
[03:51:19] jnoob22: when I saw the 0.071 compared to a very equal python script at .200, I was impressed since I'm more of a Python guy
[03:51:42] jnoob22: but the .200 for ruby 2.3.1, i thought there was something very odd.
[03:51:56] jnoob22: Radar, you think that's unexpected behavior?
[03:52:25] Radar: jnoob22: yes I think it is
[03:52:32] Radar: Ruby should be getting faster, not slower!
[03:52:34] aries_liuxueyang: has joined #ruby
[03:52:48] Seich: has joined #ruby
[03:53:10] jnoob22: yeah my thoughts too .... have been looking through release notes to see if there was possibly some new functionality in array methods to account for this but haven't seen anything even close to compelling yet.
[03:53:31] jnoob22: thanks much for the sanity check.
[03:53:31] yfeldblum: has joined #ruby
[03:54:16] yfeldblum: has joined #ruby
[03:54:39] jancel: has joined #ruby
[03:56:11] gix: has joined #ruby
[03:58:39] karmatr0n: has joined #ruby
[04:03:26] nando293921: has joined #ruby
[04:03:49] jnoob22: Radar, there we go -> https://bugs.ruby-lang.org/issues/12453
[04:04:07] snsei: has joined #ruby
[04:04:07] Radar: jnoob22: great, thanks :)
[04:06:01] kareeoleez: has joined #ruby
[04:09:10] JesseH: has joined #ruby
[04:11:19] ketherah: has joined #ruby
[04:12:08] matp: has joined #ruby
[04:12:24] jnoob22: Is there a Ruby dev channel by any chance?
[04:12:51] yfeldblum: has joined #ruby
[04:13:45] nat2610: has joined #ruby
[04:14:34] yfeldblum: has joined #ruby
[04:16:37] scepticulous: has joined #ruby
[04:21:08] AnoHito_: has joined #ruby
[04:23:04] monoprotic: has joined #ruby
[04:23:12] grassass: has joined #ruby
[04:24:01] Maletor: has joined #ruby
[04:24:20] finisherr: has joined #ruby
[04:24:56] neanderslob: has joined #ruby
[04:25:12] beilabs: has joined #ruby
[04:25:26] shortdudey123: has joined #ruby
[04:26:04] hinbody: has joined #ruby
[04:26:14] sk_0: has joined #ruby
[04:26:27] mg^: has joined #ruby
[04:26:33] jnoob22: has joined #ruby
[04:28:43] dionysus69: has joined #ruby
[04:30:40] nat2610: has joined #ruby
[04:31:21] SpikeMaster: has joined #ruby
[04:31:58] djbkd: has joined #ruby
[04:33:08] elifoster: has joined #ruby
[04:33:48] SpikeMaster: has left #ruby: ("ERC (IRC client for Emacs 24.5.1)")
[04:34:35] nankyokusei: has joined #ruby
[04:35:20] pawnbox: has joined #ruby
[04:36:10] k3rn31: has joined #ruby
[04:37:19] JakFrist: has joined #ruby
[04:38:47] davedev24: has joined #ruby
[04:39:21] cajone: has left #ruby: ()
[04:43:45] maletor3: has joined #ruby
[04:44:49] hahuang61: has joined #ruby
[04:45:23] CorOne: has joined #ruby
[04:45:37] RegulationD: has joined #ruby
[04:47:48] agent_white: jnoob22: I don't believe so. Mailing lists/user groups are your closest bet to that. I _thought_ #ruby-lang was for that, but apparently it's invite-only now.
[04:48:00] beilabs: has joined #ruby
[04:54:13] Coldblackice: has joined #ruby
[04:54:59] jnoob22: np, thanks agent_white
[04:56:20] tax: has joined #ruby
[04:59:14] LoneHermit: has joined #ruby
[04:59:21] karmatr0n: has joined #ruby
[04:59:38] nomadic: has joined #ruby
[05:05:38] shinnya: has joined #ruby
[05:06:39] Devalo: has joined #ruby
[05:06:57] nickjj_: has joined #ruby
[05:08:48] idefine: has joined #ruby
[05:10:30] ledestin: has joined #ruby
[05:10:51] craigp: has joined #ruby
[05:12:10] bluOxigen: has joined #ruby
[05:16:59] Pupeno: has joined #ruby
[05:19:32] mleung: has joined #ruby
[05:21:55] jancel: has joined #ruby
[05:22:36] rafadc: has joined #ruby
[05:23:06] Maletor: has joined #ruby
[05:23:09] arlek: has joined #ruby
[05:24:15] tAn: has joined #ruby
[05:24:35] sauvin: has joined #ruby
[05:26:22] matp: has joined #ruby
[05:27:46] RobertBirnie: has joined #ruby
[05:28:39] ur5us: has joined #ruby
[05:29:49] Es0teric: has joined #ruby
[05:30:23] limelacroix: has joined #ruby
[05:30:28] Es0teric: has joined #ruby
[05:31:12] Es0teric: has joined #ruby
[05:31:54] Es0teric: has joined #ruby
[05:32:32] Es0teric: has joined #ruby
[05:35:25] JakFrist: has joined #ruby
[05:38:13] phredus: has joined #ruby
[05:38:29] Pupeno: has joined #ruby
[05:39:17] tildes_: has joined #ruby
[05:43:34] uberbrodt: has joined #ruby
[05:43:57] SilverKey: has joined #ruby
[05:44:33] maletor3: has joined #ruby
[05:45:33] Yiota: has joined #ruby
[05:47:32] anisha: has joined #ruby
[05:48:19] cd83x: has joined #ruby
[05:48:41] LoneHerm_: has joined #ruby
[05:49:48] last_staff: has joined #ruby
[05:52:18] joonty: has joined #ruby
[05:53:40] wald0: has joined #ruby
[05:55:33] wald0: ok so im learning C (K&R book), but i found something missing, i need to learn all those linking, cflags, make, autotools stuff so commonly used in linux*, suggestions?
[05:57:48] howdoi: has joined #ruby
[05:58:38] Infra-Red: has joined #ruby
[05:58:49] phredus: has joined #ruby
[05:58:50] TomyLobo: has joined #ruby
[05:59:16] codecop: has joined #ruby
[05:59:57] moeabdol: has joined #ruby
[06:00:22] karmatr0n: has joined #ruby
[06:00:35] beilabs: has joined #ruby
[06:02:10] Caerus: wald0, maybe ask around in C## and ##Linux. also, stackoverflow is usually a good source for information, most likely someone has already asked your questions there.
[06:03:00] kareeoleez: has joined #ruby
[06:03:16] _aeris_: has joined #ruby
[06:05:22] electrostat: has joined #ruby
[06:05:43] Infra-Red: has joined #ruby
[06:06:34] kareeoleez: has joined #ruby
[06:06:38] wald0: duh, im in #ruby? sorry
[06:07:00] Macaveli: has joined #ruby
[06:08:54] ur5us: has joined #ruby
[06:08:59] eGGshke: has joined #ruby
[06:12:57] Robtop__: has joined #ruby
[06:14:48] jetpackjoe: has joined #ruby
[06:15:00] Macaveli: has joined #ruby
[06:15:00] gtsai: has joined #ruby
[06:15:05] devbug_: has joined #ruby
[06:19:57] fenre: has joined #ruby
[06:24:39] andikr: has joined #ruby
[06:25:07] Dimik: has joined #ruby
[06:25:20] n1x-nz: has joined #ruby
[06:29:31] davedev24: has joined #ruby
[06:35:24] nankyokusei: has joined #ruby
[06:36:52] phredus: has joined #ruby
[06:37:19] sauvin: has joined #ruby
[06:38:53] certainty: has joined #ruby
[06:39:21] ffgghhj: has joined #ruby
[06:42:39] cd83x: has joined #ruby
[06:43:56] wald0: has joined #ruby
[06:45:15] CrazyEddy: has joined #ruby
[06:45:19] maletor3: has joined #ruby
[06:46:50] scepticulous: has joined #ruby
[06:48:14] Yiota: has joined #ruby
[06:51:28] jetpackjoe: has joined #ruby
[06:57:54] CausaMortis: has joined #ruby
[07:00:36] Spami_: has joined #ruby
[07:01:06] last_staff: has joined #ruby
[07:01:06] Yiota: has joined #ruby
[07:01:18] karmatr0n: has joined #ruby
[07:01:48] n1x-nz: has joined #ruby
[07:05:02] kali2: has joined #ruby
[07:05:37] scepticulous: has joined #ruby
[07:11:16] Yiota: has joined #ruby
[07:12:00] Yiota: has joined #ruby
[07:16:59] Akagi201: has joined #ruby
[07:24:03] ferr: has joined #ruby
[07:25:08] Mia: has joined #ruby
[07:25:08] Mia: has joined #ruby
[07:26:03] Infra-Red: has joined #ruby
[07:31:18] ur5us: has joined #ruby
[07:32:46] isxek: has joined #ruby
[07:33:37] TomyWork: has joined #ruby
[07:34:08] Couch: has joined #ruby
[07:34:47] CloCkWeRX: has joined #ruby
[07:36:07] norc: has joined #ruby
[07:36:23] CloCkWeRX: has joined #ruby
[07:37:14] cd83x: has joined #ruby
[07:37:29] norc: Greetings adaedra
[07:37:31] flughafen: hey adaedra
[07:38:33] davedev24: has joined #ruby
[07:38:56] mark_66: has joined #ruby
[07:39:05] n1x-nz: has joined #ruby
[07:39:24] wald0: has joined #ruby
[07:39:26] beilabs: has joined #ruby
[07:40:13] phredus: has joined #ruby
[07:42:24] jaruga___: has joined #ruby
[07:42:39] ramfjord: has joined #ruby
[07:42:47] Akagi201: has joined #ruby
[07:43:44] certainty: has joined #ruby
[07:45:06] beilabs: has joined #ruby
[07:45:15] aganov: has joined #ruby
[07:45:47] aufi: has joined #ruby
[07:46:05] maletor3: has joined #ruby
[07:51:02] digneety: has joined #ruby
[07:51:02] digneety: has joined #ruby
[07:51:15] alfiemax: has joined #ruby
[07:51:52] czerasz: has joined #ruby
[07:51:55] bobix: has joined #ruby
[07:52:48] norc: Mmm, so I feel like installing Rails5 side by side with Rails4. What is the flavour of the month using chruby to switch between gem sets? gem_home?
[07:55:23] johnDoe111: has joined #ruby
[07:57:00] bobix_: has joined #ruby
[07:58:27] LoneHermit: has joined #ruby
[07:59:38] johnDoe111^: has joined #ruby
[08:01:12] blackmesa: has joined #ruby
[08:02:14] karmatr0n: has joined #ruby
[08:02:43] Yiota: has joined #ruby
[08:02:55] jenrzzz: has joined #ruby
[08:02:58] Billias: has joined #ruby
[08:03:09] raeoks: has joined #ruby
[08:04:03] Yiota: has joined #ruby
[08:06:59] lightt: has joined #ruby
[08:07:43] GriffinHeart: has joined #ruby
[08:10:57] flughafen: whats the signifigance of a variable with @
[08:11:17] johnDoe111: has joined #ruby
[08:12:45] beilabs: has joined #ruby
[08:13:56] kareeole_: has joined #ruby
[08:14:21] norc: flughafen: It is an instance variable.
[08:14:35] norc: flughafen: Note that @ is still part of the name, so it is not a magic modifier.
[08:14:40] haxrbyte: has joined #ruby
[08:14:48] norc: So you would use instance_variable_get(:@foo)
[08:14:58] johnDoe111: has joined #ruby
[08:15:27] Yiota: has joined #ruby
[08:15:37] flughafen: norc: and if it's not part of a class?
[08:15:42] beilabs_: has joined #ruby
[08:15:46] norc: flughafen: It can be.
[08:15:52] norc: flughafen: Everything is an object, even a class.
[08:16:02] norc: flughafen: That also means that everything, including a class, can have instance variables.
[08:16:32] Pupeno: has joined #ruby
[08:16:52] Yiota: has joined #ruby
[08:17:24] norc: >> a = "a"; a.instance_variable_set(:@foo, 42); puts a.instance_variables
[08:17:25] ruby[bot]: norc: # => @foo ...check link for more (https://eval.in/581810)
[08:18:13] norc: >> Kernel.instance_variable_set(:@foo, 42); Kernel.instance_variables
[08:18:15] ruby[bot]: norc: # => [:@foo] (https://eval.in/581811)
[08:18:17] Yiota: has joined #ruby
[08:18:57] wald0: has joined #ruby
[08:20:16] norc: >> class A; @a = 1; def foo; puts @a; end; end; A.new.foo # flughafen: Note that this means you have to be careful in which context you are. Here one is about an instance variable of the class, the other about instance variables of that classes objects.
[08:20:18] ruby[bot]: norc: # => ...check link for more (https://eval.in/581812)
[08:20:32] toretore: has joined #ruby
[08:22:59] n1x-nz: has joined #ruby
[08:24:32] joonty: has joined #ruby
[08:25:02] startupality: has joined #ruby
[08:26:00] flughafen: thanks norc
[08:26:31] norc: have a good flight.
[08:29:15] codecop: has joined #ruby
[08:29:28] fumk: has joined #ruby
[08:30:05] konsolebox: has joined #ruby
[08:33:38] flughafen: i'm still grounded norc
[08:33:39] Gasher: has joined #ruby
[08:36:17] nankyokusei: has joined #ruby
[08:38:09] marr: has joined #ruby
[08:39:49] troulouliou_div2: has joined #ruby
[08:42:10] andikr: has joined #ruby
[08:42:58] johnDoe111: has joined #ruby
[08:43:35] Yiota: has joined #ruby
[08:46:51] maletor3: has joined #ruby
[08:47:42] madgen: has joined #ruby
[08:52:58] jackjackdripper: has joined #ruby
[08:54:08] certainty: has joined #ruby
[08:56:24] swartzcr: has joined #ruby
[08:56:29] blaxter: has joined #ruby
[08:56:57] swartzcr: I'm having a lot of trouble with dependencies in ruby 2.2.4 even while using rvm, especially with something called psych, would anyone be willing to help me debug?
[08:57:59] idefine: has joined #ruby
[08:58:53] phredus: has joined #ruby
[09:01:49] johnDoe111: has joined #ruby
[09:03:14] karmatr0n: has joined #ruby
[09:03:27] pawnbox: has joined #ruby
[09:04:40] Yiota: has joined #ruby
[09:05:37] Yiota: has joined #ruby
[09:06:53] Hanmac: swartzcr: what is your operating system?
[09:06:59] Yiota: has joined #ruby
[09:10:22] swartzcr: I'm on debian stable
[09:12:00] idefine: has joined #ruby
[09:12:58] Hanmac: swartzcr: "apt-get build-dep ruby" and/or "apt-get build-dep ruby2.2" (or what exist as package on your system)
[09:13:59] swartzcr: or maybe I've already done that for ruby
[09:14:31] freija_: has joined #ruby
[09:15:20] swartzcr: well so I unsinstalled everything and re-installed it and now at least I'm getting a new error
[09:17:50] swartzcr: https://paste.debian.net/713436/
[09:19:24] Nagaraj: has joined #ruby
[09:19:44] Oclair: has joined #ruby
[09:22:46] wald0: has joined #ruby
[09:23:16] madgen: has joined #ruby
[09:25:07] TvL2386: has joined #ruby
[09:25:24] cd83x: has joined #ruby
[09:26:48] platzhirsch: has joined #ruby
[09:27:44] phredus: has joined #ruby
[09:28:16] wald0: has joined #ruby
[09:28:43] jhass: swartzcr: you seem to be mixing a system ruby and a rvm ruby
[09:28:53] jhass: what command does produce that?
[09:31:06] workmad3: has joined #ruby
[09:31:24] swartzcr: oh I'm running tests through rvm
[09:31:35] Helox: has joined #ruby
[09:31:53] swartzcr: that could make sense that it's calling the wrong ruby?
[09:32:29] Pupeno: has joined #ruby
[09:33:04] einarj: has joined #ruby
[09:34:33] wald0: has joined #ruby
[09:37:59] beilabs: has joined #ruby
[09:38:05] jackjackdripper: has joined #ruby
[09:38:19] webhat: has joined #ruby
[09:39:50] wald0: has joined #ruby
[09:40:13] triangles2: has joined #ruby
[09:43:22] startupality: has joined #ruby
[09:43:24] nando293921: has joined #ruby
[09:45:58] sid_fules: has joined #ruby
[09:46:13] jenrzzz: has joined #ruby
[09:46:13] jenrzzz: has joined #ruby
[09:46:35] c0mrad3: has joined #ruby
[09:47:38] maletor3: has joined #ruby
[09:51:38] Yiota: has joined #ruby
[09:52:33] jenrzzz: has joined #ruby
[09:52:33] jenrzzz: has joined #ruby
[09:52:55] Yiota: has joined #ruby
[09:54:20] beilabs: has joined #ruby
[09:54:21] Yiota: has joined #ruby
[09:55:18] wald0: has joined #ruby
[09:58:12] beilabs: has joined #ruby
[10:01:48] norc: asm>> a, b = b, a
[10:01:50] ruby[bot]: norc: I have disassembled your code, the result is at https://eval.in/581863
[10:03:20] adaedra: ?experiment
[10:03:20] ruby[bot]: Please use your local irb or pry (see ?pry) to experiment, ruby[bot]'s eval functionality is for demonstration purposes only.
[10:03:29] adaedra: You can also talk to the bot in PMs
[10:04:07] karmatr0n: has joined #ruby
[10:06:58] c355E3B: has joined #ruby
[10:10:41] Akagi201: has joined #ruby
[10:10:45] phoo1234567: has joined #ruby
[10:16:07] sid_fules: has joined #ruby
[10:16:24] weckl: has joined #ruby
[10:17:34] Pupeno: has joined #ruby
[10:17:46] certainty: has joined #ruby
[10:19:44] cd83x: has joined #ruby
[10:21:05] the_drow: has joined #ruby
[10:21:18] Pupeno: has joined #ruby
[10:23:37] nickjj_: has joined #ruby
[10:23:45] Trynemjoel: has joined #ruby
[10:23:49] davedev24: has joined #ruby
[10:27:21] snowy: has joined #ruby
[10:27:52] guardianJ: has joined #ruby
[10:28:33] hk238: has joined #ruby
[10:29:13] Gasher: has joined #ruby
[10:30:59] beilabs: has joined #ruby
[10:32:58] ocbtec: has joined #ruby
[10:33:47] guardianJ: has left #ruby: ()
[10:33:50] sepp2k: has joined #ruby
[10:36:43] alfiemax: has joined #ruby
[10:37:07] MrBusiness3: has joined #ruby
[10:37:08] nankyokusei: has joined #ruby
[10:37:27] colegatron: has joined #ruby
[10:37:54] GriffinHeart: has joined #ruby
[10:37:57] shevy: and send them flowers
[10:41:43] agit0: has joined #ruby
[10:45:07] pawnbox_: has joined #ruby
[10:45:43] yorickpeterse: who dare disturb my slumber by pinging me
[10:45:52] yorickpeterse: oh, people just linking to Oga
[10:46:46] ur5us: has joined #ruby
[10:46:50] adaedra: You're so famous.
[10:47:31] sdothum: has joined #ruby
[10:48:22] maletor3: has joined #ruby
[10:48:23] beilabs: has joined #ruby
[10:51:24] flughafen: adaedra: i'm really famous!
[10:52:27] edwinvdgraaf: has joined #ruby
[10:52:32] craigp: has joined #ruby
[10:52:53] Pupeno: has joined #ruby
[10:55:36] hutch34: has joined #ruby
[10:59:54] johnDoe111: has joined #ruby
[11:00:27] rodfersou: has joined #ruby
[11:01:42] Yiota: has joined #ruby
[11:02:02] hellyeah: has joined #ruby
[11:02:17] hellyeah: why should i learn ruby?
[11:03:09] karmatr0n: has joined #ruby
[11:04:32] johnDoe111: has joined #ruby
[11:04:37] tobiasvl: hellyeah: why not?
[11:04:44] tobiasvl: should you?
[11:05:01] hellyeah: i dont know what can i do with ruby?
[11:05:10] hellyeah: is it oop language?
[11:05:12] alfiemax: why wouldn't you?
[11:05:28] alfiemax: don't think there's much you can't do with it
[11:05:36] sid_fules: has joined #ruby
[11:05:39] tobiasvl: it's turing complete :P
[11:06:44] hellyeah: is it easy to learn :D
[11:06:45] tlaxkit: has joined #ruby
[11:07:31] chippy: has joined #ruby
[11:07:47] GodFather: has joined #ruby
[11:09:01] futilegames: has joined #ruby
[11:09:27] Noxilex: has joined #ruby
[11:12:15] Ropeney: has joined #ruby
[11:12:33] GodFather: has joined #ruby
[11:12:50] CausaMortis: has joined #ruby
[11:13:53] cd83x: has joined #ruby
[11:14:01] guardianJ: has joined #ruby
[11:15:01] GodFather: has joined #ruby
[11:15:05] certainty: has joined #ruby
[11:15:57] johnmilton: has joined #ruby
[11:17:10] Fernando-Basso: has joined #ruby
[11:17:32] ishe_ua: has joined #ruby
[11:17:47] beilabs: has joined #ruby
[11:18:14] norc: tobiasvl: Clearly I should recommend building a robust web server using this technology then: https://upload.wikimedia.org/wikipedia/commons/7/7b/Lego_Turing_Machine.jpg
[11:18:21] norc: It is not even turing complete. It is a turing machine!
[11:18:35] norc: Ill see what my bosses think. :)
[11:18:55] hutch34: has joined #ruby
[11:19:24] nhhc: has joined #ruby
[11:20:00] roamingdog: has joined #ruby
[11:21:44] Pupeno: has joined #ruby
[11:23:17] shevy: hellyeah beer is easier to drink than is learning a programming language!
[11:23:59] emilkarl: has joined #ruby
[11:25:00] k3rn31: has joined #ruby
[11:25:09] hellyeah: shevy: i have some backgrounds like c, java, c#, javascript, drracket, php ..
[11:25:49] shevy: then this will be very easy. I used php before ruby
[11:26:40] Vile`: has joined #ruby
[11:26:52] millerti: has joined #ruby
[11:27:39] Yiota: has joined #ruby
[11:30:13] hellyeah: but ruby and php are not on same leage right i mean
[11:30:23] hellyeah: afaik you have to learn ruby on rails for web stuff
[11:30:59] idefine: has joined #ruby
[11:31:21] deadnull_: has joined #ruby
[11:31:35] beilabs: has joined #ruby
[11:32:29] sid_fules: has joined #ruby
[11:32:47] rkazak: has joined #ruby
[11:35:34] shevy: ruby and php are not very similar at all anywhere
[11:36:22] ldnunes: has joined #ruby
[11:36:42] dionysus69: has joined #ruby
[11:38:11] norc: hellyeah: Ruby on Rails is just one out of many ways to do web stuff.
[11:39:20] norc: hellyeah: You could do also use Sinatra (or perhaps even your own Rack middleware)
[11:40:04] solars: is there any helper to round to something like the nearest 0.05? e.g. 1.22 -> 1.20 1.24 -> 1.25 etc?
[11:40:23] romistrub: has joined #ruby
[11:40:33] hutch34: has joined #ruby
[11:40:54] adaedra: do *2, round at 0.1, then /2?
[11:40:59] solars: ok in this case I need to round up to the next 0.05
[11:41:35] romistrub: Hi everybody. I'm running a TCPSocket.recv(2) to get the first couple of bits from a stream, and Ruby proceeds past the recv, but when I check the length of the received string, it's 0... can anybody explain this?
[11:42:06] k3rn31: has joined #ruby
[11:42:22] adaedra: first, it's more likely you're getting the first couple of bytes
[11:42:34] romistrub: yes, bytes, sorry
[11:43:38] adaedra: it may indicate you're at the end of the stream
[11:43:57] startupality: has joined #ruby
[11:44:16] romistrub: for some reason I thought ruby was supposed to stick at the recv call until it received the bytes specified
[11:44:33] romistrub: is there a way to check how many more bytes are "still in the tube"?
[11:45:33] sid_fules: has joined #ruby
[11:45:39] adaedra: if the stream is closed, there's no point of waiting, so it returns empty
[11:45:47] adaedra: even if I think it raises in this case
[11:46:43] romistrub: so I should be waiting to recv until the stream is open... how do I do that?
[11:46:44] norc: &ri recv_nonblock
[11:46:44] `derpy: http://ruby-doc.org/stdlib-2.3.0/libdoc/socket/rdoc/BasicSocket.html#method-i-recv_nonblock
[11:46:59] johnDoe111: has joined #ruby
[11:47:22] adaedra: romistrub well, are you sure the stream is still valid (i.e. remote server did not close connection)?
[11:47:24] norc: Look at the example even.
[11:47:51] norc: And there should indeed exceptions be thrown.
[11:48:24] Gasher: has joined #ruby
[11:49:14] maletor3: has joined #ruby
[11:50:09] romistrub_: has joined #ruby
[11:50:15] solars: adaedra, figured out to round up to the next 0.05 it's (n*20).ceil/20.0
[11:50:26] romistrub_: sorry about that, had to reopen this window
[11:50:33] romistrub_: so I lost everything you guys send me :(
[11:51:02] romistrub_: basically, what I'm doing is running a websocket server. The handshake is complete, now I'm listening for the incoming messages
[11:51:08] norc: romistrub_: check topic, we have logs.
[11:52:26] iamvery: has joined #ruby
[11:52:40] romistrub_: okay, didn't miss much, I'll give what you sent me a mull-over
[11:52:47] norc: romistrub_: Note that I recommend starting with non-blocking IO from the beginning.
[11:53:00] romistrub_: norc: why's that, if I may ask
[11:53:06] adaedra: it can be completely fine to be doing blocking IO.
[11:53:07] allcentury: has joined #ruby
[11:53:08] johnDoe111: has joined #ruby
[11:53:13] romistrub_: and, uh, sorry, newbie question, what *is* non-blocking IO :P
[11:53:22] hutch34: has joined #ruby
[11:53:30] romistrub_: oh, self-explanatory
[11:53:39] romistrub_: doesn't block up the system while it waits for the bytes, right?
[11:53:49] duckpuppy: has joined #ruby
[11:53:55] adaedra: returns immediatly if nothing is available, yes.
[11:54:13] romistrub_: so would I run that in a loop, if I'm waiting for a message?
[11:54:19] norc: romistrub_: The only advantage that blocking IO has is that its far simpler to implement.
[11:54:28] romistrub_: norc: gotcha
[11:54:47] adaedra: If you have only one socket to work with, socket IO is surely the simplest path.
[11:54:54] adaedra: er, blocking IO*
[11:55:02] romistrub_: potentially multiple sockets, working my way up to that
[11:55:16] romistrub_: it'll be a multiplayer websocket-based game, to be specific
[11:55:23] romistrub_: er, websocket-enabled :P
[11:56:20] adaedra: if you have multiple sockets, you can use threads, select/poll
[11:56:34] romistrub_: adaedra: yeah, that's what I've been doing
[11:56:54] Ropeney: has joined #ruby
[11:57:37] romistrub_: so maybe I'm misunderstanding, under what circumstances can recv end up with a return value of zero length
[11:57:44] gnufied: has joined #ruby
[11:58:14] Hanmac: has joined #ruby
[11:58:22] Vingador: has joined #ruby
[11:58:25] nando293921: has joined #ruby
[11:58:50] CloCkWeRX: has joined #ruby
[12:01:00] Darkwater: I'm using Open3::popen3, how do I read from stdout and stderr at the same time?
[12:01:22] idefine: has joined #ruby
[12:02:45] qasaur: has joined #ruby
[12:03:06] ytti: technically you never do anything at the same time in mri
[12:03:37] sid_fules: has joined #ruby
[12:03:50] ytti: i think your expectation is to produce output were stderr and stdout are outputted in order
[12:03:59] romistrub_: norc: adaedra: thanks for your help!
[12:04:03] last_staff: has joined #ruby
[12:04:12] ytti: but there is probaboly additional requirement you didn't thinkg of, is taht you want to read at least to a linefeed
[12:04:24] ytti: as you don't want to multiplex partial lines of stdout and stderr
[12:04:26] apeiros: Darkwater: use Kernel#spawn instead, that allows you to redirect IOs
[12:04:27] norc: romistrub_: Im thinking that you reached EOF.
[12:04:32] ytti: so read stdout and stderr ina loop, one line at a time
[12:04:49] norc: romistrub_: But then again I dont understand sockets all too well.
[12:04:57] romistrub_: norc: nope, I'm waiting for a message that hasn't been sent yet :P
[12:05:11] nettoweb: has joined #ruby
[12:05:15] norc: romistrub_: Which Ruby version and on which operating system?
[12:05:23] norc: And which Ruby flavour? (MRI, JRuby)
[12:05:26] romistrub_: Ruby 2.2.3 on Windows 10
[12:05:37] romistrub_: is has flavours? lol... I have no idea which flavour
[12:05:41] sid_fules: has joined #ruby
[12:05:54] norc: romistrub_: There are different implementations, yes.
[12:05:55] romistrub_: Just... vanilla Ruby
[12:06:11] norc: Fair enough. We call that MRI (or CRuby)
[12:06:13] qasaur: has joined #ruby
[12:06:39] romistrub_: For "Mainstream Ruby Implementation"? hehe
[12:06:52] apeiros: matz' ruby interpreter
[12:07:09] apeiros: though your version would make sense ;-)
[12:07:50] Darkwater: ytti: I want to read stdout and stderr in order, but I also want to prefix the lines with their origin
[12:08:01] Darkwater: so eg. ERR: foo went wrong \n OUT: bar is ok
[12:08:34] norc: romistrub_: and it returns 0?
[12:08:34] Darkwater: apeiros: can I do that ^ with spawn?
[12:08:34] cd83x: has joined #ruby
[12:08:51] ytti: Darkwater, just read line a a time in a loop
[12:08:54] apeiros: Darkwater: no
[12:09:00] apeiros: Darkwater: in that case you have to read them separately
[12:09:02] romistrub_: norc: I just switched recv to read, let me test it, one sec
[12:09:09] apeiros: and then you'd either use threads or Kernel#select
[12:09:27] Darkwater: does select look harder than it is?
[12:09:37] ytti: it's simples
[12:09:37] Darkwater: then I'll try that
[12:09:50] ytti: jsut give array if IO objets and timeout (your case 0)
[12:09:51] synthroid: has joined #ruby
[12:09:56] apeiros: I don't know. I think it looks simple.
[12:09:58] ytti: and it'll return object which is ready for read/write
[12:10:03] apeiros: so IMO it doesn't look harder than it is :)
[12:10:23] ytti: by question i extrapolated that it looks hard
[12:10:30] binaryplease1: has joined #ruby
[12:10:35] ytti: which obviously is subjective
[12:10:44] norc: romistrub_: Id say gist your code.
[12:10:59] romistrub_: norc: I'd say I have no idea what that means :P
[12:11:12] norc: romistrub_: https://gist.github.com/
[12:11:13] apeiros: ?gist romistrub_
[12:11:14] ruby[bot]: romistrub_: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[12:11:15] millerti: has joined #ruby
[12:12:25] romistrub_: https://gist.github.com/anonymous/c630d0cc82575492d3193527771025d3
[12:13:00] norc: romistrub_: the offending line in question?
[12:13:59] duckpuppy: has joined #ruby
[12:14:25] romistrub_: line 39 throws the error...
[12:14:37] fclausen_: has joined #ruby
[12:14:39] futilegames: has joined #ruby
[12:15:21] norc: romistrub_: Okay, did some digging. It seems like recv does not necessarily wait to get LEN bytes.
[12:15:33] romistrub_: norc, well gosh darn
[12:15:59] romistrub_: does it need a flag or something?
[12:16:07] apeiros: read(n) type of instructions are usually "at *max* n bytes"
[12:16:13] norc: romistrub_: No. The best choice is to use #select (with a loop if necessary)
[12:16:14] apeiros: not "precisely n bytes"
[12:16:43] romistrub_: apeiros: sorry, that was dumb of me, I pasted the wrong one
[12:16:46] romistrub_: https://gist.github.com/anonymous/7f1eb57ed687b309cde0f7c9689eab03
[12:16:56] romistrub_: this is the real one, where the real error is thrown at line 39
[12:16:56] scepticulous: has joined #ruby
[12:17:09] apeiros: `opcode = byteone-128`?
[12:17:09] romistrub_: the only difference in the source is that "read" is changed back to "recv"
[12:17:29] norc: romistrub_: As I said. Use select() in a loop.
[12:17:34] norc: That is your best bet.
[12:17:38] romistrub_: hahaha, this is ancient code, I have to look back over my websocket manual to remember why that works
[12:17:55] romistrub_: okay, I'll try that, thanks norc
[12:18:38] tvw: has joined #ruby
[12:18:53] norc: romistrub_: And I meant IO#select of course
[12:19:48] norc: romistrub_: On an unrelated note, if you do Ruby coding - I highly recommend you switch to expanded tabs with 2 space tab/shift width.
[12:19:56] norc: People will thank you.
[12:20:45] apeiros: norc: you mean IO.select
[12:20:47] romistrub_: I'm being a real treat today, sorry for another silly question, what are "expanded tabs"?
[12:20:56] startupality: has joined #ruby
[12:20:58] apeiros: (which is btw. the same as plain select(), aka Kernel#select())
[12:21:04] norc: apeiros: Oh! My bad.
[12:21:14] apeiros: totally! :D
[12:21:23] apeiros: romistrub_: it means "replace the tabs with spaces"
[12:21:25] romistrub_: Forgive me. It's been two years since I've done any Ruby programming. Just trying to get back into it.
[12:21:26] norc: apeiros: Well, I wanted to make sure he didn't end up trying to include Enumerable or some other nonsense.
[12:21:47] Nagaraj: has joined #ruby
[12:21:53] moredhel-: has joined #ruby
[12:21:53] norc: romistrub_: It's just a recommendation, please take it as such.
[12:21:54] apeiros: norc: eh, I'm just staying true to being the resident pedant
[12:22:01] romistrub_: norc, will do, thanks
[12:22:18] apeiros: though oxbad1dea made a good job of that too. wonder where he is.
[12:22:37] CloCkWeRX: has joined #ruby
[12:22:46] norc: You mean Oxdea
[12:22:55] norc: In fact.
[12:23:14] apeiros: see, it's been such a long time, I don't even remember his nick!
[12:23:18] norc: Perhaps he got his finger stuck in an assembler.
[12:23:51] alfiemax: has left #ruby: ("Leaving")
[12:24:23] norc: apeiros: Man I love how Rails is making people violate the law of demeter like crazy!
[12:24:24] Darkwater: ytti: after select, how do I read everything that's available/
[12:24:36] norc: Never before has a.b&.c&.d&.e&.f been so much fun.
[12:24:49] ytti: Darkwater, select retursn array of anything available
[12:25:01] JJM: has joined #ruby
[12:25:08] ytti: Darkwater, iterate thorugh that array and read line at a time, in order, until they are no longer available, then return to select
[12:25:32] Darkwater: yeah but how do I read until they're no longer available?
[12:26:04] ytti: ask io if has something
[12:26:08] ytti: if it has, read line
[12:26:12] norc: See apeiros?
[12:26:17] norc: I just did it.
[12:26:29] norc: Oh wait you cant.
[12:26:37] norc: But take my word for it.
[12:28:59] k3rn31: has joined #ruby
[12:35:12] edwinvdgraaf: has joined #ruby
[12:35:14] flashpoint9: has joined #ruby
[12:36:07] apeiros: norc: I'm not quite sure I'd agree that chaining is violating the law of demeter. though I've never really put much energy into thinking it through :)
[12:37:56] nankyokusei: has joined #ruby
[12:41:15] hutch34: has joined #ruby
[12:42:39] romistrub_: norc: tried your solution using IO.select; didn't work, because the Socket is already open (was used for the Websocket handshake already)
[12:42:57] tomphp: has joined #ruby
[12:42:58] Caerus: see ya later #ruby
[12:44:29] idefine: has joined #ruby
[12:46:51] e4xit_: has joined #ruby
[12:47:58] norc: romistrub_: What were you doing?
[12:48:09] romistrub_: https://gist.github.com/anonymous/3edf8cc810232d873bf4cb731d1724a4
[12:48:11] diegoaguilar: has joined #ruby
[12:48:27] d0nn1e: has joined #ruby
[12:48:31] romistrub_: norc: just added the IO.select before the recv call
[12:48:59] norc: romistrub_: Did you just blindly ignore the other part I mentioned?
[12:49:19] romistrub_: norc: I might've missed it, sorry
[12:49:23] daguilaraguilar: has joined #ruby
[12:49:40] romistrub_: norc: what was the other part?
[12:49:53] norc: romistrub_: Read up.
[12:50:00] maletor3: has joined #ruby
[12:50:43] romistrub_: you mean the tabs to spaces?
[12:51:22] norc: romistrub_: But just use #read if you must.
[12:51:34] norc: That will block until the bytes have been read.
[12:51:53] romistrub_: let me try that
[12:53:10] norc: romistrub_: It just has that nasty side effect that it will block until the socket closes the connection if the bytes have not been sent.
[12:53:13] karmatr0n: has joined #ruby
[12:53:19] tomphp: has joined #ruby
[12:53:20] idefine: has joined #ruby
[12:53:35] nando293921: has joined #ruby
[12:53:59] romistrub_: norc: but if it's threaded, it shouldn't be a problem, right?
[12:54:50] norc: romistrub_: If you already have threads, you might as well use non blocking IO.
[12:54:57] freerobby: has joined #ruby
[12:55:11] romistrub_: isn't there overhead for the constantly running loop?
[12:55:28] fmcgeough: has joined #ruby
[12:57:31] roamingdog: has joined #ruby
[12:58:21] millerti: has joined #ruby
[12:58:24] norc: romistrub_: The thing that non blocking IO offers is that you could for example handle multiple sockets at the same time.
[12:58:34] norc: Overlapped IO
[12:58:40] icey_: has joined #ruby
[12:59:25] norc: romistrub_: also by practicing non-blocking IO, you will be getting experience for when you want to do something real with any IO
[12:59:32] sid_fules: has joined #ruby
[13:00:09] romistrub_: norc: okay, thanks :)
[13:01:32] jerematic: has joined #ruby
[13:02:48] Pupeno_: has joined #ruby
[13:04:39] karmatr0n: has joined #ruby
[13:05:59] ramortegui: has joined #ruby
[13:09:12] ChiefAlexander: has joined #ruby
[13:09:25] mikecmpbll: has joined #ruby
[13:09:38] joonty: has joined #ruby
[13:11:15] tk: has joined #ruby
[13:11:46] norc: has joined #ruby
[13:11:56] duckpuppy: has joined #ruby
[13:15:59] liri: has joined #ruby
[13:16:07] aegis3121: has joined #ruby
[13:16:22] ceyhun: has joined #ruby
[13:16:31] liri: does anyone can think of a reason for which module can be not included into a class?
[13:17:14] Yiota: has joined #ruby
[13:17:29] liri: or at least it looks as it is not included, as ancestor list dos not contain included module..
[13:17:57] Yiota: has joined #ruby
[13:18:17] liri: unfortunately I have no small snippet to reproduce it, it only shows up when I run it altogether with sinatra gem.
[13:18:53] liri: And I am just wondering what steps should I take to track down process of building class hierarchy.
[13:19:05] apeiros: liri: if it's already included further down
[13:19:13] apeiros: other than that - there shouldn't be any
[13:19:33] rafael_: has joined #ruby
[13:20:49] tinnvec: has joined #ruby
[13:21:07] liri: What if module M is included in class A, which inherits from class B which also includes module M,
[13:21:20] liri: is module M going to be shown in ancestor list twice?
[13:21:51] apeiros: no. that's what I was referring to
[13:21:57] apeiros: it'll only be included once
[13:22:27] hutch34: has joined #ruby
[13:23:11] bkxd: has joined #ruby
[13:23:29] liri: So having two times the same module in ancestor list shouldn't happen
[13:23:48] apeiros: afaik s/shouldn't/can't/
[13:23:58] liri: when I run some script it shows:ruby -I../lib -e "require 'web-runner/lib/input_file_manager'; include Pbp::Run; puts InputPreparator.ancestors" InputPreparator Pbp::Run Monitor MonitorMixin Object Pbp::Run Log4r Kernel BasicObject
[13:24:26] liri: InputPreparator inherits from Monitor ( which includes MonitorMixin)
[13:24:36] liri: but Pbp::Run module shows up twice.
[13:24:54] apeiros: you can make two classes with the same name
[13:24:58] liri: it is included in InputPreparator and also included at top level
[13:25:06] apeiros: only one will be able to be resolved at that "constant path", though
[13:25:18] liri: so you suggest that these are two differents entities?
[13:25:26] apeiros: you can check
[13:25:30] apeiros: object_id should differ
[13:25:40] apeiros: and .equal? should return false
[13:26:03] mc_fail: guys, is there any way to set conflicts with OptionParser ?
[13:26:14] mc_fail: like, to say that -i cannot be passed together with -m
[13:26:33] liri: by saying "<apeiros> you can make two classes with the same name" you also mean 'modules' not only 'classes' ?
[13:26:36] domgetter: has joined #ruby
[13:26:50] apeiros: any constant
[13:27:07] apeiros: though only modules and classes set their name property according to the first constant they get assigned to
[13:27:14] Xentil: has joined #ruby
[13:28:29] kareeoleez: has joined #ruby
[13:28:29] apeiros: >> class A; end; x = A; Object.send(:remove_const, :A); class A; end; [x, A, x.object_id, A.object_id]
[13:28:30] ruby[bot]: apeiros: # => [A, A, 543386790, 543386750] (https://eval.in/581950)
[13:28:42] apeiros: contrived, but possible
[13:29:27] norc: liri: You have to differentiate between "name" and "object".
[13:29:27] liri: hmm, what I received is
[13:29:35] liri: 47102552085160 InputPreparator 47102553593700 Pbp::Run 47102554097160 Monitor 47102554097380 MonitorMixin 47102552159800 Object 47102553593700 Pbp::Run 47102555926780 Log4r 47102552159640 Kernel 47102552159840 BasicObject
[13:29:43] malconis: has joined #ruby
[13:29:51] apeiros: also funny:
[13:29:52] apeiros: >> class A; end; class B; def self.inspect; "A"; end; end; [A, B, A.object_id, B.object_id]
[13:29:53] liri: these are object_ids,
[13:29:53] ruby[bot]: apeiros: # => [A, A, 554249260, 554249230] (https://eval.in/581952)
[13:30:02] liri: and class.names in ancestors list.
[13:30:16] karmatr0n: has joined #ruby
[13:30:23] apeiros: liri: so two different objects… 47102554097160 != 47102555926780
[13:30:25] malconis: has joined #ruby
[13:30:38] liri: what about Pbp::Run
[13:30:49] apeiros: ah, you have oid first
[13:30:50] liri: 47102553593700
[13:30:59] apeiros: ok, this looks suspicious
[13:31:01] liri: it looks like the same entity.
[13:31:04] Yiota: has joined #ruby
[13:31:05] apeiros: gist your full code please
[13:31:23] moos3: has joined #ruby
[13:31:27] norc: liri: There is only 2 ways to shadow identifiers with others, and that is a) refinements and b) some bizarre feature that noone uses.
[13:31:27] JakFrist: has joined #ruby
[13:31:34] liri: ok, I need to extract some short part ;)
[13:31:45] Yiota: has joined #ruby
[13:31:49] Darkwater: urgh, I hate programming with terminals
[13:32:05] Darkwater: I can read stdout and stderr now sure but now the problem is with buffering
[13:32:10] Xentil: has joined #ruby
[13:32:14] liri: well, actually I have made some changes to web app which I support and the problem which I came across is little bit different but I am just in the middle of investigation
[13:32:20] apeiros: ACTION afk
[13:32:49] cdg: has joined #ruby
[13:33:26] jaguarmagenta: has joined #ruby
[13:33:49] jrafanie: has joined #ruby
[13:33:58] noobsu: has joined #ruby
[13:35:24] Macaveli_: has joined #ruby
[13:35:35] jas02: has joined #ruby
[13:35:50] duckpuppy: has joined #ruby
[13:36:00] k3rn31: has joined #ruby
[13:36:12] JJM: has joined #ruby
[13:36:23] allcentury: has joined #ruby
[13:36:51] madgen: has joined #ruby
[13:40:53] ramfjord: has joined #ruby
[13:42:34] hiennaj: has joined #ruby
[13:42:42] mikecmpbll: has joined #ruby
[13:43:51] pawnbox: has joined #ruby
[13:43:56] Macaveli: has joined #ruby
[13:44:04] Akagi201: has joined #ruby
[13:46:53] freija_: has joined #ruby
[13:47:42] liri: apeiros: here you are, https://gist.github.com/mateuszef/a6a21119f9d886a8f416fb3d43053298
[13:47:58] tomphp: has joined #ruby
[13:49:31] k3rn31_: has joined #ruby
[13:50:29] liri: What I am actually trying to solve is issue causing that when active_record is added our method is being shadowed by one defined in active_record sources (named try)
[13:50:42] maletor3: has joined #ruby
[13:51:09] liri: It looks like, during method lookup, method try from Object (active_record) is invoked instead of out method defined in our module
[13:52:06] liri: when I show ancestor list, in the scope from where try method is called, it shows that Object is before our module where try is defined.
[13:52:38] liri: and I have no idea why as I use include within body of class from which call is made.
[13:53:08] liri: List should show, something like, OurObject, OurModule, ... Object ...
[13:53:21] liri: but it shows OurObject ... Object ... OurModule
[13:53:35] sid_fules: has joined #ruby
[13:53:56] liri: what has to be said is the fact that, OurModule is included at two levels, one is within class OurObject, and also at the top level .
[13:54:33] ChiefAlexander: has joined #ruby
[13:55:00] liri: is there some way to track down what happens when ancestors are built ?
[13:55:22] crystal77: has joined #ruby
[13:55:36] liri: So I could see, at what lines ancestor list for given object changes ?
[13:55:54] liri: So I could see, at what lines ancestor list for given class changes ?
[13:56:10] eljimmy: has joined #ruby
[13:56:37] agent_white: has joined #ruby
[13:56:41] cd83x: has joined #ruby
[13:58:09] pontiki: hello agent_white
[13:58:24] agent_white: pontiki: \o How goes it?
[13:58:45] pontiki: not bad, agent_white
[13:59:49] mattwashere: has joined #ruby
[13:59:49] certainty: has joined #ruby
[14:00:08] Macaveli_: has joined #ruby
[14:03:20] liri: when playing little bit with the code, it gives some interesting results: https://gist.github.com/mateuszef/0f8e373ad9e6770207f10c75e4134b64
[14:04:48] liri: namely it looks, like if including module takes a place at top level, and afterwards class includes the same level, then in ancestor list included module is after Object (is treated as included to Object)
[14:05:17] floatingpoint: has joined #ruby
[14:05:26] liri: however, when first including it in class A, and afterwards including at top level, then module is present twice in ancestor list...
[14:05:47] yqt: has joined #ruby
[14:05:50] CloCkWeRX: has joined #ruby
[14:05:54] CloCkWeRX: has left #ruby: ()
[14:07:00] SilverKey: has joined #ruby
[14:09:24] freerobby: has joined #ruby
[14:10:11] tomphp: has joined #ruby
[14:11:33] gtsai: has joined #ruby
[14:13:12] gtsai_: has joined #ruby
[14:13:20] JesseH: has joined #ruby
[14:13:36] Yiota: has joined #ruby
[14:14:18] Yiota: has joined #ruby
[14:15:27] liri: is there some way to check in what order files are required when startin VM ?
[14:15:33] dhollinger: has joined #ruby
[14:17:43] SilverKey: has joined #ruby
[14:19:34] fedexo: has joined #ruby
[14:22:59] edwinvdgraaf: has joined #ruby
[14:24:23] jaruga___: has joined #ruby
[14:25:50] sid_fules: has joined #ruby
[14:26:03] kgrz: has joined #ruby
[14:27:02] gtsai: has joined #ruby
[14:27:46] fclausen: has joined #ruby
[14:31:03] tomphp: has joined #ruby
[14:32:57] tAn: has joined #ruby
[14:33:30] jokke: i'm having some trouble with dotenv
[14:33:42] jokke: it seems to override env vars passed from the command line
[14:34:10] mikecmpb_: has joined #ruby
[14:38:07] jhass: https://github.com/bkeepers/dotenv/issues/200#issuecomment-124918307
[14:38:14] CJKinni: has joined #ruby
[14:39:00] nankyokusei: has joined #ruby
[14:39:03] jhass: https://github.com/bkeepers/dotenv/issues/112
[14:39:08] karmatr0n: has joined #ruby
[14:39:43] sid_fules: has joined #ruby
[14:39:50] cd83x: has joined #ruby
[14:40:48] kareeoleez: has joined #ruby
[14:41:44] Sansa994: has joined #ruby
[14:42:44] jhass: personally I just use https://github.com/horosgrisa/autoenv
[14:44:26] sid_fules: has joined #ruby
[14:45:45] duoi: has joined #ruby
[14:46:43] apeiros: autoenv is only for zsh?
[14:46:50] snockerton: has joined #ruby
[14:47:01] Devalo: has joined #ruby
[14:47:26] norc: has joined #ruby
[14:47:27] Icey: has joined #ruby
[14:47:56] certainty: has joined #ruby
[14:48:25] shevy: elitists!
[14:49:07] Xiti: has joined #ruby
[14:51:27] maletor3: has joined #ruby
[14:51:51] SilverKey: has joined #ruby
[14:56:24] sid_fules: has joined #ruby
[14:57:44] smathy: has joined #ruby
[15:00:25] skolman: has joined #ruby
[15:01:24] chouhoulis: has joined #ruby
[15:01:59] chouhoulis: has joined #ruby
[15:02:11] frem_: has joined #ruby
[15:02:19] VeryBewitching: has joined #ruby
[15:05:06] rippa: has joined #ruby
[15:05:35] Pupeno: has joined #ruby
[15:06:13] [diecast]: has joined #ruby
[15:07:51] last_staff: has joined #ruby
[15:07:54] terlar: has joined #ruby
[15:07:58] zero7: has joined #ruby
[15:08:08] yfeldblum: has joined #ruby
[15:08:14] cstrahan: has joined #ruby
[15:09:05] deimos__: has joined #ruby
[15:09:15] digitalfiz: has joined #ruby
[15:09:25] qasaur: has joined #ruby
[15:10:00] sid_fules: has joined #ruby
[15:10:36] jaruga___: has joined #ruby
[15:13:18] Akagi201: has joined #ruby
[15:15:40] tomphp: has joined #ruby
[15:16:35] sid_fules: has joined #ruby
[15:18:52] wazzat: has joined #ruby
[15:18:53] wazzat: has left #ruby: ()
[15:18:57] wazzat: has joined #ruby
[15:19:42] mattwashere: has joined #ruby
[15:20:27] k3rn31: has joined #ruby
[15:21:04] wazzat: has left #ruby: ()
[15:21:11] wazzat: has joined #ruby
[15:22:30] Kus: has joined #ruby
[15:24:33] polishdub: has joined #ruby
[15:24:35] aegis3121: has joined #ruby
[15:25:37] kareeoleez: has joined #ruby
[15:26:27] mello: has joined #ruby
[15:27:45] GinoManWorks: has joined #ruby
[15:28:19] SilverKey: has joined #ruby
[15:28:26] moeabdol: has joined #ruby
[15:29:05] skade: has joined #ruby
[15:31:15] symm-: has joined #ruby
[15:33:08] mattwashere: has joined #ruby
[15:33:08] RegulationD: has joined #ruby
[15:34:14] jaguarmagenta: has joined #ruby
[15:35:43] palms: has joined #ruby
[15:35:43] jokke: who uses anything else than zsh?
[15:37:11] domgetter: jokke I use bash. Mostly out of laziness, though. Also, I don't really know enough about the differences to switch
[15:37:29] xpt: Noone uses irb as shell? (:
[15:38:34] darkxploit: has joined #ruby
[15:39:08] jokke: xpt: pry actually has somekind of shell mode
[15:41:13] eljimmy: has joined #ruby
[15:41:53] slackR: has joined #ruby
[15:41:59] xpt: ACTION watches pry intro screencast
[15:43:04] craigp: has joined #ruby
[15:43:24] chorgi: has joined #ruby
[15:43:41] davedev24: has joined #ruby
[15:44:24] [Butch]: has joined #ruby
[15:45:26] mattwashere: has joined #ruby
[15:45:34] k3rn31_: has joined #ruby
[15:46:04] smathy: domgetter, just a couple of additional niceties on top of bash.
[15:46:57] sid_fules: has joined #ruby
[15:47:04] domgetter: smathy like posix non-compliance? :P
[15:47:24] shevy: I am a basher too
[15:47:25] RegulationD: has joined #ruby
[15:47:48] Maletor: has joined #ruby
[15:48:01] goeast: has joined #ruby
[15:48:16] goeast: Hello ! I am creating a music library. The artist and the song name should be stored in a Hash. So that for example :
[15:48:18] goeast: Adele(key) => Hello, Skyfall (values).
[15:48:19] goeast: Today I have {"Adele"=>[], nil=>"Hello"}
[15:48:21] goeast: Can you help me ?
[15:48:27] goeast: https://gist.github.com/go-east/063eb95bb960bf029404e5461b533fdc
[15:48:28] martee: has joined #ruby
[15:48:37] danostrowski: has joined #ruby
[15:49:16] ponga: has joined #ruby
[15:49:53] scottschecter: has joined #ruby
[15:50:01] chippy: has joined #ruby
[15:50:03] nofacade: has joined #ruby
[15:50:45] domgetter: goeast: on line 36, you refer to @artist, but since you never stored anything in that instance variable, it comes up as nil, and so nil points to your song in the hash
[15:51:10] goeast: Yes I know and I am not able to store something in it
[15:51:42] hypercube32: has joined #ruby
[15:51:47] domgetter: goeast: add_song probably needs to be send both the artist and the song, so that you can add the song to the list of songs for that artist.
[15:51:53] domgetter: needs to be sent*
[15:52:05] sid_fules: has joined #ruby
[15:52:13] maletor3: has joined #ruby
[15:52:28] aep: has joined #ruby
[15:52:44] aep: any idea why bundler is saying: Bundler::HTTPError: Network error while fetching ?
[15:52:54] goeast: domgetter : I am checking
[15:52:54] aep: this is gems version 2.6.4
[15:53:02] aep: on ruby 2.3.1p112
[15:53:54] Madplatypus: has joined #ruby
[15:54:16] aep: actually looks like gem itself is broken too:
[15:54:18] aep: Getting SRV record failed: DNS result has no information for _rubygems._tcp.api.rubygems.org
[15:54:26] symm-: has joined #ruby
[15:54:52] blandflakes: has joined #ruby
[15:55:13] SilverKey: has joined #ruby
[15:55:21] goeast: domgetter : https://gist.github.com/go-east/063eb95bb960bf029404e5461b533fdc still doesn't work or I might do something wrong ?
[15:56:17] pepee: has joined #ruby
[15:56:17] domgetter: goeast: on line 36, you want @artist to just be artist. artist is what you put in the parameter list on line 35, so artist is what you want on line 36
[15:56:51] sid_fules: has joined #ruby
[15:56:56] tildes_: has joined #ruby
[15:58:23] MyMind: has joined #ruby
[15:59:14] amclain: has joined #ruby
[15:59:28] domgetter: goeast: when there's an @ sign in front of a variable name, it's a different variable than if it doesn't have the @ sign in front of it. so @my_number and my_number are two different variables
[15:59:34] Yiota: has joined #ruby
[16:00:32] hutch34_: has joined #ruby
[16:01:33] goeast: domgetter : Thank you I slowy starting to get it :)
[16:01:43] sid_fules: has joined #ruby
[16:02:11] domgetter: goeast: no problem, we're all at different places on the path :)
[16:03:38] jas02: has joined #ruby
[16:03:58] agentmeerkat: has joined #ruby
[16:04:09] jokke: jhass: seems to be a docker problem
[16:04:21] Noxilex: has joined #ruby
[16:04:28] jokke: jhass: i use both, environment and env_file in my docker-compose.yml
[16:04:35] jokke: it doesn't seem to load the env_file
[16:05:10] Pupeno: has joined #ruby
[16:05:53] synthroid: has joined #ruby
[16:06:22] Ishido: has joined #ruby
[16:07:33] hutch34: has joined #ruby
[16:07:34] mleung: has joined #ruby
[16:08:03] certainty: has joined #ruby
[16:10:48] omphe: has joined #ruby
[16:11:04] hiennaj: has joined #ruby
[16:12:56] Yiota: has joined #ruby
[16:13:51] Yiota: has joined #ruby
[16:14:56] Yiota: has joined #ruby
[16:15:17] noobsu: has joined #ruby
[16:15:33] dionysus70: has joined #ruby
[16:15:59] Yiota: has joined #ruby
[16:16:53] Yiota: has joined #ruby
[16:17:01] Evans: has joined #ruby
[16:17:51] whathappens: has joined #ruby
[16:17:58] Yiota: has joined #ruby
[16:18:31] banister: has joined #ruby
[16:19:04] Yiota: has joined #ruby
[16:19:24] mattwashere: has joined #ruby
[16:20:30] maletor3: has joined #ruby
[16:21:08] startupality: has joined #ruby
[16:21:08] fclausen: has joined #ruby
[16:21:15] bfrizzle: has joined #ruby
[16:21:29] bfrizzle: hey, does anyone have experience making TUI (e.g. ncurses-style) apps with ruby?
[16:25:32] zacsek: has joined #ruby
[16:29:35] Cohedrin: has joined #ruby
[16:30:17] jottr: has joined #ruby
[16:34:02] bruce_lee: has joined #ruby
[16:34:05] TomyLobo: has joined #ruby
[16:34:21] Sammichmaker: has joined #ruby
[16:34:55] tildes_: has joined #ruby
[16:37:58] shevy: bfrizzle the poor souls who tried, abandoned it :)
[16:38:05] shevy: I think manveru wrote a ruby rogue ncurses game thing once
[16:38:44] RobertBirnie: has joined #ruby
[16:39:41] nankyokusei: has joined #ruby
[16:40:06] flashpoint9: has joined #ruby
[16:40:43] jhass: probably a fault of ncurses though, less so ruby
[16:42:54] goeast: has joined #ruby
[16:43:20] SCHAAP137: has joined #ruby
[16:43:46] agent_white: I wrote a IRC client using ncursesw.
[16:43:54] agent_white: Then developed a drinking problem shortly after.
[16:43:59] goeast: domgetter : Thank you sooooo much. Just your little explanation was soooo useful. I just moved to the next step !
[16:44:22] nando293921: has joined #ruby
[16:44:38] Infra-Red: has joined #ruby
[16:45:34] fedexo: has joined #ruby
[16:47:54] wldcordeiro: has joined #ruby
[16:48:08] tristanp: has joined #ruby
[16:48:24] Maletor: has joined #ruby
[16:53:50] GodFather: has joined #ruby
[16:53:56] goeast: has joined #ruby
[16:55:17] gregf: has joined #ruby
[16:55:25] yqt: has joined #ruby
[16:55:28] ips|malc: has joined #ruby
[16:56:57] sid_fules: has joined #ruby
[16:58:26] nose: has joined #ruby
[16:59:07] cyfr0n: has joined #ruby
[16:59:21] mattwashere: has joined #ruby
[16:59:38] cyfr0n: has joined #ruby
[16:59:51] skolman: has joined #ruby
[17:00:09] djbkd: has joined #ruby
[17:00:41] CJKinni`: has joined #ruby
[17:00:56] Coldblackice: has joined #ruby
[17:00:56] marr123: has joined #ruby
[17:03:23] Gasher: has joined #ruby
[17:04:11] aegis3121: has joined #ruby
[17:04:14] Es0teric: has joined #ruby
[17:04:36] [gmi]: has joined #ruby
[17:05:47] cd83x: has joined #ruby
[17:05:56] Eiam_: has joined #ruby
[17:06:56] mattwashere: has joined #ruby
[17:07:59] Mattx: has joined #ruby
[17:08:05] minimalism: has joined #ruby
[17:08:05] ocbtec: has joined #ruby
[17:08:09] Mattx: hey people!
[17:09:03] Mattx: I'm getting some weird resuls with this. I'm running whois from Ruby, and I'm trying to read the exitcode so that I know when it failed (sometimes the connection is reseted, the domain is malformed or whatever)
[17:09:32] Mattx: for instance, how do you get the exitcode of `whois foo.com` ?
[17:10:03] certainty: has joined #ruby
[17:10:15] hahuang61: has joined #ruby
[17:10:46] kaleido: very carefully?
[17:11:19] Mattx: I've tried with $?.exitstatus, which seems to work, but I think errors with that code while using system(), I'm double checking now
[17:11:20] elomatreb: The numerical exit code is available using $?.exitstatus
[17:11:42] Mattx: err, think I've seen *
[17:12:05] RegulationD: has joined #ruby
[17:12:17] yebyen: has joined #ruby
[17:13:09] Mattx: ah, I know what happens
[17:13:21] Mattx: whois returns exit code 1 when the domain is invalid, or when the domain is not registered
[17:13:35] Mattx: for instance `whois oasnfosanf.com`; $?.exitstatus == 1
[17:14:16] elomatreb: Isn't a tool like dig more suitable?
[17:14:56] elomatreb: nevermind; misread what you're trying to do
[17:15:25] mattwashere: has joined #ruby
[17:15:34] rcvalle: has joined #ruby
[17:15:52] yebyen: does anyone use mariadb client library with mysql2 gem in windows?
[17:16:30] Mattx: elomatreb, I'm trying to know when whois returns an error because there was a problem with the connection (I sometimes get "connection reset" or fgets problems), or because the domain is not registered
[17:17:41] yebyen: i am obviously getting malformed packet errors because my mysql2 gem was compiled against mysql client lib (not maria lib)
[17:17:49] sneakerhax: has joined #ruby
[17:17:57] David_H_Smith: has joined #ruby
[17:18:02] yebyen: i let ShoesRB compile the gem for me (or however it fetches, looked like it was compiling)
[17:18:10] yebyen: and it doesn't present a lot of options
[17:18:48] Yiota: has joined #ruby
[17:18:57] jhass: Mattx: also notice http://devdocs.io/ruby~2.3/process/status#method-i-exited-3F
[17:19:29] Yiota: has joined #ruby
[17:20:34] Yiota: has joined #ruby
[17:21:24] moeabdol: has joined #ruby
[17:21:41] Yiota: has joined #ruby
[17:22:07] fclausen: has joined #ruby
[17:22:14] Wolland: has joined #ruby
[17:22:40] Yiota: has joined #ruby
[17:23:14] CausaMortis: has joined #ruby
[17:23:46] eljimmy: has joined #ruby
[17:24:23] ips|malc: has joined #ruby
[17:25:40] elomatreb: has joined #ruby
[17:26:34] spider-mario: has joined #ruby
[17:26:36] startupality: has joined #ruby
[17:27:02] lacuna: has joined #ruby
[17:28:12] mattwashere: has joined #ruby
[17:29:04] CoderPuppy: has joined #ruby
[17:31:00] dionysus69: has joined #ruby
[17:31:23] nat2610: has joined #ruby
[17:31:35] Mia: has joined #ruby
[17:31:36] Mia: has joined #ruby
[17:31:41] choke: has joined #ruby
[17:32:52] yfeldblum: has joined #ruby
[17:34:42] yfeldblum: has joined #ruby
[17:34:59] jaguarmagenta: has joined #ruby
[17:35:14] kareeoleez: has joined #ruby
[17:35:53] ferr: has joined #ruby
[17:36:09] shevy: hanmac yippie, I got the sample at rwx-master/samples/widgets/widgets.rb to work - ctrl-c SIGINT does not seem to work though, I will file at github
[17:37:13] jottr_: has joined #ruby
[17:37:13] Hanmac: shevy yeah when i test it in irb Ctrl-c seems to prevented ... (i dont know why and also not how to fix it) ... probably some Event i need to add
[17:37:54] hahuang61: has joined #ruby
[17:38:19] goeast: has joined #ruby
[17:39:21] cpup: has joined #ruby
[17:40:55] mattwashere: has joined #ruby
[17:43:02] kspencer: This may sound stupid, but I'm trying var = a + b + c / but I need it to not care about
[17:43:13] kspencer: er lets try again
[17:44:31] kspencer: This may sound stupid, but I'm trying arrayvar = a-array + b-array + c-array / but I need it to not care about a variable being nil
[17:44:41] kspencer: seen here https://gist.github.com/IotaSpencer/6ad97bdc48ce8624984b81a088f714ae
[17:44:51] jottr: has joined #ruby
[17:44:59] agentmeerkat: has joined #ruby
[17:45:14] jhass: 0/1 as "booleans"?
[17:45:20] jhass: ACTION slowly moves away
[17:45:38] tildes_: has joined #ruby
[17:45:49] jhass: also waaaaay too much logic to embed into a template
[17:48:04] kspencer: that's also literally the template though, I have the main page post to an iframe with that, so that I can have an 'instant' generation, instead of having it generate a whole page/window for it
[17:48:15] nat26101: has joined #ruby
[17:49:06] haxrbyte: has joined #ruby
[17:49:06] jhass: I don't even want to know what you mean with that
[17:50:01] agentmeerkat: has joined #ruby
[17:50:40] Maletor: has joined #ruby
[17:51:20] Macaveli: has joined #ruby
[17:53:09] Siegfried: has joined #ruby
[17:53:22] ffgghhj: has joined #ruby
[17:53:30] Siegfried: Hi all, would greately appreciate some help. Friend of mine is getting into programming and is coding on windows, and we're trying to figure out which version of ruby to install
[17:53:30] Siegfried: http://rubyinstaller.org/downloads/
[17:53:34] ffgghhj: could you show how to use bundle as gemset
[17:53:47] Siegfried: Sidebar says the 64bit versions may have issues, so is the 2.2.4 regular version best choice?
[17:56:13] jhass: kspencer: https://p.jhass.eu/29.rb
[17:56:35] flashpoint9: has joined #ruby
[17:56:52] tAn: has joined #ruby
[17:57:11] jhass: ffgghhj: bundle --path vendor/bundle for dev, bundle --deployment on prod
[17:57:38] jhass: Siegfried: for windows probably still, most of the community is not on windows
[17:57:59] Siegfried: jhass: Yeah I get that
[17:58:05] Siegfried: I'm just trying to figure out which bundle of ruby to install
[17:58:41] jhass: 2.2.4 should be just fine for learning, although 2.3's integration of did_you_mean comes in handy
[17:59:49] crystal77: has joined #ruby
[18:01:54] hutch34: has joined #ruby
[18:03:48] SilverKey: has joined #ruby
[18:05:58] workmad3: has joined #ruby
[18:08:33] _cj_: has joined #ruby
[18:08:41] Eiam_: has joined #ruby
[18:09:52] _cj_: anybody up to helping a guy who's just starting out on ruby?
[18:10:41] choke: has joined #ruby
[18:10:46] certainty: has joined #ruby
[18:11:05] binaryplease1: has joined #ruby
[18:11:56] shevy: are you on linux
[18:11:57] tobiasvl: _cj_: just ask your question and someone will answer if they can!
[18:15:29] Dimik: has joined #ruby
[18:15:57] kristianpaul: has joined #ruby
[18:16:45] Wolland: has joined #ruby
[18:16:47] smathy_: has joined #ruby
[18:17:24] manveru: ah... ncurses... the name really does it justice
[18:17:30] nettoweb: has joined #ruby
[18:18:00] RegulationD: has joined #ruby
[18:18:15] jenrzzz: has joined #ruby
[18:18:23] anisha: has joined #ruby
[18:19:03] manveru: speaking of which, i should update the ffi-tk gem sometime
[18:19:30] kristianpaul: has left #ruby: ()
[18:20:01] mattwashere: has joined #ruby
[18:21:51] codecop: has joined #ruby
[18:23:04] fclausen: has joined #ruby
[18:23:57] madgen: has joined #ruby
[18:24:51] edwinvdgraaf: has joined #ruby
[18:27:11] manveru: _cj_: hey?
[18:28:16] maloik: has joined #ruby
[18:28:58] edwinvdgraaf: has joined #ruby
[18:29:18] kgrz: has joined #ruby
[18:29:45] symm-: has joined #ruby
[18:31:52] postmodern: has joined #ruby
[18:31:53] nat2610: has joined #ruby
[18:31:57] edwinvdg_: has joined #ruby
[18:33:28] hutch34_: has joined #ruby
[18:33:31] kspencer: jhass: a bit more help, sorry, but I'm getting an argument error with the 'gen random content' which I renamed gen_pass
[18:33:58] jhass: I used keyword arguments
[18:34:05] mgorbach: has joined #ruby
[18:34:08] multi_io: has joined #ruby
[18:34:22] choke: has joined #ruby
[18:34:27] kspencer: #{gen_pass(length,use_uppercase: use_upper, use_lowercase: use_lower, use_numerics: use_numerics, remove_ambiguous: no_ambi)}
[18:34:32] CoderPuppy: has joined #ruby
[18:34:58] MrBusiness2: has joined #ruby
[18:35:00] RegulationD: has joined #ruby
[18:35:54] gtsai: has joined #ruby
[18:36:43] Phoeynix: has joined #ruby
[18:37:00] GBrawl: has joined #ruby
[18:37:06] Phoeynix: has left #ruby: ("Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is")
[18:38:04] kspencer: @ jhass right, that's what i'm using, but I got 5 for 1 when using regular arguments, then 26 for 1 when using the keywords
[18:38:13] aegis3121: has joined #ruby
[18:38:30] kspencer: i read it wrong, the 26 for 1 is with concat
[18:38:48] jhass: oh right, shouldn't have used * there
[18:39:22] jhass: still have to to_a there unfortunately
[18:40:07] kspencer: added those in and will check it
[18:40:34] nankyokusei: has joined #ruby
[18:40:40] Hanmac: shevy playing with SIGINT does show that ruby doesn'T get the trigger anymore and wx does monopolize it ... hm maybe i need some junk to fix that
[18:41:03] allcentury: has joined #ruby
[18:42:02] kspencer: there it all works now :D
[18:42:34] CausaMortis-LT: has joined #ruby
[18:45:08] mikecmpbll: has joined #ruby
[18:46:11] nofacade: has joined #ruby
[18:47:11] shevy: hehe "some junk"
[18:48:39] _cj_: in your trunk?
[18:48:57] _cj_: I can share some of mine
[18:49:30] sid_fules: has joined #ruby
[18:49:52] miqlas-H: has joined #ruby
[18:51:12] hxegon: *.-/\/ <- junk trunk -> (_|_)
[18:51:16] hxegon: Hey miqlas-H
[18:52:38] cd83x: has joined #ruby
[18:52:55] snowy: has joined #ruby
[18:53:36] omphe: has joined #ruby
[18:55:46] kirun: has joined #ruby
[18:57:28] nettoweb: has joined #ruby
[18:57:51] freerobby: has joined #ruby
[18:58:27] CausaMortis-LT: has joined #ruby
[18:58:39] jottr: has joined #ruby
[18:59:23] freerobby: has joined #ruby
[19:00:45] mynameisbrian: has joined #ruby
[19:00:58] miqlas-H: I'm working on updating the ruby port for Haiku (latest, with gcc5 and all the shiny things). But i have some problems with it.
[19:01:54] miqlas-H: I got it compiled with some terminal hacks (without source changes), but i don't think that all this magic required. There need to be a problem with the configure script i think.
[19:02:20] norc: miqlas-H, I hope not that there need to be a problem with it.
[19:02:26] norc: Would make configuring just more painful!
[19:02:37] beneggett: has joined #ruby
[19:02:41] miqlas-H: You can find my recipe for ruby here: http://termbin.com/5k2gd
[19:02:44] joonty: has joined #ruby
[19:02:47] mynameisbrian: anyone read "Design patterns in Ruby"?
[19:02:55] mynameisbrian: is that a good first Ruby book to read
[19:02:57] miqlas-H: As you can see, i had to define some things in the build section.
[19:03:00] coyo: has joined #ruby
[19:03:00] coyo: has joined #ruby
[19:03:02] mynameisbrian: for someone who knows how to program
[19:03:10] gregf: has joined #ruby
[19:03:30] scepticulous: has joined #ruby
[19:03:34] miqlas-H: CFLAGS, CXXFLAGS and so on shouldn't be required, i suppose.
[19:03:45] mynameisbrian: I'm looking for a book to learn Ruby. I know a tiny bit of it and want to expand. I was going to use Eloquent Ruby but now I'm seeing that it should be the second book you read
[19:03:52] choke: has joined #ruby
[19:04:10] miqlas-H: norc :) English is not my native language, sorry.
[19:04:25] norc: miqlas-H, I'm just teasing.
[19:04:33] Pupeno: has joined #ruby
[19:04:51] hxegon: mynameisbrian: Can't say much about design pattern in ruby, or eloquent ruby, but 'practical object-oriented design in ruby' is my jams
[19:04:55] norc: mynameisbrian, eloquent ruby is very frequently mentioned in this channel.
[19:05:41] mynameisbrian: norc, eloquent ruby is one that you read second though. it's covering syntax I haven't learned yet.
[19:05:48] miqlas-H: norc: then let me rework my sentence: I think, this defines shouldn't be needed, if the configure script would be able to handle the platform differences properly. Or maybe i'm who doing something wrong.
[19:05:50] mynameisbrian: thanks hxegon ill take a look
[19:06:07] norc: mynameisbrian, ah nevermind then. :)
[19:06:32] jackjackdripper: has joined #ruby
[19:06:36] jackjackdripper1: has joined #ruby
[19:07:12] palms: has joined #ruby
[19:07:30] GodFather: has joined #ruby
[19:07:45] last_staff: has joined #ruby
[19:07:46] dfockler: has joined #ruby
[19:08:36] shevy: I forgot ... pp foo is calling ... which method again? .to_str ?
[19:08:44] shevy: or .inspect
[19:09:13] soc42: has joined #ruby
[19:09:15] mynameisbrian: p calls inspect
[19:09:18] yqt: has joined #ruby
[19:09:25] mynameisbrian: so maybe pp calls to_str
[19:10:02] mclong: has joined #ruby
[19:11:35] certainty: has joined #ruby
[19:13:49] jenrzzz: has joined #ruby
[19:13:49] jenrzzz: has joined #ruby
[19:14:27] CausaMortis-LT: has joined #ruby
[19:15:14] blaxter: has joined #ruby
[19:15:36] allcentury: has joined #ruby
[19:16:51] toretore: pp calls pretty_print
[19:18:45] CausaMortis: has joined #ruby
[19:19:18] roamingdog: has joined #ruby
[19:19:56] sid_fules: has joined #ruby
[19:19:58] hahuang61: has joined #ruby
[19:20:09] whathappens: has joined #ruby
[19:21:28] hahuang65: has joined #ruby
[19:21:41] soc42: has joined #ruby
[19:22:23] noobsu: has joined #ruby
[19:22:38] Ragen: has joined #ruby
[19:24:11] fclausen: has joined #ruby
[19:26:13] Ragen: Hi I get this errr --->> make: *** [do-install-all] Error 1
[19:26:14] Ragen: !!! Installation of ruby 2.3.0 failed!
[19:26:14] Ragen: fulll log is here https://gist.github.com/anonymous/aba1f3b68b1142ca3d9ad5a74194226a
[19:26:35] norc: Ragen, can you also include details as to how you tried installing ruby?
[19:26:48] norc: Ragen, all (!) the commands you used.
[19:27:34] ramfjord: has joined #ruby
[19:28:13] Ragen: ya I followed http://ryanbigg.com/2014/10/ubuntu-ruby-ruby-install-chruby-and-you/
[19:29:31] pawnbox: has joined #ruby
[19:31:43] Ragen: apt-get update
[19:31:43] Ragen: apt-get install build-essential
[19:31:43] Ragen: wget -O ruby-install-0.6.0.tar.gz \
[19:31:43] Ragen: https://github.com/postmodern/ruby-install/archive/v0.6.0.tar.gz
[19:31:43] Ragen: tar -xzvf ruby-install-0.6.0.tar.gz
[19:32:56] elomatreb: Ragen: Is there a reason you are compiling from source? If you're on debian or ubuntu there should be prebuilt packages available
[19:33:17] norc: elomatreb, if you have ever been on debian and ubuntu you would know why. ;-)
[19:33:21] norc: The packages there are grossly outdated.
[19:33:51] elomatreb: I usually use RVM to install ruby, which downloads prebuilt ruby packages even for the latest versions
[19:34:08] havenwood: Ragen: An aside, but Brightbox maintains up-to-date Ruby packages for Ubuntu: https://www.brightbox.com/docs/ruby/ubuntu/
[19:34:20] elomatreb: But you're right I guess, I've grown accustomed to Arch :D
[19:34:39] norc: elomatreb, rvm has kind of become obsolete with chruby/ruby-install as rvm is just too intrusive.
[19:35:12] havenwood: elomatreb: Here's a nice example of using chruby with archlinux: https://gist.github.com/jhass/8839655bb038e829fba1
[19:35:41] jaguarmagenta: has joined #ruby
[19:36:12] elomatreb: norc: I guess I could agree, but it makes everything so easy. I usually don't have to deal with missing libraries when building most native extensions
[19:36:21] tildes_: has joined #ruby
[19:36:43] Ragen: I was told to try that link in rubyonrails channell
[19:36:45] havenwood: Ragen: Can you update the openssl package through apt-get and try again?
[19:36:52] nando293921: has joined #ruby
[19:37:43] norc: electrostat, yeah. This is a rare case, generally ruby-install manages to install all ruby types without trouble.
[19:37:58] norc: (Assuming you are not on some exotic system)
[19:38:05] hahuang65: has joined #ruby
[19:38:16] Ragen: ok will try now
[19:38:22] havenwood: And it's easier to fix bugs in hundreds of lines of shell than it is in tens of thousands of lines of shell.
[19:38:29] norc: electrostat, building native extensions usually happens with gems though, and rvm does not make this any better.
[19:41:26] Ragen: openssl is already the newest version.
[19:44:21] freerobby: has joined #ruby
[19:46:56] cd83x: has joined #ruby
[19:46:58] shinnya: has joined #ruby
[19:47:00] jottr_: has joined #ruby
[19:48:46] hahuang65: has joined #ruby
[19:48:57] jenrzzz: has joined #ruby
[19:49:02] skolman_: has joined #ruby
[19:50:46] mclong: has joined #ruby
[19:52:33] smathy: has joined #ruby
[19:54:40] nat2610: has joined #ruby
[19:56:04] ryann: has joined #ruby
[19:58:11] roamingdog: has joined #ruby
[20:00:26] roamingdog: has joined #ruby
[20:03:08] blackgoat: has joined #ruby
[20:07:00] adamf: has joined #ruby
[20:07:53] iceden: has joined #ruby
[20:10:21] arooni: has joined #ruby
[20:10:24] gtsai: has joined #ruby
[20:11:11] agentmee1kat: has joined #ruby
[20:12:18] certainty: has joined #ruby
[20:12:22] johnmilton: has joined #ruby
[20:12:23] n_blownapart: has joined #ruby
[20:13:41] ur5us: has joined #ruby
[20:13:46] mclong: has joined #ruby
[20:14:57] haxrbyte: has joined #ruby
[20:15:54] boboc: has joined #ruby
[20:16:09] joskei2: has joined #ruby
[20:17:54] dionysus69: has joined #ruby
[20:18:00] qasaur: has joined #ruby
[20:18:58] martee: has joined #ruby
[20:20:53] jenrzzz: has joined #ruby
[20:20:53] jenrzzz: has joined #ruby
[20:20:59] hutch34_: has joined #ruby
[20:21:45] cd83x: has joined #ruby
[20:22:04] pzb: has joined #ruby
[20:23:08] BigRonnieRon: has joined #ruby
[20:24:07] emilkarl: has joined #ruby
[20:25:00] pwnd_nsfw: has joined #ruby
[20:25:03] omphe: has joined #ruby
[20:26:37] jas02: has joined #ruby
[20:29:25] hutch34_: has joined #ruby
[20:29:54] hahuang65: has joined #ruby
[20:31:07] iceden: has joined #ruby
[20:33:01] mgorbach: has joined #ruby
[20:35:13] pkrnj: has joined #ruby
[20:35:58] Hanmac: ping shevy
[20:36:37] robbyoconnor: has joined #ruby
[20:37:31] peitur: has joined #ruby
[20:37:56] Asher: has joined #ruby
[20:38:49] nat2610: has joined #ruby
[20:40:23] crdpink: has joined #ruby
[20:41:17] platzhirsch: has joined #ruby
[20:41:19] mgorbach: has joined #ruby
[20:41:28] nankyokusei: has joined #ruby
[20:43:20] Hanmac: shevy SIGINT fixed
[20:43:38] shevy: what was it? what signal stole it?
[20:44:06] Amylookemil: has joined #ruby
[20:44:48] Amylookemil: has left #ruby: ()
[20:45:47] Hanmac: shevy: wxWidgets has own signal handler ... so ruby didnt get it ... for now i have it that SIGINT does close the wxApp with wxExit (which also closes the program)
[20:46:52] Hanmac: probably it would be an idea to send all signals back to ruby, but for now your sigint problem is fixed
[20:48:09] hahuang65: has joined #ruby
[20:49:57] Devalo: has joined #ruby
[20:51:22] mattwashere: has joined #ruby
[20:52:40] skade: has joined #ruby
[20:53:17] tgeeky: has joined #ruby
[20:55:19] johnmilton: has joined #ruby
[20:58:04] robbyoconnor: has joined #ruby
[20:59:07] CausaMortis: has joined #ruby
[20:59:35] nadir: has joined #ruby
[21:00:06] snowy: has joined #ruby
[21:01:02] ryann: has joined #ruby
[21:02:27] scepticulous: has joined #ruby
[21:02:54] nat2610: has joined #ruby
[21:03:08] martee: has joined #ruby
[21:03:30] beneggett: has joined #ruby
[21:05:15] firstdayonthejob: has joined #ruby
[21:05:55] bruce_lee: has joined #ruby
[21:05:56] bruce_lee: has joined #ruby
[21:08:02] sid_fules: has joined #ruby
[21:12:29] zenspider: has joined #ruby
[21:13:01] certainty: has joined #ruby
[21:17:54] SilverKey: has joined #ruby
[21:18:54] nettoweb: has joined #ruby
[21:19:20] cpup: has joined #ruby
[21:19:22] jgrevich: has joined #ruby
[21:20:22] scepticulous: has joined #ruby
[21:20:54] jas02: has joined #ruby
[21:23:55] martee: has joined #ruby
[21:25:45] roamingdog: has joined #ruby
[21:26:24] fclausen: has joined #ruby
[21:26:49] whathappens: has joined #ruby
[21:26:49] aries_liuxueyang: has joined #ruby
[21:26:59] haxrbyte_: has joined #ruby
[21:27:51] eljimmy: has joined #ruby
[21:27:57] Pupeno: has joined #ruby
[21:30:11] zeroDi: has joined #ruby
[21:31:02] skolman_: has joined #ruby
[21:31:23] martee: has joined #ruby
[21:32:13] ryann: has joined #ruby
[21:34:09] hahuang65: has joined #ruby
[21:34:39] CoderPuppy: has joined #ruby
[21:34:55] pawnbox: has joined #ruby
[21:35:06] aswen: has joined #ruby
[21:36:27] jaguarmagenta: has joined #ruby
[21:37:33] LoneHermit: has joined #ruby
[21:39:08] alexIO: has joined #ruby
[21:42:39] jenrzzz: has joined #ruby
[21:42:39] jenrzzz: has joined #ruby
[21:47:02] workmad3: has joined #ruby
[21:48:52] cpup: has joined #ruby
[21:50:48] hutch34_: has joined #ruby
[21:53:10] bobbycvi: has joined #ruby
[21:53:32] postmodern: has joined #ruby
[21:53:53] yqt: has joined #ruby
[21:57:15] sid_fules: has joined #ruby
[21:57:36] kraken: has joined #ruby
[21:58:04] tAn: has joined #ruby
[21:58:37] krakenr: if (class A) inherits from (class B), and (class B) inherits from (class C), does (class A) inherit from (class C)?
[21:59:29] matp: has joined #ruby
[22:00:57] havenwood: >> class C end; class B < C; end; class A < B; end
[22:00:58] ruby[bot]: havenwood: # => nil (https://eval.in/582240)
[22:01:19] blackgoat: has joined #ruby
[22:01:27] havenwood: Kraken_: Try that in irb or pry then check: A < C
[22:01:45] havenwood: Kraken_: And take a look at: A.ancestors
[22:02:20] noobsu: has joined #ruby
[22:02:47] et09: has joined #ruby
[22:03:15] et09: how do i do String#split('foo') except preserving foo at the beginning of each segment?
[22:03:24] et09: is there a nice way?
[22:04:02] jhass: et09: more than one foo in your string?
[22:04:07] et09: it's "scan"
[22:04:09] et09: n/m thanks
[22:04:30] jhass: well if scan works for you then
[22:04:39] skade: has joined #ruby
[22:04:42] et09: well if there is afaster way
[22:04:44] jhass: not quite what you described though, no?
[22:04:45] jenrzzz_: has joined #ruby
[22:05:00] shevy: fast fast fast!
[22:05:05] et09: i do need it fast
[22:05:18] et09: run-time wise
[22:05:43] et09: like i'd prefer not to use regex like i'd have to do with scan
[22:06:41] jhass: >> ["af foo af foo".scan("foo"), "af foo af foo".split(/(?<=foo)/)]
[22:06:43] ruby[bot]: jhass: # => [["foo", "foo"], ["af foo", " af foo"]] (https://eval.in/582241)
[22:06:57] jhass: >> "af foo af foo".split(/(?=foo)/)
[22:06:58] ruby[bot]: jhass: # => ["af ", "foo af ", "foo"] (https://eval.in/582242)
[22:07:06] jhass: not sure what you want exactly
[22:07:15] jhass: but there's the variants
[22:07:33] am55: has joined #ruby
[22:07:33] am55: has joined #ruby
[22:07:41] et09: a non-regex version of variant 2 basically
[22:07:57] et09: well to be accurate
[22:08:39] et09: aaaaaaFOObbbbbbFOOcccccFOOddddddFOOeeeee would give me ['FOObbbbbb','FOOccccc','FOOddddddd','FOOeeeee']
[22:10:13] et09: or i could also deal with:
[22:10:13] n_blownapart: has joined #ruby
[22:10:18] et09: aaaaaaFOObbbbbbFOOcccccFOOddddddFOOeeeee would give me ['aaaaa','FOObbbbbb','FOOccccc','FOOddddddd','FOOeeeee']
[22:10:43] havenwood: >> 'aaaaaaFOObbbbbbFOOcccccFOOddddddFOOeeeee'.scan /FOO[^F]+/
[22:10:44] ruby[bot]: havenwood: # => ["FOObbbbbb", "FOOccccc", "FOOdddddd", "FOOeeeee"] (https://eval.in/582252)
[22:10:45] et09: if i were writing C i would just run a state machine over the string. but something tells me that'd be super slow in ruby
[22:10:49] beneggett: has joined #ruby
[22:10:54] et09: and again i don't want to use regex cause one of these files might be like 20mb
[22:11:21] et09: unless that's not a huge performance hit. idk
[22:11:28] et09: sounds like it would be
[22:11:51] jhass: ah well crafted regex (no backtracking) should be close enough to the state machine actually
[22:11:53] Zighuatl: has joined #ruby
[22:12:22] et09: i don't even have access to the file right now, lol, so i can't test
[22:12:27] et09: have to find an example online
[22:12:36] et09: but i can see how that'd work
[22:12:43] aegis3121: Regex =~ Regular Languages =~ finite state machine IIRC
[22:13:25] jhass: a backtracking regex is potentially infinite I think
[22:13:42] jhass: et09: anyway, real values would be needed to assist in crafting a good regex
[22:13:51] certainty: has joined #ruby
[22:14:05] et09: it's a preset three char string so FOO is fine here
[22:14:14] et09: er, four
[22:14:38] jhass: can any of the four chars occur before the four chars occur again?
[22:15:01] jas02: has joined #ruby
[22:15:02] Azure: has joined #ruby
[22:15:28] hahuang65: has joined #ruby
[22:15:53] jhass: is FOOaaaFaFOObbbbObbb possible and should extract "FOOaaaFa" and "FOObbbbObbb"?
[22:15:59] ryann: has joined #ruby
[22:16:04] skade: has joined #ruby
[22:16:14] havenwood: et09: FOOaaOaFOO # a O occurred before another FOO
[22:16:17] et09: the string never starts with FOO
[22:16:27] jhass: irrelevant to the question
[22:16:28] et09: yeah, that is the case
[22:16:35] et09: that will happen
[22:16:36] banister: has joined #ruby
[22:18:32] gtsai: has joined #ruby
[22:18:50] startupality: has joined #ruby
[22:18:53] jhass: .scan(/FOO.+?(?=FOO|$)/) should be good enough
[22:19:10] jhass: making it non-greedy should not backtrack
[22:19:52] sid_fules: has joined #ruby
[22:20:40] jenrzzz: has joined #ruby
[22:20:40] jenrzzz: has joined #ruby
[22:21:18] zeroDi: has joined #ruby
[22:22:12] et09: oh it needs to traverse \r too
[22:23:09] webnanners: has joined #ruby
[22:23:20] Parko: has joined #ruby
[22:24:38] et09: guess that's not s flag like i thought
[22:25:22] et09: oh [\s\S]. got it
[22:26:08] blandflakes: has joined #ruby
[22:26:27] finisherr: has joined #ruby
[22:27:39] nando293921: has joined #ruby
[22:27:58] mattwashere: has joined #ruby
[22:28:33] et09: ok, thanks
[22:28:58] skweek: has joined #ruby
[22:29:26] jhass: oh, . doesn't match \r either without m? interesting
[22:29:40] jhass: mmh, does here actually
[22:33:19] Zighuatl: has joined #ruby
[22:33:49] nat2610: has joined #ruby
[22:34:08] duckpuppy: has joined #ruby
[22:35:09] millerti: has joined #ruby
[22:36:00] blandflakes: has joined #ruby
[22:38:05] sepp2k: has joined #ruby
[22:38:46] rkazak: has joined #ruby
[22:39:29] CausaMortis: has joined #ruby
[22:39:39] Pupeno: has joined #ruby
[22:39:52] dagelf: has joined #ruby
[22:40:59] phredus: has joined #ruby
[22:42:19] nankyokusei: has joined #ruby
[22:42:24] xlegoman: has joined #ruby
[22:44:01] nando293921: has joined #ruby
[22:44:07] hahuang65: has joined #ruby
[22:44:51] solocshaw: has joined #ruby
[22:50:11] roamingdog: has joined #ruby
[22:52:57] tAn: has joined #ruby
[22:54:04] sid_fules: has joined #ruby
[22:54:45] druonysus: has joined #ruby
[22:56:04] bmorrison: has joined #ruby
[22:57:45] solocshaw: has joined #ruby
[22:58:15] webnanners: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[22:58:24] spudowiar: has joined #ruby
[23:00:11] skolman_: has joined #ruby
[23:00:26] tildes_: has joined #ruby
[23:00:45] ryann: has joined #ruby
[23:00:47] David_H_Smith: has joined #ruby
[23:01:31] jokke: i'm playing around with celluloid and i don't know why my code isn't behaving the way i think it should: https://p.jreinert.com/m-sch/
[23:01:56] jokke: i'd expect all of the segment values to update
[23:02:06] jokke: but only the first one does
[23:02:13] jokke: all the others stay ''
[23:04:29] nando293921: has joined #ruby
[23:04:48] matp: has joined #ruby
[23:04:58] jokke: what am i doing wrong?
[23:05:25] blandflakes: has joined #ruby
[23:06:16] roamingdog: has joined #ruby
[23:06:21] mattwashere: has joined #ruby
[23:06:44] neanderslob: has joined #ruby
[23:07:15] RobertBirnie: has joined #ruby
[23:09:16] jas02: has joined #ruby
[23:09:16] skolman_: has joined #ruby
[23:09:20] palms: has joined #ruby
[23:09:25] tildes_: has joined #ruby
[23:09:38] BackEndCoder: has joined #ruby
[23:10:47] noobsu: has joined #ruby
[23:12:10] roamingdog: has joined #ruby
[23:12:31] jhass: looks like there's a #celluloid
[23:13:46] PlasmaStar: has joined #ruby
[23:14:34] certainty: has joined #ruby
[23:15:29] startupality: has joined #ruby
[23:17:51] dtoast: has joined #ruby
[23:18:41] hiyosi: has joined #ruby
[23:18:59] roamingdog: has joined #ruby
[23:19:03] dtoast: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[23:19:13] dtoast: has joined #ruby
[23:22:15] edwinvdgraaf: has joined #ruby
[23:22:34] kies: has joined #ruby
[23:24:17] mattwashere: has joined #ruby
[23:24:25] jphase: has joined #ruby
[23:24:31] koooge: has joined #ruby
[23:28:04] ramfjord: has joined #ruby
[23:32:34] hahuang65: has joined #ruby
[23:35:05] sid_fules: has joined #ruby
[23:37:12] jaguarmagenta: has joined #ruby
[23:43:12] flashpoint9: has joined #ruby
[23:47:25] roamingdog: has joined #ruby
[23:50:04] fclausen: has joined #ruby
[23:51:30] jnoob22: has joined #ruby
[23:51:34] Pupeno: has joined #ruby
[23:54:24] tAn: has joined #ruby
[23:54:24] madgen: has joined #ruby
[23:55:50] CloCkWeRX: has joined #ruby
[23:57:44] duoi: has joined #ruby