havenwood changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.3.0; 2.2.4; 2.1.9: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || logs @ http://irclog.whitequark.org/ruby/
graphettion has joined #ruby
<Milos|Work> smathy, Ox0dea ok I updated rails from 4.1.4 to 4.2 which updated everything else to 4.2 but now I get
<Milos|Work> NoMethodError: undefined method `from_now' for 31255686:Fixnum
<Milos|Work> same line
<baweaver> Say I'm making a Ruby Daemon and I want to inject an init.d script on gem install. Should I just create the file from a template into /etc/init.d?
DannyR has quit [Remote host closed the connection]
<Milos|Work> due_at: rand(1.year).from_now
cdg has quit [Ping timeout: 276 seconds]
<Milos|Work> maybe it needs to be rand(1.year.from_now) ? even though it works on other versions
camilasan has quit [Ping timeout: 244 seconds]
pilne has left #ruby ["Leaving!"]
babblebre has quit [Quit: Connection closed for inactivity]
<Milos|Work> but if I do that then I get TypeError: no implicit conversion of ActiveSupport::TimeWithZone into Integer
tvw has quit [Ping timeout: 264 seconds]
<Milos|Work> which makes sense
BSab has quit [Ping timeout: 244 seconds]
<baweaver> thinking of making an install argument for it to optionally make it into a service
whathapp_ has quit [Quit: Leaving...]
marr has quit [Read error: Connection reset by peer]
d0nn1e has quit [Ping timeout: 244 seconds]
brt has quit [Ping timeout: 276 seconds]
bkxd has joined #ruby
d0nn1e has joined #ruby
Jonah11_ has joined #ruby
CloCkWeRX has joined #ruby
zacstewart has quit [Remote host closed the connection]
zacstewart has joined #ruby
benlieb has quit [Quit: benlieb]
jenrzzz_ has quit [Ping timeout: 244 seconds]
chosen1x has quit [Ping timeout: 250 seconds]
Authenticator has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
northrup has joined #ruby
bkxd has quit [Ping timeout: 244 seconds]
xcesariox has joined #ruby
Chagel has joined #ruby
Chunlea_ has joined #ruby
saneax is now known as saneax_AFK
Chunlea has quit [Ping timeout: 244 seconds]
charliesome has joined #ruby
<Ox0dea> baweaver: What's an install argument?
statelesscode has joined #ruby
<baweaver> gem install my_daemon
<baweaver> sudo my_daemon install_service
<baweaver> something like that.
DLSteve has left #ruby ["All rise, the honorable DLSteve has left the channel."]
<Ox0dea> I thought you knew of a way to determine the arguments with which `gem install` was invoked from within the Rakefile "extension".
<baweaver> na
<baweaver> running mostly blind here
<Ox0dea> That's how you'd stick something into /etc/ on install, at any rate.
<Ox0dea> The `spec.extensions = ['Rakefile']` trick, I mean.
<baweaver> I'll keep it in mind
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
kadoppe has joined #ruby
abyx has joined #ruby
william3 has joined #ruby
Jonah11_ has quit [Remote host closed the connection]
ur5us_ has quit [Remote host closed the connection]
kirillzh has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
kadoppe has quit [Ping timeout: 268 seconds]
william3 has quit [Ping timeout: 252 seconds]
KensoDev has joined #ruby
dfockler has quit [Quit: Leaving]
kadoppe has joined #ruby
abyx has quit [Quit: This computer has gone to sleep]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Jonah11_ has joined #ruby
jamesbrink has joined #ruby
<Authenticator> I'm using bundler and trying to vendor my deps but it tries to vendor my own gemfiles, recursively. What's wrong?
Jonah11_ has quit [Remote host closed the connection]
Jonah11_ has joined #ruby
curses has joined #ruby
GinoMan2440 has joined #ruby
BtcBen has joined #ruby
lkba_ has joined #ruby
rcvalle has quit [Quit: rcvalle]
curses has quit [Ping timeout: 276 seconds]
abyx has joined #ruby
chouhoulis has quit [Read error: Connection reset by peer]
chouhoulis has joined #ruby
lkba has quit [Ping timeout: 276 seconds]
Milos|Work has quit [Ping timeout: 244 seconds]
northrup has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
finisherr has quit [Quit: finisherr]
bronson has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
Jonah11_ has quit [Read error: Connection reset by peer]
Jonah11_ has joined #ruby
chouhoulis has quit [Ping timeout: 268 seconds]
kirillzh_ has joined #ruby
zacstewart has quit [Remote host closed the connection]
abyx has quit [Quit: This computer has gone to sleep]
Trynemjoel has quit [Ping timeout: 244 seconds]
kadoppe has quit [Ping timeout: 264 seconds]
bronson has quit [Ping timeout: 252 seconds]
kirillzh has quit [Ping timeout: 260 seconds]
Trynemjoel has joined #ruby
curses has joined #ruby
nando293921 has joined #ruby
scottschecter has joined #ruby
Trynemjoel has quit [Ping timeout: 264 seconds]
niftylettuce has quit [Quit: Connection closed for inactivity]
jt__ has quit [Remote host closed the connection]
Trynemjoel has joined #ruby
marktwo has quit [Quit: WeeChat 1.5-dev]
marktwo has joined #ruby
smathy is now known as smathy_afk
ur5us has joined #ruby
kadoppe has joined #ruby
ur5us has quit [Read error: Connection reset by peer]
ur5us_ has joined #ruby
Gasher has quit [Quit: Leaving]
GitGud has quit [Ping timeout: 268 seconds]
ekinmur has joined #ruby
Jonah11__ has joined #ruby
Jonah11__ has quit [Remote host closed the connection]
Jonah11_ has quit [Ping timeout: 268 seconds]
Jonah11_ has joined #ruby
kadoppe has quit [Ping timeout: 252 seconds]
Yiota has joined #ruby
Jonah11_ has quit [Ping timeout: 250 seconds]
terminalrecluse has joined #ruby
Jonah11_ has joined #ruby
swills has joined #ruby
kadoppe has joined #ruby
dcunit3d has joined #ruby
kirillzh_ has quit [Quit: Textual IRC Client: www.textualapp.com]
bokayio has joined #ruby
sp4rrow has joined #ruby
Denart_ has joined #ruby
sp4rrow has quit [Client Quit]
william3 has joined #ruby
kadoppe has quit [Ping timeout: 276 seconds]
dcunit3d has quit [Ping timeout: 268 seconds]
KensoDev has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<marktwo> /
<marktwo> /
<marktwo> /
william3 has quit [Ping timeout: 264 seconds]
Denart_ has quit [Quit: http://quassel-irc.org - ????????????? ??????. ?????.]
aegis3121 has quit [Ping timeout: 250 seconds]
<baweaver> marktwo: ?
<Ox0dea> baweaver: !
<baweaver> Ox0dea: ...
<Ox0dea> baweaver: ‽
<baweaver> Ox0dea: ¿
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Denart_ has joined #ruby
zacstewart has joined #ruby
* Ox0dea concedes before this gets outta hand.
<baweaver> yeah, was about to say the same
BtcBen has quit [Ping timeout: 244 seconds]
marktwo has quit [Quit: WeeChat 1.5-dev]
baweaver has quit [Remote host closed the connection]
brent__ has quit [Quit: Connection closed for inactivity]
baweaver has joined #ruby
lemur has joined #ruby
terminalrecluse has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lemur has quit [Ping timeout: 250 seconds]
kadoppe has joined #ruby
william3 has joined #ruby
blaxter has quit [Read error: Connection reset by peer]
frem has quit [Quit: Connection closed for inactivity]
dionysus69 has quit [Ping timeout: 276 seconds]
marktwo has joined #ruby
marktwo has quit [Client Quit]
kadoppe has quit [Ping timeout: 264 seconds]
Chagel has quit [Ping timeout: 252 seconds]
marktwo has joined #ruby
william3 has quit [Ping timeout: 260 seconds]
nprorepti has joined #ruby
Jonah11_ has quit [Ping timeout: 268 seconds]
Digpig has joined #ruby
Waqas has joined #ruby
A124 has quit [Read error: Connection reset by peer]
BtcBen has joined #ruby
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
LaT0rtue has quit [Ping timeout: 260 seconds]
Cohedrin has joined #ruby
aurum_infide has joined #ruby
smathy_afk is now known as smathy
A124 has joined #ruby
william3 has joined #ruby
xcesariox has quit [Quit: Textual IRC Client: www.textualapp.com]
Digpig has quit [Ping timeout: 268 seconds]
LaT0rtue has joined #ruby
IrishGringo has joined #ruby
william3 has quit [Ping timeout: 268 seconds]
godzillaenlacasa has quit [Quit: ZZZZZ....]
baweaver has quit [Remote host closed the connection]
Jonah11_ has joined #ruby
bkxd has joined #ruby
Waqas has quit [Ping timeout: 276 seconds]
User458764 has joined #ruby
Jonah11_ has quit [Remote host closed the connection]
pawnbox has quit [Ping timeout: 268 seconds]
cdg has joined #ruby
bkxd has quit [Ping timeout: 276 seconds]
workmad3 has joined #ruby
hxegon has joined #ruby
zzach has joined #ruby
arlek_ has joined #ruby
zzach1 has quit [Ping timeout: 264 seconds]
mustmodify__ has joined #ruby
Denart_ has quit [Remote host closed the connection]
smathy_ has joined #ruby
tristanp has joined #ruby
workmad3 has quit [Ping timeout: 252 seconds]
Pupeno has joined #ruby
tristanp_ has quit [Ping timeout: 252 seconds]
cout has quit [Ping timeout: 252 seconds]
Kharma has quit [Ping timeout: 252 seconds]
hxegon is now known as hxegon_AFK
cajone has quit [Ping timeout: 252 seconds]
mustmodify_ has quit [Ping timeout: 252 seconds]
woodruffw has quit [Ping timeout: 252 seconds]
smathy has quit [Ping timeout: 252 seconds]
arlek__ has quit [Ping timeout: 252 seconds]
brainslug has quit [Ping timeout: 252 seconds]
swills has quit [Ping timeout: 252 seconds]
ur5us_ has quit [Ping timeout: 252 seconds]
Authenticator has quit [Ping timeout: 252 seconds]
Synthead has quit [Ping timeout: 252 seconds]
malcolmva has quit [Ping timeout: 252 seconds]
kies has quit [Ping timeout: 252 seconds]
neanderslob has quit [Ping timeout: 252 seconds]
neanderslob has joined #ruby
neanderslob has quit [Read error: Connection reset by peer]
skweek has joined #ruby
claw has quit [Read error: Connection reset by peer]
Vile` has quit [Ping timeout: 260 seconds]
Pupeno has quit [Ping timeout: 268 seconds]
LoneHerm_ has joined #ruby
IrishGringo has quit [Ping timeout: 250 seconds]
william3 has joined #ruby
cout has joined #ruby
FooMunki has quit [Quit: FooMunki]
hxegon_AFK has quit [Quit: BRB]
ur5us has joined #ruby
swills has joined #ruby
tubuliferous has quit [Ping timeout: 264 seconds]
woodruffw has joined #ruby
woodruffw has quit [Excess Flood]
claw has joined #ruby
woodruffw has joined #ruby
hxegon has joined #ruby
LoneHerm_ has quit [Ping timeout: 276 seconds]
william3 has quit [Ping timeout: 260 seconds]
fedexo has joined #ruby
kies has joined #ruby
diegoaguilar has quit [Remote host closed the connection]
Chagel has joined #ruby
replay_ has quit []
jolts has joined #ruby
jolts has quit [Max SendQ exceeded]
bruno- has quit [Read error: Connection reset by peer]
malcolmva has joined #ruby
jolts has joined #ruby
jolts has quit [Max SendQ exceeded]
diegoaguilar has joined #ruby
Eiam_ has joined #ruby
RegulationD has joined #ruby
LaT0rtue has quit [Ping timeout: 260 seconds]
jolts has joined #ruby
jolts has quit [Max SendQ exceeded]
P_R_Deltoid has joined #ruby
hxegon is now known as hxegon_AFK
Channel6 has joined #ruby
rrichardsr3 has joined #ruby
jolts has joined #ruby
jolts has quit [Max SendQ exceeded]
hxegon_AFK is now known as hxegon
<P_R_Deltoid> I am trying to use Scan to create an array of all repeating digits (ie 110000011 would give ['11', '00000', '11']. I tried the regex pattern \d\1+ but I get an invalid backreference error and I am not sure what that means
Jonah11_ has joined #ruby
cajone has joined #ruby
<P_R_Deltoid> "invalid backref number/name: /\d\1+/"
statelesscode has quit [Quit: statelesscode]
RegulationD has quit [Ping timeout: 276 seconds]
sesquipe1 has quit [Quit: WeeChat 1.4]
<P_R_Deltoid> Trying with \d as a capture "/(\d)\1+/" prevents the error but the array basically compresses the results
jolts has joined #ruby
jolts has quit [Max SendQ exceeded]
sesquipedalian has joined #ruby
jolts has joined #ruby
jolts has quit [Max SendQ exceeded]
<Hobart> will rubygems.org pick up gem changes if the gem version hasn't been bumped? (re: https://bugs.ruby-lang.org/issues/12284 )
<Arcaire> if the gem changes the version gets bumped
<Arcaire> you can't push to the same version
kobain has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
jolts has joined #ruby
jolts has quit [Max SendQ exceeded]
djbkd has joined #ruby
bronson has joined #ruby
toretore has joined #ruby
noService has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
eljimmy has joined #ruby
<Ox0dea> P_R_Deltoid: The problem is that #scan returns all of the captures if its argument contains any.
<Ox0dea> You'll need to capture the \d (like you're doing) in order to refer to it, but then you've got to capture the run as well.
bronson has quit [Ping timeout: 260 seconds]
<Ox0dea> >> '11000011'.scan /((\d)\2*)/
bruno- has joined #ruby
<ruby[bot]> Ox0dea: # => [["11", "1"], ["0000", "0"], ["11", "1"]] (https://eval.in/553659)
<Ox0dea> Not quite what you want either, but there's no way to convince #scan to DWIM here.
noService has quit [Ping timeout: 244 seconds]
<P_R_Deltoid> I actually found an SO with that exact solution, but maps for &first
Channel6 has quit [Quit: Leaving]
<P_R_Deltoid> to remove the second values
<P_R_Deltoid> and turn it into a single dimension array
<P_R_Deltoid> so that works well enough
<Ox0dea> Yep, that'd do it.
devbug has quit [Quit: ZZZzzz…]
darkf has quit [Ping timeout: 276 seconds]
william3 has joined #ruby
hxegon has quit [Quit: BRB]
Jonah11_ has quit [Remote host closed the connection]
hxegon has joined #ruby
braincrash has quit [Quit: bye bye]
rrichardsr3 has quit [Ping timeout: 264 seconds]
kadoppe has joined #ruby
Jonah11_ has joined #ruby
william3 has quit [Ping timeout: 276 seconds]
andikr has joined #ruby
sesquipedalian has quit [Read error: Connection reset by peer]
bruno- has quit [Read error: Connection reset by peer]
<Ox0dea> Hobart: Not sure why Nobu didn't push the fix, but I imagine it's on his agenda.
bruno- has joined #ruby
<Ox0dea> Not sure if there's any special ceremony to do with gems that come bundled with Ruby itself.
darkf has joined #ruby
Madplatypus has joined #ruby
kadoppe has quit [Ping timeout: 260 seconds]
braincras has joined #ruby
ramfjord has quit [Ping timeout: 268 seconds]
ramfjord has joined #ruby
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hxegon has quit [Quit: BRB]
smathy_ is now known as smathy_afk
Authenticator has joined #ruby
anthony has joined #ruby
ta_ has joined #ruby
Synthead has joined #ruby
dopieee has joined #ruby
brainslug has joined #ruby
zacstewa_ has joined #ruby
freerobby1 has joined #ruby
Jonah11__ has joined #ruby
M-shine has quit [Ping timeout: 250 seconds]
knowtheory_ has joined #ruby
Chagel has quit [Ping timeout: 276 seconds]
tristanp_ has joined #ruby
Kharma has joined #ruby
curses_ has joined #ruby
arlek__ has joined #ruby
Coldblackice has joined #ruby
coyo has quit [Ping timeout: 250 seconds]
yaewa has joined #ruby
arlek_ has quit [Ping timeout: 250 seconds]
diegoaguilar has quit [Remote host closed the connection]
nodejunkie has joined #ruby
mustmodify__ has quit [Ping timeout: 250 seconds]
Jonah1___ has joined #ruby
err_ok_ has joined #ruby
bry4n has joined #ruby
coyo has joined #ruby
Muz_ has joined #ruby
sulky__ has joined #ruby
nando293921 has quit [Ping timeout: 250 seconds]
charliesome has quit [Ping timeout: 250 seconds]
Chagel has joined #ruby
Jonah11__ has quit [Ping timeout: 250 seconds]
Chunlea_ has quit [Ping timeout: 250 seconds]
devbug has joined #ruby
charliesome has joined #ruby
fedexo_ has joined #ruby
Chunlea_ has joined #ruby
Trynemjoel has quit [Ping timeout: 244 seconds]
nando293921 has joined #ruby
M-shine has joined #ruby
spaceghost|work has joined #ruby
dopie_ has joined #ruby
marktwo has quit [Quit: WeeChat 1.5-dev]
mighty_gorilla has joined #ruby
Trynemjoel has joined #ruby
Lightsword_ has joined #ruby
coffeejunk has quit [Ping timeout: 250 seconds]
nullwarp_ has joined #ruby
coffeejunk has joined #ruby
braincras has quit [*.net *.split]
Madplatypus has quit [*.net *.split]
Jonah11_ has quit [*.net *.split]
toretore has quit [*.net *.split]
P_R_Deltoid has quit [*.net *.split]
fedexo has quit [*.net *.split]
ur5us has quit [*.net *.split]
tristanp has quit [*.net *.split]
zacstewart has quit [*.net *.split]
curses has quit [*.net *.split]
jamesbrink has quit [*.net *.split]
Ropeney has quit [*.net *.split]
patrick_star has quit [*.net *.split]
freerobby has quit [*.net *.split]
Outlastsheep has quit [*.net *.split]
dopie has quit [*.net *.split]
ta__ has quit [*.net *.split]
hollywood has quit [*.net *.split]
Muz has quit [*.net *.split]
JoL1hAHN has quit [*.net *.split]
hightower3 has quit [*.net *.split]
martinbjeldbak has quit [*.net *.split]
bry4n_ has quit [*.net *.split]
minimalism has quit [*.net *.split]
_blizzy_ has quit [*.net *.split]
ssiris has quit [*.net *.split]
moei has quit [*.net *.split]
barajasfab has quit [*.net *.split]
err_ok has quit [*.net *.split]
sulky has quit [*.net *.split]
nullwarp has quit [*.net *.split]
pipework has quit [*.net *.split]
Lightsword has quit [*.net *.split]
samuelkadolph has quit [*.net *.split]
Caelum has quit [*.net *.split]
[spoiler] has quit [*.net *.split]
ssm has quit [*.net *.split]
Coldblackice_ has quit [*.net *.split]
knowtheory has quit [*.net *.split]
ddv has quit [*.net *.split]
ctrlrsf has quit [*.net *.split]
nullwarp_ is now known as nullwarp
err_ok_ is now known as err_ok
Lightsword_ is now known as Lightsword
ghr has quit [Ping timeout: 250 seconds]
tubuliferous has joined #ruby
martinbjeldbak has joined #ruby
knowtheory_ is now known as knowtheory
ur5us has joined #ruby
P_R_Deltoid has joined #ruby
braincrash has joined #ruby
ramfjord has quit [Ping timeout: 244 seconds]
skweek has quit [Ping timeout: 260 seconds]
curses_ has quit [Ping timeout: 271 seconds]
rrichardsr3 has joined #ruby
samuelkadolph has joined #ruby
funnel has quit [Ping timeout: 260 seconds]
Jonah1___ has quit [Remote host closed the connection]
siaw has quit [Ping timeout: 250 seconds]
Guest69296 has quit [Ping timeout: 260 seconds]
theery has joined #ruby
tubuliferous has quit [Ping timeout: 244 seconds]
Jonah11_ has joined #ruby
freerobby1 has quit [Quit: Leaving.]
funnel has joined #ruby
siaw has joined #ruby
yfeldblum has quit [Remote host closed the connection]
Madplatypus has joined #ruby
toretore has joined #ruby
patrick_star has joined #ruby
[spoiler] has joined #ruby
jamesbrink has joined #ruby
GinoMan2440 has quit [Read error: Network is unreachable]
hightower3 has joined #ruby
minimalism has joined #ruby
CloCkWeRX has quit [Ping timeout: 264 seconds]
toretore has quit [Client Quit]
Caelum has joined #ruby
GinoMan2440 has joined #ruby
bruno- has quit [Ping timeout: 264 seconds]
barajasfab has joined #ruby
baweaver has joined #ruby
gix has quit [Ping timeout: 260 seconds]
ssiris has joined #ruby
JoL1hAHN has joined #ruby
ssm_ has joined #ruby
Guest83227 has joined #ruby
gix has joined #ruby
yfeldblum has joined #ruby
SilverKey has joined #ruby
noService has joined #ruby
<P_R_Deltoid> So now I am trying to make that scan function capture a variable amount of repeating characters, and I can't figure out how to use a variable inside of the expression
jdm has joined #ruby
<P_R_Deltoid> scan(/((\d)\#{timeunit}*)/)
<P_R_Deltoid> replacing the digit with my variable
<P_R_Deltoid> but that does not seem to work
devbug has quit [Ping timeout: 252 seconds]
Guest83227 has quit [Ping timeout: 250 seconds]
<Ox0dea> P_R_Deltoid: \x is a backreference; the x refers to a capture group, not the number of times to match.
garethrees has joined #ruby
<Ox0dea> You want /\d{x}/ or so.
<P_R_Deltoid> it has to be a repeating number though
<P_R_Deltoid> not just a certain amount
<Ox0dea> Backreferences and repetition specifiers can be combined.
<P_R_Deltoid> Is * the repetition specifier?
<Ox0dea> Oui.
Jonah11_ has quit [Ping timeout: 252 seconds]
<baweaver> Might be good to read through a regex tutorial or two
<baweaver> rubular.com will be handy for live testing them
<Ox0dea> P_R_Deltoid: + is "more than one", * is "any number", {x} is "exactly x", {m,} is "at least m", {,n} is "at most n", {m,n} is... have a guess.
ledestin has joined #ruby
garethrees has quit [Ping timeout: 250 seconds]
Yiota has joined #ruby
SilverKey has quit [Ping timeout: 252 seconds]
Ropeney has joined #ruby
<P_R_Deltoid> so if \1 isn't referring to the number of digits to capture, but instead to the capture group, why doesn't /(\d)\1+/ capture everything up until the digit changes? (ie. 1100011 => [11, 000, 11]) ?
<Ox0dea> For #scan?
garethrees has joined #ruby
<P_R_Deltoid> Yeah
<Ox0dea> That's already been addressed.
william3 has joined #ruby
maletor has joined #ruby
j2k has quit [Ping timeout: 244 seconds]
cdg has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
<shevy> cool, never saw that selection thingy before
c355e3b has quit [Quit: Connection closed for inactivity]
garethrees has quit [Ping timeout: 250 seconds]
william3 has quit [Ping timeout: 276 seconds]
j2k has joined #ruby
kareeoleez has joined #ruby
SilverKey has joined #ruby
garethrees has joined #ruby
smalltalker has joined #ruby
nando293921 has quit [Ping timeout: 276 seconds]
Jonah11_ has joined #ruby
toretore has joined #ruby
postmodern has quit [Quit: Leaving]
bkxd has joined #ruby
<P_R_Deltoid> I'm an idiot and internally talked myself in a confusing circle which caused me to ask the same question twice
<P_R_Deltoid> I apologize
<Ox0dea> All good. It's easy enough to see the source of your confusion.
<Ox0dea> I think #scan does the right thing and this is just one of the cases where it's slightly inconvenient.
ta_ has quit [Remote host closed the connection]
theery has quit [Remote host closed the connection]
<Ox0dea> There are such things as non-capturing groups, but then you can't reference them.
<Ox0dea> >> '1foo23bar4'.scan /\d(?:foo|bar)\d/
<ruby[bot]> Ox0dea: # => ["1foo2", "3bar4"] (https://eval.in/553667)
graphettion has quit [Ping timeout: 244 seconds]
troys_ has quit [Quit: Bye]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Guest69296 has joined #ruby
garethrees has quit [Ping timeout: 250 seconds]
Jonah11_ has quit [Ping timeout: 260 seconds]
bkxd has quit [Ping timeout: 252 seconds]
garethrees has joined #ruby
ddv has joined #ruby
Rickmasta has joined #ruby
ctrlrsf has joined #ruby
NikkGer has joined #ruby
<baweaver> !ban NikkGer
NikkGer was kicked from #ruby by ruby[bot] [bannable offense, see http://ruby-community.com/pages/user_rules]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
IrishGringo has joined #ruby
astrobunny has joined #ruby
ICantCook has quit [Quit: bye]
saneax_AFK is now known as saneax
pawnbox has joined #ruby
aurum_infide has quit [Ping timeout: 244 seconds]
CloCkWeRX has joined #ruby
tubuliferous has joined #ruby
Jonah11_ has joined #ruby
LoneHermit has joined #ruby
pawnbox has quit [Ping timeout: 250 seconds]
ramfjord has joined #ruby
amclain has quit [Quit: Leaving]
<Radar> !unban NikkGer
NG98 has joined #ruby
bruno- has joined #ruby
<NG98> what is a good book on ruby paradigms?
tubuliferous has quit [Ping timeout: 250 seconds]
<baweaver> Eloquent Ruby for syntax and other items, Practical Object Oriented Ruby for learning OO paradigms
ICantCook has joined #ruby
<NG98> thank you
<NG98> baweaver: is it this book? http://www.poodr.com/
<NG98> the title is slightly different
<baweaver> Design in, forgot that part
<baweaver> but yeah, POODR
<NG98> lol Poo Dr.
garethrees is now known as ghr
tjbiddle has joined #ruby
pawnbox has joined #ruby
IrishGringo has quit [Ping timeout: 252 seconds]
bruno- has quit [Ping timeout: 252 seconds]
<shevy> poodles and beavers!
<shevy> huh ban evasion NG98?
edwinvdgraaf has joined #ruby
<Radar> shevy: neg. Mistaken identity.
<Ox0dea> It's not, though.
<NG98> thanks for all the help everyone :)
NG98 has left #ruby [#ruby]
astrobun_ has joined #ruby
edwinvdgraaf has quit [Ping timeout: 268 seconds]
shadoi has quit [Quit: Leaving.]
Eiam_ has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
astrobunny has quit [Ping timeout: 264 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
Jonah11_ has quit [Ping timeout: 250 seconds]
diegoviola has quit [Quit: WeeChat 1.4]
wolffles has joined #ruby
maletor has joined #ruby
pawnbox_ has joined #ruby
pawnbox has quit [Ping timeout: 264 seconds]
pawnbox_ has quit [Remote host closed the connection]
hxegon has joined #ruby
agent_white has joined #ruby
bronson has joined #ruby
<wolffles> :”+” => :+ how to x = “+” ; :+x => :+
<wolffles> idk if that makes sense
<agent_white> Evenin'
<Ox0dea> &ri #to_sym wolffles
<Ox0dea> You can also use interpolation :"{in here}".
<wolffles> ah i see
jdm has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 252 seconds]
Jonah11_ has joined #ruby
benlieb has joined #ruby
Sammichmaker has joined #ruby
pawnbox has joined #ruby
jdm has joined #ruby
Devalo has joined #ruby
IrishGringo has joined #ruby
ta_ has joined #ruby
pawnbox has quit [Remote host closed the connection]
noodle has quit [Quit: /quit]
<P_R_Deltoid> >> ' '.split(' ')
<ruby[bot]> P_R_Deltoid: # => [] (https://eval.in/553690)
<P_R_Deltoid> Dang it
curses has joined #ruby
pawnbox has joined #ruby
curses has quit [Remote host closed the connection]
<baweaver> >> ' '.scan(/ /)
<ruby[bot]> baweaver: # => [" ", " ", " "] (https://eval.in/553691)
<Ox0dea> P_R_Deltoid: http://i.imgur.com/i9Z4egW.gif
<P_R_Deltoid> haha
<P_R_Deltoid> I was seeing if it would give me two entries in an array with spaces in them
<P_R_Deltoid> :p
<P_R_Deltoid> Kinda like what baweaver did there
<baweaver> >> ' '.scan(/ /).size
<ruby[bot]> baweaver: # => 3 (https://eval.in/553692)
<P_R_Deltoid> >> '.. . ..'.scan(/ /)
<baweaver> >> ' '.scan(/ /).size == 2
<ruby[bot]> P_R_Deltoid: # => [" ", " ", " "] (https://eval.in/553693)
<P_R_Deltoid> hmm
<P_R_Deltoid> okay
<P_R_Deltoid> yeah, can't do that. There are other values in there
<ruby[bot]> baweaver: # => false (https://eval.in/553694)
william3 has joined #ruby
free_beard has joined #ruby
ta_ has quit [Ping timeout: 268 seconds]
noodle has joined #ruby
pawnbox has quit [Ping timeout: 276 seconds]
<free_beard> hi guys, I'm trying to start a rails app through uwsgi. I installed uwsgi with gem install uwsgi, but when trying to use the binary, I get - No such file or directory - /usr/local/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/uwsgi-2.0.12/ext/uwsgi/uwsgi.ruby
pawnbox has joined #ruby
<free_beard> I suppose needles to say I'm using 2.3.0 and rbenv
<free_beard> I can't tell why it's missing or why it would be needed. please be gentle, as I'm not actually fluent in ruby, I'm just trying to deploy an existing app
Jonah11_ has quit [Read error: Connection reset by peer]
Jonah11_ has joined #ruby
william3 has quit [Ping timeout: 276 seconds]
Chagel has quit [Ping timeout: 264 seconds]
<Ox0dea> That's the script that seems to put that file in place; it must not've gotten run during installation.
jt__ has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
kareeoleez has quit [Remote host closed the connection]
<free_beard> Ox0dea: that makes sense, thanks. It's strange that running RBENV_VERSION=2.3.0 gem install uwsgi wouldn't put that file in place
kadoppe has joined #ruby
pawnbox_ has joined #ruby
pawnbox has quit [Ping timeout: 264 seconds]
hakunin_ has quit [Read error: Connection reset by peer]
sauvin has joined #ruby
Jonah11__ has joined #ruby
<Ox0dea> free_beard: Well, there's no associated gemspec, which is pretty weird. That's where you tend specify that extconf.rb should be run during installation.
theery has joined #ruby
hakunin has joined #ruby
smathy_afk has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sp4rrow has joined #ruby
madgen has joined #ruby
<Ox0dea> Er, scratch that. It's there in the root of the repo, they just didn't package it up with the gem.
Jonah11_ has quit [Ping timeout: 268 seconds]
zast has quit [Remote host closed the connection]
pawnbox has joined #ruby
devbug has joined #ruby
rrichardsr3 has quit [Quit: Apparantly my attempt to stay awake has failed...]
theery has quit [Ping timeout: 250 seconds]
stannard_ has joined #ruby
pawnbox_ has quit [Ping timeout: 252 seconds]
agentmee1kat has joined #ruby
vqrs has quit [Ping timeout: 264 seconds]
Helheim has quit [Ping timeout: 264 seconds]
iamvery has quit [Ping timeout: 264 seconds]
pietr0_ has joined #ruby
tristanp has joined #ruby
Yiota has quit [Ping timeout: 264 seconds]
A124 has quit [Ping timeout: 264 seconds]
pawnbox has quit [Ping timeout: 250 seconds]
fckyoufreenode has joined #ruby
tubuliferous has joined #ruby
astrobunny has joined #ruby
zenlot6 has joined #ruby
ereslibre has joined #ruby
ereslibre has joined #ruby
madgen has quit [Ping timeout: 264 seconds]
Madplatypus has quit [Ping timeout: 264 seconds]
siaw has quit [Ping timeout: 264 seconds]
Trynemjoel has quit [Ping timeout: 264 seconds]
cajone has quit [Ping timeout: 264 seconds]
dcope has quit [Ping timeout: 264 seconds]
KervyN has quit [Ping timeout: 264 seconds]
stannard has quit [Ping timeout: 264 seconds]
greenhat has quit [Ping timeout: 264 seconds]
siaw_ has joined #ruby
kadoppe has quit [Ping timeout: 260 seconds]
noodle has quit [Ping timeout: 264 seconds]
noService has quit [Ping timeout: 264 seconds]
ssm_ has quit [Ping timeout: 264 seconds]
JoL1hAHN has quit [Ping timeout: 264 seconds]
funnel has quit [Ping timeout: 264 seconds]
martinbjeldbak has quit [Ping timeout: 264 seconds]
Muz_ has quit [Ping timeout: 264 seconds]
tristanp_ has quit [Ping timeout: 264 seconds]
malcolmva has quit [Ping timeout: 264 seconds]
kies has quit [Ping timeout: 264 seconds]
Dimik has quit [Ping timeout: 264 seconds]
pietr0 has quit [Ping timeout: 264 seconds]
czerasz has quit [Ping timeout: 264 seconds]
agentmeerkat has quit [Ping timeout: 264 seconds]
danieli has quit [Ping timeout: 264 seconds]
matp has quit [Ping timeout: 264 seconds]
joevandyk has quit [Ping timeout: 264 seconds]
SuperLag has quit [Ping timeout: 264 seconds]
johnny56 has quit [Ping timeout: 264 seconds]
modin has quit [Ping timeout: 264 seconds]
pietr0_ is now known as pietr0
pawnbox has joined #ruby
elifoster|alt has joined #ruby
devbug has quit [Ping timeout: 276 seconds]
LaT0rtue has joined #ruby
astrobun_ has quit [Ping timeout: 264 seconds]
ur5us has quit [Ping timeout: 264 seconds]
elifoster has quit [Ping timeout: 264 seconds]
zenlot has quit [Ping timeout: 264 seconds]
blackgoat has quit [Ping timeout: 264 seconds]
ereslibre_laptop has quit [Ping timeout: 264 seconds]
merida has joined #ruby
Beast has joined #ruby
iamvery has joined #ruby
SilverKey has quit [Quit: Halted.]
A124 has joined #ruby
SuperLag has joined #ruby
Muz has joined #ruby
funnel has joined #ruby
Jonah11_ has joined #ruby
Yiota has joined #ruby
<free_beard> Ox0dea: thanks for the insight, I'm going to look into running that exconf.rb
webus has joined #ruby
blackgoat has joined #ruby
<free_beard> Ox0dea: you mean this? https://github.com/unbit/uwsgi/blob/master/uwsgi.gemspec it seems the extension is there
madgen has joined #ruby
hk238 has joined #ruby
<Ox0dea> free_beard: Yep, that'd be the one.
Madplatypus has joined #ruby
noodle has joined #ruby
<Ox0dea> Their extconf.rb hits the network for the install script, though; I guess something must've gone wonky with that.
pawnbox has quit [Ping timeout: 250 seconds]
Helheim has joined #ruby
solocshaw has quit [Ping timeout: 260 seconds]
vqrs has joined #ruby
<free_beard> Ox0dea: There's nothing letting me know that :))
Jonah11__ has quit [Ping timeout: 268 seconds]
greenhat has joined #ruby
dcope has joined #ruby
martinbjeldbak has joined #ruby
Trynemjoel has joined #ruby
kadoppe has joined #ruby
abyx has joined #ruby
KervyN has joined #ruby
danieli has joined #ruby
<free_beard> Ox0dea: holy shit, it's using curl :D thanks, I feel stupid now
joevandyk has joined #ruby
<Ox0dea> free_beard: Er, was that the problem, then?
pietr0_ has joined #ruby
ur5us has joined #ruby
<free_beard> Ox0dea: yep, the server I'm trying to deploy to didn't have curl installed and the docs for rbenv on saltstack didn't mention curl so I conveniently ignored adding it to deps
Chagel has joined #ruby
noService has joined #ruby
pietr0 has quit [Ping timeout: 244 seconds]
pietr0_ is now known as pietr0
krz has joined #ruby
merida_ has joined #ruby
matp has joined #ruby
<Ox0dea> free_beard: In your defense, it's not the kind of thing most gems do.
czerasz has joined #ruby
jt__ has quit [Remote host closed the connection]
JoL1hAHN has joined #ruby
jt__ has joined #ruby
merida has quit [Ping timeout: 250 seconds]
kies has joined #ruby
<free_beard> Ox0dea: manually running extconf.rb tipped me off so thanks for the advice!
<Ox0dea> free_beard: Happy to help.
ssm_ has joined #ruby
moei has joined #ruby
Jonah11_ has quit [Ping timeout: 268 seconds]
cajone has joined #ruby
malcolmva has joined #ruby
yaewa has quit [Ping timeout: 250 seconds]
polysics has joined #ruby
karmatr0n has quit [Ping timeout: 244 seconds]
kadoppe has quit [Ping timeout: 276 seconds]
ur5us has quit [Remote host closed the connection]
LoneHermit has quit [Remote host closed the connection]
IrishGringo has quit [Ping timeout: 250 seconds]
LoneHerm_ has joined #ruby
nixmaniack has joined #ruby
Jonah11_ has joined #ruby
aurum_infide has joined #ruby
ramfjord has quit [Ping timeout: 250 seconds]
duncannz has joined #ruby
Devalo has quit [Remote host closed the connection]
nixmaniack has quit []
jdm has quit [Remote host closed the connection]
tax has joined #ruby
ramfjord has joined #ruby
brt has joined #ruby
william3 has joined #ruby
auzty has joined #ruby
william3 has quit [Ping timeout: 276 seconds]
kareeoleez has joined #ruby
krz has quit [Ping timeout: 250 seconds]
_blizzy_ has joined #ruby
Lomex has joined #ruby
Jonah11_ has quit [Ping timeout: 268 seconds]
aufi has joined #ruby
anthony has quit [Ping timeout: 264 seconds]
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
benlieb has quit [Quit: benlieb]
abyx has quit [Quit: This computer has gone to sleep]
Tempesta_ has joined #ruby
nhhc has joined #ruby
jt__ has quit [Remote host closed the connection]
sp4rrow has joined #ruby
aganov has joined #ruby
maletor has joined #ruby
yfeldblum has quit [Remote host closed the connection]
Tempesta has quit [Ping timeout: 260 seconds]
modin has joined #ruby
johnny56 has joined #ruby
Jonah11_ has joined #ruby
kadoppe has joined #ruby
Es0teric has joined #ruby
solars has joined #ruby
jdm has joined #ruby
firstdayonthejob has joined #ruby
mhoungbo has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
Guest47382 is now known as ruurd
rippa has joined #ruby
ur5us has joined #ruby
ur5us has quit [Remote host closed the connection]
kadoppe has quit [Ping timeout: 250 seconds]
dionysus69 has joined #ruby
kirillzh has joined #ruby
madgen has quit [Ping timeout: 260 seconds]
DoubleMalt has joined #ruby
edwinvdgraaf has quit [Ping timeout: 276 seconds]
LoneHerm_ has quit [Remote host closed the connection]
kareeole_ has joined #ruby
kareeoleez has quit [Ping timeout: 260 seconds]
kareeole_ has quit [Remote host closed the connection]
djbkd has joined #ruby
tildes has joined #ruby
nodejunkie has quit [Ping timeout: 252 seconds]
bruno- has joined #ruby
ta_ has joined #ruby
Jonah11_ has quit [Ping timeout: 268 seconds]
kareeoleez has joined #ruby
Lomex has quit [Remote host closed the connection]
firstdayonthejob has quit [Ping timeout: 264 seconds]
tubuliferous has quit [Ping timeout: 276 seconds]
User458764 has joined #ruby
djbkd has quit [Ping timeout: 268 seconds]
j3r0 has joined #ruby
bruno- has quit [Ping timeout: 276 seconds]
LaT0rtue has quit [Ping timeout: 260 seconds]
agentmee1kat has quit [Ping timeout: 244 seconds]
Jonah11_ has joined #ruby
william3 has joined #ruby
djbkd has joined #ruby
agentmeerkat has joined #ruby
last_staff has joined #ruby
lxsameer has joined #ruby
BTRE has quit [Ping timeout: 276 seconds]
kadoppe has joined #ruby
astrobu__ has quit [Read error: Connection reset by peer]
astrobun_ has joined #ruby
ssiris has quit [Remote host closed the connection]
william3 has quit [Ping timeout: 276 seconds]
brt has quit [Ping timeout: 250 seconds]
stannard has joined #ruby
lxsameer has quit [Ping timeout: 252 seconds]
Rickmasta has quit [Ping timeout: 250 seconds]
jt__ has joined #ruby
infra-red has joined #ruby
siaw has joined #ruby
last_staff1 has joined #ruby
yaewa has joined #ruby
kadoppe has quit [Ping timeout: 276 seconds]
djbkd_ has joined #ruby
ICantCook has quit [Ping timeout: 250 seconds]
kirillzh_ has joined #ruby
charliesome has quit [Ping timeout: 252 seconds]
biberu has joined #ruby
kirillzh has quit [Ping timeout: 250 seconds]
SuperLag_ has joined #ruby
bronson has joined #ruby
Jonah11_ has quit [Ping timeout: 250 seconds]
tjbiddle has quit [Ping timeout: 250 seconds]
A124 has quit [Disconnected by services]
A124 has joined #ruby
Yiota_ has joined #ruby
tjbiddle has joined #ruby
Rickmasta has joined #ruby
agent_white has quit [Ping timeout: 250 seconds]
bmf has joined #ruby
vdamewood has joined #ruby
fckyoufreenode has quit [Ping timeout: 250 seconds]
Vile` has joined #ruby
jokester has quit [Quit: going to discard my ring]
BTRE has joined #ruby
ghr has quit [Ping timeout: 250 seconds]
Pupeno has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
last_staff has quit [*.net *.split]
djbkd has quit [*.net *.split]
j3r0 has quit [*.net *.split]
DoubleMalt has quit [*.net *.split]
auzty has quit [*.net *.split]
moei has quit [*.net *.split]
ssm_ has quit [*.net *.split]
JoL1hAHN has quit [*.net *.split]
vqrs has quit [*.net *.split]
Yiota has quit [*.net *.split]
Muz has quit [*.net *.split]
SuperLag has quit [*.net *.split]
siaw_ has quit [*.net *.split]
noodle has quit [*.net *.split]
stannard_ has quit [*.net *.split]
ddv has quit [*.net *.split]
ctrlrsf has quit [*.net *.split]
last_staff1 is now known as last_staff
vqrs_ has joined #ruby
noServic1 has joined #ruby
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
Muz has joined #ruby
curses has joined #ruby
ghr has joined #ruby
brt has joined #ruby
ur5us has joined #ruby
Vile` has quit [Ping timeout: 252 seconds]
noService has quit [Ping timeout: 276 seconds]
mrknip has joined #ruby
BtcBen has quit [Ping timeout: 244 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
mark2 has joined #ruby
DoubleMalt has joined #ruby
mark2 is now known as Guest33142
ghr has quit [Ping timeout: 250 seconds]
ssm_ has joined #ruby
auzty has joined #ruby
j3r0 has joined #ruby
agent_white has joined #ruby
TomyWork has joined #ruby
curses has quit [Ping timeout: 276 seconds]
ur5us has quit [Ping timeout: 264 seconds]
hxegon has quit [Quit: BRB]
Jonah11_ has joined #ruby
JoL1hAHN has joined #ruby
agentmeerkat has quit [Ping timeout: 252 seconds]
agentmeerkat has joined #ruby
noodle has joined #ruby
madgen has joined #ruby
malcolmva has quit [Ping timeout: 250 seconds]
Pupeno has quit [Remote host closed the connection]
<solars> quick question, is class Mod::Cls the same as module Mod; class Cls ?
Chagel has quit [Ping timeout: 250 seconds]
<solars> nested of course
vondruch has joined #ruby
<Ox0dea> Not quite.
<kirillzh_> Isn't it?
ghr has joined #ruby
<baweaver> ?popcorn
<ruby[bot]> It's popcorn time!
karmatr0n has joined #ruby
<Ox0dea> Popcorn?
charlemagne has joined #ruby
Pupeno has joined #ruby
<baweaver> Ox0dea is about to speak
<baweaver> that's always good for popcorn
<Ox0dea> Awkward. :/
<kirillzh_> Wait
<solars> Ox0dea, why not?
<kirillzh_> I don't have any
<Ox0dea> solars: For starters: https://eval.in/553741
tjbiddle has quit [Ping timeout: 276 seconds]
<Ox0dea> That disparity comes into play for constant resolution.
Chagel has joined #ruby
malcolmva has joined #ruby
Couch has joined #ruby
zenlot6 has quit [Ping timeout: 250 seconds]
<baweaver> and likely other types as well
aeterne has joined #ruby
<baweaver> method_missing comes to mind
<solars> Ox0dea, hmm I see yeah, do you have an example for that? referring to the class works normally with M::C in both ways, right
<solars> I'm trying to see the difference
<Ox0dea> solars: Sure, `self` is the same in both cases.
Jonah11_ has quit [Remote host closed the connection]
<solars> right
zenlot6 has joined #ruby
yfeldblum has joined #ruby
ghr has quit [Ping timeout: 250 seconds]
fedexo_ has quit [Ping timeout: 260 seconds]
<Ox0dea> solars: Are you familiar with how method resolution works?
karmatr0n has quit [Ping timeout: 252 seconds]
rkazak has joined #ruby
<solars> I don't think so, no - I'm just trying to make sense of the difference from a pragmatic point of view, I thought it's the same
baweaver has quit [Remote host closed the connection]
artmann_ has quit [Remote host closed the connection]
tjbiddle has joined #ruby
johnbat26 has joined #ruby
<Ox0dea> solars: Here's a "pragmatic" example of when the difference might bite you: https://eval.in/553743
artmann has joined #ruby
elifoster|alt has quit [Ping timeout: 276 seconds]
ghr has joined #ruby
LaT0rtue has joined #ruby
merida has joined #ruby
guardian has quit [Excess Flood]
merida has quit [Read error: Connection reset by peer]
anisha has joined #ruby
merida has joined #ruby
Yiota_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
djbkd_ has quit [Remote host closed the connection]
<solars> ah
<solars> understood
<solars> Ox0dea, thanks for the clarification :)
<Ox0dea> solars: Sure thing. :)
<Ox0dea> Be advised that that second example *does* go back to the first.
noodle has quit [Quit: /quit]
<Ox0dea> Modules don't have "parent modules" in the same way that Classes have superclasses.
barajasfab has quit [Ping timeout: 260 seconds]
norc has joined #ruby
Nanuq has quit [Ping timeout: 264 seconds]
merida_ has quit [Ping timeout: 276 seconds]
last_staff has quit [Quit: last_staff]
<Ox0dea> At the bottom there, `Module.nesting` is [M::C], so the interpreter looks for M::C::String; it doesn't find it, but the next link up the chain is Object, not M.
Nanuq has joined #ruby
ghr has quit [Ping timeout: 250 seconds]
<Ox0dea> >> Object::String # Tada!
<ruby[bot]> Ox0dea: # => String (https://eval.in/553750)
vikas027 has joined #ruby
vikas027 has left #ruby [#ruby]
<kirillzh_> are you wizard?
astrobunny has quit [Remote host closed the connection]
<Ox0dea> I play one on TV.
<kirillzh_> I don't watch TV
<norc> You should. Ox0dea is great.
<solars> Ox0dea, ah, thanks for the hint
<kirillzh_> What am I missing?
<Ox0dea> No worries.
baweaver has joined #ruby
Pupeno has quit [Remote host closed the connection]
noServic1 has quit [Quit: leaving]
<Ox0dea> norc: What's the cleanest way to de-optimize?
<kirillzh_> Is your name Ben?
<norc> Ox0dea: Say what?
<Ox0dea> norc: https://eval.in/553614
Pupeno has joined #ruby
<Ox0dea> I'd hoped to find some secret command-line flag to disable optimization, but no such luck.
<norc> Are you talking about compiler "optimizations" ?
<kirillzh_> I don't get it. But I want to. What should I do?
<norc> (And I hate myself for calling them like that, because they are rather pitiful)
<Ox0dea> norc: I just want to be able to trace all method invocations.
Scientz has quit [Ping timeout: 250 seconds]
Scient has joined #ruby
<Ox0dea> >> RubyVM::INSTRUCTION_NAMES.grep(/^opt_/).size
<ruby[bot]> Ox0dea: # => 27 (https://eval.in/553753)
<Ox0dea> That's a *lot* of missed calls.
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
noodle has joined #ruby
aswen has joined #ruby
<Ox0dea> There's gotta be something less heavy-handed than prepending some Module (to every class?!) that defines all those and just `super`s up.
charlemagne has quit [Ping timeout: 264 seconds]
camilasan has joined #ruby
Guest69296 is now known as nw
webus has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
edwinvdgraaf has joined #ruby
_blizzy_ has quit [Quit: Leaving]
nobitanobi has joined #ruby
artmann has quit [Remote host closed the connection]
ta_ has quit [Remote host closed the connection]
charlemagne has joined #ruby
ta_ has joined #ruby
spk has quit [Ping timeout: 264 seconds]
ghr has joined #ruby
Vile` has joined #ruby
artmann has joined #ruby
agent_white has quit [Quit: gnight]
CloCkWeRX has quit [Quit: Leaving.]
tylersmith has quit [Ping timeout: 250 seconds]
Nanuq has quit [Ping timeout: 264 seconds]
CloCkWeRX has joined #ruby
Nanuq has joined #ruby
Yiota has joined #ruby
Xeago has quit [Remote host closed the connection]
Xeago has joined #ruby
ghr has quit [Ping timeout: 250 seconds]
Xeago has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
jaruga__ has joined #ruby
diegoaguilar has joined #ruby
Guest36851 has joined #ruby
<norc> Ox0dea: Not without making modifications to the compiler.
spk has joined #ruby
<norc> (And partially the parser even I think)
<Ox0dea> norc: I am insufficiently Japanese.
<Ox0dea> Jokes aside, that sucks. :<
pandaant has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
<norc> Ox0dea: Honestly the whole compiler is a mess. Got some big expectations for Ruby 3.0 however.
edwinvdgraaf has joined #ruby
astrobunny has joined #ruby
Tempesta_ is now known as Tempesta
<Ox0dea> norc: I did find this one weird trick:
<Ox0dea> >> Fixnum.prepend Comparable; Fixnum.ancestors.count Comparable
<ruby[bot]> Ox0dea: # => 2 (https://eval.in/553757)
<Ox0dea> And that does de-optimize #<=> and friends, but that's only a handful of them.
<norc> Well, it still is the same thing.
poerror has left #ruby ["Textual IRC Client: www.textualapp.com"]
<norc> It effectively wraps the <=> calls with another (from Comparable)
<Ox0dea> Well, sure, but it's slightly weird that the ancestor chain can contain duplicates.
Guest36851 has quit [Ping timeout: 250 seconds]
<norc> Why is that weird?
rob_ has left #ruby [#ruby]
<norc> Resolution will stop at the first match anyway.
mikecmpbll has joined #ruby
tjbiddle has quit [Ping timeout: 264 seconds]
<norc> asm>> 1 < 1
<ruby[bot]> norc: I have disassembled your code, the result is at https://eval.in/553758
ddv has joined #ruby
j3r0 has quit [Ping timeout: 244 seconds]
ctrlrsf has joined #ruby
<Ox0dea> >> module M; end; Fixnum.include M; Fixnum.prepend M; Fixnum.ancestors.count(M) # norc
Outlastsheep has joined #ruby
<ruby[bot]> Ox0dea: # => 1 (https://eval.in/553759)
<norc> asm>> 1.send(:<, 1)
<ruby[bot]> norc: I have disassembled your code, the result is at https://eval.in/553760
<norc> Ox0dea: That seems to be a way.
<norc> That should in fact be the cleanest way to prevent call optimisations.
LaT0rtue has quit [Ping timeout: 276 seconds]
<norc> Did not even think about this earlier.
<Ox0dea> norc: I'll be running ex post facto.
Guest34517 is now known as awk
guardian has joined #ruby
marr has joined #ruby
<Ox0dea> Requiring all methods to be invoked like that is even worse than `(funcall ...)`.
CloCkWeRX has quit [Ping timeout: 244 seconds]
<norc> Ox0dea: What is your goal if you dont mind my asking?
bkxd has joined #ruby
MagePsycho_ has joined #ruby
<Ox0dea> norc: It's top-secret just now, but it's obviously magical in the bad way.
kadoppe has joined #ruby
araujo has quit [Read error: Connection timed out]
guardian has quit [Ping timeout: 268 seconds]
<norc> Ox0dea: Actually... it looks like it can be turned off.
<norc> Just found it.
<Ox0dea> norc: I must be blind.
LoneHermit has joined #ruby
ferr has joined #ruby
araujo has joined #ruby
User458764 has joined #ruby
pawnbox has joined #ruby
<norc> Ox0dea: Oh this is actually nice!
<norc> >> RubyVM::InstructionSequence.compile_option
<ruby[bot]> norc: # => {:inline_const_cache=>true, :peephole_optimization=>true, :tailcall_optimization=>false, :specialize ...check link for more (https://eval.in/553777)
<norc> From the looks of it you can directly control the compiler behaviour through that.
bkxd has quit [Ping timeout: 244 seconds]
kadoppe has quit [Ping timeout: 252 seconds]
ur5us has joined #ruby
<norc> specialized_instruction is the option that is relevant to your case.
araujo has quit [Max SendQ exceeded]
<Ox0dea> norc: Right, but they only apply after the fact for eval'd strings, no?
inukshuk_ has joined #ruby
inukshuk_ has quit [Client Quit]
Xeago has joined #ruby
araujo has joined #ruby
phredus has joined #ruby
<norc> Ox0dea: Well, even if so, you can definitely fiddle the option of your internal iseq->option
tylersmith has joined #ruby
kirillzh_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
araujo has quit [Max SendQ exceeded]
kadoppe has joined #ruby
infra-red has quit [Remote host closed the connection]
araujo has joined #ruby
infra-red has joined #ruby
karmatr0n has joined #ruby
sepp2k has joined #ruby
garethrees has joined #ruby
charliesome has joined #ruby
kadoppe has quit [Ping timeout: 276 seconds]
<Ox0dea> norc: Thanks for the hints, but I don't see how to do it this way without user-level boilerplate, whose removal is the entire point. :P
infra-red has quit [Remote host closed the connection]
william3 has joined #ruby
Yiota has quit [Ping timeout: 250 seconds]
<zipkid> Hello, could anybody help me find the cause of this 'ArgumentError: string contains null byte' error? https://gist.github.com/zipkid/1caafdcbca9ba72aea6affe7d8649f2b
senayar has joined #ruby
senayar has joined #ruby
karmatr0n has quit [Ping timeout: 276 seconds]
<norc> zipkid: Is this your gem?
<zipkid> norc: yes.
Yiota has joined #ruby
<zipkid> the one i'm working on....
charliesome has quit [Client Quit]
raljvk has joined #ruby
pawnbox has quit [Ping timeout: 276 seconds]
<norc> zipkid: Does it fail when using gem --install too?
tildes has quit [Ping timeout: 250 seconds]
shaman42 has quit [Ping timeout: 250 seconds]
tildes has joined #ruby
<norc> zipkid: If so, passing --backtrace to gem will give you the necessary debug information.
shaman42 has joined #ruby
<Ox0dea> norc: `install` is a subcommand. :P
* zipkid is looking for the correct command to try ...
<norc> Ox0dea: Shush!
<Ox0dea> zipkid: You have a gemspec, yeah?
<zipkid> How can i try that on my current code?
<Ox0dea> norc: Then don't go tellin' folks to run `gem --install`!
<zipkid> Ox0dea: yes
mdw has joined #ruby
<norc> Ox0dea: I cant even remember the last time I wrote Ruby.
<norc> Current Im debugging Apache
<norc> :(
<Ox0dea> zipkid: `gem build foo.gemspec && gem install --backtrace foo.gem`
<norc> ^-
<norc> That. Listen to our TV wizard.
<zipkid> Ox0dea: Thx, going to try that
<Ox0dea> zipkid: Abracadabra.
<nano-> Ox0dea: Simsalabim
<Ox0dea> Avada Kedavra!
<Ox0dea> (jk lol dont die)
wedgwood has quit [Ping timeout: 244 seconds]
dn` has quit [Quit: dn`]
dn` has joined #ruby
<zipkid> Ox0dea: gem build gives me the error.... I'm going to investigate my gemspec file... :-)
guardian has joined #ruby
elaptics`away is now known as elaptics
pawnbox has joined #ruby
vqrs_ has quit [Ping timeout: 250 seconds]
<Ox0dea> zipkid: That's an uncommon error, but it's pretty easy to bump into if you're doing anything low-level.
brt has quit [Quit: peace]
<zipkid> ok, i found it.... i over-enthousiatically replaced "->' in the gemspec....
<zipkid> Thanks for your help
<Ox0dea> Heh.
<Ox0dea> Well, all right.
kareeoleez has quit [Remote host closed the connection]
<Ox0dea> Not how I expected that to go. :P
<zipkid> you too norc :-)
<zipkid> Ox0dea: i was sure it was something stupid on my side....
jokester has joined #ruby
<Ox0dea> zipkid: Aye, we were just trying to track down the specifics thereof. ^_^
vqrs has joined #ruby
<Ox0dea> That error indicates that you had a null byte in a Ruby string that needed to be converted to a C one.
<zipkid> Ox0dea: indeed, thanks for giving me the tools/hints to do so.
mrgrieves has joined #ruby
<zipkid> spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } <- replacing the " -> ' caused the error .... obviously...
lpvb has quit [Ping timeout: 244 seconds]
siaw has quit [Quit: siaw]
lkba_ has quit [Ping timeout: 276 seconds]
kareeoleez has joined #ruby
ur5us has quit [Remote host closed the connection]
<zipkid> now my bundle install succeeded!
Yiota has quit [Remote host closed the connection]
<Ox0dea> zipkid: Er, which `->`?
<zipkid> no, i replaced the " (double quote) by (->) ' (single quote)
<Ox0dea> Ah, derp.
dgncn has quit [Excess Flood]
<Ox0dea> Well, glad you got it sorted. :)
<zipkid> if 'derp' means 'You idiot', you are completely correct :-D
n008f4g_ has joined #ruby
guardian has quit [Ping timeout: 268 seconds]
<Ox0dea> Only I was using it for myself that time. :P
<Ox0dea> I kept reading "->' as a weirdly quoted string.
<zipkid> Birs of a feather...
dgncn has joined #ruby
<zipkid> lol
<Ox0dea> Too many encounters with `foo', I guess.
vqrs has quit [Ping timeout: 250 seconds]
pawnbox has quit [Ping timeout: 244 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
pawnbox has joined #ruby
guardian has joined #ruby
Xiti has quit [Read error: Connection reset by peer]
P_R_Deltoid has quit [Read error: Connection reset by peer]
tuelz3 has quit [Read error: Connection reset by peer]
rkazak has quit [Read error: Connection reset by peer]
tuelz3 has joined #ruby
guardian has quit [Excess Flood]
mozzarella has quit [Remote host closed the connection]
P_R_Deltoid has joined #ruby
Xiti has joined #ruby
wolffles has quit [Read error: Connection reset by peer]
hays has quit [Read error: Connection reset by peer]
mozzarella has joined #ruby
M-Kodo has quit [Ping timeout: 244 seconds]
agentmeerkat has quit [Read error: Connection reset by peer]
Cohedrin has quit [Read error: Connection reset by peer]
iamvery has quit [Ping timeout: 260 seconds]
noodle has quit [Quit: /quit]
codezomb has quit [Read error: Connection reset by peer]
Cohedrin has joined #ruby
sarbs has quit [Ping timeout: 244 seconds]
M-shine has quit [Ping timeout: 276 seconds]
noodle has joined #ruby
Vile` has quit [Read error: Connection reset by peer]
hays has joined #ruby
nuck has quit [Ping timeout: 276 seconds]
merida has quit [Remote host closed the connection]
guardian has joined #ruby
vdamewood has quit [Max SendQ exceeded]
vqrs has joined #ruby
malcolmva has quit [Ping timeout: 260 seconds]
nuck has joined #ruby
mrmortondk has joined #ruby
nuck is now known as Guest43570
sarbs has joined #ruby
Xeago has quit [Ping timeout: 276 seconds]
pawnbox has quit [Remote host closed the connection]
mrmortondk has quit [Read error: Connection reset by peer]
SCHAAP137 has joined #ruby
baweaver has joined #ruby
iamvery has joined #ruby
Vile` has joined #ruby
M-Kodo has joined #ruby
crameth has joined #ruby
M-shine has joined #ruby
danjack has quit [Ping timeout: 250 seconds]
MagePsycho_ has quit [Quit: MagePsycho_]
danjack has joined #ruby
webus has joined #ruby
<djellemah> Baz walks into a bar and says "the foo is strong with this one".
krz has joined #ruby
poerror has joined #ruby
wedgwood has joined #ruby
ghr has joined #ruby
WebDevB has joined #ruby
baweaver has quit [Ping timeout: 250 seconds]
ICantCook has joined #ruby
<WebDevB> Hey guys, we've looking for a Ruby on rails dev to take on some ad hoc work... do you know of anyone?
Pupeno has quit [Remote host closed the connection]
vdamewood has joined #ruby
infra-red has joined #ruby
infra-red has quit [Remote host closed the connection]
infra-red has joined #ruby
<linduxed> hey guys
<linduxed> let's say that i get a response from a database driver
<linduxed> some rows
agentmeerkat has joined #ruby
idletask has joined #ruby
<linduxed> now i want to turn those rows into some data structure
<linduxed> would you guys call that procedure a "packaging procedure"?
<linduxed> "serialization"?
<linduxed> "transformation procedure"?
raljvk has quit [Remote host closed the connection]
djbkd has joined #ruby
auzty has quit [Quit: Leaving]
jamesbrink has quit [Quit: Connection closed for inactivity]
malcolmva has joined #ruby
rrichardsr3 has joined #ruby
madgen has quit [Ping timeout: 276 seconds]
bronson has joined #ruby
aeterne has quit [Read error: Connection reset by peer]
<jackdaniel> demarshalling? deserialization?
edwinvdg_ has joined #ruby
<jackdaniel> mapping would be also correct (mathematically) but very misleading for many programmers
Ropeney has joined #ruby
nando293921 has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
noService has joined #ruby
djbkd has quit [Ping timeout: 244 seconds]
MagePsycho_ has joined #ruby
edwinvdgraaf has quit [Ping timeout: 260 seconds]
Xeago has joined #ruby
Pupeno has joined #ruby
codecop has joined #ruby
blackgoat has quit [Quit: WeeChat 1.4]
kexdsn has joined #ruby
ykishima has joined #ruby
agentmeerkat has quit [Ping timeout: 244 seconds]
Rutix`away is now known as Rutix
kareeole_ has joined #ruby
kareeole_ is now known as kareeoleez_
kareeoleez has quit [Disconnected by services]
kareeoleez_ is now known as kareeoleez
artmann has quit [Remote host closed the connection]
Pupeno has quit [Ping timeout: 268 seconds]
bmf has quit [Ping timeout: 252 seconds]
madgen has joined #ruby
nixmaniack has joined #ruby
johnny56_ has joined #ruby
ocbtec has joined #ruby
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
charlemagne has quit [Ping timeout: 264 seconds]
johnny56 has quit [Ping timeout: 264 seconds]
karmatr0n has joined #ruby
<norc> lucas: marshalling or serialization, take your pick.
kareeole_ has joined #ruby
kareeoleez has quit [Disconnected by services]
poerror has left #ruby ["Textual IRC Client: www.textualapp.com"]
kareeole_ is now known as kareeoleez
patrick_star has quit [Quit: Leaving]
<norc> linduxed: ^-
<norc> But it really depends on what you are trying to do.
SCHAAP137 has quit [Read error: Connection reset by peer]
<norc> If you just transform from one representation to another for immediate use, then its just "transformation" or "mapping"
<jackdaniel> I'd say its DE-{marshalling,serialization}, if he takes it from the database into the living application
<norc> jackdaniel: serialization is only used to prepare data for transmission or storage really.
<norc> marshalling depends on the context
SCHAAP137 has joined #ruby
<jackdaniel> hm, yes, and if you take something *from* storage, it's the reverse operation
<jackdaniel> s/storage/the storage/
<norc> jackdaniel: You are thinking in wrong terms.
mrknip has quit [Ping timeout: 252 seconds]
karmatr0n has quit [Ping timeout: 268 seconds]
bmf has joined #ruby
<jackdaniel> I believe this is not true, but I'll gladly learn if I'm really wrong
LoneHermit has quit [Remote host closed the connection]
Snowy has joined #ruby
jt__ has quit [Remote host closed the connection]
mozzarella has quit [Remote host closed the connection]
mozzarella has joined #ruby
BtcBen has joined #ruby
nando294021 has joined #ruby
malcolmva has quit [Ping timeout: 250 seconds]
<norc> jackdaniel: Thinking about it I guess it really depends. You are right, it can be de-serialization.
evidex has joined #ruby
ghr has quit [Ping timeout: 250 seconds]
phredus_ has joined #ruby
acosonic has joined #ruby
<acosonic> Hi all, how can I extract @value from this data structure https://gist.github.com/acosonic/a366a70724ab153caaa1d7fd84a5e0d7
bmf has quit [*.net *.split]
nando293921 has quit [*.net *.split]
WebDevB has quit [*.net *.split]
M-Kodo has quit [*.net *.split]
noodle has quit [*.net *.split]
guardian has quit [*.net *.split]
jokester has quit [*.net *.split]
tylersmith has quit [*.net *.split]
phredus has quit [*.net *.split]
ctrlrsf has quit [*.net *.split]
ddv has quit [*.net *.split]
workmad3 has joined #ruby
drPoggs has quit [Ping timeout: 264 seconds]
noodle has joined #ruby
M-Kodo has joined #ruby
<norc> acosonic: Add an attr_reader ?
Amnez777 has quit [Ping timeout: 260 seconds]
<acosonic> norc: what’s attr_reader? Where can I see some examples with it?
<norc> acosonic: I recommend you use your great google skills to find out.
<norc> &ri Module::attr_reader
<`derpy> No results
<norc> &ri Module#attr_reader
<norc> But Ill spoon feed you anyhow..
Amnez777 has joined #ruby
tubuliferous has joined #ruby
<forcer> I don't think there is any need to be this dismissive.
<norc> If the class does not belong to you you are kind of out of luck (while Ruby has all the tools to get it, it would just violate encapsulation, which I will not teach you if you are not even aware of attr_reader)
<adaedra> &ri attr_reader
LaT0rtue has joined #ruby
<adaedra> :o)
<Ox0dea> norc: # for instance methods.
<norc> adaedra: Oh wait. You mean I dont always have to know the class/module?
<norc> Neat.
<adaedra> norc: this is kind of random sometimes tho.
<norc> adaedra: Thats great, I was looking for a good entropy source for my new encryption gem.
bmf has joined #ruby
drPoggs has joined #ruby
<Ox0dea> norc: Use the number of birds in flight over the surface of Earth.
<adaedra> It will get the first ri result always (One day I'll fix that. One day.)
<Ox0dea> BiFaaS.
<norc> Ox0dea: Anyone using IP over Avian Carriers can simply use maximum throughput information to gain an attack vector.
<norc> Not a great idea..
<Ox0dea> norc: Damn, that's good. :)
<Ox0dea> I mean, it's bad.
<Ox0dea> But that was really good.
malcolmva has joined #ruby
Vile` has quit [Ping timeout: 244 seconds]
wedgwood has quit [Ping timeout: 250 seconds]
c355e3b has joined #ruby
merida has joined #ruby
Xeago has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 252 seconds]
charlemagne has joined #ruby
<shevy> lol
Xeago has joined #ruby
Xeago has quit [Remote host closed the connection]
terlar has joined #ruby
AlexJakeGreen has joined #ruby
n008f4g_ has quit [Ping timeout: 252 seconds]
wedgwood has joined #ruby
merida_ has joined #ruby
flak has joined #ruby
Pupeno has joined #ruby
aswen has quit [Quit: WeeChat 1.4]
<acosonic> I got that resolved…
aspiers_ has quit [Ping timeout: 264 seconds]
<acosonic> norc: without attr_blah… just by struct.first.value FYI...
tylersmith has joined #ruby
krz has quit [Ping timeout: 276 seconds]
wedgwood has quit [Ping timeout: 250 seconds]
madgen has quit [Ping timeout: 276 seconds]
rippa has quit [Ping timeout: 276 seconds]
Xeago has joined #ruby
merida has quit [Ping timeout: 276 seconds]
Pupeno has quit [Read error: Connection reset by peer]
djbkd has joined #ruby
Pupeno has joined #ruby
ghr- has joined #ruby
krz has joined #ruby
duderonomy has quit [Read error: Connection reset by peer]
hays has quit [Read error: Connection reset by peer]
BtcBen has quit [Ping timeout: 244 seconds]
<adaedra> acosonic: tbf, with the information you gave here, norc's answer was actually not so "crazy".
wedgwood has joined #ruby
Xeago has quit [Remote host closed the connection]
sarbs has quit [Ping timeout: 276 seconds]
duderonomy has joined #ruby
Guest43570 has quit [Ping timeout: 260 seconds]
sapslaj has quit [Quit: No Ping reply in 180 seconds.]
BtcBen has joined #ruby
<shevy> acosonic structs are cool, aren't they?
hays has joined #ruby
bkxd has joined #ruby
<adaedra> Also, when asking something in multiple channels, common courtesy is to inform those people.
<acosonic> shevy: where can I learn about such advanced structs…?
malcolmva has quit [Ping timeout: 244 seconds]
ctrlrsf has joined #ruby
ctrlrsf has quit [Changing host]
ctrlrsf has joined #ruby
yfeldblum has joined #ruby
sapslaj has joined #ruby
djbkd has quit [Ping timeout: 252 seconds]
nuck has joined #ruby
ddv has joined #ruby
nuck is now known as Guest86672
sarbs has joined #ruby
Beast has quit [Quit: Leaving]
bkxd has quit [Ping timeout: 244 seconds]
brunto has joined #ruby
rrichardsr3 has quit [Quit: Apparantly my attempt to stay awake has failed...]
ykishima has quit [Quit: jing]
LaT0rtue has quit [Ping timeout: 276 seconds]
edwinvdg_ has quit [Ping timeout: 244 seconds]
skislak has joined #ruby
jt__ has joined #ruby
malcolmva has joined #ruby
rodfersou has joined #ruby
<shevy> there are not so many structs
<shevy> struct... and openstruct/ostruct... that was it mostly I guess?
<adaedra> that's already enough, if not too much.
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<adaedra> But in the case above, it looks like it was ultimately an ActiveRecord model.
tvw has joined #ruby
kadoppe has joined #ruby
MagePsycho_ has quit [Quit: MagePsycho_]
MagePsycho_ has joined #ruby
MagePsycho_ has quit [Client Quit]
P_R_Deltoid has quit [Ping timeout: 252 seconds]
MagePsycho_ has joined #ruby
psav has joined #ruby
cibs_ has joined #ruby
<psav> if I have a ruby object - and it has a method, how do I find out where that method was defined.....ie...from which file?
aurum_infide has quit [Ping timeout: 252 seconds]
tubuliferous has quit [Ping timeout: 264 seconds]
mdw has quit [Quit: Sleeping Zzzzz]
cibs has quit [Ping timeout: 240 seconds]
yfeldblum has quit [Ping timeout: 250 seconds]
minimalism has quit [Quit: minimalism]
BtcBen has quit [Ping timeout: 244 seconds]
cibs_ has quit [Read error: Connection reset by peer]
cibs has joined #ruby
kadoppe has quit [Ping timeout: 252 seconds]
duncannz has quit [Remote host closed the connection]
johnmilton has joined #ruby
arup_r has joined #ruby
sgambino has joined #ruby
ule has left #ruby [#ruby]
<arup_r> So when I have a CSV object like, csv = CSV.open("/Users/arup/hjuhsd_ccm_db_dump.txt", 'r', headers: true). And suppose I want to read a specific row from it. One way is csv.readlines[5]. What is the other way to read the 5th row without reading rows from 6th to end rows?
<hanmac> psav: object.method(:methname).source_location does not work for compiled methods
<norc> hanmac: Does it not return nil for compiled methods?
noService has quit [Quit: leaving]
<hanmac> norc: yeah that what i mean with "does not work for compiled methods"
armatechnicos has joined #ruby
bruno- has joined #ruby
platzhirsch has joined #ruby
cibs has quit [Read error: Connection reset by peer]
cibs_ has joined #ruby
<hanmac> arup_r: you can do "csv.take(5).last" to get the 5th row
flak has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<arup_r> nice hanmac
nando294021 has quit [Ping timeout: 244 seconds]
rippa has joined #ruby
n008f4g_ has joined #ruby
Coldblackice_ has joined #ruby
Coldblackice has quit [Ping timeout: 252 seconds]
rippa has quit [Client Quit]
<hanmac> arup_r: instead of CSV::open you can also use CSV::foreach which does return an enumerator too (where you can call take directly)
ghr- is now known as ghr
<arup_r> hanmac: directly means?
rippa has joined #ruby
jt__ has quit [Remote host closed the connection]
cibs_ has quit [Read error: Connection reset by peer]
<hanmac> arup_r: "CSV.foreach("/Users/arup/hjuhsd_ccm_db_dump.txt", 'r', headers: true).take(5).last" i don't know how much better foreach is instead of open in that case.
User458764 has joined #ruby
bruno- has quit [Ping timeout: 244 seconds]
Chagel has quit [Ping timeout: 276 seconds]
Pupeno has quit [Remote host closed the connection]
codecop has quit [Remote host closed the connection]
arup_r has quit [Remote host closed the connection]
cibs has joined #ruby
Pupeno has joined #ruby
arup_r has joined #ruby
william3 has quit [Remote host closed the connection]
x0f has joined #ruby
Pupeno has quit [Remote host closed the connection]
jgt1 has joined #ruby
william3 has joined #ruby
slackR has quit [Ping timeout: 276 seconds]
astrobunny has quit [Remote host closed the connection]
kexdsn has quit [Read error: Connection reset by peer]
go|dfish has quit [Ping timeout: 260 seconds]
cibs has quit [Read error: Connection reset by peer]
cibs has joined #ruby
astrobunny has joined #ruby
Xeago has joined #ruby
Xeago has quit [Remote host closed the connection]
madgen has joined #ruby
last_staff has joined #ruby
freerobby has joined #ruby
freerobby has quit [Client Quit]
merida_ has quit [Remote host closed the connection]
slackR has joined #ruby
Kimm has joined #ruby
merida has joined #ruby
djbkd has joined #ruby
astrobunny has quit [Ping timeout: 276 seconds]
<shevy> dumdedum
<Kimm> Hi, anybody knows where can i find the code in rbenv that adds the gems to the ruby enviroment at runtime
<Kimm> like loops on gems library and add each gem
lacrosse has quit [Quit: Connection closed for inactivity]
terlar has quit [Ping timeout: 252 seconds]
<workmad3> Kimm: that's not something rbenv does
<workmad3> Kimm: rbenv will set up GEM_HOME and GEM_PATH (probably in their shim), and then rubygems is responsible for adding gem libraries to the load path in ruby as appropriate
ramfjord has quit [Ping timeout: 276 seconds]
bkxd has joined #ruby
nando293921 has joined #ruby
<Kimm> ok so I have another question, how can I easily add some gems to my project without rbenv and rubygems
lkba has joined #ruby
go|dfish has joined #ruby
djbkd has quit [Ping timeout: 276 seconds]
<toretore> Kimm: what is it you're trying to accomplish?
platzhirsch has quit [Quit: Leaving.]
Xeago has joined #ruby
<Kimm> I'm using ruby c api with some ruby code, and this code requires some gems, i want to be able to integrate the gems to the code so it will work with the executable c, because if i won't do that, i'll get error loading the gems
<shevy> complete world domination
Xeago has quit [Remote host closed the connection]
bkxd has quit [Ping timeout: 244 seconds]
merida has quit [Remote host closed the connection]
<norc> Kimm: Use a Gemfile...
karmatr0n has joined #ruby
<Kimm> hanmac suggested that few days ago, but he didn't mention how
zapata has quit [Quit: WeeChat 1.4]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
ffgghhj has quit [Ping timeout: 260 seconds]
merida has joined #ruby
Tempesta has quit [Quit: AdiIRC is updating to v2.3 Beta Build (2016/04/15) 32 Bit]
<Kimm> I have a gem file, what should I do with it
Tempesta has joined #ruby
darkxploit has quit [Ping timeout: 260 seconds]
Xeago has joined #ruby
karmatr0n has quit [Ping timeout: 276 seconds]
mikeiniowa has quit [Remote host closed the connection]
armatechnicos has quit [Remote host closed the connection]
krz has quit [Ping timeout: 252 seconds]
gnufied has joined #ruby
qhp has joined #ruby
theery has joined #ruby
william3 has quit [Remote host closed the connection]
swills has quit [Remote host closed the connection]
william3 has joined #ruby
swills has joined #ruby
theery has quit [Ping timeout: 244 seconds]
elvis4526 has joined #ruby
bkxd has joined #ruby
blaxter has joined #ruby
<elvis4526> Hey, I'm having trouble with a small curses app - getch() is returning 127 when I press Backspace, and Curses::Key::BACKSPACE is defined as 263
trinaldi has joined #ruby
<elvis4526> Anyone know why ?
Sammichmaker has quit [Quit: Leaving]
tagaulap has joined #ruby
mosez has quit [Ping timeout: 260 seconds]
mosez has joined #ruby
madgen has quit [Ping timeout: 252 seconds]
william3 has quit [Ping timeout: 264 seconds]
tuelz3 has quit [Ping timeout: 264 seconds]
tuelz3 has joined #ruby
senayar has quit [Remote host closed the connection]
IrishGringo has joined #ruby
senayar has joined #ruby
senayar has quit [Changing host]
senayar has joined #ruby
Olipro has quit [Ping timeout: 260 seconds]
n008f4g_ has quit [Ping timeout: 250 seconds]
cibs_ has joined #ruby
william3 has joined #ruby
cibs has quit [Ping timeout: 240 seconds]
freerobby has joined #ruby
callen92 has joined #ruby
User458764 has joined #ruby
acosonic has quit [Quit: acosonic]
william3 has quit [Ping timeout: 250 seconds]
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
tuelz3 has quit [Read error: Connection reset by peer]
duderonomy has quit [Read error: Connection reset by peer]
tuelz3 has joined #ruby
hays has quit [Read error: Connection reset by peer]
sapslaj has quit [Quit: No Ping reply in 180 seconds.]
bruno- has joined #ruby
iamvery has quit [Ping timeout: 276 seconds]
psmolen_ has quit [Ping timeout: 276 seconds]
ldnunes has joined #ruby
vdamewood has quit [Read error: Connection reset by peer]
duderonomy has joined #ruby
M-Kodo has quit [Ping timeout: 264 seconds]
msg31 has joined #ruby
iamvery has joined #ruby
sapslaj has joined #ruby
hays has joined #ruby
theery has joined #ruby
callen92 has quit [Ping timeout: 264 seconds]
__main__ has quit [Ping timeout: 276 seconds]
callen92 has joined #ruby
psmolen has joined #ruby
<msg31> I have a regex that I need to print into a configuration file. x = '((\\w*?)(?:\\d+|-\\\\w+|_|)(?:\\.[^/]+|))$'
Olipro has joined #ruby
__main__ has joined #ruby
<msg31> unfortunately ruby is escaping '\\' to a single '\', is there anyways to get around this behavior?
<tobiasvl> msg31: \\\ ?
bruno- has quit [Ping timeout: 244 seconds]
M-Kodo has joined #ruby
<msg31> tobiasvl, if I do '\\\\' it works but that is so ugly
<msg31> I was hoping I could tell ruby not to escape the string
william3 has joined #ruby
Xeago has quit [Remote host closed the connection]
last_staff has quit [Quit: last_staff]
Xeago has joined #ruby
<apeiros> msg31: no. \ is always the escape character, so a single backslash is \\, in all string representations.
last_staff has joined #ruby
<apeiros> or rather, in all string literals
last_staff has quit [Client Quit]
GinoMan2440 has quit [Ping timeout: 276 seconds]
Madplatypus has quit [Quit: Connection closed for inactivity]
hanmac has quit [Ping timeout: 264 seconds]
theery has quit []
MagePsycho_ has quit [Quit: MagePsycho_]
User458764 has quit [Quit: Textual IRC Client: www.textualapp.com]
madgen has joined #ruby
<tobiasvl> well, in a string literal surrounded by single quotes, a single backslash is \
<tobiasvl> uh
<tobiasvl> I mean a double backslash is \. it's auto-escaped. so the literal becomes less ugly
<tobiasvl> of course the string REPRESENTATION is still ugly. also '\\' == "\\".
MagePsycho_ has joined #ruby
guardian has joined #ruby
<tobiasvl> actually I apparently don't remember how '' works at all. '\' doesn't work, but '\t' works as expected (in irb)
<tobiasvl> perhaps I just need some coffee
vdamewood has joined #ruby
<tax> question: is javascript or ruby better to learn OOP for the first time?
djbkd has joined #ruby
<shevy> tax ruby
elvis4526 has quit [Remote host closed the connection]
webus has quit [Ping timeout: 264 seconds]
Xeago has quit [Remote host closed the connection]
<adaedra> I'd love to see this backed by arguments.
merida has quit [Remote host closed the connection]
sdothum has joined #ruby
<shevy> adaedra yeah what are your arguments in favour of javascript?
<arup_r> tax: JS is not OOP, many people over internet tried to remove that notion, it is different. Learn Ruby, for OOP yes. it is sweet.
djbkd has quit [Ping timeout: 252 seconds]
<adaedra> shevy: note that I'm not the one who gave an answer.
Xeago has joined #ruby
<tax> perhaps "object based"..?
<arup_r> I read a blog, where someone said JS is OP.
<arup_r> ^ yes
<shevy> adaedra so you have no arguments
<adaedra> shevy: you don't either.
<arup_r> boom boom!
<tax> to put it another way: for a beginner- would learning oop concept with js be painful like shooting myself in the crotch?
<Elysia> probably slightly worse
<apeiros> arup_r: um, that's nonsense. JS is oop
madgen has quit [Ping timeout: 264 seconds]
merida_ has joined #ruby
<shevy> depends how you define it
<apeiros> it uses a different OOP model than ruby (prototypical instead of classical OOP), but it's still OOP
<shevy> is there a distinction between functions and methods?
<apeiros> shevy: on a different level than ruby, but yes, there is.
<Elysia> there's a lot of languages that imeplement OOP in some way or another, javascript's method is definitely one of the less.. verbose and "exact" ways.
madgen has joined #ruby
<apeiros> with js, function vs. method is defined by how you invoke it
<arup_r> No. after reading the book series of YDJ, I am convinced that JS is not OOP. delegation is all over JS. I forgot the sweet term though, that Kyle establish in his book with *arguments*
<apeiros> Elysia: um, it is exact. it just happened to be one of the lesser used models. classical OOP is much wider known.
<Elysia> yeah, "exact" is poor phrasing, I just don't have a better way to say it
<tax> well basically i want to learn programming for the sake of programming. not to design menus and popups for websites.
<apeiros> "less common" maybe?
<Elysia> yeah, that's a good way of saying it
<shevy> tax welcome to ruby! :)
<apeiros> if you want, you can btw. relatively easily implement classical OOP in JS.
newjersey has joined #ruby
<Elysia> if you told most people you are an "object oriented javascript programmer" chances are people will laugh at you in a similar fashion of of calling HTML coding
<Elysia> at least, that's what I'd imagine.
synthroid has joined #ruby
tuelz3 has quit [Ping timeout: 250 seconds]
IrishGringo has quit [Ping timeout: 250 seconds]
<arup_r> He said, people thinks it as classical inheritance.. then some says prototype inheritance.. WRONG! .. .. it is always object delegation which is in the heart of JS
joseph has joined #ruby
<arup_r> let me find the blog.. I hope it will take time
<shevy> yeah... ruby is the most prototypical among the classical OOP languages
<tax> i'm very conflicted between ruby,js,c++,objective-c. mainly because of popularity,reources/materials/source code out there. career.
<apeiros> arup_r: so he make up stuff? fun
<tax> if i had a favorite then it would probably be ruby.
<shevy> tax you can also have a look at Io for another prototype-based programming language - I am not sure how active they are but they had some nice things, like introspection at runtime (ruby did not have that in ... 1.8.x I think) http://iolanguage.org/about.html
hanmac has joined #ruby
<shevy> I did not like some of the syntax choices like assignment :(
<shevy> they distinguish between setting a slot, and updating a slot
<arup_r> No idea, he has enough arguments about his sentences.. need to give this some time https://github.com/getify/You-Dont-Know-JS
Vile` has joined #ruby
lxsameer has joined #ruby
<arup_r> He went deeper as much as possible.. and very clear writing..
<tax> i'm coming from perl.
<arup_r> exactly same talks here https://frontendmasters.com/courses/ .. and awesome!
<shevy> tax like eam!
<adaedra> tax: so you're looking for what, another language to learn?
<shevy> tax look what a bushy moustache he has got https://github.com/eam
<arup_r> anyway, my JS learning still going on.. besides ruby.. and enjoying both. :D
<tax> a sustainable future
<shevy> java?
<adaedra> I don't think anyone can see what the future will be made of yet.
saneax is now known as saneax_AFK
<apeiros> arup_r: and I'm supposed to read what of all that for that claim of JS not being OOP and not being prototypical?
<arup_r> shevy: deep learning what is function here ->> https://frontendmasters.com/courses/functional-js-lite/ if you have time to watch all those.
<apeiros> arup_r: even though, honestly, I see little point in reading it - JS is pretty much the text book definition of prototypical OOP
<arup_r> apeiros: I went through the book once.. I have to search the chapter and give the link.. I forgot in which part he said all that..
<shevy> arup_r ok... I can watch later probably
<apeiros> arup_r: ok
<arup_r> I will ping you the link.. apeiros
<apeiros> thanks
duderonomy has quit [Read error: Connection reset by peer]
n008f4g_ has joined #ruby
<shevy> tax why don't you stick to perl by the way? this question is mostly out of curiousity, I used perl before ruby but not anywhere near as much as I would use ruby lateron
Xeago has quit [Remote host closed the connection]
<apeiros> arup_r: anyway, wrt the term "OOP" - look up what alan key has to say about it. and as far as I remember, all that is needed is objects accepting messages (by which definition C++ actually isn't OO) - the way classes or hierarchies work is irrelevant
hays has quit [Read error: Connection reset by peer]
vdamewood has quit [Remote host closed the connection]
<shevy> yeah
<shevy> I concur there :)
<apeiros> and for note - alan key is the guy who coined the term "object oriented"
* adaedra checks on his arguments pyramid
vdamewood has joined #ruby
<apeiros> adaedra: always check the tip first :D
M-Kodo has quit [Ping timeout: 276 seconds]
<arup_r> I'll watch this soon~ https://www.youtube.com/watch?v=lKCCZTUx0sI :)
sapslaj has quit [Quit: No Ping reply in 180 seconds.]
merida_ has quit [Remote host closed the connection]
duderonomy has joined #ruby
aspiers has joined #ruby
hays has joined #ruby
<arup_r> manay many things to learn.. for me still... wow!.. apeiros thanks for saying the name who coined the term. never knew it
<norc> apeiros: And JS might even be the best candidate for OOP in general, since it is more object oriented than most languages out there.
merida has joined #ruby
Ox0dea has quit [Ping timeout: 244 seconds]
slackR has quit [Ping timeout: 276 seconds]
sapslaj has joined #ruby
<arup_r> You think like that way.. it is not. :(
<arup_r> anyway, my skill in JS is not reached till that point, that I can keep arguing .. so I will be shut up now..
lxsameer has quit [Ping timeout: 260 seconds]
<norc> apeiros: Im not sure I agree with the statement about C++ though, since classes are the mechanism in C++ that allow an object to receive messages.
<apeiros> norc: it doesn't actually work by retrieving messages
<norc> What do you mean?
swills has quit [Ping timeout: 244 seconds]
<norc> (Though we could simplify this discussion to C level with a struct containing a function pointer)
Tempesta_ has joined #ruby
M-Kodo has joined #ruby
<apeiros> we should move it to #ot ;-)
merida has quit [Ping timeout: 244 seconds]
c355e3b has quit [Ping timeout: 264 seconds]
tagaulap has quit [Ping timeout: 264 seconds]
Rickmasta has quit [Ping timeout: 264 seconds]
biberu\ has joined #ruby
biberu has quit [Ping timeout: 264 seconds]
Es0teric has quit [Ping timeout: 264 seconds]
lxsameer has joined #ruby
sdothum has quit [Ping timeout: 264 seconds]
ldnunes has quit [Ping timeout: 264 seconds]
Coldblackice_ has quit [Ping timeout: 264 seconds]
ocbtec has quit [Ping timeout: 264 seconds]
johnny56_ has quit [Ping timeout: 264 seconds]
solars has quit [Ping timeout: 264 seconds]
modin has quit [Ping timeout: 264 seconds]
Xeago has joined #ruby
Tempesta has quit [Ping timeout: 264 seconds]
x0f has quit [Ping timeout: 264 seconds]
phredus_ has quit [Ping timeout: 264 seconds]
tildes has quit [Ping timeout: 264 seconds]
DoubleMalt has quit [Ping timeout: 264 seconds]
zapata has joined #ruby
ocbtec has joined #ruby
Rickmasta has joined #ruby
Coldblackice has joined #ruby
tagaulap has joined #ruby
n008f4g_ has quit [Ping timeout: 260 seconds]
c355e3b has joined #ruby
Xeago has quit [Remote host closed the connection]
phredus has joined #ruby
dionysus69 has quit [Ping timeout: 260 seconds]
BSaboia has joined #ruby
<linduxed> norc: i think serialization makes the most sense
x0f has joined #ruby
terlar has joined #ruby
dgncn has quit [Excess Flood]
lxsameer has quit [Ping timeout: 260 seconds]
<tax> thanks for the insight
Trieste has quit [Ping timeout: 264 seconds]
sdothum has joined #ruby
dgncn has joined #ruby
Xeago has joined #ruby
Trieste has joined #ruby
lxsameer has joined #ruby
terlar has quit [Ping timeout: 252 seconds]
GodFather has joined #ruby
Es0teric has joined #ruby
ldnunes has joined #ruby
tildes has joined #ruby
DoubleMalt has joined #ruby
arup_r has left #ruby [#ruby]
NC30 has joined #ruby
solars has joined #ruby
jgt2 has joined #ruby
Nanuq has quit [Ping timeout: 264 seconds]
bruno- has joined #ruby
Nanuq has joined #ruby
Es0teric has quit [Ping timeout: 260 seconds]
jgt1 has quit [Ping timeout: 276 seconds]
despai has joined #ruby
CloCkWeRX has joined #ruby
Xeago has quit [Remote host closed the connection]
Xeago has joined #ruby
dionysus69 has joined #ruby
madgen has quit [Ping timeout: 252 seconds]
chouhoulis has joined #ruby
bruno- has quit [Ping timeout: 252 seconds]
Xeago has quit [Remote host closed the connection]
Xeago has joined #ruby
Es0teric has joined #ruby
baweaver has joined #ruby
Ox0dea has joined #ruby
Xeago has quit [Remote host closed the connection]
Vile` has quit [Ping timeout: 252 seconds]
tuelz3 has joined #ruby
kareeoleez has quit [Remote host closed the connection]
baweaver has quit [Ping timeout: 244 seconds]
yaewa has quit [Quit: Leaving...]
moei has joined #ruby
boomsie has joined #ruby
Xeago has joined #ruby
kareeoleez has joined #ruby
ramortegui has joined #ruby
<boomsie> Hi all. I want to retrieve the IP address that's on the first line of an output. I have some code that does that at the moment: https://gist.github.com/anonymous/f09cdcbfb7d574e45a490135649b5313. But it fails if the IP address is an IPv6 address (since it uses colon-delimiters). How do I grab the IP address, whether it's IPv4 or IPv6?
MagePsycho_ has quit [Quit: MagePsycho_]
<boomsie> I imagine there's an easier way to do even the IPv4 case that generalises to IPv6. What I've done so far is fairly ugly..
<adaedra> Get the first line and split on the first : to get the right part?
<adaedra> output.lines.first.partition(': ').last
Xeago has quit [Remote host closed the connection]
PedramT has joined #ruby
<adaedra> &ri String#lines String#partition boomsie
Nanuq has quit [Ping timeout: 264 seconds]
pawnbox has joined #ruby
<adaedra> for reference
<boomsie> adaedra: thanks! I'll give that a try, hang on :-)
Es0teric has quit [Ping timeout: 260 seconds]
Nanuq has joined #ruby
Es0teric has joined #ruby
<darix> boomsie: maybe check how libraries like ohai/facter do it
aegis3121 has joined #ruby
ekinmur has joined #ruby
djbkd has joined #ruby
karmatr0n has joined #ruby
biberu\ has quit []
charliesome has joined #ruby
<boomsie> adaedra: that worked a treat. Now I'll read your links. |Thanks very much!
biberu has joined #ruby
Es0teric has quit [Ping timeout: 260 seconds]
eljimmy has quit [Quit: This computer has gone to sleep]
djbkd has quit [Ping timeout: 252 seconds]
armatechnicos has joined #ruby
Es0teric has joined #ruby
Es0teric_ has joined #ruby
cdg has joined #ruby
boomsie has quit [Quit: Page closed]
cdg has quit [Remote host closed the connection]
Sammichmaker has joined #ruby
madgen has joined #ruby
Xeago has joined #ruby
j3r0 has joined #ruby
cdg has joined #ruby
Es0teric has quit [Ping timeout: 276 seconds]
Xeago has quit [Remote host closed the connection]
Vile` has joined #ruby
MagePsycho_ has joined #ruby
krz has joined #ruby
armatechnicos has quit [Quit: Leaving]
kobain has joined #ruby
kam270 has joined #ruby
nixmaniack has quit [Remote host closed the connection]
charlemagne has quit [Ping timeout: 276 seconds]
ta_ has quit [Remote host closed the connection]
malconis has joined #ruby
VeryBewitching has joined #ruby
malconis has quit [Remote host closed the connection]
<VeryBewitching> o/
malconis has joined #ruby
nando293921 has quit [Ping timeout: 252 seconds]
MagePsycho_ has quit [Quit: MagePsycho_]
IrishGringo has joined #ruby
krobzaur has joined #ruby
timonv has quit [Quit: WeeChat 1.4]
timonv has joined #ruby
charlemagne has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
despai has quit [Quit: Leaving]
despai has joined #ruby
lxsameer has quit [Ping timeout: 260 seconds]
terlar has joined #ruby
chouhoulis has quit [Remote host closed the connection]
hxegon has joined #ruby
webus has joined #ruby
abyx has joined #ruby
chouhoulis has joined #ruby
charlemagne has quit [Ping timeout: 244 seconds]
lxsameer has joined #ruby
Waqas has joined #ruby
PedramT_ has joined #ruby
rbennacer has joined #ruby
rbennacer has quit [Remote host closed the connection]
PedramT has quit [Ping timeout: 252 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
rbennacer has joined #ruby
nfk|laptop has joined #ruby
sdothum has joined #ruby
william3 has quit [Remote host closed the connection]
william3 has joined #ruby
Waqas has quit [Ping timeout: 276 seconds]
abyx has quit [Quit: This computer has gone to sleep]
Waqas has joined #ruby
meraxes has joined #ruby
sdothum has quit [Client Quit]
Pupeno has joined #ruby
hxegon is now known as hxegon_AFK
hxegon_AFK is now known as hxegon
bruno- has joined #ruby
sdothum has joined #ruby
infra-red has quit [Read error: Connection reset by peer]
krobzaur has quit [Ping timeout: 244 seconds]
infra-red has joined #ruby
PedramT has joined #ruby
SilverKey has joined #ruby
myntcake has joined #ruby
krobzaur has joined #ruby
Pupeno has quit [Remote host closed the connection]
hxegon has quit [Quit: BRB]
PedramT_ has quit [Ping timeout: 252 seconds]
psav has quit [Remote host closed the connection]
webus has quit [Ping timeout: 250 seconds]
Sammichmaker has quit [Ping timeout: 250 seconds]
ghr has quit [Ping timeout: 250 seconds]
Pupeno has joined #ruby
Vile` has quit [Ping timeout: 250 seconds]
madgen has quit [Ping timeout: 250 seconds]
krz has quit [Ping timeout: 250 seconds]
pietr0 has quit [Quit: pietr0]
krz has joined #ruby
vdamewood has quit [Excess Flood]
iamvery has quit [Ping timeout: 250 seconds]
SilverKey has quit [Quit: Halted.]
Pupeno has quit [Remote host closed the connection]
elaptics is now known as elaptics`away
idle_task has joined #ruby
bronson has joined #ruby
djbkd has joined #ruby
idletask has quit [Disconnected by services]
idle_task is now known as idletask
Vile` has joined #ruby
Rickmasta has quit [Ping timeout: 250 seconds]
iamvery has joined #ruby
Ox0dea has quit [Ping timeout: 250 seconds]
Ox0dea has joined #ruby
madgen has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
djbkd has quit [Ping timeout: 244 seconds]
Rickmasta has joined #ruby
DoubleMalt has quit [Ping timeout: 250 seconds]
jhack has joined #ruby
merida has joined #ruby
mustmodify__ has joined #ruby
eljimmy has joined #ruby
<mustmodify__> Did you ever have one of those days where you would swear things worked totally differently yesterday? And you wonder whether you were incompetent yesterday or today?
krobzaur has quit [Ping timeout: 260 seconds]
<apeiros> I was like "totally, yes" until "whether you were incompetent", there I went to "nope, totally not" :)
<mustmodify__> lol
<shevy> not for me when it is about programming; however had I perform awful when tired so in these cases the only cure and hope for improvement is to get some sleep
<shevy> or sometimes typos like "def intialize"
nfk|laptop has quit [Quit: yawn]
<apeiros> I'm more like "who fucked with this stuff in the meantime?!?" (and more often than not, that's actually the case for stuff working differently)
<mustmodify__> I was working with this one file with encoding issues. And yesterday I would have sworn I just did "force_encoding('utf-8')" and it magically worked. But I'm doing that now and it totally isn't magically working.
CloCkWeRX has quit [Ping timeout: 250 seconds]
<mustmodify__> so whatever.
<shevy> oh the evil of encoding
malcolmva has quit [Ping timeout: 250 seconds]
<mustmodify__> I mean, I have definitive proof that what is happening how is happening on multiple machines reproducibly... but ... I would have SWORN it was working differently.
swills has joined #ruby
<shevy> I think apeiros has like a 20.000 characters page about encodings somewhere on a gist :)
<apeiros> indeed
TvL2386 has quit [Remote host closed the connection]
Yiota has joined #ruby
newdan has left #ruby [#ruby]
<apeiros> and I should still publish it on ruby-community
Yiota has quit [Max SendQ exceeded]
<shevy> mustmodify__ some machines fail and how do they fail?
Yiota has joined #ruby
<mustmodify__> shevy: ???
mustmodify__ is now known as mustmodify
Rasi has quit [Quit: WeeChat 1.4]
<mustmodify> stupid nick
sarbs has quit [Ping timeout: 250 seconds]
Rasi has joined #ruby
sarbs has joined #ruby
<shevy> mustmodify well you wrote that the magic is happening on multiple machines reproducibly!
<mustmodify> shevy: Sorry, didn't know if you were asking about my problem or something else.
<mustmodify> I have a file that is encoded in some windows encoding... Ubuntu guesses windows-1252
barajasfab has joined #ruby
<mustmodify> and there is a character that can't be read in UTF-8
<shevy> ah
kareeoleez has quit [Remote host closed the connection]
<shevy> reminds me of some other problem... with some russian encoding
treehug88 has joined #ruby
modin has joined #ruby
psmolen has quit [Ping timeout: 250 seconds]
<mustmodify> yesterday I would have sworn that I did File.read(whatever).force_encoding('utf-8') and it magically got rid of all the magic characters.
<mustmodify> But apparently not.
kam270 has quit [Ping timeout: 276 seconds]
<mustmodify> because today I have that file and, on multiple machines, tried that and it fails.
<apeiros> force_encoding on a single byte encoding will break if you have any character in the high-byte range (0x80-0xff)
<apeiros> so that's a horribly bad idea.
<mustmodify> at first I thought it was just happening on my machine because of some local OS config or something.
psmolen has joined #ruby
<apeiros> and no, it certainly wouldn't have made magic characters disappear (because those are in the high-byte range)
<mustmodify> right. Well I guess it was yesterday that I was being incompetent.
CloCkWeRX has joined #ruby
SilverKey has joined #ruby
<apeiros> if you know your encoding, the proper approach is setting it while reading the input (e.g. `File.read(path, encoding: 'windows-1252')`)
pawnbox has quit [Remote host closed the connection]
<apeiros> if you don't know the encoding - well, then you're fucked and you can just try to save as much skin as possible.
Jonah11_ has joined #ruby
kareeoleez has joined #ruby
ule has joined #ruby
<mustmodify> apeiros: in this case, I'm receiving files from medical labs.
webus has joined #ruby
<ule> hey guys.. I tried almost everything that I found on google to solve this error:
<mustmodify> Medical labs DO NOT CARE ABOUT ANYTHING.
<apeiros> the approach I chose at work where a file is in 99.999+% of all cases in one of utf-16, utf-8, windows-1252 or macroman was to first test for BOM (-> utf-16), test for valid_encoding? with utf-8 (-> utf-8), and then I did a frequency analysis on special chars for windows-1252 vs. macroman and picked the more probable
<ule> An error occurred while installing therubyracer (0.12.2), and Bundler cannot continue.
Jonah11_ has quit [Remote host closed the connection]
<ule> Anyone knows how to solve?
<apeiros> mustmodify: hit them with a clue-stick
<apeiros> mustmodify: if the clue doesn't stick, seee ^
<apeiros> ule: do as bundler tells you - namely install the gem separately and check the error
<mustmodify> like, if you call and say, "Hey uh... these values are wrong." and you had evidence, they MIGHT look into it. But if you ask about median values or distributions for test results, they're like, "We don't support science."
johnny56_ has joined #ruby
<mustmodify> ask about encoding and they look at me with a confused look.
mprelude has quit [Quit: WeeChat 1.4]
IrishGringo has quit [Ping timeout: 250 seconds]
<apeiros> mustmodify: well, obviously you have to explain it in a language they understand…
<ule> apeiros: that's the problem.. I tried to install the freaking bundle separatedly but didn't work.. not sure if it's related with MacOS 10.11.3
Pupeno has joined #ruby
<apeiros> ule: not the bundle. the gem.
OTORelic has joined #ruby
<ule> sudo gem install therubyracer -v '0.12.2'
<ule> creashes.. I'm using ruby 2.3
<apeiros> ule: aha. and you didn't tell us because you wanted to let us have the fun of riddling on that?
<mustmodify> ule: hint, if you're on a mac, you're going to experience pain with gems and stuff. Sorry. :(
<ule> dude.. I'm jumping on ruby since last week
<ule> all those incompatibilities with versions sucks
<apeiros> ule: anyway, if you want anybody to help, post the full error you get to a pastebin. likely you're using an old rubyracer with a new ruby.
<ule> apeiros: sorry.. I'm gonna do that..
<apeiros> mustmodify: that's just FUD. please refrain from that.
abyx has joined #ruby
<mustmodify> apeiros: Most labs seem to use windows. In fact, when I said I wanted to start receiving lab results, they suggested I download their windows client which "copies result files to your desktop."
<mustmodify> and I was like, "no."
<apeiros> the only gems I had issues so far were PITA almost regardless of the platform.
<apeiros> mustmodify: as long as the same lab keeps using the same export procedure, all you need to know is from which lab a file comes.
IrishGringo has joined #ruby
<apeiros> and figure the encoding once
kareeoleez has quit [Remote host closed the connection]
krobzaur has joined #ruby
malcolmva has joined #ruby
<mustmodify> yep. I'm assuming 1252 since that seems to work and just hard-coding that this interfaces uses this encoding.
hxegon has joined #ruby
<ule> apeiros: mustmodify http://pastebin.com/raw/LKphCfWD
<ruby[bot]> ule: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
<apeiros> hm, why's registing broken?
<mustmodify> apparently we don't like pastebin but if you whine enough we'll copy it to a gist for you. :S
CloCkWeRX has quit [Ping timeout: 250 seconds]
<ule> wtf
<ule> ok
<ule> soo.. I'll gist it..
pawnbox has joined #ruby
weemsledeux has joined #ruby
<mustmodify> just kidding.
<mustmodify> I don't think you should gist it.
<mustmodify> Oh wait
idefine has joined #ruby
<mustmodify> sorry
<mustmodify> yes you should gist it. I thought... nm.
Pupeno has quit [Remote host closed the connection]
<mustmodify> I'm having a bad day. Ignore me.
<mustmodify> Unless I ask a question.
<ule> here we go
<apeiros> hm, 0.12.2 seems to be the current version.
lxsameer has quit [Ping timeout: 276 seconds]
Pupeno has joined #ruby
<ule> humm
<apeiros> ah, but the files which make problems are from /usr/local
<apeiros> which would not be files from the gem
lxsameer has joined #ruby
<shevy> :)
<ule> maybe if I clea all the freaking gems?
bruno- has quit [Ping timeout: 252 seconds]
<ule> *clean
<ule> and install it again?
<ule> gonna try upgrating gcc
<apeiros> not sure what the problem is. but it sounds like it is trying to use a system v8, which can't be compiled.
darkf has quit [Quit: gn]
Chagel has joined #ruby
<apeiros> but according to therubyracer, it uses the libv8 gem…
<apeiros> what happens when you install the libv8 gem?
<ule> I installed v8 from brew
<ule> ok.. I'll remove and install again using gem..
norc has quit [Ping timeout: 250 seconds]
<ule> so.. I have a newba question...
pawnbox has quit [Ping timeout: 264 seconds]
<ule> We have gems, rbenv, rvm, bundle.. Why is ruby crazy like that
<ule> why too much packages managers
<apeiros> I guess that's why I was able to install it without problems - I don't have v8 via brew
<apeiros> ule: you're misunderstanding. those aren't all package managers.
<ule> apeiros: that makes sense
<apeiros> rubygems is the only package manager.
stannard_ has joined #ruby
<ule> ok.. and looks like it comes with mac out-of-the-box
<apeiros> rbenv, rvm, chruby etc. are ruby version managers. they enable having multiple ruby versions along each other and switching
<havenwood> ule: RubyGems ships with Ruby. Bundler is itself a gem. Yeah, Ruby (along with RubyGems) ships with OS X.
<apeiros> bundler builds up on rubygems to handle gems on a per-project basis and isolating it from system-gems (to avoid version conflicts among multiple developers of the package)
<ule> I see..
<ule> in PHP we only have composer.. and that's it
<ule> :)
<apeiros> i.e. bundler is there to ensure that everybody working on a project uses precisely the same version of all gems
stannard has quit [Ping timeout: 276 seconds]
Pupeno has quit [Remote host closed the connection]
<ule> gem uninstall libv8
<apeiros> bundler and rubygems will probably merge, though. rubygems already can handle a wide variety of bundlers tasks.
<ule> gem uninstall therubyracer
jolts has joined #ruby
navneet has joined #ruby
<mustmodify> It's UN-FREAKING-TESTABLE
<mustmodify> sorry just venting
crameth has quit [Quit: crameth]
<havenwood> ule: Packagist and PEAR and phppm and...
<apeiros> mustmodify: your encoding issue?
<adaedra> do: cat > /dev/null
<adaedra> and hop, a space to vent.
<mustmodify> adam12: Oh right, that's actually a good idea.
<mustmodify> :/
<havenwood> ule: You've kinda got it backwards.
<shevy> those poor cats
* apeiros only remembers PEAR
poerror has joined #ruby
<adaedra> PEAR rhymes with FEAR. Coincidence?
<shevy> pear also rhymes with bear!
<ule> havenwood: you right..
<apeiros> and that was similar to CPAN iirc, and would play in the same league as rubygems - again iirc.
<ule> :P
<mustmodify> I wrote an interface class that loads the files and then does some stuff. And the stuff is messing with my ability to test the encoding reproducably.
msg31 has left #ruby ["Leaving"]
<mustmodify> because I suck.
blandflakes has joined #ruby
<apeiros> mustmodify: stop thinking of <food|sexual adventures> then and start coding :-p
<shevy> mustmodify that may be but - look at the apeiros explanation above, where he has to check a lot of stuff
Pupeno has joined #ruby
<ule> sudo gem install libv8 -v '3.16.14.3' -- --with-system-v8
merida has quit [Remote host closed the connection]
<shevy> [Short summary] 1) test for BOM (-> utf-16) 2) test for valid_encoding? with utf-8 (-> utf-8) 3) frequency analysis on special chars for windows-1252 vs. macroman and pick the more probable
aganov has quit [Remote host closed the connection]
<ule> nothing
<shevy> ok it's not so short but still
<ule> both crashes
<ule> you know what.. fuck this shit.. I'm gonna run a docker with ubuntu or debian
<ule> :)
<apeiros> ?encoding mustmodify
<ruby[bot]> mustmodify: check https://gist.github.com/apeiros/39acc5b486f932403638 - it might contain useful informations to solve your encoding problems
evidex has quit [Remote host closed the connection]
lxsameer has quit [Ping timeout: 244 seconds]
krobzaur has quit [Quit: WeeChat 1.2]
<shevy> what is the libv8 component again?
<shevy> ah "V8 JavaScript engine"
fedexo has joined #ruby
<apeiros> ule: do you need libv8 for anything besides your ruby project? if not, I'd try to uninstall the brewed libv8.
tuelz3 has quit [Ping timeout: 252 seconds]
dionysus69 has quit [Ping timeout: 276 seconds]
poerror has quit [Ping timeout: 252 seconds]
Pupeno has quit [Remote host closed the connection]
stannard_ has quit [Ping timeout: 252 seconds]
<ule> I think I'll need
<ule> ok.. so.. I'll try to install v8 again
nanoz has joined #ruby
PedramT has quit [Ping timeout: 252 seconds]
navneet has quit [Read error: Connection reset by peer]
navneet_ has joined #ruby
davidbug has joined #ruby
<ule> sudo gem install libv8
bkxd has quit [Ping timeout: 244 seconds]
stannard has joined #ruby
ghr has joined #ruby
davidbug has quit [Remote host closed the connection]
Pupeno has joined #ruby
Jonah11_ has joined #ruby
jackjackdripper has joined #ruby
tubuliferous has joined #ruby
tuelz3 has joined #ruby
ghr has quit [Ping timeout: 250 seconds]
codecop has joined #ruby
william3 has quit [Remote host closed the connection]
codecop has quit [Client Quit]
dfockler has joined #ruby
<ule> ok
<ule> this is so cool.. check this out:
codecop has joined #ruby
forcer has quit [Remote host closed the connection]
<ule> gem list | grep therubyracer
ghr has joined #ruby
<ule> therubyracer (0.12.2)
Devalo has joined #ruby
<ule> now.. check this
<ule> bundle install
CloCkWeRX has joined #ruby
<ule> An error occurred while installing therubyracer (0.12.2), and Bundler cannot continue.
<ule> Make sure that `gem install therubyracer -v '0.12.2'` succeeds before bundling.
<ule> wtf?
Pupeno has quit [Remote host closed the connection]
Guest33142 has quit [Quit: Leaving.]
william3 has joined #ruby
<canton7> how long ago did you install therubyracer? could your build environment have changed?
pawnbox has joined #ruby
<ule> I installed like 2 minutes ago
<ule> brew install v8-315
<ule> gem install libv8 -v '3.16.14.13' -- --with-system-v8
<ule> gem install therubyracer -- --with-v8-dir=/usr/local/opt/v8-315
<ule> and that's it
<canton7> I'm guessing bundler isn't configured to pass --with-v8-dir?
<ule> maybe I have two versions of gem? one in system and another one in local env?
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ule> canton7: humm I'll try to set this
idefine has quit [Remote host closed the connection]
Pupeno has joined #ruby
<canton7> bundler's just telling you that it couldn't install therubyracer into a local gem bundle - since there's a lot of native stuff going on, that's probably because it's trying to use some incorrect configuration
<canton7> also, you might need to get bundler to install libv8? I'm guessing here
idefine has joined #ruby
ekinmur has joined #ruby
<ule> canton7: I forked a repository.. I was just running bundle especting that everything would work
fedexo has quit [Read error: Connection reset by peer]
navneet_ has quit [Remote host closed the connection]
<canton7> you've probably got v8 installed locally into a different place to the person who wrote the repository
dionysus69 has joined #ruby
<ule> that makes sense..
<ule> so.. I'll do some research to understand why those multiple options of install.. system/local
idefine has quit [Remote host closed the connection]
<ule> maybe I need to figure out how to get rid of system installs/gems
<canton7> I don't think that will affect you?
<ule> or create a kind of symbolic link poinint to the folder I want
Jonah11_ has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
william3 has quit [Ping timeout: 244 seconds]
<ule> so..
tildes has quit [Remote host closed the connection]
<ule> since I already have therubyracer installed.. I just commented it on my Gemfile
<ule> everything is more clear in my head now..
<ule> I'll read more about those things
barajasfab has quit [Ping timeout: 252 seconds]
SCHAAP137 has quit [Remote host closed the connection]
djbkd has joined #ruby
idefine has joined #ruby
davedev24 has joined #ruby
stannard has quit [Read error: Connection reset by peer]
_whitelogger has joined #ruby
olivierjanss has joined #ruby
Apocalypse has joined #ruby
avdi has joined #ruby
eggoez has joined #ruby
shevy has joined #ruby
GinoMan2440 has joined #ruby
Coldblackice_ has joined #ruby
Mekkis has joined #ruby
kareeoleez has joined #ruby
podman has joined #ruby
LaT0rtue has joined #ruby
xleagd has joined #ruby
jmcc________ has joined #ruby
idefine has joined #ruby
canton7_ has joined #ruby
sgambino_ has joined #ruby
soahccc has quit [Ping timeout: 264 seconds]
Zarthus has quit [Quit: I can't go to hell. I'm all out of vacation days.]
synthroid has quit [Remote host closed the connection]
madgen has quit [Ping timeout: 250 seconds]
navneet has quit [*.net *.split]
ekinmur has quit [*.net *.split]
CloCkWeRX has quit [*.net *.split]
tubuliferous has quit [*.net *.split]
jackjackdripper has quit [*.net *.split]
webus has quit [*.net *.split]
psmolen has quit [*.net *.split]
swills has quit [*.net *.split]
Rickmasta has quit [*.net *.split]
iamvery has quit [*.net *.split]
Waqas has quit [*.net *.split]
aegis3121 has quit [*.net *.split]
phredus has quit [*.net *.split]
Coldblackice has quit [*.net *.split]
ocbtec has quit [*.net *.split]
hanmac has quit [*.net *.split]
joseph has quit [*.net *.split]
callen92 has quit [*.net *.split]
gnufied has quit [*.net *.split]
lkba has quit [*.net *.split]
rippa has quit [*.net *.split]
sgambino has quit [*.net *.split]
Guest86672 has quit [*.net *.split]
M-shine has quit [*.net *.split]
Xiti has quit [*.net *.split]
mrgrieves has quit [*.net *.split]
sepp2k has quit [*.net *.split]
camilasan has quit [*.net *.split]
Couch has quit [*.net *.split]
SuperLag_ has quit [*.net *.split]
polysics has quit [*.net *.split]
joevandyk has quit [*.net *.split]
martinbjeldbak has quit [*.net *.split]
hk238 has quit [*.net *.split]
funnel has quit [*.net *.split]
free_beard has quit [*.net *.split]
smalltalker has quit [*.net *.split]
err_ok has quit [*.net *.split]
zacstewa_ has quit [*.net *.split]
cout has quit [*.net *.split]
pabs has quit [*.net *.split]
tw1sted has quit [*.net *.split]
AndyBotwin has quit [*.net *.split]
Guest76129 has quit [*.net *.split]
Asher has quit [*.net *.split]
ruurd has quit [*.net *.split]
Guest25588 has quit [*.net *.split]
helpa has quit [*.net *.split]
joast has quit [*.net *.split]
MissionCritical has quit [*.net *.split]
programmerq has quit [*.net *.split]
ltp has quit [*.net *.split]
speakingcode has quit [*.net *.split]
mburns_ has quit [*.net *.split]
jgrevich has quit [*.net *.split]
jidar has quit [*.net *.split]
Tharbakim has quit [*.net *.split]
marens has quit [*.net *.split]
tsunamie has quit [*.net *.split]
whiteline has quit [*.net *.split]
raenk_ has quit [*.net *.split]
reaVer has quit [*.net *.split]
Emmanuel_Chanel has quit [*.net *.split]
bnagy_ has quit [*.net *.split]
canton7 has quit [*.net *.split]
awk has quit [*.net *.split]
Mekkis_ has quit [*.net *.split]
ByronJohnson has quit [*.net *.split]
MaienM has quit [*.net *.split]
[ace] has quit [*.net *.split]
ammar_ has quit [*.net *.split]
surrounder has quit [*.net *.split]
Drakevr has quit [*.net *.split]
yasu_ has quit [*.net *.split]
vifino has quit [*.net *.split]
frem has joined #ruby
martinbjeldbak_ has joined #ruby
vifino- has joined #ruby
canton7_ is now known as canton7
william3 has joined #ruby
manveru has joined #ruby
M-shine has joined #ruby
Waqas has joined #ruby
russt has joined #ruby
callen92 has joined #ruby
camilasan has joined #ruby
nuck has joined #ruby
d0nn1e has quit [Ping timeout: 260 seconds]
nuck is now known as Guest98950
tubuliferous has joined #ruby
flaf has joined #ruby
nyuszika7h has quit [Ping timeout: 264 seconds]
sneep has quit [Ping timeout: 264 seconds]
aegis3121 has joined #ruby
jgrevich has joined #ruby
helpa-bot has quit [Remote host closed the connection]
kareeoleez has quit [Ping timeout: 257 seconds]
c355e3b has quit [Ping timeout: 257 seconds]
yo61 has quit [Ping timeout: 257 seconds]
helpa has joined #ruby
yasu_ has joined #ruby
agent_white has joined #ruby
frode15243 has quit [Ping timeout: 269 seconds]
nyandoge has quit [Ping timeout: 269 seconds]
bcavileer has quit [Ping timeout: 269 seconds]
siaw has joined #ruby
bnagy has joined #ruby
joaomdmoura__ has quit [Ping timeout: 260 seconds]
poguez_ has quit [Ping timeout: 260 seconds]
programmerq has joined #ruby
zipkid has quit [Ping timeout: 260 seconds]
surrounder has joined #ruby
thesheff17 has joined #ruby
senayar has quit []
Emmanuel_Chanel has joined #ruby
Tharbakim has joined #ruby
jidar has joined #ruby
<Hobart> anyone familiar with native ext. gem building around? (getting an error msg, not sure if it indicates a bad configure script)
d0nn1e has joined #ruby
free_beard has joined #ruby
whiteline has joined #ruby
nemesit|znc has joined #ruby
al2o3-cr1 has joined #ruby
tagaulap has quit [Ping timeout: 260 seconds]
gnufied has joined #ruby
jaruga__ has quit [Ping timeout: 260 seconds]
al2o3-cr has quit [Read error: Connection reset by peer]
jaruga__ has joined #ruby
MaienM has joined #ruby
sepp2k has joined #ruby
barajasfab has joined #ruby
[ace] has joined #ruby
hk238 has joined #ruby
webus has joined #ruby
C0deMaver1ck has joined #ruby
hk238 has quit [Max SendQ exceeded]
barajasfab has quit [Max SendQ exceeded]
funnel_ has quit [Changing host]
funnel_ has joined #ruby
Trieste has joined #ruby
funnel_ is now known as funnel
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
marens has joined #ruby
C0deMaver1ck is now known as Guest12816
jzigmund has quit [Ping timeout: 276 seconds]
Couch has joined #ruby
SilverKey has quit [Read error: Connection reset by peer]
mburns has joined #ruby
zacstewart has quit []
tsunamie has joined #ruby
Zarthus has joined #ruby
agentmeerkat has joined #ruby
kapowaz has joined #ruby
nyuszika7h has joined #ruby
SilverKey has joined #ruby
al2o3-cr1 is now known as al2o3-cr
daxroc has joined #ruby
AckZ has joined #ruby
pawnbox has quit [Remote host closed the connection]
troter_________ has joined #ruby
psmolen has joined #ruby
raenk has joined #ruby
maletor has joined #ruby
spastorino has joined #ruby
mroth has joined #ruby
lxsameer has joined #ruby
lxsameer has joined #ruby
Jonah11_ has joined #ruby
ammar has joined #ruby
tonini has joined #ruby
pabs has joined #ruby
barajasfab has joined #ruby
Guest12816 has quit [Ping timeout: 276 seconds]
Arcaire has joined #ruby
merida has joined #ruby
arup_r has joined #ruby
nyandoge has joined #ruby
stannard_ has joined #ruby
bb010g has joined #ruby
banister has joined #ruby
hanmac has joined #ruby
navneet_ has quit [Remote host closed the connection]
stannard has quit [Ping timeout: 252 seconds]
Nanuq has quit [Ping timeout: 264 seconds]
navneet has joined #ruby
C0deMaver1ck_ has joined #ruby
navneet has quit [Read error: Connection reset by peer]
borkdude has joined #ruby
optimaleatscout_ has joined #ruby
bedouin has joined #ruby
MissionCritical has joined #ruby
dmnd has joined #ruby
navneet has joined #ruby
cbetta has joined #ruby
ruurd has joined #ruby
jabreity has joined #ruby
bauruine has joined #ruby
ramblinpeck has joined #ruby
Jonah11_ has quit [Ping timeout: 250 seconds]
tagaulap has joined #ruby
arup_r has left #ruby [#ruby]
newjersey has quit [Read error: Connection reset by peer]
deeprave has joined #ruby
monod has joined #ruby
poguez_ has joined #ruby
kareeoleez has joined #ruby
frode15243 has joined #ruby
zrl has joined #ruby
nixmaniack has joined #ruby
acerna has joined #ruby
navneet has quit [Ping timeout: 276 seconds]
bcavileer has joined #ruby
<agent_white> Mornin' folks
<flaf> Hi, I would like to use heredoc to put a string in a variable. I would like to be able to break long lines in the code but have a string without \n (just one line)in the variable. The only way I have found is https://gist.github.com/flaf/5be7d57b163b987dc4cef13656367693 . Is there simpler? Maybe I have missed a magic syntax with heredoc?
cstrahan has joined #ruby
joaomdmoura__ has joined #ruby
kexmex__ has joined #ruby
soahccc has joined #ruby
phrozen77 has joined #ruby
<kexmex__> hi
c355e3b has joined #ruby
<kexmex__> whats the diff between "" and :
bkxd has joined #ruby
pawnbox has joined #ruby
<dfockler> In what context?
nixmaniack has quit [Ping timeout: 276 seconds]
kareeoleez has quit [Ping timeout: 276 seconds]
im0b has joined #ruby
lxsameer has quit [Ping timeout: 252 seconds]
err_ok has joined #ruby
hk238 has joined #ruby
hk238 has quit [Client Quit]
deepak has joined #ruby
<shevy> :)
MagePsycho_ has quit [Quit: MagePsycho_]
lkba has joined #ruby
jzigmund has joined #ruby
<canton7> flaf, https://eval.in/554189? It doesn't create an intermediate array at least, although it will remove extra leading whitespace as well
nhhc has quit [Remote host closed the connection]
william3 has quit [Remote host closed the connection]
william3 has joined #ruby
bkxd has quit [Ping timeout: 250 seconds]
<flaf> Ah thx canton7. It's better than my code. Impossible to have a way without gsub, correct?
dfockler has quit [Quit: Leaving]
<flaf> No magic heredoc syntax?
<mustmodify> kexmex__: One is composed of two double-quote characters. The other is composed of a colon character.
<canton7> not that I know of
zipkid has joined #ruby
<flaf> Ok, thx canton7.
inukshuk_ has joined #ruby
inukshuk_ has quit [Client Quit]
madgen has joined #ruby
dopie_ has quit [Quit: Lost terminal]
callen92 has quit [Quit: Leaving]
<al2o3-cr> flaf: https://eval.in/554190
<kexmex__> dfockler: in map keys i guess
PedramT has quit [Remote host closed the connection]
dopie has joined #ruby
yo61 has joined #ruby
ssiris has joined #ruby
brent__ has joined #ruby
bosnianboy has joined #ruby
brunto has quit [Ping timeout: 252 seconds]
merida has quit [Remote host closed the connection]
bosnianboy has quit [Client Quit]
merida has joined #ruby
anisha has quit [Quit: Leaving]
<brent__> i'm suppose to pick an algorithm and understand it and present it to a group, and wondering if anyone had any suggestions for a popular algorithm that would be useful to know
<flaf> al2o3-cr: thx but I would like to use heredoc to avoid questions concerning ", ' escaping etc.
stannard_ has quit [Read error: Connection reset by peer]
Rickmasta has joined #ruby
<al2o3-cr> flaf: fair enough :P
blackms has quit [Quit: Leaving]
heyimwill has joined #ruby
Regulati_ has joined #ruby
kareeoleez has joined #ruby
Chagel has quit [Ping timeout: 244 seconds]
synthroid has joined #ruby
amclain has joined #ruby
AlexJakeGreen has quit [Remote host closed the connection]
Nanuq has joined #ruby
RegulationD has quit [Ping timeout: 244 seconds]
lxsameer has joined #ruby
aegis3121 has quit [Ping timeout: 244 seconds]
<mustmodify> brent__: http://www.sorting-algorithms.com/ ?
tax has quit [Quit: Leaving]
Couch has quit [Ping timeout: 252 seconds]
bluOxigen has joined #ruby
bosnianboy has joined #ruby
<bosnianboy> hi all
<bosnianboy> got a noob question
G has joined #ruby
kareeoleez has quit [Ping timeout: 276 seconds]
<bosnianboy> I'm building a docker image with ruby 2.3
<bosnianboy> based on alpine
<bosnianboy> it throws me these on some gems
<bosnianboy> "You have to install development tools first"
krasnus has joined #ruby
Jonah11_ has joined #ruby
tax has joined #ruby
<bosnianboy> what needs to be installed for that part?
idefine has quit [Read error: Connection reset by peer]
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
newdan has joined #ruby
acidrainfall has joined #ruby
idefine has joined #ruby
Hobbyboy has joined #ruby
idefine has quit [Read error: Connection reset by peer]
drptbl_ has quit [Ping timeout: 244 seconds]
idefine has joined #ruby
<adaedra> bosnianboy: a c compiler (gcc, usually), ruby development headers.
<acidrainfall> So I'm trying to figure out how to get the elasticsearch-api gem syntax for this command: /(index)/_stats/commit?level=shards. This is what my code looks like (just an out of context snippet for testing) http://fpaste.org/356287/07364231/ and here's the docs on the api: http://www.rubydoc.info/gems/elasticsearch-api/Elasticsearch/API/Indices
<bosnianboy> thanks adaedra
<newdan> Is there a way to do `def an_instance.method` but in a non-syntactic way? I want to use a block so I can access outer vars. (I'm writing a test and I want to set a flag if a method is called. So the body is something like `super.tap { got_called = true }`)
djbkd has joined #ruby
<acidrainfall> client.indices.stats.commit is not valid, nor is client.indices.stats commit: true.
krobzaur has joined #ruby
<brent__> mustmodify : any recommendations on which one may be most beneficial?
<shevy> newdan define_method does not work?
baweaver has joined #ruby
OTORelic1 has quit [Ping timeout: 252 seconds]
<newdan> shevy: It does that on the class, but I don't want to change the whole class, I just want this feature for this one test
shinnya has joined #ruby
Devalo has quit [Remote host closed the connection]
dangerousdave has joined #ruby
Timberwo|f has joined #ruby
djbkd has quit [Ping timeout: 276 seconds]
smathy has joined #ruby
<newdan> `an_instance.define_singleton_method(:some_method){|*args| super(*args).tap{ got_called = true }}` seems to do what I'm after... Does that look wrong to anyone? (Other than that it's all on one line, in my source it'll be expanded)
Timberwo|f has quit [Max SendQ exceeded]
<shevy> it looks very complex
synthroid has quit [*.net *.split]
heyimwill has quit [*.net *.split]
brent__ has quit [*.net *.split]
deepak has quit [*.net *.split]
pawnbox has quit [*.net *.split]
Bilge has quit [*.net *.split]
davidbug has joined #ruby
Bilge has joined #ruby
brent__ has joined #ruby
Xeago has joined #ruby
pawnbox has joined #ruby
synthroid has joined #ruby
<newdan> Yeah, I am not gonna commit it looking like that. Just didn't wanna have a multiline paste into IRC
aufi has quit [Ping timeout: 252 seconds]
deepak has joined #ruby
treehug88 has quit [Quit: Textual IRC Client: www.textualapp.com]
JesseH has joined #ruby
maletor has quit [Read error: Connection reset by peer]
err_ok has quit [Ping timeout: 260 seconds]
ramblinpeck has quit [Ping timeout: 260 seconds]
kfpratt has quit [Remote host closed the connection]
tristanp has quit []
Es0teric_ has quit [Remote host closed the connection]
audiodude has quit [Ping timeout: 260 seconds]
dmnd has quit [Ping timeout: 276 seconds]
optimaleatscout_ has quit [Ping timeout: 276 seconds]
heyimwill has joined #ruby
jpinnix_______ has quit [Ping timeout: 260 seconds]
SilverKey has quit [Read error: Connection reset by peer]
kareeoleez has joined #ruby
SilverKey has joined #ruby
ramblinpeck has joined #ruby
err_ok has joined #ruby
Xeago has quit [Ping timeout: 268 seconds]
optimaleatscout_ has joined #ruby
tristanp_ has joined #ruby
jpinnix_______ has joined #ruby
Arcaire has quit [Ping timeout: 276 seconds]
hobodave has joined #ruby
dmnd has joined #ruby
audiodude has joined #ruby
krobzaur has quit [Quit: WeeChat 1.4]
<shevy> will still be complex even if spaced out onto several lines :)
Arcaire has joined #ruby
lkba has quit [Ping timeout: 276 seconds]
lkba has joined #ruby
<newdan> I dunno. Doesn't seem *that* complex imo, and with a comment saying the whole point is to just set got_called if the method gets called, I think it's not too hard to puzzle out. My test makes no sense if some other part of the system results in that method not being called so I think the small complexity in this specific test is acceptable
zipkid has quit [Ping timeout: 276 seconds]
<newdan> I mean I would be happy if I could do it in a simpler way
kareeoleez has quit [Ping timeout: 252 seconds]
Snowy has quit [Quit: ragequit]
pabs has quit [Ping timeout: 276 seconds]
<toretore> i think it's fine
n008f4g_ has joined #ruby
benlieb has joined #ruby
<toretore> it's basically a mock or spy
bb010g has quit [Ping timeout: 276 seconds]
zipkid has joined #ruby
marens has quit [Ping timeout: 276 seconds]
marens has joined #ruby
madgen has quit [Ping timeout: 250 seconds]
[ace] has quit [Ping timeout: 276 seconds]
<smathy> Can just do super.tap no?
freerobby has quit [Quit: Leaving.]
kareeoleez has joined #ruby
polysics_ has quit []
spastorino has quit [Ping timeout: 276 seconds]
<newdan> smathy: Not in a block. If I declared with `def an_instance.some_method(*args)` then yes
MagePsycho_ has joined #ruby
bb010g has joined #ruby
ammar has quit [Ping timeout: 276 seconds]
<bosnianboy> is there a way to install ruby-dev from source?
ammar has joined #ruby
<smathy> newdan, interesting, thanks. TIL
Timberwo|f has joined #ruby
shtirlic has joined #ruby
tsunamie has quit [Ping timeout: 276 seconds]
PedramT has joined #ruby
spastorino has joined #ruby
phpwebdev has joined #ruby
dopie has quit [Ping timeout: 276 seconds]
webus has quit [Ping timeout: 276 seconds]
<shevy> bosnianboy isn't that some distribution package? and -dev would imply header files
PedramT has quit [Remote host closed the connection]
kareeoleez has quit [Ping timeout: 260 seconds]
TomyWork has quit [Ping timeout: 244 seconds]
dopie has joined #ruby
C0deMaver1ck_ has quit [Ping timeout: 276 seconds]
<bosnianboy> shevy, don't have distort package for alpine linux (docker) trying to build it and I need header files for gems that require compiling
JesseH has quit [Read error: Connection timed out]
dionysus69 has quit [Ping timeout: 260 seconds]
rrichardsr3 has joined #ruby
C0deMaver1ck has joined #ruby
C0deMaver1ck is now known as Guest57823
tsunamie has joined #ruby
<nickjj> bosnianboy, why not use the official hub's ver of ruby?
shtirlic has quit [Ping timeout: 276 seconds]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<bosnianboy> nickjj, isn't that 2.2 ruby?
<nickjj> they have a lot of different 2.x versions (including an alpine release)
skislak has quit [Quit: Leaving]
<nickjj> 2.1 to 2.3
terminalrecluse has joined #ruby
webus has joined #ruby
<nickjj> i just migrated an app to an alpine base and it went from 450mb to 112mb
blackmesa has joined #ruby
rclsilve1 is now known as rclsilver
jdm has quit [Remote host closed the connection]
dangerousdave has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
modin has joined #ruby
<bosnianboy> this one, nickjj ?
tax has quit [Quit: Leaving]
[ace] has joined #ruby
jzigmund has quit [Ping timeout: 276 seconds]
<nickjj> bosnianboy, yeah
rbr has quit [Disconnected by services]
jzigmund has joined #ruby
<bosnianboy> yep, used that one initially, but some gems fail on compiling
rbr has joined #ruby
<nickjj> were you using jessie before?
<nickjj> you'll need to add in a few supporting packages so you can compile a couple of gems
johnny56_ has joined #ruby
<nickjj> for instance with postgres, you would typically need libpq-dev installed on a debian based OS but with alpine that package is named postgresql-dev
infra-red has quit [Remote host closed the connection]
aufi has joined #ruby
<nickjj> if you're interested, this blog post has a super optimized dockerfile for alpine http://nickjanetakis.com/blog/alpine-based-docker-images-make-a-difference-in-real-world-apps -- i use the same strategy for my rails apps and the savings in size are similar
rrichardsr3 has quit [Quit: He who dares .... wins.]
djbkd has joined #ruby
shtirlic has joined #ruby
garethrees has quit [Ping timeout: 260 seconds]
<acidrainfall> I'm having a hell of a time with this. I have a multi-level JSON hash from elasticsearch, and I want to .each on a particular set of keys. What would you do?
atmosx has quit [Max SendQ exceeded]
pawnbox has quit [Remote host closed the connection]
<acidrainfall> This is what the chain looks like: stats['indices'][index]['shards']
atmosx has joined #ruby
<acidrainfall> I want to .each on each shard.
hk238 has joined #ruby
kareeoleez has joined #ruby
pawnbox has joined #ruby
hk238 has quit [Max SendQ exceeded]
stannard has joined #ruby
pabs has joined #ruby
FifthWall has quit [Ping timeout: 276 seconds]
nanoz] has quit [Read error: Connection reset by peer]
nando293921 has joined #ruby
baweaver has quit [Remote host closed the connection]
tildes has joined #ruby
dhollinger has joined #ruby
FifthWall has joined #ruby
curses has joined #ruby
mikecmpbll has joined #ruby
<acidrainfall> .each_key?
<jhass> just .each?
FooMunki has joined #ruby
<acidrainfall> .each was pulling the entire dataset
<acidrainfall> .each_key gets me what I want.
IrishGringo has quit [Ping timeout: 244 seconds]
aufi has quit [Ping timeout: 252 seconds]
tildes has quit [Client Quit]
kareeoleez has quit [Ping timeout: 252 seconds]
stannard has quit [Ping timeout: 268 seconds]
<Shidash> so I'm having a problem that seems a bit stupid- I'm trying to generate html for a link and save it in a string variable so I can use it later. To do this, I'm doing- '<a href="'+url+'">'
<Shidash> the problem is, when this variable is saved in a JSON, all the double quotes are escaped with a \ before them, so the html does not work
Shaun__ has joined #ruby
<Shidash> I've tried many variations and can't seem to get a version without escaped double quotes. Printing the variable in irb shows the html correctly, but for some reason the json shows the escaped version
nixmaniack has joined #ruby
nixmaniack has joined #ruby
<jhass> ?code
<ruby[bot]> We can't help you without your code, please post it to https://gist.github.com
pawnbox has quit [Remote host closed the connection]
bosnianboy has quit [Quit: This computer has gone to sleep]
<Shidash> that's literally the code
<Shidash> it's on a different computer, will retype here
alexherbo2 has joined #ruby
pawnbox has joined #ruby
<jhass> >> require "json"; %(quotes " quotes " quotes).to_json
<ruby[bot]> jhass: # => "\"quotes \\\" quotes \\\" quotes\"" (https://eval.in/554202)
<jhass> is that what confuses you?
<jhass> >> require "json"; puts %(quotes " quotes " quotes).to_json
<ruby[bot]> jhass: # => "quotes \" quotes \" quotes" ...check link for more (https://eval.in/554203)
<Shidash> yes, I think that's the problem
<Shaun__> I have a beginners question with Ruby that I'd like answered because it's confusing the heck out of me.
<Shidash> though when I show the value of the variable in irb, the quotes are also escaped before .to_json, so I'm not sure this is caused by to_json?
<jhass> Shidash: irb like the above uses .inspect
idefine has quit []
iamayam has quit [Ping timeout: 276 seconds]
<jhass> Shidash: I think you have a non-issue and are just confused about representation and value of certain things
BTRE has quit [Ping timeout: 260 seconds]
<Shidash> jhass: it's definitely a problem. That JSON is later being read by a separate rails app, which can't parse it correctly because of the escaping
<toretore> Shidash: it's impossible to help unless we know exactly what your code does
jaruga__ has quit [Quit: jaruga__]
<jhass> both sides actually
iamayam has joined #ruby
<Shidash> yeah, it's split over enough things that I'm not sure how to convey it yet
<toretore> there are several layers of serialization here that will likely escape those quote marks
<Shidash> yeah
<Shidash> I was hesitant to post this hear because I still need to clean up one script before I put it on github
<Shidash> *here
<Shidash> but I've been stuck on this for a full day now
Shaun__ has quit [Quit: Leaving]
<jhass> btw the general idea sounds dangerous too, some html in some json probably delivered to a user in the end without any escaping, I hope you have no user content in there and proper authentication on the transport
<Shidash> jhass: it's not user content. It's links to other pages on the same website
<Shidash> which is read only
<toretore> >> require 'json'; s = '<a href="'+'url'+'">'; j = JSON.generate({url: s}); puts JSON.parse(j))['url']
<ruby[bot]> toretore: # => /tmp/execpad-3cf16e7606d2/source-3cf16e7606d2:2: syntax error, unexpected ')', expecting keyword_end ...check link for more (https://eval.in/554205)
<toretore> >> require 'json'; s = '<a href="'+'url'+'">'; j = JSON.generate({url: s}); puts JSON.parse(j)['url']
<ruby[bot]> toretore: # => <a href="url"> ...check link for more (https://eval.in/554206)
joast has joined #ruby
<jhass> generating links for another component in one sounds at least weird / bad design to me, sorry :)
merida_ has joined #ruby
<jhass> generating HTML even more so
alexherbo2 has quit [Ping timeout: 276 seconds]
<Shidash> jhass: rails app is a general case search tool that works with any dataset. other component is a preprocessing script for a specific dataset.
alexherbo2 has joined #ruby
<toretore> why do you put html in the json and not generate the html from json data when it's read?
Chagel has joined #ruby
kfpratt has joined #ruby
<Shidash> toretore: because the html is specific to a single field on a single dataset for a single instance of the software
<toretore> sounds fun
<Shidash> normally it is generated as it is read
merida has quit [Ping timeout: 276 seconds]
noService has joined #ruby
kareeoleez has joined #ruby
despai has quit [Quit: Leaving]
devyn has quit [Ping timeout: 244 seconds]
lkba has quit [Ping timeout: 268 seconds]
tax has joined #ruby
firstdayonthejob has joined #ruby
KensoDev has joined #ruby
minimalism has joined #ruby
banister has quit [Remote host closed the connection]
IrishGringo has joined #ruby
BTRE has joined #ruby
djbkd_ has joined #ruby
chouhoulis has quit [Remote host closed the connection]
bronson has joined #ruby
banister has joined #ruby
hk238 has joined #ruby
stannard has joined #ruby
jhn has joined #ruby
kareeoleez has quit [Ping timeout: 268 seconds]
<Shidash> the original processing script is pure ruby
pietr0 has joined #ruby
Cork has quit [Ping timeout: 240 seconds]
<Shidash> if I was generating the links on rails, I'd just use link_to, which avoids this issue.
n008f4g_ has quit [Ping timeout: 276 seconds]
Cork has joined #ruby
jhn has left #ruby [#ruby]
rbr has quit [Ping timeout: 268 seconds]
Elysia has joined #ruby
Matthew_ has joined #ruby
Chagel has quit [Ping timeout: 276 seconds]
charlemagne has joined #ruby
PedramT has joined #ruby
last_staff has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
djbkd_ has quit [Ping timeout: 252 seconds]
rbr has joined #ruby
djbkd has quit [Remote host closed the connection]
OTORelic1 has joined #ruby
navneet has joined #ruby
devyn has joined #ruby
djbkd has joined #ruby
ramfjord has joined #ruby
<Shidash> I think for now I'm just going to print the url and have the rails app handle it like it normally does arrays of links. not ideal, but probably fine and better than wasting more time on this
bluOxigen_ has joined #ruby
amclain_ has joined #ruby
Asher has joined #ruby
arlek_ has joined #ruby
GinoMan2440_ has joined #ruby
merida has joined #ruby
RegulationD has joined #ruby
OTORelic2 has joined #ruby
bruno-_ has joined #ruby
tax has quit [Ping timeout: 260 seconds]
curses_ has joined #ruby
mroth has quit [Ping timeout: 250 seconds]
thesheff17 has quit [Ping timeout: 250 seconds]
ghr has quit [Ping timeout: 250 seconds]
jackjackdripper has joined #ruby
mozzarel1 has joined #ruby
klka has joined #ruby
ghr has joined #ruby
smathy_ has joined #ruby
william3_ has joined #ruby
cout_ is now known as cout
twodayslate has quit [Ping timeout: 250 seconds]
ELCALOR has quit [Ping timeout: 250 seconds]
jackjackdripper1 has quit [Ping timeout: 250 seconds]
smathy has quit [Disconnected by services]
BrunoSaboia has joined #ruby
smathy_ is now known as smathy
MagePsycho__ has joined #ruby
tristanp has joined #ruby
last_staff1 has joined #ruby
iamvery has joined #ruby
<jhass> Shidash: are you maybe just running into Rails escaping?
iamvery_ has quit [Read error: Connection reset by peer]
hobodave has quit [Quit: Computer has gone to sleep.]
yo61 has quit [Ping timeout: 250 seconds]
jidar has quit [Ping timeout: 250 seconds]
Guest98950 has quit [Ping timeout: 250 seconds]
GinoMan2440 has quit [Ping timeout: 250 seconds]
jazzonmymind has quit [Ping timeout: 250 seconds]
deavid has quit [Read error: Connection reset by peer]
ereslibre_laptop has joined #ruby
_djbkd has joined #ruby
konr has joined #ruby
daxroc has quit [Ping timeout: 250 seconds]
GGMethos has quit [Ping timeout: 250 seconds]
blackmes1 has joined #ruby
IrishGringo_ has joined #ruby
tagaulap has quit [Ping timeout: 250 seconds]
kapowaz has quit [Ping timeout: 250 seconds]
<Shidash> jhass: I don't think so. It's escaped when I print it in irb, in the JSON file, and when the text from that field is printed in rails
pwnd_nsfw` has joined #ruby
dumdedum has joined #ruby
<Shidash> when it's printed in the rails console, that is.
Todd has quit [Ping timeout: 250 seconds]
frem_ has joined #ruby
<jhass> try using puts in the rails console
<jhass> I bet you're just still confused by .inspect
ammar_ has joined #ruby
<jhass> and it's not actually escaped
jabreity_ has joined #ruby
<jhass> and Rails just reescapes it, as it's not a html safe string
mosez_ has joined #ruby
sapslaj_ has joined #ruby
awk has joined #ruby
devyn_ has joined #ruby
jidar has joined #ruby
tildes has joined #ruby
<Shidash> it
cbetta_ has joined #ruby
awk is now known as Guest83385
phredus has joined #ruby
speaking1ode has quit [Ping timeout: 250 seconds]
thesheff17 has joined #ruby
<Shidash> *it's possible it's that, though I've run into that in the past and normally pass things raw (or rather a sanitized version of the html allowing certain tags including a)
jmcc_________ has joined #ruby
benlieb_ has joined #ruby
_jolts has joined #ruby
_jolts has quit [Max SendQ exceeded]
Marsjan has joined #ruby
ferr has quit [Quit: WeeChat 1.4]
ELCALOR has joined #ruby
troter__________ has joined #ruby
daxroc has joined #ruby
_jolts has joined #ruby
<Shidash> the sanitize method I'm using is here- https://github.com/TransparencyToolkit/LookingGlass/blob/master/app/helpers/doc_format.rb, which seems to be what the html_safe method description suggests using instead
_jolts has quit [Max SendQ exceeded]
alxndr_ has joined #ruby
tw1sted_ has quit [Ping timeout: 250 seconds]
K3rvyN has joined #ruby
nyuszika7h_ has joined #ruby
<Shidash> raw(text) run in the sanitize method there in the rails console also prints the escaped links
Guest53248 has quit [Ping timeout: 250 seconds]
FifthWall_ has joined #ruby
rik has joined #ruby
mroth has joined #ruby
Scientz has joined #ruby
nuck has joined #ruby
braincra- has joined #ruby
samuelkadolph_ has joined #ruby
rik is now known as Guest84064
frem_ has quit [Ping timeout: 260 seconds]
d0nn1e_ has joined #ruby
nyuszika7h has quit [Killed (orwell.freenode.net (Nickname regained by services))]
nyuszika7h_ is now known as nyuszika7h
nuck is now known as Guest93754
<jhass> seriously, you need to spend some time on understanding .inspect and that irb uses it
<jhass> String#inspect in particular
OTORelic1 has quit [*.net *.split]
last_staff has quit [*.net *.split]
Elysia has quit [*.net *.split]
IrishGringo has quit [*.net *.split]
merida_ has quit [*.net *.split]
curses has quit [*.net *.split]
FooMunki has quit [*.net *.split]
atmosx has quit [*.net *.split]
[ace] has quit [*.net *.split]
blackmesa has quit [*.net *.split]
Guest57823 has quit [*.net *.split]
spastorino has quit [*.net *.split]
MagePsycho_ has quit [*.net *.split]
bb010g has quit [*.net *.split]
zipkid has quit [*.net *.split]
Arcaire has quit [*.net *.split]
audiodude has quit [*.net *.split]
dmnd has quit [*.net *.split]
tristanp_ has quit [*.net *.split]
jpinnix_______ has quit [*.net *.split]
optimaleatscout_ has quit [*.net *.split]
ramblinpeck has quit [*.net *.split]
err_ok has quit [*.net *.split]
heyimwill has quit [*.net *.split]
deepak has quit [*.net *.split]
brent__ has quit [*.net *.split]
Bilge has quit [*.net *.split]
Hobbyboy has quit [*.net *.split]
krasnus has quit [*.net *.split]
G has quit [*.net *.split]
bluOxigen has quit [*.net *.split]
amclain has quit [*.net *.split]
Regulati_ has quit [*.net *.split]
ssiris has quit [*.net *.split]
william3 has quit [*.net *.split]
marsjaninzmarsa has quit [*.net *.split]
ddv has quit [*.net *.split]
ctrlrsf has quit [*.net *.split]
last_staff1 is now known as last_staff
Marsjan is now known as marsjaninzmarsa
sgambino_ has quit [Ping timeout: 250 seconds]
bkxd has joined #ruby
deavid has joined #ruby
Bilge has joined #ruby
ramfjord has quit [*.net *.split]
djbkd has quit [*.net *.split]
devyn has quit [*.net *.split]
charlemagne has quit [*.net *.split]
pietr0 has quit [*.net *.split]
minimalism has quit [*.net *.split]
firstdayonthejob has quit [*.net *.split]
noService has quit [*.net *.split]
kfpratt has quit [*.net *.split]
nixmaniack has quit [*.net *.split]
hk238 has quit [*.net *.split]
FifthWall has quit [*.net *.split]
nando293921 has quit [*.net *.split]
terminalrecluse has quit [*.net *.split]
dopie has quit [*.net *.split]
Timberwo|f has quit [*.net *.split]
ammar has quit [*.net *.split]
benlieb has quit [*.net *.split]
Jonah11_ has quit [*.net *.split]
monod has quit [*.net *.split]
zrl has quit [*.net *.split]
deeprave has quit [*.net *.split]
jabreity has quit [*.net *.split]
cbetta has quit [*.net *.split]
tonini has quit [*.net *.split]
troter_________ has quit [*.net *.split]
psmolen has quit [*.net *.split]
al2o3-cr has quit [*.net *.split]
Emmanuel_Chanel has quit [*.net *.split]
d0nn1e has quit [*.net *.split]
programmerq has quit [*.net *.split]
agent_white has quit [*.net *.split]
yasu_ has quit [*.net *.split]
manveru has quit [*.net *.split]
frem has quit [*.net *.split]
jmcc________ has quit [*.net *.split]
podman has quit [*.net *.split]
phredus_ has quit [*.net *.split]
sorah__ has quit [*.net *.split]
bruno- has quit [*.net *.split]
joevandy1 has quit [*.net *.split]
awk_ has quit [*.net *.split]
Phanes has quit [*.net *.split]
CloCkWeRX1 has quit [*.net *.split]
alxndr has quit [*.net *.split]
flak has quit [*.net *.split]
pwnd_nsfw has quit [*.net *.split]
jolts has quit [*.net *.split]
malcolmva has quit [*.net *.split]
abyx has quit [*.net *.split]
eljimmy has quit [*.net *.split]
Vile` has quit [*.net *.split]
timonv has quit [*.net *.split]
cdg has quit [*.net *.split]
jgt2 has quit [*.net *.split]
solars has quit [*.net *.split]
x0f has quit [*.net *.split]
BSaboia has quit [*.net *.split]
sapslaj has quit [*.net *.split]
duderonomy has quit [*.net *.split]
__main__ has quit [*.net *.split]
mosez has quit [*.net *.split]
blaxter has quit [*.net *.split]
Kimm has quit [*.net *.split]
mozzarella has quit [*.net *.split]
danjack has quit [*.net *.split]
araujo has quit [*.net *.split]
Outlastsheep has quit [*.net *.split]
Scient has quit [*.net *.split]
zenlot6 has quit [*.net *.split]
vondruch has quit [*.net *.split]
kies has quit [*.net *.split]
matp has quit [*.net *.split]
KervyN has quit [*.net *.split]
ereslibre has quit [*.net *.split]
sauvin has quit [*.net *.split]
toretore has quit [*.net *.split]
Caelum has quit [*.net *.split]
samuelkadolph has quit [*.net *.split]
braincrash has quit [*.net *.split]
nullwarp has quit [*.net *.split]
Chunlea_ has quit [*.net *.split]
bry4n has quit [*.net *.split]
arlek__ has quit [*.net *.split]
Kharma has quit [*.net *.split]
brainslug has quit [*.net *.split]
dopieee has quit [*.net *.split]
Synthead has quit [*.net *.split]
Authenticator has quit [*.net *.split]
samuelkadolph_ is now known as samuelkadolph
tw1sted has joined #ruby
Todd has joined #ruby
helpa has quit [Write error: Broken pipe]
FifthWall_ is now known as FifthWall
benlieb_ is now known as benlieb
terminalrecluse has joined #ruby
<Shidash> jhass: yes, I get that. So I wouldn't be alarmed if that was all that the problem was
jolts has joined #ruby
jolts has quit [Max SendQ exceeded]
x0f has joined #ruby
alxndr_ is now known as alxndr
FooMunki has joined #ruby
<Shidash> jhass: but the problem is that the links are showing up like the html is <a>linkname</a>
al2o3-cr has joined #ruby
yasu_ has joined #ruby
nando293921 has joined #ruby
agent_white has joined #ruby
daxroc has quit [Ping timeout: 276 seconds]
jabreity_ has quit [Ping timeout: 276 seconds]
jolts has joined #ruby
jolts has quit [Max SendQ exceeded]
<Shidash> jhass: and this is after using sanitize (allowing a tags) and then using raw in the view to show the html
cbetta_ has quit [Ping timeout: 252 seconds]
agentmeerkat has quit [Ping timeout: 250 seconds]
gnufied has quit [Ping timeout: 250 seconds]
acidrainfall has quit [Ping timeout: 250 seconds]
helpa has joined #ruby
curses_ has quit [Read error: Connection reset by peer]
MaienM has quit [Ping timeout: 250 seconds]
jmcc_________ has quit [Ping timeout: 260 seconds]
tax has joined #ruby
C0deMaver1ck has joined #ruby
xue has joined #ruby
SilverKey has quit [Quit: Halted.]
troter__________ has quit [Ping timeout: 260 seconds]
C0deMaver1ck is now known as Guest33991
<jhass> so somewhere it's escaped, I still bet it's well after being decoded from json but I'm not going to crawl through all that stuff which is not even following a consistent coding style or try to get it running locally to prove that, sorry
ocbtec_ has quit [Ping timeout: 250 seconds]
bkxd has quit [Ping timeout: 276 seconds]
PedramT has quit [Remote host closed the connection]
chouhoulis has joined #ruby
<Shidash> I know. I've spent the past 24 hours failing to debug that
<Shidash> thanks, no thanks, goodbye
<jhass> besides for a browser to render it as <a> the angle brackets need to be converted to &lt; etc or it would need to be inserted into a <pre> tag, none which any remotely sane json library would do to you string
<jhass> *your string
bry4n has joined #ruby
danjack has joined #ruby
cdg has joined #ruby
minimalism has joined #ruby
dopieee has joined #ruby
solars has joined #ruby
vondruch has joined #ruby
Chunlea_ has joined #ruby
ssiris has joined #ruby
matp has joined #ruby
zenlot6 has joined #ruby
jazzonmymind has joined #ruby
jolts has joined #ruby
jolts has quit [Max SendQ exceeded]
pietr0 has joined #ruby
noService has joined #ruby
ocbtec has joined #ruby
jolts has joined #ruby
jolts has quit [Max SendQ exceeded]
Rixius has quit [Ping timeout: 260 seconds]
disconnekted has joined #ruby
Elysia has joined #ruby
__main__ has joined #ruby
nixmaniack has joined #ruby
nixmaniack has joined #ruby
Caelum has joined #ruby
agentmeerkat has joined #ruby
SilverKey has joined #ruby
infra-red has joined #ruby
spangler has joined #ruby
diegok has quit [Ping timeout: 276 seconds]
bnagy has quit [Ping timeout: 250 seconds]
canton7 has quit [Ping timeout: 250 seconds]
lxsameer has quit [Ping timeout: 276 seconds]
bnagy has joined #ruby
acidrainfall has joined #ruby
brent__ has joined #ruby
sandelius has joined #ruby
Phanes has joined #ruby
Phanes has quit [Changing host]
Phanes has joined #ruby
MaienM has joined #ruby
jolts has joined #ruby
jolts has quit [Max SendQ exceeded]
sauvin has joined #ruby
GGMethos has joined #ruby
Rixius has joined #ruby
diegok has joined #ruby
jolts has joined #ruby
jolts has quit [Max SendQ exceeded]
CloCkWeRX has joined #ruby
eljimmy has joined #ruby
dopie has joined #ruby
kfpratt has joined #ruby
psmolen has joined #ruby
err_ok has joined #ruby
atmosx has joined #ruby
jpinnix_______ has joined #ruby
gnufied has joined #ruby
deepak has joined #ruby
nullwarp has joined #ruby
zenlot6 has quit [*.net *.split]
solars has quit [*.net *.split]
vondruch has quit [*.net *.split]
Chunlea_ has quit [*.net *.split]
rodfersou has quit [Ping timeout: 260 seconds]
duderonomy has joined #ruby
bb010g_ has joined #ruby
blackmes1 has quit [Ping timeout: 276 seconds]
canton7 has joined #ruby
dangerousdave has joined #ruby
dmnd has joined #ruby
araujo has joined #ruby
rodfersou has joined #ruby
audiodude has joined #ruby
lucianosousa has joined #ruby
jolts has joined #ruby
jolts has quit [Max SendQ exceeded]
timonv has joined #ruby
cbetta_ has joined #ruby
araujo has quit [Max SendQ exceeded]
zipkid has joined #ruby
optimaleatscout_ has joined #ruby
jolts has joined #ruby
jolts has quit [Max SendQ exceeded]
kadoppe has joined #ruby
FooMunki has quit [Quit: FooMunki]
baweaver has joined #ruby
podman has joined #ruby
kareeoleez has joined #ruby
ramblinpeck has joined #ruby
malcolmva has joined #ruby
monod has joined #ruby
Emmanuel_Chanel has joined #ruby
Cohedrin has joined #ruby
davidbug has quit [Ping timeout: 276 seconds]
jolts has joined #ruby
jolts has quit [Max SendQ exceeded]
joevandyk has joined #ruby
toretore has joined #ruby
jolts has joined #ruby
jolts has quit [Max SendQ exceeded]
speakingcode has joined #ruby
FooMunki has joined #ruby
zrl_ has joined #ruby
audiodude has quit [Ping timeout: 260 seconds]
v0n has quit [Ping timeout: 260 seconds]
kadoppe has quit [Ping timeout: 276 seconds]
baweaver has quit [Ping timeout: 276 seconds]
kareeoleez has quit [Ping timeout: 276 seconds]
deepak has quit [Ping timeout: 276 seconds]
hk238 has joined #ruby
troter__________ has joined #ruby
Cohedrin has quit [Read error: Connection reset by peer]
jpinnix_______ has quit [Ping timeout: 260 seconds]
v0n has joined #ruby
merida has quit [Remote host closed the connection]
Arcaire has joined #ruby
Ankhers has quit [Ping timeout: 260 seconds]
hk238 has quit [Client Quit]
merida has joined #ruby
Jonah11_ has joined #ruby
frem_ has joined #ruby
jolts has joined #ruby
jolts has quit [Max SendQ exceeded]
Eiam_ has joined #ruby
jgt2 has joined #ruby
fumduq has quit [Ping timeout: 260 seconds]
mmasaki has quit [Ping timeout: 260 seconds]
vondruch has joined #ruby
audiodude has joined #ruby
Ankhers has joined #ruby
elifoster has joined #ruby
jolts has joined #ruby
[ace] has joined #ruby
jolts has quit [Max SendQ exceeded]
navneet has quit [Read error: Connection reset by peer]
hobodave has joined #ruby
mmasaki has joined #ruby
fumduq has joined #ruby
tagaulap has joined #ruby
baweaver has joined #ruby
PedramT has joined #ruby
jabreity_ has joined #ruby
kies has joined #ruby
spastorino has joined #ruby
ixti has joined #ruby
ramfjord has joined #ruby
heyimwill has joined #ruby
BillSussman has quit [Quit: Leaving]
spider-mario has joined #ruby
bigkevmcd has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
spaceghost|work has quit [Ping timeout: 260 seconds]
thai_ has quit [Ping timeout: 260 seconds]
tvsutton has quit [Ping timeout: 260 seconds]
baweaver has quit [Remote host closed the connection]
deepak has joined #ruby
jpinnix_______ has joined #ruby
OTORelic2 has quit [Ping timeout: 276 seconds]
deeprave has joined #ruby
jolts has joined #ruby
aegis3121 has joined #ruby
thai_ has joined #ruby
Hobbyboy has joined #ruby
sorah__ has joined #ruby
yo61 has joined #ruby
jolts has joined #ruby
jolts has quit [Max SendQ exceeded]
Vile` has joined #ruby
pipework has joined #ruby
tvsutton has joined #ruby
zenlot6 has joined #ruby
Chunlea_ has joined #ruby
raeoks has joined #ruby
Cohedrin has joined #ruby
karmatr0n has quit [Ping timeout: 250 seconds]
jmcc_________ has joined #ruby
apeiros has quit [Ping timeout: 276 seconds]
kfpratt has quit [Read error: Connection reset by peer]
programmerq has joined #ruby
daxroc has joined #ruby
jolts has joined #ruby
tonini has joined #ruby
jolts has quit [Max SendQ exceeded]
kapowaz has joined #ruby
PedramT has quit [Remote host closed the connection]
karmatr0n has joined #ruby
jolts has joined #ruby
jolts has quit [Max SendQ exceeded]
firstdayonthejob has joined #ruby
apeiros has joined #ruby
<Olipro> Given arrays A and B, is it possible to move the contents of B into A without making a copy
ocbtec has quit [Quit: leaving]
tagaulap has quit [Quit: Connection closed for inactivity]
<Olipro> (for performance purposes)
Chagel has joined #ruby
kareeoleez has joined #ruby
<apeiros> Olipro: a copy of what?
<apeiros> A.concat B # won't copy the elements of B, since ruby works with references to objects
<smathy> Olipro, what are you doing that's making a copy?
djbkd has joined #ruby
<apeiros> but it will create the space for those references in A
jolts has joined #ruby
jolts has quit [Max SendQ exceeded]
davedev2_ has joined #ruby
baweaver has joined #ruby
davedev2_ has quit [Read error: Connection reset by peer]
davedev24 has quit [Ping timeout: 264 seconds]
davedev24 has joined #ruby
jolts has joined #ruby
jolts has quit [Max SendQ exceeded]
twodayslate has joined #ruby
G has joined #ruby
Chagel has quit [Ping timeout: 244 seconds]
madgen has joined #ruby
kareeoleez has quit [Ping timeout: 264 seconds]
jgpawletko has joined #ruby
krasnus has joined #ruby
Jonah11_ has quit [Remote host closed the connection]
djbkd has quit [Ping timeout: 276 seconds]
eggoez has quit [Ping timeout: 264 seconds]
jolts has joined #ruby
jolts has quit [Max SendQ exceeded]
manveru has joined #ruby
Synthead has joined #ruby
pandaant has quit [Remote host closed the connection]
shadoi has joined #ruby
xleagd has quit [Ping timeout: 244 seconds]
jolts has joined #ruby
jolts has quit [Max SendQ exceeded]
<Olipro> apeiros: is that true for simple objects like integers too?
<apeiros> it's not true for immediate objects, since they fit into the space of a reference
curses has joined #ruby
<apeiros> immediates are Fixnums, Flonums (a subset of floats iirc), true, false, nil and Symbols
joseph has joined #ruby
bmf has quit [Quit: Leaving]
<baweaver> though if you're using Ruby, you have to be willing to trust the GC a bit more.
ctrlrsf has joined #ruby
ctrlrsf has quit [Changing host]
ctrlrsf has joined #ruby
mustmodify_ has joined #ruby
ddv has joined #ruby
merida has quit [Ping timeout: 260 seconds]
postmodern has joined #ruby
weemsledeux has joined #ruby
jolts has joined #ruby
jolts has quit [Max SendQ exceeded]
jolts has joined #ruby
Kharma has joined #ruby
jolts has quit [Max SendQ exceeded]
Waqas has quit [Read error: Connection reset by peer]
mustmodify has quit [Ping timeout: 244 seconds]
Waqas has joined #ruby
BtcBen has joined #ruby
dangerousdave has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jolts has joined #ruby
jgt2 has quit [Ping timeout: 264 seconds]
Authenticator has joined #ruby
someish has joined #ruby
baweaver has quit [Remote host closed the connection]
<someish> What’s going on when this is passed into a method: except: [:new, :edit]
<someish> I’m interested in the syntax.
brainslug has joined #ruby
agentmeerkat has quit [Ping timeout: 260 seconds]
<eam> someish: [:new, :edit] is an array with two Symbols in it
<eam> the except: is a keyword arg
<apeiros> someish: `foo except: [:new, :edit]` is `foo({except: [:new, :edit]})`
<apeiros> (or alternatively a keyword arg, which is mostly treated the same)
xue has quit [Ping timeout: 276 seconds]
<soahccc> how do you reopen a stringio? When I do it's empty afterwards :/
<someish> And the angle brackets is short form for a block?
<someish> apeiros: ^
<apeiros> someish: no. that's an array
<apeiros> >> [:foo].class
<ruby[bot]> apeiros: # => Array (https://eval.in/554232)
Karamet has joined #ruby
kareeoleez has joined #ruby
<apeiros> ?pry someish
<ruby[bot]> someish: Pry, the better IRB, provides easy object inspection `ls`, `history`, viewing docs `?`, viewing source `$`, syntax highlighting and other features (see `help` for more). Put `binding.pry` in your source code for easy debugging. Install Pry (https://pryrepl.org/): gem install pry pry-doc
<Karamet> Hello
FooMunki has quit [Quit: FooMunki]
<Karamet> Guys, do you know agar.io or slither.io ?
<someish> Installed.
<apeiros> oh well, I guess that doesn't explain what pry is - but try it out. it lets you answer such questions yourself.
<apeiros> Karamet: no
<Karamet> I want to make a game like they and what do you think to code their servers with Ruby?
<apeiros> (to the first question - I don't know them)
william3_ has quit [Read error: Connection reset by peer]
bluOxigen has joined #ruby
bluOxigen_ has quit [Ping timeout: 276 seconds]
<apeiros> soahccc: what do you expect to happen when you reopen a stringio?
zeroDivisible has joined #ruby
mrknip has joined #ruby
<soahccc> apeiros: well I try to workaround something :) I use a library which wants a gzip IO and I have uncompressed input. So i do this: https://gist.github.com/2called-chaos/d7471189fc0f5abac3e14bd9b8acf4de
<soahccc> apeiros: maybe I have to use tempfiles
<someish> apeiros: So what’s going on with the curly braces in your example?
tax has quit [Ping timeout: 276 seconds]
kareeoleez has quit [Ping timeout: 244 seconds]
<someish> foo({except: [:new, :edit]})
<apeiros> someish: it seems to me like you're asking 101 questions. you should read a book.
<apeiros> soahccc: why do you rewind there?
<apeiros> soahccc: err, why do you reopen there?
barajasfab has quit [Ping timeout: 244 seconds]
<soahccc> apeiros: that's just try. I have to reopen because after gz.close when I try to read the stringio I get "not opened for reading"
curses has quit [Remote host closed the connection]
kareeoleez has joined #ruby
zeroDivisible has quit [Client Quit]
<someish> That’s the thing, I have read a book. I’ve never seen curly braces wrap a parameter, which itself is an array definition.
<apeiros> soahccc: and you get that with just a rewind too?
<apeiros> someish: go to the chapter which covers literals
zeroDivisible has joined #ruby
<apeiros> soahccc: btw., you do realize that the first arg is not mode?
<apeiros> the second one is
<apeiros> (in StringIO.new)
codecop has joined #ruby
dcunit3d has joined #ruby
cdg has quit [Ping timeout: 260 seconds]
<apeiros> soahccc: well, in the worst case: cstrio = StringIO.new(cstrio.string) # creates a new StringIO with pos=0 and cstrio.string as data
<apeiros> seems gzwriter calls .close or .close_read on the IO
<apeiros> otherwise .rewind would be sufficient
agentmeerkat has joined #ruby
sthns has joined #ruby
sthns has quit [Max SendQ exceeded]
Karamet has quit [Ping timeout: 250 seconds]
tax has joined #ruby
<soahccc> apeiros: yeah I figured that gz closes the IO. Your solution works and yeah I trusted stackoverflow with that .new("rw") :)
<apeiros> stackoverflow knows less than me :-p
Drakevr_ is now known as Drakevr
william3 has joined #ruby
<soahccc> true
jt__ has joined #ruby
<apeiros> heh, I was just kidding, but thanks ;-)
Drakevr has quit [Changing host]
Drakevr has joined #ruby
toretore has quit [Ping timeout: 260 seconds]
Dreamer3 has quit [Quit: Computer has gone to sleep.]
Puffball has quit [Remote host closed the connection]
kristofferR has joined #ruby
last_staff1 has joined #ruby
charlemagne has joined #ruby
dezull has joined #ruby
william3 has quit [Ping timeout: 244 seconds]
jhn has joined #ruby
joseph has quit [Read error: Connection reset by peer]
last_staff has quit [Ping timeout: 260 seconds]
<someish> apeiros: Thanks. I’m good now.
tax has quit [Ping timeout: 244 seconds]
tildes has quit [Ping timeout: 260 seconds]
aegis3121 has quit [Remote host closed the connection]
aegis3121 has joined #ruby
<someish> The thing that keeps getting me is how so much ruby syntax is optional.
<someish> I know something should be in that empty space, but I don’t know what sometimes.
<apeiros> there aren't too many things which are optional
<apeiros> and with a bit of getting used to it'll quickly be quite obvious
last_staff1 has quit [Ping timeout: 244 seconds]
<someish> For sure. It’s just a newbie thing.
last_staff has joined #ruby
Jonah11_ has joined #ruby
stannard has quit [Remote host closed the connection]
stannard has joined #ruby
Xeago has joined #ruby
chouhoulis has quit [Remote host closed the connection]
binaryplease1 has joined #ruby
chouhoulis has joined #ruby
Jonah11_ has quit [Remote host closed the connection]
meraxes has quit [Ping timeout: 244 seconds]
<Authenticator> I'm using bundler and trying to vendor my deps but it tries to vendor my own gem's files, recursively. What's wrong?
stannard has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 260 seconds]
lucianosousa has quit [Quit: lucianosousa]
binaryplease has quit [Ping timeout: 244 seconds]
<apeiros> Authenticator: while I probably won't be able to help, I doubt anybody can with that really sparse amount of information you've given.
dmr8 has joined #ruby
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
OTORelic2 has joined #ruby
stannard has joined #ruby
FooMunki has joined #ruby
pietr0 has quit [Quit: pietr0]
binaryplease1 is now known as binaryplease
<Authenticator> apeiros: You want I should paste in the novel I wrote about it? :P
OTORelic2 has quit [Ping timeout: 260 seconds]
stannard has quit [Remote host closed the connection]
<apeiros> if it's a novel, you probably better use gist.github.com
<Authenticator> I'm using the 'gemspec' declaration, which is new for me.
kristofferR has quit [Quit: Textual IRC Client: www.textualapp.com]
<Authenticator> It adds a local dependency, which I assume is the issue... But when it copies the gem to ./vendor it also copies the ./vendor directory...
ctarx has joined #ruby
poerror has joined #ruby
SirFunk has quit [Ping timeout: 260 seconds]
Sammichmaker has joined #ruby
<jhass> Authenticator: why is vendor part of your .files then?
poerror has left #ruby [#ruby]
ctarx has left #ruby [#ruby]
SirFunk has joined #ruby
nobitanobi has quit [Remote host closed the connection]
Fire-Dragon-DoL has quit [Ping timeout: 260 seconds]
nobitanobi has joined #ruby
\13k has quit [Ping timeout: 260 seconds]
tubuliferous has quit [Ping timeout: 244 seconds]
<Authenticator> jhass: Because they're checked in. But that's not the issue - I started to filter 'vendor/' in the gemspec and the same behavior happens.
\13k has joined #ruby
dcunit3d has quit [Ping timeout: 244 seconds]
Chunlea_ has quit [Ping timeout: 264 seconds]
Dimik has joined #ruby
<jhass> I cannot reproduce
n1colas has joined #ruby
n1x has joined #ruby
Fire-Dragon-DoL has joined #ruby
djbkd has joined #ruby
bronson has joined #ruby
cwenner has quit [Ping timeout: 244 seconds]
yfeldblum has joined #ruby
sindork has quit [Ping timeout: 260 seconds]
tubuliferous has joined #ruby
sindork has joined #ruby
<Authenticator> jhass: Empty project, using gemspec, ./vendor checked into git? In the Gemfile.lock does the gem have itself as a dependency?
Jonah11_ has joined #ruby
nixmaniack has quit [Ping timeout: 276 seconds]
Cohedrin has joined #ruby
<jhass> no, project I had at hand, I don't use `git ls-files` stuff for .files as I think it's a stupid idea (for reasons like you're probably facing right now), the gem is of course listed in the .lock's dependencies section
hxegon is now known as hxegon_AFK
Cohedrin has quit [Max SendQ exceeded]
<apeiros> +1 to `git ls-files` being a stupid idea.
<Authenticator> jhass: I'm pretty sure it's not an ls-files issue though, because even when I manually filtered out the vendor dir it still happened.
djbkd has quit [Ping timeout: 244 seconds]
Guest36051 has quit [Ping timeout: 260 seconds]
bronson has quit [Ping timeout: 276 seconds]
agentmeerkat has quit [Ping timeout: 244 seconds]
Affix has joined #ruby
n1x has quit [Remote host closed the connection]
Affix is now known as Guest75518
Cohedrin has joined #ruby
helpa has quit [Remote host closed the connection]
eljimbo has joined #ruby
helpa has joined #ruby
Regulati_ has joined #ruby
arlek__ has joined #ruby
Robtop__ has joined #ruby
chouhoul_ has joined #ruby
pawnbox_ has joined #ruby
BSab has joined #ruby
mr_knip has joined #ruby
smathy_ has joined #ruby
mozzarella has joined #ruby
jjturner has joined #ruby
iamvery_ has joined #ruby
elifoster|alt has joined #ruby
eggoez has joined #ruby
tristanp_ has joined #ruby
I has joined #ruby
GinoMan2440 has joined #ruby
terlar has quit [Ping timeout: 276 seconds]
I is now known as Guest74455
rik has joined #ruby
rik is now known as Guest62432
MagePsycho_ has joined #ruby
M-shine has quit [Read error: Connection reset by peer]
M-Kodo has quit [Write error: Connection reset by peer]
atmosx_alt has joined #ruby
yasu__ has joined #ruby
Outlastsheep has joined #ruby
MaienM_ has joined #ruby
acerna_ has joined #ruby
alexherb1 has joined #ruby
brent___ has joined #ruby
diego_k has joined #ruby
gix has quit [Ping timeout: 276 seconds]
stannard has joined #ruby
ELCALOR_ has joined #ruby
bnagy_ has joined #ruby
d0nn1e has joined #ruby
Emmanuel_Chanel_ has joined #ruby
smathy has quit [Disconnected by services]
optimaleatscout_ has quit [Ping timeout: 276 seconds]
brent__ has quit [Ping timeout: 276 seconds]
Elysia has quit [Ping timeout: 276 seconds]
yasu_ has quit [Ping timeout: 276 seconds]
ELCALOR has quit [Ping timeout: 276 seconds]
konr has quit [Ping timeout: 276 seconds]
shtirlic has quit [Ping timeout: 276 seconds]
tsunamie has quit [Ping timeout: 276 seconds]
acerna has quit [Ping timeout: 276 seconds]
diegok has quit [Read error: Connection reset by peer]
Guest84064 has quit [Read error: Connection reset by peer]
atmosx has quit [Read error: Connection reset by peer]
fumduq has quit [Read error: Connection reset by peer]
mozzarel1 has quit [Read error: Connection reset by peer]
mrknip has quit [Ping timeout: 276 seconds]
deepak has quit [Ping timeout: 276 seconds]
joevandyk has quit [Ping timeout: 276 seconds]
ramblinpeck has quit [Ping timeout: 276 seconds]
zipkid has quit [Ping timeout: 276 seconds]
err_ok has quit [Ping timeout: 276 seconds]
eljimmy has quit [Ping timeout: 276 seconds]
MaienM has quit [Ping timeout: 276 seconds]
disconnekted has quit [Ping timeout: 276 seconds]
Caelum has quit [Ping timeout: 276 seconds]
fumduq has joined #ruby
iamvery has quit [Ping timeout: 276 seconds]
klka has quit [Ping timeout: 276 seconds]
RegulationD has quit [Ping timeout: 276 seconds]
alexherbo2 has quit [Ping timeout: 276 seconds]
deavid has quit [Read error: Connection reset by peer]
chouhoulis has quit [Ping timeout: 276 seconds]
raeoks has quit [Ping timeout: 276 seconds]
elifoster has quit [Ping timeout: 276 seconds]
Emmanuel_Chanel has quit [Ping timeout: 276 seconds]
sauvin has quit [Ping timeout: 276 seconds]
bnagy has quit [Ping timeout: 276 seconds]
spangler has quit [Ping timeout: 276 seconds]
dopieee has quit [Ping timeout: 276 seconds]
minimalism has quit [Ping timeout: 276 seconds]
d0nn1e_ has quit [Ping timeout: 276 seconds]
tristanp has quit [Ping timeout: 276 seconds]
MagePsycho__ has quit [Ping timeout: 276 seconds]
GinoMan2440_ has quit [Ping timeout: 276 seconds]
arlek_ has quit [Ping timeout: 276 seconds]
pawnbox has quit [Ping timeout: 276 seconds]
smathy_ is now known as smathy
pwnd_nsfw` has quit [Ping timeout: 276 seconds]
BrunoSaboia has quit [Ping timeout: 276 seconds]
jackjackdripper has quit [Ping timeout: 276 seconds]
minimali1 has joined #ruby
Jonah11_ has quit [Remote host closed the connection]
brent___ is now known as brent__
hogetaro has quit [Write error: Connection reset by peer]
jjturner is now known as spangler
tsunamie has joined #ruby
acerna_ is now known as acerna
deavid has joined #ruby
Chunlea_ has joined #ruby
sauvin has joined #ruby
jackjackdripper has joined #ruby
klka has joined #ruby
ELCALOR_ is now known as ELCALOR
baweaver has joined #ruby
Elysia has joined #ruby
banister has quit [Ping timeout: 276 seconds]
Caelum has joined #ruby
optimaleatscout_ has joined #ruby
bluOxigen has quit [Ping timeout: 264 seconds]
gix has joined #ruby
yo61 has quit [Ping timeout: 276 seconds]
mdw has joined #ruby
zipkid has joined #ruby
bkxd has joined #ruby
deepak has joined #ruby
err_ok has joined #ruby
ramblinpeck has joined #ruby
tobiasvl has quit [Read error: Connection reset by peer]
tvl has joined #ruby
tvl is now known as tobiasvl
M-shine has joined #ruby
M-Kodo has joined #ruby
Chunlea_ has quit [Ping timeout: 244 seconds]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
konr has joined #ruby
sgambino has joined #ruby
bkxd has quit [Ping timeout: 276 seconds]
ramfjord has quit [Quit: Lost terminal]
yo61 has joined #ruby
PedramT has joined #ruby
PedramT has quit [Client Quit]
lxsameer has joined #ruby
Chunlea_ has joined #ruby
kirillzh has joined #ruby
Jonah11_ has joined #ruby
jhn has quit [Quit: Textual IRC Client: www.textualapp.com]
hxegon_AFK has quit [Quit: BRB]
pawnbox_ has quit [Remote host closed the connection]
malconis has joined #ruby
joevandyk has joined #ruby
solars has joined #ruby
ekinmur_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Lomex has joined #ruby
konr has quit [Quit: Connection closed for inactivity]
sp4rrow has joined #ruby
sepp2k has quit [Quit: Leaving.]
Musashi007 has joined #ruby
Musashi007 has quit [Client Quit]
symm- has joined #ruby
SilverKey has quit [Quit: Halted.]
JesseH has joined #ruby
JesseH has quit [Quit: Leaving]
gnufied__ has joined #ruby
lemur has joined #ruby
Chagel has joined #ruby
ramfjord has joined #ruby
SilverKey has joined #ruby
lxsameer has quit [Ping timeout: 276 seconds]
kfpratt has joined #ruby
pietr0 has joined #ruby
al2o3-cr1 has joined #ruby
lemur has quit [Ping timeout: 260 seconds]
charlemagne has quit [Read error: Connection reset by peer]
al2o3-cr is now known as Guest65
al2o3-cr1 is now known as al2o3-cr
elifoster|alt is now known as elifoster
Nilium has quit [Ping timeout: 276 seconds]
Guest65 has quit [Read error: Connection reset by peer]
charlemagne has joined #ruby
Chagel has quit [Ping timeout: 244 seconds]
baweaver has quit [Remote host closed the connection]
ramfjord_ has joined #ruby
Nilium has joined #ruby
trinaldi has quit [Quit: bye]
Devalo has joined #ruby
leftpad has joined #ruby
Eiam_ has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
gmas has quit [Ping timeout: 276 seconds]
ramfjord has quit [Ping timeout: 260 seconds]
baweaver has joined #ruby
araujo has joined #ruby
araujo has joined #ruby
gmas has joined #ruby
last_staff1 has joined #ruby
MuffinPimp has quit [Ping timeout: 276 seconds]
Paradox has quit [Ping timeout: 276 seconds]
ceej has quit [Ping timeout: 276 seconds]
headius has quit [Ping timeout: 276 seconds]
charlemagne has quit [Ping timeout: 260 seconds]
klka has quit []
Lumio has joined #ruby
headius has joined #ruby
MuffinPimp has joined #ruby
last_staff has quit [Ping timeout: 244 seconds]
last_staff1 is now known as last_staff
ceej has joined #ruby
hobodave_ has joined #ruby
Paradox has joined #ruby
nirix has quit [Ping timeout: 260 seconds]
nirix has joined #ruby
ramortegui has quit [Quit: Ex-Chat]
dionysus69 has joined #ruby
jidar has quit [Ping timeout: 276 seconds]
djellemah has quit [Ping timeout: 244 seconds]
moei has quit [Read error: Connection reset by peer]
hobodave has quit [Ping timeout: 260 seconds]
al2o3-cr has quit [Ping timeout: 264 seconds]
kirillzh has quit [Quit: Textual IRC Client: www.textualapp.com]
moei has joined #ruby
jumbomax has joined #ruby
OTORelic2 has joined #ruby
al2o3-cr has joined #ruby
BtcBen has quit [Ping timeout: 244 seconds]
djbkd has joined #ruby
Rickmasta has quit [Ping timeout: 276 seconds]
karmatr0n has quit [Ping timeout: 264 seconds]
Rickmasta has joined #ruby
yfeldblum has quit [Ping timeout: 260 seconds]
jgpawletko has quit [Quit: jgpawletko]
dunpeal has joined #ruby
hxegon has joined #ruby
djbkd has quit [Ping timeout: 260 seconds]
<dunpeal> I have a whole bunch of JSON data I get from a bunch of APIs. Are there any tools / libraries to help me load them to a structured relational database?
smalltalker has joined #ruby
greenhat has quit [Ping timeout: 260 seconds]
<mustmodify_> well, there's ruby...
helpa has quit [Remote host closed the connection]
<dunpeal> yeah, I was looking for some Ruby tool / library.
<mustmodify_> dunpeal: srsly, though... I don't think there's anything like xslt for json... something that does quick transformations. You could model each interface using Valuable and then massage it into uniform output...
helpa has joined #ruby
RegulationD has joined #ruby
hobodave has joined #ruby
levifig has quit [Ping timeout: 260 seconds]
Esya has quit [Ping timeout: 260 seconds]
sp4rrow_ has joined #ruby
Devalo_ has joined #ruby
mozzarel1 has joined #ruby
malconis_ has joined #ruby
nobitano_ has joined #ruby
nettoweb has joined #ruby
djellemah has joined #ruby
rightpad has joined #ruby
Paradox has quit [Ping timeout: 264 seconds]
FooMunki has quit [Ping timeout: 264 seconds]
tonini has quit [Ping timeout: 264 seconds]
modin has quit [Ping timeout: 264 seconds]
FooMunki has joined #ruby
nobitano_ has quit [Read error: Connection reset by peer]
djcp has quit [Ping timeout: 260 seconds]
levifig has joined #ruby
Lumio has quit [Quit: Lumio]
jackjackdripper1 has joined #ruby
nirix has quit [Ping timeout: 264 seconds]
M-shine has quit [Ping timeout: 264 seconds]
jmcc_________ has quit [Ping timeout: 264 seconds]
daxroc has quit [Ping timeout: 264 seconds]
nobitano_ has joined #ruby
Lomex has quit [Remote host closed the connection]
Devalo has quit [Ping timeout: 264 seconds]
leftpad has quit [Ping timeout: 264 seconds]
Elysia has quit [Ping timeout: 264 seconds]
Regulati_ has quit [Ping timeout: 264 seconds]
kapowaz has quit [Ping timeout: 264 seconds]
Vile` has quit [Ping timeout: 264 seconds]
deeprave has quit [Ping timeout: 264 seconds]
jpinnix_______ has quit [Ping timeout: 264 seconds]
Ankhers has quit [Ping timeout: 264 seconds]
speakingcode has quit [Ping timeout: 264 seconds]
nobitano_ has quit [Write error: Connection reset by peer]
nobitano_ has joined #ruby
jumbomax has quit [Ping timeout: 264 seconds]
hobodave_ has quit [Ping timeout: 264 seconds]
sp4rrow has quit [Ping timeout: 264 seconds]
malconis has quit [Ping timeout: 264 seconds]
sgambino has quit [Ping timeout: 264 seconds]
jackjackdripper has quit [Ping timeout: 264 seconds]
sauvin has quit [Ping timeout: 264 seconds]
mozzarella has quit [Ping timeout: 264 seconds]
nobitanobi has quit [Ping timeout: 264 seconds]
dezull has quit [Ping timeout: 264 seconds]
codecop has quit [Ping timeout: 264 seconds]
postmodern has quit [Ping timeout: 264 seconds]
programmerq has quit [Ping timeout: 264 seconds]
tvsutton has quit [Ping timeout: 264 seconds]
jabreity_ has quit [Ping timeout: 264 seconds]
vondruch has quit [Ping timeout: 264 seconds]
johnny56_ has quit [Ping timeout: 264 seconds]
Esya has joined #ruby
PedramT has joined #ruby
tonini has joined #ruby
greenhat has joined #ruby
andikr has quit [Remote host closed the connection]
diegoaguilar has quit [Ping timeout: 244 seconds]
jumbomax has joined #ruby
blackmes1 has joined #ruby
deeprave has joined #ruby
jmcc_________ has joined #ruby
nobitano_ has quit [Remote host closed the connection]
gnufied has quit [Quit: Leaving]
kapowaz has joined #ruby
daxroc has joined #ruby
jabreity_ has joined #ruby
jpinnix_______ has joined #ruby
Vile` has joined #ruby
tvsutton has joined #ruby
M-shine has joined #ruby
sdothum has quit [Read error: Connection reset by peer]
Paradox has joined #ruby
kirun has joined #ruby
Ankhers has joined #ruby
BtcBen has joined #ruby
sdothum has joined #ruby
nirix has joined #ruby
jidar has joined #ruby
curses has joined #ruby
aegis3121 has quit [Ping timeout: 244 seconds]
acidrainfall has left #ruby [#ruby]
jgpawletko has joined #ruby
IrishGringo_ has quit [Ping timeout: 276 seconds]
postmodern has joined #ruby
stannard has quit [Remote host closed the connection]
dezull has joined #ruby
curses has quit [Ping timeout: 260 seconds]
sauvin has joined #ruby
codecop has joined #ruby
programmerq has joined #ruby
vondruch has joined #ruby
ereslibre_laptop has quit [Ping timeout: 260 seconds]
techietrash has quit [Quit: Bye! <(^_^<)]
techietrash has joined #ruby
nettoweb has quit [Ping timeout: 276 seconds]
programmerq has quit [Remote host closed the connection]
diegoaguilar has joined #ruby
paultreny has joined #ruby
programmerq has joined #ruby
nettoweb has joined #ruby
paultreny is now known as Guest57403
kfpratt has quit []
IrishGringo has joined #ruby
programmerq has quit [Remote host closed the connection]
jgpawletko has quit [Quit: jgpawletko]
rightpad has quit [Remote host closed the connection]
programmerq has joined #ruby
newjersey has joined #ruby
newjersey has quit [Max SendQ exceeded]
th0m has joined #ruby
synthroid has quit []
speakingcode has joined #ruby
Jonah11_ has quit []
johnmilton has quit [Remote host closed the connection]
Tempesta has joined #ruby
xaxisx has joined #ruby
Tempesta_ has quit [Ping timeout: 260 seconds]
BtcBen has quit [Ping timeout: 244 seconds]
noService has quit [Ping timeout: 276 seconds]
Nanuq has quit [Ping timeout: 264 seconds]
poerror has joined #ruby
Nanuq has joined #ruby
sgambino has joined #ruby
aegis3121 has joined #ruby
PedramT has quit [Ping timeout: 276 seconds]
brent__ has quit [Quit: Connection closed for inactivity]
stannard has joined #ruby
vdamewood has joined #ruby
SCHAAP137 has joined #ruby
swills_ has quit [Ping timeout: 244 seconds]
codecop has quit [Remote host closed the connection]
ereslibre has joined #ruby
goodroot has quit [Quit: WeeChat 1.4]
mrmist has joined #ruby
_djbkd has quit [Remote host closed the connection]
huyderman has quit [Remote host closed the connection]
dionysus69 has quit [Ping timeout: 276 seconds]
ta_ has joined #ruby
mrmist has left #ruby [#ruby]
vwbusguy has joined #ruby
LaT0rtue has quit [Read error: Connection reset by peer]
xaxisx has quit [Quit: xaxisx]
Lomex has joined #ruby
huyderman has joined #ruby
n008f4g_ has joined #ruby
Lomex_ has joined #ruby
ur5us has joined #ruby
noService has joined #ruby
IrishGringo has quit [Ping timeout: 244 seconds]
jdm has joined #ruby
Lomex has quit [Ping timeout: 260 seconds]
ramfjord_ has quit [Ping timeout: 260 seconds]
PedramT has joined #ruby
BtcBen has joined #ruby
Amnez777 has quit [Ping timeout: 244 seconds]
GinoMan2440 has quit [Ping timeout: 260 seconds]
someish has quit [Quit: someish]
Alina-malina has quit [Ping timeout: 244 seconds]
monod has quit [Read error: Connection reset by peer]
djbkd has joined #ruby
bronson has joined #ruby
dede has quit [Quit: Connection closed for inactivity]
ldnunes has quit [Quit: Leaving]
djbkd has quit [Ping timeout: 244 seconds]
tubuliferous has quit [Ping timeout: 276 seconds]
poerror has left #ruby ["Textual IRC Client: www.textualapp.com"]
ramfjord has joined #ruby
<shadoi> also see JQ and JO
stannard has quit [Read error: Connection reset by peer]
SilverKey has quit [Quit: Halted.]
bronson has quit [Ping timeout: 276 seconds]
nobitanobi has joined #ruby
<shadoi> there's definitely nothing magical that will just do the conversions you want though, it'll require a fair amount of work.
BTRE has quit [Ping timeout: 260 seconds]
Alina-malina has joined #ruby
tubuliferous has joined #ruby
Amnez777 has joined #ruby
Alina-malina has quit [Changing host]
Alina-malina has joined #ruby
zacstewart has joined #ruby
vwbusguy has quit [Ping timeout: 244 seconds]
yfeldblum has joined #ruby
agentmeerkat has joined #ruby
ta_ has quit [Remote host closed the connection]
lacrosse has joined #ruby
nobitanobi has quit [Remote host closed the connection]
jdm has quit [Remote host closed the connection]
dmr8 has quit [Quit: Leaving]
bkxd has joined #ruby
someish has joined #ruby
elifoster has quit [Ping timeout: 244 seconds]
BTRE has joined #ruby
PedramT has quit []
P_R_Delts has joined #ruby
<P_R_Delts> How do I use peek inside of a map enumerator block?
sirecote has quit [Ping timeout: 260 seconds]
stannard has joined #ruby
stannard has quit [Remote host closed the connection]
stannard has joined #ruby
bkxd has quit [Ping timeout: 276 seconds]
last_staff has quit [Quit: last_staff]
gf3 has quit [Ping timeout: 260 seconds]
gf3 has joined #ruby
sirecote has joined #ruby
bronson has joined #ruby
<Ox0dea> P_R_Delts: You'll have to have a reference to the Enumerator itself, which #map doesn't give you.
<Ox0dea> You could do the #map inside a #tap, but that's almost certainly the wrong approach.
jhack has quit [Quit: jhack]
spangler has left #ruby ["Closing Window"]
<P_R_Delts> So basically I have an array, and if a number x is greater than the next number, I want to subtract the next number from x and then drop the next number from the array
malconis_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mdw has quit [Quit: Sleeping Zzzzz]
bronson has quit [Client Quit]
<P_R_Delts> to "reduce" the array, but not to 1 number, just to an array that is in order from smallest to largest, with all the out of order elements subtracted from the previous element, and then removed
<Ox0dea> Roman numerals?
nobitanobi has joined #ruby
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bronson has joined #ruby
<P_R_Delts> Yeah
<P_R_Delts> my original idea was, when that condition was met, to make the smaller number a negative, and then run a reduce on the entire array and just add them all together
modin has joined #ruby
karmatr0n has joined #ruby
<P_R_Delts> so if XIV is 14 or 5 1 10, so I would compare 5 and 1, since 1 is less than 5, turn 1 into a negative, do the same comparison, since 10 is great, don't turn it into a negative, then reduce the now array [5, -1, 10] and get 14
<P_R_Delts> I was just going to run a "for each" on it, but I was curious if there was a better way
Devalo_ has quit [Remote host closed the connection]
Outlastsheep has left #ruby [#ruby]
workmad3 has joined #ruby
johnny56_ has joined #ruby
banister has joined #ruby
Aviio has joined #ruby
jdm has joined #ruby
solars has quit [Ping timeout: 276 seconds]
jt__ has quit [Remote host closed the connection]
<baweaver> "reduce" is a ruby function
mr_knip has quit [Ping timeout: 244 seconds]
<P_R_Delts> right, that is the one part I have
<P_R_Delts> if the roman numeral is straight forward, like XXI, I can do it
<P_R_Delts> because I just reduce the array [20, 1] to 21
Azure|dc has joined #ruby
<P_R_Delts> but with numerals that subtract values, I need to make them negative or subtract them and then remove them
<Ox0dea> Do you intend to handle weird things like XMX?
<P_R_Delts> like XIV being 14
<adaedra> Leave Louis alone.
<P_R_Delts> That would be.... 2000?
Azure has quit [Ping timeout: 276 seconds]
<P_R_Delts> 1990 + 10 ?
kadoppe has joined #ruby
workmad3 has quit [Ping timeout: 264 seconds]
<P_R_Delts> err
<Ox0dea> Er, it'd be 1000, but that was a bad example.
<P_R_Delts> 1000, I mean
<P_R_Delts> yeah
<adaedra> 1000, yeah
<P_R_Delts> I do not believe that is something I care about solving for
<adaedra> but that doesn't follow the rule of roman numerals
<P_R_Delts> Right, that seems like it wouldn't make sense anyways, but I think th eway I am doing this would still solve it correctly
<Ox0dea> Does it boil down to a single rule for that?
eljimbo has quit [Quit: This computer has gone to sleep]
<Ox0dea> XL is valid while VL is not, right?
<adaedra> I'd say so.
<P_R_Delts> L is... 50?
<adaedra> yep.
<Ox0dea> But both CM and DM are valid?
<Ox0dea> What's the rule?
dezull has quit [Quit: Leaving]
<adaedra> I have a doubt on D now, 500?
<Ox0dea> Oui.
<P_R_Delts> Wait, why would VL not be valid
<Ox0dea> ¯\_(ツ)_/¯
<P_R_Delts> is 45 supposed to be XXXXV?
<Ox0dea> XLV, I think.
<adaedra> mh.
<Ox0dea> Kinda dumb.
<P_R_Delts> I think most cases are very straight forward, but the rule still stands
<Ox0dea> Romanes eunt domus.
<adaedra> I haven't done this in a while and usually stop counting them around 20 nowadays.
<P_R_Delts> if x[1] > x[2], then minus x[2] from x[1] and continue
<P_R_Delts> if a lower number is on the wrong side of a larger number, that means subtraction whatever the case
johnbat26 has quit [Quit: KVIrc 4.9.1 Aria http://www.kvirc.net/]
<aegis3121> If the Super Bowl taught me anything it's that XLV is 45.
<P_R_Delts> all repeating numerals are converted to their added amounts (ie XX is turned into 20 in the array, not [10, 10])
<adaedra> Ox0dea: If I follow things correctly, DM is not valid.
karmatr0n has quit [Ping timeout: 244 seconds]
edwinvdgraaf has joined #ruby
MagePsycho_ has quit [Quit: MagePsycho_]
<Ox0dea> adaedra: If only because it can be simplified to just D, I imagine.
<adaedra> Ox0dea: because for substracting, only power of ten are allowed.
<Ox0dea> Oh?
<Ox0dea> Yeah, that sounds right.
elifoster has joined #ruby
s00pcan has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
kadoppe has quit [Ping timeout: 264 seconds]
Madplatypus has joined #ruby
nb_bez___ has joined #ruby
solars has joined #ruby
SilverKey has joined #ruby
GinoMan2440 has joined #ruby
tubuliferous has quit [Ping timeout: 276 seconds]
kam270 has joined #ruby
elifoster has quit [Ping timeout: 244 seconds]
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby
<P_R_Delts> alright
<P_R_Delts> well
<P_R_Delts> I used an external variable to keep track of the last value for Map
<P_R_Delts> since I can't look at the last value while inside the block
<Ox0dea> &ri each_cons P_R_Delts
djbkd has joined #ruby
<P_R_Delts> But it replace the current value with the value I return, does it?
<P_R_Delts> Like Map does.
<P_R_Delts> So how do I affect the Array if I can't do that?
<P_R_Delts> Lemme show you what I got
northrup has joined #ruby
dhollinger has quit [Quit: WeeChat 1.4]
<aegis3121> fwiw: you can call it a `.rb` file and github will provide syntax highlight and, I believe, force you to ruby standards of two-space tabs.
Don_John has joined #ruby
<P_R_Delts> I didn't even notice a place to name the file :p
diegoaguilar has quit [Ping timeout: 260 seconds]
<P_R_Delts> Its anonymous too, so I can't edit it
Don_John has quit [Remote host closed the connection]
<aegis3121> No worries, just for future reference :)
<P_R_Delts> Thank you
baweaver has joined #ruby
rbennacer has quit [Ping timeout: 260 seconds]
djbkd has quit [Ping timeout: 260 seconds]
siaw_ has joined #ruby
<P_R_Delts> Is there a more elegant solution than my map in the Gist above?
hobodave has quit [Quit: Computer has gone to sleep.]
rodfersou has quit [Quit: leaving]
siaw has quit [Ping timeout: 244 seconds]
siaw_ is now known as siaw
<P_R_Delts> lots of people seem to be using inject(0)
<Ox0dea> The explicit initializer there is only for handling the case where the input is empty.
<P_R_Delts> fair enough
<Ox0dea> #inject is an inferior alias for #reduce.
<P_R_Delts> honestly it looks like they are just doing
<P_R_Delts> yeah
<P_R_Delts> a reduction
<P_R_Delts> which means half of them arn't taking any negatives into account
<Ox0dea> Well, negatives don't have to come into it.
<Ox0dea> But `inject(0, :+)` handles negatives just fine?
<P_R_Delts> No no
<P_R_Delts> I mean
ico has joined #ruby
<P_R_Delts> okay, XIV is 14
n1colas_ has joined #ruby
<P_R_Delts> but if you do it their method, it would be 16
code_ has quit [Ping timeout: 244 seconds]
tom39291 has quit [Ping timeout: 244 seconds]
<P_R_Delts> since it is literally just adding all those values up
<P_R_Delts> Some of the test cases have subtractions though, so I don't understand why these solutions work
unsymbol_ has quit [Ping timeout: 244 seconds]
iNs has quit [Ping timeout: 244 seconds]
Takumo has quit [Ping timeout: 244 seconds]
Elysia has joined #ruby
krz has quit [Ping timeout: 276 seconds]
Gasher has joined #ruby
Alina-malina has quit [Ping timeout: 244 seconds]
al2o3-cr has quit [Ping timeout: 244 seconds]
funnel has quit [Ping timeout: 244 seconds]
DenSchub has quit [Ping timeout: 244 seconds]
Morrolan has quit [Ping timeout: 244 seconds]
<P_R_Delts> ohhhh
KensoDev has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> Again, they don't necessarily need to be looked at as subtractions.
<P_R_Delts> their dictionary takes it into acount
<Ox0dea> ^
<P_R_Delts> they have dictionary entries for IX and IV
DenSchub has joined #ruby
<Ox0dea> Easy mode.
al2o3-cr has joined #ruby
n1colas has quit [Ping timeout: 244 seconds]
martinbjeldbak_ has quit [Ping timeout: 244 seconds]
Drakevr has quit [Ping timeout: 244 seconds]
Kim^J has quit [Ping timeout: 244 seconds]
crazyphil has joined #ruby
<P_R_Delts> Yeah, ok
<P_R_Delts> This makes sense now
<P_R_Delts> did roman numerals go above 1000?
<Ox0dea> Sort of.
j3r0 has quit [Ping timeout: 276 seconds]
<Ox0dea> They sometimes used an overline to indicate another order of magnitude or something.
<P_R_Delts> Besides saying MMMMMM a bunch
<P_R_Delts> Oh
Takumo has joined #ruby
Takumo has quit [Changing host]
Takumo has joined #ruby
tom39291 has joined #ruby
code_ has joined #ruby
<P_R_Delts> well, finish that, I am heading home
<P_R_Delts> cya later
iNs has joined #ruby
<crazyphil> ok, if I have a JSON array like so: { "key1":, ["a", "b", "c"] }, using ruby how would I create a loop to put those 3 values into 3 automatically created variables, because while my example has 3, I could have as few as 1, or as many as 5?
unsymbol has joined #ruby
P_R_Delts has quit [Quit: Page closed]
Drakevr has joined #ruby
Alina-malina has joined #ruby
funnel has joined #ruby
Morrolan has joined #ruby
<Ox0dea> crazyphil: You can't dynamically introduce new local variables.
Kim^J has joined #ruby
<crazyphil> (basically I need to split that array into individual JSON keys)
workmad3 has joined #ruby
<Ox0dea> And map them to what?
<crazyphil> into individual JSON keys
diegoaguilar has joined #ruby
<Ox0dea> Keys have values.
<crazyphil> ok, I need to create a key for every value in that array, then assign the value in the array to that new key
stannard has quit [Remote host closed the connection]
<Ox0dea> crazyphil: The keys are "a", "b", and "c" in this example; what values should they have?
<Ox0dea> {"a" => ?, "b" => ?, "c" => ?}
<crazyphil> let me make sure I've got my data right
SilverKey has quit [Quit: Halted.]
bkxd has joined #ruby
jt__ has joined #ruby
martinbjeldbak has joined #ruby
<crazyphil> ok, my original key looks like this: { "upstream_req_time":"1.00, 2.50, 3.75" }
bronson has quit [Remote host closed the connection]
<crazyphil> I need to split each of those values into new kv pairs dynamically, with a base kay name of "urt-<number goes here>":
workmad3 has quit [Ping timeout: 244 seconds]
noService has quit [Ping timeout: 276 seconds]
edwinvdgraaf has quit [Remote host closed the connection]
<Ox0dea> And what values?
<crazyphil> in the case of my example above, I'd need { "newkey1":"1.00", "newkey2":"2.50", "newkey3":"3.75" }
curses has joined #ruby
<smathy> >> h = { "upstream_req_time":"1.00, 2.50, 3.75" }; Hash[ h[:upstream_req_time].split(",").map {|v| [ "urt-#{v}", v ]}]
<ruby[bot]> smathy: # => {"urt-1.00"=>"1.00", "urt- 2.50"=>" 2.50", "urt- 3.75"=>" 3.75"} (https://eval.in/554259)
<smathy> Heh, d'oh.
<smathy> Split on /\s*,\s*/ instead.
BtcBen has quit [Ping timeout: 244 seconds]
<crazyphil> I had no idea it would be that simple, here I was thinking I'd need to make some sort of loop
<smathy> crazyphil, map is a loop.
gnufied__ has quit [Ping timeout: 276 seconds]
<crazyphil> ok, I'm very new to ruby as logstash doesn't have everything I need built in, so I'm learning as I go
<crazyphil> but what you put there is very ideal, thank you
bkxd has quit [Ping timeout: 276 seconds]
<smathy> You're welcome.
curses has quit [Ping timeout: 244 seconds]
Eiam_ has joined #ruby
Eiam_ has quit [Client Quit]
Emmanuel_Chanel_ has quit [Quit: Leaving]
Emmanuel_Chanel has joined #ruby
Emmanuel_Chanel has quit [Max SendQ exceeded]
<crazyphil> hmm, the key names would have the raw value from the original key appended to their name? any way to make it simply numeric based on the number of values in that key like urt-1, urt-2 etc.?
Lomex_ has quit [Remote host closed the connection]
Emmanuel_Chanel has joined #ruby
zenlot has joined #ruby
davedev24 has quit []
<Ox0dea> &ri with_index crazyphil
<crazyphil> I actually came pretty close to that on my first search now that I'm understanding a little more about how ruby works
kareeoleez has quit [Remote host closed the connection]
<Ox0dea> \o/
<smathy> >> h = { "upstream_req_time":"1.00, 2.50, 3.75" }; Hash[ h[:upstream_req_time].split("\s*,\s*").map.with_index {|v,i| [ "urt-#{i+1}", v ]}]
<ruby[bot]> smathy: # => {"urt-1"=>"1.00, 2.50, 3.75"} (https://eval.in/554267)
<smathy> Oops, wrong way :(
zenlot6 has quit [Ping timeout: 276 seconds]
pawnbox has joined #ruby
Waqas has quit [Ping timeout: 244 seconds]
<smathy> /s not ""s in the split
<smathy> Lame.
<crazyphil> I'm still thinking in I guess pythonic terms in that I thought there would be some .() type function I could call to get the count of the map iteration or something
jdm has quit [Remote host closed the connection]
<Ox0dea> crazyphil: It's called #with_index.
<crazyphil> h = { "upstream_req_time":"1.00, 2.50, 3.75" }; Hash[ h[:upstream_req_time].split("/s*,/s*").map.with_index {|v,i| [ "urt-#{i+1}", v ]}]
<crazyphil> >> h = { "upstream_req_time":"1.00, 2.50, 3.75" }; Hash[ h[:upstream_req_time].split("/s*,/s*").map.with_index {|v,i| [ "urt-#{i+1}", v ]}]
<ruby[bot]> crazyphil: # => {"urt-1"=>"1.00, 2.50, 3.75"} (https://eval.in/554271)
<smathy> crazyphil, you want /\s*,\s*/ instead of ""s, that was my error.
BtcBen has joined #ruby
<crazyphil> >> h = { "upstream_req_time":"1.00, 2.50, 3.75" }; Hash[ h[:upstream_req_time].split("/\s*,/\s*").map.with_index {|v,i| [ "urt-#{i+1}", v ]}]
<ruby[bot]> crazyphil: # => {"urt-1"=>"1.00, 2.50, 3.75"} (https://eval.in/554278)
<Ox0dea> Saints preserve us.
<crazyphil> oh duh
bronson has joined #ruby
<smathy> crazyphil, better to use your own irb for experimenting.
<smathy> (says me)
ur5us has quit [Remote host closed the connection]
<crazyphil> will do
pawnbox has quit [Ping timeout: 260 seconds]
eljimador has quit [Read error: Connection reset by peer]
Devalo has joined #ruby
OTORelic2 has quit [Ping timeout: 260 seconds]
eljimmy has joined #ruby
ico has quit []
Alina-malina has quit [Ping timeout: 244 seconds]
curses has joined #ruby
ahuman has quit [Ping timeout: 244 seconds]
workmad3 has joined #ruby
jdm has joined #ruby
Amnez777 has quit [Ping timeout: 276 seconds]
Devalo has quit [Ping timeout: 264 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
vF3hNGxc47h8 has joined #ruby
ahuman has joined #ruby
webus has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
Chagel has joined #ruby
nobitanobi has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 276 seconds]
sdothum has joined #ruby
CloCkWeRX has quit [Ping timeout: 276 seconds]
myntcake has quit [Remote host closed the connection]
BtcBen has quit [Ping timeout: 244 seconds]
KensoDev has joined #ruby
Alina-malina has joined #ruby
solars has quit [Ping timeout: 264 seconds]
Chagel has quit [Ping timeout: 276 seconds]
nobitanobi has joined #ruby
Amnez777 has joined #ruby
nobitanobi has quit [Remote host closed the connection]
nobitanobi has joined #ruby
swills has joined #ruby
n008f4g_ has quit [Ping timeout: 276 seconds]
firstdayonthejob has quit [Ping timeout: 244 seconds]