<krobzaur>
Ox0dea: Oh, idk I'm an amateur programmer I just like to mess around with whatever it useful
twe4ked has quit [Ping timeout: 264 seconds]
DarkBushido has quit [Ping timeout: 264 seconds]
<krobzaur>
Ox0dea: But my main language is python I'd say
ElderFain has joined #ruby
<VeryBewitching>
krobzaur: Which window manager?
<krobzaur>
VeryBewitching: TotalSpaces2
<krobzaur>
VeryBewitching: I used OSX =)
DarkBushido has joined #ruby
<VeryBewitching>
Oh, I see.
uber has joined #ruby
soahccc has joined #ruby
cmoneylulz has quit [Remote host closed the connection]
<Ox0dea>
krobzaur: Why do you reckon a mutative loop would be the best approach?
_ko1 has joined #ruby
<VeryBewitching>
I thought MacOS had it's own native pager.
<krobzaur>
Ox0dea: Because it was immediately obvious to me that it would get the job done lol
<krobzaur>
Ox0dea: Not saying it is objectively the best way to accomplish the task
<Ox0dea>
Fair enough.
<krobzaur>
VeryBewitching: It does but its sucks
<krobzaur>
VeryBewitching: And I switch between different display setups a lot at work, home, etc and it always fucks up all my windowx
<krobzaur>
VeryBewitching: I got tired of fixing them so I'm writing this script
nordskald has quit [Ping timeout: 240 seconds]
shanemcd_ has quit [Remote host closed the connection]
<krobzaur>
Ox0dea: I'm willing to take constructive criticism. I am here as a student seeking knowledge
<Ox0dea>
?code krobzaur
<ruboto>
krobzaur, We can't help you without your code, please post it to https://gist.github.com
shanemcd has joined #ruby
<Ox0dea>
krobzaur: I shall be happy to provide it. :)
leslie_ has joined #ruby
rflot has joined #ruby
zrl has quit [Ping timeout: 264 seconds]
PhilK has joined #ruby
spastorino has quit [Ping timeout: 264 seconds]
jimeh has quit [Ping timeout: 264 seconds]
DanKnox[away] has joined #ruby
bronson has joined #ruby
<Ox0dea>
I should mention at the outset that I'm entirely unfamiliar with TotalSpaces2.
calderonroberto has joined #ruby
spastorino has joined #ruby
alxndr_ has joined #ruby
<krobzaur>
lol doesn't matter the API is super simple
alxndr has quit [Ping timeout: 264 seconds]
zrl has joined #ruby
frankS2 has quit [Read error: Connection reset by peer]
Guest85414______ has quit [Ping timeout: 264 seconds]
shanemcd has quit [Ping timeout: 244 seconds]
cosmicfires has joined #ruby
arescorpio has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
Guest85414______ has joined #ruby
lipoqil has quit [Quit: Connection closed for inactivity]
alem0lars has joined #ruby
<Ox0dea>
krobzaur: If you'd rather not bother to pare your code down to a minimal demonstrative example, a prosaic description of what you're doing might suffice.
zotherstupidguy has quit [Ping timeout: 260 seconds]
lacrosse has joined #ruby
vayan has joined #ruby
Hobbyboy has joined #ruby
spastorino___ has joined #ruby
babblebre has joined #ruby
spastorino__ has quit [Ping timeout: 264 seconds]
<Ox0dea>
krobzaur: Well, will `display_list` only ever contain those two displays?
Hobbyboy has quit [Excess Flood]
phrozen77 has quit [Ping timeout: 264 seconds]
Guest85414______ has quit [Ping timeout: 245 seconds]
<Ox0dea>
Ah, never mind. That was supreme derpage.
devbug has joined #ruby
flavi0 has joined #ruby
Guest6972 has quit [Ping timeout: 264 seconds]
<krobzaur>
Ox0dea: Actually, yes it will only contain these two. All this stuff gets called from another script that checks the display setup beforehand. It only ever gets into this function if the display setup matches my setup at home
im0b has joined #ruby
<krobzaur>
Ox0dea: Which by nature only contains the two displays with the two names that are hardcoded into that snippet i posted
<Ox0dea>
Well, given that you're repeating every aspect of the script for both displays, it'd make sense to extract everything out into a method and just invoke it twice.
universa1 has quit [Ping timeout: 264 seconds]
<Ox0dea>
s/twice/conditionally/, I suppose.
<krobzaur>
Ox0dea: mmm true good point
DarkBushido has joined #ruby
DarkBushido has quit [Changing host]
DarkBushido has joined #ruby
<Ox0dea>
It's regrettable that you can't "add" negative desktops. :P
chinmay_dd has quit [Ping timeout: 264 seconds]
<Ox0dea>
Would clean up that conditional quite nicely.
<krobzaur>
lol
<krobzaur>
That would be nice
apipkin has quit [Read error: Connection reset by peer]
<flavi0>
is it possible to use multiple attributes in a group_by block? i want to group by year month and mday of a date, but not by time. it looks like group_by calculates some hash, so what i'm trying is just to build the sum of those 3 inside the block. is that reasonable?
drPoggs has joined #ruby
Xeago has quit [Remote host closed the connection]
<Ox0dea>
flavi0: Sure, use an Array.
<Ox0dea>
`group_by { |d| [d.year, d.month, d.day] }` or some such.
im0b has quit [Ping timeout: 264 seconds]
<krobzaur>
Ox0dea: I didn't even think to look I just kind of assumed haha
<flavi0>
Ox0dea: cool, let me see. i'm very new to ruby, come from c++. ruby seems really nice and idiomatic to me.
jimeh has quit [Ping timeout: 264 seconds]
jaxxstorm has quit [Ping timeout: 264 seconds]
chinmay_dd has joined #ruby
jaxxstorm has joined #ruby
<Ox0dea>
krobzaur: I mean, I pretty much knew what I was gonna find, but I figured I'd check. :P
epochwolf has quit [Ping timeout: 264 seconds]
rideh has quit [Ping timeout: 264 seconds]
shevy has quit [Ping timeout: 264 seconds]
lele has joined #ruby
epochwolf has joined #ruby
<Ox0dea>
flavi0: You might also consider #strftime: `group_by { |d| d.strftime '%Y%m%d' }`
bluOxigen has quit [Ping timeout: 246 seconds]
<Ox0dea>
That's probably more aligned with how you want to access the groups anyway.
tobiasvl has quit [Ping timeout: 264 seconds]
bluOxigen has joined #ruby
<flavi0>
Ox0dea: yeah it works nice, but i'm doing #{date[0]}/#{date[1]}/#{date[2]} now. this is inside slim.
sparr has quit [Changing host]
sparr has joined #ruby
tvl has joined #ruby
tvl is now known as tobiasvl
renderfu_ has quit [Read error: Network is unreachable]
Guest85414______ has joined #ruby
akitada has quit [Read error: Connection reset by peer]
<flavi0>
Ox0dea: this way i'd get the string right? i still need to be able to access the single elements. in that case array?
renderfu_ has joined #ruby
Rickmasta has joined #ruby
toretore has quit [Ping timeout: 246 seconds]
Nanuq has quit [Ping timeout: 264 seconds]
Nanuq has joined #ruby
rideh has joined #ruby
mostlybadfly has joined #ruby
rflot has quit [Ping timeout: 245 seconds]
cosmicfires has joined #ruby
konopka has quit [Ping timeout: 245 seconds]
zenspider has quit [Ping timeout: 245 seconds]
Paradox has quit [Ping timeout: 245 seconds]
akitada has joined #ruby
LBRapid has quit [Ping timeout: 245 seconds]
jimeh has joined #ruby
NET||abuse has quit [Ping timeout: 260 seconds]
shanemcd has joined #ruby
iamvery has quit [Ping timeout: 260 seconds]
<flavi0>
Ox0dea: anyways, works nicely. merci!
tobiasgreen has left #ruby [#ruby]
cpup has quit [Ping timeout: 260 seconds]
maloik has joined #ruby
KervyN has quit [Ping timeout: 245 seconds]
Spleeze has quit [Ping timeout: 245 seconds]
pjaspers has quit [Ping timeout: 245 seconds]
absolutejam has quit [Ping timeout: 245 seconds]
SirFunk has quit [Ping timeout: 260 seconds]
I has joined #ruby
Channel6 has joined #ruby
kadoppe has quit [Ping timeout: 245 seconds]
adeponte has quit [Ping timeout: 245 seconds]
Lorn has quit [Ping timeout: 245 seconds]
shtirlic has quit [Ping timeout: 245 seconds]
z3uS has quit [Ping timeout: 245 seconds]
okdas has quit [Ping timeout: 245 seconds]
Lildirt has quit [Ping timeout: 245 seconds]
dannluciano has quit [Ping timeout: 245 seconds]
Sam0163141155 has joined #ruby
NET||abuse has joined #ruby
I is now known as Guest71523
vikaton has joined #ruby
df has quit [Ping timeout: 245 seconds]
Nilium has quit [Ping timeout: 260 seconds]
iamvery has joined #ruby
LBRapid has joined #ruby
j0bk has quit [Ping timeout: 245 seconds]
kitallis has quit [Ping timeout: 245 seconds]
hohenfall has quit [Ping timeout: 260 seconds]
imajes has quit [Ping timeout: 260 seconds]
Takumo has quit [Ping timeout: 260 seconds]
cats has quit [Ping timeout: 260 seconds]
SirFunk has joined #ruby
alexblom has quit [Ping timeout: 245 seconds]
nlsun has quit [Ping timeout: 245 seconds]
Lorn has joined #ruby
tubuliferous_ has joined #ruby
<Ox0dea>
flavi0: `date[0..2].join('/')` is a slightly cleaner way to say that, but you won't be able to "access the single elements" regardless of how you specify the predicate, since they'll just be keys of the Hash that #group_by returns.
pjaspers has joined #ruby
shtirlic has joined #ruby
moei has quit [Read error: Connection reset by peer]
zenspider has joined #ruby
arthurnn has quit [Ping timeout: 245 seconds]
levifig has quit [Ping timeout: 245 seconds]
jinie has quit [Ping timeout: 245 seconds]
ryotarai has quit [Ping timeout: 245 seconds]
adeponte has joined #ruby
mmasaki has quit [Ping timeout: 245 seconds]
varesa has quit [Ping timeout: 245 seconds]
scottymeuk has quit [Ping timeout: 245 seconds]
df has joined #ruby
ricer2 has quit [Ping timeout: 260 seconds]
apeiros has quit [Ping timeout: 260 seconds]
okdas has joined #ruby
konopka has joined #ruby
cats has joined #ruby
z3uS has joined #ruby
okdas has quit [Changing host]
okdas has joined #ruby
im0b has joined #ruby
andersh has quit [Ping timeout: 245 seconds]
akosednar has quit [Ping timeout: 260 seconds]
tomdp has quit [Ping timeout: 260 seconds]
svkurowski has quit [Ping timeout: 260 seconds]
bihi has quit [Ping timeout: 260 seconds]
Guest2346 has quit [Ping timeout: 260 seconds]
ajb has quit [Ping timeout: 260 seconds]
valeri_ufo has quit [Ping timeout: 260 seconds]
sonne has quit [Ping timeout: 260 seconds]
duracrisis has quit [Ping timeout: 260 seconds]
Scient has quit [Ping timeout: 260 seconds]
bahar has quit [Ping timeout: 260 seconds]
secret has quit [Ping timeout: 260 seconds]
clamstar has quit [Ping timeout: 260 seconds]
shanemcd has quit [Ping timeout: 244 seconds]
Spleeze has joined #ruby
mmasaki has joined #ruby
absolutejam has joined #ruby
ryotarai has joined #ruby
jinie has joined #ruby
j0bk has joined #ruby
Takumo has joined #ruby
Takumo has quit [Changing host]
Takumo has joined #ruby
levifig has joined #ruby
_ko1 has quit [Quit: Quit Nadoka 0.8.4+git(v0.8.3-5-g0ae819a-dt)]
maloik has quit [Ping timeout: 244 seconds]
zotherstupidguy has joined #ruby
nlsun has joined #ruby
secret has joined #ruby
shevy has joined #ruby
rflot has joined #ruby
imajes has joined #ruby
kadoppe has joined #ruby
mozzarella has quit [Ping timeout: 260 seconds]
TheBrayn has quit [Ping timeout: 260 seconds]
Hobbyboy has joined #ruby
joeyjones has quit [Ping timeout: 245 seconds]
scottymeuk has joined #ruby
bahar has joined #ruby
andersh has joined #ruby
frankS2 has quit [Ping timeout: 264 seconds]
kirun has quit [Quit: Client exiting]
duracrisis has joined #ruby
shaman42 has quit [Ping timeout: 245 seconds]
cyberfawkes has joined #ruby
valeri_ufo has joined #ruby
cpup has joined #ruby
joeyjones has joined #ruby
ndancer has joined #ruby
alexblom has joined #ruby
TheBrayn has joined #ruby
KervyN has joined #ruby
Lildirt has joined #ruby
arescorpio has quit [Ping timeout: 245 seconds]
Scient has joined #ruby
ndancer is now known as Guest64690
arthurnn has joined #ruby
clamstar has joined #ruby
bihi has joined #ruby
tomdp has joined #ruby
Sam0163141155 has quit [Ping timeout: 245 seconds]
dlitvak has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
peterhil_ has quit [Ping timeout: 246 seconds]
davedev24 has quit [Ping timeout: 245 seconds]
frankS2 has joined #ruby
kitallis has joined #ruby
spastorino___ has quit [Ping timeout: 264 seconds]
nyandoge has quit [Ping timeout: 264 seconds]
_ko1 has joined #ruby
davedev24 has joined #ruby
rflot has quit [Ping timeout: 264 seconds]
Outlastsheep has joined #ruby
freerobby1 has quit [Quit: Leaving.]
rflot has joined #ruby
Nilium has joined #ruby
h99h9h88 has joined #ruby
Guest4184__ has joined #ruby
Guest4184_ has quit [Ping timeout: 264 seconds]
ajb has joined #ruby
jlyndon has quit [Ping timeout: 264 seconds]
ELLIOTTCABLE has quit [Ping timeout: 264 seconds]
ELLIOTTCABLE has joined #ruby
dannluciano has joined #ruby
nyandoge has joined #ruby
amitchellbullard has quit [Ping timeout: 264 seconds]
kellabyte has quit [Read error: Connection reset by peer]
kellabyte has joined #ruby
cmoneylulz has joined #ruby
<agent_white>
Here's my commit with the code, and a "test" plugin tossed into the plugins folder. I'm expecting to get a hash with the plugins loaded when I call "plugins()" inside my Bot class, but it's empty.
<agent_white>
Let me know if there's more code I should provide!
freerobby has joined #ruby
mostlybadfly has joined #ruby
amitchellbullard has joined #ruby
soahccc has quit [Ping timeout: 264 seconds]
im0b has quit [Ping timeout: 245 seconds]
soahccc has joined #ruby
twe4ked has quit [Ping timeout: 264 seconds]
pfg has quit [Ping timeout: 264 seconds]
babblebre has quit [Read error: Connection reset by peer]
pfg_ has joined #ruby
twe4ked has joined #ruby
DarkBushido has joined #ruby
DarkBushido has joined #ruby
bauruine has joined #ruby
babblebre has joined #ruby
diego3 has quit [Changing host]
diego3 has joined #ruby
spastorino___ has joined #ruby
im0b has joined #ruby
prosody has joined #ruby
Channel6 has quit [Ping timeout: 245 seconds]
<agent_white>
I have a feeling it has to do with $LOAD_PATH.
p0m3r4n0 has quit [Remote host closed the connection]
colstrom has joined #ruby
napcae_ has joined #ruby
<jhass>
agent_white: Dir[] is relative to the current working directory, not the current file
vayan has quit [Read error: Connection reset by peer]
zast has quit [Ping timeout: 264 seconds]
<agent_white>
jhass: Aye, so I moved my plugins/ dir from the root dir, into lib/vapebot/plugins/
vayan has joined #ruby
Guest71523 has quit [Quit: Leaving]
<jhass>
yes, obviously
_ko1 has quit [Quit: Quit Nadoka 0.8.4+git(v0.8.3-5-g0ae819a-dt)]
p0m3r4n0 has joined #ruby
Channel6 has joined #ruby
allcentury has joined #ruby
napcae has quit [Ping timeout: 260 seconds]
<agent_white>
jhass: First, is that a bad idea? Should the plugins directory be in the root directory? And second, so... I'm still lost.
xMopxShell has quit [Ping timeout: 260 seconds]
<jhass>
do you know what the current working directory of a process is?
frankS2 has quit [Ping timeout: 264 seconds]
<jhass>
personally I dislike enumerating files on the FS for require and rather list them explicitly
varesa has joined #ruby
spastorino___ has quit [Read error: Connection reset by peer]
camilasan has joined #ruby
spastorino___ has joined #ruby
dopie has joined #ruby
<agent_white>
Yep! Same current directory as the directory of the shell that ran it.
bauruine has quit [Ping timeout: 264 seconds]
<jhass>
so
<jhass>
then it should be clear?
machty has joined #ruby
<jhass>
also why it's a bad idea to rely on it at all in a gem
xMopxShell has joined #ruby
<agent_white>
Ohhh
EvilJStoker has quit [Ping timeout: 264 seconds]
devbug has quit [Ping timeout: 264 seconds]
spastorino___ has quit [Client Quit]
rbenv-will-kill- has joined #ruby
frankS2 has joined #ruby
tekacs has quit [Ping timeout: 264 seconds]
SuperTux88 has quit [Ping timeout: 264 seconds]
Fluent has quit [Ping timeout: 264 seconds]
spastorino has joined #ruby
C0deMaver1ck has joined #ruby
devbug has joined #ruby
C0deMaver1ck is now known as Guest96119
babblebre has quit [Ping timeout: 264 seconds]
<agent_white>
jhass: Thank you :D
callumacrae has joined #ruby
bauruine has joined #ruby
SuperTux88 has joined #ruby
sonne has joined #ruby
apeiros has joined #ruby
tekacs has joined #ruby
babblebre has joined #ruby
RobertBirnie has joined #ruby
<rbenv-will-kill->
So I am having trouble gettin rbenv properly configured. I seem to have 2 versions, when I am in my shell I installed 1.9.3. when I tried to run i got an error saying version not installed. but it was installed in /usr/local/var/rbenv/version. now when I do ruby -v it says `ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin15]` when I do 'rbenv versions' I get `1.9.3` as the only one installed. Why is there this discrepancy?
solocshaw has quit [Ping timeout: 240 seconds]
Fluent has joined #ruby
EvilJStoker has joined #ruby
hellschreiber_ has quit [Ping timeout: 264 seconds]
tomchapin has joined #ruby
Nanuq has quit [Ping timeout: 264 seconds]
techietrash has quit [Ping timeout: 264 seconds]
<jhass>
rbenv-will-kill-: because you use rbenv :P
solocshaw has joined #ruby
<jhass>
more seriously, what does type -a ruby report?
ELCALOR has quit [Ping timeout: 264 seconds]
tubuliferous_ has quit [Ping timeout: 245 seconds]
<rbenv-will-kill->
ruby is /Users/ME/.rbenv/shims/ruby ruby is /usr/bin/ruby
andersh has quit [Ping timeout: 264 seconds]
<jhass>
in that order? mh
<rbenv-will-kill->
yes
<jhass>
can you -v the full path of both?
colstrom has quit [Ping timeout: 264 seconds]
twe4ked has quit [Ping timeout: 264 seconds]
kellabyte has quit [Ping timeout: 264 seconds]
jabreity_ has quit [Ping timeout: 264 seconds]
jaxxstorm has quit [Ping timeout: 264 seconds]
<jhass>
/usr/bin/ruby -v and the other too
jaxxstorm has joined #ruby
cashnguns has joined #ruby
graffix has joined #ruby
akitada has quit [Ping timeout: 245 seconds]
babblebre has quit [Ping timeout: 264 seconds]
graffix has left #ruby [#ruby]
hellschreiber_ has joined #ruby
graffix has joined #ruby
kellabyte has joined #ruby
mostlybadfly_ has joined #ruby
bauruine has quit [Ping timeout: 264 seconds]
amitchellbullard has quit [Ping timeout: 264 seconds]
mostlybadfly has quit [Ping timeout: 264 seconds]
cbednarski has quit [Ping timeout: 264 seconds]
tejasmanohar has quit [Ping timeout: 264 seconds]
mostlybadfly_ is now known as mostlybadfly
amitchellbullard has joined #ruby
maloik has joined #ruby
Guest4184__ has quit [Ping timeout: 264 seconds]
Hobbyboy has quit [Ping timeout: 264 seconds]
jimeh has quit [Ping timeout: 264 seconds]
eggoez has quit [Ping timeout: 264 seconds]
jmcc_ has quit [Read error: Connection reset by peer]
<jhass>
I think you somehow managed to install 2.2.3 and label it as 1.9.3
andersh has joined #ruby
mjuszczak has joined #ruby
<jhass>
as to how you did that... idk
ELCALOR has joined #ruby
<rbenv-will-kill->
so usr/bin/ruby is installed originally on mac
<jhass>
yeah
<rbenv-will-kill->
the rbenv version I meant to install is the 2.2.3
diego3 has quit [Ping timeout: 264 seconds]
<rbenv-will-kill->
and the other one is what my shell is using
<rbenv-will-kill->
hmmmm
Bellthoven has quit [Client Quit]
maloik has quit [Ping timeout: 244 seconds]
<jhass>
"the other one" is which now?
techietrash has joined #ruby
techietrash has quit [Changing host]
techietrash has joined #ruby
duoi has joined #ruby
<rbenv-will-kill->
that is the /usr/local/var/rbenv/version)
<jhass>
so my guess stands, you managed to install 2.2.3 and label it as 1.9.3 ... somehow
<rbenv-will-kill->
no I did rbenv install 1.9.3 earlier today
duoi has quit [Excess Flood]
netuoso has quit [Quit: Page closed]
marr has quit [Ping timeout: 245 seconds]
Nanuq has joined #ruby
pizzaops has joined #ruby
duoi has joined #ruby
akitada has joined #ruby
<rbenv-will-kill->
but when i did rbenv shell 1.9.3 it said not installed
Channel6 has quit [Ping timeout: 245 seconds]
<jhass>
well, nobody here really uses rbenv and there's no help channel for it. I guess your best bet on getting support for it is opening an issue on github. Or just trash it and use chruby + ruby-install
flavi0 has quit [Quit: leaving]
bihi has quit [Ping timeout: 264 seconds]
railswebdev has joined #ruby
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kfpratt has quit []
* Ox0dea
seconds that motion.
<rbenv-will-kill->
i have no attatchment to rbenv, chruby is a better bet
tejasmanohar has joined #ruby
<rbenv-will-kill->
other than its making me crazy
twe4ked has joined #ruby
jokke has quit [Ping timeout: 264 seconds]
Lloyd has quit [Ping timeout: 264 seconds]
<jhass>
chruby is like 200 lines of shell script or something, easier to debug and grasp :P
hellschreiber_ has quit [Ping timeout: 245 seconds]
zzak has joined #ruby
<rbenv-will-kill->
thanks for your help jhass :)
Paradox has joined #ruby
<jhass>
yw
rbenv-will-kill- has quit [Quit: Page closed]
kellabyte has quit [Read error: Connection reset by peer]
Guest85414______ has quit [Read error: Network is unreachable]
Lloyd has joined #ruby
JoL1hAHN has quit [Ping timeout: 264 seconds]
eggoez has joined #ruby
kellabyte has joined #ruby
Guest85414______ has joined #ruby
amitchellbullard has quit [Ping timeout: 264 seconds]
yeticry has joined #ruby
universa1 has quit [Ping timeout: 264 seconds]
hellschreiber_ has joined #ruby
phrozen77 has joined #ruby
amitchellbullard has joined #ruby
paradisaeidae has quit [Ping timeout: 244 seconds]
ujjain has quit [Ping timeout: 245 seconds]
shortdudey123 has joined #ruby
sindork has quit [Ping timeout: 245 seconds]
babblebre has joined #ruby
greenbigfrog has quit [Ping timeout: 264 seconds]
jabreity_ has joined #ruby
JoL1hAHN has joined #ruby
bauruine has joined #ruby
bihi has joined #ruby
allcentury has quit [Ping timeout: 245 seconds]
Guest96119 has quit [Ping timeout: 264 seconds]
michael_mbp has quit [Ping timeout: 245 seconds]
jokke has joined #ruby
pontiki_ has quit [Ping timeout: 272 seconds]
sirecote has quit [Ping timeout: 245 seconds]
Hobbyboy|BNC has joined #ruby
zast has joined #ruby
universa1 has joined #ruby
redlegion has quit [Ping timeout: 245 seconds]
Guest4184__ has joined #ruby
jlyndon has joined #ruby
pontiki has joined #ruby
twe4ked has quit [Ping timeout: 264 seconds]
napcae_ has quit [Ping timeout: 245 seconds]
colstrom has joined #ruby
contradictioned has quit [Quit: No Ping reply in 180 seconds.]
redlegion has joined #ruby
spastorino has quit [Ping timeout: 264 seconds]
pfg_ has quit [Ping timeout: 264 seconds]
zrl has quit [Ping timeout: 264 seconds]
lacrosse has quit [Ping timeout: 264 seconds]
mostlybadfly has quit [Read error: Connection reset by peer]
Sam0163141155 has joined #ruby
spastorino has joined #ruby
lacrosse has joined #ruby
mostlybadfly has joined #ruby
amitchellbullard has quit [Ping timeout: 264 seconds]
contradictioned has joined #ruby
amitchellbullard has joined #ruby
andersh has quit [Ping timeout: 264 seconds]
jaxxstorm has quit [Ping timeout: 264 seconds]
greenbigfrog has joined #ruby
bf4 has quit [Ping timeout: 264 seconds]
C0deMaver1ck_ has joined #ruby
babblebre has quit [Ping timeout: 264 seconds]
Lloyd has quit [Ping timeout: 264 seconds]
im0b has quit [Ping timeout: 264 seconds]
avdi has quit [Read error: Network is unreachable]
Guest85414______ has quit [Read error: Network is unreachable]
rflot_ has joined #ruby
jabreity__ has joined #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rflot has quit [Ping timeout: 264 seconds]
im0b has joined #ruby
rflot_ is now known as rflot
Guest85414______ has joined #ruby
bf4 has joined #ruby
sindork has joined #ruby
ujjain has joined #ruby
ujjain has joined #ruby
deimos has quit [Read error: Connection reset by peer]
jabreity_ has quit [Ping timeout: 264 seconds]
zzak has quit [Ping timeout: 264 seconds]
twe4ked has joined #ruby
eaxxae2 has joined #ruby
eaxxae2 has quit [Max SendQ exceeded]
deimos has joined #ruby
pfg_ has joined #ruby
eaxxae2 has joined #ruby
zzak has joined #ruby
zrl has joined #ruby
hohenfall has joined #ruby
andersh has joined #ruby
Bellthoven has joined #ruby
avdi has joined #ruby
jaxxstorm has joined #ruby
Coraline has quit [Ping timeout: 240 seconds]
sirecote has joined #ruby
Arnvald has joined #ruby
bronson has joined #ruby
mickey_mouse has quit [Remote host closed the connection]
Guest37866 has quit [Ping timeout: 240 seconds]
Coraline has joined #ruby
mjuszczak has quit []
ElderFain has quit [Ping timeout: 240 seconds]
cdg has joined #ruby
Brando753 has quit [Excess Flood]
jsrn has quit [Ping timeout: 264 seconds]
mickey_mouse has joined #ruby
jsrn has joined #ruby
Guest85414______ has quit [Ping timeout: 264 seconds]
bronson has quit [Ping timeout: 244 seconds]
Guest85414______ has joined #ruby
baweaver has quit [Remote host closed the connection]
ajafo has quit [*.net *.split]
tsunamie has quit [*.net *.split]
vifino has quit [*.net *.split]
tuelz1 has quit [Ping timeout: 276 seconds]
alindeman has joined #ruby
hohenfall has quit [Ping timeout: 264 seconds]
constantinexvi has quit [Ping timeout: 264 seconds]
mickey_mouse has quit [Quit: Leaving]
eaxxae2 has left #ruby ["Leaving"]
nertzy has quit [Quit: This computer has gone to sleep]
hackeron has quit [Ping timeout: 257 seconds]
constantinexvi has joined #ruby
yfeldblum has quit [Ping timeout: 264 seconds]
Trynemjoel has quit [Ping timeout: 251 seconds]
ElderFain has joined #ruby
ghormoon has quit [Ping timeout: 264 seconds]
dlitvak has quit [Remote host closed the connection]
johnny56 has quit [Ping timeout: 264 seconds]
cookiez has quit [Ping timeout: 264 seconds]
null__ has quit [Ping timeout: 264 seconds]
Guest85414______ has quit [Read error: Network is unreachable]
Coraline has quit [*.net *.split]
ytti has quit [*.net *.split]
Guest85414______ has joined #ruby
vikaton has quit [Quit: Connection closed for inactivity]
greenbigfrog has quit [Ping timeout: 264 seconds]
bauruine has quit [Ping timeout: 264 seconds]
cyberfawkes has left #ruby [#ruby]
yfeldblum has joined #ruby
Ox0dea has quit [Read error: Connection reset by peer]
vayan has quit [Ping timeout: 264 seconds]
Ox0dea has joined #ruby
vayan has joined #ruby
avdi_ has joined #ruby
avdi has quit [Ping timeout: 264 seconds]
lele has quit [Ping timeout: 264 seconds]
avdi_ is now known as avdi
mickey_mouse has joined #ruby
lele has joined #ruby
hohenfall has joined #ruby
DanKnox[away] has quit [Ping timeout: 264 seconds]
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bauruine has joined #ruby
skweek has joined #ruby
Outlastsheep has joined #ruby
lacrosse has quit [Ping timeout: 264 seconds]
jimeh has quit [Ping timeout: 264 seconds]
Fluent has quit [Ping timeout: 264 seconds]
cjk101010 has quit [Ping timeout: 264 seconds]
lacrosse has joined #ruby
jabreity__ has quit [Ping timeout: 264 seconds]
spastorino has quit [Ping timeout: 264 seconds]
epochwolf has quit [Ping timeout: 264 seconds]
kloeri has quit [Remote host closed the connection]
jabreity__ has joined #ruby
spastorino has joined #ruby
greenbigfrog has joined #ruby
kloeri has joined #ruby
cjk101010 has joined #ruby
duncannz has joined #ruby
rflot has quit [Ping timeout: 264 seconds]
colstrom has quit [Ping timeout: 264 seconds]
tobiasvl has quit [Ping timeout: 264 seconds]
golgaroth has quit [Ping timeout: 264 seconds]
jaxxstorm has quit [Ping timeout: 264 seconds]
ElderFain has quit [Excess Flood]
jaxxstorm has joined #ruby
rflot has joined #ruby
golgaroth has joined #ruby
null__ has joined #ruby
null__ has quit [Changing host]
null__ has joined #ruby
Cantaberry has quit []
kloeri has quit [Remote host closed the connection]
<Ox0dea>
nchambers: Codecademy might at first "feel" effective because of the immediate feedback, but you're likely to come away from it not having actually learned much.
CrazyEddy has joined #ruby
<nchambers>
fair enough
<nchambers>
tis a shame because I enjoy interactive methods
TheBrayn has quit [Ping timeout: 245 seconds]
joeyjones has quit [Ping timeout: 245 seconds]
ndancer has joined #ruby
<Ox0dea>
The Koans provide a much more hands-on sort of interactivity.
ndancer is now known as Guest34522
Uptime- is now known as Uptime
jimeh has joined #ruby
m0nge has joined #ruby
kadoppe has joined #ruby
svkurowski has joined #ruby
devbug has joined #ruby
alexblom has joined #ruby
Lildirt has quit [Ping timeout: 245 seconds]
jaxxstorm has joined #ruby
paradisaeidae has quit [Ping timeout: 245 seconds]
jtdowney has quit [Ping timeout: 264 seconds]
borkdude has quit [Ping timeout: 264 seconds]
kitallis has joined #ruby
Morrolan has joined #ruby
michael_mbp has joined #ruby
napcae has joined #ruby
hohenfall has quit [Ping timeout: 264 seconds]
scottymeuk has joined #ruby
h99h9h88 has quit [Remote host closed the connection]
Scient has joined #ruby
braincrash has joined #ruby
andersh has quit [Ping timeout: 264 seconds]
jabreity__ has quit [Ping timeout: 264 seconds]
zast has quit [Ping timeout: 264 seconds]
andersh has joined #ruby
bf4 has quit [Ping timeout: 264 seconds]
avdi has quit [Ping timeout: 264 seconds]
epochwolf has quit [Ping timeout: 264 seconds]
SegFaultAX has quit [Ping timeout: 264 seconds]
avdi_ has joined #ruby
jaxxstorm has quit [Ping timeout: 264 seconds]
im0b has quit [Ping timeout: 264 seconds]
cbednarski has quit [Ping timeout: 264 seconds]
clamstar has quit [Ping timeout: 245 seconds]
Coraline has quit [Ping timeout: 240 seconds]
cbednarski has joined #ruby
im0b has joined #ruby
Coraline has joined #ruby
braincrash has quit [Client Quit]
jaxxstorm has joined #ruby
apeiros has quit [Ping timeout: 245 seconds]
karapetyan has quit [Remote host closed the connection]
<Ox0dea>
You've "b<CR>oops"ed three times in as many days.
cmoneylulz has quit [Remote host closed the connection]
amitchellbullard has joined #ruby
baweaver has joined #ruby
greenbigfrog has quit [Ping timeout: 264 seconds]
im0b has quit [Ping timeout: 264 seconds]
<blubjr>
its c-x b <ret> to switch back to the last buffer i was looking at and i keep missing the x lately i guess....its very embarrassing
ytti has quit [Ping timeout: 240 seconds]
bf4 has joined #ruby
im0b_ has joined #ruby
<Ox0dea>
C-Q for me.
bronson has joined #ruby
<Ox0dea>
Your fingers must hate you so hard.
borkdude has joined #ruby
joeyjones has joined #ruby
duoi has joined #ruby
duoi has quit [Changing host]
duoi has joined #ruby
zast has joined #ruby
lacrosse has quit [Read error: Connection reset by peer]
dannluciano has joined #ruby
epochwolf has quit [Ping timeout: 264 seconds]
<blubjr>
its not so bad
<Ox0dea>
I just did it a few times and it sucks way bad.
<blubjr>
with control on caps lock ?
<Ox0dea>
Yeah.
Paradox has quit [Ping timeout: 245 seconds]
<blubjr>
eh
lacrosse has joined #ruby
p0m3r4n0 has quit [Ping timeout: 245 seconds]
jimeh has quit [Ping timeout: 264 seconds]
deepu has joined #ruby
<Ox0dea>
Have you been using Emacs since it was Constantly Swapping?
chinmay_dd has quit [Ping timeout: 264 seconds]
<deepu>
hi, I'm a newbie .. I see a code like this Squares.new(2).square_of_sums. Is 'Square' a class and 'new' is a method inside that class? What is 'square_of_sums"?
bronson has quit [Ping timeout: 244 seconds]
<blubjr>
no im just a babe
tabakhase__ is now known as tabakhase
tabakhase has quit [Changing host]
tabakhase has joined #ruby
davedev24 has quit []
<Ox0dea>
blubjr: Then why not use Vim emulation?
gnarf has quit [Ping timeout: 245 seconds]
jabreity__ has quit [Ping timeout: 264 seconds]
jabreity__ has joined #ruby
Arnvald has joined #ruby
lady3bean has quit [Ping timeout: 260 seconds]
kfpratt has joined #ruby
varesa has quit [Ping timeout: 245 seconds]
<blubjr>
i used to, but i decided to stop fighting it a few years ago. its simpler this way
jaxxstorm has joined #ruby
Papierkorb has quit [Ping timeout: 245 seconds]
akosednar has joined #ruby
<deepu>
anyone?
tmtwd_ has joined #ruby
<Ox0dea>
deepu: That code isn't great, but `Squares` is indeed probably a class which has had its `new` singleton method (elseways called a class method) redefined to provide custom initialization, and then `square_of_sums` is an instance method, invocable on instances of `Squares` created via `new`.
<Radar>
deepu: ?anyone
<Radar>
Oh, I guess ruboto doesn't have that fact.
<Ox0dea>
You keep doing it backward.
iamayam has quit [Ping timeout: 260 seconds]
<Radar>
Yup.
valeri_ufo has joined #ruby
amitchellbullard has quit [Ping timeout: 264 seconds]
Guest85414______ has quit [Ping timeout: 264 seconds]
soahccc has quit [Ping timeout: 264 seconds]
ElderFain has joined #ruby
soahccc has joined #ruby
abbe has quit [Ping timeout: 240 seconds]
Guest85414______ has joined #ruby
iamayam has joined #ruby
rflot has quit [Read error: Connection reset by peer]
<Ox0dea>
deepu: Is it the distinction between class and instance methods with which you're having trouble?
bf4 has quit [Ping timeout: 264 seconds]
<deepu>
Ox0dea: yes
Coraline has quit [Ping timeout: 240 seconds]
<Ox0dea>
deepu: This'll be a stretch, but are you familiar with singleton methods?
<deepu>
Ox0dea: ys
jimeh has joined #ruby
sonne has quit [Ping timeout: 245 seconds]
<Ox0dea>
deepu: Yay! In that case, a class method is just a singleton method on an instance of the Class class.
rflot has joined #ruby
chinmay_dd has joined #ruby
svkurowski has quit [Ping timeout: 245 seconds]
bf4 has joined #ruby
<deepu>
Ox0dea: ok.. I am reading about it now... you pointed me to correct direction.. thank you
<Ox0dea>
deepu: Happy to help. :)
ryotarai has joined #ruby
<Ox0dea>
deepu: Given `class Class; def foo; end; end`, what're some objects on which I could now call `foo` without running into a NoMethodError?
Asher has joined #ruby
clamstar has joined #ruby
<deepu>
Class.foo?
Arnvald has quit []
ElderFain has quit [Ping timeout: 264 seconds]
<Ox0dea>
deepu: Nah, I would've had to say `def self.foo` for it to be callable like that. Have another go?
minimalism has quit [Quit: leaving]
juddey has quit [Ping timeout: 240 seconds]
greenbigfrog has joined #ruby
paradisaeidae has joined #ruby
JoL1hAHN has quit [Ping timeout: 264 seconds]
cashnguns has quit [Remote host closed the connection]
<Ox0dea>
`foo` became available on *all* instances of the Class class.
KervyN has joined #ruby
<deepu>
Ox0dea: yes...
levifig has joined #ruby
SirFunk has joined #ruby
epochwolf has joined #ruby
<Ox0dea>
Because I defined it as an *instance method* on Class. If I'd defined it as a singleton method, it would only be available on `Class` itself as `Class.foo`.
lele has quit [Ping timeout: 264 seconds]
blackjid has quit [Max SendQ exceeded]
<BraddPitt>
Measuring time complexities, how can we determine the added complexity for sorting an array?
bf4 has quit [Ping timeout: 264 seconds]
soahccc has quit [Ping timeout: 264 seconds]
kobain has quit [Ping timeout: 245 seconds]
<Ox0dea>
BraddPitt: Have you been tasked with not ignoring the coefficients?
<BraddPitt>
I'm sorry?
<BraddPitt>
oh
nlsun has joined #ruby
<BraddPitt>
I think I see what you're saying
okdas has joined #ruby
okdas has joined #ruby
bf4 has joined #ruby
gusrub has quit [Ping timeout: 245 seconds]
lele has joined #ruby
blackjid has joined #ruby
gix has quit [Ping timeout: 245 seconds]
soahccc has joined #ruby
blackjid has quit [Max SendQ exceeded]
chinmay_dd has quit [Ping timeout: 264 seconds]
jinie has joined #ruby
grzegorz has joined #ruby
grzegorz has quit [Remote host closed the connection]
JoL1hAHN has joined #ruby
DarkBushido has joined #ruby
DarkBushido has quit [Changing host]
DarkBushido has joined #ruby
akitada has quit [Read error: Connection reset by peer]
Lloyd has quit [Ping timeout: 264 seconds]
vayan has quit [Ping timeout: 264 seconds]
Paradox has joined #ruby
htmldrum has quit [Ping timeout: 245 seconds]
voxxit has quit [Ping timeout: 272 seconds]
bf4 has quit [Ping timeout: 264 seconds]
shevy has quit [Ping timeout: 244 seconds]
calderonroberto has joined #ruby
soahccc has quit [Ping timeout: 264 seconds]
SirCmpwn has quit [Ping timeout: 245 seconds]
vayan has joined #ruby
m0nge has quit [Quit: Lost terminal]
bahar has joined #ruby
voxxit has joined #ruby
akitada has joined #ruby
soahccc has joined #ruby
jmcc___ has quit [Ping timeout: 264 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
Papierkorb has joined #ruby
varesa has joined #ruby
an0ma1y has joined #ruby
jmcc___ has joined #ruby
shaman42 has joined #ruby
jabreity__ has quit [Read error: Connection reset by peer]
pen has joined #ruby
chinmay_dd has joined #ruby
jabreity__ has joined #ruby
Guest11 has joined #ruby
fulgore_ has quit [Ping timeout: 272 seconds]
kies has quit [Ping timeout: 245 seconds]
ElderFain has joined #ruby
jackcom has quit [Quit: jackcom]
SirCmpwn has joined #ruby
fulgore_ has joined #ruby
sonne has joined #ruby
ricer2 has joined #ruby
shevy has joined #ruby
skarn has joined #ruby
epochwolf has quit [Ping timeout: 264 seconds]
gix has joined #ruby
bubbys has quit [Ping timeout: 246 seconds]
deepu has quit [Ping timeout: 246 seconds]
blackjid has joined #ruby
redlegion has quit [Ping timeout: 245 seconds]
sirecote has quit [Ping timeout: 245 seconds]
machty has quit [Ping timeout: 264 seconds]
kloeri_ has joined #ruby
blackjid has quit [Max SendQ exceeded]
RobertBirnie has joined #ruby
chinmay_dd has quit [Ping timeout: 264 seconds]
apipkin has quit [Ping timeout: 264 seconds]
chinmay_dd has joined #ruby
DarkBushido has quit [Ping timeout: 264 seconds]
skarn has quit [Ping timeout: 264 seconds]
DarkBushido has joined #ruby
blackjid has joined #ruby
maloik has joined #ruby
sindork has quit [Ping timeout: 245 seconds]
ujjain has quit [Ping timeout: 245 seconds]
blackjid has quit [Max SendQ exceeded]
Parko has quit [Quit: In a while, crocodile]
apipkin has joined #ruby
soahccc has quit [Ping timeout: 264 seconds]
machty has joined #ruby
Guest11 has quit [Ping timeout: 244 seconds]
maloik has quit [Ping timeout: 244 seconds]
kloeri_ has quit [Remote host closed the connection]
bauruine has quit [Ping timeout: 264 seconds]
SegFaultAX has quit [Ping timeout: 264 seconds]
infernix has quit [Ping timeout: 245 seconds]
grzegorz has joined #ruby
shevy has quit [Ping timeout: 264 seconds]
epochwolf has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bronson has joined #ruby
<pontiki>
this probably only affects me, but when i'm running minitest, it turns the mode line in any active emacs buffer green or red. and it never turns it off, ever. anyone know how to reset the color of the mode line?
<pontiki>
alternatively, how do i tell minitest to stop doing that?
vayan has quit [Ping timeout: 245 seconds]
shevy has joined #ruby
Guest85414______ has quit [Ping timeout: 264 seconds]
amitchellbullard has quit [Ping timeout: 264 seconds]
<Muz>
Hi, anyone know of any useful libraries, or methods in std-lib; that'll parse Strings like "1h", "20m" or "45s" etc into Integer values? I could write one; but why reinvent the wheel.
<apeiros>
aaand it seems Module#autoload does not use Kernel#require (neither Kernel.require)
krz has quit [Read error: Connection reset by peer]
<Muz>
I know about Ruby Toolbox, but it didn't seem particularly appealing to trawl through anything Time related if someone knew of something off the top of their head :)
jud has quit [Quit: Leaving]
krobzaur has quit [Ping timeout: 260 seconds]
<Muz>
Chronic seems more Date orientated than anything.
e7d has quit [Client Quit]
Trynemjoel has quit [Ping timeout: 250 seconds]
codecop has joined #ruby
blackmesa has joined #ruby
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
terlar has joined #ruby
akitada has joined #ruby
peterhil_ has joined #ruby
e7d_ has quit [Quit: Leaving]
e7d has joined #ruby
joonty has joined #ruby
e7d has quit [Read error: Connection reset by peer]
senayar has joined #ruby
senayar has joined #ruby
yoongkang has joined #ruby
e7d has joined #ruby
CloCkWeRX has joined #ruby
marr has joined #ruby
spastorino has joined #ruby
mmitchell has joined #ruby
e7d has quit [Client Quit]
freedrul1 is now known as freedrull
howdoi has joined #ruby
CloCkWeRX has left #ruby [#ruby]
alxndr has joined #ruby
e7d has joined #ruby
colegatron has joined #ruby
twe4ked has quit [Ping timeout: 264 seconds]
fulgore_ has quit [Ping timeout: 272 seconds]
kellabyte has joined #ruby
brunto has quit [Read error: Connection reset by peer]
gaussblurinc1 has joined #ruby
stannard has joined #ruby
krz has joined #ruby
lxsameer has quit [Ping timeout: 245 seconds]
fulgore_ has joined #ruby
lxsameer has joined #ruby
agent_white has quit [Quit: brb]
twe4ked has joined #ruby
ceej has quit [Ping timeout: 245 seconds]
agent_white has joined #ruby
ceej has joined #ruby
skade has joined #ruby
elaptic`` is now known as elaptics
code_ has quit [Ping timeout: 245 seconds]
blueOxigen has joined #ruby
stannard has quit [Ping timeout: 260 seconds]
Guest32 has quit [Read error: Connection reset by peer]
troulouliou_div2 has joined #ruby
code_ has joined #ruby
bluOxigen has quit [Ping timeout: 244 seconds]
fulgore_ has quit [Ping timeout: 272 seconds]
joonty has quit [Quit: joonty]
devbug has joined #ruby
z3uS has quit [Ping timeout: 245 seconds]
matp has quit [Excess Flood]
jzigmund has joined #ruby
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fenre has quit [Remote host closed the connection]
inukshuk has quit [Quit: ...]
inukshuk has joined #ruby
<vikas027_>
How can I access all items corresponding to a 'login' field, like 'xyz123' in my case ? Forgive my ignorance on this. I've been assigned a task and trying to learn to manipulate hash in ruby. This is my code and the output https://dpaste.de/YLZV
allcentury has quit [Ping timeout: 260 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
jtdowney has quit [Ping timeout: 260 seconds]
toretore has joined #ruby
jtdowney has joined #ruby
jtdowney has quit [Changing host]
jtdowney has joined #ruby
svkurowski has quit [Ping timeout: 260 seconds]
svkurowski has joined #ruby
grzegorz has quit [Remote host closed the connection]
zrl has joined #ruby
cookiez has joined #ruby
russt has quit [Ping timeout: 260 seconds]
clamstar has quit [Ping timeout: 245 seconds]
ta has quit [Remote host closed the connection]
russt has joined #ruby
slackbotgz has joined #ruby
TPBallbag has quit [Remote host closed the connection]
aep has quit [Ping timeout: 245 seconds]
Guest1660 is now known as ZeeNoodley
ZeeNoodley has quit [Changing host]
ZeeNoodley has joined #ruby
<gregf_>
vikas027_: do you mean you only want to extract the key :login and its value from the array?
clamstar has joined #ruby
g3funk has quit [Ping timeout: 245 seconds]
blackmesa has quit [Read error: Connection reset by peer]
p0m3r4n0 has joined #ruby
<gregf_>
vikas027_: if you google for it you would save yourself time and also learn ;)
ldnunes has joined #ruby
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<vikas027_>
gregf: I tried google and I am able to iterate selective elements but not all elements corresponding to a key ':login' I am trying your code now
nlsun has quit [Ping timeout: 245 seconds]
Couch has quit [Ping timeout: 245 seconds]
djanatyn has quit [Ping timeout: 260 seconds]
exadeci has quit [Quit: Connection closed for inactivity]
RegulationD has joined #ruby
j2k has joined #ruby
jackcom has quit [Quit: jackcom]
Karunamon has quit [Ping timeout: 260 seconds]
brunto has quit [Ping timeout: 260 seconds]
Macaveli has quit [Read error: Connection reset by peer]
Karunamon has joined #ruby
gix has joined #ruby
gsingh93 has quit [Ping timeout: 260 seconds]
pjaspers has quit [Ping timeout: 260 seconds]
redlegion has quit [Ping timeout: 260 seconds]
Macaveli has joined #ruby
tsunamie has quit [Ping timeout: 246 seconds]
an0ma1y has quit [Ping timeout: 260 seconds]
okdas has quit [Ping timeout: 260 seconds]
<vikas027_>
gregf, ruboto: Using you codes, only values of ':login' is in the output. I am looking to access all elements corresponging to the key ':login'.
<gregf_>
vikas027_: theres many ways to do what you want :/. but yeah, a hash has unordered keys
tsunamie has joined #ruby
blackmesa has quit [Ping timeout: 260 seconds]
dannluciano has quit [Ping timeout: 260 seconds]
Spleeze has quit [Ping timeout: 260 seconds]
<vikas027_>
gregf: Please help me with one of them :)
<gregf_>
vikas027_: in the data you pasted, :login 'is' a key, and "xyz123" 'is' a value. unless you've not understoon what a hash is :|
RegulationD has quit [Ping timeout: 260 seconds]
sonOfRa has quit [Quit: Bye!]
okdas has joined #ruby
okdas has quit [Changing host]
okdas has joined #ruby
pjaspers has joined #ruby
<gregf_>
*understood
chriscoffee has joined #ruby
<vikas027_>
gregf: Yes, I got that
<gregf_>
ok, to make a long story short. you get an array of hashes. like so, ; [{:login=>"abcd", :foo => 1, :bar => 2}, {:login=>"xyz123", :foo => 2, :bar => 3 }]
dannluciano has joined #ruby
<gregf_>
what do you want to filter from the data?
<vikas027_>
gregf: In this hash of arrays, I want to take all the elements into an array. Something like this {:login=>"abcd", :foo => 1, :bar => 2} which is usually shown when using '.first' method
Spleeze has joined #ruby
<vikas027_>
for the first array
SirCmpwn has quit [Ping timeout: 260 seconds]
<gregf_>
No, its not a hash of arrays. its an array of hashes
duncannz has quit [Ping timeout: 244 seconds]
redlegion has joined #ruby
<vikas027_>
I am sorry, I meant that only
<gregf_>
ok, so next. so convert a hash to an array. why?
SirCmpwn has joined #ruby
<gregf_>
what are you trying to achieve?
d0nn1e has joined #ruby
djanatyn has joined #ruby
<gregf_>
if got other things to do unfortunately, so you'll be quick and to the point i'm afraid :|
<gregf_>
*need to
sonOfRa has joined #ruby
suchness has joined #ruby
<vikas027_>
gregf: I may be wrong, but I guess it would be easier for me to fetch and manipulate values
df has joined #ruby
<gregf_>
nothing is difficult in Ruby. you can do whatever , provided you know what you want to achieve
perry has quit [Ping timeout: 260 seconds]
sonOfRa has quit [Client Quit]
varesa has quit [Ping timeout: 260 seconds]
<gregf_>
fetch and manipulate what? ok, o put it straight. what do you want to end up with?
blackmesa has joined #ruby
<vikas027_>
gregf: Yeah, I am learning. My ultimate goal is to use these values in GitHub API calls
<gregf_>
vikas027_: use what values please? i'm begging with you :|
<shevy>
lol
<shevy>
these values man
arup_r has joined #ruby
nlsun has joined #ruby
<gregf_>
haha, shevy HALP
sanjayu has quit [Quit: Leaving]
bahar has quit [Ping timeout: 260 seconds]
<gregf_>
CAN I HAZ THE VALUES
<vikas027_>
gregf: For example, I would get values like url, type (https://dpaste.de/YLZV) and search the corresponding data in other hashes available from application
bahar has joined #ruby
<ljarvis>
vikas027_: for a specific login?
ajb has quit [Ping timeout: 260 seconds]
<vikas027_>
gregf: So, if I can filter out these values based on the the key ':login', I will try use them in code
h99h9h88 has joined #ruby
techietrash has quit [Ping timeout: 260 seconds]
<ljarvis>
vikas027_: data = array.find { |h| h[:login] == "abcd" }; data now has all information for the login "abcd"
TPBallbag has quit [Quit: don't try and hack my account Ballkenende]
blackmesa has quit [Ping timeout: 260 seconds]
an0ma1y has joined #ruby
<vikas027_>
gregf: I am sorry. As I said, I am new to ruby. Forgive my igorance on this. I've got a new project at my office, in which they use only ruby. If there was an option, I would have used shell in conjunction with ruby and do the tasks
<gregf_>
vikas027_: does that solve your problem?
<gregf_>
vikas027_: i can understand you are new. everyone starts from scratch. you're guys will give you the time to learn ;)
htmldrum has joined #ruby
ajb has joined #ruby
techietrash has joined #ruby
techietrash has quit [Changing host]
techietrash has joined #ruby
<gregf_>
so as ljarvis has said. you get logins and based on the login you get the other values, like so : logins = [:abcd, :xyz123]; [ logins.each { |l| data.find { |h| h[:login] == l }} ]
michael_mbp has quit [Ping timeout: 260 seconds]
tsunamie has quit [Ping timeout: 246 seconds]
ta has joined #ruby
sandstrom has joined #ruby
h99h9h88 has quit [Ping timeout: 260 seconds]
varesa has joined #ruby
Sam0163141155 has quit [Ping timeout: 245 seconds]
saneax_AFK has joined #ruby
quarcu has joined #ruby
slackbotgz has quit [Remote host closed the connection]
RandyT has quit [Read error: Connection reset by peer]
tsunamie has joined #ruby
<gregf_>
vikas027_: how to intend on using the values later?
yfeldblum has quit [Remote host closed the connection]
<gregf_>
s/to/do you/
CloCkWeRX has joined #ruby
sonOfRa has quit [Client Quit]
blackmesa has joined #ruby
<vikas027_>
gregf: Thanks a ton for your time. This is exactly what I was trying to do
<gregf_>
vikas027_: pp is for printing to the stdout. so please delete it and try
azgil has joined #ruby
michael_mbp has joined #ruby
tsunamie has joined #ruby
RandyT has joined #ruby
Rickmasta has joined #ruby
Spleeze has joined #ruby
<vikas027_>
gregf: When I deleted pp, I just got this #<Sawyer::Resource:0x007fb3b6977a90> not the hash
stamina has quit [Quit: WeeChat 1.3]
htmldrum has quit [Ping timeout: 244 seconds]
mostlybadfly has joined #ruby
saneax_AFK is now known as sanjayu
<gregf_>
puts is for a string, p, pp and inspect are for serializing objects
azgil has quit [Quit: Leaving]
sonOfRa has joined #ruby
araujo has quit [Ping timeout: 246 seconds]
<vikas027_>
gregf: https://dpaste.de/711O Not sure what I am missing. I will not bother you guys more, will read docs and Google it out. At least, now I know what to look for.
konstraint has joined #ruby
<konstraint>
Why does Ruby use a global import/require table?
qiukun has quit [Quit: qiukun]
<konstraint>
It would be nice if required files were only visible to those requiring them
<konstraint>
Makes for things being unexpectedly visible in areas of the application
sonOfRa has quit [Client Quit]
ujjain has quit [Ping timeout: 260 seconds]
minimalism has joined #ruby
<gregf_>
vikas027_: its not that we dont want to help. youre keeping us in suspense ;). btw, that paste is empty
kerunaru has quit [Ping timeout: 245 seconds]
pawnbox has quit [Remote host closed the connection]
ujjain has joined #ruby
pawnbox has joined #ruby
ujjain has quit [Changing host]
ujjain has joined #ruby
konstraint has quit [Remote host closed the connection]
`derpy has joined #ruby
blackmesa has quit [Ping timeout: 260 seconds]
<gregf_>
btw, i may be wrong with that p, puts. but yeah, puts is for string. both seem to work :|
<vikas027_>
gregf: I know you are helping me out. But I am unable to ask the exact questions. It is my bad. - https://dpaste.de/nyz9
secret has quit [Ping timeout: 245 seconds]
dhjondoh has quit [Remote host closed the connection]
secret has joined #ruby
<gregf_>
vikas027_: right, so i guess abc is array of Sawyer::Resource objects. what of you do this: abc.find { |h| h[:login] == "abcd" }.class
solocshaw has quit [Ping timeout: 260 seconds]
<atmosx>
hello
<shevy>
yo dr. atmosx
solocshaw has joined #ruby
<vikas027_>
gregf: I got this - Sawyer::Resource
ta has quit [Remote host closed the connection]
kerunaru has joined #ruby
norc has joined #ruby
arthurnn has quit [Ping timeout: 260 seconds]
norc is now known as Guest87203
krz has quit [Ping timeout: 260 seconds]
tulak has joined #ruby
<atmosx>
shevy: not yet
sonOfRa has joined #ruby
<atmosx>
shevy: I have an exam at 8th december (1 week). I'm actually ready to commit suicide, but it's okay. I think I'll get through it (hopefully).
Guest87203 has quit [Client Quit]
blackmesa has joined #ruby
<gregf_>
vikas027_: brill. what does this return: p abc.find { |h| h[:login] == "abcd" }.methods
<gregf_>
vikas027_: its almost as this: Sawyer = Struct.new(:id, :name); i = 0; data = Array.new(3){ Sawyer.new(i+=1, [*?a..?z][0..3].join) };p data; p data.find { |s| s[:id] % 2 == 0 }; # array of Sawyer objects
<gregf_>
vikas027_: good. so you've got an Sawyer::Resource objects and you can call those methods
<gregf_>
s/an/a/; s/objects/object/
ebertx has quit [Ping timeout: 245 seconds]
gbailey has quit [Ping timeout: 245 seconds]
yfeldblum has joined #ruby
<vikas027_>
gregf: What does this means s/an/a/; s/objects/object/ .Sorry, did not get that... seems like a unix sed command
<vikas027_>
:)
<TTilus>
vikas027_: that's a correction to previous message by same author
<TTilus>
vikas027_: and yes, syntax is sed-inspired :)
<vikas027_>
TTilus: got it
<gregf_>
yeah yeah, its sed ... for now. please run this: methods = [:login, :avatar_url]; methods.map { |m| abc.find { |h| h[:login] == "abcd" }.send(m) }
<vikas027_>
TTilus: thanks
jackcom has joined #ruby
davidcelis has quit [Ping timeout: 260 seconds]
ebertx has joined #ruby
platzhirsch has joined #ruby
babblebre has joined #ruby
allcentury has quit [Ping timeout: 260 seconds]
<vikas027_>
gregf: I got no output
aep has quit [Ping timeout: 260 seconds]
<gregf_>
put a p before methods.map please
decoponio has joined #ruby
<vikas027_>
gregf: Just got this -- [:login, :avatar_url]
dlitvak has joined #ruby
znz_jp has joined #ruby
ta has quit [Remote host closed the connection]
aep has joined #ruby
platzhirsch has left #ruby [#ruby]
davidcelis has joined #ruby
davidcelis has joined #ruby
aep has quit [Excess Flood]
tsunamie has quit [*.net *.split]
XenuLives has joined #ruby
<XenuLives>
What does class Foo < self do?
<jackcom>
python vs ruby, they have little differenc?
<gregf_>
vikas027_: ok, one last suggestion and i'm done :|. abc.find returns an array of objects that were filtered. filtered = abc.find { |h| h[:login] == "abcd" }; puts filtered.map { |f| f.login + " " + f.avatar_url }
<gregf_>
jackcom: cmon man. python is a reptile and ruby is a precious stone :|
<XenuLives>
Or is class Foo < self equivalent to class Foo << self ?
tsunamie has joined #ruby
joonty has quit [Quit: joonty]
<jhass>
no it isn't
<jhass>
XenuLives: what it does (whether it makes sense at all) depends on what self is
<jhass>
so where you found it
<gregf_>
vikas027_: then try this one last time: puts filtered.map { |f| f[:login] + " " + f[:avatar_url] }
<XenuLives>
jhass: It's a class def inside another class
<jhass>
XenuLives: so class Bar; class Foo < self; is a silly way to write class Bar; class Foo < Bar;
<jhass>
XenuLives: classes are just objects (instances of the class Class) assigned to constants
<jhass>
self inside a class definition is said object too, so class Bar; Bar == self
baweaver has quit [Ping timeout: 260 seconds]
<vikas027_>
gregf: no implicit conversion of Symbol into Integer (TypeError)
<vikas027_>
gregf: I got the above error
tuelz1 has quit [Ping timeout: 260 seconds]
<XenuLives>
jhass: Thought so. There's so much bad code like this out there
kobain has joined #ruby
marr has quit [Read error: Connection reset by peer]
aep has joined #ruby
brixen has quit [Ping timeout: 245 seconds]
XenuLives has quit [Quit: Leaving]
marr has joined #ruby
dagerik has joined #ruby
<dagerik>
im getting Nov 30 13:29:20 git mcollectived[25700]: /usr/local/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file
<dagerik>
Nov 30 13:29:20 git mcollectived[25700]: from /usr/local/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
<dagerik>
Nov 30 13:29:20 git mcollectived[25700]: from /usr/sbin/mcollectived:7:in `<main>'
<jhass>
dagerik: looks truncated on the right
<dagerik>
`require': cannot load such file -- mcollective (LoadError)
napcae has left #ruby [#ruby]
<jhass>
how did you install it? how did you install Ruby? Do you have multiple Rubies installed? Did you recently update Rub?
<jhass>
*Ruby
Guest66483 is now known as beagles
krz has joined #ruby
azgil2 has joined #ruby
brixen has joined #ruby
<dagerik>
jhass: debian 8 which has ruby ruby 2.1.6p336 (2015-04-13 revision 50298) [x86_64-linux]
<dagerik>
yes recent uprade from debian 7 to 8
<jhass>
pretty confident Debian won't install Ruby to /usr/local
bronson has joined #ruby
<dagerik>
jhass: okay I think I installed it manually
aryaching has joined #ruby
<TTilus>
ive got debian 8 and system ruby is ruby 2.1.5p273 (2014-11-13) [x86_64-linux-gnu]
<jhass>
I'm not really up to reading through all that and guessing what things you might have done, whether it's really related at all and what you might have missed from it
<dagerik>
how can I uninstall a ruby install that I manually installed?
kilk has joined #ruby
<dagerik>
cd ruby-2.1.6
<dagerik>
./configure --disable-install-rdoc
<dagerik>
make
<dagerik>
sudo make install
mfqr has joined #ruby
<TTilus>
dagerik: you prolly don't need to
<dagerik>
k
<jhass>
you can't cleanly
kilk has quit [Client Quit]
<jhass>
that's why we use packages, version managers and shit
<TTilus>
dagerik: debian system ruby prolly works just fine for you
brunto has joined #ruby
<TTilus>
dagerik: if it doesn't for some weird reason, use a special manager which can install (and uninstall!) multiple rubies cleanly side by side
<TTilus>
dagerik: your options are plenty, i personally use chruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dionysus69 has quit [Quit: dionysus69]
joonty has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
oddmunds has joined #ruby
railswebdev has joined #ruby
Macaveli has joined #ruby
johnzorn has joined #ruby
core__ has quit [Ping timeout: 260 seconds]
sorah has quit [Ping timeout: 250 seconds]
ibouvousaime has quit [Ping timeout: 245 seconds]
NET||abuse has quit [Ping timeout: 245 seconds]
Jardayn has joined #ruby
<shevy>
dagerik you can compile into a versioned prefix for instance, then nuke the directory if you no longer need it; this is ultimately what rvm etc.. also do, they will use some prefix into your $HOME directory somewhere
agent_white has quit [Quit: gnight]
<shevy>
dagerik another possibility would be http://porg.sourceforge.net/ but if you only need it for one program then that is rather overkill
tk has joined #ruby
tk is now known as Guest45211
pawnbox has quit [Remote host closed the connection]
tatsuo has quit [Quit: Leaving...]
sorah has joined #ruby
InvGhost has quit [Read error: Connection reset by peer]
im0b__ is now known as im0b
lxsameer has quit [Quit: Leaving]
<shevy>
hmm
<shevy>
I like this in python:
<shevy>
import sys, urllib2,re, dateparser,json
<shevy>
They even don't use any '' or "" there
<jackcom>
shevy: you can do python?
<shevy>
I can do hello world
<shevy>
but only in python 2.x
<jackcom>
oh great
<jackcom>
you are really genious
<shevy>
jackcom are you still failing to learn ruby?
yoongkang has quit [Remote host closed the connection]
<shevy>
jackcom can you not program in your mind alone?
Morrolan has joined #ruby
<jackcom>
yes
shredding has joined #ruby
<jackcom>
i need help from skilled programmer.
<jackcom>
shevy: :)
gusTester has joined #ruby
<shevy>
come on
jinie has quit [Ping timeout: 260 seconds]
dravine has quit [Ping timeout: 260 seconds]
<Ox0dea>
I genuinely believe that a ban of some duration would do them good.
<jackcom>
:(
<jackcom>
what you mean? Ox0dea
<jackcom>
i don’t want be baned.
<shevy>
don't bane him!
<Ox0dea>
It'd either kindle the fire necessary to get you to actually try to learn the language, or else it'd tempt you to move onto greener pastures. Either is an improvement on the present state of affairs.
dravine has joined #ruby
dlitvak has quit [Remote host closed the connection]
<gregf_>
jackcom: you can choose only one: either you can be 'banned' or you default to 'baned'
dmcp_ has quit [Client Quit]
<jackcom>
:(
<jhass>
jackcom: if you want us to believe that, the next 100 things you say must be ontopic questions related to an actual problem you have while learning Ruby
nertzy has quit [Quit: This computer has gone to sleep]
<gregf_>
cmon man, being banned from ruby is better than being a bane to ruby :|
<jackcom>
i want learn ruby hard
<jackcom>
ok
<jackcom>
jhass: i understand it
pawnbox has quit [Remote host closed the connection]
dmcp has joined #ruby
dmcp has quit [Client Quit]
dmcp has joined #ruby
prestorium has joined #ruby
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
howdoi has quit [Quit: Connection closed for inactivity]
teclator has joined #ruby
diesel has quit [Quit: leaving]
pawnbox has quit [Ping timeout: 260 seconds]
patdohere has quit [Ping timeout: 260 seconds]
aufi has quit [Quit: Konversation terminated!]
blackmesa has quit [Ping timeout: 260 seconds]
saltsa has joined #ruby
RobertBirnie has joined #ruby
krobzaur has joined #ruby
ziggles has joined #ruby
blackmesa has joined #ruby
rodfersou has joined #ruby
oddmunds has joined #ruby
<ziggles>
Anyone know how to have file path spaces escaped? File.join('some lib') # => #<Pathname:/Volumes/code/my_app/some lib>
tuelz1 has quit [Ping timeout: 245 seconds]
h99h9h88 has joined #ruby
patdohere has joined #ruby
scottymeuk has quit [Ping timeout: 260 seconds]
<jhass>
ziggles: what's your actual problem?
YP-QMUL-W has joined #ruby
<jhass>
escaping the spaces is the solution you think you need to it, there's probably a better way
landry has joined #ruby
patdohere has quit [Max SendQ exceeded]
slawrence00 has joined #ruby
michael_mbp has joined #ruby
<ziggles>
jhass: My problem is that i just discovered a bug when my script tries to access files with a space in the path name. I thought that File.join was the preferred way to build up a path
beneggett has joined #ruby
<jhass>
it was
<ziggles>
I could manually escape the string after joining but i feel like it's probably handled by Ruby some how
scottymeuk has joined #ruby
<jhass>
I'm not aware of a Ruby function for file access that would choke on unescaped spaces
blackmesa has quit [Ping timeout: 260 seconds]
wldcordeiro has joined #ruby
<ziggles>
spaces in paths are a pet peeve of mine... but on OSX it's sometimes unavoidable when the system creates a path :/
googly has joined #ruby
<Ox0dea>
ziggles: Still, they shouldn't be posing you a problem in Ruby.
zast has joined #ruby
nkwsy___4 has joined #ruby
<ziggles>
Ox0dea: Unless i'm using the wrong method of generating a path, they are
azgil has joined #ruby
<jhass>
ziggles: how about you show some actual code with some actual error message?
<Ox0dea>
ziggles: Are you interpolating these paths into shell commands or something?
googly has quit [Client Quit]
googly has joined #ruby
<ziggles>
Ox0dea: yeah that's exactly what i'm doing
<jhass>
so add some quotes around that
<jhass>
rule number one of dealing with your shell in a programmatic way: quote everything
<jhass>
but ideally you would just bypass your shell altogether
<havenwood>
>> require 'shellwords'; Shellwords.escape 'eek these spaces'
<Ox0dea>
Bish: Sounds like you need some Gandhi in your life.
<Bish>
shell comes right after sql hrm hrm
<Bish>
ofc embedded uses assembler, but not as much
<shevy>
constraint programming
<Ox0dea>
Bish: Not as much as what?
malconis has joined #ruby
djbkd has joined #ruby
bronson has quit [Ping timeout: 250 seconds]
aryaching_ has quit [Ping timeout: 260 seconds]
<Bish>
as much as peecha chakka no wookie boonowa tweepi solo ho ho ho
<Ox0dea>
Oh, hey, you are retarded.
<Ox0dea>
I thought you might've only been pretending.
<Bish>
thank you!
<Bish>
i actually googled that comeback, because im not fluent in jabba
c0m0 has quit [Ping timeout: 260 seconds]
iamayam has quit [Ping timeout: 260 seconds]
dlitvak has quit [Ping timeout: 245 seconds]
iamayam has joined #ruby
dlitvak has joined #ruby
karapetyan has quit [Remote host closed the connection]
<Bish>
i just can't see whole chips getting written with asm, even small ones
baroquebobcat has joined #ruby
<Ox0dea>
Why should your lack of insight have any bearing on what is actually true?
c0m0 has joined #ruby
<Bish>
never claimed i was an expert on this, but still, i feel if assembly was that popular, more people wanted to talkw ith me about that topic
<Bish>
but they don't
bronson has joined #ruby
toretore has joined #ruby
<mg^>
I write MIPS assembly on occasion
jbrhbr has joined #ruby
<mg^>
and occasionally Z-80
<mg^>
it's just not usually worth talking about :)
jottr_ has quit [Ping timeout: 260 seconds]
<Bish>
well, do you do it for a living?
fantazo has joined #ruby
<mg^>
Nah, hobby. Was going to try to turn it into a living, but decided that firmware programming was not my thing
<Bish>
see. that's what i meant.
<Bish>
and what platform doesn't have a c compiler, ofcourse you do the high-performance stuff in assembler, but i just don't see it as high in the ranking as someone else
<mg^>
I mean, I enjoy it to some level, but the places that pay for it are not where I want to work
<Bish>
where do you want to work
<mg^>
I
darkf has quit [Quit: Leaving]
<Bish>
self employed :D?
<mg^>
I'm working where I want to work :)
<mg^>
No, I work for a SaaS startup
<blubjr>
bish bursts through a door, all the embedded hackers look up, bish says you could just do this in c, everyone stands up and cheers
ceej has quit [Remote host closed the connection]
<mg^>
Most of my job can be described as "making software play well with others" :-)
Alayde has joined #ruby
s2013 has quit [Read error: Connection reset by peer]
<Bish>
blubjr, are you one of those hackers?
<Bish>
and i never said something like that, you're turning my words
<Bish>
and why are you so mad, i just said assembly is not as popular as in that ranking
<mg^>
Essentially I spend most of my day taking the output of one things API, munging the data, and stuffing it into some other things API. Not something that's fun with assembly!
ceej has joined #ruby
<Bish>
grab a coffee dudes, i love assembly
<eam>
so, TIOBE is based on search engine queries, right?
h99h9h88 has joined #ruby
Takumo has quit [Ping timeout: 260 seconds]
<eam>
it's not a measure of how much something's used as much as a measure of how often people have questions about the thing
<Bish>
i have no clue, and i also have no clue why people enrage when i say something like that :o
<jbrhbr>
eam: i was trying to catch you the other day— do you know of any other weird things like that [true or false] problem you mentioned last week?
<eam>
unsurprising that assembly ranks high in terms of searches, considering it's almost entirely just domain specific knowledge
<Ox0dea>
>> [p 1] # jbrhbr
<eam>
jbrhbr: sure, the and/or/not parses weird in a few other contexts
<ruboto>
Ox0dea # => /tmp/execpad-53867c82ff3d/source-53867c82ff3d:2: syntax error, unexpected tINTEGER, expecting keywor ...check link for more (https://eval.in/477957)
c0m0 has quit [Ping timeout: 245 seconds]
<jbrhbr>
eam: i mean aside from those, i noticed they are broken all over the place after you clued me into it :)
<Bish>
and i've seen embedded developers, but i haven't seen embedded developers who do assembly
<ruboto>
eam # => [true, "busted: f(not true)", false, "busted: f not true", false] (https://eval.in/477958)
nofxx has joined #ruby
nofxx has joined #ruby
Takumo has joined #ruby
Takumo has joined #ruby
aryaching has joined #ruby
migou has joined #ruby
<jbrhbr>
Ox0dea: `x or y` is not a proper expression in the sense that it can be used where any other expression can, without parens for parser disambiguation
<Ox0dea>
jbrhbr: But that's also true for method invocation, as I recently demonstrated.
<Bish>
fun fact: the bsearch thing is so much faster, that the working queue eats my ram, and crashes :(
aspiers has quit [Ping timeout: 245 seconds]
<jbrhbr>
eam: thanks
dlitvak has joined #ruby
akem has quit [Quit: Bye]
ddubs has quit [Remote host closed the connection]
jottr_ has joined #ruby
<jbrhbr>
eam: can you explain what's going on in that -@ example? i don't know what -@ is but it loads like you're overriding unary negation for integers?
tuelz has joined #ruby
blackjid has quit [Max SendQ exceeded]
s00pcan_ has quit [Ping timeout: 260 seconds]
blackjid has joined #ruby
The_Phoenix has quit [Read error: Connection reset by peer]
peterhil_ has joined #ruby
troulouliou_div2 has quit [Remote host closed the connection]
<Ox0dea>
jbrhbr: Just so.
<eam>
yeah, sometimes unary - is a method and sometimes it is parsed as part of the numeric literal
blackmesa has joined #ruby
<eam>
-7 is a numeric literal, no method invocation
<eam>
- 7 is a numeric literal of 7, with the - method applied
<eam>
x = 7; -x is the latter as well
<jbrhbr>
yeah i get it now
<jbrhbr>
that possibility seems so distant that i didn't consider it
<Ox0dea>
Why?
<eam>
everything is a method, except when it isn't
<jbrhbr>
it's just very asymmetrical
<jbrhbr>
@Ox
shanemcd has joined #ruby
elaptics is now known as elaptics`away
<jbrhbr>
if there are any syntactically valid ways to express unary negation, then one would expect that overriding unary negation would impact all of those cases
<jbrhbr>
not selectively
shanemcd_ has joined #ruby
<eam>
yeah it's a bit of a wart
<Ox0dea>
There is an inherent ambiguity that matz had to resolve one way or another.
nertzy has quit [Quit: This computer has gone to sleep]
<eam>
well, you could argue that "-" should never be part of a literal
drbrain has quit [Ping timeout: 240 seconds]
<jbrhbr>
performance posse would probably argue against that
DanKnox[away] has quit [Ping timeout: 264 seconds]
aredridel has quit [Ping timeout: 264 seconds]
Klumben has quit [Ping timeout: 264 seconds]
<eam>
I doubt that parsing literals is a significant part of any ruby runtime
drbrain has joined #ruby
<Ox0dea>
eam: But then how would we represent -7 in the case of an overriden Fixnum#-@?
techietrash has quit [Ping timeout: 264 seconds]
SegFaultAX has quit [Ping timeout: 264 seconds]
eggoez has quit [Ping timeout: 264 seconds]
tubulife| is now known as tubuliferous_
<eam>
Ox0dea: un-override it
<eam>
"it hurts when I do this"
<jbrhbr>
:p
akkad has quit [Ping timeout: 246 seconds]
baweaver has joined #ruby
peterhil_ has quit [Ping timeout: 264 seconds]
whippythellama has quit [Ping timeout: 264 seconds]
sorah has quit [Ping timeout: 264 seconds]
hohenfall has quit [Ping timeout: 264 seconds]
duoi has quit [Ping timeout: 264 seconds]
BackEndCoder has quit [Ping timeout: 264 seconds]
Some-body_ has joined #ruby
Gadgetoid has quit [Ping timeout: 240 seconds]
DarthGandalf has quit [Ping timeout: 264 seconds]
jtdowney has quit [Ping timeout: 264 seconds]
Guest97424 has quit [Ping timeout: 264 seconds]
Uptime has quit [Ping timeout: 264 seconds]
johnhamelink has quit [Ping timeout: 264 seconds]
Nanuq has quit [Ping timeout: 264 seconds]
Sthebig has quit [Ping timeout: 264 seconds]
Some-body_ is now known as DarthGandalf
alem0lars has quit [Ping timeout: 264 seconds]
sparr has quit [Ping timeout: 264 seconds]
G has quit [Ping timeout: 264 seconds]
unsymbol has quit [Ping timeout: 244 seconds]
GarethAdams has quit [Ping timeout: 240 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
shanemcd has quit [Ping timeout: 260 seconds]
tulak has quit []
spacemud has quit [Ping timeout: 244 seconds]
dlitvak has quit [Remote host closed the connection]
blubjr has quit [Read error: Connection reset by peer]
<jbrhbr>
i don't understand the 7 problem
Jackneill has joined #ruby
krz has joined #ruby
<jbrhbr>
if you really wanted to override -, you wouldn't make it return the literal 7
G has joined #ruby
blubjr has joined #ruby
<jbrhbr>
it's just contrived to show the inconsistency
pipework has quit [Quit: pipeworkin' it]
dhollinger has joined #ruby
tris has quit [Ping timeout: 240 seconds]
eam has quit [Ping timeout: 240 seconds]
<Ox0dea>
"Inconsistency" is the wrong word, in my opinion.
jtdowney has joined #ruby
jtdowney has joined #ruby
rakm has joined #ruby
<jbrhbr>
another way would be to not allow overriding of any of those base expression operators, if the expression parser isn't going to honor them
<Ox0dea>
Do you have me muted?
<jbrhbr>
no
maloik has joined #ruby
peterhil_ has joined #ruby
null3 has quit [Ping timeout: 240 seconds]
greedo has quit [Ping timeout: 260 seconds]
shanemcd_ has quit [Remote host closed the connection]
aps has quit [Ping timeout: 264 seconds]
baroquebobcat has quit [Read error: Connection reset by peer]
Sou|cutter has quit [Ping timeout: 245 seconds]
hahuang61 has quit [Ping timeout: 245 seconds]
baroquebobcat has joined #ruby
<Ox0dea>
We don't run into any of these problems if we properly pad our operators.
skarn has quit [Ping timeout: 264 seconds]
tpendragon has quit [Ping timeout: 264 seconds]
jokester has quit [Ping timeout: 240 seconds]
<jbrhbr>
i don't doubt that they are easily avoided
techietrash has joined #ruby
C0deMaver1ck has joined #ruby
<Ox0dea>
When we don't pad them, the parser has to disambiguate somehow, and the current approach is hardly the worst.
aredridel has joined #ruby
Liothen has quit [Ping timeout: 260 seconds]
deg_ has quit [Ping timeout: 260 seconds]
pipework has joined #ruby
C0deMaver1ck is now known as Guest43890
mickey_mouse has quit [Quit: Leaving]
chinmay_dd has quit [Ping timeout: 260 seconds]
twe4ked has quit [Ping timeout: 260 seconds]
Junaos has quit [Ping timeout: 260 seconds]
mblagden_ has quit [Ping timeout: 260 seconds]
blowmage has quit [Ping timeout: 260 seconds]
mickey_mouse has joined #ruby
Alayde has left #ruby ["WeeChat 1.1.1"]
blackjid has quit [Ping timeout: 250 seconds]
shanemcd has joined #ruby
znz_jp has quit [Ping timeout: 260 seconds]
Gadgetoid has joined #ruby
spacemud has joined #ruby
unsymbol has joined #ruby
SenpaiSilver has joined #ruby
mblagden has joined #ruby
TDJACR has quit [Ping timeout: 264 seconds]
lemur has joined #ruby
GarethAdams has joined #ruby
Miron has quit [Ping timeout: 264 seconds]
tris has joined #ruby
akkad has joined #ruby
<jbrhbr>
my inquiry isn't about working around them though— i'm just curious about the cases where the parser might surprise me
hahuang61 has joined #ruby
shanemcd has quit [Client Quit]
chinmay_dd has joined #ruby
mahlon has quit [Read error: Connection reset by peer]
Junaos has joined #ruby
juanpablo_ has joined #ruby
postmodern has joined #ruby
greedo has joined #ruby
lemur has quit [Ping timeout: 260 seconds]
juanpablo_ has quit [Remote host closed the connection]
platzhirsch has joined #ruby
juanpablo_ has joined #ruby
juanpablo_ has quit [Remote host closed the connection]
Liothen has joined #ruby
Liothen has joined #ruby
myztic has quit [Quit: leaving]
juanpablo_ has joined #ruby
juanpablo_ has quit [Remote host closed the connection]
seriousman has joined #ruby
SegFaultAX has joined #ruby
seriousman has quit []
znz_jp has joined #ruby
blowmage has joined #ruby
deg has joined #ruby
sorah has joined #ruby
mahlon has joined #ruby
whippythellama has joined #ruby
sparr has joined #ruby
zapata has quit [Quit: WeeChat 1.3]
eam has joined #ruby
skweek has quit [Ping timeout: 245 seconds]
zapata has joined #ruby
dlitvak has joined #ruby
hahuang61 has quit [Quit: WeeChat 1.3]
jessemcgilallen has joined #ruby
beneggett has quit [Quit: (╯°□°)╯︵ ┻━┻) - keep on keeping on]
null3 has joined #ruby
Sou|cutter has joined #ruby
jokester has joined #ruby
Lildirt has quit [Ping timeout: 245 seconds]
brixen has quit [Ping timeout: 245 seconds]
nateberkopec has joined #ruby
sandstrom has joined #ruby
code_ has quit [Ping timeout: 245 seconds]
skweek has joined #ruby
ajb has quit [Ping timeout: 260 seconds]
ebertx has quit [Ping timeout: 260 seconds]
gbailey has quit [Ping timeout: 260 seconds]
KervyN has quit [Ping timeout: 260 seconds]
perry has quit [Ping timeout: 245 seconds]
<eam>
welp, freenode had a bit of a burp
sonne has quit [Ping timeout: 260 seconds]
<eam>
not sure if this got through, but: the real question, I think, is whether to apply unary - when parsing a literal in exponent form
<eam>
should that be passed through the unary - method?
arthurnn has quit [Ping timeout: 245 seconds]
apeiros has quit [Ping timeout: 245 seconds]
dlitvak has quit [Ping timeout: 260 seconds]
okdas has quit [Ping timeout: 260 seconds]
KervyN has joined #ruby
akosednar has quit [Ping timeout: 245 seconds]
hahuang65 has joined #ruby
Scient has joined #ruby
Nilium has quit [Ping timeout: 260 seconds]
joeyjones has quit [Ping timeout: 260 seconds]
zenspider has quit [Ping timeout: 245 seconds]
aep has quit [Ping timeout: 245 seconds]
ryotarai has quit [Ping timeout: 245 seconds]
mordocai has joined #ruby
frem has joined #ruby
Paradox has quit [Ping timeout: 245 seconds]
akosednar has joined #ruby
arthurnn has joined #ruby
aep has joined #ruby
perry has joined #ruby
perry has quit [Changing host]
perry has joined #ruby
eggoez has joined #ruby
NET||abuse has quit [Ping timeout: 245 seconds]
ryotarai has joined #ruby
okdas has joined #ruby
okdas has quit [Changing host]
okdas has joined #ruby
duoi has joined #ruby
sonne has joined #ruby
ebertx has joined #ruby
DanKnox[away] has joined #ruby
TDJACR has joined #ruby
Paradox has joined #ruby
apeiros has joined #ruby
twe4ked has joined #ruby
zenspider has joined #ruby
Nilium has joined #ruby
duracrisis has quit [Ping timeout: 260 seconds]
brixen has joined #ruby
joeyjones has joined #ruby
<mordocai>
Anyone have a good idea for calculating how many calendar days intersect a time range? I found this http://goo.gl/3cO6AY but I don't particularly like the presented solutions.
skweek has quit [Ping timeout: 245 seconds]
gbailey has joined #ruby
devbug has joined #ruby
NET||abuse has joined #ruby
<mordocai>
If that's too confusing I can write up the real world problem i'm trying to solve.
omegahm has quit [Ping timeout: 260 seconds]
Miron has joined #ruby
phildkim has joined #ruby
omegahm has joined #ruby
pestle has joined #ruby
hohenfall has joined #ruby
Uptime has joined #ruby
hahuang65 has quit [Ping timeout: 250 seconds]
Nanuq has joined #ruby
pawnbox has joined #ruby
duracrisis has joined #ruby
Sthebig has joined #ruby
Sthebig has joined #ruby
hahuang65 has joined #ruby
jbrhbr has joined #ruby
Karunamon has joined #ruby
TheBrayn has quit [Ping timeout: 245 seconds]
mmasaki has quit [Ping timeout: 245 seconds]
Uptime has quit [Max SendQ exceeded]
based_pdev has joined #ruby
based_pdev_ has joined #ruby
platzhirsch has left #ruby [#ruby]
Uptime has joined #ruby
BackEndCoder has joined #ruby
pawnbox has quit [Ping timeout: 260 seconds]
twe4ked has quit [Ping timeout: 260 seconds]
dlitvak has joined #ruby
chridal has quit [Ping timeout: 260 seconds]
bahar has quit [Ping timeout: 245 seconds]
rodfersou has quit [Ping timeout: 260 seconds]
aiguu has joined #ruby
code_ has joined #ruby
mmasaki has joined #ruby
TheBrayn has joined #ruby
blaxter has quit [Quit: foo]
ur5us has joined #ruby
rodfersou has joined #ruby
baweaver has quit [Remote host closed the connection]
bahar has joined #ruby
chridal has joined #ruby
hahuang65 has quit [Ping timeout: 264 seconds]
ur5us has quit [Read error: No route to host]
ur5us has joined #ruby
Klumben has joined #ruby
tpendragon has joined #ruby
phildkim has left #ruby [#ruby]
twe4ked has joined #ruby
rvchangue has quit [Ping timeout: 245 seconds]
peterhil_ has quit [Ping timeout: 250 seconds]
lapide_viridi has quit [Quit: Leaving]
snockerton has quit [Quit: Leaving.]
aps has joined #ruby
aps is now known as Guest90599
codecop has joined #ruby
adeponte has quit [Ping timeout: 260 seconds]
blackjid has joined #ruby
centrx has joined #ruby
skarn has joined #ruby
<jbrhbr>
eam: i got it at least
<jbrhbr>
:)
jpfuentes2 has quit [Ping timeout: 245 seconds]
adeponte has joined #ruby
hahuang65 has joined #ruby
<eam>
rad
_djbkd has joined #ruby
_djbkd has quit [Read error: Connection reset by peer]
ascarter has joined #ruby
_djbkd has joined #ruby
dlitvak has quit [Remote host closed the connection]
rvchangue has joined #ruby
<shevy>
triangle!
jpfuentes2 has joined #ruby
<blubjr>
hi shevy
<shevy>
what's with you blubjr man
bronson has joined #ruby
momomomomo has joined #ruby
djbkd has quit [Ping timeout: 260 seconds]
lokulin has quit [Ping timeout: 240 seconds]
<blubjr>
what..
DexterLB has quit [Ping timeout: 260 seconds]
_djbkd has quit [Remote host closed the connection]
`based_pdev` has joined #ruby
djbkd has joined #ruby
lokulin has joined #ruby
<shevy>
you greet me all the time!
aiguu has quit [Quit: WeeChat 1.3]
DexterLB has joined #ruby
<blubjr>
oh sorry....its just saying hi
bronson has quit [Ping timeout: 250 seconds]
hahuang65 has quit [Ping timeout: 260 seconds]
Mon_Ouie has joined #ruby
based_pdev_ has quit [Ping timeout: 250 seconds]
based_pdev has quit [Ping timeout: 250 seconds]
blackmesa has quit [Ping timeout: 260 seconds]
replay has joined #ruby
<shevy>
I wasn't even asleep in between the two greets
devbug has quit [Ping timeout: 250 seconds]
<blubjr>
i was..
baroquebobcat_ has joined #ruby
alem0lars has joined #ruby
maloik has quit [Ping timeout: 260 seconds]
kadoppe has quit [Ping timeout: 260 seconds]
Ox0dea has quit [Ping timeout: 244 seconds]
hahuang65 has joined #ruby
pandaant has quit [Remote host closed the connection]
zast has quit [Remote host closed the connection]
baroquebobcat has quit [Ping timeout: 260 seconds]
baroquebobcat_ is now known as baroquebobcat
cinik has joined #ruby
maloik has joined #ruby
kadoppe has joined #ruby
tuelz has quit [Ping timeout: 260 seconds]
juddey has joined #ruby
peterhil_ has joined #ruby
allomov has quit [Remote host closed the connection]
maloik has quit [Ping timeout: 245 seconds]
maloik has joined #ruby
inukshuk_ has joined #ruby
inukshuk_ has quit [Client Quit]
b0yzn01z3 has quit [Read error: Connection reset by peer]
maloik has quit [Ping timeout: 245 seconds]
icey has quit [Ping timeout: 245 seconds]
aryaching has quit [Ping timeout: 250 seconds]
devbug has joined #ruby
moeabdol has joined #ruby
maloik has joined #ruby
moeabdol has quit [Client Quit]
b0yzn01z3 has joined #ruby
moeabdol has joined #ruby
J4D has joined #ruby
<slash_nick>
hey shevy...what's your favorite planet?
roshanavand has quit [Remote host closed the connection]
aryaching has joined #ruby
moeabdol has quit [Client Quit]
chouhoul_ has joined #ruby
<slash_nick>
mine's the sun... if you stare at it will burn your eyes
bronson has joined #ruby
momomomomo has quit [Quit: momomomomo]
vF3hNGxc47h8 has joined #ruby
zeroDivisible has joined #ruby
<eam>
the sun isn't a planet
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yfeldblum has quit [Remote host closed the connection]
<CamonZ>
#_sort_nodes is unreadable and the assignment there is the same that is being done in the nodes.each loop that I gist'd
maloik has quit [Ping timeout: 260 seconds]
<CamonZ>
eam: dude, thanks! this is a great example. I have to interview a dev tomorrow and really needed some oss code that we could talk-through/refactor
maloik has joined #ruby
aryaching has quit []
momomomomo has quit [Quit: momomomomo]
j5s7 has quit [Quit: leaving]
maloik has quit [Ping timeout: 260 seconds]
thang_ is now known as thang
Mon_Ouie has quit [Quit: WeeChat 1.3]
phantom has quit [Quit: Leaving]
cdg has joined #ruby
baweaver has quit [Remote host closed the connection]
roshanavand has joined #ruby
codecop has quit [Remote host closed the connection]
<drbrain>
so if you don't care about documentation you can disable it in ~/.gemrc
<acidrainfall>
didn't mean to tag you on it
<acidrainfall>
I do not care about documentation
<acidrainfall>
ok
<drbrain>
I think you add "gem: --no-rdoc --no-ri"
<acidrainfall>
Hooray!
aspiers has joined #ruby
maloik has quit [Ping timeout: 250 seconds]
<drbrain>
if you've got a modern ruby you can "gem: --no-doc"
<drbrain>
but given the error you're seeing I think you'll need to do it the old way
<acidrainfall>
1.8.7
nateberkopec has joined #ruby
slash_nick is now known as slash_part
yeticry has quit [Read error: Connection reset by peer]
<adaedra>
Who you gonna call?
roshanavand has joined #ruby
<acidrainfall>
redhat tech support I guess
<acidrainfall>
lo
<acidrainfall>
lol*
<acidrainfall>
Oh well it works for now
<acidrainfall>
I can forget about it
<adaedra>
Even on Red Hats there are ways of getting more recent rubies.
<acidrainfall>
There are as long as you're in the ops team and can distribute a new version of ruby, which I'm not
<Radar>
[09:25:22] <acidrainfall>I'm on 1.8.7 and I can't change that.
<acidrainfall>
:/
<acidrainfall>
yeah
<acidrainfall>
I bet you're all super jealous
myztic has joined #ruby
<eam>
good old rhel6
<eam>
an added bonus on your platform is that all the EPEL gems are broken
duncannz has quit [Ping timeout: 250 seconds]
<acidrainfall>
yeah there's that too
<acidrainfall>
There is SCL
<acidrainfall>
With ruby193
<eam>
acidrainfall: you should use bundle with --vendor and slurp up your ruby into whatever you use to deploy your application code
<eam>
carry around the interpreter entirely along with the full gemset
tuor has quit [Ping timeout: 245 seconds]
<acidrainfall>
What does that mean, --vendor?
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
roshanavand has quit [Ping timeout: 250 seconds]
<acidrainfall>
Oh the only people here who use Ruby outside of Puppet is one platform and they've got this hacky weird RVM stuff going on
vondruch_ has joined #ruby
duwang has joined #ruby
<eam>
I don't do bundle stuff often so I'm being super vague and maybe slightly incorrect, but I believe that's the option to dump the gems into a relative subdirectory
allomov has joined #ruby
<eam>
instead of say GEMPATH or w/e
Asher has joined #ruby
<duwang>
guys does ruby suck
jeremie_ has joined #ruby
calderonroberto has quit [Quit: Leaving]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
TheHodge has joined #ruby
<aiguu>
sometimes
duwang has left #ruby [#ruby]
calderonroberto has joined #ruby
<adaedra>
suck is suggestive.
<aiguu>
It sucks when it's slow
<havenwood>
they asked then fled
<adaedra>
didn't even see.
<aiguu>
It sucks if you try to parse a 1GB json file
<havenwood>
aiguu: nuh uh
<aiguu>
on a micro amazon ec2 instance
<havenwood>
aiguu: ok
<adaedra>
aiguu: potatoes suck when I try to cut iron with them.
<aiguu>
But you can at least light a lightbulb with a potatoe
<eam>
adaedra: you're not accelerating the potato sufficiently
<acidrainfall>
you don't do heavy metal smelting with potato?
<adaedra>
eam: that's it, thank you.
<eam>
np, here all week
<adaedra>
You know what really sucks tho? Vacuums.
<aiguu>
those do suck
<tubbo>
^ cats on irc
maddmaxx has quit []
<aiguu>
hit and run questions
<eam>
vacuums actually don't suck, rather pressure pushes
vondruch has quit [Ping timeout: 260 seconds]
<acidrainfall>
Pipettes suck?
<eam>
that's why you can't suck water up a pipe more than 33'
<acidrainfall>
eam: You can't?
<eam>
you can't. pumping systems all push water from the bottom
<aiguu>
I'll avoid any perverted jokes here
<acidrainfall>
What stops it at 33'?
<acidrainfall>
aiguu: I /was/ going to say 'You know what else sucks? Monica Lewinsky."
<eam>
a column of water 33 feet tall has the same pressure as one atmosphere -- as much as the column of air from sea level to space
vondruch_ has quit [Ping timeout: 250 seconds]
<acidrainfall>
But that joke is a little old, and she's gotten tired of it (tired enough to do a TED talk on it)
Log1x has joined #ruby
<aiguu>
damn missed opportunity
<aiguu>
doesn't come along often
edwinvdgraaf has joined #ruby
<eam>
air pressure is what pushes fluid up your straw
brunto has quit [Ping timeout: 250 seconds]
edwinvdg_ has quit [Read error: Connection reset by peer]
h99h9h88 has joined #ruby
<acidrainfall>
eam: That's really interesting
<acidrainfall>
eam: So you literally can't, with a vacuum, pull water up, because at 33' the water stops, and a vacuum forms above it?
<eam>
correct
<acidrainfall>
Things I wouldn't have expected to learn in an IRC channel for a programming language.
jackcom has joined #ruby
shtirlic has quit [Ping timeout: 260 seconds]
<eam>
well you know what they say, nature abhors a vacuum. And IRC channels abhor staying on topic
nateberkopec has quit [Quit: Leaving...]
<acidrainfall>
Can't tell you how many times I've been kicked out of #centos for straying off topic.
<acidrainfall>
Actually none, but I got threatened a lot and eventually left.
jobewan has quit [Quit: Leaving]
<acidrainfall>
Anyway, thanks guys. I'll be back, I'm certain of it.
<acidrainfall>
:)
shtirlic has joined #ruby
nateberkopec has joined #ruby
InvGhost has quit [Read error: Connection reset by peer]
duncannz has joined #ruby
tuor has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mooru has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
workmad3_ has quit [Ping timeout: 240 seconds]
Kabaka_ has quit [Ping timeout: 245 seconds]
grill has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
devbug has quit [Ping timeout: 260 seconds]
acidrainfall has left #ruby [#ruby]
aiguu has left #ruby ["WeeChat 1.3"]
yeticry has joined #ruby
roshanavand has joined #ruby
maloik has joined #ruby
SleepySensei has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
vondruch_ has joined #ruby
Azure has joined #ruby
tomchapin has joined #ruby
Bellthoven has quit []
roshanavand has quit [Ping timeout: 250 seconds]
<dorei>
i'm looking for smt that returns x if the input array has the form [x, x, x, ..., x, x] else nil, any ideas?
kies has quit [Ping timeout: 260 seconds]
skweek has joined #ruby
ramortegui has joined #ruby
<mozzarella>
write it yourself? I don't think there's a standard function that does exactly that
baweaver has joined #ruby
b0yzn01z3 has quit [Remote host closed the connection]
SleepySensei has joined #ruby
SleepySensei has quit [Client Quit]
dhollinger has quit [Quit: WeeChat 1.3]
jessemcgilallen has joined #ruby
neanderslob has quit [Read error: Connection reset by peer]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
neanderslob has joined #ruby
[Butch] has quit [Quit: I'm out . . .]
<shevy>
isn't this a simple .all? dorei ?
baweaver has quit [Ping timeout: 245 seconds]
ChameleonSix has joined #ruby
<ChameleonSix>
Hello
<ChameleonSix>
I need help on ruby
gaussblurinc1 has quit [Quit: Leaving.]
<ChameleonSix>
I mean more like a solution
<ChameleonSix>
Is anyone on ?
Asher has quit [Quit: Leaving.]
dlitvak has quit [Remote host closed the connection]
<ChameleonSix>
?
<ChameleonSix>
:(
<shevy>
ack android IRCer!
<ChameleonSix>
Ok tnx
<ChameleonSix>
How to make a program that prints the number of zeroes beetween 3 numbers
<ChameleonSix>
For example
<ChameleonSix>
A = 2 B = -3
sfmk has joined #ruby
<ChameleonSix>
Zero = 1
<ChameleonSix>
One 0
<ChameleonSix>
Do you understand what am I saying
secret has quit [Ping timeout: 245 seconds]
momomomomo has quit [Quit: momomomomo]
<mozzarella>
no
iamvery has quit [Ping timeout: 245 seconds]
<ChameleonSix>
Lol
Asher has joined #ruby
<ChameleonSix>
Helpful
stannard has quit [Remote host closed the connection]
whippythellama has quit [Quit: WeeChat 1.3]
<sfmk>
Could I get a set of eyes on my program?
<havenwood>
ChameleonSix: What are you saying? Example input and desired output?
<jbrhbr>
anyone know if you can tell pry to truncate long output rather than page it?
KILLALLN1GGERS has left #ruby [#ruby]
<jbrhbr>
i guess i could make my own output handler
jackcom has left #ruby [#ruby]
roshanavand has quit [Ping timeout: 250 seconds]
<sfmk>
Ox0dea: Could you explain how this expression is read/works? >> Foo = nil; [defined?(Foo), defined?(Bar)]
<jhass>
sfmk: [] is just an array literal
<Ox0dea>
jbrhbr: Pry's pager is configurable, but I don't see anything to indicate that truncation would be dead-simple.
<jhass>
sfmk: defined? checks whether something is defined, if it is, it returns its type, if not it returns nil
devbug has joined #ruby
<jhass>
well "type" in as a string sort of describing it
<sfmk>
So that explains why defined?(Bar) returns nil
<jbrhbr>
Ox0dea: yea it's easily disabled but truncation looks a bit less straight forward. i think i will just set up a truncator proc with Pry.config.print
<Ox0dea>
Aye, that should do.
<jbrhbr>
thanks
minimalism has joined #ruby
minimalism has quit [Client Quit]
htmldrum has joined #ruby
<Ox0dea>
jbrhbr: Sure thing. I'd be interested in seeing the result of your experimentation.
Jardayn has quit [Quit: Leaving]
<Ox0dea>
Making truncation Do The Right Thing is surprisingly hard.
<jbrhbr>
yeah
<jbrhbr>
i agree
<ChameleonSix>
Thanks for all your help
<ChameleonSix>
We will meet again if I need help
<ChameleonSix>
Lol
<jbrhbr>
it would probably take a lot of work to make it nice— i just mostly want the default to be concise rather than verbose really, so i will do something simple
<jbrhbr>
i could just have a `verbose` function that overrides print back to the default temporarily if i really want to see the whole thing and call verbose(_) or whatever
minimalism has joined #ruby
Xeago has quit [Remote host closed the connection]
maloik has quit [Ping timeout: 260 seconds]
spider-mario has quit [Remote host closed the connection]