Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
benderb has left #ruby [#ruby]
<lucasb>
Darmani: are you sure the result array is sorted?
pdoherty has quit [Ping timeout: 245 seconds]
<Darmani>
lmao... It's not.
<Darmani>
I thought it was.
<Darmani>
Back to the drawing board xD
Cohedrin has joined #ruby
mostlybadfly has joined #ruby
CloCkWeRX has quit [Ping timeout: 265 seconds]
maneco has quit [Remote host closed the connection]
maneco has joined #ruby
frog0909 has joined #ruby
ddv has quit [Ping timeout: 250 seconds]
diegoviola has joined #ruby
ddv has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
stuxnet has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
Darmani has quit [Ping timeout: 252 seconds]
jcoe has joined #ruby
sandstrom has joined #ruby
<lucasb>
I just noticed RubyInline was linked in the previous conversation, but I don't think it's for inlining ruby methods. It's more like for inserting plain C code in the middle of ruby code.
<lucasb>
well, a related concept, but not the original issue
<volty>
lucasb: yap, I knew that and that there is such a thing. Though not yet tried.
Rodya_ has quit [Remote host closed the connection]
<volty>
ho ho, bulls and cows, one of my first programs, in machine lang. you need sets + probability calculus to generate the optimal guesses. How many passes (more or less)?
chipotle has quit [Quit: cheerio]
weemsledeux has joined #ruby
hightower2 is now known as hightower3
<volty>
the first versions was in basic, taking ~ 15 minutes :)
<ellistaa>
`oh in this question im not guessing but writing a method that tells them how many bulls and how many cows
jam_ has joined #ruby
<volty>
yap, I was wondering what's the magic my tired brain cannot capture, ah ah ah
decaff has joined #ruby
Limix has quit [Quit: Limix]
cicloid has joined #ruby
s2013 has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
toretore has quit [Ping timeout: 276 seconds]
jam_ has quit [Ping timeout: 272 seconds]
shanemcd has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
zast has quit [Remote host closed the connection]
sandstrom has joined #ruby
mdw has joined #ruby
djbkd has quit [Quit: My people need me...]
devbug has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zast has joined #ruby
cicloid has quit [Ping timeout: 250 seconds]
gizless has joined #ruby
nopolitica has joined #ruby
ellistaa has quit [Quit: ellistaa]
fedexo has quit [Ping timeout: 250 seconds]
gizmore|2 has joined #ruby
jarray52 has joined #ruby
Rodya_ has joined #ruby
gizmore|3 has joined #ruby
gizmore has quit [Ping timeout: 250 seconds]
<jarray52>
Anyone else experiencing crashes with the Ruby interpreter on Ruby version 2.2.3?
<eam>
jarray52: what does the crash look like?
<Radar>
jarray52: no
Rodya_ has quit [Remote host closed the connection]
<Radar>
isn't everyone now using 2.3.0?
<eam>
I've experienced crashes on *most* ruby versions soooooo
<jarray52>
It primarily happens when using byebug with Rails and rspec.
gizmore|2 has quit [Ping timeout: 276 seconds]
karmatr0n has quit [Ping timeout: 256 seconds]
<jarray52>
I'm getting about 10 such crashes an hour.
tinnvec has quit [Remote host closed the connection]
<jarray52>
However, it isn't predictable.
tinnvec has joined #ruby
rgtk has joined #ruby
<persistence>
can't code my way out of this US northeast snow storm :'(
IronD has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
rgtk has quit [Ping timeout: 248 seconds]
<eam>
jarray52: can you capture a corefile, or backtrace?
sandstrom has quit [Quit: My computer has gone to sleep.]
northfurr has joined #ruby
<jarray52>
eam: Sure. Where do you want me to place it?
volty has quit [Quit: Konversation terminated!]
<eam>
well, you may not want to send me the corefile, it may have things in it you don't want to share. But if you can use gdb and run "bt" and pastebin that, it might be useful
krainboltgreene has left #ruby [#ruby]
sandstrom has joined #ruby
uberjar has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
maneco has quit [Quit: maneco]
s2013 has joined #ruby
Darmani has joined #ruby
ur5us has joined #ruby
ur5us has quit [Remote host closed the connection]
tinhajj123 has quit [Ping timeout: 252 seconds]
araujo__ has quit [Ping timeout: 256 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
sftrabbit has quit [Quit: sftrabbit]
huQeQwdpu47q has quit [Quit: Leaving]
norc__ has quit [Read error: Connection reset by peer]
sandstrom has joined #ruby
northfurr has quit [Quit: northfurr]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
s2013 has joined #ruby
sine` has left #ruby [#ruby]
jottr_ has joined #ruby
northfurr has joined #ruby
jottr has quit [Ping timeout: 240 seconds]
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
K1MOS has joined #ruby
arescorpio has joined #ruby
shanemcd has quit [Remote host closed the connection]
karmatr0n has joined #ruby
ellistaa has joined #ruby
TomPeed has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
emilford has joined #ruby
uberjar has quit [Quit: peace]
sandstrom has joined #ruby
ruby-lang790 has joined #ruby
gambl0re is now known as TheHackOps
benderb has joined #ruby
ympeg_ has quit [Ping timeout: 260 seconds]
Rodya_ has joined #ruby
ympeg has quit [Ping timeout: 276 seconds]
TomPeed is now known as justbleed
marr has quit [Ping timeout: 250 seconds]
K1MOS has quit [Ping timeout: 265 seconds]
underplank has quit [Quit: underplank]
Yzguy has quit [Quit: Zzz...]
hiyosi has joined #ruby
underplank has joined #ruby
TheHackOps has quit []
h99h9h88 has quit [Remote host closed the connection]
gambl0re has joined #ruby
underplank has quit [Client Quit]
vvalien has joined #ruby
scripore has joined #ruby
yqt has quit [Ping timeout: 245 seconds]
hxegon has quit [Quit: PEACE OUT]
jbrhbr has quit [Quit: Leaving.]
paradisaeidae has joined #ruby
<ruby-lang790>
Ruby beginner here, having some trouble with a really short method I'm trying to write called show_obj.
<ruby-lang790>
Goal is to add the method to my .irbrc so that I can quickly see which objects and variables are related to a particular class.
sandstrom has quit [Quit: My computer has gone to sleep.]
<ruby-lang790>
Here's my code:
<Ox0dea>
ruby-lang790: Sounds like you really want Pry and `ls`. :)
<Ox0dea>
?gist ruby-lang790
<ruby[bot]>
ruby-lang790: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
<ruby-lang790>
oh
<ruby-lang790>
ok
<ruby-lang790>
thanks!
<ruby-lang790>
new to irc too
<Ox0dea>
No worries.
<hightower3>
What tool would you suggest to use to document a Ruby program that has both guides and API reference? Something that would be like yard for API ref, and railsguides for guides, but with a unified styling
<ruby-lang790>
I feel like the method's argument should get passed in
<ruby-lang790>
but I don't think that's what's happening
mistermocha has joined #ruby
du5tball has quit [Ping timeout: 250 seconds]
<Ox0dea>
ruby-lang790: To clarify, whose local variables are you hoping to get hold of there?
<ruby-lang790>
I'll update my other code per your recommendations though definitely
<ruby-lang790>
oh this is just for an off-the-cuff irb session
<ruby-lang790>
so I'm playing around with making classes and defining variables
h99h9h88 has joined #ruby
<ruby-lang790>
and the "local_variables" method just outputs an array of everything I set in the current session
<ruby-lang790>
if that makes sense
jottr_ has quit [Remote host closed the connection]
h99h9h88_ has joined #ruby
<ruby-lang790>
so then I'm filtering that by the particular class I care about
<Ox0dea>
That's what you *want* it to do, but that's not what it does.
mistermocha has quit [Remote host closed the connection]
<Ox0dea>
#local_variables is going to give you the locals of your #show_obj method.
<ruby-lang790>
oh!!
<ruby-lang790>
I didn't realize
<ruby-lang790>
testing real quick
<Ox0dea>
You'll either have to make #show_obj a Proc instead of a method so that it doesn't introduce a new scope, or else use something crazy like the binding_of_caller gem to climb back up the call stack to get at the Binding you really want.
karmatr0n has quit [Ping timeout: 245 seconds]
h99h9h88 has quit [Ping timeout: 265 seconds]
<ruby-lang790>
Roger that...looks like I need to do some more research
<Canar>
SJW bikeshedding, though that's merely my unsolicited opinion. Feminists love the CoC.
sandstrom has quit [Quit: My computer has gone to sleep.]
lemur is now known as baweaver
h99h9h88 has quit [Remote host closed the connection]
dcunit3d has quit [Ping timeout: 240 seconds]
h99h9h88 has joined #ruby
sandstrom has joined #ruby
yfeldblum has quit [Ping timeout: 265 seconds]
<baweaver>
arup_r: Canar: Well now is the time to bring things up, though preferably on that ticket or in #ruby-community as I feel that's where meta discussion on the community should go.
rippa has joined #ruby
<baweaver>
just keep it civil, as I don't want to see this turn into some huge fight.
<arup_r>
baweaver: ok, I agree with you.
<Canar>
baweaver: Meh, looks like Matz has his head screwed on precisely straight so I'm not too concerned.
arescorpio has quit [Quit: Leaving.]
h99h9h88 has quit [Ping timeout: 256 seconds]
<baweaver>
I'm of the opinion that Matz knows best, and whatever he decides I'll abide by.
<baweaver>
but anyways, #ruby-community for further talk. Encourage others that want to chat on it to go thataway
casadei has joined #ruby
claw has joined #ruby
<Canar>
Bingo. The language barrier appears to be working in the favour of sanity. That's my only concern and I'll end my contribution on that note, as you've requested further chat move elsewhere.
<baweaver>
./join #ruby-community
<baweaver>
if you'd like
casadei has quit [Ping timeout: 245 seconds]
puria has joined #ruby
<Ox0dea>
// to escape the / in future.
sandstrom has quit [Quit: My computer has gone to sleep.]
sandstrom has joined #ruby
arlek_ has joined #ruby
krz has joined #ruby
iateadonut has left #ruby [#ruby]
arlek has quit [Ping timeout: 245 seconds]
karmatr0n has joined #ruby
cpup has quit [Ping timeout: 256 seconds]
yardenbar has joined #ruby
cpup has joined #ruby
Dragooon has quit [Ping timeout: 265 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
johnzorn has quit [Ping timeout: 276 seconds]
sandstrom has joined #ruby
karmatr0n has quit [Ping timeout: 260 seconds]
Dragooon has joined #ruby
juddey has joined #ruby
blur3d has joined #ruby
Abrin has quit [Ping timeout: 250 seconds]
h99h9h88 has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
craigp has quit [Remote host closed the connection]
djbkd has quit [Quit: Leaving...]
craigp has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
h99h9h88 has quit [Ping timeout: 256 seconds]
craigp has quit [Ping timeout: 240 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
sandstrom has joined #ruby
amclain has quit [Quit: Leaving]
baweaver has quit [Read error: Connection reset by peer]
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
fantazo has joined #ruby
framling has quit [Ping timeout: 272 seconds]
dcunit3d has joined #ruby
bronson has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
<dEPy>
shevy: I know. I should get used to commenting code more. My big flaw... :(
<dEPy>
I thought the kata itslef is well known enough :/
<shevy>
I am not sure how much you can improve, 60% of this seems to be just math-juggling
<shevy>
although you seem to repeat the same thing in each class
<shevy>
well
<shevy>
with different - and + of course
<Napear>
dEPy: It looks like you have a lot of duplicate code in there, I would suggest create a parent class for *Aging and use inharatance to pass the functionality around
sandstrom has quit [Quit: My computer has gone to sleep.]
<shevy>
oh indeed
jam_ has joined #ruby
<shevy>
item.sell_in -= 1 is the same in every class
<dEPy>
Napear: tnx, I was thinking of that yea. But the NoAging class eliminitates sell_in modification
<dEPy>
Well I could override it I guess?
<dEPy>
I don't know. I feel like both ways have tradeoffs
<shevy>
item.quality = 50 if item.quality > 50 is also the same
<shevy>
yeah
sandstrom has joined #ruby
<shevy>
one trade off is that if you subclass, you will need more code :)
<dEPy>
Yea, and also "Sulfuras" item has quality 80
<dEPy>
It's not visible cause I didn't attach tests I guess
du5tball_ is now known as du5tball
<shevy>
but you have 4 classes already, and 2 lines in each method there that are exactly the same, so that is 8 lines of code already... I think at that point, subclassing is better
<shevy>
you can possibly also handle the logic differently in a common parent method
<shevy>
because you essentially seem to do the same
<shevy>
either add 1 2 or 3, or deduct 1 2 or 3
<shevy>
so that can surely become part of the same parent method, with a second parameter to state whether you want to subtract or add
<shevy>
item.quality = 0 if item.quality < 0 also seems to be a duplicate
<shevy>
sorta
<shevy>
one class is a bit different and has a: item.quality = 0 if item.sell_in <= 0 || item.quality < 0
usershell has quit [Remote host closed the connection]
jam_ has quit [Ping timeout: 240 seconds]
<dEPy>
But then I have to override the method for NoAging and ManaCakeAging is 2 and 4 for quality aging
<shevy>
yah well subclassing is best for common methods/patterns
<shevy>
in your more specialized class, well, you specialize more
TheRokh has joined #ruby
TheRokh has quit [Max SendQ exceeded]
<shevy>
in my larger projects, I tend to subclass from a class called Base
<shevy>
which then usually have things such as "use colours or don't use colours"
<dEPy>
Ok. I guess this would be fine for now. But in case I add more items and see more common behaviour, making a parent class would be much more helpful?
<shevy>
(for colourized output)
<shevy>
yes!
TheRokh has joined #ruby
<shevy>
you could also use a module
TheRokh has quit [Max SendQ exceeded]
<dEPy>
ok cool :) tnx for the input
chipotle has quit [Quit: cheerio]
devbug has joined #ruby
TheRokh has joined #ruby
TheRokh has quit [Max SendQ exceeded]
TheRokh has joined #ruby
TheRokh has quit [Max SendQ exceeded]
BSaboia has joined #ruby
asteros has quit [Quit: asteros]
craigp has joined #ruby
TheRokh has joined #ruby
Jackneill has joined #ruby
TheRokh has quit [Max SendQ exceeded]
TheRokh has joined #ruby
devbug has quit [Read error: Connection reset by peer]
devbug has joined #ruby
hk238 has joined #ruby
craigp has quit [Ping timeout: 240 seconds]
ljames has joined #ruby
Ebok has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
codecop has quit [Quit: Išeinu]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
hanmac has quit [Ping timeout: 250 seconds]
rgtk has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
devbug has quit [Ping timeout: 260 seconds]
dlitvak has joined #ruby
User458764 has joined #ruby
sandstrom has joined #ruby
mrtomme has quit [Ping timeout: 248 seconds]
Ebok has joined #ruby
dlitvak has quit [Ping timeout: 256 seconds]
mrtomme has joined #ruby
XenuLives has joined #ruby
<XenuLives>
You guys aren't seriously going to incorporate the Contributor Covenant right?
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skcin7 has quit [Ping timeout: 240 seconds]
oivoodoo has joined #ruby
dEPy has quit [Ping timeout: 250 seconds]
hanmac has joined #ruby
PedramT_ has quit [Remote host closed the connection]
PedramT has joined #ruby
mondok has quit [Remote host closed the connection]
Limix has joined #ruby
Xeago has quit [Remote host closed the connection]
skcin7 has joined #ruby
oivoodoo has quit [Ping timeout: 250 seconds]
bronson has joined #ruby
mondok has joined #ruby
PedramT_ has joined #ruby
PedramT has quit [Ping timeout: 250 seconds]
usershell has joined #ruby
karapetyan has quit [Remote host closed the connection]
jbrhbr has joined #ruby
rgtk has quit [Remote host closed the connection]
<arup_r>
XenuLives: #ruby-community is the place to discuss this.. not here, we discussed it today there.. please move there if you want.. thanks
Limix has quit [Ping timeout: 272 seconds]
lenwood has joined #ruby
oivoodoo has joined #ruby
waka has joined #ruby
waka has quit [Changing host]
waka has joined #ruby
xaotuk_ is now known as haotuk
haotuk is now known as xaotuk
bronson has quit [Ping timeout: 265 seconds]
BSaboia has quit [Ping timeout: 250 seconds]
Xeago has joined #ruby
xaotuk has left #ruby [#ruby]
Xeago has quit [Remote host closed the connection]
Ebok has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Xeago has joined #ruby
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
astrofog has joined #ruby
BSaboia has joined #ruby
skcin7 has quit [Read error: Connection reset by peer]
skcin7 has joined #ruby
karmatr0n has joined #ruby
atmosx has quit [Ping timeout: 250 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
Musashi007 has quit [Quit: Musashi007]
dlitvak has joined #ruby
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rgtk has joined #ruby
oivoodoo has quit [Remote host closed the connection]
benderb has quit [Ping timeout: 260 seconds]
dlitvak has quit [Ping timeout: 260 seconds]
oivoodoo has joined #ruby
karmatr0n has quit [Ping timeout: 250 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
Jet4Fire has joined #ruby
sandstrom has joined #ruby
aef has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
dlitvak has joined #ruby
skcin7 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Meow-J has quit [Quit: Connection closed for inactivity]
craigp has joined #ruby
benderb has joined #ruby
PedramT has joined #ruby
PedramT_ has quit [Ping timeout: 240 seconds]
Ox0dea has joined #ruby
einarj has joined #ruby
Musashi007 has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
jas02 has joined #ruby
sigurding has quit [Quit: sigurding]
cactuzzz has joined #ruby
oivoodoo has quit [Remote host closed the connection]
einarj has quit [Remote host closed the connection]
benderb has quit [Ping timeout: 250 seconds]
lenwood has quit [Ping timeout: 245 seconds]
Limix has joined #ruby
SCHAAP137 has quit [Read error: Connection reset by peer]
last_staff has joined #ruby
arup_r has quit [Remote host closed the connection]
lenwood has joined #ruby
konsolebox has quit [Quit: Leaving]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
stamina has joined #ruby
Limix has quit [Ping timeout: 250 seconds]
hannelita has joined #ruby
akem has joined #ruby
Pupp3tm4st3r has joined #ruby
BSaboia has quit [Ping timeout: 250 seconds]
futilegames has joined #ruby
Cohedrin has joined #ruby
User458764 has joined #ruby
jas02 has quit [Quit: jas02]
<yorickpeterse>
yeah imagine all the bad things that would happen if somebody were to adopt a CoC
<yorickpeterse>
so many people will suffer
sftrabbit has joined #ruby
Musashi007 has quit [Quit: Musashi007]
marr has quit [Ping timeout: 264 seconds]
<chancy>
yorickpeterse: assume good faith
usershell has quit [Remote host closed the connection]
<yorickpeterse>
haha
<yorickpeterse>
assuming good faith on the internet is a free ticket to a terrible time
<yorickpeterse>
(sadly)
slackbotgz has joined #ruby
<apeiros>
chancy: and when assumption fails, hope it doesn't repeat?
lenwood has quit [Ping timeout: 245 seconds]
<chancy>
watch out that you don't create a self-fulfilling prophecy ;-)
<apeiros>
I don't do prophecy
<yorickpeterse>
No I'm basing that on experience
<yorickpeterse>
and probably so are millions of others
<yorickpeterse>
It is indeed sad we need these guidelines because in an ideal world it's not needed
jas02 has joined #ruby
<yorickpeterse>
But alas the ideal world doesn't involve many problems we have today, making it a very unrealistic world
<yorickpeterse>
and in an ideal world I'd be king and you'd all be my peasants
<yorickpeterse>
ᕕ(ᐛ)ᕗ
<shevy>
haha
<shevy>
that was along the lines of what I was about to write just now too
<shevy>
along the lines of "in an ideal world, everyone would worship me!"
<yorickpeterse>
king Yorick demands a tribute, but first he's doing to take a shower
<shevy>
yorickpeterse was faster than me though
<shevy>
nothing wrong with taking a shower
nerium has joined #ruby
<yorickpeterse>
I've been told before I was faster
yashinbasement has quit [Ping timeout: 240 seconds]
<yorickpeterse>
huehue
jottr has joined #ruby
dionysus69 has joined #ruby
govg has quit [Ping timeout: 240 seconds]
toretore has quit [Ping timeout: 256 seconds]
Mon_Ouie has joined #ruby
hanneli has joined #ruby
jas02 has quit [Client Quit]
volty has joined #ruby
The_Phoenix has joined #ruby
arup_r has joined #ruby
Xeago has quit [Remote host closed the connection]
futilegames has quit [Quit: futilegames]
hannelita has quit [Ping timeout: 272 seconds]
skade has joined #ruby
arup_r has quit [Client Quit]
Trynemjoel has joined #ruby
govg has joined #ruby
karmatr0n has joined #ruby
mdw has joined #ruby
symm- has joined #ruby
blackgoat has joined #ruby
usershell has joined #ruby
craigp has quit [Remote host closed the connection]
jcdesimp has joined #ruby
FooMunki has joined #ruby
hk238 has left #ruby ["-"]
yardenbar has quit [Ping timeout: 265 seconds]
zotherstupidguy has quit [Ping timeout: 240 seconds]
jcdesimp has quit [Ping timeout: 256 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
Napear has quit [Quit: leaving]
arup_r has joined #ruby
gigetoo has quit [Ping timeout: 250 seconds]
disconnekted has quit [Quit: Bye]
tjohnson has quit [Quit: Connection closed for inactivity]
dlitvak has quit [Remote host closed the connection]
dlitvak has joined #ruby
sandstrom has joined #ruby
jam_ has joined #ruby
gigetoo has joined #ruby
goodroot has quit [Ping timeout: 260 seconds]
dlitvak has quit [Remote host closed the connection]
dlitvak has joined #ruby
dlitvak has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
akem has quit [Ping timeout: 264 seconds]
jam_ has quit [Ping timeout: 272 seconds]
sdothum has joined #ruby
karmatr0n has quit [Ping timeout: 265 seconds]
baweaver has joined #ruby
tomphp has joined #ruby
lemur has joined #ruby
treaki__ has quit [Remote host closed the connection]
DrCode has quit [Ping timeout: 265 seconds]
skade has quit [Quit: Computer has gone to sleep.]
<Ox0dea>
aef: Why do you want to let APT manage your gems?
usershell has quit [Remote host closed the connection]
karapetyan has quit [Ping timeout: 272 seconds]
slackbotgz has quit [Remote host closed the connection]
<aef>
Ox0dea: first of all, I like the fact that some additional people that I have quite a bit of trust in have a chance to have a look at the code that ends up being used in my applications. secondly, I find the security infrastructure of Rubygems questionable, and almost nothing changed since the big hack some years ago, afaik. third point would be, that I don't like the fact that things that are already present on my system are downloaded and stored again.
<apeiros>
that seems to contradict the use of rvm?
karapetyan has joined #ruby
<aef>
how so?
<apeiros>
it's not part of APT
<aef>
how is that contradicting my point?
bonhoeffer has joined #ruby
karmatr0n has joined #ruby
atmosx has joined #ruby
krz has joined #ruby
<aef>
not every gem I use is packaged in Debian either
<apeiros>
your ruby is insecure code but your gems must not be?
mdw_ has joined #ruby
shanemcd has joined #ruby
mdw has quit [Read error: Connection reset by peer]
usershell has joined #ruby
mfb2 has joined #ruby
<apeiros>
anyway, if you want the liberties of installing/switching ruby outside of APT but use gems from APT, you're probably better of using ruby-install and one of the solutions working with that instead of rvm.
<aef>
both the installation of RVM and the code installed through RVM are verified through OpenPGP signatures made by Michal Papis. I think that is a far better system than the purely transport TLS authenticated Rubygems system and so far I have no reason to believe that Michal is trying to hurt me.
<apeiros>
you probably can coerce rvm to do what you want (all it does iirc is achieved by setting env variables). but I wouldn't be surprised if it'd come with quite a bag of hurt on every corner.
<aef>
though, when the packaged Ruby on the Debian repositories is enough for what I want to do, I tend to prefer that instead of installing additional stuff through RVM
domgetter has joined #ruby
du5tball has left #ruby ["NEEP NEEP"]
<Ox0dea>
Still seems vaguely masochistic. Why deliberately visit the pain of fragmentation upon oneself?
shanemcd has quit [Ping timeout: 256 seconds]
<aef>
Ox0dea: because Rubygems doens't improve and it is a security risk that needs all the mitigation one can come up with.
krobzaur has quit [Ping timeout: 256 seconds]
<Ox0dea>
I'm calling the hyperbolice.
bonhoeffer has quit [Quit: Page closed]
mfb2 has quit [Ping timeout: 256 seconds]
dionysus69 has quit [Quit: dionysus69]
* apeiros
ain't in infosec
<apeiros>
so I'll refrain from assessing the merits of that
<shevy>
why does this keep on coming from the debian community but not from arch or gentoo or slackware
jottr has quit [Ping timeout: 240 seconds]
hannelita has joined #ruby
<apeiros>
aef: given that nobody in here seems to have an answer, I suggest you try #rvm
<aef>
apeiros: already posted it there, thanks
<apeiros>
aef: um, in that case:
<apeiros>
?crosspost aef
<ruby[bot]>
aef: Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
dlitvak has joined #ruby
Pupp3tm4st3r has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
astrofog has quit [Ping timeout: 276 seconds]
<aef>
apeiros: i will update my findings on my stackoverflow question.
<apeiros>
ok
jottr has joined #ruby
<Ox0dea>
shevy: Venture a guess. :P
<aef>
shevy: it seems that a lot of people are not very aware of the risks of using all kinds of unchecked code from sources where sometimes it is not even verifyable that the expected source is even the acutal source. In the Debian community there seems to be a lot more awareness about this than in the rest of the world that i have seen.
blur3d has quit [Quit: blur3d]
<Ox0dea>
aef: Do you use coreboot?
karmatr0n has quit [Ping timeout: 250 seconds]
dlitvak has quit [Ping timeout: 260 seconds]
<shevy>
aef I think you were the first to have made this reference to security. I distinctly remember a few others, the usual complaint was along the lines of "rubygems does not play nicely with debian's policy of packaging up stuff", e. g. why debian has different defaults for rubygems like /var/lib or something like that
<aef>
Ox0dea: I intend to.
<Ox0dea>
RubyGems supports signing; nobody* uses it.
oivoodoo has joined #ruby
konsolebox has joined #ruby
<aef>
Ox0dea: i used it for all my gem releases
<aef>
Ox0dea: then i realized that it is broken and I don't see a way to repair it to make it actually work when using X.509
oivoodoo has quit [Remote host closed the connection]
<aef>
Ox0dea: because X.509, the certificate system behind TLS is conceptually very centralistic
minimalism has joined #ruby
<aef>
Ox0dea: and the Ruby community, or FLOSS software communities in general is not
<aef>
s/is/are
vdamewood has joined #ruby
<Ox0dea>
aef: The very notion of a CA is centralized. You have to trust somebody.
<aef>
Ox0dea: also, the devs of net-ssh is using it
diegoviola has joined #ruby
<aef>
Ox0dea: right, that's why in OpenPGP, a CA is not a core concept
puria has quit [Ping timeout: 240 seconds]
arup___ has joined #ruby
<aef>
Ox0dea: OpenPGP would be a good fit for RubyGems. but drbrain doesn't feel the same way.
oivoodoo has joined #ruby
<aef>
Ox0dea: Grant Olson even built OpenPGP support for Rubygems. but it didn't catch fire. The Ruby community doesn't seem to be interested so much in security, or they are just not informed about the risky state Rubygems is in.
arup_r has quit [Ping timeout: 250 seconds]
<Ox0dea>
aef: Well, kudos to you for not laughing all the way to the bank.
<apeiros>
aef: I think it's a lack of risk awareness + effort required
<aef>
Ox0dea: when I started with Ruby, i think about 8 years ago, I was confused about Debian's manipulations of Rubygems as well
<shevy>
Aha!!!
<aef>
Ox0dea: but later I realized that there is a big mentality difference between Rubygems and APT
<shevy>
does APT accept anything non-apt
Limix has joined #ruby
<aef>
Ox0dea: well, yes, they distribute Rubygems, as I said
<Ox0dea>
You can pretty much stick anything in a .deb archive.
<aef>
shevy:
<aef>
Ox0dea: sorry, wrong ping
<Ox0dea>
No worries.
<shevy>
I don't know if they repackage perl cpan or python ... whatever python uses... eggs was it? or something like that...
<aef>
shevy: i think they do
oivoodoo has quit [Remote host closed the connection]
<zotherstupidguy>
i think they do
<Ox0dea>
I think they do as well.
<shevy>
that strange distribution... nixos or so... I think they have repackaged all of haskell packages or something, like 9000 entries or something crazy like that
Limix has quit [Ping timeout: 250 seconds]
<zotherstupidguy>
shevy what distro you use?
<shevy>
wonder why they did so for haskell but not for ruby
<shevy>
zotherstupidguy hmm currently slackware but there is not much of slackware left
<shevy>
I mean on the system here
<zotherstupidguy>
shevy you only use one distro?
<Ox0dea>
$ pacman -Ql ruby | wc -l
<Ox0dea>
1800
<Ox0dea>
Nice and round.
oivoodoo has joined #ruby
<shevy>
zotherstupidguy yeah mostly. the days of experimenting are over, I joined the old-people crew
<Ox0dea>
zotherstupidguy: WeeChat 1.3? Must be an Ubuntu user. :P
puria has joined #ruby
<shevy>
debian again!
<Ox0dea>
It's everywhere!
<shevy>
yeah probably the biggest chunk
<zotherstupidguy>
i got a ubntu server + openbox; its convenient and i never buy a laptop higher than 2RAM :)
<zotherstupidguy>
but yeah, next machine i buy arch is going on it
<shevy>
I settled for 8RAM, compiling is so much smoother
<shevy>
well
<shevy>
we forgot something there
mdw_ has quit [Ping timeout: 240 seconds]
<shevy>
MemTotal: 7893124 kB ... here we go
rodfersou has joined #ruby
mondok has quit [Ping timeout: 245 seconds]
<shevy>
Ox0dea the latest coreutils and change to "ls" default, made me use "--quoting-style=literal" now.. I could not bear the strange quotes any longer
<Ox0dea>
shevy: Same. I changed my aliases as soon as I figured out what had gone wrong.
<shevy>
I have one ruby project that sorta tries to simulate what "ls" does and all the options... I am undecided whether to include that weird... quote thingy
diego2 has joined #ruby
diego2 has quit [Changing host]
diego2 has joined #ruby
<shevy>
hehe
diegoviola is now known as Guest46299
diego2 is now known as diegoviola
<Ox0dea>
Well, --quoting-style has been in since the beginning; making shell-escape the default after all these years was a bad move.
<shevy>
aha
sigurding has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
domgetter has quit []
Guest46299 has quit [Ping timeout: 240 seconds]
krz has quit [Ping timeout: 272 seconds]
lucasb has joined #ruby
scripore has joined #ruby
usershell has quit [Read error: Connection reset by peer]
noodle has quit [Quit: /quit]
PedramT has quit [Remote host closed the connection]
ziyadb has quit [Quit: Connection closed for inactivity]
usershell has joined #ruby
Pupp3tm4st3r has joined #ruby
TheRokh has quit [Quit: Leaving.]
victortyau has joined #ruby
howdoi has joined #ruby
benanne has joined #ruby
nerium has quit [Quit: nerium]
govg has joined #ruby
rippa has joined #ruby
karmatr0n has joined #ruby
hfp_work has quit [Ping timeout: 260 seconds]
hfp has quit [Ping timeout: 264 seconds]
shinnya has joined #ruby
hfp_ has joined #ruby
hfp_ is now known as hfp
hfp_work has joined #ruby
northfurr has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
mdw has joined #ruby
Pupp3tm4st3r has quit [Remote host closed the connection]
DoubleMalt has joined #ruby
jcdesimp has joined #ruby
PedramT has joined #ruby
karmatr0n has quit [Ping timeout: 245 seconds]
gruz0 has joined #ruby
PedramT has quit [Remote host closed the connection]
arup___ has quit []
PedramT has joined #ruby
jcdesimp has quit [Ping timeout: 264 seconds]
iateadonut has joined #ruby
karapetyan has joined #ruby
s2013 has joined #ruby
PedramT_ has joined #ruby
scripore has joined #ruby
jam_ has joined #ruby
Snowy has joined #ruby
PedramT has quit [Ping timeout: 245 seconds]
PedramT_ has quit [Remote host closed the connection]
karapetyan has quit [Ping timeout: 250 seconds]
FooMunki has quit [Quit: FooMunki]
jottr has quit [Ping timeout: 240 seconds]
s2013 has quit [Client Quit]
futilegames has joined #ruby
jam_ has quit [Ping timeout: 260 seconds]
Limix has joined #ruby
mfb2 has joined #ruby
futilegames has quit [Client Quit]
Snowy has quit [Remote host closed the connection]
PedramT has joined #ruby
Snowy has joined #ruby
oivoodoo has quit [Remote host closed the connection]
s2013 has joined #ruby
krz has joined #ruby
Limix has quit [Ping timeout: 260 seconds]
Snowy has quit [Remote host closed the connection]
PedramT_ has joined #ruby
PedramT has quit [Ping timeout: 245 seconds]
doodleha_ has quit [Remote host closed the connection]
symm-_ has joined #ruby
symm- has quit [Ping timeout: 240 seconds]
Snowy has joined #ruby
Puffball has quit [Read error: Connection reset by peer]
spider-mario has quit [Remote host closed the connection]
Rasi has joined #ruby
kalopsian has joined #ruby
psf has joined #ruby
hanneli has joined #ruby
hannelita has quit [Ping timeout: 240 seconds]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
hanneli has quit [Remote host closed the connection]
bronson has joined #ruby
noodle has joined #ruby
arup_r has joined #ruby
tomphp has joined #ruby
tomphp has quit [Client Quit]
Bloomer has joined #ruby
bronson has quit [Ping timeout: 265 seconds]
Sucks has joined #ruby
pdoherty has joined #ruby
volty has joined #ruby
eladmeidar has joined #ruby
eladmeidar has left #ruby [#ruby]
arup_r has quit [Remote host closed the connection]
Cork has quit [Quit: .]
arup_r has joined #ruby
fantazo has quit [Ping timeout: 240 seconds]
\pub\bash0r has joined #ruby
kalopsian has quit [Ping timeout: 256 seconds]
<\pub\bash0r>
hi and sorry in advance for probably a lot of missing knowledge
solocshaw has joined #ruby
<\pub\bash0r>
I'm trying to get a rails application running which uses bundler to setup dependencies
<\pub\bash0r>
I installed rvm and setup ruby 2.2(.4), added my own gemset and installed bundler
karmatr0n has joined #ruby
<\pub\bash0r>
so far, so good ... a call to "ruby" shows the correct version, bundler is found, and I have some basic gems in ~/.rvm/ ...
Musashi007 has quit [Quit: Musashi007]
<\pub\bash0r>
now I run "bundler install" in the project directory, it starts downloading a lot of dependencies
<\pub\bash0r>
BUT all of them are installed in ~/.gem
<\pub\bash0r>
instead of inside ~/.rvm/...
<\pub\bash0r>
I'm going crazy here because I cannot figure out where the hell it takes this path from, since GEM_HOME is set correctly
<\pub\bash0r>
(~/.bundle doesn't exist, so apparently bundler doesn't override the config)
Alostar has joined #ruby
matp has joined #ruby
<\pub\bash0r>
so in short: anyone any ideas what I can do to fix this?
kalopsian has joined #ruby
northfurr has quit [Quit: northfurr]
mikecmpbll has joined #ruby
Alostar has left #ruby [#ruby]
tomchapin has joined #ruby
Cork has joined #ruby
<\pub\bash0r>
damn, I should have asked earlier, then I may have stumbled accross the answer already .... there was also a .bundle directory inside the project -.-
<\pub\bash0r>
after removing that as well it uses the proper GEM_HOME now
rgtk has quit [Remote host closed the connection]
dcunit3d has quit [Ping timeout: 240 seconds]
tomphp has joined #ruby
Limix has joined #ruby
PedramT_ has quit [Remote host closed the connection]
matp has quit [Remote host closed the connection]
psy_ has quit [Remote host closed the connection]
davedev24 has joined #ruby
usershell has quit [Remote host closed the connection]
Limix has quit [Ping timeout: 256 seconds]
pld has joined #ruby
<pld>
hey, on which linux distributions is ruby installed by default?
matp has joined #ruby
usershell has joined #ruby
sigurding has quit [Quit: sigurding]
sepp2k has joined #ruby
XenuLives has quit [Ping timeout: 245 seconds]
<Ox0dea>
"Speak only that you would improve the silence."
Pande has joined #ruby
<persistence>
"Jesus Christ, the goddamn snow came back... I'm moving to Florida!"
<arup_r>
I love snow, because I never saw it :(
PedramT has joined #ruby
karmatr0n has quit [Ping timeout: 250 seconds]
<persistence>
As long as you don't have to shovel or drive, you'll love yourself a winter wonderland every year
<arup_r>
here only dust and dust... :/
PedramT has quit [Ping timeout: 256 seconds]
Limix has joined #ruby
karapetyan has joined #ruby
rgtk has joined #ruby
ponga has joined #ruby
<ponga>
can I achieve ' attr_accessor :name ' and then '@name = 10' in a single line?
karapetyan has quit [Ping timeout: 240 seconds]
<Ox0dea>
ponga plz
<apeiros>
ponga: you can write your whole ruby app in a single line
<apeiros>
but what's the point?
<lucasb>
just separate the staments with semicolons
<ponga>
no im asking like those more fancy way of declaring hash in ruby
<ponga>
is their fancier way of doing it
<apeiros>
no
<apeiros>
you can use gems like fattr (I hope I remember the name correctly)
<Ox0dea>
ponga: #attr_{reader,writer,accessor} are for "outsiders"; it's fine to refer to instance variables directly if you want to get/set them on `self`.
<ponga>
Ox0dea: thank you I was actually testing that myself with irb
<ponga>
i mean pry
asccigcc has joined #ruby
Abrin has joined #ruby
weemsledeux has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
The_Phoenix has quit [Read error: Connection reset by peer]
<kcubrats>
?guys
kcubrats has quit [Quit: Page closed]
usershell has quit [Read error: Connection reset by peer]
<shevy>
ponga well it's not a huuuuuge change now is it, it's just one more line for initializing the default value :D
<shevy>
you can probably write an attr_* variant that also does the initializing for you
<Ox0dea>
shevy: I still tried to figure out how to do it. :P
<shevy>
like attr_powersnack :name, 10
<shevy>
don't use that name though
<ponga>
shevy: i settled with attr_accessor, then a.var= outside of it
<ponga>
it works safer for me
<Ox0dea>
`a.var=`? What's `a` there?
<ponga>
what?
usershell has joined #ruby
<ponga>
shevy: you can do 'attr_accessor :var, 10'
<shevy>
ponga well not with the default attr*s I think
<shevy>
I always wanted an attr that gives me foo? -> @foo
<shevy>
but I also realized that the attr*s make me lazier :\
<shevy>
like...
<shevy>
if I write: def foo; @foo
<ponga>
shevy: isn't being lazier the ruby motto according to matz
x77686d has joined #ruby
karmatr0n has joined #ruby
<shevy>
it is more likely that I may write documentation... but if I write attr_reader :foo it is less likely that I will write documentation (not that I'd need much documentation in this case anyway, but still)
<ponga>
shevy: can I assign value to @var inside class after I did 'attr_accessor :var' ?, altho it seems to ruin the whole point of if
<ponga>
*of it
<ponga>
just askign
<Ox0dea>
I guess you have me muted.
<lucasb>
no, it doesn't ruin the whole point of it
<ponga>
Ox0dea: not im just dumb
<ponga>
sorry
<Ox0dea>
ponga: #attr_{reader,writer,accessor} are for "outsiders"; it's fine to refer to instance variables directly if you want to get/set them on `self`.
<Ox0dea>
You have to define an accessor for *other* things to be able to access your thing's instance variables.
Bloomer has quit [Remote host closed the connection]
asccigcc has quit [Quit: asccigcc]
<Ox0dea>
But of course your thing can get and set its own.
<ponga>
Ox0dea: yes I read that 'self.var' = 5 nor 'self::var =5' seems to work
<Ox0dea>
ponga: That should be `@var = 5`.
jcdesimp has joined #ruby
<ponga>
Ox0dea: and its lost from 'outsider' right?
karmatr0n has quit [Ping timeout: 260 seconds]
<Ox0dea>
ponga: It's "invisible" to the outside, yeah.
<lipoqil>
Is there some nice gem to work with GPIO on raspberry pi?
<konsolebox>
ponga: i don't actually used it myself yet
<konsolebox>
*use
jottr has quit [Ping timeout: 245 seconds]
<lipoqil>
I just tried rpi_gpio and pi_piper and it somehow does not work
Musashi007 has joined #ruby
solars has quit [Ping timeout: 250 seconds]
jam_ has quit [Ping timeout: 272 seconds]
<ponga>
konsolebox: thank you
Sucks has quit [Client Quit]
<ponga>
I will try this and see if it fits me
countryHick has quit [Quit: Connection closed for inactivity]
<Ox0dea>
:'(
<lucasb>
@var outside methods is not instance variables
<Ox0dea>
@var is always an instance variable.
Sucks has joined #ruby
<lucasb>
ok, @var in class scope is the class's object instance variable
<Ox0dea>
Right.
<lucasb>
Good.
System42 has joined #ruby
<konsolebox>
ahh.. it's actually an old code i tried to modified
<konsolebox>
ponga: nah it doesn't assign instance variables
<Ox0dea>
You'd have to resort to #instance_variable_{get/set}, but why?
<Ox0dea>
ponga: Could you please say what you think is missing from the Person demo?
casadei has joined #ruby
symm- has quit [Quit: Leaving...]
futilegames has joined #ruby
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
TomPeed has joined #ruby
blackgoat has quit [Quit: WeeChat 1.3]
futilegames has quit [Client Quit]
futilegames has joined #ruby
nathan123 has joined #ruby
<nathan123>
hey
<nathan123>
any devs here looking for work
mfb2 has joined #ruby
Abrin has joined #ruby
krobzaur_ has joined #ruby
* dtzitz
gets some popcorn
jcoe has joined #ruby
krobzaur has quit [Ping timeout: 245 seconds]
<havenwood>
nathan123: are you looking for Ruby devs?
spooq has joined #ruby
unshadow has quit [Quit: leaving]
mfb2 has quit [Ping timeout: 250 seconds]
shredding has joined #ruby
jcdesimp has joined #ruby
<havenwood>
nathan123: doing what with Ruby? for who? remote? (I'm not looking but I'm sure someone knows someone who is.)
hlegius has joined #ruby
casadei has quit []
<havenwood>
g'mornin'
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
puria has quit [Ping timeout: 250 seconds]
cicloid has joined #ruby
dcunit3d has joined #ruby
<nathan123>
loking to create a vod and iptv middleware and server software
lenwood has quit [Remote host closed the connection]
symm- has joined #ruby
symm- has quit [Client Quit]
symm- has joined #ruby
bronson has joined #ruby
futilegames has quit [Quit: futilegames]
pld has quit [Ping timeout: 250 seconds]
cicloid has quit [Quit: zzZZzzzZzzzzzZZZz]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gbgdev has joined #ruby
s2013 has joined #ruby
bronson has quit [Ping timeout: 265 seconds]
spider-mario has joined #ruby
karapetyan has joined #ruby
fantazo has joined #ruby
dtzitz has left #ruby ["Leaving"]
nathan123 has left #ruby [#ruby]
awar has joined #ruby
crowell has quit [Ping timeout: 256 seconds]
PedramT has joined #ruby
crowell has joined #ruby
crowell has quit [Changing host]
crowell has joined #ruby
lDoran has joined #ruby
Rodya_ has joined #ruby
BTRE has quit [Quit: Leaving]
Macaveli has joined #ruby
awar has quit [Quit: Ciao e alla prox]
PedramT has quit [Ping timeout: 245 seconds]
PedramT_ has joined #ruby
DrCode has quit [Remote host closed the connection]
PedramT_ has quit [Read error: No route to host]
PedramT has joined #ruby
arup_r has joined #ruby
solocshaw has quit [Ping timeout: 240 seconds]
spider-mario has quit [Remote host closed the connection]
spider-mario has joined #ruby
puria has joined #ruby
jas02 has joined #ruby
yardenbar has quit [Ping timeout: 245 seconds]
PedramT has quit [Ping timeout: 250 seconds]
themsay has joined #ruby
karapetyan has quit [Remote host closed the connection]
gruz0 has quit [Quit: Leaving]
Ilyes512 has joined #ruby
<konsolebox>
ponga: turns out you can only define a singleton method in the context of an instance and not a class if you want to use a custom attr function that also defines values. in other words, you can only use it inside initialize(), with the expense of having a singleton method instance on every instance. it's actually only good for defining singleton methods in modules. https://bpaste.net/show/97cdcd44fb34
Bloomer has joined #ruby
ellistaa has joined #ruby
<ponga>
konsolebox: thank you very much
<volty>
you can (re)define initializing accessors at your will
<volty>
but it's tricky and not for novices
<konsolebox>
volty: not a good idea at all actually
ramfjord has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<volty>
konsolebox: it all depends on one's needs
karapetyan has joined #ruby
dantevergil has joined #ruby
tomphp has quit [Remote host closed the connection]
centrx has joined #ruby
tomphp has joined #ruby
<volty>
the prob. is that it all segfaults on min. errors when you redefine Class.new (at least 2.3.0)
ramfjord has quit [Ping timeout: 265 seconds]
Musashi007 has quit [Quit: Musashi007]
<ponga>
how can I replace nil element in an Array? * a = Array.new(3) , then fill with "John" "Smith" "Bob" to be a = ["John", "Smith", "bob"]
dantevergil has quit [Quit: Bye]
<ponga>
is there a method for this or should I create a loop for this
<centrx>
huh?
rtail_ has joined #ruby
<centrx>
Just do a = ["John", "Smith", "Bob"] in the first place
antgel has quit [Ping timeout: 250 seconds]
<ponga>
centrx: I will be getting user input for the name
<ponga>
and array has to be size of 3
tomphp has quit [Ping timeout: 272 seconds]
dantevergil has joined #ruby
dantevergil has quit [Max SendQ exceeded]
<centrx>
not really sure what you mean
asteros has joined #ruby
dantevergil has joined #ruby
dantevergil has quit [Max SendQ exceeded]
h99h9h88 has joined #ruby
<centrx>
often use a while loop for user input
<volty>
a = Array.new(3) ( gets }
dantevergil has joined #ruby
dantevergil has quit [Max SendQ exceeded]
dantevergil has joined #ruby
dantevergil has quit [Max SendQ exceeded]
<volty>
.map(&:strip)
dantevergil has joined #ruby
dantevergil has quit [Max SendQ exceeded]
Rodya_ has quit [Remote host closed the connection]
<Ox0dea>
Y'all need to up your metaprogramming. ^_^
ruby-lang057 has joined #ruby
Rodya_ has joined #ruby
<volty>
Ox0dea: what about inheritance? Does it work for class D < C; ...defaults baz: 3 ?
pdoherty has quit [Remote host closed the connection]
<Ox0dea>
volty: Slow down, Satan.
puria has quit [Ping timeout: 272 seconds]
<volty>
ah ah
<Ox0dea>
It totally does, though. :)
<ruby-lang057>
hello everybody
<ruby-lang057>
I am trying to load (require) the httparty gem into a Ruby file but keep getting an error and am unsuccessful. Below is the error copied: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in require': cannot load such file -- httparty (LoadError) from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in
kalopsian has quit [Ping timeout: 265 seconds]
Biopandemic2 has joined #ruby
<volty>
Ox0dea: nice code :)
<lDoran>
><
tomchapin has quit [Ping timeout: 276 seconds]
h99h9h88 has quit [Remote host closed the connection]
Kruppe has joined #ruby
einarj has joined #ruby
maia has joined #ruby
hlegius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
user has quit [Ping timeout: 240 seconds]
futilegames has joined #ruby
<maia>
hello. does anyone happen to have a refactoring suggestion for chains of flat_map that split elements based on a regex?
<maia>
Here’s the basic variant (imagine multiple chains of flat_map behind)
<maia>
%w(a b-b c-c d).flat_map {|x| x =~ /-/ ? x.gsub(/-/, ' ').split : x }
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cactuzzz has quit [Quit: cactuzzz]
Senecea has joined #ruby
Rodya_ has quit [Quit: Leaving...]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea>
It's not quite as clean as #reduce with a Symbol (since the Procs have to be stored as Procs but used as blocks :/), but it's still kinda nice.
codecop has joined #ruby
<Ox0dea>
Ignore that `5r` debris.
einarj has quit [Remote host closed the connection]
kalopsian has joined #ruby
<maia>
I thought I’m familiar with ruby, but this is like a new world. I will need some time to understand your example. thanks, I hope I can convert it to what I need (and hope that it’ll cause less GC than chaining flat_map)
<Ox0dea>
Ruby is secretly Lisp.
<Ox0dea>
But, well, do you see what's happening in the demo?
<shevy>
yeah, Ox0dea's code is often in a different world :)
tjohnson has joined #ruby
<Ox0dea>
I won't apologize.
craigp has quit [Ping timeout: 256 seconds]
scripore has quit [Quit: This computer has gone to sleep]
jbrhbr has quit [Quit: Leaving.]
<shevy>
there is more than one way to do it!
<shevy>
I think I need to find some more memes of this dude with the beard
<Ox0dea>
Which dude?
kalopsian has quit [Ping timeout: 250 seconds]
<shevy>
that wagging finger dude
moeabdol has joined #ruby
nahtnam has quit [Quit: Connection closed for inactivity]
<shevy>
he has a beard, it's all I know
scripore has joined #ruby
<ruby-lang057>
can anyone help me with a load error?
symm- has quit [Read error: Connection reset by peer]
<konsolebox>
Ox0dea: yeah, not bad using prepend
<maia>
Ox0dea: here’s what I’m at: https://eval.in/507237 , now I wonder if I could clean up the procs
Senecea has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ponga>
shevy: I'm writing a card game bot with cinch , where bot serves a role of a game dealer
<ponga>
a card game I created
FernandoBasso has quit [Quit: Leaving]
<ponga>
to play with ma friends
<shevy>
I have never seen so many .flat_maps grouped together before
<shevy>
AND combined with the ternary operator
<shevy>
ponga I see, so IRC gaming!
<maia>
*indeed. I’ve split it into ~20 methods so far, but I’m not happy with chaining these flat_maps, and also I dislike the duplication of checking a regex and then gsubbing it (plus splitting)
<ponga>
shevy: I love IRC gaming
Anothermoron has joined #ruby
sol_ has quit [Ping timeout: 240 seconds]
camillo is now known as sol_
<ponga>
I've been doing it for years, and I'm finally making one of my own
<shevy>
\o/
<Ox0dea>
maia: \1 and \2 are empty there, mind.
s2013 has joined #ruby
<Ox0dea>
Those refer back to capture groups, and you're not capturing anything.
<Ox0dea>
You're replacing '.' with '. ', and #split with no argument splits on whitespace.
<ponga>
shevy: fact that cinch can run on plugins and does the loop-checkmsg for me fits really well for bot gaming
diego2 has joined #ruby
Dragooon has quit [Read error: Connection reset by peer]
<ruby-lang057>
here is the error /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in require': cannot load such file -- httparty (LoadError)
<ponga>
What I oonly need to do is write classes and add as plugins
<ponga>
:)
s2013 has quit [Client Quit]
<maia>
Ox0dea: yes, sorry, my bad. I just made up a quick example. But you’ve seen the code that’s run in all the flat_maps
<Ox0dea>
maia: And I couldn't close the tab fast enough.
<ruby-lang057>
@shevy^^^^
<maia>
well, that’s why I’m refactoring it. I want to learn something on the way.
<Ox0dea>
volty: Why #to_enum and not #each_with_object?
<Ox0dea>
Solid regex-fu, though. :)
<shevy>
ruby-lang057 yeah, did you try a "gem install httparty" already? It looks like a mac system, I am on linux, not sure if this works for you but for me, it works
<volty>
no idea, was concentrating on other stuff
<ruby-lang057>
yes i did
gbgdev_ has joined #ruby
<Ox0dea>
Install harder.
<havenwood>
ruby-lang057: Are you trying to use system Ruby? You installed the gem with sudo?
<ruby-lang057>
yes i downloaded with sudo
<maia>
Ox0dea: would you still suggest to convert the code you’ve briefly glanced at (and shuddered) to procs being reduced over?
FernandoBasso has joined #ruby
<ruby-lang057>
wait
<ruby-lang057>
the sudo thing worked
<ruby-lang057>
hahah
puria has quit [Ping timeout: 250 seconds]
<shevy>
aha
<ruby-lang057>
thank you shevy and havenwood!
<havenwood>
ruby-lang057: you're welcome
<Ox0dea>
maia: #flat_map always feels like I'm cheating, like I haven't taken the time to properly understand and organize my data. If it turns out that what you really need is a #flat_map chain, #reduce is certainly the right tool.
<shevy>
havenwood has almost mind-reading capabilities
<maia>
volty: thanks, but I’m not planning to merge ~20 regex :)
<Ox0dea>
maia: Regexp.union. :)
<volty>
maia: Ox0dea's right. Go with United Regepxs :)
craigp has quit [Ping timeout: 272 seconds]
sftrabbit has joined #ruby
scripore has joined #ruby
niceperl has joined #ruby
<maia>
I’ll take a look at it. :)
<volty>
absolutely, it's mandatory. Separate them. They add clearness (out of synthesis).
rodfersou has quit [Remote host closed the connection]
scripore has quit [Client Quit]
gruz0 has joined #ruby
jam_ has joined #ruby
ur5us has joined #ruby
jottr has joined #ruby
<sunya7a>
Could someone have a look at this test on line 81 and tell me why it is failing. The error states that @wheel is nil. I don't understand what it's not seeing the instance variable that was created in the setup https://gist.github.com/anonymous/9435393b5b2e214d000c
<sunya7a>
s/what/why
s2013 has joined #ruby
arthropododo has joined #ruby
craigp has joined #ruby
<ponga>
how can i tell method to run in 60seconds later
dcunit3d has quit [Ping timeout: 265 seconds]
einarj has joined #ruby
TomPeed has joined #ruby
<lucasb>
sleep 1
<volty>
sleep(1) [in another thread]
DexterLB has quit [Read error: Connection reset by peer]
<ponga>
will it stop all other processes while sleeping?
futilegames has quit [Ping timeout: 260 seconds]
<ponga>
ok another thread
tinnvec has quit [Remote host closed the connection]
jam_ has quit [Ping timeout: 250 seconds]
jottr has quit [Ping timeout: 240 seconds]
iateadonut has quit [Quit: Leaving.]
ramfjord has joined #ruby
tinnvec has joined #ruby
s2013 has quit [Client Quit]
s2013 has joined #ruby
who42 has joined #ruby
govg has quit [Ping timeout: 264 seconds]
puria has joined #ruby
DexterLB has joined #ruby
sigurding has joined #ruby
oivoodoo has quit [Remote host closed the connection]
ellistaa has quit [Quit: ellistaa]
rtail_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
arup_r has quit []
diego2 has joined #ruby
drptbl has joined #ruby
Bloomer has quit [Remote host closed the connection]
mondok has joined #ruby
firstdayonthejob has quit [Ping timeout: 276 seconds]
diego2 has quit [Changing host]
diego2 has joined #ruby
ebbflowgo has joined #ruby
diegoviola has quit [Ping timeout: 272 seconds]
h99h9h88 has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
s2013 has joined #ruby
centrx has quit [Quit: If you meet the Buddha on the road, kill him.]
gruz0 has quit [Quit: This computer has gone to sleep]
einarj has quit [Remote host closed the connection]
krobzaur_ has quit [Ping timeout: 276 seconds]
volty has quit [Quit: Konversation terminated!]
ur5us has quit [Ping timeout: 245 seconds]
ur5us_ has joined #ruby
jbrhbr has joined #ruby
symm- has quit [Quit: Leaving...]
gruz0 has joined #ruby
ellistaa has joined #ruby
diego2 is now known as diegoviola
usershell has quit [Remote host closed the connection]
niceperl has quit [Read error: Connection reset by peer]
rgtk has quit [Remote host closed the connection]
ellistaa has quit [Quit: ellistaa]
nerium has joined #ruby
kalopsian has joined #ruby
zapata has joined #ruby
bronson has joined #ruby
dionysus69 has joined #ruby
oivoodoo has joined #ruby
h99h9h88 has quit [Remote host closed the connection]
ponga has quit [Remote host closed the connection]
scripore has joined #ruby
bronson has quit [Ping timeout: 265 seconds]
nopolitica has quit [Quit: WeeChat 0.4.2]
mdw has quit [Quit: Sleeping Zzzzz]
kalopsian has quit [Ping timeout: 276 seconds]
victortyau has joined #ruby
dlitvak has joined #ruby
ellistaa has joined #ruby
tomphp has joined #ruby
bMalum has joined #ruby
usershell has quit [Remote host closed the connection]
vdamewood has quit [Quit: Life beckons.]
puria has quit [Remote host closed the connection]
ur5us_ has quit [Remote host closed the connection]
decoponio has quit [Quit: Leaving...]
howdoi has quit [Quit: Connection closed for inactivity]
last_staff has joined #ruby
bklane has joined #ruby
dionysus69 has quit [Ping timeout: 272 seconds]
h99h9h88 has joined #ruby
jbrhbr has quit [Quit: Leaving.]
dseitz has joined #ruby
yardenbar has joined #ruby
<blarghlarghl>
Anyone have any idea how to get Open4.popen4() to get a full environment for when it executes?
einarj has joined #ruby
mfb2 has joined #ruby
bklane has quit [Ping timeout: 272 seconds]
Xeago has quit [Ping timeout: 240 seconds]
IronD has joined #ruby
einarj has quit [Remote host closed the connection]
adgtl has joined #ruby
sigurding has quit [Quit: sigurding]
bklane has joined #ruby
victortyau has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jbrhbr has joined #ruby
adgtl has quit [Ping timeout: 245 seconds]
bMalum has quit [Ping timeout: 245 seconds]
araujo_ has joined #ruby
FernandoBasso has quit [Quit: Leaving]
araujo has quit [Ping timeout: 256 seconds]
jottr has joined #ruby
jbrhbr has quit [Quit: Leaving.]
Snowy has joined #ruby
malice has joined #ruby
<malice>
How can I allow nil in .each method, so I can do nil.each ... and expect it to do nothing?
araujo__ has joined #ruby
victortyau has joined #ruby
dudedudeman has joined #ruby
<Ox0dea>
malice plz
<malice>
Ox0dea:Yes?
<lucasb>
blarghlarghl: Open4.popen4({'foo'=>'42'}, 'command') # <-- maybe this work?
<Ox0dea>
malice: There's gotta be a better way.
<malice>
Ox0dea: I come from Lisp background. Nil represents there both "false" and empty list, and it is only natural in there; This makes many things convinitent and easy.
<Ox0dea>
donttrustem: That error message seems to indicate that a file couldn't be found. I bet it's hiding somewhere.
<Ox0dea>
Did you check behind the couch?
<donttrustem>
LOL I ran locate but it returned loads of dir’s
<donttrustem>
does bundle hve an extention
araujo__ has joined #ruby
constantinexvi has quit [Quit: Exiting]
araujo_ has quit [Ping timeout: 240 seconds]
DrCode has joined #ruby
rgtk has joined #ruby
<donttrustem>
I tried bundle.rb but nada
<Ox0dea>
Well, does `locate` look behind the couch?
<Ox0dea>
I can't say as I've ever played hide-and-seek with a file, but that's the first place I'd look.
<donttrustem>
Not that I know of :)
bklane has joined #ruby
duderono_ has quit [Client Quit]
<donttrustem>
cmon ….. :(
rgtk has quit [Client Quit]
<Ox0dea>
donttrustem: Did you install Bundler?
rgtk has joined #ruby
dlitvak_ has quit [Remote host closed the connection]
* kspencer
fixed his problem
dwfait has joined #ruby
<donttrustem>
Well I used the Debian package for openproject so I am not sure if it installed bundler? but there is a dir /opt/openproject/vendor/bundle/ruby/2.1.0/gems/
duderonomy has joined #ruby
<donttrustem>
The package is possibly not installed
<donttrustem>
lucasb: I have installed openproject with the package and it is running OK … if I use the manual install I think it will break the package install
Biopandemic2 has quit [Ping timeout: 245 seconds]
<lucasb>
ah, ok
<donttrustem>
I have found bundle but cannot seem to get it to run
s2013 has joined #ruby
mikson has joined #ruby
<donttrustem>
looks like ruby is not installed or not in the path ruby --version
<donttrustem>
-bash: ruby: command not found
mikson is now known as Mirza
diegoviola has quit [Ping timeout: 250 seconds]
Anothermoron has quit [Ping timeout: 250 seconds]
user has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
ruby-lang960 has joined #ruby
ebbflowgo has quit [Quit: ebbflowgo]
davedev24 has quit []
h99h9h88 has quit [Remote host closed the connection]
h99h9h88 has joined #ruby
bklane has quit [Read error: Connection reset by peer]
<donttrustem>
LOL I ound out how to run it
<donttrustem>
sudo openproject run bundle install
sandstrom has quit [Quit: My computer has gone to sleep.]
<donttrustem>
wtf … the docs are wrong
user has quit [Ping timeout: 250 seconds]
TomPeed has quit [Ping timeout: 250 seconds]
sandstrom has joined #ruby
<lucasb>
donttrustdocs
Biopandemic2 has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bklane has joined #ruby
lacuna has joined #ruby
lacuna has quit [Changing host]
lacuna has joined #ruby
Dimik has joined #ruby
jam_ has joined #ruby
h99h9h88 has quit [Ping timeout: 240 seconds]
<shevy>
donttrustem donttrustem
<donttrustem>
LOL
dome22xl has joined #ruby
lacuna has quit [Client Quit]
nahtnam has quit [Quit: Connection closed for inactivity]
<kristian_on_linu>
then just unzip and run jekyll s
<kristian_on_linu>
and thanks for wanting to help
<kristian_on_linu>
I installed ruby anew three times this evening
<Radar>
What makes you think it is Ruby?
dwfait has quit [Remote host closed the connection]
<Radar>
Or Ruby's fault, to be more precise.
underplank has quit [Quit: underplank]
Limix has quit [Quit: Limix]
karapetyan has quit [Remote host closed the connection]
<Radar>
Liquid Exception: root node not CSL::Style: #<CSL::Node children=[0]> in /Users/ryanbigg/Downloads/rk2/_posts/2016-01-01-bibliografi.md
<Radar>
I get a different error.
Anothermoron has joined #ruby
<Radar>
I don't know where bibliography is supposed to be defined.
skcin7 has joined #ruby
<Radar>
Removing {% bibliography %} from that file makes it work.
djbkd has quit [Ping timeout: 260 seconds]
<kristian_on_linu>
yes
tomphp has joined #ruby
<Radar>
So I think the issue is that bibliography isn't defined for Liquid anywhere.
<kristian_on_linu>
but that's the only thing I need :(
<newbie22>
Hey guys, I am learning ruby and I have a question... can I get someone to help me ?
<kristian_on_linu>
Radar: what can I do about that?
Ilyes512 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bklane has joined #ruby
<havenwood>
newbie22: Ask away!
<Radar>
kristian_on_linu: I don't know. I haven't used liquid in Jekyll in a long time.
<newbie22>
The book I am reading say that I can turn the following two lines into one. what is the one line of code.
<newbie22>
in_file = open(from_file)
<newbie22>
indata = in_file.read
txrx has joined #ruby
bithon has joined #ruby
<kristian_on_linu>
Radar: what kind of issue is this? jekyll? Liquid? Something else?
<Radar>
newbie22: File.read(from_file)
<havenwood>
newbie22: It will do even more since it closes the file as well: indata = File.read from_file
duncannz has joined #ruby
<Radar>
kristian_on_linu: Who / whatever told you to put {% bibliography %} and expect it work.
<Radar>
newbie22: which book?
<havenwood>
newbie22: In your example you'd need to next: in_file.close
<kristian_on_linu>
that would be jekyll scholar
<newbie22>
ok "indata = File.read from_file"
<newbie22>
Learn Ruby the Hard way
<havenwood>
mm
ebbflowgo has joined #ruby
<Radar>
kristian_on_linu: then file a big there.
dmr8 has joined #ruby
<lucasb>
software is full of bigs
<Radar>
lucasb: ironic
Trynemjoel has quit [Ping timeout: 250 seconds]
<Bilge>
0
drptbl has joined #ruby
<kristian_on_linu>
my pastebin is the only google hit
<kristian_on_linu>
I have a feeling it's something else ...
<kristian_on_linu>
what ruby are you people on?
krobzaur_ has quit [Ping timeout: 260 seconds]
h99h9h88_ has joined #ruby
<kristian_on_linu>
I get ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux]
<Radar>
Ruby 2.3.0
skade has joined #ruby
JoyfulStudent has joined #ruby
txrx has quit [Ping timeout: 260 seconds]
<kristian_on_linu>
that would be development?
Xeago has joined #ruby
Trynemjoel has joined #ruby
zhkirill has joined #ruby
Senecea has joined #ruby
<lucasb>
stable, as of last xmas
lacuna has joined #ruby
lacuna has quit [Changing host]
lacuna has joined #ruby
firstdayonthejob has joined #ruby
<newbie22>
how can you check if file does not exists, the opposite of this "File::exist?( path)"
<lucasb>
add a "!" before the expression?
floatingpoint has joined #ruby
<kristian_on_linu>
I got mine via rvm.io
Trynemjoel has quit [Ping timeout: 264 seconds]
<kristian_on_linu>
I wonder why we got different errors, Radar
<Radar>
kristian_on_linu: One of the great mysteries.
<Radar>
Ruby is more scared of me because I've been doing it longer?
<kristian_on_linu>
makes sense
<kristian_on_linu>
it's funny
JoyfulStudent has quit [Ping timeout: 272 seconds]
TomyLobo has quit [Ping timeout: 264 seconds]
<kristian_on_linu>
I have used ruby for this jekyll stuff for ... a couple of years
<havenwood>
kristian_on_linu: Different versions of different gems act differently!
<kristian_on_linu>
and 95% of the time, it's flawless
dwfait has joined #ruby
lacuna has quit [Client Quit]
skade has quit [Ping timeout: 265 seconds]
<kristian_on_linu>
but when it fails, it's extremely hard to figure out what's wrong ... at least for me
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
JoyfulStudent has joined #ruby
Rasi has quit [Quit: WeeChat 1.3]
<havenwood>
kristian_on_linu: Most Ruby apps these days have a Gemfile, which a Gemfile.lock is created from that contains the locked in versions of the gems the app is developed with.
guzzlefry has joined #ruby
<guzzlefry>
Is upgrading from 2.0 to 2.3 likely to break things?
<Radar>
guzzlefry: no
Senecea has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ur5us has quit [Remote host closed the connection]
<kristian_on_linu>
hey
baweaver has quit [Ping timeout: 250 seconds]
<kristian_on_linu>
I tried something ... making a new site with jekyll new, then add the bibliography stuff there ... it WORKS!
donttrustem has quit [Ping timeout: 250 seconds]
Senecea has quit [Client Quit]
doublemalt_ has quit [Remote host closed the connection]
Senecea has joined #ruby
<kristian_on_linu>
so the problem is somewhere in my old code
ruby-lang344 has joined #ruby
<havenwood>
kristian_on_linu: so if you had a Gemfile.lock that contained the versions of the gems the app was previously known to work with you could probably get it running with the old code
dwfait has quit [Remote host closed the connection]
<kristian_on_linu>
havenwood: hurm
<kristian_on_linu>
I manically deleted everything
kkeuning has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bklane has quit [Remote host closed the connection]
<havenwood>
kristian_on_linu: Once you've created your Gemfile, install bundler `gem install bundler` and create a Gemfile.lock with `bundle`.
<havenwood>
kristian_on_linu: Now you have it for posterity!
nfk has joined #ruby
<havenwood>
kristian_on_linu: You can run your app with the exact gems from the Gemfile.lock with: bundle exec jekyll s
kkeuning has joined #ruby
ur5us has joined #ruby
kaleido has joined #ruby
Senecea has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kkeuning has quit [Max SendQ exceeded]
ruby-lang344 has quit [Ping timeout: 252 seconds]
<havenwood>
kristian_on_linu: And install those gems on any system with just: bundle
<kristian_on_linu>
havenwood: seems very much like overkill
<kaleido>
ive got a small sinatra app where im submitting values that will eventually be executed via net-ssh gem, but i need to schedule when it is executed
<kaleido>
is there a scheduling gem or something built-in im not aware of?
<Ox0dea>
kaleido: Sidekiq.
kkeuning has joined #ruby
<Ox0dea>
Do be careful about sanitizing your inputs to such a thing.
<kaleido>
sidekiq by mperham on github?
kkeuning has quit [Max SendQ exceeded]
<Radar>
kaleido: that's the one
kkeuning has joined #ruby
<havenwood>
kristian_on_linu: Sure, maybe it's overkill if you just want to run it this once and won't need to be again in the future. I just thought that might not be the case since you're running it again now and it's not working.
kkeuning has quit [Max SendQ exceeded]
kkeuning has joined #ruby
stevemackinnon has joined #ruby
kkeuning has quit [Max SendQ exceeded]
krobzaur_ has joined #ruby
Senecea has joined #ruby
kkeuning has joined #ruby
kkeuning has quit [Max SendQ exceeded]
skade has quit [Read error: No route to host]
kkeuning has joined #ruby
<kristian_on_linu>
could be
skade has joined #ruby
ropeney has joined #ruby
kkeuning has quit [Max SendQ exceeded]
kkeuning has joined #ruby
nertzy2 has joined #ruby
kkeuning has quit [Max SendQ exceeded]
diegoviola has quit [Quit: WeeChat 1.3]
bklane has joined #ruby
Senecea has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
toretore has joined #ruby
Axy has joined #ruby
Axy has quit [Changing host]
Axy has joined #ruby
Senecea has joined #ruby
stamina has joined #ruby
einarj has joined #ruby
Mia has quit [Ping timeout: 276 seconds]
<kristian_on_linu>
anyway, thanks for the help, all
djbkd has joined #ruby
minimalism has quit [Quit: minimalism]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kaleido has quit [Ping timeout: 260 seconds]
ascarter has joined #ruby
minimalism has joined #ruby
jam_ has joined #ruby
djbkd has quit [Ping timeout: 265 seconds]
ebbflowgo has quit [Ping timeout: 250 seconds]
oivoodoo has quit [Remote host closed the connection]
bklane_ has joined #ruby
bklane has quit [Read error: Connection reset by peer]
oivoodoo has joined #ruby
ajf- has joined #ruby
jam_ has quit [Ping timeout: 245 seconds]
ICantCook has quit [Quit: bye]
bklane_ has quit [Remote host closed the connection]
bklane has joined #ruby
h99h9h88_ has quit [Remote host closed the connection]
floatingpoint has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jnj>
I'm having an issue comparing strings. I currently have a script that goes through a text file where each line is a word. I then iterate through the text file line by line using f.each_line do |line|, and then I have an if statement that says if line == "XXXXXX" do this, but the if statement is not being triggered.
<lucasb>
maybe line.chomp!
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
CloCkWeRX has joined #ruby
<lucasb>
or line.strip! is there's leading and trailing whitespace you don't want to consider
<lucasb>
*if there's ...
<Radar>
?gist jnj
<ruby[bot]>
jnj: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
<Ox0dea>
Radar: jnj just needs #chomp!.
Rasi has joined #ruby
skade has quit [Read error: Connection reset by peer]
volty has joined #ruby
spooq has joined #ruby
floatingpoint has quit [Client Quit]
arlek has joined #ruby
h99h9h88 has joined #ruby
floatingpoint has joined #ruby
<jnj>
Ah, so I would just do line.chomp then to get rid of /n>
<jnj>
?
spooq has quit [Client Quit]
skade has joined #ruby
<Radar>
?try
<ruby[bot]>
Why don't you try it and see for yourself?
blur3d has joined #ruby
zenlot2 has joined #ruby
Trynemjoel has quit [Ping timeout: 250 seconds]
Xeago has quit [Remote host closed the connection]
floatingpoint has quit [Client Quit]
zenlot1 has quit [Ping timeout: 240 seconds]
symm- has joined #ruby
znz_jp has quit [Ping timeout: 260 seconds]
tildes has joined #ruby
<volty>
chat.reject(&:rhetoric)
einarj has quit [Remote host closed the connection]
<Ox0dea>
jnj: If you've got exactly one word per line and your file's not crazy-big, you might prefer `File.read('foo').split.each { ... }`.
niceperl has quit []
Trynemjoel has joined #ruby
<jnj>
0x0dea: Thanks, I'll try that out
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
kalopsian has joined #ruby
Yzguy has joined #ruby
hannelita has joined #ruby
ziyadb has joined #ruby
baweaver has joined #ruby
Axy has quit [Ping timeout: 250 seconds]
Trynemjoel has quit [Ping timeout: 264 seconds]
znz_jp has joined #ruby
Trynemjoel has joined #ruby
diegoviola has joined #ruby
dexter-tzu has quit [Read error: Connection reset by peer]
victortyau has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
baweaver has quit [Ping timeout: 260 seconds]
tildes has quit [Ping timeout: 272 seconds]
zeroDivisible has joined #ruby
n7fal has joined #ruby
n7fal has left #ruby [#ruby]
Cohedrin has joined #ruby
sneakerhax has quit [Ping timeout: 265 seconds]
penne12 has joined #ruby
kiriz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Senecea has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<lucasb>
From an array, I wanted all elements except the index N. I arrived at the following: 'ary.dup.tap {|x| x.delete_at(1) }'. I wonder if there's a better way?
Senecea has joined #ruby
kalopsian has quit [Ping timeout: 250 seconds]
yfeldblum has quit [Ping timeout: 240 seconds]
kalopsian has joined #ruby
skade has quit [Ping timeout: 245 seconds]
<volty>
values_at(0..n-1, n+1..-1)
kristian_on_linu has quit [Remote host closed the connection]
<tobiasvl>
ary - ary[1]
<Ox0dea>
tobiasvl: Nope.
<tobiasvl>
hm nope.
<tobiasvl>
haha
aspiers has joined #ruby
nertzy2 has quit [Quit: This computer has gone to sleep]
dexter-tzu has joined #ruby
<lucasb>
volty: yeah, I considered that. But you would have to change -1 there to the actual last index
<Ox0dea>
tobiasvl: Not even `ary - [ary[1]]`, I mean.
<amoeba>
lucasb: -1 means "last" in this case
<volty>
lucasb: why change -1 ?
<lucasb>
10..-1 is a range without elements, right?
ellistaa has quit [Quit: ellistaa]
<volty>
it's a specific array's range
blur3d has quit [Quit: blur3d]
<lucasb>
ahh, it works, sorry :)
asccigcc has joined #ruby
bronson has joined #ruby
ellistaa has joined #ruby
toretore has quit [Ping timeout: 256 seconds]
diego2 has joined #ruby
DoubleMalt has joined #ruby
<volty>
ops, not specific, it just gets adapted -normal range, adapted / transformed, for the array. Moved by size (added) to the right, then modulo size. Probably, imho
<ruby-lang665>
I am only really familiar with gems in hacking a rails app, do they work the same in plain ruby? I am assuming there is a readme?
diego2 has quit [Changing host]
diego2 has joined #ruby
diego2 is now known as diegoviola
<malice>
Hello! Is there some way to add item to Hash I'm iterating over?
<havenwood>
ruby-lang665: Gems work great, but yyyy-mm-dd or such sure is simple if you can do a standard format for input.
themsay2 has joined #ruby
veduardo has joined #ruby
<Ox0dea>
malice plz
<malice>
Ox0dea: :)
devbug_ has joined #ruby
dcunit3d has joined #ruby
<ruby-lang665>
Yeah, that's not an issue. At least I hope not.
<malice>
Ox0dea:I'm rewriting the Earley Parser algorithm from Python to Ruby, and Earley wants you to iterate over container that expands during iteration. I thought that because hashes in Ruby are ordered, this would not be a problem.
davedev24 has joined #ruby
<malice>
Looks like I was mistaken, and I want to bypass this limitation.
<blarghlarghl>
lucasb: ah thanks. i ended up solving it a different way, but thank you for the help!
diego2 has joined #ruby
<Ox0dea>
malice: You'll have to get your hands dirty.
djbkd has quit [Ping timeout: 276 seconds]
diego2 has quit [Changing host]
diego2 has joined #ruby
Senecea has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
themsay has quit [Ping timeout: 260 seconds]
diegoviola is now known as Guest93746
diego2 is now known as diegoviola
danieli has quit [Changing host]
danieli has joined #ruby
devbug has quit [Ping timeout: 240 seconds]
<malice>
Ox0dea:meaning? Implementing one on my own?
Guest93746 has quit [Ping timeout: 260 seconds]
pragmatism has quit [Ping timeout: 264 seconds]
kalopsian has quit [Ping timeout: 250 seconds]
shredding has quit [Ping timeout: 250 seconds]
DoubleMalt has quit [Remote host closed the connection]
bklane_ has quit [Read error: Connection reset by peer]
<havenwood>
malice: There ^ Array keys, now you've done it!
themsay has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
s2013 has joined #ruby
freerobby has quit [Quit: Leaving.]
<Ox0dea>
havenwood: Needs to happen during iteration.
<Ox0dea>
MRI raises a RuntimeError.
<Ox0dea>
It won't be doable by way of Hash#[]=.
<havenwood>
yeah, that's not allowed!
<Ox0dea>
We can do it! We have the Fiddle.
who42 has quit [Ping timeout: 272 seconds]
<havenwood>
egads, what have i walked into!?
artX000 has quit [Ping timeout: 240 seconds]
Couch has quit [Ping timeout: 250 seconds]
<malice>
Glad to bring you joy guys! But unforutnately I still feel quite lost!
<Ox0dea>
malice: You know not the tribulations involved in bending the language to this particular whim of yours.
<malice>
I might look retarded, but it's that I just don't know Ruby to well. What does it mean that they're mutable? Are you suggesting that I should use Arrays instead of hashes, or what?
themsay2 has quit [Ping timeout: 264 seconds]
<havenwood>
malice: What are you trying to achieve? What do you have as input value and what do you want as output value?
<malice>
Ox0dea: I know how it works in lisp, and it's wonderful in there.
ellistaa has quit [Quit: ellistaa]
<malice>
havenwood: I want to implement Earley parser. I have an example in Python, I tried rewritting it in Ruby.
<havenwood>
malice: hmm, i don't know early parser
ellistaa has joined #ruby
<malice>
havenwood: But generally I am iterating over a hash that can grow over a time. I have a starting rule, and I expand it into other rules - and I add these rules into the hash I'm iterating over, so I can continue my job.
<malice>
havenwood: I actually need to implement this parser, I'm helping my friend with her uni stuff. Plus, it'll help me(and her) understand the algorithm.
<havenwood>
aha
waka has quit [Remote host closed the connection]
<malice>
havenwood: If I needed a parser, the first thing I'd do is look for libs :)
bklane_ has quit [Remote host closed the connection]
M-mistake has joined #ruby
<havenwood>
malice: neg is small enough it might be interesting as a reference regarding code, dunno
h99h9h88 has quit [Remote host closed the connection]
<havenwood>
malice: yeah, parslet's more for using ;)
BTRE has quit [Remote host closed the connection]
beagle has quit [Ping timeout: 252 seconds]
h99h9h88 has joined #ruby
BTRE has joined #ruby
bklane has joined #ruby
<malice>
Well, looks like I'll have to use arrays somehow.
<malice>
I actually have an idea. Too bad Ruby doesn't allow this kind of thing.