« Back to channel list

#ruby - 25 July 2016

« Back 1 day Forward 1 day »
[00:01:15] framling: has joined #ruby
[00:02:01] sumobob: has joined #ruby
[00:03:07] AlexRussia: has joined #ruby
[00:03:44] cyphase: has joined #ruby
[00:04:43] nerium: has joined #ruby
[00:05:11] Yzguy: has joined #ruby
[00:10:01] geopet: has joined #ruby
[00:11:33] geopet: has left #ruby: ()
[00:11:49] sucks: has joined #ruby
[00:13:30] cd-rum: has joined #ruby
[00:15:19] sucks: has joined #ruby
[00:15:49] nerium: has joined #ruby
[00:16:24] hahuang61: has joined #ruby
[00:16:25] bkxd: has joined #ruby
[00:22:15] gix: has joined #ruby
[00:23:08] jaguarmagenta: has joined #ruby
[00:25:26] AndyBotwin: has joined #ruby
[00:26:36] nerium: has joined #ruby
[00:29:24] SilverKey: has joined #ruby
[00:31:08] djbkd: has joined #ruby
[00:37:35] nerium: has joined #ruby
[00:38:12] rickmasta: has joined #ruby
[00:38:17] enterprisey: has joined #ruby
[00:40:12] craysiii: has joined #ruby
[00:41:41] BillSussman: has joined #ruby
[00:42:57] slackbotgz: has joined #ruby
[00:43:06] gregf: has joined #ruby
[00:46:37] Es0teric: has joined #ruby
[00:46:47] ElFerna: has joined #ruby
[00:47:12] sucks: has joined #ruby
[00:47:41] LoneHerm_: has joined #ruby
[00:47:42] sucks: has joined #ruby
[00:48:25] nerium: has joined #ruby
[00:48:30] moeabdol1: has joined #ruby
[00:51:28] jrafanie: has joined #ruby
[00:54:20] pawnbox: has joined #ruby
[00:57:12] enterprisey: has joined #ruby
[00:57:53] xall: has joined #ruby
[00:58:15] [narcan]: has joined #ruby
[00:58:15] jaguarmagenta: has joined #ruby
[00:58:26] minimalism: has joined #ruby
[00:58:35] enterprisey: has joined #ruby
[01:00:02] nerium: has joined #ruby
[01:00:44] ec0: has joined #ruby
[01:03:30] qguv: has joined #ruby
[01:08:11] xall_: has joined #ruby
[01:11:01] nerium: has joined #ruby
[01:11:19] swills: has joined #ruby
[01:15:53] lupine: has joined #ruby
[01:16:00] arescorpio: has joined #ruby
[01:16:47] sleepee: has joined #ruby
[01:16:55] killerkamel: has joined #ruby
[01:18:32] sleepee: has joined #ruby
[01:18:50] davedev24: has joined #ruby
[01:20:27] rickmasta: has joined #ruby
[01:22:04] Dry_Lips: has joined #ruby
[01:22:04] Dry_Lips: has joined #ruby
[01:28:12] blackmesa: has joined #ruby
[01:29:03] nerium: has joined #ruby
[01:29:25] jaguarma_: has joined #ruby
[01:30:23] pawnbox: has joined #ruby
[01:30:37] AndrewIsHere: has joined #ruby
[01:32:05] djbkd: has joined #ruby
[01:33:49] mattwashere: has joined #ruby
[01:37:27] nankyokusei: has joined #ruby
[01:40:24] nerium: has joined #ruby
[01:40:40] jaguarmagenta: has joined #ruby
[01:43:05] RegulationD: has joined #ruby
[01:44:44] agent_white: has joined #ruby
[01:46:17] AndyBotwin: has joined #ruby
[01:46:36] sarbs: has joined #ruby
[01:47:17] agent_white: Evenin' folks
[01:48:59] zacts: 2/buffer #dragora
[01:51:20] nerium: has joined #ruby
[01:53:18] rickmasta: has joined #ruby
[02:00:55] giz|work: has joined #ruby
[02:02:15] nerium: has joined #ruby
[02:07:13] TheSpectre: has joined #ruby
[02:09:16] roamingdog: has joined #ruby
[02:09:16] ramfjord: has joined #ruby
[02:09:23] TheSpectre: has joined #ruby
[02:13:13] nerium: has joined #ruby
[02:15:15] skweek: has joined #ruby
[02:15:39] edwinvdgraaf: has joined #ruby
[02:15:55] rickmasta: has joined #ruby
[02:17:09] hahuang61: has joined #ruby
[02:17:10] bkxd: has joined #ruby
[02:18:00] ur5us: has joined #ruby
[02:18:59] Ropeney_: has joined #ruby
[02:20:21] raeoks: has joined #ruby
[02:21:01] edwinvdgraaf: has joined #ruby
[02:21:27] LoneHerm_: has joined #ruby
[02:23:53] pawnbox: has joined #ruby
[02:24:19] macsteps: has joined #ruby
[02:24:44] nerium: has joined #ruby
[02:29:09] blackmesa: has joined #ruby
[02:30:42] rickmasta: has joined #ruby
[02:30:43] cdg: has joined #ruby
[02:31:05] yoongkang: has joined #ruby
[02:32:31] djbkd: has joined #ruby
[02:32:50] ICantCook: I'm using the mysql2 library to update a field in a table, and want to abort() if it fails
[02:33:12] ICantCook: any idea why this wouldn't work? https://gist.github.com/anonymous/795d4ab6b7828c1362eba893090393c7
[02:33:24] ICantCook: it runs, it succeeds, but it aborts as though it failed
[02:34:36] nerium: has joined #ruby
[02:35:03] Cohedrin: has joined #ruby
[02:35:55] dunpeal: has joined #ruby
[02:36:31] anekos: has joined #ruby
[02:36:40] ur5us: has joined #ruby
[02:37:59] killerkamel: has joined #ruby
[02:40:32] yoongkang: has joined #ruby
[02:42:12] Ropeney_: has joined #ruby
[02:43:22] veduardo: has joined #ruby
[02:44:32] ur5us: has joined #ruby
[02:45:55] nerium: has joined #ruby
[02:47:19] davedev24: has joined #ruby
[02:47:29] Axy: has joined #ruby
[02:50:24] malconis: has joined #ruby
[02:50:51] PR_Smells: has joined #ruby
[02:51:12] PR_Smells: Is ruby-full still the correct package name for apt ?
[02:51:31] PR_Smells: If so, what repository is it located in? I am getting a "package not found" error
[02:51:59] xue: has joined #ruby
[02:53:52] TheSpectre: has joined #ruby
[02:54:06] mistermocha: has joined #ruby
[02:54:36] macsteps: has joined #ruby
[02:54:47] SilverKey: has joined #ruby
[02:56:21] nerium: has joined #ruby
[02:57:09] TheSpectre: has joined #ruby
[02:57:12] astrobun_: has joined #ruby
[02:58:43] edgr: has joined #ruby
[02:59:44] pawnbox: has joined #ruby
[03:00:34] P_R_Deltoid: has joined #ruby
[03:01:35] P_R_Deltoid: has joined #ruby
[03:03:30] P_R_Deltoid: has joined #ruby
[03:04:36] mistermocha: has joined #ruby
[03:06:18] P_R_Deltoid: has joined #ruby
[03:07:17] nerium: has joined #ruby
[03:07:44] adl: has joined #ruby
[03:09:33] cyphase: has joined #ruby
[03:10:37] GnuYawk: has joined #ruby
[03:12:53] rickmasta: has joined #ruby
[03:15:18] edwinvdgraaf: has joined #ruby
[03:16:48] lxsameer: has joined #ruby
[03:17:55] ruby-lang039: has joined #ruby
[03:18:14] nerium: has joined #ruby
[03:20:52] k3rn31: has joined #ruby
[03:29:03] xall_: has joined #ruby
[03:29:23] pontiki: has joined #ruby
[03:29:51] gix: has joined #ruby
[03:30:33] swills: has joined #ruby
[03:32:11] blackmesa: has joined #ruby
[03:32:13] nando293921: has joined #ruby
[03:33:14] djbkd: has joined #ruby
[03:35:38] bad_ip: has joined #ruby
[03:35:38] bad_ip: has joined #ruby
[03:35:39] pawnbox: has joined #ruby
[03:36:16] nerium: has joined #ruby
[03:37:23] djbkd_: has joined #ruby
[03:38:21] nankyokusei: has joined #ruby
[03:40:28] nerium: has joined #ruby
[03:40:46] malconis: has joined #ruby
[03:41:03] P_R_Deltoid: Turns out the package is just Ruby now
[03:43:29] P_R_Deltoid: has joined #ruby
[03:43:52] P_R_Deltoid: has joined #ruby
[03:44:01] RegulationD: has joined #ruby
[03:46:03] LoneHermit: has joined #ruby
[03:48:45] dunpeal: has joined #ruby
[03:51:26] nerium: has joined #ruby
[03:51:42] jenrzzz: has joined #ruby
[03:51:42] jenrzzz: has joined #ruby
[03:53:54] the_drow: has joined #ruby
[03:54:29] jishankai: has joined #ruby
[03:57:23] chipotle: has joined #ruby
[03:57:30] davedev24: has joined #ruby
[03:57:45] macsteps: has joined #ruby
[04:00:44] qguv: has joined #ruby
[04:00:57] adl: has joined #ruby
[04:02:59] nerium: has joined #ruby
[04:03:25] ur5us: has joined #ruby
[04:05:16] SilverKey: has joined #ruby
[04:08:55] pawnbox: has joined #ruby
[04:10:47] grenierm_: has joined #ruby
[04:13:55] nerium: has joined #ruby
[04:15:43] AndrewIsHere: has joined #ruby
[04:16:26] AndrewIsHere: has joined #ruby
[04:17:50] Cohedrin: has joined #ruby
[04:17:55] hahuang61: has joined #ruby
[04:18:01] bkxd: has joined #ruby
[04:19:38] edwinvdgraaf: has joined #ruby
[04:24:55] nerium: has joined #ruby
[04:25:23] ur5us: has joined #ruby
[04:32:51] nVd: has joined #ruby
[04:34:20] djbkd: has joined #ruby
[04:34:54] RahulT: has joined #ruby
[04:35:15] blackmesa: has joined #ruby
[04:35:34] nerium: has joined #ruby
[04:35:38] AndrewIsHere: has joined #ruby
[04:38:39] bluOxigen: has joined #ruby
[04:38:54] bluOxigen: has joined #ruby
[04:40:28] k3rn31: has joined #ruby
[04:42:07] pawnbox: has joined #ruby
[04:42:17] djbkd: has joined #ruby
[04:43:17] LoneHerm_: has joined #ruby
[04:43:23] bluOxigen: has joined #ruby
[04:45:43] sucks: has joined #ruby
[04:46:29] nerium: has joined #ruby
[04:47:02] ur5us: has joined #ruby
[04:49:02] enterprisey: has joined #ruby
[04:52:08] conta: has joined #ruby
[04:53:23] astrobun_: has joined #ruby
[04:53:24] dionysus69: has joined #ruby
[04:54:15] tristanp: has joined #ruby
[04:57:21] nerium: has joined #ruby
[05:05:52] Dimik: has joined #ruby
[05:08:19] nerium: has joined #ruby
[05:08:55] ur5us: has joined #ruby
[05:11:09] craigp: has joined #ruby
[05:13:34] sucks: has joined #ruby
[05:14:14] edwinvdgraaf: has joined #ruby
[05:15:26] sucks: has joined #ruby
[05:17:25] Macaveli: has joined #ruby
[05:17:44] hk238: has joined #ruby
[05:18:46] bkxd: has joined #ruby
[05:19:09] nerium: has joined #ruby
[05:20:03] alfiemax: has joined #ruby
[05:21:27] cibs: has joined #ruby
[05:28:27] bluOxigen: has joined #ruby
[05:29:05] raeoks: has joined #ruby
[05:30:36] nerium: has joined #ruby
[05:30:42] ur5us: has joined #ruby
[05:31:30] cibs: has joined #ruby
[05:33:26] mistermocha: has joined #ruby
[05:34:48] djbkd__: has joined #ruby
[05:35:43] mcqr: has joined #ruby
[05:36:12] zacts: has joined #ruby
[05:37:29] the_drow: has joined #ruby
[05:38:04] grenierm_: has joined #ruby
[05:38:16] blackmesa: has joined #ruby
[05:39:12] nankyokusei: has joined #ruby
[05:39:31] elifoster: has joined #ruby
[05:40:30] skweek: has joined #ruby
[05:41:00] nerium: has joined #ruby
[05:42:23] duncannz: has joined #ruby
[05:42:28] sumobob: has joined #ruby
[05:42:46] AndrewIsHere: has joined #ruby
[05:44:52] RegulationD: has joined #ruby
[05:44:58] sucks: has joined #ruby
[05:50:02] jaguarma_: has joined #ruby
[05:50:44] dunpeal: has joined #ruby
[05:51:18] dminuoso: has joined #ruby
[05:52:22] nerium: has joined #ruby
[05:52:29] ur5us: has joined #ruby
[05:53:06] jenrzzz: has joined #ruby
[05:53:06] jenrzzz: has joined #ruby
[05:57:25] segy: has joined #ruby
[05:58:42] macsteps: has joined #ruby
[06:01:57] tjohnson: has joined #ruby
[06:03:31] nerium: has joined #ruby
[06:04:50] LoneHermit: has joined #ruby
[06:06:36] mistermo_: has joined #ruby
[06:09:05] mistermocha: has joined #ruby
[06:10:24] ledestin: has joined #ruby
[06:10:32] solars: has joined #ruby
[06:11:36] kareeoleez: has joined #ruby
[06:11:53] mistermo_: has joined #ruby
[06:12:30] moeabdol: has joined #ruby
[06:14:06] ur5us: has joined #ruby
[06:14:14] adl: has joined #ruby
[06:15:04] cibs: has joined #ruby
[06:18:37] edwinvdgraaf: has joined #ruby
[06:21:01] nerium: has joined #ruby
[06:24:38] dminuoso_: has joined #ruby
[06:25:36] nerium: has joined #ruby
[06:25:36] bushshitt: has joined #ruby
[06:26:18] firstdayonthejob: has joined #ruby
[06:28:17] conta: has joined #ruby
[06:30:42] minotep: has joined #ruby
[06:31:27] Silthias: has joined #ruby
[06:33:02] yfeldblum: has joined #ruby
[06:33:15] bushshitt: whats up guys!
[06:35:30] pontiki: not much, chicka!
[06:35:49] djbkd__: has joined #ruby
[06:35:56] ur5us: has joined #ruby
[06:36:16] nerium: has joined #ruby
[06:36:25] codecop: has joined #ruby
[06:40:36] raeoks: has joined #ruby
[06:41:15] kologlyf_: has joined #ruby
[06:41:20] blackmesa: has joined #ruby
[06:43:57] jaguarmagenta: has joined #ruby
[06:44:24] blackgoat: has joined #ruby
[06:44:40] pwnd_nsfw`: has joined #ruby
[06:47:08] nerium: has joined #ruby
[06:52:33] webus: has joined #ruby
[06:52:38] jaiks1: has joined #ruby
[06:53:12] mark_66: has joined #ruby
[06:53:56] shevy: zacts do you only read ruby books or do you also write ruby code :)
[06:55:04] bkxd: has joined #ruby
[06:55:09] pontiki: hey, i only read fantasy books, i don't go around swinging swords at dragons
[06:57:32] dminuoso: has joined #ruby
[06:57:38] ur5us: has joined #ruby
[06:58:23] Hyuk: has joined #ruby
[06:59:44] atomx: has joined #ruby
[07:00:13] macsteps: has joined #ruby
[07:02:53] blackmesa: has joined #ruby
[07:03:12] bkxd: has joined #ruby
[07:06:44] cdg: has joined #ruby
[07:07:12] LoneHerm_: has joined #ruby
[07:07:45] cibs: has joined #ruby
[07:08:55] Guest51233: has joined #ruby
[07:10:54] LoneHerm_: has joined #ruby
[07:11:04] yardenbar: has joined #ruby
[07:11:33] nerium: has joined #ruby
[07:13:11] edwinvdgraaf: has joined #ruby
[07:16:41] roshanavand: has joined #ruby
[07:16:50] AndrewIsHere: has joined #ruby
[07:18:20] HammyJammy: has joined #ruby
[07:20:54] bigkevmcd: has joined #ruby
[07:21:09] djbkd: has joined #ruby
[07:22:26] nerium: has joined #ruby
[07:23:35] the_drow: has joined #ruby
[07:23:42] anisha: has joined #ruby
[07:24:57] nankyokusei: has joined #ruby
[07:25:12] dionysus69: has joined #ruby
[07:28:46] xall_: has joined #ruby
[07:30:43] M-manveru: has joined #ruby
[07:33:05] nerium: has joined #ruby
[07:33:22] skade: has joined #ruby
[07:35:22] ur5us: has joined #ruby
[07:39:07] BillSussman: has joined #ruby
[07:40:00] antgel: has joined #ruby
[07:41:10] aganov: has joined #ruby
[07:41:15] jaguarma_: has joined #ruby
[07:43:34] jaguarmagenta: has joined #ruby
[07:43:38] nerium: has joined #ruby
[07:45:26] andikr: has joined #ruby
[07:45:42] RegulationD: has joined #ruby
[07:46:18] blackmesa: has joined #ruby
[07:48:42] edwinvdgraaf: has joined #ruby
[07:52:37] dunpeal: has joined #ruby
[07:53:39] silpa: has joined #ruby
[07:54:11] nerium: has joined #ruby
[07:55:10] silpa: Hi, How can we upload image in ruby on rails
[07:58:46] ruby[bot]: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[08:00:23] GnuYawk: has left #ruby: ()
[08:00:52] roshanavand: has joined #ruby
[08:01:00] Macaveli: has joined #ruby
[08:03:07] senayar: has joined #ruby
[08:04:01] bkxd: has joined #ruby
[08:04:28] vondruch: has joined #ruby
[08:04:30] adl: has joined #ruby
[08:04:35] nerium: has joined #ruby
[08:06:02] chipotle: has joined #ruby
[08:09:00] raeoks: has joined #ruby
[08:09:07] peteretep: Here's the article I was working on which was the reason I was asking so many dumb-ass questions about testing: http://www.writemoretests.com/2016/07/perl-python-and-ruby-the-anatomy-of-a-testing-assertion.html
[08:15:07] nerium: has joined #ruby
[08:18:37] yoongkang: has joined #ruby
[08:18:44] Hounddog: has joined #ruby
[08:19:06] nhhc: has joined #ruby
[08:19:34] haxrbyte: has joined #ruby
[08:20:21] nobitanobi: has joined #ruby
[08:20:45] jaruga___: has joined #ruby
[08:20:55] tvw: has joined #ruby
[08:21:35] marr: has joined #ruby
[08:23:08] douglascorrea: has joined #ruby
[08:25:11] Antiarc: has joined #ruby
[08:25:53] nerium: has joined #ruby
[08:26:27] ur5us: has joined #ruby
[08:26:58] al2o3-cr: has joined #ruby
[08:27:40] benhoi: has joined #ruby
[08:31:16] chipotle: has joined #ruby
[08:32:14] pandaant: has joined #ruby
[08:34:43] mrgrieves: has joined #ruby
[08:35:52] glcx: has joined #ruby
[08:35:52] glcx: has joined #ruby
[08:36:57] nerium: has joined #ruby
[08:38:41] Guest51233: has joined #ruby
[08:44:46] mcqr: has joined #ruby
[08:47:33] nerium: has joined #ruby
[08:47:38] A_Drone: has joined #ruby
[08:49:52] p0p0pr37: has joined #ruby
[08:50:29] atomx: how can I use the ternary operator but to do other things that returning a single value? something like
[08:50:59] atomx: condition ? do_some_logic(param1, param2) : do_other_logic(param1)
[08:51:06] workmad3: has joined #ruby
[08:51:06] atomx: is this possible? or does it even make sense?
[08:53:21] chipotle: has joined #ruby
[08:54:09] pawnbox: has joined #ruby
[08:58:07] nerium: has joined #ruby
[08:59:18] yoongkang: has joined #ruby
[08:59:48] Madplatypus: has joined #ruby
[08:59:49] silpa: has left #ruby: ()
[09:00:10] al2o3-cr: atom_: do_some_logic(p1, p2) is method right?
[09:01:50] jhass: atom_: I don't understand the question, what you've shown is a valid ruby expression
[09:02:05] Mimorial: has joined #ruby
[09:02:06] jhass: personally I only ever use ternary when I care about the return value, a = b ? c : d
[09:02:17] TomyWork: has joined #ruby
[09:02:59] al2o3-cr: atom_: i'd just use the regular old if/else
[09:03:12] xpitr: interesting, do_some_logic(1,2) will work in ternary but do_some_logic (1,2) is syntax error. outside of ternary operator both work :)
[09:03:35] TomyWork: i have 2 rescue blocks. one for a specific exception, one for all exceptions. can i pass control from the specific block to the common block?
[09:04:22] rrawlins: has joined #ruby
[09:05:12] lulzmachine_: has joined #ruby
[09:07:28] jenrzzz: has joined #ruby
[09:07:47] giz|work: has joined #ruby
[09:08:51] yoongkang: has joined #ruby
[09:08:56] jxs_: has joined #ruby
[09:09:04] al2o3-cr: btw, regarding concatenation yesterday, interpolation is fastest, String#% is slowest. just thought i'd share.
[09:09:05] nerium: has joined #ruby
[09:10:00] rrawlins: Hey folks, getting a strange IO Error when trying to build a gem - any ideas? - https://gist.github.com/SirRawlins/25735978e9c58a4831ec4e9558091a39
[09:10:45] moeabdol: has joined #ruby
[09:11:50] jhass: no output before that?
[09:12:00] jhass: ran out of disk space or so? :P
[09:13:53] rrawlins: jhass: I get a warning about the Gemspec lacking a description but adding one makes no difference, and the drive has plenty of space left on it.
[09:17:46] jhass: that's quite old
[09:17:56] jhass: try a rvm rubygems update or whatever it was
[09:18:44] mpampis__: has joined #ruby
[09:19:39] blackmesa: has joined #ruby
[09:21:25] madhatter: has joined #ruby
[09:22:16] pawnbox: has joined #ruby
[09:24:21] atomx: jhass: mmm when there are spaces and such on the result of the ternay condition ruby behaves weirdly
[09:24:48] atomx: that's why I was asking if you can return something other than a simple String/Boolean/etc
[09:24:56] rrawlins: jhass: sweet, that appears to have worked, bumped gem to 2.6 and it's now building as I'd expect, strange bug but thanks for the help. Life saver.
[09:25:55] jhass: ?code atom_
[09:25:55] ruby[bot]: atom_: We can't help you without your code, please post it to https://gist.github.com
[09:26:04] jhass: real code that "behaves weirdly"
[09:26:31] thomas_25: has joined #ruby
[09:26:41] ishahnaz: has joined #ruby
[09:26:51] nerium: has joined #ruby
[09:28:50] nankyokusei: has joined #ruby
[09:28:51] zotherstupidguy: is there a gem for sanitizing strings inputs (non-rails)
[09:29:26] koma: ups wrong window
[09:29:50] jhass: sanitizing is highly context specific
[09:30:18] chipotle_: has joined #ruby
[09:30:39] nerium: has joined #ruby
[09:30:53] jhass: to do what with them then?
[09:32:06] zotherstupidguy: the case is that i have list of songs that i am serving via ices2 that can't find them on local filesystem as they are not sanitized,
[09:32:08] jackjackdripper: has joined #ruby
[09:32:48] jhass: I'm not sure sanitized means what you think it does here, try to use a different term/explanation
[09:32:49] zotherstupidguy: ices2 takes a playlist.txt which i will sanitize, and i will go through all the .ogg files to santize them as well
[09:33:19] jhass: what do you change to make them "sanitized"?
[09:33:29] jhass: what's that's not "sanitized" about them?
[09:34:06] jhass: if it's in your filesystem under that name, it's a valid filename
[09:34:06] zotherstupidguy: spaces, brackets are problems that i found out
[09:35:04] zotherstupidguy: adding escape characters is possible, but instead of regex, i am looking for the gem that wouldn't miss anything, get me a clean solution
[09:35:23] chipotle: has joined #ruby
[09:35:31] xpitr: gsub(/\W+/, "_")
[09:35:46] xpitr: but seriously, only \0 and / should give you problems as those are only disallowed chars
[09:36:02] zotherstupidguy: songs names are weird,
[09:36:19] xpitr: they can be mixed mandarin and suahili, it should still work
[09:36:26] al2o3-cr: zotherstupidguy: can you not just use Regexp.escape
[09:37:14] jhass: well, how is the playlist generated? This feels like either a bug in the generator not respecting the playlist format or ices2 not correctly interpreting the playlist format
[09:38:14] zotherstupidguy: playlists are not generated, just customly created;
[09:38:30] jhass: so just write them correctly in the first place?
[09:39:02] moeabdol: has joined #ruby
[09:39:03] jhass: what's the playlist format?
[09:39:22] zotherstupidguy: path to song per line
[09:41:32] nerium: has joined #ruby
[09:46:22] jhass: curious, there doesn't seem to be any interpretation of any escape characters whatsoever in https://github.com/xiph/Icecast-IceS/blob/master/src/playlist_basic.c#L70-L151
[09:46:39] RegulationD: has joined #ruby
[09:47:26] Xeago: has joined #ruby
[09:47:45] xall_: has joined #ruby
[09:48:50] Wildfyr: has joined #ruby
[09:49:07] Hounddog: has joined #ruby
[09:49:51] siegy: has joined #ruby
[09:50:47] toretore: has joined #ruby
[09:50:56] hwcomcn: has joined #ruby
[09:51:52] jhass: zotherstupidguy: anyway, if you're sure about what needs to be done, for whatever reason (I really can't see anything in the code that would require it), a simple gsub is your best bet
[09:52:26] hwcomcn: has joined #ruby
[09:52:42] nerium: has joined #ruby
[09:53:51] araujo: has joined #ruby
[09:53:59] araujo: has joined #ruby
[09:54:35] dunpeal: has joined #ruby
[09:54:45] k3rn31: has joined #ruby
[09:55:10] blackmesa: has joined #ruby
[09:55:15] araujo: has joined #ruby
[09:56:49] Hyuk: has joined #ruby
[09:57:41] araujo: has joined #ruby
[09:57:56] yoongkang: has joined #ruby
[09:58:31] hwcomcn: has joined #ruby
[09:59:21] mpampis_sougias: has joined #ruby
[10:00:40] jhass: zotherstupidguy: https://github.com/xiph/Icecast-IceS/blob/master/src/im_playlist.c#L145 it's just passed to fopen here, that shouldn't require any form of escaping
[10:03:24] astrobun_: has joined #ruby
[10:03:26] chouhoulis: has joined #ruby
[10:03:34] LoneHermit: has joined #ruby
[10:03:40] nerium: has joined #ruby
[10:04:19] hwcomcn: has joined #ruby
[10:04:51] bkxd: has joined #ruby
[10:06:22] hwcomcn: has joined #ruby
[10:06:49] minimalism: has joined #ruby
[10:06:52] Silthias: has joined #ruby
[10:08:12] jenrzzz: has joined #ruby
[10:08:12] jenrzzz: has joined #ruby
[10:08:25] al2o3-cr: has joined #ruby
[10:12:33] [narcan]: has joined #ruby
[10:13:19] giz|work: has joined #ruby
[10:14:28] thomas_25: has joined #ruby
[10:14:46] nerium: has joined #ruby
[10:17:56] shevy: class ImageFile {
[10:17:56] shevy: has $.width;
[10:19:11] shevy: so much has cheeze
[10:20:11] jxs_: has joined #ruby
[10:20:33] rickmasta: has joined #ruby
[10:22:14] TheWhip: has joined #ruby
[10:23:41] yoongkang: has joined #ruby
[10:33:20] nerium: has joined #ruby
[10:35:25] xall_: has joined #ruby
[10:36:10] nerium: has joined #ruby
[10:36:35] Devalo: has joined #ruby
[10:39:39] KaliLinuxGR: has joined #ruby
[10:40:26] mdw: has joined #ruby
[10:40:54] sdothum: has joined #ruby
[10:43:26] rodfersou: has joined #ruby
[10:43:53] kavanagh: has joined #ruby
[10:44:16] jaguarmagenta: has joined #ruby
[10:45:04] thomas_25: has joined #ruby
[10:46:58] troulouliou_div2: has joined #ruby
[10:49:55] blackgoat: has joined #ruby
[10:51:04] moeabdol: has joined #ruby
[10:51:13] xall_: has joined #ruby
[10:52:09] blackgoat: has joined #ruby
[10:53:12] CloCkWeRX: has joined #ruby
[10:54:31] nerium: has joined #ruby
[10:54:45] Torrone: has joined #ruby
[10:57:43] Torrone: Hello, I'm switching back to ruby/rails after a couple years for a project that I've downloaded, I've been doing some changes to my environment since, now, I'm trying to install all the required gems for the project and bundle install consistently fails, on multiple gems and it's just a nightmare, how do I get around this problem without going crazy after all the versions? I'm using ruby 2.2.2 if this is ot please link the proper channe
[10:59:42] nerium: has joined #ruby
[11:00:20] GodFather: has joined #ruby
[11:00:53] dminuoso: Torrone: ?rails
[11:00:56] ruby[bot]: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[11:01:06] Torrone: dminuoso, thanks
[11:01:24] macsteps: has joined #ruby
[11:04:34] LoneHermit: has joined #ruby
[11:05:34] bkxd: has joined #ruby
[11:06:44] thomas_25: has joined #ruby
[11:07:09] xall_: has joined #ruby
[11:09:33] jenrzzz: has joined #ruby
[11:10:42] nerium: has joined #ruby
[11:11:12] meinside: has joined #ruby
[11:12:38] mcqr: has joined #ruby
[11:13:04] ur5us: has joined #ruby
[11:19:02] AndrewIsHere: has joined #ruby
[11:19:14] armin: has joined #ruby
[11:20:27] noregret: im' pretty new to ruby, I have s = "ABCD" how can i change it to s2 = "\u4142\u4344" ? assuming "s" is generated randomly
[11:20:55] dminuoso: Are you asking how to use a text editor?
[11:21:10] dminuoso: Oh nevermind.
[11:21:18] dminuoso: noregret: Dynamic access to local variables kind of sucks.
[11:21:19] nerium: has joined #ruby
[11:21:20] dminuoso: noregret: Use a hash.
[11:21:51] dminuoso: noregret: Or use the encoding mechanisms that Ruby has. What problem are you trying to solve?
[11:22:22] yqt: has joined #ruby
[11:22:46] noregret: dminuoso: problem is, I have a character string (payload) that i'm looking to convert as shown in the variable s2 above
[11:23:08] xall_: has joined #ruby
[11:24:33] petrichorx: has joined #ruby
[11:25:52] c355E3B: has joined #ruby
[11:29:40] nankyokusei: has joined #ruby
[11:30:36] edwinvdgraaf: has joined #ruby
[11:31:47] nerium: has joined #ruby
[11:36:42] ldnunes: has joined #ruby
[11:37:55] cdg: has joined #ruby
[11:38:30] dminuoso: noregret: What conversion is that?
[11:39:00] xall_: has joined #ruby
[11:39:03] Hanmac: has joined #ruby
[11:39:14] dminuoso: noregret: { "ABCD" => "\u4142\u4344" }
[11:39:16] dminuoso: Is this what you want?
[11:39:34] noregret: dminuoso: correct
[11:40:01] noregret: i can't figure out yet how to iterate 2 bytes at a time, lol
[11:40:31] adl: has joined #ruby
[11:42:04] dminuoso: noregret: Oh! Now I understand. String#unpack Array#pack are what you want.
[11:42:38] nerium: has joined #ruby
[11:42:41] johnmilton: has joined #ruby
[11:43:42] umdstu: has joined #ruby
[11:46:28] griffindy: has joined #ruby
[11:47:27] RegulationD: has joined #ruby
[11:50:16] noregret: dminuoso: got any usage example?
[11:50:31] dminuoso: &ri Array#pack
[11:50:31] `derpy: http://ruby-doc.org/core-2.3.1/Array.html#method-i-pack
[11:50:36] dminuoso: &ri String#unpack
[11:50:36] `derpy: http://ruby-doc.org/core-2.3.1/String.html#method-i-unpack
[11:51:04] dminuoso: noregret: You mean beyond the examples in what I might consider two of the best documented methods in all of Ruby?
[11:51:32] trampi: has joined #ruby
[11:51:37] dminuoso: noregret: If you cannot make sense of this method, you are not ready to do byte manipulations yet.
[11:52:26] noregret: hold on, have'nt checked them yet
[11:52:33] dminuoso: noregret: Or wait, Im still confused.
[11:53:07] dminuoso: &ri String#codepoints
[11:53:08] `derpy: http://ruby-doc.org/core-2.3.1/String.html#method-i-codepoints
[11:53:40] nerium: has joined #ruby
[11:54:15] Torrone: has joined #ruby
[11:54:22] al2o3-cr: noregret: what is it exactly you're trying to accomplish
[11:54:29] al2o3-cr: got any code?
[11:54:33] Hanmac: hm "ABCD" i got [65, 66, 67, 68] ... i don't understand how he wants "\u4142\u4344" from it
[11:54:54] twinklerock: has joined #ruby
[11:55:01] al2o3-cr: >> "ABCD".unpack 'H*'
[11:55:02] ruby[bot]: al2o3-cr: # => ["41424344"] (https://eval.in/611467)
[11:55:18] al2o3-cr: >> ["ABCD"].pack 'H*'
[11:55:20] ruby[bot]: al2o3-cr: # => "\xAB\xCD" (https://eval.in/611468)
[11:55:35] Hanmac: ah it was H, i was looking using C and U
[11:55:41] dminuoso: hanmac: Nope.
[11:56:05] dminuoso: I got my head beaten with decimal numbers so much, I stopped using them.
[11:56:30] dunpeal: has joined #ruby
[11:57:53] noregret: al2o3-cr: i'm trying to bypass utf16 restrictions on a certain app by sending that kind of string, so i can have control over the payload sent...
[11:59:14] seap: has joined #ruby
[11:59:24] noregret: ok, unpack H* looks not bad
[11:59:44] noregret: now how can i iterate and strp 4 characters at one
[12:00:33] CloCkWeRX: has joined #ruby
[12:01:38] seap: has joined #ruby
[12:02:02] Hanmac: noregret: i did try scan(/\w{1,4}/)
[12:03:24] Hanmac: >> "ABCD".unpack("H*").flat_map {|s| s.scan(/\d{1,4}/).map(&:hex) }.pack("U*") == "\u4142\u4344"
[12:03:25] ruby[bot]: hanmac: # => true (https://eval.in/611475)
[12:03:58] al2o3-cr: >> ["ABCD".force_encoding('utf-16')][0].chars # try from here noregret
[12:03:59] ruby[bot]: al2o3-cr: # => ["\x41\x42", "\x43\x44"] (https://eval.in/611476)
[12:04:01] nerium: has joined #ruby
[12:04:21] noregret: hanmac: awesome! thanks man
[12:04:52] noregret: al2o3-cr: yeah that won't work out, i need the "\u" specifically
[12:06:30] al2o3-cr: noregret: i know i was hoping you could figure it out, anyway hanmac answered you Q. :)
[12:06:45] noregret: thanks guys
[12:06:54] noregret: i think i should learn ruby xD
[12:07:20] al2o3-cr: noregret: you'll love it :p
[12:07:38] noregret: it's already confusing me
[12:07:51] noregret: confusing as hell regarding to python
[12:09:26] pipou_: has joined #ruby
[12:10:15] umar: has joined #ruby
[12:10:59] xall_: has joined #ruby
[12:13:23] pipou_: i have a question ! i dont really understand when we can use the proc (object) . someone can explain to me ?
[12:13:49] jxs_: has joined #ruby
[12:14:51] nerium: has joined #ruby
[12:16:26] Fernando-Basso: has joined #ruby
[12:20:34] mcqr: has joined #ruby
[12:20:52] glcx: has joined #ruby
[12:25:03] edwinvdgraaf: has joined #ruby
[12:25:44] nerium: has joined #ruby
[12:26:35] xall_: has joined #ruby
[12:27:16] fmcgeough: has joined #ruby
[12:27:34] cyphase: has joined #ruby
[12:30:22] noregret: hanmac: that blew up somewhere
[12:30:47] dminuoso: pipou_: Proc/lambda are just objectified blocks, nothing more.
[12:31:21] noregret: hanmac: https://bpaste.net/show/22c7d752cac8
[12:31:23] dminuoso: i.e. procs are objects, you can call methods on them, you can pass them as arguments, you can do stuff with it.
[12:31:45] noregret: hanmac: e.g. \u0006 isn't right here
[12:32:50] Torrone: has joined #ruby
[12:33:18] al2o3-cr: >> s = "IIIIIIIIIIIIIIIII7QZjAXP0A0AkAAQ2AB"; s.unpack('H*')[0].enum_for(:scan, /\d{4}/).map(&:hex).pack('U*')
[12:33:19] ruby[bot]: al2o3-cr: # => "䥉䥉䥉䥉䥉䥉䥉䥉䤷䅘倰䄰䅁儲䅂" (https://eval.in/611510)
[12:35:06] ksinkar: has joined #ruby
[12:36:35] nerium: has joined #ruby
[12:36:47] dunpeal: has joined #ruby
[12:38:23] ksinkar: Is there any way to detect a yield block has been provided to a ruby method? Similar to the way count works, with a block passed to it, without a block passed to it.
[12:38:42] dminuoso: ksinkar: block_given?
[12:39:33] ksinkar: dminuoso: thanks
[12:40:17] Macaveli: has joined #ruby
[12:42:29] xall_: has joined #ruby
[12:42:51] pawnbox: has joined #ruby
[12:45:02] jaguarmagenta: has joined #ruby
[12:45:32] roamingdog: has joined #ruby
[12:47:20] chihhsin: has joined #ruby
[12:47:30] nerium: has joined #ruby
[12:48:03] Bish: has joined #ruby
[12:50:40] douglascorrea: has joined #ruby
[12:52:10] al2o3-cr: noregret: why'd you say it isn't right?
[12:52:22] minotep: has joined #ruby
[12:52:38] phredus: has joined #ruby
[12:55:21] bmurt: has joined #ruby
[12:55:46] noregret: al2o3-cr: because the result is not what i exepcted
[12:55:48] aegis3121: has joined #ruby
[12:56:12] al2o3-cr: noregret: what did you expect?
[12:57:10] glcx_: has joined #ruby
[12:57:32] aegis3121: has joined #ruby
[12:58:34] nerium: has joined #ruby
[12:58:44] noregret: al2o3-cr: "IIIIIIIIIIIIIIIII7QZjAXP0A0AkAAQ2AB"" => "\u4949\u4949\u4949\u4949\u4949\u4949\u4949\u4949\u4937\u515a\u6a41\u5850\u3041\u3041\u6b41\u4151\u3241\u420a"
[12:59:21] jaiks1: has joined #ruby
[12:59:57] grenierm: has joined #ruby
[13:01:14] noregret: al2o3-cr: "IIIIIIIIIIIIIIII7QZjAXP0A0AkAAQ2AB2" => "\u4949\u4949\u4949\u4949\u4949\u4949\u4949\u4949\u4937\u515a\u6a41\u5850\u3041\u3041\u6b41\u4151\u3241\u4232"
[13:02:48] macsteps: has joined #ruby
[13:03:38] Hanmac: are you sure there isnt an I missing?
[13:03:47] skade: has joined #ruby
[13:05:38] malconis: has joined #ruby
[13:06:11] LoneHermit: has joined #ruby
[13:06:21] malconis: has joined #ruby
[13:06:27] bkxd: has joined #ruby
[13:06:51] noregret: hanmac: 17 Is
[13:07:19] ramortegui: has joined #ruby
[13:08:54] noregret: hanmac: i'm good with |IIIIIIIIIIIIIIII7QZjAXP0A0AkAAQ2AB2" now, i need the right output for this string
[13:09:01] noregret: "IIIIIIIIIIIIIIII7QZjAXP0A0AkAAQ2AB2" *
[13:09:03] nerium: has joined #ruby
[13:10:06] Hanmac: the problem is the uneven abount of numbers
[13:11:04] noregret: this is even
[13:11:16] jenrzzz: has joined #ruby
[13:11:16] jenrzzz: has joined #ruby
[13:11:17] maucar: has joined #ruby
[13:11:19] noregret: oh wait, no
[13:11:38] noregret: "IIIIIIIIIIIIIIIII7AXP0A0AAQ2AB2BB0BB"
[13:11:39] noregret: this is even
[13:11:40] masterkorp: has left #ruby: ("WeeChat 1.0.1")
[13:11:40] al2o3-cr: >> "IIIIIIIIIIIIIIIII7QZjAXP0A0AkAAQ2AB2".chars.each_slice(2).flat_map { |x| x.join.unpack('H*') }.map(&:hex).pack('U*')
[13:11:41] ruby[bot]: al2o3-cr: # => "䥉䥉䥉䥉䥉䥉䥉䥉䤷党橁塐ぁぁ歁䅑㉁䈲" (https://eval.in/611529)
[13:12:03] al2o3-cr: i'm getting confused now
[13:12:25] synthroid: has joined #ruby
[13:12:48] solars: hi, shouldn't Module#prepend work like this? https://gist.github.com/solars/f9d93b1929bd95e3845107d2814a8f52
[13:13:43] hutch34: has joined #ruby
[13:13:51] al2o3-cr: noregret: right? no?
[13:14:39] Rasi: has joined #ruby
[13:15:06] Torrone: has joined #ruby
[13:15:12] al2o3-cr: best to use each_char there
[13:15:17] BaroMeter: has joined #ruby
[13:17:08] xaxisx: has joined #ruby
[13:18:05] noregret: al2o3-cr: how can the ouput be represented in bytes, instead of the unicode characters? that way, errors might be detected right away
[13:18:17] noregret: byte string i mean
[13:19:33] nerium: has joined #ruby
[13:20:20] AndrewIsHere: has joined #ruby
[13:24:47] kavanagh: has joined #ruby
[13:27:12] xaxisx_: has joined #ruby
[13:27:48] EdwardIII: has joined #ruby
[13:28:28] p1k: does anyone know if there are some standardized guidelines on what to call additional properties that are set on an Error ? (when you inherit it and add an initialize)
[13:28:36] p1k: or is it everyone does as they please ?
[13:29:58] xall_: has joined #ruby
[13:29:59] shevy: properties set on an error?
[13:29:59] toretore: p1k: you mean Exception?
[13:30:21] xaxisx: has joined #ruby
[13:30:28] p1k: toretore: I tend to inherit StandardError, but sure
[13:30:28] toretore: if you make your own exception class you're free to take whatever arguments you want
[13:30:29] nankyokusei: has joined #ruby
[13:30:35] nerium: has joined #ruby
[13:30:52] p1k: toretore: Yes, I'm just asking if there is a convention, of calling it :erro_state, or :properties or some other key?
[13:31:02] toretore: not that i know of
[13:31:38] al2o3-cr: noregret: ["IIIIIIIIIIIIIIIII7QZjAXP0A0AkAAQ2AB2".force_encoding('utf-16')][0]
[13:31:51] toretore: there is the .cause convention if you're wrapping another exception
[13:32:05] JeanCarloMachado: has joined #ruby
[13:33:57] al2o3-cr: noregret: without the extra [] my head is blown
[13:35:05] freerobby: has joined #ruby
[13:35:21] douglascorrea: has joined #ruby
[13:35:42] dionysus69: has joined #ruby
[13:35:57] k3rn31: has joined #ruby
[13:40:15] Ishido: has joined #ruby
[13:40:59] nerium: has joined #ruby
[13:43:20] tekk: has joined #ruby
[13:43:24] marr: has joined #ruby
[13:44:59] aegis3121: has joined #ruby
[13:46:09] xall_: has joined #ruby
[13:48:14] jhack: has joined #ruby
[13:48:19] RegulationD: has joined #ruby
[13:48:42] noregret: al2o3-cr: yeah, thats' a different output
[13:49:42] nizzlefritz: has joined #ruby
[13:50:02] al2o3-cr: >> "IIIIIIIIIIIIIIIII7QZjAXP0A0AkAAQ2AB2".each_char.each_slice(2).flat_map { |x| x.join.unpack('H*') }.map(&:hex).pack('U*') == "\u4949\u4949\u4949\u4949\u4949\u4949\u4949\u4949\u4937\u515a\u6a41\u5850\u3041\u3041\u6b41\u4151\u3241\u4232"
[13:50:03] ruby[bot]: al2o3-cr: # => true (https://eval.in/611568)
[13:50:13] al2o3-cr: what doesn't work?
[13:50:13] TheWhip: has joined #ruby
[13:50:57] solars: can anyone tell me what I'm doing wrong with prepend? https://gist.github.com/solars/f9d93b1929bd95e3845107d2814a8f52
[13:51:34] nerium: has joined #ruby
[13:52:09] jrafanie: has joined #ruby
[13:55:33] al2o3-cr: >> "IIIIIIIIIIIIIIIII7QZjAXP0A0AkAAQ2AB2".each_char.each_slice(2).flat_map { |x| x.join.unpack('H*') }.map(&:hex).pack('U*').unpack('H*').pack('H*')
[13:55:34] ruby[bot]: al2o3-cr: # => "\xE4\xA5\x89\xE4\xA5\x89\xE4\xA5\x89\xE4\xA5\x89\xE4\xA5\x89\xE4\xA5\x89\xE4\xA5\x89\xE4\xA5\x89\xE ...check link for more (https://eval.in/611572)
[13:56:20] al2o3-cr: thats your byte string
[13:57:55] jrafanie: has joined #ruby
[14:00:11] TheWhip: has joined #ruby
[14:00:46] shinnya: has joined #ruby
[14:01:10] flying: has joined #ruby
[14:02:09] xall_: has joined #ruby
[14:02:40] nerium: has joined #ruby
[14:05:42] rrawlins: has joined #ruby
[14:06:30] blackmesa: has joined #ruby
[14:08:04] mattwashere: has joined #ruby
[14:08:05] LoneHermit: has joined #ruby
[14:09:01] axl_: has joined #ruby
[14:09:45] ChiefAlexander: has joined #ruby
[14:10:30] Torrone: has joined #ruby
[14:11:36] djdarkbeat: has joined #ruby
[14:12:29] alfiemax: has joined #ruby
[14:13:35] GodFather: has joined #ruby
[14:13:45] l4v2: has joined #ruby
[14:14:27] Siegfried: has joined #ruby
[14:15:13] drahosj: has joined #ruby
[14:15:44] aryaching: has joined #ruby
[14:15:55] davedev24: has joined #ruby
[14:16:24] Siegfried: Hi all, thinking of learning ruby but worried that ruby allowing you to modify the language at will leads to lots of unreadable code when looking at others work. Does that happen often?
[14:17:00] dgynn: has joined #ruby
[14:17:12] aegis3121: In Rails? Yes. In gems? Uncommonly. In pet projects/experiments? Probably a lot. Usually people are just adding convenience methods to a class rather than changing behavior of existing methods.
[14:17:15] SilverKey: has joined #ruby
[14:17:51] aegis3121: For example, I want to be able to quickly take the average of an array, so can I could define Array#average that would handle that rather than passing an Array to an average method.
[14:18:02] xall_: has joined #ruby
[14:18:10] roamingdog: has joined #ruby
[14:18:27] Siegfried: Makes sense
[14:18:42] agent_white: has joined #ruby
[14:19:52] platzhirsch: has joined #ruby
[14:21:36] Siegfried: has left #ruby: ()
[14:22:27] kavanagh: has joined #ruby
[14:23:12] Chair: has joined #ruby
[14:23:44] madsa: has joined #ruby
[14:25:39] madsa: has joined #ruby
[14:30:00] Rum: has joined #ruby
[14:31:51] mattwashere: has joined #ruby
[14:32:59] SilverKey: has joined #ruby
[14:33:55] xall_: has joined #ruby
[14:36:35] Macaveli: has joined #ruby
[14:39:55] KCmetro: has joined #ruby
[14:41:28] dunpeal: I have an Array of objects. How can I get the first object in the array for which object.foo is not nil?
[14:41:43] dunpeal: (or nil if object.foo == nil for all objects in the Array)
[14:41:54] ljarvis: .find(&:foo)
[14:41:56] aegis3121: ?ri Array#find
[14:41:56] ruby[bot]: aegis3121: I don't see no Array#find, whom should I tell about ri?
[14:42:08] ljarvis: ?ri Enumerable#find
[14:42:08] ruby[bot]: ljarvis: I don't see no Enumerable#find, whom should I tell about ri?
[14:42:22] aegis3121: glad it's not just me.
[14:43:06] airdisa: has joined #ruby
[14:45:46] jaguarmagenta: has joined #ruby
[14:49:14] AgentVenom: has joined #ruby
[14:49:15] RegulationD: has joined #ruby
[14:49:29] syndikate: has joined #ruby
[14:49:50] xall_: has joined #ruby
[14:50:35] Sou|cutter: has joined #ruby
[14:50:41] rippa: has joined #ruby
[14:50:57] jhass: ljarvis: &ri still
[14:50:58] jhass: cause adaedra didn't port it to ruboto yet :P
[14:51:23] blackmesa: has joined #ruby
[14:51:28] rrawlins: has joined #ruby
[14:54:50] douglascorrea: has joined #ruby
[14:56:58] diegoviola: has joined #ruby
[14:58:04] joonty: has joined #ruby
[14:58:29] swills: has joined #ruby
[14:59:47] SilverKey: has joined #ruby
[15:04:33] CloCkWeRX: has joined #ruby
[15:05:25] CloCkWeRX: has left #ruby: ()
[15:05:41] xall_: has joined #ruby
[15:05:47] seap: has joined #ruby
[15:06:02] AgentVen_: has joined #ruby
[15:06:56] k3rn31: has joined #ruby
[15:07:18] bkxd: has joined #ruby
[15:07:45] Torrone: has joined #ruby
[15:08:17] jeremyhall: has joined #ruby
[15:09:04] thomas_25: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[15:10:34] pawnbox: has joined #ruby
[15:10:39] glcx__: has joined #ruby
[15:13:00] jenrzzz: has joined #ruby
[15:13:01] jenrzzz: has joined #ruby
[15:15:22] TheWhip: has joined #ruby
[15:16:11] cschneid_: has joined #ruby
[15:16:17] solars: has joined #ruby
[15:19:13] GnuYawk: has joined #ruby
[15:19:14] dramforever: has joined #ruby
[15:19:59] Coldblackice: has joined #ruby
[15:21:35] xall_: has joined #ruby
[15:21:43] [Butch]: has joined #ruby
[15:24:36] dramforever: Is there a way to pass some value into a def inside a do-block?
[15:25:00] AndrewIsHere: has joined #ruby
[15:25:05] moei: has left #ruby: ("Leaving...")
[15:25:44] dramforever: Well it looks like the "do" thing is a red herring
[15:26:28] dramforever: so basically in the code { foo = "something"; def bar; foo; end }, bar wouldn't work because it can't see the "foo"
[15:27:47] rrawlins: has joined #ruby
[15:28:09] moei: has joined #ruby
[15:28:15] Sou|cutter: define_method(:bar) { foo } maybe?
[15:28:43] Sou|cutter: I really wonder about what you're trying to do
[15:28:43] pawnbox: has joined #ruby
[15:28:56] ule: has joined #ruby
[15:29:08] dramforever: Well it's eventmachine madness I think
[15:29:23] dramforever: The code is here, a bit long but I think I can explain http://lpaste.net/171723#line49
[15:29:57] dramforever: So as a server, A is a connection from a client, and A needs to connect to B
[15:30:00] ccooke: has joined #ruby
[15:30:27] dramforever: but I want data sent from B to be forwarded back to the client, so the receieve_data method needs to know about A
[15:31:19] nankyokusei: has joined #ruby
[15:32:32] ule: has joined #ruby
[15:35:33] KevinFrench: has joined #ruby
[15:36:56] dramforever: OK I got it already from another chat room
[15:37:19] A124: has joined #ruby
[15:37:23] adl: has joined #ruby
[15:37:29] madgen: has joined #ruby
[15:38:16] dramforever: In case anyone wonders, I had something like this (brackets to isolate code): [ outer = 123; weird_method { |c| def c.m; end } ]
[15:38:46] dramforever: I solved it by setting an instance variable of c at the beginning of the block, where outer *is* in scope
[15:41:38] veduardo_: has joined #ruby
[15:42:50] mpampis_sougias: has joined #ruby
[15:43:13] dramforever: has left #ruby: ("Leaving")
[15:45:35] cajone: has joined #ruby
[15:46:25] craigp: has joined #ruby
[15:47:08] sdothum: has joined #ruby
[15:48:14] matp: has joined #ruby
[15:48:21] Wildfyr: has joined #ruby
[15:48:21] Wildfyr: has joined #ruby
[15:49:38] ChiefAlexander: has joined #ruby
[15:50:10] RegulationD: has joined #ruby
[15:55:07] sysanthrope: has joined #ruby
[15:56:06] sdothum: has joined #ruby
[15:56:34] devoid: has joined #ruby
[15:58:55] dminuoso: has joined #ruby
[15:59:25] sumobob: has joined #ruby
[16:01:24] pipou_: has joined #ruby
[16:02:13] dvinciguerra_: has joined #ruby
[16:02:19] devbug: has joined #ruby
[16:03:55] freerobby: has joined #ruby
[16:04:18] jordanm: has joined #ruby
[16:06:37] pipou_: i try to call a methode in class since my module but i dont understand why that's doesn't work
[16:06:38] pipou_: https://gist.github.com/zyriuse75/ebbc034080046ac40a50efa70843f613#file-class-rb-L16
[16:06:44] marxarelli: has joined #ruby
[16:07:01] [Butch]: has joined #ruby
[16:09:03] xall_: has joined #ruby
[16:09:46] LoneHermit: has joined #ruby
[16:12:11] Papierkorb: pipou_: `@connexion` is a Mysql2::Client instance, which doesn't include the module `Sgbd`.
[16:13:16] pipou_: so how can i call for my methode check_table_exists ?
[16:13:30] pipou_: Papierkorb: thanks for your help men ;)
[16:13:45] jenrzzz: has joined #ruby
[16:13:45] jenrzzz: has joined #ruby
[16:17:45] chouhoulis: has joined #ruby
[16:18:26] SCHAAP137: has joined #ruby
[16:18:46] FooMunki: has joined #ruby
[16:21:24] Torrone: has joined #ruby
[16:22:14] dionysus69: has joined #ruby
[16:22:37] phrozen77_: has joined #ruby
[16:24:53] SilverKey: has joined #ruby
[16:25:08] roamingdog: has joined #ruby
[16:25:08] Zackio: has joined #ruby
[16:25:16] TomyLobo: has joined #ruby
[16:28:50] conta: has joined #ruby
[16:31:03] douglascorrea: has joined #ruby
[16:31:41] skade: has joined #ruby
[16:32:37] cdg: has joined #ruby
[16:32:53] JeanCarloMachado: has joined #ruby
[16:33:54] cdg: has joined #ruby
[16:34:32] cdg: has joined #ruby
[16:35:29] preyalone: has joined #ruby
[16:35:36] cdg: has joined #ruby
[16:36:53] Devalo: has joined #ruby
[16:39:12] macsteps: has joined #ruby
[16:42:39] Tempesta_: has joined #ruby
[16:42:44] Macaveli: has joined #ruby
[16:42:55] anisha: has joined #ruby
[16:43:16] madsa: has joined #ruby
[16:43:41] vuoto: has joined #ruby
[16:43:50] dminuoso: So I have a binary file following some format, and I would like to interact with that file with Ruby. Is there some gem around that let's me quickly map a pattern into some structure, much like I could declare structs in C and type pun through byte arrays?
[16:44:33] pusewicz: has joined #ruby
[16:44:44] dminuoso: (I really want to avoid manually reading the file a few bytes at a time and constantly using "unpack"0
[16:45:02] jhass: I guess most people just unpack :/
[16:45:10] jhass: note you can unpack the whole thing at once
[16:45:18] EdwardIII: has joined #ruby
[16:45:31] dminuoso: jhass: Sadly I cant, because the size of some structures depent on values from the structures before.
[16:45:32] jhass: a, b, c = data.unpack("SUL")
[16:46:05] dminuoso: Or on the other hand, I could simply use the existing ruby-elf.... :-)
[16:46:26] jhass: haha, reading ELF? hf
[16:46:28] jaguarmagenta: has joined #ruby
[16:46:37] dminuoso: I want to modify ELF in ways that binutils don't allow me to.
[16:46:58] jhass: curious, what ways?
[16:47:20] dminuoso: It's fairly simple actually. I want to forcibly change the order of sections in the physical file.
[16:47:29] harfangk: has joined #ruby
[16:47:42] dminuoso: (Linker scripts only let you change how they are loaded into memory)
[16:47:52] Cohedrin: has joined #ruby
[16:48:24] jhass: to optimize something or?
[16:49:06] dminuoso: Well, it's common among hobbyist os developers to use a combination of multiboot and elf. The former however requires a special multiboot magic sequence to be located within the first 8096 bytes of the file.
[16:49:21] joonty: has joined #ruby
[16:51:23] dminuoso: jhass: https://github.com/Flameeyes/ruby-elf/blob/master/lib/bytestream-reader.rb
[16:51:35] dminuoso: This is how that particular gem by the way implements their "bytestream parsing" logic.
[16:52:02] jhass: heh, could be worse
[16:53:52] dminuoso: The whole gem isn't exactly suited for my needs though. I'm actually thinking whether I might use this to kickstart a ruby based linker.
[16:54:04] apeiros: dminuoso: https://github.com/vjoel/bit-struct might be of interest (never tried it myself, not sure whether it has an IO component)
[16:54:16] vF3hNGxc47h8: has joined #ruby
[16:54:31] dminuoso: apeiros: That! Is exactly what I was looking for.
[16:54:48] roamingdog: has joined #ruby
[16:55:57] dunpeal: has joined #ruby
[16:56:14] giz|work: has joined #ruby
[16:56:46] nankyokusei: has joined #ruby
[16:58:08] kavanagh: has joined #ruby
[16:58:15] dminuoso: apeiros: And it does indeed have an IO component, as shown in this example: https://github.com/vjoel/bit-struct/blob/master/examples/ping-recv.rb
[16:58:20] freerobby: has joined #ruby
[16:59:02] dminuoso: Or rather it comes with a simple interface to construct such bit structs from arbitrary structs.
[16:59:05] dminuoso: I shall use this.
[16:59:11] AndrewIs_: has joined #ruby
[16:59:13] ruby[bot]: here's your cookie: 🍪
[16:59:16] dminuoso: apeiros: For you
[17:00:57] aegis3121: has joined #ruby
[17:01:30] Madplatypus: has joined #ruby
[17:01:42] the_drow: has joined #ruby
[17:03:00] blackmesa: has joined #ruby
[17:03:11] GodFather: has joined #ruby
[17:04:35] apeiros: ?cookie dminuoso
[17:04:35] ruby[bot]: dminuoso: here's your cookie: 🍪
[17:04:42] apeiros: and you're welcome
[17:05:06] apeiros: I'm glad I correctly remembered the name of that gem :D
[17:05:17] Contigi: has joined #ruby
[17:05:46] tvw: has joined #ruby
[17:06:38] bmurt: has joined #ruby
[17:06:50] hutch34: has joined #ruby
[17:07:57] bkxd: has joined #ruby
[17:11:24] ccooke: has joined #ruby
[17:11:42] Torrone: has joined #ruby
[17:13:42] GnuYawk: has joined #ruby
[17:13:48] EdwardIII: has joined #ruby
[17:13:52] [gmi]: has joined #ruby
[17:13:58] k3rn31: has joined #ruby
[17:14:25] SilverKey: has joined #ruby
[17:14:32] jenrzzz: has joined #ruby
[17:14:32] jenrzzz: has joined #ruby
[17:16:10] SilverKey: has joined #ruby
[17:18:26] elifoster: has joined #ruby
[17:21:21] shevy: https://kristerw.blogspot.co.at/2016/07/code-behaving-differently-in-c90-c99.html
[17:21:34] shevy: I want something like this for ruby 1.0 1.6 1.8 1.9 and 2.x and beyond!
[17:23:30] hutch34: has joined #ruby
[17:24:07] replay: has joined #ruby
[17:24:09] SilverKey: has joined #ruby
[17:24:52] aep-shoutlet: has joined #ruby
[17:26:01] renderful: has joined #ruby
[17:28:47] xall_: has joined #ruby
[17:29:12] vuoto: has joined #ruby
[17:29:17] ChiefAlexander: has joined #ruby
[17:30:09] postmodern: has joined #ruby
[17:31:01] KCmetro: has joined #ruby
[17:31:30] freerobby: has joined #ruby
[17:31:36] sneakers: has joined #ruby
[17:31:44] djbkd: has joined #ruby
[17:32:23] jeremyhall_: has joined #ruby
[17:33:13] last_staff: has joined #ruby
[17:33:50] ramfjord: has joined #ruby
[17:35:03] [gmi]: has joined #ruby
[17:35:17] Silthias: has joined #ruby
[17:36:00] RegulationD: has joined #ruby
[17:37:01] nankyokusei: has joined #ruby
[17:37:57] whathappens: has joined #ruby
[17:38:52] craigp: has joined #ruby
[17:39:51] ramfjord: has joined #ruby
[17:41:31] last_staff: has joined #ruby
[17:42:03] jenrzzz: has joined #ruby
[17:42:03] jenrzzz: has joined #ruby
[17:42:08] RubyNewby123: Hi guys, thanks again for all the help yesterday: This is my little game project today: https://repl.it/CfZu/109 (critique welcome)
[17:45:57] twinklerock: has joined #ruby
[17:48:14] Zarthus: risky click
[17:48:19] Zarthus: but it';s ruby code!
[17:48:32] hutch34: has joined #ruby
[17:49:09] Zarthus: RubyNewby123: you probably want to use \n or \r\n instead of just \r
[17:49:38] RubyNewby123: why is newline important?
[17:49:58] havenwood: RubyNewby123: You might consider using Readline from Ruby's stdlib to add features like autocompletion of available option and uparrow for last command, etc: http://ruby-doc.org/stdlib/libdoc/readline/rdoc/Readline.html
[17:50:16] RubyNewby123: it still goes to the next line for me... is that for different consoles or something?
[17:50:27] Zarthus: RubyNewby123: it doesn't matter when using puts, but \r alone is legacy mac os
[17:50:32] Zarthus: I *believe*
[17:50:34] gregf: has joined #ruby
[17:50:43] Zarthus: in the statement I observed it looks redundant
[17:50:56] jhass: the semantics kinda still come from typewiters
[17:51:04] adaedra: on most terms, it goes back to the beginning of line
[17:51:04] jhass: \r returns to the beginning of the line
[17:51:04] RubyNewby123: and thank your havenwood, that sounds great, I'll deffo check out
[17:51:06] jhass: \n shifts down
[17:51:28] havenwood: RubyNewby123: Here's a little writeup on implementing a little shell with Readline that might give you some ideas: https://www.blackbytes.info/2016/07/writing-a-shell-in-ruby/
[17:51:54] Zarthus: the puts on l39 is also useless
[17:52:24] douglascorrea: has joined #ruby
[17:53:42] kavanagh: has joined #ruby
[17:54:18] Zarthus: I'm not sure how I feel about the choice class
[17:54:50] hutch34_: has joined #ruby
[17:55:04] dvinciguerra_: has joined #ruby
[17:55:36] RubyNewby123: how come Zarthus?
[17:55:48] Zarthus: just feels a bit awkward to use, and very unreadable
[17:56:17] kolotrupa: has joined #ruby
[17:56:17] shevy: RubyNewby123 just abstract the things; class Player, class Game
[17:57:06] shevy: if a user needs to input data to either class Player or class Game, he can do so either on class Player; or you let class Game handle the input and then pass it to class Player. class Choice sounds very abstract
[17:57:26] roamingdog: has joined #ruby
[17:57:32] craigp: has joined #ruby
[17:58:37] Torrone: has joined #ruby
[17:58:38] kolotrupa: has joined #ruby
[17:58:46] banisterfiend: has joined #ruby
[17:59:24] RubyNewby123: shevy: I've read that 5 times now and don't follow. I'm not smart. Who is the "user"? A dev or a game player?
[18:00:00] akkad: has joined #ruby
[18:00:33] Zarthus: also, one more thing, but I'd definitely consider learning how symbols work
[18:01:05] chouhoulis: has joined #ruby
[18:01:06] ramfjord: has joined #ruby
[18:01:09] Zarthus: they're slightly more advanced, but you seem to be at the level where that should be your next move
[18:02:00] aryaching: has joined #ruby
[18:02:05] RubyNewby123: Zarthus: you have my word I will, I must confess to skipping them so far (I only picked up ruby on Friday, coming from c# - and not great at that) but the fact you discerned that so easily means I'm clearly missing a trick
[18:02:10] Zarthus: I'm not entirely sure if L102-114 will work - break might break out of the case statement
[18:03:19] sucks: has joined #ruby
[18:04:10] codecop: has joined #ruby
[18:05:51] jenrzzz: has joined #ruby
[18:06:19] Zarthus: if nothing else, I'd do something like available_weapons = [:massive_axe, :enhanced_staff, :wet_trout]; weapon_chosen = gets.chomp.downcase.to_sym; if available_weapons.include? weapon_chosen ... end; puts " none of those weapons exist, sorry. Try: " + available_weapons.join(", ")
[18:06:28] Zarthus: gets rid of the switch entirely
[18:06:50] gregf: has joined #ruby
[18:07:06] Zarthus: also includes good error messages :)
[18:08:20] devbug: has joined #ruby
[18:08:36] aegis3121: has joined #ruby
[18:10:19] RubyNewby123: Thanks man,I've took your snippet and will research symbols as that seems like wizardry. So readable!
[18:10:32] devbug: has joined #ruby
[18:10:47] shevy: RubyNewby123 well the user is whoever runs your code at hand
[18:10:54] shevy: so this can be you or someone else
[18:11:02] LoneHermit: has joined #ruby
[18:11:09] teoric: has joined #ruby
[18:11:20] Zarthus: RubyNewby123: it needs a bit more refining, but it does get rid of the switch case
[18:11:55] Zarthus: at some point you will want your weapons to have their own class if the scale of the project grows
[18:12:31] RubyNewby123: shevy: what did you mean class choice is very abstract? is that good or bad?
[18:12:43] vuoto_: has joined #ruby
[18:13:21] RubyNewby123: Zarthus: this probably isn't going to grow very big and is just my hello world app for ruby but I understand
[18:13:33] Alina-malina: has joined #ruby
[18:14:24] Zarthus: well if I can't throw the trout to get rid of the trolls at the end of this I will be disappointed!
[18:15:18] Alina-malina: has joined #ruby
[18:15:31] shevy: RubyNewby123 well, I remember you were fetching user input right?
[18:15:50] spudowiar: has joined #ruby
[18:15:52] shevy: you could let class Player do so instead
[18:15:59] nertzy: has joined #ruby
[18:16:04] shevy: I mean class Game
[18:16:10] devbug: has joined #ruby
[18:16:41] kolotrupa: has joined #ruby
[18:16:59] RubyNewby123: class game already reads user input no
[18:17:04] RubyNewby123: "read_choice"
[18:17:13] vuoto: has joined #ruby
[18:17:41] Mimorial: has joined #ruby
[18:20:41] jjtoy: has joined #ruby
[18:20:47] Devalo: has joined #ruby
[18:20:54] jjtoy: how would someone parse this string to get the timestamp? "Jul 25 17:45:46 deeptest docker/2292_1[7980]: Killed#015"
[18:21:12] jjtoy: im trying to avoid regexs
[18:22:58] apeiros: >> "Jul 25 17:45:46 deeptest docker/2292_1[7980]: Killed#015"[0,15]
[18:22:59] ruby[bot]: apeiros: # => "Jul 25 17:45:46" (https://eval.in/611746)
[18:23:25] c0mrad3: has joined #ruby
[18:24:06] jjtoy: apeiros: what did that do? are you in bot mode?
[18:24:19] jjtoy: oh, i see
[18:24:29] jjtoy: hmm, simple hack :)
[18:24:30] madsa: has joined #ruby
[18:24:40] jjtoy: i will use that!
[18:24:56] kolotrupa: has joined #ruby
[18:26:18] apeiros: ACTION now wonders by what definition this falls under "hack"
[18:26:44] symm-: has joined #ruby
[18:27:10] Torrone: has joined #ruby
[18:27:17] ec0: has joined #ruby
[18:28:51] xall_: has joined #ruby
[18:29:36] l4v2: has joined #ruby
[18:29:38] Puffball: has joined #ruby
[18:29:39] Pumukel: has joined #ruby
[18:29:41] chouhoulis: has joined #ruby
[18:30:42] jackjackdripper: has joined #ruby
[18:32:46] devbug: has joined #ruby
[18:33:43] nerium: has joined #ruby
[18:33:51] Dimik: has joined #ruby
[18:35:53] jackjackdripper: has joined #ruby
[18:37:01] Rum: has joined #ruby
[18:39:01] SilverKey: has joined #ruby
[18:41:30] nankyokusei: has joined #ruby
[18:43:04] djdarkbeat__: has joined #ruby
[18:43:15] devbug: has joined #ruby
[18:43:38] postmodern: has joined #ruby
[18:43:50] bmurt: has joined #ruby
[18:43:54] kavanagh: has joined #ruby
[18:45:27] SilverKey: has joined #ruby
[18:47:16] jaguarmagenta: has joined #ruby
[18:48:56] xall_: has joined #ruby
[18:56:07] douglascorrea: has joined #ruby
[18:57:03] RubyNewby123: Zarthus: In your suggestion of using symbols (I've been reading up a bit). I get that they're more efficient etc, but in that example, wouldn't they be displayed as "sybol_name" to the user? So I'd lose a friendly display name?
[18:57:38] aryaching: has joined #ruby
[18:58:09] Zarthus: RubyNewby123: yep
[18:58:22] Zarthus: This is why I suggested a class / hash for when the project grows
[18:58:57] RubyNewby123: ok I'm with ya
[18:59:11] Zarthus: I'd probably have the software generate a list of weapons they can pick from, prefix them with identifiers and have the user insert a number rather than the name
[18:59:41] drbrain: RubyNewby123: Zarthus: what's not more efficient is picking symbols for efficiency then converting strings to symbols to look things up in a hash
[18:59:41] RubyNewby123: I considered that very thing today
[18:59:47] RubyNewby123: an inventory essentially
[18:59:59] Rum: has left #ruby: ()
[19:00:18] Zarthus: and you could do something like Weapon = Struct.new(:internal_name, :display_name, :damage) if you don't want to make a class
[19:00:19] drbrain: if you have to convert to extract data from a constant hash then you should switch your keys
[19:00:41] gregf: has joined #ruby
[19:00:42] Zarthus: drbrain: it wasn't so much about efficiency as getting rid of the case
[19:01:15] terminalrecluse: has joined #ruby
[19:01:37] Zarthus: internal name is rather redundant there, it'd be potato_gun = Weapon.new("Potato Gun", 9001)
[19:01:51] Torrone: has joined #ruby
[19:02:48] alfiemax: has joined #ruby
[19:02:52] bad_ip: has joined #ruby
[19:07:17] alfiemax: has joined #ruby
[19:07:37] miqlas-H: has joined #ruby
[19:08:00] yqt: has joined #ruby
[19:09:02] bkxd: has joined #ruby
[19:11:30] noregret: how can I convert an integer to utf-8 ?
[19:11:34] freerobby: has joined #ruby
[19:14:48] Eiam: has joined #ruby
[19:17:49] jenrzzz: has joined #ruby
[19:17:49] jenrzzz: has joined #ruby
[19:18:14] Squarism: has joined #ruby
[19:18:25] chouhoul_: has joined #ruby
[19:18:34] Squarism: ACTION is Certified Scrum master - taking questions
[19:19:39] chouhoul_: has joined #ruby
[19:20:01] Zarthus: but are you a Scrum Developer?
[19:20:21] Squarism: Scrum Master > Scrum Developer
[19:20:25] Zarthus: http://i.imgur.com/JfW5Bjg.png
[19:20:42] Zarthus: I always read that as "developer of SCRUM sessions"
[19:21:35] johnny56: has joined #ruby
[19:21:38] jhass: Squarism: what's the atomic weight of a water molecule?
[19:21:38] binaryplease1: has joined #ruby
[19:22:05] xall_: has joined #ruby
[19:22:19] diablerouge: has joined #ruby
[19:22:24] Papierkorb: Squarism: What makes DHMO bombs so dangerous in contrast to conventional weapons?
[19:22:45] d5sx43: has joined #ruby
[19:24:02] weaksauce: has joined #ruby
[19:24:05] jhass: Squarism: what will you do with all the questions you collect?
[19:24:53] Papierkorb: jhass: My guess is, writing them on sticky notes and hang them out for others to answer. Squarism is here to communicate our impediments, not to really answer it!
[19:26:41] troulouliou_div2: has joined #ruby
[19:27:04] djbkd: has joined #ruby
[19:28:47] EdwardIII: has joined #ruby
[19:29:28] FernandoBasso: has joined #ruby
[19:30:47] Squarism: all questions can be answered with planning poker - as all software bussiness problems
[19:31:56] Squarism: has left #ruby: ("Leaving")
[19:32:42] Papierkorb: What's the baseline then?
[19:32:47] rann: quick question: there is gem --user-install, but is there also its inverse: explicitly asking for installation in a global gem location?
[19:33:02] Papierkorb: rann: --no-user-install
[19:33:02] shinnya: has joined #ruby
[19:33:10] Papierkorb: so, yeah, the opposite :P
[19:33:46] rann: how does gem determine what no-user-install is?
[19:34:18] Papierkorb: there's only system-wide and user-local install. if it's not one, it's the other.
[19:34:39] rann: I saw that GEM_PATH can contain more than two entries tho
[19:35:30] rann: And I noticed that if you do not set GEM_HOME, behavior differs per platform (some point to system-wide by default, some to ~/.gem/<version>)
[19:35:54] Papierkorb: yes it does differ >_>
[19:36:49] RegulationD: has joined #ruby
[19:36:59] rann: Is it common practice to set GEM_HOME to something relative? I've been testing with that and it works amazingly much like npm that way
[19:37:21] havenwood: rann: Some systems opt for --user-install and others opt for --no-user-install by default.
[19:37:34] rann: (I'm very new to ruby btw, so excuse me if i'm stating the obvious)
[19:37:37] Papierkorb: rann: I'd say "no, it's not"
[19:38:05] Papierkorb: rann: in fact, I wouldn't recommend it, as then you'd have to have a relative path in your $PATH to access the gem binaries.
[19:38:18] last_staff: has joined #ruby
[19:38:25] rann: for development that is really, really nice though.
[19:38:26] havenwood: rann: A popular tool for updating env vars including PATH, GEM_HOME, GEM_PATH etc is chruby: https://github.com/postmodern/chruby#readme
[19:38:35] Papierkorb: rann: there's bundler for that
[19:39:32] havenwood: rann: The gem Bundler is the most popular way to manage deps for a specific project. RubyGems itself also now supports dependency resolution but it's not as widely used as Bundler yet.
[19:39:34] rann: how would you do that with bundler? I am using that, but in my case bundler will insist on installing globally, ie, in the system-wide location on my platform
[19:39:51] Papierkorb: rann: $ bundle install --path vendor/bundle
[19:39:55] havenwood: rann: bundle --path vendor/bundle
[19:40:03] Papierkorb: rann: initially for the project, after that, just `bundle`
[19:40:11] rann: aaah ok, awesome
[19:40:22] havenwood: rann: --path is a "remembered" setting
[19:40:33] rann: Right, now it makes sens
[19:40:55] rann: well, on the way I learned *a lot* about how gem finds stuff and what is involved :-)
[19:41:16] Sou|cutter: it remembers stuff in .bundler/config
[19:41:22] skweek: has joined #ruby
[19:41:41] SilverKey: has joined #ruby
[19:41:56] devbug: has joined #ruby
[19:42:36] rann: another question: if I always want to compile native gems: --platform ruby in gemrc?
[19:43:00] Kamilion: has joined #ruby
[19:43:12] minotep: has joined #ruby
[19:43:28] rann: (read: I never want to get precompiled dll's/so's, but build on install)
[19:44:22] havenwood: >> 42.to_s.encode.encoding # noregret
[19:44:27] Papierkorb: rann: they're always built/compiled on your system
[19:44:31] ruby[bot]: havenwood: # => #<Encoding:US-ASCII> (https://eval.in/611776)
[19:44:56] Papierkorb: rann: Or, I'm not aware of gems which ship binaries. Maybe some JRuby gems do ship JARs, no idea
[19:45:16] rann: pg, kgio, raindrops
[19:45:22] havenwood: noregret: 42.to_s.encode('utf-8')
[19:46:27] Papierkorb: rann: `pg` ships with an C extension as source
[19:46:42] Papierkorb: everything else would be broken
[19:47:12] rann: Papierkorb: and bcrypt also.. On windows they do, they ship mingw variants, but I noticed that more often than not, these are tightly coupled to the ruby interpreter version and they might install an so/dll that will not load correctly
[19:47:43] Papierkorb: rann: Ah, Windows issues. Not a windows user.
[19:47:51] rann: on windows you can use the devkit from RubyInstaller as a compiler (the same that is used to create the ruby interpreter on windows)
[19:47:57] Papierkorb: Why would you want to use Windows to dev?
[19:48:30] rann: Anyways: --platform ruby avoids those binary variants I've notices
[19:48:49] augcesar: has joined #ruby
[19:49:17] rann: for example: gem install bcrypt (on windows) -> .gems/2.3.0/gems/bcrypt-mingw-something
[19:49:54] Torrone: has joined #ruby
[19:49:55] Papierkorb: Most likely these binary packages are there so people don't have to mess with windows to get anything to compile at all. Still, Windows only issue
[19:49:57] rann: for example: gem install bcrypt --platform ruby (on windows) -> compile phase -> .gems/2.3.0/gems/bcrypt-version (like non-native-code-packages)
[19:50:37] devbug: has joined #ruby
[19:50:47] ec0: has joined #ruby
[19:51:13] rann: Yes, they provide the binaries to assist people that want to install a native gem while no compiler setup available. that's the intent for sure
[19:51:22] miqlas-H: Is there new release already?
[19:51:50] roshanavand: has joined #ruby
[19:52:35] rann: but it didn't work in 3 out of 4 packages I tried it with, but after getting the devkit setup (very simple btw) I could install all from source with compile stage.
[19:53:15] djbkd: has joined #ruby
[19:54:17] blackmesa: has joined #ruby
[19:54:44] noffle: has joined #ruby
[19:54:57] polishdub: has joined #ruby
[19:55:08] devbug: has joined #ruby
[19:57:52] havenwood: miqlas-H: Ruby 2.3.1 is the latest release or there's 2.4.0-preview1 to try out for a taste of what's to come.
[19:58:37] devbug_: has joined #ruby
[19:59:05] miqlas-H: I got the 2.4.0_preview compiled on Haiku. It was easy ride.
[19:59:31] miqlas-H: But it would be really great to have user-install as default.
[19:59:51] miqlas-H: The standard paths are read-only in Haiku.
[20:00:27] pawnbox: has joined #ruby
[20:00:28] conta: has joined #ruby
[20:02:02] devbug: has joined #ruby
[20:03:45] sepp2k: has joined #ruby
[20:04:05] Torrone: has joined #ruby
[20:05:13] rann: miglas-H heh, funny you mention that, I was just jakkering about the same thing :-)
[20:05:54] shevy: 2.4.0 is inofficial dev release
[20:06:37] shevy: when you write user-install, you mean gem?
[20:06:40] miqlas-H: i made already a recipe for that in haikuports.
[20:08:10] bbathe: has joined #ruby
[20:08:49] bbathe: has left #ruby: ()
[20:09:02] inukshuk_: has joined #ruby
[20:09:10] temhaa: has joined #ruby
[20:09:12] sballert: has joined #ruby
[20:09:36] miqlas-H: But Haiku needs the following: stack_protector=no
[20:09:50] miqlas-H: without it the configure scripts just goes crazy
[20:10:06] miqlas-H: can somebody put it into the ruby configure?
[20:10:20] miqlas-H: BTW: i really like the colorized configure output.
[20:10:25] temhaa: I am trying to install https://github.com/suer/redmine_oauth_provider to my redmine. But when I try I am getting cannot load such file -- oauth/rack/oauth_filter. is the problem related to ruby? If so can you help me
[20:10:37] miqlas-H: I would like to see it in every configure scripts.
[20:11:05] dminuoso: temhaa: No the problem is related to how the code tries to load a dependency.
[20:11:46] dminuoso: temhaa: You might get more help in a redmine related forum/channel, since you probably are installing it wrong, or the plugin is broken.
[20:11:48] chouhoulis: has joined #ruby
[20:12:38] headius: Papierkorb, rann: any gem can ship binaries for a specific platform by releasing a platform-specific gem
[20:12:47] headius: most JRuby gems that have jars in them are -java for this reason
[20:12:52] shevy: miqlas-H you may have to file an issue request at https://bugs.ruby-lang.org/projects/ruby-trunk - there are not many haiku people so if you don't point out how things may work, nobody else may know :D
[20:13:04] Papierkorb: headius: they can, but I'm not aware of any MRI gems doing that for linux
[20:13:24] temhaa: dminuoso: Thank you
[20:13:28] aryaching: has joined #ruby
[20:13:37] headius: Papierkorb: I remember seeing one but can't remember what it was
[20:14:05] headius: I think it's usually just easier to have some makefile rules for *nix than to release binary builds
[20:14:15] headius: maybe if you're closed source you'd want to do it
[20:15:14] devbug: has joined #ruby
[20:15:30] freerobby1: has joined #ruby
[20:16:23] miqlas-H: shevy: you know, life is too short to revove your USB devices safely.
[20:16:34] miqlas-H: I never have enough time to do all my PR's
[20:17:03] BillSussman: has joined #ruby
[20:17:44] shevy: hah I was ruthless in removing USB stuff
[20:17:59] Azure: has joined #ruby
[20:18:02] shevy: until I realized that some external USB hdd's may be killed if you just disconnect them :(
[20:18:52] arnonhongklay: has joined #ruby
[20:19:37] freerobby: has joined #ruby
[20:22:46] jenrzzz: has joined #ruby
[20:22:46] jenrzzz: has joined #ruby
[20:22:54] solars: has joined #ruby
[20:23:56] xall_: has joined #ruby
[20:24:11] banisterfiend: has joined #ruby
[20:25:13] miqlas-H: shevy: expensive training.
[20:27:08] blackgoat: has joined #ruby
[20:27:33] arnonhon_: has joined #ruby
[20:29:29] jeremyhall: has joined #ruby
[20:29:39] miqlas-H: Any idea or tips, how can i teach abstraction for the workmates?
[20:30:44] ur5us: has joined #ruby
[20:30:45] hutch34_: has joined #ruby
[20:31:00] madsa: has joined #ruby
[20:31:16] iamdevnul: anybody here familiar with the aasm gem? I have a subclass that inherits from a parent class with a defined state machine, i'd like to to redefined that state machine on the subclass
[20:31:37] bad_ip: has joined #ruby
[20:35:28] finisherr: has joined #ruby
[20:35:55] devbug: has joined #ruby
[20:36:52] Alayde: has joined #ruby
[20:38:04] Uranio: has joined #ruby
[20:38:20] marr: has joined #ruby
[20:40:47] whathappens: has joined #ruby
[20:41:17] noffle: has left #ruby: ("WeeChat 1.5-rc2")
[20:41:19] devbug: has joined #ruby
[20:43:10] devoid: has joined #ruby
[20:43:17] EdwardIII: has joined #ruby
[20:43:34] cyphase: has joined #ruby
[20:43:57] fanantoxa: has joined #ruby
[20:45:24] devbug: has joined #ruby
[20:46:23] statelesscode_: has joined #ruby
[20:47:10] devbug_: has joined #ruby
[20:47:50] djdarkbeat: has joined #ruby
[20:48:01] jaguarmagenta: has joined #ruby
[20:48:16] devbug: has joined #ruby
[20:48:20] miqlas-H: I need to go Guys, keep up this good work. Bye!
[20:49:24] devbug: has joined #ruby
[20:50:37] kolotrupa: has joined #ruby
[20:51:21] rcvalle: has joined #ruby
[20:52:10] swills: has joined #ruby
[20:54:12] lechiffre10: has joined #ruby
[20:54:27] lechiffre10: hello friends
[20:55:51] joonty: has joined #ruby
[20:55:55] havenwood: lechiffre10: hi
[20:56:14] lechiffre10: anyone have experience with prelauncher campaigns on rails?
[20:56:24] lechiffre10: trying to integrate Thunderclap.it for campaigns
[20:56:54] Torrone: has joined #ruby
[20:58:16] bad_ip: has joined #ruby
[20:58:58] sucks: has joined #ruby
[21:04:18] dunpeal: has joined #ruby
[21:06:50] ur5us: has joined #ruby
[21:07:55] devbug: has joined #ruby
[21:09:26] jenrzzz: has joined #ruby
[21:09:30] bkxd: has joined #ruby
[21:09:40] Xiti: has joined #ruby
[21:13:10] devbug: has joined #ruby
[21:14:19] zeroDi: has joined #ruby
[21:16:46] moeabdol: has joined #ruby
[21:17:20] last_staff: has joined #ruby
[21:17:36] croberts: has joined #ruby
[21:19:31] Torrone: has joined #ruby
[21:20:15] temhaa: has left #ruby: ()
[21:20:16] neanderslob: has joined #ruby
[21:21:46] sckhzn: has joined #ruby
[21:22:23] djdarkbeat: has joined #ruby
[21:24:42] neanderslob: has joined #ruby
[21:26:11] madsa: has joined #ruby
[21:30:06] workmad3: has joined #ruby
[21:31:18] skweek: has joined #ruby
[21:31:47] devbug: has joined #ruby
[21:34:10] kobain: has joined #ruby
[21:34:25] kavanagh: has joined #ruby
[21:35:43] blackmesa: has joined #ruby
[21:36:59] devbug: has joined #ruby
[21:37:47] RegulationD: has joined #ruby
[21:37:54] JeanCarloMachado: has joined #ruby
[21:39:21] last_staff: has joined #ruby
[21:40:50] jenrzzz: has joined #ruby
[21:41:04] johnmilton: has joined #ruby
[21:42:16] mattwashere: has joined #ruby
[21:45:10] last_staff: has joined #ruby
[21:46:18] solars: can anyone tell me what I'm doing wrong with prepend? https://gist.github.com/solars/f9d93b1929bd95e3845107d2814a8f52
[21:46:32] johnmilton: has joined #ruby
[21:47:23] der-landgraf: has joined #ruby
[21:48:10] jhass: solars: prepend, like include and extend, adds the instance methods of module to another class or module as instance methods, "class methods" are defined in another class than what you prepend/include/extend
[21:48:34] jhass: solars: you meant to say def error instead of def self.error
[21:49:25] spudowiar: has joined #ruby
[21:52:03] tjohnson: has joined #ruby
[21:53:00] oscardaichi: has joined #ruby
[21:54:33] cd-rum: has joined #ruby
[21:56:17] Torrone: has joined #ruby
[21:57:40] crdpink: has joined #ruby
[22:00:41] AgentVenom: has joined #ruby
[22:01:17] nerium: has joined #ruby
[22:02:06] finisherr_: has joined #ruby
[22:02:13] last_staff: has joined #ruby
[22:05:17] oscardaichi: has left #ruby: ()
[22:06:34] Torrone: has joined #ruby
[22:10:22] bkxd: has joined #ruby
[22:10:56] matp: has joined #ruby
[22:11:48] EdwardIII: has joined #ruby
[22:11:52] cZk: has joined #ruby
[22:13:42] yfeldblum: has joined #ruby
[22:15:54] ramfjord: has joined #ruby
[22:18:10] nfk: has joined #ruby
[22:18:29] Torrone: has joined #ruby
[22:20:10] matcouto: has joined #ruby
[22:21:20] SilverKey: has joined #ruby
[22:21:40] maloik: has joined #ruby
[22:25:20] EdwardIII: has joined #ruby
[22:25:23] neanderslob: has joined #ruby
[22:26:23] spudowiar: has joined #ruby
[22:28:50] matcouto: has joined #ruby
[22:30:45] Es0teric: has joined #ruby
[22:30:56] GnuYawk: has joined #ruby
[22:31:11] mattwashere: has joined #ruby
[22:33:40] devbug: has joined #ruby
[22:34:54] dunpeal: has joined #ruby
[22:36:24] sucks: has joined #ruby
[22:37:26] Asher: has joined #ruby
[22:40:10] devbug: has joined #ruby
[22:41:50] xall_: has joined #ruby
[22:43:29] GnuYawk: has joined #ruby
[22:44:12] hutch34_: has joined #ruby
[22:46:13] neanderslob: has joined #ruby
[22:46:36] jenrzzz: has joined #ruby
[22:46:38] neanderslob_: has joined #ruby
[22:47:39] GnuYawk: has joined #ruby
[22:48:46] jaguarmagenta: has joined #ruby
[22:49:15] whathappens: has joined #ruby
[22:49:35] skweek: has joined #ruby
[22:50:35] noregret: how can i convert a string s = "\\u4142\\u4344" to the byte string "\u4142\4344" - any ideas?
[22:52:00] ramfjord: has joined #ruby
[22:53:46] GodFather: has joined #ruby
[22:56:26] k776: has joined #ruby
[22:56:54] twinklerock: has left #ruby: ()
[22:57:55] Moosashi: has joined #ruby
[22:58:34] moneylotion: has joined #ruby
[22:58:36] k776: Hello. How does one add new encoding convertors to ruby? I have a case where I received an email with charset ISO-2022-CN. I need to convert it to UTF-8, but I get the following error: "Encoding::ConverterNotFoundError code converter not found ISO-2022-CN to UTF-8". The output of "Encoding.list" contains a "ISO-2022-JP" but no "ISO-2022-CN". Anyone know how to add the chinese encoding so it converts properly?
[22:59:31] k776: Is it a system package that I need to install perhaps?
[23:00:15] dminuoso: k776: http://ruby-doc.org/core-2.2.0/Encoding/Converter.html#method-c-new
[23:02:10] k776: dminuoso: ? That;s what I'm already using. I'm not asking how to convert. I'm asking, when converting, ho does one add an encoding that ruby doesn't seem to provide by default
[23:02:30] c355E3B: has joined #ruby
[23:02:51] Nawn: has joined #ruby
[23:03:07] GodFather: has joined #ruby
[23:03:16] neanderslob: has joined #ruby
[23:03:19] gigetoo: has joined #ruby
[23:04:22] jenrzzz: has joined #ruby
[23:06:12] shevy: I am not sure many here know how to add a new encoding; you could try to ask Martin Duerst, he writes a lot of encoding stuff https://github.com/ruby/ruby/blob/trunk/ChangeLog#L16
[23:07:49] spudowiar1: has joined #ruby
[23:08:23] axl__: has joined #ruby
[23:08:41] ruby[bot]: -b *!*@80.107.85.106$#ruby-banned
[23:09:23] drbrain: k776: you probably have to write another one of these: https://github.com/ruby/ruby/blob/trunk/enc/trans/iso2022.trans
[23:09:40] drbrain: or expand another one of those
[23:10:18] dvinciguerra_: has joined #ruby
[23:11:10] bkxd: has joined #ruby
[23:12:57] roamingdog: has joined #ruby
[23:13:33] xpitr: noregret "\\u4142\\u4344".scan(/u(\d+)/).map{|i| [i.first.hex].pack("U")}.join
[23:13:34] ruby_de: has joined #ruby
[23:13:43] xpitr: its so bad lol
[23:18:24] qguv: has joined #ruby
[23:24:32] havenwood: eval "\"#{s}\""
[23:25:54] havenwood: >> require 'yaml'; s = "\\u4142\\u4344"; YAML.load "\"#{s}\""
[23:25:55] ruby[bot]: havenwood: # => "䅂䍄" (https://eval.in/611874)
[23:26:24] havenwood: noregret: ^
[23:26:25] LoneHerm_: has joined #ruby
[23:26:25] havenwood: another option
[23:27:32] Rodya_: has joined #ruby
[23:29:27] Torrone: has joined #ruby
[23:29:48] GnuYawk: >> a = 1; b = a; c = b; d = c; e = d; f = e; puts f * 69
[23:29:49] ruby[bot]: GNUYawk: # => 69 ...check link for more (https://eval.in/611875)
[23:30:22] leftpad: has joined #ruby
[23:30:42] GnuYawk: >> a = 1; b = a; c = b; d = c; e = d; f = e; puts “i like to #{f * 69} with your mom”
[23:30:43] ruby[bot]: GNUYawk: # => undefined local variable or method `to' for main:Object (NameError) ...check link for more (https://eval.in/611876)
[23:30:49] drbrain: !ban GNUYawk
[23:30:49] ruby[bot]: +bbb $a:b4rbz$#ruby-banned GNUYawk!*@*$#ruby-banned *!*@unaffiliated/b4rbz$#ruby-banned
[23:30:49] ruby[bot]: ruby[bot] kicked GNUYawk: offense, see http://ruby-community.com/pages/user_rules
[23:31:05] ruby[bot]: -bb $a:H31LH1TL3R$#ruby-banned H31LH1TL3R!*@*$#ruby-banned
[23:33:24] davedev24: has joined #ruby
[23:36:01] cyphase: has joined #ruby
[23:37:43] qguv: has joined #ruby
[23:37:47] davedev24: has joined #ruby
[23:38:35] RegulationD: has joined #ruby
[23:40:11] dunpeal: has joined #ruby
[23:40:35] jeremyhall: has joined #ruby
[23:41:28] wpaulson: has joined #ruby
[23:41:37] M4dH4TT3r: has joined #ruby
[23:43:19] Moosashi: has joined #ruby
[23:43:26] nettoweb: has joined #ruby
[23:44:29] maloik64: has joined #ruby
[23:44:33] ben9099: has joined #ruby
[23:46:12] koooge: has joined #ruby
[23:46:16] jackjackdripper1: has joined #ruby
[23:47:30] ben9099: can someone tell me why this works: in initialize is params.each { |k, v| public_send("#{k}=", v) } to assign passed in parameters to local? variables. then in another method it looks for a local variable set this way and finds it?!?!?! how is the local variable accessible between methods?
[23:47:37] jackjackdripper2: has joined #ruby
[23:47:39] neanderslob: has joined #ruby
[23:48:25] baweaver: are there any attr_* methods in the top?
[23:48:30] thoraxe: has joined #ruby
[23:48:51] baweaver: because those define (attr_writer defines attr=, attr_reader defines attr, attr_accessor does both)
[23:48:55] ben9099: i know the code works, but am new to ruby/RoR and don't see why
[23:49:08] baweaver: Ah, Rails. Model attributes.
[23:49:27] baweaver: they define those methods automatically, but that's a very bad idea.
[23:49:27] ben9099: But the class doesn't inherit from anything.
[23:49:37] baweaver: ActiveRecord::Base?
[23:49:57] ben9099: No, this is some separate class for doing reports. It inherits from nothing.
[23:50:14] ben9099: and is only instantiated to hold criteria for running the report.
[23:50:54] baweaver: ack, other work came up
[23:52:34] _djbkd: has joined #ruby
[23:54:40] drbrain: ben9099: what does self.class.ancestors say?
[23:54:58] drbrain: ben9099: also, public_send is a method call
[23:54:59] ben9099: umm.. let me check.
[23:55:40] ben9099: right, but are variables set with public_send "different" like some sort of weird local but somehow instance scope or something?
[23:56:04] wrkrcoop: has joined #ruby
[23:56:09] wrkrcoop: how do i stub a method in a module?
[23:56:32] drbrain: ben9099: public_send can't change variables
[23:56:48] drbrain: there's probably a method (or a method_missing) that sets instance variables
[23:56:53] drbrain: and a matching method to read them back out
[23:57:04] drbrain: in ruby local variables and method calls look very much the same
[23:57:33] ben9099: oh, i'm sorry, i think i see... the base class has no attr_accessor but the class which extends it DOES. so that's why it must work... still, seems sloppy the way they have it.
[23:57:55] drbrain: ben9099: you're welcome
[23:58:01] bad_ip: has joined #ruby
[23:58:14] drbrain: ben9099: also, method("whatever").source_location can be of help sometimes (but it is `nil` for methods defined in C)
[23:58:39] ben9099: ah, nice, thank you!
[23:59:04] devbug: has joined #ruby
[23:59:53] djbkd: has joined #ruby