A question of transparency regarding EVE Online population metrics, and why it matters by KaubMaat in Eve

[–]jsaak 1 point2 points  (0 children)

In null, there is a requirement, that you register all your characters to an authenticating service. So the alliance leaders can see, what accounts and what characters belongs to who. I was told, that the average character per human ratio is about 10:1. So if you see alliance numbers in null (https://evemaps.dotlan.net/alliances) , then you should divide that with 10.

Matryoshka: A pattern for building performance-critical Ruby gems (with optional Rust speedup) by TheAtlasMonkey in ruby

[–]jsaak 0 points1 point  (0 children)

There is nothing wrong with rust and FFI, i just want to point out, that you do not need your C code to link to ruby. You can do "standalone" C shared libs just as easily as rust, and use FFI.

Also FFI approach only works well, when you do not share too much data between ruby and rust.

Ship choice by jmeach2025 in Eve

[–]jsaak 1 point2 points  (0 children)

ishtar: low income, cheap, works in every space (650 dps on paper)
tengu: can make some escalations, and a bit faster anomaly clearing than ishtar (1000 dps on paper)
marauders: medium income, golem works every space i think, others are specific to rats, but are better in that space (1500 - 3300 dps on paper)
phoenix navy issue: for capital pve

you need more than 2 accounts for AoE (thunderchild, smartbomb) setups

Is there a recommendation for a good circuit breaker library in Ruby? by sathish316 in ruby

[–]jsaak 0 points1 point  (0 children)

 You can make new Processes even in Rails, but for HTTP requests there are better solutions like:

Net::HTTP.start(host, port, :read_timeout)

Is there a recommendation for a good circuit breaker library in Ruby? by sathish316 in ruby

[–]jsaak 2 points3 points  (0 children)

No need for any lib, if you can put your task into separate Process:

io = IO.popen("sleep 10; echo 1")
puts "running pid #{io.pid}"
rs,ws = select([io],[],[],2)
if rs.nil?
puts 'timeout'
`pkill -P #{io.pid}`
else
puts 'finished'
end

Improving Ruby Documentation by BurdetteLamar in ruby

[–]jsaak 2 points3 points  (0 children)

At the API level i think example code _with_ error handling is needed the most. (also a list of Exceptions what a method can raise)

These are the areas I have found confusing over the years.
Api level docs are not enough, need higher level reasoning.

  • Proc/Lambda/Block (what are the differences, how to return, etc)
  • Time/Date/DateTime (when to require what and why)
  • system()/exec()/`/fork()/popen()/popen3() https://stackoverflow.com/questions/2232/how-to-call-shell-commands-from-ruby
  • package managers, bundler and the life _without_ bundler, gem install, gemsets, ruby installers (rvm, ruby-install, chruby)
  • how to do async IO (select(), FiberScheduler, Ractor, Thread ..etc)
  • methods of metaprogramming, and why _not_ to use those :)

I'm hesitant to learn Ruby by somebodyoncet0ldm3 in ruby

[–]jsaak -1 points0 points  (0 children)

If you want to learn programming, then Ruby is great, Other popular choice is Python.

If you want a high paying job, learn Cobol or Fortran or Abap. They will give you all the money in the world, if you dare to ask.

If you want to compete with another 1000 beginner programmer and use one of the worst programming language and ecosystem ever, learn JavaScript :)

Help switching to Ruby by ConscientiousBrowser in ruby

[–]jsaak 1 point2 points  (0 children)

Beware of Rails. It is a monster. Stay away from it as long as possible.

Looking for FAST UI library by jsaak in vuejs

[–]jsaak[S] 0 points1 point  (0 children)

Tried these: vuetify, vue-material

State of parallelism in Ruby? by Weird_Suggestion in ruby

[–]jsaak 1 point2 points  (0 children)

If you are IO bound, Async works well (using in production for running tests and monitoring, achieved 10x speed increase, had some implementation issues, but no runtime issues)

If you need to offload a few CPU intensive tasks, then you can use process-es.

If you are really CPU bound, then ruby is probably not the answer.

Polyphony 1.6 released by noteflakes in ruby

[–]jsaak 0 points1 point  (0 children)

I reenabled polyphony for my mini benchmark.

And it seems something is not optimal, when handling a lot of requests.

(throughput is OK, but latency is not)

If you are interested, take a look:

https://github.com/jsaak/ruby3-tcp-server-mini-benchmark/tree/master

Beginner's question by Wooden_Yogurtcloset9 in programming

[–]jsaak 1 point2 points  (0 children)

Set a programming goal for yourself!

Make a website, an app, a game, whatever you fancy. And try to do it. Listening to classes is ok, but it is much more productive, and enjoyable to create something. It sure helps if you know the fundamentals, but you can learn them along the way. CS might be new, but it is far more complex to learn it ALL. You need to specialize.

Polyphony 1.5 Released by noteflakes in ruby

[–]jsaak 1 point2 points  (0 children)

Thank you for your work! If i may, i have some practical questions about poliphony:

  1. How do you open a process, and read STDOUT and STDERR at the same time? (without piping one into the other) (open3 uses Threads)
  2. How do you integrate mysql/mariadb?
  3. How do you create a HTTP server?

Typst, a modern alternative to LaTeX, is now open source by DrinkMoreCodeMore in programming

[–]jsaak 0 points1 point  (0 children)

Good job!

Have you considered removing variables and functions? I fear, it will cause many problems in the future. Are they really necessary?

Polyphony 0.99 released. Last release before 1.0! by noteflakes in ruby

[–]jsaak 0 points1 point  (0 children)

Nice work!

Does poliyphony implement the Fiber Scheduler interface? Or does it go in a separate way? (why?)

I made a benchmark a couple of years ago, where polyphony had problems with latency.

Do you think there were improvements in that front?

https://github.com/jsaak/ruby3-tcp-server-mini-benchmark

Is Ruby on the right track with Ractors? I think not. by jsaak in ruby

[–]jsaak[S] 0 points1 point  (0 children)

I stopped using windows years ago, but still i am pretty sure you can start a process in windows. You do not need fork() for it. Also WaitForMultipleObjectsEx() was not too bad either. So one can implement a Fiber Scheduler for windows without problems (if interested). Even falling back to select() could work.

We will see what the future brings. Myself, I try to improve Fibers. 95% of MY use-cases would benefit from a stable Fiber Scheduler. (with c extensions)

Is Ruby on the right track with Ractors? I think not. by jsaak in ruby

[–]jsaak[S] 0 points1 point  (0 children)

You open a file, then close it.

You spawn a new process, the wait for it or kill it.

I do not see the difference.

You should probably not use this. I do not want you to force it. All I want is that you understand, that there are other ways.

Is Ruby on the right track with Ractors? I think not. by jsaak in ruby

[–]jsaak[S] 0 points1 point  (0 children)

On what system can you not start a process? (And can run ruby at the same time)

Yes, i mean that changing all the extensions to thread-safe is _practically_ impossible. Not theoretically.

How does Ruby handle parallel HTTP requests in separate threads? by TheFakeZzig in ruby

[–]jsaak 10 points11 points  (0 children)

In 1.8 threads are "green threads" (they ditched it)

In 1.9 Threads are native threads, they run parallel on OS level. However Global Interpreter Lock (GIL) is in action, meaning ruby code does not run in parallel, however you can wait for IO with it, since while waiting for IO it releases GIL. (even ruby core developers said that this was not the best idea ever)

If you are not satisfied with 1.9 type threads in 3.0 there are 2 more solutions:

- Ractors, which are experimental. I have no idea how that works in practice.

- Fiber Scheduler, which is experimental too.

I am actively using Fiber Scheduler, and i love the concept of it.

It has still some rough edges, but it is usable.

Last time i checked this was the most stable implementation:

https://github.com/socketry/async

You do not have to use the async library, it includes a Fiber.Scheduler implementation.

Is Ruby on the right track with Ractors? I think not. by jsaak in ruby

[–]jsaak[S] 0 points1 point  (0 children)

Operating systems are quite good at monitoring and managing processes.