Create document for project details

Lists Team Member names (designate who the PM is)
Has short summary of the themed topic the web-site supports
Specifies what team member(s) worked on what parts of the web-site

Added on 3/4
Address this question in a separate paragraph
Will I need software installed on my machine to run your web application?
If not, then say no software will be needed other than running your web application through the Chrome browser on my machine
If software other than the Chrome browser will be needed
Specify what the software is
Whether an installation will need to be done on my Windows machine
And what the steps and requirements are to install the software

Pretty sure this was done and turned in.

Pretty sure this was done and turned in.

For a previous assignment, we turned in a similar document that mainly talked about what was done so far and our plan to finish the rest of the work.
We need to add a description specifying what team members worked on what parts of the website.
And we need to include the document in the .zip file for our final Group Project submission.
See the Canvas assignment page

Completed document
And I submitted final project on Canvas just to be early
Feel free to make any changes and resubmit if you want to


consistent logging to enable better debugging

Makes logging more consistent by only using the tracing crate wherever possible. the tracing crate provides contextual tracing useful for debugging async code, but can also fallback to emitting log events if no subscriber is set.

removes tracing-test crate preferring a small custom closure to capture logs from tests instead

this closure only works with tokios current_thread runtime. It can be made to work with a multi-thread environment, but not needed since its only used in a couple places so far. could make use of tracing-subscriber reload handle with rusts LazyLock global initializer to temporarily switch out a custom global subscriber that logs to a internal memory buffer only in the closure.
removing this allows us to avoid setting the traced-test global subscriber in ctor, giving us the ability to filter logs during debugging

Default log level for tests is still INFO
Logs in tests can be filtered on module again, which is useful for debugging

EX: if i'm debugging something related to sync, I can do RUST_LOG=xmtp_mls::groups=DEBUG to only get logs from xmtp_mls/src/groups/mod.rs

tracing also has useful adapters for debugging WebAssembly code
removes env_logger from mls_validation service preferring tracing-subscriber

bindings_ffi still uses the log crate. The FfiLogger trait doesn't fit well into the tracing::Subscriber trait -- enabling tracing there could be a different issue/PR but for now the benefit would be small to switch it out

Thank you!


Remove: Unity.Unity.6000.visionOS version 6000.0.15f1

Microsoft Reviewers: Open in CodeFlow

URL: https://download.unity3d.com/download_unity/6a96561936c0/TargetSupportInstaller/UnitySetup-VisionOS-Support-for-Editor-6000.0.15f1.exe
OK
(Automated message - build 923)

https://github.com/microsoft/winget-pkgs/pull/186121#issuecomment-2445759087


Implementing fmt.Stringer as a convenience

Would it make sense to Node to implement fmt.Stringer interface as a convenience for users? so Nodes can be converted to string
Div(String("Hello world")).String()

Also can be used as HTML type
template.HTML(Div(String("Hello world")).String())

Hi @emad-elsaid, thank you for the issue.
This has actually been discussed before, see issue #164. 😊


Vue.js comparison against other frameworks

Hi!
Really happy to see how well vue.js makes progress these days. 👍
I noted Vue.js will be using virtual DOM in version 2.0, which means the React section on this this page could need an update? https://vuejs.org/guide/comparison.html
Also came to think of if it could be worth mentioning Aurelia in this comparison? Just an idea.

We're actually updating the entire guide in the 2.0 branch. We might add a section for Aurelia after release, but 2.0 likely won't ship with one.


Spread of set into object not detected as type error

Bug Report
A spread of a Set into an object is assignable to a Set. This shouldn't be allowed, because the object isn't a Set. tsc should be able to detect this at compile time.
🔎 Search Terms
set spread
🕗 Version & Regression Information
This is the behavior in the version I tried (3.3.3, 4.6.2, 5.0.4, 5.1.0-dev.20230411), and I reviewed the FAQ for entries about Common "Bugs" That Aren't Bugs

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

⏯ Playground Link
Playground link with relevant code
💻 Code
const my_set1: Set<number> = new Set();
// The type of my_set2 is actually Object.
// tsc doesn't detect this, and thinks it's a `Set<number>`.
const my_set2: Set<number> = {...my_set1};

// This will fail at runtime because my_set2 isn't a Set.
my_set2.has(2);

🙁 Actual behavior
tsc doesn't detect the type error.
🙂 Expected behavior
tsc should detect the type error.

Yeah, { ...x } is always assumed to be the same type of x. Non-enumerability isn't tracked anyway, and expanding it out into { a: x.a, b: x.b, c: x.c } etc breaks a bunch of scenarios that people rightly expect to work.

Non-enumerability isn't tracked anyway

Related: #9726


Integrate coverage module for Amundsen repositories

@verdan , feel free to create a pr for this issue :)

@feng-tao I believe this needs to be done with the admin rights of repo.
Admin needs to add this repo to codecov to generate the token, and that will be used in the CI server.
https://docs.codecov.io/docs

@verdan , let me do that.

Seems this was resolved a while ago:

https://github.com/lyft/amundsenmetadatalibrary/pull/64#issuecomment-511990833
https://github.com/lyft/amundsenfrontendlibrary/pull/230#issuecomment-513002273
https://github.com/lyft/amundsensearchlibrary/pull/39#issuecomment-512598426
https://github.com/lyft/amundsendatabuilder/pull/114#issuecomment-512588068


Scheibe

Here is my first draft of a Blog article as requested by Lois McInnes.  Please review and let me know if you would like me to make changes.

Hi Tim -- Great article; many thanks.  The next steps will be copy edits from our technical editor, inserting subheadings to guide the reader, and work on image treatment by our website partners.  We will stay in touch as this progresses.  Thanks!


DocsArchive-<IP_ADDRESS>Auto archive content

Auto archive content from https://github.com/opstest2/docs-archive-test-source.git

Docs Build status updates of commit e025857:
:x: Validation status: errors
Please follow instructions here which may help to resolve issue.

File
Status
Preview URL
Details

:x:Error

Details

[Error: RepositoryUnauthorizedWithSourceCommit] Git data access to 'https://github.com/opstest2/docs-archive-test-target' (branch: Release_Archive_main_2022-01-06-08-00-24) is not authorized.. It looks like this might be the first time user: v-alji submitted a pull request to this repo. Before user can run builds in a pull request, he/she can enable 'v-alji' GitHub account in Docs by visiting Docs Portal (https://ops.microsoft.com). After enabling his/her account (v-alji), close and then reopen this pull request to start another build.

For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel


KA Lite Monitor app after upgrade

Summary
If KA Lite Monitor app is active/open during the upgrade to 0.16, it does not get updated. Once installation finishes and user opens it from the icon in the status bar it will display the older version. When user tries to start the server the app replies with "Starting the server" but then it closes and disappears.
@cpauya
I would recommend adding the step to installer to close the Monitor if it is opened prior to starting the actual upgrade process.
Branch or installer
Upgrade scenario form 0.14.2 to 0.16 on OSX Yosemite.
Screenshots

@radina and @cyril, I also tested the upgrade using 0.15.1 to build 80 from Dungeon on OS X Yosemite the same process above. When the installation finishes and when I refresh my browser or click on ‘’Open in Browser” it will not display anything. When I click on “Stop KA Lite”, the notification icon is blank and it will not stop I need to quit the serve and launch it again.
The dock icon for "KA Lite" and the "KA Lite" in Applications folder were updated after the upgrade.
For now I need to quit the server after the upgrade so that it will work properly.

The notification icon is blank.

@djallado Thanks for confirming this! :+1:
@cpauya Is it possible for 0.16 installer to check & close the Monitor if it is opened prior to starting the actual upgrade process, as I suggested above? Or any other ideas you may have to prevent this issue...? :smiley:

Hi @radinamatic - it's not "recommended" to just quit an application when it's loaded.  Data may get corrupted or there's no way to validate that quitting it will not corrupt anything.
The way VirtualBox does it is to run a script before continuing the installer to check if VirtualBox is loaded and it will prompt the user to close it first.

I tried looking for a way to run a script before the .pkg takes the first step but can't find it as of now.  So what we do now (as @djallado suggested) is to show a "NOTE: Make sure that the KA Lite application is not loaded before continuing." at the Introduction section of the installer.  And then we check for a running "KA Lite" application during a pre-install script and fail the install if we detect it.  Here's a .gif of what I meant and how it currently works in devt.

I think this will suffice for now to prevent the issues encountered.
The ideal solution of course is to run a script like VirtualBox does to check if KA Lite is running before the installer proceeds but it's skipping me yet. :smile_cat:

@cpauya your proposal sounds like a good workaround! :+1:
@aronasorman thoughts?

Hi @radina - pls use the build 89 at Bamboo to test this issue.

We now do it like VirtualBox does it! :smile_cat:
@radinamatic Please use build 100 on Bamboo to test this.

this seems fixed? :)

Ah yes @benjaoming, closing this now.  Thanks. 😸


Performance of __next__ (efficiently signaling end of iteration)

I'm trying to write a custom collection class, and am struggling to write an iterator that is competitive with the iterator of a built-in tuple.
The benchmark:
timeit.timeit(lambda: sum(1 for my_tuple in iter_tuples() for item in my_tuple))

Previously iter_tuples() was yielding built-in tuples of varying lengths (but usually short: 90% of tuples have length 3 or less).
Now I'm trying to use my own cdef class for the tuples, but I can't get this benchmark anywhere near the original performance.
If my collection class uses yield inside its __iter__ method, that results in code 30% slower than the built-in tuple.
If my collection class uses a custom cdef class for the iterator, that results in code 50% slower than the built-in tuple.
@cython.final
@cython.freelist(4)
cdef class NodeTupleIterator:
    cdef NodeTuple _c
    cdef size_t _index

    def __cinit__(self, NodeTuple c not None):
        self._c = c

    def __iter__(self):
        return self

    def __next__(self):
        if self._index == self._tuple._size:
            raise StopIteration
        node = self._c._get(self._index)
        self._index += 1
        return node

    def __length_hint__(self):
        return self._c._size - self._index

Profiling shows that __next__ spends 33% of its time in __Pyx_Raise and another 40% in __Pyx_Add_Traceback.
But none of that is necessary. On the C level, tp_iternext can indicate the end of iteration by simply returning NULL without setting any exception.
Is this somehow possible from Cython? Should Cython optimize a raise StopIteration within __next__ methods that way?
Currently it seems like my only solution is to avoid Cython for the iterator class :(
By the way, I've verified that the benchmark with the builtin tuple actually calls tupleiter_next. There doesn't seem to be any special case that gives builtin tuples an inherent advantage; the problem just seems to be the overhead of Cython generator machinery (for yield) or exception-handling machinery (for __next__).

With hand-written C code for the iterator class, I end up 5% faster than the builtin tuple.

Have you tried a generator function?

I've created a standalone benchmark and attached it: cython-bench.zip
No matter which Python way of writing an iterator I try, it's significantly slower than a builtin tuple.
Builtin Tuples: 100 loops, best of 5: 1.06 msec per loop
NodeTuple: 100 loops, best of 5: 2.7 msec per loop
YieldingNodeTuple: 100 loops, best of 5: 1.75 msec per loop
GenExprNodeTuple: 100 loops, best of 5: 1.88 msec per loop

With a tiny edit to the Cython-generated code, the NodeTupleIterator class wins over the other approaches:
NodeTuple (hand edited __next__): 100 loops, best of 5: 1.34 msec per loop

I faintly recall that there was a reason why we needed the StopIteration exception at the end of the generator, but I don't remember which. Some Python compatibility issue, I think. Might be worth trying again, much or that code is about a decade old or so.
Feel free to play around with it and try to tune it. Some C level profiling might yield different results these days than back then. Have a look at GeneratorBodyDefNode. It might also be possible to special-case raise StopIteration inside of an __iter__() DefNode.

I faintly recall that there was a reason why we needed the StopIteration exception at the end of the generator, but I don't remember which. Some Python compatibility issue, I think.

The iterators for builtin tuples/lists only returns NULL without setting an exception. This was already the case in Python 2.7.0; so all tp_iternext users should be able to handle this case.
But maybe Cython sometimes generates direct calls to the __next__ method without going through the usual logic for calling tp_iternext?

direct calls to the next method without going through the usual logic for calling tp_iternext?

If that was the case, I'd rather see that fixed.


Speed up dot notation

On my local benchmark of 10 million objects with dot notation fields this this takes processing time from ~5.5 secs to ~2 secs


HOSTEDCP-1027: Add Create kubeconfig for HCP CLI

What this PR does / why we need it:
Add Create kubeconfig for HCP CLI
Which issue(s) this PR fixes:
Fixes HOSTEDCP-1027
Checklist

[x] Subject and description added to both, commit and PR.
[x] Relevant issues have been referenced.

/test e2e-aws

/approve

/lgtm


Updated tuple which is used to uniquely identify a temporal flow.

Updated tuple which is used to uniquely identify a temporal flow.  Also, couple of minor edits to the document

I think https://github.com/Azure/DASH/pull/63/ and https://github.com/Azure/DASH/pull/64 are both trying to address the same issue, somewhat differently.


Add CountingHash::n_tables() accessor

Purely for convenience & efficiency.
I've been doing a lot of hacking on khmer in CPP land lately, and having to do countinghash->get_tablesizes().size() is quite verbose (and involves an inefficient vector copy doesn't it?).
Now, one can do countinghash->n_tables(), in the vein of countinghash->n_entries().

[ ] Is it mergeable?
[ ] Did it pass the tests?
[ ] If it introduces new functionality in scripts/ is it tested?
Check for code coverage with make clean diff-cover
[ ] Is it well formatted? Look at make pep8, make diff_pylint_report,
make cppcheck, and make doc output. Use make format and manual
fixing as needed.
[ ] Did it change the command-line interface? Only additions are allowed
without a major version increment. Changing file formats also requires a
major version number increment.
[ ] Is it documented in the ChangeLog?
http://en.wikipedia.org/wiki/Changelog#Format
[ ] Was a spellchecker run on the source code and documentation after
changes were made?

Welp, looks pretty straight-forward to me.

@camillescott a straight forward patch, or that I should just use get_tablesizes().size()?

haha, I'm too slow for you @camillescott :)

I just merged it, sooo... use this! ;)

What about for hashbits as well?

@mr-c OK, will do.


feat: iroh-gossip

Description
This PR adds  iroh-gossip. See https://github.com/n0-computer/iroh-sync/pull/1 for the prehistory.
iroh-gossip exposes a pubsub-like API to broadcast messages on topics. Peers join a topic by connecting to at least one other peer. They can then broadcast messages to all other peers who joined a topic, and subscribe to messages. The protocol is based on HyParView, which gives us an overlay network of all nodes that joined a topic; and PlumTree to create an epidemic broadcast tree for reliably broadcasting messages to all online peers.
The new crate is structured as follows:

The protocol implementation (mod proto) as an IO-less state machine. It exposes a single method to handle InEvents and returns an iterator of OutEvents which must be handled by the implementor (register timers, send messages, emit events). The implementation is generic over a PeerAddress trait, which should be an identifier for a peer. In our case, it will be a PeerId.

All protocol messages are namespaced by a TopicId, a 32 byte identifier. Topics are seperate swarms and broadcast scopes. The HyParView and PlumTree algorithms both work in the scope of a single topic. Thus, joining multiple topics increases the number of open connections to peers and the size of the local routing table.
The high level protocol lives in state::State. It mostly dispatches messages based on the topic ID into the matching topic::State. This is the actual protocol state for a topic. It, again, mostly dispatches messages onto the actual protocols: hyparview::State and plumtree::State.
The implementations of these two modules quite strictly follows their papers 1 and 2. If you find any deviations that are not documented, please report, this is likely a bug.

The net module provides networking for the IO-less protocol impl, through the MagicEndpoint from iroh-net, with a (I think) quite straightforward actor implementation.

The net module has a smoke test, and the PR also includes a chat example that adds signed messages on the trustless base layer.
What this mostly needs is, I think, more testing and validation of the protocol implementation. For this to be practical, I think we should formulate some base usecase scenarios.
The proto module has a very simple simulator and some tests that can take environment variables to increase the cluster size. They passed with 10.000 nodes. They also report some stats. The numbers look OK-ish, but I'd love to compare them properly with either other implementations or estimations from the original paper or other resoures. However, those are hard to find.
Notes & open questions

Right now the plumtree module builds an unbounded cache of all broadcast messages. This will have to change. The simplest might be to move to an LRU cache for now. In the future, we might want to expose a method for the module to request expired messages from a backing storage or so. (The module needs to have a cache of messages to reply for requests by other peers. However these will only come within a reasonable amount of time after message publication / reception.)
Same for the list of received message IDs - they're also unbounded atm
We should validate the numbers - either by more simulation tests or by actually comparing them to the paper. However I couldn't find any simulation code from the papers.

Change checklist

[x] Self-review.
[x] Documentation updates if relevant.
[ ]Tests if relevant. some tests are there, some more might be good

From my side the last things that are left are the unit tests I mentioned above & resolving merge conflicts, then we can merge this.

I successfully rebased upon main!
Also added a couple of cleanups and improved the code structure in the chat example,
Because iroh-gossip conceptually depends on #1248, I added a commit with an intermediate fix: If you connect to a peer by just its peer id, it would always fail on current main. This commit here changes that to a warning, which means it will succeed if you previously added addrs or derp_region for that peer, but will fail with timeout and not immediately in case a peer is undialable. This will need a better structure in iroh-net to be fixed properly (see #1248).

pheww finished reviewing hyparview.. moving into the state next

I think I addressed all review comments! Thanks again @divagant-martian for the thorough review, this helped a lot in getting here :)
In this commit I also added a time bound cache to gossip messages and message ids. I think this covers the common case for now. If we also want to limit the cache by size I can add that too, with FIFO semantics? I think the time based cache should work well enough though and ensure that you can reply to grafts from other peers well.
So - from my side, if I'm not forgetting something right now, this should be ready for a final review :-)


Readme reviewed and corrected for better understanding

@acamino @EliuX ready

There's not alteration on the content related to technical content, so @lgtm
:shipit:


Where to put private pre init configs

Hi and thanks for your effort. I'm looking for a way to add custom settings that will read before init.el or very early in init.el. For example startup benchmarking settings, initial and default frame location settings etc.
At the moment it seems to me like early-init.el will be the place but I don't know it update will overwrite this file.

Hi,
Since we have init.el + private.el, I guess we should have early-init.el + early-init-private.el. What do you think?

In my case, I use .emacs that is a traditional way.
For example, I put some settings and loading init.el explicitly in my .emacs.
;; pur your setting for benchmarking settings before loading init.el
(defconst my-profiler-p nil
  "If non-nil, use built-in profiler.el.")
(when my-profiler-p
  (profiler-start 'cpu+mem))
(setq custom-file (expand-file-name "custom.el" user-emacs-directory))

;; load init.el
(load "~/Dropbox/emacs.d/config/init.el" nil t)

;; report profile result if my-profiler-p is non-nil
(when my-profiler-p
    (profiler-report))

Hi,
Since we have init.el + private.el, I guess we should have early-init.el + early-init-private.el. What do you think?

Yeah I like the semantics of early-init-private.el.
It probably should come with a caveat in the README that no package specific settings can be included in that file since use-package would probably not have been bootstraped yet when it is processed?

Yes, you're right. It's time to include a whole section on both private config files. I'll work on this later this week.


I/O Timeout (error 1601)

I'm trying to interact with the keybase server using the CLI. However, I can't do any commands that require connecting with the servers. I am behind a corporate proxy. I'm not sure if the connection is being block or if the CLI is not picking up the environment variables typically used to direct traffic to my local proxy that then points to the corporate proxy. The environment variables that are being set are as follows:
http_proxy
https_proxy
ftp_proxy
rsync_proxy
HTTP_PROXY
HTTPS_PROXY
FTP_PROXY
RSYNC_PROXY
Is there a way to enter proxy settings into the keybase CLI?
my log id: 45e98dc3a0b6d0772449581c

@searsaw Ah, we do respect HTTP_PROXY, but there's a long-running keybase service process that needs to be the process that gets the environment variable set.  But that's a global change to your system, so you should confirm that you're comfortable with every launchd process getting that envvar..

You can set it in the keybase config file just for keybase:
keybase config set proxy http://asdfasfd

I'm not sure if you need to restart the service after that, but it can't hurt:
keybase ctl restart

Like @cjb said, keybase will respect the HTTP_PROXY env variable, but you can use the config file just to change the setting for keybase.

Thanks for the help, but it didn't fix it. I'm assuming our proxy is just blocking it. I appreciate it!


able to move off-screen from the start position

Hi.  I know this is just a for fun project, but I noticed that if the very first thing you do after starting a new game is press "left", the player sprite is allowed to move off-screen.  I assume this is not intentional.
Browser: FF 97.0

This was indeed a bug. Thank you for sending the pull request to fix this. I have merged the pull request. Closing this issue now.


bug: statusTap issue with native scroll on iOS

Type: bug
Platform: ios 8 webview
When tapping the status bar in the new ionic master while there is a momentum scroll happening the scroll to top doesn't complete properly. It snaps to top then back down to where the initial momentum scroll's end position was. This happens with native scrolling.
This can probably be fixed by forcing overflow: hidden on the overflow-scroll="true" div to freeze the scroll.

This was also an issue in previous ionic versions with native scrolling on iOS.

Thanks, will get this fixed

@mlynch I opened a PR at https://github.com/driftyco/ionic/pull/4748 which fixes this.

Thanks for guiding this one, I did a slightly different solution. Mind testing on WKWebView and letting me know how it goes?

@mlynch I just tested it and it works, however, I think .freeze should still be implemented instead of it being NOOP, otherwise when you start dragging up/down from the left margin so that the content scrolls, and then you drag to the right to enable the swipe to go back gesture, you can both scroll the view and expose the previous view which seems glitchy.


[Keyboard Manager] Map multiple symbols to one key and choose one with arrow keys

Description of the new feature / enhancement
Allow mapping multiple characters to one button with an ability to selected the required character with arrow keys (like in Quick Accent, but customizable).
For example, I will map:
д -> ђ
д -> џ
Then when I want to input one of those characters I will press the button with an arrow key, small window with characters will appear and I will select the one I want with arrow keys.
Scenario when this would be used?
When you want to use QuickAccent but you need to map an accented character to some other key than the one hard-coded in QuickAccent.
Also when you want to map other frequently used symbols on character keys, e.g. emoji, math symbols and so on.
Supporting information
No response

did you mean Quick Accent utility?
https://learn.microsoft.com/en-us/windows/powertoys/quick-accent

did you mean Quick Accent utility? https://learn.microsoft.com/en-us/windows/powertoys/quick-accent

Yes, that's what I mean.
Customization for Quick Accent seems like a hard task. At least that's what I think after looking at the code. But most importantly I can't imagine how the customization UI should look.
However, for Keyboard Manager it seems like it can be done with less effort and the UI won't look much different. We'll just have to add a checkbox near the key selection dropdown and when it is checked, allow to create more than one rule per button. Then reuse the character selection part of the Quick Accent component. Seems simple at least in theory.
But before starting to work on this, I want to hear what do maintainers think? Will a pull request with such changes be approved?


Performance of JSON RPC is degraded with the heavy loading

Describe the bug
After several hours of running ETH Mainnet instance of Blockscout on Reth node, we stat to observe performance issues with node's JSON RPC.
Requests like eth_getTransactionReceipt, eth_getTransactionByHash, eth_getBalance, eth_getBlockByNumber, trace_replayBlockTransactions totally start to hang (there is no response from the node when requested).
Those and new similar requests were hanging even after disabling traffic from the application. Only restart of the node returns it to the operational state.
The Reth node is running via docker-compose with this yaml:
version: '3.9'

services:
  reth:
    container_name: reth
    image: ghcr.io/paradigmxyz/reth:v0.1.0-alpha.4
    restart: always
    pull_policy: always
    privileged: true
    volumes:
      - /data/reth/rethlogs:$HOME/rethlogs
      - /data/reth:$HOME/.local/share/reth
    environment:
      RUST_BACKTRACE: 'full'
    command: >
      node
      --authrpc.jwtsecret=$HOME/.local/share/reth/mainnet/jwt.hex
      --authrpc.addr="<IP_ADDRESS>"
      --http
      --http.addr="<IP_ADDRESS>"
      --http.port="8545"
      --http.api="eth,debug,net,trace,web3,txpool"
      --ws
      --ws.addr="<IP_ADDRESS>"
      --ws.port="8546"
      --ws.api="eth,debug,net,trace,web3,txpool"
      --metrics reth:9001
      --log.directory $HOME
      --rpc-max-connections 500
    ports:
      - '9001:9001'
      - '8545:8545'
      - '8546:8546'
      - '8551:8551'

  consensus:
...

Prysm is used for consensus layer.
Blockscout loading to the node can be enabled using this repo for perf issue reproduction.
Steps to reproduce
Steps to reproduce:

Run Reth node v0.1.0-alpha.4 for ETH Mainnet using docker-compose
Run Blockscout application:

git clone https://github.com/vbaranov/reth-perf-issue-reproduction
ETHEREUM_JSONRPC_HTTP_URL=... ETHEREUM_JSONRPC_WS_URL=... docker-compose up

where ETHEREUM_JSONRPC_HTTP_URL - node's JSON RPC endpoint, ETHEREUM_JSONRPC_WS_URL - node's WS endpoint
For instance, with the node running on the same host:
ETHEREUM_JSONRPC_HTTP_URL=http://localhost:8545 ETHEREUM_JSONRPC_WS_URL=ws://localhost:8545 docker-compose up

Keep it running for 1 - 2 hours. Blockscout will be working at http://localhost:4000 and load the node with various requests.

As a results the node will stop respond to any requests beside simple like eth_blockNUmber, web3_clientVersion, net_version.
At leasts, JSON RPC requests to these methods will hang:

eth_getBlockByNumber
eth_getTransactionReceipt
eth_getTransactionByHash
eth_getBalance
trace_replayBlockTransactions

Node logs
reth       | 2023-07-21T14:47:00.045030Z  WARN connection{remote_addr=<IP_ADDRESS>:21279 conn_id=433}: jsonrpsee_server::server: HTTP serve connection failed hyper::Error(IncompleteMessage)
reth       | 2023-07-21T14:47:00.332972Z  WARN connection{remote_addr=<IP_ADDRESS>:45069 conn_id=434}: jsonrpsee_server::server: HTTP serve connection failed hyper::Error(IncompleteMessage)
reth       | 2023-07-21T14:47:00.897910Z  WARN connection{remote_addr=<IP_ADDRESS>:10827 conn_id=435}: jsonrpsee_server::server: HTTP serve connection failed hyper::Error(IncompleteMessage)

### Platform(s)

_No response_

### What version/commit are you on?

Reth v0.1.0-alpha.4

### What database version are you on?

_No response_

### If you've built Reth from source, provide the full command you used

_No response_

### Code of Conduct

- [X] I agree to follow the Code of Conduct

thanks for this,
does blockscout run a lot of trace_* requests?

does blockscout run a lot of trace_* requests?

In the provided setup there were 2 types of trace_* requests:

trace_replayBlockTransactions - batched requests (15 blocks in the batch, 12 parallel requests at once)
trace_block - batched requests (10 blocks in the batch, 4 parallel requests at once)

this should be fixed now that we improved trace request rate limiting derived from available cores


Announcement for Cordova Android 6.0 and Cordova Android 6.1

Platforms affected
What does this PR do?
What testing has been done on this change?
Checklist

[x] Reported an issue in the JIRA database
[x] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
[ ] Added automated test coverage as appropriate for this change.

LGTM


Add time capture support to ACLINT

The ACLINT (Advanced Core Local Interruptor) has a Machine-level Timer Device (MTIMER). It is hard to synchronize the MTIMER with an external reference clock. What would help if the MTIMER had a time capture mechanism which can be triggered by an external signal (for example a pulse-per-second signal). When the external capture signal arrives, the current timer value should be stored to a time capture register, a capture status flag should be set, and an interrupt should be generated (if enabled). If the capture status flag is already set, then a capture overflow status flag should be set. The captured time can be used by time synchronization algorithms to synchronize the MTIMER with an external reference clock, see for example RFC 2783

Wrong GitHub repository.  The ACLINT repository is here:
https://github.com/riscv/riscv-aclint


Refactor: Consolidate and combine threads-database with threads-store

There is all together too much inheritance going on between these two packages, so some simplification is in order here. More importantly, as part of the broader refactor (#414), these two packages should be combined to provide the user-facing API for threads-client -> threads-database implementation. Part of the "great refactor" (#414).

Opting to deprecate these two packages for now instead. Complete with #554


server: reuse recv buffer

Currently, recv buffer will be recreated every time a new message is arrived. This may cause unnecessary allocate and read.
ref: #821
@ngaut @siddontang @disksing @zhangjinpeng1987 PTAL

LGTM

PTAL

LGTM


Plugin incompatible with version 2021.2

The plugin does not work with the newest version of IntelliJ IDEA

Im using this version:

IntelliJ IDEA 2021.2 (Ultimate Edition)
Build #IU-212.4746.92, built on July 27, 2021

@bferdinandus thanks for the report!
I will resolve this issue with the next release later this week

Fixed in v0.3.0


chore: set up semantic releases

We should automate the releases, with fixes/breaking changes, and releasing to NPM

Next.js does a great job this. Using GH actions you can run a release shell script like this: https://github.com/vercel/next.js/blob/canary/publish-release.sh, they also auto-generate release messages: https://github.com/vercel/next.js/blob/856b531e4711dc3ff9f3db75f1740097f108ac94/release.js


CB-10977 android: Removing global state used for permission requests

The associated JIRA is CB-10977. Check out the description on the issue for an explanation of the problem. I also added some JS that reproduces it in the comments. This fix is contingent on https://github.com/apache/cordova-android/pull/285 to completely fix the problem (I plan to merge that PR soon).
This will also change the behavior when used with older versions of cordova-android (i.e. without https://github.com/apache/cordova-android/pull/285) and should prevent some of the weirder bugs. The behavior will still be incorrect, but less so.

@infil00p @jasongin @rakatyal please review when you have a moment. Also, should I add manual tests for this? It requires interacting with permission dialogs, so we can't really do any auto tests.


TypeScript parameter hints incorrect when type is default from module

Notice url: default:

This happens because the URI type is the default export from its module.
Suggest seems OK:

Hover too:

Yup seems fixed!


Facebook is broken. unable to extract video ids

Checklist

[x] I'm reporting a broken site support
[x] I've verified that I'm running youtube-dl version 2020.03.24
[x] I've checked that all provided URLs are alive and playable in a browser
[x] I've checked that all URLs and arguments with special characters are properly quoted or escaped
[x] I've searched the bugtracker for similar issues including closed ones

Verbose log

youtube-dl -v -F https://m.facebook.com/100037160205931/posts/223407958907876/
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'-F', u'https://m.facebook.com/100037160205931/posts/223407958907876/']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2020.03.24
[debug] Python version 2.7.16 (CPython) - Darwin-18.7.0-x86_64-i386-64bit
[debug] exe versions: none
[debug] Proxy map: {}
[facebook]<PHONE_NUMBER>07876: Downloading webpage
ERROR: Unable to extract video ids; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 797, in extract_info
ie_result = ie.extract(url)
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 530, in extract
ie_result = self._real_extract(url)
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/facebook.py", line 474, in _real_extract
webpage, 'video ids', group='ids'),
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 1005, in _search_regex
raise RegexNotFoundError('Unable to extract %s' % _name)
RegexNotFoundError: Unable to extract video ids; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output
Description

It looks you're not using the right video url. Try:
youtube-dl -v -F https://www.facebook.com/alex.drone.1840/videos/223407775574561/

You have to right-click on the video, it will show a "Show URL to video" or something similar in your language, a text-field will appear with the link to use with youtube-dl. I tried this today, it works.

Appreciate your advice, guys. Yeah, you're right, those helped and I've successfully downloaded that video with a different URL. However, maybe folks maintaining youtube-dl will do some tiny optimizations and support all URL types for facebook. Anyway, thanks again for your help. Youtube-dl community is awesome.

Same issue today, while https://www.facebook.com/jebosseenGD/posts/3041440072603152 didn't download https://www.facebook.com/watch/?v=3402937886406323
I don't know if there is something we can do to somehow automate the translation from post containing the video to video itself.


Enable scripting to manage contacts and groups

From @GoogleCodeExporter on May 31, 2015 11:23
Enhancement request:  Enable scripting (in Python and other tools) to
manage contacts and contact groups directly on the phone.

Specifically, would like the ability to create, replace, update and delete
contacts, including photo attributes.

Also would like the ability to create and edit contact groups.

Also, the ability to add a new contact specifically to a group directly on
the phone.

Also, delete all contacts for a group, to enable a fresh reload from
external sources.

Also, toggle sync of contacts, globally and by group, directly on the
phone.

Original issue reported on code.google.com by<EMAIL_ADDRESS>on 16 Sep 2009 at 9:46
Copied from original issue: damonkohler/android-scripting#102

From @GoogleCodeExporter on May 31, 2015 11:23
As I understand the problem, giving access to the content provider API should
solve
this issue.

If there is a way to build, read and write 'content://' uri, all of the above
will be
possible.

Original comment by<EMAIL_ADDRESS>on 8 Mar 2010 at 2:14

From @GoogleCodeExporter on May 31, 2015 11:23
To help the problem along, I've hacked up a quick and dirty Contacts API to
serve as
the jumping-off point for any further development.

Please find attached a patch for AndroidFacade.java to provide a simple
(read-only)
contacts-querying API.

IMPORTANT: Please note this patch relies on the suggested fix I submitted for
Issue
288 (http://code.google.com/p/android-scripting/issues/detail?id=288).

Original comment by<EMAIL_ADDRESS>on 12 Apr 2010 at 11:12
Attachments:

contacts_api_(draft).patch

From @GoogleCodeExporter on May 31, 2015 11:23
Thanks for the patch. Although code will probably end up in different file as
we tend
to keep things organized a bit... :)

I'll just wait for @Damon to accept the feature request...

Original comment by MeanEYE.rcf on 13 Apr 2010 at 10:08

From @GoogleCodeExporter on May 31, 2015 11:23
@MeanEYE.rcf: No problem - I debated creating a new "ContactsFacade" class, but
I'm
not too familiar with the ASE codebase yet, so I thought I'd throw what I had
out
there as a starting point. ;-)

I'm actually interested in hacking on ASE some more and submitting more
patches/bug-fixes/enhancements, but I've never contributed to a Google code
project
before - can you tell me if there's an approved way to do it, or is "attaching
patches to issues" convenient enough for you guys?

Original comment by<EMAIL_ADDRESS>on 13 Apr 2010 at 10:27

From @GoogleCodeExporter on May 31, 2015 11:23
Original comment by<EMAIL_ADDRESS>on 13 Apr 2010 at 10:46

Added labels: Type-Enhancement
Removed labels: Type-Defect

From @GoogleCodeExporter on May 31, 2015 11:23
Original comment by<EMAIL_ADDRESS>on 13 Apr 2010 at 10:46

Changed state: Accepted

From @GoogleCodeExporter on May 31, 2015 11:23
Somehow, am still the owner of this feature request, although I am no longer
involved with the project. Someone else should take a look at it.

Sorry chobi.0ne.

Original comment by MeanEYE.rcf on 6 Jan 2013 at 3:15

From @GoogleCodeExporter on May 31, 2015 11:23
Original comment by<EMAIL_ADDRESS>on 6 Jun 2010 at 5:29

From @GoogleCodeExporter on May 31, 2015 11:23
Is it currently possible?

Original comment by<EMAIL_ADDRESS>on 6 Jan 2013 at 2:59

From @GoogleCodeExporter on May 31, 2015 11:23
It's fine. I found the way to do it for my needs via gdata.contacts . It does
everything I need online via google services and then syncs with my phone.
Thank you.

Original comment by<EMAIL_ADDRESS>on 8 Jan 2013 at 8:11


Outlier in ARMENIAN_GULL ZZO.G

Gull ZZO.G has an outlier record near an airport in Ankara, Turkey:

Either this is a true outlier (wrong gps coordinates) within the track, which is hard to resolve or it is a manually moved tracker after it was removed from the bird (at the end of the track). If that is indeed the case, it would be good to set the session end date at the last valid location.
To be resolved with the researchers.

It is a true outlier, see row 6520.


Added optional multilingual support

Optional multilingual support
Can be used in conjunction with the multilingual polyglot plugin.
For those who don't need multilingual support / support for localizing other languages, the previous settings/default behavior will continue to apply.
Features / usage:

Multilingual features can be enabled by including multilingual: true in _config.yml
If not set, the previous default behavior continues to apply
If one doesn't have a multilingual site but wants to use a language other than English, one can set the language in _config.yml using language: , e.g. language: de
That way, the <html lang=...> tag at the top of each page will reflect the language one is using.
Date formats can be localized/customized in language.yml, e.g. date_format: "%d. %B, %Y".
If one is using the polyglot plugin, one can place a language.yml file each into a separate directory for each language in _data, e.g. _data/en/language.yml, _data/de/language.yml---polyglot will automatically fetch the date_format (as well as all the other strings) according to the currently selected language.
Otherwise, one can of course customize the date format (for a one-language site) in _data/language.yml
Capability to customize the  word order of localized strings strings with "%s":  in languages other than English, this will sometimes be necessary, i.e. in German, "Auf Facebook folgen" is grammatically better than "Folgen auf Facebook"
This can now easily be implemented  by adding for example,  str_follow_on: "Auf %s folgen"  to the language.yml data file. The same can be done with str_add_to.
If no "%s" is specified in the localization string, the default behaviour of
appending it to the end will be applied.
Also added str_share to language.yml---so that this can also be localized/translated if needed.
Language switcher in navbar: the language names need to be configured in _data/lang-names in order in implement this, e.g.:

en: "English"
de: "Deutsch"

Site title, description, header_text and footer_text are rendered according to the currently selected language (if multilingual: true is set). In order for this to work, one must create an entry for each language for each of the four site variables, e.g.:

title:
  en: Site title
  de: Titel der Website
description:
  en: About this website
  de: Über diese Webseite
...

Suggestions for improvement and  / or corrections are of course very welcome.

I am not familiar with the polyglot plugin, do you need it for the multilingual to work?

One would need the plugin for all of the things to work—at least the way it is written at the moment—because the code references

site.active_lang—which is a site variable provided by the plugin that makes it convenient to obtain the currently selected language
site.data.language which the plugin will automatically expand to site.data.active_lang.language, i.e. it will fetch data from _data/fr/language.yml if one has selected french, or  _data/de/language.yml if German is selected, etc.

However, although these things are certainly more convenient with the plugin, I think it would be feasible to find a work-around if one wanted to be able to do it without the plugin. For example, one could  get the current language by going through the list of languages (site.languages) and checking the page.url if it contains one of those language tags at the beginning—if not, then the current language would be the so-called site.default_lang...
—presupposing one put the "default language" at the root directory of the site, and the other languages (such as de, fr, zh... each into directories above the root level, e.g. /de/, /fr/ etc. (which is the way the plugin organizes the site/helps one organize it).

The problem of using plugins is losing GH Pages support. Recently I did something similar without plugins but it is tricky and I used a JS (not needed) for browser locale detection and auto-redirection.
https://github.com/EpicBounties/epicbounties.github.io/tree/new-site

Indeed, only a selected number of plugin are validated by GitHub.

As it requires another gem not compatible with github page, I won't merge this one


Redirecting stdout/stderr for remote plugins

It's inconvenient to have to pass around the vim object all over the place just so you can use it for logging.

But stdout/stderr in the legacy interface doesn't do logging, it echoes messages to the user. For this explicit nvim I think is cleaner. For logging use the native interface:
import logging
logger = logging.getLogger(__name__)
error, debug, info, warn = (logger.error, logger.debug, logger.info,
                            logger.warning)

Oh, didn't know logging was set up.


cChocoPackageInstaller not finding package in local source

Hi,
I've been playing around with cChoco and was attempting to install SQL 2016. I have set up a chocolatey repo on a remote server and I'm able to set it as a source using the cChocoSource resource. I can then see it when I do a "Choco sources" and I can even install SQL using the sql2016 package I created if I run “choco install sql2016”
The issue is if I try an install of the same package using cChocoPackageInstaller I get an error saying
2019-03-01 14:48:20,878 2584 [ERROR] - sql2016 not installed. The package was not found with the source(s) listed.
Source(s): '\remoteservername\c$\ChocolateyRepo;https://chocolatey.org/api/v2/'
The configuration I’m using is as follows:
Configuration ToolInstall
{
    Import-DscResource -ModuleName cChoco

    Node $AllNodes.NodeName
    {
        cChocoInstaller installChoco {
            InstallDir = "C:\Program Files\Chocolatey"
        }

        cChocoSource SetSource {
            Name     = "LCCRepo"
            source   = "\\remoteservername\c$\ChocolateyRepo\"
            Priority = 1

        }

        foreach ($tool in $ConfigurationData.ToolData.Tools) {
            cChocoPackageInstaller $tool {
                Name   = $tool
                Ensure = "Present"
            }
        }
    }
}

I’m new to chocolatey so any assistance would be appreciated.
Thanks

Does the account DSC is running under have access to that share?

The account does have admin access. This is a two server dev environment so everything is pretty open.

@MubSalim The error you are getting is one from choco itself so I don't think this is a cChoco issue. Can you reach out to the Gitter channels for choco (https://gitter.im/chocolatey/choco)?

]Gitter conversation](https://gitter.im/chocolatey/choco?at=5c8100a4f895944c08559fc4) for this resolved the issue which turned out to be permissions on the share. DSC, by default, runs under the SYSTEM account on the local computer. This had no permissions to the share.
The fix in this case was to use the PsDscRunAsCredential which is documented at Microsoft Docs.
Interesting article on how to check which account DSC is running under.


[Bug]: lora can't be loaded.

What happened?
Running the latest run, lora can't be loaded.
Colab cell output
all detected, cloudflared trying to connect...
Error loading script: lora_script.py
Traceback (most recent call last):
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/modules/scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/modules/script_loading.py", line 11, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions-builtin/Lora/scripts/lora_script.py", line 7, in <module>
    import lora
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions-builtin/Lora/lora.py", line 362, in <module>
    list_available_loras()
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions-builtin/Lora/lora.py", line 343, in list_available_loras
    os.makedirs(shared.cmd_opts.lora_dir, exist_ok=True)
  File "/usr/lib/python3.10/os.py", line 225, in makedirs
    mkdir(name, mode)
FileExistsError: [Errno 17] File exists: '/content/fused-lora'

Which colab and model(s) were you using when the error occurred?
https://colab.research.google.com/github/camenduru/stable-diffusion-webui-colab/blob/drive/run.ipynb
Which Public WebUI Colab URL were you using when the error occurred?
remote.moe
If you used HiRes mode when the error occurred, please provide the Hires info
No response

You have remote.moe working? Hasn't been working for me for months.

You have remote.moe working? Hasn't been working for me for months.

no work, I forgot to change the default option for feedback.

maybe fixed please try again


Add NVIDIA GPU acceleration support automatically

Hello, congratulations on the app, are there plans to automatically add the "--nvidia" flag that enables the use of graphic acceleration of gpus nvidia with the same driver host in the container?
BoxBuddy did not identify my GPU Nvidia and applied the flag, so I created the container manually, for example:
distrobox create --image fedora:39 --name fedora-nvidia --nvidia
Then everything went normally on BoxBuddy.

Hi, yes I was planning on making the Nvidia switch a checkbox on the create box page, though I suppose detecting the hardware and passing it transparently is probably better UX.
I'll update this issue when I release 1.0.5

Released in v1.0.6


Improve Select to Accept all available variables from metrics! instead of relying on Id.

The underlay background has changed so this issue isn't in way anymore!


Suggestion: deferred type inference

[Note: the main approach I presented here uses explicit notation requiring introducing an additional operator(s). An alternative approach that applies code analysis instead is also discussed in the comments. That was actually how the initial idea started but I decided to go with the more conservative, explicit approach because I was uncertain if it would be sufficiently effective or simple to be implemented in practice.]
I have many places in my code where I can't really benefit from type inference, but it just seems like there aren't really good reasons why that wouldn't be possible to achieve through a slightly more explicit syntax.
One example is when a variable is conditionally assigned:
let someVar; // Defaults to 'any' :(

if (..some condition..)
    someVar = [{x: 1, y: -1}, {x: -2, y: -4}];
else
    somevar = [{x: -2, y: -3}, {x: 1, y: 3}];

Or assigned within a try..catch..finally block
let someVar; // Defaults to 'any' :(

try {
    someVar = [{x: 1, y: -1}, {x: -2, y: -4}];
    ...
}
catch (e) {
    somevar = [{x: -2, y: -3}, {x: 1, y: 3}];
    ..
}
finally {
    ..
}

The compiler can't infer the type of someVar because the assignment did not happen immediately at the same let statement.
This could be worked around by using var instead (though I personally try to avoid it as much as I can):
if (..some condition..)
    var someVar = [{x: 1, y: -1}, {x: -2, y: -4}]; // Inferred as { x: number, y: number }[]
else
    somevar = [{x: -2, y: -3}, {x: 1, y: 3}];

try {
    var someVar = [{x: 1, y: -1}, {x: -2, y: -4}]; // Inferred as { x: number, y: number }[]
    ...
}
catch {
    somevar = [{x: -2, y: -3}, {x: 1, y: 3}];
    ..
}
finally {
    ..
}

However there are cases where even var cannot help:
let someVar; // Defaults to 'any' :(

callAFunctionWithCallback(() => {
    someVar = ["HI", "THERE"];
});

let intermediateValue; // Defaults to 'any' :(

startAPromise()
  .then(() => { ... intermediateValue = [5, 4, 3];  ... return anotherPromise() })
  .then((result) => { ... use intermediateValue... })
...

Wouldn't it be great if there was a way to indicate that a variable should recieve the inferred type for a particular assignment?
let someVar; // Inferred as '{ x: number, y: number }[]' :)

if (..some condition..)
    someVar <>= [{x: 1, y: -1}, {x: -2, y: -4}];
else
    somevar = [{x: -2, y: -3}, {x: 1, y: 3}];

let someVar; // Inferred as { x: number, y: number }[]

try {
    someVar <>= [{x: 1, y: -1}, {x: -2, y: -4}];
    ...
}
catch {
    somevar = [{x: -2, y: -3}, {x: 1, y: 3}];
    ..
}
finally {
    ..
}

let someVar; // Inferred as '{ x: number, y: number }[]' :)

if (..some condition..)
    someVar <>= [{x: 1, y: -1}, {x: -2, y: -4}];
else
    somevar = [{x: -2, y: -3}, {x: 1, y: 3}];

let someVar; // Inferred as 'string[]' :)

callAFunctionWithCallback(() => {
    someVar <>= ["HI", "THERE"];
});

let intermediateValue; // Inferred as 'number[]' :)

startAPromise()
  .then(() => { ... intermediateValue <>= [5, 4, 3];  ... return anotherPromise() })
  .then((result) => { ... use intermediateValue... })
...

This may also prove useful in class constructors, where there is no general way to benefit from type inference when assigning to class member properties:
function processInput(input: number, options: OptionsType): {x: number, y: number}[] {
    ...
}
...

class SomeClass {
    memberProperty; // Inferred as {x: number, y: number}[]

    constructor(input: number, options: OptionsType) {
        this.memberProperty <>= processInput(input, options);
    }
}

For cases where the inferred type should be a union, a related operator can be introduced to "partially" infer each component of the union on separate assignments:
let someVar; // The inferred type here is 'number | string'

if (..some condition..)
    someVar <|>= 42;
else
    somevar <|>= "HI THERE!";

This special operator may also be helpful with nullable and optional types, and may even somewhat reduce the need for a specialized shorthand notation for Nullable<T> in some scenarios:
let someVar; // The inferred type here is 'number | null'

if (..some condition..)
    someVar <|>= 42;
else
    somevar <|>= null;

Some properties and restrictions for the operators
The cast and assign operator (<>=) can only be used once for a particular variable:
let someVar;

someVar <>= 42;
someVar <>= "HI"; // Error..

Even if the inferred types are similar:
let someVar;
someVar <>= 42;
someVar <>= 43; // Error..

The operator is only applicable to untyped variables. Other types would error:
let x: number;
x <>= [34,45,12] // Error: deferred type inference is only available for untyped variables

// This variable is _explictly_ typed as 'any' so this would not work:
let y: any;
y <>= [34,45,12] // Error

The full assignment operator (<>=) and partial one for unions (<|>=) cannot be mixed together:
let someVar;

someVar <>= "HI";
someVar <|>= 42; // Error..

Scoping rules
The scoping rules for both of these operators are open to discussion:
Targets that seem reasonable to me:

Local variables
Variables referenced through closures
Class member properties referenced from constructors

Targets that don't seem very reasonable to me:

Function and method parameters referenced from anywhere, including the function body
Class member properties referenced from class instances
Class member properties referenced from derived classes
Static class member properties referenced from instance methods / getters / setters
Variables referenced from an anonymous class through a closure
Variables referenced through closures where the received type is, or is dependent on an out-of-scope generic parameter, either through a generic function or anonymous class (the problem here is that in most cases it would either be a mistake or the type would simply default to any, which wouldn't be very useful)

Targets that are open to discussion:

Class instance member properties referenced from class instance methods/getters/setters
Static class member properties referenced from static class methods/getters/setters

Relationship with noImplicitAny
Having this alongside noImplicitAny would simply mean that every untyped variable or class member property must receive a type, and would never default to any if its type is not explicitly set by either its declaration or by using an implicit or explicit type inference:
let x; // Error: no implicit any
x = 2;

let x; // OK, type inferred as 'number'
x <>= 2;

Some open questions

Would you find something like this useful, and perhaps use it yourself?
Do you feel this encourages a generally "healthy" style of programming, or at least does not discourage it?
Should the scopes become even more limited than the ones I recommended? or alternatively should be extended?
Can the <>= and <|>= operators (AKA the cast and assign operators) be made available for use by ECMAScript? Do they seem intuitive enough? Do you have any ideas for a better notation?
Would you prefer the Pascal assignment notation over the one I used in the proposal? e.g. x := 42 and perhaps x := <|> 42 for unions? Is it ever likely to receive clearance from ECMAScript?
Would you prefer a more automated approach based on code analysis rather than explicit notation? How difficult is that to implement in practice? Can that approach be applied to somehow help with inferring union types or an explicit notation is still needed there?
Is there enough motivation from the TypeScript team to add the feature described or a similar one (modified or extended to their liking) in the reasonably near future, i.e. up to about a year or so from today? (assuming I don't have the time or sufficient knowledge to implement it myself?)

I have some cases that I want to infer instead of writing the type ahead. Large data structures that cannot be assigned directly could really benefit from deferred inference.
Though I think <>= looks a bit weird to be honest.
How about just a deferred keyword?
let x: deferred;
callAFunctionWithCallback(() => {
    x = ["HI", "THERE"];
});

@tinganho
My initial idea was somewhat similar to the one you mentioned (I think the notation I first considered was x: <any> which in retrospect wasn't very good). The problem I perceived with the "just associate the type of the vertically first value assigned" approach is that there is no explicit control over where that happens.
In the case of a closure there isn't really a way to know what is the actual order of execution that would take place, and if the first assignment happens to be a mistake, and that code may not even execute in practice, then the mistaken type would erroneously be associated with the variable.
let x: <Deferred>;

let func1 = () => {
   x = ["HI", "THERE"];
}

let func2 = () => {
   x = [4, 2];
}
..

Or alternatively, if the vertically second assignment was erroneous, but the first one was removed, the compiler would infer a type that was not intended by the programmer, and the resulting error messages may be a bit strange (the compiler would claim it expects a type that was never even intended by the programmer as valid for the variable).
If there is no assignment at all, it is also not clear what type the variable would receive (in the case of untyped let x it is either any or an error when noImplicitAny is enabled)
Another issue is that it cannot be naturally extended to the union notation, which has to be very explicit:
let x;
if (..someCondition..)
  x <|>= 34;
else
  x <|>= "HI";

It also has the advantage that it naturally extends from untyped variables, which makes conversion from plain Javascript easier, and more natural for people who are used to it.
It also requires less typing and somewhat cleaner.
In terms of notation, a different one I considered was the empty cast:
let x;
x = <> number;

Which I don't think is really that different aesthetically, and would personally prefer the one suggested here.
Ideas for a better notation would be highly appreciated!
And if most people believe the "vertically first" approach wasn't that bad and would prefer it, I have no problem with that, but it appears to be less easy to work out to a good proposal and there seem to be more issues needed to be tackled with it. That's why I believed the more "explicit" approach would seem more acceptable (though I might have been wrong?)

@tinganho
The "cast and assign" notation presents the analogy of both casting to the type (the <> part), and and assigning the value (the = part). I'm aware it looks a bit like something from some esoteric or academic programming language, so there definitely might be better ones..
For example, a less "strange" notation that came to mind was Pascal style assignment notation, e.g.:
let x;
x := [234,235];

and perhaps
let x;
if (...)
  x := <|> 64;
else
  x := <|> "HELLO";

for unions.. (or something like that.)
It is very simple and readable, and I would have definitely preferred it instead. The problem was that I had very strong doubt it could accept clearance from ECMAScript..

This doesn't feel very Typescript-like.
The philosophy of TS so far has been to consciously limit inference for two reasons:

compiler performance;
catch more errors by forcing the developer to declare its intent rather than infer everything from usage.

Inferring as much as possible from code by assuming everything is correct feels more like the philosophy of the Flow checker.
Introducing new syntax in the language is a drawback that needs to pay for itself with benefits. In this case I'm really not sure it's worth it.

@jods4
Thanks for sharing your opinion, I don't think I would have spent the time to write this I felt the same. I did not feel this is somehow inappropriate for TypeScript, at all. It is not my job to analyze compiler performance and I did not think there's very complicated analysis needed here, compared to say, highly nested generic expressions and constraints etc. It does require an additional operator and I did my best to find one that I felt was reasonable. I would have preferred if it was possible to do without one but couldn't find an adequate solution (it does not mean that doesn't exists).
I don't think that the philosophy of TypeScript is to force the developer to write types in full. To the contrary, I think there has been a tremendous effort that's been put to infer whenever possible and reduce the amount of places that programmers would need to spell types (which at many cases become very complex). There are hundreds of feature requests here for very small improvements in type inference, this includes some extremely intricate patterns, many of them are significantly more complicated than anything mentioned here.
Anyway, perhaps you have an alternative suggestion on how to make better use of type inference for these particular scenarios? because I keep finding myself spending needless time in writing out types in full here, and maintaining them, especially when using promises and callbacks:
let someVar;

callAFunctionWithCallback(() => {
	someVar = ["HI", "THERE"];
});

let intermediateValue; // Inferred as 'number[]' :)

startAPromise()
  .then(() => { ... intermediateValue = [5, 4, 3] .. })
  .then(() => { ... use intermediateValue ... })
...

I also avoid entirely using var due to its scoping rules so this scenario is very common in my code:
let someVar;

if (..some condition..)
    someVar = [{x: 1, y: -1}, {x: -2, y: -4}];
else
    somevar = [{x: -2, y: -3}, {x: 1, y: 3}];

I think this is something we'll want to look at once the flow control analysis work is in. It may be reasonable to infer the type of a variable from its first assignment (or set of equally-reached assignments) rather than only its initializer.

@RyanCavanaugh
As I mentioned in a previous comment my original approach was a "first vertically seen assignment" (note this may include closures, so it isn't really just "first assignment") one but I felt that was not adequate enough to propose and did not believe it would get a positive response. One of the main reasons was error messages, here's an example:
Let's say that there are several assignments to a variable and one of them is for an incompatible type and then the value is returned from a function which is then passed to another function:
function funcThatWantsAString(str: string) {
  ..
}

function func() {
  let x;
  x = 42;
  x = "OK"
  return x;
}

funcThatWantsAString(func());

Now let say the first assignment is there by mistake but the second one is correct, the compiler would assume that x should be a number and func in turn returns a number. The fact is, the code is completely valid (despite the inconsistent types, I mean) and runs perfectly fine. One of the error messages here would be that funcThatWantsAString wants a string as first parameter, not a number, and this may leave the programmer a bit puzzled..
(I could imagine ways to mitigate that but that would require some careful ordering of the compilation process, for example avoiding inferring the function return type if there is a type conflict of this sort inside of it - this may be possible but I'm not in a position to know).
I could imagine this may be even worse than this, there could even be cases where the inferred type is taken from a function that references the variable from a closure, however, that function isn't even executed in practice:
let x;

function funcThatIsntExectuted() {
  x = 42;
}

function func {
  x = "HI";
}

So now the compiler inferred a type based on something that's invalid and not even executed, so the error message may be a bit confusing as well..
It could be that my concerns was exaggerated, but these are things that could happen, especially when converting from plain Javascript code (which may execute just fine in practice).

@malibuzios

perhaps you have an alternative suggestion on how to make better use of type inference for these particular scenarios?

Let me try, not sure if I'll succeed :wink:
Before that: I don't think declaring your types is that bad. It helps catch mistakes and once you have them you can put type annotations in cases where required + code completion will work for you + it will prevent some typos that might get "inferred" + it might help readers of your code understand immediately what a variable is about.
Coders in other static languages (C#, Java, etc) have had to declare all their types for a long time and somehow it worked for them (not saying we shouldn't try to improve).
Let's look at your examples
// #1
// I can't help much on this one, because "as is" the pattern looks bad.
// Mutating global state like that is bad but I can't suggest much
// because you didn't provide context as to what this is supposed to do.
// If callAFunctionWithCallback is synchronous it should rather return a value,
// if it's async you should really use Promise, or async rather than callback.
// In the async case this code is fragile because it's not re-entrant.
let someVar : string[];
callAFunctionWithCallback(() => {
    someVar = ["HI", "THERE"];
});

// #2
// You can return one promise result to the next one.
// Use await to make your async code awesome.
startAPromise()
  .then(() => { ... return [5, 4, 3]; })
  .then(result => { ... use result (inferred number[]) ... });

async function() {
  await startAPromise();
  let intermediateValue = [5, 4, 3];
  await whatever();
  // use intermediateValue
}

// #3
// (Typical example where an interface will make typing easier thanks to completion)
// I would certainly have some Point interface if I had to manipulate points all over the code.
let someVar = some_short_condition ?
 [{x: 1, y: -1}, {x: -2, y: -4}] :
 [{x: -2, y: -3}, {x: 1, y: 3}];

let someVar = hideComplexCodeInFunction();
function hideComplexCodeInFunction() {
  if (some_condition)
    return [{x: 1, y: -1}, {x: -2, y: -4}];
  else
    return [{x: -2, y: -3}, {x: 1, y: 3}];
}

// #4
// I think it's probably better if you declare the structure of your class explicitely...
// If you use some structure accross functions and in public contracts (return values, fields)
// you should seriously consider naming it.
// Anyway, no other solution in my opinion for typing a class field which is computed from ctor parameters.

class SomeClass {
    memberProperty: Point[];
    constructor(input: number, options: OptionsType) {
        this.memberProperty = processInput(input, options);
    }
}

Inferring your last example is probably going too far. Consider that if someone changes the return type of processInput, it has consequences all over your code by changing the type of the field memberProperty. This could even be accross different libraries!!

@jods4
Thanks for putting the time at trying to suggest workarounds, but these scenarios, although simplified are based on real-world code where using these variables in those particular positions was deemed to be the best choice.
1 - This is a very simplified callback or closure scenario. Yes it is very basic, sure using async or a promise is better but not always possible.
2 - The intermediate value here is not necessarily something that is possible to return from the promise. A lot of the time the promise would return another promise and that intermediate value is not related. e.g.:
let intermediateValue;

startAPromise()
  .then(() => { ... intermediateValue = [5, 4, 3]; return anotherPromise()})
  .then(result => { ... use intermediateValue ... });

Yes I wish I could use await everywhere, and I guess I will use it more (more like "at all") when downlevel emit for ES5 is available. But there would always be cases where its not possible or it wouldn't be perfomant enough
3 - I don't use the _ ? _ : _ because of readability, and in many cases there are more than two options or it is nested, I simplified the example to consume less space.
The kind of code I write commonly requires good performance so putting it in a function may have some negative effect. It also looks a bit unnecessary and adds some noise complexity.

It is already possible to call a function and infer that type into a class property, the limiting aspect about it is that it cannot accept parameters like a full constructor:

class SomeClass {
    memberProperty = func();
    }
}

I don't think that is such a bad pattern, anyway it exists in the language so I guess they thought it was good enough. If the type returned by func changes, sure, it will have implications, but that's not that different from other places where inference is used.
Sure there are patterns to cleverly avoid needing to state types, or minimize them. The thing is, one of the main ones is type inference. I don't see anything fundamentally wrong to extend it to cover more scenarios.

@malibuzios Nothing wrong with wanting powerful inference, just challenging a little bit ;)
I think there is a limit on inference, though. If you start inferring too much by always assuming the code is right, then you start to loose the benefits of static typing.
For instance consider this, which is still rather simple and supported in TS 1.8:
let array = [ { x: 1, y: 2 }, { x: 3, /* typo, should be y*/ w: 4 }];
// array: {x: number, y: number}|{x: number, z: number }[]

This might get caught by further usage, if you're unlucky it might not.

@RyanCavanaugh
I've reconsidered the examples I've given you, which I thought may lead to unhelpful or puzzling error messages. There's a very simple solution to this. First I'll try to construct a (rather contrived) scenario that better exemplifies the problem, which is rather like a 'hybrid' of the two examples I gave:
let x;

function thisFunctionIsNeverCalled() {
	x = 42;
}

function thisFunctionIsActuallyCalled() {
	x = "HI";
}

function thisFunctionWantsAString(arg: string) {
	...
}

thisFunctionIsActuallyCalled();
thisFunctionWantsAString(x);

I said that the problem may be that one of the error messages would look something like:
Error: In 'thisFunctionWantsAString', 'arg' wants a 'string' but got a 'number' instead

One simple thing that can be done to avoid this is to instead infer x is being any (not because that would be useful, but only to avoid outputting further confusing errors) and only give the error:
Error: Cannot infer a type for 'x': incompatible types assigned

(or something more friendly than that perhaps..)
Where the 'squiggles' would highlight both assignments equally, without giving any precedence to any one of them.
This may be seen as somewhat of a breaking change (or at least an increase of the 'strictness' of the compiler) because some implicit 'any' types, that weren't notated but the variable was actually intended to accept multiple types (this possibly includes unions) would now error and would need to be explicitly set as any (or a more specific union type), though withnoImplicitAny enabled this doesn't seem like it would be an issue.

@RyanCavanaugh
A somewhat similar approach to what I described seems to be already done for return type inference:
function choose(a: number, b: number) {
	if (a > b)
		return 1234;
	else
		return "abcd";
}

Infers the return type as number | string but gives the compile-time error:
No best common type exists among return expressions.

(though I'm not sure the intention here was to infer 'lower' common types, so this isn't exactly the same)
Also, the kind of inference described here could be enabled by a compile-time switch that would lie somewhere on the spectrum between 'regular' mode and noImplicitAny mode. Something along the lines of noImplicitVariantTypes.
I would have personally enabled something like this immediately if it was available and I don't think the amount of superfluous 'errors' it would catch would be very large. noImplicitAny by contrast is very strict and at times 'nitpicky' and seems to be difficult to 'satisfy' in large code bases (hundreds of errors at times).

This seems (at least partially) covered on TS 2.1: https://blogs.msdn.microsoft.com/typescript/2016/11/08/typescript-2-1-rc-better-inference-async-functions-and-more/

We've implemented the let initialization to its most reasonable degree and return type inference is less strict now, so I'm calling this one done.


Introduce FlexzboostGen class, tests and demo notebook.

This is the first real set of commits for this repository. It includes the new FlexzboostGen class, a couple of test suites and a demo notebook.

I realize that no one has officially put a green check mark on this, but since this is the first PR with any substance, I'm going to go ahead and merge it.
If there are bugs that are noticed with this later, I'll create issues to track them, and address them in smaller PRs.


FR: Support download mp3 voice file when TTS

Hi! Thanks for you share.
Can support download mp3 voice file when TTS？

This is not a planned feature at the moment but you could always record the audio with an external audio recording software.

I'm gonna close this issue for now (not sure of the best practice for a feature request issue as to whether I should leave it open or not)


Use the fog-aws gem specifically now

AWS functionality in fog has been split out. We should be depending on
fog-aws instead.  I also bumped the knife-windows dep and updated the
mails forth Adam/Seth.

Any thoughts on this folks?

Rebased to current changes.  I'd love to get your thoughts @NimishaS or @btm


health check: gracefully handle GOAWAY in grpc health checker

Commit Message:
Gracefully handle GOAWAY in gRPC health checker, allowing in-progress healthchecks to complete before closing the connection.
Additional Description:
We've observed failures in our production and integration testing environments due to the gRPC health checker interpreting GOAWAYs as a health check failure. As an example, if all endpoints in an upstream cluster drain their incoming connections at the same time (eg. listener config change) a grpc healthcheck client with unhealthy_threshold=1 will see the entire cluster become unhealthy, which is undesirable.
This is my first contribution to Envoy, and would appreciate a close eye for edge cases I may have missed!
Risk Level: low/medium
Testing: added unit tests, ran (failing) grpc hc internal integration test with this patch which passed
Docs Changes: n/a
Release Notes: n/a
Signed-off-by: Joey Muia<EMAIL_ADDRESS>

/retest

/azp run envoy-presubmit

@lizan These tests seem to be a flake. Or at least I can't seem to reproduce the failure locally with either
bazel test //test/common/config:subscription_factory_impl_test
# or
./ci/do_ci.sh 'bazel.release' //test/common/config:subscription_factory_impl_test

Would you mind taking a look, or kicking off the azure-pipeline tests again?

@lizan Similar to #11324 - I could not reproduce the test-failures using the following commands:
./ci/do_ci.sh 'bazel.release' //test/common/config:subscription_factory_impl_test
# or
bazel test //test/common/config:subscription_factory_impl_test

The test-failure is the same as #11324 and doesn't seem related to the change. I'm not sure if this is a common flake or if I am missing something with my test commands. If it's likely flakey, could you kick off the azure pipeline run again?

@snowp the CI failures look like flakes. Can you re-run them?

/retest

/azp run envoy-presubmit

@snowp ready for another review. I reverted the commit that allowed multiple GOAWAYs and added a TODO instead.


Add api gateway test that uses custom package for action

It looks like all of the tests in ApiGwTests.scala that involve creating actions create actions in the default package. This PR adds a test that creates an api for an action in a custom package.

@mdeuser can you review?

@jsanda Please at least do a rebase, because we are implementing REST for all the test cases.
Both of Wsk and WskRest inherit BaseWsk.

Sorry, I have been away for the past several days. I will update this PR tomorrow.

@jsanda I took the liberty of rebasing this for you.

@jsanda do you have an Apache CLA?

@drcariel - i believe this test was created after the rest/cli refactoring and may need additional work to enable an equivalent cli test.  what do you think?

@mdeuser yes, the same test will need to be added to https://github.com/apache/incubator-openwhisk-cli/blob/master/tests/src/test/scala/whisk/core/cli/test/ApiGwCliBasicTests.scala if appropriate

@drcariel will you take care of that after I merge this or do you want to add to this branch?

@rabbah I can handle the addition to the cli repo


All occurences of old version are replaced in files instead of only the first

Hi,
In my package.json (and others files passed to bump command), there are some dependencies like "cordova-plugin-add-swift-support": "1.7.0", in it.
When i bump with bump --prompt --tag --push --all --grep config.xml for new value at 1.7.1 for example, if my actual package version is the same as dependencies versions (exemple 1.7.0), then all occurences are replaces in files instead of only the first value (example in package.json : "version": "1.7.0",).
So when bump is finished, the dependencie is also at the new version "cordova-plugin-add-swift-support": "1.7.1",, altough it must not be !
A correction for this will be to replace  the line 162 in lib/index.js: let oldVersionPattern = new RegExp(oldVersion.replace(/\./g, '\\.'), 'g');
with let oldVersionPattern = new RegExp(oldVersion.replace(/./g, '\.'));
The new code replace only the first occurence of old version in any files changing by bump command.
What do you think ?

The grep option is intended to be used for things like ReadMe files, license files, etc. where you know the contents of the file and can be relatively certain that there won't be any conflicts.  I don't recommend using it for files that contain many different version numbers that could possibly conflict.
Replacing a single instance of the version number rather than all instances doesn't really fix the problem, since it relies on the assumption that the intended version number will always come first. It's also common for the grep option to be used in files where the version number may be repeated many times.

i agree but the package.json is not use with --grep option (i don't mention it in my bump command).
It's one of the file automatically modified.
For the confix.xml used with --grep option, it's a file generate with ionic (https://ionicframework.com/), which use it for the app version (in the widget balise). I use it in args to keep it in sync with package.json for the app version/npm version.
The config.xml looks like :
`

My App
<content src="index.html" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<allow-navigation href="http://localhost:8080/*" />

...

`

I just released version 5.0.0, which supports custom behavior for different file names.  So it would now be pretty trivial to add special behavior for the config.xml file.  I'd gladly accept a PR if anybody is interested in submitting one.


change from choice to inputchoice in fldialect nad add search function

@MoAlyousef How can You add InputChoice.value_index() -> Some(i32)? How to remove nesting in InputChoice.add("https://fltk-rs.github.io/fltk-book/")?

I can try adding InputChoice::value_index() since FLTK doesn’t expose it. Regarding the nesting, you would have to escape the forward slashes with a backslash. The string has to be a string literal: r#"http:\/\/site"

@MoAlyousef , I can't understand the strange behavior in cairo_shadow_button. Can You help me?

set_label cause a widget to redraw, i.e invoking the draw method again and again.

@MoAlyousef , sorry, I didn't understand. Why does window.set_label("") work, but frame.set_label("") don't work correct?

@MoAlyousef can you add a method frame.draw_label() without redraw()?

Anything which causes a redraw like browser.clear() and frame.set_labe() if called inside the draw callback would cause issues.
How would frame.draw_label() be implemented, it would still require adding a draw::draw_text or something to the draw handler.

Thanks. I fixed the example with cairo's buttons. Why it don't work?

@MoAlyousef The GlobalState is very usefully. I remade demos cairo_button, csv and flpicture with GlobalState and widget.handle(), but browser.handle()  don't correct work in flpicture's demos. Need examples with MVC + GlobalState.

If you can create a minimal repro of the code not working it might help with finding out what issue it has. It could be a bug in FLTK.

@MoAlyousef I make it.

@MoAlyousef Do you have any comments about MR? Will you accept?

The amount of changes is too large, and I'm busy these days. I'll review them when I have the time.

It seems flpicture wasn't updated and there's a bug when the browser is selected.
Also I'm not a fan of prefixing project/directory names with fl.
Also adding a model to each project will just add some burden to whoever reads the code. The code needs to be simple so already working code need not be modified for a new design pattern. For example, the cairo shadow button code is just to show how one can use cairo to create an FLTK widget. It's not meant to be a whole program with some architecture.
I'm also not a fan of app::handle_main as the primary way of handling events. As such it should not be emphasized in the demos repo. And as you've seen, it can cause issues when the event isn't propagated correctly.

what architectural solution do you prefer?

Some new demos are ok. The demos which attempt to show interoperation with other libraries especially on how to integrate them with FLTK (like cairo for example), should show the minimal amount of code to get something working. It should be imperative, since it shouldn't assume how other devs using or integrating this code have structured their code.

I understood. But, what architectural solution do you prefer?

@MoAlyousef Please add handling for deactivated widgets.

Done


Add support for 4-bit weights in QLinear

Further reducing the bitwidth of quantized tensors would allow to save even more device memory.
Unlike weights, activations are quantized dynamically during inference using predefined quantization parameters (the predefined parameters are established during calibration for efficiency: evaluating the activations range on every sample is way too costly).
This makes activations typically much harder to quantize than weights, because no optimization algorithm can be applied dynamically.
As a matter of fact it has already been proven quite hard to quantize activations to 8-bit without losing accuracy (smoothing techniques aside). For that reason, quantizing activations to 4-bit seems impossible.
This issue is therefore about the 4-bit quantization of weights only.
This raises at least two issues with the current QTensor subclass:

it assumes its inner data is a tensor with a valid dtype (and int4 is not),
it only supports symmetrical quantization, which would probably makes it hard to quantize to 4-bit.

Instead of tweaking QTensor directly, I would be inclined to create a new QIn4tTensor child class:

whose _data follows different semantics (typically pack 4-bit weights into a torch.int32 tensor),
that has a _zeropoint member.

Then, a single dispatched function should be supported for that new subclass: torch.nn.functional.linear.
It would unpack the weights to int8 to obtain a QTensor, and call the QTensor dispatch.
Finally, the QLinear module should be modified to store its weights as QInt4Tensor instead of Tensor.

I think looking at what has been done in https://github.com/pytorch-labs/gpt-fast would provide a great starting point.
In particular, there already seems to be a packing function for int4 weights.
https://github.com/pytorch-labs/gpt-fast/blob/8c8c463f1f909890a2c0cd3f9e2ad75fff7f2b6c/quantize.py#L351

On a second thought, it is better if QInt4Tensor is a new subclass completely independent from QTensor, otherwise it will inherit the op dispatch which is completely unnecessary and error prone.
So basically it would be a streamlined version of QTensor, containing only:

__new__, __init__ and __repr__,
quantize to create a new int4 tensor from a float tensor,
__torch_function__ to handle nn.functional.linear (raising an error on any other func),
__tensor_flatten and __tensor_unflatten__ to be compatible with dynamo.
I am not even sure we would need to expose a dequantize operation.

Preliminary implementation merged in https://github.com/huggingface/quanto/pull/68.

Next steps are:

to store packed int4 weights (they are now stored as int8),
to provide optimized kernels for matmul (and possibly linear).

Packed weights contributed by @younesbelkada in https://github.com/huggingface/quanto/pull/70.
Next step is to add custom kernels for packed mm.

Hi @dacorvo I'd love to take on the custom kernels for packed mm. I did a super rough PR #107 so that I could outline my understanding of the scope and requirements of the problem. If it's alright with you, I'd love to get feedback on what I'm understanding correctly and incorrectly before I design my solution. Thank you :D

Hi @alejandroarmas thank you very much for your interest in quanto, and congratulations for the pull-request.
You are definitely in the right direction, I will comment directly in your pull-request.
That said, @younesbelkada has just resumed the work on this yesterday:
https://github.com/huggingface/quanto/tree/try-4bit-mm
in a first step, his implementation is entirely based on pytorch ops though, so if you feel you can contribute optimized mm for specific targets, you can piggyback on his branch.

Hi @dacorvo,  Can I say, QTensor only supports symmetric quantization and can be used in activation and weight quantization while QBitsTensor support unsymmetric quantization and should only be used in weight quantization by design?

Hi @dacorvo, Can I say, QTensor only supports symmetric quantization and can be used in activation and weight quantization while QBitsTensor support unsymmetric quantization and should only be used in weight quantization by design?

Yes, you are correct.


Fix tag's margin in case of Arabic.

Added the tag's margin. #243

Sorry. Where is your change? Because formater is different :bow:
No need to fix. I can reformat later.

@konifar Oh. It's force of habit... I'll push non-formatted version soon later. Sorry.

Thanks! LGTM


Adds support for multi-user authentication

Towards https://github.com/giantswarm/prometheus-pingdom-exporter/issues/9
If the --account-email flag is specified, we use the multi user
authentication client, instead of the default client.

@rosscdh i've pushed the image:
giantswarm/prometheus-pindom-exporter:multi-user-authentication-test-1

which is based off this PR.
Would you mind doing a little testing for me? We don't use the multi-user authentication features of pindom, so it's a little difficult for me.
Usage:
joseph on dev-workspace-dc87n at 12:21:13 in /home/joseph
$ docker run giantswarm/prometheus-pindom-exporter:multi-user-authentication-test-1 server --help
Start the HTTP server

Usage:
  prometheus-pingdom-exporter server [username] [password] [api-key] [flags]

Flags:
      --account-email string   account email for multi-user authentication
      --port int               port to listen on (default 8000)
      --wait int               time (in seconds) between accessing the Pingdom  API (default 10)

So, you should only need to specify --acount-email, and with any luck, it'll work! :D
If that all works, I'll merge this in, make a new release.

+1 seems to be working. Great work!! and fast! I'll test the integration and give feedback here?

No worries - you got me on a lazy saturday :D
Post any feedback you have here, awesome.

100% working and more than decent thanks for amazing fast response!

However, after some hours I get segfaults
docker run -p 8000:8000 giantswarm/prometheus-pindom-exporter:multi-user-authentication-test-1 server<EMAIL_ADDRESS>Test2007 n2hhtq03ruyqbnksasozev1ycg7fz57y --account-email<EMAIL_ADDRESS>
 Listening on port 8000
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x5350a8]

goroutine 11 [running]:
panic(0x779b20, 0xc420012020)
	/usr/local/go/src/runtime/panic.go:500 +0x1a1
github.com/russellcardullo/go-pingdom/pingdom.(*CheckService).List(0xc4200200a8, 0x0, 0x0, 0x0, 0x0, 0x0)
	/usr/code/.gobuild/src/github.com/russellcardullo/go-pingdom/pingdom/check.go:32 +0x108
github.com/giantswarm/prometheus-pingdom-exporter/cmd.serverRun.func1(0xc420046960)
	/usr/code/.gobuild/src/github.com/giantswarm/prometheus-pingdom-exporter/cmd/server.go:90 +0x65
created by github.com/giantswarm/prometheus-pingdom-exporter/cmd.serverRun
	/usr/code/.gobuild/src/github.com/giantswarm/prometheus-pingdom-exporter/cmd/server.go:147 +0xf8


Can't connect to MySQL server (initial communication packet error)

I'm using LaraDock on Docker/OSX (1.12.0-a). Nginx works great but I have some problems with connecting to MySQL from local machine (eg. from Navicat). MySQL works fine, but it's not available from the local machine ("initial communication packet" error).
What's interesting when I connect to other WiFi (other router) then MySQL on local machine works correctly.
Also I have no problems with "mysql/mysql-server:latest" (change "FROM mysql:latest" in "mysql/Dockerfile"). When I use this package everything works ok.
Can you help me?

@ekstro have you been able to solve this!?
I was trying to test all the Containers today.. and I found that I'm not able to connect to MySQL (using Sequel Pro) from my Local machine (<IP_ADDRESS>).
I couldn't discover this problem without rebuilding the mysql containers with --no-cache today.
I tried solving it with no success, here's what I tried:

I tried messing with the config file my.cnf.
tried to revert all the changes made in that container and rebuild it.
tried using the exact same old build version that is working on my machine mysql:5.7.12.

Nothing worked!!

This could be solved by #352, if you still facing this problem, reopen this issue. Thanks


Cannot override register action in RegisterController.

I am trying to override the RegisterController register action inside a Grails 3.2.2 plugin, but it seems it still goes to the original one. But if I publish the plugin locally and then use it in an app, it then works with my action, but my overridden gsp in not rendered. I have put more details on Stackoverflow
Could I get any help?
On another topic, I am also experiencing the same issue as: https://github.com/grails-plugins/grails-spring-security-ui/issues/63

@avscj thank you for reporting this issue!
It looks like both issue #63 and the issue reported on stackoverflow have been resolved.
Are you able to confirm this issue has been resolved?
Thanks!

Closing because I believe this to be resolved.
More details are available at https://stackoverflow.com/questions/41797782/grails-3-2-2-spring-security-ui-override-registercontroller-not-working

Yes, this is fixed. Would be good if the documentation at https://grails-plugins.github.io/grails-spring-security-ui/latest/#s2ui-override-script mentions that you need to namespace your controllers if you need to override them

@avscj great idea!
Would you be so kind as to create a new issue outlining your documentation request or provide a PR that includes your desired change.
Thank-you