havenwood changed the topic of #ruby to: Rules & more: http://ruby-community.com || Can't talk? Register/identify with Nickserv first! || Ruby 2.2.3; 2.1.7; 2.0.0-p647: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
Andrey has joined #ruby
<Andrey> Hi guys, need some help with "case" statement
SenpaiSilver has quit [Quit: Leaving]
ruurd has quit [Quit: ZZZzzz…]
karapetyan has joined #ruby
<Ox0dea> Andrey: Ah, that's unfortunate.
<Andrey> hehe, Hello Ox0dea
<toretore> i need help too
<Ox0dea> Andrey: Hm, no, that should work fine?
<toretore> with, like, code
pietr0 has quit [Quit: pietr0]
<Ox0dea> >> (1..3) === 2.5 # Andrey
<ruboto> Ox0dea # => true (https://eval.in/436019)
<Andrey> it gives me syntax error when I run it: multiply.rb:46: syntax error, unexpected keyword_when, expecting keyword_end
<Andrey> when 100..100
eminencehc has quit [Remote host closed the connection]
<toretore> Andrey: gist the entire file
<Ox0dea> Andrey: There are no syntax errors in that file either.
ndrei has quit [Ping timeout: 255 seconds]
<toretore> you're missing a space
badbodh has quit [Ping timeout: 260 seconds]
karapetyan has quit [Ping timeout: 240 seconds]
<Andrey> toretore: Lol, you are right, that fixed it
<Ox0dea> Erm, where?
<Ox0dea> ~ $ curl -s http://git.io/vnO3l | ruby -c
<Ox0dea> Syntax OK
<toretore> what version are you on Andrey?
<Andrey> no space after first puts in case
<Ox0dea> That's not a syntax error.
<Andrey> 2.17
<Andrey> When I added the space - it works without issues...
danieli has quit [Quit: Leaving]
<toretore> 2.17 lol
eminencehc has joined #ruby
<Andrey> 2.1.7, sorry, got ahead of myself ;)
baweaver has joined #ruby
<Ox0dea> 21>> puts"foo"
<ruboto> Ox0dea # => foo ...check link for more (https://eval.in/436022)
<Ox0dea> Hey, look, not a syntax error.
JoshL has quit []
<Ox0dea> 18>> puts"foo" # not even ten years ago
<ruboto> Ox0dea # => foo ...check link for more (https://eval.in/436023)
DLSteve has quit [Ping timeout: 244 seconds]
MagePsycho has joined #ruby
workmad3 has joined #ruby
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.
workmad3 has quit [Ping timeout: 272 seconds]
Rickmasta has joined #ruby
Neverdie has quit [Quit: http://radiux.io/]
<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 joined #ruby
ddv has joined #ruby
<Andrey> This is what happened initially: http://postimg.org/image/4f6ghtf77/
bugrum has quit [Ping timeout: 272 seconds]
MasterPiece has joined #ruby
marr has quit [Ping timeout: 255 seconds]
<Ox0dea> Andrey: And, as I said, you should be able to reproduce that error by removing the `case` line.
Neverdie has joined #ruby
<Andrey> Ox0dea, you are right (as usual), what gives?
<Ox0dea> Andrey: Are you asking me how that line temporarily disappeared? :P
<Andrey> yeah, if that's what happened
podman has quit [Quit: Connection closed for inactivity]
EllisTAA has joined #ruby
<Ox0dea> Seems to have been the case, but that's a mystery I shan't be able to solve.
<Ox0dea> Unless you're keylogging yourself and would be willing to share. ^_^
devoldmx has joined #ruby
<Andrey> :O
drewvanstone has quit [Ping timeout: 240 seconds]
mprelude has quit [Ping timeout: 264 seconds]
<Andrey> Ox0dea, thanks mate, I'll be back when the gremlins strike again (most likely tomorrow at this time)
<Ox0dea> Andrey: Looking forward to it. :)
mprelude has joined #ruby
da3mian has quit [Quit: Textual IRC Client: www.textualapp.com]
<Ox0dea> Andrey: Bad things happened when I asked for -1 questions, by the way.
<Andrey> :)
swgillespie has joined #ruby
<pipework> Ox0dea: How about a fraction of a question?
<Andrey> "bad things happened" appears to be my middle name
<Ox0dea> pipework: Andrey is using to_i, so that was a no-go.
devoldmx has quit [Ping timeout: 244 seconds]
<pipework> Ox0dea: -0 then?
<Andrey> to_i FTW, can't rely on no floating points...
rezzack1 has quit [Quit: Leaving.]
<Ox0dea> >> -0.0.equal? -0.0 # pipework
<ruboto> Ox0dea # => false (https://eval.in/436024)
<pipework> >> -0
<ruboto> pipework # => 0 (https://eval.in/436025)
Coldblackice is now known as Coldblackice_
Coldblackice_ is now known as Coldblackice_2
Coldblackice_2 is now known as Coldblackice_zz
<Ox0dea> "Real" negative zero is a floating point value.
<Ox0dea> As decreed by IEEE 754, anyhow.
Coldblackice_zz is now known as Coldblackice|2
Coldblackice|2 is now known as Coldblackice
vikaton has quit [Quit: Connection closed for inactivity]
EllisTAA has quit [Quit: EllisTAA]
MasterPiece has quit [Remote host closed the connection]
rezzack has joined #ruby
MasterPiece has joined #ruby
nahtnam has joined #ruby
maletor has quit []
r_baron has quit [Remote host closed the connection]
Melpaws has quit [Quit: Leaving.]
shakes has joined #ruby
<craysiii> https://gist.github.com/craysiii/13cb3c7b61a48c5d5629 any reason why this is happening? first time ive tried to run raw sql.
MasterPiece has quit [Remote host closed the connection]
<craysiii> wrong room sorry.
banjara has joined #ruby
havenwood has joined #ruby
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
[k- has quit [Ping timeout: 246 seconds]
Andrey has quit [Quit: ChatZilla 0.9.92 [Firefox 40.0.3/20150826023504]]
Andrey has joined #ruby
Pupeno has joined #ruby
Andrey has quit [Client Quit]
davedev24 has quit []
juanpablo_ has quit [Quit: (null)]
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sepp2k has quit [Quit: Leaving.]
Kallis has quit [Ping timeout: 264 seconds]
veduardo has joined #ruby
lipoqil has quit [Quit: Connection closed for inactivity]
Kallis has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
swgillespie has left #ruby ["Textual IRC Client: www.textualapp.com"]
veduardo has quit [Ping timeout: 246 seconds]
cantaberry has quit [Ping timeout: 260 seconds]
SenpaiSilver has joined #ruby
eminencehc has joined #ruby
iamninja has joined #ruby
solocshaw1 has joined #ruby
solocshaw has quit [Read error: Connection reset by peer]
solocshaw1 is now known as solocshaw
eminencehc has quit [Ping timeout: 240 seconds]
iamninja has quit [Ping timeout: 250 seconds]
chouhoulis has joined #ruby
petricore has quit [Quit: Textual IRC Client: www.textualapp.com]
sepp2k has joined #ruby
nietzschette has joined #ruby
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]
solocshaw1 is now known as solocshaw
veduardo has joined #ruby
mjuszczak has joined #ruby
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
stardiviner has joined #ruby
ndrei has joined #ruby
segfalt has joined #ruby
Lucky__ has joined #ruby
nietzschette has quit [Quit: Nettalk6 - www.ntalk.de]
DLSteve has quit [Quit: Leaving]
Pupeno has quit [Remote host closed the connection]
bronson has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 246 seconds]
vdamewood has quit [Quit: Life beckons.]
jdawgaz has joined #ruby
veduardo has quit [Ping timeout: 264 seconds]
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
devyn has joined #ruby
TheRinger has joined #ruby
nfisher has quit [Ping timeout: 268 seconds]
konsolebox has quit [Quit: Leaving]
wldcordeiro has quit [Remote host closed the connection]
Asher has quit [Quit: Leaving.]
Asher has joined #ruby
Asher has quit [Client Quit]
wldcordeiro has joined #ruby
shakes has quit [Quit: Leaving]
mprelude has quit [Ping timeout: 250 seconds]
SCHAAP137 has quit [Quit: Leaving]
phutchins has quit [Ping timeout: 240 seconds]
workmad3 has joined #ruby
Asher has joined #ruby
wldcordeiro has quit [Remote host closed the connection]
chills42 has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 246 seconds]
chills42 has joined #ruby
pwnd_nsfw has quit [Ping timeout: 240 seconds]
saddad has quit [Ping timeout: 264 seconds]
wldcordeiro has joined #ruby
chills42 has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 240 seconds]
allcentury has joined #ruby
Rickmasta has joined #ruby
havenwood has joined #ruby
shadoi has quit [Quit: Leaving.]
joegyoung has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
wldcordeiro has quit [Remote host closed the connection]
tkiel has joined #ruby
jamesaxl has quit [Remote host closed the connection]
wldcordeiro has joined #ruby
segfalt has quit [Quit: segfalt]
theone01 has joined #ruby
satansdesciple has joined #ruby
<satansdesciple> what questions we allowed asking here?
<dorei> but ofcourse ruby related questions :p
<satansdesciple> i need understanding with metasploit use priv command
<pontiki> specifically the ruby programming language, not minerals or semi-precious stones :)
<dorei> there's #metasploit for metasploit specific questions
wldcordeiro has quit [Remote host closed the connection]
jdawgaz has joined #ruby
<satansdesciple> nobody in metasploit
<dorei> pontiki: you forgot ruby fonts :p
<satansdesciple> but metasploit is ruby project yes?
wldcordeiro has joined #ruby
<pontiki> dorei: i am never being exhaustive in my statements :)
<pontiki> satansdesciple: seems you got an answer. why is that not good enough?
rezzack has quit [Ping timeout: 268 seconds]
<pontiki> satansdesciple: you can always just ask and see what happens
<pontiki> maybe no one knows it. maybe someone does. but no one can answer an unasked question very easily
<dorei> oh, they aint called fonts, ruby anotations is their name
jackjackdripper1 has quit [Quit: Leaving.]
<satansdesciple> i would like to understand how the use priv command works
<satansdesciple> i know what it does but i would like to understand it and maybe write my own implementation of it
wldcordeiro has quit [Remote host closed the connection]
wldcordeiro has joined #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
amystephen has quit [Quit: amystephen]
bronson has joined #ruby
wldcordeiro has quit [Remote host closed the connection]
linuxboy_ has quit [Remote host closed the connection]
linuxboytoo has joined #ruby
rgb-one has quit [Remote host closed the connection]
devoldmx has joined #ruby
mjuszczak has quit []
lkba_ has joined #ruby
wldcordeiro has joined #ruby
mjuszczak has joined #ruby
joegyoung has joined #ruby
paulcsmith has joined #ruby
lkba has quit [Ping timeout: 246 seconds]
linuxboytoo has quit [Ping timeout: 252 seconds]
karapetyan has joined #ruby
devoldmx has quit [Ping timeout: 265 seconds]
wldcordeiro has quit [Remote host closed the connection]
satansdesciple has quit [Quit: Page closed]
wldcordeiro has joined #ruby
dorei has quit []
Kallis has quit [Read error: Connection reset by peer]
bb010g has joined #ruby
karapetyan has quit [Ping timeout: 268 seconds]
theone01 has quit [Changing host]
theone01 has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Kallis has joined #ruby
Rickmasta has joined #ruby
wldcordeiro has quit [Remote host closed the connection]
wldcordeiro has joined #ruby
drewvanstone has joined #ruby
UtkarshRay has joined #ruby
cb_ has joined #ruby
cb_ has joined #ruby
bronson has quit [Remote host closed the connection]
wldcordeiro has quit [Remote host closed the connection]
startupality has joined #ruby
karapetyan has joined #ruby
michael_mbp has quit [Excess Flood]
CanTonic has joined #ruby
decoponio has quit [Quit: Leaving...]
nfisher has joined #ruby
stardiviner has quit [Ping timeout: 264 seconds]
karapetyan has quit [Ping timeout: 246 seconds]
ramfjord has quit [Ping timeout: 240 seconds]
shapeshifter has quit [Ping timeout: 265 seconds]
sepp2k has quit [Read error: Connection reset by peer]
Kallis has quit [Ping timeout: 265 seconds]
Kallis has joined #ruby
devyn has quit [Ping timeout: 240 seconds]
michael_mbp has joined #ruby
tjbiddle has joined #ruby
benlieb has joined #ruby
startupality has quit [Quit: startupality]
yfeldblum has quit [Remote host closed the connection]
gurnoorinder has joined #ruby
jud has joined #ruby
gurnoorinder has quit [Client Quit]
dopie has joined #ruby
devyn has joined #ruby
linuxboytoo has joined #ruby
gener1c_ has joined #ruby
theone01 has quit [Quit: Going offline, see ya! (www.adiirc.com)]
theone01 has joined #ruby
theone01 has quit [Client Quit]
drewvanstone has quit [Ping timeout: 240 seconds]
gener1c has quit [Ping timeout: 250 seconds]
hashrocket has quit [Quit: Connection closed for inactivity]
stardiviner has joined #ruby
braincrash has quit [Quit: bye bye]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Kallis has quit [Ping timeout: 265 seconds]
HAL2328 has joined #ruby
Kallis has joined #ruby
linuxboytoo has quit [Remote host closed the connection]
linuxboytoo has joined #ruby
braincrash has joined #ruby
iamninja has joined #ruby
rcvalle has joined #ruby
linuxboytoo has quit [Ping timeout: 244 seconds]
platzhirsch has left #ruby [#ruby]
deject3d has quit [Quit: Computer has gone to sleep.]
veduardo has joined #ruby
Neverdie has quit [Quit: http://radiux.io/]
charliesome has joined #ruby
iamninja has quit [Ping timeout: 272 seconds]
shmilan has quit [Ping timeout: 240 seconds]
banjara has quit [Quit: Leaving.]
pontiki has quit [Ping timeout: 272 seconds]
howdoico1 has joined #ruby
fedexo has joined #ruby
linc01n has quit [Ping timeout: 240 seconds]
fastAndSlow has joined #ruby
linc01n_ has joined #ruby
fastAndSlow has left #ruby [#ruby]
fastAndSlow has joined #ruby
devoldmx has joined #ruby
fastAndSlow has left #ruby [#ruby]
deject3d has joined #ruby
webguynow has quit [Ping timeout: 250 seconds]
webguynow has joined #ruby
alexherbo2 has quit [Remote host closed the connection]
Kallis has quit [Read error: Connection reset by peer]
DoYouKnow has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
devoldmx has quit [Ping timeout: 264 seconds]
dima_ has joined #ruby
benlieb has quit [Quit: benlieb]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
gix has quit [Ping timeout: 256 seconds]
gix has joined #ruby
yfeldblum has joined #ruby
HAL2328 has quit [Ping timeout: 240 seconds]
shmilan has joined #ruby
rushed has joined #ruby
charliesome has joined #ruby
wldcordeiro has joined #ruby
Asher has quit [Quit: Leaving.]
bronson has joined #ruby
dima_ has quit [Quit: This computer has gone to sleep]
rcvalle has quit [Quit: rcvalle]
webguynow has quit [Ping timeout: 240 seconds]
ramfjord has joined #ruby
webguynow has joined #ruby
bronson has quit [Ping timeout: 244 seconds]
beauby has joined #ruby
Pupeno has joined #ruby
workmad3 has joined #ruby
craysiii has quit [Remote host closed the connection]
ramfjord has quit [Ping timeout: 246 seconds]
kjones_ has joined #ruby
kjones_ has quit [Max SendQ exceeded]
rcvalle has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Pupeno has quit [Ping timeout: 268 seconds]
workmad3 has quit [Ping timeout: 272 seconds]
Neverdie has joined #ruby
chipotle has joined #ruby
fedexo has quit [Ping timeout: 240 seconds]
yfeldblum has quit [Ping timeout: 240 seconds]
grenierm has joined #ruby
HAL2328 has joined #ruby
darkf has joined #ruby
bruno- has joined #ruby
chipotle has quit [Quit: cheerio]
paulcsmith has quit [Quit: Lingo: www.lingoirc.com]
webguynow has quit [Ping timeout: 252 seconds]
webguynow has joined #ruby
nofxx has joined #ruby
chipotle has joined #ruby
bruno- has quit [Ping timeout: 250 seconds]
EXID123 has joined #ruby
wldcordeiro has quit [Remote host closed the connection]
wldcordeiro has joined #ruby
meatherly has quit []
jdawgaz has joined #ruby
wldcordeiro has quit [Remote host closed the connection]
Ox0dea has quit [Quit: WeeChat 1.3]
meatherly has joined #ruby
arescorpio has joined #ruby
houhoulis has joined #ruby
jgt has joined #ruby
Rollabunna has joined #ruby
Salehi has joined #ruby
karapetyan has joined #ruby
rushed has quit [Quit: rushed]
drewvanstone has joined #ruby
veduardo has quit [Ping timeout: 240 seconds]
bricker has joined #ruby
joegyoung has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
RickHull has joined #ruby
<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> whereas #map {}
<Ox0dea> I think you've grokked the thing.
<beginner_with_qu> Knowing why definitely helps ^^
nfisher has quit [Ping timeout: 244 seconds]
webguynow has quit [Ping timeout: 240 seconds]
<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.
<beginner_with_qu> Right, example from before: https://eval.in/436048 mine, and yours, where it came from: https://eval.in/436014
<RickHull> beginner_with_qu: good question, above
duncannz has joined #ruby
yosafbridge has joined #ruby
<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
AccordLTN has quit []
devoldmx has joined #ruby
zapata has quit [Quit: WeeChat 1.3]
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]
<RickHull> ary = [1,2,3]; hsh = { one: 1, two: 2, three: 3 }
<Ox0dea> >> Array.instance_methods.size # beginner_with_qu
<ruboto> Ox0dea # => 172 (https://eval.in/436052)
<Ox0dea> We're here for you. <3
<RickHull> ary[0] => 1; ary[2] => 3; hsh[:one] => 1
<Ox0dea> beginner_with_qu: Do you tell Amazon that your place is the fifth one on the left?
<RickHull> >> ary = [1,2,3]; ary[0]
<ruboto> RickHull # => 1 (https://eval.in/436053)
<RickHull> >> hsh = { one: 1, two: 2, three: 3 }; hsh[:one]
<ruboto> RickHull # => 1 (https://eval.in/436054)
dima_ has quit [Quit: This computer has gone to sleep]
<beginner_with_qu> I take your point Ox0
<Ox0dea> beginner_with_qu: Arrays have (infinitely) many use cases, of course, but Hashes are certainly more suitable for many problems.
<beginner_with_qu> Basically at any time when you have two objects that need to reference each other
zapata has joined #ruby
<RickHull> eh...
<beginner_with_qu> :Home => "Address"
<RickHull> not so much
<beginner_with_qu> Really?
<beginner_with_qu> Hm
<RickHull> close
* baweaver reads back up
workmad3 has joined #ruby
<beginner_with_qu> Well, I'll actually read about them first, and then come back for the schooling xD
<baweaver> immediate reaction is that this sounds like a database
Mekkis has quit [Ping timeout: 246 seconds]
<Ox0dea> Just general learnings.
<RickHull> so arrays in ruby are like a linked list -- just a sequence of values
<Ox0dea> RickHull: False.
<beginner_with_qu> Its mostly just chatter baweaver
<RickHull> but they are directly addressable
<RickHull> (unlike a linked list)
<RickHull> Ox0dea: ^ :)
<baweaver> Linked List is Lispy
<baweaver> mmmmm
<Ox0dea> >> foo = []; foo[9000] = 42; foo.size # RickHull
<ruboto> Ox0dea # => 9001 (https://eval.in/436055)
<beginner_with_qu> Is linked list ruby?
<baweaver> it's a generic concept
<RickHull> Ox0dea: i am trading pedantry for insight, here
<Ox0dea> RickHull: Unwise, for something so crucial, I would say.
<baweaver> Ox0dea: IT'S OVER 9000!!!!!!!!!!!!
cantaberry has quit []
<Ox0dea> baweaver: Only just!
mistermocha has joined #ruby
<RickHull> beginner_with_qu: if linked list means nothing to you, please nevermind
<beginner_with_qu> lol
<RickHull> arrays are collections of values
<RickHull> they are Enumerable
<RickHull> super useful in tons of contexts
arescorpio has quit [Quit: Leaving.]
<beginner_with_qu> It has a logical meaning Rickhull, but not one based on my experience. My training is in construction of all varieties.
<beginner_with_qu> <_<
<Ox0dea> I've done a terrible and wonderful thing that I shall surely regret in the morning.
<baweaver> Ox0dea: marvelous how often that phrase is uttered on a Friday night
<RickHull> beginner_with_qu: what programming background do you have?
<Ox0dea> My UNIX password is now 24 bytes, is fun to type, and takes less than a second to do so.
devyn has quit [Ping timeout: 264 seconds]
<RickHull> how do you type 24 bytes in less than a second?
<Ox0dea> RickHull: Aha!
<beginner_with_qu> about 12 hours of html and css, with some ancient history in basic java
devyn has joined #ruby
<RickHull> don't say quickly
<baweaver> ZWSP or something?
<Ox0dea> Konami Code! <3
khebbie has joined #ruby
<RickHull> as if an NES controller can help
<RickHull> HAX
<Ox0dea> RickHull: Your keyboard doesn't have arrow keys?
<RickHull> it has A and B too
<beginner_with_qu> I've about two... and half part-time weeks in Ruby.
<beginner_with_qu> <_<;
webguynow has quit [Ping timeout: 240 seconds]
<baweaver> eh, got to start somewhere.
<Ox0dea> RickHull: Yeah, I only used the arrow keys, though.
workmad3 has quit [Ping timeout: 272 seconds]
webguynow has joined #ruby
<Ox0dea> Left Arrow actually sends "\e[D", for example.
<RickHull> beginner_with_qu: checkout https://pine.fm/LearnToProgram/ if you haven't already
<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
webguynow has quit [Ping timeout: 265 seconds]
<baweaver> Ox0dea: but they're too young
<baweaver> you'll scare them
webguynow has joined #ruby
<Ox0dea> I've just linked a repository that uses 174 files to implement FizzBuzz.
nfisher has joined #ruby
bruno- has quit [Ping timeout: 255 seconds]
<baweaver> you monster
pawnbox has joined #ruby
<beginner_with_qu> ^_^
<Ox0dea> Blame the enterprise.
<beginner_with_qu> Honestly, it wasnt very hard
<Ox0dea> beginner_with_qu: Let's see it?
<beginner_with_qu> Sure
<Ox0dea> It's really only meant to weed out folks who've never written a line of code.
<baweaver> >> 'you can show code here too!'
<ruboto> baweaver # => "you can show code here too!" (https://eval.in/436059)
<Ox0dea> >> "Don't you tempt me."
<ruboto> Ox0dea # => "Don't you tempt me." (https://eval.in/436061)
<beginner_with_qu> https://eval.in/436060
dionysus69 has quit [Remote host closed the connection]
<baweaver> Ox0dea will show you how it's done
<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
<Ox0dea> beginner_with_qu: Are you ready?
<beginner_with_qu> ready for which?
<baweaver> beginner_with_qu: the answer is no
<beginner_with_qu> oH
<beginner_with_qu> xD Sorry I went back to the fixxbuzz google
<baweaver> but too late
<beginner_with_qu> I'm multitasking
<baweaver> Ox0dea will show you anyways.
<baweaver> BEHOLD!
<Ox0dea> >> _=$$/$$;__=_-_;@_=_+_;$_=@_+_;$__=@_+$_;$-_=$__*$_;@__=''<<$-_*($__+$_)+@_;$___=''<<$-_*$__-$__<<$-_*($__+@_)<<@__<<@__;@___=''<<$-_*$__-$_*$_<<$-_*($__+$_)-$_<<@__<<@__;(___=->____{$.+=_;____<<($.%$-_==__ ?$___+@___:$.%$_==__ ?$___:$.%$__==__ ?@___:$.);$.<($__*@_)**@_?___[____]:____})[[]]
<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)
<beginner_with_qu> lol what the hell xD
slayerjain has joined #ruby
espreto has joined #ruby
<Ox0dea> beginner_with_qu: This language is better than drugs.
<beginner_with_qu> xD
shinnya has quit [Ping timeout: 264 seconds]
<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]
<ruboto> arup_r # => "1" ...check link for more (https://eval.in/436064)
devoldmx_ has quit [Remote host closed the connection]
<arup_r> Am I doing correct ?
gurnoorinder has joined #ruby
<arup_r> or my regex is buggy
<arup_r> ?
webguynow has joined #ruby
j416 has quit [Ping timeout: 246 seconds]
dopie has quit [Quit: This computer has gone to sleep]
dima_ has joined #ruby
j416 has joined #ruby
<Ox0dea> arup_r: Is that not the result you were expecting?
<arup_r> Ox0dea: For now it is correct..
<arup_r> I am just wondering if it is correct way I am doing.. or I need to write it like
<arup_r> Ok.. seems I am correct
<arup_r> Ox0dea: thanks
<Ox0dea> arup_r: Well, if you're sure you won't sometimes have numbers elsewhere in the string...
<Ox0dea> >> "/tenants/1/resources"[/\d+/]
<ruboto> Ox0dea # => "1" (https://eval.in/436065)
<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…]
Newtonianb has quit [Ping timeout: 255 seconds]
dopie has joined #ruby
Neverdie has quit [Quit: http://radiux.io/]
jackjackdripper has joined #ruby
jackjackdripper has quit [Client Quit]
BenjaminDover has joined #ruby
<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> &ri Array#include?
<Ox0dea> beginner_with_qu: ^
yeticry has joined #ruby
<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.
gurnoorinder1 has joined #ruby
<havenwood> >> 42.gcd 81
<ruboto> havenwood # => 3 (https://eval.in/436076)
<havenwood> Or Grand Central Dispatch.
<BenjaminDover> starting from 0 knowledge to work level knowledge what would you recommend for someone to do to learn ruby?
* baweaver stares
gurnoorinder has quit [Ping timeout: 264 seconds]
* baweaver goes back to watching Silicon Valley
<Ox0dea> That guy fucks.
<baweaver> Ox0dea: ?
<baweaver> still on first season
<Ox0dea> Whoops.
skade has quit [Quit: Computer has gone to sleep.]
<beginner_with_qu> Benjamin, look for online tutorials.
robbyoconnor has joined #ruby
gurnoorinder1 has quit [Ping timeout: 244 seconds]
<beginner_with_qu> BenjaminDover: I started here: https://pine.fm/LearnToProgram/chap_00.html and here: https://www.codecademy.com/learn
BenjaminDover has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<beginner_with_qu> That either helped him, or he didn't care
<beginner_with_qu> <_<
<Ox0dea> He was sort of a troll. :/
<Ox0dea> BenjaminDover = "bend over".
<beginner_with_qu> lol
<havenwood> Good ole Mr. Dover.
Asher has quit [Quit: Leaving.]
firstdayonthejob has joined #ruby
Asher has joined #ruby
<baweaver> Aw, no kick.... No fun.
Asher has quit [Client Quit]
<beginner_with_qu> Hm. Can we set symbols return a specified truth? such as :one < :two && :two < :three && :three < :one == true
<baweaver> no
<Ox0dea> Yes?
<beginner_with_qu> xD
<Ox0dea> >> Symbol < Comparable
<ruboto> Ox0dea # => true (https://eval.in/436077)
<Ox0dea> >> :foo > :bar
<ruboto> Ox0dea # => true (https://eval.in/436078)
<baweaver> why would you though.
<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 <=>.
<Ox0dea> That's perfectly irrelevant here, though. :)
youngbaks has quit [Ping timeout: 260 seconds]
<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
joufflu has joined #ruby
psk17_ has joined #ruby
<zenspider> yours is at least actionable
<beginner_with_qu> mine is just for fun too.
<zenspider> even better. carry on
karapetyan has joined #ruby
<zenspider> Cantaberry: upload? role? repo? outside? error? file? location? ... what?
subshad has quit [Ping timeout: 244 seconds]
<Ox0dea> They're using Chef, but that's about all they've sai^W implied.
<zenspider> ?answers Cantaberry
<ruboto> Cantaberry, How to ask the right questions to get you the right answer: https://www.mikeash.com/getting_answers.html
nfisher has quit [Ping timeout: 264 seconds]
karapetyan has quit [Ping timeout: 246 seconds]
<cantaberry> Well, the answer is "from file".
<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.
<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
<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> Thats where I started, lol. xD
<baweaver> shenanigans!
<beginner_with_qu> in my very first question
<baweaver> Either that or hashes.
<baweaver> {object: :beats}
ndrei has quit [Ping timeout: 244 seconds]
<baweaver> >> {rock: :scissors, scissors: :paper, paper: :rock}[:rock]
<ruboto> baweaver # => :scissors (https://eval.in/436087)
Pumukel has joined #ruby
<beginner_with_qu> whats the reversed colon mean?
dima_ has quit [Quit: This computer has gone to sleep]
<beginner_with_qu> :sym == symbol
<baweaver> >> {rock: :scissors, scissors: :paper, paper: :rock}
<ruboto> baweaver # => {:rock=>:scissors, :scissors=>:paper, :paper=>:rock} (https://eval.in/436088)
<baweaver> it's translated
<baweaver> JSON-like syntax.
karapetyan has joined #ruby
dima_ has joined #ruby
<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.
<beginner_with_qu> 1 == win in this case
<baweaver> Put the equals at the top as that's the cheapest to check.
<beginner_with_qu> cheapest?
<baweaver> val == other
<baweaver> bed for me, getting late.
<beginner_with_qu> now I wish I had actually completed the Hash / Symbol sections of these guides before asking this question xD
baweaver has quit [Remote host closed the connection]
<beginner_with_qu> I'm going to bank this knowledge, learn hashes more thoroughly and return to it after.
<Ox0dea> I'll just leave this here: https://eval.in/436089
<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`.
<Ox0dea> >> self
<ruboto> Ox0dea # => main (https://eval.in/436091)
<Ox0dea> And I'll leave you to sleep on that one. :)
caaspg has quit [Ping timeout: 246 seconds]
<beginner_with_qu> ^_^
ktkh has joined #ruby
<Ox0dea> Night, beginner_with_qu. <3
<beginner_with_qu> Night Ox0dea, I'll let you know what my username becomes when I get to formalizing my idling here. xD
ktkh has joined #ruby
youngbaks has joined #ruby
nfisher has quit [Ping timeout: 260 seconds]
jt__ has joined #ruby
devoldmx has joined #ruby
omarJs has quit [Ping timeout: 240 seconds]
<jt__> hi, I'm stucked koan solution. It crashes whenever I fill the answer http://fpaste.org/269172/65139414/
beauby has quit [Ping timeout: 240 seconds]
pawnbox has quit [Remote host closed the connection]
nfisher has joined #ruby
karapetyan has quit [Remote host closed the connection]
devoldmx has quit [Ping timeout: 265 seconds]
i-blis has joined #ruby
dionysus69 has joined #ruby
<apeiros> jt__: `assert_equal <Dog named 'Fido'>, fidos_self` is not valid ruby
webguynow has quit [Ping timeout: 240 seconds]
<apeiros> mainly the part `<Dog named 'Fido'>`. you probably want that to be a String?
webguynow has joined #ruby
nfisher has quit [Ping timeout: 265 seconds]
youngbaks has quit [Ping timeout: 268 seconds]
omarJs has joined #ruby
<jt__> apeiros: http://fpaste.org/269174/26520761/ this how it was defined and call
<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]
otherj has joined #ruby
{756d6f} has joined #ruby
nfisher has joined #ruby
nfisher has quit [Ping timeout: 252 seconds]
allcentury has quit [Ping timeout: 264 seconds]
MagePsycho has quit [Ping timeout: 264 seconds]
drewvanstone has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
otherj has quit [Quit: .]
tjbiddle has quit [Quit: tjbiddle]
ghormoon has quit [Quit: ZNC - http://znc.in]
nofxx has quit [Ping timeout: 252 seconds]
nfisher has joined #ruby
sepp2k has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
drewvanstone has quit [Ping timeout: 240 seconds]
ghormoon has joined #ruby
<shevy> "Gems are constantly indexed by all kinds of bots, 3rd party services, etc. around the web"
MagePsycho has joined #ruby
<shevy> :(
devoldmx has joined #ruby
devoldmx has quit [Remote host closed the connection]
Ektor has joined #ruby
nfisher has quit [Ping timeout: 246 seconds]
<Ektor> Hi
<shevy> yo Ektor
devoldmx has joined #ruby
<[k-> hello
da3mian has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
noob_ has joined #ruby
Trynemjoel has quit [Excess Flood]
<noob_> hi
nfisher has joined #ruby
Trynemjoel has joined #ruby
devoldmx has quit [Remote host closed the connection]
<[k-> hello
Denis has joined #ruby
<shevy> https://rubygems.org/stats - almost 100.000 registered users
startupality has joined #ruby
<shevy> I wonder what cpan sports there
Denis has quit [Client Quit]
<[k-> 100 registered users only?
<shevy> 100000
ItSANgo has quit [Quit: Leaving...]
<[k-> we use . for decimals, shevy
nfisher has quit [Ping timeout: 240 seconds]
<[k-> do you even physics?
<[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__
<[k-> >> __dir__
<shevy> did you mean "dir"
<ruboto> [k- # => "/tmp/execpad-e66789f89bc5" (https://eval.in/436124)
abyss_ has joined #ruby
<[k-> it's an actual thing
<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> I lately saw a hello world in vala
webguynow has quit [Ping timeout: 256 seconds]
<Cust0sLimen> shevy, but vala ;(
<shevy> the third example is almost 1:1 in ruby, except of course that you can omit the ; and stuff
<shevy> yeah but look at it!
<shevy> Gtk.init (ref args);
<shevy> ruby-gtk also has Gtk.init
<shevy> (it has become optional though, you no longer have to manually do it; but it is still there)
<shevy> window.window_position = WindowPosition.CENTER;
webguynow has joined #ruby
<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!
<apeiros> ?toolbox daveomcd
<ruboto> daveomcd, https://www.ruby-toolbox.com is a website which lists lots of gems, topically organized
<[k-> ?books apeiros
<ruboto> apeiros, You can find a list of recommended books at http://ruby-community.com/pages/links
<[k-> :(
<marahin> apeiros: thank you
frmendes has joined #ruby
drewvanstone has quit [Ping timeout: 272 seconds]
ipstatic has quit [Ping timeout: 272 seconds]
<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]
webguynow has quit [Ping timeout: 240 seconds]
webguynow has joined #ruby
linuxboytoo has quit [Ping timeout: 244 seconds]
workmad3 has joined #ruby
Guest53916 has joined #ruby
Guest53916 has quit [Max SendQ exceeded]
Guest53916 has joined #ruby
Caddee has joined #ruby
workmad3 has quit [Ping timeout: 246 seconds]
<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?
<centrx> krz, The * (splat) makes args into an array
<centrx> krz, Whereas obj1, obj2 is a syntactic list, the * makes it into an actual Array
gurnoorinder has joined #ruby
<mblagden_> krz: (so the implied answer is: you access them as you would access elements of an array)
webguynow has quit [Ping timeout: 244 seconds]
tno has quit [Remote host closed the connection]
webguynow has joined #ruby
davispuh has joined #ruby
beauby has joined #ruby
<krz> so in def call; i have puts args. i get NameError: undefined local variable or method `args'
<krz> let me gist somethign to make this clearer
<krz> https://gist.github.com/f057ac03937ce7e37c12 how do i get access to 'foo' and 'bar' in the instance method call
skade has quit [Quit: Computer has gone to sleep.]
ht__ has quit [Quit: Konversation terminated!]
webguynow has quit [Ping timeout: 260 seconds]
<mblagden_> what "args" is line 9 supposed to be accessing?
webguynow has joined #ruby
<shevy> where are your args man
<[k-> def initialize?
<shevy> he does not have it!
<[k-> or instead of shifting it to initialize, shift it to the instance method call
<krz> i need to access the args (on line 9) that was passed on line 3
Macaveli has joined #ruby
<shevy> you write mystery code
<shevy> you pass args to initialize - and you have no initialize method
<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?
claptor has quit [Quit: this channel is bakas]
<krz> the other on the blog post does not have an intialize method as well
<krz> other=author
stardiviner has quit [Quit: Code, Sex, Just fucking world.]
noob_ has quit [Ping timeout: 246 seconds]
cbyrda has joined #ruby
nfisher has joined #ruby
kobain has joined #ruby
<[k-> illegal assignment
<shevy> which part of the blog do you refer to
lkba has quit [Remote host closed the connection]
<shevy> pointing to the header "Real world services" would have sufficed :D
iamninja has quit [Read error: Connection reset by peer]
<shevy> that's a lot of domain specific code
iamninja has joined #ruby
<shevy> how do you know that his code works?
<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
Hrorek has joined #ruby
<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
cbyrda has quit []
<krz> hmm so for the instance methods to have access to args. i guess def initialize *args should do it
<mblagden_> yeah, you'll need to do something to get args into the instance
Rurik has quit [Ping timeout: 240 seconds]
drewvanstone has joined #ruby
dopie has joined #ruby
nfisher has quit [Ping timeout: 272 seconds]
<krz> kk thanks
webguynow has quit [Ping timeout: 250 seconds]
<mblagden_> anytime
BenjaminDover has joined #ruby
webguynow has joined #ruby
Hrorek is now known as rurik
rurik has quit [Changing host]
rurik has joined #ruby
<krz> i guess @foo, @bar, @baz = args in def initialize. assuming 3 params were passed into .call
ruurd has quit [Quit: ZZZzzz…]
tk__ has quit [Quit: ばいばい]
<krz> sweet. works!
<mblagden_> good stuff :)
atzorvas has joined #ruby
<[k-> but what if you already had an instance?
<[k-> do you only want to have it do the same thing over and over again?
NathanHiggers has joined #ruby
fantazo has joined #ruby
kkeuning has joined #ruby
<shevy> hmm ... .instance_method() versus .method()
chouhoulis has quit [Remote host closed the connection]
Neverdie has joined #ruby
gambl0re has joined #ruby
slayerjain has joined #ruby
kkeuning has quit [Client Quit]
slayerja_ has joined #ruby
webguynow has quit [Ping timeout: 265 seconds]
slayerja_ has quit [Max SendQ exceeded]
hydrozen has joined #ruby
slayerja_ has joined #ruby
slayerjain has quit [Ping timeout: 246 seconds]
lxsameer has quit [Ping timeout: 264 seconds]
youngbaks has quit [Quit: WeeChat 1.3]
webguynow has joined #ruby
<[k-> hmm ... send vs public_send
<shevy> not quite
<shevy> I can use just .send() fine :D
lxsameer has joined #ruby
lxsameer has joined #ruby
<shevy> but in instance_method versus method ... if I wish to obtain the source, I need to know which variant I have to use?
<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
gurnoorinder has quit [Ping timeout: 255 seconds]
matrixise has left #ruby [#ruby]
workmad3 has joined #ruby
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cndiv has joined #ruby
dopie has quit [Quit: This computer has gone to sleep]
frmendes has left #ruby ["Textual IRC Client: www.textualapp.com"]
gurnoorinder has joined #ruby
soulcake has joined #ruby
sumark has quit [Remote host closed the connection]
soulcake has quit [Max SendQ exceeded]
shinnya has joined #ruby
soulcake has joined #ruby
soulcake has quit [Max SendQ exceeded]
sumark has joined #ruby
webguynow has quit [Ping timeout: 260 seconds]
soulcake has joined #ruby
workmad3 has quit [Ping timeout: 265 seconds]
webguynow has joined #ruby
lulzmachine has quit [Quit: Connection closed for inactivity]
bruno- has quit [Ping timeout: 255 seconds]
Drakevr has quit [Ping timeout: 246 seconds]
mgorbach has quit [Quit: ZNC - http://znc.in]
mgorbach has joined #ruby
NathanHiggers has quit [Quit: Page closed]
voltalio has joined #ruby
frmendes has joined #ruby
leitz has quit [Quit: Nappy time]
Caddee has quit [Quit: Leaving]
voltalio has quit [Client Quit]
f00dMonsta has quit [Ping timeout: 260 seconds]
voltalio has joined #ruby
<havenwood> >> require 'rinda/tuplespace'; Rinda::TupleSpace.new.public_method(:notify).source_location
<ruboto> havenwood # => ["/execpad/interpreters/ruby-2.2.0/lib/ruby/2.2.0/rinda/tuplespace.rb", 568] (https://eval.in/436179)
<havenwood> shevy: Just for methods written in Ruby.
veduardo_ has quit [Ping timeout: 240 seconds]
BenjaminDover has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
beauby has quit [Ping timeout: 256 seconds]
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…]
apt-get has quit [Ping timeout: 240 seconds]
workmad3 has joined #ruby
rbennacer has joined #ruby
voltalio has joined #ruby
Ilyes512 has quit [Quit: Textual IRC Client: www.textualapp.com]
hanmac has quit [Ping timeout: 246 seconds]
allomov has quit [Remote host closed the connection]
bkxd has quit [Ping timeout: 240 seconds]
aswen has quit [Ping timeout: 260 seconds]
nfisher has joined #ruby
shmilan has quit [Ping timeout: 255 seconds]
Jackneill has quit [Quit: Leaving]
<arup_r> Matz said "All String literals are immutable (frozen) on Ruby 3".
<arup_r> :(
<arup_r> Why ???
workmad3 has quit [Ping timeout: 256 seconds]
shmilan has joined #ruby
<krz> so far the best read on service objects http://brewhouse.io/blog/2014/04/30/gourmet-service-objects.html
<krz> :D thought id share
<krz> whops
<krz> wrong channel
rbennacer has quit [Remote host closed the connection]
<[k-> for performance sake
<[k-> anyway, ruby is more pure as a result!
allcentury has quit [Ping timeout: 240 seconds]
bricker has quit [Quit: leaving]
nfisher has quit [Ping timeout: 240 seconds]
rbennacer has joined #ruby
<shevy> yeah for performance
<arup_r> [k-: "" will be frozen means.. lots of code will be broken which already wrote
ruurd has joined #ruby
<shevy> yeah
<shevy> you will have a transition period with the magic comment
soulcake has quit [Quit: Quack.]
voltalio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy> I hope I can use the magic comment for the next 50 years to come :>
<arup_r> >> p %w(1 2).each_with_object("") { |a, ob| ob << a }
<ruboto> arup_r # => "12" ...check link for more (https://eval.in/436180)
<arup_r> this code wouldn't work anymore
cb_ has joined #ruby
<shevy> you'd need the comment, then you have the old behaviour
<arup_r> shevy: means ?
<shevy> the comment will decide whether you will have the old behaviour
ktkh has quit [Remote host closed the connection]
<shevy> if you have the comment then it will work as it was before
<shevy> I also think there is a commandline switch, perhaps also a compile time switch
rbennacer has quit [Ping timeout: 244 seconds]
aswen has joined #ruby
rurik has quit [Ping timeout: 272 seconds]
<[k-> obviously i would know the impact!
<shevy> dunno... I'd like to know what kind of performance gain that would yield
<[k-> apparently beneficial
einarj has joined #ruby
hanmac has joined #ruby
<[k-> libobf uses frozen strings!
rurik has joined #ruby
xet7 has joined #ruby
havenn has joined #ruby
slayerja_ has joined #ruby
havenwood has quit [Ping timeout: 250 seconds]
_aeris_ has quit [Remote host closed the connection]
radgeRayden_ has joined #ruby
voltalio has joined #ruby
_aeris_ has joined #ruby
slayerjain has quit [Ping timeout: 240 seconds]
voltalio has quit [Client Quit]
phutchins has quit [Ping timeout: 264 seconds]
gurnoorinder has joined #ruby
aswen has quit [Ping timeout: 260 seconds]
gregf has quit [Quit: WeeChat 1.3]
benlieb has joined #ruby
shmilan has quit [Ping timeout: 244 seconds]
chouhoulis has joined #ruby
tuxero has joined #ruby
elperdut has joined #ruby
gregf has joined #ruby
tejasmanohar has joined #ruby
VeryBewitching has joined #ruby
chouhoulis has quit [Ping timeout: 265 seconds]
gurnoorinder has quit [Ping timeout: 268 seconds]
ericjphillips has joined #ruby
platosha__ has joined #ruby
platosha has quit [Ping timeout: 264 seconds]
einarj has quit [Remote host closed the connection]
jgt has quit [Read error: Connection reset by peer]
einarj has joined #ruby
cb_ has quit [Remote host closed the connection]
ericjphillips has quit [Quit: Leaving.]
shazaum has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
akstunt600 has joined #ruby
akstunt600 has quit [Quit: Leaving]
workmad3 has joined #ruby
einarj has quit [Remote host closed the connection]
umgrosscol has quit [Remote host closed the connection]
ruby-lang529 has quit [Ping timeout: 246 seconds]
workmad3 has quit [Ping timeout: 240 seconds]
soulcake has joined #ruby
v0n has joined #ruby
<shevy> are you people happily coding this weekend
elperdut has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Papierkorb> That, and I learned to hate webdev a little bit more :)
Macaveli has quit [Quit: Textual IRC Client: www.textualapp.com]
joufflu has quit [Read error: Connection reset by peer]
psk17_ has quit [Read error: Connection reset by peer]
sameerynho has joined #ruby
lxsameer has quit [Ping timeout: 268 seconds]
davispuh has quit [Remote host closed the connection]
iamninja has quit [Read error: Connection reset by peer]
iamninja has joined #ruby
<shevy> as long as you love ruby a little bit more at the same time!
<toretore> html can go suck a big fat stick
pabs has quit [Ping timeout: 252 seconds]
pabs has joined #ruby
ledestin has joined #ruby
<shevy> yeah that is a cool idea
<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
swgillespie has left #ruby ["Textual IRC Client: www.textualapp.com"]
umgrosscol has joined #ruby
chouhoulis has quit [Ping timeout: 244 seconds]
havenn has quit [Quit: Textual IRC Client: www.textualapp.com]
<capin> toretore: not sure what you mean, ...personally i always think of HTML as the skeleton of a document.
daveomcd has quit [Ping timeout: 244 seconds]
cashnguns has quit [Quit: I'm just an old fashioned cowboy]
last_staff has quit [Ping timeout: 265 seconds]
futilegames has joined #ruby
stamina has quit [Ping timeout: 255 seconds]
__main__ has quit [Ping timeout: 250 seconds]
dorei has joined #ruby
workmad3 has joined #ruby
krz has quit [Quit: WeeChat 1.2]
<pontiki> moeabdol: all those modify the hooks, the "preferred syntax" is to use the appropriate one where you need to
beauby has joined #ruby
<moeabdol> pontiki: thanks :)
nfisher has quit [Ping timeout: 240 seconds]
freerobby has joined #ruby
fantazo has quit [Quit: Verlassend]
workmad3 has quit [Ping timeout: 268 seconds]
benlieb has quit [Quit: benlieb]
futilegames has quit [Quit: futilegames]
bazbing80 has joined #ruby
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
giuseppesolinas has quit [Quit: Leaving]
futilegames has joined #ruby
futilegames has quit [Client Quit]
pontiki has quit [Quit: "Poets have been mysteriously silent on the subject of cheese." -- G.K.Chesterson]
segfalt has quit [Quit: segfalt]
nfisher has joined #ruby
jamesaxl has joined #ruby
rurik has quit [Ping timeout: 252 seconds]
swgillespie has joined #ruby
nfisher has quit [Ping timeout: 264 seconds]
phutchins has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
rurik has joined #ruby
krz has joined #ruby
allcentury has joined #ruby
nfisher has joined #ruby
dagda1_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
drewvanstone has quit [Ping timeout: 250 seconds]
cb_ has joined #ruby
rurik has quit [Read error: Connection reset by peer]
rurik has joined #ruby
linuxboytoo has joined #ruby
kobain has joined #ruby
ckuhn has joined #ruby
sankaber has joined #ruby
arup_r has quit [Quit: Leaving]
youngbaks has joined #ruby
nfisher has quit [Ping timeout: 240 seconds]
sankaber has quit [Max SendQ exceeded]
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
psy_ has quit [Ping timeout: 265 seconds]
k3asd` has joined #ruby
rikkipitt has joined #ruby
varunwachaspati has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
varunwachaspati has quit [Client Quit]
code1o6 has joined #ruby
dagda1_ has joined #ruby
Fire1o6 has joined #ruby
nfisher has joined #ruby
varunwachaspati has joined #ruby
stamina has joined #ruby
ckuhn has left #ruby ["Textual IRC Client: www.textualapp.com"]
dseitz has joined #ruby
futilegames has joined #ruby
nfisher has quit [Ping timeout: 246 seconds]
darkf has quit [Quit: Leaving]
krz has quit [Quit: WeeChat 1.2]
Melpaws has joined #ruby
nfisher has joined #ruby
meatherly has joined #ruby
frmendes has quit [Quit: Textual IRC Client: www.textualapp.com]
Melpaws has quit [Ping timeout: 255 seconds]
<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]
ericjphillips has joined #ruby
gearnode has joined #ruby
sferik has quit [Quit: Textual IRC Client: www.textualapp.com]
solocshaw has quit [Ping timeout: 240 seconds]
kadoppe has quit [Ping timeout: 265 seconds]
vyorkin has joined #ruby
kadoppe has joined #ruby
futilegames has quit [Quit: futilegames]
umgrosscol has joined #ruby
ericjphillips has quit [Quit: Leaving.]
howdoico1 has joined #ruby
atzorvas has quit [Ping timeout: 250 seconds]
atzorvas has joined #ruby
ericjphillips has joined #ruby
drewvanstone has joined #ruby
fungal has joined #ruby
ramfjord has joined #ruby
naftilos76 has joined #ruby
segfalt has joined #ruby
chuy has quit [Quit: WeeChat 0.3.8]
ericjphillips has quit [Client Quit]
moeabdol1 has joined #ruby
solocshaw has joined #ruby
drewvanstone has quit [Ping timeout: 240 seconds]
moeabdol has quit [Ping timeout: 250 seconds]
UtkarshRay has quit [Ping timeout: 240 seconds]
bigmac has quit [Ping timeout: 240 seconds]
freerobby has joined #ruby
bruno- has joined #ruby
solocshaw has quit [Ping timeout: 240 seconds]
gurnoorinder1 has joined #ruby
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
banister has joined #ruby
banister has quit [Client Quit]
CrazyEddy has quit [Ping timeout: 252 seconds]
minimalism has joined #ruby
pawnbox has quit [Remote host closed the connection]
gurnoorinder has quit [Ping timeout: 240 seconds]
allcentury has quit [Ping timeout: 246 seconds]
workmad3 has joined #ruby
tjohnson has joined #ruby
devoldmx has joined #ruby
banister has joined #ruby
solocshaw has joined #ruby
chouhoulis has joined #ruby
bigmac has joined #ruby
workmad3 has quit [Ping timeout: 246 seconds]
phaze has joined #ruby
cb_ has quit [Remote host closed the connection]
chouhoulis has quit [Ping timeout: 255 seconds]
freerobby has quit [Quit: Leaving.]
youngbaks has quit [Ping timeout: 246 seconds]
freerobby has joined #ruby
phutchins has joined #ruby
tubbo has quit [Ping timeout: 250 seconds]
einarj has joined #ruby
Kallis has joined #ruby
CrazyEddy has joined #ruby
CrazyEddy has quit [Changing host]
CrazyEddy has joined #ruby
malconis has joined #ruby
Kallis has quit [Max SendQ exceeded]
vyorkin has quit [Quit: WeeChat 1.0.1]
bkulbida has quit [Ping timeout: 260 seconds]
Kallis has joined #ruby
tubbo has joined #ruby
Musashi007 has joined #ruby
slayerjain has quit [Ping timeout: 240 seconds]
<shevy> perhaps one of you has a simple idea. I have an array that looks like this:
<shevy> array = ["320107_foo.tar.xz", "330065_bar"]
bigmac has quit [Ping timeout: 240 seconds]
<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?
gurnoorinder1 has left #ruby [#ruby]
<shevy> huh
<shevy> I can return 42 and -1 ?
<Ox0dea> >> (1..10).sort_by { rand -50..50 }
<ruboto> Ox0dea # => [10, 6, 9, 2, 5, 8, 3, 1, 4, 7] (https://eval.in/436231)
Musashi007 has quit [Quit: Musashi007]
<shevy> madness
jcdesimp has joined #ruby
umgrosscol has quit [Remote host closed the connection]
<Ox0dea> dorei: The former is more intention-revealing, but the latter would definitely lead to a cleaner implementation.
__main__ has joined #ruby
solocshaw has quit [Ping timeout: 240 seconds]
<Ox0dea> Then again, how come you've got methods with the same name and different arities?
<Ox0dea> shevy: What point in restricting it to -1, 0, and 1?
Rickmasta has joined #ruby
solocshaw has joined #ruby
chipotle has quit [Ping timeout: 268 seconds]
<Ox0dea> For what it's worth, it's #sort that does this checking the sign of the yielded value, not #sort_by.
Pupeno has quit [Remote host closed the connection]
<Ox0dea> I meant to use #sort in the 1..10 example.
malconis has quit [Quit: Textual IRC Client: www.textualapp.com]
Pupeno has joined #ruby
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…]
<postmodern> pipework, it would appear so? https://github.com/jruby/jruby/wiki/Truffle#nightly-builds
<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
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]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
jason_rad has joined #ruby
<jason_rad> Would someone tell me why this isn't working.. http://pastie.org/private/yvcxkw1zh4iexq0ima1zq
hydrozen has joined #ruby
<jason_rad> nm
<jason_rad> p vs puts
Kallis has quit [Ping timeout: 265 seconds]
chouhoulis has joined #ruby
Newtonianb has joined #ruby
jgt has joined #ruby
Guest53916 has quit [Ping timeout: 264 seconds]
eminencehc has quit [Remote host closed the connection]
Guest53916 has joined #ruby
tubuliferous_ has joined #ruby
chouhoulis has quit [Ping timeout: 244 seconds]
workmad3 has joined #ruby
Kallis has joined #ruby
Kallis has quit [Max SendQ exceeded]
k3asd` has quit [Ping timeout: 272 seconds]
hydrozen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
workmad3 has quit [Ping timeout: 252 seconds]
dagda1_ has joined #ruby
sepp2k has joined #ruby
Melpaws has quit [Quit: Leaving.]
Melpaws has joined #ruby
hydrozen has joined #ruby
vikaton has joined #ruby
Kallis has joined #ruby
BTRE has quit [Ping timeout: 264 seconds]
Beoran_ has quit [Ping timeout: 250 seconds]
dagda1_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
JohnBat26 has quit [Ping timeout: 265 seconds]
spider-mario has quit [Remote host closed the connection]
hydrozen has quit [Client Quit]
skade has joined #ruby
jason_rad has quit [Quit: leaving]
skade has quit [Client Quit]
yardenbar has quit [Ping timeout: 264 seconds]
cornerma1 has joined #ruby
psy_ has quit [Remote host closed the connection]
blackjid has quit [Max SendQ exceeded]
allcentury has quit [Ping timeout: 268 seconds]
blackjid has joined #ruby
cornerman has quit [Ping timeout: 240 seconds]
cornerma1 is now known as cornerman
dagda1 has joined #ruby
decoponio has quit [Read error: Connection reset by peer]
decoponio has joined #ruby
Newtonianb has quit []
bin7me has quit [Read error: Connection reset by peer]
BTRE has joined #ruby
Beoran_ has joined #ruby
hays_ has joined #ruby
nofxx has joined #ruby
nofxx has joined #ruby
hays has quit [Ping timeout: 244 seconds]
CrazyEddy has joined #ruby
allcentury has joined #ruby
hays_ is now known as hays
devoldmx has quit [Remote host closed the connection]
Motoservo has quit [Quit: Motoservo]
ngscheurich has joined #ruby
rurik has quit [Ping timeout: 250 seconds]
phutchins has joined #ruby
mistermocha has joined #ruby
ragingcake has quit [Ping timeout: 244 seconds]
solocshaw has quit [Read error: Connection reset by peer]
ragingcake has joined #ruby
SCHAAP137 has quit [Quit: Leaving]
solocshaw has joined #ruby
solocshaw has quit [Remote host closed the connection]
solocshaw has joined #ruby
kirun has quit [Quit: Client exiting]
rurik has joined #ruby
stamina has quit [Ping timeout: 240 seconds]
ramfjord has quit [Ping timeout: 255 seconds]
ruby-lang490 has joined #ruby
Melpaws has quit [Quit: Leaving.]
michaeldeol has joined #ruby
nfisher has joined #ruby
Kallis has quit [Ping timeout: 265 seconds]
<dorei> when i feel bored, i browse ruby's bug tracker :D
Kallis has joined #ruby
beast has quit [Quit: Leaving]
shinnya has joined #ruby
hectortrope has quit [Remote host closed the connection]
<Ox0dea> dorei: So how do you feel about that "safe navigation" operator?
ramfjord has joined #ruby
nfisher has quit [Ping timeout: 255 seconds]
<shevy> dorei hehe
<shevy> I found browsing the bug tracker is too much work
<shevy> but I look at the changelog
<Ox0dea> #try is really common and pretty useful, but .? looks a little wonky.
workmad3 has joined #ruby
<Ox0dea> It's what other languages use, though. :/
<shevy> goto is also used in other languages!
bigmac has joined #ruby
pontiki has joined #ruby
rodfersou has quit [Remote host closed the connection]
hectortrope has joined #ruby
eGGsha has joined #ruby
eGGsha has quit [Remote host closed the connection]
<dorei> Ox0dea: that's what i was reading, safe navigation operator and now check all the other "bugs" it references :)
<dorei> let me read why #try was rejected
ramfjord has quit [Ping timeout: 250 seconds]
<Ox0dea> The greatest exception message ever: https://github.com/ruby/ruby/blob/trunk/eval.c#L455
workmad3 has quit [Ping timeout: 272 seconds]
<shevy> #try was banned?
<dorei> ah, no reason
<Ox0dea> Just not (yet) accepted into core.
solocshaw has quit [Ping timeout: 240 seconds]
wannalearn has joined #ruby
naftilos76 has quit [Remote host closed the connection]
SCHAAP137 has joined #ruby
SCHAAP137 has joined #ruby
solocshaw has joined #ruby
<shevy> yeah so no #try
<wannalearn> hi, I'm stuck on how to call an instance method within another instance method :(
akkad has joined #ruby
<wannalearn> is that even possible?
<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]
<Ox0dea> wannalearn: https://eval.in/436235
<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}
<ruboto> dorei # => {:a=>1, :b=>2, :c=>3, :d=>4} (https://eval.in/436236)
<dorei> where can i find more info about this usage of ** ?
<shevy> ack
<Ox0dea> dorei: "hash splat"
mistermocha has joined #ruby
wannalearn has quit [Ping timeout: 246 seconds]
aswen has quit [Ping timeout: 260 seconds]
mprelude has quit [Ping timeout: 260 seconds]
<dorei> oh, so it can be used outside def keyword arguments, right?
jamesaxl has quit [Remote host closed the connection]
michael_mbp has joined #ruby
bigmac has joined #ruby
<pipework> It isn't the exact same thing, though they're simliar in behaviour some of the times.
<Ox0dea> dorei: https://eval.in/436237
<dorei> is it documented somewhere in ruby-doc ?
<Ox0dea> Just as * invokes an object's #to_a method, ** invokes #to_hash.
<Ox0dea> An unfortunate incongruity, in my opinion.
<dorei> to_hash? not to_h ?
<Ox0dea> Right. :(
<dorei> :O
workmad3 has joined #ruby
<shevy> \o/
platosha_ has quit [Ping timeout: 268 seconds]
nfisher has joined #ruby
bronson has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 265 seconds]
platosha_ has joined #ruby
Kallis has quit [Read error: Connection reset by peer]
<Ox0dea> /o\
<Ox0dea> I can't even find where ** gets parsed as a unary operator. :<
fantazo has quit [Ping timeout: 265 seconds]
<Ox0dea> Oh. It's because they recycled the tPOW token.
<Ox0dea> Never mind; it's called tDSTAR.
tubuliferous_ has quit [Ping timeout: 260 seconds]
tjohnson has quit [Quit: Connection closed for inactivity]
mistermocha has quit [Remote host closed the connection]
<Ox0dea> https://github.com/jicksta/superators could be so much crazier today.
scripore has joined #ruby
allcentury has quit [Ping timeout: 255 seconds]
saddad has joined #ruby
devoldmx has joined #ruby
brendan- has joined #ruby
workmad3 has joined #ruby
hydrozen has joined #ruby
Oka has joined #ruby
allcentury has joined #ruby
devoldmx has quit [Ping timeout: 264 seconds]
workmad3 has quit [Ping timeout: 240 seconds]
bigmac has quit [Ping timeout: 250 seconds]
CrazyEddy has quit [Ping timeout: 252 seconds]
hydrozen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ruurd has quit [Quit: ZZZzzz…]
rurik has quit [Read error: Connection reset by peer]
unop has quit [Ping timeout: 240 seconds]
segmond has joined #ruby
ngscheurich has quit [Ping timeout: 264 seconds]
rvchangue has quit [Ping timeout: 240 seconds]
Pupeno has joined #ruby
Technodrome has joined #ruby
<Technodrome> i have a good ruby question
<Ox0dea> Yay!
<Technodrome> the gem mechanize, when i assign a = new Mechanize , i got an object
<Ox0dea> Sounds about right.
<apeiros> Technodrome: sounds like javascript
<Technodrome> when i do a = b , b being that object , i get a different instance
<apeiros> it's a = Mechanize.new, not a = new Mechanize
<Ox0dea> Technodrome: I bet you don't.
<apeiros> and no, a = b tells a to reference the same object as b references.
<Technodrome> #<Mechanize:0x007fb2b626a5f0>
<Technodrome> #<Mechanize::Page:0x007fb2b62c2c78>
<Ox0dea> Technodrome: Post code?
<Ox0dea> Objects are not allowed to impose their wills upon Ruby's assignment semantics.
<apeiros> >> a = "hello"; b = a; b.upcase!; a
<ruboto> apeiros # => "HELLO" (https://eval.in/436238)
<Technodrome> a = Mechanize.new
<Technodrome> b = a.get("someurl")
<Technodrome> puts a
<Technodrome> puts b
<Ox0dea> This guy.
<Technodrome> its only 4 lines
<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]
cb_ has joined #ruby
iamninja has joined #ruby
vdamewood has joined #ruby
frmendes has joined #ruby
nfisher has quit [Ping timeout: 250 seconds]
karapetyan has joined #ruby
cb_ has quit [Remote host closed the connection]
phutchins has quit [Ping timeout: 268 seconds]
scripore has joined #ruby
bkxd has quit [Ping timeout: 250 seconds]
karapetyan has quit [Ping timeout: 264 seconds]
nfisher has joined #ruby