Posts
4416
Following
315
Followers
470
Linux kernel hacker and maintainer etc.

OpenPGP: 3AB05486C7752FE1
@alilleybrinker ok it was *that* idiomatic :-O thanks!
0
0
1

I sorted this out for the moment that changed the dependency to the form expected by cargo publish: https://crates.io/crates/tpm2_cli

So, main goal for 0.1.2 is to fix this glitch ;-)

0
0
0

Jarkko Sakkinen

When cargo publish -p tpm2_cli , I need to

tpm2_call = "0.1.1"

… while building locally:

tpm2_call = { path = "../tpm2_call" }

How to sort this out in “idiomatic manner”?

#rust #rustlang

5
0
0

Jarkko Sakkinen

Edited 1 year ago

There should be TryFrom equivalent for Option tho. In this example not having that adds only extra complexity… Like MaybeFrom ?

0
0
0

For this type of rigid decoding Rust’s type system is pretty efficient:

pub struct ReturnCodeError;    
    
impl TryFrom<u16> for ReturnCode {    
    type Error = ReturnCodeError;    
    
    fn try_from(value: u16) -> Result<Self, Self::Error> {    
        Self::from_repr(if value & RC_FMT1 != 0 {    
            value & (0x3F + RC_FMT1)    
        } else if value & RC_WARN != 0 {    
            value & (0x7F + RC_WARN)    
        } else if value & RC_VER1 != 0 {    
            value & (0x7F + RC_VER1)    
        } else {    
            // RC_VER0    
            value & 0x7F    
        })    
        .ok_or(ReturnCodeError)    
    }    
}    
1
0
0

Jarkko Sakkinen

Edited 1 year ago

A crate for #TPM 2.0 library protocol, or beginnings of it: https://gitlab.com/jarkkojs/tpm2_library/

Sub-crates:

  1. tpm2_call for TPM 2.0 library protocol shenanigans.
  2. tpm2_cli for a command-line interfaces.

Development process:

I aim to do cli first as Linux tied but it could also have e.g. Windows backend. tpm2_call will be portable between operating systems.

#TPM2 #Rust #rustlang

1
0
0

Jarkko Sakkinen

Not really a real project. I've been ad-hoc scripting with #python since 2005, and wanted to learn how to "devops" a properly pipeline at #gitlab, with a release ending to the #pypi: https://pypi.org/project/eth0/

PS. I deleted 0.1.0 tag and release from pypi, because the tag was not signed ;-) you could never trust it...
0
1
0

Jarkko Sakkinen

Edited 1 year ago

So for my TPM2 crate I was thinking to rename the project Git as tpm2_library and have sub-crates tpm2_call for protoco and tpm2_cli with a sub-command tpm2cli rc.

Is it acceptable to name for consistency sake the sub-crate directory as tpm2_cli but generate an executable as tpm2cli?

Root project’s name inherits from https://trustedcomputinggroup.org/resource/tpm-library-specification/

#Rust #rustlang #TPM2

0
0
0

Jarkko Sakkinen

Edited 1 year ago

I initiated my own #TPM2 #Rust crate partly because the output given by tpm2_rc_decode does not give back the mnemonic of a return code.

Here’s the example from its man page:

tpm2_rc_decode 0x1d5
tpm:parameter(1):structure is the wrong size

So I wrote my return code decoder, and here’s how it works with the previous example:

target/debug/examples/tpm2rc 0x1d5
TPM_RC_SIZE

The Git-repository is available here: https://gitlab.com/jarkkojs/tpm2_call

I’m not going to add any code this crate dealing with /dev/tpm0. Instead the plan is to implement command buffer builder and parser with similar high-level ideas as I’ve done in the #Linux #kernel.

#rustlang

0
1
0
Edited 1 year ago

📣 Only 2 days (today and tomorrow) left to get your talk proposals in for the All Systems Go! 2024 CFP.
The clock ⏲️ is ticking!
🏃‍♂️ Hurry over to get yours in: https://cfp.all-systems-go.io/all-systems-go-2024/cfp

0
3
0
@protman @rnbastos For instance: for one X-series ThinkPad acquired from work few years ago, Lenovo's onsite repair guy had to visit me three times during a two year period, just to switch the keyboard.

We became familiar enough that I still greet him, if I run into him on the street ;-)
1
0
0
@protman @rnbastos With more recent ThinkPad's, after IBM sold laptop manufacturing to Lenovo, the build quality has been steadily decreasing.

I've never used auto-complete (be it with or without AI) and I hit keyboard hard so with modern ThinkPads, usually in a year or less, I start accidentally pull keys out of the keyboard when typing.

With Mac's laptop keyboards this has not happened but they have problems of their own, mainly keys getting stuck all the time into pressed position.

I guess I'm too rough and violent for modern laptop keyboards 🤷
1
0
0

Jarkko Sakkinen

Edited 1 year ago
1. Forking in traditional open source community is a strongly considered act. I think the current "fork even your grand mother" trend inherits from many new Rust developer previously being Web/JavaScript developers.
2. Forking is not engineering. Engineering is innovating within constraints. For instance, Firefox has some of the code re-engineered in Rust. Bringing Rust to an existing open source project is difficult and tedious task, and also hard to rationalize to the existing community, but that is what Engineers do. It is an engineering problem by definition.
0
0
0

Jarkko Sakkinen

Edited 1 year ago
There are some famous Jarkko's who also use Python someti,es (I'm not one of them but there are a few actually famous).

For instance, Jarkko Oikarinen, the inventor of #IRC protocol :-) You could consider him as forefather of Whatsapp, Telegram, Snapchat, Signal, Matrix etc.
0
0
2

Jarkko Sakkinen

Still cannot believe this: I could reserve account name "jarkko" from #pypi, and it is the year 2024. #python #python3
1
1
0

Jarkko Sakkinen

Edited 1 year ago
I think #Zola is my favorite tools so far that spans from the #Rust ecosystem: a single binary static web generator.

For a non-web person like me it is easy to grasp. I got a page quickly created that I can send to the employers in the early Fall.

Another earlier mentioned tool, which has someone real innovation embedded is of course #Typst :-)

Making forks of old craft is mostly counter-productive and causes unnecessary drift and divergence, so I oppose all the Rust fork garbage.

It is morally legit to be in opposition against software that is developed from toxic standing point, considering open source community overall. Being toxic against toxic is not toxic.

#rustlang
1
2
5

Infinite Pooh has moved

(_Rum-tum-tiddle-um-tum._)

0
2
0

Jarkko Sakkinen

Someone complained that my home page, which should provide more information regarding recruitment leads to void so I put together this :-) I think it is good enough.

https://jarkkojs.gitlab.io/
0
0
0
@dr2chase @ariadne @vathpela I fixed the issue just for you ;-) https://jarkkojs.gitlab.io/

Will add resume PDF made with awesome https://typst.app/ at some point and then I consider it done.
0
0
0
@timojyrinki Never heard, but thanks, I'll give it a shot!
0
0
0
Show older