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-preview2: 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 | Can't talk? Register/identify with Nickserv first!
tdy has joined #ruby
bmurt has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nowhere_man has quit [Ping timeout: 260 seconds]
eGGshke has quit [Quit: Textual IRC Client: www.textualapp.com]
Zaab1t has quit [Quit: Zaab1t]
venmx has quit [Ping timeout: 256 seconds]
akaiiro has quit [Ping timeout: 256 seconds]
sameerynho has quit [Ping timeout: 248 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cagomez has quit [Remote host closed the connection]
cagomez has joined #ruby
FernandoBasso has quit [Quit: Leaving]
cagomez has quit [Ping timeout: 248 seconds]
oct2pus has quit [Ping timeout: 256 seconds]
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
weird_error has quit [Quit: weird_error]
mikecmpbll has quit [Quit: inabit. zz.]
teclator has quit [Quit: No Ping reply in 210 seconds.]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
weaksauce has quit [Quit: Textual IRC Client: www.textualapp.com]
Caerus has joined #ruby
Some-body_ has joined #ruby
DarthGandalf has quit [Ping timeout: 240 seconds]
cthulchu has quit [Ping timeout: 260 seconds]
Some-body_ is now known as DarthGandalf
kapil___ has quit [Quit: Connection closed for inactivity]
weaksauce has joined #ruby
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
konsolebox has quit [Ping timeout: 256 seconds]
redlegion has quit [Remote host closed the connection]
redlegion has joined #ruby
r29v has quit [Quit: r29v]
stewp has joined #ruby
za1b1tsu has joined #ruby
spectra has quit [Ping timeout: 256 seconds]
ur5us has quit [Remote host closed the connection]
za1b1tsu has quit [Ping timeout: 248 seconds]
\void has quit [Quit: So long, and thanks for all the fish.]
ur5us has joined #ruby
mayamai has quit [Ping timeout: 265 seconds]
ogres has quit [Quit: Connection closed for inactivity]
spectra has joined #ruby
ur5us has quit [Ping timeout: 256 seconds]
RougeR has quit [Ping timeout: 240 seconds]
negatifze has joined #ruby
redlegion has quit [Max SendQ exceeded]
dstrunk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
redlegion has joined #ruby
white_lilies has joined #ruby
ur5us has joined #ruby
ur5us has quit [Read error: Connection reset by peer]
dstrunk has joined #ruby
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
ur5us has joined #ruby
zachk has quit [Quit: Leaving]
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
stewp has quit [Ping timeout: 244 seconds]
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
eldritch has quit [Ping timeout: 268 seconds]
graphene has quit [Remote host closed the connection]
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
graphene has joined #ruby
kapil___ has joined #ruby
\13k has quit [Ping timeout: 248 seconds]
cpallares has quit [Ping timeout: 240 seconds]
\13k has joined #ruby
cpallares has joined #ruby
vyorkin has quit [Ping timeout: 240 seconds]
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
eldritch has joined #ruby
tdy has quit [Ping timeout: 260 seconds]
za1b1tsu has joined #ruby
\13k has quit [Ping timeout: 244 seconds]
banisterfiend has quit [Read error: Connection reset by peer]
za1b1tsu has quit [Ping timeout: 264 seconds]
tdy has joined #ruby
s2013 has joined #ruby
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
\13k has joined #ruby
cadillac_ has joined #ruby
edwardly has quit [Ping timeout: 260 seconds]
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
shakes has joined #ruby
braincrash has quit [Quit: bye bye]
gnufied has quit [Quit: Leaving]
braincrash has joined #ruby
dstrunk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
za1b1tsu has joined #ruby
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
za1b1tsu has quit [Ping timeout: 240 seconds]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
akaiiro has joined #ruby
s2013 has joined #ruby
s2013 has quit [Client Quit]
s2013 has joined #ruby
s2013 has quit [Client Quit]
redlegion has quit [Max SendQ exceeded]
Nicmavr has quit [Read error: Connection reset by peer]
redlegion has joined #ruby
gix has joined #ruby
Nicmavr has joined #ruby
gix- has quit [Ping timeout: 260 seconds]
edwardly has joined #ruby
bmurt has joined #ruby
duderonomy has joined #ruby
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
r29v has joined #ruby
r29v has quit [Client Quit]
shakes has quit [Quit: Leaving]
akaiiro has quit [Ping timeout: 244 seconds]
ski7777 has quit [Ping timeout: 276 seconds]
ogres has joined #ruby
darkhanb has joined #ruby
white_lilies has quit [Ping timeout: 256 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
akaiiro has joined #ruby
white_lilies has joined #ruby
jinie has quit [Quit: ZNC 1.6.1 - http://znc.in]
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
\void has joined #ruby
za1b1tsu has joined #ruby
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
white_lilies has quit [Ping timeout: 256 seconds]
zxq2 has quit [Quit: Lost terminal]
cadillac_ has quit [Ping timeout: 268 seconds]
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
cadillac_ has joined #ruby
lain2 has joined #ruby
lain2 is now known as lainonthewired
jokke1 has quit [Ping timeout: 260 seconds]
Genya has quit [Ping timeout: 264 seconds]
lainonthewired has quit [Quit: WeeChat 2.1]
brendan- has quit [Ping timeout: 264 seconds]
dellavg has joined #ruby
lainonthewired has joined #ruby
jokke1 has joined #ruby
<lainonthewired> Hi
<havenwood> lainonthewired: hi
quobo has quit [Quit: Connection closed for inactivity]
<baweaver> haiku
<lainonthewired> I learn ruby at the moment i think i have mostly make it and want to write a bigger programm now has someone on idea for a programm that is needed or a project i can join ?
Genya has joined #ruby
<lainonthewired> And i have a question is it possilbe to get ocra to work with TK ? The command shell programms run but not the tk programms.
rfoust has quit [Ping timeout: 265 seconds]
Genya has quit [Client Quit]
Genya has joined #ruby
dviola has joined #ruby
Dbugger has joined #ruby
Es0teric has joined #ruby
sauvin has joined #ruby
ur5us has quit [Remote host closed the connection]
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
venmx has joined #ruby
apeiros has quit [Ping timeout: 240 seconds]
Eiam has quit [Ping timeout: 265 seconds]
Lyubo1 has quit [Ping timeout: 240 seconds]
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
Xiti has quit [Quit: Xiti]
Xiti has joined #ruby
megamos has joined #ruby
megamos has quit [Read error: Connection reset by peer]
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
donofrio_ has joined #ruby
weaksauce has quit [Ping timeout: 240 seconds]
donofrio has quit [Ping timeout: 248 seconds]
biberu has joined #ruby
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
Inline has quit [Read error: Connection reset by peer]
Puffball has quit [Remote host closed the connection]
Puffball has joined #ruby
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
apeiros has joined #ruby
lainonthewired has quit [Quit: Leaving.]
kapil___ has quit [Quit: Connection closed for inactivity]
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
ogres has quit [Quit: Connection closed for inactivity]
aufi has joined #ruby
conta has joined #ruby
alfiemax has quit [Ping timeout: 268 seconds]
Tuor has joined #ruby
<Tuor> (my setup: Ubuntu 16.04) Hi, I have installed gem with sudo and now I always need sudo to install gems. How can I remove all gems and start over with all my gems in my $HOME? So I don't require sudo to install gems....
rfoust has joined #ruby
cagomez has joined #ruby
Freshnuts has joined #ruby
cagomez has quit [Ping timeout: 244 seconds]
donofrio_ has quit [Remote host closed the connection]
alfiemax has joined #ruby
<dalpo> Tuor: how did you install ruby on your pc?
<dalpo> with apt?
<Tuor> apt install ruby (I think)
<Tuor> dalpo: pretty shure yes.
<dalpo> ok so its normal that you need to use sudo for each gem install
<TheBrayn> really?
<Tuor> I want to be able to install gems an use bundle and rake in my home without sudo. What do I have to do?
<TheBrayn> well, you can just do bundle install --path .vendor in your project
<TheBrayn> and then do bundle exec rake
<TheBrayn> but you should usually be able to install gems into your homedir too
<TheBrayn> not sure how ubuntu does things though
yohji has joined #ruby
alfiemax has quit [Ping timeout: 265 seconds]
<Tuor> I'm the only user of this laptop. Can I install ruby in a way, that gem, bundle, rake, what ever is all handled inside my home by default?
<dalpo> TheBrayn: by default on ubuntu if you want to install a gem with the system ruby you need the root permission
<dalpo> ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /var/lib/gems/2.5.0 directory.
<TheBrayn> I wonder what other distributions do differently to allow this
<dalpo> this is the error I see installing a gem with a normal user
<dalpo> I don't know
<dalpo> generally I always use a ruby version manager
<dalpo> like chruby
<dalpo> Tuor: so my suggestion is to install ruby with a ruby version manager like rbenv
<dalpo> rbenv, rvm, chruby + ruby-install
<TheBrayn> I don't think that's necessary at all
sysvalve has joined #ruby
<TheBrayn> you should be able to add an additional gem path
<dalpo> TheBrayn: I agree, it's the only easiest way in my experience :)
<dalpo> i think chruby should only handle the $GEM_HOME, $GEM_PATH...
Es0teric has quit [Read error: Connection reset by peer]
Es0teric has joined #ruby
alfiemax has joined #ruby
Freshnuts has quit [Quit: Leaving]
Freshnuts has joined #ruby
<Tuor> I'll check it out. thx all of you for your help!
Tuor has quit [Quit: Konversation terminated!]
TomyWork has joined #ruby
venmx has quit [Ping timeout: 264 seconds]
Tuor has joined #ruby
* Tuor is back again.
rfoust has quit [Ping timeout: 256 seconds]
grr12314 has joined #ruby
Sina has joined #ruby
<grr12314> hi, is it just me unable to find it, or does ruby really not have a way to format a float with a minimal representation? i.e. 2 instead of 2.0 when whole, etc
<ineb> grr12314: only 2.0 iam afraid.
<ineb> or thinks like Float(2) etc.
<ineb> *things
<ineb> 2.to_f being another option
<Radar> TheBrayn: strongly recommend using chruby or asdf to make your Ruby life easier.
<Radar> Or was that Tuor?
\void has quit [Quit: So long, and thanks for all the fish.]
<grr12314> hm nvm seems like %g does the trick
reber has joined #ruby
<Radar> Blog post hasn't been updated in a year but the advice within will still work.
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
hurricanehrndz has quit [Quit: Goodbye]
mikecmpbll has joined #ruby
<Tuor> Radar: thx :)
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
hurricanehrndz has joined #ruby
quobo has joined #ruby
<TheBrayn> Radar: I don't really have a use for neither of them
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
Tuor has quit [Ping timeout: 244 seconds]
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
grr12314 has left #ruby [#ruby]
kke has quit [Changing host]
kke has joined #ruby
Freshnuts has quit [Quit: Leaving]
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
vircung has joined #ruby
mikecmpb_ has joined #ruby
dhollinger has quit [Ping timeout: 276 seconds]
venmx has joined #ruby
mikecmpbll has quit [Ping timeout: 240 seconds]
Es0teric has quit [Remote host closed the connection]
jokke1 has quit [Ping timeout: 256 seconds]
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
jokke1 has joined #ruby
alfiemax has quit [Ping timeout: 240 seconds]
dhollinger has joined #ruby
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
dviola has quit [Quit: WeeChat 2.2]
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
GodFather has quit [Remote host closed the connection]
sarna has joined #ruby
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
Tuor has joined #ruby
beefjoe has joined #ruby
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
venmx has quit [Ping timeout: 256 seconds]
redlegion has quit [Max SendQ exceeded]
weird_error has joined #ruby
redlegion has joined #ruby
conta has quit [Quit: conta]
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
mzo has joined #ruby
kapil___ has joined #ruby
AJA4350 has joined #ruby
ren0v0 has quit [Ping timeout: 244 seconds]
venmx has joined #ruby
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
nielsk has quit [Quit: So Long, and Thanks for All the Fish]
nielsk has joined #ruby
Tuor has quit [Ping timeout: 240 seconds]
donofrio has joined #ruby
GodFather has joined #ruby
_whitelogger has joined #ruby
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
venmx has quit [Ping timeout: 256 seconds]
venmx has joined #ruby
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
mzo has quit [Ping timeout: 260 seconds]
dstrunk has joined #ruby
weird_error has quit [Quit: weird_error]
psychicist__ has joined #ruby
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
mojtaba has joined #ruby
<mojtaba> Hello, can I ask rails related questions here?
<mojtaba> I was following a tutorial to create a migration, but I had a typo. I fixed the typo an ran again the migration command. But it says ruby has aborted the operation. (because part of the migration has been done.) do you know how can I fix this issue?
d^sh_ has joined #ruby
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
d^sh has quit [Ping timeout: 244 seconds]
d^sh- has joined #ruby
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
<apeiros> just in case - mojtaba crossposted in #rubyonrails and got help there. not that somebody wastes time (and that's btw. why crossposting without telling is rude)
dviola has joined #ruby
d^sh_ has quit [Ping timeout: 256 seconds]
mojtaba has left #ruby [#ruby]
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
sarna has quit [Quit: Connection closed for inactivity]
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
graphene has quit [Remote host closed the connection]
SCHAPiE has quit [Ping timeout: 248 seconds]
graphene has joined #ruby
bmurt has joined #ruby
vircung has quit [Quit: Nothing to do here]
bak1an has joined #ruby
vircung has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 240 seconds]
jottr has joined #ruby
graphene has quit [Remote host closed the connection]
profetes_ has quit [Quit: Leaving]
Tuor has joined #ruby
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
beefjoe has quit [Remote host closed the connection]
rfoust has joined #ruby
rfoust has quit [Client Quit]
crankhar1er has joined #ruby
Mike11 has joined #ruby
Puffball has quit [Remote host closed the connection]
Puffball has joined #ruby
conta1 has joined #ruby
GodFather has quit [Ping timeout: 240 seconds]
venmx has quit [Ping timeout: 276 seconds]
beefjoe has joined #ruby
d10n-work has joined #ruby
venmx has joined #ruby
Tuor has quit [Quit: Konversation terminated!]
krawchyk has joined #ruby
saleria has joined #ruby
eblip has quit [Quit: WeeChat 2.0.1]
gnufied has joined #ruby
beefjoe has quit [Ping timeout: 240 seconds]
Nicmavr has quit [Read error: Connection reset by peer]
mzo has joined #ruby
eblip has joined #ruby
Nicmavr has joined #ruby
saleria has quit []
crankhar1er has quit [Ping timeout: 256 seconds]
crankhar1er has joined #ruby
mzo has quit [Ping timeout: 248 seconds]
SCHAPiE has joined #ruby
konsolebox has joined #ruby
chongtxtx has joined #ruby
Sembei has joined #ruby
KeyJoo has joined #ruby
KeyJoo has quit [Max SendQ exceeded]
KeyJoo has joined #ruby
Pisuke has quit [Ping timeout: 264 seconds]
Flabbergazta__ has quit []
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
aufi has quit [Ping timeout: 268 seconds]
biberu has quit []
npgm has quit []
GodFather has joined #ruby
apeiros has quit []
_yohji_ has joined #ruby
Beams has joined #ruby
__yohji__ has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
_yohji_ has quit [Ping timeout: 256 seconds]
yohji has quit [Ping timeout: 256 seconds]
quobo has quit [Quit: Connection closed for inactivity]
bmurt has joined #ruby
dviola has quit [Quit: WeeChat 2.2]
tcopeland has joined #ruby
dviola has joined #ruby
tcopeland has quit [Client Quit]
brendan- has joined #ruby
quobo has joined #ruby
Celmor has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Celmor> I was looking for a gem to convert markdown to pdf, I tired https://github.com/monterail/wing (gem install wing) but according to #ruby#gem that's old
<Celmor> #rubygem
kapil___ has quit [Quit: Connection closed for inactivity]
<Celmor> and doesn't work
kapil___ has joined #ruby
Travis-42_ has quit []
<tycoon177> is there a way that i can convert a symbol to a string without the colon being included in the string?
<mikecmpb_> Celmor : i've never done that specifically but might be easier to do markdown -> html -> pdf, as both of those conversions are very common.
mikecmpb_ is now known as mikecmpbll
<Celmor> yeah, thought so too
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<mikecmpbll> e.g. redcarpet for markdown -> html and wkhtmltopdf for html -> pdf.
<Celmor> the proble, is if it's not optimized for print code snippets often clip the right side and don't wrap
<tycoon177> Celmor: you could look into Pandoc bindings. i'm sure that pandoc could handle markdown to pdf
sysvalve has quit [Quit: Leaving]
jcarl43 has joined #ruby
cagomez has joined #ruby
cagomez has quit [Remote host closed the connection]
cagomez has joined #ruby
<Celmor> thanks for the suggestions, gonna try them out
apeiros_ has joined #ruby
bmurt has joined #ruby
rippa has joined #ruby
<tycoon177> disregard my question re: symbols. it seems like that's not the standard behavior if i just run irb, so i think this is a rails specific thing (or project specific)
TomyWork has quit [Remote host closed the connection]
krawchyk has quit [Quit: krawchyk]
<tycoon177> and now that issue seems to have disappeared. strange
tdy has quit [Ping timeout: 260 seconds]
krawchyk has joined #ruby
deathwishdave has joined #ruby
garyserj has quit [Ping timeout: 264 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
qolq has quit [Ping timeout: 268 seconds]
cthulchu has joined #ruby
qolq has joined #ruby
jasmith has quit [Ping timeout: 260 seconds]
tdy has joined #ruby
darkhanb has joined #ruby
za1b1tsu has quit [Ping timeout: 244 seconds]
crankhar1er has quit [Ping timeout: 265 seconds]
alfiemax_ has joined #ruby
alfiemax has joined #ruby
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 256 seconds]
AJA4351 is now known as AJA4350
alfiemax_ has quit [Ping timeout: 268 seconds]
lxsameer has quit [Ping timeout: 264 seconds]
lxsameer has joined #ruby
lxsameer has quit [Ping timeout: 260 seconds]
mikecmpbll has quit [Quit: inabit. zz.]
Beams has quit [Quit: .]
SeepingN has joined #ruby
biberu has joined #ruby
crankhar1er has joined #ruby
<baweaver> Pro tip if you're getting PM spammed: /mode <your name> +R
<baweaver> It prevents non-registered users from PMing you
<baweaver> i.e. all the bots currently being annoying.
bmurt has joined #ruby
crankhar1er has quit [Ping timeout: 268 seconds]
crankhar1er has joined #ruby
cadillac_ has quit [Read error: Connection reset by peer]
crankhar1er has quit [Ping timeout: 264 seconds]
__yohji__ has quit [Remote host closed the connection]
cadillac_ has joined #ruby
deathwishdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
deathwishdave has joined #ruby
venmx has quit [Ping timeout: 260 seconds]
crankhar1er has joined #ruby
vondruch has quit [Ping timeout: 256 seconds]
AJA4351 has joined #ruby
mikecmpbll has joined #ruby
AJA4350 has quit [Ping timeout: 240 seconds]
AJA4351 is now known as AJA4350
havenwood has quit [Quit: ZNC 1.7.0 - https://znc.in]
havenwood has joined #ruby
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
eckhardt has joined #ruby
mzo has joined #ruby
havenwood has quit [Client Quit]
havenwood has joined #ruby
dinfuehr has quit [Ping timeout: 260 seconds]
Eiam has joined #ruby
DTZUZU has quit [Quit: WeeChat 1.9]
dinfuehr has joined #ruby
mistergibson has quit [Quit: Leaving]
apeiros_ is now known as apeiros
Cthulu201 has quit [Quit: Nowhere special. I always wanted to go there.]
mzo has quit [Ping timeout: 260 seconds]
Cthulu201 has joined #ruby
DTZUZU has joined #ruby
jetpack_joe has quit []
jetpack_joe has joined #ruby
motstgo has quit [Ping timeout: 264 seconds]
lxsameer has joined #ruby
sameerynho has joined #ruby
deathwishdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jp has quit [Ping timeout: 256 seconds]
lxsameer has quit [Ping timeout: 256 seconds]
jp has joined #ruby
Tony-St4rk has left #ruby [#ruby]
lxsameer has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
wilbert has joined #ruby
zapata has joined #ruby
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 244 seconds]
AJA4351 is now known as AJA4350
weaksauce has joined #ruby
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 248 seconds]
AJA4351 is now known as AJA4350
lxsameer has joined #ruby
sauvin has quit [Ping timeout: 240 seconds]
lxsameer has quit [Ping timeout: 248 seconds]
DoubleMalt has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
jottr has quit [Quit: WeeChat 2.2]
dumptruckman has joined #ruby
<dumptruckman> hiya folks
lxsameer has joined #ruby
<dumptruckman> can anyone help me understand what is happening here? https://pastebin.com/TwRqtmtt
<ruby[bot]> dumptruckman: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
<dumptruckman> 21-24*
<dumptruckman> and 39 for that matter
lxsameer has quit [Ping timeout: 260 seconds]
<dumptruckman> specifically, why is this array syntax being used like this: modify[o.to_i]
<dumptruckman> and what is send doing?
<baweaver> That's some hairy code
<elomatreb> Modify seems to be a lambda, [] is a way of calling the lambda with the passed parameter
<baweaver> Yeah, looks like a lambda
<baweaver> and since scan is returning strings, it's calling that function with the int value it found
<baweaver> because scan is looking for positive or negative digits
<baweaver> As to why they don't use block syntax on it
<baweaver> def operand(&mod_fn) would be clearer
<baweaver> then it could be called on 40 using `operand { |o| o.send... }`
<dumptruckman> yeah, it seemed like messy code to me
<dumptruckman> and i barely have a grasp on ruby
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
<dumptruckman> so the square brackets on modify is just a way to pass in parameters?
<dumptruckman> that was what i was guessing it was
<dumptruckman> but what is send doing?
<dumptruckman> i think maybe i understand it on line 40
<dumptruckman> but not on line 39
Sainfuw has joined #ruby
AJA4351 has joined #ruby
<SeepingN> the index at "o"
<SeepingN> after forcing o into an integer
<apeiros> dumptruckman: Proc#[] is an alias to Proc#call, so: `callable = ->(arg) { … }; callable["arg1"]` is the same as `callable = ->(arg) { … }; callable.call("arg1")`
AJA4350 has quit [Ping timeout: 256 seconds]
AJA4351 is now known as AJA4350
<apeiros> meh, why do I even write. already 3 people helping. lol, don't mind me :D
lxsameer has joined #ruby
shenghi has quit [Ping timeout: 264 seconds]
shenghi has joined #ruby
\void has joined #ruby
<dumptruckman> wait what
<dumptruckman> ok, what about this part? %w[to_i ord][arg]
<dumptruckman> on line 39
lxsameer has quit [Ping timeout: 256 seconds]
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 256 seconds]
AJA4351 is now known as AJA4350
<dumptruckman> OH, nm, i understand that line now
<dumptruckman> it sends the results of getc to both to_i and ord and then picks one based on arg
<dumptruckman> picks the one at index arg
<dumptruckman> in the resulting array
conta1 has quit [Quit: conta1]
alem0lars has joined #ruby
lxsameer has joined #ruby
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
lxsameer has quit [Ping timeout: 260 seconds]
duane has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
mikecmpbll has joined #ruby
redlegion has quit [Max SendQ exceeded]
ivanskie has joined #ruby
AJA4350 has quit [Ping timeout: 265 seconds]
scrptktty has joined #ruby
redlegion has joined #ruby
za1b1tsu has joined #ruby
unreal has quit [Remote host closed the connection]
rodd has joined #ruby
za1b1tsu has quit [Ping timeout: 256 seconds]
eckhardt has quit [Quit: Textual IRC Client: www.textualapp.com]
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
KeyJoo has quit [Quit: KeyJoo]
AJA4350 has joined #ruby
<cjohnson> baweaver: I summon thee
<cjohnson> For your mighty ruby powers
duane has left #ruby [#ruby]
lxsameer has joined #ruby
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
lxsameer has quit [Ping timeout: 260 seconds]
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 240 seconds]
AJA4351 is now known as AJA4350
lxsameer has joined #ruby
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
<cjohnson> BAWEAVER
lxsameer has quit [Ping timeout: 268 seconds]
laekur has joined #ruby
laekur has quit [Client Quit]
Mike11 has quit [Quit: Leaving.]
d10n-work has quit [Quit: Connection closed for inactivity]
<baweaver> WHO DARES SUMMO... ohai cjohnson
<cjohnson> lol
<cjohnson> Ok so here's my problem. Ruby 2.2, rails 4.2. I'm dealing with an ActiveRecord jsonb column
unreal has joined #ruby
timeshifter has joined #ruby
<cjohnson> In my version of rails there is some bad behavior that will only encode the value if it's an array or hash: https://github.com/rails/rails/blob/v4.2.7.1/activerecord/lib/active_record/connection_adapters/postgresql/oid/json.rb#L20-L26
tty has quit [Quit: tty]
<cjohnson> I want to override this internal AR method, but only in the context of one model, not for the whole app. So I think the answer is to use refinements
<timeshifter> if i have a bunch of config values set via configatron.colors.red='#ff0000', is there a way i can get that value given a string "red"?
<cjohnson> baweaver: Here's my refinement: https://gist.github.com/chrisjohnson/d21636d2ea339e0875170a642b7feb78 and I am `using Rails4JsonFix` in my model
<cjohnson> baweaver: I can see that the top-level binding.pry is being hit when this refinement is included, but neither of my overridden methods is being called
<cjohnson> Any ideas why? I don't believe they are being called via indirection through `send` or similar
tty has joined #ruby
psychicist__ has quit [Ping timeout: 260 seconds]
<baweaver> timeshifter: config.colors.public_send(name)
* baweaver starts reading
nickjj_ is now known as nickjj
<baweaver> Admittedly never worked with refinements
<cjohnson> damn
<baweaver> Will give it a shot though, reading.
<baweaver> How are you including it?
<baweaver> include or extend?
<timeshifter> baweaver: doesn't seem to be returning anything
<cjohnson> That gist is in lib/rails4_json_fix.rb and I am `using Rails4JsonFix` @ baweaver
<cjohnson> Which seems to be the way to mix refinements in
<baweaver> Tracepoint may be a good way to catch it - https://ruby-doc.org/core-2.2.2/TracePoint.html
<baweaver> I'd bet that somehow that refinement isn't being included properly
<baweaver> The code gets evaluated but it sees them in a different resolution space
<baweaver> How are you including it? (code wise)
<baweaver> Throw that file up on the gist
<cjohnson> rails magically loads it from lib/rails4_json_fix.rb
<cjohnson> Oh sure
<baweaver> huh, wonder how that works
<baweaver> what tutorial were you following?
<baweaver> (also may peel off here in a few, giving a talk in a few hours and need to do some finishing)
<cjohnson> We may have an initializer ethat autoloads all files in lib/*
<baweaver> Gotcha.
<cjohnson> It's definitely being loaded since the binding.pry at the top works
<cjohnson> Updated with my model that's using it
<baweaver> It's loaded, sure, but how does it know where to put the JSON fix?
<baweaver> aha
<baweaver> That's a really good post - http://interblah.net/why-is-nobody-using-refinements
<baweaver> Doing some reading to see how these work
<baweaver> If you put pry in at an application level you might check how and where the method is defined
<baweaver> It respects resolution chain so it'll tell you where it thinks it is
ivanskie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mensvaga has quit [Remote host closed the connection]
<cjohnson> the method I'm overriding? or my refinement method?
<cjohnson> Not quite sure what you mean
Dbugger has quit [Ping timeout: 260 seconds]
<baweaver> technically both
ivanskie has joined #ruby
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
<baweaver> Though I wonder how deep refinements would work.
<baweaver> I mean it gets loaded, sure, but whether or not Rails will respect that dependency chain I'm not sure.
<cjohnson> Well let me ask you this then, maybe refinements aren't the way, do you have another idea how to monkeypatch this method but only in certain contexts?
<baweaver> honestly no.
<cjohnson> Damn you rails
<baweaver> I'd be curious if fryguy or matthewd are around
<baweaver> they might know
ogres has joined #ruby
<cjohnson> I tried just globally replacing this method but other models in my app depend on the bad behavior haha
<baweaver> eesh
<cjohnson> (which has been fixed in rails 5 so we are gonna have a tough time upgrading)
<baweaver> yeah, those are no fun
<cjohnson> Ok well maybe then my answer is that I need to make a concern that makes getters/setters for these columns which first json-encode any non-hash non-array value
<cjohnson> LOL exactly
<baweaver> Would serializers work?
<cjohnson> I tried that too
<cjohnson> This method still gets called I think
<cjohnson> Although frankly I found out later that the validator gem I included was also overriding my setter method so I wonder if maybe it was that all along
<cjohnson> I'll try digging the serializer back out
<cjohnson> So far I've got about 30 commits of "WTFFFFF"
alfiemax has quit [Ping timeout: 240 seconds]
<baweaver> only 30?
alice2296 has joined #ruby
alice2296 has quit [Client Quit]
alfiemax has joined #ruby
alice2296 has joined #ruby
<cjohnson> lol
alice2296 has left #ruby [#ruby]
<cjohnson> I had a concern, then a serializer, then a different concern, then I wrote an initializer that just globally overwrote the class with my own hacked version to find that the rest of the app broke
alice2296 has joined #ruby
<cjohnson> Then I start down the path of a concern that wraps all scalar values in a hash like {s: "the-real-value"]
<cjohnson> And unwraps them on read
<cjohnson> But then the json-schema validator breaks because I'm validating against a hash but the getter gets a string
<cjohnson> Then the refinement
Sainfuw has quit [Ping timeout: 240 seconds]
<cjohnson> Gonna try a concern that double-encodes
darkhanb has quit [Ping timeout: 240 seconds]
ivanskie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lxsameer has joined #ruby
ivanskie has joined #ruby
wilbert has quit [Ping timeout: 264 seconds]
Sainfuw has joined #ruby
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
rippa has quit [Ping timeout: 260 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lxsameer has quit [Ping timeout: 268 seconds]
alice2296 has left #ruby [#ruby]
agent_white has joined #ruby
apeiros has quit [Remote host closed the connection]
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
timeshifter has left #ruby [#ruby]
bmurt has joined #ruby
eckhardt has joined #ruby
jcalla has quit [Quit: Leaving]
dstrunk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dstrunk has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
lytol_ has quit [Remote host closed the connection]
crankhar1er has quit [Ping timeout: 264 seconds]
apeiros has joined #ruby
dstrunk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
stewp has joined #ruby
apeiros has quit [Ping timeout: 264 seconds]
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
negatifze has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
biberu has quit []
dstrunk has joined #ruby
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
Azure has quit [Read error: Connection reset by peer]
Azure has joined #ruby
ur5us has joined #ruby
crankhar1er has joined #ruby
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
siery has joined #ruby
<siery> Hei! I need a little help with one loop I use to read data from 2D map, I use two characters notation, the first for the tile and second for the item.
<siery> To read the first character from the line I read from file I do something like this:
<siery> line.each_char.lazy.each_slice(2).map(&:first).with_index do |char, x|
<siery> How can I modify this to read each second element counting from the second character?
snickers has joined #ruby
crankhar1er has quit [Ping timeout: 260 seconds]
dr3w_ has joined #ruby
bak1an has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<siery> ah.. I guess I change first for second ^_^. Thanks, that was stupid indeed
eckhardt has quit [Quit: Textual IRC Client: www.textualapp.com]
bak1an has joined #ruby
bak1an has quit [Client Quit]
apeiros has joined #ruby
Celmor has left #ruby [#ruby]
<siery> well, it does not work
beowuff has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
apeiros has quit [Ping timeout: 248 seconds]
Mrgoose has quit [Quit: ZNC 1.7.x-nightly-20170908-e86efb08 - https://znc.in]
crankhar1er has joined #ruby
<konsolebox> siery: it's a little hard to understand what you want to do
<konsolebox> "each second element counting from the second character"?
sagax has quit [Ping timeout: 264 seconds]
<SeepingN> abcdef b d f
crankhar1er has quit [Ping timeout: 240 seconds]
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
<SeepingN> basicallhy line.each_char.lazy.each_slice(2).map(&:second).with_index
<SeepingN> oops you said that. but second is probably not recognized... maybe in Rails, but probably not even there in this context
<SeepingN> if it's only 2 long, just try "last"
\void has quit [Ping timeout: 256 seconds]
apeiros has joined #ruby
\void has joined #ruby
dellavg has quit [Ping timeout: 256 seconds]
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
beowuff has joined #ruby
postmodern has joined #ruby
apeiros has quit [Ping timeout: 244 seconds]
r29v has joined #ruby
r29v has quit [Client Quit]
krawchyk has quit [Quit: krawchyk]
venmx has joined #ruby
rafadc has quit [Quit: ZNC 1.7.0 - https://znc.in]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
beowuff has quit [Remote host closed the connection]
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
apeiros has joined #ruby
venmx has quit [Ping timeout: 256 seconds]
beowuff has joined #ruby
apeiros has quit [Ping timeout: 240 seconds]
crankharder has quit [Remote host closed the connection]
<siery> SeepingN: Exacly thats what I mean. Now It runs with no error. Gonna write some tests and see how it works.
jasmith has joined #ruby
<cjohnson> baweaver: I fixed it by writing a serializer that basically supplements the bad behavior in the Json adapter
<cjohnson> baweaver: The Json adapter only serializes hashs and arrays, so my serializer will serialize all other types. it has no impact upon reading since rails can read values from the database just fine
g- has quit [Quit: WeeChat 1.6]
peteretep has quit []
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
reber has quit [Remote host closed the connection]
xenops has joined #ruby
apeiros has joined #ruby
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
NightMonkey has quit [Quit: ZNC - http://znc.in]
apeiros has quit [Ping timeout: 256 seconds]
NightMonkey has joined #ruby
ogres has quit [Quit: Connection closed for inactivity]
codymj has joined #ruby
kapil___ has quit [Quit: Connection closed for inactivity]
sameerynho has quit [Ping timeout: 256 seconds]
apeiros has joined #ruby
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
dstrunk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
snickers has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
apeiros has quit [Ping timeout: 240 seconds]
mikecmpbll has quit [Quit: inabit. zz.]
konsolebox has quit [Ping timeout: 256 seconds]
siery has quit [Ping timeout: 260 seconds]
AJA4350 has quit [Read error: Connection reset by peer]
venmx has joined #ruby