Skeleton horse trap event causes ConcurrentModificationException (1.15.2)

Summary:
When a skeleton horse trap event triggers the game crashes with a ConcurrentModificationException after adding a new TemptGoal to the SkeletonHorseEntity inside CrockPot.java:onAnimalAppear.
Steps to reproduce:

Enter creative mode.
Execute the command /summon skeleton_horse ~ ~ ~ {SkeletonTrap:1}.

Potential fix:
I was able to avoid this crash by modifying the logic at CrockPot.java:102 and adding an extra check to ensure that the entity is not a skeleton horse:
if (((animalEntity.getNavigator() instanceof GroundPathNavigator) || (animalEntity.getNavigator() instanceof FlyingPathNavigator)) && !(animalEntity instanceof SkeletonHorseEntity))
I'm not sure if this will cover all possible issues that might arise here but it seems to at least handle this particular problem with skeleton horse traps.  Hopefully you can figure out a more robust fix.
Crash report:
crash-2020-09-28_02.14.52-server.txt

Sorry for the late reply.
After investigating (thanks to @ustc-zzzz ), we find out that it's probably a vanilla bug, and here are the details about it:

The skeleton horse trap deserializes and calls setTrap(true) which will add TriggerSkeletonTrapGoal to the GoalSelector
The GoalSelector traverses its goals and call the tick method
The TriggerSkeletonTrapGoal is being ticked and calls setTrap(false), which will remove itself from the GoalSelector
ConcurrentModificationException

The vanilla game doesn't run into this issue, probably because the TriggerSkeletonTrapGoal is the last goal, so it doesn't matter. But here we added another, and the issue appears.
After all these investigations, I think your dirty fix is "robust" enough for this issue.

Thanks for the explanation!

Follow up, turns out this is a vanilla bug. See MinecraftForge/MinecraftForge#7509 for more info.


Sponge Prism Error: Could not pass ChangeBlockEvent$Place$Impl

Hello,
We recently decided to update our modded server to Sponge and use Prism to track griefs. All was well until we had to remove a few region files from the world so the could be re-generated. Now Prism is spamming the console with the following error. We aren't sure what's causing it and any help is appreciated.
Thank you! :)

This isn't something we can fix. Essentially this means Sponge is trying to give us data about a block that has invalid/null data, which is most likely invalid data from a mod.

@viveleroi Do you have any suggestions/troubleshooting ideas as how to resolve this? Even with a complete wipe of all Prism data, this issue still arises.

It's just a matter of finding which block/mod is causing the issue.
You could:

Compile Prism with a try/catch around this line https://github.com/prism/Prism/blob/master/src/main/java/com/helion3/prism/api/records/PrismRecord.java#L261 and looking at transaction.getOriginal().getType().getId()
Run sponge/Prism in an IDE and debug that value
Trial and error, remove mods until it stops.

Clearing Prism data won't affect this, because it's either Mod Data that has null/invalid content that Sponge is trying to export, or there's a bug inside Sponge, which isn't likely because it would be affecting every block.


Bump Jetstream, maxtext, jetstream-pytorch versions in Jetstream inference server guide

Note: the text_content=jetstream_pb2.DecodeRequest.TextContent(text=request.prompt) change fixes a Jetstream change that broke making requests to the endpoint, the issue around decoding responses still exists, more to do there.

/gcbrun


Implement NFT Royalty Standard

Need to add the ERC-2981 implementation to LockDealNFT.
Documentation: https://eips.ethereum.org/EIPS/eip-2981

after https://github.com/The-Poolz/VaultManager/issues/28


[TW#16937] BLE Whitelisting not working properly

The esp_ble_gap_update_whitelist function in the esp_gap_ble.h library does not add Bluetooth MAC address properly. Combined with advertising BLE parameters such as the adv_filter_policy = ADV_FILTER_ALLOW_SCAN_WLST_CON_WLST the devices are still shown, and can still be connected to.
Also, the esp_ble_gap_get_whitelist_size function always returns 11, even if no addresses have been added to the whitelist. Why is this?
Finally, it would be nice to have functionality to clear the BLE whitelist instead of manually removing separate BLE addresses.

 The esp_ble_gap_get_whitelist_size function is indicate the remaining size. Thanks.

Ah thank you, that helps. I don't know what my commit ID is, I only logged this issue with id: [TW#16937]

@bmetman So can you update your IDF version? I think we have fix this issues in the new version of SDK.

I have cloned the latest IDF and pushed it to our branch. It still won't work for me. When I add a MAC address to my whitelist, change my advertising filter policy to only advertise to whitelisted device, and start advertising, the ESP32 chip is visible to either all devices or no devices at all. Do you have any idea what causes this behavior?

sacan_whitelist.c.zip
@bmetman There is a demo that only scan adv in  white list. it works well.  you can change whitelist_addr at line 59 and try. if any question, let me know.

This demo is not working.
I (473) heap_init: At 3FFC9080 len 00016F80 (91 KiB): DRAM
I (479) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (486) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (492) heap_init: At 40092E04 len 0000D1FC (52 KiB): IRAM
I (498) cpu_start: Pro cpu start user code
I (516) spi_flash: detected chip: generic
I (517) spi_flash: flash io: dio
W (517) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (528) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (614) BTDM_INIT: BT controller compile version [c1cbe45]
I (614) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (704) phy: phy_version: 4180, cb3948e, Sep 12 2019, 16:39:13, 0, 0
I (1074) GATTC_DEMO: REG_EVT
I (1094) GATTC_DEMO: scan start success


how do I use this from a mac

Hi -
I cloned this to the mac, now what ? how to do I run it ?

you don't need to clone the repo.
just scaffold a new project using dotnet new cli command after installing the .net core sdk on your mac.
  dotnet new -i MongoWebApiStarter
  dotnet new mongowebapi -n MyAwesomeApp

got it. But I can't see how to run the api
I got the starter project when I run it, it loads on local :8888
What's the api  - ?? is there a swagger ?
regards

if you're not familiar with servicestack please check the docs here: https://docs.servicestack.net/
this explains how to add swagger: https://docs.servicestack.net/swagger-api
you can see the endpoint urls on each request dto of every feature together with what fields are needed for the request.
also look at the tests to see how it's being used: https://github.com/dj-nitehawk/MongoWebApiStarter/blob/master/Template/Tests/Main/Account.cs

Can I use this with asp standard apiController?

ummm... no, this doesn't use asp.net mvc/web-api controllers. it uses servicestack services instead.
but you can easily see how this works and implement the same/similar vertical feature architecture with asp.net controllers too i suppose. i just find servicestack far superior and gave up on asp/mvc sometime back.


DataSendService: Only send if different

Currently, the DataSendService just send whatever we give to it.
This could be enhanced via only send request if actual changes were made.

Might be done already. Will eventually be deprecated in OS4

DataSendService is deprecated. Closing.


FEAK: Added navbar, hero section, events swipper, mission section

I have added a navbar, hero section, events section, and mission section with the addition of CSS and JavaScript in the contributor list.

I have added navbar, hero section, missions, events with CSS and JavaScript.

I have added navbar, hero section, missions, events with CSS and JavaScript.

Thanks for this but I think you have closed the PR.


Changes when switching between DeepAR, DeepFactor, DeepStateSpace?

Hello all,
I've been utilizing DeepAR for forecasting individual sales of products. I've been testing out DeepFactor and DeepState estimators as well, and despite the substantial improvements over DeepAR seen in the papers, both DeepFactor and DeepState seem to do a lot worse overall when comparing with the same number of batches/epochs and default layers/cells.
Are there any specific modifications to the data or network (i.e. "works better with more training data", or "tuning layers is necessary") I should be making when trying out DeepFactor and DeepState?

First of all note that this (deepstate) is a reimplementation of the paper code using the gluon interface of mxnet. The code currently does not fully expose all the hyper-params used in the paper and the defaults for other hyper-params might not be optimal for all datasets.
Having said that there might be several reasons for bad performance:

Is your target variable (sales) integer-valued? Deep state has strong assumption that the output follows Gaussian distribution and is not a good model for count data.

Have you enabled features, esp. categorical features for DeepStateEstimator? By default, none of the estimators use features even if they are present in the dataset. For deepar which uses lags this might not be that problematic, but for deepstate this can affect results severely.

As mentioned, some hyper-params are not exposed in the open source version, e.g. prior covariance, upper bound on noise and innovation variance. We are working on updating this. Tuning this might help improve performance.

1. Is your target variable (sales) integer-valued? Deep state has strong assumption that the output follows Gaussian distribution and is not a good model for count data.

It is indeed count data, and does not follow a Gaussian distribution. That could explain it!

2. Have you enabled features, esp. categorical features for `DeepStateEstimator`? By default, none of the estimators use features even if they are present in the dataset. For deepar which uses lags this might not be that problematic, but for deepstate this can affect results severely.

Yes, I do have static categorical features enabled  for both DeepAR and DeepState - they are somewhat critical to the forecast because they describe the product grouping.

3. As mentioned, some hyper-params are not exposed in the open source version, e.g. [prior covariance](https://github.com/awslabs/gluon-ts/blob/695a226ec9d323a49f283c6f9d1b8ccc32fdfa86/src/gluonts/model/deepstate/_network.py#L67), [upper bound on noise and innovation variance](https://github.com/awslabs/gluon-ts/blob/695a226ec9d323a49f283c6f9d1b8ccc32fdfa86/src/gluonts/distribution/lds.py#L476-L477). We are working on updating this. Tuning this might help improve performance.

Looking forward to it!
Do any of these assumptions also apply for DeepFactor?


RSA Operations

Fulfilling #272.

[x] Generate RSA Key Pair
[x] RSA Sign
[x] RSA Verify
[x] RSA Encrypt
[x] RSA Decrypt

@d98762625 This PR is ready for review finally btw :)

Nice work!

Currently discussing the issue with the tests in https://github.com/digitalbazaar/forge/issues/783. It does work if we use un-minified forge but I'm not sure we want to do that just so these tests pass.

Cheers @mattnotmitt I can take a look tomorrow but this will need the OK from @n1474335 because its a new operation 👍

Why isn't this merged?

Why isn't this merged?

Couple people have asked me this (on Twitter) and after contacting the lead maintainer this is the reply I got:

"Hey, yes I hope to be [back to merging]. My time has been very stretched over the last year, but I hope to get back to it at some point." - @n1474335

This took a little bit of tidying up regarding UTF-8 input, but I have got the tests working and integrated.
Thanks very much for the time and effort you have put into implementing this!


1.0.16 version cannot play HEVC streams in WordPress 6.2

I tried reinstalling version 1.0.16 of SRS Player but found it ineffective. In WordPress, it can only play H.264 FLV streams and is unable to play HEVC-encoded FLV streams.
I am using my own setup of SRS server with version 6.0 or higher. In the SRS HTTP server (on port 8080), HEVC-encoded FLV streams can be played without any issues. After implementing HTTPS through reverse proxy, it can also be played smoothly.
I tried installing mpegts.js on my own and added the following code to the functions.php file:

function enqueue_mpegts_script() {
    wp_enqueue_script( 'mpegts-script', get_template_directory_uri() . '/root/mpegts.js', array(), '1.0', true );
}
add_action( 'wp_enqueue_scripts', 'enqueue_mpegts_script' );

Afterward, I tried installing mpegts.js on my own and adding it to the functions.php file:

<script src="mpegts.js"></script>
<video id="videoElement"></video>
<script>
    if (mpegts.getFeatureList().mseLivePlayback) {
        var videoElement = document.getElementById('videoElement');
        var player = mpegts.createPlayer({
            type: 'mse',  // could also be mpegts, m2ts, flv
            isLive: true,
            url: 'http://example.com/live/livestream.ts'
        });
        player.attachMediaElement(videoElement);
        player.load();
        player.play();
    }
</script>

I can play HEVC live streams properly using both FLV and TS formats.
I suspect that the issue might be related to the invocation of mpegts.js. I have looked into the files of SRS Player but couldn't find any problematic configuration. I also tried replacing mpegts-1.7.2.min.js and mpegts-1.7.2.min.js.map with the latest version, but the problem still persists.
TRANS_BY_GPT3

In version 1.0.17, we will address this issue, as HEVC is only supported by mpegts.js 1.7.3. If you use OBS to publish an HEVC stream, it utilizes an enhanced FLV protocol, which is a standard FLV protocol for HEVC. You can find more information at https://github.com/xqq/mpegts.js/releases/tag/v1.7.3
However, version 1.0.16 only supports mpegts.js 1.7.2, which exclusively provides HEVC support over FLV through a patched FFmpeg. This is a private protocol for HEVC over FLV.


Hive boost temperature/time is not configurable

https://github.com/home-assistant/home-assistant/blob/37eb6c90b6b06e6203f189e03509dda50f2fc4fc/homeassistant/components/climate/hive.py#L155
It's currently hard coded to 30 minutes and 0.5 degrees above the current temperature.
If you use the buttons on the thermostat device the default boost settings are 1 hour and 22 degrees.
The boost settings that Homeassistant uses are not robust enough to make much of a difference to a cold house.
To fix this the boost setting should be configurable. Probably via settings in the configuration.yaml.

This issue is still in the code. A half degree hard coded boost temperature. I was under the impression that you could only select whole degrees as well.

This issue is still in the master branch. The Hive API only accepts whole degree increments so I'm not even sure the current code works as intended.


minHealthPercent in DestinationRule.outlierDetection does not take effect.

Bug description
minHealthPercent in DestinationRule.outlierDetection does not take effect.
Affected product area (please put an X in all that apply)
[ ] Configuration Infrastructure
[ ] Docs
[ ] Installation
[X] Networking
[ ] Performance and Scalability
[ ] Policies and Telemetry
[ ] Security
[ ] Test and Release
[ ] User Experience
[ ] Developer Infrastructure
Expected behavior
minHealthPercent in DestinationRule.outlierDetection can take effect.
Outlier detection will be enabled as long as the associated load balancing pool has at least minhealthpercent hosts in healthy mode. When the percentage of healthy hosts in the load balancing pool drops below this threshold, outlier detection will be disabled and the proxy will load balance across all hosts in the pool (healthy and unhealthy). The default is 50%.
Steps to reproduce the bug

Create deployment fortioserver
Create destinationrule with minHealthPercent

apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
  creationTimestamp: "2019-08-28T15:34:31Z"
  generation: 19
  name: port-fortiosrv-cb-outlier
  namespace: hobby
  resourceVersion: "6659780"
  selfLink: /apis/networking.istio.io/v1alpha3/namespaces/hobby/destinationrules/port-fortiosrv-cb-outlier
  uid: a92d48fd-4400-40b8-92b4-7e65f2387bfb
spec:
  host: fortioserver.hobby.svc.cluster.local
  trafficPolicy:
    portLevelSettings:
    - connectionPool:
        http:
          http2MaxRequests: 40000
          idleTimeout: 70s
          maxRequestsPerConnection: 20000
          maxRetries: 1
        tcp:
          connectTimeout: 30m
          tcpKeepalive:
            interval: 79s
            time: 7211s
      outlierDetection:
        baseEjectionTime: 5m
        consecutiveErrors: 1
        interval: 5s
        maxEjectionPercent: 100
        minHealthPercent: 75
      port:
        number: 8080

check envoy config
Execute istioctl command to verify envoy cluster configuration, and don't find minHealthPercent value (in commonLbConfig).

#istioctl proxy-config cluster fortioserver-7fbf7dc7d6-6clhx -nhobby  --fqdn fortioserver.hobby.svc.cluster.local --port 8080 -ojson
[
    {
        "name": "outbound|8080||fortioserver.hobby.svc.cluster.local",
        "type": "EDS",
        "edsClusterConfig": {
            "edsConfig": {
                "ads": {},
                "initialFetchTimeout": "0s"
            },
            "serviceName": "outbound|8080||fortioserver.hobby.svc.cluster.local"
        },
        "connectTimeout": "1800s",
        "maxRequestsPerConnection": 20000,
        "circuitBreakers": {
            "thresholds": [
                {
                    "maxRequests": 40000,
                    "maxRetries": 1
                }
            ]
        },
        "commonHttpProtocolOptions": {
            "idleTimeout": "70s"
        },
        "http2ProtocolOptions": {
            "maxConcurrentStreams":<PHONE_NUMBER>
        },
        "outlierDetection": {
            "interval": "5s",
            "baseEjectionTime": "300s",
            "maxEjectionPercent": 100,
            "enforcingConsecutive5xx": 0,
            "consecutiveGatewayFailure": 1,
            "enforcingConsecutiveGatewayFailure": 100
        },
        "commonLbConfig": {
            "localityWeightedLbConfig": {}
        },
        "metadata": {
            "filterMetadata": {
                "istio": {
                    "config": "/apis/networking/v1alpha3/namespaces/hobby/destination-rule/port-fortiosrv-cb-outlier"
                }
            }
        },
        "upstreamConnectionOptions": {
            "tcpKeepalive": {
                "keepaliveTime": 7211,
                "keepaliveInterval": 79
            }
        }
    },
    {
        "name": "inbound|8080|http2-echo|fortioserver.hobby.svc.cluster.local",
        "type": "STATIC",
        "connectTimeout": "10s",
        "loadAssignment": {
            "clusterName": "inbound|8080|http2-echo|fortioserver.hobby.svc.cluster.local",
            "endpoints": [
                {
                    "lbEndpoints": [
                        {
                            "endpoint": {
                                "address": {
                                    "socketAddress": {
                                        "address": "<IP_ADDRESS>",
                                        "portValue": 8080
                                    }
                                }
                            }
                        }
                    ]
                }
            ]
        },
        "circuitBreakers": {
            "thresholds": [
                {}
            ]
        },
        "http2ProtocolOptions": {
            "maxConcurrentStreams":<PHONE_NUMBER>
        },
        "metadata": {
            "filterMetadata": {
                "istio": {
                    "config": "/apis/networking/v1alpha3/namespaces/hobby/destination-rule/port-fortiosrv-cb-outlier"
                }
            }
        }
    }
]

do some test and failed
When the ejected host percentage > 50%, the outlier still not disabled.

Version (include the output of istioctl version --remote and kubectl version)
$ istioctl version --remote
client version: 1.2.5
citadel version: 1.2.5
galley version: 1.2.5
ingressgateway version: 1.2.5
pilot version: 1.2.5
sidecar-injector version: 1.2.5

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.1", GitCommit:"b7394102d6ef778017f2ca4046abbaa23b88c290", GitTreeState:"clean", BuildDate:"2019-04-08T17:11:31Z", GoVersion:"go1.12.1", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.0", GitCommit:"e8462b5b5dc2584fdcd18e6bcfe9f1e4d970a529", GitTreeState:"clean", BuildDate:"2019-06-19T16:32:14Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}

How was Istio installed?
$ helm install install/kubernetes/helm/istio-init --name istio-init --namespace istio-system
$ helm install install/kubernetes/helm/istio --name istio --namespace istio-system

Environment where bug was observed (cloud vendor, OS, etc)
both minikube and normal K8S
Additionally, please consider attaching a cluster state archive by attaching
the dump file to this issue.

This issue might be fixed (#15220).

@mnktsts2 Thanks for your update.

closing. please reopen if not fixed


Were tests performed training CGCNN directly on decomposition energy instead of implicitly via convex hull calculations?

@CJBartel I noticed that Fig. 3, which is trained on formation energies followed by convex hull predictions of decomposition energy ($\Delta H_d$), has higher MAEs than Fig S3, which is trained directly on the decomposition energy. The trends are also somewhat different qualitatively. I was looking around the main and supplementary articles and had trouble finding a comparison where CGCNN is trained directly on decomposition energy (i.e. to compare with Fig 7b). Was this test performed? If so, what were the results?

We did not ever perform that test, though I would be curious what the results look like. Trying to recall our thought process for not performing it, I think it boiled down to 1) the very poor performance of compositional models trained on Hd for the Li-Mn-TM-O test and 2) feeling the paper was already a bit overwhelming in terms of number of analyses performed.


How to get the source code of a class

in older versions of androlyze it was possible to get the source code of a class by entering d.get_class('Lcom/test/own/TestActivity;').source() this seems to be no longer available.
Is there a new command that displays the source of a given class?

Should be still possible IMHO.
do you get an error message?

In [6]: d.get_class('Lcom/test/own/TestActivity;').source()
AttributeError                            Traceback (most recent call last)
/usr/local/bin/androlyze.py in ()
----> 1 d.get_class('Lcom/test/own/TestActivity;').source()
AttributeError: 'list' object has no attribute 'get_class'

thanks a lot!


Laravel 5.3

http://take.ms/n1ChG
http://take.ms/mgnHD
http://take.ms/E3cio
?

+1

+1

@KyberID try with the latest code, hope it does not happen again.


Is Peer2Profit dead?

I can't visit Peer2Profit.com anymore.
Is P2P dead?

it still running. the website site may disapeared, but you can use telegram bot of peer2profit. here is the link Peer2Profit Telegram Bot


Fix #863 Not able to get the template list

Fixes #863

Hello @thinkingserious,Thanks again for the PR! We appreciate your contribution and look forward to                                              continued collaboration. Thanks!                                             Team SendGrid DX


Haiku Geist

An idea that popped up while reading https://github.com/subconsciousnetwork/subconscious/wiki/magic-circle and considering various ways of putting the user in a free-associative state.

Select a note at random with backlinks
Walk the link graph two steps to find a string of three interlinked notes
Present them together as a "poem" with some kind of background image / artwork (could be selected based on content somehow?)

I have two ideas for the poem's content:

the three titles of the notes
sequences of words from the notes

(1) is a bit boring but will often make some sense. (2) is going to produce a lot of garbage, need some kind of selection criteria. It might be possible to try and actually match the 5-7-5 syllable pacing, at least roughly.
Some examples from my own notes of Subconscious, manually running the algorithm as outlined above.

I absolutely love this.
Current Tracery Geists are hard-coded. It may be easier to accomplish something like this with the future Noosphere Geists that we are building toward. You could think of these as being like the equivalent of a dynamic server you can follow.
I wonder if there's a way to deliver some of this concept in the short term, however? Let's keep noodling on it.


[documentation] emphathise chunckloaders

Issue description:
Its not 100% obvious that you need both the network transmitter and receiver chunckloaded while setting up the link.
What happens:
Receiver does not glow.
What you expected to happen:
Receiver glowing.
Steps to reproduce:

Attempt to link to a receiver while the receiver is not loaded

Version (Make sure you are on the latest version before reporting):

Minecraft: 1.10.2
Forge: latest
Refined Storage: latest

Does this issue occur on a server? [yes/no]
Suggested fix:
Empathize on this page that both need to be chunkloaded during pairing, as well as normal during use, as currently it can be confused that linking will work regardless (since the card has the coords and the network transmitter shows that is has connected to the receiving dimension successfully)

That is literally the line i meant was incomplete.
Normal people will read that that is for normal operation, not including the linking procedure.

Changed!

👍


Update to Docker service drop-in

This update fixes a conflict with newer versions of Core-OS
and Supergiant drop-in modifications to the flannel and docker service.
Fixes #201

LGTM


capstone-project "Create a CD pipeline to automate deployment to Kubernetes".

Please add your planning poker estimate with Zenhub @remi147


(🎁) Add a converter for typing.Literal

Look at this moment:
def foo(a: Literal[1, 2, 3]): ...

Something
    foo    1

Currently, robot will send a "1" to this function, which is invalid, I would expect robot to convert the string to an int.

#4630

Quick intro about Literal for those who don't know about it. It's a Python 3.8 feature that allows typing like this:
from typing import Literal

def open_something(mode: Literal['r', 'w']):
    ...

Type checkers then validate that you only can use open_something with literal values 'r' and 'w'. This means you cannot even use a variable:
open_something('r')     # ok
open_something('a')     # fail
mode = 'r'
open_something(mode)    # fail

For more details see https://peps.python.org/pep-0586/.

If we'd add support for Literal conversion, we needed to first decide how it should behave. Alternatives below.

Make it work like in Python so that we validate the keyword is only used with a literal value, not using a variable. This would be complicated to implement simply because Robot's argument converters are used after variables have already been processed. We certainly could add special checking with literals, but I'm afraid it would be lot of work. I personally don't consider this behavior so important and actually consider not being able to use variables with literals pretty annoying in Python as well. Anyway, we need to make a decision and the behavior needs to be documented in the User Guide.

Only convert the value but don't validate it. For example, if you use a: Literal[1, 2, 3], like in the description, arguments would be converted to integers. This seems to be what PR #4630 does. Personally I would find this pretty strange, because it would allow calling the keyword with any value that is of the accepted type, not only with the explicitly listed values. We obviously could do that, but we'd be so far away from Python behavior that I honestly don't think it's a good idea. I also fails to see the benefit of this in Robot context, because you could just specify the type directly like a: int.

Do conversion and validation. This would mean that if you use a: Literal[1, 2, 3], using argument 4 would cause a failure. I consider this a much better behavior than the above. I'm still not sure would this be that useful addition, though, because you can already now use Enum and IntEnum to get the same behavior.

Could you @KotlinIsland explain your use case for Literal conversion? How would it be better than using using normal type conversion (e.g. a: int) or, if you want to limit the allowed values, better than using enums?

Implementing Literal conversion wouldn't be too complicated, but there are few extra challenges:

Literal is new in Python 3.8 but we still support Python 3.6 and 3.7. It MUST be possible to keep using Robot with those versions without installing typing_extensions that contains a backport.
PEP 586 explicitly states that Literal only accepts ints, byte and unicode strings, bools, Enum values and None, but this is not enforced. You can, for example, use Literal[{}, 3.14, object] and there's no exception. To avoid surprises, our code needed to validate that values have accepted types.

Make it work like in Python so that we validate the keyword is only used with a literal value, not using a variable.

This isn't how python works, confusing I know, but Literal can be a variable, as long as that variable has the type of the literal:
a: Literal[1] = 1
b: Literal[1] = a

This code is valid and correct usage of Literal.

explain your use case for Literal conversion?

Literal is pythonic and much more natural and easier to write than using IntEnum (I didn't even know you could use IntEnum here for this).

You can, for example, use Literal[{}, 3.14, object] and there's no exception. To avoid surprises, our code needed to validate that values have accepted types.

I disagree with this. The pep does not specify what these denotions would mean, so we would have to invent it ourselves.

Python/Mypy considers this wrong:
def fun(arg: Literal[1, 2]):
    ...

var = 1
fun(var)    # fails typecheck

It would be thus somewhat odd if you could use that function as a keyword like this:
*** Variables ***
${VAR}    1

*** Test Cases ***
Example
    Fun    ${VAR}

If we wanted to be true to how Python/Mypy handles Literal, we needed to only allow using literal values like Fun    1. Alternative we could add some special syntax to tell that ${VAR} contains literal value 1 like you can do in Python:
var: Literal[1] = 1
fun(var)    # typechecks

I personally feel the need to use var: Literal[1] = 1 instead of var = 1 super annoying and would be fine accepting just Fun    ${VAR} assuming the value of the variable is valid. That would anyway deviate from Python/Mypy behavior and needed to be documented.
Notice also that although Python itself allows using Literal[3.14], it yields an error with Mypy. Robot accepting it would be really strange in my opinion.
Finally, it would be great if you could explain what's your actual use case for Literal conversion. Is it just type conversion or is the plan to also validate the actual value?

The difference between the two is that robot doesn't have any static type checking, it has runtime typechecking.
Consider the following, the current behavior of converting from str to int differs from mypy in the exact same way that the conversion from str to Literal[1] does. Therefor the proposed functionality is expected, correct and understandable.
def fun(arg: Literal[1, 2]): ...
def bar(arg: int): ...

var: object = 1

fun(var)    # fails typecheck
bar(var)    # fails typecheck

*** Variables ***
${VAR}    1

*** Test Cases ***
Example
    Fun    ${VAR}    # does not fail conversion
    Bar    ${VAR}    # does not fail conversion

It's also possible to use Final to infer the type as a literal.
var: Final = 1

As I've written earlier, I don't have problems with Robot's variables being usable if an argument has Literal as a type. It's nevertheless against the main use case of Literal in Python and I believe this deviation should be documented.
Could you clarify what concrete use case you you have for Literal conversion? You clearly don't want to require users to actually use literal values, so I assume you are interested in type conversion and possibly value validation. For type conversion you can already use arg: int or arg: int|str without being limited to just few types like with Literal. For value validation you can already use enums which, in my opinion, are more convenient and safer in Python code than using strings (e.g. if arg is Direction.UP vs. arg == 'UP'). I can see that using just Literal['UP', 'DOWN'] requires less code than creating an enum, though.

Runtime implementation of Literal conversion isn't too complicated, but how to represent them with Libdoc isn't obvious for me. Storing this type info to Libdoc specs as a string like Literal['UP', 'DOWN'] would be easy, but it wouldn't make the information about actual values available to editors or other spec users. With unions we store the nested types separately for exact this reason, and we are right now planning how to handle parameterized generics like list[int] (#4538). With Literal we needed to store both the value and its type, so it would likely need some additional spec changes. Have you thought how you'd like Literal to work in this regard?

It's nevertheless against the main use case of Literal in Python and I believe this deviation should be documented.

I don't understand what you mean by this, how is this not the primary use case for Literal? Despite the fact that a value is being converted, to me this seems completely normal and consistent with the entire typing landscape and existing type converters.
Type converters are not type-checking the code, they are converting something from the wrong type to the correct one, and raising an exception when they are unable. To me, if something is annotated as Literal[1] and 2 is passed into the type converter, it should fail stating that it is impossible to convert the input to the specified type.

You clearly don't want to require users to actually use literal values

I think there is a point of confusion here, Literal does not mean 'literal' value. the expression 'a' + 'b' has the type Literal['ab'], yet there was no string literal 'ab' denoted at any time. Literal[True] really just means a more restricted form of bool:
from typing import Literal

a: bool
b: Literal[True, False]

a = b  # no error
b = a  # no error

playground Here we can see that Literal[True, False] is identical to bool in every way, because Literal[True] is just a restricted bool and when combined with Literal[False] it equates to every possible instance of bool.
I think this pretty clearly demonstrates my point, if Literal[True, False] is identical to bool then I would expect robot type converters to treat the following two parameters exactly the same:
def foo(a: bool, b: Literal[True, False]): ...

(Although due to #4060, I think this would actually work substantially better than the current bool converter)
Another demonstration:
a: bool = 1 > 0
if a is True:
    reveal_type(a)  # Revealed type is "Literal[True]"

b: bool = 1 > 0
assert b is True
reveal_type(b)  # Revealed type is "Literal[True]"

playground This is showing that Literal does not mean 'literal', in this case mypy can determine a more narrow('restricted') type for the variable that was annotated with bool.
So given that, I don't want users to use literal values, I want users to use Literal types. I want the values passed to be converted to values conforming to the Literal types I have specified.

I assume you are interested in type conversion and possibly value validation

Yes this is exactly what I want, and I believe this is exactly consistent with other type converters behavior.

use enums

I did respond to this earlier, regarding adding type annotations to code, I have never seen a usage of IntEnum to represent a literal (or at all actually), so to me it feels very out of place. Also this makes interactions between normal code and functions for robot keywords much more clunky (mypy not understanding things like it would with Literals).

Have you thought how you'd like Literal to work in this regard?

The way they currently show seems perfect. Although I suppose it would be good to have a help doc linked like int does.

My understanding is that Literal really means a literal value. For example, if I have
from typing import Literal

def fun(a: Literal[1, 2]):
    pass

fun(1)      # ok
fun(1+1)    # fail (line 7)
a = 1
fun(a)      # fail (line 9)

I get these errors with Mypy:
example.py:7: error: Argument 1 to "fun" has incompatible type "int"; expected "Literal[1, 2]"  [arg-type]
example.py:9: error: Argument 1 to "fun" has incompatible type "int"; expected "Literal[1, 2]"  [arg-type]

If I got the above right, 1 matches Literal[1, 2] while 1+1 and a that contains 1 don't. I personally consider both of these failures stupid, and would be totally fine allowing
Fun    ${var}

with Robot as long as ${var} contains 1 as a string or as an integer. The behavior would nevertheless be inconsistent with Mypy behavior.

If we don't want to mandate using actual literal values, then implementing this is pretty straightforward. I see two open design decisions, though:

Should strings be allowed in case-insensitive manner? For example, if you have Literal['yes', 'no'], should we accept YES and convert it to lower case? Our enum conversion is case-insensitive and that is pretty convenient, but it could be argued that we should be more strict with "literal" values.
How to handle documentation. We already now show the type as <Literal[1, 2]> in Libdoc's HTML output but because there's no converter that's just a string and there's no documentation link as with <int>. We could easily make the whole Literal[1, 2] part a link to generic documentation about literal conversion. Is that enough or should we also link each value (1 and 2 in the previous example) to separate type/value specific documentation? The latter is something we plan to do in the future with parametrized types like list[int](#4538)`.

The mypy docs state that Literals are just equal to a certain value and do not mandate 'literal denotation'.

Are you certain about that? Why then in the docs you referenced they have the last overload?
@overload
def fetch_data(raw: Literal[True]) -> bytes: ...
@overload
def fetch_data(raw: Literal[False]) -> str: ...

# The last overload is a fallback in case the caller
# provides a regular bool:

@overload
def fetch_data(raw: bool) -> Union[bytes, str]: ...

def fetch_data(raw: bool) -> Union[bytes, str]:
    # Implementation is omitted

bool can only have values True and False, so raw: Literal[True] and raw: Literal[False] in first two overloads cover all possible values. My understanding is that the last overload with just raw: bool is there to make it possible to have like

Do you mean that the reason Mypy complains about by earlier example is that it's buggy? That would be surprising but I guess it's possible. Being able to use variables, not only literal values, would make Literal a lot more useful in Python typing in my opinion. On the other hand, Mypy not handling something this simple wouldn't give me too big trust in Mypy in general.

Mypy is not perfect in regards to type narrowing and type inference. It uses heuristics to determine what and when a type will change.

- here
In that example mypy is not narrowing to a Literal (typescript does the same thing). This is likely due to potential non-local mutation:
def a(x: Literal[1]): ...
def b():
    nonlocal v
    v = 2

v = 1
b()
a(v)

Mypy has many bugs, and even more limitations (like this).

Mypy not handling something this simple wouldn't give me too big trust in Mypy in general.

Yeah, I know right. This reason is why I started basedmypy.

I've been thinking about this a bit lately and believe we should try to get this done in RF 7. This is why:

Although enums are really convenient, in simple cases something like Literal['yes', 'no'] is often good enough and doesn't require creating a separate class.
Enums don't work over the remote interface because we'd need the actual type. Once #4711 is implemented, literal definitions can be sent over the XML-RPC channel as strings and parsed by Robot.
RF 7 requires Python 3.8 or newer. All supported versions thus support Literal natively.

There are some design decisions still to be agreed, but nothing too complicated. The converter code is also currently in a flux due to #4711. It needs to be finished before this can be implemented.

Changes to type conversion in RF 7.0 had caused a regression using Literal. Fixing that (see f60af34397ee4c3926c27680f6837fec6e958058) required enhancing TypeInfo so that it takes Literal into account. That was already so big step towards supporting literal conversion and validation that I decided to do a quick prototype. The prototype was successful and now I have this functionality implemented.

I never learn. Although the prototype worked well, getting Literals to work properly with Libdoc required some more work. Part of that was due to TypeInfo behaving and being used badly. Had I known how much time all this takes, I wouldn't have re-added this to RF 7.0 scope. Anyway, now everything ought to be ready. Hopefully Literal conversion turns out to be useful!


Cannot install using cargo

I'm trying to install using cargo install trunk and cargo install trunk --git=https://github.com/thedodd/trunk on nightly rustc 1.51.0-nightly (d1aed50ab 2021-01-26) as well as stable rustc 1.49.0 (e1884a8e3 2020-12-29)
I'm getting this error (and many more):
error[E0277]: the trait bound `std::string::String: log::kv::value::ToValue` is not satisfied
  --> /home/martin/.cargo/registry/src/github.com-1ecc6299db9ec823/tide-0.13.0/src/listener/failover_listener.rs:90:21
   |
90 | /                     crate::log::info!("unable to listen", {
91 | |                         listener: listener.to_string(),
92 | |                         error: e.to_string()
93 | |                     });
   | |_______________________^ the trait `log::kv::value::ToValue` is not implemented for `std::string::String`
   |
   = note: required for the cast to the object type `dyn log::kv::value::ToValue`
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

I'm on:
  Operating System: Pop!_OS 20.10
            Kernel: Linux 5.8.0-7630-generic
      Architecture: x86-64

Can confirm this happens on Ubuntu 20.10 as well with trunk on crates.io. However, building it locally seems to build fine. This seems to happen because of a tide update, I believe. Not sure. Will get time to investigate further this weekend.

Can confirm this happens on Ubuntu 20.10 as well with trunk on crates.io. However, building it locally seems to build fine. This seems to happen because of a tide update, I believe. Not sure. Will get time to investigate further this weekend.

However, building it locally seems to build fine.

Try to run cargo install with the parameter --locked (docs). It looks like just another case of https://github.com/rust-lang/cargo/issues/7169

However, building it locally seems to build fine.

Try to run cargo install with the parameter --locked (docs). It looks like just another case of https://github.com/rust-lang/cargo/issues/7169

Try to run cargo install with the parameter --locked (docs). It looks like just another case of rust-lang/cargo#7169

Yup. cargo install --locked trunk seems to work well for me. @thedodd should we update the docs perhaps, to avoid confusion?

Try to run cargo install with the parameter --locked (docs). It looks like just another case of rust-lang/cargo#7169

Yup. cargo install --locked trunk seems to work well for me. @thedodd should we update the docs perhaps, to avoid confusion?

@macthestack thanks for the report! And @MartinKavik thanks for the quick response with the fix.
@rakshith-ravi that sounds perfect, thanks for jumping on the PR! I'll give it an eye and merge it real quick.
@macthestack before we close this issue, do you mind just verifying that @MartinKavik 's recommendation works for you as well?

@macthestack thanks for the report! And @MartinKavik thanks for the quick response with the fix.
@rakshith-ravi that sounds perfect, thanks for jumping on the PR! I'll give it an eye and merge it real quick.
@macthestack before we close this issue, do you mind just verifying that @MartinKavik 's recommendation works for you as well?

Thanks for the responses and the fix. Yes, it works! :+1:

Thanks for the responses and the fix. Yes, it works! :+1:

Doesn't compile using 1.51.0-nightly (04caa632d 2021-01-30)
I just tried to install trunk using cargo install trunk --locked, and got:

Cargo warnings
warning: package `arc-swap v0.4.7` in Cargo.lock is yanked in registry `crates.io`, consider running without --locked
warning: package `async-h1 v2.1.3` in Cargo.lock is yanked in registry `crates.io`, consider running without --locked
warning: package `miow v0.2.1` in Cargo.lock is yanked in registry `crates.io`, consider running without --locked
warning: package `net2 v0.2.35` in Cargo.lock is yanked in registry `crates.io`, consider running without --locked
warning: package `socket2 v0.3.15` in Cargo.lock is yanked in registry `crates.io`, consider running without --locked

Error messages
error: internal compiler error: failed to process buffered lint here
  --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/trunk-0.7.4/src/pipelines/rust_worker.rs:37:9
   |
37 |         bail!(r#"the rust web worker asset type `<link data-trunk rel="rust-worker" .../>` is not yet supported"#)
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: delayed at /rustc/04caa632dd10c2bf64b69524c7f9c4c30a436877/compiler/rustc_lint/src/early.rs:384:18
   = note: this error: internal compiler error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: internal compiler error: failed to process buffered lint here
  --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/trunk-0.7.4/src/pipelines/mod.rs:69:18
   |
69 |   ...   _ => bail!(
   |  ____________^
70 | | ...       r#"unknown <link data-trunk .../> attr value `rel="{}"`; please ensure the value is lowercase and is a supported asset type"#,
71 | | ...       rel.as_ref()
72 | | ...   ),
   | |_______^
   |
   = note: delayed at /rustc/04caa632dd10c2bf64b69524c7f9c4c30a436877/compiler/rustc_lint/src/early.rs:384:18
   = note: this error: internal compiler error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: internal compiler error: failed to process buffered lint here
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/trunk-0.7.4/src/pipelines/mod.rs:152:21
    |
152 |             None => bail!("asset has no file name {:?}", &path),
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: delayed at /rustc/04caa632dd10c2bf64b69524c7f9c4c30a436877/compiler/rustc_lint/src/early.rs:384:18
    = note: this error: internal compiler error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: internal compiler error: failed to process buffered lint here
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/trunk-0.7.4/src/pipelines/mod.rs:156:21
    |
156 |             None => bail!("asset has no file name stem {:?}", &path),
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: delayed at /rustc/04caa632dd10c2bf64b69524c7f9c4c30a436877/compiler/rustc_lint/src/early.rs:384:18
    = note: this error: internal compiler error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: internal compiler error: failed to process buffered lint here
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/trunk-0.7.4/src/pipelines/mod.rs:160:21
    |
160 |             None => bail!("asset has no file extension {:?}", &path),
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: delayed at /rustc/04caa632dd10c2bf64b69524c7f9c4c30a436877/compiler/rustc_lint/src/early.rs:384:18
    = note: this error: internal compiler error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued', compiler/rustc_errors/src/lib.rs:974:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.51.0-nightly (04caa632d 2021-01-30) running on x86_64-unknown-linux-gnu

note: compiler flags: -C opt-level=3 -C panic=abort -C lto=fat -C codegen-units=1 --crate-type bin

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
error: failed to compile `trunk v0.7.4`, intermediate artifacts can be found at `/tmp/cargo-installF8U3nP`

After some experimenting and compiling trunk versions back till 0.4, I found out that it's actually a bug (rust-lang/rust#81531) in nightly (I guess I should have listened to the error messages). So, when someone has the nightly toolchain set as default, trunk will not compile (currently version 1.51.0).
To fix it, just run:
# If stable is not installed
# rustup toolchain install stable
cargo +stable install trunk --locked

(Btw: stable does not resolve the Cargo warnings)

Doesn't compile using 1.51.0-nightly (04caa632d 2021-01-30)
I just tried to install trunk using cargo install trunk --locked, and got:

Cargo warnings
warning: package `arc-swap v0.4.7` in Cargo.lock is yanked in registry `crates.io`, consider running without --locked
warning: package `async-h1 v2.1.3` in Cargo.lock is yanked in registry `crates.io`, consider running without --locked
warning: package `miow v0.2.1` in Cargo.lock is yanked in registry `crates.io`, consider running without --locked
warning: package `net2 v0.2.35` in Cargo.lock is yanked in registry `crates.io`, consider running without --locked
warning: package `socket2 v0.3.15` in Cargo.lock is yanked in registry `crates.io`, consider running without --locked

Error messages
error: internal compiler error: failed to process buffered lint here
  --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/trunk-0.7.4/src/pipelines/rust_worker.rs:37:9
   |
37 |         bail!(r#"the rust web worker asset type `<link data-trunk rel="rust-worker" .../>` is not yet supported"#)
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: delayed at /rustc/04caa632dd10c2bf64b69524c7f9c4c30a436877/compiler/rustc_lint/src/early.rs:384:18
   = note: this error: internal compiler error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: internal compiler error: failed to process buffered lint here
  --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/trunk-0.7.4/src/pipelines/mod.rs:69:18
   |
69 |   ...   _ => bail!(
   |  ____________^
70 | | ...       r#"unknown <link data-trunk .../> attr value `rel="{}"`; please ensure the value is lowercase and is a supported asset type"#,
71 | | ...       rel.as_ref()
72 | | ...   ),
   | |_______^
   |
   = note: delayed at /rustc/04caa632dd10c2bf64b69524c7f9c4c30a436877/compiler/rustc_lint/src/early.rs:384:18
   = note: this error: internal compiler error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: internal compiler error: failed to process buffered lint here
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/trunk-0.7.4/src/pipelines/mod.rs:152:21
    |
152 |             None => bail!("asset has no file name {:?}", &path),
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: delayed at /rustc/04caa632dd10c2bf64b69524c7f9c4c30a436877/compiler/rustc_lint/src/early.rs:384:18
    = note: this error: internal compiler error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: internal compiler error: failed to process buffered lint here
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/trunk-0.7.4/src/pipelines/mod.rs:156:21
    |
156 |             None => bail!("asset has no file name stem {:?}", &path),
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: delayed at /rustc/04caa632dd10c2bf64b69524c7f9c4c30a436877/compiler/rustc_lint/src/early.rs:384:18
    = note: this error: internal compiler error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: internal compiler error: failed to process buffered lint here
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/trunk-0.7.4/src/pipelines/mod.rs:160:21
    |
160 |             None => bail!("asset has no file extension {:?}", &path),
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: delayed at /rustc/04caa632dd10c2bf64b69524c7f9c4c30a436877/compiler/rustc_lint/src/early.rs:384:18
    = note: this error: internal compiler error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued', compiler/rustc_errors/src/lib.rs:974:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.51.0-nightly (04caa632d 2021-01-30) running on x86_64-unknown-linux-gnu

note: compiler flags: -C opt-level=3 -C panic=abort -C lto=fat -C codegen-units=1 --crate-type bin

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
error: failed to compile `trunk v0.7.4`, intermediate artifacts can be found at `/tmp/cargo-installF8U3nP`

After some experimenting and compiling trunk versions back till 0.4, I found out that it's actually a bug (rust-lang/rust#81531) in nightly (I guess I should have listened to the error messages). So, when someone has the nightly toolchain set as default, trunk will not compile (currently version 1.51.0).
To fix it, just run:
# If stable is not installed
# rustup toolchain install stable
cargo +stable install trunk --locked

(Btw: stable does not resolve the Cargo warnings)


use transform_for_execution to get callable for torch compile

Fixes #1040
Note that back in the day, @IvanYashchuk added a comment about suspected bugs preventing this approach:
https://github.com/Lightning-AI/lightning-thunder/blob/7c1f94ab64e0103ced14696da8fb1652e830ab6d/thunder/executors/torch_compile.py#L69-L85
Now I seem to get good results with just calling transform_for_execution with only the torchex as int the executors_list. Maybe the bugs have been fixed since.

Seems I hit the exact problem that Ivan described.

Turns out that here, it seems the problem was that the region_trace was not enough of a proper trace to work.
Note that the region trace still does not have unpack_trivial at the top.
Maybe we should either forego regions entirely in favour of traces or have a utility region->trace that does it.

Merging, but don't hesitate to scream if you don't like it. :wink:

Maybe we should either forego regions entirely in favour of traces

Yes, that would be nice. Regions look like subclasses of TraceCtx with positional-only arguments and automatic identification of arguments and outputs.


how to use StringArrayP?

var subproject *[]string

subproject = flag.StringArrayP("subproject", "s", make([]string, 0), "The sub project names.")

when i input:
go build && ./mdocker new --project frp  --subproject 456 123 432

it shows:
[456 456]

but not
[456 123 432]

Hi @snowdream, thanks for the issue!  Unfortunately, I am not able to reproduce your results.
I reproduced your code in Go Playground, and found that it returns [456].  This is as designed, because Array flags must have the flag name repeated with each element, such as:
go build && ./mdocker new --project frp  --subproject 456 --subproject 123 --subproject 432

A closer syntax to your example would use StringSliceP, which allows you to separate elements by commas, such as:
go build && ./mdocker new --project frp  --subproject 456,123,432

go build && ./mdocker new --project frp  --subproject 456 --subproject 123 --subproject 432

frp
[456 123 432 456 123 432]

when i use StringSliceP.
go build && ./mdocker new --project frp  --subproject 456,123,432

frp
[456 123 432 456 123 432]

package cmd

import (
	"fmt"

	"github.com/spf13/cobra"

	flag "github.com/spf13/pflag"
)

var maintainer *string
var entrypoint *string
var expose *string
var license *string
var volume *[]string
var env *[]string
var arg *[]string
var project *string
var subproject *[]string
var workdir *string
var onbuild *[]string
var stopsignal *string
var healthcheck *string
var copy *[]string
var add *[]string
var run *[]string
var label *[]string
var cmd *string
var shell *[]string
var user *string
var verbose *bool

func init() {
	rootCmd.AddCommand(newCmd)

	maintainer = flag.StringP("maintainer", "m", "", "The MAINTAINER instruction sets the Author field of the generated images.")

	entrypoint = flag.StringP("entrypoint", "e", "", "An ENTRYPOINT allows you to configure a container that will run as an executable.")

	expose = flag.StringP("expose", "P", "", "An ENTRYPOINT allows you to configure a container that will run as an executable.")

	license = flag.StringP("license", "L", "mit", "A licenses for the project.")

	env = flag.StringSliceP("env", "E", make([]string, 0), "The ENV instruction sets the environment variable <key> to the value <value>.")

	arg = flag.StringSliceP("arg", "A", make([]string, 0), "The ARG instruction defines a variable that users can pass at build-time to the builder with the docker build command using the --build-arg <varname>=<value> flag. ")

	volume = flag.StringSliceP("volume", "V", make([]string, 0), "The VOLUME instruction creates a mount point with the specified name.")

	verbose = flag.BoolP("verbose", "v", false, "verbose output.")

	project = flag.StringP("project", "p", "helloworld", "The root project name.")

	subproject = flag.StringSliceP("subproject", "s", make([]string, 0), "The sub project names.")

	workdir = flag.StringP("workdir", "w", "", "The WORKDIR instruction sets the working directory for any RUN, CMD, ENTRYPOINT, COPY and ADD instructions that follow it in the Dockerfile.")

	onbuild = flag.StringSliceP("onbuild", "o", make([]string, 0), "The ONBUILD instruction adds to the image a trigger instruction to be executed at a later time, when the image is used as the base for another build.")

	stopsignal = flag.String("stopsignal", "", "The STOPSIGNAL instruction sets the system call signal that will be sent to the container to exit. ")

	healthcheck = flag.StringP("healthcheck", "H", "", "The HEALTHCHECK instruction tells Docker how to test a container to check that it is still working. ")

	copy = flag.StringSliceP("copy", "c", make([]string, 0), "The COPY instruction copies new files or directories from <src> and adds them to the filesystem of the container at the path <dest>.")

	add = flag.StringSliceP("add", "a", make([]string, 0), "The ADD instruction copies new files, directories or remote file URLs from <src> and adds them to the filesystem of the image at the path <dest>.")

	run = flag.StringSliceP("run", "r", make([]string, 0), "The RUN instruction will execute any commands in a new layer on top of the current image and commit the results. ")

	label = flag.StringSliceP("label", "l", make([]string, 0), "The LABEL instruction adds metadata to an image. ")

	cmd = flag.StringP("cmd", "C", "", "The main purpose of a CMD is to provide defaults for an executing container. ")

	shell = flag.StringSliceP("shell", "S", make([]string, 0), "The main purpose of a CMD is to provide defaults for an executing container. ")

	user = flag.StringP("user", "u", "", "The USER instruction sets the user name (or UID) and optionally the user group (or GID) to use when running the image and for any RUN, CMD and ENTRYPOINT instructions that follow it in the Dockerfile. ")

	flag.Parse()
}

var newCmd = &cobra.Command{
	Use:   "new",
	Short: "Create new dockerfiles for you.",
	Long:  `Create new multi architecture dockerfiles for you.`,
	Run: func(cmd *cobra.Command, args []string) {
		main()
	},
}

func main() {

	fmt.Println(*project)
	fmt.Println(*subproject)
}

I tried with something like your code and didn't see the problem (though I had to make it package main and drop rootCmd, and I can't use your code on goplayground, since you do the flag.Parse() inside init().    But I don't see your problem. For example:
$ ./test --subproject 456,123,432
helloworld
[456 123 432]
$ ./test --subproject 123 --subproject 456 --subproject 231
helloworld
[123 456 231]

If your command line, somehow, getting parse twice? Maybe once by cobra and once explicitly by you? I didn't think that was possible, but it's the only thing that comes to mind offhand.  Because the code you posted here worked for me on go 1.13.1

I tried with something like your code and didn't see the problem (though I had to make it package main and drop rootCmd, and I can't use your code on goplayground, since you do the flag.Parse() inside init(). But I don't see your problem. For example:
$ ./test --subproject 456,123,432
helloworld
[456 123 432]
$ ./test --subproject 123 --subproject 456 --subproject 231
helloworld
[123 456 231]

If your command line, somehow, getting parse twice? Maybe once by cobra and once explicitly by you? I didn't think that was possible, but it's the only thing that comes to mind offhand. Because the code you posted here worked for me on go 1.13.1

ok，thank you , i will check it later.

I was able to reproduce
package main

import (
        "fmt"
        "github.com/spf13/cobra"
        flag "github.com/spf13/pflag"
)

var subproject *[]string
func init() {
        subproject = flag.StringSliceP("subproject", "s", make([]string, 0), "The sub project names.")
        flag.Parse()
}

var rootCmd = &cobra.Command{
        Use: "root",
        Run: func(cmd *cobra.Command, args []string) {
                fmt.Println(*subproject)
        },
}

func main() {
        rootCmd.Execute()
}

Removing the flag.Parse() makes it behave as expected. I'm not sure if running flag.Parse twice is allowed.

I was able to reproduce
package main

import (
        "fmt"
        "github.com/spf13/cobra"
        flag "github.com/spf13/pflag"
)

var subproject *[]string
func init() {
        subproject = flag.StringSliceP("subproject", "s", make([]string, 0), "The sub project names.")
        flag.Parse()
}

var rootCmd = &cobra.Command{
        Use: "root",
        Run: func(cmd *cobra.Command, args []string) {
                fmt.Println(*subproject)
        },
}

func main() {
        rootCmd.Execute()
}

Removing the flag.Parse() makes it behave as expected. I'm not sure if running flag.Parse twice is allowed.

thank you .

> go build && ./mdocker new --project frp  --subproject 456,123,432

@therealmitchconnors sorry for diving in this old issue but is there any chance that this could get updated to work with spaces not just commas?


[FLOC 3313] Split CLI doc before changing Fig reference

In the original PR for https://github.com/ClusterHQ/flocker/pull/2070, it was decided that for ease of review that the contents of the CLI doc (docs/control/CLI/configuration.rst) should be split into smaller documents. When this is merged then we can complete FLOC 2744 to change instances of Fig to docker-compose.
This PR split the original doc into 3 sub-topics: application config, fig config and deployment config. The original doc is used as a menu for these sub-topics

Thanks.
Looks split up to me.  Go ahead and merge.


Add introduction guide for profiling with eBPF and a simple project

Hello,
I wrote an introduction guide to profiling leveraging frame pointers with eBPF  [1]. The guide references a simple profiler I wrote [2] for learning purposes, and it's part two of a series [3] about profiling with frame pointers.
Because there are a lot of excellent profilers but at that time I wanted to write a simple one to study, I named it Yet Another Profiler (YAP). The profiler supports as of now ELF binaries that are not stripped, and that are compiled with frame pointers.
The guide [1] and the project [2] could be a companion for people willing to learn in this field of observability and eBPF.
Let me know what you think :-)
Thank you.
[1] https://blog.maxgio.me/posts/unleashing-power-frame-pointers-writing-simple-continuous-profiler/
[2] https://github.com/maxgio92/yap
[3] https://blog.maxgio.me/posts/unleashing-power-frame-pointers-execution-environment/

Hi, sorry for the delay, I meant to reply and then it slipped out of my mind.
The blog posts are interesting, nice! I'm OK to add a link if you're willing to do a PR. I would maybe not add a link to the GitHub repo itself, given that it's linked from the blog posts already.

Sorry for my delay @qmonnet. Here's the just opened PR #114


Demo page from README.md and docs is not available

Thanks for this awesome project!
I've found a small issue:
https://hexdocs.pm/makeup/1.1.0/readme.html#demo
points to
https://tmbb.github.io/makeup_demo/
which gives 404

@tomekowal can you please send a PR to update the links to https://elixir-makeup.github.io/makeup_demo/ ?


Ink background not working in a CustomScrollView with animation.

Steps to Reproduce
When Ink in  a CustomScrollView with animation, the ink background not working.

Click the Click me to switch status tile to reproduce.
See demo or flowing code.

Code sample
Scaffold(
  appBar: AppBar(
    // Here we take the value from the MyHomePage object that was created by
    // the App.build method, and use it to set our appbar title.
    title: Text(widget.title),
  ),
  body: CustomScrollView(
      // Center is a layout widget. It takes a single child and positions it
      // in the middle of the parent.
      slivers: [
        SliverToBoxAdapter(
          child: Ink(
            color: Colors.amber,
            child: Column(
              children: [
                GestureDetector(
                  onTap: () {
                    setState(() => isExpanded = !isExpanded);
                  },
                  child: const ListTile(
                    title: Text('Click me to switch status'),
                  ),
                ),
                const ListTile(title: Text('2')),
                ExpandSection(
                    isExpanded: isExpanded,
                    child: Column(
                      children: const [
                        ListTile(title: Text('3')),
                        ListTile(title: Text('4')),
                        ListTile(title: Text('5')),
                        ListTile(title: Text('6')),
                      ],
                    )),
              ],
            ),
          ),
        ),
      ]),
)

Expected results:

Actual results:

flutter doctor -v
[✓] Flutter (Channel stable, 3.0.5, on macOS 11.5.1 20G80 darwin-x64, locale zh-Hans-CN)
    • Flutter version 3.0.5 at /Users/chengshuai/.asdf/installs/flutter/3.0.5-stable
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f1875d570e (6 weeks ago), 2022-07-13 11:24:16 -0700
    • Engine revision e85ea0e79c
    • Dart version 2.17.6
    • DevTools version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc3)
    • Android SDK at /Users/chengshuai/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0-rc3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • CHROME_EXECUTABLE = /Users/chengshuai/google-chrome-unsafe

[✓] Android Studio (version 2021.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

• No issues found!

I can reproduce this issue in stable and master. I moved the Ink to the same widget as the AnimationController since I initially thought that it was because the Ink was only getting rebuilt once on click of the GestureDetector. In the GIF, you can see that it's updating on Hot Reload.

Screenshot

Code Sample
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        // This is the theme of your application.
        //
        // Try running your application with "flutter run". You'll see the
        // application has a blue toolbar. Then, without quitting the app, try
        // changing the primarySwatch below to Colors.green and then invoke
        // "hot reload" (press "r" in the console where you ran "flutter run",
        // or simply save your changes to "hot reload" in a Flutter IDE).
        // Notice that the counter didn't reset back to zero; the application
        // is not restarted.
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatelessWidget {
  const MyHomePage({Key? key, required this.title}) : super(key: key);

  final String title;

  @override
  Widget build(BuildContext context) {
    // This method is rerun every time setState is called, for instance as done
    // by the _incrementCounter method above.
    //
    // The Flutter framework has been optimized to make rerunning build methods
    // fast, so that you can just rebuild anything that needs updating rather
    // than having to individually change instances of widgets.
    return Scaffold(
      appBar: AppBar(
        // Here we take the value from the MyHomePage object that was created by
        // the App.build method, and use it to set our appbar title.
        title: Text(title),
      ),
      body: CustomScrollView(
        // Center is a layout widget. It takes a single child and positions it
        // in the middle of the parent.
        slivers: [
          SliverToBoxAdapter(
            child: Column(
              children: [
                ExpandSection(
                  child: Column(
                    children: const [
                      ListTile(title: Text('3')),
                      ListTile(title: Text('4')),
                      ListTile(title: Text('5')),
                      ListTile(title: Text('6')),
                    ],
                  ),
                ),
              ],
            ),
          ),
        ],
      ),
    );
  }
}

class ExpandSection extends StatefulWidget {
  final Duration duration;
  final Curve curve;
  final Widget child;
  final AnimationStatusListener? onStatusChanged;

  const ExpandSection({
    super.key,
    this.duration = kThemeAnimationDuration,
    this.curve = Curves.fastOutSlowIn,
    required this.child,
    this.onStatusChanged,
  });

  @override
  State<ExpandSection> createState() => _ExpandSectionState();
}

class _ExpandSectionState extends State<ExpandSection>
    with SingleTickerProviderStateMixin {
  bool isExpanded = false;
  late AnimationController animation;

  @override
  void initState() {
    super.initState();
    animation = AnimationController(
      value: isExpanded ? 1.0 : 0.0,
      vsync: this,
      duration: widget.duration,
    )
      ..addStatusListener(
        (status) {
          widget.onStatusChanged?.call(status);
        },
      )
      ..addListener(() => setState(() {}));
  }

  @override
  void didUpdateWidget(ExpandSection oldWidget) {
    super.didUpdateWidget(oldWidget);
    if (widget.duration != oldWidget.duration) {
      animation.duration = widget.duration;
    }
  }

  @override
  void dispose() {
    animation.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Ink(
      color: Colors.amber,
      child: Column(
        children: [
          GestureDetector(
            onTap: () {
              isExpanded = !isExpanded;

              if (isExpanded) {
                animation.forward();
              } else {
                animation.reverse();
              }
            },
            child: const ListTile(
              title: Text('Click me to switch status'),
            ),
          ),
          const ListTile(title: Text('2')),
          SizeTransition(
            axisAlignment: 1.0,
            sizeFactor: CurvedAnimation(parent: animation, curve: widget.curve),
            child: widget.child,
          ),
        ],
      ),
    );
  }
}

flutter doctor -v (Stable)
[✓] Flutter (Channel stable, 3.0.5, on Microsoft Windows [Version 10.0.22000.856], locale en-IN)
    • Flutter version 3.0.5 at C:\Users\Nabeel Parkar\fvm\versions\stable
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f1875d570e (6 weeks ago), 2022-07-13 11:24:16 -0700
    • Engine revision e85ea0e79c
    • Dart version 2.17.6
    • DevTools version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at C:\android-sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • CHROME_EXECUTABLE = C:\Program Files\BraveSoftware\Brave-Browser\Application\brave.exe

[✓] Visual Studio - develop for Windows (Visual Studio Community 2022 17.2.6)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.2.32630.192
    • Windows 10 SDK version 10.0.19041.0

[✓] Android Studio (version 2021.2)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)

[✓] IntelliJ IDEA Ultimate Edition (version 2022.2)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA 2022.2
    • Flutter plugin version 69.0.5
    • Dart plugin version 222.3739.24

[✓] VS Code (version 1.70.2)
    • VS Code at C:\Users\Nabeel Parkar\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.46.0

[✓] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.22000.856]
    • Chrome (web)      • chrome  • web-javascript • unknown
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 104.0.1293.54

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

flutter doctor -v (Master)
[✓] Flutter (Channel master, 3.1.0-0.0.pre.2403, on Microsoft Windows [Version 10.0.22000.856], locale en-IN)
    • Flutter version 3.1.0-0.0.pre.2403 on channel master at C:\Users\Nabeel Parkar\fvm\versions\master
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision a10c921aba (3 hours ago), 2022-08-21 23:44:38 -0400
    • Engine revision d311584c79
    • Dart version 2.19.0 (build 2.19.0-120.0.dev)
    • DevTools version 2.16.0

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at C:\android-sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • CHROME_EXECUTABLE = C:\Program Files\BraveSoftware\Brave-Browser\Application\brave.exe

[✓] Visual Studio - develop for Windows (Visual Studio Community 2022 17.2.6)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.2.32630.192
    • Windows 10 SDK version 10.0.19041.0

[✓] Android Studio (version 2021.2)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)

[✓] IntelliJ IDEA Ultimate Edition (version 2022.2)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA 2022.2
    • Flutter plugin version 69.0.5
    • Dart plugin version 222.3739.24

[✓] VS Code (version 1.70.2)
    • VS Code at C:\Users\Nabeel Parkar\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.46.0

[✓] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.22000.856]
    • Chrome (web)      • chrome  • web-javascript • unknown
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 104.0.1293.54

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

@exaby73 - is this an instance of the problem outlined in the troubleshooting section of https://api.flutter.dev/flutter/material/InkWell-class.html under The ink splashes aren't visible!?

@HansMuller If that was the case, wouldn't it be invisible even after a hot reload? I tried adding a Material above Ink as instructed in the last paragraph of said section, but could reproduce it same behavior.

Yes, that's true. The source of the problem must be something else.

@exaby73 Hi, any update? This problem bothers me.

Hello @sososdk. Instead of asking for updates, you can upvote the issue. See https://github.com/flutter/flutter/wiki/Issue-hygiene#thumbs-up-reactions

Same problem


Let's remove the ft_stkpeektop function to make possible segfaults more apparent

The top of the stack should always be the head of the list.
If that's not the case, the ft_stk functions would be used incorrectly.


How are demographic attributes obtained?

Hi, thanks for the nice work!
As mentioned in the paper: "We provide the sex-ratio across ages in Fig. 3(d), as we can see PMC- OAis approximately gender-balanced, with 54% males". I wonder how are the age and sex attributes obtained, and how can I get access to them? The current open-sourced dataset doesn't seem to have these information. Many thanks!

Hello, thanks for your interest in our work.
We actually use regrex expressions to match those patients' age and gender mentioned in corpus. We didn't release that since it's just a statistic analysis of our dataset.

Got it. Is possible to release the code for the regex matches? Thanks!

It's temporary code for analysis, so I didn't keep that in the repo.
But the gist is to match strs like a 33 year old man ..., in such case, the regrex is a ^[0-9]* year old man.
Hope this message helpful to you.


Docker compose file for 64-bit systems

The current docker-compose files can be executed on a 32-bit system (like a Raspberry Pi). However, the official mariadb docker images are only available for 64-bit systems. Thus, I currently use the jsurf/rpi-mariadb image to be able to host a mariadb on a Pi.
A finding from #97 is that this 32-bit image does not support env variables like MYSQL_ROOT_PASSWORD_FILE (reference)  that are essential for providing a Docker secret to the DB container.
A new 64-bit specific compose file with the official mariadb image should be created.

This is currently blocked by the non-availability of Raspberry Pi 4 hardware. 🤷♂


AEROGEAR-1981 - API Documentation using Javadoc

Motivation
JIRA: https://issues.jboss.org/browse/AEROGEAR-1981
Description
Review and update the JavaDocs and adding in SanityCheck.nonNull() from the Core SDK where appropriate.
Progress

[x] Refactor JavaDocs
[x] Add in nonNull() sanity checks

@ziccardi removed javadocs from private fields and only added a comment if a parameter can be null.
@wei-lee @secondsun mind having another look please

@rachael-oregan Can you rebase on master and fix the conflicts?

@wei-lee @ziccardi @secondsun mind having another look please

@ziccardi mind having another look please

@secondsun mind having another look please?


better default colour scheme

@daniellenewby has opinions :)
instead of current default: theme = NULL,

I think @elinrow was working on a default theme: #113
I think we should close one of the issues to not have duplicated stuff


fix(events): update small things on rendering events

:tada: This PR is included in version 1.40.1 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


SMA Bug in v0.12.1 ?

package main

import (
	"fmt"
	"time"

	"github.com/sdcoffey/big"
	"github.com/sdcoffey/techan"
)

func calcSma(series *techan.TimeSeries, days int) []big.Decimal {
	closePrices := techan.NewClosePriceIndicator(series)
	sma := techan.NewSimpleMovingAverage(closePrices, days)

	cnt := len(series.Candles)
	ret := make([]big.Decimal, cnt)
	for idx := range ret {
		ret[idx] = sma.Calculate(idx)
	}
	return ret
}

func main() {
	series := techan.NewTimeSeries()
	for i := 1; i <= 30; i++ {
		day := time.Date(2020, 5, i, 0, 0, 0, 0, time.Local)
		candle := techan.NewCandle(techan.TimePeriod{
			Start: day,
			End:   day.Add(time.Duration(23) * time.Hour),
		})

		candle.ClosePrice = big.NewDecimal(float64(100 + i))
		added := series.AddCandle(candle)
		if !added {
			fmt.Println("AddCandle failed")
			return
		}
	}

	indicators := calcSma(series, 10)
	fmt.Println("SMA:", indicators)
}

with version 0.12.0
module main

go 1.17

require (
	github.com/sdcoffey/big v0.7.0
	github.com/sdcoffey/techan v0.12.0
)

the program run result is:
SMA: [101 101.5 102 102.5 103 103.5 104 104.5 105 105.5 106.5 107.5 108.5 109.5 110.5 111.5 112.5 113.5 114.5 115.5 116.5 117.5 118.5 119.5 120.5 121.5 122.5 123.5 124.5 125.5]
I think above result is correct, but with v0.12.1
 module main

go 1.17

require (
	github.com/sdcoffey/big v0.7.0
	github.com/sdcoffey/techan v0.12.1
)

the result is:
SMA: [0 0 0 0 0 0 0 0 0 105.5 106.5 107.5 108.5 109.5 110.5 111.5 112.5 113.5 114.5 115.5 116.5 117.5 118.5 119.5 120.5 121.5 122.5 123.5 124.5 125.5]
I think the initial 0s are incorrect.
Is this a bug or a new feature?

@shkim this should be the actual output for SMA: [0 0 0 0 0 0 0 0 0 105.5 106.5 107.5 108.5 109.5 110.5 111.5 112.5 113.5 114.5 115.5 116.5 117.5 118.5 119.5 120.5 121.5 122.5 123.5 124.5 125.5]. Zero will appear for index < period and from period itself mean value will appear based on the calculation.


How to set the padding  width between  arrow and the icon

Hello, May I ask what you use for displaying those icons?
I can see 2 spaces here.
NERDTree only puts one space between the directory arrow and the rest of it.
The extra space here is introduced by those icons.
As for the space from NERDTree, there is no option available to remove this space.

Hi, rzvxa
I use ryanoasis/vim-devicons plugin.

I also use vim-devicons, there is no option in either of these 2 plugins to remove that extra space when they are working together.
Fun Fact: The icon you see is called a flag, And NERDTree actually shows the flag inside of brackets [ ] like this:

vim-devicons uses a special hackish way to conceal these brackets using syntax highlighting with this code:
function! s:setSyntax()
  if g:webdevicons_enable_nerdtree == 1 && g:webdevicons_conceal_nerdtree_brackets == 1
    augroup webdevicons_conceal_nerdtree_brackets
      au!
      autocmd FileType nerdtree syntax match hideBracketsInNerdTree "\]" contained conceal containedin=NERDTreeFlags
      autocmd FileType nerdtree syntax match hideBracketsInNerdTree "\[" contained conceal containedin=NERDTreeFlags
      autocmd FileType nerdtree syntax match hideBracketsInNerdTree "\]" contained conceal containedin=NERDTreeLinkFile
      autocmd FileType nerdtree syntax match hideBracketsInNerdTree "\]" contained conceal containedin=NERDTreeLinkDir
      autocmd FileType nerdtree syntax match hideBracketsInNerdTree "\[" contained conceal containedin=NERDTreeLinkFile
      autocmd FileType nerdtree syntax match hideBracketsInNerdTree "\[" contained conceal containedin=NERDTreeLinkDir
      autocmd FileType nerdtree setlocal conceallevel=3
      autocmd FileType nerdtree setlocal concealcursor=nvic
    augroup END
  endif
endfunction

So in theory you should also be able to conceal those extra spaces.
Or even patch one of these 2 plugins for your use case and remove the spacing in them.
TL;DR There is no way to change this padding behavior.

Thanks a lot, look like a good solution, I will try it later tonight


defaultValues does not work with

https://jsfiddle.net/yth50vsf/
Console reports:

Uncaught TypeError: Cannot read property 'set' of undefined

Ok, definitely a bug, I will look into this.
Thanks :smiley:

Any update on this?

hey sorry, I've been consumed with other projects and let this fall to the wayside. Yea the "show" callback will provide the opportunity for workarounds.
If interested in a PR, the addition would be to the file src/jquery.input.js which creates a common interface for all the supported input types


Puppet 4 update

Use new data types, probably break backwards compatibility in the process. Also add the necessary puppet-strings markup.

Only missing data type is now probably something for ACL entries which are still just a string.


Suggestion: Add a [Explore Data Folder] button

If possible, add a button that opens up the Data folder so you can browse it without the need to manually open a Explorer window

I was thinking on moving the Build selector to the configuration/settings tab and adding some buttons at the top for doing some operations.

Good news! There is now a Browse button on the side of the Data Folder selector.

It was implemented on f811ca6fb9ece274298a9387dda5a19bc4629667, so you can either use an AppVeyor Beta Build or wait for a stable release.


Bugfix unneeded weekend session retrieval

Fixes #72

@bashopman This is a very valuable fix, do you want me to fix these conflicts and merge it?


[BUG] NULL Handling

Describe the bug
We modified how NULLS are handled for single column hashes in #3. We now need to revert this change because it causes unpredictability when it comes to hashing consistency. This also causes problems because NULL values become 'hidden' behind a hash of '^^', causing NULL values to sneak in where they are unwanted (in Hubs, for example).
For Hashdiffs we want this behaviour, but not in primary keys.
To Reproduce
Steps to reproduce the behaviour:

Use the hash or multi-hash macro on a single string

Expected behaviour
When I hash multiple columns, I expected the following:
Values: 1001, 1002, NULL, 1003
Hashed outcome: #1001 || #1002 || #^^ || #1003
When I hash a single column (not a HASHDIFF) I expect the following:
Value: NULL
Hashed outcome: NULL
When I hash a single column (and it is a HASHDIFF) I expect the following:
Value: NULL
Hashed outcome: #^^
This will be fixed in the next release, 0.6.

Fixed in dbtvault v0.6


How can I set the constraints?

For the segmentedControl there isn't a storyboard option, so I am obliged to use the constraints via code...
But how I do it??
Please Help....

Have you had a look at the example project?
There are both storyboard and code examples there.

Closing due to inactivity.


Minimum Dart version is too high

The minimum Dart version supported by this package is 2.14.4. Does the package use any language features that are not supported in earlier versions? If not,  v2.12.0 would be ideal as any version before it doesn't support null safety.
https://github.com/bsutton/fixed/blob/main/pubspec.yaml#L7

I've just pushed 1.0.3.
The dart Moon is now 2.12.
On Sat, 27 Nov 2021, 11:13 am Britannio Jarrett, @.***>
wrote:

The minimum Dart version supported by this package is 2.14.4. Does the
package use any language features that are not supported in earlier
versions? If not, v2.12.0 would be ideal as any version before it doesn't
support null safety.
https://github.com/bsutton/fixed/blob/main/pubspec.yaml#L7
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/bsutton/fixed/issues/6, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAG32OAIUQWAFWV35QUEDG3UOAPCRANCNFSM5I3RDRGA
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Thanks!


Add support for explicitly specifying connections as IPv4-only, IPV6-only or "auto"

See also:

GH-166
GH-170
https://github.com/emersion/go-imap/issues/434

The initial "fix" for this will be to filter the IP Addresses of the remote servers to just the specified type, or "auto". If the user doesn't opt to specify one of tcp4 or tcp6, the prior behavior from GH-170 of attempting to connect to each IP Address is applied.
From GH-178:

Later efforts may expand upon this initial implementation in
order to override the go-imap/client.(Dialer).Dial() method
behavior so that we can ignore the hardcoded tcp (auto)
value and apply an explicit tcp4, tcp6 or tcp network
choice.

I started in that direction, but at this point it may be overkill for our needs. As noted, I may revisit this later if this initial hotfix doesn't resolve the problem.

Note: If we later run into issues with valid detections of IPv4 and IPv6 addresses, the code snippet here may prove relevant:
import strings

func IsIPv4(address string) bool {
    return strings.Count(address, ":") < 2
}

func IsIPv6(address string) bool {
    return strings.Count(address, ":") >= 2
}


Runtime is broken for Deno version 1.6.x

Running vercel-deno runtime works fine for default version, but bumping it to recent version (1.6.3) returns NO_RESPONSE_FROM_FUNCTION
log report from vercel:
[GET] /

Check file:///var/task/.runtime.ts
error: Read-only file system (os error 30) (for '"/var/task/.deno/gen/file/var/task/.runtime.ts.buildinfo"')
RequestId: df133447-d543-4ad6-b9e0-58b9d0f16d6c Error: Runtime exited with error: exit status 1
Runtime.ExitError

Any Idea why? My guess is that they changed their buildinfo in 1.6.x

Ya, I haven't had time to look into it yet. It's frustrating that these cache files change so frequently. It's a constant cat and mouse game. Will definitely try to get to it soon, but PR welcome if someone happens to figure out what changed in the meantime.

Ya, I haven't had time to look into it yet. It's frustrating that these cache files change so frequently. It's a constant cat and mouse game. Will definitely try to get to it soon, but PR welcome if someone happens to figure out what changed in the meantime.

I heard that they’ll gonna release new version 1.7.0 tomorrow. I’ll try check it out later.

I heard that they’ll gonna release new version 1.7.0 tomorrow. I’ll try check it out later.

1.7.2 seems okay

Indeed! 1.8.0 works as well. I'm gonna close this as wontfix since the current version of Deno works.


url_title() accents support

At the moment url_title() breaks when using accents.
For example:
<?php
$string = 'Café';
echo url_title($string, '-', TRUE); // Returns caf
echo convert_accented_characters($string); // Returns Cafe

This change will convert the accents so a proper url title is returned.
echo url_title($string, '-', TRUE); // Returns cafe

I totally agree with the fact that url_title() should convert accented characters. I don't see any case where such characters shouldn't be converted.

I totally agree with the fact

The worlds big problem today - people think facts are things they agree with. Literally everything about this issue is opinions, preferences, agreements and disagreements; not facts.
For the last time - just use the two functions together if you need to.


Enforce Job Processor settings validation

Description
The Clara Creaet AE Title Web API does not validate processor settings until it is loaded by the CRD watcher.
PR introduces new ProcessorValidationAttribute attribute to decorate each derived JobProcessorBase class with a new IJobProcessorValidator interface to enforce validation when the API is called.
Status
Ready/Work in progress/Hold
Types of changes

[x] Non-breaking change (fix or new feature that would not break existing functionality).
[X] Breaking change (fix or new feature that would cause existing functionality to change).
[X] New tests added to cover the changes.
[X] All tests passed locally by running ./src/run-tests-in-docker.sh.
[X] Documentation comments included/updated.
[X] User guide updated.
[ ] NGC publishing metadata updated.
[X] I have updated the changelog

Codecov Report

Merging #17 into main will not change coverage.
The diff coverage is n/a.

@@              Coverage Diff              @@
##                main         #17   +/-   ##
=============================================
  Coverage   59.57926%   59.57926%
=============================================
  Files             52          52
  Lines           2662        2662
  Branches         264         264
=============================================
  Hits            1586        1586
  Misses           965         965
  Partials         111         111

Continue to review full report at Codecov.

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


[feature request] Cocoapods

Would be handy to have it as a cocoa pod.

Is this still an issue? Would be nice, if you could add swifter to cocoapods

It seems Swift is supported with Cocoapods these days. Maybe adding this to the pod library would be nice. For now a git submodule works. But well, a pod is a tad neater.


Influxdb0.9 line protocol and tags

This does't require any chances on statsd site as other solution. It works by appending tag into metric name, and parse metric name to write tags.
First, disable sanity key checking on config.js of statsd. Then write metric in this format:
metricname#tag1=val1,tag2=val2:value|metrictype|@samplerate

does this method support spaces in the tag values using double quotes?

Also a question but it seems that you accept only lowercase values, no space, no extra characters is that correct ? Any reason why ?
I also have to test because i can't find how you accept more than one tag based on the regex line 513

Tags are really useful. I hope this PR gest merged soon.


Does react-redux-grid tree gridtype support paging?

Hi,
I noticed that when working with a flat list, there is support for paging in the react-redux-grid control.  Is paging supported when the grid type is set to tree?
Thank you!

Currently, that is not supported :(

I'm not sure the use case for paging a tree makes a whole lot of sense. Going to close this out. Please let me know if you have more info about why we'd want to support this?

I would benefit from paging in the scenario where either a) the top level of the tree or b) any child node's direct children has a lot of breadth.  Say, several thousands of nodes wide.  In that case, lazy loading of child nodes on expand doesn't help because the tree would be loading a very large number of nodes at the same time -- either to populate the top level of the tree or to populate the many children of a just expanded node.  The lazy loading helps where the tree doesn't have a lot of breadth, but can be very deep.
A virtualized dom (where all the content is not inserted into the dom on load, but rather when needed for viewing a particular portion of the tree) increases performance and decreases the memory footprint.  But in case of a tree of wide breadth, without paging, even with a virtualized dom you're still loading a lot of data into some memory store on the browser (which is not the dom).  This can take both  a lot of memory in the browser and put a lot of pressure on the server to prepare that big chunk of data.  Additionally, a lot data needs to be sent across the wire, in a single batch.
Paging would solve this problem, by loading a subset of the data as needed.  As an alternative to paging, an infinite loading approach where more data is pulled in as the user scrolls would also work.  Note that for this option to be successful, it would need to take a sliding window approach such that previously loaded content is eventually evicted from the browser memory cache.  Failure to do so would result in too much memory being consumed as the user continues to scroll down.


Add link to TS cheatsheet under "React Basics" page

This is the link I want to add: https://react-typescript-cheatsheet.netlify.app/
I think it can just be added to the other list of resources in that section, below the 'NO BS TS' link.

Under which section?

React fundamentals
Misc
Free resources and tutorials

Ok got it, shall I work on this issue?

@Rishav1707 Whoops, should've been more clear. I actually want this link under the TypeScript section.
I just meant on the React Basics page. I understand it's confusing because the name of the page is React Basics, but there's also a section called "React Basics" on the page. Trying to make this clearer with https://github.com/ericdiviney/react-handbook/issues/56