network: handle no network connectivity state

Signed-off-by: Rafal Augustyniak<EMAIL_ADDRESS>Description: The original thought behind this PR was for Envoy Mobile to be able to differentiate between "no network connectivity" and wi-fi connectivity cases. This is what dictated changes in _reachability_callback method. During testing I noticed that for every transition from "no connection" to "wi-fi connection" I was seeing two updates: first saying that we have wi-fi connectivity and the second one saying that there is not connectivity.
It turned out that this was always the case and my change to remove if (flags == 0) from the implementation of _reachability_callback just surfaced this issue. After some googling I found https://github.com/ashleymills/Reachability.swift/issues/95#issuecomment-229401474 which seems to provide an explanation for as to why I saw 2 consecutive updates. The issue have been caused by us passing a fake domain to the SCNetworkReachabilityCreateWithName method which is why I decided to move to the SCNetworkReachabilityCreateWithAddress method instead. That's something that AFNetworking does for cases when it does not have access to a domain - see https://github.com/AFNetworking/AFNetworking/blob/master/AFNetworking/AFNetworkReachabilityManager.m#L150-L153.
Risk Level: medium
Testing: Manual
Docs Changes:
Release Notes:

I am still not sure as to whether the proposed solution is the right one as:

I do not see an initial update of the network state (after the app is launched). This can be fixed.
The update that informs us about wi-fi -> no connection transition is fired only after we re-enabled the wi-fi 🤔 (and is followed by the next update which tells us that wi-fi connection is back).


[Bug] It cannot work in node v8

Describe the bug
It cannot work in Nodejs 8 version . The Nodejs 8 version does not support "??"

Node v14 is also not working with systeminformation v5.18.12
osMounts[line.split(' ')[0]] = osMounts[line.split(' ')[0]] ?? false; SyntaxError: Invalid or unexpected token

https://node.green/
NodeJS v8 does not support nullish coalescing operator (??)

@ZhongJunJimmy @chanyk-joseph ... sorry!!!! Fixed it. Version 5.18.14 just published


Unable to login

Can you please try and come up with an easier way to login? Email and Password is not working and I don't know how to get the auth key thing because my Kodi is installed as Flatpak.
Perhaps you could use Netflix's device activation code: netflix.com/tv8.
And it'd help if the login info was readable from the settings.xml file. That ways I can paste in my credentials without having to use Kodi. Thank you.

instructions here https://github.com/CastagnaIT/plugin.video.netflix/wiki/Login-with-Authentication-key

@CastagnaIT  This method requires sudo access though.
And Flatpak is sandboxed.

does not require anything, can be run on any computer with linux (e.g. ubuntu) or windows operating system,
no sudo needed, could be a problem only if you have particular setup with restricted linux users profiles privilegies
this addon takes care of security to prevent unauthorised access to the account by malicious software or addons
if credentials were saved on plain-text xml, any Kodi addon could read them and disclose them without your knowledge
then if you don't like that this addon encrypt credential it is not our problem

Well. I'm using the Steam Deck. So system wide installations are restricted, hence Flatpak.
However. I just ran the script and it turns out that all the python dependencies were already installed.
Thanks for your help.

you have to use a real computer system not a console game

Nah, it worked fine.

you have to use a real computer system not a console game is also written in instructions:

You can create the NFAuthentication.key file from any Personal Computer (desktop / laptop)

Sorry to react but the Steam Deck is a real linux computer system who use Arch Linux... It's just a laptop in a different shape...


Gh 64 in range

Closing to reduce the number of fields and add a enum to choose the time unit.

I'll add some examples into Gaffer Doc: https://github.com/gchq/gaffer-doc/issues/65


Fix some typos

Cooresponds => Corresponds

I have no idea why the robots.txt file is being added. It already is merged.

👍  LGTM


Added implementation of Decision Table fixture execution

This is based on #61, so only the last commit should be considered for this PR-

There are two TODO notes in this PR, I'll implement these at a later time.


install cache to avoid frequent pip installs...

this creates a feature to avoid running pip all the time.  This does it by creating a state file inside the root of the venv to cache when the last good run of the pip command (with those arguments) was run.
For example a cache file will look like this:
$ more .nox/test-3-6/.nox_install_cache
{"[\"--upgrade\",\"-r\",\"test-requirements.txt\"]":1574446974}

There are three ways to set this

globally on the command line:     nox -install-cache 10
globally inside the noxfile.py:    nox.options.install_cache="10"
per individual session invocations:       session.install("--upgrade", "-r", "test-requirements.txt", nox_install_cache="10")

I'm sure there's some tidying to do before this is accepted, my list:

Where should the code for the InstallCache object reside (currently in sessions.py)?
How to preserve the InstallCache instance  (currently creating it from scrach every Session.install() invocation)
surely there are more error case to code for (corrupt cache files, invalid setting types, etc).

What about having a flag to put pip in offline mode https://stackoverflow.com/a/51646354/101923 This could accomplish a similar goal of speeding things up without introducing a cache mechanism to nox.

Perhaps cache mechanism is not the best term for the feature.  It's more of a timeout option to avoid calling the same pip commands in the same virtualenvs over and over.   I suppose setting up a auto caching pypi proxy would be a option here rather than offline mode, balancing performance and hands off use.
As it is, this patch brings me from 25 seconds nox run time down to 6 seconds.  Which helps me a great deal.

On the otherhand, if upstream isn't interested in this, I could rework this to be a "plugin" of sorts that someone could put into their noxfile.py.

I am a +1 on this.
One of the biggest pain points for me with nox is when I'm iterating on something and want to continuously run pytest or something similar. My velocity gets reduced by nox's repeated pip installations and I will often end up side-stepping it by running the command from the virtual environment directly. I'll do something like .nox/tests-3-7/bin/pytest.
Even if I run nox with the -r flag to reuse and existing virtual environment, the slowdown time is still noticeable to the point where it pushes me to invoke commands directly.

I'm going to close this PR due to inactivity. That's not to say I'm not interested in merging it! If you're still up for it just reply and I'll re-open the PR. :)


Improve search functionality

[ ] Make it faster
[ ] show a dialog when no results found

Work is being done here https://github.com/flow-storm/flow-storm-debugger/tree/improve-searching

Implemented in 736f528


added ProductSitemap

Added ProductSitemap in dependence on SHOP_TUTORIAL.
@rfleschenberg , you said me that:

One hint if you're going to implement this: Watch out for n+1 queries. This can quickly become a problem > in sitemaps. select_related / prefetch_related may help.

Could you explain me about select_related / prefetch_related for this code?
I see that cms_sitemap.py:
class CMSSitemap(Sitemap):
    ...
    def items(self):
        all_titles = Title.objects.public().filter(
            Q(redirect='') | Q(redirect__isnull=True),
            page__login_required=False,
            page__site=Site.objects.get_current(),
        ).order_by('page__path')
        return all_titles

doesn't use select_related / prefetch_related.

Yes, I like this.
However the unit tests don't pass because it seems as if you import the ProductSitemap  from the wrong file.

I tested by hand - it work. But I can't to reproduce the error locally. Instead of I have a ploblem: I ran test command: py.test tests/test_money.py and I get fails:
-------------- MoneySerializerTests.test_rest ---------------
Traceback (most recent call last):
  File "/home/vivazzi/projects/OTHERS/django-shop/example/tests/test_money.py", line 261, in test_rest
    self.assertDictEqual({'amount': '€ 1.23'}, serializer.data)
  File "/usr/lib/python2.7/unittest/case.py", line 835, in assertDictEqual
    self.fail(self._formatMessage(msg, standardMsg))
  File "/usr/lib/python2.7/unittest/case.py", line 410, in fail
    raise self.failureException(msg)
AssertionError: {u'amount': u'\u20ac 1.23'} != {'amount': u'\u20ac 1,23'}
- {u'amount': u'\u20ac 1.23'}
?  -                    ^

+ {'amount': u'\u20ac 1,23'}
?                      ^

It seems I found bug.. Please one moment..

Okey - Tests is passed!
I accidentally moved sitemap.py to parent folder, but .pyc (sitemap.pyc) remained. Howbeit, locally tests did not pass. I get error:
AssertionError: {u'amount': u'\u20ac 1.23'} != {'amount': u'\u20ac 1,23'}
- {u'amount': u'\u20ac 1.23'}
?  -                    ^

+ {'amount': u'\u20ac 1,23'}
?                      ^

Jacob, do you know what's the metter?

@vivazzi seems to be related to the current local settings. In your locale, do you use a . or a , as decimal separator?
Presumable you can fix this using https://docs.djangoproject.com/en/1.10/topics/testing/tools/#overriding-settings


[BUG]Code editor field is not translatable

Hi, I'v realized that if you have a code editor field, this is not translatable.
I have a case in which could be insteresting getting it translatable. I have a client that needs to put a different form in every post that they get from other platform. So I decided to create this field as code editor in the admin because they copy the entire code of the form and paste it in to the post admin.
What do you think?

From the issue-template.

The following information is required for bug reports.  Issues without it will be closed without response

This can be reopened once the required informations are provided.


can't reverse proxy from subfolder

javascript load object with absolute path not relative path, and cause problem.
ex: I set reverse proxy to reichat in example.com/paint, like below
    location /paint/ {
        proxy_set_header  X-Real-IP        $remote_addr;
        proxy_set_header  X-Forwarded-For  $proxy_add_x_forwarded_for;
        proxy_set_header  Host             $http_host;
        proxy_set_header  X-Forwarded-Proto $scheme;
        proxy_pass        http://<IP_ADDRESS>:10133/;
        proxy_redirect    off;
    }

but script still ask the file from root,
like: example.com/socket-io/somefile.js,
not: example.com/paint/socket-io/somefile.js

REICHAT's src is written starts with "//". This is a good way as it is protocol independent.
You can use the rewrite directive to solve it.
location /paint/ {
    rewrite ^/paint(/.*)$ $1 last;
    # any other proxy directives...
}

still no luck, as I said, when browser calling socket-io, it still call from host root.
and, your rewrite rule is routing /paint/ to /, it will show the same thing at /index.htm
Add new subdomain for reichat instance is my personal recommend, thank you.


Add lastName gender specific on ru_RU locale

Add lastName method on Person Provider ru_RU locale with gender params.
Related to #1745.

Thank you! Just faced same issue and wanted to add a pull request.

@aanfarhan @antonkomarev my russian is not so good but is this valid for all male names that they have a female equivalent with an appended "a"?
Code overall looks good so 👌🏻

@pimjansen not all the female last names ends with -a, but most part or them and all the male last names presented in Faker matches this rule.

Thanks!


convert functions to binned format as additional output

for each candidate function, add an extra column to candidate_functions df that presents the smooth function back in binned histogram, like the input y. this can be useful for use cases where a smoothed histogram is desired over an explicit function. also add plotting for this.

oh for hep analyses, it can be useful for converting a bkg histogram with limited statistics to a smoothed version-- like qcd in stat limited signal region, which has relied on deriving an additional template with looser cuts and then scale it back to normal selection-- this can be done by symbolfit without needing a separate template..

add auto ks test that compares the original and smoothed histograms

the above can be done for all cases as default. but can add an additional option that, instead of fitting to the given binned data, first converts the input binned data into a density, fit it to get a smooth density, then integrate to get back the binned data but as a smoothed version. this fitting-to-density should be enabled explicitly through the option and the default fit should disabled, otherwise two different datasets will be fitted upon a single fit() call.

or direct fit to binned counts, then convert the function to density by differentiation, then integrate to get smoothed counts per bin? this way there is no need to create a separate dataset to fit..


Fail on import of new project

When trying to import a new project from GitHub, I am getting an error: "Fail. Check back in a bit!".   is there any way of better understanding what is happening here?
The project is here: https://github.com/dstrohl/python_utils
I suspect that my project is failing the build, probably due to requirements (though I do have a requirements.txt file).  the only things that I can think of that I am using that are not standard python modules are the Sphinx stuff (autodoc, etc...) I do have Sphinx in the requirements.txt though.
Online I am seeing lots of suggestions to turn on the virtual env, but I don't see a way of doing that until the project is imported.  (thoughts?)
Any help or suggestions are appreciated!
Dan

Sorry, is this still an issue? You can always just manually import the project with the URL, and that should work.

Closing due to inactivity. Please create open a new issue if this is still a problem for you.


Use binread to parse binary data

Hello,
while using lnk-rs, I experienced some crashes which resulted from unchecked slices. So I rewrote part of the parser to use binread, just as proof of concept to see if the code would be more robust.  I'd like to continue the migration to binread. Was that okay for you?
There would be a lot to do, e.g.

integrating sample files which crash using the legacy parsing approach, to be used as unit test data
cleaning up the code
thinking about binwrite

Kind regards, Jan

Hello !
I was using the same library, and I faced an issue with some specific .lnk files, maybe you can help me try to fix the issue ?
I can't open issues on your fork unfortunately so I put this here as a potantial improvement to your amazing fork ! 🙏
Sometimes, using the library, a .lnk does not return any link_info therefore, I can't access the local_base_path BUT the lnk does indeed contains this informations, here is an example with the Hearthstone.lnk :

We can see that trying a cat command on it does indeed return a local path :

But somehow, printing the ShellLink does not return any link_info :
Reading shortcut: "C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\Hearthstone\\Hearthstone.lnk"
Shell Link: ShellLink { shell_link_header: ShellLinkHeader { header_size: 76, link_clsid:<PHONE_NUMBER>4944114645041356371858166785, link_flags: LinkFlags(HAS_LINK_TARGET_ID_LIST | HAS_WORKING_DIR | IS_UNICODE), file_attributes: FileAttributeFlags(0x0), creation_time: 1601-01-01 00:00:00, access_time: 1601-01-01 00:00:00, write_time: 1601-01-01 00:00:00, file_size: 0, icon_index: 0, show_command: ShowNormal, hotkey: HotkeyFlags { low_byte: NoKeyAssigned, high_byte: HotkeyModifiers(0x0) }, reserved1: 0, reserved2: 0, reserved3: 0 }, linktarget_id_list: Some(LinkTargetIdList { size: 297, id_list: IdList { item_id_list: [ItemID (raw data size 20), ItemID (raw data size 25), ItemID (raw data size 98), ItemID (raw data size 152)] } }), link_info: None, name_string: None, relative_path: None, working_dir: Some("E:\\Hearthstone"), command_line_arguments: None, icon_location: None, _extra_data: [] }

Do you have any idea where the issue could lie and how to fix it ?

@thomasdqr is it possible for you to provide such a lnk-file as test data to me?

Sure ! Here is a link to download my .lnk file : https://we.tl/t-Qna84Rbq6B
If you want to replicate the exact same setup, I guess you can also try to install Hearstone on your local machine using battlenet, not sure what's the ideal setup for testing. I may try to find other "broken" .lnk file as well, tell me if you need more information 🙏

I added a binary lnk2json to this crate, for debugging purposes. This finds the path E:\\Hearthstone as Working Dir. Is this what you was searching for?
BTW: The HAS_LINK_INFO flag in your file is not set, so this file should not contain a link_info

Well ideally I would like to have the full target path E:\Hearthstone\Hearthstone Beta Launcher.exe just like stated in the shortcut infos here :

I don't understand why the HAS_LINK_INFO is not set but somehow the cat command display informations about the .exe target 🤔
Even stranger, running the command within the cmd and the powershell gives different outputs :

The powershell seems to have access to more informations regarding the target path 🔍

Hi @janstarke , thank you for your PR!
This is certainly something I am open to - above everything else it focuses the purpose of this library away from writing binary read/write code and back towards the important part!
It might take me a while (I'm currently recovering from a long period of illness), but I will definitely go through and review this work with a view to merge it.

Never mind, take the time you need to get well.
In the meantime, I'll do some additional changes, until the code works as I expect.

required to fix https://github.com/dfir-dd/dfir-toolkit/issues/20

So I've had a look through - you've definitely made a lot of the changes that I would. I certainly wasn't where I am now with Rust when I started this!
I'm currently just trying to take the work you've done and see how much effort it is to implement writing with binwrite - I'm hoping that these changes will be able to resolve a lot of the other issues at the same time so keen to take a little longer to get it right!

I migrated from binread to binrw and added some first unit tests for it. However, not all structs are BinWrite yet

Poking my head in to ask if assistance is needed to push this across the finish line? @janstarke @lilopkins
I was about to publish a binary crate I've been working on to crates.io, but got blocked by the fact that I'm pointing at a git repo of a fork of this one as a dependency. (Specifically, I'm using the fork for PR #26, honestly either PR would likely close issue #25, but this one would be preferred as a more long-term solution.)
But I'm happy to attempt to help if I can get pointed towards the spots needing finished, ideally.
Wishing all contributors a happy holiday season!

@nullstalgia I have been very busy since I've been able to look at this, but I do recall doing quite some substantial work to conclude all the structs to binwrite as well (for full read+write compatibility). I'll review this and see what work is remaining to release this

I've pushed a few changes that I've made -- it seems that this PR is essentially ready to merge on the read side of things, but as @janstarke previously mentioned, writing still needs some work (although the seed are definitely sown).
I think it is beneficial to this project if we (again) hide the write functionality behind a feature flag and publish the read fuctionality, just to resolve some of the other open defects. Any objections to this?

Feel free to take that on, yea. I previously had one but I think it might need reworking with these changes anyway.

I added a binwrite flag, which enables the BinWrite derive on ShellLinkHeader as well as ShellLink::save(). With these changes, cargo test succeeds and cargo test --features binwrite failed on create_read_blank. So I added a watcher to the save method which requires that the feature unstable-binwrite is being set too, to make it callable. So, we currently have the following behavior:

cargo test
success

cargo test --features binwrite
fails

cargo test --features binwrite,unstable-binwrite
compilation error

So, other users can rely on having the binwrite feature available, but are not able to call unstable code.

Thanks again for your work on this! 🙏
One thing I failed to mention in my previous comment is a fork of your PR's repo popped up in the last few months, @janstarke.
It seems to have a mix of changes, but the extra check in lib.rs might be helpful/worth a test case?
Just wanted to mention since it's for this repo and it seems like we're getting close to merging.

Hmm... sounds interesting. I'll take a look at it

Another wrench I didn't forsee to be thrown into the works: My crate's previously generated shortcuts cause this new parser to return an Err Result, when they used to be read correctly before. (I should have tested this sooner, argh!)
Note: I've been using mslnk to generate my shortcuts, a crate based on an earlier version of lnk-rs, since it had more confidence with it's saving capabilities.
The error I get when parsing my shortcuts is BinReadError(failed to fill whole buffer), from the attempted init of string_data.
failing-shortcut.zip
I've attached the generated shortcut in question, since I believe this would count as a regression.
Watching the logs, it gets through the initial headers but whatever string it's first trying to read isn't where it thinks it is. (I'm still wrapping my head around the code+changes+file format).

There was some problem with the handling of ExtraData blocks, which I fixed. I also added your lnk file as a unit test, so that you can check if everything is working as expected (not only on my machine :wink:

Thanks again for your work on this! 🙏
One thing I failed to mention in my previous comment is a fork of your PR's repo popped up in the last few months, @janstarke.
It seems to have a mix of changes, but the extra check in lib.rs seems like the main change and might be helpful/worth a test case?
Just wanted to mention since it's for this repo and it seems like we're getting close to merging.

Indeed there was a PR for my PR, which has been closed by the author 3 day ago. So I assume there is nothing todo for now

@lilopkins I added a binwrite implementation for StringData, so that your unit test runs fine.  :P

There was a PR for my PR, which has been closed by the author.

Hmm, I wonder if they were pulling your changes in and wrote over theirs by accident, or they simply decided it wasn't needed? In any case, this is the change I was mentioning, which seems to make sure the path ends with \ in the case that common_path is empty and base_path doesn't end with \.
I can't tell if this is a reasonable change or not, so I might poke around with some stuff myself once I can compile it.

 :P

Indeed, I did :see_no_evil: Sorry and thx for remembering me. Fixed it

Hmm, I wonder if they were pulling your changes in and wrote over theirs by accident, or they simply decided it wasn't needed? In any case, this is the change I was mentioning, which seems to make sure the path ends with \ in the case that common_path is empty and base_path doesn't end with \.
I can't tell if this is a reasonable change or not, so I might poke around with some stuff myself once I can compile it.

I reviewed the code contributed by @siminx and I think this change was a good one: It improved the handling of an empty common_path, in which case nothing was appended to base_path. I changed the implementation so that the semantics is more obvious and added it to the code

Nice, works on that specific shortcut now, and also works when ported into my binary crate.
Which brings me to some questions I had while updating my crate to use this new version... Primarily, I'm struggling to understand the rationale behind the Encoding parameter for open().

I can't control the shortcuts my app will interact with, and it feels like I'm assuming a certain encoding for all of them?

If it's important enough to have the default open() implementation require it, then there should at least be documentation explaining which schemes are expected, and when to expect each one. Ideally, it should detect the encoding being used and not require one being supplied unless using an alternate constructor (especially since that's how the save functions currently work).
And currently it requires having encoding_rs as an additional dependency. Having it be publicly re-exported would be convenient and could help prevent someone from accidentally using another one of the almost 20 WINDOWS_*** encoding schemes offered by the crate (if all we need is WINDOWS_1252 and UTF16_LE).

As a test I decided to edit the previously failing shortcut with some non-Latin characters, and neither UTF_16LE or WINDOWS_1252 encoding resolved it properly. There seems to be a couple things erroring (I think there's a has_common_network_relative_link_and_path_suffix in place of a has_volume_id_and_local_base_path, and some more string offset mishaps after that).

Here's the shortcut I've been testing again with, same as before but with the exe renamed: iron-heart.exe -> мяу.exe


grunt doc fails

jsdoc recently made a change that runs the application code with js strict mode. I can't imagine what the reasoning for this might be, forcing non strict code to go this way will create breakages.
I have fixed this in Meshmoon web-rocket already. I would imagine cherry picking it here until we base our impl to this repo will be impossible.
But the fix is to put "use strict"; as the first line inside the define() function in the file its complaining about. Then F5 run client.html and go fix the place, chrome dev tools will give you exact like by clicking the error. Note that not all strict mode errors happen during file parsing. So for some things you actually have to execute the function to get the strict mode error to dev tools.
As said I have gone through the codebase to make jsdoc work, for file parsing and execution. @cvetan5 can go though my commits and port the changes manually.
Finally test with grunt doc that it completes without errors.

Until this is fixed, a temp fix would be to comment out https://github.com/realXtend/WebTundra/blob/master/Gruntfile.js#L754 to make grunt build work again.
I would maybe advice against this as it will then get forgotten :) Also using strict mode in the modules is better. I have started to transition web-rocket to this, but it is a bit hard as a afterthought because its hard to execute all code paths with programmatic testing. Also the fix is not that labor intensive so just same to spend an hour with it :)


[wip] Reuse frame state properties

Reduce the number of arrays created by reusing some properties from the map frame state.
work in progress

I like this work in progress, but it hasn't progressed in a long time, so closing. @fredj, please reopen if you continue working on it.


Proposal: Empty argument lists

Right now, if a method takes no arguments, it has no argument list at all. () is a syntax error in Wren. That works great for "getters", things that are conceptually properties on an object:
"string".count
[1..3].min
(new Fiber).isDone

It's a little weird, but I think generally good for methods that generate something new but don't modify the underlying object:
123.toString
(-4).abs

Where it feels strange to me is methods that do modify the object:
[1, 2, 3].clear
(new Fiber).run

It's particularly odd when you call one of these methods from inside its class and use an implicit receiver. For example, here's a piece of the Set example:
class Set {
  // Other code...

  cleanup {
    // Remove duplicates in the underlying list...
  }

  count {
    cleanup // <--
    return _list.count
  }
}

Seeing a bare identifier on the // <-- line and having to realize it's there because it causes code with a side-effect feels spooky to me. Now, maybe this is just because I've inherited prejudices from other languages and I just haven't internalized Wren's way of doing things. But, given that Wren is designed to be familiar to people coming from those other languages, I feel this may be confusing.
Proposal
My proposed solution is to allow an empty argument list as part of a method's name. So just as you can overload foo and foo(arg), you could also define foo(). Note that this would not make the parentheses optional. foo and foo() would be two different methods with different signatures.
Since this is just another syntax for defining names, it adds little complexity to the language. The compiler has to take () into account when building a method name, but the rest of the VM is unaffected.
What I am concerned about is whether or not this makes it hard for library designers to know which form to choose. When should you use a getter versus an empty argument list? If the guideline isn't clear here, we'll get frustrated library designers and inconsistent libraries.
I think the reasonable rule is probably, "if it modifies any state (aside from internal-only caches, etc.), don't use a getter". So, clear and cleanup would become clear() and cleanup() (although the latter is a bit fishy since it doesn't modify anything publicly visible) while abs and toString remain getters.
Thoughts?

I second the empty arguments parentheses for the function/method calls.
Now it's a bit confusing and visually cumbersome. Moreover it's a benefit to have parentheses to spot the calls better.
I also second non to loose getters and setters.
As I library/module designer I would use empty-arguments-list methods and functions for activities that (could) change the internal state of the class, possibly not returning anything. Getters are only observers for the internal state of the class, and they should not perform complex activities (but they can elaborate the result, of course).

EDSLs can be less clear. Ruby has done quite a bit with optional parentheses. Additionally, Cascading / Method chains can get lumpy.
Now, I'm assuming that this proposal is not suggesting the language forces one to use the () syntax if there is mutation, but rather that it is a convention generally used. I planned on an EDSL for Time similar to http://momentjs.com/ for zeckalpha/wren-io#6

As I library/module designer I would use empty-arguments-list methods and functions for activities that (could) change the internal state of the class, possibly not returning anything. Getters are only observers for the internal state of the class, and they should not perform complex activities (but they can elaborate the result, of course).

Yeah, this lines up with my intuition too. Defining "complex" gets pretty hand-wavey but hopefully most people know it when they see it.

EDSLs can be less clear. Ruby has done quite a bit with optional parentheses. Additionally, Cascading / Method chains can get lumpy.

Ruby also has the feature that parentheses are optional even when you have arguments, like:
foo.bar arg, arg

I like what that does for some DSLs but it makes the grammar really hairy, so I plan to stay away from that for Wren.

Now, I'm assuming that this proposal is not suggesting the language forces one to use the () syntax if there is mutation, but rather that it is a convention generally used. I planned on an EDSL for Time similar to http://momentjs.com/ for zeckalpha/wren-io#6

Right, there's nothing preventing you from doing all sorts of shenanigans in a getter. From looking at that API, I think it would be totally kosher to have fromNow and calendar be getters.

Defining "complex" gets pretty hand-wavey but hopefully most people know it when they see it.

Everytime the language does not dictates a way to accomplish something, it's always a fuzzy and questionable matter of individual style.
Over the years I stumbled upon some very "complex" setters, mostly due to inexperience of the programmer. In the majority of the cases getters have simple body structures... otherwise, they are methods.
Clear enough, uh? :)

I like what that does for some DSLs but it makes the grammar really hairy, so I plan to stay away from that for Wren.

Agreed. This is just the empty arguments case.

This is done now! A key motivation (in addition to being able to define methods with empty argument lists) is that Wren now has a well-defined concept of a "call signature":
// call                 // signature
obj.foo                 // foo
obj.foo()               // foo()  <-- note, different from getter
obj.foo(arg)            // foo(_)
obj.foo(arg, arg, arg)  // foo(_,_,_)
obj.foo = arg           // foo=(_)
-obj                    // -
obj - arg               // -(_)
obj[arg, arg]           // [_,_]
obj[arg, arg] = arg     // [_,_]=(_)

These show up in stack traces and debugger output. But, more importantly, they are used in the embedding API now. I'm hoping to use that in some changes in the embedding API I have in mind, though I'll have to see if it pans out.
I also changed some core methods to use ():

Fn.call()
List.clear()
Map.clear()
Fiber.call()
Fiber.run()
Fiber.try()
Fiber.yield()

Horray! Well done! :+1:

:metal:


add disconnect listener and emitter to socket

added disconnect listener and emitter for bot

@brandonkimmmm  You can do this in a better way for example using removeEventListener and actually handling disconnects than just passing the word disconnect.
Additionally this disconnect you made is only added in "all" switch case. It can happen in user as well.

@abeikverdi Socket.io already handles disconnects by attempting to reconnect. I'll make the socket emit an error when reconnection attempts fail but otherwise this disconnect event is only to notify robolla when it happens because robolla wasn't working properly even though reconnection was successful.

I understand. We dont need to throw error in the socket.io. Instead of sending a disconnect message we need to handle the disconnection and reconnection logic using js event listener. Remember also this project is not just used for robolla.

@abeikverdi By handling do you mean having the emitter wait until the reconnection is successful?

@abeikverdi I made it so the listeners are removed on disconnect and reestablish when reconnect is successful


Multi-GPU sweep fails to create a second agent with 400 error

Describe the bug
Multi-GPU sweep fails to create a second agent with error attached. The first agent starts as expected.
The sweep ID is qnjyxjtu.
To Reproduce
Steps to reproduce the behavior:
CUDA_VISIBLE_DEVICES=0 wandb agent kaiwenw/CartPole-v0/qnjyxjtu
CUDA_VISIBLE_DEVICES=1 wandb agent kaiwenw/CartPole-v0/qnjyxjtu
Expected behavior
Expect two agents to start, and both log to the same sweep.
Operating System
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.4 LTS
Release:        18.04
Codename:       bionic
With 2 Nvidia GPUs on CUDA 10.2 running PyTorch-Lightning v1.1, PyTorch v1.8
Note the issue persists even without using GPU.
Additional context
Full trace:
(torch) ubuntu@ip-172-31-10-97:~/oppg$ CUDA_VISIBLE_DEVICES=0 wandb agent kaiwenw/CartPole-v0/qnjyxjtu
wandb: Starting wandb agent 🕵
2020-12-14 09:13:58,062 - wandb.wandb_agent - INFO - Running runs: []
400 response executing GraphQL.
{"errors":[{"message":"ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()","path":["agentHeartbeat"]}],"data":{"agentHeartbeat":null}}
wandb: ERROR Error while calling W&B API: ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() (<Response [400]>)
wandb: Terminating and syncing runs. Press ctrl-c to kill.
Traceback (most recent call last):
  File "/home/ubuntu/miniconda3/envs/torch/lib/python3.8/site-packages/wandb/sdk/internal/internal_api.py", line 1317, in agent_heartbeat
    response = self.gql(
  File "/home/ubuntu/miniconda3/envs/torch/lib/python3.8/site-packages/wandb/old/retry.py", line 96, in __call__
    result = self._call_fn(*args, **kwargs)
  File "/home/ubuntu/miniconda3/envs/torch/lib/python3.8/site-packages/wandb/sdk/internal/internal_api.py", line 136, in execute
    six.reraise(*sys.exc_info())
  File "/home/ubuntu/miniconda3/envs/torch/lib/python3.8/site-packages/six.py", line 703, in reraise
    raise value
  File "/home/ubuntu/miniconda3/envs/torch/lib/python3.8/site-packages/wandb/sdk/internal/internal_api.py", line 130, in execute
    return self.client.execute(*args, **kwargs)
  File "/home/ubuntu/miniconda3/envs/torch/lib/python3.8/site-packages/wandb/vendor/gql-0.2.0/gql/client.py", line 52, in execute
    result = self._get_result(document, *args, **kwargs)
  File "/home/ubuntu/miniconda3/envs/torch/lib/python3.8/site-packages/wandb/vendor/gql-0.2.0/gql/client.py", line 60, in _get_result
    return self.transport.execute(document, *args, **kwargs)
  File "/home/ubuntu/miniconda3/envs/torch/lib/python3.8/site-packages/wandb/vendor/gql-0.2.0/gql/transport/requests.py", line 39, in execute
    request.raise_for_status()
  File "/home/ubuntu/miniconda3/envs/torch/lib/python3.8/site-packages/requests/models.py", line 943, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.wandb.ai/graphql

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ubuntu/miniconda3/envs/torch/bin/wandb", line 8, in <module>
    sys.exit(cli())
  File "/home/ubuntu/miniconda3/envs/torch/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/ubuntu/miniconda3/envs/torch/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/ubuntu/miniconda3/envs/torch/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/ubuntu/miniconda3/envs/torch/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/ubuntu/miniconda3/envs/torch/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/ubuntu/miniconda3/envs/torch/lib/python3.8/site-packages/click/decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/ubuntu/miniconda3/envs/torch/lib/python3.8/site-packages/wandb/cli/cli.py", line 86, in wrapper
    return func(*args, **kwargs)
  File "/home/ubuntu/miniconda3/envs/torch/lib/python3.8/site-packages/wandb/cli/cli.py", line 806, in agent
    wandb_agent.agent(sweep_id, entity=entity, project=project, count=count)
  File "/home/ubuntu/miniconda3/envs/torch/lib/python3.8/site-packages/wandb/wandb_agent.py", line 558, in agent
    return run_agent(
  File "/home/ubuntu/miniconda3/envs/torch/lib/python3.8/site-packages/wandb/wandb_agent.py", line 518, in run_agent
    agent.run()
  File "/home/ubuntu/miniconda3/envs/torch/lib/python3.8/site-packages/wandb/wandb_agent.py", line 252, in run
    commands = self._api.agent_heartbeat(agent_id, {}, run_status)
  File "/home/ubuntu/miniconda3/envs/torch/lib/python3.8/site-packages/wandb/apis/internal.py", line 92, in agent_heartbeat
    return self.api.agent_heartbeat(*args, **kwargs)
  File "/home/ubuntu/miniconda3/envs/torch/lib/python3.8/site-packages/wandb/sdk/internal/internal_api.py", line 1328, in agent_heartbeat
    message = ast.literal_eval(e.args[0])["message"]
  File "/home/ubuntu/miniconda3/envs/torch/lib/python3.8/ast.py", line 59, in literal_eval
    node_or_string = parse(node_or_string, mode='eval')
  File "/home/ubuntu/miniconda3/envs/torch/lib/python3.8/ast.py", line 47, in parse
    return compile(source, filename, mode, flags,
  File "<unknown>", line 1
    400 Client Error: Bad Request for url: https://api.wandb.ai/graphql
        ^
SyntaxError: invalid syntax

Update: I may have found the error..
One field in my config is a list, so in YAML I specified:
  common_input...hidden_layer_sizes:
    values:
      - [32]
      - [64]
      - [32, 32]
    distribution: categorical

but that didn't work..
Is there a way to specify a categorical distribution of lists of values?

Hey @kaiwenw
I think docs on config.yml should help you with this.
Let us know if that helped.
If not, could you help us with the sweep.yml file and a basic script to implement your problem? :smile:

Experiencing the same issue here while doing sweep - first run ok, after that it throws the error above.
I have something like the following in my sweep
parameters:
  arc.linear.layers:
    values:
      - [256, 256]
      - [512, 512]
      - [1024, 1024]
  arc.linear.batch_norm:
    values:
      - true
      - false

The doc link above does not provide any clue on dealing with using list as value.
From the error it seems like the issue lies with how the call to W&B API parses the value - perhaps a guard in the API / API call that guards for list values? Or if the API could accept list?
400 response executing GraphQL.
{"errors":[{"message":"ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()","path":["agentHeartbeat"]}],"data":{"agentHeartbeat":null}}
wandb: ERROR Error while calling W&B API: ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() (<Response [400]>)
wandb: Terminating and syncing runs. Press ctrl-c to kill.

...

400 Client Error: Bad Request for url: https://api.wandb.ai/graphql

Experiencing the same issue here while doing sweep - first run ok, after that it throws the error above.
I have something like the following in my sweep
parameters:
  arc.linear.layers:
    values:
      - [256, 256]
      - [512, 512]
      - [1024, 1024]
  arc.linear.batch_norm:
    values:
      - true
      - false

The doc link above does not provide any clue on dealing with using list as value.
From the error it seems like the issue lies with how the call to W&B API parses the value - perhaps a guard in the API / API call that guards for list values? Or if the API could accept list?
400 response executing GraphQL.
{"errors":[{"message":"ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()","path":["agentHeartbeat"]}],"data":{"agentHeartbeat":null}}
wandb: ERROR Error while calling W&B API: ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() (<Response [400]>)
wandb: Terminating and syncing runs. Press ctrl-c to kill.

...

400 Client Error: Bad Request for url: https://api.wandb.ai/graphql

In the past year we've majorly reworked the CLI and UI for Weights & Biases. We're closing issues older than 6 months. Please comment to reopen.


Faster index building in PandasDataset

Faster index building for PandasDataset:
Construct pd.PeriodIndex from list of time stamp strings can be quite slow:
periods = pd.period_range('2006-01-01 00:00:00', periods=7000, freq='H')
timestamps_list = [str(t.start_time) for t in period]

>>> timeit.timeit(lambda: pd.PeriodIndex(timestamps_list, freq='H'), number=5)
3.156371082000078
>>> timeit.timeit(lambda: pd.DatetimeIndex(timestamps_list).to_period(freq='H'), number=5)
0.02911860299991531

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Please tag this pr with at least one of these labels to make our release process faster: BREAKING, new feature, bug fix, other change, dev setup

This shouldn't be considered a bug fix, I think.


Fix Starter-example README.md

This is very minimal change, there was a small error in the README.md of Starter-example. Please review changes.

Thank you @0xharkirat  🙏🏼


Instant placement update

This is a significant UX update to our WebXR placement flow: now instead of the model floating in a screen-attached way before it found a floor to place on, now it is placed at a fixed location in space, identical to the camera's placement in 3D mode. Once the floor is found, the object is moved up/down to meet its height. This is based on user feedback that the object did not appear to be in AR. Also, with the object fixed in space, it encourages the user to move side-to-side to explore it, rather than just turning the phone, which is key to helping ARCore find the floor.
This change also allowed us to switch to Three's XRManager, which in turn will allow us to upgrade to r127+. During this process there was some debug where I ended up reverting #2296 and #1711, since the latter was the root cause of the shiny models. Therefore #1678 has to be reopened and I'll do a proper fix for that in a following PR.

Hey team! Quick feedback - this latest UX update (now part of >=v1.7.0) is pretty confusing for users. Instant placment usally results in the model initially floating mid-air instead of actually being placed on the surface around you. It then takes to much time to recalibrate to find the floor so the experience seems and feels stuck.
Tested on multiple Pixel Android devices (Pixel 3a, Pixel 3XL).
We reverted back to 1.6.0 - hope you reconsider this merge or general UX choice to improve the UX.

Hey team! Quick feedback - this latest UX update (now part of >=v1.7.0) is pretty confusing for users. Instant placment usally results in the model initially floating mid-air instead of actually being placed on the surface around you. It then takes too much time to recalibrate to find the floor so the experience seems and feels stuck. When after finding the floor, the re-placement of the model usally overshots the actul location.
Tested on multiple Pixel Android devices (Pixel 3a, Pixel 3XL).
We reverted back to 1.6.0 - hope you reconsider this merge or general UX choice to improve the UX.

I would generally echo this sentiment. I can see both instant placement and "floating until plane detection" as suitable approaches if the user could simply replace the model with a simple tap on a detected plane (and some sort of visualization to denote the plane has been found. Users may not have their camera initially lined up where they will want the model to be placed, and that camera location may not ever be suitable for finding a plane.

AR UX is not easy, and I'd highly recommend adding some DOM based on ar-status to help your users through. WebXR does not give direct access to planes, so that's not possible. The process to finding a plane and landing on it is unchanged from 1.6; you must move the phone side to side and have enough texture for it to work. These changes were made based on user feedback of the old way also being confusing, plus this simplified our logic considerably. I'm open to other ideas, but only in the form of pull requests.

AR UX is not easy

True that.

adding some DOM based on ar-status to help your users

Definitely. Along with the ar-tracking event, this is a big, big help to users.
In comparison:

SceneViewer only shows interaction prompts during calibration process. The model itself is only revealed once the object is placed / anchored to a point in the scene.

iOS AR QuickLook shows a small translucent preview of the model, locked front-on to the screen (like it's a 2D layer) and only once it's placed / anchored to a point does it then transition into 3D space.

I personally like hiding the object until placed. Simple. Clean. No confusion.

@milesgreen Let's move this chat to the discussion where it will have some visibility: https://github.com/google/model-viewer/discussions/2413
Our UX used to have no model at first, but we got a lot of feedback that people thought it was just broken. Scene Viewer has gotten this as well. If you try AR in a space with bad lighting or poor texture, it may never find the floor. We decided it was better to give people some experience with their object, rather than showing them nothing at all if ARCore fails.

That's a reasonable request, @elalish.
@echoARxyz do you think the ability to move an object before it is placed would also assist in your use-case?

Definetly yes - check out the overall UX on my end with 1.6.0 vs. latest. Same model, same spot, same surface. Feedback we got on the latest version consistently mentioned people thinking things are just stuck or broken. Moving the model prior the the detction definetly helps with the overall experience even before tracking in done.

AR UX is not easy, and I'd highly recommend adding some DOM based on ar-status to help your users through. WebXR does not give direct access to planes, so that's not possible. The process to finding a plane and landing on it is unchanged from 1.6; you must move the phone side to side and have enough texture for it to work. These changes were made based on user feedback of the old way also being confusing, plus this simplified our logic considerably. I'm open to other ideas, but only in the form of pull requests.

Agreed - we can honestly make "AR UX is not easy" t-shrits 👕
I think hiding the model and removing the ability to move it around is too confusing. It definetly "better to give people some experience with their object, rather than showing them nothing" as @elalish mentioned.


Ember do not send Content-Type for request without body

Confirmed for GET, not sure about DELETE https://github.com/emberjs/data/issues/3523
The json-api spec do not allow such exceptions though the header is not sent and request can't pass headers checker. It's proposed to make it configurable and skip such check for requests like GET.

Also related: https://github.com/json-api/json-api/issues/968
If there's a Content-Type in GET requests, it will apparently trigger a CORS preflight request.

@mphasize I've made many changes in #125 and then switched to this one. From code it looks like if no Content-Type header is added to request then the lib will assume it has JSON-API media type be default. I've checked it with demo app and it seems to be correct (note Content-Type is absent)

I'm closing this issue. If it appears again it should be looked more closely which headers are sent as just absence of Content-Type do not cause any errors.


Progress Reporting Blob Downloads

BlobBaseClient methods DownloadStreaming(), DownloadContent(), and DownloadTo() now accept IProgress<long> for reporting download progress.
While IProgress<long> isn't necessary for DownloadStreaming(), as the caller can easily report progress as they read from the result stream, it is necessary for DownloadContent(). Since these two methods share the same options bag, the parameter has been implemented for both.
Resolves #8506

API changes have been detected in Azure.Storage.Blobs. You can review API changes here
API changes
+         public IProgress<long> ProgressHandler { get; set; }
+         public IProgress<long> ProgressHandler { get; set; }

great news and thank you all, folks. Let us know what build we can expect this to appear in.


How to read quickly?

When using this plugin on Windows, the microcontroller sends data at a very fast speed, and I find there is a delay during the reading process. How can I set it up to read data more quickly and efficiently?

Flutter is single-threaded. I'm not sure that how fast Flutter/Dart can run. But you can change dataPollingInterval in read function
readBytesUntil will wait some time if data does not meet your conditions using Future.delayed(dataPollingInterval). So you can set this parameters in  readBytesUntil(Uint8List expected, {Duration dataPollingInterval = const Duration(microseconds: 500)}).
readBytesOnListen is similar like this. But Listen function uses stream/async*. Real-time performance may not be guaranteed
Here is the implementation of  readBytesUntil function. You can see some delay in the code.
  /// [readBytesUntil] will read until an [expected] sequence is found
  Future<Uint8List> readBytesUntil(Uint8List expected,
      {Duration dataPollingInterval =
          const Duration(microseconds: 500)}) async {
    /// either [readBytesOnListen] or [readBytesUntil]
    if (_readStream != null) {
      throw Exception("You have used listen function");
    }

    int event = 0;
    List<int> readData = List<int>.empty(growable: true);
    final expectedListLength = expected.length;

    while (true) {
      event = WaitCommEvent(handler!, _dwCommEvent, _over);
      if (event != FALSE) {
        ClearCommError(handler!, _errors, _status);
        if (_status.ref.cbInQue != 0) {
          readData.add((await _read(1))[0]);
        } else {
          /// do nothing
        }
      } else {
        if (GetLastError() == ERROR_IO_PENDING) {
          /// wait io complete, timeout in 500ms
          for (int i = 0; i < 1000; i++) {
            if (WaitForSingleObject(_over.ref.hEvent, 0) == 0) {
              ClearCommError(handler!, _errors, _status);
              if (_status.ref.cbInQue != 0) {
                readData.add((await _read(1))[0]);
              } else {}
              ResetEvent(_over.ref.hEvent);
              // break for next read operation.
              break;
            } else {
              ResetEvent(_over.ref.hEvent);
              // continue waiting
              await Future.delayed(dataPollingInterval);
            }
          }
        } else {
          /// Fallback
        }
      }
      if (readData.length < expectedListLength) {
        continue;
      } else {
        if (listEquals(
            readData.sublist(readData.length - expectedListLength), expected)) {
          return Uint8List.fromList(readData);
        } else {
          await Future.delayed(dataPollingInterval);
          continue;
        }
      }
    }
  }


Book signing is broken in some cases (1.9+ clients)

What is the output link of /viaversion dump?
https://gist.github.com/anonymous/a173e6b7d63b630fe1919042d99bfad3
Are you using any additional software like BungeeCord? If so, what software and version? (Please list your plugins as well)
BungeeCord
How does this error happen? login? Using an item?
How to replicate:

Get new book and quill
Put something in page 1 (whatever), put ONLY space (" ") in page 2
Sign the book

Furthermore, trying to handle this in PlayerEditBookEvent will not work as bookMeta.getPages() is also broken if you're trying to loop it.
Is there an error in the console? Use pastebin.com. Is there a kick message?
[13:44:42 ERROR]: Couldn't sign book
java.lang.NullPointerException
        at org.bukkit.craftbukkit.v1_8_R3.event.CraftEventFactory.stripEvents(CraftEventFactory.java:884) ~[patched.jar:git-TacoSpigot-"c2835df"]
        at org.bukkit.craftbukkit.v1_8_R3.event.CraftEventFactory.handleEditBookEvent(CraftEventFactory.java:872) ~[patched.jar:git-TacoSpigot-"c2835df"]
        at net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection.java:2032) [patched.jar:git-TacoSpigot-"c2835df"]
        at net.minecraft.server.v1_8_R3.PacketPlayInCustomPayload.a(SourceFile:55) [patched.jar:git-TacoSpigot-"c2835df"]
        at net.minecraft.server.v1_8_R3.PacketPlayInCustomPayload.a(SourceFile:8) [patched.jar:git-TacoSpigot-"c2835df"]
        at net.minecraft.server.v1_8_R3.PlayerConnectionUtils$1.run(SourceFile:13) [patched.jar:git-TacoSpigot-"c2835df"]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_131]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_131]
        at net.minecraft.server.v1_8_R3.SystemUtils.a(SourceFile:44) [patched.jar:git-TacoSpigot-"c2835df"]
        at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:774) [patched.jar:git-TacoSpigot-"c2835df"]
        at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:378) [patched.jar:git-TacoSpigot-"c2835df"]
        at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:713) [patched.jar:git-TacoSpigot-"c2835df"]
        at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:616) [patched.jar:git-TacoSpigot-"c2835df"]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]
[13:44:42 INFO]: Player lost connection: Invalid book data!

I'm able to replicate this, not sure what the solution is, maybe strip empty pages.
As a side note for anyone else looking at this issue the NBT it sends is "Value: PacketWrapper{packetValues=[], readableObjects=[Pair{Type|String, MC|BSign}, Pair{Type|Item, Item(id=387, amount=1, data=0, tag=CompoundTag { {pages=ListTag(pages) { [StringTag { dfgdfgsdg }, StringTag {   }] }, author=StringTag(author) { _MylesC }, title=StringTag(title) { dg }} })}]"


テスト: WEKO3 パッケージ管理対応

テストのために起こしたPRです。無視してください - yazawa

Purpose

Changes

QA Notes

Does this change require a data migration? If so, what data will we migrate?
What is the level of risk?

Any permissions code touched?
Is this an additive or subtractive change, other?

How can QA verify? (Through UI, API, AdminApp or AdminAdminApp?)

If verifying through API, what's the new version? Please include the endpoints in PR notes or Dev docs.

What features or workflows might this change impact?
How will this impact performance?
-->

Documentation

Side Effects

Ticket

必要PR: https://github.com/RCOSDP/RDM-waterbutler/pull/54

取り下げます。  https://github.com/RCOSDP/RDM-osf.io/pull/469 ベースで見直す予定です。


Changing the BWC version to 2.8.0 (#446)

Changing the BWC version to 2.8.0

Signed-off-by: Khushboo Rajput<EMAIL_ADDRESS>
nit: Changing the BWC version to 2.8.0

Signed-off-by: Khushboo Rajput<EMAIL_ADDRESS>
Signed-off-by: Khushboo Rajput<EMAIL_ADDRESS>(cherry picked from commit 92ab90bb0a622b6c188b76ed379687bdf9f2217b)
Is your feature request related to a problem? Please provide an existing Issue # , or describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you are proposing
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Check List

[ ] New functionality includes testing.

[ ] All tests pass

[ ] New functionality has been documented.

[ ] New functionality has javadoc added

[ ] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

2.8.0 cannot be the backward compatible version for the 2.8.0 branch. The BWC version in OpenSearch is (N-1).

2.8.0 cannot be the backward compatible version for the 2.8.0 branch. The BWC version in OpenSearch is (N-1).


Channel select panics "passed a receiver that wasn't selected" when using different clones of the same receiver

The correct id gets selected but when I try to do the operation it fails. I think this is a bug because I expect cloning a receiver to still be the same receiver.
Way of reproducing:
use crossbeam_channel::{Select, unbounded};

fn main() {
    let (tx, rx) = unbounded::<u32>();
    tx.send(123).unwrap();
    let mut select = Select::new();
    let id = select.recv(&rx);
    let operation = select.select();
    println!("recv id: {}. selected id: {}.", id, operation.index());
    operation.recv(&rx.clone()).unwrap();
}

[dependencies]
crossbeam-channel = "0.5.12"

Currently we are using a reference to the sender as an identifier, but I think we can fix this by using the pointer that the sender points to as an identifier.
https://github.com/crossbeam-rs/crossbeam/blob/9e8596105bc9a6b343918b6ad1c9656dc24dc4f9/crossbeam-channel/src/select.rs#L645
https://github.com/crossbeam-rs/crossbeam/blob/9e8596105bc9a6b343918b6ad1c9656dc24dc4f9/crossbeam-channel/src/counter.rs#L38-L39

Can the bug label be added to this? This is a bug imo.


Add 2D Hidden Linear Function problem and 1D Magic Square Problem examples

These problems can be solved exactly by a constant-depth quantum circuit using bounded fan-in gates (or QNC^0 circuits), but cannot be solved by any constant-depth classical circuit using bounded fan-in AND, OR, and NOT gates (or NC^0 circuits). These would be interesting programs because they don't use oracles.
Refer to:
https://arxiv.org/abs/1704.00690
https://arxiv.org/abs/1904.01502

can you please assign to me?

Thanks @vtomole

Hi Victory, can you please assign it to me unless @jitendrs is planning to work on it?
@vtomole

Hi,
I implemented circuit for Hidden Linear Function from the first paper (https://arxiv.org/pdf/1704.00690.pdf). I put it in Jupyter Notebook in my repository, please take a look: https://github.com/fedimser/quant_comp/blob/master/2D Hidden Linear Function.ipynb
I have some questions:

What should be the format? I noticed that most examples in Cirq are just Python files, but I personally find Jupyter Notebooks more convenient for examples.
Which parts of the paper should be in the example? I skipped all the proofs, and focused on implementing the circuit. Of course, I cited the paper where needed.
I didn't implement "2D Hidden Linear Function", just "Hidden Linear Function". Is this ok?
The difference is that 2D HLF restriction of HLF on some sets of inputs. It's important for the paper because only in restricted case it's possible to show the advantage of quantum algorithm over classical. But the difference in implementation is just adding a graph algorithm (coloring the edges of grid graph in 4 colors), which has nothing to do with quantum computing.
I don't understand why in fig.1 authors needed to make A and b qubits. I think they can be just classical bits, and this doesn't make any difference. So, I didn't make them qubits to keep my circuit smaller. Hope this is fine.

If this notebook is good, I will copy it to examples in this repository.

Notebooks are great! We need more notebooks in examples/.

Proofs will make the notebook too long. As long as the reader can follow how the circuit follows from the formulas, it's good.

I think implementing 2D Hidden Linear Function  is important because I would want to link this notebook to someone who asks questions like: https://quantumcomputing.stackexchange.com/questions/10009/how-can-we-compare-quantum-algorithms-against-classical-equivalents

I'd have to look at the paper again. I'll try to read your notebook before this week's sync.

If you want to do this as a jupyter notebook, I would recommend putting it in docs/notebooks as an example (don't add it to table of contents yet).  I am working on putting together a nbsphinx converter to convert these to markdown automatically and then adding a section for "case studies", where we will go into an in-depth example.
In general, I would imagine that the goal of this should be two-fold.  #1 priority is to show how to do this in cirq, and #2 priority is to explain the problem in more depth.  I would focus on these objectives rather than try to reproduce results from the paper.
My comments for review.
Introduction: Would recommend putting an embbedded link to the paper instead of a reference so people can directly click on it.  I don't think "cirquit" is an actual term and would just say "solve it using a cirq Circuit".
The problem:  I would add more information here for background.  If this is to help people understand the problem better, they should have more background before jumping straight into mathematical definition.
Preparation and brute force:  Add many comments and doc strings to the code.  Remember, the goal is to illustrate how to do the task.  Also, at the end, you print out two numbers, but don't really explain what those two numbers are.
Solution with a quantum circuit:  Change "# Given adjacency matrix A ..." in In[5] to a python docstring rather than single line comments.
cirq.H(qubits[i]) for i in range(problem.n) can just be cirq.H(q) for q in qubits cirq.S.oncan just becirq.S`
I would generally add more explanatory test to this section to explain the solution and what it is doing.
Why is this problem interesting:  I would put this section at the beginning as a sub-section to introduction as a way of introducing the problem.

Thanks, Doug!
I will address your comments and create a PR adding this notebook to docs/notebooks. I'll try to do that tommorow.

Created PR with a notebook, please review.
@dstrain115

This has been completed and is now available on readthedocs and in the repo:
https://cirq.readthedocs.io/en/latest/tutorials/hidden_linear_function.html


feature: md-grid-list define the number of columns based screen size (media)

Bug, feature request, or proposal:
feature request
What is the expected behavior?
To be able to set the number of columns for Grid list component, based on screen size (media)
What is the current behavior?
The same number of columns are used in any screen size.

Dupe of #1072


feat: add codecov token

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@aa0a230). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master      #22   +/-   ##
=========================================
  Coverage          ?   10.16%
=========================================
  Files             ?        3
  Lines             ?      177
  Branches          ?        0
=========================================
  Hits              ?       18
  Misses            ?      159
  Partials          ?        0

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 aa0a230...3e811a7. Read the comment docs.


[TECH ED] Join Codewars

From Module-HTML-CSS created by SallyMcGrath: CodeYourFuture/Module-HTML-CSS#11
Link to the coursework
https://www.codewars.com/join
Why are we doing this?
When you begin JS1 you will also begin Codewars, if you have not done so already. Prepare now by signing up to Codewars.
You will complete at least three kata a week for the rest of the course.

Read the CYF tutorial and code along with the example kata.
Link your account with Github, and join the CodeYourFuture clan, so we can find you on the clan board here: https://www.codewars.com/users/CodeYourFuture/following
Add your Codewars username to the trainee tracker, so you can start building your milestone. If you don't add your username to the tracker, it can't track your progress.

By the end of JS1, you need to have completed nine kata to meet your milestone. Codewars is not just to practice JavaScript, it's to practice time management and study skills.
All the CYF collections are on the CYF account. Here's a beginner collection of kata to practice on for now: https://www.codewars.com/collections/cyf-fundamentals
This has to be completed by the end of this module.
Maximum time in hours
1
How to submit
Add your username to your trainee tracker.

https://www.codewars.com/users/AbdihamidAli


Training Impl

Hi, is the training implementation on your time line yet?
Or rather, can the Graphics Pipelines be modified somehow to support gradients tracking? Currently the information about the contributing gaussians to each pixel is missing. can they be extracted in anyway?
Fantastic project btw🥇

Hi,
I have been thinking about using graphics pipeline in train step, and found it a very difficult problem.
When I implemented viewer, I had a certain degree of expectation about how much it will be faster compared to CUDA implementation. Rendering only involves a forward step.
In backward step, however, my expectation is not really as high as in forward step. A pixel screen buffer and AtomicAdd operations for every fragment are inevitable, lessening the benefit of Graphics pipeline. It reminds me that the small MLP introduced in instant-ngp was 10x faster in forward step, but only 2x faster in backward step.

Currently the information about the contributing gaussians to each pixel is missing.

You are right. Alpha blending is done by Vulkan. But for backward step, a pixel screen buffer for accumulating contributing gaussians will be necessary.
So, I don't know how beneficial it is to write backward step in Vulkan. If you have breakdowns in each step in a training iteration, it would be helpful for me to decide if it is worth trying.


Makefile invokes 'make' explicitly, causing build failure on non-GNU systems

When building on FreeBSD (and possibly other systems) which do not ship the GNU version of make, building by calling make will fail. It is common to instead install and use gmake, but it will still fail due to invoking make explicitly in the Makefile.
To make the recipe more portable I suggest using $(MAKE) within the Makefile, which is expanded according to this:

The value of this variable is the file name with which make was invoked.

(See here for more info)

I was not aware of this, thank you!


Math operators: Average, Concat, Min and Max

Average operators: AverageFloat32, AverageFloat64, AverageInt, AverageInt8, AverageInt16, AverageInt32, AverageInt64
Concat operator
Min and Max operators: value calculated according to a given comparator
Improvement of the assertion API: management of Single and OptionalSingle types

Pull Request Test Coverage Report for Build 239

341 of 349 (97.71%)  changed or added relevant lines in 4 files are covered.
10 unchanged lines in 2 files lost coverage.
Overall coverage increased (+1.8%) to 93.539%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

observablecreate.go
32
34
94.12%

assert.go
97
103
94.17%

Files with Coverage Reduction
New Missed Lines
%

errors/errors.go
3
100.0%

options/options.go
7
100.0%

Totals

Change from base Build 238:
1.8%

Covered Lines:
1303

Relevant Lines:
1393

💛  - Coveralls

Pull Request Test Coverage Report for Build 239

341 of 349 (97.71%)  changed or added relevant lines in 4 files are covered.
10 unchanged lines in 2 files lost coverage.
Overall coverage increased (+1.8%) to 93.539%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

observablecreate.go
32
34
94.12%

assert.go
97
103
94.17%

Files with Coverage Reduction
New Missed Lines
%

errors/errors.go
3
100.0%

options/options.go
7
100.0%

Totals

Change from base Build 238:
1.8%

Covered Lines:
1303

Relevant Lines:
1393

💛  - Coveralls

Pull Request Test Coverage Report for Build 239

341 of 349 (97.71%)  changed or added relevant lines in 4 files are covered.
10 unchanged lines in 2 files lost coverage.
Overall coverage increased (+1.8%) to 93.539%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

observablecreate.go
32
34
94.12%

assert.go
97
103
94.17%

Files with Coverage Reduction
New Missed Lines
%

errors/errors.go
3
100.0%

options/options.go
7
100.0%

Totals

Change from base Build 238:
1.8%

Covered Lines:
1303

Relevant Lines:
1393

💛  - Coveralls


chore: updates

Codecov Report

Merging #139 (04a26eb) into master (f411965) will increase coverage by 0.94%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #139      +/-   ##
==========================================
+ Coverage   78.71%   79.65%   +0.94%
==========================================
  Files         123      123
  Lines       11394    11332      -62
  Branches     1209     1175      -34
==========================================
+ Hits         8969     9027      +58
+ Misses       2425     2305     -120

Flag
Coverage Δ

unittests
79.65% <100.00%> (+0.94%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

packages/lib/components/skeleton/skeleton.tsx
98.98% <ø> (+3.98%)
:arrow_up:

packages/lib/icons/align-center.tsx
6.66% <ø> (-10.99%)
:arrow_down:

packages/lib/icons/align-justify.tsx
93.33% <ø> (+58.03%)
:arrow_up:

packages/lib/icons/arrow-right.tsx
6.25% <ø> (-10.42%)
:arrow_down:

packages/lib/icons/avatar.tsx
5.88% <ø> (-9.91%)
:arrow_down:

packages/lib/icons/check-circle.tsx
5.55% <ø> (-9.45%)
:arrow_down:

packages/lib/icons/check.tsx
100.00% <ø> (ø)

packages/lib/icons/chev-down.tsx
100.00% <ø> (ø)

packages/lib/icons/chev-right.tsx
100.00% <ø> (ø)

packages/lib/icons/circle.tsx
5.55% <ø> (-9.45%)
:arrow_down:

... and 62 more

Continue to review full report at Codecov.

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


Get buffer after ffmpeg finished it's work

Hello, i am trying to get buffer after ffmpeg convert my audio contained in a writable buffer which i gave to ffmpeg constructor.
Is it possible to do that without third-party modules?

fluent-ffmpeg version: 6.14.7
ffmpeg version: 3.2.15+deb9u1
OS: Debian

Code to reproduce
let FFmpeg = require('fluent-ffmpeg');
  let buffer = new Buffer(data, 'base64');
  let bufferStream = new stream.PassThrough();
  bufferStream.end(buffer);
  let bufferStream_new = new stream.SomeProperty();

new FFmpeg({
    source: bufferStream
  })
  .audioCodec('pcm_mulaw')
  .on('error', function(err) {
    socket.emit('ffmpeg-error', 'ffmpeg : сообщение ошибки: ' + err.message);
  })
  .on('progress', function(progress) {
    socket.emit('ffmpeg-output', Math.round(progress.percent));
    console.log("progress")
  })
  .on('end', function(){
    //socket.emit('merged', dateTimeString + fileName + '-pcm_mulaw.wav');
    console.log('Formating finished!');
    //fs.unlinkSync(audioFile);
    console.log("after");
    //console.log(this.Buffer);
  })
  .writeToStream(bufferStream_new);

Expected results
 writeToBuffer(bufferStream_new);

console.log(bufferStream_new); // Any available buffer to read or just a regular ArrayBuffer instead

Observed results
ffmpeg : errormsg: ffmpeg exited with code 1: pipe:1: Invalid argument

p.s I am sorry for incorrect example. I just want to show what i want to achieve

Try adding the .format('mp4') for example.

I don't want to just say “same issue!”, so below is code for a similar situation. ffmpeg successfully converts the file, and I can verify the audio is as expected if I write to file and listen to it. However, the PassThrough stream doesn't seem to ever get ran, none of the console.log statements fire.
As extra grievances, the events progress and end never fire either. stderr is the only one that gets triggered, although weirdly it prints out all messages from ffmpeg, not just stderr. That piece of output is consistent with running ffmpeg in the command line without fluent-ffmpeg.
It's sad that we can't make conversion work with buffers and/or streams. That would open up the possibility of in-memory file conversion, which is what I'm aiming for. I don't mind writing to disk, but it'd be cooler to do this The Node Way 😄
const buffers = []
const bufferStream = new stream.PassThrough()

bufferStream
	.on('start', () => {
		console.log('Pass-through stream has started')
	})
	.on('data', function (buf) {
		console.log('bufferStream data', buf)
		buffers.push(buf)
	})
	.on('end', function () {
		const outputBuffer = Buffer.concat(buffers)
		console.log('Done preparing bufferStream')
	})

ffmpeg(inputBuffer)
	.audioCodec('libvorbis')
	.format('ogg')
	.on('start', (commandLine) => {
		console.log('ffmpeg started conversion', commandLine)
	})
	.on('stderr', function (stderrLine) {
		console.error('Stderr output: ' + stderrLine)
	})
	.on('error', function (err) {
		console.error('ffmpeg-error', err)
		reject(err)
	})
	.on('progress', function (progress) {
		console.log('ffmpeg-output', Math.round(progress.percent))
	})
	.on('end', function () {
		console.log('Formating finished!')
	})
	.writeToStream(bufferStream)

Finding this too - is it not possible to merge and stream the output to buffers? I don't want to save to file - just do it in memory

I was able to do it this way.
async extractAudioFromVideo(videoBuffer: Buffer): Promise<Buffer> {
    return new Promise((resolve, reject) => {
      const videoStream = new PassThrough();
      videoStream.end(videoBuffer);

      const audioChunks: Buffer[] = [];
      const audioStream = new PassThrough();

      audioStream.on('data', (chunk) => {
        audioChunks.push(chunk);
      });

      ffmpeg(videoStream)
        .toFormat('mp3')
        .audioCodec('libmp3lame')
        .audioBitrate('128k')
        .outputOptions([
          '-max_muxing_queue_size 1024',
          '-bufsize 4M',
          '-threads 4',
        ])
        .audioChannels(1)
        .audioFrequency(16000)
        .on('error', (error) => {
          console.error('FFmpeg error:', error);
          reject(error);
        })
        .on('end', () => {
          const audioBuffer = Buffer.concat(audioChunks);
          resolve(audioBuffer);
        })
        .pipe(audioStream);
    });
  }


Feature request: Remove/delete a repo

Please enable us to remove/delete a cloned repo through ghq. Currently, I have to delete them manually. And if possible, I want to be able to remove an organization like github.com, or an account under that organization, like github.com/singularitti/. Thank you!

A possible command could be ghq remove [arguments...].

You can pass a query argument to ghq list like following.
ghq list --full-path github.com/motemen
/Users/songmu/dev/src/github.com/motemen/Class-Accessor-Lite-Lazy
/Users/songmu/dev/src/github.com/motemen/blogsync
/Users/songmu/dev/src/github.com/motemen/ghq
...

And you can remove them as follows.
ghq list --full-path github.com/motemen | xargs rm -r

And more, you can use the --exactoption and some query patterns to list repository paths in various ways.
Is this not enough?

@Songmu Thank you for your reply. I know I can do this by, for example, rm -rf or [trash](https://github.com/sindresorhus/trash) commands. And I understand this may not be your first priority. But I guess people would be grateful if they can remove something in the same way they create it. That is, what I think, a repository management tool would provide.

After all, I do not feel much need, so close the issue.
In my opinion, it is better to enhance the "ghq list" to easily obtain arbitrary information and delete them by the user in any way.
First, I think that "ghq list" should be enhanced before implementing "ghq remove".
Of course, ghq is OSS, so your patches are also welcome.


paper_authors are inconsistent/wrong

Some authors in paper_authors are "First Last", some are "Last, First" and some are "First, Last" which is wrong. (Examples: "Matt, Boyd", "Isabel, Johnson" .)
Some are "Jones, David", some are "Jones, D" and some are "Jones, D.".
There's also "Glomseth" which looks odd.
Most important is to fix the "First, Last" items and to keep them consistent w.r.t last/first order.

I think Will has been adding authors here - this should be mostly in "First Last" order now, but it's still in progress

For all papers added, the names have been formatted in the same format now ' first name last name'

Okay, close if fixed


feat(BrowserContext): introduce Browser Contexts.

This patch introduces Browser Contexts and methods to manage them:

browser.createIncognitoBrowserContext() - to create new incognito
context
browser.browserContexts() - to get all existing contexts
browserContext.dispose() - to dispose incognito context.

Fixes #85.

I think we should mirror the target events on the browser context. So I can await targetcreated on the browser context to find my popup without worrying about what other pages might be doing.

I think we should mirror the target events on the browser context. So I can await targetcreated on the browser context to find my popup without worrying about what other pages might be doing.

Valid usecase. Let me add these.

good news!


Code completion of compound literal

Most recently, clangd has added support for completion of designated initializers:
struct params { int x; int y; };
struct params params = { .x = 2, .y = 3 }; // beautiful completion when typing '.'
a_func(params);

Unfortunately, it only seems to work when using a named variable. If I want to use compound literals, it doesn't seem to work:
struct params { int x; int y; };
a_func((struct params){ .x = 2, .y =3 }); // no completion when typing '.'

Duplicate #142


The elasticsearch role should NOT assume localhost for the elasticsearch service

We need to enable the use case where PCP metrics are gathered from an Elasticsearch (or OpenSearch) instance that is not local to the PMDA, and could use HTTPS w/ certificates or bearer tokens to enable metics gathering.

@portante what are the situations where you would not want to run the PMDA on the same machine?  PCP should always be installed on all hosts forming part of any distributed system as performance problems can originate anywhere.  In that case, its always the best deployment option (more efficient, simpler installs) and it seems we should be enforcing this (as we are now) so as to not add network load while sampling.  It also obviously keeps the roles simpler if we don't have to add more variables, certificate handling, and so on.

There are a few reasons.
The statistics for Elasticsearch returned are for the whole cluster, all nodes in the cluster.  Some of the queries are very involved when you have lots of indices.  So having every node in an Elasticsearch cluster gather all the same metrics, can actually cause problems for the cluster itself.
So if I have a 20 node elasticsearch cluster this would be a huge problem.
Typically, you'd have those metrics collected only from the "master" nodes, since most installations only have a small number of master nodes relative to the total number of nodes in the cluster.  But even that is not great, because typically folks deploy with 3 masters for availability.
But again, the elasticsearch metrics PCP collects are not for the host name on which they are collected from, but for the elasticsearch entity cluster itself.
The metrics are not really collected locally.  While the elasticsearch API in use might hit a "localhost" end-point, elasticsearch in turn will send out a flood of queries to all the hosts to return the information requested.  So there is no really network load being saved.
An elasticsearch admin would want to monitor the health of the cluster from outside the cluster.  That is, we would not want a load on one member of the cluster to prevent metrics from being gathered.  So while each node of an elasticsearch cluster would have PMDAs for other sub-systems, a "client" node would be setup to participate in the cluster, service the metrics requests, while knowing how to communicate properly with all cluster members.
But burning a whole client node to do that is a bit of a waste, so having an external PMDA target one or more client nodes (often placed behind a load-balance service like haproxy or nginx) gives us the lowest API load for gathering metrics on the cluster.
If PCP had a way for the PMDA to target metrics for something other than host name, then ideally we'd have an archive per elasticsearch cluster.
We run 3 elasticsearch cluster in our environment: Elasticsearch V1, OpenSearch 1.2.4 (Elasticsearch V7 equiv), and a second OpenSearch 1.2.4 cluster just for the logs from the infrastructure nodes providing the services.
So ideally, I'd have one PMDA which could be configured to gather all the metrics from each cluster.

Makes sense, thanks @portante


dateWithoutSepMatch(..) not working

While writing test i found that dateWithoutSepMatch(..) is not working.
I have yet to dig into this one and figure out why.

Should now be working for dates with 8 digits.


feat(expr): (preview) allow expr fns to access DataType of arg scalars

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
Note: There is no immediate need to support this. Just initiating the discussion if anyone is interested.
Currently we implement a sql expression by a rust function like this:
fn foo(x: i32, y: &str, z: ListRef<'_>) -> Result<String>

This works well for parameterless types, such as int, varchar, decimal, time.
However, we are not able to tell whether the ListRef is an int[][] or int[] or bool[] when it is empty or only contains nulls. We have been avoiding this need by not supporting types varchar(n), decimal(p, s), time(p), but it could be a problem for list and struct type.
This PR demonstrates a way to pass DataType into such functions:
fn foo(x: WithType<'_, i128>, y: WithType<'_, &str>, z: WithType<'_, ListRef<'_>>) -> Result<String>

where WithType is a simple struct:
pub struct WithType<'a, T> {
    pub value: T,
    pub data_type: &'a DataType,
}

Most content of the PR is copied from UnaryExpresion and then updated to use the new function signature.
Limitations:

The expected return type cannot be passed this way. Note that expected return type is also an input argument, rather than an output determined during evaluation. For example the varchar to list cast.

Checklist For Contributors

[ ] I have written necessary rustdoc comments
[ ] I have added necessary unit tests and integration tests
[ ] I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features #7934).
[ ] I have demonstrated that backward compatibility is not broken by breaking changes and created issues to track deprecated features to be removed in the future. (Please refer to the issue)
[ ] All checks passed in ./risedev check (or alias, ./risedev c)

Checklist For Reviewers

[ ] I have requested macro/micro-benchmarks as this PR can affect performance substantially, and the results are shown.

Documentation

[x] My PR DOES NOT contain user-facing changes.

Alternative is to use #[build_function] rather than #[function], and access the needed data type from a closure.
https://github.com/risingwavelabs/risingwave/blob/88117e046d46398277ce488ecd2592bffd6d216e/src/expr/src/vector_op/cast.rs#L326-L341
This is more adhoc, but is suitable when such functions are rare.


Compare different diagram versions similar to Page history in Confluence

Is it possible to compare different versions of a draw io diagram implemented to a confluence page. Similar to the page history of confluence.
https://drawio.atlassian.net/browse/DID-839

"Is it possible to (graphically) compare two versions of a digram? At the moment we only have the following comparison""
Asked in DID 6437

At the moment, we compare drawio diagram versions on Con Cloud only under File > Revision history. On Con DC it is possible to compare page versions only.

Would it be possible to include this feature? - it would be very helpful.

Hello,
any news about this topic?
thx

There is no news, when there is news it would be posted.

+1 Feature for graphical comparison of two versions of a diagram requested by a customer. Is there even a timeline when this will be implemented?

For DC please file a ticket at<EMAIL_ADDRESS>with SEN. We rate feature requests by the count of in-maintenance users that request them.

Hi,
i dont understand what I should do.
Thank you for helping.
Regards,
Carina
Freundliche Grüße / Best regards
i.A. Carina Kiefer
Quality Manager
Uhlmann Pac-Systeme GmbH & Co. KG
Uhlmannstr. 14-18
88471 Laupheim, Germany
Phone +49 7392 702-6364
Mobile +49 174 7439 174
Fax +49 7392 702-2364
<EMAIL_ADDRESS>www.uhlmann.dehttp://www.uhlmann.de/
Von: David Benson @.>
Gesendet: Freitag, 27. Januar 2023 17:30
An: jgraph/drawio @.>
Cc: Kiefer Carina @.>; Manual @.>
Betreff: Re: [jgraph/drawio] Compare different diagram versions similar to Page history in Confluence (#1469)
Sie erhalten nicht oft eine E-Mail von @.*** Erfahren Sie, warum dies wichtig isthttps://aka.ms/LearnAboutSenderIdentification
Attention: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. Sender information: Sender Address: @.***, Sending server: out-17.smtp.github.com
For DC please file a ticket at<EMAIL_ADDRESS>with SEN. We rate feature requests by the count of in-maintenance users that request them.
—
Reply to this email directly, view it on GitHubhttps://github.com/jgraph/drawio/issues/1469#issuecomment-1406738578, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A5PK47WJH7G6CIXCN45Q6DDWUPZXBANCNFSM4TYNNRAA.
You are receiving this because you are subscribed to this thread.Message ID: @.***>
Uhlmann Pac-Systeme GmbH & Co. KG
Registergericht Ulm HRA 720615 - Persönlich haftende Gesellschafterin: Uhlmann Pac-Systeme Verwaltungsgesellschaft mbH - Registergericht Ulm HRB 721209 - USt-IdNr. DE324830015
Vorsitzender des Aufsichtsrats: Tobias Uhlmann - Geschäftsführer:Prof. Dr.-Ing. Matthias Niemeyer (CEO), Michael Mrachacz (CSO), Cristian Reiter (CTO)Alexander Schöllhorn (CFO)
Uhlmann Pac-Systeme GmbH & Co. KG
Court of Register Ulm HRA 720615 - General partner: Uhlmann Pac-Systeme Verwaltungsgesellschaft mbH - Court of Register Ulm HRB 721209 - VAT Reg No DE324830015
Chairman of the Supervisory Board: Tobias Uhlmann - Managing Directors: Prof. Dr.-Ing. Matthias Niemeyer (CEO), Michael Mrachacz (CSO), Cristian Reiter (CTO), Alexander Schöllhorn (CFO)

+1 Feature for graphical comparison of two versions of a diagram requested by a customer. Is there even a timeline when this will be implemented? Needed for Conf. Server/DC

We are in the same situation - I also made a request at draw.io and ended up here

Voting is done by adding a thumbs up to the original request.


zig-11-llvm-16 branch: simple dbg results in Bus error

app "expects-test"
    packages { pf: "zig-platform/main.roc" }
    imports []
    provides [main] to pf

main =
    dbg 1
    "done"

The used zig-platform is this one.
The Bus error shows when running with roc dev on zig-11-llvm-16 on the i7-6700K CI machine.
It also shows when manually running the executable produced by roc dev on the main branch on any x86_64 linux machine, but that may be expected because of our approach for handling dbg.
valgrind output (from zig-11-llvm-16 branch):
==136904== Memcheck, a memory error detector
==136904== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==136904== Using Valgrind-3.21.0 and LibVEX; rerun with -h for copyright info
==136904== Command: ./crates/cli_testing_examples/expects/expects-test
==136904==
==136904== Syscall param openat(filename) points to uninitialised byte(s)
==136904==    at 0x4875ABB: open (open64.c:48)
==136904==    by 0x4A7BF1D: shm_open (shm_open.c:44)
==136904==    by 0x197666: ??? (in /home/big-ci-user/gitrepos/rocnonix/roc/crates/cli_testing_examples/expects/expects-test)
==136904==    by 0x24CE47: ??? (in /home/big-ci-user/gitrepos/rocnonix/roc/crates/cli_testing_examples/expects/expects-test)
==136904==    by 0x196C79: ??? (in /home/big-ci-user/gitrepos/rocnonix/roc/crates/cli_testing_examples/expects/expects-test)
==136904==    by 0x48A9082: (below main) (libc-start.c:308)
==136904==  Address 0x1ffefff789 is on thread 1's stack
==136904==  in frame #1, created by shm_open (shm_open.c:35)
==136904==
Bus error at address 0x402c000
???:?:?: 0x24f9a1 in ??? (???)
==136904== Syscall param msync(start) points to unaddressable byte(s)
==136904==    at 0x48759D7: msync (msync.c:25)
==136904==    by 0x1DCDDA: os.msync (mem.zig:3884)
==136904==    by 0x1CA984: debug.StackIterator.isValidMemory (debug.zig:720)
==136904==    by 0x1DD1EE: debug.StackIterator.next_internal (debug.zig:695)
==136904==    by 0x1CAE3E: debug.StackIterator.next (debug.zig:587)
==136904==    by 0x1DF200: debug.dumpStackTraceFromBase (debug.zig:0)
==136904==    by 0x1CBD3B: debug.dumpSegfaultInfoPosix (fmt.zig:1996)
==136904==    by 0x1998DC: debug.handleSegfaultPosix (debug.zig:0)
==136904==    by 0x487641F: ??? (in /usr/lib/x86_64-linux-gnu/libpthread-2.31.so)
==136904==    by 0x24F9A0: ??? (in /home/big-ci-user/gitrepos/rocnonix/roc/crates/cli_testing_examples/expects/expects-test)
==136904==    by 0x196C79: main (builtin.zig:841)
==136904==  Address 0x1ffeffd000 is on thread 1's stack
==136904==  3560 bytes below stack pointer
==136904==
==136904== Invalid read of size 8
==136904==    at 0x1DD28F: debug.StackIterator.next_internal (debug.zig:0)
==136904==    by 0x1CAE3E: debug.StackIterator.next (debug.zig:587)
==136904==    by 0x1DF200: debug.dumpStackTraceFromBase (debug.zig:0)
==136904==    by 0x1CBD3B: debug.dumpSegfaultInfoPosix (fmt.zig:1996)
==136904==    by 0x1998DC: debug.handleSegfaultPosix (debug.zig:0)
==136904==    by 0x487641F: ??? (in /usr/lib/x86_64-linux-gnu/libpthread-2.31.so)
==136904==    by 0x24F9A0: ??? (in /home/big-ci-user/gitrepos/rocnonix/roc/crates/cli_testing_examples/expects/expects-test)
==136904==    by 0x196C79: main (builtin.zig:841)
==136904==  Address 0x1ffeffdc30 is on thread 1's stack
==136904==  896 bytes below stack pointer
==136904==
==136904== Invalid read of size 8
==136904==    at 0x1DD473: debug.StackIterator.next_internal (debug.zig:887)
==136904==    by 0x1CAE3E: debug.StackIterator.next (debug.zig:587)
==136904==    by 0x1DF200: debug.dumpStackTraceFromBase (debug.zig:0)
==136904==    by 0x1CBD3B: debug.dumpSegfaultInfoPosix (fmt.zig:1996)
==136904==    by 0x1998DC: debug.handleSegfaultPosix (debug.zig:0)
==136904==    by 0x487641F: ??? (in /usr/lib/x86_64-linux-gnu/libpthread-2.31.so)
==136904==    by 0x24F9A0: ??? (in /home/big-ci-user/gitrepos/rocnonix/roc/crates/cli_testing_examples/expects/expects-test)
==136904==    by 0x196C79: main (builtin.zig:841)
==136904==  Address 0x1ffeffdc38 is on thread 1's stack
==136904==  888 bytes below stack pointer
==136904==
Unwind error at address `:0x24f9a1` (error.AddressOutOfRange), trace may be incomplete

/home/big-ci-user/Downloads/zig-linux-x86_64-0.11.0/lib/std/mem.zig:726:19: 0x19a785 in span__anon_4981 (host)
        return ptr[0..l :s];
                  ^
==136904==
==136904== Process terminating with default action of signal 6 (SIGABRT)
==136904==    at 0x48C800B: raise (raise.c:51)
==136904==    by 0x48A7858: abort (abort.c:79)
==136904==    by 0x198DD8: os.abort (debug.zig:316)
==136904==    by 0x199877: debug.handleSegfaultPosix (debug.zig:0)
==136904==    by 0x487641F: ??? (in /usr/lib/x86_64-linux-gnu/libpthread-2.31.so)
==136904==    by 0x24F9A0: ??? (in /home/big-ci-user/gitrepos/rocnonix/roc/crates/cli_testing_examples/expects/expects-test)
==136904==    by 0x196C79: main (builtin.zig:841)
==136904==
==136904== HEAP SUMMARY:
==136904==     in use at exit: 0 bytes in 0 blocks
==136904==   total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==136904==
==136904== All heap blocks were freed -- no leaks are possible
==136904==
==136904== Use --track-origins=yes to see where uninitialised values come from
==136904== For lists of detected and suppressed errors, rerun with: -s
==136904== ERROR SUMMARY: 6 errors from 4 contexts (suppressed: 0 from 0)
Aborted (core dumped)

executable-ubu2004.tar.gz

I was able to reproduce this error on my Ubuntu 22.04 VM and on NixOS. To reproduce it I had to run the executable produced by the dev command manually.

This error is also on the main branch:
❯ ./target/release/roc dev crates/cli_testing_examples/expects/expects.roc
🔨 Rebuilding platform...
── EXPECT FAILED ───────────── crates/cli_testing_examples/expects/expects.roc ─
[...]
[crates/cli_testing_examples/expects/expects.roc 13:9] A (B C)
Program finished!
runtime: 0.566ms

roc on  main is 📦 v0.0.1 via 🦀 v1.71.1 via ❄  impure (nix-shell-env)
❯ ./crates/cli_testing_examples/expects/expects-test
Bus error at address 0x7ffff7dcf000
Inconsistency detected by ld.so: dl-runtime.c: 63: _dl_fixup: Assertion `ELFW(R_TYPE)(reloc->r_info) == ELF_MACHINE_JMP_SLOT' failed!

It appears that when running through roc dev, we handle dbg in a special way.

I was able to reproduce this issue on an Ubuntu 20.04 (same version as CI) VM.

On ubuntu 20.04 the executable here is dyn linked to libpthread and librt, on 22.04 these are missing. librt is used for sharing memory which we do for dbg so I suspect that's an important difference.
Notably, I also tried dbg with a Rust platform on ubuntu 20.04 and that did work.

Bisection has narrowed this down to commit 612877036


[WIP] Finalize firewalld port forwarding support

There are two major changes here.
Firstly, this adds proper support for port forwarding from localhost via a new policy accepting traffic from HOST. This is the last bit we were missing from the original port-forwarding implementation.
Secondly, this fixes a bug where we generated incorrect rules when port-forwarding from a single IP. Instead of doing standard port-forwarding rules, those need rich rules. This was reported as #881.
There are also some small code cleanups in how we handle setting up and tearing down port forwarding. It's still rather ugly, but at least a little better than it was before.
Fixes #881

Tagging WIP as I'm still working on some bugs, seemingly related to firewalld 2.0

Hm. Tests aren't even running firewalld, despite fw_driver=firewalld being set.

Localhost port forwarding: still broken, being worked on.
Remote port forwarding: should be fully working after latest push.

It is, though there were problems on the firewalld side that needed to be resolved before I went ahead. Those should be fixed, so I'm hoping to get back to this in January.


Optional params don't work (NOT QUERY)

Same as #435 but invalidly closed.
This doesn't work: /users/:id?
The one @SaltyAom mentioned are these /users?id=123 which work fine.

Hi, make sure to use the latest version of elysia (1.1.11) and clean re-install it with removing node_modules and bun.lockb.
I can't reproduce it on my end:
import { Elysia } from "elysia";

new Elysia().get("/users/:id?", ({ params: { id } }) => ({ id })).listen(8080);

http://localhost:8080/users/323
{"id":"323"}

http://localhost:8080/users
{}

If not, please share some code snipped to reproduce it properly

ohh my bad, seems like its working now. sorry.


Merge trial_math into main

Update catalog, thumbnails trial and pilot dataset WP3

Merging branch with thumbnails trial in catalog and WP3 pilot dataset