How Do You List Dynamo Contents

I've created an (react-create-app) app with CLI provisioned API, Lambda, and DynamoDB.
I want to perform a GET request that returns all entries on a path (i.e. return the results of a table scan).
The auto-built express app (Lambda function) seems to only respond to queries for a specific value (e.g. primary partition key).
I've tried adding the following GET method to the lambda function, but I get CORS error (testing locally):
app.get('/items', function (req, res) {
  var params = {
    TableName: myCoolDynamoTable,
    Select: 'ALL_ATTRIBUTES',
  };
  dynamodb.scan(params, (err, data) => {
    if (err) {
      res.json({ error: 'Could not load items: ' + err.message });
    }
    res.json({
      data: data.Items.map(item => {
        return item;
      }),
      statusCode: 200
    });
  });

The error is:
Access to XMLHttpRequest at 'https://smxxxxxxx.execute-api.us-west-2.amazonaws.com/beta/items/' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Error: Network Error
    at createError (createError.js:17)
    at XMLHttpRequest.handleError (xhr.js:80)

Which is weird (to me, at least), as the below code block already exists in the lambda:
// Enable CORS for all methods
app.use(function(req, res, next) {
  res.header("Access-Control-Allow-Origin", "*");
  res.header(
    "Access-Control-Allow-Headers",
    "Origin, X-Requested-With, Content-Type, Accept"
  );
  next();
});

The following was an attempt to address the CORS issue, but it seems to have zero affect.
app.get('/items', function (req, res) {
  var params = {
    TableName: myCoolDynamoTable,
    Select: 'ALL_ATTRIBUTES',
  };
  dynamodb.scan(params, (err, data) => {
    if (err) {
      res.json({ error: 'Could not load items: ' + err.message });
    }
    res.json({
      data: data.Items.map(item => {
        return item;
      }),
      headers: {
      "Access-Control-Allow-Credentials" : true,
      "Access-Control-Allow-Origin": "*",
      },
      statusCode: 200
    });
  });

I've also tried swapping out:
      "Access-Control-Allow-Origin": "*",

with
      "Access-Control-Allow-Origin": "http://localhost:3000",

but to no avail...

I got now idea why, but replacing the above attempts with the below, works:
app.get(path, function(req, res) {
  const queryParams = {
    TableName: tableName,
    ProjectionExpression: "fileName, title, artist, album"
  };
  dynamodb.scan(queryParams, (err, data) => {
    if (err) {
      res.json({ error: "Could not load items: " + err });
    } else {
      res.json(data.Items);
    }
  });
});

@kimfucious it seems that you were able to solve your issue, so I'm closing this issue, feel free to comment or reopen if needed.

Thanks again, @attilah
Replacing the Select line with ProjectedExpression... did the trick, yes...
Follow up question:
Is the base setup with amplify add api per the docs here (Express CRUD), such that any errors that occur in the lambda return a (misleading) CORS error?
If so, is there a way to fix that, or is that just life with this setup?


[intel vtune] Consider pooling or sharding mutexes for some types; take proactor guarantees into consideration

Intel V-Tune dislikes the mutexes in the router code

I am not sure what the profiler is actually showing here, and how can I get same result (these functions shown at the top) from linux perf.
Regarding solutions. I think proactor guarantees do not help here. Proactor ensures the program never processes the same connection (link?) in more than one thread. Messages are by the nature of the router's function associated with more than one connection.
@franz1981 once considered pooling the mutexes. That is, if each instance of qd_message_t, etc. needs a mutex, then create a pool of initialized mutexes, and upon message creation, take a mutex out for it; on destruction of message, leave mutex initialized and put it back to pool. https://github.com/apache/qpid-dispatch/pull/508#issuecomment-505461704
There is alternative design, where you create an array of mutexes, choosing a suitable size N for it, probably based on number of worker threads, and some additional empiric parameters or constants. Then, you compute a hash of qd_message_t mod N. This is the index to the mutex in the array that will be protecting this message. Multiple unrelated qd_message_t's may now share a mutex, meaning that in some cases, two threads which were formerly free to work concurrently now cannot. Some sort of probing, as in hash tables, can be introduced on top, to minimize such collisions. Overall, this has a chance to produce speedup, however.
Finally, one possible speedup could be if mutex field in the structs was not a pointer but mutex was directly contained in the structs. When I tried this, I did not see the miraculous speedups I hoped for. Probably not worth pursuing it.
Edit: plus, of course using spinlocks as Franz tried, or possibly Linux futexes (that don't need to be initialized/freed) might also help.

From my flamegraph analysis the real overhead with sys_mutex() is the memory allocation overhead for the sys_mutex_t wrapper object (look a qd_message() in the flamegraph below):

https://github.com/skupperproject/skupper-router/blob/9a20e6e04c7f4c8a1fa6012e84075f2f732af88b/src/posix/threading.c#L41
The actual setup of the pthread mutex is very cheap.  So a a very first step I'd recommend you're suggestion of simply in-lining the mutex directly and avoiding the memory alloc completely.
Once you have a pull request for that re-run your vtune analysis and see what happens.

The actual setup of the pthread mutex is very cheap. So a a very first step I'd recommend you're suggestion of simply in-lining the mutex directly and avoiding the memory alloc completely.

They do look cheap in perf, I guess that's why Justin did not pull it up yet. I already said I don't know why vtune likes to show them on top
In your flamegraph, that lock creation shows on 323 samples, let's calculate it as 4%. That means if my base message rate is as shown below, I can expect ~2k message improvement if I could do away with it.
>>> 54273.5/100*4
2170.94

base, some commit randomly taken from main, at the time I was running this few days ago, I can find out which commit, but I did not write it down
Estimated message rate is 53938.7 +- 507 msgs/second at 95% confidence

futex jd_2022_03_28_futex
Estimated message rate is 56925.3 +- 258 msgs/second at 95% confidence

(data from https://github.com/skupperproject/skupper-router/issues/260#issuecomment-1090390216
In fact, I get almost 3k improvement
>>> 56925.3-53938.7
2986.600000000006

If I consider confidence interval of the difference as the sum of the two intervals for the subtracted numbers (which somewhat makes sense, although I am not sure it is theoretically completely sound), I have +- 765.
Assuming we can get a 4% perf improvement, by doing mutexes differently, is it worth it?

Actually, I did not notice the sys_mutex is there twice in the flamegraph
>>> 54273.5/100*7.23
3923.9740500000003

HI @jiridanek I won't measure the improvement on message rate like that, because it implies that 100% of the used cpu time is responsible of such rate, that's not possible, given that there are events on kernel space and NIC that won't appear on such graphs (off-cpu time due to IRQ handling).
Think about a sleep: it won't appear in on-cpu flamegraph but if removed will speed-up the code a lot :)

@franz1981 That makes sense. I think the only reason I went into the numbers is that I actually have that PR that replaces pthreads mutex with custom futex-based mutex which is very cheap to init (code from http://people.redhat.com/drepper/futex.pdf), and with that I get that "almost 3k" improvement in throughput, which turned out to be +5.53%. That is why I started to feel that the 7.23% may be a reasonable number. But I see that it's just accident that these turned out to be somehow comparable in magnitude.


Please invite me to the community

Name
Meanking
Discord Username (if applicable)
No response
Additional Context
I would like to join the SurPath to discuss and learn more about software development

Hey


Feature/ap 106 107 benefit checker result

AP-106 client is passported
AP-107 client is not passported
After the Benefits Check step, show the result and indicate what is the next step.
The API doesn't return what kind of benefit the citizen receives so I could not implement exactly what's on the prototype.
Prototype: https://provider-apply-for-legal-aid.herokuapp.com/passported
To get a positive result (citizen receiving benefits), use these values:
Last name: Walker
DoB: 10/01/1980
NIN: JA293483A
You can find more example in this JIRA spike: https://dsdmoj.atlassian.net/browse/AP-84
Positive Result:

Negative Result:

Checklist
Before you ask people to review this PR:

[x] Tests and rubocop should be passing: bundle exec rake
[x] Github should not be reporting conflicts; you should have recently run git rebase master.
[x] There should be no unneccessary whitespace changes. These make diffs harder to read and conflicts more likely.
[x] The PR description should say what you changed and why, with a link to the JIRA story.
[x] You should have looked at the diff against master and ensured that nothing unexpected is included in your changes.
[x] You should have checked that the commit messages say why the change was made.

Good point. I squashed all these small commits into one


Empty box in the nutrition table tab

The Empty boxes are hidden in the other tabs thanks to a recent commit, but the nutrition table has been forgotten.

I saw that too, and I was wondering... Could it be possible no not show the tab at all, if there is nothing to display ? For example, if no nutritional information is provided, only display the basic and ingredients tabs. That way, we wouldn't slide to an empty tab.
What do you think ?

@asmoth360 Not sure this feature will improve the contribution.
I think we have to add some buttons and text to tell to the user that he can add information instead of dropping tabs
what do you think @teolemon ?

I'm on the same line. I'd rather keep the tab and add a prompt/button to add data.

Please see https://github.com/openfoodfacts/OpenFoodFacts-androidApp/issues/457 for more suggestions about that


Update some problematic dependencies

$ npm install
npm WARN deprecated<EMAIL_ADDRESS>this package has been reintegrated into npm and is now out of date with respect to npm
npm WARN deprecated<EMAIL_ADDRESS>use [cross-spawn](https://github.com/IndigoUnited/node-cross-spawn) or [cross-spawn-async](https://github.com/IndigoUnited/node-cross-spawn-async) instead.
⋮

Also, move from phantomjs to phantomjs-prebuilt?

Note to self: @marcoscaceres has “been using latest Phantomjs-prebuilt here and it works great”; bug him if I'm stuck with the change.

…or nightmare.

Nightmare is pretty good. If you want to go bare metal, Electron is also pretty awesome.


Annotation image path handling on local and remote

Describe the bug
A user running in client/server mode tried to create an annotation image object and then save images from VisIt. Sometimes (for small things) it worked. For big things it didn't and instead issued an error that the annotation image path is invalid on the remote...which is true.
For big things, VisIt enters SR mode and needs the annotation image on the remote engine. This then creates a requirement where the annotation image needs to be at the same path on both local and remote which is not always practical. Its possible saving to /tmp on both helps. It did in the discussion ref'd above.
Best option might be to include in the annotation object an additional path option for the remote.
See https://github.com/visit-dav/visit/discussions/18242 for more info.

That brings up an interesting question. Should the image annotation object be on the local or remote system? It sounds like the current implementation is for it to be remote if in scalable rendering mode and local if rendering geometry in the viewer. This seems confusing. I don't know what the right answer is, but maybe some thought needs to go into figuring out what the right behavior should be.

The orig. design for SR mode was to render only the data and handle all annotations on the viewer after the data image was sent back to the viewer. Then, we added the ability to do non-screen-capture saves necessitating doing annotations on the engine and duplicating annotation coding support in both the viewer and engine.
We probably don't have the correct underlying architecture for this becase its easy to get it right for non-SR mode and forget to also go handle the logic for SR mode on the engine. What we really need is a few shared classes for rendering that are used on both viewer and engine and then changes in one place would work for both.

Another option is to instead of having a second path for the image annotation is to use some more symbolic constants for the image path so that $HOME or $VISITDIR or something would work on both too.

An additional swizzle here is dealing with where the annotation image can be found in a parallel engine. In many cases, parallel compute nodes cannot see the same file system space login nodes do. So, the image file needs to get copied (or shipped as internal data) (maybe by the vcl or mdserver) to a place that the parallel engine can find it.


[WHLSL] Metal code generation

Migrated from https://bugs.webkit.org/show_bug.cgi?id=187735:
At 2018-07-17T18:42:47Z<EMAIL_ADDRESS>wrote:
Adding WHLSL compiler

At 2018-07-17T18:43:10Z<EMAIL_ADDRESS>wrote:
Created attachment 345174
Patch

At 2018-07-17T20:25:55Z<EMAIL_ADDRESS>wrote:
Comment on attachment 345174
Patch
Attachment 345174 did not pass win-ews (win):
Output: https://webkit-queues.webkit.org/results/8566221
New failing tests:
fast/loader/plain-text-document.html

At 2018-07-17T21:24:11Z<EMAIL_ADDRESS>wrote:
Comment on attachment 345174
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=345174&action=review
Can we have some tests that check input v expected output?

Tools/WebGPUShadingLanguageRI/Metal/ArrayRefDefinition.ts:26
+/// Writes the definitions of the structures used for the different array ref types present in the program

While this isn't C++ code, and also isn't JS code, we should probably still follow the coding guidelines. That would mean using // and ending the sentence with a full stop (period). The same goes for other comments in the patch.

Tools/WebGPUShadingLanguageRI/Metal/Deinliner.ts:48

   if (a == ReturnStyle.Always || a == ReturnStyle.SometimesEarly) {

       return a;

   } else {

       return b;

   }

Single line conditionals.

Tools/WebGPUShadingLanguageRI/Metal/Deinliner.ts:138

       if (result == ReturnStyle.Always) {

           return ReturnStyle.SometimesEarly;

       }

Single line conditionals don't use {} in WebKit.

Tools/WebGPUShadingLanguageRI/Metal/Deinliner.ts:186

const returnStyle = returnStyleForNodeOrNull(node);
return returnStyle != ReturnStyle.SometimesEarly;

No need for temporary local variable.

Tools/WebGPUShadingLanguageRI/Metal/FindTopLevelTypeAttributes.ts:69

   case "vertex":

       this.visitVertexShader(func);

   case "fragment":

       this.visitFragmentShader(func);

I assume TypeScript doesn't need break in cases?

Tools/WebGPUShadingLanguageRI/Metal/FindTopLevelTypeAttributes.ts:78

   for (let param of func.parameters) {

       this.attributesForType(param.type).isVertexAttribute = true;

   }

Single line statement.

Tools/WebGPUShadingLanguageRI/Metal/FindTopLevelTypeAttributes.ts:85

   for (let param of func.parameters) {

       this.attributesForType(param.type).isVertexOutputOrFragmentInput = true;

   }

Ditto.

Tools/WebGPUShadingLanguageRI/Metal/LineNumbers.ts:29

const lineNos = [];
let lineNo = 1;

Use lineNumbers and lineNumber.

Tools/WebGPUShadingLanguageRI/Metal/LineNumbers.ts:34

   if (src[i] == '\n') {

       lineNo++;

   }

Single line.

Tools/WebGPUShadingLanguageRI/Metal/MSLFunctionDeclaration.ts:60

   for (let param of this._func.parameters) {

       map.set(param.name, `P${counter++}`);

   }

Single line.

Tools/WebGPUShadingLanguageRI/Metal/MSLFunctionDeclaration.ts:69

   for (let [paramName, param] of this.paramMap) {

       params.push(paramName);

   }

Single line.

Tools/WebGPUShadingLanguageRI/Metal/MSLFunctionDeclaration.ts:85

   if (this._func.shaderType === "vertex" || this._func.shaderType === "fragment") {

       declLine += `${this._func.shaderType} `;

   }

Should you return if it isn't one of these types?

Tools/WebGPUShadingLanguageRI/Metal/MSLLexer.ts:87

               for (let innerTok of this._lex(commentText, this.commentMatchers)) {

                   tokens.push(innerTok);

               }

SIngle line.

Tools/WebGPUShadingLanguageRI/Metal/MSLLexer.ts:105

               } else {

                   tokens.push(new Token(matcher.type, match[0]));

               }

Ditto.

Tools/WebGPUShadingLanguageRI/Metal/MSLStatementEmitter.ts:74

   if (this.ancestorReturnType.name === "void") {

       this._add(`return;`);

   } else {

       const resultVar = this._fresh();

       this._add(`${this._typeNamer.mslTypeName(this.ancestorReturnType)} ${resultVar};`);

       this._zeroInitialize(this.ancestorReturnType, resultVar);

       this._add(`return ${resultVar};`);

   }

For things like this we normally do early returns. e.g.
if (this.ancestorReturnType.name === "void") {
this._add(return;);
return;
}
const resultVar....
Also, you don't need a `` string for the "return". I'm not sure there is really a performance win though.

Tools/WebGPUShadingLanguageRI/Metal/MSLStatementEmitter.ts:91

           if (node.name == "bool") {

               emitter._add(`${variableName} = false;`);

           } else {

               emitter._add(`${variableName} = 0;`);

           }

       }

Single line conditionals.

Tools/WebGPUShadingLanguageRI/Metal/MSLStatementEmitter.ts:102

           for (let i = 0; i < node.numElements.value; i++) {

               emitter._zeroInitialize(node.elementType, `${variableName}[${i}]`, false);

           }

Single line.

Tools/WebGPUShadingLanguageRI/Metal/MSLStatementEmitter.ts:244

   } else {

       this._add('}');

   }

Single line.

Tools/WebGPUShadingLanguageRI/Metal/MSLStatementEmitter.ts:263

   } else {

       throw new Error(`Couldn't determine type of ! expression ${node}'`);

   }

Single line.

Tools/WebGPUShadingLanguageRI/Metal/MSLStatementEmitter.ts:277

   if (this._canAvoidDereferenceBecauseDereferencingReferenceNode(node.ptr)) {

       return this._doNotProduceReferenceFromReferenceNode(node.ptr);

   } else {

Single line.

Tools/WebGPUShadingLanguageRI/Metal/MSLStatementEmitter.ts:370

           if (anderRegex.test(node.nativeFuncInstance.name)) {

               return emitter._handleFieldAccess(node);

           } else if (node.nativeFuncInstance.name === "operator&[]") {

               return emitter._handleIndexAccess(node);

           }

Again.

Tools/WebGPUShadingLanguageRI/Metal/MSLStatementEmitter.ts:425

   } else {

       return this._nameMap.get(node.name);

   }

Again.

Tools/WebGPUShadingLanguageRI/Metal/MSLStatementEmitter.ts:441

   for (let expr of node.list) {

       result = Node.visit(expr, this);

   }

Again. I'll stop pointing them out now.

At 2018-07-17T20:26:06Z<EMAIL_ADDRESS>wrote:
Created attachment 345185
Archive of layout-test-results from ews202 for win-future
The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews202  Port: win-future  Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit

At 2018-07-17T18:45:29Z<EMAIL_ADDRESS>wrote:
Attachment 345174 did not pass style-queue:
ERROR: Tools/WebGPUShadingLanguageRI/Metal/tsconfig.json:14:  Expecting property name enclosed in double quotes: line 14 column 9 (char 309)  [json/syntax] [5]
Total errors found: 1 in 31 files
If any of these errors are false positives, please file a bug against check-webkit-style.

At 2018-07-18T00:14:49Z<EMAIL_ADDRESS>wrote:
Attachment 345208 did not pass style-queue:
ERROR: Tools/WebGPUShadingLanguageRI/Metal/tsconfig.json:14:  Expecting property name enclosed in double quotes: line 14 column 9 (char 309)  [json/syntax] [5]
Total errors found: 1 in 31 files
If any of these errors are false positives, please file a bug against check-webkit-style.

At 2018-07-18T02:28:40Z<EMAIL_ADDRESS>wrote:
Created attachment 345219
Patch

At 2018-07-18T00:10:55Z<EMAIL_ADDRESS>wrote:
Created attachment 345208
Patch

At 2018-08-28T03:06:19Z<EMAIL_ADDRESS>wrote:
Created attachment 348257
WIP

At 2018-08-29T17:03:51Z<EMAIL_ADDRESS>wrote:
Created attachment 348407
WIP

At 2018-07-18T02:30:04Z<EMAIL_ADDRESS>wrote:
Created attachment 345220
Patch

At 2018-09-04T22:05:35Z<EMAIL_ADDRESS>wrote:
Created attachment 348852
Patch sans TypeScript

At 2018-09-04T23:31:17Z<EMAIL_ADDRESS>wrote:
Created attachment 348869
Patch sans TypeScript

At 2018-09-01T03:22:53Z<EMAIL_ADDRESS>wrote:
Created attachment 348703
Patch

At 2018-09-05T01:43:19Z<EMAIL_ADDRESS>wrote:
Comment on attachment 348869
Patch sans TypeScript
Attachment 348869 did not pass mac-wk2-ews (mac-wk2):
Output: https://webkit-queues.webkit.org/results/9096384
New failing tests:
accessibility/smart-invert-reference.html

At 2018-09-05T01:43:21Z<EMAIL_ADDRESS>wrote:
Created attachment 348884
Archive of layout-test-results from ews107 for mac-sierra-wk2
The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews107  Port: mac-sierra-wk2  Platform: Mac OS X 10.12.6

At 2018-09-06T23:57:22Z<EMAIL_ADDRESS>wrote:
Comment on attachment 348869
Patch sans TypeScript
View in context: https://bugs.webkit.org/attachment.cgi?id=348869&action=review
Halfway done reviewing

Tools/WebGPUShadingLanguageRI/MakeArrayRefExpression.js:40

       while (lValueType instanceof TypeRef && lValueType.type)

           lValueType = lValueType.type;

Why is this necessary to do in the constructor? Our code should be resilient to TypeRefs.

Tools/WebGPUShadingLanguageRI/MakeArrayRefExpression.js:44

       if (lValueType.isArray && lValueType.elementType)

           this._type = new ArrayRefType(origin, "thread", lValueType.elementType);

       else

           this._type = new ArrayRefType(origin, "thread", lValueType);

Can't we do this with a virtual function instead of hardcoding type names?

Tools/WebGPUShadingLanguageRI/Metal/ArrayRefDefinition.js:39
+function metalSourceForArrayRefDefinition(arrayRefType, typeNamer)
+{

let src = struct ${typeNamer.uniqueTypeId(arrayRefType)} {\n;
const fakePtrType = new PtrType(arrayRefType.origin, arrayRefType.addressSpace, arrayRefType.elementType);
src +=     ${metalSourceForVarDeclaration(typeNamer, fakePtrType, "ptr")};\n;
src += "    uint32_t length;\n";
src += "};";
return src;
+}

+function metalSourceForArrayRefForwardDeclaration(arrayRefType, typeNamer)
+{

return struct ${typeNamer.uniqueTypeId(arrayRefType)};;
+}

Why is this in its own file? It's only called in one place.

Tools/WebGPUShadingLanguageRI/Metal/CompileResult.js:26
+class CompileResult {

Does Javascript have the concept of namespaces? We want to make sure that the Metal backend's classes don't collide with any other codegen's classes. If there aren't real namespaces, we should prefix the names that get put in the global scope (probably except for whlslToMsl()).

Tools/WebGPUShadingLanguageRI/Metal/ConstexprEmitter.js:37

visitEnumLiteral(node)
{

   return node.member.value.toString();

}

Does this actually work? Is this tested?
We should make sure this file and https://bugs.webkit.org/show_bug.cgi?id=189029 stay in sync

Tools/WebGPUShadingLanguageRI/Metal/FunctionLikeBlockCanBeInlined.js:28
+function functionLikeBlockCanBeInlined(node)

We should make a bug to add whatever infrastructure is necessary to allow inlining for every function.

Tools/WebGPUShadingLanguageRI/Metal/LineNumbers.js:38
+function lineNumbers(src)
+{

const lineNumbers = [];
let lineNumber = 1;
for (let i = 0; i < src.length; i++) {

   lineNumbers.push(lineNumber);

   if (src[i] == '\n')

       lineNumber++;

}
return lineNumbers;
+}

Why not use the .origin property on parsed nodes? For every expression, you'll know where it came from in the source. No need to calculate it twice.

Tools/WebGPUShadingLanguageRI/Metal/MSLFunctionDeclaration.js:31

   this._funcMangler = funcMangler;

This is a layering inversion. The mangler is only used here for a single place; why doesn't whoever constructs a MSLFunctionDeclaration pass in the mangled name? This could also apply to the other arguments here.

Tools/WebGPUShadingLanguageRI/Metal/MSLFunctionDeclaration.js:41

get funcMangler()
{

   return this._funcMangler;

}

Similar to above; this seems upside-down.

Tools/WebGPUShadingLanguageRI/Metal/MSLFunctionDeclaration.js:94

   // What WSL calls `compute` shaders Metal calls `kernel` shaders.

   // We're only focussing on `vertex` and `fragment` for now.

Do we have a bug for this? Seems important.

Tools/WebGPUShadingLanguageRI/Metal/MSLFunctionDeclaration.js:99

       declLine += `${this._func.shaderType} `;

   declLine += `${this._typeNamer.mslTypeName(this._func.returnType)} `;

   declLine += this._funcMangler.mangle(this.func);

   declLine += "("

Doesn't Javascript have a better way to do string building? Even appending a bunch of strings to an array and then joining the array at the last minute would be better.

Tools/WebGPUShadingLanguageRI/Metal/MSLFunctionDeclaration.js:120

   // We currently assuming that all parameters to entry points are attributes.

:(
Open a bug?

Tools/WebGPUShadingLanguageRI/Metal/MSLStatementEmitter.js:40

   this._counter = counter ? counter : new Counter("V");

Seems over-engineered. Getters/setters of a Number seems simpler.

Tools/WebGPUShadingLanguageRI/Metal/MSLStatementEmitter.js:714

   if (canBeInlined)

If it can be inlined, then inline it? That seems like a non-optimal heuristic. We should have an explicit step to record whether or not each function should be inlined, and then this step will just consult that list.
Initially, inlining nothing seems like the safest bet.

Tools/WebGPUShadingLanguageRI/Metal/MSLTypeNamer.js:66

               "void": "void",

               "bool": "bool",

               "uchar": "uint8_t",

               "ushort": "uint16_t",

               "uint": "uint32_t",

               "char": "int8_t",

               "short": "int16_t",

               "int": "int32_t",

               "half": "half",

               "float": "float",

               "atomic_int": "atomic_int",

               "atomic_uint": "atomic_uint"

Samplers, textures

Tools/WebGPUShadingLanguageRI/Metal/MSLTypeNamer.js:129

               "bool": "bool",

Bool matrices don't exist

Tools/WebGPUShadingLanguageRI/Metal/MetalCodegen.js:84

_tryGenerateMsl()

Functions that don't return a sentinel don't need to be named "try"

Tools/WebGPUShadingLanguageRI/Metal/MetalCodegen.js:86

   // Step 1: Find all the functions to compile

Comments should answer "why," not "how." I recommend deleting these.

Tools/WebGPUShadingLanguageRI/Metal/MetalCodegen.js:119

_findEntryPointDefinitions()

How about findReachableFunctions()?

Tools/WebGPUShadingLanguageRI/Metal/MetalCodegen.js:188

       } else if (type instanceof ArrayRefType) {

           this._forwardTypeDecls.push(metalSourceForArrayRefForwardDeclaration(type, this._typeNamer));

           this._typeDefinitions.push(metalSourceForArrayRefDefinition(type, this._typeNamer));

We should probably allow Arrays (in addition to ArrayRefs). They are strictly less powerful.

Tools/WebGPUShadingLanguageRI/Metal/Token.js:26
+// The output of MSLLexer.

This notion is better encapsulated with names (either of variables or the class)

Tools/WebGPUShadingLanguageRI/Metal/TypeOf.js:26
+function typeOf(node) {

I'm not sure why this is necessary. I think we should make the Checker always attach the type of everything to itself. It could be implemented with a getter that's overridden by every class.

Tools/WebGPUShadingLanguageRI/Metal/TypeOf.js:131

       return node.type.visit(this);

Doesn't seem right. The type of an array ref is not equal to the inner type.

Tools/WebGPUShadingLanguageRI/Metal/TypeOf.js:226

       throw new Error("BoolLiteral has no type");

Why isn't the type of a BoolLiteral a bool? NullLiteral has a type...

Tools/WebGPUShadingLanguageRI/Metal/TypeUnifier.js:75

   node.baseType.visit(this);

Why not call super? (And ditto for all the other occurrences in this file)

Tools/WebGPUShadingLanguageRI/Metal/TypeUnifier.js:96

   return `${node.elementType.visit(this)}[${node.numElements}]`;

I think this has been renamed to numElementsValue

Tools/WebGPUShadingLanguageRI/Metal/TypeUnifier.js:118

visitMakeArrayRefExpression(node)
{

   if (!node.type)

       throw new Error(node);

   return node.type.visit(this);

}

Why just MakeArrayRefExpression? Shouldn't we be visiting every expression? Similarly, we should make sure every expression has a .type property.

Tools/WebGPUShadingLanguageRI/Metal/TypeUnifier.js:123

   const nameSet = new Set();

Seems like this set will always have the exact same set of things as in declSet. Why have two?

Tools/WebGPUShadingLanguageRI/Metal/WHLSLLexer.js:71
+function lexWHLSL(src)

We already have a WHLSL lexer. Why reimplement it?

Tools/WebGPUShadingLanguageRI/Metal/compiler.js:11
+/*

Copyright (C) 2018 Apple Inc. All rights reserved.

Redistribution and use in source and binary forms, with or without

modification, are permitted provided that the following conditions

are met:

Redistributions of source code must retain the above copyright

notice, this list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright

notice, this list of conditions and the following disclaimer in the

documentation and/or other materials provided with the distribution.

I'd recommend a better name for this file. Also, using correct casing.

Tools/WebGPUShadingLanguageRI/Metal/index.html:173

We've really got to find a better way to do this. https://bugs.webkit.org/show_bug.cgi?id=189378

Tools/WebGPUShadingLanguageRI/StandardLibrary.js:43

   for (var type of [`bool`, `uchar`, `ushort`, `uint`, `char`, `short`, `int`, `half`, `float`]) {

       for (var size of [2, 3, 4]) {

:(

Tools/WebGPUShadingLanguageRI/Test.js:35
+} else if (this.load)

Why?

Tools/WebGPUShadingLanguageRI/Test.js:74
{

return TypedValue.box(program.intrinsics.int, value);

return TypedValue.box(program.intrinsics.int, (value | 0));
}

function makeUint(program, value)
{

return TypedValue.box(program.intrinsics.uint, value);

return TypedValue.box(program.intrinsics.uint, (value >>> 0));
}

function makeUchar(program, value)
{

return TypedValue.box(program.intrinsics.uchar, value);

return TypedValue.box(program.intrinsics.uchar, (value >>> 0) & 0xff);
}

function makeBool(program, value)
{

return TypedValue.box(program.intrinsics.bool, value);

return TypedValue.box(program.intrinsics.bool, !!value);
}

These have been moved to Casts.js

Tools/WebGPUShadingLanguageRI/Test.js:1080

checkNumber(program, callFunction(program, "foo", []), 42);

checkUint(program, callFunction(program, "foo", [], []), 42);

Are you are the extra argument to callFunction is right?
Can we delete checkNumber()?

Tools/WebGPUShadingLanguageRI/Test.js:1086

checkNumber(program, callFunction(program, "foo", []), 42);

checkFloat(program, callFunction(program, "foo", [], []), 42);

Ditto.

Tools/WebGPUShadingLanguageRI/Test.js:-2421

checkFail(

   () => doPrep(`

       void foo()

       {

           float3 x;

           bool r = bool(x);

       }

   `),

   e => e instanceof WTypeError);

checkFail(

   () => doPrep(`

       void foo()

       {

           float3x3 x;

           bool r = bool(x);

       }

   `),

   e => e instanceof WTypeError);

I've since deleted this, I think you'll need to rebase.

Tools/WebGPUShadingLanguageRI/Test.js:-2711

checkUchar(program, callFunction(program, "foo", [makeUchar(program, 65535), makeUint(program, 2)]), 252);

Why?

Tools/WebGPUShadingLanguageRI/Test.js:-2726

checkUchar(program, callFunction(program, "foo", [makeUchar(program, 65535), makeUint(program, 2)]), 255);
checkUchar(program, callFunction(program, "foo", [makeUchar(program, -1), makeUint(program, 5)]), 255);

Why?

At 2018-09-08T00:52:52Z<EMAIL_ADDRESS>wrote:
(In reply to Myles C. Maxfield from comment #18)

Comment on attachment 348869 [details]
Patch sans TypeScript
View in context:
https://bugs.webkit.org/attachment.cgi?id=348869&action=review

Tools/WebGPUShadingLanguageRI/Metal/MSLStatementEmitter.js:210

   // This is necessary because for loops are compiled as while loops, so we need to do

   // the loop increment and condition check before returning to the beginning of the loop.

Why? For loops are implemented in the interpreter, why shouldn't they be
implemented in Metal?

The initializer, condition, or the increment of the for loop may be a compound expression in WHLSL that has to compile to several statements in Metal. It is awkward to retain the for loop structure in Metal.

At 2018-09-08T00:46:03Z<EMAIL_ADDRESS>wrote:
Comment on attachment 348869
Patch sans TypeScript
View in context: https://bugs.webkit.org/attachment.cgi?id=348869&action=review

Tools/WebGPUShadingLanguageRI/Metal/MSLStatementEmitter.js:210

   // This is necessary because for loops are compiled as while loops, so we need to do

   // the loop increment and condition check before returning to the beginning of the loop.

Why? For loops are implemented in the interpreter, why shouldn't they be implemented in Metal?

Tools/WebGPUShadingLanguageRI/Metal/MSLStatementEmitter.js:211

   this._emitLoopBodyEnd();

Wha happens if a continue is inside a switch inside a loop?

Tools/WebGPUShadingLanguageRI/Metal/MSLStatementEmitter.js:221

   for (let stmt of block.statements) {

No need to smoosh together "statement" into "stmt"

Tools/WebGPUShadingLanguageRI/Metal/MSLStatementEmitter.js:225

   }

Why don't blocks emit "{"?

Tools/WebGPUShadingLanguageRI/Metal/MSLStatementEmitter.js:232

   if (this._resultVar)

What's the difference between _resultVar and the returned value?

Tools/WebGPUShadingLanguageRI/Metal/MSLStatementEmitter.js:235

       this._add(`return ${expr};`);

All expressions should be saved into variables.

Tools/WebGPUShadingLanguageRI/Metal/MSLStatementEmitter.js:291

   const type = typeOf(node);

   if (type) {

Should just assume this is bool. We prove that elsewhere.

Tools/WebGPUShadingLanguageRI/Metal/MSLStatementEmitter.js:306

   if (this._canAvoidDereferenceBecauseDereferencingReferenceNode(node.ptr))

       return this._doNotProduceReferenceFromReferenceNode(node.ptr);

I'd recommend putting this kind of thing in a follow-up patch.

Tools/WebGPUShadingLanguageRI/Metal/MSLStatementEmitter.js:308

       return `(*(${node.ptr.visit(this)}))`;

All expressions should be saved into local variables.

Tools/WebGPUShadingLanguageRI/Metal/MSLStatementEmitter.js:427

   if (node.variable instanceof AnonymousVariable)

       return Node.visit(node.variable, this);

   let name = node.name;

   if (!this._nameMap.has(name))

       throw new Error(`${node.name} not found in this function's variable map`);

We should be mapping variables to names, not names to names. That way we can unify these paths.

Tools/WebGPUShadingLanguageRI/Metal/MSLStatementEmitter.js:467

   // Anonymous variable names are of the form anonVar<i> (where i is an integer), i.e.

   // the set of anonymous variable names is disjoint from the set of definable variable names.

   if (!this._nameMap.has(node.name)) {

       let id = this._fresh();

       this._nameMap.set(node.name, id);

       this._add(metalSourceForVarDeclaration(this._typeNamer, node.type, id) + `; // ${node.name}`);

       this._zeroInitialize(node.type, id);

       return id;

   } else

       return this._nameMap.get(node.name);

Anonymous variables should be treated exactly the same as regular variables.

Tools/WebGPUShadingLanguageRI/Metal/MSLStatementEmitter.js:475

   return rhs;

I think you mean lhs here

Tools/WebGPUShadingLanguageRI/Metal/MSLStatementEmitter.js:540

   else

       throw new Error(`Unimplemented native function '${node.name}' at MSLStatementEmitter.makeFunctionCall`);

Without inlining, this is no longer correct.

Tools/WebGPUShadingLanguageRI/Metal/MSLStatementEmitter.js:565

   this._emitReturnZeroValue();

This isn't right. This should be a trap, the whole program should stop executing. We want more than just the current function to return zeroes.

Tools/WebGPUShadingLanguageRI/Metal/MSLStatementEmitter.js:575

   this._emitReturnZeroValue();

Ditto.

Tools/WebGPUShadingLanguageRI/Metal/MSLStatementEmitter.js:606

   this._emitReturnZeroValue();

Ditto

Tools/WebGPUShadingLanguageRI/Metal/MSLStatementEmitter.js:624

   if (arg instanceof MakePtrExpression) {

       const argId = Node.visit(arg.lValue, this);

       if (arg.lValue && arg.lValue instanceof VariableRef)

           return `${argId}.${field}`;

       else

           return `(${argId}).${field}`;

   } else

       return `${arg.visit(this)}->${field}`;

Why does the field access care what type the inner thing is? We should try to make it so that we can just do a recursive call here and the right thing happens.

Tools/WebGPUShadingLanguageRI/Metal/MSLStatementEmitter.js:632

_emitOperatorAnder(node, result, args)
{

   const type = node.implementationData.type;

   const field = this._typeAttributes.attributesForType(type).mangledFieldName(node.implementationData.name);

   this._add(`${result} = (${this._typeNamer.mslTypeName(node.returnType)})&((${args[0]})->${field});`);

}

Which anders aren't implemented in the language?

Tools/WebGPUShadingLanguageRI/Metal/MSLStatementEmitter.js:646

   // FIXME: Avoid so much special casing.

Yes please. See the above comment for _handleFieldAccess

Tools/WebGPUShadingLanguageRI/Metal/MSLStatementEmitter.js:685

   const expr = node.lValue.visit(this);

   return `&(${expr})`;

Why doesn't this get saved into a variable?

Tools/WebGPUShadingLanguageRI/Metal/MSLStatementEmitter.js:732

   const emitter = new MSLStatementEmitter(this._funcMangler, this._typeNamer, node.body, nameMap, node.origin.text, this._lineNumbers, this._typeAttributes, resultVar, this._counter, this.ancestorReturnType);

Why is it necessary to create a new MSLStatementEmitter? Why can't we just keep recursing?

Tools/WebGPUShadingLanguageRI/Metal/MSLStatementEmitter.js:743

// which is checked on each iteration (all loops are compiled to a while loop or do/while loop). The check is

Why?

Tools/WebGPUShadingLanguageRI/Metal/MSLStatementEmitter.js:749

       Node.visit(node.initialization, this); // initalization can be null

No need for this comment

Tools/WebGPUShadingLanguageRI/Metal/MSLStatementEmitter.js:866

   return `(nullptr)`;

Why parentheses?

Tools/WebGPUShadingLanguageRI/Metal/MSLStatementEmitter.js:928

   this._indent();

There should be a function which takes a lambda that does the indent/unindent for you

Tools/WebGPUShadingLanguageRI/Metal/MSLStatementEmitter.js:944

// Unimplemented methods. I write out comments for these rather than throwing exceptions because it makes it easier for me
// to see where the nodes occur in the abstract syntax tree

We should throw exceptions for these. Writing out the location might be valuable for your own debugging, but it isn't for committing

At 2018-09-11T16:40:48Z<EMAIL_ADDRESS>wrote:
(In reply to Myles C. Maxfield from comment #17)

Comment on attachment 348869 [details]
Patch sans TypeScript
View in context:
https://bugs.webkit.org/attachment.cgi?id=348869&action=review

Tools/WebGPUShadingLanguageRI/Test.js:-2421

checkFail(

   () => doPrep(`

       void foo()

       {

           float3 x;

           bool r = bool(x);

       }

   `),

   e => e instanceof WTypeError);

checkFail(

   () => doPrep(`

       void foo()

       {

           float3x3 x;

           bool r = bool(x);

       }

   `),

   e => e instanceof WTypeError);

I've since deleted this, I think you'll need to rebase.

They’re still in master.

At 2018-09-12T02:35:16Z<EMAIL_ADDRESS>wrote:
Created attachment 349505
WIP

At 2018-09-08T02:21:03Z<EMAIL_ADDRESS>wrote:
(In reply to Thomas Denney from comment #19)

(In reply to Myles C. Maxfield from comment #18)

Comment on attachment 348869 [details]
Patch sans TypeScript
View in context:
https://bugs.webkit.org/attachment.cgi?id=348869&action=review

Tools/WebGPUShadingLanguageRI/Metal/MSLStatementEmitter.js:210

   // This is necessary because for loops are compiled as while loops, so we need to do

   // the loop increment and condition check before returning to the beginning of the loop.

Why? For loops are implemented in the interpreter, why shouldn't they be
implemented in Metal?

The initializer, condition, or the increment of the for loop may be a
compound expression in WHLSL that has to compile to several statements in
Metal. It is awkward to retain the for loop structure in Metal.

👍

At 2018-09-12T06:02:55Z<EMAIL_ADDRESS>wrote:
Comment on attachment 349505
WIP
Attachment 349505 did not pass mac-wk2-ews (mac-wk2):
Output: https://webkit-queues.webkit.org/results/9187455
New failing tests:
accessibility/smart-invert-reference.html

At 2018-09-12T06:02:57Z<EMAIL_ADDRESS>wrote:
Created attachment 349524
Archive of layout-test-results from ews106 for mac-sierra-wk2
The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews106  Port: mac-sierra-wk2  Platform: Mac OS X 10.12.6

At 2018-09-12T20:57:03Z<EMAIL_ADDRESS>wrote:
(In reply to Myles C. Maxfield from comment #18)

Comment on attachment 348869 [details]
Patch sans TypeScript
View in context:
https://bugs.webkit.org/attachment.cgi?id=348869&action=review

Tools/WebGPUShadingLanguageRI/Metal/MSLStatementEmitter.js:211

   this._emitLoopBodyEnd();

Wha happens if a continue is inside a switch inside a loop?

I think this is OK. In WHLSL/C/C++ using a continue in a switch in a loop still affects the outer loop. _emitLoopBodyEnd just emits the loop increment statement and the condition statement, so the semantics are retained.

At 2018-09-13T01:52:23Z<EMAIL_ADDRESS>wrote:
rdar://problem/44403031

At 2018-09-13T02:10:43Z<EMAIL_ADDRESS>wrote:
Created attachment 349612
WIP

At 2018-09-14T02:37:58Z<EMAIL_ADDRESS>wrote:
(In reply to Myles C. Maxfield from comment #17)

Comment on attachment 348869 [details]
Patch sans TypeScript
View in context:
https://bugs.webkit.org/attachment.cgi?id=348869&action=review

Tools/WebGPUShadingLanguageRI/Metal/MSLFunctionDeclaration.js:31

   this._funcMangler = funcMangler;

This is a layering inversion. The mangler is only used here for a single
place; why doesn't whoever constructs a MSLFunctionDeclaration pass in the
mangled name? This could also apply to the other arguments here.

Tools/WebGPUShadingLanguageRI/Metal/MSLFunctionDeclaration.js:41

get funcMangler()
{

   return this._funcMangler;

}

Similar to above; this seems upside-down.

MSLFunctionForwardDeclaration and MSLFunctionDefinition  are concrete subclasses of this class, and they each use all of the parameters; the former uses them for correctly constructing all of the parameters (e.g. with attributes) whilst the latter needs to pass all of them to its internal MSLStatementEmitter, which then needs to use the function name mangler for function calls, the parameter map for extending to the internal variable map, and the type attributes for correctly accessing type properties.

At 2018-09-14T04:49:13Z<EMAIL_ADDRESS>wrote:
Created attachment 349733
Patch

At 2018-09-13T20:50:55Z<EMAIL_ADDRESS>wrote:
Created attachment 349696
WIP

At 2018-09-14T06:04:59Z<EMAIL_ADDRESS>wrote:
Created attachment 349735
Patch

At 2018-09-15T00:40:14Z<EMAIL_ADDRESS>wrote:
Comment on attachment 349826
Patch
Attachment 349826 did not pass mac-wk2-ews (mac-wk2):
Output: https://webkit-queues.webkit.org/results/9222200
New failing tests:
accessibility/smart-invert-reference.html

At 2018-09-14T23:18:34Z<EMAIL_ADDRESS>wrote:
Created attachment 349826
Patch

At 2018-09-14T22:19:59Z<EMAIL_ADDRESS>wrote:
Created attachment 349817
Patch

At 2018-09-15T00:40:16Z<EMAIL_ADDRESS>wrote:
Created attachment 349839
Archive of layout-test-results from ews104 for mac-sierra-wk2
The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104  Port: mac-sierra-wk2  Platform: Mac OS X 10.12.6

Committed r236299: https://trac.webkit.org/changeset/236299


Let user pick ansible_hostname or ansible_fqdn in Ceph spec

Follow up patch to 56fea615371e3982347cacf9baf27601945e311c
It's valid for the Ceph spec to have either a long hostname (foo.bar.com) or short hostname (foo). In TripleO we supported either option via the boolean CephSpecFqdn (default false) and defaulted to using the short name. The ci-framework only offered the shortname when building the ceph-spec originally.
A recent patch switched from ansible_hostname to ansible_fqdn for a CI job and users deploying locally saw this error when their spec had the longname.
ERROR: hostname "edpm-compute-0" does not match expected
hostname "edpm-compute-0.ctlplane.example.com"
This patch adds the ceph_spec_fqdn option with the same default and updates the CI job to set ceph_spec_fqdn true, thus mirroring the behavior we had in tripleo-ansible and its CI.
Also, remove cifmw_cephadm_bootstrap_host variable as it is declared once but otherwise never used.
As a pull request owner and reviewers, I checked that:

[x] Appropriate testing is done and actually running
[x] Appropriate documentation exists and/or is up-to-date:

[x] README in the role
[x] Content of the docs/source is reflecting the changes

Precedent:

https://github.com/openstack/tripleo-heat-templates/commit/44d1e2ddd6813e57d818c77a1646920c6a2d08f9
https://github.com/openstack/tripleo-ansible/commit/f223beb240e4e267e232aaca5fd5d2046ada73a7

/lgtm
/approve

Testing in larger ci job with https://review.rdoproject.org/r/c/testproject/+/50595

+1 thanks John!


Mask files

Hi!
Would you mind sharing the mask files used for acquiring 4mm and 8mm image slices?
Thanks in advance
Jakub

Sorry about that! I just uploaded them into the google drive folder: https://drive.google.com/drive/folders/110l68um6gUJzECIv0AyF-4Fcw0rrQgA9?usp=drive_link
In the folder of mask: 9.npy represents the mask for 8mm slices, while 5.npy represents the mask for 4mm slices.
Again, don't hesitate to let me know if you have any questions when running the code! I will close this issue but you can also reopen it.


Numba patch: Support linking code from memory

Adds support for linking code from memory to Numba's @cuda.jit decorator (in addition to the already-supported linking files from disk). New classes are added to Numba's top-level cuda module:

Archive: An archive of objects
CUSource: A CUDA C/C++ source
Cubin: A cubin ELF
Fatbin: A fatbin ELF
Object: An object file
PTXSource: PTX assembly source code.

These are all used by constructing them with a single argument, the code in memory to use. Once created, they can then be passed to the link= kwarg of the @cuda.jit decorator. An example showing a use case with a CUDA C/C++ source is added.
This implementation is inspired by the approach outlined by @ed-o-saurus in numba/numba#9470.
Notes on changes:

There's a fix to the ci/test_wheels.sh script from @bdice - it turned out that the wheel created in the build was not chosen by the wheel tests, so Bradley's change explicitly forces installation of the downloaded wheel.
Various tests now run on the GPU, so test binaries need to be generated using the relevant compute capability - this change is applied in the Makefile, along with some refactoring to tidy it up a little.
Test for new functionality are added. In addition, existing tests that used the test binaries are all modified such that they use a relevant compute capability (usually the one in the test machine, for most of them) because the test binaries are now built for the CC of the current GPU - it's no longer sufficient to hard code CCs like 7.5 or 7.0 for tests. Since fixtures are needed across test files, I've started moving them into conftest.py.

I like this. It's a lot broader than my PR which only supported PTX code.
One thought: Is it a good idea to name a class Object? It could easily be confused with python's object class.

One thought: Is it a good idea to name a class Object? It could easily be confused with python's object class.

It would generally be referred to in any user code as cuda.Object - does that allay your concern?

I like this. It's a lot broader than my PR which only supported PTX code.

Many thanks for your thoughts here. Although this is going into pynvjitlink now, my intention would be to then upstream this into Numba once it's shown to work OK in use in pynvjitlink. Would you be OK with me doing that with this code, with appropriate credit to you for the initial idea / implementation in the Numba changelog and release notes?
I hope you don't mind that I took this and ran with it this far - it's somewhat on the critical path for us, and I feared that describing exactly what I needed to you and then expecting you to jump to implement it would be an unreasonable burden to place on you.

If users will be instantiating the class as cuda.Object, that's a lot clearer.
By all mean, go ahead and push this to the numba repo. As long as I get a mention in the release notes, I'm happy.

@gmarkall The changes to wheel testing were merged in #62, so merging the upstream will reduce them out of the diff here. I'll go ahead and do that, and update the description.

Thanks all! 🙏
Do we want to put this in a new release?

If possible, yes. I would like to use this feature for Numbast.

Ok could you please run?
cd <pynvjitlink repo top-level directory>
bash update-version.sh <new_version>

Where new version is the next untaken version. Please choose whether this is a bug fix (0.1.15) or new user facing feature (0.2.0)
Then commit the changes and push to a new PR

Sorry about the delay @jakirkham here's the version bump: https://github.com/rapidsai/pynvjitlink/pull/68

No worries. Thanks Michael! 🙏


Support for KMS encryption and artifact compression

I had full intention to break this into individual PRs, but given the time required to do that and current competing priorities, for me it is currently not an option, so I'm submitting one PR for 2 features and 2 bug fixes.  If accepted, this would bring our repo current with your master:
New Feature: Compression

If the Env variable GO_ARTIFACTS_COMPRESS_IN_S3 is set to a yes/true value, then instead of uploading individual files, a single artifacts.zip file will be uploaded by s3.publish
s3.fetch will check if a single artifacts.zip file was fetched, then it will un-zip it

New Feature: KMS Encryption

if the env variable AWS_KMS_KEY_ID is set, then artifacts uploaded to s3 will be encrypted server-side with that key
the credentials used for s3.publish should have rights to encrypt with the key provided and the credentials used for s3.fetch should have rights to decrypt

Bug Fix: loss of rights when bucket is used cross-account

When s3 bucket is set up with cross-account access (e.g. you have Go agents and servers in 2+ different AWS accounts), then artifacts uploaded from an account that does not own the bucket cannot be accessed by the account that owns the bucket
Fixed by setting the canned ACL BucketOwnerFullControl (this is the default in a single account scenario)
This would (at least partially) address issue #12

Bug Fix: Package names with period cannot be fetched

S3 fetch already supported packages with dashes by replacing dash with underscore
Added period to the characters to be replaced by underscore

@haimizrael That's a lot of changes, thanks for this PR. We'll look at this and share feedback.

@brewkode Thanks for starting to review.  I'll look into implementing your suggestions so far today.

@haimizrael I keep looking at this PR and I find it quite hard to draw a boundary on what feature changes are affecting what. If you can please, (yes, please), split this up into multiple PRs, we can get this done faster. Appreciate your spending time on this. Let us know your thoughts.

@brewkode
I'll close this and split up into separate PRs, though it may take a while to get all of them in.


implement CommittedEntries pagination

Fixes https://github.com/pingcap/raft-rs/issues/105

@Hoverbear the second test TestAppendPagination  is to test whether MaxSizePerMsg is able to cap the total byte size of entries in each message.
Do I need to add this as I don't clearly know whether we've tested this of not ( seems not )  ?
And I find that etcd-raft has added a new config parameter MaxCommittedSizePerReady to control this instead of MsgSizePerMsg.
https://github.com/etcd-io/etcd/commit/e4af2be5bbcbea27976e8af543defb4a7b7e1245

@Fullstop000 Can you run cargo fmt for me?

@Fullstop000 Great catch. I think this is a more clear functionality. @hicqu can you take a look?

I'll use the new parameter max_committed_size_per_ready instead. And the test for max_size_per_msg will be added.

Hi @Fullstop000 have you had a chance to see this feedback? Can I help you at all with it?

@Hoverbear Sorry for the delay. Kind of busy here. Start to working on this.

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.2 out of 3 committers have signed the CLA.:white_check_mark: Hoverbear:white_check_mark: Fullstop000:x: Hetian ZhuHetian Zhu seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


How to make links always attach to nodes orthogonally

If I'm using the Smooth PathGenerator with nodes without anchors, the links often attach to the node tangentially, not orthogonally:

How can I change this so that the links always attach orthogonally to the border of the node?

Hello, can you should in that same screenshot how you want them to be? I'm afraid I don't understand what you mean

Hey, I tried to mock the desired behaviour:

The point being that all links leave their nodes orthogonally, not tangentially (see yellow markers and red links).
This becomes even more apparent it there are Arrows etc. at the ends of the links. If the links attach to the nodes tangentially, as in the first screenshot (yellow markers), the arrowheads don't point to the nodes, but sideways.

Oh, I see now! It does look very ugly with arrowheads, you're right.
If you know your way around SVG/paths, you could try to create a custom path generator that returns the links the way you want them, until I have the chance to try to fix them myself

I'll have a look, thanks!

Hi, unfortunately I didn't manage to fix the link routing yet. What I found was that maybe the desired behaviour can be achieved without touching the routing logic, but instead by changing the rotation value on the anchors itself - am I right? This may be a bit easier to do.
What do you think?


feat(MapMarkerAdvanced, MapOptions, MapTypeStyle): MapMarkerAdvanced requires mapId, but MapTypeStyle[] cannot be used with a mapId

Feature Description
When attempting to implement a dark theme using a MapTypeStyle[] in MapOptions the styles do not apply and the following message is printed to the console:

A Map's styles property cannot be set when a mapId is present. When a mapId is present, Map styles are controlled via the cloud console.

For websites that need to be able to control toggling the map between dark and light theme, while also being forced off of the deprecated MapMarker, this poses a significant issue.
Use Case
The ability for a website to control the styling of google maps to conform to toggling between light and dark theme.

Closing the issue since it's outside of our control. Our components are wrappers around the Maps API which isn't owned by our team and is the one printing the deprecation warnings.


Visual Studio Code  Terminal Not Synced With Github Now

Issue Type: Bug

When Pushing code to github the terminal says
remote: No anonymous write access.
fatal: Authentication failed for 'https://github.com/RichardTimothy1307/CodeForces.git/'

Please Fix it Quickly
VS Code version: Code 1.62.3 (ccbaa2d27e38e5afa3e5c21c1c7bef4657064247, 2021-11-17T08:00:36.721Z)
OS version: Linux x64 5.11.0-40-generic
Restricted Mode: No

System Info

Item
Value

CPUs
Intel(R) Core(TM) i5-8265U CPU @ 1.60GHz (8 x 1899)

GPU Status
2d_canvas: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onoop_rasterization: disabled_offopengl: enabled_onrasterization: disabled_softwareskia_renderer: enabled_onvideo_decode: disabled_softwarevulkan: disabled_offwebgl: enabledwebgl2: enabled

Load (avg)
2, 1, 2

Memory (System)
7.65GB (0.16GB free)

Process Argv
--unity-launch --crash-reporter-id a870ef67-e833-4a0f-8e49-1c177a62d072

Screen Reader
no

VM
0%

DESKTOP_SESSION
plasma

XDG_CURRENT_DESKTOP
KDE

XDG_SESSION_DESKTOP
KDE

XDG_SESSION_TYPE
x11

Extensions (22)

Extension
Author (truncated)
Version

better-comments
aar
2.1.0

doxdocgen
csc
1.3.2

vscode-eslint
dba
2.2.2

javascript-ejs-support
Dig
1.3.1

vscode-toggle-column-selection
eri
1.0.6

prettier-vscode
esb
9.0.0

file-icons
fil
1.0.29

auto-close-tag
for
0.5.13

CppSnippets
har
0.0.15

stylelint-plus
hex
0.56.6

better-cpp-syntax
jef
1.15.10

remote-containers
ms-
0.205.2

remote-ssh
ms-
0.66.1

remote-ssh-edit
ms-
0.66.1

remote-wsl
ms-
0.58.5

cmake-tools
ms-
1.9.1

cpptools
ms-
1.7.1

cpptools-extension-pack
ms-
1.1.0

color-highlight
nau
2.5.0

material-icon-theme
PKi
4.10.0

LiveServer
rit
5.6.1

cmake
twx
0.0.17

(2 theme extensions excluded)

A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythontb:30283811
pythonptprofiler:30281270
vsdfh931:30280409
vshan820:30294714
vstes263:30335439
vscorecescf:30384386
pythondataviewer:30285071
vscod805:30301674
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
dockerwalkthru:30377721
bridge0723:30353136
pythonrunftest32:30373476
pythonf5test824:30373475
javagetstartedt:30391933
pythonvspyt187:30373474
vsqsis200cf:30402084
vsaa593:30376534
vssld246cf:30401891

Can you provide the output of following command from the vscode terminal,
env | grep VSCODE_GIT_ASKPASS_EXTRA_ARGS

VSCODE_GIT_ASKPASS_EXTRA_ARGS=

Same problem on same platform.

I had the same problem on the same platform, I was able to resolve it, like this:

I clicked the profile icon on the bottom left, and signed out of GitHub.
I opened the Source Control Tab Ctrl+Shift+G.
I clicked on the three dots in that tab.
I clicked push.
It asked me to sign in to GitHub again.
I authorized it and it was fixed.

@RichardTimothy1307 it looks like you are using a restored terminal session, once 1.62.3 is updated can you create a new terminal session and check the output of same command. It would also be great if you can attach a screen recording of the steps you are performing. Thanks!

export VSCODE_GIT_ASKPASS_EXTRA_ARGS="--ms-enable-electron-run-as-node"
The above worked for me and yes it was a restored terminal session so i created a new terminal session
Thankss....

You don't have to export the variable, it should have already been set within the application. Can you also clarify if the issue is still present ?

No it isnt present its solved

@deepak1556 I'm not and wasn't using a restored terminal session. :)


Documentation Foxx refactor

Restructure Foxx docs

This is part of an ongoing effort to refactor the Foxx docs. In this first phase we're just restructuring the existing content, in the next phase we'll expand the documentation with best practices and more introductory texts.


Named colors do not work

For a moment this was driving me crazy before I realized what I did differently... color=#ff0000 works, but color=red does not.

@magicus please try the latest release, and confirm whether it's fixed now?

Yes, works fine! (At least for the names I could come up with. :))


revised label for MONDO:0043707, closes #545

ugh, a plural!! Thanks for fixing @nicolevasilevsky !


Update table struc return an error when trying to retrieve the table

After updating the table by adding a new string field and pushing it to the blockchain, the table cannot be retrieved.
Here is the error message:
$ cleos get table bao bao tasks
1324670ms thread-0   main.cpp:1763                 main                 ] Failed with error: Out of Range (8)
get datastream of length 28 over by 1

Currently we don't support updating the struct on the fly. It will result in serialisation issue of the old data stream. However you can create another table instead. Please ask<EMAIL_ADDRESS>for more details.

Whenever you update the structure of a table, you will need to delete the old table and create a new one in order to avoid inconsistencies.


Plugin destroys identation in "empty" lines.

In a situation like this:
def my_func():
    print('first part')

    print('second part')

the plugin removes the identation of the "empty" line. Therefore the interpreter does not consider the second print statement as part of the function.

We don't really do anything specific in the extension. All we do is return what black provides after formatting. Also, note that even with the empty line, from python point of view the second print is still part of the function block. The indentation on the print line matters not the empty line.
So here both prints are part of my_func (note that there is no indentation on the empty line):

For second print to not be part of my_func it should look like this:

You can enable verbose logging by setting "black-formatter.trace.server": "verbose" in your user settings, and this will generate more detailed logs including the diff that is being applied to your code, and output from black itself. That should give more clues on what is going on.

Got the logs my self:
2024-03-20 12:57:25.606 [info] file:///c%3A/GIT/demo/diff_test/format_Test.py :
****************************************************************************************************
def my_func():
    print("first part")

    print("second part")

****************************************************************************************************

Black it self is returning this exact string:
Input: def my_func():\n    print(\"first part\")\n    \n    print(\"second part\")\n
Output: def my_func():\n    print(\"first part\")\n\n    print(\"second part\")\n
As you can see in the output it has removed the   empty line.


Various fixes

Description
This PR updates husky's configuration
Also:

removes pull request GH actions trigger
remove some example folders and simplify readme files
fixes CRA empty dependencies array
removes unused image from nextJS template

:tada: This PR is included in version 0.11.1 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Unable to run  NeXTSTEP / OpenSTEP / Rhapsody (x86): drive access is lost

Hello,
I have working x86 images of floppy disks and CDROMs of NextSTEP and OpenSTEP (tested with other emulators).
I tried to boot the floppies: I get a read error at the very beginning.
I load a working system image with UTM: I get a Kernel Panic because it can't access the HDD at some point during the startup.
Unless someone give me a hint about a setting that I missed, I think that there is an issue with those OS' drive access.
Here are the screenshots of the verbose modes, taken with UTM 3.04.

Please provide Debug Log as per VM Troubleshooting guide.
This is potentially related to #2730.

NeXTSTEP.log
Rhapsody.log
Logs attached.
Yes, this is related to #2730 .
The only difference with this issue report is that I've tried the next step (sorry): boot directly on the installed OS image.

I've seen the same problem (with CDROM access?) trying to boot Rhapsody DR2 under UTM version 3.2.4 (58).


Announcement: Add support for email notifications

Feature
When an announcement is created, there should be an option for the admins and the creator of the announcement to trigger email notifications to all the followers of the entity on which the announcement is being made.
Describe the task

There should be an option to configure the frequency of emails (for example: at the time of the announcement, on the day of deprecation, etc.)

@mohityadav766 are we taking care of this in the new notifications part

duplicate ticket


https://vuex.feathersjs.com/ is down - This Domain Name Has Expired

Steps to reproduce

[ ] Hit URL
[ ] vuex.feathersjs.com

Browser Version:
Google Chrome
Version 83.0.4103.106 (Official Build) (64-bit)

is there another way to see the docs?

It is not only about feathers-vuex, the whole domain has expired.
https://feathersjs.com/

up and running again. I think this can be closed :)


Errors when restarting via cap but restarts ok when I ssh in...

Hey @betesh
Sorry to bother you but I don't suppose you'd have any ideas on what would be causing this?  I can't restart the app via capistrano but if I ssh in using the deploy user the restart command works
I'm using the current versions of the cap gems:
capistrano (3.4.0)
capistrano-bundler (1.1.4)
capistrano-passenger (0.1.1)
capistrano-rails (1.1.3)
capistrano-rvm (0.1.2)

I'm taking over a rails 3.1 app that currently doesn't use the asset pipeline if that makes any difference - using ruby 2.0.0-p645
INFO [41d72b26] Running /usr/bin/env /usr/bin/env passenger-config restart-app /home/deployuser/public_html/physiopilates.co.uk --ignore-app-not-running as<EMAIL_ADDRESS>DEBUG [41d72b26] Command: /usr/bin/env passenger-config restart-app /home/deployuser/public_html/physiopilates.co.uk --ignore-app-not-running
DEBUG [41d72b26]  /usr/lib/ruby/vendor_ruby/phusion_passenger/config/restart_app_command.rb:24:in `require': no such file to load -- optparse
DEBUG [41d72b26]   (LoadError)
DEBUG [41d72b26]    from /usr/lib/ruby/vendor_ruby/phusion_passenger/config/restart_app_command.rb:24
DEBUG [41d72b26]    from /usr/lib/ruby/vendor_ruby/phusion_passenger.rb:235:in `require'

I'm guessing it's an environment issue but not sure how to rectify it...
Thanks
Luke

What version of passenger are you running on the server?

5.0.15

Does this command work when run on the server?
usr/bin/env passenger-config restart-app /home/deployuser/public_html/physiopilates.co.uk --ignore-app-not-running

Yep: Restarting /home/deployuser/public_html/physiopilates.co.uk/current/public (production)

Where / How is Ruby installed (i.e. RVM, RBEnv, etc.)?

Installed via rvm:
> rvm --version
rvm 1.26.11 (latest)

> which ruby
/home/deployuser/.rvm/rubies/ruby-2.0.0-p645/bin/ruby

I suspect what's happening is that passenger was installed without RVM, but optparse was installed with RVM.  Try this:
set(:passenger_restart_command) { "rvm #{fetch(:rvm_ruby_version)} do passenger-config restart-app" }

It should give your passenger command access to any of Ruby that's installed via RVM.

That's got it!  Thank you!!
Yep I installed passenger using the debian packages; strange the same setup works ok on another server though...

Hey just wanted to say thank you very much for yesterday - really helped me out at the end of a very long day!  Was gonna send you a voucher of some kind but I have no idea what country you're in or contact details (you're github profile is pretty light ha) - so anyways - if you wanna choose something nice off https://pragprog.com or http://www.redbubble.com/shop/ruby+on+rails#_ or something more your thing let me know - it's my shout. Cheers Luke


Duplicate Folder List - Authentic 19.74

I found what "might" be a bug in Usermin with Authentic Theme 19.74. I also observed this during the RC phase and figured it'd be gone once the stable version had been released. (I had rolled back to 19.73 before making the upgrade to 19.73)
The folder tree on the left is "duplicating" as shown in the below screen shot.
Usermin: 1.823
Authentic Theme: 19.74
OS: CentOS 6.10

Hi, Peter.
Thanks for the heads up.
This is expected, as this requires latest Usermin patch to work correctly.

https://github.com/webmin/usermin/commit/ffb9cd0ea82af670e43616088eb1feccbd66f542

Understood, thanks for the clarification


1.1.1 Install Triggers Manual Update and Database Error

Craft 2.6.2789

Dropped a brand new Neo folder into Plugins on an existing install.
Got the message:  "To complete the Neo update, some changes must be made to your database."
Clicked "Finish Up"
Works for a little while, backs up database, then "Rolling back.."
ERROR: "Craft was unable to install this update :( The site has been restored to the state it was in before the attempted update. There was a problem updating your database."

What do you think this could be all about?
This is in the URL. Why?
../admin/manualupdate/neo

Hey Steve, thanks for reporting this. As you're probably aware, 1.1.1 has had a few issues so I've taken it down until I've resolved them. Though it's strange to see a failed update, considering the migration is only two lines long (just adds a column to a table in the DB).
Can you search your Craft logs (In the CP footer, click "Server Info", then "Logs") for the following messages, and let me know if either of them show up?

Adding column ownerLocale to table neoblockstructures
Adding foreign key to neoblockstructures

I found the second string in the logs. But not the first string.
For clarity: I wouldn't call it a failed update. That was an attempt at a new install of 1.1.1 to an existing system. (With several Matrix blocks already set up and populated.) That's why I was curious about "manualupdate" in the url.

Oh okay, so this is happening when you first install Neo version 1.1.1? That seems very odd that it would immediately trigger an update. Once I fix the other issue with upgrading to 1.1.1 I'll look into this one.

I'm looking through the source of Craft's plugin service, and from what I can tell the only way a plugin update is triggered is if there exists some record of the plugin in the DB prior (in the craft_plugins table). Can you check to confirm this is or isn't the case?

Yes. It is the case. And it's curious. Could it be left over from the first time the install bombed?
Can I safely remove some tables and records as if to say Neo never existed here?

It's possible, though Craft should've reverted the DB transaction completely. Unless inserting into the plugins table is a part of a different transaction.
You should be able to safely delete the row for the Neo plugin from the craft_plugins table. Also, remove the following tables entirely if they exist: craft_neoblocks, craft_neoblockstructures, craft_neoblocktypes, and craft_neogroups. I've done this a few times for when plugins go haywire. Of course just to be safe, do a full DB export before you do this.

Just following up on this issue. Did you manage to get the plugin installed?

Sure. We did have to delete the Neo row from craft_plugins Installed 1.2.1 without issue after clearing the database.
Not sure how we got out of sync. But all is well. Thanks again.

That's good to hear. It was likely remnants from that past failed installation. Thanks for the update :+1:


Miner can mine even there is no transaction

a miner can mine as much as he wants and earn coins

Yes, initially I left it like this to be easier to use it. But of course, in a real-world case, the node should ensure that a block is not accepted with empty transactions (or if it doesn't follow a threshold of transactions, size or unconfirmed transactions).
What you think I should do in this case? Do I force a minimal amount of transactions?


Bugs with load balancer  [JIRA: CLIENTS-657]

When customers are using a load balancer, the load balancer can add and remove IP’s dynamically.  When an IP is removed, the Riak client fails in two subtle ways.

If the previous connect was created less than DNSTTL timespan ago, the Java client gets another connection.  If it is more then a full process of doing a DNS check and getting a connection is followed.  If an IP has been dynamically changed in the “less than” timespan, issues arise.
If a domain name is being used, the Java client gets only the IP addresses for it on RiakNode:start.  If the load balancer changes IP address, the InetSocketAddress is never updated as the Java client never does another DNS lookup for the domain name case, meaning we never know if the IP address changes.

One customer implemented a fix in their system by changing the doGetConnection() method in the following way:
InetSocketAddress socketAddress = new InetSocketAddress(remoteAddress, port);

bootstrap.handler(new RiakChannelInitializer(this))

.remoteAddress(socketAddress);

Before this call:
ChannelFuture f = bootstrap.connect();

Additionally, the fix included adding the java opt -Dsun.net.inetaddr.ttl=10.
This fix has been tested by @a1 although, of course, other fixes may be possible.

connects to basho/riak-clients#1

We are currently using Riak in AWS and have been told repeatedly by Basho support to use ELB's in front of our Riak cluster as a best practice (to ease maintenance, to only send traffic to healthy nodes, etc...). Especially in AWS's environment, this defect guarantee's periodic outages of our services - requiring them to be restarted. We raised this same issue with Riak 1.4.x last year and it appears to still not be fixed. When will this be tested and fixed?

Fix is in https://github.com/basho/riak-java-client/pull/573, but the PR needs https://github.com/basho/riak-java-client/pull/594 merged in for some failing tests.
[posted via JIRA by Alexander Moore]

1. Problem
If you used the Java Client in a cloud environment where IP addresses for DNS entries could change often, the Java client would not expire the old DNS lookup to get the newest IP address.
2. Solution
Force a refresh any time a connection is made outside of the cluster/node start() method. (Lookup is done once at start).
https://github.com/basho/riak-java-client/pull/573/files#diff-28c20364743c5fc78c7c41c7c8b89e88R293
Also added a log warning if they have their DNS cache setting set to "infinity", which would also cause this issue: https://github.com/basho/riak-java-client/pull/573/files#diff-28c20364743c5fc78c7c41c7c8b89e88R925
3. Test

Setup a "good" mock Netty Bootstrap / ChannelFuture / Channel with a RiakNode
Start RiakNode, should do address lookup #1.
Fetch/return 1 good connection.
Force the mock to return false for channel.isOpen() when we get the next connection, which should force a second lookup.
Get next connection.
Verify that there were two address lookups.

https://github.com/basho/riak-java-client/pull/573/files#diff-4361a4b26a0905c4782f996ce653ccaaR416
[posted via JIRA by Alexander Moore]

Can we please have an update on when this will be released? I see it marked as "Milestone 2.0.3"... But, since you already released 2.0.4, when should we expect this to be released?


The TVM Runtime version file could not be found

Hello, thank you very much for your project, but I can't find the TVM Runtime version, I just copied the source code from TVM Github into the TVM folder, but the program shows that it still can't find the libtvm.dll and other files, showing:
RuntimeError: Cannot find the files.
List of candidates:
F: \ Anaconda \ envs \ m_Pyra \ libtvm DLLS, etc
Could you please send me the TVM file in the project or Github link? I'm sorry to bother you because of this kind of problem. Looking forward to your reply! thank you

Thank you for your interest in our work. We used Ubuntu to generate the library function, so executing in Windows may cause problems. We will consider providing the docker file for compiling TVM in the future.

Thank you again for your project and look forward to the solutions you can provide in the future.


SAK-48545 Tests & Quizzes Error grading question when using the featu…

…res from SAK-43768

@vacercon Has tested this in the institution instance and fixes the issue, it's consistent with the delivery and the grading process.


feat(smart-form): use React.Children.map()

feat(smart-form): use React.Children.map()

works with a single child + an array of children
docs: https://reactjs.org/docs/react-api.html#reactchildrenmap

nice one!

Wow that was fast ! 🏎


Passing custom data (e.g. token) to props during server-side render

Client's requests contain user's token if user is authenticated. During server-side render i'm extracting token within
ReactRouter.match({routes, location}, (error, redirectLocation, renderProps) =>

... and passing it to props. I was implementing it two different ways, but both feels hacky:

Create new class from ReactRouter.RouterContext and pass props in there along with the others, as RootComponent to transmit.
Modify renderProps before

Transmit.renderToString(ReactRouter.RouterContext, props).then(({reactString, reactData}) =>

... as console wasn't complaining about it, i was just putting token along with renderProps.params.
@RickWong could you share your way of doing that?

This problem is too specific to your project. I can't give you proper advice without seeing more code.


[Task]Evaluate the RecSys 2020 challenge workflow and create github issues for all missing operators.

 Issue by EvenOldridge
Friday May 15, 2020 at 20:41 GMT
Originally opened as https://github.com/rapidsai/recsys/issues/142

What needs doing
Evaluate the RecSys 2020 challenge workflow and create github issues for all missing operators.
Issues should be under the nvTabular project and a part of the RecSys 2020 workflow milestone as this issue is.
Please create a new tab and add operators to  both the workflow to operator master doc and the master operator doc.  Please validate with the code in the source repo to ensure nothing is missing.
Additional context
Master operator doc:
https://docs.google.com/spreadsheets/d/1irirSo70PvuCovb_0nnJNjWUpSGhbjDOl72kxS_8fRk/edit#gid=1173451941
Workflow to operator master doc:
https://docs.google.com/spreadsheets/d/1EcY9n3uEUs3pPl7auEE4ahNQfjafaMTl6R-Zvk-7XlE/edit#gid=796720992
Source repo:
https://github.com/rapidsai/recsysChallenge2020/

This is complete


yarn cli build fails

Hi all - I'm trying to build Theatre from scratch for local use. Following the instructions in CONTRIBUTING.md, I tried to run yarn cli build but seeing an error:
> theatre main ✗ yarn cli build
$ yarn run build:ts
$ yarn workspace $'@theatre/saaz' run build
$ yarn workspace theatre run build
$ yarn workspace $'@theatre/dataverse' run build
$ yarn workspace $'@theatre/react' run build
$ yarn workspace $'@theatre/browser-bundles' run build
$ yarn workspace $'@theatre/r3f' run build
$ yarn workspace theatric run build
 > ../../theatre/studio/src/uiComponents/chordial/chordialInternals.ts:3:24: error: Expected "}" but found "ElementType"
    3 │ import {useEffect, type ElementType, type MutableRefObject} from 'react'
      ╵                         ~~~~~~~~~~~

~/Projects/theatre/packages/browser-bundles/node_modules/esbuild/lib/main.js:1449
  let error = new Error(`${text}${summary}`);
              ^

Error: Build failed with 1 error:
../../theatre/studio/src/uiComponents/chordial/chordialInternals.ts:3:24: error: Expected "}" but found "ElementType"
    at failureErrorWithLog (~/Projects/theatre/packages/browser-bundles/node_modules/esbuild/lib/main.js:1449:15)
    at ~/Projects/theatre/packages/browser-bundles/node_modules/esbuild/lib/main.js:1131:28
    at runOnEndCallbacks (~/Projects/theatre/packages/browser-bundles/node_modules/esbuild/lib/main.js:1049:65)
    at buildResponseToResult (~/Projects/theatre/packages/browser-bundles/node_modules/esbuild/lib/main.js:1129:7)
    at ~/Projects/theatre/packages/browser-bundles/node_modules/esbuild/lib/main.js:1236:14
    at ~/Projects/theatre/packages/browser-bundles/node_modules/esbuild/lib/main.js:609:9
    at handleIncomingPacket (~/Projects/theatre/packages/browser-bundles/node_modules/esbuild/lib/main.js:706:9)
    at Socket.readFromStdout (~/Projects/theatre/packages/browser-bundles/node_modules/esbuild/lib/main.js:576:7)
    at Socket.emit (node:events:514:28)
    at addChunk (node:internal/streams/readable:376:12) {
  errors: [
    {
      detail: undefined,
      location: {
        column: 24,
        file: '../../theatre/studio/src/uiComponents/chordial/chordialInternals.ts',
        length: 11,
        line: 3,
        lineText: "import {useEffect, type ElementType, type MutableRefObject} from 'react'",
        namespace: '',
        suggestion: ''
      },
      notes: [],
      pluginName: '',
      text: 'Expected "}" but found "ElementType"'
    }
  ],
  warnings: []
}

Node.js v20.9.0
~/Projects/theatre/node_modules/@cspotcode/zx/src/index.mjs:105
      let output = new ProcessOutput({
                   ^

ProcessOutput [Error]:  > ../../theatre/studio/src/uiComponents/chordial/chordialInternals.ts:3:24: error: Expected "}" but found "ElementType"
    3 │ import {useEffect, type ElementType, type MutableRefObject} from 'react'
      ╵                         ~~~~~~~~~~~

~/Projects/theatre/packages/browser-bundles/node_modules/esbuild/lib/main.js:1449
  let error = new Error(`${text}${summary}`);
              ^

Error: Build failed with 1 error:
../../theatre/studio/src/uiComponents/chordial/chordialInternals.ts:3:24: error: Expected "}" but found "ElementType"
    at failureErrorWithLog (~/Projects/theatre/packages/browser-bundles/node_modules/esbuild/lib/main.js:1449:15)
    at ~/Projects/theatre/packages/browser-bundles/node_modules/esbuild/lib/main.js:1131:28
    at runOnEndCallbacks (~/Projects/theatre/packages/browser-bundles/node_modules/esbuild/lib/main.js:1049:65)
    at buildResponseToResult (~/Projects/theatre/packages/browser-bundles/node_modules/esbuild/lib/main.js:1129:7)
    at ~/Projects/theatre/packages/browser-bundles/node_modules/esbuild/lib/main.js:1236:14
    at ~/Projects/theatre/packages/browser-bundles/node_modules/esbuild/lib/main.js:609:9
    at handleIncomingPacket (~/Projects/theatre/packages/browser-bundles/node_modules/esbuild/lib/main.js:706:9)
    at Socket.readFromStdout (~/Projects/theatre/packages/browser-bundles/node_modules/esbuild/lib/main.js:576:7)
    at Socket.emit (node:events:514:28)
    at addChunk (node:internal/streams/readable:376:12) {
  errors: [
    {
      detail: undefined,
      location: {
        column: 24,
        file: '../../theatre/studio/src/uiComponents/chordial/chordialInternals.ts',
        length: 11,
        line: 3,
        lineText: "import {useEffect, type ElementType, type MutableRefObject} from 'react'",
        namespace: '',
        suggestion: ''
      },
      notes: [],
      pluginName: '',
      text: 'Expected "}" but found "ElementType"'
    }
  ],
  warnings: []
}

Node.js v20.9.0
    at <anonymous> (~/Projects/theatre/devEnv/cli.ts:65:24)
    exit code: 1
    at ChildProcess.<anonymous> (~/Projects/theatre/node_modules/@cspotcode/zx/src/index.mjs:105:20)
    at ChildProcess.emit (node:events:514:28)
    at maybeClose (node:internal/child_process:1105:16)
    at ChildProcess._handle.onexit (node:internal/child_process:305:5)

This to me implies that it's parsing the file as js and not typescript, because the parser seems to be failing on the type line.
Going one-by-one, I'm getting a few warnings from the various packages, but this error seems to be coming from the browser-bundles package.
Additionally, I'm getting an error in theatre/theatre:
> theatre/theatre main ✗ yarn build

~/Projects/theatre/theatre/.temp/declarations/studio/src/index.d.ts → studio/dist...
(!) Unresolved dependencies
https://rollupjs.org/guide/en/#warning-treating-module-as-external-dependency
@theatre/utils/types (imported by .temp/declarations/studio/src/TheatreStudio.d.ts, .temp/declarations/studio/src/StudioStore/StudioStore.d.ts, .temp/declarations/studio/src/PaneManager.d.ts, .temp/declarations/core/src/privateAPIs.d.ts)
@theatre/sync-server/state/types (imported by .temp/declarations/studio/src/TheatreStudio.d.ts, .temp/declarations/studio/src/StudioStore/StudioStore.d.ts, .temp/declarations/studio/src/PaneManager.d.ts)
@theatre/sync-server/state/types/studio (imported by .temp/declarations/studio/src/Studio.d.ts)
@theatre/sync-server/state/types/core (imported by .temp/declarations/studio/src/Studio.d.ts, .temp/declarations/studio/src/StudioStore/StudioStore.d.ts)
@theatre/sync-server/state/schema (imported by .temp/declarations/studio/src/StudioStore/StudioStore.d.ts)
@theatre/sync-server/trpc/routes (imported by .temp/declarations/studio/src/SyncStore/SyncServerLink.d.ts)
[!] (plugin dts) Error: namespace child (hoisting) not supported yet

And a few warnings around

Analysis will use the bundled TypeScript version 4.4.3
*** The target project appears to use TypeScript 5.1.6 which is newer than the bundled compiler engine; consider upgrading API Extractor.

Do I have something misconfigured? Thanks!

Okay couple fixes:

The 'Expected "}" but found "ElementType"' error goes away if we move the imports to their own line. I guess esbuild doesn't like mixed inline type imports.
The warnings for API Extractor don't go away if we upgrade all modules to 7.38.5, the latest, but their version is now 5.0.4 instead of 4.4.3.
yarn cli build is still failing on [!] (plugin dts) Error: namespace child (hoisting) not supported yet. I replaced rollup-plugin-dts (which is in maintenance mode) with rollup-plugin-flat-dts but getting issues building typescript.


How to call resource route

Please I need help to enable me know how to map the resource route to http request.
for example am trying to call this url via axios
<EMAIL_ADDRESS>
and i have created the following resource routes to call my api
//$routes->resource('api/unregisteredpatients/(:any)', 'UnregisteredPatients::show/$1', ['namespace' => 'Api']);
//$routes->get('api/unregisteredpatients/(:any)', 'UnregisteredPatients::show/$1', ['namespace' => 'Api']);
$routes->resource('api/unregisteredpatients/(:any)', ['controller' => 'Api/UnregisteredPatients']);

None of these was able to call my api method instead they all called the index() method, whereas I wanted it to call the show($id) method to enable me utilise the $id to fetch data.
public function show($id = null) {
    .....
}

Please I need help

Sorry, but we don't answer support questions here. Please post your question in the forum.

the username field of the forum will not allow me create an account.. tired of trying different combination of strings but won't accept any. Please can i have an assistance on this thread

I just checked it and I could create a new account without any problems.

Thank you so much i was able to register and i found the solution in the forum.


DS-435 Standardize Twig and Schema (Card)

Jira
https://pegadigitalit.atlassian.net/browse/DS-435
Summary
Standardize Twig and Schema for Card
Details
Standardize Twig and Schema for Card. The snapshots have been updated because the default values of properties no longer need to be printed. For more detailed information, please see the initial ticket, as well as the associate TWIG and Schema tickets.
How to test
Check out the tests and demos and make sure nothing is a breaking change in the code.
Release notes
Card borderRadius prop deprecated for border_radius.

@remydenton @danielamorse @remydenton the Jest test has been updated, feel free to check it out

Sorry for sitting on this for so long!
Overall, it looks really good.  I did have one thing while we're refactoring: would it make sense to make the subcomponent twig templates not private?  I think the main actionable item would be removing the leading underscore from these twig templates (and leaving the old ones in there as adaptors for backwards compatibility).  It's kind of a pain in the butt and ultimately just semantic, but if we're doing cleanup, it'd be nice to get it right.
The main use case is using these components independently to assemble your own card.  Piotr Muszynski wanted to build his own modified horizontal card and the most expedient way was to include these files directly:  https://gitlab.com/pegadigital/bolt/pega_bolt/-/blob/feature/WWW-329-new-brightcove-component/features/pega_bolt_card/templates/horizontal-image-on-right.twig.  I don't see any obvious reason why this shouldn't be possible.  @danielamorse , any thoughts?

would it make sense to make the subcomponent twig templates not private?

It would make sense if this was built to our current standards. The problem I see is that the subcomponents  are not completely self-contained. We don't use only when we include them from the main card template, and they expect some props from the parent. The only example I know for sure is spacing. It may in fact be the only example.
If we make these templates public we should also make inherited props like spacing explicit in the schema and convert to use only. @remydenton do you think that could be done safely in this PR? I think it probably could be, but I'd rather not disturb this component any further 😆 . I'm not opposed if you want to go for it - now or later.

Per discussion in dev huddle, making sub-components like this externally usable is a practice we want to do going forward, but the value of adding it to card (which may soon be replaced by teaser) is limited.   We're going to merge this PR as-is since it adds value and focus on keeping sub templates public for new components.


Exception: Already registered (Polymer) prototype for element h-select-item (package:polymer/src/instance.dart:170)

This issue was originally filed by<EMAIL_ADDRESS>
What steps will reproduce the problem?

Create a dart project eg polymer_proto_type_bug.

Copy the folders/files of the attached zip (unzip first) and copy them to the prjoect created in 1. Make certin the .yaml files is as present in the zip and contains -  html_components: 0.3.0 - as this is the library that the problem relates.

Upgrade the project and run from Dartium. Observe that a single paper-input is displayed with the Labelling "label". There are no problems here.

Examine the entry_point polymer_prototype_bug.html file. Note the commented line below:
    <!--<link href = '../lib/component/unit_form.html' rel = 'import'> -->

Uncomment the above line and run the application in Dartium.

The application does not run and the console outputs the following:
   Exception: Already registered (Polymer) prototype for element h-select-item (package:polymer/src/instance.dart:170)

Please include any steps we need to take to reproduce the problem. The
best way to help us investigate the issue is to provide a small example
(preferably a file or two) that we can copy & paste into an empty polymer
project and try it out.
What is the expected output? The paper-input as shown plus an html_component of select_checkbox_menu.html containing checkboxes corresponding to the values in the map -
  @observable
  Map<String, String> unitSelectItems =
    {
      'mm': 'mm',
      'cm': 'cm',
      'm': 'm',
      'litre': 'liter',
      'inches': 'inches',
      'foot': 'foot',
      'feet': 'feet',
      'pint': 'pint',
      'quart': 'quart',
      'cup': 'cup',
      'minute': 'minute',
      'hour': 'hour',
      'day': 'day',
      'month': 'month',
      'year': 'year'
    };
found in the unit_form.dart.
An example of how the custom-element should appear can be found at http://szgabsz91.github.io/html-components/#/input/select-checkbox-menu. Click on the drop-down arrow of the 'Movies' below the line Select Checkbox Menu.
Please include the following information:

Dart SDK version: 1.72 and 1.8.0
polymer package version: 0.15.1+1 and above
Operating system: Windows 8.1 x64
Browser (if any): Run in Dartium during development only
Eclipse Dart plugin Dart Editor 1.72
Eclipse Luna Service Release 1 (4.4.1)

Attachment:
epimss_shared.zip (24.56 KB)

This issue has been moved to dart-lang/polymer-dart#330.


Array 'items' gets required=true assigned

Not sure if it makes sense. Relative to what items are required?
PS. Canonical form
Cat:
  properties:
    pawsNames:
      type: array
      items: string

{
  "properties": {
    "pawsNames": {
      "type": "array",
      "items": {
        "type": "string",
        "required": true
      },
      "required": true
    }
  },
  "additionalProperties": true,
  "type": "object",
  "required": true
}

d268082a4e19957eb363334b004e23329c8450aa should have fixed this.
:required will only appear now in types inside the properties map of a type object.


bugfix:flitter3 data_table2 outside container need

height
might be this issue cannot run this code with flutter 3.0.5 #51

this might data_table2 design you can see What is on top of Column? I suspect there's a scrollable, if that's the case - DataTable2 won't work inside the scrollable. That's the whole point of the widget, it has own scrollables and having one on top defies the purpose of fixe header etc.


Unable to get workload sub types by ID

Version: rancher/server:master
if you access v3/projects/<project-id>/daemonsets you are able to see all available daemonsets but trying to access v3/projects/<project-id>/daemonsets/<daemonset-id> it returns the error 404 "failed to find resource by id".
I would expect it to return the proper resource when accessing that endpoint.
This affects all workload types.

Using master this looks good to me.

Tested using master from April 23rd. Accessing resources daemonsets, cronjobs, statefulsets return the correct resource when accessed.
v3/projects//deployments/
v3/projects//daemonsets/
v3/projects//cronjobs/
v3/projects//statefulsets/


Typo in v1.7.1 release message

The release says:

See https://groups.google.com/d/topic/ninja-build/bkDE7auQwiI/discussion for the v1.6.0 release notes.

But it should refer to v1.7.1 instead of v1.6.0.

Fixed, thanks.


large rounding error in high zoom

Center: 47.434, 18.909
Zoom: 17.36
See attached image: when way endpoints are out of bbox and there's a blood moon outside the ways connect to imaginary endpoints hundred meters off.

Thanks for the great report!
The project is currently in minimum maintenance mode, but if/once feature work returns, this issue will be super helpful.


More on LIC 12-14

Create the full version of LIC 12 - 14, As it need to use the code in LIC 7,8,10

Pull request #69 closes this.


Support popular frontend javascript frameworks

Problem
Many times users are using a frontend framework and want to integrate our tools into their framework.
As it stands, some frameworks are not usable with our tools.
One of these is vitejs, see here
Happy Case
Its a bit of a dying battle, but it would be good to support all of the popular frameworks or keep track of the popular frameworks that a user may want to work with our setup.
It may be that if we have X number of frameworks then we just need to keep those updated.
Note
This issue can be split into two:

Ensuring compatibility for compiler packages
Ensuring compatibility for barretenberg.js

Alternatives Considered
No response
Additional Context
This may not be the right place to put this issue, but lets keep it here and when we figure out a better place to put it then we can move.
Would you like to submit a PR for this Issue?
No
Support Needs
No response

Looks great, though currently blocked by the existing packages. c.c. @Savio-Sou so we can have this on the roadmap

Strategically the core team will maintain the packages with Next.js compatibility to ensure Noir has at least one go-to frontend framework while reserving engineering bandwidth for other initiatives in the short- to mid-term. The core team might revisit this in the longer term but we have no concrete plans atm.
If anyone is interested in adding support for additional frontend frameworks, all is welcome to create Issues + PRs for frameworks of interest. The core team would be more than happy to provide support accordingly 🙌

I don't think we currently exclude any frontends -- marking this as completed unless we can find a specific popular framework that we do not support. In that case, we can open up a separate issue in either bb.js or this repository

We should be able to tackle everything that comes to a web browser now 💪


[Bug report] Style change caused tabs to all be very bright

Describe the bug
The change in #14 had a pretty severe effect on gruvbox-dark-hard that I don't think was intentional, and (imo) looks quite a lot worse since it's so visually busy.
This is in an active window without the active option enabled (inactive window looks the same).
Expected behavior
Style at 7dc46d5a0950ac7b647a1b4dcab0086a8d8650fb.

Screenshots
Style at ff4ef2c5cd8023557ab997d259950047c5f17993 (the next commit), which built #14..

System
OS: Arch Linux
Tmux version: tmux 3.3a
Minimal configuration file
source-file colors/base16-gruvbox-dark-hard.conf

Additional context
Confirmed as a bug by @JamyGolden in https://github.com/tinted-theming/base16-tmux/pull/14#issuecomment-1904722462.

Thanks for creating the issue! I've fixed the bug, it's pretty straight forward but it would just be good for you to have a look over to make sure it's good. https://github.com/tinted-theming/base16-tmux/pull/21
Unrelated to this fix, but you can access two options that aren't available by default with the plugin, one of them is a better looking statusbar. Have the following 2 variables set before launching tmux:
export BASE16_TMUX_OPTION_ACTIVE="1"
export BASE16_TMUX_OPTION_STATUS="1"

Også, hei fra Oslo :)

The fix looks right to me!
I don't actually make use of blurred panes, so that first setting doesn't do much for me. The second one makes the bar way too prominent and visually verbose for my tastes :sweat_smile:
On a somewhat related not, I think the README needs updating as it claims the variable is called BASE16_TMUX_OPTION_STATUSBAR (note the extra BAR at the end).
Og hei hei!

Fair enough! and thanks for spotting that issue with the env var name :smile:


use correct ObjectMapper in Index[IO/Merger] in AggregationTestHelper

or else exceptions are printed in the test because ObjectMapper present in  IndexIO can't deserialize the Sketch aggregators in the segment metadata.
and set isInputThetaSketch to false for merged aggregator, it doesn't change anything but false is more appropriate.

I don't understand the merged aggregator change, can you explain a little more about why false is more appropriate?

@drcrallen @nishantmonu51 ?

👍  lgtm

👍

:+1:


Support COMPU-NUMERATOR with only one V

ODX XSD does not indicate an upper limit for the number of V elements in COMPU-NUMERATOR, but it does indicate that the minimum number of V elements is 1 and not 2

interesting. If the number of values is different from two, what is the semantic of these values? I always thought the first is the numerator for the offset and the second is the numerator of the scaling factor...

ok, thanks for lifting my confusion. merging.