Skip to content
This repository has been archived by the owner on Jul 15, 2020. It is now read-only.

magic_cloud: Ruby word cloud #5

Open
zverok opened this issue Feb 23, 2018 · 5 comments
Open

magic_cloud: Ruby word cloud #5

zverok opened this issue Feb 23, 2018 · 5 comments
Labels
active Active project gem Ruby gem

Comments

@zverok
Copy link
Owner

zverok commented Feb 23, 2018

Project

magic_cloud is somewhat outdated, yet production-used pretty word cloud generator. It can be made faster, more configurable, with cleaner API.

Plan

Just some semi-random thoughts:

  • Faster layouting (maybe with C or Rust extension, millions of bit operations aren't cheap);
  • More flexible API to configure sizes, fonts, colors, layouting randomness and so on;
  • Docs and specs (spec for random layouting, and for graphics are both incredibly challenging).

Importance

While most of the today's visualizations are indeed done in a browser with D3.js or something like it, server-side generation still can be useful (for PDF reports, including in emails, visualizing simple scripting experiments, this kind of things).

Skills and domains

This task will include a lot of tinkering with image libraries (maybe porting to vips?) and optimization (calculating precise word positions in "pretty randomness" is slooow).

@zverok zverok added active Active project gem Ruby gem labels Feb 23, 2018
@gvjordan
Copy link

Hey @zverok , Are you still looking for someone to contribute to this? I'm interested in working on it if so. Admittedly, I've somewhat recently picked up ruby but have some previous experience in other languages, however, lack some fundamentals (use of tests) Funny enough, I saw your github before when I was first looking into ruby. Guess I managed to find my way back here in the process of trying to get it to run.

@zverok
Copy link
Owner Author

zverok commented Oct 11, 2019

@gvjordan Yes, I still am :)
What task would you like to take on? Or do you want me to come with ideas of what can be done there?

@gvjordan
Copy link

I apologize for the late response. Some direction would be helpful I think. Do you think it would be better to port to vips, then build from that or start with something else?

@zverok
Copy link
Owner Author

zverok commented Oct 23, 2019

@gvjordan For what I know, libvips is still not that popular, comparing to (flawed yet omnipresent) ImageMagick, so probably porting to vips could be just a waste of work.

So, depending on what you find the most interesting task for you, what you can do with this library is one of two things:

  1. Optimize it to be faster. Probably this means either hard profiling (which I already did, but maybe some approaches are overlooking) or optimizing bit arithmetics with C code (third-party "bit array" gem or customly written)
  2. Make it nicer to use. Some ideas could be seen here: https://github.com/zverok/magic_cloud/compare/simplify, and also in PR discussion here: Allow to use custom font magic_cloud#7 (adding new option and how it may look)

Basically, either you want to not touch algorithms deeply, just add some nice features to the API and make it more modern, simple and well-documented, or you want to dive deep into C code, algorithms and optimizations :)

@anvox
Copy link

anvox commented Jun 17, 2020

@zverok sorry for silent for a long time. Do you still have time for this magic_cloud? I really like the way you reorganize code in simplify branch and want to make it official release.
I don't have deep knowledge in image libraries or C code below but I could try it. Performance optimization is also a field I interested in.

Let's discuss what to start. I prefer to finish zverok/magic_cloud#7 and simplify branch first.

Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
active Active project gem Ruby gem
Projects
None yet
Development

No branches or pull requests

3 participants