profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/Artoria2e5/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

AOSC-Dev/fontconfig 3

Experimental Fontconfig branch with Michal Srb's optimisation work.

AOSC-Dev/chntpw 2

Chntpw fork that can operate on Microsoft accounts

Artoria2e5/163player 0

Command-line Netease (163) music player with graphical lyrics implemented in pure Bash

Artoria2e5/996.ICU 0

Repo for counting stars and contributing. Press F to pay respect to glorious developers.

Artoria2e5/acbs 0

A re-implementation of the original ABBS utilities.

Artoria2e5/AFLplusplus 0

The fuzzer afl++ is afl with community patches, qemu 5.1 upgrade, collision-free coverage, enhanced laf-intel & redqueen, AFLfast++ power schedules, MOpt mutators, unicorn_mode, and a lot more!

CommitCommentEvent

issue commentfacebook/zstd

Is zstd splitabble in hadoop/spark/etc?

A common use case not mentioned here is indexing of compressed tar archives. The lzip thing tangentially mentioned earlier has a tarlz program for that. A “pixz” variant of xz also indexes tars. tar integration would be a good way both to test the feature and give end-users a reason to use it.

trixpan

comment created time in 10 days

issue openedpygments/pygments

Accept Unicode identifiers, possibly XID, for C and C++?

The Pygments implementation of the CFamilyLexer is overly restrictive in its highlighting of identifiers compared to mainstream compilers including MSVC, gcc, and clang. Unicode-laden code is a common feature of mathematical code such as the KSP mod Principia and joke code such as (whatever emoji thing).

Current C++ compilers are extremely liberal in identifier syntax, to the point it may be hard to pin down. A somewhat concrete (and slightly more restrictive) approach to define a Unicode identifier is to use XID, a choice proposed in p1949r5. For those wanting to use emojis, maybe the Swift syntax is a better choice.

created time in 11 days

startedoduwsdl/tweetedat

started time in 13 days

starteddtolnay/no-panic

started time in 13 days

issue commentunlock-music/unlock-music

我收到DMCA通知了

Git clone 下来,把 .git 目录打个 zip 找别处发呗。种子 ipfs 都行,换 telegram 管得也不严((

mesondzh

comment created time in 16 days

issue commentnilsberglund-orleans/YouTube-simulations

oklab instead of hsl for (not-yet-published) phase

lack of a C library doesn't make this very helpful her

eh, I did say "assume the functions from the blog post". These C++ stuff in the reference are pretty much C.

Artoria2e5

comment created time in 19 days

startedTessil/ordered-map

started time in 25 days

Pull request review commentdarkreader/darkreader

Detecting dark pages

+import type {RGBA} from '../../utils/color';+import {rgbToHSL} from '../../utils/color';+import {tryParseColor} from './modify-css';+import type {VariablesStore} from './variables';++const IS_DARK_TRESHOLD = 0.5;++let bodyObserver: MutationObserver;+const bodyCallbacks = new Set<() => void>();++async function waitTillBody(): Promise<void> {+    return new Promise<void>((resolve) => {+        if (!bodyObserver) {+            resolve();+        }+        bodyCallbacks.add(resolve);+    });+}++export function IsItDark(variableStore: VariablesStore, selectorText: string, styleRule: CSSStyleDeclaration): boolean | Promise<boolean> {

Do nothing, because the page does not make enough sense.

Gusted

comment created time in a month

PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentdarkreader/darkreader

Detecting dark pages

+import type {RGBA} from '../../utils/color';+import {rgbToHSL} from '../../utils/color';+import {tryParseColor} from './modify-css';+import type {VariablesStore} from './variables';++const IS_DARK_TRESHOLD = 0.5;++let bodyObserver: MutationObserver;+const bodyCallbacks = new Set<() => void>();++async function waitTillBody(): Promise<void> {+    return new Promise<void>((resolve) => {+        if (!bodyObserver) {+            resolve();+        }+        bodyCallbacks.add(resolve);+    });+}++export function IsItDark(variableStore: VariablesStore, selectorText: string, styleRule: CSSStyleDeclaration): boolean | Promise<boolean> {

Probably better to have three classes of output, dark, medium, and light.

Gusted

comment created time in a month

Pull request review commentdarkreader/darkreader

Detecting dark pages

+import type {RGBA} from '../../utils/color';+import {rgbToHSL} from '../../utils/color';+import {tryParseColor} from './modify-css';+import type {VariablesStore} from './variables';++const IS_DARK_TRESHOLD = 0.5;++let bodyObserver: MutationObserver;+const bodyCallbacks = new Set<() => void>();++async function waitTillBody(): Promise<void> {+    return new Promise<void>((resolve) => {+        if (!bodyObserver) {+            resolve();+        }+        bodyCallbacks.add(resolve);+    });+}++export function IsItDark(variableStore: VariablesStore, selectorText: string, styleRule: CSSStyleDeclaration): boolean | Promise<boolean> {+    const actualFunction = () => {+        const selectors = selectorText.split(', ');+        if (!selectors.some((selector) => {+            return document.documentElement.matches(selector) || document.body.matches(selector);+        })) {+            return false;+        }++        const backgroundValue = styleRule.getPropertyValue('background-color').trim();+        if (!backgroundValue || backgroundValue === 'transparent') {+            return false;+        }++        let backgroundColor: RGBA;+        if (backgroundValue.startsWith('var(')) {+            // Possible TODO: Check if variable isn't present and fallback to fallback value or/and+            // subscribe to the typeChange thingy logic in variableStore.+            backgroundColor = tryParseColor(variableStore.getRawValue(backgroundValue));+        } else {+            backgroundColor = tryParseColor(backgroundValue);+        }++        if (!backgroundColor) {+            return false;+        }++        const backgroundColorHSLA = rgbToHSL(backgroundColor);

This likely matters little, but I would prefer to have a better lightness algo than HSL. sRGB relative luminance (Y) would be a good choice in this case (as it's simple to calculate), although the even simpler luma (Y') will work fine too.

Gusted

comment created time in a month

PullRequestReviewEvent

issue commentdarkreader/darkreader

[Feature Request] Auto-detect, then apply if needed

The PR is #5719.

avi12

comment created time in a month

issue openedlogological/gpp

escape_backslashes should be used unconditionally

We currently have https://github.com/logological/gpp/blob/8e6fe69819d1c2cb2fd5cadfd3193ff99993264d/src/gpp.c#L3137-L3141 with the justification https://github.com/logological/gpp/blob/8e6fe69819d1c2cb2fd5cadfd3193ff99993264d/src/gpp.c#L3147-L3149.

Other platforms (mainly Unix-like) can have backslashes in the filename too -- they may even be more liberal at that and allow newlines and other fun stuff.

created time in a month

issue commentlogological/gpp

Variadic macros

I seem to have worked on the #{num} thing for a while at https://github.com/Artoria2e5/gpp/tree/var, but there's no way I have tested it. I have no idea what got into my head to handwrite a state machine. Even if it works the comma magic still needs to be added -- __VA_OPT__ in cpp.

Artoria2e5

comment created time in a month

create barnchArtoria2e5/gpp

branch : var

created branch time in a month

issue commentrust-lang/rust

Imprecise floating point operations (fast-math)

Saw that thread too! Still not sure whether it affects Rust at all — crtfastmath.o is a linkage thing and the decision seems to be due to the compiler driver, not the backend codegen.

mpdn

comment created time in a month

issue commentrust-lang/rust

Imprecise floating point operations (fast-math)

Adding a wishlist item when it eventually becomes true: Rust should get a way to temporarily avoid reordering in a certain part of an expression. Fortran compilers usually reorder as they please, but avoid breaking up parenthesized stuff.

mpdn

comment created time in a month

issue commentfnielsen/ordia

Feature request: Chinese support

Given the large number of languages involved it might end up easier to give a text input for other langcodes. Wikidata entries for min involves a bunch of x-Q.... stuff that I don't think you want to deal with, for example...

Artoria2e5

comment created time in a month

issue commentfnielsen/ordia

Improve tokenization for CJK languages

I think Korean might be able to get away with this with how modern texts are written with word-spaces. I don't speak the language, but that's what English Wikipedia says and that's what I see with the Korean Wikipedia text. The "year xxxx" numeric stuff like 2020년 need an additional split though.

For Chinese tokenization I usually recommend jieba.

I think there are also Japanese tokenizers in Python (truth be told, everything data-splitty-chunky is written in Python these days), but as I don't speak it I have no idea what to use.

Daniel-Mietchen

comment created time in a month

issue openedfnielsen/ordia

Feature request: Chinese support

Ordia currently does not support Chinese at all. Proper support will need #95, of course...

created time in a month

pull request commenttransmission/transmission

Client-based blocking

I have just read about #1787 on the orange news site. Bravo! Now I can just go ahead and use std::regex.

Artoria2e5

comment created time in a month

pull request commentapple/swift

[stdlib] Floating-point random-number improvements

I think @goualard-f is an authority in this stuff after his survey of random-float-intervals in programming languages. I am not sure about how to best contact him -- maybe this mention will do.

NevinBR

comment created time in a month

pull request commentabh/ntppool

Rebased & reviewed translations for zh_CN & zh_TW

I will pick this back up when I have time. (Was randomly browsing stuff when I saw into the Swift people serving a branch switch notice. I guess that's the way if you have more repos to migrate, .)

Artoria2e5

comment created time in a month

issue openedflaneur2020/pua-lang

Rework emoji tokenizer to match Rust

Current implementation is extremely sloppy. rust-unic/unic-emoji-char as in https://github.com/rust-lang/rust/pull/88781 is likely a much better idea 🤔

created time in a month

push eventnotriddle/rust-float-ord

Mingye Wang

commit sha d52ceeddf222542034187b1ea476b9060770b6dc

README: clarify which signal bit It's very pointless still (Rust does not even have a good handle on sNAN).

view details

push time in a month

push eventnotriddle/rust-float-ord

Mingye Wang

commit sha fbe1fe6e71350ebc591aa70eb87b946bc278e20d

README: magic appears to be somewhat standard I am no idea what this adds to the README. Authority?

view details

push time in a month

issue commenttuxera/ntfs-3g

Patches from AOSC-Dev

I think https://github.com/AOSC-Dev/ntfs-3g/commit/9189a4ab815241b4e073079744c4fadd429d715a and https://github.com/AOSC-Dev/ntfs-3g/commit/c918fb79f9f340bce1a19dacf4b720d19922450d are the two worth cherry-picking. The former is trivial and may have been independently fixed. The latter is... well, let's say under-discussed in the ML.

The big_writes thing is already upstream, although I am yet to compare the current impl against mine. I think there was some discussion over porting to libfuse3 for the even larger buffer on the ML (I accidentally did that by modifying the builtin libfuse); the conclusion was that Texera has no intention of doing that due to old codebase concerns. I am allowed to do it in a renamed fork if I wish, but at the moment I have no energy for that. (Hmm, the ML is not showing JPA's replies. Maybe he didn't use "reply all"?)

ratijas

comment created time in 2 months