apeiros changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.3.1; 2.2.5; 2.1.10: https://www.ruby-lang.org || Paste >3 lines of text on https://gist.github.com || Rails questions? Ask on #RubyOnRails || logs @ https://irclog.whitequark.org/ruby/
Madplatypus has quit [Quit: Connection closed for inactivity]
cyphase has joined #ruby
ctp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hutch34 has joined #ruby
nando293921 has joined #ruby
yfeldblu_ has joined #ruby
ctp has joined #ruby
minimalism has joined #ruby
bkxd has joined #ruby
xentity1x has quit [Ping timeout: 248 seconds]
elifoster has joined #ruby
moneylotion has quit [Ping timeout: 260 seconds]
cyphase has quit [Ping timeout: 265 seconds]
glook has joined #ruby
glook is now known as Guest49305
arashb has joined #ruby
xall has quit [Quit: WeeChat 1.5]
Guest49305 has quit [Client Quit]
Naz has quit [Ping timeout: 265 seconds]
yfeldblu_ has quit [Remote host closed the connection]
yfeldblum has joined #ruby
minimalism has quit [Quit: minimalism]
toni_ has quit [Quit: Leaving]
cyphase has joined #ruby
arashb has quit [Ping timeout: 265 seconds]
minimalism has joined #ruby
Moosashi has quit [Quit: Moosashi]
moneylotion has joined #ruby
owen1_ has joined #ruby
bronson_ has quit [Read error: Connection reset by peer]
bronson has joined #ruby
jaguarmagenta has joined #ruby
alaibe has joined #ruby
bkxd has quit [Ping timeout: 272 seconds]
<owen1_> i get 'ERROR: Failed to build gem native extension. current directory: /home/oren/t/bundler20161001-18486-1chzn0cnio4r-1.2.1/gems/nio4r-1.2.1/ext/nio4r /usr/bin/ruby2.3 -r ./siteconf20161001-18486-12oh97e.rb extconf.rb mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
<owen1_> when i run 'bundle update' . any ideas?
merlin2049er1 has quit [Quit: Leaving.]
cyphase has quit [Ping timeout: 252 seconds]
<matthewd> owen1_: It sounds like you're using a system/distro-provided ruby, and don't have the package installed that contains the development headers
merlin2049er has joined #ruby
toretore has joined #ruby
bronson has quit [Read error: Connection reset by peer]
alaibe has quit [Ping timeout: 248 seconds]
<owen1_> matthewd: i think i have ruby that came with my ubuntu (16.04) - ruby 2.3.1p112
bronson has joined #ruby
<owen1_> matthewd: i think you are on to something. what's the easiest way to solve it
<matthewd> Google says you need the ruby-dev package
<owen1_> installing it now. thank you
cyphase has joined #ruby
Naz has joined #ruby
bronson has quit [Read error: Connection reset by peer]
Moosashi has joined #ruby
bronson has joined #ruby
SteenJobs has quit [Quit: SteenJobs]
tdy has joined #ruby
merlin2049er has quit [Quit: Leaving.]
merlin2049er has joined #ruby
bronson has quit [Read error: Connection reset by peer]
bronson has joined #ruby
cyphase has quit [Ping timeout: 248 seconds]
merlin2049er has quit [Quit: Leaving.]
merlin2049er has joined #ruby
cyphase has joined #ruby
bronson has quit [Read error: Connection reset by peer]
jaguarmagenta has quit [Remote host closed the connection]
bronson has joined #ruby
jaguarmagenta has joined #ruby
Pumukel has joined #ruby
boogeyman has quit [Quit: bb]
Derperperd has quit [Quit: Derperperd]
monoprotic has quit [Read error: Connection reset by peer]
moneylotion has quit [Ping timeout: 260 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cyphase has quit [Ping timeout: 265 seconds]
boogeyman has joined #ruby
matp has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Pumukel has quit [Ping timeout: 265 seconds]
merlin2049er has quit [Quit: Leaving.]
merlin2049er has joined #ruby
jaguarmagenta has quit [Remote host closed the connection]
cyphase has joined #ruby
jaguarmagenta has joined #ruby
moneylotion has joined #ruby
spectrum has quit [Quit: Oh Shidd]
nankyokusei has joined #ruby
nankyokusei has quit [Ping timeout: 252 seconds]
maloik has quit [Remote host closed the connection]
maloik has joined #ruby
cyphase has quit [Ping timeout: 248 seconds]
harai has joined #ruby
cyphase has joined #ruby
dtscode has joined #ruby
elifoster has quit [Read error: Connection reset by peer]
Velizar has quit [Quit: Velizar]
brendan- has joined #ruby
GodFather_ has joined #ruby
GodFather_ has quit [Read error: Connection reset by peer]
jcao219 has quit [Ping timeout: 272 seconds]
charliesome has joined #ruby
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Moosashi has quit [Quit: Moosashi]
aryaching has quit [Remote host closed the connection]
fmcgeough has joined #ruby
kingkong- has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
yfeldblum has quit [Quit: Leaving...]
troulouliou_dev has quit [Quit: Leaving]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tdy has quit [Ping timeout: 244 seconds]
monoprotic has joined #ruby
charliesome has joined #ruby
Moosashi has joined #ruby
Pumukel has joined #ruby
Moosashi_ has joined #ruby
arescorpio has joined #ruby
Moosashi has quit [Ping timeout: 272 seconds]
Moosashi_ is now known as Moosashi
moneylotion has quit [Ping timeout: 260 seconds]
moneylotion has joined #ruby
Pumukel has quit [Ping timeout: 265 seconds]
jcao219 has joined #ruby
fredolinhares has quit [Ping timeout: 265 seconds]
optiz0r has quit [Ping timeout: 244 seconds]
hutch34 has quit [Ping timeout: 244 seconds]
charliesome_ has joined #ruby
charliesome has quit [Read error: Connection reset by peer]
brent__ has quit [Quit: Connection closed for inactivity]
Moosashi has quit [Quit: Moosashi]
Moosashi has joined #ruby
_sfiguser has quit [Ping timeout: 252 seconds]
incog has quit [Read error: Connection reset by peer]
Rodya_ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
charliesome_ has quit [Ping timeout: 265 seconds]
Moosashi has quit [Client Quit]
Rodya_ has quit [Ping timeout: 248 seconds]
fredolinhares has joined #ruby
charliesome has joined #ruby
_sfiguser has joined #ruby
alaibe has joined #ruby
tdy has joined #ruby
jonyijoe has quit [Remote host closed the connection]
jonyijoe has joined #ruby
alaibe has quit [Ping timeout: 265 seconds]
Immune has quit [Ping timeout: 244 seconds]
harai has quit [Ping timeout: 265 seconds]
Pumukel has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
cyphase has quit [Ping timeout: 248 seconds]
jonyijoe has quit [Ping timeout: 265 seconds]
Pumukel has quit [Ping timeout: 265 seconds]
charliesome has quit [Ping timeout: 252 seconds]
Pumukel has joined #ruby
Bellthoven has quit []
charliesome has joined #ruby
cyphase has joined #ruby
beatdown has quit [Quit: ZNC 1.6.1 - http://znc.in]
Pumukel has quit [Ping timeout: 265 seconds]
vitd has joined #ruby
pwnd_nsfw` has quit [Read error: Connection reset by peer]
bobdobbs has quit [Read error: Connection reset by peer]
pwnd_nsfw` has joined #ruby
bobdobbs has joined #ruby
beatdown has joined #ruby
charliesome has quit [Ping timeout: 265 seconds]
zacstewart has quit [Ping timeout: 264 seconds]
jphase has quit [Ping timeout: 272 seconds]
toretore has quit [Ping timeout: 244 seconds]
<_sfiguser> how can a ruby program be closed source ?
<_sfiguser> i mean... in order to let the user run the program... i must give him the source...
zacstewart has joined #ruby
<Papierkorb> license. possibly whacky obfuscation
hutch34 has joined #ruby
<_sfiguser> whacky obfuscation ? how can i ?
<_sfiguser> Papierkorb, ok but even with license the user can view the source code
SaintAardvark has quit [Quit: WeeChat 1.0.1]
jphase has joined #ruby
dviola has quit [Quit: WeeChat 1.5]
bobdobbs has quit [Ping timeout: 252 seconds]
<elomatreb> _sfiguser: A user can see the source of compiled programs in other languages too, using decompilers. Closed-source is a legal term
fredolinhares has quit [Quit: WeeChat 1.5]
nankyokusei has joined #ruby
Hyuk has joined #ruby
monoprotic has quit [Read error: Connection reset by peer]
CharlieLo has joined #ruby
Dobler has joined #ruby
nankyokusei has quit [Ping timeout: 244 seconds]
braincrash has quit [Quit: bye bye]
ARCADIVS has joined #ruby
CharlieLo has quit [Ping timeout: 252 seconds]
Madplatypus has joined #ruby
jcao219 has quit [Ping timeout: 272 seconds]
nocd has quit [Read error: Connection reset by peer]
hutch34 has quit [Ping timeout: 265 seconds]
Silthias has quit [Ping timeout: 248 seconds]
nebg has quit [Ping timeout: 265 seconds]
hutch34 has joined #ruby
<baweaver> _sfiguser: It's not something to worry about
braincrash has joined #ruby
nebg has joined #ruby
Silthias has joined #ruby
nando293921 has quit [Ping timeout: 248 seconds]
bobdobbs has joined #ruby
Pumukel has joined #ruby
hogetaro has joined #ruby
jonyijoe has joined #ruby
hutch34 has quit [Quit: WeeChat 1.5]
hutch34 has joined #ruby
GodFather has quit [Ping timeout: 244 seconds]
hutch34 has quit [Client Quit]
Pumukel has quit [Ping timeout: 252 seconds]
hutch34 has joined #ruby
jonyijoe has quit [Ping timeout: 265 seconds]
MissionCritical has quit [Ping timeout: 244 seconds]
optiz0r has joined #ruby
gix has quit [Ping timeout: 244 seconds]
Dobler has quit [Ping timeout: 244 seconds]
gix has joined #ruby
Mission-Critical has joined #ruby
mozzarella has quit [Ping timeout: 252 seconds]
l4v2 has joined #ruby
Hyuk has quit [Quit: Textual IRC Client: www.textualapp.com]
Hyuk has joined #ruby
arashb has joined #ruby
mozzarella has joined #ruby
nocd has joined #ruby
jcao219 has joined #ruby
arashb has quit [Ping timeout: 265 seconds]
tmtwd has joined #ruby
c355e3b has quit [Quit: Connection closed for inactivity]
nando293921 has joined #ruby
thatsnotjack has quit [Ping timeout: 265 seconds]
hk238 has joined #ruby
thatsnotjack has joined #ruby
kent\n has quit [Quit: db-upgrade]
nando293921 has quit [Ping timeout: 272 seconds]
craigp has quit [Ping timeout: 264 seconds]
nando293921 has joined #ruby
craigp has joined #ruby
Guest13480 has quit [Quit: ¯\_(ツ)_/¯]
techietrash has quit [Quit: Bye! <(^_^<)]
techietrash has joined #ruby
kent\n has joined #ruby
paultreny has joined #ruby
paultreny is now known as Guest1973
NTrash has joined #ruby
bearche has joined #ruby
alaibe has joined #ruby
Pumukel has joined #ruby
craigp has quit [Ping timeout: 244 seconds]
alaibe has quit [Ping timeout: 252 seconds]
Pumukel has quit [Ping timeout: 265 seconds]
despai has joined #ruby
merlin2049er has quit [Quit: Leaving.]
merlin2049er has joined #ruby
jaguarmagenta has quit [Read error: Connection reset by peer]
jaguarmagenta has joined #ruby
tristanp has quit [Remote host closed the connection]
[k-_ has quit [Ping timeout: 264 seconds]
[k- has joined #ruby
lacour has quit [Quit: Leaving]
NTrash has quit [Quit: Konversation terminated!]
NTrash has joined #ruby
Jakey3 has quit [Ping timeout: 272 seconds]
Vile` has quit [Ping timeout: 264 seconds]
craigp has joined #ruby
bearche has quit [Ping timeout: 244 seconds]
tdy-err has joined #ruby
Vile` has joined #ruby
AlphaAtom has joined #ruby
merlin2049er has quit [Quit: Leaving.]
merlin2049er has joined #ruby
CloCkWeRX has joined #ruby
nankyokusei has joined #ruby
merlin2049er has quit [Client Quit]
merlin2049er has joined #ruby
craigp has quit [Ping timeout: 265 seconds]
d34th4ck3r has joined #ruby
arescorpio has quit [Quit: Leaving.]
AlphaAtom has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dionysus69 has joined #ruby
nankyokusei has quit [Ping timeout: 265 seconds]
vkngpmhc has quit [Ping timeout: 264 seconds]
zel has joined #ruby
zel is now known as Guest62012
azbshiri has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
l4v2 has quit [Quit: l4v2]
elifoster has joined #ruby
pawnbox has joined #ruby
[k- has quit [Ping timeout: 244 seconds]
[k- has joined #ruby
toretore has joined #ruby
hahuang62 has quit [Ping timeout: 248 seconds]
elastix has joined #ruby
NTrash has quit [Quit: Konversation terminated!]
despai has quit [Quit: This computer has gone to sleep]
cred has quit [Ping timeout: 248 seconds]
sepp2k1 has quit [Read error: Connection reset by peer]
cred has joined #ruby
Pumukel has joined #ruby
ResidentBiscuit has quit [Remote host closed the connection]
owen1_ has left #ruby ["WeeChat 1.4-dev"]
sandelius has joined #ruby
Pumukel has quit [Ping timeout: 265 seconds]
sandelius has quit [Client Quit]
merlin2049er has quit [Quit: Leaving.]
merlin2049er has joined #ruby
vitd has quit [Ping timeout: 252 seconds]
sandelius has joined #ruby
despai has joined #ruby
araujo has quit [Read error: Connection reset by peer]
araujo has joined #ruby
nando293921 has quit [Ping timeout: 244 seconds]
araujo has quit [Max SendQ exceeded]
Devalo has joined #ruby
<elastix> hi guys
araujo has joined #ruby
araujo has quit [Max SendQ exceeded]
araujo has joined #ruby
madgen has joined #ruby
nullsides has joined #ruby
despai has quit [Read error: Connection reset by peer]
nofxx has joined #ruby
pabloh has joined #ruby
bearche has joined #ruby
craigp has joined #ruby
craigp has quit [Ping timeout: 264 seconds]
bearche has quit [Ping timeout: 244 seconds]
<elastix> how can I create a function.... def test() { ...} ?
<baweaver> Run through a tutorial or two.
beecushman has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
vitd has joined #ruby
<baweaver> You'll learn a lot faster by doing that first.
jphase has quit [Ping timeout: 248 seconds]
Derperperd has joined #ruby
ctp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<elastix> ok thanks
LoneHerm_ has joined #ruby
codelogix has joined #ruby
tenderlove has quit [Read error: Connection reset by peer]
tenderlove has joined #ruby
jphase has joined #ruby
codelogix has quit [Ping timeout: 272 seconds]
hahuang62 has joined #ruby
dagda1 has quit [Quit: Textual IRC Client: www.textualapp.com]
cyphase has quit [Ping timeout: 244 seconds]
merlin2049er has quit [Quit: Leaving.]
merlin2049er has joined #ruby
hahuang62 has quit [Ping timeout: 252 seconds]
LoneHerm_ has quit [Remote host closed the connection]
beecushman has joined #ruby
xentity1x has joined #ruby
Moosashi has joined #ruby
capitainIsh has joined #ruby
cyphase has joined #ruby
pabloh has quit [Quit: Leaving]
alaibe has joined #ruby
craigp has joined #ruby
symm- has joined #ruby
ichkv has joined #ruby
Pumukel has joined #ruby
FreeAssange has joined #ruby
alaibe has quit [Ping timeout: 244 seconds]
madgen has quit [Ping timeout: 264 seconds]
elifoster has quit [Quit: sleep]
AlphaAtom has joined #ruby
AlphaAtom has quit [Client Quit]
jphase has quit [Ping timeout: 265 seconds]
Pumukel has quit [Ping timeout: 252 seconds]
PickAndMix has joined #ruby
PickAndMix has left #ruby [#ruby]
Devalo has quit [Remote host closed the connection]
jaequery has joined #ruby
jphase has joined #ruby
Vile` has quit [Ping timeout: 272 seconds]
codelogix has joined #ruby
Devalo has joined #ruby
agit0 has quit [Quit: zzzZZZ….]
tmtwd has quit [Ping timeout: 264 seconds]
anisha has joined #ruby
Moosashi has quit [Quit: Moosashi]
claudiuinberlin has joined #ruby
anaiden has joined #ruby
boogeyman has quit [Quit: bb]
codelogix has quit [Ping timeout: 264 seconds]
Moosashi has joined #ruby
Hyuk has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
Pupeno has joined #ruby
Pupeno has joined #ruby
Pupeno has quit [Changing host]
beecushman has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
Moosashi has quit [Client Quit]
idgimg has joined #ruby
arashb has joined #ruby
anaiden has quit [Quit: Leaving]
LoneHermit has joined #ruby
nankyokusei has joined #ruby
harfangk has joined #ruby
Alayde has joined #ruby
arashb has quit [Ping timeout: 248 seconds]
symm-_ has joined #ruby
CharlieLo has joined #ruby
symm- has quit [Ping timeout: 265 seconds]
nankyokusei has quit [Ping timeout: 244 seconds]
symm-_ has quit [Client Quit]
<idgimg> Hello! I am a Ruby novice. I'm having a problem with rubygems on OS X, where many of my gems cause a ruby error when called. 'gem update' tells me that I don't have permission for the Ruby/Gems/ directory.
symm- has joined #ruby
Hyuk has joined #ruby
<idgimg> This could also be related to the Homebrew package manager, but I'm not sure what part of things would be causing this. I've seen answers to this question say that I should ideally be using rvm for my gems instead of sudo, is this related?
CharlieLo has quit [Ping timeout: 272 seconds]
<Alayde> Personally I'm a fan of RVM, and it should solve your problem as it places all of your gems in your home directory (~/.rvm/gems)
ec0 has joined #ruby
<idgimg> That makes a lot of sense! So, how would I cleanly transition to this?
Channel6 has quit [Quit: Leaving]
<Alayde> more or less you just install rvm, install the version of ruby you need (e.g. `rvm install ruby-2.3.1`) and then install whatever gems you need
<idgimg> Ah, so I did that today. I read through the basics, and best practices in the documentation. But it doesn't account for like, 'hey i fucked up now what'
face has quit [Remote host closed the connection]
tdy-err has quit [Quit: Connection closed for inactivity]
face has joined #ruby
jud has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gingray has joined #ruby
<harfangk> installing rvm should automatically set your path to use gems in your ~/.rvm/gems path
Guest62012 has quit [Quit: https://fnordserver.eu]
kt2 has joined #ruby
Hyuk has quit [Quit: Textual IRC Client: www.textualapp.com]
conta has joined #ruby
boogeyman has joined #ruby
RegulationD has joined #ruby
<idgimg> Thank you!
codelogix has joined #ruby
<elastix> hi guys I'm solving an exercise using ruby.... in the text I read : decimal zip of two non-negative integers A and B is an integer C whose
<elastix> decimal representation ..........
<elastix> what is a decimal zip?
vitd has quit [Ping timeout: 252 seconds]
kingkong- has joined #ruby
RegulationD has quit [Ping timeout: 265 seconds]
<elastix> ?
vuoto has joined #ruby
codelogix has quit [Ping timeout: 248 seconds]
anisha has quit [Quit: This computer has gone to sleep]
<elastix> I was trying to do this exercise in ruby ... someone can help me please? :)
minimalism has quit [Quit: minimalism]
AlphaAtom has joined #ruby
madgen has joined #ruby
capitainIsh has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
vuoto has quit [Quit: Lost terminal]
<elastix> how can I use if a && b > 0 .......
Pupeno has quit [Remote host closed the connection]
vuoto has joined #ruby
Pumukel has joined #ruby
bearche has joined #ruby
<epitron> elastix: look up these methods: Array#zip, Array#flatten, Numeric#to_s, String#chars
Alayde has quit [Ping timeout: 252 seconds]
<elastix> thansk
Madplatypus has quit [Quit: Connection closed for inactivity]
<epitron> err, Fixnum#to_s, not Numeric#to_s
<elastix> ok done .. another question :) how can I create a decimal zip in ruby?
<epitron> use those 4 methods
devmagpie has joined #ruby
lxsameer has joined #ruby
<epitron> i'm not going to tell you the order :)
anisha has joined #ruby
sp_ has joined #ruby
minimalism has joined #ruby
anisha has quit [Client Quit]
devmagpie has quit [Client Quit]
devmagpie has joined #ruby
bearche has quit [Ping timeout: 244 seconds]
Pumukel has quit [Ping timeout: 252 seconds]
Pumukel has joined #ruby
Jackneill has joined #ruby
toretore has quit [Ping timeout: 265 seconds]
<elastix> okok :)
<hanmac> epitron: i think its more Array#join than Array#flatten
hutch34 has quit [Ping timeout: 252 seconds]
<epitron> hanmac: oh, join autoflattens? that's handy
Pumukel has quit [Ping timeout: 265 seconds]
Moosashi has joined #ruby
<elastix> I'm creating an array from a number: aArray = a.to_s.split('').map(&:to_i)
<elastix> why it is wrong?
<elastix> a = 1234
anisha has joined #ruby
prawnzy has quit [Remote host closed the connection]
Moosashi has quit [Client Quit]
Madplatypus has joined #ruby
jaguarmagenta has quit [Read error: Connection reset by peer]
jaguarmagenta has joined #ruby
<ruby[bot]> elastix: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/d55278fa50358a3697613f4955733292
<ruby[bot]> elastix: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<elastix> what about my solution?
xentity1x has quit [Ping timeout: 248 seconds]
jcao219 has quit [Ping timeout: 272 seconds]
jcao219 has joined #ruby
vuoto has quit [Quit: Lost terminal]
AltLock has joined #ruby
merlin2049er has quit [Quit: Leaving.]
vuoto has joined #ruby
merlin2049er has joined #ruby
<elastix> aArray.each do |el|
<elastix> end
<elastix> cArray = cArray.push(bArray[el])
FreeAssange has quit [Quit: Leaving]
<elastix> aArray is an array of 2 elements... why in cArray I see only the second element of aArray?
[k- has quit [Ping timeout: 265 seconds]
jenrzzz has joined #ruby
merlin2049er1 has joined #ruby
sandelius has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
merlin2049er1 has quit [Client Quit]
merlin2049er1 has joined #ruby
merlin2049er has quit [Ping timeout: 248 seconds]
vuoto has quit [Remote host closed the connection]
merlin2049er1 has quit [Client Quit]
vuoto has joined #ruby
merlin2049er has joined #ruby
hahuang62 has joined #ruby
<apeiros> elastix: can you make an example with actual data for a, b and c?
<apeiros> also you generally don't want ary = ary.push. you just ary.push.
erlingur has joined #ruby
<Yxhuvud> I'd use ary << if I didn't see the array as a stack
<apeiros> o0
vitd has joined #ruby
<matthewd> elastix: What does `for i in aArray` do?
symm- has quit [Ping timeout: 272 seconds]
<Yxhuvud> or more probably #concat in this case
<apeiros> now we're guessing :D
<apeiros> Yxhuvud: did you always write your nick with an uppercase Y?
hahuang62 has quit [Ping timeout: 272 seconds]
<Yxhuvud> dunno.
AlphaAtom has quit [Ping timeout: 252 seconds]
<Yxhuvud> I've changed irc clients a few times the last decade, and it may have changed at some point.
<elastix> aArray.each do |el| || bArray.each do |el1|
alaibe has joined #ruby
Devalo has quit [Remote host closed the connection]
<elastix> can I use an OR between 2 for loops or .each?
<apeiros> not like that
merlin2049er has quit [Quit: Leaving.]
<matthewd> elastix: Did you look at Array#zip ?
merlin2049er has joined #ruby
<elastix> no
sp_ has quit [Ping timeout: 272 seconds]
<apeiros> elastix: if you'd show what you try to achieve, we could provide you with actual help instead of playing guessing games.
<ruby[bot]> elastix: as I told you already, please use https://gist.github.com
<elastix> this is my current solution but it's not yet perfect
<apeiros> eh, ok, pastebin. as the bot says - not opening that.
NTrash has joined #ruby
Pumukel has joined #ruby
alaibe has quit [Ping timeout: 244 seconds]
craigp_ has joined #ruby
<elastix> what do you think?
craigp has quit [Ping timeout: 264 seconds]
jonyijoe has joined #ruby
<elastix> how can I do in ruby somthing like that: for (i = 0; i < strA.length || i < strB.length; i++) {.......
<apeiros> k, seems you don't read anyway. I'm out.
Pumukel has quit [Ping timeout: 265 seconds]
jmignault has quit [Ping timeout: 264 seconds]
LoneHermit has quit [Remote host closed the connection]
<elastix> why iit's wrong?
pragmaticus has joined #ruby
<apeiros> > eh, ok, pastebin. as the bot says - not opening that.
workmad3 has joined #ruby
alaibe has joined #ruby
jonyijoe has quit [Ping timeout: 265 seconds]
blackmesa has joined #ruby
<elastix> (aArray.each do |el|) || (bArray.each do |el1|)
<elastix> why it's wrong? ok I 'll use another one
devmagpie has quit [Ping timeout: 264 seconds]
<elastix> someone can tell me how can I use an OR between 2 for loops?
gusrub has joined #ruby
symm- has joined #ruby
<apeiros> > elastix: if you'd show what you try to achieve, we could provide you with actual help instead of playing guessing games.
<elastix> I pasted 3 times my link :)
<apeiros> well, maybe s/show/tell/
<elastix> there is my actual code inside
<apeiros> yes, I look at it. I don't know what you want to achieve.
gusrub has quit [Client Quit]
<elastix> I want to do this exercise in ruby
<elastix> can you help me to fix the code?
<elastix> :)
<apeiros> then matthewd was spot on - look at Array#zip
bearche has joined #ruby
gusrub has joined #ruby
vitd has quit [Ping timeout: 264 seconds]
Pumukel has joined #ruby
ec0 has quit [Ping timeout: 265 seconds]
gusrub has quit [Client Quit]
gusrub has joined #ruby
<elastix> aArray.zip[bArray]
<elastix> ??
<elastix> something like that?
rafadc has joined #ruby
<apeiros> &ri Array#zip
<apeiros> elastix: ^
<apeiros> expression[…] calls the [] method on expression. so no. you don't invoke zip with ary.zip[]. that'd be two method calls.
bobdobbs has quit [Ping timeout: 252 seconds]
<matthewd> I was just parroting advice epitron gave an hour ago :|
arashb has joined #ruby
gusrub has quit [Client Quit]
gusrub has joined #ruby
Pumukel has quit [Ping timeout: 265 seconds]
anisha has quit [Quit: This computer has gone to sleep]
<apeiros> so indeed, it's a reading problem
bearche has quit [Ping timeout: 244 seconds]
gusrub_ has joined #ruby
gusrub has quit [Client Quit]
gusrub_ has quit [Remote host closed the connection]
gusrub has joined #ruby
Pumukel has joined #ruby
bearche has joined #ruby
rafadc has quit [Ping timeout: 272 seconds]
workmad3 has quit [Ping timeout: 272 seconds]
<elastix> yes but if I use the zip function it doesn't append the last numbers from the longest array
<elastix> the zip function works well only if the 2 array are the same size
<elastix> :)
Snickers has joined #ruby
<elastix> and in my case the 2 array have different size
<elastix> a = 1, 2
<elastix> b = 1,2,3,4,5
ctp has joined #ruby
gingray has quit [Ping timeout: 265 seconds]
<elastix> any idea?
Pumukel has quit [Ping timeout: 252 seconds]
Velizar has joined #ruby
Pumukel has joined #ruby
<apeiros> measure, attach the rest
sandelius has joined #ruby
<apeiros> >> a=[1,2]; b=[9,8,7,6]; (b[a.size..-1] || [])
<ruby[bot]> apeiros: # => [7, 6] (https://eval.in/653728)
<apeiros> the `|| []` part if for cases where a.size > b.size
<apeiros> you can alternatively just check for that.
nankyokusei has joined #ruby
Pumukel has quit [Ping timeout: 265 seconds]
nofxx has quit [Ping timeout: 265 seconds]
<elastix> ok done :) thanks
<elastix> last question guys :)
<elastix> I have a variable like a = 12 34 - 12132432 534543
<elastix> I need to write a funciotn to get b = 12 34 12 13 24 43 ....
<elastix> how can I do that? some advice?
nankyokusei has quit [Ping timeout: 248 seconds]
<apeiros> what's `12 34`? is it `1234`? because `a = 12 34` is not valid.
saffigy has joined #ruby
<hanmac> about the zip thing: how i did it with different size:
<hanmac> >> a = 12.to_s; b = 3456.to_s; a.chars.values_at(0...[a.size, b.size].max).zip(b.chars).join
<ruby[bot]> hanmac: # => "132456" (https://eval.in/653729)
saffigy has quit [Client Quit]
<apeiros> interesting solution
<elastix> S = a.strip.delete(' ')
<hanmac> the funniest thing: [a.size, b.size].max does not create an Array ;P
bearche has quit [Ping timeout: 265 seconds]
<elastix> someone can tell me why this is wrong? S = a.strip.delete(' ')
<apeiros> hanmac: only in newer rubies, though ;-p
<apeiros> 2.4+ I think?
<hanmac> yeah but its still cool
tomphp has joined #ruby
<apeiros> indeed it is
<apeiros> elastix: not with the given info
Devalo has joined #ruby
Satyajit has joined #ruby
<elastix> ok how can I split a number every 2 numbers? like a=12344566 I need to get b = 12-34-45-66
<elastix> so I need to add also a - every 2 numbers
<matthewd> elastix: Do you want to be handed the answer, or do you want to want to work it out?
<matthewd> elastix: If the latter, what do you have so far?
madgen has quit [Ping timeout: 272 seconds]
webus has joined #ruby
<elastix> a.strip.delete(' ').to_s.split('-')
<elastix> a is the string like a = 12 23 - 45 56
<elastix> or 123 12 2
<elastix> I need to get xx-xx-xx-xx
arashb has quit [Ping timeout: 265 seconds]
<apeiros> again, `a = 12 23 - 45 56` is not valid
<matthewd> Those all sound very different from each other
<apeiros> and I can't help you with invalid code.
Devalo has quit [Ping timeout: 248 seconds]
erlingur has quit [Ping timeout: 265 seconds]
idgimg has left #ruby [#ruby]
<apeiros> and honestly I grow tired of asking you questions, and you not answering them, yet having subsequent questions which require those answers.
<matthewd> elastix: Do you have a URL that describes the problem you're trying to solve? Your explanation is very unclear.
<matthewd> And also that ^.
<elastix> the problem is: I have a string like : a = "12 23 3 32432 - 123213 213 " and I need to get
<elastix> b = 12-23-33-24-32-12-32-13-21-2
AlphaAtom has joined #ruby
<hanmac> >> "12 23 3 32432 - 123213 213".delete(" -").scan(/\d{2}/).join("-")
<ruby[bot]> hanmac: # => "12-23-33-24-32-12-32-13-21" (https://eval.in/653731)
RegulationD has joined #ruby
<apeiros> the logic of that transformation escapes me.
<hanmac> >> "12 23 3 32432 - 123213 213".delete(" -").scan(/\d{1,2}/).join("-")
<ruby[bot]> hanmac: # => "12-23-33-24-32-12-32-13-21-3" (https://eval.in/653734)
<apeiros> his was -2 in the end, though
<apeiros> but maybe that was just a mistake. I'll never know.
<hanmac> i guess its a typo
<elastix> but I miss numbers in this way
<elastix> Example test: '00-44 48 5555 8361'
<elastix> WRONG ANSWER (got 004-448-555-583 expected 004-448-555-583-61)
madgen has joined #ruby
catphish has left #ruby ["Leaving"]
<elastix> in case I need to add a - every 3 characters
<matthewd> elastix: You described a different problem from the one you're trying to solve. Again.
RegulationD has quit [Ping timeout: 264 seconds]
<elastix> yes :( sorry this was what I expeceted
<matthewd> I'm quite sure that there's an actual problem description there, which uses actual words, in a sensible order, to state the problem.
<matthewd> You're actively choosing to reinterpret it for us, instead of copy & paste the real problem statement. That is unhelpful, and so you are unlikely to receive help in turn.
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 244 seconds]
<hanmac> elastix: scan(/\d{1,3}/)
<elastix> thanks
<elastix> Example test: '0 - 22 1985--324'
<elastix> WRONG ANSWER (got 022-198-532-4 expected 022-198-53-24)
erlingur has joined #ruby
<elastix> this is last case to fix
<elastix> any idea?
Pumukel has joined #ruby
<hanmac> ugh that double "--" is problematic ... :/
AltLock has quit [Quit: ChatZilla 0.9.92 [SeaMonkey 2.40/20160807101136]]
<matthewd> elastix: Are there, or are there not, words that describe the problem you're supposed to be solving?
wldcordeiro has quit [Ping timeout: 244 seconds]
NTrash has quit [Quit: Konversation terminated!]
claudiuinberlin has quit []
symm- has quit [Quit: Leaving...]
wldcordeiro has joined #ruby
LoneHermit has joined #ruby
pragmaticus has quit [Ping timeout: 265 seconds]
Pumukel has quit [Ping timeout: 265 seconds]
NTrash has joined #ruby
Pupeno has joined #ruby
vitd has joined #ruby
LoneHermit has quit [Ping timeout: 272 seconds]
tristanp has joined #ruby
Pupeno has quit [Ping timeout: 248 seconds]
Devalo has joined #ruby
tristanp has quit [Ping timeout: 264 seconds]
Pupeno has joined #ruby
pawnbox has quit [Remote host closed the connection]
dionysus69 has quit [Ping timeout: 244 seconds]
ctp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Guest43 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pawnbox has joined #ruby
AlphaAtom has quit [Ping timeout: 244 seconds]
maloik25 has joined #ruby
Devalo has quit [Read error: Connection reset by peer]
prawnzy has joined #ruby
Devalo has joined #ruby
kotk has joined #ruby
kotk has quit [Client Quit]
nipher has joined #ruby
<zenspider> hanmac: 1) don't just give away answers. teach. 2) you're making it too difficult. scan for what you want (numbers) and then treat them (pair and then join)
vitd has quit [Ping timeout: 265 seconds]
maloik has quit [Ping timeout: 265 seconds]
<hanmac> zenspider: the input format is to complicated ... "'0 - 2" should be treated as one number, while "5--3" is not ... without more description it doesn't make any sense
prawnzy has quit [Ping timeout: 265 seconds]
Madplatypus has quit [Quit: Connection closed for inactivity]
<zenspider> hanmac: its numbers with junk around it. scan handles that just fine. you're just making it too complicated with delete and a complicated scan
<zenspider> ie, scan(/\d/) solves the problem fine
<hanmac> zenspider: not the last one
<zenspider> yes, the last one too
bsrd has joined #ruby
<zenspider> this is fairly plain map & reduce
aidalgol has quit [Quit: zZzZZzz]
bsrd has quit [Client Quit]
<zenspider> elastix is still in here... otherwise I'd go into it more explictly
dionysus69 has joined #ruby
Pumukel has joined #ruby
<ytti> &win 20
sandelius has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
webus has quit [Quit: goodbye]
workmad3 has joined #ruby
_sfiguser has quit [Ping timeout: 252 seconds]
Ropeney has quit [Quit: Leaving]
Pumukel has quit [Ping timeout: 252 seconds]
bkxd has joined #ruby
sandelius has joined #ruby
jaiks has joined #ruby
NTrash has quit [Quit: Konversation terminated!]
elastix has quit [Quit: elastix]
NTrash has joined #ruby
elastix has joined #ruby
Pankaj has joined #ruby
<Pankaj> Hello there. I am new User Please reply
Novice201y has joined #ruby
<Novice201y> Hello. What should I do to make Ruby 2.3.1 usable in IDE after compilation from from?
<Novice201y> from source*
sandelius has quit [Client Quit]
workmad3 has quit [Ping timeout: 264 seconds]
hahuang62 has joined #ruby
madgen has quit [Ping timeout: 244 seconds]
bobdobbs has joined #ruby
stamina has joined #ruby
elastix has quit [Quit: elastix]
jenrzzz has joined #ruby
_sfiguser has joined #ruby
hahuang62 has quit [Ping timeout: 265 seconds]
madgen has joined #ruby
workmad3 has joined #ruby
tx0ru4 has joined #ruby
jenrzzz has quit [Ping timeout: 248 seconds]
jcao219 has quit [Ping timeout: 264 seconds]
<Pankaj> Hello is anybody there
Guest66898 has quit [Ping timeout: 272 seconds]
jonyijoe has joined #ruby
Guest66898 has joined #ruby
Pankaj has quit [Ping timeout: 248 seconds]
tx0ru4 has quit [Quit: Leaving]
jphase has quit [Ping timeout: 248 seconds]
<harfangk> hi
<harfangk> Novice201y which IDE are you using?
LoneHermit has joined #ruby
<Novice201y> harfangk: RubyMine
<harfangk> if it's rubymine, it has built in rvm/rvenv support so that'd be more convenient
<harfangk> is there a reason you're directly compiling it from source
jphase has joined #ruby
jonyijoe has quit [Ping timeout: 265 seconds]
<Novice201y> harfangk: OK, I've got it: /usr/local/bin/ruby
LoneHermit has quit [Ping timeout: 264 seconds]
<harfangk> if it works fine for you, then all is well
crameth has joined #ruby
jaiks has quit [Remote host closed the connection]
jaiks has joined #ruby
trampi has joined #ruby
tomphp has joined #ruby
jaiks has quit [Remote host closed the connection]
jaiks has joined #ruby
sandelius has joined #ruby
phil_r has joined #ruby
tomphp has quit [Client Quit]
sandelius has quit [Client Quit]
vuoto has quit [Quit: Lost terminal]
phil_r has quit [Quit: Leaving]
ec0 has joined #ruby
jphase has quit [Ping timeout: 248 seconds]
bobdobbs` has joined #ruby
rafadc has joined #ruby
gingray has joined #ruby
Pupeno has quit [Remote host closed the connection]
sandelius has joined #ruby
bobdobbs has quit [Ping timeout: 265 seconds]
vitd has joined #ruby
Pupeno has joined #ruby
jphase has joined #ruby
rafadc has quit [Ping timeout: 265 seconds]
ichkv1 has joined #ruby
ichkv has quit [Ping timeout: 244 seconds]
ec0 has quit [Ping timeout: 272 seconds]
nankyokusei has joined #ruby
workmad3 has quit [Ping timeout: 264 seconds]
<Novice201y> Could someone write me simple contoller that should be on https://devcenter.heroku.com/articles/getting-started-with-rails5 below "We will first create a controller called welcome for our home page to live:"? - I want to focus on something else now than Ruby code.
CharlieLo has joined #ruby
tomphp has joined #ruby
nankyokusei has quit [Ping timeout: 252 seconds]
<matthewd> Novice201y: The generator does that for you
madgen has quit [Ping timeout: 248 seconds]
jonyijoe has joined #ruby
jphase has quit [Ping timeout: 264 seconds]
CharlieLo has quit [Ping timeout: 264 seconds]
miqlas-H has joined #ruby
jphase has joined #ruby
sandelius has quit [Quit: Textual IRC Client: www.textualapp.com]
vitd has quit [Ping timeout: 244 seconds]
merlin2049er has quit [Quit: Leaving.]
merlin2049er has joined #ruby
RegulationD has joined #ruby
merlin2049er has quit [Client Quit]
jaguarmagenta has quit [Remote host closed the connection]
brendan- has joined #ruby
merlin2049er has joined #ruby
jaguarmagenta has joined #ruby
<zenspider> Novice201y: looks like a bug in the doco. I've filed some feedback
merlin2049er1 has joined #ruby
<miqlas-H> Hi Guys, any idea, what's wrong here? http://termbin.com/lnok
<zenspider> haiku as in the OS?
RegulationD has quit [Ping timeout: 272 seconds]
merlin2049er has quit [Ping timeout: 248 seconds]
jaguarmagenta has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
sameerynho has joined #ruby
<zenspider> I *love* it when someone wants help, has you pour over a thousand lines of output, and then doesn't answer basic questions.
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AlphaAtom has joined #ruby
<zenspider> aaand going to bed
lxsameer has quit [Ping timeout: 244 seconds]
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
NuckingFuts has quit [Ping timeout: 264 seconds]
ac07682 has joined #ruby
nuck has joined #ruby
nuck is now known as Guest32525
Hyuk has joined #ruby
ichkv1 has quit [Ping timeout: 265 seconds]
Pumukel has joined #ruby
<ac07682> Afternoon all
SpX has joined #ruby
workmad3 has joined #ruby
phoo1234567 has joined #ruby
jaguarmagenta has joined #ruby
lempa has quit [Ping timeout: 276 seconds]
lel has joined #ruby
Devalo has quit [Remote host closed the connection]
lel has quit [Client Quit]
faces has joined #ruby
lel has joined #ruby
tomphp has joined #ruby
Pumukel has quit [Ping timeout: 265 seconds]
<tty1> ac07682: good morning
face has quit [Ping timeout: 252 seconds]
<miqlas-H> zenspider: yep, it is on Haiku, in chroot
<miqlas-H> zenspider: sorry, i just had a talk with somebody, i haven't noticed your question.
yokel has quit [Ping timeout: 244 seconds]
genpaku has quit [Ping timeout: 276 seconds]
<miqlas-H> And i thought the line "checking build system type... i586-pc-haiku" should answer plenty question.
blackmesa has quit [Quit: WeeChat 1.5]
yokel has joined #ruby
genpaku has joined #ruby
Xing has joined #ruby
Xing has quit [Client Quit]
workmad3 has quit [Ping timeout: 244 seconds]
jaguarmagenta has quit [Remote host closed the connection]
Gasher has joined #ruby
jaguarmagenta has joined #ruby
pwnd_nsfw has joined #ruby
stamina has quit [Quit: WeeChat 1.5]
pwnd_nsfw` has quit [Ping timeout: 272 seconds]
Devalo has joined #ruby
claudiuinberlin has joined #ruby
agit0 has joined #ruby
CamonZ has joined #ruby
Devalo has quit [Remote host closed the connection]
Vile` has joined #ruby
<matthewd> miqlas-H: Well the obvious observation is that the openssl headers it's built against seem to differ from the library it's finding at runtime
<miqlas-H> oh, ok.
<miqlas-H> matthewd: the log made in chroot. outside of chroot i was able to compile ruby withut problems.
nipher_ has joined #ruby
nipher has quit [Read error: Connection reset by peer]
<miqlas-H> but in chroot i get the same problems all the time.
<miqlas-H> lemme show you my chroot settings.
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<miqlas-H> Here is it: http://termbin.com/3f7y
kanyewezt has joined #ruby
Vile` has quit [Ping timeout: 272 seconds]
<miqlas-H> So it puts the openssl_x86 (built with gcc5) into the chroot.
<matthewd> I suspect you'll do better in a Haiku channel, tbh
<miqlas-H> The problem is, haiku depends on openssl built against gcc2, so it puts automatically the gccp openssl in the chroot too.
<miqlas-H> maybe this is the problem...
jaiks has quit [Ping timeout: 252 seconds]
vitd has joined #ruby
jaguarmagenta has quit [Remote host closed the connection]
jaguarmagenta has joined #ruby
jmignault has joined #ruby
al2o3-cr has quit [Ping timeout: 244 seconds]
hahuang62 has joined #ruby
AlphaAtom has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Emmanuel_Chanel has quit [Ping timeout: 272 seconds]
Emmanuel_Chanel has joined #ruby
jaguarmagenta has quit [Remote host closed the connection]
wz520 has joined #ruby
last_staff has joined #ruby
jonyijoe has quit [Remote host closed the connection]
sdothum has joined #ruby
hahuang62 has quit [Ping timeout: 244 seconds]
jonyijoe has joined #ruby
arashb has joined #ruby
wz520 has quit [Client Quit]
wz520 has joined #ruby
jonyijoe has quit [Ping timeout: 265 seconds]
arashb has quit [Ping timeout: 272 seconds]
vitd has quit [Ping timeout: 252 seconds]
gizmore has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
gizless has quit [Ping timeout: 264 seconds]
jonyijoe has joined #ruby
biberu has joined #ruby
nikivi has joined #ruby
c355e3b has joined #ruby
LoneHermit has joined #ruby
wldcordeiro has quit [Ping timeout: 252 seconds]
Pumukel has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
LoneHermit has quit [Ping timeout: 264 seconds]
Pumukel has quit [Ping timeout: 252 seconds]
Devalo has joined #ruby
tk__ has joined #ruby
last_staff has quit [Quit: bbl]
Devalo has quit [Ping timeout: 265 seconds]
brendan- has joined #ruby
boogeyman has quit [Quit: bb]
nikivi has quit [Quit: irc]
Pupeno has quit [Remote host closed the connection]
ARCADIVS has quit [Quit: ARCADIVS]
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Guest43 has joined #ruby
craigp_ has quit [Quit: WeeChat 1.5]
nankyokusei has joined #ruby
dagda1 has joined #ruby
nankyokusei has quit [Ping timeout: 252 seconds]
despai has joined #ruby
dionysus69 has quit [Ping timeout: 272 seconds]
craigp has joined #ruby
<soahccc> When I let pry output a File.stat result it shows the string representation of the mode flags... Is this a pry feature? Because I can't seem to get this string any other way https://gist.github.com/2called-chaos/4a17ad38b68539e2c43434fbcdc370bd
vuoto has joined #ruby
moeabdol has joined #ruby
<hanmac> soahccc: you mean the rwx part? hm it works with pp too (pry probably use pp) so there should be a way to get it
dtscode has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
Xing has joined #ruby
Xing has quit [Max SendQ exceeded]
Novice201y has quit [Ping timeout: 240 seconds]
Xing has joined #ruby
Xing has quit [Max SendQ exceeded]
<hanmac> soahccc: i did look at the source. the mode flags are done in "pp" ... so there is no way other than doing itself too
Xing has joined #ruby
moeabdol1 has joined #ruby
<soahccc> hanmac: hmm that's a pitty but I guess I can just... borough that part =)
Xing has quit [Max SendQ exceeded]
<miqlas-H> bye
miqlas-H has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
Xing has joined #ruby
<hanmac> yeah, i don't think that this part has any copyright or something
boogeyman has joined #ruby
Xing has quit [Max SendQ exceeded]
ac07682 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
moeabdol has quit [Ping timeout: 252 seconds]
Xing has joined #ruby
Xing has quit [Max SendQ exceeded]
Xing has joined #ruby
ponga has joined #ruby
ahenne has joined #ruby
<ahenne> i'm trying to send a post request to make a deletion with the data-method delete attribute on a site but i'm getting a 500 error
<soahccc> ahenne: Then check the logs :)
<Papierkorb> ?crosspost ahenne
<Papierkorb> damn bot
sp_ has joined #ruby
<Papierkorb> ahenne: Please, if you have to cross post a question, make it clear that you did, and where else you have posted the question. Otherwise this is considered rude.
<ahenne> soahccc: basically i would like to make an extension that deletes posts automatically instead of you clicking on the delete button
Pumukel has joined #ruby
Xing has quit [Client Quit]
devmagpie has joined #ruby
Xing has joined #ruby
<soahccc> ahenne: as I said, check the logs, my suspicion is that you miss the csrf token or something
vitd has joined #ruby
Xing has quit [Max SendQ exceeded]
Xing has joined #ruby
<ahenne> soahccc: thanks i don't know how to check the logs but i get error messages in chrome and i am not the owner of the site or servers
loechel has joined #ruby
vuoto has quit [Quit: Lost terminal]
jenrzzz has joined #ruby
<soahccc> ahenne: then we can't help you. it could literally be anything
Pumukel has quit [Ping timeout: 252 seconds]
<ahenne> so i read this https://cloudunder.io/blog/csrf-token/ and i don't see any tokens in the html
<ahenne> i just see data-method delete
Pumukel has joined #ruby
sp_ has quit [Ping timeout: 248 seconds]
dionysus69 has joined #ruby
leangjia has joined #ruby
claw has quit [Read error: Connection reset by peer]
loechel has quit [Ping timeout: 265 seconds]
pawnbox has quit [Remote host closed the connection]
moeabdol1 has quit [Ping timeout: 264 seconds]
pawnbox has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
claw has joined #ruby
Pumukel has quit [Ping timeout: 265 seconds]
LoneHerm_ has joined #ruby
Devalo has joined #ruby
tmpm has joined #ruby
peteykun has joined #ruby
pawnbox has quit [Remote host closed the connection]
LoneHerm_ has quit [Ping timeout: 264 seconds]
Pumukel has joined #ruby
dviola has joined #ruby
hutch34 has joined #ruby
vitd has quit [Ping timeout: 248 seconds]
Satyajit has quit [Quit: https://fnordserver.eu]
tmpm has quit [Remote host closed the connection]
j3ll3 has joined #ruby
wz520 has quit []
blackwind_123 has quit [Ping timeout: 244 seconds]
Pumukel has quit [Ping timeout: 252 seconds]
lucasb_ has joined #ruby
Pumukel has joined #ruby
despai has quit [Quit: This computer has gone to sleep]
blackwind_123 has joined #ruby
rafadc has joined #ruby
despai has joined #ruby
Pumukel has quit [Ping timeout: 265 seconds]
ahenne has quit [Quit: Page closed]
prawnzy has joined #ruby
Pumukel has joined #ruby
rafadc has quit [Ping timeout: 252 seconds]
<_sfiguser> which are the applications of "eval" ?
loechel has joined #ruby
cibs has quit [Ping timeout: 268 seconds]
prawnzy has quit [Ping timeout: 244 seconds]
cibs has joined #ruby
last_staff has joined #ruby
last_staff has quit [Excess Flood]
Pumukel_ has joined #ruby
Pumukel has quit [Ping timeout: 252 seconds]
last_staff has joined #ruby
Pumukel has joined #ruby
Hyuk has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
zeroDi has joined #ruby
j3ll3 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
tvw has joined #ruby
loechel has quit [Ping timeout: 252 seconds]
Hyuk has joined #ruby
rose has joined #ruby
Pumukel_ has quit [Ping timeout: 252 seconds]
<rose> I've installed gtk3 gem, but when I run ruby -e "require 'gtk3'", I have the output: (null)-WARNING **:Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
AlphaAtom has joined #ruby
vuoto has joined #ruby
binaryplease has joined #ruby
rose__ has joined #ruby
bluOxigen has joined #ruby
Xing has quit [Quit: Leaving]
<hanmac> !fixcon Pumukel
rose has quit [Ping timeout: 248 seconds]
<hanmac> rose: that warning is normal, other (system installed) gtk applications from me does show that too
jaguarmagenta has joined #ruby
sp_ has joined #ruby
bigkevmcd has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Vile` has joined #ruby
jaguarmagenta has quit [Ping timeout: 272 seconds]
sp_ has quit [Ping timeout: 264 seconds]
nipher_ has quit [Quit: leaving]
harfangk has quit [Quit: Textual IRC Client: www.textualapp.com]
elastix has joined #ruby
banisterfiend has joined #ruby
devmagpie has quit [Quit: watching "Narcos"]
CHoltk has joined #ruby
Pupeno has joined #ruby
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
vuoto has quit [Remote host closed the connection]
vitd has joined #ruby
banisterfiend has joined #ruby
Devalo has quit [Remote host closed the connection]
thbar has joined #ruby
Novice201y has joined #ruby
<Novice201y> Hello. Do I need ruby to run rvm?
Pupeno has quit [Remote host closed the connection]
Devalo has joined #ruby
despai has quit [Read error: Connection reset by peer]
peteykun has quit [Quit: Leaving]
thbar_ has joined #ruby
despai has joined #ruby
bsrd has joined #ruby
sp_ has joined #ruby
thbar has quit [Ping timeout: 240 seconds]
kobain has joined #ruby
Devalo has quit [Ping timeout: 272 seconds]
despai has quit [Quit: This computer has gone to sleep]
Pupeno has joined #ruby
sp_ has quit [Ping timeout: 265 seconds]
bsrd has quit [Quit: WeeChat 1.5]
<Novice201y> Do i need ruby to run rvm, or can install ruby from rvm itself on new machine?
tk__ has quit [Quit: ばいばい]
conta has quit [Ping timeout: 272 seconds]
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Papierkorb> Novice201y: RVM is just a "ruby version manager". You can use anything you like to install ruby. Besides your distributions repository, there's also chruby, or rbenv
pawnbox has joined #ruby
<Novice201y> Papierkorb: NICE
<Papierkorb> And rvm also does some magic things to your shell, which is why I don't want to recommend using it anyway.
<Papierkorb> Novice201y: if you're using a distribution which believes in ancient package versions (Ubuntu, Debian, ...), then please use something like chruby with ruby-install - See http://ryanbigg.com/2014/10/ubuntu-ruby-ruby-install-chruby-and-you//
<Papierkorb> Novice201y: If you're using a distribution more on the bleeding-edge spectrum, like ArchLinux, you should be fine just installing ruby from the repository
vitd has quit [Ping timeout: 252 seconds]
<hanmac> i used rvm to build recent ruby-head stuff (good that it also rebuild my installed gems) ... but rvm is currently broken for my system :( (rubygems did broke rvm)
nankyokusei has joined #ruby
<Novice201y> Papierkorb, hanmac TU
nando293921 has joined #ruby
zacts has joined #ruby
nankyokusei has quit [Ping timeout: 265 seconds]
fmcgeough has quit [Quit: fmcgeough]
thbar_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dionysus70 has joined #ruby
dionysus69 has quit [Ping timeout: 265 seconds]
dionysus70 is now known as dionysus69
bkxd has quit [Ping timeout: 264 seconds]
stupidystupid has quit [Quit: Textual IRC Client: www.textualapp.com]
jphase has quit [Ping timeout: 252 seconds]
bauruine has joined #ruby
elastix has quit [Ping timeout: 264 seconds]
Oclair has joined #ruby
elastix has joined #ruby
Oclair_ has quit [Ping timeout: 272 seconds]
nankyokusei has joined #ruby
m_antis has quit [Ping timeout: 248 seconds]
gingray has quit [Ping timeout: 264 seconds]
sp_ has joined #ruby
dviola has quit [Quit: WeeChat 1.5]
nankyokusei has quit [Quit: nankyokusei]
dviola has joined #ruby
peteykun has joined #ruby
nobitanobi has joined #ruby
EOX has joined #ruby
Channel6 has joined #ruby
wldcordeiro has joined #ruby
despai has joined #ruby
<EOX> .
LoneHermit has joined #ruby
rose__ has quit [Read error: Connection reset by peer]
EOX has quit [Client Quit]
rose__ has joined #ruby
GodFather has joined #ruby
beauby has joined #ruby
cyphase has quit [Ping timeout: 265 seconds]
binaryplease has quit [Ping timeout: 248 seconds]
LoneHermit has quit [Ping timeout: 264 seconds]
tristanp has joined #ruby
tristanp has quit [Remote host closed the connection]
tristanp has joined #ruby
cyphase has joined #ruby
despai has quit [Read error: Connection reset by peer]
despai has joined #ruby
tcrypt has joined #ruby
craigp_ has joined #ruby
rafadc has joined #ruby
craigp has quit [Ping timeout: 272 seconds]
charliesome has joined #ruby
tcrypt has quit [Ping timeout: 264 seconds]
prawnzy has joined #ruby
PlasmaStar has quit [Ping timeout: 252 seconds]
vitd has joined #ruby
jphase has joined #ruby
rafadc has quit [Ping timeout: 265 seconds]
PlasmaStar has joined #ruby
banisterfiend has joined #ruby
prawnzy has quit [Ping timeout: 265 seconds]
nobitanobi has quit [Remote host closed the connection]
jphase has quit [Ping timeout: 264 seconds]
arashb has joined #ruby
banisterfiend has quit [Client Quit]
Jakey3 has joined #ruby
_sfiguser has quit [Ping timeout: 265 seconds]
Novice201y has quit [Ping timeout: 240 seconds]
arashb has quit [Ping timeout: 264 seconds]
jaguarmagenta has joined #ruby
crameth has quit [Quit: crameth]
jphase has joined #ruby
banisterfiend has joined #ruby
abernstein has joined #ruby
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pragmaticus has joined #ruby
nobitanobi has joined #ruby
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jphase has quit [Ping timeout: 272 seconds]
Rodya_ has joined #ruby
_sfiguser has joined #ruby
gizmore has quit [Quit: KVIrc 4.9.2 Aria http://www.kvirc.net/]
hahuang62 has joined #ruby
vitd has quit [Ping timeout: 248 seconds]
jphase has joined #ruby
rafadc has joined #ruby
hahuang62 has quit [Ping timeout: 248 seconds]
AlphaAtom has quit [Ping timeout: 265 seconds]
rafadc has quit [Ping timeout: 244 seconds]
jphase has quit [Ping timeout: 264 seconds]
<_sfiguser> i did a loop like "numbers.each do |x| ... end"
<_sfiguser> numbers is an array of numbers
<_sfiguser> how can i indicate the next element in numbers ?
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
lacour has joined #ruby
sameerynho has quit [Quit: WeeChat 1.5]
<_sfiguser> i mean is there a way in this kind of loop to refer to the next element
<_sfiguser> with respect to "x" ?
madgen has joined #ruby
<rose__> _sfiguser: numbers.each_with_index do |x, i| next_val = numbers[i + 1] end
jphase has joined #ruby
<apeiros> _sfiguser: depending on what you want to do, .each_cons(2) might also be useful.
xentity1x has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
<_sfiguser> ok thanks rose__
jaguarmagenta has quit [Remote host closed the connection]
LoneHerm_ has joined #ruby
Naz has quit [Ping timeout: 265 seconds]
beecushman has joined #ruby
<_sfiguser> how can i convert an array of strings into integers ?
daemonwrangler has joined #ruby
jphase has quit [Ping timeout: 264 seconds]
LoneHerm_ has quit [Ping timeout: 264 seconds]
jphase has joined #ruby
kanyewezt has quit [Ping timeout: 265 seconds]
nobitanobi has quit [Remote host closed the connection]
AlphaAtom has joined #ruby
claw has quit [Quit: No Ping reply in 180 seconds.]
<lacour> _sfiguser, ["1", "2", "3"].map(&:to_i) if that's what you mean
skweek has joined #ruby
Pupeno has quit [Remote host closed the connection]
claw has joined #ruby
thbar has joined #ruby
rafadc has joined #ruby
Pumukel has quit []
despai has quit [Read error: Connection reset by peer]
dtscode has joined #ruby
despai has joined #ruby
daemonwrangler-i has joined #ruby
drzel has joined #ruby
pawnbox has quit [Remote host closed the connection]
Naz has joined #ruby
jphase has quit [Ping timeout: 272 seconds]
daemonwrangler-i has quit [Client Quit]
jphase has joined #ruby
nofxx has joined #ruby
leangjia has left #ruby ["Leaving"]
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
tmtwd has joined #ruby
User458764 has joined #ruby
thbar_ has joined #ruby
Hyuk has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
workmad3 has joined #ruby
jphase has quit [Ping timeout: 264 seconds]
thbar has quit [Ping timeout: 240 seconds]
nankyokusei has joined #ruby
jphase has joined #ruby
<_sfiguser> guys i'm trying to implement a bubble sort as an exercise...
<_sfiguser> i did this... https://bpaste.net/show/f1edba1c1365
aryaching has joined #ruby
<_sfiguser> what's wrong ?
jaguarmagenta has joined #ruby
<_sfiguser> i don't understand why it's wrong
User458764 has quit [Remote host closed the connection]
CharlieLo has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nankyokusei has quit [Ping timeout: 248 seconds]
<lucasb_> _sfiguser: do this numbers.map(&:to_i)
<lucasb_> oops
<lucasb_> numbers = numbers.map(&:to_i)
<lucasb_> or...
<lucasb_> numbers.map!(&:to_i)
<lucasb_> otherwise you are not changing the array
AlphaAtom has quit [Ping timeout: 265 seconds]
tomphp has joined #ruby
Pupeno has joined #ruby
Pupeno has quit [Changing host]
Pupeno has joined #ruby
thbar_ has quit [Quit: Textual IRC Client: www.textualapp.com]
beauby has quit [Read error: Connection reset by peer]
CharlieLo has quit [Ping timeout: 248 seconds]
_srose_ has joined #ruby
<_sfiguser> which is the fastest way to do a loop until the numbers.length -1 ?
tomphp has quit [Client Quit]
Uranio has joined #ruby
workmad3 has quit [Ping timeout: 264 seconds]
rose__ has quit [Ping timeout: 252 seconds]
beauby has joined #ruby
Uranio has left #ruby [#ruby]
<lucasb_> _sfiguser: maybe (0..(numbers.length-1)).each ...
pawnbox has joined #ruby
<lucasb_> also, numbers.length.times do |i| ..., but this is not very clear
j3ll3 has joined #ruby
zeroDi has quit [Ping timeout: 244 seconds]
<apeiros> numbers.length.times
<apeiros> ah, already said
<apeiros> I find it very clear
Satyajit has joined #ruby
dtscode has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<_sfiguser> apeiros, what's wrong with my algorithm ?
dhk has joined #ruby
<lucasb_> the indentation :D
<lucasb_> use 2 spaces always. will be easier for others to read your code and help you
<matthewd> _sfiguser: How is its behaviour differing from what you expect?
<_sfiguser> lucasb_, i'm using two spaces...
<_sfiguser> but when pasting it changes indentation
<apeiros> I guess you use hard-tabs
vdamewood has joined #ruby
nadir has joined #ruby
jphase has quit [Ping timeout: 265 seconds]
rippa has quit [Ping timeout: 264 seconds]
<_sfiguser> apeiros, what are hard tabs ?
Pupeno has quit [Remote host closed the connection]
<lucasb_> >> puts "\t".ord
<_sfiguser> lucasb_, i don't understand your answer
<_sfiguser> sorry
AlphaAtom has joined #ruby
<lucasb_> _sfiguser: it's ok. a hard tab is a character, different from space. don't worry, it's not important. you'll get the details with time and practice
despai has quit [Read error: Connection reset by peer]
elifoster has joined #ruby
zeroDi has joined #ruby
j3ll3 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
despai has joined #ruby
shinnya has quit [Ping timeout: 244 seconds]
<_sfiguser> lucasb_, thanks... do you suggest to use spaced tabs ?
<_sfiguser> i mean tabs composed by spaces ?
jphase has joined #ruby
<lucasb_> _sfiguser: it's better to have a properly configured text editor. but if that's not possible, you can always press the space bar 2 times
dhk has quit [Quit: Leaving]
charliesome has joined #ruby
<_sfiguser> lucasb_, i'm using vim
<_sfiguser> and i've set ts=2 and sw=2
<_sfiguser> for ruby files
<lucasb_> :set et
<lucasb_> expandtab
AngrySpam98 has joined #ruby
LoneHermit has joined #ruby
<AngrySpam98> what is the point of ruby tho
harai has joined #ruby
<_sfiguser> ok lucasb_
<_sfiguser> i'll try
CHoltk has quit [Ping timeout: 272 seconds]
Hyuk has joined #ruby
j3ll3 has joined #ruby
Alayde has joined #ruby
LoneHermit has quit [Ping timeout: 244 seconds]
daemonwrangler has quit [Quit: ZNC 1.6.3+deb1+jessie0 - http://znc.in]
djbkd has joined #ruby
daemonwrangler has joined #ruby
djbkd has quit [Remote host closed the connection]
armyriad has quit [Quit: Leaving]
rafadc has quit [Ping timeout: 272 seconds]
armyriad has joined #ruby
jphase has quit [Ping timeout: 265 seconds]
lucast has joined #ruby
daemonwrangler has quit [Client Quit]
daemonwrangler has joined #ruby
Alayde has quit [Ping timeout: 272 seconds]
skweek has quit [Ping timeout: 248 seconds]
ponga has quit [Quit: Connection closed for inactivity]
hk238 has quit [Quit: http://www.kvirc.net/ 4.9.2 Aria]
jphase has joined #ruby
rafadc has joined #ruby
despai has quit [Read error: Connection reset by peer]
beauby has quit [Read error: Connection reset by peer]
beauby has joined #ruby
despai has joined #ruby
symm- has joined #ruby
prawnzy has joined #ruby
erlingur has quit [Ping timeout: 272 seconds]
<_sfiguser> hello in block of codes if i don't define how to call the variable inside the block as |x| does it get a default name ? which ?
cyphase has quit [Ping timeout: 252 seconds]
madgen has quit [Ping timeout: 248 seconds]
prawnzy has quit [Ping timeout: 272 seconds]
beauby has quit [Read error: Connection reset by peer]
LambdaSix has quit [Ping timeout: 264 seconds]
<baweaver> There is no default name.
<baweaver> _sfiguser: You might want to consider investing in a ruby book.
<_sfiguser> baweaver, yeah i read "beginning ruby" but didn't do enough exercises.
beauby has joined #ruby
madgen has joined #ruby
CloCkWeRX has quit [Quit: Leaving.]
rafadc has quit [Ping timeout: 252 seconds]
phoo1234567 has quit [Quit: Gotta go]
d34th4ck3r has quit [Quit: d34th4ck3r]
despai has quit [Read error: Connection reset by peer]
LambdaSix has joined #ruby
despai has joined #ruby
sp_ has quit [Ping timeout: 265 seconds]
Hyuk has quit [Quit: Textual IRC Client: www.textualapp.com]
<tty1> Hey, is there a way for me to load a library dynamically.. In other words a user types in the name of some module name, and my program will pass that to require to load the module and then call methods (the names of the methods are predefined) within that module?
despai has quit [Client Quit]
<_srose_> Maybe load(filename) ?
<Papierkorb> _srose_: What's a "library"?
<_srose_> Papierkorb: tty1 asked, not me.
hahuang62 has joined #ruby
<Papierkorb> tty1: What's a "library"?
<Papierkorb> _srose_: ah sorry, both your nicks have the same color in my client Oo
xubunto has joined #ruby
capitainIsh has joined #ruby
despai has joined #ruby
catphish has joined #ruby
hahuang62 has quit [Ping timeout: 252 seconds]
nobitanobi has joined #ruby
<catphish> here's an interesting and confusing thing, File.stat returns a File::Stat which has blksize and blocks
<catphish> however, while the block size is correct, 4096, the "blocks" are actually in units of 512 bytes
<catphish> linux's stat command returns the same data, calling it calls it "blocks" and "io block"
jaguarmagenta has quit [Remote host closed the connection]
<tty1> Papierkorb: a gem that is installed somewhere
<tty1> Papierkorb: and thus can be loaded using require
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
<Papierkorb> tty1: Then `require`
kanyewezt has joined #ruby
<Papierkorb> tty1: #require is not a "magic" command in ruby, you can just call it at runtime and it'll happily load whatever path you tell it
despai has quit [Read error: Connection reset by peer]
R\w\C has joined #ruby
<tty1> Papierkorb: yea but after i call require how do i call stuff that is in the Module since I dnt know the name of the module before hand (only the name of the method)
despai has joined #ruby
<Papierkorb> tty1: Then you have to "guess" based on the name, e.g. by transforming something like "foo_bar" to "FooBar" (String#gsub is your friend), and then looking that up through Kernel#const_get
sp_ has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
<Papierkorb> tty1: After you have the Module itself, you can call methods on it
dionysus69 has quit [Ping timeout: 272 seconds]
despai has quit [Client Quit]
R\w\C has quit [Client Quit]
<tty1> Papierkorb: so basically the user has to provide both the name of the library (the argument passed to require) and the module name itself
beauby has quit [Read error: Connection reset by peer]
<elomatreb> tty1: Usually files (and their containing directories) containing modules/classes follow a naming convention
<tty1> Papierkorb: thats rather annoying, there has to be a better way
<Papierkorb> tty1: Yes, if the name of the library is not sufficient to exactly guess the module name based on it
<tty1> elomatreb: yes but it isnt garunteed
<tty1> Papierkorb: this is basically going to be a plugin framework for a larger app.. there has to be a better way to do this
<elomatreb> This is how Rails does it; so I'd assume there isn't a better way
<Papierkorb> tty1: Well, if you do it this way you can just force developers of those libraries to abide by this rule.
<Papierkorb> Document it and then enforce it
madgen has quit [Ping timeout: 244 seconds]
* elomatreb wonders if one could use ObjectSpace monitoring here?
<tty1> hmm actually i think i have an idea for a better approach
<tty1> maybe..
<Papierkorb> It's a perfectly reasonable thing to expect external developers to be able to read two lines of documentation saying "name the module properly or it will fail"
<Papierkorb> tty1: Every other option is much more magic and thus more prone to errors
<elomatreb> Or provide a mechanism that assumes the module name based on the file, but also allows the user to pass the module name if it differs
Guest43 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rodya_ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
<Papierkorb> tty1: You could of course use the `parser` gem to read the library source code and then guess which module could be the right one. That will quickly explode though. And this stuff will do two things: 1) Developers with brain will complain about this magic gimmicky stuff 2) Everyone else will be surprised that after a innocent code change the plugin doesn't work anymore
Jackneill has quit [Remote host closed the connection]
User458764 has joined #ruby
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
despai has joined #ruby
nando293921 has quit [Ping timeout: 272 seconds]
beauby has joined #ruby
dagda1_ has joined #ruby
Rodya_ has quit [Ping timeout: 248 seconds]
xubunto has left #ruby [#ruby]
jphase has quit [Ping timeout: 265 seconds]
vdamewood has quit [Quit: Life beckons.]
bluOxigen has quit [Ping timeout: 265 seconds]
<tty1> Papierkorb: i was thinking mroe along the lines of getting rid of the whole need for detecting the module name at all and instead they can writ ethe code in the root (outside of the module) and append the module to some shared array
boogeyman has quit [Quit: bb]
<Papierkorb> tty1: That sounds reasonable
tmtwd has quit [Ping timeout: 264 seconds]
cyphase_eviltwin has joined #ruby
User458764 has quit [Ping timeout: 248 seconds]
Devalo has joined #ruby
jphase has joined #ruby
Satyajit has quit [Quit: https://fnordserver.eu]
beauby has quit [Read error: Connection reset by peer]
despai has quit [Read error: Connection reset by peer]
drzel has quit [Quit: https://fnordserver.eu]
<tty1> Papierkorb: i just dont know how to pass something into a require block to ensure they can all write to the same array
Devalo has quit [Ping timeout: 252 seconds]
<Papierkorb> tty1: module Foo::Plugin; def self.register(mod); @modules << mod; end; end ... module MyCoolPlugin; ...; end; Foo::Plugin.register(MyCoolPlugin)
<Papierkorb> in the .register method you can then e.g. call some initialization handler in the plugins module, or notify other objects that there's a new plugin available
<tty1> hmm
<Papierkorb> That's basically like Roda or Sequel does it
DoubleMalt has joined #ruby
beauby has joined #ruby
skweek has joined #ruby
gingray has joined #ruby
JoshS has quit [Quit: Leaving]
tvw has quit [Remote host closed the connection]
nankyokusei has joined #ruby
despai has joined #ruby
tvw has joined #ruby
nankyokusei has quit [Ping timeout: 252 seconds]
magellanicloud has joined #ruby
nando293921 has joined #ruby
beauby has quit [Read error: Connection reset by peer]
beauby has joined #ruby
bsrd has joined #ruby
hutch34 has quit [Ping timeout: 264 seconds]
Silthias has quit [Ping timeout: 252 seconds]
Silthias has joined #ruby
User458764 has joined #ruby
boogeyman has joined #ruby
User458764 has quit [Ping timeout: 272 seconds]
tty1 has quit [Read error: Connection reset by peer]
bsrd has quit [Quit: WeeChat 1.5]
Channel6 has quit [Quit: Leaving]
tty1 has joined #ruby
vuoto has joined #ruby
Guest43 has joined #ruby
<_sfiguser> i wrote this bubblesort in ruby... can somebody tell me if i wrote some redundant code ? https://bpaste.net/show/aa1caf437e9d
redpants has joined #ruby
<_sfiguser> or i could do the for in a faster way ?
nobitanobi has quit [Remote host closed the connection]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
<zenspider> _sfiguser: it runs faster if you use spaces instead of tabs
jaguarmagenta has joined #ruby
vuoto has quit [Remote host closed the connection]
arashb has joined #ruby
<_sfiguser> zenspider, ok except for spaces...
<_sfiguser> i mean the code
<zenspider> I do too. I can't read it until the tabs are gone
<zenspider> they're blinding
<zenspider> bright orange
<lucasb_> for i in (1..numbers.length)
<lucasb_> for j in (0..numbers.length-1)
<lucasb_> this looks strange
<lucasb_> my sorting algorithm skills are rusty, but I don't think that's how you do bubble sort
<lucasb_> also: numbers[i].to_i < numbers[j].to_i; if you already converted all strings to ints previously, there's no need to call .to_i here
jenrzzz has quit [Ping timeout: 272 seconds]
jaguarmagenta has quit [Ping timeout: 272 seconds]
capitainIsh has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
AngrySpam98 has quit [Quit: Leaving]
dagda1_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
arashb has quit [Ping timeout: 248 seconds]
dagda1 has joined #ruby
marr has joined #ruby
pawnbox has quit [Remote host closed the connection]
Rodya_ has joined #ruby
nikivi has joined #ruby
<_sfiguser> lucasb_, i fixed the conversion thing...
<_sfiguser> i tried the algorithm and it works
ResidentBiscuit has joined #ruby
djbkd has joined #ruby
jphase has quit [Ping timeout: 265 seconds]
tty1 has quit [Ping timeout: 272 seconds]
peteykun has quit [Quit: Leaving]
prawnzy has joined #ruby
djbkd has quit [Ping timeout: 248 seconds]
ur5us has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
DoubleMalt has quit [Ping timeout: 248 seconds]
capitainIsh has joined #ruby
magellanicloud has quit [Quit: Leaving]
magellanicloud has joined #ruby
<baweaver> Also no one uses for loops in ruby
<baweaver> we use each
<baweaver> https://www.amazon.com/Eloquent-Ruby-Addison-Wesley-Professional/dp/0321584104 - Get a hold of this, you can find it used for about $8.
<lucasb_> _sfiguser: here, I did you homework: https://gist.github.com/anonymous/926f6bcc6e66c4f3a35d2702c26c4e9d
johnmilton has quit [Ping timeout: 272 seconds]
<lucasb_> probably I made some mistake... others may correct me
jphase has joined #ruby
gregf_ has quit [Ping timeout: 240 seconds]
<baweaver> https://github.com/bbatsov/ruby-style-guide - and also read that
teclator has quit [Ping timeout: 264 seconds]
erlingur has joined #ruby
nullsides has quit [Remote host closed the connection]
teclator has joined #ruby
nikivi has quit [Quit: irc]
stamina has joined #ruby
cyphase_eviltwin is now known as cyphase
elastix has quit [Quit: elastix]
cyphase has quit [Max SendQ exceeded]
Gasher has quit [Ping timeout: 265 seconds]
<_sfiguser> baweaver, ok how do i do with each then ?
cyphase has joined #ruby
<baweaver> I leave that as an exercise
<_sfiguser> in this case i couldn't figure out a more readable way with each
nullsides has joined #ruby
<_sfiguser> baweaver, i think in this case "times" fits better am i wrong ?
<baweaver> ...and how do you iterate from times?
beauby has quit [Read error: Connection reset by peer]
Dobler has joined #ruby
<_sfiguser> you mean how do i get the index ?
<_sfiguser> baweaver,
<baweaver> I'm not going to walk you through this
bkxd has joined #ruby
beauby has joined #ruby
futilegames has joined #ruby
redpants has quit [Quit: leaving]
hypercube32 has joined #ruby
sp_ has quit [Ping timeout: 264 seconds]
jcao219 has joined #ruby
j3ll3 has quit [Quit: Textual IRC Client: www.textualapp.com]
rodfersou has joined #ruby
hahuang62 has joined #ruby
hahuang62 has quit [Ping timeout: 248 seconds]
JoshS has joined #ruby
CamonZ has quit [Quit: Textual IRC Client: www.textualapp.com]
Gasher has joined #ruby
perniciouscaffei has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<catphish> does "for" just call each? or is it different?
Derperperd has quit [Quit: Derperperd]
jenrzzz has joined #ruby
NTrash has quit [Quit: Konversation terminated!]
NTrash has joined #ruby
banisterfiend has joined #ruby
johnmilton has joined #ruby
despai has quit [Quit: Leaving]
jenrzzz has quit [Ping timeout: 264 seconds]
Silthias has quit [Ping timeout: 252 seconds]
beauby has quit [Read error: Connection reset by peer]
dagda1 has quit [Quit: Textual IRC Client: www.textualapp.com]
LoneHerm_ has joined #ruby
wldcordeiro has quit [Ping timeout: 252 seconds]
Derperperd has joined #ruby
Rodya_ has quit [Quit: Leaving...]
modin has quit [Ping timeout: 265 seconds]
johnmilton has quit [Ping timeout: 265 seconds]
Dobler has quit [Quit: Textual IRC Client: www.textualapp.com]
johnmilton has joined #ruby
<lacour> catphish, `each` is more idiomatic: http://graysoftinc.com/early-steps/the-evils-of-the-for-loop
LoneHerm_ has quit [Ping timeout: 248 seconds]
ledestin has joined #ruby
beauby has joined #ruby
NTrash has quit [Quit: Konversation terminated!]
capitainIsh has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
Bellthoven has joined #ruby
modin has joined #ruby
NTrash has joined #ruby
jaguarmagenta has joined #ruby
Silthias has joined #ruby
<Jakey3> does anyone use chef here
LoneHerm_ has joined #ruby
<Jakey3> trying to do knife cookbook upload chef-ulimit
<Jakey3> i get ERROR: Could not find cookbook chef-ulimit in your cookbook path, skipping it
<Jakey3> but it's definitely there
<Jakey3> perhaps because there is a - in the name it doesnt work?
Devalo has joined #ruby
merlin2049er1 has quit [Quit: Leaving.]
Cohedrin_ has joined #ruby
merlin2049er has joined #ruby
beauby has quit [Read error: Connection reset by peer]
<lacour> Jakey3, not familiar with knife, but is the parent directory in your knife.rb cookbook_path?
<Jakey3> yes
Cohedrin has quit [Ping timeout: 272 seconds]
nikivi has joined #ruby
merlin2049er1 has joined #ruby
wldcordeiro has joined #ruby
<Jakey3> actually - is not an issue changed the name still the same issue
Pupeno has joined #ruby
johnny56 has quit [Ping timeout: 265 seconds]
Devalo has quit [Ping timeout: 265 seconds]
JakFrist[WVU] has joined #ruby
johnny56 has joined #ruby
Pupeno has quit [Remote host closed the connection]
erlingur has quit [Ping timeout: 244 seconds]
Pupeno has joined #ruby
merlin2049er has quit [Ping timeout: 264 seconds]
beauby has joined #ruby
dionysus69 has joined #ruby
Pupeno_ has joined #ruby
Snickers has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Jakey3> installing and configure Monit daemon to start and maintain an active ruby webserver daemon (puma or unicorn)
<Jakey3> how could i use https://github.com/poise/poise-monit with unicorn or puma?
Pupeno has quit [Read error: Connection reset by peer]
claudiuinberlin has quit []
nankyokusei has joined #ruby
devgiant has joined #ruby
devgiant has quit [Read error: Connection reset by peer]
wldcordeiro has quit [Ping timeout: 252 seconds]
jottr has joined #ruby
Bellthoven has quit []
CharlieLo has joined #ruby
Rutix has joined #ruby
Rutix has joined #ruby
Rutix has quit [Changing host]
LoneHerm_ has quit [Remote host closed the connection]
nankyokusei has quit [Ping timeout: 248 seconds]
beauby has quit [Read error: Connection reset by peer]
LoneHermit has joined #ruby
Vile` has quit [Ping timeout: 272 seconds]
futilegames has quit [Quit: futilegames]
workmad3 has joined #ruby
CharlieLo has quit [Ping timeout: 264 seconds]
sp_ has joined #ruby
beauby has joined #ruby
LoneHermit has quit [Ping timeout: 272 seconds]
Velizar has quit [Quit: Velizar]
nettoweb has joined #ruby
workmad3 has quit [Ping timeout: 272 seconds]
sp_ has quit [Ping timeout: 272 seconds]
wldcordeiro has joined #ruby
dviola has quit [Quit: WeeChat 1.5]
erlingur has joined #ruby
dviola has joined #ruby
twistedpixels has quit [Quit: ZNC - http://znc.in]
twistedpixels has joined #ruby
twistedpixels has quit [Changing host]
twistedpixels has joined #ruby
twistedpixels has quit [Remote host closed the connection]
bkxd has quit [Ping timeout: 252 seconds]
twistedpixels has joined #ruby
twistedpixels has quit [Changing host]
twistedpixels has joined #ruby
Cohedrin has joined #ruby
Velizar has joined #ruby
hahuang62 has joined #ruby
duderonomy has quit [Ping timeout: 244 seconds]
Cohedrin_ has quit [Ping timeout: 272 seconds]
nikivi has quit [Quit: irc]
beauby has quit [Read error: Connection reset by peer]
mr_foobar has joined #ruby
Pupeno_ has quit [Remote host closed the connection]
hahuang62 has quit [Ping timeout: 272 seconds]
nando293921 has quit [Ping timeout: 252 seconds]
beauby has joined #ruby
vdamewood has joined #ruby
dionysus69 has quit [Ping timeout: 272 seconds]
bkxd has joined #ruby
kanyewezt has quit [Remote host closed the connection]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
merlin2049er1 has quit [Quit: Leaving.]
JakFrist[WVU] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
merlin2049er has joined #ruby
NTrash has quit [Quit: Konversation terminated!]
NTrash has joined #ruby
lucasb_ has quit [Quit: leaving]
NTrash has quit [Client Quit]
NTrash has joined #ruby
beauby has quit [Read error: Connection reset by peer]
beauby has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
ctp has joined #ruby
tmpm_ has joined #ruby
perniciouscaffei has joined #ruby
elenatanasoiu has joined #ruby
bkxd has quit [Ping timeout: 264 seconds]
erlingur has quit [Ping timeout: 265 seconds]
Rodya_ has joined #ruby
elenatanasoiu has quit [Client Quit]
rakm has joined #ruby
beauby has quit [Read error: Connection reset by peer]
ec0 has joined #ruby
_srose__ has joined #ruby
erlingur has joined #ruby
_srose_ has quit [Ping timeout: 252 seconds]
tvw has quit []
NTrash has quit [Quit: Konversation terminated!]
beauby has joined #ruby
tmpm_ has quit [Remote host closed the connection]
beauby has quit [Read error: Connection reset by peer]
beauby has joined #ruby
duff has joined #ruby
<Radar> GOOD MORNING
moei has quit [Quit: Leaving...]
<duff> Is assembly your only option if you're trying to target a part of the cpu register and it's not yet support by the Ruby interpreter?
AlphaAtom has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
behemot has joined #ruby
<Radar> Ruby has C extensions which you could probably use for that purpose.
beauby has quit [Read error: Connection reset by peer]
sp_ has joined #ruby
<duff> I've been using GO for the performance parts and ruby for less important parts
madgen has joined #ruby
magellanicloud has quit [Ping timeout: 248 seconds]
gingray has quit [Ping timeout: 252 seconds]
vdamewood has quit [Quit: Life beckons.]
RegulationD has joined #ruby
stamina has quit [Ping timeout: 265 seconds]
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sp_ has quit [Ping timeout: 248 seconds]
beauby has joined #ruby
nando293921 has joined #ruby
duff has left #ruby [#ruby]
RegulationD has quit [Ping timeout: 264 seconds]
gusrub has quit [Quit: Leaving]
Channel6 has joined #ruby
visor has joined #ruby
JoshS has quit [Ping timeout: 272 seconds]
JoshS has joined #ruby
Rodya_ has quit [Remote host closed the connection]
beauby has quit [Read error: Connection reset by peer]
Azure has quit [Ping timeout: 272 seconds]
biberu has quit []
nando293921 has quit [Ping timeout: 248 seconds]
JoshS has quit [Client Quit]
JoshS has joined #ruby
ICantCook has joined #ruby
beauby has joined #ruby
merlin2049er has quit [Quit: Leaving.]
jottr_ has joined #ruby
jottr has quit [Read error: Connection reset by peer]
merlin2049er has joined #ruby
LoneHerm_ has joined #ruby
shinnya has joined #ruby
<Papierkorb> Radar: OOOOHHHAAAYYYOOOO
behemot has quit [Ping timeout: 244 seconds]
daffy_duck_2 has joined #ruby
ec0 has quit [Ping timeout: 272 seconds]
jshjsh has joined #ruby
polkovnik has quit [Ping timeout: 264 seconds]
jackjackdripper has joined #ruby
djbkd has joined #ruby
UserJosh has joined #ruby
Bellthoven has joined #ruby
JoshS has quit [Ping timeout: 264 seconds]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jshjsh has quit [Ping timeout: 244 seconds]
duncannz has joined #ruby
duncannz has quit [Max SendQ exceeded]
idgimg has joined #ruby
djbkd has quit [Ping timeout: 265 seconds]
duncannz has joined #ruby
Hobogrammer has quit [Quit: WeeChat 0.4.2]
duncannz has quit [Max SendQ exceeded]
lightstalker has quit [Ping timeout: 250 seconds]
hahuang62 has joined #ruby
moeabdol1 has joined #ruby
UserJosh is now known as JoshS
beauby has quit [Read error: Connection reset by peer]
beauby has joined #ruby
Burgestrand has joined #ruby
hahuang62 has quit [Ping timeout: 265 seconds]
Bellthoven has quit []
urbanmonk has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
jaguarmagenta has quit [Remote host closed the connection]
duncannz has joined #ruby
duncannz has quit [Max SendQ exceeded]
jaguarmagenta has joined #ruby
alaibe has quit [Ping timeout: 248 seconds]
duncannz has joined #ruby
last_staff has quit [Quit: goes moo moo]
urbanmonk has quit [Ping timeout: 252 seconds]
moeabdol1 has quit [Ping timeout: 264 seconds]
jaguarmagenta has quit [Ping timeout: 244 seconds]
nankyokusei has joined #ruby
Rodya_ has joined #ruby
nando293921 has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nankyokusei has quit [Ping timeout: 244 seconds]
nando294021 has joined #ruby
jaguarmagenta has joined #ruby
sp_ has joined #ruby
RegulationD has joined #ruby
beauby has quit [Read error: Connection reset by peer]
charliesome has joined #ruby
urbanmonk has joined #ruby
sp_ has quit [Ping timeout: 264 seconds]
jcao219 has quit [Ping timeout: 244 seconds]
RegulationD has quit [Ping timeout: 252 seconds]
jackjackdripper has quit [Quit: Leaving.]
beauby has joined #ruby
lightstalker has joined #ruby
beauby has quit [Read error: Connection reset by peer]
johnmilton has quit [Ping timeout: 248 seconds]
<_sfiguser> guys what is a smart way of executing the for loops in this algorithm ? https://bpaste.net/show/39e55f87dbfb
<_sfiguser> i want to use each
<_sfiguser> or i know i should use each
LoneHerm_ has joined #ruby
Pupeno has joined #ruby
<Radar> _sfiguser: what is the input + output of that algorithm?
beauby has joined #ruby
Yzguy has joined #ruby
<_sfiguser> input is an array of numbers
<_sfiguser> it's a bubblesort
<_sfiguser> sorting algorithm
<Radar> What's wrong with
<Radar> >> [3,2,1].sort
<ruby[bot]> Radar: # => [1, 2, 3] (https://eval.in/653864)
<Radar> And to answer your question...
<Radar> 1.upto(n) do |i|
erlingur has quit [Ping timeout: 272 seconds]
Pupeno has quit [Ping timeout: 265 seconds]
sp_ has joined #ruby
urbanmonk has quit [Ping timeout: 272 seconds]
Guest43 has quit [Quit: Textual IRC Client: www.textualapp.com]
jarred has joined #ruby
jenrzzz has joined #ruby
<_sfiguser> Radar, it's just an exercise
ctp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Bellthoven has joined #ruby
jphase has quit [Ping timeout: 265 seconds]
JakFrist[WVU] has joined #ruby
pabloh has joined #ruby
ctp has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
madgen has quit [Ping timeout: 272 seconds]
jenrzzz has quit [Ping timeout: 248 seconds]
zel has joined #ruby
roflmyeggo has joined #ruby
zel is now known as Guest22909
tragique has joined #ruby
<_sfiguser> Radar, ok so in this case i should not use each but upto ?
<Radar> _sfiguser: upto is just a shorter syntax
<Radar> You could do (1..n).each do |i|
Derperperd has quit [Quit: Derperperd]
Azure has joined #ruby
<_sfiguser> ok thanks Radar
ctp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
beauby has quit [Read error: Connection reset by peer]
cmrussell has joined #ruby
Derperperd has joined #ruby
pragmaticus has quit [Ping timeout: 265 seconds]
koooge has joined #ruby
beauby has joined #ruby
jphase has joined #ruby
mlefevers has joined #ruby
helpa has quit [Remote host closed the connection]
crixet has joined #ruby
helpa has joined #ruby
<crixet> test
<crixet> hey all
<Radar> hi
Not-Zee has joined #ruby
<Not-Zee> 1
<Not-Zee> 2
<Not-Zee> 3
<Not-Zee> 4
<Not-Zee> 5
<Not-Zee> 6
<Not-Zee> 7
<Not-Zee> 8
<Not-Zee> 9
<Not-Zee> 10
<Not-Zee> 11
<Not-Zee> hm
Not-Zee has quit [Client Quit]
<mr_foobar> Not-Zee, we have loops for that
cmrussell has quit [Ping timeout: 252 seconds]
alaibe has joined #ruby
jphase has quit [Ping timeout: 265 seconds]
idgimg has quit [Quit: leaving]