havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.7.1, 2.6.6, 2.5.8: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.de/ and select Ruby as the language | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | Can't talk? Register/identify with Nickserv first!
<leftylink> hmm
<leftylink> I might use if I want to return multiple named values and wnt it to be more convenient to be able to access them by foo.bar instead of foo[:bar] I suppose
<leftylink> so it is possible
TCZ has joined #ruby
bmurt has joined #ruby
orbyt_ has joined #ruby
TCZ has quit [Quit: Leaving]
sniperwolf has quit []
skx86 has quit [Quit: Connection closed for inactivity]
tau has joined #ruby
ldepandis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<leitz> adam12, sorry for not responding sooner, I was in a video chat. Compiled from source for 2.8.
<leitz> adam12, I got tired of people griping at me for using old Ruby versions. :)
<adam12> leitz: From the kettle into the fire... ;)
<leitz> adam12, yup. Really, if I can keep at it, Ruby is the language that I enjoy the most. Naturally, work uses Perl. :(
neo_ has quit [Quit: Leaving]
Technodrome has joined #ruby
oddp has quit [Ping timeout: 240 seconds]
Garb0 has joined #ruby
s2013 has joined #ruby
mossplix has quit [Remote host closed the connection]
gthank has quit [Quit: Textual IRC Client: www.textualapp.com]
mossplix has joined #ruby
exmortus has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 246 seconds]
tau has quit [Ping timeout: 256 seconds]
leitz has quit [Quit: Leaving]
ur5us has quit [Ping timeout: 260 seconds]
fabio_ has joined #ruby
MadLamb has quit [Ping timeout: 256 seconds]
dviola has joined #ruby
ur5us has joined #ruby
davispuh has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
Garb0 has quit [Quit: I'm out.]
s_ has quit [Ping timeout: 244 seconds]
s_ has joined #ruby
skx86 has joined #ruby
regedit has quit [Quit: Connection closed for inactivity]
mozzarella has quit [Remote host closed the connection]
mozzarella has joined #ruby
Garb0 has joined #ruby
tau has joined #ruby
tau has quit [Changing host]
tau has joined #ruby
darkstardev13 has quit [Remote host closed the connection]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ChmEarl has quit [Quit: Leaving]
DTZUZU has quit [Quit: WeeChat 2.8]
DTZUZU has joined #ruby
braincrash has quit [Quit: bye bye]
jenrzzz has joined #ruby
braincrash has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
mossplix has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 240 seconds]
darkstardev13 has joined #ruby
wymillerlinux has quit [Ping timeout: 260 seconds]
orbyt_ has joined #ruby
orbyt_ has quit [Client Quit]
ghanima has joined #ruby
ghanima has quit [Client Quit]
ghanima has joined #ruby
ghanima has quit [Remote host closed the connection]
ghanima has joined #ruby
ghanima has quit [Remote host closed the connection]
ghanima has joined #ruby
jenrzzz has joined #ruby
segy has quit [Excess Flood]
segy has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
mattwc has quit [Quit: Updating details, brb]
markin has joined #ruby
plujon has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
bmo has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
bmo has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
bmo has joined #ruby
jenrzzz has joined #ruby
alexherbo2 has joined #ruby
bmo has quit [Ping timeout: 265 seconds]
cliluw has quit [Ping timeout: 265 seconds]
ur5us has quit [Ping timeout: 260 seconds]
chalkmonster has joined #ruby
mossplix has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mossplix has quit [Ping timeout: 264 seconds]
Uncle_Cid has joined #ruby
robert__ has quit [Ping timeout: 246 seconds]
bocaneri has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mossplix has joined #ruby
RiPuk has quit [Read error: Connection reset by peer]
RiPuk has joined #ruby
mossplix has quit [Remote host closed the connection]
Uncle_Cid has quit [Read error: Connection reset by peer]
UncleCid has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.8]
chalkmonster has joined #ruby
mossplix has joined #ruby
deathwishdave has joined #ruby
ldepandis has joined #ruby
sarna has joined #ruby
<sarna> o/
mossplix has quit [Remote host closed the connection]
deathwishdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dfucci has joined #ruby
deathwishdave has joined #ruby
Jonopoly has joined #ruby
roelof1967 has joined #ruby
<roelof1967> havenwood a late good morning here :'(
<roelof1967> who can give me some hints about line 20 here : https://dpaste.org/XAKZ
<roelof1967> I get now this message : ` The answers you seek... type mismatch: String given `
imode has quit [Ping timeout: 260 seconds]
schne1der has joined #ruby
mossplix has joined #ruby
gavlee has quit [Ping timeout: 246 seconds]
deathwishdave has quit [Quit: Textual IRC Client: www.textualapp.com]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
<roelof1967> second question : How can I start rbi or pri on Windows 10 ?
stdedos has quit [Quit: Connection closed]
<sarna> roelof1967: I think line 20 is wrong maybe?
<sarna> it's kinda hard to check programs like these
<roelof1967> I know , I do not have a idea what the programm exactly wants so I ask here and the error message is also not very clear what is wrong
<leftylink> if there are any doubts about it, then it would be useful to narrow down the problem by e.g. rescuing a NoMethodError in any other context, and examining it
SeepingN has quit [Quit: The system is going down for reboot NOW!]
gavlee has joined #ruby
<roelof1967> oke, before I started at this koan I saw this error message : ` The answers you seek... Expected "undefined method `some_method_nil_doesnt_know_about' for nil:NilClass" to match /__/ `
<roelof1967> but I do not see how to fit it in this : ` assert_match(/__/, ex.message) `
bocaneri has quit [Ping timeout: 256 seconds]
<leftylink> well that error message is correct, isn't it. the string "undefined method `some_method_nil_doesnt_know_about' for nil:NilClass" doesn't match /__/.
<roelof1967> yep
<roelof1967> but as I say earlier. I do not see how to fit it into the assert
<sarna> `assert_match(/undefined method `some_method_nil_doesnt_know_about' for nil:NilClass/, ex.message)` ?
<roelof1967> ` Documents/rubykoans/koans/about_nil.rb:21: syntax error, unexpected tXSTRING_BEG, expecting end (SyntaxError)...for nil:NilClass/, ex.message)` `
<sarna> lol
bocaneri has joined #ruby
<sarna> roelof: well on my machine it works
<sarna> oops, roelof1967
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
vondruch has quit [Remote host closed the connection]
<roelof1967> aha, then I had a ' after the last ) when I delete that the test is green :)
<roelof1967> thanks a lot
vondruch has joined #ruby
<roelof1967> now I hope I can find out how to start up rbi or pry from prompt so I can try some things out for the next challenges/koans
<sarna> do you have ruby installed in wsl?
<sarna> or in some other way
<roelof1967> no, on Windows with ruby installer. I had problems with solargraph to get working right
<sarna> oh, then I have no idea, I'm on linux
<roelof1967> :'(
<roelof1967> and how does it work on linux. Maybe its the same on Windows
<leftylink> in linux, `which irb` is "/usr/bin/irb", and this tells me that is where in my PATH `irb` is
<leftylink> so that is what will be run if I use `irb`
<roelof1967> thanks, just using irb works
Industrial has joined #ruby
<Industrial> Hi. I get this error installing the zqm gem, and I'm not sure what to do: https://gist.github.com/Industrial/6a0dd0d494f192c204b2f331cfa4e523
<leftylink> wouldn't that mean the version of zeromq installed is not the version that the zmq gem is compatible with?
Garb0 has quit [Quit: I'm out.]
<Industrial> okay
xco has joined #ruby
<Industrial> leftylink: these are the available packages matching libzmq and it marked the ones I have installed: https://gist.github.com/Industrial/f1eb412d1106cf37fff125d0f9bf3418
<Industrial> Should I remove one of them or pick a specific one or something different :D?
<leftylink> okay, wishing luck
dionysus69 has joined #ruby
<Industrial> https://zeromq.org/download/ it says libzmq3-dev there, which i have installed
<Industrial> ah, so it uses zmq2
<Industrial> Seems the gem is really old :/
<leftylink> it would probably help my case if I used clearer language such as "I yield the floor to someone who knows about this" - my bad for not saying that
<leftylink> it is important to let people know when I don't know
<leftylink> I apologise
<Industrial> It seems the rbczmq package is superior atm
apotheon has quit [Ping timeout: 240 seconds]
apotheon has joined #ruby
oddp has joined #ruby
* roelof1967 takes a break from ruby koans, Thinks he goes somewhere this afternoon further on this
bocaneri has quit [Ping timeout: 256 seconds]
mossplix has quit [Remote host closed the connection]
bocaneri has joined #ruby
tau has quit [Remote host closed the connection]
Uncle_Cid has joined #ruby
UncleCid has quit [Ping timeout: 240 seconds]
<sarna> how do you ship ruby scripts to environments you don't control? is docker the way to go?
<sarna> or well, to environments in which you don't want to spend three hours configuring
Frobozz has joined #ruby
vondruch_ has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 256 seconds]
vondruch has quit [Ping timeout: 246 seconds]
vondruch_ is now known as vondruch
Mia has quit [Read error: Connection reset by peer]
Mia has joined #ruby
fabio_ is now known as MadLamb
<MadLamb> I'm trying to figure out how I get sunspot to update the schema.xml of my "default" core when I make changes to the searchable on the models? I am not running solr with sunsput but rather a docker container. Does someone know how it works?
oddp has quit [Ping timeout: 256 seconds]
TCZ has joined #ruby
Axy has joined #ruby
Axy has quit [Changing host]
Axy has joined #ruby
Mia has quit [Ping timeout: 265 seconds]
s_ has quit [Ping timeout: 260 seconds]
s_ has joined #ruby
Emmanuel_Chanel has joined #ruby
arahael2 is now known as Arahael
<roelof1967> this suprises me : https://dpaste.org/5g5y
<roelof1967> I was expecting that hash[:one] would be only "one"
<roelof1967> can someone explain this to me
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
<leftylink> because the same list is used, adding to one reference to the list will be visible through any other reference to the list
<leftylink> &>> h = Hash.new([]); h[:a].object_id == h[:b].object_id
<rubydoc> # => true (https://carc.in/#/r/9bvd)
<leftylink> as you can see, they are the same object
<leftylink> as is stated in the documentation.
<leftylink> &ri Hash::new
<rubydoc> leftylink: Found no entry that matches class Hash::new
<leftylink> you are kissing me
<leftylink> &ri Hash.new
<leftylink> > If obj is specified, this single object will be used for all default values.
<leftylink> s/ss/dd/ btw
<roelof1967> oke, I was exoecting that adding to a list would be `{ "one" => "uno"]
<leftylink> well, now you know otherwise
<leftylink> and thus you now know that you cannot get that behaviour by using Hash.new([])
<roelof1967> oke, if I would see a hash I had to do `hash[:one] << "one" => "uno" `
<roelof1967> so because I do not add a key all values have the same key if I understand you right
<leftylink> I don't understand what you mean by "because I do not add a key". The reason all default values use the same object is the sentence I quoted in the documentation. did I misunderstand your question?
<roelof1967> maybe , I try to see why it does what it does
<roelof1967> `hash[:one] << "uno" ` gives a list , where `hash[:one] << "uno" ` gives a hash
<leftylink> I can't see the difference between those two pieces of code
<roelof1967> sorry I mean `hash[:one] = "uno" ` gives me a hash
<roelof1967> time to dive what << exactly does compared with =
<leftylink> &>> a = []; b = []; c = d = []; a << :added_to_a; c << :added_to_d; [a.object_id == b.object_id, c.object_id == d.object_id, a, b, c, d]
<rubydoc> # => [false, true, [:added_to_a], [], [:added_to_d], [:added_to_d]] (https://carc.in/#/r/9bvj)
<leftylink> as you can see, if two lists are the same list, adding to the same list through one reference to it is visible through any other reference to it. and if two lists are not the same list, then obviously adding to one will not add to the other
TCZ has quit [Quit: Leaving]
TCZ has joined #ruby
darkstardev13 has quit [Ping timeout: 260 seconds]
darkstardev13 has joined #ruby
drincruz has joined #ruby
TCZ has quit [Quit: Leaving]
bocaneri has quit [Ping timeout: 260 seconds]
MadLamb has quit [Read error: Connection reset by peer]
MadLamb has joined #ruby
bocaneri has joined #ruby
<MadLamb> Any1 with sunspot (solr gem) experience? How can I force the gem to update my solr schema.xml when I make changes to the "searchable" in the model?
drincruz has quit [Ping timeout: 264 seconds]
teclator has quit [Ping timeout: 240 seconds]
burningserenity has joined #ruby
teclator has joined #ruby
bmurt has joined #ruby
Jonopoly has quit [Ping timeout: 265 seconds]
oddp has joined #ruby
troulouliou_div2 has quit [Quit: Leaving]
mossplix has joined #ruby
Industrial has quit [Ping timeout: 260 seconds]
lucasb has joined #ruby
drincruz has joined #ruby
mossplix_ has joined #ruby
mossplix has quit [Ping timeout: 264 seconds]
cd has joined #ruby
<dualfade> does anyone know what the python equiv of "ECDSA::Format::SignatureDerString.encode" is in ecdsa ?
imadper has joined #ruby
<dualfade> sorry wrong room
Technodrome has joined #ruby
Esa__ has joined #ruby
s2013 has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ChmEarl has joined #ruby
sarna has quit [Quit: Connection closed]
roelof1967 has quit [Ping timeout: 245 seconds]
arahael1 has joined #ruby
Arahael has quit [Ping timeout: 256 seconds]
<adam12> MadLamb: No experience, but how would you update schema.xml normally?
burningserenity has quit [Ping timeout: 260 seconds]
TCZ has joined #ruby
ruby647 has joined #ruby
<ruby647> I have an array of hash
<ruby647> [{ "firstName": "Tybalt", "lastName": "Loresz", "moreData": { "phone": "684 233--5122", "islaen": "maye" } }]
<ruby647> I want to level up the position of phone above moreData
<adam12> MadLamb: Looks like there's a rake task to generate a schema. Have you tried that?
<adam12> ruby647: Do you want the value of phone?
<ruby647> No I don't want the value of phone
<ruby647> I want to shift the position of phone above moredata
<ruby647> like this
<ruby647> [{"firstName": "Tybalt", "lastName": "Loresz", "phone": "684 233--5122", "moreData": { "islaen": "maye" } }]
<leftylink> elements may be deletd from a hash with Hash#delete. And they may be added with either Hash#merge!, Hash#[]= (mutating), or Hash#merge (not). thus, phone may be moved.
<leftylink> one should not put unnecessary quotes in symbol-keyed hashes.
<leftylink> &>> {a: 1} == {"a": 1}
<rubydoc> # => true (https://carc.in/#/r/9bwq)
<ruby647> Can you tell me the code snippet leftylink ?
<leftylink> I have given all necessary ingredients to create such a code snippet.
<ruby647> I tried with hash.each_value{|v| v.replace({"phone" => v.delete("phone")}.merge(v))}
burningserenity has joined #ruby
<ruby647> but not working
<ruby647> but can't make them work
burningserenity has quit [Ping timeout: 260 seconds]
<adam12> ruby647: I'd probably think about this in 2 steps; you can refactor down to 1 when it is working.
<adam12> ruby647: First step is deleting the phone value from the moreData hash. Second step is merging it into the main hash.
colins has joined #ruby
<leftylink> each_value is inappropriate because the operation is not concerned with acting on each value in the hash. it is only interested in acting on a hash. there may be a usage of Array#each, of course (since at 14:19 it was claimed there is an array of hashes), but not each_value. for example, the task presented has no interest in acting on "Tybalt"
orbyt_ has joined #ruby
sjt003 has joined #ruby
<ruby647> @adam12 I can delete and append the key and value to hash
<ruby647> but I want to append the key value at a fix position
<adam12> ruby647: So you want it _before_ moreData?
<ruby647> yes
<adam12> ruby647: You'll have to create a new Hash, since they preserve order of insertion and I don't believe there's a way to insert in the middle of one.
<leftylink> that sounds frustrating.
s_ has quit [Ping timeout: 260 seconds]
<ruby647> But I have array of multiple hashes
s_ has joined #ruby
<ruby647> for every I have to create new hash
<adam12> ruby647: Yes.
<ruby647> any other way
<leftylink> that's why I assumed that Array#each would be used
<ruby647> If you guys can provide the code snippet, I have taken way too much time in this
<leftylink> my overall sentiment about any other way is that the code consuming the hashes should not rely on the order
<leftylink> I remind what I said at 14:27
<leftylink> 14:27:49 < leftylink> I have given all necessary ingredients to create such a code snippet.
<ruby647> :D Ok
rippa has joined #ruby
burningserenity has joined #ruby
<adam12> ruby647: If you don't care about the position of the keys, it's nothing more than deleting the value from the moreData hash, and merging it into the main hash. It's appended at the end tho.
<adam12> arr.each {|hash| hash.merge!({ phone: hash[:moreData].delete(:phone) }) }
<adam12> This mutates the original hash so obviously beware of that.
<leftylink> if it is indeed necessary to use the order, I would take advantage of the fact that the only thing standing between the desired position of :phone vs the position where :phone will be inserted is :moreData, so I would just delete and reinsert :moreData unchanged
colins has quit [Quit: WeeChat 2.8]
colins has joined #ruby
<leftylink> or perhaps I offer Hash#slice, to which you'd simply pass all the existing keys, but reordered in the desired way
ivan` has joined #ruby
<leftylink> I would be far less hostile to the idea of relying on hash order if all values were of the same type
TCZ has quit [Quit: Leaving]
roelof1967 has joined #ruby
<roelof1967> good evening from a very very Netherlands
<roelof1967> I mean very very hot Netherlands
<adam12> roelof1967: Good morning!
<leftylink> as it stands, I am far more amenable to the consuming code being aware of the order in which it wants to extract k/v pairs
<adam12> (from a very very hot Canada)
ruby647 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<leftylink> so that ruby647 person was not worth my time. I would like to award demerits
chalkmonster has quit [Quit: WeeChat 2.8]
<leftylink> but that's life, you never know
<leftylink> just gotta go with the flow
<leftylink> sometimes it works out, sometimes no
ivan` has quit [Quit: ivan`]
<roelof1967> here 33 degrees Centigrade with a huminity of about 50%
<adam12> roelof1967: It's actually cooler today here than it has been. 22C / 67% humid. I'll take it.
<roelof1967> Can I swap with you. here in the evening/night thunderstorms so it cools down hopefully
<adam12> Sure; until it hits 30C / 90% humid and feels like 40C :P
mossplix_ has quit [Remote host closed the connection]
<adam12> The humidity is brutal.
<roelof1967> I know
<roelof1967> if it's above 25 degrees Centigrade in the Netherlands , the huminit is killing you
<adam12> Heh
<roelof1967> too hot, to type right. I mean the huminity is killing you
dionysus69 has quit [Ping timeout: 265 seconds]
imode has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<leftylink> upon reflection, I think I was not clear enough when I said "I have given all necessary ingredients to create such a code snippet.", because it didn't make clear whose court I perceive the ball to be in. so that implies that I might consider "I have given all necessary ingredients you need to create such a snippet yourself.". however, that has the risk of sounding pretentious. the information may in fact
<leftylink> not be sufficient
<leftylink> so it is best to accompany it with an offer to provide more information
<leftylink> something like "I believe I gave all necessary ingredients..." etc. "but am happy to provide more ingredients if that belief was incorrect"
<leftylink> I will consider things like that next time
<leftylink> I am always looking for ways in which I could be more clear
bocaneri has quit [Ping timeout: 260 seconds]
<roelof1967> I have a Question. On rubykoans I have this question ` # Why do we convert the list of symbols to strings and then compare # against the string value rather than against symbols?` . Am I on the right track that symbols who contain the same , always get true because they are the same object
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
<havenwood> roelof1967: Show the code?
burningserenity has quit [Ping timeout: 240 seconds]
vondruch has quit [Client Quit]
<roelof1967> show the code ? It's a question where I have to think about
vondruch has joined #ruby
<havenwood> roelof1967: I don't understand what you're asking.
falconfox has joined #ruby
<roelof1967> oke, on ruby koans this question is asked : ` # Why do we convert the list of symbols to strings and then compare # against the string value rather than against symbols?`
<havenwood> roelof1967: That's the code I'm asking to see.
<roelof1967> The question is do I think the right way that it is because symbols who contains the same , are the same object
<havenwood> roelof1967: What list?
<havenwood> roelof1967: A Symbol is like a number wearing a name badge.
<roelof1967> moment, so a symbol `:a` or `:catsanddogs` is a number ?
falconfox has quit [Remote host closed the connection]
<uplime> havenwood: ^
<havenwood> uplime: thx
<uplime> np
<havenwood> &>> %w[a b c].map(&:object_id)
<rubydoc> # => [60, 80, 100] (https://carc.in/#/r/9bxn)
<havenwood> &>> %i[a b c].map(&:object_id)
<rubydoc> # => [784348, 157148, 934108] (https://carc.in/#/r/9bxo)
<havenwood> roelof1967: A Symbol is like an Integer in that it's not mutable, there's just one copy of it, it has not text data, but unlike an Integer it has a name.
<havenwood> Or at least a name badge.
<havenwood> There's something you call it.
<havenwood> roelof1967: It's just one way to think about Strings versus Symbols. Strings are arbitrary text data. Symbols just use text for their name.
<roelof1967> oke
<roelof1967> so in this code : ` symbol1 = :a_symbol symbol2 = :a_symbol `
<roelof1967> symbol1 and symbol2 has the same number
<havenwood> roelof1967: Yup
<roelof1967> and therefore they are the same
<havenwood> roelof1967: Same number with same nametag.
<havenwood> roelof1967: Same thing.
<havenwood> roelof1967: symbol1.equal?(symbol2) #=> true
<roelof1967> then I think I see it
<roelof1967> the question is : `# Why do we convert the list of symbols to strings and then compare # against the string value rather than against symbols? `
<roelof1967> because a symbol is a number and a string not, the answer will always be false
bocaneri has joined #ruby
<MadLamb> adam12, about sunspot solr.. which task you are talking about? I did try sunspot:start and sunspot:run (but both complain about the missing java environment) I am using a docker solr container...
burningserenity has joined #ruby
dionysus69 has joined #ruby
al2o3-cr has quit [Quit: WeeChat 2.8]
al2o3-cr has joined #ruby
<adam12> MadLamb: I was looking through the source of sunspot gem and there's a rake task that mentions schema.
<MadLamb> adam12, I'm probably running a very outdated version
<MadLamb> adam12, 2.1.1
TCZ has joined #ruby
bocaneri has quit [Ping timeout: 265 seconds]
SeepingN has joined #ruby
bocaneri has joined #ruby
<MadLamb> adam12, after you said I did find it, but that still doesnt appear on my rake exec --tasks... I'm rebuilding the container to confirm
<adam12> MadLamb: But there's nothing special in there really. You might be able to just do it with something like `ruby -rsunspot/schema -e 'File.write "new_schema.xml", Sunspot::Schema.new.to_xml'`
<MadLamb> adam12, :U
<adam12> MadLamb: Lunch time. Good luck.
<MadLamb> adam12, thanks
entel has joined #ruby
ryzokuken_ has joined #ruby
kinduff has quit [Read error: Connection reset by peer]
kinduff has joined #ruby
stryek has joined #ruby
roelof1967 has quit [Ping timeout: 245 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
lunarkitty has quit [Ping timeout: 272 seconds]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dionysus69 has quit [Quit: dionysus69]
<MadLamb> adam12, even with the upgrade it doesnt show the update tasks, but I think anyway this update needs to be done in the reindex task (the library docs say that).. Most of the fields are dynamic and the problem I was having was they were not getting updated. It seems however it was the library version because now I was able to see them in solr...
<MadLamb> adam12, so, in the end the schema task wasnt the solution, but upgrading the library was, which came from your suggestion. Thanks
TCZ has quit [Quit: Leaving]
howdoi has joined #ruby
u0_a260 has joined #ruby
lunarkitty has joined #ruby
<u0_a260> query colins witaj przyjacielu!
<u0_a260> shit :D
<u0_a260> not here
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
houhoulis has joined #ruby
Garb0 has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
vondruch has quit [Client Quit]
vondruch has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
vondruch has quit [Client Quit]
vondruch has joined #ruby
u0_a260 has quit [Quit: WeeChat 2.8]
FastJack has quit [Ping timeout: 240 seconds]
u0_a260 has joined #ruby
<adam12> MadLamb: Cheers.
ellcs1 has joined #ruby
clemens3 has quit [Quit: WeeChat 2.7]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
davispuh has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
cd has quit [K-Lined]
vondruch has quit [Client Quit]
vondruch has joined #ruby
Xiti has quit [Quit: Leaving]
ams___ has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
schne1der has quit [Ping timeout: 258 seconds]
FastJack has joined #ruby
Esa__ has quit [Ping timeout: 246 seconds]
Xiti has joined #ruby
bocaneri has quit [Ping timeout: 258 seconds]
_aeris_ has quit [Excess Flood]
_aeris_ has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
cliluw has joined #ruby
roelof1967 has joined #ruby
<roelof1967> I do not get this one from rubykoans : ` assert_equal "2", "num 42\n2 lines"[/^\d+/] `
<roelof1967> I have tried rubular but cannot make it work
<adam12> roelof1967: Can't make which part work? The regexp or the assertion?
<roelof1967> the regex . According to rubulator there are no matches
<adam12> roelof1967: Works for me on Rubular.
<roelof1967> oke, I put it as ` "num 42\n2 lines" `
<roelof1967> and then it does not work , that is why im getting confused
<adam12> &>> "num 42\n2 lines"[/^\d+/, 1]
<rubydoc> # => nil (https://carc.in/#/r/9bz6)
<adam12> &>> "num 42\n2 lines"[/^\d+/]
<rubydoc> # => "2" (https://carc.in/#/r/9bz7)
<havenwood> roelof1967: Try in irb.
<roelof1967> yep, and I was wondering why but I see it now
<havenwood> roelof1967: Usually when I see `^` in Regexp I feel like `\A` is actually what's meant.
u0_a260 has quit [Quit: WeeChat 2.8]
colins has quit [Quit: WeeChat 2.8]
Industrial has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
bsdband34 has quit [Ping timeout: 260 seconds]
davispuh has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
s2013 has quit [Ping timeout: 265 seconds]
davispuh has joined #ruby
<roelof1967> pff, again this one make me crazy : ` assert_match(/wrong number of arguments (given 0, expected 2)/, exception.message) `
<roelof1967> ` Expected "wrong number of arguments (given 0, expected 2)" to match /wrong number of arguments (given 0, expected 2)/ `
clemens3 has joined #ruby
<roelof1967> chancing / to " gives me `mismatch: string given"
<leftylink> indeed. please observe
<leftylink> &>> "1 (2) 3".match?(/1 (2) 3/)
<rubydoc> # => false (https://carc.in/#/r/9bzg)
<leftylink> so, you can't change the string, because the exception is not yours. so, what do you do to the regex to make it match?
<roelof1967> if I know that I would not ask here for help
<leftylink> although, it may also be instructive to see what strings match that regex
<leftylink> instead of only asking what changes can be made to the regex
aldoescudero has joined #ruby
aldoescudero is now known as ajescudero
<roelof1967> I would think this one : ` "wrong number of arguments (given 0, expected 2) ` because that is the error message
<roelof1967> because the test wants to see the error message
<leftylink> great, well. the text wants you to give any regular expression that would match the error message. you now see that the regular expression /a (b)/ doesn't match the string "a (b)"
<leftylink> &>> "1 (2)".match?(/1 (2)/)
<rubydoc> # => false (https://carc.in/#/r/9bzi)
<leftylink> what could be at fault here? maybe we reduce the problem
<leftylink> &>> "(2)".match?(/(2)/)
<rubydoc> # => true (https://carc.in/#/r/9bzj)
<leftylink> we see that that works
<leftylink> but what is it matching.
cliluw has quit [Ping timeout: 264 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
<roelof1967> that is easy. the (2) of the text matches the (2) in the regex
<leftylink> one can get a MatchData out of a regex match and see what has been matched
<leftylink> it too is easy to assume and too easy to forget to check if our assumptions are true
<roelof1967> ??
<leftylink> so if you have not already figured that out, the statement you made was false.
<leftylink> 19:39:53 < roelof1967> that is easy. the (2) of the text matches the (2) in the regex
<leftylink> false
<roelof1967> Then I rhink I stop with ruby learning and first going to learn regexes . Pity, I hate them
leitz has joined #ruby
<havenwood> roelof1967: Or just move past this problem.
<havenwood> roelof1967: I also like to do a "requisite non-Regexp solution."
<havenwood> roelof1967: Anything that can be solved with Regexp can also be solved without them.
<havenwood> roelof1967: (For better or worse.)
<havenwood> roelof1967: In this case, you can just change the assertion or delete it. The world is malleable. Bend it to your will.
<havenwood> But at what cost?
<roelof1967> I know that everything can be without regex Before I did c# and some other languages where no regex is needed
<havenwood> roelof1967: Regexp is used in C# though just as often as anywhere else...
<havenwood> ¯\_(ツ)_/¯
<roelof1967> Im afraid when I ge a job regex is something I need to learn. Happy developing is a hobby for me
<havenwood> roelof1967: You can choose to not learn it, but you'll have to modify code like this that demands a Regexp.
<havenwood> roelof1967: Your choice1
<roelof1967> I know that means that a lot of challenges of ruby koans I cannot make or have to change. Big thing for a beginner
<havenwood> roelof1967: Try another challenge.
s_ has quit [Ping timeout: 260 seconds]
<havenwood> roelof1967: Make a burrito class.
s_ has joined #ruby
alexherbo29 has joined #ruby
davispuh has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
<havenwood> roelof1967: Or what's more sane? Hmm.
alexherbo2 has quit [Ping timeout: 264 seconds]
alexherbo29 is now known as alexherbo2
<havenwood> roelof1967: How about making a module that has module functions (class methods) that check if something is a palindrome?
<roelof1967> ??
salerace has joined #ruby
bsdbandit-01 has joined #ruby
<roelof1967> now im total confused. What does this have to do with regexes ?
<havenwood> roelof1967: Nothing, which I thought was the goal.
<leitz> Sent the author of Thin a note about the Ruby 2.8 upcoming issue. Things work in Ruby 2.7.
<havenwood> leitz: Interesting
<havenwood> roelof1967: Drome.palindrome?(string)
<havenwood> roelof1967: Drome.palindrome?(integer)
<leftylink> a little surprised that nobody brought it up until now
<havenwood> roelof1967: Drome.palindrome?(enumerable)
<roelof1967> no, this is the whole code I have to work with : https://dpaste.org/4Vv0
davispuh has joined #ruby
<havenwood> roelof1967: Then monkeypatch those classes to support #palindrome?
<havenwood> roelof1967: Finally, switch it to a refinement.
<havenwood> roelof1967: Or continue the Koans. :)
<roelof1967> I will sleep about it
<havenwood> There is more than one path to enlightenment.
<roelof1967> yep, as we say in the Netherlands. "there is more ways to Rome "
mossplix has joined #ruby
<leftylink> out of curiosity is anyone here a koans, er..... graduate? what is the word for a person who has completed the koans
<leftylink> tell us about your experiences
pgib has joined #ruby
pgib has left #ruby [#ruby]
<roelof1967> for me now GN all
smccarthy has joined #ruby
jenrzzz has joined #ruby
<smccarthy> why does "bundle install --without="test jenkins development default" --path vendor/bundle" install the dependencies with git sources to ./vendor/cache instead of ./vendor/bundle ?
cliluw has joined #ruby
jenrzzz has quit [Read error: Connection reset by peer]
<adam12> smccarthy: My _presumption_ is that it has to be 2 steps because of dependencies with C extensions. So git clone vendor/cache; gem install vendor/bundle.
<adam12> smccarthy: I could be way off base tho.
englishm has quit [Excess Flood]
englishm has joined #ruby
jenrzzz has joined #ruby
davispuh has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
mheld has joined #ruby
davispuh has joined #ruby
pgib has joined #ruby
<pgib> Hi. I'm running into an issue on our staging server regarding bundler et.al. Maybe someone can help? Here is a description as well as CLI transcripts: https://dpaste.org/LhaC
roelof1967 has quit [Remote host closed the connection]
houhoulis has quit [Remote host closed the connection]
teej has joined #ruby
<leitz> leftylink, I have not reached that stage of Nerdvana yet; but life should be calming down in a couple of weeks. I'll be getting back to them then, I think.
<leitz> Unless life changes again, and I'm off on some other language/task/job/whatever...
bsdband97 has joined #ruby
<adam12> pgib: `bundle show dalli` returns vendor/bundle path?
bsdbandit-01 has quit [Ping timeout: 272 seconds]
smccarthy has quit [Remote host closed the connection]
burningserenity has quit [Ping timeout: 264 seconds]
alexherbo2 has quit [Ping timeout: 265 seconds]
alexherbo2 has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
cliluw has quit [Ping timeout: 246 seconds]
drincruz has quit [Ping timeout: 256 seconds]
Bounga has joined #ruby
cliluw has joined #ruby
kinduff has quit [Read error: Connection reset by peer]
wymillerlinux has joined #ruby
kinduff has joined #ruby
bsdband97 has quit [Quit: -a- Connection Timed Out]
drincruz has joined #ruby
bsdbandit-01 has joined #ruby
reyfi9e has joined #ruby
duderonomy has joined #ruby
ghanima has quit [Ping timeout: 240 seconds]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ellcs1 has quit [Ping timeout: 260 seconds]
tau has joined #ruby
tau has joined #ruby
tau has quit [Changing host]
jenrzzz has quit [Ping timeout: 246 seconds]
duderonomy has joined #ruby
Industrial has quit [Ping timeout: 260 seconds]
salerace_ has joined #ruby
salerace has quit [Ping timeout: 246 seconds]
jetchisel has joined #ruby
Garb0 has quit [Quit: I'm out.]
xco has quit [Quit: Textual IRC Client: www.textualapp.com]
s_ has quit [Ping timeout: 260 seconds]
s_ has joined #ruby
Industrial has joined #ruby
imode has quit [Ping timeout: 265 seconds]
imode has joined #ruby
alexherbo2 has quit [Ping timeout: 240 seconds]
orbyt_ has joined #ruby
jken has left #ruby ["Leaving"]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
drincruz has quit [Ping timeout: 256 seconds]
leitz has quit [Quit: Leaving]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
schne1der has joined #ruby
salerace_ has quit [Quit: salerace_]
alexherbo2 has joined #ruby
stryek has quit [Quit: Connection closed for inactivity]
tau has quit [Ping timeout: 246 seconds]
Industrial has quit [Ping timeout: 264 seconds]
ajescudero has quit [Remote host closed the connection]
ajescudero has joined #ruby
DTZUZU_ has joined #ruby
DTZUZU has quit [Ping timeout: 265 seconds]
ldepandis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
brknwing has quit [Quit: Leaving]
quazimodo has quit [Ping timeout: 240 seconds]
schne1der has quit [Ping timeout: 264 seconds]
quazimodo has joined #ruby
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ajescude_ has joined #ruby
ajescudero has quit [Ping timeout: 240 seconds]