News for hackers. Stuff that matters.

ioquatix

Re:What's New in Ruby on Rails 8 on Tuesday October 08, 2024 @11:59PM (#41784403)
Have you actually benchmarked this and published the benchmarks somewhere?
Re:Philosophy of Coroutines on Friday September 01, 2023 @08:56PM (#37357711)
https://github.com/socketry/async uses coroutines and I think in general it’s been a great model with very few downsides in practice.
Sounds like a useful feature to me.
Re:All Programming Philosophies Are About State on Tuesday February 07, 2023 @12:06AM (#34688996)
"All Programming is about State". All code is state. All state is code. It's turtles all the way down.
Re:Efficient IO in Linux with io_uring [pdf] on Sunday October 16, 2022 @05:32AM (#33222367)
It's adopted by Ruby: <https://github.com/socketry/io-event> which is used by <https://github.com/socketry/async> which is part of the Ruby 3+ Fiber Scheduler for light weight concurrency. It shows promising performance.
Re:Async Ruby on Tuesday November 02, 2021 @05:04PM (#29087338)
The fiber scheduler also hooks into the `Timeout` module to provide safe(r) timeouts using the event loop.
Re:Async Ruby on Saturday October 30, 2021 @05:02PM (#29052274)
Every task is a promise you can wait on for the result. Concurrent fan out is trivial.
Re:Async Ruby on Saturday October 30, 2021 @05:01PM (#29052263)
That's pretty accurate.
Re:Async Ruby on Saturday October 30, 2021 @03:45PM (#29051756)
The gem namespace was transferred to me some time around 2017.
Re:Async Ruby on Saturday October 30, 2021 @03:43PM (#29051742)
ActiveRecord does work but it’s hugely limited because they have explicit per-thread resource pools which we can’t get around very easily.
Re:Async Overloading on Monday August 30, 2021 @07:35PM (#28362239)
> When designing an API in Rust which performs IO, you have to make a decision whether you want it to be synchronous, asynchronous, or both.

Why must that be true? Why can't you write the interface once, and have concurrency be an implementation detail?

So what are we going to do about it?
Extinction :(
Re:Ruby 3 JIT can make Rails faster on Sunday May 23, 2021 @03:09AM (#27252997)
Nope, they are totally different. However, the DB gem is an interface/driver similar to PHP's PDO, while AR is a set of drivers, interfaces and high level ORM interfaces. In theory, one could probably use DB as a driver under AR. One person even basically uses AR to generate SQL and then executes it with the DB gem, which I thought was pretty clever.
Re:Ruby 3 JIT can make Rails faster on Friday May 21, 2021 @08:46PM (#27242007)
The fiber scheduler solves this as concurrent execution is now built into the core of Ruby 3.
Re:Ruby 3 JIT can make Rails faster on Friday May 21, 2021 @08:45PM (#27242002)
Also, it turns out the `pg` is also partially non-blocking. But AR may need to improve their connection pool implementation.
Re:Ruby 3 JIT can make Rails faster on Friday May 21, 2021 @04:51PM (#27239801)
Re:Git as a NoSql Database (2016) on Friday April 09, 2021 @05:53PM (#26756656)
Yes, it was. It was originally a front end and back end (query server) for CouchDB. But CouchDB 2 really went in a different direction to what I expected with query servers so I gave up and decided to pivot in a different direction with the code base.

https://github.com/ioquatix/relaxo-query-server FYI.

Re:Git as a NoSql Database (2016) on Monday April 05, 2021 @05:00PM (#26704666)
Re:Why Wasn't Ruby 3 Faster? on Wednesday February 10, 2021 @09:08PM (#26097428)
This problem is being addressed in Ruby 3.
Re:Ruby 3.0 and the new FiberScheduler interface on Tuesday December 29, 2020 @08:32PM (#25577318)
Ruby FFI has been experimenting with provided support for kicking external functions to background threads with a single keyword argument.
Re:Ruby 3.0 and the new FiberScheduler interface on Tuesday December 29, 2020 @06:45PM (#25576506)
We can do the same model for Ruby (preemption of event driven fibers) and may choose to do so in the future. We are just taking one step at a time.
Re:Ruby 3.0 and the new FiberScheduler interface on Tuesday December 29, 2020 @06:42PM (#25576487)
Yes, you run one scheduler per core.
Re:Ruby 3.0.0 RC1 on Friday December 25, 2020 @02:01AM (#25534815)
async/await is a huge anti-pattern IMHO.
Re:Ruby 3.0.0 RC1 on Friday December 25, 2020 @02:00AM (#25534812)
Well, it's not a list. It's just a set of hooks. But that's basically it.
Re:Blink: Intent to Remove: HTTP/2 and gQUIC server push on Wednesday November 11, 2020 @10:02PM (#25065937)
Actually... I've implemented both client and server side HTTP/2 push and I'd say... it's a hack and we should deprecate it and remove it from the spec.
Re:Ruby 3.0 Preview 1 on Saturday September 26, 2020 @06:30AM (#24597727)
Yes, it lets you implement event loop for Ruby. We use fibers to avoid callback hell and avoid rewriting existing code. This is covered in my talk here: https://www.youtube.com/watch?v=qKQcUDEo-ZI
Re:Ruby 3.0 Preview 1 on Friday September 25, 2020 @06:24PM (#24594733)
Latest talk about scheduler: https://www.youtube.com/watch?v=Y29SSOS4UOc

Recent summary of scheduler, a little bit out of date (changes to interface): https://www.codeotaku.com/journal/2020-04/ruby-concurrency-f...

Older »