Build fails, following README steps

Tanels-MacBook-Pro-2:freeflix tanel$ docker build -t freeflix .
Sending build context to Docker daemon   4.31MB
Step 1/9 : FROM golang:stretch
 ---> 7e9ac7032e33
Step 2/9 : COPY . $GOPATH/src/freeflix
 ---> Using cache
 ---> d9fab5cd3dff
Step 3/9 : EXPOSE 8080
 ---> Using cache
 ---> ef6761b0acb9
Step 4/9 : ADD https://github.com/ninjaintrouble/freeflix-frontend/releases/download/1.0/frontend.tar $GOPATH/bin
Downloading [==================================================>]  780.3kB/780.3kB
 ---> Using cache
 ---> b069facce206
Step 5/9 : WORKDIR $GOPATH/src/freeflix
 ---> Using cache
 ---> e7e974601b06
Step 6/9 : RUN apt-get update &&    apt-get install gcc &&    go install -i -v
 ---> Running in b6ed5a2cab34
Ign:1 http://deb.debian.org/debian stretch InRelease
Get:2 http://security.debian.org/debian-security stretch/updates InRelease [94.3 kB]
Get:3 http://deb.debian.org/debian stretch-updates InRelease [91.0 kB]
Get:4 http://deb.debian.org/debian stretch Release [118 kB]
Get:5 http://security.debian.org/debian-security stretch/updates/main amd64 Packages [391 kB]
Get:6 http://deb.debian.org/debian stretch Release.gpg [2434 B]
Get:7 http://deb.debian.org/debian stretch-updates/main amd64 Packages [5148 B]
Get:8 http://deb.debian.org/debian stretch/main amd64 Packages [7099 kB]
Fetched 7801 kB in 3s (2087 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
gcc is already the newest version (4:6.3.0-4).
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
torrent/client.go:7:2: cannot find package "github.com/anacrolix/torrent" in any of:
	/usr/local/go/src/github.com/anacrolix/torrent (from $GOROOT)
	/go/src/github.com/anacrolix/torrent (from $GOPATH)
server.go:9:2: cannot find package "github.com/gorilla/handlers" in any of:
	/usr/local/go/src/github.com/gorilla/handlers (from $GOROOT)
	/go/src/github.com/gorilla/handlers (from $GOPATH)
server.go:10:2: cannot find package "github.com/gorilla/mux" in any of:
	/usr/local/go/src/github.com/gorilla/mux (from $GOROOT)
	/go/src/github.com/gorilla/mux (from $GOPATH)
service/yts.go:6:2: cannot find package "github.com/sirupsen/logrus" in any of:
	/usr/local/go/src/github.com/sirupsen/logrus (from $GOROOT)
	/go/src/github.com/sirupsen/logrus (from $GOPATH)
The command '/bin/sh -c apt-get update &&    apt-get install gcc &&    go install -i -v' returned a non-zero code: 1

Seems to be a macos/linux specific error. Will fix this ASAP.

Thanks for reporting the bug 😄
Should be fixed now. It was a very weird error. go install -i would only download dependencies with docker on windows...


Pypi release 1.0.11 does not support Django 5.0

The 1.0.11 release expects Django version <5.0. I don't know if there is anything actually incompatible with Django 5 but since its out now the package is broken until a new release.

You can use https://github.com/math-a3k/django-bootstrap-v5.git#egg=django-bootstrap-v5 in the meantime

pinging this

DO NOT USE THIS PACKAGE
In the documentation you should clearly write that this package does not support Django 5.
As it is now where the package uninstall Django 5 and install Django 4 without warning is unacceptable.

Any news when Django >= 5  will be supported?


[trainer] Call prepare_data once per node in DDP/DDP2 training

Before submitting

[ ] Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
[ ] Did you read the contributor guideline, Pull Request section?
[ ] Did you make sure to update the docs?
[ ] Did you write any new necessary tests?
[ ] If you made a notable change (that affects users), did you update the CHANGELOG?

What does this PR do?
Slurm and elastic training create the training processes per node outside of the lightning context. This means that when the fit function calls prepare_data, the assumption that it's only being called on proc 0 is broken and it gets called for each process.. This fixes #1878 by calling prepare_data once per node, depending on the local rank.
PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.
Did you have fun?
Make sure you had fun coding 🙃

We need to document this better. It should be clear that this is called exactly once per node no matter what backend you use.


Latest version cannot load environment

Essentially as the title says, since upgrading to the latest CE version, it constantly fails at loading the environment (where I can access the containers and networks, etc).
Yet it is fully responsive to any other pages like settings, users, account, notifications, but when trying to open the environment you just get infinite loading.
Oh, and did I mention the new version looks very ugly?
I am not one to complain about such small things (well being unable to access the environment isn't small), but this update has clearly been an enormous step backwards

I'm in the same situation. Heartbeat and stats show correctly, can't connect.
upgraded from 2.14 (ce) to 2.16.2 (ee, grabbed my 5 free nodes finally)
XHRGEThttps://portainer.my-domain.com/api/endpoints/10/docker/_ping
[HTTP/2 403 Forbidden 67ms]

Error: Environment is unreachable.
    onEnter __module.js:64
    52726 async.js:14
    52726 async.js:20
    onEnter __module.js:50
    Angular 40
    f useSref.ts:97
    f UISref.tsx:64
    React 11
    unstable_runWithPriority scheduler.production.min.js:18
    React 3
notifications.ts:50:10
Transition Rejection($id: 1 type: 2, message: The transition has been superseded by a different transition, detail: Transition#7( 'portainer.home'{} -> 'portainer.home'{} )) stateService.ts:524:14
    Angular 58
    f useSref.ts:97
    f UISref.tsx:64
    React 11
    unstable_runWithPriority scheduler.production.min.js:18
    React 3

using a reverse proxy setup with portainer, edge agent is connected with https://portainer.my-domain.com|https://edge-portainer.my-domain.com|BASE64checksum|10
agent is showing in logs
2022/11/30 10:14AM INF github.com/portainer/agent/cmd/agent/main.go:79 > agent running on Docker platform |
2022/11/30 10:14AM INF github.com/portainer/agent/edge/key.go:144 > edge key loaded from options |
2022/11/30 10:14AM INF github.com/portainer/agent/edge/registry/server.go:101 > starting registry credential server |
2022/11/30 10:14AM INF github.com/portainer/agent/http/server.go:100 > starting Agent API server | api_version=2.16.2 server_addr=<IP_ADDRESS> server_port=9001 use_tls=false
2022/11/30 10:20:29 client: Connecting to wss://edge-portainer.game.theohana.live:443
2022/11/30 10:20:29 client: Fingerprint rSvnge3Kxwhkcr5e4nKxStpN5iI6KlbuJgBwA3pyw3o=
2022/11/30 10:20:29 client: Connected (Latency 23.942726ms)

how to proceed?

I've solved my issue, I was using the wrong AGENT_SECRET :) ...


I  create a new Sound object use remote network;but two things happened；for short sound,it worked as usual,and long durations it wouldn't work; Console the sound object ,I got a duration of -1

:beetle: Description

:beetle: What have you tried?

:beetle: Please post your code:
// Please post your code

:bulb: Possible solution

Is your issue with...

[ ] iOS
[x] Android
[ ] Windows

Are you using...

[x] React Native CLI (e.g. react-native run-android)
[ ] Expo
[ ] Other: (please specify)

Which versions are you using?

React Native Sound:
React Native:
iOS:
Android:
Windows:

Does the problem occur on...

[x] Simulator
[x] Device

If your problem is happening on a device, which device?

Device:

//Click  button will call
playmusic() {
if (this.state.playState) {
if (store.getState().musicAction.musicObj!=null||store.getState().musicAction.musicObj!=undefined) {
this.stopspin()
setTimeout(() => {
this.stopplaybar()
},500)
if(this.sound){
this.sound.release()
this.sound=null
}
store.getState().musicAction.musicObj.release();
store.getState().musicAction.musicObj = null;
}
            if (this.timeout) {
                clearInterval(this.timeout);
            }
            this.setState({
                playState: false
            })
        }

        else if (!this.state.playState) {
            if(store.getState().musicAction.musicObj==null||store.getState().musicAction.musicObj==undefined){
                this.setState({loading:true})
                this.sound = new Sound(this.state.musciPath,(error) => {
                    if (error) {
                        this.setState({ playState: false });
                        return;
                    }
                    this.setState({
                        durations: this.sound.getDuration()
                    })
                });         this.props.setMusic({musicDetail:this.props.navigation.getParam('musicDetail'),obj:this.sound})
                    //this.sound and store's musicobject  consoles long Sound would get durations of -1
                   //I have played the  Audio of 11s  that is ok,but 90s in trouble
            this.playbar();
            ToastAndroid.show('Loading',2000)
            setTimeout(() => {
                this.play();
                this.spin();
                this.CurrentTimer();
            }, 3000);
            }
            else{
                console.log('release Sound Object')
                store.getState().musicAction.musicObj.release();
                store.getState().musicAction.musicObj=null
                if(this.sound){
                    this.sound.release()
                    this.sound=null
                }
                this.setState({playState:false},()=>{
                    this.playmusic()
                })
            }
        }
}

wow,Maybe the cause of this problem is too long to load resources, such as mobile network or server bandwidth；I just tried it again, the big audio needs to wait longtime;

On Android, big audio does not need to wait for a long time, while IOS needs to wait for a long time. How to repair it


Catch up summary 2019-01-02

https://cryptpad.fr/code/#/2/code/edit/x1BPpbuVDcAg4yjMlmFpx1x6/
Action points

[x] Arrange walk through for libp2p-switch and mplex, multistream-select - @alanshaw (Thursday morning or Friday ideally)
[x] CI trigger commit SHA must be propagated - @Elexy
[x] Video recording of runner and dashboard - @Elexy (#140)
[ ] Write down requirements for trigger from CI (use Gitlab, no need for infra involvement) - @alanshaw
[x] Review https://github.com/ipfs/js-datastore-fs/pull/21 - @alanshaw / @achingbrain

Write down requirements for trigger from CI (use Gitlab, no need for infra involvement) - @alanshaw

We have a HTTP API with an API key - I think this is sufficient for now!


Test demo

Demo for testing multiple applications on Kubernetes and OpenShift clusters in parallel.
Need to update for new ocm-ramen-samples layout.

Closing as stale, part of general cleanup. Please reopen and update if still required.


Split unittest for util func to diffrent source. (#61)

Split util_func unittest to unittest_util_func.cpp.
Build test: [X]Passed [ ]Failed [ ]Skipped
Run test: [ ]Passed [X]Failed [ ]Skipped

Signed-off-by: Jihoon Lee<EMAIL_ADDRESS>9 tests failed. It seems not related to this PR though, those tests fails in the master branch as well.
[  FAILED  ] 9 tests, listed below:
[  FAILED  ] nntrainer_NeuralNetwork.init_01_p
[  FAILED  ] nntrainer_NeuralNetwork.init_08_n
[  FAILED  ] nntrainer_NeuralNetwork.init_011_p
[  FAILED  ] nntrainer_DataBuffer.setDataFile_01_p
[  FAILED  ] nntrainer_DataBuffer.setDataFile_03_p
[  FAILED  ] nntrainer_DataBuffer.setFeatureSize_01_p
[  FAILED  ] nntrainer_DataBuffer.setFeatureSize_02_n
[  FAILED  ] nntrainer_DataBuffer.init_01_p

:memo: TAOS-CI Version: 1.4.20191203. Thank you for submitting PR #62. Please a submit 1commit/1PR (one commit per one PR) policy to get comments quickly from reviewers. Your PR must pass all verificiation processes of cibot before starting a review process from reviewers. If you are new member to join this project, please read manuals in documentation folder and wiki page. In order to monitor a progress status of your PR in more detail, visit http://ec2-54-180-96-14.ap-northeast-2.compute.amazonaws.com/.

[ FAILED ] 9 tests, listed below:
[ FAILED ] nntrainer_NeuralNetwork.init_01_p
[ FAILED ] nntrainer_NeuralNetwork.init_08_n
[ FAILED ] nntrainer_NeuralNetwork.init_011_p
[ FAILED ] nntrainer_DataBuffer.setDataFile_01_p
[ FAILED ] nntrainer_DataBuffer.setDataFile_03_p
[ FAILED ] nntrainer_DataBuffer.setFeatureSize_01_p
[ FAILED ] nntrainer_DataBuffer.setFeatureSize_02_n
[ FAILED ] nntrainer_DataBuffer.init_01_p

is because you didn't put the input of these test properly. If these would be fail due to any reason, you had CI error.
please look into packages/nntrainer.spec.

[ FAILED ] 9 tests, listed below:
[ FAILED ] nntrainer_NeuralNetwork.init_01_p
[ FAILED ] nntrainer_NeuralNetwork.init_08_n
[ FAILED ] nntrainer_NeuralNetwork.init_011_p
[ FAILED ] nntrainer_DataBuffer.setDataFile_01_p
[ FAILED ] nntrainer_DataBuffer.setDataFile_03_p
[ FAILED ] nntrainer_DataBuffer.setFeatureSize_01_p
[ FAILED ] nntrainer_DataBuffer.setFeatureSize_02_n
[ FAILED ] nntrainer_DataBuffer.init_01_p

is because you didn't put the input of these test properly. If these would be fail due to any reason, you had CI error.
please look into packages/nntrainer.spec & see the log.

Thank you for noticing :)


Implementing Typescript

Great work! I've been trying to implement this with Typescript, but I keep getting module not found error :(

Hi Carl, this repo is not supposed to work with typescript just yet. I do not have ts boilerplate yet, but you can find fully setup example in one of my other project – https://github.com/rtivital/mantine, you'll just need to empty packages folder and it should work fine

Hi Carl, this repo is not supposed to work with typescript just yet. I do not have ts boilerplate yet, but you can find fully setup example in one of my other project – https://github.com/rtivital/mantine, you'll just need to empty packages folder and it should work fine


Update onBeforeSend d.ts and docs

Closes #463

Codecov Report
Base: 97.19% // Head: 94.61% // Decreases project coverage by -2.58% :warning:

Coverage data is based on head (56ba8db) compared to base (65af792).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #566      +/-   ##
==========================================
- Coverage   97.19%   94.61%   -2.59%
==========================================
  Files          55        1      -54
  Lines        2243      167    -2076
==========================================
- Hits         2180      158    -2022
+ Misses         63        9      -54

Impacted Files
Coverage Δ

net/DevExtreme.AspNet.Data/ResponseModel/Group.cs

net/DevExtreme.AspNet.Data/ExpressionExecutor.cs

...AspNet.Data/Helpers/DataSourceLoadOptionsParser.cs

...et/DevExtreme.AspNet.Data/DataSourceLoadContext.cs

net/DevExtreme.AspNet.Data/SelectHelper.cs

...DevExtreme.AspNet.Data/Types/AnonType.Generated.cs

...t/DevExtreme.AspNet.Data/Types/AnonTypeAccessor.cs

...t/DevExtreme.AspNet.Data/Aggregation/Aggregator.cs

...xtreme.AspNet.Data/Async/ReflectionAsyncAdapter.cs

net/DevExtreme.AspNet.Data/Aggregation/SumFix.cs

... and 44 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Renderdoc failed to capture cubemap and compressed textures on AMD RX 6700XT

Description
I'm debugging GL_Texture_Zoo test on AMD RX 6700XT. There are two kinds of failures including cubemap and compressed textures. And I found the root cause was renderdoc failed to capture a valid trace in which cubemap textures are all black.  In fact, renderdoc could capture a valid trace in only the first frame, but always got corrupted results in the next frames.

There are two traces for comparison.
cubemap.zip
Steps to reproduce

Build the demos test
Use renderoc to launch GL_Texture_Zoo
Capture the first frame by selecting Queue Capture and then capture a frame after a while
You could see the first trace is valid but the second is corrupted in which the cubemap textures are all black

Environment

RenderDoc version: v1.28
Operating System: Windows
Graphics API: OpenGL
Grapchis Card：AMD RX 6700 XT

This is a known AMD driver bug.

This is a known AMD driver bug.

Hi @baldurk,
I am actually an OpenGL driver engineer from AMD. I don't find any valuable clues about where it is broken from driver side. When debugging the corrupted trace, the uploading data of textures are all null. But otherwise, renderdoc did record the uploading data in the first frame. I'm curious why renderdoc could get the data in the first frame but fails to retain it in the next frames. After all the output image looks alright too.
Could you please clarify how renderdoc records OpenGL commands or add more details about your conclusion?

The important difference is that if you capture the first frame then you capture the texture initialisation and data upload commands directly, which go through fine as they are captured directly on the CPU. If you capture any subsequent frame then RenderDoc needs to copy and capture the texture contents, and that fails for some texture types/formats. From memory I believe it hits an unexplained and (as far as I can tell) wrong GL_INVALID_OPERATION trying to do glCopyImageSubData to copy from the textures into a readback texture.
I believe this bug was reported to AMD years ago, but there are quite a lot of known bugs in the RenderDoc autotests on AMD so I don't remember if or when this one was reported.

Thanks a lot! really helpful information.


Pattern: Table of Contents changes needed for the Solutions page template

This epic contains links to the work needed to the Table of contents for the Solutions page template

Release complete.  All linked issues closed.  Closing this epic.


[vim] fix handling of non-ascii characters

I think it would be clearer to move character testing to predicates, rather than creating mock-regexps (since if you're calling something a regexp that isn't, it is rather likely for a later change in the code to accidentally try to call, for example, its exec method)

True, i was just trying to make the smallest change possible. Updated patch might be better.

Thanks for the quick update. Merged as 0cd691f


Depend on railties instead of rails

...so that projects that for example don't need ActiveRecord don't automatically have to include it (rails depends on activerecord etc., railties does not).

no idea why rails3 is failing. unfortunately it works on my box. any pointers?

@langalex that is because running the tests on CI, involves using Appraisal.
And Appraisal creates different gemfiles for the different rails versions.
https://github.com/cucumber/cucumber-rails/tree/master/gemfiles
So you would need to replace the rails with railties in these gemfiles too..
Could you try and replace them and try again?
By the way you can see why is failing when you go to Travis and click on the job number (ie #280.7).
It sounds like a good idea, but:
a) I believe that the most common case of using inside rails is with ActiveRecord?
b) Should we also rename it to cucumber-railties ? :;-)

@Kosmas I had to try a few combinations and in the end, adding rails as a development dependency was the only one that worked.
a) yes, that is the most common case, but there are quite a few people not using AR, plus this change has zero impact on the default case, so I think there's no harm in making the change
b) I'll leave that up to you :P

Thank you!


Button won't work with event handler after cloning

Hi @markgoodyear , love this plugin!
I'm using $('.menu-toggle').on('click' .....) to handle the opening of a navigation once a button is clicked. Once the header element containing the button has been cloned, however, the cloned button won't fire at all: even if I use a more specific selector containing .headhesive.
I've done a bit of reading and debugging but I keep coming back to the (perhaps incorrect) conclusion that the .on() method should be enough for this?
Do I need to register another event handler specifically for the cloned version of this button?
Any help greatly appreciated.
Cheers,
Dave

Closing as this is resolved by using a parent/ancestor element.

Hey @davetgreen — Sorry it took me a while to reply to this. Glad you got it working! :smiley:


Add Agency Parser

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

#21  👈
#20
#19
#18
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @ksharma-xyz and the rest of your teammates on  Graphite


Allowing sinkbinding for websocket source

Fixes #
Proposed Changes

with the new K_SINK and Sinkbinding, making the WebSocket Source ready for that

/assign @mattmoor
/assign @n3wscott
any thoughts?

/assign @lionelvillard

/lgtm
/approve

Release notes followup: This looks like a new feature, but it didn't have a release note blurb :smiley:


URL needs to be update: Vulnerability Scanning Tools

Request type

[] Please close this issue, I accidentally submitted it without adding any details
[ ] New documentation
[x ] Correction or update

Details

Vulnerability scanning Tools link is changed, it needs to be the following
https://owasp.org/www-community/Vulnerability_Scanning_Tools

Thanks — I’ve updated the URL in the https://developer.mozilla.org/en-US/docs/Learn/Server-side/First_steps/Website_security article. (If you found it at an article other than that one, please indicate which article.)

Thanks @sideshowbarker


Need to be able to identify probes with low variation

Per discussion with @rhiever:
We need a function that identifies probes with low variation among samples, as low variation probes will not be informative downstream.
TBD:

What metric do we want to use to examine variation? Beta values?
What should the cutoff be for low variation probes? I think we should have some default value, but allow users to specify custom value as well. We can probably use processed samples thus far to help determine appropriate cutoff.
Do we want the function to simply return a list/table of low variation probes with their MSE?

easily implemented, determine the threshold for cutoff based on a bunch of public data sets.
removing low variation probes is important for prediction, but less important for other science apps.


Docker 17.05 docs

Proposed changes
Merge this PR to release 17.05 docs when it's time.
Please choose Rebase and merge rather than Squash and merge.
You will want to update Amy's checklist.
Unreleased project version (optional)
17.05

Rebased on current master to resolve the conflict (the changes to the TOC for the hackathon results) and this is ready to merge as soon as the tests finish. cc/ @johndmulhausen

LGTM, let's go!


⚠ Exoticaz has degraded performance

In 2d518fc, Exoticaz ($EZ) experienced degraded performance:

HTTP code: 200
Response time: 4080 ms

Resolved: Exoticaz performance has improved in 484e9d1 after 9 minutes.


[bug] mobile drag bug

official website：

What are u duing ?
Its not a bug !~

But on desctop drag dosnt works!
Why thay works on mobile only !?

Is any solutions available?


modify_password fails in asyncio when a new password is provided

Hi!
I am now trying to use modify_password in async mode, which works fine when no new password is provided.
Unfortunately, this raises a strange error in async mode:
Traceback (most recent call last):
  File "/home/lab/bonsai/update_me.py", line 60, in <module>
    asyncio.run(asynchronous(oldpass, newpass))
  File "/usr/lib/python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
    return future.result()
  File "/home/lab/bonsai/update_me.py", line 42, in asynchronous
    res = await conn.modify_password(
  File "/home/lab/bonsai/venv/lib/python3.9/site-packages/bonsai/asyncio/aioconnection.py", line 60, in _poll
    raise exc
  File "/home/lab/bonsai/venv/lib/python3.9/site-packages/bonsai/asyncio/aioconnection.py", line 55, in _poll
    return await asyncio.wait_for(fut, timeout)
  File "/usr/lib/python3.9/asyncio/tasks.py", line 442, in wait_for
    return await fut
  File "/home/lab/bonsai/venv/lib/python3.9/site-packages/bonsai/asyncio/aioconnection.py", line 40, in _ready
    res = super().get_result(msg_id)
bonsai.errors.InvalidMessageID: Given message ID is invalid or the associated operation is already finished. (0xFF9C [-100])

When a new password is provided, the server is expected to return no data, which is handled here:
https://github.com/noirello/bonsai/blob/034ec671b60e41f1181a64ea4a7fe3d1dff7967a/src/_bonsai/ldapconnection.c#L1080
In this situation, None is returned as the result to the python caller.
In async mode, a result None means that the caller has to try again later as described here:
https://github.com/noirello/bonsai/blob/034ec671b60e41f1181a64ea4a7fe3d1dff7967a/src/bonsai/asyncio/aioconnection.py#L41
This can be fixed by returning True or any other value instead of None, but that would break the user API and existing applications.
On the other hand, rewriting the way these loops work may be a lot of work :-(.
Regards,
Romain

I also noticed during the debugging that _ready() is called continuously due to the fact that we listen to the socket POLLOUT events through the writer:
https://github.com/noirello/bonsai/blob/034ec671b60e41f1181a64ea4a7fe3d1dff7967a/src/bonsai/asyncio/aioconnection.py#L38
I am not sure whether this is needed here, but can confirm that it is called appropriately when these writers are removed.
This has little to do with the original issue here but still can be worth enough to be mentioned.

Thank you. I think that was an oversight from my part. This method should return True instead of None, when no new password is returned, just like the add and delete methods.

I did a commit based on version 1.3.0 for future references:
https://github.com/morian/bonsai/commit/74efefa69e05cae72f5aa6acedb20f156393759f
It seems like the tests do not check for the return value.

Great. Can I create PR from your patch?

Sure, go ahead if you think it fully covers the issue!


⚠ Spryr has degraded performance

In fdb5a4e, Spryr (https://spryr.com) experienced degraded performance:

HTTP code: 429
Response time: 10935 ms

Resolved: Spryr performance has improved in 21ee40f after 8 minutes.


Building a training set of tags for vbnet

Hello lovely maintainers :wave:
We've recently added "tags" to student's solutions. These express the constructs, paradigms and techniques that a solution uses. We are going to be using these tags for lots of things including filtering, pointing a student to alternative approaches, and much more.
In order to do this, we've built out a full AST-based tagger in C#, which has allowed us to do things like detect recursion or bit shifting. We've set things up so other tracks can do the same for their languages, but its a lot of work, and we've determined that actually it may be unnecessary. Instead we think that we can use machine learning to achieve tagging with good enough results. We've fine-tuned a model that can determine the correct tags for C# from the examples with a high success rate. It's also doing reasonably well in an untrained state for other languages. We think that with only a few examples per language, we can potentially get some quite good results, and that we can then refine things further as we go.
I released a new video on the Insiders page that talks through this in more detail.
We're going to be adding a fully-fledged UI in the coming weeks that allow maintainers and mentors to tag solutions and create training sets for the neural networks, but to start with, we're hoping you would be willing to manually tag 20 solutions for this track. In this post we'll add 20 comments, each with a student's solution, and the tags our model has generated. Your mission (should you choose to accept it) is to edit the tags on each issue, removing any incorrect ones, and add any that are missing. In order to build one model that performs well across languages, it's best if you stick as closely as possible to the C# tags as you can. Those are listed here. If you want to add extra tags, that's totally fine, but please don't arbitrarily reword existing tags, even if you don't like what Erik's chosen, as it'll just make it less likely that your language gets the correct tags assigned by the neural network.

To summarise - there are two paths forward for this issue:

You're up for helping: Add a comment saying you're up for helping. Update the tags some time in the next few days. Add a comment when you're done. We'll then add them to our training set and move forward.
You not up for helping: No problem! Just please add a comment letting us know :)

If you tell us you're not able/wanting to help or there's no comment added, we'll automatically crowd-source this in a week or so.
Finally, if you have questions or want to discuss things, it would be best done on the forum, so the knowledge can be shared across all maintainers in all tracks.
Thanks for your help! :blue_heart:

Note: Meta discussion on the forum

Exercise: bob
Code
Public Class Bob
	Public Function Hey(statement As String) As String

		If IsSilence(statement) Then
            Return "Fine. Be that way!"
		End If
		If IsYelling(statement) Then
			Return "Whoa, chill out!"
		End If
		If IsQuestion(statement) Then
			Return "Sure."
		Else
			Return "Whatever."
		End If

	End Function

	Private Function IsSilence(statement As String) As Boolean
		Return statement.Trim() = ""
	End Function

	Private Function IsYelling(statement As String) As Boolean
		Return statement.ToUpper() = statement AndAlso System.Text.RegularExpressions.Regex.IsMatch(statement, "[a-zA-Z]+")
	End Function

	Private Function IsQuestion(statement As String) As Boolean
		Return statement.EndsWith("?")
	End Function

End Class

Tags:
construct:and-also
construct:class
construct:constructor
construct:end-of-line
construct:if
construct:implicit-conversion
construct:invocation
construct:lambda
construct:logical-and
construct:method
construct:parameter
construct:return
construct:string
construct:throw
construct:using-directive
construct:visibility-modifiers
paradigm:functional
paradigm:object-oriented
technique:boolean-logic
technique:exceptions
technique:higher-order-functions
technique:regular-expression
uses:Regex

Exercise: anagram
Code
Public Class Anagram

    Private strAnagram As String

    Public Sub New(ByVal str As String)
        strAnagram = str
    End Sub

    Public Sub Match(ByVal arrStrMatches() As String) As String()
        Dim listStrResults As New List(Of String)
        Dim arrCharAnagram() As Char = strAnagram.ToCharArray
        System.Array.Sort(Of Char)(arrCharAnagram)
        For Each strMatch As String In arrStrMatches
            Dim arrCharMatch() As Char = strMatch.ToCharArray
            System.Array.Sort(Of Char)(arrCharMatch)
            If (arrCharAnagram = arrCharMatch) Then
                listStrResults.add(strMatch)
            End If
        Next
        return listStrResults.ToArray
    End Sub

End Class

Tags:
construct:assignment
construct:boolean
construct:class
construct:constructor
construct:field
construct:for-each-loop
construct:if
construct:implicit-conversion
construct:invocation
construct:list
construct:method
construct:parameter
construct:return
construct:string
construct:variable
construct:visibility-modifiers
paradigm:imperative
paradigm:object-oriented
technique:enumeration
uses:List<T>

Exercise: two-fer
Code
Public Module TwoFer
    ' In order to get the tests running, first you need to make sure the Speak method
    ' can be called both without any arguments and also by passing one string argument.
    Public Function Speak(ByVal Optional name As String = "you") As String
        Return $"One for {name}, one for me."
    End Function
End Module

Tags:
construct:string-interpolation
construct:verbatim-string
paradigm:declarative
paradigm:functional
paradigm:object-oriented
technique:string-concatenation

Exercise: two-fer
Code
Public Module TwoFer
    Public Function Speak() as String
        Return "One for you, one for me."
    End Function
    Public Function Speak(Name as String) as String
        Return $"One for {Name}, one for me."
    End Function
End Module

Tags:
construct:string-interpolation
construct:verbatim-string
paradigm:declarative
paradigm:functional
paradigm:object-oriented
technique:string-concatenation

Exercise: perfect-numbers
Code
Imports System
Imports System.Collections.Generic
Imports System.Linq

Public Module PerfectNumbers
Enum Classification As Integer
        perfect
        abundant
        deficient

    End Enum

    Public Function Classify(ByVal number As Integer) As Classification
    Dim i As Integer

        Dim factor As New List(Of Integer)
        i = 1
        Dim sum As Integer
        sum = 0

        Do While i < number
            If number Mod i = 0 Then
                factor.Add(i)
            End If
            i += 1
        Loop

        For Each item In factor
            sum = sum + item
        Next

        If sum = number Then
            Return Classification.perfect
        ElseIf sum > number Then
            Return Classification.abundant
        Else
            Return Classification.deficient

        End If

    Throw New NotImplementedException("You need to implement this function")
    End Function
End Module

Tags:
construct:add
construct:assignment
construct:class
construct:constructor
construct:do-loop
construct:empty-string
construct:enum
construct:explicit-conversion
construct:for-each
construct:function
construct:if
construct:implicit-conversion
construct:integral-number
construct:invocation
construct:list
construct:method
construct:module
construct:number
construct:parameter
construct:return
construct:string
construct:throw
construct:using-directive
construct:variable
construct:visibility-modifiers
paradigm:imperative
paradigm:object-oriented
technique:enumeration
technique:exceptions
technique:looping
uses:List<T>

Exercise: gigasecond
Code
Imports System

Public Module Gigasecond
    Public Function Add(ByVal moment As Date) As Date
        return moment.AddSeconds(1000000000)
    End Function
End Module

Tags:
construct:class
construct:date
construct:date-time
construct:double
construct:floating-point-number
construct:function
construct:implicit-conversion
construct:invocation
construct:lambda
construct:method
construct:module
construct:number
construct:parameter
construct:return
construct:using-directive
construct:visibility-modifiers
paradigm:functional
paradigm:object-oriented
technique:higher-order-functions
uses:DateTime
uses:DateTime.AddSeconds

Exercise: series
Code
Imports System
Imports System.Linq

Public Module Series
    Public Function Slices(ByVal numbers As String, ByVal sliceLength As Integer) As String()
        If sliceLength < 1 OrElse sliceLength > numbers.Length OrElse numbers.Length < 1 Then Throw New ArgumentException()
        Return (From i In Enumerable.Range(0, numbers.Length - sliceLength + 1) Select numbers.Substring(i, sliceLength)).ToArray()
    End Function

End Module

Tags:
construct:add
construct:boolean
construct:constructor
construct:function
construct:if
construct:implicit-conversion
construct:int
construct:integral-number
construct:invocation
construct:lambda
construct:linq
construct:method
construct:module
construct:number
construct:or
construct:parameter
construct:query-expression
construct:return
construct:string
construct:subtract
construct:throw
construct:throw-expression
construct:visibility-modifiers
paradigm:declarative
paradigm:functional
paradigm:object-oriented
technique:exceptions

Exercise: sum-of-multiples
Code
Imports System
Imports System.Collections.Generic
Imports System.Linq

Public Module SumOfMultiples
    Public Function Sum(ByVal multiples As IEnumerable(Of Integer), ByVal max As Integer) As Integer
        Return Enumerable.Range(0, max).Where(Function(item) multiples.Any(Function(item2) (item2 <> 0) AndAlso item Mod item2 = 0)).Sum()
    End Function
End Module

Tags:
construct:boolean
construct:double-precision:floating-point-number
construct:explicit-conversion
construct:floating-point-number
construct:function
construct:implicit-conversion
construct:invocation
construct:lambda
construct:linq
construct:number
construct:parameter
construct:return
construct:using-directive
construct:visibility-modifiers
paradigm:functional
paradigm:object-oriented
technique:higher-order-functions
technique:type-conversion

Exercise: raindrops
Code
Imports System
Imports System.Collections.Generic
Imports System.Linq

Public Module Raindrops
    Private sounds As IDictionary(Of Integer, String) = New Dictionary(Of Integer, String) From {
        {3, "Pling"},
        {5, "Plang"},
        {7, "Plong"}
    }

    Public Function Convert(number As Integer) As String
        Return String.Join("", sounds.Where(Function(x) number Mod x.Key = 0) _
                                     .Select(Function(x) x.Value) _
                                     .DefaultIfEmpty(number.ToString()))
    End Function
End Module

Tags:
construct:class
construct:constructor
construct:dictionary
construct:field
construct:function
construct:implicit-conversion
construct:initializer
construct:int
construct:integral-number
construct:invocation
construct:lambda
construct:linq
construct:method
construct:module
construct:number
construct:object-initializer
construct:parameter
construct:return
construct:string
construct:underscore
construct:variable
construct:visibility-modifiers
paradigm:functional
paradigm:object-oriented
technique:higher-order-functions
uses:Dictionary<TKey,TValue>

Exercise: rail-fence-cipher
Code
Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Text

Public Class RailFenceCipher
    Private ReadOnly _rails As Integer

    Public Sub New(rails As Integer)
        _rails = rails - 1
    End Sub

    Private Function GetRow(i As Integer) As Integer
        Return _rails - Math.Abs(i Mod (2 * _rails) - _rails)
    End Function

    Private Iterator Function ZigZagIndex(Of T)(seq As IEnumerable(Of T)) As IEnumerable(Of T)
        Dim indexedSeq = seq.Select(Function(c, i) (c, i)).ToList()
        Dim grouped = indexedSeq.GroupBy(Function(v) GetRow(v.i))
        For Each group In grouped
            For Each c In group.OrderBy(Function(v) v.i)
                Yield c.c
            Next
        Next
    End Function

    Public Function Encode(input As String) As String
        Return String.Join("", ZigZagIndex(input))
    End Function

    Public Function Decode(input As String) As String
        Dim zigZagged = ZigZagIndex(Enumerable.Range(0, input.Length)).ToList()
        Dim zipped = zigZagged.Zip(input, Function(f, s) (i:=f, c:=s))
        Dim ordered = zipped.OrderBy(Function(v) v.i)
        Dim resultBuilder As New StringBuilder()
        For Each v In ordered
            resultBuilder.Append(v.c)
        Next
        Return resultBuilder.ToString()
    End Function
End Class

Tags:
construct:assignment
construct:class
construct:constructor
construct:double
construct:field
construct:floating-point-number
construct:for-loop
construct:function
construct:generic-method
construct:implicit-conversion
construct:integral-number
construct:invocation
construct:iterator
construct:lambda
construct:linq
construct:list
construct:method
construct:multiply
construct:named-argument
construct:number
construct:parameter
construct:read-only
construct:return
construct:string
construct:subtract
construct:tuple
construct:variable
construct:visibility-modifiers
paradigm:functional
paradigm:imperative
paradigm:object-oriented
technique:higher-order-functions
technique:looping
uses:List<T>
uses:StringBuilder
uses:ValueTuple

Exercise: protein-translation
Code
Imports System
Imports System.Collections.Generic
Imports System.Text
Imports System.Linq

Module ProteinTranslation
    Private dict As Dictionary(Of String, String) = New Dictionary(Of String, String)() From {
        {"AUG", "Methionine"},
        {"UUU", "Phenylalanine"},
        {"UUC", "Phenylalanine"},
        {"UUA", "Leucine"},
        {"UUG", "Leucine"},
        {"UCU", "Serine"},
        {"UCC", "Serine"},
        {"UCA", "Serine"},
        {"UCG", "Serine"},
        {"UAU", "Tyrosine"},
        {"UAC", "Tyrosine"},
        {"UGU", "Cysteine"},
        {"UGC", "Cysteine"},
        {"UGG", "Tryptophan"},
        {"UAA", "STOP"},
        {"UAG", "STOP"},
        {"UGA", "STOP"}
    }
    Function Proteins(ByVal codon As String) As String()
        Return Enumerable.Range(0, codon.Length / 3) _
            .Select(Function(i) codon.Substring(i * 3, 3)) _
            .Select(Function(c) dict(c)).TakeWhile(Function(c) c <> "STOP").ToArray()
    End Function
End Module

Tags:
construct:class
construct:collection-initializer
construct:constructor
construct:dictionary
construct:divide
construct:double
construct:explicit-conversion
construct:floating-point-number
construct:field
construct:floating-point-number
construct:function
construct:implicit-conversion
construct:initializer
construct:int
construct:integral-number
construct:invocation
construct:lambda
construct:linq
construct:method
construct:multiply
construct:number
construct:parameter
construct:return
construct:string
construct:underscore
construct:variable
construct:visibility-modifiers
paradigm:functional
paradigm:object-oriented
technique:higher-order-functions
technique:type-conversion
uses:Dictionary<TKey,TValue>

Exercise: nucleotide-count
Code
Imports System
Imports System.Collections.Generic
Imports System.Linq

Public Module NucleotideCount
    Public Function Count(ByVal sequence As String) As IDictionary(Of Char, Integer)
        If Not sequence.All(Function(c) "ACGT".Contains(c)) Then Throw New ArgumentException()
        Return (sequence & "ACGT").GroupBy(Function(x) x).ToDictionary(Function(g) g.Key, Function(g) g.Count() - 1)
    End Function
End Module

Tags:
construct:string
construct:char
construct:class
construct:constructor
construct:explicit-conversion
construct:function
construct:if
construct:implicit-conversion
construct:invocation
construct:lambda
construct:linq
construct:method
construct:module
construct:number
construct:parameter
construct:return
construct:subtract
construct:throw
construct:using-directive
construct:visibility-modifiers
paradigm:functional
paradigm:object-oriented
technique:exceptions
technique:higher-order-functions
technique:looping
technique:type-conversion

Exercise: luhn
Code
Imports System
Imports System.Linq

Public Module Luhn
    Public Function IsValid(ByVal number As String) As Boolean
        If Not number.All(Function(c) Char.IsDigit(c) OrElse Char.IsWhiteSpace(c)) Then Return False
        If number.Trim().Length < 2 Then Return False

        Return number.Reverse().Where(AddressOf Char.IsDigit).[Select](Function(c) CInt(Char.GetNumericValue(c))).[Select](Function(n, i) If(((i Mod 2) = 0), n, n * 2)).[Select](Function(n) If(n > 9, n - 9, n)).Sum() Mod 10 = 0
    End Function
End Module

Tags:
construct:boolean
construct:char
construct:class
construct:explicit-conversion
construct:function
construct:if
construct:implicit-conversion
construct:integral-number
construct:invocation
construct:lambda
construct:linq
construct:method
construct:module
construct:multiply
construct:number
construct:or
construct:parameter
construct:return
construct:string
construct:subtract
construct:vb:boolean
construct:vb:integral-number
construct:vb:module
construct:visibility-modifiers
paradigm:functional
paradigm:object-oriented
technique:boolean-logic
technique:higher-order-functions
technique:type-conversion

Exercise: rectangles
Code
Imports System

Public Module Rectangles
    Public Function Count(ByVal rows As String()) As Integer
        If rows Is Nothing OrElse rows.Length = 1 OrElse rows.Length = 0 Then Return 0
        Dim strLen As Integer = rows(0).Length
        Dim recCount As Integer = 0

        For i As Integer = 0 To rows.Length - 1 - 1
            For k As Integer = 0 To strLen - 1 - 1
                If rows(i)(k) = "+"c Then
                    For m As Integer = k + 1 To strLen - 1
                        If rows(i)(m) = "+"c Then
                            Dim isContinue1 As Boolean = True

                            For x As Integer = k + 1 To m - 1
                                If rows(i)(x) = " "c OrElse rows(i)(x) = "|"c Then isContinue1 = False
                            Next

                            If Not isContinue1 Then Exit For

                            For j As Integer = i + 1 To rows.Length - 1
                                If rows(j)(k) = " "c OrElse rows(j)(k) = "-"c OrElse rows(j)(m) = " "c OrElse rows(j)(m) = "-"c Then Exit For

                                If rows(j)(k) = "+"c AndAlso rows(j)(m) = "+"c Then
                                    Dim isContinue2 As Boolean = True

                                    For x As Integer = k + 1 To m - 1
                                        If rows(j)(x) = " "c OrElse rows(j)(x) = "|"c Then isContinue2 = False
                                    Next

                                    If Not isContinue2 Then Exit For
                                    recCount += 1
                                End If
                            Next
                        End If
                    Next
                End If
            Next
        Next

        Return recCount
    End Function
End Module

Tags:
construct:add
construct:assignment
construct:boolean
construct:char
construct:exit
construct:for-loop
construct:function
construct:if
construct:implicit-conversion
construct:indexer
construct:integral-number
construct:invocation
construct:lambda
construct:logical-and
construct:logical-or
construct:method
construct:module
construct:number
construct:parameter
construct:return
construct:string
construct:subtract
construct:to-integer
construct:variable
construct:visibility-modifiers
paradigm:functional
paradigm:imperative
paradigm:object-oriented
technique:boolean-logic
technique:higher-order-functions
technique:looping

Exercise: dnd-character
Code
Imports System
Imports System.Linq

Public Class DndCharacter
    Public ReadOnly Property Strength As Integer = Ability()
    Public ReadOnly Property Dexterity As Integer = Ability()
    Public ReadOnly Property Constitution As Integer = Ability()
    Public ReadOnly Property Intelligence As Integer = Ability()
    Public ReadOnly Property Wisdom As Integer = Ability()
    Public ReadOnly Property Charisma As Integer = Ability()
    Public ReadOnly Property Hitpoints As Integer
        Get
            Return 10 + Modifier(Constitution)
        End Get
    End Property

    Public Shared Function Modifier(ByVal score As Integer) As Integer
        Return Math.Floor((score - 10) / 2.0)
    End Function

    Public Shared Function Ability() As Integer
        Dim random As New Random()
        Dim diceRolls As Integer() = Enumerable.Repeat(0, 4).Select(Function(x) random.Next(1, 7)).OrderByDescending(Function(x) x).Take(3).ToArray()
        Return diceRolls.Sum()
    End Function

    Public Shared Function Generate() As DndCharacter
        Return New DndCharacter()
    End Function
End Class

Tags:
construct:add
construct:assignment
construct:class
construct:constructor
construct:divide
construct:double
construct:explicit-conversion
construct:field
construct:floating-point-number
construct:function
construct:getter
construct:implicit-conversion
construct:int
construct:integral-number
construct:invocation
construct:lambda
construct:linq
construct:local-function
construct:method
construct:number
construct:parameter
construct:property
construct:read-only
construct:return
construct:subtract
construct:variable
construct:visibility-modifiers
paradigm:functional
paradigm:imperative
paradigm:object-oriented
technique:higher-order-functions
technique:randomness
technique:type-conversion
uses:Random

Exercise: roman-numerals
Code
Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Runtime.CompilerServices

Public Module RomanNumeralExtension
    Private data As New Dictionary(Of Integer, String()) From {
        {1, New String() {"", "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX"}},
        {10, New String() {"", "X", "XX", "XXX", "XL", "L", "LX", "LXX", "LXXX", "XC"}},
        {100, New String() {"", "C", "CC", "CCC", "CD", "D", "DC", "DCC", "DCCC", "CM"}},
        {1000, New String() {"", "M", "MM", "MMM"}}
    }

    <System.Runtime.CompilerServices.Extension()>
    Public Function ToRoman(ByVal value As Integer) As String
        Return value.ToString().Reverse().
            Select(Function(c, i) data(CInt(Math.Pow(10, i)))(CInt(Char.GetNumericValue(c)))).
            Reverse().
            Aggregate("", Function(a, b) a & b)
    End Function
End Module

Tags:
construct:verbatim-string
construct:add
construct:as-cast
construct:assignment
construct:char
construct:class
construct:collection-initializer
construct:constructor
construct:dictionary
construct:double
construct:extension-method
construct:field
construct:floating-point-number
construct:from-number-implicit
construct:implicit-conversion
construct:indexer
construct:initializer
construct:integral-number
construct:invocation
construct:lambda
construct:linq
construct:method
construct:module
construct:number
construct:parameter
construct:return
construct:string
construct:throw
construct:using-directive
construct:variable
construct:visibility-modifiers
paradigm:functional
paradigm:imperative
paradigm:object-oriented
technique:exceptions
technique:higher-order-functions
technique:math

Exercise: say
Code
Imports System
Imports System.Collections.Generic

Public Module Say
    Private digitNames As New Dictionary(Of Long, String)()
    Private upToTwentyNames As New Dictionary(Of Long, String)()
    Private tensNames As New Dictionary(Of Long, String)()

    Sub New()
        digitNames.Add(0, "zero")
        digitNames.Add(1, "one")
        digitNames.Add(2, "two")
        digitNames.Add(3, "three")
        digitNames.Add(4, "four")
        digitNames.Add(5, "five")
        digitNames.Add(6, "six")
        digitNames.Add(7, "seven")
        digitNames.Add(8, "eigth")
        digitNames.Add(9, "nine")

        upToTwentyNames.Add(0, "ten")
        upToTwentyNames.Add(1, "eleven")
        upToTwentyNames.Add(2, "twelve")
        upToTwentyNames.Add(3, "thirteen")
        upToTwentyNames.Add(4, "fourteen")
        upToTwentyNames.Add(5, "fifteen")
        upToTwentyNames.Add(6, "sixteen")
        upToTwentyNames.Add(7, "seventeen")
        upToTwentyNames.Add(8, "eigteen")
        upToTwentyNames.Add(9, "nineteen")

        tensNames.Add(1, "ten")
        tensNames.Add(2, "twenty")
        tensNames.Add(3, "thirty")
        tensNames.Add(4, "forty")
        tensNames.Add(5, "fifty")
        tensNames.Add(6, "sixty")
        tensNames.Add(7, "seventy")
        tensNames.Add(8, "eighty")
        tensNames.Add(9, "ninety")
        tensNames.Add(10, "hundred")
    End Sub

    Const tens As Long = 10
    Const hundreds As Long = 10 * 10
    Const thousands As Long = hundreds * tens
    Const millions As Long = thousands * hundreds * tens
    Const billions As Long = millions * hundreds * tens

    Public Function InEnglish(ByVal number As Long) As String
        If number < 0 OrElse number ><PHONE_NUMBER>99L Then
            Throw New ArgumentOutOfRangeException()
        End If

        If number < tens Then
            Return GetDigit(number)
        End If

        If number < hundreds Then
            Return GetTens(number)
        End If

        If number < thousands Then
            Return GetRecurse(number, hundreds, " hundred")
        End If

        If number < millions Then
            Return GetRecurse(number, thousands, " thousand")
        End If

        If number < billions Then
            Return GetRecurse(number, millions, " million")
        End If

        If number <=<PHONE_NUMBER>99L Then
            Return GetRecurse(number, billions, " billion")
        End If

        Throw New ArgumentOutOfRangeException()
    End Function

    Public Function GetRecurse(ByVal ths As Long, ByVal divider As Long, ByVal marker As String) As String
        Dim hund As Long = ths \ divider
        Dim remainder As Long = ths Mod divider
        Dim dec = InEnglish(hund) & marker

        If remainder > 0 Then
            dec &= " " & InEnglish(remainder)
        End If

        Return dec
    End Function

    Public Function GetTens(ByVal ten As Long) As String
        Dim hund As Long = ten \ tens
        Dim remainder As Long = ten Mod tens

        If hund = 1 Then
            Return upToTwentyNames(remainder)
        End If

        Dim dec = tensNames(hund)

        If remainder > 0 Then
            dec &= "-" & GetDigit(remainder)
        End If

        Return dec
    End Function

    Public Function GetDigit(ByVal ten As Long) As String
        Return digitNames(ten)
    End Function
End Module

Tags:
construct:assignment
construct:bitwise-or
construct:boolean
construct:class
construct:const
construct:constructor
construct:dictionary
construct:divide
construct:field
construct:function
construct:if
construct:implicit-conversion
construct:indexer
construct:invocation
construct:lambda
construct:logical-or
construct:long
construct:method
construct:multiply
construct:number
construct:parameter
construct:return
construct:string
construct:throw
construct:variable
construct:visibility-modifiers
paradigm:functional
paradigm:imperative
paradigm:object-oriented
technique:bit-manipulation
technique:bit-shifting
technique:boolean-logic
technique:exceptions
technique:higher-order-functions
technique:recursion
uses:Dictionary<TKey,TValue>

Exercise: sublist
Code
Imports System
Imports System.Collections.Generic
Imports System.Linq

Public Enum SublistType
    Equal
    Unequal
    Superlist
    Sublist
End Enum

Public Module Sublist
    Public Function Classify(Of T As {IComparable})(ByVal list1 As List(Of T), ByVal list2 As List(Of T)) As SublistType
        If list1.SequenceEqual(list2) Then
            Return SublistType.Equal
        End If

        For i = 0 To Math.Abs(list1.Count - list2.Count)
            If list1.Count > list2.Count AndAlso list1.GetRange(i, list2.Count).SequenceEqual(list2) Then
                Return SublistType.Superlist
            End If

            If list1.Count < list2.Count AndAlso list2.GetRange(i, list1.Count).SequenceEqual(list1) Then
                Return SublistType.Sublist
            End If
        Next

        Return SublistType.Unequal
    End Function
End Module

Tags:
construct:boolean
construct:enum
construct:for-loop
construct:function
construct:generic-type
construct:if
construct:implicit-conversion
construct:integral-number
construct:invocation
construct:lambda
construct:linq
construct:list
construct:logical-and
construct:method
construct:module
construct:number
construct:parameter
construct:return
construct:subtract
construct:to-lower
construct:type-constraint
construct:visibility-modifiers
paradigm:functional
paradigm:object-oriented
technique:boolean-logic
technique:higher-order-functions
technique:looping
uses:List<T>

Exercise: simple-linked-list
Code
Imports System
Imports System.Collections
Imports System.Collections.Generic

Public Class SimpleLinkedList(Of T)
    Implements IEnumerable(Of T)

    Private ReadOnly _stack As Stack(Of T)

    Public Sub New()
        _stack = New Stack(Of T)()
    End Sub

    Public Sub New(ByVal source As IEnumerable(Of T))
        _stack = New Stack(Of T)(source)
    End Sub

    Public ReadOnly Property Count As Integer
        Get
            Return _stack.Count
        End Get
    End Property

    Public Sub Push(ByVal value As T)
        _stack.Push(value)
    End Sub

    Public Function Pop() As T
        Return _stack.Pop()
    End Function

    Public Function GetEnumerator() As IEnumerator(Of T) Implements IEnumerable(Of T).GetEnumerator
        Return _stack.GetEnumerator()
    End Function

    Private Function IEnumerable_GetEnumerator() As IEnumerator Implements IEnumerable.GetEnumerator
        Return GetEnumerator()
    End Function
End Class

Tags:
construct:assignment
construct:class
construct:constructor
construct:end-of-line
construct:field
construct:generic-type
construct:getter
construct:import
construct:invocation
construct:method
construct:parameter
construct:property
construct:read-only
construct:return
construct:stack
construct:sub
construct:visibility-modifiers
paradigm:imperative
paradigm:object-oriented
uses:Stack<T>

This is an automated comment
Hello :wave: Next week we're going to start using the tagging work people are doing on these. If you've already completed the work, thank you! If you've not, but intend to this week, that's great! If you're not going to get round to doing it, and you've not yet posted a comment letting us know, could you please do so, so that we can find other people to do it. Thanks!


Question about pad_shape

I use coco datasets with instances_minival2014.json  but I got error as following:
2019-06-25 15:40:49,333 - INFO - Epoch [1][1100/2476]	lr: 0.00250, eta: 18:47:20, time: 2.419, data_time: 0.036, memory: 4873, loss_rpn_cls: 0.1301, loss_rpn_bbox: 0.0608, s0.loss_cls: 0.5617, s0.acc: 90.4805, s0.loss_bbox: 0.1975, s0.loss_mask: 0.5710, s1.loss_cls: 0.2107, s1.acc: 92.9980, s1.loss_bbox: 0.1178, s1.loss_mask: 0.2874, s2.loss_cls: 0.0675, s2.acc: 95.9551, s2.loss_bbox: 0.0301, s2.loss_mask: 0.1507, loss: 2.3854
Traceback (most recent call last):
  File "/media/data/helloworld_/mmdetection/tools/train2.py", line 100, in <module>
    main()
  File "/media/data/helloworld_/mmdetection/tools/train2.py", line 96, in main
    logger=logger)
  File "/media/data/helloworld_/mmdetection/mmdet/apis/train.py", line 61, in train_detector
    _non_dist_train(model, dataset, cfg, validate=validate)
  File "/media/data/helloworld_/mmdetection/mmdet/apis/train.py", line 202, in _non_dist_train
    runner.run(data_loaders, cfg.workflow, cfg.total_epochs)
  File "/home/hello/.conda/envs/torch1.1/lib/python3.7/site-packages/mmcv-0.2.8-py3.7.egg/mmcv/runner/runner.py", line 356, in run
    epoch_runner(data_loaders[i], **kwargs)
  File "/home/hello/.conda/envs/torch1.1/lib/python3.7/site-packages/mmcv-0.2.8-py3.7.egg/mmcv/runner/runner.py", line 258, in train
    for i, data_batch in enumerate(data_loader):
  File "/home/hello/.conda/envs/torch1.1/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 582, in __next__
    return self._process_next_batch(batch)
  File "/home/hello/.conda/envs/torch1.1/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 608, in _process_next_batch
    raise batch.exc_type(batch.exc_msg)
AssertionError: Traceback (most recent call last):
  File "/home/hello/.conda/envs/torch1.1/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 99, in _worker_loop
    samples = collate_fn([dataset[i] for i in batch_indices])
  File "/home/hello/.conda/envs/torch1.1/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 99, in <listcomp>
    samples = collate_fn([dataset[i] for i in batch_indices])
  File "/media/data/helloworld_/mmdetection/mmdet/datasets/custom.py", line 169, in __getitem__
    data = self.prepare_train_img(idx)
  File "/media/data/helloworld_/mmdetection/mmdet/datasets/custom.py", line 240, in prepare_train_img
    scale_factor, flip)
  File "/media/data/helloworld_/mmdetection/mmdet/datasets/transforms.py", line 109, in __call__
    mmcv.impad(mask, pad_shape[:2], pad_val=0) for mask in masks
  File "/media/data/helloworld_/mmdetection/mmdet/datasets/transforms.py", line 109, in <listcomp>
    mmcv.impad(mask, pad_shape[:2], pad_val=0) for mask in masks
  File "/home/hello/.conda/envs/torch1.1/lib/python3.7/site-packages/mmcv-0.2.8-py3.7.egg/mmcv/image/transforms/geometry.py", line 183, in impad
    **assert shape[i] >= img.shape[i]
AssertionError**

I just made the following changes：
data = dict(
    imgs_per_gpu=2,
    workers_per_gpu=2,
    train=dict(
        type=dataset_type,
        ann_file=data_root + 'annotations/instances_minival2014.json',
        img_prefix=data_root + 'val2014/',
        # (long_edge, short_edge) or [(long1, short1), (long2, short2), ...]
        img_scale=(1333, 800),#
        img_norm_cfg=img_norm_cfg,
        size_divisor=32,
        flip_ratio=0.5,
        with_mask=True,
        with_crowd=True,
        with_label=True),
    val=dict(
        type=dataset_type,
        ann_file=data_root + 'annotations/instances_minival2014.json',
        img_prefix=data_root + 'val2014/',
        img_scale=(1333, 800),
        img_norm_cfg=img_norm_cfg,
        size_divisor=32,
        flip_ratio=0,
        with_mask=True,
        with_crowd=True,
        with_label=True),
    test=dict(
        type=dataset_type,
        ann_file=data_root + 'annotations/instances_minival2014.json',
        img_prefix=data_root + 'val2014/',
        img_scale=(1333, 800),
        img_norm_cfg=img_norm_cfg,
        size_divisor=32,
        flip_ratio=0,
        with_mask=False,
        with_label=False,
        test_mode=True))

#482


[sourcekit] Fix a lock inversion in editorReplaceText found by TSan

When triggering replaceText we were locking the EditorDocument then the ASTProducer, but during AST building we do the reverse. This would cause a deadlock if these two bits of code raced. Break the cycle by dropping the editor lock when calling into the ASTManager.
Also, since this seems like the most likely cause of the timeouts in the CloseAndReopen test, re-enable it.
Thank you TSan!

@swift-ci please smoke test


Pipette Gen2: Ensure proper currents

HW reports skipping during pipette gen2 plunger axis homing. Verify that

The current for general actions is at 1A
This current is used for everything, drop tip, home, aspirate/dispense, etc
Holding happens at a reduced current

On further investigation, driver.set_active_current (through intermediaries) is called with the active current from the pipettemodelspecs before every action except home. We need to set the current before homing pipettes

in apiv2, at all times
in apiv1, when calling robot.home() (rather than pipette.home(), which sets currents correctly)


cloudapi: User customization

Add support for the user stage to the composer-api as an optional customization.
type UsersStageOptionsUser struct {
	UID         *int     `json:"uid,omitempty"`
	GID         *int     `json:"gid,omitempty"`
	Groups      []string `json:"groups,omitempty"`
	Description *string  `json:"description,omitempty"`
	Home        *string  `json:"home,omitempty"`
	Shell       *string  `json:"shell,omitempty"`
	Password    *string  `json:"password,omitempty"`
	Key         *string  `json:"key,omitempty"`
}

Fields that should be supported per user:

Key
Groups

Maybe:

?Home?
?Password? (not sure about this one, erring on not)

And could we switch the API tests, so that they generate an ssh key, embed it, and then ssh into it using that. Rather than generating the keys via the platform? (Hope that's possible for all 3 cloud platforms).

@teg Unsure if we should support/add the ability to customize everything here? Or should we just add some fields?

i suggest going minimal: ssh+group

I've added the functionality. But I'm running into an issue, if I specify a user with some groups, if the group does not exist the stage fails. We do not expose group addition through cloudapi, should we ?
If we look at the list of Customizations that are available for a blueprint, there's a lot we can add:
type Customizations struct {
	Hostname *string                `json:"hostname,omitempty" toml:"hostname,omitempty"`
	Kernel   *KernelCustomization   `json:"kernel,omitempty" toml:"kernel,omitempty"`
	SSHKey   []SSHKeyCustomization  `json:"sshkey,omitempty" toml:"sshkey,omitempty"`
	User     []UserCustomization    `json:"user,omitempty" toml:"user,omitempty"`
	Group    []GroupCustomization   `json:"group,omitempty" toml:"group,omitempty"`
	Timezone *TimezoneCustomization `json:"timezone,omitempty" toml:"timezone,omitempty"`
	Locale   *LocaleCustomization   `json:"locale,omitempty" toml:"locale,omitempty"`
	Firewall *FirewallCustomization `json:"firewall,omitempty" toml:"firewall,omitempty"`
	Services *ServicesCustomization `json:"services,omitempty" toml:"services,omitempty"`
}

What are your thoughts ?

Hm I wonder if the user customization stage happens after package installation ? (That way if a package was requested which creates a group, it'll be there).
Furthermore I think that's fine actually, in the UI I imagine we'd only ask for specific groups like wheel or systemd-journal.
An other option would be to imply a groups stage. But I'm not sure if that's desirable.

Jul 26 09:58:55 fedora osbuild-worker[1541571]: Running 'osbuild' job 0ea402c4-1879-411a-bf07-c4735908f3fb
Jul 26 10:02:17 fedora osbuild-worker[1541571]: Build stages results:
Jul 26 10:02:17 fedora osbuild-worker[1541571]: 2021/07/26 10:02:17 org.osbuild.rpm  success
Jul 26 10:02:17 fedora osbuild-worker[1541571]: 2021/07/26 10:02:17 org.osbuild.selinux  success
Jul 26 10:02:17 fedora osbuild-worker[1541571]: Stages results:
Jul 26 10:02:17 fedora osbuild-worker[1541571]: 2021/07/26 10:02:17 org.osbuild.rpm  success
Jul 26 10:02:17 fedora osbuild-worker[1541571]: 2021/07/26 10:02:17 org.osbuild.fix-bls  success
Jul 26 10:02:17 fedora osbuild-worker[1541571]: 2021/07/26 10:02:17 org.osbuild.fstab  success
Jul 26 10:02:17 fedora osbuild-worker[1541571]: 2021/07/26 10:02:17 org.osbuild.grub2  success
Jul 26 10:02:17 fedora osbuild-worker[1541571]: 2021/07/26 10:02:17 org.osbuild.locale  success
Jul 26 10:02:17 fedora osbuild-worker[1541571]: 2021/07/26 10:02:17 org.osbuild.timezone  success
Jul 26 10:02:17 fedora osbuild-worker[1541571]: 2021/07/26 10:02:17 org.osbuild.users  success
Jul 26 10:02:17 fedora osbuild-worker[1541571]: 2021/07/26 10:02:17 org.osbuild.systemd  success
Jul 26 10:02:17 fedora osbuild-worker[1541571]: 2021/07/26 10:02:17 org.osbuild.selinux  success
Jul 26 10:02:17 fedora osbuild-worker[1541571]: 2021/07/26 10:02:17 org.osbuild.sysconfig  success
Jul 26 10:02:17 fedora osbuild-worker[1541571]: 2021/07/26 10:02:17 [AWS] 🚀 Uploading image to S3: org.osbuild.test.central/composer-api-42d9ddc8-a363-4c2c-89c6-4aa6d40feeb8
Jul 26 10:04:45 fedora osbuild-worker[1541571]: 2021/07/26 10:04:45 [AWS] 📥 Importing snapshot from image: org.osbuild.test.central/composer-api-42d9ddc8-a363-4c2c-89c6-4aa6d40feeb8
Jul 26 10:04:46 fedora osbuild-worker[1541571]: 2021/07/26 10:04:46 [AWS] 🚚 Waiting for snapshot to finish importing: import-snap-02a7204929696e771
Jul 26 10:06:47 fedora osbuild-worker[1541571]: 2021/07/26 10:06:47 [AWS] 🧹 DelJul 26 09:58:55 fedora osbuild-worker[1541571]: Running 'osbuild' job 0ea402c4-1879-411a-bf07-c4735908f3fb
Jul 26 10:02:17 fedora osbuild-worker[1541571]: Build stages results:
Jul 26 10:02:17 fedora osbuild-worker[1541571]: 2021/07/26 10:02:17 org.osbuild.rpm  success
Jul 26 10:02:17 fedora osbuild-worker[1541571]: 2021/07/26 10:02:17 org.osbuild.selinux  success
Jul 26 10:02:17 fedora osbuild-worker[1541571]: Stages results:
Jul 26 10:02:17 fedora osbuild-worker[1541571]: 2021/07/26 10:02:17 org.osbuild.rpm  success
Jul 26 10:02:17 fedora osbuild-worker[1541571]: 2021/07/26 10:02:17 org.osbuild.fix-bls  success
Jul 26 10:02:17 fedora osbuild-worker[1541571]: 2021/07/26 10:02:17 org.osbuild.fstab  success
Jul 26 10:02:17 fedora osbuild-worker[1541571]: 2021/07/26 10:02:17 org.osbuild.grub2  success
Jul 26 10:02:17 fedora osbuild-worker[1541571]: 2021/07/26 10:02:17 org.osbuild.locale  success
Jul 26 10:02:17 fedora osbuild-worker[1541571]: 2021/07/26 10:02:17 org.osbuild.timezone  success
Jul 26 10:02:17 fedora osbuild-worker[1541571]: 2021/07/26 10:02:17 org.osbuild.users  success
Jul 26 10:02:17 fedora osbuild-worker[1541571]: 2021/07/26 10:02:17 org.osbuild.systemd  success
Jul 26 10:02:17 fedora osbuild-worker[1541571]: 2021/07/26 10:02:17 org.osbuild.selinux  success
Jul 26 10:02:17 fedora osbuild-worker[1541571]: 2021/07/26 10:02:17 org.osbuild.sysconfig  success
Jul 26 10:02:17 fedora osbuild-worker[1541571]: 2021/07/26 10:02:17 [AWS] 🚀 Uploading image to S3: org.osbuild.test.central/composer-api-42d9ddc8-a363-4c2c-89c6-4aa6d40feeb8
Jul 26 10:04:45 fedora osbuild-worker[1541571]: 2021/07/26 10:04:45 [AWS] 📥 Importing snapshot from image: org.osbuild.test.central/composer-api-42d9ddc8-a363-4c2c-89c6-4aa6d40feeb8
Jul 26 10:04:46 fedora osbuild-worker[1541571]: 2021/07/26 10:04:46 [AWS] 🚚 Waiting for snapshot to finish importing: import-snap-02a7204929696e771
Jul 26 10:06:47 fedora osbuild-worker[1541571]: 2021/07/26 10:06:47 [AWS] 🧹 Deleting image from S3: org.osbuild.test.central/composer-api-42d9ddc8-a363-4c2c-89c6-4aa6d40feeb8
Jul 26 10:06:48 fedora osbuild-worker[1541571]: 2021/07/26 10:06:48 [AWS] 📋 Registering AMI from imported snapshot: snap-00b5ffb5f73a2d83c
Jul 26 10:06:48 fedora osbuild-worker[1541571]: 2021/07/26 10:06:48 [AWS] 🎉 AMI registered: ami-086211be0e57a95bb
Jul 26 10:06:48 fedora osbuild-worker[1541571]: 2021/07/26 10:06:48 Job 0ea402c4-1879-411a-bf07-c4735908f3fb finishedeting image from S3: org.osbuild.test.central/composer-api-42d9ddc8-a363-4c2c-89c6-4aa6d40feeb8
Jul 26 10:06:48 fedora osbuild-worker[1541571]: 2021/07/26 10:06:48 [AWS] 📋 Registering AMI from imported snapshot: snap-00b5ffb5f73a2d83c
Jul 26 10:06:48 fedora osbuild-worker[1541571]: 2021/07/26 10:06:48 [AWS] 🎉 AMI registered: ami-086211be0e57a95bb
Jul 26 10:06:48 fedora osbuild-worker[1541571]: 2021/07/26 10:06:48 Job 0ea402c4-1879-411a-bf07-c4735908f3fb finished

It looks like the user is added after the packages installation indeed.

Reopening this because a valid question popped up.
If the requested user should be in the wheel group, getting sudo access, and the account is locked (which is the case if no password is specified), we either need to allow passwordless sudo for this user, or we need to force a password.
I'm not sure what's best here, wdyt @teg, i'm also not sure what edge needs.

@thozza We now have passwordless sudo for amis, right? What about vhd (azure and gcp)?  From my point of view, passwordless sudo makes sense in terms of cloud images.

@ondrejbudai not really, we have the same situation as it was before with ami images, we just changed the username of the default user created by cloud-init. The sudoers configuration is created by cloud-init on first boot, but only for users configured in its configuration. On RHEL EC2 images, it creates:
[root@ip-172-31-31-109 ec2-user]# cat /etc/sudoers.d/90-cloud-init-users
# Created by cloud-init v. 20.3-10.el8_4.2 on Wed, 08 Sep 2021 09:16:22 +0000

# User rules for ec2-user
ec2-user ALL=(ALL) NOPASSWD:ALL

So the passwordless sudo is effectively configured only for the default user. In GCP's case, I would expect this to be handled by their guest tools (I'm honestly not sure now), but since we are still relying on cloud-init there, the situation will be similar to AWS in the sense that the passwordless sudo is configured only for the cloud-init default user and the SSH keys provided via the instance metadata are added as authorised keys for the default user. I'm not sure about Azure, but unless their guest tools do something special, then it will be again the same story with cloud-init.


Make TravisCI tests independent of Public Gateway

Some tests expect actual response the public gateway and run fine locally  but fail on TravisCI due to high load / network limiting.
To be sure I commented suspected tests in separate branch and confirmed that tests pass just fine when we don't rely on response from http://ipfs.io/ipfs/...

Perhaps we could have a local mirror of assets used in tests, and serve them from localhost (with gateway host spoofed in /etc/hosts).
It would require (quick brain dump):

npm test spawning  grunt-contrib-connect with self-signed cert
programmatic way to import CA to Firefox
prepending public gateway list with 'fake one' (in test/prefs-util.js)
replacing hardcoded https://ipfs.io/ with gw.publicUri  in all tests
ipfs cat all used multihashes and resources into tests/assets (to be served by gulp)

Ok, for now I just added a workaround for the one test that always failed at Travis. It runs locally, but is skipped at Travis.


Provide portal link for message about function upgrade

From a customer: “I keep getting told to upgrade my functions, but it doesn’t tell me why and makes me scared i’m going ot have a lot of shit to deal wit” [sic]
We should have a link in the portal so that customers can find out if they will be affected by breaking changes.

Perhaps we should link to the release notes, which is where we detail the fixes, breaking changes, etc.

Yep, we should do exactly that. We might need to expand the release notes a bit to help people understand breaking changes and how to get through them.
e.g. for 0.6, explain how the name restriction can cause functions to disappear after upgrade, and how they can get them back via Kudu Console by renaming a folder. Basically, actionable help.

@lindydonna - please get the link created and work on the string for the portal.

@alrod Please add the following. Link should open in a new tab (target=blank)
To learn more, see Azure Functions release notes.


Simple sphere example doesn't work on MacOS 10.12.3, Racket v6.8

I tried the most basic example (making just a sphere), and it failed with the following output:
$ ./ruckus-3d ~/Documents/sphere.rkt  2>&1 > ~/failure
generate-compile-and-link: error compiling: ERROR: 0:1: '' :  version '130' is not supported
ERROR: 0:105: 'uint' : syntax error: syntax error

  context...:
   /Users/yminsky/Library/Racket/6.8/pkgs/ruckus/viz/viewer.rkt:55:8
   /Applications/Racket v6.8/collects/racket/private/more-scheme.rkt:148:2: call-with-break-parameterization
   /Applications/Racket v6.8/collects/ffi/unsafe/atomic.rkt:72:13
   /Applications/Racket v6.8/share/pkgs/gui-lib/mred/private/wx/common/canvas-mixin.rkt:144:4: do-on-paint method in ...mon/canvas-mixin.rkt:118:2
   /Applications/Racket v6.8/share/pkgs/gui-lib/mred/private/wx/cocoa/panel.rkt:71:6: for-loop
   /Applications/Racket v6.8/share/pkgs/gui-lib/mred/private/wx/cocoa/panel.rkt:70:4: paint-children method in ...e/wx/cocoa/panel.rkt:37:2
   /Applications/Racket v6.8/share/pkgs/gui-lib/mred/private/wx/cocoa/panel.rkt:71:6: for-loop
   /Applications/Racket v6.8/share/pkgs/gui-lib/mred/private/wx/cocoa/panel.rkt:70:4: paint-children method in ...e/wx/cocoa/panel.rkt:37:2
   /Applications/Racket v6.8/share/pkgs/gui-lib/mred/private/wx/cocoa/frame.rkt:401:4: show method in frame%
   /Applications/Racket v6.8/collects/racket/private/more-scheme.rkt:148:2: call-with-break-parameterization
   /Applications/Racket v6.8/collects/ffi/unsafe/atomic.rkt:72:13
   (submod /Users/yminsky/Library/Racket/6.8/pkgs/ruckus/viz/view3d.rkt main): [running body]
bin $ ./ruckus-3d ~/Documents/sphere.rkt  2>&1
Loading opengl bindings...
cpu time: 286 real time: 287 gc time: 118
Creating viewer window...
Recompiling design at /Users/yminsky/Documents/sphere.rkt
Design contains 1 nodes.
#version 130

const float PI = 3.14159265358979323846;
const float ISOSURFACE = 0.0;
const vec4 BACKGROUND = vec4(0.1, 0.1, 0.3, 1);

uniform vec2 resolution;
uniform sampler2D nodeColors;

float smin(float k, float a, float b) {
    float h = clamp(0.5 + 0.5 * (b - a) / k, 0.0, 1.0);
    return mix(b, a, h) - k * h * (1.0 - h);
}

////////////////////////////////////////////////////////////////////////////////
// Quaternion support.  Note that quaternions are represented
// with the vector portion in xyz and the scalar in w.

// Conjugate.
vec4 qconj(vec4 q) {
  return vec4(-q.xyz, q.w);
}

// Quaternion multiplication.
vec4 qmul(vec4 p, vec4 q) {
  return vec4(p.w * q.xyz + q.w * p.xyz + cross(p.xyz, q.xyz),
              p.w * q.w - dot(p.xyz, q.xyz));
}

// Rotate vector by quaternion, giving new vector.
vec3 qrot(vec4 q, vec3 v) {
  return qmul(qmul(q, vec4(v, 0)), qconj(q)).xyz;
}

////////////////////////////////////////////////////////////////////////////////
// Primitive distance field evaluators.  These are defined here and invoked
// from generated code to reduce duplication, because while I'm pretty
// confident that GLSL compilers can inline, I'm not sure they can extract
// functions.

float dfSphere(float radius, vec3 p) {
  return length(p) - radius;
}

float dfCircle(float radius, vec3 p) {
  return length(p.xy) - radius;
}

float dfBox(vec3 corner, vec3 p) {
  vec3 d = abs(p) - corner;
  return min(max(d.x, max(d.y, d.z)), 0.)
       + length(max(d, 0.));
}

float dfRect(float w, float h, vec3 p) {
  vec2 corner = vec2(w, h);
  vec2 d = abs(p.xy) - corner;
  return min(max(d.x, d.y), 0.)
       + length(max(d, 0.));
}

float dfCapsule(float halfh, float r, vec3 q) {
  q = abs(q);
  float t = clamp((q.z * halfh) / (halfh * halfh), 0.0, 1.0);
  return length(q - vec3(0, 0, halfh * t)) - r;
}

vec3 radialProject(vec3 pos, float period, float shift) {
  float a = pos.x == 0. ? (sign(pos.y) * (PI / 2.)) : atan(pos.y, pos.x);
  float d = length(pos.xy);
  float a_ = mod(a + (period/2.), period) - (period/2.) + shift;
  return vec3(d * cos(a_),
              d * sin(a_),
              pos.z);
}

////////////////////////////////////////////////////////////////////////////////
// Global distance field evaluator.

// Prototype; generated at runtime and appended to this file.
float distanceField(vec3 r0);

// Computes the distance field gradient using the method of central
// differences, which also happens to approximate the normal of a
// nearby surface.  We use it for lighting calculations.
vec3 distanceFieldNormal(vec3 pos, float eps) {
  // TODO: should this actually depend on the intersection threshold?
  float h = eps / 2.;

  vec3 g = vec3(
    distanceField(pos + vec3(h, 0, 0)) - distanceField(pos - vec3(h, 0, 0)),
    distanceField(pos + vec3(0, h, 0)) - distanceField(pos - vec3(0, h, 0)),
    distanceField(pos + vec3(0, 0, h)) - distanceField(pos - vec3(0, 0, h)));

  return normalize(g);
}

////////////////////////////////////////////////////////////////////////////////
// Object discrimination.

// Prototype; generated at runtime and appended to this file.
uint nearestNodeId(vec3 r0);

vec3 matColor(uint nid) {
  return texelFetch(nodeColors, ivec2(nid % 512u, nid / 512u), 0).rgb;
}

////////////////////////////////////////////////////////////////////////////////
// False-color visualization support.

// Converts an HSV color to its RGB equivalent.  Generating false colors in
// HSV is *far* more convenient, so we pay the (low) cost.
// Source: http://lolengine.net/blog/2013/07/27/rgb-to-hsv-in-glsl
vec3 hsv2rgb(vec3 c) {
  vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
  vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
  return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
}

// Generates a color intended to make gradations between 0 and 1 more obvious.
// The current implementation wraps around above 1, so you may want to clamp.
vec4 falseColor(float level) {
  return vec4(hsv2rgb(vec3(level + (120. / 360.), 1, 1)), 1);
}
const vec3 LIGHT = vec3(0, 0, 100);
const float TRUST = 1.0;

const float i_a = 0.3;
const float i_d = 0.6;
const float i_s = 0.4;

const float k_a = 0.6;
const float k_d = 0.7;
const float k_s = 0.8;
const float alpha = 8.;

uniform vec4 orientation;
uniform float zoom;
uniform float closeEnough;
uniform int stepLimit;
uniform bool showComplexity;
uniform bool showDistance;

out vec4 fragColor;

void main() {
  // Paperwork!

  // Clipping plane Z coordinates.
  float near =  1500.;
  float far  = -1500.;

  // TODO: camera Z needs to depend on clip plane positions!
  vec3 cameraPosition = vec3(0, 0, near + near);

  // Position of pixel being traced on the near clip plane.
  vec3 pos = vec3(gl_FragCoord.xy - resolution.xy / 2., near);
  vec3 npos = pos / resolution.x;

  // Direction in which this ray will advance.
  vec3 dir = normalize(pos - cameraPosition);
  // Shorthand for the object-to-eye vector, used for specular reflection.
  vec3 toEye = qrot(orientation, -dir);

  // Initialized with black to handle the "too many steps" case, this will
  // be overwritten if the ray either hits a surface, or escapes past the
  // far clipping plane.
  vec4 color = vec4(0, 0, 0, 1);

  // Rotate the light position into object space.
  vec3 rLight = qrot(orientation, LIGHT);

  // Ray-marching loop!

  int stepsTaken = 0;
  float d = 0.;
  for (int steps = 0; steps < stepLimit; ++steps) {
    // GLSL won't let us use an externally declared iteration variable, so
    // we copy 'steps' to 'stepsTaken' at each iteration so that we may use
    // it later to show march complexity.
    stepsTaken = steps;

    // Early-exit the marching process at the far clip plane.  This improves
    // performance significantly when software rendering with Mesa; unclear
    // whether it helps on hardware.
    if (pos.z < far) {
      color = BACKGROUND;
      break;
    }

    // Transform the ray's position into object space.
    // TODO: couldn't we just do the marching in object space?  Sure, it
    // makes the far clip plane check more expensive, but it's just a plane
    // test....
    vec3 tpos = qrot(orientation, pos) / zoom;

    d = (distanceField(tpos) - ISOSURFACE) * zoom;
    if (d <= closeEnough) {
      // Hit!
      uint nid = nearestNodeId(tpos);
      vec3 normal = distanceFieldNormal(tpos, closeEnough);
      vec3 nl_m = normalize(rLight);
      vec3 r_m = -reflect(nl_m, normal);

      float ambient = i_a * k_a;
      float diffuse = i_d * k_d * max(dot(nl_m, normal), 0.);
      float spec = i_s * k_s * pow(max(dot(r_m, toEye), 0.), alpha);

      vec3 light = matColor(nid) * (ambient + diffuse) + spec;
      color = vec4(light, 1);
      break;
    } else {
      // Keep on marching.  The TRUST ratio is used to de-rate the distance
      // estimate if we think it may not be a true lower bound.  TBD.
      pos += d * TRUST * dir;
    }
  }

  // At exit from the loop we've either hit, in which case 'color' is set,
  // or flown off into space, in which case we've got the background color.
  // In the latter case, 'd' is basically random.

  // Compute the alternate viz modes.
  vec4 complexity = falseColor(float(stepsTaken) / float(stepLimit));
  vec4 distance = falseColor(clamp(d / closeEnough, 0., 1.));

  fragColor = sqrt(showComplexity ? complexity
                                  : showDistance ? distance : color);
}

float distanceField(vec3 r0) {
  float r1 = dfSphere(100.0, r0);
  return r1;
}
uint nearestNodeId(vec3 r0) {
  uint r2 = 0u;
  return r2;
}
generate-compile-and-link: error compiling: ERROR: 0:1: '' :  version '130' is not supported
ERROR: 0:105: 'uint' : syntax error: syntax error

  context...:
   /Users/yminsky/Library/Racket/6.8/pkgs/ruckus/viz/viewer.rkt:55:8
   /Applications/Racket v6.8/collects/racket/private/more-scheme.rkt:148:2: call-with-break-parameterization
   /Applications/Racket v6.8/collects/ffi/unsafe/atomic.rkt:72:13
   /Applications/Racket v6.8/share/pkgs/gui-lib/mred/private/wx/common/canvas-mixin.rkt:144:4: do-on-paint method in ...mon/canvas-mixin.rkt:118:2
   /Applications/Racket v6.8/share/pkgs/gui-lib/mred/private/wx/cocoa/panel.rkt:71:6: for-loop
   /Applications/Racket v6.8/share/pkgs/gui-lib/mred/private/wx/cocoa/panel.rkt:70:4: paint-children method in ...e/wx/cocoa/panel.rkt:37:2
   /Applications/Racket v6.8/share/pkgs/gui-lib/mred/private/wx/cocoa/panel.rkt:71:6: for-loop
   /Applications/Racket v6.8/share/pkgs/gui-lib/mred/private/wx/cocoa/panel.rkt:70:4: paint-children method in ...e/wx/cocoa/panel.rkt:37:2
   /Applications/Racket v6.8/share/pkgs/gui-lib/mred/private/wx/cocoa/frame.rkt:401:4: show method in frame%
   /Applications/Racket v6.8/collects/racket/private/more-scheme.rkt:148:2: call-with-break-parameterization
   /Applications/Racket v6.8/collects/ffi/unsafe/atomic.rkt:72:13
   (submod /Users/yminsky/Library/Racket/6.8/pkgs/ruckus/viz/view3d.rkt main): [running body]

Hello Yaron!
It seems like your system doesn't support GLSL 1.30.  I'm a bit boggled as to why... it's been supported on MacOS for several years now.  I don't have any Macs for testing, and some Googling hasn't provided any easy answers.
I know Apple has been pushing graphics APIs forward pretty aggressively.  It's possible that GLSL 1.30 is too old for this system.  I'm using it as a lingua franca, but I might need to reconsider that.

That is odd. These seem vaguely relevant:
http://stackoverflow.com/questions/20264814/glsl-version-130-on-mac-os-x-causes-error
http://stackoverflow.com/questions/31803872/opengl-glsl-shaders-on-mac-does-not-compile
but I don't see a clear answer from either one.

That does seem relevant, particularly the bit about Mac OS not supporting GL compatibility profiles.  I played with getting Ruckus to request a Core profile explicitly back in December 2015; I believe I ran into a limitation in the Racket GL bindings.
And yet I'm fairly certain that I tested Ruckus on Mac around that time...
Let me see if I can find anyone in the center of the "Racket user - Mac owner - CAD user" Venn diagram nearby.

FWIW I am getting the same error as yminsky. This is on macOS Sierra, the
graphics card is a "Intel Iris Graphics 6100 1536 MB".

Without knowing anything about GLSL, I have attempted the following:

Replaced  #version 130  with #version 120
replaced all occurrences of uint with int
(uint appeared in 130)
replaced 512u with 512

These changes are enough to remove errors from GL.
Alas, now I get an error from Racket:
link: bad variable linkage;
 reference to a variable that is not a procedure or structure-type constant across all instantiations
  reference phase level: 0
  variable module: "
 /Users/soegaard/Dropbox/GitHub/racket/racket/share/pkgs/ruckus/viz/glsl.rkt"
variable phase: 0
reference in module:
"/Users/soegaard/Dropbox/GitHub/racket/racket/share/pkgs/ruckus/viz/spheretrace-viewer.rkt"
in: node->glsl-distance

I'd love to try out Ruckus, but I'm running into the same problem.

It's probably going to get worse -- my understanding is that Apple has deprecated OpenGL support, with the intent of removing it soon. As I cannot program against their proprietary alternative (because I don't have a Mac), Ruckus (and all Racket GL programs) will stop working completely.
Given this, it might not be worth debugging. :-(

Thanks for the update, I'll try it out in Linux.

@soegaard got most of the needed changes but not all of them.
I forked this repo to zen3d/ruckus, and it now runs on MacOS.
Primary changes:

replace all "uint" to "int",
remove "u" from uint literals,
don't append "u" to number code generation,
change GLSL version to 120,
eliminate references to "out vec4 fragColor;",
change "fragColor" assignments to "gl_FragColor", and
replace "nid % 512" with an equivalent expression that works in GLSL 1.2.

That said, I haven't tested these changes on any other machines or other OS variants.
If @cbiffle wants a diff to incorporate the changes, I will gladly provide them. But if not, I will proceed to make further enhancements to my fork. The implication of this change is that more machines will run ruckus at the cost of potentially some performance impact on higher end systems. How much impact is TBD.
My objective is to get feature parity with OpenScad, and the current state of ruckus is mostly there except for polygons and polyhedra (that is probably an over-simplification, but it's good enough for me).

I just verified that my changes also work on linux (specifically, Linux Mint Debian Edition, although that shouldn't matter) with an NVidia GTX 1080 driven by NVidia's closed source proprietary drivers. It is a bit faster on some of the slower demos, but most demos run as fast as my MacBook Pro with an NVidia GT 750M GPU. Not that most of the demos push the performance envelop.
On the other hand, they don't work remotely via vanilla VNC or RDP, but then again, 3D via remote access is generally broken regardless of platform, at least with those two protocols.  So no surprises there.
As always, YMMV.
PS The failure mode for remote access is that racket doesn't find a new enough version of glx, FWIW. I'm guessing this might have something to do with the way linux emulates a GPU in software when it provides remote access, but that's just a guess.

@zen3d  Thanks!  I can confirm that the changes work on macOS.

@soegaard Thanks for that confirmation, Jens.


https is broken.

I am not quite sure why this happens, but even though we use https, all browsers display a scary message about the website not begin secure.

Not very important, but might be good to investigate and fix if it is easy to do so.

This is now not showing in the observe.dev! This may indicate that the hosting server had some issues with their certificate that got resolved now? I will leave this open until I confirm this.


Version displayed at Google Play and actual version of the app don't match

Hi again,
Google Play store is showing 0.2 as the current version of the app but when downloaded
we get the 0.12 version.

Oh, that was mistake. I changed it to correct version in commit 3dc25949b5910d595579988fb6b4adc3d503a093 - which is after the release of 0.12.
Since I was lazy, and nobody seems to care about the version number - I just didn't update it.

Version code is changed back to 0.2 in commit 173e17bdf8735c9ab22b178775bd289c9715de0e - so Play Store users will see 0.2 twice after 0.2 release.

Cool, thanks!


add "main" to package.json

"main": "dist/theater.js"
not having it confuses module loaders.

I am surprised it has been missing for so long but it's now fixed and part of 3.1.0. Thank you @unsalted 👍


Add PostingsForMatchers cache size by bytes support

The PostingsForMatchers cache is per head / block, and the max size is expressed as "number of items". This makes me uncomfortable to enable because we have no control over the cache memory utilization and we can't configure a cap. In this PR I propose to do a first step, which introducing the support to limit the cache by bytes in addition to by number of items.
I kept the "max items" limit to introduce a breaking change at this point, but if the "max bytes" work well, we may consider to remove the "max items".
The idea is that this would be a first step. Next step would be make the cache global and not per head / block (which is more complicated), so that we can have better control over it. However, I believe that in some caches (a Mimir cluster with 1 tenant) just having the limit by bytes may be good enough, because it would be predictable (in 1 ingester with 1 tenant there's 1 TSDB Head and up to 6 blocks when using 13h retention).

Benchmark comparing before / after:
goos: darwin
goarch: amd64
pkg: github.com/prometheus/prometheus/tsdb
cpu: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
                                               │  before.txt  │              after.txt              │
                                               │    sec/op    │    sec/op     vs base               │
PostingsForMatchersCache/no_evictions-12         453.9n ± ∞ ¹   461.1n ± ∞ ¹        ~ (p=0.690 n=5)
PostingsForMatchersCache/high_eviction_rate-12   2.727µ ± ∞ ¹   3.590µ ± ∞ ¹  +31.65% (p=0.008 n=5)
geomean                                          1.113µ         1.287µ        +15.64%
¹ need >= 6 samples for confidence interval at level 0.95

                                               │  before.txt   │               after.txt               │
                                               │     B/op      │     B/op       vs base                │
PostingsForMatchersCache/no_evictions-12           136.0 ± ∞ ¹     136.0 ± ∞ ¹       ~ (p=1.000 n=5) ²
PostingsForMatchersCache/high_eviction_rate-12   2.414Ki ± ∞ ¹   2.602Ki ± ∞ ¹  +7.77% (p=0.008 n=5)
geomean                                            579.8           601.9        +3.81%
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal

                                               │ before.txt  │              after.txt               │
                                               │  allocs/op  │  allocs/op   vs base                 │
PostingsForMatchersCache/no_evictions-12         7.000 ± ∞ ¹   7.000 ± ∞ ¹        ~ (p=1.000 n=5) ²
PostingsForMatchersCache/high_eviction_rate-12   22.00 ± ∞ ¹   25.00 ± ∞ ¹  +13.64% (p=0.008 n=5)
geomean                                          12.41         13.23         +6.60%
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal

The benchmark was not an apple-to-apple comparison with the main version because it was actually evicting at a slightly smaller rate in main (maxBytes was always triggering in the PR, while maxItems in main was triggering less times). After fixing the benchmark we can see no difference in memory allocations (as expected). According to profiling, the increase CPU is a mix of GC + size.Of(). However, in absolute terms, the CPU increase looks negligible to me:
goos: darwin
goarch: amd64
pkg: github.com/prometheus/prometheus/tsdb
cpu: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
                                               │  before.txt  │              after.txt              │
                                               │    sec/op    │    sec/op     vs base               │
PostingsForMatchersCache/no_evictions-12         397.8n ± ∞ ¹   388.4n ± ∞ ¹   -2.36% (p=0.032 n=5)
PostingsForMatchersCache/high_eviction_rate-12   2.351µ ± ∞ ¹   2.955µ ± ∞ ¹  +25.69% (p=0.008 n=5)
geomean                                          967.1n         1.071µ        +10.78%
¹ need >= 6 samples for confidence interval at level 0.95

                                               │  before.txt   │               after.txt               │
                                               │     B/op      │     B/op       vs base                │
PostingsForMatchersCache/no_evictions-12           136.0 ± ∞ ¹     136.0 ± ∞ ¹       ~ (p=1.000 n=5) ²
PostingsForMatchersCache/high_eviction_rate-12   2.602Ki ± ∞ ¹   2.602Ki ± ∞ ¹       ~ (p=1.000 n=5) ²
geomean                                            601.9           601.9        +0.00%
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal

                                               │ before.txt  │              after.txt              │
                                               │  allocs/op  │  allocs/op   vs base                │
PostingsForMatchersCache/no_evictions-12         7.000 ± ∞ ¹   7.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
PostingsForMatchersCache/high_eviction_rate-12   25.00 ± ∞ ¹   25.00 ± ∞ ¹       ~ (p=1.000 n=5) ²
geomean                                          13.23         13.23        +0.00%
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal


Create central, common PipelineIO API service in api.ml

https://github.com/fluxcapacitor/pipeline/tree/master/api.ml

Follow this:  https://deepdetect.com/api/

CLI works for open source.  adding REST API to PipelineAI Advanced/Enterprise Edition


Login via POST method and default scopes

Login via POST method
Use default scopes when no scopes are given

Do you have an example of a provider that requires these changes? It’s hard to follow why these changes are being made without that

Sign in with Apple needs them. Unfortunately they decided to use post instead of get to bounce back to the origin server. We used this provider for our implementation.
The good news is, it passed Apples App Store Review. You can see it in action here.

Thanks @ibimsdeandy @johannesx75, it’s starting to make a bit more sense now.
If the only issue is that Apple use a POST request instead of a GET request, could we undo the changes that add the redirect (the OAuthRedirect template etc) and instead change these lines to use requestVar() instead of getVar()?
https://github.com/bigfork/silverstripe-oauth/blob/88704d6e26758c675f88ed85c310751b3a59fd39/src/Control/Controller.php#L164C37-L164C43
https://github.com/bigfork/silverstripe-oauth/blob/88704d6e26758c675f88ed85c310751b3a59fd39/src/Control/Controller.php#L281C28-L281C34
It seems to me that this would allow POST requests to work without adding a redirect. What do you think?

Hi @kinglozzer,
just changing the code to accept POST had been our first idea as well. Unfortunately that does not work, in some cases.
The reason is, that you don't have access to the session in those requests then. This is because of the SameSite setting on the Session Cookie. If it is not set, the browser will default to Lax. In that setting Chrome (and some others) will not sent cookies on cross-site requests with POST. To get around this, we take the data and create a same domain GET request, that is triggered by the clients browser.

Ah okay, so the redirect is essentially a workaround to avoid setting SameSite=None; Secure? I.e. the use-case described here

Ah okay, so the redirect is essentially a workaround to avoid setting SameSite=None; Secure? I.e. the use-case described here

Yes!

Sorry it’s taken me a while to look at this. As I don’t have an account/app set up with Apple, could you test this branch? You’ll need to set a config flag to enable this: https://github.com/bigfork/silverstripe-oauth/tree/samesite-workaround#samesite--post-cookies
Thanks!

Hi @kinglozzer, the branch works perfect. As long as you use our fork of the Apple Oauth2 Provider: https://github.com/werstreamtes/oauth2-apple
The reason is, that in patrickbussmann/oauth2-apple the getDefaultScopes is protected. We have issued a Pull Request, but so far he hasn't responded.
So maybe you want to add a little note regarding setting up the composer file to  the readme.
We use:
"patrickbussmann/oauth2-apple" : "dev-main"
And then add:
    "repositories": [
        {
            "name": "patrickbussmann/oauth2-apple",
            "type": "vcs",
            "url": "https://github.com/werstreamtes/oauth2-apple"
        }
]

You can see it in action at: https://www.werstreamt.es/Security/login?BackURL=%2F