profile
viewpoint
Luqman Aden luqmana @Microsoft Seattle, Washington http://luqman.ca/

luqmana/rust-opencl 165

OpenCL bindings for Rust.

luqmana/rust-psp-hello 74

Simple Hello World in Rust to run on a PSP.

luqmana/rhythmbox-plugins 51

Porting various Rhythmbox plugins to work with the new plugin api.

luqmana/gdax-client 28

Rust client library for Coinbase Exchange (GDAX).

luqmana/rray 8

Raytracer written in rust.

luqmana/mcchat 7

Fake client to get chat messages from minecraft (out-of-date).

luqmana/Pronto 7

Links freedesktop notifications to iOS app prowl.

luqmana/RemoteJoyPlus 5

Based on the original RemoteJoy by TyRaNiD with more stuff!

luqmana/llvm 2

Temporary fork of LLVM for Rust

luqmana/NowPlayingFile 1

A Rhythmbox plugin which simply outputs the currently playing track's information to a file. Based off of NowPlayingXML by kflorence. Updated to work with new plugin api.

fork luqmana/rust-x86

Rust library to use x86 (amd64) specific functionality and registers.

https://docs.rs/x86

fork in 19 days

issue commentPoiScript/strong-xml

Can't specify field with type parameter

Thanks for the quick fix!

luqmana

comment created time in a month

issue commentPoiScript/strong-xml

Can't specify field with type parameter

@PoiScript Speaking of XmlRead, I was wondering why that and XmlWrite weren't just traits instead of the derive just adding specific methods to each type

luqmana

comment created time in a month

issue commentPoiScript/strong-xml

Support tuple structs

I also ran into this while trying to parse something like this I'd like to parse something like this:

<Response><Status value="200"/></Response>

using:

#[derive(XmlRead, XmlWrite)]
#[xml(tag = "Status")]
struct Status(#[xml(attr = "value")] usize);

#[derive(XmlRead, XmlWrite)]
#[xml(tag = "Response")]
struct Response {
    #[xml(child = "Status")]
    status: Status,
}
niluxv

comment created time in a month

issue commentPoiScript/strong-xml

Can't specify field with type parameter

Thanks!

luqmana

comment created time in a month

issue openedPoiScript/strong-xml

Can't specify field with type parameter

The derive logic seems to choke if the type of a field includes a type parameter:

use chrono::{DateTime, Utc};
use::strong_xml::XmlRead;

#[derive(XmlRead)]
#[xml(tag = "document")]
struct Document {
    #[xml(attr = "datetime")]
    datetime: DateTime<Utc>,
}

Gives the error:

error[E0107]: wrong number of type arguments: expected 1, found 0
  --> src/lib.rs:8:15
   |
8  |     datetime: DateTime<Utc>,
   |               ^^^^^^^^ expected 1 type argument

Workaround is just using a type alias:

use chrono::{DateTime, Utc};
use::strong_xml::XmlRead;

type UtcDateTime = DateTime<Utc>;

#[derive(XmlRead)]
#[xml(tag = "document")]
struct Document {
    #[xml(attr = "datetime")]
    datetime: UtcDateTime,
}

created time in a month

issue openedPoiScript/strong-xml

Should mention that log crate is required.

The expansion for the XmlRead/Write macros use the log crate. If your don't include that in your own deps, you'll run into an error:

error[E0433]: failed to resolve: use of undeclared type or module log

created time in a month

PR opened microsoft/vscode

Register mimetype for *.code-workspace

Register a new mimetype for workspace files so that they aren't just classified as text/plain. This lets users specify VS Code to open workspace files without also associating it with every other text/plain type file.

Fixes: https://github.com/Microsoft/vscode/issues/59040 and https://github.com/microsoft/vscode/issues/80818

The deb and rpm scripts were updated to install the mimetype but unfortunately Snap doesn't support this yet (see https://forum.snapcraft.io/t/allow-snaps-to-register-new-mime-types/6467/7).

+39 -4

0 comment

6 changed files

pr created time in a month

create barnchluqmana/vscode

branch : workspace-mimetype

created branch time in a month

push eventluqmana/rust

Benjamin Kästner

commit sha dc8a9854d26c0b0642df64914ca2d845e43cf78d

Replace last mention of IRC with Discord Mozilla's IRC service was shut down in March 2020. The official instant messaging variant has been Discord for a while, and most of the links were already replaced by #61524. This was the last line that came up with `irc.mozilla.org` or any combination of "irc.*#[a-z]+" in a `git grep`: git grep -i -E "irc.*#[a-z]+" As there is only one other link directly to Rust's discord, I used the same Markdown link `[rust-discord]` as in `bootstrap/README.md` to stay consistent. This might come in handy if the chat platform changes at a later point again. As an aside: for those interested in the use of IRC, Mozilla's [wiki] still offers a lot of in-depth knowledge. [wiki]: https://wiki.mozilla.org/IRC

view details

bors

commit sha e768d6f0bc6db7a46c9ef08254a944ba100bc5dd

Auto merge of #70485 - matthiaskrgr:submodule_upd, r=Dylan-DPC submodules: update clippy from 1ff81c1b to 70b93aab Changes: ```` remove redundant import rustup https://github.com/rust-lang/rust/pull/68404 rustup https://github.com/rust-lang/rust/pull/69644 rustup https://github.com/rust-lang/rust/pull/70344 Move verbose_file_reads to restriction move redundant_pub_crate to nursery readme: explain how to run only a single lint on a codebase Remove dependency on `matches` crate Move useless_transmute to nursery nursery group -> style Update for PR feedback Auto merge of #5314 - ehuss:remove-git2, r=flip1995 Lint for `pub(crate)` items that are not crate visible due to the visibility of the module that contains them ```` Fixes #70456

view details

Dylan DPC

commit sha 1f13089bef91e8410bca87b2f42e6fbbc2bbfd9e

Rollup merge of #70418 - PankajChaudhary5:master, r=Dylan-DPC Add long error explanation for E0703 Add long explanation for the E0703 error code Part of #61137 r? @GuillaumeGomez

view details

Dylan DPC

commit sha bbd3634f5f22e3e58cc570c37626625ef4109c14

Rollup merge of #70448 - TimotheeGerber:rustdoc-create-output-dir, r=GuillaumeGomez Create output dir in rustdoc markdown render `rustdoc` command on a standalone markdown document fails because the output directory (which default to `doc/`) is not created, even when specified with the `--output` argument. This PR adds the creation of the output directory before the file creation to avoid an unexpected error which is unclear. I am not sure about the returned error code. I did not find a table explaining them. So I simply put the same error code that is returned when `File::create` fails because they are both related to file-system errors. Resolve #70431

view details

Dylan DPC

commit sha 7f1e6261bfd05fb411ff361bf999e48ede6237b6

Rollup merge of #70486 - Mark-Simulacrum:unicode-shrink, r=dtolnay Shrink Unicode tables (even more) This shrinks the Unicode tables further, building upon the wins in #68232 (the previous counts differ due to an interim Unicode version update, see #69929. The new data structure is slower by around 3x, on the benchmark of looking up every Unicode scalar value in each data set sequentially in every data set included. Note that for ASCII, the exposed functions on `char` optimize with direct branches, so ASCII will retain the same performance regardless of internal optimizations (or the reverse). Also, note that the size reduction due to the skip list (from where the performance losses come) is around 40%, and, as a result, I believe the performance loss is acceptable, as the routines are still quite fast. Anywhere where this is hot, should probably be using a custom data structure anyway (e.g., a raw bitset) or something optimized for frequently seen values, etc. This PR updates both the bitset data structure, and introduces a new data structure similar to a skip list. For more details, see the [main.rs] of the table generator, which describes both. The commits mostly work individually and document size wins. As before, this is tested on all valid chars to have the same results as nightly (and the canonical Unicode data sets), happily, no bugs were found. [main.rs]: https://github.com/rust-lang/rust/blob/fb4a715e18b/src/tools/unicode-table-generator/src/main.rs Set | Previous | New | % of old | Codepoints | Ranges | ----------------|---------:|------:|-----------:|-----------:|-------:| Alphabetic | 3055 | 1599 | 52% | 132875 | 695 | Case Ignorable | 2136 | 949 | 44% | 2413 | 410 | Cased | 934 | 359 | 38% | 4286 | 141 | Cc | 43 | 9 | 20% | 65 | 2 | Grapheme Extend | 1774 | 813 | 46% | 1979 | 344 | Lowercase | 985 | 867 | 88% | 2344 | 652 | N | 1266 | 419 | 33% | 1781 | 133 | Uppercase | 934 | 777 | 83% | 1911 | 643 | White_Space | 140 | 37 | 26% | 25 | 10 | ----------------|----------|-------|------------|------------|--------| Total | 11267 | 5829 | 51% | - | - |

view details

Dylan DPC

commit sha f6111930d22a84cb3045364b3dbdd6f69ab8cd5c

Rollup merge of #70493 - 0xd4d:rustdoc-tab-size, r=GuillaumeGomez Fix rustdoc.css CSS tab-size property This fixes the CSS tab size property names which are called `tab-size` / `-moz-tab-size` and not `tab-width` Old issue https://github.com/rust-lang/rust/issues/49155 and related PR https://github.com/rust-lang/rust/pull/50947 tab-size: https://developer.mozilla.org/en-US/docs/Web/CSS/tab-size

view details

Dylan DPC

commit sha e3ccd5ba49e9b3811dda14f66e5ca8417b3aa4fb

Rollup merge of #70495 - bkaestner:master, r=Mark-Simulacrum Replace last mention of IRC with Discord Mozilla's IRC service was shut down in March 2020. The official instant messaging variant has been Discord for a while, and most of the links were already replaced by #61524. This was the last line that came up with `irc.mozilla.org` or any combination of "irc.*#[a-z]+" in a `git grep`: git grep -i -E "irc.*#[a-z]+" As there is only one other link directly to Rust's discord, I used the same Markdown link `[rust-discord]` as in `bootstrap/README.md` to stay consistent. This might come in handy if the chat platform changes at a later point again.

view details

Ralf Jung

commit sha 8bad4844b2034ff347479cc27275dc9ea8899f15

rename Scalar::{ptr_null -> null_ptr}

view details

Ralf Jung

commit sha 01dbaeda3242d48bb7b432f5fa2c0506e326551c

use machine_ prefix for target usize/isize

view details

bors

commit sha c52cee172fcd2e223100d8bdd5e105dc37aaca23

Auto merge of #70499 - Dylan-DPC:rollup-f9je1l8, r=Dylan-DPC Rollup of 5 pull requests Successful merges: - #70418 (Add long error explanation for E0703) - #70448 (Create output dir in rustdoc markdown render) - #70486 (Shrink Unicode tables (even more)) - #70493 (Fix rustdoc.css CSS tab-size property) - #70495 (Replace last mention of IRC with Discord) Failed merges: r? @ghost

view details

Ralf Jung

commit sha 1a0e69d34f8fde29224875525e66dffb863cbaba

use more specialized Scalar::from_ constructors where appropriate

view details

Ralf Jung

commit sha 1f53fdc82c27c4b8bf933c72378412d830db8d01

get rid of useless back-and-forth cast

view details

Ralf Jung

commit sha bd9e04649669cf9d2736fc531727bfe733953cea

refmt

view details

Tim Diekmann

commit sha bf6a46db3129b0bf31dc67f06af2e52ece52701a

Make fields in `MemoryBlock` public

view details

Ralf Jung

commit sha 38c8ba33ef0310d2200382ec441f473824d3dd46

fix TryEnterCriticalSection return type

view details

bors

commit sha 77621317d643cc5d13da60b26ab68b057668e688

Auto merge of #66938 - GuillaumeGomez:lint-for-no-crate-level-doc, r=Dylan-DPC Add lint when no doc is present at the crate-level Follow-up of #66267. r? @kinnison

view details

Esteban Küber

commit sha 33d793c326a83ed2e71a4d5e612526cf13c890b2

Point at all constraints before args

view details

Dylan MacKenzie

commit sha 4d099e63083b4730f57d1ccb5d27c251dbddfb56

Add `-Z dump-mir-dataflow`

view details

Dylan MacKenzie

commit sha edbd7c86027c7205076832924ee7999796c2405f

`dump_enabled` takes a `DefId` instead of `MirSource`

view details

Dylan MacKenzie

commit sha c8004027ba11a7611ead54275ab14f58a8b0edb8

Dump graphviz dataflow results with flag

view details

push time in a month

issue commentsimplesamlphp/simplesamlphp

POST to GET redirect loses username parameter

Ah, well thanks for the clarification!

luqmana

comment created time in a month

issue commentsimplesamlphp/simplesamlphp

POST to GET redirect loses username parameter

Hi @jaimeperez

Hmm, did I misunderstand what these are supposed to do? https://github.com/simplesamlphp/simplesamlphp/blob/0c55a0b6a4e5527dbbf263d5f7687cab39298db6/modules/core/www/loginuserpass.php#L29 and https://github.com/simplesamlphp/simplesamlphp/blob/0c55a0b6a4e5527dbbf263d5f7687cab39298db6/modules/core/templates/loginuserpass.twig#L50

luqmana

comment created time in a month

issue openedsimplesamlphp/simplesamlphp

POST to GET redirect loses username parameter

Help us to keep this issue-tracker clean! For questions or support, please refer to our mailing lists

Describe the bug I have simplesamlphp setup as an IdP and noticed that it always seems to redirect SP-initiated POST requests, made to the saml2/idp/SSOService.php endpoint, to the module.php/core/loginuserpass.php endpoint as a GET request.

Now, login still works fine but since the SP passed a username hint as a POST parameter initially, and simplesamlphp doesn't preserve that, the username field doesn't get pre-filled.

To Reproduce Steps to reproduce the behavior:

  1. Go to SP (portal.azure.com in my case)
  2. Enter email 'foo@example.com'
  3. Click 'Next and get redirected to simplesamlphp login form

Expected behavior 'foo@example.com' in the username field.

Screenshots or logs If applicable, add screenshots and/or log files to help explain your problem.

Additional context Add any other context about the problem here.

created time in a month

issue openedmicrosoft/wil

Support more convenience methods on wil::unique_variant

Hi,

I really like that wil has unique_variant but it'd be great if it also supported some more convenience methods like CComVariant: https://docs.microsoft.com/en-us/cpp/atl/reference/ccomvariant-class?view=vs-2019#operator_eq

Thanks!

created time in a month

issue commentdjc/askama

Panic on recursive macro

Sure, that's what I ended up doing :+1:

luqmana

comment created time in 2 months

issue commentdjc/askama

Panic on recursive macro

Oh, the overflow happens even with no actual depth as in the example above. This is happening at compile time, not runtime.

luqmana

comment created time in 2 months

issue openeddjc/askama

Panic on recursive macro

I ran into this issue with trying to use

use askama::Template;

struct Node {
    data: String,
    children: Vec<Node>,
}

#[derive(Template)]
#[template(path = "index.html", print = "code")]
struct Test {
    nodes: Vec<Node>,
}

fn main() {
    let _ = Test { nodes: vec![] };
}

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <title>Test</title>
  </head>
  <body>
    <section>
      <h2>My Tree</h2>
      <ul>
        {%- for node in nodes -%}
        {%- call render_node(node) -%}
        {%- endfor %}
      </ul>
    </section>
  </body>
</html>

{%- macro render_node(node) -%}
          {%- call render_node_item(node) -%}

          {# This call triggers the panic #}
          {%- call render_node(node.children[0]) -%}
{%- endmacro -%}

{%- macro render_node_item(node) -%}
          <li>{{ node.data }}</li>
{%- endmacro -%}

Trying to build this results in the panic:

➜  askama-test git:(master) ✗ cargo build
   Compiling askama-test v0.1.0 (/home/luqman/Develop/tmp/askama-test)
error: proc-macro derive panicked
 --> src/main.rs:8:10
  |
8 | #[derive(Template)]
  |          ^^^^^^^^
  |
  = help: message: attempt to multiply with overflow

error: aborting due to previous error

error: could not compile `askama-test`.

To learn more, run the command again with --verbose.

The overflow seems to be here:

#5  0x00007fffe826ebba in askama_shared::generator::Buffer::write (self=0x7fffee3ccdf8, s=...) at [...]/askama_shared/src/generator.rs:1307
1307                for _ in 0..(self.indent * 4) {

created time in 2 months

issue openedonlyutkarsh/gitlab-integration

Support Per-Repository Deploy Tokens

Hey, thanks for writing this extension first of all!

I had one suggestion: currently you require a PAT to grab the repo from Gitlab. But this requires a specific user creating the PAT, Gitlab also support per-repository Deploy Tokens which provide read access to the repository (scope: read_repository).

Thanks

created time in 2 months

more