openssl with curl make random unix time

hello
i have a problem with openssl when i make request with curl(compiled with openssl) in client Hello in random i give random unix time like this :

and when i use this line code :
SSL_CTX_set_options(ctx, SSL_MODE_SEND_CLIENTHELLO_TIME);
It makes no difference
please help me , how can i set my current client time ?

no one can't help me?

Probably a curl question.
A good bug or question will provide a more detailed context  : OS, distro, version of related libs, reproduction steps ...
So you can not expected a good answer without a good background.

and when i use this line code :
SSL_CTX_set_options(ctx, SSL_MODE_SEND_CLIENTHELLO_TIME);
It makes no difference

SSL_MODE_SEND_CLIENTHELLO_TIME is a mode not an option. Therefore you need to use SSL_CTX_set_mode instead of SSL_CTX_set_options.

how can i set my current client time ?

But why would you want to? This mode was introduced a long time ago to deal with (according to the comment in the header file) "...compatibility with hypothetical implementations that require it...". I'm not actually aware that any such implementations really exist.

when i use curl with winssl or curl with mbedtls it's show me real time but when use curl with openssl it's show me random time!!
no way to show real time with openssl?(if need some change in source code can you tell me to change it for my special work?)
thanks

when i use curl with winssl or curl with mbedtls it's show me real time but when use curl with openssl it's show me random time!!

And why does this matter? This is just an implementation difference between different libraries. There are many differences between implementations but they should not impact interoperability.

no way to show real time with openssl?

Yes you can. As I tried to explain in my previous post you can do this using SSL_MODE_SEND_CLIENTHELLO_TIME and SSL_CTX_set_mode (but NOT SSL_CTX_set_options as you were attempting). I'm just questioning why you would want to do this and why it matters.

thanks it's work
my server need real client time for this i need this mode thanks


The default port 8080 cannot work

The npm run dev command can run without any problem, but i can see nothing in the browser with localhost:8080.
The lsof command shows:
lsof -i :8080
COMMAND   PID   USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
node    24732 Calvin   24u  IPv4 0xb6920191477c7e03      0t0  TCP localhost:http-alt (LISTEN)

So i'm sure no other applications bind this port, when i change the port in dev-server.js to 8090, it worked.

What OS are you on?

i can see nothing in the browser with any ports.
The lsof command shows:
lsof -i :8080
COMMAND PID   USER   FD   TYPE            DEVICE SIZE/OFF NODE NAME
node    829 buuyii   26u  IPv6 0x6fcfabd1b9b0999      0t0  TCP localhost:http-alt (LISTEN)

In build/dev-server.js, try changing app.listen(8080, 'localhost', function () { ... }) to just app.listen(8080, function () { ... }).

@yyx990803 Great, it works, but can you explain why to remove the 'localhost' option? I did some search but still cannot figure it out :(

I am using the simple-webpack template. No built/dev-server.js can be found.

the same problem when using the simple-webpack template

This issue has gotten a little stale and it seems to be chronicling problems with two separate templates, so I'm closing. If anyone is still experiencing a problem (or has found a solution to a problem), please post an issue or pull request for the appropriate template here. :smiley:

On Windows 10, I had the same with 8080 already in use.  After vue init webpack I was unable to start the build server with error : EADDRINUSE.
In the config folder, index.js file I changed the de object, port key to 8081 and it fixed it for me.
Changed from:
dev: {
env: require('./dev.env'),
port: 8080,
autoOpenBrowser: true,
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {},
// CSS Sourcemaps off by default because relative paths are "buggy"
// with this option, according to the CSS-Loader README
// (https://github.com/webpack/css-loader#sourcemaps)
// In our experience, they generally work as expected,
// just be aware of this issue when enabling this option.
cssSourceMap: false
}
to:
dev: {
env: require('./dev.env'),
port: 8081,
autoOpenBrowser: true,
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {},
// CSS Sourcemaps off by default because relative paths are "buggy"
// with this option, according to the CSS-Loader README
// (https://github.com/webpack/css-loader#sourcemaps)
// In our experience, they generally work as expected,
// just be aware of this issue when enabling this option.
cssSourceMap: false
}

If you're using vue init webpack-simple {{project_name}} with vue-cli, also checkout node_modules >> webpack-dev-server >> bin >> webpack-dev-server.js line 62 for the port number.

This is one of those things that seems odd to me. Why not make it dynamic so it finds an open port on it's own? it's pretty easy implementation.

@adi518 I think a PR would be welcome and should indeed be easy using portfinder.

@chrisvfritz Done.

When using the webpack-simple template, you can add a "port" property to the devServer object in webpack.config.js and assign it to whatever value you want, like so:
devServer: {     historyApiFallback: true,     noInfo: true,     port: 9080   },

This issue might be closed, but i found a work around for the same issue using webpack-simple.
OS: Mac OS X
Using: vue init webpack-simple
/node_modules/webpack-dev-server/bin/webpack-dev-server.js
line#: 210
host: {
type: 'string',
// default: 'localhost',
default: '<IP_ADDRESS>',
describe: 'The hostname/ip address the server will bind to',
group: CONNECTION_GROUP
},
changed: 'locahost' to '127.0.01'
save the file.
npm run dev
<IP_ADDRESS>:8080 works fine.

this page is one of the top search results on google.
Is there an option, via env variable or similar, to set the base listening port?
changing this in a file in node_modules doesn't seem right.

Under node_modules? how did you come with that? :)
It's right here.

Cool,  good to know.  Was just learning vue and related frameworks. Couldn't find any solution and that worked for me.  Thanks for the suggestion.

i take a vue project from git and when i run it .it gives me http://<IP_ADDRESS>:8080/sockjs-node  and the project is not in this link

If you're using vue init webpack-simple {{project_name}} with vue-cli, also checkout node_modules >> webpack-dev-server >> bin >> webpack-dev-server.js line 62 for the port number.

But there is nothing except '}' in line 62

Do this:
1.remove your Node.js and again install latest version here link to install Node.js
2.On the installation path choose npm package manager and install
3.open cmd and inter

npm install -g @vue/cli

4.after install vue cli (Previous step)inter to cmd

vue create name-app

after some minutes (It depends on how fast your internet is) be sure You have the correct
installation

6.so inter in cmd

npm run serve

7.the you'll see localhost page Local host:http://localhost:8080/) code here`


Adding to docs

Is there a way we can add an example in the docs of passing a function as a prop?
For example in a child component how would we pass a function in an onChange event to the parent component?

Could you give me a code example of what you are working with right now?

Typically you don't pass props from child to parent, instead you want to move the state into the parent component. There's a little bit of a dated article from Dan Abramov that starts everyone in this direction. Worth the read imo
https://medium.com/@dan_abramov/smart-and-dumb-components-7ca2f9a7c7d0

const ComponentA = ReactElement((props) => {
const { onChangeHandler } = props
return Div([
{
id: 'Component-A',
},
Input({
placeholder: 'Enter Your Phone Number',
value: phoneNumber,
onChange(e) {
onChangeHandler(e.target.value)
},
}),
])
})
export default ComponentA
const ComponentB = ReactElement((props) => {
return Div([
{
id: 'Component-B',
},
ComponentB({onChangeHandler: console.log('hello')})
])
})
export default ComponentB
In this example every time onChange is triggered I want to console.log('hello). How would I do this correctly?

So you're on the right track all you need is to make the handler a function in ComponentB (the parent component)
const ComponentB = ReactElement((props) => {
  return Div([
    {
      id: 'Component-B',
    },
    ComponentA({onChangeHandler: () => console.log('hello')})
  ])
})

This works perfectly! Thanks!


Design a vector(SVG) logo for this project

Please design a vector logo for this project.
The logo must contain the project name 'videohash'.
You must release the logo under the MIT License(same license as the project).
I want the output in SVG and PNG formats. The logo must be transparent(the background) and should be professional.
Examples of logos of some real projects that I like. The new logo can be of a similar design but MUST NOT be exactly copied.

https://commons.wikimedia.org/wiki/File:OpenCV_Logo_with_text_svg_version.svg
https://commons.wikimedia.org/wiki/File:TensorFlowLogo.svg
https://commons.wikimedia.org/wiki/File:NumPy_logo_2020.svg

Both the PNG and SVG formats should be inside the assets directory in the pull request.
This issue is not gonna get assigned before you open a pull request but the one I like the most is gonna be selected. Please open a pull request only if you are good at making vector logos. Thank you!

You can ask your questions here.

Here are some idea sketches for the logo:

Design notes:
The top is more abstract and dynamic while the logos at the bottom are more detailed but less creative.
The similarity between two videos is the central theme of the logos. The color green is used to convey this. The other colors are based on the substractive color model.
1,2,3:
The three first logos explore different color palettes. The first two are pretty similar but for the first one the "outside" colors are saturated and for the second one the inverse, the color in the middle is the one that is saturated. The yellow may be changed since it pops out a bit too much on a dark background. The third one has a more calm palette.
The colors on the rest of the sketches are not final, just to indicate the placement.
The first three are based on the hashtag symbol. The parallel lines aren't placed in a way to have equal "outside triangles". This would give the logo a more star-like shape and make the two video frames less clear. The contrast between the small and big triangles create some dynamism in the design.
4,5,6: some other options regarding the film roll lengths. But these don't look as good as the first ones so I didn't develop them further.
This design however could create confusion regarding the bigger angle than 10 degrees limitation of the software.
7,8,9:
To find an alternative that hasn't this problem, the three last logos were designed with a horizontal arrangement. The overlap of the two videos is smaller, because else they could be interpreted as a layer effect instead of two separate files.
The video play button can have multiple meanings here. Links of similar things between the two videos, or a zoom on a specific part of the video. The last logo is even more literal, being closer to the real analog object.
These logos are less innovative. There is a high probability of other logos having similar designs. Though two video frames together is a simple concept and would be difficult to be considered as plagiarism.
Having the examples of logos you liked in mind, I think the first three are the most suitable. They have in common a dynamic composition with a lot of angles.

The name VideoHash should be added in the final design.
Concerning the SVG format, I plan to use a graphical vector editor and optimise the files with a program meant for that.
What your requirements for making good vector logos are is unclear to me. If my process isn't what you are looking for and you except that the SVG code itself gets edited, it would be better if somebody more experienced in that language carries on with making the logo.
That's it for today,
Sorry for the long text

Thank you for the clarifications.
I will proceed now with making a vector version of the first design and report back here.

The colors may have some tweaking, they look quite different on my screens, so I am unsure about it. Edit: maybe make the text blue so that it's more visible in dark mode
Tell me what you think

I like the one on the top left. And the font color should not be black because of the issue with dark mode but blue or purple.


Remove react

React is a decent library for doing somethings, but interop between WebComponents and other bits just isn't all that great sadly, which can cause issues.

This will remove react from the dependencies, and all react based components have now been rewritten to use WebComponents (or simply return an appropriate dom object).
In certain places that make sense (list views, etc) elements are not recreated but reused and only updated if the row it references is now different.
Highlight element was previously unused, now will pool text editor instances, and only free up excess editors that are no longer needed anymore.
Also this adds in the enhanced highlighting support for Find Usages that has been sitting around, as I had finally found a good way to get it in with these changes.

yay no more react :+1:
Will review tomorrow if someone does not beat me to it.
Also, can we now move back to vue :trollface:

Less magic! imo :8ball:

LGTM :+1: enhanced highlighting in find usages is hot :)


update mac client url

https://techcommunity.microsoft.com/t5/Enterprise-Mobility-Security/New-Remote-Desktop-app-for-macOS-available-in-the-App-Store/ba-p/250450

@guoliang-dev : Thanks for your contribution! The author, @cynthn, has been notified to review your proposed change.

#sign-off


error: n_neighbors is not an integer vector

Hi,
is the number of nearest neighbors still a parameter? If I try to run the data from the vignette with for example n = 15, I get the following error:
densmap(data[, 1:2], dens_frac = 0.5, dens_lambda = 0.5, n_neighbors = 15)
Error: n_neighbors is not an integer vector

Any insights would be much appreciated. : )

The package was doing overly strict checking, because when calling python from R, python would recognise 15 as a floating point number and 15L as an integer. I've relaxed these checks, so now if you pass in 15 the package will internally convert into an integer.
Note this was the case for n_components, n_neighbors, n_epochs, local_connectivity, negative_sample_rate, and random_state

Hi,
thanks for the crazy quick reply.
Unfortunately, there seems to be another issue (uninstalled the old version from Bioconductor and installed again from github).
fit1 <- densmap(data[, 1:2], dens_frac = 0.5, dens_lambda = 0.5)
Error: assert_that: assertion must return a logical value

On another note: is there a way to parallelize this? i.e. through Biocparallels?

Ah sorry yeah, mistake in the code for int checking.
densmap leans on the python umap library, which apparently has multi-CPU support, though I don't know the details beyond that. BiocParallel wouldn't be useful unless you want to calculate multiple UMAPs on different threads
https://umap-learn.readthedocs.io/en/latest/faq.html#is-there-gpu-or-multicore-cpu-support

That seems to have done the trick.
Curiouse, scran has a UMAP implementation that is able to multi-thread via BiocParallel, but maybe its running an R implementation (I thought its also running python under the hood9. But thanks.
Final follow-up:
The densmap looks something like this. What parameter is best to reduce the extreme values? i.e. to avoid these extreme x and y coordinates of only a handful of cells. Normal UMAP as comparison.
Densmap

UMAP

Curiouse, scran has a UMAP implementation that is able to multi-thread via BiocParallel, but maybe its running an R implementation (I thought its also running python under the hood9. But thanks.

I think you mean scater? That's as far as I know only used for the KNN calculation. And yeah it's using uwot::umap not python's umap.
https://github.com/alanocallaghan/scater/blob/d14427e6778fb1c8b6f4d2ff590b6869e7efbd3a/R/runUMAP.R#L85-L90

The densmap looks something like this. What parameter is best to reduce the extreme values? i.e. to avoid these extreme x and y coordinates of only a handful of cells. Normal UMAP as comparison.

Not a clue really, I've not really played with densmap in a while but I don't ever remember seeing extreme values like that. I'd considering first setting the dens_frac to zero to see if it's a general problem with these UMAP settings on these data, then adjust any repulsion settings (the UMAP docs are pretty good), then try to adjust convergence criteria

Ok, thanks. I'll play a bit around with it. : )


[Discussion] Can I reduce the file's size?

The size of the file increases by more than 10 times after the conversion. Can I solve this?

I'm not sure of your problem, but my guess is that your input 128k mp3 or so to spleeter and it outputs wav (default behaviour).
As mentioned in the help of spleeter (spleeter separate -h), you can export files to other formats and set the bitrate with the following options:
  -c {wav,mp3,ogg,m4a,wma,flac}, --codec {wav,mp3,ogg,m4a,wma,flac}
                        Audio codec to be used for the separated output
  -b BITRATE, --birate BITRATE
                        Audio bitrate to be used for the separated output

So the following command should produce much smaller files:
spleeter separate -i audio_example.mp3 -c mp3 -b 128k

How to use this on Python API Level?

How to use this on Python API Level?

I recently contributed to this wrapper script that might help manage spleeter both RAM and HDD space concerns in general: https://github.com/amo13/spleeter-wrapper


Failure when deploying second stack with AWS interactive provider

I get a traceback when attempting to deploy two stacks (second depends on the first) with the new interactive option (but not without it). The first stack deploys successfully, but the second doesn't even start.
Running from master at 3604de9e4e67ebd572941ce9ccc3b2e25cb28908.
[2016-08-21T04:20:32] Using Interactive AWS Provider
[2016-08-21T04:20:32] Plan Status:
[2016-08-21T04:20:32] 	cobli-auth: pending
[2016-08-21T04:20:32] 	cobli-vpn:  pending
[2016-08-21T04:20:32] Tailing stack: cobli-auth
[2016-08-21T04:20:44] [cobli-auth] CREATE_IN_PROGRESS AWS::S3::Bucket
[2016-08-21T04:20:44] [cobli-auth] CREATE_IN_PROGRESS AWS::S3::Bucket Resource creation Initiated
[2016-08-21T04:21:05] [cobli-auth] CREATE_COMPLETE AWS::S3::Bucket
[2016-08-21T04:21:10] [cobli-auth] CREATE_IN_PROGRESS AWS::IAM::ManagedPolicy
[2016-08-21T04:21:10] [cobli-auth] CREATE_IN_PROGRESS AWS::IAM::Policy
[2016-08-21T04:21:10] [cobli-auth] CREATE_IN_PROGRESS AWS::IAM::ManagedPolicy Resource creation Initiated
[2016-08-21T04:21:10] [cobli-auth] CREATE_COMPLETE AWS::IAM::ManagedPolicy
[2016-08-21T04:21:10] [cobli-auth] CREATE_IN_PROGRESS AWS::IAM::ManagedPolicy
[2016-08-21T04:21:10] [cobli-auth] CREATE_IN_PROGRESS AWS::IAM::Policy Resource creation Initiated
[2016-08-21T04:21:10] [cobli-auth] CREATE_COMPLETE AWS::IAM::Policy
[2016-08-21T04:21:10] [cobli-auth] CREATE_IN_PROGRESS AWS::IAM::ManagedPolicy Resource creation Initiated
[2016-08-21T04:21:10] [cobli-auth] CREATE_COMPLETE AWS::IAM::ManagedPolicy
[2016-08-21T04:21:13] Tailing stack: cobli-vpn
Traceback (most recent call last):
  File "/home/danielkza/venv/bin/stacker", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/home/danielkza/venv/src/stacker/scripts/stacker", line 9, in <module>
    args.run(args)
  File "/home/danielkza/venv/src/stacker/stacker/commands/stacker/build.py", line 52, in run
    dump=options.dump)
  File "/home/danielkza/venv/src/stacker/stacker/actions/base.py", line 125, in execute
    self.run(*args, **kwargs)
  File "/home/danielkza/venv/src/stacker/stacker/actions/build.py", line 301, in run
    plan.execute()
  File "/home/danielkza/venv/src/stacker/stacker/plan.py", line 251, in execute
    if not self._single_run():
  File "/home/danielkza/venv/src/stacker/stacker/plan.py", line 219, in _single_run
    status = step.run()
  File "/home/danielkza/venv/src/stacker/stacker/plan.py", line 72, in run
    return self._run_func(self.stack, status=self.status)
  File "/home/danielkza/venv/src/stacker/stacker/actions/build.py", line 184, in _launch_stack
    provider_stack = self.provider.get_stack(stack.fqn)
  File "/home/danielkza/venv/src/stacker/stacker/providers/aws/default.py", line 101, in get_stack
    kwargs=dict(StackName=stack_name))['Stacks'][0]
  File "/home/danielkza/venv/src/stacker/stacker/providers/aws/default.py", line 69, in retry_on_throttling
    retry_checker=_throttling_checker)
  File "/home/danielkza/venv/src/stacker/stacker/util.py", line 57, in retry_with_backoff
    return function(*args, **kwargs)
  File "/home/danielkza/venv/lib/python2.7/site-packages/botocore/client.py", line 159, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/home/danielkza/venv/lib/python2.7/site-packages/botocore/client.py", line 483, in _make_api_call
    operation_model, request_dict)
  File "/home/danielkza/venv/lib/python2.7/site-packages/botocore/endpoint.py", line 117, in make_request
    return self._send_request(request_dict, operation_model)
  File "/home/danielkza/venv/lib/python2.7/site-packages/botocore/endpoint.py", line 146, in _send_request
    success_response, exception):
  File "/home/danielkza/venv/lib/python2.7/site-packages/botocore/endpoint.py", line 219, in _needs_retry
    caught_exception=caught_exception, request_dict=request_dict)
  File "/home/danielkza/venv/lib/python2.7/site-packages/botocore/hooks.py", line 227, in emit
    return self._emit(event_name, kwargs)
  File "/home/danielkza/venv/lib/python2.7/site-packages/botocore/hooks.py", line 210, in _emit
    response = handler(**kwargs)
  File "/home/danielkza/venv/lib/python2.7/site-packages/botocore/retryhandler.py", line 183, in __call__
    if self._checker(attempts, response, caught_exception):
  File "/home/danielkza/venv/lib/python2.7/site-packages/botocore/retryhandler.py", line 251, in __call__
    caught_exception)
  File "/home/danielkza/venv/lib/python2.7/site-packages/botocore/retryhandler.py", line 266, in _should_retry
    return self._checker(attempt_number, response, caught_exception)
  File "/home/danielkza/venv/lib/python2.7/site-packages/botocore/retryhandler.py", line 314, in __call__
    caught_exception)
  File "/home/danielkza/venv/lib/python2.7/site-packages/botocore/retryhandler.py", line 223, in __call__
    attempt_number, caught_exception)
  File "/home/danielkza/venv/lib/python2.7/site-packages/botocore/retryhandler.py", line 356, in _check_caught_exception
    raise caught_exception
ssl.SSLError: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:1754)

Can you reproduce this?  It seems like this is an issue w/ SSL & the low level client in botocore, which gets called from the default provider (the interactive provider is a subclass of the default one, but calls many of the same methods, in this case it's calling providers/aws/default.py", line 69, in retry_on_throttling).

I can't reproduce it in a different machine (OS X 10.11.6, compared to Fedora 24 from the original report). I'll investigate it further.

This is reproducible in a second Fedora 24 machine. I have a reasonable guess that this is a thread-safety issue with reusing the Boto session in multiple processes, specifically in the background process that waits for the change set to be ready (boto/boto#3170).

Hey @danielkza - can you share the command line options you're using?  Thanks for this!

@phobologic  I believe this doesn't really depend on the options, but on some weird interaction between my Python version, SSL library version and/or Boto. Iḿ just doing stacker build production config.yml -i --tail.

Yeah, just want to make sure we have all the info.  I'm not sure if -i and --tail were programmed to be used together (@mhahn would know, he wrote both) but I don't think that's your issue.
It looks like this specific error is well known with multiprocessing when using the ssl module:
http://stackoverflow.com/questions/3724900/python-ssl-problem-with-multiprocessing
http://stackoverflow.com/questions/31768631/ssl-error-with-using-multiprocessing-and-sockets
Multiprocessing is only used with --tail as far as I know, not the -i interactive mode, so at least we can narrow the problem down a bit there.  Can you try it without --tail to verify that that is the issue?

Also, I think I have a fix for this - can you give the https://github.com/remind101/stacker/tree/fix_multiprocessing_shared_conn branch a try?  Here's what I changed:
diff --git a/stacker/providers/aws/default.py b/stacker/providers/aws/default.py
index 482565b..8dc00d0 100644
--- a/stacker/providers/aws/default.py
+++ b/stacker/providers/aws/default.py
@@ -1,5 +1,6 @@
 import json
 import logging
+import os
 import time

 import boto3
@@ -87,13 +88,15 @@ class Provider(BaseProvider):
     def __init__(self, region, **kwargs):
         self.region = region
         self._outputs = {}
+        self._cloudformation = {}

     @property
     def cloudformation(self):
-        if not hasattr(self, "_cloudformation"):
+        pid = os.getpid()
+        if pid not in self._cloudformation:
             session = boto3.Session(region_name=self.region)
-            self._cloudformation = session.client('cloudformation')
-        return self._cloudformation
+            self._cloudformation[pid] = session.client('cloudformation')
+        return self._cloudformation[pid]

     def get_stack(self, stack_name, **kwargs):
         try:

Basically we'll use a different client per process id.

I actually used almost exactly that code as quick fix, but I'd like to make it a little bit prettier for the PR, by adding a reset_session method to provider and having it passed as a callback to Plan. This way the problem will not surface again if something other than tail is added and it's easier to apply the same fix if clients for other AWS services are used in the future. What do you think?

I'm not sure what exactly reset_session would do (just generate a new session?) and when it would be called by Plan, so hard to say.  I think this keeps things relatively simple.
To be honest, as soon as multiprocessing was suggested, I got nervous because of these sorts of weird interactions.  Now I'm wondering if it's necessary, or if we could poll the tail between updates.

I'm not sure what exactly reset_session would do (just generate a new session?)

Set self._cloudformation to None.

and when it would be called by Plan, so hard to say. I think this keeps things relatively simple.

I added a callback parameter to Plan to be executed whenever a new process is spawned.

I'd be up for seeing a PR if you have an idea in the works.  Still really wondering if we could simplify multiprocessing out of the picture, but that's probably more work than this needs at the moment.

I think I ended up complicating things a bit too much while trying to properly test with multiprocessing. You can go ahead and merge your fix, since it will be much simpler. It might be wise to leave a comment about it and check if it doesn't behave strangely in testing.

I just tested your branch and it seems to work fine @phobologic. Just a small note looking at the code: it probably isn't necessary to keep a dictionary of sessions, as any single process should never have more than one session. Storing the PID observed when the session was created, and throwing it away if the PID changes should be enough.

I used multiprocessing initially since it was the simplest thing conceptually. We launch multiple stacks at the same time, so when implementing tailing, I thought we could just trigger a _tail_stack that was a 1 to 1 mapping with _launch_stack. Thus multiprocessing to trigger one process per stack to tail it.
I looked through it again, we could definitely simplify this by just having a single tail function that will loop through all the stacks it should be tailing and output their events.
I haven't been using tail recently, I'll spend some time thinking about some best practice ways to run stacker and then think about how I could simplify this.

Related: https://github.com/remind101/stacker/issues/151

Cool - @danielkza please checkout https://github.com/remind101/stacker/pull/208
Let me know if that works for you.  Thanks.


Moving rqt to pure python

To enable bundling of python scripts (rqt, rqt_gui) into executables on Windows and to significantly speed up build time, this PR converts rqt, rqt_gui and rqt_gui_py to ament_python packages.
This addresses issue https://github.com/ros-visualization/rqt/issues/166

The Python packages need to register themselves at the resource index as well as install their manifest file: see https://github.com/ros2/demos/blob/f2a1d9f5fe694a11fb42f3c036dacd130141ac0e/demo_nodes_py/setup.py#L10-L14 for an example.
Also since the patch removed all CMake based linters the Python packages need linter tests instead: see https://github.com/ros2/demos/tree/f2a1d9f5fe694a11fb42f3c036dacd130141ac0e/demo_nodes_py/test
The information in the setup.py files should match the existing information in the package.xml files: e.g. description, license, authors.
I haven't checked the entry points myself but it looks weird that they reference a main function in the rqt_gui.main module which doesn't exist - only a Main and a check for __main__?

Was this removed from the target branch after being merged?

@dirk-thomas It's been reopened here. For an unknown reason Mike can't build the package as it is.


creating contract multisig proposal

Thank you very much for your application. I trust Protofile has been a great builder, and the team has already proven the capability via Gnosis Safe EVM implementation.

This is under the infra track of our program and Hang from Phala is in charge of the technical review. I will ping him and let him work on this. cc @TtomaS7

Voted yes

The changes still don't include a proposal for a design of the underlying cryptographic scheme, please provide some overview what you actually want to implement. There are multiple designs for multisig that enables updating threshold and set of signers.

Hello @mike1729 ! Thank you for your question. To clarify, our approach will primarily be based on the existing model of the Gnosis Safe multi-sig wallet, but optimized for the Substrate environment using the ink! smart contract language. At first, we are NOT going to include a backend, we will solve every interaction transparently settling it on-chain using the smart contract.
Here's a high-level overview of the intended multisig scheme:
Initialization: The multisig wallet is initialized with a set of owners and a threshold. Each owner represents an individual account, and the threshold represents the minimum number of approvals required to execute a transaction.
Approval Collection: When a transaction is proposed, it needs to be approved or rejected by a certain number of owners. Each owner sends an extrinsic to vote for or against executing a transaction. This process will be done on-chain, and the resulting approvals will increase a counter until the threshold is met.
Transaction Execution: Once the threshold number of approvals is reached, the extrinsic will be executed.
Owner Management: To handle the dynamic addition or removal of owners, we propose a mechanism similar to regular transaction approval. A proposal for adding or removing an owner is created, which requires the threshold number of approvals from existing owners. Once the required number is met, the change is executed.
As for the cryptographic scheme for the signatures, we will use the existing extrinsics signature that’s already implemented in polkadot and the contracts pallet.
Please note that this is a high-level overview and the exact design will be fleshed out during the Discovery & PoC phase of our project. We understand the importance of security and efficiency in the design of such a system and plan to devote considerable time and effort to ensure our solution meets these requirements. We appreciate your patience, and we expect this response meets your expectations and look forward to answering any further questions.

I propose to split Milestone 1 - Discovery & PoC into two milestones: Milestone 1 - Specification that as a result has a specification of what you want to implement and you clearly specify which limitations of native multisig will be improved Milestone 2 - PoC

Thanks for your contribution and comments. We thought about splitting this phase into two, but we decided to go over the concept of "built to discover" instead of discover to build! Nonetheless, we will provide two deliverables: a specification document and a PoC feasibility. We don't find a precise point in splitting, but we may be missing something.

The precise point in splinting is that with products based on cryptography there is no space for trial and error. You produce a specification and implement it.

Hi @mike1729! We value your input and agree with the emphasis on clarity, especially when discussing cryptographic elements. Our smart contract project isn't designed to create new cryptographic systems but to leverage the existing ones within the Polkadot ecosystem.
The proposed multisig wallet, while not directly implementing new cryptographic techniques, relies on cryptographic operations provided by Polkadot for secure transaction signing and execution. In essence, the smart contract will manage multisig operations using the state of the contract, tracking approvals and executing transactions once a set threshold is met.
This process leans on the digital signatures generated by wallet owners, which are intrinsically tied to Polkadot's cryptographic infrastructure. While we're not building low-level cryptographic operations, our design depends on the cryptographic principles and mechanisms embedded in the Polkadot network for secure and validated transactions.
We apologize for any misunderstanding our initial descriptions may have caused, and we're grateful for your patience as we refine our explanations. In future communications, we commit to further enhancing our accuracy. Thank you for your constructive feedback and understanding.

Hey ! thanks for the application, could you indicate chosen category?

Hey ! thanks for the application, could you indicate chosen category?

Hi @0xMarkian, Sorry we didnt' add the category. Our project fits in the "Infrastructure" category.
Our project aims to build a multisig wallet using ink! that can interact with the Contract Pallet on any substrate chain, along with a user-friendly interface, it enhances the Polkadot/ink! ecosystem's developer infrastructure and tooling. This multisig wallet could also facilitate the creation of DAOs and enable individuals to securely manage cryptocurrency assets, which could be seen as an aspect of DAO tooling.

Hi @mike1729! We value your input and agree with the emphasis on clarity, especially when discussing cryptographic elements. Our smart contract project isn't designed to create new cryptographic systems but to leverage the existing ones within the Polkadot ecosystem. The proposed multisig wallet, while not directly implementing new cryptographic techniques, relies on cryptographic operations provided by Polkadot for secure transaction signing and execution. In essence, the smart contract will manage multisig operations using the state of the contract, tracking approvals and executing transactions once a set threshold is met. This process leans on the digital signatures generated by wallet owners, which are intrinsically tied to Polkadot's cryptographic infrastructure. While we're not building low-level cryptographic operations, our design depends on the cryptographic principles and mechanisms embedded in the Polkadot network for secure and validated transactions. We apologize for any misunderstanding our initial descriptions may have caused, and we're grateful for your patience as we refine our explanations. In future communications, we commit to further enhancing our accuracy. Thank you for your constructive feedback and understanding.

Hi @mike1729! I hope you're doing well. I wanted to follow up on the message we sent regarding the proposed multisig design. We would like to ensure that your doubts and questions are properly addressed.
If you have any remaining doubts or if there is any specific aspect you would like us to clarify further, please let us know.

Congratulations! We are thrilled to officially welcome you to the Ink!ubator program!! We can't wait to see the remarkable contributions you'll bring to the ecosystem.
In terms of the next steps, we are eagerly anticipating your first delivery, which is due in 4 weeks. When it’s ready, please create a PR here - https://github.com/use-inkubator/Grant-Milestone-Delivery
If you have any questions, concerns, or if you just want to brainstorm ideas, don't hesitate to reach out. We encourage you to utilize our Element channel for any inquiries - https://matrix.to/#/#sm-bounty-support:matrix.org
As you join the Ink!ubator family, please remember that you are not alone on this journey. We are here to support you every step of the way. We believe in your potential and we can't wait to see where this journey takes us all.
Congratulations once again and welcome aboard!

Congratulations! We are thrilled to officially welcome you to the Ink!ubator program!! We can't wait to see the remarkable contributions you'll bring to the ecosystem. In terms of the next steps, we are eagerly anticipating your first delivery, which is due in 4 weeks. When it’s ready, please create a PR here - https://github.com/use-inkubator/Grant-Milestone-Delivery
If you have any questions, concerns, or if you just want to brainstorm ideas, don't hesitate to reach out. We encourage you to utilize our Element channel for any inquiries - https://matrix.to/#/#sm-bounty-support:matrix.org
As you join the Ink!ubator family, please remember that you are not alone on this journey. We are here to support you every step of the way. We believe in your potential and we can't wait to see where this journey takes us all.
Congratulations once again and welcome aboard!

Thank you for welcoming Protofire to the Ink!ubator program and entrusting us with this project. We are incredibly grateful for the opportunity to contribute to the ecosystem. It’s truly exciting for us!
Although one of our developers is on holiday until the end of this week, we are committed to starting work immediately. We appreciate your understanding in this matter.
Once again, we want to express our gratitude for your trust and support. We eagerly look forward to collaborating with you and ensuring the success of this project.


Fix type checking error of infix operators

This fixes #61 .

Looks good, thanks!
Can you rebase your branch over main?

I think most (all?) of the issues should disapear once you rebase over main and apply formatting


Using x-tags with Brackets

Hello,
I'm testing the use of x-tags for an extension in Brackets that shows the clock inside the editor. To do this, I followed the Extensions examples and applied the basic x-clock code directly to the Extension I made. On Windows it works normally, but in Linux doesn't work.

elementaryOS:

Windows:

I was wondering if it would be a Brackets issue, or x-tags, or even OS, so I'm posting here first.`Thank you.
This is the error that shows in Brackets:

elementaryOS 0.4.1 Loki and/or Ubuntu 16.04
Release 1.9 experimental build 1.9.0-17312

If doesn't work on Linux, it is possibly related to the version of shell used there.
Brackets is still running Chrome 29 on Linux.

Got it. What I found weird is that x-tags' site tells that it supports all versions of Chrome.

I noticed that the shell used was an old one, although I opened DevTools inside my current Chrome, which has the updated version, not 29.
Is there any version of Brackets in Linux with newer shell? I can install via npm if necessary. Or a forecast for an update on Linux?

You could use https://github.com/zaggino/brackets-electron on Linux, which use electron as the shell instead of cef.
According to http://caniuse.com/#search=registerElement, registerElement is supported since Chrome 33.
But custom element were supported since Chrome 27 but behind a flag.
So maybe you can try to launch Brackets with that flag.
I think something like brackets --enable-experimental-web-platform-features
(I don't know if that will work, nor if the flag is correct...)
Probably @saurabh95 know the situation regarding the shell on Linux.

This should have been fixed by https://github.com/adobe/brackets-shell/pull/619
Now Linux build run on Chrome 51.


Enchantment glint change not working

I'm trying to change enchant glint on netherite helmet (tried other items and armor) like this:

installed mods also on screenshot
And it doesn't change at all:

logs:
latest.log
Mod is working with everything else (i can change textures and disable glint on everything using global properties)
i tried to change all glint to glow.png by putting it in misc, it did work.
Thanks in advance

The exact same setup as yours works perfectly fine for me.
Also your logs are not that useful, you don't seen to be loading the pack in them and there are some errors with other external things.
Try getting the logs again by launching the game, loading the pack and closing the game. Only then send the latest.log.

Sorry for the delay, i was away from pc.
latest.log like this?

Sorry for the delay.
Dont know what to tell you honestly.. The exact same setup on my end works perfectly fine and your logs dont say anything special about it breaking so everything should be fine in there..
I have to close the issue for now because it is not reproduceable. Do let me know if you find a way to replicate it elsewhere.


Fix of mirrors for release.sh

Currently builds are broken due to bad mirrors. This fixes the bad mirrors

/lgtm
/approve


true| false can not be used to create discriminated unions

TypeScript Version:  2.4.2
Code
Link to the playground
type One = {
  kind: true;
  foo: string;
}

type Two = {
  kind: false;
  foo: boolean;
}

type Options = One | Two;

const fn = (options: Options) => { /* ... */ };

const optionsOne = { kind: true, foo: 'bar' };

/**
 * ERROR:
 * Types of property 'kind' are incompatible.
 * Type 'boolean' is not assignable to type 'false'.
 */
fn(optionsOne);

/**
 * No Error.
 */
fn({ kind: true, foo: 'bar' })

Expected behavior: Should be possible to use true | false to create a discriminated union. It seems like true | false and boolean are not interchangeable.
Actual behavior: TypeScript does not widen the above kind to boolean and thus optionsOne can not be used as input for fn. (That's just my wild guess :-x) It's not possible to use true and false for discriminated unions.

This is working as intended. In the declaration of optionsOne you need some indication that you don't want the kind property widened. Absent that, the compiler widens the type because a property is a mutable location. You can add a type annotation to indicate your intent:
const optionsOne: One = { kind: true, foo: 'bar' };

Once you have a type annotation the object literal is contextually typed by that annotation and the compiler knows not to widen. For the same reason, there is no error in the call where you directly specify an object literal because the literal is contextually typed by the corresponding parameter type (Options) in the function.

Thanks for the quick and throughout explanation!
My actual use case for this was that I created typings for a library and wanted to have a strongly typed API. This is the original code that caused this issue:
// index.d.ts
declare module 'material-ui/List/ListItem' {
  import { ButtonBaseProps } from 'material-ui/internal/ButtonBase';

  interface ListItemCommonProps extends React.LiHTMLAttributes<HTMLLIElement> {
    component?: React.ReactNode;
    dense?: boolean;
    disabled?: boolean;
    disableGutters?: boolean;
    divider?: boolean;
  }

  export type ListItemDefaultProps = {
    button?: false;
  } & ListItemCommonProps;

  export type ListItemButtonProps = {
    button?: true;
  } & ListItemCommonProps &
    ButtonBaseProps;

  export type ListItemProps = ListItemDefaultProps | ListItemButtonProps;

  export default class ListItem extends MaterialUI.Component<ListItemProps> {}
}

And even casting didn't help here:
class DockedDrawer extends React.Component<{}, { docked: boolean }> {
  state = { docked: true }

  render() {
    const docked:true|false = this.state.docked;
    return (
      <Drawer
        anchor="bottom"
        open={true}
        docked={docked}
      >
        List
      </Drawer>
    );
  }

I thought I can use discriminated unions to only allow certain props on the component, depending on other props.

Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.


Error while running Docker

Hello,
I got the following errors. Please  let me  know how to solve the errors.
https://paste.ubuntu.com/p/BWv4CBDJsn/

sserver need a API server to download its user list. You can run this API server:
https://github.com/btccom/btcpool/tree/master/install/api-sample#how-to-quickly-create-a-web-server-based-on-the-script


docker.io/bluedata/cdh632multi:1.1 image is too large

The  image is too large, where I can found the Dockerfile of this image and I want to make it smaller.

PR #325 is about to update that image... are you using the new kdapp+image from that PR, or the current one in master?
In either case @omhpe would be the contact point since they are providing these images. I'm sure the Dockerfile can be shared.

@Pandoraemon Please find attached docker file. It is a zip, you can extract the file
Dockerfile.zip


OIC client and coap: Make contexts re-entrant to prevent double free (v2)

Fixes gh-2054
Signed-off-by: Gabriel Schulhof<EMAIL_ADDRESS>Changes:

Factored out the reentrant stuff into a header so it can be used in both sol-coap.c and sol-oic-client.c
Used the two-variable approach from @cabelitos
Moved the relevant sol_ptr_vector_remove() into pending_reply_free()

Replaces #2055.

@glima, @cabelitos, @vcgomes got a new version ready.

Kinda liking it. @cabelitos, this would fit uart code as well, right?

@glima Me too.
We should replicate this sol-reetrant in other parts as well!

I liked as well, just a couple of very minor stuff, and a question.

liked the approach a lot, thanks for taking the time to do it :-)
My main comment is about name: reentrant usually is assigned with threads and this is not thread-safe. I'm bad with names, so no suggestions on my side, sorry :-/
A secondary comment is to follow some of the sol-monitors and other names for members, so delete_me instead of stale. But that's minor.
If possible to avoid the cast to "reentrant", we can be safer and allow the reentrant to be anywhere in the structure, the booleans are usually best placed at the end due alignment needs being 1 byte (and if we pack both booleans using :1, the whole thing is one byte. Then the usage would be MACRO(hande, call) if the macro uses &(handle)->reentrant (fixed name, you can use another macro to declare it in the structure) or MACRO(&handle->reentrant, call) (flexible name, user gives the actual pointer).


Parse server does not include port number in file urls

Issue Description
Parse server does not include port number in file urls
Steps to reproduce
run a server on a port other than 80, lets say 8080
add a column with File type
upload a file and see the file url generated by parse, it does not have the port number
Expected Results
It should add the port number to the url
Ex. http://someurl.com:8080/parse/file/.......
Actual Outcome
right not the url looks like this"
http://someurl.com/parse/file/.......

You should set the 'publicServerUrl' option to the proper value, include the port if you need

Thanks @flovilmart I'll give it a try.
Is this documented anywhere?


how multiqc report bcbio % duplicated reads was calculated?

Hi,
thanks for developing such a great tool. After I ran an analysis, in the multiqc report html file, I found two columns, one is bcbio % duplicated reads , the other is fastqc % duplicated reads. For my sample, these two is quite different. My data is from a tumor Amplicon panel. I checked the log file, and cannot find the information for how  bcbio % duplicated reads was calculated. Please help me.
Thanks,
Hongen

Hi,
In this case, duplicated reads come from the samtools stats command and it is parsed from this line in the code:
https://github.com/bcbio/bcbio-nextgen/blob/master/bcbio/qc/samtools.py#L64
What is the difference are you seeing? What pipeline are you using in bcbio? In theory these two tools uses the same input, you can make a grep in the bcbio-nextgen-command.log to check the input of each of them and let us known just in case we are missing something.
Cheers

On Jul 22, 2018, at 11:54 AM, zzupmc<EMAIL_ADDRESS>wrote:
Hi,
thanks for developing such a great tool. After I ran an analysis, in the multiqc report html file, I found two columns, one is bcbio % duplicated reads , the other is fastqc % duplicated reads. For my sample, these two is quite different. My data is from a tumor Amplicon panel. I checked the log file, and cannot find the information for how bcbio % duplicated reads was calculated. Please help me.
Thanks,
Hongen
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub https://github.com/bcbio/bcbio-nextgen/issues/2461, or mute the thread https://github.com/notifications/unsubscribe-auth/ABi_HFqsQ6-rlIZfoUSQEBxDwznAf5ysks5uJKA7gaJpZM4VaC52.

Hi Lorena and Brad,
thanks for your explanation. For my case- Agilent clearseq cancer panel, bcbio % duplicated reads is about 90%, and I checked FastQC results (ran by myself with default setting), percent remaining if deduplicated 13%. They are quite close. But in the multiqc report of bcbio,   fastqc % duplicated reads is 40%. For fastqc, did you use a different threshold for defining a duplicate?
Hongen

Hongen -- as I mentioned above, I suspect the difference is due to bcbio downsampling the BAM file before running in FastQC. Since it's only using a portion of the file, it won't be the same as what you get from running manually on the full BAM. Beyond that bcbio just calls fastqc without any special tweaks. I'd suggest ignoring the fastqc summary stats in MultiQC because of the downsampling. Hope this helps.


OrbitApiTest.cpp triggres Werror=stringop-truncation

[ 32%] Building CXX object OrbitLinuxTracing/CMakeFiles/OrbitLinuxTracing.dir/ContextSwitchManager.cpp.o
In file included from /usr/include/string.h:519,
                 from /home/toni/.conan/data/gtest/1.10.0/_/_/package/ff3605ff2f853c7007f04e06ee5985ba114b4876/include/gtest/internal/gtest-port.h:250,
                 from /home/toni/.conan/data/gtest/1.10.0/_/_/package/ff3605ff2f853c7007f04e06ee5985ba114b4876/include/gtest/internal/gtest-internal.h:40,
                 from /home/toni/.conan/data/gtest/1.10.0/_/_/package/ff3605ff2f853c7007f04e06ee5985ba114b4876/include/gtest/gtest.h:62,
                 from /home/toni/Documents/source/orbit/OrbitBase/OrbitApiTest.cpp:5:
In function ‘char* strncpy(char*, const char*, size_t)’,
    inlined from ‘orbit_api::EncodedEvent::EncodedEvent(orbit_api::EventType, const char*, uint64_t, orbit::Color)’ at /home/toni/Documents/source/orbit/OrbitBase/include/OrbitBase/../../../Orbit.h:309:19,
    inlined from ‘virtual void OrbitApi_Encoding_Test::TestBody()’ at /home/toni/Documents/source/orbit/OrbitBase/OrbitApiTest.cpp:21:85:
/usr/include/bits/string_fortified.h:106:34: error: ‘char* __builtin_strncpy(char*, const char*, long unsigned int)’ output truncated copying 33 bytes from a string of length 43 [-Werror=stringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: some warnings being treated as errors
make[2]: *** [OrbitBase/CMakeFiles/OrbitBaseTests.dir/build.make:89: OrbitBase/CMakeFiles/OrbitBaseTests.dir/OrbitApiTest.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....

building commit 0183d7b9 with gcc10_release profile

and in gcc9 we have this after applying #2085 (maybe the right way here to disable this warning for gcc10?):
In function ‘char* strncpy(char*, const char*, size_t)’,
inlined from ‘orbit_api::EncodedEvent::EncodedEvent(orbit_api::EventType, const char*, uint64_t, orbit::Color)’ at /mnt/github/orbitprofiler/src/OrbitBase/include/OrbitBase/../../../Orbit.h:309:19,
inlined from ‘orbit_base::TracingScope::TracingScope(orbit_api::EventType, const char*, uint64_t, orbit::Color)’ at /mnt/github/orbitprofiler/src/OrbitBase/Tracing.cpp:33:44:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:34: error: ‘char* __builtin_strncpy(char*, const char*, long unsigned int)’ specified bound 34 equals destination size [-Werror=stringop-truncation]
106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
|          ^~~~~~~~~~~~~~

I have rebuilt main using gcc10 and I do not see this error. Please reopen the bug if you encounter it again.


using jax like numba on GPUs and CPUs

Per our discussion, here is an example of the kernel we tried to code in jax but could not figure out how to do so efficiently. It has a couple of nested loops.
This is a cuda version, but the CPU one looks much the same modulo start and stride stuff which lays out the data on the GPU effectively.
# for GPU timing using Numba
@cuda.jit
def count_weighted_pairs_3d_cuda(
        x1, y1, z1, w1, x2, y2, z2, w2, rbins_squared, result):
    start = cuda.grid(1)
    stride = cuda.gridsize(1)

    n1 = x1.shape[0]
    n2 = x2.shape[0]
    nbins = rbins_squared.shape[0]

    for i in range(start, n1, stride):
        px = x1[i]
        py = y1[i]
        pz = z1[i]
        pw = w1[i]
        for j in range(n2):
            qx = x2[j]
            qy = y2[j]
            qz = z2[j]
            qw = w2[j]
            dx = px-qx
            dy = py-qy
            dz = pz-qz
            wprod = pw*qw
            dsq = dx*dx + dy*dy + dz*dz

            k = nbins - 1
            while dsq <= rbins_squared[k]:
                cuda.atomic.add(result, k-1, wprod)
                k -= 1
                if k <= 0:
                    break

cc @mattjj @shoyer @aphearin

For cross-reference, when we did this numba to start, we found a big bottleneck that appears to have been fixed subsequently.
xref: https://github.com/numba/numba/issues/4647

Also to be clear, we don't want to use autodiff in this kernel, which I realize is outside of the A part of JAX. ;p

Just to make our lives easy: can you expand the example to something self-contained and runnable (e.g., generate some random numbers for inputs) and show what timing you got with the Numba version?
There are two paths we can go down in general here: try to make a fast JAX version, or try to integrate with Numba. Both are fine ways to go! JAX and Numba have different strengths and you can and should be able to integrate both, but it would be remiss of us not to look at the JAX performance!

Sure here you go!
import time

import numpy as np
from numba import njit

@njit
def count_weighted_pairs_3d_cpu(
        x1, y1, z1, w1, x2, y2, z2, w2, rbins_squared, result):
    n1 = x1.shape[0]
    n2 = x2.shape[0]
    nbins = rbins_squared.shape[0]

    for i in range(n1):
        px = x1[i]
        py = y1[i]
        pz = z1[i]
        pw = w1[i]
        for j in range(n2):
            qx = x2[j]
            qy = y2[j]
            qz = z2[j]
            qw = w2[j]
            dx = px-qx
            dy = py-qy
            dz = pz-qz
            wprod = pw*qw
            dsq = dx*dx + dy*dy + dz*dz

            k = nbins - 1
            while dsq <= rbins_squared[k]:
                result[k-1] += wprod
                k -= 1
                if k <= 0:
                    break

# parameters
npoints = 30000
n1 = npoints
n2 = npoints
n_try = 5

# make the data
rbins_squared = (np.logspace(
    np.log10(0.1/1e3), np.log10(40/1e3), 20)**2).astype(np.float32)
rng = np.random.RandomState(seed=42)
x1, y1, z1, w1 = rng.uniform(size=(4, n1)).astype(np.float32)
x2, y2, z2, w2 = rng.uniform(size=(4, n1)).astype(np.float32)

# array init
result = np.zeros_like(rbins_squared)[:-1].astype(np.float32)

# do once to compile the code
r = count_weighted_pairs_3d_cpu(x1, y1, z1, w1, x2, y2, z2, w2, rbins_squared, result)

t0 = time.time()
for _ in range(n_try):
    r = count_weighted_pairs_3d_cpu(
        x1, y1, z1, w1, x2, y2, z2, w2, rbins_squared, result)
t0 = (time.time() - t0) / n_try

print("numba: %s seconds" % t0)

I get
(anl) clarence:Desktop beckermr$ python numba_cou_jit.py
numba: 2.117280626296997 seconds

Interesting!
You can write the same thing easily enough in JAX like this:
@jax.jit
def count_weighted_pairs_3d_cpu_jax(
        x1, y1, z1, w1, x2, y2, z2, w2, rbins_squared):
    dx = x1[:, None] - x2
    dy = y1[:, None] - y2
    dz = z1[:, None] - z2
    wprod = w1[:, None] * w2
    dsq = dx*dx + dy*dy + dz*dz
    return jnp.sum(jnp.where(dsq <= rbins_squared[:, None, None], wprod, 0),
                   axis=(1, 2))

but on CPU it scales poorly with the number of points. It looks like the compiler is materializing the input to the sum reduction, which quadratic in the number of points. I think that's something we can fix; we need to fuse the elementwise computation with the reduction, which seems not to be implemented on CPU.
However on GPU it seems to perform reasonably. Did you try GPU?

I have not benchmarked the gpu version against Jax. Note however that this the simplest of a class of kernels. Idk if the version you posted will generalize to those.

Also interesting! It'd be nice to have a really crisp example if you have one.
(And as I mentioned before, making it easier to integrate with Numba is a fine strategy too.)

xref: #1870


Fix alloc static initialization

This is most likely wrong: we want to be able to tweak the allocation functions before grpc_init (otherwise how do we set the allocation functions used by grpc_init).

Thanks for the review! As discussed offline, the issue was not caused by this part.


feat: add fs wrapper functions

Motivation
the std::io::error does not track the path that lead to the error

Solution

add error variants for commonly used fs functions
add fs wrapper module

sucks that it's needed but oh well


Can not apply font- family classes

👋 I'm trying to apply .font-mono but it throws me this error:
Syntax error: `@apply` cannot be used with `.font-mono` because `.font-mono` either cannot be found, or its actual definition includes a pseudo-selector like :hover, :active, etc. If you're sure that `.font-mono` exists, make sure that any `@import` statements are being properly processed *before* Tailwind CSS sees your CSS, as `@apply` can only be used for classes in the same CSS tree. (33:3)

My style definition:
.editor {
  @apply text-xs;
  @apply leading-5;
  @apply text-gray-600;
  @apply font-mono;
}

When I remove font-mono, it works just fine. Tailwind version: 1.2.0.
What am I doing wrong? Thx!

Can you share your complete CSS? It does work by default:
https://tailwind.run/5UEWGo
Closing as this is just a configuration/CSS authoring issue but happy to help you get it figured out here still.

Sorry, it was my bad. I had the font family overridden in the config (as per examples) and completely forgot about the monospace. All 👌🏽 Thank you @adamwathan Really awesome project, I am starting to like CSS again 😅


SkeletonInstance

Hello, i would like to know how to get boneArray from this source, i'm trying to do that for 6 hours but i found nothing.
Can someone help me pls ?

It's not yet implemented, however I think after 10minute of browsing UC, you can find the idea how to implement that yourself

yes, but pPlayer->GetGameSceneNode() return nullptr

yes, but pGameSceneNode->GetSkeletonInstance() return nullptr

Do you read it from pawn? else I guess the GetSkeletonInstance() vtable is updated, try +/- idk will look into later

There is no m_boneArray schema in CModelState?

Both skeleton instance from asphyxia and the bone array in Modelstate works for me
class CModelState { public: 	MEM_PAD(0x80); 	BoneData_t*	m_pBones; };


flake8 opportunities

@quozl  @chimosky Kindly Review. Fixes #58 .

You're changing the files that I said in https://github.com/sugarlabs/turtleart-activity/issues/58 shouldn't be changed because they are maintained elsewhere.  Changing them here creates a difference that makes it harder to maintain them in future.
I'd prefer .flake8 not have too many ignores added.  E402 substantially changes flake8 processing which is why it is often included.  F401 also because imports can have a side-effect without being used.  But the new ones you've added seem more related to version-specific deficiencies in flake8.

But the new ones you've added seem more related to version-specific deficiencies in flake8.

W503,W504 is version specific. They were not in previous flake8 versions but can be seen in 3.7.9.
E741 i.e. ambiguous variable name 'l' unfortunately I dont know what to do in this case it is related to sprites.py which is being used in other files also, and as well as in other activities. If I change it , we will not be able to make sprites.py consistent over activities.

Also what can we do F841 - local variable 'res' is assigned to but never used as I have seen it in many places
./plugins/rfid/serial/serialposix.py:346:17: F841 local variable 'res' is assigned to but never used
./plugins/audio_sensors/audiograb.py:311:13: F841 local variable 'output' is assigned to but never used
./plugins/audio_sensors/audiograb.py:327:9: F841 local variable 'output' is assigned to but never used
./plugins/audio_sensors/audiograb.py:419:9: F841 local variable 'output' is assigned to but never used
./plugins/audio_sensors/audiograb.py:444:9: F841 local variable 'output' is assigned to but never used
./plugins/audio_sensors/audiograb.py:489:9: F841 local variable 'output' is assigned to but never used
./TurtleArt/taprimitive.py:868:9: F841 local variable 'self' is assigned to but never used
./TurtleArt/tatype.py:62:9: F841 local variable 'self' is assigned to but never used
and many more. I have commented some lines also in order to fix this.

Re: E741 for sprites.py, please cherry-pick 354257b, taken from Nutrition activity.
sprites.py is one of those files that was copied and pasted into activities as a quick way to get activities written.  So we have almost as many variants of sprites.py as we have activities that use it.  We should hope to eventually converge the similar files.  Once converged, there is a theoretical reduction of future maintenance.
It is a matter of maintenance priorities.  Doing flake8 fixes is of a lower priority than converging similar source code.  But that doesn't mean we don't do flake8 fixes because a file is _being+ converged.

If we can use a convergence approach to make a flake8 fix, that's best.

I would suggest doing this, as it seems best to me at this time.

Re: E741 for sprites.py, please cherry-pick 354257b, taken from Nutrition activity.

Thanks I will make necessary changes now as suggested by you.

Re: W503.  Please cherry-pick 9b2957dc.  Method was to (a) remove extra parentheses as they were being used to avoid continuation markers, (b) bring all text onto one line and rerun flake8 to verify W503 is gone, and (c) indent by hand to fit.  You will see some strange ways to solve in my demonstration, but from my experience the writers of flake8 have tried hard never to have a situation that is unavoidable.

Re: W503. Please cherry-pick 9b2957d. Method was to (a) remove extra parentheses as they were being used to avoid continuation markers, (b) bring all text onto one line and rerun flake8 to verify W503 is gone, and (c) indent by hand to fit. You will see some strange ways to solve in my demonstration, but from my experience the writers of flake8 have tried hard never to have a situation that is unavoidable.

By doing so we will eventually land up in E501 line too long (80 > 79 characters), But Yeah we can solve it  :smiley:

Re: E501.  Please cherry-pick da23e50.  Method was to (a) run autopep8 in aggressive in-place mode, (b) undo some of the damage such as how it splits keyword argument list in BusName.__new__, (c) rerun flake8 and iterate with editor to wrap some of the multi-line comments and other lines that autopep8 would not touch.
Please, please, do not try to fix flake8 warnings and errors by just running autopep8 and committing the result.  (a) anyone could do that, we want your brain not your axe, (b) the result is sometimes hard to read, and (c) the changes can be more extensive than needed.
However, autopep8 can be handy to give you some ideas.
Also, a caution that we should never try to fix flake8 warnings in code that doesn't work.  It complicates the git blame and history, making git bisect more difficult.  This boring flake8 type of maintenance is best done when all problems are solved and the source code looks like being stable for a while ... or where it has been stable for a while and we are about to add a slew of new problems.

Thanks.  Good progress.  I still don't agree with the changes to the .flake8 file.  I think only E402 is needed.
Re: F841 local variable is assigned to but never used.  Look at the statement on the line and reverse-engineer the direct and indirect effects.  Where there are no indirect effects, the statement can be removed.  Where there are indirect effects, such as calls to other functions, the assignment can be removed, leaving just the calls.  Then step back and look at the change.  Wonder why the functions returned anything at all, and if the program should be doing something with the return.
For example, in audiograb.py there is a repeating pattern of using check_output to capture the stdout stream of a shell command, only to discard it.  For many of the commands no output is expected.  Also, if the command fails, it might not be important.  For example restoring the Analog Mic Boost level using amixer is harmless and useless if the system doesn't have that mixer control.
The name of the function check_output provided by the standard library seems to be a hint that many people call it without checking the output, and it doesn't actually check any output itself.

Re: E501. Please cherry-pick da23e50. Method was to (a) run autopep8 in aggressive in-place mode, (b) undo some of the damage such as how it splits keyword argument list in BusName.new, (c) rerun flake8 and iterate with editor to wrap some of the multi-line comments and other lines that autopep8 would not touch.
Please, please, do not try to fix flake8 warnings and errors by just running autopep8 and committing the result. (a) anyone could do that, we want your brain not your axe, (b) the result is sometimes hard to read, and (c) the changes can be more extensive than needed.
However, autopep8 can be handy to give you some ideas.
Also, a caution that we should never try to fix flake8 warnings in code that doesn't work. It complicates the git blame and history, making git bisect more difficult. This boring flake8 type of maintenance is best done when all problems are solved and the source code looks like being stable for a while ... or where it has been stable for a while and we are about to add a slew of new problems.

Thanks for suggestions. I have tried these methods for rest of the files, it worked but yess there are places where E501 can't be fixed, and we will eventually landup with W503 or W504 if we try to fix.(You can look at lines 1286 and 646 in TurtleArtActivity.py and there are many other places also like this). So I added E501 in .flake8 file and fixed W503 and W504. You can review now again.

Re: F841 local variable is assigned to but never used. Look at the statement on the line and reverse-engineer the direct and indirect effects. Where there are no indirect effects, the statement can be removed. Where there are indirect effects, such as calls to other functions, the assignment can be removed, leaving just the calls. Then step back and look at the change. Wonder why the functions returned anything at all, and if the program should be doing something with the return.
For example, in audiograb.py there is a repeating pattern of using check_output to capture the stdout stream of a shell command, only to discard it. For many of the commands no output is expected. Also, if the command fails, it might not be important. For example restoring the Analog Mic Boost level using amixer is harmless and useless if the system doesn't have that mixer control.
The name of the function check_output provided by the standard library seems to be a hint that many people call it without checking the output, and it doesn't actually check any output itself.

Thanks I am yet to apply these changes for F841 fix as it will require some testing as you said. Also there are E741 still exist in tasprite_factory.py which also needs an alternative.

Thanks for suggestions. I have tried these methods for rest of the files, it worked but yess there are places where E501 can't be fixed, and we will eventually landup with W503 or W504 if we try to fix.(You can look at lines 1286 and 646 in TurtleArtActivity.py and there are many other places also like this). So I added E501 in .flake8 file and fixed W503 and W504. You can review now again.

Thanks, but I disagree.  It was easily fixed, using one of the techniques that I demonstrated in https://github.com/sugarlabs/turtleart-activity/pull/79/commits/b1983c3f84fa7792ed668d8ea3fc345643d231f3.  Please make sure you go through the changes in that commit, reading the diff and understanding what the change was.  Please add 418c664e3f1e511746c05863d6a66b86ce413dd2 and continue with the other E501.  Don't put E501 in the .flake8 file without finding something that certainly cannot be fixed.  I've not been unable to fix E501 in the same way that I was unable to fix E402.
By the way, E402 doesn't seem to happen any longer with flake8 3.7.9, can you confirm?  We might aim for an empty .flake8 file.

Thanks I am yet to apply these changes for F841 fix as it will require some testing as you said. Also there are E741 still exist in tasprite_factory.py which also needs an alternative.

Thanks, but I disagree.  Some changes for F841 won't require testing.  For instance just removing output = in the statement output = check_output() would not require any testing if output is not referenced later in the function.  The E741 in tasprite_factory.py also won't need testing, and will be to change l to something that sufficiently communicates the name of the fourth parameter to SVG 2 Paths - elliptical arc curve command "A".  I suggest laf.
(Fascinating that the elliptical arc curve commands were added to SVG because they were like the turtle graphics commands ... one of those rare situations in which turtle graphics as an implementation design pattern affected the SVG specification, and around it comes again and an implementation of turtle graphics is able to use the specification.)

By the way, E402 doesn't seem to happen any longer with flake8 3.7.9, can you confirm? We might aim for an empty .flake8 file.

No I am still getting E402 with Python3.7 and flake8 3.7.9. Unfortunately we cant aim here. I am done now with my all changes you can review and merge now.

@quozl A review is requested once.

Yes, it is on my queue.

Skipping review since @quozl is taking it up


supports mockFn.mockThrowError, mockThrowErrorOnce

Do you want to request a feature or report a bug?
feature
What is the current behavior?
we can throw errors using mockImplementation.
mockFn.mockImplementation(() => { throw new Error('adbd') });
mockFn.mockImplementationOnce(() => { throw new TypeError('adbd') });

but, ideally i'd like to see something like:
mockFn.mockThrowError('adbd');
mockFn.mockThrowErrorOnce(new TypeError('adbd'));

What is the expected behavior?
testcase:
it('supports throw errors', () => {
  const fn = moduleMocker.getMockFunction();
  fn.mockThrowError('abcd');

  expect(fn).toThrowError('abcd');

  const fn2 = moduleMocker.getMockFunction();
  fn.mockThrowError(new TypeError('abcd'));

  expect(fn2).toThrowError(TypeError);
});

Since you can write a one-liner function/wrapper around it, I don't see the reason for extending mocks API just to do this.
I'm closing the issue for now to manage the queue, but we can keep the discussion going and reopen if necessary.


Does asyncmy support sqlalchemy ORM

https://docs.sqlalchemy.org/en/14/orm/tutorial.html#creating-a-session
What we do is
  async_engine = create_async_engine(
      "mysql+asyncmy:[url]ssl_ca=[cert]",
      future=True,
      pool_pre_ping=True,
      pool_recycle=1800,
  )
  _async_session = sessionmaker(bind=async_engine,
                                autocommit=False,
                                autoflush=False,
                                class_=AsyncSession,
                                expire_on_commit=False)

  @asynccontextmanager
  async def aio_session_scope():
      """ Provide a transactional scope around a series of operations"""
      async with _async_session() as session:
          try:
              yield session
              await session.commit()
          except Exception as e:
              await session.rollback()
              raise e
          finally:
              await session.close()

    async with aio_session_scope() as session:
          records = (await session.execute(statement.offset(offset).limit(limit))).all()

The error thrown is:
 File \"/usr/local/lib/python3.9/site-packages/sqlalchemy/ext/asyncio/session.py\", line 211, in execute\
   return await greenlet_spawn(\
 File \"/usr/local/lib/python3.9/site-packages/sqlalchemy/util/_concurrency_py3k.py\", line 134, in greenlet_spawn\
   result = context.throw(*sys.exc_info())\
 File \"/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py\", line 1691, in execute\
   conn = self._connection_for_bind(bind)\
 File \"/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py\", line 1532, in _connection_for_bind\
   return self._transaction._connection_for_bind(\
 File \"/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py\", line 747, in _connection_for_bind\
   conn = bind.connect()\
 File \"/usr/local/lib/python3.9/site-packages/sqlalchemy/future/engine.py\", line 406, in connect\
   return super(Engine, self).connect()\
 File \"/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py\", line 3204, in connect\
   return self._connection_cls(self, close_with_result=close_with_result)\
 File \"/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py\", line 96, in __init__\
   else engine.raw_connection()\
 File \"/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py\", line 3283, in raw_connection\
   return self._wrap_pool_connect(self.pool.connect, _connection)\
 File \"/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py\", line 3250, in _wrap_pool_connect\
   return fn()\
 File \"/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py\", line 310, in connect\
   return _ConnectionFairy._checkout(self)\
 File \"/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py\", line 868, in _checkout\
   fairy = _ConnectionRecord.checkout(pool)\
 File \"/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py\", line 476, in checkout\
   rec = pool._do_get()\
 File \"/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/impl.py\", line 146, in _do_get\
   self._dec_overflow()\
 File \"/usr/local/lib/python3.9/site-packages/sqlalchemy/util/langhelpers.py\", line 70, in __exit__\
   compat.raise_(\
 File \"/usr/local/lib/python3.9/site-packages/sqlalchemy/util/compat.py\", line 207, in raise_\
   raise exception\
 File \"/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/impl.py\", line 143, in _do_get\
   return self._create_connection()\
 File \"/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py\", line 256, in _create_connection\
   return _ConnectionRecord(self)\
 File \"/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py\", line 371, in __init__\
   self.__connect()\
 File \"/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py\", line 666, in __connect\
   pool.logger.debug(\"Error on connect(): %s\", e)\
 File \"/usr/local/lib/python3.9/site-packages/sqlalchemy/util/langhelpers.py\", line 70, in __exit__\
   compat.raise_(\
 File \"/usr/local/lib/python3.9/site-packages/sqlalchemy/util/compat.py\", line 207, in raise_\
   raise exception\
 File \"/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py\", line 661, in __connect\
   self.dbapi_connection = connection = pool._invoke_creator(self)\
 File \"/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/create.py\", line 590, in connect\
   return dialect.connect(*cargs, **cparams)\
 File \"/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/default.py\", line 597, in connect\
   return self.dbapi.connect(*cargs, **cparams)\
 File \"/usr/local/lib/python3.9/site-packages/sqlalchemy/dialects/mysql/asyncmy.py\", line 275, in connect\
   await_only(self.asyncmy.connect(*arg, **kw)),\
 File \"/usr/local/lib/python3.9/site-packages/sqlalchemy/util/_concurrency_py3k.py\", line 76, in await_only\
   return current.driver.switch(awaitable)\
 File \"/usr/local/lib/python3.9/site-packages/sqlalchemy/util/_concurrency_py3k.py\", line 129, in greenlet_spawn\
   value = await result\
 File \"asyncmy/connection.pyx\", line 1299, in _connect\
 File \"asyncmy/connection.pyx\", line 555, in connect\
 File \"asyncmy/connection.pyx\", line 533, in asyncmy.connection.Connection.connect\
 File \"asyncmy/connection.pyx\", line 727, in _request_authentication\
 File \"/usr/local/lib/python3.9/asyncio/streams.py\", line 52, in open_connection\
   transport, _ = await loop.create_connection(\
 File \"uvloop/loop.pyx\", line 2069, in create_connection\
 File \"uvloop/loop.pyx\", line 2064, in uvloop.loop.Loop.create_connection\
 File \"uvloop/sslproto.pyx\", line 517, in uvloop.loop.SSLProtocol._on_handshake_complete\
 File \"uvloop/sslproto.pyx\", line 477, in uvloop.loop.SSLProtocol._start_handshake\
AttributeError: 'dict' object has no attribute 'wrap_bio'"

This error will show if we use ssl.

Looks like problem of ssl

@long2ice Yep, that's correct.
The trace starts at sqlalchemy/ext/asyncio/session.py so not sure if only using the sessionmaker will trigger this problem.
Only when using SSL will have this exception, there won't be any exception if not using SSL ?ssl_ca=xxx in the connection string.

I hit the same issue using the rds-combined-ca-bundle.pem from AWS to connect to AWS RDS instances (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html).
The same SSL works fine with pymysql, so it is likely not a problem with the SSL.


Evaluation with bracked number in string format does not work

I will take this simple expression as an example:
["Add", 2, ["3"]]
With that above the result will be: Add(3(), 2)
Instead of the expected 5.
The cases in which it will work are:

["Add", 2, [3]]
["Add", 2, "3"]
["Add", 2, 3]

It seems that whenever a number is inserted in a string format and placed inside square brackets it will not be considered as a number.

That is not a valid MathJSON expression.
In MathJSON, arrays are used to represent functions. So ["3"] would represent a function named "3" (which is not valid identifier), which is being called with no arguments. The JavaScript equivalent would be 3().
There is not need for delimiters in MathJSON expressions, since they represent a tree. However, if you do need to represent delimiters, you can use a Delimiter expression: ["Add", 2, ["Delimiter", 3]]

Thanks for the reply, I understand what you mean, however in light of this I don't get why the expression ["Add", 2, [3]] works without problems, shouldn't the [3] be considered a function too?

If you give invalid input, there is no guarantee as to what happens.

I've adde a check to throw an error when using ce.box(). I don't know if that's how you ran into the problem, though.

yes I used ce.box()


Fix AccessEnforcementReleaseSinking. Check for illegal cases.

In the included, test case, the optimization was sinking
releases past is_escaping_closure.
Rewrite the isBarrier logic to be conservative and define the
mayCheckRefCount property in SIL/InstructionUtils. Properties that may
need to be updated when SIL changes belong there.
Note that it is particularly bad behavior if the presence of access
markers in the code cause miscompiles unrelated to access enforcement.
Fixes rdar://problem/45846920 TestFoundation, TestProcess, closure
argument passed as @noescape to Objective-C has escaped.

@swift-ci test.


Can not collapse security group tag list when there are lots of them

Go to security groups when there are lots of rules for a security group -expand the tag list. You can't collapse it again.

Issue appears to be linked to the scroll bar. If the page is resized, the expand action also fails.


cmd/go: look only at dependencies in use in 'go run'

With no network access:
$ cd $GOROOT/src/cmd/compile/internal/gc
$ go run mkbuiltin.go
go<EMAIL_ADDRESS>unrecognized import path "golang.org/x/sys" (https fetch: Get https://golang.org/x/sys?go-get=1: dial tcp: lookup golang.org: no such host)
go<EMAIL_ADDRESS>unrecognized import path "golang.org/x/crypto" (https fetch: Get https://golang.org/x/crypto?go-get=1: dial tcp: lookup golang.org: no such host)
go<EMAIL_ADDRESS>unrecognized import path "golang.org/x/tools" (https fetch: Get https://golang.org/x/tools?go-get=1: dial tcp: lookup golang.org: no such host)
go: error loading module requirements

But the imports used by mkbuiltin.go are 100% standard library with no dependency that I see on those three repos.
It looks to my untrained eye like the cmd/compile/internal/gc package depends on those repos, but not mkbuiltin.go. Assuming that that is accurate, and given that go run x.go is effectively independent of the location of x.go on disk, it seems to me that my go run command should have succeeded.
cc @bcmills @jayconrod
Apologies if this is a duplicate; I'm having a hard time keeping track of the various go modules issues.

Does go build with this case have the same problem? I've been seeing surprising output from go build lately.

I’m not sure. I still haven’t fully wrapped my head around modules, but I have noticed that cmd/go needs a surprising amount of network access. (I’m used to basically everything working without the internet, and am disconcerted by the notion that I do not understand enough to be able to plan for an airplane trip, much less not have to plan at all.) But I am working under the assumption that all of the foregoing is my problem.

It might not be just your problem. I see much network access (and slowness) that I cannot explain.

Could you attach the output of go version and go env from within that working directory?
If you're using go run with a 1.12 compiler, then it won't have the special-case vendor logic required to avoid fetching the dependencies listed for the cmd module.
I've been testing these sorts of issues using GOPATH=$(mktemp -d) GOPROXY=off PATH=~/minbin, where ~/minbin does not contain any binaries that (to my knowledge) provide network access. (Setting GOPATH to an empty directory and GOPROXY=off ensures that the go command does not have access to a cached or proxied copy of those modules.)
 I was indeed using go run with a 1.12 compiler.
Thanks for the heads up about how to narrow down and reproduce these.


IPMA Weather Service - version bump

Description:
Just a version bump fixing minor bugs
Related issue (if applicable): fixes #
Pull request in home-assistant.io with documentation (if applicable): home-assistant/home-assistant.io#<home-assistant.io PR number goes here>
Example entry for configuration.yaml (if applicable):
weather:
  - platform: ipma

Checklist:

[x] The code change is tested and works locally.
[x] Local tests pass with tox. Your PR cannot be merged unless tests pass
[x] There is no commented out code in this PR.

If user exposed functionality or configuration variables are added/changed:

[ ] Documentation added/updated in home-assistant.io

If the code communicates with devices, web services, or third-party tools:

[ ] New dependencies have been added to the REQUIREMENTS variable (example).
[ ] New dependencies are only imported inside functions that use them (example).
[ ] New or updated dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
[ ] New files were added to .coveragerc.

If the code does not interact with devices:

[ ] Tests have been added to verify that the new code works.

Don't forget to run script/gen_requirements_all.py and commit the updated requirements_all.txt 😃