« Back to channel list

#ruby - 10 December 2015

« Back 1 day Forward 1 day »
[00:00:34] rflot: has joined #ruby
[00:03:47] devster31: what's the equivalent of python's sys.maxsize? the largest integer value supported by the platform?
[00:04:54] aryaching_: has joined #ruby
[00:05:03] Ropeney: has joined #ruby
[00:05:22] DeXterbed: has joined #ruby
[00:07:06] bmalum: has joined #ruby
[00:07:10] unreal_: has joined #ruby
[00:07:12] soahccc: devster31: maybe this helps you? http://stackoverflow.com/a/535763/1806803
[00:07:50] devster31: yep, thanks
[00:10:38] ap4y_: has joined #ruby
[00:11:49] colegatron: has joined #ruby
[00:12:26] cardoni: has joined #ruby
[00:14:22] juddey: has joined #ruby
[00:15:47] sh4d0wD: has joined #ruby
[00:16:07] TheNet: has joined #ruby
[00:17:42] InvGhosttt: has joined #ruby
[00:17:58] SenpaiSilver: has joined #ruby
[00:19:45] TheMoonMaster: has joined #ruby
[00:19:45] TheMoonMaster: has joined #ruby
[00:20:33] boxrick1: has joined #ruby
[00:20:55] dlitvak: has joined #ruby
[00:21:00] lyoshajapan: has joined #ruby
[00:21:39] aibot: has joined #ruby
[00:22:31] solocshaw: has joined #ruby
[00:22:42] maloik: has joined #ruby
[00:23:56] mahk: has joined #ruby
[00:24:27] jabreity__: has joined #ruby
[00:26:05] dlitvak: has joined #ruby
[00:26:19] lemur: has joined #ruby
[00:26:25] grill: has joined #ruby
[00:26:36] danzilio: has joined #ruby
[00:26:45] rayzaum: has joined #ruby
[00:26:46] andersh: has joined #ruby
[00:26:47] neanderslob: has joined #ruby
[00:26:47] Xentil: has joined #ruby
[00:26:49] rayzaum: hey, someone can help me, im install rails now and show me this msg when a i put "rails server" Usage: rails new APP_PATH [options], and more option..
[00:26:53] Xentil: has joined #ruby
[00:26:56] Renich: has joined #ruby
[00:26:59] tejasmanohar: has joined #ruby
[00:27:01] mary5030: has joined #ruby
[00:27:36] BTRE: has joined #ruby
[00:27:52] rayzaum: has joined #ruby
[00:27:55] rayzaum: hey, someone can help me, im install rails now and show me this msg when a i put "rails server" Usage: rails new APP_PATH [options], and more option..
[00:27:55] TheNet: has joined #ruby
[00:27:55] zarubin: has joined #ruby
[00:28:10] claw: has joined #ruby
[00:28:19] Yzguy: has joined #ruby
[00:28:26] dfinninger: has joined #ruby
[00:28:29] BraddPitt: rayzaum first of all you should ask this in the ruby on rails channel. Second you need to create a new rails project before you can start the server
[00:28:37] brendan-: has joined #ruby
[00:28:37] ap4y: has joined #ruby
[00:28:45] shanemcd: has joined #ruby
[00:28:54] FooMunki: has joined #ruby
[00:28:56] Renich: has joined #ruby
[00:28:57] bmalum: has joined #ruby
[00:29:57] daivyk: has joined #ruby
[00:30:12] SenpaiSilver_: has joined #ruby
[00:30:30] jessemcgilallen: has joined #ruby
[00:32:16] SenpaiSilver_: has joined #ruby
[00:32:47] zquad: I have an array of [key=value, key2=value2] pairs, how do I iterate through them and get key value pairs
[00:33:59] havenwood: zquad: So like?: [key, value, key, value]
[00:34:41] havenwood: >> [:key, :value, :another, :pair].each_slice(2).to_a
[00:34:43] ruboto: havenwood # => [[:key, :value], [:another, :pair]] (https://eval.in/482993)
[00:34:51] havenwood: >> [:key, :value, :another, :pair].each_slice(2).to_h
[00:34:52] ruboto: havenwood # => {:key=>:value, :another=>:pair} (https://eval.in/482994)
[00:35:41] zquad: you guys are awesome
[00:35:56] Uranio: has joined #ruby
[00:38:38] RobertBirnie: has joined #ruby
[00:39:38] SenpaiSilver: has joined #ruby
[00:40:56] hahuang65: has joined #ruby
[00:41:31] astrobunny: has joined #ruby
[00:41:52] maloik: has joined #ruby
[00:41:59] DLSteve: has joined #ruby
[00:42:00] RobertBirnie: has joined #ruby
[00:42:24] soahccc: Does anyone knows a nifty trick to get N items from an array which are evenly distributed? So if I'd want 10 from a list of 20 I would take every second, etc.
[00:42:26] jhonglim: has joined #ruby
[00:43:30] durstburger: has joined #ruby
[00:44:55] rickmasta: has joined #ruby
[00:45:34] robertmay: has joined #ruby
[00:46:19] dlitvak: has joined #ruby
[00:48:07] jhass: soahccc: mh, each_slice(size/N).map(&:first)?
[00:49:21] DiCablo: has joined #ruby
[00:50:56] soahccc: >> [*0..11].each_slice(11/6).map(&:first)
[00:50:57] ruboto: soahccc # => [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] (https://eval.in/482995)
[00:51:08] soahccc: jhass: like that? :S
[00:51:31] ruboto: havenwood # => 1 (https://eval.in/482996)
[00:51:53] havenwood: [1, 2, 3, 4, 5, 6] |> Enum.take_every(2) #=> [1, 3, 5]
[00:52:00] havenwood: maybe we need a #take_every ;)
[00:52:27] jhass: >> [*0..11].each_slice(11.fdiv(6).round.to_i).map(&:first)
[00:52:28] ruboto: jhass # => [0, 2, 4, 6, 8, 10] (https://eval.in/482997)
[00:52:53] dlitvak: has joined #ruby
[00:53:36] jhass: also 0..11 are actually 12 elements, not 11
[00:54:29] havenwood: jhass: I wonder if Crystal-lang would accept an Enumerable#take_every?
[00:54:43] jhass: if you can argue a real world usecase ..
[00:54:50] havenwood: #take_random is nifty as well
[00:55:52] soahccc: havenwood: I think I will resort to random if I can't wrap my drunken brain around this math/algo hell :D
[00:56:02] elton: has joined #ruby
[00:56:06] havenwood: soahccc: sample(10)
[00:56:31] havenwood: >> [*1..20].sample 10
[00:56:33] ruboto: havenwood # => [11, 7, 1, 15, 17, 12, 19, 5, 6, 16] (https://eval.in/482998)
[00:56:52] havenwood: soahccc: ^ no dupes
[00:57:36] jhass: depends on how strict the "evenly" property has to be
[00:58:01] havenwood: pseudo evenly!
[00:59:00] lyoshajapan: has joined #ruby
[01:00:10] maloik: has joined #ruby
[01:00:31] rawrwx: has joined #ruby
[01:02:13] SenpaiSilver: has joined #ruby
[01:02:19] soahccc: I think I'm fine with random :) At least for today
[01:02:41] nateberkopec: has joined #ruby
[01:03:24] dlitvak: has joined #ruby
[01:05:21] lyoshajapan: has joined #ruby
[01:05:47] SenpaiSilver: has joined #ruby
[01:10:01] s00pcan: has joined #ruby
[01:10:29] rakm_: has joined #ruby
[01:10:52] casadei: has joined #ruby
[01:12:51] diegoviola: has joined #ruby
[01:15:44] SenpaiSilver: has joined #ruby
[01:15:54] diegoviola: has joined #ruby
[01:18:05] payload: has joined #ruby
[01:18:35] payload: why is ruby-lang invite only?
[01:22:57] lemur: it doesn't exist anymore out of technicality. The channels have merged
[01:23:21] fryguy: has joined #ruby
[01:23:39] symm-: has joined #ruby
[01:23:52] lemur: has joined #ruby
[01:24:02] fryguy: if i'm using ffi and get caught in a long running function, how can I have signals bubble out of the ffi method to ruby so that I can terminate the program?
[01:24:55] eam: fryguy: it sounds like you want to spin up a timer thread?
[01:25:27] lyoshajapan: has joined #ruby
[01:26:18] TomPeed: has joined #ruby
[01:26:25] fryguy: eam: i'm not sure, because once I get out of the long-running function (it's an event loop), the signal happens and the program terminates
[01:27:11] tenderlove: has joined #ruby
[01:27:21] fryguy: specifying the blocking option on attach_function didn't seem to change the behavior eihter
[01:27:43] eam: oh, you're sending it a signal and want to respond to it?
[01:27:54] tenderlove: has joined #ruby
[01:27:55] RegulationD: has joined #ruby
[01:28:00] rgrmatt: has joined #ruby
[01:28:49] fryguy: eam: i'm calling a wait_for_event c function that waits for an event to happen. If I hit ctrl-c while this is running, nothing happens. Once an event fires, I receive the interrupt
[01:29:01] fryguy: I want to actually respond to the signal and break out of the long-running c function call
[01:29:35] bmalum: has joined #ruby
[01:30:11] InvGhosttt: has joined #ruby
[01:30:23] eam: I guess the question is whether ffi is blocking the signal, or if the function you're calling is blocking it
[01:30:40] eam: if the latter, you may need to modify the library
[01:30:56] fryguy: it's not the function i'm calling
[01:31:04] fryguy: calling it natively in C interrupts as expected
[01:31:06] dorei: aint signals blocked on a per process basis?
[01:31:10] dorei: sigmask or smt like that
[01:31:21] eam: dorei: yes
[01:31:42] rawrwx: has joined #ruby
[01:33:41] luckyme: has joined #ruby
[01:33:57] eam: fryguy: on my system at least, an ffi call doesn't seem to block SIGINT
[01:34:16] eam: from libc, attach_function 'sleep', [:int], :int then call it and send a signal
[01:34:20] sunya7a: has joined #ruby
[01:34:52] arescorpio: has joined #ruby
[01:34:53] eam: the other interesting question is: are threads involved?
[01:38:26] fryguy: eam: so the specific wait_for_event function i'm using is from xcb
[01:38:37] fryguy: let me see if I can put together a very small proof of concept
[01:38:37] freerobby: has joined #ruby
[01:38:53] mfqr: has left #ruby: ()
[01:38:57] eam: fryguy: https://gist.github.com/eam/20f04e1aa17bab8c3775
[01:39:03] Bellthoven: has joined #ruby
[01:39:08] eam: does this POC work for you in terms of not blocking sigint?
[01:39:16] gigetoo: has joined #ruby
[01:39:35] maikowblue: has joined #ruby
[01:39:43] eam: fryguy: best thing is to just strace the damn thing and see what it's setting up/doing when that signal goes through
[01:39:43] mary5030: has joined #ruby
[01:40:48] fryguy: eam: hrmm, yah yours works
[01:42:27] Arnvald: has joined #ruby
[01:43:31] arooni: has joined #ruby
[01:43:53] fryguy: eam: https://gist.github.com/bryanalves/dae036c0159768732ecf
[01:46:20] eam: fryguy: I can ^C it
[01:46:26] samuelkadolph: has joined #ruby
[01:46:44] fryguy: weird, I can't
[01:48:04] fryguy: what kind of machine/OS are you on/
[01:48:24] eam: centos6
[01:48:32] eam: ruby 2.0.0p353
[01:48:55] eam: now, I don't have an X server running so maybe I'm never connecting to whatever it is you're blocking on
[01:49:08] fryguy: ah, that's probably it
[01:50:36] deanj: has joined #ruby
[01:50:56] kobain: has joined #ruby
[01:51:30] deanj: Hey all, does anyone have experience w/ accessing a sqlite database using WAL mode using the sqlite3 ruby gem? We're running into "database file is locked or corrupted" as the error. Any help would be much appreciated! :)
[01:51:52] deanj: If it matters, we're accessing the sqlite file over NFS.
[01:52:04] s00pcan: has joined #ruby
[01:53:38] davedev24: has joined #ruby
[01:55:26] apipkin: has joined #ruby
[01:55:32] braderhart: has joined #ruby
[01:55:32] halfdan: has joined #ruby
[01:55:33] jds: has joined #ruby
[01:55:33] alxndr: has joined #ruby
[01:55:38] pmarreck: has joined #ruby
[01:55:39] bcavileer_: has joined #ruby
[01:55:42] c355E3B: has joined #ruby
[01:55:50] mjc_: has joined #ruby
[01:55:54] crdpink: has joined #ruby
[01:55:57] iamdevnul: has joined #ruby
[01:56:02] andersh: has joined #ruby
[01:56:16] robertmay: has joined #ruby
[01:56:36] sfr^: has joined #ruby
[01:56:57] elton: has joined #ruby
[02:00:47] crdpink: has joined #ruby
[02:00:51] fryguy: this seems to work: https://gist.github.com/bryanalves/0d83f7fc97b29fb402e6
[02:00:59] fryguy: move the select to ruby
[02:01:41] SenpaiSilver_: has joined #ruby
[02:01:55] maloik: has joined #ruby
[02:04:20] _SenpaiSilver_: has joined #ruby
[02:06:35] dmcp: has joined #ruby
[02:07:13] kalzz: has joined #ruby
[02:08:05] diego1: has joined #ruby
[02:09:28] dlitvak: has joined #ruby
[02:09:45] rickmasta: has joined #ruby
[02:10:52] kobain: has joined #ruby
[02:10:53] lyoshajapan: has joined #ruby
[02:10:54] diego1: has joined #ruby
[02:11:05] dlitvak: has joined #ruby
[02:11:23] lyoshajapan: has joined #ruby
[02:11:47] kobain: has joined #ruby
[02:12:39] kobain: has joined #ruby
[02:13:30] kobain: has joined #ruby
[02:14:28] kobain: has joined #ruby
[02:16:05] kobain: has joined #ruby
[02:17:43] kies: has joined #ruby
[02:19:29] devoldmx: has joined #ruby
[02:19:42] kalz: has joined #ruby
[02:21:19] tenderlove: has joined #ruby
[02:21:59] tenderlove: has joined #ruby
[02:25:00] SenpaiSilver_: has joined #ruby
[02:25:14] Rodya_: has joined #ruby
[02:25:14] kobain: has joined #ruby
[02:26:35] kobain: has joined #ruby
[02:27:25] kobain: has joined #ruby
[02:28:16] kobain: has joined #ruby
[02:29:08] Arnvald_: has joined #ruby
[02:30:41] bmalum: has joined #ruby
[02:30:49] baweaver: has joined #ruby
[02:31:34] ramadoka: has joined #ruby
[02:33:05] duncannz: has joined #ruby
[02:36:52] sneakerhax: has joined #ruby
[02:37:58] maloik: has joined #ruby
[02:39:08] sh4d0wD: has joined #ruby
[02:39:50] s00pcan: has joined #ruby
[02:41:16] Arnvald: has joined #ruby
[02:42:21] DeXterbed: has joined #ruby
[02:43:28] iateadonut: has joined #ruby
[02:46:23] govg: has joined #ruby
[02:46:34] crdpink: has joined #ruby
[02:46:38] dlitvak: has joined #ruby
[02:47:48] diegoviola: has joined #ruby
[02:49:30] Arnvald: has joined #ruby
[02:50:08] Bloomer: has joined #ruby
[02:51:45] dmcp: has joined #ruby
[02:52:01] tenderlove: has joined #ruby
[02:52:03] devoldmx: has joined #ruby
[02:52:36] passerine: has joined #ruby
[02:52:37] tenderlove: has joined #ruby
[02:53:08] tjbiddle: has joined #ruby
[02:53:24] lyoshajapan: has joined #ruby
[02:55:34] mahk_: has joined #ruby
[03:00:37] favadi: has joined #ruby
[03:01:58] ICantCook: has joined #ruby
[03:02:22] _SenpaiSilver_: has joined #ruby
[03:02:22] artX000: has joined #ruby
[03:05:55] Bloomer: has joined #ruby
[03:07:00] diegoviola: has joined #ruby
[03:08:54] baweaver: has joined #ruby
[03:12:10] cwong_on_irc: has joined #ruby
[03:14:27] lyoshajapan: has joined #ruby
[03:14:55] lyoshajapan: has joined #ruby
[03:16:46] lyoshaja_: has joined #ruby
[03:17:21] lyoshaja_: has joined #ruby
[03:21:10] Aasha: has joined #ruby
[03:26:17] kobain: has joined #ruby
[03:26:18] DeXterbed: has joined #ruby
[03:27:00] RegulationD: has joined #ruby
[03:28:38] maxscam1: has joined #ruby
[03:29:56] maxscam1: how do i pass a block in the context of an object, i.e. 2.send { puts self.class } # returning Integer
[03:30:26] mclong: has joined #ruby
[03:31:38] bmalum: has joined #ruby
[03:32:20] Nilium: instance_eval or instance_exec
[03:33:25] maxscam1: Nilium: thanks got i
[03:33:28] lubarch: has joined #ruby
[03:36:36] mclong: has joined #ruby
[03:37:20] rickmasta: has joined #ruby
[03:38:14] mahk_: has joined #ruby
[03:39:14] favadi: has joined #ruby
[03:44:21] rawrwx: has joined #ruby
[03:46:34] tenderlove: has joined #ruby
[03:51:25] kp666: has joined #ruby
[03:52:50] devoldmx: has joined #ruby
[03:55:49] bigmac: has joined #ruby
[03:56:50] davedev24: has joined #ruby
[03:57:22] NeverDie: has joined #ruby
[03:57:49] BTRE: has joined #ruby
[03:58:17] elton: has joined #ruby
[03:58:39] dfinninger: has joined #ruby
[03:58:48] davedev24: has joined #ruby
[03:59:40] maneco: has joined #ruby
[04:00:17] devoldmx: has joined #ruby
[04:00:28] dopie: has joined #ruby
[04:02:34] davedev24: has joined #ruby
[04:07:14] rickmasta: has joined #ruby
[04:08:23] rakm: has joined #ruby
[04:08:35] passerine: has left #ruby: ("Leaving")
[04:09:46] fryguy: has left #ruby: ()
[04:09:57] sankaber: has joined #ruby
[04:11:55] droptone: Question: Has anyone present ever dumped a database to a YAML-formatted flat file?
[04:12:11] Radar: Probably.
[04:12:14] droptone: I"m using ActiveRecord with my ruby script and I want to dump a database to a YAML flat file.
[04:12:20] droptone: In a format that can be restored.
[04:12:27] Radar: Why not dump it to SQL?
[04:12:32] droptone: Although it doesn't have to be restored directly to the DB.
[04:12:56] droptone: Well, yes, I suppose I could just dump the table entirely, but as it's user-specific, I'm not sure the SQL syntax for dumping user-specific sections.
[04:13:19] droptone: For example, I have a Profile table, and I want to, in this example, dump the Profile entry for one specific user to a flat file.
[04:13:24] maxscam1: you could iterate through your records and and store each record to a yaml
[04:13:32] droptone: I could just iterate through all values, create a hash, dump the hash, etc.
[04:13:43] droptone: maxscam1: Yes, not a bad idea.
[04:14:18] maxscam1: droptone: i didn't realize that when i was looking into how to do this ...
[04:14:39] droptone: Say a user had many books, and books belongs_to :user, and as I'm leveraging ActiveRecord as my ORM I'm able to call sub-tables as methods, such as user = User.first; user.books.each do |book|
[04:15:00] droptone: I could simply iterate through. That might be the best bet.
[04:15:16] droptone: I could just build a hash and dump it via YAML.dump() as I do with other hashes.
[04:16:47] droptone: I've never attempted to restore a hash I dump via YAML.dump(), I assume it's fairly seamless to load and access that data?
[04:17:25] braincrash: has joined #ruby
[04:18:13] akem: has joined #ruby
[04:18:44] droptone: right, I assume it works as expected for reconstructing data?
[04:20:13] droptone: for example, say I have a simple array, my_arr = [];
[04:20:30] droptone: and then I simply dump digits, my_arr << 1; my_arr << 2; etc
[04:20:34] lyoshajapan: has joined #ruby
[04:20:54] droptone: and then I YAML.dump() my_arr
[04:21:26] droptone: Never mind, I'm sure it works as expecgted.
[04:22:08] dlitvak: has joined #ruby
[04:23:49] chipotle: has joined #ruby
[04:24:00] QualityAddict: has joined #ruby
[04:24:24] DeXterbed: has joined #ruby
[04:25:24] jgt4: has joined #ruby
[04:25:31] qiukun: has joined #ruby
[04:28:47] zast: has joined #ruby
[04:30:13] lyoshajapan: has joined #ruby
[04:32:15] bmalum: has joined #ruby
[04:32:48] gix: has joined #ruby
[04:33:08] rawrwx: has joined #ruby
[04:33:34] ICantCook: has joined #ruby
[04:34:39] diego1: has joined #ruby
[04:34:43] diego1: has joined #ruby
[04:36:05] lyoshajapan: has joined #ruby
[04:36:07] chipotle: has joined #ruby
[04:40:33] tenderlove: has joined #ruby
[04:40:59] tenderlove: has joined #ruby
[04:41:04] djbkd: has joined #ruby
[04:41:31] maloik: has joined #ruby
[04:45:39] RichPeterson: has joined #ruby
[04:45:44] RichPeterson: When is your step daughter ready to have sex?
[04:45:46] RichPeterson: My step-daughter turned twelve recently. She's very mature and developed for her age, and very pretty I might add. I would love to turn her into a woman. I browsed through her internet history and there was a lot of porn in it. I want to be her first so I can teach her the proper ways of having sex, so she won't make mistakes with others and catch sexually transmitted diseases.
[04:48:15] droptone: What is this odd phenomenon where users come into the Ruby freenode channels and start talking about various sexual topics?
[04:48:21] droptone: I realize they're trolls but it seems unusually consistent.
[04:48:28] droptone: ouch, old boy got K-Lined.
[04:48:33] haylon: has joined #ruby
[04:50:24] haylon: has left #ruby: ()
[04:50:25] sucks: has joined #ruby
[04:53:48] bronson: has joined #ruby
[04:55:58] amincd: has joined #ruby
[04:56:29] amincd: >> "hello\r\nworld".tr("\r", "")
[04:56:30] ruboto: amincd # => "hello\nworld" (https://eval.in/483022)
[04:57:12] hahuang65: has joined #ruby
[04:57:25] krzkrzkrz: has joined #ruby
[04:57:32] berserk_ren: has joined #ruby
[04:57:37] amincd: doesn't str#tr replace every instance of each character in the first argument with the corresponding character in the second? If so, why isn't the backslash before 'n' eliminated?
[04:59:11] elton: has joined #ruby
[04:59:20] maneco: has left #ruby: ("WeeChat 1.3")
[05:00:02] amincd: are the '\r' and '\n' considered a single character each? or something like that
[05:00:53] ramfjord: has joined #ruby
[05:00:58] radgeRayden_: has joined #ruby
[05:02:11] maloik: has joined #ruby
[05:06:38] devbug: has joined #ruby
[05:08:54] qiukun: has joined #ruby
[05:13:16] tjbiddle: has joined #ruby
[05:14:52] sankaber: has joined #ruby
[05:16:46] amincd: the explanation for str#tr found here isn't very clear to me: http://ruby-doc.org/core-2.2.3/String.html#method-i-tr
[05:16:48] zotherstupidguy: has joined #ruby
[05:16:51] zotherstupidguy: has joined #ruby
[05:17:19] amincd: What do the </code> and <code> signify?
[05:18:39] darkf: has joined #ruby
[05:22:02] grill: has joined #ruby
[05:22:48] arup_r: has joined #ruby
[05:22:50] maloik: has joined #ruby
[05:25:41] rickmasta: has joined #ruby
[05:27:50] elton: has joined #ruby
[05:27:56] RegulationD: has joined #ruby
[05:28:26] chipotle: has joined #ruby
[05:30:08] PlasmaStar: has joined #ruby
[05:30:52] bronson: has joined #ruby
[05:31:52] pwnd_nsfw: has joined #ruby
[05:33:40] christia1: has joined #ruby
[05:33:48] colegatron: has joined #ruby
[05:34:54] tenderlove: has joined #ruby
[05:35:27] tenderlove: has joined #ruby
[05:35:43] dfinninger: has joined #ruby
[05:38:25] techsethi_: has joined #ruby
[05:38:46] astrobun_: has joined #ruby
[05:39:56] DeXterbed: has joined #ruby
[05:40:02] S01780: has joined #ruby
[05:40:17] qiukun: has joined #ruby
[05:40:32] S01780: Can someone help me understand the error here? https://www.irccloud.com/pastebin/AMUJ58Pz/
[05:40:33] ruboto: S01780, we in #ruby do not like irccloud.com, I reposted your paste to gist for you: https://gist.github.com/bce866be36503d5d9795
[05:40:33] ruboto: irccloud.com has no syntax highlighting, distracting formatting and loads slowly for most.
[05:41:13] S01780: Thanks. Sorry.
[05:42:25] S01780: I'm running Ubuntu 14.04, PostgreSQL 9.3, RoR and I've not been able to get this bundle installed for hours. :(
[05:42:43] qiukun: has joined #ruby
[05:43:32] maloik: has joined #ruby
[05:43:45] mary5030: has joined #ruby
[05:44:15] techsethi_: has joined #ruby
[05:45:40] agent_white: has joined #ruby
[05:48:29] S01780: Anyone besides the bot able to help? Haha.
[05:50:03] techsethi: has joined #ruby
[05:50:41] pontiki: S01780: what have you done about line 7 and 8?
[05:51:15] favadi: has joined #ruby
[05:51:37] S01780: Nothing, pontiki, I'm not sure what it's missing / wants me to do?
[05:51:50] bronson: has joined #ruby
[05:52:17] pontiki: "You need to install postgresql-server-dev-X.Y" you need to install postgresql-server-dev-9.3
[05:53:41] S01780: Oh, yeah, I did that.
[05:53:47] S01780: Still same error.
[05:55:41] akem: has joined #ruby
[05:56:38] tjad: has joined #ruby
[05:56:51] pontiki: try this: http://stackoverflow.com/a/6040822/742446
[05:56:55] pontiki: i'm just googling around
[05:59:06] qiukun: has joined #ruby
[05:59:08] S01780: Righto, let me run that
[05:59:46] techsethi: has joined #ruby
[06:01:37] S01780: Well pontiki, it got me one step farther. :( https://gist.github.com/anonymous/f5c74d6f926eb11fc296
[06:02:10] bmalum: has joined #ruby
[06:02:57] pontiki: maybe you should do the googling around
[06:03:45] pontiki: or look at line 26
[06:04:12] maloik: has joined #ruby
[06:04:17] pontiki: it's trying to install into a system level directory, not a user-accessible directory
[06:05:53] Coldblackice: has joined #ruby
[06:06:06] ramfjord: has joined #ruby
[06:07:41] lyoshajapan: has joined #ruby
[06:08:00] mooe: has joined #ruby
[06:08:27] troys: has joined #ruby
[06:09:07] bmalum: has joined #ruby
[06:09:33] ur5us: has joined #ruby
[06:11:00] S01780: Right, I am googling, with little luck, lol
[06:11:30] yfeldblum: has joined #ruby
[06:11:42] pontiki: do you see the error on line 26, S01780 ?
[06:13:32] maloik: has joined #ruby
[06:13:39] S01780: Sorry, I'm really new at this.
[06:13:54] pontiki: new at unix?
[06:14:21] S01780: Yes, and then I ended up trying to do this Ruby deployment and that's even worse.
[06:14:37] S01780: Access denied, how do I fix the permission?
[06:15:07] pontiki: deployment is a task that requires a great deal of understanding of unix/linux
[06:16:17] S01780: Amen, pontiki. I'm about to start university classes for IT but this I'm just trying to get done.
[06:16:40] pontiki: you need to go study unix system admin a bit more, first, i think
[06:16:59] pontiki: this isn't a "just a couple minor problems" thing
[06:19:53] qiukun_: has joined #ruby
[06:21:53] S01780: I get the basic concepts, and the code is written on github.
[06:22:16] S01780: Just need to bumble around a bit in Google and with nice people like you, lol.
[06:24:47] pontiki: it's not the code
[06:24:57] pontiki: is the system you're provisioning to run your code
[06:25:39] nertzy: has joined #ruby
[06:26:00] pontiki: if you don't yet understand about file system permissions, that's telling me you have a great deal to learn yet.
[06:26:13] pontiki: i'm not trying to be harsh, although it does sound like it, sorry
[06:26:14] DeXterbed: has joined #ruby
[06:26:18] jgt4: has joined #ruby
[06:26:28] pontiki: it's just, this isn't something i can help with over irc
[06:27:27] pontiki: it's like, when i learned this stuff, i read huge volumes of books, manuals, poored over man pages, ...
[06:27:29] qiukun: has joined #ruby
[06:27:47] pontiki: worked with other people a lot for help, *in person*
[06:28:56] tenderlove: has joined #ruby
[06:29:36] tenderlove: has joined #ruby
[06:30:21] otherj: has joined #ruby
[06:33:02] MEATCHICKEN: has joined #ruby
[06:33:17] MEATCHICKEN: ruby code order matters
[06:33:32] MEATCHICKEN: I can't use a method in a single-file until it is defined?
[06:33:38] MEATCHICKEN: doesn't ruby read the entire file before executing?
[06:34:36] darkxploit: has joined #ruby
[06:35:33] elton: has joined #ruby
[06:37:05] S01780: pontiki: You're not, and you're absolutely right.
[06:37:05] CloCkWeRX: has left #ruby: ()
[06:37:10] S01780: And I appreciate it.
[06:38:33] aryaching: has joined #ruby
[06:38:51] lemur: meatchicken: that's kinda what it means to be an interpreted language mate.
[06:39:47] favadi: has joined #ruby
[06:40:40] pontiki: hey, lemur :)
[06:41:00] lemur: probably shipping off to work on more hackathon stuff
[06:43:05] Oog: has joined #ruby
[06:44:23] timonv: has joined #ruby
[06:44:23] lurch_: has joined #ruby
[06:44:32] rawrwx: has joined #ruby
[06:44:59] aryaching: has joined #ruby
[06:47:13] davedev24: has joined #ruby
[06:47:56] last_staff: has joined #ruby
[06:48:10] SOLDIERz: has joined #ruby
[06:48:48] sucks: has joined #ruby
[06:51:46] qiukun: has joined #ruby
[06:51:58] lyoshajapan: has joined #ruby
[06:52:21] passerine: has joined #ruby
[06:53:37] tagrudev: has joined #ruby
[06:55:54] qiukun: has joined #ruby
[06:56:54] solars: has joined #ruby
[06:57:35] nbdy: has joined #ruby
[06:57:47] krz: has joined #ruby
[06:58:18] ur5us: has joined #ruby
[06:59:58] qiukun: has joined #ruby
[07:00:09] rawrwx: has joined #ruby
[07:00:10] ibouvousaime: has joined #ruby
[07:00:19] tenderlove: has joined #ruby
[07:00:29] lemur: has joined #ruby
[07:01:02] Feyn: has joined #ruby
[07:02:10] kmckelvi1: has joined #ruby
[07:02:31] sandstrom: has joined #ruby
[07:03:52] aganov: has joined #ruby
[07:06:14] baweaver_: has joined #ruby
[07:07:13] tjad: has joined #ruby
[07:07:54] elton: has joined #ruby
[07:08:13] agit0: has joined #ruby
[07:13:21] qiukun: has joined #ruby
[07:14:55] qiukun: has joined #ruby
[07:16:20] elton: has joined #ruby
[07:19:59] toretore: has joined #ruby
[07:20:39] arup_r: has joined #ruby
[07:20:43] yardenbar: has joined #ruby
[07:22:45] qiukun: has joined #ruby
[07:24:08] aryaching: has joined #ruby
[07:25:23] xet7: has joined #ruby
[07:27:45] troulouliou_div2: has joined #ruby
[07:28:01] agent_white: has joined #ruby
[07:28:01] howdoi: has joined #ruby
[07:28:38] RegulationD: has joined #ruby
[07:32:10] lyoshajapan: has joined #ruby
[07:33:35] dlitvak: has joined #ruby
[07:35:24] qiukun: has joined #ruby
[07:36:18] trautwein: has joined #ruby
[07:37:53] qiukun: has joined #ruby
[07:38:39] tjbiddle: has joined #ruby
[07:41:27] elton: has joined #ruby
[07:42:24] emilkarl: has joined #ruby
[07:44:11] lyoshajapan: has joined #ruby
[07:45:17] scepticulous: has joined #ruby
[07:45:52] Coldblackice: has joined #ruby
[07:47:03] qiukun: has joined #ruby
[07:47:05] brunto: has joined #ruby
[07:49:48] qiukun: has joined #ruby
[07:50:31] cscheib: has joined #ruby
[07:52:26] andikr: has joined #ruby
[07:52:31] qiukun: has joined #ruby
[07:55:25] cscheib: is there an easy way to convert all elements of an array (or an array's subarrays) from string to integer? I'm pretty sure I could use map... but my mian difficultly is that the array could be simple or nested (but, only one layer deep). Should I just test for elements to be an array object, and use anif statement?
[07:55:29] djdb: has joined #ruby
[07:55:36] cscheib: code here: https://gist.github.com/cscheib/0d879d222f3b0a77b871
[07:55:45] cscheib: (it's an exercise from exercism.io)
[07:57:00] cscheib: paste includes code (series.rb), test (series_test.rb), test output (command_output.txt), and README from the exercise
[07:57:01] ap4y: cscheib: check Array#flatten
[07:57:17] ibouvousaime: has joined #ruby
[07:58:17] tjbiddle: has joined #ruby
[07:58:19] codecop: has joined #ruby
[07:59:19] cscheib: the result still has to be multiple layers, but that loosened something in my brain... I can do the conversion earlier in the method pipe, before I output an enumerator
[07:59:45] cscheib: now I only fail 2 tests, and those are just error checking
[08:00:17] SCHAAP137: has joined #ruby
[08:02:08] krz: has joined #ruby
[08:03:07] ap4y: I'm not sure how much levels you have to handle but for the test from the gist something like .map { |a| a.map(&:to_i) } should work
[08:03:54] cscheib: ap4y: I added .map{&:to_i} after @series.chars, that worked
[08:04:35] maloik: has joined #ruby
[08:04:37] apeiros: cscheib: recursive mapping
[08:05:10] apeiros: mapper = ->(v) { v.is_a?(Array) ? v.map(&mapper) : Integer(v) }; ary.map(&mapper)
[08:05:13] apeiros: cscheib: ^
[08:05:19] headius: has joined #ruby
[08:05:38] kao: has joined #ruby
[08:06:19] steffkes: has joined #ruby
[08:06:19] steffkes: has joined #ruby
[08:06:24] ap4y: that's cool, wonder if tco works with this
[08:07:30] rtl: has joined #ruby
[08:07:45] joevandyk: has joined #ruby
[08:08:27] cscheib: apeiros: thanks. That's similar to what I was thinking of doing, but more elegantly coded. Wasn't sure if there was an existing method hiding in Enumerables or something that already existed
[08:08:53] cscheib: luckily, this scenario didn't require recursion, because i forgot I had a "flat" array earlier on in the pipe
[08:10:00] jgt4: has joined #ruby
[08:10:52] qiukun_: has joined #ruby
[08:11:20] aufi: has joined #ruby
[08:11:30] imajes: has joined #ruby
[08:11:33] redondos: has joined #ruby
[08:11:43] arup_r: has joined #ruby
[08:14:01] brunto: has joined #ruby
[08:14:15] jas02: has joined #ruby
[08:14:23] kmckelvi1: has joined #ruby
[08:14:47] callumacrae: has joined #ruby
[08:15:23] cscheib: also... when I'm working in irb... is there a way to restart the session or reload all of the requires?
[08:15:24] qiukun: has joined #ruby
[08:15:51] cscheib: rather than quit, restart irb, retype require_relative 'blah'
[08:16:52] ap4y: not really a restart but something like exec($0) will work
[08:16:59] agit0: has joined #ruby
[08:18:46] iateadonut: has joined #ruby
[08:19:14] cscheib: that seemed to help, but clears up-arrow history... any way that doesn't clear history
[08:19:28] cscheib: (still an improvement, but I'd like to reduce typing/errors re-typing)
[08:19:56] lkba_: has joined #ruby
[08:20:46] wjimenez5271: has joined #ruby
[08:21:16] arup_r: has joined #ruby
[08:22:29] CrazyEddy: has joined #ruby
[08:23:14] ap4y: I don't there is a way to reset loaded scrypt. you can try to solve issue with history by using pry. it preserves command history inbetween sessions
[08:23:22] ap4y: don't think*
[08:23:33] Coldblackice: has joined #ruby
[08:23:34] ap4y: and script* :/
[08:23:39] cscheib: I just heard about pry the other day, haven't messed with it yet
[08:24:20] ap4y: from the higher level it works similar to any other repl but you can get nice features from it like show-doc and show-source
[08:24:38] tenderlove: has joined #ruby
[08:24:41] devbug: has joined #ruby
[08:25:22] speakingcode: has joined #ruby
[08:25:48] qiukun: has joined #ruby
[08:27:06] jbrhbr: has joined #ruby
[08:27:49] blaxter: has joined #ruby
[08:29:33] TomyWork: has joined #ruby
[08:30:01] arup_r: has joined #ruby
[08:30:18] sandstrom: has joined #ruby
[08:30:28] tjbiddle: has joined #ruby
[08:33:15] lyoshajapan: has joined #ruby
[08:34:10] cscheib: certainly looks useful
[08:34:58] skade: has joined #ruby
[08:36:16] arup_r: has joined #ruby
[08:36:59] apeiros: cscheib: well, you can $LOADED_FEATURES.grep(/\.rb$/).each do |f| load f end
[08:37:23] apeiros: $LOADED_FEATURES == $" if you want to type less. though, IMO rather add a command to irbrc/pryrc and write it properly
[08:39:34] qiukun: has joined #ruby
[08:41:01] tjbiddle: has joined #ruby
[08:41:12] qiukun: has joined #ruby
[08:43:17] Tempesta: has joined #ruby
[08:43:53] wmdrossard: has joined #ruby
[08:45:55] Hounddog: has joined #ruby
[08:47:29] tjbiddle: has joined #ruby
[08:48:26] jgt4: has joined #ruby
[08:49:14] Ishido: has joined #ruby
[08:53:33] nateberkope: has joined #ruby
[08:53:39] vdamewood: has joined #ruby
[08:53:44] djbkd__: has joined #ruby
[08:54:38] astrobun_: has joined #ruby
[08:55:16] diegoviola: has joined #ruby
[08:56:42] cornerma1: has joined #ruby
[08:56:45] tesuji: has joined #ruby
[08:59:21] senayar: has joined #ruby
[08:59:21] senayar: has joined #ruby
[08:59:49] krzkrz: has joined #ruby
[09:00:51] Bodhi: has joined #ruby
[09:00:59] Xentil: has joined #ruby
[09:02:05] yfeldblum: has joined #ruby
[09:02:37] Arnvald: has joined #ruby
[09:03:33] joonty: has joined #ruby
[09:03:48] lyoshajapan: has joined #ruby
[09:04:54] chipotle: has joined #ruby
[09:05:21] shevy: hello undeadra
[09:06:40] ramfjord: has joined #ruby
[09:07:34] drptbl: has joined #ruby
[09:08:07] Bodhi: is this a good place to find people to practice with?
[09:08:26] flughafen: hey shevy are you broken down today shevy
[09:11:46] symm-: has joined #ruby
[09:12:36] HANJIN: has joined #ruby
[09:13:54] tomphp: has joined #ruby
[09:14:15] DavidDudson: has joined #ruby
[09:17:19] bruce_lee: has joined #ruby
[09:18:39] tenderlove: has joined #ruby
[09:19:18] c0m0: has joined #ruby
[09:19:22] tenderlove: has joined #ruby
[09:21:07] davedev24: has joined #ruby
[09:22:23] Macaveli: has joined #ruby
[09:22:55] Arnvald: has joined #ruby
[09:23:52] HANJIN: i had an error from example code about thread, please check what is the problem - https://gist.github.com/OLouis/9d188e0dd05ea2ff11eb
[09:23:54] HANJIN: has left #ruby: ()
[09:24:57] Macaveli: Is there a default ruby method that removes Word Bullets form a string "??? Zefzefz ??? Zefzefze Zef zefz" ?
[09:25:16] darkxploit: has joined #ruby
[09:27:45] HANJIN: has joined #ruby
[09:29:20] RegulationD: has joined #ruby
[09:30:01] Lap64: has joined #ruby
[09:31:08] iszak: has joined #ruby
[09:31:09] iszak: has joined #ruby
[09:31:21] qiukun: has joined #ruby
[09:31:37] dmolina: has joined #ruby
[09:31:55] apeiros: Macaveli: gsub
[09:31:56] renderful: has joined #ruby
[09:32:09] Macaveli: yes but it has to be for all non UTF-8 chars
[09:32:10] apeiros: though, nowadays String#delete might do too
[09:32:17] Macaveli: so I've made teh following
[09:32:25] Macaveli: https://gist.github.com/DelawareConsulting/12adc0e2cf0c5bf45f22
[09:32:28] Macaveli: but no worky
[09:32:34] Macaveli: value = value.encode(Encoding.find('ISO-8859-1'), encoding_options)
[09:32:35] Macaveli: value = value.encode('UTF-8')
[09:33:36] apeiros: calling that method "strip_tabs" is almost ridiculous :-|
[09:33:57] Macaveli: well it still doesn't work
[09:34:13] Macaveli: I need to remove tabs / the bullets and stuff like that
[09:34:19] Macaveli: but keep " ?? ' ( ?? ! ?? ??
[09:34:37] apeiros: >> "??? Zefzefz ??? Zefzefze Zef zefz".delete("???")
[09:34:38] ruboto: apeiros # => " Zefzefz Zefzefze Zef zefz" (https://eval.in/483169)
[09:34:44] apeiros: delete works fine regarding your first question
[09:34:59] apeiros: as for your method: I have the slight feeling that you're doing this thing quite wrong???
[09:35:24] apeiros: >> "??? Zefzefz ??? Zefzefze Zef zefz".gsub("???", '') # works too
[09:35:25] ruboto: apeiros # => " Zefzefz Zefzefze Zef zefz" (https://eval.in/483170)
[09:36:14] HANJIN: has left #ruby: ()
[09:37:34] hirmos: has joined #ruby
[09:37:35] chthon: has joined #ruby
[09:37:57] futilegames: has joined #ruby
[09:38:00] Macaveli: that's too specific
[09:38:04] Macaveli: we need more global
[09:38:11] Macaveli: there are dozens of such characters
[09:38:38] colli5ion: has joined #ruby
[09:38:47] apeiros: Macaveli: then ask your question accordingly.
[09:39:01] apeiros: you asked for "bullets".
[09:40:38] Macaveli: sorry apeiros
[09:40:41] Macaveli: for the confussion
[09:41:24] apeiros: Macaveli: note that I don't consider "this is too specific" as a sufficient followup.
[09:42:02] Macaveli: alright i will
[09:42:10] Macaveli: also created an SO topic on this
[09:42:41] Macaveli: http://stackoverflow.com/questions/34198300/clean-tabs-crlf-word-bullets-but-keep-french-characters-in-rails
[09:42:49] Macaveli: i need to go now but feel free to still help :)
[09:43:27] shredding: has joined #ruby
[09:43:28] apeiros: Mac|AFK: the way you deal with the encoding is worrying.
[09:43:43] apeiros: if you have proper/clean utf-8 strings, you can probably use \p classes
[09:44:06] apeiros: though, your whitelist is weird too. keep "??"?
[09:44:40] apeiros: I think you'll have to elaborate on why you have this problem and why you do this weird encoding dance.
[09:45:42] apeiros: and there's a potential that you'll have to provide an actual white- or blacklist, not just hand-wavy "characters like this"
[09:45:46] qiukun: has joined #ruby
[09:47:00] rodfersou: has joined #ruby
[09:49:50] passerine: has left #ruby: ("Leaving")
[09:49:57] qiukun: has joined #ruby
[09:50:04] tenderlove: has joined #ruby
[09:50:10] hirmos: has joined #ruby
[09:51:17] Mac|AFK: because the backend
[09:51:26] Mac|AFK: can't handle these kind of symbols
[09:51:29] Mac|AFK: the back end is sap
[09:51:35] Mac|AFK: so we need to filtere these
[09:52:02] shredding_: has joined #ruby
[09:52:18] apeiros: so your front-end system can handle them but your back-end can't. why do you allow them in the front-end then?
[09:53:25] apeiros: as for how to replace/remove them: you can remove all of them using String#delete/String#gsub. But you'll not get around knowing which they are.
[09:55:02] conta: has joined #ruby
[09:55:41] apeiros: and note that you're lucky rails' squish! does not follow ruby convention. when you use ! methods, you do *not* reassign the result. most ruby methods return nil when nothing changed.
[09:55:53] apeiros: >> "hello".gsub!("X", "")
[09:55:54] ruboto: apeiros # => nil (https://eval.in/483196)
[09:56:42] ibouvousaime: has joined #ruby
[09:57:16] Arnvald: has joined #ruby
[09:57:49] bmalum: has joined #ruby
[09:59:03] triangles: has joined #ruby
[10:01:56] akahn: has joined #ruby
[10:02:04] knowtheory: has joined #ruby
[10:02:11] devbug: has joined #ruby
[10:03:09] boxrick1: has joined #ruby
[10:03:16] jhill: has joined #ruby
[10:04:34] ec: has joined #ruby
[10:06:25] qiukun: has joined #ruby
[10:08:00] hirmos: has joined #ruby
[10:11:30] solars: has joined #ruby
[10:11:48] TheHodge: has joined #ruby
[10:12:00] qiukun: has joined #ruby
[10:13:36] muttnchop: has joined #ruby
[10:14:04] Pumukel: has joined #ruby
[10:14:13] qiukun: has joined #ruby
[10:15:11] platzhirsch: has joined #ruby
[10:17:12] anisha: has joined #ruby
[10:20:11] shevy: flughafen hah only a bit tired but not broken
[10:21:04] DukeDave: has joined #ruby
[10:22:12] lkba: has joined #ruby
[10:22:51] hirmos: has joined #ruby
[10:23:12] Bloomer: has joined #ruby
[10:23:54] Peg-leg: has joined #ruby
[10:26:11] tvw: has joined #ruby
[10:26:49] baweaver: has joined #ruby
[10:26:50] kmckelvi1: has joined #ruby
[10:29:19] bronson: has joined #ruby
[10:29:52] jschmid: has joined #ruby
[10:30:53] Tempesta: has joined #ruby
[10:31:03] kao: has joined #ruby
[10:32:13] zenspider: has joined #ruby
[10:34:02] iateadonut: has joined #ruby
[10:34:37] huyderman: has joined #ruby
[10:37:21] sandstrom: has joined #ruby
[10:39:21] puria: has joined #ruby
[10:40:01] skade: has joined #ruby
[10:41:51] circ-user-mgcmJ: has joined #ruby
[10:43:17] zarubin: has joined #ruby
[10:43:32] tenderlove: has joined #ruby
[10:43:55] casadei: has joined #ruby
[10:46:45] elton: has joined #ruby
[10:47:29] weckl: has joined #ruby
[10:50:11] ibouvousaime: has joined #ruby
[10:53:11] nfk|laptop: has joined #ruby
[10:53:12] marr: has joined #ruby
[10:53:14] sleetdrop: has joined #ruby
[10:53:40] hirmos: has joined #ruby
[10:55:18] azgil: has joined #ruby
[10:58:38] qiukun: has joined #ruby
[11:00:44] wireshark: has joined #ruby
[11:02:12] workmad3: has joined #ruby
[11:03:15] skade: has joined #ruby
[11:03:58] platzhirsch: Did you know... you can remove the whitespace in the ternary operator and a method name ending on ?
[11:04:19] platzhirsch: user.available? ? 'Yes' : 'No' === user.available?? 'Yes' : 'No'
[11:05:20] shevy: yeah the ruby parser is scary
[11:05:27] shevy: imagine if we would have got ?.foo??
[11:06:05] shevy: >> %w?yo?.empty?
[11:06:06] ruboto: shevy # => false (https://eval.in/483282)
[11:08:16] adaedra: >> ????::?? # platzhirsch
[11:08:17] ruboto: adaedra # => /tmp/execpad-f6c54341fb39/source-f6c54341fb39:2: warning: string literal in condition ...check link for more (https://eval.in/483285)
[11:08:41] adaedra: ah, it's only a warning.
[11:09:23] shevy: what the heck is ????::??
[11:09:27] platzhirsch: why is ?? => '?'
[11:09:35] ruboto: shevy # => "?" (https://eval.in/483287)
[11:09:39] shevy: well common convention for leading ?
[11:09:43] ruboto: shevy # => "a" (https://eval.in/483288)
[11:09:44] adaedra: character litteral
[11:09:56] adaedra: (yields a string, tho.)
[11:10:05] brunto: has joined #ruby
[11:10:52] adaedra: >> % % % % % #
[11:10:54] ruboto: adaedra # => "%" (https://eval.in/483292)
[11:11:11] adaedra: Where is your god now?
[11:11:47] loren: has joined #ruby
[11:12:10] CloCkWeRX: has joined #ruby
[11:16:10] adaedra: >> % % % % % % % % # we can go deeper
[11:16:11] ruboto: adaedra # => "%" (https://eval.in/483295)
[11:20:20] qiukun: has joined #ruby
[11:21:29] spiman: has joined #ruby
[11:22:42] Bellthoven: has joined #ruby
[11:23:52] Mon_Ouie: has joined #ruby
[11:25:29] c355E3B: has joined #ruby
[11:28:14] daivyk: has joined #ruby
[11:29:24] Spami: has joined #ruby
[11:30:10] RegulationD: has joined #ruby
[11:30:28] dangerousdave: has joined #ruby
[11:32:33] apeiros: adaedra: keep digging!
[11:33:19] casadei: has joined #ruby
[11:33:49] colegatron: has joined #ruby
[11:34:10] adaedra: >> % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % # ok.
[11:34:11] ruboto: adaedra # => "%" (https://eval.in/483302)
[11:35:02] apeiros: adaedra, professional code digger
[11:35:15] adaedra: I'm looking for oil.
[11:37:38] tenderlove: has joined #ruby
[11:38:14] tenderlove: has joined #ruby
[11:38:50] snw: has joined #ruby
[11:39:04] favadi: has joined #ruby
[11:39:40] kmckelvi1: has joined #ruby
[11:42:26] mostlybadfly: has joined #ruby
[11:43:48] zarubin: has joined #ruby
[11:47:44] elton: has joined #ruby
[11:49:40] emilkarl: has joined #ruby
[11:51:00] casadei: has joined #ruby
[11:53:15] craigp: has joined #ruby
[11:59:31] gambl0re: has joined #ruby
[11:59:35] shevy: adaedra thirsty?
[11:59:44] sandstrom: has joined #ruby
[12:00:04] prestorium: has joined #ruby
[12:01:26] anaeem1: has joined #ruby
[12:02:02] nfk|laptop: has joined #ruby
[12:02:25] charliesome: has joined #ruby
[12:03:20] devoldmx: has joined #ruby
[12:04:05] AlexRussia: has joined #ruby
[12:07:11] speakingcode: has joined #ruby
[12:08:24] tenderlove: has joined #ruby
[12:09:05] tenderlove: has joined #ruby
[12:13:05] brunto: has joined #ruby
[12:15:18] krzkrz: has joined #ruby
[12:17:02] emilkarl: has joined #ruby
[12:17:44] tulak: has joined #ruby
[12:21:26] anaeem1: has joined #ruby
[12:22:07] shevy: hey dr. atmosx
[12:23:26] atmosx: shevy: hehehe how r you Shevy?
[12:23:34] atmosx: shevy: I was in Vienna yesterday.
[12:25:28] favadi: has joined #ruby
[12:26:02] shevy: am ok, next week is last exam week, then I can make some grand goal for next year - and have a full year not do it!
[12:26:05] tknz: has joined #ruby
[12:26:16] yfeldblum: has joined #ruby
[12:26:45] jgt4: has joined #ruby
[12:27:42] atmosx: I have no more exams - done. June I will present my thesis. My opponent seems to be better than I thought, he will have some questions about how FFT allow MAFFT (a tool for seq. alignment) to be faster than other tools.
[12:28:08] baweaver: has joined #ruby
[12:28:24] atmosx: so in June I'll go in Brno - Vienna just for vacations \o/
[12:29:52] shevy: I don't think I have ever heard of FFT or MAFFT for alignment ... can you use ruby to show the implementation?
[12:29:57] bronson: has joined #ruby
[12:31:00] zotherstupidguy: has joined #ruby
[12:31:28] atmosx: ruby is just the interface, you just pass the sequences + options, to MAFFT and fetch the results. It's a fast multiple alignment tool, made in Japan.
[12:31:47] atmosx: uses Fast Fourier Transormations to scan multiple matrices at once
[12:32:09] skade: has joined #ruby
[12:35:04] chipotle: has joined #ruby
[12:35:23] shevy: I should have paid more attention to math :(
[12:36:01] shevy: we had to employ some fourier transformation too for electron microscopy datasets of viruses, to get to the 3D models
[12:38:52] InvGhosttt: has joined #ruby
[12:40:13] favadi: has joined #ruby
[12:41:39] dlitvak: has joined #ruby
[12:41:54] adac: has joined #ruby
[12:42:15] adac: Is there a gem that can measure the CPU and memory usage of a piece of code?
[12:42:53] Jackneill: has joined #ruby
[12:43:21] shevy: hmm I remember there was one ... not so long ago... on some blog post but I forgot the name
[12:44:33] grill: has joined #ruby
[12:48:08] lubarch: has joined #ruby
[12:48:54] adac: shevy, If you remember it, let me know :)
[12:49:39] shevy: trying to...
[12:50:06] xfbs: has joined #ruby
[12:51:09] Papierkorb: adac: You can't measure the load of a function. You can however measure the CPU load /over time/, thus you can take a probe before and after, and then get the load from that. Much like you'd measure time it took to run
[12:51:29] adac: Papierkorb, Ok I see, thanks!
[12:53:05] peteyg_: has joined #ruby
[12:53:57] sdothum: has joined #ruby
[12:56:16] InvGhost: has joined #ruby
[12:56:24] casadei: has joined #ruby
[12:56:53] sgambino: has joined #ruby
[12:56:55] KnownSyntax_: has joined #ruby
[12:56:55] KnownSyntax_: has joined #ruby
[12:56:56] Walex: has joined #ruby
[12:57:20] tercenya: has joined #ruby
[12:58:17] joonty: has joined #ruby
[12:58:20] akkad: has joined #ruby
[12:58:30] yonatankoren: has joined #ruby
[12:59:03] Walex: I am using the "gem" module to install Ruby gems, or just the 'command' module with 'gem install' and something strange is happening: the dependencies get downloaded and put in the Ruby gem cache, but don't get unpacked. If I run supposedly the same command in an interactive shell they get unpacked. What should I check or do?
[12:59:22] Walex: that is Ansible modules.
[12:59:34] Olipro: has joined #ruby
[12:59:53] snw: has joined #ruby
[13:00:22] jhass: Walex: compare the output of `gem env` between both environments
[13:01:10] kam270: has joined #ruby
[13:02:44] Walex: jhass: I'll do thanks
[13:03:00] Vitor_: has joined #ruby
[13:03:11] tenderlove: has joined #ruby
[13:03:45] Spami: has joined #ruby
[13:07:59] synthroid: has joined #ruby
[13:08:12] kobain: has joined #ruby
[13:08:35] FooMunki: has joined #ruby
[13:10:49] Pro|: has joined #ruby
[13:14:55] Walex: jhass: the difference is the location of the '.specs'. and this affect runtime too. If I do 'sudo $somegem' the gem does not work complaing that "/usr/lib/ruby/2.1.0/rubygems/dependency.rb:298:in `to_specs': Could not find 'signet' (~> 0.4.5) among 12 total gem(s) (Gem::LoadError)" but is run the same as 'sudo -i $somegem" it works.
[13:15:09] Walex: the jhass the specs path that works is http://paste.ubuntu.com/13893573/
[13:15:54] Walex: jhass: the one that does not work has instead the '$HOME/.spec' in it for the sudo-ing user.
[13:16:14] grill: has joined #ruby
[13:16:24] jhass: do you have --user-install in a gemrc anywhere?
[13:16:54] Walex: jhass: I don't know, but I tried also running with '--no-user-install'.
[13:17:14] Walex: jhass: checking...
[13:17:15] d0nn1e: has joined #ruby
[13:17:19] jhass: gem env would list it under "configuration"
[13:17:25] A124: has joined #ruby
[13:17:35] jhass: but if --no-user-install doesn't help ...
[13:17:48] jhass: idk, just wrap it into /bin/sh -l ?
[13:17:48] kappy: has joined #ruby
[13:18:19] jhass: or go for a non-root install, ideally use a Gemfile and bundle --deployment
[13:18:35] jhass: for your application
[13:18:43] jamo: has joined #ruby
[13:18:49] Walex: jhass: ahhh this is a third party not-quite-finished application
[13:19:05] Walex: the 'gem env' that does not work is http://paste.ubuntu.com/13893659/
[13:20:17] jhass: Walex: what kind of application?
[13:20:19] Walex: the gem cache is indeed under '/var/lib/gems/2.1.0/cache' it's the specs that are under the user directory
[13:20:48] Walex: jhass: Arvados, a somewhat complicated storage-plus-clustering thing
[13:21:20] Walex: ACTION checking the presence of '.gemrc'
[13:21:45] jhass: nah, gem env would list it
[13:24:31] Walex: jhass: in the paste above I don't get why the specs files go under '/root/.gem/specs' and that's indeed listed in the 'gem env'.
[13:24:56] shevy: is this a debian machine?
[13:24:57] jhass: yeah, I'm not sure either
[13:25:05] sdothum: has joined #ruby
[13:25:19] Walex: shevy: yes, Debian-ish, Ubuntu ULTS14 more precisely
[13:27:31] Walex: shevy: but with a twist that I forgot: with the "Brightbox" backport of 2.1 and with the native 1.9 removed.
[13:27:58] jhass: mh, those packages are usually pretty sane
[13:28:29] jhass: tried the /bin/sh -l trick yet?
[13:28:54] jhass: or /bin/sh -lc 'command' rather
[13:30:11] B1n4r10: has joined #ruby
[13:30:39] favadi: has joined #ruby
[13:30:55] RegulationD: has joined #ruby
[13:31:59] Walex: jhass: but that's the wrong thing to do...
[13:33:17] Walex: jhass: my goal is to install the gems as 'root' under /var/lib/gems/...' and then have then usable by any user on the system. If the gem system is configured to looks for specs in the current user's home directory and instead they are in '/root/.gem/specs' then things are not going to work in general
[13:34:15] konr: has joined #ruby
[13:34:22] jhass: yeah idk why it does that for you really, sorry
[13:34:30] jhass: maybe try updating to the latest rubygems version
[13:36:20] Walex: jhass: OK, I can start looking at that. But you have given me already the important news that's not supposed to happen, so I now know that I need to fix *something*.
[13:36:52] jhass: well, I'm only 85% sure that it's not supposed to happen, I might be wrong :P
[13:37:33] shevy: yeah I also think that this is weird
[13:37:49] sumark: has joined #ruby
[13:38:18] shevy: we just have to ask hanmac! he runs ubuntu too
[13:39:39] Fredrich010: has joined #ruby
[13:39:44] JDiPierro: has joined #ruby
[13:43:56] Spami: has joined #ruby
[13:44:44] chipotle: has joined #ruby
[13:46:21] QualityAddict: has joined #ruby
[13:47:39] fulgore_: has joined #ruby
[13:47:41] l0yd: has joined #ruby
[13:47:43] ldnunes: has joined #ruby
[13:48:40] dotix: has joined #ruby
[13:48:41] dotix: has joined #ruby
[13:48:46] okkez: has joined #ruby
[13:48:51] IrishGringo: has joined #ruby
[13:49:05] aryaching: has joined #ruby
[13:49:07] okkez: has left #ruby: ()
[13:49:20] dotix: has joined #ruby
[13:49:20] dotix: has joined #ruby
[13:49:36] tagrudev: has joined #ruby
[13:50:23] elton: has joined #ruby
[13:52:58] cbednarski: has joined #ruby
[13:53:17] tonini: has joined #ruby
[13:53:37] n1ftyn8_: has joined #ruby
[13:54:03] nullwarp: has joined #ruby
[13:54:57] bjeanes: has joined #ruby
[13:55:02] skade: has joined #ruby
[13:55:13] jxf: has joined #ruby
[13:55:43] lancetw: has joined #ruby
[13:55:56] CloCkWeRX: has joined #ruby
[13:57:21] colli5ion: has joined #ruby
[13:58:28] cwong_on_irc: has joined #ruby
[13:58:50] HashNuke: has joined #ruby
[13:59:50] null__: has joined #ruby
[13:59:50] null__: has joined #ruby
[14:00:01] Laaw: has joined #ruby
[14:00:11] dstarh: has joined #ruby
[14:00:26] freerobby: has joined #ruby
[14:00:51] hohenfall: has joined #ruby
[14:04:20] loren: has joined #ruby
[14:04:30] devoldmx: has joined #ruby
[14:04:57] platzhirsch: has left #ruby: ()
[14:05:20] sankaber: has joined #ruby
[14:05:25] gnarf: has joined #ruby
[14:06:23] gregf_: has joined #ruby
[14:06:49] shortdudey123: has joined #ruby
[14:07:55] kmckelvi1: has joined #ruby
[14:09:31] JDiPierro: has joined #ruby
[14:12:35] TomPeed: has joined #ruby
[14:14:34] dlitvak_: has joined #ruby
[14:15:06] ramortegui: has joined #ruby
[14:16:40] jgt4: has joined #ruby
[14:17:12] rickmasta: has joined #ruby
[14:17:55] durstburger: has joined #ruby
[14:18:03] mclong: has joined #ruby
[14:19:02] sankaber: has joined #ruby
[14:19:55] jgpawletko: has joined #ruby
[14:22:09] ruby-lang680: has joined #ruby
[14:22:19] lapide_viridi: has joined #ruby
[14:22:49] ruby-lang680: Can anyone help me with ruby program for school ?
[14:23:18] ruboto: Just ask your question, if anyone has or can, they will respond.
[14:23:53] ruby-lang680: up vote 0 down vote favorite I need to create simple book information list (database within code) which contain author, genre, name, release date and page number. And later search by author(sort by date, search by genre(sort by author). What is simplest way to do this ?
[14:24:48] adaedra: Is that copied from reddit?
[14:25:14] jhass: ruby-lang680: show what you tried so far
[14:25:22] Bloomer: has joined #ruby
[14:25:24] puria: has joined #ruby
[14:25:40] f4cl3y: has joined #ruby
[14:26:21] ruby-lang680: this is my post from stack overflow: http://stackoverflow.com/questions/34181947/how-to-create-list-of-information-and-later-search-and-sort-that-information/34184518#34184518 will this work ?
[14:27:06] adaedra: did you try it?
[14:27:42] ruby-lang680: i tried, but i can print books
[14:27:55] ruby-lang680: it just gives 0x*******
[14:28:16] adaedra: That's Object#inspect ouput, but you get books
[14:28:20] Papierkorb: well, what else do you expect the defualt #to_s to return?
[14:28:27] adaedra: >> class Book; end; Book.new
[14:28:28] ruboto: adaedra # => #<Book:0x4187a078> (https://eval.in/483422)
[14:29:21] dlitvak: has joined #ruby
[14:29:27] decoponio: has joined #ruby
[14:32:31] mattyohe: has joined #ruby
[14:33:15] User458764: has joined #ruby
[14:33:30] sepp2k: has joined #ruby
[14:34:35] trautwein: has joined #ruby
[14:35:48] dhollinger: has joined #ruby
[14:36:20] huddy: has joined #ruby
[14:36:27] dfinninger: has joined #ruby
[14:39:31] _stu_: has joined #ruby
[14:40:39] lubarch: has joined #ruby
[14:42:29] tenderlove: has joined #ruby
[14:42:52] Suntzu: has joined #ruby
[14:42:54] aef: has joined #ruby
[14:43:41] zarubin: has joined #ruby
[14:45:24] dlitvak: has joined #ruby
[14:45:31] krzkrz: has joined #ruby
[14:46:08] jcromartie: has joined #ruby
[14:47:48] azgil: has joined #ruby
[14:48:06] malconis: has joined #ruby
[14:51:20] elton: has joined #ruby
[14:52:10] tjbiddle: has joined #ruby
[14:52:22] pandaant: has joined #ruby
[14:53:26] sucks: has joined #ruby
[14:54:30] Xentil: has joined #ruby
[14:55:19] fredbob: has joined #ruby
[14:55:31] lubarch: has joined #ruby
[14:56:56] lubarch: has joined #ruby
[14:57:32] stannard: has joined #ruby
[14:58:03] rawrwx: has joined #ruby
[14:59:32] dlitvak: has joined #ruby
[15:00:39] favadi: has joined #ruby
[15:02:23] kmckelvin: has joined #ruby
[15:02:45] Walex: ruby-lang680: you are printing references to value instead of values. Also use '.to_yaml' to make your stuff neatly printed
[15:03:03] uris: has joined #ruby
[15:04:13] babblebre: has joined #ruby
[15:04:58] RegulationD: has joined #ruby
[15:06:13] saddad: has joined #ruby
[15:08:22] freerobby: has joined #ruby
[15:08:52] tenderlove: has joined #ruby
[15:09:26] tenderlove: has joined #ruby
[15:10:43] skade: has joined #ruby
[15:10:54] imperator: has joined #ruby
[15:11:14] imperator: yorickpeterse, don't suppose you have an oga for yaml laying around, do you?
[15:12:07] myztic: has joined #ruby
[15:12:57] adaedra: what's wrong with Ruby's YAML implementation, imperator?
[15:13:01] yorickpeterse: No intentions either
[15:13:33] Aasha: has joined #ruby
[15:13:47] sucks: has joined #ruby
[15:14:20] rawrwx: has left #ruby: ("WeeChat 1.3")
[15:14:21] dlitvak_: has joined #ruby
[15:14:31] lubarch: has joined #ruby
[15:14:34] imperator: adaedra, apparently object creation and GC is somewhat of an issue
[15:14:42] devbug: has joined #ruby
[15:14:47] whippythellama: has joined #ruby
[15:17:00] joonty: has joined #ruby
[15:17:07] ibouvousaime_: has joined #ruby
[15:17:16] taylan: has joined #ruby
[15:17:52] taylan: any Emacs users? why is ruby-indent-tabs-mode ignored?
[15:18:19] shevy: matz is an emacs users and adaedra
[15:18:40] adaedra: I believe you're mistaken, shevy.
[15:19:15] lubarch: has joined #ruby
[15:19:28] xfbs: has joined #ruby
[15:19:39] taylan: I use the stock ruby mode and set indent-tabs-mode and ruby-indent-tabs-mode both to t in a ruby buffer, but TAB and RET still do two-space indentation. they're bound to the commands 'indent-for-tab-command' and 'newline' respectively.
[15:19:52] blub: why do you want tabs in your ruby..
[15:19:59] taylan: editing a file that already has them
[15:21:02] thejamespinto: has joined #ruby
[15:21:04] Guest72694: has joined #ruby
[15:21:18] Frem: has joined #ruby
[15:21:32] mary5030: has joined #ruby
[15:21:44] cjbottaro: has joined #ruby
[15:21:48] blub: when you get to 4 indentation levels does it insert a tab
[15:21:53] taylan: aha, when ruby-indent-level doesn't match tab-width, it inserts spaces
[15:22:02] shanemcd: has joined #ruby
[15:22:03] bigmac: has joined #ruby
[15:22:05] taylan: *sigh* emacs things
[15:22:22] x0F: has joined #ruby
[15:22:24] shevy: adaedra you loved emacs when we spoke about emacs versus vim!
[15:22:28] wmdrossard: has joined #ruby
[15:22:46] blub: emacs is good...
[15:22:53] adaedra: er, no. And go in -offtopic if you want to discuss it further.
[15:23:07] taylan: all software sucks. next topic! :P
[15:23:30] xfbs: has joined #ruby
[15:24:17] taylan: wow, I *also* needed to enable indent-tabs-mode. this is freaky.
[15:25:01] xfbs_: has joined #ruby
[15:25:09] shevy: taylan there must be someone who is using emacs here...
[15:26:20] taylan: hm, it seems setting indent-tabs-mode to t and setting tab-width to something matching ruby-indent-level is sufficient, so two local variables. this is acceptable, thanks
[15:26:33] krzkrz: has joined #ruby
[15:27:32] Jardayn: has joined #ruby
[15:27:44] p0wn3d: has joined #ruby
[15:27:47] ibouvousaime_: has joined #ruby
[15:27:58] puria: has joined #ruby
[15:29:37] jgt4: has joined #ruby
[15:29:56] bluOxigen: has joined #ruby
[15:30:18] dlitvak: has joined #ruby
[15:30:40] bmurt: has joined #ruby
[15:31:16] hobodave: has joined #ruby
[15:31:34] QualityAddict: has joined #ruby
[15:32:51] pu22l3r: has joined #ruby
[15:33:24] bronson: has joined #ruby
[15:34:03] rippa: has joined #ruby
[15:34:15] govg_: has joined #ruby
[15:37:16] NeverDie: has joined #ruby
[15:37:54] e7d: has joined #ruby
[15:40:04] symbol: has joined #ruby
[15:42:45] azgil: what about atom
[15:42:57] azgil: best of the best
[15:43:08] bubbys: has joined #ruby
[15:43:28] taylan: azgil: can I IRC in it?
[15:44:08] adaedra: what about you editor war in -offtopic
[15:45:35] InvGhost: has joined #ruby
[15:45:52] apeiros: azgil: the editor which only recently learned to open documents >2MB? :)
[15:46:06] dlitvak: has joined #ruby
[15:46:07] jhass: ?offtopic apeiros
[15:46:08] apeiros: d'oh. sorry adaedra
[15:46:08] ruboto: apeiros, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[15:46:16] kp666: has joined #ruby
[15:46:24] apeiros: yeah, yeah. right. sorry.
[15:47:11] marr: has joined #ruby
[15:47:39] moeabdol: has joined #ruby
[15:48:03] bubbys: has joined #ruby
[15:48:28] marr: has joined #ruby
[15:49:13] Bloomer: has joined #ruby
[15:52:42] govg_: has joined #ruby
[15:53:55] Tessier-Ashpool: has joined #ruby
[15:57:00] B1n4r10: has joined #ruby
[15:58:33] sucks: has joined #ruby
[16:00:07] dorei: has joined #ruby
[16:01:03] fredbob: has joined #ruby
[16:01:05] slawrence00: has joined #ruby
[16:01:48] akem: has joined #ruby
[16:02:28] lubarch: has joined #ruby
[16:02:31] skade: has joined #ruby
[16:02:55] tenderlove: has joined #ruby
[16:03:33] dopie: has joined #ruby
[16:03:36] tenderlove: has joined #ruby
[16:05:01] devoldmx: has joined #ruby
[16:06:42] govg_: has joined #ruby
[16:06:49] lubarch: has joined #ruby
[16:07:41] araujo_: has joined #ruby
[16:07:42] kalopsian: has joined #ruby
[16:08:19] willywos: has joined #ruby
[16:10:50] rdavila: has joined #ruby
[16:12:31] IrishGringo: has joined #ruby
[16:12:35] ruby-lang507: has joined #ruby
[16:12:37] lxsameer: has joined #ruby
[16:12:37] lxsameer: has joined #ruby
[16:12:58] build22: has joined #ruby
[16:13:11] zquad: has left #ruby: ()
[16:13:44] ruby-lang507: Hi everyone. I'm just here kind of looking to get familiar with ruby in general.
[16:14:04] apeiros: ruby-lang507: welcome to #ruby then :)
[16:14:05] adaedra: welcome then
[16:14:14] adaedra: ninja'd again
[16:17:46] brunto: has joined #ruby
[16:17:47] howdoico1: has joined #ruby
[16:17:47] ruby-lang507: I'm mostly just familiar with html and I can kind of paste php and sql code to get things done with websites but I want to understand programming and eventually do it for work
[16:17:47] adaedra: We have some resources to get started, if you want
[16:17:47] ruby-lang507: Does ruby make sense for that? I guess it's kind of a broad topic but I'm not sure where to start
[16:17:47] ruboto: http://ruby-community.com/pages/links
[16:17:47] havenn: has joined #ruby
[16:17:47] havenn: has joined #ruby
[16:17:48] ruby-lang507: Thanks I'll have a look
[16:17:48] jhass: sure, ruby is just fine for that
[16:18:54] ruby-lang507: So what type of work would make use of ruby? I hear the term software developer thrown around
[16:19:14] adam_: has joined #ruby
[16:19:42] thejamespinto: hey guys. I need help finding the right word to search the socket docs here... I'm trying to invoke a socket.gets but the other party doesn't use \n as an EOL, it uses ] instead, can I configure that in Ruby?
[16:19:51] kitallis: has joined #ruby
[16:20:00] kadoppe: has joined #ruby
[16:20:05] sandstrom: has joined #ruby
[16:20:05] futilegames: has joined #ruby
[16:20:13] gnarf: has joined #ruby
[16:21:12] araujo: has joined #ruby
[16:21:13] araujo: has joined #ruby
[16:22:19] devbug: has joined #ruby
[16:22:24] azgil: has left #ruby: ("Leaving")
[16:22:31] User458764: has joined #ruby
[16:24:42] durstburger: has joined #ruby
[16:24:51] jhass: thejamespinto: have a look at the parameter gets takes
[16:25:01] toretore: http://www.rubydoc.info/stdlib/core/IO#gets-instance_method
[16:25:34] canton7: thejamespinto, if you keep digging into the parents of Socket, you end up finding the module which defines gets. That has a parameter which takes the separator to look for (or it also has a default value, which refers to a global which you can set)
[16:27:43] kfpratt: has joined #ruby
[16:28:11] thejamespinto: canton7 jhass: thank you, is there a documentation where I don't have to keep digging up in the inheritance line?
[16:28:37] jhass: thejamespinto: rubydoc.info has a summary
[16:28:45] psy: has joined #ruby
[16:28:50] canton7: thejamespinto, I followed the 'Parent' section of the ruby-doc.org pages
[16:29:29] jhass: thejamespinto: ri Socket#gets should also take you to the right thing
[16:29:36] psy: has joined #ruby
[16:29:37] kalopsian: has joined #ruby
[16:30:02] adaedra: &ri Socket#gets
[16:30:16] adaedra: ... great.
[16:30:23] havenwood: ACTION pokes `derpy 
[16:30:25] thejamespinto: jhass: http://www.rubydoc.info/stdlib/socket/TCPSocket :(
[16:30:32] thejamespinto: it doesn't mention method gets on the side
[16:30:36] momomomomo: has joined #ruby
[16:30:44] adaedra: I really need to fix this bug.
[16:30:46] baweaver: has joined #ruby
[16:30:50] jhass: thejamespinto: mh
[16:30:52] kalopsian: has joined #ruby
[16:31:08] kalopsian: has joined #ruby
[16:31:34] jhass: thejamespinto: well I use http://devdocs.io, poke in the method name and pick the first plausible candidate
[16:32:01] thejamespinto: ri Socket#gets > Nothing known about Socket
[16:32:02] thejamespinto: ri TcpSocket#gets > Nothing known about TcpSocket
[16:32:06] `derpy: havenwood: that was my eye.
[16:32:07] kalopsian: has joined #ruby
[16:32:13] apeiros: thejamespinto: means you haven't installed the docs
[16:32:27] apeiros: also it's TCPSocket, not TcpSocket. case matters in programming.
[16:32:34] apeiros: (well, unless you use nim, I guess)
[16:32:50] apeiros: seriously?
[16:33:03] adaedra: explode, EXPLODE and ExPLodE is the same.
[16:33:15] apeiros: memory suppression works :D
[16:33:21] pu22l3r_: has joined #ruby
[16:33:33] canton7: wasn't there the turkish php bug? php internally up- or downcases lots of things (I forget which), and of course turkish has different rules for upcasing 'i' and downcasing 'I'...
[16:33:53] adaedra: apeiros: indeed. That's what Lerdorf do each time he reads something about language design.
[16:34:10] baweaver: has joined #ruby
[16:34:26] jbrhbr: has joined #ruby
[16:34:34] apeiros: adaedra: suppress his memory? :)
[16:34:41] lubarch: has joined #ruby
[16:34:51] adaedra: Or should I say "TrUe"
[16:35:24] jhass: now I know who came up with https://tools.ietf.org/html/draft-vixie-dnsext-dns0x20-00
[16:35:37] moei: has joined #ruby
[16:36:03] kalopsian: has joined #ruby
[16:36:07] radgeRayden: has joined #ruby
[16:36:28] Diabolik: is it bad practice to declare instance variables within a private method
[16:36:59] hobodave: has joined #ruby
[16:37:11] kalopsian: has joined #ruby
[16:37:34] dlitvak: has joined #ruby
[16:37:36] araujo_: has joined #ruby
[16:38:31] apeiros: Diabolik: it is excellent practice to "declare" all ivars in initialize
[16:38:31] cajone: has joined #ruby
[16:38:35] apeiros: and initialize is private. thus???
[16:38:40] thejamespinto: ok this question is really string-stupid, the sockets are sending me sequences of unreadable bytes, what is the best way to translate them into a string I can actually see? ... and modify my code to identify them
[16:38:57] apeiros: thejamespinto: s/unreadable/unprintable/
[16:39:03] apeiros: thejamespinto: .inspect
[16:39:11] jhass: or puts -> p
[16:39:29] apeiros: ACTION too slow
[16:39:36] apeiros: (p uses .inspect)
[16:39:57] adaedra: p is ~ `.tap { |x| puts x.inspect }`
[16:40:12] thejamespinto: "\x80username\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0012345\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00]"
[16:40:16] kalopsia1: has joined #ruby
[16:40:18] thejamespinto: thank you guys! :D :D :D :D
[16:40:25] jhass: yeah so you have a bunch of 0 bytes there
[16:40:35] apeiros: ?guys thejamespinto - for your consideration
[16:40:35] ruboto: thejamespinto, 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:41:13] apeiros: so little to make me happy
[16:41:19] apeiros: +necessary
[16:42:14] adaedra: I run a subservice that creates an HTTP server and then connect to it.
[16:42:26] adaedra: How can I efficiently connect to it once it's ready?
[16:42:39] jhass: "subservice"?
[16:42:45] apeiros: your problem is to know the moment when it is ready?
[16:42:55] sneakerhax: has joined #ruby
[16:43:02] apeiros: by subservice, do you mean child process?
[16:43:11] apeiros: share a pipe
[16:43:16] jhass: or create the listener in the parent and inherit it
[16:43:19] apeiros: or send a signal
[16:43:24] jhass: basically systemd socket activation
[16:43:27] adaedra: don't have control on the subproccess
[16:43:33] Arnvald: has joined #ruby
[16:43:43] zarubin: has joined #ruby
[16:44:01] adaedra: Can't modify it. It just spawns a web server for me to connect to (or quit if can't)
[16:44:01] elton: has joined #ruby
[16:44:07] apeiros: well, don't know and gotta get some of the free food now :D
[16:44:23] jhass: systemd-socket-proxyd ? :D
[16:44:35] darkxploit: has joined #ruby
[16:44:42] lubarch: has joined #ruby
[16:44:43] lubarch: has joined #ruby
[16:44:43] adaedra: And don't have access to systemd either
[16:45:25] adaedra: I can just try to connect until {it connects || subprocess quits}, but it seems inefficient
[16:45:32] badku: has joined #ruby
[16:45:55] [Butch]: has joined #ruby
[16:46:01] cwong_on_irc: has joined #ruby
[16:46:02] jhass: if you have no control over it, it's your best bet
[16:46:04] lubarch: has joined #ruby
[16:46:05] lubarch: has joined #ruby
[16:46:08] uris: has joined #ruby
[16:46:23] calderonroberto: has joined #ruby
[16:46:27] mclong: has joined #ruby
[16:46:43] synthroid: has joined #ruby
[16:47:08] adaedra: great, thanks
[16:48:10] DeXterbed: has joined #ruby
[16:48:59] s00pcan: has joined #ruby
[16:49:05] apeiros: I wonder whether there's something similar to select for this kind of thing
[16:49:17] kmckelvi1: has joined #ruby
[16:49:21] apeiros: but I guess you'd have to go pretty lowlevel with the socket class for that
[16:50:30] supermarin: has joined #ruby
[16:51:04] thejamespinto: translating legacy C# byte socket communication to an actual programming language can be tough
[16:51:37] pu22l3r: has joined #ruby
[16:52:26] dmr8: has joined #ruby
[16:54:02] Arnvald: has joined #ruby
[16:54:03] elton: has joined #ruby
[16:55:43] platzhirsch: has joined #ruby
[16:55:50] psye: has joined #ruby
[16:55:58] platzhirsch: How would you undo a monkey patch programatically?
[16:56:11] apeiros: platzhirsch: File.delete(__FILE__)
[16:56:18] apeiros: you can't.
[16:56:30] apeiros: unless special provisions were made to preserve the original state.
[16:57:03] tenderlove: has joined #ruby
[16:57:38] imperator: has left #ruby: ("Leaving")
[16:57:44] tenderlove: has joined #ruby
[16:57:47] platzhirsch: apeiros: exaclty... maybe with alias
[16:57:58] krzkrz: has joined #ruby
[16:58:38] sh4d0wD: has joined #ruby
[16:59:34] baroquebobcat: has joined #ruby
[16:59:45] apeiros: platzhirsch: depends on the kind of monkey-patch
[17:00:07] platzhirsch: apeiros: method override
[17:00:23] apeiros: but if you feel the need to reverse a monkey-patch, you probably should design it in a way you don't need that patch
[17:00:24] havenwood: platzhirsch: You might want to look at refinements: http://ruby-doc.org/core/doc/syntax/refinements_rdoc.html
[17:00:27] apeiros: f.ex. by using refinements
[17:00:40] _stu_: has joined #ruby
[17:00:50] apeiros: ACTION scowls at havenwood
[17:01:11] apeiros: btw. havenwood - is rvm using your binary ruby on osx?
[17:01:18] havenwood: apeiros: yup
[17:01:23] apeiros: because rbconfig reports /Users/haven in a couple of places???
[17:01:46] havenwood: apeiros: yeah, there's no flag to disable those historical build flags
[17:01:53] platzhirsch: yeah I am working with Ruby and RSpec 1 where I cannot stub properly, so I brutually stubbed it with a monkey patch
[17:02:01] platzhirsch: it's horrible, cannot look into the mirror
[17:02:04] platzhirsch: has left #ruby: ()
[17:02:09] platzhirsch: has joined #ruby
[17:02:24] s00pcan: has joined #ruby
[17:02:30] apeiros: havenwood: hm
[17:02:39] apeiros: some of those caused warnings for me, e.g. "LDFLAGS"=>"-L. -L/Users/haven/.sm/pkg/active/lib ???"
[17:02:54] kurtf: has joined #ruby
[17:02:58] havenwood: apeiros: I think it's been requested but it's not been added. Yeah, it's not hurting anything but everyone thinks I broke their computer.
[17:03:26] havenwood: apeiros: I've been meaning to move the build to Travis, but alas, no time, no time!
[17:03:37] TomPeed: has joined #ruby
[17:03:49] agit0: has joined #ruby
[17:04:46] eurii: has joined #ruby
[17:05:41] amclain: has joined #ruby
[17:06:01] adaedra: ACTION eats apeiros 
[17:06:02] skade: has joined #ruby
[17:07:06] huyderman: has joined #ruby
[17:07:50] rakm: has joined #ruby
[17:09:13] eurii: has joined #ruby
[17:09:26] kalopsian: has joined #ruby
[17:09:47] eurii: has joined #ruby
[17:09:52] dlitvak: has joined #ruby
[17:10:13] djbkd: has joined #ruby
[17:11:41] kalopsian: has joined #ruby
[17:13:18] cdg: has joined #ruby
[17:15:13] dionysus69: has joined #ruby
[17:15:15] atumzin: has joined #ruby
[17:15:46] troyready: has joined #ruby
[17:16:43] last_staff: has joined #ruby
[17:20:43] kalopsian: has joined #ruby
[17:21:07] The_Phoenix: has joined #ruby
[17:22:21] kalopsian: has joined #ruby
[17:22:46] x0F: has joined #ruby
[17:23:22] SCHAAP137: has joined #ruby
[17:24:12] kalopsian: has joined #ruby
[17:24:51] tomphp: has joined #ruby
[17:25:30] nettoweb: has joined #ruby
[17:25:49] agit0: has joined #ruby
[17:26:18] ramfjord: has joined #ruby
[17:26:55] c-c: Am I right in thinking that Ruby::Yaml.load ignores the $LOAD_PATH
[17:27:19] jhass: what#s Ruby::Yaml even
[17:27:20] c-c: eh, I mean YAML::load_file
[17:27:46] jhass: why would that respect $LOAD_PATH
[17:27:47] tenderlove: has joined #ruby
[17:27:49] hxegon: has joined #ruby
[17:27:59] jhass: $LOAD_PATH is for require, nothing else
[17:28:03] jhass: (well Kernel#load, but details)
[17:28:29] howdoico1: has joined #ruby
[17:28:35] DiCablo: has joined #ruby
[17:29:24] c-c: yep, seems so
[17:30:09] dlitvak: has joined #ruby
[17:30:45] chipotle: has joined #ruby
[17:30:52] kalopsian: has joined #ruby
[17:33:05] colegatron: has joined #ruby
[17:35:10] calderonroberto: has joined #ruby
[17:36:00] hobodave: has joined #ruby
[17:37:13] demonlove: has joined #ruby
[17:37:33] RobertBirnie: has joined #ruby
[17:40:24] Anderson69s_Deb: has joined #ruby
[17:40:55] arup_r: has joined #ruby
[17:41:18] freerobby: has joined #ruby
[17:41:38] mchu: has joined #ruby
[17:41:38] kalopsian: has joined #ruby
[17:42:39] nertzy: has joined #ruby
[17:42:45] chipotle: has joined #ruby
[17:43:16] kfogel: has joined #ruby
[17:43:26] kfogel: mchu: I'm in here too, to watch any conversation
[17:43:40] zarubin: has joined #ruby
[17:43:43] Anderson69s_Deb: has joined #ruby
[17:45:23] zast: has joined #ruby
[17:46:30] jhass: ACTION feels stalked
[17:46:33] casadei: has joined #ruby
[17:46:50] eam: watching intensifies
[17:47:08] kalopsian: has joined #ruby
[17:47:25] bronson: has joined #ruby
[17:47:58] kalopsian: has joined #ruby
[17:49:03] kalopsian: has joined #ruby
[17:49:58] kalopsian: has joined #ruby
[17:52:34] jbrhbr: has joined #ruby
[17:53:47] Sou|cutter: everyone quiet, it's the fuzz :x
[17:54:34] slash_nick: http://www.bbc.com/news/uk-35058761 (programming/crypto challenge for yall folks)
[17:55:33] mg^^: has joined #ruby
[17:55:42] crunk_bear: has joined #ruby
[17:57:07] slash_nick: as if i'm not losing enough sleep solving the "advent of code" challenges that drop daily at 2300
[17:57:10] c-c: Do you think it is wise to rely on OpenStructs as properties of OpenStructs being referenced correctly?
[17:57:53] drptbl: has joined #ruby
[17:58:01] c-c: >> require 'ostruct'; foo = OpenStruct.new; car = OpenStruct.new(:foo => foo); foo.nu = "Woot!"; car
[17:58:02] ruboto: c-c # => #<OpenStruct foo=#<OpenStruct nu="Woot!">> (https://eval.in/483482)
[17:58:33] jpfuentes2: has joined #ruby
[17:59:36] Sou|cutter: ACTION shrugs at c-c
[18:00:09] Sou|cutter: I prefer classes to ostructs generally, but I don't see the big deal
[18:00:48] pipework: I use ostructs when there's absolutely no behaviour and I'm just passing around 'data bags'
[18:00:52] c-c: I just wanna ditch the classes and work with objects.
[18:00:56] pipework: When the data itself belongs together, that is.
[18:01:05] c-c: And yeah, this is for conf-objects, definitions
[18:01:21] c-c: Some of those will end up being iterated into classes, eventually, though
[18:01:29] pipework: c-c: got an example of what you're hoping to see?
[18:01:49] pipework: I love to write code where I start with the fun part and write the code I want to see and then fill in the rest.
[18:01:52] wsewolod: has joined #ruby
[18:01:56] c-c: Not yet, but I'm just wondering if this is subject to change.
[18:02:05] kmckelvi1: has joined #ruby
[18:02:21] pipework: wrt what exactly?
[18:02:49] c-c: OpenStruct properties being references, not clones
[18:03:03] pipework: c-c: It probably won't change.
[18:03:25] pipework: If you need an object which is a dup of a set of objects, you could do that, but you'll probably want a deep_dup then.
[18:03:53] c-c: I've been writing a lot of ecmascipt
[18:04:02] c-c: ruby feels like a new language again :D
[18:04:24] pipework: c-c: Are you using 6?
[18:04:40] c-c: sadly, no I wasnt
[18:04:42] chipotle_: has joined #ruby
[18:04:43] yardenbar: has joined #ruby
[18:04:52] supermarin: has joined #ruby
[18:05:42] d0nn1e: has joined #ruby
[18:05:48] devoldmx: has joined #ruby
[18:05:59] lubarch: has joined #ruby
[18:06:00] lubarch: has joined #ruby
[18:06:53] pipework: c-c: I'm stoked because I get to hack on/up/around the new RPGMaker version's new javascript-based API's and game engine stuff. It runs on ES6 with shims and probably some babel use for browser compat.
[18:07:25] pipework: It ships with NW.js and other stuff though, so I'm pretty sure I can get in there and add a bunch of stuff, like events and doing super cool shit in the service worker and web workers.
[18:08:06] Marsupermammal: has joined #ruby
[18:08:23] c-c: pipework: nice
[18:08:34] c-c: pipework: hows RPGMaker?
[18:08:52] pipework: c-c: I've never made anything worthwhile in it, but I've had a lot of fun with playing with scripting.
[18:09:09] FooMunki: has joined #ruby
[18:09:23] pipework: What's sweet is that instead of a crippled ruby 1.9, I have a fully featured JS environment.
[18:09:42] pipework: XMLHttpRequest, Worker, ServiceWorker, etc.
[18:10:17] ramfjord: has joined #ruby
[18:10:42] c-c: why would you have crippled ruby?
[18:10:58] dlitvak: has joined #ruby
[18:10:58] KensoDev: has joined #ruby
[18:11:18] pipework: c-c: The ruby they embedded was a fork with some patches that limited the ruby and removed stuff.
[18:11:30] c-c: ok, so RPGMaker is scripted with ruby?
[18:11:39] User458764: has joined #ruby
[18:12:38] pipework: c-c: The older versions are, the newest is ES6.
[18:12:56] minimalism: has joined #ruby
[18:13:08] shanemcd: has joined #ruby
[18:13:43] dfinninger: has joined #ruby
[18:13:53] dfockler: has joined #ruby
[18:14:31] c-c: well, I'm miles from even having a proper start
[18:14:55] c-c: I'm wondering how I should scope things in an engine that is basically a loop
[18:15:29] ihatenickers: has joined #ruby
[18:15:29] c-c: I'veo decided to scope most of my 'engine' under one single global variable. Like this: _conf = OpenStruct.new; # load values into _conf; _stuff = OpenStruct.new; # again, set/load; ... $core = OpenStruct.new(:conf => _conf, :stuff => _stuff, :etc => etc)
[18:15:36] ihatenickers: anyone know js?
[18:15:42] djbkd: has joined #ruby
[18:15:47] c-c: What are the negatives of using this type of scoping
[18:15:59] c-c: ihatenickers: the know js at #javascript where you should ask
[18:17:08] jessemcgilallen: has joined #ruby
[18:17:34] lubarch: has joined #ruby
[18:17:35] lubarch: has joined #ruby
[18:18:08] dlitvak: has joined #ruby
[18:18:08] lubarch: has joined #ruby
[18:18:09] lubarch: has joined #ruby
[18:18:49] Bloomer: has joined #ruby
[18:19:39] c-c: Hm, perhaps somewhere is a nice article on "This is how you must scope your app in Ruby 2.0"
[18:20:14] pipework: c-c: When you say 'scope your app', what do you mean?
[18:20:58] tomphp: has joined #ruby
[18:21:10] pipework: Do you mean that you want to limit the entrypoints to your application to a single thing and have all the other code essentially inaccessible?
[18:21:13] Ishido: has joined #ruby
[18:21:44] kknight: has joined #ruby
[18:21:50] tenderlove: has joined #ruby
[18:21:51] banister: has joined #ruby
[18:22:30] tenderlove: has joined #ruby
[18:22:52] c-c: pipework: I mean, where are the different variables visible, basically
[18:23:04] podman: has joined #ruby
[18:23:31] c-c: modules, variables
[18:23:57] symm-: has joined #ruby
[18:24:01] c-c: lol I'm beginning to remember
[18:24:05] pipework: c-c: I sometimes play along these lines. I haven't hit a perfect feeling approach, but I do tinker.
[18:24:11] c-c: I should use module scope
[18:24:15] Rtransat: has joined #ruby
[18:24:27] neonalpine: has joined #ruby
[18:24:33] RegulationD: has joined #ruby
[18:24:39] c-c: or perhaps this "app boostrap/core" is a special case
[18:25:50] taylan: has left #ruby: ("Using Circe, the loveliest of all IRC clients")
[18:26:19] c-c: Anyway, so far I have one global variable, half a dozen root-scope ones. I suppose the rest will be "under" the global variable OpenStruct, or module/class scopes
[18:26:22] Rtransat: Hi, I'm new with ruby and I'm trying to create a gem, I use bundler and after my gem generation I use in my projet which use that gem a Gemfile with gem "my_gem", :path => "H:\\ruby\\my_gem\\my_gem" but I have an error require cannot load such file -- my_gem
[18:27:09] pipework: c-c: When you say global, do you mean like $RUBY_GLOBAL_VARIABLES, or just a variable in the top-level 'main' scope?
[18:27:11] Rtransat: bundle install work, it can find my path but with the require 'my_gem' it throw the exception
[18:27:14] c-c: Rtransat: so, first I would see "File.join"
[18:27:57] c-c: pipework: there are only one kinds of global variables in ruby
[18:28:12] pipework: c-c: Yeah, I was just checking whether you actually meant globals.
[18:28:13] pipework: Why are you using globals?
[18:28:22] c-c: Rtransat: obviously your path doesn't resolve correctly with things like double slashes. Fix that first.
[18:28:34] c-c: pipework: did you not read what I wrote?
[18:28:49] c-c: First, I am not using globals...
[18:28:51] pipework: I'd rather use a constant than a namespace, on principle, but what are you doing that means you need a global rather than something just always accessbile?
[18:28:58] kknight: has joined #ruby
[18:29:01] pipework: [10:26:19 AM] <c-c> Anyway, so far I have one global variable, half a dozen root-scope ones. I suppose the rest will be "under" the global variable OpenStruct, or module/class scopes
[18:29:17] Rtransat: c-c still not working with "/" after another bundle install
[18:29:38] c-c: Rtransat: I think you have many problems
[18:29:47] c-c: Rtransat: prepare code pastie or gist
[18:30:00] c-c: Rtransat: then locate one problem you can ask one question about
[18:30:17] pipework: s/namespace/global/
[18:30:24] c-c: pipework: it says "one".
[18:30:26] kknight: has joined #ruby
[18:30:33] pipework: c-c: Yeah, why are you using them?
[18:30:42] pipework: Why not just assign to a constant in the top-level namespace?
[18:30:42] c-c: pipework: I'm not.
[18:30:49] pipework: c-c: So you are using a global, but you aren't?
[18:30:55] pipework: ruby truly is magical.
[18:31:03] dlitvak: has joined #ruby
[18:31:06] c-c: pipework: hmmmm, what are 'constants'? Are constants variable?
[18:31:13] shanemcd: has joined #ruby
[18:31:21] hobodave: has joined #ruby
[18:31:29] pipework: c-c: Ruby allows you to assign a constant to a new object all you want, but it raises warnings.
[18:31:30] c-c: pipework: I am using one global. Not 'globals'.
[18:31:46] pipework: c-c: The plurality doesn't matter. Why are you using any variables at all whose type is global?
[18:31:56] bean: has joined #ruby
[18:32:10] pipework: You can, however, modify objects in place that are assigned to constants without raising warnings.
[18:32:30] baweaver: has joined #ruby
[18:33:05] c-c: pipework: ok, riddle me this. You have root/main scope variable: foo = 1; Next you declare a method: def foo_adder; foo += 1; end. What happens?
[18:33:25] baweaver: has joined #ruby
[18:33:32] pipework: c-c: Nothing other than a method gets defined.
[18:33:39] pipework: Do you call it
[18:34:04] pipework: c-c: Feel free to share some code rather than trying to explain it if you happen to have any.
[18:34:15] c-c: >> foo = 1; def foo_adder; foo += 1; end; foo_adder
[18:34:16] ruboto: c-c # => undefined method `+' for nil:NilClass (NoMethodError) ...check link for more (https://eval.in/483514)
[18:34:29] c-c: pipework: so, how do you solve the nil error?
[18:35:48] Ox0dea: has joined #ruby
[18:36:00] pipework: c-c: I'm just a bit confused on how we got from where we were to here.
[18:36:11] Rtransat: c-c: https://gist.github.com/Rtransat/3dc8d6cdd2da717612c2
[18:36:12] achamian: has joined #ruby
[18:36:35] c-c: pipework: well, you asked why I was using a global variable
[18:36:35] Ox0dea: c-c: Are you sure you need `$core` to be accessible from *anywhere* in your application?
[18:36:48] pipework: c-c: Ah so you're just doing like, all your work, in the top level namespace?
[18:37:02] pipework: Ox0dea: I'm on the same track trying to figure it out.
[18:37:15] pipework: It's all you though, I've got to break more tests.
[18:37:26] Ox0dea: c-c: module YourApp; CORE = {foo: 1, bar: 2}; end
[18:37:26] c-c: just tell me the anwer to that code
[18:37:47] c-c: yeah, thats a nice solution
[18:37:47] Ox0dea: c-c: The answer is that you use something other than a local variable.
[18:37:49] rakm: has joined #ruby
[18:37:59] pipework: c-c: You won't be able to use a local there.
[18:38:01] Ox0dea: But replacing a local with a global is the nuclear option.
[18:38:03] pipework: It's not available in the scope of the method defined on the eigenclass of main.
[18:38:32] bean: yeah, I'd take a look at understanding variable scoping c-c
[18:38:33] supermarin: has joined #ruby
[18:38:34] c-c: so, theres two choices, global variable or module/class sscoping
[18:38:38] pipework: Ox0dea: It's marginally superior to burning down the office and building a new one closer to home though.
[18:38:43] pipework: c-c: There's many more than that.
[18:38:56] Rtransat: c-c: did you see my gist ?
[18:39:12] dcas: has joined #ruby
[18:39:30] pipework: local, instance, constant, global (forget class variables, you'll probably never come up with a reason to use them legitimately in a nice way.)
[18:39:49] bean: has joined #ruby
[18:39:57] c-c: lol no, you cannot use a local/instance var there
[18:40:13] Ox0dea: c-c: You could use an instance variable.
[18:40:20] Ox0dea: You shouldn't, but you could.
[18:41:13] shanemcd: has joined #ruby
[18:41:21] puria: has joined #ruby
[18:41:22] apeiros: pipework: re cvars: if you list them that way, add gvars there too ;-)
[18:41:28] Ox0dea: c-c: I wonder, have you come to Ruby from Clojure?
[18:41:55] Ox0dea: pipework: You missed the "virtual" globals like $~ and its descendants.
[18:42:02] cscheib: has left #ruby: ()
[18:42:06] c-c: Ox0dea: np??e
[18:42:06] Ox0dea: For the better, really. :P
[18:42:08] kknight: hey ruby has relesed gsoc-2016 idea?
[18:42:37] c-c: Ox0dea: no, but I do like schemes and lisps
[18:42:58] davedev24: has joined #ruby
[18:42:59] Ox0dea: c-c: Aye, I suppose I should've asked more generally.
[18:43:04] User458764: has joined #ruby
[18:43:31] Ox0dea: "Data all the things!" isn't a bad idea, but it's not the most idiomatic approach in Ruby.
[18:43:46] zarubin: has joined #ruby
[18:44:06] c-c: Rtransat: quickly looking, I cannot spot the problem
[18:44:20] c-c: Ox0dea: what do you mean?
[18:44:23] Rtransat: we are 2 :)
[18:44:44] Synthead: has joined #ruby
[18:45:14] c-c: Rtransat: perhaps the line 48 needs to happen at a different time
[18:45:23] stannard: has joined #ruby
[18:45:38] pipework: Ox0dea: Oh, right. :(
[18:45:49] treehug88: has joined #ruby
[18:46:02] Rtransat: if I do a bundle show my_gem my path is correct
[18:46:10] c-c: I've never built a gem, though
[18:46:12] dlitvak: has joined #ruby
[18:46:14] Rtransat: or maybe I need to call a bundle build
[18:46:26] Rtransat: but for developpment testing is heavy :/
[18:46:43] Rtransat: if I need to built the gem each time there are diff
[18:47:12] c-c: well, if you change it, the you do :)
[18:47:43] Ox0dea: c-c: Well, you want to use a Hash as your app's "God object"; that's an idea that's caught on in the functional world, but it doesn't quite transfer to Ruby.
[18:47:56] c-c: OpenStruct
[18:48:19] Ox0dea: OpenStruct is Hash with unnecessary baggage. :P
[18:48:46] c-c: Tell that to C++
[18:48:51] colleenmcguckin: has joined #ruby
[18:49:08] WizJin: has joined #ruby
[18:49:34] lubarch: has joined #ruby
[18:49:35] lubarch: has joined #ruby
[18:50:20] ruid: has joined #ruby
[18:50:21] ruid: has joined #ruby
[18:51:41] c-c: Also, openstruct has nicer setter/getter syntax
[18:52:09] bean: you can just use attr_accessor
[18:52:18] lubarch: has joined #ruby
[18:52:18] lubarch: has joined #ruby
[18:52:43] DexterLB: has joined #ruby
[18:52:44] tenderlove: has joined #ruby
[18:53:19] tenderlove: has joined #ruby
[18:53:48] c-c: no, no classes
[18:54:11] lemur: has joined #ruby
[18:54:14] Ox0dea: c-c: Wrong channel.
[18:54:21] bean: If you insist on using it like that thats on you c-c
[18:54:45] Ox0dea: c-c: Why Ruby?
[18:54:49] bean: in the real world we use classes
[18:54:55] jessemcgilallen: has joined #ruby
[18:55:02] nalkxulkuk: has joined #ruby
[18:55:04] baweaver: enough with that "in the real world" nonsense
[18:55:10] baweaver: it's posturing and it's rude
[18:55:43] devbug: has joined #ruby
[18:55:48] c-c: Sure, I've only used ruby since 2006
[18:55:49] bean: It's not wrong, though.
[18:56:00] c-c: its condescending
[18:56:04] baweaver: I don't care
[18:56:17] akem: has joined #ruby
[18:56:21] kmckelvi1: has joined #ruby
[18:56:23] supermarin: has joined #ruby
[18:56:24] baweaver: If it's wrong, you say why, you don't pull this "in the real world" junk
[18:56:48] baweaver: That's how people learn
[18:57:07] berserk_ren: has joined #ruby
[18:57:09] baweaver: Not condescending eye-roll speeches about "how dare you use this"
[18:57:33] craigp: has joined #ruby
[18:57:47] c-c: Ox0dea: how is this a wrong channel? Strange, someone should have told me earlier, I've only been here since 2009
[18:57:52] shanemcd: has joined #ruby
[18:58:18] baweaver: c-c: better ways to phrase that
[18:58:30] Ox0dea: c-c: Ruby is probably the wrong language for you if you're staunchly against using classes.
[18:58:45] nalkxulkuk: classes are kinda stupid
[18:58:48] nettoweb: has joined #ruby
[18:58:53] c-c: Ox0dea: well, thats just like, probably your opinion, man
[18:59:03] jhass: !ban nalkxulkuk !T 1w bye troll
[18:59:03] eam: Ox0dea: I don't agree with that, I think classes are often a dumb way of going about approaching a program structure
[18:59:07] ChanServ: +b nalkxulkuk!*@*
[18:59:07] ChanServ: ChanServ kicked nalkxulkuk: bye troll
[18:59:19] eam: it's fine to write non-class oriented code in ruby
[18:59:24] apeiros: I knew something was with that nick
[18:59:53] dmcp: has joined #ruby
[18:59:57] Ox0dea: >> $Ruby.is_a?(Object) { |oriented| language } # c-c eam
[18:59:58] ruboto: Ox0dea # => true (https://eval.in/483517)
[19:00:05] KOOLKLUXKLAN: has joined #ruby
[19:00:06] ChanServ: +b *!*@gateway/web/freenode/ip.178.62.106.169
[19:00:06] ChanServ: ChanServ kicked KOOLKLUXKLAN: bye troll
[19:00:21] c-c: Ox0dea: spare your time. I know all about it.
[19:00:27] Ox0dea: http://i.imgur.com/Ufbr5ej.gif
[19:00:37] fulgore_: has joined #ruby
[19:00:47] baweaver: c-c: uncalled for
[19:01:02] Ox0dea: baweaver: You're derailing with kindness.
[19:01:05] mchu: has joined #ruby
[19:01:09] DexterLB: has joined #ruby
[19:01:14] dlitvak: has joined #ruby
[19:01:17] gizmore: has joined #ruby
[19:01:18] eam: kindness is fine, it's also fine to share opinions on style
[19:01:30] c-c: Yes, I am evil and like literal styles and mixins and objects, instead of classes and inheritance
[19:01:34] baweaver: as long as they're backed up by more than "that's wrong"
[19:01:36] baweaver: anyways, brb
[19:01:42] eam: OO style has nothing to do with whether things in ruby are objects or not
[19:01:50] eam: and Ox0dea I know you know better than to claim otherwise :)
[19:02:02] momomomomo: has joined #ruby
[19:02:12] crunk_bear: has joined #ruby
[19:02:12] Ox0dea: Wait, how are OO and classes not inextricably linked?
[19:02:21] tulak: has joined #ruby
[19:02:29] apeiros: Ox0dea: there's more OO than class based OO ;-)
[19:02:32] tomphp: has joined #ruby
[19:02:38] apeiros: prototypical, f.ex.
[19:02:39] eam: Ox0dea: if it were impossible to use non-OO semantics in ruby then this conversation couldn't occur in the first place (where someone says "I don't like to do it that way")
[19:02:50] Ox0dea: Is there a command to check which channel I'm in?
[19:03:02] james1: has left #ruby: ("WeeChat 0.4.2")
[19:03:04] shevy: Ox0dea yeah /j #0 or something!
[19:03:07] apeiros: Ox0dea: quit and join the one you want
[19:03:13] Ox0dea: has left #ruby: ("WeeChat 1.4-dev")
[19:03:17] Ox0dea: has joined #ruby
[19:03:20] shevy: apeiros hahaha
[19:03:21] Ox0dea: apeiros: Did it work?
[19:03:31] apeiros: no, you're still in the wrong channel, Ox0dea
[19:03:36] shevy: I think there is some status command
[19:03:50] apeiros: must be some kind of irc-warpfield/-wormhole.
[19:04:03] momomomomo: has joined #ruby
[19:04:04] apeiros: you should readjust your flux-compensator
[19:04:23] jtperreault: has joined #ruby
[19:06:44] zast: has left #ruby: ()
[19:07:01] blub: rubys missing some important pieces to write good code without classes..its a pretty opinionated language design.....
[19:07:18] neonalpine: has joined #ruby
[19:07:24] jhass: you say that as if it's a bad thing
[19:07:57] c-c: well, at least I don't have to write the Classes
[19:07:59] shevy: you can use top-level defined methods of course
[19:08:06] shevy: but it leads to a lot of spaghetti design
[19:08:30] shevy: and $vars
[19:08:34] apeiros: blub: depends on what you write
[19:08:47] apeiros: a shell script of a couple dozen lines doesn't necessarily need a single class definition
[19:08:55] blub: its whatever just it seems to me ruby lets you pick whatever you want, as long as that's either clean oo code or dumb procedural
[19:08:58] apeiros: and might even be more readable for it
[19:09:15] bean: Imo if you're writing anything of any substantial length / complexity you're better off using classes.
[19:09:15] blub: ya i mean for structuring large programs
[19:09:25] apeiros: personally I prefer classes, even with small scripts.
[19:09:41] Ox0dea: Compartmentalization is a Good Thing.
[19:09:49] Ox0dea: Like, science-wise.
[19:09:49] apeiros: and yeah, IMO anything sufficiently large will quickly be messy without classes.
[19:09:52] bean: Unless you like polluting the global namespace.
[19:10:17] blub: sometimes oo isnt the tidiest way to compartmentalise
[19:10:28] hxegon: has joined #ruby
[19:10:35] c-c: >> $evil_polutions_var
[19:10:37] ruboto: c-c # => nil (https://eval.in/483519)
[19:10:45] Ox0dea: Are we about to bikeshed on what color we should paint the black box?
[19:10:57] jhass: blub: and I'd say for those cases Ruby simply is the wrong language then. Nothing wrong about that
[19:11:18] jhass: Ox0dea: #010101, we can save so much ink!
[19:11:37] Ox0dea: It's brilliant!
[19:11:40] aryaching: has joined #ruby
[19:12:28] blub: ya sure, i was just responding to people saying you don't have to use classes, because for a clean, larger program in ruby, you kind of do
[19:12:36] Ox0dea: More people should use Whitespace; it's the most environmentally friendly language.
[19:12:52] tomphp: has joined #ruby
[19:13:22] baweaver: has joined #ruby
[19:13:22] B1n4r10: has joined #ruby
[19:13:28] jhass: Ox0dea: given you use a black backgrounded editor of course
[19:13:40] Ox0dea: Also AMOLED.
[19:13:55] c-c: are you using classes as synonym for modules?
[19:13:57] Ox0dea: Also nobody prints computer programs anymore. :<
[19:13:58] jhass: Ox0dea: actually do you know how much chemicals are needed to get truly white paper?!
[19:14:16] hxegon: Ox0dea: I print my programs on a typewriter in a starbucks
[19:14:26] Ox0dea: jhass: Are there quite so many?
[19:14:51] Ox0dea: hxegon: Then you are under something vaguely resembling a moral compunction to learn Whitespace. :P
[19:15:10] hxegon: double tab master race
[19:15:39] shevy: ohhh starbucks brogramming
[19:15:46] chipotle: has joined #ruby
[19:16:10] Ox0dea: hxegon: http://compsoc.dur.ac.uk/whitespace/tutorial.html
[19:16:37] Ox0dea: I suppose you didn't intend to convey that heap access is the best part of programming in Whitespace?
[19:17:24] c-c: I suppose you thought you were in -offtopic?
[19:17:31] Ox0dea: Calm down.
[19:17:36] hxegon: Ox0dea: what the f*ck... This person needs to stop programming over an indian burial ground
[19:17:52] Ox0dea: hxegon: Which person is that? (I speak Whitespace fluently.)
[19:18:00] c-c: ACTION 's feelings are also off-topic
[19:18:51] puria: has joined #ruby
[19:18:52] skade: has joined #ruby
[19:19:10] Ox0dea: >> Array.is_a? Module # c-c
[19:19:11] ruboto: Ox0dea # => true (https://eval.in/483527)
[19:19:32] Ox0dea: Classes are essentially just instantiable modules in Ruby.
[19:19:33] tomphp: has joined #ruby
[19:19:54] c-c: try again
[19:20:13] c-c: Classes are a subclass of ......?
[19:20:33] Ox0dea: Are you saying that classes aren't modules?
[19:20:36] shevy: it feels weird if you want to make up a distinction between modules and classes in ruby really
[19:21:01] apeiros: c-c: classes are subclasses of what you specify it to be (default Object). Class is subclass of Module.
[19:21:07] Ox0dea: The only distinction of genuine consequence is instantiability.
[19:21:15] apeiros: ACTION wondering about the point
[19:21:16] c-c: apeiros wins
[19:21:36] Ox0dea: c-c: Did you know that Ruby classes were modules?
[19:21:44] tomphp: has joined #ruby
[19:21:56] shevy: we can define #new for modules too!
[19:22:09] apeiros: shevy: we can't allocate them, tho, and hence not instantiate.
[19:22:09] Ox0dea: And define it to return what?
[19:22:23] c-c: No, I always thought modules were superclasses of classes
[19:22:32] shevy: perhaps one can use Fiddle to access to that allocate thing
[19:22:40] Ox0dea: Why on earth are you talking in the plural for this?
[19:23:21] apeiros: a module is not a superclass. but it ends up in the ancestry via include/extend
[19:23:28] apeiros: (not sure how prepend works)
[19:23:32] Ox0dea: Same idea.
[19:23:43] Ox0dea: Just sticks it at the front of the ancestor chain.
[19:23:59] eam: one can claim that any object in a language is a class, of course
[19:24:00] apeiros: mhm, that was my assumption
[19:24:09] apeiros: eam: how so?
[19:24:14] eam: apeiros: what's a class?
[19:24:19] apeiros: eam: where?
[19:24:24] Ox0dea: >> m = Module.new; Class.new.prepend(m).ancestors[0] == m
[19:24:25] ruboto: Ox0dea # => true (https://eval.in/483528)
[19:24:27] eam: I'm asking for your definition so I can show you
[19:24:40] shevy: a class is a blueprint for an object!
[19:24:49] apeiros: eam: and I ask you for which definition. there's "generic" and there's "in language X"
[19:25:00] eam: any is fine
[19:25:05] c-c: apeiros: I don't believe you - irb told me different!
[19:25:12] c-c: >> Class.superclass
[19:25:13] ruboto: c-c # => Module (https://eval.in/483529)
[19:25:22] apeiros: c-c: Module isn't a module
[19:25:29] Ox0dea: Still on irb after nine years?
[19:25:41] bean: ACTION points out that Pry is pretty cool.
[19:25:43] shevy: shows you how good irb is
[19:25:45] eam: you can have object oriented design in a language without classes, and non-object oriented design in a language with (almost) nothing but classes
[19:25:48] c-c: Irb-envy much?
[19:25:55] Ox0dea: No, Pry is amazing.
[19:26:04] calderonroberto: has joined #ruby
[19:26:06] apeiros: eam: ok, my generic definition would be about "a class is a template for its instances, defines the methods and attributes of its instances"
[19:26:14] apeiros: informal, mind you
[19:26:20] eam: ok so a C integer is a class?
[19:26:31] eam: it's a template for its instances, defining its data and behavior
[19:26:41] apeiros: eam: what are the instances of a C integer?
[19:26:42] shevy: hmm... do you instantiate a C integer?
[19:26:55] Ox0dea: Is that instantiation?
[19:27:00] apeiros: eam: but 0x123 is a C integer. does that mean it's its own instance?
[19:27:01] eam: it is when sitting in memory
[19:27:12] eam: by definition
[19:27:24] Ox0dea: A wild existence proof appeared!
[19:27:25] c-c: eam class based OO is just one way to realize the 4 base concepts of OO
[19:27:28] Ox0dea: It's not very effective...
[19:27:30] eam: the same reason a ruby object is an instance of a class when sitting in memory
[19:27:36] dangerousbeans: has joined #ruby
[19:27:58] c-c: eam: a C integer probably leaves 2 out of 4 unimplemented
[19:28:01] eam: you may use any proof as one for the other
[19:28:15] codelurker: has joined #ruby
[19:28:56] shevy: c-c 4 base concepts?
[19:29:19] eam: this is where we have an uncomfortable chat about polymorphism in ruby
[19:29:36] apeiros: eam: given that the C integer does not define methods, lacks a class definition, I'd say no, it's not a class by my own definition.
[19:29:40] Ox0dea: eam: Seen Ova? :P
[19:29:47] eam: it does have methods, and it has a clear definition
[19:29:55] c-c: shevy: Abstraction, Encapsulation, Inheritance, Polymorphism
[19:29:56] eam: in fact, the methods are implemented in hardware ...
[19:30:00] uris: has joined #ruby
[19:30:05] apeiros: and different "instances" of 0x123 in memory are more like copies than instances of a template.
[19:30:21] apeiros: eam: there's a difference between a function and a method
[19:30:37] apeiros: what you describe are functions. and the hardware functions actually care little that they deal with integers.
[19:30:40] eam: I like where c-c was going, but only because it undermines the idea that ruby is OO ;)
[19:30:53] Ox0dea: Where was c-c going?
[19:30:54] eam: apeiros: methods are functions attached to an object
[19:31:03] pdoherty: has joined #ruby
[19:31:09] apeiros: eam: meh, it only works if you allow arbitrarily twisting accepted terms.
[19:31:15] eam: yes, that's my point
[19:31:22] c-c: eam: ok, tell me how, too?
[19:31:24] apeiros: eam: you can make a chair a table with that
[19:31:28] apeiros: eam: and that's utterly pointless.
[19:31:28] lubarch: has joined #ruby
[19:31:29] lubarch: has joined #ruby
[19:31:40] eam: apeiros: it's either pointless or it's the crux of this issue
[19:31:43] juddey: has joined #ruby
[19:31:44] shadoi: has joined #ruby
[19:32:02] apeiros: eam: communication isn't hard science. trying to force it to be one is silly.
[19:32:14] c-c: semantics
[19:32:21] Ox0dea: Facetious.
[19:32:45] eam: apeiros: I agree, but that statement bolsters my point I think
[19:32:48] apeiros: eam: if we'd go on that route, I could simply just say "everything you say is wrong"
[19:33:10] eam: after all, I'm the one saying these semantics around OO are being oversold
[19:33:12] apeiros: eam: I'd disagree
[19:33:59] apeiros: eam: I'd agree that the borders are blurred
[19:34:00] Ox0dea: Let's all turn to Ecclesiastes 1.
[19:34:20] Ox0dea: That Solomon fella was onto somethin'.
[19:34:22] apeiros: eam: I'd agree that you can apply the way you think about one thing to another which is not considered to be using the same systematics
[19:34:40] apeiros: eam: but I'd also strongly disagree that using the terminology of the other systematics is a sane idea.
[19:34:54] dlitvak: has joined #ruby
[19:36:02] apeiros: eam: and also, where you're going at is related to what I referred to as "class in general" vs. "class in C"
[19:36:04] dfockler: All my functions in Clojure are just methods on an anonymous singleton class
[19:36:11] apeiros: s/C/language X/
[19:36:13] eam: apeiros: sure
[19:36:43] eam: dfockler: a C object file is a compiled class
[19:36:50] eam: it contains data and methods
[19:37:40] eam: my point is that the structure of the code matters a lot more than the makeup of the individual elements
[19:38:01] pdoherty_: has joined #ruby
[19:38:01] replay: has joined #ruby
[19:38:03] apeiros: that casually ignores social effects
[19:38:03] exm: has joined #ruby
[19:38:17] c-c: And thats why I use a global variable.
[19:38:20] eam: apeiros: actually I think it puts them forward as most important
[19:38:22] apeiros: we structure code around an idea because it conveys ideas too
[19:39:43] tomphp: has joined #ruby
[19:39:46] Ox0dea: >> singleton_class.name # dfockler
[19:39:47] ruboto: Ox0dea # => nil (https://eval.in/483532)
[19:40:00] Ox0dea: That is, aren't all singleton classes anonymous?
[19:40:03] kirun: has joined #ruby
[19:40:28] ap4y: has joined #ruby
[19:40:38] Ox0dea: >> C = singleton_class; singleton_class.name # Slightly spooky.
[19:40:39] ruboto: Ox0dea # => "C" (https://eval.in/483533)
[19:41:13] snguyen: has joined #ruby
[19:41:16] eam: Ox0dea: ARGF
[19:41:31] Ox0dea: Y'got me.
[19:41:39] yqt: has joined #ruby
[19:42:12] dfockler: Understanding the mental model of Ruby is a lot different than C, that's why we have Ruby
[19:43:38] zarubin: has joined #ruby
[19:44:33] Ox0dea: C has objects, and it can of course be made to do object-orientation, but I don't think it's useful to say that it has classes out of the box.
[19:46:23] c-c: Weird that the YAML parser chokes on yaml directive
[19:46:28] exm: has left #ruby: ()
[19:47:00] codeurge: has joined #ruby
[19:47:24] tomphp: has joined #ruby
[19:47:29] tenderlove: has joined #ruby
[19:48:02] jgt4: has joined #ruby
[19:51:44] eam: Ox0dea: out of the box is something else entirely. I'm talking about how people can do non-OO in ruby, or OO-in C
[19:51:52] davejlong: has joined #ruby
[19:52:16] eam: it's a paradigm
[19:52:46] ur5us: has joined #ruby
[19:52:49] Ox0dea: eam: Where do you put custom methods on `int` in C?
[19:53:15] eam: in the symbol table
[19:53:37] akem: has joined #ruby
[19:53:42] c-c: >> require "yaml"; YAML::parse("--- %YAML:1.0")
[19:53:44] ruboto: c-c # => (<unknown>): found character that cannot start any token while scanning for the next token at line 1 ...check link for more (https://eval.in/483534)
[19:53:45] Ox0dea: But surely you appreciate the difference between `int` and some `struct number` with fields containing function pointers?
[19:54:01] blub: blah foo(int x);
[19:54:01] c-c: The Yaml spec says thats a normal directive (after '%').
[19:54:06] eam: not really, but that's probably because I have a lot of experience with Perl's OO structure
[19:54:18] eam: in which every symbol table namespace (aka package) is a class
[19:55:24] eam: the method does not necessarily have to be stored with the class in any way
[19:55:26] c-c: >> require "yaml"; YAML::parse("---/n %YAML:1.0")
[19:55:28] ruboto: c-c # => #<Psych::Nodes::Document:0x422a3ce8 @children=[#<Psych::Nodes::Scalar:0x422a3c98 @value="---/n %YAML ...check link for more (https://eval.in/483535)
[19:55:32] eam: merely linked logically
[19:55:43] c-c: so, thats how its solved
[19:57:00] Ox0dea: eam: But we already have "function" for that concept; why strive for needless confusion?
[19:57:14] eam: it's a function if used with that paradigm
[19:57:20] eam: it's a method if used as a method
[19:58:41] futilegames: has joined #ruby
[20:00:06] eam: that is, in perl, I might say Foo::Bar::baz($thing, $input) or $thing->baz($input) and I'd call the former a function and the latter a method -- what matters is how we decide to use 'em
[20:00:43] dmolina: has joined #ruby
[20:00:50] eam: (those expressions are equivalent)
[20:01:01] futilegames: has left #ruby: ()
[20:01:17] User458764: has joined #ruby
[20:03:16] Ox0dea: Perl changes people, man. :P
[20:03:38] c-c: Perl, not even once.
[20:05:02] citrusfizz: has joined #ruby
[20:05:15] craysiii: has joined #ruby
[20:06:32] devoldmx: has joined #ruby
[20:07:11] Eiam: has joined #ruby
[20:07:29] ethe: has joined #ruby
[20:07:49] citrusfizz: trying to understand ruby cuz i have to learn some code another guy left behind at work. sorry for the dumb questions.
[20:07:57] citrusfizz: i see this line in the code
[20:07:59] citrusfizz: Dir::mkdir("logs") unless File.directory?("logs")
[20:08:14] citrusfizz: what does the double colon mean between Dir::mkdir
[20:08:22] apeiros: invoke the method
[20:08:34] citrusfizz: why not write it, dir.mkdir
[20:08:36] apeiros: mind you, it's rather uncommon nowadays to use :: to invoke a method
[20:08:38] citrusfizz: what thes advantage
[20:08:41] c-c: Dir and File are methods
[20:08:56] c-c: Dir and File are modules
[20:09:10] c-c: and ::nnnnn and .nnnn are calls to methods inside
[20:09:31] jhass: citrusfizz: there's non these days, it's just legacy
[20:09:35] pipework: apeiros: I don't know, I've used top-level namespace method references before like that ::my_lulz_method
[20:09:44] apeiros: c-c: Dir and File are classes.
[20:09:46] eam: I'd have just written Dir.mkdir "logs" rescue true
[20:09:55] Ox0dea: apeiros: Classes are modules. :P
[20:10:10] apeiros: pipework: so you write uncommon code then :-p
[20:10:11] pipework: modules are modules.
[20:10:12] c-c: apeiros is right, I'm being sloppy here
[20:10:20] apeiros: ACTION smacks Ox0dea around a bit with a large module
[20:10:26] pipework: apeiros: Egh, sometimes I just stick a method on the top level for debugging.
[20:10:34] troulouliou_dev: has joined #ruby
[20:10:38] apeiros: pipework: why use :: to invoke it?
[20:10:39] pipework: Other times, it's the only entrypoint to my application. :D
[20:10:43] yfeldblum: has joined #ruby
[20:10:59] pipework: apeiros: How else will I reference the top level namespace when I'm in other namespaces?
[20:11:06] apeiros: I mean I won't even go as far as criticize the use of toplevel methods, but :: to invoke methods is IMO rather ugly.
[20:11:07] RegulationD: has joined #ruby
[20:11:16] Ox0dea: pipework: It'd work without the :: as long as the names didn't conflict.
[20:11:33] Ox0dea: Top-level methods go on Object.
[20:11:50] renderful: has joined #ruby
[20:12:07] Ox0dea: >> method(def foo; end).owner
[20:12:08] ruboto: Ox0dea # => Object (https://eval.in/483537)
[20:12:11] dlitvak: has joined #ruby
[20:12:15] shevy: I see a lot of :: in old ruby code :(
[20:12:19] pipework: Ox0dea: Oh, whale, yeah.
[20:12:29] jetpackjoe: has joined #ruby
[20:12:31] troulouliou_dev: has joined #ruby
[20:12:35] Ox0dea: pipework: So stop using :: so it can be repurposed for Ruby 3! :P
[20:12:38] shevy: why are you people calling to whales
[20:13:08] pipework: Ox0dea: :DDD
[20:13:08] citrusfizz: kinda odd that he chose to write :: in the same line as File.Directory
[20:13:15] citrusfizz: what not use one or the other, why both?
[20:13:28] Ox0dea: citrusfizz: They did it to make you mad.
[20:13:42] apeiros: citrusfizz: we don't know.
[20:13:47] apeiros: you'll have to ask the author
[20:14:09] eam: probably because they were copying and pasting from two different examples
[20:14:12] Ox0dea: s/author/perpetrator/
[20:14:31] apeiros: pipework: re toplevel methods: if you have to use them, do it right and define them as `module Kernel; module_function foo; ???; end`
[20:14:44] apeiros: pipework: that's how all your other pseudo-functions work, like puts, require et al
[20:14:45] ramfjord: has joined #ruby
[20:15:12] apeiros: (better yet, though: don't)
[20:15:20] citrusfizz: eam: that sounds like the most probably answer
[20:17:17] shanemcd: has joined #ruby
[20:17:32] tenderlove: has joined #ruby
[20:18:09] tenderlove: has joined #ruby
[20:19:28] colleenmcguckin: has joined #ruby
[20:20:03] rdavila: has joined #ruby
[20:20:16] pipework: apeiros: No, I'm a terrible person, I don't want it available on every object necessarily, but when you define a method on the top level, it does go on the Object class, doesn't it?
[20:20:56] dlitvak: has joined #ruby
[20:21:56] Papierkorb: pipework: it doesn't
[20:22:22] Papierkorb: >> self == Object
[20:22:24] ruboto: Papierkorb # => false (https://eval.in/483540)
[20:22:40] Papierkorb: >> self.is_a? Object
[20:22:41] ruboto: Papierkorb # => true (https://eval.in/483541)
[20:23:02] Ox0dea: Papierkorb: It does.
[20:23:24] [Butch]: has joined #ruby
[20:23:27] Papierkorb: >> def foo; "foo!"; end; Object.new.foo
[20:23:28] ruboto: Papierkorb # => private method `foo' called for #<Object:0x41e40e58> (NoMethodError) ...check link for more (https://eval.in/483542)
[20:23:34] E_W: has joined #ruby
[20:23:36] Ox0dea: The implicit receiver != the default definee.
[20:23:58] apeiros: >> def foo; "foo!"; end; Object.new.send(:foo) # pipework
[20:23:59] ruboto: apeiros # => "foo!" (https://eval.in/483543)
[20:24:03] apeiros: whoops, Papierkorb ^
[20:24:17] apeiros: so yes, it goes into Object
[20:24:23] apeiros: at least ruby is sensible enough to make it private
[20:24:31] apeiros: which you have to remember yourself when adding to Kernel
[20:24:39] Ox0dea: >> method(def foo; end).owner # I'll just put this here once more.
[20:24:41] ruboto: Ox0dea # => Object (https://eval.in/483544)
[20:25:02] apeiros: main is a bit special
[20:25:16] govg: has joined #ruby
[20:25:21] User458764: has joined #ruby
[20:26:06] sandstrom: has joined #ruby
[20:27:16] Authenticator: Why do threads get deleted from a ThreadGroup when they die? I was hoping to use it as a way to map the values out later.
[20:27:34] citrusfizz: does Bundler.require(:default) just load all gems in the Gemfile for the application?
[20:27:48] kappy: has joined #ruby
[20:29:16] bluOxigen: has joined #ruby
[20:29:23] stannard: has joined #ruby
[20:29:42] tAn: has joined #ruby
[20:31:36] SCHAAP137: has joined #ruby
[20:32:02] stannard: has joined #ruby
[20:32:12] Ox0dea: has joined #ruby
[20:32:45] Coldblackice: has joined #ruby
[20:32:47] ESpiney: has joined #ruby
[20:34:23] dlitvak: has joined #ruby
[20:35:21] calderonroberto: has joined #ruby
[20:36:12] duderonomy: has joined #ruby
[20:36:13] cpup: has joined #ruby
[20:36:17] dlitvak: has joined #ruby
[20:37:45] pushpak: has joined #ruby
[20:39:07] _stu_: has joined #ruby
[20:39:15] neanderslob: has joined #ruby
[20:39:36] adac: has joined #ruby
[20:41:55] c-c: link me to a github repo that had well organized project in your opinion!
[20:42:18] DrCode: has joined #ruby
[20:42:53] Xiti: has joined #ruby
[20:42:53] craysiii: bam https://github.com/mgba-emu/mgba
[20:43:27] davedev24: has joined #ruby
[20:43:51] c-c: thank you
[20:43:54] c-c: any ruby ones?
[20:44:22] kobain: has joined #ruby
[20:45:27] craysiii: https://github.com/stympy/faker
[20:47:11] dlitvak_: has joined #ruby
[20:47:38] mustmodify: has joined #ruby
[20:47:54] pandaant: has joined #ruby
[20:48:20] tenderlove: has joined #ruby
[20:48:40] B1n4r10: has joined #ruby
[20:48:58] tenderlove: has joined #ruby
[20:49:37] d5sx43: has joined #ruby
[20:49:52] mustmodify: Somewhere in my brain, something tragic happening. I have a collection of 300 objects stored as a constant. If I add another attribute to those objects, and that attribute is ... say... 20 characters on average, does that mean I'll add 300*20=6000k or about 5MB more memory? That's can be right.
[20:50:06] baweaver: has joined #ruby
[20:50:31] mustmodify: ok 6000 bytes. I can live with that.
[20:50:37] lubarch: has joined #ruby
[20:50:38] lubarch: has joined #ruby
[20:50:46] agit0: has joined #ruby
[20:53:03] tulak: has joined #ruby
[20:53:54] kadoppe: has joined #ruby
[20:56:23] Pumukel: has joined #ruby
[20:57:10] mikhailvs: has joined #ruby
[20:57:24] dorei: is there some standalone gem for validations?
[20:57:48] mikhailvs: Hey guys, is there a way to make a required ruby file not actually include anything if the platform is jruby?
[20:58:28] Ox0dea: >> require 'objspace'; (11..13).map { |n| ObjectSpace.memsize_of('x' * n) } # mustmodify
[20:58:29] ruboto: Ox0dea # => [20, 33, 34] (https://eval.in/483564)
[20:58:42] Ox0dea: Something to bear in mind if you're worried about memory.
[20:58:43] adaedra: mikhailvs: require is an instruction like any other; you can place it in a if block.
[20:59:13] c-c: mikhailvs: you mean something like: require 'file' unless platform == 'jruby'
[20:59:31] mustmodify: dorei: ActiveModel has one. :)
[20:59:33] Ox0dea: But perhaps mikhailvs has no control over this particular file being required?
[20:59:39] lubarch: has joined #ruby
[20:59:39] lubarch: has joined #ruby
[20:59:41] mikhailvs: well i have a directory with files that have sinatra routes
[20:59:45] mikhailvs: that get auto loaded
[21:00:07] mikhailvs: but i basically wanna be able to say in one of those route files "if the platform is jruby pretend you're blank"
[21:00:15] mikhailvs: without having a huge if block around everything
[21:00:48] Ox0dea: Sounds like you get to have some architecture.
[21:01:04] mustmodify: you could throw a "I do not like JRuby" exception at the top of the file... :)
[21:01:06] Ox0dea: `draw_foo_routes unless bar`
[21:01:12] c-c: whats "auto loading", thats probably where you want the condition
[21:02:02] Ox0dea: Why'd you put it in quotes?
[21:02:16] mikhailvs: my thought initially was doing a "raise blah if platform == jruby" at the top of such files, then in the loading section catching that particular one and not loading it... just wondering if there's another way like "exit" but that doesnt kill the whole script
[21:02:26] mikhailvs: mustmodify thats what i was thinking
[21:02:40] baweaver: has joined #ruby
[21:02:50] lubarch: has joined #ruby
[21:02:50] lubarch: has joined #ruby
[21:03:11] c-c: why start evaling them in the first place...
[21:03:16] ramfjord_: has joined #ruby
[21:03:19] Ox0dea: mikhailvs: How about wrapping everything in a Proc and invoking #call thereupon only as appropriate?
[21:03:43] mikhailvs: that doesn't feel quite as clean...
[21:03:54] mikhailvs: i guess i'll go with the exception throwing idea
[21:04:12] Ox0dea: mikhailvs: I mean, you're letting petty indentation quibbles decide the structure of your code, no?
[21:04:21] mustmodify: mikolalysenko: that was kind of a joke.
[21:04:45] c-c: you are not solving the problem, you are just applying a cure
[21:04:47] mustmodify: and anyway, you would beed a "big block around everything" to catch said exception, so it's not really doing you any favors.
[21:04:47] c-c: bad pattern
[21:04:51] cassioscabral: has joined #ruby
[21:05:03] mustmodify: s/beed/need/
[21:05:07] mikhailvs: i guess here is my exact situation
[21:05:09] Ox0dea: mikhailvs: This *is* about indentation, right?
[21:05:17] mustmodify: plus, iirc, exception handling is much slower than ... most other stuff.
[21:05:30] mikhailvs: but it'll only do the exception handling once on the app load
[21:05:36] mikhailvs: most of my app is okay being ruby
[21:05:42] mustmodify: mikhailvs: bad plan. do not go that route.
[21:05:42] dlitvak: has joined #ruby
[21:05:44] mustmodify: it was a joke.
[21:05:57] thiagofm: has joined #ruby
[21:06:07] treehug88: has joined #ruby
[21:06:17] bahar: has joined #ruby
[21:06:22] mustmodify: hold on let me look at something
[21:07:16] Ox0dea: mikhailvs: Why not monkey-patch Kernel#require? :P
[21:07:30] mikhailvs: Most of my routes in my app are fine with being plain ruby, the only ones that need jruby are handling pdf processing (using pdfbox). I'm using haproxy to go between the two instances (one being mri, the other jruby) i want to be able to launch the app the same way on different platforms (mri/jruby) just, in such a way that the mri one doesnt load the jruby specific stuff
[21:07:54] mikhailvs: mustmodify: why is the exception thing a bad idea?
[21:08:14] Ox0dea: It's wasteful and you don't actually gain anything.
[21:08:24] Cohedrin: has joined #ruby
[21:08:29] mikhailvs: what is it wasting?
[21:08:37] Ox0dea: Exceptions are expensive.
[21:08:56] mikhailvs: yeah, but the app will load <100 files and the exception handling will only happen once
[21:09:07] c-c: interesting, someone killed the local DNS
[21:09:27] Ox0dea: mikhailvs: I thought it was just one file of routes that you didn't want drawn?
[21:09:54] mikhailvs: i have a file structure like components/*.route.rb
[21:10:03] mikhailvs: loaded with a loop in a main app.rb
[21:10:15] mikhailvs: like 3 of the files i dont want to load unless it's running on jruby
[21:10:20] Ox0dea: Is your naming sufficiently granular that you could do the conditional at the filename level?
[21:10:33] mikhailvs: how do you mean?
[21:10:47] Ox0dea: Do you know which three files you don't want to load on MRI?
[21:11:12] idakyne: has joined #ruby
[21:11:27] citrusfizz: why does rand(0) return a value between 0-1 like 0.23423452
[21:11:38] Ox0dea: mikhailvs: Sounds like patching Kernel#require is the right way to go.
[21:11:41] pipework: Ox0dea: It makes me sad when rails developers use exceptions for control flow within their controllers for responses. :(
[21:12:11] Ox0dea: Easy, though. :<
[21:12:19] Ox0dea: mikhailvs: I was only kidding, mind.
[21:12:24] mikhailvs: pipework it wouldn't be for control flow
[21:12:28] Ox0dea: citrusfizz: Because that's useful.
[21:12:39] Ox0dea: `rand(0)` == `rand`
[21:13:15] Ox0dea: This behavior is documented quite plainly, and I don't see why you'd want it any other way.
[21:13:18] mikhailvs: i might be being insecure but i truly don't see an issue with using exceptions for this
[21:13:35] mikhailvs: it wouldn't affect the routing at all
[21:14:01] Ox0dea: mikhailvs: Which exception will you catch?
[21:14:12] citrusfizz: i'm sure its useful, it just wasn't making logic sense to me
[21:14:16] mikhailvs: let me write up a single thing that explains it
[21:14:24] mustmodify: mikhailvs: pasting it would take too long, but using exceptions take 10x as long in my quick test. But more importantly, exceptions are designed to stop the flow of your application when something goes unexpectedly, horribly wrong.
[21:14:27] mikhailvs: im talking in fragments and it's confusing
[21:14:39] mustmodify: Second, I think you might consider a microservice, which it seems would solve this problem.
[21:15:09] dcope: has left #ruby: ()
[21:15:21] bahar: has joined #ruby
[21:15:50] SCHAAP137: has joined #ruby
[21:18:01] pietr0: has joined #ruby
[21:18:35] mikhailvs: http://pastebin.com/WniCD550
[21:18:36] ruboto: mikhailvs, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/9d8b54ee76bdfaebb11b
[21:18:36] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[21:19:02] mikhailvs: sorta like this
[21:19:50] davedev24: has joined #ruby
[21:20:56] djbkd: has joined #ruby
[21:21:28] c-c: can you not just
[21:22:46] talntid: has joined #ruby
[21:22:57] c-c: >> filelist = Dir["**/*.routes.rb"]; arr.map { |fn| require fn unless blacklist.contains[fn]; }
[21:22:59] ruboto: c-c # => undefined local variable or method `arr' for main:Object (NameError) ...check link for more (https://eval.in/483568)
[21:23:55] mikhailvs: c-c: i could yes. what would the advantage be though?
[21:24:13] colleenmcguckin: has joined #ruby
[21:24:31] mustmodify: mikolalysenko: when you say this is a "routes" file... what does that mean?
[21:24:32] c-c: not requireing the files you don't want? obviously you need to add the correct files to the blacklist depending on platform
[21:24:47] howdoico1: has joined #ruby
[21:24:56] uri___: has joined #ruby
[21:25:04] InvGhost: has joined #ruby
[21:25:13] mustmodify: you save a trip to the hard drive and don't have to rescue an exception. That's what you get.
[21:25:56] mustmodify: you could change your file naming scheme to include something like blah_jruby.rb and skip files with _jruby in the filename. Not great but better than rescuing.
[21:26:07] InvGhostt: has joined #ruby
[21:26:10] mustmodify: convention over... rescuing I always say!
[21:26:16] mikhailvs: im starting to feel like i'm just pestering you guys with this trivial thing... but still... why is it a big deal, if that code only runs once when the app is loading
[21:26:40] mustmodify: well, here's the thing.
[21:26:44] c-c: seems kind of weird to make an exception when you know all these things
[21:27:05] mustmodify: You *could* use the butt of a screwdriver to drive (most) nails.
[21:27:13] mustmodify: And if someone wants to do that, fine.
[21:27:18] mustmodify: I mean, I think that's a bad plan.
[21:27:27] mustmodify: but it will probably work.
[21:27:32] mustmodify: Or you could use a hatchet.
[21:27:39] mustmodify: again, strange, but it *will work.*
[21:27:43] mustmodify: But I suggest a hammer.
[21:27:50] mustmodify: and that's why.
[21:28:17] cpup: has joined #ruby
[21:28:38] zarubin: has joined #ruby
[21:28:49] mustmodify: Exceptions serve a specific purpose. They handle catastrophic failures that should bring the code into a whole different code-path.
[21:29:12] c-c: craysiii: that faker project looks nice, except for one thing, dozens of require statements in faker.rb
[21:29:15] mustmodify: I mean, I could test to see if there is a user in my app, and if not, raise an exception, then catch that exception, and use that to take someone to the login page.
[21:29:27] Ox0dea: c-c: Because granularity is a bad thing?
[21:29:30] mikhailvs: mustmodify i agree exceptions arent the best approach, hence why i asked in the first place
[21:29:55] mustmodify: mikhailvs: I was responding to your question... "why is it a big deal"
[21:29:59] c-c: Ox0dea: granularity?
[21:30:03] mikhailvs: i understand
[21:30:07] Ox0dea: c-c: I am not your dictionary.
[21:30:18] c-c: Ox0dea: talking about faker or mikhailvs's prob?
[21:30:41] Ox0dea: It's done that way so that you can pick and mix.
[21:30:48] mikhailvs: has left #ruby: ()
[21:31:09] c-c: thats not obvious from first glance
[21:31:12] Ox0dea: Yes, it is.
[21:31:31] Ox0dea: Especially for somebody who's "done Ruby" since 2006.
[21:31:47] pipework: Ox0dea: Was it obvious pre-first glance?
[21:31:58] dstarh: has joined #ruby
[21:31:59] Ox0dea: Yes, I didn't even go look.
[21:32:17] c-c: Ox0dea: I have no idea what the hell you are talking about, so I'll mark this under "needs a snicker"
[21:32:18] tomphp: has joined #ruby
[21:32:21] pipework: Ox0dea: I thought precogs preferred prolog.
[21:32:28] Ox0dea: c-c: Okay, bud. I'm only trying to help.
[21:32:34] mikhailvs: has joined #ruby
[21:32:34] uris: has joined #ruby
[21:33:02] Ox0dea: pipework: Who're you callin' a precog?!
[21:33:10] c-c: I would have just Dir["**/*.rb"].each{ |n| require n }
[21:33:32] c-c: well, maybe theres stuff down there that is not needed
[21:33:58] Ox0dea: mikhailvs has stuff that's conditionally needed.
[21:34:23] wsewolod: has joined #ruby
[21:34:40] c-c: Ox0dea: so, when did you start with ruby?
[21:34:44] Ox0dea: c-c: Tomorrow.
[21:34:49] citrusfizz: has joined #ruby
[21:35:47] adaedra: who needs a snicker now?
[21:35:57] c-c: I wonder if (&:require) would have worked
[21:36:09] Ox0dea: each(&method(:require))
[21:36:31] davedev24: has joined #ruby
[21:37:30] mikhailvs: yeah that's what i'm doing
[21:37:42] c-c: hm, that doesn't save chars, Ox0dea
[21:38:05] Ox0dea: You'll just have to deal with that.
[21:38:34] mary5030: has joined #ruby
[21:38:37] mikhailvs: it would save chars if u used map instead
[21:38:56] Ox0dea: >> module Foo; def self.twice x; x * 2 end end; [1,2,3].map &Foo.method(:twice) # c-c
[21:38:57] ruboto: Ox0dea # => [2, 4, 6] (https://eval.in/483575)
[21:39:01] Ox0dea: For your bag of tricks.
[21:39:16] xelkarin: has joined #ruby
[21:39:23] Ox0dea: It works because Method#to_proc does The Right Thing.
[21:40:13] nkts_: has joined #ruby
[21:40:25] pipework: Ox0dea: I guess you'd know if you were one.
[21:40:33] Ox0dea: If I were a bag of tricks?
[21:40:48] Ox0dea: Oh, I see what you did there.
[21:40:50] Ox0dea: pelican.jpg
[21:40:50] freerobby: has joined #ruby
[21:40:59] adaedra: Ox0dea is a large bag of tricks, with bonus fun.
[21:42:26] tenderlove: has joined #ruby
[21:43:07] tenderlove: has joined #ruby
[21:43:35] duncannz: has joined #ruby
[21:44:27] xelkarin: How would you define a class method in a Ruby C extension? I've tried rb_define_module_function, but that doesn't seem to work.
[21:44:34] colleenmcguckin: has joined #ruby
[21:44:54] Icey: what's the best way to deploy ruby onto a production server that doesn't require me to build from source on install?
[21:45:13] Icey: preferably, one that would work on centos + ubuntu
[21:45:36] mustmodify: has left #ruby: ()
[21:45:47] Ox0dea: xelkarin: rb_define_singleton_method().
[21:46:03] Ox0dea: That's all a class method actually is, y'know.
[21:46:14] adaedra: Icey: find a source with the right ruby version? For CentOS, there may be on SCL.
[21:47:22] skade: has joined #ruby
[21:47:37] c-c: you mean you used compiled ruby? how would you not build from source?
[21:48:22] xelkarin: 0x0dea: cool thanks. I also noticed I had a typo in my method name.
[21:48:49] Icey: c-c I *could* use something like RVM to install ruby onto a box but I'd rather have a single version of ruby installed and not leave RVM lying around
[21:49:04] Icey: that said, it may be smoother to globally install RVM, install ruby, and remove RVM
[21:49:24] adaedra: Icey: SCL has Ruby 1.9, 2.0 and 2.2 for CentOS 6 and 7.
[21:49:34] Icey: but I can't use SCL for Ubuntu
[21:49:41] Icey: I can use the Brightbox PPAs for Ubuntu
[21:49:48] Icey: hence, cross platform
[21:50:01] InvGhostt: has joined #ruby
[21:50:10] Icey: here's hoping somebody's figured this out since I last had to deal with all of it :-P
[21:50:10] sdothum: has joined #ruby
[21:50:27] DurstBur1er: has joined #ruby
[21:50:31] jessemcgilallen: has joined #ruby
[21:50:43] adaedra: That's imo the best solution, as it is managed by your system. Just have to install the repositories and install the packages. Not exactly cross-platform, but works.
[21:50:57] c-c: Icey: ok, I see now what you are after
[21:51:12] c-c: Icey: things like docker?
[21:51:22] adaedra: Icey: also, if you don't want to install full rvm, look at ruby-install.
[21:51:26] c-c: Icey: use an image for the OS/base
[21:51:36] Icey: rub-install still builds from source though (as far as I can tell)
[21:51:52] uri___: has joined #ruby
[21:51:55] hoylemd: has joined #ruby
[21:51:56] Icey: c-c I'm writing code that *could* be installed into a container but may as well be on the base machine
[21:51:58] adaedra: that was in response to "Icey that said, it may be smoother to globally install RVM, install ruby, and remove RVM"
[21:52:17] JDiPierro: has joined #ruby
[21:52:25] hoylemd: Hey, what do I need to `require` to get the `assert` function?
[21:52:55] hxegon: hoylemd: minitest? I'm not 100% on that though
[21:53:13] c-c: Icey: I might use a network install of debian, have a simple script that installs needed stuff from debian repo, then grabs the app code from git via ssh
[21:53:31] howdoico1: has joined #ruby
[21:54:18] c-c: debian uses binaries but then you are stuck with their releases
[21:54:22] azgil: has joined #ruby
[21:55:07] Ox0dea: hoylemd: Whatcha need it for?
[21:55:16] yeticry: has joined #ruby
[21:55:28] hoylemd: hmm. Im writing some capybara tests. I tried adding `require 'minitest'` to my capybara.rb file, but it didn't work
[21:55:44] azgil: list of todayflooders http://pastie.org/10624009
[21:55:50] hoylemd: says `undefined method 'assert'`
[21:56:09] Ox0dea: azgil: The #ruby leaderboard!
[21:56:33] steffkes: has joined #ruby
[21:56:33] steffkes: has joined #ruby
[21:56:41] adaedra: what's that
[21:57:02] Ox0dea: Today's speakers sorted by number of messages.
[21:57:21] c-c: Icey: its still a bit vague as to what you have and what you want to have
[21:57:23] adaedra: Yeah, this I see
[21:57:26] Ox0dea: Can't say when "today" started for azgil, though.
[21:57:29] jbrhbr: i guess i've only been a stalker today
[21:58:22] azgil: log doesnt contain my name
[21:58:26] azgil: http://irclog.whitequark.org/ruby/2015-12-10
[21:58:31] jordanm: has joined #ruby
[21:58:57] slact: has joined #ruby
[21:58:58] azgil: oops, my fault
[21:59:05] slact: hi rubists
[21:59:12] druonysus: has joined #ruby
[21:59:13] druonysus: has joined #ruby
[21:59:19] c-c: hi slact
[21:59:31] blub: hi slact
[21:59:51] slact: i want to open >10K sockets to benchmark some things. I'm doing it via Celluloid::IO. It crashes at about 11K open sockets, and i don't know why
[22:00:10] adaedra: Your system running out of ports, maybe.
[22:00:11] aspire: has joined #ruby
[22:00:11] Ox0dea: You're hitting a limit imposed by the OS, likely as not.
[22:00:18] tenderlove: has joined #ruby
[22:00:22] DurstBur2er: has joined #ruby
[22:00:29] jessemcgilallen: has joined #ruby
[22:00:37] slact: i'm not getting aports error, i resolved that already
[22:00:40] colleenmcguckin: has joined #ruby
[22:00:53] slact: and ulimit -n (file descriptors) is set to 100K
[22:00:55] jbrhbr: there's a max # for open files in the OS too
[22:00:55] adaedra: well then what's the error?
[22:00:58] tenderlove: has joined #ruby
[22:01:15] slact: The celluloid Actor just terminates
[22:02:30] mclong: has joined #ruby
[22:02:30] dfinninger: has joined #ruby
[22:03:18] skade: has joined #ruby
[22:03:29] rdavila: has joined #ruby
[22:04:00] Ox0dea: I can count to ten in ten languages.
[22:04:25] slact: has joined #ruby
[22:04:36] slact: oh man guys. i hit the swap pretty hard that time.
[22:04:43] adaedra: I can touch my nose with my thumb.
[22:04:52] c-c: so thats why
[22:04:57] c-c: slact: out of memory
[22:05:02] slact: no, that's not why. that was just another thing that happened
[22:05:04] Ox0dea: http://i.imgur.com/Ufbr5ej.gif
[22:05:06] Ox0dea: adaedra: ^
[22:05:22] slact: let me retry it
[22:05:40] adaedra: Ox0dea: wait a minute please. I wanted to try it, and now my eye hurts like hell.
[22:06:04] azgil: has left #ruby: ("Leaving")
[22:06:06] Ox0dea: The thumb is a comparatively sharp utensil.
[22:07:17] devoldmx: has joined #ruby
[22:07:25] inanepenguin: has joined #ruby
[22:07:58] slact: hmm.. it worked that time. I'm guessing this isn't ruby's fault.
[22:08:17] zeroDivisible: has joined #ruby
[22:08:26] slact: the same thing was happening with jruby and rubinius
[22:08:30] Ox0dea: Cause for celebration, that.
[22:08:37] Ox0dea: shevy: It wasn't Ruby's fault!
[22:09:14] slact: indeed. 10K connections is no laughing matter.
[22:09:18] slact: and in ruby, of all things
[22:09:29] slact: the fat lady -- she can run after all
[22:10:07] c-c: stop slandering Ox0dea
[22:10:32] slact: i don't think so
[22:10:42] Ox0dea: No, Ruby's a fucking dog. :/
[22:10:42] slact: she can sing, but i didn't know she could run, too
[22:11:15] c-c: isnt it kernel that opens those sockets
[22:11:55] Ox0dea: slact: Being IO-bound makes the choice of language matter considerably less.
[22:12:19] slact: it's for https://github.com/slact/nchan/blob/master/dev/pubsub.rb#L282 , in case anyone's curious
[22:12:33] slact: well, yes, but there was alsothe issue of crazy GC churn I had to overcome first
[22:13:07] slact: protip: reuse the same string as the buffer with buffer.clear
[22:13:11] c-c: local dns down again, so I can't read that
[22:13:18] kingofwolvez: has joined #ruby
[22:13:22] shadoi: has joined #ruby
[22:13:27] ByronJohnson: has joined #ruby
[22:13:42] Ox0dea: slact: Or #replace, even.
[22:14:22] peteyg: has joined #ruby
[22:14:24] azgil: has joined #ruby
[22:14:38] NightMonkey: has joined #ruby
[22:14:52] djbkd_: has joined #ruby
[22:15:40] replay: has joined #ruby
[22:15:55] michaeldeol: has joined #ruby
[22:16:22] romain_t: has joined #ruby
[22:16:35] marahin: has left #ruby: ("Leaving")
[22:17:20] znz_jp: has joined #ruby
[22:17:37] akem: has joined #ruby
[22:18:46] BSaboia: has joined #ruby
[22:19:18] yfeldblum: has joined #ruby
[22:20:21] tenderlove: has joined #ruby
[22:20:56] tenderlove: has joined #ruby
[22:22:08] blackgoat: has joined #ruby
[22:22:16] slact: things sure get tumbleweedy around here
[22:22:21] slact: i know! lua > ruby!
[22:22:30] TomPeed: !ban slact
[22:22:32] slact: flame on!
[22:22:42] Ox0dea: slact: Explain yourself.
[22:22:48] slact: lua >> ruby becasue lua < ruby
[22:23:08] Ox0dea: Our definitions of "explain" must surely differ. :P
[22:23:43] slact: also, the lua community has fewer hipsters
[22:23:56] slact: (now i've really done it)
[22:24:14] Ox0dea: Shittin' in all the corn flakes today, huh?
[22:24:42] slact: I prefer the term "chocolate-like nuggets"
[22:24:58] stannard: has joined #ruby
[22:25:16] hxegon: slact: actually been looking at lua lately, care to sum your exp with it for my lazy ass?
[22:25:51] hxegon: (so it stays on topic) compared with ruby at least?
[22:26:03] c-c: lua is like ruby-implementation of javascript 1.0
[22:26:09] slact: hxegon: sure. it's a tiny language, it doesn't come with batteries, it's got crazy-consistent syntax, it's nearly impossible to do cool one-liners
[22:26:33] hxegon: slact: very concise. thanks!
[22:26:35] sdothum: has joined #ruby
[22:26:43] slact: it's blazing fast, its strings are all immutable, all objects are tables with metaprogramming tables
[22:26:44] c-c: slact: what do you use nchan for?
[22:27:06] slact: it's a new thing i've been brewing for a few months
[22:27:08] blackgoat: has joined #ruby
[22:27:39] slact: for all my server-push needs
[22:27:58] c-c: ok, like a dating chat app?
[22:28:14] slact: yeah, or webRTC websocket server
[22:28:23] The_Phoenix: has joined #ruby
[22:28:34] slact: or collab document editing, whatever
[22:28:58] slact: i didn't want to jump ship to async apps
[22:29:16] slact: (i like my Racks, if you will)
[22:29:44] c-c: async apps == front+mongo?
[22:29:55] slact: so I made this thing as a shim between ye olde-fashioned web applications and users demanding realtime updates
[22:30:07] slact: or node stuff
[22:31:10] slact: you'll probably hear more about it in a few weeks -- i hope so, anyway. I'm writing benchmarking code for it so i can make some pretty graphs
[22:32:09] baweaver: has joined #ruby
[22:32:22] slact: 3 months of hardcore c with a dash of softcore ruby testing
[22:32:42] slact: well, the c wasn't that hardcore, i'm probably jut a c prude
[22:34:08] c-c: its more tedious than hardcore?
[22:34:32] c-c: yeah well
[22:35:04] slact: when I think "hardcore C", i think Carmack writing the Doom renderer
[22:35:29] azgil: nice channel's flooders analyzer http://pastie.org/10624082
[22:35:39] c-c: on an entirely differend end of the spectrum, I just managed to write 166 lines of yaml objects without a single error on the first parse
[22:35:49] c-c: ACTION has reached his peak
[22:36:07] slact: dat whitespace
[22:37:06] aibot: has joined #ruby
[22:38:51] blackgoat: has joined #ruby
[22:38:55] wsewolod: has joined #ruby
[22:39:12] seitensei: has joined #ruby
[22:39:13] seitensei: has joined #ruby
[22:40:10] c-c: ACTION dat feeling when your yml parses ostructs that parse into class definitions and the classes are successfully created
[22:40:27] c-c: give or take a "into"
[22:41:12] c-c: now, if I could only program my foot into a gun...
[22:41:42] ta: has joined #ruby
[22:42:21] juanpablo_: has joined #ruby
[22:42:51] delsol: has joined #ruby
[22:42:57] duderonomy: has joined #ruby
[22:43:10] hxegon: c-c: with a bit of commitment and a 3d printer, anything is possible
[22:44:22] delsol: OK, so I've got the new version of ruby compiled and installed.... and of course it doesn't have all of the gems the old version had installed, and thus my program won't run.
[22:44:25] c-c: sorry, busy with this shoot
[22:44:39] delsol: is there an easy way to grab all the old gems for the new version of ruby?
[22:44:45] hxegon: delsol: did you make a gemfile?
[22:45:11] delsol: hxegon: Didn't know I was supposed to.
[22:45:15] delsol: so... no.
[22:45:38] hxegon: delsol: they are super useful, and that would be the way to do it. Do you know what gems you were using?
[22:45:50] delsol: I've got another machine that is still running the old version
[22:46:08] delsol: so if there is an easy way to have it build the gemfile, and then I can import it on the machine with the new ruby.
[22:46:22] akem: has joined #ruby
[22:46:23] hxegon: delsol: try gem list on the old machine and see what is installed
[22:46:37] delsol: gem2 list gives me a nice list about a page long
[22:46:44] azgil: statistics for last 5 days http://pastie.org/10624116
[22:46:46] delsol: gem2 list on new install lists about 10....
[22:46:54] hxegon: gem list > Gemfile
[22:47:36] cscheib: has joined #ruby
[22:47:48] hxegon: if you use vim a macro would take care of that no problem, just remove anything that isn't a part of your app first
[22:48:08] delsol: K, so I've got the gemfile now
[22:48:22] hxegon: delsol: also, this is all the gems your app uses and *their* dependancies. usually you just want to use the top level gems your app utilizes.
[22:48:44] hxegon: so if it isn't explicitly required in your app, take it off the list.
[22:49:03] dfockler: has joined #ruby
[22:49:26] hobodave: has joined #ruby
[22:49:28] mozzarella: has joined #ruby
[22:50:17] cscheib: I can't figure out why the verses function in this code isn't returning anything but an empty string? It should have a bunch of text appended to it: https://gist.github.com/cscheib/3744b5d4ffc6e53157a1
[22:50:34] cscheib: (code, test cases, and test output posted)
[22:50:50] skade: has joined #ruby
[22:51:07] tenderlove: has joined #ruby
[22:51:12] htmldrum: has joined #ruby
[22:51:39] delsol: hxegon: so then to get those gems on the other machine, take gemfile and ?
[22:51:40] icbm: has joined #ruby
[22:51:46] tenderlove: has joined #ruby
[22:52:00] hxegon: you have to format the gemnames like this
[22:52:04] hxegon: gem 'sinatra'
[22:52:07] hxegon: one per line.
[22:52:11] c-c: cscheib: how about add: p "verse n: " + bottles to line 10
[22:52:40] hxegon: delsol: once that is finished, put the gemfile on the new environment and, provided you have bundler installed, run 'bundle install'
[22:53:11] delsol: drop version numbers?
[22:53:21] cscheib: c-c: the verse function seems to work fine if called inside the verses function manually
[22:53:31] cscheib: s/function/method/
[22:53:33] hxegon: delsol: yeah. You can specify version numbers, but it is smart enough to figure it all out most of the time.
[22:53:45] c-c: cscheib: did you also look into whats inside @beersong ?
[22:53:54] hxegon: delsol: are you using a ruby version manager?
[22:54:17] delsol: I don't think so.
[22:54:20] cscheib: c-c: yep, everything's working but the "verses" method (line 13)
[22:54:55] c-c: whats the error, then?
[22:55:10] cscheib: look at test_output.txt
[22:55:18] cscheib: https://gist.github.com/cscheib/3744b5d4ffc6e53157a1#file-test_output-txt
[22:55:28] c-c: ah, hidden conviniently
[22:55:38] jessemcgilallen: has joined #ruby
[22:55:54] cscheib: it's part of the gist, I can't help how they order it :P
[22:56:20] c-c: yup, had a terminal right in front of the rest of the page
[22:56:36] jhass: >> (8..6).to_a # cscheib
[22:56:38] ruboto: jhass # => [] (https://eval.in/483603)
[22:57:01] cassioscabral: has joined #ruby
[22:57:14] moeabdol: has joined #ruby
[22:57:56] ytti: interesting
[22:58:04] cscheib: jhass: you mean put .to_a before the .each_with_object ?
[22:58:08] ytti: (8..6).begin .end work, but .min, .max does not
[22:58:17] jhass: cscheib: no, I mean mediate on what I just demonstrated
[22:59:02] elton: has joined #ruby
[22:59:27] s00pcan: has joined #ruby
[23:00:03] platzhirsch: has joined #ruby
[23:01:09] inanepenguin: has joined #ruby
[23:01:13] JDiPierro: has joined #ruby
[23:01:34] platzhirsch: Do you think the .now domain will be very expensive? D:
[23:01:36] cscheib: jhass: so it doesn't like start being higher than end
[23:02:14] jhass: cscheib: if "doesn't like" is your description of "is defined to return an empty range in that case", yes
[23:02:32] diegoviola: has joined #ruby
[23:02:45] jhass: ?offtopic platzhirsch
[23:02:45] ruboto: platzhirsch, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[23:03:06] tenderlove: has joined #ruby
[23:03:15] c-c: >> (8...6).to_a
[23:03:16] ruboto: c-c # => [] (https://eval.in/483604)
[23:03:17] cscheib: ok, progress
[23:03:27] cscheib: swap the numbers, use .to_a.reverse
[23:04:25] yfeldblum: has joined #ruby
[23:05:29] cscheib: and got it complete
[23:05:36] cscheib: thanks for pointing me in the right direction, jhass
[23:05:38] mary5030_: has joined #ruby
[23:06:01] cscheib: there's probably a less convoluted way to do this, but oh well, heh
[23:06:18] jhass: platzhirsch: still not seeing you in #ruby-offtopic :(
[23:06:41] c-c: I guess when writing test one should consider that the sequence is descending
[23:06:43] vF3hNGxc47h8: has joined #ruby
[23:06:47] platzhirsch: Cheers jhass :)
[23:06:53] c-c: and then the same for the methods
[23:06:58] gregf: has joined #ruby
[23:07:02] lkba: has joined #ruby
[23:07:41] shevy: platzhirsch how about ruby.now! but only with the !
[23:07:45] JDiPierro: has joined #ruby
[23:07:53] platzhirsch: so destructive
[23:09:03] claw: has joined #ruby
[23:09:05] shevy: that would actually make for a good slogan
[23:09:23] c-c: Whats the ruby version? https://www-users.cs.york.ac.uk/susan/joke/foot.htm
[23:09:56] Ox0dea: You shoot yourself in the foot however you damn well please.
[23:11:21] adaedra: Personally, I use the old fashioned method of the random encounter between foot and furniture.
[23:11:23] SCHAAP137: has joined #ruby
[23:11:43] ta: has joined #ruby
[23:11:44] null__: has joined #ruby
[23:11:44] null__: has joined #ruby
[23:11:55] adaedra: Hurts, but doesn't waste a bullet.
[23:12:08] Ox0dea: >> :furniture > :foot
[23:12:09] ruboto: Ox0dea # => true (https://eval.in/483605)
[23:12:14] hahuang65: has joined #ruby
[23:13:01] Ox0dea: DecayingBooleans could help with that.
[23:13:02] mary5030: has joined #ruby
[23:13:44] adaedra: >> TrueClass = FalseClass; [true, false]
[23:13:45] ruboto: adaedra # => /tmp/execpad-d4137cb6bf18/source-d4137cb6bf18:2: warning: already initialized constant TrueClass ...check link for more (https://eval.in/483606)
[23:14:12] jessemcgilallen: has joined #ruby
[23:14:42] imperator: has joined #ruby
[23:14:52] s00pcan: has joined #ruby
[23:16:18] JDiPierro: has joined #ruby
[23:16:59] ledestin: has joined #ruby
[23:17:29] rickmasta: has joined #ruby
[23:17:40] baweaver: has joined #ruby
[23:18:17] ramfjord: has joined #ruby
[23:18:30] Ox0dea: >> require 'fiddle'; Fiddle::Pointer.new(true.__id__)[0, 4] = "\0" * 4
[23:18:31] ruboto: Ox0dea # => /tmp/execpad-20ce83938887/source-20ce83938887:2: [BUG] Segmentation fault at 0x000002 ...check link for more (https://eval.in/483608)
[23:18:37] _stu_: has joined #ruby
[23:18:53] Ox0dea: Stupid immutable booleans.
[23:19:35] hahuang61: has joined #ruby
[23:22:23] cscheib: has left #ruby: ()
[23:22:27] Ox0dea: I think this is just about as much fiddling as we can do with booleans without segfaulting: https://eval.in/483609
[23:27:07] rgrmatt: has joined #ruby
[23:27:51] adaedra: huh, you cannot use super without arguments in a define_method block, funny.
[23:28:08] Ox0dea: It makes sense, though.
[23:29:17] adaedra: because block arguments are specials?
[23:29:33] inanepenguin: has joined #ruby
[23:29:40] Ox0dea: The interpreter doesn't have enough context for `super` to do The Right Thing.
[23:29:50] xet7: has joined #ruby
[23:30:13] tenderlove: has joined #ruby
[23:30:39] imperator: can String#[] return more than 1 capture?
[23:31:21] Ox0dea: My feature request died quickly and silently.
[23:31:42] imperator: ACTION riots in the streets
[23:31:55] adaedra: ACTION calls the internet police
[23:32:24] Ox0dea: imperator: https://bugs.ruby-lang.org/issues/11100
[23:32:29] Ox0dea: Let your voice be heard!
[23:32:35] adaedra: Binary issue.
[23:32:50] Ox0dea: >> 0x11100
[23:32:51] ruboto: Ox0dea # => 69888 (https://eval.in/483610)
[23:32:57] Ox0dea: That's kinda neat too.
[23:33:05] pwnd_nsfw: has joined #ruby
[23:33:56] colegatron: has joined #ruby
[23:34:19] adaedra: The middleware pattern is neat.
[23:35:10] FastJack: has joined #ruby
[23:36:03] Bellthoven: has joined #ruby
[23:38:03] wmdrossard: has joined #ruby
[23:40:05] JDiPierro: has joined #ruby
[23:41:37] c-c: ri has no docs, again
[23:41:50] c-c: What was the command to update ri docs?
[23:41:51] dlitvak: has joined #ruby
[23:42:39] c-c: ah, its a gem now
[23:42:52] c-c: gem rdoc --all --ri --no-rdoc
[23:43:18] rakm: has joined #ruby
[23:44:06] webus: has joined #ruby
[23:44:51] centrx: has joined #ruby
[23:45:14] Xentil: has joined #ruby
[23:49:21] alexherbo2: has joined #ruby
[23:49:47] al2o3-cr: has joined #ruby
[23:50:13] snockerton: has joined #ruby
[23:50:58] baweaver: has joined #ruby
[23:50:59] tcrypt: has joined #ruby
[23:52:14] lurch_: has joined #ruby
[23:52:48] dlitvak_: has joined #ruby
[23:53:55] inanepenguin: has joined #ruby
[23:54:05] yfeldblum: has joined #ruby
[23:55:51] FastJack: has joined #ruby
[23:56:00] stannard: has joined #ruby
[23:56:05] davedev24: has joined #ruby
[23:57:04] Azure: has joined #ruby
[23:57:04] Ropeney: has joined #ruby
[23:58:06] moeabdol: has joined #ruby
[23:58:34] devoldmx: has joined #ruby
[23:59:30] jgt: has joined #ruby
[23:59:51] elton: has joined #ruby