This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defp deps do | |
[ | |
{:phoenix, "~> 1.5.3"}, | |
{:phoenix_ecto, "~> 4.1"}, | |
{:ecto_sql, "~> 3.4"}, | |
{:postgrex, ">= 0.0.0"}, | |
{:phoenix_html, "~> 2.11"}, | |
{:phoenix_live_reload, "~> 1.2", only: :dev}, | |
{:phoenix_live_dashboard, "~> 0.2.0"}, | |
{:telemetry_metrics, "~> 0.4"}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// NOTE: PageRenderer translates coordinates and offsets relative to the start of the page | |
// to coordinates relative to the backing MultiParagraph, calls functions on it, and | |
// translates the return values | |
package org.danielzfranklin.librereader.ui.screen.reader.paginatedText | |
import android.os.Parcelable | |
import androidx.compose.foundation.gestures.* | |
import androidx.compose.foundation.text.selection.* | |
import androidx.compose.runtime.* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ 16.214205] evdi: [I] Initialising logging on level 5 | |
[ 16.214206] evdi: [I] Atomic driver:yes | |
[ 59.420823] evdi: [D] evdi_add_devices:156 Increasing device count to 1 | |
[ 59.421071] evdi: [D] evdi_crtc_init:389 drm_crtc_init: 0 p0000000056e75eba | |
[ 59.421096] evdi: [D] evdi_detect:94 (dev=0) poll connector state: disconnected | |
[ 59.421110] evdi evdi.0: [drm] Cannot find any crtc or sizes | |
[ 59.421130] evdi: [W] evdi_painter_send_update_ready_if_needed:575 Painter does not exist! | |
[ 59.421553] [drm] Initialized evdi 1.7.0 20200327 for evdi.0 on minor 1 | |
[ 59.493736] evdi: [D] evdi_detect:94 (dev=0) poll connector state: disconnected | |
[ 59.493784] evdi: [D] evdi_painter_framebuffer_size:511 Scanout buffer not set. |

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use ring::digest::{Algorithm, Context, Digest}; | |
use std::{fmt, io}; | |
pub struct WithDigest<W> { | |
inner: W, | |
ctx: Context, | |
} | |
impl<W> WithDigest<W> { | |
pub fn new(algorithm: &'static Algorithm, inner: W) -> Self { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Edit: TLDR: If you need to talk to a library that's very hard to write a completely sound abstraction for, consider writing a mostly sound one (with a clear disclaimer) instead of switching to a different language. Obviously this would be stupid if your code operates on untrusted inputs, but plenty of stuff doesn't. I'm writing code that takes input from your kernel. | |
I've been thinking recently about various articles by people who have given up on Rust projects, such as [the Way Cooler post mortem](http://way-cooler.org/blog/2020/01/09/way-cooler-post-mortem.html). I think one of the problems is that people sometimes feel it's "wrong" to write unsound code in Rust, so they give up or switch to another language, write unsound code in that language, and feel better about it. By unsound I mean unsafe code that is undefined behavior, i.e. violates the memory safety model of rust. | |
I find it interesting that I'm my experience people newer to writing unsafe Rust tend to see soundness in binary terms, whereas at l |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Compiling lldb-sys v0.0.20 (/home/daniel/lldb-sys.rs) | |
The following warnings were emitted during compilation: | |
warning: src/lldb/Bindings/SBCommandInterpreterBinding.cpp: In function ‘SBCommandInterpreterRunOptionsOpaque* CreateSBCommandInterpreterRunOptions()’: | |
warning: src/lldb/Bindings/SBCommandInterpreterBinding.cpp:22:99: error: invalid use of incomplete type ‘class lldb::SBCommandInterpreterRunOptions’ | |
warning: 22 | return reinterpret_cast<SBCommandInterpreterRunOptionsRef>(new SBCommandInterpreterRunOptions()); | |
warning: | ^ | |
warning: In file included from /usr/lib/llvm-11/include/lldb/API/SBBreakpoint.h:12, | |
warning: from src/lldb/Bindings/SBBreakpointBinding.h:15, | |
warning: from src/lldb/Bindings/LLDBBinding.h:21, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private class SectionsAnimationState constructor( | |
initialPosition: PagePosition, | |
private val renderer: Renderer, | |
private val onPosition: (PaginatedTextPosition) -> Unit, | |
) { | |
private val _positionBacking = mutableStateOf(initialPosition) | |
private var lastPageReportedToOnPosition = initialPosition.page.roundToInt() | |
private var _position | |
get() = _positionBacking.value | |
set(value) { |