Running the service samples behind a proxy

I tried to run the samples on our company network on a Ubuntu Linux machine behind a proxy server. When I run iothub_messaging_sample.py I get the errors shown below. I have set the http_proxy and ftp_proxy variables, but those do not seem to have any effect over AMQP. Any idea if there is a way to get the sample to work behind a proxy server?
> (azureenv) local@udb:~/azure-iot-sdk-python/service/samples$ python iothub_messaging_sample.py -c "HostName=<DELETED>.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=<DELETED>" -d devicea5bd950e960539a93a18bea3
>
> Python 2.7.6 (default, Nov 23 2017, 15:49:48)
> [GCC 4.8.4]
> IoT Hub Service Client for Python
>
> Starting the IoT Hub Service Client Messaging Python sample...
>     Connection string = HostName=<DELETED>.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=<DELETED>
>     Device ID         = devicea5bd950e960539a93a18bea3
> Error: Time:Fri Sep 14 17:38:07 2018 File:/home/local/workdir/azure/azure-iot-sdk-python/c/c-utility/adapters/socketio_berkeley.c Func:lookup_address_and_initiate_socket_connection Line:282 Failure: getaddrinfo failure -2.
> Error: Time:Fri Sep 14 17:38:07 2018 File:/home/local/workdir/azure/azure-iot-sdk-python/c/c-utility/adapters/socketio_berkeley.c Func:socketio_open Line:765 lookup_address_and_connect_socket failed
> Info: Closing tlsio from a state other than TLSIO_STATE_EXT_OPEN or TLSIO_STATE_EXT_ERROR
> Error: Time:Fri Sep 14 17:38:07 2018 File:/home/local/workdir/azure/azure-iot-sdk-python/c/c-utility/adapters/tlsio_openssl.c Func:on_underlying_io_open_complete Line:760 Invalid tlsio_state. Expected state is TLSIO_STATE_OPENING_UNDERLYING_IO.
> Error: Time:Fri Sep 14 17:38:07 2018 File:/home/local/workdir/azure/azure-iot-sdk-python/c/c-utility/adapters/tlsio_openssl.c Func:tlsio_openssl_open Line:1258 Failed opening the underlying I/O.
> Error: Time:Fri Sep 14 17:38:07 2018 File:/home/local/workdir/azure/azure-iot-sdk-python/c/uamqp/src/saslclientio.c Func:saslclientio_open_async Line:1097 xio_open failed
> Error: Time:Fri Sep 14 17:38:07 2018 File:/home/local/workdir/azure/azure-iot-sdk-python/c/uamqp/src/connection.c Func:connection_open Line:1344 Opening the underlying IO failed
> Error: Time:Fri Sep 14 17:38:07 2018 File:/home/local/workdir/azure/azure-iot-sdk-python/c/uamqp/src/link.c Func:link_attach Line:1154 Begin session failed
> Error: Time:Fri Sep 14 17:38:07 2018 File:/home/local/workdir/azure/azure-iot-sdk-python/c/uamqp/src/message_sender.c Func:messagesender_open Line:779 attach link failed
> Error: Time:Fri Sep 14 17:38:07 2018 File:/home/local/workdir/azure/azure-iot-sdk-python/c/iothub_service_client/src/iothub_messaging_ll.c Func:IoTHubMessaging_LL_Open Line:1267 Could not open the message sender.
> Error: Time:Fri Sep 14 17:38:07 2018 File:/home/local/workdir/azure/azure-iot-sdk-python/c/uamqp/src/amqpvalue.c Func:amqpvalue_destroy Line:3465 NULL value
> Error: Time:Fri Sep 14 17:38:07 2018 File:/home/local/workdir/azure/azure-iot-sdk-python/c/uamqp/src/amqpvalue.c Func:amqpvalue_destroy Line:3465 NULL value
> Traceback (most recent call last):
>   File "iothub_messaging_sample.py", line 119, in <module>
>     iothub_messaging_sample_run()
>   File "iothub_messaging_sample.py", line 90, in iothub_messaging_sample_run
>     print ( "Unexpected error {0}" % iothub_error )
> TypeError: not all arguments converted during string formatting
>

[edit/pierreca] Please do not post credentials here. also: please rotate your hub keys asap.
[edit/vanti] No worries. I changed the credentials above before posting. They are not my real ones.

Can the service samples use HTTP as opposed to AMQP? It'd make it a lot easier to run them within an internal enterprise network.

when I am running the  script Send a cloud-to-device message following error is comming .
Traceback (most recent call last):
File "C:/Python27/dtoc.py", line 65, in
iothub_messaging_sample_run()
File "C:/Python27/dtoc.py", line 54, in iothub_messaging_sample_run
print ( "Unexpected error {0}" % iothub_error )
TypeError: not all arguments converted during string formatting
I am using python 2.7 for executing script.
Thanks in Advance

@itslasya I'm not familiar with this error, this seems completely unrelated to this issue and there's not much  info for us to help you in this comment. please open a different github issue and follow the issue template.
@vanti sorry i totally let this issue slip.
This is how a proxy is set up:
from iothub_client import IoTHubClient, HttpProxyOptions

client = IoTHubClient(CONNECTION_STRING, PROTOCOL)
proxy = HttpProxyOptions("myproxy.com", 8888)
client.set_option("proxy_data", proxy)

using a proxy requires using either HTTP (or AMQP over websockets or MQTT Over websockets). Regular TLS socket protocols won't go through an HTTP proxy usually.

@vanti, @itslasya, thank you for your contribution to our open-sourced project! Please help us improve by filling out this 2-minute customer satisfaction survey


It doesn't work with Django 4.1

Error:
# -*- coding: utf-8 -*-
    """
    URLs.
    """
>   from django.conf.urls import include, url
E   ImportError: cannot import name 'url' from 'django.conf.urls' (.../.venv/lib/python3.11/site-packages/django/conf/urls/__init__.py)

../../../.venv/lib/python3.11/site-packages/health_check/urls.py:5: ImportError

I saw the deprecation notice here. https://docs.djangoproject.com/en/dev/internals/deprecation/#deprecation-removed-in-4-0

Can you please provide a trace?
This package uses path from django.urls, see https://github.com/revsys/django-health-check/blob/3.17.0/health_check/urls.py

We are using 3.17.0 :confused:
I will take a closer look

@aleixmorgadas can this be closed?

Sure

Would you mind?


!important is removed

If I click Edit CSS, then add a rule like
p {
color: red !important;
}
and click Save, the !important will be removed next time I open Edit CSS on that page.

But still - why it is the !important removed?
The fact that Stylebot add it later should not mean that Stylebot can remove it from my code.
I use the same CSS on more places (not only in Stylebot) and it is problem when Stylebot changes my code.
I would appreciate when Stylebot left my CSS code intact and internally append !important to those parts where it is missing.


Group glazed flags together in cobra help section

When adding all the glazed flags to normal commands, the actual relevant flags for the command get drowned out in the noise:
❯ sqleton wp ls-posts-limit --help

   ls-posts-limit - Show all WP posts, limited

  Show all posts and their ID

  For more help, run:  sqleton help ls-posts-limit

  ## Usage:

   sqleton wp ls-posts-limit [flags]

  ## Flags:

          --csv-separator string     CSV separator (default ",")
          --fields string            Fields to include in the output, default: all
          --filter string            Fields to remove from output
          --flatten                  Flatten nested fields (after templating)
      -h, --help                     help for ls-posts-limit
      -l, --limit int                Limit the number of posts (default 10)
      -o, --output string            Output format (table, csv, tsv, json, yaml, sqlite)
  (default "table")
          --output-as-objects        Output as individual objects instead of JSON array
      -f, --output-file string       Output file
          --select string            Select a single field and output as a single line
          --select-template string   Output a single templated value for each row, on a
  single line
          --sort-columns             Sort columns alphabetically (default true)
          --table-format string      Table format (ascii, markdown, html, csv, tsv)
  (default "ascii")
          --template string          Go Template to use for single string
          --template-field strings   For table output, fieldName:template to create new
  fields, or @fileName to read field templates from a yaml dictionary
          --use-row-templates        Use row templates instead of column templates
          --with-headers             Include headers in output (CSV, TSV) (default true)

  ## Global Flags:

      -D, --database string            Database name
          --dbt-profile string         Name of dbt profile to use (default: default)
  (default "default")
          --dbt-profiles-path string   Path to dbt profiles.yml (default:
  ~/.dbt/profiles.yml)
          --driver string              Database driver
          --dsn string                 Database DSN
      -H, --host string                Database host
      -p, --password string            Database password
      -P, --port int                   Database port (default 3306)
          --repository string          Directory with additional commands to load
  (default ~/.sqleton/queries)
      -s, --schema string              Database schema (when applicable)
      -t, --type string                Database type (mysql, postgres, etc.) (default
  "mysql")
          --use-dbt-profiles           Use dbt profiles.yml to connect to databases
      -u, --user string                Database user

Link to cobra topic here: https://github.com/spf13/cobra/issues/1327

See also this for command groups, just out of curiosity: https://github.com/spf13/cobra/pull/1003

See that flags can be marked as required in groups, which is interesting: https://github.com/spf13/cobra/releases

Here's an actual implementation of flag groups: https://github.com/aquasecurity/trivy/pull/2488

The implementation in trivy uses each cobra.Command to call SetUsageTemplate, and fills in the help for its flags straight in there. We could do two things, we could have each command to the same, passing in some glazed structure with the ParameterDefinitionGroups of some sort, which then also calls AddFlags, or we could have the HelpSystem UsageFunc do the lookup itself.

There's also the fact that we can set the Annotations of a cobra command to stuff we can use to our leisure. For example, the rendered flags help.

See
func GetCobraHelpUsageFuncs(hs *HelpSystem) (HelpFunc, UsageFunc) {
	helpFunc := func(c *cobra.Command, args []string) {
		qb := NewSectionQuery().
			ReturnAllTypes()

		options := &RenderOptions{
			Query:           qb,
			ShowAllSections: false,
			ShowShortTopic:  false,
			HelpCommand:     c.Root().CommandPath() + " help",
		}

		cobra.CheckErr(renderCommandHelpPage(c, options, hs))
	}

	usageFunc := func(c *cobra.Command) error {
		qb := NewSectionQuery().
			ReturnExamples()

		options := &RenderOptions{
			Query:           qb,
			ShowAllSections: false,
			ShowShortTopic:  true,
			HelpCommand:     c.Root().CommandPath() + " help",
		}
		// TODO(manuel, 2023-02-19) Here is where we would compute grouped flags
		// See #59
		return renderCommandHelpPage(c, options, hs)
	}

	return helpFunc, usageFunc
}

One way could be to use flagGroup:XXX annotations. I think this is actually quite a slick solutions, as it allows for the most flexibility.


The zip content doesn't appear

This is the code:
poise_archive 'https://releases.hashicorp.com/vault/0.8.3/vault_0.8.3_linux_amd64.zip' do
  destination '/usr/local/bin'
end

Nothing appears on /usr/local/bin

Yep, Hashicorp archives don't match the normal FOSS standard of having a top-level folder so strip_components 0 is needed until such time as I make it automatic.


Can't connect docker containers via Peerage.Via.Udp

Today I tried to connect two docker containers via Peerage.Via.Udp like you mentioned in http://blog.maketogether.com/connecting-elixir-containers-with-dns-based-discovery/. But I can't get it to work. Would be awesome if you can take a look at https://github.com/dschniepp/peerage-test and tell me what am I missing. Every two seconds my program is printing the node list via Node.list() but it's empty. Thank you very much!

I can't check this out until a bit later -- but in case it's helpful:

I tested that via running "docker run" two times on the same machine, so using host networking by default, and I think I mentioned that the default behavior (at least at the time of writing) is that UDP multicast is permitted. That will of course depend on if it's permitted on your machine/network.

However, docker-compose may be a different story! It sets up its own networking, and I don't know if OOTB it is broadcast friendly. See this suggestion which may be what you're looking for, if the reason you're using Docker is as a lightweight way to easily test clustered, built elixir releases in local development.

When it comes time to deploy, what would be the 'Docker Stack' way of setting up this kind of service discovery? Probably Swarm, where you can set RR service discovery to get the same kind of DNS-based "one name, list of IPs" behavior that k8s, Weave, etc also support.

I've been using minikube locally, which is nice because it's closer to 1:1 w/deploys, and even though it's a single machine, it's using the same overlay network/dns-based discovery.

Thank you for your quick reply I will give a try.
Currently we deploy our apps via AWS ElasticBeanstalk. I heard of minikube but we haven't use k8s yet.

@dschniepp ever have any success with this? looking to do a similar setup (multiple docker apps on eb). thank you!

Ok, still working locally with 2 running Docker containers I am able to get some discovery going with the Udp provider:
[debug]   -> Peerage.Via.Udp sees: node1@8a70db78d1e8
[debug]   -> Peerage.Via.Udp sees: node2@97f533270bfc
[debug]   -> Peerage.Via.Udp sees: node2@97f533270bfc
[debug]   -> Peerage.Via.Udp sees: node1@8a70db78d1e8
[debug] [Peerage 1.0.2][ Elixir.Peerage.Via.Udp] Discovery every 10s.

     NAME                RESULT OF ATTEMPT
     node1@8a70db78d1e8  true
     node2@97f533270bfc  false

     LIVE NODES
     node1@8a70db78d1e8 (self)

My config is like so: config :peerage, via: Peerage.Via.Udp, serves: true, port: 45900 and I'm running IEX like so:
docker run -it --rm api iex --sname node1 -S mix
docker run -it --rm api iex --sname node1 -S mix

It seems the attempt or a Node.ping :"node2@97f533270bfc" fails. Is there any other config necessary for a Phoenix app running on Docker on Mac?

By the way, the Docker containers are sharing the same network in bridge mode.

@ksheurs Mmm, that's interesting -- so at least we can say 2 things:

UDP multicast is working for you; the containers are able to communicate their node names to each other.
Node.connect or Node.ping is not working; it's being given the node name, but it can't do anything with it.

That makes me wonder about DNS. Launching the node with sname appears to result in an interesting host name; I wonder if nslookup 97f533270bfc from within the container would work, either? That's all the info the erlang stdlib has to go on when trying to answer the question "where is the node that has this name?"
Depending on guarantees about hostname at container startup time, it might be possible to use --name instead of --sname in your 'runner' image, to provide the hostname yourself. You could look up the hostname in the runner image's startup, and splice it into the --name. The basic question is whether or not your containers can reach each other by default with your non-host networking, or if some additional (non-elixir) config is needed to let these containers resolve each others' names and connect to each other.
Then, once confirmed that the containers can 'see' and ping each other, there are questions about your app's config, the container config, and also your orchestrator's config if you're using one. For instance

the app's config will usually want to constrain the erlang distribution ports to a more limited range
the dockerfile for the container should expose the erlang distribution ports
and the then at the orchestrator level again this is usually necessary and will vary based on orchestrator (eg, k8s vs docker-compose have different ways of saying 'these services/headless services/group of containers all have this port open'...).

Thanks so much for the detailed reply @mrluc!
Running nslookup on one of the instances for both self and the other node:
root@2ac1934e72be: nslookup 2ac1934e72be
Server:		<IP_ADDRESS>
Address:	<IP_ADDRESS>#53
** server can't find 2ac1934e72be: NXDOMAIN

root@2ac1934e72be: nslookup 29e3f9d21b4e
Server:		<IP_ADDRESS>
Address:	<IP_ADDRESS>#53
** server can't find 29e3f9d21b4e: NXDOMAIN

If I docker ps and then inspect each of the running containers and get their IPAddress's, I can successfully ping {ip} both from one of the containers. So, I think that's a good sign! Is this possibly just an issue with the container hostname's that are being set (2ac1934e72be and 29e3f9d21b4e)?
If using --name is the way to go, I think I'll need some more detail on how look this value up. Thanks again!

If helpful, this is what /etc/hosts looks like on one of the instances:
root@ 2ac1934e72be:/app# cat /etc/hosts
<IP_ADDRESS>	localhost
::1	localhost ip6-localhost ip6-loopback
fe00::0	ip6-localnet
ff00::0	ip6-mcastprefix
ff02::1	ip6-allnodes
ff02::2	ip6-allrouters
<IP_ADDRESS>	2ac1934e72be

Resolved! I needed to include --net={my-bridge-network} in the docker run calls! Thanks again.

@ksheurs Looking up the container's IP is something that varies based on your container and env it runs in; worst comes to worst there'll usually be a way to extract it from dig or nslookup, or pull it out of /etc/hosts as you mention.
You may also already be getting it the container's IP in an env var -- several orchestrators support that. Kubernetes ('downward api') and Convox do this; I don't know if Docker does nowadays (Docker does have more orchestration/networking pieces than it used to).
Fwiw, that last entry in the /etc/hosts file looks the most promising, as it seems to match up with the auto-generated hostname. If you can automate pulling that from eg. dig or nslookup into an env var, that's probably enough to make a good --name.
At that point the node can attempt to reach its fellows -- via erlang distribution, whose ports may be the next thing that needs configured in the container and/or in the app.

@ksheurs I switched to libcluster and implemented a custom ec2 strategy because aws does not support udp and eb doesn't support bridge-networks either.

Thanks @dschniepp - I'll check that out today.

@ksheurs you can take a look at https://github.com/kyleaa/libcluster-elasticbeanstalk

Oh, cool, I hadn't seen https://github.com/kyleaa/libcluster_ec2 -- man, would be cool to do a PR w/a peerage Provider, might be pretty straightforward.

So, before looking at libcluster, I've written an Ec2 provider for Peerage. It correctly polls for all active instances/hostnames, but I cannot seem to connect/ping between nodes (receiving a :pang). I wonder if this is what @dschniepp was saying re: bridge networks? I looked into it a bit more and seems ECS supports this now (which I imagine EB uses under the hood for Docker (?). I wonder if I need to be in host network mode.
Any other ideas would be appreciated! @mrluc if this works out, I'll do a PR for the Ec2 provider!

Btw, doing a eb ssh and then docker inspect on the running instance it seems it's def defaulting to bridge networking mode: https://cl.ly/2p0F0H3n0d30.

Is this your AWS CF file? I added our Multi-Docker-EB Dockerrun.aws.json https://gist.github.com/dschniepp/61aba22b720e546b880a84c6f2d05aa2 these ports needs to be open if you set the vm.args like this -kernel inet_dist_listen_min 9100 inet_dist_listen_max 9100. Further more you need allow connections in your security group for these ports between your ec2 instances.

mmm nice, ok i'll open those ports in my Dockerrun.aws.json! i was only exposing then in the Dockerfile. the screenshot i shared was from running docker inspect {container-id} on the ec2 instance.

@ksheurs do you have a demo repo where i can take a look at it?

Thanks for the offer, @dschniepp. Currently it's an internal repo, but let me try a few more things and if no go, I'll make up a test case repo for us both to look at. Thanks again.

I got this working, @dschniepp! I think it was a combo of opening up the ports in both my Dockerfile and Dockerrun.aws.json + properly templating my --name node@host on app startup. To do the latter I used the following which is within my Docker CMD script:
export NODE_HOST=$(curl -s -S http://<IP_ADDRESS>/latest/meta-data/local-ipv4)
--name node@$NODE_HOST

Feel free to close @mrluc!

+1.


Missing tags for v1.1.3/1.1.4

v1.1.3: https://github.com/flyacts/ngAnalytics/commit/5462d4f64053793971c05a8f6d1589376810875c
v1.1.4: https://github.com/flyacts/ngAnalytics/commit/1f07ae59b446cc321f89f045dccd21683b6a7016

https://github.com/flyacts/ngAnalytics/tags ?

Oh sorry, thanks for your prompt reply @KillerCodeMonkey, they were just hidden in releases page, my fault.

no probs :+1:


Fix flaky can lint Santa-Tracker

Add appcompat to the expected deprecation warning list
See https://builds.gradle.org/viewLog.html?buildId=44808582

@bot-gradle test and merge

OK, I've already triggered a build for you.

Pre-tested commit build failed.

https://github.com/gradle/gradle-private/issues/3417

@bot-gradle test and merge

Your PR is queued. See the queue page for details.

OK, I've already triggered a build for you.


allow application config of api_key/secret

not everybody uses system env in elixir world - including for various deployment strategies, and dev environments.
this allows setting :api_key, and :api_secret in the application config in whatever way you want - though keeping backward compatibility, by falling back to system env.

Thanks @petermm !


[Flare] add docker ps output

What does this PR do?
Adds docker ps -a output to the flare
Motivation
During troubleshooting AD, it's usually useful to be able to make sure what other containers are present.
Additional Notes
The output is close to the standard docker ps output:
CONTAINER ID    IMAGE          COMMAND                                STATUS         PORTS              NAMES
0f8d6ffa7db9    redis          "docker-entrypoint.sh redis-server"    Up 17 hours    [{ 6379 0 tcp}]    [/laughing_bardeen]
9d8fd3947750    nginx          "nginx -g 'daemon off;'"    Up 17 hours    [{ 80 0 tcp}]    [/pensive_meitner]

while the original output gives
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS               NAMES
0f8d6ffa7db9        redis               "docker-entrypoint.s…"   17 hours ago        Up 17 hours         6379/tcp            laughing_bardeen
9d8fd3947750        nginx               "nginx -g 'daemon of…"   17 hours ago        Up 17 hours         80/tcp              pensive_meitner

Note: we may want to trim the COMMAND entry and to limit the maximum number of shown containers.
I also removed the CREATED entry, that was only a timestamp in the API, probably the less helpful info.

Any chances this might contain secrets ?


Replace deprecated tokio_timer::Deadline

tokio-rs/tokio#558 replaced Deadline with Timeout, and deprecated the former. Since it was released in the minor release 0.2.6, and rusoto doesn't check in Cargo.lock, but treats warnings as errors, this prevents compilation when compiling in newer checkouts. We should probably change this to avoid more breakage in the future, but for now, this patch replaces all uses of Deadline with Timeout.

Thanks!

@matthewkmayer What was the reason we don’t check in Cargo.lock? Imo it would be great to prevent random breakage like this in the future. We could use a tool like dependabot to create PRs when dependency versions change.

I believe for libraries it's best practice to not check in Cargo.lock. It's the users of the crate, in applications, that check in Cargo.lock. https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html says

If you’re building a library that other projects will depend on, put Cargo.lock in your .gitignore. If you’re building an executable like a command-line tool or an application, check Cargo.lock into git.

In the past we've tried to lock down our dependencies more using exact version specifications. This was used in the early days of serde when it relied on syntax (IIRC) and broke a lot. Was a big pain and required frequent releases to keep up so crate users could use new versions of our dependencies.
I've not looked at dependabot yet, but it sounds familiar.
Hope that clears it up! 😄

I think the real solution for this is to not treat warnings as errors. Then semver will guarantee we don't break :)

Yeah, it'd be great if we could treat warnings as errors during CI, but not necessarily when distributing the crates.
Between this and now parking_lot bumping the minimum required Rust version, I'm not sure I agree personally with not checking in Cargo.lock, as I've come to value reproducible builds above many things, and believe that something like dependabot would allow us to deal with this type of random breakage in a more controlled fashion.
That said, I'm willing to disagree-and-commit to the documented best practice in this case.

I think you solve that by introducing a ci feature what enables warnings-as-errors, and changing scripts in travis.yml to run build and tests with --features ci :)

Also, as a personal opinion, I find checked-in Cargo.lock files in libraries really sad. It means I end up double-compiling lots of dependencies just because some library I transitively depend on fixes its dependencies, even if it's completely unnecessary.

An alternative to a Cargo feature, you can set the environment variable RUSTFLAGS="-D warnings" in your CI builds to make warnings errors in CI without making them break the build when developing locally.


Value error when reading MDD/ddf

I have the following program.
import pandas as pd
import numpy as np
from quantipy.core.tools.dp.io import read_dimensions
meta, data = read_dimensions('Final.mdd', 'Final.ddf')
when I run the program I get the following error.
ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
I'm running this using anaconda 2.7 on Ubuntu 17.10.01.
Any guidance would be appreciated.

If it helps, the version of dimensions I'm using is 6.1

If it's any help, the ddf is created using dimensions 6.1


default.css: openBinaryFile: does not exist

Hello, I am on Windows 7 with virtual environment created with miniconda (Python3). I installed via: pip install  knotr.
After running stitch stitch_example.md at the command prompt, I got the following error:
Traceback (most recent call last):
  File "d:\miniconda3\envs\jupyter\lib\runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "d:\miniconda3\envs\jupyter\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "d:\Miniconda3\envs\jupyter\Scripts\stitch.exe\__main__.py", line 9, in <module>
  File "d:\miniconda3\envs\jupyter\lib\site-packages\click\core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "d:\miniconda3\envs\jupyter\lib\site-packages\click\core.py", line 696, in main
    rv = self.invoke(ctx)
  File "d:\miniconda3\envs\jupyter\lib\site-packages\click\core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "d:\miniconda3\envs\jupyter\lib\site-packages\click\core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "d:\miniconda3\envs\jupyter\lib\site-packages\click\decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "d:\miniconda3\envs\jupyter\lib\site-packages\stitch\cli.py", line 58, in cli
    convert(input_text, to, output_file=output_file, extra_args=extra_args)
  File "d:\miniconda3\envs\jupyter\lib\site-packages\stitch\stitch.py", line 345, in convert
    outputfile=output_file)
  File "d:\miniconda3\envs\jupyter\lib\site-packages\pypandoc\__init__.py", line 103, in convert_text
    outputfile=outputfile, filters=filters)
  File "d:\miniconda3\envs\jupyter\lib\site-packages\pypandoc\__init__.py", line 303, in _convert_input
    'Pandoc died with exitcode "%s" during conversion: %s' % (p.returncode, stderr)
RuntimeError: Pandoc died with exitcode "67" during conversion: b'pandoc: Could not fetch d:\\miniconda3\\envs\\jupyter\\lib\\site-packages\\stitch\\static\\default.css\r\nd:\\miniconda3\\envs\\jupyter\\lib\\site-packages\\stitch\\static\\default.css: openBinaryFile: does not exist (No such file or directory)\r\n'

I also had to install a module named "typing" when attempting to install pystitch, which I installed via: pip install typing
Thanks.

I messed up the distribution; fixed in https://github.com/pystitch/stitch/pull/26 I'll put up another release on PyPI later this morning.


Add static styles to non-shadow elements

Is there a reason why styling can't be applied to light-dom elements?  I understand global styles apply to these, but writing them in the same place as part of the component is a huge advantage.
This would make elements behave consistently when changing the render root without having to refactor.  This would make the convention of writing styles there consistent across all components.
Styling could be appended to the document head, or another method.
A common scenario where shadow-dom doesn't play well is using libraries that select elements from the document root, which includes a ton of frontend libs.

Yes, the reason is that we don't have a good scope to add the styles to. We can't write to the parent's scope, as that breaks upper-bound encapsulation and may break the parent's styles. We can't apply to document because the document might not container the element's DOM if there's an ancestor with a shadow root. If the scope is not the element's shadow root, selectors like :host and ::slotted will select the wrong elements.
If you want to apply styles to the document I'd suggest just doing that manually in the module:
const style = document.createElement('style');
style.innerHTML = `
  my-element { ... }
  my-element > .child1 { ... }
`;

export class MyElement extends LitElement {
  createRenderRoot() { return this; }
}

I understand :host and :slotted wouldn't work, but I think understanding usage of these implies understanding that these only apply to the shadow root.  I understand not wanting to break encapsulation and that makes sense, but I would still prefer some sort or default behavior that would make these work.  They could be applied in a style tag before render() content. Understanding the difference between shadow and light dom, it's understood these styles could potentially conflict with existing styles.

We really want to encourage users to use Shadow DOM since it's the right way to do DOM and style encapsulation. That said, a lot of users have these styling concerns. While it's possible to do something like Justin suggested, the next thing you'll run into is that <slot>'s don't work without Shadow DOM. Addressing that is outside the scope of something we want to support, but it can be done by using the Shadow DOM polyfill and forcing it to be on.
If you don't use slots, something like what you're asking for is more possible but you definitely have to be really careful not to stomp on styling used elsewhere in the document. In particular, it's tricky to enforce a lower bound encapsulation using normal-ish css and typically this requires a system that everyone on the page must opt in.
With all these caveats in mind, here is an example that shows how the createRenderRoot and finalizeStyles API can be used to customize the styling behavior. Hope that helps.

Thanks, like I mentioned in the OP, the main use-case for using the light DOM is lib compatibility.
But I do think it should be considered how opinionated Lit wants to be about Shadow DOM (or anything, really).  I've heard arguments making the case that encapsulation is overrated, which I don't necessarily agree with, but I can understand people favoring architecting code to use global scope responsibly to your advantage.  Plus, not everyone is working on a project at scale.
I never really got off of the BEM bandwagon, so style encapsulation has never really been that big of a deal to me because I was pretty much building it in myself with a naming convention.  There are times when I think asset loading would be more efficient being able to global utility classes outside of slots.
I think Lit wants to tread the line of enforcing certain good practices, but remain general purpose, like React, etc.  I think there are plenty of scenarios or workflows where Shadow could be considered overkill.  Plus, I think web component adoption (aside from the API issues and support) might have been slower because people equated custom elements with Shadow-DOM, when some people just want to write reusable chunks of code.
Also, I think React's success also came from areas where it is unopinionated and creative use cases emerged that may not have been considered during inception, like server components and primitives, etc.

Also, if you consider the POV of a BEM-user, like myself, and I think this is a good example, scoped styles offer zero advantage because you are namespaced by default, but I'd still like certain structural styles to be able to be shared in the component definition in a consistent way.
That leaves slots as the coolest part of shadow-DOM, but they require a higher-level of understanding of light and shadow DOM boundaries and I could see this being a source of confusion for people that are learning.
I'm only now getting completely comfortable with how slotted content behaves differently than anything else and I remember staring at my inspector trying to figure out WTH is going on for the first time, with content 'reflecting' inside.  I think being less opinionated in places where best practices can be debated would be a good rule of thumb.
Not having an all-or-nothing approach with Shadow DOM would also let people adopt Lit progressively and start using Shadow when they are comfortable, which is another thing that I think React benefited from, as far as adoption goes.  You could get started just returning nodes and use building blocks and the rest you could pick up as you saw fit.
Especially now that a 'back to basics' approach has everyone considering 'how much is too much?' and your own demos went from an html file with a single app element to a static site generator, it's only fair to apply that same thinking to Shadow.

This isn't something we want to directly support in the core library, but you should feel free to make your own base class that customizes the behavior here. Please open a new issue if you need any guidance on how/what to do for this use case. Thanks!

I'm going to reopen this as a documentation issue, because I think there might be a way to self-service by also overriding adoptStyles.

Lit should expose a helper function or class that automatically writes style to the top document if it's not a shadow dom.
At least, some CSS is better than no CSS at all.

  createRenderRoot() {
    const style = document.createElement("style");
    style.innerHTML = this.constructor.elementStyles;
    document.head.append(style);
    return this;
  }

solved the problem for me. But fully agree with @Himself65 and @justinfagnani. Would be really helpfull if we could have something like adoptStyles in lit/packages/reactive-element/src
/css-tag.ts which supports non-shadow elements.

I used this function to handle it (without any scope)
function flatCssText(styles?: CSSResultGroup): string {
  if (styles === undefined) return '';
  if ('cssText' in styles) return styles.cssText.trim();
  if (Array.isArray(styles)) {
    return styles.map(style => ('cssText' in style) ? style.cssText : flatCssText(style)).join('\n').trim();
  }
  return ''
}

function lightDomStyles(element: typeof ReactiveElement): void {
  const cssText = flatCssText(element.styles);
  if (cssText === '') return;
  const styleEl = document.createElement('style');
  styleEl.innerHTML = cssText;
  document.head.append(styleEl);
}

usage:
export class MyElement extends LitElement {
  static styles = css`
    my-element {
      color: green;
    }
  `;
}
lightDomStyles(MyElement);

The @mucsi96 way work well but isn't good for typing:
style.innerHTML = this.constructor.elementStyles; // TS2339: Property elementStyles does not exist on type Function

I prefer using this, and adding the style tag to the local component:
style.innerHTML = flatCssText(MyElement.styles);

With the complete createRenderRoot function:
    createRenderRoot() {
        if (this.querySelector(`style[data-tagname="${this.tagName}"]`)) {
            return this;
        }

        const style = document.createElement("style");
        style.innerHTML = flatCssText(MyElement.styles);
        style.setAttribute("data-tagname", this.tagName);
        this.append(style);
        return this;
    }

That solution is going to append a <style> tag to every instance, which might be unnecessary.
You'd really want to append the tag to the instances root node, and only once.

Something like this?
  createRenderRoot() {
    const rootNode = this.getRootNode();
    const doc = 'head' in rootNode ? rootNode.head : rootNode;
    if (!doc.querySelector(`style[data-tagname="${this.tagName}"]`)) {
      const style = document.createElement("style");
      style.innerHTML = flatCssText(SimpleGreeting.styles);
      style.setAttribute("data-tagname", this.tagName);
      doc.append(style);
    }
    return this;
  }

Stencil allows you to have web components without shadow DOM but still with style encapsulation. It's dirty, but it works reasonably well. I'm currently on a project where we're migrating from Stencil to Lit. We have a few components that rely on this, which we just cannot change right now (due to enterprise & compatibility reasons...).
I wrote something, but can't share it, unfortunately. But you could take a look at Stencil's source code and use that as a starting point. Essentially, you want to do the following:

Find the appropriate container node for your component styles using getRootNode() (which would be either the document or an ancestor's shadow root).
Check if the container node still requires your component styles by keeping track of container nodes & component names in a WeakMap (because you don't want multiple instances creating duplicate styles).
If the container node does not have your component styles yet, then add them. If the container is a shadow root then add them to the adopted stylesheets (if supported), otherwise inject a <style> element.

I was able to skip some scenarios because I know where and how my components are consumed. But you may want to think about what happens to the injected component styles when your component is moved to another container, or when all instances are removed.
In the end, you do end up with quite a bit of logic to get everything working right, and it's not pretty since your component is making changes to its consumer's DOM. It makes sense that Lit doesn't cover this.

Inspired by the previous examples, I came up with this. For me it is the most native solution I could come up with. I am curious if Justin has any improvements or feedback.
import { LitElement, html, css, adoptStyles } from 'lit-element';
import { customElement } from 'lit/decorators.js';

@customElement('my-component')
export class MyComponent extends LitElement {
  createRenderRoot() {
    adoptStyles(this.getRootNode() as ShadowRoot, [css`
      my-component div {
        color: green;
      }
    `]);

    return this;
  };

  override render() {
    return html`<div>hello lit</div>`
  }
}

declare global {
  interface HTMLElementTagNameMap {
    'my-component': MyComponent;
  }
}

Notes:
getRootNode() might return the document as well, but I typed it to ShadowRoot for adoptStyles() which seems to work for the document as well, so I am fine with the wrong type trade-off.
I had a previous versions adding the styles manually to prevent duplicates using if(!rootNode.adoptedStyleSheets.includes(style)), but found out I can further simplify everything after switching to adoptStyles, since after some testing it seemed to never create duplicates.
There is still one topic that, in my opinion, makes it non packageable for the lit core, which is the requirement to prepend my-component every css selector, to not break the hosting element. I guess if this would be solved internally it might imply too much hidden stuff on top of expected behavior which is probably not wanted by the lit owners.


Encrypt decimal number.

I'm trying to encrypt a number but I'm getting this error:
Traceback (most recent call last):   File "/Users/Me/Desktop/Coding_Files/Python Projects/WeatherApp/app2.py", line 58, in <module>     project.setCloudVar("request", s2py.encode(weather[y]))   File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/scratch2py/__init__.py", line 85, in encode     text = text.lower() AttributeError: 'float' object has no attribute 'lower'
I understand this is because I'm trying to encrypt a decimal number known as a float but I'm not sure what to do about it or if this can be fixed in scratch2py.

Since this caused by text.lower(), I can only remove it by making ScratchEncoder case sensitive, which would take some time, but all I have to do is change the chars list and remove text.lower() in the encoder. Will update when done.

Fixed and added suport for uppercase. Check the project for updated version: https://scratch.mit.edu/projects/546443308/

Ok, but now I'm getting another error:
Traceback (most recent call last):   File "/Users/Me/Desktop/Coding_Files/Python Projects/WeatherApp/app3.py", line 59, in <module>     project.setCloudVar(variables[y], s2py.encode(weather[y]))   File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/scratch2py/__init__.py", line 87, in encode     length = int(len(text)) TypeError: object of type 'float' has no len()

Why don't you try wraping your text in str()? See if that works... I tried to encode 1.1 and it worked

As you can see, adding str() seems to work. Tell me if that works for you.

I found out what was going wrong, in the previous version my code was looking for an Attribute Error to know to make the decimal a string, but now the error comes across as a Type Error for some reason. So in a way you were right. Once I share the project I'll show you the code and it'll make a lot more sense.


Roles/Rights to update/delete specific posts

Make posts only delete-able or update-able by the user who created it or an admin (role does not exist yet).

this works now ... :3
but it's not entirely fieldtested ... let's see later on if problem arise


Attempt at issue 742

This largely addresses #742 by adding an email link to the map marker info windows. I tested it as far as activating the mail modal, but not beyond that.
There are a couple of wrinkles that I was unsure how to handle.

There appears to be no i18n label for email like the other data in the info window. I'm using the same internationalized string that is used in the main list. This seems to be okay except for missing a colon.
When the map is in full screen view, the new link causes the mail modal to appear "under" the map-- that is, it's not visible until the map is toggled back to the default view. I can keep digging on this, but thought someone might already know the fix.

Hey @smattingly thanks for diving into the issues upon joining the FTM community!!
I've suggested @ngottlieb & @nburt to have a look at your PR here this time, but feel free to copy the URL of your PR into our #dev channel on Slack and anyone can chime in or have a look!
Also FYI, Slack appears to be having issues right now :)

Merging, awesome work!


VM creation taking over 10 min this provider

I'm creating a VM using this provider from scratch (no clone and cloud-init).
terraform -v
Terraform v0.15.4
on darwin_amd64
+ provider registry.terraform.io/telmate/proxmox v2.7.1

`
resource "proxmox_vm_qemu" "talos-bootstrap-cluster" {
name        = "test"
desc        = "test"
count       = 1
target_node = "pve"
iso         = "ISO:iso/talos-amd64.iso"
memory      = "2048"
sockets     = "2"
cores       = "2"
scsihw      = "virtio-scsi-pci"
bootdisk    = "scsi0"
network {
model  = "virtio"
bridge = "vmbr0"
tag    = "100"
}
disk {
type    = "scsi"
storage = "storage01"
size = "20G"
}
}
`
Terraform keeps running for around 10-12 min however the VM is created within seconds and even boots up with the ISO.
What is the provider/terraform waiting for?

I think this is a duplicate of https://github.com/Telmate/terraform-provider-proxmox/issues/325

Yes, sounds like the agent. :-)


chore(SidePanel)!: remove deprecated actionToolbarButtonClick

Contributes to #1385
This PR removes the deprecated actionToolbarButtonClick prop, replaced by just onClick.
What did you change?
packages/cloud-cognitive/src/components/SidePanel/SidePanel.js
packages/cloud-cognitive/src/components/SidePanel/SidePanel.test.js
How did you test and verify your work?
Storybook and ran tests

I've added these changes to #1406 because the two PRs were creating conflicts when merged separately.


What is the Google Verification in _config.yml?

Hi,
I'm trying to setup this theme but I'm not sure what the 'Google Verification' is on line 10 of _config.yml
I got the Google Analytics code and Discus setup but I'm not sure what 'Google Verification is.  Any help would be appreciated.  Thanks,
Devin

Found it.  Thanks!


32x32 DCT overflows

See output of dcttest.

I just ran dcttest built with ci/clang-ioc.sh and am not seeing any overflow.  Closing this issue.


build process_metrics/symbolization/tiflash-proxy sequentially

What problem does this PR solve?
Issue Number: close #7273
Problem Summary:
What is changed and how it works?
Check List
Tests

[ ] Unit test
[ ] Integration test
[ ] Manual test (add detailed scripts or steps below)
[ ] No code

Side effects

[ ] Performance regression: Consumes more CPU
[ ] Performance regression: Consumes more Memory
[ ] Breaking backward compatibility

Documentation

[ ] Affects user behaviors
[ ] Contains syntax changes
[ ] Contains variable changes
[ ] Contains experimental features
[ ] Changes MySQL compatibility

Release note

None

/merge

/run-all-tests


'A type predicate's type must be assignable to its parameter's type' should not fire when in a generic predicate function

Bug Report

🔎 Search Terms

2677
predicate
user defined
generic function

🕗 Version & Regression Information

This is the behavior in every version I tried, and I reviewed the FAQ for entries about predicates

⏯ Playground Link

Playground link with relevant code
💻 Code

type ExtractOr<T, U, Fallback = never> = T extends U ? T : Fallback;

export function isFunction<T>(val: T): val is ExtractOr<T, Function, (...args: unknown[]) => unknown> {
  return typeof val === "function";
}

🙁 Actual behavior
Should be a valid user defined predicate which can narrow union types to just those variants that are functions, otherwise (specifically if val is unknown)
For example:

function foo(x: unknown) {
  if (isFunction(x)) {
    // x should be narrowed to `(...args: unknown[]) => unknown`;
  }
}

function foo(x: number | undefined | ((val: string) => boolean)) {
  if (isFunction(x)) {
    // x should be narrowed to `(val: string) => boolean`;
  }
}

🙂 Expected behavior
The TSC reports error 2677.

I don't think it's a dupe of #33912.  That one's about relating the return statement(s) in the function to the return type; this is just a type predicate return type being rejected outright, before CFA even comes into play.

@fatcerberus Maybe. My thought was that the type assignability error appears because the conditional type is not resolved.

The error message accurately describes what's going on and I think the motivation for that error is pretty straightforward. the only thing you need to do to this code is add this intersection:
      val is T & ExtractOr

which shouldn't meaningfully change the behavior of the function at all

@RyanCavanaugh Unfortunetly that does not work as intended and does meaningfully change the behvaviour. Here is a playground link
type ExtractOr<T, U, Fallback = never> = T extends U ? T : Fallback;

export function isFunction<T>(val: T): val is T & ExtractOr<T, Function, (...args: unknown[]) => unknown> {
  return typeof val === "function";
}

function foo1(x: unknown) {
  if (isFunction(x)) {
    type Y = typeof x;
    // x should be narrowed to `(...args: unknown[]) => unknown`;
  }
}

function foo2(x: number | undefined | ((val: string) => boolean)) {
  if (isFunction(x)) {
    type Y = typeof x;
    const b: boolean = x(""); // <--- error here, x("") returns unknown
    // x should be narrowed to `(val: string) => boolean`;
  }
}

@RyanCavanaugh why is this closed? I have shown why your "solution" doesn't work.

Hello! 👋
Maybe it's too late, but here is the solution (playground link)
type Func<TParams extends readonly any[] = any[], TReturn = unknown> = (...args: TParams) => TReturn;

type ExtractOr<T, U, Fallback> = Extract<T, U> extends never ? (Fallback extends T ? Fallback : never) : Extract<T, U>

export function isFunction<T>(val: T): val is ExtractOr<T, Func, Func<unknown[]>> {
  return typeof val === "function";
}

The original problem comes from the posible situation, when your T doesn't intersect with Function type completely (for example type number has no overlap with Function) which leads to the resulting type like (val: number) => val is Function, but it's incorrect due to TS compiler rule: "A type predicate's type must be assignable to its parameter's type".
So you need to handle this situation, ensure that Fallback type actually extends T before returning it. Otherwise you should return never as a Predicate type just like in the example above.

ah thanks, will take a look


Bootstrap styled table columns with disabled sorting have padding right

When using Bootstrap styles table the Datatables bootstrap css add padding-right: 30px.
This to display the sorting icon.
However when sorting is disabled for certain columns the padding-right: 30px is still in place.
I've added this to my local stylesheet to solve it:
table.dataTable thead tr th.sorting_disabled {
    /* reset padding for columns with disabled sort */
    padding-right: 8px;
}

Or use :not() CSS 3 selector (IE9+, but 95% world browser supports)
table.dataTable thead > tr > th:not(.sorting_disabled) {
	padding-right: 30px;
}

Seems it's defined at dataTables.bootstrap.scss:79. So, it only Allan choice what to use. I suggest :not() as it doesn't break any padding which may be different if use custom Bootstrap values.


scene.render() saves annotation._25.nrrd to current directory

At least on my machine, scene.render saves a Data directory with the ARA annotation file into the current directory (all other files are saved into .brainrender).
Not a big problem, but annoying if you're moving around directories.

That's a mistake. It should be stored in .brainrender with the rest of the data, will fix thanks.

Fixed.


Unrolling the loop in xdlops GEMM

Enforce loop unroll in xdlops gemm
Workaround the performance issue (SWDEV-229564) for the llvm intrinsic

This is definitely a workaround. @zjing14 could you please formalize it? I think we'll need to try to switch it off after transition to hip-clang.
Manual unrolling is not good. Compiler guys always insist on not using these without discussing with them first (however, this is not necessary in this specific case, because this is hcc problem).

add workaround marco

Marco Di Workaround ;)

BTW I guess now we can use #ifdef __HCC___ (I do not remember exact name) so the workaround will be engaged only for hcc. Now or in the future.


Deepjoin for re-assembly

Hi @nikwl congrats for your work and thank you for making it public.
I am curious to understand whether your approach could be used for reassembly instead for restoration. In principle you are trying to reconstruct the missing fractured part but what about the case that you already have the missing pieces and we want to just find the correct transformation for registering the pieces back together. The idea of using SDF and NF is quite nice and I think quite well presented in this context.
Thanks.

Hi @ttsesm, thanks for checking out our work!
We'd definitely like to investigate shape assembly in the future, although adapting this approach to perform assembly would likely be pretty large undertaking. If you're interested in doing object assembly yourself, I'd recommend looking into Neural Shape Mating by the University of Toronto. They've been delving into shape fracturing and assembly recently and have produced some really fantastic work.

Thanks @nikwl, I see. It would be nice to see whether your approach could be used for assembly.
I am aware of the NSM work. Actually, there is also a more recent work from the same group regarding multi part assembly where they apply a benchmark and they also provide a dataset (Breaking bad dataset, you can find it in the first links of the github link above). It is indeed a nice work and on the right path, though I would argue that the results are not that good and there is for sure room for major improvement.
In any case, I've also tried to play with your work and some of the pieces from the Breakig bad dataset instead of the Shapenet one. Thus, I've tried to apply your mug experiment by replacing the mug model with one from the breaking bad dataset and using the same .json file. However, the result was far from the desired. The two models do not look that much different:
Initial model from deepjoin:

Model used from breaking bad dataset:

Then I used the quick inference command:
cd deepjoin
./scripts/infer_quick.sh experiments/mugs/specs.json ../example_files/<path_to_breaking_bad_model>.obj

the reconstructed result though is not that good as you can see:

Any reason why this is happening, shouldn't more or less get something better?

Thanks for the referral @ttsesm, we've actually been playing with the breaking bad dataset ourselves! Their dataset is going to be very helpful for future work in shape repair.
Looking at the gif you posted, I can recommend one thing to try to get better results. Our shape repair algorithm is trained with canonically oriented meshes, so it requires input meshes to also be canonically oriented. Breaking Bad is not oriented in the same way as ShapeNet , I think they use the Z axis as the upright direction where ShapeNet uses the Y axis. Try loading both models into a model viewer, reorienting the Breaking Bad model so that it matches up with the canonical orientation of the ShapeNet model, and then re-running the quick inference command.

@ttsesm can you send me the model and I'll look into it?


Provide examples

I wanted to use hexyl as a library to pretty print the memory of a VM I am working on, for error dumps. The memory is just [u8; 4096] so I imagine it should be pretty simple, but I couldn't find an example of how to use this as a library.

On a secondary note, I was hoping to use hexyl as my Display implementation, but now I realize this can't be done since Printer doesn't allow you to specify a custom writer like Display expects.

Some kind of reaction/response would have been nice :-/

Hi @sharkdp, I'm really sorry for not having gotten back to you, this escaped me in the GH notification chaos.
Thanks a lot for adding the lib usage example! Regarding the issues with implementing Display, I haven't touched the project I was working on in a while, but IIRC it was around the differences between core::fmt::Write and std::io::Write where Printer takes a different Writer than fmt::Display expects. You can write an adapter, but it's ugly.
c.f. https://github.com/lovesegfault/chirp/blob/master/src/memory.rs#L31-L43

Thank you for the update!

IIRC it was around the differences between core::fmt::Write and std::io::Write where Printer takes a different Writer than fmt::Display expects.

Oh - you are right. Printer takes a std::io::Write. Formatter implements std::fmt::Write. I had never noticed that there are two versions of this.
If you come back to your project at some point and think that there is something that we can do here, please let us know.


Endless page mode broken for multiple source merged results

From issue #886

implemented not only for one-source mode, but for multiple source merged results too

It work for one source results.
It work for one source merged results.
And even there I found at least one crash-bug and one other problem...(I will make separate issues)
But it completely don't work with multiple source merged results. Nothing.
No button in button mode, nothing when scroll in scroll mode.
So it work as normal pages mode with no signs of changes.

there are exist some important bugs in 5.4.0.a I will report them at the evening, please, don't release update until that

@MasterPetrik are the two bugs you just reported (#960 and #961) those you mentioned here?
Since I was planning to do the 5.4.0 release today or tomorrow. :smile:

Once your new release comes out, I'll check it out. I was holding off on the alpha.

I'll make sure to include the macOS (and linux) build then :smile:

Thanks, although If you don't want to, I'll just build it. I'm surprised you recognized me since I changed my username.

@Bionus this is bug, that I mentioned thttps://github.com/Bionus/imgbrd-grabber/issues/964

@ItsSohma: Well it's building automatically on Travis so I just have to upload the build I receive on my server when the Travis build ends, so that's pretty easy for me. And I recognized you because it also updated your previous participation on other issues, notably #875 that I implemented for 5.4.0 :smile:
@MasterPetrik: I'll check it out before making the release then.


SCP-4387 Re organize isabelle semantic types to become literal programming

Given the limitations of Isabelle antiquotes, we decided to modify the organization of the proofs so that they are self documenting and part of the specification.
I attach
specification-v3.pdf
an exported pdf of the specification

I suggested changes in #136. (Was there a way to get those PR changes to show up in this PR?)
So is the plan to move parts of Doc/Core.thy into Core/*.thy so things like the records and code excerpts appear?

Yes, that would be SCP-4443: Re-organize Isabelle Semantic to become literal programming


oven-media-engine: add Arch patch for FFmpeg 7

Description of changes
Arch have been shipping this patch to users for a month, and the package maintainer states that it has been confirmed to work, including FFmpeg‐based transcoding functionality.
Things done

Built on platform(s)

[ ] x86_64-linux
[x] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[x] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[x] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)

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

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Still waiting to get yelled at for the branch names :)
Thanks for the quick merge! 💜


Show unit string at the top instead of the bottom

Is there anyway for me to show my units string at the top left of my progressbar rather than at the bottom left? I would want something like this: (note the units at the top left)

As a quick hack that worked just for me, I just added the NSBaselineOffsetAttributeName to the unitFontAttributes dictionary in line 157 of MBCircularProgressBarLayer.m and used it to set my own custom value (hard-coded)


JIT for mruby

Over the last few weeks I've been working on a JIT for mruby. Now that it can run simple scripts I'd like to hear a few comments and get some feedback.
This code is nowhere near production ready and a only proof of concept, use at own risk.
Implementation
The JIT in this PR is semi-automatically generated from the C source code.
It does not do any optimizations at the moment, but it get's rid of the VM's fetch-decode main loop.
It is using Clang/LLVM to parse the VM code and turn it into LLVM IR. Then all symbols are stripped from the IR. Linking happens at runtime using a symbol table. Assembly level changes
are made by parsing the LLVM-generated (machine level) assembly and writing it back afterwards.
Note: There is no runtime dependency on LLVM or Clang, all this happens at compile time.
Results
It can run fib(39), and is reasonably faster that the interpreter.
Here the time outputs for my machine.
Interpreter: 48.77user 0.00system 0:48.74elapsed 100%CPU
JIT: 31.38user 0.00system 0:31.37elapsed 100%CPU
These numbers are to be taken with a grain of salt, since this example does a lot of method lookup which is unoptimized (in both versions), i.e. the JIT might do better in other micro benchmarks.
Both mirb and mruby now have a --jit option, that enables the JIT.
Futher tests and benchmarks are pending.
Restrictions
Currently only x86-64 with SystemV ABI is supported. Supporting other platforms, is, however, relatively easy, since LLVM does most of the work.
Also, this JIT cannot do any cross-VM-instruction optimizations. That is, every jitted VM instruction
has to reload the VM values from and to memory, even if the next instruction needs them in registers.
This is not as bad as it sounds, as most instructions are so large, that they fill the registers with other stuff anyway.
Changes to existing code
There are two main changes. First, the code handling a specific VM instruction has been factored into separate functions. It makes the code a bit cleaner.
Second, op_enter no longer relies on op_jmpif, this gets rid of some indirection that was there before. Instead, the offsets are saved in a table in the specific irep and op_enter does the jump directly.
Also, string constants that are accessed from code that is run through the JIT have been given
names, so that they can be used with the symbol table.
The code is still in an early phase and is likely to crash. This pull request is meant to bring up
a discussion about a possible JIT.

Wow, very interesting challenge. Let me investigate.
It might be unable to be merged to the core for the portablity's sake, but the value of the challenge is still real.

Yeah. I'll investigate into that when I find some time. Resolving conflicts should not be a big deal.

Silly problem failing Travis...
I'm getting a linker error with the C++ ABI (when linking with mrbc), apparently a redefinition of enum mrb_run_flags which is compiled into both, libmruby and mrbc.
How does one avoid these kind of conflicts ?

@cremno: Thought about typedef too. Doesn't help. Strange...

@furunkel: Change line 3041 to:
      ctx.run_flags = (enum mrb_run_flags)(ctx.run_flags & ~MRB_RUN_JIT);

C++ is more strongly typed than C. Enumeration types aren't just another integer type. So if it isn't really an enumeration, but rather flags you probably should use some unsigned integer type instead.

@cremno: Done that already. But I'd like to commit a version that passes Travis. All compiling related issues are resolved, however, linking still fails. Nevermind, I do a commit.

Funny, the C++ ABI build fails on my machine. Whatever...

By the way, there is another JIT for mruby:
https://github.com/miura1729/mruby
Also I think givin the platform restrictions, this should remain an optional feature. Also, there seem to be some JIT unspecific changes that might be nice.
And, I'm wondering if the codegen stuff has to be written in cpp?

@zzak, yeah, would be nice if at least the mrb_context_run splitup makes it upstream.
As for the codegen stuff, yes, since LLVM is written in C++. However, this tool needs to be run only after changes to vm.c. It generates C files, so you don't even need a C++ compiler to build this.
@miura1729's approach seems a bit different from mine. Seems like he's using a runtime assembler (xbyak) that actually needs a C++ compiler to build. His JIT might be able to produce more efficient code, while porting to other architectures seems to be harder (e.g. xbyak cannot handle ARM or anything but x86 and x86-64).

In case somebody is interested, the JIT is now relatively stable and (at least on my machine) passes
all tests. It now supports all three boxing models. Only supported platform is still Linux/x86, though.
This now contains an awful lot of things at once but splitting things up would be a lot of work.
It's here in case somebody want's to try this out.
This code also contains the improved method cache work.
Results for the JIT are okay, I guess. Average is only about 12-13% but, e.g. Mandelbrot went up 50%. Also consider that this JIT does not yet do any real optimizations.
The method cache might shave off another 10-12%.
Here is the graph (note, method caching disabled).

Profiling
Another cool thing is that with every operation living in its own function, operation overheads now
show up in profiler logs, which makes profiling much more pleasant.
This PR also contains a task to generate profile charts like this one (using oprofile):

It would be interesting to use the MRI benchmarks instead of vendoring our own separate tests.
This also means we could build some automation around benchmarking MRI vs. MRuby to compare results. In my own tests, I've found MRuby to be slower than MRI, so this would help convince me about JIT for MRuby.

@zzak, yes, according to my own benchmarks, MRI is considerably faster than mruby (at least most of the time).
The method cache (that's still lying around in one of my branches),  however, does help quite a bit.
I don't have time, though, to update it for master.
Also note that the approach taken here for the JIT can easily be modified to emit LLVM bitcode
instead of native machine code.  It does have LLVM as a runtime dependency then.
On the plus side, one can let LLVM optimize the bitcode on a per-proc (i.e. per-method) level.
Anyway, I think I'm pretty much done with this stuff.

@furunkel But (as far as I know) LLVM bytecode can be compiled to native. Also if we have dependency on llvm then linux isn't going to be the only supported platform, right?
I'm currently looking at your jit branch (the method cache seems to be there). The performance is great.
I'm not entirely sure that I understand the current generation process. What can be changed to generate llvm bytecode?

@Moon4u, as far as I remember there is a llc call somewhere that pre-translates the LLVM IR to machine assembly.
The assembly is then post-processed and translated to machine code, which is then stored in a header file.
During runtime, the machine code (compiled into the executable through that header)
is then copied into executable memory and run, in a nutshell.
Instead, it should be possible to store the LLVM IR (in form of bitcode) directly. During runtime one then needs to load that bitcode and pass it to the LLVM JIT.
There are a few pitfalls though, e.g. jumps and a few other things need special treatment.
Anyway, for a serious implementation, mruby needs to change.
Currently it's really hard to track what mruby's virtual instructions do.
They might do fancy stuff to the VM stack or call stack and so on.
So, IMHO, first the VM needs to be adapted, then one can think about a JIT.

Any progress on this? It looks really cool.

@AnthonySuper, nope, pretty much fallen asleep, due to lack of interest. I better close this...

Darn. This looked awesome. Oh well.

@furunkel FWIW, there's interest but personally haven't had the time to invest in following up recently. That's my bad.
Just happy to know if I can reach you when the time comes.

@zzak, well this was only an experiment and, frankly, the result is that I don't consider this a good idea anymore. Mostly, because I think the mruby codebase has, unmindfully with respect to a JIT, grown too far already; so that every solution now seems like a terrible hack. These things need to be planned for from the beginning, IMO. Anyway, given that mruby is supposed to be small and embeddable, that's ok, I guess.

@furunkel I think that there's definitely some room for a JIT version of Ruby. I know I'd like to use Ruby for scripting in applications as opposed to something like LuaJIT, mostly because I feel Ruby is a better language.
Adding JIT to Mruby might not be a great idea at this point (I'm not technically knowledgeable on the subject enough to judge myself, unlike you) but I think a JIT version of Ruby is a great idea in the general case.

@AnthonySuper, yeah I know, it's really frustrating.
But I think this holds for CRuby just as well (actually it's even worse there, as it has progressed even further). It's design (IMHO) makes it very difficult to integrate a JIT now, at least in a clean fashion.
Here's what I think the Ruby community needs to do: adapt the new JRuby IR representation
across all implementations (CRuby, Opal mostly). Then write (and translate JRuby's existing)
IR optimization passes in some sort of DSL so they can be
shared across implementations. CRuby could then, just like JRuby does with JVM bytecode,
translate further to machine code, i.e. add a JIT.

is possible to change benchmark jit to this code?
http://taktentus.herokuapp.com/be
`#!/usr/bin/ruby
s=0
k=0
for j in 0..10001
for i in 0..10002
k=1-k
s+=k
end
s-=1003
end
puts "#{s}"`

Changes Unknown when pulling b0503e6366614582a9b3cda4721226188283625e on furunkel:jit into ** on mruby:master**.


Get pretranslations for parallel corpora

The pretranslation service does not handle the new parallel corpora. This needs to be fixed ASAP. Also, there's the added complexity of multiple potential sources (i.e., where do we get the usfm from - always the first source?).

Would this fix it #525?

The USFM portion of retrieving pretranslations still does not work like Peter noticed.

The first portion was fixed.  More do to in other issues.


Magnolia image not available

Expected behavior
Actual behavior
Information about the Issue
Steps to reproduce the behavior

...
...

No information provided or steps to replicate - Closing


[TC-DD-3.20] All cluaster app can't scan after remove fabric.

Problem
All cluaster app can't scan after remove fabric.
And, "sudo ./chip-tool discover commissionables" command also can't scan.
Remove Fabric Log.
[1653006728.794110][9253:9253] CHIP:EM: Received message of type 0x8 with protocolId (0, 1) and MessageCounter:3683182 on exchange 57427r
[1653006728.794242][9253:9253] CHIP:EM: Handling via exchange: 57427r, Delegate: 0xaaaae8a7b0a0
[1653006728.794393][9253:9253] CHIP:DMG: InvokeRequestMessage =
[1653006728.794458][9253:9253] CHIP:DMG: {
[1653006728.794514][9253:9253] CHIP:DMG:        suppressResponse = false,
[1653006728.794579][9253:9253] CHIP:DMG:        timedRequest = false,
[1653006728.794639][9253:9253] CHIP:DMG:        InvokeRequests =
[1653006728.794753][9253:9253] CHIP:DMG:        [
[1653006728.794813][9253:9253] CHIP:DMG:                CommandDataIB =
[1653006728.794918][9253:9253] CHIP:DMG:                {
[1653006728.794982][9253:9253] CHIP:DMG:                        CommandPathIB =
[1653006728.795075][9253:9253] CHIP:DMG:                        {
[1653006728.795162][9253:9253] CHIP:DMG:                                EndpointId = 0x0,
[1653006728.795243][9253:9253] CHIP:DMG:                                ClusterId = 0x3e,
[1653006728.795345][9253:9253] CHIP:DMG:                                CommandId = 0xa,
[1653006728.795429][9253:9253] CHIP:DMG:                        },
[1653006728.795537][9253:9253] CHIP:DMG:
[1653006728.795606][9253:9253] CHIP:DMG:                        CommandData =
[1653006728.795706][9253:9253] CHIP:DMG:                        {
[1653006728.795793][9253:9253] CHIP:DMG:                                0x0 = 1,
[1653006728.795937][9253:9253] CHIP:DMG:                        },
[1653006728.796010][9253:9253] CHIP:DMG:                },
[1653006728.796087][9253:9253] CHIP:DMG:
[1653006728.796166][9253:9253] CHIP:DMG:        ],
[1653006728.796238][9253:9253] CHIP:DMG:
[1653006728.796318][9253:9253] CHIP:DMG:        InteractionModelRevision = 1
[1653006728.796375][9253:9253] CHIP:DMG: },
[1653006728.796535][9253:9253] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_003E e=0 p=a
[1653006728.796636][9253:9253] CHIP:DMG: AccessControl: allowed
[1653006728.796704][9253:9253] CHIP:DMG: Received command for Endpoint=0 Cluster=0x0000_003E Command=0x0000_000A
[1653006728.796774][9253:9253] CHIP:ZCL: OpCreds: RemoveFabric
Proposed Solution
Commissionee can discover after remove fabric (Commissioned device is 0.)

@joonhaengHeo could you provide details on test setup?

what is the platform being tested: specifically the DUT (like linux/mac/nrf/esp32/efr32/qpg/other)
what are the commands that are being executed to reproduce

I imagine it is some form of commission remove fabric and rescan. Please list all commands so we can reproduce.

Removing a fabric does not automatically make a device commissionable again.


Audit of all attachment component variations

Audit of all attachment component variations to check if we need that many.
Context:
We are building the new design library for gov.uk which is highlighting inconsistencies and opportunities for streamlining. This is one case that needs reviewing.

@ChristineWuerth can you provide a bit more information in this issue? What are all the attachment component variations you're referring to?

I've removed the duplicate label as I believe we use that to indicate that an issue has already been raised and that's our reason for closing it.
I echo Andy's point - an issue should be something that is fully fleshed out as a piece of work for somebody to pick up. It's not clear what the work is here as I'm not sure what is duplicated.


Media Services version 2015-10-01

This is our first draft of a full swagger for Media Services.

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

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

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

TTYL, AZPRBOT;

@BrianBlum can you please start by looking at all of the warnings that the editor.swagger.io is flagging and try to get to a pretty clean state?
http://editor.swagger.io/#/?Import=https:%2F%2Fraw.githubusercontent.com%2FBrianBlum%2Fazure-rest-api-specs%2F5e6e26edeffb270c3e702bbd1756d46a7559d074%2Farm-mediaservices%2F2015-10-01%2Fswagger%2Fmedia.json
That will really help make the review much faster

Will do.
From: John Hart<EMAIL_ADDRESS>Sent: Tuesday, June 28, 2016 3:38 PM
To: Azure/azure-rest-api-specs<EMAIL_ADDRESS>Cc: Brian Blum<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Subject: Re: [Azure/azure-rest-api-specs] Media Services version 2015-10-01 (#376)
@BrianBlumhttps://github.com/BrianBlum can you please start by looking at all of the warnings that the editor.swagger.io is flagging and try to get to a pretty clean state?
http://editor.swagger.io/#/?Import=https:%2F%2Fraw.githubusercontent.com%2FBrianBlum%2Fazure-rest-api-specs%2F5e6e26edeffb270c3e702bbd1756d46a7559d074%2Farm-mediaservices%2F2015-10-01%2Fswagger%2Fmedia.jsonhttps://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Feditor.swagger.io%2F%23%2F%3FImport%3Dhttps%3A%252F%252Fraw.githubusercontent.com%252FBrianBlum%252Fazure-rest-api-specs%252F5e6e26edeffb270c3e702bbd1756d46a7559d074%252Farm-mediaservices%252F2015-10-01%252Fswagger%252Fmedia.json&data=01|01|brianbl%40microsoft.com|7421bc301da547be37fb08d39fa4d30f|72f988bf86f141af91ab2d7cd011db47|1&sdata=CTUYo77T%2BO4U%2Bo%2Fa4jhPRe64HIZ302WsGUtVO1UIzwc%3D
That will really help make the review much faster
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/Azure/azure-rest-api-specs/pull/376#issuecomment-229205394, or mute the threadhttps://github.com/notifications/unsubscribe/AEH9bMpwvolU6l1PGcZv3JyOHFYwQRVbks5qQaI4gaJpZM4JAhvv.

I looked at the link below, and there aren’t any warnings. I also validated the schema using https://json-schema-validator.herokuapp.com/ and validation was successful.
What warnings were you seeing?
From: Brian Blum
Sent: Tuesday, June 28, 2016 4:02 PM
To: 'Azure/azure-rest-api-specs'<EMAIL_ADDRESS>Azure/azure-rest-api-specs<EMAIL_ADDRESS>Cc: Mention<EMAIL_ADDRESS>Subject: RE: [Azure/azure-rest-api-specs] Media Services version 2015-10-01 (#376)
Will do.
From: John Hart<EMAIL_ADDRESS>Sent: Tuesday, June 28, 2016 3:38 PM
To: Azure/azure-rest-api-specs <azure-rest-api-specs<EMAIL_ADDRESS>Cc: Brian Blum <brianbl<EMAIL_ADDRESS>Mention <mention<EMAIL_ADDRESS>Subject: Re: [Azure/azure-rest-api-specs] Media Services version 2015-10-01 (#376)
@BrianBlumhttps://github.com/BrianBlum can you please start by looking at all of the warnings that the editor.swagger.io is flagging and try to get to a pretty clean state?
http://editor.swagger.io/#/?Import=https:%2F%2Fraw.githubusercontent.com%2FBrianBlum%2Fazure-rest-api-specs%2F5e6e26edeffb270c3e702bbd1756d46a7559d074%2Farm-mediaservices%2F2015-10-01%2Fswagger%2Fmedia.jsonhttps://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Feditor.swagger.io%2F%23%2F%3FImport%3Dhttps%3A%252F%252Fraw.githubusercontent.com%252FBrianBlum%252Fazure-rest-api-specs%252F5e6e26edeffb270c3e702bbd1756d46a7559d074%252Farm-mediaservices%252F2015-10-01%252Fswagger%252Fmedia.json&data=01|01|brianbl%40microsoft.com|7421bc301da547be37fb08d39fa4d30f|72f988bf86f141af91ab2d7cd011db47|1&sdata=CTUYo77T%2BO4U%2Bo%2Fa4jhPRe64HIZ302WsGUtVO1UIzwc%3D
That will really help make the review much faster
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/Azure/azure-rest-api-specs/pull/376#issuecomment-229205394, or mute the threadhttps://github.com/notifications/unsubscribe/AEH9bMpwvolU6l1PGcZv3JyOHFYwQRVbks5qQaI4gaJpZM4JAhvv.

It does take a few minutes for the editor to parse the contents.  The link did work for me but here's one that doesn't have the extra data parameters attached:
http://editor.swagger.io/#/?Import=https:%2F%2Fraw.githubusercontent.com%2FBrianBlum%2Fazure-rest-api-specs%2F5e6e26edeffb270c3e702bbd1756d46a7559d074%2Farm-mediaservices%2F2015-10-01%2Fswagger%2Fmedia.json.
If you're still not seeing the errors I'll help point them out in the spec for you.

Addressed issues raised in review.
We have no long running operations.
MediaServicesCollection has been fixed.
KeyType is an enum.
listKeys is a POST.

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

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

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

TTYL, AZPRBOT;

Need to fix objects to one.

Fixed objects for CheckNameAvailability and pageable link location.

Fix return code for CheckNameAvailability.
This should be ready for review now.

Make description for 200 return codes consistent

@BrianBlum - Any updates on the comments in the review?

Thanks for the feedback. I’ve been away on another deployment issue and will return to this now.
From: Amar Zavery<EMAIL_ADDRESS>Sent: Wednesday, July 6, 2016 2:27 PM
To: Azure/azure-rest-api-specs<EMAIL_ADDRESS>Cc: Brian Blum<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Subject: Re: [Azure/azure-rest-api-specs] Media Services version 2015-10-01 (#376)
@BrianBlumhttps://github.com/BrianBlum - Any updates on the comments in the review?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/Azure/azure-rest-api-specs/pull/376#issuecomment-230912153, or mute the threadhttps://github.com/notifications/unsubscribe/AEH9bMIsJvWiFme1J0RzVAWKqzm1N18Nks5qTB2YgaJpZM4JAhvv.

Incorporated review feedback - OperationIds, spelling and flatten the MediaService object.

LGTM. Shall merge once the CI passes.

Thanks Amar.

No modification for Python

No modification for NodeJS


[Bug]: No publishable resources

What happened?
When trying to publish Migration & Config files, I get:
INFO  No publishable resources for tag [laravel-timezone-migrations].

INFO  No publishable resources for tag [laravel-timezone-config].

How to reproduce the bug
Running these commands after composer require:
php artisan vendor:publish --tag="laravel-timezone-migrations"
php artisan vendor:publish --tag="laravel-timezone-config"
Package Version
1.0
PHP Version
8.2
Laravel Version
10.0
Which operating systems does with happen with?
Linux
Notes
No response

I've updated the readme. The tags should just be timezone-config or timezone-migrations.


Problem: failing to compile omni_seq in some cases

In particular, compiling on Ubuntu Noble LTS against PGDG PostgreSQL 16 is failing with an error (not being able to find a header file)
Solution: adjust referenced header location
FindPostgreSQL cmake file already includes both client & server include directories. All we have to do is include the header we want without being specific about the path. This works with both RedHat and on Ubuntu PGDG packages. Server headers are a separate package on Ubuntu.

Supersedes #633


Add better jsx support

Properly add the various elements to the JSX intrinsic space similar to:

declare global {
  namespace JSX {
    interface IntrinsicElements {
      ["time-ago"]: CustomElement<TimeAgoElement>;
    }
  }
}```

@Quazie we looked into this but ultimately I don't think there is a tenable solution:

Experimenting with this a bit, this is untenable. React requires a type that includes references to the React library itself, which we're not prepared to bring into this custom element.
declare global {
  namespace JSX {
    interface IntrinsicElements {
      'relative-time': React.DetailedHTMLProps<React.HTMLAttributes<RelativeTimeElement>, RelativeTimeElement>
    }
  }
}

This should be defined in consuming libraries if they want to use this in React.

I'll close this out as I don't think we can reasonably support this.


chore(master): release 1.1.86

:robot: I have created a release beep boop
1.1.86 (2023-09-14)
Bug Fixes

deps: update dependency wayofdev/laravel-cycle-orm-adapter to v4.0.98 (d9b4747)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/wayofdev/laravel-webhook-client/releases/tag/v1.1.86 :sunflower:


Unable to save Email attachments (Outlook .msg files)

Hi,
I use this package to successfully deal with many tens of email on daily basis. So far I was able to extract almost all attachments: pdf files, excel files etc. However, I was never able to extract email attachment (Outlook .msg file) from the message. Almost all users of the app I am building are using Microsoft Outlook desktop application to send their emails and they often attach another email (previously stored) to the message (usually .msg extension).
Any idea how to save such attachment (.msg file) to drive? Thanks.

This is helpful... I was saving attachment's content to a ".msg" file instead of ".eml" so Outlook kept throwing "Invalid file" or similar error message...

Hi @salih0vicX ,
I just merge #47 and created a new release :)


9.01 'fixed bugs'

Adding a note from personal experience about 9.01 bug fixes.

A better version was submitted just afterwards :+1:


Error 400 returned for some clients for Azure OAuth

Current Behavior
I've configured openvpn-auth-oauth2 to use Azure as OAuth provider with the following config:
CONFIG_OAUTH2_ISSUER=https://login.microsoftonline.com/…/v2.0
CONFIG_OAUTH2_CLIENT_ID=…
CONFIG_OAUTH2_CLIENT_SECRET=…

CONFIG_OPENVPN_ADDR=unix:///run/openvpn/server-udp-1194.sock
CONFIG_OPENVPN_PASSWORD=… # The same password as in /etc/openvpn/password.txt

CONFIG_HTTP_LISTEN=:9000
CONFIG_HTTP_SECRET=…
CONFIG_HTTP_BASEURL=https://vpn-test.$COMPANY.com/
CONFIG_HTTP_ENABLEPROXYHEADERS=true

CONFIG_LOG_LEVEL=debug

There's nginx to provide TLS:
server {
    listen 80 default_server;
    listen [::]:80 default_server;
    server_name vpn-test.$COMPANY.com;

    return 301 https://$host$request_uri;
}

server {
    listen 443 ssl default_server;
    listen [::]:443 ssl default_server;
    server_name vpn-test.$COMPANY.com;
    ssl_certificate /etc/ssl/private/star_$COMPANY_com_fullchain.pem;
    ssl_certificate_key /etc/ssl/private/star_$COMPANY_com.key;

    include /etc/nginx/include/well_known.conf;

    location / {
        proxy_pass http://localhost:9000;
        proxy_set_header X-Real-IP  $remote_addr;
        proxy_set_header X-Forwarded-For $remote_addr;
        proxy_set_header Host $host;
        proxy_set_header X-Real-Port $server_port;
        proxy_set_header X-Real-Scheme $scheme;
    }
}

In my tests I have tried a few client and platform combination and got different results:

Viscosity on Windows. Pops up its own browser window where authentication works fine, I'm being redirected to Microsoft and so on.
OpenVPN GUI on Windows. Opens the default web browser Edge with a page showing error 400. The same error is in logged by nginx.
Viscosity on Mac. Pops ip its own window with blank page. Nginx log says it's a 400.

App's log:
2024-01-18T10:57:28+0000vpn-test.$COMPANY.local openvpn-auth-oauth2[423118]: time=2024-01-18T10:57:28.355Z level=INFO msg="new client connection" cid=0 kid=1 common_name="" reason=CONNECT username=""
2024-01-18T10:57:28+0000vpn-test.$COMPANY.local openvpn-auth-oauth2[423118]: time=2024-01-18T10:57:28.355Z level=INFO msg="start pending auth" cid=0 kid=1 common_name="" reason=CONNECT username=""
2024-01-18T10:57:28+0000vpn-test.$COMPANY.local openvpn-auth-oauth2[423118]: time=2024-01-18T10:57:28.355Z level=DEBUG msg="client-pending-auth 0 1 \"WEB_AUTH::https://vpn-test.$COMPANY.com/oauth2/start?state=A_LONG_RANDOM_STRING\" 180"
2024-01-18T10:57:28+0000vpn-test.$COMPANY.local openvpn-auth-oauth2[423118]: time=2024-01-18T10:57:28.415Z level=WARN msg="invalid state: decode: EOF"
2024-01-18T10:57:28+0000vpn-test.$COMPANY.local openvpn-auth-oauth2[423118]: time=2024-01-18T10:57:28.415Z level=DEBUG msg=A_LONG_RANDOM_STRING

The A_LONG_RANDOM_STRING is the same as in the URL opened in the pop-up browser window:
https://vpn-test.$COMPANY.com/oauth2/start?state=A_LONG_RANDOM_STRING

Expected Behavior
URL https://vpn-test.$COMPANY.com/oauth2/start?state=A_LONG_RANDOM_STRING opening and redirecting me to Microsoft for all clients on all platforms.
Steps To Reproduce
No response
Environment

openvpn-auth-oauth2 Version: 1.13.4
OpenVPN Server Version: 2.6.3-1+deb12u2~bpo11+1
Server OS: Debian 11.8
OpenVPN Client (flavor, OS): OpenVPN GUI on Windows, Viscosity on Mac and Windows

Anything else?
No response

can you share the logs without mask the A_LONG_RANDOM_STRING?

common_name="" reason=CONNECT username=""

No stripping done, this is copied verbatim from the log.

Has the client "Viscosity on Windows" a common name or username?

I improved the error message in v1.13.5, maybe it helps here

It seem it does, see:
2024-01-24T15:36:07+0000 vpn-test.$COMPANY.local openvpn-auth-oauth2[3094910]: time=2024-01-24T15:36:07.101Z level=WARN msg="invalid state: scan error \"4 1 \\x00 \\x00  \\x00<PHONE_NUMBER>\\n\": unexpected newline"

The logs without A_LONG_RANDOM_STRING mask would helpful here.

https://vpn-test.$COMPANY.com/oauth2/start?state=vCf4NKk1ls1VNkj_WZvBNUU1Kf0FJSHBlsMrT_JITNagGSdM1Y4

Could you please disable

CONFIG_HTTP_ENABLEPROXYHEADERS=true

can you share the logs without mask the A_LONG_RANDOM_STRING? its share to share, because the string is encrypted with the value of CONFIG_HTTP_SECRET
Did you also strip

common_name="" reason=CONNECT username=""

or are the values empty?

These are also empty for OpenVPN Connect without stripping

The client connects from IPv6, not from Legacy IP and thus OpenVPN provides the env variable untrusted_ip6 instead of untrusted_ip. See https://github.com/jkroepke/openvpn-auth-oauth2/pull/133 for bare minimum fix.

Resolved in #133


App crashed when calling connectToPrinter

I'm trying to connect a Zebra Printer with its Bluetooth mac address. And after calling connectToPrinter function, it crashed with the following info:
E/CrashReport(25839): java.lang.ClassCastException: java.lang.String cannot be cast to char[]
E/CrashReport(25839): 	at com.professor.zebrautility.Printer$11.run(Printer.java:643)
E/CrashReport(25839): 	at java.lang.Thread.run(Thread.java:784)

Additionally, the printer model is Zebra ZD888T

@HualiangLI  Can you recommend any fluter plugin that has served you with zebra printers? I have problems printing with the zebra brand, can you please help me.


[BUG] follow_path only works from origin and if the subaction starts from 1

Before Filing a Report
Describe the bug
The follow_path SubAction only works if the frame starts with 1. I misused the variable rel_frame.
Additionally the path currently has to start at the origin to make sense. I would change this to start at the first point of the path.
To Reproduce

Julia Version (i.e. output of julia -v):
1.5.1

Operating system (Mac, Linux, Windows):
Linux

Minimum working code example that led to bug:

points = [Point(10, 20), Point(100, 20)]

Action(
    1:80,
    (args...) -> circle_with_color(first(points), 10, "red");
    subactions = [
        SubAction(1:20, appear(:fade)),
        SubAction(21:80, follow_path(points)),
    ],
)

Expected Behavior and Actual Behavior
I expected that it follows the path by starting at first(points) but instead it starts at first(points) + first(points)

Actually I'm not sure by the second part of this to be honest.
Probably the current one is fine and one should call it with follow_path(points .- first(points))

@TheCedarPrince can you give an example of how you would do the following animation:
Let a star appear by using :scale and then move it along a rectangle rect(Point(-50, 50), 100, 100)) ?
Don't actually try it out just write the code here to see what feels natural to you :wink:

Ok, here would be my first attempt:

vid = Video(500, 500)

points = [Point(10, 20), Point(100, 20)]

actions = [BackgroundAction(1:80, ground),
Action(
    1:80,
    (args...) -> star(O);
    subactions = [
        SubAction(1:20, appear(:scale)),
        SubAction(21:80, follow_path(points)),
    ],
)]

javis(vid, actions, "test.gif")

I was somewhat confused by your question. Was this what you were looking for?

I want the star to appear at Point (10, 20)


Fixing problem saving config because saveConfig function has disappeared

Summary
Fixing problem saving config because saveConfig function has disappeared
Ticket Link
MM-19306

@jespino - great minds think alike: https://github.com/mattermost/mattermost-webapp/pull/3878

Creating a new SpinWick test server using Mattermost Cloud.

Mattermost test server created! :tada:
Access here: https://mattermost-webapp-pr-3913.test.mattermost.cloud

Account Type
Username
Password

Admin
sysadmin
Sys@dmin123

User
user-1
User-1@123

Test server destroyed


proposal: add stopPropagation binding behavior

In the last release we fixed an issue where the delegate binding command didn't match the trigger binding command or vanilla addEventListener with regards to event bubbling.
I would like to propose we add a convenience binding behavior to enable developers to stop an event from bubbling more easily.
Usage:
<button click.delegate="doSomething() & stopPropagation">Do Something</button>
<button click.trigger="doSomething() & stopPropagation">Do Something</button>

Live Example:
https://gist.run/?id=bf3b166a2cc18332f560b4e6b48bfe86
Code:
export class StopPropagationBindingBehavior {
  bind(binding, source) {
    binding.standardCallSource = binding.callSource;
    binding.callSource = function(event) {
      this.standardCallSource(event);
      event.stopPropagation();
    };
  }

  unbind(binding, source) {
    binding.callSource = binding.standardCallSource;
    binding.standardCallSource = null;
  }
}

https://github.com/aurelia/framework/issues/499
https://github.com/aurelia/binding/pull/468
https://github.com/aurelia/binding/issues/467

Will this break other frameworks that utilises event bubbling? I have always been against using stopPropagation and I wonder in which use cases you actually need to use it..
I think we have had a similar discussion long time ago where my gesture framework broke where an event.stopPropgation was added in the framework.

Generally, no, because usage of the proposed binding behavior is optional.
When used in conjunction with the delegate binding command, there is no potential to impact other frameworks or vanilla js.  By the time delegate bindings act the event has already propagated.
When used in conjunction with trigger, it would potentially impact other things.

closing this- people don't seem to be having a ton of issues with the recent changes around delegated event propagation.  This probably isn't needed.

This is really useful and it should be added as the default example for Creating a Custom Binding Behavior
 in the documentation!
This creates a conversion pattern for Knockout's eventBubble: false binding.

@gooeyideas Would be really awesome if you could help with the doc with this. Join us building Aurelia https://github.com/aurelia/aurelia/issues/318#issuecomment-441827326 😆


ISSUE-33 add scroll to overlays

fixes #33

Verified ok

@MalcolmSmithUK ready for review

@MalcolmSmithUK ready for review


Re-initialize LEDs after receiving a new config

Hello there,
As I was experimenting with different configurations I noticed that LEDs were not toggling despite the config saying they should. It turned out we're missing a re-initialization of the LEDs after receiving a new config so that we set which LEDs need to have the toggle behavior. Here's a small patch that fixes it.
Cheers!

Going back to this today, I realized that I added the code after each reception of a chunk of flash data. That's definitely not what I intended.
I now also realize that the Python script is supposed to send a reset message at the end which it isn't doing currently. Sending a reset is a much better solution so let's drop this patch and update the Python script instead.


Load encoded text from cache if available for TextUnsupervised

Text encoding with Byte Pair Encoder has O(N*N) time complexity https://github.com/tensorflow/swift-models/blob/master/Support/Text/BytePairEncoder.swift#L101. Encoding for full WikiText2 training and testing dataset can take ~100 minutes.
We wanted to make the cache optional where if the encoded text provided then load them directly.

Since the complexity issues are caused by the BytePairEncoder implementation, it would be good to find a way to cache at that level, which would impact everything that references it. That would be my preference, but as a shortcut for benchmarks and quick prototyping, I can see how this PR makes sense (even with a bpe cache).
This approach effectively short-circuits the byte pair encoder entirely, by storing a preprocessed dataset. If you want to go this route for now, it would be worth storing this file in GCS (we might want to consider hosting the data files as well) and adding the path to TextUnsupervisedVariantDetails, rather than passing it in. This warrants reconfiguring the init() methods. For example, the first one creates an empty bpe, which isn't really useful for anything. Instead, this preprocessed dataset could be loaded, which would make the bpe optional.

Great point:) Updated with EncodedWikiText2Details.