« Back to channel list

#ruby - 16 July 2015

« Back 1 day Forward 1 day »
[00:00:33] Ox0dea: ~ $ cat foo.c && ./foo
[00:00:35] Ox0dea: int main(void) { printf("%f %f\n", 1/0.0, 0/0.0); }
[00:00:39] Ox0dea: Senjai: ^ For what that's worth.
[00:01:07] Ox0dea: I'm sure it's just a case of matz deciding not to fight his platform all those years ago.
[00:01:09] JCOE: has joined #ruby
[00:01:10] CodyStringham: has joined #ruby
[00:01:12] ramfjord: has joined #ruby
[00:01:23] Senjai: Ox0dea: Thanks. But you must understand my bleh
[00:01:33] Senjai: I'm sure that has to be a thing because reasons, but bleh
[00:01:42] joelataylor: has joined #ruby
[00:01:45] Senjai: I would want to use a specialized arithmatic library if I wanted that kind of behavior
[00:01:50] Senjai: I'm sure I'm wrong for.. reasons
[00:02:17] chipotles: has joined #ruby
[00:03:51] rickmasta: has joined #ruby
[00:05:42] CloCkWeRX: has joined #ruby
[00:06:37] PaulCapestany: has joined #ruby
[00:07:10] iloverubynoob: has left #ruby: ("Leaving...")
[00:07:12] iloverubynoob: has joined #ruby
[00:07:16] iloverubynoob: has left #ruby: ("Leaving...")
[00:07:18] iloverubynoob: has joined #ruby
[00:07:20] iloverubynoob: has left #ruby: ("Leaving...")
[00:07:28] 7GHAAP6P7: has joined #ruby
[00:07:28] 64MADC7ZF: has joined #ruby
[00:07:31] iloverubynoob: has joined #ruby
[00:08:47] charliesome: has joined #ruby
[00:11:18] pecopeco: has joined #ruby
[00:11:18] iloverubynoob: has joined #ruby
[00:13:15] astrobun_: has joined #ruby
[00:17:54] Thomas-0725: has joined #ruby
[00:19:32] PaulCape_: has joined #ruby
[00:20:26] Yzguy: has joined #ruby
[00:23:13] drewo: has joined #ruby
[00:23:54] sevenseacat: has joined #ruby
[00:24:34] JeramyRR: has joined #ruby
[00:24:43] finisherr: has joined #ruby
[00:25:35] Agoldfish: has joined #ruby
[00:26:04] PaulCapestany: has joined #ruby
[00:26:40] bronson: has joined #ruby
[00:27:28] jpfuentes2: has joined #ruby
[00:29:26] eggoez: has joined #ruby
[00:29:32] failshell: has joined #ruby
[00:29:41] joelataylor: has joined #ruby
[00:29:55] gccostabr: has joined #ruby
[00:31:07] sevvie: has joined #ruby
[00:32:29] seal: has joined #ruby
[00:33:02] bungoman: has joined #ruby
[00:34:44] dgutierrez1287: has joined #ruby
[00:34:46] bungoman: has joined #ruby
[00:35:42] eshy: has joined #ruby
[00:35:54] xcesariox: has joined #ruby
[00:36:45] eggoez: has joined #ruby
[00:37:29] ujjain: has joined #ruby
[00:37:29] ujjain: has joined #ruby
[00:37:37] Oog: has joined #ruby
[00:38:08] xkef: has joined #ruby
[00:41:13] jaycee: has joined #ruby
[00:43:48] Scripore: has joined #ruby
[00:44:30] godzillaenlacasa: has joined #ruby
[00:46:35] symm-: has joined #ruby
[00:46:46] serivichi: has joined #ruby
[00:48:14] v0n: has joined #ruby
[00:52:38] Zamyatin: has joined #ruby
[00:53:07] sickmate: has joined #ruby
[00:53:47] dgutierrez1287: has joined #ruby
[00:55:25] nfk: has joined #ruby
[00:56:04] Oka: has joined #ruby
[00:56:54] bigkevmcd: has joined #ruby
[00:58:50] bronson: has joined #ruby
[01:00:21] Igorshp: has joined #ruby
[01:00:27] failshell: has joined #ruby
[01:00:37] htmldrum: has joined #ruby
[01:00:45] martianixor: has joined #ruby
[01:00:47] pepperbreath1: has joined #ruby
[01:01:17] Contigi: has joined #ruby
[01:01:22] martianixor: has joined #ruby
[01:01:28] bungoman_: has joined #ruby
[01:02:20] nfk: has joined #ruby
[01:03:12] nobitanobi: has joined #ruby
[01:05:02] hahuang65: has joined #ruby
[01:05:24] _blizzy_: has joined #ruby
[01:05:26] astrobun_: has joined #ruby
[01:05:40] nettoweb: has joined #ruby
[01:08:11] nettoweb: has joined #ruby
[01:08:56] foertter: has joined #ruby
[01:09:37] msnyon: has joined #ruby
[01:09:58] nettoweb_: has joined #ruby
[01:11:39] doctorly: has joined #ruby
[01:11:57] nettoweb_: has joined #ruby
[01:12:05] Oog: has joined #ruby
[01:13:01] hahuang61: has joined #ruby
[01:14:32] dfockler: has joined #ruby
[01:16:14] fgo: has joined #ruby
[01:16:19] htmldrum: has joined #ruby
[01:17:32] foertter: has joined #ruby
[01:17:36] JeramyRR: has joined #ruby
[01:18:30] hahuang62: has joined #ruby
[01:19:40] Frem: has joined #ruby
[01:20:37] montyboy_: has joined #ruby
[01:21:25] Frem: has joined #ruby
[01:21:44] keen__________21: has joined #ruby
[01:22:10] pkrnj: has joined #ruby
[01:23:36] postmodern: has joined #ruby
[01:23:38] joneshf-laptop: has joined #ruby
[01:24:19] i8igmac: has joined #ruby
[01:24:22] sp33drac3r: has joined #ruby
[01:27:03] idiocrash: has joined #ruby
[01:27:11] graydot: has joined #ruby
[01:27:33] zacstewart: has joined #ruby
[01:27:44] Musashi007: has joined #ruby
[01:28:34] dgutierrez1287: has joined #ruby
[01:29:04] ramfjord: has joined #ruby
[01:30:31] astrobun_: has joined #ruby
[01:30:47] sarkyniin: has joined #ruby
[01:32:48] tkuchiki: has joined #ruby
[01:34:09] dieogviola: has joined #ruby
[01:34:44] Rennex_: has joined #ruby
[01:35:26] howdoicomputer: has joined #ruby
[01:35:44] braincra-: has joined #ruby
[01:36:14] zr2d2: has joined #ruby
[01:36:25] CodyStringham: has joined #ruby
[01:37:25] dieogviola: has joined #ruby
[01:38:23] f4cl3y: has joined #ruby
[01:38:23] f4cl3y: has joined #ruby
[01:39:06] Lucky_: has joined #ruby
[01:39:25] tmtwd: has joined #ruby
[01:42:08] arescorpio: has joined #ruby
[01:43:19] finisherr: has joined #ruby
[01:43:30] tmtwd: has joined #ruby
[01:43:47] swgillespie: has joined #ruby
[01:43:52] bruno-: has joined #ruby
[01:45:11] htmldrum: has joined #ruby
[01:45:45] pygospa: has joined #ruby
[01:48:51] camilasan: has joined #ruby
[01:52:35] speaking1ode: has joined #ruby
[01:53:58] WillAmes: has joined #ruby
[01:55:34] JoshuaPaling: has joined #ruby
[01:56:14] htmldrum: has joined #ruby
[01:56:51] duderonomy: has joined #ruby
[01:59:13] veduardo: has joined #ruby
[02:00:07] meph: has joined #ruby
[02:01:14] failshell: has joined #ruby
[02:03:10] howdoicomputer: has joined #ruby
[02:03:21] diego1: has joined #ruby
[02:03:33] towski_: has joined #ruby
[02:04:25] dopie: has joined #ruby
[02:05:21] PaulCapestany: has joined #ruby
[02:06:56] dopieee: has joined #ruby
[02:07:13] failshell: has joined #ruby
[02:08:44] zr2d2: I'm trying to use sequel to connect to a remote mssql host, but http://sequel.jeremyevans.net/rdoc/files/doc/opening_databases_rdoc.html#label-odbc+ suggests that it can't be done.
[02:09:32] sevenseacat: just not via odbc.
[02:11:56] foertter: has joined #ruby
[02:12:26] htmldrum: has joined #ruby
[02:14:01] mikeric: has joined #ruby
[02:15:57] Fezzler: has joined #ruby
[02:15:57] iateadonut: has joined #ruby
[02:16:04] TheNet: has joined #ruby
[02:16:23] bigkevmcd: has joined #ruby
[02:18:16] sphex: hey.. is it safe to depend on `if` expressions returning nil when no branches are taken?
[02:18:19] c_nick: has joined #ruby
[02:19:37] bungoman: has joined #ruby
[02:20:36] existensil: safe in the sense its reliable/predictible behavior. might not be the clearest code to read.
[02:23:29] Scripore: has joined #ruby
[02:23:32] sphex: existensil: alright
[02:24:06] howdoicomputer: has joined #ruby
[02:24:58] c_nick: I have a testing framework where my Web Module (Sinatra web app) displays information to the user. Ideally it picks all the data from database and displays but the information i am picking up comprises of multiple joins basically too much Database processing will it be a better approach that when the results are written to the Db, i write a text file and then for Web UI uses this test file to display Pros: web component has zero processing and info is trivial
[02:24:59] c_nick: - Grouping of tests Cons: Not sure if the approach is legitimate
[02:27:34] fgo: has joined #ruby
[02:28:54] konsolebox: has joined #ruby
[02:29:45] zacstewart: has joined #ruby
[02:30:44] _blizzy_: has joined #ruby
[02:30:57] Igorshp: has joined #ruby
[02:32:07] Lucky_: has joined #ruby
[02:36:30] MatrixBridge: has joined #ruby
[02:37:51] howdoicomputer: has joined #ruby
[02:38:29] _blizzy_: has joined #ruby
[02:42:32] jesterfraud: has joined #ruby
[02:42:59] jenrzzz: has joined #ruby
[02:45:10] luriv_: has joined #ruby
[02:46:16] htmldrum: has joined #ruby
[02:47:52] perrier: has joined #ruby
[02:48:17] vdamewood: has joined #ruby
[02:51:16] CloCkWeRX: has joined #ruby
[02:51:49] radialneon: has joined #ruby
[02:55:06] baweaver: has joined #ruby
[02:58:20] perturbation: has joined #ruby
[02:59:19] kfpratt: has joined #ruby
[03:00:31] gaucheph: has joined #ruby
[03:00:35] howdoicomputer: has joined #ruby
[03:02:13] Trynemjoel: has joined #ruby
[03:02:39] bronson: has joined #ruby
[03:03:04] TheNet: has joined #ruby
[03:03:56] Thr34t: has joined #ruby
[03:04:05] dfockler: has joined #ruby
[03:04:37] Thr34t: Anyone here
[03:05:29] Aeyrix: People are here.
[03:06:24] Thr34t: Can Ppl state their Ruby Programing Ranks ? From Freshman - Senior
[03:07:35] perrier: has joined #ruby
[03:08:13] Thr34t: Or Does any one have an idea of a program to creat to understand the heart or use of the truby language
[03:08:49] howdoicomputer: has joined #ruby
[03:09:05] Thr34t: Does any one have an idea of a program to creat to understand the heart or use of the truby language
[03:09:09] Aeyrix: You what?
[03:09:17] sevenseacat: what on earth do those 'ranks' mean
[03:09:19] Aeyrix: I'm not sure what you're asking tbh.
[03:09:24] Aeyrix: sevenseacat: You didn't get a rank?
[03:09:32] sevenseacat: I failed the exam.
[03:09:53] sevenseacat: then again, the only question I answered, I wrote 'lol roobee'
[03:10:11] braincrash: has joined #ruby
[03:10:11] Thr34t: have an idea of a program to creat to understand the heart or use of the truby language
[03:10:20] Aeyrix: Getting strange looks for laughing at IRC.
[03:10:20] Thr34t: Whats an lol roobe
[03:10:38] sevenseacat: Thr34t: if you dont know what you want to build, why are you here?
[03:10:48] chinmay_dd: has joined #ruby
[03:11:18] sevenseacat: for what end?
[03:11:20] Aeyrix: Do you have any particular questions we can help with?
[03:11:22] Thr34t: & I wanna crete something small to start with
[03:11:51] Thr34t: What are some rookie programs , to toy with
[03:12:02] helpa: Learn Ruby by reading this book - http://manning.com/black3 - The Well-Grounded Rubyist by David A. Black
[03:12:08] sevenseacat: oh duh, this isnt #rubyonrails
[03:12:08] Aeyrix: Wrong chan. ;)
[03:12:25] Aeyrix: wtf is that command supposed to do?
[03:12:35] sevenseacat: Learn Ruby by reading this book - http://manning.com/black3 - The Well-Grounded Rubyist by David A. Black
[03:12:35] Aeyrix: Learn Ruby by reading this book - http://manning.com/black3 - The Well-Grounded Rubyist by David A. Black
[03:12:40] Thr34t: Whats this CHL aabout
[03:12:55] Thr34t: Arent You Guys Ruby Programers
[03:12:58] pontiki: chill, mang
[03:12:59] Aeyrix: This is... people who know or want to know Ruby.
[03:13:48] Thr34t: What have you guys built ?
[03:14:00] perturbation: I use Ruby for wrangling Mongo and writing reports in my day-to-day
[03:14:09] perturbation: I like Rails but I haven't really used it for work
[03:14:20] Aeyrix: I built a system that monitors more things than the NSA. :^)
[03:14:28] sevenseacat: a lot of web apps.
[03:14:54] Thr34t: Anyone here a tinker
[03:15:04] sphex: I was dishonourably discharged and stripped of my ruby rank :(
[03:15:22] Aeyrix: sphex: Ouch.
[03:15:27] sevenseacat: sphex: we told you not to put it there.
[03:15:59] Coraline: Conway's Game of Life is a good learning exercise.
[03:16:43] sevenseacat: I had to look up what that was, when I read the four elements of simple design.
[03:17:27] Maletor: has joined #ruby
[03:18:35] desigx: has joined #ruby
[03:19:26] Coraline: I learned about it at a code retreat some years back.
[03:19:31] darkf: has joined #ruby
[03:20:01] sevenseacat: seems like a cool idea, but I've never actually built an implementation of it
[03:20:24] Coraline: For a while I was working on a combination game of life / prisoners dilemma
[03:20:33] sevenseacat: I think I'd get bogged down too much in the pretty output
[03:20:53] Coraline: Yeah, that's easy to do.
[03:21:03] c_nick: I am grouping my test results so for n groups n join queries to db to retrieve test statics is better or while saving results to db we write a file which can be references for displaying the stats by the web module?
[03:21:13] Ox0dea: has joined #ruby
[03:21:33] c_nick: these stats comprise of Groups - Tests - Pass - Fail
[03:21:42] Ox0dea: sevenseacat: In that case, you're going to hate me for showing you this: https://en.wikipedia.org/wiki/Langton's_ant
[03:22:05] Ox0dea: I had so much fun mucking about with different turn sequences and colors when I first discovered Langton's ant.
[03:22:11] Ox0dea: Ohai, Aeyrix!
[03:22:28] dellavg: has joined #ruby
[03:22:58] serivichi: has joined #ruby
[03:23:09] Ox0dea: If memory serves, I did it in Racket to learn its object system.
[03:23:37] jcdesimp: has joined #ruby
[03:24:05] sevenseacat: now I want to play with these kind of things
[03:24:18] sevenseacat: good thing tomorrow is my professional development day at work eh
[03:24:51] jcdesimp: has joined #ruby
[03:25:05] freerobby: has joined #ruby
[03:25:47] howdoicomputer: has joined #ruby
[03:27:48] zacstewart: has joined #ruby
[03:28:55] c_nick: no ones helping me :(
[03:28:59] Ox0dea: sevenseacat: You'd have to do some serious finagling, but I suspect the Turing-completeness of both Conway's Game of Life and Langton's ant could be made to work in your favor.
[03:29:06] c_nick: ACTION makes cute kitten faces
[03:30:04] yfeldblum: has joined #ruby
[03:30:09] c_nick: ok suppose i have {test => [groups] } can i convert that to {group => [tests]}
[03:30:46] Ox0dea: >> {a: 1, b: 2}.invert
[03:30:47] ruboto: Ox0dea # => {1=>:a, 2=>:b} (https://eval.in/399541)
[03:31:01] Coraline: c_nick: use a database. Performance is good and you will have an historic reference as well.
[03:31:45] fgo: has joined #ruby
[03:31:58] c_nick: Coraline, I maintain the group information in a Configuration File, and that information is mostly static (changes once in a bluemoon) thats the reason why i felt i should use the file
[03:33:18] eggoez: has joined #ruby
[03:34:05] c_nick: using Active Records i dont really need to maintain the join table (foreign key,foreign key / many to many relation) its just that while i display the stats it will be a query for each row .. vs read a file and get the data .. Saying this file processing will be involved too (viz. Group test pass fail ) and process the whole shit and stuff
[03:34:35] c_nick: i'll explore the db way today if no luck then try the file way .. thanks Coraline
[03:34:59] desigx: has joined #ruby
[03:35:35] c_nick: {test1 => [group1,group2] , test2 => [group1]}.invert
[03:35:37] c_nick: > {test1 => [group1,group2] , test2 => [group1]}.invert
[03:35:41] c_nick: >> {test1 => [group1,group2] , test2 => [group1]}.invert
[03:35:43] ruboto: c_nick # => undefined local variable or method `test1' for main:Object (NameError) ...check link for more (https://eval.in/399544)
[03:36:07] ledestin: has joined #ruby
[03:36:16] c_nick: >> {'test1' => ['group1','group2'] ,'test2' => ['group1']}.invert
[03:36:17] ruboto: c_nick # => {["group1", "group2"]=>"test1", ["group1"]=>"test2"} (https://eval.in/399545)
[03:37:00] zipkid: has joined #ruby
[03:38:59] bigkevmcd: has joined #ruby
[03:44:08] zacstewart: has joined #ruby
[03:44:52] mikeric: has joined #ruby
[03:45:44] devbug: has joined #ruby
[03:46:10] bungoman: has joined #ruby
[03:46:56] avitzurel: has joined #ruby
[03:48:16] adambeynon: has joined #ruby
[03:50:00] CpuID: has joined #ruby
[03:50:47] bttf: has joined #ruby
[03:50:52] akahn: has joined #ruby
[03:51:09] mroth: has joined #ruby
[03:51:15] alekst_: has joined #ruby
[03:51:34] jaygen: has joined #ruby
[03:53:55] ramfjord: has joined #ruby
[03:54:18] vcoinminer: has joined #ruby
[03:54:28] nateberkope: has joined #ruby
[03:54:33] firevolt: has joined #ruby
[03:54:58] deimos: has joined #ruby
[03:55:10] MiracleBlue: has joined #ruby
[03:55:10] machty: has joined #ruby
[03:55:21] cstrahan: has joined #ruby
[03:55:24] pusewicz: has joined #ruby
[03:55:32] maZtah: has joined #ruby
[03:55:44] harleypig: has joined #ruby
[03:55:49] thiagovsk: has joined #ruby
[03:55:51] hellschreiber: has joined #ruby
[03:55:53] baweaver: has joined #ruby
[03:56:04] charles81: has joined #ruby
[03:57:21] halfdan: has joined #ruby
[03:57:47] djbender: has joined #ruby
[03:57:52] zemmihates: has joined #ruby
[03:57:57] icarus: has joined #ruby
[03:58:09] Frem: has joined #ruby
[03:58:21] bb010g: has joined #ruby
[03:58:23] gix: has joined #ruby
[04:00:01] knowtheory: has joined #ruby
[04:00:31] thesheff17: has joined #ruby
[04:00:44] im0b: has joined #ruby
[04:00:56] frankS2: has joined #ruby
[04:01:25] tubuliferous_: has joined #ruby
[04:01:42] troter___: has joined #ruby
[04:01:42] yo61: has joined #ruby
[04:01:43] alxndr: has joined #ruby
[04:02:06] drewdavis: has joined #ruby
[04:02:24] saintcajetan: has joined #ruby
[04:02:30] zenguy_pc: has joined #ruby
[04:02:43] benlakey: has joined #ruby
[04:02:43] hashrocket: has joined #ruby
[04:02:44] Juanchito: has joined #ruby
[04:02:44] iamdevnul: has joined #ruby
[04:06:04] mrsolow: has joined #ruby
[04:06:06] rflot: has joined #ruby
[04:07:59] jpinnix______: has joined #ruby
[04:10:56] failshell: has joined #ruby
[04:11:49] Musashi007: has joined #ruby
[04:13:31] htmldrum: has joined #ruby
[04:14:54] atomi: has joined #ruby
[04:15:01] dgutierrez1287: has joined #ruby
[04:15:25] PhilK: has joined #ruby
[04:16:12] ramblinpeck: has joined #ruby
[04:16:48] jesterfraud: has joined #ruby
[04:17:03] amitchellbullard: has joined #ruby
[04:18:50] TheNet: has joined #ruby
[04:19:06] petems: has joined #ruby
[04:20:05] bestie: has joined #ruby
[04:20:07] whoojemaflip: has joined #ruby
[04:20:35] krainboltgreene: has joined #ruby
[04:21:21] jevs: has joined #ruby
[04:21:33] ljen: has joined #ruby
[04:22:03] spastorino: has joined #ruby
[04:22:20] ckrailo: has joined #ruby
[04:23:07] coderkevin: has joined #ruby
[04:23:08] lancetw: has joined #ruby
[04:23:21] zrl: has joined #ruby
[04:23:59] haraoka: has joined #ruby
[04:24:23] Kharma: has joined #ruby
[04:24:23] mrsolo: has joined #ruby
[04:24:42] pmarreck: has joined #ruby
[04:24:49] Guest85414______: has joined #ruby
[04:24:57] Oog: has joined #ruby
[04:25:05] felixjet: has joined #ruby
[04:27:52] cbednarski: has joined #ruby
[04:28:01] holsee_: has joined #ruby
[04:28:39] havenwood: has joined #ruby
[04:29:01] shelling__: has joined #ruby
[04:29:01] hoey_: has joined #ruby
[04:29:21] carlosoliveira: has joined #ruby
[04:29:29] Fezzler: has joined #ruby
[04:29:30] jmcc: has joined #ruby
[04:29:37] ivanskie: has joined #ruby
[04:29:40] zacstewart: has joined #ruby
[04:30:03] jlyndon: has joined #ruby
[04:30:12] jxf: has joined #ruby
[04:30:22] desigx: has joined #ruby
[04:30:54] Maletor: has joined #ruby
[04:31:04] swgillespie: has joined #ruby
[04:31:56] alvaro_o: has joined #ruby
[04:32:26] howdoicomputer: has joined #ruby
[04:32:43] iateadonut: has joined #ruby
[04:33:13] glowcoil: has joined #ruby
[04:33:36] exadeci: has joined #ruby
[04:33:42] cbetta: has joined #ruby
[04:33:44] cbetta: has joined #ruby
[04:33:44] cbetta: has joined #ruby
[04:34:33] Heero: has joined #ruby
[04:34:54] zero7: has joined #ruby
[04:35:19] sp1rs: has joined #ruby
[04:35:30] simplyianm: has joined #ruby
[04:35:44] neersighted: has joined #ruby
[04:36:12] frode15243: has joined #ruby
[04:37:15] astrobun_: has joined #ruby
[04:37:27] Alina-malina: has joined #ruby
[04:38:17] elliottcable: has joined #ruby
[04:38:23] SegFaultAX: has joined #ruby
[04:40:32] ggherdov: has joined #ruby
[04:40:42] Guest10289: has joined #ruby
[04:42:59] G: has joined #ruby
[04:43:02] mrsolow: has joined #ruby
[04:43:33] haneen: has joined #ruby
[04:44:56] ramfjord: has joined #ruby
[04:45:06] bruno-: has joined #ruby
[04:46:10] jesterfraud: has joined #ruby
[04:47:13] 7GHAAP6P7: should a state machine care how it got to particular state?
[04:47:27] johnhamelink: has joined #ruby
[04:47:46] ChasedSpade: has joined #ruby
[04:47:58] Klumben: has joined #ruby
[04:48:10] cpruitt: has joined #ruby
[04:48:22] xcesariox: has joined #ruby
[04:48:51] krz: has joined #ruby
[04:48:59] sphex: quazimodo: no, that would be extra state. the point is to make all state explicit.
[04:49:36] MichaelGG: has joined #ruby
[04:49:42] mikepack: has joined #ruby
[04:50:55] Lloyd: has joined #ruby
[04:52:21] icarus: has joined #ruby
[04:52:26] lancetw: has joined #ruby
[04:52:27] Guest10289: has joined #ruby
[04:55:51] quazimodo: sphex: so how does that apply to doing actions from state to state transitions
[04:56:06] serivichi: has joined #ruby
[04:56:46] Scroff: has joined #ruby
[04:57:22] icarus: has joined #ruby
[05:00:10] gaucheph__: has joined #ruby
[05:00:54] lala: has joined #ruby
[05:01:09] howdoicomputer: has joined #ruby
[05:01:17] Oog: has joined #ruby
[05:01:56] bigkevmcd: has joined #ruby
[05:02:40] MichaelGG: has joined #ruby
[05:03:15] sphex: quazimodo: the actions would occur only when the machine switches from one state to another, which should be decided solely based on the current state and the input. once the machine is in a certain state, the previous states and actions should not matter.
[05:03:54] MichaelGG: has left #ruby: ()
[05:04:08] wildroman2: has joined #ruby
[05:04:47] sphex: quazimodo: so it can matter which state it goes to when in a certain state.. but after the transition, which state it came from must not matter
[05:07:55] haneen: has joined #ruby
[05:08:58] pepperbreath1: has left #ruby: ()
[05:11:43] failshell: has joined #ruby
[05:13:38] fantazo: has joined #ruby
[05:14:40] mercwithamouth: has joined #ruby
[05:16:07] riotjones: has joined #ruby
[05:16:55] aphprentice: has joined #ruby
[05:17:18] TheNet: has joined #ruby
[05:20:38] leat1: has joined #ruby
[05:21:24] mleung: has joined #ruby
[05:21:38] Ox0dea: >> def sum(s) s.bytes.reduce(:+) - 96 * s.size end; [sum('second'), sum('minute') - 60 + sum('hour') - 60] # whoadude
[05:21:39] ruboto: Ox0dea # => [60, 24] (https://eval.in/399612)
[05:22:01] eGGsha: has joined #ruby
[05:22:04] lessless: has joined #ruby
[05:24:51] voycey: has joined #ruby
[05:24:53] bluOxigen: has joined #ruby
[05:25:28] xcesariox: has joined #ruby
[05:26:14] voycey: Hi guys, I am reasonably new to Ruby and am trying to setup a really simply application to help me solve a problem on a PHP app, I need to set up a really simple basic script using Resque that runs a single comamnd
[05:26:36] voycey: is there any way i can do this without having to install a full framework like Rails / Sinatra as well? That's all I seem to be able to find online
[05:30:30] havenwood: voycey: Rails and Sinatra are both Rack adapters. You could use a bare Rack app. Say more about what you're doing?
[05:31:15] voycey: I screwed up something on php-resque and one of my queues has a few hundred failed jobs on it - there is nothing on the PHP port that allows a simple requeue of these jobs
[05:31:24] voycey: just basically need to tell that queue to retry all the failed ones :(
[05:31:37] revath: has joined #ruby
[05:32:01] revath: has left #ruby: ()
[05:33:52] havenwood: voycey: Can you just do that from your REPL? Do you need an API for it? How does Rails/Sinatra come into play?
[05:34:33] voycey: Im hoping it doesnt have to
[05:35:05] voycey: not overly experience with Redis - wasnt my choice to use it for deferred processing - if I can do it some other way that would be excellent haha
[05:35:55] Iskarlar: has joined #ruby
[05:36:09] gaucheph: has joined #ruby
[05:36:27] voycey: essentially I just want to tell redis to re-process all the failed ones - figured as they were queued through resque (or PHP's version of it) i would need to go throguh that?
[05:37:08] havenwood: voycey: In a Ruby REPL I mean. There are even gems to make it easier like: https://github.com/ono/resque-cleaner#readme
[05:37:17] havenwood: voycey: Like IRB or Pry.
[05:37:45] voycey: I have a ruby environment setup that works from prev projects and have a really basic script that just doesnt do anything
[05:38:01] voycey: that link looks good though - ill give that a bash :) thanks!
[05:38:40] havenwood: voycey: I'm surprised there's no lib in PHP for processing php-resque failed jobs. Have you searched?
[05:39:17] havenwood: voycey: Good luck! Yeah, I'd try something like that in Ruby. You can do it with just the resque gem as well but the above is made for the purpose.
[05:39:33] voycey: I have - one of my problems is that its wrapped in another plugin for a framework as well so its all a bit of hard work
[05:39:42] voycey: ill give this a go :)
[05:39:53] zacstewart: has joined #ruby
[05:41:16] leat1: has joined #ruby
[05:44:16] tagrudev: has joined #ruby
[05:47:15] ryba: has joined #ruby
[05:47:32] psyprus: has joined #ruby
[05:49:30] tubuliferous_: has joined #ruby
[05:49:50] jenrzzz: has joined #ruby
[05:50:56] simplyianm: has joined #ruby
[05:51:28] atmosx: voycey: the best way to solve a problem on a php app is to uninstall php :-P
[05:51:54] lkba: has joined #ruby
[05:51:59] Rubie: has joined #ruby
[05:53:32] slucx: has joined #ruby
[05:54:17] baweaver: has joined #ruby
[05:54:46] fallen_: has joined #ruby
[05:56:45] tkuchiki: has joined #ruby
[05:57:44] felixr: has joined #ruby
[05:58:58] El3ktra: has joined #ruby
[05:58:58] El3ktra: has joined #ruby
[05:59:31] rht: has joined #ruby
[06:01:18] Scripore: has joined #ruby
[06:01:21] Fezzler: has joined #ruby
[06:01:41] uxp: has joined #ruby
[06:08:10] eGGsha: has joined #ruby
[06:08:52] sphex_: has joined #ruby
[06:09:08] avitzurel: has joined #ruby
[06:10:08] dhjondoh: has joined #ruby
[06:10:47] swgillespie: has joined #ruby
[06:11:53] bigkevmcd: has joined #ruby
[06:15:26] GitGud: has joined #ruby
[06:15:53] Ilyas: has joined #ruby
[06:16:04] Shoutsid: has joined #ruby
[06:16:28] rockworldmi: has joined #ruby
[06:16:58] riotjones: has joined #ruby
[06:17:30] rockworldmi: I am having problem with larch to connect to gmail ... anyone knows workaround to allow to conect to gmail?
[06:20:39] pecopeco: has joined #ruby
[06:20:40] iloverubynoob: has joined #ruby
[06:24:04] mikeric: has joined #ruby
[06:24:39] wildroman2: has joined #ruby
[06:25:17] wildroman2: has joined #ruby
[06:26:20] andikr: has joined #ruby
[06:27:12] lxsameer: has joined #ruby
[06:27:15] mike___1234: has joined #ruby
[06:27:35] zacstewart: has joined #ruby
[06:28:39] CloCkWeRX: has joined #ruby
[06:28:55] bigkevmcd: has joined #ruby
[06:29:37] sickmate: has joined #ruby
[06:33:38] ohaibbq: has joined #ruby
[06:35:29] zemmihates: has joined #ruby
[06:38:21] sp1rs: has joined #ruby
[06:39:01] arturaz: has joined #ruby
[06:51:54] leat1: has joined #ruby
[06:53:21] Rubie: has joined #ruby
[06:54:47] krz: has joined #ruby
[06:54:58] martinium: has joined #ruby
[06:55:55] alphaatom: has joined #ruby
[06:56:06] Sp4rKy: Hi, I'm trying to include a ruby file from another one
[06:56:06] yfeldblum: has joined #ruby
[06:56:14] Sp4rKy: and access variables that are defined in the included file
[06:57:17] jenrzzz: has joined #ruby
[06:57:50] voycey: has left #ruby: ()
[07:00:04] fabrice31: has joined #ruby
[07:00:20] Timba-as__: has joined #ruby
[07:00:42] Antiarc: local variables are never made visible across files
[07:00:45] xkickflip: has joined #ruby
[07:00:49] aganov: has joined #ruby
[07:01:04] Aeyrix: And global variables are gross.
[07:01:22] Antiarc: You should expose a module or class which contains the variables you wish to share
[07:01:39] Sp4rKy: Antiarc: mhh ok, let's do it that way
[07:02:40] tuor: hi, code: https://gist.github.com/anonymous/628a084ec294f9ecd52b
[07:03:00] arquebus: has joined #ruby
[07:03:02] casadei_: has joined #ruby
[07:03:17] pecopeco: has joined #ruby
[07:03:17] iloverubynoob: has joined #ruby
[07:03:39] tuor: I want to write templates to files. The error I get is: ArgumentError: The given fd is not accessible because RubyVM reserves it
[07:03:41] tuor: from (pry):175:in `initialize'
[07:04:47] araujo: has joined #ruby
[07:05:09] howdoi: has joined #ruby
[07:05:21] niemcu: has joined #ruby
[07:05:30] jackjackdripper: has joined #ruby
[07:06:27] joonty: has joined #ruby
[07:06:43] tuor: I don't understand why file descriptors are relevant ?
[07:07:04] Antiarc: tuor: templates_list[name] is an integer, Ruby is interpreting that as a fd handle rather than a filename
[07:07:07] yardenbar: has joined #ruby
[07:07:20] tuor: Antiarc, ah ok. thx.
[07:07:28] Antiarc: (I presume, anyhow. It works on my system. What version of Ruby?)
[07:09:42] blackmesa: has joined #ruby
[07:09:43] Antiarc: If you genuinely want to use numbers for your filenames, then just set them as strings or call #to_s on them when you pass them to File.open
[07:09:59] fabrice31: has joined #ruby
[07:10:36] acke: has joined #ruby
[07:10:37] schaerli: has joined #ruby
[07:11:41] shawnacscott: has joined #ruby
[07:12:39] pwnz0r: has joined #ruby
[07:12:51] failshell: has joined #ruby
[07:13:30] felixr: has joined #ruby
[07:13:37] adeponte: has joined #ruby
[07:14:09] helpa: has joined #ruby
[07:15:08] sarlalian: has joined #ruby
[07:15:09] tuor: Antiarc, ah the problem is, when I take longerstrings. (took a simpler version of my code for pasting)
[07:15:10] dgutierrez1287: has joined #ruby
[07:15:23] tuor: It works with shorter strings to.
[07:16:09] tuor: But i replaced with "#{...}" so im shure it will do what it has to
[07:17:10] brainslug: has joined #ruby
[07:17:24] justinmcp: has joined #ruby
[07:17:25] haxrbyte: has joined #ruby
[07:17:29] jesterfraud: has joined #ruby
[07:18:18] zacstewart: has joined #ruby
[07:18:23] towski_: has joined #ruby
[07:19:00] polyrob: has joined #ruby
[07:19:19] Riking: has joined #ruby
[07:19:23] blackmesa: has joined #ruby
[07:19:37] DoubleMalt: has joined #ruby
[07:19:55] dualbus: has joined #ruby
[07:20:47] chinmay_dd: has joined #ruby
[07:21:32] raenk: has joined #ruby
[07:21:58] darkf: has joined #ruby
[07:22:03] Oog: has joined #ruby
[07:22:54] bluOxigen: has joined #ruby
[07:23:12] Nilium: has joined #ruby
[07:24:20] TomyWork: has joined #ruby
[07:24:26] exceion: has joined #ruby
[07:24:43] adeponte: has joined #ruby
[07:24:56] skyjumper: has joined #ruby
[07:25:09] Iskarlar: has joined #ruby
[07:25:31] arturmartins: has joined #ruby
[07:25:42] keen__________21: has joined #ruby
[07:26:15] eGGsha: has joined #ruby
[07:27:49] Voxxit: has joined #ruby
[07:28:00] roolo: has joined #ruby
[07:28:11] mikeric: has joined #ruby
[07:28:21] pragmatism: has joined #ruby
[07:29:25] araujo: has joined #ruby
[07:29:49] segv: has joined #ruby
[07:30:35] rdark: has joined #ruby
[07:30:58] Evans: has joined #ruby
[07:31:44] _djbkd: has joined #ruby
[07:32:16] foooobear: has joined #ruby
[07:34:09] TinkerTyper: has joined #ruby
[07:37:42] tubuliferous_: has joined #ruby
[07:38:45] htmldrum: has joined #ruby
[07:41:01] yfeldblum: has joined #ruby
[07:41:28] Scroff: has joined #ruby
[07:42:28] sp1rs: has joined #ruby
[07:42:34] eGGsha: has joined #ruby
[07:43:10] senayar: has joined #ruby
[07:43:42] blackmesa: has joined #ruby
[07:44:03] jidar: has joined #ruby
[07:44:25] slucx: has left #ruby: ("ERC (IRC client for Emacs 24.5.1)")
[07:46:12] dhjondoh: has joined #ruby
[07:46:17] Violentr: has joined #ruby
[07:46:57] saadq: has joined #ruby
[07:47:00] rht: has joined #ruby
[07:47:22] bruno-: has joined #ruby
[07:47:31] Sp4rKy: so, with cls.instance_variables, I can get the list of instance variables name, but how can I then access them using this list?
[07:48:36] xkef: has joined #ruby
[07:49:02] Sp4rKy: ok, instance_variable_get is the answer, missed it :)
[07:49:20] havenwood: Sp4rKy: aye: nstance_variables.map { |var| instance_variable_get var }
[07:51:15] TheHodge: has joined #ruby
[07:51:16] charliesome: has joined #ruby
[07:53:11] Iskarlar: has joined #ruby
[07:53:20] Polysics: has joined #ruby
[07:53:43] Hounddog: has joined #ruby
[07:54:10] chipotles: has joined #ruby
[07:57:49] revath: has joined #ruby
[07:58:43] allomov: has joined #ruby
[07:59:26] white_bear: has joined #ruby
[07:59:36] ndrei: has joined #ruby
[08:00:35] genpaku: has joined #ruby
[08:01:32] Igorshp: has joined #ruby
[08:01:36] mikecmpbll: has joined #ruby
[08:03:10] Iskarlar: has joined #ruby
[08:04:59] Zai00: has joined #ruby
[08:05:25] krz: has joined #ruby
[08:06:19] iloverubynoob: has joined #ruby
[08:06:19] pecopeco: has joined #ruby
[08:06:57] OrbitalKitten: has joined #ruby
[08:08:35] fabrice31_: has joined #ruby
[08:09:14] eshy: has joined #ruby
[08:12:15] leat1: has joined #ruby
[08:13:02] fabrice31: has joined #ruby
[08:14:05] einarj: has joined #ruby
[08:14:39] dhjondoh: has joined #ruby
[08:16:09] tvw: has joined #ruby
[08:17:47] mikecmpb_: has joined #ruby
[08:18:19] zacstewart: has joined #ruby
[08:18:52] edwinvdgraaf: has joined #ruby
[08:20:44] mikecmpbll: has joined #ruby
[08:22:19] shevy: code code code
[08:24:50] n008f4g_: has joined #ruby
[08:24:50] r0bby_: has joined #ruby
[08:25:08] facebook: has joined #ruby
[08:25:33] blackmesa: has joined #ruby
[08:26:02] OrbitalKitten: has joined #ruby
[08:27:29] Oka: has joined #ruby
[08:27:40] matcouto: has joined #ruby
[08:31:08] TheNet: has joined #ruby
[08:31:10] Oog: has joined #ruby
[08:33:18] Node_: has joined #ruby
[08:33:22] Node_: Check our forum ! http://syntaxcore.com
[08:35:47] anisha: has joined #ruby
[08:36:58] chipotles: has joined #ruby
[08:37:49] dubkoidragon: has joined #ruby
[08:38:02] dubkoidragon: has left #ruby: ()
[08:38:18] dubkoidragon: has joined #ruby
[08:40:48] edwinvdgraaf: has joined #ruby
[08:41:51] noethics_: has joined #ruby
[08:42:12] mikecmpb_: has joined #ruby
[08:42:59] adaedra: hi yorickpeterse
[08:43:01] djbkd: has joined #ruby
[08:46:10] edwinvdg_: has joined #ruby
[08:47:09] blueOxigen: has joined #ruby
[08:47:58] zenspider: riddle: when will pry + pry-stack-explorer's show-stack NOT have a stack to show?
[08:49:54] axl_: has joined #ruby
[08:50:45] bluOxigen: has joined #ruby
[08:51:01] shevy: when there is no stack?
[08:51:05] zenspider: (no, I don't know the answer)
[08:51:19] htmldrum: has joined #ruby
[08:51:29] zenspider: there's definitely a stack... this is inside psych inside rails inside a mess
[08:51:36] adaedra: zenspider: when all the planets are aligned with the sun
[08:51:42] senayar: has joined #ruby
[08:51:44] zenspider: but for some reason, show-stack, up, down, etc do nothing
[08:51:45] quazimodo: anyon here written a shopify plugin?
[08:51:50] quazimodo: to rephrase
[08:52:09] quazimodo: a guy i work with is pulling hairs out over his failed attempt at a shopify plugin for shipping
[08:52:12] casadei_: has joined #ruby
[08:52:24] sofija: has joined #ruby
[08:52:39] zenspider: on top of it, I'm inside a rescue I added to psych, and firing up binding.pry, and ... nothing.
[08:52:39] quazimodo: sphex_: sorry i went afk. I understand what you're saying though
[08:52:41] quazimodo: I presumed as much
[08:52:51] zenspider: wtf? show no exception... which is fine.
[08:53:22] senayar: has joined #ruby
[08:53:25] zenspider: I'm trying to hunt down Psych freaking out trying to dump an anonymous Module... which I need to track down to figure out where it came from
[08:53:43] bayed: has joined #ruby
[08:56:22] zenspider: ObjectSpace.each_object { |m| m.instance_variables.each do |iv| p m if m.instance_variable_get(iv) == o rescue nil; end } ... ouch
[08:56:27] quimrstorres: has joined #ruby
[08:57:55] apeiros: I think the rescue nil is needed for .instance_variables too
[08:58:03] apeiros: might have a couple of objects not responding to that in OS
[08:58:14] TheBrayn: in which cases should I use the short form with &: or & for functions like map?
[08:58:24] edwinvdgraaf: has joined #ruby
[08:58:32] zenspider: oddly, I get a strange error if I don't have the rescue
[08:58:33] zenspider: NoMethodError: undefined method `[]' for #<Module:0x007fd57b679168>
[08:58:36] arturmartins: has joined #ruby
[08:58:58] apeiros: it overrides ivar_get?
[08:59:02] zenspider: not sure what that's about or why it happens
[08:59:13] zenspider: I guess it could? seems like madness
[08:59:33] apeiros: TheBrayn: & is not a short form. &:sym can only be used in certain cases, so you'd use them only in those
[08:59:44] Oog: has joined #ruby
[08:59:50] zenspider: gems/soap2r-1.5.8/lib/soap/soap.rb
[08:59:51] zenspider: 134: def instance_variable_get(ivarname)
[08:59:56] f4cl3y: has joined #ruby
[08:59:56] zenspider: blame everything bad on soap
[09:00:07] TheBrayn: in cases where the method applied to each element does not have any parameters, right?
[09:00:19] apeiros: yeah. overriding ivar_get. sounds like a great idea :D
[09:00:28] zenspider: what could possibly go wrong?
[09:01:13] apeiros: TheBrayn: it can actually take params, but that use case is pretty rare. the args would have to be part of what is yielded to the block.
[09:01:21] zenspider: x = []; ObjectSpace.each_object { |m| m.instance_variables.each do |iv| x << [m, iv] if m.instance_variable_get(iv) == o rescue nil; end }
[09:01:27] zenspider: x.last.first.instance_variable_get x.last.last
[09:01:31] zenspider: damn... my life is wierd
[09:02:31] livathinos: has joined #ruby
[09:02:52] timonv: has joined #ruby
[09:02:56] zenspider: it's a ActionDispatch::Routing::RouteSet::NamedRouteCollection and only has this anonymous module if a destroy method renders some shit ... I have no words
[09:03:07] Mafious: has joined #ruby
[09:03:10] Mafious: a Hey Guys someone can buy my Shitgame Please ? Go here to buy my game please
[09:03:11] Mafious: http://superdupergc.itch.io/blackice
[09:03:29] zenspider: !ban Mafious !T 1d trolls go home
[09:03:36] apeiros: zenspider: need some? I've got some spare words???
[09:03:45] ChanServ: +b Mafious!*@*
[09:03:45] ChanServ: ChanServ kicked Mafious: trolls go home
[09:03:48] marr: has joined #ruby
[09:03:53] zenspider: damn that's slow
[09:03:54] apeiros: chanserv so slow :(
[09:04:07] apeiros: yeah, I want to perma-op ruboto so it can do that stuff faster
[09:04:18] zenspider: prolly should
[09:04:22] marr: has joined #ruby
[09:04:24] gguggi: has joined #ruby
[09:04:27] apeiros: also seems we have to go away from akick, as only founders can remove stuff :<
[09:04:45] zacstewart: has joined #ruby
[09:04:48] xkef: has joined #ruby
[09:04:48] lkba: has joined #ruby
[09:05:30] [k-: has joined #ruby
[09:05:31] ruurd: has joined #ruby
[09:06:10] [k-: Ox0dea!
[09:06:16] revath: has joined #ruby
[09:06:57] Zai00: has joined #ruby
[09:07:03] apeiros: well, I *should* get a bit of spare time to work on ruboto & ruby-community.com next week.
[09:07:43] [k-: yay! upgrades!
[09:07:51] [k-: thanks apeiros
[09:08:15] matcouto: has joined #ruby
[09:10:24] marr: has joined #ruby
[09:11:53] bodzio: has joined #ruby
[09:12:35] ndrei: has joined #ruby
[09:13:36] failshell: has joined #ruby
[09:14:50] dubkoidragon: hey guys, is there anywhere that I can get a qucik read on what I need to install and run my ruby codes, and the process in which to run them, pref an article with pics rather than video.
[09:15:30] adaedra: https://www.ruby-lang.org/en/documentation/installation/
[09:15:50] dubkoidragon: Thanks a lot man. cheers
[09:16:07] dubkoidragon: I'm coming from a pyton backround, and I am really excited to start workign with ruby
[09:16:14] ruboto: we're not all guys - while you probably don't meant to be exclusive, not everybody feels that way. Maybe consider using "folks", "y'all" or "everyone" instead?
[09:16:15] dubkoidragon: i look forward to getting to know yall
[09:16:21] zenspider: argh. I have no idea how to track this BS down
[09:16:36] dubkoidragon: i meant no disrespect
[09:16:47] dubkoidragon: jujst my common speech slang my friends
[09:17:26] adaedra: most don't. don't worry, you're not in trouble, just a friendly reminder :)
[09:17:54] adaedra: have fun with ruby though :)
[09:18:02] bruno-: has joined #ruby
[09:18:25] dubkoidragon: thank you, I'm almost done learning the syntax here which is scary close to pythons, then i'm gonna hit up some rails too as well as working with base ruby
[09:18:29] zenspider: there's gotta be a better way
[09:18:39] asui: has joined #ruby
[09:19:02] [k-: isn't it french that has a lot of gender-specific words :o
[09:19:09] revath: has joined #ruby
[09:19:31] dubkoidragon: ya a lot of languages do, I'm speaking verbal languages obviously
[09:19:35] adaedra: [k-: you're welcome to discuss that in offtopic :)
[09:19:44] dubkoidragon: what's off topic
[09:19:48] ruboto: this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[09:22:24] fabrice31_: has joined #ruby
[09:23:52] apeiros: zenspider: your code bombs on serialization of data?
[09:24:07] apeiros: zenspider: and you have the place where the code is being serialized?
[09:24:44] apeiros: i.e. you have all except the place where the anonymous module which causes the bombing is created?
[09:24:44] eGGsha: has joined #ruby
[09:25:23] isxek: has joined #ruby
[09:25:46] zenspider: I know what the module is, and where it comes from... I have no idea how it makes it into the object graph being serialized, nor do I (currently) know the top of the graph
[09:25:55] tubuliferous_: has joined #ruby
[09:26:11] htmldrum: has joined #ruby
[09:26:19] zenspider: tho, I just found out that my test is holding onto the module in question (indirectly).... I need to figure out why nilling it out isn't working
[09:26:32] zenspider: this stupid pattern is working
[09:26:36] zenspider: a = find_obj m; a.map { |x| [x[0].class, x[1]] }
[09:26:45] zenspider: pick... then m = a[1][0]; nil
[09:27:09] plashchynski: has joined #ruby
[09:27:18] Oog: has joined #ruby
[09:27:21] zenspider: and just.... fyi... Bundler::Definition holds onto EVERYTHING
[09:27:28] zenspider: I think, quite possibly, literally...
[09:27:52] asui: Hi everyone, I've started to learn ruby but I've got some trouble with threads. If I spawn multiple threads t1...tn = Thread.new everthing works fine. But if I do the same thing in a loop (0..7) it will only spawn 3-4 threads? I don't understand this behavior. could anybody explain it to me?
[09:28:04] matcouto: has joined #ruby
[09:28:04] Stan: has joined #ruby
[09:28:07] zenspider: I can't find the top of this stupid graph tho
[09:29:19] khebbie: has joined #ruby
[09:29:24] Scrofff: has joined #ruby
[09:29:56] lxsameer: has joined #ruby
[09:32:38] bronson: has joined #ruby
[09:34:52] Pupeno: has joined #ruby
[09:34:52] Pupeno: has joined #ruby
[09:35:40] Pathfinder: has joined #ruby
[09:35:57] Karpah: has joined #ruby
[09:36:26] adaedra: ?code asui
[09:36:26] ruboto: asui, We can't help you without your code, please post it to https://gist.github.com
[09:36:49] adaedra: both versions, and a little more about context and what you're trying to do
[09:37:00] yorickpeterse: TIL Ruby's String#downcase is meh when it comes to downcasing unicodes
[09:37:20] adaedra: language support, I guess
[09:37:40] adaedra: >> "????????".upcase
[09:37:41] ruboto: adaedra # => "????????" (https://eval.in/399844)
[09:37:57] yorickpeterse: e.g. Pg can downcase it just fine to "??karp"
[09:37:59] ruurd: has joined #ruby
[09:38:01] yorickpeterse: But Ruby keeps it as is
[09:38:03] apeiros: yupp, ruby only knows about ascii cases
[09:38:28] apeiros: you need one of the unicode gems to properly translate cases
[09:38:59] asui: adaedra, ruboto : https://gist.github.com/anonymous/77ea44b7f2d3284165d4
[09:39:32] kham: has joined #ruby
[09:39:43] yorickpeterse: well wadda ya know, there's a unicode Gem
[09:39:45] apeiros: ?justabot asui
[09:39:45] ruboto: asui, I'm just a bot. You don't need to address me.
[09:40:03] apeiros: yorickpeterse: there are several. and as it seems, AS' mb_chars is quite decent too.
[09:41:47] adaedra: asui: first note, you can change 0..vids.length - 1 to 0...vids.length
[09:42:10] dgutierrez1287: has joined #ruby
[09:42:20] adaedra: when you say that less than 7 threads are spawned, you have results not displayed?
[09:42:51] asui: I'm looking on the file system how many files are created
[09:43:14] asui: maybe every thread is spawned but theres no Downloaded file from it
[09:43:36] zenspider: 1) Use Queue. 2) Use map. 3) threads.each(&:join) can't do anything if empty
[09:44:47] Scrofff: has joined #ruby
[09:45:23] mikecmpbll: anyone know how i'd parse this ? https://gist.github.com/mikecmpbll/f26f9cc8424567720d86
[09:45:28] mikecmpbll: it's a sql dump, basically.
[09:45:56] mikecmpbll: i want to extract the value at column x for each row, but parsing it is a nightmare.
[09:48:37] asui: zenspider, thank you. I've changed vids[count] to vids.pop... now it seems to work how it should. but why?
[09:48:45] yorickpeterse: apeiros: what's the Gem name of that?
[09:48:56] apeiros: activesupport?
[09:49:06] apeiros: I think activesupport's gem name is active_support ;-p
[09:49:21] apeiros: (or the other way round - or maybe they fixed that inconsistency by now???)
[09:49:22] adaedra: aaah, activesupport.
[09:49:34] adaedra: last time I used it, it was still unconsistent
[09:50:11] yorickpeterse: apeiros: No I meant mb_chars
[09:50:14] avitzurel: has joined #ruby
[09:50:23] yorickpeterse: I missed the AS' part
[09:50:24] apeiros: yeah, mb_chars is from active_support
[09:50:28] yorickpeterse: Hell no I'm not touching active_support
[09:50:39] apeiros: need some garlic?
[09:50:46] adaedra: ACTION gives yorickpeterse an hazmat suit
[09:51:31] apeiros: ACTION off for lunch
[09:51:54] plashchynski: has joined #ruby
[09:54:41] yorickpeterse: Well, seems https://github.com/blackwinter/unicode it is then
[09:55:36] adaedra: It's weird ruby has no support for that
[09:55:45] adaedra: I'm sure even C knows how to do that, with locales
[09:56:32] blackmesa: has joined #ruby
[09:58:17] yorickpeterse: Have you seen Ruby's existing unicode system?
[09:58:24] adaedra: not in deep
[09:58:25] yorickpeterse: It's perfectly reasonable they don't want to touch that
[09:58:28] ruurd: has joined #ruby
[09:58:43] yorickpeterse: but annoying nevertheless
[09:59:01] bubbys: has joined #ruby
[09:59:51] senayar: has joined #ruby
[10:00:20] matcouto: has joined #ruby
[10:00:52] gregf_: mikecmpbll: i'd just use a regex and then a csv module to parse the resulting data
[10:01:12] gregf_: something like this i guess:
[10:01:18] mikecmpbll: gregf_: i can't get it to work, the comma in the string plays havoc with CSV
[10:02:15] gregf_: mikecmpbll: /\((?<str1>.*)\),\((?<str2>.*)\)$/ =~ %{(1,"abcde,fg",213,"abc(feg)"),(1,"abcde,fg",213,"abc(feg)")}; p [str1,str2]
[10:02:30] gregf_: mikecmpbll: that is a csv :/
[10:02:46] sdothum: has joined #ruby
[10:02:57] Skelz0r: has joined #ruby
[10:03:01] gregf_: it may be a dump but the data has commas as well
[10:03:05] mikecmpbll: gregf_: the comma in the middle of t he value
[10:03:11] arturaz: has joined #ruby
[10:03:23] gregf_: mikecmpbll: thats what csv modules are for :/
[10:03:57] ruurd: has joined #ruby
[10:04:16] DaniG2k: has joined #ruby
[10:05:07] acke: has joined #ruby
[10:05:26] pawz: has left #ruby: ("Palaver http://palaverapp.com/")
[10:05:30] mikecmpbll: i don't really know what you mean, but either way i can't seem to get the result i want with the csv lib
[10:05:51] arturmartins: has joined #ruby
[10:07:49] blackmesa: has joined #ruby
[10:07:49] eGGsha: has joined #ruby
[10:08:40] senayar: has joined #ruby
[10:08:40] senayar: has joined #ruby
[10:11:57] Flipez: has joined #ruby
[10:13:23] zacstewart: has joined #ruby
[10:13:27] Oog: has joined #ruby
[10:13:34] xkef: has joined #ruby
[10:13:38] Axy: has joined #ruby
[10:15:45] desigx: has joined #ruby
[10:18:04] lkba_: has joined #ruby
[10:18:28] T3: has joined #ruby
[10:20:23] sp1rs: has joined #ruby
[10:20:26] Oka: has joined #ruby
[10:20:43] OrbitalKitten: has joined #ruby
[10:21:48] gregf_: mikecmpbll: what i meant was, first use a regex to split that string. thereafter use a csv module to split the rows into columns
[10:22:00] gregf_: let me write something :/
[10:23:11] mikecmpbll: crap hold on
[10:23:17] mikecmpbll: i think i was doing something wrong.
[10:23:19] quazimodo: has joined #ruby
[10:23:24] quazimod1: has joined #ruby
[10:24:14] gregf_: >> /\((?<str1>.*)\),\((?<str2>.*)\)$/ =~ %{(1,"abcde,fg",213,"abc(feg)"),(1,"abcde,fg",213,"abc(feg)")}; str="";[str1, str2].each { |s| dat = s.chars.inject([]){ |arr,c| if ( c == "," && ( str =~ /\d$/ || str =~ /\D"$/ ) ); arr << str; str=""; else; str +=c; end; arr } ; dat << str; str = ""; p dat }
[10:24:15] ruboto: gregf_ # => ["1", "\"abcde,fg\"", "213", "\"abc(feg)\""] ...check link for more (https://eval.in/399950)
[10:24:26] gregf_: mikecmpbll: ^^ if that helps. its awful tho :/
[10:24:57] gregf_: change that += to << :/
[10:27:54] AviShastry: has joined #ruby
[10:27:56] mikecmpbll: thanks gregf_ , appreciate it ????
[10:28:09] gregf_: no worries
[10:28:59] fabrice31: has joined #ruby
[10:29:22] Rubie: has joined #ruby
[10:32:27] Igorshp: has joined #ruby
[10:34:09] blackmes1: has joined #ruby
[10:34:40] doerteDev: has joined #ruby
[10:35:40] ruurd: has joined #ruby
[10:40:23] Mon_Ouie: It's probably easier to use some parser library or write your own than to try and get regular expressions to handle balanced parentheses
[10:40:51] livathinos: has joined #ruby
[10:43:00] desigx: has joined #ruby
[10:43:34] bodzio: has left #ruby: ()
[10:43:40] ruurd: has joined #ruby
[10:45:52] OrbitalKitten: has joined #ruby
[10:46:09] senayar: has joined #ruby
[10:46:51] awk: has joined #ruby
[10:47:25] LMity: has joined #ruby
[10:48:20] awk: hi, i'm a ruby noob.. if I have $dir="/home/user" and then I have files = Dir.glob($dir) and puts files it outputs /home/user ... how do I modify either Dir.glob($dir or puts to output /home/user/* without having to put /home/user/* in $dir ="/home/user/*" ?
[10:49:12] blackmes1: has joined #ruby
[10:49:47] sp1rs: has joined #ruby
[10:50:54] adaedra: If your goal is to list files in the given directory, glob is not the most appropriate
[10:50:55] Papierkorb: has joined #ruby
[10:51:41] adaedra: ?ri Dir.entries
[10:51:41] ruboto: Dir.entries, I don't know anything about ri
[10:51:48] adaedra: &ri Dir.entries
[10:51:49] `derpy: https://devdocs.io/ruby/dir#method-c-entries
[10:51:57] thelastinuit: has joined #ruby
[10:52:45] intinig: has joined #ruby
[10:53:47] adaedra: also, don't use globals.
[10:54:21] Blaguvest: has joined #ruby
[10:54:24] schaerli: has joined #ruby
[10:56:17] Scroff: has joined #ruby
[10:56:18] codecop: has joined #ruby
[10:57:53] LMity: has joined #ruby
[10:58:54] intinig: has joined #ruby
[10:59:26] stonith: has joined #ruby
[10:59:26] stonith: has joined #ruby
[11:02:09] mandarinkin: has joined #ruby
[11:02:57] ruurd: has joined #ruby
[11:09:23] Miron: has joined #ruby
[11:10:10] devbug: has joined #ruby
[11:12:02] arup_r: has joined #ruby
[11:13:42] OrbitalKitten: has joined #ruby
[11:13:54] ndrei: has joined #ruby
[11:14:00] edwinvdgraaf: has joined #ruby
[11:14:05] tubuliferous_: has joined #ruby
[11:14:17] failshell: has joined #ruby
[11:16:39] nateberkopec: has joined #ruby
[11:17:11] bashusr: has joined #ruby
[11:17:54] mhib: has joined #ruby
[11:19:10] galeido: has joined #ruby
[11:20:35] desigx: has joined #ruby
[11:23:09] facebook: has joined #ruby
[11:23:42] Iskarlar: has joined #ruby
[11:24:05] lessless: has joined #ruby
[11:24:56] shevy: adaedra but ruby uses so many globals!
[11:26:23] adaedra: $shevy.mute!
[11:27:14] iloverubynoob: has joined #ruby
[11:27:14] pecopeco: has joined #ruby
[11:27:22] Oka: has joined #ruby
[11:28:23] quazimodo: has joined #ruby
[11:28:25] quazimod1: has joined #ruby
[11:29:01] tmtwd: has joined #ruby
[11:31:00] Oka: has joined #ruby
[11:31:21] Iskarlar: has joined #ruby
[11:31:37] nfk: has joined #ruby
[11:31:39] schaerli: has joined #ruby
[11:32:41] farn: has joined #ruby
[11:32:43] JeramyRR: has joined #ruby
[11:34:33] bruno-: has joined #ruby
[11:34:57] eGGsha: has joined #ruby
[11:36:58] senayar: has joined #ruby
[11:38:09] symm-: has joined #ruby
[11:38:34] casadei_: has joined #ruby
[11:39:25] MrJiks: has joined #ruby
[11:39:56] awk: @all is there a way with Class: Net::SCP to only transfer files that have changed.. I don't want to use rsync
[11:40:42] autrilla: has joined #ruby
[11:41:36] phutchins: has joined #ruby
[11:42:47] peeja: has joined #ruby
[11:43:01] ldnunes: has joined #ruby
[11:43:41] [k-: oh gosh horrible code
[11:43:49] shevy: I didn't write anything!
[11:44:16] [k-: <gregf_> >> /\((?<str1>.*)\),\((?<str2>.*)\)$/ =~ %{(1,"abcde,fg",213,"abc(feg)"),(1,"abcde,fg",213,"abc(feg)")}; str="";[str1, str2].each { |s| dat = s.chars.inject([]){ |arr,c| if ( c == "," && ( str =~ /\d$/ || str =~ /\D"$/ ) ); arr << str; str=""; else; str +=c; end; arr } ; dat << str; str = ""; p dat }
[11:44:57] thiagovsk: has joined #ruby
[11:45:22] shevy: the Ox0dea style of coding expands
[11:45:33] adaedra: to count the number of `true` in an array composed of `true` and `false`, is there better than `count(&:itself)`?
[11:46:38] Iskarlar: has joined #ruby
[11:48:15] Xzanron: has joined #ruby
[11:49:06] _solomon: has joined #ruby
[11:51:07] allcentury: has joined #ruby
[11:51:59] edwinvdgraaf: has joined #ruby
[11:52:16] schaerli: has joined #ruby
[11:53:35] apeiros: adaedra: don't think it's better, but as an alternative: (ary-[false]).size
[11:53:37] nfk: has joined #ruby
[11:54:03] adaedra: that creates a second array though
[11:54:13] OrbitalKitten: has joined #ruby
[11:54:54] shevy: it's slow!
[11:55:07] yuuvee: has joined #ruby
[11:55:35] adaedra: well, it's better without creating a new array
[11:55:44] apeiros: shevy: it's actually faster
[11:55:48] apeiros: adaedra: why? :)
[11:56:39] lala_: has joined #ruby
[11:57:01] shevy: adaedra your code is slower!
[11:57:07] adaedra: that's allocating a lot of ressources (the array + all inside elements) just to do a count and throw it away (and the array I check into already have a short lifespan), especially when this array can have a lot of elements inside
[11:57:22] adaedra: I just noticed I can do with a step less >_<
[11:57:23] ruurd: has joined #ruby
[11:57:35] apeiros: it's ~20bytes + 8bytes * elements
[11:57:43] apeiros: so 10k elements is 80KB memory
[11:58:20] adaedra: And allocating 0B is no better?
[11:58:20] davejlong: has joined #ruby
[11:58:21] Zai00: has joined #ruby
[11:59:04] apeiros: it is. but that's not the only part of the equation.
[11:59:26] apeiros: count(&:itself) does N method calls in ruby space, which is expensive
[11:59:40] apeiros: (ary-[false]).size does 2 method calls in ruby space
[11:59:56] zacstewart: has joined #ruby
[12:00:21] endash: has joined #ruby
[12:00:38] [k-: what is this ary-[false]
[12:01:10] adaedra: ary minus all false elements
[12:01:18] adaedra: so you get an array of just true elements
[12:01:21] prestorium: has joined #ruby
[12:01:26] adaedra: &ri Array#-
[12:01:26] `derpy: https://devdocs.io/ruby/array#method-i--
[12:01:32] apeiros: if you don't care about the original array: ary.delete(false); ary.size :)
[12:01:38] apeiros: no new array is created
[12:01:44] [k-: you write worser code than me
[12:02:05] adaedra: mmh, still haven't removed this extra -
[12:02:35] apeiros: funny. .dup + .delete is actually the fastest
[12:02:42] OrbitalKitten: has joined #ruby
[12:02:45] apeiros: at least in this microbench :D
[12:03:00] jpfuentes2: has joined #ruby
[12:03:05] Timba-as: has joined #ruby
[12:03:14] [k-: is .dup lazy
[12:03:32] apeiros: dup is copy on write. but since you write, the lazy doesn't help here.
[12:03:47] Ropeney: has joined #ruby
[12:03:51] danzilio: has joined #ruby
[12:03:51] symbol: has joined #ruby
[12:03:59] [k-: you write the true values only!
[12:04:06] johnny12000: has joined #ruby
[12:04:54] adaedra: I've a stupid error, but I'll see it after lunch
[12:05:04] [k-: >> 10.times { true.object_id }
[12:05:05] ruboto: [k- # => 10 (https://eval.in/400006)
[12:05:13] adaedra: apeiros: guess I'm not used to optimization in interpreted languages
[12:05:42] [k-: >> 10.times.to_a.map { true.object_id }
[12:05:43] ruboto: [k- # => [2, 2, 2, 2, 2, 2, 2, 2, 2, 2] (https://eval.in/400009)
[12:06:00] [k-: no wonder hash is quick!
[12:06:22] [k-: and eql?
[12:06:22] adaedra: Array.new with a block may be what you look for, [k-
[12:06:37] adaedra: >> Array.new(10) { true.object_id }
[12:06:38] ruboto: adaedra # => [2, 2, 2, 2, 2, 2, 2, 2, 2, 2] (https://eval.in/400010)
[12:06:52] [k-: yes! the!
[12:06:56] [k-: thanks*
[12:07:08] apeiros: ACTION used Array.new(1000) { rand < 0.5 } # to generate test data :)
[12:07:08] mandarinkin: has joined #ruby
[12:07:53] awk: anyone can advise on a way with ruby using scp to only upload/download changed files ?
[12:08:54] [k-: the most idiomatic way is still count(&:itself) tho
[12:09:29] timonv: has joined #ruby
[12:10:13] arup_r: has joined #ruby
[12:10:46] blackmes1: has joined #ruby
[12:11:22] cek: has joined #ruby
[12:13:01] shevy: awk I think you have to do that manually, e. g. keep track of which files have a different modification date
[12:13:35] [k-: ^ that's what I did
[12:13:51] tkuchiki: has joined #ruby
[12:14:45] skyrocker: has joined #ruby
[12:15:17] arturmartins: has joined #ruby
[12:15:23] skyrocker: has left #ruby: ()
[12:15:29] ruurd: has joined #ruby
[12:15:31] i-blis: has joined #ruby
[12:16:49] awk: shevy: m' kay tx
[12:17:21] schaerli: has joined #ruby
[12:17:47] presto: has joined #ruby
[12:18:05] Scripore: has joined #ruby
[12:18:25] Pathfinder_: has joined #ruby
[12:19:31] haxrbyte: has joined #ruby
[12:19:36] Igorshp: has joined #ruby
[12:20:28] chinmay_dd: has joined #ruby
[12:20:56] haxrbyte_: has joined #ruby
[12:21:54] sgambino: has joined #ruby
[12:21:57] aspiers: has joined #ruby
[12:22:36] shevy: is there some "popularity chart" for rubygems? something like, not only top downloads, but also like ... how important a gem is for the whole ruby infrastructure
[12:22:56] edwinvdgraaf: has joined #ruby
[12:23:05] mikecmpbll: shevy: they're in the process of adding reverse dependencies to the gem page
[12:23:18] shevy: that's neat
[12:23:20] mikecmpbll: they already added a function to the api but i think they're working out how to display it
[12:23:28] mikecmpbll: lemme find the gh issue
[12:23:47] mikecmpbll: https://github.com/rubygems/rubygems.org/pull/945
[12:23:47] shevy: I think bricker showed me some new trick lately... how to grab the latest n programs updated, in json
[12:24:34] symbol: has joined #ruby
[12:24:45] livcd_: has joined #ruby
[12:24:47] Iskarlar: has joined #ruby
[12:25:04] livcd_: Hi guys is there some style guide you can recommed / or you just like ?
[12:25:27] shevy: livcd_ the rubocop one adheres to one
[12:25:36] shevy: you can test rubocop output on your projects
[12:25:51] shevy: I think rubocop conforms to this guide: https://github.com/bbatsov/ruby-style-guide
[12:26:12] shevy: there is an older one from chris2 which is here: https://github.com/chneukirchen/styleguide/blob/master/RUBY-STYLE
[12:26:22] shevy: and I am sure apeiros uses another one, where he explains the use of "then" :)))
[12:26:41] pietr0: has joined #ruby
[12:27:05] [k-: does then have to be explained?
[12:27:08] schaerli_: has joined #ruby
[12:27:19] [k-: it's just a one line thing!
[12:27:37] shevy: well I think you can use then in at least two cases or?
[12:27:45] shevy: in if-structurs, and case/when/then right?
[12:27:50] shevy: *structures
[12:27:56] [k-: from what I know
[12:28:17] segfalt: has joined #ruby
[12:28:58] [k-: I have never seen an unless then and I never want to
[12:29:32] shevy: yeah you are right... for some reason, it's more popular in "if condition then"
[12:30:09] livcd_: thanks :-)
[12:30:13] [k-: no one likes unless!
[12:30:51] facebook: has joined #ruby
[12:31:00] shevy: do you use unless in your code [k-?
[12:31:08] [k-: !object -> Bool; !Bool -> int; !Int -> string
[12:31:14] [k-: no I do not
[12:31:18] [k-: too much mental overhead
[12:31:27] yorickpeterse: ACTION quite enjoys unless
[12:31:29] [k-: !!!object = yay
[12:31:39] ljarvis: unless is fine
[12:31:42] shevy: I like if, because it's a simple toggle... "if condition" ... "if !condition"
[12:31:53] dionysus69: has joined #ruby
[12:32:16] Zamyatin: has joined #ruby
[12:33:02] matcouto: has joined #ruby
[12:33:26] [k-: who has the mental capacities to unless anyway
[12:33:29] shevy: I do use unless too though
[12:33:37] shevy: but mostly "afterwards", as in
[12:33:41] shevy: I first write: "if !"
[12:33:50] [k-: we have this discussion every other day!
[12:33:58] shevy: we have style discussions every day!
[12:33:59] Zamyatin: has joined #ruby
[12:34:51] shevy: just look at your oneliners :-)
[12:34:54] [k-: touche even
[12:35:00] keen__________22: has joined #ruby
[12:35:50] Zamyatin: has joined #ruby
[12:36:04] shevy: code golfing masteries
[12:36:06] konsolebox: has joined #ruby
[12:37:31] Zamyatin: has joined #ruby
[12:39:05] ndrei: has joined #ruby
[12:39:41] xkef: has joined #ruby
[12:40:24] stantonnet: has joined #ruby
[12:41:20] Kully3xf: has joined #ruby
[12:42:12] livcd_: what's the reason for preferring single line format for class definition with no body ?
[12:42:32] mikecmpbll: it takes up one line
[12:42:45] mikecmpbll: did you expect any other answer?
[12:42:48] sepp2k: has joined #ruby
[12:43:33] Scrofff: has joined #ruby
[12:43:40] dabradley: has joined #ruby
[12:43:47] livcd_: yeah something mysterious
[12:43:49] Oog: has joined #ruby
[12:44:42] shevy: that was one of the best question-answers I could read
[12:44:51] Silex: livcd_: it makes it a little bit clearer the class is really dumb
[12:44:57] [k-: when there have class bodies
[12:45:06] [k-: no class bodies*
[12:45:06] shevy: livcd_ here may be one though: define some empty skeleton, then fill it up lateron
[12:45:41] [k-: usually u see them in error classes
[12:46:07] [k-: class MyError < StandardError; end is how they do it
[12:46:08] tkuchiki: has joined #ruby
[12:46:10] dabradley: has joined #ruby
[12:46:39] mikecmpbll: i prefer SerialisationError = Class.new(StandardError)
[12:47:07] shevy: yes if jhass would be here there would be a fight now
[12:47:13] livcd_: mikecmpbll: the's okay according to the guide
[12:47:33] livcd_: why ? is he german ?
[12:47:39] ryba: has joined #ruby
[12:47:48] [k-: I hardly see the other in the wild
[12:47:52] [k-: but I don't read a lot
[12:48:05] [k-: (disclosure: I don't read at all)
[12:48:15] [k-: still have that roda thing on my list
[12:48:21] mikecmpbll: i think dostoyevsky uses it in notes from underground
[12:48:37] mikecmpbll: also, what are the chances that that would be a highlight.
[12:49:18] konsolebox: Class.new for me would also be preferable sometimes. it depends on the part of code that declares it.
[12:49:44] dhjondoh: has joined #ruby
[12:50:22] shevy: Ox0dea also supports the Class.new notation
[12:50:52] [k-: welp, I'm jumping in the bandwagon then
[12:50:54] mikecmpbll: first time anyone's ever agreed with me. i feel special
[12:51:46] bmurt: has joined #ruby
[12:51:53] DefV: From a code-reading perspective I think class MyError < StandardError; end is a lot more clear in its intent
[12:52:05] mikecmpbll: DefV: why u go spoil it
[12:52:30] ljarvis: ACTION much prefers class X < Y; end
[12:52:36] DefV: for MyError = Class.new(StandardError) you (I) have to do a mental check-in "Oh, this does that"
[12:52:42] mikecmpbll: i should've quit while i was ahead.
[12:52:45] [k-: >> class MyError < StandardError end
[12:52:46] ruboto: [k- # => /tmp/execpad-dd33577d961d/source-dd33577d961d:2: syntax error, unexpected keyword_end, expecting ';' ...check link for more (https://eval.in/400064)
[12:52:58] [k-: :( I thought u didn't need a ;
[12:52:58] senayar: has joined #ruby
[12:53:10] hinbody: has joined #ruby
[12:53:22] fabrice31: has joined #ruby
[12:53:27] [k-: I was trying to be clever but failed hard
[12:53:30] ljarvis: for me it's because it's easier to grep for a definition
[12:54:00] bruno-: has joined #ruby
[12:54:07] DefV: ljarvis: why would you grep for things
[12:54:16] mikecmpbll: >> if true; puts "foo" end
[12:54:17] ruboto: mikecmpbll # => foo ...check link for more (https://eval.in/400067)
[12:54:20] ljarvis: because Ruby's tooling sucks?
[12:54:27] DefV: SO IT SEEMS
[12:54:42] kaleido: has joined #ruby
[12:54:45] mikecmpbll: >> class Foo; puts "foo" end
[12:54:46] [k-: avdi has a blog post about it
[12:54:46] ruboto: mikecmpbll # => foo ...check link for more (https://eval.in/400070)
[12:55:30] shevy: [k- that is why I usually always use a ; when I am unsure
[12:55:35] mandarinkin: has joined #ruby
[12:55:40] izzol: hmm, there is a simply way to decompress file.bz2 with the names of compressed files?
[12:55:40] Mon_Ouie: I use pry which can try and guess the location of a class
[12:55:58] DefV: Mon_Ouie: That was what I was going to say
[12:56:08] izzol: I'm trying to catch the stdout or stderr by Open3 without the good results. Flag -v doens't work as well.
[12:56:14] [k-: shevy: but that makes it easier to beautify code!
[12:56:19] [k-: I don't want that now, do i
[12:56:39] [k-: I remember showing you my minified code
[12:56:40] shevy: well ideally would be to avoid ';' :)
[12:56:40] DefV: Mon_Ouie: but StandardError.descendants is quite the list
[12:56:59] shevy: but I can understand that ruboto wants one-liners
[12:56:59] keeguon: has joined #ruby
[12:57:08] schaerli: has joined #ruby
[12:57:23] kaleido: ruboto is kind of a punk
[12:57:27] Mon_Ouie: >> ObjectSpace.each_object(StandardError.singleton_class).count
[12:57:28] ruboto: Mon_Ouie # => 185 (https://eval.in/400075)
[12:57:40] joonty: has joined #ruby
[12:58:06] hj2007: has joined #ruby
[12:58:40] [k-: experts use objectspace all the time to dig into the internals of Ruby
[12:58:52] shevy: objectspace scares me
[12:59:32] davedev24: has joined #ruby
[12:59:52] yorickpeterse: You mean "people who sadly can't use anything better because Ruby doesn't specify anything better"
[13:00:07] ljarvis: back2 ljarvis> because Ruby's tooling sucks?
[13:00:32] ljarvis: >> ObjectSpace.count_objects
[13:00:33] ruboto: ljarvis # => {:TOTAL=>28604, :FREE=>650, :T_OBJECT=>45, :T_CLASS=>580, :T_MODULE=>22, :T_FLOAT=>7, :T_STRING=>977 ...check link for more (https://eval.in/400076)
[13:00:50] nfk: has joined #ruby
[13:00:52] [k-: I don't use pry!
[13:01:19] [k-: it looks like gc.count
[13:01:20] [k-_: has joined #ruby
[13:01:43] casadei_: has joined #ruby
[13:01:53] serivich: has joined #ruby
[13:02:13] tubuliferous_: has joined #ruby
[13:02:28] shevy: well that is scary
[13:03:54] workmad3: has joined #ruby
[13:04:44] Dwarf: has joined #ruby
[13:04:47] [k-_: i like baweaver's Ox0dea series
[13:04:47] eGGsha: has joined #ruby
[13:05:20] cochise: has joined #ruby
[13:05:34] Igorshp: has joined #ruby
[13:05:54] shevy: what did he do? more one-liners "we store the world in this line"?
[13:05:55] pabloh: has joined #ruby
[13:05:59] Scroff: has joined #ruby
[13:06:23] [k-_: he actually breaks down Ox0dea's code trying to make sense of it!
[13:06:29] [k-_: how Ox0dea does assignment: ->a,b{}[a,b]
[13:06:45] dimasg: has joined #ruby
[13:06:47] shevy: where is the assignment?
[13:06:56] bungoman: has joined #ruby
[13:07:05] shevy: well perhaps I should not ask ...
[13:07:56] senayar: has joined #ruby
[13:08:01] [k-_: well, object a enters the scope of the lambda as a
[13:08:33] davedev24: has joined #ruby
[13:09:46] [k-_: ->a,b{}[1,3]
[13:09:52] [k-_: so a is 1 and b is 3!
[13:09:54] kaleido: lambda lambda lambda? revenge of the nerds?
[13:10:31] ccooke: Hmm. Anyone know how to get the repeated combinations of a set of lists?
[13:10:33] dhjondoh: has joined #ruby
[13:10:36] victortyau: has joined #ruby
[13:10:53] chussenot: has joined #ruby
[13:10:57] mikecmpbll: ccooke: simple example?
[13:11:22] stantonnet: has joined #ruby
[13:11:31] ccooke: as in, where [1,2].repeated_combination(2) would yield [1,1], [1,2], [2,2]
[13:11:57] ccooke: that's already in Array
[13:12:08] ccooke: what I need to do is get the combinations of multiple arrays
[13:12:25] [k-_: merge them?
[13:13:17] ccooke: [ [1,2], [1,2], [3] ].method(2) => [1,1,3], [1,2,3], [1,2,3]
[13:13:33] chinmay_dd: has joined #ruby
[13:13:42] [k-_: merge them????
[13:14:09] ljarvis: the (2) in that method call makes no sense
[13:14:17] bungoman: has joined #ruby
[13:14:21] ccooke: ljarvis: sorry, yes
[13:14:24] Scripore: has joined #ruby
[13:14:26] ccooke: ignore it.
[13:14:33] ccooke: Brainfart from the existign example
[13:14:39] ccooke: you could also have is as:
[13:14:43] quimrstorres: has joined #ruby
[13:14:48] ccooke: [1,2].method([1,2],[3])
[13:14:55] ljarvis: i still don't get why [[1,2], [1,2]] would result in [1,1,3], [1,2,3]
[13:15:06] mikecmpbll: arys.first.product(*arys.drop(1).map(&:to_a)) ??
[13:15:06] ccooke: (similar to the way Array#product is called)
[13:15:17] ccooke: ljarvis: you missed the [3]
[13:15:36] mikecmpbll: >> arys = [[1,2],[3,4],[5,6]]; arys.first.product(*arys.drop(1).map(&:to_a))
[13:15:37] ruboto: mikecmpbll # => [[1, 3, 5], [1, 3, 6], [1, 4, 5], [1, 4, 6], [2, 3, 5], [2, 3, 6], [2, 4, 5], [2, 4, 6]] (https://eval.in/400087)
[13:15:50] ccooke: mikecmpbll: that's teh product
[13:15:50] schaerli: has joined #ruby
[13:15:56] mikecmpbll: k, then i'm out
[13:15:58] ccooke: I need the repeated combinations
[13:16:08] ccooke: I mean, I can write the code for it myself - it's not actually complex
[13:16:10] mikecmpbll: i don't understand the notion of a repeated combination of an array
[13:16:17] mikecmpbll: unless it returns a combination of arrays
[13:16:27] ccooke: Okay, here's a concrete example
[13:16:49] ccooke: This is for some probability distribition code
[13:17:00] ccooke: Imagine you are rolling 1d4 and 1d6 together
[13:17:03] [k-_: >> [[1,2],[3,4],[5,6]].reduce(:+).combination
[13:17:04] ruboto: [k-_ # => wrong number of arguments (0 for 1) (ArgumentError) ...check link for more (https://eval.in/400089)
[13:17:11] [k-_: >> [[1,2],[3,4],[5,6]].reduce(&:+).combination
[13:17:12] ruboto: [k-_ # => wrong number of arguments (0 for 1) (ArgumentError) ...check link for more (https://eval.in/400091)
[13:17:25] ruboto: irb is "interactive ruby", it is part of ruby. You can run ruby code and see results immediately. it's useful for testing code. Also see ?pry, a gem which is a popular alternative to irb.
[13:17:26] [k-_: do we need some argument for it
[13:17:30] ccooke: [k-_: combination takes an argument for the number of picks
[13:17:35] [k-_: i was trying to show something!
[13:17:36] ccooke: in this case, the size of the input array
[13:17:43] [k-_: >> [[1,2],[3,4],[5,6]].reduce(&:+).combination 2
[13:17:44] ruboto: [k-_ # => #<Enumerator: [1, 2, 3, 4, 5, 6]:combination(2)> (https://eval.in/400092)
[13:17:59] Rubie: has joined #ruby
[13:18:04] [k-_: i give up as well
[13:18:11] ljarvis: ccooke: can you gist a proper example? I might be missing something but I'm totally lost
[13:18:12] dfinninger: has joined #ruby
[13:18:23] ccooke: ljarvis: I'll do so in a bit, sure
[13:18:26] mikecmpbll: not just you, ljarvis!
[13:18:27] tmtwd: has joined #ruby
[13:18:50] ccooke: I've been searching to see if there's "proper" code for it for a bit, but it looks not
[13:18:51] krz: has joined #ruby
[13:19:09] linuxboytoo: has joined #ruby
[13:19:20] ccooke: To give the concrete example, anyway. Imagine you are rolling dice. You roll three dice - two of them four sided and one six sided
[13:19:48] desigx: has joined #ruby
[13:19:52] malconis: has joined #ruby
[13:19:53] `derpy: ACTION rolls 2 dice??? got 2, 4. Total: 6
[13:20:00] ccooke: now, the product of those are all the possible individual rolls that you could make
[13:20:14] allcentury: has joined #ruby
[13:20:31] segfalt: has joined #ruby
[13:20:34] [k-: a prediction?
[13:20:36] malconis: has joined #ruby
[13:20:37] ccooke: so: [1,2,3,4].product([1,2,3,4],[1,2,3,4,5,6]) will return a *lot* of possible results
[13:21:19] davejlong: has joined #ruby
[13:21:25] ccooke: as in, every individual possible roll you could make. But that's horribly inefficient if you just want to work out the probabilities of any individual result.
[13:21:59] [k-: [ a*b*c | a <- ary1, b <- ary2, c <- ary3 ]
[13:22:00] JoshL: has joined #ruby
[13:22:14] ccooke: for that, [1,2,3,4,5,6].repeated_combinations(3) will give you every distinct result *set*
[13:22:55] ccooke: Let's say that one of the value sets you get for that is [1,1,5], and you want to calculate the probability of that roll.
[13:24:15] [k-: but why would you want a set?
[13:24:30] [k-: you can't have probability with sets!
[13:24:33] endash: has joined #ruby
[13:24:34] fabrice31: has joined #ruby
[13:24:58] leat2: has joined #ruby
[13:25:32] ccooke: [k-_: you can if you code for it :-)
[13:25:32] prettiestPony11: has joined #ruby
[13:25:34] zacstewart: has joined #ruby
[13:26:28] duggiefresh: has joined #ruby
[13:26:52] ccooke: Anyway, I will write up the code I mean.
[13:27:08] ccooke: Thanks for the suggestions :-)
[13:27:19] ccooke: and for not being visibly bored with my explanation ;-)
[13:27:21] AlexRussia: has joined #ruby
[13:27:39] [k-_: visibly ( ???? ???? ????)
[13:28:08] ccooke: The internet covers a multitude of sins :-)
[13:28:29] [k-_: isnt probability the number of times in the array over total length of the array
[13:28:41] ccooke: [k-_: it is for simple things, yes
[13:29:20] ccooke: but I'm handling more complex ones, like exploding dice (which, if you haven't heard of the term, means "roll another die whenever a die rolls maximum" (yes, recursively))
[13:29:21] bhaak: has joined #ruby
[13:30:06] ccooke: and some modifiers like "drop the lowest N", or "treat values of X or more as a success, values below as failure"
[13:30:37] drewvanstone: has joined #ruby
[13:30:40] Iskarlar: has joined #ruby
[13:30:53] [k-_: more...math things...
[13:31:20] hfp: has joined #ruby
[13:31:38] phreakocious: hi, can someone explain why I get this error message when doing a Queue.pop(true) for non-blocking: in `pop': no implicit conversion of true into Integer (TypeError)
[13:32:20] hfp__work: has joined #ruby
[13:32:22] devdazed: has joined #ruby
[13:32:28] dblessing: has joined #ruby
[13:32:52] ddv: phreakocious: you are giving a a boolean but it wants an integer?
[13:33:14] phreakocious: the docs and many online examples show it is correct syntax
[13:33:18] konsolebox: phreakocious: what do you get with puts object.class?
[13:33:20] hfp_work-: has joined #ruby
[13:33:31] konsolebox: where object is the queue
[13:33:51] hfp-: has joined #ruby
[13:34:07] konsolebox: phreakocious: bug maybe
[13:34:19] Mon_Ouie: ?code phreakocious
[13:34:19] ruboto: phreakocious, We can't help you without your code, please post it to https://gist.github.com
[13:34:28] [k-_: do you have proof that the docs show that it is correct?
[13:34:45] [H]unt3r: has joined #ruby
[13:35:13] leat2: has joined #ruby
[13:35:15] phreakocious: http://ruby-doc.org/stdlib-2.0.0/libdoc/thread/rdoc/Queue.html#method-i-pop
[13:35:21] phreakocious: https://gist.github.com/phreakocious/f57aa23257f9b855ba2c
[13:35:24] [k-_: Ox0dea is so cunning, he uses num&1<1 to check if the number is even
[13:35:26] ddv: he is right
[13:35:32] Oog: has joined #ruby
[13:36:11] shevy: he is a genius
[13:36:20] ruurd: has joined #ruby
[13:36:23] shevy: and he'll miss all that talk because he is sleeping
[13:36:48] ddv: ### Functions go down here because I like Perl lol what
[13:36:59] [k-_: unless hosts.empty?; hosts = File.readlines(b) }
[13:37:09] Mon_Ouie: phreakocious: When you were asked to 'puts object.class' where did you put that line of code?
[13:37:14] Mon_Ouie: Because indeed, this ^
[13:37:26] phreakocious: right above the declaration of counters
[13:37:42] whippythellama: has joined #ruby
[13:37:52] bffff_: has joined #ruby
[13:38:49] phreakocious: [k-_: what's wrong with that?
[13:39:04] [k-_: you change the type of hosts to array
[13:39:12] [k-_: and array doesnt have pop(bool)
[13:39:16] _solomon: has joined #ruby
[13:39:22] phreakocious: it doesn't show that when i puts hosts.class though
[13:39:29] shevy: ddv epic line
[13:40:02] zrowe007: has joined #ruby
[13:40:11] Rubie: has joined #ruby
[13:40:20] [k-_: you nest too much
[13:40:25] [k-_: that is a code smell
[13:40:28] lobmys: has joined #ruby
[13:40:52] phreakocious: thanks for the help all
[13:41:21] hfp: has joined #ruby
[13:41:41] linuxboytoo: has joined #ruby
[13:41:51] hfp_work: has joined #ruby
[13:41:55] axl_: has joined #ruby
[13:42:31] [k-_: usually when someone says that, the problem is solved
[13:42:50] phreakocious: not yet but it will be
[13:44:43] thang: has joined #ruby
[13:45:16] lessless: has joined #ruby
[13:45:17] desigx: has joined #ruby
[13:46:12] linuxboy_: has joined #ruby
[13:46:34] sevenseacat: has joined #ruby
[13:47:14] prefixed: has joined #ruby
[13:48:10] paulcsmith: has joined #ruby
[13:48:32] Kully3xf: has joined #ruby
[13:48:35] quimrstorres: has joined #ruby
[13:49:30] Kully3xf: I have a file that calls module Enumerable and it was working fine, and I split it out into it's own file and now it won't work. Copy paste - where should I be looking
[13:50:04] phreakocious: [k-_: you were totally right, thanks again
[13:50:15] thang: has joined #ruby
[13:50:24] [k-_: ?code Kully3xf
[13:50:24] ruboto: Kully3xf, We can't help you without your code, please post it to https://gist.github.com
[13:51:11] Kully3xf: https://gist.github.com/anonymous/c9a455af0c24d7102883
[13:51:35] [k-_: ?gist_usage
[13:51:35] ruboto: To properly use gist, please enable syntax highlighting, either by choosing the language manually or by entering a proper filename. If you post multiple things, separate them into multiple files. If you have a Github account, please update your gist with new information instead of posting a new one.
[13:51:53] rbennacer: has joined #ruby
[13:52:08] [k-_: oh gosh nested defs!
[13:52:11] adaedra: And I think you lack a couple end
[13:52:12] [k-_: is that even legal
[13:52:18] Kully3xf: there's more code below
[13:52:22] Kully3xf: but irrelevant
[13:52:38] Kully3xf: I take it nested defs is not allowed then - I'll start there
[13:53:31] shevy: it's often not needed; you can do conditionals define via define_method and instance_eval / class_eval too
[13:53:35] aphprentice_: has joined #ruby
[13:54:06] failshell: has joined #ruby
[13:54:33] tkuchiki: has joined #ruby
[13:54:39] Scripore: has joined #ruby
[13:54:41] kies: has joined #ruby
[13:55:16] linuxboytoo: has joined #ruby
[13:56:04] schaerli: has joined #ruby
[13:57:59] jgpawletko: has joined #ruby
[13:59:06] ada2358: has joined #ruby
[13:59:13] shredding: has joined #ruby
[13:59:36] devbug: has joined #ruby
[13:59:40] NeverDie: has joined #ruby
[14:00:52] quazimodo: any way to get rspec to stop compaining about _spec.rb files not found (LoadError) when running through guard-rspec ?
[14:00:52] msnyon: has joined #ruby
[14:01:27] sevenseacat: dont look for _spec.rb files?
[14:01:30] sevenseacat: whats looking for them?
[14:01:43] meph: has joined #ruby
[14:01:44] quazimodo: Guardfile is matching them, but plenty don't exist
[14:01:56] sevenseacat: then your Guardfile should be fixed
[14:01:59] quazimodo: i guess the only option is to make everything in app/ also have something in spec/ eh?
[14:02:29] sevenseacat: recent versions of guard have really gone off the deep end in their dsl
[14:03:12] Fraeon: has joined #ruby
[14:03:45] Fraeon: has joined #ruby
[14:05:22] choppington: has joined #ruby
[14:05:52] thang: has joined #ruby
[14:06:14] ada2358: has joined #ruby
[14:06:32] jpfuentes2: has joined #ruby
[14:06:33] dopie: has joined #ruby
[14:06:33] workmad3: has joined #ruby
[14:07:14] sankaber: has joined #ruby
[14:07:22] cpruitt: has joined #ruby
[14:07:23] unshadow: has joined #ruby
[14:08:27] Zamyatin: has joined #ruby
[14:09:07] GhettoCode: has joined #ruby
[14:09:09] happyface: has joined #ruby
[14:09:21] devdazed: has joined #ruby
[14:12:09] edwinvdgraaf: has joined #ruby
[14:13:27] pecopeco: has joined #ruby
[14:13:27] iloverubynoob: has joined #ruby
[14:13:52] godzillaenlacasa: has joined #ruby
[14:15:06] blackmes1: has joined #ruby
[14:16:47] umgrosscol: has joined #ruby
[14:16:52] sofija: has joined #ruby
[14:17:24] njs126: has joined #ruby
[14:18:27] prestorium: has joined #ruby
[14:18:40] bodzio: has joined #ruby
[14:18:56] xkef: has joined #ruby
[14:20:37] sshuff: has joined #ruby
[14:20:44] cpruitt: has joined #ruby
[14:20:47] episage: has joined #ruby
[14:21:31] JoshL: has joined #ruby
[14:21:53] thoraxe: why would a "rake db:migrate" not do anything if there was already a db/migrate/xxxxxx file?
[14:22:00] jhass: ?rails thoraxe
[14:22:00] ruboto: thoraxe, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[14:22:01] thoraxe: usually that's because the db schema is newer than the migration or whatever?
[14:22:05] thoraxe: is that actually rails?
[14:22:16] ljarvis: are you using rails?
[14:22:29] thoraxe: no, sinatra.
[14:22:43] ljarvis: with activerecord?
[14:22:46] thoraxe: i didn't think rake was specific to rails
[14:22:47] jhass: well, AR expertise is still much higher over there
[14:22:52] ljarvis: it's nothing to do with rake
[14:22:52] thoraxe: makes sense
[14:23:01] ljarvis: but yeah AR stuff will be more helpful there
[14:23:06] ljarvis: including those rake tasks
[14:23:34] bubbys: has joined #ruby
[14:24:03] freerobby: has joined #ruby
[14:24:20] bhaak: has joined #ruby
[14:25:36] ljarvis: although I haven't used it in so long
[14:25:39] Guest87318: has joined #ruby
[14:26:09] Guest87318: How should I log a variable? https://gist.github.com/anonymous/592f2f0d3555f42f1a8c I want both of those specs to pass, and yet old_array is updated along with array. How do I log the old array? The value that it was before the When block was executed? I've tried using let and let! but to no avail. I like the RSpec-Given syntax and I like one liner specs, I know I could do this in one it block but I want to see if an old variable can be logged usi
[14:26:56] ljarvis: Given(:old_array){ array.dup }
[14:27:09] ljarvis: though better the other way around imo
[14:27:25] ljarvis: also this is an awful tests so I'm hoping there's a lot more to it
[14:27:39] Guest87318: ljarvis yeah it's just an example
[14:27:58] ljarvis: ok, so yeah they both point to the same object, you want to duplicate that
[14:28:01] Kully3xf: what's the better way to accomplish this if statement in one line without having to retype the input and also not using a variable
[14:28:02] Kully3xf: https://gist.github.com/anonymous/6ff7e5b082ab625f6e89
[14:28:03] Igorshp: has joined #ruby
[14:28:56] kies^: has joined #ruby
[14:29:13] Guest87318: ljarvis I got you, thanks a lot
[14:29:24] grill: has joined #ruby
[14:29:25] grill: has joined #ruby
[14:29:40] ljarvis: Kully3xf: "not using a variable" lolwut
[14:29:48] jhass: Kully3xf: gets.chomp.downcase.tap {|sg| sg = "1235678" if sg.size; validate_sg(sg) }
[14:29:58] arturaz: has joined #ruby
[14:29:58] ljarvis: that uses a variable
[14:30:06] jhass: no, a parameter! :P
[14:30:13] ljarvis: awful code is awful
[14:30:17] nettoweb: has joined #ruby
[14:30:26] jhass: yeah, just make it two lines
[14:30:27] sevenseacat: dont do it in one line.
[14:30:40] sevenseacat: readable code > short code
[14:30:41] jhass: or three actually
[14:30:44] Scripore: has joined #ruby
[14:30:51] Kully3xf: sg = gets.to_s.downcase.chomp (sg.length < 1)? "12345678" : validate_sg(sg)
[14:31:06] Kully3xf: (two lines)
[14:31:21] schaerli: has joined #ruby
[14:31:22] jhass: you don't do anything with "1235678" there, so it's rather pointless
[14:31:34] Kully3xf: yea I return it if the string is blank
[14:31:52] Kully3xf: so if user puts nothing into the terminal it'll default the security group name to 12345678
[14:31:56] revath: has joined #ruby
[14:32:24] jhass: security_group.empty? then
[14:32:27] sevenseacat: not in that code you just posted
[14:32:37] jhass: note how I could use the proper variable name only after you said it
[14:32:46] jhass: so rename sg to security_group _everywhere_
[14:32:57] segfalt: has joined #ruby
[14:33:42] pico-pete: has joined #ruby
[14:33:52] Igorshp: has joined #ruby
[14:33:52] OrbitalKitten: has joined #ruby
[14:33:54] sarkyniin: has joined #ruby
[14:34:01] bhaak: has joined #ruby
[14:34:04] LJT: has joined #ruby
[14:34:23] Kully3xf: and yes my code works - I just ran it and it returned 12345678 as sg name
[14:34:38] jhass: Kully3xf: sg name is not a valid term, purge it from your head now
[14:34:47] Kully3xf: output --security-group-ids 'sg-12345678'
[14:34:49] jhass: abbreviations are bad
[14:34:52] Kully3xf: how is it not
[14:34:58] Kully3xf: that's the API call name
[14:35:26] jhass: after a month of not touching the code you'll have to constantly remember what it stand for
[14:35:26] ljarvis: is this aws?
[14:35:33] Azulinho: has joined #ruby
[14:35:46] ljarvis: it's fine where you can't help it, but you can help naming variables and methods
[14:35:57] ljarvis: and you should definitely use a descriptive name
[14:36:15] linuxboytoo: has joined #ruby
[14:36:26] jhass: for all I care sg means stargate
[14:36:53] sevenseacat: means singapore, to me.
[14:37:04] prestorium: has joined #ruby
[14:37:08] [k-_: still busy refactoring Ox0dea's code
[14:37:42] yorickpeterse: amazon_web_services_auto_scaling_group_name = 'sg-12345678'
[14:38:00] yorickpeterse: code should be self documenting
[14:38:08] bodzio1: has joined #ruby
[14:38:27] shevy: [k-_ what do you mean with "refactoring" there
[14:38:35] intinig: has joined #ruby
[14:39:28] [k-_: prettify
[14:39:52] shevy: you make it uglier!
[14:40:23] [k-_: i mean legit
[14:40:30] [k-_: i forgot how a case statement works :/
[14:40:31] dudedudeman: you add 4 spaces on the indent!
[14:40:44] shevy: what indent =_O
[14:41:03] shevy: Ox0dea's code forbids ' '
[14:41:22] shevy: Look dudedudeman: ->a,b{}[1,3]
[14:41:38] dudedudeman: i haven't said to Ox0dea in a hot minute! Hi Ox0dea!
[14:41:47] dudedudeman: << a,b{}[1,3]
[14:42:07] danzilio: has joined #ruby
[14:42:14] _solomon: has joined #ruby
[14:42:30] senayar: has joined #ruby
[14:42:36] [k-_: tada! https://eval.in/400181
[14:42:42] [k-_: i made it nice
[14:43:10] Ox0dea: Morning, all!
[14:43:13] yeticry: has joined #ruby
[14:43:14] shevy: you use "if condition then"
[14:43:19] dudedudeman: Morning, Ox0dea!
[14:43:23] Ox0dea: dudedudeman: What's the rate of conversion between hot minutes and standard ones? :P
[14:43:32] [k-_: from this: https://gist.github.com/0x0dea/2df6c43f4f422884216b
[14:43:36] shevy: dudedudeman you awoke the Ox0dea
[14:43:45] dudedudeman: Ox0dea: it follows the Canadien to American dollar
[14:43:53] shevy: what the ... is this ? = ?[?]
[14:44:12] [k-_: there is no such thing...
[14:44:29] prestorium: has joined #ruby
[14:44:29] shevy: that looks like the ancient greeks coding in ruby
[14:44:31] [k-_: i did what i promised! https://gist.github.com/SkyBirdSoar/4ef09497a83bf58aa0b9
[14:45:14] Ox0dea: [k-_: It's off in a few places. :(
[14:45:25] gregf_: Kully3xf: you dont need a conditional there :/. you can just do if ( val = gets.downcase.chomp ); validate(val);end
[14:45:45] ljarvis: gregf_: um.. no
[14:46:00] mary5030: has joined #ruby
[14:46:03] [k-_: i sacrificed some for idiomaticness
[14:46:05] ljarvis: that won't ever return non-truthly
[14:46:06] sarkyniin: has joined #ruby
[14:46:07] rideh: has joined #ruby
[14:46:10] sevenseacat: gregf_: that is a conditional lol
[14:46:13] gregf_: def validate_sg(inval); return !inval.nil? && !inval.match(/\A\s*\z/) ? 1: 0;end; c = 0;loop{ if ( sg = gets.to_s.downcase.chomp ); p validate_sg(sg);end; break if ((c+=1) >= 2); }
[14:46:17] [k-_: assuming you were talking about what i was talking
[14:46:20] [k-_: OMY PLS NO
[14:46:28] danzilio: has joined #ruby
[14:46:29] [k-_: DIE GREG!
[14:46:42] ljarvis: gregf_: the condition is moot, it'll never fail
[14:47:04] ljarvis: plus that code makes me want to tear my face off
[14:47:11] yorickpeterse: what the hell is that
[14:47:14] mary5030: has joined #ruby
[14:47:26] [k-_: shevy: how do you like my code?
[14:47:36] [k-_: i wrote idiomatic code for once!
[14:47:39] Ox0dea: [k-_: Yeah, never mind. It's all in there, in one form or another.
[14:48:24] Ox0dea: It feels like C, though.
[14:48:51] rideh: has joined #ruby
[14:48:54] shevy: [k-_ I dunno... knowing that it originated from unicode, I don't like your code as a result now!
[14:48:59] [k-_: ruby is imperative ??\_(???)_/??
[14:49:29] [k-_: but i took effort to refactor it into sensible human readable code!
[14:49:41] shevy: at least Ox0dea's code was visually aesthetic, you could assume that it were greek code from 4000 years ago
[14:49:42] sshuff: has joined #ruby
[14:49:50] ytti: casual python hate
[14:49:51] [k-_: how dare you!
[14:49:57] shevy: yeah you could have done something else too like help me fix bugs!
[14:49:57] ytti: i often see python code written imperatively
[14:50:12] gregf_: wonder why someone would do 2&1<1 when 2%2 == 0 can be used :/
[14:50:16] ytti: even many experienced pythonists don't really capitalize on OO
[14:50:19] senayar: has joined #ruby
[14:50:19] senayar: has joined #ruby
[14:50:25] tubuliferous_: has joined #ruby
[14:50:26] dudedudeman: less things to type?
[14:50:27] ytti: but i very rarely see ruby code written like that
[14:50:33] shevy: they just get too annoyed about explicit self all the time
[14:50:46] ytti: and leaking variables all over the place
[14:50:46] bungoman: has joined #ruby
[14:50:54] Ox0dea: gregf_: Golfers would do that, for instance.
[14:51:06] shevy: obfuscaters!
[14:51:21] Ox0dea: Aesthetes.
[14:51:38] gregf_: cavedwellers
[14:51:39] [k-_: you discourage me to write readable code
[14:51:42] dudedudeman: code colf hurts my mind
[14:51:48] shevy: code calf?
[14:51:58] dudedudeman: cammit. gold*
[14:52:04] dudedudeman: ! dammint*** golf***
[14:52:07] Ox0dea: Gold calf?
[14:52:14] shevy: I'd code for gold
[14:52:20] [k-_: i'll transform it more then
[14:52:30] ytti: also i've not heard of rubyist turning to pythonist, voluntarily
[14:52:31] [k-_: Ox0dea's code is imperative anyway
[14:52:34] Ox0dea: [k-_: For what it is, it's quite nice.
[14:52:38] ytti: but i've seen pythonists embracing ruby
[14:52:39] eGGsha: has joined #ruby
[14:52:47] ytti: but they may be biased, they were weeboos
[14:52:53] shevy: ytti I read some blogger lately who went that route... not sure who it was... some guy who no longer cared about programming languages, I think he complained about Julia
[14:53:41] schaerli: has joined #ruby
[14:54:09] symbol: has joined #ruby
[14:57:48] sgambino: has joined #ruby
[14:57:49] ndrei: has joined #ruby
[14:58:10] mikepack: has joined #ruby
[14:59:26] werelivinginthef: has joined #ruby
[14:59:28] konsolebox: has joined #ruby
[15:00:27] dumdedum: has joined #ruby
[15:00:58] sharpmachine: has joined #ruby
[15:01:29] hfp: has joined #ruby
[15:01:59] hfp_work: has joined #ruby
[15:02:16] helloc: has joined #ruby
[15:02:35] edwinvdgraaf: has joined #ruby
[15:03:38] dfinninger: has joined #ruby
[15:03:57] dimasg: has joined #ruby
[15:07:58] Scroff: has joined #ruby
[15:09:03] [k-_: https://gist.github.com/SkyBirdSoar/4ef09497a83bf58aa0b9
[15:09:16] quimrstorres: has joined #ruby
[15:09:19] decoponio: has joined #ruby
[15:09:40] gamename: has joined #ruby
[15:09:41] [k-_: does this look nicer now
[15:09:51] ljarvis: nothing about that looks nice
[15:10:05] [k-_: you dont look nice either! :c
[15:10:07] Ox0dea: [k-_: Are you trying to take it from completely non-alphanumeric to completely alphanumeric?
[15:10:11] nobitanobi: has joined #ruby
[15:10:25] Ox0dea: ACTION is now wondering if it's possible to write Ruby without using symbols.
[15:10:30] Ox0dea: ACTION doubts it.
[15:10:40] platzhirsch: has joined #ruby
[15:11:00] yardenbar: has joined #ruby
[15:11:02] [k-_: . is a symbol
[15:11:06] [k-_: you dont have a chance
[15:11:52] symbol: has joined #ruby
[15:11:53] kies^: has joined #ruby
[15:12:09] livathinos: has joined #ruby
[15:13:09] OrbitalKitten: has joined #ruby
[15:13:35] dEPy: has joined #ruby
[15:13:38] Ox0dea: I got as far as `def send method proc do` before I needed the pipe. :/
[15:14:34] [k-_: ACTION nods
[15:15:05] [k-_: some code here
[15:15:05] Domon: has joined #ruby
[15:15:13] [k-_: oops forgot the tag
[15:15:18] [k-_: well whatever
[15:15:24] [k-_: then you can eval it!
[15:15:25] icebourg: has joined #ruby
[15:15:45] quimrstorres: has joined #ruby
[15:16:02] drewvanstone: has joined #ruby
[15:16:15] [k-_: you are wondering about possiblilty, im giving you an option!
[15:16:27] [k-_: also, do you know how Object#hash works?
[15:16:34] wordsarewind: has joined #ruby
[15:16:35] Ox0dea: It's different for different objects.
[15:16:37] revath: has joined #ruby
[15:17:08] ruurd: <[k-_> why ask if you can look at the code?
[15:17:43] [k-_: do you think i can read c?
[15:17:47] [k-_: because i cannot
[15:17:54] blue_deref: has joined #ruby
[15:18:38] Ox0dea: [k-_: It uses SipHash 2-4, if that helps any.
[15:18:56] charliesome: has joined #ruby
[15:19:34] milesmatthias: has joined #ruby
[15:20:25] jhack: has joined #ruby
[15:20:46] [k-_: at least i know it does :/
[15:20:51] Siyfion: has joined #ruby
[15:21:34] Ox0dea: For most objects, it seems #hash just uses SipHash on the actual bytes that represent the object in memory.
[15:21:59] gambl0re: has joined #ruby
[15:23:32] plsk: has joined #ruby
[15:23:33] saadq: has joined #ruby
[15:23:55] sharpmachine: has joined #ruby
[15:25:16] MrJiks_: has joined #ruby
[15:25:44] Marsupermammal: has joined #ruby
[15:26:36] dfinninger: has joined #ruby
[15:27:11] psy: has joined #ruby
[15:27:52] platzhirsch: has left #ruby: ()
[15:27:58] psy: has joined #ruby
[15:29:19] rcvalle: has joined #ruby
[15:30:39] OrbitalKitten: has joined #ruby
[15:30:50] rippa: has joined #ruby
[15:30:55] havenwood: has joined #ruby
[15:31:04] bruno-: has joined #ruby
[15:31:24] leonardoajim: has joined #ruby
[15:32:30] ruby-lang812: has joined #ruby
[15:32:35] tmtwd: has joined #ruby
[15:32:46] grizzlybair: has joined #ruby
[15:33:27] Scrofff: has joined #ruby
[15:35:21] riotjones: has joined #ruby
[15:35:36] Polysics_: has joined #ruby
[15:35:49] bungoman: has joined #ruby
[15:35:56] devbug: has joined #ruby
[15:36:07] freerobby1: has joined #ruby
[15:37:11] Channel6: has joined #ruby
[15:37:17] jobewan: has joined #ruby
[15:37:22] edwinvdgraaf: has joined #ruby
[15:38:13] edwinvdg_: has joined #ruby
[15:40:19] Sheperson: has joined #ruby
[15:41:25] blackmes1: has joined #ruby
[15:42:08] tmtwd: \join #atom
[15:42:30] Sheperson: I think that is /join
[15:42:55] [k-_: how do you even...
[15:42:59] adaedra: but you need the join package for that
[15:43:02] alakra: has joined #ruby
[15:43:18] Ox0dea: /join #even
[15:43:31] adaedra: [k-_: i think / and \ are close on some keyboards.
[15:43:50] phreakocious: another question, if I may.. is it possible to set the name of a thread that will appear in ps/top? $0 changes the main process and all threads show that.
[15:44:05] bronson: has joined #ruby
[15:44:06] phreakocious: google has not been helpful
[15:44:11] rippa: has joined #ruby
[15:44:46] Freijo: has joined #ruby
[15:44:56] Ox0dea: phreakocious: Does Process.setproctitle not suit your needs?
[15:45:15] devdazed: has joined #ruby
[15:45:18] dfockler: has joined #ruby
[15:45:23] edwinvdgraaf: has joined #ruby
[15:45:30] adaedra: ninja'd again
[15:45:32] phreakocious: ah ruby 2.1 :( that might work, though
[15:46:10] Ox0dea: phreakocious: If you're actually wanting to name your threads, Thread#name= went into Ruby 2.3 on June 13.
[15:46:11] havenwood: phreakocious: Thread#name and Thread#name= will land in 2.3.
[15:46:11] pecopeco: has joined #ruby
[15:46:13] iloverubynoob: has joined #ruby
[15:46:14] adaedra: it's no problem, since everyone is under ruby 2.2, no? O:)
[15:46:25] havenwood: phreakocious: https://bugs.ruby-lang.org/issues/11251
[15:46:27] phreakocious: ah very nice. Thanks again
[15:46:33] havenwood: phreakocious: https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1444
[15:46:59] phreakocious: I would like to be on 2.2, but this is not an easy thing :)
[15:47:09] jamesaxl: has joined #ruby
[15:48:24] wordsarewind: has left #ruby: ("WeeChat 1.2")
[15:48:24] dfockler: has joined #ruby
[15:48:25] towski_: has joined #ruby
[15:48:56] elia: has joined #ruby
[15:49:47] davejlong: has joined #ruby
[15:49:48] Oka: has joined #ruby
[15:51:48] radialneon: has joined #ruby
[15:52:10] [k-_: you guys are so updated!
[15:52:34] davedev24: has joined #ruby
[15:52:52] Sheperson: Yes they are!
[15:53:14] t0rrieri: has joined #ruby
[15:53:24] Sheperson: I think they contribute to Ruby
[15:54:00] [k-_: well they do submit feature requests and issues from time to time
[15:54:01] jhack: has joined #ruby
[15:54:11] aspiers: has joined #ruby
[15:54:41] willywos: has joined #ruby
[15:55:01] LoBoGoL: has joined #ruby
[15:55:02] shevy: long live ruby 2.3!
[15:55:24] griffindy: has joined #ruby
[15:55:27] [k-_: suggestions on readme: https://github.com/SkyBirdSoar/libobf
[15:55:38] jaygen_: has joined #ruby
[15:55:38] Pathfinder: has joined #ruby
[15:55:49] scottschecter: has joined #ruby
[15:56:11] Ox0dea: [k-_: FWOOD?
[15:56:12] shevy: remove project
[15:56:31] [k-_: nah, im continuing it
[15:56:42] shevy: "If you are lazy, you can also just map(&:$-o[?:]) over m"
[15:56:59] [k-_: that's pretty much what i did
[15:57:10] [k-_: it is a verbosity adder afterall
[15:59:22] tkuchiki: has joined #ruby
[15:59:36] ndrei: has joined #ruby
[16:00:57] Igorshp: has joined #ruby
[16:01:15] Ox0dea: [k-_: Why's the tagline title-cased if it's not supposed to be an acronym?
[16:01:23] momomomomo: has joined #ruby
[16:01:43] [k-_: because it looks better & adds professionalism?
[16:01:57] dfinninger: has joined #ruby
[16:01:58] radialneon: has joined #ruby
[16:02:20] [k-_: i need to somehow reduce verbosity
[16:02:34] plashchynski: has joined #ruby
[16:02:37] ljarvis: there is no professionalism here
[16:02:43] Ox0dea: [k-_: Ah, I suppose I ought to've gathered that from the ???.
[16:02:44] dfockler: Because It Looks Better & Adds Professionalism???
[16:02:54] Ox0dea: dfockler: BILBAP?
[16:03:06] momomomomo: has joined #ruby
[16:03:20] senayar: has joined #ruby
[16:03:42] Igorshp: has joined #ruby
[16:03:45] senayar: has joined #ruby
[16:04:37] dimasg: has joined #ruby
[16:04:40] rideh: has joined #ruby
[16:04:46] paulcsmith: has joined #ruby
[16:05:06] podman: has joined #ruby
[16:05:45] [k-_: i was thinking Obfuscate { |o| alphanum methods available here }
[16:05:59] charliesome: has joined #ruby
[16:06:03] senayar: has joined #ruby
[16:06:48] [k-_: and a .call so $-o.(?.,->{...})
[16:06:59] momomomomo: has joined #ruby
[16:07:05] yeticry: has joined #ruby
[16:08:44] jwaldrip: has joined #ruby
[16:08:52] atomical: has joined #ruby
[16:09:29] k3asd`: has joined #ruby
[16:09:48] [k-_: i should number them off
[16:09:54] amclain: has joined #ruby
[16:10:17] Ox0dea: Or construct an encoding.
[16:10:32] Marsupermammal: has joined #ruby
[16:10:52] [k-_: that defeats the purpose!
[16:11:41] Ox0dea: Of obfuscation?
[16:13:19] Ox0dea: There are 33 non-control, non-alphanumeric ASCII characters. That's 1089 distinct pairs you could map to various things.
[16:14:26] niemcu: has joined #ruby
[16:14:40] failshell: has joined #ruby
[16:14:57] [k-_: but i wouldn't be able to use them in a block to reduce verbosity
[16:15:38] Ox0dea: Are you using _ for anything?
[16:15:58] astrobun_: has joined #ruby
[16:16:01] Ox0dea: Make it a method on Kernel. :)
[16:16:02] rapha: has joined #ruby
[16:18:14] poguez_: has joined #ruby
[16:18:24] rapha: Given {a => {x => [1, 2, 3], y => [1, 2]}, b => {x => [1], y => [1, 2, 3, 4]}}, is there any elegant way of counting the number of things inside all x's and y's? (i.e., x:4, y:6 in this case)
[16:18:25] Marsupermammal: has joined #ruby
[16:18:59] l0oky: has joined #ruby
[16:19:26] bricker: has joined #ruby
[16:20:25] l0oky: I have this hash process[:error] = [{:code=>"10415", :messages=>["Transaction refused because of an invalid argument. See additional error messages for details.", "A successful transaction has already been completed for this token."]}] How do I select the second message? I tried this process[:error][0][:messages][1]
[16:21:07] Ox0dea: l0oky: That should work.
[16:21:25] Scroff: has joined #ruby
[16:21:40] l0oky: I get no implicit conversion of Symbol into Integer
[16:22:37] nobitano_: has joined #ruby
[16:23:13] Ox0dea: l0oky: Then you've provided insufficient information to diagnose your problem.
[16:23:15] Ox0dea: >> process = {}; process[:error] = [{:code=>"10415", :messages=>["msg1", "msg2"]}]; process[:error][0][:messages][1]
[16:23:16] ruboto: Ox0dea # => "msg2" (https://eval.in/400218)
[16:23:57] graydot: has joined #ruby
[16:24:07] jwaldrip: has joined #ruby
[16:24:12] teotwaki: has joined #ruby
[16:24:14] l0oky: process is a method that returns hash return {:success => false, :error => ex.message}
[16:24:48] Ox0dea: The point stands.
[16:24:49] benlieb: has joined #ruby
[16:24:50] wildroman2: has joined #ruby
[16:24:55] psye: has joined #ruby
[16:24:58] acke: has joined #ruby
[16:25:23] l0oky: What should I give you ? I really don't know what's causing this problem.
[16:26:17] Ox0dea: l0oky: Does process[:error] contain the data you originally posted, or does it contain an exception message?
[16:26:43] astrobun_: has joined #ruby
[16:26:44] l0oky: ex.message is that data I originally posted
[16:27:06] l0oky: Array of hashes
[16:27:23] blackmes1: has joined #ruby
[16:28:14] Ox0dea: >> Exception.new([1, 2, 3]).message
[16:28:15] ruboto: Ox0dea # => "[1, 2, 3]" (https://eval.in/400219)
[16:28:24] Ox0dea: l0oky: Do you see the problem?
[16:28:39] l0oky: is exception message a hash at all?
[16:28:44] Ox0dea: It is not.
[16:28:48] Ox0dea: It's being converted to a string.
[16:29:11] astrobun_: has joined #ruby
[16:29:43] l0oky: what can I do is there a to_hash method?
[16:30:06] Ox0dea: Well, an exception's message really ought to be a string anyway.
[16:30:24] Ox0dea: If you simply *must* put an array of hashes in your exception message, you're going to need to use eval to pull it back out.
[16:30:42] l0oky: that looks bad practice
[16:30:46] Ox0dea: It's terrible.
[16:30:57] l0oky: ill do a to_json then
[16:31:04] l0oky: or something :D
[16:31:16] Ox0dea: You'll lose your Symbols that way.
[16:32:05] Ox0dea: rapha: Hash#merge takes an optional block that can be used for handling merge conflicts.
[16:32:06] jhass: l0oky: stop. you're trying to solve this at the wrong point. What is giving that datastructure as exception message? (=who's raising it)
[16:32:27] l0oky: my process method
[16:32:47] jhass: and why don't you put the message you want there?
[16:32:57] jhass: why do you pass the datastructure?
[16:33:01] havenwood: rapha: Not elegant, but here's a start: inject { |h1, h2| h1.merge(h2) { |_, h1_values, h2_values| h1_values.size + h2_values.size } }
[16:33:33] havenwood: >> [{:x=>[1, 2, 3], :y=>[1, 2]}, {:x=>[1], :y=>[1, 2, 3, 4]}].inject { |h1, h2| h1.merge(h2) { |_, h1_values, h2_values| h1_values.size + h2_values.size } }
[16:33:34] ruboto: havenwood # => {:x=>4, :y=>6} (https://eval.in/400220)
[16:34:19] l0oky: I am using RoR so I want to pass the ex.message to a toast that means redirecting user with ex.message as a parameter
[16:34:27] baweaver: has joined #ruby
[16:34:47] l0oky: Anyway I need to pass that datastucture throug..
[16:35:00] pietr0: has joined #ruby
[16:35:13] jwaldrip_: has joined #ruby
[16:35:25] havenwood: rapha: That version ^ does work if there are more than two Hashes in the Array though. :)
[16:35:26] Ilyas: has joined #ruby
[16:35:54] havenwood: So that's nice if it might happen.
[16:36:38] havenwood: ?rails l0oky
[16:36:38] ruboto: l0oky, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[16:37:12] l0oky: havenwood: I am not talking about rubyonrails just plain ruby? not am I?
[16:37:16] Casty: has joined #ruby
[16:37:17] RobertBirnie: has joined #ruby
[16:37:19] havenwood: l0oky: What's a toast?
[16:37:20] dseitz: has joined #ruby
[16:37:21] shinnya: has joined #ruby
[16:37:30] l0oky: seriously?
[16:37:34] wookiehangover: has joined #ruby
[16:37:51] gagrio: has joined #ruby
[16:38:15] l0oky: It's like a popup If you ever seen a mac you should know what that is
[16:38:39] tubuliferous_: has joined #ruby
[16:38:42] havenwood: l0oky: Oh, gui terminology?
[16:39:00] Ox0dea: Just UI, really.
[16:39:04] havenwood: l0oky: I assumed Rails had toast... :P
[16:39:06] Ox0dea: You could totally have toasts in your terminal.
[16:39:15] pecopeco: has joined #ruby
[16:39:15] iloverubynoob: has joined #ruby
[16:39:15] havenwood: ActiveToast
[16:39:36] l0oky: nah, its my js messaging for user anyways we aren't talking about ror
[16:41:00] sharpmachine: has joined #ruby
[16:41:19] havenwood: l0oky: Maybe I'm wrong to point to #RubyOnRails here then. Often there's a Rails way though.
[16:41:41] diegoviola: has joined #ruby
[16:42:19] shevy: most epic question today
[16:42:19] l0oky: I always go to #RubyOnRails first though.. :)
[16:42:20] shevy: <havenwood> l0oky: What's a toast?
[16:42:54] havenwood: shevy: Hey, I'm just having coffee... I'm slow at the moment.
[16:42:58] NeverDie: has joined #ruby
[16:43:03] rapha: havenwood: you mean as opposed to a solution with Hash#merge like 0x0dea suggested?
[16:43:10] Ox0dea: rapha: He's using Hash#merge.
[16:43:13] l0oky: shevy: RoR thing for my app If you want to know more we can talk about it at #RubyOnRails
[16:43:28] havenwood: rapha: I showed what Ox0dea suggested, yeah.
[16:43:41] havenwood: rapha: Give that a try! :)
[16:43:46] rapha: havenwood: nevermind, you do use merge :-P
[16:44:04] rapha: Ox0dea: sorry, didn't read properly at first!
[16:44:05] Agoldfish: has joined #ruby
[16:44:07] Ox0dea: No worries.
[16:44:18] Ox0dea: rapha: Are a and b distinct objects, or are they actually keys in a surrounding hash?
[16:44:37] l0oky: I am using a library that passes ex.message as a hash, but... It's a string to makes me troubles...
[16:45:02] Ox0dea: l0oky: Which library is that, if you don't mind?
[16:45:17] rapha: Ox0dea: the latter! Also for some reason havenwood's solution doesn't work right out of the box with my real-world object for some reason, trying to adapt it...
[16:45:17] l0oky: paypal-reccurring gem
[16:45:34] Ox0dea: rapha: havenwood's solution is for an array of hashes.
[16:45:52] TvL2386: has joined #ruby
[16:46:20] rapha: Ox0dea: yes, mine is a bit different ... this is what the object looks like right now. https://gist.github.com/sixtyfive/dab7daf5cfcd34c3d641
[16:46:39] Spami: has joined #ruby
[16:47:12] nahtnam: has joined #ruby
[16:47:17] ton31337: has left #ruby: ()
[16:47:19] [Butch]: has joined #ruby
[16:47:39] l0oky: so my only way through is using eval?!
[16:47:46] l0oky: That looks terrible...
[16:47:51] havenwood: rapha: just add a: .values
[16:47:54] havenwood: rapha: to the start
[16:47:56] Ox0dea: l0oky: No, you're just not using the library correctly.
[16:48:03] havenwood: >> {"v"=>{"I"=>["??????", "??????", "??????", "????????", "??????", "??????", "??????", "??????", "??????", "??????", "??????", "????????", "??????", "??????", "??????", "????????", "??????", "??????", "??????", "??????", "??????", "????????", "????????", "??????", "????????", "??????????", "????????", "????????", "??????", "????????", "????????", "????????", "????????", "??????????", "????????", "
[16:48:04] ruboto: havenwood # => /tmp/execpad-1311776060b3/source-1311776060b3:5: syntax error, unexpected tGVAR, expecting ']' ...check link for more (https://eval.in/400225)
[16:48:05] havenwood: ????????", "????????", "????????", "????????????", "??????", "??????????", "??????", "??????", "????????", "????????", "??????", "????????", "????????", "??????", "????????", "??????", "????????", "??????", "????????", "????????", "????????", "????????", "????????", "????????"], "II"=>["????", "??????", "??????", "??????????", "??????", "??????", "????????", "????", "????????", "????????", "????????
[16:48:05] havenwood: ", "????????", "????????", "??????????", "????????", "??????", "??????", "??????????", "??????", "??????", "????????", "????"], "III"=>["????????", "??????????", "??????", "??????????", "??????????"], "IV"=>["??????????????", "??????????", "????????", "????????"], "V"=>["????????????", "??????????", "??????????", "??????????", "????????", "????????", "??????????", "??????????"], "VI"=>["??????????
[16:48:06] l0oky: How do you know?
[16:48:06] bb010g: has joined #ruby
[16:48:07] havenwood: ", "????????????", "????????????"], "VII"=>[], "VIII"=>["??????????", "??????????", "??????????", "??????????", "??????????", "??????????"], "IX"=>[], "X"=>["????????????????", "??????????????", "??????????", "??????????"]}, "pp"=>{"I"=>[], "II"=>["????????????", "????????", "??????????"], "III"=>["??????????"], "IV"=>[], "V"=>[], "VI"=>[], "VII"=>[], "VIII"=>["??????????"], "IX"=>[], "X"=>[]}, "ap"=>{"I"=>["
[16:48:07] havenwood: ????????", "????????", "??????????", "????????", "????????"], "II"=>["????????"], "III"=>[], "IV"=>["????????", "????????"], "V"=>[], "VI"=>[], "VII"=>[], "VIII"=>[], "IX"=>[], "X"=>[]}}.values.inject { |h1, h2| h1.merge(h2) { |_, h1_values, h2_values| h1_values.size + h2_values.size } }
[16:48:12] havenwood: Didn't realize how long that was, yikes.
[16:48:23] l0oky: havenwood: gist.github.com
[16:48:44] havenwood: l0oky: values.inject { |h1, h2| h1.merge(h2) { |_, h1_values, h2_values| h1_values.size + h2_values.size } }
[16:49:06] shevy: you need more coffee!
[16:49:08] gregf_: rapha: O_o
[16:49:14] gregf_: oops sorry ;/
[16:49:20] allomov: has joined #ruby
[16:49:20] havenwood: shevy: Yeah, muting myself until two more cups consumed!
[16:49:42] Ox0dea: l0oky: paypal-recurring returns that data structure from Response::Base#errors, but it's not setting it as the message of an exception anywhere.
[16:50:09] tvw: has joined #ruby
[16:50:24] cochise: has joined #ruby
[16:50:46] l0oky: Ox0dea: What kid of exception does PaypalPayment.new(self).make_recurring return?
[16:51:41] pengin: has joined #ruby
[16:51:48] Igorshp: has joined #ruby
[16:52:19] rapha: havenwood: wow, can't believe you actually pasted that hahahahhah :-P
[16:52:26] l0oky: because the ex.message It's returning is a string not a hash ( As you've pointed out )
[16:52:30] Ox0dea: l0oky: `grep -R PaypalPayment paypal-recurring-1.1.0` finds no such occurrences.
[16:52:46] rapha: shevy: or he needs *less* coffee ;)
[16:53:06] BeepDog: has left #ruby: ()
[16:53:22] l0oky: havenwood: Is that arabic? :D
[16:53:47] Igorshp: has joined #ruby
[16:53:53] l0oky: Ox0dea: whats grep?
[16:53:57] rapha: l0oky: yeah, it's Arabic ... I'm doing some word frequency analysis.
[16:54:01] shevy: grep finds strings in files
[16:54:21] shevy: so he searches for a keyword there
[16:54:51] davejlong: has joined #ruby
[16:55:02] rapha: havenwood: it returns wrong counts though ... strange.
[16:55:15] l0oky: Ox0dea: Uh Oh that's my object sorry
[16:55:28] blackmes1: has joined #ruby
[16:55:30] peter_paule: has joined #ruby
[16:55:45] l0oky: PayPal::Recurring.new(self).make_recurring
[16:55:53] spider-mario: has joined #ruby
[16:55:55] sharpmachine: has joined #ruby
[16:55:57] l0oky: That's more like it. I guess
[16:55:57] rapha: havenwood: is it possible that I need one "h" for each of the roman numbers?
[16:56:16] fgo: has joined #ruby
[16:56:39] l0oky: rapha: letter frequency analysis? cool!
[16:57:47] havenwood: rapha: My stab at it was for the values from your initial example. Now that you've shown the real input, add a file to that gist with the return value you want to get.
[16:57:55] l0oky: It's a bit different with arabic letters though, I guess. is it? You can say one thing in many ways.
[16:57:55] cpruitt: has left #ruby: ()
[16:58:02] howdoicomputer: has joined #ruby
[16:58:03] rapha: l0oky: words! not letters!
[16:58:13] davejlong: has joined #ruby
[16:58:23] havenwood: l0oky: maybe some Persian words as well?
[16:58:31] rapha: l0oky: well, you can do that in any language. it's just that arabic is especially bad. i'm lucky because my corpus is quite small (1400 words) so i can do a lot of things manually.
[16:58:55] zacstewart: has joined #ruby
[16:58:55] bodzio: has joined #ruby
[16:58:57] havenwood: shevy: here I am talking after only one cup... but i'm being careful ;)
[16:59:12] rapha: l0oky: actually, the bad thing is that a lot of words can mean many different things depending on context. that's what really kills you.
[16:59:20] l0oky: rapha: It's a nightmare for developers I know that. But the language It self is beautiful
[16:59:31] webopsx: has joined #ruby
[16:59:35] momomomomo: has joined #ruby
[16:59:51] Hanmac: shevy i did even more stuff for rwx, check it out ;P
[17:00:04] Ox0dea: l0oky: Paypal::Recurring.new expects an options hash.
[17:00:19] rapha: havenwood: yes, i see now ... the initial example input was wrong. let me play with your code some more, though, maybe i can figure out how it works.
[17:00:29] l0oky: Ox0dea: Yes I pass options and do a .send(action)
[17:00:50] l0oky: PayPal::Recurring.new(options).send(action).errors
[17:01:18] Ox0dea: l0oky: Yes, that's how you get that data structure from earlier.
[17:01:33] malconis: has joined #ruby
[17:01:38] Ox0dea: How does it end up in an exception message?
[17:01:42] rapha: l0oky: actually, just handling arabic is actually quite okay these days if you know what you're doing. what is making people's heads spin is how to do natural language processing on it. the language is too polysemantic for that to be easy by even the most awful definition of easy.
[17:01:47] edwinvdgraaf: has joined #ruby
[17:02:04] l0oky: I do a raise response.errors.inspect HAHAHAHAHHAHA
[17:02:14] rapha: l0oky: and btw i'm using Ruby for my scripting because it's so awesome at handling Unicode ;)
[17:02:15] l0oky: there lays a problem
[17:02:20] Ox0dea: Aye, there it is.
[17:02:22] jackjackdripper: has joined #ruby
[17:02:27] eggoez: has joined #ruby
[17:02:31] l0oky: Ox0dea: thanks ;)
[17:02:34] Ox0dea: Sure thing.
[17:02:46] malconis: has joined #ruby
[17:02:57] Ox0dea: rapha: Except we still don't have named Unicode literals.
[17:03:03] rehat_: has joined #ruby
[17:03:09] lala: has joined #ruby
[17:03:21] lkba: has joined #ruby
[17:03:52] benlieb: has joined #ruby
[17:03:53] jwaldrip_: has joined #ruby
[17:03:57] rapha: Ox0dea: seems like a pet peeve of yours ... when I google that term, your github repo gets the top hit! :)
[17:04:05] Ox0dea: Fancy that.
[17:04:22] l0oky: rapha: That's right haha. But that's why the language is so rich. If they make NLP for that language I guess they might just make a real AI with it haha
[17:04:39] rapha: Ox0dea: (i do wonder, how many of these named literals do you know by heart :P)
[17:05:04] Ox0dea: rapha: There's a reasonably intuitive pattern to most of the groups.
[17:05:19] desigx: has joined #ruby
[17:05:47] ryba: has joined #ruby
[17:06:35] rapha: l0oky: i wouldn't be at all surprised if serious development would come from that direction some day. arabic is very interesting also because some aspects of its grammar are almost mathematical. that means you can actually parse it relatively easily into a state where you can clearly assign a list of possible meanings to every part of speech.
[17:07:05] graydot: has joined #ruby
[17:07:13] Muhannad: has joined #ruby
[17:07:44] l0oky: rapha: Yeah you mean the assignment of numerical values for each letter, I researched that a bit :)
[17:07:58] rickmasta: has joined #ruby
[17:08:30] l0oky: rapha: I was planning to study arabic language next year, that's why I show so much interest in it hehe :)
[17:08:56] Jackneill: has joined #ruby
[17:09:33] momomomomo: has joined #ruby
[17:09:48] fabrice31: has joined #ruby
[17:10:29] Ox0dea: l0oky: Greek calls that "isopsephy", and Hebrew "Gematria"; what's it called in Arabic?
[17:10:46] towski_: has joined #ruby
[17:10:49] Ox0dea: Or is it not quite the same thing?
[17:11:33] rbennacer: has joined #ruby
[17:13:30] charliesome: has joined #ruby
[17:13:36] rapha: Ox0dea: does your project work for stuff like http://unicodelookup.com/#%D9%89/1? just uppercase the name and off you go?
[17:13:46] l0oky: Ox0dea: Something like that. Abajad numberals
[17:14:07] djbkd: has joined #ruby
[17:14:12] sharpmachine: has joined #ruby
[17:14:18] ixti: has joined #ruby
[17:15:02] ndrei: has joined #ruby
[17:15:08] Ox0dea: rapha: Yes, that's right, although I had to make a few concessions regarding hyphens.
[17:15:09] rapha: l0oky: nah, that's an old thing which we also had in most western languages. what i meant was that almost all arabic words are constructed by laying a pattern over three or four root radicals.
[17:15:22] Ox0dea: kitab, katib, maktaba.
[17:15:42] rapha: yeah, that
[17:16:00] Ox0dea: "Root" is probably better than "radical" for that, I think.
[17:16:22] rapha: wow, you guys know a lot more than the "so they teach you how to build bombs at university, mwahahahah" folks i usually meet :P
[17:16:56] aytch: has joined #ruby
[17:17:02] rapha: Ox0dea: it's fixed terminology. the root is k-t-b with radical 1 being k, r2 t, r3 b.
[17:17:51] rapha: l0oky: if you wanna begin studying it at a university level, you're in for a wild ride!
[17:17:57] l0oky: so If I were to pronouce your nickname it would be rpa?
[17:18:00] tubuliferous_: has joined #ruby
[17:18:11] l0oky: uh I know right
[17:18:36] l0oky: It is at a university level
[17:18:59] l0oky: They don't require for you to know anything though
[17:19:08] l0oky: from 0 to hero :D
[17:19:37] aryaching: has joined #ruby
[17:19:54] rapha: l0oky: as the ph in my nickname is actually a single phoneme ("f") it would be r-ph (there are few 2-radical words, which are said to be the oldest words in arabic)
[17:19:57] [k-_: so i have method = { method1: *blah*, method2: method[:method1] } and ruby cries
[17:20:02] [k-_: how shall i do this
[17:20:04] l0oky: i figured
[17:20:10] devdazed: has joined #ruby
[17:20:15] Antiarc: has joined #ruby
[17:20:17] miah: has joined #ruby
[17:20:20] Ox0dea: [k-_: Well, what's *blah*?
[17:20:28] bronson: has joined #ruby
[17:20:34] PaulCapestany: has joined #ruby
[17:20:36] phreakocious: has joined #ruby
[17:20:56] Hamled: has joined #ruby
[17:21:01] retornam_: has joined #ruby
[17:21:05] Ox0dea: Oh, never mind. You'll have to build the hash incrementally. :(
[17:21:05] sivoais: has joined #ruby
[17:21:08] drewdavis: has joined #ruby
[17:21:12] rapha: l0oky: here, they give you 2 weeks per lesson and expect you to know everything afterwards. the bachelor is 3 years but it took me 5, and i'm one of the 30 out of 300 who didn't drop out... not sure how big the variation is from university to university.
[17:21:14] papercode: has joined #ruby
[17:21:16] bmn_: has joined #ruby
[17:21:18] [k-_: ->_,*__,&___{____=__.shift;___=__.pop if (!block_given? and __.last.to_proc rescue false);_.public_send ____, *__, &___}
[17:21:43] Rubie: has joined #ruby
[17:22:00] RobertBirnie: has joined #ruby
[17:22:03] l0oky: Well I am not a native speaker I guess they'll go easier on me :P
[17:22:37] plashchynski: has joined #ruby
[17:22:43] rapha: l0oky: also note that short vowels are never radicals, only long vowels are. so the problem with a western nickname like "rapha" is that you can't know what vowels are long. the full name ("raphael") would have been easier: it's r-ph-l there.
[17:23:19] [k-_: oh, incrementally.
[17:23:25] [k-_: thx Ox0dea :(
[17:23:25] eggoez: has joined #ruby
[17:23:31] rapha: l0oky: i'm not a native speaker, either. it doesn't matter much, though. the native speakers have a hard time, too, because noone in the world is a native speaker of Modern Standard Arabic, they all speak one dialect or another.
[17:23:49] Ox0dea: [k-_: That does seem like it shouldn't be so. :(
[17:23:55] l0oky: yeah dialects
[17:24:00] l0oky: good point :D
[17:24:46] gambl0re: has joined #ruby
[17:25:03] Ox0dea: >> proc { |hash| {a: -> x { x + 1}, b: hash[:a] } }[Hash.new] # [k-_
[17:25:04] ruboto: Ox0dea # => {:a=>#<Proc:0x41b0fe64@/tmp/execpad-d17fb20d5e37/source-d17fb20d5e37:2 (lambda)>, :b=>nil} (https://eval.in/400235)
[17:25:21] michael_imac: has joined #ruby
[17:25:36] jenksy: has joined #ruby
[17:25:42] Ox0dea: Hash literals are constructed "in parallel".
[17:25:46] rapha: l0oky: if you want one tip, decide on *one* dialect to specialise in as soon as you can and then stick to it and make sure you always know when you're in your dialect and when you're in MSA. the professors might tell you to stay away from dialects completely, but that's pure academic phantasy and has nothing to do with real life.
[17:26:16] Ox0dea: rapha: PSO player?
[17:26:58] rapha: Ox0dea: since I don't know what that is, no.
[17:27:08] Ox0dea: Ah, I thought "phantasy" might've been a slip.
[17:28:14] l0oky: rapha: Yeah, is there a big difference in dialects? Maybe some words are almost the same
[17:28:21] benlieb: has joined #ruby
[17:28:29] akkad: has joined #ruby
[17:28:31] linuxboytoo: has joined #ruby
[17:28:37] rapha: Ox0dea: oh right! it's fantasy in English. it was a slip, but a different one ;)
[17:29:16] l0oky: phantastic :D
[17:29:23] allcentury: has joined #ruby
[17:29:27] aryaching: has joined #ruby
[17:29:53] rideh: has joined #ruby
[17:30:23] Hanmac: l0oky: like in a country like germany you have many different dialects and sometimes they are such strong that two different cant understand each other ;P
[17:30:30] rapha: l0oky: "no problem" is a good example. MSA: "l?? t????ad mu??kile". Egyptian: "m?? f???? mu??kila". Most Levantene dialects: "mi?? mu??kile". Most Gulf dialects: "m?? mu??kila".
[17:30:48] rapha: l0oky: of course, that
[17:30:51] bubbys: has joined #ruby
[17:30:58] rapha: 's nothing compared with the 100+ words for "lion"
[17:31:23] rapha: asd would again be the root
[17:31:29] rapha: but that's just the most commonly used one
[17:31:53] rapha: l0oky: did you know that the name of the guy's wife is really close to "chaos"?
[17:32:11] postmodern: has joined #ruby
[17:32:34] drewo: has joined #ruby
[17:32:46] rapha: l0oky: "asma al-asad" ... chaos is "azma", just a softer s/z sound.
[17:33:30] godzillaenlacasa: has joined #ruby
[17:33:34] l0oky: It might implicate a contrast where asma is completly different from azma ?
[17:33:57] Hanmac: ACTION is voting for a president with the name "chaos" ... what chould go wrong? ;P
[17:34:03] l0oky: So It's just the sound
[17:34:50] rapha: l0oky: nah, it becomes more distinct once we write proper MSA transliteration. her name is "??asm????", lit. "names", whereas "??azma" is a feminine noun built off the root ??-z-m. there's actually really little similarity here.
[17:35:20] benlieb: has joined #ruby
[17:35:31] rapha: (just enough for it to have become some sort of running gag amongst arabists)
[17:35:53] jhass: rapha: l0oky: I think you might enjoy our offtopic channel #ruby-offtopic
[17:36:01] l0oky: rapha: So what dialect is closest to root words? I guess beginners would start learning root words first then more complex dialects
[17:36:16] l0oky: jhass: Yeah sorry
[17:36:24] l0oky: a bit carried away :D
[17:36:33] blackmes1: has joined #ruby
[17:37:23] rapha: jhass: sorry
[17:38:00] l0oky: rapha: nice to meet you anyways :P
[17:38:05] jhass: don't be sorry, just join there!
[17:38:41] bungoman: has joined #ruby
[17:38:48] l0oky: jhass: We got the message? You don't need to be all steve jobs on me :P
[17:39:04] jhass: you did, rapha I'm not so sure :P
[17:39:26] davejlong: has joined #ruby
[17:39:32] Marsupermammal: has joined #ruby
[17:39:32] rapha: l0oky: every native speaker will tell you his own dialect is closest. the truth is they all have some elements close to it and some farther away. i'd recommend to make your decision based on the political situation to make it easier to visit. anyways, i'll shut up now so jhass doesn't get the /kick hammer out and also i need to keep working!
[17:40:02] [k-_: i give up
[17:40:03] l0oky: Yeah me too :P
[17:40:10] astrobun_: has joined #ruby
[17:40:20] [k-_: i watched sublime text rewind my whole progress
[17:40:20] devbug: has joined #ruby
[17:40:32] Ox0dea: Vim would've saved you.
[17:40:33] [k-_: im surprised it kept my whole history
[17:41:00] l0oky: Ox0dea: Vim has a learning curve
[17:41:05] [k-_: no, i purposely pressed cmd+z until it went back to the start of time
[17:41:12] _dev0urer: has joined #ruby
[17:41:13] l0oky: I was afraid I would fall so I didn't use Vim :D
[17:41:21] Ox0dea: [k-_: Looking for when you introduced some error, or?
[17:41:48] weaksauce: l0oky the basics of vim are pretty easy to learn in a few minutes.
[17:42:09] weaksauce: enough to get you competent enough to edit a basic file
[17:42:22] [k-_: i gave up on the approach and let sublime text destroy it!
[17:42:34] [k-_: i watched what i did on fast mode
[17:42:59] l0oky: weaksauce: yeah.. you're probablly right but I don't want to run it on glitchy cygwin :P
[17:43:16] l0oky: If I ever get a mac I'll use it
[17:44:53] skade: has joined #ruby
[17:45:22] mikecmpbll: has joined #ruby
[17:45:36] weaksauce: i imagine they have a vim dist that runs on windows. not nearly as good a gui as macvim though.
[17:45:59] blaines: has joined #ruby
[17:46:01] mike___1234: has joined #ruby
[17:46:32] bungoman: has joined #ruby
[17:46:38] weaksauce: sublime is pretty good too though. emacs with evil mode might be a good option
[17:46:53] whiteline: has joined #ruby
[17:47:47] [k-_: --terminated from history--
[17:47:49] Obfuscate: has joined #ruby
[17:47:55] [k-_: i even created a new branch ._.
[17:48:04] troulouliou_div2: has joined #ruby
[17:48:12] [k-_: if only there was an easy way of doing things
[17:48:35] atomi: has joined #ruby
[17:48:39] [k-_: i totally lost motivation :(
[17:49:20] jhass: [k-_: do something nice instead then :P
[17:49:44] MagePsycho: has joined #ruby
[17:49:46] l0oky: [k-_: I feel you :(
[17:49:53] [k-_: i lost motivation for ruby
[17:50:11] l0oky: I recommend RubyMine then :P
[17:50:14] shevy: [k-_ you must create useful projects!
[17:50:15] Violentr: has joined #ruby
[17:50:27] l0oky: jetbrains IDE I use to be productive
[17:50:33] jottr_: has joined #ruby
[17:50:35] [k-_: i dont need an ide for ruby
[17:51:08] l0oky: Yeah It's clear you haven't tried this one :P
[17:51:10] grill: what does someword::init_gem node mean?
[17:51:19] grill: what is this syntax?
[17:51:32] ruboto: We can't help you without your code, please post it to https://gist.github.com
[17:51:40] jhass: grill: a sad one. :: can used to call a method, but someword.init_gem would be better
[17:51:41] l0oky: [k-_: Give ruby a day off then come back :D
[17:51:55] jpfuentes2: has joined #ruby
[17:51:56] [k-_: a day may not be enough
[17:51:56] LoBoGoL: has joined #ruby
[17:52:08] grill: so :: is functionally equivalent to .?
[17:52:15] [k-_: i'll just look at Ox0dea's code and learn
[17:52:22] jhass: grill: no, :: also resolves namespaces
[17:52:27] l0oky: [k-_: nah just one day
[17:52:31] jhass: which . doesn't
[17:52:45] grill: so . is a subset of ::?
[17:52:48] l0oky: [k-_: Don't give up on ruby like I gave up on C++ lol
[17:53:06] [k-_: im going to haskell >.>
[17:53:12] jhass: grill: kind of, but as said using :: for method calls is highly discouraged in the community
[17:53:20] grill: jhass why
[17:53:32] jhass: because of the ambiguity
[17:53:47] l0oky: I still have that gut feeling that I have to learn C++....
[17:53:47] shevy: . is one character shorter than ::
[17:53:57] jhass: always using . for method calls leaves :: to clearly mean accessing a namespace
[17:53:59] grill: why? because it could be resolving a namespace, or it could be calling a method?
[17:54:23] Gonzih: has joined #ruby
[17:54:43] grill: do you have any good documentation on ruby namespaceS?
[17:55:07] ndrei: has joined #ruby
[17:55:08] jhass: there's not much to it, you can use modules and classes as namespaces
[17:55:14] ndrei_: has joined #ruby
[17:55:19] jhass: module Foo; class Bar; end; end; -> Foo::Bar
[17:55:25] grill: I don't understand the concept of namespace in this context
[17:55:30] graydot: has joined #ruby
[17:55:33] havenwood: grill: Here are some examples: https://rubymonk.com/learning/books/1-ruby-primer/chapters/35-modules/lessons/80-modules-as-namespaces
[17:55:36] jhass: class Foo; module Bar; BAZ = 1; end; end; Foo::Bar::BAZ
[17:55:37] kies^: has joined #ruby
[17:55:57] [k-_: havenwood is like a library
[17:56:11] astrobun_: has joined #ruby
[17:56:39] shevy: grill what you write below that, is part of its namespace. module Foo; def bar <--- there is a method called bar residing as part of Foo
[17:56:56] MasterPiece: has joined #ruby
[17:57:11] grill: ok. so modules are synonymous with namespaces?
[17:57:12] l0oky: I get `exception class/object expected`...
[17:57:20] shevy: grill and classes
[17:57:33] grill: so classes are namespaces?
[17:57:37] shevy: you could also use class Foo; class Bar
[17:57:41] rapha: havenwood: okay, I think I found the shortest possible solution: counts={};stems.each {|k1,v1| counts[k1]={}; v1.each {|k2,v2| counts[k1][k2]=v2.count}}; counts.values.inject(Hash.new(0)) {|total,h| h.each {|k,v| total[k] += v}; total}
[17:57:43] l0oky: If I do raise response.errors if response.errors.present? where response = PayPal::Recurring.new(options).send(action)
[17:57:56] lkba_: has joined #ruby
[17:58:06] rapha: havenwood: (stems contains the hash which i gist'd earlier)
[17:58:25] shevy: there really isn't much more to them. Foo::Bar::name_here_of_anything - that's it really
[17:58:29] astrobun_: has joined #ruby
[17:58:31] pietr0: has joined #ruby
[17:58:33] havenwood: rapha: Nice, a solution! But that's not the shortest possible solution. :)
[17:58:38] grill: so, what is this then: Scn::init_gem node
[17:58:48] grill: Scn looks like a namespace
[17:58:51] shevy: looks like a fancy and ugly way to invoke the init_gem() method
[17:59:02] shevy: it is a constant
[17:59:11] grill: perhaps init_gem() is overriden? can you do that in ruby?
[17:59:16] havenwood: grill: Call methods like: Scn.init_gem
[17:59:19] shevy: you can override everything at runtime
[17:59:32] shevy: but here you just invoke it right?
[17:59:34] havenwood: grill: ::s to separate namespaces and .s to call methods.
[17:59:48] shevy: Scn::init_gem node -> Scn.init_gem node -> Scn.init_gem(node)
[18:00:24] l0oky: Ox0dea: remember that exception from paypal_recurring gem? if I `raise response.errors` where `response = PayPal::Recurring.new(options).send(action)` I get exception class/object expected
[18:00:26] atomical_: has joined #ruby
[18:00:29] TheNet: has joined #ruby
[18:00:39] Ox0dea: >> raise Hash.new
[18:00:40] ruboto: Ox0dea # => exception class/object expected (TypeError) ...check link for more (https://eval.in/400239)
[18:00:43] pietr0_: has joined #ruby
[18:00:46] Ox0dea: l0oky: Why're you raising a Hash?
[18:01:16] l0oky: is that what exception is made of?
[18:01:21] dfinninger: has joined #ruby
[18:01:26] bungoman_: has joined #ruby
[18:01:28] bruno-: has joined #ruby
[18:01:34] Ox0dea: Well, response.errors is an array of Hashes, but the point stands.
[18:02:05] rapha: havenwood: here's the whole gist again ... what i like about this solution is the interim result (see https://gist.github.com/sixtyfive/dab7daf5cfcd34c3d641 again) ... i don't think it can be made shorter than this without sacrificing that interim result.
[18:02:37] l0oky: How can I make an exception that passes a hash?
[18:03:00] shevy: can't you raise stuff?
[18:03:03] jhass: l0oky: make your own subclass that supports it. But I would strongly, very strongly encourage you not to
[18:03:16] Ox0dea: >> [(Kernel::Integer rescue $!.class), (Kernel.Integer rescue $!.class)] # grill
[18:03:17] ruboto: Ox0dea # => [NameError, ArgumentError] (https://eval.in/400240)
[18:03:25] [k-_: jhass: use vehemously
[18:03:27] [k-_: more impact
[18:03:34] Ox0dea: *vehemently
[18:03:56] Ox0dea: Still love you, though.
[18:03:56] shevy: now you get typo-corrected by the oracle
[18:04:32] [k-_: it's ok, i need to improve my english to get good grades
[18:05:13] l0oky: I am suprised there is no string to hash in ruby
[18:05:28] l0oky: I have to eval ... no no way though
[18:05:33] l0oky: i am not making evals
[18:05:38] shevy: l0oky not needed, split it into an array, then use Hash[*array]
[18:06:00] wildroman2: has joined #ruby
[18:06:09] shevy: and! you could always add a to_h method to class String
[18:06:13] workmad3: has joined #ruby
[18:06:17] revath: has joined #ruby
[18:06:19] bubbys: has joined #ruby
[18:06:38] shevy: although to be fair, I don't seem to need to modify core classes of ruby much at all these days
[18:06:41] l0oky: shevy: yeah the second one looks cool :D
[18:06:51] [k-_: why are you passing the problem instead of telling people the problem
[18:06:54] jackjackdripper: has joined #ruby
[18:07:09] shevy: there are no problems, only solutions
[18:07:35] jhass: there's tackling the wrong problems
[18:07:40] desigx: has joined #ruby
[18:07:47] jhass: instead of solving the underlying causes
[18:07:53] [k-_: then what is the solution to parallel assignment of hash keys
[18:08:04] shevy: we don't need to have everything
[18:08:08] l0oky: \join #philosophy
[18:08:11] troulouliou_div2: has joined #ruby
[18:08:17] jhass: passing complex data structures around via exceptions is a very serious design issue
[18:09:18] Zai00: has joined #ruby
[18:09:25] NeverDie_: has joined #ruby
[18:09:35] hinbody: has joined #ruby
[18:09:37] havenwood: rapha: For example, for the first part this is more concise: stems.map { |stem, h| [stem, h.map { |k, v| [k, v.size] }.to_h] }.to_h
[18:09:41] sarkyniin: has joined #ruby
[18:09:56] shevy: [k-_ did you downvote me :(
[18:09:59] Ox0dea: [k-_: I thought you were addressing him.
[18:10:16] Ox0dea: Pre-{inc,dec}rement > post-.
[18:10:21] xkef: has joined #ruby
[18:11:06] schaerli: has joined #ruby
[18:11:20] shevy: ah, an upvote! \o/
[18:11:24] jhack: has joined #ruby
[18:11:29] yardenbar: has joined #ruby
[18:11:29] troulouliou_div2: has joined #ruby
[18:12:30] l0oky: shevy: How's that an upvote? :D
[18:12:35] davejlong: has joined #ruby
[18:12:42] shevy: what comes before goes up, what comes behind goes down
[18:12:43] freerobby: has joined #ruby
[18:12:44] mfranzwa: has joined #ruby
[18:12:51] Ox0dea: At best, it removed the previous downvote and put you back at neutral.
[18:12:56] rapha: havenwood: ah, with .map instead of with .each. i really need to train using .map more, right now it still makes my head hurt.
[18:13:01] l0oky: at least in c++
[18:13:22] Ox0dea: That's how post-incrementation works.
[18:13:31] [k-_: Ox0dea is 100% correct
[18:13:42] jhass: [k-_: you'd never say otherwise anyway
[18:13:56] l0oky: ++A = A + 1
[18:14:01] l0oky: ++A == A + 1
[18:14:03] havenwood: rapha: For the second part there might be better, but: counts.values.inject { |h1, h2| h1.merge(h2) { |_, x, y| x + y } }
[18:14:17] [k-_: that's because Ox0dea is always correct that i dont have an opportunity to correct him!
[18:14:22] havenwood: rapha: That's shorter at least. :)
[18:14:31] rapha: havenwood: your first-part solution, why did you use an array inside of the map?
[18:14:42] blackmesa: has joined #ruby
[18:14:47] [k-_: i prefer reduce!
[18:14:56] havenwood: rapha: When you map Hashes you return an Array.
[18:14:56] rapha: havenwood: and in your second-part solution, what is the meaning of the underscore?
[18:14:59] l0oky: Ox0dea: We all have mistakes the thing is who hides them the best haha.
[18:15:06] havenwood: rapha: The underscore signals it's not used.
[18:15:15] l0oky: oops meant to ping [k-_
[18:15:23] kidoz: has joined #ruby
[18:15:40] [k-_: you failed to hide your mistake
[18:15:51] l0oky: [k-_: ^ :D
[18:16:09] havenwood: rapha: So like another way to write Hash#keys would be: {aim: true}.map { |k, _v| k }
[18:16:21] l0oky: [k-_: yu the new judge? :D
[18:16:31] bubbys: has joined #ruby
[18:16:33] [k-_: i was always a judge
[18:16:33] havenwood: rapha: #=> [:aim]
[18:16:37] shevy: in singapore!
[18:16:37] rapha: havenwood: and coming back to my original questions, would you consider these two lines "elegant" now?
[18:16:46] wildroman2: has joined #ruby
[18:16:50] TeresaP: Dir.glob("(\d+)_*") should return something if a folder underneath the cwd is called "01_foo" right?
[18:17:06] l0oky: Let's judge your judgement hmm 0... no 1/10 :D
[18:17:17] jhass: TeresaP: no, glob patterns are distinct to regular expressions
[18:17:20] shevy: TeresaP dunno but I think .glob does not use regexes
[18:17:20] [k-_: ??\_(???)_/??
[18:17:20] arup_r: has joined #ruby
[18:17:29] rapha: havenwood: with the last thing you wrote, couldn't you just leave out the ", _v" (as it's the last part, not the first)
[18:17:33] havenwood: rapha: The first seems elegant enough. The latter is a bit busy for my taste.
[18:17:49] TheNet: has joined #ruby
[18:17:51] havenwood: rapha: Nope:
[18:17:52] havenwood: >> {aim: true}.map { |k| k }
[18:17:53] ruboto: havenwood # => [[:aim, true]] (https://eval.in/400242)
[18:18:02] blaines: has joined #ruby
[18:18:02] havenwood: >> {aim: true}.map { |k, _| k }
[18:18:04] ruboto: havenwood # => [:aim] (https://eval.in/400243)
[18:18:06] havenwood: rapha: compare with ^
[18:18:12] rapha: >> puts "Hello world!"
[18:18:13] ruboto: rapha # => Hello world! ...check link for more (https://eval.in/400244)
[18:18:20] leat3: has joined #ruby
[18:18:38] Musashi007: has joined #ruby
[18:18:43] TeresaP: I always forget that
[18:18:49] [k-_: why does that happen :o
[18:18:54] Ox0dea: havenwood: Might as well nix the underscore as well.
[18:19:17] TeresaP: I need to get all subfolders that start with 1 or more digits followed by an underscore followed by 1 or more of any character
[18:19:19] jhass: nah, it's more readabile with it
[18:19:23] Igorshp: has joined #ruby
[18:19:25] havenwood: and no var assigned
[18:19:36] [k-_: that's a lie!
[18:19:41] Ox0dea: >> {aim: true}.map { |k,| k } # havenwood
[18:19:42] ruboto: Ox0dea # => [:aim] (https://eval.in/400245)
[18:19:48] [k-_: ruby does assign _!
[18:19:52] rapha: havenwood: about the second part, what i don't get is the h1, h2 designation. the hash that goes into it actually consists of three parts in the case of my data, but that's not what you mean, is it?
[18:20:05] havenwood: Ox0dea: Ah, I see what you mean. But still underscore. :P
[18:20:18] l0oky: while true
[18:20:23] jhass: TeresaP: use an as specific glob pattern as possible (*_* comes to mind) and then .select { } down the result set by any means necessary (like with a regex passed to .match)
[18:20:23] havenwood: rapha: The inject goes between each and does the thing
[18:20:35] l0oky: >> puts 'yeah' while true
[18:20:37] ruboto: l0oky, I'm terribly sorry, I could not evaluate your code because of an error: OpenURI::HTTPError:500 Internal Server Error
[18:20:43] gambl0re: has joined #ruby
[18:20:44] l0oky: muhahahaha
[18:20:46] Ox0dea: ?experiment l0oky
[18:20:46] ruboto: l0oky, Please use your local irb or pry (see ?pry) to experiment, ruboto's eval functionality is for demonstration purposes only.
[18:21:01] rapha: "does the thing" lol
[18:21:06] [k-_: pls no infinite loops
[18:21:12] havenwood: Ox0dea: heh, no two ,,s in a row
[18:21:16] havenwood: >> [[:x, :y, :z]].map { |x,_,| x }
[18:21:17] ruboto: havenwood # => [:x] (https://eval.in/400248)
[18:21:28] Ox0dea: havenwood: Indeed not, and surely for the better.
[18:21:35] rapha: havenwood: aah you mean inject first goes between the first and the second, then between the second and the third?
[18:21:58] rapha: havenwood: okay, thanks! learned a lot of new things now!
[18:21:59] havenwood: rapha: so you could say: left_hash, right_hash
[18:22:03] prestorium: has joined #ruby
[18:22:22] l0oky: Why does ruboto return 500? It is just requesting eval.in, response should be output too long
[18:22:35] [k-_: i would have a $-o[?,][?a,?b] #=> ["a","b"] but i cant be bothered anyomore
[18:22:41] cajone: has joined #ruby
[18:22:49] cajone: has left #ruby: ()
[18:22:59] TeresaP: Thanks jhass
[18:23:00] Ox0dea: [k-_: Erm, the identity function?
[18:23:16] rapha: havenwood: called them lh and rh now :)
[18:23:20] jhass: TeresaP: http://devdocs.io/ruby/file#method-c-fnmatch has a more throughout explanation on what you can do with glob patterns
[18:23:20] Siyfion: has joined #ruby
[18:23:30] bubbys: has joined #ruby
[18:23:38] havenwood: rapha: It's only been a few seconds and I don't remember what those mean. :P
[18:23:47] Timba-as: has joined #ruby
[18:24:04] [k-_: Ox0dea: no, (,) a b = (a, b)
[18:24:05] Kyhz: has joined #ruby
[18:24:07] [k-_: so same thing here
[18:24:23] ljarvis: are we still talking about obfuscation
[18:24:26] havenwood: red_hat and lavender_hat
[18:24:29] [k-_: we dont need identity functions in ruby
[18:24:35] Ox0dea: >> 5.itself
[18:24:36] ruboto: Ox0dea # => 5 (https://eval.in/400249)
[18:24:39] Ox0dea: But we've got 'em.
[18:24:56] [k-_: where does itself come from, what version
[18:24:56] TeresaP: Dir.glob("[0-9]*_*") works, somehow
[18:25:01] Ox0dea: [k-_: 2.2, I believe.
[18:25:06] havenwood: rapha: Name variables descriptive things that will make sense to readers.
[18:25:18] havenwood: rapha: Concise is good but cryptic is bad.
[18:25:28] jhass: rapha: readers = you in the future
[18:25:34] l0oky: (Remote host closed the connection)
[18:25:52] havenwood: which then further in the future will be you in the past
[18:26:08] havenwood: so think of future past you having just read it
[18:26:18] LoBoGoL: has joined #ruby
[18:26:41] ljarvis: that alone is cryptic
[18:26:56] Ox0dea: > Always code as if the person who ends up maintaining your code is a violent psychopath who knows where you live.
[18:27:02] [k-_: Ox0dea should provide his inp--
[18:27:12] adaedra: This reminds me, Ox0dea, I have some code review to do.
[18:27:35] leat3: has joined #ruby
[18:27:43] blackmes1: has joined #ruby
[18:27:44] l0oky: [k-_: It's inp__
[18:28:03] havenwood: ljarvis: past me that wrote it was hoping for a chuckle from future me, but alas I'm not amused
[18:28:13] rapha: havenwood, jhass: yeah, i've already learned that. in this special case i have the problem that it would be good if the whole script could fit onto one A4 page.
[18:28:27] Ox0dea: What year is it?
[18:28:32] [k-_: im sticking with --, whatever __ is
[18:28:40] jhass: rapha: use a smaller font
[18:28:45] havenwood: Ox0dea: Boomtime, the 51st day of Confusion in the YOLD 3181
[18:28:50] rapha: >> Time.now.year
[18:28:51] ruboto: rapha # => 2015 (https://eval.in/400250)
[18:28:54] ljarvis: havenwood: :D
[18:28:58] rapha: Ox0dea: there, found that out for you :-)
[18:29:22] l0oky: >> Time.now.seconds
[18:29:23] rapha: jhass: it's already as small as it can be!
[18:29:23] ruboto: l0oky # => undefined method `seconds' for 2015-07-16 18:29:23 +0000:Time (NoMethodError) ...check link for more (https://eval.in/400251)
[18:29:37] jhass: rapha: sounds like you can still read it
[18:29:38] casadei_: has joined #ruby
[18:29:38] l0oky: Why do I always get errors :(
[18:29:52] jhass: ?pry l0oky
[18:29:53] ruboto: l0oky, Pry, the better IRB. Includes easy object inspection via `ls`, `history`, docs view with `?`, source view with `$` and syntax highlighting, among other features (see `help` for more). It can also be used for easy debugging by putting `binding.pry` directly in your source code. Visit https://pryrepl.org/ or get it now with: gem install pry pry-doc
[18:30:10] ljarvis: that's basically the pry readme right there
[18:30:21] jhass: and we didn't even copy paste it!
[18:30:31] astrobun_: has joined #ruby
[18:30:49] Ox0dea: havenwood: Are you a Discordianist?
[18:30:52] rapha: wow! pry pages by default! already loving it!!
[18:31:25] workmad3: has joined #ruby
[18:31:32] Polysics: has joined #ruby
[18:32:03] havenwood: Ox0dea: In the sense that "All affirmations are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense."
[18:32:30] schaerli: has joined #ruby
[18:32:33] jhass: mmh, reminds me, still need to buy hotdogs for tomorrow
[18:32:51] Ox0dea: Hot dogs are meaningless.
[18:32:53] Ox0dea: In some sense.
[18:32:55] [k-_: got to go sleep
[18:32:59] Ox0dea: Night, [k-_.
[18:33:19] havenwood: [k-_: have a good evenin'
[18:34:04] reset: has joined #ruby
[18:35:28] zata: has joined #ruby
[18:35:33] bricker: I have a CS question.... I have query (A) that loads a bunch of data, and another query (B) that loads associated data. No matter how big or small query A is, query B will always take rougly the same amount of time. What do you call this?
[18:36:01] Macaveli: has joined #ruby
[18:36:32] BTRE: has joined #ruby
[18:36:38] astrobun_: has joined #ruby
[18:36:57] bricker: Some representation of O(log n) but I'm not super familiar with that
[18:37:36] Scroff: has joined #ruby
[18:37:52] leat3: has joined #ruby
[18:38:51] Ox0dea: I think the time and space complexities of such an arrangement are both O(mg).
[18:39:08] jmhmccr: has joined #ruby
[18:39:24] Lucky_: has joined #ruby
[18:39:42] Pupeno: has joined #ruby
[18:40:33] havenwood: 0(mg) = O(g) if m is nonzero but O(mgwtfbbq) if m is infinite?
[18:42:05] Pupeno_: has joined #ruby
[18:44:52] c_nick: has joined #ruby
[18:44:55] genpaku: has joined #ruby
[18:44:58] sankaber: has joined #ruby
[18:45:01] yokel: has joined #ruby
[18:46:38] Scroff: has joined #ruby
[18:47:18] bungoman: has joined #ruby
[18:47:34] iateadonut: has left #ruby: ()
[18:48:51] wallerdev: has joined #ruby
[18:49:41] acke: has joined #ruby
[18:50:05] pietr0: has joined #ruby
[18:50:16] l0oky: infinite is a number with a dimension of time
[18:50:42] stbenjam: has joined #ruby
[18:51:12] zata: has joined #ruby
[18:51:49] nikhgupta: has joined #ruby
[18:52:44] schaerli: has joined #ruby
[18:53:18] skade: has joined #ruby
[18:54:19] dfockler: has joined #ruby
[18:54:33] nofxx: has joined #ruby
[18:54:44] decoponio: has joined #ruby
[18:54:53] edwinvdg_: has joined #ruby
[18:54:59] jottr_: has joined #ruby
[18:55:13] [Butch]: has joined #ruby
[18:56:41] rideh: has joined #ruby
[18:57:42] Macaveli_: has joined #ruby
[18:58:19] bubbys: has joined #ruby
[18:58:26] ttilley: has joined #ruby
[18:58:26] momomomomo: has joined #ruby
[18:58:43] ttilley: has joined #ruby
[18:58:47] baweaver: has joined #ruby
[18:58:52] last_staff: has joined #ruby
[18:59:16] codecop: has joined #ruby
[18:59:38] last_staff: has joined #ruby
[19:00:05] peter_paule: has joined #ruby
[19:01:11] bungoman: has joined #ruby
[19:01:14] last_staff: has joined #ruby
[19:01:39] ESpiney: has joined #ruby
[19:01:48] rapha: gawd i really wish some of the Rails additions were finally accepted into Ruby
[19:01:52] rapha: like, .blank?
[19:02:08] dfockler: I'd like the time functions
[19:02:24] rapha: those too
[19:02:36] Pathfinder_: has joined #ruby
[19:02:50] hfp_work: has joined #ruby
[19:02:56] havenwood: bricker: Too simplistic?: TA(n) = cn ??? TB(n) = cn
[19:03:11] havenwood: bricker: dunno
[19:03:20] hfp: has joined #ruby
[19:03:31] dfinninger: has joined #ruby
[19:04:05] bricker: I'm not sure, I assumed there was a simple answer to the question
[19:04:13] havenwood: bricker: Dunno, I need to learn more about various notations.
[19:05:25] lessless: has joined #ruby
[19:05:50] Mon_Ouie: #blank? always feels to me like it encourages not handling bugs early and silently ignoring getting nil when you're not supposed to --- nil, the empty string and the empty array are completely different things
[19:06:07] Mon_Ouie: (well, "an" empty array/string)
[19:07:03] ljarvis: ugh no dont put blank? into core
[19:08:51] hfp: has joined #ruby
[19:09:21] hfp_work: has joined #ruby
[19:09:30] momomomomo_: has joined #ruby
[19:10:51] fabrice31: has joined #ruby
[19:11:13] zata: has joined #ruby
[19:12:20] Kirklander: has joined #ruby
[19:13:07] TeresaP: Is Zippy recommended over Rubyzip for creating archives?
[19:13:28] zrowe007: I'm having trouble connecting to an MSSQL server using TinyTds::Client.new, but I can connect on the command line using tsql
[19:15:12] LoBoGoL: has joined #ruby
[19:15:20] wordsarewind: has joined #ruby
[19:15:24] krz: has joined #ruby
[19:16:34] wordsarewind: has left #ruby: ("WeeChat 1.2")
[19:16:56] baweaver: has joined #ruby
[19:17:41] Pupeno: has joined #ruby
[19:20:15] peter_paule: has joined #ruby
[19:21:19] atomical: has joined #ruby
[19:21:21] Stratege: has joined #ruby
[19:21:45] ruurd: has joined #ruby
[19:21:52] kirun: has joined #ruby
[19:22:29] xkef: has joined #ruby
[19:22:41] TeresaP: What is the recommended zip mechanism?
[19:22:41] Scripore: has joined #ruby
[19:22:49] zenguy_pc: has joined #ruby
[19:23:22] ruurd: TeresaP sorry?
[19:23:43] einarj: has joined #ruby
[19:23:44] TeresaP: ruurd what gem would you recommend to assist in zipping files
[19:24:13] vickleton: has joined #ruby
[19:25:31] dling: has joined #ruby
[19:25:43] TeresaP: I found a few places that recommended Zippy but the documentation is not great
[19:26:22] ruurd: There is also one called rubyzip
[19:26:39] TeresaP: Yeah, I might just use that even though it is supposedly less abstracted
[19:26:42] ruurd: but using system to invoke zip should also work
[19:26:57] TeresaP: Isn't that kindof frowned upon?
[19:27:12] jpfuentes2: has joined #ruby
[19:28:24] xkickflip: has joined #ruby
[19:29:24] leat3: has joined #ruby
[19:30:21] shevy: it works!
[19:31:19] abuzze: has joined #ruby
[19:31:38] TeresaP: I don't remember the reason, but I seem to remember someone in here was very anti-system calls :)
[19:31:44] serivich: has joined #ruby
[19:32:21] ruurd: has joined #ruby
[19:32:30] ruurd: You might want to be careful doing that yes. It's not exactly portable really
[19:32:56] l0oky: If I have only one line in a method does that mean method returns that line?
[19:33:10] ruby-prudi: has joined #ruby
[19:33:37] ruurd: No. The result of that line maybe. Or nil if it does not return anything.
[19:33:49] rbennacer: has joined #ruby
[19:34:05] ruurd: You know - that kind of questions you can answer yourself by just trying it out in irb.
[19:34:21] Vols: has joined #ruby
[19:34:46] Alayde: has joined #ruby
[19:34:47] Frem: has joined #ruby
[19:34:54] t0rrieri: has joined #ruby
[19:35:19] ruurd: 2.2.2 :001 > puts 'foo'
[19:35:22] ruurd: 2.2.2 :002 >
[19:35:59] ruby-prudi: Hello! Why in Ruby is better to define an array of string with %w( ... ) instead of ["..", "..", ..] ?? Thanks!!
[19:36:00] Casty: has joined #ruby
[19:36:19] jhass: ruby-prudi: because you have to type less " and ,
[19:36:51] tvw: has joined #ruby
[19:37:22] Ox0dea: ruby-prudi: "Isn't", "this", "slightly", "harder", "to", "read"?
[19:37:29] jenrzzz: has joined #ruby
[19:37:30] absurdity1: has joined #ruby
[19:37:45] sepp2k: has joined #ruby
[19:37:47] ruby-prudi: Thanks to all!! :)
[19:38:09] sepp2k: has joined #ruby
[19:38:15] mikepack: has joined #ruby
[19:38:17] whiteline: has joined #ruby
[19:38:19] astrobun_: has joined #ruby
[19:38:36] absurdity1: has left #ruby: ("WeeChat 1.1.1")
[19:39:24] zenguy_pc: has joined #ruby
[19:39:36] sepp2k1: has joined #ruby
[19:41:03] wprice: has joined #ruby
[19:41:06] kadoppe: has joined #ruby
[19:43:50] zenguy_pc: has joined #ruby
[19:44:16] schaerli: has joined #ruby
[19:45:24] rideh: has joined #ruby
[19:45:34] Rollabunna: has joined #ruby
[19:46:05] ruurd: has joined #ruby
[19:46:17] speaking1ode: has joined #ruby
[19:46:24] gambl0re: has joined #ruby
[19:47:07] edwinvdgraaf: has joined #ruby
[19:47:09] Kalov: has joined #ruby
[19:47:54] shadoi: has joined #ruby
[19:47:56] toretore: has joined #ruby
[19:48:04] radialneon: has joined #ruby
[19:49:11] finisherr: has joined #ruby
[19:49:41] bungoman: has joined #ruby
[19:51:01] Rubie: has joined #ruby
[19:51:44] hk33801: has joined #ruby
[19:52:28] linuxboytoo: has joined #ruby
[19:52:44] hk33801: $ which gem | /home/hk3380/.rbenv/shims/gem | gem update --system | You don't have write permissions for the /usr/lib/ruby/gems/2.2.0
[19:52:59] hk33801: i thought rbenv was supposed to allow me run gem without sudo?
[19:54:05] jhass: maybe the system ruby is active?
[19:54:16] hk33801: how do i deactivate it?
[19:54:23] hk33801: oh do i just uninstall it?
[19:55:06] jhass: https://github.com/jhass/nodeinfo/blob/master/PROTOCOL.md#discovery
[19:55:13] jhass: meh, wrong link, sorry
[19:55:17] jhass: https://github.com/sstephenson/rbenv#choosing-the-ruby-version this one
[19:55:21] hfp: has joined #ruby
[19:55:43] speaking2ode: has joined #ruby
[19:55:51] hfp_work: has joined #ruby
[19:56:34] edwinvdgraaf: has joined #ruby
[19:58:02] aryaching: has joined #ruby
[19:58:28] skade: has joined #ruby
[19:58:31] zrowe007: I'm trying to connect to an MSSQL server using tinytds, and I can on the console using tsql, but not using tinytds in a ruby script, i just get "Adaptive Server connection failed" My script and log output is here: https://gist.github.com/zr2d2/6b26a5d3f8e4a1ff4727
[19:59:00] zata: has joined #ruby
[19:59:14] SCHAAP137: has joined #ruby
[19:59:42] roolo: has joined #ruby
[20:00:37] jottr_: has joined #ruby
[20:01:06] Pupeno: has joined #ruby
[20:01:43] atomical: has joined #ruby
[20:01:43] l0oky: Will .empty? check for nil ?
[20:01:55] Mon_Ouie: >> nil.empty?
[20:01:57] ruboto: Mon_Ouie # => undefined method `empty?' for nil:NilClass (NoMethodError) ...check link for more (https://eval.in/400274)
[20:02:24] tmtwd: has joined #ruby
[20:03:13] l0oky: >> nil.nil?
[20:03:14] ruboto: l0oky # => true (https://eval.in/400276)
[20:03:34] l0oky: >> nil.blank?
[20:03:34] ruboto: l0oky # => undefined method `blank?' for nil:NilClass (NoMethodError) ...check link for more (https://eval.in/400277)
[20:03:47] jhass: ?experiment l0oky
[20:03:47] ruboto: l0oky, Please use your local irb or pry (see ?pry) to experiment, ruboto's eval functionality is for demonstration purposes only.
[20:04:18] l0oky: right right, we humans forget
[20:04:20] nikhgupt: has joined #ruby
[20:04:20] Kirklander: has left #ruby: ()
[20:11:05] sypheren: has joined #ruby
[20:11:19] sypheren: has left #ruby: ()
[20:11:32] dfinninger: has joined #ruby
[20:11:32] sypheren: has joined #ruby
[20:12:27] hinbody_: has joined #ruby
[20:13:00] nettoweb: has joined #ruby
[20:13:45] danzilio: has joined #ruby
[20:13:59] howdoicomputer: has joined #ruby
[20:15:10] aspiers: has joined #ruby
[20:15:33] edwinvdgraaf: has joined #ruby
[20:16:02] gambl0re: has joined #ruby
[20:16:12] douglasssss: has joined #ruby
[20:18:08] segfalt: has joined #ruby
[20:18:13] lxsameer: has joined #ruby
[20:19:38] dfockler: has joined #ruby
[20:19:52] happyface: has joined #ruby
[20:21:04] yfeldblum: has joined #ruby
[20:22:22] dionysus69: has joined #ruby
[20:22:52] Musashi007: has joined #ruby
[20:23:06] jenrzzz: has joined #ruby
[20:23:15] whiteline: has joined #ruby
[20:24:08] bashusr: has joined #ruby
[20:24:46] _dev0urer: has joined #ruby
[20:25:53] rbennacer: has joined #ruby
[20:26:04] NeverDie: has joined #ruby
[20:29:22] bronson: has joined #ruby
[20:29:43] ubermonkey: has joined #ruby
[20:30:09] ubermonkey: has joined #ruby
[20:33:12] Pupeno: has joined #ruby
[20:34:19] ubermonkey: has joined #ruby
[20:34:40] nettoweb_: has joined #ruby
[20:35:30] Karunamon|2: Hi folks - wondering if there's a better way to return an array from an iterator, this seems really dupe-ey: https://gist.github.com/Karunamon/98da3cc06c6dbc734fca
[20:35:55] jhass: Karunamon|2: just call .map on it
[20:36:07] Maletor: has joined #ruby
[20:36:25] jhass: Karunamon: or for this case do Array.new(amount) { RandomWord.nouns.next }
[20:36:40] zata: has joined #ruby
[20:36:55] wallerdev: has joined #ruby
[20:37:03] jhass: and if RandomWord.nouns returns an Enumerator, just RandomWord.nouns.take(amount)
[20:37:05] Karunamon: I did not know array.new accepted a block
[20:37:29] momomomomo: has joined #ruby
[20:37:59] jhass: btw filename convention for RandomWord would be random_word.rb not random-word.rb
[20:41:21] mozzarella: why not use RandomWord.nouns.take(number)?
[20:41:38] jhass: mozzarella: looks like you overlooked my third note ;)
[20:41:45] allomov: has joined #ruby
[20:43:12] whiteline: has joined #ruby
[20:43:28] Timba-as: has joined #ruby
[20:44:17] mh888: has joined #ruby
[20:45:06] momomomomo: has joined #ruby
[20:45:47] jottr_: has joined #ruby
[20:45:50] Karunamon: am I right in understanding that, generally, if you're repeating yourself, you're probably doing something either the wrong way or harder than it ought to be?
[20:46:30] AlexRussia: has joined #ruby
[20:46:50] AlexRussia: has joined #ruby
[20:47:06] baweaver: has joined #ruby
[20:47:43] but3k4: has joined #ruby
[20:47:47] shevy: anyone happens to know if there is a standalone project that will only generate an up-to-date skeleton for a ruby project?
[20:47:55] Aria: I think there's a tension between repeating yourself and coupling.
[20:48:17] Aria: But if you get to the point of 'this is tedious and I wouldn't notice a mistake" ... you've crossed far into 'this should be automated' territory.
[20:50:41] Hanmac: has joined #ruby
[20:50:43] blueOxigen: has joined #ruby
[20:52:22] sepp2k: has joined #ruby
[20:54:14] nettoweb: has joined #ruby
[20:54:40] WildBamboo-Josh: has joined #ruby
[20:54:45] SaintMoriarty: has joined #ruby
[20:55:52] ramfjord: has joined #ruby
[20:56:27] bricker: I think I know the answer but want some confirmation, is Array#uniq with a block guaranteed to retain the first occurrence of the object?
[20:56:36] ruurd: has joined #ruby
[20:56:52] jenrzzz: has joined #ruby
[20:57:02] saadq: has joined #ruby
[20:57:27] davejlong: has joined #ruby
[20:57:44] Radar: shevy: "skeleton"?
[20:57:51] Radar: "bundle gem" is all I can think of
[20:59:58] cpruitt: has joined #ruby
[21:01:17] Radar: Karunamon: Subjective.
[21:01:33] Radar: bricker: example?
[21:02:12] bricker: Radar: If I have ["a
[21:02:19] Ox0dea: has joined #ruby
[21:02:31] Ox0dea: bricker: #uniq is implemented internally using a hash table, and Ruby's hashes maintain insertion order.
[21:02:45] pengin: has joined #ruby
[21:04:46] Musashi007: has joined #ruby
[21:05:08] Ox0dea: >> s = Struct.new(:a, :b); [s.new(1, 0), s.new(2, 0), s.new(2, 1), s.new(1, 1)].uniq(&:b)
[21:05:09] ruboto: Ox0dea # => [#<struct a=1, b=0>, #<struct a=2, b=1>] (https://eval.in/400296)
[21:06:00] bricker: Ox0dea: I'm more concerned that the block form of uniq would somehow change that... it seems like it'll be okay though
[21:06:31] Ox0dea: I used the block form in my example, for what that's worth.
[21:07:12] bricker: Ox0dea: I know, your example shows that your example returns the expected result, but you're saying that it's guaranteed?
[21:07:42] bricker: I believe you, just confirming
[21:07:49] bricker: and sanity check for me
[21:08:08] Ox0dea: It's guaranteed in MRI.
[21:08:22] Ox0dea: I'm sure there's something in RubySpec about making hashes maintain insertion order.
[21:09:07] atomi: has joined #ruby
[21:09:21] baweaver: has joined #ruby
[21:10:29] momomomomo: has joined #ruby
[21:10:35] ccooke: has joined #ruby
[21:11:17] JeramyRR: has joined #ruby
[21:11:24] yokel: has joined #ruby
[21:11:41] fabrice31: has joined #ruby
[21:12:33] futilegames: has joined #ruby
[21:13:31] dblessing: has joined #ruby
[21:14:16] arescorpio: has joined #ruby
[21:14:54] TheNet: has joined #ruby
[21:15:00] edwinvdgraaf: has joined #ruby
[21:15:26] zata: has joined #ruby
[21:17:59] davejlong: has joined #ruby
[21:18:18] LoBoGoL: has joined #ruby
[21:19:02] hfp: has joined #ruby
[21:19:27] hfp_work: has joined #ruby
[21:19:32] eggoez: has joined #ruby
[21:19:44] crdpink2: has joined #ruby
[21:20:15] icarus_: has joined #ruby
[21:20:32] MagePsycho: has joined #ruby
[21:23:58] phutchins: has joined #ruby
[21:24:28] davedev24: has joined #ruby
[21:25:49] duderonomy: has joined #ruby
[21:28:01] charliesome: has joined #ruby
[21:28:13] borodin: has joined #ruby
[21:28:50] Pupeno: has joined #ruby
[21:29:52] FernandoBasso: has joined #ruby
[21:30:04] Rollabunna: has joined #ruby
[21:30:50] borodin: help oh ruby genii! help a wary traveller! https://gist.github.com/anonymous/3b38dc958740b35ed7f0 I'm getting an unexpected end when I know an end belongs there!
[21:30:51] SaintMoriarty: hello, do I have to change settings to allow connections from outside of the host?
[21:30:56] SaintMoriarty: when running rails server
[21:31:28] borodin: SaintMoriarty: you have to specify to listen to an ip which can be seen outside the server
[21:31:36] borodin: rails s -b0.0.0.0 etc.
[21:31:44] borodin: (on the newest rails server)
[21:32:01] havenwood: has joined #ruby
[21:32:13] SaintMoriarty: ah so its not in any of the configs?
[21:32:53] borodin: it used to be automagically 0.0.0.0 but now it's not
[21:33:05] borodin: not in any of the configs either
[21:33:59] bronson: has joined #ruby
[21:34:38] jottr: has joined #ruby
[21:35:02] havenwood: borodin: Is there an ambiguity with the Hash kwarg value here?: https://gist.github.com/anonymous/3b38dc958740b35ed7f0#file-archive-rb-L6
[21:35:03] Musashi007: has joined #ruby
[21:35:22] havenwood: borodin: Double check?: validates(:crypto_key1, :crypto_key2, length: { minimum: 8 })
[21:36:05] borodin: havenwood I can tell you can help me because you're using words I haven't ever heard of
[21:36:22] borodin: are you saying add in the parens?
[21:36:29] devbug: has joined #ruby
[21:37:01] havenwood: borodin: Yeah. On a quick scan at least that was what seemed suspicious to me.
[21:37:05] toretore: self.completed_at |= Time.now
[21:37:28] ruurd: has joined #ruby
[21:37:43] borodin: toretore should be ||= ?
[21:37:54] xkef: has joined #ruby
[21:38:48] borodin: but it didn't fix the problem?
[21:39:04] edwinvdgraaf: has joined #ruby
[21:39:27] borodin: havenwood: I added the parens, didn't change the outcome
[21:39:39] toretore: update gist with new code
[21:39:41] havenwood: borodin: looking closer
[21:39:43] toretore: and new error
[21:39:48] havenwood: borodin: aye, updated gist would be good! :
[21:39:49] borodin: is there any chance that this error comes from anything other than this file?
[21:40:46] Ox0dea: borodin: Is this the whole file?
[21:41:11] borodin: yes that's the whole file
[21:41:20] borodin: updated with changes: https://gist.github.com/chewmanfoo/877e8573613b38e2bb4f
[21:42:41] Ox0dea: borodin: Nix the question mark on line 50.
[21:43:12] havenwood: Ox0dea: good catch
[21:43:18] ruurd: has joined #ruby
[21:43:20] borodin: Ox0dea: I knkew you were the smart one!
[21:43:30] borodin: giggles - thanks everybody
[21:43:32] paulcsmith: has joined #ruby
[21:44:05] atomical: has joined #ruby
[21:44:32] Kalov: any body knows, a good place for finding ruby code examples?
[21:45:16] blackmes1: has joined #ruby
[21:46:16] yokel: has joined #ruby
[21:46:17] eGGsha: has joined #ruby
[21:47:14] kullsputra: has joined #ruby
[21:47:44] Ox0dea: Kalov: Are you on Windows?
[21:48:05] jamesaxl|2: has joined #ruby
[21:49:15] TheNet: has joined #ruby
[21:49:51] gccostabr: has joined #ruby
[21:51:16] Kalov: yes i am Ox0dea
[21:52:42] ruurd: has joined #ruby
[21:52:43] Ox0dea: Kalov: Do you have Ruby installed?
[21:53:55] djbkd: has joined #ruby
[21:54:45] kullsputra: has joined #ruby
[21:55:06] Kalov: yes i think so
[21:55:10] nofxx: has joined #ruby
[21:55:10] nofxx: has joined #ruby
[21:55:26] ryba: has joined #ruby
[21:55:29] ruurd: OK what happens if you enter irb on the command line?
[21:55:57] NeverDie: has joined #ruby
[21:56:05] jaequery: has joined #ruby
[21:56:32] mfranzwa: has left #ruby: ()
[21:56:33] adaedra: be careful that depending on your windows install, you may have a special shortcut for Ruby-enabled shell.
[21:57:07] linuxboytoo: has joined #ruby
[21:57:39] cpruitt: has joined #ruby
[21:57:40] graydot: has joined #ruby
[21:57:47] ohaibbq: has joined #ruby
[21:58:42] _solomon: has joined #ruby
[21:59:07] Kalov: i am not sure really sure how to, i downloaded and installed an .exe "ruby 2.2.2"
[22:00:47] Musashi007: has joined #ruby
[22:01:00] yokel: has joined #ruby
[22:01:28] decoponio: has joined #ruby
[22:03:32] baweaver: has joined #ruby
[22:04:05] duoi: has joined #ruby
[22:04:41] baweaver_: has joined #ruby
[22:04:50] Rollabunna: has joined #ruby
[22:05:03] havenwood: Kalov: There are multiple ways to install Ruby on Windows but a popular option is RubyInstaller for Windows. You can check that you have the version you expect from your command line with `ruby -v`.
[22:05:43] pietr0: has joined #ruby
[22:06:03] Carnage\: has joined #ruby
[22:08:19] s00pcan: has joined #ruby
[22:09:26] ruurd: Kalov if I were you I'd run away from Windows real fast if you want to do any Ruby stuff... It's a menace.
[22:09:33] casadei_: has joined #ruby
[22:10:16] hal_9000_: trying redcarpet for first time ??? can???t get simple list to work --
[22:10:29] LoBoGoL: has joined #ruby
[22:10:33] Guest87318: hi I'm testing a method that takes a block: specify { expect { |b| m_array.tk_each(&b) }.to yield_successive_args([]) }
[22:10:50] hal_9000_: 2.1.0 :001 > text = "This is a list:\n* first\n* second\n"
[22:10:51] hal_9000_: 2.1.0 :002 > out = Redcarpet::Markdown.new(Redcarpet::Render::HTML.new).render(text)
[22:10:51] hal_9000_: => "<p>This is a list:\n* first\n* second</p>\n" # Can someone explain?
[22:11:35] centrx: has joined #ruby
[22:11:50] Guest87318: hal_9000 doesn't readcarpet render html from a string? So it's automatically putting your text into paragraphs
[22:11:53] xkickflip: has joined #ruby
[22:12:18] hal_9000_: well??? there are newlines in there. i thought it would honor them
[22:12:26] apeiros: hal_9000_: add an empty line between the list and the text before
[22:12:43] djbkd: has joined #ruby
[22:12:58] havenwood: Kalov: There's always lots of code to read on the Githubs: https://github.com/trending?l=ruby
[22:13:00] hal_9000_: conclusion: i don???t know markdown :)
[22:13:09] hal_9000_: thanks apeiros
[22:13:14] havenwood: Kalov: Depends what type of examples you're looking for. There are lots of resources.
[22:13:49] havenwood: Kalov: I think it's a great idea to read a bunch of code.
[22:13:52] leat3: has joined #ruby
[22:15:28] Ox0dea: $ gem search --no-vers | xargs gem install
[22:16:10] riotjones: has joined #ruby
[22:16:50] havenwood: Ox0dea: Then just cron a `gem update` and good to go?
[22:16:54] Ox0dea: Good to go.
[22:17:06] Kalov: yes havenwood i tought the same, reading and learning
[22:17:16] Kalov: do you know where i can find code?
[22:17:25] havenwood: Kalov: For a beginner?
[22:17:32] havenwood: Kalov: Any particular interests?
[22:17:57] Kalov: anything will do
[22:18:01] Kalov: yes biginner
[22:18:09] havenwood: Kalov: Here are some links to resources: http://ruby-community.com/pages/links
[22:18:54] Ox0dea: Hey! Let's count in Ruby for Kalov.
[22:19:41] Ox0dea: >> 'sky'.count('aeiou')
[22:19:42] ruboto: Ox0dea # => 0 (https://eval.in/400330)
[22:19:49] bungoman: has joined #ruby
[22:20:22] ruurd: 'is the limit'.count('aeiouy')
[22:20:35] pengin: has joined #ruby
[22:20:37] havenwood: >> 'sky'.count('aeiou').next
[22:20:38] wrbtrader: has joined #ruby
[22:20:38] ruboto: havenwood # => 1 (https://eval.in/400331)
[22:20:51] ruurd: >> 'is the limit'.count('aeiouy')
[22:20:52] ruboto: ruurd # => 4 (https://eval.in/400332)
[22:20:59] Ox0dea: ruurd: Get out.
[22:21:39] jimmythehat: hi all does this make sense? https://gist.github.com/anonymous/7d06a8957d50b6f5f797 How can I achieve this?
[22:22:01] FernandoBasso: has joined #ruby
[22:22:06] ruurd: >> puts 'No'
[22:22:07] ruboto: ruurd # => No ...check link for more (https://eval.in/400333)
[22:23:04] bmurt: has joined #ruby
[22:23:43] jimmythehat: does anyone know anything about rspec's yield matchers?
[22:24:54] baweaver: has joined #ruby
[22:27:36] Ox0dea: JimmytheHat: You're no longer testing that your #my_each yields values correctly once you're explicitly indexing into its return value.
[22:27:53] Ox0dea: Are you just doing this to learn yield matchers, or?
[22:29:55] sgambino: has joined #ruby
[22:30:38] zacstewart: has joined #ruby
[22:31:43] T3: has joined #ruby
[22:32:39] howdoicomputer: has joined #ruby
[22:32:54] ellisTAA: has joined #ruby
[22:32:55] bruno-: has joined #ruby
[22:33:24] jgpawletko: has joined #ruby
[22:33:41] hk33801: has joined #ruby
[22:33:42] cek: has joined #ruby
[22:34:01] cek: has left #ruby: ()
[22:34:07] tkuchiki: has joined #ruby
[22:34:39] jhack: has joined #ruby
[22:35:20] nveselinov: has joined #ruby
[22:38:58] jimmythehat: Ox0dea just learning, but I feel it would be nice to spec each yield value separately? all my values, all my counts and more for more complex yields. Is it possible? By 'explicitly indexing' do you mean I'd no longer be testing the order of my yield values?
[22:39:36] Ox0dea: JimmytheHat: Explicitly indexing means you're testing that Enumerator#[] works, not #my_each.
[22:39:41] crunk_bear: has joined #ruby
[22:40:22] jimmythehat: Oxodea you mean I shouldn't bother testing count?
[22:40:46] freerobby: has joined #ruby
[22:40:48] ruurd: has joined #ruby
[22:40:48] Ox0dea: JimmytheHat: Your #my_each is just a re-implementation of #each, yes?
[22:40:56] Papierkorb: has joined #ruby
[22:42:54] jimmythehat: Ox0dea ah no it's just an example, it doesn't even exist. Let's just pretend that I do just want to really test my count returns 0,1,2 how could I do that in one expectation? One expectation for each yield value, if possible.
[22:43:42] jimmythehat: it's an rspec-style simple example :P
[22:43:50] jimmythehat: rspec-docs style
[22:45:12] Musashi007: has joined #ruby
[22:45:36] Ox0dea: JimmytheHat: I suppose you could try `expect { array.my_each(&b).enum_for(:last) }`.
[22:46:00] ellisTAA: has joined #ruby
[22:46:11] jimmythehat: Ox0dea ah yes that might do it thanks a lot
[22:46:17] Ox0dea: Sure thing.
[22:47:53] Scripore: has joined #ruby
[22:48:18] xkickflip: has joined #ruby
[22:48:57] T3: has joined #ruby
[22:49:23] Rubie: has joined #ruby
[22:50:40] jerius: has joined #ruby
[22:52:14] swgillespie: has joined #ruby
[22:52:40] yqt: has joined #ruby
[22:54:04] allcentury: has joined #ruby
[22:56:04] malconis: has joined #ruby
[22:56:44] zrowe007: I'm trying to use tinyTDS, but keep getting an 'Adaptive Server connection failed' error in irb, and also through the interpreter tds_version=>5, even though i passed in tds_version: '70'
[22:57:00] SaintMoriarty: has joined #ruby
[22:57:07] zrowe007: could that be a printing error
[22:57:17] ellisTAA: has joined #ruby
[22:58:36] aphprentice: has joined #ruby
[22:58:45] eggoez: has joined #ruby
[22:59:03] Rollabunna: has joined #ruby
[22:59:21] allomov: has joined #ruby
[23:00:05] centrx: zrowe007, Why does the error have to be caused by the version?
[23:00:05] graydot: has joined #ruby
[23:01:36] slumos: has left #ruby: ()
[23:01:38] zrowe007: centrx: it isn't, i found the mapping in the source code
[23:01:41] swgillespie: has joined #ruby
[23:01:44] roolo: has joined #ruby
[23:02:17] zrowe007: centrx: i'm just befuddled as to why it works on the connand line and not in ruby
[23:02:26] serivich: has joined #ruby
[23:02:45] Musashi007: has joined #ruby
[23:02:46] thejoecarroll: has joined #ruby
[23:02:52] fgo: has joined #ruby
[23:03:09] ndrei: has joined #ruby
[23:03:43] wrbtrader: has left #ruby: ()
[23:03:59] ndrei_: has joined #ruby
[23:04:25] graydot: has joined #ruby
[23:04:46] zrowe007: here's my gist of what happens: https://gist.github.com/zr2d2/6b26a5d3f8e4a1ff4727
[23:04:58] jhack: has joined #ruby
[23:05:31] leat3: has joined #ruby
[23:06:58] dimasg: has joined #ruby
[23:08:48] fallen_: has joined #ruby
[23:08:55] centrx: zrowe007, does it want 71 instead of 70?
[23:08:56] benlieb: has joined #ruby
[23:09:39] centrx: zrowe007, Are you able to use that dpa.USNG2 database from the command-line? Maybe the DB is supposed to be just 'USNG2' excluding the schema?
[23:11:03] Mia: has joined #ruby
[23:11:03] Mia: has joined #ruby
[23:11:13] dh64: has joined #ruby
[23:11:13] jbw: has joined #ruby
[23:11:30] Yzguy: has joined #ruby
[23:11:46] rickmasta: has joined #ruby
[23:11:59] thiagovsk: has joined #ruby
[23:12:26] fabrice31: has joined #ruby
[23:12:27] havenwood: has joined #ruby
[23:12:33] pepperbreath: has joined #ruby
[23:12:47] zrowe007: well it dies at TinyTds::Client.new user: ENV['mssql_user'], password: ENV['mssql_pw'], host: 'content.femadata.com'
[23:13:31] eggoez: has joined #ruby
[23:15:58] Thomas-0725: has joined #ruby
[23:16:11] ellisTAA: has joined #ruby
[23:16:49] toretore: zrowe007: the file you gisted is not the file you're getting the error from
[23:17:42] CloCkWeRX: has joined #ruby
[23:18:29] zrowe007: toretore: there were some other methods that confused someone, so i removed it
[23:20:53] Zinja: has joined #ruby
[23:21:26] flori: has joined #ruby
[23:21:42] Killerkeksdose_: has joined #ruby
[23:21:50] Musashi007: has joined #ruby
[23:22:26] TheHodge: has joined #ruby
[23:22:47] abbe: has joined #ruby
[23:24:03] McSoFake: has joined #ruby
[23:24:12] zrowe007: I update it so the lines match up
[23:25:12] dimasg: has joined #ruby
[23:26:19] speaking1ode: has joined #ruby
[23:26:43] toretore: zrowe007: you should always gist whole files, this still looks like it's missing some parts
[23:27:17] tkuchiki: has joined #ruby
[23:27:24] toretore: but anyway, try writing a new file containing only what's required to produce the error
[23:27:31] jesterfraud: has joined #ruby
[23:27:45] toretore: i.e. only the db connection parts, with hardcoded values
[23:27:48] fantazo: has joined #ruby
[23:30:56] ellisTAA: has joined #ruby
[23:32:22] swgillespie: has joined #ruby
[23:34:39] xkef_: has joined #ruby
[23:35:50] radialneon: has joined #ruby
[23:36:33] m4rCsi: has joined #ruby
[23:36:47] ruurd: has joined #ruby
[23:37:06] Lucky_: has joined #ruby
[23:37:30] t0rrieri: has joined #ruby
[23:38:08] baweaver: has joined #ruby
[23:38:38] baweaver: has joined #ruby
[23:38:51] zrowe007: toretore: there, it still shows the same thing
[23:42:35] pengin_: has joined #ruby
[23:43:20] eggoez: has joined #ruby
[23:43:38] SirFunk: Is there any way to save off old methods (like alias_method) when doing object.extend(Module) ?
[23:45:35] Ropeney: has joined #ruby
[23:46:57] Vols: has joined #ruby
[23:47:46] wallerdev: you could loop through the object's methods and alias them
[23:49:04] toretore: zrowe007: you should probably not include the password in the gist though ;)
[23:49:42] zrowe007: yeah, i've been doing that
[23:49:48] SirFunk: wallerdev: trying to do something with self.extended
[23:49:53] zrowe007: I'll change it
[23:49:59] toretore: zrowe007: so that means either the parameters are wrong, or the server isn't available
[23:51:09] zrowe007: hmm, but the connection works on the command line with tsql
[23:51:14] toretore: zrowe007: where's the debug output coming from?
[23:51:33] toretore: {:user=>"dpa_reset", :password=>"...", etc}
[23:52:03] bungoman_: has joined #ruby
[23:52:12] toretore: double check that you're using the same credentials, hostname, port number, etc
[23:52:18] wallerdev: SirFunk: well you can call super to call the old one
[23:52:28] wallerdev: not totally sure what the goal is
[23:52:41] SirFunk: wallerdev: super doesn't work
[23:52:42] zrowe007: i did a puts on the options to the connect call inside client.rb
[23:52:50] toretore: SirFunk: it should work
[23:52:55] SirFunk: not when doing .extend
[23:53:08] zrowe007: the call thats failling inside the tiny_tds gem
[23:53:09] SirFunk: leme see if I can find a repl to paste an example
[23:53:11] SaintMoriarty: has joined #ruby
[23:53:18] Rollabunna: has joined #ruby
[23:53:39] wallerdev: >> module Cool; def wow; puts 5; super; end end; module Rawr; def wow; puts 10; end end; x = Object.new.extend(Rawr).extend(Cool).wow
[23:53:40] ruboto: wallerdev # => 5 ...check link for more (https://eval.in/400335)
[23:53:46] j4cknewt: has joined #ruby
[23:54:17] SaintMoriarty: for some reason I am running rails start -b 0.0.0.0 and its still only available on the host
[23:54:18] SirFunk: I swear that didn't work before
[23:54:52] zrowe007: TDSVER=7.1 tsql -H content.femadata.com -p 1433 -U dpa_reset
[23:55:04] zrowe007: yup, looks the same to me
[23:55:10] finisherr: has left #ruby: ()
[23:55:26] Ox0dea: zrowe007: Why on earth are you posting credentials in IRC?
[23:57:13] Ox0dea: You Only Login Once.
[23:57:28] dfockler: and then someone hacks you and you can't login again
[23:58:43] Coraline: It's okay, there's only 1032 people here.
[23:59:11] toretore: just delete it quickly and it'll be fine
[23:59:31] m4rCsi: has joined #ruby
[23:59:49] Ox0dea: Yeah, the Internet forgets things almost immediately.