baweaver changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.5.0, 2.4.3, 2.3.6: https://www.ruby-lang.org || Paste >3 lines of text to: https://gist.github.com || Rails questions? Ask in: #RubyOnRails || Logs: https://irclog.whitequark.org/ruby || Books: https://goo.gl/wpGhoQ
lele has quit [Ping timeout: 256 seconds]
lele has joined #ruby
sanscoeur has quit [Ping timeout: 260 seconds]
guacamole has quit [Quit: Textual IRC Client: www.textualapp.com]
mikecmpbll has quit [Quit: inabit. zz.]
deafscribe has quit [Quit: Leaving]
dbugger has quit [Quit: Leaving]
zalipuha[m] has quit [Ping timeout: 255 seconds]
itmerc[m] has quit [Ping timeout: 255 seconds]
dizzy1or5[m] has quit [Ping timeout: 255 seconds]
erciccione_[m] has quit [Ping timeout: 255 seconds]
aviraldg has quit [Ping timeout: 255 seconds]
jonjits[m]1 has quit [Ping timeout: 255 seconds]
Hanma[m] has quit [Ping timeout: 276 seconds]
turt2live has quit [Ping timeout: 255 seconds]
torarne has quit [Ping timeout: 255 seconds]
haylon has quit [Ping timeout: 240 seconds]
Matt[m]1 has quit [Ping timeout: 252 seconds]
KevinMGranger has quit [Ping timeout: 256 seconds]
velu_aon[m] has quit [Ping timeout: 256 seconds]
redlegion[m] has quit [Ping timeout: 256 seconds]
Giphy[m] has quit [Ping timeout: 252 seconds]
dman[m] has quit [Ping timeout: 255 seconds]
gokul_mr[m] has quit [Ping timeout: 276 seconds]
Tagami[m] has quit [Ping timeout: 276 seconds]
chouhoulis has joined #ruby
BH23 has quit [Ping timeout: 260 seconds]
BH23 has joined #ruby
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fmccann has joined #ruby
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
ledestin has joined #ruby
marxarelli|afk is now known as marxarelli
n0m4d1c has joined #ruby
sylario has quit [Quit: Connection closed for inactivity]
cschneid has quit [Remote host closed the connection]
snath has joined #ruby
Vapez has quit [Remote host closed the connection]
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
lele has quit [Ping timeout: 256 seconds]
lele has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chouhoulis has quit [Ping timeout: 240 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lele has quit [Ping timeout: 256 seconds]
bmurt has joined #ruby
coops has joined #ruby
lele has joined #ruby
alfiemax has joined #ruby
roshanavand has quit [Ping timeout: 240 seconds]
erciccione_[m] has joined #ruby
cschneid has joined #ruby
alfiemax has quit [Ping timeout: 240 seconds]
n0m4d1c has quit [Read error: Connection reset by peer]
n0m4d1c has joined #ruby
kapil___ has joined #ruby
cdg_ has quit [Remote host closed the connection]
cdg has joined #ruby
cschneid has quit [Ping timeout: 255 seconds]
vichib has joined #ruby
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bigblind has quit [Read error: Connection reset by peer]
n0m4d1c has quit [Ping timeout: 255 seconds]
pastorinni has quit [Remote host closed the connection]
John_Ivan has quit [Read error: Connection reset by peer]
<Radar> What's the technical name for things like %i, %W, %r?
<Radar> It's _not_ sigils
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood> Radar: general delimited syntax
<havenwood> or general delimited input
bigblind has joined #ruby
Giphy[m] has joined #ruby
turt2live has joined #ruby
jonjits[m] has joined #ruby
Tagami[m] has joined #ruby
redlegion[m] has joined #ruby
Hanma[m] has joined #ruby
KevinMGranger has joined #ruby
torarne has joined #ruby
velu_aon[m] has joined #ruby
haylon has joined #ruby
aviraldg has joined #ruby
<havenwood> I don't hear anyone call it that though.
zalipuha[m] has joined #ruby
itmerc[m] has joined #ruby
dizzy1or5[m] has joined #ruby
gokul_mr[m] has joined #ruby
Matt[m]1 has joined #ruby
infinitone_ has quit [Quit: Connection closed for inactivity]
lele has quit [Ping timeout: 255 seconds]
vutral|kali has quit [Ping timeout: 240 seconds]
lele has joined #ruby
<coops> The Ruby documentation calls them "percent strings" confusingly
<coops> although I guess that is what they are in a literal sense when reading the code
<coops> I'd probably go with percent literals or percent literal shorthand if I were writing a book on 'em or something.
mikecmpbll has joined #ruby
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
vutral|kali has joined #ruby
veduardo has joined #ruby
lele has quit [Ping timeout: 256 seconds]
lele has joined #ruby
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
drona6 has quit []
gnufied has quit [Ping timeout: 252 seconds]
lele has quit [Ping timeout: 256 seconds]
mtkd has quit [Ping timeout: 240 seconds]
cagomez has joined #ruby
milardovich has quit [Remote host closed the connection]
mtkd has joined #ruby
milardovich has joined #ruby
lele has joined #ruby
apparition has joined #ruby
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
milardovich has quit [Remote host closed the connection]
apparition has quit [Client Quit]
marr has quit [Ping timeout: 268 seconds]
milardovich has joined #ruby
guacamole has quit [Client Quit]
milardovich has quit [Remote host closed the connection]
orbyt_ has joined #ruby
nowhereman_ has joined #ruby
workmad3 has joined #ruby
t0m has joined #ruby
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
nowhere_man has quit [Ping timeout: 264 seconds]
workmad3 has quit [Ping timeout: 256 seconds]
guacamole has quit [Client Quit]
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ramfjord has quit [Ping timeout: 260 seconds]
Barrt has quit [Ping timeout: 260 seconds]
lele has quit [Ping timeout: 265 seconds]
arescorpio has joined #ruby
Barrt has joined #ruby
goatish has quit [Quit: Hibernating]
lele has joined #ruby
t0m has quit [Quit: leaving]
quobo has quit [Quit: Connection closed for inactivity]
cadillac_ has quit [Read error: Connection reset by peer]
alfiemax has joined #ruby
milardovich has joined #ruby
cschneid has joined #ruby
alfiemax has quit [Ping timeout: 256 seconds]
lele has quit [Ping timeout: 256 seconds]
lele has joined #ruby
cadillac_ has joined #ruby
notnebd has joined #ruby
lele has quit [Ping timeout: 256 seconds]
Killerkiwi has joined #ruby
veduardo has quit [Ping timeout: 255 seconds]
mikecmpbll has quit [Quit: inabit. zz.]
jason_ has joined #ruby
<jason_> class Test
<jason_> @text = "Hello World"
<jason_> puts a.text # how does this work?
<jason_> a = Test.new
<jason_> end
<havenwood> jason_: NoMethodError: undefined method `text' for #<Test:...>
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood> jason_: That wouldn't work, since instance variables are internal only unless you expose an external interface for them via a method.
<jason_> only methods are external ?
<baweaver> Also you should probably use gist
<baweaver> ?gist
<ruby[bot]> https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
lele has joined #ruby
pastorinni has joined #ruby
<havenwood> jason_: This is an example of exposing an instance variable with a method (using attr shorthand): https://gist.github.com/havenwood/334c36172db000fe0ed0f99f4f9a037a
<havenwood> jason_: Show us a gist of what you have if you're having trouble getting your code working.
<jason_> https://gist.github.com/Killerkiwi2005/6d7fc533068796f7edcd70240f44071b .. thats a lot of boiler plate for a property
marxarelli is now known as marxarelli|afk
Barrt has quit [Read error: Connection reset by peer]
lele has quit [Ping timeout: 256 seconds]
<baweaver> You should see other languages
<jason_> well c# is public string FirstName { get; set; } = "Jane";
<jason_> pyhon is pretty simple
orbyt_ has joined #ruby
<jason_> nm thanks for the help
jameser has joined #ruby
jameser has quit [Read error: Connection reset by peer]
jameser has joined #ruby
shinnya has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shinnya has quit [Ping timeout: 276 seconds]
Giphy[m] has quit [Ping timeout: 240 seconds]
dizzy1or5[m] has quit [Ping timeout: 255 seconds]
Matt[m]1 has quit [Ping timeout: 248 seconds]
Hanma[m] has quit [Ping timeout: 248 seconds]
torarne has quit [Ping timeout: 255 seconds]
itmerc[m] has quit [Ping timeout: 256 seconds]
gokul_mr[m] has quit [Ping timeout: 277 seconds]
zalipuha[m] has quit [Ping timeout: 260 seconds]
jonjits[m] has quit [Ping timeout: 277 seconds]
haylon has quit [Ping timeout: 256 seconds]
turt2live has quit [Ping timeout: 256 seconds]
velu_aon[m] has quit [Ping timeout: 240 seconds]
erciccione_[m] has quit [Ping timeout: 255 seconds]
redlegion[m] has quit [Ping timeout: 248 seconds]
Tagami[m] has quit [Ping timeout: 248 seconds]
KevinMGranger has quit [Ping timeout: 276 seconds]
aviraldg has quit [Ping timeout: 276 seconds]
m27frogy has quit [Ping timeout: 260 seconds]
erikm has quit [Quit: terminated!]
vichib has quit [Remote host closed the connection]
jameser has quit [Max SendQ exceeded]
cadillac_ has quit [Quit: I quit]
jameser has joined #ruby
cadillac_ has joined #ruby
m27frogy has joined #ruby
cagomez has quit []
pastorinni has quit [Remote host closed the connection]
Mrgoose2 has quit [Quit: ZNC 1.7.x-nightly-20170908-e86efb08 - https://znc.in]
alfiemax has joined #ruby
brendan- has quit [Quit: Textual IRC Client: www.textualapp.com]
Mrgoose2 has joined #ruby
xcesariox has joined #ruby
alfiemax_ has joined #ruby
alfiemax has quit [Read error: Connection reset by peer]
justinfaler has joined #ruby
justinfaler has quit [Client Quit]
justinfaler has joined #ruby
za1b1tsu has joined #ruby
Fezzler has joined #ruby
Fezzler has quit [Client Quit]
codinghabit has joined #ruby
dviola has joined #ruby
mtkd has quit [Ping timeout: 256 seconds]
zautomata1 has joined #ruby
mtkd has joined #ruby
cdg has quit [Remote host closed the connection]
zautomata has quit [Ping timeout: 248 seconds]
arescorpio has quit [Quit: Leaving.]
dviola has quit [Quit: WeeChat 2.0.1]
d^sh has quit [Ping timeout: 240 seconds]
milardovich has quit [Remote host closed the connection]
d^sh has joined #ruby
kapil___ has quit [Quit: Connection closed for inactivity]
darkhanb has joined #ruby
pastorinni has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
xcesariox has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alfiemax_ has quit [Remote host closed the connection]
<Radar> Thanks havenwood :) I will go with "literals"
ahrs has quit [Remote host closed the connection]
ahrs has joined #ruby
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
milardovich has joined #ruby
milardovich has quit [Ping timeout: 255 seconds]
pastorinni has quit [Ping timeout: 256 seconds]
drewmcmillan has joined #ruby
AJA4350 has quit [Quit: AJA4350]
gix has joined #ruby
howdoi has joined #ruby
gix- has quit [Ping timeout: 240 seconds]
alfiemax_ has joined #ruby
dgoodlad has joined #ruby
trautwein has quit [Quit: ZNC 1.6.5 - http://znc.in]
trautwein has joined #ruby
fcser has quit [Quit: fcser]
xcesariox has joined #ruby
dgoodlad has quit [Quit: leaving]
codinghabit has quit [Ping timeout: 260 seconds]
xcesariox has quit [Ping timeout: 260 seconds]
xcesariox has joined #ruby
claw has quit [Ping timeout: 265 seconds]
claw has joined #ruby
xcesariox has quit [Ping timeout: 260 seconds]
nadir has quit [Quit: Connection closed for inactivity]
cschneid has quit [Remote host closed the connection]
_aeris_ has quit [Ping timeout: 255 seconds]
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xcesariox has joined #ruby
_aeris_ has joined #ruby
d5sx43 has joined #ruby
coops has quit [Quit: Connection closed for inactivity]
Nilium has quit [Quit: <kristin> Cower is like... I dunno. sometimes he seems senile and other times he seems like a middle schooler.]
pastorinni has joined #ruby
Nilium has joined #ruby
d5sx43 has quit [Client Quit]
d5sx43 has joined #ruby
d5sx43 has quit [Client Quit]
d5sx43 has joined #ruby
anisha has joined #ruby
d5sx43 has quit [Quit: Leaving...]
Tempesta_ is now known as Tempesta
Tempesta has quit [Changing host]
Tempesta has joined #ruby
Hanma[m] has joined #ruby
jaruga has joined #ruby
xcesariox has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kapil___ has joined #ruby
workmad3 has joined #ruby
elphe has joined #ruby
wilbert has joined #ruby
milardovich has joined #ruby
oleo has quit [Quit: Leaving]
workmad3 has quit [Ping timeout: 255 seconds]
dangeranger has quit [Quit: Textual IRC Client: www.textualapp.com]
pastorinni has quit [Remote host closed the connection]
xcesariox has joined #ruby
milardovich has quit [Ping timeout: 252 seconds]
wilbert has quit [Quit: wilbert]
itmerc[m] has joined #ruby
jaruga has quit [Quit: jaruga]
redlegion[m] has joined #ruby
jonjits[m] has joined #ruby
torarne has joined #ruby
npgm has quit [Quit: Connection closed for inactivity]
Dimik has joined #ruby
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Tagami[m] has joined #ruby
troys has quit [Quit: Bye]
pastorinni has joined #ruby
erciccione_[m] has joined #ruby
Matt[m]1 has joined #ruby
ptx0 has quit [Remote host closed the connection]
KevinMGranger has joined #ruby
aviraldg has joined #ruby
turt2live has joined #ruby
dizzy1or5[m] has joined #ruby
ptx0 has joined #ruby
velu_aon[m] has joined #ruby
marmorkreb has joined #ruby
zalipuha[m] has joined #ruby
haylon has joined #ruby
gokul_mr[m] has joined #ruby
nadir has joined #ruby
Giphy[m] has joined #ruby
hahuang65 has joined #ruby
elphe has quit [Ping timeout: 255 seconds]
hahuang65 has quit [Ping timeout: 252 seconds]
plexigras has quit [Ping timeout: 265 seconds]
n13z has quit [Ping timeout: 252 seconds]
pastorinni has quit [Remote host closed the connection]
LocaMocha has joined #ruby
ptx0 has quit [Remote host closed the connection]
hahuang65 has joined #ruby
Ishido has joined #ruby
alex`` has joined #ruby
schneide_ has joined #ruby
milardovich has joined #ruby
hahuang65 has quit [Ping timeout: 248 seconds]
alfiemax_ has quit [Remote host closed the connection]
schneide_ has quit [Ping timeout: 256 seconds]
xcesariox has quit [Ping timeout: 252 seconds]
elphe has joined #ruby
tvw has joined #ruby
xcesariox has joined #ruby
ptx0 has joined #ruby
alfiemax has joined #ruby
milardovich has quit [Ping timeout: 256 seconds]
dn` has quit [Quit: dn`]
JoshS has joined #ruby
alfiemax has quit [Remote host closed the connection]
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
hahuang65 has joined #ruby
apeiros has quit [Ping timeout: 276 seconds]
hahuang65 has quit [Ping timeout: 248 seconds]
hahuang65 has joined #ruby
hahuang65 has quit [Ping timeout: 265 seconds]
xcesariox has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
andikr has joined #ruby
xcesariox has joined #ruby
aufi has joined #ruby
dionysus69 has joined #ruby
hahuang65 has joined #ruby
xcesariox has quit [Ping timeout: 256 seconds]
hahuang65 has quit [Ping timeout: 276 seconds]
sb__ has joined #ruby
conta has joined #ruby
hahuang65 has joined #ruby
bousquet has joined #ruby
amatas has joined #ruby
Lyubo1 has quit [Quit: and I'm out]
hahuang65 has quit [Ping timeout: 248 seconds]
bousquet has quit [Client Quit]
ta_ has quit [Remote host closed the connection]
ta_ has joined #ruby
Lyubo1 has joined #ruby
kapil___ has quit [Quit: Connection closed for inactivity]
DoubleMalt has joined #ruby
ta_ has quit [Ping timeout: 264 seconds]
lele has joined #ruby
apeiros has joined #ruby
schneide_ has joined #ruby
hahuang65 has joined #ruby
schneide_ has quit [Remote host closed the connection]
TomyWork has joined #ruby
hahuang65 has quit [Ping timeout: 248 seconds]
Dimik has quit [Ping timeout: 255 seconds]
konsolebox has quit [Ping timeout: 265 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
clemens3 has joined #ruby
konsolebox has joined #ruby
schneide_ has joined #ruby
Mortomes|Work has joined #ruby
marmorkreb has quit [Remote host closed the connection]
yohji has joined #ruby
hfp_work has joined #ruby
orbyt_ has joined #ruby
sb__ has quit [Quit: Leaving]
claudiuinberlin has joined #ruby
sundhell_away is now known as sundhell
orbyt_ has quit [Ping timeout: 255 seconds]
devil_tux has joined #ruby
ta_ has joined #ruby
milardovich has joined #ruby
hahuang65 has joined #ruby
TomyWork has quit [Quit: Leaving]
konsolebox has quit [Ping timeout: 248 seconds]
konsolebox has joined #ruby
dionysus69 has quit [Remote host closed the connection]
milardovich has quit [Ping timeout: 240 seconds]
hahuang65 has quit [Ping timeout: 240 seconds]
dionysus69 has joined #ruby
TomyWork has joined #ruby
Burgestrand has joined #ruby
rabajaj has joined #ruby
mark_66 has joined #ruby
auv has quit [Quit: Connection closed for inactivity]
yohji has quit [Ping timeout: 256 seconds]
Strepsils has joined #ruby
atchoum has quit [Ping timeout: 260 seconds]
aupadhye has joined #ruby
Strepsils has quit [Remote host closed the connection]
justinfaler has quit [Ping timeout: 252 seconds]
drewmcmillan has joined #ruby
yohji has joined #ruby
VladGh_ has joined #ruby
huyderman has quit [Ping timeout: 260 seconds]
drewmcmillan has quit [Client Quit]
RougeR has joined #ruby
VladGh has quit [Ping timeout: 264 seconds]
konsolebox has quit [Ping timeout: 248 seconds]
konsolebox has joined #ruby
tomphp has joined #ruby
Sina has joined #ruby
alfiemax has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
huyderman has joined #ruby
tomphp has joined #ruby
tomphp has quit [Client Quit]
guille-moe has joined #ruby
schneide_ has quit [Remote host closed the connection]
schneide_ has joined #ruby
konsolebox has quit [Ping timeout: 256 seconds]
justinfaler has joined #ruby
konsolebox has joined #ruby
mikecmpbll has joined #ruby
tomphp has joined #ruby
tomphp has quit [Client Quit]
kapil___ has joined #ruby
hahuang65 has joined #ruby
schneide_ has quit [Remote host closed the connection]
Serpent7776 has joined #ruby
hahuang65 has quit [Ping timeout: 256 seconds]
tomphp has joined #ruby
mtkd has quit [Ping timeout: 276 seconds]
tomphp has quit [Client Quit]
mtkd has joined #ruby
jaruga has joined #ruby
elphe has quit [Ping timeout: 265 seconds]
Azure has quit [Read error: Connection reset by peer]
Azure|dc has joined #ruby
alfiemax_ has joined #ruby
alfiemax has quit [Ping timeout: 240 seconds]
workmad3 has joined #ruby
workmad3 has quit [Ping timeout: 252 seconds]
drewmcmillan has joined #ruby
Beams has joined #ruby
elphe has joined #ruby
ikaji_xu has joined #ruby
tomphp has joined #ruby
mikecmpbll has quit [Read error: Connection reset by peer]
mikecmpb_ has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
schneide_ has joined #ruby
jameser has quit [Ping timeout: 240 seconds]
minimalism has quit [Quit: minimalism]
elphe has quit [Ping timeout: 268 seconds]
alfiemax has joined #ruby
elphe has joined #ruby
raynold has quit [Quit: Connection closed for inactivity]
conta has quit [Quit: conta]
conta has joined #ruby
alfiemax_ has quit [Ping timeout: 256 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
milardovich has joined #ruby
conta has quit [Remote host closed the connection]
marr has joined #ruby
conta has joined #ruby
jokke has joined #ruby
<jokke> hey
<jokke> is it possible to do lookups on a set/hash just with the hash of a contained element?
milardovich has quit [Ping timeout: 248 seconds]
<canton7> I'd guess not, as multiple elements may have the same hash, so the set/hash needs to do equality on the element itself as well
<apeiros> jokke: no
<apeiros> plain ruby does not expose that. and as canton7 just elaborated, you could only test for the bucket to exist, not the element.
<jokke> ah i see
<dminuoso> jokke: set/hash basically do exactly that already. They are just abstractions around a hash table.
<jokke> i'm trying to figure out how to implement an array, which dedups the elements. i need to be able to access the elements by index so set is not an option because << with an existing element does nothing
<apeiros> jokke: what do you mean by dedup? it only contains the element once, or only references it once?
<jokke> references it once
<jokke> well that's not a problem
<apeiros> I think that's pointless then
<jokke> references arent' big
<jokke> :)
<jokke> the data is
<apeiros> yes. and arrays already only hold references.
<apeiros> or did you think ruby copies objects when you add them to an array?
<jokke> so um
<apeiros> x = large_obj; [x,x,x,x] # only contains 4 references to the same object
<jokke> no you're absolutely right
<jokke> of course
* dminuoso smells the topic of missing referential transparency coming up
<apeiros> jokke: unless you try to do something like:
<apeiros> x = large_obj; [x.dup, x.dup, x.dup, x.dup]
<dminuoso> And it just happened.
<apeiros> then "deduplicating" might make sense. but IMO dangerous unless your deduped objects are frozen/immutable
<dminuoso> apeiros: And even then they are different from another.
<dminuoso> By being able to observe the internal id, you can tell them apart still.
<dminuoso> So you could trivially construct a program whose semantics change if you dedup such an array.
<apeiros> it becomes a domain specific question
<apeiros> and yes, that
<jokke> alright, so lets say i have a data structure that implement #hash, how would i keep track of all existing elements and if i were to create an equal element, how would i get the reference of the element i created before
<dminuoso> jokke: Are we talking in C or in Ruby?
<jokke> ruby
tjbp has quit [Ping timeout: 265 seconds]
<apeiros> jokke: you might be interested into WeakRef/WeakHash
hahuang65 has joined #ruby
<dminuoso> jokke: You just override #== to have some domain specific value identity and use a Hash?
tjbp has joined #ruby
<dminuoso> That way you could do some foo[bar] ||= bar
* apeiros afk for about 2h
<jokke> yeah
<jokke> that sounds about right
<dminuoso> *value equality
jameser has joined #ruby
<dminuoso> jokke: At that point you might as well use `Set` I guess
<jokke> dminuoso:no i can't
<dminuoso> Interesting, compare_by_identity is a cool thing.
<jokke> because i will need to add it to an array
elphe has quit [Ping timeout: 256 seconds]
<jokke> so something like objects = (foo[bar] ||= bar)
<jokke> äh
<jokke> objects <<
hahuang65 has quit [Ping timeout: 256 seconds]
<jokke> so i can access it by index
<dminuoso> jokke: I see what you are on about.
<dminuoso> jokke: Would you be willing to accept a small native extension?
<jokke> hehe
* apeiros repeats weakref/weakhash
<apeiros> IMO no native extension needed
jameser has quit [Client Quit]
<jokke> apeiros: i don't follow. I looked at the docs, but i don't see the connection
jameser has joined #ruby
<dminuoso> apeiros: Im not sure how they help either.
ldnunes has joined #ruby
<dminuoso> jokke: You know, Matrix covered this topic before. Right now you are noticing that there's something wrong with Ruby, but you dont know what.
<jokke> well i don't know if there's something wrong with ruby per-se
<jokke> it's easy enough to implement a DeduppedArray based on what we discussed
alfiemax has quit [Remote host closed the connection]
jameser has quit [Ping timeout: 248 seconds]
Killerkiwi has quit [Ping timeout: 260 seconds]
jason__ has joined #ruby
<apeiros> jokke/dminuoso I'll show in ~2h. gtg.
jason_ has quit [Ping timeout: 255 seconds]
<apeiros> the problem if you don't use weakref is that you potentially create godobjects (never gc'ed objects because you keep them in your dedup "registry")
cabotto has joined #ruby
apeiros has quit []
alex`` has quit [Ping timeout: 276 seconds]
alfiemax has joined #ruby
elphe has joined #ruby
schneide_ has quit [Remote host closed the connection]
anisha has quit [Quit: This computer has gone to sleep]
alfiemax has quit [Remote host closed the connection]
justinfaler has quit [Ping timeout: 248 seconds]
doublemalt_ has joined #ruby
RougeR has quit [Ping timeout: 276 seconds]
DoubleMalt has quit [Ping timeout: 264 seconds]
elphe has quit [Ping timeout: 276 seconds]
dinfuehr has quit [Ping timeout: 256 seconds]
justinfaler has joined #ruby
dinfuehr has joined #ruby
sonOfRa has quit [Remote host closed the connection]
apparition has joined #ruby
devil_tux has quit [Ping timeout: 248 seconds]
schneide_ has joined #ruby
doublemalt_ has quit [Ping timeout: 264 seconds]
<drewmcmillan> Hey :)
<drewmcmillan> Ive got `match = /e.addLabels\("([^"]*)"\)/.match(page.driver.html)`
<drewmcmillan> I cant get the inner bit, it only returns the whole match
<drewmcmillan> any ideas?
<Burgestrand> >> "This is the string"[/is (\w+)/, 1]
<ruby[bot]> Burgestrand: # => "is" (https://eval.in/951563)
<Burgestrand> Dangit!
<Burgestrand> Oh.
<Burgestrand> Derp. Haha.
<Burgestrand> >> "This is the string"[/\bis (\w+)/, 1]
<ruby[bot]> Burgestrand: # => "the" (https://eval.in/951564)
<Burgestrand> \o/
<drewmcmillan> dm btw got it
al2o3-cr has quit [Ping timeout: 240 seconds]
alfiemax has joined #ruby
RougeR has joined #ruby
RougeR has joined #ruby
RougeR has quit [Changing host]
jshjsh has joined #ruby
hahuang65 has joined #ruby
roshanavand has joined #ruby
JoshS has quit [Ping timeout: 265 seconds]
schneide_ has quit [Ping timeout: 256 seconds]
hahuang65 has quit [Ping timeout: 240 seconds]
sonOfRa has joined #ruby
mikecmpb_ has quit [Quit: inabit. zz.]
alfiemax has quit [Ping timeout: 255 seconds]
alfiemax has joined #ruby
justinfaler has quit [Ping timeout: 248 seconds]
mikecmpbll has joined #ruby
schneide_ has joined #ruby
Mia has quit [Read error: Connection reset by peer]
Mia has joined #ruby
SebastianThorn has joined #ruby
cadillac_ has quit [Ping timeout: 255 seconds]
tcopeland has quit [Quit: tcopeland]
workmad3 has joined #ruby
justinfaler has joined #ruby
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
elphe has joined #ruby
cadillac_ has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
schneid__ has joined #ruby
elphe has quit [Ping timeout: 260 seconds]
guardian has quit [Quit: Coyote finally caught me]
guardian has joined #ruby
schneide_ has quit [Ping timeout: 276 seconds]
Burgestrand has quit [Quit: Closing time!]
yohji has quit [Ping timeout: 255 seconds]
BackEndCoder has quit [Quit: https://github.com/BackEndCoder]
elphe has joined #ruby
jameser has joined #ruby
milardovich has joined #ruby
dinfuehr has quit [Ping timeout: 255 seconds]
kapil___ has quit [Quit: Connection closed for inactivity]
dinfuehr has joined #ruby
yohji has joined #ruby
milardovich has quit [Ping timeout: 240 seconds]
roshanavand has quit [Quit: Leaving.]
roshanavand has joined #ruby
roshanavand has quit [Client Quit]
guardian has quit [Quit: Coyote finally caught me]
guardian has joined #ruby
schneide_ has joined #ruby
al2o3-cr has joined #ruby
alfiemax has quit [Read error: Connection reset by peer]
justinfaler has quit [Ping timeout: 260 seconds]
alfiemax has joined #ruby
GotHyper has joined #ruby
rabajaj has quit [Remote host closed the connection]
schneid__ has quit [Ping timeout: 248 seconds]
GotHyper has quit [Client Quit]
al2o3-cr has quit [Client Quit]
gregf_ has joined #ruby
ochurlaud has joined #ruby
cdg has joined #ruby
<ochurlaud> Hi, I get this error :Bundler::GemRequireError: There was an error while trying to load the gem 'redmine_extensions'. Gem Load Error is: undefined method `require_dependency' for main:Object
guardian has quit [Quit: Coyote finally caught me]
justinfaler has joined #ruby
guardian has joined #ruby
<ochurlaud> It seems that the problem is related to the require_dependency that is not defined. I found that it's brought by active_support, which is available
John_Ivan has joined #ruby
John_Ivan has joined #ruby
John_Ivan has quit [Changing host]
jottr has joined #ruby
cdg has quit [Ping timeout: 268 seconds]
konsolebox has quit [Ping timeout: 240 seconds]
hahuang65 has joined #ruby
konsolebox has joined #ruby
brendan- has joined #ruby
goatish has joined #ruby
nadir has joined #ruby
hahuang65 has quit [Ping timeout: 268 seconds]
alfiemax_ has joined #ruby
alfiemax has quit [Ping timeout: 255 seconds]
apeiros_ has joined #ruby
konsolebox has quit [Ping timeout: 268 seconds]
Burgestrand has joined #ruby
alex`` has joined #ruby
konsolebox has joined #ruby
govg has quit [Ping timeout: 260 seconds]
stormpack has joined #ruby
John_Ivan has quit [Read error: Connection reset by peer]
justinfaler has quit [Ping timeout: 255 seconds]
howdoi has quit [Quit: Connection closed for inactivity]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
Guest16002 has joined #ruby
<Guest16002> hello
Guest16002 has quit [Client Quit]
apeiros_ is now known as apeiros
banisterfiend has joined #ruby
<apeiros> jokke: solved your problem?
<dminuoso> apeiros: Even if not, Im curious about your proposed solution.
<dminuoso> Or rather.. even if so!
<apeiros> dminuoso: mainly a weakref registry to run the deduplication over. you'd pass in whatever object you want deduped, it looks it up in its weakhash and returns the deduped if available.
<apeiros> through weakref you avoid your registry "uplifting" those objects to god-objects
bmurt has quit [Ping timeout: 240 seconds]
<dminuoso> I see what you mean
<dminuoso> apeiros: And what if those objects go poof?
<dminuoso> How does a WeakRef behave if the object was claimed by the GC?
<apeiros> then they get gc'ed and your weakhash won't return them
<apeiros> weakref_alive?
<dminuoso> Ah
justinfaler has joined #ruby
<apeiros> so the bit of logic you need to implement is: compact your hash, test whether weakref is alive upon returning, store new object if no entry is there or entry is dead
<apeiros> (not necessarily in that order :D)
<dminuoso> Or you know.. pick a language with intrinsic immutability.. then you dont need to act as if two kind of equal objects are equal :D
<apeiros> I think I'd implement compacting on write accesses
<apeiros> those languages don't necessarily guarantee deduplication either, though
<dminuoso> No but they can do it transparently behind the scenes and be correct.
<dminuoso> apeiros: And for general interactions its not uncommon to represent lists as RB trees for example under the hood.
<dminuoso> (It's kind of necessary to make mutation of a single element in a large array not backfire)
<apeiros> o0
<apeiros> so they alter basic assumptions of runtimes?
<dminuoso> apeiros: what assumptions would that be?
<apeiros> I mean I expect array push/pop to be O(1), inserting in the middle to be O(n). both don't hold if it's really an RB tree
<apeiros> (iirc both would be logn)
damonf has joined #ruby
<dminuoso> apeiros: Right. It's O(log n) for mutation and access, and O(1) for appending and removing.
<dminuoso> apeiros: Though you usually pick relatively broad trees, making it log32 n for example.
<apeiros> huh? do I misremember? rbtrees are logn for add/remove, no?
shinnya has joined #ruby
<dminuoso> apeiros: only worst case.
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dminuoso> apeiros: also its not about mutating the actual tree.
<dminuoso> apeiros: the main idea comes from structural sharing.
<apeiros> "only worst case" isn't exactly how O notation works
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<apeiros> also in log32(x) the base is a factor ;-) (log(a)/log(b) = logb(a))
<apeiros> i.e. eliminated in O notation
<dminuoso> I know.
cabotto has quit [Remote host closed the connection]
<dminuoso> apeiros: In the end it's O(1) for appending or removing from the end because of structural sharing.
<dminuoso> You dont actually mutate the tree in place. You just create a new node at the top, that shares some of the old versoin.
cabotto has joined #ruby
govg has joined #ruby
<apeiros> that makes no sense though
<apeiros> if you always append at the top, your tree becomes unbalanced
<apeiros> i.e. at some point you have to restructure your tree (my terminology may be lacking, it's been over a decade)
banisterfiend has joined #ruby
<dminuoso> apeiros: Mmm, probably not RB trees in this case then.
<apeiros> all trees. a linear structure isn't a tree anymore :D
<dminuoso> apeiros: If its not balancing then you dont.
<dminuoso> apeiros: the bottom most row is the actual "list", everything on top is just internal stuff.
<apeiros> iirc not all tree structures require to be balanced, yes. but all require some sort of structure in order to retain their properties. otherwise they become "abartig" (bastardized?)
<dminuoso> Now "appending" means you reference branches from the other tree.
cabotto has quit [Ping timeout: 248 seconds]
<dminuoso> apeiros: And the reason that appending is O(1), is because you just create a new node with two children. One pointing to the old copy, and one pointing to the new element
<dminuoso> or rather a new tree with two children. one points at the old tree, and the other points at the new element.
<dminuoso> that is constant.
<apeiros> well, even if. some operations will necessarily not hold the promises of an array's complexities.
John_Ivan has joined #ruby
John_Ivan has joined #ruby
John_Ivan has quit [Changing host]
* dminuoso sighs
<dminuoso> uninitialized constant OCIError
sonOfRa has quit [Remote host closed the connection]
sylario has joined #ruby
hahuang65 has joined #ruby
marmorkreb has joined #ruby
<dminuoso> apeiros: Do you have any idea why code reload is not triggering on my cell views anymore?
<dminuoso> Changes in ruby files are picked up, but changes to my cell slim files not.
<dminuoso> Dont even know how to debug this.
oetjenj has joined #ruby
stormpack has quit [Quit: Leaving]
Mortomes|Work has quit [Ping timeout: 260 seconds]
hahuang65 has quit [Ping timeout: 248 seconds]
tomphp has joined #ruby
alfiemax_ has quit [Read error: Connection reset by peer]
ferox has joined #ruby
marmorkreb has quit [Read error: Connection reset by peer]
sonOfRa has joined #ruby
nowhere_man has joined #ruby
<apeiros> dminuoso: rails? no idea. I try to stay away as far as possible from rails interna
<dminuoso> All I did was do this high sierra upgrade... =/
oetjenj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tomphp has joined #ruby
nowhereman_ has quit [Ping timeout: 276 seconds]
justinfaler has quit [Ping timeout: 248 seconds]
tcopeland has joined #ruby
workmad3 has joined #ruby
marmorkreb has joined #ruby
oetjenj has joined #ruby
mikhail has quit [Quit: The Lounge - https://thelounge.github.io]
justinfaler has joined #ruby
oetjenj has quit [Client Quit]
workmad3 has quit [Ping timeout: 256 seconds]
andikr has quit [Remote host closed the connection]
cschneid has joined #ruby
mark_66 has quit [Quit: Leaving.]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<mikecmpbll> ugh, this issue is twisting my melon.
<mikecmpbll> hash.key?(obj) => false
<mikecmpbll> hash.keys.first == obj => true
milardovich has joined #ruby
<mikecmpbll> how? 😖
<apeiros> == and eql? are not the same
<apeiros> >> 1.0 == 1
<ruby[bot]> apeiros: # => true (https://eval.in/951633)
<apeiros> >> 1.0.eql?(1)
<ruby[bot]> apeiros: # => false (https://eval.in/951634)
cschneid has quit [Ping timeout: 256 seconds]
jcalla has joined #ruby
<apeiros> i.e., == is "comparative equality". and 1.0 <=> 1 # => 0, therefore 1.0 == 1
<mikecmpbll> sorry, hash.keys.first.eql?(obj) => true
<mikecmpbll> it's an activerecord obj so the methods are actually the same.
<apeiros> oh
<apeiros> did you mutate your key?
<mikecmpbll> between the two debugs? no
<apeiros> what gives hash.rehash.key?(obj) ?
<apeiros> also broken #hash implementation could cause this
<apeiros> i.e. a.eql?(b) # => true, but a.hash == b.hash # => false
<mikecmpbll> let me check both them
shinnya has quit [Ping timeout: 248 seconds]
<mikecmpbll> hash.rehash.key?(obj) => true
<apeiros> that means it's been mutated
<mikecmpbll> oh hold on
<mikecmpbll> yeah, shit.
<apeiros> don't use mutable hash keys ;-)
<mikecmpbll> 😰
<mikecmpbll> no idea what's mutating it.
<apeiros> freeze it and see
<apeiros> might have to manually "deep" freeze it
<mikecmpbll> oh boy
milardovich has quit [Ping timeout: 255 seconds]
<apeiros> depending on what you do, you can also just switch your hash to use object identity
<apeiros> then eql? and hash no longer matter
<apeiros> Hash#compare_by_identity
cabotto has joined #ruby
alfiemax has joined #ruby
<jokke> apeiros: yeah i did it like this: https://p.jokke.space/xzL/
<jokke> not sure why i write dedup with double p :D
marmorkreb has quit [Ping timeout: 265 seconds]
<jokke> ignore the Vertex class
<apeiros> jokke: yepp, that means you have god-objects now.
<jokke> apeiros: yeah
<jokke> apeiros: but it's for parsing close to millions of lines of highly duplicated data
yonahw has joined #ruby
<apeiros> jokke: your eql? is broken
<apeiros> there's a reason you have to implement both, #hash *and* #eql?
<jokke> ah
<jokke> kk
cabotto has quit [Remote host closed the connection]
<jokke> i get it
cabotto has joined #ruby
<jokke> hash defines the bucket
<jokke> not equality
<apeiros> and your #hash impl is brittle
<apeiros> an obj with @a = 1, @b = 2 will produce the same hash as one with @x = 1 and @z = 2
cdg has joined #ruby
cdg has quit [Read error: Connection reset by peer]
cdg has joined #ruby
cdg has quit [Remote host closed the connection]
<mikecmpbll> <3 apeiros. thanks, would've taken me forever to get there!
<apeiros> IMO do something like: def _dedup_data; {klass: self.class.name, **instance_variables.map { |n| [n, instance_variable_get(n)] }.to_h}; end
cdg has joined #ruby
<apeiros> and then implement both hash and eql in terms of it
marmorkreb has joined #ruby
<apeiros> (_dedup_data.hash, and _dedup_data.eql?(other._dedup_data) - perfect opportunity for `protected` btw., which is rare enough :D)
<dminuoso> I dont even know what protected does.
<dminuoso> Never seen it anywhere.
<apeiros> it protects you!
<dminuoso> From myself?
<apeiros> no idea. but the name says so!
<apeiros> it means only objects of the same class can call it
jottr has quit [Ping timeout: 255 seconds]
<dminuoso> Surely I can bypass that with .send
<dminuoso> If not, I have a Fiddle waiting.
<apeiros> of course
jason_ has joined #ruby
jason__ has quit [Ping timeout: 240 seconds]
coops has joined #ruby
gnufied has joined #ruby
gnufied has quit [Remote host closed the connection]
cdg_ has joined #ruby
cabotto has quit [Remote host closed the connection]
alfiemax has quit [Remote host closed the connection]
tomphp has joined #ruby
alfiemax has joined #ruby
ochurlaud has quit [Ping timeout: 260 seconds]
apparition has quit [Quit: Bye]
cdg has quit [Ping timeout: 240 seconds]
tomphp has quit [Client Quit]
brendan- has joined #ruby
dionysus69 has quit [Ping timeout: 248 seconds]
justinfaler has quit [Ping timeout: 255 seconds]
justinfaler has joined #ruby
ferox has quit [Ping timeout: 256 seconds]
_aeris_ has quit [Ping timeout: 255 seconds]
gnufied has joined #ruby
_aeris_ has joined #ruby
tomphp has joined #ruby
cschneid has joined #ruby
jordanm has quit [Remote host closed the connection]
nowhere_man has quit [Ping timeout: 276 seconds]
doublemalt_ has joined #ruby
oetjenj has joined #ruby
hahuang65 has joined #ruby
hahuang65 has quit [Ping timeout: 260 seconds]
za1b1tsu has quit [Read error: Connection reset by peer]
za1b1tsu has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cschneid has quit [Ping timeout: 276 seconds]
oetjenj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cabotto has joined #ruby
tomphp has joined #ruby
tomphp has quit [Client Quit]
cadillac_ has quit [Ping timeout: 256 seconds]
LastWhisper____ has joined #ruby
John_Ivan has quit [Ping timeout: 260 seconds]
ta_ has quit [Remote host closed the connection]
cabotto has quit [Ping timeout: 264 seconds]
justinfaler has quit [Ping timeout: 276 seconds]
cadillac_ has joined #ruby
damonf has quit [Ping timeout: 240 seconds]
alfiemax has quit [Remote host closed the connection]
krawchyk has joined #ruby
cadillac_ has quit [Read error: Connection reset by peer]
alfiemax has joined #ruby
oetjenj has joined #ruby
justinfaler has joined #ruby
yohji has quit [Ping timeout: 265 seconds]
tomphp has joined #ruby
alfiemax has quit [Ping timeout: 265 seconds]
oetjenj has quit [Client Quit]
cschneid has joined #ruby
moei has joined #ruby
rabajaj has joined #ruby
ikaji_xu has quit [Remote host closed the connection]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
schneide_ has quit [Remote host closed the connection]
schneide_ has joined #ruby
Burgestrand has quit [Quit: Closing time!]
tomphp has joined #ruby
schneid__ has joined #ruby
schneide_ has quit [Read error: Connection reset by peer]
goatish has quit [Quit: Hibernating]
cschneid has quit [Ping timeout: 248 seconds]
yohji has joined #ruby
Rapture has joined #ruby
tomphp has quit [Client Quit]
cabotto has joined #ruby
haylon is now known as haylon_
<jokke> better?
<apeiros> partially. your memoizing of the results means it'll break when an object is mutated.
<jokke> yes
<dminuoso> Who mutates anyway.
<jokke> it won't be
<dminuoso> jokke: Is ivar sufficient? What about constants?
<jokke> can i assign constants in methods?
<jokke> also...
<jokke> FOO ||= 'bar' won't really work, will it :P
hfp_work has quit [Ping timeout: 255 seconds]
<jokke> can i somehow auto-freeze every object that's being initialized of a class that implements Dedupable
<dminuoso> jokke: Mmm, well it'd have to be about constants in each objects singleton class.
<dminuoso> Since constants reside in classes/modules.
<jokke> yeahh
<dminuoso> Kind of depends on how generally applicable you want your module to work.
<dminuoso> And I have not seen constants in an objects singleton class to be abused as instance variable yet..
damonf has joined #ruby
hahuang65 has joined #ruby
John_Ivan has joined #ruby
John_Ivan has joined #ruby
John_Ivan has quit [Changing host]
hahuang65 has quit [Ping timeout: 240 seconds]
tomphp has joined #ruby
aguestuser has quit [Ping timeout: 255 seconds]
Emmanuel_Chanel has quit [Ping timeout: 240 seconds]
deathwishdave has joined #ruby
aguestuser has joined #ruby
oleo has joined #ruby
justinfaler has quit [Ping timeout: 240 seconds]
tomphp has quit [Client Quit]
aguestuser has quit [Remote host closed the connection]
aguestuser has joined #ruby
oetjenj has joined #ruby
pastorinni has joined #ruby
jordanm has joined #ruby
marmorkreb has quit [Read error: Connection reset by peer]
marmorkreb has joined #ruby
justinfaler has joined #ruby
milardovich has joined #ruby
workmad3 has joined #ruby
rippa has joined #ruby
nowhere_man has joined #ruby
milardovich has quit [Ping timeout: 248 seconds]
jrafanie has joined #ruby
apeiros has quit []
workmad3 has quit [Ping timeout: 264 seconds]
aufi has quit [Quit: Leaving]
schneid__ has quit [Remote host closed the connection]
conta has quit [Ping timeout: 256 seconds]
cschneid has joined #ruby
schneide_ has joined #ruby
schneide_ has quit [Remote host closed the connection]
schneide_ has joined #ruby
bigblind has quit [Ping timeout: 255 seconds]
troys has joined #ruby
yohji has quit [Ping timeout: 240 seconds]
AJA4350 has joined #ruby
schneide_ has quit [Ping timeout: 255 seconds]
krawchyk has quit [Quit: krawchyk]
marmorkreb has quit [Remote host closed the connection]
oetjenj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zautomata1 has quit [Quit: WeeChat 1.9.1]
Olipro has quit [Ping timeout: 252 seconds]
yohji has joined #ruby
zautomata has joined #ruby
Olipro has joined #ruby
zautomata has quit [Changing host]
zautomata has joined #ruby
damonf has quit [Remote host closed the connection]
damon has joined #ruby
krawchyk has joined #ruby
justinfaler has quit [Ping timeout: 264 seconds]
workmad3 has joined #ruby
damon is now known as damonf
justinfaler has joined #ruby
_aeris_ has quit [Remote host closed the connection]
tomphp has joined #ruby
apeiros_ has joined #ruby
alfiemax has joined #ruby
_aeris_ has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alfiemax has quit [Ping timeout: 240 seconds]
bigblind has joined #ruby
hahuang65 has joined #ruby
bigblind has quit [Ping timeout: 240 seconds]
dionysus69 has joined #ruby
hahuang65 has quit [Ping timeout: 268 seconds]
snath has quit [Ping timeout: 264 seconds]
clemens3 has quit [Ping timeout: 248 seconds]
rrutkowski has joined #ruby
jaruga_ has joined #ruby
rrutkowski has quit [Client Quit]
rrutkowski has joined #ruby
jaruga has quit [Ping timeout: 265 seconds]
doublemalt_ has quit [Ping timeout: 260 seconds]
oetjenj has joined #ruby
cdg has joined #ruby
conta has joined #ruby
justinfaler has quit [Ping timeout: 256 seconds]
cdg_ has quit [Ping timeout: 248 seconds]
cdg has quit [Ping timeout: 248 seconds]
tomeaton17 has joined #ruby
cdg has joined #ruby
<tomeaton17> I don't work with ruby, but trying to install an old codebase on new hardware. Running bundle install errors on the eventmachine install, which is required by em-http-request, but is also installed on its on in the Gemfile. When I install gem install eventmachine manually it works with version 1.2.5, but when it tries to install version 1.0.3 due to the dependcy it fails. How do I get it to install version
<tomeaton17> 1.2.5?
hfp_work has joined #ruby
cdg has quit [Remote host closed the connection]
justinfaler has joined #ruby
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
cdg has joined #ruby
cdg_ has joined #ruby
damonf has quit [Ping timeout: 256 seconds]
UKn0Me has joined #ruby
oetjenj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cdg has quit [Ping timeout: 248 seconds]
SuperLag has quit [Quit: leaving]
bigblind has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
nowhereman_ has joined #ruby
Serpent7776 has quit [Quit: Leaving]
nowhere_man has quit [Ping timeout: 256 seconds]
bigblind has quit [Ping timeout: 255 seconds]
jaruga_ has quit [Quit: jaruga_]
ur5us has quit [Ping timeout: 248 seconds]
jamesaxl has joined #ruby
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
Rebus has joined #ruby
oetjenj has joined #ruby
<Rebus> Good Eveninn. I was wondering whether it is possible to deconstruct an array of hashes while iterating it, e.g. [ { :a :b } ].each do |k,v| . Unfortunately this does not seem to work. Someone have a suggestion.
garyserj has quit []
<eam> Rebus: you want to iterate each pair?
raynold has joined #ruby
<Rebus> eam: yes. I can do that with an array of arrays but unfortunately not with an array of hashes :-/
<eam> #each_pair will iterate pairs
oetjenj has quit [Client Quit]
darkhanb has joined #ruby
Beams has quit [Quit: .]
n13z has joined #ruby
ur5us has joined #ruby
rrutkowski has quit [Ping timeout: 268 seconds]
LastWhisper____ has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
hahuang65 has joined #ruby
<Rebus> eam: this seems to work on hashes only, but i have an array of hashes over which i want to iterate
justinfaler has quit [Ping timeout: 256 seconds]
ur5us has quit [Ping timeout: 240 seconds]
aupadhye has quit [Quit: Leaving]
tvw has quit [Read error: Connection reset by peer]
milardovich has joined #ruby
<eam> Rebus: I think I'm not understanding what you want to do
hahuang65 has quit [Ping timeout: 240 seconds]
marxarelli|afk is now known as marxarelli
shinnya has joined #ruby
yohji has quit [Ping timeout: 248 seconds]
<Rebus> eam: So I can do something like this [ [a,b], [c,d] ].each { |k,v| puts "#{k} = #{v}" }. But not [ {a: b}, {c: d} ].each { |k,v| puts "#{k} = #{v}" } and I was wondering If there is a way without having to resort to a second loop
anisha has joined #ruby
doublemalt_ has joined #ruby
bigblind has joined #ruby
milardovich has quit [Ping timeout: 248 seconds]
lxsameer has quit [Ping timeout: 248 seconds]
rabajaj has quit [Ping timeout: 256 seconds]
justinfaler has joined #ruby
bigblind has quit [Ping timeout: 260 seconds]
stormpack has joined #ruby
snath has joined #ruby
tvw has joined #ruby
<zigzig> @Rebus, you could convert the hash to pairs first: [ { a: 1, b: 2}, { a: 3, b: 4} ].map(&:to_a).each { |(pair1, pair2)| ... }
milardovich has joined #ruby
ur5us has joined #ruby
ledestin has joined #ruby
hahuang65 has joined #ruby
yohji has joined #ruby
dviola has joined #ruby
ur5us has quit [Ping timeout: 268 seconds]
miskatonic has joined #ruby
<Rebus> zigzig: That did the trick. Thanks.
<Rebus> Though I had to tune it a little: [ {a: 'b'}, {c: 'd'} ].map(&:to_a).flatten(1).each { |k,v| puts "#{k} = #{v}" }
dviola has quit [Quit: WeeChat 2.0.1]
<Rebus> otherwise I get an array of arrays of arrays and that ends up in k
sanscoeur has joined #ruby
Asher has quit [Read error: Connection reset by peer]
<apeiros_> honestly, I'd just nest two each'es
milardovich has quit [Remote host closed the connection]
<apeiros_> ary.each do |hash| hash.each do |k,v| … end; end
dviola has joined #ruby
kies has quit [Ping timeout: 240 seconds]
alfiemax has joined #ruby
<Rebus> I did but then wondered why it did not work the same way as with an array of arrays - seems there is some magic hidden beneath the array class I'll have to dig up to find an answer to that
bigblind has joined #ruby
miskatonic has quit [Remote host closed the connection]
<apeiros_> {a: 'b'} does not expand to [:a, 'b'] but to [[:a, 'b']]
apeiros_ is now known as apeiros
bigblind has quit [Ping timeout: 260 seconds]
ramfjord has joined #ruby
eckhardt has joined #ruby
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
white_lilies has joined #ruby
<apeiros> though that's actually the less important reason. the more important reason is that ruby can splat arrays, and even automatically does that under certain circumstances. it doesn't splat hashes, though
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
Asher has joined #ruby
justinfaler has quit [Ping timeout: 260 seconds]
[Butch] has joined #ruby
TomyWork has quit [Ping timeout: 240 seconds]
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
clemens3 has joined #ruby
chouhoulis has joined #ruby
drewmcmillan has joined #ruby
ur5us has joined #ruby
justinfaler has joined #ruby
KeyJoo has joined #ruby
guille-moe has quit [Ping timeout: 268 seconds]
cabotto has quit []
za1b1tsu has quit [Quit: Leaving]
<Rebus> it can with ** though. I just doesn't do so automatically :-/
zigzig has quit [Remote host closed the connection]
conta has quit [Ping timeout: 276 seconds]
zigzig has joined #ruby
quobo has joined #ruby
bigblind has joined #ruby
lytol has joined #ruby
claudiuinberlin has joined #ruby
alfiemax has quit [Remote host closed the connection]
yohji has quit [Remote host closed the connection]
elphe has quit [Ping timeout: 260 seconds]
jeffreylevesque has joined #ruby
za1b1tsu has joined #ruby
TomyLobo has joined #ruby
stormpack has quit [Quit: Leaving]
lxsameer has joined #ruby
RougeR has quit [Ping timeout: 252 seconds]
dextrey has joined #ruby
kies has joined #ruby
workmad3 has joined #ruby
Papierkorb has joined #ruby
shinnya has quit [Ping timeout: 256 seconds]
vutral|kali has quit [Ping timeout: 252 seconds]
justinfaler has quit [Ping timeout: 256 seconds]
goatish has joined #ruby
hfp_work has quit [Ping timeout: 265 seconds]
jcalla has quit [Quit: Leaving]
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
vutral|kali has joined #ruby
justinfaler has joined #ruby
hfp_work has joined #ruby
Papierkorb has left #ruby ["Konversation terminated!"]
KeyJoo has quit [Read error: Connection reset by peer]
ramfjord has quit [Ping timeout: 256 seconds]
ramfjord has joined #ruby
white_lilies has quit [Ping timeout: 240 seconds]
LocaMocha has quit [Remote host closed the connection]
ramfjord has quit [Ping timeout: 256 seconds]
tomphp has joined #ruby
workmad3 has quit [Ping timeout: 255 seconds]
dionysus69 has quit [Remote host closed the connection]
fmccann has quit [Ping timeout: 263 seconds]
comet23 has quit [Quit: Connection closed for inactivity]
Cthulu201 has joined #ruby
cdg has joined #ruby
bigblind has quit [Ping timeout: 248 seconds]
ramfjord has joined #ruby
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cdg_ has quit [Ping timeout: 264 seconds]
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
cdg has quit [Ping timeout: 256 seconds]
ramfjord has quit [Ping timeout: 260 seconds]
ramfjord has joined #ruby
white_lilies has joined #ruby
za1b1tsu has quit [Quit: Leaving]
schneide_ has joined #ruby
justinfaler has quit [Ping timeout: 252 seconds]
ramfjord has quit [Ping timeout: 255 seconds]
jcalla has joined #ruby
ramfjord has joined #ruby
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ldepandis has joined #ruby
pastorinni has quit [Ping timeout: 248 seconds]
justinfaler has joined #ruby
ramfjord has quit [Ping timeout: 276 seconds]
ramfjord has joined #ruby
Rebus has quit [Quit: Page closed]
TvL2386_ has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
krawchyk has quit [Quit: krawchyk]
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mtkd has quit [Ping timeout: 276 seconds]
TvL2386 has quit [Ping timeout: 240 seconds]
mtkd has joined #ruby
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
anisha has quit [Quit: This computer has gone to sleep]
guacamole has joined #ruby
guacamole has quit [Changing host]
guacamole has joined #ruby
anisha has joined #ruby
banisterfiend has joined #ruby
rwb has quit [Remote host closed the connection]
rwb has joined #ruby
anisha has quit [Ping timeout: 255 seconds]
<graft> anyone played around with the OpenSSL class much?
bigblind has joined #ruby
Dimik has joined #ruby
<graft> i'm trying to use OpenSSL::PKey.read(File.read(filename)) but it doesn't seem to work - meanwhile, OpenSSL::PKey::RSA.new(File.read(filename)) works fine
<graft> i get the error 'no start line', which i don't understand
clemens3 has quit [Ping timeout: 240 seconds]
troulouliou_div2 has joined #ruby
ecuanaso has joined #ruby
krawchyk has joined #ruby
bigblind has quit [Ping timeout: 255 seconds]
atchoum has joined #ruby
jamesaxl has quit [Read error: Connection reset by peer]
jamesaxl has joined #ruby
jrafanie has quit [Quit: Textual IRC Client: www.textualapp.com]
ldnunes has quit [Quit: Leaving]
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nowhereman_ has quit [Ping timeout: 256 seconds]
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nowhere_man has joined #ruby
justinfaler has quit [Ping timeout: 248 seconds]
troulouliou_div2 has quit [Remote host closed the connection]
banisterfiend has joined #ruby
justinfaler has joined #ruby
deathwishdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jason__ has joined #ruby
elphe has joined #ruby
jason_ has quit [Ping timeout: 265 seconds]
lxsameer has quit [Ping timeout: 255 seconds]
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
haylon has joined #ruby
banisterfiend has joined #ruby
milardovich has joined #ruby
jamesaxl has quit [Read error: Connection reset by peer]
cdg has joined #ruby
cdg has quit [Read error: Connection reset by peer]
dextrey has quit [Ping timeout: 260 seconds]
cdg has joined #ruby
jamesaxl has joined #ruby
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
eckhardt has joined #ruby
milardovich has quit [Remote host closed the connection]
c0ncealed has quit [Remote host closed the connection]
sergio_101 has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
c0ncealed has joined #ruby
milardovich has joined #ruby
pastorinni has joined #ruby
quobo has quit [Quit: Connection closed for inactivity]
SuperLag has joined #ruby
woodruffw has quit [Ping timeout: 248 seconds]
milardovich has quit [Remote host closed the connection]
nowhere_man has quit [Ping timeout: 248 seconds]
banisterfiend has joined #ruby
woodruffw has joined #ruby
woodruffw has joined #ruby
nowhere_man has joined #ruby
atchoum has quit [Ping timeout: 248 seconds]
d^sh has quit [Ping timeout: 255 seconds]
brendan- has quit [Ping timeout: 276 seconds]
x77686d has joined #ruby
d^sh has joined #ruby
_haylon has joined #ruby
haylon has quit [Read error: Connection reset by peer]
atchoum has joined #ruby
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
brendan- has joined #ruby
milardovich has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alex`` has quit [Ping timeout: 252 seconds]
erlend has quit [Ping timeout: 265 seconds]
schneide_ has quit [Remote host closed the connection]
schneide_ has joined #ruby
schneide_ has quit [Remote host closed the connection]
amirite has joined #ruby
tomphp has joined #ruby
RougeR has joined #ruby
RougeR has joined #ruby
RougeR has quit [Changing host]
erlend has joined #ruby
<amirite> I've got a string "\xfb", if I print it I see the byte as I expect to (a weird non-ascii character). What I want to know is how do I go from '\xfb' to "\xfb", because I'm trying to concatenante "\x" with the hex code and have it interpreted to the intended encoded character
<amirite> if i try to gsub(/(..)/, '\x\1') I end up with a literal string, but I need that \1 capture escaped into the \x
white_lilies has quit [Ping timeout: 260 seconds]
workmad3 has joined #ruby
<havenwood> >> "fbff".scan(/../).map(&:hex).map(&:chr).join
<ruby[bot]> havenwood: # => "\xFB\xFF" (https://eval.in/951917)
fmccann has joined #ruby
jason__ has quit [Ping timeout: 260 seconds]
<havenwood> >> ["fbff"].pack("H*")
<ruby[bot]> havenwood: # => "\xFB\xFF" (https://eval.in/951918)
<havenwood> amirite: ^
<graft> wow, pack, forgot all about that
workmad3 has quit [Ping timeout: 260 seconds]
<amirite> hmm
aintno_sunshine has joined #ruby
jason_ has joined #ruby
ramfjord has joined #ruby
n0m4d1c has joined #ruby
Vapez has joined #ruby
weathermaker has joined #ruby
McSoFake has joined #ruby
white_lilies has joined #ruby
n0m4d1c has quit [Remote host closed the connection]
Emmanuel_Chanel has joined #ruby
jason__ has joined #ruby
justache has left #ruby [#ruby]
minimalism has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
x77686d has quit [Quit: x77686d]
white_lilies has quit [Ping timeout: 248 seconds]
jason_ has quit [Ping timeout: 260 seconds]
white_lilies has joined #ruby
krawchyk has quit [Quit: krawchyk]
ldepandis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jeffreylevesque has quit [Ping timeout: 265 seconds]
mrshark has joined #ruby
<mrshark> This is definitely more of a rails question, but does anyone know how to identify what file sprockets will resolve a `require` to?
<mrshark> Been googling around for quite a while and have yet to find anything
justinfaler has quit [Ping timeout: 255 seconds]
mtkd has quit [Ping timeout: 264 seconds]
milardovich has quit [Remote host closed the connection]
white_lilies has quit [Ping timeout: 256 seconds]
mtkd has joined #ruby
jason_ has joined #ruby
nowhere_man has quit [Ping timeout: 248 seconds]
angrywombat has joined #ruby
jason__ has quit [Ping timeout: 264 seconds]
angrywombat has left #ruby [#ruby]
sergio_101 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<mrshark> cool
mrshark has left #ruby [#ruby]
sundhell is now known as sundhell_away
bigblind has joined #ruby
[Butch] has quit [Quit: Textual IRC Client: www.textualapp.com]
x77686d has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nowhere_man has joined #ruby
ta_ has joined #ruby
x77686d has quit [Ping timeout: 248 seconds]
x77686d has joined #ruby
workmad3 has joined #ruby
white_lilies has joined #ruby
RougeT430 has joined #ruby
RougeT430 has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
n0m4d1c has joined #ruby
justinfaler has joined #ruby
jamesaxl has quit [Quit: WeeChat 2.0.1]
jeffreylevesque has joined #ruby
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
n0m4d1c has quit [Remote host closed the connection]
white_lilies has quit [Ping timeout: 256 seconds]
jokke has quit [Ping timeout: 256 seconds]
jokke has joined #ruby
amatas has quit [Quit: amatas]
tcopeland has quit [Quit: tcopeland]
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
PaulCapestany has quit [Quit: .]
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
workmad3 has quit [Ping timeout: 256 seconds]
npgm has joined #ruby
PaulCapestany has joined #ruby
FrostCandy has joined #ruby
jason_ has quit [Remote host closed the connection]
swills has joined #ruby
chouhoulis has quit [Ping timeout: 248 seconds]
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
McSoFake has quit [Quit: Konversation terminated!]
<nchambers> i have a bundle of ca certificates written in PEM format to a file. Is there an easy way to turn each of these certificates into an array of OpenSSL::X509::Certificate objects?
<graft> you probably have to split the strings
FrostCandy has quit []
<nchambers> im hoping to avoid that, so im keeping it as a backup plan
<graft> maybe split on /(?<=-----)\n(?=-----)/
<graft> or some such
<graft> if you're hoping for an openssl method i don't think there is one
_haylon has quit [Ping timeout: 276 seconds]
<nchambers> split it is then
snath has quit [Ping timeout: 256 seconds]
jottr has joined #ruby
jcalla has quit [Quit: Leaving]
nowhereman_ has joined #ruby
nowhere_man has quit [Ping timeout: 248 seconds]
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
amirite has quit [Ping timeout: 248 seconds]
mniip has quit [Ping timeout: 240 seconds]
hahuang61 has joined #ruby
<eckhardt> huh i didn't know about Array#pack. That is slick.
cdg has quit [Read error: Connection reset by peer]
mniip has joined #ruby
cdg has joined #ruby
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
drewmcmillan has joined #ruby
jrafanie has joined #ruby
orbyt_ has joined #ruby
cdg has quit [Remote host closed the connection]
xcyclist has joined #ruby
<xcyclist> I am trying http://sciruby.com/blog/2014/08/23/nyaplot-interactive-plots-generateor-with-ruby/, and I wonder if there is any reasonably simple way to have the output go to a separate window while running this from a terminal, as I am a vi guy.
DLSteve_ has quit [Quit: All rise, the honorable DLSteve has left the channel.]
Ishido has quit [Read error: Connection reset by peer]
tvw has quit [Remote host closed the connection]
moei has quit [Quit: Leaving...]
tcopeland has joined #ruby
hahuang61 has quit [Quit: WeeChat 2.0.1]
<xcyclist> I would really like a general purpose plotter that I can get jpg, png, pdf and ps files out of, if not others.
white_lilies has joined #ruby
<xcyclist> Looks like gruff does it. That and gnuplot will probably keep me satisfied. However, as nyaplot is part of sciruby, and sciruby is presumably trying to be like the science stuff in python, it would be nice to be able to do that from a terminal.
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
white_lilies has quit [Ping timeout: 248 seconds]
snath has joined #ruby
cdg has joined #ruby
amirite has joined #ruby
x77686d has quit [Ping timeout: 260 seconds]
x77686d_ has joined #ruby
elphe has quit [Ping timeout: 255 seconds]
aintno_sunshine has quit [Remote host closed the connection]
x77686d_ has quit [Client Quit]
chet has joined #ruby
justache has joined #ruby
<chet> Hi, am a RoR newbie, our webserver is behind a rev proxy and after authentication, the redirect url is that of the webserver instead of the rev proxy ip. am looking for help in fixing this.