adam12 changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.1.3, 3.0.5, 2.7.7: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://goo.gl/wpGhoQ | Logs: https://libera.irclog.whitequark.org/ruby/
mahlon has quit [Remote host closed the connection]
mahlon has joined #ruby
mahlon has quit [Remote host closed the connection]
mahlon has joined #ruby
perrierjouet has quit [Quit: WeeChat 3.7.1]
cartdrige has joined #ruby
<ox1eef_> leftylink: In Islam - it is called 'backbiting', and a major sin.
gordea has quit [Quit: gordea]
perrierjouet has joined #ruby
Aminda has quit [Ping timeout: 255 seconds]
Aminda has joined #ruby
perrierjouet has quit [Killed (ozone (No Spam))]
Rounin has quit [Ping timeout: 265 seconds]
crax23 has joined #ruby
Y05hito__ has joined #ruby
cartdrige has quit [Ping timeout: 265 seconds]
crax23 has quit [Ping timeout: 264 seconds]
perrierjouet has joined #ruby
crax23 has joined #ruby
perrierjouet has quit [Quit: WeeChat 3.7.1]
crax23 has quit [Remote host closed the connection]
Y05hito__ has quit [Ping timeout: 256 seconds]
perrierjouet has joined #ruby
cartdrige has joined #ruby
hightower3 has joined #ruby
grokify has joined #ruby
hightower2 has quit [Ping timeout: 268 seconds]
grokify has quit [Ping timeout: 265 seconds]
Sankalp has quit [Ping timeout: 265 seconds]
Sankalp has joined #ruby
moldorcoder7 has quit [Ping timeout: 265 seconds]
perrierjouet has quit [Quit: WeeChat 3.7.1]
grokify has joined #ruby
perrierjouet has joined #ruby
crax23 has joined #ruby
grokify has quit [Ping timeout: 256 seconds]
cartdrige has quit [Ping timeout: 260 seconds]
grokify has joined #ruby
grokify has quit [Ping timeout: 260 seconds]
grokify has joined #ruby
grokify has quit [Ping timeout: 268 seconds]
stirl has joined #ruby
stirl has quit [Ping timeout: 260 seconds]
ur5us has quit [Ping timeout: 256 seconds]
FullMetalStacker has joined #ruby
Y05hito__ has joined #ruby
crax23 has quit [Ping timeout: 265 seconds]
hrberg has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
hrberg has joined #ruby
Linux_Kerio has joined #ruby
stirl has joined #ruby
Aminda has quit [Ping timeout: 255 seconds]
Aminda has joined #ruby
stirl has quit [Client Quit]
stirl has joined #ruby
grokify has joined #ruby
lutrinus has joined #ruby
grokify has quit [Ping timeout: 260 seconds]
crax23 has joined #ruby
grokify has joined #ruby
Y05hito__ has quit [Ping timeout: 265 seconds]
grokify has quit [Remote host closed the connection]
lutrinus has quit [Quit: lutrinus]
D_A_N_ has quit [Quit: leaving]
grokify has joined #ruby
Y05hito__ has joined #ruby
crax23 has quit [Read error: Connection reset by peer]
stirl has quit [Ping timeout: 268 seconds]
TomyWork has joined #ruby
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
Rounin has joined #ruby
Rounin has quit [Changing host]
Rounin has joined #ruby
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ruby
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
tomokojun has joined #ruby
tomokojun has quit [Remote host closed the connection]
Linux_Kerio has quit [Ping timeout: 260 seconds]
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
ur5us has joined #ruby
jvalleroy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
jvalleroy has joined #ruby
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
Y05hito__ has quit [Read error: Connection reset by peer]
hightower3 has quit [Ping timeout: 268 seconds]
cryptkeeper has quit [Quit: Connection closed for inactivity]
otisolsen70 has joined #ruby
otisolsen70 has quit [Remote host closed the connection]
otisolsen70 has joined #ruby
dionysus69 has joined #ruby
ur5us has quit [Ping timeout: 255 seconds]
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
hightower2 has joined #ruby
dviola has joined #ruby
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
grokify has quit [Ping timeout: 252 seconds]
grokify has joined #ruby
reset has quit [Quit: reset]
<FullMetalStacker> Heyho everyone!
<FullMetalStacker> Problem: The length of each array slice should increase by 1 as the index of the array increases.
<FullMetalStacker> Example:
<FullMetalStacker> I have an array of numbers that I want to slice into arrays, creating an array of arrays.
<FullMetalStacker> arr = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19]
<FullMetalStacker> result = [[1], [3, 5], [7, 9, 11
<FullMetalStacker> result = [[1], [3, 5], [7, 9, 11], [13, 15, 17, 19]]
<FullMetalStacker> i found each_slice and currenty fiddle arround with it and try to accomplish something like this:
<FullMetalStacker> arr.each_slice(row_len += 1).to_a
<FullMetalStacker> but this does not do what I was hoping for since the increase of row_len is done only once and then all slices are that size
<FullMetalStacker> can anyone give me a hint on how i can place some iterator increase inside my slicing block, or give me another direction that works?
<depesz> FullMetalStacker: https://dpaste.org/ae9gX
some14u has joined #ruby
some14u has quit [Client Quit]
hightower2 has quit [Ping timeout: 260 seconds]
<cxl> Hi all, I'm trying to do a full text search in my Rails app using PgSearch. The problem is that documents are in different languages and stemming in psql requires the language to be set properly. PgSearch.multisearch_options is a class method so I don't really know the document's language at that point. What's the way to set the language dynamically per record?
some14u has joined #ruby
grokify has quit [Remote host closed the connection]
alexherbo2 has joined #ruby
c10l has quit [Ping timeout: 260 seconds]
alexherbo2 has quit [Remote host closed the connection]
c10l has joined #ruby
D_A_N_ has joined #ruby
c10l has quit [Quit: See ya! o/]
supay has joined #ruby
c10l has joined #ruby
<FullMetalStacker> Hey depesz! Thanks for the solution!! Much appreciated! I do not really understand what it does, can you explain?
moldorcoder7 has joined #ruby
<depesz> FullMetalStacker: which part is not clear?
<depesz> FullMetalStacker: in irb, try what arr=[....] arr.shift(3) does
<FullMetalStacker> I understood the shift part but not the push and then the combination of both
<FullMetalStacker> now i got it
<FullMetalStacker> this is fucking brilliant :-)
<FullMetalStacker> learned a ton of things by this!!!!!
<FullMetalStacker> thank you so much. It humiliates me in showing me how much there is still for me to learn out there!
<FullMetalStacker> not humiliates but humbles i meant
<FullMetalStacker> thank you very much depesz!!
<FullMetalStacker> This IRC channel is more worth than gold. Hope that one day I will be able to pay it forward here
<depesz> FullMetalStacker: :) sorry, i suck at explaining, glad you got it :)
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
otisolsen70_ has joined #ruby
otisolsen70 has quit [Ping timeout: 260 seconds]
croberts has joined #ruby
grokify has joined #ruby
grokify has quit [Ping timeout: 256 seconds]
<FullMetalStacker> depesz speaking about humbling and humiliation... here is my result https://dpaste.org/HWEc5
<FullMetalStacker> and here is what the top student submitted to solve this exercise that I was solving:
<FullMetalStacker> n**3
<FullMetalStacker> def row_sum_odd_numbers(n)
<FullMetalStacker> end
<adam12> LOL
<FullMetalStacker> LOL I got still a lot to learn ahead of me! But I am happy I could solve it anyway, thanks again for your great help!!
<adam12> how does n**3 even work. What's the input?
<FullMetalStacker> For anyone interested, this was the assignment:
Linux_Kerio has joined #ruby
<adam12> Ah interesting.
<adam12> A variation of Pascal's triangle.
<FullMetalStacker> So there I went and built that entire pyramid in my solution and solved it with 11 lines of code step by step in the way I saw the pyramid of numbers...
<FullMetalStacker> And then came along the mathematical mind who actually understood mathematically what this is all about and solved it with 4 characters only *ROFLCOPTER* :-D
<adam12> FullMetalStacker: Gotta start somewhere.
<adam12> FullMetalStacker: I think your solution is fine.
<adam12> I probably would have done something similar. I'm not intimately familiar with Pascal's triangle, and in some ways, you're not really learning anything with the 1 liner.
<FullMetalStacker> thanks adam12, you are too kind. I appreciate your kindness with noobs like me :-D
<adam12> If anything, I'd take the opportunity to build on that. Add a simple unit test, use some Enumerable methods, look to reduce loops, etc.
<adam12> Could use Enumerator#produce too, maybe. Lots of fun.
<FullMetalStacker> thanks adam12 I will add that to my notes and train it!
some14u has joined #ruby
hightower2 has joined #ruby
dionysus69 has quit [Quit: dionysus69]
dionysus69 has joined #ruby
alexherbo2 has joined #ruby
dionysus69 has quit [Ping timeout: 260 seconds]
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Mikaela has joined #ruby
Aminda has quit [Ping timeout: 255 seconds]
hightower2 has quit [Read error: Connection reset by peer]
grokify has joined #ruby
grokify has quit [Ping timeout: 260 seconds]
Averna has joined #ruby
grokify has joined #ruby
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
grokify has quit [Ping timeout: 256 seconds]
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
grokify has joined #ruby
grokify has quit [Ping timeout: 260 seconds]
TomyWork has quit [Remote host closed the connection]
moldorcoder7 has quit [Ping timeout: 260 seconds]
aeris has quit [Ping timeout: 255 seconds]
aeris has joined #ruby
some14u has joined #ruby
_ht has joined #ruby
alexherbo2 has quit [Remote host closed the connection]
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
some14u has joined #ruby
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
m_antis_ has quit [Quit: ZNC - https://znc.in]
m_antis has joined #ruby
cryptkeeper has joined #ruby
reset has joined #ruby
Linux_Kerio has quit [Ping timeout: 264 seconds]
otisolsen70_ has quit [Quit: Leaving]
FullMetalStacker has quit [Remote host closed the connection]
ur5us has joined #ruby
sagax has joined #ruby
supay has quit [Quit: Connection closed for inactivity]
tirnanog has joined #ruby
some14u has joined #ruby
_ht has quit [Quit: _ht]
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
some14u has joined #ruby
some14u has quit [Client Quit]
Averna has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Averna has joined #ruby
dionysus69 has joined #ruby
Averna has quit [Ping timeout: 268 seconds]
some14u has joined #ruby
RetroPunk has quit [Quit: ZNC 1.8.2+deb2build5 - https://znc.in]
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
smp has quit [Quit: ZNC 1.8.2 - https://znc.in]
Linux_Kerio has joined #ruby
smp has joined #ruby
gonix has joined #ruby
gonix has quit [Remote host closed the connection]
gonix has joined #ruby
gonix has quit [Ping timeout: 248 seconds]
dionysus69 has quit [Ping timeout: 268 seconds]
crundar has joined #ruby
infernix has quit [Quit: ZNC - http://znc.sourceforge.net]
grokify has joined #ruby
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
cartdrige has joined #ruby
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
nmollerup has quit [Remote host closed the connection]
grokify has quit [Remote host closed the connection]
nmollerup has joined #ruby
moldorcoder7 has joined #ruby
c10l has quit [Quit: See ya! o/]
grokify has joined #ruby
stirl has joined #ruby
crundar has quit [Quit: Client closed]
grokify has quit [Ping timeout: 260 seconds]
infernix has joined #ruby
FetidToot1 has joined #ruby
FetidToot has quit [Ping timeout: 264 seconds]
FetidToot1 is now known as FetidToot
c10l has joined #ruby
moldorcoder7 has quit [Ping timeout: 264 seconds]