baweaver changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.5.1, 2.4.4, 2.3.7, 2.6.0-preview1: https://www.ruby-lang.org || Paste 4+ lines of text to https://gist.github.com || Rails questions? Ask in #RubyOnRails || Books: https://goo.gl/wpGhoQ || Logs: https://irclog.whitequark.org/ruby
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
Yxhuvud has joined #ruby
lelliott has joined #ruby
dviola has joined #ruby
clemens3 has quit [Ping timeout: 268 seconds]
marr has quit [Ping timeout: 264 seconds]
caoraivoso has joined #ruby
sepp2k has quit [Quit: Leaving.]
jcarl43 has quit [Quit: WeeChat 2.1]
karapetyan has quit [Remote host closed the connection]
workmad3 has joined #ruby
cagomez has quit [Remote host closed the connection]
cagomez has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
guacamole has joined #ruby
cagomez has quit [Read error: Connection reset by peer]
rfoust has joined #ruby
LumberJackStrap has joined #ruby
sameerynho has quit [Ping timeout: 240 seconds]
workmad3 has quit [Ping timeout: 260 seconds]
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
Yxhuvud has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orbyt_ has joined #ruby
<quuxman> In an rspec test, can I mock a single method of an object and leave the rest alone?
AJA4350 has quit [Ping timeout: 265 seconds]
<lupine> sure. `expect(obj).to receive(....).and_return(...)
<lupine> or `allow`
<quuxman> ah yes you can, it's a Partial Double. Ok, my next question is if you use `allow(Foo::Logger).to receive(:msg)` does that method revert to the original at the end of the test?
konsolebox has quit [Ping timeout: 255 seconds]
duderonomy has joined #ruby
<quuxman> I mean if Foo::Logger.msg is already defined, does msg have the original definition after the test
sanscoeur has quit [Ping timeout: 260 seconds]
caoraivoso has quit [Quit: WeeChat 2.1]
konsolebox has joined #ruby
AJA4350 has joined #ruby
AJA4350 has quit [Remote host closed the connection]
rivalomega has quit []
memo1 has joined #ruby
erlend has quit [Ping timeout: 260 seconds]
ryzokuken has joined #ruby
erlend has joined #ruby
arescorpio has joined #ruby
mroutis has quit [Ping timeout: 276 seconds]
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
vikaton has joined #ruby
minimalism has joined #ruby
Yxhuvud has joined #ruby
lelliott has quit [Remote host closed the connection]
lelliott has joined #ruby
<quuxman> apparently yes
anisha has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
despai has quit [Quit: ...]
x0f has quit [Ping timeout: 255 seconds]
karapetyan has joined #ruby
quobo has quit [Quit: Connection closed for inactivity]
ledestin has joined #ruby
x0f has joined #ruby
karapetyan has quit [Ping timeout: 265 seconds]
gizmore has joined #ruby
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
iMadper has quit [Remote host closed the connection]
Yxhuvud has joined #ruby
gizmore|2 has quit [Ping timeout: 265 seconds]
cyberg has quit [Remote host closed the connection]
twshelton has joined #ruby
Yxhuvud has quit [Client Quit]
Yxhuvud has joined #ruby
<havenwood> Radar: I spiffed up that nightly Ruby install script, fwiw: https://gist.github.com/havenwood/823382815cbdcfddadd798d4042023a8
mikeiniowa has quit [Remote host closed the connection]
shinnya has quit [Ping timeout: 240 seconds]
tolerablyjake has joined #ruby
Creatornator has quit [Ping timeout: 245 seconds]
noobineer has quit [Remote host closed the connection]
n0m4d1c has joined #ruby
cschneid_ has joined #ruby
s2013 has joined #ruby
mikhael_keehl has joined #ruby
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
<mikhael_keehl> What's the best gem of generating email reports?
ogres has joined #ruby
Yxhuvud has joined #ruby
<havenwood> mikhael_keehl: You want more than a regular email-sending library? What're the reports about?
tolerablyjake has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Miron has quit [Ping timeout: 265 seconds]
noobineer has joined #ruby
<mikhael_keehl> havenwood: I have a ruby script/app that runs rsync for every mirror 3-times a day. I want to get a weekly report of what rsync failed, and its error.
<havenwood> mikhael_keehl: It sounds like the mail or pony gems would do the trick.
<havenwood> mikhael_keehl: https://github.com/benprew/pony
<havenwood> mikhael_keehl: https://github.com/mikel/mail
Miron has joined #ruby
<mikhael_keehl> havenwood: I'll look into it, thanks mate
<havenwood> mikhael_keehl: no prob, you're welcome
<havenwood> mikhael_keehl: http://awesome-ruby.com/#-email
Sammichmaker has quit [Quit: Leaving]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mikhael_keehl> ruby-toolbox, hey teach a man how to fish, hehe ;)
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
dinfuehr has quit [Ping timeout: 264 seconds]
Yxhuvud has joined #ruby
cschneid_ has quit [Remote host closed the connection]
Xiti` has quit [Quit: Xiti`]
cschneid_ has joined #ruby
dinfuehr has joined #ruby
alfiemax has joined #ruby
herbmillerjr has joined #ruby
Xiti has joined #ruby
RougeR has quit [Ping timeout: 276 seconds]
cschneid_ has quit [Remote host closed the connection]
sspreitz has quit [Ping timeout: 256 seconds]
sspreitz has joined #ruby
<memo1> hi, im running a script wih a ffmpeg (bash), but this command blocks other execution lines. How i run concurrently other lines of codes?, right now im using exec() and system() with no luck
cschneid_ has joined #ruby
arescorpio has quit [Ping timeout: 240 seconds]
cschneid_ has quit [Ping timeout: 260 seconds]
cschneid_ has joined #ruby
lelliott has quit [Remote host closed the connection]
shtirlic has quit [Ping timeout: 256 seconds]
mikhael_keehl has quit [Ping timeout: 260 seconds]
drale2k has quit [Ping timeout: 256 seconds]
tacoboy has quit [Remote host closed the connection]
tacoboy has joined #ruby
gremax has quit [Ping timeout: 256 seconds]
drale2k has joined #ruby
shtirlic has joined #ruby
JankyDoodle has quit []
gremax has joined #ruby
gix- has joined #ruby
gix has quit [Disconnected by services]
n0m4d1c_ has joined #ruby
workmad3 has joined #ruby
kurko_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gix- has quit [Ping timeout: 255 seconds]
n0m4d1c has quit [Ping timeout: 240 seconds]
n0m4d1c_ has quit [Ping timeout: 265 seconds]
gix has joined #ruby
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
workmad3 has quit [Ping timeout: 256 seconds]
Yxhuvud has joined #ruby
tolerablyjake has joined #ruby
Azure has quit [Read error: Connection reset by peer]
Azure has joined #ruby
blackchalk has joined #ruby
blackchalk has quit [Changing host]
blackchalk has joined #ruby
Janky has joined #ruby
blackchalk has quit [Client Quit]
blackchalk has joined #ruby
blackchalk has joined #ruby
blackchalk has quit [Changing host]
KeyJoo has quit [Remote host closed the connection]
govg has quit [Ping timeout: 260 seconds]
ciscam has quit [Ping timeout: 264 seconds]
govg has joined #ruby
ciscam has joined #ruby
<Radar> havenwood: spiffy
karapetyan has joined #ruby
eckhardt has joined #ruby
darkhanb has joined #ruby
govg has quit [Ping timeout: 240 seconds]
karapetyan has quit [Ping timeout: 260 seconds]
guardian has quit [Read error: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number]
blackchalk has quit [Quit: quitting]
lelliott has joined #ruby
mroutis has joined #ruby
cadillac_ has quit [Quit: I quit]
cadillac_ has joined #ruby
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
Yxhuvud has joined #ruby
erlend has quit [Ping timeout: 276 seconds]
erlend has joined #ruby
sylario has quit [Quit: Connection closed for inactivity]
KeyJoo has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mooe has quit [Quit: Connection closed for inactivity]
eckhardt has quit [Ping timeout: 240 seconds]
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
Yxhuvud has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
guacamole has joined #ruby
lelliott has quit [Remote host closed the connection]
gix- has joined #ruby
gix has quit [Disconnected by services]
s2013 has joined #ruby
Mike11 has joined #ruby
alfiemax has quit [Remote host closed the connection]
ta__ has joined #ruby
LumberJackStrap has quit [Ping timeout: 260 seconds]
ta_ has quit [Ping timeout: 255 seconds]
jcarl43 has joined #ruby
kapil___ has joined #ruby
zautomata1 has joined #ruby
zautomata has quit [Ping timeout: 264 seconds]
nadir has joined #ruby
cschneid_ has quit [Remote host closed the connection]
cschneid_ has joined #ruby
DTZUZO has quit [Read error: Connection reset by peer]
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
ogres has quit [Quit: Connection closed for inactivity]
cschneid_ has quit [Remote host closed the connection]
anisha has quit [Quit: This computer has gone to sleep]
cschneid_ has joined #ruby
Yxhuvud has joined #ruby
Skarlso has quit [Ping timeout: 256 seconds]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
s2013 has joined #ruby
matled has quit [Remote host closed the connection]
Skarlso has joined #ruby
govg has joined #ruby
matled has joined #ruby
ryzokuken has quit [Remote host closed the connection]
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mroutis has quit [Ping timeout: 260 seconds]
arescorpio has joined #ruby
arescorpio has quit [Max SendQ exceeded]
workmad3 has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
guacamole has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
guacamole has quit [Ping timeout: 276 seconds]
mrBen2k2k2k has joined #ruby
dviola has quit [Quit: WeeChat 2.1]
sundhell is now known as sundhell_away
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
tolerablyjake has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
arescorpio has joined #ruby
Azure has quit [Ping timeout: 268 seconds]
cschneid_ has quit [Remote host closed the connection]
cschneid_ has joined #ruby
Mike11 has quit [Read error: Connection reset by peer]
karapetyan has joined #ruby
sauvin has joined #ruby
cschneid_ has quit [Ping timeout: 264 seconds]
arescorpio has quit [Excess Flood]
karapetyan has quit [Ping timeout: 265 seconds]
memo1 has quit [Ping timeout: 265 seconds]
eckhardt has joined #ruby
harrycs has joined #ruby
ruby[bot] has joined #ruby
harrycs has quit [Ping timeout: 260 seconds]
<baweaver> I made fun! https://github.com/baweaver/qo
<baweaver> people.select(&Qo[name: /weaver/, puns: true])
<baweaver> Will probably make a nice post on Medium for it later
jamesaxl has joined #ruby
reber has joined #ruby
alfiemax has joined #ruby
lelliott has joined #ruby
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
oleo has quit [Quit: Leaving]
apeiros has quit [Ping timeout: 264 seconds]
vondruch has joined #ruby
erlend has quit [Ping timeout: 256 seconds]
erlend has joined #ruby
pd2000 has joined #ruby
pd2000 has quit [Client Quit]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<havenwood> baweaver: nice!
hlmjr has joined #ruby
herbmillerjr has quit [Ping timeout: 260 seconds]
aupadhye has joined #ruby
anisha has joined #ruby
DTZUZO has joined #ruby
karapetyan has joined #ruby
lelliott has quit [Remote host closed the connection]
ryzokuken has joined #ruby
lelliott has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
npgm has quit [Quit: Connection closed for inactivity]
cam27 has joined #ruby
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
kapil___ has quit [Quit: Connection closed for inactivity]
karapetyan has quit [Ping timeout: 265 seconds]
lelliott has quit [Ping timeout: 265 seconds]
Puffball has joined #ruby
eckhardt has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
n008f4g_ has joined #ruby
<dminuoso> baweaver: Now implement that as builtin pattern matching.
AndBobsYourUncle has joined #ruby
<dminuoso> But it's a neat little library.
<baweaver> I've thought about it before
<baweaver> so I decided to cheat a bit and see if I can tempt Matz to write / green light it by releasing it as a gem
<baweaver> :D
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
<dminuoso> baweaver: Im not convinced about #=== anymore sadly
<baweaver> I make due with which tools I can
<baweaver> and there's quite enough in Ruby to provide hours of entertainment, so... :D
<dminuoso> Haha
tcopeland has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 260 seconds]
anisha has quit [Quit: This computer has gone to sleep]
anisha has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
pd2000 has joined #ruby
reber has quit [Remote host closed the connection]
anisha_ has joined #ruby
n008f4g_ has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 256 seconds]
anisha has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jcarl43 has quit [Quit: WeeChat 2.1]
anisha_ has quit [Quit: This computer has gone to sleep]
jenrzzz has quit [Ping timeout: 265 seconds]
workmad3 has joined #ruby
chrisgopher has joined #ruby
KeyJoo has quit [Remote host closed the connection]
linetrace has quit [Ping timeout: 276 seconds]
workmad3 has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
sundhell_away is now known as sundhell
jenrzzz has quit [Ping timeout: 268 seconds]
pd2000 has quit [Remote host closed the connection]
clemens3 has joined #ruby
thinkpad has quit [Ping timeout: 255 seconds]
pd2000 has joined #ruby
al2o3-cr has quit [Quit: WeeChat 2.1]
thinkpad has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
gr33n7007h has joined #ruby
gr33n7007h is now known as al2o3-cr
pd2000 has quit [Remote host closed the connection]
tdy has quit [Read error: Connection reset by peer]
sylario has joined #ruby
tcopeland has joined #ruby
tdy has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
indiche has joined #ruby
hkais has joined #ruby
<hkais> hello together
<hkais> I am a very new noob in ruby
<hkais> so struggeling with maybe a basic code
<hkais> .split.collect { |e| Issue.visible.find_by_id(e)}
<hkais> sorry
<hkais> issues = args[0].split.collect { |e| Issue.visible.find_by_id(e)}
linetrace has joined #ruby
<hkais> if I understand it correctly the args[0] is getting splitted, but what does the
<hkais> { |e| issue.visible.find.... } mean?
anisha has joined #ruby
pd2000 has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
<havenwood> hkais: It looks like Issue is an ApplicationRecord, visible is a scope, and it's finding the first in that scope that has the id e.
<hkais> is there any good book for reading? I have no clue what the scope is nor the ApplicationRecord.
<havenwood> hkais: They're Rails things.
<chrisgopher> The best reference for that kind of stuff would be the official Rails docs
<havenwood> ?rails
<ruby[bot]> Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
clemens3 has quit [Ping timeout: 268 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
anisha has quit [Quit: This computer has gone to sleep]
halt has joined #ruby
halt is now known as Guest54486
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pppktz has joined #ruby
KeyJoo has joined #ruby
yottanami has joined #ruby
<yottanami> Is any chance to use raw query in Mongoid?
<yottanami> I need to run a query like this db.users.find({"rounds.score": 20}, {"phone_number": 1, "rounds": { $elemMatch: { score: 20 } }})
indiche has quit [Quit: WeeChat 2.1]
kapil___ has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
dionysus69 has joined #ruby
clemens3 has joined #ruby
TomyWork has joined #ruby
erlend has quit [Ping timeout: 265 seconds]
erlend has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
AndBobsYourUncle has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Burgestrand has joined #ruby
cschneid_ has joined #ruby
fyrril has quit [Ping timeout: 245 seconds]
fyrril has joined #ruby
cschneid_ has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
reber has joined #ruby
voxxit has quit [*.net *.split]
venmx has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AndBobsYourUncle has joined #ruby
eckhardt has joined #ruby
marr has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
AndroUser2 has joined #ruby
troys has quit [Quit: Bye]
reber has quit [Remote host closed the connection]
AndroUser2 has quit [Client Quit]
jenrzzz has quit [Ping timeout: 265 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
venmx has quit [Remote host closed the connection]
phaul has joined #ruby
drale2k_ has joined #ruby
eckhardt has quit [Quit: Textual IRC Client: www.textualapp.com]
yukai has quit [Ping timeout: 255 seconds]
byte512 has quit [Ping timeout: 264 seconds]
jamesaxl has quit [Ping timeout: 268 seconds]
c0ncealed1 has quit [Remote host closed the connection]
c0ncealed1 has joined #ruby
guille-moe has joined #ruby
workmad3 has joined #ruby
tvw has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
ellcs has joined #ruby
cam27 has quit [Quit: cam27]
workmad3 has quit [Ping timeout: 240 seconds]
cschneid_ has joined #ruby
ur5us has quit [Ping timeout: 268 seconds]
KeyJoo has quit [Ping timeout: 256 seconds]
cschneid_ has quit [Ping timeout: 265 seconds]
yottanami has quit [Quit: Leaving]
ryzokuken has quit [Remote host closed the connection]
venmx has joined #ruby
mtkd has joined #ruby
ltt has joined #ruby
imode has quit [Ping timeout: 260 seconds]
claudiuinberlin has joined #ruby
amar has joined #ruby
KeyJoo has joined #ruby
pd2000 has quit [Ping timeout: 256 seconds]
ltt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ryzokuken has joined #ruby
plexigras has joined #ruby
Beams has joined #ruby
Beams has quit [Client Quit]
jenrzzz has quit [Ping timeout: 268 seconds]
ltt has joined #ruby
Beams has joined #ruby
armyriad has quit [Read error: Connection reset by peer]
armyriad has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
mikecmpbll has joined #ruby
rabajaj has joined #ruby
chrisgopher has quit []
Beams has quit [Quit: .]
GodFather has quit [Ping timeout: 276 seconds]
Beams has joined #ruby
NL3limin4t0r is now known as NL3limin4t0r_afk
Beams has quit [Quit: .]
Beams has joined #ruby
erlend has quit [Ping timeout: 256 seconds]
erlend has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
mikecmpbll has joined #ruby
Beams has quit [Quit: .]
minimalism has quit [Quit: minimalism]
Beams has joined #ruby
pilne has quit [Quit: Leaving]
qba73 has joined #ruby
karapetyan has joined #ruby
zautomata2 has joined #ruby
zautomata1 has quit [Ping timeout: 240 seconds]
guille-moe has quit [Remote host closed the connection]
Beams has quit [Quit: .]
guille-moe has joined #ruby
workmad3 has joined #ruby
vondruch_ has joined #ruby
qba73 has quit [Remote host closed the connection]
zautomata3 has joined #ruby
vondruch has quit [Ping timeout: 276 seconds]
vondruch_ is now known as vondruch
qba73 has joined #ruby
Beams has joined #ruby
dr3w_ has joined #ruby
zautomata2 has quit [Ping timeout: 255 seconds]
ltt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sundhell is now known as sundhell_away
suukim has joined #ruby
ltt has joined #ruby
vondruch_ has joined #ruby
GodFather has joined #ruby
AJA4350 has joined #ruby
vondruch has quit [Ping timeout: 276 seconds]
vondruch_ is now known as vondruch
voxxit has joined #ruby
drale2k_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
voxxit has quit [*.net *.split]
KeyJoo has quit [Ping timeout: 276 seconds]
Beams has quit [Quit: .]
drale2k_ has joined #ruby
drale2k_ has quit [Client Quit]
drale2k_ has joined #ruby
drale2k_ has quit [Client Quit]
DaniG2k has joined #ruby
DaniG2k has quit [Client Quit]
amar_ has joined #ruby
amar has quit [Ping timeout: 264 seconds]
Beams has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
amar_ has quit [Remote host closed the connection]
hkais has quit [Ping timeout: 240 seconds]
quobo has joined #ruby
amar has joined #ruby
ltt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dviola has joined #ruby
ElFerna has joined #ruby
Beams has quit [Quit: .]
ElFerna has quit [Client Quit]
zautomata4 has joined #ruby
ltt has joined #ruby
zautomata3 has quit [Ping timeout: 260 seconds]
Beams has joined #ruby
apparition has joined #ruby
apeiros has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
ltt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Beams has quit [Quit: .]
cadillac_ has quit [Read error: Connection reset by peer]
lazyatom has joined #ruby
reber has joined #ruby
ltt has joined #ruby
maxgrok has joined #ruby
cadillac_ has joined #ruby
dviola has quit [Read error: Connection timed out]
Azure has joined #ruby
dviola has joined #ruby
mikecmpbll has joined #ruby
drale2k_ has joined #ruby
dviola has quit [Changing host]
dviola has joined #ruby
Beams has joined #ruby
dviola has left #ruby [#ruby]
qba73 has quit [Remote host closed the connection]
qba73 has joined #ruby
despai has joined #ruby
Azure has quit [Max SendQ exceeded]
Azure has joined #ruby
maxgrok has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
jinie has quit [Quit: ZNC 1.6.1 - http://znc.in]
jinie has joined #ruby
nahra has joined #ruby
nowhereman_ has quit [Ping timeout: 256 seconds]
dr3w_ has joined #ruby
inerthia has joined #ruby
Cavallari has joined #ruby
houhoulis has joined #ruby
despai has quit [Quit: ...]
<Bish> dmarcoux: yesterday you said mutability is cool for the sake of performance, but i can't possible write code with mutation that is faster than immutable one :o (atleast if it's threaded)
<Bish> dminuoso: *
<Bish> i just rewrote a huge ass mutex overloaded code, and it's so much faster!
<apeiros> Bish: aka "I can write shit code in any language"
alfiemax has quit [Remote host closed the connection]
<Bish> apeiros: true, but i am wondering.. how i would make better performance with mutability
alfiemax has joined #ruby
<Bish> if it's multithreaded
uptime is now known as downtime
<Bish> mutex seem so costly especially in ruby
<apeiros> avoid shared mutable state
<Bish> so avoid mutexes
<apeiros> yes, a consequence of not having shared mutable state is that you need less mutexes.
<Bish> so that's what i said
<apeiros> not if we're pedantic.
ldnunes has joined #ruby
<apeiros> (though I'd even argue that it's not really pedantic)
<Bish> yep
erlend has quit [Ping timeout: 240 seconds]
<apeiros> as for "mutability has performance benefits" - copying large datastructures on changes can be expensive. "just" replacing a part of it in place can be much cheaper.
alfiemax has quit [Ping timeout: 240 seconds]
adlerdias has joined #ruby
<Bish> are there places where you have to have shared mutable state?
erlend has joined #ruby
<apeiros> the world is shared mutable state
cadillac_ has quit [Ping timeout: 240 seconds]
KeyJoo has joined #ruby
depesz has joined #ruby
<Bish> now it's getting philosophical
ltt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
amar has quit [Remote host closed the connection]
<apeiros> common place for shared mutable state: IO, the database
cadillac_ has joined #ruby
<apeiros> you can go from abstract to concrete. think about the interactions of your application with the world and you can see where shared mutable state permeates into your application.
amar has joined #ruby
mtkd has quit [Ping timeout: 264 seconds]
karapetyan has quit [Remote host closed the connection]
KeyJoo has quit [Remote host closed the connection]
mtkd has joined #ruby
claudiuinberlin has quit [Ping timeout: 264 seconds]
sidx64 has joined #ruby
raynold has quit [Quit: Connection closed for inactivity]
jeffreylevesque has quit [Ping timeout: 240 seconds]
karapetyan has joined #ruby
cadillac_ has quit [Ping timeout: 265 seconds]
cadillac_ has joined #ruby
alfiemax has joined #ruby
masterasia has quit [Ping timeout: 256 seconds]
hkais has joined #ruby
karapetyan has quit [Remote host closed the connection]
Beams has quit [Quit: .]
masterasia has joined #ruby
inerthia has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
amar has quit [Remote host closed the connection]
byte512 has joined #ruby
<depesz> hi. i have a class, that internally defines module. I'd like to make new class that has *some* of the methods from the module replaced by new code.
<depesz> how can I go about it?
Beams has joined #ruby
<apeiros> depesz: how did you add the methods of that module to your new class?
<depesz> it's not mine.
<depesz> basically - i have this gem: https://github.com/lfittl/pg_query
<apeiros> "I'd like to make a new class" - that says *your* class, *you* made it. no?
<depesz> internally it has class PgQuery, and in there there is Deparse module. I'd like to make na new class (PgQuery2), which inherits PgQuery, but overwrites some of the methods in Deparse module in it.
<depesz> apeiros: base class/module is not mine. the new one is mine, but Deparse methods seem to be called from parent class (PgQuery), and not my overwrite ...
<apeiros> ok, first things first:
<apeiros> do not inherit from classes you don't own
<depesz> why? copying the whole code doesn't make much sense.
<apeiros> copying the code isn't the only alternative
<depesz> i need to deparse sql query, but in nicer way. adding indentation, and other "things"
<apeiros> the common approach is to compose. i.e. your class contains an instance of that class.
<depesz> deparse code is there, i just need to modify *some* methods of the class.
<apeiros> anyway, re your original question: if you inherit, all you have to do to have some methods replaced with your own is to define them
<depesz> apeiros: well, then I would have to copy the whole deparse module, which is pretty long.
<depesz> apeiros: well, doesn't seem to be the case.
<depesz> moment, let me show some simple example
<apeiros> I'm not quite sure what leap you do to get to that conclusion ("then I have to copy deparse module")
synthroid has joined #ruby
<depesz> moment.
huyderman has joined #ruby
kurko_ has joined #ruby
<depesz> apeiros: deparse method (called in line 24) will call internally deparse_select().
<apeiros> ok, it seems you have some misconceptions here
<apeiros> and your explanation of the problem was, um, lets say "incomplete"
<depesz> i did overwrite it (and failed), but it didn't change the way it works.
<depesz> sorry about that
<depesz> is there any way to achieve what I need/want?
<depesz> as in: overwrite *some* of methods that are in a module inside class that I'm inheriting from?
<apeiros> the "inside a class" is irrelevant.
<apeiros> what matters is how PgQuery invokes the methods in Deparse
<apeiros> (which is why I asked you "how did you add the methods of that module to your new class")
<apeiros> either it includes Deparse, then it's as I said before, you just override it in your subclass (and that really means in the subclass, NOT in a module nested in your subclass)
<depesz> deparse method in PgQuery calls Deparse.from() for each item in tree
<apeiros> well
<apeiros> then you have bad luck
<depesz> i nested it because that's what i saw in pg_query gem source.
<depesz> how bad?
<apeiros> bad enough that there's no silver bullet. you'll have to inspect the codepath and figure out how to selectively replace/reuse parts.
despai has joined #ruby
<depesz> apeiros: given the source as it is in here - do you see a way i could have a pgquery2 class that will overwrite just deparse_select ?
<depesz> but keep all other things from normal pgquery ?
<apeiros> and bad enough that it'd take too much time for me, meaning I should go back to what I'm paid for. if you're still at it in ~5h, I can take another look.
<depesz> apeiros: would appreciate. just ping me if/when you'll have time.
<depesz> thanks.
rwb has quit [Ping timeout: 260 seconds]
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
vutral|kali has joined #ruby
Psybur has joined #ruby
qba73 has quit [Remote host closed the connection]
qba73 has joined #ruby
RougeR has joined #ruby
RougeR has joined #ruby
RougeR has quit [Changing host]
despai has quit [Quit: ...]
ltt has joined #ruby
drale2k_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Puffball has quit [Remote host closed the connection]
rfoust has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sidx64_ has joined #ruby
sidx64_ has quit [Client Quit]
ltt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
amelliaa has joined #ruby
amar has joined #ruby
RougeR has quit [Ping timeout: 240 seconds]
sidx64 has quit [Read error: Connection reset by peer]
_aeris_ has quit [Ping timeout: 268 seconds]
_aeris_ has joined #ruby
ltt has joined #ruby
ltt has quit [Client Quit]
k0mpa has joined #ruby
bmurt has joined #ruby
quobo has quit [Quit: Connection closed for inactivity]
sidx64 has joined #ruby
konsolebox has quit [Ping timeout: 240 seconds]
Asher has quit [Ping timeout: 264 seconds]
ltt has joined #ruby
konsolebox has joined #ruby
Mike11 has joined #ruby
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
s2013 has joined #ruby
houhoulis has quit []
despai has joined #ruby
duderonomy has quit [Ping timeout: 256 seconds]
Asher has joined #ruby
despai has quit [Client Quit]
Psybur has quit [Read error: Connection reset by peer]
drale2k_ has joined #ruby
Beams has quit [Quit: .]
ltt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Psybur has joined #ruby
cadillac_ has quit [Ping timeout: 255 seconds]
sidx64 has joined #ruby
ltt has joined #ruby
karapetyan has joined #ruby
voxxit has joined #ruby
cadillac_ has joined #ruby
Beams has joined #ruby
sundhell_away is now known as sundhell
masterasia has quit [Ping timeout: 256 seconds]
karapetyan has quit [Ping timeout: 240 seconds]
masterasia has joined #ruby
jcalla has joined #ruby
RougeR has joined #ruby
RougeR has quit [Changing host]
RougeR has joined #ruby
jeffreylevesque has joined #ruby
yohji has joined #ruby
imode has joined #ruby
dbugger has joined #ruby
<dbugger> hello everyone. I have a weird issue when using rbenv, I get an error "recipe for target 'rdoc' failed". Is there a way to install a version without the documentation?
duderonomy has joined #ruby
shinnya has joined #ruby
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nowhereman_ has joined #ruby
Mike11 has quit [Quit: Leaving.]
DLSteve has joined #ruby
sidx64 has joined #ruby
rfoust has joined #ruby
Mikasi has joined #ruby
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
cschneid_ has joined #ruby
guardian has joined #ruby
tomphp_ has joined #ruby
memo1 has joined #ruby
rfoust has quit [Ping timeout: 276 seconds]
justinweiss has quit [Quit: ~]
justinweiss has joined #ruby
tomphp has quit [Ping timeout: 276 seconds]
alfiemax has quit [Ping timeout: 260 seconds]
schaary has quit [Quit: ~]
cschneid_ has quit [Ping timeout: 260 seconds]
schaary has joined #ruby
pizzaops has quit [Quit: ~]
pizzaops has joined #ruby
lipoqil has quit [Quit: ~]
lipoqil has joined #ruby
amatas_ has joined #ruby
tobiasvl has quit [Ping timeout: 256 seconds]
erlend has quit [Ping timeout: 265 seconds]
erlend has joined #ruby
bcavileer has quit [Quit: ~]
bcavileer has joined #ruby
tobiasvl has joined #ruby
drale2k_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
amatas__ has joined #ruby
BuildTheRobots has quit [Quit: ~]
BuildTheRobots has joined #ruby
amatas_ has quit [Ping timeout: 240 seconds]
amatas__ has quit [Client Quit]
Yonk_ has quit [Quit: ~]
Yonk_ has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cadillac_ has quit [Read error: Connection reset by peer]
dionysus69 has quit [Ping timeout: 264 seconds]
mikecmpbll has quit [Quit: inabit. zz.]
aupadhye has quit [Ping timeout: 245 seconds]
mtkd has quit [Ping timeout: 260 seconds]
imode has quit [Ping timeout: 240 seconds]
podman has quit [Quit: ~]
mikecmpbll has joined #ruby
suukim has quit [Quit: Konversation terminated!]
podman has joined #ruby
cadillac_ has joined #ruby
<law> are there recommended systemd setting for giving a rails daemon run as the 'rails' user more/unlimited system resources?
mtkd has joined #ruby
aarongodin has quit [Quit: ~]
micalexander has quit [Quit: ~]
aarongodin has joined #ruby
micalexander has joined #ruby
kapowaz has quit [Quit: ~]
ggherdov has quit [Quit: ~]
kapowaz has joined #ruby
dukedave has quit [Quit: ~]
HashNuke has quit [Quit: ~]
HashNuke has joined #ruby
dukedave has joined #ruby
ggherdov has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
machty has quit [Quit: ~]
mroth has quit [Quit: ~]
mroth has joined #ruby
Tony-St4rk has quit [Quit: ~]
machty has joined #ruby
Tony-St4rk has joined #ruby
colstrom has quit [Quit: ~]
ckrailo has quit [Quit: ~]
colstrom has joined #ruby
ckrailo has joined #ruby
kireevco has quit [Quit: ~]
Mutsuhito has quit [Quit: ~]
kireevco has joined #ruby
Mutsuhito has joined #ruby
dbugger has quit [Remote host closed the connection]
Brak____________ has quit [Quit: ~]
incomprehensibly has quit [Quit: ~]
Brak____________ has joined #ruby
foamz has quit [Quit: ~]
knowtheory has quit [Quit: ~]
knowtheory has joined #ruby
incomprehensibly has joined #ruby
foamz has joined #ruby
rflot has quit [Quit: ~]
rflot has joined #ruby
Chew has quit [Quit: ~]
memo1 has quit [Quit: WeeChat 1.4]
Chew has joined #ruby
memo1 has joined #ruby
ircmaxell has quit [Quit: ~]
jnix has quit [Quit: ~]
Rapture has joined #ruby
drale2k_ has joined #ruby
jnix has joined #ruby
ircmaxell has joined #ruby
mattwc has quit [Quit: ~]
catbusters has quit [Quit: ~]
ltt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mattwc has joined #ruby
catbusters has joined #ruby
caw_______ has quit [Quit: ~]
caw_______ has joined #ruby
iamdevnul has quit [Quit: ~]
iamdevnul has joined #ruby
untitaker has quit [Quit: ~]
AndyWojo has quit [Quit: ~]
AndyWojo has joined #ruby
auv has quit [Quit: ~]
untitaker has joined #ruby
Lloyd has quit [Quit: ~]
Lloyd has joined #ruby
auv has joined #ruby
fury has quit [Quit: ~]
fury has joined #ruby
jetpack_joe has quit [Quit: ~]
jetpack_joe has joined #ruby
tycoon177 has quit [Quit: ~]
tycoon177 has joined #ruby
andikr has joined #ruby
mtkd has quit []
Flabbergazta_ has quit [Quit: ~]
Flabbergazta_ has joined #ruby
craysiii has quit [Quit: ~]
craysiii has joined #ruby
Beams has quit [Quit: .]
qba73 has quit [Ping timeout: 260 seconds]
reber has quit [Remote host closed the connection]
seanh has quit [Quit: ~]
seanh has joined #ruby
apeiros__ has joined #ruby
Beams has joined #ruby
koenrh has quit [Quit: ~]
koenrh has joined #ruby
sundhell is now known as sundhell_away
apeiros__ has quit [Read error: Connection reset by peer]
surminus has quit [Quit: ~]
surminus has joined #ruby
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
apeiros has quit [Read error: Connection reset by peer]
ltt has joined #ruby
netherwolfe has joined #ruby
maciuszek has quit [Quit: ~]
maciuszek has joined #ruby
KrzaQ has quit [Ping timeout: 268 seconds]
imode has joined #ruby
sidx64 has joined #ruby
qba73 has joined #ruby
nuck has quit [Quit: ~]
afisher has quit [Quit: ~]
nuck has joined #ruby
afisher has joined #ruby
mr-robert has quit [Quit: ~]
mr-robert has joined #ruby
sepp2k has joined #ruby
kapil___ has quit [Quit: Connection closed for inactivity]
<al2o3-cr> has Proc#call always been able to take the reciever as first argument?
ltt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<al2o3-cr> as in
<al2o3-cr> >> :send.to_proc.call(:puts, ?*)
<ruby[bot]> al2o3-cr: # => undefined method `*' for :puts:Symbol (NoMethodError) ...check link for more (https://eval.in/987062)
<al2o3-cr> >> :send.to_proc.call(Kernel, :puts, ?*)
<ruby[bot]> al2o3-cr: # => * ...check link for more (https://eval.in/987063)
Cavallari1 has joined #ruby
<dminuoso> :|
cschneid_ has joined #ruby
Cavallari has quit [Ping timeout: 240 seconds]
Cavallari1 is now known as Cavallari
ltt has joined #ruby
rwb has joined #ruby
<al2o3-cr> dminuoso: how can i bind to a C level proc?
<al2o3-cr> >> :send.to_proc.binding
<ruby[bot]> al2o3-cr: # => /tmp/execpad-94ad8e09440f/source-94ad8e09440f:2: [BUG] Segmentation fault at 0x0bd116 ...check link for more (https://eval.in/987064)
<dminuoso> Nice.
<dminuoso> 2.4 has that fixed.
<al2o3-cr> >> RUBY_VERSION
<ruby[bot]> al2o3-cr: # => "2.3.0" (https://eval.in/987065)
<dminuoso> Or maybe its one of the micro/patch versions
<dminuoso> al2o3-cr: at any way, you cant.
<al2o3-cr> dminuoso: hmm, ok. just thought i'd ask :)
orbyt_ has joined #ruby
cschneid_ has quit [Ping timeout: 256 seconds]
<al2o3-cr> dminuoso: how's your haskell coming along?
<dminuoso> Pretty great.
<dminuoso> Just dived into generics to kill so much boiler plate. :)
<al2o3-cr> ;P cool
cam27 has joined #ruby
<al2o3-cr> so i suppose you use xmonad ;P
<dminuoso> Nah. Not yet anyway.
<dminuoso> I use emacs instead! ;p
orbyt_ has quit [Ping timeout: 240 seconds]
<al2o3-cr> hehe ;)
karapetyan has joined #ruby
<phaul> dminuoso: and what editor do you use?
<phaul> ;)
<al2o3-cr> matz uses emacs
<al2o3-cr> if no simular no oop?
<al2o3-cr> *simula
<dminuoso> Well with evil mode it's pretty sleek. :)
<al2o3-cr> one editor i've never used tbh
KrzaQ- has joined #ruby
<al2o3-cr> notepad++ ftw
<al2o3-cr> jk
apeiros has joined #ruby
apeiros has quit [Remote host closed the connection]
<al2o3-cr> you can play snake in emacs can't you
apeiros has joined #ruby
GodFather_ has joined #ruby
KrzaQ- is now known as KrzaQ
al2o3-cr has quit [Quit: WeeChat 2.1]
karapetyan has quit [Ping timeout: 260 seconds]
oleo has joined #ruby
gr33n7007h has joined #ruby
gr33n7007h is now known as al2o3-cr
mroutis has joined #ruby
tacoboy has quit [Remote host closed the connection]
<al2o3-cr> where does charliesome hang out now?
Cavallari has quit [Quit: Cavallari]
GodFather has quit [Ping timeout: 276 seconds]
ltt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<al2o3-cr> ruby 2.5 needs adding to eval.in
apparition has quit [Quit: Bye]
cthulchu_ has joined #ruby
ltt has joined #ruby
GodFather_ has quit [Ping timeout: 276 seconds]
cthulchu has quit [Ping timeout: 240 seconds]
cschneid_ has joined #ruby
s2013 has joined #ruby
ltt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
s2013 has quit [Client Quit]
aufi has joined #ruby
karapetyan has joined #ruby
n008f4g_ has joined #ruby
synthroid has quit [Remote host closed the connection]
Map has quit [Disconnected by services]
Map has joined #ruby
cthu| has joined #ruby
dr3w_ has joined #ruby
cthulchu_ has quit [Ping timeout: 240 seconds]
devlaf has joined #ruby
nfk has joined #ruby
aufi has quit [Quit: Leaving]
synthroid has joined #ruby
tolerablyjake has joined #ruby
ltt has joined #ruby
<al2o3-cr> >> class String def to_proc() -> idx { self[idx] } end end; ([14,6,-1,12]*3).map(&"isoifduoiasdyarghjsoasjb").join(0x20.chr).gsub(/\G/, ?*)
<ruby[bot]> al2o3-cr: # => "*r* *u* *b* *y* *r* *u* *b* *y* *r* *u* *b* *y*" (https://eval.in/987081)
cam27 has quit [Quit: cam27]
TomyWork has quit [Remote host closed the connection]
alfiemax has joined #ruby
<phaul> >> 0x20.chr
<ruby[bot]> phaul: # => " " (https://eval.in/987087)
<al2o3-cr> ruby is great.
tvw has quit [Remote host closed the connection]
<phaul> what's /\G/ ? "matching first matching position", of what???
ltt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<al2o3-cr> of space
clemens3 has quit [Remote host closed the connection]
<canton7> "\G will match the match boundary, which is either the beginning of the string, or the point where the last character of last match is consumed."
<al2o3-cr> >> " yo ".gsub(/\G/, ?-)
<ruby[bot]> al2o3-cr: # => "- -y-o- -" (https://eval.in/987090)
<al2o3-cr> canton7: good answer
<al2o3-cr> phaul: it's similar to \B
<phaul> ok, I think I get it :) so it matches every gap between chars in this case
ltt has joined #ruby
<canton7> (copied from stackoverflow)
n008f4g_ has quit [Ping timeout: 268 seconds]
<al2o3-cr> ;P
<apeiros> you don't need \G for that
harrycs has joined #ruby
<apeiros> >> " yo ".gsub(//, ?-) == " yo ".gsub(/\G/, ?-)
<ruby[bot]> apeiros: # => true (https://eval.in/987091)
<al2o3-cr> apeiros: i know
cagomez has joined #ruby
<al2o3-cr> i left it in
<canton7> I mean, you don't need (0x20.chr) there, or lots of things... That's not the point :P
<al2o3-cr> base 2 and 16 is all you need 2 know :P
<phaul> reminds me of the C obfuscation contest from long long time ago :)
WebDawg has quit [Ping timeout: 240 seconds]
<phaul> there was one where you use an ascii art of a circle in the code to approximate PI. What a great idea :D
<al2o3-cr> phaul: did you know PI was intended to be 3.2 then all hell broke lose
imode has quit [Ping timeout: 256 seconds]
<phaul> no I wasn't aware
<al2o3-cr> true story.
ltt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<al2o3-cr> to what leverage does Math.gamma become inaccurate factorial?
ltt has joined #ruby
<al2o3-cr> i'm losing track of ruby.
marxarelli|afk has quit [Quit: Textual IRC Client: www.textualapp.com]
despai has joined #ruby
erlend has quit [Ping timeout: 246 seconds]
[Butch] has joined #ruby
twshelton has quit [Ping timeout: 276 seconds]
erlend has joined #ruby
AndBobsYourUncle has quit [Ping timeout: 256 seconds]
marxarelli has joined #ruby
ltt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mikecmpbll has quit [Read error: Connection reset by peer]
<al2o3-cr> i've got a sneaky suspicion vladimir makarov is a genius.
<al2o3-cr> just saying
mikecmpbll has joined #ruby
npgm has joined #ruby
ltt has joined #ruby
<al2o3-cr> just like mike pall.
jcarl43 has joined #ruby
despai has quit [Quit: ...]
troulouliou_dev has joined #ruby
amar has quit [Remote host closed the connection]
darkhanb has joined #ruby
dionysus69 has joined #ruby
WebDawg has joined #ruby
sammi` has quit [Quit: Lost terminal]
alfiemax has quit [Remote host closed the connection]
alex`` has joined #ruby
snapcase has quit [Remote host closed the connection]
raynold has joined #ruby
troulouliou_dev has quit [Quit: Leaving]
weird_error has joined #ruby
weird_error has quit [Client Quit]
stormpack has joined #ruby
govg has quit [Ping timeout: 265 seconds]
lelliott has joined #ruby
guille-moe has quit [Ping timeout: 276 seconds]
shinnya has quit [Ping timeout: 276 seconds]
andikr has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: inabit. zz.]
jamesaxl has joined #ruby
snapcase has joined #ruby
ellcs has quit [Remote host closed the connection]
unreal has joined #ruby
dr3w_ has joined #ruby
yohji has quit [Remote host closed the connection]
Beams has quit [Quit: .]
karapetyan has quit [Remote host closed the connection]
jdawgaz has joined #ruby
lelliott has quit [Remote host closed the connection]
<Janky> I have a folder full of about a thousand .txt files. Each of these .txt files has about 30 lines of information in it. Can anyone point me to a tutorial on how to put these files into a single spreadsheet? Thanks.
sanscoeur has joined #ruby
<al2o3-cr> Janky: as in csv?
<Janky> that would work
claudiuinberlin has joined #ruby
kapil___ has joined #ruby
<gizmore> Janky: what format are the txt files?
ltt has quit [Ping timeout: 245 seconds]
pilne has joined #ruby
<Janky> delimited by line
<gizmore> so its basically output excel from multiple line by line data?
<Janky> yes
darkhanb_ has joined #ruby
<gizmore> for me the most difficult part would be the excel writing
<gizmore> never did that
<Janky> I'm trying to make it so each .txt file has it's own row, and each line within that .txt file has it's own column
<gizmore> sounds reasonable
<gizmore> how about this
<gizmore> generate a csv from the files
<gizmore> then import to excel
<gizmore> :D
<Janky> lol
zautomata4 has quit [Quit: WeeChat 1.9.1]
stormpack_ has joined #ruby
<gizmore> but excel writing would be possible too
<Janky> I could do that
<havenwood> Janky: To load it all into memory: Dir['*.txt'].map { |filename| File.readlines filename, chomp: true }
<gizmore> start with a few for loops
<baweaver> al2o3-cr: I made something fun
karapetyan has joined #ruby
<gizmore> Janky: havenwood took all the fun and made rubygolf
<baweaver> Query Objects, think pattern matching in Ruby: https://github.com/baweaver/qo
<havenwood> Janky: The stdlib CSV isn't hard to figure out, or there are various spreadsheet gems (like spreadsheet).
darkhanb has quit [Ping timeout: 256 seconds]
<havenwood> or roo
<Janky> ah
drale2k_ has quit [Ping timeout: 263 seconds]
<Janky> thank you
<havenwood> you're welcome
stormpack has quit [Ping timeout: 260 seconds]
qba73 has quit [Ping timeout: 256 seconds]
tolerablyjake has quit [Ping timeout: 260 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
despai has joined #ruby
<al2o3-cr> awesome this baweaver, really is nifty :)
Ltem has joined #ruby
<al2o3-cr> another one added to my gem list ;)
bmurt has joined #ruby
FrankD has joined #ruby
<baweaver> I may improve it a bit later
<baweaver> Thinking of deep hash queries
FrankD_ has quit [Ping timeout: 255 seconds]
<al2o3-cr> go for it pal.
<baweaver> muffin_people = people.select(&Qo[address: {street: /Drury Lane/}])
despai has quit [Quit: ...]
<al2o3-cr> nothing ceases to amaze me in ruby, do you know that.
<baweaver> Just wait until we get started on the next book
<al2o3-cr> i can't wait :)
<baweaver> It's a book of Ruby black magics, The Ruby Grimoire
<al2o3-cr> haha nice name
<baweaver> Current book is mostly just pending legal feedback at $WORK
darkhanb has joined #ruby
<baweaver> Then ETA Jan 2019 for the final draft, though I think I'll be done sooner.
<al2o3-cr> ah, thought it was taking a while
amar has joined #ruby
<baweaver> Dotted i's and crossed t's and such
<sparr> other than an explicit call to somestring.to_sym or somestring.intern, what could cause "interning empty string" error?
<sparr> in ruby 1.8
imode has joined #ruby
<al2o3-cr> sparr: an empty string would do that.
darkhanb_ has quit [Ping timeout: 268 seconds]
<baweaver> sparr: Just to get it out of the way: 1.8 is super old and long since deprecated, which means it's a massive security risk. You should upgrade.
cadillac_ has quit [Ping timeout: 264 seconds]
<al2o3-cr> sparr: %s"" might do it?
cadillac_ has joined #ruby
<al2o3-cr> who knows
clemens3 has joined #ruby
<al2o3-cr> 18>> %s""
<ruby[bot]> al2o3-cr: # => /tmp/execpad-57d9285cb600/source-57d9285cb600:2: empty symbol literal (https://eval.in/987114)
<al2o3-cr> hmm, no it doesn't
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
stormpack_ has quit [Quit: Leaving]
yokel has quit [Ping timeout: 260 seconds]
<al2o3-cr> sparr: i can't overemphasize UPGRADE
cagomez has quit [Remote host closed the connection]
Burgestrand has quit [Quit: Closing time!]
cadillac_ has quit [Ping timeout: 256 seconds]
reber has joined #ruby
cadillac_ has joined #ruby
suukim has joined #ruby
cagomez has joined #ruby
Rapture has quit [Ping timeout: 240 seconds]
eckhardt has joined #ruby
venmx has quit [Ping timeout: 240 seconds]
cyberg has joined #ruby
<sparr> i know :(
<sparr> sadly not my call
alex`` has quit [Quit: WeeChat 2.1]
<baweaver> sparr: Who's blocking it?
<al2o3-cr> sparr: i mean come on, i must of been 3 or 4 when 1.8 was a thing ;P
n0m4d1c has joined #ruby
harrycs has quit [Ping timeout: 240 seconds]
TinkerT has quit [Quit: ZNC 1.7.x-nightly-20180328-82a93253 - https://znc.in]
TinkerT has joined #ruby
<baweaver> because by this point it's a glaring security hole, especially if you're on RHEL or CentOS and using it for deployments.
imode has quit [Ping timeout: 260 seconds]
twshelton has joined #ruby
n0m4d1c_ has joined #ruby
n0m4d1c has quit [Ping timeout: 263 seconds]
karapetyan has quit []
memo1 has quit [Ping timeout: 276 seconds]
faces has joined #ruby
despai has joined #ruby
<al2o3-cr> sparr: whos cal is it?
<al2o3-cr> *call
despai has quit [Client Quit]
GodFather_ has joined #ruby
face has quit [Ping timeout: 264 seconds]
Rapture has joined #ruby
cstrahan has joined #ruby
<al2o3-cr> class Integer; alias whoa +; def +(moar) puts "#{self}+#{moar}"; whoa(moar); end; end; %(#{$$}) # good terminal fun ;)
<sparr> my boss' boss
amelliaa has quit [Quit: -]
<sparr> so, new line of questioning...
<al2o3-cr> sparr: sack them.
<al2o3-cr> ok, listening...
<sparr> preface: this is in puppet, so it's Not Real Ruby, but I'm hoping some guidance here will point me in the right direction there.
<al2o3-cr> ?puppet sparr
<ruby[bot]> sparr: Please join #puppet for help with it.
<sparr> yeah :(
erlend has quit [Ping timeout: 268 seconds]
\void has joined #ruby
John_Ivan has joined #ruby
John_Ivan has joined #ruby
John_Ivan has quit [Changing host]
erlend has joined #ruby
<al2o3-cr> maybe you'll get more guidance there
<sparr> negative
<al2o3-cr> :(
<al2o3-cr> i honestly can't help as i have no clue.
<al2o3-cr> maybe others can though, idk sorry.
tdy has quit [Ping timeout: 256 seconds]
imode has joined #ruby
mroutis has quit [Read error: Connection reset by peer]
mroutis has joined #ruby
workmad3 has quit [Ping timeout: 260 seconds]
sauvin has quit [Ping timeout: 240 seconds]
alex`` has joined #ruby
tdy has joined #ruby
<al2o3-cr> 1 kudos point if someone can achieve a SyntaxError with the msg "void value expression"
<al2o3-cr> raise SyntaxError, "void ..." is a no no.
sameerynho has joined #ruby
jdawgaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
jdawgaz has joined #ruby
<al2o3-cr> ?fixcon jdawgaz
<ruby[bot]> al2o3-cr: I don't know anything about fixcon
jdawgaz has quit [Client Quit]
<al2o3-cr> :(
jdawgaz has joined #ruby
<apeiros> banning of all kinds is a command, hence ! prefixed and restricted to ops
<apeiros> !fixcon jdawgaz
jdawgaz was kicked from #ruby by ruby[bot] [repeated join/part detected]
<al2o3-cr> ah, thought it was part of the public api
traxnov has joined #ruby
<al2o3-cr> it makes sense.
<al2o3-cr> why is {foo: :bar **other} faster than Hash#update what else is going on?
AndBobsYourUncle has joined #ruby
zautomata has joined #ruby
zautomata has quit [Changing host]
zautomata has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
psychicist__ has joined #ruby
suukim has quit [Quit: Konversation terminated!]
nicesignal has quit [Read error: Connection reset by peer]
eckhardt has quit [Read error: Connection reset by peer]
nicesignal has joined #ruby
eckhardt has joined #ruby
<al2o3-cr> does FileUtil just shell out?
traxnov has quit [Quit: Mutter: www.mutterirc.com]
<al2o3-cr> FileUtils
moei has quit [Quit: Leaving...]
Strepsils has joined #ruby
Strepsils has quit [Client Quit]
n0m4d1c has joined #ruby
n0m4d1c_ has quit [Read error: Connection reset by peer]
<al2o3-cr> would you need a read-only variable bar the in-builts?
n0m4d1c has quit [Read error: Connection reset by peer]
n0m4d1c_ has joined #ruby
n0m4d1c_ has quit [Ping timeout: 240 seconds]
n0m4d1c has joined #ruby
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AndBobsYourUncle has quit [Quit: Textual IRC Client: www.textualapp.com]
mtkd has joined #ruby
n0m4d1c has quit [Ping timeout: 265 seconds]
n008f4g_ has joined #ruby
utkarsh has quit [Remote host closed the connection]
chouhoul_ has joined #ruby
n0m4d1c has joined #ruby
bauruine has quit [Quit: ZNC - http://znc.in]
chouhoulis has quit [Ping timeout: 240 seconds]
alfiemax has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
<cjohnson> Is there a gem that supports gpg decryption with passphrases that doesn't rely on passing hte passphrase in via command line?
<al2o3-cr> cjohnson: why not command line
<cjohnson> Well if you have the passphrase on the command line, anybody can run ps and see it
<al2o3-cr> cjohnson: IO.getpass
<cjohnson> So ideally it would write the passphrase to a file and then pass that file path to the gpg command
chouhoulis has joined #ruby
<al2o3-cr> cjohnson: what's wrong with STDIN.getpass("password: ")?
bauruine has joined #ruby
<al2o3-cr> or gets(&:getpass)
<al2o3-cr> no
<al2o3-cr> don't do that one
chouhoul_ has quit [Ping timeout: 255 seconds]
<al2o3-cr> cjohnson: man getpass(3)
alfiemax has quit [Ping timeout: 255 seconds]
bmurt has joined #ruby
alfiemax has joined #ruby
n008f4g_ has quit [Ping timeout: 256 seconds]
<al2o3-cr> actually use STDIN.echo = false
<al2o3-cr> TIL
<al2o3-cr> use either actually getpass does this with some tweaks.
<al2o3-cr> cjohnson: sudo uses getpass.
<al2o3-cr> cjohnson: ruby version?
mroutis has quit [Read error: Connection reset by peer]
mtkd has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
mtkd has joined #ruby
ellcs has joined #ruby
mroutis has joined #ruby
dr3w_ has joined #ruby
alex`` has quit [Quit: WeeChat 2.1]
hkais has quit [Ping timeout: 255 seconds]
<cjohnson> Sorry, I had a call
<cjohnson> 2.2
<cjohnson> 2.4 in the coming months but...2.2 for now
<cjohnson> So, let me clarify. This is for a rails app, the web API needs to call gpg to decrypt the incoming encrypted data
<cjohnson> I'm reviewing the PR to add this endpoint and the author wrote the lib which pipes the encrypted data via stdin, and passes the passphrase on the command line using --passphrase "cleartextpassphrase"
FrostCandy has joined #ruby
<cjohnson> I wanted to suggest an improvement that gets it out of the process list
<cjohnson> So I can't prompt interactively for the passphrase
<cjohnson> One approach might be to have ruby write hte passphrase to a file and then pass that file path to the gpg command
<cjohnson> Seems wonky though. What if the ruby process fails to clean up after itself and the passphrase is left behind
nahra has quit [Remote host closed the connection]
nahra has joined #ruby
^mtkd has joined #ruby
mtkd has quit [Read error: Connection reset by peer]
kapil___ has quit [Quit: Connection closed for inactivity]
<al2o3-cr> cjohnson: not too sure then.
Ltem has quit [Quit: gn]
nahra has quit [Remote host closed the connection]
nahra has joined #ruby
ellcs has quit [Remote host closed the connection]
ellcs has joined #ruby
nahra has quit [Remote host closed the connection]
nahra has joined #ruby
cagomez has quit [Remote host closed the connection]
nahra has quit [Remote host closed the connection]
sidx64 has joined #ruby
<cjohnson> Oh it turns out this is just a stupid client request
<cjohnson> I thought we were plaintext sending encrypted data
<cjohnson> we're using sftp to transfer the file but they want to transfer double-encrypted shit
mostlybadfly has quit [Quit: Connection closed for inactivity]
<cjohnson> So, meh, I don't care
alfiemax has quit [Remote host closed the connection]
<al2o3-cr> cjohnson: hehe, no worries
pastorinni has joined #ruby
alfiemax has joined #ruby
adlerdias has quit [Quit: adlerdias]
alfiemax has quit [Ping timeout: 268 seconds]
vikaton has quit [Quit: Connection closed for inactivity]
workmad3 has joined #ruby
marxarelli is now known as marxarelli|afk
m4rCsi has quit [Quit: No Ping reply in 180 seconds.]
m4rCsi has joined #ruby
pastorinni has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 240 seconds]
Psybur has quit [Ping timeout: 265 seconds]
erlend has quit [Ping timeout: 256 seconds]
lelliott has joined #ruby
erlend has joined #ruby
eckhardt has joined #ruby
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
n0m4d1c has quit [Read error: Connection reset by peer]
n0m4d1c has joined #ruby
m4rCsi has quit [Quit: No Ping reply in 180 seconds.]
claudiuinberlin has joined #ruby
m4rCsi has joined #ruby
cagomez has joined #ruby
venmx has joined #ruby
mroutis has quit [Ping timeout: 264 seconds]
k0mpa has quit [Quit: k0mpa]
pastorinni has joined #ruby
n008f4g_ has joined #ruby
cagomez has quit [Ping timeout: 245 seconds]
moei has joined #ruby
sidx64_ has joined #ruby
sonOfRa has quit [Remote host closed the connection]
jeffreylevesque has quit [Ping timeout: 256 seconds]
sidx64 has quit [Ping timeout: 265 seconds]
rwb has quit [Ping timeout: 256 seconds]
memo1 has joined #ruby
sonOfRa has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
cagomez has joined #ruby
harrycs has joined #ruby
n008f4g_ has quit [Ping timeout: 240 seconds]
memo1 has quit [Ping timeout: 240 seconds]
hkais has joined #ruby
n0m4d1c has quit [Remote host closed the connection]
SeepingN has joined #ruby
mikecmpbll has joined #ruby
alfiemax has joined #ruby
dimik--- has joined #ruby
<dimik---> how can i use some specific version of a gem in a require of .rb file
<dimik---> without rails environment
alfiemax has quit [Ping timeout: 240 seconds]
<mr-robert> dimik---: gem "name", "= X.X.X" then require "name"
mroutis has joined #ruby
lelliott has quit [Remote host closed the connection]
<dimik---> mr-robert thank you sir
<Janky> can anyone help me with a small script I'm working on?
chouhoul_ has joined #ruby
<phaul> Janky, tell us about it, there will be someone
memo1 has joined #ruby
<Janky> well
chouhoulis has quit [Ping timeout: 255 seconds]
dionysus69 has quit [Ping timeout: 260 seconds]
<Janky> I've got about a thousand text files, each of them contains about 30 lines. I'm trying to write a program that goes through each files and outputs everything to a CSV. I would like to have it where every file has it's own row and the lines within those .txt. files have their own columns. I've got it setup to where it will read the .txt files and output everything to a .csv, but my only problem
<Janky> is that everything is being output on it's own row under 1 column
synthroid has quit []
marxarelli|afk is now known as marxarelli
sidx64 has joined #ruby
ledestin has joined #ruby
sidx64_ has quit [Ping timeout: 276 seconds]
<phaul> if I were you, - this assuming that you have written that script - so if I were you, I would paste the code on a gist, point out where I'm stuck with it, and ask specific questions about it. You are to vague atm. for anybody to help
jcalla has quit [Quit: Leaving]
<phaul> *too
^mtkd has quit []
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
<phaul> Janky: sounded like you had something running already, that's good. Why not paste it to gist, and tell where it behaves different to what you expect?
GodFather_ has quit [Ping timeout: 276 seconds]
harrycs has quit [Ping timeout: 276 seconds]
<Janky> I don't even know what gist is
venmx_ has joined #ruby
rwb has joined #ruby
GodFather_ has joined #ruby
<phaul> it's where ppl ususally paste there code to share it with the chat.
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cagomez has quit [Remote host closed the connection]
ldnunes has quit [Quit: Leaving]
venmx has quit [Ping timeout: 256 seconds]
alfiemax has joined #ruby
<Janky> alright
snc has joined #ruby
snc is now known as Guest87209
Guest87209 has quit [Client Quit]
<Janky> so, I have a thousand .txt files in a directory. Each of them has about 30 lines of text. That script goes through each file, and then each line, and outputs all of the information to a single CSV. My only issue is that each line is being written to a row instead of a column
chouhoulis has joined #ruby
snc123 has joined #ruby
reber has quit [Remote host closed the connection]
psychicist__ has quit [Ping timeout: 240 seconds]
atchoum has joined #ruby
snc123 has quit [Client Quit]
<SeepingN> build arrays for each column
nikivi has joined #ruby
chouhoul_ has quit [Ping timeout: 265 seconds]
<tobiasvl> Janky: deja vu - did you ask the same thing about python in another channel earlier?
hkais has quit [Ping timeout: 256 seconds]
rwb has quit [Ping timeout: 260 seconds]
sluggo has joined #ruby
amar has quit [Remote host closed the connection]
<Janky> tobiasvl, I did not
<Janky> hmm, ok
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vikaton has joined #ruby
<Janky> SeepingN, so I would be putting arrays within arrays?
sagax has joined #ruby
John_Ivan has quit [Read error: Connection reset by peer]
dimik-- has joined #ruby
<tobiasvl> Janky: I'm a little confused at what you're doing. for each line, you put that line into an array, write that array to the csv, and then clear the array?
<tobiasvl> seems a little redundant
<Janky> I think that's what has been suggested that I do
jottr has joined #ruby
<tobiasvl> so the array you're writing to the csv is supposed to just contain one line?
<Janky> right now I just want each file .txt to have it's own row, and each line in that .txt file to have it's own column
dimik--- has quit [Ping timeout: 265 seconds]
<Janky> my script generates 30,000 rows. I'd like a thousand rows with 30 columns
<tobiasvl> ok, then I guess line 13 should be moved to above what's line 11 now?
dimik--- has joined #ruby
<tobiasvl> so that for each line in a txt file, you append that to the array, and then when all the lines are in the array, THEN you write the array to the csv
<tobiasvl> righ?
<tobiasvl> t
<Janky> I'll give it a shot
t0rchh has joined #ruby
<tobiasvl> ok. try to understand why I'm suggesting this though.
<Janky> you're a genius
<Janky> it worked!
<tobiasvl> haha. glad to hear it
dimik-- has quit [Ping timeout: 264 seconds]
<Janky> man
<Janky> I've been working on that for a week
venmx_ has quit [Remote host closed the connection]
t0rchy has quit [Ping timeout: 240 seconds]
eckhardt has joined #ruby
rivalomega has joined #ruby
t0rchy has joined #ruby
t0rchy has quit [Client Quit]
it_tard has joined #ruby
mroutis has left #ruby [#ruby]
t0rchh has quit [Ping timeout: 240 seconds]
nfk has quit [Ping timeout: 240 seconds]
n0m4d1c has joined #ruby
mroutis has joined #ruby
atchoum has quit [Ping timeout: 260 seconds]
n0m4d1c_ has joined #ruby
venmx has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
mroutis has quit [Remote host closed the connection]
nfk has joined #ruby
jeffreylevesque has joined #ruby
mroutis has joined #ruby
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
n0m4d1c__ has joined #ruby
Sar_Sa has joined #ruby
<Sar_Sa> hi
<mroutis> hello, Sar_Sa
n0m4d1c has quit [Ping timeout: 265 seconds]
it_tard has quit [Ping timeout: 260 seconds]
ruby[bot] has joined #ruby
n0m4d1c_ has quit [Ping timeout: 264 seconds]
n0m4d1c has joined #ruby
n0m4d1c__ has quit [Read error: Connection reset by peer]
rwb has joined #ruby
<Sar_Sa> what is the better way to pad a string up to certain size. For instance, I have a string with a size less than 10 and I want to padd it with null bytes until the size of 10. So "AA" would be converted to "AA\x00\x00\x00\x00\x00\x00\x00\x00\x00". How can I get that ?
<phaul> &ljust
netherwolfe_ has joined #ruby
<mroutis> Sar_Sa: you should look to ljust and rjust, to pad a string up to a certain size, as phaul said; however, I think it won't help you with bytes
tomphp_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<phaul> how does derpy work again?
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
rivalomega has quit [Remote host closed the connection]
netherwolfe has quit [Ping timeout: 260 seconds]
rivalomega has joined #ruby
<mroutis> at least, you could try a combination of ljust with map, but it's an ugly hack
FrostCandy has quit []
<havenwood> phaul: &ri
<phaul> havenwood: thanks
<Sar_Sa> phaul: mroutis thank you let me check
n0m4d1c_ has joined #ruby
n0m4d1c has quit [Read error: Connection reset by peer]
<phaul> &ri ljust
[Butch] has quit [Quit: Textual IRC Client: www.textualapp.com]
<mroutis> Sar_Sa: something like the following `'AA'.ljust(10, '~').gsub('~', '\x00')`
<Sar_Sa> mroutis: thank I'm gonna try it
rivalomega has quit [Ping timeout: 240 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<mroutis> Sar_Sa, why do you want to append "bytes" into a string?
<Sar_Sa> mroutis: works for me. And just another question, How can I convert a integer to a hex string of 4 bytes. For instance 13 would be "\x0D\x00\x00\x00"
rivalomega has joined #ruby
cthulchu_ has joined #ruby
<apeiros> &ri Array#pack Sar_Sa
<apeiros> that one also helps you with the null-padding
<havenwood> oops, I hit 100 lines - I must stop: https://gist.github.com/havenwood/823382815cbdcfddadd798d4042023a8
cagomez has joined #ruby
<mroutis> nice, apeiros
faces has quit [Remote host closed the connection]
<Sar_Sa> thank you!! apeiros
<apeiros> Sar_Sa: a & N patterns are probably relevant
<apeiros> depending on desired endianness, you'll need something else than N
faces has joined #ruby
<Sar_Sa> apeiros: it looks like a mess haha
<Sar_Sa> ok thank you
mroutis has quit [Quit: Lost terminal]
<apeiros> yeah, but since you seem to use a binary packed protocol, that's probably exactly what you need ;-)
mroutis has joined #ruby
cthu| has quit [Ping timeout: 256 seconds]
<havenwood> >> '👨‍👩‍👧‍👦'.bytes
<ruby[bot]> havenwood: I'm terribly sorry, I could not evaluate your code because of an error: OpenURI::HTTPError:500 Internal Server Error
ur5us has joined #ruby
<mroutis> is there a way I could use _derpy outside of IRC?
<phaul> ri :)
<havenwood> mroutis: There's ri.
\void has quit [Quit: So long, and thanks for all the fish.]
venmx has quit [Remote host closed the connection]
<mroutis> woah, TIL ^, thank you
marxarelli is now known as marxarelli|afk
erlend has quit [Ping timeout: 260 seconds]
mroutis has quit [Remote host closed the connection]
erlend has joined #ruby
mroutis has joined #ruby
rfoust has joined #ruby
mroutis has quit [Remote host closed the connection]
mroutis has joined #ruby
netherwolfe_ has quit [Ping timeout: 260 seconds]
shinnya has joined #ruby
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
<Sar_Sa> apeiros this works for me: n = 13 ; [n].pack("V")
dimik--- has quit [Ping timeout: 260 seconds]
<Sar_Sa> I need to use a list with the integer, n.pack does not work
rivalomega has quit [Remote host closed the connection]
dr3w_ has joined #ruby
venmx has joined #ruby
jenrzzz has quit [Ping timeout: 276 seconds]
<mroutis> Sar_Sa, what about [13, 26, 55].map { |x| [x].pack('V') }.join
s2013 has joined #ruby
<apeiros> uh, no :D
n0m4d1c_ has quit [Remote host closed the connection]
<Sar_Sa> mroutis: I just need to convert a integer
<Sar_Sa> :)
<apeiros> >> [13, 26, 55].pack("V3")
<ruby[bot]> apeiros: I'm terribly sorry, I could not evaluate your code because of an error: OpenURI::HTTPError:500 Internal Server Error
<apeiros> eval.in down? :(
<apeiros> well… # => "\r\x00\x00\x00\x1A\x00\x00\x007\x00\x00\x00"
<apeiros> not sure what you mean by "a list with the integer"
phaul has quit [Ping timeout: 260 seconds]
<Sar_Sa> apeiros: I meadn that if I have an integer like n=3. I can not use n.pack
<Sar_Sa> I need to use [n].pack
rivalomega has joined #ruby
<apeiros> yes
<apeiros> sadly
<apeiros> would be nice if there was a way for single values to pack/unpack
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
<Sar_Sa> apeiros / mroutis thank for the help
Mikasi has quit [Read error: Connection reset by peer]
rivalomega has quit [Remote host closed the connection]
minimalism has joined #ruby
conceivably has joined #ruby
<conceivably> Hi :) Can any one think of a more elegant way of turning an ordinal into an integer than doing /(\d+)/.match("1st").captures.first.to_i ?
<al2o3-cr> holy jesus
<al2o3-cr> Sar_Sa: that was 11 bytes 'esus
<Sar_Sa> al2o3-cr: what ?
<apeiros> "1st".to_i # => 1 @ conceivably
<apeiros> (and no, ruby isn't aware of ordinals, it's just that to_i ignores everything from and after the first non-digit)
<conceivably> :D brilliant! Thank you. I'm glad I asked.
<al2o3-cr> Sar_Sa: it was 10+1 bytes
rivalomega has joined #ruby
<al2o3-cr> Sar_Sa: what endian?
<Sar_Sa> big
<al2o3-cr> vV is VAX nN is network > big endian
<Sar_Sa> yes
<al2o3-cr> yes to what?
<al2o3-cr> k :)
<Sar_Sa> bit endian
<al2o3-cr> what size do you need though?
<al2o3-cr> and what's for?
<al2o3-cr> vax is rearly use now
<al2o3-cr> *used
devyn has quit [Read error: Connection reset by peer]
cschneid_ has quit [Remote host closed the connection]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<al2o3-cr> things can change on different archs
devyn has joined #ruby
<Sar_Sa> al2o3-cr: but I've already got it with [n].pack("V") :)
spiette has quit [Quit: :qa!]
marr has quit [Ping timeout: 265 seconds]
<al2o3-cr> [n].pack 'L<' which is well make your own mind up
marr has joined #ruby
<Sar_Sa> al2o3-cr: let me check
<Sar_Sa> al2o3-cr: it works too
<Sar_Sa> the same result
jamesaxl has quit [Quit: WeeChat 2.1]
venmx has quit [Remote host closed the connection]
pastorinni has quit [Remote host closed the connection]
sanscoeur has quit [Ping timeout: 240 seconds]
<al2o3-cr> well it holds 32 unsigned integer
<al2o3-cr> *bit
<al2o3-cr> vax is gone don't use it.
<Sar_Sa> nice! thanks
<al2o3-cr> it's a perlism. legacy.
ellcs has quit [Ping timeout: 256 seconds]
<Sar_Sa> nice to know that
<al2o3-cr> Sar_Sa: np pal
<Sar_Sa> :)
rcs has quit [Ping timeout: 240 seconds]
<al2o3-cr> Nn still hold though.
<Sar_Sa> pack is easy to get
<Sar_Sa> *is not
mroutis has quit [Read error: Connection reset by peer]
mroutis has joined #ruby
rcs has joined #ruby
<al2o3-cr> Sar_Sa: how and why?
<Sar_Sa> i mean as a novice, understand the help from http://ruby-doc.org/core-2.4.1/Array.html#method-i-pack is difficult to catch
<al2o3-cr> Sar_Sa: check
<al2o3-cr> >> [0].pack ?C
<ruby[bot]> al2o3-cr: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<al2o3-cr> >> [0].pack ?C
<ruby[bot]> al2o3-cr: I'm terribly sorry, I could not evaluate your code because of an error: OpenURI::HTTPError:500 Internal Server Error
<Sar_Sa> al2o3-cr: now I've already understand its use
devyn has quit [Read error: Connection reset by peer]
devyn has joined #ruby
<al2o3-cr> Sar_Sa: ex?
<Sar_Sa> al2o3-cr: ?
<al2o3-cr> example how you've understood?
weaksauce has quit [Quit: Textual IRC Client: www.textualapp.com]
yukai has joined #ruby
<al2o3-cr> Sar_Sa: so what directive does `@` have?
<al2o3-cr> so say `'\x00\x00\x01\x0f'.unpack('@2C')?
devyn has quit [Read error: Connection reset by peer]
<al2o3-cr> what is the meaning of `@` there?
mroutis has quit [Remote host closed the connection]
devyn has joined #ruby
<Sar_Sa> not very sure the meaning of "moves to absolute position"
<al2o3-cr> Sar_Sa: what does it mean to you?
weaksauce has joined #ruby
<Sar_Sa> al2o3-cr: it indicates the position from the beginnin
<al2o3-cr> Sar_Sa: it doesn't mean anything without double quotes
<Sar_Sa> xD
<al2o3-cr> Sar_Sa: correct.
<al2o3-cr> >> '\x00\x00\x01\x0f'.unpack('@2C')
rivalome_ has joined #ruby
<ruby[bot]> al2o3-cr: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<al2o3-cr> #=> [48]
<al2o3-cr> 48.chr == 0
<al2o3-cr> string
<Sar_Sa> nice, very powerful pack/unpack
<al2o3-cr> Sar_Sa: it is
<al2o3-cr> i'd say convenient.
norayr has joined #ruby
rivalomega has quit [Ping timeout: 240 seconds]
<Sar_Sa> al2o3-cr: thank you for the explanation
mikecmpbll has quit [Quit: inabit. zz.]
<al2o3-cr> Sar_Sa: np
atta_ has quit [Remote host closed the connection]
orbyt_ has joined #ruby
<al2o3-cr> Sar_Sa: pack/unpack 8/16/24/32/64 bit the directives are there for a purpose. ruby does all the work underneath for you.
<Sar_Sa> that saves you a lot of time
<al2o3-cr> Sar_Sa: it save you bit shifting <> check does this fit in this space > 0 oh no < greater space ....
<al2o3-cr> intel is always little endian
venmx has joined #ruby
<al2o3-cr> Sar_Sa: -1 is that unsigned or signed?
<Sar_Sa> signed
<al2o3-cr> why do you think this?
* al2o3-cr listening to zz top.
<Sar_Sa> xDD because the most significant bit is 1
ciscam has quit [Ping timeout: 264 seconds]
ciscam has joined #ruby
norayr has left #ruby [#ruby]
<al2o3-cr> is that 1's or 2's complement in ruby?
atchoum has joined #ruby
<Sar_Sa> 2's
<al2o3-cr> was that a guess?
memo1 has quit [Ping timeout: 260 seconds]
<Sar_Sa> yes
<al2o3-cr> what does ~7 in your repl
weaksauce has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 256 seconds]
<Sar_Sa> whats repl ?
<al2o3-cr> irb/pry?
<Sar_Sa> irb ah ok
<Sar_Sa> -8
<al2o3-cr> Sar_Sa: [[7].pack(?C).unpack('B*'), [~7].pack(?C).unpack('B*')] in irb/pry
<Sar_Sa> omg
<al2o3-cr> Sar_Sa: it flipping fantastic (been eating to many harrybows me)
<Sar_Sa> harrybows ?
<Sar_Sa> my english no so advanced :D
apparition has joined #ruby
<al2o3-cr> Sar_Sa: one's complement is when you go the route of the negative scale (it'll always flip the bits)
<al2o3-cr> so 99 is -100
<Sar_Sa> yes
<al2o3-cr> negated
<al2o3-cr> 99 negated
n0m4d1c has joined #ruby
<al2o3-cr> Sar_Sa: you from php?
ur5us has quit [Remote host closed the connection]
<Sar_Sa> from C
<Sar_Sa> long time ago ...
AJA4350 has quit [Remote host closed the connection]
<al2o3-cr> how long ago>
<al2o3-cr> *?
weaksauce has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Sar_Sa> 5 years
duderonomy has joined #ruby
<Sar_Sa> too long