« Back to channel list

#ruby - 10 February 2016

« Back 1 day Forward 1 day »
[00:00:01] Ox0dea: havenwood: https://glot.io/snippets/ebryfn8a83
[00:00:19] Ox0dea: As best I can tell, there's no way to convince JSON, YAML, or even Marshal to dump NaNs with their payloads. :/
[00:00:25] tildes: has joined #ruby
[00:01:02] floror: has joined #ruby
[00:01:53] Ox0dea: Even if I don't make it a Float, Marshal uses the bit pattern to determine that it's a NaN. :(
[00:03:23] bruce_lee: \(^_^)/ @all
[00:03:29] bruce_lee: I'm new to ruby
[00:03:59] bruce_lee: which tool would you guys recommend to save/cache an array of hashes to harddisk?
[00:04:17] Ox0dea: bruce_lee: JSON, YAML, or Marshal. :P
[00:04:36] shevy: bruce lee does json
[00:04:44] havenwood: MessagePack for fun.
[00:05:06] pawnbox: has joined #ruby
[00:05:22] Ox0dea: The Capn' Proto wrapper seems to be dead.
[00:05:37] havenwood: Bugboy1028: You could use YAML::Store (YAML) or PStore (Marshal) from the stdlib: http://ruby-doc.org/stdlib/libdoc/yaml/rdoc/YAML/Store.html
[00:06:49] havenwood: Bugboy1028: Or if you're in a DB mood, YDBM (DBM with YAML values): http://ruby-doc.org/stdlib/libdoc/yaml/rdoc/YAML/DBM.html
[00:06:56] Ox0dea: You folks need more MRU in your tab completion.
[00:08:11] acidrainfall: has left #ruby: ()
[00:08:27] havenwood: Bugboy1028: sorry, MT
[00:08:32] havenwood: bruce_lee: ^^
[00:08:53] bruce_lee: thanks @everybody
[00:09:09] bruce_lee: I need to duckDuckGo all these infos
[00:09:25] Ox0dea: Tell us more about the tools you use. :P
[00:10:17] havenwood: bruce_lee: require 'json'; File.write 'example.json', [{}, {}].to_json: http://ruby-doc.org/stdlib/libdoc/json/rdoc/JSON.html
[00:10:45] baweaver: has joined #ruby
[00:13:59] waka: has joined #ruby
[00:14:16] yqfvwal: http://vpaste.net/jzYeA runs 2x times slower than the python version I wrote. Is there any way to optimize it?
[00:14:43] havenwood: Ox0dea: interesting Marshal doesn't balk with a non-NaN float
[00:14:54] Ox0dea: havenwood: Hm?
[00:15:03] Ox0dea: Every bit pattern can be interpreted as a valid Float.
[00:15:20] shevy: float float float your boat
[00:16:18] havenwood: Ox0dea: decode(Marshal.load(Marshal.dump(encode('omgwtfbbq')))) #=> "omgwtf"
[00:16:35] havenwood: Fiddle stole my BBQ!
[00:17:59] Ox0dea: havenwood: That's everything as expected, really.
[00:18:36] kknight: has joined #ruby
[00:18:57] havenwood: Ox0dea: I like the idea of sekret NaN messages.
[00:19:20] Ox0dea: havenwood: Same! But how to transport them? :(
[00:19:29] kies^: has joined #ruby
[00:19:32] idefine: has joined #ruby
[00:20:35] Ox0dea: It's for naught if the sekrits don't decode to what appear to be plain-ol' NaNs.
[00:20:37] yoongkang: has joined #ruby
[00:20:50] floror: has joined #ruby
[00:22:11] andrewh: has joined #ruby
[00:23:03] krzkrz: has joined #ruby
[00:23:31] jdelaney: has joined #ruby
[00:24:30] NightMonkey: has joined #ruby
[00:24:36] ElFerna: has joined #ruby
[00:25:02] andrewjf: has joined #ruby
[00:25:35] snowy: has joined #ruby
[00:25:43] sneakerhax: has joined #ruby
[00:25:58] pestle: has joined #ruby
[00:29:02] yfeldblum: has joined #ruby
[00:29:20] Ox0dea: havenwood: This isn't near as fun: https://eval.in/515969
[00:30:01] askhat: has joined #ruby
[00:30:38] dlitvak: has joined #ruby
[00:31:07] DLSteve: has joined #ruby
[00:32:19] TinkerTyper: has joined #ruby
[00:33:24] nanoz: has joined #ruby
[00:34:31] aupadhye: has joined #ruby
[00:34:46] pawnbox: has joined #ruby
[00:35:41] roshanavand: has joined #ruby
[00:36:02] hahuang61: has joined #ruby
[00:36:13] mikecmpbll: has joined #ruby
[00:37:18] y2mq37: has joined #ruby
[00:37:25] ensyde: has joined #ruby
[00:38:00] mickey_mouse: has joined #ruby
[00:38:12] duckpuppy: has joined #ruby
[00:41:30] mostlybadfly: has joined #ruby
[00:41:30] tildes: has joined #ruby
[00:41:35] betafive: has joined #ruby
[00:41:55] djbkd: has joined #ruby
[00:42:15] ElFerna: has joined #ruby
[00:42:42] chouhoulis: has joined #ruby
[00:43:39] the_drow: has joined #ruby
[00:45:14] baweaver: has joined #ruby
[00:48:43] benlieb: has joined #ruby
[00:50:51] askhat: has joined #ruby
[00:55:26] DodoMaster: has joined #ruby
[00:55:30] DodoMaster: has left #ruby: ()
[00:56:00] TinkerTyper: has joined #ruby
[00:56:10] s2013: has joined #ruby
[01:00:15] DodoMaster: has joined #ruby
[01:01:10] DodoMaster: has left #ruby: ()
[01:03:24] casadei: has joined #ruby
[01:03:36] TinkerTyper: has joined #ruby
[01:07:14] krzkrz: has joined #ruby
[01:08:08] askhat: has joined #ruby
[01:10:12] tildes: has joined #ruby
[01:12:04] resin: has joined #ruby
[01:14:38] Thales: has joined #ruby
[01:15:02] pawnbox: has joined #ruby
[01:19:31] heinrich5991: has joined #ruby
[01:20:33] segmond: has joined #ruby
[01:23:41] johnmilton: has joined #ruby
[01:25:23] askhat: has joined #ruby
[01:25:55] baweaver: has joined #ruby
[01:26:00] shevy: ruby ruby ruby
[01:26:40] Maletor: has joined #ruby
[01:27:19] ruby[bot]: -b triplekmafia!*@*$#ruby-banned
[01:28:09] JoshGlzBrk: has joined #ruby
[01:28:53] krobzaur_: has joined #ruby
[01:31:26] darkf: has joined #ruby
[01:32:46] roshanavand: has joined #ruby
[01:35:51] arescorpio: has joined #ruby
[01:37:12] shevy: anyone knows if someone has suggested a new import system for ruby 3.x?
[01:38:58] duckpuppy: has joined #ruby
[01:41:08] djbkd: has joined #ruby
[01:41:08] Kryptonical: has joined #ruby
[01:41:46] djbkd: has joined #ruby
[01:43:11] shevy: Ox0dea, did you know this https://bugs.ruby-lang.org/issues/12059 ?
[01:43:17] shevy: I mean: [1].one?
[01:43:23] shevy: I did not know that!
[01:43:40] chouhoulis: has joined #ruby
[01:46:51] CloCkWeRX: has joined #ruby
[01:48:19] jackjackdripper: has joined #ruby
[01:49:19] shazaum: has joined #ruby
[01:53:01] idefine: has joined #ruby
[01:54:46] pawnbox: has joined #ruby
[01:55:52] andrewh: has joined #ruby
[01:59:16] yoongkang: has joined #ruby
[01:59:27] azure32: has joined #ruby
[01:59:47] Kryptonic: has joined #ruby
[02:01:51] rbennacer: has joined #ruby
[02:03:22] professor_sadasd: has joined #ruby
[02:03:38] havenwood: >> Point = Struct.new(:x, :y); Point.new(42, nil).one?
[02:03:39] ruby[bot]: havenwood: # => true (https://eval.in/515999)
[02:04:56] idefine: has joined #ruby
[02:05:43] havenwood: >> Enumerator.new { |yielder| yielder << 42 }.one?
[02:05:44] ruby[bot]: havenwood: # => true (https://eval.in/516000)
[02:06:03] finisherr: has joined #ruby
[02:06:04] Gnut: has joined #ruby
[02:06:12] havenwood: >> (0..0).one?
[02:06:13] ruby[bot]: havenwood: # => true (https://eval.in/516001)
[02:07:42] bitri: has joined #ruby
[02:08:53] professor_sadasd: has left #ruby: ("Leaving")
[02:09:03] shazaum: has joined #ruby
[02:09:58] baweaver: I know valentine's day is coming up, but you don't need to enumerate all the ways to make a single collection for us
[02:12:23] symbol: has joined #ruby
[02:12:42] Coldblackice: has joined #ruby
[02:13:28] havenwood: https://40.media.tumblr.com/tumblr_lze6llAWVz1qa7euco1_400.jpg
[02:14:26] x77686d: has joined #ruby
[02:17:38] baweaver: havenwood: SFW?
[02:17:48] havenwood: baweaver: affirmative!
[02:18:07] eGGsha: has joined #ruby
[02:20:13] skweek: has joined #ruby
[02:20:16] havenwood: >> Enumerator.new { |yielder| Point = Struct.new :x, :y; yielder << [42] << {aim: true} << (0..0) << Point.new(42, nil) << Enumerator.new { |yielder| yielder << 42 } }.all? &:one?
[02:20:17] ruby[bot]: havenwood: # => true (https://eval.in/516003)
[02:20:29] havenwood: baweaver: There ^, now I've properly enumerated them.
[02:20:56] freerobby: has joined #ruby
[02:21:28] yoongkang: has joined #ruby
[02:22:29] Ox0dea: shevy: https://bugs.ruby-lang.org/issues/11286
[02:22:35] stardiviner: has joined #ruby
[02:23:29] shevy: you need some hanmac persuasion skills!
[02:23:52] Ox0dea: shevy: So you were just trying to poke a sore spot? :/
[02:24:19] pawnbox: has joined #ruby
[02:24:23] shevy: perhaps the ruby core team is just very, very busy
[02:25:20] professor_sadasd: has joined #ruby
[02:25:22] pawnbox_: has joined #ruby
[02:26:32] pawnbox: has joined #ruby
[02:27:29] TheBrayn: has joined #ruby
[02:27:33] pawnbox: has joined #ruby
[02:28:51] professor_sadasd: Why does this give me an error about 'belongs_to='? https://gist.github.com/joshgit/656975fc148207a88a06
[02:29:29] professor_sadasd: NoMethodError: undefined method `belongs_to=' for #<Product:0x007fce7a8e4c48>
[02:29:45] nettoweb: has joined #ruby
[02:29:50] Ox0dea: professor_sadasd: Nix the '='.
[02:30:07] Ox0dea: It's right there...
[02:30:12] professor_sadasd: oh, assume it;s a method?
[02:30:17] Ox0dea: It is a method.
[02:30:31] professor_sadasd: I thought those were properties
[02:30:54] jackjackdripper: has joined #ruby
[02:31:05] professor_sadasd: Ox0dea, NoMethodError: undefined method `belongs_to' for #<Product:0x007fce7a807f28>
[02:31:21] Ox0dea: professor_sadasd: What is Product?
[02:31:44] professor_sadasd: class Product < ActiveRecord::Base belongs_to :advertiser end
[02:32:00] Abrin: has joined #ruby
[02:32:11] nettoweb: has joined #ruby
[02:32:52] yoongkang: has joined #ruby
[02:33:45] Ox0dea: professor_sadasd: Let ActiveRecord test ActiveRecord. :P
[02:34:04] professor_sadasd: Yeah, I was given a test to do...
[02:34:25] professor_sadasd: "Write CRUD tests for these models"
[02:34:30] Ox0dea: But your tests aren't supposed to verify that ActiveRecord works.
[02:34:37] Ox0dea: That's what ActiveRecord's tests are for.
[02:34:42] professor_sadasd: How can I write CRUD tests without doing that?
[02:34:57] Ox0dea: Make your objects do something more interesting than exist.
[02:35:12] professor_sadasd: I'm not supposed to do that
[02:35:37] professor_sadasd: Would I just write a test for the controller to "Write a functional test for the endpoint you just created"
[02:35:49] aldarsior: has joined #ruby
[02:36:45] JacobMason: has joined #ruby
[02:36:48] yfeldblum: has joined #ruby
[02:36:55] professor_sadasd: but Ox0dea why is that error happening?
[02:37:08] havenwood: professor_sadasd: get :endpoint_you_just_created; assert_response :success
[02:37:34] Ox0dea: professor_sadasd: `belongs_to` is a class method on Product, not an instance method.
[02:37:37] Ox0dea: You're invoking it on an instance.
[02:38:06] professor_sadasd: havenwood, I put that in my controller test?
[02:38:26] yoongkang: has joined #ruby
[02:38:46] havenwood: professor_sadasd: yup
[02:38:48] havenwood: professor_sadasd: http://guides.rubyonrails.org/testing.html#functional-tests-for-your-controllers
[02:39:31] System42__: has left #ruby: ()
[02:39:44] duckpuppy: has joined #ruby
[02:40:37] professor_sadasd: Ox0dea, how do I associate an advertiser with a product, then?
[02:41:18] havenwood: professor_sadasd: http://guides.rubyonrails.org/association_basics.html#the-has-many-association
[02:41:48] Ox0dea: professor_sadasd: ^, but again, don't test ActiveRecord.
[02:43:01] ss_much: has joined #ruby
[02:44:24] chouhoulis: has joined #ruby
[02:45:01] professor_sadasd: havenwood, how do I actually create the objects?
[02:45:13] professor_sadasd: Do I use belongs_to at all?
[02:46:45] Grays0n: has joined #ruby
[02:47:31] LoneHerm_: has joined #ruby
[02:47:39] professor_sadasd: mmm, with create?
[02:47:55] havenwood: professor_sadasd: Might a Product have more than one Advertiser?
[02:48:10] havenwood: professor_sadasd: find out
[02:48:23] professor_sadasd: stop telling m what to do, dad
[02:48:35] havenwood: professor_sadasd: no child, you listen here: http://guides.rubyonrails.org/association_basics.html#the-has-and-belongs-to-many-association
[02:48:39] ruby[bot]: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[02:48:46] professor_sadasd: You can't use create if it's many to one?
[02:48:50] havenwood: but yeah, this is decidedly Rails
[02:49:12] baweaver: (most of us are in both channels)
[02:49:13] professor_sadasd: has left #ruby: ("Leaving")
[02:49:30] pdoherty: has joined #ruby
[02:52:44] arlek: has joined #ruby
[02:52:52] pawnbox: has joined #ruby
[02:53:57] Mr0riss0: has joined #ruby
[02:57:01] roshanavand: has joined #ruby
[02:57:19] DmitryBochkarev: has joined #ruby
[02:57:43] ReK2: has joined #ruby
[02:57:43] ReK2: has joined #ruby
[03:00:58] babblebre: has joined #ruby
[03:02:02] flughafen_: has joined #ruby
[03:04:43] azure32: has joined #ruby
[03:04:49] s2013: has joined #ruby
[03:04:55] rsc___: has joined #ruby
[03:09:37] eGGsha: has joined #ruby
[03:14:52] rattatmatt: has joined #ruby
[03:15:31] griffindy: has joined #ruby
[03:16:33] Darmani: has joined #ruby
[03:18:05] crdpink: has joined #ruby
[03:19:31] jdelaney: has joined #ruby
[03:22:46] pawnbox: has joined #ruby
[03:23:08] duckpuppy: has joined #ruby
[03:23:19] krzkrz: has joined #ruby
[03:25:29] Nanuq: has joined #ruby
[03:29:14] nemesit|znc: has joined #ruby
[03:31:59] djbkd: has joined #ruby
[03:32:37] djbkd: has joined #ruby
[03:33:07] blackgoat: has joined #ruby
[03:33:17] pawnbox: has joined #ruby
[03:33:25] wolffles: has joined #ruby
[03:36:22] skullcrasher: has joined #ruby
[03:36:25] NICKERS: has joined #ruby
[03:37:12] cantaberry: has joined #ruby
[03:37:32] wolffles: are << and .push suppose to be synonymous?
[03:39:15] jgt4: has joined #ruby
[03:39:49] Ox0dea: wolffles: #push can take more than one argument, but they're otherwise the same.
[03:40:14] havenwood: wolffles: granted of course one can implement either to be whatever
[03:40:25] wolffles: haha its like you read my mind
[03:40:45] Ox0dea: `foo.push(1, 2, 3)` vs. `foo << 1 << 2 << 3`.
[03:40:47] Ox0dea: You decide.
[03:41:08] wolffles: ohh thats how you do it i was doing fo << 1,2,,3
[03:41:08] NICKERS: is smoking weed good for you if you want to develop apps?
[03:42:19] havenwood: !badnick NICKERS
[03:42:20] ruby[bot]: +bb NICKERS!*@*$#ruby-banned *!*@172.56.16.80$#ruby-banned
[03:42:35] ruby[bot]: ruby[bot] kicked NICKERS: is not suitable for this channel, see http://ruby-community.com/pages/user_rules
[03:43:15] symbol: has joined #ruby
[03:43:22] wolffles: id be funny if he didnt intend for it to sound like that
[03:43:33] wolffles: either way he was trollin
[03:45:11] chouhoulis: has joined #ruby
[03:46:31] moeabdol: has joined #ruby
[03:47:54] moeabdol1: has joined #ruby
[03:48:01] blackgoat: has joined #ruby
[03:48:10] adgtl: has joined #ruby
[03:49:50] askhat: has joined #ruby
[03:55:39] ledestin: has joined #ruby
[03:57:11] chipotle_: has joined #ruby
[03:57:32] houhoulis: has joined #ruby
[03:58:45] pawnbox: has joined #ruby
[03:59:08] jackjackdripper: has joined #ruby
[04:00:02] blackmesa: has joined #ruby
[04:02:20] KensoDev: has joined #ruby
[04:04:18] nemesit|znc: has joined #ruby
[04:05:05] dopamean_: has joined #ruby
[04:05:48] roshanavand: has joined #ruby
[04:06:30] krzkrz: has joined #ruby
[04:07:10] TinkerTyper: has joined #ruby
[04:10:48] hahuang61: has joined #ruby
[04:11:49] zast: has joined #ruby
[04:12:33] dudedudeman: has joined #ruby
[04:13:03] pawnbox: has joined #ruby
[04:13:09] braincrash: has joined #ruby
[04:18:15] CrazyEddy: has joined #ruby
[04:18:18] LoneHerm_: has joined #ruby
[04:32:40] stardiviner: has joined #ruby
[04:33:05] frog0909: has joined #ruby
[04:33:30] duderonomy: has joined #ruby
[04:38:03] gix: has joined #ruby
[04:42:10] braincra-: has joined #ruby
[04:42:38] kirillzh: has joined #ruby
[04:45:42] bb010g: has joined #ruby
[04:45:54] chouhoulis: has joined #ruby
[04:49:11] moeabdol1: has joined #ruby
[04:53:31] baweaver: has joined #ruby
[04:53:32] moeabdol: has joined #ruby
[04:55:49] IrishGringo: has joined #ruby
[04:56:39] adgtl: has joined #ruby
[04:57:14] adgtl: has joined #ruby
[04:59:48] houhoulis: has joined #ruby
[05:01:25] blackmesa: has joined #ruby
[05:06:58] pawnbox: has joined #ruby
[05:07:15] betafive_: has joined #ruby
[05:07:15] betafive_: has joined #ruby
[05:21:03] nullFxn: has joined #ruby
[05:26:17] adgtl_: has joined #ruby
[05:27:04] betafive: has joined #ruby
[05:28:37] tildes: has joined #ruby
[05:29:40] djbkd: has joined #ruby
[05:29:50] ensyde_: has joined #ruby
[05:34:14] moeabdol1: has joined #ruby
[05:34:26] houhoulis: has joined #ruby
[05:34:37] kingrs02: has joined #ruby
[05:34:44] krzkrz: has joined #ruby
[05:35:22] moeabdol2: has joined #ruby
[05:39:14] SOLDIERz: has joined #ruby
[05:40:38] roshanavand: has joined #ruby
[05:41:30] terminalrecluse: has joined #ruby
[05:42:36] floatingpoint: has joined #ruby
[05:43:59] ur5us: has joined #ruby
[05:46:40] chouhoulis: has joined #ruby
[05:49:38] idefine: has joined #ruby
[05:50:19] lele: has joined #ruby
[05:58:31] processid: has joined #ruby
[05:58:31] wolffles: can i use <=> to add an extra outcome to a ternary expression?
[05:58:48] wolffles: if so do i just add another : outcome
[05:59:09] j416: why would you want do do thi
[05:59:11] lurch_: has joined #ruby
[05:59:33] j416: just use a regular if or a switch if it's complicated
[06:00:17] wolffles: im trying to do this but theres a third outcome
[06:00:30] wolffles: https://eval.in/516052
[06:00:41] wolffles: if the ary is nil it messes up
[06:03:00] j416: wolffles: what is the result you want?
[06:03:06] Ox0dea: wolffles: This is what your code made me think of: https://youtu.be/Hi4z0S8jfbU?t=15
[06:03:55] Ox0dea: Really, though, what's going on in there?
[06:04:10] wolffles: basicly its a ternary expression but i found that if the array is nil it causes an error
[06:04:24] blackmesa: has joined #ruby
[06:04:25] wolffles: i just wanna make it so a nill class would just equal 0
[06:04:31] Ox0dea: Naming the parameters of a #sort block `k` and `v` does not bode well.
[06:04:52] j416: wolffles: a nil class?
[06:05:02] wolffles: thats what the error says
[06:05:22] wolffles: undefined method `<=' for nil:NilClass
[06:05:32] Ox0dea: What is this code supposed to do...?
[06:06:12] j416: 07:03:00 j416 | wolffles: what is the result you want?
[06:06:12] wolffles: i dont think that really matters lol but truth is im to embarassed of my messy code
[06:06:22] j416: it matters if you want any help
[06:06:46] Ox0dea: Seems like you're just "trying random shit", which is hardly conducive to learning. :/
[06:06:50] wolffles: i want when the array == nil the outcome = 0
[06:06:57] wolffles: its not random
[06:07:04] Ox0dea: But you can't explain its purpose?
[06:07:09] processid: I feel bad for laughing at that
[06:07:16] Ox0dea: processid: You ought to. :P
[06:08:06] wolffles: its just one of those programing problems
[06:08:08] dudedudeman: has joined #ruby
[06:08:12] Ox0dea: Which one?
[06:08:32] j416: wolffles: https://eval.in/516063
[06:08:53] j416: wolffles: you're going to have to be more precise than that to get a proper answer
[06:08:56] rsc___: has joined #ruby
[06:08:59] j416: wolffles: sounds like an xy problem
[06:10:18] wolffles: pretty the code does what i want already, however when the array is nil it causes an error
[06:10:30] speakingcode: has joined #ruby
[06:10:32] wolffles: ill jsut do what you did tho
[06:11:22] j416: I don't even know what you want
[06:11:27] Ox0dea: Nobody does.
[06:11:57] j416: wolffles: for all I know, this could be the right solution https://eval.in/516064
[06:12:05] j416: voil??, never nil so don't even have to check
[06:12:29] wolffles: ill just post the problem
[06:13:14] wolffles: https://eval.in/516067
[06:13:45] wolffles: im just messing around with different solutions
[06:16:55] j416: wolffles: the first problem with your solution is that you sort the array
[06:17:59] wolffles: it was one of the first methods that came to mind
[06:18:13] krzkrz: has joined #ruby
[06:18:14] wolffles: but please teach :3
[06:18:27] j416: wolffles: read the problem description
[06:19:06] j416: it talks about indices, never values
[06:19:31] wolffles: i simplified the code so it doesnt confuse
[06:19:51] wolffles: my code works except for that one error
[06:19:55] Macaveli: has joined #ruby
[06:20:10] j416: wolffles: how are you so certain?
[06:20:20] wolffles: cuz i ran the test
[06:20:38] adgtl: has joined #ruby
[06:20:41] arlek: has joined #ruby
[06:20:48] wolffles: https://eval.in/516085
[06:21:01] Ox0dea: Heavens to Murgatroyd!
[06:21:10] wolffles: see i simplified it
[06:21:12] Ox0dea: That's insane! :(
[06:21:25] wolffles: im not good at your wizardry Ox0dea
[06:21:33] Ox0dea: It's not wizardry.
[06:21:40] wolffles: it is to me :[
[06:21:54] Ox0dea: Here's the spellbook I use: http://ruby-doc.org/core-2.3.0/Enumerable.html
[06:21:54] wolffles: you cant literally see my thought process in my code
[06:21:55] Macaveli: has joined #ruby
[06:22:02] j416: wolffles: fixed your nil problem https://eval.in/516088
[06:22:10] j416: wolffles: now you have another problem.
[06:23:15] mdw: has joined #ruby
[06:25:38] Ox0dea: wolffles: I used #each_index, #select, and #min_by.
[06:27:45] wolffles: hey thanks j416
[06:27:51] j416: welcome.
[06:27:52] wolffles: that fixed it :D
[06:28:01] wolffles: and Ox0dea ill give that a try
[06:28:51] aganov: has joined #ruby
[06:30:42] Ox0dea: wolffles: Do keep me apprised of how that goes. :)
[06:30:57] wolffles: ill let you know tomorrow
[06:31:07] wolffles: my head hurts from looking at my code
[06:31:30] Ox0dea: In that case, I'll just give you something to sleep on: https://eval.in/516099
[06:31:41] Ox0dea: Isn't it ~purdy~?
[06:31:56] wolffles: i cry every time you do that
[06:32:06] Ox0dea: Tears of joy, I should hope. :)
[06:32:15] j416: ffs https://eval.in/516100
[06:32:26] ur5us: has joined #ruby
[06:32:26] wolffles: more like saddness from all the insanity
[06:32:34] Ox0dea: j416: Ha!
[06:33:16] Ox0dea: wolffles: The insanity is supposed to hurt and make you retack. :/
[06:33:53] wolffles: its getting more compact every day
[06:34:03] Ox0dea: Size doesn't matter.
[06:34:08] Ox0dea: It's about clarity.
[06:35:07] andrew: has joined #ruby
[06:35:07] wolffles: and i didnt know its possible to new line and method like that
[06:35:18] Macaveli: has joined #ruby
[06:35:38] Ox0dea: I posted it to eval.in instead of the channel specifically to show you that. <3
[06:35:38] j416: that's beside the point
[06:36:03] Ox0dea: But yeah, it's so obviously correct that it would've been A-okay as a one-liner.
[06:36:06] j416: but I suppose clearest in this case
[06:36:26] djcp: has joined #ruby
[06:37:00] Ox0dea: Granted, it's not the most computationally efficient approach, but this is Ruby. ^_^
[06:39:00] jdelaney: has joined #ruby
[06:39:11] j416: "computationally efficient" and "Ruby" in the same sentence ^ lol.
[06:39:35] Ox0dea: "Ruby is, in the general case, not computationally efficient."
[06:39:48] j416: he did it again
[06:39:49] p1k: has joined #ruby
[06:44:10] nodejunkie: has joined #ruby
[06:44:52] Grays0n: has joined #ruby
[06:46:14] terminalrecluse: has joined #ruby
[06:47:14] kam270: has joined #ruby
[06:47:27] chouhoulis: has joined #ruby
[06:47:35] lxsameer: has joined #ruby
[06:48:26] solars: has joined #ruby
[06:50:36] symm-: has joined #ruby
[06:50:55] LoneHerm_: has joined #ruby
[06:55:08] aufi: has joined #ruby
[06:55:45] karapetyan: has joined #ruby
[06:56:46] Ox0dea: wolffles: Can you say why my and j416's solutions suck, computationally speaking?
[06:56:58] mondok: has joined #ruby
[06:57:29] intrigueD: has joined #ruby
[06:57:35] j416: fwiw I didn't give a solution
[06:57:51] Ox0dea: I misinterpreted your "ffs", then.
[06:57:56] j416: I just fixed yours by adding friggin parentheses to your method :P
[06:58:00] j416: sorry for the misunderstanding
[06:58:15] j416: would have been hilarious if we had the exact same solution though
[06:58:23] Ox0dea: That's... what I thought had happened.
[06:58:24] j416: with the exact same syntax
[06:58:31] Ox0dea: I don't even.
[06:59:47] j416: Ox0dea: what country are you from?
[06:59:49] j416: if I may ask
[07:00:47] JDiPierro: has joined #ruby
[07:01:29] Ox0dea: One of the sovereign ones.
[07:02:22] elifoster: has joined #ruby
[07:02:46] RickHull: there is no sovereignty on the internet (crosses fingers)
[07:03:11] j416: Ox0dea: I see.
[07:03:18] moeabdol: has joined #ruby
[07:03:58] andrewh: has joined #ruby
[07:04:52] Ox0dea: wolffles: The algorithm hardly matters for such tiny inputs, but considering what happens with "pathological" inputs can make these little programming challenges much more worthwhile.
[07:05:26] Ox0dea: What if the input array had, like, a million elements, and the nearest larger was one to the left of the input index?
[07:05:47] blackmesa: has joined #ruby
[07:06:00] Ox0dea: My pretty solution would run #select over the entire array to pare down the candidate pool, but that's retarded.
[07:06:45] wolffles: what would you do about it ?
[07:06:52] Ox0dea: I'd fix it. :)
[07:07:03] mhoungbo: has joined #ruby
[07:07:31] wolffles: like use different methods?
[07:07:57] Ox0dea: How would you do it as a human if, say, the array were a corridor and you were looking for the door behind which the nearest larger number was hidden?
[07:08:31] Ox0dea: Spoiler alert: call a friend. :)
[07:08:40] RickHull: i'd start looking for rope
[07:09:54] Ox0dea: wolffles: Picture it: you and a friend both start at door `i`. One of you goes to the left and the other to the right, and each of you calls out "found it!" when you hit a door that has a larger number than the one behind the starting door.
[07:10:26] roshanavand: has joined #ruby
[07:11:20] Ox0dea: You'd both want to count how many steps it took you to get there, of course.
[07:11:45] wolffles: why stop there
[07:11:59] wolffles: why not divide the work load each of you call 2 more friends
[07:12:03] SirCmpwn: has joined #ruby
[07:12:15] Ox0dea: Why would that be an optimization?
[07:12:20] pawnbox: has joined #ruby
[07:12:27] wolffles: time wise its faster
[07:12:33] Ox0dea: Not inherently.
[07:13:00] Ox0dea: It'd be faster if you knew exactly what you were looking for.
[07:13:05] intrigueD: has joined #ruby
[07:13:37] Ox0dea: In this case, what's behind each door is essentially a complete mystery.
[07:14:06] Ox0dea: Imagine you called over fifteen friends and everybody got to searching, only for you to find it two doors to the left of your starting position.
[07:14:16] Ox0dea: They'd all be like, "Well, this was a fuckin' waste o' time, eh?"
[07:14:35] scepticulous: has joined #ruby
[07:14:44] RickHull: you could ramp up the friend pool
[07:14:55] wolffles: but thats just one example
[07:15:03] wolffles: imagine having to do it multiple times
[07:15:13] Infra-Red: has joined #ruby
[07:15:29] Ox0dea: wolffles: Assume the corridor is infinite; where do you position everybody at the start?
[07:15:55] RickHull: infinite / N positions away from each other
[07:16:11] wolffles: not that easy tho
[07:16:16] Infra-Red: has joined #ruby
[07:16:45] Spami: has joined #ruby
[07:17:09] p1k: is there a ruby equivalent to python's threading.event() ?
[07:17:29] Ox0dea: >> Float::INFINITY / 7.4e9 # wolffles
[07:17:31] ruby[bot]: Ox0dea: # => Infinity (https://eval.in/516132)
[07:17:45] Ox0dea: You could have all the friends in the world and it wouldn't make distributing them any "easier".
[07:18:33] pawnbox: has joined #ruby
[07:19:57] Ox0dea: &ri ConditionVariable @p1k
[07:19:57] `derpy: p1k: http://ruby-doc.org/core-2.3.0/ConditionVariable.html
[07:21:43] gaspaio: has joined #ruby
[07:21:47] p1k: thanks, is there a non-locking example?
[07:22:16] Tempesta: has joined #ruby
[07:23:06] Ox0dea: Oh, right.
[07:23:11] p1k: I'm looking to do something like t= Thread.new {#intialize, #more stuff}; and in the main thread wait(t.initialized)
[07:23:21] Ox0dea: Just #join that Thread?
[07:24:15] p1k: that's totally different
[07:24:23] j416: p1k: so did you figure out your merge problem?
[07:25:22] p1k: j416: I can't remember now sorry -_- I hope i did
[07:25:30] blackgoat: has joined #ruby
[07:25:34] j416: p1k: you asked in #git and I answered, then you disappeared
[07:25:52] p1k: j416: Oh i just cherry-picked, it was quite strange
[07:26:13] j416: that works, yes
[07:26:26] p1k: j416: normally when you rebase and sha's change git considers them different commits (e.g. this is how you often end up with duplicates) but in this case for some reason it still considered them to be shared
[07:26:28] j416: effectively a manual force-rebase.
[07:27:11] j416: normally when you rebase commits with identical content as something that already exists, it will discard them.
[07:27:25] j416: anyway, this is offtopic for the channel.
[07:29:49] p1k: so yeah is there a non locking resource I can use ?
[07:30:48] pawnbox: has joined #ruby
[07:31:14] SirCmpwn: has joined #ruby
[07:32:33] dionysus69: has joined #ruby
[07:34:46] djellemah: p1k: how is wait(something) not non-locking?
[07:35:55] p1k: djellemah: like python threading.event or pause/sigsuspend in glibc
[07:35:57] nfsnobody: has joined #ruby
[07:36:12] Ox0dea: threading.event() uses a condition variable...
[07:36:42] PedramT: has joined #ruby
[07:37:11] p1k: yeah but ConditionVariable requires a mutex from the docs?
[07:37:15] Abrin: has joined #ruby
[07:37:27] Ox0dea: As does threading.event().
[07:38:22] davedev24: has joined #ruby
[07:38:55] glowcoil: has joined #ruby
[07:38:58] p1k: that's not the same interface, e.g. it would be initialized = thread.Event(); Thread(#do stuff); initialized.wait()
[07:39:32] p1k: but I can't do resource = ConditionVariable.new(); Thread.new {#do stuff}; resource.wait() because there should be a locked mutex in the wait call? Or am i missing something
[07:39:41] firstdayonthejob: has joined #ruby
[07:40:58] pawnbox: has joined #ruby
[07:42:49] kirillzh: has joined #ruby
[07:45:01] codecop: has joined #ruby
[07:45:03] pawnbox: has joined #ruby
[07:46:12] djellemah: cv = ConditionVariable.new; Thread.new{sleep 3; cv.signal}; cv.wait(Mutex.new.lock)
[07:46:21] Ox0dea: p1k: I guess it's not exactly the same interface, but the premise remains: you lock around the Mutex, and #wait on the ConditionVariable from the main thread.
[07:46:40] djellemah: q = Queue.new; Thread.new{sleep 3; q.close}; q.pop # for 2.3 only
[07:46:54] djellemah: q = Queue.new; Thread.new{sleep 3; q << :done}; q.pop # for <2.3
[07:47:01] Ox0dea: djellemah: Probably s/signal/broadcast/.
[07:47:38] djellemah: Ox0dea: yip, broadcast would be more general.
[07:48:12] chouhoulis: has joined #ruby
[07:48:18] djellemah: You could also use a future/promise in blocking mode.
[07:48:21] sneaksby: has joined #ruby
[07:49:09] p1k: djellemah: won't it race though, since the child thread needs to take the mutex for the parent to wait - but the parent calls wait as soon as the child thread is started?
[07:49:39] jas02: has joined #ruby
[07:49:58] srenatus: has joined #ruby
[07:52:58] andrew: has joined #ruby
[07:52:59] djellemah: If the child thread signals before the main thread is waiting (which can happen, the parent never wakes up.
[07:53:15] djellemah: tsk , => ),
[07:54:32] PedramT: has joined #ruby
[07:57:33] roshanavand: has joined #ruby
[07:57:52] p1k: that definetly does not happen with python events, it doesn't' happen with c signals either if handled correctly
[07:59:47] LoneHerm_: has joined #ruby
[08:00:01] Ox0dea: p1k: https://glot.io/snippets/ebsbnynpei
[08:00:08] Ox0dea: That looks to be about what you're going for.
[08:00:20] arlek: has joined #ruby
[08:03:24] p1k: 0x0dea: thanks, yeah that's pretty much it
[08:05:27] duncannz: has joined #ruby
[08:07:11] blackmesa: has joined #ruby
[08:08:33] apeiros: there's no parent/child relation between threads
[08:08:48] RickHull: has left #ruby: ()
[08:11:03] bluOxigen: has joined #ruby
[08:12:04] p1k: apeiros: really? the process will exit if the main thread finishes executing though?
[08:12:15] apeiros: the main thread is special, yes.
[08:12:25] TomyWork: has joined #ruby
[08:12:39] mlehrer: has joined #ruby
[08:12:48] dmolina: has joined #ruby
[08:12:51] Ox0dea: apeiros: What's the best word for what's going on here? https://eval.in/516141
[08:12:53] apeiros: all signal handlers are also handled in the main thread.
[08:13:08] SCHAAP137: has joined #ruby
[08:13:08] nfsnobody: has joined #ruby
[08:13:27] einarj: has joined #ruby
[08:13:29] Ox0dea: Threads sure look like children to the scheduler.
[08:13:34] apeiros: Ox0dea: depends which aspect. not sure I have a single word. "one thread waits for 10 other threads"
[08:13:55] kirillzh: has joined #ruby
[08:13:59] Ox0dea: Are you sure there's no hierarchical component to that relationship?
[08:14:02] apeiros: Ox0dea: try to spawn another thread from a thread and tell me whether it'll be hierarchic or still all under main
[08:14:24] Ox0dea: Well, fair enough. It's all a matter of perspective, really. :P
[08:14:38] apeiros: no pstree on osx, as it seems. I wonder which tool it'd be there
[08:15:17] kirillzh: has joined #ruby
[08:15:41] apeiros: Ox0dea: threads currently are all backed by os-level threads, and sure, if os level threads do have a parent/child relationship, then it'll be reflected as such by the os. but on ruby's level, there's no such thing.
[08:16:02] Ox0dea: "depends which aspect" == "Who's askin'?"
[08:16:38] apeiros: p1k: main thread is also special in that it's the only thread which is copied to forks
[08:17:03] apeiros: ACTION wonders whether there have been other special aspects about main thread
[08:18:07] PedramT: has joined #ruby
[08:18:30] sepp2k: has joined #ruby
[08:19:25] pawnbox: has joined #ruby
[08:19:45] Xeago: has joined #ruby
[08:20:52] krzkrz: has joined #ruby
[08:21:29] Ox0dea: Mornin', adaedra.
[08:21:41] yfeldblum: has joined #ruby
[08:21:54] Ishido: has joined #ruby
[08:22:07] adaedra: Ox0dea: Are you always here?
[08:22:36] Ox0dea: adaedra: I'll check the logs.
[08:22:52] adaedra: apeiros: moin, wie geht's?
[08:23:03] apeiros: tr??s bien, et toi?
[08:23:17] apeiros: oh damn, it's tr??s, isn't it?
[08:23:28] adaedra: and a space before the ?
[08:23:42] apeiros: that one requires a sequence, ?? I can type directly :(
[08:23:47] adaedra: otherwise, it's good :)
[08:23:58] apeiros: adaedra: quarter-space actually (at least if you want to be typographically correct)
[08:24:25] apeiros: and I have no idea how to generate a qs, short of searching it in the symbols table
[08:24:26] dcunit3d: has joined #ruby
[08:24:44] pawnbox: has joined #ruby
[08:25:00] adaedra: we usually just use a non-breakable space.
[08:25:12] apeiros: that one I'd know how to generate
[08:25:15] apeiros: opt-space :)
[08:25:27] apeiros: oh. can't type that here as that switches channels :<
[08:26:58] solars: has joined #ruby
[08:28:00] Gnut: has joined #ruby
[08:28:12] bluOxigen_: has joined #ruby
[08:31:02] lewis1711: has joined #ruby
[08:31:51] lewis1711: if I do "m = [].map", m is the type enumerator. how do I call m with a block?
[08:32:02] SOLDIERz: has joined #ruby
[08:32:04] Xeago: has joined #ruby
[08:32:11] shredding: has joined #ruby
[08:38:07] roshanav_: has joined #ruby
[08:39:04] Ox0dea: lewis1711: That you acquired the Enumerator by way of #map is lost to you at that point.
[08:39:27] Zai00: has joined #ruby
[08:40:41] lewis1711: Ox0dea, but the docs give the example of .map.with_index
[08:41:03] Ox0dea: lewis1711: Sure, and Enumerator#with_index makes plenty of sense.
[08:42:02] lewis1711: then what the hell is the point of map being essentially "to_enum"
[08:42:14] huyderman: has joined #ruby
[08:42:29] Ox0dea: lewis1711: You're generally supposed to call #map with a block.
[08:43:35] Ox0dea: Er, wait, I think I see how you mean, but MRI uses under-the-hood magic to remember which method gave birth to a given Enumerator.
[08:43:38] lewis1711: but if there's no block, it's just 'to_enum'. i don't really understood
[08:43:45] Ox0dea: It's `enum_for(:map)`.
[08:44:53] blaxter: has joined #ruby
[08:45:03] Ox0dea: lewis1711: https://github.com/ruby/ruby/blob/trunk/include/ruby/intern.h#L238
[08:45:19] Ox0dea: rb_frame_this_func() is the magic to which I referred.
[08:46:44] Ox0dea: I'm sure there's a way to get at it from Ruby, but you're not meant to.
[08:48:07] colli5ion: has joined #ruby
[08:48:22] hs366: has joined #ruby
[08:49:05] chouhoulis: has joined #ruby
[08:49:26] Jassidae: has joined #ruby
[08:51:18] pawnbox: has joined #ruby
[08:52:55] lipoqil: has joined #ruby
[08:52:56] Kryptonical: has joined #ruby
[08:54:15] snowy: has joined #ruby
[08:54:23] mdw: has joined #ruby
[08:54:51] PedramT: has joined #ruby
[08:55:42] robbyoconnor: has joined #ruby
[08:58:25] p1k: btw regarding the conditionvariables
[08:59:11] p1k: is cv.wait unless initialized even safe? Could it evaluate the condition then be suspended by the other thread and receive the signal before wait is called (but after the unless has been evaluated) ?
[08:59:32] adgtl: has joined #ruby
[08:59:58] p1k: oh I see, that's why it's mutex wrapped in your example, nvm
[09:01:07] mark4: has joined #ruby
[09:03:18] mikecmpbll: has joined #ruby
[09:03:19] Kryptonical: has joined #ruby
[09:03:46] floror: has joined #ruby
[09:04:40] acosonic: has joined #ruby
[09:04:57] acosonic: Hi all, is it possible to install rvm and ruby without sudo?
[09:06:29] roshanavand: has joined #ruby
[09:07:37] rodfersou: has joined #ruby
[09:08:03] joonty: has joined #ruby
[09:08:16] adaedra: Maybe, I don't remember
[09:08:23] blaxter: has joined #ruby
[09:08:31] benlieb: has joined #ruby
[09:08:33] adaedra: I know for sure that it's possible for chruby and ruby-install tho ;)
[09:08:34] blackmesa: has joined #ruby
[09:10:05] acosonic: because when I was trying sometimes, I was asked for root pwd...
[09:11:02] Bloomer: has joined #ruby
[09:11:09] momo-reina: has joined #ruby
[09:12:00] DoubleMalt: has joined #ruby
[09:12:27] valera: has joined #ruby
[09:14:46] ocbtec: has joined #ruby
[09:15:07] betafive: has joined #ruby
[09:16:29] devbug: has joined #ruby
[09:20:57] jottr: has joined #ruby
[09:21:04] Kedare: has joined #ruby
[09:21:11] william3: has joined #ruby
[09:25:19] floror: has joined #ruby
[09:25:44] skweek: has joined #ruby
[09:27:38] pihpah: has joined #ruby
[09:28:13] PedramT: has joined #ruby
[09:28:20] lsmola: has joined #ruby
[09:28:51] blackmesa: has joined #ruby
[09:30:47] dmolina: has joined #ruby
[09:32:14] nonexistent: has joined #ruby
[09:32:49] pandaant: has joined #ruby
[09:38:39] anisha: has joined #ruby
[09:38:42] tvw: has joined #ruby
[09:39:28] jokke: has joined #ruby
[09:41:19] karapetyan: has joined #ruby
[09:43:31] andrewh: has joined #ruby
[09:44:01] einarj_: has joined #ruby
[09:44:02] andrewjf: has joined #ruby
[09:45:17] karapetyan: has joined #ruby
[09:46:42] phatypus: has joined #ruby
[09:47:23] yfeldblum: has joined #ruby
[09:48:08] LoneHermit: has joined #ruby
[09:48:08] pawnbox: has joined #ruby
[09:48:12] FooMunki: has joined #ruby
[09:49:10] karapetyan: has joined #ruby
[09:49:51] chouhoulis: has joined #ruby
[09:50:48] einarj: has joined #ruby
[09:52:56] bruce__lee: has joined #ruby
[09:53:50] urtokk: has joined #ruby
[09:54:40] sanjakbeg: has joined #ruby
[09:56:12] sergey_makagon: has joined #ruby
[09:56:25] PedramT: has joined #ruby
[09:57:52] theRealAlexz: has joined #ruby
[09:58:30] ikonia: has joined #ruby
[09:59:14] pawnbox: has joined #ruby
[10:01:32] trinaldi: has joined #ruby
[10:02:38] PedramT: has joined #ruby
[10:04:11] pawnbox: has joined #ruby
[10:04:24] rdark: has joined #ruby
[10:04:34] einarj_: has joined #ruby
[10:06:04] f4cl3y: has joined #ruby
[10:06:38] karapetyan: has joined #ruby
[10:08:25] einarj: has joined #ruby
[10:09:12] marr: has joined #ruby
[10:10:46] platzhirsch: has joined #ruby
[10:10:49] grippotoxin: has joined #ruby
[10:12:33] einarj_: has joined #ruby
[10:15:41] platzhirsch: has left #ruby: ()
[10:20:21] tvw: has joined #ruby
[10:20:32] karapetyan: has joined #ruby
[10:21:13] krzkrzkrz: has joined #ruby
[10:21:16] coffeejunk: has joined #ruby
[10:23:26] ferr: has joined #ruby
[10:24:11] karapetyan: has joined #ruby
[10:25:29] Skelz0r: has joined #ruby
[10:25:38] Xeago: has joined #ruby
[10:27:38] dlitvak: has joined #ruby
[10:28:03] dajobat: has joined #ruby
[10:30:11] tlarevo: has joined #ruby
[10:30:15] djellemah: >> require 'objspace'; require 'thread'; [ObjectSpace.memsize_of(Queue.new), ObjectSpace.memsize_of(Mutex.new) + ObjectSpace.memsize_of(ConditionVariable.new)]
[10:30:16] ruby[bot]: djellemah: # => [20, 132] (https://eval.in/516274)
[10:30:30] djellemah: Well, that's not intuitive.
[10:31:29] kerunaru: has joined #ruby
[10:32:51] evidex: has joined #ruby
[10:32:53] antgel: has joined #ruby
[10:35:28] hamed_r: has joined #ruby
[10:35:41] dajobat: Morning everyone.
[10:36:54] djellemah: >> require 'benchmark'; [Benchmark.measure{100000.times{Queue.new}}.real, Benchmark.measure{100000.times{Mutex.new;ConditionVariable.new}}.real]
[10:37:01] ruby[bot]: djellemah: # => [0.07262146472930908, 0.15252958238124847] (https://eval.in/516276)
[10:37:02] djellemah: Neither is that.
[10:38:30] roshanavand: has joined #ruby
[10:40:29] chthon: has joined #ruby
[10:41:52] einarj: has joined #ruby
[10:42:48] phyllogenetic: has joined #ruby
[10:42:51] JohnBat26: has joined #ruby
[10:45:19] kerunaru: has joined #ruby
[10:46:40] ldnunes: has joined #ruby
[10:49:20] LoneHerm_: has joined #ruby
[10:50:28] chouhoulis: has joined #ruby
[10:51:46] djellemah: >> [RUBY_VERSION,Thread.new]
[10:51:47] ruby[bot]: djellemah: # => must be called with a block (ThreadError) ...check link for more (https://eval.in/516309)
[10:51:52] djellemah: >> [RUBY_VERSION,Thread.new{}]
[10:51:52] acosonic: has left #ruby: ()
[10:51:53] ruby[bot]: djellemah: # => (https://eval.in/516310)
[10:52:50] nettoweb: has joined #ruby
[10:53:06] adaedra: ?experiment
[10:53:06] ruby[bot]: Please use your local irb or pry (see ?pry) to experiment, ruboto's eval functionality is for demonstration purposes only.
[10:53:15] Ox0dea: djellemah: Since forever ago.
[10:53:23] slackbotgz: has joined #ruby
[10:53:48] einarj_: has joined #ruby
[10:53:59] djellemah: Yeah, I thought maybe it had been upgraded. Pity.
[10:54:04] djellemah: q = Queue.new; Thread.new{q << :one; q.close}; ts = 12.times.map{|i| Thread.new{[q.pop, i]}}; ts.map{|t| t.value}
[10:54:08] Ox0dea: 20>> [Thread, Queue, Mutex, ConditionVariable]
[10:54:09] ruby[bot]: Ox0dea: # => [Thread, Queue, Mutex, ConditionVariable] (https://eval.in/516314)
[10:54:43] djellemah: adaedra: !experiment ;-)
[10:55:25] Ox0dea: I was showing you that you haven't had to require 'thread' for those since 2.0.
[10:55:54] djellemah: Ox0dea: Oh, OK. But Thread.new{} fails anyway.
[10:56:03] Ox0dea: eval.in doesn't let you fork.
[10:57:14] schaary: I want to install the gem pygments. When I search for it, it's found on rubygems. But when I want to install it, I get the error message, it can't be found :(
[10:57:18] bweston92: has joined #ruby
[10:57:34] Ox0dea: > This gem has been yanked, and it is not available for download directly or for other gems that may have depended on it.
[10:57:44] einarj: has joined #ruby
[10:57:49] Ox0dea: schaary: It's pygments.rb now.
[10:58:26] schaary: https://gist.github.com/schaary/998bbd12fecaa41bb31a
[10:58:30] DoubleMalt: has joined #ruby
[10:58:43] snowy: has joined #ruby
[10:58:47] schaary: Ox0dea: thank you very much!!!
[10:58:48] Azulinho: has joined #ruby
[10:58:53] Ox0dea: schaary: Happy to help. :)
[11:00:42] pawnbox: has joined #ruby
[11:01:34] vdamewood: has joined #ruby
[11:01:47] william3: has joined #ruby
[11:02:54] djellemah: My point being that Queue is (counterintuitively) smaller and faster than Mutex + ConditionVariable. With the added bonus of being easier to think about.
[11:03:22] pawnbox: has joined #ruby
[11:05:35] roshanavand: has joined #ruby
[11:06:17] yorickpeterse: The ConditionVariable API is absolutely terrible
[11:06:26] yorickpeterse: It's _really_ confusing to use
[11:08:09] djellemah: yorickpeterse: as I ably demonstrated a little while ago ... :-|
[11:08:47] ReK2: has joined #ruby
[11:10:30] PedramT_: has joined #ruby
[11:11:16] dlitvak: has joined #ruby
[11:14:17] einarj_: has joined #ruby
[11:15:13] Ropeney: has joined #ruby
[11:18:45] wethu: has joined #ruby
[11:19:08] dlitvak: has joined #ruby
[11:20:24] roshanavand: has joined #ruby
[11:23:17] baweaver: has joined #ruby
[11:23:24] einarj: has joined #ruby
[11:24:09] lsmola: has joined #ruby
[11:26:50] aryaching: has joined #ruby
[11:27:28] einarj_: has joined #ruby
[11:30:55] ohcibi_: has joined #ruby
[11:31:37] UtkarshRay: has joined #ruby
[11:32:07] Ropeney: has joined #ruby
[11:33:52] freerobby: has joined #ruby
[11:37:18] dlitvak: has joined #ruby
[11:39:00] sergey_makagon: has joined #ruby
[11:40:22] Shaboum: has joined #ruby
[11:41:11] eGGsha: has joined #ruby
[11:41:16] karapetyan: has joined #ruby
[11:43:05] einarj: has joined #ruby
[11:45:06] Grays0n: has joined #ruby
[11:45:52] karapetyan: has joined #ruby
[11:46:20] howdoi: has joined #ruby
[11:50:52] PedramT: has joined #ruby
[11:51:16] chouhoulis: has joined #ruby
[11:51:20] phyllogenetic: has joined #ruby
[11:51:43] Mon_Ouie: has joined #ruby
[11:52:16] ElFerna: has joined #ruby
[11:53:15] shredding: has joined #ruby
[11:56:03] lubekpl: has joined #ruby
[11:56:22] platzhirsch: has joined #ruby
[11:56:26] nekrodesk: has joined #ruby
[11:58:59] mauricio: has joined #ruby
[11:59:07] devbug: has joined #ruby
[11:59:43] Guest463: has joined #ruby
[12:01:21] krzkrzkrz: has joined #ruby
[12:02:25] atzorvas_: does anyone use sourcify gem?
[12:04:44] aldarsior: has joined #ruby
[12:04:45] ysz: has joined #ruby
[12:05:03] dajobat: Quick question: If I require inside a method, will that require leave scope after the method ends?
[12:10:14] djellemah: >> [defined?(DRb), (def meth; require 'drb'; end; meth; defined?(DRb))] # dajobat
[12:10:15] ruby[bot]: djellemah: # => [nil, "constant"] (https://eval.in/516382)
[12:10:33] djellemah: dajobat: I think that means no ;-)
[12:11:43] urbanmonk: has joined #ruby
[12:13:31] sentinelship: has joined #ruby
[12:13:34] dajobat: djellemah: Cheers. Probably should have just tried it myself!
[12:15:37] karapetyan: has joined #ruby
[12:15:52] the_drow: has joined #ruby
[12:16:38] PedramT: has joined #ruby
[12:18:23] djellemah: dajobat: Your question prompted me to wonder if def inside an array might actually work. TIL
[12:19:06] FooMunki: has joined #ruby
[12:23:17] lurch_: has joined #ruby
[12:25:02] sgambino: has joined #ruby
[12:26:01] william3_: has joined #ruby
[12:26:47] dlitvak: has joined #ruby
[12:26:54] sdothum: has joined #ruby
[12:27:24] adgtl: has joined #ruby
[12:28:35] william3: has joined #ruby
[12:32:11] sucks: has joined #ruby
[12:32:47] dlitvak: has joined #ruby
[12:34:04] chipotle: has joined #ruby
[12:35:08] stardiviner: has joined #ruby
[12:35:10] kknight: has joined #ruby
[12:36:55] snowy: has joined #ruby
[12:37:27] PedramT: has joined #ruby
[12:38:33] pawnbox: has joined #ruby
[12:39:48] johnmilton: has joined #ruby
[12:40:50] PedramT: has joined #ruby
[12:41:08] Ropeney: has joined #ruby
[12:42:01] shevy: ruby ruby ruby
[12:42:55] sucks: has joined #ruby
[12:43:46] ensyde__: has joined #ruby
[12:45:14] norc: has joined #ruby
[12:45:17] norc: ast>> []..each_slice(2)
[12:45:19] ruby[bot]: norc: I have parsed your code, the result is at https://eval.in/516391
[12:45:36] norc: >> []..each_slice(2)
[12:45:37] ruby[bot]: norc: # => undefined method `each_slice' for main:Object (NoMethodError) ...check link for more (https://eval.in/516393)
[12:45:46] norc: asm>> []..each_slice(2)
[12:45:48] ruby[bot]: norc: I have disassembled your code, the result is at https://eval.in/516395
[12:46:06] norc: Is this possibly a compiler bug?
[12:47:49] norc: asm>> 1..2
[12:47:50] ruby[bot]: norc: I have disassembled your code, the result is at https://eval.in/516397
[12:48:20] norc: Why would the compiler even try to putself here?
[12:48:28] norc: (In the previous asm code)
[12:49:26] norc: Ohh nevermind. It is clear to me now.
[12:49:36] norc: The ast shows this clearly.
[12:49:51] norc: i.e. this gets interpreted as []..(each_slice)
[12:52:06] chouhoulis: has joined #ruby
[12:55:47] kobain: has joined #ruby
[12:57:20] ss_much: has joined #ruby
[12:58:26] floror: has joined #ruby
[13:00:52] the_drow: has joined #ruby
[13:02:31] symbol: has joined #ruby
[13:05:57] tvw: has joined #ruby
[13:06:49] synthroid: has joined #ruby
[13:07:00] pdoherty: has joined #ruby
[13:07:36] mikecmpbll: has joined #ruby
[13:08:44] unsortable: has joined #ruby
[13:10:05] pawnbox: has joined #ruby
[13:10:15] bluOxigen: has joined #ruby
[13:11:26] berserk_ren: has joined #ruby
[13:12:00] einarj: has joined #ruby
[13:12:52] joonty: has joined #ruby
[13:13:38] blackmesa: has joined #ruby
[13:15:51] einarj_: has joined #ruby
[13:17:18] schickung: has joined #ruby
[13:19:44] theRealAlexz: has joined #ruby
[13:20:42] yardenbar: has joined #ruby
[13:23:52] emilkarl: has joined #ruby
[13:24:55] einarj: has joined #ruby
[13:25:53] baweaver: has joined #ruby
[13:26:58] Carella: has joined #ruby
[13:28:11] Ropeney: has joined #ruby
[13:28:19] pawnbox: has joined #ruby
[13:29:16] einarj__: has joined #ruby
[13:30:08] pawnbox: has joined #ruby
[13:30:09] JDiPierro: has joined #ruby
[13:30:14] adgtl: has joined #ruby
[13:31:49] freerobby: has joined #ruby
[13:32:22] flughafen: does capybara find_button include text even if it's a span(within the button), or only in the attributes of the button
[13:33:16] kichawa: has joined #ruby
[13:34:15] kichawa: what will be the better choice: standalone passenger with nginx and custom init_script for passenger per app
[13:34:49] kichawa: or compile nginx with passenger module and create custom init_script for custom nginx?
[13:35:47] scepticulous: has joined #ruby
[13:36:31] kichawa: yes, rails
[13:36:47] adaedra: Ask #RubyOnRails then, they're more knowledgable on this subject
[13:38:09] kichawa: i think all of you use passenger
[13:38:32] adaedra: not even all of us use rails.
[13:39:34] dlitvak: has joined #ruby
[13:41:01] jas02_: has joined #ruby
[13:41:23] PedramT: has joined #ruby
[13:42:05] Mia: has joined #ruby
[13:42:25] haylon: has joined #ruby
[13:42:28] scepticulous: has joined #ruby
[13:42:49] GinoManWorks: has joined #ruby
[13:47:04] PedramT: has joined #ruby
[13:47:18] bluOxigen_: has joined #ruby
[13:47:19] Xeago: has joined #ruby
[13:47:47] lubekpl: has joined #ruby
[13:48:14] jxs_: has joined #ruby
[13:49:04] bluOxigen: has joined #ruby
[13:51:47] emilkarl: I have a brain freeze... could anyone help me out with this one? I want an array of arrays to be a hash with first as key and second as value. http://pastie.org/10716417
[13:52:12] Xeago: has joined #ruby
[13:52:15] PedramT_: has joined #ruby
[13:52:36] adaedra: &ri Array#to_h
[13:52:36] `derpy: http://ruby-doc.org/core-2.3.0/Array.html#method-i-to_h
[13:52:43] adaedra: As simple as that.
[13:52:52] Ishido: has joined #ruby
[13:52:52] chouhoulis: has joined #ruby
[13:53:42] einarj: has joined #ruby
[13:54:02] soc42: has joined #ruby
[13:55:45] emilkarl: lol if that works :P
[13:56:18] M-shine: has joined #ruby
[13:57:09] DmitryBochkarev: has joined #ruby
[13:57:18] emilkarl: thanks adaedra
[13:58:59] CloCkWeRX: has joined #ruby
[13:59:40] unsortable: has joined #ruby
[14:00:05] Gestahlt: has joined #ruby
[14:00:24] kichawa: has left #ruby: ()
[14:00:49] Gestahlt: Is there a way to stream the current desktop into a object?
[14:01:33] adaedra: The current desktop?
[14:01:43] Gestahlt: Hmm maybe wrong explained..
[14:01:46] Gestahlt: Screengrabbing?
[14:02:25] Gestahlt: I know there are so many ways to do this
[14:02:32] Gestahlt: but i dont know how to do it in ruby
[14:02:34] lurch_: has joined #ruby
[14:02:48] ramortegui: has joined #ruby
[14:03:00] Gestahlt: I want to stream my desktop and record it.. or even manipulate it (for example drawing rectangles around icons and such)
[14:03:23] Gestahlt: I dont really know how to begin
[14:03:27] einarj: has joined #ruby
[14:04:00] idefine: has joined #ruby
[14:05:30] adaedra: It depends on your system, first, as all systems do it differently
[14:06:22] M-Kodo: has joined #ruby
[14:06:31] Xeago: has joined #ruby
[14:06:41] JDiPierro: has joined #ruby
[14:06:50] JDiPierro: has joined #ruby
[14:06:51] dlitvak: has joined #ruby
[14:06:55] Gestahlt: lets say i want to do it for X (linux) first
[14:07:10] Gestahlt: For Windows i might need other sources (VNC or RDP)
[14:07:20] Gestahlt: But right now, Linux is my target
[14:07:33] adaedra: VNC/RDP is something else already
[14:08:08] dmitch: has joined #ruby
[14:08:09] adaedra: This is something that's not so easy to do, and I'm not sure there's things in Ruby good for doing that
[14:08:16] Gestahlt: Since i also want to do it on a remote system later.. x can do it natively
[14:08:18] sgambino: has joined #ruby
[14:09:03] Gestahlt: What makes ruby bad for the task?
[14:09:31] adaedra: Lack of tooling
[14:10:01] adaedra: Slowness, too, for real-time processing
[14:10:31] Gestahlt: What would you recommend?
[14:10:38] Gestahlt: I like ruby as language
[14:10:49] Gestahlt: And i definatly want to stick to an interpreted language
[14:11:05] adaedra: You can look at working with existing tools
[14:11:11] djellemah: gestahlt: Maybe http://qt-apps.org/content/show.php/ScreenGrab?content=111648 You'd probably have to figure out the c/c++ sources. I think qt-bindings would not be much help. But those may be a good place to start beating your head ;-)
[14:12:26] djellemah: also, ImageMagick has ruby bindings. Not sure if they're still up to date.
[14:12:40] PedramT: has joined #ruby
[14:12:42] Gestahlt: Well.. as for existing tools, i would use ffmpeg / avconv to stream my desktop
[14:13:04] PedramT: has joined #ruby
[14:13:06] babblebre: has joined #ruby
[14:13:21] Gestahlt: and then maybe look at opencv or camelia for detection / manipulation
[14:13:26] atomical: has joined #ruby
[14:13:30] roshanavand: has joined #ruby
[14:13:41] Gestahlt: But it will never be "live" that way or close to it
[14:14:29] Gestahlt: There are quite a few java libs for that as well
[14:14:37] Gestahlt: python should also have everything
[14:14:42] Gestahlt: but i want to use ruby
[14:14:51] Gestahlt: Java i like to avoid because its bloated crap
[14:14:58] Gestahlt: and python.. meh i dont like it
[14:15:02] Gestahlt: Im not good with snakes
[14:15:03] roshanavand: has joined #ruby
[14:15:13] idefine: has joined #ruby
[14:15:13] Gestahlt: Im not sure about jruby tho
[14:15:20] Gestahlt: It has java
[14:15:22] Gestahlt: and that is bad
[14:15:49] roshanavand: has joined #ruby
[14:15:56] duckpuppy: has joined #ruby
[14:16:40] B1n4r10: has joined #ruby
[14:21:52] Gestahlt: The most stuff i find is based on selenium or even phantom.js... everything is so web-heavy.. its annoying
[14:21:52] einarj_: has joined #ruby
[14:22:49] ddv: gestahlt: jruby is awesome
[14:22:55] ddv: because it runs on the jvm
[14:22:58] ddv: the jvm is awesome
[14:23:30] haylon: Not sure about that logic
[14:23:34] haylon: but its definitely a method
[14:24:40] blackmesa: has joined #ruby
[14:24:53] dragon9783: has joined #ruby
[14:24:58] haylon: I like Jruby because it allows me to run my RubyGem web apps in a Tomcat container
[14:25:10] haylon: but I'd rather run in native MRI
[14:25:27] jottr: has joined #ruby
[14:25:48] M-mistake: has joined #ruby
[14:25:51] einarj: has joined #ruby
[14:25:51] Carella: has joined #ruby
[14:26:25] Gestahlt: I think jruby might be the way of least resistance
[14:26:28] djellemah: gestahlt: Seems like your options are: use java libs from jruby; or pick your c-libraries and learn to write ruby extensions.
[14:26:52] Gestahlt: jruby it is ;)
[14:27:53] mondok: has joined #ruby
[14:28:39] haylon: I think Java has more readily available video manipulation libraries. I haven't seen too many in C
[14:28:47] Trieste: has joined #ruby
[14:29:12] krobzaur_: has joined #ruby
[14:29:45] einarj_: has joined #ruby
[14:30:10] snowy: has joined #ruby
[14:30:18] TomPeed: has joined #ruby
[14:30:25] Xeago: has joined #ruby
[14:32:32] Joel: has joined #ruby
[14:32:51] Joel: with Thor is there a way to get it to print out ALL help? Like, options that are only available on subcommands?
[14:33:11] hs366: Hi, I have a question regarding Excon Gem (https://github.com/excon/excon): is it a RESTful Architecture ?
[14:33:58] haylon: Joel: I thought it was just commandname help subcommand
[14:34:20] ljarvis: hs366: excon is used to make HTTP requests, it has nothing to do with REST
[14:34:30] Joel: haylon, if you run a Thor program with no args it prints help
[14:34:52] Joel: haylon, it prints all class_option, but not all option
[14:34:54] haylon: Yup, but if you add the `help subcommand` then you can get the full details
[14:35:22] haylon: if you go through the whatisthor tutorial on their page, they show how to do that
[14:35:50] Joel: haylon, so I have a program with 8 commands, are you saying I should type out help + all 8 subcommands to generate a full list of options?
[14:35:56] hs366: ljarvis, can you please make it more clear?
[14:36:19] ljarvis: hs366: excon has nothing to do with REST.
[14:36:30] haylon: Joel, it would only do one subcommand, but you'd have to do it for each subcommand. I'm not sure if Thor has the ability to do ALL subcommands
[14:36:35] haylon: like a man page
[14:36:48] Joel: haylon, right, I'm after -all- options, think of generating a doc for a README.md
[14:36:56] Pumukel: has joined #ruby
[14:37:21] haylon: Ah, no, I haven't seen that ability added in Thor
[14:37:56] sankaber: has joined #ruby
[14:38:31] idefine: has joined #ruby
[14:38:32] hs366: ljarvis, I used Excon to call a method in other application API.
[14:38:56] hs366: so what can it be then ?
[14:41:55] the_drow: has joined #ruby
[14:42:46] einarj: has joined #ruby
[14:45:10] Timberwo|f: has joined #ruby
[14:45:24] aegis3121: has joined #ruby
[14:45:30] apeiros: hs366: please explain the term "RESTful".
[14:45:50] CloCkWeRX: has joined #ruby
[14:46:44] davedev24: has joined #ruby
[14:48:21] troulouliou_div2: has joined #ruby
[14:48:59] havenwood: ACTION consults the hallowed Thesis
[14:49:22] Frem: has joined #ruby
[14:51:02] floatingpoint: has joined #ruby
[14:51:02] crime: has joined #ruby
[14:51:07] CloCkWeRX: has joined #ruby
[14:51:11] hs366: apeiros, RESTful systems typically, but not always, communicate over Hypertext Transfer Protocol (HTTP) with the same HTTP verbs (GET, POST, PUT, DELETE, etc.)
[14:51:39] einarj_: has joined #ruby
[14:52:04] hs366: I think Excon use the same HTTP methods GET,...
[14:52:13] apeiros: so RESTful systems. is excon a system?
[14:52:21] davedev24: has joined #ruby
[14:52:23] hs366: i don't know
[14:52:34] havenwood: apeiros: I just meant Fielding's dissertation :P: https://www.ics.uci.edu/~fielding/pubs/dissertation/fielding_dissertation.pdf
[14:52:45] crime: Are there ways for non-novices to encourage other non-novices to stop shitting on novices when they ask questions? Are there any offensive strategies for that rather than just telling the victims to tough up and google more? I mean surely that represents a certain toxicity in the conversation when someone is TRYING to get better and someone else gives them a hard time for it.
[14:52:49] apeiros: interesting. no, it isn't a system. it's a library. you can *build a restful system* with it.
[14:52:53] sankaber: has joined #ruby
[14:53:07] Jardayn: has joined #ruby
[14:53:25] chouhoulis: has joined #ruby
[14:53:45] apeiros: i.e. as ljarvis already told you twice: no. it has just as much to do with rest as ruby has - nothing except that you can use it to build a restful system.
[14:53:54] dstarh: has joined #ruby
[14:54:00] hexhaxtron_: has joined #ruby
[14:54:23] Xat`: has joined #ruby
[14:54:33] Xat`: I guys, I am looking for some ruby help :)
[14:54:34] havenwood: hs366: In many senses Excon is RESTful, using HTTP with proper verbs and all. It's an academic argument.
[14:54:52] Xat`: I get this error ""NameError: uninitialized constant ActionView::Helpers::ActiveModelHelper" when building redmine
[14:55:14] havenwood: crime: Asking in regard to something that happened specifically or just in general?
[14:55:30] crime: havenwood: in general.
[14:55:49] crime: newbies dont need to hear 'google first' more than once, I think the problem should be attacked at it's source
[14:55:49] seitensei: has joined #ruby
[14:56:14] Xeago: has joined #ruby
[14:56:19] Xat`: I am using ruby 2.0.0p598 on CentOS 7.2
[14:56:39] PedramT: has joined #ruby
[14:56:57] davedev24: has joined #ruby
[14:57:30] crime: Its really not even a MINASWAN issue either, just common sense. Like you wouldnt trashtalk someone in the gym who is out-of-shape because they're actually there getting better so I don't understand the motive behind telling a user asking for socratic dialogue to improve themselves to 'rtfm and gtfo' and things like tha
[14:57:43] kappy: has joined #ruby
[14:58:00] davedev24: has joined #ruby
[14:58:04] crime: it just promotes isolation of new users, and therefore new code, new ideas, new everything
[14:58:04] hs366: I used Excon to pass/get respounce to/from Docker API
[14:58:08] djellemah: hs366: REST is a set of ideas on how to structure http apis. Some systems call themselves RESTful when they (mostly) adhere to those ideas. Excon is a tool that could be used to interact with such a system.
[14:59:32] djellemah: hs366: excon can also be used to interact with non-REST http apis
[15:00:07] hs366: ljarvis, apeiros havenwood djellemah Thanks a lot! know i think i get it !
[15:01:03] dmitch: has joined #ruby
[15:01:13] TinkerTyper: has joined #ruby
[15:01:48] crime: Xat`: have you installed actionview?
[15:02:32] hexhaxtron_: has left #ruby: ("Electric Guitar Wiki - http://e-guitar.co.uk")
[15:02:44] dionysus69: has joined #ruby
[15:04:01] whippythellama: has joined #ruby
[15:04:32] aldarsior: has joined #ruby
[15:04:46] PedramT: has joined #ruby
[15:04:48] dlitvak: has joined #ruby
[15:05:27] wprice: has joined #ruby
[15:06:01] havenwood: crime: The #ruby-community channel is a good place to talk about things we could do to make it more welcoming here. Or the ##new2ruby channel is friendly place as well.
[15:07:20] crime: havenwood: that's half the problem right there. I have read a LOT of #ruby, and I'm in here all the time and ##new2ruby is almost never mentioned, and new users come here first anyways to ask questions.
[15:07:25] codehotter: what are file descriptors 3,4,5 and 6 for used in ruby?
[15:07:27] crime: its practically rampant
[15:07:32] havenwood: Xat`: Eek, looks like you've found a bug. The #rubyonrails channel might be the best place to ask since ActionView is involved.
[15:11:32] chris2: crime: apparently two pipes created at setup_communication_pipe in thread_pthread.c:1399
[15:11:33] william3: has joined #ruby
[15:12:08] crime: chris2: p sure that was meant for someone else
[15:12:15] chris2: codehotter: ^
[15:12:24] chris2: too many c* nicks :)
[15:12:42] x77686d: has joined #ruby
[15:12:50] apeiros: crime: the best way aside of #ruby-community is to lead by example IMO
[15:13:06] apeiros: if you want change, be the change.
[15:13:39] codehotter: I have a ruby process stuck with two threads. One of the threads is waiting in poll() on FD 3 and 5, the other thread is stuck in a futex WAIT_PRIVATE
[15:13:46] codehotter: the process is completely deadlocked
[15:14:14] codehotter: I want to debug this, but not sure how.
[15:14:16] chris2: "communication pipe with timer thread and signal handler"
[15:14:40] chris2: do you have a minimal test case to reproduce?
[15:14:42] lxsameer: has joined #ruby
[15:14:59] hypermist: has left #ruby: ("Leaving")
[15:15:18] codehotter: no I do not. I recompiled ruby, and this happens during the test suite run
[15:15:32] codehotter: in a sense the test case might be the minimal test case to reproduce
[15:16:08] codehotter: the test is TestProcess#test_daemon_default, which spawns a child process, and the child process is the one that is deadlocked
[15:16:19] tjohnson: has joined #ruby
[15:16:30] chris2: and which os?
[15:16:52] codehotter: linux, centos 7
[15:17:19] codehotter: The prebuilt binary from my distribution is fine, it might be something wrong with my build process
[15:17:25] codehotter: but I would like to get to the bottom of this somehow.
[15:17:35] B1n4r10: has joined #ruby
[15:17:37] chris2: hm, how can i run that test standalone...
[15:17:43] TinkerTy_: has joined #ruby
[15:17:58] adgtl: has joined #ruby
[15:18:18] william3: has joined #ruby
[15:18:21] diegoviola: has joined #ruby
[15:19:20] sumark: has joined #ruby
[15:19:22] chris2: codehotter: so this would fail already? http://sprunge.us/bMUN
[15:20:07] msg31: has joined #ruby
[15:21:51] platzhirsch: has joined #ruby
[15:24:15] msg31: Is it possible to break out of a bundle environment? I have a build script being called via 'bundle exec build-script' however this build script needs to install gems in a different ruby environment, it appears I'm being restricted by bundle
[15:24:49] msg31: Here an example of the error I'm getting. http://fpaste.org/320767/
[15:25:09] Xat`: havenwood: thank you
[15:25:14] Xat`: crime: yes
[15:25:15] william3: has joined #ruby
[15:25:27] idefine: has joined #ruby
[15:25:48] mhoungbo: has joined #ruby
[15:26:08] dopamean_: has joined #ruby
[15:26:26] havenwood: msg31: It's saying: "git://github.com/puppetlabs/packaging.git (at master@73d5e50) is not yet checked out. Run `bundle install` first."
[15:27:24] momomomomo: has joined #ruby
[15:28:10] msg31: havenwood, I did a bundle install and it checked out packaging.git http://fpaste.org/320780/55118079/
[15:28:40] havenwood: 73d5e50, yup, checks out
[15:28:57] msg31: with that said '/opt/puppetlabs/puppet/lib/ruby/' is a brand new ruby install that was created in the buildscript
[15:29:02] centrx: has joined #ruby
[15:29:42] msg31: havenwood, if I run the 'gem install' command outside of the build script, everything is successful, which makes me think bundler is getting in the way
[15:30:05] floror: has joined #ruby
[15:30:37] msg31: packaging.git won't be checkedout in the /opt/puppetlabs/puppet/lib/ruby/ install. Nor do I want it to be.
[15:31:43] symbol: has joined #ruby
[15:31:55] pawnbox: has joined #ruby
[15:32:08] kf: has joined #ruby
[15:32:26] benhuda: has joined #ruby
[15:32:59] rbennacer: has joined #ruby
[15:33:50] rbennacer: has joined #ruby
[15:34:48] rbennacer: has joined #ruby
[15:35:13] mary5030: has joined #ruby
[15:35:25] symbole: has joined #ruby
[15:35:29] havenwood: msg31: Ah, so you're running a build command in the context of the bundle, and that command is installing a gem that then chokes on the bundle?
[15:36:02] msg31: havenwood, exactly
[15:36:03] sgambino: has joined #ruby
[15:36:21] mary5030: has joined #ruby
[15:36:33] codehotter: msg31: you could perhaps try to undo bundler's change to require?
[15:37:10] msg31: codehotter, how would I do that? I'm pretty green when it comes to ruby
[15:37:56] codehotter: msg31: me too!
[15:37:59] AlexRussia_: has joined #ruby
[15:38:07] codehotter: when I look at bundler's source code, it seems it has a method reverse_rubygems_kernel_mixin
[15:38:29] codehotter: msg31: perhaps you can just call Bundler::RubygemsIntegration#reverse_rubygems_kernel_mixin
[15:38:50] codehotter: msg31: take this with a big grain of salt, I don't know much about ruby and I don't even fully understand what you are trying to do
[15:38:55] codehotter: perhaps it's better if you wait for someone else eto comment
[15:39:09] william3: has joined #ruby
[15:39:11] jottr: has joined #ruby
[15:40:03] einarj: has joined #ruby
[15:40:06] william3: has joined #ruby
[15:40:19] idefine: has joined #ruby
[15:40:52] Vagnerlandio: has joined #ruby
[15:42:08] bigkevmcd: has joined #ruby
[15:42:35] colegatron: has joined #ruby
[15:42:59] bruce__lee: has joined #ruby
[15:43:46] malconis: has joined #ruby
[15:44:05] cdg: has joined #ruby
[15:45:08] jgt4: has joined #ruby
[15:46:21] BaxterSpotlight: has joined #ruby
[15:46:44] BaxterSpotlight: has left #ruby: ()
[15:48:12] idefine: has joined #ruby
[15:50:38] mostlybadfly: has joined #ruby
[15:51:27] TinkerTyper: has joined #ruby
[15:54:00] konsolebox: has joined #ruby
[15:54:30] ss_much: has joined #ruby
[15:55:06] idefine: has joined #ruby
[15:55:26] devbug: has joined #ruby
[15:56:08] codehotter: chris2: OK, I finally managed to figure out how to get ruby to start up outside of make (with RUBYLIB and LD_LIBRARY_PATH and so on)
[15:56:22] codehotter: chris2: I put what you pasted in a file and it works fine, it outputs "" and no deadlock
[15:56:42] codehotter: however the same test ran from make check reproducibly deadlocks
[15:56:49] adgtl: has joined #ruby
[15:56:51] codehotter: (if I wait for it to get to that particular test)
[15:56:53] chris2: then probably some earlier tests breaks something
[15:57:02] karmatr0n: has joined #ruby
[15:59:31] ljames: has joined #ruby
[15:59:52] codehotter: chris2: any chance I, with my limited gdb experience, can figure out WHAT the futex is waiting on?
[16:00:04] codehotter: the futex is to wait for another thread, right?
[16:00:22] TinkerTyper: has joined #ruby
[16:00:26] chris2: you can run in gdb with gdb --args ruby ...
[16:00:26] codehotter: but how do you get in the situation where the ruby-timer-thread is stuck in a poll() and the other thread is stuck in a futex?
[16:00:29] chris2: then start with run
[16:00:35] chris2: then press C-c on lockup
[16:00:39] chris2: and look at backtrace with bt
[16:00:48] chris2: then you should see which futex is used
[16:01:21] codehotter: it's in pthread_cond_wait
[16:01:25] codehotter: according to gdb
[16:01:30] chris2: and that is called from?
[16:01:31] codehotter: but the backtrace is all ??
[16:01:41] idefine: has joined #ruby
[16:01:49] zacts: has joined #ruby
[16:01:56] chris2: luckily, pthread_cond_wait is only used once in the code base ;)
[16:02:14] chris2: ... in native_cond_wait. sigh :D
[16:03:11] rbennacer: has joined #ruby
[16:03:41] codehotter: right, but eventually I'm going to backtrace right into ruby code, right?
[16:03:58] codehotter: I mean I can guess that the first frame on the stack is probably native_cond_wait
[16:04:18] chris2: the last time i did this stuff seriously was with ruby 1.8 :P
[16:04:21] Abrin: has joined #ruby
[16:04:27] chris2: there you could see the interpreter quite closely
[16:04:39] codehotter: can GDB show me ruby code?
[16:04:50] codehotter: why is this all question marks even though it was compiled with -g?
[16:04:56] chris2: there is a .gdbinit in the source tree
[16:05:30] chris2: perhaps rb_backtrace will work
[16:07:25] codehotter: no symbol rb_vm_t in current context
[16:07:34] codehotter: it also warns me it couldn't load symbols for 124 libraries
[16:08:36] codehotter: ok I did set solib-search-path and now it loaded the symbols
[16:08:40] Kryptonical: has joined #ruby
[16:08:54] codehotter: I didnt' even give an argument, just "set solib-search-path" and it loaded symbols for libruby
[16:08:58] einarj: has joined #ruby
[16:10:15] dlitvak: has joined #ruby
[16:10:44] rbennacer: has joined #ruby
[16:11:27] nekrodesk: has joined #ruby
[16:11:39] rbennacer: has joined #ruby
[16:12:11] robbyoconnor: has joined #ruby
[16:12:19] swills: has joined #ruby
[16:13:26] LoneHerm_: has joined #ruby
[16:14:01] st1gma: has joined #ruby
[16:15:08] duckpuppy: has joined #ruby
[16:15:13] atomical: so I need to pay $950/year for reliable sidekiq jobs, wtf
[16:15:16] idefine: has joined #ruby
[16:15:19] atomical: http://sidekiq.org/products/pro
[16:15:30] atomical: "If a Sidekiq process crashes while processing a job, that job is lost."
[16:15:38] mikee_work: has joined #ruby
[16:15:47] atomical: "Sidekiq uses BRPOP to pop a job off the queue in Redis. This is very efficient and simple but it has one drawback: the job is now removed from Redis. If Sidekiq crashes while processing that job, it is lost forever. This is not a problem for many but some businesses need absolute reliability when processing jobs."
[16:16:33] jdelaney: has joined #ruby
[16:16:38] apeiros: your outrage is what? that not everything is free?
[16:16:46] chris2: if you need absolute reliability, why would you use cloud computing? :P
[16:17:24] yorickpeterse: apeiros: yeah fuck that guy for trying to earn money with his software
[16:17:44] yorickpeterse: we should ban currency and the banks and instead simply trade goods again
[16:17:47] yorickpeterse: or use bitcoin
[16:17:51] ljarvis: i will defend sidekiq to my death, that software has saved so much money
[16:18:16] davedev24: has joined #ruby
[16:18:27] Sou|cutter: really aren't you paying for protection from your own poorly written jobs? (assuming the crash is your fault)
[16:18:27] yorickpeterse: chris2: Yeah depending on the weather your cloud may be gone
[16:18:34] apeiros: it's relatively simple - can you do it for less than 950$/year (by using a different solution or coding yourself)? if so, go that route.
[16:19:07] yorickpeterse: Lets do some math
[16:19:14] yorickpeterse: $950 a year is $0.10 per hour
[16:19:15] Sou|cutter: 950/year is not much to a business
[16:19:21] yorickpeterse: The average dev costs _way_ more than that
[16:19:23] kies^: has joined #ruby
[16:19:27] yorickpeterse: boom, justified paying for it
[16:19:33] apeiros: yorickpeterse: 1 day in our company.
[16:19:46] Xeago: has joined #ruby
[16:19:46] ljarvis: yeah sounds about right
[16:19:47] chris2: 2 nights when apeiros pays the hotel :P
[16:19:50] yorickpeterse: apeiros: you work in Austria, your costs are also like 100x higher
[16:19:59] dfinninger: has joined #ruby
[16:20:02] idefine: has joined #ruby
[16:20:03] apeiros: yorickpeterse: nooo, I'm not in austria.
[16:20:05] ljarvis: that's a day freelancing
[16:20:07] chris2: s/pays/books/
[16:20:11] yorickpeterse: apeiros: wait I thought you were?
[16:20:15] yorickpeterse: apeiros: are you in Germany insteaD?
[16:20:17] codehotter: chris2: OK I am looking at a backtrace with full debugging symbols now
[16:20:26] yorickpeterse: oh, Switzerland
[16:20:33] tuelz: has joined #ruby
[16:20:37] chris2: codehotter: so, who calls the pthread_cond_wait?
[16:20:38] codehotter: the function that goes into native_cond_wait is rb_thread_sleep_forever
[16:20:45] tuelz: is there a way to include on a subset of a modules methods?
[16:20:46] apeiros: chris2: not my fault if our contacts fail to reply in a timely manner and I've to book a more expensive hotel :)
[16:20:46] havenwood: atomical: Sidekiq had a lot of time and love go into it. The author couldn't justify all the time without getting paid, hence the enterprise features aren't free.
[16:21:00] tuelz: s/on s/only a/
[16:21:01] chris2: apeiros: i never had free booze on the room again :(
[16:21:03] yorickpeterse: apeiros: what's the time to reply, 5 minutes?
[16:21:21] yorickpeterse: Also re the enterprise stuff, we get that all the time with GitLab
[16:21:22] apeiros: chris2: you are referring to amsterdam, right?
[16:21:32] symm-: has joined #ruby
[16:21:36] yorickpeterse: "Well I really like GitLab but EE isn't FOSS so fukit" like what the hell, it's 95% CE which is FOSS
[16:21:40] apeiros: reminds me that I haven't gone to any conf in a long time :<
[16:21:41] selfadhesivefilm: has joined #ruby
[16:21:45] chris2: me neither
[16:21:49] yorickpeterse: chris2: you don't get anything for free here in .nl
[16:22:03] apeiros: yorickpeterse: you bet. free whiskeys in our room. 3 bottles even.
[16:22:17] yorickpeterse: what madness is this
[16:22:19] apeiros: or rather carafes
[16:22:23] TinkerTyper: has joined #ruby
[16:22:55] codehotter: yorickpeterse: the only problem with EE vs CE is when someone in the community wants to work on EE features to go into CE, it's hard for the company to really get behind and support that 100%
[16:23:00] codehotter: otherwise its a perfect model
[16:23:36] chris2: codehotter: so what calls sleep then?
[16:24:14] yorickpeterse: codehotter: not sure if I follow. You mean they add something to CE which then gets moved to EE?
[16:24:37] atomical: havenwood: I don't think reliable jobs is an enterprise feature
[16:24:43] baweaver: has joined #ruby
[16:24:47] scepticulous: has joined #ruby
[16:25:02] decoponio: has joined #ruby
[16:25:06] duckpuppy: has joined #ruby
[16:25:19] nofxx: has joined #ruby
[16:25:57] codehotter: yorickpeterse: well a FOSS project will generally support someone who wants to add features to it. But an EE vs CE project will not fully support the commmunity in implementing features in CE, if those features are already in EE.
[16:25:57] apeiros: atomical: it's not as if the non-enterprise version was unreliable.
[16:26:27] yorickpeterse: codehotter: This doesn't make CE any less FOSS
[16:26:30] UtkarshRay: has joined #ruby
[16:26:35] atomical: it's unreliable enough to cause a problem
[16:26:35] yorickpeterse: It's no different than a maintainer saying "We just don't want this"
[16:26:48] apeiros: atomical: so you use EMP proved servers?
[16:27:15] codehotter: yorickpeterse: it's not completely different, but there's a difference. overall, the benefits outweigh the drawbacks I would say.
[16:27:20] yorickpeterse: Pretty much every queue is "unreliable" like this by default
[16:27:44] yorickpeterse: pop a message off it, now you have to make sure it's either processed or put back in case of an erro
[16:27:46] darix: codehotter: well people learned the hardware that this can also easily kill the project. see syslog-ng vs rsyslog
[16:28:04] havenwood: atomical: You're free to write the feature yourself and tack it on to the free Sidekiq. But... the author has done this for you, cheaper and better than you can do yourself.
[16:28:32] atomical: all our sidekiq jobs execute business logic. we at least need logging if something fails.
[16:28:35] darix: yorickpeterse: sidekiq pro has this "we will use a special redis feature to pop the job from 'waiting' to 'processed' queue"
[16:28:50] darix: then you can move all processed entries back to waiting in case of a restart
[16:28:56] ljarvis: atomical: these jobs are important but you don't want to pay for them?
[16:29:01] atomical: "If a Sidekiq process crashes while processing a job, that job is lost."
[16:29:37] kingrs02: has joined #ruby
[16:29:49] havenwood: atomical: So is it worth $950 a year to your company to have someone else handle this tough problem for you?
[16:30:01] selfadhesivefilm: has joined #ruby
[16:30:03] havenwood: atomical: Your call!
[16:30:06] atomical: It's probably worth it to the open source community.
[16:30:07] darix: atomical: as i said ... see sidekiq pro vs normal.
[16:30:23] william3: has joined #ruby
[16:30:28] apeiros: atomical: then go do it.
[16:30:38] dfinninger: has joined #ruby
[16:30:39] moeabdol: has joined #ruby
[16:30:51] yorickpeterse: This really is something you should worry about when it's actually a problem
[16:31:04] atomical: It's a problem now. That's why I'm talking about it.
[16:31:09] yorickpeterse: oh no but what happens if the lightning strikes the data centre and a giant whale simultanously eats all the backups??
[16:31:09] adgtl: has joined #ruby
[16:31:15] skweek: has joined #ruby
[16:31:20] havenwood: atomical: Huh? Your company apparently needs this feature and uses Sidekiq. The open source community has a myriad of solutions, one of which is for you to write the code yourself.
[16:31:25] TinkerTyper: has joined #ruby
[16:31:59] atomical: I'm objecting to paying for what should be a core feature of this open source software
[16:32:06] atomical: Charge for support or other unique use cases
[16:32:26] havenwood: atomical: The open source part of this software simply doesn't have the feature you're wanting. You're free to add it.
[16:32:37] yorickpeterse: atomical: Your objecting purely based on a personal opinion
[16:32:38] havenwood: atomical: The author gets to charge. You don't get a say in that.
[16:32:40] yorickpeterse: others have different opinions
[16:32:41] blackmesa: has joined #ruby
[16:32:47] yorickpeterse: The author apparently decided this is "another unique use case"
[16:32:58] yorickpeterse: Complaining about it here won't get you anywhere
[16:33:22] havenwood: atomical: You *do* have the freedom to implement it yourself.
[16:33:30] codehotter: chris2: I honestly have no clue. I've been looking at this backtrace for a while, it's pages long
[16:33:44] dayjo: has joined #ruby
[16:34:01] atomical: yorickpeterse: did I say it would?
[16:34:22] Gnut: has joined #ruby
[16:34:22] atomical: recurring billing for one feature that is core to a queue
[16:34:25] atomical: not in the budget
[16:34:28] moeabdol1: has joined #ruby
[16:34:34] darix: atomical: they have the freedom to decide their business model just as you do
[16:34:45] darix: would i love to have that feature in the opensource version
[16:34:48] adgtl: has joined #ruby
[16:34:50] atomical: do i also have he right to complain about it?
[16:34:57] darix: but can i see it was a strong selling point for the pro
[16:35:04] darix: atomical: will it change much
[16:35:05] darix: probably not
[16:35:15] chouhoulis: has joined #ruby
[16:35:35] darix: e.g. i would love to have the ldap group support in gitlab-ce
[16:35:41] havenwood: atomical: You can gripe all you'd like but you can't enslave Mike Perham. That's illegal and morally wrong.
[16:35:55] codehotter: if I'm reading this backtrace: http://paste.fedoraproject.org/320822/22122145/ where do I figure out where the ruby code starts? And what the ruby code looks like?
[16:36:29] atomical: I'll stop oppressing Mike Perham in a few minutes.
[16:36:32] darix: codehotter: it is probably all ruby down to frame 1
[16:36:35] darix: only 0 is glibc
[16:37:28] darix: havenwood: actually for enough money he can probably hire Mike. but the normal charge for the pro might be cheaper
[16:37:45] davedev24: has joined #ruby
[16:38:06] Xiti: has joined #ruby
[16:38:10] codehotter: darix: right, buti's ruby's native code that I'm looking at, right?
[16:38:18] codehotter: I'm trying to figure out why this process deadlocks
[16:38:27] atomical: darix: wouldn't make sense for him from a business standpoint because we would release the software as open source and then the pro version would be useless
[16:38:37] codehotter: one thread goes into 'sleep forever' and the other one goes into 'poll' and neither makes any progress
[16:38:47] darix: codehotter: see other threads?
[16:39:04] codehotter: darix: the other one is the ruby timer thread, and it's stuck on poll() on fd 3 and fd 5
[16:39:06] darix: codehotter: you might have some heavy computation running that doesnt free the gil
[16:39:12] codehotter: that's the only two threads
[16:39:19] Infra-Red: has joined #ruby
[16:39:20] flughafen_: has joined #ruby
[16:39:23] idefine: has joined #ruby
[16:39:38] darix: atomical: well ... you know ... there is that license/contract thing
[16:39:47] darix: and he will probably put in a clause that you arent allowed to do that
[16:39:54] darix: at least I would
[16:40:36] adgtl: has joined #ruby
[16:40:51] william3: has joined #ruby
[16:41:03] havenwood: atomical: Maybe you'd prefer Resque or one of the other background processing tools that don't have paid features: https://github.com/resque/resque#readme
[16:41:11] Couch: has joined #ruby
[16:41:22] nofxx: has joined #ruby
[16:41:22] nofxx: has joined #ruby
[16:41:28] adgtl_: has joined #ruby
[16:41:36] mark4: has left #ruby: ("PART #RubyOnRails :PART #jquery :PART #reactjs :PART ##javascript :PART #elixir-lang :PART #debian :PONG :verne.freenode.net")
[16:42:01] darix: havenwood: but do they also have crash resistence?:p
[16:42:26] Couch: has joined #ruby
[16:42:26] havenwood: atomical: The folk who do pay for Sidekiq feature presumably appreciate the value they're getting and that these features wouldn't exist for Sidekiq if they weren't paying.
[16:42:46] pdoherty: has joined #ruby
[16:42:57] elifoster: has joined #ruby
[16:43:28] havenwood: darix: Maybe someone will implement it... for pay! :P
[16:44:22] [Butch]: has joined #ruby
[16:44:54] damonkelley: has joined #ruby
[16:46:03] moncky: has joined #ruby
[16:46:03] kies^: has joined #ruby
[16:46:25] moncky: hey all, I am having an issue installing the mysql2 gem, I get the following error: : mysql.h is missing. You may need to 'apt-get install libmysqlclient-dev' or 'yum install
[16:46:52] moncky: I have mysql-community-devel installed, so this should be working right?
[16:49:19] Carella: has joined #ruby
[16:49:46] devFrederick: has joined #ruby
[16:49:54] dcunit3d: has joined #ruby
[16:49:57] marxarelli: has joined #ruby
[16:49:58] atomical: we might be willing to pay for one version for $995, but not every year.
[16:50:49] havenwood: moncky: What distro is that? Seems it can't find the dev package even though you have it installed.
[16:50:53] Ropeney: has joined #ruby
[16:50:54] atomical: that's kind of how our non-hosted software contracts work
[16:51:17] havenwood: Okay, moved on from anger to bargaining.
[16:51:23] pawnbox: has joined #ruby
[16:51:25] darix: atomical: a feature like that is not ready for $1k one shot
[16:51:34] darix: especially as you want maintenance probably
[16:51:39] havenwood: atomical: Write Mike an email and propose your deal.
[16:52:06] atomical: i'm not bargaining. it's still complaining.
[16:52:10] atomical: unless you can speak for Mike?
[16:52:18] darix: atomical: i dont. i just find it amusing
[16:52:22] dalek-: has joined #ruby
[16:52:58] nodejunkie: has joined #ruby
[16:53:30] kirillzh: has joined #ruby
[16:53:32] havenwood: atomical: The "bargaining" stage of grief rarely if ever has an agent authorized to make deals.
[16:53:55] karapetyan: has joined #ruby
[16:54:09] moncky: havenwood: centos 6.7
[16:54:16] codehotter: Is it possible for a ruby process to call IO.popen() and the child not ending up in the block but somewhere else in the process entirely?
[16:54:17] atomical: you guys are so emotional
[16:54:21] jtdoncas: has joined #ruby
[16:54:26] ruby[bot]: Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
[16:54:42] codehotter: IO.popen("-") do |f| -> child ends up in some completely different place in the process
[16:55:18] jsvgoncalves: has joined #ruby
[16:55:26] jsvgoncalves: how do I check if a param (key) exists even if it's nil? params.has_key?[:mykey] doesn't seem to work
[16:56:25] ljarvis: jsvgoncalves: has_key?(:mykey)
[16:56:54] jsvgoncalves: doesn't work if the key is nil, but yeah I made a typo with [ vs (
[16:57:08] jtdoncas: yes it does
[16:57:15] rakm: has joined #ruby
[16:57:19] havenwood: >> {nil: nil}.key? :nil
[16:57:21] ruby[bot]: havenwood: # => true (https://eval.in/516561)
[16:57:38] jtdoncas: what return value / error are you receiving?
[16:57:46] ljarvis: >> { nil => 1 }.has_key? nil
[16:57:47] ruby[bot]: ljarvis: # => true (https://eval.in/516562)
[16:58:19] Abrin2: has joined #ruby
[16:58:35] ljarvis: jsvgoncalves: maybe you have { nil => 1 }.has_key?(:nil) (notice comparison of nil vs symbol)
[16:58:56] yqfvwal: has joined #ruby
[16:59:15] jsvgoncalves: >> {'mykey' => nil}.has_key?(:mykey)
[16:59:16] ruby[bot]: jsvgoncalves: # => false (https://eval.in/516563)
[16:59:26] ljarvis: jsvgoncalves: string vs symbol.. 'foo' != :foo
[16:59:31] zdman135: has joined #ruby
[16:59:33] jsvgoncalves: >> {'mykey' => nil}.has_key?('mykey')
[16:59:34] ruby[bot]: jsvgoncalves: # => true (https://eval.in/516564)
[16:59:44] jsvgoncalves: hah! ljarvis doh! thanks a lot
[17:00:01] william3: has joined #ruby
[17:00:21] em0ral: has joined #ruby
[17:01:01] pihpah: has joined #ruby
[17:02:35] darix: jsvgoncalves: there is this "hash with indifferent access" thingie from rails which handles string vs symbols
[17:02:45] adgtl: has joined #ruby
[17:03:03] dlitvak: has joined #ruby
[17:03:06] chipotle: has joined #ruby
[17:03:49] adgtl_: has joined #ruby
[17:03:53] einarj: has joined #ruby
[17:04:07] dfinninger: has joined #ruby
[17:04:25] idefine_: has joined #ruby
[17:04:46] atomical: has joined #ruby
[17:04:56] jsvgoncalves: darix: using sinatra though
[17:04:58] synthroid: has joined #ruby
[17:05:05] benhuda: has joined #ruby
[17:05:10] allcentury: has joined #ruby
[17:05:18] darix: jsvgoncalves: i think you dont need the complete rails
[17:05:21] darix: just active_support
[17:05:29] kfs: has joined #ruby
[17:05:36] amclain: has joined #ruby
[17:05:38] darix: http://api.rubyonrails.org/v4.2.5/classes/ActiveSupport/HashWithIndifferentAccess.html
[17:05:45] jsvgoncalves: darix: I see, prolly worth taking a look into, thanks a lot
[17:05:58] darix: require 'active_support/hash_with_indifferent_access'
[17:06:00] darix: should be enough
[17:06:04] allcentury: hi all - Has anyone used AWS CloudSearch via the aws-sdk gem? I want to upload batches and thought the client would allow it. http://docs.aws.amazon.com/sdkforruby/api/Aws/CloudSearchDomain/Client.html ; I recognize this is just an http endpoint but thought the client would support this.
[17:06:26] jsvgoncalves: darix: yep, will do that ;)
[17:07:48] allcentury: ahhh nvm it's under CloudSearchDomain
[17:07:54] mickey_mouse_2: has joined #ruby
[17:09:36] Gnut_: has joined #ruby
[17:11:05] adgtl: has joined #ruby
[17:11:13] zdman135_: has joined #ruby
[17:11:36] PedramT: has joined #ruby
[17:13:07] zdman135: has joined #ruby
[17:13:37] idefine: has joined #ruby
[17:14:01] adgtl_: has joined #ruby
[17:14:49] zdman135: has joined #ruby
[17:15:29] lubekpl: has joined #ruby
[17:16:17] mdw: has joined #ruby
[17:16:25] zdman135_: has joined #ruby
[17:16:52] rht: has joined #ruby
[17:17:16] zdman135: has joined #ruby
[17:17:21] sneakerhax: has joined #ruby
[17:17:26] symm-: has joined #ruby
[17:18:36] volty: has joined #ruby
[17:19:24] gambl0re: has joined #ruby
[17:19:38] zdman135: has joined #ruby
[17:22:41] casadei: has joined #ruby
[17:23:11] twistedpixels: question for everyone here: looking for a portable ruby version to use at work (windows), I found allinoneruby but it's on version 1.8 and I'd like something more recent like 2.*, any other recommendations?
[17:23:42] valera: twistedpixels: cant you go with virtualbox and/or docker-machine ?
[17:24:15] twistedpixels: valera: as in running a vm just for ruby?
[17:24:17] kirillzh: has joined #ruby
[17:24:30] havenwood: twistedpixels: You want like a Ruby to ship your app with or Ruby to run on your dev machine?
[17:24:36] guerrero: has joined #ruby
[17:24:42] valera: twistedpixels: yes, unless you have less than 2gb of ram on your desktop
[17:24:56] jgt4: has joined #ruby
[17:24:57] TinkerTyper: has joined #ruby
[17:25:12] twistedpixels: havenwood: it's just to run locally for me, programming isn't really my job, but I know ruby so I end up writing tools in it to make my life easier
[17:25:35] darix: twistedpixels: buy a rasperry pi
[17:25:37] havenwood: twistedpixels: I think typically Windows folk use the RubyInstaller: http://rubyinstaller.org
[17:25:55] guerrero: has joined #ruby
[17:26:03] SenpaiSilver: has joined #ruby
[17:26:23] zdman135_: has joined #ruby
[17:26:30] twistedpixels: I've been sshing into my VPS for a little bit now, but the whole remote part gets kinda annoying
[17:26:55] darix: twistedpixels: vim + tmux^^
[17:26:56] twistedpixels: I'll ask if I'm allowed to install ruby, not sure the rules here about installing things on the work computers
[17:27:01] dajobat: has joined #ruby
[17:27:30] zdman135: has joined #ruby
[17:28:47] twistedpixels: my life would be so much easier if they weren't so windows oriented here
[17:29:19] jottr: has joined #ruby
[17:30:32] bhaak: has joined #ruby
[17:30:41] aegis3121: has joined #ruby
[17:31:17] finisherr: has joined #ruby
[17:31:18] mrfoto: has joined #ruby
[17:31:30] havenwood: twistedpixels: If you can install stuff maybe consider Vagrant.
[17:33:01] tomchapin: has joined #ruby
[17:33:10] Shaboum: has joined #ruby
[17:33:22] gambl0re: has joined #ruby
[17:33:22] gambl0re: has joined #ruby
[17:34:37] SCHAAP137: has joined #ruby
[17:35:15] twistedpixels: havenwood: ooh, that seems interesting
[17:35:51] jmdade: has joined #ruby
[17:36:27] bb010g: has joined #ruby
[17:36:37] ESpiney: has joined #ruby
[17:37:22] jgt4: has joined #ruby
[17:37:43] dravine: has joined #ruby
[17:40:59] fedexo: has joined #ruby
[17:41:03] fedexo_: has joined #ruby
[17:42:27] skweek: has joined #ruby
[17:42:32] djbkd: has joined #ruby
[17:43:43] _djbkd: has joined #ruby
[17:44:25] mickey_mouse_2: has joined #ruby
[17:44:47] Infra-Red: has joined #ruby
[17:45:42] zdman135: has joined #ruby
[17:47:05] codehotter: chris2: if you're still interested: I added some more memory to the box, and the problem disappeared
[17:47:25] codehotter: chris2: now what I want to know is, is it the test suite, that doesn't perform well under memory pressure? Or my build of the interpreter?
[17:47:38] codehotter: If it starts to behave randomly when memory gets low, that's scary.
[17:47:47] codehotter: if the test suite just starts to behave randomly, that's OK.
[17:48:21] chris2: codehotter: sounds quite crazy
[17:48:27] chris2: codehotter: how much ram did you have before?
[17:49:38] crowell: has joined #ruby
[17:49:54] codehotter: chris2: 750MB
[17:50:09] kirillzh: has joined #ruby
[17:50:39] zdman135_: has joined #ruby
[17:50:43] codehotter: I'm recompiling it myself because I wanted to use jmalloc
[17:50:46] mlehrer: has joined #ruby
[17:50:53] codehotter: but not sure if that's a good idea still
[17:50:57] dudedudeman: has joined #ruby
[17:50:58] einarj: has joined #ruby
[17:51:05] yorickpeterse: that's how I pronounce it
[17:51:08] krobzaur: has joined #ruby
[17:51:19] yorickpeterse: tbh YEAHmalloc sounds even better
[17:51:36] aryaching: has joined #ruby
[17:52:01] zdman135: has joined #ruby
[17:52:15] chris2: 750mb should be plenty!
[17:53:23] codehotter: chris2: I put it back and can reproduce the problem again, from clean build
[17:53:54] codehotter: actually I didn't add memory, just created a 1GB swap file.
[17:54:12] codehotter: if I remove the swap, so now we have 720 MB and no swap space, then I can reproduce the problem again
[17:55:26] codehotter: Does ruby expect to run with swap space? Swap space makes me afraid, I rather have my server crash (so loadbalancer notice and take it out of rotation) than become very slow
[17:55:31] chipotle_: has joined #ruby
[17:55:37] kirillzh: has joined #ruby
[17:55:59] chris2: ruby doesnt care about swap, your os provides it transparently
[17:56:36] ESpiney_: has joined #ruby
[17:56:41] Coldblackice: has joined #ruby
[17:56:47] kirillzh: has joined #ruby
[17:57:16] codehotter: well, fork() without swap space is a problem because you need to have 2x the amount of memory your process is currently using
[17:57:28] Joel: L1 has output, but L2 returns false, thoughts? https://gist.github.com/jjshoe/034cd4f5298a180438a6
[17:57:30] codehotter: with swap space, everything is fine, because the extra memory doesn't get used
[17:57:31] chris2: usually overcommit is used
[17:57:33] cschneid_: has joined #ruby
[17:57:52] kent\n: has joined #ruby
[17:57:52] kent\n: has joined #ruby
[17:58:23] codehotter: I would really like to find out exactly what the problem is here... How will this ruby with jemalloc behave in production, if the test suite deadlocks with 750 MB and works with 750MB + 1GB swap?
[17:58:33] codehotter: I need to figure out what the cause is here ...
[18:00:51] codehotter: The reason for deadlock seems to be that after IO.popen("-") do |f| ... the child process isn't in the block but completely different function in the process... some random memory corruption?
[18:00:58] codehotter: that is consistently always the same
[18:01:12] codehotter: Its not random corruption it's deterministic corruption
[18:01:28] chris2: how much free space do you have when deadlock occurs? free(1)?
[18:01:43] codehotter: chris2: 300 MB
[18:01:59] chris2: and did ruby fork already?
[18:02:49] ElFerna: has joined #ruby
[18:03:14] shadeslayer: has joined #ruby
[18:03:27] codehotter: yes, I see two ruby processes, the parent, patiently waiting for the child pipe to close, and the child which calls sleep (which is part of a completely different test)
[18:04:20] seitensei: has joined #ruby
[18:04:24] chris2: do the tests run in parallel?
[18:04:35] colleen_: has joined #ruby
[18:04:40] codehotter: I don't think so
[18:04:51] chris2: how come the old child sticks around then?
[18:05:15] Shidash: has joined #ruby
[18:05:28] nfk: has joined #ruby
[18:05:31] codehotter: There's no old child?
[18:05:46] zdman135: has joined #ruby
[18:05:56] benlieb: has joined #ruby
[18:06:17] codehotter: Remember the test you sent me: http://sprunge.us/bMUN
[18:06:20] codehotter: this is the code it is running
[18:06:53] codehotter: The parent is blocking in f.read, which will return once the child closes the pipe
[18:07:06] codehotter: the child however has no intention of closing the pipe or exiting, because it is in sleep_forever
[18:07:21] codehotter: The child is supposed to execute the block, but it ends up in a cmopletely different location instead, where it calls sleep
[18:07:31] bhaak: has joined #ruby
[18:07:38] chris2: try running ruby -d
[18:08:12] jgpawletko: has joined #ruby
[18:08:26] chris2: hm, i guess requires building with THREAD_DEBUG too
[18:09:19] codehotter: I can build with whatever you like, just say the word
[18:09:57] codehotter: I can't guarantee it will fail in the same way, though. It seems some kind of memory corruption, except that it is deterministic, if built in the same way. I rebuilt ruby 4 times already and can reproduce it each time
[18:09:59] chris2: i have no idea about that code really :)
[18:10:15] chris2: perhaps try an older ruby first
[18:10:20] codehotter: It builds in a chroot()
[18:10:22] chris2: 2.2.x or something
[18:10:23] codehotter: I'm running 2.2.4
[18:10:32] chris2: try 2.3 ;)
[18:10:33] speakingcode: has joined #ruby
[18:10:45] codehotter: I'm building my distribution's package inside mock
[18:10:51] codehotter: the only think I changed is I added --with-jemalloc
[18:10:56] roshanav_: has joined #ruby
[18:11:03] chris2: so, when you remove that flag it works?
[18:11:17] codehotter: and if I add swap space, it works too
[18:11:42] codehotter: I'm sccared that if I try 2.3, it will work too, but only because the memory allocation didn't happen in particular order to trigger the bug
[18:11:43] chris2: you could build it with and without and compare strace -ff
[18:11:54] chris2: and then figure out whats different
[18:12:36] codehotter: my preferred solution would be to figure out exactly what is happening incorrectly
[18:12:43] codehotter: so I can report a bug report get it fixed and be happy
[18:12:46] zdman135: has joined #ruby
[18:12:56] codehotter: cause until then I will always be worried... "OK, it works now, but it can randomly corrupt memory"
[18:13:44] codehotter: after fork() how does ruby decide which line of ruby code to execute next?
[18:14:11] chris2: it doesnt, fork simply "returns twice"
[18:14:15] chris2: in two different processes
[18:14:22] karapetyan: has joined #ruby
[18:14:26] codehotter: if I can find the memory location in gdb that is different in child and parent after fork() system call...
[18:14:28] codehotter: maybe I can find the bug
[18:14:39] chris2: you can set a breakpoint on fork
[18:14:42] darkf: has joined #ruby
[18:14:44] chris2: and use gdb
[18:14:57] chris2: set follow-fork-mode child
[18:15:04] amorbix: has joined #ruby
[18:15:08] chris2: then you see where child ends up
[18:15:20] codehotter: oh that would be so cool if I can go step by step in the child
[18:15:23] codehotter: see where it ends up
[18:15:28] burgestrand: has joined #ruby
[18:15:31] codehotter: but I can only see these stupid vm_exec and insxxxx
[18:15:32] chris2: just step through it
[18:15:38] codehotter: not the ruby code or the c code
[18:15:46] volty: so? no source to try to reproduce it?
[18:16:05] codehotter: I have all the debug symbols, I am just ignorant how to step through ruby instead of doing backtace with all the vm_exec
[18:16:29] adgtl: has joined #ruby
[18:16:44] volty: is it a standard ruby version? do/did others have the same problem?
[18:16:44] codehotter: the source here is just mri ruby itself... compiled with --with-jemalloc and deadlock inside test suite with make check
[18:16:51] codehotter: 2.2.4 is version
[18:17:25] codehotter: volty: problem is, if I add some swap space the problem disappears... it seems to trigger only in specific circumstances
[18:17:26] chris2: which jemalloc version btw?
[18:18:04] codehotter: from EPEL repository
[18:18:15] chris2: perhaps its https://gist.github.com/jokea/2786537 ?
[18:19:09] chris2: hm, but fixed in jemalloc 3.0.0
[18:19:26] TomyLobo: has joined #ruby
[18:19:32] codehotter: but the deadlock is so specific
[18:19:32] arthropododo: has joined #ruby
[18:19:36] pdoherty: has joined #ruby
[18:19:40] chris2: do you see a mention of malloc in backtrace?
[18:19:41] zdman135: has joined #ruby
[18:19:41] codehotter: it only 'deadlocks' because it's actually ruby code that just calls sleep()
[18:19:59] codehotter: chris2: I made some progress with the backtrace you helped me get earlier today...
[18:20:06] chris2: you'll need to figure out how you enter that sleep thing
[18:20:08] codehotter: it's just another test in the same test suite that happens to call sleep (a timeout test)
[18:20:15] codehotter: its supposed to sleep
[18:20:40] codehotter: but the problem is it shouldn't be running that test at that moment, it shouldn't be there in the file at all, it should be in the block passed to IO.popen
[18:21:00] chris2: i thought you can reproduce with the small file?
[18:21:01] astrobunny: has joined #ruby
[18:21:13] codehotter: no, with the small file it works, no 'lock'
[18:21:26] finisherr: has joined #ruby
[18:21:28] chris2: otoh the small file also uses far less memory i guess :)
[18:21:30] mdw: has joined #ruby
[18:22:34] sts: has joined #ruby
[18:22:44] benlieb: has joined #ruby
[18:23:32] sts: hello. can anyone recommend any gems that provide a good application configuration object? I want default settings, settings from a config file and merge commander-rb invocation with the configuration object.
[18:24:26] shock_one: has joined #ruby
[18:24:33] codehotter: chris2: release notes for 4.0.0 say - Fix an OOM-related regression in arena_tcache_fill_small(), which could cause cache corruption on OOM. This regression was present in all releases from 2.2.0 through 3.6.0.
[18:24:44] codehotter: chris2: maybe I should try with recent jemalloc
[18:24:57] yfeldblum: has joined #ruby
[18:25:23] [Butch]: has joined #ruby
[18:25:25] shadoi: has joined #ruby
[18:25:54] jud: has joined #ruby
[18:26:33] Infra-Red: has joined #ruby
[18:26:47] zdman135: has joined #ruby
[18:26:55] volty: sts, imho that ocnfig seems too trivial for a gem. You have a hash of settings into an yaml (or else) file, a hash of default, and hash from command options, then you just merge the hashes at your will
[18:27:55] joonty: has joined #ruby
[18:29:42] baweaver: has joined #ruby
[18:29:55] Mon_Ouie: has joined #ruby
[18:31:43] sucks: has joined #ruby
[18:31:52] shock_one: has joined #ruby
[18:32:10] Jardayn: has joined #ruby
[18:32:21] einarj_: has joined #ruby
[18:33:55] zdman135: has joined #ruby
[18:34:04] Shaboum: has joined #ruby
[18:34:54] nunchuck: has joined #ruby
[18:35:04] zdman135_: has joined #ruby
[18:35:53] rakm: has joined #ruby
[18:36:27] Alayde: has joined #ruby
[18:36:34] platzhirsch: has left #ruby: ()
[18:36:50] [Butch]: has joined #ruby
[18:38:16] Alayde: has left #ruby: ()
[18:39:42] JoshGlzBrk: has joined #ruby
[18:39:45] dfockler: has joined #ruby
[18:41:32] rakm: has joined #ruby
[18:42:39] mdw: has joined #ruby
[18:42:44] chris2: codehotter: possible...
[18:43:11] JohnBat26: has joined #ruby
[18:43:27] zdman135: has joined #ruby
[18:44:17] PedramT: has joined #ruby
[18:45:13] skweek: has joined #ruby
[18:45:38] volty: has left #ruby: ("Konversation terminated!")
[18:46:31] rakm_: has joined #ruby
[18:46:57] wolffles: has joined #ruby
[18:49:10] betafive: has joined #ruby
[18:51:11] rht: has joined #ruby
[18:51:28] betafive: has joined #ruby
[18:52:20] rbennacer: has joined #ruby
[18:54:36] wolffles: i thought this would return more than one value but it doesnt. does count only return 1 value?
[18:54:40] wolffles: https://eval.in/516626
[18:55:21] pawnbox: has joined #ruby
[18:55:51] andrew: has joined #ruby
[18:56:18] al2o3-cr: wolffles: #find_all or #select, #find only returns (1)
[18:56:20] seitensei: has joined #ruby
[18:56:31] pawnbox: has joined #ruby
[18:56:45] dlitvak: has joined #ruby
[18:57:00] dlitvak: has joined #ruby
[18:57:21] pawnbox: has joined #ruby
[19:01:05] kenpoint: has joined #ruby
[19:01:27] schickung: has joined #ruby
[19:02:09] prefix: has joined #ruby
[19:02:43] einarj: has joined #ruby
[19:02:53] DoubleMalt: has joined #ruby
[19:03:05] zdman135: has joined #ruby
[19:03:50] JDiPierro: has joined #ruby
[19:05:48] karapetyan: has joined #ruby
[19:07:20] baweaver: has joined #ruby
[19:07:48] zdman135_: has joined #ruby
[19:08:16] chipotle: has joined #ruby
[19:08:53] celly: has joined #ruby
[19:10:22] lemur: has joined #ruby
[19:11:03] howdoicomputer: has joined #ruby
[19:11:04] celly: has joined #ruby
[19:12:28] ElFerna: has joined #ruby
[19:12:28] rht: has joined #ruby
[19:15:29] kirillzh: has joined #ruby
[19:15:51] yfeldblum: has joined #ruby
[19:17:12] shevy: my tasty waffles
[19:18:47] momomomomo: has joined #ruby
[19:20:20] codecop: has joined #ruby
[19:21:25] dlitvak: has joined #ruby
[19:22:01] VeryBewitching: has joined #ruby
[19:23:05] zdman135: has joined #ruby
[19:23:53] zaya: has joined #ruby
[19:28:24] procyon_ember: has joined #ruby
[19:28:45] joonty: has joined #ruby
[19:28:52] PedramT: has joined #ruby
[19:29:23] Asher: has joined #ruby
[19:29:45] prefix: is this proper syntax so long as @local_hostname contains some expected input (e.g. google.com) line =~ /^.*#{@local_hostname}.*$/
[19:29:55] procyon_ember: Is MINASWAN a real thing? If so how does it apply to #ruby?
[19:30:15] dalek-: has joined #ruby
[19:31:23] Infra-Red: has joined #ruby
[19:32:10] centrx: procyon_ember, What do you mean?
[19:32:22] centrx: prefix, That's correct, but it looks equivalent to just line.include?(@local_hostname)
[19:32:42] prefix: sure but regex is more fun
[19:33:11] celly: has joined #ruby
[19:33:17] blt: has joined #ruby
[19:33:24] procyon_ember: centrx: https://en.wikipedia.org/wiki/MINASWAN
[19:33:40] adaedra: prefix: if your goal is to match the whole string, use \A and \z rather that ^ and $, as the latter match /lines/
[19:33:56] gambl0re: has joined #ruby
[19:34:07] adaedra: >> /^b$/ =~ "a\nb\nc"
[19:34:09] ruby[bot]: adaedra: # => 2 (https://eval.in/516648)
[19:34:23] adaedra: >> /\Ab\z/ =~ "a\nb\nc"
[19:34:25] ruby[bot]: adaedra: # => nil (https://eval.in/516649)
[19:34:34] jackjackdripper: has joined #ruby
[19:34:55] Xeago: has joined #ruby
[19:35:02] procyon_ember: If my question is unwelcome here, where might be a more appropriate place to ask?
[19:35:46] apeiros: procyon_ember: see topic. #ruby has rules. you can make your own opinion whether those fit MINSWAN
[19:36:03] procyon_ember: I see. Thanks for the reply.
[19:36:08] procyon_ember: has left #ruby: ("rcirc on GNU Emacs 24.5.1")
[19:36:30] mg^: I'm pretty sure we were all sitting there wondering what the endgame for that like of questioning was.
[19:36:41] mg^: line of, rather
[19:37:11] mg^: that was a rather appropriate response, though
[19:37:46] Canar: lol no kidding
[19:39:01] devbug: has joined #ruby
[19:39:37] kirillzh: has joined #ruby
[19:45:07] swivel1983: has joined #ruby
[19:47:07] zdman135: has joined #ruby
[19:47:13] jmdade: has joined #ruby
[19:47:20] firstdayonthejob: has joined #ruby
[19:48:05] blackmesa: has joined #ruby
[19:48:07] Joel: has left #ruby: ("Leaving")
[19:50:29] shevy: mg^ dunno, I could not check in time but I assume that procyon_ember was one of those zero-stay webchatters, some questions seem to be randomly collected from reddit or stackoverflow
[19:51:05] al2o3-cr: has joined #ruby
[19:54:46] andrewjf: has joined #ruby
[19:56:22] idefine: has joined #ruby
[19:59:28] firstdayonthejob: has joined #ruby
[20:00:26] dmitch: has joined #ruby
[20:00:41] jottr: has joined #ruby
[20:00:52] Ox0dea: shevy: They're from #bash, actually.
[20:01:15] shevy: huh from #bash?
[20:01:16] blackmesa: has joined #ruby
[20:01:48] Ox0dea: Well, I remember seeing them here just after I asked in #bash whether something like Viva could be done in Bash.
[20:02:18] Ox0dea: I guess they got interested enough in Ruby to look for it on Twitter? :P
[20:02:32] dalek-: has joined #ruby
[20:03:05] Ox0dea: Not the first place I'd look to learn about a language, but there it is.
[20:04:33] einarj: has joined #ruby
[20:04:34] LoneHerm_: has joined #ruby
[20:06:55] zdman135_: has joined #ruby
[20:07:11] ur5us: has joined #ruby
[20:07:37] zdman135_: has joined #ruby
[20:07:46] gambl0re: has joined #ruby
[20:09:08] shock_one: has joined #ruby
[20:10:52] mdw: has joined #ruby
[20:11:00] zdman135: has joined #ruby
[20:11:04] doublemalt_: has joined #ruby
[20:11:09] diegoviola: has joined #ruby
[20:12:02] idefine: has joined #ruby
[20:12:46] nettoweb: has joined #ruby
[20:13:10] yqt: has joined #ruby
[20:13:42] ferr: has joined #ruby
[20:15:22] zdman135: has joined #ruby
[20:15:46] jottr: has joined #ruby
[20:15:55] floror: has joined #ruby
[20:16:11] mdw7: has joined #ruby
[20:17:05] mdw7_: has joined #ruby
[20:18:57] c0ncealed: has joined #ruby
[20:20:42] einarj: has joined #ruby
[20:23:43] aswen: has joined #ruby
[20:24:22] alexherbo2: has joined #ruby
[20:25:27] azure32: has joined #ruby
[20:26:21] baweaver: has joined #ruby
[20:28:01] idefine: has joined #ruby
[20:28:10] bluOxigen_: has joined #ruby
[20:29:32] DexterLB: has joined #ruby
[20:30:50] zdman135_: has joined #ruby
[20:30:53] joonty: has joined #ruby
[20:33:07] adis: has joined #ruby
[20:33:12] adis: imal neko iz Bosne?
[20:33:48] manveru: making bosna with neko is rather hard, but doable
[20:34:05] bluOxigen: has joined #ruby
[20:34:32] shevy: another one for my epic IRC collection
[20:34:45] manveru: do you have an alert on my nick or something :P
[20:35:06] adis: has left #ruby: ()
[20:35:13] kobain: has joined #ruby
[20:35:13] shevy: nah just happened to look here right now :D
[20:35:32] dalek-: has joined #ruby
[20:35:55] Cohedrin: has joined #ruby
[20:36:20] synthroid: has joined #ruby
[20:37:01] Ox0dea: manveru: Are you saying cats are edible?
[20:37:11] jgt4: has joined #ruby
[20:37:28] manveru: https://en.wikipedia.org/wiki/Neko_%28programming_language%29
[20:37:41] manveru: i'm not chinese dude
[20:38:11] manveru: and japanese don't eat cats
[20:38:11] Ox0dea: I'll refrain from linking the Google Images results page for "neko", but it's the Japanese word for cat.
[20:38:28] shevy: awww what monster is that neko! foo = function() { $print(this.x); }
[20:38:42] Ox0dea: manveru: https://en.wikipedia.org/wiki/Bosna_(sausage)
[20:38:47] baweaver: has joined #ruby
[20:38:49] manveru: i lived in japan for 7 years :)
[20:38:51] Ox0dea: > making bosna with neko is... doable
[20:39:07] manveru: you could program a machine to make bosna for you
[20:39:13] Ox0dea: Out of neko?!
[20:39:41] Ox0dea: Anyway, cats aren't edible on the Internet.
[20:39:45] zdman135: has joined #ruby
[20:39:51] havenwood: Ox0dea: http://kao-ani.com/wp-content/uploads/2013/05/sushi-neko-cat-4.jpg
[20:40:06] Ox0dea: Aw, jeeze.
[20:40:20] manveru: Ox0dea: i mean the neko programming language... didn't you get my memo?
[20:40:29] tomchapin: has joined #ruby
[20:40:32] manveru: that's awfully tasty
[20:40:58] blackgoat: has joined #ruby
[20:41:23] Ox0dea: What, memorandi?
[20:41:24] blandflakes: has joined #ruby
[20:41:33] blt: has joined #ruby
[20:41:35] idefine: has joined #ruby
[20:42:58] tildes: has joined #ruby
[20:43:15] Conflict: has joined #ruby
[20:43:25] blandflakes: has joined #ruby
[20:43:38] lubekpl: has joined #ruby
[20:44:11] crowell: has joined #ruby
[20:45:10] d10n-work: has joined #ruby
[20:45:34] jds: has joined #ruby
[20:46:15] dfinninger: has joined #ruby
[20:46:33] dmitch: has joined #ruby
[20:54:31] zdman135: has joined #ruby
[20:55:02] symm-: has joined #ruby
[20:55:37] idefine: has joined #ruby
[20:55:53] idefine: has joined #ruby
[20:56:19] mhoungbo: has joined #ruby
[20:57:01] Alak: has joined #ruby
[20:58:48] diegoviola: has joined #ruby
[21:00:21] tvw: has joined #ruby
[21:01:08] benlieb: has joined #ruby
[21:01:21] ltp: has joined #ruby
[21:01:50] chris2: i've never seen that in germany
[21:03:00] chris2: will get one when i get to augsburg again
[21:03:01] dlitvak: has joined #ruby
[21:04:45] dlitvak: has joined #ruby
[21:06:02] DmitryBochkarev: has joined #ruby
[21:06:52] nfk: has joined #ruby
[21:06:57] rodfersou: has joined #ruby
[21:08:31] baweaver: has joined #ruby
[21:08:35] lemur: has joined #ruby
[21:09:58] davedev24: has joined #ruby
[21:12:29] dalek-: has joined #ruby
[21:12:35] andrewvos: has joined #ruby
[21:14:02] aphprentice_: has joined #ruby
[21:14:54] andrewvos: Heya, I'm working on a web app that allows users to input markdown and it gets rendered on the main site. At the moment I'm trying to allow users to render some active record objects in their own custom format, with markdown. I've looked at rendering the content twice, using liquid first and then processing it with markdown afterwards, but it's a bit gross and liquid has way to many features. I kind of want
[21:14:56] andrewvos: something like mustache+markdown but mustache allows arbitrary code execution. Any ideas? At the moment I'm thinking add some sort of loop syntax to markdown before processing it with markdown gem. Seems like a lot of work though, and there's probably something easier I've overlooked?
[21:17:10] zdman135_: has joined #ruby
[21:17:11] kobain: has joined #ruby
[21:18:00] dfinninger: has joined #ruby
[21:20:19] mg^: andrewvos: you could always use redcarpet and write a custom renderer
[21:20:22] Synthead: has joined #ruby
[21:20:58] andrewvos: mg^: Yeah, but then it's gonna get real tricky... to support nested loops for example
[21:21:11] andrewvos: https://github.com/zendesk/curly <-- looks interesting
[21:21:57] mg^: true. Presentation-layer stuff is not my area of expertise so my experience in this area is a bit limited
[21:24:10] Bloodshot: has joined #ruby
[21:24:25] zdman135: has joined #ruby
[21:25:49] jackjackdripper: has joined #ruby
[21:25:58] zdman135: has joined #ruby
[21:26:05] volty: has joined #ruby
[21:26:42] ElFerna: has joined #ruby
[21:27:26] idefine_: has joined #ruby
[21:27:42] shevy: havenwood lol sushi cat!
[21:28:28] andrewvos: I suppose what I really need is a template language that's simple, and safe for rendering user-inputted content
[21:29:44] dmitch: has joined #ruby
[21:29:46] howdoicomputer: has joined #ruby
[21:29:46] Rutix: has joined #ruby
[21:29:47] Rutix: has joined #ruby
[21:29:48] freerobby: has joined #ruby
[21:30:31] Cohedrin: has joined #ruby
[21:31:58] joonty: has joined #ruby
[21:32:15] burgestrand: has joined #ruby
[21:32:29] ixti: has joined #ruby
[21:34:24] nucdak: has joined #ruby
[21:35:07] shock_one: has joined #ruby
[21:36:03] solocshaw: has joined #ruby
[21:36:33] x77686d: has joined #ruby
[21:36:38] idefine: has joined #ruby