profile
viewpoint

TimNN/cargo-lipo 201

Cargo subcommand to automatically create universal libraries for iOS.

rust-lang/rust-log-analyzer 18

Analyzing Travis and Azure Pipelines logs to find encountered errors

rust-lang/compiler-rt 8

No longer used, use https://github.com/rust-lang/llvm-project instead

Felerius/codeocean-scraper 1

Batch download student submission from CodeOcean

TimNN/binomial-iter 1

Provides tools to iteratively compute binomial coefficient

TimNN/abstract-ns 0

Abstract name service traits for rust

TimNN/ace 0

Ace (Ajax.org Cloud9 Editor)

TimNN/angle-rs 0

Rust wrapper class for representing angles and operations over them

pull request commentRustCrypto/RSA

Add OAEP Encryption & Decryption

Thanks for this PR, it's working great so far in my local code!

One annoyance: Using decrypt without a random number generator cumbersone:

  1. I have to add an explicit dependency on rand to my project.
  2. I have to create a let dummy: Option<&mut rand::rngs::StdRng> = None; for the first argument of decrypt, because Rust currently doesn't allow explicitly specifying type arguments if impl Trait is present in argument position.
lucdew

comment created time in 2 days

push eventTimNN/RSA

lucdew

commit sha fd8152022d928c9811def769c0befa547eddd09f

Add oaep encrypt and only with sha1 digest Test assertion is manual and done with openssl

view details

lucdew

commit sha 38d1cd20130f87eedaa02025aea3a6b06557838b

Add more hash function implementations

view details

lucdew

commit sha f61439bf495d5d3964fa5852562bd03eec94ba7c

Add nominal decrypt (only tested with SHA1) Might change the way oaep options are passed, current version is not convenient keys not fully implemented for oaep

view details

lucdew

commit sha 139e07772bf72a218f419d4b02c18b15df9c23bc

Remove debug messages

view details

lucdew

commit sha 8adcaf73a7b74531342e093499e425a864496fa7

Simplifies oaep options

view details

lucdew

commit sha d92c8f6931f82efcd435a1fce80e8be896e69605

Add dummy invalid test case and does some cleanup

view details

lucdew

commit sha a405cdd8d72aee60c415c742a82ce039af8d07cf

Revert changes in key and hash Modify oaep methods signatures

view details

lucdew

commit sha 2d1fbde84198a9752423218f93ee0f8f77eea781

Update to new dependencies

view details

lucdew

commit sha 40e64cc986f223fa8be1de1fd8dcf34622a9ce72

Fix potential attempt to substract with overflow

view details

push time in 2 days

fork TimNN/RSA

RSA implementation in pure Rust

fork in 2 days

issue commentbradleymackey/turbo-boost-disable

Sudo configuration not safe

You can whitelist the commands to load / unload this one specific extension.

akx

comment created time in 7 days

issue commentbradleymackey/turbo-boost-disable

Sudo configuration not safe

I think you‘ll get better security by adding the „kextunload“ commands to „sudoers“ and having the „chown“ as a manual setup step.

akx

comment created time in 7 days

issue commentbradleymackey/turbo-boost-disable

Password in stored in plaintext during automatic operation

At least on Linux, the „sudoers“ file can be set up so that specific commands, with specific arguments, are allowed without requiring a password: https://askubuntu.com/a/159009

bradleymackey

comment created time in 7 days

issue commentmvirkkunen/usb-device

UsbClass::poll not always called on UsbDevice::poll

Yeah, I'm not sure about the best design here either. Maybe one option would be to keep UsbClass::poll and really call it always, with two changes:

  1. Document that this is a low-level method that normally does not need to be / shouldn't be used.
  2. Add at least the PollResult and maybe also the current UsbDeviceState as an argument.
TimNN

comment created time in 14 days

issue commentmvirkkunen/usb-device

UsbClass::poll not always called on UsbDevice::poll

Honestly I don't remember what UsbClass::poll was meant to be used for. It might be a candidate for removal now to avoid confusion.

I'd be ~fine with that, I was mostly annoyed at the confusion / misleading information.

However the correct way to implement this would be to proactively write into the endpoint outside of poll, even if UsbClass::poll was called on every poll. The reason is that it's OK for users to only call UsbDevice::poll in a USB interrupt handler, which may not be executed at all if there is no traffic.

Yes, my solution here was to simply trigger the interrupt manually, if necessary.


The reason for triggering the initial write during the interrupt is simplified ownership of the UsbClass implementation (it's only available during the interrupt).

The reason for having the logic execute automatically during UsbClass::poll is so that the user of the UsbClass implementation only needs to call one poll method instead of two.

TimNN

comment created time in 14 days

issue commentmvirkkunen/usb-device

UsbClass::poll not always called on UsbDevice::poll

Then it should start sending when you write to it.

It does. The issue is that the initial write is never triggered because it happens during UsbClass::poll.

TimNN

comment created time in 15 days

issue commentmvirkkunen/usb-device

UsbClass::poll not always called on UsbDevice::poll

The Logger is actually a wrapper around usbd-serial.

TimNN

comment created time in 15 days

issue commentmvirkkunen/usb-device

UsbClass::poll not always called on UsbDevice::poll

Maybe to provide a bit of context: I've been working USB Serial Logger implementation. The logs are initially written to an internal buffer. Whenever endpoint_in_complete is called, the buffer is checked and if logs are present they are written.

The issue is, of course, when there are no logs to be written. In that case endpoint_in_complete will never be called again. Based on the documentation, I implemented poll so that it would periodically also check the buffer and trigger an initial write if necessary. I few hours of debugging later, I noticed that my poll method wasn't actually called 😑.

TimNN

comment created time in 15 days

issue openedmvirkkunen/usb-device

UsbClass::poll not always called on UsbDevice::poll

Contrary to what is documented on UsbClass::poll ("Called whenever the UsbDevice is polled."), it is only called by UsbDevice::poll when UsbBus::poll returns PollResult::Data.

Is that working as intended with the documentation being wrong or does the documentation need to be updated?

created time in 15 days

Pull request review commentstm32-rs/stm32f3xx-hal

Add rcc variants

 impl CFGR {         feature = "stm32f303xe",         feature = "stm32f398",     ))]-    fn calc_pll(&self) -> (u32, u32, rcc::cfgr::PLLSRC_A) {+    fn calc_pll(&self) -> (u32, u32, cfgr::PLLSRC_A) {         let mut pllsrcclk = self.hse.unwrap_or(HSI / 2);         let mut pllmul = self.sysclk.unwrap_or(pllsrcclk) / pllsrcclk;          let pllsrc = if self.hse.is_some() {-            rcc::cfgr::PLLSRC_A::HSE_DIV_PREDIV+            cfgr::PLLSRC_A::HSE_DIV_PREDIV         } else if pllmul > 16 {             pllmul /= 2;             pllsrcclk *= 2;-            rcc::cfgr::PLLSRC_A::HSI_DIV_PREDIV+            cfgr::PLLSRC_A::HSI_DIV_PREDIV         } else {-            rcc::cfgr::PLLSRC_A::HSI_DIV2+            cfgr::PLLSRC_A::HSI_DIV2         };         (pllsrcclk, pllmul, pllsrc)     }      /// Returns a tuple containing the effective sysclk rate and optional pll settings.-    fn calc_sysclk(&self) -> (u32, Option<(u8, rcc::cfgr::PLLSRC_A)>) {+    fn calc_sysclk(&self) -> (u32, Option<(cfgr::PLLMUL_A, cfgr::PLLSRC_A)>) {         let (pllsrcclk, pllmul, pllsrc) = self.calc_pll();         if pllmul == 1 {             return (pllsrcclk, None);         }          let pllmul = cmp::min(cmp::max(pllmul, 2), 16);-        let sysclk = pllmul * pllsrcclk;+        let sysclk = pllsrcclk * pllmul;         assert!(sysclk <= 72_000_000); -        let pllmul_bits = pllmul as u8 - 2;-        (sysclk, Some((pllmul_bits, pllsrc)))+        // NOTE From<u8> for PLLMUL_A is not implemented+        // https://docs.rs/stm32f3/0.9.0/src/stm32f3/stm32f303/rcc/cfgr.rs.html#629-662+        // let pllmul_mul: cfgr::PLLMUL_A = (pllmul as u8 - 2).into();+        let pllmul_mul = match pllmul as u8 {+            2 => cfgr::PLLMUL_A::MUL2,+            3 => cfgr::PLLMUL_A::MUL3,+            4 => cfgr::PLLMUL_A::MUL4,+            5 => cfgr::PLLMUL_A::MUL5,+            6 => cfgr::PLLMUL_A::MUL6,+            7 => cfgr::PLLMUL_A::MUL7,+            8 => cfgr::PLLMUL_A::MUL8,+            9 => cfgr::PLLMUL_A::MUL9,+            10 => cfgr::PLLMUL_A::MUL10,+            11 => cfgr::PLLMUL_A::MUL11,+            12 => cfgr::PLLMUL_A::MUL12,+            13 => cfgr::PLLMUL_A::MUL13,+            14 => cfgr::PLLMUL_A::MUL14,+            15 => cfgr::PLLMUL_A::MUL15,+            16 => cfgr::PLLMUL_A::MUL16,+            17 => cfgr::PLLMUL_A::MUL16X,+            _ => unreachable!(),+        };+        (sysclk, Some((pllmul_mul, pllsrc)))     }      /// Freezes the clock configuration, making it effective     pub fn freeze(self, acr: &mut ACR) -> Clocks {         let (sysclk, pll_options) = self.calc_sysclk(); -        let hpre_bits = self+        let hpre_div = self             .hclk             .map(|hclk| match sysclk / hclk {                 0 => unreachable!(),-                1 => 0b0111,-                2 => 0b1000,-                3..=5 => 0b1001,-                6..=11 => 0b1010,-                12..=39 => 0b1011,-                40..=95 => 0b1100,-                96..=191 => 0b1101,-                192..=383 => 0b1110,-                _ => 0b1111,+                1 => cfgr::HPRE_A::DIV1,+                2 => cfgr::HPRE_A::DIV2,+                3..=5 => cfgr::HPRE_A::DIV4,+                6..=11 => cfgr::HPRE_A::DIV8,+                12..=39 => cfgr::HPRE_A::DIV16,+                40..=95 => cfgr::HPRE_A::DIV64,+                96..=191 => cfgr::HPRE_A::DIV128,+                192..=383 => cfgr::HPRE_A::DIV256,+                _ => cfgr::HPRE_A::DIV512,             })-            .unwrap_or(0b0111);+            .unwrap_or(cfgr::HPRE_A::DIV1);++        // Get the shift factor by subtracting the offset+        //+        // `DIV2 - 1` is used for offset, as this is guaranteed to have only one value+        // as opposed to `DIV1` which can be 0..=7+        let hpre_div_factor = u8::from(hpre_div)+            .checked_sub(u8::from(cfgr::HPRE_A::DIV2) - 1)+            .unwrap_or_default(); -        let hclk = sysclk / (1 << (hpre_bits - 0b0111));+        let hclk: u32 = sysclk / 1 << hpre_div_factor;

I think there's a (pre-existing) bug in this line: Notice how DIV32 does not exist (I also confirmed this in the reference manual). If I understand things correctly, that means that for DIV64 and up the result here will be incorrect.

Sh3Rm4n

comment created time in 17 days

startedTeXitoi/keyberon

started time in 19 days

issue commentrust-lang/rust

rustdoc only: duplicate lang item `panic_halt`

I guess it is unlikely that this will be triggered in many real world scenarios. I came across this problem because I was experimenting with embedded programming: I had multiple panic implementations in the dependencies and then multiple binaries which were using different panic implementations (to see their different behaviors).

TimNN

comment created time in 25 days

startedolkb/orders

started time in a month

issue openedrust-lang/rust

rustdoc only: duplicate lang item `panic_halt`

This is a regression from rustdoc 1.40.0 (73528e339 2019-12-16) to rustdoc 1.41.0-beta.3 (fb3056216 2020-01-19).

If rustdoc attempts to document a crate that has at least two dependencies which implement a panic_handler, it fails with an error similar to

error: duplicate lang item in crate `panic_halt` (which `panic2` depends on): `panic_impl`.
  |
  = note: first defined in crate `std` (which `panic2` depends on).

Note that the crate builds fine, it's just documenting that is broken.


Steps to reproduce

  1. Create a new project, e.g. cargo new panic2
  2. Add a dependency on panic-halt = "0.2.0", e.g. cargo add panic-halt
  3. Attempt to document the crate, e.g. cargo doc

<details><summary>An example of the different behavior between stable/beta and build/doc.</summary>

$ cargo +stable clean

$ cargo +beta clean

$ cargo +stable build
   Compiling panic-halt v0.2.0
   Compiling panic2 v0.1.0 (/Users/logic/Projects/tmp/panic2)
    Finished dev [unoptimized + debuginfo] target(s) in 0.35s

$ cargo +stable doc
 Documenting panic-halt v0.2.0
    Checking panic-halt v0.2.0
 Documenting panic2 v0.1.0 (/Users/logic/Projects/tmp/panic2)
    Finished dev [unoptimized + debuginfo] target(s) in 1.40s

$ cargo +beta build
   Compiling panic-halt v0.2.0
   Compiling panic2 v0.1.0 (/Users/logic/Projects/tmp/panic2)
    Finished dev [unoptimized + debuginfo] target(s) in 0.27s

$ cargo +beta doc
 Documenting panic-halt v0.2.0
    Checking panic-halt v0.2.0
 Documenting panic2 v0.1.0 (/Users/logic/Projects/tmp/panic2)
error: duplicate lang item in crate `panic_halt` (which `panic2` depends on): `panic_impl`.
  |
  = note: first defined in crate `std` (which `panic2` depends on).

error: aborting due to previous error

error: Could not document `panic2`.

Caused by:
  process didn't exit successfully: `rustdoc --edition=2018 --crate-type bin --crate-name panic2 src/main.rs -o /Users/logic/Projects/tmp/panic2/target/doc --error-format=json --json=diagnostic-rendered-ansi --document-private-items -L dependency=/Users/logic/Projects/tmp/panic2/target/debug/deps --extern panic_halt=/Users/logic/Projects/tmp/panic2/target/debug/deps/libpanic_halt-6d0ca720c3c355fb.rmeta` (exit code: 1)

</details>

created time in a month

startedrecall-photos/recall-ios

started time in 2 months

pull request commentrust-lang/crater

experiments: fix failed experiment being returned

This happened for the second time now, is there an easy way to rate limit the comment creation?

pietroalbini

comment created time in 3 months

issue commentrust-lang/rust

nll crater run for 1.40

@craterbot abort

Mark-Simulacrum

comment created time in 3 months

pull request commentrust-lang/rust

doc: fix typo in OsStrExt and OsStringExt

@bors r+ rollup

mathstuf

comment created time in 4 months

pull request commentrust-lang/rust

implement FromIterator<char> for Box<str>

Re-assigning to the libs team:

r? @KodrAus

Duddino

comment created time in 4 months

PR opened rust-lang/highfive

Remove @TimNN from the libs reviewers
+1 -1

0 comment

1 changed file

pr created time in 4 months

create barnchTimNN/highfive

branch : TimNN-patch-1

created branch time in 4 months

fork TimNN/highfive

Github hooks to provide an encouraging atmosphere for new contributors

fork in 4 months

pull request commentrust-lang/rust

Change Copy to Clone in trait requirements as appropriate

cc @rust-lang/libs

Xaeroxe

comment created time in 4 months

issue openedgilbertchen/duplicacy

VSS not working on macOS Catalina

It appears that the naming of snapshots has changed, and now an additional ".local" needs to be appended to the snapshot name.

(I haven't tested this with the exact command used by duplicacy, but the following definitely works: /sbin/mount_apfs -o nobrowse,ro -s com.apple.TimeMachine.2019-10-08-210010.local / $TMP/foo).

created time in 4 months

push eventTimNN/duplicacy

Tim Neumann

commit sha 538cdfe57570323724731530349a5908340ba2da

catalina

view details

push time in 4 months

push eventTimNN/duplicacy

Tim Neumann

commit sha 3fab17f19084b5b16ab06d00423d33f4034e4223

catalina

view details

push time in 4 months

fork TimNN/duplicacy

A new generation cloud backup tool

https://duplicacy.com

fork in 4 months

pull request commentrust-lang/rust

More Clippy fixes for alloc, core and std

Sorry, I don't have the time right now to review Rust PRs, so

r? @scottmcm

since they already commented on this PR.

mati865

comment created time in 4 months

more