Prepopulate misbehaving

Given the URL https://domain.com/publish/section-name/new/?prepopulate[451]=regexp%3A%20jrp, the field in question is populated with regexp: jrp.
Expected value is jrp.

I would ping @michael-e on this one...
But John, do you know where the %3A character comes from ?

I don't believe we do any handling to strip the filtering prefixes from data before handing it to a field currently, so this is the expected behaviour at the moment from me. It's a good idea though, I can't see any reason why the field would need to know filtering information when prepopulating.

I agree with @brendo. It's expected behaviour, but it could be improved.

Adding my two pence here, as directed by @nitriques.
I'm trying to create contextual admin links from the front-end to the back-end UI for logged-in authors. So far so good with basic section links and filtering. However, pre-populating SBLs doesn't appear to accept the field handle and there seems no easy way to know the field's ID e.g.
/symphony/publish/test/new/?prepopulate[11]=222 works as expected
/symphony/publish/test/new/?prepopulate[selector]=222 does not populate SBL
Incidentally, /symphony/publish/test/new/?prepopulate[11]=item-handle does not populate SBL
If pre-populating by field handle string turns out to be a big headache, please could each field's ID be passed to the XML.

Funny or not, mod_sec prevents me from using regexp: in the url. I think it would be wise to change this to something else.
@cylkee

If pre-populating by field handle string turns out to be a big headache

Yes it is. It could be enabled, but not a priority sadly. If you want to send a PR, I'll gladly help you test it.

please could each field's ID be passed to the XML.

That's doable too if you want to poke at it!


Promoting Config class

Initially I wanted to make createConfig() method similar to the one in express-zod-api library, but later I realised that they have to be different in this aspect. I'd like to reduce the confusion and encourage using of Config class, so that it would be clear that its instance has methods to use.

removing createConfig() — use new Config() instead,
allowing empty argument for Config::constructor,

Perhaps I can also make a shorthand for easy root-ns-only config


Comma ai 3 x - error - CAN error Check connections, Kia Forte 2023 LXS

Describe the bug
Same unit worked in crv 2020. Tried forte 2023, guess fw issue. Error - can error, check connections.
dongle id bbc520c51098bebc
Which car does this affect?
Kia Forte 2023 LXS
Provide a route where the issue occurs
https://useradmin.comma.ai/?onebox=google_116050050349953316707
openpilot version
sunny pilot c3
Additional info
No response

The trim for this car's model and model year does not have Smart Cruise Control from the factory. It will not receive official openpilot support at the moment. Custom forks such as sunnypilot supports steering only for this trim.


Values for the PC_EXIT_LATENCY enumeration differ between pages

The table listing the values for the NewD3ExitLatency parameter differs from the values presented in the linked page for PC_EXIT_LATENCY here.
I'm not sure which set is the correct one, but we can sync offline if needed.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 7d2575e8-1747-2b14-a7b4-0fa04321f6f7
Version Independent ID: 7e6f55e6-af4e-663e-5f62-e69aac1f2720
Content: IAdapterPowerManagement3::D3ExitLatencyChanged (portcls.h) - Windows drivers
Content Source: wdk-ddi-src/content/portcls/nf-portcls-iadapterpowermanagement3-d3exitlatencychanged.md
Product: windows-hardware
Technology: windows-devices
GitHub Login: @DOMARS
Microsoft Alias: domars

@darugeri - I will follow up in email. Now that I look at this, I don't follow if NewD3ExitLatency is sort of redefining with these new values, or if we need to somehow create a new enum for  D3ExitLatency to have these new values. The enum itself of course just has the values of 0,1 and 2.

@darugeri - Following up in email to see if we can get this figured out.   :)

@darugeri - Following up in email to see if we can get this figured out.   :)

@darugeri - Following up in email to see if we can move this forward.

@darugeri - Following up in email. I converted this git issue to an internal work item, so closing this issue. Happy to make whatever updates to the doc you would like,


Undefined Method error with ruby buildpack

While deploying to paas I get the following error as Garden attempts to use the ruby_buildpack v1.6.19 to compile Static:
sh: 1: Syntax error: EOF in backquote substitution
!     undefined method[]' for nil:NilClass`
./Gemfile:45:in ruby_requirement': undefined method []' for nil:NilClass (NoMethodError)
Logged with paas team

This is a bug in CF's ruby buildpack, it works fine with Heroku's.
For some reason, CF's buildpack isn't defining the ENV constant. Perhaps it's sandboxed somehow?

Example deployed on Heroku: https://shrouded-stream-94588.herokuapp.com/static/crests/org_crest_27px_x2-3eb6258ba699c8ae2c3cf370e8a4422f37bdae95ae084a99115841a8bf0543a7.png

I was aware of that @boffbowsh. I just need to keep track of it.

Ah, fair enough :)

Thanks

@djsd123 can we close this out?

Please reopen if this is still an issue 😄


Fixing issues #328 and #327

https://github.com/esvit/ng-table/issues/328
https://github.com/esvit/ng-table/issues/327

@yairy please describe a situation when it causes problems and what problems?


Automate Finalization of All markets for V2

Can we add the cost of finalizing a market into the market creation, so all markets can be finalized automatically, after a certain point in the process?

How much additional cost would this incur?

Is the idea that we would estimate the gas cost of finalizing the market and include that as a bond that is paid to whoever finalizes the market?
Not sure exactly what is proposed here if not.

Yeah or does that leave us with too much risk

It would be fine I think if we provided it as an optional bond that would just be awarded to whoever finalizes the market where the creator can specify the amount they wish to award them. Then market creators have freedom and flexibility for that option since just compensating the gas cost even (if we could accurately get it every time) may not be enough to incentivize someone to do the tx.

I was just thinking more of an automated thing.....so markets (ones that never trade) dont get stuck in that limbo state of not finalized

How would we automate it?Any state change on chain needs to occur as part of a tx so we either need to include the finalization as part of another transaction (Currently we do this for traded on markets when shares are claimed) or do pseudo-automation by paying someone to do the tx (This is how cryptokitties "automates" cat births for example)

Not really sure....I was thinking something along the lines of how orders can be given a time range to be cancelled.  Like I place an order on the book today, and it cancels in 2 weeks at 12 pm utc

That's also not really implementable though. You could have it take an expiration date after which point it could not be taken for example but to return the escrowed funds someone would have to actually make a tx which specifically does that.

Kind of thought that, but thought it was at least worth exploring the idea...k thanks I'll close


Fix colormap utils error suggestion code and add a test

Description

Type of change

[x] Bug-fix (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)
[ ] This change requires a documentation update

References

How has this been tested?

[ ] example: the test suite for my feature covers cases x, y, and z
[x] example: all tests pass with my change
[ ] example: I check if my changes works with both PySide and PyQt backends
as there are small differences between the two Qt bindings.

Final checklist:

[x] My PR is the minimum possible work for the desired functionality
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] I have added tests that prove my fix is effective or that my feature works
[ ] If I included new strings, I have used trans. to make them localizable.
For more information see our translations guide.

I prefer to use match instead string assertions, but I'm ok with both.

TIL :) that is pretty cool for the suggestion!


gobo is a copyrighted image

be careful

I think it should be fine since this is open source and no money is being made.


Fix install dependencies not having a prepare and not creating target directories

fixes #658

Coverage decreased (-0.04%) to 70.394% when pulling d2557162db6c3047994a0704ec3e7931e2884579 on arcivanov:issue_658 into e6b02c51e2dd3f9686ae5a9970e1e063acb08dab on pybuilder:master.

Coverage decreased (-0.04%) to 70.394% when pulling d2557162db6c3047994a0704ec3e7931e2884579 on arcivanov:issue_658 into e6b02c51e2dd3f9686ae5a9970e1e063acb08dab on pybuilder:master.


fix XSS

Hello,
There is some XSS vulnerabilitys in your project. I share this to patch payloads such as :
[a](Javascript:alert(1))
<iframe src="javascript:alert(document.cookie)"</iframe>
I simply block HTML code and disabled iframe. What's more, i used the code from there https://github.com/alromh87/editor.md/commit/f5cb82c39400294a75f4b5b9e997e4939cee7084.

但它在预览时有问题，比如# 1，预览窗口的显示样式都变了。


experiment with forming reblocking tuples

Should import have the following import in dask/array/__init__.py so that we add reblock to the dask.array namespace
from .reblock import reblock

It would also be good to have a method on the Array object itself similar to what you did for Bag a little while ago.

This example was encouraging.
In [1]: import dask.array as da

In [2]: from dask.array.reblock import reblock

In [3]: x = da.ones((50,), blockshape=(10,))

In [4]: r = reblock(x, ((5, 5, 8, 8, 8, 8, 8),))

In [5]: from dask.dot import dot_graph

In [6]: dot_graph(r.dask)
Writing graph to mydask.pdf

If you're willing to accept the full firehose of style feedback you could install pep8
pip install pep8

and then run it against your file
$ pep8 dask/array/reblock.py

Although this is kind of intense, pep8 is very picky.  I don't usually follow pep8 mechanically but it might be somewhat educational to try.
FWIW I also really like the tool conttest, which runs a command every time I save
 pip install conttest

$ conttest "pep8 dask/array/reblock.py"

Then I get rapid feedback as I make changes.  Just a thought.

Looks like there are issues when the new structure has more blocks than the old
In [1]: import dask.array as da

In [2]: x = da.ones((10, 10), blockshape=(5, 5))

In [3]: y = x.reblock(blockshape=(3, 3))

In [4]: y.compute()
KeyError: ('reblock-1', 3, 2)

In [5]: y.dask
Out[5]:
{('reblock-1', 0, 0): (<function dask.array.core.rec_concatenate>,
  [[(<function operator.getitem>,
     ('wrapped_1', 0, 0),
     (slice(0, 3, None), slice(0, 3, None)))]]),
 ('reblock-1', 0, 1): (<function dask.array.core.rec_concatenate>,
  [[(<function operator.getitem>,
     ('wrapped_1', 0, 0),
     (slice(0, 3, None), slice(3, 5, None))),
    (<function operator.getitem>,
     ('wrapped_1', 0, 1),
     (slice(0, 3, None), slice(0, 1, None)))]]),
 ('reblock-1', 0, 2): (<function dask.array.core.rec_concatenate>,
  [[(<function operator.getitem>,
     ('wrapped_1', 0, 1),
     (slice(0, 3, None), slice(1, 5, None)))]]),
 ('reblock-1', 0, 3): (<function dask.array.core.rec_concatenate>,
  [[(<function operator.getitem>,
     ('wrapped_1', 0, 0),
     (slice(3, 5, None), slice(0, 3, None)))],
   [(<function operator.getitem>,
     ('wrapped_1', 1, 0),
     (slice(0, 1, None), slice(0, 3, None)))]]),
 ('reblock-1', 1, 0): (<function dask.array.core.rec_concatenate>,
  [[(<function operator.getitem>,
     ('wrapped_1', 0, 0),
     (slice(3, 5, None), slice(3, 5, None))),
    (<function operator.getitem>,
     ('wrapped_1', 0, 1),
     (slice(3, 5, None), slice(0, 1, None)))],
   [(<function operator.getitem>,
     ('wrapped_1', 1, 0),
     (slice(0, 1, None), slice(3, 5, None))),
    (<function operator.getitem>,
     ('wrapped_1', 1, 1),
     (slice(0, 1, None), slice(0, 1, None)))]]),
 ('reblock-1', 1, 1): (<function dask.array.core.rec_concatenate>,
  [[(<function operator.getitem>,
     ('wrapped_1', 0, 1),
     (slice(3, 5, None), slice(1, 5, None)))],
   [(<function operator.getitem>,
     ('wrapped_1', 1, 1),
     (slice(0, 1, None), slice(1, 5, None)))]]),
 ('reblock-1', 1, 2): (<function dask.array.core.rec_concatenate>,
  [[(<function operator.getitem>,
     ('wrapped_1', 1, 0),
     (slice(1, 5, None), slice(0, 3, None)))]]),
 ('reblock-1', 1, 3): (<function dask.array.core.rec_concatenate>,
  [[(<function operator.getitem>,
     ('wrapped_1', 1, 0),
     (slice(1, 5, None), slice(3, 5, None))),
    (<function operator.getitem>,
     ('wrapped_1', 1, 1),
     (slice(1, 5, None), slice(0, 1, None)))]]),
 ('reblock-1', 2, 0): (<function dask.array.core.rec_concatenate>,
  [[(<function operator.getitem>,
     ('wrapped_1', 1, 1),
     (slice(1, 5, None), slice(1, 5, None)))]]),
 ('wrapped_1', 0, 0): (<function ones at 0x7fd25ca13b90>, (5, 5)),
 ('wrapped_1', 0, 1): (<function ones at 0x7fd25ca13b90>, (5, 5)),
 ('wrapped_1', 1, 0): (<function ones at 0x7fd25ca13b90>, (5, 5)),
 ('wrapped_1', 1, 1): (<function ones at 0x7fd25ca13b90>, (5, 5))}

I will check into this tonight/tomorrow.  I'm not sure in your example
above, what is the intended behavior when dividing an array of dimension 10
by 10 into 3 by 3 blocks.  I need to look at how the rest of dask handles
blockshapes that would leave some leftover grid cells.
On Tue, Mar 10, 2015 at 11:01 AM, Matthew Rocklin<EMAIL_ADDRESS>wrote:

Looks like there are issues when the new structure has more blocks than
the old
In [1]: import dask.array as da
In [2]: x = da.ones((10, 10), blockshape=(5, 5))
In [3]: y = x.reblock(blockshape=(3, 3))
In [4]: y.compute()KeyError: ('reblock-1', 3, 2)
In [5]: y.dask
Out[5]:
{('reblock-1', 0, 0): (,
[[(,
('wrapped_1', 0, 0),
(slice(0, 3, None), slice(0, 3, None)))]]),
('reblock-1', 0, 1): (,
[[(,
('wrapped_1', 0, 0),
(slice(0, 3, None), slice(3, 5, None))),
(,
('wrapped_1', 0, 1),
(slice(0, 3, None), slice(0, 1, None)))]]),
('reblock-1', 0, 2): (,
[[(,
('wrapped_1', 0, 1),
(slice(0, 3, None), slice(1, 5, None)))]]),
('reblock-1', 0, 3): (,
[[(,
('wrapped_1', 0, 0),
(slice(3, 5, None), slice(0, 3, None)))],
[(,
('wrapped_1', 1, 0),
(slice(0, 1, None), slice(0, 3, None)))]]),
('reblock-1', 1, 0): (,
[[(,
('wrapped_1', 0, 0),
(slice(3, 5, None), slice(3, 5, None))),
(,
('wrapped_1', 0, 1),
(slice(3, 5, None), slice(0, 1, None)))],
[(,
('wrapped_1', 1, 0),
(slice(0, 1, None), slice(3, 5, None))),
(,
('wrapped_1', 1, 1),
(slice(0, 1, None), slice(0, 1, None)))]]),
('reblock-1', 1, 1): (,
[[(,
('wrapped_1', 0, 1),
(slice(3, 5, None), slice(1, 5, None)))],
[(,
('wrapped_1', 1, 1),
(slice(0, 1, None), slice(1, 5, None)))]]),
('reblock-1', 1, 2): (,
[[(,
('wrapped_1', 1, 0),
(slice(1, 5, None), slice(0, 3, None)))]]),
('reblock-1', 1, 3): (,
[[(,
('wrapped_1', 1, 0),
(slice(1, 5, None), slice(3, 5, None))),
(,
('wrapped_1', 1, 1),
(slice(1, 5, None), slice(0, 1, None)))]]),
('reblock-1', 2, 0): (,
[[(,
('wrapped_1', 1, 1),
(slice(1, 5, None), slice(1, 5, None)))]]),
('wrapped_1', 0, 0): (<function ones at 0x7fd25ca13b90>, (5, 5)),
('wrapped_1', 0, 1): (<function ones at 0x7fd25ca13b90>, (5, 5)),
('wrapped_1', 1, 0): (<function ones at 0x7fd25ca13b90>, (5, 5)),
('wrapped_1', 1, 1): (<function ones at 0x7fd25ca13b90>, (5, 5))}
—
Reply to this email directly or view it on GitHub
https://github.com/ContinuumIO/dask/pull/60#issuecomment-78111281.

--
Peter Steinberg - Continuum Analytics
206 715 4492

The same issue arises when using blockdims explicitly
In [1]: import dask.array as da

In [2]: x = da.ones((10, 10), blockshape=(5, 5))

In [3]: y = x.reblock(blockdims=((3, 3, 3, 1), (3, 3, 3, 1)))

In [4]: y.compute()
KeyError: ('reblock-1', 3, 2)

Also, just so that you're aware of my thoughts on use case, this is very valuable when dask arrays with different blockdims need to interact, e.g.
>>> x = da.ones(10, blockshape=(5,))
>>> y = da.ones(10, blockshape=(3,))

>>> z = x + y

The logic to implement this is out-of-scope for this PR but heavily dependent on reblocking.  For me this is more important than full transposition, which is a fairly expensive and global operation (for which dask is currently somewhat ill-suited).

I wonder if there is a nice way to roll this in to elemwise itself rather than wrapping around it.
What should behavior be if we have a few different arrays?  Always take the left-most?
How should we handle broadcasting?  Is it possible to reblock only the shared dimensions?

I suggest that sometime early next week I excise the binary_op stuff and merge the reblock bits.  Then we open an issue with the binary_op solution as an example and leave that for future discussion.  Hopefully someone like @shoyer can give thoughts on what's ideal for the reblocking-on-interaction problem.

Sounds good.  I didn't realize at first how much could be involved in
binary op.  I'll work on it in separate branch/PR.
On Sun, Mar 29, 2015 at 8:58 AM, Matthew Rocklin<EMAIL_ADDRESS>wrote:

I suggest that sometime early next week I excise the binary_op stuff and
merge the reblock bits. Then we open an issue with the binary_op solution
as an example and leave that for future discussion. Hopefully someone like
@shoyer https://github.com/shoyer can give thoughts on what's ideal for
the reblocking-on-interaction problem.
—
Reply to this email directly or view it on GitHub
https://github.com/ContinuumIO/dask/pull/60#issuecomment-87431946.

--
Peter Steinberg - Continuum Analytics
206 715 4492

Just made a new issue with my ideas for auto-reblocking rules: https://github.com/ContinuumIO/dask/issues/111

This was merged in a different PR


Creating N mounted stores or unmounting N stores on the same host is O(N^2)

The problem
When a mounted store is actually created, we dispatch a MOUNT action. When we reduce this action, we write the mounted store's initial state to its mount path in the host's own state. This requires that we also clone all ancestor objects in the state. For example, adding a new mount at foo.bar.applesauce requires that we clone foo.bar and foo.
Doing so turns out to be O(N) where N is the number of properties on the object. Thus creating N mounted stores on the same host is O(1+2+...+N) = O(N^2).
Unmounting N stores on the same host exhibits similar complexity for the same reason. This is a bummer.
Possible solutions
Other immutable libraries
When we update state, we use object-path-immutable#set, which performs the cloning described above. I first benchmarked equivalent methods from seamless-immutable and Immutable.js. Both were slower, which is unsurprising, since object-path-immutable#set is dead simple.
Immutable.js would be faster, but only if we require reducers to operate on its immutable types, rather than a plain object. I feel that would limit the usefulness of this library.
Be lazy
So, we need to do less work. We can't avoid writing the mounted store's state into the host's own state, but we can batch the writes up and only clone once per batch. This will necessitate changes the semantics of mounting and unmounting wrt actions. What we will do is batch up the work to mount or unmount and either perform it on a later turn of the event loop, or when needed due to a call to getState or dispatch necessitates.

@slimelabs


File API: File.Download API

As a user, I would like to download results generated by my applications from the WM so that I can export and review them.
Acceptance Criteria

API to download a file

Closing due to redesign


Static graph allocation in cached op consumes much more memory without giving other benefits?

I bumped into this while investigating memory efficiency of v2.0 vs v1.6. I am building master branch (v2.0) from commit https://github.com/apache/incubator-mxnet/commit/fabcd145cd496628791f9f2ea813048360ac33ca and 1.x branch (v1.6) from commit https://github.com/apache/incubator-mxnet/commit/6eec9da55c5096079355d1f1a5fa58dcf35d6752
This script loads a BERT implementation (json files attached) and runs it multiple times while increasing the input sequence length:
import mxnet as mx
from mxnet import autograd
import json
import os, psutil
import time

symbol_path = '/home/matteo/bert_sym.json'
shapes_path = '/home/matteo/bert_shapes.json'

def get_memory_usage():
	return psutil.Process(os.getpid()).memory_info().rss / 1e+6

sym = mx.symbol.load(symbol_path)
with open(shapes_path) as shapes_file:
    shapes = json.load(shapes_file)

version = mx.__version__
print('version: ' + version)

if(version == '2.0.0'):
	inputs = [mx.nd.ones(shape) for shape in shapes.values()]
	static_alloc = False
	cached_op = mx.ndarray.CachedOp(sym, flags=[('static_alloc', static_alloc)])
	print('static_alloc: ' + str(static_alloc))
else:
	arrays = {name:mx.nd.ones(shape) for (name, shape) in shapes.items()}
	ex = sym.bind(mx.cpu(), arrays, grad_req='null')

batch_size = 32
seq_lengths = [5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 64, 88]

print('initial memory: ' + str(get_memory_usage()))
print()
for len in seq_lengths:
	input = mx.nd.ones([batch_size, len, 2])
	start = time.time()
	if(version == '2.0.0'):
		inputs[0] = input
		output = cached_op(*inputs, default_ctx=mx.cpu())
	else:
		arrays['.Inputs.Input'] = input
		ex = sym.bind(mx.cpu(), arrays, grad_req='null', shared_exec=ex)
		ex.forward()
		output = ex.outputs[0]
	mx.ndarray.waitall()
	end = time.time()
	print('input length: ' + str(len) + ', output shape: ' + str(output.shape) + ', memory: ' + str(get_memory_usage()) + ', time: ' + str(end - start))

bert_model.zip
I have ran this script with both v2.0 and v1.6. For v2.0 you can change the line static_alloc = False to explore the effects of static allocation. This is what I get:
version: 1.6.0
initial memory: 513.232896

input length: 5, output shape: (160, 1, 768), memory: 627.634176, time: 0.17993521690368652
input length: 6, output shape: (192, 1, 768), memory: 634.53184, time: 0.16498708724975586
input length: 7, output shape: (224, 1, 768), memory: 636.997632, time: 0.1961820125579834
input length: 8, output shape: (256, 1, 768), memory: 639.373312, time: 0.3744235038757324
input length: 10, output shape: (320, 1, 768), memory: 646.094848, time: 0.6234118938446045
input length: 12, output shape: (384, 1, 768), memory: 647.86432, time: 0.7562270164489746
input length: 14, output shape: (448, 1, 768), memory: 648.101888, time: 0.817521333694458
input length: 16, output shape: (512, 1, 768), memory: 650.092544, time: 0.546708345413208
input length: 20, output shape: (640, 1, 768), memory: 653.774848, time: 0.8869819641113281
input length: 24, output shape: (768, 1, 768), memory: 663.30624, time: 1.1742339134216309
input length: 28, output shape: (896, 1, 768), memory: 675.590144, time: 1.5763235092163086
input length: 32, output shape: (1024, 1, 768), memory: 679.415808, time: 1.2759253978729248
input length: 40, output shape: (1280, 1, 768), memory: 685.662208, time: 1.3794775009155273
input length: 48, output shape: (1536, 1, 768), memory: 691.77344, time: 1.8214092254638672
input length: 56, output shape: (1792, 1, 768), memory: 700.432384, time: 2.0428481101989746
input length: 64, output shape: (2048, 1, 768), memory: 706.981888, time: 2.3951635360717773
input length: 88, output shape: (2816, 1, 768), memory: 742.8096, time: 3.1772890090942383

version: 2.0.0
static_alloc: False
initial memory: 450.53952

input length: 5, output shape: (160, 1, 768), memory: 646.582272, time: 0.11594986915588379
input length: 6, output shape: (192, 1, 768), memory: 655.331328, time: 0.11730408668518066
input length: 7, output shape: (224, 1, 768), memory: 660.733952, time: 0.12042427062988281
input length: 8, output shape: (256, 1, 768), memory: 666.7264, time: 0.13665461540222168
input length: 10, output shape: (320, 1, 768), memory: 673.849344, time: 0.16487836837768555
input length: 12, output shape: (384, 1, 768), memory: 688.164864, time: 0.20292162895202637
input length: 14, output shape: (448, 1, 768), memory: 694.419456, time: 0.22304844856262207
input length: 16, output shape: (512, 1, 768), memory: 702.029824, time: 0.26688313484191895
input length: 20, output shape: (640, 1, 768), memory: 722.939904, time: 0.31215453147888184
input length: 24, output shape: (768, 1, 768), memory: 746.889216, time: 0.43781352043151855
input length: 28, output shape: (896, 1, 768), memory: 768.385024, time: 0.7122831344604492
input length: 32, output shape: (1024, 1, 768), memory: 772.091904, time: 0.8170092105865479
input length: 40, output shape: (1280, 1, 768), memory: 806.465536, time: 0.9898905754089355
input length: 48, output shape: (1536, 1, 768), memory: 853.385216, time: 1.1750028133392334
input length: 56, output shape: (1792, 1, 768), memory: 901.287936, time: 1.3260750770568848
input length: 64, output shape: (2048, 1, 768), memory: 953.700352, time: 1.5255098342895508
input length: 88, output shape: (2816, 1, 768), memory: 1040.379904, time: 2.304577350616455

version: 2.0.0
static_alloc: True
initial memory: 460.10368

input length: 5, output shape: (160, 1, 768), memory: 707.33824, time: 0.13922739028930664
input length: 6, output shape: (192, 1, 768), memory: 774.643712, time: 0.10790896415710449
input length: 7, output shape: (224, 1, 768), memory: 819.228672, time: 0.12243270874023438
input length: 8, output shape: (256, 1, 768), memory: 831.901696, time: 0.13582420349121094
input length: 10, output shape: (320, 1, 768), memory: 853.38112, time: 0.17856955528259277
input length: 12, output shape: (384, 1, 768), memory: 967.712768, time: 0.20433759689331055
input length: 14, output shape: (448, 1, 768), memory: 987.136, time: 0.22087836265563965
input length: 16, output shape: (512, 1, 768), memory: 1007.665152, time: 0.24690675735473633
input length: 20, output shape: (640, 1, 768), memory: 1199.075328, time: 0.3204777240753174
input length: 24, output shape: (768, 1, 768), memory: 1425.625088, time: 0.3830389976501465
input length: 28, output shape: (896, 1, 768), memory: 1689.489408, time: 0.4304239749908447
input length: 32, output shape: (1024, 1, 768), memory: 1726.783488, time: 0.515824556350708
input length: 40, output shape: (1280, 1, 768), memory: 2105.565184, time: 0.9770240783691406
input length: 48, output shape: (1536, 1, 768), memory: 2558.291968, time: 1.218252420425415
input length: 56, output shape: (1792, 1, 768), memory: 3089.73568, time: 1.4080862998962402
input length: 64, output shape: (2048, 1, 768), memory: 3693.993984, time: 1.6184279918670654
input length: 88, output shape: (2816, 1, 768), memory: 4524.1344, time: 2.394423246383667

Besides being glad that v2.0 has faster timings, there are 2 things I don't understand here:

Static allocation uses roughly 4 times more memory while not being any faster. Is this expected for such a model?
In terms of memory usage, static allocation in CachedOp is supposed to be closer to the scenario of old executors in v1.6 because those are also supposed to statically allocate their computational graphs. But yet v1.6 uses way less memory than v2.0 + static allocation, and also less memory than 2.0 without static allocation. What's happening here?

@barry-jin @szha Can you help with this?


Move the login() logic into HTTPClient.

By moving the login() logic into the HTTPClient object, we can keep
track of the Oauth token expiration time there too. This means that the
HTTPClient() object is self sufficient after its been instantiated, and
can always handle re-authing as necessary.
This fixes a bug where you could create a RightScale.Resource() object
with a supplied HTTPClient() object, wait 2 hours, and have the oauth
token expire.
@brantai, @siminm: What do you two think of this approach? Its more code than I wanted to touch, but it seems to be the more correct way to deal with managing the login credentials to me.

Sorry for the long wait on a reply, neither @fr33jc or I have access to a rightscale account to test this with anymore.  I'm going to go ahead & merge this, & if you'd like to be added as a contributor so you don't have to do the pull-request dance let me know.  If @fr33jc is fine with it, I'd just assume transfer ownership of the project to you if you're actively maintaining it.

@brantai - fine with me.

@brantai,
Sorry for the long delay here -- but we're back again and hacking at this module .. I keep hoping that one day I'll just write a fresh client in Tornado and against RightScale 1.6 API, but I'm not going to get to it. I have a few more changes to make to the module. I would be happy to have the ownership transferred over to the Nextdoor organization (https://github.com/Nextdoor) -- but ideally you can also transfer the PyPI ownership to us so that we can do "real" releases as we tweak the code?

Sure thing.  What's the user on pypi I should transfer it to?

Also, github won't let me transfer directly to Nextdoor & I couldn't transfer to you because you already have a fork.  I've added you as a contributor for now.  Once again, let me know what email you'd like pypi ownership transferred to.

@brantai thanks for doing this! If you add either one of us to Admin permission we'll be able to transfer this to Nextdoor's namespace. The pypi user is simply nextdoor
Thanks again!


adding delay after user input to prevent jank as chart refreshes

I've noticed that there's a bit of lag whenever typing in the input fields, and thought I could help. It's not always so bad on desktop, but especially janky on mobile.
This timeout delay stops the chart from rendering until 1000ms after the last keystroke, and helps ensure that sets of data can be input without re-rendering the chart after each keystroke.

Would it be better to use change licenser?
$('input:not([type=text])').on('change', () => update());
It might also need to modify here.
https://github.com/mikebryant/ac-nh-turnip-prices/blob/dd91bf1ea4cc75c0f29f20793370b3b16135b3b2/js/scripts.js#L84

The difference between the two is input is only fired when a change is made via the interface, while change is fired any time the contents change.
In our use case, since we're not programmatically changing the value of the inputs, there's no need to change the listening. We've been using input the entire time - no need to fix what isn't broken.

Wait. This PR was to the wrong branch. hmm

Yes, the merge should have gone to the WIP branch rather than straight to Master. Sorry if that was incorrect.


[go_router] Provides a way to access current route data in a widget subtree.

Currently there is no API to get the current route information such as query parameter, path, or path parameter in a widget subtree underneath the page. Ideally go_router should provide a inherited widget or some sort to allow user to get GoRouteState or GoRouteMatch from the current context. for example
@override
Widget build(BuildContext context) {
  final GoRouteState state = GoRouteState.of(context);
  return Text('The location is ${state.location}');
}

I think this can be closed as fixed in 5.1.2, right?


Feature/protobuf

Codecov Report

Merging #21 (789a58a) into main (80e495b) will increase coverage by 3.44%.
The diff coverage is 75.03%.

@@            Coverage Diff             @@
##             main      #21      +/-   ##
==========================================
+ Coverage   79.56%   83.01%   +3.44%
==========================================
  Files          34       47      +13
  Lines        1194     1607     +413
==========================================
+ Hits          950     1334     +384
+ Misses        210      206       -4
- Partials       34       67      +33

Impacted Files
Coverage Δ

internal/builds/encoding.go
0.00% <0.00%> (ø)

internal/builds/poststep.go
0.00% <0.00%> (ø)

internal/builds/poststepProto.go
40.00% <40.00%> (ø)

internal/builds/encodingProto.go
42.85% <42.85%> (ø)

internal/utils/proto.go
45.90% <45.90%> (ø)

internal/utils/write.go
67.85% <50.00%> (+2.74%)
:arrow_up:

internal/layouts/layoutJson.go
77.64% <52.63%> (-2.36%)
:arrow_down:

internal/builds/initializeSector.go
74.68% <53.57%> (-8.90%)
:arrow_down:

internal/builds/generateJson.go
55.00% <55.00%> (ø)

internal/builds/generateProto.go
60.00% <60.00%> (ø)

... and 37 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


Add difficulty level tracking to Issues

This is a work in progress.
I'm sending the pull request now to measure interest and gather feedback.
The idea is to allow anyone who can comment on an issue to comment
with a tag in the comment body that can inform CodeTriage of the
difficulty level of a particular issue.
The idea is that CodeTriage users should be able to select what
difficulty level(s) they are interested in, making CodeTriage
more useful for beginners and those who only feel comfortable
adding documentation.
Currently it uses whatever tag is last added to the comments.
This may not be the optimal method of picking tags.
Open questions:

What levels are appropriate?
Are multiple levels desired, (say "expert" and "documentation")?
Is "codetriage-foo" a reasonable tag format or should something else be used?

I'm sure there are other things to discuss about this as well.
Feedback encouraged. :)

+1 terrific idea! I am trying to remember where I saw some good work on this, to model. There was something like a 'newbies-task' tag I saw.
AnneTheAgile

Hey @mjc can you rebase this change with master?

@jroes, is there any way to see the merge conflicts here on the web? or would I need to check it out and do the trial merge/rebase myself?
I had this question on a few projects.
Here I checked and the version of the rb schema is the same; https://github.com/codetriage/codetriage/search?utf8=✓&q=20140710164307
So at least that part isn't the issue :)
I had a related idea this morning. I'd like to rate how easy it is to contribute to repos. Saltstack is amazing. They appreciate every tiny thing I do for them and really encourage me to help. It's truly inspiring! I'd like to give them a +1 through triage to alert others how easy a place it is to start.

Stale, feel free to reopen.


How to make Mother-cell Shoot Food a lil further?

Ok the issue with the current mother cell is that, when its fed the food it shoots out is way close to the mother cell, some of them barely make it out. How do i make it so food thats being shot gets a lil further from the mother cell?

https://github.com/Megabyte918/MultiOgar-Edited/blob/master/src/entity/MotherCell.js#L62
Change around the numbers there, higher numbers mean farther shot distances.

Thanks it sort of QOrk, but is there a way to make it come out faster too?

I'm not too sure about that.

https://github.com/Megabyte918/MultiOgar-Edited/blob/master/src/gamemodes/Experimental.js#L18
Also increase the maximum food count.

Alright Man, @Luka I appreciate the fact that you made a client for everyone to use , Thank You
@Agarian You are a great helper Bud, Thank You!


response.url from Location header

fixes #6

does it also solve #1 which I might duplicated in #6 ?
i could add a commit to change .location to .url in https://github.com/solid/solid-web-client/blob/6d582c556b0576ccd2b0a39ae8dad19ea4ae58cb/src/client.js#L81

👍 , thanks @elf-pavlik.
(Yeah, if you don't mind, can you fix the .location reference & change it to .url, like you mentioned).

And yes, this also solves #1

done!
i didn't write test for that since i don't understand why you need to pass response.url while you already pass response and it will .url from it will anyways overwrite passed url, so in this case you could pass null or whatever since it doesn't matter ... but we can discuss it sometimes later on the chat
https://github.com/solid/solid-web-client/blob/6d582c556b0576ccd2b0a39ae8dad19ea4ae58cb/src/models/resource.js#L47-L53

Thanks! Merging.


Accessibility issue of time picker

Describe the bug
cannot choose a time with tab click I don't have tab index = 0
To Reproduce
Steps to reproduce the behavior:

Select date picker with time
open picker through the keyboard and go to time picker to choose the time
Won't be able to pick time through the keyboard

Expected behavior
time should also able to be picked  through the keyboard

Yes this is an issue for me as well. Thanks

Trying to fix this issue in https://github.com/Hacker0x01/react-datepicker/pull/2566.
Please vote for my fix, hopefully, it will help to release it faster.


Change of domain uniroma3

@kemba98 Please provide us with:

the school official website URL, if different from the domain you are submitting
an URL of a page on the official website where an IT-related long-term (>1 year) course is offered by the school
an URL of a page or another proof (.pdf or a screenshot are OK) showing that the school recognizes the domain which you are submitting as an official email domain for the students.

School website: http://www.uniroma3.it
IT-related long term course: http://www.uniroma3.it/corsi/dipartimento-di-ingegneria/l/2019-2020/ingegneria-informatica-0580706200800002
Pdf proof of change of domain:

@kemba98 I am sorry for a delay with processing your request.
Pull request merged. Thank you!


Option to disable parsing

I would like to use this tool only as auto upload to gw2raidar. I would like to have an option to turn everything else off. Better: select which functionalities of this tool to use in general

Option to disable the parsing with RaidHeros and automatically upload the new logs to GW2Raidar added in Verison 1.0.6


[WebUI] Select rule with a space in name redirect to history page

Hello,
I reproduced a bug in release 2.4.1 and 2.5.0: it consist of when I select a rule in the WebUI created trougth the WebUI which have a space in the rule name, I'm each time redirected to the history page and I'm not able to edit that rule.

/cc @enykeev
I would normally ask you to move this issue to the st2web issue but I have confirmed this behavior on my end as well and also noticed that the rule is impossible to look up using CLI command because of this space. So we should probably put some filtering at the API layer to prevent this from being created.
Thanks for the bug report!

Related: https://github.com/StackStorm/st2web/issues/375 and https://github.com/StackStorm/st2web/issues/357
Seems this should have been fixed earlier (e.g. https://github.com/StackStorm/st2/issues/3459), but something is messed up

Using CLI I'm able to manage the rule by escaping the space. Sorry to mix the repo st2 and st2web.

st2 rule delete "rule with spaces in it" also works for this.

The other trick I use here is something like this: First get the rule ID, usually with st2 rule list -a ref id
Then delete by ID: st2 rule delete <ID>


Rewrite in abstract types possible?

EdgeDB Version: 4.0-dev.7696+eae6d5a
EdgeDB CLI Version: 3.5.0-dev.1025+fec3413
OS Version: Linux hp 6.1.39-1-lts #1 SMP PREEMPT_DYNAMIC Wed, 19 Jul 2023 17:58:31 +0000 x86_64 GNU/Linux

Steps to Reproduce:

insert Foo { name := "f1" };
update Foo set { name := "f1" };

InternalServerError: could not resolve trailing pointer class for (__derived__::__old__)
Hint: This is most likely a bug in EdgeDB. Please consider opening an issue ticket at https://github.com/edgedb/edgedb/issues/new?template=bug_report.md

Schema:
abstract type Revisable {
  required rev: int32 {
    default := 1;
    # increase revision iff object _really_ changes
    rewrite update using (
      (__old__.rev + 1) if __subject__ != __old__ else __old__.rev
      # NB: also tried the following
      #(__old__.rev + 1) if __subject__{*} != __old__{*} else __old__.rev
      #(__old__.rev + 1) if <json>__subject__{*} != <json>__old__{*} else __old__.rev
      #(__old__.rev + 1) if exists std::assert_distinct({__subject__, __old__}) else __old__.rev
    );
  }
}

type Foo extending Revisable {
  name: str {}
}

A few things:

There's definitely a bug here, since ISE's are always a bug
If the code worked (which it should), it wouldn't do what you want: objects are compared by their ids
I don't think there is currently a way to do this in the generic way that you want. There is __specified__, but it only shows the properties on the actual type the rewrite is defined on, not on the subtype it's operating on. It's a feature we could consider, though. Do you have a lot of no-op updates that make it a bad idea to always update the rev?

@msullivan thank you!

I see
Still I would expect <json>__subject__{*} != <json>__old__{*} to work, __subject__ and __old__ being the properties of subtype it's operating on. I personally believe it's the least surprise
I can stand with always updating rev. The question still how (if somehow) to mimic sql create or replace trigger _100_on_before_update before update on Bebebe for each row when (new is distinct from old) execute procedure Bububu;

Shall I expect some update on the subject or just punt on that?

I've fixed the ISE, but the remaining question is this:
How to compare two objects of type T by their properties, without knowing the type T?
Also, would you want to compare link values too? And multi properties and multi links?

Thank you.
I do not know the internals but I would think that any work defined in abstract/delegated object would be delegated to the end (leaf) object. I do understand it's a vague definition.
Personally I would like to compare by direct properties and direct link values only.

What I'm saying is that if you do __old__ = __subject__, this would be the same as __old__.id = __subject__.id (comparing their identities).
What you'd need is a way to compare their properties, generically.
I'll ask about this on a team call.

Aha, I see.
I believe then __old__{*} != __subject__{*} is the way to compare objects my way, providing properties are compared by the value and links are compared by their ids. So that the above expression denote the change to the object itself.
I wonder how to get the fix in docker pull edgedb/edgedb )

I've tried that, but as I expected, it still does not work - std::= and std::!= can compare arbitrary objects, but they will compare them by ids.

To get the latest changes, I think you have to wait for 4.2 (which should be out in a week or so) or for us to fix the flaky tests in nightly :sweat:

I think the following would do:
rewrite update using ((__old__.rev + 1) if exists ((select json_object_unpack(<json>__subject__{*}) except json_object_unpack(<json>__old__{*}))) else __old__.rev);

Would be clearer if we had when clause for rewrites, too:
rewrite update when (
   exists ((select json_object_unpack(<json>__subject__{*}) except json_object_unpack(<json>__old__{*}))
) using (__old__.rev + 1);

On std::= !== std::!=:
What if consider introducing std::=== or alike to compare not only ids but all direct fields of the arguments?

I think the following would do:

Yup, that would do it. But we cannot say that this is the idiomatic way - ideally there would be std::=== or std::eq_properties().

Aha ^^^ Because such a comparison is very common imo. Kinda sql-ish (new is distinct from old) guard in triggers.

@dvv we have an old issue for structural comparisons: #5335


Enable/Disable FFS migration logic

Task/Issue URL: https://app.asana.com/0/488551667048375/1205630678911890/f
Description
Steps to test this PR
Feature 1

[ ]
[ ]

UI changes

Before
After

!(Upload before screenshot)
(Upload after screenshot)

Current dependencies on/for this PR:

develop

PR #3704

PR #3705

PR #3721
PR #3707

PR #3806   👈
PR #3735
PR #3710

This stack of pull requests is managed by Graphite.

Current dependencies on/for this PR:

develop

PR #3704

PR #3705

PR #3721
PR #3707

PR #3806   👈
PR #3735
PR #3710

This stack of pull requests is managed by Graphite.


WIP GraphBLAS ops lowering pass

This PR intends to lower all the GraphBLAS ops into the SCF, linalg, and standard dialects.

Pull Request Test Coverage Report for Build 886046414

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 81.698%

Totals

Change from base Build 879431951:
0.0%

Covered Lines:
1424

Relevant Lines:
1743

💛  - Coveralls


Add Ebay sample

Adds an ebay sample that:

searches for iPhone
Sorts by ending soonest,
Selects the first result
Views the seller's profile
Views the seller's feedback

https://replay.io/view?id=a1f201ee-258d-49b9-bbd4-bccfad802bfc
Fixes #20

Blocked by #61 and #63


Replace PolicyAttachment hierarchy example with correct diagram

Signed-off-by: Keith Mattix II<EMAIL_ADDRESS>
What type of PR is this?

/kind-documentation
What this PR does / why we need it:
Turns out there was actually a relevant diagram in the original GEP for PolicyAttachment. This PR replaces the custom example with the more detailed diagram

The link in the github render AND the netlify render https://deploy-preview-1236--kubernetes-sigs-gateway-api.netlify.app/v1alpha2/references/policy-attachment/#hierarchy appears to be broken to me?

🤦🏾 Relative paths strike again

Thanks @keithmattix!
/ok-to-test
/lgtm
/approve


created a 404 page

I created a 404 page for when the user tries to access a page that doesn't exist. Here's a preview of what it looks like:

It comes with:

an error message
links to help the user navigate the site
a design that's responsive and consistent
animation of the options appearing when the page loads

Let me know if anything needs to be added or changed about this!

I have resolved the conflicts that occurred.
Thanks for your contribution, we are looking forward to more contributions from your side.


possible deadlock in TabletUpdates::check_rowset_id and TabletUpdates::rowset_commit

The order of locking _lock and _rowsets_lock is different in TabletUpdates::check_rowset_id and TabletUpdates::rowset_commit, which leads deadlock.
The TabletUpdates::check_rowset_id locks _rowsets_lock firstly at https://github.com/StarRocks/starrocks/blob/a4e7ef445a22a1ebd1b6eb703147f5c35fe42722/be/src/storage/tablet_updates.cpp#L1250, and then locks _lock at https://github.com/StarRocks/starrocks/blob/a4e7ef445a22a1ebd1b6eb703147f5c35fe42722/be/src/storage/tablet_updates.cpp#L1257
On the contrary, the TabletUpdates::rowset_commit locks _lock firstly at https://github.com/StarRocks/starrocks/blob/a4e7ef445a22a1ebd1b6eb703147f5c35fe42722/be/src/storage/tablet_updates.cpp#L437, and then locks _rowsets_lock at https://github.com/StarRocks/starrocks/blob/a4e7ef445a22a1ebd1b6eb703147f5c35fe42722/be/src/storage/tablet_updates.cpp#L536
Real behavior (Required)
The thread LWP 233108 holds lock _lock and try to lock _rowsets_lock

The thread LWP 233070 holds lock _rowsets_lock and try to lock _lock.

StarRocks version (Required)
<EMAIL_ADDRESS>

This bug has been fixed by #4998, which means SR version >= 2.1.5, >= 2.2.0-rc02 is OK.


proxy peers FQDN in the management server

Is your feature request related to a problem? Please describe.
Well, although it's not a problem yet but it's wasn't clear to me when I had my first impression with Netbird.
I have a self-hosted netbird install with Zitadel, I have configured a bunch of peers, and they seem to connect to each other via domain name/IP. all worked as expected. nothing wrong.

my domain is : eu-vpn.domain.ltd
I have added a wildcard CNAME in my DNS zone as : *.eu-vpn.domain.ltd CNAME eu-vpn.domain.ltd. in the hope that each peer FQDN would resolve to its instance.
But  I think (I could be wrong) Netbird is not designed in such way ? isn't ?
Describe the solution you'd like
I would like to be able to reach peers from internet using their FQDN, and not only between peers.
Describe alternatives you've considered
still looking for a workaround

Hi @magixus, just to confirm do you want to be able to access private NetBird peers using their private IPs from other machines on the Internet that don't have the NetBird network? I'm afraid that this is not how it is designed right now as this is P2P mesh VPN. If you can describe your use-case we may try to find a workaround.

Hi @surik , Not exactly using Netbird peers' private IP but their address names.
Use case
Connect multiple edge devices (SBCs {raspberry pi mainly}) to the Netbird network. These SBCs act as an NVR and cameras gateway. I want to be able to reach each camera behind the SBC using peers FQDN like (edge-xxxxx.netbird.selfhosted/cam1 .../cam2 .../rtsp1 ...etc)
of course I have a reverse proxy installed in each SBC/peer to proxy each path (/camx) to its respective camera/device.
in general use case, I can configure different proxy_pass in my peers to reach various services behind them. like (RTSP, RTMP, WS ...etc)

Ok, I see. Unfortunately, this is how it is designed right now. The edge-xxxxx.netbird.selfhosted is only accessible from the NetBird network. So to access that the client needs to have netbird agent up and running.

Thanks for confirming, that's what I thought. Would be interesting to see a workaround though
Get Outlook for Androidhttps://aka.ms/AAb9ysg

From: Yury Gargay @.>
Sent: Monday, January 8, 2024 3:23:45 PM
To: netbirdio/netbird @.>
Cc: Oussama Boumaad @.>; Mention @.>
Subject: Re: [netbirdio/netbird] proxy peers FQDN in the management server (Issue #1436)
Ok, I see. Unfortunately, this is how it is designed right now. The edge-xxxxx.netbird.selfhosted is only accessible from the NetBird network. So to access that the client needs to have netbird agent up and running.
—
Reply to this email directly, view it on GitHubhttps://github.com/netbirdio/netbird/issues/1436#issuecomment-1881108494, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AB2JXSQZNNNF7HCHDFGMAIDYNP6PDAVCNFSM6AAAAABBOJUE4GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBRGEYDQNBZGQ.
You are receiving this because you were mentioned.Message ID: @.***>


CompletionItem ignores a TextEdit range option and delete all user input

I added TextEdit to my CompletionItem with range (0,3 0,5) and text '@@'.

I thought that in this case:
1234567<cursor>

i would get something like this or similar:
12@@567

or maybe

12@@

But CompletionItem removes all text and inserts "@@"
@@

I've tried to use InsertReplaceEdit, different ranges, but nothing has changed... Maybe you know the secret of how to disable the deletion of all text? 🥹
https://github.com/microsoft/vscode/assets/48021947/8a2eeffb-4900-47ef-a2f3-bfe17b725418
Version: 1.78.2 (Universal)
Commit: b3e4e68a0bc097f0ae7907b217c1119af9e03435
Date: 2023-05-10T14:44:45.204Z (1 wk ago)
Electron: 22.5.2
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: <IP_ADDRESS>-electron.0
OS: Darwin arm64 22.4.0
Sandboxed: Yes

/needsMoreInfo
This issue lacks

copy-paste friendly source code samples that is complete
sample file/workspace on which you test this

Thanks for creating this issue! We figured it's missing some basic information or in some other way doesn't follow our issue reporting guidelines. Please take the time to review these and update the issue.
Happy Coding!


exmaple error:ollama list models with raw-Name

修改之后：

Hi @KevinLiangX thanks for finding this - I've decided to remove the bash-comparemodels example for now as it's a bit dated


feat(simulation): build out gantry simulator

This PR fleshes out the gantry simulator applications.
The main effort was to move can_task.cpp out of firmware and into core. To do this I added interfaces.hpp that provides access to abstract versions of hardware interfaces implemented differently in fw and simulation. These are CAN, SPI, and Motor hardware interface.
To enable simulation on a non-Linux machine, I added a CAN transport over plain old sockets. A companion PR for opentrons-hardware is in the works.
This is ready for review, but cannot be merged until I can test on hardware.

Some inline comments but structurally, I disagree with the implementation of the hardware-interface concept, because

Linker errors are harder to read than compiler errors
It bundles together everything in a way that doesn't promote separation of concerns

Another approach could be inverting control and making the can task in core instantiated-by or owned-by objects, functions, or files in firmware and simulator.

You're right. I really hate how this code is written. I'll spend more time on it.


[bug] Invalid signature when using smart accounts with SIWE

Description
When attempting to sign in with a smart account using Sign-In with Ethereum (SIWE), the signature verification is failing despite the signature being correctly formatted and coming from a valid smart account.
Since the default accounts for email registration are smart accounts, this makes them unuseable.
Current Behavior

Smart account signature verification fails with "Invalid signature" error
The signature is properly formatted and starts with 0x
Using @reown/appkit-siwe for verification

Expected Behavior

Smart account signatures should be properly verified
Authentication should succeed with valid smart account signatures

Reproduction Steps

Set up Next.js app with @reown/appkit-siwe
Configure NextAuth with SIWE
Attempt to sign in with a smart account
Observe signature verification failure

Example Signature
// Valid smart account signature that's being rejected:
0x0000000000000000000000004e1dcf7ad4e460cfd30791ccc4f9c8a4f820ec67000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000003241688f0b900000000000000000000000041675c099f32341bf84bfc5382af534df5c7461a0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000007a6733696a79300000000000000000000000000000000000000000000000000000000000000000000284b63e800d...

Environment

Next.js App Router
@reown/appkit-siwe: latest
next-auth: latest

Additional Context
The signature format indicates this is coming from a smart account rather than an EOA wallet. The verification process needs to handle smart account signatures differently from regular EOA signatures.
Reproduction Repository
A minimal reproduction can be found at:
https://github.com/reown-com/web-examples/tree/main/dapps/appkit-siwe
Proposed Solution
The verification logic should be updated to properly handle smart account signatures by:

Detecting smart account signatures
Using appropriate verification methods for smart account signatures
Ensuring compatibility with the SIWE specification for smart accounts

Would appreciate guidance on the correct way to handle smart account signature verification with @reown/appkit-siwe.

I just realized i posted this on the wrong repo. Will close


Update dependabot.yml to capture by package manager

Excluding detect-indent for this reason: see https://github.com/dependabot/dependabot-core/pull/5683#issuecomment-1243468605

Awesome! 👍


Add hideOutsideWorkinghour prop

Fixes #85

@reichert621, can we update the accountID in the example app to the demo accountID ?


hidden states for backwards

In the training part,
The output value and loss are saved at first.
At the end of the forward stage, they are calculated.
The problem is, at that time. the hidden states of the model are all from the last input state.
In the backward procedure, the gradients of weights are also depending on the hidden states.
But the outputs of former saved states are obviously based their own hidden states but not the hidden states right now.
So can the variable.backward() function wok well for this situation?

I'm confused. Can you point to the exact lines?

        for i in reversed(range(len(rewards))):
            R = args.gamma * R + rewards[i]
            advantage = R - values[i]
            value_loss = value_loss + 0.5 * advantage.pow(2)

            # Generalized Advantage Estimataion
            delta_t = rewards[i] + args.gamma * \
                values[i + 1].data - values[i].data
            gae = gae * args.gamma * args.tau + delta_t

            policy_loss = policy_loss - \
                log_probs[i] * Variable(gae) - 0.01 * entropies[i]

        optimizer.zero_grad()

        (policy_loss + 0.5 * value_loss).backward()
        torch.nn.utils.clip_grad_norm(model.parameters(), 40)

        ensure_shared_grads(model, shared_model)
        optimizer.step()

But why the hidden states are from the last input state? PyTorch creates new variables for each step that are not overwritten.

Thank you.
I will check it.


RN 0.46 Packager fails to resolve Module XMLHttpRequest

I just upgraded from 0.44 to 0.46 (via the Git-Upgrade tool) and whenever I start the packager, it runs but fails with output:
Loading dependency graph, done.
Bundling `index.android.js`  69.5% (1416/1698), failed.
error: bundling failed: "Unable to resolve module `XMLHttpRequest` from `C:\\Git\\[project name]\\node_modules\\react-native\\Libraries\\Core\\InitializeCore.js`: Module does not exist in the module map or in these directories:\n  C:\\Git\\[project name]\\node_modules\n\nThis might be related to https://github.com/facebook/react-native/issues/4968\nTo resolve try the following:\n  1. Clear watchman watches: `watchman watch-del-all`.\n  2. Delete the `node_modules` folder: `rm -rf node_modules && npm install`.\n  3. Reset packager cache: `rm -fr $TMPDIR/react-*` or `npm start -- --reset-cache`."

I tried everything inside this message, but no luck. This also happens with 0.47. Of course I also tried npm install xmlhttprequest
Environment

react-native -v:
react-native-cli: 2.0.1
react-native: 0.46.4
node -v:
v7.10.0
npm -v:
5.3.0
yarn --version:

Target Platform: android

Development Operating System: Windows 10 x64

Build tools:

Steps to Reproduce
maybe just do what the above says...
Expected Behavior
A working package
Actual Behavior
No working package and the above error message

Try deleting your node_modules folder altogether, then running npm install.
After that, start your packager with npm start --reset-cache

Thx,
did that already, with no luck :(
(I used npm start -- --reset-cache, I don't think there is any difference, right?)

this is happening on RN48 as well

+1

This is happening to me as well, on production build only.
I can't build for production at all at the moment.

Solved on 48

@sibelius how did you solve it? I'm on RN48 and I get the same error when building for production:
Unable to resolve module xmlhttprequest

Try to use
yarn why xmlhttprequest
For me the error was because of d3

@sibelius how did you solve it?

@Eddie104 check this https://github.com/facebook/react-native/issues/15195#issuecomment-330006886

@sibelius thanks! after I removed d3 with "yarn remove d3" then added d3 with "yarn add d3", it works!!!That's amazing!

@Eddie104 I am running into this issue as well and yarn remove d3 followed by yarn add d3 is not solving my issue. Did you do anything else before or after these steps?

@stephenlaughton I modified the version number of d3 from "^4.10.0" to "4.10.0"


Nodejs 8 warning

Warning during usage on nodejs 8.4 ubuntu
(node:18768) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:18768) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:18768) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.

during install dependeciy using yarn
warning grunt-favicons > cheerio > cheerio-select ><EMAIL_ADDRESS>the module is now available as 'css-select'
warning grunt-favicons > cheerio > cheerio-select > CSSselect ><EMAIL_ADDRESS>the module is now available as 'css-what'

I'm also getting this on Windows 10, node 8.4.0. :(


$filter=IsLatestVersion and semVerLevel=2.0.0 yields no results

The client does the following query when using the Browse tab is VS:
GET https://dev.nugettest.org/api/v2/Search()?$filter=IsLatestVersion&searchTerm=''&targetFramework='net46'&includePrerelease=false&$skip=0&$top=26&semVerLevel=2.0.0 HTTP/1.1
Accept: application/atom+xml, application/xml
user-agent: NuGet Client V3/4.3.0 (Microsoft Windows NT 10.0.14393.0, VS Enterprise/15.0)
X-NuGet-Client-Version: 4.3.0
Accept-Language: en-US
Host: dev.nugettest.org
Accept-Encoding: gzip, deflate

This yields no results. I think perhaps its a bug with the introduction of IsLatestSemVer2 and IsLatestStableSemVer2.
This results in an empty "browse" tab when using SemVer 2.0.0:

Also affects nuget.exe list

D:\tools\NuGetClients\v4.3-beta1\NuGet.exe list -Source http://api.dev.nugettest.org/v3-index/index.json semver -Verbosity detailed

NuGet Version: <IP_ADDRESS>
GET https://dev.nugettest.org/api/v2/$metadata
OK https://dev.nugettest.org/api/v2/$metadata 84ms
GET https://dev.nugettest.org/api/v2/Search()?$filter=IsLatestVersion&$orderby=Id&searchTerm='semver'&targetFramework=
''&includePrerelease=false&$skip=0&$top=30&semVerLevel=2.0.0
OK https://dev.nugettest.org/api/v2/Search()?$filter=IsLatestVersion&$orderby=Id&searchTerm='semver'&targetFramework='
'&includePrerelease=false&$skip=0&$top=30&semVerLevel=2.0.0 118ms
No packages found.

This may be a data related issue caused by https://github.com/NuGet/NuGetGallery/issues/3908 yet to be deployed to DEV.

For some reason, the external search service returns these packages with SemVerLevelKey = null (whilst the value should be 2).

There's something odd with this client query:
https://dev.nugettest.org/api/v2/Search()?$filter=IsLatestVersion&searchTerm=''&targetFramework='net46'&includePrerelease=false&$skip=0&$top=26&semVerLevel=2.0.0
It's filtering on IsLatestVersion (not IsLatestVersionSemVer2), whilst simultaneously requesting semVerLevel=2.0.0, for a search term semver. That means, for it to return any results, there must be packages matching the term semver that are non-prerelease, and non-SemVer2.
Do you have an example package for which this is the case?

The filter is applied on line 124 of the QueryResult class.
The OData filter is checking on IsLatestVersion=true, and filtering out any package versions not matching that filter.
IsLatestVersionSemVer2 and IsLatestStableVersionSemVer2 are not exposed on the OData feed, so we need to do some more OData query hijacking to make this work...

@xavierdecoster I noticed packages with both semver1 and semver2 in the name, so was querying based on that to test filtering.

yep, working on it, need to apply an additional hijack when applying the OData filter

Looks resolved to me in latest DEV deployment. Can you please confirm? @joelverhagen @chenriksson

@xavierdecoster nuget list scenario works now; 4.3 client shows semver2 packages


Adding $id

Fixes #2

Thank you @tschmidtb51 !!

Thank you for the update. Unfortunately, it also changed a few other things, which I guess should be discussed in detail. I'll provide an alternative PR later today.

See #7 as a replacement. General clean up will be done in the next PR.

Addressed in #7


Add Serialize [derive] using serde crate.

Hi there,
I would like to add some derive Serialize, Deserialize over most of the objects.
This will permit us to get the AST in JSON and then help us interface with JSON tools already created.
Thanks!

This will permit us to get the AST in JSON and then help us interface with JSON tools already created.

You have modified the files for the parse tree, not the AST. The AST is defined in sema/ast.rs. Is the parse tree what you are looking for?
Also, sign your commits, using the instructions in the DCO CI test.

@Ethnical could you please gate this behind a feature flag? It adds compile time for something we do not need in the compiler itself.
You just need to add a feature flag, exclude it from the default features and gate the derive attributes behind that feature flag. For reference:
https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg_attr-attribute
https://stackoverflow.com/questions/42551113/is-it-possible-to-conditionally-enable-an-attribute-like-derive
Then we can merge it.

Hey @xermicus,
Sorry to be late.. but I am still learning about derive features in Rust. But I don't really get it, what should I do here?
So just to be sure about what I need to do :
I would like to push this code:
#[cfg_attr(feature = "json_tree", Serialize, Deserialize)]
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy, Serialize, Deserialize)]

I am adding at the top (one time, not on all the derive) of the pt.rs the feature json_tree on the derive Serialize, Deserialize then when we import solang-parser. we will need to enable the feature json_tree to activate the derive Serialize, Deserialize ?
Sorry again still discovering main features of Rust...
Thanks!

No worries @Ethnical ! First you change solang-parser/Cargo.toml to something like this:
serde = { version = "1.0.145", features = ["derive"], optional = true }

[features]
default = []
pt-serde = ["serde"]

To make sure it is excluded from the default features. Then, you make use of conditional compilation for the imports and each datastructure you want to have this derive for. So, for example, in solang-parser/src/pt.rs:
#[cfg(feature = "pt-serde")]
use serde::{Deserialize, Serialize};

...

#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy)]
#[cfg_attr(feature = "pt-serde", derive(Serialize, Deserialize))]
/// file no, start offset, end offset (in bytes)
pub enum Loc {
    Builtin,
....

In your project you can then enable the feature for the dependency, so you probably want something like:
solang-parser = { git = "https://github.com/hyperledger/solang.git", features = ["pt-serde"] }

@xermicus oh got it! will do it asap thanks!!


Efficient hashmap for add-on structs

Often times in wlroots, we need to extend "base" objects like wlr_surface or wlr_buffer:

wlr_presentation_surface_sampled
drm_fb_get
gles2_texture_from_buffer

Instead of using a wl_list, using a hashmap that uses a pointer for the keys would be more efficient. It would be nice to study from which number of element the list approach becomes an issue performance-wise.

Fwiw I like the one mcf did for samurai. I cleaned the implementation in my personal snippets.

That implementations hashes string keys, though. We can probably drop murmurhash64a completely and replace it with a a function that shuffles the bits of the uintptr_t keys sufficiently.
Also, I'm not sure about that hashtable behaviour when two different entries end up with the same hash… It doesn't seem like this case is handled?

I think the murmur hash has a pretty low collision rate.

Low collision rate doesn't mean that collisions won't happen.

Also, I'm not sure about that hashtable behaviour when two different entries end up with the same hash… It doesn't seem like this case is handled?

It's handled in key_index. The hash is used to find the initial index, and key_index then simply increments the index until it either finds a matching key or an empty slot. It grows whenever usage reaches 50% capacity, at which point it rebalances.
Note that hash_table_put does not override the value if it already exists (that is, key_index found an entry). In this case it simply returns a pointer to the existing value.

I think the murmur hash has a pretty low collision rate.

Murmur hash is a cheap and small hash and thus have a pretty high likelihood of collision, but it doesn't matter as we don't really need arbitrary string hashing.
We just need something like a 64-bit mixer. MurmurHash has one as the final step. A CRC could also be used.
(If we're bored, we could unroll MurmurHash for 64-bit.)

Ah, makes sense!

Yup, that's a possible alternative solution. Change wlr_renderer_buffer_handle.renderer to be something like void *owner and this can be used by the DRM backend as well.
One downside is that it requires adding an extra data structure to all of the structs that we want to "extend" (ie. attach add-ons to).

Note, add-on structs aren't just for wlr_buffer, we use them for other structs as well, e.g. wlr_surface or wlr_output.

Yes. I look forward to your choice between these two solutions.

Assuming I understand what's required correctly, is it possible to store a list "extended" objects in the base object?
Something like this:
/* wlr_extension.{h,c} */

typedef uint8_t wlr_extension_id;

struct wlr_extension {
    const wlr_extension_id *id;
    struct wl_list link;
};

struct wlr_extension *wlr_extension_find(
        struct wl_list *extensions, const wlr_extension_id *id) {
    struct wlr_extension *extension;
    wl_list_for_each(extension, extensions, link) {
        if (extension->id == id) { /* comparing unique pointers */
            return extension;
        }
    }
    return NULL;
}

/* wlr_base_object.h */

struct wlr_base_object {
    /* ... */

    struct wl_list extensions;
};

/* wlr_extended_object.{h,c} */

struct wlr_extended_object {
    struct wlr_base_object *base;
    struct wlr_extension extension;
    /* ... */
};

/* An object with a unique pointer */
static const wlr_extension_id extended_id;

struct wlr_extended_object *wlr_extended_object_create(
        struct wlr_base_object *base) {
    struct wlr_extended_object *extended = calloc(1, sizeof(*extended));
    extended->base = base;
    extended->extension.id = &extended_id;
    wl_list_insert(&base->extensions, &extended->extension.link);
    return extended;
}

struct wlr_extended_object *wlr_extended_object_from_base(
        struct wlr_base_object *base) {
    struct wlr_extension *extension
            = wlr_extension_find(&base->extensions, &extended_id);
    struct wlr_extended_object *extended = NULL;
    if (extension) {
        extended = wl_container_of(extension, extended, extension);
    } else {
        /* No extended object */
    }
    return extended;
}

wlr_extension_id thing can be replaced with an enum, though I find this approach somewhat cleaner.
This implementation assumes there can be at most one wlr_extended_object for each wlr_base_object, but wlr_extension_find() could be modified to support all cases.

@Vyivel, it seems like you've posted a comment, but then deleted it? Was that intentional?

Yes. I didn't realize my approach was actually very similar to zccrs's solution before I posted it. I still have the example code though, if you need it.

I see, indeed, these are quite similar.

Fixed in https://github.com/swaywm/wlroots/pull/3097.


The application crashes after "Following" segment selection on Activity Feed

Error:
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'attempt to delete row 19 from section 1 which only contains 0 rows before the update'

can't be reproduced on the latest drop from develop


Dockerfile with latest unoconv version

The unoconv version that installs from apt-get is 0.7 and the latest version is 0.8.2. The output from apt-cache search unoconv is :
unoconv:
  Installed: 0.7-1.1
  Candidate: 0.7-1.1
  Version table:
 *** 0.7-1.1 500
        500 http://httpredir.debian.org/debian stretch/main amd64 Packages
        100 /var/lib/dpkg/status

So I guess I would need to install manually  in order to get the latest version. I've already reached out to see if the latest version can be published https://github.com/dagwieers/unoconv/issues/482. If that is not possible, I was wondering if there is any way that this repo can support a Dockerfile that builds latest unoconv manually with all its dependencies.

Does the -P option works for all documents types?

@gulien the only documentation I found for it was in the actual script file here Its a valid option that doesn't specify file types.

Interesting! The v3 has just been released: Gotenberg now handles paper size and orientation for HTML and Markdown conversions. This option is a good candidate for doing it too for Office conversions.
I'll try to install unoconv manually in the base Dockerfile.

@headz68 Gotenberg 3.1 should provide what you need. Feel free to reopen this issue if not 👍

Thanks! I appreciate the work you've put into this service. It's really helped me out because the sensitive nature of our documents won't allow us to send anything to cloud conversion tools!

Glad to help 👍


Fix not including jump.h when building

This fix the below erro when building it (Ubuntu):
_cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++ [enabled by default]
jump/jump.cpp:2:18: fatal error: jump.h: No such file or directory
#include "jump.h"_

Hi, thanks. I totally missed this since I installed the wheel. Anyway, it's enough to add recursive-include jump *.h to MANIFEST.in. Remove all the other changes.

Hi again, sorry to steal your thunder but I wanted to cut a release as soon as possible since it wasn't installable in its current state. You can see my fix in https://github.com/renstrom/python-jump-consistent-hash/commit/973da60f36dafc213ae7c58b5b9dbad1fbd8ddd1

Thanks! Version 2.0.3 seems to be working now.


add kinova arm to inverse kinematics

Generate the inverse kinematics of the full model ( wu + Kinova)

is it ready to merge ?

Can you push only the new data, to another PR?


Blog app - controllers specs

Hey there 👋
In this branch, I performed tests for the user and post controllers to check the requests' status.
Here are the project requirements:

Create a Request spec file for all your controllers.
Make sure that for each action you check:

If response status was correct.
If a correct template was rendered.
If the response body includes correct placeholder text.

Thanks for your kind review and feedback

Thanks @Omar-Muhamad


ARROW-3133: [C++][WIP] Propose APIs to allow for generic determination of when to preallocate for Kernels

These APIs are concrete enough to determine when and where memory should be allocated.
This is complicated (and doesn't necessarily handle all the information that Kernels might want to communicate to a runtime), but still simpler then some other designs I can
imagine.  I'm still not sure I'm grokking the expected outcome of this JIRA fully (i.e. is the intent of this CL overstepping overarching designs for Kernels).

I am not sure we have done enough design and development to be able to add this API right now. I actually think the output shape resolution etc. should be handled in higher level layers, and kernels should be solely concerned with function invocation. That was the intent of https://issues.apache.org/jira/browse/ARROW-1896, to have the kernels "do less"
My preference right now would be to have kernels do as little as possible outside of performing an algorithm, and delegate the responsibility of memory allocation and so forth to the exterior layer.
In practice I believe what is going to happen is that we will create a physical query plan for execution, where nodes in the execution plan will have kernel instances, and during execution the physical plan nodes will allocate memory (or not, if memory is being reused from prior nodes) and then invoke the kernels

Additionally, I think we need some other kind of data structures to represent kernel/operator function signatures. Gandiva is using arrow::DataType for function signatures and is accumulating some kludges e.g. around decimals and parametric types generally

This will leave Kernel implementations difficult to use outside of these the higher level functions. Does this sound like the right scope?

Yes

Is there a JIRA open for designing the higher level "compute" logic?

There isn't really, in part because it's a large project. I plan to work on it with my team this year https://docs.google.com/document/d/12dWBniKW2JQ-5djE3SPjyQXVquCAEmLXVlb1dnhLhQ0/edit#heading=h.qgb0kbkc538r


Dynamic vs. Foreign Interfaces with Electron

In trying to port the webGLTerrain sample to Electron, I find that the dynamic method of interacting with js works but the foreign interface method does not. I wonder if this is a limitation of Fable or if I'm doing something wrong (probably).
I'm specifically working with the ImprovedNoise.js which I've put in apps/js. ImprovedNoise is a function (unit -> obj) that returns an object with a single available function noise (x:float * y:float * z:float -> float).
The original sample uses requirejs in its index.html which seems to put things in a global scope.
My index.html has just one script <script src="js/renderer.js"></script>
I had a problem getting any exported function out of ImprovedNoise.js, so I changed the first line from var ImprovedNoise = function () { to  exports.ImprovedNoise = function () {
So with that change, I can get the dynamic approach to work as below.
Dynamic (working)
renderer.fsx is
#r "../node_modules/fable-core/Fable.Core.dll"
#load "../node_modules/fable-import-three/Fable.Import.Three.fs"

open Fable.Import
open System
open Fable.Core
open Fable.Core.JsInterop

let ImprovedNoise = importMember<unit->obj>("../app/js/ImprovedNoise.js")
let noise = ImprovedNoise() //call the function; now we have an object containing the function we want
let output = noise?noise$(1.4,2.3,3.6) //call the function
Browser.console.log(output);

The emitted js is
/***/ function(module, exports, __webpack_require__) {

	"use strict";

	exports.__esModule = true;
	exports.output = exports.noise = exports.t = exports.ImprovedNoise = undefined;

	var _ImprovedNoise = __webpack_require__(2);

	var ImprovedNoise = exports.ImprovedNoise = _ImprovedNoise.ImprovedNoise;
	var t = exports.t = 1 + 1;
	console.log(t);
	var noise = exports.noise = ImprovedNoise();
	console.log(t);
	var output = exports.output = noise.noise(1.4, 2.3, 3.6);
	console.log(output);

/***/ },
/* 1 */,
/* 2 */
/***/ function(module, exports) {

	// http://mrl.nyu.edu/~perlin/noise/

	exports.ImprovedNoise = function () {

As can be seen, _ImprovedNoise.ImprovedNoise; makes the function accessible.
Foreign Interface (not working)
Using the same approach as in this sample originally, I found that the ImprovedNoise.js code was not being brought in by webpack at all. So I used importDefault as below, not binding the result to anything, as was suggested in this sample
Unfortunately, while it gets the function in the right place in renderer.js, it isn't wired up in a way that makes it usable.
#r "../node_modules/fable-core/Fable.Core.dll"
#load "../node_modules/fable-import-three/Fable.Import.Three.fs"

open Fable.Import
open System
open Fable.Core
open Fable.Core.JsInterop

/// Represents the API exposed by ImprovedNoise script
type IPerlin =
    abstract noise: x:float * y:float * z:float -> float

[<Global>]
let ImprovedNoise(): IPerlin = jsNative

importDefault("../app/js/ImprovedNoise.js") //to attach the js via webpack

let perlin = ImprovedNoise()
let output = perlin.noise(1.4,2.3,3.6)
Browser.console.log(output);

The emitted js:
/***/ function(module, exports, __webpack_require__) {

	"use strict";

	exports.__esModule = true;
	exports.output = exports.perlin = exports.t = undefined;

	var _ImprovedNoise = __webpack_require__(2);

	var _ImprovedNoise2 = _interopRequireDefault(_ImprovedNoise);

	function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

	_ImprovedNoise2.default;
	var t = exports.t = 1 + 1;
	console.log(t);
	var perlin = exports.perlin = ImprovedNoise();
	console.log(t);
	var output = exports.output = perlin.noise(1.4, 2.3, 3.6);
	console.log(output);

/***/ },
/* 1 */,
/* 2 */
/***/ function(module, exports) {

	// http://mrl.nyu.edu/~perlin/noise/

	exports.ImprovedNoise = function () {

As you can see, there is an ImprovedNoise() function that is not wired up to the function in ImprovedNoise.js
Is there a way to make this connect up? It seems that foreign interfaces work in electron when distributed as node modules (many examples of this), so I'd think there would be a way of making it work here. I'm a newb on pretty much everything js, so the answer is not obvious to me.

Thanks a lot for the detailed summary. I understand it can be confusing to work with the different import methods, I need to work on the documentation for that.
My recommendation is that in this simple case you combine both. The only interesting part is the IPerlin interface, so you can define that and still use the import expression:
type IPerlin =
    abstract noise: x:float * y:float * z:float -> float

let ImprovedNoise = importMember<unit->IPerlin>("../app/js/ImprovedNoise.js")

let perlin = ImprovedNoise()
let output = perlin.noise(1.4,2.3,3.6)
Browser.console.log(output);

You can also use the ImportAttribute but this is only recommended for auto-generated bindings.
type IPerlin =
    abstract noise: x:float * y:float * z:float -> float

[<Import("ImprovedNoise", "../app/js/ImprovedNoise.js">]
let ImprovedNoise(): IPerlin = jsNative

let perlin = ImprovedNoise()
let output = perlin.noise(1.4,2.3,3.6)
Browser.console.log(output);

Both of these should work :)

Note the way relative import paths are resolved will change in 0.7 (hopefully) for the better. I'll write a blog post about that.

Thanks :) Hope to have a new sample done this weekend

Based on your comments, I had hoped the following would work for FirstPersonControls
type IFirstPersonControls =
    abstract movementSpeed: float with get, set
    abstract lookSpeed: float with get, set
    abstract handleResize: unit -> unit
    abstract update: float -> unit

[<Import("FirstPersonControls", "../app/js/FirstPersonControls.js")>]
[<Emit("new FirstPersonControls($0...)")>]
let FirstPersonControls(camera: Three.Camera,
                        domElement: Browser.HTMLElement):
                        IFirstPersonControls = jsNative

However, the two attributes in sequence seem to interfere with each other.
Instead I ended up with this (this works):
type IFirstPersonControls =
    abstract movementSpeed: float with get, set
    abstract lookSpeed: float with get, set
    abstract handleResize: unit -> unit
    abstract update: float -> unit

let FirstPersonControls : Three.Camera->Browser.HTMLElement -> IFirstPersonControls  = importMember<Three.Camera->Browser.HTMLElement -> IFirstPersonControls>("../app/js/FirstPersonControls.js")

[<Emit("new FirstPersonControls($0...)")>]
let New_FirstPersonControls(a,b)=  FirstPersonControls a b

It was necessary to split this up because I could not importMember and Emit at the same time -- Emit would cause the import to fail.
Also if I do not convert the signature and leave as tuple, e.g.
let FirstPersonControls : Three.Camera*Browser.HTMLElement -> IFirstPersonControls  = importMember<Three.Camera*Browser.HTMLElement -> IFirstPersonControls>("../app/js/FirstPersonControls.js")

[<Emit("new FirstPersonControls($0...)")>]
let New_FirstPersonControls =  FirstPersonControls

Then the emitted js (of interest) is
var controls = function (tupledArg) {
	        return new FirstPersonControls()([tupledArg[0], tupledArg[1]]);
	    }([camera, domElement]);

I can improve this by making all later calls dynamic with destructure, e.g:
    let controls = New_FirstPersonControls$(camera :> Three.Camera, domElement)
    controls?movementSpeed <- 1000.0
    controls?lookSpeed <- 0.1

in which case the emitted js becomes
var controls = new FirstPersonControls()(camera, domElement);

which is closer but still not right.
Though I'm managed to find a way to make this work, I wonder if there's a more idiomatic way?

Interesting, you're not the first person who applies Import and Emit attributes at the same time. It didn't occur to me that users would try to do that :wink:
We're still polishing the ways to interact with JS code. The Three.js sample was done at the beginning when Fable had limited dynamic programming capabilities and there were no import expressions. Now I'd try to avoid the attributes whenever possible. Your example could work as follows:
open System

type IFirstPersonControls =
    abstract movementSpeed: float with get, set
    abstract lookSpeed: float with get, set
    abstract handleResize: unit -> unit
    abstract update: float -> unit

let FirstPersonControls : Func<Three.Camera, Browser.HTMLElement, IFirstPersonControls> =
    importMember "../app/js/FirstPersonControls.js"

let controls = FirstPersonControls.Invoke(camera :> Three.Camera, domElement)
controls.movementSpeed <- 1000.0
controls.lookSpeed <- 0.1

FirstPersonControls must be a delegate (System.Func<>) to prevent the F# compiler from currying the arguments. I know this is confusing and I tried to make this as transparent as possible to the user. For example, arguments won't be transformed into a tuple when using dynamic programming (see docs):
let FirstPersonControls : obj = importMember "../app/js/FirstPersonControls.js"

let controls =
    FirstPersonControls$(camera :> Three.Camera, domElement)
    |> unbox< IFirstPersonControls >

Unfortunately, this won't be the case if you explicitly set the signature of the function: 'a->'b->'c means arguments are curried, and 'a * 'b->'c means argument are a tuple. So you must use Func<'a,'b,'c> to apply arguments normally.

Thanks :smile: However your example does not include new
I used your boxing trick to modify it to this:
let FirstPersonControls : Three.Camera*Browser.HTMLElement -> IFirstPersonControls  =
    importMember "../app/js/FirstPersonControls.js"
....
let controls = createNew  FirstPersonControls (camera :> Three.Camera, domElement) |> unbox< IFirstPersonControls >

which emits
var controls = new FirstPersonControls(camera, domElement);

When I try to use createNew with FirstPersonControls.Invoke, as in your example:
let controls = createNew  FirstPersonControls.Invoke (camera :> Three.Camera, domElement) |> unbox< IFirstPersonControls >

the js does not transpile as desired:
	    var controls = new function (tupledArg) {
	        return FirstPersonControls(tupledArg[0], tupledArg[1]);
	    }(camera, domElement);

Is there a way to use createNew with Func<> syntax?

True, sorry! 😅
createNew works dynamically, so you don't need to specify the signature:
let FirstPersonControls : obj = importMember "../app/js/FirstPersonControls.js"

let controls: IFirstPersonControls =
    createNew FirstPersonControls (camera :> Three.Camera, domElement) |> unbox

Beautiful :metal:

In latest alpha (fable-compiler@next and fable-core@next), I've added JsCons to Fable.Core.JsInterop to make it easier to import constructors, so you can do:
let FirstPersonControls: JsCons<IFirstPersonControls> =
    importMember "../app/js/FirstPersonControls.js"

// controls will be of type IFirstPersonControls without casting,
// but the constructor arguments are not typed
let controls = FirstPersonControls.Create(camera :> Three.Camera, domElement)

Please tell me what you think, whether it's an improved or not over dynamic invocation, if it can still be made more elegant, etc :+1:

I like what your proposing above b/c

It makes the type of FirstPersonControls clear at the moment of creation
no more unboxing
createNew is a little confusing b/c you have to add white space before the parameters

The only thing I'm not confident of is if JsCons is the best name. I don't recall seeing a lot of types with the Js prefix, and Cons might be too short to be immediately understood as constructor. I don't know much js but I wonder if JsClass or Proto might be alternatives.
Another thought: I like the idea of parity between the dynamic and foreign interface operations. Ideally there would be a 1-to-1 correspondence, and in the documentation the two variants could be shown side by side.
Would it make sense to have a foreign interface approach that allows this:
let FirstPersonControls: JsCons<Three.Camera, Browser.HTMLElement,IFirstPersonControls> =
    importMember "../app/js/FirstPersonControls.js"

and enforces type checking on Create? Perhaps you've already done this.

Very nice! I thought of combining, but using the interface in the generic signature escaped me. Hope to have another sample done this weekend.
Sent from my Sony Xperia™ smartphone
---- Alfonso Garcia-Caro wrote ----
Thanks a lot for the detailed summary. I understand it can be confusing to work with the different import methods, I need to work on the documentation for that.
My recommendation is that in this simple case you combine both. The only interesting part is the IPerlin interface, so you can define that and still use the import expression:
type IPerlin =
abstract noise: x:float * y:float * z:float -> float
let ImprovedNoise = importMemberIPerlin>("../app/js/ImprovedNoise.js")
let perlin = ImprovedNoise()
let output = perlin.noise(1.4,2.3,3.6)
Browser.console.log(output);
You can also use the ImportAttribute but this is only recommended for auto-generated bindings.
type IPerlin =
abstract noise: x:float * y:float * z:float -> float
[<Import("ImprovedNoise", "../app/js/ImprovedNoise.js">]
let ImprovedNoise(): IPerlin = jsNative
let perlin = ImprovedNoise()
let output = perlin.noise(1.4,2.3,3.6)
Browser.console.log(output);
Both of these should work :)
Note the way relative import paths are resolved will change in 0.7 (hopefully) for the better. I'll write a blog post about that.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/fable-compiler/fable-electron/issues/4#issuecomment-255495672, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AEOg1DFPAmWTB9ogIIRl-ht-8Nd51EHwks5q2VtNgaJpZM4KdsQn.

Hmm, I didn't like much the JsCons either but prototypes and constructors are actually different things in JS, and if you want to use it as a proper class you need to declare a proper type with FFI like type [<Import("FirstPersonControls", "../app/js/FirstPersonControls.js")>] FirstPersonControls(camera, el) =. What about JsConstructor? Would that be a bit clearer?
Also, about typing the arguments. The problem is you would then need different definitions of JsConstructor depending on the number of generic arguments (as with the new JsFunc), which can be a bit cumbersome. But we can try to find a solution :+1:

JsConstructor is more clear for sure :)

I just realized that we can use tuples to make the constructor arguments statically typed too. So in latest alpha you can do:
let FirstPersonControls: JsCons<Three.Camera * Browser.HTMLElement, IFirstPersonControls> =
    importMember "../app/js/FirstPersonControls.js"

let controls = FirstPersonControls.Create(camera, domElement)

Awesome!

@aolney I'm trying to improve the dynamic programming helpers. I still need to properly document everything but, in order to avoid confusion with Func<_,_,_>, at the end I decided to add multiple generic arguments to JsConstructor and remove the tuple trick. So the sample above with latest fable-compiler and fable-core would be rewritten as:
open Fable.Core.JsInterop

let FirstPersonControls: JsConstructor<Three.Camera, Browser.HTMLElement, IFirstPersonControls> =
    importMember "../app/js/FirstPersonControls.js"

let controls = FirstPersonControls.Create(camera, domElement)

If you're using JsConstructor in your code, would you mind updating it? Sorry for that!

No problem, thanks for being so conscientious :smile: I will start probing my samples to make sure they work with 0.7


Usage of Phantom JS in production phase

1. Which version of PhantomJS are you using? Tip: run phantomjs --version.
PhantomJS 2.1.1
2. What steps will reproduce the problem?_
I have added phantomJSdriver in my asp.net mvc project and it installed an exe file in order to use phantom JS.
I have used the code "Install-Package PhantomJS" for package manager console.
I have some questions:
*Will phantom JS with exe file will be working in production phase and in the webhotel?
*When I use phantom JS, it displayed a firewall and I wonder if it gonna be the same result in production phase in the web hotel?
3. Which operating system are you using?
Windows 8.1
4. Did you use binary PhantomJS or did you compile it from source?
I used the code from the dll file

Please provide any additional information below.

Yes, it will be if you have enabled Windows Firewall there.

No response. Closed.


jsonbin.io as storage

Make it use Zapier -> JSONbin.io for storing what's bookmarked. Will need a way to add/define and store the following:

[ ] JSONbin.io secret key
[ ] Zapier webhook URL

Store in indexedDB.

Can't be IndexedDB, because we don't have access to it when on other pages. Needs to be generated HTML. Could be from nowsearch.xyz ?

Hmm, no. Can't store a secret key somewhere in the open. Only need the bookmark in the browser to store/hold the secret keys. Add them when generating the bookmarklet for adding to the browser bookmarks? Maybe IndexedDB is an okay idea after all. Need to be on nowsearch.xyz to add the bookmark. There, the keys are picked up from IndexedDB. When you want to add another browser, you need to add the keys (for now).

Won't work for several reasons: Zapier doesn't seem to accept cross-origin script (maybe possible to get working, maybe not) and jsonbin.io only holding one object at a time.

Actually, I could:

[ ] Read JSON array
[ ] append to array with array.push
[ ] update jsonbin array

Check if creating a bin for each bookmark will work. Create them under a collection so all bins can be retrieved in one go.

Working! To get data out, you have to do two steps:
1: Query the collection for bins with this javascript:
let req = new XMLHttpRequest();

req.onreadystatechange = () => {
  if (req.readyState == XMLHttpRequest.DONE) {
    console.log(req.responseText);
  }
};

req.open("GET", "https://api.jsonbin.io/e/collection/<COLLECTION_ID>/all-bins", true);
req.setRequestHeader("secret-key", "<SECRET_KEY>");
req.send();

2: loop through and query every bin and then index


Save video option when training robosuite env

Hi!
I got the following error when training the robosuite env:
Traceback (most recent call last):
  File "train.py", line 304, in main
    workspace.train()
  File "/home/xzc/Documents/RL-ViGen/train.py", line 260, in train
    self.eval()
  File "/home/xzc/Documents/RL-ViGen/train.py", line 168, in eval
    self.video_recorder.init(self.eval_env, enabled=(episode == 0))
  File "/home/xzc/Documents/RL-ViGen/video.py", line 25, in init
    self.record(env)
  File "/home/xzc/Documents/RL-ViGen/video.py", line 39, in record
    frame = env.render()
  File "/home/xzc/Documents/RL-ViGen/wrappers/dmc.py", line 183, in __getattr__
    return getattr(self._env, name)
  File "/home/xzc/Documents/RL-ViGen/wrappers/robo_wrapper.py", line 106, in __getattr__
    return getattr(self._env, name)
  File "/home/xzc/mambaforge/envs/pieg/lib/python3.8/site-packages/dm_control/suite/wrappers/action_scale.py", line 103, in __getattr__
    return getattr(self._env, name)
  File "/home/xzc/Documents/RL-ViGen/wrappers/dmc.py", line 67, in __getattr__
    return getattr(self._env, name)
  File "/home/xzc/Documents/RL-ViGen/wrappers/dmc.py", line 149, in __getattr__
    return getattr(self._env, name)
AttributeError: 'Gym2DMC' object has no attribute 'render'

It seems that this error was triggered by missing  __getattr_ in Gym2DMC wrapper. Is that right?

Are you rushing for rebuttal? If so, can you provide me your wechat ID, and we can communicate in a more comfortable way.


Disable SCSS compilation inside docker

Hi, I get the following error during my docker multi-build arm64 stage.
There is no LibSassHost.Native.linux-* package for the arm64 processor architecture

Since I include the generated css files in the repo, I was thinking it's actually not needed to run the SCSS compilation during server build (done in Docker). Is there a way to do that?

Hi - I think it might skip the LSB task if there aren't any Sass files in the directory.
Perhaps try removing them before your server build then?

Or put a Condition="" attribute on the package reference to LibSassBuilder?

@bezysoftware closing this, please comment again for further discussion on this.


Support for variables from other files

I have two files:
a.php
$test = new Test();
require_once "b.php";

b.php
$test->getRecord();

The issue is it doesn't autofill getRecord. It doesn't even know $test is a class unless if I call $test = new Test(); in that file. Is there anyway to get intelephense to look at other files in the workspace or any plugin that can do this for VSCode?

Yep makes sense, I'm going to assume having the program run through multiple files might be very taxing on the computer and a bit tricky to work properly.
First example seems to work well, thanks.


MessageChat customText returns empty string

I have used sendCustomMessage to add a custom message in message request.
I can see the value in the XMPP logs but unfortunately, the MessageChat in void onChatMessage(MessageChat messageChat) returns empty customText.

you can edit package according to yourself downloading code from GitHub and import it from your local.
I edited xmpp_plugin.dart file like that:
Future sendCustomMessage(String toJid, String body, String id, String customString, int time) async {
final params = {
"to_jid": toJid,
"body": body,
"id": id,
"customText": customString,
"time": time.toString(),
};
printLogForMethodCall('send_message', params);
final String status = await _channel.invokeMethod('send_custom_message', params);
return status;
}

@ismailgzn  I don't think so customisation required but let me investigate the case ?
@aarjan Can you please paste your code snippet here and also the logs which is receiving on your end ?
Do also confirm that are you using on android or ios ?

Yes I am testing on Android.

@aarjan I tested with the example apps and it works fine can you please send more details how exactty you are using ?


[do-not-merge] enable log on celadon

version: 24.1.5

apply this patch, build (make libmfx-ge) and replace it.
create a named ".mfx_trace" file in /data/local in android with the following content: Output=0x01
make sure your program has permission to r/w in /data/local/tmp, e.g. add root in<EMAIL_ADDRESS>reboot android.
find the log file in /data/local/tmp/mfx-gen.log

the .rc file example
service hardware-intel-media-c2-hal-1-0<EMAIL_ADDRESS>    class hal
    user root
    group root camera mediadrm drmrpc
    ioprio rt 4
    writepid /dev/cpuset/foreground/tasks
    seclabel u:r:su:s0

Improper Commit Message
Tracked on not found in commit message,
make sure Tracked-On: Jira-ticket  is present.

Improper Commit Message
Tracked on not found in commit message,
make sure Tracked-On: Jira-ticket  is present.

Improper Commit Message
Tracked on not found in commit message,
make sure Tracked-On: Jira-ticket  is present.

Improper Commit Message
Tracked on not found in commit message,
make sure Tracked-On: Jira-ticket  is present.