« Back to channel list

#ruby - 19 September 2015

« Back 1 day Forward 1 day »
[00:01:45] Andrey: has joined #ruby
[00:02:55] Andrey: Hi guys, need some help with "case" statement
[00:03:10] Andrey: https://gist.github.com/anonymous/0836628f19482f87383f
[00:03:39] karapetyan: has joined #ruby
[00:04:01] Ox0dea: Andrey: Ah, that's unfortunate.
[00:04:15] Andrey: hehe, Hello Ox0dea
[00:04:26] toretore: i need help too
[00:04:44] Ox0dea: Andrey: Hm, no, that should work fine?
[00:04:46] toretore: with, like, code
[00:04:57] Ox0dea: >> (1..3) === 2.5 # Andrey
[00:04:58] ruboto: Ox0dea # => true (https://eval.in/436019)
[00:05:10] Andrey: it gives me syntax error when I run it: multiply.rb:46: syntax error, unexpected keyword_when, expecting keyword_end
[00:05:11] Andrey: when 100..100
[00:05:33] toretore: Andrey: gist the entire file
[00:06:15] Andrey: https://gist.github.com/anonymous/fe1a0bc5971749e89a60
[00:06:37] Ox0dea: Andrey: There are no syntax errors in that file either.
[00:07:11] toretore: you're missing a space
[00:07:50] Andrey: toretore: Lol, you are right, that fixed it
[00:08:14] Ox0dea: Erm, where?
[00:08:16] Ox0dea: ~ $ curl -s http://git.io/vnO3l | ruby -c
[00:08:18] Ox0dea: Syntax OK
[00:08:36] toretore: what version are you on Andrey?
[00:08:42] Andrey: no space after first puts in case
[00:08:48] Ox0dea: That's not a syntax error.
[00:10:00] Andrey: When I added the space - it works without issues...
[00:10:31] EminenceHC: has joined #ruby
[00:10:33] Andrey: 2.1.7, sorry, got ahead of myself ;)
[00:10:59] baweaver: has joined #ruby
[00:11:34] Ox0dea: 21>> puts"foo"
[00:11:35] ruboto: Ox0dea # => foo ...check link for more (https://eval.in/436022)
[00:11:39] Ox0dea: Hey, look, not a syntax error.
[00:11:53] Ox0dea: 18>> puts"foo" # not even ten years ago
[00:11:53] ruboto: Ox0dea # => foo ...check link for more (https://eval.in/436023)
[00:12:29] MagePsycho: has joined #ruby
[00:12:59] workmad3: has joined #ruby
[00:13:55] Ox0dea: Andrey: You would do well to consider the possibility that you have little benevolent demons running around in your base fixing your bugs.
[00:14:23] Andrey: yeah, they are all congregating at #ruby :)
[00:14:52] bronson: has joined #ruby
[00:15:10] Ox0dea: Really, though, adding a space there simply could not have been what actually resolved your issue; you probably shouldn't settle for a mystery in this case.
[00:16:11] Andrey: Ox0dea - good call. Removing the space did not reproduce the error, the program is still running... :(
[00:16:24] DLSteve: has joined #ruby
[00:17:11] Andrey: Could it be Sublime Text issue?
[00:17:34] Ox0dea: If you've misconfigured it, I suppose it could've eaten the last line of the file or something.
[00:18:22] rickmasta: has joined #ruby
[00:18:35] Ox0dea: Andrey: You'd get that syntax error if the `case` line were missing. You probably inadvertently removed it before executing the file or something.
[00:18:42] Andrey: I'm running stock, just added Soda_Light theme
[00:19:22] shmilan: has joined #ruby
[00:21:24] Andrey: Anyway I can share a screenshot like gist (without account)?
[00:21:58] nfisher: has joined #ruby
[00:22:25] chills42: has joined #ruby
[00:23:41] rakm: has joined #ruby
[00:23:42] ddv: has joined #ruby
[00:23:46] Andrey: This is what happened initially: http://postimg.org/image/4f6ghtf77/
[00:24:35] MasterPiece: has joined #ruby
[00:25:04] Ox0dea: Andrey: And, as I said, you should be able to reproduce that error by removing the `case` line.
[00:25:05] NeverDie: has joined #ruby
[00:25:51] Andrey: Ox0dea, you are right (as usual), what gives?
[00:26:03] Ox0dea: Andrey: Are you asking me how that line temporarily disappeared? :P
[00:26:26] Andrey: yeah, if that's what happened
[00:26:41] ellisTAA: has joined #ruby
[00:26:46] Ox0dea: Seems to have been the case, but that's a mystery I shan't be able to solve.
[00:26:59] Ox0dea: Unless you're keylogging yourself and would be willing to share. ^_^
[00:27:19] devoldmx: has joined #ruby
[00:28:41] Andrey: Ox0dea, thanks mate, I'll be back when the gremlins strike again (most likely tomorrow at this time)
[00:28:52] Ox0dea: Andrey: Looking forward to it. :)
[00:29:00] mprelude: has joined #ruby
[00:29:10] Ox0dea: Andrey: Bad things happened when I asked for -1 questions, by the way.
[00:30:08] swgillespie: has joined #ruby
[00:30:35] pipework: Ox0dea: How about a fraction of a question?
[00:30:44] Andrey: "bad things happened" appears to be my middle name
[00:31:19] Ox0dea: pipework: Andrey is using to_i, so that was a no-go.
[00:31:43] pipework: Ox0dea: -0 then?
[00:31:58] Andrey: to_i FTW, can't rely on no floating points...
[00:34:12] Ox0dea: >> -0.0.equal? -0.0 # pipework
[00:34:13] ruboto: Ox0dea # => false (https://eval.in/436024)
[00:34:26] ruboto: pipework # => 0 (https://eval.in/436025)
[00:34:49] Ox0dea: "Real" negative zero is a floating point value.
[00:35:00] Ox0dea: As decreed by IEEE 754, anyhow.
[00:38:23] rezzack: has joined #ruby
[00:40:33] MasterPiece: has joined #ruby
[00:41:09] nahtnam: has joined #ruby
[00:45:38] shakes: has joined #ruby
[00:46:02] craysiii: https://gist.github.com/craysiii/13cb3c7b61a48c5d5629 any reason why this is happening? first time ive tried to run raw sql.
[00:48:18] craysiii: wrong room sorry.
[00:49:32] banjara: has joined #ruby
[00:49:47] havenwood: has joined #ruby
[00:52:57] Andrey: has joined #ruby
[00:53:39] Pupeno: has joined #ruby
[01:02:50] veduardo: has joined #ruby
[01:05:20] Kallis: has joined #ruby
[01:06:36] swgillespie: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[01:13:34] SenpaiSilver: has joined #ruby
[01:14:36] EminenceHC: has joined #ruby
[01:15:59] iamninja: has joined #ruby
[01:17:08] solocshaw1: has joined #ruby
[01:21:14] chouhoulis: has joined #ruby
[01:21:36] sepp2k: has joined #ruby
[01:23:19] nietzschette: has joined #ruby
[01:27:15] nietzschette: hey anyone with experience using ruby with msys?
[01:27:27] deject3d: what is msys
[01:27:55] nietzschette: linux build environment for windows
[01:28:24] zenspider: now you have two problems?
[01:28:34] nietzschette: I just got a computer with a fancy new windows and I haven't used windows in a while
[01:29:36] nietzschette: well, I can't get any input from my programs! I know they're working. and I can give them orders via stdin, and I get stderr, but no stdout
[01:30:02] nietzschette: also, irb doesn't give me a prompt
[01:30:09] deject3d: zenspider kek
[01:31:21] nietzschette: I have so many problems I lost count! :p
[01:31:30] zenspider: you just have one problem
[01:35:40] solocshaw1: has joined #ruby
[01:36:09] veduardo: has joined #ruby
[01:42:22] mjuszczak: has joined #ruby
[01:43:47] stardiviner: has joined #ruby
[01:44:18] ndrei: has joined #ruby
[01:44:59] segfalt: has joined #ruby
[01:46:14] luckyme: has joined #ruby
[01:50:41] jdawgaz: has joined #ruby
[01:54:03] devyn: has joined #ruby
[01:54:46] TheRinger: has joined #ruby
[01:58:29] Asher: has joined #ruby
[01:59:11] wldcordeiro: has joined #ruby
[02:01:05] workmad3: has joined #ruby
[02:01:23] Asher: has joined #ruby
[02:03:27] chills42: has joined #ruby
[02:04:17] wldcordeiro: has joined #ruby
[02:05:40] allcentury: has joined #ruby
[02:05:58] rickmasta: has joined #ruby
[02:06:29] havenwood: has joined #ruby
[02:10:59] tkiel: has joined #ruby
[02:11:43] wldcordeiro: has joined #ruby
[02:13:34] theone01: has joined #ruby
[02:13:54] satansdesciple: has joined #ruby
[02:14:16] satansdesciple: what questions we allowed asking here?
[02:15:00] dorei: but ofcourse ruby related questions :p
[02:15:18] satansdesciple: i need understanding with metasploit use priv command
[02:15:35] pontiki: specifically the ruby programming language, not minerals or semi-precious stones :)
[02:15:42] dorei: there's #metasploit for metasploit specific questions
[02:15:45] jdawgaz: has joined #ruby
[02:15:52] satansdesciple: nobody in metasploit
[02:15:54] dorei: pontiki: you forgot ruby fonts :p
[02:16:04] satansdesciple: but metasploit is ruby project yes?
[02:16:48] wldcordeiro: has joined #ruby
[02:16:59] pontiki: dorei: i am never being exhaustive in my statements :)
[02:17:34] pontiki: satansdesciple: seems you got an answer. why is that not good enough?
[02:18:01] pontiki: satansdesciple: you can always just ask and see what happens
[02:18:19] pontiki: maybe no one knows it. maybe someone does. but no one can answer an unasked question very easily
[02:18:19] dorei: oh, they aint called fonts, ruby anotations is their name
[02:19:26] satansdesciple: i would like to understand how the use priv command works
[02:19:53] satansdesciple: i know what it does but i would like to understand it and maybe write my own implementation of it
[02:21:40] wldcordeiro: has joined #ruby
[02:24:10] bronson: has joined #ruby
[02:26:44] linuxboytoo: has joined #ruby
[02:28:04] devoldmx: has joined #ruby
[02:28:34] lkba_: has joined #ruby
[02:29:36] wldcordeiro: has joined #ruby
[02:29:42] mjuszczak: has joined #ruby
[02:30:01] joegyoung: has joined #ruby
[02:30:12] paulcsmith: has joined #ruby
[02:31:11] karapetyan: has joined #ruby
[02:34:21] wldcordeiro: has joined #ruby
[02:35:24] bb010g: has joined #ruby
[02:37:25] theone01: has joined #ruby
[02:37:54] Kallis: has joined #ruby
[02:38:14] rickmasta: has joined #ruby
[02:39:08] wldcordeiro: has joined #ruby
[02:39:32] drewvanstone: has joined #ruby
[02:41:38] UtkarshRay: has joined #ruby
[02:42:01] cbz: has joined #ruby
[02:43:16] startupality: has joined #ruby
[02:45:05] karapetyan: has joined #ruby
[02:46:35] CanTonic: has joined #ruby
[02:47:39] nfisher: has joined #ruby
[02:52:12] Kallis: has joined #ruby
[02:52:23] michael_mbp: has joined #ruby
[02:53:44] tjbiddle: has joined #ruby
[02:54:52] benlieb: has joined #ruby
[02:56:59] gurnoorinder: has joined #ruby
[02:57:53] jud: has joined #ruby
[02:58:52] dopie: has joined #ruby
[02:58:55] devyn: has joined #ruby
[02:59:04] linuxboytoo: has joined #ruby
[03:01:15] gener1c_: has joined #ruby
[03:02:22] theone01: has joined #ruby
[03:05:57] stardiviner: has joined #ruby
[03:11:40] HAL2328: has joined #ruby
[03:12:30] Kallis: has joined #ruby
[03:13:13] linuxboytoo: has joined #ruby
[03:14:02] braincrash: has joined #ruby
[03:16:51] iamninja: has joined #ruby
[03:17:01] rcvalle: has joined #ruby
[03:18:01] platzhirsch: has left #ruby: ()
[03:18:58] veduardo: has joined #ruby
[03:21:30] charliesome: has joined #ruby
[03:25:38] howdoico1: has joined #ruby
[03:26:57] fedexo: has joined #ruby
[03:27:16] fastAndSlow: has joined #ruby
[03:27:19] linc01n_: has joined #ruby
[03:27:25] fastAndSlow: has left #ruby: ()
[03:27:44] fastAndSlow: has joined #ruby
[03:28:53] devoldmx: has joined #ruby
[03:28:58] fastAndSlow: has left #ruby: ()
[03:29:27] deject3d: has joined #ruby
[03:30:23] webguynow: has joined #ruby
[03:31:59] DoYouKnow: has joined #ruby
[03:33:51] dima_: has joined #ruby
[03:38:43] gix: has joined #ruby
[03:39:00] yfeldblum: has joined #ruby
[03:39:43] shmilan: has joined #ruby
[03:39:52] rushed: has joined #ruby
[03:40:40] charliesome: has joined #ruby
[03:41:15] wldcordeiro: has joined #ruby
[03:43:13] bronson: has joined #ruby
[03:46:59] ramfjord: has joined #ruby
[03:47:04] webguynow: has joined #ruby
[03:47:39] beauby: has joined #ruby
[03:49:04] Pupeno: has joined #ruby
[03:49:11] workmad3: has joined #ruby
[03:51:23] kjones_: has joined #ruby
[03:52:40] rcvalle: has joined #ruby
[03:54:54] NeverDie: has joined #ruby
[03:54:55] chipotle: has joined #ruby
[03:57:20] grenierm: has joined #ruby
[03:59:06] HAL2328: has joined #ruby
[04:00:40] darkf: has joined #ruby
[04:01:04] bruno-: has joined #ruby
[04:02:37] webguynow: has joined #ruby
[04:03:49] nofxx: has joined #ruby
[04:05:39] chipotle: has joined #ruby
[04:08:11] EXID123: has joined #ruby
[04:09:14] wldcordeiro: has joined #ruby
[04:11:13] jdawgaz: has joined #ruby
[04:14:06] meatherly: has joined #ruby
[04:14:54] arescorpio: has joined #ruby
[04:15:08] houhoulis: has joined #ruby
[04:15:40] jgt: has joined #ruby
[04:16:23] Rollabunna: has joined #ruby
[04:16:30] Salehi: has joined #ruby
[04:18:17] karapetyan: has joined #ruby
[04:24:56] drewvanstone: has joined #ruby
[04:26:36] bricker: has joined #ruby
[04:28:42] RickHull: has joined #ruby
[04:29:42] RickHull: Hi, I have a quick "puzzle". Given a list of distinct intervals with no overlaps or gaps, is there a way to determine which interval a value belongs to, without iterating over the list of intervals?
[04:30:10] RickHull: i.e. N = number of intervals. can interval membership be determined in less than O(N) ?
[04:30:14] baweaver: has joined #ruby
[04:30:29] RickHull: the context is, making histograms with bins
[04:30:52] RickHull: If I choose the intervals carefully, i can do rounding math to determine bin membership
[04:30:58] deject3d: do your own hw
[04:31:56] RickHull: now I'd like to choose the intervals by some other method rather than carefully in accordance with rounding rules
[04:32:07] RickHull: and i'm wondering if interval membership must be O(n)
[04:33:09] RickHull: imagine 20 intervals, systematically sized, between 0-100
[04:33:52] RickHull: not necessarily uniformly sized
[04:34:09] RickHull: but describable through math
[04:34:55] RickHull: for example, logarithmic. the first interval is much smaller than the last, on perhaps a log10 scale
[04:35:28] baweaver: deject3d: be nice
[04:35:38] RickHull: oh, homework :)
[04:35:43] FrankD: hey does anyone have an example of using TarWriter to recursively tar a directory?
[04:35:54] RickHull: i'm 35 years old. I suppose this might actually be homework :)
[04:36:08] RickHull: however, I'm not at home (yet)
[04:36:11] newtonianb: has joined #ruby
[04:37:14] baweaver: just got home myself, so not quite up for thinking quite yet
[04:37:51] RickHull: here's what makes me think there is a better than O(n) way for arbitrary intervals
[04:38:17] RickHull: If I "know" the intervals, and I know there are no gaps or overlaps
[04:38:25] RickHull: my human brain can instantly place any given value in an interval
[04:38:36] RickHull: without considering the first interval and doing comparison arithmetic
[04:38:53] RickHull: i.e. my human brain does not need to iterate over all the intervals
[04:39:01] webguynow: has joined #ruby
[04:39:25] RickHull: this is similar to grepping over a huge log file for sequential time intervals
[04:39:42] RickHull: you should not grep the entire log, if you've already processed the first parts
[04:40:09] RickHull: i.e. if you're looking for 3pm activity, you don't need to start at the top (e.g. 12am) of the log
[04:40:22] dima_: has joined #ruby
[04:40:24] RickHull: and particularly if you are looking for 2pm, 3pm, 4pm activity in sequence
[04:40:32] RickHull: you should not grep the entire log in each case
[04:41:53] RickHull: does this sort of optimization problem ring any bells?
[04:42:19] RickHull: framing it this way, binary search comes to mind
[04:46:28] cantaberry: has joined #ruby
[04:47:32] [k-: has joined #ruby
[04:50:10] nfisher: has joined #ruby
[04:50:45] phutchins: has joined #ruby
[04:51:06] Ox0dea: has joined #ruby
[04:51:37] Ox0dea: RickHull: I think you just want "next power of x", no?
[04:51:56] iamninja: has joined #ruby
[04:52:43] arup_r: has joined #ruby
[04:53:38] Cache_Money: has joined #ruby
[04:53:53] Joufflu: has joined #ruby
[04:55:15] beginner_with_qu: I have a stupid question! :D https://eval.in/436048 In this passable derangeing method, what exactly does array.shuffle! while mean? It works as intended, it could be cleaner, but I dont care about that just yet. I'm miming anothers work and I want to understand what is actually happening. Is there a dumber-downed more basic way to write that selected expression?
[04:56:12] beginner_with_qu: I'm only familiar with the while condition == true loop. So if it could be said in those terms that would be swell.
[04:56:52] rushed: has joined #ruby
[04:57:07] RickHull: Ox0dea: that's basically the current approach
[04:57:33] beginner_with_qu: Oh hey Ox0dea is back. :D
[04:57:41] dionysus69: has joined #ruby
[04:57:43] Ox0dea: beginner_with_qu: `bar while foo` is just another way to write `while foo; bar; end`.
[04:57:54] Ox0dea: Feel free to rewrite it the latter way if you feel that helps with legibility.
[04:58:07] Ox0dea: But please don't use single-line `do/end`.
[04:58:09] RickHull: Ox0dea: https://gist.github.com/rickhull/aa5a12916ed7267b7d9b
[04:58:10] beginner_with_qu: Actually I just wanted to be able to replicate this elsewhere confidently
[04:58:33] RickHull: Ox0dea: note that I am pre-deciding the bin sizes for base10
[04:58:49] beginner_with_qu: And I know, the single line do end was a test making sure your earlier tid bit was correctly understood
[04:58:59] RickHull: this thing expects millisecond integer latencies on STDIN
[04:59:08] beginner_with_qu: I'm glad to say it was, and intend to do away with do end primarily >_>;
[04:59:18] Ox0dea: RickHull: So you're just binning based on magnitude?
[04:59:28] Ox0dea: You made it seem like the thing needed to be much more dynamic than that.
[04:59:36] RickHull: that's the idea
[04:59:47] RickHull: today the bins are static, base10 yada yada
[05:00:07] RickHull: i want to instead take the log10 of the latency, and put into bins from 0-4
[05:00:17] RickHull: (rather than 0-10000)
[05:00:23] howdoico1: has joined #ruby
[05:00:25] RickHull: but subdivide the bins
[05:00:28] Ox0dea: Still magnitude.
[05:00:33] RickHull: i.e. 0-0.2 0.2-0.4
[05:00:47] Ox0dea: Oh, I see.
[05:00:55] RickHull: so the bins will be systematically but not uniformly sized
[05:01:02] RickHull: and i would like to change the system
[05:01:07] Ox0dea: Those are uniform, though.
[05:01:08] RickHull: but still have the bin assignments work
[05:01:17] UtkarshRay: has joined #ruby
[05:01:24] RickHull: but i will display them non-log
[05:01:58] RickHull: i.e. no user cares about log(latency)
[05:02:07] RickHull: or which bin log(latency) goes into
[05:02:27] RickHull: so I will display the bin sizes in terms of actual latency, which will make them systematically (but not uniformly) sized
[05:02:45] webguynow: has joined #ruby
[05:03:22] Ox0dea: RickHull: Well, just note that Math.log can be supplied with two arguments.
[05:03:23] sunaku: has joined #ruby
[05:03:26] sunaku: has left #ruby: ()
[05:03:39] RickHull: yes, for sure. using it already. i only care about base 10
[05:03:47] RickHull: so using Math.log10
[05:03:54] nfisher: has joined #ruby
[05:04:41] RickHull: in a nutshelll, latencies don't go below 0. from 0-100 (ms), we care about intervals roughly 10ms sized. from 100-1000 ms, roughly 100 ms size. from 1000-10_000 ms, rougly 1000ms sized
[05:05:00] RickHull: the current approach does the above, more or less exactly
[05:05:07] RickHull: big discontinuity from 100-200 ms
[05:05:16] theone01: has joined #ruby
[05:05:21] RickHull: i.e. the 200ms bucket has 10x the samples of the 100ms bucket
[05:05:28] rickmasta: has joined #ruby
[05:05:42] RickHull: the 200ms bin covers 100ms-200ms the 100ms bin covers 90ms-100ms
[05:05:55] shmilan: has joined #ruby
[05:06:20] RickHull: If i choose a logarithmic scale, rather than my static thing, then the intervals increase regularly and continuously
[05:06:48] RickHull: e.g. first interval 0-5ms, 10th interval 80ms-100ms
[05:06:53] RickHull: something like that
[05:07:09] Ox0dea: beginner_with_qu: There is a convention affectionately known as "Weirich's rule" which recommends using `do/end` for "procedural" blocks (ones with side effects), and {} for "functional" ones, wherein you're only interested in the value of some transformation.
[05:07:16] Ox0dea: Irrespective of the number of lines the block spans, mind.
[05:07:31] beginner_with_qu: I didnt know that
[05:07:46] beginner_with_qu: Probably makes sense
[05:07:49] theone01: has joined #ruby
[05:07:52] solocshaw1: has joined #ruby
[05:08:10] beginner_with_qu: #each do end combinations being replicated all the time
[05:08:40] Ox0dea: I think you've grokked the thing.
[05:08:42] beginner_with_qu: Knowing why definitely helps ^^
[05:09:28] beginner_with_qu: This channel is responsible for most of my more detailed understanding.
[05:09:43] solocshaw1: has joined #ruby
[05:09:52] beginner_with_qu: Which, admittedly is pretty sparse. But I know more everyday
[05:10:23] webguynow: has joined #ruby
[05:10:49] Ox0dea: RickHull: I'm trying to jog my memory for the really good term for this that I know is in there somewhere.
[05:11:01] RickHull: heh, that's what i'm banking on
[05:11:10] Ox0dea: It's not quite a "sliding window".
[05:11:14] RickHull: i feel like there is a good way for determining interval membership
[05:11:26] Ox0dea: Better than O(n) can certainly be had.
[05:11:27] RickHull: without considering each "N" interval
[05:12:01] RickHull: non-overlapping and non-gapping is crucial, i am sure
[05:12:07] RickHull: and i don't know how that codifies
[05:12:38] kkeuning: has joined #ruby
[05:12:44] RickHull: and again, i think it is analagous to the problem of splitting out hours of a huge log file using grep
[05:12:48] Ox0dea: It's the same arithmetic as is used for creating non-uniform gradients.
[05:13:01] RickHull: the naive approach greps the entire file for each hour
[05:13:09] badbodh: has joined #ruby
[05:13:27] hadrig: has joined #ruby
[05:14:24] kkeuning: has joined #ruby
[05:15:46] kkeuning: has joined #ruby
[05:16:31] beginner_with_qu: Ox0dea: At what stage of Ruby education does the expectation go from including every parenthesis and using variable representation of the self in methods turn into these shorthands?
[05:16:35] RickHull: the naive O(n) approach considers each interval in turn and makes comparisons
[05:16:43] RickHull: binary search can improve on this
[05:16:56] beginner_with_qu: If that's not clear, I guess the question is... how basic is the shorthand?
[05:17:23] beginner_with_qu: I dont mean to offer any distraction RickHull :)
[05:17:26] RickHull: if you know the intervals are increasing, without gaps or overlaps, you can just choose two (random) intervals
[05:17:37] RickHull: beginner_with_qu: no worries, we can multiplex at will :)
[05:17:59] RickHull: and decide if the value is between them or outside them
[05:18:17] Cache_Money: has joined #ruby
[05:18:20] RickHull: and proceed from there. or start with the lowest and highest intervals and go from there
[05:18:21] Ox0dea: RickHull: You essentially just need to define "round" in terms of your bins.
[05:18:28] RickHull: yeah, i think so
[05:18:42] RickHull: just normalize to something like scientific notation
[05:19:25] beginner_with_qu: Ruby is making me wish I hadnt waited years to start on this. My math head is so much foggier now then it was T_T
[05:19:38] Ox0dea: beginner_with_qu: Shorthand?
[05:19:51] hadrig: has joined #ruby
[05:20:39] Ox0dea: Eliding every possible parenthesis isn't particularly common, but taking advantage of the implicit self is, because it's usually just "boilerplate", so to speak.
[05:21:01] beginner_with_qu: Right, example from before: https://eval.in/436048 mine, and yours, where it came from: https://eval.in/436014
[05:21:17] RickHull: beginner_with_qu: good question, above
[05:21:24] duncannz: has joined #ruby
[05:21:45] yosafbridge: has joined #ruby
[05:21:48] RickHull: my best advice, and this applies to nearly any endeavor, is to attempt to adhere to the strict set of rules at first
[05:22:07] RickHull: and only once you've developed a sense of what the rules provide
[05:22:13] arup_r: has joined #ruby
[05:22:17] RickHull: do you start to break them
[05:22:54] RickHull: so your starting defaults should be: extra explicit. add those parens
[05:23:14] beginner_with_qu: The implicit self did already show up in a discussion within these tutorials; however, I did not quite follow it. I suppose I have only spent about 10 minutes on the subject in total before today
[05:23:43] webguynow: has joined #ruby
[05:23:44] RickHull: to this day, within a class and instance methods, I always use explicit self
[05:23:53] RickHull: and usually parens on methods
[05:24:04] RickHull: this goes against some guidelines
[05:24:34] RickHull: but I like to know whether I'm calling a method, or whether it's just a variable that has the same name as a method in the same context
[05:24:41] RickHull: explicit >>>>>>> implicit
[05:24:46] beginner_with_qu: I'm posing this question, because it wasnt until I rewrote the thing with the variables attached did I actually recognize what within them was a method and what was a variable
[05:25:03] beginner_with_qu: Like I had no idea each_with_index was a thing
[05:25:21] beginner_with_qu: >_> which alone probably wouldve kept me from coming into this room at all, had I realized. xD
[05:25:29] RickHull: eh, no big deal
[05:25:33] RickHull: that sort of thing comes with time
[05:25:53] beginner_with_qu: Its not, but the questions certainly help me understand more of the code as written here.
[05:26:04] RickHull: i agree that the ambiguity between methods and variables can be a source of confusion
[05:26:07] RickHull: and I want to minimize those
[05:26:11] hadrig: has joined #ruby
[05:26:18] beginner_with_qu: I've got to understand this stuff well enough and with enough confidence that I can gamble a few months of unemployment on them >_>
[05:26:18] psk17_: has joined #ruby
[05:27:14] RickHull: you're in the right place. this is where understanding happens :)
[05:27:37] beginner_with_qu: I'll get back to work ^_^ Thanks for the help
[05:28:43] RickHull: beginner_with_qu: not to toot my own horn, but this is a good introductory project for a full-fledged ruby thing: https://github.com/rickhull/loremarkov
[05:29:04] RickHull: small enough to understand, but big enough to stand on its own as a gem
[05:29:24] RickHull: in particular: https://rickhull.github.io/loremarkov/rocco/loremarkov.html
[05:29:36] devoldmx: has joined #ruby
[05:32:20] beginner_with_qu: I'll definitely look these over in more detail over the next few days. I still haven't called a gem or other ruby file into my scripts yet. Been mostly mastering arrays, strings, and the basics. There are so many basic methods that it takes awhile. lol
[05:32:32] hadrig: has joined #ruby
[05:32:33] ruurd: has joined #ruby
[05:32:33] beginner_with_qu: Next step it Hash
[05:33:14] devoldmx_: has joined #ruby
[05:33:39] beginner_with_qu: Which basically seems to me to like array[index]array. where the two arrays keep the same index. But Im sure there will be more once I open the box and play
[05:34:04] RickHull: ary = [1,2,3]; hsh = { one: 1, two: 2, three: 3 }
[05:34:26] Ox0dea: >> Array.instance_methods.size # beginner_with_qu
[05:34:27] ruboto: Ox0dea # => 172 (https://eval.in/436052)
[05:34:30] Ox0dea: We're here for you. <3
[05:34:36] RickHull: ary[0] => 1; ary[2] => 3; hsh[:one] => 1
[05:35:18] Ox0dea: beginner_with_qu: Do you tell Amazon that your place is the fifth one on the left?
[05:35:24] RickHull: >> ary = [1,2,3]; ary[0]
[05:35:25] ruboto: RickHull # => 1 (https://eval.in/436053)
[05:35:49] RickHull: >> hsh = { one: 1, two: 2, three: 3 }; hsh[:one]
[05:35:51] ruboto: RickHull # => 1 (https://eval.in/436054)
[05:35:56] beginner_with_qu: I take your point Ox0
[05:36:19] Ox0dea: beginner_with_qu: Arrays have (infinitely) many use cases, of course, but Hashes are certainly more suitable for many problems.
[05:36:41] beginner_with_qu: Basically at any time when you have two objects that need to reference each other
[05:36:51] zapata: has joined #ruby
[05:37:00] beginner_with_qu: :Home => "Address"
[05:37:12] RickHull: not so much
[05:37:21] baweaver: ACTION reads back up
[05:37:22] workmad3: has joined #ruby
[05:37:30] beginner_with_qu: Well, I'll actually read about them first, and then come back for the schooling xD
[05:37:33] baweaver: immediate reaction is that this sounds like a database
[05:37:50] Ox0dea: Just general learnings.
[05:37:51] RickHull: so arrays in ruby are like a linked list -- just a sequence of values
[05:37:57] Ox0dea: RickHull: False.
[05:37:57] beginner_with_qu: Its mostly just chatter baweaver
[05:37:59] RickHull: but they are directly addressable
[05:38:03] RickHull: (unlike a linked list)
[05:38:11] RickHull: Ox0dea: ^ :)
[05:38:20] baweaver: Linked List is Lispy
[05:38:27] Ox0dea: >> foo = []; foo[9000] = 42; foo.size # RickHull
[05:38:28] ruboto: Ox0dea # => 9001 (https://eval.in/436055)
[05:38:31] beginner_with_qu: Is linked list ruby?
[05:38:42] baweaver: it's a generic concept
[05:38:54] RickHull: Ox0dea: i am trading pedantry for insight, here
[05:39:05] Ox0dea: RickHull: Unwise, for something so crucial, I would say.
[05:39:06] baweaver: Ox0dea: IT'S OVER 9000!!!!!!!!!!!!
[05:39:10] Ox0dea: baweaver: Only just!
[05:39:11] mistermocha: has joined #ruby
[05:39:13] RickHull: beginner_with_qu: if linked list means nothing to you, please nevermind
[05:39:25] RickHull: arrays are collections of values
[05:39:29] RickHull: they are Enumerable
[05:39:38] baweaver: https://en.wikipedia.org/wiki/Linked_list
[05:39:40] RickHull: super useful in tons of contexts
[05:39:48] beginner_with_qu: It has a logical meaning Rickhull, but not one based on my experience. My training is in construction of all varieties.
[05:39:58] Ox0dea: I've done a terrible and wonderful thing that I shall surely regret in the morning.
[05:40:24] baweaver: Ox0dea: marvelous how often that phrase is uttered on a Friday night
[05:40:32] RickHull: beginner_with_qu: what programming background do you have?
[05:40:33] Ox0dea: My UNIX password is now 24 bytes, is fun to type, and takes less than a second to do so.
[05:40:55] RickHull: how do you type 24 bytes in less than a second?
[05:40:58] Ox0dea: RickHull: Aha!
[05:41:01] beginner_with_qu: about 12 hours of html and css, with some ancient history in basic java
[05:41:02] devyn: has joined #ruby
[05:41:05] RickHull: don't say quickly
[05:41:09] baweaver: ZWSP or something?
[05:41:15] Ox0dea: Konami Code! <3
[05:41:24] khebbie: has joined #ruby
[05:41:29] RickHull: as if an NES controller can help
[05:41:40] Ox0dea: RickHull: Your keyboard doesn't have arrow keys?
[05:41:48] RickHull: it has A and B too
[05:41:53] beginner_with_qu: I've about two... and half part-time weeks in Ruby.
[05:42:07] baweaver: eh, got to start somewhere.
[05:42:12] Ox0dea: RickHull: Yeah, I only used the arrow keys, though.
[05:42:54] webguynow: has joined #ruby
[05:43:19] Ox0dea: Left Arrow actually sends "\e[D", for example.
[05:43:21] RickHull: beginner_with_qu: checkout https://pine.fm/LearnToProgram/ if you haven't already
[05:43:23] beginner_with_qu: You can get a password made up of arrow keys?
[05:43:47] beginner_with_qu: I read through chapter... 8 or 9? from the website so far
[05:44:04] RickHull: cool, you have a good foundation then
[05:45:26] cantaberry: has joined #ruby
[05:45:34] beginner_with_qu: I've gone through like 4 tutorials. I actually stopped at like 30 minutes in on codecademy.com, I should probably go back and do that, see how far it takes me before it cuts off.
[05:46:13] yfeldblum: has joined #ruby
[05:46:30] ledestin: has joined #ruby
[05:46:51] RickHull: for me, the best way to learn is to dive into the deep end
[05:46:58] RickHull: and then read the instructions for not drowning
[05:47:24] beginner_with_qu: Heh. I'm being very systematic about this. I dont want to get into bad habits.
[05:47:41] beginner_with_qu: I figure thats the worst thing I could do, is train from the getgo wrong.
[05:48:08] RickHull: it's a good approach. however, you almost certainly lack the judgment to decide good / bad habits, outside of your general engineering expertise
[05:48:31] RickHull: that said, I applaud the cautious approach
[05:49:23] beginner_with_qu: RickHull, :) thats why I'm also here
[05:50:14] beginner_with_qu: Still, this is less so about caution and more about I've got only one chance to get into the training program I want to be in.
[05:50:33] beginner_with_qu: So, once that is done, and I'm in. caution is "to the wind"
[05:50:52] maniac: has joined #ruby
[05:51:19] RickHull: cool -- though I would say (and this betrays my own perpective)
[05:51:47] RickHull: you will be much better served to do the right thing in the med/long term, rather than respond to short-term incentives
[05:52:03] AccordLTN: has joined #ruby
[05:52:04] RickHull: but short-term necessities are what they are
[05:52:53] RickHull: and opportunities particularly are fleeting
[05:53:14] RickHull: so yeah, you're on the right track
[05:53:28] Feyn: has joined #ruby
[05:54:28] CBke: has joined #ruby
[05:54:28] CBke: has joined #ruby
[05:55:02] RickHull: the last thing I will say on this topic tonight -- it's a great idea to avoid bad habits -- Ruby in particular (more so, and less so, than other languages) can calcify bad habits
[05:55:17] RickHull: so it's great to have that perspective from the get-go
[05:56:03] RickHull: and it's good engineering practice to defend against shitty practices (which are far too prevalent in the "production" world that I know)
[05:57:17] RickHull: cheers yall
[05:57:20] RickHull: has left #ruby: ()
[05:57:21] rippa: has joined #ruby
[05:59:26] Ox0dea: beginner_with_qu: Are you familiar with FizzBuzz? ;)
[06:00:20] devyn: has joined #ruby
[06:02:21] Ox0dea: It is known.
[06:02:24] shinnya: has joined #ruby
[06:02:33] bruno-: has joined #ruby
[06:03:53] charliesome: has joined #ruby
[06:03:57] Cache_Money: has joined #ruby
[06:04:03] beginner_with_qu: There are definitely more then one way to solve this thing. But its good that Im at such an early stage where I still have to think about it xD
[06:04:52] Ox0dea: https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition
[06:05:21] baweaver: Ox0dea: but they're too young
[06:05:25] baweaver: you'll scare them
[06:05:29] webguynow: has joined #ruby
[06:05:47] Ox0dea: I've just linked a repository that uses 174 files to implement FizzBuzz.
[06:06:12] nfisher: has joined #ruby
[06:07:33] baweaver: you monster
[06:07:39] pawnbox: has joined #ruby
[06:08:08] Ox0dea: Blame the enterprise.
[06:08:39] beginner_with_qu: Honestly, it wasnt very hard
[06:08:49] Ox0dea: beginner_with_qu: Let's see it?
[06:09:13] Ox0dea: It's really only meant to weed out folks who've never written a line of code.
[06:09:14] baweaver: >> 'you can show code here too!'
[06:09:15] ruboto: baweaver # => "you can show code here too!" (https://eval.in/436059)
[06:09:24] Ox0dea: >> "Don't you tempt me."
[06:09:25] ruboto: Ox0dea # => "Don't you tempt me." (https://eval.in/436061)
[06:09:26] beginner_with_qu: https://eval.in/436060
[06:10:01] baweaver: Ox0dea will show you how it's done
[06:10:23] beginner_with_qu: Huh. I just do it manually where I have control. I'm not sure what ruboto is/does might spam should I enter the wrong crap xD
[06:10:23] Ox0dea: beginner_with_qu: Are you ready?
[06:10:32] beginner_with_qu: ready for which?
[06:10:40] baweaver: beginner_with_qu: the answer is no
[06:11:20] beginner_with_qu: xD Sorry I went back to the fixxbuzz google
[06:11:21] baweaver: but too late
[06:11:25] beginner_with_qu: I'm multitasking
[06:11:33] baweaver: Ox0dea will show you anyways.
[06:11:40] Ox0dea: >> _=$$/$$;__=_-_;@_=_+_;$_=@_+_;$__=@_+$_;$-_=$__*$_;@__=''<<$-_*($__+$_)+@_;$___=''<<$-_*$__-$__<<$-_*($__+@_)<<@__<<@__;@___=''<<$-_*$__-$_*$_<<$-_*($__+$_)-$_<<@__<<@__;(___=->____{$.+=_;____<<($.%$-_==__ ?$___+@___:$.%$_==__ ?$___:$.%$__==__ ?@___:$.);$.<($__*@_)**@_?___[____]:____})[[]]
[06:11:41] ruboto: Ox0dea # => [1, 2, "Fizz", 4, "Buzz", "Fizz", 7, 8, "Fizz", "Buzz", 11, "Fizz", 13, 14, "FizzBuzz", 16, 17, "Fiz ...check link for more (https://eval.in/436062)
[06:11:53] beginner_with_qu: lol what the hell xD
[06:12:05] slayerjain: has joined #ruby
[06:12:09] espreto: has joined #ruby
[06:12:12] Ox0dea: beginner_with_qu: This language is better than drugs.
[06:12:22] baweaver: https://gist.github.com/baweaver/88bbbc1a3e3b5dee2610 - humanized his madness
[06:12:30] beginner_with_qu: I dont even know where to begin to understand that xD
[06:12:38] baweaver: read that above
[06:12:38] espreto: has left #ruby: ()
[06:12:40] Ox0dea: beginner_with_qu: baweaver has you covered on that front.
[06:12:56] baweaver: I too was wtf'ing once upon a time
[06:13:00] Ox0dea: (We're being slightly evil.)
[06:13:03] baweaver: but now I see method to the madness
[06:13:12] baweaver: this is truly how real ruby is written
[06:14:39] beginner_with_qu: Thats pretty intense
[06:14:40] BTRE: has joined #ruby
[06:15:57] beginner_with_qu: Honestly, since sometimes I look at the math involving stacks, and it basically reminds me of this, this is actually a much nicer setup then that to me xD
[06:16:54] beginner_with_qu: I had to understand shift and unshift, and pop and push. >_> so I ended up reading up on stacks and queues. xD
[06:17:19] beginner_with_qu: It might be better if I looked now, as opposed to four hours into ruby 0.0
[06:18:44] Ox0dea: beginner_with_qu: Ruby 0.49 is the earliest available version.
[06:19:01] beginner_with_qu: that wasnt a version reference, that was a chapter
[06:19:19] beginner_with_qu: like... page 1. What is Ruby? How to print "hello world" to screen
[06:19:50] Ox0dea: beginner_with_qu: And you're already mucking with deranged sequences. :)
[06:20:08] beginner_with_qu: I do love this stuff. I havent been sleeping much however
[06:20:27] Ox0dea: Coffee is an effective substitute until it isn't.
[06:20:29] beginner_with_qu: I wish I had found it when I was in highschool. I probably wouldve had so much more fun.
[06:20:35] beginner_with_qu: I dont drink coffee
[06:20:51] beginner_with_qu: <_< I just choose to be awake or asleep, until I cant
[06:24:43] beginner_with_qu: I took one programming class suring my second year of college, and ended up with a C because I was spending ALL my time playing with the code instead of turning in the assignments. >_> Java Mac/PC offset meant I could only do the homework on campus, (hadn't been taught backwards compatibility, if that even is needed in java basic) and I was always late due to building programs that had nothing to do with class. sigh.
[06:25:26] beginner_with_qu: Honestly, I was just a dolt for deciding to put it down because I was getting addicted to it. >_> Rather then picking it up because I was.
[06:26:32] krz: has joined #ruby
[06:28:06] gurnoorinder: has joined #ruby
[06:30:12] arup_r: I have a string like -- "/tenants/1/resources" .. and I want to take out the integer from the path. so I am doing as:
[06:30:16] karapetyan: has joined #ruby
[06:30:26] arup_r: >> p "/tenants/1/resources".match(/(\d+)/)[1]
[06:30:27] ruboto: arup_r # => "1" ...check link for more (https://eval.in/436064)
[06:30:36] arup_r: Am I doing correct ?
[06:30:36] gurnoorinder: has joined #ruby
[06:30:46] arup_r: or my regex is buggy
[06:30:49] webguynow: has joined #ruby
[06:34:30] dima_: has joined #ruby
[06:34:51] j416: has joined #ruby
[06:34:58] Ox0dea: arup_r: Is that not the result you were expecting?
[06:35:21] arup_r: Ox0dea: For now it is correct..
[06:35:42] arup_r: I am just wondering if it is correct way I am doing.. or I need to write it like
[06:35:55] arup_r: Ok.. seems I am correct
[06:35:59] arup_r: Ox0dea: thanks
[06:36:51] Ox0dea: arup_r: Well, if you're sure you won't sometimes have numbers elsewhere in the string...
[06:36:54] Ox0dea: >> "/tenants/1/resources"[/\d+/]
[06:36:54] ruboto: Ox0dea # => "1" (https://eval.in/436065)
[06:38:16] arup_r: Yes. Ox0dea That is what I was asking Bro. Thanks for this. The path is always fixed and number will come in the position what it is now.
[06:38:37] arup_r: only the number is dynamic and rest are static
[06:39:04] tannakartikey: has joined #ruby
[06:40:18] Ox0dea: arup_r: It's probably slightly more performant to split on '/' and pluck the number that way, but the one I presented above is pretty nifty.
[06:40:44] webguynow: has joined #ruby
[06:40:51] tannakartikey: has left #ruby: ()
[06:40:57] tannakartikey: has joined #ruby
[06:44:20] psye: has joined #ruby
[06:44:30] cantaberry: Hod do I upload a role which resides outside of the repository path? knife upload role and knife upload from file are being difficult.. ;)
[06:44:31] Asher: has joined #ruby
[06:44:43] youngbaks: has joined #ruby
[06:44:54] tannakartikey: has joined #ruby
[06:48:51] dopie: has joined #ruby
[06:49:12] jackjackdripper: has joined #ruby
[06:51:31] BenjaminDover: has joined #ruby
[06:51:47] BenjaminDover: do people hire ruby programmers with geds?
[06:53:44] havenwood: BenjaminDover: Sure, if they can code.
[06:53:45] pawnbox: has joined #ruby
[06:53:58] BenjaminDover: what do mean by that?
[06:54:10] Ox0dea: GCD > GED
[06:54:27] Ox0dea: BenjaminDover: Do you know how to compute the greatest common divisor of two numbers?
[06:54:40] BenjaminDover: i can do that in my head
[06:54:47] BenjaminDover: but i dropped out of school and got a ged
[06:54:52] BenjaminDover: and i flunked out of college
[06:55:04] skade: has joined #ruby
[06:55:22] Ox0dea: havenwood: Yellow alert.
[06:55:39] rushed: has joined #ruby
[06:56:05] mozzarella: dropped out of college because of crippling social anxiety and sleep problems
[06:56:14] havenwood: ACTION raises deflector shields
[06:56:38] BenjaminDover: i failed because i'm suffering from depression
[06:56:54] BenjaminDover: i have suicidal thoughts every day
[06:57:42] beginner_with_qu: Ox0dea: any tips as to what I should do to cleanup/improve this? https://eval.in/436074
[06:57:46] charliesome: has joined #ruby
[06:58:39] beginner_with_qu: I assume the Repli:it doesnt handle gets as a paste function, unless I broke something between when it was functional last and now.
[06:58:58] Ox0dea: beginner_with_qu: You really should take some time to familiarize yourself with the treasure trove of convenient methods Ruby gives you.
[06:59:16] beginner_with_qu: xD anyone havea good resource link?
[06:59:17] subscope: has joined #ruby
[06:59:23] beginner_with_qu: And yeah, I know.
[06:59:24] Ox0dea: &ri Array#incude?
[06:59:25] `derpy: No results
[06:59:26] havenwood: BenjaminDover: That's sounds like a reasonable explanation for your academic difficulty. If you enjoy Ruby and learn it well I don't think it would hamper you from getting a good job.
[06:59:30] Ox0dea: &ri Array#include?
[06:59:30] `derpy: http://www.rubydoc.info/stdlib/core/Array#include%3F-instance_method
[06:59:33] Ox0dea: beginner_with_qu: ^
[06:59:42] yeticry: has joined #ruby
[06:59:49] Ox0dea: `foo == a || foo == b || foo = c` < `[a, b, c].include? foo`.
[07:00:25] ndrei: has joined #ruby
[07:00:47] BenjaminDover: what else should i know besides ruby well?
[07:00:56] BenjaminDover: what do i have to do to learn ruby well?
[07:01:03] Ox0dea: beginner_with_qu: Also, eval.in does support providing standard input; scroll down a bit. :)
[07:01:04] BenjaminDover: i'm guessing more than gcd?
[07:01:55] beginner_with_qu: Benjamin Dover, I think it depends on what you're programming ruby to do. The more you know, the more you can do. Math is certainly helpful.
[07:02:27] Ox0dea: The GCD thing was just a pun on GED, mind.
[07:02:41] gurnoorinder1: has joined #ruby
[07:02:53] havenwood: >> 42.gcd 81
[07:02:54] ruboto: havenwood # => 3 (https://eval.in/436076)
[07:03:18] havenwood: Or Grand Central Dispatch.
[07:04:34] BenjaminDover: starting from 0 knowledge to work level knowledge what would you recommend for someone to do to learn ruby?
[07:05:04] baweaver: ACTION stares
[07:05:17] baweaver: ACTION goes back to watching Silicon Valley
[07:05:28] Ox0dea: That guy fucks.
[07:05:51] baweaver: still on first season
[07:06:23] beginner_with_qu: Benjamin, look for online tutorials.
[07:06:49] robbyoconnor: has joined #ruby
[07:08:10] beginner_with_qu: BenjaminDover: I started here: https://pine.fm/LearnToProgram/chap_00.html and here: https://www.codecademy.com/learn
[07:09:46] beginner_with_qu: That either helped him, or he didn't care
[07:09:54] Ox0dea: He was sort of a troll. :/
[07:10:02] Ox0dea: BenjaminDover = "bend over".
[07:10:12] havenwood: Good ole Mr. Dover.
[07:11:06] firstdayonthejob: has joined #ruby
[07:11:29] Asher: has joined #ruby
[07:11:40] baweaver: Aw, no kick.... No fun.
[07:13:30] beginner_with_qu: Hm. Can we set symbols return a specified truth? such as :one < :two && :two < :three && :three < :one == true
[07:14:05] Ox0dea: >> Symbol < Comparable
[07:14:06] ruboto: Ox0dea # => true (https://eval.in/436077)
[07:14:11] Ox0dea: >> :foo > :bar
[07:14:12] ruboto: Ox0dea # => true (https://eval.in/436078)
[07:14:24] baweaver: why would you though.
[07:14:29] Ox0dea: beginner_with_qu: But I don't think that's the behavior you expected?
[07:14:44] arup_r: has joined #ruby
[07:14:44] beginner_with_qu: I'm annoyed at this question for rock paper scissors, because I dont want the cascading if elsif elsif end
[07:14:46] Ox0dea: I think you've conflated Symbols with identifiers.
[07:16:24] beginner_with_qu: Sounds like something I'd do, since I've never heard of anything being referenced as an identifiers; only that integers and strings have an inherent relative <=> and sym remained outside my expertise
[07:16:45] Ox0dea: beginner_with_qu: Aye, Symbols also have <=>.
[07:16:53] Ox0dea: That's perfectly irrelevant here, though. :)
[07:17:04] beginner_with_qu: Hm. Then what is an indentifier?
[07:17:19] Ox0dea: An identifier is just a variable name.
[07:17:21] Coldblackice: has joined #ruby
[07:17:31] nfisher: has joined #ruby
[07:18:13] jamesaxl: has joined #ruby
[07:18:45] beginner_with_qu: Oh. So you mean I can set var_one = 1 and var_two = 0 and now var_one > var_two == true.
[07:19:21] beginner_with_qu: I need to launch this irc channel in my own irc, rather then this webclient, I dislike the font
[07:19:32] beginner_with_qu: I cannot see underscores
[07:19:55] skade: has joined #ruby
[07:20:51] beginner_with_qu: For something like Rock Paper Scissors, is there a way to shorthand the if expressions? of is the if/elsif expressions basically the right way to do it?
[07:20:54] iateadonut: has joined #ruby
[07:21:22] pontiki: has joined #ruby
[07:21:26] karapetyan: has joined #ruby
[07:21:42] Asher: has joined #ruby
[07:23:09] Ox0dea: beginner_with_qu: You could use a case statement to clean it up a little bit.
[07:23:24] Ox0dea: There are several overly clever ways to determine an RPS winner.
[07:23:24] subshad: has joined #ruby
[07:24:13] beginner_with_qu: lol overlyclever == learning in my experience
[07:24:57] Ox0dea: You've been advised against "learning badly", mind.
[07:25:23] workmad3: has joined #ruby
[07:25:53] karapetyan: has joined #ruby
[07:25:56] webguynow: has joined #ruby
[07:25:58] Ox0dea: beginner_with_qu: I realize your arsenal is limited, but can you think of a way to represent the cyclic nature of RPS?
[07:27:29] nfisher: has joined #ruby
[07:27:51] beginner_with_qu: I figure I cheated in that expression just by noticing that r < t < s ; however, no. I forced that with the first two if statements
[07:28:30] beginner_with_qu: I mean, givena few days to dwell I might come up with something, but I don't think I've any examples of this in other methods I've used.
[07:29:13] Ox0dea: Well, you just need to come up with a way to encode the `r < p < s < r` relationship.
[07:29:24] beginner_with_qu: I mean I could cycle an array in a circle. And I've looped...
[07:30:19] beginner_with_qu: well, maybe. I had an .ord method I tossed together some week ago, where the ord numbers that surpassed z were recycled back to a
[07:31:02] beginner_with_qu: I'll go look at it to see if it could be relevent, but in this case, since the variables can be any result at any time, anything that might work for that would probably only be more cumbersome.
[07:31:23] Ox0dea: beginner_with_qu: Modular arithmetic is certainly one approach to the thing.
[07:32:28] cantaberry: I'm trying to upload a new role outside of the repo. It keeps throwing an error about the file location. Suggestions?
[07:32:28] beginner_with_qu: It was a ceaser cipher, the method I'm referencing
[07:32:37] Ox0dea: I realized.
[07:36:02] beginner_with_qu: I suppose I could do something like str str where rock=1 paper=2 scissor=3 unless scissor rock then 0 or something. Probably more of a mess then help however.
[07:36:43] zenspider: Cantaberry: how can ANYONE answer that question?
[07:36:55] youngbaks: has joined #ruby
[07:37:27] nfisher: has joined #ruby
[07:37:30] beginner_with_qu: I cant zenspider, my babble shoulde interfere with someone that knows answering you eventually. But I'll stay quiet for a bit to ensure that.
[07:38:11] beginner_with_qu: Oh. wait, zen and canter are two different people >_>
[07:38:19] zenspider: beginner_with_qu: no no... you keep working out your issue
[07:38:29] Joufflu: has joined #ruby
[07:38:29] psk17_: has joined #ruby
[07:38:29] zenspider: yours is at least actionable
[07:38:51] beginner_with_qu: mine is just for fun too.
[07:38:58] zenspider: even better. carry on
[07:39:53] karapetyan: has joined #ruby
[07:39:53] zenspider: Cantaberry: upload? role? repo? outside? error? file? location? ... what?
[07:41:01] Ox0dea: They're using Chef, but that's about all they've sai^W implied.
[07:42:12] zenspider: ?answers Cantaberry
[07:42:12] ruboto: Cantaberry, How to ask the right questions to get you the right answer: https://www.mikeash.com/getting_answers.html
[07:44:05] cantaberry: Well, the answer is "from file".
[07:44:15] cantaberry: There were also some proxy issues I was running into.
[07:44:34] cantaberry: knife role from file ./*.json
[07:47:24] nfisher: has joined #ruby
[07:47:26] beginner_with_qu: rahhh. I went full circle. I started using numbers, ended back up what was basically an if/then again. it would still need to ask if variables x,y = rock,string or string,rock
[07:47:57] beginner_with_qu: rock,paper** paper,rock**
[07:49:04] yfeldblum: has joined #ruby
[07:49:23] Ox0dea: beginner_with_qu: You said you know the #<=> method?
[07:49:53] beginner_with_qu: I read it over once, but my understanding with case substitution is now where near actionable yet
[07:50:35] beginner_with_qu: ... let me look something up. I mightve overlooked something
[07:55:10] araujo: has joined #ruby
[07:55:11] Ropeney: has joined #ruby
[07:55:36] nfisher: has joined #ruby
[07:55:48] Ox0dea: &ri Comparable#<=>
[07:55:49] `derpy: No results
[07:55:51] ndrei: has joined #ruby
[07:56:20] Ox0dea: Not sure what I expected that to do.
[07:58:37] Mekkis: has joined #ruby
[08:00:09] webguynow: has joined #ruby
[08:00:11] beginner_with_qu: looks like #<=> does lots of things depending on the object and additional definitions, and since additional definitions are outside my immediate comfort zone, the string use of of <=> doesnt give me a faster answer then what I was getting through the if then. At least, not that is obvious to me.
[08:00:44] Ox0dea: beginner_with_qu: Sorry, I think I might've inadvertently put you on a goose chase. :/
[08:00:57] Ox0dea: I only meant to use <=> as a demonstration of a convenient semantics.
[08:01:03] beginner_with_qu: Its okay, I'm glad to have read it anyway.
[08:01:27] Ox0dea: It returns negative, 0, or non-negative if the left argument is less than, equal to, or greater than the right argument.
[08:01:27] beginner_with_qu: thats what I used it as first, honestly. xD
[08:01:45] Ox0dea: This is sometimes called a "tribool", because it's a bit like a boolean with three states.
[08:01:55] beginner_with_qu: yup. But I read how it worked with every object listed here: http://www.rubydoc.info/search/stdlib/core?q=%3C%3D%3E for fun
[08:02:26] baweaver: to be fair finding your way around docs is pretty important too.
[08:02:29] Ox0dea: You can use roughly the same approach to make a pretty nice "RPS comparison" method, which returns whether the left or right side won, or if there was a draw.
[08:02:51] Ox0dea: And then you could just call into that comparison method to clean up the rest of the code.
[08:03:23] decoponio: has joined #ruby
[08:03:33] baweaver: Interesting observation that can be used to simplify it: Rock <- Paper <- Scissors <- ...
[08:03:57] baweaver: Enumerable#cycle
[08:04:05] beginner_with_qu: but the stages of the three values are determined by length of the string. How is that any different then me using the strings inherent alphabet to determine there compariability
[08:04:16] Ox0dea: beginner_with_qu: Ignore that they're strings.
[08:04:28] Ox0dea: In fact, they really ought to be Symbols.
[08:04:38] beginner_with_qu: Thats where I started, lol. xD
[08:04:50] baweaver: shenanigans!
[08:04:54] beginner_with_qu: in my very first question
[08:05:54] baweaver: Either that or hashes.
[08:06:16] baweaver: {object: :beats}
[08:06:55] baweaver: >> {rock: :scissors, scissors: :paper, paper: :rock}[:rock]
[08:06:57] ruboto: baweaver # => :scissors (https://eval.in/436087)
[08:07:13] Pumukel: has joined #ruby
[08:07:17] beginner_with_qu: whats the reversed colon mean?
[08:07:29] baweaver: >> {rock: :scissors, scissors: :paper, paper: :rock}
[08:07:30] ruboto: baweaver # => {:rock=>:scissors, :scissors=>:paper, :paper=>:rock} (https://eval.in/436088)
[08:07:35] baweaver: it's translated
[08:07:41] baweaver: JSON-like syntax.
[08:07:57] karapetyan: has joined #ruby
[08:08:51] dima_: has joined #ruby
[08:08:53] beginner_with_qu: Basically it looks at say user_input, checks if comp_input = the hash, if so 1, if it equals user_input, if so draw, else lose.
[08:09:36] beginner_with_qu: 1 == win in this case
[08:09:48] baweaver: Put the equals at the top as that's the cheapest to check.
[08:10:08] baweaver: val == other
[08:10:39] baweaver: bed for me, getting late.
[08:10:53] beginner_with_qu: now I wish I had actually completed the Hash / Symbol sections of these guides before asking this question xD
[08:11:32] beginner_with_qu: I'm going to bank this knowledge, learn hashes more thoroughly and return to it after.
[08:12:30] Ox0dea: I'll just leave this here: https://eval.in/436089
[08:13:11] beginner_with_qu: I've saved it without looking at it. That'll give me something to check against. ^_^ thanks alot
[08:14:38] casadei_: has joined #ruby
[08:15:56] webguynow: has joined #ruby
[08:17:07] beginner_with_qu: Nope read it now. That is the coolest thing.
[08:17:35] Ox0dea: Pretty nifty, huh?
[08:17:37] workmad3: has joined #ruby
[08:18:23] dima_: has joined #ruby
[08:19:19] beginner_with_qu: That is just plain cool
[08:19:31] Ox0dea: The subtractions aren't strictly necessary for determining the result, but returning -1, 0, or 1 is in line with <=>'s semantics.
[08:19:53] Ox0dea: So this would be a decent implementation of, say, RPS::Move#<=>.
[08:20:30] Ox0dea: Only not really, because #<=> is supposed to drive all the other comparisons, and it wouldn't hold due to the cycle.
[08:20:39] beginner_with_qu: Actually, this prompts one more, what I hope is a simple question before I turn in for the night.
[08:20:54] Ox0dea: Make it count. ;P
[08:21:46] caspg: has joined #ruby
[08:22:46] caaspg: has joined #ruby
[08:23:01] beginner_with_qu: all of the methods I write are def method(variable(s)) ... end. Which has the method(call variable) structure in the code. But the method you wrote earlier, was array.derange. Was it due to the class Array that you could make the #derange?
[08:23:39] Ox0dea: That's exactly right.
[08:23:53] Ox0dea: Within a method definition in a class, `self` refers to the object on which the method has been called.
[08:23:57] beginner_with_qu: Cool. That clears up why I had to reverse it when I dragged it into main.
[08:24:25] Ox0dea: Hey, how did you know about main?
[08:25:51] beginner_with_qu: It was referenced off-handily in one of the four turtorials I read through. And since I recognized that anytime I deviated from the basics, shit happened differently. I guess the word became a way for my to rationalize what was going on
[08:26:30] karapetyan: has joined #ruby
[08:26:33] beginner_with_qu: I suspect it had something to do with their description on implicit variables, which I had also read through, but didnt quite follow until today going through your assistance
[08:26:47] Ox0dea: Makes sense, I suppose. It's just that the top level really is called `main`.
[08:26:49] ruboto: Ox0dea # => main (https://eval.in/436091)
[08:26:57] Ox0dea: And I'll leave you to sleep on that one. :)
[08:27:23] ktkh: has joined #ruby
[08:27:31] Ox0dea: Night, beginner_with_qu. <3
[08:28:02] beginner_with_qu: Night Ox0dea, I'll let you know what my username becomes when I get to formalizing my idling here. xD
[08:29:34] ktkh: has joined #ruby
[08:29:34] youngbaks: has joined #ruby
[08:30:42] jtoy: has joined #ruby
[08:31:10] devoldmx: has joined #ruby
[08:32:11] jtoy: hi, I'm stucked koan solution. It crashes whenever I fill the answer http://fpaste.org/269172/65139414/
[08:35:07] nfisher: has joined #ruby
[08:37:11] i-blis: has joined #ruby
[08:37:26] dionysus69: has joined #ruby
[08:38:50] apeiros: jt__: `assert_equal <Dog named 'Fido'>, fidos_self` is not valid ruby
[08:39:13] apeiros: mainly the part `<Dog named 'Fido'>`. you probably want that to be a String?
[08:39:39] webguynow: has joined #ruby
[08:40:35] omarJs: has joined #ruby
[08:41:53] jtoy: apeiros: http://fpaste.org/269174/26520761/ this how it was defined and call
[08:42:49] jtoy: so the assertion is expecting that exact string but it explore when I execute rake with that value filled in the blank
[08:44:46] jtran: has joined #ruby
[08:45:04] krz: has joined #ruby
[08:45:26] jenrzzz: has joined #ruby
[08:45:34] jtran: apeiros: if you answered my question earlier I never saw that last one after my paste
[08:46:45] Pupeno: has joined #ruby
[08:49:12] krz: how is minimagick doing this. image = MiniMagick::Image.open(image_url); image.path
[08:49:25] krz: is open creating a new instance of some object so path can reference it?
[08:49:55] zenspider: what's the code say?
[08:50:09] krz: is open a singleton method ?
[08:50:32] zenspider: a class method, yup
[08:50:54] krz: as in def self.open right?
[08:51:29] apeiros: krz: in pry: `$ MiniMagick::Image.open`
[08:51:34] apeiros: shows you the source of that method
[08:51:35] zenspider: usually/often... yup
[08:51:59] webguynow: has joined #ruby
[08:53:44] krz: oh interesting apeiros
[08:54:57] marr: has joined #ruby
[08:55:04] allomov: has joined #ruby
[08:55:40] dagda1: has joined #ruby
[08:56:26] startupality: has joined #ruby
[08:56:36] ktkh: has joined #ruby
[08:59:39] khebbie: has joined #ruby
[09:02:21] mateuszzawisza: has joined #ruby
[09:02:25] mateuszzawisza: has left #ruby: ()
[09:02:29] allomov: has joined #ruby
[09:04:55] davedev24: has joined #ruby
[09:05:57] lxsameer: has joined #ruby
[09:07:23] karapetyan: has joined #ruby
[09:09:14] voker57: has joined #ruby
[09:13:37] pawnbox: has joined #ruby
[09:18:53] workmad3: has joined #ruby
[09:25:44] nfisher: has joined #ruby
[09:28:44] workmad3: has joined #ruby
[09:31:56] devoldmx: has joined #ruby
[09:33:20] drewvanstone: has joined #ruby
[09:34:31] [k-: has joined #ruby
[09:34:39] davedev24: has joined #ruby
[09:34:52] BaroMeter: has joined #ruby
[09:35:11] [k-: 2/2 pass
[09:39:00] workmad3: has joined #ruby
[09:42:16] spider-mario: has joined #ruby
[09:45:39] Jackneill: has joined #ruby
[09:48:43] bruno-: has joined #ruby
[09:49:51] AlexRussia: has joined #ruby
[09:50:06] [k-: ACTION searches for Ox0dea
[09:50:11] [k-: Ox0dea!
[09:53:25] ndrei: has joined #ruby
[09:54:24] webguynow: has joined #ruby
[09:55:19] mprelude: has joined #ruby
[09:56:22] MagePsycho: has joined #ruby
[10:01:28] devoldmx: has joined #ruby
[10:01:29] stamina: has joined #ruby
[10:01:38] unop: has joined #ruby
[10:02:48] SCHAAP137: has joined #ruby
[10:03:07] einarj: has joined #ruby
[10:04:42] dagda1: has joined #ruby
[10:10:15] mgorbach: has joined #ruby
[10:11:04] _orangejuice: has joined #ruby
[10:11:07] webguynow: has joined #ruby
[10:11:35] ndrei: has joined #ruby
[10:11:36] workmad3: has joined #ruby
[10:19:00] CrazyEddy: has joined #ruby
[10:20:55] karapetyan: has joined #ruby
[10:21:17] webguynow: has joined #ruby
[10:25:21] oOXuOo: has joined #ruby
[10:25:39] bin7me: has joined #ruby
[10:26:23] oOXuOo: has joined #ruby
[10:26:24] omarJs: has joined #ruby
[10:26:30] nfisher: has joined #ruby
[10:26:44] naftilos76: has joined #ruby
[10:28:35] webguynow: has joined #ruby
[10:30:19] krz: has joined #ruby
[10:32:45] rutu: has joined #ruby
[10:33:12] allomov: has joined #ruby
[10:33:33] rutu: has left #ruby: ()
[10:33:53] slayerjain: has joined #ruby
[10:33:59] oOXuOo: has joined #ruby
[10:34:46] sdothum: has joined #ruby
[10:40:24] _orangejuice: has left #ruby: ()
[10:41:15] CloCkWeRX: has joined #ruby
[10:41:52] nyon-zero-pyon: has joined #ruby
[10:44:38] ruurd: has joined #ruby
[10:46:24] bronson: has joined #ruby
[10:48:40] shubhams2m: has joined #ruby
[10:50:57] [k-: yes we are here
[10:51:01] [k-: ask away
[10:52:12] workmad3: has joined #ruby
[10:53:48] apeiros: I guess this is the next level
[10:54:14] apeiros: instead of asking a question and lacking all relevant information, expecting us to guess the missing parts, they now leave out the question altogether
[10:56:02] ccooke: apeiros: think of it as a complement. They believe that you really are that clever
[10:56:07] webguynow: has joined #ruby
[10:57:25] [k-: we have already solved it
[10:57:40] [k-: (in the future)
[10:58:04] ht__: has joined #ruby
[10:58:15] apeiros: [k-: wrong tense then. we already will have solved it
[10:58:42] ckuhn: has joined #ruby
[10:59:02] ckuhn: has left #ruby: ()
[11:01:00] nanoz: has joined #ruby
[11:01:05] kirun: has joined #ruby
[11:02:51] Rurik: has joined #ruby
[11:06:53] einarj: has joined #ruby
[11:08:20] pepperbreath1: has joined #ruby
[11:10:04] jhass: we will have already solved it?
[11:10:23] sankaber: has joined #ruby
[11:11:16] maniac: has joined #ruby
[11:11:33] maniac: has left #ruby: ()
[11:12:32] webguynow: has joined #ruby
[11:13:15] tjbiddle: has joined #ruby
[11:13:48] ddv: has joined #ruby
[11:15:05] bruno-: has joined #ruby
[11:15:27] ndrei: has joined #ruby
[11:16:12] Leef_: has joined #ruby
[11:17:02] shevy: we could have
[11:19:17] [k-: we could be heroes, me and you ???
[11:20:34] moeabdol: has joined #ruby
[11:21:55] FernandoBasso: has joined #ruby
[11:22:27] workmad3: has joined #ruby
[11:22:36] pontiki: has joined #ruby
[11:22:52] segfalt: has joined #ruby
[11:23:26] platosha: has joined #ruby
[11:23:56] apt-get: has joined #ruby
[11:29:45] webguynow: has joined #ruby
[11:30:15] rodfersou: has joined #ruby
[11:30:43] rickmasta: has joined #ruby
[11:31:36] nfk: has joined #ruby
[11:33:23] jdawgaz: has joined #ruby
[11:34:48] webguynow: has joined #ruby
[11:39:51] einarj: has joined #ruby
[11:41:17] leitz: has joined #ruby
[11:41:38] adaedra: Ox0dea: I'll look into that.
[11:42:09] nfisher: has joined #ruby
[11:49:49] allcentury: has joined #ruby
[11:50:56] otherj: has joined #ruby
[11:51:31] {756d6f}: has joined #ruby
[11:52:13] nfisher: has joined #ruby
[12:00:21] drewvanstone: has joined #ruby
[12:02:11] nfisher: has joined #ruby
[12:03:44] sepp2k: has joined #ruby
[12:05:03] ghormoon: has joined #ruby
[12:05:33] shevy: https://www.reddit.com/r/ruby/comments/1vdtma/are_rubygemsorg_download_statistics_accurate/
[12:05:41] shevy: "Gems are constantly indexed by all kinds of bots, 3rd party services, etc. around the web"
[12:05:42] MagePsycho: has joined #ruby
[12:05:45] devoldmx: has joined #ruby
[12:06:26] Ektor: has joined #ruby
[12:08:09] devoldmx: has joined #ruby
[12:09:02] da3mian: has joined #ruby
[12:12:01] noob_: has joined #ruby
[12:12:16] nfisher: has joined #ruby
[12:12:20] Trynemjoel: has joined #ruby
[12:13:22] Denis: has joined #ruby
[12:13:42] shevy: https://rubygems.org/stats - almost 100.000 registered users
[12:13:45] startupality: has joined #ruby
[12:14:06] shevy: I wonder what cpan sports there
[12:14:47] shevy: http://www.cpan.org/authors/02authors.txt.gz has 12374 entries
[12:15:24] [k-: 100 registered users only?
[12:16:55] [k-: we use . for decimals, shevy
[12:17:22] [k-: do you even physics?
[12:17:44] [k-: that would mean you measure a person by dividing them into a thousand parts!
[12:18:24] [k-: (err, i meant the markings ('divisions') on a ruler)
[12:18:33] i-blis: has left #ruby: ()
[12:19:28] krz: has joined #ruby
[12:21:42] webguynow: has joined #ruby
[12:22:17] nfisher: has joined #ruby
[12:23:37] leitz: Program runs in the project root directory, using a required file in lib/ and "$LOAD_PATH << File.expand_path("../lib", __FILE__)", If I move the program to bin/, it fails. What am I missing?
[12:23:54] leitz: Besides "a clue", and "a life"...
[12:24:03] workmad3: has joined #ruby
[12:24:08] jhass: leitz: relace __FILE__ with __dir__ :P
[12:25:50] noob_: i went through a video saying learn atleast 5 programming language wont that make us confused ? since ruby was listed in that
[12:26:30] shevy: mr. webchatter is bored again
[12:26:30] leitz: jhass, not woring with dir or DIR
[12:26:45] leitz: woring/working
[12:27:05] mprelude: noob_: I wouldnt concentrate on learning languages, I'd concentrate on learning paradigms.
[12:27:06] jhass: I didn't write dir nor DIR, I wrote __dir__
[12:27:18] [k-: >> __dir__
[12:27:18] shevy: did you mean "dir"
[12:27:19] ruboto: [k- # => "/tmp/execpad-e66789f89bc5" (https://eval.in/436124)
[12:27:21] abyss_: has joined #ruby
[12:27:30] [k-: it's an actual thing
[12:27:37] leitz: ./chargen.rb:3: undefined local variable or method `__dir__' for main:Object (NameError)
[12:27:53] shevy: leitz do you have to modify $LOAD_PATH?
[12:29:09] webguynow: has joined #ruby
[12:29:18] apeiros: leitz: what ruby version are you using? (probably too old)
[12:29:23] centrx: has joined #ruby
[12:29:47] leitz: shevy, lemme test. I just pushed the code to git hub.
[12:29:57] leitz: apeiros, 1.8.7. As always.
[12:30:16] apeiros: you know that 1.8.7 has been dead for ages, yes?
[12:31:09] shevy: leitz if it is installable like via a gem, then you can find out the base directory, and use that to load stuff
[12:32:09] shevy: for instance RbConfig::CONFIG['sitelibdir']+'/name_of_gem_project_here/' would work; not sure on 1.8.x, you may have to do require 'rbconfig' first
[12:32:16] nfisher: has joined #ruby
[12:35:01] webguynow: has joined #ruby
[12:35:49] ItSANgo_: has joined #ruby
[12:36:16] leitz: I'm writing the program and trying to make it gem compliant.
[12:36:38] ruurd: has joined #ruby
[12:36:50] leitz: apeiros, yup, I know. I also know that all the servers I maintain run it. So any code I want to work at work has to work on 1.8.7.
[12:37:24] [k-: will the code to work! but will it work?
[12:37:26] apeiros: leitz: then for the future I strongly suggest you mention your ruby version when seeking help
[12:37:37] apeiros: because frankly, zombie versions are not assumed by default
[12:37:41] shevy: yeah, if you put it into a gem_project/bin then you should just be able to do: require 'name_here' at the top of the file that resides in bin/
[12:38:42] karapetyan: has joined #ruby
[12:39:54] darix: leitz: your gems wouldnt be in sitelibdir
[12:40:23] shevy: the above requires work for me :(
[12:40:49] freerobby: has joined #ruby
[12:41:24] da3mian_: has joined #ruby
[12:41:58] MagePsycho: has joined #ruby
[12:42:03] mcFactor: has joined #ruby
[12:42:42] webguynow: has joined #ruby
[12:44:30] Rollabunna: has joined #ruby
[12:45:45] da3mian: has left #ruby: ()
[12:45:48] Ketchy: has joined #ruby
[12:47:22] cashnguns: has joined #ruby
[12:49:36] JoshL: has joined #ruby
[12:49:57] michael_mbp: has joined #ruby
[12:53:04] leitz: Solved with $LOAD_PATH << ("../lib")
[12:53:41] giuseppesolinas: has joined #ruby
[12:53:48] pwnd_nsfw: has joined #ruby
[12:54:13] ItSANgo: has joined #ruby
[12:55:28] frmendes: has joined #ruby
[12:56:12] bkxd: has joined #ruby
[12:56:27] karapetyan: has joined #ruby
[12:58:47] webguynow: has joined #ruby
[12:59:40] Macaveli: has joined #ruby
[13:03:05] apt-get: has joined #ruby
[13:03:13] allcentury: has joined #ruby
[13:04:28] ktkh: has joined #ruby
[13:04:35] apeiros: relative paths in $LOAD_PATH, always a good idea</not>
[13:04:37] webguynow: has joined #ruby
[13:07:49] [k-: unopened tag `not`
[13:08:10] karapetyan: has joined #ruby
[13:08:11] jhass: relax, it's SGML
[13:08:16] krz: has joined #ruby
[13:08:45] lulzmachine: has joined #ruby
[13:10:01] pawnbox: has joined #ruby
[13:10:42] gurnoorinder: has joined #ruby
[13:11:39] shevy: the people here are not happy with $LOAD_PATH!
[13:12:00] adaedra: It's not $LOAD_PATH the problem
[13:12:24] leitz: apeiros, already found a new way to mess that up. I'm running the program from the base directory and that LOAD_PATH failed, so I changed it to FILE.expand_path("lib")
[13:12:34] leitz: Which will probably break something else, I'm sure.
[13:13:03] leitz: Well, all the tests passed. That's a start
[13:13:41] Cust0sLimen: How limited is Shoes ?
[13:13:52] webguynow: has joined #ruby
[13:14:10] shevy: the main one requires jruby
[13:14:28] linuxboytoo: has joined #ruby
[13:14:32] Cust0sLimen: would gtk be better option ?
[13:14:35] apeiros: leitz: congrats, you just figured why relative paths in $LOAD_PATH are not ag ood idea
[13:15:38] [k-: now to share your experience with the world
[13:17:04] last_staff: has joined #ruby
[13:17:24] apeiros: and yes, that code still can break as it still depends on the working directory
[13:18:17] shevy: Cust0sLimen dunno, it is different. It's a thin layer over the C gtk API but it is still ruby so that is better
[13:18:22] shevy: I lately saw a hello world in vala
[13:18:39] shevy: https://en.wikipedia.org/wiki/Vala_%28programming_language%29#Code_example
[13:18:47] Cust0sLimen: shevy, but vala ;(
[13:18:50] shevy: the third example is almost 1:1 in ruby, except of course that you can omit the ; and stuff
[13:18:53] shevy: yeah but look at it!
[13:18:59] shevy: Gtk.init (ref args);
[13:19:05] shevy: ruby-gtk also has Gtk.init
[13:19:15] shevy: (it has become optional though, you no longer have to manually do it; but it is still there)
[13:19:24] shevy: window.window_position = WindowPosition.CENTER;
[13:19:24] webguynow: has joined #ruby
[13:19:41] shevy: almost the same in ruby too... the latter is... I don't remember, Gtk::WINDOW::CENTER or something similar...
[13:19:56] shevy: var label = new Label ("Hello, World!");
[13:20:04] shevy: label = Gtk::Label.new 'Hello, World!'
[13:20:28] shevy: the fact that vala was created sorta shows that C isn't great for everything :>
[13:26:01] ruurd: has joined #ruby
[13:26:55] atomical: has joined #ruby
[13:27:17] pawnbox: has joined #ruby
[13:28:06] Kallis: has joined #ruby
[13:29:11] Freeaqingme: has joined #ruby
[13:29:24] karapetyan: has joined #ruby
[13:30:52] webguynow: has joined #ruby
[13:31:32] karapetyan: has joined #ruby
[13:33:36] tknz: has joined #ruby
[13:37:33] Exuma: has joined #ruby
[13:39:00] amystephen: has joined #ruby
[13:39:01] beast: has joined #ruby
[13:39:37] bkulbida: has joined #ruby
[13:40:56] workmad3: has joined #ruby
[13:41:04] dorei: has joined #ruby
[13:42:49] youngbaks: has joined #ruby
[13:43:48] webguynow: has joined #ruby
[13:43:57] karapetyan: has joined #ruby
[13:45:34] leitz: In Ruby 1.8.7 is there a way to set the "Start all paths from here."?
[13:46:11] Kallis: has joined #ruby
[13:46:44] centrx: No results found for "Start all paths from here".
[13:47:21] Freeaqingme: has joined #ruby
[13:47:56] phreakocious: anyone have a simple gem for handling config files? dotenv's focus on environment variables feels really odd to me, and settingslogic's yaml is a bit much
[13:48:29] [k-: yaml is a bit much?
[13:48:42] ItSANgo: has joined #ruby
[13:48:58] frmendes: has joined #ruby
[13:49:09] phreakocious: the example seems overengineered for simple key/value type needs
[13:49:24] phreakocious: and I don't need development/production separation
[13:49:54] [k-: hm, .properties? .ini?
[13:51:16] phreakocious: heh, I guess I'll just write one :)
[13:51:35] dorei: phreakocious: your devops will love you if you use the env variables ;-)
[13:51:47] Meow-J: has joined #ruby
[13:51:56] phreakocious: it's like fashion.. what's old is new again
[13:52:55] webguynow: has joined #ruby
[13:52:56] phreakocious: in the process of finding this, http://12factor.net/ came up repeatedly and it looks like some freemason shit to me
[13:53:35] dorei: the whole IT looks like freemason shit :)
[13:53:48] apeiros: has joined #ruby
[13:54:38] karapetyan: has joined #ruby
[13:55:39] karapety_: has joined #ruby
[13:56:34] gurnoorinder: has joined #ruby
[13:56:51] gregf: has joined #ruby
[13:59:52] linuxboytoo: has joined #ruby
[14:00:56] BTRE: has joined #ruby
[14:01:24] havenwood: has joined #ruby
[14:01:33] karapetyan: has joined #ruby
[14:01:40] Freeaqingme: has joined #ruby
[14:02:33] webguynow: has joined #ruby
[14:02:58] nfisher: has joined #ruby
[14:03:17] lkba: has joined #ruby
[14:05:01] Rurik: has joined #ruby
[14:09:17] nickjj: has joined #ruby
[14:09:37] umgrosscol: has joined #ruby
[14:10:29] solocshaw: has joined #ruby
[14:10:56] chipotle: has joined #ruby
[14:11:08] workmad3: has joined #ruby
[14:11:43] sferik: has joined #ruby
[14:12:15] PublicSubnet: has joined #ruby
[14:12:43] JCOE: has joined #ruby
[14:13:32] flak: has joined #ruby
[14:14:27] apeiros: phreakocious: just use a plain yaml file then?
[14:15:39] Freeaqingme: has joined #ruby
[14:17:32] Kallis: has joined #ruby
[14:17:48] phreakocious: apeiros: yeah, leaning that way.. settingslogic doesn't seem to work right with simple lists :(
[14:18:26] bricker: has joined #ruby
[14:18:50] marahin: has joined #ruby
[14:18:53] ktkh: has joined #ruby
[14:19:28] marahin: Hey guys! Having [5, 5, 5, 3] array I want to delete the first value matching 5. How do I do that, assuming I might have huge-er data?
[14:20:29] Soda: has joined #ruby
[14:22:20] Chau: has joined #ruby
[14:22:26] apeiros: marahin: if you have a huge amount of data, you might want to consider restructuring your data to fit your needs better
[14:22:41] apeiros: but with the given structure: ary.delete_at(ary.index(5))
[14:23:23] veduardo_: has joined #ruby
[14:24:04] daveomcd: has joined #ruby
[14:26:06] daveomcd: is there an equivalent for `rails new app` for ruby?
[14:26:21] centrx: daveomcd, touch myscript.rb
[14:26:34] Rollabunna: has joined #ruby
[14:26:56] [k-: haha funny
[14:26:59] daveomcd: centrx: ok thanks didn't know if there was something more that would create gem file etc etc
[14:27:18] drewvanstone: has joined #ruby
[14:28:32] apeiros: daveomcd: Gemfile is not part of ruby, it's related to bundler, a separate gem
[14:28:38] elperdut: has joined #ruby
[14:29:00] daveomcd: gotcha thanks
[14:29:09] Rollabunna: has joined #ruby
[14:29:10] apeiros: daveomcd: if you want something to build a gem skeleton - there's plenty of tools to do that. bundler e.g. via `bundle new gemname`
[14:29:41] Rollabunna: has joined #ruby
[14:30:02] daveomcd: apeiros: ok cool, that's what i was looking for likely i'll go google some on it thanks!
[14:30:14] apeiros: ?toolbox daveomcd
[14:30:14] ruboto: daveomcd, https://www.ruby-toolbox.com is a website which lists lots of gems, topically organized
[14:31:00] [k-: ?books apeiros
[14:31:00] ruboto: apeiros, You can find a list of recommended books at http://ruby-community.com/pages/links
[14:31:29] marahin: apeiros: thank you
[14:32:12] frmendes: has joined #ruby
[14:32:30] marahin: apeiros: i was just wondering cause i stepped upon an exercise where you had to sort things out and delete ONE value depending on a condition, wanted to use ruby for that
[14:32:36] marahin: couldn't find a good method though :)
[14:32:41] marahin: thank you very much.
[14:32:43] allcentury: has joined #ruby
[14:33:41] ipstatic: has joined #ruby
[14:33:50] devn: has joined #ruby
[14:33:57] shevy: ruby ruby ruby
[14:34:37] adaedra: rubi rubi rubi
[14:34:40] centrx: scooby dooby doo
[14:35:06] davedev24: has joined #ruby
[14:36:10] Guest53916: has joined #ruby
[14:37:52] Hanmac: has joined #ruby
[14:37:56] bruno-: has joined #ruby
[14:39:58] wildlander: has joined #ruby
[14:40:10] karapetyan: has joined #ruby
[14:40:36] wildlander: has joined #ruby
[14:40:38] voltalio: has joined #ruby
[14:42:13] claptor: has joined #ruby
[14:45:39] outsmartin: has joined #ruby
[14:47:15] gurnoorinder1: has joined #ruby
[14:47:21] einarj: has joined #ruby
[14:47:53] [k-: &ri noresults
[14:47:53] `derpy: No results
[14:47:55] slayerjain: has joined #ruby
[14:48:09] [k-: adaedra: change it to nothing appropriate!
[14:49:01] Freeaqingme: has joined #ruby
[14:50:05] drewvanstone: has joined #ruby
[14:53:18] webguynow: has joined #ruby
[14:54:14] linuxboytoo: has joined #ruby
[14:56:48] skade: has joined #ruby
[14:58:05] webguynow: has joined #ruby
[14:58:38] workmad3: has joined #ruby
[14:59:19] Guest53916: has joined #ruby
[15:00:19] Guest53916: has joined #ruby
[15:01:04] Caddee: has joined #ruby
[15:06:07] krz: im reading up on http://brewhouse.io/blog/2014/04/30/gourmet-service-objects.html he is using def self.call(*args) which allows him to do Foo.call(obj1, obj2). how does one have access to obj1 and obj2 in the instance method call, in Foo?
[15:06:53] centrx: krz, The * (splat) makes args into an array
[15:07:20] centrx: krz, Whereas obj1, obj2 is a syntactic list, the * makes it into an actual Array
[15:08:17] gurnoorinder: has joined #ruby
[15:08:24] mblagden_: krz: (so the implied answer is: you access them as you would access elements of an array)
[15:08:57] webguynow: has joined #ruby
[15:09:23] davispuh: has joined #ruby
[15:09:24] beauby: has joined #ruby
[15:10:11] krz: so in def call; i have puts args. i get NameError: undefined local variable or method `args'
[15:10:12] krz: let me gist somethign to make this clearer
[15:11:17] krz: https://gist.github.com/f057ac03937ce7e37c12 how do i get access to 'foo' and 'bar' in the instance method call
[15:13:58] mblagden_: what "args" is line 9 supposed to be accessing?
[15:14:00] webguynow: has joined #ruby
[15:14:07] shevy: where are your args man
[15:14:43] [k-: def initialize?
[15:15:03] shevy: he does not have it!
[15:15:16] [k-: or instead of shifting it to initialize, shift it to the instance method call
[15:15:23] krz: i need to access the args (on line 9) that was passed on line 3
[15:15:28] Macaveli: has joined #ruby
[15:15:47] shevy: you write mystery code
[15:17:08] shevy: you pass args to initialize - and you have no initialize method
[15:17:45] krz: shevy: http://brewhouse.io/blog/2014/04/30/gourmet-service-objects.html is doing https://gist.github.com/c581443771b3eb0cc5c1 at the gist, he is passings *args to the singleton method call. i am assuming he is able to access the args from the isntance methods as well. how is he doing that?
[15:17:55] krz: the other on the blog post does not have an intialize method as well
[15:18:06] krz: other=author
[15:18:29] cbyrda: has joined #ruby
[15:18:43] nfisher: has joined #ruby
[15:19:33] kobain: has joined #ruby
[15:19:38] [k-: illegal assignment
[15:19:40] shevy: which part of the blog do you refer to
[15:20:59] krz: shevy: https://gist.github.com/c581443771b3eb0cc5c1
[15:21:38] shevy: pointing to the header "Real world services" would have sufficed :D
[15:22:04] shevy: that's a lot of domain specific code
[15:22:12] iamninja: has joined #ruby
[15:22:14] shevy: how do you know that his code works?
[15:22:39] mblagden_: "i am assuming he is able to access the args from the isntance methods as well" I'm not sure that's a valid assumption
[15:22:42] Hrorek: has joined #ruby
[15:22:44] shevy: I already know that the snippet you showed can not work; include Virtus.model is not possible by default. He must have omitted some requires
[15:23:34] krz: hmm so for the instance methods to have access to args. i guess def initialize *args should do it
[15:23:49] mblagden_: yeah, you'll need to do something to get args into the instance
[15:23:58] drewvanstone: has joined #ruby
[15:24:14] dopie: has joined #ruby
[15:24:32] krz: kk thanks
[15:25:19] BenjaminDover: has joined #ruby
[15:25:30] webguynow: has joined #ruby
[15:26:04] Rurik: has joined #ruby
[15:26:13] krz: i guess @foo, @bar, @baz = args in def initialize. assuming 3 params were passed into .call
[15:27:41] krz: sweet. works!
[15:28:02] mblagden_: good stuff :)
[15:28:58] atzorvas: has joined #ruby
[15:30:18] [k-: but what if you already had an instance?
[15:30:34] [k-: do you only want to have it do the same thing over and over again?
[15:30:44] NathanHiggers: has joined #ruby
[15:30:46] fantazo: has joined #ruby
[15:31:29] kkeuning: has joined #ruby
[15:32:03] shevy: hmm ... .instance_method() versus .method()
[15:33:54] NeverDie: has joined #ruby
[15:34:01] gambl0re: has joined #ruby
[15:34:04] slayerjain: has joined #ruby
[15:36:37] slayerja_: has joined #ruby
[15:37:52] hydrozen: has joined #ruby
[15:38:30] slayerja_: has joined #ruby
[15:39:37] webguynow: has joined #ruby
[15:41:39] [k-: hmm ... send vs public_send
[15:42:46] shevy: not quite
[15:42:51] shevy: I can use just .send() fine :D
[15:43:06] lxsameer: has joined #ruby
[15:43:06] lxsameer: has joined #ruby
[15:43:08] shevy: but in instance_method versus method ... if I wish to obtain the source, I need to know which variant I have to use?
[15:43:56] shevy: does irb itself actually have any way by default to show the source code to a method? or is it stuck in the 1.8.x era
[15:47:01] matrixise: has left #ruby: ()
[15:49:00] workmad3: has joined #ruby
[15:50:29] cndiv: has joined #ruby
[15:51:01] frmendes: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[15:51:26] gurnoorinder: has joined #ruby
[15:51:36] soulcake: has joined #ruby
[15:52:36] shinnya: has joined #ruby
[15:52:49] soulcake: has joined #ruby
[15:53:21] sumark: has joined #ruby
[15:53:43] soulcake: has joined #ruby
[15:54:24] webguynow: has joined #ruby
[16:02:52] mgorbach: has joined #ruby
[16:06:50] voltalio: has joined #ruby
[16:07:00] frmendes: has joined #ruby
[16:09:05] havenwood: shevy: http://ruby-doc.org/core/Method.html#method-i-source_location
[16:09:56] voltalio: has joined #ruby
[16:11:59] havenwood: >> require 'rinda/tuplespace'; Rinda::TupleSpace.new.public_method(:notify).source_location
[16:12:00] ruboto: havenwood # => ["/execpad/interpreters/ruby-2.2.0/lib/ruby/2.2.0/rinda/tuplespace.rb", 568] (https://eval.in/436179)
[16:12:16] havenwood: shevy: Just for methods written in Ruby.
[16:16:18] ruurd: has joined #ruby
[16:19:50] nfisher: has joined #ruby
[16:19:51] shevy: now you did it havenwood
[16:19:59] shevy: when before I only wanted to show the source of ruby code
[16:20:07] shevy: I want irb to show the code of EVERYTHING!
[16:20:26] shevy: (I am kidding, nobody touches irb code and makes it out alive again.)
[16:20:32] havenwood: shevy: Those pesky methods written in C...
[16:21:23] shevy: can they show the source code to methods when things are running on the JVM?
[16:21:50] voltalio: has joined #ruby
[16:21:57] f00dMonsta: has joined #ruby
[16:22:41] havenwood: shevy: Those pesky methods written in Java...
[16:22:57] mwlang: has joined #ruby
[16:23:26] allcentury: has joined #ruby
[16:23:28] shevy: this is why we can't have nice things
[16:25:09] benlieb: has joined #ruby
[16:25:50] beauby: has joined #ruby
[16:27:09] webguynow: has joined #ruby
[16:27:53] jgt: has joined #ruby
[16:29:32] nfisher: has joined #ruby
[16:30:40] voltalio: has joined #ruby
[16:33:34] chouhoulis: has joined #ruby
[16:34:06] cndiv: Hey #ruby, n00b question. In this example: foo = Bar.new(X, Y) - what do you call the X and Y? One course I'm taking says "parameters" and another says "arguments"
[16:34:19] bronson: has joined #ruby
[16:34:23] apeiros: both terms are in use
[16:34:41] cndiv: apeiros: Explains that. One more popular than the other?
[16:34:42] shevy: I'd prefer arguments there
[16:34:59] [k-: parameters are used when referring to the definition
[16:35:03] shevy: parameter sounds more formal and noble
[16:35:13] [k-: def method param1, param2
[16:35:21] [k-: arguments are used when calling
[16:35:32] [k-: method(arg1, arg2)
[16:35:55] charliesome: has joined #ruby
[16:36:05] Rurik: has joined #ruby
[16:36:20] cndiv: OK, great. I love it when I phrase questions properly, feel like I'm learning something!
[16:37:14] cndiv: I've been surprised that vocabulary has been a tough part of learning this, for me.
[16:37:49] Rurik: has joined #ruby
[16:39:00] webguynow: has joined #ruby
[16:39:29] peterhu: has joined #ruby
[16:39:32] nfisher: has joined #ruby
[16:40:42] [k-: indeed, left associativity, commutativity, and the like ?.?
[16:41:14] ruby-lang529: has joined #ruby
[16:42:20] Ilyes512: has joined #ruby
[16:42:34] allcentury: has joined #ruby
[16:43:07] slayerjain: has joined #ruby
[16:43:11] cndiv: Oh I haven't even hit that yet.
[16:44:50] slayerjain: has joined #ruby
[16:45:03] shevy: words may have different meanings in different context or programming languages
[16:45:14] shevy: haskell has a lot of vocabulary that I don't grok
[16:45:23] cndiv: So far even basic OO programming things I'm making flashcards. It's basic but I'll get there.
[16:45:36] cndiv: I was just surprised I got *what* it does faster that *what it's called*
[16:46:10] Rurik: has joined #ruby
[16:46:10] Rurik: has joined #ruby
[16:46:36] slayerjain: has joined #ruby
[16:48:33] webguynow: has joined #ruby
[16:48:56] slayerjain: has joined #ruby
[16:49:41] nfisher: has joined #ruby
[16:51:46] workmad3: has joined #ruby
[16:55:59] UtkarshRay: has joined #ruby
[16:57:04] shevy: there are also many different definitions of OOP and what should belong into it
[16:57:16] shevy: like python way of explicit self versus ruby way of implicit self
[16:57:33] gurnoorinder1: has joined #ruby
[16:57:42] shmilan: has joined #ruby
[16:58:20] hydrozen: has joined #ruby
[16:59:52] nfisher: has joined #ruby
[17:01:19] poguez_: has joined #ruby
[17:03:04] apt-get_: has joined #ruby
[17:04:11] aswen: has joined #ruby
[17:06:18] workmad3: has joined #ruby
[17:06:57] rbennacer: has joined #ruby
[17:07:07] voltalio: has joined #ruby
[17:09:43] nfisher: has joined #ruby
[17:10:59] arup_r: Matz said "All String literals are immutable (frozen) on Ruby 3".
[17:11:38] shmilan: has joined #ruby
[17:12:04] krz: so far the best read on service objects http://brewhouse.io/blog/2014/04/30/gourmet-service-objects.html
[17:12:07] krz: :D thought id share
[17:12:11] arup_r: -> http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/70863
[17:12:13] krz: wrong channel
[17:12:46] [k-: for performance sake
[17:13:01] [k-: anyway, ruby is more pure as a result!
[17:14:42] rbennacer: has joined #ruby
[17:15:31] shevy: yeah for performance
[17:15:33] arup_r: [k-: "" will be frozen means.. lots of code will be broken which already wrote
[17:15:37] ruurd: has joined #ruby
[17:15:45] shevy: you will have a transition period with the magic comment
[17:16:23] shevy: I hope I can use the magic comment for the next 50 years to come :>
[17:16:23] arup_r: >> p %w(1 2).each_with_object("") { |a, ob| ob << a }
[17:16:24] ruboto: arup_r # => "12" ...check link for more (https://eval.in/436180)
[17:16:33] arup_r: this code wouldn't work anymore
[17:16:46] cbz: has joined #ruby
[17:16:48] shevy: you'd need the comment, then you have the old behaviour
[17:17:15] arup_r: shevy: means ?
[17:17:35] shevy: the comment will decide whether you will have the old behaviour
[17:17:44] shevy: if you have the comment then it will work as it was before
[17:17:56] shevy: I also think there is a commandline switch, perhaps also a compile time switch
[17:19:33] aswen: has joined #ruby
[17:19:41] [k-: obviously i would know the impact!
[17:20:28] shevy: dunno... I'd like to know what kind of performance gain that would yield
[17:21:00] [k-: apparently beneficial
[17:21:16] einarj: has joined #ruby
[17:21:20] Hanmac: has joined #ruby
[17:21:21] [k-: libobf uses frozen strings!
[17:22:30] Rurik: has joined #ruby
[17:22:49] xet7: has joined #ruby
[17:23:37] havenn: has joined #ruby
[17:26:41] slayerja_: has joined #ruby
[17:28:38] radgeRayden_: has joined #ruby
[17:28:45] voltalio: has joined #ruby
[17:28:46] _aeris_: has joined #ruby
[17:32:18] gurnoorinder: has joined #ruby
[17:33:53] benlieb: has joined #ruby
[17:34:42] chouhoulis: has joined #ruby
[17:34:50] Tuxero: has joined #ruby
[17:35:46] elperdut: has joined #ruby
[17:38:35] gregf: has joined #ruby
[17:38:43] tejasmanohar: has joined #ruby
[17:39:30] VeryBewitching: has joined #ruby
[17:40:18] ericjphillips: has joined #ruby
[17:40:27] platosha__: has joined #ruby
[17:46:03] einarj: has joined #ruby
[17:47:55] shazaum: has joined #ruby
[17:49:19] akstunt600: has joined #ruby
[17:50:10] workmad3: has joined #ruby
[17:55:01] soulcake: has joined #ruby
[17:55:08] v0n: has joined #ruby
[17:55:42] shevy: are you people happily coding this weekend
[17:56:44] Papierkorb: That, and I learned to hate webdev a little bit more :)
[17:58:34] sameerynho: has joined #ruby
[18:03:26] iamninja: has joined #ruby
[18:03:32] shevy: as long as you love ruby a little bit more at the same time!
[18:04:17] toretore: html can go suck a big fat stick
[18:05:42] pabs: has joined #ruby
[18:07:52] ledestin: has joined #ruby
[18:08:50] Hanmac: shevy: lets print a house: http://inhabitat.com/worlds-largest-delta-style-3d-printer-can-print-nearly-zero-cost-housing-out-of-mud/ ;P
[18:09:00] shevy: yeah that is a cool idea
[18:09:06] shevy: robots walking over the earth and making houses
[18:10:54] badbodh: has joined #ruby
[18:11:04] rippa: has joined #ruby
[18:13:32] Cache_Money: has joined #ruby
[18:13:43] aswen: has joined #ruby
[18:14:31] tacit7: has joined #ruby
[18:15:21] pontiki: has joined #ruby
[18:15:36] dagda1_: has joined #ruby
[18:15:53] flak: has joined #ruby
[18:21:07] ragingcake: has joined #ruby
[18:22:12] umgrosscol: has joined #ruby
[18:23:07] nfisher: has joined #ruby
[18:24:06] TTilus: ACTION is happily coding R
[18:24:23] ruurd: has joined #ruby
[18:26:34] Ox0dea: TTilus: NA is a boolean?
[18:27:13] Musashi007: has joined #ruby
[18:27:43] platzhirsch: has joined #ruby
[18:27:58] capin: toretore: what's wrong with html?
[18:28:37] skade: has joined #ruby
[18:31:13] swgillespie: has joined #ruby
[18:31:17] shevy: R makes fancy plots
[18:31:17] phutchins: has joined #ruby
[18:32:12] tno: has joined #ruby
[18:35:24] chouhoulis: has joined #ruby
[18:35:50] toretore: capin: nothing really, it's just what it's being used for
[18:36:08] toretore: it's a document format that's being used to make applications
[18:38:22] giuseppesolinas: has joined #ruby
[18:38:25] gurnoorinder: has joined #ruby
[18:38:43] moeabdol: in rspec3 using the before, after, and around hooks...what is the prefered syntax to be used with these hooks. For example :suite vs :all and :example vs :each
[18:39:03] swgillespie: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[18:39:20] umgrosscol: has joined #ruby
[18:40:58] capin: toretore: not sure what you mean, ...personally i always think of HTML as the skeleton of a document.
[18:43:15] futilegames: has joined #ruby
[18:44:41] dorei: has joined #ruby
[18:45:45] workmad3: has joined #ruby
[18:46:07] pontiki: moeabdol: all those modify the hooks, the "preferred syntax" is to use the appropriate one where you need to
[18:46:49] beauby: has joined #ruby
[18:47:28] moeabdol: pontiki: thanks :)
[18:50:36] freerobby: has joined #ruby
[18:52:18] bazbing80: has joined #ruby
[18:54:10] futilegames: has joined #ruby
[18:57:00] nfisher: has joined #ruby
[18:59:22] jamesaxl: has joined #ruby
[19:00:51] swgillespie: has joined #ruby
[19:03:01] phutchins: has joined #ruby
[19:04:00] Rurik: has joined #ruby
[19:06:22] krz: has joined #ruby
[19:06:28] allcentury: has joined #ruby
[19:06:51] nfisher: has joined #ruby
[19:10:31] cbz: has joined #ruby
[19:10:55] Rurik: has joined #ruby
[19:13:50] linuxboytoo: has joined #ruby
[19:14:53] kobain: has joined #ruby
[19:15:32] ckuhn: has joined #ruby
[19:15:56] sankaber: has joined #ruby
[19:16:25] youngbaks: has joined #ruby
[19:19:59] k3asd`: has joined #ruby
[19:20:58] rikkipitt: has joined #ruby
[19:21:17] varunwachaspati: has joined #ruby
[19:22:58] code1o6: has joined #ruby
[19:22:58] dagda1_: has joined #ruby
[19:23:05] Fire1o6: has joined #ruby
[19:23:07] nfisher: has joined #ruby
[19:23:24] varunwachaspati: has joined #ruby
[19:23:56] stamina: has joined #ruby
[19:25:25] ckuhn: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[19:25:56] dseitz: has joined #ruby
[19:27:31] futilegames: has joined #ruby
[19:30:36] Melpaws: has joined #ruby
[19:33:05] nfisher: has joined #ruby
[19:33:53] meatherly: has joined #ruby
[19:35:16] moeabdol: in rspec3 how to test if a real object receives a method call
[19:35:42] moeabdol: is it expect(my_object).to receive(:my_method).and_return(my_value)?
[19:35:57] moeabdol: and then call the actuall object
[19:36:10] psye: has joined #ruby
[19:36:14] chouhoulis: has joined #ruby
[19:36:26] Melpaws: has joined #ruby
[19:37:02] Ox0dea: moeabdol: It seems like you're looking for somebody to validate your ability to read.
[19:37:08] Ox0dea: Yes, you appear to be literate. Well done.
[19:37:31] code1o6: has joined #ruby
[19:37:33] Fire1o6: has joined #ruby
[19:38:24] moeabdol: Ox0dea: I'v been stumbling with this issue multiple times and I don't seem to understand it very well. I'm trying to make it very clear for others to identify my train of thought and maybe can help me with my understanding
[19:39:20] devbug: has joined #ruby
[19:39:43] banister: has joined #ruby
[19:41:18] bigmac: has joined #ruby
[19:41:38] rippa: has joined #ruby
[19:41:55] ericjphillips: has joined #ruby
[19:42:07] Melpaws: has joined #ruby
[19:42:13] queequeg1: has joined #ruby
[19:43:32] moeabdol: the problem is I get confused reading the documentation. some refer to using the above expectation with mocks and doubles, others use it with real objects
[19:44:05] tkiel: has joined #ruby
[19:44:41] moeabdol: I tried it with a real object and it succeeds; however, it doesn't seem to make the necessary internal changes to the object.
[19:47:07] dgutierrez1287: has joined #ruby
[19:47:17] postmodern: has joined #ruby
[19:48:07] fantazo: has joined #ruby
[19:50:15] wildlander: has joined #ruby
[19:51:19] kappy: has joined #ruby
[19:54:06] einarj: has joined #ruby
[19:55:12] tvw: has joined #ruby
[19:55:58] cbz: has joined #ruby
[19:57:39] Coldblackice: has joined #ruby
[20:01:09] saddad: has joined #ruby
[20:03:23] slayerjain: has joined #ruby
[20:05:55] ericjphillips: has joined #ruby
[20:05:57] gearnode: has joined #ruby
[20:09:47] vyorkin: has joined #ruby
[20:11:04] kadoppe: has joined #ruby
[20:13:07] umgrosscol: has joined #ruby
[20:13:21] howdoico1: has joined #ruby
[20:14:51] atzorvas: has joined #ruby
[20:15:26] ericjphillips: has joined #ruby
[20:15:52] drewvanstone: has joined #ruby
[20:16:48] fungal: has joined #ruby
[20:17:01] ramfjord: has joined #ruby
[20:17:05] naftilos76: has joined #ruby
[20:17:23] segfalt: has joined #ruby
[20:18:53] moeabdol1: has joined #ruby
[20:19:10] solocshaw: has joined #ruby
[20:29:51] freerobby: has joined #ruby
[20:30:04] bruno-: has joined #ruby
[20:31:32] gurnoorinder1: has joined #ruby
[20:32:15] banister: has joined #ruby
[20:33:11] minimalism: has joined #ruby
[20:33:53] workmad3: has joined #ruby
[20:34:18] tjohnson: has joined #ruby
[20:35:52] devoldmx: has joined #ruby
[20:36:00] banister: has joined #ruby
[20:36:38] solocshaw: has joined #ruby
[20:36:56] chouhoulis: has joined #ruby
[20:37:11] bigmac: has joined #ruby
[20:40:18] phaze: has joined #ruby
[20:42:16] freerobby: has joined #ruby
[20:43:43] phutchins: has joined #ruby
[20:45:02] einarj: has joined #ruby
[20:45:12] Kallis: has joined #ruby
[20:45:31] CrazyEddy: has joined #ruby
[20:45:46] CrazyEddy: has joined #ruby
[20:45:52] malconis: has joined #ruby
[20:46:47] Kallis: has joined #ruby
[20:48:53] tubbo: has joined #ruby
[20:49:11] Musashi007: has joined #ruby
[20:51:25] shevy: perhaps one of you has a simple idea. I have an array that looks like this:
[20:51:26] shevy: array = ["320107_foo.tar.xz", "330065_bar"]
[20:51:58] shevy: it can have more entries; I need to put all archives (most of the time they contain ".tar" but also ".gz") on the last position rather than the first
[20:53:21] yfeldblum: has joined #ruby
[20:54:05] shevy: hmm seems .sort_by ... I Never remember when to return 1 or -1
[21:00:09] SCHAAP137: has joined #ruby
[21:00:09] SCHAAP137: has joined #ruby
[21:00:30] dorei: let's say i have two or more classes that define an xxx method, some of these #xxx has an arity of 0 while some other an arity of 1, and i want to call this run from somewhere else, should i check the arity and call it in the proper way or should i change the def for those that have arity 0 into something like def xxx(_) and call everything the same way?
[21:01:03] Ox0dea: shevy: https://github.com/ruby/ruby/commit/ca5c908
[21:01:08] gurnoorinder1: has left #ruby: ()
[21:02:33] shevy: I can return 42 and -1 ?
[21:04:16] Ox0dea: >> (1..10).sort_by { rand -50..50 }
[21:04:17] ruboto: Ox0dea # => [10, 6, 9, 2, 5, 8, 3, 1, 4, 7] (https://eval.in/436231)
[21:05:09] jcdesimp: has joined #ruby
[21:05:25] Ox0dea: dorei: The former is more intention-revealing, but the latter would definitely lead to a cleaner implementation.
[21:05:29] romain_t: has joined #ruby
[21:05:47] Ox0dea: Then again, how come you've got methods with the same name and different arities?
[21:06:03] Ox0dea: shevy: What point in restricting it to -1, 0, and 1?
[21:06:19] rickmasta: has joined #ruby
[21:06:43] solocshaw: has joined #ruby
[21:07:55] Ox0dea: For what it's worth, it's #sort that does this checking the sign of the yielded value, not #sort_by.
[21:08:36] Ox0dea: I meant to use #sort in the 1..10 example.
[21:09:09] Pupeno: has joined #ruby
[21:09:42] baweaver: has joined #ruby
[21:09:43] JohnBat26: has joined #ruby
[21:10:12] Ox0dea: In any case, why do you want the archives at the back? There's innocent files trapped in those that need to be extracted ASAP.
[21:10:13] chipotle: has joined #ruby
[21:10:25] EminenceHC: has joined #ruby
[21:10:59] Ox0dea: How do I liberate all the archived files on my system?
[21:11:02] AlexRussia: has joined #ruby
[21:11:30] pipework: postmodern: Hey, do you happen to know how I'd use ruby-install to properly install jruby with truffle? Perhaps in a way that wouldn't just coexist in the jruby known ruby?
[21:11:49] platosha_: has joined #ruby
[21:11:51] sdothum: has joined #ruby
[21:11:53] pipework: I'm not sure if chrisseaton is all that familiar with ruby-install though.
[21:12:06] workmad3: has joined #ruby
[21:12:40] postmodern: pipework, for jruby it just installs the dependencies and unpacks the jruby tar file
[21:13:12] postmodern: second time someone's requested alternate dependencies for jruby, might have to add an option for which JVM you want
[21:13:26] pipework: postmodern: Hm, so if I pass a mirror with -M to the truffle download, it ought to work?
[21:13:29] pipework: I'll give it go.
[21:14:32] postmodern: pipework, it would appear so? https://github.com/jruby/jruby/wiki/Truffle#nightly-builds
[21:15:06] pipework: postmodern: Hm, I just ran the ruby-install equivalent. ruby-install -M http://lafo.ssw.uni-linz.ac.at/graalvm/jruby-dist-master+graal-macosx-x86_64-bin.tar.gz jruby
[21:15:18] postmodern: pipework, generally for experimental things I just install them manually into /opt/ or ~/.rubies/
[21:15:31] pipework: Then the test after getting a new shell and chruby switching to jruby, and it fails with an unknown option.
[21:15:38] pipework: -X doesn't show truffle stuff.
[21:15:53] pipework: postmodern: I'll give the manual install a go.
[21:16:03] postmodern: pipework, -M is for a base URI, not a fully qualified URI
[21:16:04] karapetyan: has joined #ruby
[21:16:09] pipework: postmodern: Oh.
[21:17:02] postmodern: pipework, correct
[21:17:43] Pupeno: has joined #ruby
[21:17:45] postmodern: otherwise it defaults to $ruby_mirror/$ruby_version/$ruby_archive
[21:18:02] postmodern: where ruby_archive is jruby-bin-$ruby_version.tar.gz
[21:18:59] marr: has joined #ruby
[21:19:04] nfisher: has joined #ruby
[21:19:46] allcentury: has joined #ruby
[21:20:19] rickmasta: has joined #ruby
[21:22:44] pipework: postmodern: Ah, very cool. It all works splendidly with manually installing. Miaow I just want to figure out how to get chruby to recognize the truffle version as jruby-truffle rather than plain jruby, which I use.
[21:23:12] Kallis: has joined #ruby
[21:23:29] postmodern: pipework, just extract into the appropriately named directory and chruby will use the dir name
[21:24:19] Kallis: has joined #ruby
[21:24:36] pipework: postmodern: Oh that's pretty sweet
[21:24:38] badbodh: has joined #ruby
[21:24:39] pipework: Thank you, sir.
[21:25:08] rakm: has joined #ruby
[21:28:54] cbz: has joined #ruby
[21:28:54] cbz: has joined #ruby
[21:29:26] solocshaw: has joined #ruby
[21:29:38] BTRE: has joined #ruby
[21:30:06] Cust0sLimen: I'm trying to get mod passanger working under apache - but I keep getting No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive
[21:31:12] pipework: Cust0sLimen: Ask FooBarWidget in #RubyOnRails
[21:31:32] dreadnought8971: has joined #ruby
[21:34:03] jason_rad: has joined #ruby
[21:34:27] jason_rad: Would someone tell me why this isn't working.. http://pastie.org/private/yvcxkw1zh4iexq0ima1zq
[21:34:49] hydrozen: has joined #ruby
[21:37:43] chouhoulis: has joined #ruby
[21:38:03] newtonianb: has joined #ruby
[21:38:06] jgt: has joined #ruby
[21:39:29] Guest53916: has joined #ruby
[21:41:34] tubuliferous_: has joined #ruby
[21:42:21] workmad3: has joined #ruby
[21:42:29] Kallis: has joined #ruby
[21:48:06] dagda1_: has joined #ruby
[21:48:15] sepp2k: has joined #ruby
[21:50:42] Melpaws: has joined #ruby
[21:50:44] hydrozen: has joined #ruby
[21:50:57] vikaton: has joined #ruby
[21:51:21] Kallis: has joined #ruby
[21:54:17] skade: has joined #ruby
[21:56:54] cornerma1: has joined #ruby
[21:58:58] blackjid: has joined #ruby
[22:00:46] dagda1: has joined #ruby
[22:01:16] decoponio: has joined #ruby
[22:03:54] BTRE: has joined #ruby
[22:05:35] Beoran_: has joined #ruby
[22:06:24] hays_: has joined #ruby
[22:07:22] nofxx: has joined #ruby
[22:07:22] nofxx: has joined #ruby
[22:08:22] CrazyEddy: has joined #ruby
[22:08:24] allcentury: has joined #ruby
[22:10:05] ngscheurich: has joined #ruby
[22:12:50] phutchins: has joined #ruby
[22:13:22] mistermocha: has joined #ruby
[22:14:12] ragingcake: has joined #ruby
[22:14:18] solocshaw: has joined #ruby
[22:14:46] solocshaw: has joined #ruby
[22:16:06] Rurik: has joined #ruby
[22:17:13] ruby-lang490: has joined #ruby
[22:19:15] michaeldeol: has joined #ruby
[22:19:35] nfisher: has joined #ruby
[22:21:22] dorei: when i feel bored, i browse ruby's bug tracker :D
[22:23:03] Kallis: has joined #ruby
[22:23:54] shinnya: has joined #ruby
[22:24:16] Ox0dea: dorei: So how do you feel about that "safe navigation" operator?
[22:24:24] ramfjord: has joined #ruby
[22:25:02] shevy: dorei hehe
[22:25:09] shevy: I found browsing the bug tracker is too much work
[22:25:13] shevy: but I look at the changelog
[22:25:19] Ox0dea: #try is really common and pretty useful, but .? looks a little wonky.
[22:25:26] workmad3: has joined #ruby
[22:25:27] Ox0dea: It's what other languages use, though. :/
[22:25:37] shevy: goto is also used in other languages!
[22:25:50] bigmac: has joined #ruby
[22:26:19] pontiki: has joined #ruby
[22:26:55] hectortrope: has joined #ruby
[22:27:49] eGGsha: has joined #ruby
[22:28:09] Ox0dea: Relevant: http://patshaughnessy.net/2012/2/29/the-joke-is-on-us-how-ruby-1-9-supports-the-goto-statement
[22:28:39] dorei: Ox0dea: that's what i was reading, safe navigation operator and now check all the other "bugs" it references :)
[22:28:57] dorei: let me read why #try was rejected
[22:30:08] Ox0dea: The greatest exception message ever: https://github.com/ruby/ruby/blob/trunk/eval.c#L455
[22:30:45] shevy: #try was banned?
[22:30:56] dorei: ah, no reason
[22:31:01] Ox0dea: Just not (yet) accepted into core.
[22:31:06] wannalearn: has joined #ruby
[22:31:11] dorei: shevy: https://bugs.ruby-lang.org/issues/1122
[22:31:38] SCHAAP137: has joined #ruby
[22:31:38] SCHAAP137: has joined #ruby
[22:31:49] solocshaw: has joined #ruby
[22:32:22] shevy: yeah so no #try
[22:33:30] wannalearn: hi, I'm stuck on how to call an instance method within another instance method :(
[22:33:32] wannalearn: http://fpaste.org/269319/14427019/
[22:33:37] akkad: has joined #ruby
[22:33:41] wannalearn: is that even possible?
[22:34:01] Ox0dea: wannalearn: Yes, but it's not what you want in this case.
[22:34:08] Ox0dea: #roll should be a class method.
[22:34:18] dorei: >> ?????:??
[22:34:19] ruboto: dorei # => /tmp/execpad-d38dcb4dc5f2/source-d38dcb4dc5f2:2: warning: string literal in condition ...check link for more (https://eval.in/436234)
[22:34:34] Ox0dea: wannalearn: Erm, no, never mind. Just nix the `self.` in your invocation of #roll.
[22:34:47] Ox0dea: That tries to call `DiceSet.roll`, which doesn't exist.
[22:34:59] Ox0dea: You want to invoke the #roll instance method of this particular DiceSet instance.
[22:35:02] wannalearn: Ox0dea: it won't have access to dice variable though
[22:35:12] wannalearn: I give it a go
[22:36:02] Ox0dea: wannalearn: This is from the Koans, right?
[22:36:21] wannalearn: Ox0dea: yep, call DiceSet.roll within values failed to reference the dice var
[22:36:23] Ox0dea: Doesn't the DiceSet initializer take the number of dice to roll?
[22:36:25] deject3d: has joined #ruby
[22:36:28] wannalearn: Ox0dea: yes, on Koans
[22:36:49] wannalearn: Ox0dea: nope, it set when you call the roll method
[22:38:30] chouhoulis: has joined #ruby
[22:38:54] dorei: i wonder which is better, read about a design pattern and then use it or observe it emerging in code i write and later realise that it has a name?
[22:40:09] pipework: dorei: I'm not sure. But if you find at the end of the day that your code could convey usage, intent, and design through a shared pattern, then I call that a win.
[22:41:02] Ox0dea: wannalearn: https://eval.in/436235
[22:41:26] pontiki: patterns are generally recognized, not invented. either way, knowing about a pattern ahead of time *or* seeing one emerge from your code i'd call a win
[22:41:32] ramfjord: has joined #ruby
[22:42:37] Ox0dea: wannalearn: You've learned about instance variables, yes?
[22:42:38] shevy: I see the pontiki pattern
[22:42:51] drewvanstone: has joined #ruby
[22:43:03] pontiki: i have patterns
[22:43:32] wannalearn: Ox0dea: yes. I've read it looking for solution to this. :)
[22:43:49] Ox0dea: wannalearn: Well, that's how state gets stored on instances, such that you can share it between methods.
[22:44:18] bronson: has joined #ruby
[22:44:36] ruurd: has joined #ruby
[22:45:40] wannalearn: Ox0dea: thanks, I learnt something new. :)
[22:46:37] Ox0dea: wannalearn: That the #values method should keep returning the same thing until another call to #roll means it's got to have a memory.
[22:47:10] Ox0dea: Your implementation of #values would re-roll the dice, which gave your DiceSet amnesia.
[22:48:14] solocshaw: has joined #ruby
[22:48:17] platzhirsch: Do you think rolling database schema can be misunderstood?
[22:48:22] dorei: >> x = {a: 1, b: 2}; y = {c:3, d: 4}; {**x, **y}
[22:48:23] ruboto: dorei # => {:a=>1, :b=>2, :c=>3, :d=>4} (https://eval.in/436236)
[22:48:38] dorei: where can i find more info about this usage of ** ?
[22:49:36] Ox0dea: dorei: "hash splat"
[22:49:53] mistermocha: has joined #ruby
[22:51:30] dorei: oh, so it can be used outside def keyword arguments, right?
[22:52:27] michael_mbp: has joined #ruby
[22:53:39] bigmac: has joined #ruby
[22:53:40] pipework: It isn't the exact same thing, though they're simliar in behaviour some of the times.
[22:53:51] Ox0dea: dorei: https://eval.in/436237
[22:54:00] dorei: is it documented somewhere in ruby-doc ?
[22:54:06] Ox0dea: Just as * invokes an object's #to_a method, ** invokes #to_hash.
[22:54:22] Ox0dea: An unfortunate incongruity, in my opinion.
[22:54:37] dorei: to_hash? not to_h ?
[22:54:39] Ox0dea: Right. :(
[22:55:30] workmad3: has joined #ruby
[22:59:13] nfisher: has joined #ruby
[23:00:57] platosha_: has joined #ruby
[23:04:52] Ox0dea: I can't even find where ** gets parsed as a unary operator. :<
[23:06:02] Ox0dea: Oh. It's because they recycled the tPOW token.
[23:06:28] Ox0dea: Never mind; it's called tDSTAR.
[23:08:25] Ox0dea: https://github.com/jicksta/superators could be so much crazier today.
[23:08:56] Scripore: has joined #ruby
[23:09:48] saddad: has joined #ruby
[23:10:19] devoldmx: has joined #ruby
[23:10:33] brendan-: has joined #ruby
[23:11:22] workmad3: has joined #ruby
[23:11:41] hydrozen: has joined #ruby
[23:13:57] Oka: has joined #ruby
[23:14:46] allcentury: has joined #ruby
[23:25:13] segmond: has joined #ruby
[23:26:51] Pupeno: has joined #ruby
[23:27:01] Technodrome: has joined #ruby
[23:27:16] Technodrome: i have a good ruby question
[23:28:09] Technodrome: the gem mechanize, when i assign a = new Mechanize , i got an object
[23:28:22] Ox0dea: Sounds about right.
[23:28:29] apeiros: Technodrome: sounds like javascript
[23:28:35] Technodrome: when i do a = b , b being that object , i get a different instance
[23:28:36] apeiros: it's a = Mechanize.new, not a = new Mechanize
[23:28:52] Ox0dea: Technodrome: I bet you don't.
[23:28:58] apeiros: and no, a = b tells a to reference the same object as b references.
[23:29:00] Technodrome: #<Mechanize:0x007fb2b626a5f0>
[23:29:01] Technodrome: #<Mechanize::Page:0x007fb2b62c2c78>
[23:29:09] Ox0dea: Technodrome: Post code?
[23:29:17] Ox0dea: Objects are not allowed to impose their wills upon Ruby's assignment semantics.
[23:29:29] apeiros: >> a = "hello"; b = a; b.upcase!; a
[23:29:30] ruboto: apeiros # => "HELLO" (https://eval.in/436238)
[23:29:38] Technodrome: a = Mechanize.new
[23:29:39] Technodrome: b = a.get("someurl")
[23:29:44] Ox0dea: This guy.
[23:29:52] Technodrome: its only 4 lines
[23:29:52] Ox0dea: Technodrome: You realize that's not `a = b`, I trust?
[23:30:17] apeiros: it's not that either
[23:30:20] Technodrome: still how is it a different object?
[23:30:28] apeiros: `b = a` != `b = a.some_method_call`
[23:31:03] Technodrome: ah , i???m dumb .get has a return
[23:31:03] apeiros: b = a.some_method_call assigns the return value of said method call to b. that return value may still be the object `a` references, but most likely it's not.
[23:31:16] Technodrome: sorry, being dumb
[23:32:08] phutchins: has joined #ruby
[23:34:09] Scripore: has joined #ruby
[23:34:15] Technodrome: .get changes the actual instance though, i wished it just had a return intead of doing that
[23:35:25] Rurik: has joined #ruby
[23:37:39] fedexo: has joined #ruby
[23:39:10] bkxd: has joined #ruby
[23:39:14] chouhoulis: has joined #ruby
[23:39:15] nfisher: has joined #ruby
[23:39:20] pontiki: you may have the wrong idea about what the Mechanize instance is doing
[23:39:28] pontiki: consider it a browser
[23:40:13] pontiki: as you navigate through the website, the content changes
[23:40:21] pontiki: the mechanize agent is managing that
[23:40:47] dgutierrez1287: has joined #ruby
[23:48:57] Chau: has joined #ruby
[23:48:59] tkiel: has joined #ruby
[23:49:05] nfisher: has joined #ruby
[23:50:21] HAL2328: has joined #ruby
[23:52:29] cbz: has joined #ruby
[23:52:40] iamninja: has joined #ruby
[23:52:42] vdamewood: has joined #ruby
[23:53:35] frmendes: has joined #ruby
[23:53:48] karapetyan: has joined #ruby
[23:55:38] Scripore: has joined #ruby
[23:58:55] nfisher: has joined #ruby