Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
andikr has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
CrazyEddy has quit [Remote host closed the connection]
raul782 has quit [Remote host closed the connection]
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
astronavt has joined #ruby
ctrlaltdev has quit [Quit: leaving]
oetjenj has quit [Client Quit]
yeticry_ has joined #ruby
astronavt has quit [Ping timeout: 258 seconds]
yeticry has quit [Ping timeout: 258 seconds]
ur5us has joined #ruby
anisha has quit [Ping timeout: 240 seconds]
anisha has joined #ruby
raul782 has joined #ruby
ctrlaltdev has joined #ruby
Technodrome has joined #ruby
elphe has quit [Ping timeout: 276 seconds]
raul782 has quit [Ping timeout: 258 seconds]
bkxd has quit []
elphe has joined #ruby
ctrlaltdev has quit [Quit: leaving]
mfb2 has joined #ruby
Dimik has quit [Ping timeout: 248 seconds]
raul782 has joined #ruby
mfb2 has quit [Remote host closed the connection]
mfb2 has joined #ruby
raul782 has quit [Ping timeout: 250 seconds]
csk157 has joined #ruby
Tempesta has quit [Quit: AdiIRC is updating to v3.0 Beta Build (2017/11/30) 64 Bit]
Tempesta has joined #ruby
csk157 has quit [Ping timeout: 248 seconds]
kies has joined #ruby
TomyWork has joined #ruby
jxv has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jxv has joined #ruby
aupadhye has joined #ruby
aupadhye is now known as aupadhye|afk
elphe has quit [Ping timeout: 250 seconds]
biberu has joined #ruby
deepredsky has joined #ruby
anisha has quit [Read error: Connection reset by peer]
sneep has quit [Ping timeout: 246 seconds]
minimalism has quit [Quit: minimalism]
anisha has joined #ruby
raul782 has joined #ruby
anisha_ has joined #ruby
tomphp has joined #ruby
raul782 has quit [Remote host closed the connection]
anisha has quit [Ping timeout: 248 seconds]
raul782 has joined #ruby
kapil___ has joined #ruby
eckhardt has joined #ruby
astronavt has joined #ruby
guille-moe has joined #ruby
nowhere_man has quit [Ping timeout: 255 seconds]
astronavt has quit [Ping timeout: 252 seconds]
kculpis has quit [Ping timeout: 240 seconds]
k3rn31 has quit [Ping timeout: 248 seconds]
k3rn31 has joined #ruby
aupadhye|afk is now known as aupadhye
konsolebox has quit [Ping timeout: 240 seconds]
konsolebox has joined #ruby
deepredsky has quit [Ping timeout: 240 seconds]
deepredsky has joined #ruby
quobo has quit [Quit: Connection closed for inactivity]
marr has joined #ruby
miskatonic has joined #ruby
miskatonic has quit [Client Quit]
Bish has quit [Remote host closed the connection]
miskatonic has joined #ruby
elphe has joined #ruby
yasu has quit [Ping timeout: 240 seconds]
bkxd has joined #ruby
konsolebox has quit [Ping timeout: 240 seconds]
deepredsky has quit [Ping timeout: 255 seconds]
lunarkitty7 has quit [Ping timeout: 240 seconds]
csk157 has joined #ruby
konsolebox has joined #ruby
alex`` has joined #ruby
csk157 has quit [Ping timeout: 240 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bkxd_ has joined #ruby
harfangk has quit [Ping timeout: 250 seconds]
lucas has quit [Quit: leaving]
bkxd has quit [Ping timeout: 260 seconds]
ur5us has quit [Remote host closed the connection]
href has joined #ruby
konsolebox has quit [Ping timeout: 260 seconds]
tvw has joined #ruby
nowhere_man has joined #ruby
guille-moe has quit [Ping timeout: 248 seconds]
raul782 has quit [Remote host closed the connection]
konsolebox has joined #ruby
guille-moe has joined #ruby
raul782 has joined #ruby
lucas has joined #ruby
raul782 has quit [Ping timeout: 246 seconds]
ShekharReddy has joined #ruby
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
TomyWork has quit [Quit: Leaving]
TomyWork has joined #ruby
DoubleMalt has quit [Ping timeout: 240 seconds]
astronavt has joined #ruby
Beams has joined #ruby
astronavt has quit [Ping timeout: 255 seconds]
lunarkitty7 has joined #ruby
tvw has quit []
DoubleMalt has joined #ruby
vondruch has joined #ruby
<TvL2386>
hey guys, I'm having a String returned from a HP switch that has: 'Serial Number: \xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF Core Dump: YES'
ur5us has joined #ruby
<TvL2386>
The encoding of this String is Encoding:ASCII-8BIT (whereas all other commands executed have encoding Encoding:UTF-8)
ahrs has quit [Remote host closed the connection]
<TvL2386>
when this string is dumped to json, I get an error: Encoding::UndefinedConversionError: "\xFF" from ASCII-8BIT to UTF-8
ahrs has joined #ruby
<TvL2386>
it's probably due to newer firmware, I suspect a bug in the switch firmware, because an interactive ssh session also shows weird chars in that output
<TvL2386>
however, for now I need to work around it and want to filter it out
SteenJobs has joined #ruby
<TvL2386>
I thought I would do output.gsub('\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF','*************') but it seems those chars are not matched
lunarkitty7 has quit [Ping timeout: 255 seconds]
chmuri has quit [Excess Flood]
jamesaxl has quit [Read error: Connection reset by peer]
<dminuoso>
You can configure it slightly to the accuracy that you want, check out the documentation.
<adaedra>
And dminuoso saves the day
<dminuoso>
Radar does.
astronavt has quit [Ping timeout: 246 seconds]
mfb2 has quit [Remote host closed the connection]
<plexigras>
thank you verry much
lxnr has joined #ruby
<plexigras>
is it normal to take for ever to install a gem?
<adaedra>
If it has native extensions, it can take some time
<plexigras>
ok :)
<adaedra>
Normally it tells you "Building native extensions"
elphe has quit [Ping timeout: 248 seconds]
<dminuoso>
Well the thing is, this gem will pull actionpack behind it.
<dminuoso>
So that could be quite a bit if you don't have a rails application already.
<plexigras>
and i just put `require 'dotiw'` in the file?
<dminuoso>
plexigras: That depends on whether you use Bundler or not.
<plexigras>
i dont understand, im a total newbie
<plexigras>
what do i need to do to get this to work?
<plexigras>
this cant be to hard right?
<plexigras>
this is frustrating
<plexigras>
dminuoso: can you help me?
Beams_ has joined #ruby
Beams has quit [Ping timeout: 248 seconds]
deepredsky has quit [Ping timeout: 240 seconds]
<plexigras>
ok i think im just gonna give up on this
lxnr has quit [Quit: WeeChat 1.9.1]
Beams_ has quit [Quit: .]
csk157 has joined #ruby
elphe has joined #ruby
csk157 has quit [Ping timeout: 268 seconds]
ptx0 has quit [Ping timeout: 248 seconds]
_aeris_ has quit [Ping timeout: 248 seconds]
xMopxShell has quit [Ping timeout: 260 seconds]
yahmds has joined #ruby
kapil___ has quit [Quit: Connection closed for inactivity]
_aeris_ has joined #ruby
muelleme has joined #ruby
cdg has joined #ruby
claudiuinberlin has joined #ruby
leitao has joined #ruby
muelleme has quit [Ping timeout: 240 seconds]
cdg has quit [Ping timeout: 252 seconds]
tcopeland has quit [Quit: tcopeland]
bigkevmcd has quit [Quit: Outta here...]
jgt has joined #ruby
chmurifree has joined #ruby
SteenJobs has quit [Quit: peaceee]
apparition has joined #ruby
yahmds has quit [Ping timeout: 248 seconds]
Beams has joined #ruby
yahmds has joined #ruby
astronavt has joined #ruby
Beams has quit [Client Quit]
despai has quit [Quit: ...]
astronavt has quit [Ping timeout: 276 seconds]
xMopxShell has joined #ruby
fredx has quit [Remote host closed the connection]
ptx0 has joined #ruby
<AlHafoudh>
is there any gem to do throttle method calls in ruby? something like javascript lodash _.throttle does. I just found rate limiting tied to rack. i need just to throttle method call
<AlHafoudh>
or some block
Psybur has joined #ruby
Beams has joined #ruby
<dminuoso>
AlHafoudh: If at all, this should be a modification of Proc
miskatonic has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
uZiel has quit [Ping timeout: 248 seconds]
despai has joined #ruby
tcopeland has joined #ruby
<plexigras>
dminuoso: i mean a timer interval
apeiros_ has joined #ruby
ShekharReddy has quit [Quit: Connection closed for inactivity]
silvermine has joined #ruby
jgt has quit [Ping timeout: 248 seconds]
porfavordama has joined #ruby
holden_d has quit [Quit: Leaving]
porfavordama has quit [Client Quit]
despai has quit [Quit: ...]
porfavordama has joined #ruby
despai has joined #ruby
despai has quit [Client Quit]
jottr has quit [Ping timeout: 250 seconds]
porfavordama has quit [Ping timeout: 260 seconds]
despai has joined #ruby
cdg has joined #ruby
hightower2 has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
anisha_ has quit [Ping timeout: 240 seconds]
cdg has quit [Ping timeout: 240 seconds]
anisha_ has joined #ruby
nadir has joined #ruby
guille-moe has quit [Ping timeout: 258 seconds]
Xano_ has joined #ruby
<Xano_>
Hi! I have zero Ruby knowledge, but need to install a particular third-party Gem as part of a tool stack I am installing. The documentation recommends installing the Gems globally, causing all kinds of permission issues. What's a common approach to handle this? I assume there's another solution than running Gems with `sudo` :)
RoneDreamer has quit [Read error: Connection reset by peer]
InfinityFye has joined #ruby
RoneDreamer has joined #ruby
despai has joined #ruby
jeffreylevesque has quit [Ping timeout: 268 seconds]
rfoust has joined #ruby
tvw has joined #ruby
Xano__ has joined #ruby
synthroid has joined #ruby
Xano_ has quit [Ping timeout: 260 seconds]
voldemar has joined #ruby
jgt has joined #ruby
psychicist__ has quit [Quit: Lost terminal]
rhebz916 has quit [Remote host closed the connection]
lxnr has joined #ruby
jgt has quit [Client Quit]
aintno_sunshine has joined #ruby
BTRE has quit [Remote host closed the connection]
csk157 has joined #ruby
csk157 has quit [Ping timeout: 264 seconds]
BTRE has joined #ruby
lxnr has quit [Quit: WeeChat 1.9.1]
jaruga has joined #ruby
RoneDreamer has quit []
yahmds has quit [Ping timeout: 240 seconds]
yahmds has joined #ruby
mikeiniowa has joined #ruby
mson has joined #ruby
jeffreylevesque has joined #ruby
anisha_ has quit [Ping timeout: 240 seconds]
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
oleo2 has joined #ruby
bmurt has joined #ruby
Axy has joined #ruby
Axy has quit [Changing host]
Axy has joined #ruby
Mia has quit [Ping timeout: 276 seconds]
despai has quit [Quit: ...]
cdg has joined #ruby
caen23 has joined #ruby
bigkevmcd has joined #ruby
anisha_ has joined #ruby
<caen23>
hi, i was wondering what are good resources to get started with ruby. is the pickaxe fine for 2.4? i have programming experience (coming from c and python), and i'm not currently interested in rails. thanks!
<dminuoso>
caen23: The pickaxe while being a good book is relatively old.
<caen23>
that's what i was afraid of
<dminuoso>
caen23: If you have good experience, you could just get the book "Eloquent Ruby" or perhaps "The Well Grounded Rubyist" which are currently the two most recommended books in this channel
<dminuoso>
caen23: Beyond that the topic has a good booklist
astronavt has joined #ruby
<dminuoso>
(Which incidentally does list the pickaxe)
DoubleMalt has joined #ruby
<caen23>
i did check out the list in the topic before asking, but it said twgr is for "introduction to programming in general" and that put me off as well
_aeris_ has quit [Ping timeout: 248 seconds]
<dminuoso>
caen23: Hardly.
<dminuoso>
caen23: I guess it can work for some, but its very steep.
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dminuoso>
caen23: Eloquent Ruby is probably the best fit for you.
_aeris_ has joined #ruby
<dminuoso>
caen23: The "introduction to programming" is basically just the first 4 pages or so.
<caen23>
i'll get eloquent then, thanks a lot ^^
astronavt has quit [Ping timeout: 255 seconds]
<dminuoso>
Just checked my copy, its 10.
<dminuoso>
;)
caen23 has quit [Quit: leaving]
mim1k has joined #ruby
iamarun has joined #ruby
Rouge has quit [Ping timeout: 240 seconds]
despai has joined #ruby
aintno_sunshine has quit [Ping timeout: 248 seconds]
anisha_ has quit [Quit: This computer has gone to sleep]
mim1k has quit [Ping timeout: 268 seconds]
drowze has joined #ruby
Mia has joined #ruby
mim1k has joined #ruby
xlegoman has joined #ruby
jeffreylevesque_ has joined #ruby
xlegoman has quit [Client Quit]
csk157 has joined #ruby
jeffreylevesque has quit [Ping timeout: 246 seconds]
iamarun has quit [Ping timeout: 255 seconds]
Axy has quit [Ping timeout: 248 seconds]
csk157 has quit [Ping timeout: 248 seconds]
Mia has quit [Ping timeout: 248 seconds]
sysvalve has joined #ruby
srandon111 has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
<srandon111>
hello all, where do i start with ruby ? can somebody advice me some good books about software design ?
shinnya has joined #ruby
<dminuoso>
14:53 dminuoso | caen23: If you have good experience, you could just get the book "Eloquent Ruby" or perhaps "The Well Grounded Rubyist" which are currently the two most recommended books in this channel
danieli has joined #ruby
danieli has joined #ruby
<srandon111>
dminuoso: what about software design with classes... i mean do you generally use UML ?
<srandon111>
or start by writing code directly ?
charliesome has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
iamarun has joined #ruby
<dminuoso>
UML is terrible at most things.
mniip has quit [Ping timeout: 612 seconds]
<dminuoso>
We start by collecting user stories.
Xano__ has quit [Remote host closed the connection]
Xano__ has joined #ruby
mim1k has joined #ruby
d10n-work has joined #ruby
iamarun has quit [Remote host closed the connection]
guille-moe has joined #ruby
krawchyk has joined #ruby
allcentury has joined #ruby
mikecmpbll has joined #ruby
duderonomy has joined #ruby
yahmds has quit [Ping timeout: 240 seconds]
mim1k has quit [Disconnected by services]
mim1k_ has joined #ruby
yahmds has joined #ruby
ogres has joined #ruby
rippa has joined #ruby
mim1k_ has quit [Read error: Connection reset by peer]
mim1k has joined #ruby
astronavt has joined #ruby
allcentury has quit [Ping timeout: 264 seconds]
[spoiler] has quit [Ping timeout: 240 seconds]
astronavt has quit [Ping timeout: 246 seconds]
sepp2k has joined #ruby
polishdub has joined #ruby
yahmds has quit [Ping timeout: 260 seconds]
[spoiler] has joined #ruby
shinnya has quit [Ping timeout: 240 seconds]
jottr has quit [Ping timeout: 240 seconds]
mniip has joined #ruby
KeyJoo has quit [Remote host closed the connection]
gnufied has joined #ruby
uZiel has joined #ruby
despai has quit [Quit: ...]
apparition has quit [Quit: Bye]
csk157 has joined #ruby
Rapture has joined #ruby
jottr has joined #ruby
cschneid_ has quit [Remote host closed the connection]
despai has joined #ruby
csk157 has quit [Ping timeout: 248 seconds]
TomyWork has quit [Quit: Leaving]
hightower2 has quit [Ping timeout: 268 seconds]
miskatonic has joined #ruby
mim1k has quit [Read error: Connection reset by peer]
ana_ has quit [Quit: Leaving]
mim1k has joined #ruby
despai has quit [Quit: ...]
yahmds has joined #ruby
naftilos76 has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Roa_ is now known as Roa
Roa has quit [Changing host]
Roa has joined #ruby
Rouge has joined #ruby
oleo2 has quit [Ping timeout: 255 seconds]
Psybur has quit [Remote host closed the connection]
Psybur has joined #ruby
mson has quit [Quit: Connection closed for inactivity]
despai has joined #ruby
duderonomy has quit [Ping timeout: 248 seconds]
oleo has joined #ruby
despai has quit [Client Quit]
kculpis has joined #ruby
moei has quit [Quit: Leaving...]
selim has quit [Ping timeout: 250 seconds]
safetypin has joined #ruby
despai has joined #ruby
enterprisey has joined #ruby
selim has joined #ruby
yahmds has quit [Ping timeout: 260 seconds]
astronavt has joined #ruby
astronavt has quit [Ping timeout: 258 seconds]
enterprisey has quit [Ping timeout: 240 seconds]
Asher has quit [Quit: Leaving.]
andikr has quit [Remote host closed the connection]
mson has joined #ruby
drowze has quit [Ping timeout: 240 seconds]
mfb2 has joined #ruby
synthroid has quit [Remote host closed the connection]
DoubleMalt has quit [Ping timeout: 250 seconds]
yahmds has joined #ruby
cschneid_ has joined #ruby
jottr has quit [Ping timeout: 240 seconds]
mfb2 has quit [Ping timeout: 248 seconds]
dviola has joined #ruby
apeiros has joined #ruby
Neptu has quit [Ping timeout: 248 seconds]
synthroid has joined #ruby
apeiros_ has quit [Ping timeout: 240 seconds]
dinfuehr has quit [Ping timeout: 248 seconds]
mfb2 has joined #ruby
dinfuehr has joined #ruby
apeiros has quit [Ping timeout: 240 seconds]
John__ has joined #ruby
despai has quit [Quit: ...]
mfb2 has quit [Ping timeout: 250 seconds]
enterprisey has joined #ruby
aupadhye has quit [Ping timeout: 240 seconds]
jottr has joined #ruby
mtkd has quit [Ping timeout: 248 seconds]
mtkd has joined #ruby
drowze has joined #ruby
DTZUZU has quit [Quit: WeeChat 1.9]
troys has joined #ruby
InfinityFye has quit [Quit: Leaving]
exhiled has joined #ruby
cschneid has quit [Read error: Connection reset by peer]
cschneid- has joined #ruby
aufi has quit [Remote host closed the connection]
Neptu has joined #ruby
jackjackdripper has joined #ruby
[Butch] has joined #ruby
rahul_bajaj has joined #ruby
nowhere_man has joined #ruby
mfb2 has joined #ruby
rabajaj has quit [Ping timeout: 248 seconds]
allcentury has joined #ruby
cschneid_ has quit [Remote host closed the connection]
cschneid has joined #ruby
houhoulis has joined #ruby
astronavt has joined #ruby
exhiled has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yokel has quit [Remote host closed the connection]
astronavt has quit [Ping timeout: 240 seconds]
yokel has joined #ruby
sysvalve has quit [Quit: Leaving]
lexruee has quit [Ping timeout: 268 seconds]
cdg has quit [Remote host closed the connection]
lexruee has joined #ruby
yahmds has quit [Read error: Connection reset by peer]
rahul_bajaj has quit [Remote host closed the connection]
cschneid_ has joined #ruby
cognoscente_ has joined #ruby
csk157 has joined #ruby
konsolebox_ has joined #ruby
cschneid has quit [Ping timeout: 240 seconds]
exhiled has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
konsolebox has quit [Ping timeout: 268 seconds]
jnollette has quit [Quit: ZNC 1.6.5 - http://znc.in]
csk157 has quit [Ping timeout: 240 seconds]
jnollette has joined #ruby
despai has quit [Ping timeout: 268 seconds]
jottr has quit [Ping timeout: 276 seconds]
astronavt has joined #ruby
ur5us has joined #ruby
tvw has quit [Remote host closed the connection]
exhiled has joined #ruby
my123 has quit [Read error: Connection reset by peer]
wnd has quit [Excess Flood]
my123 has joined #ruby
my123 has joined #ruby
hockerfan11 has joined #ruby
Beams has quit [Quit: .]
<hockerfan11>
Hello. I am trying to get the gem installation path in a users home directory programmatically. I seem to be able to get ALL the gem paths through 'gem env path', but can I get ONE of those paths without parsing this list?
wnd has joined #ruby
astronavt has quit [Ping timeout: 252 seconds]
ur5us has quit [Ping timeout: 248 seconds]
govg has joined #ruby
Xano__ has quit [Ping timeout: 240 seconds]
mwlang has joined #ruby
SeepingN has joined #ruby
naftilos76 has quit [Quit: Αποχώρησε]
Mia has quit [Read error: Connection reset by peer]
silvermine has joined #ruby
Mia has joined #ruby
hockerfan11 has quit [Quit: Page closed]
kies has joined #ruby
claudiuinberlin has joined #ruby
miskatonic has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
cdg has joined #ruby
cdg_ has joined #ruby
csk157 has joined #ruby
cognoscente has joined #ruby
rando_rubyist has quit [Quit: WeeChat 1.9.1]
cognoscente_ has quit [Ping timeout: 255 seconds]
cdg has quit [Ping timeout: 255 seconds]
despai has joined #ruby
mfb2 has quit [Remote host closed the connection]
jnollette has quit [Quit: ZNC 1.6.5 - http://znc.in]
nowhere_man has quit [Ping timeout: 240 seconds]
mson has quit [Quit: Connection closed for inactivity]
mfb2 has joined #ruby
csk157 has quit [Ping timeout: 268 seconds]
despai has quit [Client Quit]
exhiled has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jnollette has joined #ruby
minimalism has joined #ruby
jordanm has quit [Ping timeout: 240 seconds]
jeffreylevesque_ has quit [Ping timeout: 240 seconds]
mfb2 has quit [Ping timeout: 260 seconds]
cognoscente_ has joined #ruby
alex`` has quit [Quit: WeeChat 1.9.1]
cognoscente has quit [Ping timeout: 240 seconds]
mfb2 has joined #ruby
csk157 has joined #ruby
mfb2 has quit [Remote host closed the connection]
mfb2 has joined #ruby
Rouge has quit [Ping timeout: 268 seconds]
damenez has joined #ruby
<damenez>
hi
<dminuoso>
hi.
<baweaver>
hi..
<dminuoso>
Whatever problem you have, baweaver is happy to help you.
<havenwood>
hi
* dminuoso
goes to the supermarket
<dminuoso>
Again.. havenwood and baweaver appearing at the scene at the same time.
<dminuoso>
Suspicious stuff.
aintno_sunshine has joined #ruby
PaulCapestany has quit [Quit: .]
ledestin has joined #ruby
despai has joined #ruby
PaulCapestany has joined #ruby
<RickHull>
quick, what's some ruby code to discover the letters they have in common?
<mikecmpbll>
wtf how didn't i stumble upon that myself. eugh
klaas_ is now known as klaas
<mikecmpbll>
that'll do nicely.
<dminuoso>
MMm.
<mikecmpbll>
thanks all :D and i learned about TracePoint.
<dminuoso>
RickHull: I think this actually uses this.
<RickHull>
this.self === self.this
mfb2 has quit [Ping timeout: 240 seconds]
cdg has quit [Ping timeout: 240 seconds]
mim1k has quit [Ping timeout: 240 seconds]
govg has quit [Ping timeout: 248 seconds]
mfb2 has joined #ruby
mfb2 has quit [Remote host closed the connection]
tcopeland has joined #ruby
leah2 has quit [Ping timeout: 246 seconds]
allcentury has joined #ruby
vondruch has quit [Quit: vondruch]
mfb2_ has joined #ruby
<RickHull>
anyone play Traveller tabletop RPG? I have some questions for you in #ruby-offtopic please :)
nowhere_man has joined #ruby
mim1k has joined #ruby
astronavt has joined #ruby
tcopeland has quit [Quit: tcopeland]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
muelleme has joined #ruby
astronavt has quit [Ping timeout: 255 seconds]
leah2 has joined #ruby
Xiti has joined #ruby
mcr1 has quit [Ping timeout: 255 seconds]
jenrzzz has quit [Ping timeout: 248 seconds]
cr3 has joined #ruby
Azure|dc has joined #ruby
<cr3>
hi folks, I'm calling `sh "docker build ..."` in a Rakefile; the command returns an error message but copy/pasting the command on the shell runs fine. any ideas?
Azure has quit [Ping timeout: 255 seconds]
mcr has joined #ruby
elphe has quit [Ping timeout: 260 seconds]
<RickHull>
paste the code and the error
<baweaver>
!gist
<RickHull>
and it's generally better to call shell processes like: `sh command_name, arg1, arg2, ...`
<baweaver>
in a gist preferably :D
lexruee has quit [Ping timeout: 240 seconds]
<baweaver>
?gist
<ruby[bot]>
https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
<baweaver>
nuuuuuuuu bot
<baweaver>
aha
voldemar has quit [Ping timeout: 258 seconds]
<RickHull>
so: `sh 'docker', 'build', 'the_thing', 'to_do',, 'stuff'`
lexruee has joined #ruby
csk157 has quit [Ping timeout: 268 seconds]
<RickHull>
except without extra commas
mim1k has quit [Ping timeout: 248 seconds]
mcr has quit [Ping timeout: 246 seconds]
mfb2_ has quit [Remote host closed the connection]
mwlang has joined #ruby
cdg has joined #ruby
mcr1 has joined #ruby
bkxd has joined #ruby
mfb2 has joined #ruby
tcopeland has joined #ruby
sylario has quit [Quit: Connection closed for inactivity]
reber has quit [Remote host closed the connection]
cdg has quit [Ping timeout: 240 seconds]
<ule>
correct if I'm wrong, but if I have two different object_ids, that means two different objects in memory right?
mfb2 has quit [Ping timeout: 260 seconds]
<dminuoso>
ule: Yup
<dminuoso>
ule: Object ids are actually memory addresses.
<havenwood>
a bitshift away
<dminuoso>
^-
<ule>
so if I use foo.keep_if instead of foo.select I'm gonna save memory since it mutates the object instead of creating a new one
<ule>
correct?
mfb2 has joined #ruby
enterprisey has quit [Ping timeout: 276 seconds]
<dminuoso>
havenwood: Im afraid to answer, because I dont want to support mutating objects.
<dminuoso>
havenwood: Can you please?
<havenwood>
ule: Check your presumptions about memory usage and speed with metrics and benchmarks. Things may not be as you'd expect.
<ule>
mutating objects its ok if it mutates in the last statement of a method though.
<havenwood>
ule: Sometimes memory and speed matter less than predictability and testability.
<ule>
havenwood: I did a benchmark and keep_if looks to be faster than select
<havenwood>
ule: Did you check it with realistic data?
<havenwood>
Is it meaningfully faster?
<ule>
Array(1..100_000_000)
<havenwood>
ule: Is that the same data you'll be working with?
<ule>
I'd say 10 vs 6
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ule>
thats a good point
<havenwood>
ule: I'd suggest trying metrics and benchmarks with as realistic data as possible. Then see if the differences are important enough to be worth mutating.
s778 has joined #ruby
<ule>
havenwood: you think mutating is slower than creating a new object?
mwlang has quit [Quit: mwlang]
jenrzzz has joined #ruby
<havenwood>
ule: Is it premature optimization?
Technodrome has joined #ruby
aintno_sunshine has quit [Ping timeout: 258 seconds]
<havenwood>
"If a pure function mutates some local data in order to produce an immutable return value, is that ok?" ;-)
<dminuoso>
ule: The way the code works, is that it scans the array, and moves items to the left if the match, resizing the array at the end.
<ule>
if I mutate something that is the last statement from my method, knowing that Im gonna return that same data at the end, I'm actually saving 1 new object in memory and no risk of mutating since there is no more operations after that
<dminuoso>
ule: It shouldn't be meaningfully more expensive to use #select over #select!
<ule>
dminuoso: 1 method call is 1 object, how about 100.000 method calls? 100.000 objects in memory
<dminuoso>
What do you mean with method calls?
<dminuoso>
The percentage cost is still the same.
Xano__ has quit [Ping timeout: 260 seconds]
<dminuoso>
ule: Let me ask differently. Did your profiler tell this is in a hotspot?
<ule>
dminuoso: you mean, if we considerate that mutates is slower than creating a new object
<ule>
but on a benchmark using numbers it shows to be faster
jenrzzz has quit [Ping timeout: 248 seconds]
<dminuoso>
ule: Ignore benchmarks. Do you have code that suffers in performance, with the profiler telling you this is hot?
<dminuoso>
If this is not a hot spot, we shouldn't be talking about this (i.e, use #select)
headius_ is now known as headius
tvw has joined #ruby
clemens3 has joined #ruby
uZiel has quit [Ping timeout: 248 seconds]
<ule>
no. I just want to convince myself that if doesnt matter mutate or not since its the last statement in the method, 2 positive points on using keep_if instead of select is that it saves memory and its faster
mwlang has joined #ruby
<ule>
but I agree that mutating something in the middle of something could mess things up
voldemar has joined #ruby
<dminuoso>
And it mutates. Mutating objects means you cant use this trivially in concurrency situations, and it makes code error prone.
<ule>
but if the variable Im mutating is isolated inside a method scope, and its not an instance variable, then there is no concurrency
enterprisey has joined #ruby
bkxd_ has joined #ruby
<ule>
It was nice that my coleague bring this up review my code though. I got a chance to braindstorm better about all this
<ule>
*brought
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
troys_ is now known as troys
<dminuoso>
ule: So you have ruled out the first part. What about the second?
<ule>
which second?
<dminuoso>
"and it makes code error prone"
<ule>
I don't know what that means actually
<dminuoso>
ule: Is the array from an argument?
<dminuoso>
Or is it created locally?
<ule>
from argument
<dminuoso>
So it is shared!
bkxd has quit [Ping timeout: 260 seconds]
<ule>
foo(a) a.keep_if { something
voldemar has quit [Ping timeout: 264 seconds]
<dminuoso>
And therein lies your problem. If you mutate arguments, this can trip anyone up in the entire callgraph above you that have access to the arra
<ule>
thats all the method does. even if I use .select instead, the goal will be the same. Get rid of something and return it
<ule>
I indeed want to change the data and return something else
<dminuoso>
ule: Without seeing your code I can just assume that the array can come from multiple places. Lets assume I have some arr = [1,2,3], and I call some function writeToLog(arr), and that method happens to pass my array to yours, now my array has been mutated.
skweek has quit [Ping timeout: 240 seconds]
<dminuoso>
If I use my arr any further, its different.
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
<ule>
I see
<ule>
Thanks for sharing some thoughts with me guys
<ule>
(:
voldemar has joined #ruby
muelleme has quit [Ping timeout: 248 seconds]
ta_ has quit [Read error: Connection reset by peer]
ta_ has joined #ruby
konsolebox_ has quit [Ping timeout: 240 seconds]
<clemens3>
sometimes the caller explicitly wants the method to change the argument, sometimes it doesn't, use ! in the method name to indicate this.. if in doubt, create a new object and return that..
<dminuoso>
clemens3: If you want it to change, feel free to do: arr = foo(arr)
<clemens3>
dminuoso: exactly
<clemens3>
is like sub and sub! etc.
<s778>
Hello! I'm wondering if anybody here has any suggestions. I've sent in a feature request for Ruby on the issue tracker, completele with a patch to help implement said feature, but I haven't received any reply in 14 days. Am I going about this the wrong way?
synthroid has quit []
<dminuoso>
That reminds me, my Q library needs to scan ObjectSpace for all classes, and undef_method any method ending in ! :D
<s778>
I meant to say "it's probably not a good idea to rely on sentry-raven" (the gem)
<dminuoso>
But I like what you are doing. Finally they get a taste of "them speaking badly in our language" of their own!
<s778>
For the PoC implementation I grab the filename and parse it using some library from sentry-raven, then read the function prototype that's defined on that file
<RickHull>
what does it do? any change to ruby core functionality would not rely on a gem
<s778>
haha, might as well try, right?
<dminuoso>
s778: How would this treat lambdas?
<s778>
Oh good question, I haven't tested that
<RickHull>
also, I will raise(ArgumentError, "don't do that") in my own methods sometimes
miskatonic has joined #ruby
<RickHull>
would this work automagically?
<s778>
No, it'd only work on argument errors instantiated by the Ruby. And even then only on methods called that exist in rubyland. For example, it wouldn't work on File.open().
ur5us has quit [Remote host closed the connection]
<dminuoso>
s778: Also you might want to respect tabs/spaces in your patch
ta_ has quit [Read error: Connection reset by peer]
<dminuoso>
The sudden shift when just looking at the diff is slightly annoying
cdg has joined #ruby
<s778>
That's fair, thanks, I'll try to fix that.
Xano__ has joined #ruby
biberu has quit []
exhiled has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
elphe has joined #ruby
ta_ has joined #ruby
<dminuoso>
s778: What revision is the patch against?
mfb2 has quit [Remote host closed the connection]
<s778>
Just tested it on procs by the way, doesn't work. Interestingly, the "receiver" becomes an integer, rather than a class?
exhiled has joined #ruby
<dminuoso>
s778: Is it possibly the object id or addr of the lambda?
<s778>
dminuoso: the branch "trunk" as I found it on GitHub
<dminuoso>
k
kitsunenokenja has joined #ruby
<dminuoso>
s778: huh..
orbyt_ has joined #ruby
<dminuoso>
foo.rb:3:in `block in <main>': wrong number of arguments (given 0, expected 1) (ArgumentError)
<dminuoso>
Nevermind.
pdcawley has joined #ruby
safetypin has quit [Ping timeout: 248 seconds]
workmad3_ has quit [Ping timeout: 276 seconds]
csk157 has joined #ruby
exhiled has quit [Client Quit]
<dminuoso>
s778: argument_kw_error should be patched just as well
<dminuoso>
Perhaps even more importantly. :-)
<dminuoso>
Or not sure, but it should be consistent
pdcawley has quit [Client Quit]
pdcawley has joined #ruby
cdg_ has joined #ruby
pdcawley has quit [Client Quit]
<s778>
I should be able to test that with something like `def foo(a:); end; foo()`, right?
cdg_ has quit [Read error: Connection reset by peer]
pdcawley has joined #ruby
cdg has quit [Ping timeout: 248 seconds]
pdcawley has quit [Client Quit]
mfb2 has joined #ruby
pdcawley has joined #ruby
lupine has quit [Remote host closed the connection]
<dminuoso>
yeah
voldemar has joined #ruby
pdcawley has quit [Client Quit]
pdcawley has joined #ruby
polishdub has quit [Quit: leaving]
lupine has joined #ruby
pdcawley has quit [Client Quit]
csk157 has quit [Ping timeout: 268 seconds]
pdcawley has joined #ruby
wilbert has joined #ruby
pdcawley has quit [Client Quit]
jamesaxl has quit [Quit: WeeChat 1.9.1]
pdcawley has joined #ruby
uZiel has joined #ruby
pdcawley has quit [Client Quit]
pdcawley has joined #ruby
<s778>
Shoot, you're right, that doesn't work. Thanks!
pdcawley has quit [Client Quit]
pdcawley has joined #ruby
dstrunk has joined #ruby
wilbert_ has joined #ruby
allcentury has quit [Remote host closed the connection]
pdcawley has quit [Client Quit]
mfb2 has quit [Ping timeout: 248 seconds]
pdcawley has joined #ruby
voldemar has quit [Ping timeout: 240 seconds]
allcentury has joined #ruby
nowhere_man has quit [Ping timeout: 268 seconds]
pdcawley has quit [Client Quit]
nowhere_man has joined #ruby
wilbert has quit [Ping timeout: 248 seconds]
mfb2 has joined #ruby
jottr has joined #ruby
troys is now known as troys_
kapil___ has joined #ruby
cdg has joined #ruby
allcentury has quit [Ping timeout: 260 seconds]
mfb2 has quit [Remote host closed the connection]
mfb2 has joined #ruby
char_var[buffer] has quit [Ping timeout: 240 seconds]
safetypin has joined #ruby
tcopeland has quit [Quit: tcopeland]
cr3 has quit [Quit: leaving]
safetypin has quit [Quit: ZZZzzz…]
mtkd has quit [Read error: Connection reset by peer]
silvermine has quit [Quit: WeeChat 2.0-dev]
safetypin has joined #ruby
mtkd has joined #ruby
jottr_ has joined #ruby
despai has joined #ruby
safetypin has quit [Client Quit]
silvermine has joined #ruby
bkxd has quit [Read error: Connection reset by peer]
cognoscente has quit [Ping timeout: 248 seconds]
jottr has quit [Ping timeout: 260 seconds]
bkxd has joined #ruby
GodFather has quit [Ping timeout: 240 seconds]
Xano__ has quit [Ping timeout: 268 seconds]
jxv has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mfb2 has quit [Remote host closed the connection]
troys_ is now known as troys
yokel has quit [Remote host closed the connection]
despai has quit [Quit: ...]
yokel has joined #ruby
voldemar has joined #ruby
uZiel has quit [Ping timeout: 248 seconds]
mfb2 has joined #ruby
mfb2 has quit [Remote host closed the connection]
astronavt has joined #ruby
mfb2 has joined #ruby
oetjenj has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pastorinni has joined #ruby
voldemar has quit [Ping timeout: 255 seconds]
bkxd has joined #ruby
astronavt has quit [Ping timeout: 240 seconds]
TomyLobo has joined #ruby
krawchyk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
despai has joined #ruby
cognoscente has joined #ruby
Azure|dc has quit [Read error: Connection reset by peer]