chills42 has quit [Remote host closed the connection]
eminencehc has quit [Remote host closed the connection]
<Ox0dea>
Andrey: You would do well to consider the possibility that you have little benevolent demons running around in your base fixing your bugs.
<Andrey>
yeah, they are all congregating at #ruby :)
bronson has joined #ruby
<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.
baweaver has quit [Ping timeout: 272 seconds]
<Andrey>
Ox0dea - good call. Removing the space did not reproduce the error, the program is still running... :(
DLSteve has joined #ruby
Newtonianb has quit [Ping timeout: 265 seconds]
<Andrey>
Could it be Sublime Text issue?
<Ox0dea>
If you've misconfigured it, I suppose it could've eaten the last line of the file or something.
<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.
<Andrey>
I'm running stock, just added Soda_Light theme
shmilan has joined #ruby
ddv has quit [Ping timeout: 250 seconds]
<Andrey>
Anyway I can share a screenshot like gist (without account)?
nfisher has joined #ruby
chills42 has joined #ruby
freezevee has quit [Remote host closed the connection]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<nietzschette>
hey anyone with experience using ruby with msys?
<deject3d>
what is msys
<nietzschette>
linux build environment for windows
<zenspider>
now you have two problems?
<nietzschette>
I just got a computer with a fancy new windows and I haven't used windows in a while
<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
<nietzschette>
also, irb doesn't give me a prompt
<deject3d>
zenspider kek
<nietzschette>
I have so many problems I lost count! :p
<zenspider>
you just have one problem
<nietzschette>
i'm a tool?\
cb_ has quit [Remote host closed the connection]
HAL2328 has quit [Quit: Leaving]
solocshaw1 has joined #ruby
solocshaw has quit [Read error: Connection reset by peer]
<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?
<RickHull>
i.e. N = number of intervals. can interval membership be determined in less than O(N) ?
baweaver has joined #ruby
<RickHull>
the context is, making histograms with bins
<RickHull>
If I choose the intervals carefully, i can do rounding math to determine bin membership
<deject3d>
do your own hw
<RickHull>
hw?
<RickHull>
now I'd like to choose the intervals by some other method rather than carefully in accordance with rounding rules
<RickHull>
and i'm wondering if interval membership must be O(n)
<RickHull>
imagine 20 intervals, systematically sized, between 0-100
<RickHull>
not necessarily uniformly sized
<RickHull>
but describable through math
<RickHull>
for example, logarithmic. the first interval is much smaller than the last, on perhaps a log10 scale
<baweaver>
deject3d: be nice
<RickHull>
oh, homework :)
<FrankD>
hey does anyone have an example of using TarWriter to recursively tar a directory?
<RickHull>
i'm 35 years old. I suppose this might actually be homework :)
<RickHull>
however, I'm not at home (yet)
Newtonianb has joined #ruby
<baweaver>
just got home myself, so not quite up for thinking quite yet
mjuszczak has quit []
<RickHull>
here's what makes me think there is a better than O(n) way for arbitrary intervals
webguynow has quit [Ping timeout: 244 seconds]
<RickHull>
If I "know" the intervals, and I know there are no gaps or overlaps
<RickHull>
my human brain can instantly place any given value in an interval
<RickHull>
without considering the first interval and doing comparison arithmetic
<RickHull>
i.e. my human brain does not need to iterate over all the intervals
webguynow has joined #ruby
<RickHull>
this is similar to grepping over a huge log file for sequential time intervals
<RickHull>
you should not grep the entire log, if you've already processed the first parts
<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
dima_ has joined #ruby
<RickHull>
and particularly if you are looking for 2pm, 3pm, 4pm activity in sequence
<RickHull>
you should not grep the entire log in each case
<RickHull>
does this sort of optimization problem ring any bells?
<RickHull>
framing it this way, binary search comes to mind
nfisher has quit [Ping timeout: 260 seconds]
howdoico1 has quit [Ping timeout: 240 seconds]
cantaberry has joined #ruby
[k- has joined #ruby
tejasmanohar has quit [Quit: tejasmanohar]
davispuh has quit [Remote host closed the connection]
nfisher has joined #ruby
phutchins has joined #ruby
UtkarshRay has quit [Remote host closed the connection]
Ox0dea has joined #ruby
<Ox0dea>
RickHull: I think you just want "next power of x", no?
iamninja has joined #ruby
shmilan has quit [Ping timeout: 240 seconds]
arup_r has joined #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Cache_Money has joined #ruby
joufflu has joined #ruby
nfisher has quit [Ping timeout: 260 seconds]
karapetyan has quit [Remote host closed the connection]
<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?
jgt has quit [Ping timeout: 246 seconds]
<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.
rushed has joined #ruby
<beginner_with_qu>
<_<
<RickHull>
Ox0dea: that's basically the current approach
<beginner_with_qu>
Oh hey Ox0dea is back. :D
dionysus69 has joined #ruby
<Ox0dea>
beginner_with_qu: `bar while foo` is just another way to write `while foo; bar; end`.
<Ox0dea>
Feel free to rewrite it the latter way if you feel that helps with legibility.
<beginner_with_qu>
Oh sweet
<Ox0dea>
But please don't use single-line `do/end`.
<beginner_with_qu>
Actually I just wanted to be able to replicate this elsewhere confidently
<RickHull>
Ox0dea: note that I am pre-deciding the bin sizes for base10
<beginner_with_qu>
And I know, the single line do end was a test making sure your earlier tid bit was correctly understood
<RickHull>
this thing expects millisecond integer latencies on STDIN
<beginner_with_qu>
I'm glad to say it was, and intend to do away with do end primarily >_>;
<Ox0dea>
RickHull: So you're just binning based on magnitude?
<Ox0dea>
You made it seem like the thing needed to be much more dynamic than that.
<RickHull>
that's the idea
<RickHull>
today the bins are static, base10 yada yada
<RickHull>
i want to instead take the log10 of the latency, and put into bins from 0-4
<RickHull>
(rather than 0-10000)
howdoico1 has joined #ruby
<RickHull>
but subdivide the bins
<Ox0dea>
Still magnitude.
<RickHull>
i.e. 0-0.2 0.2-0.4
<Ox0dea>
Oh, I see.
<RickHull>
so the bins will be systematically but not uniformly sized
<RickHull>
and i would like to change the system
<Ox0dea>
Those are uniform, though.
<RickHull>
but still have the bin assignments work
<RickHull>
er, right
UtkarshRay has joined #ruby
<RickHull>
but i will display them non-log
<RickHull>
i.e. no user cares about log(latency)
<RickHull>
or which bin log(latency) goes into
webguynow has quit [Ping timeout: 246 seconds]
<RickHull>
so I will display the bin sizes in terms of actual latency, which will make them systematically (but not uniformly) sized
webguynow has joined #ruby
<Ox0dea>
RickHull: Well, just note that Math.log can be supplied with two arguments.
yosafbridge has quit [Quit: Leaving]
sunaku has joined #ruby
sunaku has left #ruby [#ruby]
<RickHull>
yes, for sure. using it already. i only care about base 10
<RickHull>
so using Math.log10
nfisher has joined #ruby
v0n has quit [Quit: WeeChat 1.0.1]
<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
Cache_Money has quit [Quit: Cache_Money]
<RickHull>
the current approach does the above, more or less exactly
<RickHull>
big discontinuity from 100-200 ms
theone01 has joined #ruby
<RickHull>
i.e. the 200ms bucket has 10x the samples of the 100ms bucket
Rickmasta has joined #ruby
<RickHull>
the 200ms bin covers 100ms-200ms the 100ms bin covers 90ms-100ms
shmilan has joined #ruby
<RickHull>
If i choose a logarithmic scale, rather than my static thing, then the intervals increase regularly and continuously
<RickHull>
e.g. first interval 0-5ms, 10th interval 80ms-100ms
<RickHull>
something like that
<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.
<Ox0dea>
Irrespective of the number of lines the block spans, mind.
theone01 has quit [Client Quit]
urbanmonk has quit [Quit: urbanmonk]
<beginner_with_qu>
I didnt know that
<beginner_with_qu>
Probably makes sense
theone01 has joined #ruby
solocshaw1 has joined #ruby
solocshaw has quit [Read error: Connection reset by peer]
solocshaw1 is now known as solocshaw
<beginner_with_qu>
#each do end combinations being replicated all the time
<beginner_with_qu>
This channel is responsible for most of my more detailed understanding.
solocshaw1 has joined #ruby
<beginner_with_qu>
Which, admittedly is pretty sparse. But I know more everyday
arup_r has quit [Ping timeout: 250 seconds]
webguynow has joined #ruby
howdoico1 has quit [Ping timeout: 264 seconds]
<Ox0dea>
RickHull: I'm trying to jog my memory for the really good term for this that I know is in there somewhere.
<RickHull>
heh, that's what i'm banking on
<Ox0dea>
It's not quite a "sliding window".
<RickHull>
i feel like there is a good way for determining interval membership
<Ox0dea>
Better than O(n) can certainly be had.
<RickHull>
without considering each "N" interval
<RickHull>
non-overlapping and non-gapping is crucial, i am sure
<RickHull>
and i don't know how that codifies
solocshaw has quit [Ping timeout: 240 seconds]
solocshaw1 is now known as solocshaw
kkeuning has joined #ruby
<RickHull>
and again, i think it is analagous to the problem of splitting out hours of a huge log file using grep
<Ox0dea>
It's the same arithmetic as is used for creating non-uniform gradients.
<RickHull>
the naive approach greps the entire file for each hour
badbodh has joined #ruby
hadrig has joined #ruby
kkeuning has quit [Max SendQ exceeded]
kkeuning has joined #ruby
VeryBewitching has quit [Quit: Konversation terminated!]
kkeuning has quit [Max SendQ exceeded]
HAL2328 has quit [Quit: Leaving]
kkeuning has joined #ruby
<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?
<RickHull>
the naive O(n) approach considers each interval in turn and makes comparisons
<RickHull>
binary search can improve on this
<beginner_with_qu>
If that's not clear, I guess the question is... how basic is the shorthand?
<beginner_with_qu>
I dont mean to offer any distraction RickHull :)
<RickHull>
if you know the intervals are increasing, without gaps or overlaps, you can just choose two (random) intervals
<RickHull>
beginner_with_qu: no worries, we can multiplex at will :)
<RickHull>
and decide if the value is between them or outside them
Cache_Money has joined #ruby
<RickHull>
and proceed from there. or start with the lowest and highest intervals and go from there
<Ox0dea>
RickHull: You essentially just need to define "round" in terms of your bins.
hadrig has quit [Read error: Connection reset by peer]
<RickHull>
yeah, i think so
<RickHull>
just normalize to something like scientific notation
kkeuning has quit [Client Quit]
<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
<Ox0dea>
beginner_with_qu: Shorthand?
hadrig has joined #ruby
<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.
<RickHull>
my best advice, and this applies to nearly any endeavor, is to attempt to adhere to the strict set of rules at first
<RickHull>
and only once you've developed a sense of what the rules provide
<beginner_with_qu>
Fairenough.
arup_r has joined #ruby
<RickHull>
do you start to break them
<RickHull>
so your starting defaults should be: extra explicit. add those parens
poguez_ has quit [Quit: Connection closed for inactivity]
<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
webguynow has quit [Ping timeout: 246 seconds]
webguynow has joined #ruby
<RickHull>
to this day, within a class and instance methods, I always use explicit self
<RickHull>
and usually parens on methods
<beginner_with_qu>
lol fair
<RickHull>
this goes against some guidelines
ledestin has quit [Ping timeout: 250 seconds]
<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
<RickHull>
explicit >>>>>>> implicit
<RickHull>
IMHO
<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
hadrig has quit [Read error: Connection reset by peer]
psmolen has quit [Ping timeout: 250 seconds]
<beginner_with_qu>
Like I had no idea each_with_index was a thing
<beginner_with_qu>
>_> which alone probably wouldve kept me from coming into this room at all, had I realized. xD
shmilan has quit [Ping timeout: 240 seconds]
<RickHull>
eh, no big deal
<RickHull>
that sort of thing comes with time
<beginner_with_qu>
Its not, but the questions certainly help me understand more of the code as written here.
<RickHull>
i agree that the ambiguity between methods and variables can be a source of confusion
<RickHull>
and I want to minimize those
hadrig has joined #ruby
rcvalle has quit [Quit: rcvalle]
<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 >_>
psk17_ has joined #ruby
<RickHull>
you're in the right place. this is where understanding happens :)
<beginner_with_qu>
I
<beginner_with_qu>
I'll get back to work ^_^ Thanks for the help
<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
Cache_Money has quit [Quit: Cache_Money]
<RickHull>
small enough to understand, but big enough to stand on its own as a gem
hadrig has quit [Read error: Connection reset by peer]
<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
hadrig has joined #ruby
ruurd has joined #ruby
<beginner_with_qu>
Next step it Hash
<beginner_with_qu>
is*
hadrig has quit [Client Quit]
devoldmx_ has joined #ruby
Coldblackice has quit [Ping timeout: 264 seconds]
<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
devoldmx has quit [Read error: Connection reset by peer]
<beginner_with_qu>
You can get a password made up of arrow keys?
<beginner_with_qu>
I read through chapter... 8 or 9? from the website so far
<RickHull>
cool, you have a good foundation then
cantaberry has joined #ruby
<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.
yfeldblum has joined #ruby
khebbie has quit [Ping timeout: 268 seconds]
ledestin has joined #ruby
<RickHull>
for me, the best way to learn is to dive into the deep end
<RickHull>
and then read the instructions for not drowning
<beginner_with_qu>
Heh. I'm being very systematic about this. I dont want to get into bad habits.
<beginner_with_qu>
I figure thats the worst thing I could do, is train from the getgo wrong.
<RickHull>
it's a good approach. however, you almost certainly lack the judgment to decide good / bad habits, outside of your general engineering expertise
[k- has quit [Quit: -a- IRC for Android 2.1.23]
<RickHull>
that said, I applaud the cautious approach
devyn has quit [Ping timeout: 260 seconds]
<beginner_with_qu>
RickHull, :) thats why I'm also here
<beginner_with_qu>
xD
<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.
<beginner_with_qu>
So, once that is done, and I'm in. caution is "to the wind"
maniac has joined #ruby
<RickHull>
cool -- though I would say (and this betrays my own perpective)
CanTonic has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<RickHull>
you will be much better served to do the right thing in the med/long term, rather than respond to short-term incentives
AccordLTN has joined #ruby
<RickHull>
but short-term necessities are what they are
<RickHull>
and opportunities particularly are fleeting
<RickHull>
so yeah, you're on the right track
Feyn has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
cb_ has quit [Read error: Connection reset by peer]
cb__ has joined #ruby
cb__ has joined #ruby
houhoulis has quit [Remote host closed the connection]
<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
<RickHull>
so it's great to have that perspective from the get-go
<RickHull>
and it's good engineering practice to defend against shitty practices (which are far too prevalent in the "production" world that I know)
maniac has quit [Quit: Leaving.]
<RickHull>
cheers yall
RickHull has left #ruby [#ruby]
rippa has joined #ruby
badbodh has quit [Remote host closed the connection]
<Ox0dea>
beginner_with_qu: Are you familiar with FizzBuzz? ;)
<beginner_with_qu>
Nope
devyn has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
BTRE has quit [Ping timeout: 240 seconds]
<beginner_with_qu>
Oh fun
<beginner_with_qu>
google provides
<Ox0dea>
It is known.
shinnya has joined #ruby
bruno- has joined #ruby
charliesome has joined #ruby
Cache_Money has joined #ruby
<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
<beginner_with_qu>
I dont even know where to begin to understand that xD
<baweaver>
read that above
espreto has left #ruby [#ruby]
<Ox0dea>
beginner_with_qu: baweaver has you covered on that front.
<baweaver>
I too was wtf'ing once upon a time
<Ox0dea>
(We're being slightly evil.)
<baweaver>
but now I see method to the madness
<baweaver>
this is truly how real ruby is written
<baweaver>
</snarky>
<beginner_with_qu>
lol
<beginner_with_qu>
Thats pretty intense
BTRE has joined #ruby
slayerjain has quit [Client Quit]
<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
drewvanstone has quit [Ping timeout: 264 seconds]
<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
mistermocha has quit [Remote host closed the connection]
<beginner_with_qu>
It might be better if I looked now, as opposed to four hours into ruby 0.0
<beginner_with_qu>
but lol
<beginner_with_qu>
^_^
<Ox0dea>
beginner_with_qu: Ruby 0.49 is the earliest available version.
pawnbox has quit [Ping timeout: 252 seconds]
<beginner_with_qu>
that wasnt a version reference, that was a chapter
<beginner_with_qu>
like... page 1. What is Ruby? How to print "hello world" to screen
<beginner_with_qu>
xD
<Ox0dea>
beginner_with_qu: And you're already mucking with deranged sequences. :)
<beginner_with_qu>
lol yup.
<beginner_with_qu>
I do love this stuff. I havent been sleeping much however
<Ox0dea>
Coffee is an effective substitute until it isn't.
<beginner_with_qu>
I wish I had found it when I was in highschool. I probably wouldve had so much more fun.
<beginner_with_qu>
I dont drink coffee
nfisher has quit [Ping timeout: 264 seconds]
<beginner_with_qu>
<_< I just choose to be awake or asleep, until I cant
grenierm has quit [Quit: grenierm]
<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.
<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.
meatherly has quit []
krz has joined #ruby
rushed has quit [Quit: rushed]
gurnoorinder has joined #ruby
diegoviola has quit [Remote host closed the connection]
webguynow has quit [Ping timeout: 268 seconds]
gurnoorinder has quit [Read error: Connection reset by peer]
<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:
karapetyan has joined #ruby
<arup_r>
>> p "/tenants/1/resources".match(/(\d+)/)[1]
<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.
<arup_r>
only the number is dynamic and rest are static
Cache_Money has quit [Quit: Cache_Money]
tannakartikey has joined #ruby
<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.
webguynow has quit [Ping timeout: 264 seconds]
webguynow has joined #ruby
tannakartikey has left #ruby [#ruby]
tannakartikey has joined #ruby
madhatter has quit [Ping timeout: 264 seconds]
tannakartikey has quit [Read error: Connection reset by peer]
psy_ has joined #ruby
<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.. ;)
Asher has joined #ruby
youngbaks has joined #ruby
tannakartikey has joined #ruby
Asher is now known as Guest77401
Guest77401 is now known as Asher
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<BenjaminDover>
do people hire ruby programmers with geds?
<havenwood>
BenjaminDover: Sure, if they can code.
pawnbox has joined #ruby
<BenjaminDover>
what do mean by that?
<Ox0dea>
GCD > GED
<BenjaminDover>
?
<Ox0dea>
BenjaminDover: Do you know how to compute the greatest common divisor of two numbers?
<BenjaminDover>
yes
<BenjaminDover>
i can do that in my head
<BenjaminDover>
but i dropped out of school and got a ged
arup_r has quit [Ping timeout: 240 seconds]
<BenjaminDover>
and i flunked out of college
<BenjaminDover>
:(
skade has joined #ruby
<BenjaminDover>
FML
<Ox0dea>
havenwood: Yellow alert.
rushed has joined #ruby
<mozzarella>
iktfb
<mozzarella>
dropped out of college because of crippling social anxiety and sleep problems
* havenwood
raises deflector shields
<BenjaminDover>
i failed because i'm suffering from depression
<BenjaminDover>
i have suicidal thoughts every day
<mozzarella>
that sucks
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<beginner_with_qu>
Ox0dea: any tips as to what I should do to cleanup/improve this? https://eval.in/436074
charliesome has joined #ruby
rushed has quit [Client Quit]
<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.
<Ox0dea>
beginner_with_qu: You really should take some time to familiarize yourself with the treasure trove of convenient methods Ruby gives you.
yeticry has quit [Ping timeout: 250 seconds]
<beginner_with_qu>
xD anyone havea good resource link?
subscope has joined #ruby
<beginner_with_qu>
And yeah, I know.
<Ox0dea>
&ri Array#incude?
<`derpy>
No results
<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.
<Ox0dea>
`foo == a || foo == b || foo = c` < `[a, b, c].include? foo`.
ndrei has joined #ruby
<BenjaminDover>
what else should i know besides ruby well?
<BenjaminDover>
what do i have to do to learn ruby well?
<Ox0dea>
beginner_with_qu: Also, eval.in does support providing standard input; scroll down a bit. :)
<BenjaminDover>
i'm guessing more than gcd?
<beginner_with_qu>
fair
<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.
amclain has quit [Quit: Leaving]
<Ox0dea>
The GCD thing was just a pun on GED, mind.
<Ox0dea>
beginner_with_qu: But I don't think that's the behavior you expected?
arup_r has joined #ruby
<beginner_with_qu>
I'm annoyed at this question for rock paper scissors, because I dont want the cascading if elsif elsif end
<Ox0dea>
I think you've conflated Symbols with identifiers.
<beginner_with_qu>
Yup
karapetyan has quit [Remote host closed the connection]
<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
<Ox0dea>
beginner_with_qu: Aye, Symbols also have <=>.
<beginner_with_qu>
Hm. Then what is an indentifier?
<Ox0dea>
An identifier is just a variable name.
Coldblackice has joined #ruby
nfisher has joined #ruby
jamesaxl has joined #ruby
<beginner_with_qu>
Oh. So you mean I can set var_one = 1 and var_two = 0 and now var_one > var_two == true.
<Ox0dea>
Just so.
<beginner_with_qu>
I need to launch this irc channel in my own irc, rather then this webclient, I dislike the font
<beginner_with_qu>
I cannot see underscores
<beginner_with_qu>
xD
skade has joined #ruby
<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?
iateadonut has joined #ruby
pontiki has joined #ruby
karapetyan has joined #ruby
Asher has joined #ruby
nfisher has quit [Ping timeout: 240 seconds]
<Ox0dea>
beginner_with_qu: You could use a case statement to clean it up a little bit.
<Ox0dea>
There are several overly clever ways to determine an RPS winner.
subshad has joined #ruby
<beginner_with_qu>
lol overlyclever == learning in my experience
<Ox0dea>
You've been advised against "learning badly", mind.
skade has quit [Ping timeout: 264 seconds]
<beginner_with_qu>
true
karapetyan has quit [Remote host closed the connection]
workmad3 has joined #ruby
webguynow has quit [Ping timeout: 255 seconds]
pontiki has quit [Ping timeout: 240 seconds]
psk17_ has quit [Ping timeout: 240 seconds]
karapetyan has joined #ruby
webguynow has joined #ruby
<Ox0dea>
beginner_with_qu: I realize your arsenal is limited, but can you think of a way to represent the cyclic nature of RPS?
joufflu has quit [Ping timeout: 240 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nfisher has joined #ruby
<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
<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.
<Ox0dea>
Well, you just need to come up with a way to encode the `r < p < s < r` relationship.
<beginner_with_qu>
I mean I could cycle an array in a circle. And I've looped...
iateadonut has quit [Quit: Leaving.]
karapetyan has quit [Ping timeout: 250 seconds]
workmad3 has quit [Ping timeout: 246 seconds]
<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
deject3d has quit [Quit: Computer has gone to sleep.]
<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.
dopie has quit [Quit: This computer has gone to sleep]
<Ox0dea>
beginner_with_qu: Modular arithmetic is certainly one approach to the thing.
nfisher has quit [Ping timeout: 240 seconds]
<cantaberry>
I'm trying to upload a new role outside of the repo. It keeps throwing an error about the file location. Suggestions?
<beginner_with_qu>
It was a ceaser cipher, the method I'm referencing
<Ox0dea>
I realized.
<beginner_with_qu>
yeah fair
<beginner_with_qu>
xD
<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.
<zenspider>
Cantaberry: how can ANYONE answer that question?
youngbaks has joined #ruby
nfisher has joined #ruby
<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.
<beginner_with_qu>
shouldnt*
<beginner_with_qu>
Oh. wait, zen and canter are two different people >_>
<zenspider>
beginner_with_qu: no no... you keep working out your issue
<cantaberry>
There were also some proxy issues I was running into.
<cantaberry>
knife role from file ./*.json
tjbiddle has quit [Quit: tjbiddle]
ndrei has quit [Ping timeout: 264 seconds]
youngbaks has quit [Ping timeout: 244 seconds]
nfisher has joined #ruby
<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
<beginner_with_qu>
rock,paper** paper,rock**
Salehi has quit [Quit: Leaving]
yfeldblum has joined #ruby
<Ox0dea>
beginner_with_qu: You said you know the #<=> method?
<beginner_with_qu>
I read it over once, but my understanding with case substitution is now where near actionable yet
<Ox0dea>
Hm?
<beginner_with_qu>
... let me look something up. I mightve overlooked something
nfisher has quit [Ping timeout: 240 seconds]
araujo has joined #ruby
Ropeney has joined #ruby
nfisher has joined #ruby
<Ox0dea>
&ri Comparable#<=>
<`derpy>
No results
ndrei has joined #ruby
<Ox0dea>
Not sure what I expected that to do.
Mekkis has joined #ruby
webguynow has quit [Ping timeout: 246 seconds]
webguynow has joined #ruby
<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.
<Ox0dea>
beginner_with_qu: Sorry, I think I might've inadvertently put you on a goose chase. :/
<beginner_with_qu>
lol
<Ox0dea>
I only meant to use <=> as a demonstration of a convenient semantics.
<beginner_with_qu>
Its okay, I'm glad to have read it anyway.
<beginner_with_qu>
lol
<Ox0dea>
It returns negative, 0, or non-negative if the left argument is less than, equal to, or greater than the right argument.
<beginner_with_qu>
thats what I used it as first, honestly. xD
<Ox0dea>
This is sometimes called a "tribool", because it's a bit like a boolean with three states.
<baweaver>
to be fair finding your way around docs is pretty important too.
<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.
<Ox0dea>
And then you could just call into that comparison method to clean up the rest of the code.
<beginner_with_qu>
I see.
decoponio has joined #ruby
<baweaver>
Interesting observation that can be used to simplify it: Rock <- Paper <- Scissors <- ...
<baweaver>
Enumerable#cycle
<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
<Ox0dea>
beginner_with_qu: Ignore that they're strings.
<Ox0dea>
In fact, they really ought to be Symbols.
<beginner_with_qu>
I've saved it without looking at it. That'll give me something to check against. ^_^ thanks alot
dima_ has quit [Quit: This computer has gone to sleep]
casadei_ has joined #ruby
webguynow has quit [Ping timeout: 250 seconds]
webguynow has joined #ruby
<beginner_with_qu>
Nope read it now. That is the coolest thing.
<Ox0dea>
Pretty nifty, huh?
workmad3 has joined #ruby
dima_ has joined #ruby
<beginner_with_qu>
That is just plain cool
<Ox0dea>
The subtractions aren't strictly necessary for determining the result, but returning -1, 0, or 1 is in line with <=>'s semantics.
<Ox0dea>
So this would be a decent implementation of, say, RPS::Move#<=>.
<Ox0dea>
Only not really, because #<=> is supposed to drive all the other comparisons, and it wouldn't hold due to the cycle.
<beginner_with_qu>
Actually, this prompts one more, what I hope is a simple question before I turn in for the night.
<Ox0dea>
Make it count. ;P
caspg has joined #ruby
caspg has quit [Client Quit]
caaspg has joined #ruby
workmad3 has quit [Ping timeout: 264 seconds]
<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?
<Ox0dea>
That's exactly right.
<Ox0dea>
Within a method definition in a class, `self` refers to the object on which the method has been called.
<beginner_with_qu>
Cool. That clears up why I had to reverse it when I dragged it into main.
casadei_ has quit [Read error: Connection reset by peer]
dima_ has quit [Quit: This computer has gone to sleep]
<Ox0dea>
Hey, how did you know about main?
cb__ has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
<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
karapetyan has joined #ruby
<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
<Ox0dea>
Makes sense, I suppose. It's just that the top level really is called `main`.
<jt__>
so the assertion is expecting that exact string but it explore when I execute rake with that value filled in the blank
krz has quit [Quit: WeeChat 1.2]
dionysus69 has quit [Remote host closed the connection]
jt___ has joined #ruby
krz has joined #ruby
jenrzzz has joined #ruby
<jt___>
apeiros: if you answered my question earlier I never saw that last one after my paste
Pupeno has joined #ruby
jt__ has quit [Ping timeout: 246 seconds]
<krz>
how is minimagick doing this. image = MiniMagick::Image.open(image_url); image.path
<krz>
is open creating a new instance of some object so path can reference it?
ktkh has quit [Remote host closed the connection]
<zenspider>
what's the code say?
<krz>
is open a singleton method ?
<zenspider>
a class method, yup
<krz>
as in def self.open right?
webguynow has quit [Ping timeout: 260 seconds]
<apeiros>
krz: in pry: `$ MiniMagick::Image.open`
<apeiros>
shows you the source of that method
<zenspider>
usually/often... yup
webguynow has joined #ruby
<krz>
oh interesting apeiros
marr has joined #ruby
allomov has joined #ruby
dagda1 has joined #ruby
solocshaw has quit [Ping timeout: 264 seconds]
startupality has joined #ruby
ktkh has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
khebbie has joined #ruby
allomov has quit [Ping timeout: 272 seconds]
mateuszzawisza has joined #ruby
mateuszzawisza has left #ruby [#ruby]
allomov has joined #ruby
khebbie has quit [Ping timeout: 268 seconds]
davedev24 has joined #ruby
lxsameer has joined #ruby
karapetyan has joined #ruby
minimalism has quit [Quit: leaving]
Voker57 has joined #ruby
karapetyan has quit [Ping timeout: 246 seconds]
pawnbox has joined #ruby
workmad3 has joined #ruby
jt___ has quit []
workmad3 has quit [Ping timeout: 240 seconds]
allomov has quit [Remote host closed the connection]
nfisher has joined #ruby
workmad3 has joined #ruby
nfisher has quit [Ping timeout: 250 seconds]
havenwood has quit [Ping timeout: 264 seconds]
devoldmx has joined #ruby
drewvanstone has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
davedev24 has quit [Ping timeout: 240 seconds]
[k- has joined #ruby
davedev24 has joined #ruby
krz has quit [Ping timeout: 272 seconds]
BaroMeter has joined #ruby
<[k->
.test.
<[k->
2/2 pass
AlexRussia has quit [Ping timeout: 240 seconds]
devoldmx has quit [Ping timeout: 244 seconds]
drewvanstone has quit [Ping timeout: 244 seconds]
workmad3 has joined #ruby
dagda1 has quit [Read error: No route to host]
Feyn has quit [Quit: Leaving]
spider-mario has joined #ruby
workmad3 has quit [Ping timeout: 260 seconds]
Jackneill has joined #ruby
segmond has quit [Ping timeout: 240 seconds]
Oka has quit [Quit: o/]
bruno- has joined #ruby
bruno- is now known as Guest25293
AlexRussia has joined #ruby
* [k-
searches for Ox0dea
<[k->
Ox0dea!
radgeRayden_ has quit [Ping timeout: 265 seconds]
cantaberry has quit [Ping timeout: 260 seconds]
ndrei has joined #ruby
Guest25293 has quit [Ping timeout: 265 seconds]
webguynow has quit [Ping timeout: 264 seconds]
webguynow has joined #ruby
mprelude has joined #ruby
ktkh has quit [Ping timeout: 260 seconds]
MagePsycho has joined #ruby
ndrei has quit [Ping timeout: 260 seconds]
devoldmx has joined #ruby
stamina has joined #ruby
unop has joined #ruby
SCHAAP137 has joined #ruby
einarj has joined #ruby
dagda1 has joined #ruby
einarj has quit [Remote host closed the connection]
marr has quit [Ping timeout: 240 seconds]
mgorbach has quit [Ping timeout: 246 seconds]
mgorbach has joined #ruby
webguynow has quit [Ping timeout: 260 seconds]
_orangejuice has joined #ruby
webguynow has joined #ruby
ndrei has joined #ruby
workmad3 has joined #ruby
startupality has quit [Quit: startupality]
blueOxigen has quit [Ping timeout: 246 seconds]
workmad3 has quit [Ping timeout: 256 seconds]
ndrei has quit [Ping timeout: 272 seconds]
CrazyEddy has joined #ruby
webguynow has quit [Ping timeout: 268 seconds]
karapetyan has joined #ruby
webguynow has joined #ruby
devoldmx has quit [Remote host closed the connection]
oOXuOo has joined #ruby
bin7me has joined #ruby
oOXuOo has quit [Client Quit]
omarJs has quit [Ping timeout: 264 seconds]
oOXuOo has joined #ruby
omarJs has joined #ruby
nfisher has joined #ruby
naftilos76 has joined #ruby
webguynow has quit [Ping timeout: 250 seconds]
webguynow has joined #ruby
krz has joined #ruby
nfisher has quit [Ping timeout: 272 seconds]
nyon is now known as nyon-zero-pyon-
oOXuOo has quit []
rutu has joined #ruby
<rutu>
hi
allomov has joined #ruby
rutu has left #ruby [#ruby]
<[k->
hello
slayerjain has joined #ruby
oOXuOo has joined #ruby
sdothum has joined #ruby
krz has quit [Ping timeout: 255 seconds]
slayerjain has quit [Client Quit]
oOXuOo has quit [Client Quit]
nyon-zero-pyon- has quit [Quit: F...ix you, Emacs.]
_orangejuice has left #ruby [#ruby]
CloCkWeRX has joined #ruby
nyon-zero-pyon has joined #ruby
Rollabunna has quit [Remote host closed the connection]
ruurd has joined #ruby
bronson has joined #ruby
shubhams2m has joined #ruby
<shubhams2m>
anyone??
<apeiros>
someone!
bronson has quit [Ping timeout: 240 seconds]
<[k->
yes we are here
<[k->
ask away
workmad3 has joined #ruby
webguynow has quit [Ping timeout: 265 seconds]
<apeiros>
I guess this is the next level
<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
Pumukel has quit [Ping timeout: 246 seconds]
<ccooke>
apeiros: think of it as a complement. They believe that you really are that clever
webguynow has joined #ruby
<apeiros>
if only
shubhams2m has quit [Quit: Page closed]
workmad3 has quit [Ping timeout: 244 seconds]
<[k->
we have already solved it
<[k->
(in the future)
ht__ has joined #ruby
<apeiros>
[k-: wrong tense then. we already will have solved it
ckuhn has joined #ruby
ckuhn has left #ruby [#ruby]
nanoz has joined #ruby
kirun has joined #ruby
Rurik has joined #ruby
duncannz has quit [Ping timeout: 256 seconds]
einarj has joined #ruby
davedev24 has quit [Remote host closed the connection]
pepperbreath1 has joined #ruby
webguynow has quit [Ping timeout: 246 seconds]
<jhass>
we will have already solved it?
sankaber has joined #ruby
maniac has joined #ruby
maniac has left #ruby [#ruby]
karapetyan has quit [Remote host closed the connection]
webguynow has joined #ruby
tjbiddle has joined #ruby
ddv has quit [Changing host]
ddv has joined #ruby
platosha has quit [Quit: This computer has gone to sleep]
bruno- has joined #ruby
ndrei has joined #ruby
Leef_ has joined #ruby
<shevy>
we could have
<[k->
we could be heroes, me and you ♪
omarJs has quit [Ping timeout: 256 seconds]
moeabdol has joined #ruby
FernandoBasso has joined #ruby
workmad3 has joined #ruby
pontiki has joined #ruby
segfalt has joined #ruby
platosha has joined #ruby
apt-get has joined #ruby
allcentury has quit [Ping timeout: 256 seconds]
pontiki has quit [Ping timeout: 240 seconds]
workmad3 has quit [Ping timeout: 240 seconds]
webguynow has quit [Ping timeout: 256 seconds]
webguynow has joined #ruby
rodfersou has joined #ruby
Rickmasta has joined #ruby
nfk has joined #ruby
jdawgaz has joined #ruby
webguynow has quit [Ping timeout: 240 seconds]
einarj has quit [Remote host closed the connection]
webguynow has joined #ruby
einarj has joined #ruby
postmodern has quit [Quit: Leaving]
leitz has joined #ruby
<adaedra>
Ox0dea: I'll look into that.
nfisher has joined #ruby
einarj has quit [Remote host closed the connection]
nfisher has quit [Ping timeout: 250 seconds]
allcentury has joined #ruby
jdawgaz has quit [Read error: Connection reset by peer]
<[k->
that would mean you measure a person by dividing them into a thousand parts!
<[k->
(err, i meant the markings ('divisions') on a ruler)
i-blis has left #ruby [#ruby]
krz has joined #ruby
abyss has quit [Ping timeout: 256 seconds]
webguynow has quit [Ping timeout: 240 seconds]
webguynow has joined #ruby
nfisher has joined #ruby
{756d6f} has quit [Read error: No route to host]
tannakartikey has quit [Remote host closed the connection]
<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?
<leitz>
Besides "a clue", and "a life"...
krz has quit [Ping timeout: 255 seconds]
workmad3 has joined #ruby
<jhass>
leitz: relace __FILE__ with __dir__ :P
<jhass>
*replace
<noob_>
i went through a video saying learn atleast 5 programming language wont that make us confused ? since ruby was listed in that
<shevy>
mr. webchatter is bored again
<leitz>
jhass, not woring with dir or DIR
<jhass>
__dir__
<leitz>
woring/working
<shevy>
hehe
<mprelude>
noob_: I wouldnt concentrate on learning languages, I'd concentrate on learning paradigms.
nfisher has quit [Ping timeout: 256 seconds]
<jhass>
I didn't write dir nor DIR, I wrote __dir__
<leitz>
./chargen.rb:3: undefined local variable or method `__dir__' for main:Object (NameError)
<shevy>
leitz do you have to modify $LOAD_PATH?
webguynow has quit [Ping timeout: 252 seconds]
workmad3 has quit [Ping timeout: 250 seconds]
webguynow has joined #ruby
<apeiros>
leitz: what ruby version are you using? (probably too old)
centrx has joined #ruby
<leitz>
shevy, lemme test. I just pushed the code to git hub.
<leitz>
apeiros, 1.8.7. As always.
<apeiros>
uhm, ok
<apeiros>
you know that 1.8.7 has been dead for ages, yes?
<shevy>
leitz if it is installable like via a gem, then you can find out the base directory, and use that to load stuff
<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
nfisher has joined #ruby
MagePsycho has quit [Ping timeout: 268 seconds]
webguynow has quit [Ping timeout: 264 seconds]
webguynow has joined #ruby
ItSANgo_ has joined #ruby
<leitz>
I'm writing the program and trying to make it gem compliant.
ruurd has joined #ruby
<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.
nfisher has quit [Ping timeout: 252 seconds]
<[k->
will the code to work! but will it work?
<apeiros>
leitz: then for the future I strongly suggest you mention your ruby version when seeking help
<apeiros>
because frankly, zombie versions are not assumed by default
<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/
karapetyan has joined #ruby
<darix>
leitz: your gems wouldnt be in sitelibdir
<darix>
anyway
<shevy>
the above requires work for me :(
ItSANgo_ has quit [Client Quit]
freerobby has joined #ruby
da3mian_ has joined #ruby
MagePsycho has joined #ruby
mcFactor has joined #ruby
webguynow has quit [Ping timeout: 264 seconds]
webguynow has joined #ruby
karapetyan has quit [Ping timeout: 250 seconds]
Rollabunna has joined #ruby
da3mian has quit [Ping timeout: 256 seconds]
da3mian_ is now known as da3mian
da3mian has left #ruby [#ruby]
Ketchy has joined #ruby
michael_mbp has quit [Excess Flood]
bricker has quit [Ping timeout: 244 seconds]
cashnguns has joined #ruby
Rollabunna has quit [Ping timeout: 244 seconds]
JoshL has joined #ruby
michael_mbp has joined #ruby
apt-get has quit [Ping timeout: 260 seconds]
<leitz>
Solved with $LOAD_PATH << ("../lib")
giuseppesolinas has joined #ruby
pwnd_nsfw has joined #ruby
ItSANgo has joined #ruby
lkba_ has quit [Ping timeout: 252 seconds]
frmendes has joined #ruby
bkxd has joined #ruby
karapetyan has joined #ruby
freerobby has quit [Quit: Leaving.]
webguynow has quit [Ping timeout: 240 seconds]
webguynow has joined #ruby
Macaveli has joined #ruby
karapetyan has quit [Remote host closed the connection]
apt-get has joined #ruby
allcentury has joined #ruby
webguynow has quit [Ping timeout: 268 seconds]
ktkh has joined #ruby
<apeiros>
relative paths in $LOAD_PATH, always a good idea</not>
webguynow has joined #ruby
chipotle has quit [Quit: cheerio]
<[k->
unopened tag `not`
karapetyan has joined #ruby
<jhass>
relax, it's SGML
krz has joined #ruby
lulzmachine has joined #ruby
pawnbox has quit [Read error: Connection reset by peer]
pawnbox has joined #ruby
allcentury has quit [Ping timeout: 272 seconds]
gurnoorinder has joined #ruby
JoshL has quit []
<shevy>
the people here are not happy with $LOAD_PATH!
<adaedra>
It's not $LOAD_PATH the problem
<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")
<leitz>
Which will probably break something else, I'm sure.
<shevy>
:D
<leitz>
Well, all the tests passed. That's a start
<Cust0sLimen>
hi
webguynow has quit [Ping timeout: 252 seconds]
<Cust0sLimen>
How limited is Shoes ?
webguynow has joined #ruby
<shevy>
the main one requires jruby
<Cust0sLimen>
hmm
linuxboytoo has joined #ruby
<Cust0sLimen>
would gtk be better option ?
<apeiros>
leitz: congrats, you just figured why relative paths in $LOAD_PATH are not ag ood idea
<[k->
now to share your experience with the world
last_staff has joined #ruby
<apeiros>
and yes, that code still can break as it still depends on the working directory
<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
<shevy>
almost the same in ruby too... the latter is... I don't remember, Gtk::WINDOW::CENTER or something similar...
<shevy>
var label = new Label ("Hello, World!");
<shevy>
label = Gtk::Label.new 'Hello, World!'
Freeaqingme has quit [Remote host closed the connection]
<shevy>
the fact that vala was created sorta shows that C isn't great for everything :>
ruurd has quit [Quit: ZZZzzz…]
ruurd has joined #ruby
pawnbox has quit [Read error: Connection reset by peer]
atomical has joined #ruby
pawnbox has joined #ruby
Kallis has joined #ruby
karapetyan has quit [Remote host closed the connection]
Freeaqingme has joined #ruby
karapetyan has joined #ruby
webguynow has quit [Ping timeout: 250 seconds]
webguynow has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
tk__ has joined #ruby
jschmid has quit [Remote host closed the connection]
Exuma has joined #ruby
Exuma has quit [Client Quit]
amystephen has joined #ruby
beast has joined #ruby
BaroMeter has quit [Quit: Leaving]
bkulbida has joined #ruby
ItSANgo has quit [Quit: Leaving...]
gurnoorinder has quit [Ping timeout: 246 seconds]
Freeaqingme has quit [Remote host closed the connection]
workmad3 has joined #ruby
dorei has joined #ruby
frmendes has quit [Read error: Connection reset by peer]
youngbaks has joined #ruby
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Kallis has quit [Read error: Connection reset by peer]
karapetyan has quit [Remote host closed the connection]
webguynow has quit [Ping timeout: 246 seconds]
webguynow has joined #ruby
karapetyan has joined #ruby
<leitz>
In Ruby 1.8.7 is there a way to set the "Start all paths from here."?
Kallis has joined #ruby
workmad3 has quit [Ping timeout: 260 seconds]
<centrx>
No results found for "Start all paths from here".
jamesaxl has quit [Ping timeout: 246 seconds]
Freeaqingme has joined #ruby
<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
karapetyan has quit [Ping timeout: 264 seconds]
<[k->
yaml is a bit much?
ItSANgo has joined #ruby
gregf has quit [Quit: WeeChat 1.3]
BTRE has quit [Ping timeout: 264 seconds]
frmendes has joined #ruby
frmendes is now known as da3mian
<phreakocious>
the example seems overengineered for simple key/value type needs
<phreakocious>
and I don't need development/production separation
<[k->
hm, .properties? .ini?
UtkarshRay has quit [Ping timeout: 240 seconds]
<phreakocious>
heh, I guess I'll just write one :)
apeiros has quit [Ping timeout: 256 seconds]
<dorei>
phreakocious: your devops will love you if you use the env variables ;-)
Meow-J has joined #ruby
<phreakocious>
it's like fashion.. what's old is new again
ktkh has quit [Remote host closed the connection]
webguynow has quit [Ping timeout: 250 seconds]
webguynow has joined #ruby
<phreakocious>
in the process of finding this, http://12factor.net/ came up repeatedly and it looks like some freemason shit to me
<dorei>
the whole IT looks like freemason shit :)
apeiros has joined #ruby
karapetyan has joined #ruby
Freeaqingme has quit [Remote host closed the connection]
karapetyan has quit [Read error: Connection reset by peer]
karapety_ has joined #ruby
gurnoorinder has joined #ruby
gregf has joined #ruby
linuxboytoo has quit [Remote host closed the connection]
linuxboytoo has joined #ruby
karapety_ has quit [Ping timeout: 265 seconds]
BTRE has joined #ruby
havenwood has joined #ruby
karapetyan has joined #ruby
Freeaqingme has joined #ruby
webguynow has quit [Ping timeout: 255 seconds]
Freeaqingme has quit [Remote host closed the connection]
webguynow has joined #ruby
nfisher has joined #ruby
lkba has joined #ruby
Rurik has quit [Read error: Connection reset by peer]
linuxboytoo has quit [Ping timeout: 268 seconds]
Rurik has joined #ruby
nickjj has quit [Ping timeout: 265 seconds]
nfisher has quit [Ping timeout: 240 seconds]
nickjj has joined #ruby
umgrosscol has joined #ruby
solocshaw has joined #ruby
chipotle has joined #ruby
workmad3 has joined #ruby
sferik has joined #ruby
PublicSubnet has joined #ruby
da3mian is now known as frmendes
jcoe has joined #ruby
jcoe has quit [Client Quit]
ponga has quit [Quit: Connection closed for inactivity]
flak has joined #ruby
zero7 has quit [Quit: Connection closed for inactivity]
<apeiros>
phreakocious: just use a plain yaml file then?
gambl0re has quit [Ping timeout: 240 seconds]
Freeaqingme has joined #ruby
workmad3 has quit [Ping timeout: 265 seconds]
rippa has quit [Ping timeout: 240 seconds]
Kallis has quit [Ping timeout: 265 seconds]
Kallis has joined #ruby
<phreakocious>
apeiros: yeah, leaning that way.. settingslogic doesn't seem to work right with simple lists :(
bricker has joined #ruby
marahin has joined #ruby
ktkh has joined #ruby
<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?
MagePsycho has quit [Ping timeout: 265 seconds]
Soda has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Chau has joined #ruby
<apeiros>
marahin: if you have a huge amount of data, you might want to consider restructuring your data to fit your needs better
<apeiros>
but with the given structure: ary.delete_at(ary.index(5))
veduardo_ has joined #ruby
frmendes has quit [Ping timeout: 256 seconds]
daveomcd has joined #ruby
<daveomcd>
is there an equivalent for `rails new app` for ruby?
<centrx>
daveomcd, touch myscript.rb
Rollabunna has joined #ruby
<[k->
haha funny
<daveomcd>
centrx: ok thanks didn't know if there was something more that would create gem file etc etc
drewvanstone has joined #ruby
Kallis has quit [Read error: Connection reset by peer]
<apeiros>
daveomcd: Gemfile is not part of ruby, it's related to bundler, a separate gem
elperdut has joined #ruby
Rollabunna has quit [Read error: No route to host]
<daveomcd>
gotcha thanks
Rollabunna has joined #ruby
<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`
Rollabunna has quit [Remote host closed the connection]
Rollabunna has joined #ruby
<daveomcd>
apeiros: ok cool, that's what i was looking for likely i'll go google some on it thanks!
<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
<marahin>
couldn't find a good method though :)
<marahin>
thank you very much.
allcentury has joined #ruby
devn has quit [Ping timeout: 252 seconds]
karapetyan has quit [Remote host closed the connection]
peterhu has quit [Ping timeout: 264 seconds]
ipstatic has joined #ruby
devn has joined #ruby
<shevy>
ruby ruby ruby
<adaedra>
rubi rubi rubi
<centrx>
scooby dooby doo
davedev24 has joined #ruby
bruno- has quit [Quit: Lost terminal]
Guest53916 has joined #ruby
ghoti_ is now known as ghoti
hanmac has quit [Quit: Leaving.]
dorei has quit []
hanmac has joined #ruby
bruno- has joined #ruby
allcentury has quit [Ping timeout: 252 seconds]
wildlander has joined #ruby
wildlander has quit [Max SendQ exceeded]
karapetyan has joined #ruby
wildlander has joined #ruby
voltalio has joined #ruby
Guest53916 has quit [Max SendQ exceeded]
karapetyan has quit [Remote host closed the connection]
Freeaqingme has quit [Read error: Connection reset by peer]
claptor has joined #ruby
naftilos76 has quit [Ping timeout: 265 seconds]
outsmartin has joined #ruby
gurnoorinder1 has joined #ruby
einarj has joined #ruby
<[k->
&ri noresults
<`derpy>
No results
slayerjain has joined #ruby
<[k->
adaedra: change it to nothing appropriate!
slayerjain has quit [Max SendQ exceeded]
Freeaqingme has joined #ruby
Ektor has quit [Quit: Allez, @_+ tlm :)]
elperdut has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gurnoorinder has quit [Ping timeout: 256 seconds]
drewvanstone has joined #ruby
<adaedra>
mh
voltalio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
einarj has quit [Ping timeout: 246 seconds]
webguynow has quit [Ping timeout: 240 seconds]
webguynow has joined #ruby
linuxboytoo has joined #ruby
drewvanstone has quit [Ping timeout: 265 seconds]
skade has joined #ruby
gurnoorinder1 has quit [Read error: Connection reset by peer]
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ruurd has joined #ruby
<shevy>
hmm
modern has quit [Quit: Leaving]
nfisher has joined #ruby
<shevy>
now you did it havenwood
<shevy>
when before I only wanted to show the source of ruby code
<shevy>
I want irb to show the code of EVERYTHING!
<shevy>
(I am kidding, nobody touches irb code and makes it out alive again.)
<havenwood>
shevy: Those pesky methods written in C...
voltalio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy>
can they show the source code to methods when things are running on the JVM?
voltalio has joined #ruby
f00dMonsta has joined #ruby
<havenwood>
shevy: Those pesky methods written in Java...
mwlang has joined #ruby
<shevy>
:(
allcentury has joined #ruby
voltalio has quit [Client Quit]
<shevy>
this is why we can't have nice things
nfisher has quit [Ping timeout: 272 seconds]
benlieb has joined #ruby
beauby has joined #ruby
webguynow has quit [Ping timeout: 256 seconds]
benlieb has quit [Client Quit]
webguynow has joined #ruby
jgt has joined #ruby
allcentury has quit [Ping timeout: 246 seconds]
nfisher has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
voltalio has joined #ruby
rurik has quit [Remote host closed the connection]
chouhoulis has joined #ruby
<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"
bronson has joined #ruby
nfisher has quit [Ping timeout: 240 seconds]
<apeiros>
both terms are in use
<cndiv>
apeiros: Explains that. One more popular than the other?
<shevy>
I'd prefer arguments there
<[k->
parameters are used when referring to the definition
<shevy>
parameter sounds more formal and noble
<[k->
def method param1, param2
<[k->
arguments are used when calling
voltalio has quit [Client Quit]
<[k->
method(arg1, arg2)
charliesome has joined #ruby
rurik has joined #ruby
<cndiv>
OK, great. I love it when I phrase questions properly, feel like I'm learning something!
hydrozen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rurik has quit [Max SendQ exceeded]
<cndiv>
I've been surprised that vocabulary has been a tough part of learning this, for me.
rurik has joined #ruby
rurik has quit [Max SendQ exceeded]
chouhoulis has quit [Ping timeout: 246 seconds]
webguynow has quit [Ping timeout: 255 seconds]
bronson has quit [Ping timeout: 265 seconds]
webguynow has joined #ruby
peterhu has joined #ruby
nfisher has joined #ruby
<[k->
indeed, left associativity, commutativity, and the like ?.?
ruby-lang529 has joined #ruby
Ilyes512 has joined #ruby
allcentury has joined #ruby
slayerjain has joined #ruby
<cndiv>
Oh I haven't even hit that yet.
slayerjain has quit [Max SendQ exceeded]
nfisher has quit [Ping timeout: 240 seconds]
beauby has quit [Ping timeout: 252 seconds]
slayerjain has joined #ruby
<shevy>
words may have different meanings in different context or programming languages
<shevy>
haskell has a lot of vocabulary that I don't grok
<cndiv>
So far even basic OO programming things I'm making flashcards. It's basic but I'll get there.
slayerjain has quit [Max SendQ exceeded]
<cndiv>
I was just surprised I got *what* it does faster that *what it's called*
slayerja_ has quit [Ping timeout: 240 seconds]
rurik has joined #ruby
slayerjain has joined #ruby
slayerjain has quit [Max SendQ exceeded]
webguynow has quit [Ping timeout: 246 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
webguynow has joined #ruby
slayerjain has joined #ruby
nfisher has joined #ruby
brendan- has quit [Ping timeout: 272 seconds]
workmad3 has joined #ruby
nfisher has quit [Ping timeout: 256 seconds]
UtkarshRay has joined #ruby
bazbing80 has quit [Ping timeout: 264 seconds]
<shevy>
there are also many different definitions of OOP and what should belong into it
<shevy>
like python way of explicit self versus ruby way of implicit self
workmad3 has quit [Ping timeout: 268 seconds]
gurnoorinder1 has joined #ruby
shmilan has joined #ruby
hydrozen has joined #ruby
gurnoorinder has quit [Ping timeout: 240 seconds]
nfisher has joined #ruby
poguez_ has joined #ruby
Ketchy has quit [Quit: Leaving]
apt-get_ has joined #ruby
gurnoorinder1 has quit [Quit: Leaving.]
aswen has joined #ruby
centrx has quit [Quit: "You cannot fix a machine by just power-cycling it with no understanding of what is going wrong."]
nfisher has quit [Ping timeout: 264 seconds]
hydrozen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy>
robots walking over the earth and making houses
flak has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
badbodh has joined #ruby
rippa has joined #ruby
sepp2k has quit [Quit: Leaving.]
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Cache_Money has joined #ruby
aswen has joined #ruby
startupality has quit [Quit: startupality]
tacit7 has joined #ruby
pontiki has joined #ruby
dagda1_ has joined #ruby
flak has joined #ruby
tacit7 has quit [Remote host closed the connection]
rippa has quit [Ping timeout: 240 seconds]
Cache_Money has quit [Quit: Cache_Money]
ragingcake has joined #ruby
AlexRussia has quit [Ping timeout: 268 seconds]
umgrosscol has joined #ruby
wildlander has quit [Quit: Saliendo]
nfisher has joined #ruby
shazaum has quit [Quit: Leaving]
* TTilus
is happily coding R
ruurd has joined #ruby
<Ox0dea>
TTilus: NA is a boolean?
ruurd has quit [Client Quit]
umgrosscol has quit [Ping timeout: 256 seconds]
Musashi007 has joined #ruby
platzhirsch has joined #ruby
<capin>
toretore: what's wrong with html?
skade has joined #ruby
mwlang has quit [Quit: mwlang]
skade has quit [Client Quit]
swgillespie has joined #ruby
<shevy>
R makes fancy plots
phutchins has joined #ruby
tno has joined #ruby
shinnya has quit [Ping timeout: 240 seconds]
chouhoulis has joined #ruby
phutchins has quit [Ping timeout: 240 seconds]
<toretore>
capin: nothing really, it's just what it's being used for
giuseppesolinas has quit [Quit: This computer has gone to sleep]
<toretore>
it's a document format that's being used to make applications
s00pcan has quit [Quit: Lost terminal]
giuseppesolinas has joined #ruby
gurnoorinder has joined #ruby
<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
<moeabdol>
in rspec3 how to test if a real object receives a method call
badbodh has quit [Remote host closed the connection]
<moeabdol>
is it expect(my_object).to receive(:my_method).and_return(my_value)?
<moeabdol>
and then call the actuall object
nanoz has quit [Quit: <3]
psy_ has joined #ruby
chouhoulis has joined #ruby
Melpaws has joined #ruby
Fire1o6 has quit [Ping timeout: 240 seconds]
code1o6 has quit [Ping timeout: 240 seconds]
<Ox0dea>
moeabdol: It seems like you're looking for somebody to validate your ability to read.
<Ox0dea>
Yes, you appear to be literate. Well done.
code1o6 has joined #ruby
Fire1o6 has joined #ruby
nfisher has quit [Ping timeout: 240 seconds]
<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
devbug has joined #ruby
banister has joined #ruby
queequeg1 has quit [Ping timeout: 240 seconds]
Melpaws has quit [Ping timeout: 240 seconds]
chouhoulis has quit [Ping timeout: 240 seconds]
bigmac has joined #ruby
flak has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
rippa has joined #ruby
ericjphillips has joined #ruby
Melpaws has joined #ruby
queequeg1 has joined #ruby
Musashi007 has quit [Quit: Musashi007]
<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
tkiel has quit [Quit: Going offline, see ya! (www.adiirc.com)]
tkiel has joined #ruby
<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.
tkiel has quit [Client Quit]
phutchins has quit [Ping timeout: 250 seconds]
cb_ has quit [Remote host closed the connection]
dgutierrez1287 has joined #ruby
postmodern has joined #ruby
fantazo has joined #ruby
tuxero has quit [Ping timeout: 256 seconds]
kappy has quit [Ping timeout: 272 seconds]
wildlander has joined #ruby
kappy has joined #ruby
einarj has joined #ruby
tvw has joined #ruby
[k- has quit [Ping timeout: 260 seconds]
cb_ has joined #ruby
Coldblackice has quit [Ping timeout: 256 seconds]
umgrosscol has quit [Ping timeout: 264 seconds]
Coldblackice has joined #ruby
freerobby has quit [Quit: Leaving.]
saddad has joined #ruby
slayerja_ has quit [Ping timeout: 268 seconds]
ericjphillips has quit [Quit: Leaving.]
slayerjain has joined #ruby
einarj has quit [Remote host closed the connection]
<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
gambl0re has quit [Ping timeout: 246 seconds]
yfeldblum has joined #ruby
<shevy>
hmm seems .sort_by ... I Never remember when to return 1 or -1
phaze has quit []
outsmartin has quit [Quit: Leaving.]
SCHAAP137 has quit [Quit: Leaving]
SCHAAP137 has joined #ruby
SCHAAP137 has joined #ruby
<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?
Pupeno has quit [Read error: Connection reset by peer]
baweaver has joined #ruby
JohnBat26 has joined #ruby
<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.
chipotle has joined #ruby
eminencehc has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<Ox0dea>
How do I liberate all the archived files on my system?
AlexRussia has joined #ruby
<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?
platosha_ has joined #ruby
sdothum has joined #ruby
<pipework>
I'm not sure if chrisseaton is all that familiar with ruby-install though.
workmad3 has joined #ruby
<postmodern>
pipework, for jruby it just installs the dependencies and unpacks the jruby tar file
<postmodern>
second time someone's requested alternate dependencies for jruby, might have to add an option for which JVM you want
<pipework>
postmodern: Hm, so if I pass a mirror with -M to the truffle download, it ought to work?
<pipework>
I'll give it go.
platosha__ has quit [Ping timeout: 240 seconds]
dagda1_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rikkipitt has quit [Remote host closed the connection]
<postmodern>
pipework, generally for experimental things I just install them manually into /opt/ or ~/.rubies/
<pipework>
Then the test after getting a new shell and chruby switching to jruby, and it fails with an unknown option.
<pipework>
-X doesn't show truffle stuff.
<pipework>
postmodern: I'll give the manual install a go.
<postmodern>
pipework, -M is for a base URI, not a fully qualified URI
karapetyan has joined #ruby
<pipework>
postmodern: Oh.
BTRE has quit [Ping timeout: 240 seconds]
phutchins has quit [Ping timeout: 264 seconds]
<pipework>
-u it is!
<postmodern>
pipework, correct
workmad3 has quit [Ping timeout: 272 seconds]
Pupeno has joined #ruby
<postmodern>
otherwise it defaults to $ruby_mirror/$ruby_version/$ruby_archive
<postmodern>
where ruby_archive is jruby-bin-$ruby_version.tar.gz
marr has joined #ruby
nfisher has joined #ruby
meatherly has quit []
allcentury has joined #ruby
Rickmasta has quit [Ping timeout: 252 seconds]
karapetyan has quit [Ping timeout: 240 seconds]
Rickmasta has joined #ruby
Kallis has quit [Ping timeout: 265 seconds]
<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.
Kallis has joined #ruby
Kallis has quit [Max SendQ exceeded]
<postmodern>
pipework, just extract into the appropriately named directory and chruby will use the dir name
nfisher has quit [Ping timeout: 264 seconds]
Kallis has joined #ruby
<pipework>
postmodern: Oh that's pretty sweet
badbodh has joined #ruby
<pipework>
Thank you, sir.
rakm has joined #ruby
livcd_ has quit [Remote host closed the connection]
Pupeno has quit [Remote host closed the connection]
solocshaw has quit [Remote host closed the connection]
cb_ has joined #ruby
cb_ has joined #ruby
dgutierrez1287 has quit [Remote host closed the connection]
solocshaw has joined #ruby
BTRE has joined #ruby
CrazyEddy has quit [Remote host closed the connection]
<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
<Cust0sLimen>
any ideas ?
<pipework>
Cust0sLimen: Ask FooBarWidget in #RubyOnRails
dreadnought8971 has joined #ruby
Azure has quit [Remote host closed the connection]
<Ox0dea>
wannalearn: Yes, but it's not what you want in this case.
<Ox0dea>
#roll should be a class method.
<dorei>
>> ?????:??
<ruboto>
dorei # => /tmp/execpad-d38dcb4dc5f2/source-d38dcb4dc5f2:2: warning: string literal in condition ...check link for more (https://eval.in/436234)
<Ox0dea>
wannalearn: Erm, no, never mind. Just nix the `self.` in your invocation of #roll.
<Ox0dea>
That tries to call `DiceSet.roll`, which doesn't exist.
phutchins has quit [Ping timeout: 252 seconds]
<Ox0dea>
You want to invoke the #roll instance method of this particular DiceSet instance.
<wannalearn>
Ox0dea: it won't have access to dice variable though
<wannalearn>
I give it a go
<Ox0dea>
wannalearn: This is from the Koans, right?
<wannalearn>
Ox0dea: yep, call DiceSet.roll within values failed to reference the dice var
<Ox0dea>
Doesn't the DiceSet initializer take the number of dice to roll?
deject3d has joined #ruby
<wannalearn>
Ox0dea: yes, on Koans
<wannalearn>
Ox0dea: nope, it set when you call the roll method
mistermocha has quit [Remote host closed the connection]
beauby has quit [Ping timeout: 265 seconds]
Chau has quit [Quit: Leaving]
chouhoulis has joined #ruby
<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?
apt-get_ has quit [Quit: Quit]
<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.
solocshaw has quit [Ping timeout: 240 seconds]
firstdayonthejob has quit [Ping timeout: 264 seconds]
<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
ramfjord has joined #ruby
moeabdol1 has quit [Ping timeout: 260 seconds]
<Ox0dea>
wannalearn: You've learned about instance variables, yes?
<shevy>
I see the pontiki pattern
<pontiki>
indeed
drewvanstone has joined #ruby
<pontiki>
i have patterns
chouhoulis has quit [Ping timeout: 268 seconds]
<wannalearn>
Ox0dea: yes. I've read it looking for solution to this. :)
jgt has quit [Ping timeout: 252 seconds]
saddad has quit [Ping timeout: 246 seconds]
<Ox0dea>
wannalearn: Well, that's how state gets stored on instances, such that you can share it between methods.
bronson has joined #ruby
ruurd has joined #ruby
fungal has quit [Ping timeout: 252 seconds]
<wannalearn>
Ox0dea: thanks, I learnt something new. :)
bigmac has quit [Ping timeout: 268 seconds]
<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.
cb_ has quit [Remote host closed the connection]
michael_mbp has quit [Excess Flood]
<Ox0dea>
Your implementation of #values would re-roll the dice, which gave your DiceSet amnesia.
drewvanstone has quit [Ping timeout: 264 seconds]
einarj has quit [Remote host closed the connection]
solocshaw has joined #ruby
<platzhirsch>
Do you think rolling database schema can be misunderstood?
<dorei>
>> x = {a: 1, b: 2}; y = {c:3, d: 4}; {**x, **y}
<Ox0dea>
Technodrome: You realize that's not `a = b`, I trust?
<Technodrome>
sorry, b = a
<apeiros>
it's not that either
<Technodrome>
still how is it a different object?
<apeiros>
`b = a` != `b = a.some_method_call`
gearnode has quit [Ping timeout: 240 seconds]
<Technodrome>
ah , i’m dumb .get has a return
<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.
<Technodrome>
sorry, being dumb
phutchins has joined #ruby
Pupeno has quit [Ping timeout: 264 seconds]
scripore has quit [Quit: This computer has gone to sleep]
theone01 has quit [Quit: Going offline, see ya! (www.adiirc.com)]
nfisher has quit [Ping timeout: 264 seconds]
scripore has joined #ruby
<Technodrome>
.get changes the actual instance though, i wished it just had a return intead of doing that
yfeldblum has quit [Ping timeout: 246 seconds]
sameerynho has quit [Quit: Leaving]
rurik has joined #ruby
deject3d has quit [Quit: Computer has gone to sleep.]
segfalt has quit [Quit: segfalt]
fedexo has joined #ruby
bkxd has joined #ruby
chouhoulis has joined #ruby
nfisher has joined #ruby
<pontiki>
you may have the wrong idea about what the Mechanize instance is doing
<pontiki>
consider it a browser
<pontiki>
as you navigate through the website, the content changes
<pontiki>
the mechanize agent is managing that
dgutierrez1287 has joined #ruby
nfisher has quit [Ping timeout: 240 seconds]
chouhoulis has quit [Ping timeout: 268 seconds]
dgutierrez1287 has quit [Ping timeout: 244 seconds]
Chau has joined #ruby
tkiel has joined #ruby
nfisher has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
Chau has quit [Read error: Connection reset by peer]
allcentury has quit [Ping timeout: 265 seconds]
Technodrome has quit [Quit: Technodrome]
HAL2328 has joined #ruby
iamninja has quit [Read error: Connection reset by peer]