RSpec 3 Compatilbity

Hello,
Running CanCanCan under RSpec 3 produces some deprecation warnings:
Deprecation Warnings:

`failure_message_for_should_not` is deprecated. Use `failure_message_when_negated` instead. Called from /var/lib/jenkins/.rvm/gems/ruby-2.2.2@riskmethods/gems/cancancan-1.7.1/lib/cancan/matchers.rb:19:in `block in <top (required)>'.

`failure_message_for_should` is deprecated. Use `failure_message` instead. Called from /var/lib/jenkins/.rvm/gems/ruby-2.2.2@riskmethods/gems/cancancan-1.7.1/lib/cancan/matchers.rb:15:in `block in <top (required)>'.

Would be cool to have these switched into the new methods.
was originally reported here as well : https://github.com/ryanb/cancan/issues/997

@NekoNova Could you submit a PR?

Will make one tommorrow!

running some tests, then I will open the PR if it does what it's supposed to be doing.

https://github.com/CanCanCommunity/cancancan/pull/251

@Senjai This issue can be closed as PR https://github.com/CanCanCommunity/cancancan/pull/251 has been merged.

will close it myself ;)


Clean up duplicated code in JcloudsLocationCustomizers

Unite the code from
https://github.com/apache/brooklyn-server/pull/276
and https://github.com/apache/brooklyn-server/pull/292
OPEN_INBOUND_PORTS_IN_SECURITY_GROUP_EFFECTOR tested after brooklyn restarts. All works fine.

Why are you using the SharedLocationSecurityGroupCustomizer in NetworkingEffectors?  The SharedLocationSecurityGroupCustomizer is intended as a cut-down JcloudsLocationSecurityGroupCustomizer that works in yaml.  As you are using java could you use JcloudsLocationSecurityGroupCustomizer and then you could avoid modifying SharedLocationSecurityGroupCustomizer?

How do I test this?
I tried:
`location:
aws-central-centos7
services:

type: org.apache.brooklyn.entity.software.base.EmptySoftwareProcess
brooklyn.config:
effector.add.openInboundPorts: true
type: org.apache.brooklyn.entity.software.base.EmptySoftwareProcess
brooklyn.config:
effector.add.openInboundPorts: true
type: org.apache.brooklyn.entity.software.base.EmptySoftwareProcess
brooklyn.config:
effector.add.openInboundPorts: true
`

Once running I tried the effector with tcp and 8888 and I get the following in my log:
14:25:40,279 WARN  123 ocationSecurityGroupCustomizer [nager-LPxXVYAX-4] Expected to find two security groups on node eu-central-1/i-9d124a21 in app lc68kjgd14 (one shared, one unique). Found 1: [{id=eu-central-1/sg-8bf76ce3, providerId=sg-8bf76ce3, name=jclouds#qa-scheduler-emptysoftwareprocess-f4ol, location={scope=REGION, id=eu-central-1, description=eu-central-1, parent=aws-ec2, iso3166Codes=[DE-HE]}, ipPermissions=[{ipProtocol=tcp, fromPort=0, toPort=65535, tenantIdGroupNamePairs={761990928256=[sg-8bf76ce3]}, groupIds=[], cidrBlocks=[], exclusionCidrBlocks=[]}, {ipProtocol=tcp, fromPort=22, toPort=22, tenantIdGroupNamePairs={}, groupIds=[], cidrBlocks=[<IP_ADDRESS>/0], exclusionCidrBlocks=[]}, {ipProtocol=udp, fromPort=0, toPort=65535, tenantIdGroupNamePairs={761990928256=[sg-8bf76ce3]}, groupIds=[], cidrBlocks=[], exclusionCidrBlocks=[]}]}]
And no ports have been opened.

retest  this please

@bostko Can you extend the tests in SharedLocationSecurityGroupCustomizerTest to cover the new functionality - otherwise looks good

@duncangrant @aledsage I added a unit test for ICMP.

LGTM. Will wait for Jenkins to complete before merging.

@bostko there are four test failures:
org.apache.brooklyn.location.jclouds.networking.SharedLocationSecurityGroupCustomizerTest.testInboundIcmpAddedToPermissions
org.apache.brooklyn.location.jclouds.networking.SharedLocationSecurityGroupCustomizerTest.testInboundPortsAddedToPermissions
org.apache.brooklyn.location.jclouds.networking.SharedLocationSecurityGroupCustomizerTest.testPermissionsSetFromPortRanges
org.apache.brooklyn.location.jclouds.networking.SharedLocationSecurityGroupCustomizerTest.testUdpPermissionsSetFromPortRanges

The exception is the same in each one:
java.lang.NullPointerException: null
	at org.apache.brooklyn.location.jclouds.networking.SharedLocationSecurityGroupCustomizer.applySecurityGroupCustomizations(SharedLocationSecurityGroupCustomizer.java:192)
	at org.apache.brooklyn.location.jclouds.networking.SharedLocationSecurityGroupCustomizer.customize(SharedLocationSecurityGroupCustomizer.java:152)
	at org.apache.brooklyn.location.jclouds.networking.SharedLocationSecurityGroupCustomizerTest.testUdpPermissionsSetFromPortRanges(SharedLocationSecurityGroupCustomizerTest.java:109)

Tests are passing now, thanks @duncangrant , @sjcorbett, @bostko. Merging.


[C++][Parquet] Build and unit tests support for MSVC on Windows

Hi, I installed all of the prerequisites for parquet-cpp under Windows and started working though the cmake process. For the most part, I added some search names to the FindXXX scripts, and that worked okay, but now it appears that I'm stuck. The CompilerInfo.cmake script is trying to differentiate between clang and gcc, but has no options for Windows. I know other Apache projects are cross platform, including Thrift, which I was able to build.
I'm wondering if Windows support is on the short-term roadmap, whether I would be able to potentially contribute some patches, although I'm a  CMake newbie, or whether I should just try to create a solution in VS to build it manually.
Here is the error:
C:\HDFS\parquet-cpp-master>cmake .
clang-tidy not found
clang-format not found
– [ C:/Program Files/CMake/share/cmake-3.6/Modules/FindBoost.cmake:946 ] _boost
_TEST_VERSIONS = 1.61.0;1.61;1.60.0;1.60;1.59.0;1.59;1.58.0;1.58;1.57.0;1.57;1.56.0;1.56;1.55.0;1.55;1.54.0;1.54;1.53.0;1.53;1.52.0;1.52;1.51.0;1.51;1.50.0;1.50;1.49.0;1.49;1.48.0;1.48;1.47.0;1.47;1.46.1;1.46.0;1.46;1.45.0;1.45;1.44.0;1.44;1.43.0;1.43;1.42.0;1.42;1.41.0;1.41;1.40.0;1.40;1.39.0;1.39;1.38.0;1.38;1.37.0;1.37;1.36.1;1.36.0;1.36;1.35.1;1.35.0;1.35;1.34.1;1.34.0;1.34;1.33.1;1.33.0;1.33
– [ C:/Program Files/CMake/share/cmake-3.6/Modules/FindBoost.cmake:948 ] Boost_USE_MULTITHREADED = ON
– [ C:/Program Files/CMake/share/cmake-3.6/Modules/FindBoost.cmake:950 ] Boost_USE_STATIC_LIBS =
– [ C:/Program Files/CMake/share/cmake-3.6/Modules/FindBoost.cmake:952 ] Boost_USE_STATIC_RUNTIME =
– [ C:/Program Files/CMake/share/cmake-3.6/Modules/FindBoost.cmake:954 ] Boost_ADDITIONAL_VERSIONS =
– [ C:/Program Files/CMake/share/cmake-3.6/Modules/FindBoost.cmake:956 ] Boost_NO_SYSTEM_PATHS =
– [ C:/Program Files/CMake/share/cmake-3.6/Modules/FindBoost.cmake:1024 ] Declared as CMake or Environmental Variables:
– [ C:/Program Files/CMake/share/cmake-3.6/Modules/FindBoost.cmake:1026 ]   BOOST_ROOT =
– [ C:/Program Files/CMake/share/cmake-3.6/Modules/FindBoost.cmake:1028 ]   BOOST_INCLUDEDIR =
– [ C:/Program Files/CMake/share/cmake-3.6/Modules/FindBoost.cmake:1030 ]   BOOST_LIBRARYDIR =
– [ C:/Program Files/CMake/share/cmake-3.6/Modules/FindBoost.cmake:1032 ] _boost_TEST_VERSIONS = 1.61.0;1.61;1.60.0;1.60;1.59.0;1.59;1.58.0;1.58;1.57.0;1.57;1.56.0;1.56;1.55.0;1.55;1.54.0;1.54;1.53.0;1.53;1.52.0;1.52;1.51.0;1.51;1.50.0;1.50;1.49.0;1.49;1.48.0;1.48;1.47.0;1.47;1.46.1;1.46.0;1.46;1.45.0;1.45;1.44.0;1.44;1.43.0;1.43;1.42.0;1.42;1.41.0;1.41;1.40.0;1.40;1.39.0;1.39;1.38.0;1.38;1.37.0;1.37;1.36.1;1.36.0;1.36;1.35.1;1.35.0;1.35;1.34.1;1.34.0;1.34;1.33.1;1.33.0;1.33
– [ C:/Program Files/CMake/share/cmake-3.6/Modules/FindBoost.cmake:1125 ] location of version.hpp: C:/HDFS/boost_1_61_0/boost/version.hpp
– [ C:/Program Files/CMake/share/cmake-3.6/Modules/FindBoost.cmake:1149 ] version.hpp reveals boost 1.61.0
– [ C:/Program Files/CMake/share/cmake-3.6/Modules/FindBoost.cmake:1235 ] guessed _boost_COMPILER = -vc140
– [ C:/Program Files/CMake/share/cmake-3.6/Modules/FindBoost.cmake:1245 ] _boost_MULTITHREADED = -mt
– [ C:/Program Files/CMake/share/cmake-3.6/Modules/FindBoost.cmake:1288 ] _boost_RELEASE_ABI_TAG = -
– [ C:/Program Files/CMake/share/cmake-3.6/Modules/FindBoost.cmake:1290 ] _boost_DEBUG_ABI_TAG = -gd
– [ C:/Program Files/CMake/share/cmake-3.6/Modules/FindBoost.cmake:1344 ] _boost_LIBRARY_SEARCH_DIRS_RELEASE = C:/HDFS/boost_1_61_0/lib;C:/HDFS/boost_1_61_0/../lib;C:/HDFS/boost_1_61_0/stage/lib;PATHS;C:/boost/lib;C:/boost;/sw/local/lib_boost_LIBRARY_SEARCH_DIRS_DEBUG   = C:/HDFS/boost_1_61_0/lib;C:/HDFS/boost_1_61_0/../lib;C:/HDFS/boost_1_61_0/stage/lib;PATHS;C:/boost/lib;C:/boost;/sw/local/lib
– [ C:/Program Files/CMake/share/cmake-3.6/Modules/FindBoost.cmake:1595 ] Boost_FOUND = 1
– Boost version: 1.61.0
– Boost include dir: C:/HDFS/boost_1_61_0
– Boost libraries:
– THRIFT_HOME: C:/HDFS/ApacheThrift
– Thrift version: Thrift version 0.9.3
– Thrift include dir: C:/HDFS/ApacheThrift/include
– Thrift contrib dir: THRIFT_CONTRIB_DIR-NOTFOUND
– Thrift library path: C:/HDFS/ApacheThrift/lib/thriftmdd.lib
– Thrift static library: THRIFT_STATIC_LIB_PATH-NOTFOUND/libthrift.a
– Thrift compiler: C:/HDFS/ApacheThrift/bin/thrift.exe
– Found the Snappy library: C:/HDFS/Snappy/native/snappy64.lib
– Found the ZLIB library: C:/HDFS/zlib/lib/zlibstaticd.lib
– Found the GTest library: C:/HDFS/gtest/lib/gtest.lib
– Build Type: DEBUG
INFO Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23918 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.
cl : Command line warning D9002 : ignoring unknown option '-v'
cl : Command line error D8003 : missing source filename
CMake Error at cmake_modules/CompilerInfo.cmake:46 (message):
Unknown compiler.  Version info:
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23918 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.
cl : Command line warning D9002 : ignoring unknown option '-v'
cl : Command line error D8003 : missing source filename
Call Stack (most recent call first):
CMakeLists.txt:370 (include)
– Configuring incomplete, errors occurred!
See also "C:/HDFS/parquet-cpp-master/CMakeFiles/CMakeOutput.log".
Environment: Visual Studio 2015
Reporter: Mark Schaefer
Note: This issue was originally created as PARQUET-679. Please see the migration documentation for further details.

Mark Schaefer:
CMake knows it's cl because it tries to run cl -v to get the version information.
However, I ran cmake -DCMAKE_CXX_COMPILER=cl .
and the results were the same.

Mark Schaefer:
Line 370 on CMakeLists.txt says:
include(CompilerInfo)
Should this be in an IF block?

Deepak Majeti / @majetideepak:
We will include a fix for this soon.
For the time being, you can try commenting out "include(CompilerInfo)" at CMakeList.txt:370
This should not invoke the CompilerInfo.cmake.

Mark Schaefer:
I agree, building the deps was a pain.  Just a note, some of the CMake variables, like CMAKE_CXX_FLAGS are set by CMake and shouldn't be overridden locally unless absolutely necessary, plus other things provide useful information, such as:
CMAKE_CXX_FLAGS_DEBUG(RELEASE/RELWITHDEBINFO) - settings for compiling debug, e.g. -G -ggdb
CMAKE_COMPILER_IS_GNUCXX (true if it's g++ or a derivative)
CMAKE_CXX_COMPILER_ID ("Clang", "GNU", "Intel", "MSVC")
CMAKE_STATIC_LIBRARY_SUFFIX
seems like these variables do a lot of the functionality that cmake_modules is trying to accomplish.

Deepak Majeti / @majetideepak:
Can you try by explicitly setting the compiler for cmake ?
"cmake -DCMAKE_CXX_COMPILER=cl ."
This should not invoke the CompilerInfo.cmake script

Mark Schaefer:
I think this should be closed as "Will not fix". I was able to create the Visual Studio projects, but I got a lot of errors compiling that suggest that making this build/run on Windows will be a significant effort. Specifically,
Cannot open include file “endian.h”
Cannot open include file “unistd.h”
Cannot open include file “sys/mman.h”
Cannot open include file “sys/time.h”
‘fcntl’: identifier not found
Use of the keyword “OPTIONAL” throughout the code as an enum, which Windows #defines as empty.

Wes McKinney / @wesm:
It would be great also to set up an Appveyor build so that we can get continuous integration feedback on Windows. There are plenty of examples of how to make a cmake setup work with MSVC; just none of us have been developing on Windows! Building all the dependencies may be a bit of a pain

Deepak Majeti / @majetideepak:
Ideally, cmake_modules/CompilerInfo.cmake must include windows compiler options as well to resolve this.
We don't test parquet-cpp on a windows platform in our current testing framework.

Wes McKinney / @wesm:
Issue resolved by pull request 313
https://github.com/apache/parquet-cpp/pull/313

Wes McKinney / @wesm:
We just got Apache Arrow's C++ libraries completely working today, with tests running in Appveyor – since that handles a lot of Parquet's cross-platform IO issues (like files, memory maps), this should be easier to get done now. Mainly we need to sort out the 3rd-party package toolchain. If anyone wants to help, now is a good time to get involved.
I'm marking this for the 1.1.0 release

Deepak Majeti / @majetideepak:
We can keep this open. We should eventually figure out a way to get windows into the build process as well. The issues you posted will definitely help.

Wes McKinney / @wesm:
We will absolutely need to get this building in MSVC – for example a substantial percentage of Python programmers (my main target audience) are on Windows. For example, we got the Feather project working with some of these same portability issues:
https://github.com/wesm/feather/blob/master/cpp/src/feather/io.cc#L31


gotta go fast: don't clean before building

Initially, I made blogit to clean everything before rebuilding because the Makefile was still being modified (and rebuild is not triggered by a Maekfile modif). NMow, with the growing number of recipes, it's time to use the Makefile in all its glory and let it decide for itself what to rebuild.

Won't this be leaving up orphaned pages and tags?

Here is what I can tell from my tests:

Recipe added: builds only new recipe.
Recipe removed: requires full rebuild (or at least index, a solution to mitigate this would be to clean/rebuild the index every time).
Recipe modified: only rebuild recipe.
Tag added to an existing recipe: all tag pages containing the recipe, the index and the recipe get rebuild, which is the expected behavior.
Tag removed from existing recipe: same as above.

Now if you remove completely a tag, its tag page will indeed remain but won't be linked anywhere. It would be relatively easy to make a rule to remove them, and ask rsync to remove files in the dest that aren't in the source.


[extractor/youtube] Fix parsing comment_count with unit suffix

IMPORTANT: PRs without the template will be CLOSED
Description of your pull request and other information

Youtube's extractor can now correctly parse comment count values containing unit suffixes (i.e. K, M, etc.).
Fixes #5849
Template

Before submitting a pull request make sure you have:

[X] At least skimmed through contributing guidelines including yt-dlp coding conventions
[X] Searched the bugtracker for similar pull requests
[X] Checked the code with flake8 and ran relevant tests

In order to be accepted and merged into yt-dlp each piece of code must be in public domain or released under Unlicense. Check all of the following options that apply:

[X] I am the original author of this code and I am willing to release it under Unlicense
[ ] I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

[X] Fix or improvement to an extractor (Make sure to add/update tests)
[ ] New extractor (Piracy websites will not be accepted)
[ ] Core bug fix/improvement
[ ] New feature (It is strongly recommended to open an issue first)

Pls make sure to manually test both traversal paths. You can test the second path by changing one of the keys in first to intentionally break it.

Sure thing :)
I conducted a bit of smoke testing on the same URL as the OP in #5849 (https://www.youtube.com/watch?v=TPKX6K2u8Tc). I shared my results below. (Note: At the time of this writing, the comment counter is around 3.2K.)
First Path Test
The following GIF shows the resultant info dictionary after fetching the comment_count key, following the first expected path:

Second Path Test
In this test, I eliminated twoColumnWatchNextResults from the first path, breaking it. The application now relies on the fallback path to retrieve the comment_count key.

According to these trivial tests, both paths provide the same count information.
Please let me know if this evidence is enough to prove that my patch works.

Evidence wasn't necessary 😄. I was just reminding you to test the fallback path

Oh, My bad :smile:.


bug: running with --vtune causes a crash

Test Case
(module)

Steps to Reproduce
wasmtime --vtune /tmp/empty.wat

Expected Results
Adding the --vtune flag, which enables VTune profiling, should succeed regardless of the environment.
Actual Results
A snippet of the backtrace:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: error when notifying event', crates/jit/src/profiling/vtune.rs:60:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: PoisonError { .. }', crates/jit/src/profiling/vtune.rs:47:27
...
 17:     0x564e6a13571c - <wasmtime_jit::profiling::vtune::VTuneAgent as core::ops::drop::Drop>::drop::ha421249d00e9da25
                               at /.../wasmtime/src/crates/jit/src/profiling/vtune.rs:47:9
  18:     0x564e6935d677 - core::ptr::drop_in_place<wasmtime_jit::profiling::vtune::VTuneAgent>::h4021027fefeb76a5
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/ptr/mod.rs:490:1
  19:     0x564e6935f22d - core::ptr::drop_in_place<alloc::boxed::Box<dyn wasmtime_jit::profiling::ProfilingAgent>>::h3e6586f99c95bc40
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/ptr/mod.rs:490:1
  20:     0x564e6935c24c - core::ptr::drop_in_place<wasmtime::engine::EngineInner>::hb7a0d51da9c6653e
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/ptr/mod.rs:490:1
  21:     0x564e693b2b64 - alloc::sync::Arc<T>::drop_slow::h6c0d38bb7bee604c
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/alloc/src/sync.rs:1114:18
  22:     0x564e6935f9fb - <alloc::sync::Arc<T> as core::ops::drop::Drop>::drop::haeb7e9ee9f329b2a
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/alloc/src/sync.rs:1711:13
  23:     0x564e6935e00b - core::ptr::drop_in_place<alloc::sync::Arc<wasmtime::engine::EngineInner>>::h4fab3897c40d1cc6
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/ptr/mod.rs:490:1
  24:     0x564e6935bb9b - core::ptr::drop_in_place<wasmtime::engine::Engine>::h804e987e96a87bb3
                               at /rustc/69f9c33d71c871fc16ac445211281c6e7a340943/library/core/src/ptr/mod.rs:490:1
  25:     0x564e68f55ce4 - wasmtime_cli::commands::run::RunCommand::execute::h6e097e3761430deb
                               at /.../wasmtime/src/src/commands/run.rs:230:5
  26:     0x564e68dcb405 - wasmtime::Wasmtime::execute::hc576e9eb67754303
                               at /.../wasmtime/src/src/bin/wasmtime.rs:52:29

Versions and Environment
Wasmtime version or commit: main
Operating system: Fedora
Architecture: x86_64
Extra Info
I thought that perhaps the issue was that Wasmtime expected to be run by VTune. When I try the following, things seem to almost work:
rm -rf /tmp/vtune-results
vtune -collect hotspots -result-dir /tmp/vtune-results target/debug/wasmtime --vtune /tmp/empty.wat

I do see a worrying line in the output, though: "vtune: Error: Cannot load data file `/tmp/vtune-results/data.0/40123-40133.0.trace' (Data file is corrupted)." But I can replicate the original bug when I use a more complex WAT file:
rm -rf /tmp/vtune-results
vtune -collect hotspots -result-dir /tmp/vtune-results target/debug/wasmtime --vtune ~/Code/wasmtime/tests/all/cli_tests/simple.wat

cc: @jlb6740, @bnjbvr

Thanks! I've just ran into that in our embedding too; will investigate quickly to find if there's anything obvious there.

@abrown so at the end of this short investigation:

I couldn't run under vtune, as running vtune on my OS fails with a cryptic library loading error (probably the package is borked).
From scanning the issue in our embedding, it seems that running outside vtune fails when notify_event is called for new methods. That being said, I've just noticed the documentation of this method for ...METHOD_LOAD_FINISHED says that the return value is undefined for this particular event type, while the high-level ittapi crate will check it's 1 to decide it's been successful, independently of the event. I've opened https://github.com/intel/ittapi/pull/82 to fix that.

I can see that the shutdown results in a error, when trying with your test case; that being said, it only output to log, in my case, and doesn't crash. So I'm wondering if we're running into different issues, or if some of them are OS-specific ("I'm running ArchLinux, btw").

Made some comments over in https://github.com/intel/ittapi/pull/82.


Adding ServerManagement API spec

Aka, SMT or RSMT

Hi @fearthecowboy, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!

It looks like you're working at Microsoft (garretts). If you're full-time, we DON'T require a contribution license agreement.

If you are a vendor, DO please sign the electronic contribution license agreement. It will take 2 minutes and there's no faxing! https://cla.azure.com.

TTYL, AZPRBOT;

https://github.com/fearthecowboy/azure-rest-api-specs/blob/master/arm-servermanagement/2015-07-01-preview/servermanagement.json#L65
Regex pattern in the description can be added as a validation and the generated client will assert that on the values provided by the user. https://github.com/Azure/autorest/blob/master/AutoRest/TestServer/swagger/validation.json#L32

https://github.com/fearthecowboy/azure-rest-api-specs/blob/master/arm-servermanagement/2015-07-01-preview/servermanagement.json#L78
A generic comment: Please provide default response in the responses section.
Default will be treated as an error. If you provide the schema of the error object in the default then the responses will be deserialized accordingly.
Please read the  documentation on responses carefully over here https://github.com/Azure/azure-rest-api-specs/blob/master/documentation/creating-swagger.md#Responses and make changes accordingly.

As you have 200 and 201 documented in the responses, for Gateways_create, is it a long running operation? If so, then please add the extension "x-ms-long-running".

Is Node_Update a long running operation? https://github.com/fearthecowboy/azure-rest-api-specs/blob/master/arm-servermanagement/2015-07-01-preview/servermanagement.json#L437

https://github.com/fearthecowboy/azure-rest-api-specs/blob/master/arm-servermanagement/2015-07-01-preview/servermanagement.json#L826 - Looks like this is long running. Extension?

https://github.com/fearthecowboy/azure-rest-api-specs/blob/master/arm-servermanagement/2015-07-01-preview/servermanagement.json#L1233
Do you want this to be of DateTime format?

General Comment: Bunch of places have todo in the description. Please make sure to update it accordingly
https://github.com/fearthecowboy/azure-rest-api-specs/blob/master/arm-servermanagement/2015-07-01-preview/servermanagement.json#L1262

https://github.com/fearthecowboy/azure-rest-api-specs/blob/master/arm-servermanagement/2015-07-01-preview/servermanagement.json#L1307
Adding min and max constraints?
List of constraints supported by swagger:
https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#patterned-fields-2
Click on the link above and scroll up a little to see all the constraints

Just a suggestion, Although the name suggests that memory is in MB, it would be nice if the description also states it.
https://github.com/fearthecowboy/azure-rest-api-specs/blob/master/arm-servermanagement/2015-07-01-preview/servermanagement.json#L1303

Question mark in the description. Is the spec stating or asking?
https://github.com/fearthecowboy/azure-rest-api-specs/blob/master/arm-servermanagement/2015-07-01-preview/servermanagement.json#L1370

https://github.com/fearthecowboy/azure-rest-api-specs/blob/master/arm-servermanagement/2015-07-01-preview/servermanagement.json#L1382

The autoUpgrade property gives the flexibility to gateway to auto upgrade itself. If properties value not specified, then we assume autoUpgrade = never.

How about the following?

"The autoUpgrade property gives the flexibility to gateway to auto upgrade itself. Default value 'off'."

https://github.com/fearthecowboy/azure-rest-api-specs/blob/master/arm-servermanagement/2015-07-01-preview/servermanagement.json#L1569
"A multipart numerica version"

Description for "pssession", "command", "completed"
https://github.com/fearthecowboy/azure-rest-api-specs/blob/master/arm-servermanagement/2015-07-01-preview/servermanagement.json#L1639

properties of these definitions PowerShellCommandResult, PromptFieldDescription are not documented.
Being crisp on documentation goes a long way. This will be turned into client side documentation and there is an effor by a team to convert swagger specs into REST API docs on msdn. Hence, description becomes even more important.

Please provide an example of the time stamp format in the description wherever it is used.
https://github.com/fearthecowboy/azure-rest-api-specs/blob/master/arm-servermanagement/2015-07-01-preview/servermanagement.json#L1551

Body parameters can be better named then body. This could be named as GatewayParameters
https://github.com/fearthecowboy/azure-rest-api-specs/blob/master/arm-servermanagement/2015-07-01-preview/servermanagement.json#L68

https://github.com/fearthecowboy/azure-rest-api-specs/blob/master/arm-servermanagement/2015-07-01-preview/servermanagement.json#L69
x-ms-client-flatten extension - brings the child properties of the object one level up (flattens).
when you apply this on the body parameter itself, it will flatten the body (GatewayParameters)  completely resulting in more required/optional parameters (based on how they are specified in GatewayParameters).
It is fine to do that. I was curious to know, if that was intentional?

re: Regex pattern

Oh, cool. I never found that before. Awesome, fixing...

As you have 200 and 201 documented in the responses, for Gateways_create

Fixed.

Is Node_Update a long running operation

Fixed

Please provide default response in the responses section.

Fixed. :)

Looks like this is long running. Extension?

Fixed

Do you want this to be of DateTime format?

Fixed

Bunch of places have todo in the description.

Reaaaaaly thought I had caught those. Sorry. :(

Adding min and max constraints?

Fixed

Question mark in the description. Is the spec stating or asking?

Too many lattés while editing error. :coffee:

How about the following?

Now, I distinctly remember fixing that. :hammer:

A multipart numerica

Fixed.

Body parameters can be better named then body.

I figured since I was flattening them, that didn't really get exposed, but I fixed them

Please provide an example of the time stamp format in the description wherever it is used.

Is using format: date-time sufficient?

x-ms-client-flatten extension - I was curious to know, if that was intentional?

Yes, I originally had it without that, but it was a miserable pain in the butt to use, so I flattened them. It feels a lot more natural when coding against the API this way.

Being crisp on documentation goes a long way.  (PowerShellCommandResult, PromptFieldDescription)

Yeah, I realize that-- I didn't write the original API doc that I was handed to do this (and it turns out that it wasn't complete or accurate), and some of those fields I just recently found in empirical testing and had to go back to get more detail.  I put them in so that we'd be able to get the values back, and over the next couple weeks, I was going to go walk thru the implementation code and see what the heck they were for.
As it is, it's a stretch of vivid imagination that much of this API is useful from an automation perspective;  large parts of it are really implementation details for the Portal itself. That being said, I'm attempting to expose as much as I can that could feasibly be used :)
Gimme a couple of hours to finish running this thru my tests, and I'll submit an updated PR including the fixes.

Updated to address feedback.

@fearthecowboy - The changes look good to me.
Providing the format: date-time should be sufficient enough.
One last thing,please make sure that the tabs are set to 2 spaces for json docs. If you are using Visual Studio then after setting the tabs to 2 spaces, you can select all and then press Ctrl + K + D. That should format it correctly.

re: 2 spaces

Funny story: I uh, never actually looked at the JSON even once. I used the swagger.io editor, and worked in YAML the whole time, and just used 'download json' ... after that my local build script picks it up and puts it in the right spot :)
Strange that the tool didn't go with 2 space tabs, given that's what YAML uses ...

Indentation changed to 2 spaces in latest commit


Handle branch name with prefix already

It is possible to create a release with target commitish refs/heads/BRANCH, with then causes issues in several functions. This fix handles cases that a branch already has a prefix.
Fixes #20317

Have you considered what happens if you actually want to refer to refs/heads/branch?

I have been intermittently going through the code to double check that this actually still works - have you considered how your code will or will not break that?
I think we need to be very very very very very careful with just switching to allow this kind of thing. When Gitea wants to check if there is a branch it should be ensuring that the ref head prefix is there - it should not be removing things.
It will cause problems.

Yup, I agree with your point. I have thought about the possibility that this change might change the behavior, that's what I mean "not bad" (indeed not ideal enough), anyway the ref messy problem is a longstanding problem.
If we want to strict the ref usages inside Gitea and strict the behaviors, I think there should be some comments and tests to make sure the logic is clear and make sure future developers can know what is the right thing to do.

My thought was this change only causes problem if a user has the branch refs/heads/refs/heads/BRANCH, which means they use refs/heads/BRANCH for their branch name, which is already somewhat confusing, so it could be considered as the user's decision.
And yes, this change is not ideal (and as your option, not correct), so it's better to make GetBranchCommitID etc covered by tests and add more comments for it, to avoid abuse or incorrect change.

I agree that we must be cautious about this, and the current change may not be correct (will cause issues in other parts).
 If you happen to have both heads/master and tags/master, you can explicitly say heads/master to tell Git which one you mean. When ambiguous, a <refname> is disambiguated by taking the first match in the following rules:

If $GIT_DIR/<refname> exists, that is what you mean (this is usually useful only for HEAD, FETCH_HEAD, ORIG_HEAD, MERGE_HEAD and CHERRY_PICK_HEAD);
otherwise, refs/<refname> if it exists;
otherwise, refs/tags/<refname> if it exists;
otherwise, refs/heads/<refname> if it exists;
otherwise, refs/remotes/<refname> if it exists;
otherwise, refs/remotes/<refname>/HEAD if it exists.

Then, when both refs/heads/<refname> and refs/heads/refs/heads/<refname> exists, the latter should be explicitly expressed by heads/refs/heads/<refname> or refs/heads/refs/heads/<refname>. I think this behavior should be consistent throughout.

I think therefore we agree that this PR is not the correct thing to do then.
We should be trying to always pass a ref when we can instead of arbitrarily removing the prefix.
By always adding the ref prefix we avoid the ambiguity within git's refname resolution.
The problem is that git's refname behaviour is sensible as a cli tool but for a server we have to be more explicit.

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@1757053). Click here to learn what that means.
The diff coverage is 0.00%.

@@           Coverage Diff           @@
##             main   #20357   +/-   ##
=======================================
  Coverage        ?   46.78%
=======================================
  Files           ?      976
  Lines           ?   135182
  Branches        ?        0
=======================================
  Hits            ?    63246
  Misses          ?    64199
  Partials        ?     7737

Impacted Files
Coverage Δ

modules/git/repo_branch_nogogit.go
63.15% <0.00%> (ø)

modules/git/repo_commit.go
48.85% <0.00%> (ø)

routers/web/repo/release.go
27.03% <0.00%> (ø)

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 1757053...6e1ee49. Read the comment docs.

If I understand correctly, the new code is still "guessing" (ResolveBranch) whether the target is a branch name or a reference. To make the logic stable and clear, could the target be clarified to be a reference?
And cc @zeripath , how do you think?

If I understand correctly, the new code is still "guessing" (ResolveBranch) whether the target is a branch name or a reference. To make the logic stable and clear, could the target be clarified to be a reference?

A branch name and a reference appeared to have the same effect in git. I think at best we can detect if a reference has the BranchPrefix and try to resolve it as a reference as is.

I think the correct place to fix this is in the migration - where we should remove/add the refs/heads/ prefix as necessary.
Once things are in Gitea itself we should really be assuming that a reference to refs/heads/main is a reference to /refs/heads/refs/heads/main.

I think now the branch names are resolved during migration. Could you please help to review the changes? @zeripath @wxiaoguang

Thank you for asking me for review, I am quite busy recently and haven't thought about how to make the branch/tag/commit-id more consistent in this case. Maybe other maintainers could help out.

@zeripath  how do you think about current approach?

GitHub has a blog post today about ambiguous branch names. I'm commenting here for references, and it maybe something to watch to make the commitish clear.


import error in Linux (Ubuntu 18.04) - python 3.6.6

Importing the StableMotifs in any of the tests gives an import error:
Traceback (most recent call last):   File "run.py", line 2, in <module>     import StableMotifs as sm   File "/home/david/Dropbox/CEU/BOOL_MODELS/SM_Code_new/master_repo/StableMotifs/StableMotifs/__init__.py", line 5, in <module>     from StableMotifs import Reduction   File "/home/david/Dropbox/CEU/BOOL_MODELS/SM_Code_new/master_repo/StableMotifs/StableMotifs/Reduction.py", line 9, in <module>     import StableMotifs.Succession as sm_succession   File "/home/david/Dropbox/CEU/BOOL_MODELS/SM_Code_new/master_repo/StableMotifs/StableMotifs/Succession.py", line 6, in <module>     import StableMotifs.Reduction as sm_reduction AttributeError: module 'StableMotifs' has no attribute 'Reduction'
Removing the line:
import StableMotifs.Succession as sm_succession
from Reduciton.py seems to solve the issue. Could you please check if this is the case in your environments? I'm still trying to understand what causes this exactly.

I will push a version where the line is commented out because Reduction does not need the Succession module anyway. Still I would like to understand why this happened.

I can confirm that I do not get a similar error.
I do not know if this is related, but I have gotten a similar error when I tried to add the parent folder  of StableMotifs in site-packages of the anaconda3 environment I am using. I ended up having to add only the StableMotifs folder with the python functions in order to not get that problem.

I don't have an explanation, but I wanted to confirm that Reduction.py does not need to import Succession.py. The import was part for a function call that eventually got removed. There are no plans to add it back, so it's worth removing whether we solve this mystery or not.

I already pushed a version where I removed that line. Doing that solved the problem for me. So I guess unless we encounter something similar in the future we can close this issue for now.

OK, I'll close it then.


PEGConv dont works in google colab

After I try to run peg in google colab, it generates an error in propagate()

TypeError                                 Traceback (most recent call last)
 in <cell line: 4>()
2 x =  data.x
3 edge_index = data.edge_index
----> 4 conv1(x, x, edge_index)
2 frames
 in forward(self, x, pos_encoding, edge_index, edge_weight)
90
91         # pos: l2 norms
---> 92         out = self.propagate(edge_index=edge_index, x=x,
93                                         edge_weight=edge_weight,
94                                         pos=rel_dist, size=None)
TypeError: propagate() got an unexpected keyword argument 'x'
Here the code, very simple.
https://colab.research.google.com/drive/1BrCrQ5hLa2pYF1LGjYGtyRHlyhqQV2dc?usp=sharing

I solved the problem. It is an error in messagepassing.propagate() itself. If you copy the pegconv code to a colab cell, it will report an error in propagate(), but if you import the pegconv.py file and instantiate it in the code with from pegconv import PegConv, then it will run


[change] use recheck instead of @makenowjust-labo/recheck

@Ran350 Thanks for using recheck. I'm recheck author, and please announce the new version of recheck here.
Since v4.0.0, we renamed @makenowjust-labo/recheck to recheck, and check is now checkSync.
This PR fixes recheck dep name, its version, and to use checkSync instead.
Ref MakeNowJust-Labo/recheck#144

Thank you for the PR!


Versioned API calls?

Do we want API calls to be versioned? i.e. to have a version in the path?

Yes I think it should be versioned and we should start with v1.

Done.


Integrating with 3rd party calendar

I'm quite confused trying to implement a binding for a 3rd party calendar widget.
Basically, once a date is chosen in the widget (onSet) how do I get that value into contact.dob?
<input type="text" rv-mobi-calendar='contact.dob'>

rivets.binders['mobi-calendar'] = {
	bind: function(el) {
        var self = this;
		var keypath = this.keypath;  //contact.dob
		var opts = {};
		opts.onSet = function(text, inst){
			console.log(inst.getVal())   //Wed Jun 29 2016 00:00:00 GMT-0300 (ADT)
            // how to get this back to my model?
		};

		mobiscroll.calendar(el, opts);  // instantiate mobiscroll calendar
	},

	unbind: function(el) {
	},

	routine: function(el, value) {
           // what goes in here?
	},

	publishes: true,
};

@greginns Here is what your going to want to do, I hope this makes sense.
Here is a jsfiddle with some notes in it: https://jsfiddle.net/Vornagreg/yq9x0qxx/
The pertinent bits:
Your bind function will setup the state of the binding. So, in the bind function of your example I have instantiated the 'mobiscroll' library and saved it to the closure as mobiScrollInstance
Also, i set the onSet callback of the mobiScrollInstance to call the publish method of the binding.
bind: function(el) {
        var opts = {};
        opts.onSet = this.publish;

        this.mobiScrollInstance = mobiscroll.calendar(el, opts);  // instantiate mobiscroll calendar
}

So, the important part is that the publish method of the binding will be called.
The publish method calls getValue: https://github.com/mikeric/rivets/blob/master/src/bindings.coffee#L109
The getValue method looks at your binding instance and will call another getValue method if that is available on your binding instance: https://github.com/mikeric/rivets/blob/master/src/bindings.coffee#L155
So, and here is the cool part, you define a getValue method on your binding instance, this will be called when the binder wants to set the value on your model, in the fiddle above, your getValue method will look like so:
getValue : function(el) {
     return this.mobilScrollInstance.getValue();
}

If you can get the mobiscroll lib working in jsfiddle, then I will totally help you implement this binder.
let us know how it goes!

That was what I needed.  Excellent, thanks very much!   I never would have figured it out on my own.  It works perfectly, keeps the date in getTime() format, and displays it properly.
My final binder looks like this:
rivets.binders['mobi-calendar'] = {
	bind: function(el) {
        var opts = {};
        opts.onSet = this.publish;

        this.mobiScrollInstance = mobiscroll.calendar(el, opts);
	},

	unbind: function(el) {
		this.mobiScrollInstance.destroy();
	},

	routine: function(el, value) {
		if (value) {
			this.mobiScrollInstance.setVal(new Date(value), true);
		}
	},

	getValue : function(el) {
    	return new Date(this.mobiScrollInstance.getVal()).getTime();
	},
};

I didn't know the getValue function on binders. It should be added to the docs. It's very interesting !


[Docs] Search - only include type/migration docs when explicitly searched for

Closes #3865
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

[X] It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
[X] This message body should clearly illustrate what problems it solves.
[ ] Ideally, include a test that fails without this PR but passes with it.

When searching the SvelteKit docs, currently both the type docs and the migration docs tend to get into the way.
This PR makes it so, that the search is filtered to only include routes containing "type" or "migrat" (stem of migrate/migration/migrating) if the query itself also contains those terms.
I initially wanted to address this by leveraging the boost option provided by flexsearch to give type/migration related search results a lower priority, but this option cannot yet be enabled in combination with {tokenizer: "forward"}.
PS: I also removed an unused variable from the codebase in the process.
Tests

[X] Run the tests with pnpm test and lint the project with pnpm lint and pnpm check

Changesets

[ ] If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpx changeset and following the prompts. All changesets should be patch until SvelteKit 1.0

Thank you but I'm not at all sure this is desirable. This is all that shows up if you search for migrat:

There'd be no way to search for the replacement for preload, for example.
And if I start typing requestha, there's a pretty good chance I'm looking for https://kit.svelte.dev/docs/types#sveltejs-kit-requesthandler — it would be deeply weird (and hard to discover) if I instead needed to search for type requesthandler or requesthandler type.
I could maybe be persuaded that #3865 is a big enough issue that we should implement some sort of prioritisation, so that migration docs go at the bottom if you search for something like stores...

...but this isn't the solution, I'm afraid.


Fix history not evaluating variables in names

Added get_character_name_text method to the text subsystem. This method evaluates and translates character's name and returns the final text that should be displayed. It's now used in the text event, character event, and in the update_name_label of the text subsystem.
Fixes #2127
https://github.com/dialogic-godot/dialogic/assets/25368491/79452ce9-e4bc-4c39-a4e4-8bad22a6ca0c

Looks good to me. Please use static typing as outlined in the styleguide https://docs.godotengine.org/en/stable/tutorials/scripting/gdscript/gdscript_styleguide.html. I've made the necessary changes and also named the method get_character_name_parsed (text was to generic for my taste ;)) and moved it to the helper section.
Thanks a lot for the PR!


remove ZF2_PATH env usage as requirement is zf ~2.5

:+1:

Thank you for your comments. I have implemented the changes but this has no effect on my problem.
As I am rather new to the framework, perhaps I can provide more detail.
Platform: MAMP Pro 3.2.1
This platform worked with zf2 version 2.4 and the Album project described in this version of the  documentation.
Then Composer pushed the zf2 version 2.5 update. The Album project broke. Is there 2.5 documentation? Is there a revised album project? I cloned the latest album code from the git repository and it didn't work either. I then changed the init_autoloader.php file as suggested with no change.
The problem with the Album project is as follows:
The error reporting will in development does not work. A Undefined index: APPLICATION_ENV is encountered.
The index action works. The add, edit, and delete action update the database but returns a blank page instead of the updated list of albums.
Any assistance would be appreciated.
Thank you.

APPLICATION_ENV seems not related with ZF2_PATH env, you can define the APPLICATION_ENV in you vhost like in documenation: http://zf2.readthedocs.org/en/latest/user-guide/skeleton-application.html

anyway, this change should for zf ~2.5, that's why i use titlle : "~2.5"

Thank you, the APPLICATION_ENV problem is solved. I hope someone can comment on the other issue.

A little more information:
In the version 2.4 user guide on the Forms and Actions page under Adding New Albums the following code is described:
1 // Redirect to list of albums
2 return $this->redirect()->toRoute('album');
After we have saved the new album row, we redirect back to the list of albums using the Redirect controller plugin.
1 return array('form' => $form);
Finally, we return the variables that we want assigned to the view. In this case, just the form object. Note that Zend Framework 2 also allows you to simply return an array containing the variables to be assigned to the view and it will create a ViewModel behind the scenes for you. This saves a little typing.
This seems to be the section that fails and returns a blank page. It is now making it to the view. How would you debug this?

I think that is separate issue, or more a question instead of issue. Not related with this PR
Warm regards,
Abdul Malik Ikhsan
Pada 15 Sep 2015, pukul 04.16, John Pedosuk<EMAIL_ADDRESS>menulis:

A little more information:
In the version 2.4 user guide on the Forms and Actions page under Adding New Albums the following code is described:
1 // Redirect to list of albums
2 return $this->redirect()->toRoute('album');
After we have saved the new album row, we redirect back to the list of albums using the Redirect controller plugin.
1 return array('form' => $form);
Finally, we return the variables that we want assigned to the view. In this case, just the form object. Note that Zend Framework 2 also allows you to simply return an array containing the variables to be assigned to the view and it will create a ViewModel behind the scenes for you. This saves a little typing.
This seems to be the section that fails and returns a blank page. It is now making it to the view. How would you debug this?
—
Reply to this email directly or view it on GitHub.

Thanks,
I will post it as a separate issue.

Accomplished with #329 ; thanks for the nudge, @samsonasik !


Cool part of List forms a nice landmine, document it all as traps

my @a = <a b c d>;
say @a.contains(‘c’);    # True
say @a.index(‘a’);       # 0
say @a.starts-with(‘a’); # True

I don't understand what about this is a trap.

Each of the examples given does exactly what I would expect it to do... I'm also not sure how this is a landmine/trap.

see: https://irclog.perlgeek.de/perl6-dev/2016-10-27#i_13476643
The majority opinion seams to be no-trap. However, we do a poor job to explain the dynamic nature of Perl 6 in general. We don't even got a section in the docs to put such explanations.

Actually, the majority opinion is that it is a trap indeed, hence the whole discussion about ways to solve it. For example, the first comment here clearly indicates that.

Just as there are operators that coerce their operands to a specific type (e.g., &infix:<+>, &infix:<~>, &infix:<?&>), so there are (Cool) methods that treat their invocants as a specific type.  For example, @array.flip means something very different from @array.reverse .  And we eliminated ".length" altogether because of its inherent ambiguity, moving instead to .elems, .chars, .codes, etc.
So, .index implies "coerce to a string".  I don't know when .contains and .starts-with were added to Perl 6, but it seems clear to me that those were intended to be "stringy methods", and if I use them I expect them to treat their invocant as if they are a string.  That's just the way Perl 6 is designed to work.
Moving List out of Cool strikes me as all sorts of wrong -- having Lists (Arrays) automatically coerce into string or numbers as needed has always struck me as being one of the fundamental strengths of Perl.
Pm

@pmichaud yea, great, but as far as I know there is no ticket yet where this discussion would be appropriate.
The point of this issue: you may accidentally use @a.contains($elem) and it may seem like it is working, but in reality it is a method that works on strings. Given that it's something that is not obvious (it's not .str-contains, also List itself has no .list-contains) and given that it may produce false results that are right sometimes, it is a trap which should be documented. The description of this trap may include justifications for such trapy behavior, that's fine.  Just because you are aware of this problem does not mean that everyone reading the docs knows about it too, and there is no reason to assume that they should magically know about these details.
And this applies to all other issues regarding traps. If your general idea is that Perl 6 is flawless and everyone who might think that @a.contains($stuff) does exactly what it says is so dumb that he doesn't deserve a little section in the documentation, that's fine. Just move on.

well, none of your examples are surprising, because all of your examples are the list acting like "contains" and "starts with" and "index" work the way they intuitively would with lists, so I didn't understand the problem. On the other hand, these look like traps:
say <a b c d>.index("c"); # 4
say <a b c d>.contains("b c"); # True
say <a b c d>.starts-with("ab"); # False

and I would not have guessed any of this from your examples. I would expect -- and i think most people would expect -- lists to provide a function called something like "index" that returned the index of that value in the list. I would expect "contains" to be something like "has as sequential elements". I would expect "starts-with" to be "contains starting at index 0". The fact that these are not what these methods mean to a list is surprising. Your examples just happened to not show the surprising results.

in fact, is there a reason that List.contains(Any $needle) doesn't exist as self (cont) $needle ? etc... ?

my first shot at tackling this problem with<PHONE_NUMBER>

I see that this change has been basically accepted, in a modifoed form. I may provide more feedback to the text for its own sake, but I also have some reservations about this commit as a fix for this problem. Basically, I don't think that the "trap" here is in not understanding how coercion works; I think the trap is that it is not clear that coercion happens because the names of the methods read like perfectly good methods to use on a list. So while this text may be good, it does not clear up the confusion of this particular situation.

Wow, I just reread comments here… I guess I'm bad at conveying ideas, but others should really turn the volume of their “I know perl and I'll never make this mistake” speaker.
@VynceMontgomery++ for defining the problem precisely in one sentence.

I think the problem is that it's not obvious which of the methods convert to string (or number) and which don't.
People who've been around since these methods started to exist, the learning curve is easy and slow, and "of course" they know which method does what.
People who're new to Perl6 will have a large list of method names to learn at once. If they aren't specifically made aware that they need to learn by heart whether there's a conversion or not, they'll just assume (yeah I know it's bad, but you can't learn everything at once so you must assume at least a few things), then they'll form inconsistent ideas about what's really happening, and will fail.

I still think that's only part of the problem.  The fact that List.index is a perfectly valid concept (and extant in other languages) means that people will expect List.index to do what List.index ought to do. No-one has yet provided a reason it shouldn't. Similarly, List.contains and List.starts-with. Why not make them do the obvious thing for lists? And, until they do, make the documentation super clear that while yes, that's what you might expect, it's not what happens.
Perl6 has no native speakers, yet, and this is not a holdover from Perl5. The community of people who are likely to be tripped up by this is everyone who comes to the language fresh; the community of people who will know that List doesn't natively .contain or .index is going to be a fraction of the people who have been with Perl6 since before this decision was made, i.e. much much smaller.

That's an interesting thought, actually. I think most people will oppose the idea of .contains or .starts-with doing something different, me included. However, I wonder why these methods should work at all.
Has anybody ever used List.contains for some useful purpose? If this gave a warning, would somebody experienced even notice it?

Why would you be opposed to making List.contains do the obvious thing?
(I do not think List should inherit part of Cool and disable other parts; that seems like madness. But making it do the obvious useful thing seems ... obviously useful.)

Well, to put simply, .contains checks if a string exists in another string. That's it (right now). You are thinking about redefining that, which may or may not have a good justification, but I doubt it will become reality (not perl6-ish, each thing should do its own thing, etc.).
At the same time, @list.contains with the current implementation is just nonsense. It does not do what anybody wants, it is full of traps, there's no reason for it not to be disabled. May seem like madness, but at least we will get rid of the trap (without any drawbacks, unless somebody can name any).

I'm asking why you oppose it, not whether you think it will happen; "It won't happen" isn't a reason to oppose it, it's a prediction about whether your reason matters.
If your answer is "Not perl6-ish" I don't understand -- how is it not perl6ish? perl6 has lots of builtins that do the right things, and TIMTOWTDI. Having a method that is an English word that does notionally the same thing as an operator that is named an abbreviation of that word seems quite perl6ish. That's the argument for .contains working like (cont); I feel the others flow naturally in a parallel way, though as far as I know there isn't a synonym of .index simpler than using .first:p and looking at the index in the pair. Also, it looks like starts-with is no longer supplied by Cool.
(Though, for even better parallelism with String.contains, List.contains could take a list and return true only if that list exists as a contiguous sublist.)
To be clear, IMO the current implementation isn't nonsense; it's just not as sensible as making it be a synonym of the (cont) operator.
"No reason for it not to be disabled" except that simply disabling it:

provides no actual functionality
removes functionality (albeit of questionable value) that fits a predesignated paradigm, and
is a bit arbitrary. Where do you draw the line? The whole point of Cool is that it provides a fallback for a bunch of DWIM behaviors that are individually questionable; how would you decide which ones to keep? (substr a number? really? but that's literally the first example, so...)
So I would argue that disabling it is clearly not Perl6ish.

Anyway, I don't see anybody objecting to making the documentation for contains explicit about the List traps on "contains" and "index", and, i guess, "rindex". "match" is already explicit about the coercion.

The whole point of Cool

is to have strings and numbers behave similarly when you need it. The fact that List is Cool is very unfortunate. I guess the main reason was that things like @a == 5 should work, but the whole stringy part of Cool is totally worthless. In fact, even all of the trigonometry functions probably don't give anything useful, but at least there are no traps associated with them.

To be clear, IMO the current implementation isn't nonsense

The implementation itself is not, but if somebody writes something like @a.contains(…), it is nonsense.

I'm asking why you oppose it
OK, let's look at this code:

$music.contains(‘foo’)

By redefining .contains the way you say, we will lose clarity here. And I don't think it's worth it.

"we will lose clarity" is not a complete description. What is unclear about it? We're going to look through $music to see if it contains 'foo'.

Sooo… an element or a substring? :)

Whichever is appropriate. I don't understand why you're saying that's unclear. Are you arguing all polymorphism is unclear?

It's a fairly clear Perl 6 design principle that operations have consistent semantics and coerce their operands. That's why we have == for numeric comparison and eq for string comparison, for example. In general, you can sensibly have dynamic types and operations with fixed semantics, or static types and operations with overloaded semantics based on type. Doing dynamic types with overloaded semantics based on type gets you unpredictable programs even if you learned the language really well.

The point here is the combination of lists and coercion creates inconsistencies.
Consider a list of lists; does <<a> <b> <c> <d>> contain <b c>? One would say it doesn't because it's a silly case, but then consistency would demand that <'a' 'b' 'c' 'd'> does not contain 'bc', but IIUC we want 'bc' to to converted to <'b' 'c'> to make the comparison meaningful.
"Convert if it makes the operation meaningful" as a guiding principle doesn't work well for lists in general.
Consider appending. What should happen if you append <1 2 3> to <5 'xy' Nil>? Do we get 5 'xy' Nil 1 2 3> or <5 'xy' Nil <1 2 3>>? Both would be consistent with any converting policy, and depending on the exact element types, one or the other interpretation could be "more natural".
My personal opinion is that for lists, particularly polymorphic ones, there's no clear guideline and the available functions need to be explicit about whether there's a conversion or not, because otherwise learners and coders will keep mispredicting the code's behaviour because there's no hard-and-fast rule.
I have seen a lot of solutions, working and nonworking alike, so I can elaborate if somebody is interested.

On Thu, Jul 06, 2017 at 12:20:37PM +0000, Joachim Durchholz wrote:

The point here is the combination of lists and coercion creates inconsistencies.

I've been following this thread off-and-on and feel like chiming in here.
Personally I don't think the problem is one of "lists and coercion"... because if that's the case then we can pretty much say "the problem is one of XXX and coercion" for many types.
I think the problem is that the phrase "contains" has overloaded meanings depending on whether we're looking at a string, list, bag, hash, whatever.  As Jonathan points out, using polymorphism in this case (i.e., Str.contains doing something entirely different from List.contains) is just replacing one set of traps for another, because I can never be entirely certain what C< $x.contains("foo") > is going to do.
(Yes, this sort of ambiguity is often a desirable feature of polymorphism.  Not here.  And we've generally tried to sweep such ambiguities into a single place, such as smart matching, rather than let it be spread throughout CORE.)
In the past when this has happened (e.g., ".length", ".reverse"), our solution was to eliminate the ambiguous term in favor of adjectives that made the operation much more obvious/explicit ('.elems', '.chars', '.codes', '.flip', etc.).
Personally, I really dislike the notion of "contains" having a Stringy interpretation at all -- the word "contains" has more obvious connections to things that involve containers (lists, hashes, arrays, etc.) and not so much with strings.
(Yes, I know that a string can be considered a container of characters (or codepoints).  But we also don't allow .[] on strings either, for similar reasons.  And even here stringy .contains isn't looking for membership of a single element, but rather a specific subsequence of elements.)
Things that other languages do to avoid this ambiguity:
strstr
instr
findstr
I think the solution is to change stringy ".contains" to some other phrase, as opposed to trying to make the polymorphism work.
Pm

I would totally support that approach (though I've never liked the name "strstr").

I agree with @pmichaud:

The Perl way of using differently named coercive routines for different behaviors (rather than going wild with polymorphism) is generally a good thing.
However, to do that well, routine names have to be chosen very carefully to not mislead people.
The name .contains was a dubious choice for what it does. (And should maybe be deprecated or renamed in 6.d).

And I would also add:

List and Map being Cool was done for historical reasons (emulating Perl 5), and might not have been a good idea.

Stringy and numeric types sharing the same coercive methods has lots of utility and doesn't tend to be confusing in practice; List and Map being part of the mix is what tends to cause traps.
Looking at the things that Cool provides, I don't see much (if anything) that I would feel comfortable calling on a List or Map without explicit coercion for better code clarity. (Maybe @foo.sqrt, but eh.)
Other collection types (e.g. Set) aren't Cool simply because the historical reasons didn't apply to them, and they do fine without it.

After all the commits related to this issue, would you consider it solved? What would remain to be done?

I think it needs a list of things not to use (kinda, depending on context) with text like ≈“If you're working with lists, these methods will likely not do what you mean (as they will stringify your lists first): .contains, .index, .starts-with, …, …, …, …, …, …”

↑ so that if a user is using let's say .starts-with and it acts weirdly (in their eyes), they can go to traps page and just ctrl+f for “starts-with”. In theory the documentation for starts-with should already have enough info, but right now it just says:

Returns True if the invocant is identical to or starts with $needle.

If you connect the dots you'll clearly see why that happens, but having a useful entry on the traps page can be beneficial I think (more so if the general issue is discussed in depth and we will be able to link to it to explain the confusion).


Issue template doesn't work

Issue Description
bug report
Hi there! I encountered a problem that I believe it's already included since #313. Am I missing something?
Describe what happened

git clone pwntester/otco.nvim.
cd into it and open nvim.
Run ":Octo issue create".
No template is found.

Tell us your environment

NVIM: v0.9.5, LuaJIT 2.1.1692716794
OS: Arch Linux x86_64

I have the same problem I have three templates and none of them are listed. I did notice tho you had to select a template in order for the template to be triggered by the GitHub CLI, so it could be a change on that side.

Same here, although gh also doesn't recognize my templates when gh issue create.

With recent updates to gh CLI tool, I am no longer having an issue with this

I use gh version 2.54.0 (2024-08-01) and meanwhile it work's at least in one repo. I can't tell how long because I haven't created any issues in this repo (it's basically a test repo) for quite some while.

After some testing it's apparent that gh only detects templates in markdown.
Any template forms in yaml are not detected.
https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository#creating-issue-forms
gh needs to support indexing these as templates for issue creation


🐛 [BUG] - Storz image from nav menu has a hover effect but it doesn't do anything

Description
If the user is hovering over Storz image in the nav menu and clicks it, it doesn't do anything. Remove the hover or add a scroll up event
Reproduction URL
https://storz.pages.dev/
Reproduction steps
1. Go to https://storz.pages.dev/
2. Hover the Storz image in the nav menu on the top left
3. Click it
4. Nothing happens

Screenshots
No response
Logs
No response
Browsers
Chrome
OS
Windows

Hi @nujovich, you can remove the hover effect.


Firefox Color Theme

Firefox just launched Firefox Color a new theme system for Firefox.
I've tried to create support for this new awesome theme system, but I failed.
Could anyone with more expertise create and share with us?
https://github.com/dracula/dracula-theme#color-palette
Thanks

Like this? https://color.firefox.com/?theme=XQAAAALrAAAAAAAAAABBqYhm849SCiazH1KEGccwS-xNVAVU52hsH-vWaG_44BqU3aonaJe5I4Ohp5xTZgxNtKhNXqWhWjJPgwg1qKVhJcS2YIc92lM34bCs2ived0PtTJd62px8cBPBzotac9o2JRtKIh4-9mnar7Goflxrvy7X2t78g10W7CH4gjVFzCEHhpncSSmuJECJCbs20r5OS81K_WbZCWHsemq5Ngm11KJbfhM2__QLLQA

Awesome, looks gorgeous!
Thanks @hacknug.

@zenorocha should we add this to the site and maybe create a new repo for it?

i`m created one theme in the new version on firefox
Dracula dark theme

@zenorocha

Closing since we already have this theme live:

https://draculatheme.com/firefox
https://github.com/dracula/firefox
https://addons.mozilla.org/en-US/firefox/addon/dracula-dark-colorscheme/


OpenSSL 3 support

From this issue
@ckgt Prisma hasn't supported OpenSSL 3 until the recent release of Prisma 1.13.0. I've updated the engine CLI versions in the latest commit, change tag = "0.4.1" to rev = "b3c93e9eced80e259578e9a916531940c3876ad5" to use the latest engines.

Hmm, Prisma haven't actually release v1.13.0 of the CLI, only the engines. I'll get back to this issue when 1.13.0 is available.


I've opted to start using biome on a project with multiple workspaces.
After initial setup with npx @biome-js/biome init and no changes to the config I received around 8000 errors. I wanted to know what rules trigger these errors and apply safe fixes gradually.
Trying to execute npx biome lint --only=complexity/useArrowFunction I was presented with only 12 occurrences with this error. So I wanted to apply fixes just to this rule with:
npx biome lint --only=complexity/useArrowFunction --write
biome has resolved all fixable errors instead of the 12 complexity/useArrowFunction.
Instead of the strategy of resolving errors gradually I had to skip rules in the output to get the list of all rules that have been reported. I've ended up with this command:
npx biome lint --skip=style/useImportType --skip=complexity/useArrowFunction --skip=complexity/noUselessFragments --skip=style/useNodejsImportProtocol --skip=style/useAsConstAssertion --skip=style/useSelfClosingElements --skip=suspicious/noArrayIndexKey --skip=correctness/useJsxKeyInIterable --skip=style/useNumberNamespace --skip=a11y/noBlankTarget --skip=a11y/useKeyWithClickEvents --skip=suspicious/noShadowRestrictedNames --skip=style/noUnusedTemplateLi
teral --skip=suspicious/noConsoleLog --skip=suspicious/noGlobalIsNan --skip=a11y --skip=style/noParameterAssign --skip=style/noUselessElse --skip=style/useTemplate --skip=complexity/useOptionalChain --skip=correctness/useExhaustiv
eDependencies --skip=correctness/noChildrenProp --skip=suspicious/noImplicitAnyLet --skip=complexity/useLiteralKeys --skip=style/noInferrableType

Expected result
Executing npx biome lint --only=complexity/useArrowFunction --write should only fix the useArrowFunction rule
Code of Conduct

[X] I agree to follow Biome's Code of Conduct

This doesn't fix the issue, however note that you can also skip an entire group --skip=correctness. This could make easier your life in the meantime.


Uploading Advanced RAG notebook and QA Notebook

Advanced RAG: Demonstrates using LLamaindex and Weaviate for advanced RAG techniques
QA Notebook: Demonstrates how the LPI Q_A dataset was generated

Summary by Sourcery
Add two new notebooks: an Advanced RAG notebook showcasing advanced retrieval-augmented generation techniques using LLamaindex and Weaviate, and a QA Notebook detailing the generation of the LPI Q_A dataset. These notebooks provide practical examples and insights into advanced machine learning applications and dataset generation processes.
New Features:

Introduce an Advanced RAG notebook demonstrating the use of LLamaindex and Weaviate for advanced retrieval-augmented generation techniques.
Add a QA Notebook that demonstrates the generation of the LPI Q_A dataset using various machine learning models and techniques.

We are closing this PR as @TobeTek has raised a new one - https://github.com/neomatrix369/learning-path-index/pull/117


Black Screen while using highest gameplay preset

While I'm using the highest gameplay preset I'm having a lot of black screens, just notice that I have a fresh install of reshade and the only addon that I have is the Generic Depth.
screen1 screen2

This means you probably didn't install the ReShade with full add on support at http://static.reshade.me/#download
without that then the depth buffer will flicker and repeatedly be turned off/on by reshade as it detects ff14 network activity, and my shaders make extensive use of the depth buffer resulting in the black screens as the shaders are using a blank depth buffer.


A few brazilian portuguese translations - To Be Continued

I've started the translation for a new language but didn't know if it was a problem using pt-br instead of ptbr. Since there's also pt-pt and had no other examples of dualities I went for ptbr without the -

Here should be the list of possible locales: https://angular.io/guide/i18n-common-locale-id#refer-to-locales-by-id
Based on that I think it should be with -, but needs to be tested.
I will merge this and take a look

It works if I add -:


Use standard Netscape cookies.txt format for loading/saving cookies

Sometimes cookies are needed to get past the "Too many users have viewed or downloaded this file recently" error. Currently the cookies format used is a non-standard JSON list of key value pairs. It would be easier for users (e.g. #271) if the cookies format was something standard, like cookies.txt, as there are many browser extensions for downloading cookies.txt files for a website. This PR makes saving/loading cookies in Netscape format the default, but allows the program to load the old style JSON format if no cookies.txt is present.

@7x11x13 Thanks for the PR. Merged this via #300. Releasing v5.0.0 soon.


Not possible to remove an expiration date

as admin
create a page and set an expiration date
edit that page and try to delete the expiration date
-> there is no obvious way to delete a date once set (this is a UX problem)
-> if the user selects the date and hits the delete key the date/time is greyed out but after save the old expiration date is still set (this is a bug)

@nzambello did you run into this problem already? Does the datepicker lib support the removal of a date once set?
@iFlameing could you please write a Cypress test for this (that fails right now of course)?

duplicated of #1422


RCTBridgeModule.h' file not found

Getting this isssue in xcode when I try to build on first installation:
Lexical or Preprocessor Issue Group

'RCTBridgeModule.h' file not found

In file included from /Users/{usr}/repos/repo/node_modules/react-native-segment-analytics/ios/SegmentAnalytics/Classes/SegmentAnalytics.m:5:

I fixed this by starting over.  Cant confirm if this was merely user error

This happening often, but then will magically disappear after a while. Any idea what is going with this?

I have been getting this recently and can't build my project on iOS

Add this line to the SegmentAnalytics.podspec file
  s.dependency 'React'

Should fix it


Evaluate grounding

InvernVl-8B, use prompt
"Please provide the bounding box coordinates of the region this sentence describes: human"?
to get bbox. However, the output of model  is
"The bounding box coordinates of the region this sentence describes are [x1, y1, x2, y2]."

It seems that the model's output is normal. Could you please provide more details about your issue?


Make oculus hand rendering controled by the hand visualization profile

Overview
Makes the Oculus hand mesh rendering controlled by the Hand Visualization Profile
Changes

Fixes: #8793

Verification

This optional section is a place where you can detail the specific type of verification
you want from reviewers. For example, if you want reviewers to checkout the PR locally
and validate the functionality of specific scenarios, provide instructions
on the specific scenarios and what you want verified.
If there are specific areas of concern or question feel free to highlight them here so
that reviewers can watch out for those issues.
As a reviewer, it is possible to check out this change locally by using the following
commands (substituting {PR_ID} with the ID of this pull request):
git fetch origin pull/{PR_ID}/head:name_of_local_branch
git checkout name_of_local_branch

@cre8ivepark one thing I changed with this PR was to make the ToggleHandVisualization Panel not override the settings in the Hand Mesh Visualization profile on startup. Kurtis tells me that this was the intended design tho, so I'd like your feedback on making this change. One of the comments that caused this issue to get raised in the first place was the user believing that the profile was the universal controller for Hand Mesh visualization: https://github.com/microsoft/MixedRealityToolkit-Unity/issues/8793

To reproduce
Steps to reproduce the behavior:

Go to MixedRealityToolkit config
Click on Input
Scroll down to Hand Tracking
Click on Hand Tracking
Set Hand Mesh Visualization Modes to nothing
Press play and notice Oculus mesh stays

/azp run

@RogPodge @keveleigh As long as we can toggle hand mesh visualization, it sounds good!

/azp run


Admin cant see devices created by other users.

Hi
I logged into the system as admin then created user A then I logged out. I then logged in again as user A added a device and the device is online and I can track it. However when I logged in again as Admin I could not see the device.
is there a way that admin   can see devices that have been added by other users?.
I am using traccar 3.11 on a windows server

Please use search before posting any questions:
https://www.traccar.org/forums/topic/seeing-all-devices/


Feature request: Allow to hide models from the list in a single click

Why
Ease of use
Description
In the model list, one can easily hide a model with a single click by clicking the eye icon.

But hiding the model requires many extra clicks:, Click settings, click the visibility toggle, click Close.

Could we have the eye icon to toggle visibility in a single click?
This becomes rather tiresome with providers such as openrouter that provide a great amount of models and constantly update them.
Thanks!

Thanks for asking! Done.

Thanks so much for implementing it <3


In MIG, the relationship between GRACT and DCGM_FI_PROF_GR_ENGINE_ACTIVE ?

env
GPU: A100
MIG: 7g.40gb
DCGM: v2.3.2
DCGM-EXPORT: v2.3.4-2.6.4
result
1、cmd: dcgmi dmon -e 1001,1004 -g 2

2、dcgm-export

question
I want to know the GRACT get from dcgmi dmon is the same as DCGM_FI_PROF_GR_ENGINE_ACTIVE  get from dcgm-export?

@Lzhang-hub,
Yes, the DCGM_FI_PROF_GR_ENGINE_ACTIVE in the dcgm-exporter and dcgmi dmon -e 1001 are the same metric.
The difference is the moment when this metric is gathered and how often.
You could try to run dcgmi dmon -e 1001 -g 2 -d 30000 to read the value every 30 seconds (IIRC that's the dcgm-exporter default interval). Those values are not aggregated during the monitoring interval, those are instantaneous values.

@nikkon-dev
thank you replay!
And another question, I also want monitor memory utile for MIG instances , but I can not find some metrics from dcgm-export ,can you give some advice, thanks!

@nikkon-dev
We test mig with a train job and monitor through dcgm-exporter+prometheus+grafana, But we got the error result:
First,got mig instance for job through nvidia-smi: GPU0 GI 4

Then, got gpu utile from grafana, we found all GPU are used:
GI 3

GI 5

We make sure that only one task runs!
Can you give some advice? Thanks!


Socket leak in multi-thread context

Hello,
This code leaves sockets in UNCONN state on x86_64-unknown-linux-gnu target:
fn main() {
    for _ in 0..10 {
        std::thread::spawn(|| {
            let addr = nix::sys::socket::UnixAddr::new_abstract("lock".as_bytes()).unwrap();
            let sock = nix::sys::socket::socket(
                nix::sys::socket::AddressFamily::Unix,
                nix::sys::socket::SockType::Stream,
                nix::sys::socket::SockFlag::empty(),
                None,
            ).unwrap();

            nix::sys::socket::bind(sock, &nix::sys::socket::SockAddr::Unix(addr)).ok();
        });
    }

    loop {
    }
}

$ ls -1 /proc/$(pidof nix-bug)/fd | wc -l
13

$ ss -pl | grep $(pidof nix-bug)
u_str UNCONN 0      0                                           @lock 5787260                       * 0     users:(("nix-bug",pid=1262266,fd=3))
u_str UNCONN 0      0                                               * 5789618                       * 0     users:(("nix-bug",pid=1262266,fd=9))
u_str UNCONN 0      0                                               * 5806081                       * 0     users:(("nix-bug",pid=1262266,fd=5))
u_str UNCONN 0      0                                               * 5789617                       * 0     users:(("nix-bug",pid=1262266,fd=6))
u_str UNCONN 0      0                                               * 5787261                       * 0     users:(("nix-bug",pid=1262266,fd=8))
u_str UNCONN 0      0                                               * 5806082                       * 0     users:(("nix-bug",pid=1262266,fd=10))
u_str UNCONN 0      0                                               * 5787262                       * 0     users:(("nix-bug",pid=1262266,fd=11))
u_str UNCONN 0      0                                               * 5797603                       * 0     users:(("nix-bug",pid=1262266,fd=7))
u_str UNCONN 0      0                                               * 5797602                       * 0     users:(("nix-bug",pid=1262266,fd=4))
u_str UNCONN 0      0                                               * 5797604                       * 0     users:(("nix-bug",pid=1262266,fd=12))

Yes, that's right.  Nix's socket method returns a RawFd, so it can't do anything fancy on drop.  There's no way to fix that without breaking a lot of existing Nix consumers' code.  And I don't think that Nix should even try.  Nix is a low-level library.  A Nix consumer can implement more ergonomic types that wrap Nix's RawFd, and do fancy things like close on drop.  Do you disagree?

If you can’t easily fix this problem, it’s probably a good idea to document this behaviour, I spent a lot of time to understand why my cron job reach the limit of file descriptors.

Nix's safety guarantees do not currently extent to "correct" or "expected" behaviour on the OS side. Safety is guaranteed with regard to memory safety of the rust program itself, but not in side-effects of the OS. To find out what Nix-functions do you need to read the frequently linked OS-documentation and nothing in the documentation of bind() speaks about closing the socket. Maybe we need a better crate-level description of this than "Rust friendly bindings to the various *nix system functions."
Also note that the unsafety of RawFds is currently being discussed on rust-lang level https://github.com/rust-lang/rust/issues/72175

Closing this issue.  I couldn't have explained it better than FloLo100.


Something wrong in the SENET

There are someting wrong happened in the SENET when I copy the code and train it in my cpu. In the first Epoch 1/250, the begaining the loss is decrease and the accurancy increaing, yet, when the iterations came to 464/781, the loss became to "nan', I don't know what happened.
the config:
cardinality = 4
batch_size = 64
iterations = 781
Please help me.

I just test it with GPU and it works for me.
Can you try it again or describe some details for me?


Protected equivalent of duk_get_prop and duk_put_prop for accessors?

The duktape API has "protected" variants of duk_call and duk_callmethod, namely duk_pcall and duk_pcallmethod.  When an error is thrown within a call to duk_pcall, for example, it is "caught" and an error code is returned instead of propagating outside of duktape.
A similar issue can arise when "getting" or "putting" a property that has an accessor.  If an error is generated within the accessor function, it will not be caught and will instead propagate outside of  the call to duk_put_prop or duk_get_prop.  Is there some way to do something like duk_pput_prop or duk_pget_prop in cases like this?
Alternatively, is there some way to discover that a property has an accessor and call its accessor function directly with duk_pcall or duk_pcall_method instead of using duk_put_prop or duk_get_prop?

As a general rule almost any Duktape API you call can throw an error out of your reach.  There's a general mechanism to catch them: duk_safe_call().
The only reason there are dedicated protected variants of call, compile, etc. is because these are almost guaranteed to throw at some point so you always want to guard them.  duk_safe_call() is the general-purpose mechanism.

@fatcerberus How would you use duk_safe_call from C to call a property's set accessor function?

@beevik You'd normally use duk_safe_call() to call a C function which then called duk_get_prop() which would invoke the possibly throwing getter.

@beevik As some background, the reason there isn't a protected variant for property API calls is a conscious API design choice: almost any API call can throw in some situation; be it out of memory, and error thrown by some side effect (getter, setter, Proxy), execution timeout, etc. So adding protected variants for potentially throwing calls would mean almost doubling the API call count.
It's easier to provide a small set of protected calls, and then use unprotected calls within the call targets. The main protected calls either make an actual function/method call (duk_pcall() etc) or make a pure C call (duk_safe_call()) which can be used as a catching wrapper for all other API methods (internally duk_safe_call() is used almost exclusively to implement protected calls).

I see.  Thanks for the clarification.  This answers my question.

@svaarala On a related note, I've always found the naming of duk_safe_call() confusing.  It does something totally different from duk_call() despite the similar naming.  Compare duk_to_string() vs. duk_safe_to_string() which do the same thing except one is guaranteed not to throw.
I remember being confused for a long time why duk_safe_call() needed a native callback as an argument, since duk_call() doesn't.  I think a better name would have been duk_try(), which is exactly the naming I used for this primitive in JSAL.

I agree, and we actually discussed this a while back already: duk_safe_call() is named inconsistently compared to duk_safe_to_string(). duk_protected() would be more consistent and would match the abbreviated "p" in duk_pcall().

Here's that previous discussion:https://github.com/svaarala/duktape/pull/922#issuecomment-241488596.

I actually wrote some naming notes after that previous discussion, it also mentions the inconsistency: https://github.com/svaarala/duktape/blob/master/doc/api-design-guidelines.rst#api-calls.
The inconsistency should be fixed by adding a better named alias for duk_safe_call(), and then removing duk_safe_call() after a long transition period.


SSH connection to guest drops out

I use UTM to remote develop from vscode to linux 20.04 on a macbook pro m1. Randomly during the day i loose the ssh connexion beyween vscode and the VM. Even trying to connect from the mac directly to the VM throught ssh does'nt work. I need to restart the VM to get the connexion working again.
Each time the VM is not crash i can connect on it directly throught UTM it's only ssh connexion.
Does someone else get this kind of pb ? It is less often between 3.1.5 but get the same pb since 2.x
Configuration

UTM Version: 3.1.5
OS Version: 12.2
apple silicon

same here!
UTM Version: 3.1.5
Macbook M1 Pro CPU

I lost ssh connection to Ubuntu 20.04(Linux 5.4.0-104-generic kernel) VM and sometimes I can still access to VM console to reboot.
But in general can't access from UTM console too to be able to restart.
I have only one option! stop/kill the instance. After that  my vm crashes and never boots.

@ismailyenigul see https://github.com/utmapp/UTM/issues/2682#issuecomment-1064827650 about the "never boots" issue.

@QuentinGuyot-epitech Please add the information that was requested in the New Issue template. Your report lacks all VM configuration information (VM config plist, debug log).

debug_UTM.log
config.plist.txt
@conath Here are the requested files. Thanks !

Duplicate of #3143 - solution for macOS users is to switch the VM’s network mode to Shared or Bridged Mode. Then you don‘t connect via port forwarding but instead just use the VM‘s IP.

Switching from/to Shared/Bridged mode does NOT solve the issue.


Panic with window function LAST_VALUE

Describe the bug
Panic with window function last_value
To Reproduce
DataFusion CLI v14.0.0
❯ CREATE TABLE t1 AS VALUES('A', '1'), ('A', '2'), ('A', '3'), ('B', '1'), ('B', '2'), ('B', '3');
0 rows in set. Query took 0.002 seconds.
❯ SELECT column1, column2, LAST_VALUE(column2) OVER (PARTITION BY column1 ORDER BY column2) FROM t1;
thread 'thread 'tokio-runtime-workertokio-runtime-worker' panicked at '' panicked at 'Iterator must be sizedIterator must be sized', ', /Users/changchengxing/.cargo/registry/src/github.com-1ecc6299db9ec823/arrow-array-26.0.0/src/array/string_array.rs:171:24
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
/Users/changchengxing/.cargo/registry/src/github.com-1ecc6299db9ec823/arrow-array-26.0.0/src/array/string_array.rs:171:24
+---------+---------+------------------------+
| column1 | column2 | LAST_VALUE(t1.column2) |
+---------+---------+------------------------+
+---------+---------+------------------------+
0 rows in set. Query took 0.004 seconds.
❯

Hi @ZuoTiJia, I tried on my desktop but it didn't panic.
DataFusion CLI v14.0.0
❯ CREATE TABLE t1 AS VALUES('A', '1'), ('A', '2'), ('A', '3'), ('B', '1'), ('B', '2'), ('B', '3');
0 rows in set. Query took 0.002 seconds.
❯ SELECT column1, column2, LAST_VALUE(column2) OVER (PARTITION BY column1 ORDER BY column2) FROM t1;
+---------+---------+------------------------+
| column1 | column2 | LAST_VALUE(t1.column2) |
+---------+---------+------------------------+
| A       | 1       | 1                      |
| A       | 2       | 2                      |
| A       | 3       | 3                      |
| B       | 1       | 1                      |
| B       | 2       | 2                      |
| B       | 3       | 3                      |
+---------+---------+------------------------+
6 rows in set. Query took 0.011 seconds.

Could you please try the latest commit on the master branch? I guess the bug was in arrow-26.0.0 and the dependency has been updated to arrow-27.0.0 now.

Close this ticket now. As the bug has been fixed.


fix(rules): revert TrailingCommaMultiLineRule

Fixes #257 #256
Temporary disable this rule (too buggy for now).

Can you also update the test, thanks

Thanks, released

Thank you @VincentLanglet


XML component codec

It would be nice to have each "independent" fragment of XML I/O separated into functions and exposed so that other vocabularies can re-use the expressions. In particular, I would like to use the codec for root DocOckPaths.Identifier.signature in root's XML codec.

Using root DocOckPaths.Identifier.signature in root's XML codec is required for dsheets/codoc#54 and an XML codec for documentation comments is required for dsheets/codoc#53.


fix: Use SIGTERM and SIGINT aware context for bootstrap operations

Release Note
fix: Use SIGTERM and SIGINT aware context for bootstrap operations

Looks great, but may I ask what kind of issues this could solve?

This fixes graceful termination of the operator pod, whenever it's bootstrapping, either because it has started recently, or the informers are still starting / stuck, and avoids waiting for the termination grace period to expire.

Also, should we extend the same technique for kamel CLI to simplify handling of SIGTERM/SIGINT, for instance in local_run.go?

That's less critical than for the operator IMO, still would be better yes.


Not seeing a NaN when expected on initial import

Original author<EMAIL_ADDRESS>(May 10, 2011 17:48:18)
What steps will reproduce the problem?

Import the attached file (containing simply the number 0 and a header)
Edit cells -> Transform: value / value

What is the expected output? What do you see instead?
Expect to see NaN - see instead null.
What version of Google Refine are you using?
2.0
What operating system and browser are you using?
Windows Chrome
Please provide any additional information below.
If I transform the column to text and then back to numbers I get the expected NaN as though the initial import missed something in construction.
Original issue: http://code.google.com/p/google-refine/issues/detail?id=377

To rephrase this issue: 0 / 0 should evaluate to NaN in GREL.

It's really nice to see this issue finally closed after all these years.  It pops up for me every now and again.  So, many thanks @elroykanye for fixing this.


ISPN-12204 Add JDBC Meta Table

https://issues.redhat.com/browse/ISPN-12204

@wburns Good thinking. I've added some info to the upgrading guide and the docs.

LGTM, will press button after CI confirms.

Integrated into master, thanks @ryanemerson !


PopupMenu: Fix inconsistency setting text/xl_text in add_* methods

Part 1, cleanup: Reorder add_* methods in more natural order
Also adds add_icon_radio_check_shortcut matching add_icon_radio_check_item,
binds them for scripting languages, and binds add_multistate_item.

Part 2, bugfix for #25519: Fix missing text/xl_text when using add_shortcut
Use macros to ensure that text, xl_text and id are always set
using the same logic.
Fixes #25519.
Also fixes up #26914 when p_id == -1 handling was only added for a
couple methods instead of all of them. (upcoming)

For the reference the second commit is basically the same as #25841 (which was reverted), but together with a proper fix for the editor bug it exposed back then (#25900).
BTW, this PopupMenu API is a complete mess :o)
We shouldn't need to have so many duplicated methods to add items with specific configuration changes.

Cherry-picked for 3.1.2. (Only commit 58dd5d0.)


Apache 2 license requires NOTICE file

Hey, thanks for this great project!
From the Apache 2 license docs:

In addition, a correct NOTICE file MUST be included in the same directory as the LICENSE file.

From how I interpret it (based on the LICENSE text), the file should contain:
Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

It'd be great to include this on the Apache 2 license page. Also, according to the FAQs, this file can be named NOTICE or NOTICE.txt.

That's documentation for Apache Software Foundation projects. It is not mandatory for maintainers choosing to release their projects under Apache-2.0 to add a NOTICE file.
As far as what ASF project NOTICE files should contain, click on MUST: http://www.apache.org/legal/src-headers.html#notice
I don't think there's anything to add for this project, which aims to help people choose Apache-2.0 (or some other OSS license). If a project goes through ASF incubation (or some other established org's equivalent) it will have ample opportunity to adhere to the exact standards of the relevant group, so I don't think there's any benefit to adding such here.

My bad, you're right, it is optional for non-Apache projects. From this page:

You should include a copy of the Apache License, typically in a file called LICENSE, in your work, and consider also including a NOTICE file.


decorator: Move tornado notify data parameter to REQ framework.

Instead of using request.POST to access the data parameter used in the internal notify_tornado path, adds has_request_variables decorator and accesses data as a REQ parameter.
Expands test_tornado_endpoint in test_event_system.py for data being a required parameter for this path.
Builds on #22481. Relevant CZO conversation.
Self-review checklist

[x] Self-reviewed the changes for clarity and maintainability
(variable names, code reuse, readability, etc.).

Communicate decisions, questions, and potential concerns.

[ ] Explains differences from previous plans (e.g., issue description).
[ ] Highlights technical choices and bugs encountered.
[ ] Calls out remaining decisions and concerns.
[ ] Automated tests verify logic where appropriate.

Individual commits are ready for review (see commit discipline).

[x] Each commit is a coherent idea.
[x] Commit message(s) explain reasoning and motivation for changes.

Completed manual review and testing of the following:

[ ] Visual appearance of the changes.
[ ] Responsiveness and internationalization.
[ ] Strings and tooltips.
[ ] End-to-end functionality of buttons, interactions and flows.
[ ] Corner cases, error conditions, and easily imagined bugs.

Merged, thanks @laurynmm!


Apply forward token and payload based on API spec

Config JWT filter for forwarding token and/or payload as specified by the API.

not sure about echo, but httpbin/headers allow to inspect request header, client can thus indirectly verify server gets the jwt payload.

for e2e not sure about echo, but httpbin/headers allow to inspect request header, client can thus indirectly verify server gets the jwt payload.

We are using echo for e2e test so I don't want to switch just for this. It is possible to parse the echo output, but is a bit complex so I want to do in different PR.

/test integ-security-k8s-tests_istio

/test all

@diemtvu: The following test failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

e2e-simpleTestsMinProfile_istio
947308ceebd7a257cbdc8628223130bc2c032b20
link
/test e2e-simpleTestsMinProfile_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@diemtvu: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

e2e-simpleTestsMinProfile_istio
947308ceebd7a257cbdc8628223130bc2c032b20
link
/test e2e-simpleTestsMinProfile_istio

integ-istioio-k8s-tests_istio
947308ceebd7a257cbdc8628223130bc2c032b20
link
/test integ-istioio-k8s-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.


Add instrumentation to middleware

Add console.time and console.timeEnd around getters, bulksync, etc.

Did this enough to start optimizing