« Back to channel list

#ruby - 18 September 2015

« Back 1 day Forward 1 day »
[00:00:48] Rollabunna: has joined #ruby
[00:02:38] darix: sharkman: read the ruby regexp doc?
[00:03:32] nofxx: has joined #ruby
[00:03:47] nofxx: has joined #ruby
[00:05:02] Cache_Money: has joined #ruby
[00:06:12] Cache_Money: I'm using Ubuntu 14.04. When I run `rbenv install --list` I only see 2.2.0-dev/preview1/preview2. I'm running 2.2.2p95 on my Mac. How do I install 2.2.2p95 on Ubuntu?
[00:06:20] Melpaws: has joined #ruby
[00:06:24] Cache_Money: Or how do I get it to show up as an option when installing with rbenv?
[00:06:25] chipotle: has joined #ruby
[00:07:38] tjbiddle: has joined #ruby
[00:07:57] nofxx: Cache_Money, my suggestion: add brightbox ruby repo, and avoid rbenv/rvm
[00:08:38] nofxx: you'll install/update ruby with apt-get
[00:13:33] sharkman: this is listed as a start time on a webpage im scraping, 1442535900000, any ideas what format that is in? how i can make it a Date object?
[00:13:39] SenpaiSilver: has joined #ruby
[00:14:07] Ox0dea: >> Time.at(1442535900000 / 1000) # sharkman
[00:14:08] ruboto: Ox0dea # => 2015-09-18 00:25:00 +0000 (https://eval.in/435256)
[00:14:32] Ox0dea: It's a Unix epoch with milliseconds.
[00:14:49] sharkman: oh perfect 0x0dea
[00:14:52] innpr0cess: has joined #ruby
[00:14:55] Ox0dea: Happy to help.
[00:14:56] sharkman: what is an epoch
[00:14:57] unclouded: has joined #ruby
[00:15:03] chipotle: has joined #ruby
[00:15:17] Ox0dea: Linguistically, an epoch is just a period of time.
[00:15:42] ajafo: has joined #ruby
[00:16:16] dariasmc: has joined #ruby
[00:16:20] Ox0dea: In this case, it's just a timestamp that indicates the number of seconds since the midnight between 1969 and 1970.
[00:16:35] Ox0dea: Unix is old.
[00:16:56] sharkman: interesting that a website would choose to use that
[00:16:58] dariasmc: is p the inspect version of puts in ruby? any help?
[00:17:05] Ox0dea: sharkman: It's very common, which makes it convenient.
[00:17:12] tjbiddle_: has joined #ruby
[00:17:27] Ox0dea: dariasmc: `p foo` is almost literally `puts foo.inspect`, yes.
[00:17:51] Ox0dea: But #puts returns `nil`, whereas #p returns the argument.
[00:18:04] dariasmc: 0x0Dea: thanks a lot
[00:18:14] Ox0dea: Sure thing.
[00:18:48] dariasmc: 0x0dea: i started learning ruby today :D
[00:18:51] haylon: has joined #ruby
[00:19:05] Ox0dea: Where ya comin' from?
[00:19:30] Timba-as: has joined #ruby
[00:19:41] siaW: has joined #ruby
[00:19:46] siaW: dariasmc: :p
[00:19:54] haylon: Hey guys. Any idea on why the gem chef won't build on ubuntu because of libyajl2, even though its installed as well as the dev package?
[00:20:07] Ox0dea: haylon: Post compilation errors.
[00:20:21] oddalot: is it in your path?
[00:20:49] haylon: extconf.rb:104:in `makemakefiles': unhandled exception and what I read said I needed make and gcc, yet those are already installed with build-essential
[00:20:53] rodfersou: has joined #ruby
[00:21:02] darix: haylon: the rest of the text around it
[00:21:06] haylon: oddalot: i'm not sure, how would I check
[00:21:28] rakm: has joined #ruby
[00:21:32] haylon: One sec, making Gist
[00:22:28] haylon: https://gist.github.com/predatorian3/001fdcda3b416e418755
[00:23:02] darix: check the log files in /home/predatorian/.rvm/gems/ruby-2.2.3/gems/libyajl2-1.2.0/ext/libyajl2
[00:23:05] Exuma: has joined #ruby
[00:24:23] haylon: I updated the Gist with the output of make.out
[00:24:35] darix: gmp-dev missing
[00:25:39] araujo: has joined #ruby
[00:26:06] haylon: Thank you, that was what was missing.
[00:26:39] ivanskie: has joined #ruby
[00:27:06] Ox0dea: has joined #ruby
[00:35:39] tjbiddle: has joined #ruby
[00:36:49] saddad: has joined #ruby
[00:37:49] daaask: has joined #ruby
[00:38:00] mjuszczak: has joined #ruby
[00:38:29] bmurt: has joined #ruby
[00:39:06] Exuma: has joined #ruby
[00:40:41] mordocai: has joined #ruby
[00:41:46] dEPy: has joined #ruby
[00:42:58] hays: has joined #ruby
[00:42:58] tjbiddle_: has joined #ruby
[00:43:56] sepp2k: has joined #ruby
[00:47:28] pietr0: has joined #ruby
[00:49:04] sotojuan: has joined #ruby
[00:50:01] EminenceHC: has joined #ruby
[00:50:12] weemsledeux: has joined #ruby
[00:51:46] paulcsmith: has joined #ruby
[00:53:49] chipotle: has joined #ruby
[00:53:50] grayhat_jax: has joined #ruby
[00:54:11] grayhat_jax: has left #ruby: ()
[00:57:04] EminenceHC: has joined #ruby
[00:57:28] EasyCo: has joined #ruby
[00:57:58] ndrei: has joined #ruby
[01:00:53] CloCkWeRX: has joined #ruby
[01:04:21] ndrei: has joined #ruby
[01:05:57] haraoka: has joined #ruby
[01:07:51] paulcsmith_: has joined #ruby
[01:08:57] bmurt: has joined #ruby
[01:09:37] ndrei: has joined #ruby
[01:10:28] Cache_Money: has joined #ruby
[01:10:30] failshell: has joined #ruby
[01:12:48] voltalio: has joined #ruby
[01:13:14] rezzack1: has joined #ruby
[01:15:56] pontiki: has joined #ruby
[01:18:21] gambl0re: has joined #ruby
[01:18:26] sharkman: does someone want to do me a favor
[01:19:14] linuxboytoo: has joined #ruby
[01:19:53] sharkman: can you sign up for an account on www.heritagesports.eu and let me use it? its a sports betting site
[01:20:01] sharkman: i wont bet, just need it to log in and see the lines
[01:20:09] monoprotic: why cant you?
[01:20:25] sharkman: i have one. i use it to bet. i need another to log into with a computer program
[01:20:27] sharkman: to scrape information
[01:20:44] monoprotic: why cant you sign up for a second oen
[01:20:54] sharkman: they wont let me
[01:21:00] sharkman: one account per address
[01:21:07] linuxboy_: has joined #ruby
[01:21:22] monoprotic: make up an address
[01:21:29] Contigi: has joined #ruby
[01:21:55] sharkman: i think my friend is doing it for me now. if he cant ill pay you, or someone else, a few dollars in bitcoins, if that makes it worth your time
[01:22:07] monoprotic: not me, maybe someone else
[01:22:44] Pharaoh2: has joined #ruby
[01:22:46] ndrei: has joined #ruby
[01:22:50] drewvanstone: has joined #ruby
[01:22:56] Maletor: has joined #ruby
[01:23:13] sharkman: boy im hungry. ive been working all day
[01:23:16] sharkman: havent even eaten much
[01:23:48] diego2: has joined #ruby
[01:23:58] diego2: has joined #ruby
[01:24:30] jenrzzz: has joined #ruby
[01:26:08] filipe: has joined #ruby
[01:26:45] filipe: since true/false is frozen i18n specs are failing.
[01:26:56] filipe: anyone interesting in debuging it with me ? https://github.com/svenfuchs/i18n/issues/281
[01:27:21] tkuchiki: has joined #ruby
[01:27:26] filipe: ups, wrong link. this issue: https://github.com/svenfuchs/i18n/issues/324
[01:27:40] SenpaiSilver_: has joined #ruby
[01:27:53] filipe: would be interested in pairprogramming
[01:28:50] SenpaiSilver_: has joined #ruby
[01:30:23] SenpaiSilver_: has joined #ruby
[01:31:00] ec\: has joined #ruby
[01:31:05] cina: has joined #ruby
[01:31:17] ndrei: has joined #ruby
[01:31:17] webguynow: has joined #ruby
[01:31:32] ipstatic: has joined #ruby
[01:31:52] nietzschette: has joined #ruby
[01:32:54] rushed: has joined #ruby
[01:34:22] tatsuya_o: has joined #ruby
[01:34:59] Guest61: has joined #ruby
[01:35:06] robwri32: has joined #ruby
[01:35:31] Guest61: Evening everybody
[01:36:06] sharkman: hey i will pay someone $5 in bitcoins to make an account on a sports betting site to let me use. i wont deposit money. just want to use it to look at betting lines
[01:36:37] CloCkWeRX: has left #ruby: ()
[01:36:42] Guest61: i've got a begininer question
[01:36:52] ndrei_: has joined #ruby
[01:38:15] monoprotic: Guest61 shoon
[01:38:28] psk17_: has joined #ruby
[01:38:29] webguynow: has joined #ruby
[01:39:06] Guest61: ok so i'm taking this ruby and rails class really wrapping my head around the conecpts and all, now i'm wanting to work with some real data... i've got this csv file with some relevant data.
[01:39:29] ledestin: has joined #ruby
[01:40:00] Guest61: whats the best way of doing this? i'm reading rake tasks, also i'm seeing some on the fly style variants.
[01:40:29] Guest61: which is what i'm trying to accomplish at this point my fall back is try and seed the db some how
[01:40:44] Guest61: so the error i'm getting relates to the file path of my csv file
[01:41:00] Guest61: csv_text = File.read('files/demo.csv')
[01:41:03] monoprotic: there is also a rails channel
[01:41:07] monoprotic: #rubyonrails
[01:41:12] Guest61: so this is a rails question?
[01:41:35] monoprotic: just general advice
[01:41:47] Guest61: @monoprotic i guess your right
[01:41:57] Guest61: can i still ask?
[01:42:46] webguynow: has joined #ruby
[01:43:55] kies: has joined #ruby
[01:44:38] Guest61: i guess my question is where should i put the file, currently it resides in app/assets/files/demo.csv but the error message i'm getting does provide much more info
[01:44:41] Spami: has joined #ruby
[01:45:45] bmurt: has joined #ruby
[01:46:54] ndrei: has joined #ruby
[01:47:15] sankaber: has joined #ruby
[01:48:08] s00pcan: has joined #ruby
[01:49:40] umgrosscol: has joined #ruby
[01:49:55] BraddPitt: has joined #ruby
[01:51:19] Kyle__: has joined #ruby
[01:51:27] pontiki: Guest61: in Rails, the app/assets folder is for things which are supposed to be delivered to the user's client
[01:51:30] webguynow: has joined #ruby
[01:51:38] pontiki: you shouldn't use it for your back end application data
[01:52:16] Guest61: @pontiki i moved it over to a rake file and the csv into the db folder
[01:52:33] pontiki: ACTION nods
[01:52:45] Guest61: @pontiki it seems to be connecting but i'm getting a new error
[01:53:05] Guest61: http://stackoverflow.com/questions/12028334/having-trouble-seeding-csv-file-into-rails-app
[01:53:13] sil3nt_: has joined #ruby
[01:53:24] dgutierrez1287: has joined #ruby
[01:54:02] Guest61: i should edit his solution to have as many columns as my spreed sheet correct?
[01:55:36] pontiki: the model's attributes should match the columns in the CSV
[01:56:00] jgt1: has joined #ruby
[01:56:48] ndrei: has joined #ruby
[01:59:43] x-light: has joined #ruby
[02:01:05] chipotle: has joined #ruby
[02:01:40] Rollabunna: has joined #ruby
[02:02:32] arescorpio: has joined #ruby
[02:05:13] A124: has joined #ruby
[02:09:09] moeabdol: has joined #ruby
[02:10:24] webguynow: has joined #ruby
[02:10:42] pygospa: has joined #ruby
[02:11:35] houhoulis: has joined #ruby
[02:11:46] ndrei: has joined #ruby
[02:13:45] ngscheurich: has joined #ruby
[02:14:05] jenrzzz: has joined #ruby
[02:15:26] Guest61: has joined #ruby
[02:15:30] robwri32: has joined #ruby
[02:17:09] webguynow: has joined #ruby
[02:17:20] rcs: has joined #ruby
[02:17:41] ndrei: has joined #ruby
[02:18:14] rohit: has joined #ruby
[02:18:21] devbug: has joined #ruby
[02:18:39] robwri32: @pontiki sorry i got disconnected
[02:18:41] linuxboytoo: has joined #ruby
[02:22:10] cih: has joined #ruby
[02:27:41] iamninja: has joined #ruby
[02:28:34] siaW: has left #ruby: ()
[02:28:37] ndrei: has joined #ruby
[02:29:35] BraddPitt: what is the ruby way for formatting multiple method chaining?
[02:30:59] grenierm: has joined #ruby
[02:32:29] RickHull: BraddPitt: got an example?
[02:32:51] RickHull: generally: this.that.foo.bar # is fine
[02:34:20] EminenceHC: has joined #ruby
[02:36:53] bmurt: has joined #ruby
[02:37:14] BraddPitt: what if it gets real long
[02:37:19] BraddPitt: each call on its own line?
[02:41:41] arooni: has joined #ruby
[02:41:46] RickHull: generally: this.that.\nfoo.bar
[02:42:41] RickHull: i would say it's up to you to decide where to linebreak a method chain
[02:42:57] RickHull: leave the dot on the first line, continue the method chain on the second line
[02:43:04] baweaver: has joined #ruby
[02:43:46] ndrei: has joined #ruby
[02:43:47] RickHull: ~80ch linebreaks are the closest thing to a standard
[02:45:25] rattatmatt: has joined #ruby
[02:48:29] Ox0dea: You can also have leading rather than trailing dots in most circumstances.
[02:48:54] Ox0dea: It makes it easier to see that it's a chain, but you can't comment out intermediates without introducing a syntax error.
[02:49:21] RickHull: interesting, i'd argue the opposite. with no trailing dot, it looks like a complete expression
[02:49:28] RickHull: (the first line of the chain)
[02:49:39] RickHull: given that we start at the first line
[02:49:39] ndrei: has joined #ruby
[02:49:54] RickHull: this.that\n.foo.bar is misleading
[02:49:59] RickHull: this.that.\nfoo.bar is not
[02:50:17] Ox0dea: Sure, but Ruby lets us do it anyway, and a column of dots is pretty visible.
[02:50:45] RickHull: yeah, for lines > 2, maybe
[02:50:55] BraddPitt: o doagree RickHull
[02:51:01] BraddPitt: i disagree*
[02:51:08] webguynow: has joined #ruby
[02:51:11] BraddPitt: this.makes\n.more.sense
[02:51:19] BraddPitt: sure, it causes lookback
[02:51:31] Ox0dea: Why would you want that?
[02:51:42] devbug_: has joined #ruby
[02:51:47] BraddPitt: because the other way makes you think the newline method might be its own call
[02:51:58] Ox0dea: > the newline method
[02:52:48] RickHull: newline method > crystal method
[02:52:55] segfalt``: has joined #ruby
[02:53:39] RickHull: foo = bar\n.ha_ha_only_kidding
[02:53:46] cih: has joined #ruby
[02:53:51] cantaberry: has joined #ruby
[02:54:39] RickHull: ary = [1,2,3]\n.reverse # boosh
[02:54:51] BraddPitt: if thats the case RickHull, i would do newline after assignment operator and then continue as usual
[02:55:04] RickHull: i like your style BraddPitt
[02:55:12] BraddPitt: foo = \nbar.then.whatever.else\n.if.needed
[02:55:44] ndrei_: has joined #ruby
[02:55:48] RickHull: particularly given that tools like git do line-oriented diffs
[02:55:59] RickHull: i would avoid lines-in-isolation being misleading
[02:56:01] ivanskie: has joined #ruby
[02:56:35] devbug: has joined #ruby
[02:56:38] RickHull: that is, any mutiline expression
[02:56:45] RickHull: should have a trailing continuation token
[02:56:47] baweaver: I would laugh, choose one, put it in a style guide, and then proceed to laugh harder at everyone else wasting hours debating pointless things like that.
[02:56:51] RickHull: e.g. dot, equals
[02:57:05] baweaver: Bike shedding at its finest
[02:57:31] pontiki: what colour is your shed, mate?
[02:57:40] RickHull: so long as it's black
[02:58:25] RickHull: to me, it's clear that you want to include the line-continuation token
[02:58:32] RickHull: to avoid the line-oriented diff problem
[02:59:28] devbug__: has joined #ruby
[03:00:22] gener1c: has joined #ruby
[03:00:51] RickHull: both humans and ruby parsers operate top-to-bottom
[03:01:06] RickHull: so why introduce an ambiguity (is this a complete expression?) at the top line?
[03:02:18] Guest61: has joined #ruby
[03:02:22] robwri32: has joined #ruby
[03:02:46] RickHull: thus, this decision is EZ-button
[03:02:56] webguynow: has joined #ruby
[03:03:51] umgrosscol: has joined #ruby
[03:05:03] ndrei: has joined #ruby
[03:05:16] RickHull: I'd go so far as to question the judgment of anyone who thinks it's really a tossup
[03:07:18] RickHull: (including Matz)
[03:08:15] webguynow: has joined #ruby
[03:08:34] karapetyan: has joined #ruby
[03:09:20] matp_: has joined #ruby
[03:09:25] beauby: has joined #ruby
[03:10:18] braincrash: has joined #ruby
[03:10:30] Joufflu: has joined #ruby
[03:10:46] ndrei_: has joined #ruby
[03:11:33] catcher: has joined #ruby
[03:12:47] stardiviner: has joined #ruby
[03:14:25] ngscheurich: has joined #ruby
[03:14:35] opensource_ninja: has joined #ruby
[03:16:21] dopamean_: has joined #ruby
[03:19:04] psk17_: has joined #ruby
[03:20:06] ndrei: has joined #ruby
[03:20:13] pontiki: i agree with you on this, but it's interesting to me that the norm in JavaScript is to do it the other way
[03:20:20] pontiki: s/but/and/
[03:20:53] bb010g: has joined #ruby
[03:22:06] dopie: has joined #ruby
[03:22:18] RickHull: oh god, don't get me started on trailing commas in JSON
[03:22:21] rezzack: has joined #ruby
[03:22:33] RickHull: worst.decision.ever except for the WWII stuff
[03:23:22] Ox0dea: Bletchley Park used JavaScript, you say?
[03:23:39] RickHull: i was going to make a hitler or nazi analogy, then backed off
[03:23:49] Ox0dea: Still Godwin's.
[03:23:58] RickHull: just barely, i think i can still duck it
[03:25:33] ndrei: has joined #ruby
[03:26:20] rushed: has joined #ruby
[03:27:17] jgt1: has joined #ruby
[03:30:19] chipotle: has joined #ruby
[03:31:37] darkf: has joined #ruby
[03:32:01] iateadonut: has joined #ruby
[03:32:14] failshell: has joined #ruby
[03:34:18] Ox0dea: RickHull: Still about?
[03:35:05] tatsuya_o: has joined #ruby
[03:36:06] nofxx: has joined #ruby
[03:36:06] nofxx: has joined #ruby
[03:37:31] webguynow: has joined #ruby
[03:37:52] Ox0dea: RickHull: I think you were probably right all along. http://i.imgur.com/tX3LCQd.png
[03:38:22] RickHull: not sure i get it, does this go back to my crystal method quip?
[03:38:35] Ox0dea: Much further back than that.
[03:38:41] Ox0dea: Note the double quotes.
[03:39:21] RickHull: i'm still whooshing
[03:39:44] Ox0dea: We quibbled about Google trying to impose itself upon us when we explicitly request otherwise.
[03:40:10] gix: has joined #ruby
[03:40:39] ndrei: has joined #ruby
[03:40:43] RickHull: i'm not sure if it's my new job or what
[03:41:06] RickHull: but I have been recently very disappointed with web search results for the problems i've been facing
[03:41:30] RickHull: maybe it's because i'm so weak to expect that the internet can solve my problems with a few keywords
[03:41:51] RickHull: but websearch==google for me
[03:42:22] Ox0dea: > The production of too many useful things results in too many useless people.
[03:42:54] Ox0dea: I'm only poking fun, of course.
[03:43:03] RickHull: i agree with the sentiment
[03:43:11] Ox0dea: Marx was a clever fellow.
[03:43:18] RickHull: which implies that most of humanity is useless
[03:43:39] Ox0dea: Ask not for whom the bell tolls.
[03:43:54] RickHull: what does that mean?
[03:44:02] jenrzzz: has joined #ruby
[03:44:02] RickHull: i've read the hemingway book, and I love the metallica song
[03:44:37] RickHull: the reading of the book was so long ago, and it doesn't have the sticking power of the metallica lyrics
[03:44:37] Ox0dea: It's the same sentiment as expressed in "no man is an island", as I see it.
[03:45:11] RickHull: the bell tolling, that is an information delivery? a signal?
[03:45:48] RickHull: not sure how i missed that critical bridge in all of it
[03:46:00] RickHull: i was fascinated by the hemingway story of being a spanish guerilla
[03:46:28] rakm: has joined #ruby
[03:46:30] RickHull: but not sure I got the big picture idea he was trying to send. a signal, if you will ;)
[03:47:39] RickHull: > The book's title is taken from the metaphysical poet John Donne's series of meditations and prayers on health, pain, and sickness (written while Donne was convalescing from a nearly fatal illness) published in 1624 as Devotions upon Emergent Occasions, specifically Meditation XVII. Hemingway quotes part of the meditation (using Donne's original spelling) in the book's epigraph, which in turn refers to the practice of funeral tolling:
[03:47:50] RickHull: > No man is an Iland, intire of it selfe; every man is a peece of the Continent, a part of the maine; if a Clod bee washed away by the Sea, Europe is the lesse, as well as if a Promontorie were, as well as if a Mannor of thy friends or of thine owne were; any mans death diminishes me, because I am involved in Mankinde; And therefore never send to know for whom the bell tolls; It tolls for thee.
[03:48:41] RickHull: so it's something like coming face-to-face with one's own demise
[03:48:47] moeabdol: has joined #ruby
[03:49:27] RickHull: i'm not sure if it's about the futility of such -- don't even bother inquiring if it's for you or not -- it can't matter
[03:49:49] RickHull: or if it's more about a life well-lived gives no consideration for such
[03:50:02] dima_: has joined #ruby
[03:50:07] charliesome: has joined #ruby
[03:50:10] Ox0dea: Art is about interpretation, you say?
[03:50:25] RickHull: art is shite, say I
[03:50:36] PlasmaStar: has joined #ruby
[03:50:46] Ox0dea: > Art is, for all its faults, at least selfless; a work of art gives, by its very nature and without even the possibility of reciprocation, the whole of itself. But WYGIWYS.
[03:51:08] RickHull: in that art is a message, i agree
[03:51:16] Ox0dea: Art is a mirror.
[03:51:17] RickHull: the message has no concern for its sender, only the recipient
[03:52:05] luckyme: has joined #ruby
[03:52:51] RickHull: has joined #ruby
[03:53:03] RickHull: i'm back, what did i miss
[03:53:12] RickHull: just when it was starting to get gfood
[03:53:30] havenwood: has joined #ruby
[03:53:39] pontiki: you're referring to the artifact, not the art
[03:53:49] pontiki: art is a process, and as such is entirely selfish
[03:54:01] RickHull: i'm with you so far
[03:54:08] pontiki: that's it :)
[03:54:11] RickHull: it's a personal expression, that can only have external value
[03:54:20] RickHull: if those who receive it value it as such
[03:54:21] pontiki: the artifact
[03:54:29] pontiki: but the process has instrinsic value
[03:54:38] pontiki: *only* intrinsic value
[03:54:51] devbug: has joined #ruby
[03:55:00] pontiki: then again, my photog teacher said "it's not art until the check clears the bank" :)
[03:55:36] pontiki: i love painting
[03:55:41] RickHull: makes sense to me. though i disagree with your photog teacher
[03:55:46] aaeron: has joined #ruby
[03:55:50] kp666: has joined #ruby
[03:55:51] pontiki: oh, you know, he was joking (sommat)
[03:56:05] RickHull: well it's a good sentiment to hold
[03:56:16] baweaver: heh, then I've made a lot of art lately.
[03:56:17] RickHull: i just disagree with its truth value / definition
[03:56:50] sdfgsdfg: has joined #ruby
[03:57:07] Pharaoh2: has joined #ruby
[03:57:29] aaeron1: has joined #ruby
[03:57:30] RickHull: fundamentally, art is expression. it's when someone focuses on expression, particularly concerned with the resulting product, that process becomes art
[03:57:42] Pathfinder: has joined #ruby
[03:57:49] towski_: has joined #ruby
[03:58:02] pontiki: when i shuffle through my paintings, they don't have any extrinsic or intrinsic value in themselves. they invoke memories and learning
[03:58:08] pontiki: but it's not the thing itself
[03:58:14] aaeron1: has joined #ruby
[03:58:21] pontiki: all art is performance; all performance is art
[03:58:27] RickHull: probably there is intrinsic value
[03:58:41] dopie: has joined #ruby
[03:58:43] RickHull: i would say when there is an intention for creating extrinsic value, thus art
[03:58:43] pontiki: nah, it's just paper and pigment
[03:59:06] RickHull: the art may fail or succeed at creating extrinsic value
[03:59:12] Exuma: has joined #ruby
[03:59:13] RickHull: it's the intention that matters
[03:59:36] pontiki: i can imagine that's important
[04:00:32] tejasmanohar: has joined #ruby
[04:01:50] ndrei: has joined #ruby
[04:02:35] Rollabunna: has joined #ruby
[04:03:53] grenierm: has joined #ruby
[04:05:32] TvL: has joined #ruby
[04:09:01] djbkd: has joined #ruby
[04:09:35] ndrei: has joined #ruby
[04:11:13] beauby: has joined #ruby
[04:11:38] RickHull: has left #ruby: ()
[04:14:24] Exuma: has joined #ruby
[04:16:01] braincrash: has joined #ruby
[04:20:28] dgutierrez1287: has joined #ruby
[04:23:09] karapetyan: has joined #ruby
[04:23:55] karapetyan: has joined #ruby
[04:24:30] webguynow: has joined #ruby
[04:25:47] karapetyan: has joined #ruby
[04:26:34] RickHull1: has joined #ruby
[04:28:31] lkba_: has joined #ruby
[04:28:35] iamninja: has joined #ruby
[04:30:20] rohit: has joined #ruby
[04:30:31] voltalio: has joined #ruby
[04:31:11] pawnbox: has joined #ruby
[04:31:50] poguez_: has joined #ruby
[04:33:28] devoldmx: has joined #ruby
[04:36:16] Luming: has joined #ruby
[04:37:44] vondruch: has joined #ruby
[04:38:29] youngbaks: has joined #ruby
[04:41:47] wldcordeiro: has joined #ruby
[04:42:50] ndrei: has joined #ruby
[04:46:10] beauby: has joined #ruby
[04:47:30] dEPy: has joined #ruby
[04:50:09] ndrei: has joined #ruby
[04:51:57] yfeldblum: has joined #ruby
[04:54:06] jenrzzz: has joined #ruby
[04:54:53] dEPy: Any way to check which gem is using another gem specified in Gemfile.lock?
[04:55:35] astrobunny: has joined #ruby
[04:56:07] subshad: has joined #ruby
[04:56:44] pontiki: it's in the hierarchy
[04:58:07] pawnbox: has joined #ruby
[04:58:15] ndrei: has joined #ruby
[04:58:59] nofxx: when inside rescue how to re-raise the error? rescue Foo => e; ...... ; fail e ? raise e? super?
[05:00:36] gamov: has joined #ruby
[05:02:08] webguynow: has joined #ruby
[05:02:46] Billias: has joined #ruby
[05:03:08] gamov: Hello. I have a fairly simple question that I can't figure out nor google. Basically, I want to set a default block if no implicit block is given to a method but I can't make it work:
[05:03:09] gamov: assert_sorted array, &block
[05:03:10] gamov: block ||= ->{|i,j| i <= j }
[05:03:49] lkba: has joined #ruby
[05:04:02] gamov: assert array.each_cons(2).all?(&block)
[05:04:14] MichaelSmith: has left #ruby: ()
[05:04:40] ndrei: has joined #ruby
[05:04:58] AndChat-43764: has joined #ruby
[05:07:16] Cache_Money: has joined #ruby
[05:07:16] tkuchiki: has joined #ruby
[05:07:35] mary5030: has joined #ruby
[05:08:56] astrobunny: has joined #ruby
[05:09:27] dhjondoh: has joined #ruby
[05:12:06] webguynow: has joined #ruby
[05:17:59] HAL2328: has joined #ruby
[05:18:05] apeiros: gamov: you got the syntax wrong. it's ->(i,j) { i <= j }
[05:18:52] tejasmanohar: has joined #ruby
[05:19:37] moeabdol: has joined #ruby
[05:20:13] rickmasta: has joined #ruby
[05:27:17] tw1sted: has joined #ruby
[05:27:45] cih: has joined #ruby
[05:28:02] jgt1: has joined #ruby
[05:28:20] gamov: apeiros: sorry, i pasted wrongly. I made a gist: https://gist.github.com/gamov/96e7c36beababe48719a
[05:28:33] webguynow: has joined #ruby
[05:30:58] astrobunny: has joined #ruby
[05:31:25] shmilan: has joined #ruby
[05:31:41] ndrei: has joined #ruby
[05:31:58] Timba-as: has joined #ruby
[05:32:13] x-light: has joined #ruby
[05:32:26] sdothum: has joined #ruby
[05:33:02] failshell: has joined #ruby
[05:34:55] cih: has joined #ruby
[05:35:45] tatsuya_o: has joined #ruby
[05:37:15] ndrei: has joined #ruby
[05:38:58] devn: ?a??b:?c
[05:38:58] ruboto: I don't know anything about a
[05:39:13] Timba-as: has joined #ruby
[05:39:14] techietrash: has joined #ruby
[05:39:22] diegoviola: has joined #ruby
[05:40:33] sdfgsdfg: has joined #ruby
[05:41:40] sdfgsdfg: has joined #ruby
[05:42:40] tagrudev: has joined #ruby
[05:43:25] ndrei: has joined #ruby
[05:44:39] Pathfinder: has joined #ruby
[05:44:52] jaequery: has joined #ruby
[05:45:34] pawnbox: has joined #ruby
[05:46:04] yfeldblum: has joined #ruby
[05:46:14] mary5030: has joined #ruby
[05:46:33] rattatmatt: has joined #ruby
[05:46:38] cih: has joined #ruby
[05:47:13] dhjondoh: has joined #ruby
[05:48:07] mozzarella: gamov: try this: https://gist.github.com/sam113101/e1df958ce3a443b0fa9e
[05:49:06] solars: has joined #ruby
[05:49:20] youngbaks: has joined #ruby
[05:49:43] last_staff: has joined #ruby
[05:50:32] miguelff: has joined #ruby
[05:50:35] gamov: mozzarella: same error
[05:51:30] mozzarella: gamov: what is it?
[05:51:38] mozzarella: works fine here
[05:52:23] ndrei: has joined #ruby
[05:52:25] gamov: mozzarella: ArgumentError: wrong number of arguments (1 for 2) (i'm using ruby 1.9.3, will retry on current ruby)
[05:52:58] mozzarella: gamov: are you sure you're using the code I??just gave you???
[05:54:02] mozzarella: 1.9> def assert_sorted(array); block = block_given? ? Proc.new : lambda {|i,j| i+1 < j+1}; end; assert_sorted([])
[05:54:05] glennt: has joined #ruby
[05:54:13] mozzarella: 19> def assert_sorted(array); block = block_given? ? Proc.new : lambda {|i,j| i+1 < j+1}; end; assert_sorted([])
[05:54:24] mozzarella: what's the syntax, again?
[05:54:29] mozzarella: 19>> def assert_sorted(array); block = block_given? ? Proc.new : lambda {|i,j| i+1 < j+1}; end; assert_sorted([])
[05:54:30] ruboto: mozzarella # => #<Proc:0x83dbd34@/tmp/execpad-289e65dfdebc/source-289e65dfdebc:2 (lambda)> (https://eval.in/435423)
[05:54:52] mozzarella: see? works fine
[05:55:32] codecop: has joined #ruby
[05:56:03] miguelff: has joined #ruby
[05:57:18] dionysus69: has joined #ruby
[05:57:29] miguelff: has joined #ruby
[05:58:04] ndrei: has joined #ruby
[05:59:43] Pupp3tm4st3r: has joined #ruby
[06:00:02] nofxx: ?????????????????????????????? which are the coolest for a cli app? one of each
[06:01:42] krz: has joined #ruby
[06:03:07] davedev24: has joined #ruby
[06:03:24] Rollabunna: has joined #ruby
[06:04:07] ndrei: has joined #ruby
[06:04:23] alexUaN: has joined #ruby
[06:04:53] Timba-as: has joined #ruby
[06:05:00] weemsledeux: has joined #ruby
[06:05:42] astrobunny: has joined #ruby
[06:05:48] tejasmanohar: has left #ruby: ()
[06:06:17] drewvanstone: has joined #ruby
[06:07:06] bruno-: has joined #ruby
[06:07:50] RandyT: has joined #ruby
[06:09:44] pawnbox: has joined #ruby
[06:10:35] n008f4g_: has joined #ruby
[06:11:10] webguynow: has joined #ruby
[06:13:14] HoloIRCUser4: has joined #ruby
[06:13:14] Gnomethrower: has joined #ruby
[06:13:28] Gnomethrower: has joined #ruby
[06:15:43] jgt1: has joined #ruby
[06:15:46] Sembei: has joined #ruby
[06:15:51] BraddPitt: i use ??? for my terminal prompt
[06:15:57] BraddPitt: i quite like it
[06:19:13] emilkarl: has joined #ruby
[06:19:35] pawnbox_: has joined #ruby
[06:20:16] r0x0rZ: has joined #ruby
[06:20:43] Stan: has joined #ruby
[06:22:50] nofxx: baweaver, that would make me want to play half life
[06:23:43] eGGsha: has joined #ruby
[06:24:18] miguelff: has joined #ruby
[06:24:52] diego1: has joined #ruby
[06:25:01] diego1: has joined #ruby
[06:25:40] youngbaks: has joined #ruby
[06:26:08] baweaver: Lambda Calculus for me.
[06:27:28] nofxx: ACTION glad I had much more fun on teenages
[06:28:44] linux_dr: has joined #ruby
[06:29:24] iamninja: has joined #ruby
[06:31:09] ndrei: has joined #ruby
[06:32:45] astrobunny: has joined #ruby
[06:33:03] linux_dr: I just submitted a PR to the Vagrant project, but am still trying to get the unit tests to pass??? (Before I saw the Travis log, I didn???t know how to build or test my changes)??? any suggestions???? I???m not sure quite what I???m reading in the unit tests??? :-(
[06:33:09] ghostlines: has joined #ruby
[06:33:18] certainty: nofxx: what's more fun than lambda calculus? xD
[06:35:05] firstdayonthejob: has joined #ruby
[06:35:07] pawnbox: has joined #ruby
[06:36:33] tatsuya_o: has joined #ruby
[06:37:09] khebbie: has joined #ruby
[06:37:59] devbug_: has joined #ruby
[06:38:02] diego1: has joined #ruby
[06:38:10] diego1: has joined #ruby
[06:39:14] tkuchiki: has joined #ruby
[06:40:09] miguelff: has joined #ruby
[06:40:22] yfeldblum: has joined #ruby
[06:41:34] cih: has joined #ruby
[06:42:03] baweaver: quick problem: Given an array of integers, find the integer that has an odd number of repetitions: [1,1,2] -> 2, [1,1,2,2,3,3,3] -> 3
[06:42:21] baweaver: (I know the answer, but have fun)
[06:42:59] code4fun: has joined #ruby
[06:43:03] tbuehlmann: the one and only answer, I suppose
[06:43:11] code4fun_: has joined #ruby
[06:43:11] ndrei: has joined #ruby
[06:44:10] baweaver: oh there are multiple
[06:44:34] baweaver: some involving hashes, others arrays, some with certain other fun bits
[06:44:59] baweaver: Ox0dea, why aren't you here for golf fun....
[06:45:27] shevy: that dam golfing
[06:46:03] rezzack1: has joined #ruby
[06:46:40] cih: has joined #ruby
[06:46:46] skullcrasher: has joined #ruby
[06:47:24] dgutierrez1287: has joined #ruby
[06:47:52] michael_mbp: has joined #ruby
[06:47:59] baweaver: shevy: care to take a swing?
[06:48:25] diego1: has joined #ruby
[06:50:02] lsmola: has joined #ruby
[06:50:55] gamov: mozzarella: sorry, went out for lunch. if I supply an empty array, it works, but not a full array??? strange
[06:51:52] weemsledeux: has joined #ruby
[06:51:56] baweaver: >> [1,1,2,2,3,3,3].reduce(:^)
[06:51:57] ruboto: baweaver # => 3 (https://eval.in/435439)
[06:52:19] baweaver: shevy: Lookit, reduce is smiling
[06:52:49] baweaver: >> [1,3,2,1,2,3,3].reduce(:^)
[06:52:50] ruboto: baweaver # => 3 (https://eval.in/435440)
[06:55:09] ndrei: has joined #ruby
[06:55:16] gamov: mozzarella: with [], it passes but as long as something is in the array, it fails. looks like the calling method is not providing 2 parameters to the block. It's very strange, it's the same block???
[06:55:23] khebbie: has joined #ruby
[06:55:54] CloCkWeRX: has joined #ruby
[06:56:21] mozzarella: just show your code and the error message
[06:56:51] mary5030: has joined #ruby
[06:57:11] aswen: has joined #ruby
[06:57:13] baweaver: https://gist.github.com/baweaver/c9f3f7191a514b14a645 - Other fun problem, though that'll take a bit. Fork it and comment on the original if you want me to look over it.
[06:57:45] shevy: baweaver yeah those smileys in ruby due to : can be weird
[06:58:38] baweaver: shevy: want to take a stab at that one? :D
[06:58:40] baweaver: It's more fun.
[06:59:13] baweaver: I'll probably use it for interviews later.
[06:59:37] tomaz_b: has joined #ruby
[07:00:03] youngbaks: has joined #ruby
[07:00:41] ndrei: has joined #ruby
[07:01:20] Feyn: has joined #ruby
[07:02:39] shevy: stab ... stab... stabby lambda!
[07:04:20] gamov: mozzarella: it's your proposition, https://eval.in/435464
[07:05:48] rushed: has joined #ruby
[07:06:20] yfeldblum: has joined #ruby
[07:06:31] skade: has joined #ruby
[07:06:42] chipotle: has joined #ruby
[07:06:59] ndrei: has joined #ruby
[07:07:39] moeabdol: has joined #ruby
[07:08:24] allomov: has joined #ruby
[07:08:28] arup_r: has joined #ruby
[07:09:25] greenarrow: has joined #ruby
[07:09:50] sanjayu: has joined #ruby
[07:09:53] greenarrow: has joined #ruby
[07:12:37] ndrei: has joined #ruby
[07:13:55] ruby-lang317: has joined #ruby
[07:14:33] skade: has joined #ruby
[07:14:40] DoubleMalt: has joined #ruby
[07:18:38] webguynow: has joined #ruby
[07:18:52] Asher: has joined #ruby
[07:19:21] gamov: mozzarella: ok, with 2.2,, it works: https://eval.in/435520 | block ||= lambda {|i,j| i < j} generates wrong results
[07:19:26] SCHAAP137: has joined #ruby
[07:19:30] ndrei: has joined #ruby
[07:20:21] Asher: has joined #ruby
[07:21:57] arup_r: has joined #ruby
[07:23:26] solars: has joined #ruby
[07:24:51] CloCkWeRX1: has joined #ruby
[07:25:03] Luming: has joined #ruby
[07:26:00] Luming: has joined #ruby
[07:26:14] anisha: has joined #ruby
[07:26:23] certainty: baweaver: what's your solution to find all integers that have an odd number of repitions?
[07:26:28] certainty: repetitions
[07:26:36] vondruch: has joined #ruby
[07:26:52] Luming: has joined #ruby
[07:26:53] baweaver: >> [1,5,3,4,4,3,1].reduce(:^)
[07:26:54] ruboto: baweaver # => 5 (https://eval.in/435546)
[07:27:01] certainty: that just one
[07:27:13] certainty: it's a neat solution, no doubt
[07:28:07] webguynow: has joined #ruby
[07:28:23] c0m0: has joined #ruby
[07:29:10] pawnbox: has joined #ruby
[07:29:18] maloik: am I right in arguing that when you call a method "add_ns_records_to_domain", all logic about when or when not to add those methods is better off outside of the actual method?
[07:29:22] michael_mbp: has joined #ruby
[07:29:55] maloik: to me this makes perfect sense, but a colleague has a bunch of guard conditions inside the method (that have to do with biz logic) that could make it return nil for a couple reasons and simply not do anything
[07:30:00] pawnbox_: has joined #ruby
[07:30:38] ndrei: has joined #ruby
[07:30:55] maloik: in this case, he's calling the method on after_create for each dns record object, where I'm arguing you should call it after_create "if the dns record is the first for that domain and the record itself isnt an NS record"
[07:30:55] baweaver: >> [1,2,3,3,4,4].reduce(Hash.new { |h,k| h[k] = 0 }) { |a,v| a[v].zero? ? a[v] += 1 : a[v] -= 1; a }.select { |k,v| v == 1 }.keys
[07:30:56] ruboto: baweaver # => [1, 2] (https://eval.in/435553)
[07:31:41] lxsameer: has joined #ruby
[07:31:42] certainty: baweaver: ok so with a hash. that's roughly the solution i had.
[07:31:45] Macaveli: has joined #ruby
[07:31:58] baweaver: could also:
[07:32:01] certainty: >> [1,2,3,3,4,4].each_with_object(Hash.new {|h,k| h[k] = 0 }) { |num, h| h[num] +=1 }.select { |_,v| v.odd? }.keys
[07:32:02] ruboto: certainty # => [1, 2] (https://eval.in/435555)
[07:32:31] baweaver: >> [1,2,3,3,4,4].group_by(&:itself).select { |k,v| v.length.odd? }.keys
[07:32:32] ruboto: baweaver # => [1, 2] (https://eval.in/435556)
[07:32:40] certainty: that's cool
[07:32:43] certainty: i like that
[07:32:46] kp666: has joined #ruby
[07:33:10] baweaver: As to the pad mapper problem
[07:33:21] baweaver: https://gist.github.com/baweaver/9964225a7600cf7561cb - solution
[07:33:23] kp666: has joined #ruby
[07:33:46] Alina-malina: has joined #ruby
[07:33:58] failshell: has joined #ruby
[07:34:49] baweaver: If you can't tell I tend to spend too much time around FP languages, so I have a habit of avoiding state.
[07:35:03] certainty: baweaver: that's a good thing
[07:35:14] baweaver: especially when I use Spark
[07:36:08] certainty: i try to stay true to the idioms and paradigm of the language i use though. Because my colleagues don't think functional most of the time
[07:36:14] devyn: has joined #ruby
[07:36:32] ndrei: has joined #ruby
[07:36:47] shevy: yeah your colleagues are non-functional crap
[07:37:09] otacon-: has joined #ruby
[07:37:16] certainty: that's not my words and i don't think it's true :)
[07:37:35] shevy: but they don't think functional!!!
[07:37:48] voker57: has joined #ruby
[07:37:56] shevy: I think in apples and bananas so object thinking goes so natural
[07:38:00] certainty: they don't think in terms of functions and idoms found in functional programming languges
[07:38:22] shevy: I never understood functional programming
[07:38:23] certainty: where quite many discourage explicit state, especially mutable state
[07:38:32] moeabdol: has joined #ruby
[07:38:44] shevy: just like the bible
[07:38:59] certainty: shevy: you can still think of objects
[07:39:06] certainty: add arrows and you get categories (probably)
[07:39:16] certainty: not objects in the OO sense
[07:39:36] baweaver: http://adit.io/posts/2013-04-17-functors,_applicatives,_and_monads_in_pictures.html
[07:39:37] pyon: has joined #ruby
[07:39:39] baweaver: There ya go
[07:40:32] certainty: shevy: some things map natural to things we know and are quite easily modeled as objects. What object would be a thing be that mirrors the identity function?
[07:40:50] shevy: the what?
[07:41:04] certainty: identity function a function that returns it's argument
[07:41:14] webguynow: has joined #ruby
[07:41:18] shevy: I even fail at parsing that statement :)
[07:41:19] baweaver: >> 1.itself
[07:41:20] ruboto: baweaver # => 1 (https://eval.in/435558)
[07:41:33] karapetyan: has joined #ruby
[07:41:52] baweaver: [1,1,2,2,3].group_by(&:itself)
[07:41:56] baweaver: >> [1,1,2,2,3].group_by(&:itself)
[07:41:57] ruboto: baweaver # => {1=>[1, 1], 2=>[2, 2], 3=>[3]} (https://eval.in/435559)
[07:41:58] ndrei: has joined #ruby
[07:42:08] certainty: you probably end up with an object that has no data, is just behavior. So what's the point in these things? The lines are blurry
[07:42:54] certainty: shevy: also clojures and higher order functions is all you need to build things that embody most essential OO properties
[07:43:23] certainty: as a fun experiment i let our new colleagues build a pair out of functions only. They build cons/car/cdr as known in lisp just with functions
[07:43:40] shevy: you torture them :(
[07:43:52] certainty: in the end they all found it very interesting
[07:44:03] shevy: they probably wanted to be nice to you :)
[07:44:15] baweaver: >> car, *cdr = [1,2,3,4,5]; car
[07:44:15] certainty: probably :) but i don't think so
[07:44:16] ruboto: baweaver # => 1 (https://eval.in/435560)
[07:44:19] baweaver: >> car, *cdr = [1,2,3,4,5]; cdr
[07:44:20] ruboto: baweaver # => [2, 3, 4, 5] (https://eval.in/435561)
[07:47:35] certainty: baweaver: like this: https://gist.github.com/certainty/f0e33699d5160c87a968
[07:47:47] blaxter: has joined #ruby
[07:48:15] baweaver: would cdr auto-splat that?
[07:48:25] ndrei: has joined #ruby
[07:48:56] [k-: has joined #ruby
[07:49:21] certainty: this version only create cons cells (a . b). so it's not equivalent to the cdr in case of lists
[07:50:55] certainty: it's helps to realize that really data and code are really just two ways to see things
[07:51:06] certainty: somewhat dual
[07:51:23] baweaver: someone's been reading a lot of lisp.
[07:51:33] certainty: i'm a scheme programmer at heart
[07:51:43] baweaver: SICP was it?
[07:51:49] certainty: it's not really about homoiconicity though. it's more general
[07:51:57] certainty: baweaver: yeah sicp showed that as well
[07:52:21] certainty: i love that book
[07:52:51] certainty: but recently i fell in love with haskell
[07:52:59] certainty: not good at it, but i really like it
[07:55:53] devyn: has joined #ruby
[07:56:13] k3asd`: has joined #ruby
[08:00:06] webguynow: has joined #ruby
[08:03:05] certainty: hi flughafen. What's crackin' in the capitol?
[08:03:18] flughafen: so much flying certainty !
[08:03:34] Kedare: has joined #ruby
[08:03:50] flughafen: how are you doing certainty
[08:04:03] certainty: flughafen: i'm doing fine. A bit bored today but fine :)
[08:04:14] certainty: going to shop a new accoustic after work
[08:04:19] Rollabunna: has joined #ruby
[08:04:49] flughafen: what are you going to get?
[08:05:10] certainty: don't know yet. I wanted to try the taylor big baby
[08:05:17] certainty: i will try some
[08:05:21] Denis_: has joined #ruby
[08:05:37] x-light: has joined #ruby
[08:07:13] certainty: also i'll let them check the pickup the selector on my hagstrom. The bridge pickup sometimes just doesn't work. But i think it's a problem with the switch and not the circuitry or the pickup itself
[08:07:27] certainty: maybe too OT. Sorry about that
[08:07:48] banjara: has joined #ruby
[08:09:52] devyn: has joined #ruby
[08:10:05] DoubleMalt: has joined #ruby
[08:10:07] oddmunds: certainty: let me know if you find a place where that is _on_ topic. i want to talk about guitars.
[08:11:24] certainty: oddmunds: maybe #guitar ... don't know if that exists :)
[08:11:52] oddmunds: certainty: it does, let's go there
[08:12:00] Pupeno: has joined #ruby
[08:13:34] marr: has joined #ruby
[08:14:50] burgestrand: has joined #ruby
[08:15:48] groovyshark: has joined #ruby
[08:16:01] Outlastsheep: has joined #ruby
[08:16:18] groovyshark: is math knowledge necessary for programming?
[08:16:31] Motoservo: has joined #ruby
[08:16:34] burgestrand: groovyshark: Sorry, forgot mention. Still no. :)
[08:16:48] groovyshark: what about algorithms
[08:16:56] burgestrand: groovyshark: No.
[08:17:34] burgestrand: groovyshark: Both those things could help in certain cases, but in general programming doesn't require preparational skills to learn.
[08:18:12] burgestrand: groovyshark: You're wrong.
[08:18:16] skade: has joined #ruby
[08:18:39] groovyshark: you can't code a solution without figuring out an algorithm and algorithms require knowledge of math to solve
[08:19:00] burgestrand: groovyshark: What kind of solution, to what problem?
[08:19:16] burgestrand: groovyshark: I disagree.
[08:19:32] groovyshark: okay, do you have limited math knowledge?
[08:19:44] burgestrand: groovyshark: But perhaps your definition of algorithm is broader than mine.
[08:19:48] groovyshark: exactly my moiunt
[08:20:02] burgestrand: groovyshark: I could argue everything is an algorithm, but that doesn't help anyone it just makes learning to program scarier.
[08:20:06] groovyshark: there is no specific definition of algorithm
[08:20:25] groovyshark: no it makes programming what it is it's not scary nor is it not scary
[08:20:27] groovyshark: it is what it is
[08:21:02] groovyshark: and telling people that they don't need to know high level math is dangerous and not beneficial to beginners
[08:21:20] [k-: certainty: haskell is love, haskell is life! <3
[08:21:54] certainty: [k-: :) .. i also meant to have a look at some dependently typed languages. Idris would be cool since haskell
[08:21:56] burgestrand: You don't need high-level math to hide an element in a web page, or to write a website to keep track of your books.
[08:21:58] groovyshark: giving beginners an understanding what subjects they need to know to be at the level where people are working is crucial to saving time for everyone
[08:22:13] shevy: and you know that all beginners need math
[08:22:17] groovyshark: you need math
[08:22:32] groovyshark: shevy: he said you don't before
[08:22:32] burgestrand: groovyshark: Your notion of "where people are working" is too specific.
[08:22:32] pawnbox: has joined #ruby
[08:22:35] shevy: FileUtils.mkdir_p('/tmp/foo') # lots of math required here
[08:22:47] shevy: and he is completely right because it totally depends on what you are doing
[08:22:50] groovyshark: Burgestrand: my notion is jr dev level
[08:22:52] groovyshark: my definition&
[08:22:52] allomov: has joined #ruby
[08:22:54] groovyshark: my definition*
[08:23:07] shevy: ah, you are that gateway guy again :)
[08:23:10] groovyshark: but saying that you don't need math is dangerous and wastes everyone's time
[08:23:22] burgestrand: Yes there's trolling but it's also interesting. :)
[08:23:36] burgestrand: groovyshark: Jr Dev level is not the rest of the world.
[08:23:39] shevy: Burgestrand :D
[08:23:48] groovyshark: jr dev level is the rest of the world
[08:23:54] burgestrand: groovyshark: There's plenty of local businesses where they only want a simple website for simple needs, jr dev level is an illusion.
[08:23:55] karapetyan: ???Ki=1R(N???i,K)
[08:24:10] groovyshark: the sr to jr ratio is astronomical
[08:24:11] karapetyan: that how it works!
[08:24:17] webguynow: has joined #ruby
[08:24:19] burgestrand: groovyshark: The jr to hobby is even more so.
[08:24:20] groovyshark: there are a lot of jr developers and very few senior
[08:24:56] groovyshark: the difference between jr and sr is efficiency and knowledge
[08:24:56] burgestrand: Just because your SF Bay Area startup is getting a lot of press coverage does not mean that's the norm.
[08:25:14] startupality: has joined #ruby
[08:25:18] groovyshark: no 99.99 % of startups fail
[08:25:29] burgestrand: groovyshark: Your numbers are wrong.
[08:26:04] [k-: bring the debate to ?ot please
[08:26:06] groovyshark: well i might have embellished a little
[08:26:20] groovyshark: it's 90% but it's still just as bad
[08:26:54] burgestrand: [k-: Sorry, I'm used to how this channel used to be a few years back when there was no OT channel. :)
[08:27:58] shevy: [k- is haskell offtopic!
[08:28:12] burgestrand: ?????actually, now that there is an OT channel I can't see a clear definition of what the topic would actually be, apart from "ruby".
[08:28:50] jgt1: has joined #ruby
[08:29:29] [k-: shevy: a debate that looks like an argument is off limits!
[08:29:38] jgt: has joined #ruby
[08:30:17] iamninja: has joined #ruby
[08:30:25] burgestrand: I would argue it's an argument that looks like a debate.
[08:31:27] groovyshark: [k-: it's a debate that is trying to ensure beginner's won't fall into the trap of being given wrong advice that waste's everyone's time
[08:31:45] yfeldblum: has joined #ruby
[08:31:47] certainty: shevy: haskell is never offtopic :p
[08:32:21] groovyshark: haskell is a shit language
[08:32:37] groovyshark: it miserably tried to copy c
[08:32:39] groovyshark: and it failed
[08:33:00] burgestrand: What do you use to serialize JSON nowadays? YourModel#as_json, ActiveModel::Serializers, JBuilder, something else entirely?
[08:33:28] [k-: please take your insults to ?ot
[08:33:33] groovyshark: activerecord is what everyone uses
[08:33:50] webguynow: has joined #ruby
[08:33:54] tjbiddle: has joined #ruby
[08:33:55] ruboto: this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related topics. Thanks!
[08:34:18] groovyshark: [k-: it's not an insult... please learn to read and if you knew a lick of haskell you'd see how pointless that language is
[08:34:35] burgestrand: apeiros: You woken up yet? :)
[08:34:43] yfeldblum: has joined #ruby
[08:35:06] [k-: please take your insults to ?ot
[08:35:30] khebbie: has joined #ruby
[08:36:47] pocketprotector: has joined #ruby
[08:36:53] yorickpeterse: groovyshark: [k- actually writes Haskell
[08:37:09] yorickpeterse: groovyshark: also unless you have actual facts to back up statements like that, -> there's the door
[08:37:35] groovyshark: haskell is a ripoff from c
[08:37:37] [k-: thanks yorickpeterse
[08:37:49] greenarrow: has joined #ruby
[08:37:50] groovyshark: why know haskell when you can do things more efficiently in c
[08:37:58] yorickpeterse: groovyshark: then you literally don't know what C and Haskell are
[08:38:02] groovyshark: knowing haskell is a waste of time
[08:38:10] atmosx: yorickpeterse: programming languages?
[08:38:12] atmosx: that was easy.
[08:38:13] groovyshark: c is the most important language to know in the world
[08:38:19] yorickpeterse: groovyshark: this is also your last warning, keep it nice
[08:38:24] atmosx: to know in the known world.
[08:38:53] groovyshark: ruby is only useful to join the rails bandwagon
[08:39:08] groovyshark: and get a 100k salary at a startup
[08:39:31] groovyshark: literally all ruby libraries are written in c
[08:39:38] Pathfinder: has joined #ruby
[08:40:06] felixr: has joined #ruby
[08:40:37] atmosx: groovyshark: I wanna 100k salary on a startup too, but I wanna work from home. No reason to hang around when there's git and slack.
[08:41:01] tatsuya_o: has joined #ruby
[08:41:06] groovyshark: office orgies are a great reason to come to work at an office
[08:41:43] jhass: groovyshark: got a Ruby question? else this is getting rather offtopic and I'd like to ask you to stop it to keep the channel free for Ruby related problems. Thanks!
[08:41:48] atmosx: groovyshark: depends on the coworkers I guess. If you work for the 'Elite fashion agency' I'm all for it.
[08:42:30] groovyshark: i'm starting a company soon and there will be no policies against sexual behavior of any kind
[08:42:39] shevy: he just asks for it
[08:42:49] groovyshark: where is the offtopic channel?
[08:42:55] ruboto: this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related topics. Thanks!
[08:42:58] shevy: and it was triggered the moment jhass wrote something ;)
[08:45:05] prosodyC: That is key. Once we have threading it will be easier to read.
[08:45:40] leafybasil: has joined #ruby
[08:46:28] shevy: so many gateways
[08:49:38] prosodyC: shevy: Yea. You said it.
[08:51:07] karapetyan: has joined #ruby
[08:51:28] TvL: has joined #ruby
[08:52:09] Hounddog: has joined #ruby
[08:52:56] solars: has joined #ruby
[08:55:44] rikkipitt: has joined #ruby
[08:55:57] bigkevmcd: has joined #ruby
[08:56:25] tvw: has joined #ruby
[08:57:19] CustosL1men: has joined #ruby
[08:57:52] shevy: hmm we have .prepend on strings but no .append ?
[08:58:47] Hounddog: has joined #ruby
[08:59:12] jhass: it's called <<
[08:59:59] certainty: no Method#compose :(
[09:00:06] shevy: yeah but it looks non-synergistic when I also use .prepend :(
[09:00:09] shevy: string = ''
[09:00:14] shevy: string.prepend 'hello '
[09:00:18] shevy: string << 'world!'
[09:00:21] f4cl3y: has joined #ruby
[09:00:33] certainty: string = "hellow world!"
[09:00:34] burgestrand: >> "prepend" << "original" << "append"
[09:00:35] ruboto: Burgestrand # => "prependoriginalappend" (https://eval.in/435583)
[09:00:55] burgestrand: Slightly different semantics, keep that in mind.
[09:01:11] webguynow: has joined #ruby
[09:01:18] leafybasil: has joined #ruby
[09:02:33] certainty: if the strings are fresh it's no problem, but if the aren't :(
[09:03:21] zotherstupidguy: has joined #ruby
[09:03:29] shevy: will this even work on ruby 3.0
[09:06:13] jhass: dunno, is there talk about immutable strings?
[09:06:28] Balzrael: has joined #ruby
[09:06:29] shevy: no real idea :)
[09:06:55] shevy: I knew you showed require 'mutable_string'!
[09:07:22] burgestrand: >> str = "original"; str[0, 0] = "prepend"; str[-1, 0] = "append"
[09:07:23] ruboto: Burgestrand # => "append" (https://eval.in/435584)
[09:07:24] felixr: has joined #ruby
[09:07:29] burgestrand: >> str = "original"; str[0, 0] = "prepend"; str[-1, 0] = "append"; str
[09:07:30] ruboto: Burgestrand # => "prependoriginaappendl" (https://eval.in/435585)
[09:07:37] shevy: Burgestrand yeah, that was what I was thinking too...
[09:07:50] burgestrand: We need a -0.
[09:07:50] shevy: "if I use [], then it can be synergistic - only differences would be the numbers"
[09:08:47] shevy: or to use >> along with <<
[09:09:23] webguynow: has joined #ruby
[09:11:38] devyn: has joined #ruby
[09:13:16] burgestrand: certainty: This is maybe a good place to use refinements ;)
[09:13:36] fandi: has joined #ruby
[09:14:00] burgestrand: I feel it's way overkill just to make code look pretty. :)
[09:14:12] yorickpeterse: did somebody just literally suggested refinements?
[09:14:18] BLuEGoD: using EM Deferrable, how do I wait for the callback to succeed? - it's basically setting a value I need to return from that method...
[09:14:28] certainty: Burgestrand: you mean refinements to alter << in the context i want?
[09:14:44] burgestrand: certainty: refinements to make sure there is a String#append and String#prepend!
[09:14:53] certainty: Burgestrand: oh ok :)
[09:15:01] burgestrand: adaedra: Hi! Welcome.
[09:15:17] [k-: welcome adaedra
[09:17:00] CustosL1men: has joined #ruby
[09:18:41] unop: has joined #ruby
[09:19:58] TvL: has joined #ruby
[09:20:27] miguelff: has joined #ruby
[09:25:04] tatsuya_o: has joined #ruby
[09:26:34] Gengxin: has joined #ruby
[09:26:56] Gengxin: has left #ruby: ("ERC (IRC client for Emacs 24.5.1)")
[09:27:43] skade: has joined #ruby
[09:29:55] Igorshp: has joined #ruby
[09:34:39] failshell: has joined #ruby
[09:38:00] Igorshp: has joined #ruby
[09:38:33] bruno-: has joined #ruby
[09:38:36] FastJack: has joined #ruby
[09:38:44] pawnbox: has joined #ruby
[09:41:48] naps62: has joined #ruby
[09:43:08] rdark: has joined #ruby
[09:43:53] dionysus69: has joined #ruby
[09:45:16] webguynow: has joined #ruby
[09:45:26] karapetyan: has joined #ruby
[09:46:07] pawnbox_: has joined #ruby
[09:49:06] Pumukel: has joined #ruby
[09:49:09] Beoran_: has joined #ruby
[09:50:27] lysw123: has joined #ruby
[09:50:52] dionysus69: has joined #ruby
[09:54:47] mprelude: has joined #ruby
[09:55:01] konsolebox: has joined #ruby
[09:55:16] pawnbox: has joined #ruby
[09:56:02] rikkipitt: has joined #ruby
[09:57:26] workmad3: has joined #ruby
[09:57:57] pawnbox__: has joined #ruby
[10:00:01] pawnbox: has joined #ruby
[10:00:51] cih_: has joined #ruby
[10:00:51] lysw123: has joined #ruby
[10:01:22] tenderlove: has joined #ruby
[10:02:33] araujo_: has joined #ruby
[10:04:33] CustosL1men: has joined #ruby
[10:05:13] Rollabunna: has joined #ruby
[10:06:20] toretore: has joined #ruby
[10:06:24] pyon: has joined #ruby
[10:07:55] [k-: shevy: https://www.doc.ic.ac.uk/~susan/475/unmain.html
[10:07:58] Igorshp: has joined #ruby
[10:08:12] [k-: with this, I'll become unstoppable!!!
[10:08:26] adaedra: everybody run
[10:08:32] yorickpeterse: first you got to find a job
[10:09:19] Rurik: has joined #ruby
[10:09:36] certainty: also never create a document about how to write unmaintainable code in a way that is pleasing to the eye and easy to read :)
[10:11:40] adaedra: This lacks some Comic Sans
[10:12:16] shevy: [k- yeah well I guess he refers to unmaintainable languages :)
[10:12:23] Hrorek: has joined #ruby
[10:12:55] shevy: epic quote from the page "Java is schizophrenic"
[10:13:07] SenpaiSilver: has joined #ruby
[10:13:51] dhjondoh: has joined #ruby
[10:13:59] timonv: has joined #ruby
[10:14:25] adaedra: Before I was schizophrenic. Now we're doing fine.
[10:15:10] shevy: certainty you know, the 1990 era of the www
[10:15:16] shevy: blinking marquee
[10:15:39] Rutix: has joined #ruby
[10:15:39] Rutix: has joined #ruby
[10:16:02] certainty: shevy: oh yeah the good stuff
[10:17:19] burgestrand: has joined #ruby
[10:17:29] khebbie: has joined #ruby
[10:18:40] pimpin: has joined #ruby
[10:18:46] ponga: has joined #ruby
[10:18:48] ponga: has joined #ruby
[10:18:48] ponga: has joined #ruby
[10:20:20] rickmasta: has joined #ruby
[10:20:24] drewvanstone: has joined #ruby
[10:20:28] karapetyan: has joined #ruby
[10:20:31] devoldmx: has joined #ruby
[10:24:59] webguynow: has joined #ruby
[10:28:37] Pathfinder: has joined #ruby
[10:29:22] khebbie: has joined #ruby
[10:29:33] dhjondoh: has joined #ruby
[10:29:45] Rollabunna: has joined #ruby
[10:30:11] hadrig: has joined #ruby
[10:31:15] iamninja: has joined #ruby
[10:31:37] stamina: has joined #ruby
[10:31:42] karapetyan: has joined #ruby
[10:32:16] r_baron: has joined #ruby
[10:33:51] Rurik: has joined #ruby
[10:37:03] webguynow: has joined #ruby
[10:37:26] izzol2: I need to create nice console output from my code, I'm looking some nice gem which will help to me create some sort of tables, colors or whatever which will help to see the output correctly
[10:39:18] bruno-: has joined #ruby
[10:40:35] certainty: izzol_: one such thing is highline
[10:41:02] certainty: also terminal-table
[10:42:39] JDiPierro: has joined #ruby
[10:43:45] MagePsycho: has joined #ruby
[10:44:01] shevy: izzol_ term-ansicolors for colors; for table, there was some ascii table generator. https://github.com/flori/term-ansicolor
[10:44:52] shevy: sevenseacat is a patching cat! https://github.com/flori/json/commit/f7394adf3a50631b443135a95ec1bc9d8b8f32ab
[10:47:08] sdothum: has joined #ruby
[10:47:48] shevy: hmm... how many ways do we have in ruby to create a directory... we can use fileutils mkdir ... and we could use system() too, e. g. to use coreutils mkdir. Are there any other ways?
[10:48:20] youngbaks: has joined #ruby
[10:48:23] workmad3: shevy: do you count fileutils mkdir_p to be a different way?
[10:49:09] skade: has joined #ruby
[10:49:52] certainty: that's more like creating a path :p
[10:50:11] phutchins: has joined #ruby
[10:50:31] tkuchiki: has joined #ruby
[10:50:40] shevy: workmad3 would be same, I am more thinking whether there is some exotic way via ffi or something
[10:51:12] certainty: are you bored shevy? xD
[10:51:20] shevy: I think we have a bit more variants when it comes to delete a file, at least, there is File.delete() but also a FileUtils* variant and the system() way
[10:51:26] JDiPierro: has joined #ruby
[10:51:55] shevy: certainty nope! I am working on something and using FileUtils right now to create a directory
[10:52:25] certainty: shevy: and you want to find the most exotic way to do it?
[10:52:36] workmad3: shevy: well, you could do all sorts of exotic things with ffi... you could use that to invoke C functionality... you could create a bridge between, say, PHP and ruby using FFI and use PHP's functionality... you could write a ruby program that outputs a python script to create a directory and execute it...
[10:52:50] izzol2: certainty: shevy thanks! I will check it ;-)
[10:53:08] workmad3: shevy: you could potentially write a C program that creates a directory by directly making system calls, and then invoke it from ruby using FFI...
[10:53:09] certainty: you could probably fiddle with the inode table and make another file appear to be a directory
[10:53:14] certainty: or a kernel module
[10:54:13] workmad3: certainty: yeah, I was wondering about that... seeing as directories in unix are just a special type of file, I wondered if you could write out a file with the correct contents and then set the directory bit on it
[10:54:25] shevy: certainty all variants :)
[10:54:36] workmad3: it required more than 10 seconds of googling to figure out though :)
[10:54:49] certainty: shevy: well you can create a file via many webservices xD
[10:55:01] certainty: and directories
[10:55:13] blueOxigen: has joined #ruby
[10:55:18] certainty: webdav also
[10:55:23] rodfersou: has joined #ruby
[10:55:28] shevy: workmad3 cool
[10:55:41] webguynow: has joined #ruby
[10:55:51] shevy: one more reason to use ffi one day!
[10:56:07] nfk: has joined #ruby
[10:56:09] workmad3: heh :) write a sinatra service that creates a directory, run it on your machine, then write another sinatra service that will call back to that service when you hit it, run it on a remote server and then write a local ruby script that makes a request to the remote service
[10:56:30] certainty: or make php call that service to get the round trip
[10:57:15] workmad3: shevy: heh :) I doubt using FFI will replace FileUtils.mkdir as the goto method of creating directories ;)
[10:59:07] workmad3: shevy: in fact, I think a language that gave that as the way to interact with the filesystem is the equivalent of doing this ;) http://zeroturnaround.com/wp-content/uploads/2015/09/erlang-map-reduce-comic.jpg
[10:59:13] leafybasil: has joined #ruby
[11:04:03] devyn: has joined #ruby
[11:04:18] havenwood: has joined #ruby
[11:05:55] JDiPierro: has joined #ruby
[11:07:49] tkuchiki: has joined #ruby
[11:07:52] leat: has joined #ruby
[11:07:53] prestorium: has joined #ruby
[11:08:36] dariasmc: has joined #ruby
[11:09:56] sepp2k: has joined #ruby
[11:10:01] webguynow: has joined #ruby
[11:10:35] chills42: has joined #ruby
[11:12:04] akemrir: has joined #ruby
[11:13:13] Rurik: has joined #ruby
[11:19:53] certainty: workmad3: haha :)
[11:20:36] bruno-: has joined #ruby
[11:21:17] devoldmx: has joined #ruby
[11:23:10] pawnbox_: has joined #ruby
[11:23:12] araujo: has joined #ruby
[11:23:12] araujo: has joined #ruby
[11:23:55] solocshaw: has joined #ruby
[11:26:58] nettoweb: has joined #ruby
[11:27:03] burgestrand: Could anybody shed some light in Rational vs. BigDecimal?
[11:27:27] einarj: has joined #ruby
[11:27:44] leat1: has joined #ruby
[11:27:48] karapetyan: has joined #ruby
[11:28:10] webguynow: has joined #ruby
[11:29:48] Pupp3tm4st3r: has joined #ruby
[11:29:55] burgestrand: Aha, bigdecimal is not true accuracy, I guess rational is closer to true accuracy.
[11:30:06] greenarrow: has joined #ruby
[11:30:35] ldnunes: has joined #ruby
[11:31:13] burgestrand: >> (BigDecimal.new("100") / BigDecimal.new("5.1")) * BigDecimal.new("5.1") == BigDecimal.new("100")
[11:31:14] ruboto: Burgestrand # => uninitialized constant BigDecimal (NameError) ...check link for more (https://eval.in/435721)
[11:31:20] burgestrand: >> require "bigdecimal"; (BigDecimal.new("100") / BigDecimal.new("5.1")) * BigDecimal.new("5.1") == BigDecimal.new("100")
[11:31:21] ruboto: Burgestrand # => false (https://eval.in/435722)
[11:31:26] burgestrand: >> (Rational("100") / Rational("5.1")) * Rational("5.1") == Rational("100")
[11:31:27] ruboto: Burgestrand # => true (https://eval.in/435723)
[11:31:31] skade: has joined #ruby
[11:32:02] hotguitar: has joined #ruby
[11:32:50] webguynow: has joined #ruby
[11:33:03] jgt: has joined #ruby
[11:33:52] dionysus69: has joined #ruby
[11:34:18] Rurik: has joined #ruby
[11:34:51] monod: has joined #ruby
[11:35:08] youngbaks: has joined #ruby
[11:35:23] failshell: has joined #ruby
[11:36:56] pwnd_nfsw: has joined #ruby
[11:37:50] Igorshp: has joined #ruby
[11:37:52] syath: has joined #ruby
[11:40:17] fandi: has joined #ruby
[11:41:14] yorickpeterse: oh jesus, HAML's compiler ._______.
[11:42:24] atomical: has joined #ruby
[11:42:41] suchness_: has joined #ruby
[11:42:52] elperdut: has joined #ruby
[11:43:01] but3k4: has joined #ruby
[11:43:06] motorush: has joined #ruby
[11:43:24] RandyT: has joined #ruby
[11:43:40] leat1: has joined #ruby
[11:43:59] ekain: has joined #ruby
[11:45:18] thramosal: has joined #ruby
[11:45:44] yardenbar: has joined #ruby
[11:45:53] drewvanstone: has joined #ruby
[11:46:59] jhass: motorush: welcome, if you got a question just ask it ;)
[11:47:59] leat1: has joined #ruby
[11:48:59] webguynow: has joined #ruby
[11:51:53] Luming: has joined #ruby
[11:52:23] Igorshp: has joined #ruby
[11:52:48] pwnd_nfsw: has joined #ruby
[11:53:19] webguynow: has joined #ruby
[11:53:51] markbrazil: has joined #ruby
[11:54:03] lkba: has joined #ruby
[11:54:16] devyn: has joined #ruby
[11:54:48] thramosal: has joined #ruby
[11:59:31] iamninja: has joined #ruby
[11:59:52] stardiviner: has joined #ruby
[11:59:55] decoponio: has joined #ruby
[12:02:43] stardiviner: I got error when start robe on Emacs, it reports error, seems readline or libncursesw.so error on ruby which installed with rbenv. Here is the link: https://gist.github.com/stardiviner/ed06e23d054fee68ffef
[12:02:43] stardiviner: Does anybody knows how to fix it?
[12:03:43] jhass: stardiviner: did you try the suggestion present in the error message?
[12:04:18] stardiviner: jhass: I'm using Arch Linux, and I checked my installed package, "readline" is installed
[12:04:47] jhass: tried rebuilding your Ruby then?
[12:05:12] stardiviner: and package "ncurses" is installed too.
[12:05:17] dgutierrez1287: has joined #ruby
[12:05:36] leat1: has joined #ruby
[12:05:36] stardiviner: jhass: should I remove installed ruby from rbenv, and re-insatll it?
[12:05:56] stardiviner: jhass: why? I can't understand, I have not update ruby version.
[12:06:02] jhass: actually arch updated ncurses to 6 recently, so a rebuild is expected
[12:06:10] stardiviner: jhass: re-installing.
[12:06:16] jhass: if you look closes it's still inked against 5
[12:07:40] stardiviner: jhass: aha, I get it. thanks very much, I check my ncurses version, it's 6.0-3. you're right.
[12:07:47] stardiviner: jhass: really thanks
[12:08:15] leat1: has joined #ruby
[12:08:56] jas02: has joined #ruby
[12:09:11] maasha: has joined #ruby
[12:09:41] maasha: if it possible to traverse a tree with a recursive each method?
[12:10:01] siaW: has joined #ruby
[12:11:45] karapetyan: https://gist.github.com/karapetyan/c90c2613c09aaf063780
[12:11:56] SebastianThorn: Hi, i got a problem with a csv-format whn importing a csv-file.
[12:12:22] siaW: can i please get some help with this?
[12:12:23] siaW: https://gist.github.com/siaw23/658b97f9e9b6886e9a62
[12:12:58] `derpy: http://www.rubydoc.info/stdlib/core/String#%3D%7E-instance_method
[12:13:15] yorickpeterse: &ri String#match
[12:13:16] `derpy: http://www.rubydoc.info/stdlib/core/String#match-instance_method
[12:13:17] yorickpeterse: &ri String#scan
[12:13:18] `derpy: http://www.rubydoc.info/stdlib/core/String#scan-instance_method
[12:13:23] yorickpeterse: siaw: ^ read up on those methods
[12:13:30] SebastianThorn: the format escapes , with \, and that makes the csv-parser shift the values one steap
[12:13:47] rickmasta: has joined #ruby
[12:13:53] siaW: yorickpeterse: thanks
[12:14:06] karapetyan: has joined #ruby
[12:14:39] SebastianThorn: the docs of the format says this about escaping csv: http://pastie.org/10428885
[12:14:47] karapety_: has joined #ruby
[12:15:10] karapety_: i ve got next formula http://prntscr.com/8hp26d and this code implement it: https://gist.github.com/karapetyan/c90c2613c09aaf063780
[12:15:23] SebastianThorn: not sure how i can fix this, any ideas?
[12:16:46] andyrs: has joined #ruby
[12:17:35] anisha_: has joined #ruby
[12:18:09] naps62: has joined #ruby
[12:18:47] jhass: karapety_: you lack the loop for the summation
[12:18:58] stardiviner: jhass: ask you one question, If I want to keep my previous installed Gems, what should I do to rebuild my ruby version in rbenv?
[12:19:02] karapety_: jhass: don't understand
[12:19:11] jhass: stardiviner: I don't use rbenv
[12:19:25] dorei: has joined #ruby
[12:19:26] SebastianThorn: one field looks like this #70007\,0510 but the csv-lib makes that into 2 values, #70007\ and 0510
[12:19:45] jhass: karapety_: actually where did you get that formula from? Looks like it's non-terminating?
[12:20:05] karapety_: it's a forum
[12:20:32] karapety_: yes, seems lke...
[12:20:34] stardiviner: jhass: oh, sorry
[12:21:16] karapety_: jhass: actually ive got huge problem with math
[12:21:31] karapety_: and with understanding loops ( nested loops, and recursive)
[12:21:35] jhass: that formula makes no sense, at least not if that's really all there is to it
[12:22:20] karapety_: could you recommend some tasks to improve that skills
[12:22:50] karapety_: cause i can't (execute nested loops code in my head)
[12:22:57] jhass: SebastianThorn: ouch, and that while CSV actually defines a proper escape format...
[12:23:27] webguynow: has joined #ruby
[12:23:35] atomical: has joined #ruby
[12:24:04] SebastianThorn: jhass: you think there is anything i can do?
[12:24:20] jhass: SebastianThorn: well, write a parser for that
[12:25:54] lkba_: has joined #ruby
[12:26:02] jhass: for a simple one, read line, iterate from 0..line.size, consume line[i] into a temporary string, yield and then clear it upon encountering , if line[i-1] != "\\"
[12:26:46] centrx: has joined #ruby
[12:27:31] jhass: oh and ignore "\\" instead of adding it to the temporary string, unless line[i-1] == "\\" and so on
[12:27:33] vdamewood: has joined #ruby
[12:28:20] SebastianThorn: jhass: ye, that could be a solution
[12:29:07] SebastianThorn: jhass: i thought of replacing \, with ; while reading the file from disk
[12:29:25] jhass: SebastianThorn: what about \\, or \\\, ;)
[12:29:57] jhass: hence simple parser is easier than regex or substitution
[12:30:09] SebastianThorn: i just wanna get it working for this week so i can have a chill weekend :P
[12:30:23] jhass: implementing ^ should cost less than an hour, try it
[12:30:24] certainty: then write a parser dude
[12:30:32] lkba: has joined #ruby
[12:31:05] SebastianThorn: ye, you are right
[12:31:12] jhass: stick it into class Line; include Enumerable; def initialize(line); @line; end; def each; # ...; end; end; and you can Line.new(line).to_a to get a row
[12:31:31] jhass: well, maybe name it BrokenCSV::Row :P
[12:31:37] voltalio: has joined #ruby
[12:32:06] jgt: has joined #ruby
[12:33:57] moshe: has joined #ruby
[12:34:29] SebastianThorn: never done anything like this, recon it's gonna take a while :)
[12:34:41] SebastianThorn: thanks for the help! :)
[12:35:08] lsmola: has joined #ruby
[12:35:32] ignatiusjreilly: has joined #ruby
[12:35:48] moshef: I???m trying to debug a gem while working in a rails app, but I???m asking here because I don???t think it???s related to rails.
[12:36:36] moshef: I???m using ruby 2.1.2 and pry-byebug, I open the gem code using bundle show, add bidning.pry somewhere but it doesn???t work
[12:36:50] mdst: has joined #ruby
[12:37:03] devoldmx: has joined #ruby
[12:37:13] moshef: I used to do it quite often in the past when worked in earlier versions (ruby/rails, and I think I used pry-debugger rather than pry-byebug). I???m trying to understand if anything has changed since then..
[12:37:41] ignatiusjreilly: has joined #ruby
[12:38:06] pawnbox: has joined #ruby
[12:38:08] moshef: the workaround is to install the gem locally, use ???require_reloader??? gem which relaods the gems, and only then I can debug it..
[12:38:19] Rurik: has joined #ruby
[12:38:19] Rurik: has joined #ruby
[12:38:23] shevy: can I make a regex non-greedy? as in "match to the closest match, not to the maximum match"
[12:38:35] failshell: has joined #ruby
[12:38:50] victortyau: has joined #ruby
[12:39:21] shevy: oh wait, solved it
[12:39:26] shevy: by using \S rather than .
[12:40:28] ignatiusjreilly: has joined #ruby
[12:40:38] certainty: shevy: these are not interchangable
[12:40:45] DoubleMalt: has joined #ruby
[12:40:47] voltalio: has joined #ruby
[12:40:52] shevy: my regex works now!!!
[12:41:35] tcopeland: has joined #ruby
[12:43:27] shevy: regexes make my brain go wild
[12:43:34] jdawgaz: has joined #ruby
[12:44:52] shevy: I'd love to see a brain-plot power diagram, which part of coding costs the most energy, requires the largest amount of neurons activated and so on and so forth
[12:48:04] Igorshp: has joined #ruby
[12:48:45] hinbody: has joined #ruby
[12:49:50] dstarh: has joined #ruby
[12:51:38] bruno-: has joined #ruby
[12:55:13] pawnbox_: has joined #ruby
[12:55:27] aganov: has joined #ruby
[12:55:50] sgambino: has joined #ruby
[12:55:59] krz: has joined #ruby
[12:56:03] linuxboytoo: has joined #ruby
[12:59:31] konsolebox: has joined #ruby
[12:59:33] segfalt: has joined #ruby
[12:59:40] mikecmpbll: has joined #ruby
[13:00:41] leafybas_: has joined #ruby
[13:01:02] pecpec: has joined #ruby
[13:01:14] CloCkWeRX: has joined #ruby
[13:01:21] pawnbox: has joined #ruby
[13:02:11] p0wn3d__: has joined #ruby
[13:03:52] konsolebox: has joined #ruby
[13:03:54] bmurt: has joined #ruby
[13:04:37] atomical: has joined #ruby
[13:05:06] karapetyan: has joined #ruby
[13:05:38] ruby-lang295: has joined #ruby
[13:05:52] khebbie: has joined #ruby
[13:05:57] JoshL: has joined #ruby
[13:06:20] karapetyan: how to retrieve messages in channel if i was disconnected ?
[13:06:52] Kero: karapetyan: see topic :)
[13:07:45] devyn: has joined #ruby
[13:08:22] kappy: has joined #ruby
[13:09:59] timonv: has joined #ruby
[13:10:07] webguynow: has joined #ruby
[13:10:22] solocshaw: has joined #ruby
[13:11:46] Cork: anyone know of a small package for constructing restful urls?
[13:12:30] sankaber: has joined #ruby
[13:13:07] startupality: has joined #ruby
[13:14:34] solocshaw1: has joined #ruby
[13:15:35] amystephen: has joined #ruby
[13:15:48] naftilos76: has joined #ruby
[13:16:38] da3mian: has joined #ruby
[13:17:07] Omilun: has joined #ruby
[13:17:56] Omilun: hello ... i need to change color of irb shell
[13:18:04] nateberkopec: has joined #ruby
[13:18:30] voltalio: has joined #ruby
[13:18:44] bougyman: omilun: have you tried pry?
[13:18:53] nickjj_: has joined #ruby
[13:19:52] shevy: omilun have you installed wirble yet?
[13:20:15] shevy: https://rubygems.org/gems/wirble
[13:20:22] shevy: whoa... last update 6 years ago
[13:20:22] Omilun: bougyman: tried pry ? what is it?
[13:20:33] Omilun: shevy: yes ... i have it
[13:20:47] Omilun: shevy: it's great
[13:21:19] Omilun: shevy: but it dose not have color option
[13:21:36] elperdut: has joined #ruby
[13:21:52] beast: has joined #ruby
[13:22:22] Omilun: i need to chenge color this character : >
[13:22:48] Omilun: shevy: first caracter in irb
[13:23:50] bougyman: omilun: pry is an alternative to irb
[13:24:02] bougyman: it has fancy prompt stuff and colors on by default
[13:24:02] shevy: yeah well
[13:24:13] shevy: omilun it should be easy if you can find the place where it does >
[13:24:16] Omilun: bougyman: no i dont have it
[13:24:18] shevy: then you can .prepend the ansicolours to it
[13:24:53] shevy: ruby-token.rb: [:TkGT, TkOp, ">"],
[13:24:59] shevy: not sure if this is the right file
[13:25:32] shevy: it's part of: TokenDefinitions = [[:TkGT, TkOp, ">"],
[13:25:41] shevy: in module RubyToken
[13:26:11] Omilun: shevy: i have irbrc ... can change on it?
[13:26:43] shevy: you can possibly reassign to the constant array there
[13:26:48] Omilun: bougyman: how can i install pry? gem install pry?
[13:26:55] shevy: old_copy = RubyToken::TokenDefinitions
[13:27:05] Omilun: shevy: wow
[13:27:13] CloCkWeRX: has joined #ruby
[13:27:36] shevy: and then find the proper entry, prepend ansi colour... "\e[1;34m>\e[0;37m"
[13:27:47] shevy: that should make a blue >
[13:28:15] shevy: the irb source is a mess :\
[13:28:33] shevy: def_exception(:TkSymbol2TokenNoKey, "key nothing(key='%s')")
[13:28:34] s00pcan: has joined #ruby
[13:28:48] nickjj: has joined #ruby
[13:29:21] mary5030: has joined #ruby
[13:29:57] Omilun: shevy: ammm i cant understand . :D
[13:30:14] mary5030: has joined #ruby
[13:30:32] rippa: has joined #ruby
[13:30:57] shevy: well you can look at the copy in irb right? require 'pp; old_copy = RubyToken::TokenDefinitions; pp old_copy
[13:31:19] shevy: require 'pp'; old_copy = RubyToken::TokenDefinitions; pp old_copy; ''
[13:32:27] hs366: has joined #ruby
[13:33:02] subshad: has joined #ruby
[13:34:10] deject3d: has joined #ruby
[13:34:12] nettoweb: has joined #ruby
[13:34:44] burgestrand: has joined #ruby
[13:35:30] shevy: oops... the return value is '=>' not '>'
[13:35:37] deject3d: has left #ruby: ()
[13:35:50] freerobby: has joined #ruby
[13:36:03] solocshaw: has joined #ruby
[13:36:46] devdazed: has joined #ruby
[13:37:27] mjuszczak: has joined #ruby
[13:37:29] sonne: has joined #ruby
[13:37:38] Omilun: shevy: dosent work
[13:38:09] shevy: yeah I noticed I looked at the wrong token anyway :(
[13:38:19] karapetyan: has joined #ruby
[13:38:24] Omilun: shevy: :(
[13:38:26] shevy: irb has even weird method calls such as: Token(op)
[13:38:36] Omilun: shevy: aha
[13:38:58] shevy: I thought this might be the right one: [:TkASSOC, TkOp, "=>"]
[13:39:04] shevy: but it probably is only meant for Hashes, not the return value
[13:39:37] Rollabunna: has joined #ruby
[13:41:08] karapetyan: has joined #ruby
[13:41:33] Omilun: shevy: it's hard for me ... i'm a beginner
[13:44:22] shevy: it's hard for me as well :)
[13:45:00] Omilun: bougyman: pry have complition ?
[13:45:34] jahpereira: has joined #ruby
[13:45:39] izzol2: hmm, if I have a project in /opt/project1/ where I have a structure: bin, lib, test and so on. How I can include that project to the other file which is located in lets say /root/ ?
[13:45:54] jahpereira: good afternoon from Portugal
[13:46:08] tacit7: has joined #ruby
[13:46:08] jahpereira: can anyone spare a min to help me out please?
[13:46:17] jahpereira: I am a junior developer currently working on a ruby on rails app
[13:46:19] izzol2: good afternoon from Germany ;-)
[13:46:28] jahpereira: hey izzol_ :)
[13:46:33] _lexjm: has joined #ruby
[13:46:33] phantasm66: has joined #ruby
[13:46:36] jahpereira: and in order to understand the frontend part
[13:46:55] jahpereira: I bought a theme which I am trying to manipulate in order to get a grasp os scss and .erb files
[13:46:58] Omilun: bougyman: it like irb ... how can i change it?
[13:47:05] jahpereira: but for example just to change a logo
[13:47:23] jahpereira: i do not find any path to a *.png file which is driving me crazy
[13:47:35] jahpereira: I have spent the last hour trying to find a icon in order to change it
[13:47:42] jahpereira: can anyone help me out
[13:48:06] jahpereira: my erb file has this code:
[13:48:07] jahpereira: <a href="<%= root_url %>" class="logo">
[13:48:08] jahpereira: <i class="brankic-pen"></i>
[13:48:17] jahpereira: .brankic-pen {
[13:48:18] jahpereira: color: #000000;
[13:48:27] jahpereira: no url, asset_path, asset_logo nothing o.O
[13:48:36] izzol2: jahpereira: Paste >3 lines of text on https://gist.github.com
[13:48:47] bradland: has joined #ruby
[13:48:57] sdothum: has joined #ruby
[13:49:05] jahpereira: probably this is a super dumb question but I only started learning RoR this week
[13:49:18] tvw: has joined #ruby
[13:49:44] ruboto: You can find an overview of my commands at http://ruby-community.com/ruboto/commands
[13:50:16] ruboto: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[13:50:35] rbennacer: has joined #ruby
[13:51:05] ruboto: Please use https://gist.github.com for more than three lines of text!
[13:51:40] jahpereira: my question basically is: how just .brankic-pen {
[13:51:41] jahpereira: color: #8CAAC0;
[13:51:42] jahpereira: } references an image? (which I don???t find)
[13:51:57] jhass: how did I end up in #css?
[13:52:14] burgestrand: jahpereira: again with the code, paste it in an appropriate location and link to it.
[13:52:38] jahpereira: but its below 3 lines o.O
[13:52:40] burgestrand: jahpereira: without looking at the rest of your code, it's not uncommon to have a "require" somewhere in the CSS, which could include additional styling for your class.
[13:53:14] momomomomo: has joined #ruby
[13:53:38] jahpereira: Burgestrand: hum
[13:53:53] burgestrand: jahpereira: the web inspector in your browser would probably help you to see where the image is coming from!
[13:53:54] davispuh: has joined #ruby
[13:54:05] jahpereira: already did that
[13:54:09] jhass: might also be a gem
[13:54:23] jahpereira: the html code just says <i class="brankic-pen"></i>
[13:54:36] jahpereira: Burgestrand: or do you mean by analyzing the resources?
[13:54:43] jhass: jahpereira: so if you inspect that element, what locations do you get for associated CSS?
[13:55:11] burgestrand: jahpereira: there's a style inspector in your web inspector, too!
[13:55:27] meatherly: has joined #ruby
[13:55:35] youngbaks: has joined #ruby
[13:55:45] jhass: ACTION bets on a icon font coming from a gem
[13:56:18] jahpereira: used style inspector
[13:56:20] jahpereira: content: "\e6db";
[13:56:28] jahpereira: i guess its an icon font
[13:56:31] jhass: yup, that confirms the icon font
[13:56:33] burgestrand: jahpereira: sounds about right!
[13:56:45] jhass: now the inspector should also show the location of that directive
[13:56:47] jahpereira: can anyone point me in the right direction
[13:56:54] jahpereira: on whether to replace this with a logo of mine
[13:56:55] jhass: which should give some clues as to where it comes from
[13:57:08] jahpereira: i have an image logo.png
[13:57:22] jahpereira: from what i read i should include it in the app>assets folder is that right?
[13:57:22] ruby-95_: has joined #ruby
[13:57:33] burgestrand: jahpereira: for one, remove the <i>-tag in your HTML.
[13:57:33] jhass: app/assets/images, yes
[13:57:47] jhass: and then just use <%= image_tag "logo.png" %> instead of the <i> tag
[13:57:53] burgestrand: jahpereira: secondly, you'll most likely just want to add an image tag, ^
[13:58:22] amicuscuriae: has joined #ruby
[13:58:41] jahpereira: Burgestrand: can u please expand more on image tags?
[13:58:42] ruby-95_: Hi guys. I have a question. What does it mean when a regular expression such as /a/ matches the 'a' in the string 'cat'? What does the word 'matches' mean here?
[13:58:52] burgestrand: jahpereira: I get a feeling you might want to learn some more basic HTML and CSS, have a look at e.g. https://www.codecademy.com/en/tracks/htmlcss
[13:58:54] amicuscuriae: Is Ruby the most easiest with syntax and beginner friendly lang?
[13:58:55] atomical: has joined #ruby
[13:58:57] momomomomo: why not md5 both
[13:58:58] amicuscuriae: is it good for GUI?
[13:59:00] porfa: has joined #ruby
[13:59:03] amicuscuriae: Does it compile to binaries?
[13:59:08] startupality_: has joined #ruby
[13:59:09] porfa: yeheyllo!
[13:59:09] momomomomo: oh weird, was seeing a discussion from last night
[13:59:12] burgestrand: ruby-95_: Yes.
[13:59:37] momomomomo: ruby-95_: http://rubular.com
[13:59:43] jhass: ruby-95_: that depends on the operation, usually it means you can extract it, confirm there's a match or not, or replace the match
[13:59:56] burgestrand: amicuscuriae: No, no, no.
[14:00:01] ruby-95_: 'matches' here means 'finds' right?
[14:00:35] jhass: >> s = "cat"; [s[/a/], s.match(/a/), s =~ /a/, s.sub(/a/, 'b')]
[14:00:36] ruboto: jhass # => ["a", #<MatchData "a">, 1, "cbt"] (https://eval.in/435792)
[14:00:51] jhass: ruby-95_: ^ that are your most common options
[14:01:13] jhass: >> s = "dog"; [s[/a/], s.match(/a/), s =~ /a/, s.sub(/a/, 'b')]
[14:01:14] ruboto: jhass # => [nil, nil, nil, "dog"] (https://eval.in/435795)
[14:01:19] jahpereira: Burgestrand: i have someknowledge of html and css
[14:01:23] ruby-95_: jhass: yes I get that, but what does 'matches' mean? does it mean 'to find a match for'?
[14:01:26] jahpereira: i just dont knwo much about rails
[14:01:30] jhass: ruby-95_: ^ compare to these examples that have no matches
[14:01:37] ruby-95_: like /a/ matches 'a' in 'cat'
[14:01:45] jahpereira: i would like to point out in the erb file to the scss class
[14:01:56] jahpereira: and then reference logo.png in sign_in.scss
[14:02:01] jhass: ruby-95_: I'm not sure if there's an outright synonym, what's your native language?
[14:02:14] burgestrand: jahpereira: you can use a regular HTML-tag, too: <img src="???">, the difference is that you'll want to use "asset_path" to make the URL to the image correct.
[14:02:15] pawnbox_: has joined #ruby
[14:02:16] amicuscuriae: Burgestrand, omg what? it don't compile to binaries?
[14:02:30] ruby-95_: It's english but this has been confusing me for days.
[14:02:31] jahpereira: Burgestrand: what you are saying is that i sould add <%= image_tag "logo.png" %> in the .erb file
[14:02:40] burgestrand: jahpereira: yes.
[14:02:42] hashrocket: has joined #ruby
[14:02:43] jahpereira: but is this a correct practice?
[14:02:50] burgestrand: amicuscuriae: I'm sorry, but you asked three questions so I tried to answer them all!
[14:02:53] jahpereira: should only the scss file know about the file logo.png?
[14:03:00] andyrs: has joined #ruby
[14:03:07] jahpereira: Burgestrand: shouldn???t
[14:03:15] jhass: ruby-95_: maybe one could say it fits, the pattern (regex) fits the string or not, like a bottle cap may fit a bottle or not
[14:03:17] SebastianThorn: jhass: ok ,managed to build a function that seems to do what i want
[14:03:27] jhass: SebastianThorn: great
[14:03:38] shevy: like a bottle cap may fit a bottle ... we are getting fairly philosophical here!
[14:03:39] burgestrand: jahpereira: no, it's OK to code paths to assets in your HTML, that's what HTML does in using <img src="">-tag.
[14:03:57] burgestrand: jahpereira: you could do some trickery with an empty element and background images if you want, but I wouldn't say that's any better, probably the other way around.
[14:04:08] jahpereira: Burgestrand: right
[14:04:19] jahpereira: Burgestrand: so, before I try it out
[14:04:25] amicuscuriae: Burgestrand, Omg so ruby don't compile to binary? there is no way out?
[14:04:35] burgestrand: amicuscuriae: Ruby is a nice language for beginners (in my opinion), I wouldn't say it's good for GUI but not bad either, and finally Ruby does not (generally) compile to binary.
[14:04:47] jahpereira: Burgestrand: lets say I have my image ???logo.png??? in app>assets>images>folder1
[14:04:57] amicuscuriae: Burgestrand, sucks then
[14:05:03] burgestrand: amicuscuriae: Bye!
[14:05:06] jahpereira: Burgestrand: how is the path generated <%= image_tag ???folder1/logo.png" %> ?
[14:05:17] Luming: has joined #ruby
[14:05:35] ruby-95_: jhass: right so when using /a/.match('cat'), we're asking the regexp whether it fits the string 'cat'? or is it better to say we're asking the regexp to find whether there's an 'a' in 'cat'?
[14:05:46] burgestrand: jahpereira: Rails allow you to change where your assets are hosted, by using e.g. image_tag or asset_path, Rails will create the correct path if you use a CDN in the future, for example.
[14:05:59] jhass: ruby-95_: I'd actually go for the former, yes
[14:06:05] burgestrand: jahpereira: It will also use a different path in production vs. development, to improve caching in production.
[14:06:10] jahpereira: Burgestrand: i see
[14:06:15] amicuscuriae: has left #ruby: ("Leaving")
[14:06:16] burgestrand: jahpereira: more information here http://guides.rubyonrails.org/asset_pipeline.html
[14:06:37] jhass: ruby-95_: but maybe in reverse, we're rather asking whether the string fits into the pattern of the regex
[14:06:43] burgestrand: jahpereira: and finally, there's the #rubyonrails channel which is more towards RoR-only questions :)
[14:06:45] ruby-95_: jhass: whys is match defined in both String and Regexp?
[14:07:03] jahpereira: Burgestrand: thanks man ;)
[14:07:05] ruby-95_: jhass: why*
[14:07:35] jhass: ruby-95_: for convenience, there's no semantic meaning to the fact it's available on both
[14:07:39] ruboto: Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
[14:07:41] jhass: one probably just calls the other in fact
[14:07:47] hal_9000_: has joined #ruby
[14:08:01] burgestrand: jahpereira: ^, while I am a man I might not have been, something to keep in mind :)
[14:08:16] ruby-95_: jhass: Is it more conventional to use Regexp#match or String#match?
[14:08:28] jhass: ruby-95_: I generally go for String#match
[14:08:51] segfalt: has joined #ruby
[14:08:54] jhass: ruby-95_: since there's no Regexp#scan that feels more consistent
[14:10:19] ruby-95_: jhass: Okay. This is a little off topic, but when using wildcards in the terminal...we say ? matches any single character. What does 'matches' mean in this context then?
[14:12:01] umgrosscol: has joined #ruby
[14:12:25] voltalio: has joined #ruby
[14:12:25] ruby-95_: jhass: As in, what english definition applies here? Does it mean 'is equal to'?
[14:12:58] drewvanstone: has joined #ruby
[14:13:07] jhass: ruby-95_: the same actually
[14:13:14] tjohnson: has joined #ruby
[14:13:24] jhass: it too is a pattern that matches a particular string or not
[14:14:28] jhass: "cat" matches the shell pattern "c?t" just like it matches the regular expression /./
[14:15:16] burgestrand: Linguistics and semantics. Interesting.
[14:15:33] jhass: or /c.t/ for more closely related examples
[14:16:59] ruby-95_: jhass: A string matches a pattern, but why do we sometimes say that the pattern matches the string?
[14:17:14] ruby-95_: jhass: or it doesn't matter?
[14:17:19] jhass: ruby-95_: I think you might be overthinking this, how about you just accept it as a domain specific term for now? I promise it'll start to make sense once you learn about and use enough regular expressions
[14:17:54] jhass: ruby-95_: both is said in colloquial usage, yes
[14:18:00] jhass: they mean the same
[14:18:23] ruby-95_: jhass: Thanks for your input.
[14:19:05] leafybasil: has joined #ruby
[14:20:48] bkulbida: has joined #ruby
[14:21:20] da3mian: has joined #ruby
[14:22:01] voltalio: has joined #ruby
[14:22:23] jokke: has joined #ruby
[14:22:50] khebbie: has joined #ruby
[14:23:41] dima_: has joined #ruby
[14:23:48] [k-: [joke] http://www.urbandictionary.com/define.php?term=Thanks+for+your+input! [joke]
[14:24:07] rikkipitt: has joined #ruby
[14:24:12] jokke: i'm trying to go through all permutations of the combinations of elements in an array of arrays. so that [['a','A'],['b','B']] would result in ['ab','Ab','aB','AB']
[14:24:20] jokke: i have no clue how to do this
[14:24:37] jokke: oh and the arrays can be of different size
[14:24:46] monoprotic: try Array#product
[14:24:53] monoprotic: http://ruby-doc.org/core-1.9.3/Array.html#method-i-product
[14:24:55] burgestrand: Array#product is cool.
[14:25:15] [k-: &ri Array#permutations
[14:25:15] `derpy: No results
[14:25:19] monoprotic: they may be different dizes
[14:25:25] [k-: without the s
[14:25:52] monoprotic: [k- hes not asking for permutations actually
[14:26:12] lkba: has joined #ruby
[14:26:14] burgestrand: Maybe he is but gave the result as combinations by mistake!
[14:26:28] burgestrand: ??? sorry, not necessarily he.
[14:26:30] monoprotic: he's not asking for combination etiher
[14:26:33] jokke: yeah that's awesome
[14:26:44] monoprotic: not in the math sense of the word
[14:27:20] pecpec: has joined #ruby
[14:27:27] kies^: has joined #ruby
[14:27:27] burgestrand: monoprotic: I've been away from this part of math for a while, aren't those the available combinations of size 2?
[14:27:28] workmad3: he's asking for the cartesian product
[14:27:34] jokke: workmad3: yes
[14:27:42] monoprotic: which is why its #product :P
[14:27:45] juanpablo_: has joined #ruby
[14:28:23] startupality: has joined #ruby
[14:28:47] workmad3: Burgestrand: the permutations of that array are `[['a', 'A'], ['b', 'B']]` and `[['b', 'B'], ['a', 'A']]` :)
[14:29:00] burgestrand: >> ['a', 'b', 'A', 'B'].combination(2).map(&:join)
[14:29:01] ruboto: Burgestrand # => ["ab", "aA", "aB", "bA", "bB", "AB"] (https://eval.in/435844)
[14:29:06] burgestrand: >> ['a', 'b'].product(['A', 'B']).map(&:join)
[14:29:07] ruboto: Burgestrand # => ["aA", "aB", "bA", "bB"] (https://eval.in/435845)
[14:29:10] burgestrand: Ruby is useful. ;)
[14:29:40] burgestrand: workmad3: thanks!
[14:30:44] VeryBewitching: has joined #ruby
[14:32:28] allomov: has joined #ruby
[14:33:45] karapetyan: has joined #ruby
[14:33:53] dionysus69: has joined #ruby
[14:34:19] dopamean_: has joined #ruby
[14:35:19] bigbadbear: has joined #ruby
[14:36:20] shevy: havenwood what editor are you currently (~the last 7 days) using the most?
[14:36:34] izzol2: There is a way to setup dynamic module name in ruby project?
[14:37:07] [k-: dynamic module name?
[14:37:18] apeiros: Burgestrand: I assume the reason for your ping has been resolved?
[14:37:28] pawnbox: has joined #ruby
[14:37:36] drewvanstone: has joined #ruby
[14:37:41] blaxter: has joined #ruby
[14:37:48] devoldmx: has joined #ruby
[14:38:23] chills42: has joined #ruby
[14:38:41] shevy: Burgestrand was battling it out with groovyshark!
[14:38:57] [k-: what happened?
[14:39:07] dima_: has joined #ruby
[14:39:56] havenwood: shevy: That would be Atom with vim in second, in the last week.
[14:40:12] shevy: atom with vim?
[14:40:22] kanika_: has joined #ruby
[14:40:24] shevy: you mean, first comes atom, then vim
[14:40:40] havenwood: shevy: I was debating if I'd used vim more, but I think I've spent more time in Atom.
[14:41:02] havenwood: shevy: I don't keep stats. :P I have been enjoying Atom.
[14:41:12] dariasmc: has joined #ruby
[14:41:13] weemsledeux: has joined #ruby
[14:41:28] HAL2328: has joined #ruby
[14:44:40] shmilan: has joined #ruby
[14:44:48] dima_: has joined #ruby
[14:45:17] [Butch]: has joined #ruby
[14:48:28] izzol2: Ok, I have a stupid question :P
[14:48:56] izzol2: I have two projects (exactly the same), the only difference is the DB.
[14:48:59] dgutierrez1287: has joined #ruby
[14:49:07] KervyN: has joined #ruby
[14:49:13] izzol2: One is located in /opt/node1 the other in /opt/node2
[14:49:49] izzol2: And in /opt/master/ I have a file console.rb which has: require '/opt/node1/bin/console.rb' and require '/opt/node2/bin/console.rb'
[14:50:09] izzol2: but now when I execute Test::Foo.bar it works only on node1 ;-)
[14:50:22] izzol2: is it possible to do it in this way?
[14:50:31] dseitz: has joined #ruby
[14:50:36] izzol2: I know that I can change the module name in node2 but I don't want to do it :(
[14:50:37] allcentury: has joined #ruby
[14:50:49] Igorshp: has joined #ruby
[14:50:54] burgestrand: has joined #ruby
[14:51:00] burgestrand: apeiros: Indeed! :)
[14:51:01] EminenceHC: has joined #ruby
[14:51:31] Cache_Money: has joined #ruby
[14:51:38] kies^: has joined #ruby
[14:52:39] polishdub: has joined #ruby
[14:53:27] KervyN: has joined #ruby
[14:53:57] Omilun: has left #ruby: ()
[14:53:58] [k-: don't require both at the same time?
[14:54:32] dfockler: has joined #ruby
[14:54:43] DanielI: has joined #ruby
[14:57:29] dman777_alter: has joined #ruby
[14:57:55] gizmore: has joined #ruby
[14:59:33] momomomomo: has joined #ruby
[14:59:35] leafybasil: has joined #ruby
[14:59:54] davedev24: has joined #ruby
[15:01:11] benlieb: has joined #ruby
[15:01:31] negev: has joined #ruby
[15:01:52] negev: hello, anyone know why the mechanize gem would return form.file_uploads => [] for this form?
[15:01:55] negev: https://gist.github.com/anonymous/5cc7e2b671a355b9bf1b
[15:01:55] nateberkopec: has joined #ruby
[15:02:09] nateberkopec: >> $ruby.is_a?(Object){|oriented| language}
[15:02:10] ruboto: nateberkopec # => true (https://eval.in/435856)
[15:03:45] drewvanstone: has joined #ruby
[15:04:11] inteq: has joined #ruby
[15:04:20] [k-: you forgot a -
[15:04:27] andyrs: has joined #ruby
[15:04:49] krz: has joined #ruby
[15:05:06] terlar: has joined #ruby
[15:05:11] leafybasil: has joined #ruby
[15:05:58] moeabdol: has joined #ruby
[15:09:02] Igorshp: has joined #ruby
[15:09:19] karapetyan: has joined #ruby
[15:13:02] yeticry: has joined #ruby
[15:13:37] karapetyan: has joined #ruby
[15:13:40] bugrum: has joined #ruby
[15:15:07] bruno-: has joined #ruby
[15:15:31] i: has joined #ruby
[15:15:55] maniac: has joined #ruby
[15:16:29] maniac: hey guys, how can i receive map data from rake task output without Proc object being returned ?
[15:16:41] i: has joined #ruby
[15:17:02] unop: has joined #ruby
[15:17:44] dopie: has joined #ruby
[15:18:14] bkulbida: has joined #ruby
[15:18:22] segfalt: has joined #ruby
[15:18:22] jdawgaz: has joined #ruby
[15:19:01] bkulbida: has joined #ruby
[15:19:58] NeverDie: has joined #ruby
[15:20:30] platzhirsch: has joined #ruby
[15:22:43] drewvanstone: has joined #ruby
[15:23:39] drewvans1one: has joined #ruby
[15:24:21] vdamewood: has joined #ruby
[15:24:27] Igorshp: has joined #ruby
[15:24:38] apt-get: has joined #ruby
[15:25:24] modern: has joined #ruby
[15:26:19] newtonianb: has joined #ruby
[15:26:35] radgeRayden: has joined #ruby
[15:26:36] Soda: has joined #ruby
[15:26:41] eGGsha: has joined #ruby
[15:27:11] newtonianb: Question: I have a ruby script that is part of a git repository. That ruby script as part of the command it executes actualyl changes branch in my git repo and executes several commands. Could this cause any problems that the script being ran is part of the repo and the branch which it resides in changes?
[15:27:29] vdamewood: has joined #ruby
[15:27:41] EminenceHC: has joined #ruby
[15:28:53] [k-: it probably could, since it is being executed
[15:29:10] Macaveli: has joined #ruby
[15:29:20] radgeRayden_: has joined #ruby
[15:29:38] khebbie: has joined #ruby
[15:29:42] newtonianb: I'm wondering if on execute the whole script gets loaded in memory or whether it still relies on the script to run
[15:29:52] andyrs: has joined #ruby
[15:30:17] newtonianb: Kind of a bummer since the script is a deploy script that is supposed to do a bunch of things across branches and also want it tracked in the repo
[15:30:41] pauly_oc: has joined #ruby
[15:31:21] Cork: could one write something similar to system("sed -i -r 's/(something)/\1/' file"), but with only ruby code?
[15:31:39] Cork: what i'm asking for is an efficient search replace in a large text file without first loading it into memory
[15:32:50] nettoweb: has joined #ruby
[15:32:55] tubbo: Cork: how do you know sed doesn't load the text file into memory?
[15:33:07] Cork: tubbo: memory usage
[15:33:43] tubbo: trying to think of something that doesn't have a VM or garbage collection that you can use regex in...
[15:33:46] tubbo: like, out-of-the-box
[15:33:50] psy: has joined #ruby
[15:34:13] tubbo: because what if a VM or GC thing is skewing your results...afaik sed is a C program so it wouldn't be affected by those things, it's just a compiled binary
[15:34:37] Cork: tubbo: if you're trying to be sarcastic...
[15:34:43] Cork: i'm not getting it
[15:34:44] abara: has joined #ruby
[15:34:44] workmad3: Cork: you can do a line-by-line read in ruby so that you don't slurp in the entire file at once
[15:34:54] Cork: ya, i've gotten that far
[15:34:55] abara: has left #ruby: ("Be back later ...")
[15:35:03] Cork: but i'm not sure what to do with the modified line
[15:35:28] Cork: File.open().each_line {|line| line.gsub() }
[15:35:30] Cork: then what?
[15:35:42] Cork: that is where i get stuck
[15:36:36] workmad3: Cork: what I've done with that sort of thing in the past is `File.open("output", "w") do |out_file|; File.open("input", "r") do |in_file|; in_file.each_line {|l| out_file.write(in_file.gsub(...) ) } end; end`
[15:36:52] rcvalle: has joined #ruby
[15:37:00] Cork: and then move the file hmm
[15:37:07] Cork: not sure that will work
[15:37:49] KucukMubasir: has joined #ruby
[15:38:11] KucukMubasir: hi guys, I installed ruby with ruby-installer but I want to remove it, how might I achieve this?
[15:38:32] devoldmx: has joined #ruby
[15:38:37] pu22l3r_: has joined #ruby
[15:39:19] r_baron: has joined #ruby
[15:39:32] andyrs: has joined #ruby
[15:39:32] dionysus69: has joined #ruby
[15:39:34] KucukMubasir: it is mac osx and I already had RVM but I wrongfully used ruby-installer to install another version of Ruby. Now I want to remove it and reinstall with RVM
[15:39:51] dfockler: has left #ruby: ("Leaving")
[15:39:53] pu22l3r: has joined #ruby
[15:40:22] KucukMubasir: is it safe to just delete the corresponding folder?
[15:40:41] havenwood: Cork: ruby -p -i -e "gsub 'cake', 'pie'" dessert.txt
[15:40:53] Cork: havenwood: from inside a ruby script
[15:41:00] havenwood: Cork: Aye, just an aside.
[15:41:13] havenwood: Cork: And couldn't resist the double-pie.
[15:41:18] Cork: havenwood: basically currently i would have to run 4 system("sed") calls
[15:41:26] Cork: i would like to make them ruby code
[15:42:08] Cork: i'm starting to wonder if i should go with system calls stead :/
[15:42:18] Cork: looks kinda crappy though
[15:42:45] havenwood: Cork: Just to throw an option into the mix: http://ruby-doc.org/stdlib/libdoc/shell/rdoc/Shell.html
[15:43:15] Cork: that is kinda cool...
[15:43:24] UtkarshRay: has joined #ruby
[15:43:38] Cork: really cool actually
[15:43:41] Cork: havenwood: thx!
[15:43:47] dfinninger: has joined #ruby
[15:43:51] havenwood: Cork: You're welcome!
[15:45:04] dirtyonekanobi: has joined #ruby
[15:45:37] PaulCapestany: has joined #ruby
[15:45:48] momomomomo_: has joined #ruby
[15:46:44] karapetyan: has joined #ruby
[15:47:28] jerematic: has joined #ruby
[15:47:35] webguynow: has joined #ruby
[15:48:43] psye: has joined #ruby
[15:48:53] jgt: has joined #ruby
[15:48:58] jhass: havenwood: have some pies https://www.youtube.com/watch?v=ZNiRzZ66YN0
[15:49:51] rwyoung: has joined #ruby
[15:50:19] pu22l3r: has joined #ruby
[15:51:03] pu22l3r: has left #ruby: ()
[15:53:17] luckyme: has joined #ruby
[15:53:17] dravine: has joined #ruby
[15:53:44] dfockler: has joined #ruby
[15:53:45] dgutierrez1287: has joined #ruby
[15:53:56] EminenceHC: has joined #ruby
[15:55:34] rikkipitt: has joined #ruby
[15:56:12] EminenceHC: has joined #ruby
[15:56:40] webguynow: has joined #ruby
[15:57:08] towski_: has joined #ruby
[15:57:16] leafybas_: has joined #ruby
[15:57:41] p0wn3d__: has joined #ruby
[15:59:19] pu22l3r: has joined #ruby
[16:00:00] PaulCapestany: has joined #ruby
[16:00:42] amclain: has joined #ruby
[16:00:56] ngscheurich: has joined #ruby
[16:01:56] arup_r: has joined #ruby
[16:03:43] dopie: has joined #ruby
[16:03:47] bahar: has joined #ruby
[16:03:53] last_staff: has joined #ruby
[16:08:20] dgutierrez1287: has joined #ruby
[16:08:26] Macaveli_: has joined #ruby
[16:09:36] Macaveli: has joined #ruby
[16:11:56] cschneid_: has joined #ruby
[16:11:59] slayerjain: has joined #ruby
[16:12:41] n008f4g_: has joined #ruby
[16:13:11] araujo: has joined #ruby
[16:14:06] Jardayn: has joined #ruby
[16:14:07] banjara: has joined #ruby
[16:14:27] shevy: if you have a number such as 765841 but it could also be 1234 or 765841765841, what way would you prefer to have it become "765_841" ? In other words the same way as ruby would allow one to use a number that would be more readable
[16:15:39] momomomomo: has joined #ruby
[16:16:08] elperdut: has joined #ruby
[16:16:38] webguynow: has joined #ruby
[16:17:20] elperdut: has joined #ruby
[16:17:39] karapetyan: has joined #ruby
[16:17:57] baroquebobcat: has joined #ruby
[16:18:21] Jackneill: has joined #ruby
[16:18:55] araujo: has joined #ruby
[16:18:55] araujo: has joined #ruby
[16:19:11] jhass: >> 1_2_3_4_5_67_89134
[16:19:12] ruboto: jhass # => 123456789134 (https://eval.in/435869)
[16:19:24] jdawgaz: has joined #ruby
[16:19:24] jhass: shevy: there are no limitations from ruby's side
[16:19:28] dymk: has left #ruby: ("Leaving")
[16:19:31] Alayde: has joined #ruby
[16:19:41] ItSANgo: has joined #ruby
[16:20:14] pipework: Ruby is limitless!
[16:20:25] wildlander: has joined #ruby
[16:20:44] shevy: people who use that are crazy
[16:20:44] kobain: has joined #ruby
[16:21:05] pipework: shevy: Underscores in numbers? No, it's fantastic.
[16:21:08] dfockler: haha that 1_000 syntax lolol
[16:21:19] [k-: people use commas in real life
[16:21:26] pipework: [k-: Ruby doesn't.
[16:21:32] Maletor: has joined #ruby
[16:21:34] gizmore: ruby is law
[16:21:51] jhass: [k-: actually real world disagrees whether to use commas, spaces or points
[16:22:35] shevy: pipework no, underscores like 1_2_3_4
[16:22:58] pipework: shevy: Oh, more than just to separate thousand places?
[16:23:21] shevy: 1_2_3_4_5_67_89134
[16:23:38] ruboto: jhass # => /tmp/execpad-e2a2ae28b0d3/source-e2a2ae28b0d3:2: trailing `_' in number ...check link for more (https://eval.in/435870)
[16:23:47] webguynow: has joined #ruby
[16:23:52] ruboto: shevy # => /tmp/execpad-bcbcce0e070e/source-bcbcce0e070e:2: trailing `_' in number (https://eval.in/435871)
[16:23:58] ruboto: pipework # => 133 (https://eval.in/435872)
[16:24:16] Melpaws: has joined #ruby
[16:24:47] JimmyNeutron: has joined #ruby
[16:24:55] [k-: >> 1_10_10_7
[16:24:56] ruboto: [k- # => 110107 (https://eval.in/435873)
[16:25:28] pipework: It can be nice for other things that are less than base-10, I think.
[16:27:04] bhaak: has joined #ruby
[16:27:12] Ox0dea: has joined #ruby
[16:27:43] ruboto: izzol_ # => undefined local variable or method `_1' for main:Object (NameError) ...check link for more (https://eval.in/435875)
[16:28:14] jhass: >> 0b1110_0011
[16:28:15] ruboto: jhass # => 227 (https://eval.in/435876)
[16:28:35] izzol2: >> .class
[16:28:36] ruboto: izzol_ # => /tmp/execpad-35be7ed5ab9d/source-35be7ed5ab9d:2: syntax error, unexpected '.' ...check link for more (https://eval.in/435877)
[16:29:17] RickHull1: has left #ruby: ()
[16:30:20] pipework: Oh, evidently greater than base 10 works.
[16:30:29] Kruppe: has joined #ruby
[16:31:10] Ox0dea: >> 0xd_e_a
[16:31:11] ruboto: Ox0dea # => 3562 (https://eval.in/435878)
[16:31:28] khebbie: has joined #ruby
[16:31:50] nickjj: has joined #ruby
[16:31:56] Ox0dea: Ruby needs more radix literals.
[16:32:20] mikecmpbll: has joined #ruby
[16:32:42] araujo: has joined #ruby
[16:34:07] sdothum: has joined #ruby
[16:34:15] voltalio: has joined #ruby
[16:35:01] p0wn3d__: has joined #ruby
[16:35:11] banjara: has joined #ruby
[16:36:35] araujo: has joined #ruby
[16:39:16] devoldmx: has joined #ruby
[16:41:03] da3mian: has joined #ruby
[16:41:08] jgpawletko: has joined #ruby
[16:41:21] izzol2: Ok, I'm starting weekend! Time for Sommerrodelbahn!
[16:41:42] Ox0dea: >> ($-0 = 42) rescue $!
[16:41:43] ruboto: Ox0dea # => #<TypeError: value of $-0 must be String> (https://eval.in/435879)
[16:42:21] craysiii: has joined #ruby
[16:42:51] Ox0dea: Ruby should use $-1 as the output base.
[16:44:28] leafybasil: has joined #ruby
[16:44:40] pipework: Cause you know ruby's all about that base, 'bout that base, no exceptions
[16:45:38] Ox0dea: >> Fixnum.prepend Module.new { def inspect; to_s $-1 || 10; end }; $-1 = 2; 42
[16:45:39] ruboto: Ox0dea # => 101010 (https://eval.in/435881)
[16:48:23] zenguy_pc: has joined #ruby
[16:48:50] p0wn3d__: has joined #ruby
[16:49:21] michael_mbp: has joined #ruby
[16:50:17] petricore: has joined #ruby
[16:51:04] HAL2328: has joined #ruby
[16:51:19] PaulCape_: has joined #ruby
[16:51:26] voltalio: has joined #ruby
[16:51:34] failshell: has joined #ruby
[16:52:37] fred1807: has joined #ruby
[16:52:54] fred1807: Hi mates.. How do I run this? do I need to compile? Is this a webserver/page? https://github.com/ephekt/ShouldISurf
[16:53:15] pipework: fred1807: It's a rack application.
[16:53:18] pipework: Look up how to run rack apps.
[16:54:13] otacon-: has joined #ruby
[16:54:24] fred1807: too many information on google... confusing
[16:54:32] fred1807: is this a web page Irun locally?
[16:55:07] pipework: You might want to master using a search engine then, it seems a much more valuable skill.
[16:55:10] ndrei: has joined #ruby
[16:55:42] shadoi: has joined #ruby
[16:56:33] fred1807: pipework: If you dont want to help, just dont
[16:56:48] Ox0dea: fred1807: You are resisting assistance.
[16:57:02] fred1807: Ox0dea: manpages assistance
[16:57:13] PaulCapestany: has joined #ruby
[16:57:20] fred1807: I sugest you read a manual on how to give assistance
[16:57:24] pipework: fred1807: Educate yourself, it's your prerogative and not my job. I gave you all you need to find exactly what you should be doing to find your answer. You'll find a lot of us have consulting fees if you'd like direct answers.
[16:57:35] pipework: Good luck with your attitude towards free help!
[16:58:02] fred1807: pipework: I was not talking to you, at first, there are 1k users in this public chanell, you just jump in whorign for attention
[16:58:22] pipework: People who are entitled, lul.
[16:58:34] rezzack: has joined #ruby
[16:59:17] s2013: has joined #ruby
[16:59:46] jhass: fred1807: what did you try so far?
[16:59:59] firstdayonthejob: has joined #ruby
[17:01:06] fred1807: I am installing a local web server on my mac,,, and will try to access it
[17:01:27] fred1807: http://anvilformac.com found this when looking for ruby apps
[17:02:06] Ox0dea: fred1807: Are you using some off-brand search engine?
[17:02:32] Taranis: has left #ruby: ()
[17:03:09] pipework: Ox0dea: Don't become a stockholm syndrome supporter! :D
[17:07:15] shevy: Ox0dea, look how quickly things can happen: https://bugs.ruby-lang.org/issues/11536
[17:07:43] shevy: suggestion - 2 hours later matz says ok, 3 hours later nobu adds it
[17:07:44] romero: has joined #ruby
[17:07:56] webguynow: has joined #ruby
[17:08:40] araujo: has joined #ruby
[17:08:47] postmodern: has joined #ruby
[17:09:08] bluOxigen: has joined #ruby
[17:10:26] fred1807: gemfile is like a mkefile?
[17:11:01] jhass: no, that's the Rakefile
[17:11:02] Ox0dea: shevy: Aye, that was certainly quick, but that method's absence was anomalous.
[17:11:11] jhass: the Gemfile lists the applications dependencies
[17:13:00] fred1807: so in this case, https://github.com/ephekt/ShouldISurf, all I need to do ir "ruby surf.rb" , right? So how can I auto install everything there is on gemfile ?
[17:13:33] Ox0dea: fred1807: Why not just go surfing?
[17:14:03] fred1807: always the better option
[17:14:08] da3mian: has joined #ruby
[17:14:18] jhass: gem install bundler; bundle install; bundle exec ruby surf.rb; I guess
[17:15:15] webguynow: has joined #ruby
[17:16:11] juanpablo_: has joined #ruby
[17:16:15] andyrs: has joined #ruby
[17:17:19] firstdayonthejob: has joined #ruby
[17:20:04] jobewan: has joined #ruby
[17:20:58] fred1807: hmm how do I start sinatra? `<main>': uninitialized constant Sinatra (NameError)
[17:21:22] Hanmac: has joined #ruby
[17:22:11] darix: did you do bundle exec ruby surf.rb?
[17:22:11] shevy: fred1807 did you require it
[17:22:30] shevy: http://www.sinatrarb.com/
[17:22:32] fred1807: yep, bundle exec ruby surf.rb
[17:22:33] LiquidInsect: there's a Bundler.require line in the config.ru file, which should do it
[17:22:40] darix: ah seems surf.rb isnt enough
[17:22:44] darix: fred1807: use rackup
[17:22:46] shevy: http://www.sinatrarb.com/intro.html
[17:22:57] darix: bundle exec rackup
[17:22:59] LiquidInsect: maybe bundle exec rackup
[17:23:06] shevy: I don't know bundler. I do gem install sinatra, then start the .rb file via ruby; et voila
[17:23:09] LiquidInsect: maybe I shoudl type faster
[17:23:24] catcher: has joined #ruby
[17:23:28] darix: shevy: they have the requires for sinatra in config.ru
[17:23:29] apt-get: has joined #ruby
[17:23:29] da3mian: has joined #ruby
[17:23:41] dfockler: it's known the faster you type commands the more likely they will run correctly
[17:24:12] LiquidInsect: dfockler: https://ruby-jokes.github.io/close_enough/ maybe.
[17:24:26] ndrei: has joined #ruby
[17:24:47] dfockler: Hahaha thanks for that
[17:24:48] shevy: darix I hate those russian files
[17:24:54] Ox0dea: The did_you_mean gem is actually going to be bundled with Ruby 2.3.
[17:25:21] shevy: I hope it won't interfere with the close_enough gem
[17:25:38] Jardayn: has joined #ruby
[17:25:54] shevy: lest we may have to add the did_you_really_want_to_do_this and the perhaps_you_try_some_other_way gems
[17:26:04] darix: shevy: in russia files hate you
[17:26:45] jdawgaz: has joined #ruby
[17:26:56] slayerja_: has joined #ruby
[17:29:34] failshell: has joined #ruby
[17:30:33] havenwood: has joined #ruby
[17:31:17] Igorshp: has joined #ruby
[17:31:20] dfockler: in files russia hates you
[17:32:36] Denis_: has joined #ruby
[17:33:11] khebbie: has joined #ruby
[17:33:50] adda_adda: has joined #ruby
[17:34:32] yeticry: has joined #ruby
[17:35:35] shevy: if you'd have to name a method in ruby ... a method that shall generate a html table with four <td> per row... what name would you pick?
[17:36:49] Ox0dea: Name things for what they do, not how they do it.
[17:36:53] webguynow: has joined #ruby
[17:37:06] Exuma: has joined #ruby
[17:37:07] shevy: yeah so what name
[17:37:29] zenguy_pc: has joined #ruby
[17:38:00] Ox0dea: The method just spits out a 4xn HTML table?
[17:38:40] shevy: hmm... yeah, or at least it is supposed to do this... I just realized that it uses % 2 ... so I wonder how it can make 4 entries per ... row?
[17:39:19] voltalio: has joined #ruby
[17:39:24] jaygen: has joined #ruby
[17:40:02] cndiv: has joined #ruby
[17:40:41] Ox0dea: Tables + mod-2 = zebras, more often than not.
[17:41:24] shevy: now THAT'S a good name!
[17:41:42] shevy: black | white | black | white
[17:41:46] shevy: Ox0dea you are a genius
[17:42:46] dopie: has joined #ruby
[17:43:12] shevy: I added a zebra_table alias
[17:44:01] shevy: http://blog.jaredfriedman.com/2015/09/15/why-i-wouldnt-use-rails-for-a-new-company/
[17:44:01] momomomomo: has joined #ruby
[17:44:09] shevy: "Rails? big problem: ruby"
[17:44:38] juanpablo_: has joined #ruby
[17:45:02] Ox0dea: shevy: "Zebra striping" isn't my invention, of course.
[17:45:33] shevy: well you brought the zebras to #ruby
[17:45:45] iamninja: has joined #ruby
[17:46:13] slayerjain: has joined #ruby
[17:46:40] webguynow: has joined #ruby
[17:46:40] ndrei: has joined #ruby
[17:48:41] shinnya: has joined #ruby
[17:48:54] apt-get: has joined #ruby
[17:49:29] podman: has joined #ruby
[17:51:28] webguynow: has joined #ruby
[17:51:48] dfinninger: has joined #ruby
[17:52:25] dfinning_: has joined #ruby
[17:53:25] youngbaks: has joined #ruby
[17:53:29] shmilan: has joined #ruby
[17:53:35] jhn: has joined #ruby
[18:00:47] baweaver: has joined #ruby
[18:02:09] andyrs: has joined #ruby
[18:02:38] workmad3: has joined #ruby
[18:02:49] elperdut: has joined #ruby
[18:03:05] pontiki: has joined #ruby
[18:04:26] Kruppe: has joined #ruby
[18:06:11] Kruppe: has joined #ruby
[18:08:03] darix: headius got angry it seems
[18:08:19] jackjackdripper: has joined #ruby
[18:08:36] headius: I have a low tolerance for shenanigans
[18:08:48] eam: did I miss something
[18:09:23] snockerton: has joined #ruby
[18:10:03] shevy: yeah what did we miss
[18:10:07] jackjackdripper: has joined #ruby
[18:10:20] darix: shevy: scroll down on the link you posted ;)
[18:10:31] prestorium: has joined #ruby
[18:10:50] baweaver: has joined #ruby
[18:11:26] shevy: oh I thought there was an IRC war :)
[18:12:42] jeadre: has joined #ruby
[18:12:49] capin: shevy: that's an interesting read. is that your blog?
[18:12:51] shevy: I think one of the simplest thing really is to show graphs with specific versions
[18:13:16] miah: somebody was wrong on the internet
[18:13:18] shevy: capin nah. I always try to get a blog going but then I realize I am too lazy... :( also I don't have much of importance to tell anyway
[18:13:26] darix: miah: news at 11
[18:13:27] shevy: miah IT HAPPENS ALL THE TIME!!!
[18:13:39] slayerjain: has joined #ruby
[18:13:50] shadoi: has joined #ruby
[18:14:03] baweaver: ACTION slowly lowers hammer
[18:14:07] baweaver: ACTION wanders back off
[18:14:28] ghostlines: has joined #ruby
[18:14:33] capin: shevy: it does interest me that an experienced rails / ruby developer who worked on Scribd would use WP for a blogging platform though :l
[18:14:43] darix: capin: you read all the way down to headius' comments?:D
[18:15:07] capin: darix: i didn't read the comments ...should i?
[18:15:25] headius: after I commented I discovered pretty much everyone thought the article was wrong
[18:15:25] slayerjain: has joined #ruby
[18:15:42] shevy: yeah... though truth be told, while I think that PHP is awful, I think they managed to build some really great software. or perhaps "great" is not the right word... software that has become "popular". Two months ago, I found out that one bioinformatics group in vienna will be using drupal for their internal campus (the web-related parts there)
[18:15:57] juanpablo_: has joined #ruby
[18:16:13] baroquebobcat: has joined #ruby
[18:16:17] baweaver: which rails dev uses wordpress now?
[18:16:19] miah: scribd was stuck on rails 2.5 for a long time iirc
[18:16:27] miah: because of the _many_ internal hacks
[18:16:31] baweaver: answer: a freaking ton of them
[18:16:38] shevy: baweaver the site at http://blog.jaredfriedman.com/ seems to do so
[18:16:44] miah: basically, anything scribd has to say about technology i'd take with a grain of salt
[18:16:52] miah: because their stack is fucked from top to bottom
[18:17:06] darix: miah: and back?
[18:17:06] miah: i worked there for 3 months before RUNNING THE FUCK OUT
[18:17:33] baweaver: avdi mentioned once he uses wordpress so he could focus more on writing than tinkering, so PHP works well to deter that urge.
[18:17:55] Igorshp: has joined #ruby
[18:17:55] miah: use whatever the fuck you want for blogs. your personal opinion is different than mine, blah blah blah
[18:18:11] ramfjord: has joined #ruby
[18:18:17] miah: i personally use jekyll because html + css == instant page loads
[18:18:26] baweaver: I tend to agree, just because you _can_ build a blogging platform doesn't mean you _should_
[18:18:42] darix: miah: the only thing that annoys me about people using WP. many do not upgrade
[18:18:47] baweaver: http://devblog.avdi.org/2012/08/09/why-wordpress/
[18:18:49] miah: but i dont bother writing anything because having opinions on the internet is a bad thing
[18:18:51] baweaver: there it was
[18:19:21] baweaver: I use Octopress because I've sunk time into it and it works.
[18:19:34] darix: that's why i suggest for many people "forget WP and similar tools. use static generators" ^^
[18:19:50] miah: i write md, run a command and then rsync the results.
[18:19:54] darix: https://pixls.us/ is fully static e.g.
[18:19:56] baweaver: honestly I think it doesn't matter
[18:19:57] eam: darix++ I can't fathom using a database to host ... static text
[18:20:09] darix: (except the comments which come from discourse)
[18:20:18] baweaver: Do whatever and worry about that text being written in the first place.
[18:20:29] STONECOLDDEVIN: i just wrote my own cms, with threaded comments and searchability. idgaf.
[18:20:30] eam: but I use an email list for that so w/e
[18:20:38] eam: who needs http?
[18:20:44] darix: eam: the best request i got was. "we want WP and then have it running for 10years as archive after the event"
[18:20:49] miah: comments are just ways for people to piss on your work though
[18:20:50] Ox0dea: baweaver: Judging by the order of your expected output for pad_mapper(3, 7), the solution you had in mind wasn't reduce(:product); please explain.
[18:20:54] capin: i ended up writing a minimilistic blogging platform for my site using rails / Ruby, and am pretty happy with it
[18:21:03] eam: miah: depends, I get a lot of good comments on my mailing lists
[18:21:11] momomomomo: has joined #ruby
[18:21:19] miah: i wish i was part of that internet
[18:21:20] darix: miah: depends on your community i guess^^
[18:21:31] eam: miah: you're welcome to join :)
[18:21:40] miah: i havent found a community yet that lacks hostility
[18:21:44] baweaver: I know what you're mentioning, but not what exactly you mean.
[18:22:04] jenrzzz: has joined #ruby
[18:22:56] Ox0dea: baweaver: Your expected outputs are weird; one is row-major, the other isn't.
[18:23:15] baweaver: I wrote the tests as a vague example
[18:23:21] baweaver: hadn't run them yet.
[18:23:28] Ox0dea: Fair enough.
[18:23:35] diegoviola: has joined #ruby
[18:23:40] capin: miah: there's some friendly people in #rubyonrails
[18:23:54] miah: i dont rails
[18:23:57] STONECOLDDEVIN: hostility will be everywhere you go, you have to learn to just filter it
[18:23:59] Ox0dea: baweaver: The #match_array expectation saved the day, in any case.
[18:24:11] baweaver: fair, I'll update it later.
[18:24:16] baweaver: Y'might leave a comment there.
[18:24:28] baweaver: meetings everywhere today.
[18:24:36] miah: easier to not take part than it is to filter
[18:24:37] elperdut: has joined #ruby
[18:24:56] baweaver: stonecolddevin: that's what's screwed up is that people are expected to filter instead of others behaving like decent human beings.
[18:25:09] grenierm: has joined #ruby
[18:25:09] baweaver: victim shaming yo, not cool.
[18:25:52] rubynoob: has joined #ruby
[18:25:53] baweaver: besides, said people that need to be filtered tend to find themselves mode +q pretty fast
[18:26:07] STONECOLDDEVIN: baweaver: uh i'm not shaming any victims. it's being accountable for yourself and taking care of yourself and not worrying about people that could stress you out
[18:26:17] baweaver: and if they don't, just say !.ops without the .
[18:26:23] capin: miah: have you seen reddit :P
[18:26:47] darix: stonecolddevin: that's why we got the banhammer
[18:26:58] miah: i have, i avoid 99% of it. im on a few specific subs that are ok, and some that are mostly rage. but i play video games so..
[18:26:58] STONECOLDDEVIN: darix: that's something I can get behind.
[18:27:05] baweaver: different ! was it?
[18:27:11] Ox0dea: Sneakier.
[18:27:12] DexterLB: has joined #ruby
[18:27:26] darix: Ox0dea: dont worry. you dont have to fear me ... directly ;)
[18:27:59] miah: the problem with 'just filter it' is that different people deal with things different internally than others. and what works great for you, may not work great for me. in this case 'just filter it' does not work well for me.
[18:28:44] baweaver: well there are three extra bytes in there at least (226, 128, 139)
[18:28:48] rezzack: has joined #ruby
[18:29:11] andyrs: has joined #ruby
[18:29:33] Ox0dea: That'd be ZWSP.
[18:29:43] Luming: has joined #ruby
[18:30:15] baweaver: zero width space, TIL
[18:30:28] Ox0dea: My condolences.
[18:31:02] coecoe2000: has joined #ruby
[18:31:18] youngbaks: has joined #ruby
[18:32:36] jhass: another trick is to use the LTR mark
[18:32:54] workmad3: has joined #ruby
[18:33:25] dstarh: has joined #ruby
[18:33:32] dopie: has joined #ruby
[18:33:58] ruby-doobie: has joined #ruby
[18:34:02] rezzack1: has joined #ruby
[18:34:03] f00dMonsta: has joined #ruby
[18:34:12] NeverDie: has joined #ruby
[18:34:34] tcdowney: has joined #ruby
[18:34:50] atomical: has joined #ruby
[18:35:00] khebbie: has joined #ruby
[18:35:59] last_staff: has joined #ruby
[18:36:04] Ox0dea: >> require 'objspace'; ObjectSpace.memsize_of ''
[18:36:05] ruboto: Ox0dea # => 20 (https://eval.in/435890)
[18:36:41] slayerjain: has joined #ruby
[18:36:43] DexterLB: has joined #ruby
[18:38:02] da3mian: has joined #ruby
[18:39:34] shevy: >> require 'objspace'; ObjectSpace.memsize_of 'a'
[18:39:35] ruboto: shevy # => 20 (https://eval.in/435896)
[18:40:03] devoldmx: has joined #ruby
[18:40:21] drbrain: >> require 'objspace'; (11..12).map { |size| ObjectSpace.memsize_of " " * size }
[18:40:22] ruboto: drbrain # => [20, 33] (https://eval.in/435899)
[18:40:33] NeverDie: has joined #ruby
[18:40:42] pawnbox_: has joined #ruby
[18:40:58] drbrain: on 64 bit ruby you can fit 23 bytes in a struct RString
[18:41:26] voltalio: has joined #ruby
[18:41:55] Ox0dea: http://patshaughnessy.net/2012/1/4/never-create-ruby-strings-longer-than-23-characters
[18:42:09] porfa: hmm how can i trim a number ? for i.e. 4.9 * 1.33 = 6.517000000000001 i just want 6.5
[18:42:40] mjuszczak: has joined #ruby
[18:42:56] drbrain: shevy: https://github.com/ruby/ruby/blob/077e2037ebe23bee105442779182c7ef0ba85916/include/ruby/ruby.h#L896-L934
[18:43:08] drbrain: Ox0dea: or Arrays with more than three elements
[18:43:23] chills42: has joined #ruby
[18:44:12] jackjackdripper1: has joined #ruby
[18:45:37] elperdut: has joined #ruby
[18:45:37] Ox0dea: >> foo = 4.9 * 1.33; [foo, foo.round(1), ('%.1f' % foo)] # Porfa
[18:45:38] ruboto: Ox0dea # => [6.517000000000001, 6.5, "6.5"] (https://eval.in/435900)
[18:45:57] porfa: damnfooporfa
[18:46:03] startupality: has joined #ruby
[18:46:14] DLSteve: has joined #ruby
[18:49:23] cndiv: has joined #ruby
[18:50:18] ruurd: has joined #ruby
[18:50:31] momomomomo_: has joined #ruby
[18:52:20] youngbaks: has joined #ruby
[18:54:30] cndiv: has joined #ruby
[18:54:54] abdulrehman: has joined #ruby
[18:55:12] abdulrehman: has joined #ruby
[18:55:45] toretore: has joined #ruby
[18:57:34] kirun: has joined #ruby
[18:58:26] pocketprotector: has joined #ruby
[18:59:40] chadwtaylor: has joined #ruby
[19:00:12] daed: has joined #ruby
[19:00:25] dgutierrez1287: has joined #ruby
[19:01:47] grenierm: has joined #ruby
[19:01:50] mosez: has joined #ruby
[19:02:04] cndiv: Hey #ruby, another n00b question. I'm learning from an online course (pragmatic studio) and they have me learning 2012 RSpec and some outdated things. My question is - is RSpec the big-name testing suite at this point? And if not, is the "domain-specific" language it uses universal for all testing suites? Am I learning something out-of-date?
[19:02:17] da3mian: has joined #ruby
[19:02:43] eam: it is not universal, it's fairly weird and specific to rspec. That said, it's still used by many
[19:03:17] dgutierrez1287: has joined #ruby
[19:03:22] eam: many others use minitest or test-unit or other more standard looking/feeling testing suites
[19:03:34] porfa: Ox0dea: when i call the var with the math, it doesn't output 6.5
[19:03:37] cndiv: eam: I totally get why I need to learn testing, but learning a specific language that people gave up on, in favor of something that's more modern/easier... sounds like a time waster.
[19:03:38] eam: (and if you learn these you'll be at home in test suites used by other languages)
[19:03:39] shevy: cndiv minitest is also popular and you could ask zenspider here every now and then for simple questions
[19:04:09] cndiv: shevy: Is there an advantage of RSpec over minitest or others? Or it's the same game, different method?
[19:04:14] eam: cndiv: rspec is common in ruby, but I agree with you -- I avoid it
[19:04:36] tatsuya_o: has joined #ruby
[19:04:39] porfa: foo = 4.9 * 1.33; [foo, foo.round(1), ('%.1f' % foo)][1].to_s.gsub('.',',')
[19:04:47] cndiv: eam: I'm just (on step one) dealing with "Deprecation Warnings" and that makes me wary.
[19:04:54] porfa: 2.2.1 :389 > foo
[19:04:54] porfa: => 6.517000000000001
[19:05:05] porfa: stop the madness
[19:05:08] ruurd: has joined #ruby
[19:05:19] eam: Porfa: why what?
[19:05:23] craysiii: what is this operator called: <<
[19:05:32] eam: cndiv: left shift
[19:05:33] Ox0dea: craysiii: Shovel.
[19:05:33] porfa: i just want 6,5 in my console ;_;
[19:06:05] eam: Porfa: so, round?
[19:06:16] cndiv: Porfa: Using their example code I get back a "Using `should` from rspec-expectations' old `:should` syntax without explicitly enabling the syntax is deprecated."
[19:06:23] darix: Porfa: works like that here.
[19:06:52] Ox0dea: cndiv: RSpec is still very popular, `should` not so much.
[19:06:54] PaulCape_: has joined #ruby
[19:07:31] darix: https://gist.github.com/darix/7cffb9ffa91fcbe03ef9
[19:08:01] cndiv: Ox0dea: Is RSpec overly complex, you think? I'm a little surprised there isn't more of an... automatic way of creating tests, or something. Like a "what's this supposed to do?" sort of gem, or something that prompts you and then fills in the blanks. Or maybe I'm being lazy or ignorant of something.
[19:08:44] Ox0dea: cndiv: Yes, it's overly complex, but many people feel its DSL to be "human-readable", as it were.
[19:08:56] eam: the way we express "what's this supposed to do" is the code comprising the function itself
[19:09:03] leafybasil: has joined #ruby
[19:09:20] eam: presumably the methods own definition is the most concise way to express the function of the method
[19:09:48] cndiv: Ok, that makes sense. So I guess I'm going to push on with RSpec, as instructed, and try to patch using the error messages as they come up.
[19:09:58] eam: testing basically operates on the assumption that we screwed up in explaining what we want the computer to do
[19:10:08] cndiv: Like I've said before, all this is getting into my head, one way or another!
[19:10:40] darix: eam: or on the assumption "this code will cover all the cases but some nice person thought it should also eat that input data and not fail" :)
[19:11:02] eam: yes, expectations vary between authors
[19:11:23] cndiv: eam: But RSpec is standard enough that it's not unreasonable at all to use it in 2015
[19:11:47] eam: cndiv: a matter of personal opinion, I think. Some projects you're likely to work with will use it
[19:11:52] eam: it's probably worth understanding
[19:12:10] cndiv: And then I can move on if necessary in the future, that makes sense.
[19:12:34] cndiv: I'm basically just making sure I'm not learning a depreciated, now-backwards, 'grandpa' sort of way through testing for no apparent reason.
[19:12:45] Ox0dea: *deprecated
[19:14:18] Ox0dea: Test suites lose value as soon as you drive them off the lot.
[19:14:24] cndiv: has joined #ruby
[19:14:37] yfeldblum: has joined #ruby
[19:15:49] PaulCapestany: has joined #ruby
[19:16:58] cndiv: Ox0dea: Well, I meant depreciated - diminished in value over time, not just disapproved of. But both, really.
[19:17:11] Ox0dea: I doubt it, but okay.
[19:17:32] cndiv: I'm confused what you mean
[19:18:17] chadwtaylor: has joined #ruby
[19:18:20] eam: cndiv: pretty sure it's a "buy used" argument, maybe Ox0dea is anti-NIH?
[19:19:12] SCHAAP137: has joined #ruby
[19:19:30] tubbo: no Ox0dea just knows the difference between "deprecated" and "depreciated"
[19:19:34] tubbo: which most programmers simply don't
[19:20:29] eam: I'm still trying to figure out why the dictionary misspelled referrer
[19:20:39] cndiv: Well, I'm not a programmer, that's what I'm working on, but I've read books before. I'm not trying to stir up trouble.
[19:20:53] eam: cndiv: your observations are astute and on-point; don't sweat it
[19:21:12] Ox0dea: https://stackoverflow.com/search?q=depreciated
[19:21:19] Ox0dea: cndiv: You're in good(?) company. <3
[19:21:24] tubbo: cndiv: it's cool, just a reoccuring joke i've noticed amongst programmers. you've probably heard "depreciated" a lot more than "deprecated" because your investments can't deprecate :P
[19:21:38] eam: definately
[19:21:50] miah: we self deprecate, but rarely self depreciate
[19:21:52] tatsuya_o: has joined #ruby
[19:22:51] Ox0dea: Nothing is worse than "recurse".
[19:22:52] eam: "I'm such an idiot"
[19:23:06] ruurd: has joined #ruby
[19:23:25] cndiv: Ok, out of here for the day. Thanks for your help, all.
[19:23:32] miah: cndiv: <3
[19:23:51] Ox0dea: cndiv: Did you learn how to convert from `should` to `expect`?
[19:24:10] eam: ruby's expect support is lacking
[19:24:12] cndiv: Ox0dea: I will, as I work my way through the lesson. :-)
[19:24:17] Ox0dea: cndiv: Copy.
[19:24:47] cndiv: Ox0dea: Copy which?
[19:24:51] Ox0dea: cndiv: That.
[19:24:52] cndiv: or, what?
[19:25:08] cndiv: Oh, alright. Thanks.
[19:25:39] eam: she's a which
[19:26:03] chadwtaylor: has joined #ruby
[19:26:28] Ox0dea: The score of the other game was two to two too.
[19:28:31] k3asd`: has joined #ruby
[19:29:42] havenwood: Ships with Ruby ?????? Rails default ?????? Faster ?????? Simpler ??????????????????
[19:30:18] dorei: havenwood: does it have color output like rspec? :D
[19:30:27] havenwood: dorei: require 'minitest/pride'
[19:30:51] havenwood: dorei: Very rainbow ^ but yeah red/green is nice.
[19:30:58] workmad3: has joined #ruby
[19:31:51] linuxboy_: has joined #ruby
[19:31:59] havenwood: dorei: Pride ships with Ruby but you can use it as an example of how to do it in any custom fashion your like or use a plugin like minitest-rg.
[19:32:48] dorei: i'll give it a try, thanx :)
[19:33:08] havenwood: dorei: https://github.com/blowmage/minitest-rg#readme
[19:33:33] banjara: has joined #ruby
[19:33:37] baroquebobcat_: has joined #ruby
[19:33:47] banjara: has joined #ruby
[19:34:04] jerematic: has joined #ruby
[19:36:46] NeverDie: has joined #ruby
[19:36:52] khebbie: has joined #ruby
[19:38:41] freerobby: has joined #ruby
[19:41:23] pwnd_nsfw: has joined #ruby
[19:43:04] vdamewood: has joined #ruby
[19:43:22] mosez: has joined #ruby
[19:43:51] paulcsmith: has joined #ruby
[19:44:30] aswen: has joined #ruby
[19:44:33] HAL2328: has joined #ruby
[19:46:03] bruno-: has joined #ruby
[19:47:46] beginner_with_qu: has joined #ruby
[19:48:51] umgrosscol: has joined #ruby
[19:48:59] Oka: has joined #ruby
[19:49:07] d5sx43: has joined #ruby
[19:50:57] beginner_with_qu: Alright. If I wanted to randomly pair two distinct arrays [1x,2x,3x] [1y,2y,3y] such as [1x,2y] [3x,1y] [2x,2y] but I wanted to prevent any pair [2x,2y] from occurring, is there a simple way to go about this?
[19:52:18] paulcsmith: has joined #ruby
[19:52:49] havenwood: >> [1, 2, 3].uniq.sample 2
[19:52:57] ruboto: havenwood # => [2, 1] (https://eval.in/435924)
[19:53:14] havenwood: beginner_with_qu: oh
[19:53:27] slayerjain: has joined #ruby
[19:53:36] havenwood: beginner_with_qu: I just saw you want one from first and one from last. Maybe say more about the requirements. Are there always going to be a pair available?
[19:55:09] allomov: has joined #ruby
[19:55:13] Ox0dea: beginner_with_qu: Do you mean to say that you don't want to get back a pair whose elements are equal?
[19:55:15] beginner_with_qu: I took an array such as [xy,xy,xy] and broke it into [x,x,x] [y,y,y]. then shuffled y, and did an x_array.each do, to repair them. This gave me a new randomly sorted pairs. However
[19:55:25] beginner_with_qu: I want to exclude original pairs
[19:55:56] beginner_with_qu: none of these values should be considered equal to another
[19:55:57] eam: don't shuffle? Instead sample
[19:56:12] beginner_with_qu: sample might repeat
[19:56:18] eam: right, so don't
[19:56:30] jerematic: has joined #ruby
[19:56:32] eam: r = rand [1,2,3,4].size; # index of array one
[19:56:43] eam: when you pick a rand for index of array two, don't let it equal r
[19:56:53] baweaver: has joined #ruby
[19:57:12] beginner_with_qu: Yes, thats exactly what Im looking for.
[19:58:05] eam: the problem is, r2 = rand(lim) until r2 != r1 is O(infinity)
[19:58:09] eam: probably fine though
[19:58:16] beginner_with_qu: Although Is there a way to call rand(x) and exclude a result?
[19:58:23] eam: no, just call it in a loop
[19:58:41] Ox0dea: beginner_with_qu: Could x be quite large?
[19:58:43] beginner_with_qu: Alright, that was my first guess, but it seemed convoluted
[19:58:49] eam: OR, a more technically correct solution might be to subtract 1 from the lim
[19:58:54] eam: and then adjust it with a bit of math
[19:58:56] beginner_with_qu: x and y are both strings, actually
[19:59:08] eam: that's O(1) for realsies
[19:59:14] Ox0dea: beginner_with_qu: No, I meant in your call to #rand there.
[19:59:31] ricer2: has joined #ruby
[20:00:02] beginner_with_qu: eam, I'll work with that. Ox0dea I dont know what you mean by quite large
[20:00:02] niemcu: has joined #ruby
[20:00:03] eam: r1 = rand(100); r2 = rand(99); r2 +=1 if r2 >= r1
[20:00:32] Ox0dea: >> ([*1..10] - [7]).sample # random x from 1 to 10, never 7
[20:00:33] ruboto: Ox0dea # => 9 (https://eval.in/435926)
[20:00:36] Ox0dea: eam's is better, though.
[20:01:09] ruurd: has joined #ruby
[20:01:28] beginner_with_qu: thanks for the help. I'm going to copy both and break them down until I'm certain I understand both, and move forward from there. :)
[20:01:49] eam: solid strategy
[20:03:03] HAL2328: has joined #ruby
[20:03:37] symm-: has joined #ruby
[20:07:12] baweaver: has joined #ruby
[20:08:14] araujo_: has joined #ruby
[20:08:49] tejasmanohar: has joined #ruby
[20:10:19] moeabdol: has joined #ruby
[20:10:49] x-light: has joined #ruby
[20:11:01] hashrocket: has joined #ruby
[20:11:15] bazbing81: has joined #ruby
[20:11:53] CustosL1men: has joined #ruby
[20:12:04] porfa: hmmm anyone knows why??? "Selenium::WebDriver::Support::Select.new(driver.find_element(:id, "BLABLA")).select_by(:text, "N??o")" gives error??? utf-8
[20:12:15] porfa: how to make it work with utf 8 from the start?
[20:12:39] porfa: just say "hey, everything here is gonna go around in utf, so you better listen carefully son"
[20:12:43] Zackio: has joined #ruby
[20:13:01] kadoppe: has joined #ruby
[20:14:35] porfa: i have # encoding: UTF-8
[20:14:52] beauby: has joined #ruby
[20:14:52] bazbing80: the define method can take both a proc and an unbound method when defining its methods. Can I convert a proc (e.g. { 4 + 4 } ) into an unbound method and use that with 'define'. Or can I turn an unbound method (retrieved via .instance_method) and convert that into a proc and use it with define?
[20:15:33] Ox0dea: bazbing80: Why do you need to do any conversion?
[20:15:36] Vile`: has joined #ruby
[20:17:19] freerobby: has joined #ruby
[20:18:24] bazbing80: Ox0dea: not critical, but I'm refactoring my code and don't want a certain method to have to differentate between whether its been given a block (a proc) or an argument (an unbound method). I either want to give it only procs or only unbound methods
[20:18:47] Ox0dea: bazbing80: Oh, sorry. I misread. I thought you were asking about the #define_method metho.
[20:19:05] eam: a block, a proc, a lambda, panama!
[20:19:06] bazbing80: Ox0dea: nope I understand that :)
[20:19:14] slayerjain: has joined #ruby
[20:20:52] Ox0dea: bazbing80: Proc and UnboundMethod can't be used interchangeably, since the latter needs to be bound before being called.
[20:21:13] Ox0dea: I'm sure you're doing something a little crazy, so why not alias Proc#bind to #itself. :P
[20:22:42] llrot: has joined #ruby
[20:22:49] llrot: how are programming talk throughs made on khan academy?
[20:22:50] andyrs: has joined #ruby
[20:23:12] Ox0dea: llrot: Ctrl-U.
[20:23:13] dopie: has joined #ruby
[20:23:13] voltalio: has joined #ruby
[20:23:28] bazbing80: Ox0dea: it is a little crazy (only a little :P)...do you mean monkey-patch the Proc class and use alias_method :itself, :bind ?
[20:23:39] jamesaxl: has joined #ruby
[20:23:45] Ox0dea: bazbing80: Well, yeah, something like that.
[20:23:53] Ox0dea: Only it's backwards. :/
[20:24:18] Ox0dea: proc.bind().call(1, 2) vs. unbound.bind(1, 2).call
[20:24:48] bazbing80: Ox0dea: I know, I keep doing that! In my head I'm
[20:25:04] bazbing80: oops trigger happy enter..but yeah that could work, thanks :P
[20:26:11] phutchins: has joined #ruby
[20:26:13] redondo: has joined #ruby
[20:26:24] Ox0dea: bazbing80: You could have some proxy class that does the invocations in the proper order depending on whether it was constructed with a Proc or a UM.
[20:27:15] gurnoorinder: has joined #ruby
[20:27:49] gurnoorinder: hello everyone. Can anyone tell me which is the most suitable version of ruby for dev on mac os 10.6.8
[20:28:08] bazbing80: Ox0dea: that's a nice idea... .define takes UMs and Procs like a champ so I thought it was easy to convert between them. But I'll create a new class for practise
[20:28:08] gurnoorinder: i tried downloading 2.2.2 and it failed to complue. using chruby and ruby-install
[20:28:26] MagePsycho: has joined #ruby
[20:28:43] gurnoorinder: jhass: okay. 2.2.3?
[20:28:47] Ox0dea: bazbing80: It takes them, sure, but the problem is that you're not able to ignore which kind you got before calling it, right?
[20:28:53] jhass: gurnoorinder: that's what i said
[20:29:16] gurnoorinder: jhass: and incase it fails to install. any alternative version?
[20:29:20] havenwood: gurnoorinder: Did you install Homebrew first? Is it updated (`brew update`)? Is brew having issues (`brew doctor`)?
[20:29:37] jhass: gurnoorinder: in case it fails come here with the error message
[20:29:44] bazbing80: gurnoorinder: I remember rvm required GCC available through xcode, but mac days are over for me. Ubuntu now.
[20:30:21] gurnoorinder: i did brew doctor. resolved all the issues. it needs xcode 3.2.6 which i am downloading right now.
[20:30:22] shevy: yay! come to linux
[20:30:34] havenwood: gurnoorinder: Aha, yup.
[20:31:03] havenwood: gurnoorinder: Make sure to do a `brew update` before other commands.
[20:31:04] bazbing80: Ox0dea: ill create a gist haha. it's such a trivial thing, just gathering knowledge
[20:31:30] Ox0dea: bazbing80: Looking forward to seeing how you got into this mess. :P
[20:31:33] d5sx43: has joined #ruby
[20:31:50] gurnoorinder: havenwood: good to see you again. i did and brew said everything is up to date.
[20:31:55] gurnoorinder: will do it again havenwood
[20:32:14] lea: has joined #ruby
[20:32:30] EminenceHC: has joined #ruby
[20:32:36] havenwood: That Xcode version just didn't seem right since 7.0 has been released.
[20:33:08] bazbing80: Ox0dea: ill create a gist haha. it's such a trivial thing, just gathering knowledge
[20:33:15] r_baron: has joined #ruby
[20:34:20] stamina: has joined #ruby
[20:34:52] benlieb: has joined #ruby
[20:36:45] mjuszczak: has joined #ruby
[20:36:46] uber: has joined #ruby
[20:38:12] Ox0dea: bazbing80: Should I go look for it?
[20:38:38] khebbie: has joined #ruby
[20:39:21] troyready: has joined #ruby
[20:40:04] deject3d: has joined #ruby
[20:40:31] gurnoorinder: havenwood: but i am still using 10.6.8 and thats the max i can use on this version of mac os i think
[20:40:48] devoldmx: has joined #ruby
[20:40:59] gurnoorinder: havenwood: somehow i am not able to install ruby versions more than 2.1.3 using chruby
[20:41:07] yfeldblum: has joined #ruby
[20:41:20] havenwood: gurnoorinder: Your GCC seems too old.
[20:41:32] miah: you can brew install gcc
[20:41:42] havenwood: gurnoorinder: There are workarounds. Update OS X!
[20:41:43] miah: to avoid the xcode plague
[20:41:49] miah: havenwood: not possible on all macs
[20:41:56] havenwood: miah: good point
[20:42:02] miah: i have a macbook stuck on 10.6.8
[20:42:06] miah: THANKS APPLE
[20:42:11] gurnoorinder: okay. i willl try
[20:42:18] ItSANgo: has joined #ruby
[20:42:44] gurnoorinder: havenwood: miah: i had 2.2.2 via rvm. now that i switched to chruby, there seems to be a problem
[20:42:49] miah: honestly, once the mac falls into 'unsupported by apple' territory its probably best to just put linux on it. but my daughter is using that macbook for now.
[20:42:54] jschmid: has joined #ruby
[20:43:17] niemcu: has joined #ruby
[20:43:18] segfalt: has joined #ruby
[20:43:26] miah: gurnoorinder: you might have to re-install ruby 2.2.2 for chruby, or move your /usr/local/share/rvm/rubies/2.2.2 (or whatever its called) into ~/.rubies
[20:43:27] havenwood: gurnoorinder: RVM supports older systems and more Ruby patches, etc. It's tens of thousands of lines of shell.
[20:43:28] gurnoorinder: miah: maybe i will do that pretty soon if it doesnt work for me
[20:43:47] miah: i usually use ruby-install with chruby
[20:44:05] havenwood: gurnoorinder: brew tap homebrew/versions && brew install gcc5
[20:44:24] havenwood: gurnoorinder: Then: ruby-install ruby 2.2.3 -- CC=gcc-5
[20:44:27] gurnoorinder: miah: i had deleted everything from mac. and i ma now making a fresh install
[20:44:48] havenwood: Or is it `CC=gcc-5.0`? Dunno.
[20:45:14] havenwood: gurnoorinder: Anyways, last time I tested it: ruby-install ruby 2.2.3 -- CC=gcc-4.9
[20:45:34] havenwood: gurnoorinder: Check the requirements (gcc >= 4.2): https://github.com/postmodern/ruby-install#requirements
[20:45:40] gurnoorinder: oops havenwood i just ran "brew install gcc"
[20:45:51] havenwood: gurnoorinder: That should grab gcc-5
[20:46:00] gurnoorinder: alright. will keep a check on that
[20:46:25] havenwood: The only reason to tap versions really is so we can give exact instructions on the CC=
[20:46:37] redondo: has joined #ruby
[20:46:50] gurnoorinder: havenwood: thanks. got it.
[20:47:19] gurnoorinder: miah: is upgrading the os worth it? i tried upgrading it once and it really screwed my system. it only has 4 gig of ram.
[20:47:29] freezevee: has joined #ruby
[20:47:49] gurnoorinder: havenwood: do u use a mac?
[20:47:58] robbyoconnor: has joined #ruby
[20:48:17] da3mian: has joined #ruby
[20:52:59] mesamoo: has joined #ruby
[20:53:27] SenpaiSilver: has joined #ruby
[20:56:46] nettoweb: has joined #ruby
[20:56:54] urika: has joined #ruby
[20:58:49] jenrzzz_: has joined #ruby
[21:00:08] beauby: has joined #ruby
[21:00:11] havenwood: gurnoorinder: I often do, yeah.
[21:00:40] havenwood: gurnoorinder: Newer OS X actually compresses memory.
[21:01:25] omarJs: has joined #ruby
[21:01:44] gurnoorinder: havenwood: so if i get 8 gig of ram total and upgrade it to yosemite, will it serve the purpose? and no performance issues?
[21:02:06] imperator: has joined #ruby
[21:02:17] miah: i use a mac, for now. i tend to run the newest stuff. but i also have more than 4gb of ram. my other macbook that my daughter uses only has 2 gb of ram. its fine with 10.6.8, i cant upgrade it to anything higher than that so i have no idea if performance improves.
[21:02:39] Azure|dc: has joined #ruby
[21:02:42] gurnoorinder: miah: thanks a lot
[21:02:57] miah: ram upgrades, and os etc, all depend on your mac hardware though, so be aware of that
[21:03:36] tacit7: has joined #ruby
[21:03:36] gurnoorinder: miah: i will take care of that
[21:04:11] porfa: how can i check for an element in selenium without it freaking out?
[21:04:38] deject3d: this is the ruby channel not the selenium channel
[21:06:37] atmosx: yes but don't do it ever again
[21:06:37] Jammyhammy|Work: has joined #ruby
[21:07:37] atmosx: miah: I heard that the laest OS has perf. improvements, mostly.
[21:07:40] atmosx: so it shoul dbe okay
[21:07:46] jgpawletko: has joined #ruby
[21:07:49] rakm: has joined #ruby
[21:08:26] havenwood: Porfa: Looks like there really is a #selenium channel. :) I bet the #rubyonrails channel is more familiar as well.
[21:08:40] platzhirsch: has joined #ruby
[21:09:02] HAL2328: has joined #ruby
[21:09:32] HAL2328: has joined #ruby
[21:10:05] HAL2328: has joined #ruby
[21:10:36] miah: atmosx: that to me sounds subjective
[21:10:52] HAL2328: has joined #ruby
[21:10:56] miah: <- not planning on upgrading to elcapitan.
[21:11:19] miah: hoping to turn in my work laptop soon and not run osx again
[21:12:16] Melpaws: has joined #ruby
[21:12:31] diegoviola: has joined #ruby
[21:12:40] amystephen: has joined #ruby
[21:14:03] drewvanstone: has joined #ruby
[21:14:18] chadwtay_: has joined #ruby
[21:14:23] HAL2328: miah, what's the matter with osx
[21:14:25] FernandoBasso: has joined #ruby
[21:14:40] bugrum: has joined #ruby
[21:14:41] HAL2328: miah, you want windows hell?
[21:15:01] miah: no. but its my personal opinion that its going down hill and i wish to not run it anymore.
[21:15:19] tcdowney: Windows 10 is a flawless operating system optimized for Ruby development. There is so such thing as "windows hell." :)
[21:15:31] miah: why are you assuming i'll run windows if i leave osx?
[21:15:34] havenwood: I have a soft spot for the BSDs.
[21:15:46] workmad3: has joined #ruby
[21:15:48] pipework: tcdowney: You're not even a good troll.
[21:15:55] tcdowney: just jokin :P
[21:16:01] capin: ACTION <3 arch
[21:16:02] Vile`: has joined #ruby
[21:16:02] pipework: Tell me about OS/2 being a haven for developers.
[21:16:10] mjuszczak: has joined #ruby
[21:16:24] miah: going back to dos/desqview and turbopascal
[21:16:25] dfockler: has joined #ruby
[21:16:31] pipework: ACTION prefers to DIY for fun, but just goes dpkg-based usually debian for not fun workytimes :(
[21:16:42] shevy: ewwww dpkg
[21:17:59] pipework: shevy: It's not so bad after you learn how to be a packager.
[21:18:51] HAL2328: turbopascal ftw
[21:20:28] HAL2328: miah, i do agree that osx hasn't improved much since 10.6. unless you care for twitter/facebook integrations
[21:20:45] baweaver: has joined #ruby
[21:21:14] but3k4: has joined #ruby
[21:21:30] khebbie: has joined #ruby
[21:21:44] miah: i deleted my facebook so.
[21:21:47] pipework: HAL2328: But the crypto is claimed to have improved. :(
[21:21:51] agent_white: has joined #ruby
[21:21:51] phreakocious: has joined #ruby
[21:22:12] tejasmanohar: has joined #ruby
[21:22:54] ckinniburgh__: has joined #ruby
[21:23:13] havenwood: HAL2328: I disagree actually. The battery-life and speed improvements are substantial.
[21:23:42] axl_: has joined #ruby
[21:24:06] havenwood: sudo sysctl -w kern.timer.coalescing_enabled=1 \o/
[21:24:38] lkba: has joined #ruby
[21:25:40] cbz: has joined #ruby
[21:25:43] miah: isnt it 1 by default?
[21:26:26] havenwood: I wouldn't want to disable it either.
[21:26:27] voltalio: has joined #ruby
[21:26:44] miah: some people do: http://www.timoliver.com.au/2014/01/25/disabling-timer-coalescing-in-os-x-mavericks/
[21:26:57] dopamean_: has joined #ruby
[21:27:20] miah: but it looks like that issue was fixed in newer xcode. i dont mess with sysctls on osx at all though
[21:27:30] cornerma1: has joined #ruby
[21:27:42] HAL2328: havenwood, what's the hardware you are using?
[21:27:55] miah: i dont do anything crazy / non-standard to osx at this point. apart from using nix instead of homebrew.
[21:28:40] havenwood: HAL2328: 2.8 GHz Intel Core i7
[21:28:41] A124: has joined #ruby
[21:30:22] HAL2328: havenwood, the battery life enhancements is more from your hardware consuming less imo, i have a 2.2 i7 from 2011. i've tried yosemite, not much change from 10.7-9
[21:30:29] havenwood: I like the additional polish in El Capitain. A few things I try and don't work now work. And polish. New features seems to be pretty much just filling in missing multi-screen stuff.
[21:30:47] havenwood: Snappier now.
[21:30:58] NeverDie: has joined #ruby
[21:31:17] gurnoorinder: has left #ruby: ()
[21:31:23] havenwood: HAL2328: They probably do target newer hardware with improvements but they seem real.
[21:31:29] neanderslob: has joined #ruby
[21:31:49] adaedra: My computer performance really went down with Yosemite though.
[21:32:01] adaedra: I hope El Cap makes that better.
[21:32:50] ledestin: has joined #ruby
[21:32:50] minimalism: has joined #ruby
[21:32:55] HAL2328: havenwood, i agree. lion felt like an unfinished product. mavericks polished it quite the way i liked it.
[21:33:28] ruurd: has joined #ruby
[21:33:28] HAL2328: i like the polishes but the additional social features, trying to unite iOS with OS X should be left optional
[21:34:12] HAL2328: but that's wishful thinking apple wants ios users to be os x and android + os x to ditch their android for ios
[21:34:15] adaedra: They are? You don't have to put in your social acconts?
[21:34:25] jschmid: has joined #ruby
[21:35:40] karapetyan: has joined #ruby
[21:35:56] AlexRussia: has joined #ruby
[21:36:11] badbodh: has joined #ruby
[21:36:15] omarJs: has joined #ruby
[21:36:22] miah: its not hard, google is doing a horrible job with android in regards to fragmentation and 'old device support' (any device older than 1 year is abandonded basically)
[21:36:45] miah: ive been an android user since it launched and i just feel like it gets worse and worse, mostly because of the way vendors treat their products though
[21:37:09] miah: within 6 months of getting any phone to market (which takes ~2 years) they're already replacing it
[21:37:10] HAL2328: adaedra, its not required that you log in, but its in the os x taking up resources.
[21:37:34] miah: cyanogen doesnt help at all. but this is all probably best for > #ruby-offtopic too =)
[21:37:42] EminenceHC: has joined #ruby
[21:39:08] HAL2328: miah, not if we segway into community project: ruby-OS
[21:40:12] niemcu: has joined #ruby
[21:40:36] miah: doesnt seem like that conditional is returning a value though
[21:41:52] voltalio: has joined #ruby
[21:43:48] dfockler: has joined #ruby
[21:44:13] deject3d: has joined #ruby
[21:44:49] joegyoung: has joined #ruby
[21:46:53] Renich: has joined #ruby
[21:47:02] joegyoung: Hi everyone. So i have question that I can't just figure out. I have "\\\\Storage01\\_Students\\2020\\kasandra.h.jackson" and I want to gsub all double slashes with single slashes. I can't do .gsub("\\","\") What the heck
[21:47:27] jenrzzz: has joined #ruby
[21:47:39] cantaberry: Is there a way to make a rubocop exception file specific?
[21:48:42] Ox0dea: joegyoung: You don't actually have double backslashes.
[21:48:44] n4t3: has joined #ruby
[21:48:47] x-light: has joined #ruby
[21:48:59] Ox0dea: >> "\\".length # joegyoung
[21:49:00] ruboto: Ox0dea # => 1 (https://eval.in/435999)
[21:49:43] n4t3: Hi, I'm having a problem with 'micromidi' library, where it just can't handle me pressing two or more keys very quickly at once, and won't notify me of the NoteOf/NoteOff events.
[21:50:26] n4t3: I know it's not a hardware problem with my electronic Clavinova keyboard, because it works fine with Anvil Studio 2015. I'm guessing something to do with thread issues??
[21:50:28] neanderslob: has joined #ruby
[21:50:40] JoshL: has joined #ruby
[21:50:47] Melpaws1: has joined #ruby
[21:52:04] badbodh: has joined #ruby
[21:52:07] voltalio: has joined #ruby
[21:52:14] Igorshp: has joined #ruby
[21:52:34] joegyoung: OK revised question. hot do I get "\\\\Storage01\\_Students\\2020\\first.h.last" to "\\Storage01\_Students\2020\first.h.last".....
[21:52:36] Ox0dea: Cantaberry: Does placing one of the special comments at the top of the file not suffice?
[21:53:22] grenierm: has joined #ruby
[21:53:41] Ox0dea: joegyoung: Which method are you using to display these strings that you think contain double backslashes?
[21:55:58] ruurd: has joined #ruby
[21:56:48] zenspider: anyone have any idea what's different in require between 1.9.3 and 2.2.2 (with rails and bundler in the mix)? I'm monkey patching to see what requires are taking the longest. Works great on 1.9.3 but raises on 2.2.2 on bigdecimal saying it isn't in the gemfile (?!?!)
[21:57:04] joegyoung: Ox0dea: It is a string. I am using active_directory to pull a user's homefolder. This is the result
[21:57:30] voltalio: has joined #ruby
[21:57:36] zenspider: joegyoung: you're just confused between inspect output and the string contents
[21:58:49] swgillespie: has joined #ruby
[21:59:36] based_pdev: has joined #ruby
[21:59:38] zenspider: /Users/ryan/.gem/repos/capshare22/gems/bundler-1.10.6/lib/bundler/rubygems_integration.rb:292:in `block in replace_gem': bigdecimal is not part of the bundle. Add it to Gemfile. (Gem::LoadError)
[22:00:19] eightyeight: has joined #ruby
[22:00:33] eightyeight: has joined #ruby
[22:00:40] jdawgaz: has joined #ruby
[22:01:17] joegyoung: But if I do this: "\\\\Storage01\\_Students\\2020\\first.h.last".split(/\\/).join("\\") this I get "\\\\Storage01\\_Students\\2020\\first.h.last".. sucks
[22:01:22] decoponio: has joined #ruby
[22:01:51] r_baron: has joined #ruby
[22:01:53] jenrzzz_: has joined #ruby
[22:01:54] zenspider: again... you're confused simply by LOOKING at the string
[22:02:58] joegyoung: I understat that the \ is special it is single when do \s or \e ..... puts OK I test
[22:03:42] joegyoung: zenspider: ah.... puts not p
[22:04:15] mary5030: has joined #ruby
[22:04:26] joegyoung: zenspider: thank you. Now I need to see how it ain't working in my script
[22:05:43] petricore: has joined #ruby
[22:06:11] tcopeland: has joined #ruby
[22:06:39] badbodh: has joined #ruby
[22:06:55] poguez_: has joined #ruby
[22:12:08] vikaton: has joined #ruby
[22:12:50] shmilan: has joined #ruby
[22:14:37] axl_: has left #ruby: ()
[22:15:04] zenguy_pc: how do parse (Array<OpenStruct>) ?
[22:15:33] zenguy_pc: from something like puts "#{authenticated_client.friends}"
[22:16:03] eightyeight: has left #ruby: ("wwjd? jwrtfm")
[22:17:10] dima_: has joined #ruby
[22:17:41] poli: has joined #ruby
[22:18:15] vdamewood: has joined #ruby
[22:18:35] EminenceHC: has joined #ruby
[22:19:53] A124_: has joined #ruby
[22:20:42] A124: has joined #ruby
[22:23:27] Sou|cutter: has joined #ruby
[22:24:06] Ox0dea: zenguy_pc: Could you clarify?
[22:24:58] Kallis: has joined #ruby
[22:26:33] devoldmx: has joined #ruby
[22:27:06] zenguy_pc: using redditkit, redditkit.com . Authenticated_client = RedditKit::Client.new 'Username', 'password' ... puts "#{authenticated_client.friends}"
[22:27:43] zenguy_pc: i get an output thats described as (Array<OpenStruct>) .. it has what i want in it but i have no clue how to parse it
[22:27:49] zenguy_pc: i just want the name value
[22:28:16] Ox0dea: zenguy_pc: your_array.map(&:username) should do.
[22:29:44] zenguy_pc: Ox0dea: ok, i'm looking it up
[22:29:49] badbodh: has joined #ruby
[22:29:57] Asher: has joined #ruby
[22:30:04] kies: has joined #ruby
[22:30:21] Ox0dea: zenguy_pc: For future reference, use #p for debug output, not #puts.
[22:31:17] zenguy_pc: friend = (authenticated_client.friends).map ?
[22:31:28] zenguy_pc: did you mean something like that?
[22:33:14] Ox0dea: &ri OpenStruct Array#map
[22:33:14] `derpy: http://www.rubydoc.info/stdlib/json/OpenStruct, http://www.rubydoc.info/stdlib/core/Array#map-instance_method
[22:33:18] Ox0dea: zenguy_pc: ^
[22:34:09] Ox0dea: Whoops. That's not the OpenStruct documentation I'd hoped would be linked.
[22:34:12] Ox0dea: adaedra: ^
[22:34:49] shevy: ack: http://eev.ee/blog/2015/09/17/the-sad-state-of-web-app-deployment/
[22:34:59] shevy: "I then spent maybe six hours fighting with RVM"
[22:35:03] shevy: havenwood!!! an unbeliever!
[22:36:01] anjen: has joined #ruby
[22:36:27] havenwood: shevy: They're doing it wrong.
[22:36:44] shevy: the github tracker led to apeiros commenting 4 years ago :D https://github.com/rvm/rvm/issues/623
[22:36:48] havenwood: ACTION does a chruby dance
[22:37:20] shevy: I wonder if apeiros is using chruby now
[22:37:32] havenwood: shevy: I don't think so. If it ain't broke...
[22:38:06] shevy: I'll ask him when he is back, he is probably partying in brokeback swiss mountain as we type this!
[22:38:11] Cu5tosLimen: has joined #ruby
[22:38:53] m4rCsi: has joined #ruby
[22:40:14] Nanuq: has joined #ruby
[22:40:21] ramfjord: has joined #ruby
[22:42:14] DLSteve: has joined #ruby
[22:45:03] beginner_with_qu: alright. I was asking this same thing earlier, and recieved help. However, I could not make use of this help due to incompetence. Now I need to see this thing work so I might be able to actually learn from my mistakes. Learning what deoesnt work is important sure, but enough of that. Anyone have the few minutes?
[22:45:06] NeverDie: has joined #ruby
[22:45:27] Ox0dea: beginner_with_qu: Fire away.
[22:45:33] beginner_with_qu: https://eval.in/436011
[22:45:45] beginner_with_qu: That's what I got working.
[22:45:50] beginner_with_qu: Which I mentioned before.
[22:46:06] sunaku: has joined #ruby
[22:46:15] bmurt: has joined #ruby
[22:46:21] zenguy_pc: when makign a reuby one liner, are the gems sperated by comma or end statement?
[22:46:38] Ox0dea: zenguy_pc: Stop it.
[22:47:04] miah: http://ruby-doc.org/core-1.9.3/Array.html#method-i-product
[22:47:29] Cust0sLimen: has joined #ruby
[22:48:29] Ox0dea: miah: Not really.
[22:48:40] beginner_with_qu: Yeah I dont think that'd do what I need it too
[22:48:47] beginner_with_qu: Although it is cool
[22:48:48] Ox0dea: #zip is more appropriate here, but neither ensures that couples don't end up back together.
[22:49:25] Ox0dea: beginner_with_qu: The technical term you're looking for is "derangement".
[22:49:51] beginner_with_qu: derangement. Making a note of that for reference
[22:49:55] Ox0dea: [2, 1, 0] is not a derangement of [0, 1, 2] since the 1 hasn't been displaced.
[22:51:24] beginner_with_qu: So either I need to create a derangement? method to loop the shuffle with, or locate a preexisting one
[22:51:48] Ox0dea: beginner_with_qu: Even better would be to nix the question mark.
[22:52:15] beginner_with_qu: I figured the ? was to refer to a return of true/false
[22:52:20] sunaku: has left #ruby: ()
[22:52:30] Ox0dea: beginner_with_qu: I meant that it'd be more reasonable to just write some #derange method.
[22:52:39] beginner_with_qu: check for derrangment. Unless you mean to say I should just make a method for derrangement
[22:53:49] Kallis: has joined #ruby
[22:53:58] beginner_with_qu: actually I've been trying to do this for the past hour. Now that I'm looking at the code reforming
[22:54:00] Luming: has joined #ruby
[22:55:06] Luming: has joined #ruby
[22:55:11] blueOxigen: has joined #ruby
[22:55:38] hahuang65: has joined #ruby
[22:56:20] EminenceHC: has joined #ruby
[22:56:30] Luming: has joined #ruby
[22:57:01] saddad: has joined #ruby
[22:57:28] Luming: has joined #ruby
[22:58:31] Ox0dea: beginner_with_qu: Here's my take on the thing: https://eval.in/436014
[22:59:19] Melpaws: has joined #ruby
[23:00:32] Ox0dea: I suspect there's some very clever O(n) technique for deranging a sequence, but you're highly unlikely to bump into the O(???) worst-case complexity of my approach.
[23:00:50] astrobunny: has joined #ruby
[23:02:54] mwlang: has joined #ruby
[23:03:52] workmad3: has joined #ruby
[23:04:36] rgb-one: has joined #ruby
[23:05:07] dorei: anyone using vim here? how could i fold def..end in vim ?
[23:05:47] Exuma: has joined #ruby
[23:07:20] phreakocious: has joined #ruby
[23:07:24] GarethAdams: has joined #ruby
[23:07:47] Ox0dea: dorei: 'foldexpr' can be a function.
[23:07:58] Ox0dea: Almost all of the 'expr' settings, in fact.
[23:08:36] jenrzzz: has joined #ruby
[23:09:01] dorei: i dont want to go down the vim rabithole, just some code to copy-paste into my .vimrc :)
[23:09:31] joegyoung: has joined #ruby
[23:09:45] Ox0dea: Why ever not? VimL is a very nice language!
[23:10:42] beginner_with_qu: actually Ox0, I'm having trouble reading your help. :( "shuffle! while each_with_index.any? { |e, i| e == orig[i] } self" What is this doing?
[23:11:48] HAL2328: has joined #ruby
[23:12:56] beginner_with_qu: It looks like shuffle until false. (shuffle! while) each_with_index is a single named object passing true if any? is met.
[23:14:20] beginner_with_qu: Then any is... doing what? I'm just starting to wrap my head around enumerable s, but I thought the { } was a quality of maps not any?
[23:14:37] Ox0dea: beginner_with_qu: In this case, the braces are opening a block.
[23:14:46] Ox0dea: >> [1, 2, 3].any { |x| x.even? }
[23:14:47] ruboto: Ox0dea # => undefined method `any' for [1, 2, 3]:Array (NoMethodError) ...check link for more (https://eval.in/436015)
[23:14:51] Ox0dea: >> [1, 2, 3].any? { |x| x.even? }
[23:14:52] ruboto: Ox0dea # => true (https://eval.in/436016)
[23:15:10] iamninja: has joined #ruby
[23:15:12] Ox0dea: It walks the collection and returns true if it finds any element which satisfies the predicate, false otherwise.
[23:15:51] phreakocious: has joined #ruby
[23:15:54] beginner_with_qu: Would you have links to more detailed explinations, and other potential uses for blocks in this context?
[23:16:05] Ox0dea: Blocks are used everywhere in Ruby.
[23:16:25] hessparker: has joined #ruby
[23:16:42] beginner_with_qu: I know. I figured out each, do, maps yesterday.
[23:16:52] Ox0dea: Right, #each takes a block.
[23:17:03] Ox0dea: {} is just another syntax for do/end, more or less.
[23:17:07] hessparker: hey, security rubyists: is there a string that after inspect can still be dangerous?
[23:17:25] Ox0dea: Yay, Ruby. :)
[23:17:41] beginner_with_qu: Braces make more sense now.
[23:18:24] beginner_with_qu: I'll have to look up .zip
[23:18:30] Ox0dea: hessparker: Terminal escape sequences are escaped in #inspect output, so they can't muck with your terminal, if that's what you're asking after.
[23:18:41] beginner_with_qu: Why did you create the method within the array class rather then the main class?
[23:18:53] Ox0dea: beginner_with_qu: Because I think Array should have #derange. ^_^
[23:19:17] beginner_with_qu: So it would work either way
[23:19:29] beginner_with_qu: array should have this, yeah
[23:19:46] Ox0dea: beginner_with_qu: You're advised not to tinker with core classes, mind.
[23:20:09] Ox0dea: In this case, it's highly unlikely somebody else would want Array#derange to do anything else, so I think it's kosher.
[23:20:16] beginner_with_qu: I suspect I'll be keeping my hands off most classes until I'm far more sure of myself
[23:21:01] Kallis: has joined #ruby
[23:21:12] Cust0sLimen: has joined #ruby
[23:21:14] beginner_with_qu: I'm still wrapping my head around hashes. The use of symbols has bothered me, since, strings seem to do the same thing better
[23:22:12] Ox0dea: beginner_with_qu: Some strings occur often enough that it's reasonable to just have the one to keep referring to rather than allocating brand-new ones each time.
[23:23:33] beginner_with_qu: I think maybe I've misunderstood symbols then. is this suggesting that any instance of the symbol x: would function like a string, but also refer to the hashed pair?
[23:23:53] beginner_with_qu: :x x: one of the two
[23:23:54] Ox0dea: beginner_with_qu: Symbols are essentially just deduplicated Strings.
[23:24:17] Ox0dea: >> ['foo'.object_id == 'foo'.object_id, :foo.object_id == :foo.object_id] # beginner_with_qu
[23:24:17] beginner_with_qu: basically, it saves space.
[23:24:18] ruboto: Ox0dea # => [false, true] (https://eval.in/436017)
[23:24:22] Ox0dea: beginner_with_qu: Space and time.
[23:24:35] phreakocious: has joined #ruby
[23:25:16] Kallis: has joined #ruby
[23:25:17] beginner_with_qu: Ive seen this enough now I need to ask. what is foo?
[23:25:25] Ox0dea: A metasyntactic variable.
[23:25:44] diegoviola: has joined #ruby
[23:25:54] Ox0dea: Rather than cluttering up our limited attention spans by arbitrarily naming things, we have placeholders.
[23:25:57] beginner_with_qu: And a definition for the unenlightened?
[23:26:01] Ox0dea: See above.
[23:26:33] pontiki: https://en.wikipedia.org/wiki/Foobar
[23:26:53] Ox0dea: http://www.catb.org/jargon/html/M/metasyntactic-variable.html
[23:26:57] beginner_with_qu: Thankyou pontiki
[23:27:21] beginner_with_qu: Alright, cool. This makes more sense now.
[23:27:49] beginner_with_qu: Gotta do some runs and then digging back into this. Thanks for the help ^_^
[23:28:04] Ox0dea: My pleasure. Y'all come back now, y'hear?
[23:29:21] craysiii: i feel culturally appropriated
[23:29:51] cndiv: has joined #ruby
[23:30:24] Ox0dea: So, how *do* you generate all derangements efficiently?
[23:30:47] Ox0dea: #permutation + #reject is O(n!). :/
[23:31:14] pontiki: i'm fighting my own derangement as we speak
[23:31:19] banjara: has joined #ruby
[23:31:31] NeverDie: has joined #ruby
[23:32:34] AndrewG: has joined #ruby
[23:34:13] rgb-one: Any alternatives to Array#product for combining array elements?
[23:34:41] AndrewG: Sorry if this is a newb question (it is)... im new to ruby as of today, but I am fairly decent at Java. I'm wondering how include_class("java.lang.String") { |pkg, name| "J" + name } works. Specifically the "J" + name. Does it get returned to the method, and if so, how?
[23:34:55] sankaber: has joined #ruby
[23:36:21] otherj: has joined #ruby
[23:37:00] Ox0dea: >> [].methods.grep(/ation/) # rgb-one
[23:37:01] ruboto: Ox0dea # => [:permutation, :combination, :repeated_permutation, :repeated_combination] (https://eval.in/436018)
[23:37:08] jhass: AndrewG: the {|pkg, name| "J" + name } part is called a block. The method can invoke it with yield, provide the parameters and read the return value
[23:38:20] inteq: has joined #ruby
[23:42:34] chills42: has joined #ruby
[23:42:49] workmad3: has joined #ruby
[23:44:01] phreakocious: has joined #ruby
[23:48:29] AndrewG: Thanks jhass
[23:50:17] Kallis: has joined #ruby
[23:54:07] Kallis: has joined #ruby
[23:56:16] NeverDie: has joined #ruby
[23:57:22] jdawgaz: has joined #ruby