havenwood changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.1.1, 3.0.3, 2.7.5: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://goo.gl/wpGhoQ
taupiqueur has quit [Remote host closed the connection]
taupiqueur_ has joined #ruby
hack3r_v_ has quit []
<weaksauc_> yeah it's so well written apotheon
<apotheon> It's so well written it just pulled me along, straight through, almost like I was reading a good novel.
Thanzex has joined #ruby
<apotheon> It's also extremely well planned out, with excellent coverage of subjects that are important for writing good, idiomatic Ruby code.
<weaksauc_> metaprogramming ruby was pretty good too but i'm not sure i loved the style of it
<weaksauc_> content wise it was great
<apotheon> It's a good book, but not what I'd recommend for what sam113101 asked.
<weaksauc_> oh yeah for sure
<apotheon> It's kind of amazing how many *really good* books I've read for Ruby.
<apotheon> Before Eloquent Ruby, I would've recommended Everyday Script With Ruby, which was also quite good -- but not quite as great as Eloquent Ruby.
<sam113101> which version of ruby does it cover
<sam113101> I think I read The Well-Grounded Rubyist in the past
<sam113101> not sure if they kept it updated
<weaksauc_> sam113101 ruby 2ish
<ox1eef> youd be best buying one of the suggested books for a refresher, then following along on the interet for the most recent info
roadie has joined #ruby
taupiqueur has joined #ruby
taupiqueur_ has quit [Ping timeout: 240 seconds]
taupiqueur has quit [Read error: Connection reset by peer]
taupiqueur has joined #ruby
Guest3952 has quit [Ping timeout: 256 seconds]
taupiqueur has quit [Read error: Connection reset by peer]
taupiqueur has joined #ruby
taupiqueur has quit [Read error: Connection reset by peer]
taupiqueur has joined #ruby
roadie has quit [Quit: ERC (IRC client for Emacs 25.3.50.1)]
TCZ has joined #ruby
ikowasz has joined #ruby
swaggboi has quit [Quit: C-x C-c]
taupiqueur has quit [Read error: Connection reset by peer]
taupiqueur has joined #ruby
swaggboi has joined #ruby
taupiqueur has quit [Read error: Connection reset by peer]
taupiqueur has joined #ruby
bluedust has joined #ruby
TCZ has quit [Quit: Leaving]
taupiqueur has quit [Read error: Connection reset by peer]
taupiqueur has joined #ruby
taupiqueur_ has joined #ruby
taupiqueur has quit [Ping timeout: 240 seconds]
taupiqueur_ has quit [Ping timeout: 240 seconds]
taupiqueur has joined #ruby
Sheilong has quit []
ikowasz has quit [Remote host closed the connection]
taupiqueur_ has joined #ruby
taupiqueur has quit [Ping timeout: 272 seconds]
Rounin has quit [Ping timeout: 240 seconds]
bluedust_ has joined #ruby
bluedust has quit [Ping timeout: 272 seconds]
taupiqueur_ has quit [Read error: Connection reset by peer]
bluedust_ has quit [Remote host closed the connection]
bluedust has joined #ruby
bluedust_ has joined #ruby
taupiqueur has joined #ruby
bluedust has quit [Ping timeout: 240 seconds]
taupiqueur has quit [Read error: Connection reset by peer]
taupiqueur has joined #ruby
donofrio has joined #ruby
<nakilon> imagine there is a website where users register and create their data; now I want to make own (web)app for users to import/proess the data from that website that is not mine and that has no API
<nakilon> I don't want to store users' password but what else then? cookie? how do I make it user friendly to pass me their cookies?
dka has quit [Quit: My Ex-Girlfriend once told me: I'm not a slut, I'm just popular]
dka has joined #ruby
dka has quit [Read error: Connection reset by peer]
dka has joined #ruby
taupiqueur_ has joined #ruby
taupiqueur has quit [Ping timeout: 240 seconds]
bluedust has joined #ruby
dka has quit [Remote host closed the connection]
dka has joined #ruby
bluedust_ has quit [Ping timeout: 240 seconds]
bluedust_ has joined #ruby
bluedust has quit [Ping timeout: 240 seconds]
<mksybr> secure web app would use csrf nonce to prevent that replay attack, not sure good way
taupiqueur_ has quit [Ping timeout: 272 seconds]
<nakilon> yeah that might be a problem too, didn't try yet
taupiqueur has joined #ruby
<nakilon> the thing is there is an unknown yet amount of websites that I want my users to be able to import/export data between
<nakilon> to make it able to easlity migrate or use multiple services at the same time without need to sync data manually item by item that is the only way for them at the moment
taupiqueur_ has joined #ruby
taupiqueur has quit [Read error: Connection reset by peer]
bluedust_ has quit [Remote host closed the connection]
bluedust has joined #ruby
taupiqueur has joined #ruby
taupiqueur_ has quit [Read error: Connection reset by peer]
taupiqueur has quit [Ping timeout: 272 seconds]
taupiqueur has joined #ruby
taupiqueur_ has joined #ruby
taupiqueur has quit [Read error: Connection reset by peer]
bluedust has quit [Remote host closed the connection]
bluedust has joined #ruby
bluedust has quit [Ping timeout: 240 seconds]
taupiqueur has joined #ruby
taupiqueur_ has quit [Ping timeout: 272 seconds]
taupiqueur has quit [Ping timeout: 240 seconds]
teclator has joined #ruby
taupiqueur has joined #ruby
taupiqueur has quit [Ping timeout: 256 seconds]
taupiqueur has joined #ruby
taupiqueur has quit [Read error: Connection reset by peer]
taupiqueur has joined #ruby
bluedust has joined #ruby
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
taupiqueur has quit [Ping timeout: 250 seconds]
___nick___ has joined #ruby
taupiqueur has joined #ruby
taupiqueur_ has joined #ruby
taupiqueur has quit [Ping timeout: 256 seconds]
hololeap has quit [Remote host closed the connection]
taupiqueur_ has quit [Remote host closed the connection]
taupiqueur has joined #ruby
donofrio has quit [Ping timeout: 272 seconds]
___nick___ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
___nick___ has joined #ruby
___nick___ has quit [Client Quit]
___nick___ has joined #ruby
taupiqueur has quit [Read error: Connection reset by peer]
taupiqueur has joined #ruby
taupiqueur_ has joined #ruby
bluedust has quit [Remote host closed the connection]
bluedust has joined #ruby
taupiqueur has quit [Ping timeout: 240 seconds]
taupiqueur_ has quit [Read error: Connection reset by peer]
bluedust has quit [Ping timeout: 272 seconds]
taupiqueur has joined #ruby
_ht has joined #ruby
taupiqueur has quit [Ping timeout: 272 seconds]
taupiqueur has joined #ruby
gproto23 has joined #ruby
smp has joined #ruby
shiru has joined #ruby
gproto23 has quit [Ping timeout: 272 seconds]
taupiqueur has quit [Quit: taupiqueur]
Rounin has joined #ruby
Aylat has joined #ruby
Aylat has quit [Changing host]
Aylat has joined #ruby
factor has quit [Read error: Connection reset by peer]
factor has joined #ruby
Guest3952 has joined #ruby
Guest3952 has quit [Ping timeout: 256 seconds]
Guest3952 has joined #ruby
Aylat has quit [Quit: Leaving]
fef has joined #ruby
gproto23 has joined #ruby
mdr has quit [Quit: reboot]
legit has joined #ruby
bluedust has joined #ruby
bluedust has quit [Ping timeout: 256 seconds]
Tempesta has quit [Quit: See ya!]
Tempesta has joined #ruby
Tempesta has quit [Ping timeout: 265 seconds]
Tempesta has joined #ruby
shiru has quit [Quit: leaving]
bluedust has joined #ruby
gproto23 has quit [Ping timeout: 256 seconds]
donofrio has joined #ruby
gproto23 has joined #ruby
roadie has joined #ruby
bluedust_ has joined #ruby
bluedust has quit [Read error: Connection reset by peer]
bluedust has joined #ruby
bluedust_ has quit [Ping timeout: 256 seconds]
foxxx0 has quit [Quit: foxxx0]
foxxx0 has joined #ruby
foxxx0 has quit [Quit: foxxx0]
foxxx0 has joined #ruby
jimeh has quit [Remote host closed the connection]
jimeh has joined #ruby
roadie has quit [Quit: ERC (IRC client for Emacs 25.3.50.1)]
gr33n7007h has quit [Quit: WeeChat 3.4]
<mooff> fibers are strange
<mooff> i couldn't solve the "do asynchronous thing synchronously" thing with them
<mooff> in the end, what's working is: Queue.new.tap { |q| do_async_thing { |result| q << result } }.pop
teclator has joined #ruby
ule has quit [Quit: restart]
hololeap has joined #ruby
donofrio has quit [Ping timeout: 256 seconds]
seninha has joined #ruby
ule has joined #ruby
<seninha> Hello, any enumerable/array method that creates an array of [index, element] pairs, like [3, 8, 2, 7].my_method => [[0,3], [1,8], [2,2], [3,7]]
<seninha> ?
libsys has quit [Ping timeout: 250 seconds]
libsys has joined #ruby
bluedust has quit [Remote host closed the connection]
<mooff> :: [5,6,7].each_with_index.to_a
<ruby-eval> => [[5, 0], [6, 1], [7, 2]]
<mooff> :: [5,6,7].each_with_index.map(&:reverse)
<ruby-eval> ERROR: undefined method `reverse' for 5:Integer
<ruby-eval> (eval):1:in `each'
<ruby-eval> (eval):1:in `map'
<ruby-eval> (eval):1:in `each'
<ruby-eval> (eval):1:in `each_with_index'
<mooff> :: [5,6,7].each_with_index.to_a.map(&:reverse)
<ruby-eval> => [[0, 5], [1, 6], [2, 7]]
<mooff> seninha: ^.o
<ule> [3, 8, 2, 7].each_with_index.map { |x,i| [i, x] }
<ule> => [[0, 3], [1, 8], [2, 2], [3, 7]]
<seninha> mooff, ule: thanks
kaivai has quit [Quit: ZNC - https://znc.in]
kaivai has joined #ruby
Guest3952 has quit [Ping timeout: 256 seconds]
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
bluedust has joined #ruby
seninha has quit [Quit: ChatZilla 0.9.93 [SeaMonkey 2.53.10.2/20220226204633]]
Guest3952 has joined #ruby
jimeh has quit [Remote host closed the connection]
jimeh has joined #ruby
finstern1s is now known as finsternis
fef has quit [Ping timeout: 240 seconds]
libsys has quit [Ping timeout: 256 seconds]
libsys has joined #ruby
analogsalad has joined #ruby
analogsalad has quit [Quit: bye]
eddof13 has joined #ruby
___nick___ has quit [Ping timeout: 256 seconds]
TCZ has joined #ruby
jimeh has quit [Remote host closed the connection]
jimeh has joined #ruby
<havenwood> mooff: Check out this writeup https://brunosutic.com/blog/ruby-fiber-scheduler
<mooff> thanks havenwood
<mooff> from the docs, the schedular thing sounds very useful and very complicated to do right
<havenwood> mooff: The Async gem is by the member of Ruby core responsible for Fiber or Fiber Scheduler gem is extracted from that work.
_aeris_ has joined #ruby
<havenwood> You *can* do your own Fiber Scheduler, but super simple to just use the Fiber::Scheduler gem: https://github.com/bruno-/fiber_scheduler
aeris has quit [Ping timeout: 240 seconds]
<havenwood> It would be reasonable for Ruby to just ship with that, but simple to use as a gem and has no deps.
_aeris_ is now known as aeris
<havenwood> Fiber.schedule { sleep 2 # async }
<mooff> awesome
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<mooff> can a scheduler interrupt a running fiber?
<mooff> i mean, i see how that wouldn't make sense
<mooff> i can't put my finger on it. it feels very complex!
eddof13 has joined #ruby
<havenwood> mooff: Yeah, Fiber evented reactors aren't simple to create but they're easy to use.
gproto23 has quit [Remote host closed the connection]
jimeh has quit [Remote host closed the connection]
jimeh has joined #ruby
TCZ has quit [Quit: Leaving]
<mooff> it's like a construction set for a JavaScript-style event loop
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<mooff> Go achieves its cooperative scheduling by calls to yield sprinkled very liberally throughout the stdlib
<mooff> Fibers are a very weird, very manual, probably very useful retrofit of those two ideas into Ruby
eddof13 has joined #ruby
<mooff> could you implement a scheduler like Go's, running tasks in parallel on multiple threads?
_ht has quit [Remote host closed the connection]
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eddof13 has joined #ruby
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jimeh has quit [Remote host closed the connection]
jimeh has joined #ruby
eddof13 has joined #ruby
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
roadie has joined #ruby
eddof13 has joined #ruby