hakunin has quit [Remote host closed the connection]
macsteps has joined #ruby
leea has joined #ruby
hakunin has joined #ruby
hakunin has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 244 seconds]
bkxd has joined #ruby
AndChat|460649 has joined #ruby
benhoi has quit [Ping timeout: 260 seconds]
A_Drone has joined #ruby
AndChat|460649 has quit [Client Quit]
Zapperino has quit [Read error: Connection reset by peer]
ElFerna has quit [Client Quit]
Zapperino has joined #ruby
wrkrcoop has quit [Quit: wrkrcoop]
Es0teric has quit [Quit: Computer has gone to sleep.]
macsteps has quit [Ping timeout: 244 seconds]
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
benhoi has joined #ruby
the_rhizo has joined #ruby
<pizzaops>
I'm messing around trying to build a simple progress display, but I can't figure out how to "replace" the existing progress instead of printing it over and over.
<ruby[bot]>
pizzaops: irccloud.com has no syntax highlighting, distracting formatting and loads slowly for most.
<pizzaops>
lol
mtkd has quit [Ping timeout: 260 seconds]
<pizzaops>
Fair enough, but same question.
chouhoulis has quit [Ping timeout: 250 seconds]
mtkd has joined #ruby
<matthewd>
pizzaops: Use print instead of puts to stay on the same line, and write out backspace characters
<pizzaops>
ahh rightg
Rodya_ has quit [Remote host closed the connection]
<pizzaops>
matthewd: so that almost works, but the output now disappears in the end
<pizzaops>
any thoughts?
<hightower2>
Hey, is there a way to call something like <class>.include X, and have X included *after* all already-existing includes in <class>? I am playing with #include and #prepend, but they only specify relation to <class> itself (#include adds after <class>, #prepends adds before <class>, but there seems to be no way to add to the end of all existing includes)
Pupeno has joined #ruby
<hightower2>
Any help on that matter?
<pizzaops>
hightower2: are you K?
byteflame has quit [Ping timeout: 240 seconds]
<hightower2>
pizzaops, K as in ...?
<pizzaops>
hightower2: I'm intentionally not saying your (possible) first name on the internet :)
<pizzaops>
Does your first name start with K
dminuoso_ has quit [Ping timeout: 276 seconds]
<hightower2>
pizzaops, no
CloCkWeRX has quit [Remote host closed the connection]
<pizzaops>
Ah, never mind then. Thought you might be an ex-coworker of mine,.
<pizzaops>
s/,./.
bkxd has quit [Ping timeout: 240 seconds]
<pizzaops>
Damn it, hipchat has given me bad habits.
<spectrum>
binding is a ruby built in that points to the current context
<hightower2>
Oh boy, it appears one can assign to #ancestors. Awesome stuff
<matthewd>
pizzaops: Are you outputting final backspaces that you don't want to? Or maybe need to then output a newline instead?
<spectrum>
erb is a better solution that interpolating because it means your strings can know about your choice class but your choice class doen't hvae to know anything about your strings
Pupeno has quit [Ping timeout: 265 seconds]
solars has joined #ruby
<matthewd>
hightower2: Umm.. I don't think that's true
p0p0pr37 has quit [Remote host closed the connection]
<pizzaops>
matthewd: the problem in my case is that recieved_objects and total_objects return multiple times out even after they ==
<pizzaops>
so i have to store state, like "how many times have i printed this" if i want to remove the backspace in some "final" printout
<drbrain>
hightower2: you can't edit #ancestors directly:
<drbrain>
>> o = Object.new; def o.each() yield 1 end; o.singleton_class.ancestors << Enumerable; o.map { |e| e + 1 }
<ruby[bot]>
drbrain: # => undefined method `map' for #<Object:0x41809918> ...check link for more (https://eval.in/616431)
<hightower2>
matthewd, ah, indeed. It returns with the element added, but on next call ancestors is reset back to what it was
replay has quit []
Derperperd has joined #ruby
<drbrain>
>> o = Object.new; def o.each() yield 1 end; o.singleton_class.include Enumerable; o.map { |e| e + 1 }
<drbrain>
hightower2: if you want B to appear earlier in (toward the start of) #ancestors than A then include A before include B
<matthewd>
hightower2: Apart from including into a superclass, I don't know of a way to make a later include act as if it occurred prior to others that have already happened
<matthewd>
pizzaops: Where are you putting the backspaces? :/
<hightower2>
matthewd, drbrain : yeah, no particularly convenient way to do this. Currently, I am thinking I will use a "hack" of sorts, to #prepend the first batch of modules, and then to #include the second. That will make the first batch appear earlier in the ancestors chain than what I #include later. Which is the effect I want, and which wouldn't be possible if I used #include or #prepend twice.
zacts has joined #ruby
JeanCarloMachado has quit [Remote host closed the connection]
<hightower2>
drbrain, right, understood. I am hoping that it'll work in my case, but we'll see
<drbrain>
if you can change include to prepend then you should also be able to change the include order
JeanCarloMachado has quit [Remote host closed the connection]
rkazak has quit [Quit: Sleep.....ing....]
<drbrain>
but if include order is a problem such that you need to make these changes you might want to reduce the complexity that requires that much effort
<drbrain>
in other words, what you have described is, to me, code smell
aries_liuxueyang has joined #ruby
JeanCarloMachado has joined #ruby
Nawn has joined #ruby
leea has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<hightower2>
drbrain, heh, yeah it's becoming obvious I won't be able to use prepend. My issue is this: I include modules C and D and the include chain becomes [ MyClass, C, D ]. Then later I would like to "include" modules A and B and fit them after MyClass, but before C. However, I don't see a way to do with with #include or #prepend
<matthewd>
hightower2: But why do you want to do that?
<drbrain>
matthewd: super order is my guess
<hightower2>
Because I need to autodetect which exact modules should A and B be, and I require C and D to be loaded before I can perform the autodetection
qguv has quit [Quit: bye]
jenrzzz has quit [Ping timeout: 265 seconds]
<hightower2>
I could easily just include A, B, C, D, but I don't know what A and B will be until I include C and D
<matthewd>
hightower2: And C/D wrap methods that are also wrapped by A/B, in a way where the order of enwrapment matters?
<drbrain>
hightower2: I think your description is off, because ↑ matches your paragraph above
<hightower2>
Sort of -- when I run MyClass.new, the chain of initialize()s must be MyClass, A, B, C, D. And also C and D contain helper functions which allow me to determine A and B
<drbrain>
so you include D; include C; do the things to determine what to include next (A, B) include those, MyClass.new
<drbrain>
?
JeanCarloMachado has quit [Remote host closed the connection]
<drbrain>
or does "do the things to determine what to include next" involve MyClass.new?
<matthewd>
You create an instance of MyClass when it only has C and D included, then use methods they provided to decide whether A/B will get included into the *class*? Or the singleton class?
<matthewd>
I think an abbreviated version of real code / real names might help here
rajdesai has joined #ruby
<hightower2>
drbrain, yes, my mistake, I am tired. You are right, just calling include twice would get me what I need. But I actually need the chain to be [ MyClass, C, D, A, B ], and there is no way it seems to include at the end, one can only #include after MyClass, or before it with #prepend
<drbrain>
ah-ha, OK, that's harder
<drbrain>
you could make class MyClass < ClassForIncludes
<drbrain>
then include A and B into ClassForIncludes
leea has joined #ruby
<drbrain>
where ClassForIncludes is empty
<drbrain>
(I don't have a good name for it offhand)
Rodya_ has joined #ruby
<hightower2>
I did something like that, yes, just need to double check why it's not working as I expected. Working on that as we speak
zacts has quit [Quit: WeeChat 1.4]
JeanCarloMachado has joined #ruby
<matthewd>
You could also dup MyClass, make the decision using that, then do the real includes on the 'good' one
<matthewd>
I'd try to disentangle the initialize order first, though
<matthewd>
If it works when only C & D are there, they can't be *that* dependent on A & B running first...
Nawn has quit [Remote host closed the connection]
whathappens has joined #ruby
rajdesai has quit [Remote host closed the connection]
<matthewd>
`def initialize; ab_init if respond_to?(:ab_init); super; end` in the class; C/D define initialize; A/B define ab_init instead
Rodya_ has quit [Ping timeout: 250 seconds]
kgutteridge has joined #ruby
Asher has quit [Ping timeout: 244 seconds]
<hightower2>
drbrain, managed to do it with your suggestion about empty class and including there. Now I have: class X end class Y < X include C end X.include *module_list, and that produces the order I required.
<hightower2>
drbrain, matthewd : thanks for the discussion
jenrzzz has joined #ruby
JeanCarloMachado has quit [Remote host closed the connection]
whathappens has quit [Ping timeout: 276 seconds]
<astrobunny>
BLESS NAMED PARAMETERS
leea has quit [Ping timeout: 250 seconds]
<astrobunny>
OH HAIL AND EXALT THEIR NAME
* astrobunny
will go away now
<drbrain>
astrobunny: NAMED PARAMETERS BEST PARAMETERS
<astrobunny>
\o/
<astrobunny>
NO MORE min = options[:minsize] || 1
<drbrain>
I still wish matz would give us a free : following the method name so we could write some smalltalk
shmuli has joined #ruby
A_Drone has quit [Remote host closed the connection]
<aeruder>
and/or obj-c :)
<aeruder>
i do find the named argument style of obj-c and smalltalk is really easy to remember parameter order
<astrobunny>
now now
<aeruder>
less annoying if you type fast :)
marr has quit [Ping timeout: 260 seconds]
rajdesai has joined #ruby
blackmesa has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
JeanCarloMachado has joined #ruby
A_Drone has joined #ruby
TPug has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Danny_ has quit [Remote host closed the connection]
Danny_ has joined #ruby
sdothum has joined #ruby
benhoi has joined #ruby
mistermocha has quit [Ping timeout: 250 seconds]
chouhoulis has quit [Ping timeout: 240 seconds]
alfiemax has joined #ruby
bkxd has quit [Ping timeout: 276 seconds]
blackgoat has quit [Ping timeout: 244 seconds]
workmad3 has joined #ruby
dionysus69 has joined #ruby
davedev24 has quit [Remote host closed the connection]
rajdesai has joined #ruby
ByronJohnson is now known as bairyn
davedev24 has joined #ruby
sarbs has quit [Max SendQ exceeded]
workmad3 has quit [Ping timeout: 276 seconds]
sarbs has joined #ruby
Ropeney has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
Danny_ has quit []
hakunin has joined #ruby
solars has joined #ruby
dessm has quit [Quit: ChatZilla 0.9.92 [Firefox 47.0.1/20160630070928]]
Rodya_ has joined #ruby
rajdesai has quit [Remote host closed the connection]
nettoweb has joined #ruby
macsteps has joined #ruby
solars has quit [Ping timeout: 252 seconds]
the_rhizo has quit [Ping timeout: 240 seconds]
jaguarmagenta has joined #ruby
<astrobunny>
having so much fun deleting options={}
Zapperino has quit [Read error: Connection reset by peer]
AndChat|460649 has joined #ruby
griffindy has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
jaguarmagenta has quit [Ping timeout: 264 seconds]
sdothum has joined #ruby
Sucks has joined #ruby
blackgoat has joined #ruby
Sucks has quit [Max SendQ exceeded]
Sucks has joined #ruby
blackmesa has joined #ruby
JesseH has joined #ruby
Asher has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
MadGrin has joined #ruby
blackmesa has quit [Ping timeout: 258 seconds]
shmuli has joined #ruby
zacts has quit [Read error: Connection reset by peer]
connor_goodwolf has quit [Ping timeout: 250 seconds]
enterprisey has quit [Quit: Leaving]
skweeke has quit [Ping timeout: 258 seconds]
RegulationD has joined #ruby
sarbs has quit [Ping timeout: 258 seconds]
connor_goodwolf has joined #ruby
MadGrin has quit [Remote host closed the connection]
sarbs has joined #ruby
davedev24 has quit []
circ-user-nmnGB has joined #ruby
Pupeno has joined #ruby
circ-user-nmnGB has quit [Remote host closed the connection]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
Spami has joined #ruby
shmuli has quit [Ping timeout: 250 seconds]
RegulationD has quit [Ping timeout: 276 seconds]
jdawgaz has joined #ruby
symm- has quit [Ping timeout: 264 seconds]
A_Drone has quit [Remote host closed the connection]
Pupeno has quit [Ping timeout: 240 seconds]
jdawgaz has quit [Client Quit]
govg has quit [Ping timeout: 258 seconds]
jdawgaz has joined #ruby
bkxd has joined #ruby
jdawgaz has quit [Client Quit]
aryaching has quit [Read error: Connection reset by peer]
skweek has joined #ruby
TheWhip has joined #ruby
SilverKey has joined #ruby
A_Drone has joined #ruby
diegoviola has quit [Quit: WeeChat 1.5]
TheWhip has quit [Ping timeout: 244 seconds]
dpk_ has joined #ruby
OTORelic1 has quit [Read error: Connection reset by peer]
aryaching has joined #ruby
OTORelic1 has joined #ruby
roflmyeggo has joined #ruby
rajdesai has joined #ruby
jackjackdripper has joined #ruby
tubuliferous has joined #ruby
jackjackdripper has quit [Client Quit]
jackjackdripper has joined #ruby
bkxd has quit [Ping timeout: 244 seconds]
Hyuk has joined #ruby
tubuliferous has quit [Ping timeout: 240 seconds]
royalty has joined #ruby
OTORelic1 has quit [Read error: Connection reset by peer]
drahosj_ has quit [Quit: Leaving]
<royalty>
hello gents i have a question somewhat related to ruby versioning
<royalty>
you see i'm trying to install a gem, gem install json
<royalty>
i get the following error
OTORelic1 has joined #ruby
<royalty>
ERROR: Error installing json:
<royalty>
json requires Ruby version ~> 2.0.
<royalty>
so i do a ruby -v and I get 2.0
<royalty>
this leads me to believe that my gem handler is not using the right ruby on my system...
<royalty>
am i on the right track in this...
the_rhizo has joined #ruby
nirix has joined #ruby
<royalty>
ahh has to do with bundler...
<royalty>
i seem to have found the solution
<Nilium>
IRC is the universal rubber ducky debugger.
<aeruder>
lol
the_rhizo has quit [Ping timeout: 276 seconds]
<royalty>
nevermind
<royalty>
haha
<royalty>
i reinstalled bundler
braincra- has quit [Quit: bye bye]
<aeruder>
i feel like i just caught a glimpse of royalty's tech-diary
<royalty>
and now i got could not locate gemfile when i typed bundle env
<royalty>
I'm basically on a docker container and trying to gem install json
spudowiar has quit [Quit: Leaving.]
<royalty>
i hope you are enjoying my diary
<royalty>
i will one day create a blog about all this
<aeruder>
i think at this point everyone is just giving it about 15 minutes for you to solve all your own problems
<aeruder>
:)
maloik has quit [Remote host closed the connection]
maloik has joined #ruby
etetz has joined #ruby
hahuang61 has joined #ruby
blackmesa has joined #ruby
vrand has joined #ruby
jishankai has joined #ruby
TheWhip has joined #ruby
<royalty>
aeruder, you are probably right i think i got it
<royalty>
the truth is i'm an absolute madman
<royalty>
fixing my own problems soon after i ask questions
<aeruder>
i'm glad i could help by reading your questions
etetz has quit [Ping timeout: 258 seconds]
hahuang61 has quit [Ping timeout: 260 seconds]
rkazak has joined #ruby
blackmesa has quit [Ping timeout: 252 seconds]
braincras has joined #ruby
VA3VNA has joined #ruby
rkazak has quit [Client Quit]
AciD` has quit [Ping timeout: 244 seconds]
vrand has quit [Remote host closed the connection]
<royalty>
aeruder, i got it working
<royalty>
yayyyy
<royalty>
setting up vms to run code is a nightmare, and i am determined to work through that nightmare, for the promise of a higher paying job some day
etetz has joined #ruby
<aeruder>
:)
macsteps has quit [Remote host closed the connection]
<randombot4219>
i don't understand that code either
<dminuoso>
bougyman: The thing is it should be better called "dynamic type checking"
<bougyman>
dminuoso: that makes a lot more sense.
<randombot4219>
@parser.parse
<dminuoso>
In essence it's type checks at runtime. When you use "include" Ruby makes sure it's a module and not a class - that is an example of dynamic type checking.
<randombot4219>
why would you recursively call that function
<randombot4219>
like tht
<randombot4219>
that
A_Drone has joined #ruby
<randombot4219>
i don't understand how puts gets ran and how it's not an infinite recursive loop
<dminuoso>
randombot4219: It's not a recursive call unless you pass it an instance of XmlParser.
<randombot4219>
i thought parse was the method
govg has joined #ruby
<randombot4219>
and it's using that parse method
<dminuoso>
randombot4219: line 7 calls the "parse" method on the ivar @parser, whatever that may be.
A_Drone has quit [Read error: Connection reset by peer]
<randombot4219>
is there a less confusing way to write that?
mark_66 has joined #ruby
<dminuoso>
randombot4219: Assuming @parser is not an XmlParser instance, then you are simply delegating a method. So you could use Rubies Delegator facility.
<randombot4219>
wow
<randombot4219>
i have no idea what you are talking about
<randombot4219>
i'm so sorry
<dminuoso>
Whether that is less confusing depends... :-)
<randombot4219>
i feel really, really stupid
<dminuoso>
randombot4219: The code is confusing though. Something should be renamed for clarification.
TomyLobo has quit [Ping timeout: 264 seconds]
dminuoso_ has quit [Ping timeout: 276 seconds]
blaxter has joined #ruby
Billias has joined #ruby
dminuoso_ has joined #ruby
mistermocha has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
randombot4219 has quit [Quit: Page closed]
yeticry has quit [Read error: Connection reset by peer]
craysiii has joined #ruby
Billias has quit [Ping timeout: 258 seconds]
mistermocha has quit [Ping timeout: 250 seconds]
Emmanuel_Chanel has quit [Ping timeout: 264 seconds]
aganov has joined #ruby
Emmanuel_Chanel has joined #ruby
dminuoso has quit [Remote host closed the connection]
yeticry has joined #ruby
hipertracker has joined #ruby
DoubleMalt has joined #ruby
ta_ has joined #ruby
Billias has joined #ruby
ICantCook has quit [Quit: bye]
sebstrax has joined #ruby
Pupeno has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
woodruffw has quit [Excess Flood]
camilasan has joined #ruby
woodruffw has joined #ruby
woodruffw has quit [Excess Flood]
woodruffw has joined #ruby
woodruffw has quit [Excess Flood]
the_drow has joined #ruby
woodruffw has joined #ruby
woodruffw has quit [Excess Flood]
woodruffw has joined #ruby
woodruffw has quit [Excess Flood]
woodruffw has joined #ruby
woodruffw has quit [Excess Flood]
woodruffw has joined #ruby
woodruffw has quit [Excess Flood]
paradisaeidae_ has joined #ruby
woodruffw has joined #ruby
woodruffw has quit [Excess Flood]
djbkd has quit [Remote host closed the connection]
hipertracker has quit [Quit: hipertracker]
dminuoso has joined #ruby
A_Drone has joined #ruby
AndChat|460649 has joined #ruby
submitnine has joined #ruby
Zapperino has quit [Read error: Connection reset by peer]
Ishido has joined #ruby
TomyWork has joined #ruby
jdmueller has joined #ruby
jdmueller has quit [Remote host closed the connection]
Sucks has quit [Quit: Leaving]
cajone has quit [Ping timeout: 260 seconds]
hahuang61 has joined #ruby
andikr has joined #ruby
last_staff has quit [Quit: last_staff]
last_staff has joined #ruby
zotherstupidguy has quit [Quit: WeeChat 1.5]
poguez_ has quit [Quit: Connection closed for inactivity]
hahuang61 has quit [Ping timeout: 252 seconds]
OTORelic4 has joined #ruby
matp has quit [Ping timeout: 252 seconds]
craysiii has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Hyuk has joined #ruby
shellie_ has joined #ruby
Hyuk has quit [Client Quit]
blackmesa has joined #ruby
OTORelic4 has quit [Ping timeout: 258 seconds]
sp__ has joined #ruby
nhhc has quit [Ping timeout: 250 seconds]
paradisaeidae_ has quit [Quit: ChatZilla 0.9.92 [Firefox 48.0/20160726073904]]
Hyuk has joined #ruby
antgel has joined #ruby
cajone has joined #ruby
pwnd_nsfw has joined #ruby
sp__ has quit [Ping timeout: 258 seconds]
Macaveli has joined #ruby
bkxd has joined #ruby
LoneHerm_ has quit [Read error: Connection reset by peer]
blackmesa has quit [Ping timeout: 240 seconds]
Pupeno has quit [Remote host closed the connection]
mistermocha has joined #ruby
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jonec has joined #ruby
mistermocha has quit [Ping timeout: 250 seconds]
LoneHerm_ has joined #ruby
pawnbox has quit [Remote host closed the connection]
LoneHerm_ has quit [Remote host closed the connection]
TheWhip has quit [Remote host closed the connection]
A_Drone has quit [Remote host closed the connection]
firstdayonthejob has quit [Ping timeout: 250 seconds]
dminuoso_ has quit [Read error: Connection reset by peer]
dminuoso_ has joined #ruby
Pupeno has joined #ruby
matcouto has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
AndrewIsHere has joined #ruby
blackmesa has joined #ruby
A_Drone_ has joined #ruby
A_Drone_ has quit [Remote host closed the connection]
A_Drone_ has joined #ruby
nickname_ has joined #ruby
Ropeney has joined #ruby
AndrewIsHere has quit [Ping timeout: 250 seconds]
bkxd has quit [Ping timeout: 244 seconds]
rajdesai has joined #ruby
marr has joined #ruby
<nickname_>
hi
mrgrieves has joined #ruby
sameerynho has joined #ruby
Silthias1 has joined #ruby
memorasus has quit [Ping timeout: 258 seconds]
Zapperino has joined #ruby
Ropeney has quit [Client Quit]
zapata has joined #ruby
<Zapperino>
God morning
<dminuoso>
?hi
<ruby[bot]>
dminuoso: I don't know anything about hi
<dminuoso>
?morning
<ruby[bot]>
dminuoso: I don't know anything about morning
<dminuoso>
Fine.
daffy_duck_3 is now known as nekompetentnyj
<Zapperino>
lol
pawnbox has joined #ruby
Silthias has quit [Ping timeout: 265 seconds]
<rubirc>
?help
sp_ has joined #ruby
craigp_ has quit [Quit: WeeChat 1.5]
craigp has joined #ruby
lxsameer has quit [Ping timeout: 260 seconds]
Silthias1 has quit [Ping timeout: 264 seconds]
nickname_ has quit [Ping timeout: 264 seconds]
jaguarmagenta has joined #ruby
A_Drone_ has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
etetz has joined #ruby
atom_ has joined #ruby
Silthias has joined #ruby
Snowy has joined #ruby
jaguarmagenta has quit [Ping timeout: 252 seconds]
hipertracker has joined #ruby
jackjackdripper has joined #ruby
etetz has quit [Ping timeout: 244 seconds]
elaptics`away is now known as elaptics
ledestin has quit [Ping timeout: 260 seconds]
rajdesai has quit [Remote host closed the connection]
anisha has quit [Quit: This computer has gone to sleep]
RegulationD has quit [Ping timeout: 244 seconds]
nickname_ has quit [Client Quit]
joonty has quit [Quit: This computer has gone to sleep]
sp_ has joined #ruby
<[spoiler]>
Given something like this: `(n..m).step s` (which will return an Enumerator), how would you get `m`, or access the underlying Range object again? I am not sure it can be done without resorting to C…
tvw has quit []
joonty has joined #ruby
pawnbox has quit [Remote host closed the connection]
TheWhip has quit [Remote host closed the connection]
<[spoiler]>
The only thing that comes to mind is to get the `receiver` ivar (int being `:receiver`, not `:@receiver`), which can't be done from within Ruby, unless there's a way to access instance variables without instance_variable_get?
jenrzzz has joined #ruby
raeoks has joined #ruby
Sooo has quit []
moei has joined #ruby
tomphp has joined #ruby
mistermocha has joined #ruby
jwheare has joined #ruby
<jhass>
I guess you could do it with Fiddle
<jhass>
but perhaps just don't
pandaant has joined #ruby
mistermocha has quit [Ping timeout: 249 seconds]
joneshf-laptop has joined #ruby
<dminuoso>
[spoiler]: I don't understand exactly what you are doing. Are you trying to get into the binding of the caller?
pawnbox has joined #ruby
<jwheare>
hi, i'm from irccloud and was recently drawn attention to the fact that you don't like our pastebins in here (https://imgur.com/C6A4haj) not trying to sway you back, but i'd like to understand the reasons a bit better so we can make any improvements. slowness is fair, but we *do* have syntax highlighting and i'm not sure what's meant by "distracting
<jwheare>
formatting" can anyone shed some light? thanks
mim1k has joined #ruby
<[spoiler]>
jhass: I don't want to resort to that either. I see someone made a pending PR a few years back, but it kinda got cold. I'll just refactor then
lazyatom has joined #ruby
<dminuoso>
jwheare: I would redirect you to apeiros who I believe is mainly responsible for the bot.
der-landgraf has quit [Quit: WeeChat 1.5]
TheWhip has joined #ruby
anisha has joined #ruby
blackmesa has quit [Ping timeout: 276 seconds]
Pupeno has quit [Remote host closed the connection]
<jhass>
jwheare: if people just paste stuff there doesn't appear to be syntax highlighting, I don't have any on https://www.irccloud.com/pastebin/pHd5e2yY/ for example. Also the font is tiny for me
<[spoiler]>
jwheare: Chrome renders `Ubuntu Mono` for me
<jwheare>
i suspect it's Liberation Mono vs Ubuntu Mono
<[spoiler]>
Yep
<jwheare>
same size (12px) though
<davorb>
spoiler: how do you check what font is actually rendered in chrome (i know ff has this built in)?
<jwheare>
styles panel -> computed -> scroll down
<jwheare>
"Rendered Fonts"
<[spoiler]>
davorb: so does chrome, but you need to get all the way down to the text node in the DOM view
mistermocha has joined #ruby
<[spoiler]>
or anything which "directly [and recursively] nests" the text node
<[spoiler]>
But otherwise, what jwheare said
tomphp has quit [Ping timeout: 258 seconds]
<davorb>
jwheare: that's the first place i looked, but it isn't there. maybe chromium hasn't patched that in yet, or something.
<[spoiler]>
jwheare: Also, the syntax highlighting could be better :)
<jwheare>
yeah, noted
<[spoiler]>
davorb: it is there, you just need to be more specific about the node
<jhass>
jwheare: how about guessing the syntax highlighting from the channel name btw? highlighters.find {|highlighter| channel.name.include? highlighter.name.downcase } basically
<jwheare>
jhass: heh, too magic for my tastes
<davorb>
jhass: ah, yeah. found it now, thanks. it's rendering ubuntu mono for me.
<jwheare>
but you can always tell users to edit the syntax manually in future, same as with gists
<jwheare>
is liberation mono shipped with most linux distros?
<jhass>
the thing is I've seen an irccloud paste with syntax highlighting maybe once, people are completely ignorant about it
astrobun_ has quit [Remote host closed the connection]
blackmesa has joined #ruby
<jwheare>
anyway, thanks for the info, sorry for derailing the channel
<dminuoso>
jwheare: It's fine.
<dminuoso>
This channel has a tendency to derail on a regular basis. :-)
<[spoiler]>
That's a common thing anyway
<jwheare>
i'll see if we can make some improvements, but completely understand if you still prefer gist :)
<dminuoso>
[spoiler]: Regarding your initial question... tap!
<dminuoso>
Kind of a shotgun solution though.
bkxd has quit [Ping timeout: 240 seconds]
antgel has quit [Ping timeout: 276 seconds]
A_Drone has quit [Remote host closed the connection]
<[spoiler]>
dminuoso: I know what tap is, but not sure what you mean, unless you mean `(n..m).tap{|o| do_something_with o.end }.step s`?
rajdesai has joined #ruby
mooru has joined #ruby
hipertracker has quit [Ping timeout: 260 seconds]
<[spoiler]>
Meh, this code needs refactoring anyway (IMO), it'll be more useful after the refactoring anyway :)
<dminuoso>
Uh, so "e rescue x" gives "x" if e throws any exception?
* dminuoso
scratches his head.
Devalo has joined #ruby
<dminuoso>
[spoiler]: Well something along these lines. I mean the only real need to get the "range" object is because you are trying to write a one-liner, am I right?
hahuang61 has joined #ruby
mcqr has joined #ruby
atom_ has joined #ruby
blackgoat has joined #ruby
Devalo has quit [Ping timeout: 258 seconds]
<atom_>
Hi, what would be the best book to learn RSpec? there are a couple of books but they seem outdated from the comments I've seen around
hahuang61 has quit [Ping timeout: 260 seconds]
rajdesai has quit [Remote host closed the connection]
OTORelic4 has joined #ruby
rajdesai has joined #ruby
symm- has joined #ruby
A_Drone has joined #ruby
karapetyan has joined #ruby
OTORelic4 has quit [Ping timeout: 258 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
rajdesai has quit [Ping timeout: 250 seconds]
jackjackdripper has quit [Quit: Leaving.]
<[spoiler]>
dminuoso: It's not a one-liner, I just didn't realise I'd need the `m` value, so wrote a lot of it around Enumerators (I know, I know, that's cheating).
<[spoiler]>
atom_: Uh, the documentation is pretty good. IDT there's that much to learn for you to require a whole book
<jhass>
and if it's about learning the workflows/core concepts, those didn't change in the last couple years, just ignore the syntax
binaryplease has quit [Ping timeout: 252 seconds]
A_Drone has quit [Remote host closed the connection]
A_Drone has joined #ruby
tubuliferous has joined #ruby
majuscule has quit [Ping timeout: 244 seconds]
karapetyan has quit [Remote host closed the connection]
majuscule has joined #ruby
mooru has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hipertracker has joined #ruby
edgr has quit [Ping timeout: 276 seconds]
A_Drone has quit [Remote host closed the connection]
A_Drone has quit [Read error: Connection reset by peer]
sp_ has quit [Ping timeout: 260 seconds]
nerium has joined #ruby
caw has quit [Ping timeout: 260 seconds]
jaguarmagenta has joined #ruby
mistermocha has quit [Ping timeout: 250 seconds]
blackmesa has quit [Ping timeout: 258 seconds]
A_Drone has joined #ruby
caw has joined #ruby
freerobby has joined #ruby
jaguarmagenta has quit [Ping timeout: 244 seconds]
bkxd has joined #ruby
matrium_ has joined #ruby
meoblast001 has joined #ruby
<matrium_>
hi, I'm getting the error "Could not find minitest-5.8.4.gem for installation" even though my "gem list" show "minitest (5.9.0, 5.8.4)"
sp_ has joined #ruby
<dminuoso>
matrium_: Please gist the Gemfile you are using, the command that provokes the error and a full stack trace.
TaRosh has joined #ruby
incomprehensibly has quit [Ping timeout: 264 seconds]
<dminuoso>
matrium_: Also tell me what kind of ruby installation you are using (system ruby, rvm/rbenv/chruby)
craigp_ has joined #ruby
TaRosh has quit [Client Quit]
craigp has quit [Ping timeout: 244 seconds]
meoblast001 has quit [Quit: Leaving]
al2o3-cr has quit [Quit: WeeChat 1.5]
<matrium_>
dminuoso: ruby from the ubuntu repository "ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]"
incomprehensibly has joined #ruby
<dminuoso>
Ubuntu ships with 2.3.1 already? That's neat.
<matrium_>
it's the build script from bosh-lite, it's trying to build "dea_next"
TaRosh|2 has joined #ruby
elomatreb has quit [Ping timeout: 250 seconds]
TaRosh|2 has left #ruby [#ruby]
soahccc has quit [Ping timeout: 264 seconds]
Hobbyboy has quit [Ping timeout: 264 seconds]
MadWasp has quit [Ping timeout: 264 seconds]
<matrium_>
" > Could not find minitest-5.8.4.gem for installation 'dea_next' pre-packaging failed
nyuszika7h has quit [Ping timeout: 260 seconds]
bastelfreak has quit [Ping timeout: 250 seconds]
ndrst has quit [Ping timeout: 264 seconds]
contradictioned has quit [Ping timeout: 264 seconds]
Danielss89 has quit [Ping timeout: 264 seconds]
RushPL has quit [Ping timeout: 264 seconds]
bauruine has quit [Ping timeout: 264 seconds]
ohcibi has quit [Ping timeout: 264 seconds]
vedu has quit [Ping timeout: 264 seconds]
heftig has quit [Ping timeout: 264 seconds]
SuperTux88 has quit [Ping timeout: 264 seconds]
kalleth has quit [Ping timeout: 264 seconds]
<dminuoso>
matrium_: Mmm, well one possible explanation is that it uses a local bundle - at which point it does not matter what your system gems have installed.
soahccc has joined #ruby
Azure has quit [Ping timeout: 276 seconds]
MadWasp has joined #ruby
<dminuoso>
That would at least explain why you can see that gem being installed but the application still complains.
TaRosh has joined #ruby
al2o3-cr has joined #ruby
<dminuoso>
But it's hard to say with these scarce information.
heftig has joined #ruby
Pupeno has quit [Remote host closed the connection]
kalleth has joined #ruby
Danielss89 has joined #ruby
elomatreb has joined #ruby
ohcibi has joined #ruby
contradictioned has joined #ruby
bastelfreak has joined #ruby
ndrst has joined #ruby
Devalo has joined #ruby
ndrst is now known as Guest80072
Hyuk has joined #ruby
bauruine has joined #ruby
RushPL has joined #ruby
nyuszika7h has joined #ruby
joneshf-laptop has quit [Ping timeout: 264 seconds]
<[spoiler]>
I didn't realise apeiros made ruby[bot] so sassy :D
<[spoiler]>
jwheare: oh muuuuuch better
<toretore>
and they still didn't listen to it
blackmesa has quit [Ping timeout: 276 seconds]
cd-rum_ has joined #ruby
hahuang61 has joined #ruby
cd-rum has quit [Ping timeout: 244 seconds]
<[spoiler]>
toretore: I should point out jwheare is one of the IRCCloud developers; they're is trying to improve the visuals of the pastebin (make it more legible and improve syntax highlighting).
<[spoiler]>
toretore: ruby[bot] complained about poor legibility and lack of syntax highlighting amongst other things
TheWhip has quit [Remote host closed the connection]
<toretore>
oh, sorry i wasn't paying attention
<jhass>
I think that's much better already, yeah
<[spoiler]>
Well, this was some time ago, so it probably got pushed out of your log
kavanagh has joined #ruby
hanmac has quit [Ping timeout: 258 seconds]
skweek has quit [Read error: Connection reset by peer]
<jhass>
now being able to link to line numbers would make it great :)
hahuang61 has quit [Ping timeout: 252 seconds]
<[spoiler]>
^ with ranges, too pls
ebanoid has joined #ruby
TheWhip has joined #ruby
<jwheare>
yeah good call
skade has joined #ruby
sepp2k has joined #ruby
cd-rum_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass>
since I'm going to touch it, any other paste services we should scold instead? repl.it perhaps? :P
bkxd has joined #ruby
<[spoiler]>
:D
A_Drone has quit [Remote host closed the connection]
A_Drone has quit [Remote host closed the connection]
airdisa has joined #ruby
A_Drone has joined #ruby
joonty has quit [Quit: Leaving]
TheWhip has joined #ruby
kavanagh has quit [Ping timeout: 260 seconds]
bkxd has quit [Ping timeout: 265 seconds]
A_Drone has quit [Read error: Connection reset by peer]
kavanagh has joined #ruby
A_Drone has joined #ruby
jrafanie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
karapetyan has joined #ruby
jmignault has joined #ruby
mooru has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mooru has joined #ruby
mooru has quit [Client Quit]
synthroid has joined #ruby
johnny56 has quit [Ping timeout: 264 seconds]
AndrewIsHere has joined #ruby
karapetyan has quit [Ping timeout: 264 seconds]
blockchan has quit [Ping timeout: 265 seconds]
mooru has joined #ruby
jdawgaz has joined #ruby
AndrewIsHere has quit [Ping timeout: 250 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
jmignault has quit [Ping timeout: 258 seconds]
A_Drone has quit [Ping timeout: 240 seconds]
<yorickpeterse>
Nothing can beat eval.in's amazing POST based API
mim1k has quit [Ping timeout: 265 seconds]
A_Drone has joined #ruby
tk__ has joined #ruby
tyang has joined #ruby
nazarewk has quit [Ping timeout: 258 seconds]
jaguarmagenta has joined #ruby
<fergal>
hi guys. i have two hashes. at runtime, either hash could be nil. in both hashes, there is a :users key, which can either have a value of a single string, or an array of strings. is there a neat way in ruby of merging both data sets into a single array, while also taking into account that either hash might be nil?
<meoblast001>
hi. is it normal for a gem install from a non-root user to create a bin/ directory in the home directory? is it possible to have this under .gem or something along this line?
synthroid has quit [Ping timeout: 250 seconds]
TheWhip has quit [Remote host closed the connection]
shinnya has joined #ruby
gorums has quit [Quit: Page closed]
TheWhip has joined #ruby
Sucks has joined #ruby
ldnunes has joined #ruby
ceegee has quit [Quit: leaving]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<meoblast001>
oh it appears Ansible made this decision, not Ruby
ChiefAlexander has joined #ruby
<meoblast001>
okay even that is wrong.. it appears this happens when i do "gem install bundle" in Ansible in any way whatsoever.....
<meoblast001>
but if i log into the shell over SSH and run this, it does what i expect
tachikomas has joined #ruby
<meoblast001>
how does ruby gem make the decision about where it puts things?
synthroid has joined #ruby
Pupeno has quit [Quit: Leaving...]
last_staff has quit [Quit: last_staff]
tvw has quit [Ping timeout: 250 seconds]
Zapperino has joined #ruby
AndChat|460649 has quit [Read error: Connection reset by peer]
grenierm has quit [Quit: grenierm]
TheWhip has quit [Remote host closed the connection]
matp has joined #ruby
openstruct has quit []
meoblast001 has quit [Quit: Leaving]
bkxd has joined #ruby
alfiemax has joined #ruby
<nazarewk>
so... i'm trying to use haml, but for some reason i am getting "Invalid US-ASCII character" in haml files, any ideas?
OTORelic4 has joined #ruby
eljimmy has joined #ruby
<nazarewk>
when i run grunt build from shell it works, but not from ansible command
phredus has quit [Read error: Connection reset by peer]
matrium_ has quit [Quit: Page closed]
phredus has joined #ruby
syndikate has joined #ruby
shinnya has quit [Ping timeout: 240 seconds]
Es0teric has joined #ruby
karapetyan has joined #ruby
jaguarmagenta has joined #ruby
tvw has joined #ruby
malconis has quit [Remote host closed the connection]
malconis has joined #ruby
jaguarmagenta has quit [Ping timeout: 244 seconds]
karapetyan has quit [Ping timeout: 240 seconds]
AndChat|460649 has joined #ruby
Zapperino has quit [Read error: Connection reset by peer]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
ctp has joined #ruby
dopamean1 has joined #ruby
lxsameer has joined #ruby
freerobby has quit [Quit: Leaving.]
tvw has quit [Ping timeout: 250 seconds]
freerobby has joined #ruby
phredus has quit [Ping timeout: 240 seconds]
bkxd has quit [Ping timeout: 265 seconds]
blackmesa has joined #ruby
kavanagh has quit [Remote host closed the connection]
kavanagh has joined #ruby
shortdudey123 has quit [Max SendQ exceeded]
tk__ has quit [Quit: ばいばい]
shortdudey123 has joined #ruby
mim1k has quit [Ping timeout: 260 seconds]
tvw has joined #ruby
blockchan has quit [Ping timeout: 244 seconds]
mim1k has joined #ruby
blackmesa has quit [Ping timeout: 244 seconds]
axl_ has joined #ruby
sarbs has quit [Max SendQ exceeded]
sarbs has joined #ruby
A1ph4R0z3 has joined #ruby
mim1k has quit [Ping timeout: 260 seconds]
ChiefAlexander has quit [Remote host closed the connection]
l4v2 has joined #ruby
AndyBotwin has joined #ruby
RegulationD has joined #ruby
joonty has joined #ruby
A1ph4R0z3 has left #ruby [#ruby]
ChiefAlexander has joined #ruby
pwnd_nsfw` has joined #ruby
RegulationD has quit [Ping timeout: 250 seconds]
dionysus69 has quit [Remote host closed the connection]
dminuoso has quit [Ping timeout: 276 seconds]
Gasher has joined #ruby
pwnd_nsfw has quit [Ping timeout: 250 seconds]
last_staff has joined #ruby
blackmesa has joined #ruby
anisha has quit [Quit: This computer has gone to sleep]
dminuoso has joined #ruby
Zapperino has joined #ruby
Xzanron has quit [Quit: Leaving]
last_staff has quit [Ping timeout: 250 seconds]
AndChat|460649 has quit [Ping timeout: 240 seconds]
submitnine has quit []
bmurt has quit [Remote host closed the connection]
tubuliferous has quit [Ping timeout: 244 seconds]
sp_ has quit [Ping timeout: 276 seconds]
__void has joined #ruby
dionysus69 has joined #ruby
dennisvennink has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dennisvennink has joined #ruby
nettoweb has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Zapperino has quit [Quit: Bye]
Zapperino has joined #ruby
ramortegui has quit [Quit: Ex-Chat]
hipertracker has joined #ruby
the_drow has joined #ruby
TheWhip has joined #ruby
xall has joined #ruby
Snowy has joined #ruby
ctp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nazarewk has quit [Quit: Lost terminal]
TomyWork has quit [Ping timeout: 276 seconds]
govg has quit [Ping timeout: 265 seconds]
mtkd has quit [Ping timeout: 260 seconds]
mtkd has joined #ruby
xall has quit [Ping timeout: 264 seconds]
freerobby has quit [Quit: Leaving.]
hutch34_ has joined #ruby
freerobby has joined #ruby
dennisvennink has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AndChat|460649 has joined #ruby
Zapperino has quit [Read error: Connection reset by peer]
cschnei__ has joined #ruby
karapetyan has joined #ruby
mistermocha has joined #ruby
synthroid has quit [Remote host closed the connection]
stephenmac7 has joined #ruby
<stephenmac7>
Hey, I'm using the built in ruby library for yaml parsing. Is there any way I can provide a hash to fill in aliases instead of having it handle the anchors?
<stephenmac7>
jhass: Thanks, I'll take a look. matthewd: Even here you're helping me. Thank you for all the help you've given me on this project, I really appreciate it!
hahuang61 has joined #ruby
pwnd_nsfw` has quit [Read error: Network is unreachable]
mark_66 has quit [Remote host closed the connection]
pwnd_nsfw` has joined #ruby
Devalo has joined #ruby
Devalo has quit [Remote host closed the connection]
the_drow has quit [Quit: This computer has gone to sleep]
Devalo has joined #ruby
__void has quit [Ping timeout: 276 seconds]
hahuang61 has quit [Ping timeout: 252 seconds]
aganov has quit [Quit: Leaving]
last_staff has quit [Ping timeout: 240 seconds]
dionysus69 has quit [Ping timeout: 260 seconds]
_silvertail_ has joined #ruby
_silvertail_ has quit [Read error: Connection reset by peer]
dionysus69 has joined #ruby
aep-shoutlet has joined #ruby
deuterium has quit [Ping timeout: 240 seconds]
[Butch] has joined #ruby
triangles has joined #ruby
dminuoso has joined #ruby
bkxd has quit [Ping timeout: 276 seconds]
synthroid has joined #ruby
dminuoso has quit [Read error: Connection reset by peer]
jishankai has quit [Ping timeout: 260 seconds]
the_drow has joined #ruby
mahlon has quit [Quit: nine foot long outhouse ladle]
memorasus has joined #ruby
Snowy has quit [Quit: ragequit]
TomyLobo has joined #ruby
edwinvdgraaf has quit [Ping timeout: 244 seconds]
kavanagh has quit [Ping timeout: 240 seconds]
flujan has joined #ruby
ta_ has quit [Ping timeout: 264 seconds]
ta_ has joined #ruby
kavanagh has joined #ruby
AndrewIsHere has joined #ruby
<flujan>
Hello. I am getting information on a cookie, and I need to perform a secong get using the cookie… here it goes: http://pastie.org/10928308
<dminuoso>
matty_matt_: That depends entirely on what the objects class has defined for the inspect method.
<dminuoso>
matty_matt_: Usually it's instance methods, but it could be the position of the sun.
<dminuoso>
*instance variables
sepp2k1 has joined #ruby
<dminuoso>
(You can usually expect it to, but don't rely on it)
<jhass>
matty_matt_: Object#to_s looks like #<Foo:0x00000003e5d668> and Object#inspect looks like #<Foo:0x00000003e76be0 @id="foo">
<jhass>
so if it's literally id= and it's literally puts, then the object's to_s is overridden
sepp2k has quit [Ping timeout: 244 seconds]
amclain has joined #ruby
kyleolivo has quit [Client Quit]
Guest87534 has joined #ruby
zarubin has quit [Read error: Connection reset by peer]
SCHAAP137 has joined #ruby
zarubin has joined #ruby
jeremyhall has joined #ruby
syndikate has joined #ruby
statelesscode has quit [Ping timeout: 276 seconds]
<matty_matt_>
ok, my bad it's not puts, it's just when I evaluate the object (in the console)
<matty_matt_>
eg: just typing "f = Foo.new" and hitting enter
<matty_matt_>
i assume that uses 'inspect'
<matty_matt_>
in which case id would be an instance variable?
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<dminuoso>
matty_matt_: It might or might not be, regardless of how it looks.
<dminuoso>
matty_matt_: But as jhass has indicated, it looks overridden either way.
<jhass>
that is unless you missed the @ while transcribing
kyleolivo has joined #ruby
<jhass>
given I doubt your actual object is of Foo
ta_ has quit [Remote host closed the connection]
jackjackdripper has joined #ruby
antgel has quit [Ping timeout: 265 seconds]
<dminuoso>
matty_matt_: If you need to know about its instance variables, interrogate the object. Don't ever rely on whatever inspect tells you, unless you *know* what it returns.
Spami has quit [Quit: This computer has gone to sleep]
rajdesai has joined #ruby
ta_ has joined #ruby
Spami has joined #ruby
jackjackdripper has quit [Client Quit]
Spami has quit [Client Quit]
symm- has joined #ruby
chouhoulis has quit [Remote host closed the connection]
statelesscode has joined #ruby
bkxd has quit [Ping timeout: 244 seconds]
postmodern has joined #ruby
pawnbox has quit [Remote host closed the connection]
ta_ has quit [Ping timeout: 250 seconds]
pawnbox has joined #ruby
AndChat|460649 has joined #ruby
s2013 has joined #ruby
mahlon has joined #ruby
ChiefAlexander has quit [Remote host closed the connection]
AndChat|460649 has quit [Client Quit]
AndChat|460649 has joined #ruby
Zapperino has quit [Ping timeout: 260 seconds]
wedgie has quit [Quit: Lost terminal]
symm- has quit [Quit: Leaving...]
rajdesai has quit [Remote host closed the connection]
lxsameer has quit [Quit: WeeChat 1.5]
symm- has joined #ruby
rajdesai has joined #ruby
rajdesai has quit [Remote host closed the connection]
rajdesai has joined #ruby
matty_matt_ has quit [Ping timeout: 250 seconds]
blackmesa has quit [Quit: WeeChat 1.5]
[gmi] has joined #ruby
etetz has joined #ruby
elaptics is now known as elaptics`away
jeremyhall_ has joined #ruby
whathappens has joined #ruby
dionysus69 has quit [Ping timeout: 244 seconds]
AndChat|460649 has quit [Read error: Connection reset by peer]
Zapperino has joined #ruby
jeremyhall has quit [Ping timeout: 240 seconds]
xall has joined #ruby
Devalo has quit [Remote host closed the connection]
mim1k has quit [Ping timeout: 258 seconds]
Devalo has joined #ruby
[gmi] has quit [Client Quit]
freerobby has joined #ruby
tomchapi_ has joined #ruby
shinnya has joined #ruby
rajdesai has quit [Remote host closed the connection]
whathappens has quit [Remote host closed the connection]
nyandoge has quit [Quit: Connection closed for inactivity]
xall has quit [Ping timeout: 265 seconds]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Devalo has quit [Ping timeout: 264 seconds]
rajdesai has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
tomchapi_ has quit [Client Quit]
Es0teric has joined #ruby
tomchapi_ has joined #ruby
skweek has quit [Ping timeout: 258 seconds]
whathappens has joined #ruby
sp_ has joined #ruby
rajdesai has quit [Remote host closed the connection]
rajdesai has joined #ruby
poguez_ has joined #ruby
polyidus has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
s2013 has joined #ruby
marxarelli has joined #ruby
polyidus has joined #ruby
freerobby has quit [Quit: Leaving.]
ged has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
iwouldprefernott has joined #ruby
iwouldprefernott has left #ruby [#ruby]
iwouldprefernott has joined #ruby
Es0teric has joined #ruby
replay has joined #ruby
sp_ has quit [Ping timeout: 264 seconds]
armyriad has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
armyriad has quit [Max SendQ exceeded]
armyriad has joined #ruby
Torrone has joined #ruby
dminuoso has quit [Quit: leaving]
dminuoso has joined #ruby
<dminuoso>
!rule3
<dminuoso>
No.
<Torrone>
hello, I'm getting Could not reach host index.rubygems.org. Check your network connection and try again.
<Torrone>
Hello, I'm getting Could not reach host index.rubygems.org. Check your network connection and try again. when trying to run bundle install
iwouldprefernott is now known as kakeru
hahuang61 has joined #ruby
diegoviola has joined #ruby
skweek has joined #ruby
jobat has quit [Ping timeout: 250 seconds]
The_Phoenix has joined #ruby
kavanagh has quit [Quit: That's all folks!]
blaxter has quit [Quit: foo]
ddffg has joined #ruby
tubuliferous has quit [Ping timeout: 240 seconds]
govg has joined #ruby
hahuang61 has quit [Ping timeout: 252 seconds]
joonty has joined #ruby
joonty has quit [Remote host closed the connection]
firstdayonthejob has joined #ruby
<matthewd>
Torrone: Can you reach that host from the machine you're running bundler on?
<Torrone>
matthewd, also intermittently index.rubygems.org
macsteps has quit [Remote host closed the connection]
<matthewd>
Sounds like you need to check your network connection and try again, then
Dimik has joined #ruby
rajdesai has quit [Remote host closed the connection]
matty_matt_ has joined #ruby
<matty_matt_>
jhass: the output didn't have a @
kyleolivo has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rajdesai has joined #ruby
indistylo has quit [Remote host closed the connection]
<matty_matt_>
also doing instance_variable_get('@id') returns nil
<Torrone>
matthewd, I can consistently reach index.rubygems.org, I've also checked my host file and all seems good, ping index.rubygems.org also is good, my connection is fine
SteenJobs has joined #ruby
ixti has joined #ruby
edwinvdgraaf has joined #ruby
<dminuoso>
matty_matt_: Look at the implemenation of Foo#inspect then.
<matthewd>
matty_matt_: Then 'id' is a piece of information provided by the object's inspect method
<matty_matt_>
Ah, you're right, it does override inspect :)
macsteps has joined #ruby
rajdesai has quit [Remote host closed the connection]
edwinvdgraaf has quit [Remote host closed the connection]
craysiii has joined #ruby
ledestin has joined #ruby
yfeldblum has joined #ruby
craysiii has quit [Client Quit]
kyleolivo has joined #ruby
firstdayonthejob has quit [Quit: WeeChat 1.5]
nisstyre has joined #ruby
nisstyre has quit [Changing host]
nisstyre has joined #ruby
kyleolivo has quit [Client Quit]
<shellie_>
irc
SJr has joined #ruby
bkxd has joined #ruby
<jhass>
xmpp
maucar has joined #ruby
rodfersou|lunch is now known as rodfersou
Spami has joined #ruby
swills_ has quit [Ping timeout: 250 seconds]
<SJr>
I'v inherited this continuous integration setup and I don't really know much ruby. Essentially all the jobs that fail seem to run an rbenv rehash step, before doing a bundle install. The rbenv rehash seems to crash when more than one build is running at the same time. As best I can tell this is modifying some global state. Is there an easy way to make all of this local to the CI working directory?
<ddffg>
what is better to learn now : hanami or rails5?
Cohedrin has joined #ruby
<pizzaops>
If I can't use pry because reasons, is there any other way of creating interactive breakpoints in Ruby, akin to `binding.pry`?
polyidus has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
TPug has quit [Ping timeout: 252 seconds]
<ddffg>
i am novice
<seitensei>
i am the walrus
<dminuoso>
pizzaops: irb can do that too.
<dminuoso>
pizzaops: also there is ruby-debug
polyidus has joined #ruby
<pizzaops>
Ah interesting, thanks.
<dminuoso>
Ops, old habit - byebug.
<pizzaops>
dminuoso: so the reason I can't use pry is because the thing I'm working on writes to stdout/reads from stdin in some cases, which prevents Pry from creating the prompt (at least that is my poor understasnding of it)
<pizzaops>
will that presumably also affect irb / ruby-debug
<havenwood>
ddffg: There are more books and tutorials for Rails and more people to ask for help but Hanami code is easier to read and simpler overall.
matp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tvw has quit []
<dminuoso>
pizzaops: *byebug not ruby-debug.
<Maxou>
I try to install redmine on debian and i have some issue with ruby version require 2.2.2 minium and I m at 2.1 so i installed rbenv but some command seems to be in sudo and so that dont use 2.2.2
<jhass>
pizzaops: have a look at pry-remote
kyleolivo has joined #ruby
tvw has joined #ruby
Guest87534 has quit [Ping timeout: 240 seconds]
<pizzaops>
jhass: ahh I've heard of that. It's for web apps primarily right? It might be just what i need here.
<pizzaops>
I'm not making a web app but nonetheless.
<jhass>
shouldn't matter at all
kyleolivo has quit [Client Quit]
<jhass>
it's for connecting to a process ;)
Madplatypus has quit [Quit: Connection closed for inactivity]
phredus has joined #ruby
matty_matt_ has quit [Ping timeout: 250 seconds]
<Maxou>
I try to install redmine on debian and i have some issue with ruby version require 2.2.2 minium and I m at 2.1 so i installed rbenv but some command seems to be in sudo and so that dont use 2.2.2
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
AndyBotwin has quit [Ping timeout: 244 seconds]
firstdayonthejob has joined #ruby
<seitensei>
Maxou, that's because rbenv installs locally to your user
jackjackdripper has joined #ruby
<seitensei>
and as long as you're running as your user, you don't need superuser
Omni has joined #ruby
Omni is now known as Guest70710
tvw has quit [Ping timeout: 276 seconds]
<seitensei>
if you're trying to set it up as a service/daemon/w.e. make sure it's running as your rbenv user
dionysus69 has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
LoneHerm_ has joined #ruby
kyleolivo has joined #ruby
etetz has quit [Remote host closed the connection]
krwq has joined #ruby
etetz has joined #ruby
phredus_ has joined #ruby
macsteps has quit [Remote host closed the connection]
LoneHerm_ has quit [Remote host closed the connection]
spider-mario has joined #ruby
Devalo has joined #ruby
LoneHerm_ has joined #ruby
kakeru has left #ruby [#ruby]
phredus has quit [Ping timeout: 240 seconds]
xall has joined #ruby
polyidus has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
etetz_ has joined #ruby
kyleolivo has quit [Client Quit]
<krwq>
Hi, Im experiencing weird issue with gsub: 'aaaa/asdasd'.gsub(/([A-z0-9_])\/([A-z0-9_])/m, '\\1\\\2') will replace it to 'aaaa\2sdasd' (I've tried different combination of slashes: i.e. \1\\\2 and it just won't work as expected if i put anything but backslash in between captures it works fine) - does anyone have any ideas how to fix that?
etetz has quit [Read error: Connection reset by peer]
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<matthewd>
krwq: You need more slashes
kyleolivo has joined #ruby
<matthewd>
'\\1\\\\\\2', I think?
<dminuoso>
Indeed: \\\\\\2
<krwq>
matthewd: \\1 should expand to \1 \\ should expand to \ and \\2 to \2, why that many?
<matthewd>
krwq: \\ expands to \ in the string.. but as you know from \1, the \ has significance in the replacement result too
<dminuoso>
This is documented somewhere, give me a moment.
<krwq>
ok, seem to be working - thanks! :) I thought the right side of sub was a string
<matthewd>
krwq: So the replacement string needs to be \1 \\ \2 -- and we need to double each of those for the string itself
TPug has joined #ruby
xall has quit [Ping timeout: 244 seconds]
<matthewd>
It's a string with special interpretation. The fact you're using \1 means you know that.
<pizzaops>
dminuoso: how does byebug work without me requiring it anywhere?
<pizzaops>
E.g. I can just gem install it and then invoke byebug
<jhass>
krwq: another approach could be .gsub(/(?<=\w)\/(?=\w)/, "")
<pizzaops>
Ah never mind, just bad docs :P
<krwq>
matthewd: true but ive always used simply \1 but it seems that it worked completely by accident - thanks guys!
phredus_ has quit [Ping timeout: 240 seconds]
<dminuoso>
pizzaops: It probably infests Kernel or main? :)
<pizzaops>
dminuoso: nah you do have to require it.
<dminuoso>
pizzaops: Oh I misunderstood what you meant.
Torrone has quit [Quit: This computer has gone to sleep]
<aeruder>
the ones that surprised me the most is things like sinatra which register a bunch of stuff in an atexit() handler by default
<matthewd>
krwq: Another another: .gsub(/([A-z0-9_])\/([A-z0-9_])/) { "#{$1}/#{$2}" }
<pizzaops>
No you didn't, I misspoke :P
bad_ip has joined #ruby
<aeruder>
so there's basically no explicit call into the gem at all besides finishing the program
<matthewd>
Err, I got the slash wrong there.. but.. yeah.
etetz_ has quit [Remote host closed the connection]
<jhass>
the group is just \w really, no?
<pizzaops>
Ever gotten this from byebug? Error: undefined method `[]' for nil:NilClass
QORRiE has joined #ruby
nanoz has joined #ruby
<dminuoso>
pizzaops: Please include a full stack trace. Use gists.
hipertracker has joined #ruby
<matthewd>
jhass: It's probably supposed to be... I doubt the inclusion of the characters between Z and a was intentional
<pizzaops>
dminuoso: trying to, but it takes some time to reproduce. Which is why I need breakpoints to begin with :P
ta_ has joined #ruby
<pizzaops>
and now it's working...interesting
Devalo has quit [Remote host closed the connection]
Devalo has joined #ruby
jeremyhall_ has quit [Ping timeout: 244 seconds]
<krwq>
can you use \w in the context of [^\w<someotherchars>]?
<jhass>
yes
joonty has joined #ruby
<jhass>
but before you do just [^\w] use \W
joonty has quit [Client Quit]
freerobby has joined #ruby
last_staff has joined #ruby
jeremyhall has joined #ruby
The_Phoenix has quit [Read error: Connection reset by peer]
<krwq>
jhass: true i didnt know that A-z was catching also in between chars, i thought that was a shorthand for A-Za-z
<krwq>
jhass: doesn't matter anyways in my context
LoneHerm_ has quit [Remote host closed the connection]
Devalo has quit [Remote host closed the connection]
Devalo has joined #ruby
Devalo has quit [Remote host closed the connection]
meinside has quit [Quit: Connection closed for inactivity]
karapetyan has quit [Remote host closed the connection]
johnmilton has quit [Ping timeout: 276 seconds]
nando293921 has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
karapetyan has joined #ruby
TPug has joined #ruby
leitz has quit [Remote host closed the connection]
bkxd has quit [Ping timeout: 265 seconds]
Derperperd has quit [Quit: Derperperd]
zapata has quit [Ping timeout: 260 seconds]
flashpoint9 has quit [Remote host closed the connection]
<croberts>
If I do File.file() and it returns true can i use that in a if then statement such as "if true then File.delete()" or how would i take the value true/false to use it?
<jhass>
Filedelete(path) if File.file(path)
<croberts>
jhass: cool ty
<eam>
croberts: in that particular example, though, you should generally just call File.unlink
zeroDi has joined #ruby
the_drow has quit [Quit: This computer has gone to sleep]
<jhass>
aren't they aliases?
<eam>
I mean without testing File.file
<jhass>
well it might be a directory
<croberts>
in this example im just looking to remove a file
<eam>
in which case it'll fail :)
kyleolivo has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<eam>
you can't unlink directories
LoneHerm_ has joined #ruby
<aeruder>
a symlink to a directory? :)
<eam>
well, perhaps
<eam>
:)
<eam>
assuming you really do want to unlink any file
kyleolivo has joined #ruby
sepp2k1 has quit [Read error: Connection reset by peer]
<eam>
File.unlink path rescue true
kyleolivo has quit [Client Quit]
the_rhizo has joined #ruby
<croberts>
cool thank you
solars has joined #ruby
SteenJobs has quit [Quit: SteenJobs]
LoneHerm_ has quit [Ping timeout: 265 seconds]
Takumo has quit [Ping timeout: 258 seconds]
AndChat|460649 has joined #ruby
Macaveli has joined #ruby
Zapperino has quit [Read error: Connection reset by peer]
surrounder has quit [Quit: WeeChat 1.4]
nettoweb has quit [Ping timeout: 244 seconds]
[spoiler] has quit [Ping timeout: 264 seconds]
surrounder has joined #ruby
johnmilton has joined #ruby
the_rhizo has quit [Ping timeout: 258 seconds]
Takumo has joined #ruby
Takumo has quit [Changing host]
Takumo has joined #ruby
SteenJobs has joined #ruby
macsteps has quit [Remote host closed the connection]
tyang has quit [Ping timeout: 276 seconds]
Zapperino has joined #ruby
[spoiler] has joined #ruby
Zapperino has quit [Client Quit]
AndChat|460649 has quit [Read error: No route to host]
Zapperino has joined #ruby
flashpoint9 has joined #ruby
ta_ has joined #ruby
rajdesai has quit [Remote host closed the connection]
SteenJobs has quit [Client Quit]
rajdesai has joined #ruby
lxsameer has quit [Ping timeout: 244 seconds]
sp_ has quit [Ping timeout: 240 seconds]
shmuli has joined #ruby
Spami has joined #ruby
the_drow has joined #ruby
last_staff has joined #ruby
AlexRussia has joined #ruby
tyang has joined #ruby
<jhass>
I'd prefer the File.file over rescue actualy
<jhass>
why ignore an error if you can prevent it from happening
c0mrad3 has quit [Quit: Connection closed for inactivity]
Torrone has quit [Quit: This computer has gone to sleep]
<eam>
jhass: because File.file is just a race
<eam>
you can't prevent it
<eam>
of lesser importance: it's also much slower
last_staff has quit [Ping timeout: 240 seconds]
tejasmanohar has joined #ruby
ta__ has joined #ruby
<tejasmanohar>
http://dev.desk.com/guides/oauth-> anyone have a good reference for how the ruby oauth module works? i’m trying to figure out the actual parameters for desk.com oauth but it doesn’t document them… just provides code using the gem
ta_ has quit [Ping timeout: 258 seconds]
ta__ has quit [Remote host closed the connection]
polyidus has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
marxarelli has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
titusx has joined #ruby
polyidus has joined #ruby
SteenJobs has joined #ruby
johnmilton has quit [Ping timeout: 276 seconds]
aibot_ has quit [Ping timeout: 250 seconds]
<dminuoso>
tejasmanohar: Which exactly gem are you talking about?
<tejasmanohar>
no clue
<tejasmanohar>
"oauth"
<tejasmanohar>
trying to figure out how that example works O.o
Devalo has quit [Remote host closed the connection]
chouhoulis has quit [Remote host closed the connection]
<dminuoso>
tejasmanohar: All the terminology is in the style of OAuth specs, so it should be fairly obvious once you get a grasp on OAuth.
<tejasmanohar>
dminuoso: gotcha. i’ve implemented many oauth providers but all their params are different so having trouble figuring out which ones to use here
<dminuoso>
tejasmanohar: Note that OAuth 2.0 is kind of the standard nowadays though, so you might want to look in that area too.
<tejasmanohar>
liek names of query params
<tejasmanohar>
yeah i’ve implemented all oauth 2 so far
<dminuoso>
Alright. :)
<tejasmanohar>
but all deviations of course, even fb and google arent the same
<tejasmanohar>
apparently desk has no oauth 2
[Butch] has quit [Ping timeout: 252 seconds]
[Butch]_ is now known as [Butch]
<dminuoso>
tejasmanohar: Does the API documentation I linked suffice?
armyriad has quit [Ping timeout: 276 seconds]
the_drow has quit [Quit: This computer has gone to sleep]
Devalo has quit [Ping timeout: 240 seconds]
Xiti has joined #ruby
armyriad has joined #ruby
tubuliferous has quit [Ping timeout: 244 seconds]
babblebre has joined #ruby
tejasmanohar has quit [Quit: tejasmanohar]
Zapperino has quit [Read error: Connection reset by peer]
sp_ has joined #ruby
aibot_ has joined #ruby
hipertracker has joined #ruby
Zapperino has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
jhack has quit [Quit: jhack]
bkxd has joined #ruby
xall has joined #ruby
whathappens has quit [Remote host closed the connection]
karapetyan has quit []
whathappens has joined #ruby
jeremyhall_ has joined #ruby
AndChat|460649 has joined #ruby
Vingador has quit [Ping timeout: 276 seconds]
rajdesai has quit [Remote host closed the connection]
armyriad has quit [Ping timeout: 276 seconds]
AndrewIsHere has quit [Remote host closed the connection]
jeremyhall has quit [Ping timeout: 265 seconds]
bkxd has quit [Ping timeout: 260 seconds]
whathappens has quit [Ping timeout: 244 seconds]
xall has quit [Ping timeout: 265 seconds]
phredus has joined #ruby
Zapperino has quit [Ping timeout: 244 seconds]
whathappens has joined #ruby
AndrewIsHere has joined #ruby
tubuliferous has joined #ruby
bkxd has joined #ruby
maucar has quit [Quit: Leaving]
blackgoat has joined #ruby
jhack has joined #ruby
ta_ has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
miqlas-H has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
symm- has quit [Ping timeout: 240 seconds]
aep-shoutlet has quit [Quit: Connection closed for inactivity]
armyriad has joined #ruby
kyleolivo has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
replay has quit [Ping timeout: 250 seconds]
marr has joined #ruby
whathappens has quit [Remote host closed the connection]
jaguarmagenta has quit [Ping timeout: 252 seconds]
LoneHermit has joined #ruby
whathappens has joined #ruby
spudowiar has quit [Remote host closed the connection]
kavanagh has joined #ruby
polyidus has quit [Ping timeout: 260 seconds]
whathappens has quit [Ping timeout: 250 seconds]
ta_ has quit [Remote host closed the connection]
LoneHermit has quit [Ping timeout: 276 seconds]
rajdesai has joined #ruby
grenierm has joined #ruby
tejasmanohar has joined #ruby
grenierm has quit [Client Quit]
tvw has joined #ruby
flashpoint9 has quit [Remote host closed the connection]
rajdesai has quit []
tejasmanohar has quit [Quit: tejasmanohar]
ur5us has joined #ruby
symm- has joined #ruby
tejasmanohar has joined #ruby
eljimmy has quit [Quit: This computer has gone to sleep]
drefl has joined #ruby
tyang has quit [Quit: Leaving]
LebedevRI has joined #ruby
Akuma0n3 has quit [Quit: So long sukkas!]
ur5us has quit [Ping timeout: 250 seconds]
hahuang61 has joined #ruby
shmuli has quit [Ping timeout: 264 seconds]
shmuli has joined #ruby
<LebedevRI>
hi. complete ruby noob here. i have a line (c structure element). how do i parse it: https://paste.debian.net/786818/ i tried scanf, but with not much success
<ruby[bot]>
baweaver: # => /tmp/execpad-ca34b72fb246/source-ca34b72fb246:2: syntax error, unexpected '\n', expecting &. or :: o ...check link for more (https://eval.in/617071)
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
sebstrax has quit [Quit: Connection closed for inactivity]
<LebedevRI>
jhass: looks like that's it, thank you
johnmilton has joined #ruby
phredus has quit [Ping timeout: 240 seconds]
killerkamel has quit [Ping timeout: 276 seconds]
phredus has joined #ruby
macsteps has joined #ruby
vuoto has joined #ruby
ur5us has joined #ruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
Maxou has left #ruby ["Konversation terminated!"]
macsteps has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
minimalism has joined #ruby
Sucks has quit [Remote host closed the connection]
fmcgeough has quit [Quit: fmcgeough]
johnmilton has quit [Ping timeout: 265 seconds]
synthroid has quit []
TinkerTyper has quit [Ping timeout: 244 seconds]
TinkerTyper has joined #ruby
reaVer_ has quit [Ping timeout: 276 seconds]
dionysus69 has quit [Ping timeout: 240 seconds]
phredus has quit [Ping timeout: 240 seconds]
rajdesai has joined #ruby
ruby-lang682 has joined #ruby
the_rhizo has joined #ruby
djbkd has quit [Remote host closed the connection]
<ruby-lang682>
Shouldn't the value of the variables a, b and c in the following expression: a,b,c = 1,2,3 => [1,2,3] according to assignment and parallel assignment rules
djbkd has joined #ruby
rajdesai has quit [Remote host closed the connection]
_djbkd has quit [Read error: Connection reset by peer]
djbkd has quit [Read error: Connection reset by peer]
<dminuoso>
ruby-lang682: Instead of asking about some specific behavior, show us the code that is not showing expected behavior instead.
axsuul has joined #ruby
<jhass>
the expressions value is [1, 2, 3] because = 1, 2, 3 is = [1, 2, 3] and the value of an assignment is its right hand side
<ruby-lang682>
I think that the value of b and c should be [1,2,3]
<dminuoso>
asm>> a, b = 1, 2
<ruby[bot]>
dminuoso: I have disassembled your code, the result is at https://eval.in/617079
<jhass>
but it isn't
<adaedra>
a, b, c = ... is destructuring
<ruby-lang682>
@jhass you are right according to parallel assignment rules
<dminuoso>
ruby[bot]: If you look at the code, the array is being explicitly expanded.
<dminuoso>
ruby-lang682 I meant.
<dminuoso>
ruby-lang682: What "parallel assignment rules" are you talking about? Are you referring to some specific guide or book?
<ruby-lang682>
@dminuoso 1 moment plz
Es0teric has quit [Quit: Computer has gone to sleep.]
<ruby-lang682>
according to the ruby language book at parallel assignment section
<ruby-lang682>
the rule is if lvalue is one operand and rvalue is more than one operand
hipertracker has quit [Quit: hipertracker]
<ruby-lang682>
such as x = 1,2
xall has quit [Ping timeout: 250 seconds]
<dminuoso>
ruby-lang682: which particular section?
<jhass>
but lvalue is not one operand, it's multiple
eljimmy has joined #ruby
<ruby-lang682>
ruby pack the rvalue operand in an array and set it to x
vuoto has quit [Remote host closed the connection]
tenderlove has quit [Read error: No route to host]
<matthewd>
ruby-lang682: We know how it works.. I'm lost on what your question is
tenderlo_ has joined #ruby
<dminuoso>
ruby-lang682: Note that 4.5.5.3 says "If the number of lvalues and rvalues are the same, then assignment occurs as described earlier in $ 4.5.5.1
<ruby-lang682>
@jhass i think i am about to understand you
rajdesai has quit [Ping timeout: 276 seconds]
hipertracker has joined #ruby
<dminuoso>
ruby-lang682: That book describes quite accurately how this works. Im not sure what you are misunderstanding.
leea has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bkxd has joined #ruby
<ruby-lang682>
@dminuoso when there are multiple assignment such as [x=y=1] its evaluated such as x = (y = 1) right?
<ruby-lang682>
but what if the last assignment is parallel assignment
<ruby-lang682>
my question to be very clear
<dminuoso>
ruby-lang682: Assignment works on what expressions return.
yardenbar has joined #ruby
<dminuoso>
ruby-lang682: This is best described in terms of the syntax.
<ruby-lang682>
Why is the value of b and c in the following expression is 1 and not [1,2,3]
TheWhip has quit [Remote host closed the connection]
tejasmanohar has quit [Quit: tejasmanohar]
tejasmanohar has joined #ruby
craigp_ has quit [Ping timeout: 258 seconds]
whathappens has joined #ruby
<iamdevnul>
has anyone here used aasm?
<jhass>
?anyone
<ruby[bot]>
Just ask your question, if anyone has, is or can, they will respond.
<jhass>
?crosspost
<ruby[bot]>
Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
<dminuoso>
ruby[bot]: This actually makes sense if you consider that Ruby uses an LR parser.
skade has joined #ruby
<ruby-lang682>
@dminouso Yeah, I got it and would like to thank you and @jhass for your time and help
OTORelic4 has quit [Ping timeout: 260 seconds]
hutch34_ has quit [Ping timeout: 250 seconds]
<dminuoso>
ruby-lang682: Note that its not an ambiguity (resulting in shift-reduce conflict, because that would actually not be solvable to produce the observed effect)
<dminuoso>
The grammar was intentionally designed this way.
<ruby-lang682>
@dminuoso I got it thanks :)
leea has joined #ruby
ruby-lang682 has quit [Quit: Page closed]
rajdesai has quit [Remote host closed the connection]
devbug has joined #ruby
djbkd_ has quit [Remote host closed the connection]
solars has quit [Ping timeout: 276 seconds]
SteenJobs has joined #ruby
VA3VNA has quit [Ping timeout: 244 seconds]
reaVer has joined #ruby
djbkd has joined #ruby
solars has joined #ruby
hahuang61 has quit [Ping timeout: 258 seconds]
djbkd has quit [Read error: Connection reset by peer]
djbkd has joined #ruby
der-landgraf has quit [Quit: WeeChat 1.5]
devbug has quit [Quit: ZZZzzz…]
xall has joined #ruby
spudowiar has joined #ruby
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
devbug has joined #ruby
jaguarmagenta has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
TheWhip has joined #ruby
devbug has quit [Client Quit]
dopamean1 has quit [Quit: trump all day]
tvw has joined #ruby
kyleolivo has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
vF3hNGxc47h8 has joined #ruby
jaguarmagenta has quit [Ping timeout: 240 seconds]
hammond has quit [Ping timeout: 258 seconds]
kyleolivo has joined #ruby
yardenbar has quit [Ping timeout: 276 seconds]
devbug has joined #ruby
<ardian_>
Hi, how would I get the pageid element from this hash
firstdayonthejob has quit [Ping timeout: 276 seconds]
hammond has joined #ruby
hammond has quit [Changing host]
hammond has joined #ruby
hammond has quit [Changing host]
hammond has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rajdesai has joined #ruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
bodgix has quit [Read error: Connection reset by peer]
mtkd has quit [Ping timeout: 240 seconds]
<dminuoso>
matt3: You can use Hash#keys to get immediate access to a Hashes keys. You can also use Hash#to_a to transform the outer Hash into an Array.
<dminuoso>
Sorry, I meant ardian_.
axl__ has joined #ruby
mtkd has joined #ruby
sp_ has quit [Ping timeout: 258 seconds]
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
axl_ has quit [Ping timeout: 244 seconds]
axl__ is now known as axl_
Derperperd has joined #ruby
bodgix has joined #ruby
JeanCarloMachado has quit [Ping timeout: 264 seconds]
rajdesai has quit [Ping timeout: 276 seconds]
Pupeno has joined #ruby
xall has quit [Ping timeout: 258 seconds]
dminuoso has quit [Ping timeout: 260 seconds]
axl_ has quit [Quit: axl_]
bkxd has quit [Ping timeout: 276 seconds]
rajdesai has joined #ruby
TheWhip has joined #ruby
JeanCarloMachado has joined #ruby
Silthias has quit [Ping timeout: 250 seconds]
der-landgraf has joined #ruby
grenierm has joined #ruby
Silthias has joined #ruby
cschnei__ has quit [Remote host closed the connection]
jhack has quit [Quit: jhack]
yfeldblum has quit [Ping timeout: 250 seconds]
ChiefAlexander has quit [Quit: Leaving...]
TheWhip has quit [Ping timeout: 260 seconds]
Sammichmaker has joined #ruby
Devalo has joined #ruby
der-landgraf has quit [Quit: WeeChat 1.5]
der-landgraf has joined #ruby
matt3 has quit [Quit: WeeChat 1.5]
sp_ has joined #ruby
Vingador has quit [Ping timeout: 240 seconds]
matp has quit [Ping timeout: 258 seconds]
matt3 has joined #ruby
Devalo has quit [Ping timeout: 258 seconds]
marxarelli has joined #ruby
roflmyeggo has joined #ruby
xall has joined #ruby
matt3 has quit [Ping timeout: 260 seconds]
spider-mario has quit [Remote host closed the connection]
solars has quit [Ping timeout: 260 seconds]
shazaum__ has joined #ruby
Devalo has joined #ruby
<LebedevRI>
and one more question: given 2 3d hashes (hash in hash in hash) with the same structure, what is the easiest way to diff them? i understand that this is rather vague/generic/FAQ question, but still i have to ask it :(
unreal_ has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
<drbrain>
easiest?
<drbrain>
pp each to a Tempfile and run `diff` on them
<drbrain>
haha, kinda serious
Devalo has quit [Ping timeout: 240 seconds]
<drbrain>
… because test frameworks do this for `assert_equal`
unreal has quit [Ping timeout: 276 seconds]
<matthewd>
Otherwise, gem install hashdiff
jhack has joined #ruby
griffindy has joined #ruby
<LebedevRI>
yep, already doing that
mcqr has quit [Quit: WeeChat 1.4]
ur5us has quit [Ping timeout: 244 seconds]
TheWhip has joined #ruby
aep-shoutlet has quit [Quit: Connection closed for inactivity]