Automatically Activate Markdown Preview

I would like to eliminate the step of pressing ctrl+k v to preview the md file I open. For the preview should always be on.
Thank you

Here are my 2 cents on the handling of Markdown files in Visual Studio Code.
I think that the main use case for opening a Markdown file is reading it. Not only for developers who consume the documentation of tools and libraries, but also for people like me whose job involves writing lots of documentation. I don't have definitive numbers, but I'm pretty sure I read (or at least scan) many more Markdown files than I edit on a given day. That's why I think that the current situation is a bit cumbersome:

When I open a Markdown file, it is displayed as plain text / source
If I want to read it with as little distraction as possible, I press ctrl+shift+v.
But when I see something I'd like to edit, pressing ctrl+k v doesn't work. I first have to switch back to the text editor (ctrl+shift+v), then enter the split view (ctrl+shift+v).
Regardless of whether I choose the better reading experience or (if I expect an edit) the better editing experience, I always have to press a hotkey immediately after opening a Markdown file.

For me personally (this may be a matter of personal preference), the perfect UX would look like this:

When I open a Markdown file, I automatically see the preview mode that you get today when pressing ctrl+shift+v.
Then, when I want to make an edit, I can switch to split view very fast, either by pressing an Edit button or using a simple hotkey. For Markdown preview (which doesn't have much interaction) it would be possible to use f2, which is the ultimate "change"/"edit"/"rename" hotkey across Windows, Office (most important key in Excel...) and Visual Studio.

Back to the feature request by @dfinke, who wanted a setting to force Visual Studio code into split editor when opening a Markdown file:
I suggest a setting that controls how Markdown files are opened by default (e.g. markdown.defaultView), with the following values:

source for the (source) text editor
preview for the preview mode (i.e. the ctrl+shift+v mode)
split for the split editor (i.e. the ctrl+k v mode)

From the behavior of the UI it seems to me that the split editor is currently not a real standalone mode, but that ctrl+k v is merely a shortcut for manually splitting the editor and switching the second editor view to preview mode. This means that opening a Markdown file directly in split editor may require some rework (e.g. what should happen when opening several Markdown files).
To achieve a "quick win" within a limited budget, it would be possible to first implement the source and preview values of the markdown.defaultView setting and add a split setting later. That would not break the compatibility of existing configurations.
Of course I'd love to have a hotkey for switching directly from preview to split edtor, but having a markdown.defaultView setting alone would already be a huge improvement for my daily work.

I think the best solution is to show both text and preview at the same time in one editor in the same way you can diff a file from git view to see original and modified. This has obvious advantages:

it is up to you if you want to see the text, preview or both at the same time depending on how you arrange the thing (setting would get persisted)
starting to edit is as simple as clicking some edit button to bring the text to the side of the preview without having to open an additional editor
you dont have to manage 2 editors for the same thing

@bpasero You would, however, lose the ability to decide whether the preview is shown on the left or the right of the source.
Double clicking in the preview to make the source cursor jump to the corresponding location would probably be helpful.

Well we could still allow to swap the positions of source/preview.

I would also like to throw in support for an option to enable split screen previewing of Markdown files by default.

Open Markdown links inside md preview Pane within the pane itself, Now it is opening as a new tab and it opens the source. pls fix this problem, It will be great for documentation.

To me, the current behaviour seems strange given that a single click on a file is supposed to be a "preview" and a double click is required to keep it in a persistent tab. With the current single click v. double click behaviour, I'd prefer that the preview results in an actual preview (using whatever the relevant CSS is as well). I can double click if I need to edit it, but as said above, most of the time I will be reading.

Typora is indeed a great experience. Could we implement something like it in VSCode?

VS Code is very much focused on being a great code editor, so I'm not in favor of adding any WYSIWYG editor features that hide the underlying source (even if it is simple to switch back to the source). If you want a great Typora-style editing experience, use Typora :)

Back on the original issue. With #27983 in 1.21, the markdown preview now dynamically updates to show the current markdown file. That means you only have to open the preview once per session. Hopefully we'll soon have markdown previews that restore when you restart vscode as well.
This issue seems to be tracking a few different scenarios, so I'd like to understand which ones you all are most interested in:

When I open a markdown file, vscode should automatically open the markdown preview to the side of it (eliminating the open preview to side step)

A markdown editor and its preview should be a single split editor, like vs code's diff view.

A markdown editor and its preview should be a single editor, and I can quickly switch back and forth between them. (Right now an editor and its preview are two separate editor tabs. This would instead have a single tab)

When I open a markdown file, I really want to open the preview instead of the source

Something else?

Most of these are not really possible using existing VS Code APIs but it would be helpful for me to understand which functionality is the most interesting

3 & 4 for me. Let me elaborate on my ideal UX:
I do want to retain the option of being able to see both source and preview side by side, as it is helpful in some situations. But most of the time, I'd prefer to open a markdown file and see the preview (and just the preview). I'm probably reading it as others have discussed above, so scenario 4 is most relevant here. Please add a setting that lets users choose whether markdown files are automatically opened in preview or source mode.
I note that if you open a markdown file, open the preview, then close the source - there is a button to open the source again. So most of the functionality is ready to go, it just needs the option to jump straight to the preview instead of the source.
Once that is implemented, I'd then like to be able to quickly switch to the source code in the same tab if I find a typo or simple issue that needs a quick edit (scenario 3), without having to launch a new tab (or even a new split if I don't already have one open). Having to open a new split feels clunky to me. I also try to keep my splits organised by file type personally. So I might have all documentation in one split, frontend code in another, and backend in the third split. The current setup makes this difficult to achieve.

Further Thoughts
To be totally honest, I would also love VSCode to go even further and emulate the Typora experience when it comes to markdown files as well, and allow users to edit the file directly in the preview. At the very least, it would be great if the plugin system was altered to let an extension achieve that. However I do understand and accept the reasons for not doing either of those things (keep the extension system easy to use, and VSCode is for code not text).
For scenario 1 though, there is an extension that does that already. I also can see that being a feature that users would either love or hate, and I suspect more will hate it than love it (see the download numbers of the extension currently for context). In comparison, most people are likely to be reading markdown files - so opening direct to preview only will probably be welcomed.
For scenario 2 - maybe I need to see a mockup to better understand what is being suggested - but the various ways I can imagine it being implemented would make readability a nightmare.

such as mark text live preview , that's great

@mjbvz Frankly, I would personally prefer option 5 (something else) and keep current behaviour. Or implement anything, while having an option to keep current behaviour.

Option 4 really seems like it could be useful. Almost 90% of the time I'm reading markdown and not writing it so it would be nice to enable preview without source. I always end up having to close the source tab because it gets really crowded. I'd like to just go through different markdown files and only have the preview open in a split layout.

Is there an option for opening directly the preview instead of the file itself? It would be so great!!

Option 4!
Basically just switch the way its handled. When you open the md file, open it in preview only mode. And press the shortcut ctrl+shift+v to open the edit tab, instead of opening the preview tab.
Opening both edit and preview at the same time would be fine for me as a quick solution though. But I do think it makes more sense for the main tab to be the preview and then if you need to edit the file you can open up an 'edit' tab to the side.

I would like to throw out the option for a user setting change so that the user can determine if they want editor or preview as default.
Otherwise option 4 seems best

Just to throw my opinion. When I am opening a markdown file I am also going to edit it (usually).
For me the best option would be if I could choose to automatically open the preview to the side (option 1) and have the same option for other file types. Eg. I have preview for PlantUML files also where I would also like to see the preview when editing.
Option 4 is also fine but it would not be relevant to me.
Option 2 and 3 would probably solve it for markdown but it is very specific for this specific type and afterwards every other kind of community provided preview would try to create the same experience. If we can I would appreciate if we can make a general solution and let the user configure per file type what the experience should be.

VS Code is very much focused on being a great code editor, so I'm not in favor of adding any WYSIWYG editor features that hide the underlying source (even if it is simple to switch back to the source). If you want a great Typora-style editing experience, use Typora :)

I'm afraid I have to disagree.
It is supposed to be an additional feature and not an alternative option. Even in Typora one can switch back and forth freely by toggling wysiwyg mode to source code mode. Such feature would come very much in handy in vscode too.
In fact, there already is an extension in this direction right now, and I'm using it: name is UCode.
However, it does still need more polishing and improvements, like changing the font size, the editor background, change symbols for indented ordered/unordered lists, highlight markup support, etc

Maybe something like:
File modes

Edit
Preview (static)
Design (aka WYSIWYG. Maybe later, secondary goal.)

Settings (overridable by file type)

Active modes: (EDIT|PREVIEW|DESIGN)[]

f.e.

['EDIT', 'PREVIEW'] would open the edit and preview panes within a single tab.
['PREVIEW'] would just open the preview.

Pane order: HORIZONTAL|VERTICAL

f.e.

'HORIZONTAL' would display the active mode panes horizontally.

(order is defined by the active modes setting)

'VERTICAL' would display the active mode panes vertically.

(order is defined by the active modes setting)

Instead of the Open Preview to the Side icon, you might have a drop-down menu for toggling the active modes.

My biggest issue with the current setup is that the preview is not linked with the editor, so selecting another editor continues to show the preview alongside an unrelated file. It's very awkward, and IMO it would be best if the editor and preview were part of the same tab.

Please support Typora-style live editing of markdown preview!

@dlumma That should be a separate issue.

This definitely needs some attention to make VSCode a better MD viewer and editor.
Preview and editor should have the ability to be linked in a single pane window; the default open mode should be configurable (preview only/edit only/or both).
Also, as VSCode already allows double clicking on the preview to edit the source in the same pane window, there should be a vice-versa (icon and/or context menu item) to return to preview mode in the same pane window, not the current "open preview to the side" which gets clunky and causes pane management hassles, or the Ctrl-Shift-V preview shortcut which creates a new tab, which causes tab management hassles.
If the new tab preview shortcut is required to stay, at least have a single MD shortcut that will toggle between preview and source tabs, instead of having to press CTRL-SHIFT-V then pressing Alt Left and Right.

Found #77131 - this is in the iteration plan for the current month (September). Will this not solve our issue?

@3nuc, potentially. I'd be very hyped if users could make extensions that open files using custom webviews in the main editing area. In theory, that could allow a typora-like extension to be made for those who prefer the edit and semi-preview in the same view option. But I think they would like to stop it becoming too open so I'm not holding out hope yet.

I have checked in prototype that allows you to set the markdown preview as the default editor: #84520 We are looking for the community to drive the testing and polishing of this feature so that it can ship, so please follow up on #84520 if you wish to contribute

Please add the possibility to in-place switch between the markdown source and preview in one panel.

How to set off automatic preview of markdown files

Please give an option to NOT automatic preview of markdown files.

@gjsjohnmurray you made a dead loop for mention #91251 , it doesn't solve the problem
@xuoutput if you know how to disable auto preview please share the method.

I think there's a third option to consider as well: Sublime Text's markdown handling.  Sublime decorates your text (including the markdown syntax) with how it's stylized, which makes it very easily.

I am adamantly against Typora's experience because when writing markdown it's extremely important to not hide the markdown annotations.  As soon as you do that, it becomes difficult to edit and we may as well just be writing things in RTF which is exactly what MD is meant to take us away from.
A split view (RES-style) is more flexible than what Sublime affords but also doesn't hide the markdown.  Anything but WYSIWYG/Typora, please.

I also thought that VSC is to blame for the automatic preview, which drives me crazy. Then I turned off all extensions, but the preview still came.
But after restarting VSC, the preview didn't come back.
Finally I found - it is the "Markdown All in One" extension which enables the automatic markdown preview.

@aisbergde I don't use markdown all in one, but it still automatic preview markdown

@huahuayu Then I can only suggest to disable all extensions, to restart VSC and to check. This is how I found that an extension causes the issue. Maybe in your case it is another extension.

@huahuayu  in my case the package "Auto-Open Markdown Preview" was the problem.
After disable this package, my auto opening preview issue was solved.

I too had the problem that the preview as automatically opened, even with all extensions turned off. The issue in my case was that this configuration in settings.json:
    "workbench.editorAssociations": [
        {
            "viewType": "vscode.markdown.preview.editor",
            "filenamePattern": "*.md"
        }
    ],

Not sure when or how I added that, I reckon I must've accidentally selected to associate it somehow. Hope this helps someone!

Here's a gif that demonstrates how to do exactly what is suggested above
https://s6.gifyu.com/images/recordinga1cc2edb37532e9b.gif

@lramos15 If I understand correctly, the gif only showed the config for auto-activating markdown.showPreview, but no config for auto-activating markdown.showPreviewToSide?

@lramos15 If I understand correctly, the gif only showed the config for auto-activating markdown.showPreview, but no config for auto-activating markdown.showPreviewToSide?

@wenfangdu That is true, this issue has grown so much that I was trying to understand all the asks. I was going off Matt's comment here https://github.com/microsoft/vscode/issues/2766#issuecomment-375829223 and the person after said 3 & 4. I can re-open the feature request as what you said is the thing that is missing.

@lramos15 Please reopen it 🙏.

I too had the problem that the preview as automatically opened, even with all extensions turned off. The issue in my case was that this configuration in settings.json:
    "workbench.editorAssociations": [
        {
            "viewType": "vscode.markdown.preview.editor",
            "filenamePattern": "*.md"
        }
    ],

Not sure when or how I added that, I reckon I must've accidentally selected to associate it somehow. Hope this helps someone!

This solution is very close to being perfect however it breaks the diff view. Instead of showing a rich preview diff or a source diff it just shows a split preview with no markings for the changes.

When I open a markdown file, I really want to open the preview instead of the source

Same as IntelliJ 💯 🙏

Related on Stack Overflow: How can I automatically open Tex/PDF/Markdown previews side-by-side with the markup when opening the source file in VS Code?

Any news on this? Automatic side by side preview would be nice to have. There's this extension with a lot of downloads only for that https://marketplace.visualstudio.com/items?itemName=hnw.vscode-auto-open-markdown-preview


Added Server.php hooks for creating and updating CouchDB users

I needed to be able to create and update users on CouchDB in PHP7.  Respectfully submitted.

Just a quick ping to check if you're OK to pick up the comments above? If not, no worries.

I have not yet written any tests... but at least the spacing and formatting issues are resolved.  BTW, the build passed phpcs the first time, but not --standard=PSR-2


Fix worker memory limit to entityset size comparison

There was a bug in #208 causing featuretools to treat the current memory use of a dask worker as the workers' total usable memory when deciding if the worker had enough memory to store an EntitySet.

Codecov Report

Merging #214 into master will decrease coverage by 0.02%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #214      +/-   ##
==========================================
- Coverage   93.48%   93.46%   -0.03%
==========================================
  Files          71       71
  Lines        7757     7784      +27
==========================================
+ Hits         7252     7275      +23
- Misses        505      509       +4

Impacted Files
Coverage Δ

featuretools/computational_backends/utils.py
94.9% <100%> (ø)
:arrow_up:

featuretools/tests/testing_utils/cluster.py
100% <100%> (ø)
:arrow_up:

...turetools/computational_backends/pandas_backend.py
91.29% <0%> (-0.44%)
:arrow_down:

...tests/computational_backend/test_pandas_backend.py
100% <0%> (ø)
:arrow_up:

Continue to review full report at Codecov.

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


Bandwidth Estimation - Congestion Control

Hi alls,
I want to compare the performance of Cubic and BBR related to bandwidth. When I run the experiment with BBR, bandwidth is logged in debug mode. However, it is not logged when I switch to Cubic.
I want to log bandwidth with rtt and srtt, so I put the equation like below in take_rtt_sample() of lsquic_send_ctl file:
bandwidth = ctl->sc_ci->cci_get_cwnd(CGP(ctl))) / lsquic_rtt_stats_get_srtt(&ctl->sc_conn_pub->rtt_stats);
Is this equation correct? I am not sure that I need to use cwnd/rtt or cwnd/srtt.
Thank you in advance!
Best regards,
Van

Look at the Cubic function lsquic_cubic_pacing_rate() where bandwidth is estimated.

Thank you very much!


Pre-commit and pre-push git hooks fail on OS X

git_hooks/chain_hook is used for pre-commit and pre-push hooks.
Unfortunately it uses realpath that's unavailable on OS X.
This StackOverflow question offers some alternatives:
http://stackoverflow.com/questions/3572030/bash-script-absolute-path-with-osx

@ikonst You're welcome to fix this. :)

This setup doesn't work with GitHub and cerbero so we'll need to come up with another solution. I'll create a new issue about enforcing code style and close this one.


Change flask.ext.session to flask_session in imports

From: http://flask.pocoo.org/docs/0.12/extensiondev/
As of Flask 0.11, most Flask extensions have transitioned to the new naming schema. The flask.ext.foo compatibility alias is still in Flask 0.11 but is now deprecated – you should use flask_foo.

https://github.com/fengsp/flask-session/pull/49

Fixed in #49


[TACHYON-1276] Make resource pools protected.

https://tachyon.atlassian.net/browse/TACHYON-1276

LGTM

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Tachyon-Pull-Request-Builder/6754/
Test PASSed.

LGTM


Web templates config 5.4.0

See https://trello.com/c/A8AjAxmj/122-fix-omerowebindextemplate-config-docs

Read doc changes and see if they make sense.
Try setting bin/omero config set omero.web.index_template ...  and see if it works (do the docs explain enough what this does)?
Try setting login_redirect (fixed in https://github.com/openmicroscopy/openmicroscopy/pull/5485) and again see if docs explain what this does clearly enough.
Try setting base_include_template from PR: https://github.com/openmicroscopy/openmicroscopy/pull/5463

Looks good. Tried all the steps mentioned in the docs, works fine. 👍


Missing bracket and YUICompressor

There's a missing bracket in README.md and also less provides an option to minimise css using yahoo compressor, so that option is added.

Sorry for the delay.. Looks great, thanks! Published on npm as v0.2.3 :)


Suggestions triggered when the editor in in composition phase

Issue Type: Bug
Microsoft wubi Chinese input situation, in the HTML page input div, Chinese options and code prompt at the same time!This is probably due to the built-in extension Emmet!Please update and improve!
VS Code version: Code 1.39.2 (6ab598523be7a800d7f3eb4d92d7ab9a66069390, 2019-10-15T15:35:18.241Z)
OS version: Windows_NT x64 10.0.18362
Extensions (18)

Extension
Author (truncated)
Version

markdown-toc
Ala
1.5.6

htmltagwrap
bra
0.0.7

vscode-eslint
dba
1.9.1

auto-rename-tag
for
0.1.0

beautify
Hoo
1.5.0

vscode-fileheader
mik
0.0.2

vscode-filesize
mkx
2.1.3

vscode-autoprefixer
mrm
2.2.0

vscode-language-pack-zh-hans
MS-
1.39.3

vetur
oct
0.22.4

vscode-css-peek
pra
3.0.2

format-html-in-php
rif
1.6.1

code-spell-checker
str
1.7.18

highlight-matching-tag
vin
0.9.5

vscode-icons
vsc
9.4.0

vscode-todo-highlight
way
1.0.4

vscode-import-cost
wix
2.12.0

html-css-class-completion
Zig
1.19.0

(8 theme extensions excluded)

Turns out to be a bug when users are using an IME which inserts keystrokes into the editor first and then replaces them with user selected characters. Emmet listens to content change and our suggestion API doesn't talk about the state of IME (which is correct).

Something that was reported for python: microsoft/python-language-server#1751
Depending on the input, completion may or may not show up after the string gets replaced.

The auto complete doesn't work for non-ascii code snippet prefix in markdown editor... (Similar to https://github.com/microsoft/python-language-server/issues/1751)

The suggestion of non-ascii snippet prefix can show up only when hit the keyboard shortcut:

My snippet for markdown editor:
	"t": {
		"prefix": "t",
		"body": "test",
		"description": "Ascii is OK."
	},
	"`": {
		"prefix": "·",
		"body": "`",
		"description": "Fix Chinese IME."
	}

My editor setting for markdown editor:
    "[markdown]": {
        "editor.quickSuggestions": {
            "other": true,
            "comments": true,
            "strings": true
        },
        "editor.tabCompletion": "on",
        "editor.snippetSuggestions": "top"
    }

@alexdima thanks for follow-up. 2nd issue happened for Python, but not for TS. I just reproduced it in Python, input 名 but 名字 didn't pop up:
https://user-images.githubusercontent.com/392497/139517794-384ef31e-3723-436c-9b02-2882e19b3362.mov

Thank you for the extra information. I could form a clear understanding of what was going on:

when using the Python language, and not having any Python extension installed, the only suggestions were word suggestions
in this particular document, there are only two words: 名字 and print
when typing the m of ming, the suggestions want to pop up, despite the fact that the editor is in composition.
the suggestions trigger, but there are no words that would match m, so the suggest widget doesn't show
finally, when input composition finished, the suggestions would not trigger again

It turns out that this got fixed via https://github.com/microsoft/vscode/commit/de2f16bde7b25bde35b88c63e18ee05cc1a6d827 , but it only got released to stable 1.62.0 on Nov 4th

Hi @alexdima thanks for informing. I just tested in 1.62.3 (version info below) but still had the same issue as before. Like before, it doesn't work for 名 in 名字, but does work for 需 in 需求.
Version: 1.62.3 (Universal)
Commit: ccbaa2d27e38e5afa3e5c21c1c7bef4657064247
Date: 2021-11-17T07:59:13.865Z
Electron: 13.5.2
Chrome: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Darwin arm64 21.1.0

Here are the steps I am trying:

create a python file with the contents:

for 名字 in range(1, 10):
    print()

change input language to Chinese / Pinyin - Traditional
type ming and 1.

without the Python extension:
https://user-images.githubusercontent.com/5047891/144322749-68a4fa21-1266-4af9-a1eb-18b464c5364b.mp4
with the Python extension:
https://user-images.githubusercontent.com/5047891/144323158-9f517929-c29f-4dcb-b9b1-986c8539485e.mp4
@jrieken It looks to me that the Python extension is returning 名字 as a suggestion, just like word suggestions do, but when composition ends the suggestion is not shown. I would have thought that https://github.com/microsoft/vscode/commit/de2f16bde7b25bde35b88c63e18ee05cc1a6d827 would cover this case/

NOTE: when trying the same with 需求 instead of 名字 and typing xu and 1, it works correctly which is very confusing for me. Maybe there are some hidden properties used in these suggestions and those don't agree? 🤷

https://user-images.githubusercontent.com/5047891/144323553-e4b98fe3-9fc7-4ffe-b3c7-6019143ac211.mp4

Indeed it's puzzling that some characters work but others don't. Here are some more that don't work: 不 （pinyin is bu）、好（hao）。
Another thing I notice, if auto-complete is triggered before typing, then the suggestion will show after typing:
https://user-images.githubusercontent.com/392497/144353113-786c5367-4e7c-4350-84d6-bc4c50a4d27b.mov

Need to debug but it might be that kick off "as you type" suggestions but that we don't recognize this as a word-end correctly

This is what happens:. When starting composition IntelliSense is triggered (the same bug as https://github.com/microsoft/vscode/issues/132939), this retrieves and filters completions. Now, ending composition triggers suggest again but since it is already active nothing happens. Also, we don't let 名字 reappear because our assumption is that more typing hides more completions (and not making some reappear again). This issue will also be fixed by the change for https://github.com/microsoft/vscode/issues/132939

I just tested in version below, and 名字 好 不 all work now. Thanks!
Version: 1.63.0 (Universal)
Commit: 7db1a2b88f7557e0a43fec75b6ba7e50b3e9f77e
Date: 2021-12-07T05:15:48.091Z (3 days ago)


Do not allow Modular PlusCal syntax in PlusCal specs

This removes Modular PlusCal bits from the PlusCal grammar. Unfortunately, composing pieces of the grammar in an "intuitive" way is not easy. The approach taken in this pull request is to transform every piece of grammar that needs to be changed to a ReferencedGrammar. Then, ModularPlusCalParser overwrites the underlying grammar definition with the changes specific to the additions to the language we introduced.
See the overwriteGrammars method for more information.
The result of these changes is that using yield, special variables ($variable) or ref in PlusCal specs results in a parse error, as it should.

Update: now we are able to successfully parse the distributed queue MPCal spec that lives in examples/mpcal/dqueue.tla.


kvstore/etcd: fix etcd rate limit (QPS) not working

kvstore/etcd sets a default QPS=20 for rate limiting, but this value is
accidently overriden by 0 (rateLimitOpt.value="" -> Atoi=0, and the error
is ignored), which eventually performs no rate limiting at all
(0 means Inf in time/rate package).
This patch fixes the problem, and also dumps the etcd cilent configuration
to log, which will faciliate trouble-shooting, as shown below:
level=info msg="Creating etcd client" ConfigPath=/var/lib/etcd-config/etcd.config KeepAliveHeartbeat=15s KeepAliveTimeout=25s RateLimit=30 subsys=kvstore
level=info msg="Creating etcd client" ConfigPath=/var/lib/cilium/clustermesh/cluster-1 KeepAliveHeartbeat=15s KeepAliveTimeout=25s RateLimit=20 subsys=kvstore

Example configuration:

kvstore='etcd'
kvstore-opt='{"etcd.config": "/var/lib/etcd-config/etcd.config", "etcd.qps": "30"}'

Signed-off-by: ArthurChiao<EMAIL_ADDRESS>

test-me-please

hit https://github.com/cilium/cilium/issues/15620, merging


I can't install power toys from Microsoft Store

Microsoft PowerToys version
0.68.0
Installation method
Microsoft Store
Running as admin
Yes
Area(s) with issue?
General
Steps to reproduce
Press install in  microsoft store.
It fails with 0x80070005 error
✔ Expected Behavior
It installs
❌ Actual Behavior

Other Software
Microsoft Windows [Version 10.0.22621.1105]

I can't even download appx with https://store.rg-adguard.net/

what does installing it via https://aka.ms/installpowertoys say?

they are the same installer

/needinfo

Installs from PowerToysSetup-0.68.1-x64.exe succesfully

I also have "User Account Control: Admin Approval Mode for the Built-in Administrator account" disabled in secpol.msc

This could be a store based bug which would require a feedback hub item vs github. If the installer worked here then it is how the store app is handling it with that setting enabled maybe. They are the same installer


problem runnint TTMediaBot on docker

hello,
i'm not so experient in docker, just following readme
i run:
docker build -t ttmediabot .
docker run --rm --name ttmb_1 -dv root/TTMediaBot2:/home/ttbot/data ttmediabot
the folder TTMediaBot2 has 0 files just copied my config.json.
the docker builds, but not runs. just apears some random leters and numbers, but not epaers to run, bot not enter in my server. what i am doing wrong? thanks!

i got the error, the error i have in docker is:
PermissionError: [Errno 13] Permission denied: '/home/ttbot/data/TTMediaBot.log'

Try to change owner of data directory to uid=1000 gid=1000
On 11/30/21, Nuno @.***> wrote:

i got the error, the error i have in docker is:
PermissionError: [Errno 13] Permission denied:
'/home/ttbot/data/TTMediaBot.log'
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/gumerov-amir/TTMediaBot/issues/49#issuecomment-982351062

--
with best regards Beqa Gozalishvili
Tell: +995593454005
Email: @.***
Web: https://gozaltech.org
Skype: beqabeqa473
Telegram: https://t.me/gozaltech
facebook: https://facebook.com/gozaltech
twitter: https://twitter.com/beqabeqa473
Instagram: https://instagram.com/beqa.gozalishvili

how i make it, i not undestand anything about docker, hjust using comands provided in readme.
and everytime i'm geting error config file is used anoter instance of bot even running in separate containers
for running in oter container i need to change for example ttmb_1 to ttmb_2?
sorry for all but i'm really terrible at docker

done, it solved my problem. now, the docker container opens, i see the teamtalk message, the sdk message. but the bot is not in my server
the log is:
WARNING [2021-11-30 09:02:34,573]: Connection failed in TeamTalkThread file: thread.py line 64 function run
ERROR [2021-11-30 09:02:34,573]: Connection error in TeamTalkThread file: thread.py line 80 function run

For first question: on a host machine try to do chown -R 1000:1000
For this second: are you trying to login with localhost?
if yes, then you should add --network host to runable command.
On 11/30/21, Nuno @.***> wrote:

done, it solved my problem. now, the docker container opens, i see the
teamtalk message, the sdk message. but the bot is not in my server
the log is:
WARNING [2021-11-30 09:02:34,573]: Connection failed in TeamTalkThread file:
thread.py line 64 function run
ERROR [2021-11-30 09:02:34,573]: Connection error in TeamTalkThread file:
thread.py line 80 function run
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/gumerov-amir/TTMediaBot/issues/49#issuecomment-982428072

--
with best regards Beqa Gozalishvili
Tell: +995593454005
Email: @.***
Web: https://gozaltech.org
Skype: beqabeqa473
Telegram: https://t.me/gozaltech
facebook: https://facebook.com/gozaltech
twitter: https://twitter.com/beqabeqa473
Instagram: https://instagram.com/beqa.gozalishvili

solved all, with net=host command. thanks!
how i can run  multiple containers using same configuration file? i have to create  each folders for  each instances i want to run? because i get config file is used to annoter instance.

it is not possible to run two instances with the same config file.
You should create config per instance.
On 11/30/21, Nuno @.***> wrote:

solved all, with net=host command. thanks!

how i can run  multiple containers using same configuration file? i have to
create  each folders for  each instances i want to run? because i get config
file is used to annoter instance.

--

You are receiving this because you commented.

Reply to this email directly or view it on GitHub:

https://github.com/gumerov-amir/TTMediaBot/issues/49#issuecomment-982570385

--
with best regards Beqa Gozalishvili
Tell: +995593454005
Email: @.***
Web: https://gozaltech.org
Skype: beqabeqa473
Telegram: https://t.me/gozaltech
facebook: https://facebook.com/gozaltech
twitter: https://twitter.com/beqabeqa473
Instagram: https://instagram.com/beqa.gozalishvili


State gets corrupted

The channelstate.Messages slice gets contaminated with nil entries after a while, need to hunt down the source.

I've had this yet to happen again after a couple occurrences on december, not sure what the culprit was but ill have to put in some safeguards to stop it from happening again.


Skills can't share the same param

Subject of the issue
Different skills cannot share the same params because _ensure pops params and therefore the first skill to be loaded is the only one that gets it.
Having the same params in multiple skills makes a lot of sense sometimes. For example, I found this problem while setting the api url for ceramic. Both the ceramic_read and ceramic_write skills use it. The only solution for now is to use kwargs.get() (and miss the type checks) or duplicate the param with different names (which is messy).

Ive faced this issue on multiple occasions.

Hear hear i too have faced this issue

@angrybayblade did a one-line workaround for that.


TST: Port SeqView tests and ruff fixes

Updated tests use e.g. new_moltype.DNA.make_seq() replacing Sequence(...).

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

5 of 6 (83.33%)  changed or added relevant lines in 2 files are covered.
4 unchanged lines in 2 files lost coverage.
Overall coverage increased (+0.08%) to 90.196%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/cogent3/core/moltype.py
2
3
66.67%

Files with Coverage Reduction
New Missed Lines
%

src/cogent3/maths/scipy_optimize.py
1
85.57%

src/cogent3/core/sequence.py
3
94.48%

Totals

Change from base Build<PHONE_NUMBER>:
0.08%

Covered Lines:
31289

Relevant Lines:
34690

💛  - Coveralls


Suggestion: export kinds as named types

Gm,
I would like to suggest exporting kinds as named types.
This will allow use content from kinds as a typescript type and not only as a value.
Without this dev will need to use typeof kinds.[kind] to represent the type.

This suggestion includes isKind guard.
This will help dev validate event type and also cast it into a kind checked event.
This will encourage dev require in method signature already validated events from the expected kind.
This guard makes import from './pure.ts', not sure if this is a problem.

I feel sad when enum was removed, but with that I believe we have something better than the old enum.

I would like to dare to suggest bring back NostrEvent<T extends number = number> { kind: T }, it'll be compatible to NostrEvent with not generic type included because have default to T and will help use NostrEvent<Reaction | Zap> NostrEvent & { kind: ShortText | Reaction }


[Feature Request] Encoding Patterns multiple times.

AE2 Pattern Terminal can re-encode Patterns multiple times. Would be usable to have Pattern Encoder do this as well. Maybe placing encoded Pattern to the output slot would replace it's content. Or placing Pattern to the input slot to rewrite it manually.

You can wipe them with shift-clicking for now. I'll look into adding that.


Cannot import name 'BaseCache' from 'langchain.cache'

Checked other resources

[X] I added a very descriptive title to this issue.
[X] I searched the LangChain documentation with the integrated search.
[X] I used the GitHub search to find a similar question and didn't find it.
[X] I am sure that this is a bug in LangChain rather than my code.
[X] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).

Example Code
!pip install langchain einops accelerate transformers bitsandbytes scipy
!pip install --upgrade langchain==0.1.13  #I used the latest version
from langchain.cache import BaseCache
Error Message and Stack Trace (if applicable)
Cannot import name 'BaseCache' from 'langchain.cache'
Description
I am trying to build a chatbot, and I need basecache for pdf reader but I am havving a problem with importing basecache.
System Info
Google Colab
Langcahin verison 0.10.13

I am not so sure why do you want to use BaseCache but you can import the BaseCache as following:
from langchain_core.caches import BaseCache

Reason is "# Import the prompt wrapper...but for llama index
!pip install llama-index-llms-huggingface
from llama_index.core.prompts import SimpleInputPrompt
Create a system prompt
system_prompt = """[INST] <>
Talk English always.<>
"""
Throw together the query wrapper
query_wrapper_prompt = SimpleInputPrompt("{query_str} [/INST]")" When I run this code it says =>
ImportError: cannot import name 'BaseCache' from 'langchain.cache'

@keenborder786 Reason is I want to run the code:
"!pip install llama-index-llms-huggingface
from llama_index.core.prompts import SimpleInputPrompt
system_prompt = ....
query_wrapper_prompt = SimpleInputPrompt("{query_str} [/INST]")"
But it gives an error, I dont know why => ImportError: cannot import name 'BaseCache' from 'langchain.cache
Probably I should change the module, here I will give the module;
from llama_index.core.prompts import SimpleInputPrompt

@freestyle75 yes just import the BaseCache from the module that I have specified.

ImportError: cannot import name 'BaseCache' from 'langchain.cache' (/usr/local/lib/python3.10/dist-packages/langchain/cache.py)
I have followed the same steps above but I am facing issues with the
from langchain_core.caches import BaseCache #works fine
from llama_index.prompts.prompts import SimpleInputPrompt #fails -------error

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-23-b2a5b53c6316> in <cell line: 2>()
      1 from langchain_core.caches import BaseCache
----> 2 from llama_index.prompts.prompts import SimpleInputPrompt
      3
      4 system_prompt = """[INST] <>
      5 You are a helpful, respectful and honest Teacher and question paper maker. Always answer as

4 frames
/usr/local/lib/python3.10/dist-packages/llama_index/bridge/langchain.py in <module>
     53 # misc
     54 from langchain.sql_database import SQLDatabase
---> 55 from langchain.cache import GPTCache, BaseCache
     56 from langchain.docstore.document import Document
     57

ImportError: cannot import name 'BaseCache' from 'langchain.cache' (/usr/local/lib/python3.10/dist-packages/langchain/cache.py)

---------------------------------------------------------------------------
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the
"Open Examples" button below.
---------------------------------------------------------------------------


Upgrade to 10.2

needs new patch https://www.drupal.org/files/issues/2023-12-17/3143237-83.patch
needs to limit core by 10.2
new release, probably 2.x branch

Created https://github.com/skilld-labs/druxxy/releases/tag/v1.1.0


Add iqm fake aphrodite

Hi, this pull request adds IQMFakeAphrodite to provide noisy simulation of IQM's Aphrodite chip. I created the changes based off IQMFakeApollo. The values are currently placeholder values which are open to be changed by the maintainers. They are based off https://github.com/iqm-finland/qiskit-on-iqm/pull/66.
Should any documentation be added regarding this PR? Let me know and I will add it.
Additionally, I added 1 comment to CONTRIBUTING.rst to inform contributors that they can run the formatting through tox.
Note that the tests will fail due to duplicate code as the values are copied from IQM fake apollo

You'll have to fix the linting issues for tests to pass.
If you can rename the noise model name, before merging, that would be nice. But the other fake backends don't have a sensible name either, so it's not a big deal.

@Aerylia  It was my understanding that the CI test fails due to "duplicate code" between the noise model for aphrodite and apollo. This is because the values themselves are copy and pasted. I am not sure how to fix this issue other than use different values. The values are placeholders anyway if we follow the convention from https://github.com/iqm-finland/qiskit-on-iqm/pull/66


Unrestricted File Upload for API Thumbnails

Description:
Any file format can be uploaded as an API Thumbnail using the PUT apis/{apiId}/thumbnail resource of the Publisher REST API.
Steps to reproduce:

Create an API
Using the PUT apis/{apiId}/thumbnail resource of the Publisher REST API, upload any file (.html, .exe) as the API thumbnail

Solution
Allow only "jpg", "png", "jpeg" and "gif" file formats to be uploaded as API thumbnails

This issue has been fixed in master with https://github.com/wso2/carbon-apimgt/pull/10288

Closing the issue as it is fixed in master with wso2/carbon-apimgt#10288


[Bug]: Master typing -Timer Functionality Failure Bug

Give a brief about the bug ✍
The timer feature within the game fails to initiate upon starting the game as intended, resulting in the absence of time tracking during gameplay sessions.
What is the expected behavior? 🤔
Upon starting the game, the timer should begin counting elapsed time from the moment gameplay commences, providing a measure of time throughout the session.
Provide step by step information reproduce the bug 📄

[ ] Launch the game application.
[ ] Navigate to the main menu or game interface where the timer is expected to start.
[ ] Start the game by clicking on the designated start button or initiating gameplay.

Select program in which you are contributing
No response
Code of Conduct

[X] I follow CONTRIBUTING GUIDELINE of this project.

/assign

Hey @Tasnuva12 , You can't have another issue before completing the previous one 😀
you already have the following 1 open issues 👀 ! :
#3198

Hey @Tasnuva12 ! Thank you so much for your raising the issue💗
It’s all yours, you can come anytime again and make some contributions! 🚀
Alone, we can do little, but together we can do so much! 😇

Hey @Tasnuva12 !
Thank you for raising an issue 💗
You can self assign the issue by commenting /assign in comment 😀
Make sure you follow CODE OF CONDUCT and CONTRIBUTING GUIDELINES 🚀
Don’t Forget to ⭐ our GameZone🎮
Make sure you join our Discord🕹

Sorry about that !


Adding Night Mode

adding feature of Light Mode/Dark Mode for the program

Hey!
Can I work on this issue?

It has been done, but surely you can contribute to enhance it.
It will be a pleasure to go for it.
waiting for great modifications.


[BUG]: SQLite adding a primaryKey() constraint

What version of drizzle-orm are you using?
0.32.1
What version of drizzle-kit are you using?
0.23.1
Describe the Bug
Initial schema:
export const table = sqliteTable('table', {
  id: integer('id').unique().notNull(),
});

CREATE TABLE `table` (
  `id` integer NOT NULL
);
--> statement-breakpoint
CREATE UNIQUE INDEX `table_id_unique` ON `table` (`id`);

(Works) Dropping the unique constraint:
export const table = sqliteTable('table', {
  id: integer('id').notNull(),
});

DROP INDEX IF EXISTS `table_id_unique`;

(Does not work) Adding a primary key constraint:
export const table = sqliteTable('table', {
  id: integer('id').primaryKey().notNull(),
});

No schema changes, nothing to migrate 😴

Expected behavior
drizzle-kit generate should probably generate a comment similar to this:
/*
 SQLite does not support "Drop not null from column" out of the box, we do not generate automatic migration for that, so it has to be done manually
 Please refer to: https://www.techonthenet.com/sqlite/tables/alter_table.php
                  https://www.sqlite.org/lang_altertable.html
                  https://stackoverflow.com/questions/2083543/modify-a-columns-type-in-sqlite3

 Due to that we don't generate migration automatically and it has to be done manually
*/

unique() ➡ primaryKey() migration was needed because of the following issue's workaround:

https://github.com/drizzle-team/drizzle-orm/issues/2611

Environment & setup
No response

This should have been posted in the drizzle-kit-mirror repository.
Could someone transfer this?


don't include text from sanitised elements?

Hi, thanks for html_sanitizer, I've been using it for a while and it's been doing a great job.
I was wondering if there's a way to have html_sanitizer not include the text from elements that it strips out. For example, given:
<badtag>bad text</badtag>

good text

I would like to have html-sanitizer return
good text
, but at the moment I get back bad text
good text

I looked into doing this with an element_preprocessor, I was thinking I could simply set the text to an empty string if the tag wasn't in the list of allowed tags, but it seems that elements which aren't in the allow list don't make it into the preprocessors, e.g the preprocessor never fires for the  element because the sanitizer is stripping that tag before it gets to that stage.
Any suggestions would be appreciated! :)

Hi
Thanks!
I think that's not possible currently; the only place where a tag is dropped including its contents is here:
https://github.com/matthiask/html-sanitizer/blob/e0937eb9af3f4dbecf3ca35d37af0e7e6cd55c07/html_sanitizer/sanitizer.py#L309-L317
Maybe something like this would work:

Add badtag to the list of allowed elements
Remove its contents (text) in a preprocessor
The tag should be removed later because it doesn't contain anything

Or if that doesn't work you could try adding support for dropping tags incl. their contents to the sanitizer? I don't immediately see the value of this change to my use cases, but the addition shouldn't bring too much code with it and as long as the output is well tested this doesn't seem to burdensome.

Thanks for the response :)
I'm trying to be very strict about what I let through as I sanitise user-provided XML (not HTML), it would be useful to me to have this feature.
I'm not sure which way I'll go with this just yet, but seeing as you're amenable to having the functionality added, I just might go in that direction. You'll be the first to know if I do.
I'm not sure how you like to manage your issue tracker. If you like I'm happy for you to close this (and I can reopen a new issue, or just a pull request, if I do implement something), or perhaps you'd prefer to mark it a feature request?
Thanks for your time (and code!)

aah yes and your suggestion sounds sensible, but my problem now is that I don't actually just want to remove text from <badtag>, but from any tag that isn't in the allow list. Sorry I wasn't clear about that in my initial question.

Don't worry, you can leave it open if you want to -- I'll maybe close it in a few months or years if it hasn't been addressed by then, or not.

aah yes and your suggestion sounds sensible, but my problem now is that I don't actually just want to remove text from , but from any tag that isn't in the allow list. Sorry I wasn't clear about that in my initial question.

Ah yes, that's different. Maybe the element preprocessor could receive the sanitizer instance so that it can inspect the list of allowed tags. The pre- and postprocessors could be made to return the tag if it should be kept and return nothing if the element or tree has been dropped already? Making this backwards compatible would require some thinking.


How to add a class to a list item element

I need to add a class (i.e. 'myClass') to the list item at current 0.6 :
{{#ember-list height=100  items=model.items width=100 rowHeight=20}}
  Hello
{{/ember-list}}

and produce (notice the 'myClass' in the list-item):

 Hello

How can I achieve this? Thanks!

you must add an addition element within the row to bind to classes.

we may open up support to the inner row in the future, but at the time, due to an issue in ember we could enable this.

:+1:  Thanks Stef

likely something we need to address in the docs.

I'm sorry we didn't get back to this previously, but at this point this repo is essentially unmaintained.  Please use @html-next/vertical-collection or ember-collection for similar functionality.
Closing...


Repeat die throw patterns

Under the multiplication section of the dice notation, it says:

Multiplication can also mean repeating throws of similar setup (usually represented by x rather than multiplication symbol):

3 x (2d6+4) means "roll two 6-sided dice adding four to result, repeat the roll 3 times adding the results together."

It would be good to be able to handle this, and probably also with the ability for the repeat number on the other side: (2d6+4) x 3
Bear in mind that this is an actual 'x' letter, not a multiplication symbol.

Blocked by #14
We can't implement this until we have working parenthesis.

We have working parenthesis! This task is no longer blocked.

I'm thinking of dropping this idea as it's not gained any interest in the 5 years it's been open. It could also be quite difficult to implement -more effort than the gain from having it, if it's an unwanted feature.
It would likely have to be done as a modifier but, by the time modifiers get involved, math equations have already been handled. So adding more math equations works be slow.
Another option is for the grammar to detect it, and duplicate the text matched inside the parenthesis, and insert + between them, so it all gets parsed into the calculations.
But again that should be tricky to achieve.
I'll leave the ticket open for a little while to see if this gets any attention. If not, I'll close it off.

Closing due to lack of interest.


Bluetooth: controller: Use RL indices in adv ISR

To avoid manipulation of the irkmatch_ok and irkmatch_id, rely instead
on Resolving List indices for all checks in the advertising ISR.
Although we do incur in a small overhead to look it up initially, the
overall gains are worth the change.
Signed-off-by: Carles Cufi<EMAIL_ADDRESS>

@jhedberg @cvinayak fixed


cmd/compile: "internal compiler error: curfn mismatch" on darwin-amd64-race builder

2021-01-18T17:21:53-5a8fbb0/darwin-amd64-race
See previously #37407, #37406, but note that those were believed to have been fixed by upgrading the builders.
(CC @randall77 @josharian @golang/release)

That seems like memory corruption. Either runtime bugs or faulty memory or something. That sort of failure shouldn't be random.
Another failure on the same machine, which also looks like a pointer is nil when it shouldn't be: https://build.golang.org/log/9a0af1fedad51a17898be428620c03c863e258a0
And another similar failure on the non-race version of the machine (not sure if the same physical hardware or not): https://build.golang.org/log/5e5d23f0d609ad291d7be138ef1ff147a6c613b1

That seems like memory corruption. Either runtime bugs or faulty memory or something. That sort of failure shouldn't be random.
Another failure on the same machine, which also looks like a pointer is nil when it shouldn't be: https://build.golang.org/log/9a0af1fedad51a17898be428620c03c863e258a0
And another similar failure on the non-race version of the machine (not sure if the same physical hardware or not): https://build.golang.org/log/5e5d23f0d609ad291d7be138ef1ff147a6c613b1

That last one definitely looks like some sort of memory corruption. The error message is:
vet: /var/folders/kh/5zzynz152r94t18yzstnrwx80000gn/T/workdir-host-darwin-10_15/go/src/reflect/type.go:2611:57: tt.Elem().Field(0).hodsTypeOf undefined (type Value has no field or method hodsTypeOf)

but that corresponding line of source is:
                typ = (*structType)(unsafe.Pointer(tt.Elem().Field(0).UnsafeAddr()))

So the string that should be "UnsafeAddr" is actually "hodsTypeOf"? Notably, the same length, but wrong bytes. It looks like maybe the string data for "methods" and "TypeOf" are consecutive in memory, and the pointer for "UnsafeAddr" is off.

That last one definitely looks like some sort of memory corruption. The error message is:
vet: /var/folders/kh/5zzynz152r94t18yzstnrwx80000gn/T/workdir-host-darwin-10_15/go/src/reflect/type.go:2611:57: tt.Elem().Field(0).hodsTypeOf undefined (type Value has no field or method hodsTypeOf)

but that corresponding line of source is:
                typ = (*structType)(unsafe.Pointer(tt.Elem().Field(0).UnsafeAddr()))

So the string that should be "UnsafeAddr" is actually "hodsTypeOf"? Notably, the same length, but wrong bytes. It looks like maybe the string data for "methods" and "TypeOf" are consecutive in memory, and the pointer for "UnsafeAddr" is off.

Agreed, it looks like memory corruption. My question is, is this memory corruption due to a hardware issue (e.g. overheading RAM), due to a kernel or platform bug, or due to a bug somewhere in the Go toolchain or runtime?

Agreed, it looks like memory corruption. My question is, is this memory corruption due to a hardware issue (e.g. overheading RAM), due to a kernel or platform bug, or due to a bug somewhere in the Go toolchain or runtime?


[1.18.1] Crash with Enchanting Overhauled

TFL and EO both modifies the anvil which causes the game to crash on start. A workaround is probably config to disable the cheap renaming
Caused by: org.spongepowered.asm.mixin.injection.throwables.InvalidInjectionException: @At("INVOKE") on net/minecraft/world/inventory/AnvilMenu::taxfreelevels$makeRenamingCheap with priority 1000 cannot inject into net/minecraft/world/inventory/AnvilMenu::m_6640_()V merged by johnsmith.enchantingoverhauled.mixin.anvil.MixinAnvilMenu with priority 1000 [PREINJECT Applicator Phase -> taxfreelevels-common.mixins.json:CheapAnvilRenameMixin -> Prepare Injections ->  -> handler$zza000$taxfreelevels$makeRenamingCheap(Lorg/spongepowered/asm/mixin/injection/callback/CallbackInfo;Lnet/minecraft/world/item/ItemStack;III)V -> Prepare]

taxfreelevels (...) cannot inject into net/minecraft/world/inventory/AnvilMenu::m_6640_()V merged by johnsmith.enchantingoverhauled (...)

Hm... I think this means Enchanting Overhauled overwrites the whole method, which is not great because this usually means the conflict is unfixable and since Enchanting Overhauled is All Rights Reserved I can't read their source or PR any solution either.
So I had a look at the gameplay of Enchanting Overhauled.
It seems like the anvil doesn't use any XP or levels (and you can't combine enchanted items anymore?), so the anvil changes from Tax Free Levels actually don't actually matter at all.
The good news is that disabling Tax Free Levels' CheapAnvilRenameMixin and FlattenAnvilCostMixin (which also conflicts) does leave the enchanting table fully functional!
Problem solved, right?
Well, the thing is that I have to conditionally disable those 2 mixins when Enchanting Overhauled is installed - which on Fabric is absolutely no issue at all, but I just tried the very same on Forge and at the point Mixins are loaded, Forge doesn't even have the mod list ready, so I can't tell whether to disable the mixins or not.
Of course I could add a config file for this, but it'd be much better if it was automatic and it's already possible to disable mixins manually by removing them from the taxfreelevels-common.mixins.json and taxfreelevels-forge.mixins.json files inside the mod jar.
Maybe there's a way around this, for now I just created a version of Tax Free Levels without the Anvil changes, which is fully compatible with Enchanting Overhauled.
I'll leave this issue open for now, until I find a better solution.

Hi there! I'm the dev of Enchanting Overhauled. I haven't come around creating a github repo, I'll do that after my exams. Until then here is a pastebin to the MixinAnvilMenu.
I'll also try to come up with a better solution for my anvil changes, but so far I wouldn't know how to do my changes. As you have noticed, right now Enchanting Overhauled is pretty much incompatible with anvil changing mods by design. I had an earlier attempt where I tried to registry overwrride the anvil, but that didn't work as well as I had hoped. That is because the anvil menu needs a serverpacket which calls the vanilla anvil menu which confirms that the player has renamed an item, in short: my overwritten anvil can't rename items. So until I figure that out the best I could do is an anvil without renaming capabilities.

@JohnSmith474
So I did a comparison of your onTake method with the original and (after renaming variable names to match) it looks like this:

(Original method on the right)
So there's actually only 3 small changes:

the removal of the giveExperienceLevels() call
the removal of cost.set(0)
the fixed 0.12F break chance is replaced by a config value

Those can easily be done without overwriting the whole method.
The 0.12F constant can be changed with a @ModifyConstant like this:
@ModifyConstant(method = "onTake", constant = @Constant(floatValue = 0.12F))
private float replaceBreakChance(float value) {
  return (float) ModConfig.ANVIL_BREAK_CHANCE.get();
}

The removal of giveExperienceLevels() makes repairing cost nothing and cost.set(0) seems to have no further effect (since the cost is not being used anymore).
The same effect should be achievable by setting the cost to 0 before giveExperienceLevels() is reached.
The simplest way to do that would probably just set it to 0 at the very beginning of the method like this:
@Inject(method = "onTake", at = @At("HEAD"))
protected void noRepairCost(Player player, ItemStack itemStack) {
  cost.set(0);
}

(It's probably even better to set the cost to 0 somwhere at the end of the createResult - or never set the cost to anything non-zero in the first place - so this inject might not even be needed at all.)
That'd solve the Mixin conflict with the onTake method and the code is a lot simpler too.
Note I haven't tested if those two injectors work, I just quickly wrote them down.

There might be a way to do something similar with createResult.
On first glance it looks like there's a ton of changes and maybe it's not actually feasible to separate the changes and an @Overwrite is the "right" decision afterall - but maybe it's not as hard as it looks.
Can you explain what all the changes compared to vanilla are?
Stuff like "no anvil cost", "no combining of enchanted items" can probably be achieved with some surgical precision.
Btw, if you wanna know more about Mixins, I'd suggest you check out the small and quick Fabric tutorial for it (it's not Fabric specific) and of course read the official documentation.
It can take quite some time to learn how to achieve what you wanna do with Mixin but it's oh so worth it.

Fixed in https://github.com/Fourmisain/TaxFreeLevels/commit/9662b454bf0d3a079df731f10941fa70c773cbc7, the mod now disables the conflicting mixins when it sees Enchanting Overhauled is installed.
New version is up on CurseForge.

@Fourmisain
Apoligies for my very very late response. I had some issues with my email account and couldn't log into github for a while. I just saw your take on my anvil mixin classes and I thank you for the time and effort you put into compiling your findings.
At the time I wrote those classes it was my first time using mixins and I had no experience whatsoever, so I'll definetely take look at the tutorial you provided and try to find a way to make the changes I need to make without screwing every other mod over.
The changes I intend to make to the anvil is to remove all of its ties to enchanting, so no enchanted books can be applied using the anvil and to make it so the player can't create items with more than 3 enchantments on them.
I friend of mine made a similar mod with forge anvil events and I tried to implement his approach but eventually chose mixin overwrites because forge anvil events could not remove xp costs in any way.
So I'm thinking now with your approach to remove xp cost it might be possible after all.
Again thank you for pointing me in the right direction.


#60 Add nodejs14.x support into README.

The plugin already support it

Hey @alonefox. Thanks for the PR. I already had a fix that I hadn't pushed to Github. It's been pushed now.


re2 patch for wasm build

This patch enables us to build wasm successfully without building pthread with emscripten.
This patch had already merged and it will be released in the next month. https://github.com/google/re2/pull/263
If next version of it is released, this won't be required anymore and we must update SHA.

Instead of duplicating the patch, can we just point the http_archive rule at https://github.com/google/re2/archive/2b25567a8ee3b6e97c3cd05d616f296756c52759.zip?

@akonradi Just to have commit hash directly with the path of tar.gz seems fine. thanks. I will fix it.

Can you add a # TODO with a reference to google/re2#263 to explain why we're pinning to a hash instead of a release?


Compilation Issue - Spark 2.3.0 and Hadoop - 2.7.3

[success] Total time: 0 s, completed Aug 10, 2020 2:16:54 PM
[info] Updating {file:/home/drelephant/dr-elephant/}root...
[info] Resolving org.apache.spark#spark-core_2.10;2.3.0 ...

error] SERVER ERROR: Bad Gateway url=http://repo.typesafe.com/typesafe/releases/org/apache/spark/spark-core_2.10/2.3.0/spark-core_2.10-2.3.0.pom
[warn]  module not found: org.apache.spark#spark-core_2.10;2.3.0
[warn] ==== local: tried
[warn]   /home/hdfs/.ivy2/local/org.apache.spark/spark-core_2.10/2.3.0/ivys/ivy.xml
[warn] ==== activator-launcher-local: tried
[warn]   /home/hdfs/drelephant/activator-dist-1.3.12/repository/org.apache.spark/spark-core_2.10/2.3.0/ivys/ivy.xml
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/org/apache/spark/spark-core_2.10/2.3.0/spark-core_2.10-2.3.0.pom
[warn] ==== typesafe-releases: tried
[warn]   https://repo.typesafe.com/typesafe/releases/org/apache/spark/spark-core_2.10/2.3.0/spark-core_2.10-2.3.0.pom
[warn] ==== typesafe-ivy-releasez: tried
[warn]   https://repo.typesafe.com/typesafe/ivy-releases/org.apache.spark/spark-core_2.10/2.3.0/ivys/ivy.xml
[warn] ==== Typesafe Releases Repository: tried
[warn]   http://repo.typesafe.com/typesafe/releases/org/apache/spark/spark-core_2.10/2.3.0/spark-core_2.10-2.3.0.pom
[info] Resolving org.apache#apache;7 ...
[error] SERVER ERROR: Bad Gateway url=http://repo.typesafe.com/typesafe/releases/org/apache/apache/7/apache-7.jar
[error] SERVER ERROR: Bad Gateway url=http://repo.typesafe.com/typesafe/releases/org/apache/commons/commons-parent/17/commons-parent-17.jar
[info] Resolving org.eclipse.jetty#jetty-parent;14 ...
[error] SERVER ERROR: Bad Gateway url=http://repo.typesafe.com/typesafe/releases/org/eclipse/jetty/jetty-parent/14/jetty-parent-14.jar
[error] SERVER ERROR: Bad Gateway url=http://repo.typesafe.com/typesafe/releases/org/mortbay/jetty/jetty-parent/10/jetty-parent-10.jar
[error] SERVER ERROR: Bad Gateway url=http://repo.typesafe.com/typesafe/releases/org/mortbay/jetty/project/6.1.26/project-6.1.26.jar
[info] Resolving net.java#jvnet-parent;1 ...
[error] SERVER ERROR: Bad Gateway url=http://repo.typesafe.com/typesafe/releases/com/sun/jersey/jersey-project/1.9/jersey-project-1.9.jar
[info] Resolving org.slf4j#slf4j-parent;1.7.10 ...
[error] SERVER ERROR: Bad Gateway url=http://repo.typesafe.com/typesafe/releases/org/slf4j/slf4j-parent/1.7.10/slf4j-parent-1.7.10.jar
[info] Resolving com.google#google;5 ...
[error] SERVER ERROR: Bad Gateway url=http://repo.typesafe.com/typesafe/releases/com/google/google/5/google-5.jar
[error] SERVER ERROR: Bad Gateway url=http://repo.typesafe.com/typesafe/releases/com/google/inject/guice-parent/3.0/guice-parent-3.0.jar
[error] SERVER ERROR: Bad Gateway url=http://repo.typesafe.com/typesafe/releases/com/google/inject/extensions/extensions-parent/3.0/extensions-parent-3.0.jar
[info] Resolving org.sonatype.forge#forge-parent;6 ...
[error] SERVER ERROR: Bad Gateway url=http://repo.typesafe.com/typesafe/releases/org/sonatype/forge/forge-parent/6/forge-parent-6.jar
[info] Resolving asm#asm-parent;3.1 ...
[error] SERVER ERROR: Bad Gateway url=http://repo.typesafe.com/typesafe/releases/asm/asm-parent/3.1/asm-parent-3.1.jar
[info] Resolving com.sun.jersey#jersey-project;1.9 ...
[error] SERVER ERROR: Bad Gateway url=http://repo.typesafe.com/typesafe/releases/com/sun/jersey/contribs/jersey-contribs/1.9/jersey-contribs-1.9.jar
[info] Resolving org.apache.hadoop#hadoop-yarn;2.7.3 ...
[error] SERVER ERROR: Bad Gateway

make sure that you got full internet access to typesafe repo address.
make sure you have java jdk install and configured correctly.
make sure you got scala installed and configured correctly.
Your log clearly says that you have bad network connection to repo server. So try resolve that first.

Hi @userguy , the dependecy is wrong as Spark-Core_2.3 is not compatible with Scala 2.10.
Kindly try this branch: https://github.com/ShubhamGupta29/dr-elephant/tree/feature_spark2.3, I will merge this branch soon into master. This would work for you, just don't change any version as the default version for this branch is 2.3.4. I am closing this ticket, feel free to re-open if there is some issue.


GoMobile official version

GO2 is coming soon, and sincerely hope that GoMobile can release an official version. This can give developers more confidence. And with the powerful of GO, GoMobile has unlimited potential.

What do you mean by an "official version"? Its master branch seems to work just fine.

@mvdan I think it refers to more publicity and details as a web page. But I am intrigued and expect more information.

@mvdan @AndrusGerman https://github.com/golang/mobile . As readme said

The Go Mobile project is experimental. Use this at your own risk. While we are working hard to improve it, neither Google nor the Go team can provide end-user support.

We're currently evaluating Go Mobile vs Kotlin/Multiplatform, and we're coming up short on the support-side of Go Mobile. There's scant information on Go Mobile plans moving forward, and whether or not it has the backing of the full Go team. We're worried it's a side-project and something that can be deprecated pretty quietly.
I'd love more info on future plans, and whether or not it will become a core part of the Go language.

At the moment it's unfortunately the case that support for Go on Mobile is best effort for the core Go team.  It's being supported quite effectively by a range of people, but it's difficult to make any guarantees that that will continue.  It's not that we don't want to support Go on Mobile, it's that we don't have the people and resources to focus on it.

@ianlancetaylor thank you for that, it was honest and clear and I appreciate it. We've actually been able to get a POC up and running with Go Mobile pretty quickly and easily, which is one reason I'd love to see a strong commitment to it in the future.
For now, I'll watch this space. 🙇

@ianlancetaylor Anyway, thank you very much for your team's efforts. I sincerely hope go on mobile has a stable development

Looks like this is resolved.


Custom 'data-mfp'

Is there a way to use a custom data-mfp for ajax type?
For example, Magnific Popup documentation shows this:
Show inline popup

But I am calling Magnific Popup this way:
$('button').magnificPopup({
    type: 'ajax',
    items: { src:'page.php' }
}

This is calling "page.php", but I need "page.php?option=one" and I don't want to create a whole new function for every option.
So, I thought if I could have a custom mfp-data, for example:
<button data-mfp-option="one">Hey!</button>

And this would use the function like that for call the ajax page I requested:
$('button').magnificPopup({
    type: 'ajax',
    items: {
        src:'page.php?option=%data-mfp-option%'
    }
}

Is there anyway I could do this?
Thank you.

Thanks for this.
Is there any value in exposing all the mfp options via data attributes? It would be nice to be able to use data-mfp-type for example.
If I made a pull request for this, would you consider merging @dimsemenov - or do you think it does not really offer necessary value?


Benchmarks for Alternative Implementations, Inline, and InlineIfLambda

Proposed Changes
Benchmarks for Alternative Implementations, Inline, and InlineIfLambda
Types of changes
What types of changes does your code introduce to MyLib.1?
Put an x in the boxes that apply

[ ] Bugfix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist
Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

[ ] Build and tests pass locally
[ ] I have added tests that prove my fix is effective or that my feature works (if appropriate)
[ ] I have added necessary documentation (if appropriate)

Further comments
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

Benchmarks exploration (WIP)
Types of Implementations:

Normal

Reuse functions, for example, apply can be implemented in terms of bind

Alternative

Don't reuse functions, do the match implementation in the body

Variations for each:

inline

Which is known to give performance boosts

InlineIfLambda

new perfomance technique if F# 6.0

I've chosen a few functions, specifically eitherMap and map2 as they call into other functions typically and inlining all the match statements, using inline, and the new InlineIfLambda should give some interesting results.
And as I've benchmarked and done deep analysis, I've notices the composition operator >> creates a lot of code where as a lambda will produce a lot less.

Additional variations

No Composition Operator

Composition doesn't apply the Alt implementations so it leaves us with:

EitherMap

Result Normal EitherMap
Result Normal No Composition EitherMap
Result Normal Inline EitherMap
Result Normal Inline No Composition EitherMap
Result Normal InlineIfLambda EitherMap
Result Normal InlineIfLambda NoComposition EitherMap
Result Alt EitherMap
Result Alt Inline EitherMap
Result Alt InlineIfLambda EitherMap

Map2

Result Normal EitherMap
Result Normal No Composition EitherMap
Result Normal Inline EitherMap
Result Normal Inline No Composition EitherMap
Result Normal InlineIfLambda EitherMap
Result Normal InlineIfLambda No Composition EitherMap
Result Alt EitherMap
Result Alt Inline EitherMap
Result Alt InlineIfLambda EitherMap

I'm going to show the benchmarks first but then explore each of these in detail below by showing the F# Code, the decompiled code in C# and any interesting findings. I've included a SharpLab link for each so you can see the code for yourself.
 It doesn't try to do anything fancy, in fact it tries to re-use existing functions so the implmentations don't vary. However as we can see, this seems to be leading to some performance issues.
Sharplab link
Interesting Findings (rnem)
I do find the C# decomplilation of the Example_EitherMap intersting as you can see it has many calls and classes it has to make to get to the actual matter at hand. By contrast in later variations, this will be less convoluted.
Result Normal No Composition EitherMap
This is removing the >> (composition operator) calls.
Sharplab link
Interesting Findings (rnncem)
Nothing really different from the Normal implementation.
Result Normal Inline EitherMap
This is only adding the inline keyword to all functions associated with eitherMap.
Sharplab link
Interesting Findings (rniem)
Example_EitherMap looks a lot less complicated and the performance represents that.
Result Normal Inline No Composition EitherMap
This is adding the inline keyword to all functions associated with eitherMap and removing the >> (composition operator) calls.
Sharplab link
Interesting findings (rnincem)
While there's no noticible performance gains, there's quite a bit less C# code by comparison.
Result Normal InlineIfLambda EitherMap
This is adding the InlineIfLambda attribute to the function parameters.
Sharplab link
Interesting findings (rniilem)
No performance differences from inline and the C# code doesn't look much different either.
Result Normal InlineIfLambda No Composition EitherMap
This is adding the inline keyword to all functions associated with eitherMap, adding the InlineIfLambda attribute to the function parameters and removing the >> (composition operator) calls.
Sharplab link
Interesting findings (rniilncem)
Again no noticible perfomance differences, however the C# code is greatly reduced and very readable compared to any of the previous variations. It doesn't seem to be generating classes and other static methods.
Result Alt EitherMap
Instead of writing this in terms of the either function, this will do the match statement in the body of the function.
Sharplab link
Interesting findings (raem)
Again no noticible perfomance differences, but is making classes again.
Result Alt Inline EitherMap
Same with the previous variation except it also includes the inline keyword.
Sharplab link
Interesting findings (raiem)
Again no noticible perfomance differences, but with like the [Result Normal InlineIfLambda NoComposition EitherMap], it produces simple C# code.
Result Alt InlineIfLambda EitherMap
Same with the previous variation except it also includes the InlineIfLambda attribute.
Sharplab link
Interesting findings (raiilem)
Again no noticible perfomance differences, but with like the [Result Normal InlineIfLambda NoComposition EitherMap], it produces simple C# code.

Given the Alt implementation and InlineIfLambda seems to give the best performance benefits, it's time to change the implementation of these functions.

After reading the docs on InlineIfLambda

An opt-in warning (/warnon:3517, off by default) can be turned on to indicate places in your code where InlineIfLambda arguments are not bound to lambda expressions at call sites. In normal situations, this warning should not be enabled. However, in certain kinds of high-performance programming, it can be useful to ensure all code is inlined and flattened.

Turning this on for the benchmarks.fsproj gives quite a few warnings. Going to keep digging at how to use this properly.

let inline map ([<InlineIfLambda>] mapper : 'ok -> 'ok2) value  =
    match value with
    | Ok x -> Ok(mapper x)
    | Error e -> Error e

let inline bind ([<InlineIfLambda>] binder: 'ok -> Result<'ok2, 'err>) value  =
    match value with
    | Ok x -> binder x
    | Error e -> Error e

warning FS3517: The value 'mapper' was marked 'InlineIfLambda' but was not determined to have a lambda value. This warning is for informational purposes only
warning FS3517: The value 'binder' was marked 'InlineIfLambda' but was not determined to have a lambda value. This warning is for informational purposes only.

Does this mean these implementations can't take advantage of this attribute? cc @baronfel @dsyme @mrange

@TheAngryByrd TBH I haven't looked closely on this but my guess is that you get this error message when you pass a function value that is not a lambda. Something like this:
bind x.MyBind v

x.MyBind is a function that matches the signature but is not a lambda and thus won't be inlined.
AFAICT if you provide a lambda it shouldn't give you the warning but I haven't tried.
bind (fun x -> doSomeStuff x) v

The warning seems to be generated here:
https://github.com/dotnet/fsharp/blob/edd4c3b902bb28af15460813a823346fb4c17ad3/src/fsharp/Optimizer.fs#L2754

This goes to show how big of a deal InlineIfLambda is. We get serious performance improvements while still writing clean, idiomatic F# code. Now there's even less need to resort to "imperative nonsense" :-).
Really nice work here.


Express HTTPS starts but serves no content

Hi there,
I am using Express v 4.16.3
I am currently trying to set up HTTPS for my app so I added the following to my bin/www
/**
 * Add HTTPS server
 */

if (process.env.NODE_ENV === 'prod') {
    https
        .createServer(
            {
                key: fs.readFileSync('sslcerts/server.key', 'utf8'),
                cert: fs.readFileSync('sslcerts/server.pem', 'utf8')
            },
            app
        )
        .listen(443, function() {
            console.log('HTTPS listening on PORT 443');
        });
}

When I start my Express server, the app successfully starts (I can see the 'HTTPS listening on PORT 443' message in the console), but when I go to access the port I get ERR_EMPTY_RESPONSE in the browser. When I access the port for the HTTP version of my app, it is working fine and the content is being displayed.
So far I have tried:

Mapping to PORT 8443 in case there were permission-errors with mapping to 443. Still same behavior
Swapping out SSL certs with new self-signed ones in case there was something wrong with the ones that I was provided with. No change, same behavior.

Any help is much appreciated. I'm trying to see what else I can do to debug this, but since there is no error thrown by Express I don't really know what else to try.
I have an ongoing Stack Overflow question at:
https://stackoverflow.com/questions/55055101/cannot-connect-to-dockerized-express-https-server

Hi @dldereklee sorry you're having trouble. I tried your app by subbing in my own cert and key and got the standard express 404 response (I just used an empty app).
Can you change the app variable out with the following to check if the issue you're having is just a general Node.js issue? This would make the HTTPS server not invoke Express at all, which will help point at which forum can help with your issue.
// replace `app` above with this function:
function (req, res) { res.end('hello!') }

So I swapped it out. I also removed the NODE_ENV===prod check just in case that was causing any issues. I also changed ports to 8443 from 443.
Here is the bin/www now.
#!/usr/bin/env node

/**
 * Module dependencies.
 */

// var app = require('../app');
var app = function (req, res) { res.end('hello!') };
var debug = require('debug')('robotapp:server');
var http = require('http');
var fs = require('fs');
var https = require('https');

/**
 * Get port from environment and store in Express.
 */

var port = normalizePort(process.env.PORT || '8000');
// app.set('port', port);
console.log('Listening on localhost:', port);

/**
 * Create HTTP server.
 */

var server = http.createServer(app);

/**
 * Listen on provided port, on all network interfaces.
 */

server.listen(port);
server.on('error', onError);
server.on('listening', onListening);

/**
 * Add HTTPS server if production
 */

    https
        .createServer(
            {
                key: fs.readFileSync('sslcerts/server.key', 'utf8'),
                cert: fs.readFileSync('sslcerts/server.pem', 'utf8')
            },
            app
        )
        .listen(8443, function() {
            console.log('HTTPS listening on PORT 8443');
        });

/**
 * Normalize a port into a number, string, or false.
 */

function normalizePort(val) {
	var port = parseInt(val, 10);

	if (isNaN(port)) {
		// named pipe
		return val;
	}

	if (port >= 0) {
		// port number
		return port;
	}

	return false;
}

/**
 * Event listener for HTTP server "error" event.
 */

function onError(error) {
	if (error.syscall !== 'listen') {
		throw error;
	}

	var bind = typeof port === 'string' ? 'Pipe ' + port : 'Port ' + port;

	// handle specific listen errors with friendly messages
	switch (error.code) {
		case 'EACCES':
			console.error(bind + ' requires elevated privileges');
			process.exit(1);
			break;
		case 'EADDRINUSE':
			console.error(bind + ' is already in use');
			process.exit(1);
			break;
		default:
			throw error;
	}
}

/**
 * Event listener for HTTP server "listening" event.
 */

function onListening() {
	var addr = server.address();
	var bind = typeof addr === 'string' ? 'pipe ' + addr : 'port ' + addr.port;
	debug('Listening on ' + bind);
}

When I start the app, I see the "HTTPS listening on PORT 8443" and the "Listening on localhost: 8000" messages as I did before. When I navigate to PORT 8000 in the browser I see the hello! message. When I navigate to 8443, I still get no data.

Hi @dldereklee thanks for getting back! It would seem that there may be something wrong with Node.js in general or something higher, if you're still having the same issue now that Express.js is not involved at all.  You may want to open an issue with the above in the Node.js issue tracker, as there are folks there who have more expertise with the Node.js internals who may be able to determine what is going on.
FWIW running that on my own machine does produce hello! on both port 8000 and port 8443, so not sure why it is not working in your setup.

@dougwilson I opened an issue with their tracker as well at https://github.com/nodejs/help/issues/1815
Thanks for the help with troubleshooting!

@dldereklee have you tried https://localhost:8443?

@r0mflip At first when I saw your comment, I was like "of course I tried that"... but then I realized that I've actually been typing http:// instead of https:// all along...
When I type https:// the server works as expected...
Thanks @r0mflip and @dougwilson for taking the time to help me with this issue

Oh, interesting! Glad that was all @dldereklee . Sorry for the run-around. It actually never occurred to me to do that, at the very least to see what error it would have given to realize ERR_EMPTY_RESPONSE would have occurred from that.

@dldereklee Glad to help
@dougwilson common thing to forget, there's no upgrade to https right

Hi everyone, I need some help because I'm very new doing all of this.
Currently, I have myapp running perfectly on http://localhost/myapp
Now, I would like to have it running on https://localhost/myapp
I have correctly installed the certificates and the https://localhost is on displaying a message: "Hello, HTTPS World!"
Now, how can I run myapp on https://localhost/myapp ??
myapp is a directory located in C:\Apache24\htdocs\myapp
OS: Win 10
Any help or hint will be much appreciated.


Website: Logo still says AdminBro instead of AdminJS

Describe the bug
This is very confusing especially since the old adminbro website is still up.

A new landing page is still being developed, the logo will be updated once we release it.

Landing page is now updated


[Dialog] width prop

Without this, there is no way to correctly change the width of the dialog to something else.
@oliviertassinari Please review

@subjectix :+1:

Thanks


implement _attemptRest in janus_client

I have a Janus Server only accessable with https

How can this be implemented?

It should work with both https and http see example and change serverurl value to your server's websocket url closing this since its not an issue

hi thanks for the quick response (2 min :+1: )

I can see that _attemptWebSocket is implemented, but not _attemptRest i think i can just do a POST call to  /janus over http(s) and body { "janus": "create", "transaction": "any random hash" }

Sure! you are more than welcome to implement the rest functionality, once implemented open pr i will review and merge it

I personally feel working with websocket is more efficient so i implemented just the websocket part first


Check why webhook handler is getting congested

It works for now but it slows down. Not sure if that's becuase of the assigned memory in the docker container is low. Will need to check.

In general:

Works fine for web socket pub/sub
Falls over for very frequent polling (because it retrieves all sets of hooks for a wallet on every request)

What do we want to do

Is redid the right choice

If not:

Use Postgres?
Use keyDB?

IF yes:

How to prevent congestion?:

Timestamp feature (implemented on exp/redis-websocket)
Remove redid altogether (only bridge web hooks)

This removes the storage of old web hooks)
??? How to handle client wanting to retrieve old data???
Other platforms also don’t allow this

Open questions

Authentication in general

Is this only for Yoma private net in deploy?

If so, no auth required
If not, auth required

How to expose pubs/websocket in deploy

This is from both a pure infra/setup POV and
From security POV (prev point)

Maybe should be "lazy" and do as little as possible in terms of storage/data wrangling and leave being 'good" to the subscriber. However, even in this case should disallow behaviour that makes it slow.


I need a gem for leaving a review and star rating

I need a gem for leaving a review and star rating, do these exist

@Temiautomatic this is the bundler issue tracker, which is for reporting bugs and requesting features in bundler. You might want to ask this sort of question  on Twitter or stack overflow?


Add async methods to CosmosSerializer

Is your feature request related to a problem? Please describe.
Currently CosmosSerializer only has synchronous methods.
In order to create a custom serializer that uses the new JsonSerializer in .NET Core 3, async methods should be added to CosmosSerializer. The default implementation can just call the synchronous methods to support backwards compatibility.
Describe the solution you'd like
//------------------------------------------------------------
// Copyright (c) Microsoft Corporation.  All rights reserved.
//------------------------------------------------------------

namespace Microsoft.Azure.Cosmos
{
    using System;
    using System.IO;
    using System.Threading;
    using System.Threading.Tasks;

    /// <summary>
    /// This is an interface to allow a custom serializer to be used by the CosmosClient
    /// </summary>
    public abstract class CosmosSerializer
    {
        /// <summary>
        /// Convert a Stream of JSON to an object.
        /// The caller will ensure the stream is disposed.
        /// This will prevent memory leaks if an exception is hit.
        /// </summary>
        /// <typeparam name="T">Any typed passed to <see cref="Container"/></typeparam>
        /// <param name="stream">The Stream response containing JSON from Cosmos</param>
        /// <returns>The object deserialized from the stream.</returns>
        public abstract T FromStream<T>(Stream stream);

        /// <summary>
        /// Convert the object to a Stream.
        /// The caller will take ownership of the stream and ensure it is correctly disposed of.
        /// Stream.CanRead must be true https://docs.microsoft.com/dotnet/api/system.io.stream.canread?view=netcore-2.0
        /// </summary>
        /// <param name="input">Any typed passed to <see cref="Container"/></param>
        /// <returns>A readable Stream containing JSON of the serialized object</returns>
        public abstract Stream ToStream<T>(T input);

        /// <summary>
        /// Convert a Stream of JSON to an object.
        /// The caller will ensure the stream is disposed.
        /// This will prevent memory leaks if an exception is hit.
        /// </summary>
        /// <typeparam name="T">Any typed passed to <see cref="Container"/></typeparam>
        /// <param name="stream">The Stream response containing JSON from Cosmos</param>
        /// <param name="cancellationToken"></param>
        /// <returns>The object deserialized from the stream.</returns>
        public virtual ValueTask<T> FromStreamAsync<T>(Stream stream, CancellationToken cancellationToken = default)
        {
            try
            {
                return new ValueTask<T>(this.FromStream<T>(stream));
            }
            catch (Exception ex)
            {
                return new ValueTask<T>(Task.FromException<T>(ex));
            }
        }

        /// <summary>
        /// Convert the object to a Stream.
        /// The caller will take ownership of the stream and ensure it is correctly disposed of.
        /// Stream.CanRead must be true https://docs.microsoft.com/dotnet/api/system.io.stream.canread?view=netcore-2.0
        /// </summary>
        /// <param name="input">Any typed passed to <see cref="Container"/></param>
        /// <param name="cancellationToken"></param>
        /// <returns>A readable Stream containing JSON of the serialized object</returns>
        public virtual ValueTask<Stream> ToStreamAsync<T>(T input, CancellationToken cancellationToken = default)
        {
            try
            {
                return new ValueTask<Stream>(this.ToStream(input));
            }
            catch (Exception ex)
            {
                return new ValueTask<Stream>(Task.FromException<Stream>(ex));
            }
        }
    }
}

+1 to this. I've just updated an application to use the v3 Cosmos SDK, and then subsequently run into this while updating the branch of the app using ASP.NET Core 3.0 preview 8.
In the meantime, I came up with this implementation that uses the synchronous APIs for System.Text.Json.
using System.IO;
using System.Text.Json;
using Microsoft.Azure.Cosmos;

namespace MyApp
{
    public class SystemTextJsonCosmosSerializer : CosmosSerializer
    {
        private readonly JsonSerializerOptions _options;

        public SystemTextJsonCosmosSerializer(JsonSerializerOptions options)
        {
            _options = options;
        }

        /// <inheritdoc />
        public override T FromStream<T>(Stream stream)
        {
            // Have to dispose of the stream, otherwise the Cosmos SDK throws.
            // https://github.com/Azure/azure-cosmos-dotnet-v3/blob/0843cae3c252dd49aa8e392623d7eaaed7eb712b/Microsoft.Azure.Cosmos/src/Serializer/CosmosJsonSerializerWrapper.cs#L22
            // https://github.com/Azure/azure-cosmos-dotnet-v3/blob/0843cae3c252dd49aa8e392623d7eaaed7eb712b/Microsoft.Azure.Cosmos/src/Serializer/CosmosJsonDotNetSerializer.cs#L73
            using (stream)
            {
                // TODO Would be more efficient if CosmosSerializer supported async
                using var memory = new MemoryStream((int)stream.Length);
                stream.CopyTo(memory);

                byte[] utf8Json = memory.ToArray();

                return JsonSerializer.Deserialize<T>(utf8Json, _options);
            }
        }

        /// <inheritdoc />
        public override Stream ToStream<T>(T input)
        {
            byte[] utf8Json = JsonSerializer.SerializeToUtf8Bytes(input, _options);
            return new MemoryStream(utf8Json);
        }
    }
}

Practically ToStream is compute bound. Are there scenarios where async/task overload will be useful?
FromStream is interesting. Serializer which can work with partial stream's (non-buffered fully) can leverage/exploit the async part. One such case might be array or list, which can yield partial results.
CosmosClient currently invokes FromStream once the steam is materialized fully. And non-async contract might suffice.
@martincostello / @LeroyK please share the scenarios or data-sets which can leverage async contracts and Cosmos team is happy to explore them.

Closing the issue for now.
Please feel free to re-open with more context.

@kirankumarkolli The copy is used to do a simple synchronous copy of the bytes from the stream to an array to pass to the synchronous JsonSerializer deserialize method as a ReadOnlySpan<byte>. Stream is only accepted by the async methods.
The assumption here is that the streams hadn't been fully read by the caller, so would provide benefits from async usage. If the SDK consumes them all, then I guess the benefits would be minimal unless the SDK didn't eagerly consume the response stream before deserializing.

+1 to this. I've just updated an application to use the v3 Cosmos SDK, and then subsequently run into this while updating the branch of the app using ASP.NET Core 3.0 preview 8.
In the meantime, I came up with this implementation that uses the synchronous APIs for System.Text.Json.
using System.IO;
using System.Text.Json;
using Microsoft.Azure.Cosmos;

namespace MyApp
{
    public class SystemTextJsonCosmosSerializer : CosmosSerializer
    {
        private readonly JsonSerializerOptions _options;

        public SystemTextJsonCosmosSerializer(JsonSerializerOptions options)
        {
            _options = options;
        }

        /// <inheritdoc />
        public override T FromStream<T>(Stream stream)
        {
            // Have to dispose of the stream, otherwise the Cosmos SDK throws.
            // https://github.com/Azure/azure-cosmos-dotnet-v3/blob/0843cae3c252dd49aa8e392623d7eaaed7eb712b/Microsoft.Azure.Cosmos/src/Serializer/CosmosJsonSerializerWrapper.cs#L22
            // https://github.com/Azure/azure-cosmos-dotnet-v3/blob/0843cae3c252dd49aa8e392623d7eaaed7eb712b/Microsoft.Azure.Cosmos/src/Serializer/CosmosJsonDotNetSerializer.cs#L73
            using (stream)
            {
                // TODO Would be more efficient if CosmosSerializer supported async
                using var memory = new MemoryStream((int)stream.Length);
                stream.CopyTo(memory);

                byte[] utf8Json = memory.ToArray();

                return JsonSerializer.Deserialize<T>(utf8Json, _options);
            }
        }

        /// <inheritdoc />
        public override Stream ToStream<T>(T input)
        {
            byte[] utf8Json = JsonSerializer.SerializeToUtf8Bytes(input, _options);
            return new MemoryStream(utf8Json);
        }
    }
}

@martincostello when I use your implementation:
var client = new CosmosClientBuilder
		(accountEndpoint: "https://localhost:8081", "<key>")
		.WithCustomSerializer(new SystemTextJsonCosmosSerializer(new JsonSerializerOptions {}))
				.Build();

The spatial data type Point is not properly serialized.
	public Point Location { get; set; }

It should be serialized as with the Cosmos NET v3 SDK(Json,net) and v4 preview(System.Text.Json) as:
   "location": {
        "type": "Point",
        "coordinates": [
            8.000,
            47.000
        ]
    },

But instead it ends up like this:
   "location": {
        "Position": {
            "Coordinates": [
                8.0000,
                47.0000
            ],
            "Longitude": 8.0000,
            "Latitude": 47.0000,
            "Altitude": null
        },
        "Crs": {
            "Type": 0
        },
        "Type": 0,
        "BoundingBox": null,
        "AdditionalProperties": {}
    },

Do you have any idea why?

I guess that it has a custom serialiser somewhere, so System.Text.Json is just serialising the literal object layout. If that’s the case you’d have to create a custom serialiser for the Point type and register it with your JsonSerializerSettings instance.

Hi team, we use CosmosSerializer for our migration process. As part of our migration, we deserialize the JSON document from Cosmos as JObject and then update the JObject as per the latest schema of the Document. The advantage of this approach for us is that when using CosmosClient to read a document in our repository the transformation to the latest schema has already happened. Until now, this has worked well for us. However, now we have a requirement where we need to update the JObject from an external resource by doing a network call. If FromStream was async it would have made things much easier for us.
But, now we have a requirement where we need to get


#383 & #402, #451 fixes for error handling and graceful process exit

Addresses issues that various individuals have had with the process hanging after an error and failing to continue synchronizing after certain exceptions that should have been handled.
The first part of this fix changes the exception_wrapper to check the class hierarchy of exceptions for wrapping.
The second part deals with the status checking of threads during the connector.py process loop, and adds a thread.is_alive() check to those threads, so that if they exit without cleaning up they can be joined and the process can exit cleanly.

Thanks for the pull request! The tests are failing right now because of the iteritems thing, but once that's fixed (and one other minor style issue), I think this will be ready to merge.

Taken care of, sorry about that, not really familiar with python & 2.x-3.x version inconsistencies.. Thanks for reviewing!

@pdspicer Thanks for the patch!