Ivo/keybaord controller

Added a python program to act as a controller. This program can run on a Linux-based computer (including Raspberry PI) and allow the user to control the robot from the keyboard. Can be used for fast prototyping of new commands, or as a controller from wireless keyboard.
Has not been tested on Windows, but should run as well.

This is great. Just one comment, I feel like the control is not very natural. If the keyboard button is released, I would expect throttle to be lowered until 0. Similar with the steering.

This is great. Just one comment, I feel like the control is not very natural. If the keyboard button is released, I would expect throttle to be lowered until 0. Similar with the steering.

Ok, this is good idea. I will work on this. I will have an update soon, so maybe wait for that.

Ok, I will wait and then merge. Another question. Is there any difference between the connection to the Python script and the phone controller now? I'm wondering if we should update the UI to have one more controller option or maybe swap the phone icon for something more generic.

Ok, I will wait and then merge. Another question. Is there any difference between the connection to the Python script and the phone controller now? I'm wondering if we should update the UI to have one more controller option or maybe swap the phone icon for something more generic.

The python script uses the exact same connection as the android controller does. It locates services on the LAN by service name and type. Both controller and robot app have to be on the same LAN. So, we can call the controller something like WiFi controller, or something like this. But I am not sure the python script will be used a lot outside of prototyping. Maybe for Raspberry PI  the controller could me more useful.
There is also something called pygame, which allows you to create UI in python for games, so this maybe useful

This is great. Just one comment, I feel like the control is not very natural. If the keyboard button is released, I would expect throttle to be lowered until 0. Similar with the steering.

One concern I have is how to you make the bot run at a constant speed? If we slow down as soon as we stop pressing the up arrow, the robot will slow down and stop. With the dual drive controls, we can leave them the bot will move at the same speed, but if we let go the keyboard, the robot will stop. On the other hand, if we keep pressing the keyboard, the robot will accelerate.
I can see if we stop pressing the left/right arrows, the robot will straighten, so this makes sence.

But even for the phone controller we discussed that it would be nice for the sliders to bounce back if the user releases them. Same logic, it is not very natural to manually move the sliders back down. I think to keep the button/slider pressed to keep a constant speed is expected. It is the same way the bot is controller with the BT controller and pretty much in any video game. For keeping constant speed, we could just have a cruise control key. If you press it, we will keep the same speed until it is pressed again.

I think using pygame or even just vlc player to get the video stream on the laptop would be very nice.

Now the controls on the keyboard-controller after the user stops pressing the arrow keys revert back to 0/0 in steps within 4 seconds.

Great, I will test it again. I think one second would be enough to stop the car. Four seconds seems quite long if someone needs to stop the car. What do you think? I also noticed that you also removed the flashlight control from the controller app. Did you not get this to work?

Hi @izivkov.  I have merged the PR now. Again, thank you very much for your contribution. I feel that the control is still not very natural. In most video games, you would expect that the car will go a full speed when pressing the forward button and stop (coast) once you release the button. Similarly for turning left and right, but if the forward button is still pressed the car would be expected to continue driving forward instead of controls going to 0. I wonder if it would be easier to implement with callbacks on key_pressed and key_release. I came across this library. What do you think?
Another thing we could do is just provide throttle and steering to the bot and use the functions in the GameController to convert to the left and right control values. But I guess the challenge with the keyboard is that everything is binary, either pressed or release.

Hey @thias15, I was just about to push changes with 1 second revert to zero
instead of 4 seconds.
I am a bit confused. I thought this is what the new controller did, as you
described. If you let go of the forward button (or all buttons), the car
will come to a stop, initially in 4 seconds, but now in one seconds. The
left and right controls will revert back to zero within this time period. I
have not actually tried it on the robot, but I can see on the robot phone,
the values of the controls become zero. Basically, it is not a problem to
implement anything the way we like, without any additional keyboard
library, but just want to make sure I understand what needs to be done.
I am working on a UI version of this program, using PyGame, and will
support video. I still like to keep this version for terminal only
applications, like using ssh to connect to the device running the app. It
should even work with Raspberry Pi Zero.
Ivo
On Sat, Apr 10, 2021 at 4:18 PM thias15 @.***> wrote:

Hi @izivkov https://github.com/izivkov. I have merged the PR now.
Again, thank you very much for your contribution. I feel that the control
is still not very natural. In most video games, you would expect that the
car will go a full speed when pressing the forward button and stop (coast)
once you release the button. Similarly for turning left and right, but if
the forward button is still pressed the car would be expected to continue
driving forward instead of controls going to 0. I wonder if it would be
easier to implement with callbacks on key_pressed and key_release. I came
across this library
https://github.com/boppreh/keyboard#keyboard.KeyboardEvent. What do you
think?
Another thing we could do is just provide throttle and steering to the bot
and use the functions in the GameController to convert to the left and
right control values. But I guess the challenge with the keyboard is that
everything is binary, either pressed or release.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/intel-isl/OpenBot/pull/173#issuecomment-817197030,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AA7M37WLKLEI7WF3OWBSCZLTICXBDANCNFSM42I4GIQQ
.

I see you have merged the code, so my latest change did not make it in, but
no problem, will get it next time.
I was just wondering if you see what I see. If you stop pressing the
keyboard, do the controls revert to zero after 4 seconds?
Ivo
On Sat, Apr 10, 2021 at 4:41 PM Ivo Zivkov @.***> wrote:

Hey @thias15, I was just about to push changes with 1 second revert to
zero instead of 4 seconds.
I am a bit confused. I thought this is what the new controller did, as you
described. If you let go of the forward button (or all buttons), the car
will come to a stop, initially in 4 seconds, but now in one seconds. The
left and right controls will revert back to zero within this time period. I
have not actually tried it on the robot, but I can see on the robot phone,
the values of the controls become zero. Basically, it is not a problem to
implement anything the way we like, without any additional keyboard
library, but just want to make sure I understand what needs to be done.
I am working on a UI version of this program, using PyGame, and will
support video. I still like to keep this version for terminal only
applications, like using ssh to connect to the device running the app. It
should even work with Raspberry Pi Zero.
Ivo
On Sat, Apr 10, 2021 at 4:18 PM thias15 @.***> wrote:

Hi @izivkov https://github.com/izivkov. I have merged the PR now.
Again, thank you very much for your contribution. I feel that the control
is still not very natural. In most video games, you would expect that the
car will go a full speed when pressing the forward button and stop (coast)
once you release the button. Similarly for turning left and right, but if
the forward button is still pressed the car would be expected to continue
driving forward instead of controls going to 0. I wonder if it would be
easier to implement with callbacks on key_pressed and key_release. I came
across this library
https://github.com/boppreh/keyboard#keyboard.KeyboardEvent. What do
you think?
Another thing we could do is just provide throttle and steering to the
bot and use the functions in the GameController to convert to the left and
right control values. But I guess the challenge with the keyboard is that
everything is binary, either pressed or release.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/intel-isl/OpenBot/pull/173#issuecomment-817197030,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AA7M37WLKLEI7WF3OWBSCZLTICXBDANCNFSM42I4GIQQ
.


[Snyk] Security upgrade eslint from 7.0.0 to 7.16.0

Snyk has created this PR to fix one or more vulnerable packages in the `npm` dependencies of this project.

Changes included in this PR

Changes to the following files to upgrade the vulnerable dependencies to a fixed version:

package.json
package-lock.json

Vulnerabilities that will be fixed
With an upgrade:

Severity
Priority Score (*)
Issue
Breaking Change
Exploit Maturity

696/1000  Why? Proof of Concept exploit, Has a fix available, CVSS 7.5
Regular Expression Denial of Service (ReDoS) SNYK-JS-ANSIREGEX-1583908
No
Proof of Concept

(*) Note that the real score may have changed since the PR was raised.

Commit messages

Package name: eslint
    The new version differs by 250 commits.

145aec1 7.16.0
83518a5 Build: changelog update for 7.16.0
a62ad6f Update: fix false negative of no-extra-parens with NewExpression (#13930)
f85b4c7 Fix: require-atomic-updates false positive across await (fixes #11954) (#13915)
301d0c0 Fix: no-constant-condition false positives with unary expressions (#13927)
555c128 Fix: false positive with await and ** in no-extra-parens (fixes #12739) (#13923)
d93c935 Docs: update JSON Schema links (#13936)
8d0c93a Upgrade<EMAIL_ADDRESS>(#13920)
9247683 Docs: Remove for deleted npm run profile script (#13931)
ab240d4 Fix: prefer-exponentiation-operator invalid autofix with await (#13924)
dc76911 Chore: Add .pre-commit-hooks.yaml file (#13628)
2124e1b Docs: Fix wrong rule name (#13913)
06b5809 Sponsors: Sync README with website
26fc12f Docs: Update README team and sponsors
902a032 7.15.0
6356778 Build: changelog update for 7.15.0
5c11aab Upgrade: @ eslint/esintrc and espree for bug fixes (refs #13878) (#13908)
0eb7957 Upgrade<EMAIL_ADDRESS>(#13877)
683ad00 New: no-unsafe-optional-chaining rule (fixes #13431) (#13859)
cbc57fb Fix: one-var autofixing for export (fixes #13834) (#13891)
110cf96 Docs: Fix a broken link in working-with-rules.md (#13875)
0cb81a9 7.14.0
fb3a594 Build: changelog update for 7.14.0
5f09073 Update: fix 'skip' options in no-irregular-whitespace (fixes #13852) (#13853)

See the full diff

Check the changes in this PR to ensure they won't cause issues with your project.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.
For more information:
🧐 View latest project report
🛠 Adjust project settings
📚 Read more about Snyk's upgrade and patch logic

Closing as we'll do this one manually.


Setting colorbox in a .load-callback in Facebook Tab/Canvas

I'm having a little issue with the colorbox when using it in a facebook tab/canvas.
Basically I load another file (that contains a few images) with ajax (jQuery) into my canvas page and I want to let colorbox open those pictures. It all works fine when I attach the colorbox in the callback of my ajax .load as long as I'm not in the facebook canvas.
But as soon as I open the page in facebook, it won't open colorbox anymore. All other jQuery functions are working though.
Code-Example
$('#slider').load('content.php', { ajax: 'on' }, function(e) {
        $('.gallery').colorbox({rel:'gal'});
});

I found a solution to make it work - I need to define the colorbox in the file that is getting loaded with ajax. But I don't understand why it's not working in the callback and I don't think it's a very nice solution. Before I want to move on and develop further things in my fb-canvas, I need to know why this is happening.

It all works fine when I attach the colorbox in the callback of my ajax .load

This sounds good and your code looks good.

I need to define the colorbox in the file that is getting loaded with ajax.

You shouldn't have to do this.  It sounds like the ajax you are loading is breaking colorbox's script in some way and you are just paint over that by calling the plugin's script again.  Make sure that the file you are loading ('content.php') doesn't include a link to the colorbox script or to jQuery.  If it has a link to jQuery in it, then that version is going to replace the original jQuery object that was in your document.  The original was the version that was extended with the colorbox plugin.

Sorry, I don't know.  That looks fine to me as long as everything is defined.  If $('#' + History.getState().data['show']) doesn't return a valid element in your document, then you'll throw an error when you try to access the left property from positions()'s return.


How to deploy execute program by faas-cli?

After deploy faas stack and success can access by localhost:8080/ui/, I already build execute program by host's go build and it isn't docker's
$ curl localhost:8080/function/func_faas1
The echo was null
Expected Behaviour

Should return Hello! but return null

Need document about deploy bin execute.
Current Behaviour

Possible Solution

Steps to Reproduce (for bugs)

1.main.go
package main

import "fmt"

func main() {
	fmt.Println("Hello!")
}

2. go build success and faas1 put to current path
3.After download fwatchdog to current path
4.create Dockerfile
Dockerfile
FROM alpine:latest
ENTRYPOINT []

COPY fwatchdog /usr/bin/fwatchdog
RUN chmod +x /usr/bin/fwatchdog

COPY faas1 /usr/bin/faas1
RUN chmod +x /usr/bin/faas1

ENV fprocess "/usr/bin/faas1"

EXPOSE 8080
CMD ["/usr/bin/fwatchdog"]

docker build -t functions/faas1:latest .
5.docker-compose.yml
version: "3.2"
services:
    # faas1
    faas1:
        image: functions/faas1:latest
        labels:
            function: "true"
        depends_on:
            - gateway
        networks:
            - functions
        environment:
            no_proxy: "gateway"
            https_proxy: $https_proxy
        deploy:
            placement:
                constraints:
                    - 'node.platform.os == linux'

networks:
    functions:
        driver: overlay
        # Docker does not support this option yet - maybe create outside of the stack and reference as "external"?
        #attachable: true

6.docker stack deploy func --compose-file docker-compose.yml
7.found the func_faas1 by localhost:8080/ui/ and invoke can see the Hello!
8.curl localhost:8080/function/func_faas1 return null
Context

Your Environment

Docker version docker version (e.g. Docker 17.0.05 ):
$ docker version
Client:
Version:      17.05.0-ce
API version:  1.29
Go version:   go1.7.5
Git commit:   89658be
Built:        Thu May  4 22:10:54 2017
OS/Arch:      linux/amd64

Server:
Version:      17.05.0-ce
API version:  1.29 (minimum version 1.12)
Go version:   go1.7.5
Git commit:   89658be
Built:        Thu May  4 22:10:54 2017
OS/Arch:      linux/amd64
Experimental: false

Are you using Docker Swarm or Kubernetes (FaaS-netes)?
Docker Swarm
Operating System and version (e.g. Linux, Windows, MacOS):
ubuntu 16.04 x64
Link to your project or a code example to reproduce issue:

package main

import "fmt"

func main() {
	fmt.Println("Hello!")
}

Someone with more Go knowledge can step in if I'm off base but it doesn't look like your function is reading from STDIN. have you seen this Go example? Might provide some insight https://github.com/alexellis/faas/tree/master/sample-functions/BaseFunctions/golang

@austinfrey
Hi,
Thank you first.
https://github.com/alexellis/faas/tree/master/sample-functions/BaseFunctions/golang
used container's golang compiler and I want to use host's golang compiler.somewhat different

Hi @leenux thank you for trying out OpenFaaS - the good news is that you've got a function working 👍
The functions can only be invoked by POST, so if you want to use curl then type in:
$ curl localhost:8080/function/func_faas1 --data ""

Also if you use the FaaS-CLI then you never have to edit the docker-compose.yml file again:
$ faas-cli deploy --image functions/faas1:latest --name faas1

Find out more about the CLI here - https://blog.alexellis.io/quickstart-openfaas-cli/

@alexellis
Hi,
Yes,it work fine
Thank you.

Great! Please ask again if you have questions

Hi, Where did the config files say POST?

Hi can you open a new issue please and fill out the whole template too.


RAL modifications against upstream

For reference only, DO NOT MERGE.

The only changes here we are particularly attached to are:

Relax hardware labelling to include dash and underscore
Allow an additional decimal at the end of an interface name
Add support for aq search_host --feature
Allow group members to access sockdir
Add support for an archetype preface template

While we need a method of reporting the status of sandboxes but the script in this commit is probably not a great way of achieving that.

Add script to produce json report of sandboxes statuses

Everything else is RAL specific.

@jrha oopsie, i clicked on the 'merge conflicts" editor, and it generated a new commit straight in your PR. i expected it to open a PR to your branch...

:fearful:

@jrha  - for our internal review process we need the commit log to have a Change-Id: line.
Please can you install this hook in .git/hooks/commit-msg before submitting future requests?
For this commit, please can you then amend the commit log with a Change-Id line? (You can just pick the original commit id) We can't do it because the commit-id will change and GH won't see it as the same commit.

Sure, although these probably need splitting up and rebasing seperately on the latest version of the code base, so I'll probably open a new PR.

"36adab7 Add support for an archetype preface template" cherry-picked into the new PR #64.

Will probably just close this once we've updated our broker - fairly sure the upstream code now contains everything we needed.

@jrha  can we close this one? The config problem is now solved. As for other code parts that uses MS reference we will need to submit separate change (to move 'ms.com' to a config option when it is hardcoded. ). Basically it is easier to have separate PRs for separate fixes/improvements - we can then review that and merge quicker - not causing long running discussion :)

Yes, let's close it.


benchmark convergence time and other metrics

It would be good to benchmark convergence time and other metrics that we care.
It may not necessarily reflect the real situation in production but it can be used to have a rough idea on performance characteristics and as a baseline to prevent regression under difference scenarios that we can simulate.
The benchmark should be automated under different ringpop/swim configurations and scenarios like single node failure, catastrophic failure, parallel restart, rolling restart, capacity increase, packet loss, latency increase, etc.
I made a simple prototype under https://github.com/mrhooray/swim-js/tree/master/bench which measures convergence time under single node failure scenario. It does not include much automation but can be tuned with cli arguments and produces result like
configuration:
- cycles 20
- workers 30
- codec msgpack
- dissemination factor 15
- interval 20 ms
- join timeout 100 ms
- ping timeout 4 ms
- ping req timeout 12 ms
- ping req group size 3
- max dgram size 512 bytes
convergence time under single node failure
histogram data:
- count 20
- min 94
- max 198
- mean 130.4
- median 126
- variance<PHONE_NUMBER>473684
- std dev 28.422378136731773
- p75 143.75
- p95<PHONE_NUMBER>9999997
- p99 198

Is this something we'd like to have? suggestions/ideas? @jwolski @Raynos

Yes. This is much desired.

this has been merged


[MX-240] Consignments ui fixes

https://artsyproduct.atlassian.net/browse/MX-240

Fix a bug where navigator push transitions were duplicated, by making sure .focus is called on a TextInput synchronously after mounting rather than during the transition animation (though not sure why the animation was being restarted as a result of that. The animation was handled by CA so I didn't feel it was worth digging into.)
Fix another bug I found where the submit button on the Metadata step of the consignments flow was being hidden behind the keyboard.

Before:

After:

Travis is still having issues, going to merge.

Mmm, my mistake! Seems like there's no issue on bid flow 👍


Sugection: Autowall & Bomb Explode Timer

Can you please add autowall ( I mean autoshoot when wall can be penetrated ), and bomb timer ( when bomb is planted timer is on when it can be defused )

Added.


TF Dataset performance regression / best practices for data augmentation on the accelerator

System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): yes
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Win 10
TensorFlow version (use command below): 2.3.0
Python version: 3.6.9
CUDA/cuDNN version: 10.1
GPU model and memory: P100 (colab)

Describe the current behaviour
Iterating over a simple Dataset is very slow (even when using a @tf.function). It is 4 (CPU) - 6 (GPU) times slower than a comparable iteration using numpy.
Describe the expected behaviour
I would expect much faster execution of such a simple code, especially because of the optimisations that could be done on the computational graph. It should at least be on par with iterating in Python over numpy data / operations. I can imagine some share of the GPU overhead is attributable to the CUDA kernel launch overhead. I am working on a much more complex dataset structure (dealing witch random sequences + a batch of random additional data per sequence) and was surprised that a big part of the slowness of my structure can be attributed to the simple example presented here.
I could probably create a dense dataset (with 100x or more (depending on sequence length) in memory footprint) to increase the speed but I believe this kind of data augmentation (different sequence offsets) should be done on the accelerator to not blow up the memory footprint unnecessary. I did not find any best practices regarding this very common problem I am very much following the philosophy (would rather call it "hacking") in the tensorflow function "timeseries_dataset_from_array": https://github.com/tensorflow/tensorflow/blob/fcc4b966f1265f466e82617020af93670141b009/tensorflow/python/keras/preprocessing/timeseries.py#L30
Standalone code to reproduce the issue
https://colab.research.google.com/drive/1j14DvChu7FJDyD6D8aZPb7w-h4mdTEVZ?usp=sharing
import tensorflow as tf
import numpy as np

d = 1000
z = tf.zeros((d, d), dtype=tf.float32)
ds = tf.data.Dataset.range(100).map(lambda x: z[:10, :10]).repeat().batch(256).take(1000)
@tf.function
def run():
  s = 0
  for x in ds:
    s = tf.reduce_sum(x)
    pass

run()

a = np.ones((d, d), dtype=np.float32)
s = 0
for _ in range(1000):
  for __ in range(256):
    s += np.sum(a[:10, :10])

Was able to reproduce the issue with TF v2.3. Please find the gist of it here. Thanks!

@jonas-eschmann What is your scope with s += np.sum(a[:10, :10])?

@bhack I wanted to make sure the pipeline is bottlenecked by the dataset throughput and not the reduce_sum.

Do you want to apply transformations to the dataset elements?

Hi,
Thank you for opening this issue. Since this issue has been open for a long time, the code/debug information for this issue may not be relevant with the current state of the code base.
The Tensorflow team is constantly improving the framework by fixing bugs and adding new features. We suggest you try the latest TensorFlow version with the latest compatible hardware configuration which could potentially resolve the issue. If you are still facing the issue, please create a new GitHub issue with your latest findings, with all the debugging information which could help us investigate.
Please follow the release notes to stay up to date with the latest developments which are happening in the Tensorflow space.


Adding Python Support

Adding Python 3 Support. Before this PR is merged, it should attempt to add support to both Python2 and Python3 at the same time

I've tested this on Ubuntu 16.04 and ran into a bug when I try to "Step into" a call (F3) which fails with the following Python error:
Traceback (most recent call last):
  File "/home/magicmyth/.vim/bundle/vdebug/plugin/python/start_vdebug.py", line 55, in step_into
    self.runner.step_into()
  File "/home/magicmyth/.vim/bundle/vdebug/plugin/python/vdebug/runner.py", line 209, in step_into
    self.refresh(res)
  File "/home/magicmyth/.vim/bundle/vdebug/plugin/python/vdebug/runner.py", line 134, in refresh
    self.get_context(0)
  File "/home/magicmyth/.vim/bundle/vdebug/plugin/python/vdebug/runner.py", line 150, in get_context
    if self.ui.tracewin.is_tracing():
AttributeError: 'NoneType' object has no attribute 'is_tracing'

Evaluating variable under (F12) also fails with:
Traceback (most recent call last):
  File "/usr/lib/python3.5/base64.py", line 518, in _input_type_check
    m = memoryview(s)
TypeError: memoryview: a bytes-like object is required, not 'str'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/magicmyth/.vim/bundle/vdebug/plugin/python/start_vdebug.py", line 133, in eval_under_cursor
    return self.event_dispatcher.eval_under_cursor()
  File "/home/magicmyth/.vim/bundle/vdebug/plugin/python/vdebug/event.py", line 19, in eval_under_cursor
    return event.execute(self.runner)
  File "/home/magicmyth/.vim/bundle/vdebug/plugin/python/vdebug/event.py", line 124, in execute
    runner.eval(var)
  File "/home/magicmyth/.vim/bundle/vdebug/plugin/python/vdebug/runner.py", line 286, in eval
    %context_res.get_code())
  File "/home/magicmyth/.vim/bundle/vdebug/plugin/python/vdebug/dbgp.py", line 162, in get_code
    return base64.decodestring(parts[1])
  File "/usr/lib/python3.5/base64.py", line 560, in decodestring
    return decodebytes(s)
  File "/usr/lib/python3.5/base64.py", line 552, in decodebytes
    _input_type_check(s)
  File "/usr/lib/python3.5/base64.py", line 521, in _input_type_check
    raise TypeError(msg) from err
TypeError: expected bytes-like object, not str

Everything else not dependant on those two features seems to be working fine for me.

I also get the  AttributeError: 'NoneType' object has no attribute 'is_tracing' error but I get it as soon as soon as the debugger starts. I am unable to stop at the first breakpoint. The stack is slightly different:
An error occured: <class 'AttributeError'>
Traceback (most recent call last):
  File "xxx/.vim/bundle/vdebug/plugin/python/start_vdebug.py", line 31, in run
    self.runner.run()
  File "xxx/.vim/bundle/vdebug/plugin/python/vdebug/runner.py", line 184, in run
    self.open()
  File "xxx.vim/bundle/vdebug/plugin/python/vdebug/runner.py", line 72, in open
    self.refresh(status)
  File "xxx/.vim/bundle/vdebug/plugin/python/vdebug/runner.py", line 134, in refresh
    self.get_context(0)
  File "xxx/.vim/bundle/vdebug/plugin/python/vdebug/runner.py", line 150, in get_context
    if self.ui.tracewin.is_tracing():
AttributeError: 'NoneType' object has no attribute 'is_tracing'

I'm trialling with PHP7.1 on Ubuntu 16.10 (Yakkety Yak)

Should be solved if you pull it down now. It was an issue with a feature I put in (Where if you close the source window, then Vdebug closes itself. It didn't account for the source window being changing), which I've disabled temporarily

Sorry for the slow response. Yes the latest from master has fixed the issue for me. Thanks very much.


Update propagation of a field that is an accountId for the target resource

From<EMAIL_ADDRESS>on September 30, 2010 11:34:45
When it propagates an update of a field that is accountId for the target resource then a new entry will be created without update the older one identified by the older accountId.
Probably the right behavior must be to try an update (PropagationException in case of target resource doesn't permit to change the accountId).
Original issue: http://code.google.com/p/syncope/issues/detail?id=51

From chicchiricco on October 04, 2010 03:48:47
Status: Started

From chicchiricco on October 04, 2010 09:26:27
This issue was closed by revision r610 .
Status: Fixed


cherry-pick podnames taskresult

WIP PR to show which changes we applied to that branch. Can be closed once we switch back to the next argo workflows release.

sorry for the noise - wrong target, wanted to that in our fork for documentation purposes :upside_down_face:


Tests and Examples

Can you share any tests of this and https://github.com/mdmsoft/yii2-ar-relation/blob/master/RelationBehavior.php
Can you add some usage examples?

Use this https://github.com/mdmsoft/yii2-ar-behaviors/


Array-level examples do now show up in Topics section

They do show up in the Schemas section however:
topics:
  example:
    subscribe:
      description: Example topic
      payload:
        $ref: '#/components/schemas/example'

components:
  schemas:
    example:
      type: array
      items:
        type: number
      example: [35.4, 38.6, 46.7, 66.5]

Assuming an HTML generated document.
The example within the "Topics" section just shows an empty code block.  However in the schemas section section the example shows correctly.
This works the same using the online editor, as well as with the ag cli.

Thanks for reporting @fridgerator. Will have a look at soon as I can.

First PR I guess, tell me what you think. I tried to make the changes as noninvasive as possible. I also noticed that the same issue happens with messages, so I fixed that in the html template, too.


SCB-1352 Fix typo on ParametersContext class

Follow this checklist to help us incorporate your contribution quickly and easily:

[x] Make sure there is a JIRA issue filed for the change (usually before you start working on it).  Trivial changes like typos do not require a JIRA issue.  Your pull request should address just this issue, without pulling in other changes.
[x] Each commit in the pull request should have a meaningful subject line and body.
[ ] Format the pull request title like [SCB-XXX] Fixes bug in ApproximateQuantiles, where you replace SCB-XXX with the appropriate JIRA issue.
[ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
[x] Run mvn clean install to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

Change ParametersContext.putParamters to putParameters

Coverage decreased (-0.2%) to 89.156% when pulling 66d59dcb796b8ab37217b491690609f8a0767c11 on chanjarster:fixtypo into bcf978dfc1bde47a97e2591bd20e34ca78034f50 on apache:master.

Thanks for your contribution.

As the putParameters method is internal API and it's rarely used by the user, I think it's safe to change the method name.


Fix windows package generation

Where has this been tested?

Platform(s): Windows 10, Ubuntu 22.04
Python version(s): 3.10
Unreal Engine version(s): 5.3

After this concept test, we determinet that the approach followed by this PR does not work always due the undetermenistic execution order of the cmake targets.
We implemented a new approach to solve the same issue without flacky bugs:
https://github.com/carla-simulator/carla/pull/7427


Processing pictures in a flickr site

Crawling a flickr site, say,  https://www.flickr.com/photos/gobiernoextremadura with:
<referenceFilters>
      <filter class="$filterRegexRef" onMatch="include">https://www\.flickr\.com/photos/gobiernoextremadura/.*</filter>
</referenceFilters>

I only get 3 documents:
https://www.flickr.com/photos/gobiernoextremadura/
https://www.flickr.com/photos/gobiernoextremadura/favorites
https://www.flickr.com/photos/gobiernoextremadura/albums/

How can I process the pictures?

First, I just fixed an issue where flicker would return a 502 error because the HTTP Collector was adding the 443 port.  That's fixed in this snapshot release.
Second, are you saying you want the *.jpg URLs? The pictures in these pages are not regular <img> tags and JavaScript is used to render them.  Unfortunately, the current link extractors offered won't get those javascript-generated image URLs: I can think of two options:
You can write your own ILinkExtractor to extract URLs exactly like you want.  Or, you can try to hack it in.  For instance, I saw the URLs are found in the style attribute of div tags. The following is a hack to get them using a mix of the GenericLinkExtractor and GenericURLNormalizer.
     <urlNormalizer class="com.norconex.collector.http.url.impl.GenericURLNormalizer">
        <replacements>
          <replace>
             <match>.*background-image:.*?url\((.*?)\).*</match>
             <replacement>https:$1</replacement>
          </replace>
          <replace>
             <match>^((?!flickr\.com).)*$</match>
             <replacement></replacement>
          </replace>
        </replacements>
      </urlNormalizer>

      <linkExtractors>
        <extractor>
          <tags>
            <tag name="a" attribute="href" />
            <tag name="frame" attribute="src" />
            <tag name="iframe" attribute="src" />
            <tag name="img" attribute="src" />
            <tag name="meta" attribute="http-equiv" />
            <tag name="div" attribute="style" />
          </tags>
        </extractor>
      </linkExtractors>

Thank you for your information. I've got the pictures (even references that doesn't exist, I have to try more the background-image regex) but now I miss their  id  in web pages' collector.referenced-urls field. Is there any way to get this relationship?

If the URL were extracted, they will automatically be stored in collector.referenced-urls, unless you are not keeping that field. Can it be stripped by KeepOnlyTagger (if you are using it)?

The pictures' URLs don't appear in collector.referenced-urls. These are some samples of documents commited by the crawler and seen in Solr:
https://c1.staticflickr.com/1/708/21863391446_4e39b4243f_z.jpg
https://c2.staticflickr.com/6/5681/21701358240_775051f68f_z.jpg
https://c3.staticflickr.com/3/2946/15359593745_565d06dfcc.jpg
https://c4.staticflickr.com/8/7569/15850393679_96f493f753_z.jpg

In Solr, in collector.referenced-urls for https://www.flickr.com/photos/gobiernoextremadura/ this is one of the references that appears:
https://www.flickr.com/photos/gobiernoextremadura/transform: translate(0px, 0px); -webkit-transform: translate(0px, 0px); -ms-transform: translate(0px, 0px); width: 509px; height: 340px; background-image: url(//c1.staticflickr.com/1/708/21863391446_4e39b4243f_z.jpg)

It seems to be the contents for style in <div>. If you move to the right end, you can see the URL for the first sample, following background-image:. There are 24 references with this format and 2 more with a different one:
https://www.flickr.com/photos/gobiernoextremadura/background-image: url(//c1.staticflickr.com/9/8136/buddyicons/90089285@N07_l.jpg?1369119665
https://www.flickr.com/photos/gobiernoextremadura/background-image:url(//farm1.staticflickr.com/658/coverphoto/90089285@N07_h.jpg?1443170258

Is there a way of getting the right URLs?. Thank you

You will have to play with the regular expression in the example I have given to extract all URLs properly.

I'm not sure I understand you.
As I see it, the regular expression works fine and the URLs are extracted properly. Here they are some samples:
https://c1.staticflickr.com/1/708/21863391446_4e39b4243f_z.jpg
https://c2.staticflickr.com/6/5681/21701358240_775051f68f_z.jpg
https://c3.staticflickr.com/3/2946/15359593745_565d06dfcc.jpg
https://c4.staticflickr.com/8/7569/15850393679_96f493f753_z.jpg

They are identified and commited by the crawler.
What I think that fails is the process of assigning the URL to collector.referenced-urls field of the web page where the URL is referenced. Instead of assigning:
https://c1.staticflickr.com/1/708/21863391446_4e39b4243f_z.jpg

it assigns:
https://www.flickr.com/photos/gobiernoextremadura/transform: translate(0px, 0px); -webkit-transform: translate(0px, 0px); -ms-transform: translate(0px, 0px); width: 509px; height: 340px; background-image: url(//c1.staticflickr.com/1/708/21863391446_4e39b4243f_z.jpg)

I can't see how it would extract the proper URLs, but store invalid ones.  Are invalid ones stored "in addition" to the correct ones in collector.referenced-urls?
Please attach a copy of your config and I'll try to reproduce.

They are not stored "in addition".
  I just tried with your config and I do not get URLs with ...transform: translate(... in them.  On the other hand, I do not see in your config any references to the URL normalizer or link extractor I suggested before.  So are you or are you not extracting URLs from the div style?  Did you copy the right config?

I'm very sorry. With several issues at the same time, I've mistaken the config file:
<?xml version="1.0" encoding="UTF-8"?>

     <httpcollector id="MC (collector)">

  #set($filterRegexRef  = "com.norconex.collector.core.filter.impl.RegexReferenceFilter")
  #set($workdir = "c:/CRAWLER/collectors/ES-Extremadura2/work/")

  <progressDir>$workdir/progress</progressDir>
  <logsDir>$workdir/log</logsDir>

  <crawlerDefaults>
      <delay default="100" />
      <numThreads>3</numThreads>
      <maxDepth>-1</maxDepth>
      <maxDocuments>-1</maxDocuments>
      <keepDownloads>false</keepDownloads>
      <orphansStrategy>IGNORE</orphansStrategy>
      <urlNormalizer class="com.norconex.collector.http.url.impl.GenericURLNormalizer">
        <normalizations>removeDotSegments, removeFragment</normalizations>
      </urlNormalizer>
	  <canonicalLinkDetector ignore="true"> </canonicalLinkDetector>
  </crawlerDefaults>

  <crawlers>
    <crawler id="MC (crawler)">
      <robotsTxt ignore="true" />
	  <sitemap ignore="true" />
      <httpClientFactory>
            <trustAllSSLCertificates>true</trustAllSSLCertificates>
      </httpClientFactory>
      <workDir>$workdir</workDir>

      <startURLs>
        <url>https://www.flickr.com/photos/gobiernoextremadura/</url>
      </startURLs>

      <referenceFilters>
        <filter class="$filterRegexRef" onMatch="include">https://www\.flickr\.com/photos/gobiernoextremadura/.*</filter>
  	  </referenceFilters>

	 <urlNormalizer class="com.norconex.collector.http.url.impl.GenericURLNormalizer">
		<replacements>
		  <replace>
			 <match>.*background-image:.*?url\((.*?)\).*</match>
			 <replacement>https:$1</replacement>
		  </replace>
		  <replace>
			 <match>^((?!flickr\.com).)*$</match>
			 <replacement></replacement>
		  </replace>
		</replacements>
	  </urlNormalizer>

	  <linkExtractors>
		<extractor>
		  <tags>
			<tag name="a" attribute="href" />
			<tag name="frame" attribute="src" />
			<tag name="iframe" attribute="src" />
			<tag name="img" attribute="src" />
			<tag name="meta" attribute="http-equiv" />
			<tag name="div" attribute="style" />
		  </tags>
		</extractor>
	  </linkExtractors>

      <importer>
        <!-- max memory used for a single file. 10MB by default -->
        <maxFileCacheSize>10000000</maxFileCacheSize>
        <!-- max memory for the sum of all files.  100MB by default -->
        <maxFilePoolCacheSize>100000000</maxFilePoolCacheSize>
 	  </importer>

      <committer class="com.norconex.committer.solr.SolrCommitter">
        <solrURL>http://localhost:8983/solr/MC</solrURL>
        <sourceReferenceField keep="false">document.reference</sourceReferenceField>
        <targetReferenceField>id</targetReferenceField>
        <targetContentField>content</targetContentField>
        <commitBatchSize>10</commitBatchSize>
        <queueDir>$workdir/queue</queueDir>
        <queueSize>100</queueSize>
        <maxRetries>2</maxRetries>
        <maxRetryWait>5000</maxRetryWait>
        <commitDisabled>true</commitDisabled>

        <solrUpdateURLParams>
          <param name="update.chain">langid</param>
        </solrUpdateURLParams>
      </committer>

    </crawler>

  </crawlers>
</httpcollector>

No worries. I will give this one a try.

With your latest config I was able to find the cause.  URLs are stored in referenced-urls as they are extracted, without modifications.  That is, before any URL normalization is performed on them.  Since we extract URLs from the <div style="..."> tag and only clean it in the normalization phase, that's why garbage is found.
Since normalization helps prevent referencing the same document in multiple ways, it may be best to always deal with the normalized version to keep them consistent. I will see how I can change that.
Unless you see any use case for keeping original unmodified URLs as well?  Or offer both ways?

Since https://c1.staticflickr.com/1/708/21863391446_4e39b4243f_z.jpg is extracted and commited, I just need it to be referenced in referenced-urls

I made the behavior change in a new snapshot release.  Try it and let me know.

All the commited pictures are referenced properly.
There are still some badly formed referenced-urls that try to reference to URLs that exist in the site but that have not been identified/commited by the crawler. These are the references for  https://www.flickr.com/photos/gobiernoextremadura:
"collector.referenced-urls":
<EMAIL_ADDRESS><EMAIL_ADDRESS>
The following URLs haven't been identified/commited:
<EMAIL_ADDRESS><EMAIL_ADDRESS>
In the log there are these two related events:
REJECTED_NOTFOUND<EMAIL_ADDRESS>REJECTED_NOTFOUND<EMAIL_ADDRESS>

I found the cause.  By default, the GenericLinkExtractor will strip everything after the anchor # (URL fragment). In your case, when you view the page source, those URLs have an anchor.  It means it strips everything after, including the closing parenthesis ")".  So you have two options:
First, you can add keepFragment="true" to the <extractor> tag in your config, then add the removeFragment normalization rule in the GenericURLNormalizer.
Second, you can modify the regex to include everything up to the closing parenthesis, or the end, like this (untested):
<match>.*background-image:.*?url\((.*?)\){0,1}.*</match>

Before officially releasing 2.3.0, I am thinking to always keep the fragment part when URLs are extracted, but have URLNormalizer set with a bunch of default rules, like removeFragments and rely on the Nornalizer to remove fragments or not.  It would be cleaner that way and you would not need one of the two recommended workaround above.

The result it's not better. The first regex gets a better results that the second one.
keepFragment="true" seems to produce bad references.
I''ll wait for you new snapshot.

You can try the latest snapshot now.  Now when URLs are extracted by one of the two ILinkExtractor available, the fragments are always kept.  It relies on the IURLNormalizer to get rid of them.
Now GenericURLNormalizer is set as the default URL normalizer (there was no default before) and it has the removeFragment rule enabled by default. Unless you modify it, the hashtags will be stripped there.
Because the link extractor no longer strips the fragment, it should no longer mess up your URLs.  Let me know how that goes.

No difference found. I still get:
REJECTED_NOTFOUND<EMAIL_ADDRESS>REJECTED_NOTFOUND<EMAIL_ADDRESS>
I don't no why the crawler is not able to identify and commit:
<EMAIL_ADDRESS><EMAIL_ADDRESS>
In https://www.flickr.com/photos/gobiernoextremadura, referenced-urls field still contains:
"collector.referenced-urls":
<EMAIL_ADDRESS><EMAIL_ADDRESS>
I can't understand why the crawler can identify and commit, say:
//c1.staticflickr.com/1/600/22310946406_c81f8d662d_z.jpg

from https://www.flickr.com/photos/gobiernoextremadura/, but not:
<EMAIL_ADDRESS>
Is there anything in the source code that makes the difference?

This is still the hashtag causing problem, since you are asking to strip fragments by using the default normalization rules in your config and the right parenthesis in your regex no longer exists in the URL.  So to fix this, you need to change your regex a bit.  I changed it with the following and if fixed it for that page and the URLs above are now correct:
<match>.*background-image:.*?url\((.*?)(\).*|$)</match>

I also noticed you have <urlNormalizer> both under <crawlerDefaults> and under <crawler ...>.    So if you truly want just removeDotSegments and removeFragment to apply, move them down.  Otherwise the default set of normalization rules is applied instead.

Having received no feedback in a while, I will assume the suggested regex change worked for you.

I'm very sorry. I thought I 'd informed you about your last advice. It work fine. Thank you.

No worries. Thanks for confirming.


Update xeus

Fix https://github.com/jupyterlite/demo/issues/80

@martinRenou I guess we need this fix for all of the xeus based lite kernel


Will it run on OpenCL 1.1 ( EP) on Vivante GC2000 GPU?

Just was curious to know what is the minimum required OpenCL Version, so that I can see if I could run on run on Vivante GC2000 GPU?

clBLAS requires OpenCL 1.2 as far as I'm aware. You could try CLBlast instead perhaps, although that isn't tested on Vivante either.

When this PR is accepted it probably will: https://github.com/clMathLibraries/clBLAS/pull/342

Just was curious to know what is the minimum required OpenCL Version, so that I can see if I could run on run on Vivante GC2000 GPU?

Have you managed running it?


Option.Builder constructor than can pre-populate from an existing Options object

Feature Request
Some "*Option.Builders" classes are lacking a constructor that accepts the immutable "*Options" object for pre-populating fields.
For example, such a constructor can be found in https://github.com/nats-io/nats.java/blob/main/src/main/java/io/nats/client/FeatureOptions.java#L52, but no such constructor exists in the main Options.java object used to configure a NATS Connection.
All configuration Builder classes should be copy-constructable from the object they build.
Use Case:

Constructing Options in multiple stages without passing around a mutable builder.
Constructing multiple variations of the same shared constant base Options object.

Eg:
public static final Options COMMON_OPTIONS = Options
    .builder()
    ...
    .build();

public Options getApp1Options(String serverUrl) {
    return Options
        .builder(COMMON_OPTIONS)
        .server(serverUrl)
        .build()
}

public Options getApp2Options() {
    return Options
        .builder(COMMON_OPTIONS)
        .connectionListener(aDifferentConnectionListener)
        .build()
}

public Options getApp3Options() {
    return Options
        .builder(COMMON_OPTIONS)
        .alternateValue(123)
        .build()
}

public Options getApp4Options() {
    return Options
        .builder(COMMON_OPTIONS)
        .alternateValue(456)
        .build()
}

Proposed Change:
In any *Options class missing this pattern, add:
class Options {
    public static Options.Builder builder(final Options options) {
        return new Options.Builder(options);
    }

    . . .

    public static class Builder {
        public Builder(final Options options) {
            ... copy from options
        }
    }
}

Eg: https://github.com/nats-io/nats.java/blob/main/src/main/java/io/nats/client/Options.java and https://github.com/nats-io/nats.java/blob/main/src/main/java/io/nats/client/PublishOptions.java
Who Benefits From The Change(s)?
Application developers with multiple NATS client components which share only most of the information in Options classes.
Alternative Approaches
Alternative approaches for application developers who wish to configure Options in separate stages:

Wrapper OptionsFactories that return new instances of mutable Builder objects for modification.
Or a mirror implementation of Options & Options.Builder classes where staged modification is possible.
Implement their own copy-to-Builder utility method and keep it up to date with every field in Options.

Alternative library approaches:

Options.Builder(Options.Builder) copy constructor instead of accepting the immutable built class.
Options immutable class has a toBuilder() instance method that returns a pre-populated Builder rather than the application calling the Builder's constructor or static factory method directly.

This seems like a good idea, there are other things that are higher priority for me, but we certainly welcome PRs, please sign all commits.


Base Adapter "getDrawEventFromEvent" BUGS

First of all thanks for sharing the project. ❤
Bug 1 - Offset Calculation
Current State:
If the parent element of the mapContainer has an offset, the cursor position is not calculated correctly.
Problem:
Currently the map container is being goten.
https://github.com/JamesLMilner/terra-draw/blob/8f4e6f35771cd82d89823c66878a4e64732397b0/src/adapters/common/base.adapter.ts#L297
Then its offsetLeft and offsetTop properties are used to calculate containerX and containerY.
https://github.com/JamesLMilner/terra-draw/blob/8f4e6f35771cd82d89823c66878a4e64732397b0/src/adapters/common/base.adapter.ts#L301
This properties get the offset from the parent only, but dont take into account the total offset if the map container is highly nested in the DOM.
https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetLeft
Proposal:
Use the same approach of the mapbox-gl adapter on its method getLngLatFromEvent
https://github.com/JamesLMilner/terra-draw/blob/8f4e6f35771cd82d89823c66878a4e64732397b0/src/adapters/mapbox-gl.adapter.ts#L174
Other approach could be to use the "project" method since latlng is already calculated at that point.
Bug 2 - Spreading heldKeys
Current State:
You cant use the rotate and scale functionality, not even in the official demo: https://terradraw.io/
I tested it on Chrome and Edge
Problem:
Spreading the Set, it seems to be a problem with Typescript.
https://github.com/JamesLMilner/terra-draw/blob/8f4e6f35771cd82d89823c66878a4e64732397b0/src/adapters/common/base.adapter.ts#L304
Proposal:
Convert the set to array and then spread it.

Hey @alanOracle thanks for raising these. I'm really glad you like the project and I appreciate you taking the time to write up this error report.
I have some good news, which is this that both of these should now be fixed in 0.0.1-alpha.27 which is available via GitHub. You check the rotation now works on https://terradraw.io
Please feel free to raise any other issues you may find on your travels, I want to make Terra Draw a great experience for everyone to use and squashing bugs is a big part of that!


Create a new pull request by comparing changes across

Pull Request Test Coverage Report for Build 951397035

0 of 0   changed or added relevant lines in 0 files are covered.
1 unchanged line in 1 file lost coverage.
Overall coverage increased (+0.2%) to 95.019%

Files with Coverage Reduction
New Missed Lines
%

js/src/dom/event-handler.js
1
92.27%

Totals

Change from base Build 944106272:
0.2%

Covered Lines:
1989

Relevant Lines:
2048

💛  - Coveralls


Manage functions as standalone files

I'd like to be able to define my SQL functions in standalone files so that when I make changes to them they can be diffed against their previous versions. Currently I have to script dropping and recreating the function in a new migration, giving no easy way of seeing what the actual changes are via a diff.
If I could instead reference a function file in my migration I'd get the diff ability and the ability to have it automatically applied by the migration. (The hash for the migration should include hashing the contents of the referenced file.)
e.g. something like
9_ChangeMyFunc.sql:
-- Apply updated version of function
!include ./funcs/my_function.sql

Where funcs/my_function.sql contains:
drop function my_function(IN param number);
create function my_function(IN param number, IN param2 text)
as $BODY$
  select param, param2
$BODY$;

Hi, thanks for the issue. I think this is effectively a duplicate of #27, but with functions as a use case, not just views.
It's something I should consider supporting, I just haven't had the time/energy to put much thought into it.

So, @ThomWright, no thoughts on how you'd like to see this support implemented?


Error 400 on Get-MSCommerceProductPolicies -PolicyId AllowSelfServicePurchase

Error when running the below:
PS C:\WINDOWS\system32> Get-MSCommerceProductPolicies -PolicyId AllowSelfServicePurchase
HandleError : Failed to retrieve product policy with PolicyId 'AllowSelfServicePurchase', ErrorMessage - The remote
server returned an error: (400) Bad Request. ErrorDetails - {"errorCode":"BadRequest","reason":"Invalid scope."}
At C:\Program Files\WindowsPowerShell\Modules\MSCommerce\1.7\MSCommerce.psm1:239 char:5

HandleError -ErrorContext $_ -CustomErrorMessage "Failed to retri ...

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,HandleError

Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: 5082f7ed-ad40-04c1-5c6c-59e67b253257
Version Independent ID: 3d8b109d-285c-952f-2fa4-9fa244c2a3f9
Content: Use AllowSelfServicePurchase for the MSCommerce PowerShell module
Content Source: microsoft-365/commerce/subscriptions/allowselfservicepurchase-powershell.md
Service: microsoft-365-business
GitHub Login: @cmcatee-MSFT
Microsoft Alias: cmcatee

Getting the same issue

Same here, and the same issue as #4408 from March 2021.

Same Issue for me on our tenant.

Same issue on our PROD and DEV tenant.

Same here, is there an alternate method to block app purchases in the meantime?

Same here, is there an alternate method to block app purchases in the meantime?

FYI
Update-MSCommerceProductPolicy -PolicyId AllowSelfServicePurchase -ProductId CFQ7TTC0KP0N -Value "Disabled"
Still works, list of ID's are here https://learn.microsoft.com/en-us/microsoft-365/commerce/subscriptions/allowselfservicepurchase-powershell?view=o365-worldwide

@scursio-uefa Thank you for your feedback. I was able to reproduce the issue. I'll check internally and update the document.
Thanks
Sri

I have a Microsoft open on this, but no answers since 2 days ago.

Also have a Microsoft case open for this, since Monday (issue first appeared to us last week on Friday). Last response from Microsoft (today) was that the backend team was working on a fix.

Seems they fixed the issue, it's working again


Two remap filters for the same stream.

Hi there.
I have a half-baked idea for getting the blending of the two cameras.
I am going to try and modify your code to do this, but to be honest this might take a long time, and I just wanted to put this idea to you as well, just in case you are interested in trying for yourself.
In order to get blending, we need overlap of the images. Now correct me if I am wrong, but I don't think the remap filter supports the blending of two pixels.
So we will have to split the input video into two streams so that we can map a little more of the lens on the output canvas to create the overlap. To re-combine the two streams one stream can be merged with a specially crafted alpha map, and overlaid on the other stream.
This takes care of one seam between the two lenses, but not the other.
There are two seams between the cameras, because each lens is "joined" on both sides by the other lens. The way to correct for this would be to move the "front" camera to the middle of the output canvas, and split the back camera across what is left of the canvas, left and right. Then the video would look more like what ActionDirector or the Gear360 Manager outputs.
Kind regards,
Evert

Sounds like you're describing something similar to this: http://paulbourke.net/dome/dualfish2sphere/ (which completely ignores how to get this done w/ ffmpeg, of course). Only posting the link as a reference for others who may stumble upon this ticket :)

Hello,,
thank you for your work.
My script says -
</dev/null ffmpeg -i ./raw/$name -i ./maps/xmap_samsung_gear_2560x1280.pgm -i ./maps/ymap_samsung_gear_2560x1280.pgm -filter_complex remap ./stitich/"$new_name".stitich.mp4
python spatialmedia -i ./stitich/"$new_name".stitich.mp4 ./injected/"$new_name".stitich.injected.mp4
youtube-upload --title="$new_name" --description="$new_name" ./injected/"$new_name".stitich.injected.mp4
I am ok with hard bend,,but is there a way to align them better??
thank you
ryan

Hi there...
Have a look at:
https://github.com/evertvorster/dualfisheye2equirectangular_ffmpeg_remap
It's fast and well aligned.


feat: support calculate custom gpu resource

Why are these changes needed?

intel use some gpu resource key like gpu.intel.com/i915
some gpu scheduler like HAMi support set custom gpu resource key

The above two GPU settings cannot be counted in the desiredGPU field of the raycluster status.

So I added an environment variable CUSTOM_GPU_ACCELERATOR, using commas to separate the custom gpu resource key that needs to be counted.
Related issue number

Checks

[x] I've made sure the tests are passing.
Testing Strategy

[x] Unit tests
[ ] Manual tests
[ ] This PR is not tested :(

Closing due to inactivitiy


Wrong goal shown after space when focussing with ·

Prerequisites

[X] Put an X between the brackets on this line if you have done all of the following:

Checked that your issue isn't already filed.
Reduced the issue to a self-contained, reproducible test case.

Description
In the following example, in line 3, col 5, the focussed goal (p) should be displayed instead of the other one.
example (hp : p) (hq : q) : p ∧ q := by
  constructor
  · -- place cursor here

Version
4.0.0-nightly-2022-12-20

Seems to be fixed


Code Refactoring

Code Refactoring
Written code
As it is our first app, the code is written day by day and just straight forward. Maybe we should consider a code refactoring. The code is written in JS, C#, HTML and CSS and uses React Native.
Best outcome
Someone willing and able to refactor our code with an external view and expertise can refactor our code and we can learn as much as we can and have a clean code base for future enhancements.
Best thanks

@Raknison123 are you interested in helping in the .net or js part?

Code refactoring is low priority, and also atm not needed anymore. Close the issue now.


PHP 8 support

Can we merge this? Seems to be ok.

@Edujugon do you need help with this? Glad to help.

Please merge this @Edujugon

@Edujugon could you merge this please?

Any update on this PR?

No. I ended up making my own fork and referencing it in the project.

@Edujugon could you merge this please?

@Edujugon what is the status of this package?


Don't include unhealthy containers only to A records on DNS; but propagate even unhealthy records to the top level "client" section

Unhealthy container shouldn't be discoverable to other containers in the stack, but it itself should be able to discover others.

Tested with latest build from master - Dec 3:
Had a service - S1 which has containers stuck in "Initializing" state (because of incorrect health check).
Had another service - S2 in the same stack.
From containers of service -S2 , S1 does not resolve.
From containers of service -S1 , S2 resolves to containers in the stack.
Upgraded S1 and correct healthcheck parameters. After this I , From containers of service -S2 , S1 resolves.

Had a service - S1 which has containers stuck in "Initializing" state (because of incorrect health check).
Had another service - S2 in different stack which has a link to S1.
From containers of service -S2 , S1 does not resolve by link name.
Upgraded S1 and correct healthcheck parameters. After this I , From containers of service -S2 , S1 resolves.

@tobowers FYI, the DNS issue that you reported will be fixed in the next release.

Thank you!
On Fri, Dec 4, 2015 at 2:23 PM Denise<EMAIL_ADDRESS>wrote:

@tobowers https://github.com/tobowers FYI, the DNS issue that you
reported will be fixed in the next release.
—
Reply to this email directly or view it on GitHub
https://github.com/rancher/rancher/issues/2890#issuecomment-162044403.

Hi,
I would like to know what will be the final logic behind the DNS resolution when it comes to health checks.
Right now, it seems that container-level DNS records (e.g. stack_service_id.rancher.internal) are not available for instances that are in initializing/unhealthy states.
I believe the logic should be a bit different. If a service has health checks configured, then only the healthy onces are made available in the stack_service.rancher.internal round-robin DNS A record.
However, each container should still get its own A record independently from the health check failing or not. There are applications that require the DNS to be resolvable upon starting up, and that happens before the health check can transition to healthy.
Cheers,
Matteo

"If a service has health checks configured, then only the healthy instances are made available in the stack_service.rancher.internal round-robin DNS A record."

This is how it works today.
If service foo has foo_1 healthy and foo_2 unhealthy, service foo is resolvable and the resolution would be the foo_1 container.

However, each container should still get its own A record independently from the health check failing or not. There are applications that require the DNS to be resolvable upon starting up, and that happens before the health check can transition to healthy.

When service foo is still in initializing state, it can still resolve other services in Rancher, but not itself. This should get fixed. I've opened up this issue for it. https://github.com/rancher/rancher/issues/3576


Angular CLI does not apply custom webpack loader

Angular CLI does not apply custom webpack loader
I define custom webpack and add a custom loader for ts or html files but loader transformation does not apply on output.
it seems that Angular CLI uses its own mechanism for reading files.
https://github.com/angular/angular-cli/blob/e8e832e5a8b8e0311725bcdd60b6990e6d6c0236/packages/ngtools/webpack/src/compiler_host.ts#L182
Sample repository: https://github.com/abadakhshan/test-custom-loader

Duplicate of https://github.com/angular/angular-cli/issues/16544

What is the alternative solution to this problem?
Is it possible that we have transformers for all files like we have for index.html?

The alternatives depend on what you are trying achieve with your "loader".

Hi @alan-agius4
I want to do some transformation on HTML files before angular compilition.
I use this approache to apply Html template merging

You need to disable directTemplateLoading of the angularCompilerPlugin via a custom builder.
See http://github.com/angular/angular-cli/issues/15861 for some more context.
Note: this approach is not supported by the Angular tooling team.


more categories and checkers

I have a list with more checker services for example for DNS, IP, mail and other things.
Will fill this issue later today.
DNS / IP

[ ] http://bgp.he.net/
[ ] http://ipv6-test.com/validate.php
[ ] http://www.dnsstuff.com/tools
[ ] http://www.ipvoid.com/
[ ] https://dnschecker.org/
[ ] https://ip6.nl/
[ ] https://mxtoolbox.com/SuperTool.aspx
[ ] https://tools.keycdn.com/
[ ] https://www.ultratools.com/

browsers

[ ] http://browsershots.org/
[ ] https://saucelabs.com/
[ ] https://testingbot.com/

email

[ ] http://previewmyemail.com/
[ ] http://verify-email.org/
[ ] http://www.emailreach.com/
[ ] http://www.verifyemailaddress.org/
[ ] https://email-checker.net/
[ ] https://hunter.io/email-verifier
[ ] https://litmus.com/email-testing
[ ] https://putsmail.com/
[ ] https://tools.verifyemailaddress.io/
[ ] https://www.campaignmonitor.com/pricing/
[ ] https://www.emailonacid.com/

URL

[ ] http://urlquery.net/
[ ] https://urlscan.io/

website performance

[ ] http://www.monitis.com/pageload/
[ ] http://yellowlab.tools
[ ] https://www.uptrends.com/tools/website-speed-test
[ ] https://www.webpagetest.org/

security

[ ] http://www.isithacked.com/
[ ] https://csp-evaluator.withgoogle.com/
[ ] https://hackertarget.com/drupal-security-scan/
[ ] https://hackertarget.com/wordpress-security-scan/
[ ] https://hackertarget.com/joomla-security-scan/
[ ] https://hackertarget.com/ip-tools/
[ ] https://report-uri.io/home/tools
[ ] https://ssldecoder.org/
[ ] https://www.magereport.com

Fantastic! Thanks! 👍

Assembled the first list without duplicates (URLs which are already in the readme).
Will split it into (new) categories in the initial comment in the next days, evaluate and add additional information (description, free / paid) and prepare a few PRs in the next days.

Fantastic 👍 thanks so much for the work!

Sorry for the late response. Split it into the first categories.
What do you think? Does it look good so far, how would you categorise them? I am open for any opinions.
Will add further details (free / paid, description) in the next days and try to split it into better categories or find better category names.

@DanielRuf they look good to me! Thanks for such an awesome list 👍  it's much appreciated.

Sorry for the late response. Added the prive information. The descriptions are next. And I could have some more final URLs.
Then we can decide which should be added as many provide the same features.

@DanielRuf no worries about the late responses, in your own time :)
As for providing the same features, I'm not overly fussed if some provide the same features - lots of services out there do!

Consider adding: https://testmysite.withgoogle.com/intl/en-gb new kid on the block

@renatonascalves oh, nice! Didn't know about that one, I can add it, or you're welcome to put a PR in if you want to get that sweet sweet contributor goodness :)

It's a brand new service from Google, but really interesting. Specially to "sell" to clients the importance of performance. Gonna send  a PR.
Thanks for considering! :)

Uses webpagetest. Lighthouse and sitespeed.io might be useful too if they are not yet in the list. I'll try to make some PRs this weekend.

@DanielRuf thank you so much for all of these! <3

@Brunty you are welcome!
All are now in the readme. Improvements regarding the descriptions are very welcome. Also if some tools may be duplicate and removed (better to have more in some cases as many have some rate limits).
Closing this issue as all PRs are merged.


Today widget is missing bottom text about how many more articles there are

False alarm. The text is there.


Dot Jumping

Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes:  #643

Type of change

[x] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[x] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[x] This change requires a documentation update

Checklist:

[x] I have made this from my own
[ ] I have taken help from some online resourses and mentioned in PR
[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] My changes generate no new warnings

ATTACH SCREEN-SHOTS / DEPLOYMENT LINK

https://deploy-preview-650--amazing-css-effects.netlify.app/dot jumping game/
update Style_links.json

done !!

@VidhiBhatt01 @DEEPALI-SUK @arpit456jain
https://github.com/arpit456jain/Amazing-Css-Effects/pull/652


Registry Preview displaying wrong key name

Microsoft PowerToys version
0.69.0
Installation method
PowerToys auto-update
Running as admin
None
Area(s) with issue?
Registry Preview
Steps to reproduce

I know many people say comments should be on thier own lines in reg files, but when you run the script shown in the image, it will ignore the comment and make changes in HKCR\.test not in HKCR\.test ;commen as the program says.
✔ Expected Behavior
Registry Preview should show the key as the text between the square brackets, not everything after the opening bracket minus the last character.
❌ Actual Behavior
Registry Preview suggests that changes will be made in the wrong key.
Other Software
No response

cc: @randyrants

Of course, the challenge here is that the brackets can also be within valid values or even escaped within the Key bracket themselves.  From all my research on the file structure the ; as a comment indicator was only ever expected as the first character, so yeah: this isn't currently supported and will take some time to code through.  Plus regression testing!

What does Regedit do with the sequence [HKCU\Test] ;test] ;comment?

Regedit ignores the comment, as it should, but I can't find anything in the docs that say comments should be expected/allowed there, so to me it's a coin toss.
As for finding the last ], that's not a problem.  The problem is trying to predict what is valid and what isn't.  Like in the second example you show above: is the key "[HKCU\T[est2]" and the comment ";test2] comment2" or is the key "[HKCU\T[est2] ;test2]" and the file borked because "comment2" isn't supposed to be there... most of the specs I've found expect people to write to the Registry via API and get REG files via Export, so there's not a lot of definitive rules to follow.
If this was to follow current Regedit behavior, the first [ and last ] as the key name no matter what's between them and ignores everything else on the like.  In the examples above, the two new keys are:
HKEY_CURRENT_USER\Test] ;test  HKEY_CURRENT_USER\T[est2] ;test2

@randyrants
So it is as I expected: Everything behind the last closing ] is treated as comment.
As we want to preview what will be written to Registry I think we should do it the same. As long as Regedit accepts a line it is okay. A wrong version here would be [\software\test] ;comment or [HKLM\Software\test ;comment.

Well, yeah: this is on my active "to be fixed" list, which is why I kept poking at it.  😄

This has been shipped for 0.70.0. Please updated to the latest release. Thank you.


How test a custom worker

I'm following the tutorial to write a custom worker http://machinezone.github.io/mzbench/workers/#how-to-write-a-worker, I created a new worker using tcp template using the command:
bin/mzbench new_worker --template tcp pingpong
To test this, I ran:
bin/mzbench run_local pingpong/examples/pingpong.erl
However, I'm getting an error:
pool1: Couldn't get module info for pingpong_worker
pool2: Couldn't get module info for pingpong_worker
I assume I'm missing the make_install command in pingpong/examples/pingpong.erl. However I'm not sure how to reference it to a local dir where my test worker is create (./pingpong) instead of a git repo:
{make_install, [{git, ""}, {branch, ""}, {dir, ""}]}

Hi,
you don't need make_install directive for run_local, but you need to run it from a worker folder so mzbench scripts could build and include necessary binaries from worker
it means in your case:
cd pingpong; ../bin/mzbench run_local example/pingpong.erl
you need make_install when you run it in non-local mode, error message is not really informative, sorry for that and thanks for your interest, feel free to ask any additional questions

Does my advise work for you?
If you have more questions don't hesitate to ask

+1 it worked, thanks


Add Class#rap?, which is equivalent to Ruby's Object#respond_to?

I think the shorter method name Class#rap? is better Ruby's #respond_to?.
If most people needs #responds_to?, I think just aliasing to it is sufficient.

@hachi8833 actually I think respond_to? is better because it's more clear about what it does. And I also think that just change the name to respond_to? will be good, because keeping both rap? and respond_to? violates Goby's one practice principle.

OK, I will rename the method 😄


refactor: Refactor Required in index.html

Description:
The code in index.html needs refactoring to improve readability for new developers. Adding comments will help them understand the structure better.
Reason for Refactor:
Clarity: The current HTML structure can be confusing for newcomers.
Documentation: There are minimal comments explaining the layout.
Specific Areas for Refactor:
File: index.html
Proposed Changes:
Simplify the HTML structure where possible.
Add comments to explain the purpose of key sections.
Benefits of the Refactor:
Enhances code readability and makes onboarding easier for new contributors.
Provides better documentation of the project structure.
Label:
refactor

i would like to work on this

can u assign me to this

Thank you for your interest, @shahzdvp.
I have assigned you #44 .
Let's give a chance to @DeathwingIN as well,
so that others can express their interest too.

@DeathwingIN you can work on this

Hey, @shahzdvp you can work on it, as @DeathwingIN in removed from the assignment.


I  think PR 1653 broke build for projects using remote theme

Description
I am generating GitHub pages referencing the Minimal Mistakes theme remotely, since about a hour ago my builds have failed because of the following error:
Your SCSS file assets/css/main.scss has an error on line 228: Undefined variable: "$gitlab-color".
This appears to coincide with a update that was done in this repo about an hour ago...

Yep - already worked that out... and fixed it. Is there a way to sign up
for notification of changes. I was in the middle of presentation on GitHub
pages (perfect timing) when this happened... :)
On 8 May 2018 at 12:20, Michael Rose<EMAIL_ADDRESS>wrote:

You have a link to your repo having the issue? I'm using the remote theme
to build the docs and all builds have worked fine since this PR.
My guess is you have a custom SCSS file that is overidding the theme's
files and is missing the $gitlab-color variable.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/mmistakes/minimal-mistakes/issues/1658#issuecomment-387459349,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AjcWuQTpqKHaHhH9mDyiBeK7t3ivQ-eiks5twcW_gaJpZM4T27rQ
.

You're best bet would be to star and "watch" this repro. GitHub will send you emails when commits are pushed so you'll know what's being worked on if you need to react to them due to having a custom build.

Also, if you want to lock what version of the theme you use vs. being on the bleeding edge of master you can do something like this in your _config.yml file:
remote_theme<EMAIL_ADDRESS>


stablehlo.sort not working correctly on Metal

What happened?
I'm calling things from Elixir/Nx, but the underlying MLIR module is the following:
module {
  func.func public @main(%arg0: tensor<6xi32>) -> tensor<6xi32> {
    %0 = "stablehlo.sort"(%arg0) <{dimension = 0 : i64, is_stable = false}> ({
    ^bb0(%arg1: tensor<i32>, %arg2: tensor<i32>):
      %1 = stablehlo.compare  LT, %arg1, %arg2,  NOTYPE : (tensor<i32>, tensor<i32>) -> tensor<i1>
      stablehlo.return %1 : tensor<i1>
    }) : (tensor<6xi32>) -> tensor<6xi32>
    return %0 : tensor<6xi32>
  }
}

Compiler flags for local-sync are:
flags = [
  "--iree-hal-target-backends=llvm-cpu",
  "--iree-input-type=stablehlo_xla",
  "--iree-execution-model=async-internal"
]

Compiler flags for metal are:
flags = [
  "--iree-hal-target-backends=metal-spirv",
  "--iree-input-type=stablehlo_xla",
  "--iree-execution-model=async-internal"
]

On metal, I get:
Nx.sort(Nx.tensor([16, 23, 42, 4, 8, 15]))
#Nx.Tensor<
  s32[6]
  NxIREE.Backend(metal://000000010000092e)
  [8, 16, 23, 23, 23, 42]
>

On local-sync:
Nx.sort(Nx.tensor([16, 23, 42, 4, 8, 15]))
#Nx.Tensor<
  s32[6]
  NxIREE.Backend(local-sync://)
  [4, 8, 15, 16, 23, 42]
>

Also, in the same vein, for local sync, NaNs sort as larger than everything else on local-sync:
iex(35)> Nx.sort(t)
#Nx.Tensor<
  f32[4]
  NxIREE.Backend(local-sync://)
  [-Inf, 0.0, Inf, NaN]
>
iex(36)> Nx.sort(t, direction: :desc)
#Nx.Tensor<
  f32[4]
  NxIREE.Backend(local-sync://)
  [NaN, Inf, 0.0, -Inf]
>

But on metal, they are sorting at the front in all cases:
iex(38)> Nx.sort(t)
#Nx.Tensor<
  f32[4]
  NxIREE.Backend(metal://000000010000092e)
  [NaN, -Inf, 0.0, Inf]
>
iex(39)> Nx.sort(t, direction: :desc)
#Nx.Tensor<
  f32[4]
  NxIREE.Backend(metal://000000010000092e)
  [NaN, Inf, 0.0, -Inf]
>

Steps to reproduce your issue
No response
What component(s) does this issue relate to?
No response
Version information
IREE tag used: candidate-20240822.993
Additional context
No response

Not sure why this would be failing, but I would put stablehlo.sort in the category of things that are only lightly tested and used in models most of the core team focuses on.
Brainstorming ways to improve test coverage:

Get continuous tests running on Metal again (need a mac runner, GitHub's free mac runners don't support Metal / using the GPU)
Check if the test here is still representative: https://github.com/iree-org/iree/blob/main/tests/e2e/stablehlo_ops/sort.mlir - it was passing on Metal at some point: https://github.com/iree-org/iree/blob/afe18d222e840644bf78f103fe584610c7c9d04c/tests/e2e/stablehlo_ops/CMakeLists.txt#L620
Import these upstream tests to iree-test-suites (see https://github.com/iree-org/iree-test-suites/issues/4): https://github.com/openxla/stablehlo/blob/e44958c8ac3178df0d69d46804960df8e92580b1/stablehlo/tests/ops_stablehlo.mlir#L2876-L2966 and https://github.com/openxla/stablehlo/blob/main/stablehlo/tests/interpret/sort.mlir , then run those tests on all backends


Recommended config file for 2022

I'm looking for recommended config file for small application, mainly mobile 3G devices, is there any place I can find these config examples? Sharp config file contains 50+ parameters and it's just too long to test manually (especially these quality settings which is really subjective) and I hope somebody already did this

This is a wide topic and most output-related settings are for the underlying image format libraries so this might be better suited to a more general discussion site such as StackOverflow.

This question would be closed on SO in nanosecond as 'too broad', thats why Im asking here
Could you please share just something that is a bit closer to recommended settings than nothing?

I'm glad you realise it's a broad topic. Perhaps you could narrow it down with a specific image, specific code that you've tried, and a specific set of expectations about the output.

Ive already narrowed it down to 'mobile web browsing'. Its implicitly lossy png+webp for small screens and slow internet speed. How can I narrow it further?


could not compile rustpython-vm.

E:\RustPython>cargo run
Compiling rustpython-vm v0.1.2 (E:\RustPython\vm)
error: Python compile error from Lib/python_builtins/_frozen_importlib.py: Got unexpected token '.' at line 1 column 1
--> vm\src\frozen.rs:21:18
|
21 |     ext_modules!(dir = "Lib/python_builtins/");
|                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: Python compile error from Lib/core_modules/copyreg.py: Got unexpected token '.' at line 1 column 1
--> vm\src\frozen.rs:27:22
|
27 |         ext_modules!(dir = "Lib/core_modules/");
|                      ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 2 previous errors
error: could not compile rustpython-vm.
To learn more, run the command again with --verbose.
E:\RustPython>

E:\RustPython>powershell scripts/symlinks-to-hardlinks.ps1
scripts/symlinks-to-hardlinks.ps1 : 无法加载文件 E:\RustPython\scripts\symlinks-to-hardlinks.ps1，因为在此系统上禁止运
行脚本。有关详细信息，请参阅 https:/go.microsoft.com/fwlink/?LinkID=135170 中的 about_Execution_Policies。
所在位置 行:1 字符: 1

scripts/symlinks-to-hardlinks.ps1

  + CategoryInfo          : SecurityError: (:) []，PSSecurityException
  + FullyQualifiedErrorId : UnauthorizedAccess

E:\RustPython>

Oh, I think the last one is a bug specifically for msys/mingw. I just pushed the branch fix-mingw, try checking that out and building it?

Oh, I think the last one is a bug specifically for msys/mingw. I just pushed the branch fix-mingw, try checking that out and building it?

I have try it
E:\RustPython>cargo run
Compiling rustpython-vm v0.1.2 (E:\RustPython\vm)
error[E0308]: mismatched types
--> vm\src\stdlib\os.rs:1458:49
|
1458 |     unsafe { suppress_iph!(libc::isatty(fd)) != 0 }
|                                                 ^ expected (), found integer
error[E0308]: mismatched types
--> vm\src\stdlib\msvcrt.rs:55:17
|
55 |     if flags == -1 {
|                 ^^ expected (), found integer
error[E0308]: mismatched types
--> vm\src\stdlib\msvcrt.rs:58:12
|
58 |         Ok(flags)
|            ^^^^^ expected i32, found ()
error[E0308]: mismatched types
--> vm\src\stdlib\msvcrt.rs:68:15
|
68 |     if ret == -1 {
|               ^^ expected (), found integer
error[E0308]: mismatched types
--> vm\src\stdlib\msvcrt.rs:71:12
|
71 |         Ok(ret)
|            ^^^ expected i32, found ()
error: aborting due to 5 previous errors
For more information about this error, try rustc --explain E0308.
error: could not compile rustpython-vm.
To learn more, run the command again with --verbose.
E:\RustPython>git branch -a

fix-mingw
master
remotes/origin/HEAD -> origin/master
remotes/origin/coolreader18/_pyio-_io
remotes/origin/coolreader18/buildtime-sys-path
remotes/origin/coolreader18/common-crate
remotes/origin/coolreader18/constant-strings
remotes/origin/coolreader18/ctx-rust-classes
remotes/origin/coolreader18/pyimpl-on-trait
remotes/origin/coolreader18/use-vm_class
remotes/origin/coolreader18/wasm-_thread
remotes/origin/coolreader18/wasm-jsvalue
remotes/origin/cpython-unittest-guideline
remotes/origin/delete-snippets-pow
remotes/origin/dev-opt-level
remotes/origin/fix-deployment-again-test
remotes/origin/fix-mingw
remotes/origin/framestack
remotes/origin/function_attributes
remotes/origin/master
remotes/origin/parent_payload
remotes/origin/readme-stdlib
remotes/origin/redox-release
remotes/origin/release
remotes/origin/stack-size-calculation
remotes/origin/test-deployment
remotes/origin/unittest-lib
remotes/origin/wasm-output

E:\RustPython>

Oh, whoops, that was my bad. Try pulling and building again.

Oh, whoops, that was my bad. Try pulling and building again.
E:\RustPython>cargo run
Compiling rustpython-vm v0.1.2 (E:\RustPython\vm)
Compiling rustpython v0.1.2 (E:\RustPython)
Finished dev [unoptimized + debuginfo] target(s) in 2m 47s
Running target\debug\rustpython.exe

thread 'main' has overflowed its stack
error: process didn't exit successfully: target\debug\rustpython.exe (exit code: 0xc00000fd, STATUS_STACK_OVERFLOW)
E:\RustPython>

Oh, try pulling again or just running with --release. That's fixed on the current master

Oh, try pulling again or just running with --release. That's fixed on the current master

successed

Thanks for bringing this to my attention and being patient working through this; it's always good to work out kinks the onboarding/new contributor experience :grin:


[HELP] FFI compatiblity issues

Description
Backgound
I'm porting Rust libstd to NuttX, and I've run into a problem with FFI.
Please check the early work in progress: https://github.com/apache/nuttx-apps/pull/2487
For Rust, the libstd is split into two parts: libcore and libstd.
The libcore is a minimal runtime that can be used on bare metal systems,
and it doesn't depend on any OS-specific functionality. The libstd,
on the other hand, depends on the OS-specific functionality, such as
threading, networking, etc.
libstd uses libc for FFI, and them usually shipped as static libraray.
And I've run into a problem with that.
Problem
NuttX is highly configurable, the good part of it is that you can disable
anything you don't need, but the bad part is that you can't assume anything
about the system. For example, the size of complex types like struct timespec
can be different:
https://github.com/apache/nuttx/blob/f7adb52c8bafd3a242af4c80e27b64c534553ae5/include/time.h#L113-L117
The time_t type can be 32 or 64 bits, and the struct timespec can be
8 or 16 bytes. This is a problem for Rust, because it's hard to catch this at compile time.
And for libc, there are many complex types will be used in both Rust side and C side,
for current implmentation of libc crate, they defiend all of these types again with #[repr(C)],
which means that they have the same layout as in C:
https://github.com/no1wudi/libc/blob/b395ec66982ae160dba1d7061c51311f32052633/src/unix/nuttx/mod.rs#L32-L56
Maybe for other OS, the data definitons are stable enough, but for NuttX, it's not.
For example, these data types are used in libc crate:
https://github.com/apache/nuttx/blob/f7adb52c8bafd3a242af4c80e27b64c534553ae5/include/pthread.h#L221-L243
It's hard to map CONFIG_SCHED_SPORADIC and CONFIG_SMP and mores one by one in Rust side, espcially in a cross-compiling environment.
And full list of data types used in libc crate can be found here:
https://github.com/no1wudi/libc/blob/libc-0.2/src/unix/nuttx/mod.rs
Possible Solutions
1. Reserving space in Rust side for all possible data types
This is the most simple solution, but it's not very elegant. Many strucutres can be used as opaue data blobs in Rust side,
they don't need to be defined excatly same as in C side, just keepping the sizse of them is enough, for example:
https://github.com/no1wudi/libc/blob/b395ec66982ae160dba1d7061c51311f32052633/src/unix/nuttx/mod.rs#L79-L81
The drawback of this solution:

Waste memory space, especially for embedded systems.
Hard to maintain, if the data type is changed in C side, and exceeeding the reserved size, it will cause undefined behavior.

2. Mapping all possible conigurations in Rust side
The drawback of this solution:

It's hard to maintain the configs in both Rust and NuttX side, or other lanuages in the future.
The libstd and libcore must be build from source code each time.

3. Isolate the exported data types from NuttX
Do not use the libc data typs directly in NuttX intenral if any funtionality is conigurable, instead, define a new data type for it.
The drwa back of this solution:

It's a larage work to change all the exported data types from NuttX.

4. Let Rust runtime only avaliable with specific configurations
For example, add a special config like CONFIG_RUST_RUNTIME in NuttX, and let it depenends on all the configurations that Rust runtime needs and match the data types with libc crate:
config RUST_RUNTIME
    bool "Enable Rust Runtime"
    depends on !ARCH_FPU
    depends on SYSTEM_TIME64
    depends on ANYOTHER_ESSENTIAL_CONFIGS

Discussion
I prefer the solution 4, but it's less flexible if you do not want to use full feaure of Rust libstd.
Any sugestions are welcome!
Verification

[X] I have verified before submitting the report.

@lupyuen could you look at this issue?

Hi @no1wudi thanks for the interesting question! Sorry I don't strong opinions about this, but here's my gut feel:
Solution 1: Reserving space in Rust side for all possible data types
This approach says that Rust will reserve sufficient Struct Space to fit the largest possible Struct Size (of that specific struct, across all platforms). (Like this)
I agree with you: Every byte is precious for Embedded Apps, so I don't think NuttX Community will accept this.
Solution 2: Mapping all possible configurations in Rust side
This approach says that every possible Data Type in C, across all platforms, will be mapped to the equivalent Data Type in Rust. (Sounds like bindgen, see below)
I agree with you, this is hard to maintain. And it introduces extra overheads into the build process.
Solution 3: Isolate the exported data types from NuttX
This sounds like we're creating Wrapper Types, hiding a C Data Type inside a Rust Data Type. This will be difficult to maintain, and might impact the runtime performance.
Solution 4: Rust runtime is only supported for specific configurations
This approach says that Rust will support only specific NuttX Configurations (e.g. !ARCH_FPU && SYSTEM_TIME64). Rust Data Types will be matched to only those specific C Data Types that we support. (Hope I understand this correctly)
As mentioned, it's less flexible and we might not allow the full functionality of Rust Standard Library. But it seems adequate for now, and I agree with this approach.
I'm curious about this potential solution...
Solution 5: Use bindgen to generate Rust Types at Compile Time
We could run bindgen on all the NuttX Header Files (including specific configs like !ARCH_FPU && SYSTEM_TIME64). This will produce the equivalent Rust Data Types for every C Data Type. But the build will get complicated. And I'm not sure if a Rust Standard Library will allow bindgen internally?
I think we can proceed with Solution 4, and maybe later evolve to Solution 5. Hopefully better tools will emerge.
Here's an example: LVGL Graphics Library has a similar problem of supporting multiple embedded platforms with different type sizes. They solve it by running bindgen to generate Custom Rust Bindings for each embedded platform: https://github.com/lvgl/lv_binding_rust
Further Research
This problem might be common to any Embedded OS with POSIX? Perhaps we could do some research and understand how they handle it:

Rustix Wrapper for POSIX
Zephyr OS
Rust for Linux Kernel (does it use bindgen?)
(Maybe) ESP32 with Rust Standard Library

Hi @acassis wonder if you have anything to add?

@lupyuen I also don't have strong opinion too! I agree with you Solution 4 could be an initial solution until we get Solution 5 working.

@lupyuen @acassis  Thanks for your feedback!
In my opinion, bindgen is very suitable for further package since libstd and libc only provide the standard library, for the OS specific function, such as SPI/IIC or many other device driver we can use these approache to create a crate that provide the NuttX spcific functions.
For the libstd inselfs, it don't need to interact with NuttX directly, but libc need, libstd built on top of the libc crate, if we use bindgen solution for libc, the entire libstd and libc need to be build from source with a configured NuttX source tree by a unstable option -Zbuild-std.
This means user must use a nighlty rust toolchain, which may be a problem for production environment.
So maybe we should combine Solution 1 and Solution 4 to create a relatively stable binary interface, that allow the libstd and libc without NuttX enviroment, follow the Rust way to deliver the libstd with prebuild library?
I can provide a patch to demonstrate the specific approach in a few days.

@no1wudi Thanks that sounds good!

if we use bindgen solution for libc, the entire libstd and libc need to be build from source with a configured NuttX source tree by a unstable option -Zbuild-std

Sorry I'm curious: Today Rust Apps won't compile for QEMU RISC-V 32-bit because it needs a Custom Target for rv32gc: https://lupyuen.github.io/articles/rust4
Will this still happen when we have implemented libstd for NuttX? I'm just wondering if we eventually need to recompile libstd anyway, since the NuttX Targets so different from the typical ones.

@lupyuen I can add it to the Rust side as https://github.com/rust-lang/rust/pull/127755 does in next patch

@no1wudi That's great thanks!

@lupyuen https://github.com/apache/nuttx/pull/13245 shows the structure and data type handling, can you take a look about it ?

https://github.com/rust-lang/libc/pull/3920

https://github.com/rust-lang/rust/pull/130595
Now I get the Rust app with std library support on my local machine, the size of the full library is around 240K, for a hello world example with println! is about 70K.
It's comparable to libcxx.

Thanks @no1wudi !! :-)
For me Solution 4 seems most reasonable, compatible, least invasive, easiest to implement and maintain - enabling Rust will also enable all required components necessary :-)
Solution 5 proposed by @lupyuen seems most versatile in the long term. When Solution 4 is ready then Solution 5 may be considered if it brings additional benefits.
Regarding the Rust Toolchain there are long discussions that I follow on the FreeBSD mailing lists. Linux in-kernel maintainer resigned. And there are strong oppositions (including myself) to include Rust into FreeBSD kernel / base at this point. The problem is unstable toolchain (moving target -> dependency nightmare) that needs to be built before building the OS and I guess we cannot skip it here in NuttX too. There must be a way to compile everything from the sources and do not depend on external binary toolchains (but binary toolchains are the option that saves time I know). If someone chooses to work with the Rust they must also follow the disadvantages of the solution (i.e. build the toolchain). Rust is not a solution that has advantages only as advertised (not yet maybe time will tell).
Regarding the Rust on RISC-V there are problems on FreeBSD too [1]. That comes from required ABI that has been set for FreeBSD 11 in the RISC-V Rust upstream and everyone now needs to hand build in the COMPAT11 (current - 4) which is not default. I work on FreeBSD 13 on my desktop,  14 is stable now (I have it on my laptop), 15 is the current / master branch, so any ABI that will be selected will cause pain. And the funny thing is one package librsvg-rust is required to build gtk3 and that propagates to half of the packages dependencies :D :D :D
I would be really cautious with this Rust stuff. Seems more like religion. From what I can see there are more problems (toolchain, unstable, abi problem) so far than advantages (i.e. memory safety).

[1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281600

@cederom Thanks for your information !!
Currently, the support for Rust is mainly for application development rather than NuttX kernel development, so there might be fewer issues, mainly focusing on ABI compatibility.
Regarding ABI compatibility issues, they are not unique to Rust. Currently, we are troubled by this problem. In a large project, we have many teams with different permissions, so some code exists as static libraries. Therefore, any changes involving configurations or public data structures require synchronization between different teams and recompilation of these static libraries.
The structures required by the Rust standard library are relatively few and are all defined by POSIX (we should not make too many additional modifications to POSIX definitions), so there is a chance to achieve ABI compatibility under specific configurations. Overall, Rust has its issues, but it should be suitable as a starting point for exploration as a language for application development.

I am unsure if this is the same issue as the one I had with NuttX: when using NuttX in kernel mode, it is always a pain when app ELFs built with one kernel config doesn't work with another. The reason is that the .a files in nuttx-export-x.y.z.tgz package vary with the kernel config file.
Whether this is an issue depends on how we want NuttX to be:

If we just want NuttX be an (invisbile) part of a single purpose embedded device, then likely it is not an issue.
If we want NuttX to be a base of an eco system where different software can work together, then it is an issue.

The issue isn't specific to the app programming language as it happens to C as well.

I am unsure if this is the same issue as the one I had with NuttX: when using NuttX in kernel mode, it is always a pain when app ELFs built with one kernel config doesn't work with another. The reason is that the .a files in nuttx-export-x.y.z.tgz package vary with the kernel config file.

I guess for kernel build on a more powerful platform, maybe many apps runs at same time so it's a challenge to rebuild all of them once any config or change occurred in kernel side.

Yes I also believe in NuttX as alternative to bigger OS like Linux or BSD or even Android as we get more and more powerful MCU / SoC at single $ at some point we will need to have an OS where people can "just" build a package, install it, and it should "just" work :-)