Lulz on demand
This is a joint repo for:
- the rofld meme server (
src/server
) - the rofl crate which powers it (
src/lib
) - [WIP] the roflsh CLI application (
src/cli
)
To make memes, not war.
Lulz on demand
Lulz on demand
This is a joint repo for:
src/server
)src/lib
)src/cli
)To make memes, not war.
It is probably be a bug in Cargo but noting it here for posterity.
Rebuilding the library crate always triggers a rebuild of certain dependencies:
$ cargo build -p rofl
Compiling unreachable v0.1.1
Compiling thread_local v0.3.3
Compiling regex v0.2.2
Compiling rofl v0.0.1 (file:///home/xion/Code/rofld/src/lib)
Finished dev [unoptimized + debuginfo] target(s) in 23.69 secs
and more so for the server crate:
$ cargo build -p rofld
Compiling unreachable v0.1.1
Compiling thread_local v0.3.3
Compiling slog-extra v0.1.2
Compiling regex v0.2.2
Compiling slog-stream v1.2.1
Compiling slog-term v1.5.0
Compiling slog-stdlog v1.1.0
Compiling slog-envlogger v0.5.0
Compiling rofl v0.0.1 (file:///home/xion/Code/rofld/src/lib)
Compiling rofld v0.0.1 (file:///home/xion/Code/rofld/src/server)
Finished dev [unoptimized + debuginfo] target(s) in 56.76 secs
This persists not only through cargo clean
or nuking of Cargo.lock
, but also apparently between machines AND systems (observed on OSX and Linux). The deps which are rebuilt needlessly are always the same.
It may have started happening with Rust 1.18 but not completely sure about that. In either case, it adds quite a bit to the already long build time :(
RIght now the meme text is always line-wrapped with a constant size. Sometimes wrapping is undesirable though, so the other mode to support would be to shrink the text (within reason) until it fits the line.
This would be a new per-caption setting, say:
pub enum Overflow { Wrap, Shrink }
In addition to --preload
, --watch
would set up an inotify subscription to automatically load & cache any templates/fonts put into relevant folders.
(--watch
would not require --preload
, but would imply it (for the same arguments) if used without & emit a warning).
Here, this crate causes UB by "Producing an invalid value". Concretely, it produces a value of type VAlign
with mem::uninitialized()
, but enums must always be in one of their variants. In the near future the call to mem::uninitialized()
will panic to avoid UB, and our crater run determined that this crate will be affected.
mem::uninitialized()
is deprecated since Rust 1.39. The intended replacement is MaybeUninit
, which tracks the possibility of uninitialized values at the type level to make sure the compiler does not make any false assumptions.
The unicode-width
crate determines the character width of Unicode strings, and should most likely be used for the line breaking algo. It's unclear if it can completely help with the clipping/overflowing issue we see sometimes, but it should at least allow to detect the invisible/zero-width characters more robustly.
Lines of text aren't broken currently, so anything too long will be clipped.
Because obviously.
The part that does actual captioning of images is mostly independent from the rest of the binary. It could be made into a library crate and published on crates.io.
Basic line breaking is in, but it has the following problems:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.