Crash on level load of Empty Room with base template

and I get an EXC_BAD_ACCESS with the following stack trace:
#0	0x000000010099e10c in Vector<FeatureSet::FeatureInfo>::size() const at /Users/thomas/Torque3D/Engine/source/core/util/tVector.h:565
#1	0x0000000100c0ad07 in FeatureSet::hasFeature(FeatureType const&, int) const at /Users/thomas/Torque3D/Engine/source/shaderGen/featureSet.cpp:102
#2	0x00000001009a548d in MatInstance::isInstanced() const at /Users/thomas/Torque3D/Engine/source/materials/matInstance.cpp:494
#3	0x0000000100b383e3 in PrePassMatInstanceHook::PrePassMatInstanceHook(MatInstance*, RenderPrePassMgr const*) at /Users/thomas/Torque3D/Engine/source/renderInstance/renderPrePassMgr.cpp:919
#4	0x0000000100b38555 in PrePassMatInstanceHook::PrePassMatInstanceHook(MatInstance*, RenderPrePassMgr const*) at /Users/thomas/Torque3D/Engine/source/renderInstance/renderPrePassMgr.cpp:897
#5	0x0000000100b19614 in RenderPrePassMgr::getPrePassMaterial(BaseMatInstance*) at /Users/thomas/Torque3D/Engine/source/renderInstance/renderPrePassMgr.h:216
#6	0x0000000100b35076 in RenderPrePassMgr::addElement(RenderInst*) at /Users/thomas/Torque3D/Engine/source/renderInstance/renderPrePassMgr.cpp:273
#7	0x0000000100b2d170 in fastdelegate::FastDelegate1<RenderInst*, void>::operator()(RenderInst*) const at /Users/thomas/Torque3D/Engine/source/core/util/FastDelegate.h:989
#8	0x0000000100b2a05f in Signal<void (RenderInst*)>::trigger(RenderInst*) at /Users/thomas/Torque3D/Engine/source/core/util/tSignal.h:668
#9	0x0000000100b29e36 in RenderPassManager::addInst(RenderInst*) at /Users/thomas/Torque3D/Engine/source/renderInstance/renderPassManager.cpp:209
#10	0x0000000100134c62 in GroundPlane::prepRenderImage(SceneRenderState*) at /Users/thomas/Torque3D/Engine/source/T3D/groundPlane.cpp:387
#11	0x0000000100b72e8f in SceneRenderState::renderObjects(SceneObject**, unsigned int) at /Users/thomas/Torque3D/Engine/source/scene/sceneRenderState.cpp:108
#12	0x0000000100b6373c in SceneManager::_renderScene(SceneRenderState*, unsigned int, SceneZoneSpace*, unsigned int) at /Users/thomas/Torque3D/Engine/source/scene/sceneManager.cpp:473
#13	0x0000000100b62ce3 in SceneManager::renderSceneNoLights(SceneRenderState*, unsigned int, SceneZoneSpace*, unsigned int) at /Users/thomas/Torque3D/Engine/source/scene/sceneManager.cpp:332
#14	0x0000000100b62832 in SceneManager::renderScene(SceneRenderState*, unsigned int, SceneZoneSpace*, unsigned int) at /Users/thomas/Torque3D/Engine/source/scene/sceneManager.cpp:304
#15	0x0000000100b61906 in SceneManager::renderScene(ScenePassType, unsigned int) at /Users/thomas/Torque3D/Engine/source/scene/sceneManager.cpp:183
#16	0x000000010012de41 in GameRenderWorld() at /Users/thomas/Torque3D/Engine/source/T3D/gameFunctions.cpp:424
#17	0x0000000100130595 in GameTSCtrl::renderWorld(RectI const&) at /Users/thomas/Torque3D/Engine/source/T3D/gameTSCtrl.cpp:71
#18	0x000000010064688a in GuiTSCtrl::_internalRender(RectI, RectI, Frustum&) at /Users/thomas/Torque3D/Engine/source/gui/3d/guiTSControl.cpp:429
#19	0x0000000100648c40 in GuiTSCtrl::onRender(Point2I, RectI const&) at /Users/thomas/Torque3D/Engine/source/gui/3d/guiTSControl.cpp:713
#20	0x0000000100130cc4 in GameTSCtrl::onRender(Point2I, RectI const&) at /Users/thomas/Torque3D/Engine/source/T3D/gameTSCtrl.cpp:170
#21	0x000000010079088c in GuiCanvas::renderFrame(bool, bool) at /Users/thomas/Torque3D/Engine/source/gui/core/guiCanvas.cpp:1857
#22	0x000000010078b4c1 in GuiCanvas::handlePaintEvent(unsigned int) at /Users/thomas/Torque3D/Engine/source/gui/core/guiCanvas.cpp:357
#23	0x000000010012a53b in fastdelegate::FastDelegate1<unsigned int, void>::operator()(unsigned int) const at /Users/thomas/Torque3D/Engine/source/core/util/FastDelegate.h:989
#24	0x000000010079ac50 in Signal<void (unsigned int)>::trigger(unsigned int) at /Users/thomas/Torque3D/Engine/source/core/util/tSignal.h:668
#25	0x000000010079abab in void Journal::Call<Signal<void (unsigned int)>, unsigned int>(Signal<void (unsigned int)>*, void (Signal<void (unsigned int)>::*)(unsigned int), unsigned int) at /Users/thomas/Torque3D/Engine/source/core/util/journal/journal.h:634
#26	0x000000010078fadc in JournaledSignal<void (unsigned int)>::trigger(unsigned int) at /Users/thomas/Torque3D/Engine/source/core/util/journal/journaledSignal.h:81
#27	0x000000010078fa8e in GuiCanvas::paint() at /Users/thomas/Torque3D/Engine/source/gui/core/guiCanvas.cpp:1587
#28	0x00000001000796c5 in fastdelegate::FastDelegate0<void>::operator()() const at /Users/thomas/Torque3D/Engine/source/core/util/FastDelegate.h:904
#29	0x0000000100de5247 in Signal<void ()>::trigger() at /Users/thomas/Torque3D/Engine/source/core/util/tSignal.h:650
#30	0x000000010046163b in Process::processEvents() at /Users/thomas/Torque3D/Engine/source/core/util/journal/process.cpp:99
#31	0x00000001002c2294 in StandardMainLoop::doMainLoop() at /Users/thomas/Torque3D/Engine/source/app/mainLoop.cpp:621
#32	0x000000010099ef71 in TorqueMain(int, char const**) at /Users/thomas/Torque3D/Engine/source/main/main.cpp:315
#33	0x0000000100ae54e2 in main at /Users/thomas/Torque3D/Engine/source/platformMac/macMain.mm:86

I'm running OS X 10.11.6 on an MacBook Pro (Retina, 15-inch, Late 2013) with 16GB of RAM and a NVIDIA GeForce GT 750M 2048 MB graphics card.
Relevant console.txt is also attached.

i assume that's empty template?

Yep!

empty template might be behind. I only worked on full template. Can you try that?

Yep - I just launched copied the game folder over from full template and it appears to have worked just fine!

@Areloch sorry that @rextimmy  and I didn't keep empty up to date w/ macos :(


close button bug

when I hitted the close app button on macOS I cannot open the app up again

I added that in the latest version under request, to make the close button hide the app instead of closing it, but the problem is that to show it again you need to hit the app button in the menu bar (the small blue button in the top bar there). This is exactly why I didn't want to make this change, since it's counterintuitive.

Perhaps a preference option is in order? It seems we’re stuck between two different breeds of counterintuitive, either accidentally quitting the app every few hours or having to remember the dock icon does nothing. Talking to the couple other people I know who use macs, it was a split opinion as to which was better. If it’s not too difficult to implement, I would say make it an option.

when I hitted the close app button on macOS I cannot open the app up again

Out of curiosity, are you aware that the app used to completely quit when you would press that button? It would not continue running in the background like many apps, i.e. Pages, do. The reason I asked about changing the behavior in the past was because I would accidentally quit it entirely and need to relaunch it, whereas now I just have to click the little icon up top to show it again.

Adding a preference for that sounds like the better idea, should be easy enough.

Okay, that makes sense. I wonder if putting it behind the Preferences window would be better, or if putting it under "connect automatically" would make more sense since people would see it and try what it does to figure out what's better.

I found out how to make it behave like you'd expect, so hitting the dock icon will show the window again. I just have to test that it doesn't break anything on Windows.

Fixed in v1.5.6.

thanks!

Excellent, thank you so much


ListItem tabulation selection and mouse hovering result in constant wavering

Problem description
When selected by tabbing and then hover by mouse ListItem element proceed wavering event after mouse go over.

Link to minimal working code that reproduces the issue
http://www.material-ui.com/#/components/list

Versions

Material-UI:
React:
Browser: chrome 59

I think that it's the expected behavior. Keyboard interactions take precedence over mouse interactions.

@oliviertassinari The point is that that sequence introduced wobbling. If you select ListItem only through tabbing the will no wobbling.

Yes, we use a pulsating UI when a button is focused by a keyboared interaction. That's not something we do with mouse focus based events.


use gdal to reproject the asset geometry instead of the asset bbox

closes #28
This PR handles dateline crossing assets by using GDAL to handle the reprojection and splitting of the geometry

Unfortunately this doesn't seem to properly solve this problem @vincentsarago
I've run the code in this PR on an image that crosses the anti-meridian, and I get an item that looks like this:
{
    "type": "Feature",
    "stac_version": "1.0.0",
    "id": "4096_0_10.0_01_-3_185",
    "properties": {
        "proj:epsg": 32601,
        "proj:geometry": {
            "type": "Polygon",
            "coordinates": [
                [
                    [
                        377120.0,
                        7618560.0
                    ],
                    [
                        377120.0,
                        7577600.0
                    ],
                    [
                        418080.0,
                        7577600.0
                    ],
                    [
                        418080.0,
                        7618560.0
                    ],
                    [
                        377120.0,
                        7618560.0
                    ]
                ]
            ]
        },
        "proj:bbox": [
            377120.0,
            7577600.0,
            418080.0,
            7618560.0
        ],
        "proj:shape": [
            4096,
            4096
        ],
        "proj:transform": [
            10.0,
            0.0,
            377120.0,
            0.0,
            -10.0,
            7618560.0,
            0.0,
            0.0,
            1.0
        ],
        "datetime": "2000-01-01T00:00:00Z"
    },
    "geometry": {
        "type": "Polygon",
        "coordinates": [
            [
                [
                    -179.0180999600879,
                    68.66685731991039
                ],
                [
                    -178.98557986959838,
                    68.29971948512099
                ],
                [
                    -179.97698264496904,
                    68.28494231541386
                ],
                [
<PHONE_NUMBER>5556775,
                    68.65180108822425
                ],
                [
                    180.0,
                    68.65225994557456
                ],
                [
                    180.0,
                    68.65225994554176
                ],
                [
                    180.0,
                    68.65225994454175
                ],
                [
                    -180.0,
                    68.65225994454175
                ],
                [
                    -180.0,
                    68.65225994554176
                ],
                [
                    -180.0,
                    68.65225994561013
                ],
                [
                    -179.0180999600879,
                    68.66685731991039
                ]
            ]
        ]
    },
    "links": [],
    "bbox": [
        -180.0,
        68.28494231541386,
        180.0,
        68.66685731991039
    ],
    "stac_extensions": [
        "https://stac-extensions.github.io/raster/v1.1.0/schema.json",
        "https://stac-extensions.github.io/projection/v1.0.0/schema.json",
        "https://stac-extensions.github.io/eo/v1.0.0/schema.json"
    ]
}

You can see here that the bbox still spans from -180 to +180 because the geometry still has entries of -180 and +180 in it.
Unfortunately I can't share the file I'm using, but I hope it will be possible to debug without it given that the item above has the proj extension so gives the original file co-ordinates.

@robintw can you privide the image?

@robintw thanks for the feedback,
Sadly this is an issue at GDAL level 😭
from rasterio import warp, features

bounds = [377120.0, 7577600.0, 418080.0, 7618560.0]

src_geom = {
    "type": "Polygon",
    "coordinates": [
        [
            [bounds[0], bounds[1]],
            [bounds[2], bounds[1]],
            [bounds[2], bounds[3]],
            [bounds[0], bounds[3]],
            [bounds[0], bounds[1]],
        ]
    ],
}
print("Transform Geometry from 32601 to 4326")
geom = warp.transform_geom("epsg:32601", "epsg:4326", src_geom)
print(geom)
print()
print("BBOX of the new geometry")
print(features.bounds(geom))
print()
>> Transform Geometry from 32601 to 4326
>> {'type': 'Polygon', 'coordinates': [[(-179.0180999600879, 68.66685731991039), (-178.98557986959838, 68.29971948512099), (-179.97698264496904, 68.28494231541386),<PHONE_NUMBER>5556775, 68.65180108822425), (180.0, 68.65225994557456), (180.0, 68.65225994554176), (180.0, 68.65225994454175), (-180.0, 68.65225994454175), (-180.0, 68.65225994554176), (-180.0, 68.65225994561013), (-179.0180999600879, 68.66685731991039)]]}

>> BBOX of the new geometry
>> (-180.0, 68.28494231541386, 180.0, 68.66685731991039)

print("Transform bounds from 32601 to 4326")
print(warp.transform_bounds("epsg:32601", "epsg:4326", *bounds))
>> Transform bounds from 32601 to 4326
>><PHONE_NUMBER>5556775, 68.28494231541386, -178.98557986959838, 68.66685731991039)

I was hoping that using rasterio. warp.transform_geom to handle everything but it seems not 😭. That's said The test I added work for other projection
bounds = [570585.0, 5612085.0, 803115.0, 5847615.0]

src_geom = {
    "type": "Polygon",
    "coordinates": [
        [
            [bounds[0], bounds[1]],
            [bounds[2], bounds[1]],
            [bounds[2], bounds[3]],
            [bounds[0], bounds[3]],
            [bounds[0], bounds[1]],
        ]
    ],
}
print("Transform Geometry from 32660 to 4326")
geom = warp.transform_geom("epsg:32660", "epsg:4326", src_geom)
print(geom)

>> Transform Geometry from 32660 to 4326
>> {'type': 'MultiPolygon', 'coordinates': [[[(177.9985713516777, 50.65633608225091),<PHONE_NUMBER>7400888, 52.773743003086366), (180.0, 52.740407675064105), (180.0, 52.74040767501424), (180.0, 50.62198104614029),<PHONE_NUMBER>516777, 50.65633608225091)]], [[(-178.51382291899003, 52.693427503007605), (-178.71784776800322, 50.58185346765347), (-180.0, 50.62198104608874), (-180.0, 50.62198104609561), (-180.0, 52.74040767501347), (-178.51382291899003, 52.693427503007605)]]]}

@robintw might be worth to open an issue on gdal 🤷
// test_32601.geojson
{"type":"Polygon","coordinates":[[[377120,7577600],[418080,7577600],[418080,7618560],[377120,7618560],[377120,7577600]]]}

ogr2ogr -f GeoJSON -s_srs epsg:32601 -t_srs epsg:4326 out_4326.geojson test_32601.geojson

// out_4326.geojson
{ "type": "Polygon", "coordinates": [ [ [ -179.018099960087909, 68.666857319910392 ], [ -178.985579869598382, 68.299719485120988 ], [ -179.976982644969041, 68.284942315413858 ], [<PHONE_NUMBER>55567753, 68.651801088224246 ], [ 180.0, 68.652259945574556 ], [ 180.0, 68.652259945541758 ], [ 180.0, 68.652259944541754 ], [ -180.0, 68.652259944541754 ], [ -180.0, 68.652259945541758 ], [ -180.0, 68.652259945610126 ], [ -179.018099960087909, 68.666857319910392 ] ] ] }

@robintw I'm going to merge this PR, I'm not quite sure it doesn't work for your file 😭 but to me it seems this PR is doing its best to handle the general issue


Integrate all

Fixes clang build on github workflow

add -lc++ to CMAKE_EXE_LINKER_FLAGS
remove workaround in FindCppcoroCoroutine.cmake
add noexcept specifier required by clang-12

see https://github.com/Garcia6l20/cppcoro/actions/runs/301813922

Thank you so much for your work @Garcia6l20 , this is great.
The integrate_all branch here has the purpose to test whether everything combined works as expected. But because everything is mixed in integrate_all, we cannot create nice pull requests for Lewis Baker from integrate_all. Could you please create pull requests towards the topic branches?
So the changes in .github/workflows/cmake.yml should go into https://github.com/andreasbuhr/cppcoro/tree/add_github_actions
The changes in  cmake/FindCppcoroCoroutines.cmake should go into https://github.com/andreasbuhr/cppcoro/tree/add_cmake_support
And the changes in include/cppcoro/generator.hpp are not needed any more, as Lewis just merged https://github.com/lewissbaker/cppcoro/pull/156 . I will merge it into the branches on andreasbuhr/cppcoro soon.

Yes I will, thanks to you for managing all of this !
However I'm a bit scared that I'll not be able to propose the io_ring version with github actions working.
Ubuntu's kenel is < 5.6 so IO operation will not work.
I also tried to use a workflow based on containers but it looks like io_ring operations result in Operation not permitted on docker.
Do you know If someone succeeded in IO implementation using something more usual that io_ring ? Maybe epoll ?

Thanks for bringing my attention to the problem of testing an io_uring backend on Ubuntu. I was not aware of that problem. There is this epoll-backend which we could brush up for a new pull request: https://github.com/lewissbaker/cppcoro/pull/64. Still, it would be nice to have support for both backends in cppcoro.

I just installed Ubuntu 20.10 beta. It has the 5.8.0 kernel. So as soon as Ubuntu 20.10 is widely available, there is a platform for testing. Unfortunately, Ubuntu 20.10 is not an LTS, so let's see whether we'll get it in Github Actions.


sudo make fails compiling ModSecurity

Describe the bug
sudo make fails compiling ModSecurity 3(latest) on Debian 11 + nginx 1.24.0
Logs and dumps
Omake[2]: Entering directory '/opt/ModSecurity/examples/multiprocess_c'
gcc -DHAVE_CONFIG_H -I. -I../../src    -I../../headers -I../..  -g -O2 -MT multi-multi.o -MD -MP -MF .deps/multi-multi.Tpo -c -o multi-multi.o test -f 'multi.c' || echo './'multi.c
mv -f .deps/multi-multi.Tpo .deps/multi-multi.Po
/bin/bash ../../libtool  --tag=CC   --mode=link gcc -I../../headers -I../..  -g -O2 -L../../src/.libs/ -L/usr/lib/x86_64-linux-gnu  -lmodsecurity -lpthread -lm -lstdc++    -L/usr/lib/x86_64-linux-gnu   -o multi multi-multi.o    -lrt
libtool: link: gcc -I../../headers -I../.. -g -O2 -o .libs/multi multi-multi.o  -L../../src/.libs/ -L/usr/lib/x86_64-linux-gnu /opt/ModSecurity/src/.libs/libmodsecurity.so -lpthread -lm -lstdc++ -lrt -Wl,-rpath -Wl,/usr/local/modsecurity/lib
/usr/bin/ld: /opt/ModSecurity/src/.libs/libmodsecurity.so: undefined reference to curl_global_init@CURL_OPENSSL_4' /usr/bin/ld: /opt/ModSecurity/src/.libs/libmodsecurity.so: undefined reference to curl_easy_perform@CURL_OPENSSL_4'
/usr/bin/ld: /opt/ModSecurity/src/.libs/libmodsecurity.so: undefined reference to curl_slist_free_all@CURL_OPENSSL_4' /usr/bin/ld: /opt/ModSecurity/src/.libs/libmodsecurity.so: undefined reference to curl_easy_strerror@CURL_OPENSSL_4'
/usr/bin/ld: /opt/ModSecurity/src/.libs/libmodsecurity.so: undefined reference to curl_easy_setopt@CURL_OPENSSL_4' /usr/bin/ld: /opt/ModSecurity/src/.libs/libmodsecurity.so: undefined reference to curl_easy_init@CURL_OPENSSL_4'
/usr/bin/ld: /opt/ModSecurity/src/.libs/libmodsecurity.so: undefined reference to curl_slist_append@CURL_OPENSSL_4' /usr/bin/ld: /opt/ModSecurity/src/.libs/libmodsecurity.so: undefined reference to curl_easy_cleanup@CURL_OPENSSL_4'
/usr/bin/ld: /opt/ModSecurity/src/.libs/libmodsecurity.so: undefined reference to `curl_global_cleanup@CURL_OPENSSL_4'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:506: multi] Error 1
make[2]: Leaving directory '/opt/ModSecurity/examples/multiprocess_c'
make[1]: *** [Makefile:553: all-recursive] Error 1
make[1]: Leaving directory '/opt/ModSecurity/examples'
make: *** [Makefile:1049: all-recursive] Error 1
Could you please help with this? I'm not able to install ModSecurity at all.

I assume you need to install these packages:
sudo apt install curl libcurl3-gnutls:amd64 libcurl4:amd64 libcurl4-gnutls-dev:amd64

On my Debian 11 (ModSecurity) build machine has these packages, and those are enough.
Btw you could try the pre-compiled packages from here.

I've tried installing those packages but that doesn't help either, I get the same error.

If you have installed package libcurl4-openssl-dev, try to remove it.

I then tried the instructions on your link, step by step, but when simulating an attack, the response is as usual, response 200, like it never detected any attack using the curl -v -H "User-Agent: Nikto" 'http://localhost' line

Is there any new lines in your error.log? (Did you add the severity info to your error.log?)
What is the SecRuleEngine value in your modsecurity.conf file?

Okay so I managed to remove libcurl4-openssl-dev

Cool.

Unfortunately, I can't get pass the sudo make, so there's no modsecurity.conf or modesecurity folder in /etc/nginx ....

Without that file it will hard to wake up the WAF :smiley:.
You should copy the file from the source tree, it's there with name modsecurity.conf-recommended - see the original file.
You should include it. Also you have to install a rule set - I suggest Core Rule Set, which is also available from the mentioned repository above.

Fine.
Did you include the file /etc/nginx/modsecurity_includes.conf?
You should put that into your nginx.conf, for eg.:
http {
        ...
        modsecurity_rules_file /etc/nginx/modsecurity_includes.conf;

also do not forget to turn on the feature with:
        modsecurity on;

You can do that in same place or if you want to apply that only for specific sites, then you can put it only there, eg:
server {
        server_name ...;
        ....
        modsecurity on;

Please do not forget to add minimum severity to your error.log:
        error_log /var/log/nginx/error.log info;

After these modifications, what do you see in your log with the request above?
Note, that in file /usr/share/modsecurity-crs/owasp-crs.load you must replace the IncludeOptional to Include.

Is there still an issue here?
As has been pointed out by @airween , the error messages in the original posting appear to be caused by missing dependencies. If you believe you have the necessary dependencies, the output of the ./configure step should show that.


Bump versions of actions depended on by release

coverage: 99.577%. remained the same
when pulling abfce4b1559f0f316656d2fa98350d44deeba620 on update-release
into 5f6c85883eadeed7a628297cfd60c1d8ec1f5912 on main.


How to emulate lambda calculus?

What is your problem?
I cannot emulate lambda calculus, I would say due to a lack of support for scopes in MeTTa.
How to reproduce your problem?
Run the following code
(= ((λ $x $f) $y) (let $x $y $f))
!((λ $x ($x $x)) (λ $y ($y $y)))

What do you get?
It outputs [].
What would you want to get instead?
It should never halt, as per the mockingbird infinite loop (M M).
Why do you think that is?
The problem comes the fact that
((λ $x ($x $x)) (λ $y ($y $y)))

reduces to
(let $x (λ $y ($y $y)) ($x $x))

which reduces to
((λ $y ($y $y)) (λ $y ($y $y)))

which finally reduces to
(let $y (λ $y ($y $y)) ($y $y))

which fails because $y does not unify with (λ $y ($y $y)).
You can see that this is caused by the absence of alpha-conversion, because λ is not treated as a scope.
What other questions do you have?
Do we need scopes in MeTTa?
If the answer is no, then how to emulate lambda calculus in MeTTa?

This is solved by sealing the arguments in respective scopes, which would split $y in the final reduction step (disallowing non-local unification, but also enabling the individual reductions).

There may be a workaround with a drawname grounded function that gives you a fresh variable to use in the beta reduction.

Oh, actually that doesn't work either in my test case :-(, maybe you meant something else...

@Adam-Vandervorst, would you mind showing how the solution using seal would look like?

(= ((λ $x $f) $y) (let $x $y $f)))

!((seal (, $x) (λ $x ($x $x))) ((seal (, $y) (λ $y ($y $y))))

(let $x (λ $y1 ($y1 $y1)) ($x $x))

((λ $y ($y $y)) (λ $y1 ($y1 $y1)))

(let $y (λ $y1 ($y1 $y1)) ($y $y))

...

Basically (seal (, v1 v2 ... vn) <body>) says "when you're evaluating body, vk will not be accessible outside of " i.e. it makes the variables anonymous.

The English is the desired requirement for seal, yes!

I see... You've automatically alpha-converted $y to $y1 to avoid name collision but it's not super clear how.  I suppose what you meant was more something like
((seal (, $x) (λ $x ($x $x))) ((seal (, $y) (λ $y ($y $y))))

rewrites into
(seal (, $x) (let $x (seal (, $y) (λ $y ($y $y))) ($x $x)))

which rewrites into (note how (seal (, $x) ...) will disappear since $x no longer appears in the body),
((seal (, $y) (λ $y ($y $y))) (seal (, $y) (λ $y ($y $y))))

which is OK because $y from the first mockingbird operator is sealed from the $y from the second one.  If we keep going we get
(seal (, $y) (let $y (seal (, $y) (λ $y ($y $y))) ($y $y)))

Then MeTTa needs to unify $y with (seal (, $y) (λ $y ($y $y))) which it can because $y in the right term is sealed.
But I wonder how is seal different than a regular scope?

@ngeiswei , thanks for raising it again. We already had a workaround for this in old Rust interpreter thus your code will work correctly with minimal MeTTa disabled. In minimal MeTTa let is implemented using unify thus this issue raises again. But I think we need to implement a long term solution this time.
I like your suggestion:

Actually I think it does work! But the code should be
(= ((λ $x $f) $y) (let ($νx $νf) (alpha-convert ($x $f)) (let $νx $y $νf)))

i.e. no need to alpha-convert $y.

It should work exactly as previous let workaround, but adding alpha-convert allows us introducing scoping in any context we need it. I will try adding quick implementation to check whether it works as expected.

(= ((λ $x $f) $y) (let $x $y $f)))

!((seal (, $x) (λ $x ($x $x))) ((seal (, $y) (λ $y ($y $y))))

(let $x (λ $y1 ($y1 $y1)) ($x $x))

((λ $y ($y $y)) (λ $y1 ($y1 $y1)))

(let $y (λ $y1 ($y1 $y1)) ($y $y))

...

Basically (seal (, v1 v2 ... vn) <body>) says "when you're evaluating body, vk will not be accessible outside of " i.e. it makes the variables anonymous.

In hyperon-experimental all variables inside λ are anonymous already. One can say each call has body variables sealed. Thus in fact ((λ $y ($y $y)) (λ $y ($y $y))) is unified with (= ((λ $x#1 $f#1) $y#1) (let $x#1 $y#1 $f#1)). But after unification we have { $y == $x#1 } and finally we have (let $y (λ $y ($y $y)) ($y $y)).
But we could use sealing inside let I believe in a way which is suggested by  @ngeiswei:
(= ((λ $x $f) $y) (let ($νx $νf) (seal (, $x) ($x $f)) (let $νx $y $νf)))

It indeed works with the old MeTTa.  @vsbogd, could briefly explain why?  What is the workaround in question?

@ngeiswei it should work in a following form on the branch from https://github.com/trueagi-io/hyperon-experimental/pull/609:
(= ((λ $x $f) $y) (let ($νx $νf) (sealed ($x) ($x $f)) (let $νx $y $νf)))

We can implement it as sealed which generates random variable names and replaces variables or as alpha-conversion + new-var which decouples generating var and variable renaming. I am not sure what is the best option.

I don't know either.  Somewhat perhaps related, after reading @leithaus Transparent MeTTa proposals, I wonder if we wouldn't want to replace variables by a quotation construct @ which would allow to give variables structure.  That way alpha-conversion could be implemented in pure MeTTa.  There are other use cases, for instance I wanted to have two types of variables in the backward chainer, one for program holes, one for program variables (like in Idris, ?x is a hole while x is a variable).
If we don't want to depart from $ as variable indicator, then $ could simply be used on expressions such $(x y), etc.

@ngeiswei it should work in a following form on the branch from https://github.com/trueagi-io/hyperon-experimental/pull/609

Wow, I confirm that it solves the problem on my end.

SICP and combinator logic  examples also suffer from this. Possible fix which uses non-merged seal is in my private branch https://github.com/vsbogd/metta-examples/tree/minimal-seal-patch


CHAOS-1668: recovers deleted file

Will not edit this further, but need to recover some other linked files that were also deleted. These were deleted by mistake during Smriti's reorg of the left nav.

Please check the Execution Link of the Pipeline for the Website Draft URL. This is located in the Preview Step and also is available in #hdh_alerts. E.g Website Draft URL: https://unique-id--harness-developer.netlify.app


Add doc examples of sorting priority

No current documentation on sort_priority
Needs documentation and also examples of sorting that matches
Current (nonexistent section) https://github.com/alanvardy/tod/blob/main/docs/configuration.md#sortvalue

Fixed, the table of contents didn't have the underscores


Enable check style for the project

Body
This is the issue to track the progress of check-style enablement for all modules.
If you want to take over some of the modules, please feel free to leave a comment here. And thanks for all your contribution!  :smiley:
Only the first level of sub-modules are listed here. If you feel that some of the modules(eg. streampipes-extensions) are heavy, please continue to split them into smaller tasks in this issue.

[x] #830
[x] #832
[x] #833
[x] #834
[x] streampipes-service-discovery-api https://github.com/apache/streampipes/pull/845
[ ] streampipes-logging https://github.com/apache/streampipes/pull/847
[ ] streampipes-model-shared https://github.com/apache/streampipes/pull/847
[ ] streampipes-vocabulary https://github.com/apache/streampipes/pull/847
[ ] streampipes-model https://github.com/apache/streampipes/pull/847
[ ] streampipes-model-client https://github.com/apache/streampipes/pull/847
[ ] streampipes-test-utils https://github.com/apache/streampipes/pull/847
[ ] streampipes-serializers-json https://github.com/apache/streampipes/pull/847
[x] streampipes-service-discovery-consul https://github.com/apache/streampipes/pull/845
[x] streampipes-service-discovery https://github.com/apache/streampipes/pull/845
[x] streampipes-service-base https://github.com/apache/streampipes/pull/845
[ ] streampipes-config
[x] streampipes-messaging https://github.com/apache/streampipes/pull/827
[x] streampipes-messaging-kafka https://github.com/apache/streampipes/pull/827
[ ] streampipes-storage-api
[ ] streampipes-storage-couchdb
[ ] streampipes-storage-management
[ ] streampipes-data-explorer
[ ] streampipes-connect-api
[ ] streampipes-dataformat
[ ] streampipes-sdk
[ ] streampipes-rest-shared
[ ] streampipes-container
[ ] streampipes-dataformat-cbor
[ ] streampipes-dataformat-fst
[ ] streampipes-dataformat-json
[ ] streampipes-dataformat-smile
[x] streampipes-messaging-jms https://github.com/apache/streampipes/pull/827
[x] streampipes-messaging-mqtt https://github.com/apache/streampipes/pull/827
[x] streampipes-messaging-nats https://github.com/apache/streampipes/pull/827
[ ] streampipes-security-jwt
[ ] streampipes-user-management
[ ] streampipes-mail
[ ] streampipes-resource-management
[ ] streampipes-measurement-units
[ ] streampipes-pipeline-management
[ ] streampipes-data-export
[ ] streampipes-rest-core-base
[ ] streampipes-connect
[ ] streampipes-connect-container-master
[x] streampipes-rest https://github.com/apache/streampipes/pull/825
[ ] streampipes-platform-services
[ ] streampipes-backend
[ ] streampipes-client
[x] streampipes-service-extensions-base https://github.com/apache/streampipes/pull/845
[ ] streampipes-connect-container-worker
[ ] streampipes-container-standalone
[x] #838
[ ] streampipes-maven-plugin
[ ] streampipes-extensions https://github.com/apache/streampipes/pull/850
[ ] streampipes-pipeline-elements-shared
[ ] streampipes-connect-adapters https://github.com/apache/streampipes/pull/849
[ ] streampipes-connect-adapters-iiot https://github.com/apache/streampipes/pull/849
[ ] streampipes-sdk-bundle
[ ] streampipes-wrapper
[ ] streampipes-wrapper-standalone
[ ] streampipes-processors-filters-jvm
[ ] streampipes-wrapper-siddhi
[ ] streampipes-processors-filters-siddhi
[ ] streampipes-processors-transformation-jvm
[ ] streampipes-sinks-brokers-jvm
[ ] streampipes-sinks-databases-jvm
[ ] streampipes-data-explorer-commons
[ ] streampipes-sinks-internal-jvm
[ ] streampipes-sinks-notifications-jvm
[ ] streampipes-processors-enricher-jvm
[ ] streampipes-processors-change-detection-jvm
[ ] streampipes-extensions-all-iiot
[ ] streampipes-processors-image-processing-jvm
[ ] streampipes-processors-text-mining-jvm
[ ] streampipes-processors-geo-jvm
[ ] streampipes-pipeline-elements-all-jvm
[ ] streampipes-extensions-all-jvm
[ ] streampipes-wrapper-distributed
[ ] streampipes-wrapper-flink
[ ] streampipes-processors-aggregation-flink
[ ] streampipes-processors-enricher-flink
[ ] streampipes-processors-geo-flink
[ ] streampipes-processors-pattern-detection-flink
[ ] streampipes-processors-statistics-flink
[ ] streampipes-processors-text-mining-flink
[ ] streampipes-processors-transformation-flink
[ ] streampipes-sinks-databases-flink
[ ] streampipes-pipeline-elements-all-flink
[ ] streampipes-pipeline-elements-data-simulator
[ ] streampipes-sources
[ ] streampipes-sources-watertank-simulator
[ ] streampipes-sources-vehicle-simulator
[ ] streampipes-performance-tests
[ ] streampipes-wrapper-kafka-streams
[ ] streampipes-wrapper-python
[x] integration https://github.com/apache/streampipes/pull/814

Note: The above todo tasks are generated by the command mvn --also-make dependency:tree | grep maven-dependency-plugin | awk '{ print "- [ ] "$(NF-1) }' . Please tell me if there are any problems.
StreamPipes Committer

[X] I acknowledge that I am a maintainer/committer of the Apache StreamPipes project.

Hey @RobertIndie,
I'll start with the module streampipes-rest.
How can I link the subtask (TODO) to pull requests?

Hi @tenthe

How can I link the subtask (TODO) to pull requests?

You can edit my Issue description and paste your PR link to the sub-task. And as you are doing now, you can link to this issue in your PR description.

Hi all, I just enabled checkstyle in the module streampipes-processors-geo-jvm.
There we have the case that some files have a different license (MIT). Further, there are other checkstyle violations (e.g. an author in comments) that we can't remove.
How can we deal with such cases?
An example can be found in package: org.apache.streampipes.processors.geo.jvm.processor.revgeocoder.geocode.kdtree;

Hi @tenthe Thanks for your comment.

I just found out that the command mvn validate no longer returns an error when there is a checkstyle problem.

I have created a PR to fix it: https://github.com/apache/streampipes/pull/853

Hi, @tenthe

There we have the case that some files have a different license (MIT). Further, there are other checkstyle violations (e.g. an author in comments) that we can't remove.
How can we deal with such cases?

How about suppressing these files here: https://github.com/apache/streampipes/blob/dev/tools/maven/suppressions.xml
I also found a way to apply different rules to different files: https://stackoverflow.com/questions/25894431/checkstyle-different-rules-for-different-files . But it may introduce some complexity.

Personally, I would prefer option 1 and only suppress the affected rules working with as less wildcards as possible.
The second option can get easily confusing, as fas as I can imagine

Ok, thans to the both of you. I used the first option and added it to PR #850.
This PR should (hopefully) contain all checkstyle fixes for the streampipes-extension module


Update Dockerfile

sea-orm-cli complaint because rust version on the rust:0-1 is less than minimum requirement

This is already fixed by @fan-tastic-z PR.
Thanks @hericah


Return !0 on HALT

I'm writing a Z80 assembler in Z80 (https://github.com/Kroc/v80) with the goal of having 8-bit software producible on both PC and 8-bit systems rather than having separate toolchains for both. Part of this will be self-assembling on PC via CP/M emulation. Currently I've been using RunCPM (https://github.com/MockbaTheBorg/RunCPM) which is more of a self-contained emulator than a build tool and lacks methods for automation or using it as part of a build script, like NTVCM.
Firstly, thank you for NTVCM, it's incredible and exactly what I'm looking for. I have only one issue and that's the use of the Z80 halt instruction. When this is hit in my code, RunCPM can break into a debugger. On NTVCM, the executable holds for a key press, but that impacts running NTVCM as part of the build script. A mistake on my part, it does exit immediately, but with an errorlevel of 0
Could you please make NTVCM return a non-zero error code when it hits a HALT, so that I can detect that the program didn't complete and instead launch the binary with RunCPM to use the debugger there. If this should impact current expected behaviour, please consider a switch, like -h to set the HALT behaviour.
Kind regards,
Kroc Camen.

I like this idea!
I've pushed a change so if execution ends with a halt instruction NTVCM returns 1 instead of 0. No switch required.
Thanks


Unexpected touch phase during forwarding

This is admittedly not a high priority bug, but a Platform View can't be placed inside a Draggable without causing a bug.
Minimal repro:
  Widget build(BuildContext context) {
    final view = Container(
      height: 200,
      width: 200,
      child: WebView(
        initialUrl: 'https://google.com',
      ),
    );
    return Center(
      child: Draggable(
        child: view,
        feedback: view,
      ),
    );
  }

When run in Xcode, this throws the error [Assert] Unexpected touch phase during forwarding, and causes the Platform View to freeze and stop receiving touch events.
While my use case of dragging a Platform View may be uncommon, this could point to a larger bug in Platform View gesture recognition, so I'm dropping it here.

@timtraversy
Thanks for you feedback.
But I do think it would be better if you can give a minimal demo project which can reproduce this issue.

Sorry I was blocked on https://github.com/flutter/flutter/issues/27670 for most of today. Here's my demo project: https://github.com/timtraversy/draggable_platform.

cc @xster
In this case(drag failed in my mac&iphone),

Ok I'll take a look.

@amirh for platform views

FYI this also happens when placing platform views inside of PageView widgets. Probably for the same reason as Draggables but may make the issue higher priority as I imagine the use-case of platform views within PageViews might be more common?

In the example app linked above the webview has no key, when dragging starts the position of the webview in the widget tree is changed which makes it lose its state(and dispose the underlying platform view) which is causing the problem.
Verified that the following snippet(same code, just adding a key to the webview) works:
class _MyHomePageState extends State<MyHomePage> {
  final GlobalKey key = GlobalKey();
  @override
  Widget build(BuildContext context) {
    final view = Container(
      height: 200,
      width: 200,
      child: WebView(
        initialUrl: 'https://google.com',
        key: key,
      ),
    );
    return Center(
      child: Draggable(
        childWhenDragging: Container(),
        child: view,
        feedback: view,
      ),
    );
  }
}

@timtraversy I believe this should resolve the issue you were hitting, feel free to let me know if not or close this issue.

Thanks! I've moved on from this piece of functionality in my app, but if adding a key fixed the sample I sent you then I think this can be closed.

Don't know if this needs reopening, but adding GlobalKeys I can still reproduce this with PageView widget.
Reproducible snippet:
class _MyHomePageState extends State<MyHomePage> {
  final _webviewKeys = List<GlobalKey>.generate(10, (_) => GlobalKey());

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text("Test")),
      body: Center(
        child: PageView.builder(
          itemCount: 10,
          itemBuilder: (ctx, i) {
            return WebView(
              initialUrl: "https://www.google.com",
              key: _webviewKeys[i],
            );
          }
        ),
      )
    );
  }
}

It seems to work okay on Android but on iOS I sometimes get the mentioned assert message but failing that I always get strange scrolling behaviour (page snapping breaks) when scrolling the webviews. If I add a Padding widget around the WebView and scroll from there instead it works as expected.

same question while using PageView and WebView

Have opened a new issue for this, https://github.com/flutter/flutter/issues/29427.


[BUG] Launch when device wakes up - Happens too soon, overriden by Android TV last source

Hi,
I just tried this app on my Android TV and on Boot it works fine.
However, on wakeup it happens too fast. I often see the correct app afterwards
but basically always a few seconds afterwards the TV switches to the last used source (like HDMI or whatever). Maybe you could add some "wait" period option?

I second the request for a wait time.  I loose power quite often in my area.  I use Kodi and Tvheadend running on a Shield TV.  I need Kodi running to update the EPG data.  Tvheadend needs a few minutes to get running before it is ready to go.  If I use Launch on Boot to start Kodi it starts before Tvheadend is ready and causes problems.


Transition to GH Projects

Assess Github projects as issue tracking board for the Enterprise Apps team, start moving towards using it instead of ZenHub.
Note: understand whether cross-organization and cross-repo usage is sustainable, and proceed accordingly

Cross repo links work well in GHP.  Simple matter of pasting the URL of the issue into the title of the issue in GHP.

The link looks like this;

and opens up in the side panel like this:

Closing, as it has been duplicated by #81


Implementation of a basic PCIC receiver

This is a rough implementation with a high risk of change

Welcome to Codecov :tada:
Once merged to your default branch, Codecov will compare your coverage reports and display the results in this comment.
Thanks for integrating Codecov - We've got you covered :open_umbrella:


WIP update to Daml Finance 1.0.0

Testing in progress:

Distribution (Dutch Auction) works
Trading works
Lifecycling is currently broken --> for some reason no instrument / effects are created upon lifecycling


[github-actions] setup-go@v3

Codecov Report

Merging #492 (e6acc08) into main (96e8713) will increase coverage by 0.01%.
The diff coverage is n/a.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #492      +/-   ##
==========================================
+ Coverage   49.88%   49.89%   +0.01%
==========================================
  Files          38       38
  Lines        4599     4604       +5
==========================================
+ Hits         2294     2297       +3
- Misses       2124     2125       +1
- Partials      181      182       +1

Impacted Files
Coverage Δ

dispatcher/dispatcher.go
57.10% <0.00%> (+0.02%)
:arrow_up:


Cannot inherit Error

The test code as follow:
class A {}

class B extends A {}

class C extends Error {}

console.log(new B instanceof B, new B instanceof A, new B instanceof Object)

console.log(new C instanceof C, new C instanceof Error)

The compile result Between typescript version 2.0.6 and 2.1.1 is different:
The 2.0.6 emit code as follow:

var __extends = (this && this.__extends) || function (d, b) {
    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
    function __() { this.constructor = d; }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var A = (function () {
    function A() {
    }
    return A;
}());
var B = (function (_super) {
    __extends(B, _super);
    function B() {
        _super.apply(this, arguments);
    }
    return B;
}(A));
var C = (function (_super) {
    __extends(C, _super);
    function C() {
        _super.apply(this, arguments);
    }
    return C;
}(Error));
console.log(new B instanceof B, new B instanceof A, new B instanceof Object);
console.log(new C instanceof C, new C instanceof Error);

And the 2.1.1 version emits as follow:

var __extends = (this && this.__extends) || function (d, b) {
    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
    function __() { this.constructor = d; }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var A = (function () {
    function A() {
    }
    return A;
}());
var B = (function (_super) {
    __extends(B, _super);
    function B() {
        return _super.apply(this, arguments) || this;
    }
    return B;
}(A));
var C = (function (_super) {
    __extends(C, _super);
    function C() {
        return _super.apply(this, arguments) || this;
    }
    return C;
}(Error));
console.log(new B instanceof B, new B instanceof A, new B instanceof Object);
console.log(new C instanceof C, new C instanceof Error);

The execute result is different:
# typescript version 2.0.6 emitted code output:
true true true
true true

# typescript version 2.1.1 emitted code output:
true true true
false true

https://goo.gl/photos/xysW5TXeXyaWtVPm8

@aluanhaddad
I want to know why add return this in a constructor function?
In es5, if a function is called as a constructor, just like new Xxx(), it should not return any thing.

In es5, if a function is called as a constructor, just like new Xxx(), it should not return any thing.

That is not true.

I want to know why add return this in a constructor function?

Please read one of those dozens of issues. It discussed at length.

https://github.com/Microsoft/TypeScript/issues/10166

Shouldn't this bug be marked as a blocker for the 2.1 milestone? Looks like a serious issue to me. My projects are completely broken when switching to 2.1 because instanceof checks in error handling no longer works.
class MyError extends Error {
    public constructor(message?: string) {
        super(message);
    }
}

try {
    throw new MyError("Custom error");
} catch (e) {
    if (e instanceof MyError) {
        // Handle custom error   <-- TypeScript 2.0 correctly ends up here
    } else {
        throw e; // <-- TypeScript 2.1 and 2.2 ends up here
    }
}

So now all custom errors are only instance of Error. The whole class hierarchy is lost and can not be checked anymore. myError.constructor also returns the wrong constructor. Should return MyError but returns Error.
On the other hand it's nice that no special magic is needed any longer in the constructor to get error message and stack trace working in the custom error but breaking instanceof checks is a no-go.
When removing the typescript-specific markup in the code and running it in a browser directly then the browser also correctly ends up in the instanceof block.
So TypeScript 2.1 and newer compiles correct ES6 code into broken ES5 code. In TypeScript 2.0 this was working fine.
Maybe instead of fouling around with the wrong this pointer in the constructor you should add some special constructor handling when extending Error. This is what I used in TypeScript 2.0 to get correct error messages and useful stack traces:
class MyError extends Error {
    public name: string;
    public stack: string;
    public constructor(message?: string) {
        const error = super(message);
        this.message = error.message;
        this.stack = error.stack;
    }
}

@kayahr Me too! And it wasted my whole day.
I think this is a compromising solution for losing properties.
If you write code as your style, why not remove extends Error, it's useless? Just like follow:
class MyError {
  readonly name = 'MyError'
  readonly stack: string
  readonly message: string
  constructor(message?: string) {
    const error = new Error(message)
    this.stack  = error.stack
    this.message = error.message
  }
}

The very fact that you have been having to perform these hacks just to capture the message and stack is an indication that the pattern is erroneous. These custom error classes were not inheriting from their specified parent class in even the most fundamental sense of the notion.
They were just glorified tags that required not insignificant amount of boilerplate, non idiomatic code to consume.
Workarounds are available, but I'm just curious why a factory is in sufficient? The factory can set up the necessary constructor and prototype links to minimize client breakage while you gradually move to a more reliable  API.
instanceof checks in a language where the lineage of objects is mutable are always going to be weak. In this case they were not only weak but vacuous.

I like @aluanhaddad's suggestion of using a factory function of some sort.
Otherwise, I'm marking this as a duplicate of #12123. This is an intentional breaking change and documented here. Sorry about the inconveniences you may have encountered.


add deprecation warning for Mesos

What type of PR is this?
/kind cleanup
Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area build

/area engine

/area rules

/area tests

/area proposals

/area CI

What this PR does / why we need it:
Since we have not received convincing feedback to directly remove Mesos but there are no compelling reasons to keep this feature, I'm proposing a more prudent approach: add a deprecation warning for this release, and then completely remove it in the next release.
Motivation and details are reported in #2160 I'm going to close in favor of this.
/milestone 0.34.0
Does this PR introduce a user-facing change?:

update: Mesos support is now deprecated and will be removed in the next version.

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: leogr
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS [leogr]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

/hold

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: Andreagit97, FedeDP, leogr
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS [Andreagit97,FedeDP,leogr]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

/hold cancel


Update to Go 1.19

What does this PR do?:

Updates devfile library to Go 1.19 with dependency updates.
Which issue(s) this PR fixes:

fixes devfile/api#1470
PR acceptance criteria:
Testing and documentation do not need to be complete in order for this PR to be approved. We just need to ensure tracking issues are opened and linked to this PR, if they are not in the PR scope due to various constraints.

[x] Unit/Functional tests

[ ] QE Integration test

[x] Documentation (READMEs, Product Docs, Blogs, Education Modules, etc.)

[x] Client Impact

[x] Gosec scans

How to test changes / Special notes to the reviewer:

/lgtm
I think we should create a new release after the merge of this PR

@thepetk Also after the dependabot PRs and https://github.com/devfile/api/issues/1454.


Leetcode Question Number 1991

Leetcode Question Number 1991 solution needs to be added in the repo .
The link for the question is this.
Accepted Languages C++ / JAVA .
You Only need to add the  class Solution in the file.
Make Sure you have read the contributions guidelines before creating an PR.

I want to work on this issue!


Clarify MWE in issue templates

Reviewing cheatsheet
Before merging the PR, comments starting with

❌ ❓must be fixed
🤔 💅 should be fixed
💭 may be fixed
🎉 celebrate happy things

@bot-gradle merge

The merge queue build has started. Click here to see all failures if any.


Autocomplete renderInput label is being rendered inside the input

I noticed that when using the autocomplete component the label defined in the renderInput component is being rendered in the input instead of the defined placeholder. When clicking on the input the label goes up and the placeholder appears. Is there any way to to directly show the placeholder in the input before clicking on in?
this is the way it works right now

after clicking on the input the following is happening

as you can see the placeholder is shown only after clicking on the input
the expected behaviour would be for this to show

before clicking in the input

Tip, check the shrink option with the TextField.


ctx.PostArgs().Peek() <- can't find examples online but what's the equivalent of fasthttp?

also
ctx.Response.Header.Peek()
ctx.Request.Header.Peek()
thx in advance

Maybe you can give more examples about fasthttp?

@ultperf  Yes


check: Also check files sizes

What does this PR change? What problem does it solve?
Adds a check to restic check which compares the file size of a node with the size of the node content determined by the index.
The size is already calculated, but not used (maybe this check was accidentally removed?)
Was the change discussed in an issue or in the forum before?
No, I found it while reviewing #3106
Checklist

[x] I have read the Contribution Guidelines
[x] I have enabled maintainer edits for this PR
[ ] I have added tests for all changes in this PR
I have not added documentation for the changes (in the manual)
[ ] There's a new file in changelog/unreleased/ that describes the changes for our users (template here)
[x] I have run gofmt on the code in all commits
[x] All commit messages are formatted in the same style as the other commits in the repo
[x] I'm done, this Pull Request is ready for review

If I understand the old archiver implementation (restic before 0.9.0) correctly, then the Size field of a node and its chunk list might be inconsistent:
https://github.com/restic/restic/blob/272ccec7e16f74aaad771ace8a1774ccfdfe249b/internal/archiver/archiver.go#L211

If I understand the old archiver implementation (restic before 0.9.0) correctly, then the Size field of a node and its chunk list might be inconsistent:

Ok, but it might still be worth to show a warning in that case.. So what should we do?

print a warning in that case (compared to the orphaned pack warning)?
or remove the code that calculates the size from the contents and add a comment that this is not checked on purpose?

The size check was removed in #1887 after throwing errors which can't be fixed at users. And I don't see any reliable way to distinguish pre and post 0.9.0 snapshots. So it's probably best to remove the dead counter.

Changed this PR such that it removes the counter and adds a comment referring to #1887.


API Token Rate Limiting

In order to ensure the health and accessibility of the Nebula API, we will need to reasonably document API usage in order to develop adequate usage metrics. Using these metrics alongside rate limiting will enable us to ensure optimal API performance, regulate infrastructure costs, and enforce proper API usage.
Tasks

[ ] Enable the storage of each API token's usage including the cumulative number of requests made during the current hour and the API token's maximum number of requests per hour.
[ ] Develop middleware that verifies that the number of requests made hasn't exceeded the quota, updates the number requests made after every request, and returns the number of requests made, the number of requests left, and the maximum number of requests per hour in the HTTP Headers.

Closed by #39

According to @heartgg, apparently this wasn't implemented.


Automated cherry pick of #6744: bind mount local image path to container path

Cherry pick of #6744 on release/3.1.
#6744: bind mount local image path to container path

Codecov Report

Merging #6746 into release/3.1 will increase coverage by 0.00%.
The diff coverage is 0.00%.

@@             Coverage Diff             @@
##           release/3.1   #6746   +/-   ##
===========================================
  Coverage         7.48%   7.49%
===========================================
  Files              585     585
  Lines            98953   98954    +1
===========================================
+ Hits              7411    7418    +7
+ Misses           90970   90962    -8
- Partials           572     574    +2

Flag
Coverage Δ

#aFlag
7.49% <0.00%> (+<0.01%)
:arrow_up:

Impacted Files
Coverage Δ

pkg/cloudcommon/policy/resources.go
0.00% <ø> (ø)

pkg/cloudprovider/objectstore.go
2.51% <0.00%> (-0.01%)
:arrow_down:

pkg/compute/guestdrivers/managedvirtual.go
0.00% <0.00%> (ø)

pkg/compute/models/buckets.go
1.24% <0.00%> (ø)

pkg/compute/models/guestdisks.go
0.58% <ø> (+0.01%)
:arrow_up:

pkg/compute/models/secgroups.go
1.90% <0.00%> (-0.01%)
:arrow_down:

pkg/compute/models/snapshots.go
1.56% <0.00%> (+<0.01%)
:arrow_up:

pkg/hostman/hostinfo/hostinfo.go
0.00% <0.00%> (ø)

pkg/hostman/isolated_device/isolated_device.go
3.22% <0.00%> (-0.06%)
:arrow_down:

pkg/util/rbacutils/policyset.go
75.00% <0.00%> (+9.78%)
:arrow_up:

... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6fce123...ed136fb. Read the comment docs.


is builtInTrueDepthCamera supported?

setting AVCaptureDevice.default with builtInTrueDepthCamera doesn't seem to work.
is there any way to implement this?
thank you in advance.

Sorry. I don't have any device supporting depth photo capture. I will work on it when I have one.


Has there been any work to port this to python 3?

Not yet, though I believe the 2.7 C api is rather similar to python3 so it shouldn't be a huge jump.

Now implemented


[FEA] API to write dask dataframes to local storage of each node in multi-node cluster

[FEA] API to write dask dataframes to local storage of each node in multi-node cluster
Example requested API:
df.to_parquet(xxx, write_locally_per_node=True)

Please feel free to suggest a better API to do this.
Usecase Details:
While working on multi-node dask cluster users often don't have the shared storage available in the system.  This problem becomes more worse for multi-node cloud systems when intra-node communication is often a bottleneck.
We need to write these frames locally to run a bunch of downstream tasks (think running multiple machine learning models on each node).
Having an API that allows this will simplify doing this.
Workaround:
We currently use the below workaround to achieve this but having it locally in dask will be super helpful.

## This function writes data-frames
def writing_func(df,node_ip, out_dir, part_num):
    import os
    worker_ip = get_worker().name.split('//')[1].split(':')[0]

    ### ensure we are writing using a worker that belongs to node_ip
    assert worker_ip==node_ip

    out_fn = str(part_num) + '.parquet'
    out_path=os.path.join(out_dir,out_fn)
    df.to_parquet(out_path)
    return len(df)

def get_node_ip_dict():
    workers = client.scheduler_info()['workers'].keys()
    ips = set([x.split('//')[1].split(':')[0] for x in workers])
    ip_d = dict.fromkeys(ips)
    for worker in workers:
        ip = worker.split('//')[1].split(':')[0]
        if ip_d[ip] is None:
            ip_d[ip]=[]
        ip_d[ip].append(worker)
    return ip_d

 ip_dict = get_node_ip_dict()

output_task_ls=[]
for node_ip,node_workers in ip_dict.items():

    ## create a task ls
    task_ls = [dask.delayed(writing_func)(df,node_ip,out_dir,part_num) for part_num,df in enumerate(dask_df.to_delayed())]

    ## submit the task to the workers on the node
    o_ls = client.compute(task_ls,workers=node_workers,allow_other_workers=False,sync=False)
    output_task_ls.append(o_ls)

len_list = [sum([o.result() for o in o_ls]) for o_ls in output_task_ls]

CC: @quasiben , @randerzander

Happy to take this on if the community thinks this API will be useful broadly.

While working on multi-node dask cluster users often don't have the shared storage available in the system. This problem becomes more worse for multi-node cloud systems when intra-node communication is often a bottleneck.

We need to write these frames locally to run a bunch of downstream tasks (think running multiple machine learning models on each node).

To clarify, this comes up in the context of cloud deployments, where datasets live in cloud storage. For a variety of reasons, reading directly from cloud storage is suboptimal. In several workflows, there's large performance gains by:
a. Copying whole datasets from cloud storage to VM instance attached SSDs.
or
b. Reading initially from cloud storage, and writing intermediate datasets to VM instance attached SSDs.
In both scenarios, these instance SSDs are local only, and so writing to them with say, dd.to_parquet('/local_ssd/dataset') means that each worker will only write a subset of the DataFrame to its local storage. At a later stage in the workflow, if you do dd.read_parquet('/local_ssd/dataset'), the client process and worker processes only each have some subset of the data.
It'd be useful to support a simpler API that writes the entirety of a distributed DataFrame out to each node's filesystem.

Thanks for raising an issue @VibhuJawa! Perhaps specifying an explicit file:// protocol in your df.to_parquet(...) call would help. That should allow you to specify the directory you would like to write parquet files to relative to the worker's file system.
For example, the snippet below reads in a CSV dataset from S3 and writes it out to parquet to the worker's local filesystem. I'm using a Coiled cluster here, but this should work for any Dask cluster where the workers and client don't have a shared filesystem.
In [1]: import coiled

In [2]: cluster = coiled.Cluster(software="coiled/default-py39", n_workers=10)
⠸ Creating Cluster. This might take a few minutes...Found software environment build

In [3]: from dask.distributed import Client

In [4]: client = Client(cluster)

In [5]: import dask.dataframe as dd    # Read dataset in from s3
   ...:
   ...: df = dd.read_csv(
   ...:     "s3://nyc-tlc/trip data/yellow_tripdata_2019-*.csv",
   ...:     dtype={
   ...:         "payment_type": "UInt8",
   ...:         "VendorID": "UInt8",
   ...:         "passenger_count": "UInt8",
   ...:         "RatecodeID": "UInt8",
   ...:     },
   ...:     storage_options={"anon": True},
   ...:     blocksize="16 MiB",
   ...: ).persist()

In [6]: df.to_parquet("file:///tmp", schema="infer")   # Write dataset out to "/tmp" on the worker's local filesystems

cc @martindurant

Indeed, writing using the existing API and a local path will use each worker's local filesystem, as you desire. The main caveat is that some preparatory operations (e.g., creating directories) are executed by the client, and some completion operations (e.g., creating summary metadata) might be executed by the client. I believe in the case of parquet, you may well be fine on both points, but trying will tell.

At a later stage in the workflow, if you do dd.read_parquet('/local_ssd/dataset'), the client process and worker processes only each have some subset of the data.

This will definitely now work! The dask object is set up by the client, which scans the path given to find what tasks (often one per datafile) need to be in the graph of execution. It will see no data files. Even if it did, the tasks are not annotated as to which worker contains which file, and tasks will get assigned randomly.
You could probably get around this by using client.scatter(.., broadcast=True), where the data is some class that finds data files for you. It's not immediately obvious to me how.
If you have all the workers seeing the same filesystems, which is not visible to the client, you do have an option: the "dask://" filesystem of fsspec. This uses client.submit calls to do file listing and such on the client, but uses a target filesystem, in this case local, when executed on a worker.

Thanks @martindurant  and @jrbourbeau for replying.

In [6]: df.to_parquet("file:///tmp", schema="infer")   # Write dataset out to "/tmp" on the worker's local filesystems

Thanks. Writing works fine with this and can generally work by creating the required directory.  The major problem is reading after writing.

This will definitely now work! The dask object is set up by the client, which scans the path given to find what tasks (often one per datafile) need to be in the graph of execution. It will see no data files. Even if it did, the tasks are not annotated as to which worker contains which file, and tasks will get assigned randomly.

I am confused. I don't think this works.  I think you meant to say it does not work.  Tried it on a cluster to be sure too, see below.
input_df = dd.read_parquet('/raid/vjawa/output_dir/')

```python

FileNotFoundError                         Traceback (most recent call last)
/tmp/ipykernel_61230/3343347652.py in
----> 1 len(input_df)
/raid/vjawa/conda/envs/dask_dist/lib/python3.8/site-packages/dask/dataframe/core.py in len(self)
3878             return super().len()
3879         else:
-> 3880             return len(s)
3881
3882     def contains(self, key):
/raid/vjawa/conda/envs/dask_dist/lib/python3.8/site-packages/dask/dataframe/core.py in len(self)
562
563     def len(self):
--> 564         return self.reduction(
565             len, np.sum, token="len", meta=int, split_every=False
566         ).compute()
/raid/vjawa/conda/envs/dask_dist/lib/python3.8/site-packages/dask/base.py in compute(self, **kwargs)
284         dask.base.compute
285         """
--> 286         (result,) = compute(self, traverse=False, **kwargs)
287         return result
288
/raid/vjawa/conda/envs/dask_dist/lib/python3.8/site-packages/dask/base.py in compute(*args, **kwargs)
566         postcomputes.append(x.dask_postcompute())
567
--> 568     results = schedule(dsk, keys, **kwargs)
569     return repack([f(r, *a) for r, (f, a) in zip(results, postcomputes)])
570
/raid/vjawa/conda/envs/dask_dist/lib/python3.8/site-packages/distributed/client.py in get(self, dsk, keys, workers, allow_other_workers, resources, sync, asynchronous, direct, retries, priority, fifo_timeout, actors, **kwargs)
2702                     should_rejoin = False
2703             try:
-> 2704                 results = self.gather(packed, asynchronous=asynchronous, direct=direct)
2705             finally:
2706                 for f in futures.values():
/raid/vjawa/conda/envs/dask_dist/lib/python3.8/site-packages/distributed/client.py in gather(self, futures, errors, direct, asynchronous)
2016             else:
2017                 local_worker = None
-> 2018             return self.sync(
2019                 self._gather,
2020                 futures,
/raid/vjawa/conda/envs/dask_dist/lib/python3.8/site-packages/distributed/client.py in sync(self, func, asynchronous, callback_timeout, *args, **kwargs)
857             return future
858         else:
--> 859             return sync(
860                 self.loop, func, *args, callback_timeout=callback_timeout, **kwargs
861             )
/raid/vjawa/conda/envs/dask_dist/lib/python3.8/site-packages/distributed/utils.py in sync(loop, func, callback_timeout, *args, **kwargs)
324     if error[0]:
325         typ, exc, tb = error[0]
--> 326         raise exc.with_traceback(tb)
327     else:
328         return result[0]
/raid/vjawa/conda/envs/dask_dist/lib/python3.8/site-packages/distributed/utils.py in f()
307             if callback_timeout is not None:
308                 future = asyncio.wait_for(future, callback_timeout)
--> 309             result[0] = yield future
310         except Exception:
311             error[0] = sys.exc_info()
/raid/vjawa/conda/envs/dask_dist/lib/python3.8/site-packages/tornado/gen.py in run(self)
760
761                     try:
--> 762                         value = future.result()
763                     except Exception:
764                         exc_info = sys.exc_info()
/raid/vjawa/conda/envs/dask_dist/lib/python3.8/site-packages/distributed/client.py in _gather(self, futures, errors, direct, local_worker)
1881                             exc = CancelledError(key)
1882                         else:
-> 1883                             raise exception.with_traceback(traceback)
1884                         raise exc
1885                     if errors == "skip":
/nvme/0/vjawa/conda/envs/dask_dist/lib/python3.8/site-packages/dask/optimization.py in call()
/nvme/0/vjawa/conda/envs/dask_dist/lib/python3.8/site-packages/dask/core.py in get()
/nvme/0/vjawa/conda/envs/dask_dist/lib/python3.8/site-packages/dask/core.py in _execute_task()
/nvme/0/vjawa/conda/envs/dask_dist/lib/python3.8/site-packages/dask/core.py in ()
/nvme/0/vjawa/conda/envs/dask_dist/lib/python3.8/site-packages/dask/core.py in _execute_task()
/nvme/0/vjawa/conda/envs/dask_dist/lib/python3.8/site-packages/dask/dataframe/io/parquet/core.py in call()
/nvme/0/vjawa/conda/envs/dask_dist/lib/python3.8/site-packages/dask/dataframe/io/parquet/core.py in read_parquet_part()
/nvme/0/vjawa/conda/envs/dask_dist/lib/python3.8/site-packages/dask/dataframe/io/parquet/core.py in ()
/nvme/0/vjawa/conda/envs/dask_dist/lib/python3.8/site-packages/dask/dataframe/io/parquet/arrow.py in read_partition()
/nvme/0/vjawa/conda/envs/dask_dist/lib/python3.8/site-packages/dask/dataframe/io/parquet/arrow.py in _read_table()
/nvme/0/vjawa/conda/envs/dask_dist/lib/python3.8/site-packages/dask/dataframe/io/parquet/arrow.py in _read_table_from_path()
/nvme/0/vjawa/conda/envs/dask_dist/lib/python3.8/site-packages/fsspec/spec.py in open()
/nvme/0/vjawa/conda/envs/dask_dist/lib/python3.8/site-packages/fsspec/implementations/local.py in _open()
/nvme/0/vjawa/conda/envs/dask_dist/lib/python3.8/site-packages/fsspec/implementations/local.py in init()
/nvme/0/vjawa/conda/envs/dask_dist/lib/python3.8/site-packages/fsspec/implementations/local.py in _open()
FileNotFoundError: [Errno 2] No such file or directory: '/raid/vjawa/output_dir/part.367.parquet'

</details>

Er yeah, read "will definitely NOT work"

The dask object is set up by the client, which scans the path given to find what tasks (often one per datafile) need to be in the graph of execution. It will see no data files. Even if it did, the tasks are not annotated as to which worker contains which file, and tasks will get assigned randomly

This is one of the major challenges this API will solve. If you just create local copies of data on all workers then you don't have to worry about this and your downstream tasks will happily work.
A typical large-scale workflow is often broken up into stages where a user writes out the output of each stage to the disk. Something like:
Stage 1:

Do big ETL job
Write  output of stage to disk (`df.to_parquet(xx)``)

Stage 2:
3. Read  output of stage 1 in (df.read_parquet(...))
4. Run some more tasks
Stage x:
5. Run some parallel task across the data that does not require networking.

This is one of the major challenges this API will solve

but we don't have this API and implementation. It would be like adding a whole cluster-aware storage layer into Dask. Thats what HDFS, gluster, NFS, etc., are for. Or indeed, you may well not really need the local SSD performance and be happy with cloud object storage.

After thinking about this a bit, it seems like we may want to realize this feature as a new variation on persist.  That is, perhaps we can introduce something like: client.save(ddf, backend="parquet"), where we can effectively tell the client that we want to persist the collection to distributed worker-local storage using parquet files.  This API could collect and return a dictionary (or json-file path) mapping every partition to the specific IP and storage location.  A client.load API could then convert this mapping into a new-distributed collection.  Since this API would only be intended to save intermediate data between dask runs, we wouldn't need to worry about supporting the immense list of features expected in to_parquet/read_parquet.

@rjzamora : surely this is possible, but it would leave some edges, for example the lifecycle to clean up files. That could be tied, for instance, to futures the same way that in-memory results are; better if you can also "publish" them with the scheduler.
I wonder, how would such a feature compare to an explicit call for workers to spill data to disk (e.g., client.persist(.., spill=True)? That would use a simple and fast encoding, not space-efficient.
This also touches on IPC/shared memory, since multiple workers on a node can see the same filesystem.


fix(prometheus): expose metrics in no service route

Summary
Expose Prometheus metrics in no service route

Checklist

[x] The Pull Request has tests
[x] A changelog file has been created under changelog/unreleased/kong or skip-changelog label added on PR if changelog is unnecessary. README.md
[ ] There is a user-facing docs PR against https://github.com/Kong/docs.konghq.com - PUT DOCS PR HERE (No need)

Issue reference

FTI-5065

@oowl pls cherry-pick to ee.


python3Packages.gym: 0.18.3 -> 0.19.0

Motivation for this change
Things done
Updated package and removed now-extraneous inputs.

[X] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[ ] NixOS
[ ] macOS
[X] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[X] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[X] Tested execution of all binary files (usually in ./result/bin/)
21.11 Release Notes (or backporting 21.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[X] Fits CONTRIBUTING.md.

This is a semi-automatic executed nixpkgs-review with nixpkgs-review-checks extension. It is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch).
Result of nixpkgs-review pr 134675 run on x86_64-linux 1

2 packages marked as broken and skipped:

python38Packages.rl-coach
python39Packages.rl-coach

6 packages built:

python38Packages.baselines
python38Packages.gym
python38Packages.roboschool
python39Packages.baselines
python39Packages.gym
python39Packages.roboschool


Dumb question: in the new AzureDevops layout how do i find the settings?

The layout of the settings has changed with the new AzureDevops layout, and I cannot find the settings for the extension.

Which extension's settings? OneClick or Checklist?

The checklist settings are available at -
https://dev.azure.com/<>/<>/_settings/mohitbagra.workitem-checklist.settings-hub
The OneClick settings are available at -
https://dev.azure.com/<>/<>/_settings/mohitbagra.witoneclickactions.settings-hub


[Question] Get messageId from Message send by bot

Hello,
sorry for disturbing, but i found no answer for this question :/
How can I get the messageId from a message my Bot sent by using TextChannel.sendMessage("Text").queue();
I don't want to retrieve it from the TextChannel like getLastMessage() or something, couse it's possible that normal users write in that time...is there a way to get the message/messageID directly?
Would be awesome :)
Thnanks for your help^^

Please use one of the issue templates next time, even if none matches your type.
For your question:
You can use the success-consumer of the RestAction, to retrieve the send message object.
https://github.com/DV8FromTheWorld/JDA/wiki/7)-Using-RestAction#using-queue

Thanks :)
Will use a template next time^^
Works perfect