Encoding "Taxonomy"

In order to avoid cluttering up the discussion of #762 (Enc/Dec and Randomness handling), I figured I'd create a new issue to (a) help myself get my thoughts straight on the various mappings/encodings and (b) get some feedback, especially with regards to the TFHE perspective on RLWE.
1. Application Data (e.g. i32) vs. "Cleartext" (e.g. $\mathbb{F}_p$) Semantics
Not sure if "Cleartext" is the right name here, but we usually have a disconnect between the semantics of the actual data type in the application (e.g., i32 or f32) and what we actually end up achieving under HE (usually finite field arithmetic with prime modulus). I know this isn't the case when we do bit-wise encryption (be it in TFHE or in BFV/BGV) but I'm not sure how 4-bit TFHE works here. Clearly, it's something to consider for "word-wise" FHE like BGV/BGV and especially CKKS, with its approximate nature.
Of course, for many applications, the difference between computation mod $2^{32}$ and a 32-bit prime is not important, but a compiler translation from i32 to mod p isn't technically "correct" and we should probably think about how to expose this to the developer/frontend. I guess this is conceptually similar to truncation and/or deciding approximation precision (e.g. LUT size) which are also relevant to TFHE, but in the mod p/polynomial approximation case we get with BFV/BGV and CKKS, "bits of precision" might not be sufficient as a metric/language to communicate the behavior.
2. Cleartext (e.g. $\mathbb{F}_p$) -> Plaintext Encoding (e.g., $R_p = \mathbb{Z}_p[X] / X^N + 1$)
For RLWE, the plaintext space is a polynomial ring, and we're generally much more interested in encoding integers (at this point, usually implicitly already considered mod p?).
There are lots of ways to do this, starting with the trivial solution of just setting the constant coefficient to your integer and all other coefficients to zero, to decomposing your integer and putting a digit into each coefficient, to various forms of CRT-based "packing" or "batching" that allows one to achieve SIMD-style semantics. By far the most common is "full" packing, but you can also trade off a lower number of "slots" for larger (i.e., $\mathbb{F}_{p^d}$ for $d > 1$) slots.
CKKS has some extra complexity here as the message space is technically a vector of complex numbers but of course it's approximate and in fixed-(ish)-point representation, so basically just more SIMD integer vector stuff.
Question: What does TFHE use here? The first  RLWE "plaintext" I think of in the context of TFHE is the blind rotation test vector, and that looks like a trivial (non-CRT) "packing" of a vector of integers (with lots of repetition) into the coefficients of the polynomial?
3. Plaintext (e.g., $R_p = \mathbb{Z}_p[X] / X^N + 1$) -> Ciphertext (e.g., $R_q = \mathbb{Z}_p[X] / X^N + 1$) Encoding
In descriptions of BFV/BGV, this step is usually mixed in with encryption, but I've also seen this referred to as "MSB/LSB encoding", referring to how message and noise are arranged:

(Image from https://pqcrypto2023.umiacs.io/slides/2.2.pdf)
4. Representation
In addition to the above, we also need to consider how the polynomial itself is represented (e.g., coefficient-representation vs eval/NTT-form, RNS vs BigNum, etc) but that seems mostly orthogonal to the discussion above?
In addition, most RLWE schemes actually don't juse use a single coefficient modulus but instead a "chain" (in RNS, the partial products of the RNS moduli usually make up the chain elements, in non-RNS, the chain could be built more freely but tends to be defined similarily). Note also, that the actual FHE scheme algorithms change depending on these representation choices (NTT stuff is pretty trivial, just iNTT if you need actual coefficients, but RNS versions are quite different and have different noise growth).
Situation in HEIR
Right now, we have the following attributes:

lwe.bit_field_encoding which takes a start and width and describes where in a larger number of bits the "interesting" bits (i.e., message bits) are. This seems to be capturing Step 3, though I'm not sure how we'd express CKKS here? Maybe that's what lwe.unspecified_bit_field_encoding is for? Actually, I'm not even sure how to capture BFV/BGV with this, as they can (iirc) scale their noise or message by non-power-of-two numbers, so the "bits" idea breaks down a bit?

lwe.polynomial_coefficient_encoding which also has the start/width parameters and basically seems to indicate the "trivial coefficient packing" as used in TFHE's blind rotate? (i.e., Step 2)? Similarily, we have lwe.polynomial_evaluation_encoding and lwe.inverse_canonical_embedding_encoding (which actually already has a TODO comment wondering about how bitfield would work here, see #183)

polynomial.ring which encode things relevant to 4, but don't really give us a way to encode things such as as the modulus chain (which is needed independently of RNS).

And then we have the lwe.rlwe_ciphertext type which relies on the above attributes to describe the ciphertext.

Question: How can we best express the required information for an, e.g. BGV ciphertext, specifically moduli chains and/or RNS?

I want to reply in more detail later, but to try to help clear up any
initial confusion, I'm convinced now that the encoding attributes I
originally defined for RLWE are plain wrong.
In general, I consider "encoding" to be any and all preparation of the
application data before encryption that does not require key material or
ciphertext-specific random samples. I was mistaken in where that line was
drawn for BGV/BFV when originally writing that.
On Wed, Jul 10, 2024, 1:57 PM Alexander Viand @.***>
wrote:

In order to avoid cluttering up the discussion of #762
https://github.com/google/heir/issues/762 (Enc/Dec and Randomness
handling), I figured I'd create a new issue to (a) help myself get my
thoughts straight on the various mappings/encodings and (b) get some
feedback, especially with regards to the TFHE perspective on RLWE.

Application Data (e.g. i32) vs. "Cleartext" (e.g. $\mathbb{F}_p$)
Semantics

Not sure if "Cleartext" is the right name here, but we usually have a
disconnect between the semantics of the actual data type in the application
(e.g., i32 or f32) and what we actually end up achieving under HE
(usually finite field arithmetic with prime modulus). I know this isn't the
case when we do bit-wise encryption (be it in TFHE or in BFV/BGV) but I'm
not sure how 4-bit TFHE works here. Clearly, it's something to consider for
"word-wise" FHE like BGV/BGV and especially CKKS, with its approximate
nature.
Of course, for many applications, the difference between computation mod
$2^{32}$ and a 32-bit prime is not important, but a compiler translation
from i32 to mod p isn't technically "correct" and we should probably
think about how to expose this to the developer/frontend. I guess this is
conceptually similar to truncation and/or deciding approximation precision
(e.g. LUT size) which are also relevant to TFHE, but in the mod
p/polynomial approximation case we get with BFV/BGV and CKKS, "bits of
precision" might not be sufficient as a metric/language to communicate the
behavior.
2. Cleartext (e.g. $\mathbb{F}_p$) -> Plaintext Encoding (e.g., $R_p =
\mathbb{Z}_p[X] / X^N + 1$)
For RLWE, the plaintext space is a polynomial ring, and we're generally
much more interested in encoding integers (at this point, usually
implicitly already considered mod p?).
There are lots of ways to do this, starting with the trivial solution of
just setting the constant coefficient to your integer and all other
coefficients to zero, to decomposing your integer and putting a digit into
each coefficient, to various forms of CRT-based "packing" or "batching"
that allows one to achieve SIMD-style semantics. By far the most common is
"full" packing, but you can also trade off a lower number of "slots" for
larger (i.e., $\mathbb{F}_{p^d}$ for $d > 1$) slots.
CKKS has some extra complexity here as the message space is technically a
vector of complex numbers but of course it's approximate and in
fixed-(ish)-point representation, so basically just more SIMD integer
vector stuff.
Question: What does TFHE use here? The first RLWE "plaintext" I think
of in the context of TFHE is the blind rotation test vector, and that looks
like a trivial (non-CRT) "packing" of a vector of integers (with lots of
repetition) into the coefficients of the polynomial?
3. Plaintext (e.g., $R_p = \mathbb{Z}_p[X] / X^N + 1$) -> Ciphertext
(e.g., $R_q = \mathbb{Z}_p[X] / X^N + 1$) Encoding
In descriptions of BFV/BGV, this step is usually mixed in with encryption,
but I've also seen this referred to as "MSB/LSB encoding", referring to how
message and noise are arranged:
image.png (view on web)
https://github.com/google/heir/assets/88422715/12983074-150a-46a0-a0ae-59b5c1692321
(Image from https://pqcrypto2023.umiacs.io/slides/2.2.pdf)
4. Representation
In addition to the above, we also need to consider how the polynomial
itself is represented (e.g., coefficient-representation vs eval/NTT-form,
RNS vs BigNum, etc) but that seems mostly orthogonal to the discussion
above?
In addition, most RLWE schemes actually don't juse use a single
coefficient modulus but instead a "chain" (in RNS, the partial products of
the RNS moduli usually make up the chain elements, in non-RNS, the chain
could be built more freely but tends to be defined similarily). Note also,
that the actual FHE scheme algorithms change depending on these
representation choices (NTT stuff is pretty trivial, just iNTT if you need
actual coefficients, but RNS versions are quite different and have
different noise growth).
Situation in HEIR
Right now, we have the following attributes:

lwe.bit_field_encoding which takes a start and width and describes
where in a larger number of bits the "interesting" bits (i.e., message
bits) are. This seems to be capturing Step 3, though I'm not sure how we'd
express CKKS here? Maybe that's what lwe.unspecified_bit_field_encoding
is for? Actually, I'm not even sure how to capture BFV/BGV with this, as
they can (iirc) scale their noise or message by non-power-of-two numbers,
so the "bits" idea breaks down a bit?
lwe.polynomial_coefficient_encoding which also has the start/width
parameters and basically seems to indicate the "trivial coefficient
packing" as used in TFHE's blind rotate? (i.e., Step 2)? Similarily, we
have lwe.polynomial_evaluation_encoding and
lwe.inverse_canonical_embedding_encoding (which actually already has a
TODO comment wondering about how bitfield would work here, see #183
https://github.com/google/heir/issues/183)
polynomial.ring which encode things relevant to 4, but don't really
give us a way to encode things such as as the modulus chain (which is
needed independently of RNS).
And then we have the lwe.rlwe_ciphertext type which relies on the above
attributes to describe the ciphertext.
Question: How can we best express the required information for an, e.g.
BGV ciphertext, specifically moduli chains and/or RNS?
—
Reply to this email directly, view it on GitHub
https://github.com/google/heir/issues/785, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAS2PKW2JJSEY6NLUPMQSA3ZLWN2FAVCNFSM6AAAAABKVVMILSVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQYDCNZRGU2DAMA
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

Let me also add a list of information I think we need from a BGV/BFV ciphertext (assuming we follow Kim et al. and do a unified implementation) for the bgv->lwe/poly lowering:

MSB or LSB (3)?  - required to know what lowering to use for mul/relin and modswitch. not required if we don't do unified BFV/BGV
RNS or BigNum (4)? - required to choose which lowering to use for modswitch/relin, as the math changes a bit
Modulus Chain (4) - required to generate the constants/metadata for modswitch/relin. Note that we need both the current modulus chain (i.e., what's left) AND the full original modulus chain (e.g., for relin with modulus extension, where we actually mod switch UP to a larger modulus)

Later on (either lwe->poly or --convert-polnomial-mul-to-ntt), we'll also need the current polynomial ring, in order to generate the metadata for the NTT/iNTT.
The other steps (1/2) seem mostly important for the secret -> fhe scheme step, where they're necessary decide what schemes are applicable and when/how to do noise management.

I've played around a bit with this now, and come up with the following design:
The lwe.rlwe_ciphertext no longer has a single lwe.rlwe_params attribute, but instead a series of (default/optional) attributes:

dimension (C++ unsigned int)  - default value = 2, same as dimension from lwe.rlwe_params.

Key Information, probably encapsulated in some attribute, rather than as individual elements:

key (type TBD) - an identifier for the (base, i.e., just $s$) secret key used to encrypt this ciphertext. Important for multi-key HE. Should default to some kind of "dummy" value that indicates "implicit sk in a situation with only one sk"
key_basis? (ArrayRef<int64_t>?) - as in the bgv.relinearize op.
Maybe not necesary, unless there are situations where dimension doesn't uniquely determine a key_basis

Plaintext Encoding Information (as in Step 2 above).
Probably an "Enum" (not sure how that'd be modelled in TableGen) of (fixed/updated) attributes like:

lwe.constant_coefficient_encoding - puts a single integer into the constant coefficient, all others zero.
This works and supports homomorphic add/mul but is incredibly wasteful. Rotation isn't really meaningful for this representation.
lwe.trivial_coefficient_packing - basically the TFHE approach of just interpreting a list of integers as the coefficients.       This doesn't support homomorphic multiplication afaik, as we'd get weird cross products. Rotations by $k$ are possible by multiplying with $X^k$. IIRC, with the right choice of ideal, this can be as simple as rotating the coefficients?
lwe.digitwise_coefficient_packing - decomposes a single integer into digits and inteprets those as coefficients. This actually allows limited homomorphic multiplication, but great care must be taken to avoid digits overflowing.
lwe.crt_packing - maps a vector of integers in $\mathbb{F}_{p^d}$ into a single polynomial in  $R_p = \mathbb{Z}_p[X] / X^N + 1$ using the Chinese Remainder Theorem. This allows full SIMD-style homomorphic operations and rotations via galois automorphisms (computed as a permutation of coefficients followed by a keyswitch from the permuted key to the old key, iirc). We might want to differntiate betweren the common "full" packing ($d = 1$) and "advanced" packings with $d > 1$.
lwe.inverse_canonical_embedding_encoding - CKKS's "fancy" packing, behaves mostly like "full CRT packing". Might already have the "scale" we need to keep track of, or that might be added during encryption only (need to look this up again).

Encryption Information (as in Step 3 above).
Probably necessary if we want unified ciphertxt types for BGV/BFV/CKKS. This  could be as simple as an enum of lwe.msb_enc / lwe.lsb_enc / lwe.mix_enc (for CKKS) if we're just using it to indicate which lowering to choose, but a single combined attribute that actuall includes the constant by which things are scaled could be useful for things such as noise management passes or even just as a place for modswitch lowerings to get the required constants from.

Mod Switch Information (Optional).
In schemes that support mod_switch, we really have two ciphertext spaces to worry about:

the "full" ring this could refer to either what eval keys are encrypted into, or what fresh ciphertexts are encrypted into - which aren't always the same. For the relin lowering we need the first, so I'd suggest using that definition.
the "current" ring - the ring the ciphertext actually exists in at the moment.

However, we don't actually need the "ring" (in the polynomial.ring sense) here for the lowerings, instead we need the (full and current) modulus chain, and frequently some additional info (scale in CKKS, noise estimate in some variants of BGV), so it'd be (an attribute wrapping) full_chain, current_chain and scale (or similar).

Alternatively, / in addition to rlwe_ciphertext, we could also define a glwe_ciphertext that can express any kind of GLWE ciphertext, including LWE and RLWE ciphertexts.  This would have most of the attributes from above, but also

shape  (type TBD[^1]) as a replacement and generalization of dimension

Any other LWE-specific attributes, though I guess most are already expressible with the set above (e.g., extending the encoding enum with LWE-specific encodings)

"Ring" Information (Might also include Representation Information, as in Step 4) above?):
Clearly, we need some information on how to eventually lower the ciphertext to polynomials. However, it does not seem like a simple polynomial.ring attribute is sufficient for that, as it doesn't really allow us to capture RNS/etc. This can probably be solved relatively simply by introducing an RNSAttr (similar to RNSType) and allowing either an RNSAttr<RingAttr> or a RingAttr. However, this would break a bunch of existing code that assumes that there's, e.g., a single coefficient modulus. Maybe we need to fix/update that code anyway to support modswitch-based schemes, or maybe we can add some kind of interface/helper function that computes the total modulus from the RNS elements.
I don't think we actually need NTT/montgomery/etc information at the ctxt level, as we can hopefully delay that until later lowerings. However, RNS does matter at the scheme/LWE level, as it influences HE algorithms in non-trivial ways (i.e., there's no automated way to transform a non-RNS HE scheme to one that works over RNS)

[^1]:  Tensor uses a pretty complex system with some kind of Shape_ShapeType, but there's also "ArrayRef<int64_t>":$shape used by memrefs which might be

So I haven't had time to really process all of the above and make concrete suggestions, but I will say that, in my opinion, (1) and (2) in https://github.com/google/heir/issues/785#issue-2401715400 are both "encoding" and (3) and (4) are not. In particular key information is not part of encoding.
Encoding is just "how do you make your application data suitable to be encrypted" and everything else about the cryptosystem is encryption. As such, I think the current RLWEPlaintext type has everything it needs: the ring (plaintext space), the encoding method (includes packing method, RNS choices, coefficient/NTT domain), and the underlying type.
Nb., the underlying type can be a single scalar value, if the encoding method splits that into digits and packs the digits. Or it could be a tensor of small scalars, if those are directly packed.
The ciphertext should have all the same data, along with anything else needed to use the scheme (moduli chain, "MSB/LSB" scaling factors (I don't want to call this encoding), mod switch info, etc. And I imagine they would all be optional attributes since the specific schemes can use them or not depending on the variants. We might do ourselves a favor by augmenting this with some helper methods that tie the variants to specific checks on the attributes (e.g., satisfiesPaperXYZ2021 which checks for the existence of three attributes and appropriate values for them), and we can use those as guards for various lowerings.

@AlexanderViand-Intel  I suspect there is a particular part of this encoding business that is the most uncertain. Can you decide on which and we can iron that out first? Is it the RNS/BigNum stuff?

@AlexanderViand-Intel I suspect there is a particular part of this encoding business that is the most uncertain. Can you decide on which and we can iron that out first? Is it the RNS/BigNum stuff?

I think most of this was just from naming/terminology confusion, it now seems relatively straightforward to separate.

I will say that, in my opinion, (1) and (2) in #785 (comment) are both "encoding" and (3) and (4) are not. In particular key information is not part of encoding.
Encoding is just "how do you make your application data suitable to be encrypted" and everything else about the cryptosystem is encryption.

I think I agree with this clasification~ Any suggestions for an alternative name?

https://gist.github.com/asraa/6105c144aa10295aa4f021438d5b046d
I started a small scratch doc that I'll convert into a draft PR for commenting purposes..
BTW:

Maybe not necesary, unless there are situations where dimension doesn't uniquely determine a key_basis

yes! a galois rotation doesn't change the dimension but changes the key basis into something like (1, s^i) where it's a rotation by i.
I'm suggesting encryption info attributes for (3) - to me this stuff is relevant to the encryption process / step (computing how to place the Z_p plaintext into the Z_q ciphertext during encryption).

+1, the only murky part is the parameters that are not specific to encryption per se, but to the overall homomorphicness/performance of the cryptosystem. But I think "EncryptionParams" or similar is sufficient.


Upgrade eslint-plugin-flow to latest version

I could use a hand in upgrading eslint-plugin-flowtype to the latest version (2.46.1). We are now using 2.39.1 .
@arnostpleskot Would you be willing to have a look at all the new rules and add them to this ruleset? 🙏 Ping me if you have time and I can provide further details. Thank you!

@robertrossmann I can take care of this, but as my initial commit was created just to make flow working with eslint, it would be better to check all rules by someone who has actual experience with flow on project.
@petyrek or @Zaggen can you look into this?

I have upgraded the ruleset myself, to the best of my ability/knowledge. It will be available as 9.0.0 soon.


Improve work with positional parameters

This brings 3 improvements to positional parameters:

improved semantic analysis that allows to use pointer arithmetic on string params (should help with brendangregg/bpf-perf-tools-book#12)
handling numerical params as strings if specified in a str() call (fixes #1168)
using positional params in calls that require string literals (fixes #1218)

Checklist

[x] Language changes are updated in docs/reference_guide.md
[x] User-visible and non-trivial changes updated in CHANGELOG.md
[x] The new behaviour is covered by tests

This is a really nice fix to have. I think it is nice if we can limit the calculation in str() only for addition within a string length. For example, currently, the semantic analyzer allows the following expression (which resulting errors).

'BEGIN { printf("%s\n", str($1+5)); }' abc
'BEGIN { printf("%s\n", str($1*10)); }' abc
'BEGIN { printf("%s\n", str($1/10)); }' abc

I also think we need to add documentation about this pointer arithmetic behavior of str().

I think it is nice if we can limit the calculation in str() only for addition within a string length.
I also think we need to add documentation about this pointer arithmetic behavior of str().

Good points, I added a corresponding semantic check and a documentation entry. For now, these are specific to positional params within str() only, since general pointer arithmetic is not allowed yet (it is being discussed in #1505).

#1548  fixes a state leak issue this PR introduces


issue on file /config/larecipe.php

Hi, I've installed the latest version of LaRecipe in Laravel version 5.4 that I upgraded to 5.5.
but when I try to edit the config/larecipe.php file like logo, route, etc.. still no change from the docs view.
I confused on this part, anybody help me?

have you tried to run:
composer dump-autoload

thank you for the respons,
I have tried that command, but still no change when I edit larecipe.php file.

ah it solved when I clear config cache, but when I edit again, need to clear config cache again.

awesome :D


May I inquire about the release plan for the waypoint model training and evaluation code?

Thank you for sharing your code.
May I inquire about the release plan for the waypoint model training and evaluation code? If the code is not available for sharing, could you kindly provide me with the specifics of the waypoint prediction metric? For example, which distance metric is utilized for Chafer and Hausdorff distance? Thank you.

Hi,
Thanks for your interest.
My colleague Zun Wang will open-source waypoint training code recently.
Thanks for your patience!


Print All PrimeNumbers Between TwoNumbers

Why:
Closes #1286
What's being changed:
Solved the problem statement.

The solution is done using C++.


Add lowest_order to import arguments

Feature request
It would be useful to also compute the pixel map with the lowest_order. We need it in the import pipeline arguments.
https://github.com/astronomy-commons/hipscat-import/blob/ea600421b14e3546dc7f81b31a8017f1560e6963/src/hipscat_import/catalog/run_import.py#L140-L145
Before submitting
Please check the following:

[X] I have described the purpose of the suggested change, specifying what I need the enhancement to accomplish, i.e. what problem it solves.
[X] I have included any relevant links, screenshots, environment information, and data relevant to implementing the requested feature, as well as pseudocode for how I want to access the new functionality.
[X] If I have ideas for how the new feature could be implemented, I have provided explanations and/or pseudocode and/or task lists for the steps.

@camposandro What is the current behavior, without the lowest order specified?

@delucchi-cmu Please correct me if I am wrong, but at the moment we can run the importer with either a constant pixel order or a highest pixel order. Specifying a highest order we can control the maximum order the catalog is generated at but not its minimum order (unless we want to play trial-and-error with the value of pixel threshold). E.g. for very small and sparse datasets (like the ones in unit tests), the likelihood that we will obtain a catalog of order 0 / 1 is high. If we want to generate a catalog of at least order 3 it's easier to just use the lowest_order parameter and compute the pixel map accordingly.


Class namespace update

It would be nice to have the option to rename the namespace inside all the classes too.

I faced the same issue with namespace in my VS2017 project.

@rujesh if you have resharper, please, use it for such task.
If you don't have resharper, you need to wait until my implementation of the task.

@messengert @rujesh The feture was implemented for C# projects. You can check it  by updating the extension

First of all wonderful work with the rename extension.
I tested the updated version; it solved the namespace issue in the renamed project except for the using statements and occurrences of project name inside files in the renamed project.
I think you need to replace using and project name in NamespaceRenamer.ProjectFiles just the way you have done for NamespaceRenamer.SolutionFiles. I tried adding the logic there and it worked. Can you please confirm?

@rujesh thx. I understand you. I have forgotten about 'using' inside renamed project.
'I tried adding the logic there and it worked. Can you please confirm?'

I don't have any pull request from you to confirm it.

I had tested it locally via the ConsoleApp. I have now created a pull request for it.

@rujesh I have updated the extension

I see 2.1 has the feature working properly,


[BUG] ESM error in BullMQModule

Describe the bug
I just migrated my project to ESM. I get this error atm:
Error [ERR_MODULE_NOT_FOUND]: Cannot find module<EMAIL_ADDRESS>imported from<EMAIL_ADDRESS>When i look into @tsed/bullmq/lib/esm/BullMQModule.js, the line 8 is:
import { JobDispatcher } from "./dispatchers.js";

while dispatchers is a folder, containing an index.js, so there is no file called dispatchers.js
To Reproduce
Use the bullmq module in an esm project.
Expected behavior
The import should be correct
Code snippets
No response
Repository URL example
No response
OS
macOS
Node version
20.12.1
Library version
7.69.2
Additional context
No response

It shouldn't be a issue to fix that ;)


Is scany thread safe ?

type ServiceOverview struct {
ServiceId          uint64         db:"ID"
SubscriptionId     uint64         db:"SUB_ID"
StatusId           int32          db:"STATUS_ID"
}
const SelectSubscriptionOverviewSql string = SELECT TO_CHAR(s.id) as ID, TO_CHAR(s.SUBSCRIPTION_ID) as SUB_ID, s.STATUS_ID FROM Service
func (d *Dao) GetServiceOverviews(ctx context.Context, accountId uint64, bgId uint64) ([]ServiceOverview, error) {
var sos []ServiceOverview
err := sqlscan.Select(ctx, d.rDb, &sos, SelectSubscriptionOverviewSql, accountId, bgId)
return sos, err

}
I am getting the following error:
scanning one: scanning: doing scan: scanFn: scany: column: 'A_NUMBER': no corresponding field found, or it's unexported in models.ServiceOverview
Please note that A_NUMBER is not present in SelectSubscriptionOverviewSql

Hi, this is an interesting issue. Yes, scany is thread-safe, as long as your underlying driver library instance, d.rDb, is thread-safe. To debug this, I would recommend printing SelectSubscriptionOverviewSql and executing it on the database directly (without scany) to see what columns it returns right before where you get the error.

Ok, Thank you for clearing that out,
Usually the query works, and then the process starts crashing after a while with random errors for different queries
Maybe i am missing something, I am not sure.


fix: SITE_PASSWORD variable is well handled

Description
SITE_PASSWORD variable is well handled
Linked Issues
https://github.com/anse-app/chatgpt-demo/issues/428

Thanks.


fixFix index_tool build error

Proposed changes
Issue Number: close #xxx

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

run buildall


Connection to foil Tool like Flow5

Flow5 is a great tool for foils. It is the successor of XFoil and Xflsr5.
https://flow5.tech/
It can use with opencascade cad with stL, iges and more.
Do you see here a fast solution  for coupling your 2d-Tool to improve IBL-solver
to a better solutions?
https://flow5.tech/index.php/flow5/new-features/2d-ibl-solver/

Hello @stefano2734, thank you for the suggestion! We are currently working on an integration of pythonocc-core to import geometries from, for example, stl files. With it, you should be able to run 2D flows on a foil shape.

Perhaps https://github.com/mathLab/BladeX an example of occ „wheel“ here.

I am not 100% sure what you would like lettuce to do for you. From what I understand, the 2D xfoil solver does some very specific things. PythonOCC, on the other hand, is a very generic geometry library and BladeX uses it to create an OCC object.
What we plan to do in lettuce is much more generic, using OCC to generate a suitable boundary for lt.Obstacle from an OCC.Shape/.Solid
So, what are you looking for?

My fault. Wrong direction. Here read is target, not write of cad files.
But examples of BladeX can perhaps be test files for reading of occ routines in lettuce.


Minimum permissions for access to blob data

As per the article, to access blob data in Azure portal user must have the following roles

Storage Blob Data Contributor
Reader

Would it not be better to list the minimum set of permissions here i.e.

Storage Blob Data Reader
Reader

This will be the minimum set to access data. Storage blob data contributor role allows to modify and delete data as well and so is a little more than just "access".
--
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 1ca94e03-5f05-6703-1672-8062f31c0780
Version Independent ID: a6a8d9e9-9aac-c0ed-c474-34cbd0609584
Content: Assign an Azure role for access to blob data - Azure Storage
Content Source: articles/storage/blobs/assign-azure-role-data-access.md
Service: storage
Sub-service: common
GitHub Login: @tamram
Microsoft Alias: tamram

@sanchh Thanks for the question. We are investigating the issue and will update you shortly.

@sanchh  This article lists the Azure built-in roles and description
https://docs.microsoft.com/en-us/azure/role-based-access-control/built-in-roles
I'd recommend posting your question in https://azure.microsoft.com/en-us/support/community/ since it's not directly related to the documentation. We'll follow up there. We will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.

@sanchh - Thanks for your feedback. I understand what you're asking, but the text describes the Storage Blob Data Contributor role as an example only:
To access blob data in the Azure portal with Azure AD credentials, a user must have the following role assignments:

A data access role, such as Storage Blob Data Contributor
The Azure Resource Manager Reader role

I've updated it to the following to clarify, and that change should be live later today:

A data access role, such as Storage Blob Data Reader or Storage Blob Data Contributor
The Azure Resource Manager Reader role, at a minimum


Add matmul with transpose

This PR implements matrix multiplication with transposed weight.
In case of NVIDIA, it will be 1.5 times faster.
# In case of NVIDIA GeForce RTX 3080 Laptop GPU
$ yes |  MATMUL_VERSION=8  make  | grep 'Kernel version\|GFLOPS'
[info] Dispatching Kernel version 8: 2D blocktiling with loop unrolling and vectorization, 30 iterations ...
113.3 milliseconds / dispatch ~ 2426.99 GFLOPS
$ yes |  MATMUL_VERSION=9  make  | grep 'Kernel version\|GFLOPS'
[info] Dispatching Kernel version 9: 2D blocktiling with loop unrolling, vectorization and transpose, 30 iterations ...
74.7 milliseconds / dispatch ~ 3680.25 GFLOPS

# In case of M2 pro
$ yes |  MATMUL_VERSION=8  make  | grep 'Kernel version\|GFLOPS'
[info] Dispatching Kernel version 8: 2D blocktiling with loop unrolling and vectorization, 30 iterations ...
164.3 milliseconds / dispatch ~ 1672.82 GFLOPS
$ yes |  MATMUL_VERSION=9  make  | grep 'Kernel version\|GFLOPS'
[info] Dispatching Kernel version 9: 2D blocktiling with loop unrolling, vectorization and transpose, 30 iterations ...
160.7 milliseconds / dispatch ~ 1710.18 GFLOPS

Nice! That's a bit surprising - most examples I've seen seem to prefer the transposed forms of weights for efficiency, with both weights and input element-wise contributions into the dot product moving from left to right columns. This is already counter to the mathematical representation, so I'm surprised transposing the weights from that helps but there's probably something I'm missing.
I would suggest just having a different shader including comments on the diffs instead of relying on the removeUnnecessaryIfStatements. This makes it more explicit. The regex transformation works of course, but if we start composing these regex manipulations too deeply I think things will start to getting painful to debug + understand what's going on.
If we feel a strong need to do more sophisticated code transformations and being explicit in writing WGSL code isn't sufficient, we could consider code generation mechanisms - can chat in the discord about what this might look like. But I'd only reach for that if we're really hitting a wall of what's feasible.

Awesome, thanks!

I'm getting a segfault out of the box on my MBP. May roll back temporarily until we find the issue.

Reverted for now with a536c8f5e74d958b907f53be26bad385369a5cbf let me know if you have any issues reproducing the segfault, i can take a closer look if it's helpful.


Add support for compressed FSELFs

Right now we assume all fselfs are uncompressed but we should make it accept compressed fselfs too.

This has been implemented in taiHEN.


read/load image-based spatial transcriptomics

Hi there,
Thanks for implementing this nice package, bridging geospatial data analysis with spatial omics analysis! :)
Few questions, however these things are probably on your todo list already:

is there a direct way to read and load (eg, Vizgen data) to generate SFE object?
Similar to Seurat Seurat::ReadVizgen()  & Seurat::LoadVizgen()
I could only find create-sfe-object-from-scratch
is there a plan to implement a wrapper or helper function to convert already existing Seurat object (including all spatial FOV) to SFE

As for Vizgen/Merscope, recent version provides only Cellpose output, eg :
cellpose_mosaic_space.parquet # mols coords in px
cellpose_micron_space.parquet # mols coords in µm
cellpose_cell_by_gene.csv
cellpose_cell_metadata.csv

Something that I added using sfarrow for Seurat obj.
for data loading
for segs
Thanks
A.

Thanks for checking out this package. Since I already have the script to read Vizgen data, I do have a plan to turn that into a function, hopefully for the next Bioconductor release, version 3.17. Or would you like to pull request? I agree that it would be nice to have a function to convert from Seurat object. Since we have a lot to do for version 3.17, the Seurat part might come in 3.18. Those functions will go into the SpatialFeatureExperiment package instead of Voyager since they have more to do with the SFE object than the ESDA.

ok thanks, I will see what I can do this month for PR regarding read/load Vizgen data for SpatialFeatureExperiment repo.
A wrapper to convert from Seurat object to  SFE would be super handy for users (will work on that too).
best

Thank you very much for the PR! Since that's for the SFE repo, I'll close this issue.

Are you still going to do the PR in the SFE repo? The next Bioconductor release is coming up. If not, then I'll add the Vizgen function myself.

sorry, I won't manage to do this on time. If you like, take a look at my modified version of loading Vizgen data using Seurat https://github.com/alikhuseynov/add-on_R/blob/develop/R/read_load_vizgen_v2.R
Thanks!

None of the example datasets on Vizgen's website has the cellpose parquet files. Can you share an example of the parquet file? This is for testing and examples.

Can you upload it to this Box folder? https://caltech.box.com/s/wz0xstwxko2gfz6h47ltywtpe7b2c2sl I just need to take a look at the format so I can create a small toy example from a different dataset. Thanks!

ok, done! I found a smaller one ~37MB..
To load and view the whole file using sfarrow::st_read_parquet()
I'm preparing to submit a PR to Seurat for handling parquet file
best

Thank you!

My own function is getting very different from the one in Seurat. I'm looking at your code, and found this when one cell has multiple polygons:
https://github.com/alikhuseynov/add-on_R/blob/4569a7f51a5669f181179940c7f02207d9c2221e/R/read_load_vizgen_v2.R#L267-L281
I'm not sure if I entirely agree with this approach, because upon inspection, Cellpose somehow assigned two cells to one ID in some cases, like this:

The smaller piece doesn't quite look like artifact. But in some cases, the small bit does look like artifact:

I think I can add another argument for minimum cell size and issue a warning if some cells have multiple pieces that are all larger than the minimum size. I also check if the cell polygons are valid geometries and issue a warning if anything is invalid.

yeah :) I know that problem..
Sometimes Cellpose output has multiple polygons for same cell (it's not always the case, depends on the sample and how well the segmentation worked). In this case I thought to just get the largest polygon as single cell boundary.
I think Seurat object won't allow multiple polygons for same cell ID.
Your suggestion of a new argument for minimum cell size would be a good idea, plus warnings etc.. Thanks!
btw, What's is different in the output from your own function as compared to mine/Seurat?

Mine returns a SpatialFeatureExperiment object, and I read the image with the terra package so the image is not loaded into memory unless necessary, and when plotting a larger image, it is downsampled to make plotting faster. Haven't pushed it yet.
MULTIPOLYGONS are technically allowed but it doesn't make biological sense for whole cell segmentation. Technically allowed because there can be other cell level geometries that have multiple pieces, like endoplasmic reticulum segmentation.
Also I'm not reading in the transcript spots yet. For MERFISH datasets the csv file can be over 30 GB in size and I don't know how to deal with the size and I'm not sure how useful it is to load it. I can do spatial point process analyses on the transcript spots, but I don't know what to do with the large number of cells both computationally and statistically. I need to look into sedona for on disk representation of Simple Features before dealing with the transcript spots.

you mean detected_transcripts.csv from Vizgen? In our case single file was like 700MB.
We are trying out Segmentation-free approach (don't have a push yet), where only molecule coordinates are used (no image or segmentations, only x, y, gene coordinates and molecule name)
The idea is to use some form of quantization, ie Spatial binning (borrowed from geospatial stats) on molecule coordinates, given a desired bin_size.
This makes it:

fairly straightforward approach
to skip painful cell segmentation & bias from segmentation artifacts
bring the across technologies comparison at similar level (per bin)
bin size (or area size) can be anything within the range of the given coordinates.

See the attached example

OK, so there are cases where that file isn't too large and more manageable in memory. I was a bit intimidated by the example datasets on Vizgen's website. But still, I think I should consider sedona because it's only helpful to plot the transcript spots when zoomed into small areas so it would be nice to not load the whole thing into memory, because the analyses are typically performed at the cell or in your case bin level where the location of transcript spots within cells is irrelevant. Besides spatial point process analysis, plotting is the only case I can think of where the transcript spot geometry is relevant. I don't think I'm able to do the sedona thing for Bioconductor 3.17. Maybe I can do it for 3.18 or 3.19.

Ok, thanks. I agree with you, many things are mostly for visualization.
In 3.17, will you have a function to convert SpatialFeatureExperiment object to Seurat and back?

Unfortunately, I don't think I have enough time to write the Seurat conversion function for 3.17. I still have to write new vignettes for the new functionalities before April 26.

Here's my function: https://github.com/pachterlab/SpatialFeatureExperiment/blob/e0e9618492bf3de5407caa0d6b6933954f5850d6/R/read.R#L279


SonoffLan error 406

Hi there
Using SonoffLan for a long time, but after latest update i get:
´´´Logger: custom_components.sonoff.core.ewelink.cloud
Source: custom_components/sonoff/core/ewelink/cloud.py:323
Integration: Sonoff (documentation, issues)
First occurred: 17:27:29 (9 occurrences)
Last logged: 17:53:06
Cloud WS exception
Traceback (most recent call last): File “/config/custom_components/sonoff/core/ewelink/cloud.py”, line 323, in connect raise Exception(resp) Exception: {‘error’: 406, ‘reason’: ‘Authentication Failed’, ‘apikey’: ‘94ca39b6-f663-40d1-89ee-730b4ad6e3b5’, ‘sequence’: ‘1707928049629’, ‘actionName’: ‘userOnline’}‘’’
First update error was last HA verison in January, and I managed to make it work again.
Latest update yesterday Core 2024.2.1 / operating system 11.5, it fail with the above error message
I have tried the suggestion found on github, but error persists
Any one having a suggestion
Marinus

I have the same problem.

@Henning5
I believe that it might be a SonoffLan integration error, I have two installations and both report the same issue, although one of my installations is running
Core 23.11.2 and the other 24.2.1
OS 11.1 and 11.5
Both have few days ago updated the SonoffLan

#1011

PS. "Authentication Failed" can be if you logged in with same account from another place.


MagicDNS base domain clobbers valid records

The Domain used for MagicDNS' base domain must not match an actual domain, as any valid records within such domain are completely clobbered by MagicDNS and return NXDOMAIN.
In my own testing I use my domain (anstee.dev) as the base, knowing full well that MagicDNS will include the namespace ("nicka101" for my testing) in the produced records , and thus there should be no conflict with actual records visible to upstream DNS.

Would you be able to pr a doc change to inform the users?
Let me know if I misunderstood.

I would tend to agree with Juan that the expected behavior would be for headscale/tailscale to only capture $NAMESPACE.$BASE_DOMAIN (along with any additional namespaces visible to the current user), rather than clobbering the entire base domain.
I understand that the actual DNS responses are controlled by the tailscale client, which is running the DNS server, however it seems like modification of generateMagicDNSRootDomains within dns.go could resolve the issue if it were to actually specify the individual relevant subdomains, instead of the base domain itself like it currently does on dns.go#40


[OpenAPI] update 2024-02-01 to 2024-06-01

Context
https://github.tools.sap/AI/ai-sdk-java-backlog/issues/118
Specs can be compared manually here:

https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cognitiveservices/data-plane/AzureOpenAI/inference/stable

Definition of Done

[x] Functionality scope stated & covered
[ ] Tests cover the scope above

[x] E2E tested

[x] ~Error handling created / updated & covered by the tests above~
[x] ~Aligned changes with the JavaScript SDK~
[x] ~Documentation updated~
[x] ~Release notes updated~

We decided not to merge it for GA.


sendEmbed does not take a content parameter

The function is currently defined as public function sendEmbed(Embed $embed): ExtendedPromiseInterface but the docs indicate that we can add content (message text) to the message itself.

Can use $channel->sendMessage($content, $tts, $embed);


[material-ui][Card] Convert to support CSS extraction

[X] I have followed (at least) the PR section of the contributing guide.

Hey @siriwatknp, I see the assets have not been moved to the docs, should we update the script to do that as well?
https://github.com/mui/material-ui/assets/44305048/76bd5f63-b5a5-477e-902e-b693b25c3ea2

Hey @siriwatknp, I see the assets have not been moved to the docs, should we update the script to do that as well?

I ignored this so far, it's not worth I think. We are anyway adding these example just to validate if it works, we are not going to actually use them as a docs.


This page appears to tell us how to disconnect a list from DevOps, but when reading, it's not that

This page appears to tell us how to disconnect a list from DevOps, but when reading, it's not that. It looks like it's a chunk of text copied from somewhere else.
Thanks!

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

ID: c7abef49-a26f-2055-da47-cc3a6b4de1a3
Version Independent ID: e0080a35-bafa-da4d-5c4c-1ebadb5b10b5
Content: Connect Azure Boards to an Office client - Azure Boards
Content Source: docs/boards/backlogs/office/track-work.md
Product: devops
Technology: devops-agile
GitHub Login: @KathrynEE
Microsoft Alias: kaelli

@sebastienricher  - Thank you for the feedback. I've updated the article as it contained duplicate content.


knip it in the...

Problem solved
Short description of the bug fixed or feature added

PR-Codex overview
The focus of this PR is on removing various files and updating types in different parts of the codebase.
Detailed summary

Removed multiple files related to typedoc-gen, thirdweb, and wallets
Updated type definitions in several files
Refactored functions and components in various locations

The following files were skipped due to too many changes: packages/thirdweb/src/pay/utils/definitions.ts, packages/thirdweb/src/utils/hashing/sha256.ts, packages/thirdweb/src/wallets/eip5792/show-calls-status.ts, packages/thirdweb/src/extensions/modules/ClaimableERC20/mint.ts, packages/thirdweb/src/react/web/wallets/shared/ConnectWalletSocialOptions.tsx, packages/thirdweb/src/extensions/modules/ClaimableERC721/mint.ts, packages/thirdweb/src/utils/hashing/hashMessage.ts, packages/thirdweb/src/react/native/ui/components/text.tsx, packages/thirdweb/src/utils/promise/resolve-promised-value.ts, packages/thirdweb/src/auth/core/verify-jwt.ts, packages/thirdweb/src/utils/hashing/keccak256.ts, packages/thirdweb/src/utils/uint8-array.ts, packages/thirdweb/src/react/core/design-system/CustomThemeProvider.tsx, packages/thirdweb/src/react/native/ui/connect/SendScreen.tsx, packages/thirdweb/src/react/web/ui/MediaRenderer/MediaRenderer.tsx, packages/thirdweb/src/gas/estimate-l1-fee.ts, packages/thirdweb/src/react/web/ui/ConnectWallet/WalletSelector.tsx, packages/thirdweb/src/extensions/modules/MintableERC721/mintWithSignature.ts, packages/thirdweb/src/react/native/ui/connect/ExternalWalletsList.tsx, packages/thirdweb/src/exports/extensions/erc1155.ts, packages/thirdweb/src/extensions/modules/ClaimableERC1155/mint.ts, packages/thirdweb/src/extensions/modules/MintableERC1155/mintWithSignature.ts, packages/thirdweb/src/utils/encoding/helpers/trim.ts, packages/thirdweb/src/wallets/utils/getTokenBalance.ts, apps/dashboard/knip.json, packages/thirdweb/src/react/native/ui/connect/TokenListScreen.tsx, packages/thirdweb/src/extensions/vote/write/executeProposal.ts, packages/thirdweb/src/react/native/ui/components/spinner.tsx, packages/thirdweb/src/react/web/ui/MediaRenderer/ModelViewer.tsx, packages/thirdweb/src/transaction/extract-error.ts, packages/thirdweb/src/react/native/ui/components/button.tsx, packages/thirdweb/src/extensions/erc1155/write/updateTokenURI.ts, packages/thirdweb/src/wallets/interfaces/wallet.ts, packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/useSwapSupportedChains.ts, packages/thirdweb/src/utils/storage/walletStorage.ts, packages/thirdweb/src/wallets/in-app/native/native-connector.ts, packages/thirdweb/src/extensions/erc20/write/sigMint.ts, packages/thirdweb/src/extensions/erc721/write/updateTokenURI.ts, packages/thirdweb/src/react/web/wallets/ecosystem/EcosystemWalletFormUI.tsx, packages/thirdweb/src/wallets/eip5792/wait-for-bundle.ts, packages/thirdweb/src/utils/jwt/jwt-header.ts, packages/thirdweb/src/extensions/modules/MintableERC20/mintWithSignature.ts, packages/thirdweb/src/exports/modules.ts, packages/thirdweb/src/react/web/wallets/in-app/InAppWalletFormUI.tsx, packages/thirdweb/src/transaction/actions/wait-for-tx-receipt.ts, packages/thirdweb/src/auth/core/generate-jwt.ts, packages/thirdweb/src/react/core/hooks/transaction/useSendTransaction.ts, packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/main/useBuyTxStates.ts, packages/thirdweb/src/contract/deployment/publisher.ts, packages/thirdweb/src/extensions/erc721/drops/write/updateMetadata.ts, packages/thirdweb/src/extensions/erc1155/drops/write/updateMetadata.ts, packages/thirdweb/src/extensions/prebuilts/deploy-marketplace.ts, packages/thirdweb/src/wallets/in-app/native/auth/index.ts, packages/thirdweb/src/wallets/in-app/native/helpers/auth/middleware.ts, packages/thirdweb/src/utils/platform.ts, .github/CODEOWNERS, packages/thirdweb/src/wallets/in-app/web/lib/auth/index.ts, packages/thirdweb/src/react/core/utils/structuralSharing.ts, packages/thirdweb/src/react/core/hooks/transaction/useSendAndConfirmTransaction.ts, packages/thirdweb/src/extensions/prebuilts/get-required-transactions.ts, packages/thirdweb/src/exports/extensions/erc1271.ts, packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/FiatDetailsScreen.tsx, packages/thirdweb/src/extensions/ens/resolve-l2-name.ts, packages/thirdweb/src/utils/any-evm/deploy-metadata.ts, packages/thirdweb/src/cli/commands/generate/utils.ts, packages/thirdweb/src/extensions/farcaster/eip712Signatures/keyRequestSignature.ts, packages/thirdweb/src/extensions/airdrop/write/airdropERC20WithSignature.ts, packages/thirdweb/src/extensions/airdrop/write/airdropERC721WithSignature.ts, packages/thirdweb/src/transaction/actions/zksync/send-eip712-transaction.ts, packages/thirdweb/src/wallets/in-app/web/utils/iFrameCommunication/InAppWalletIframeCommunicator.ts, packages/thirdweb/src/utils/any-evm/zksync/constants.ts, packages/thirdweb/src/extensions/marketplace/direct-listings/utils.ts, packages/thirdweb/src/transaction/actions/gasless/send-gasless-transaction.ts, packages/thirdweb/src/extensions/prebuilts/deploy-vote.ts, packages/thirdweb/src/react/web/ui/components/Drawer.tsx, packages/thirdweb/src/extensions/airdrop/write/airdropERC1155WithSignature.ts, packages/thirdweb/src/react/core/hooks/others/useWalletBalance.ts, packages/thirdweb/src/extensions/permissions/utils.ts, packages/thirdweb/src/wallets/smart/lib/utils.ts, packages/thirdweb/src/react/web/ui/components/buttons.tsx, packages/thirdweb/src/react/web/ui/prebuilt/thirdweb/ClaimButton/index.tsx, packages/thirdweb/src/wallets/wallet-connect/receiver/index.ts, packages/thirdweb/src/transaction/actions/gasless/providers/engine.ts, packages/thirdweb/src/transaction/actions/gasless/providers/openzeppelin.ts, packages/thirdweb/src/wallets/in-app/web/types.ts, packages/thirdweb/src/extensions/airdrop/write/claimERC20.ts, packages/thirdweb/test/globalSetup.ts, packages/thirdweb/src/extensions/erc721/read/getAllOwners.ts, packages/thirdweb/src/wallets/smart/lib/userop.ts, packages/thirdweb/src/wallets/in-app/native/helpers/wallet/retrieval.ts, packages/thirdweb/src/wallets/in-app/web/lib/iframe-wallet.ts, packages/thirdweb/src/react/web/ui/TransactionButton/TransactionModal.tsx, packages/thirdweb/src/react/native/ui/connect/ConnectedModal.tsx, packages/thirdweb/src/extensions/erc4337/account/common.ts, packages/thirdweb/src/exports/extensions/farcaster.ts, packages/thirdweb/src/exports/chains.ts, packages/thirdweb/src/extensions/erc4337/account/permissions.test.ts, packages/thirdweb/src/wallets/in-app/core/constants/settings.ts, packages/thirdweb/scripts/typedoc.mjs, packages/thirdweb/src/extensions/airdrop/write/merkleInfoERC20.ts, packages/thirdweb/src/utils/extensions/drops/hash-entry.ts, packages/thirdweb/src/extensions/farcaster/eip712Signatures/registerSignature.ts, packages/thirdweb/src/react/native/ui/icons/svgs.ts, packages/thirdweb/src/transaction/actions/gasless/providers/biconomy.ts, packages/thirdweb/src/extensions/farcaster/eip712Signatures/addSignature.ts, packages/thirdweb/src/react/web/ui/AutoConnect/AutoConnect.tsx, packages/thirdweb/src/react/native/ui/AutoConnect/AutoConnect.tsx, packages/service-utils/package.json, packages/thirdweb/src/stories/utils.tsx, packages/thirdweb/src/react/core/utils/defaultTokens.ts, package.json, packages/thirdweb/knip.json, packages/thirdweb/src/pay/buyWithCrypto/getStatus.ts, packages/thirdweb/src/exports/extensions/marketplace.ts, packages/react-native-adapter/package.json, packages/thirdweb/src/utils/semver.ts, packages/thirdweb/src/extensions/uniswap/read/getUniswapV3Pools.ts, packages/thirdweb/src/utils/royalty-engine.ts, packages/thirdweb/src/wallets/in-app/core/authentication/types.ts, packages/thirdweb/src/contract/deployment/deploy-deterministic.ts, packages/thirdweb/src/contract/deployment/utils/infra.ts, packages/thirdweb/src/wallets/injected/index.ts, packages/thirdweb/src/wallets/smart/lib/packUserOp.ts, packages/thirdweb/src/wallets/in-app/native/helpers/storage/local.ts, packages/thirdweb/src/react/web/ui/components/ChainIcon.tsx, packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/BuyTxHistory.tsx, packages/thirdweb/src/wallets/in-app/native/helpers/constants.ts, packages/thirdweb/src/wallets/in-app/native/helpers/api/fetchers.ts, packages/thirdweb/package.json, packages/thirdweb/src/react/core/utils/walletIcon.ts, pnpm-lock.yaml

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

#4751  👈
main

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

Join @jnsdls and the rest of your teammates on  Graphite


Cycle Counting Encode / Decode Description

I think there is an issue in the spec with encoding / decoding cycle count values. There's some ambiguity in whether or not the index of the most significant bit is 1-based or 0-based. When trying to reason if either one works for the edge case of 4096 exactly, encoding then decoding a value isn’t correct for either case.
ctrCycleCounter -> encoding -> CCE/CCM -> decoding -> Approximate Cycle Count

Let’s consider the edge case where ctrCycleCount == 4096 (b'1_0000_0000_0000'):
The CC field is encoded such that CCE holds 0 if the CtrCycleCounter value is less than 4096, otherwise it holds the index of the most significant one bit in the CtrCycleCounter value, minus 12. CCM holds CtrCycleCounter bits CCE+11:CCE
If 0-based indexing, CCE = 12 - 12 = 0, and CCM = counter[11:0] = 0000_0000_0000 = 0

This is indistinguishable from 0

If 1-based indexing, CCE = 13 - 12 = 1, and CCM = counter[12:1] = 1000_0000_0000 = 2048

Decoding these two using the formula from the spec:
if (CCE==0):
  return CCM
else:
  return (2^12 + CCM) << CCE-1
endif

if 0-based indexing for CCE: the decoded cycle count is just CCE = 0, CCM = 0 -> 0

if 1-based indexing for CCE: the decoded cycle count is 2^12 + CCM << CCE - 1 = 4096 + 2048 << 0 = 6144

If I had to guess what it should be:

0-based indexing → CCE holds the index of most significant one bit in the ctrCycleCounter value, minus 11

Change CCM encoding to be ctrCycleCounter[(CCE-1)+11:(CCE-1)]

This would result in:

Encode: 4096 -> CCE = 1, CCM = 0

Decode: CCE = 1, CCM = 0 -> 2^12 + 0 << 0 = 4096

Hopefully I'm not overlooking something trivial here, but I think there should at least be clarification to the indexing base, and possibly a fix to the CCE/CCM encoding.

Shoot, you're right.  And yes, the mistake is in the encoding.  The spec says:

The CC field is encoded such that CCE holds 0 if the CtrCycleCounter
value is less than 4096, otherwise it holds the index of the most significant one bit in the CtrCycleCounter
value, minus 12. CCM holds CtrCycleCounter bits CCE+11:CCE.

It should read as follows.

The CC field is encoded such that CCE holds 0 if the CtrCycleCounter
value is less than 4096, otherwise it holds the index of the most significant one bit in the CtrCycleCounter
value, minus 11. CCM holds CtrCycleCounter bits CCE+10:CCE-1.

With that encoding the decoding works as listed.

@aswaterman this is a ratified spec, how do we handle this?

@bcstrongx Sorry, I didn't notice your @-mention.  We will discuss this in today's ARC meeting.
I'll get back to you.


Object.isNumber() behaves strangely when passed NaN

Using Sugar 1.4.1
Object.isNumber(NaN); // -> true

By definition, one would think that NaN is probably not a number :smile:

Actually, it is:
typeof NaN
  -> "number"

Welcome to the awesome world of Javascript :)

:+1:


Eye grab bug

I grabbed Sam's eye with one of his hands and he freaked out - flying into the air and all bodies flicking around everywhere. Need to make face features not grabbable.

I'm not going to fix this, I think it was pretty funny and working within the comedy of the game to have an action that just destroys sam.


A web runtime supported version of gemma is really needed and high value

It's really a wild potential to use gemma in web runtime, so please provide a web runtime version (wasm or typescript version will be better) for the users!
Thanks a lot and look forward to it!!!!

you can run Gemma models with MediaPipe in the web: https://ai.google.dev/edge/mediapipe/solutions/genai/llm_inference

Could you please confirm if this issue is resolved for you with the above comment ? Please feel free to close the issue if it is resolved ?
Thank you.

Closing this issue due to lack of recent activity,  Please reopen if this is still a valid request.
Thank you!


Example for Google Maps API geocoder?

Hi all,
Is there an example out there to show how to use the Google Maps API with geoPy?
Great tool - finding pretty good results with Nomanatim... would like to see how Google stacks up for our student-level geocoding.
Thank you!!!

Not sure that this ticket must be reviewed as an Issue. Here i placed my simple usecase of Google Maps API via geopy for reverse geocoding — means get address from location provided.
from geopy.geocoders import GoogleV3

point = '51.523910, -0.158578' #here's famous Sherlock Holmes' museum lat & lng

geolocator = GoogleV3()
address = geolocator.reverse(point)
print address[0] # use other indexes if you want more or less detailed address scope.

i hope my example would help you

I recently switched a script I wrote from Nomanatim to Google and the success rate was a lot higher.
One thing to note is that Google Maps currently has a per user geocoding limit of 2500/day if you are geocoding without an API key. See https://developers.google.com/maps/documentation/geocoding/usage-limits for more.
If you get them an API key, the code would just be
from geopy.geocoders import Google V3

geolocator = GoogleV3(api_key="your_API_key")

Here's the example I've finally figured out (from some far-reaching pages...) - and yes, I've switched to the Google geocoder as Nominatim is pretty sensitive to missing information, Google hammers through it no problem
from geopy import geocoders
g = geocoders.GoogleV3(api_key='apikeygoeshere')

#create an input address string
#you can also build this by reading from an input database and building a string

inputAddress = '175 5th Ave, New York,  NY'

#do the geocode
location = g.geocode(inputAddress, timeout=10)

#some things you can get from the result
print(location.latitude, location.longitude)
print(location.raw)
print(location.address)

import os
from geopy import geocoders
from geopy.geocoders import GoogleV3
API_KEY = os.getenv("GOOGLEAPI")
g = GoogleV3(api_key=API_KEY)
#Create empty list to store results
loc_coordinates = []
loc_address = []
for address in df.address:
try:
inputAddress = address
location = g.geocode(inputAddress, timeout=15)
loc_coordinates.append((location.latitude, location.longitude))
loc_address.append(inputAddress)
except:
print('Error, skipping address...')
#Concatonate the two lists together creating a dataframe of address and coordinates.
df_geocodes = pd.DataFrame({'coordinate':loc_coordinates, 'address':loc_address})


Global Variables

What about global variables in the conversation? same as the token

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

ID: 3848c348-51bb-2370-4dc4-d8c16b588ab7
Version Independent ID: 908ee503-90d3-d643-917e-a792432339b1
Content: Work with variables in Power Virtual Agents - Power Virtual Agents
Content Source: power-virtual-agents/authoring-variables.md
Service: dynamics-365-ai
GitHub Login: @iaanw
Microsoft Alias: iawilt

When is global variable coming out? Doesn't make sense that this is not out there yet, i had to store/retireve values into CDS using actions.

Hey, thanks for your messages - global variables is coming with 202 release wave 1 - https://docs.microsoft.com/power-platform-release-plan/2020wave1/power-virtual-agents/use-global-variables-across-topics-within-bot

When is global variable coming out? Doesn't make sense that this is not out there yet, i had to store/retireve values into CDS using actions.

@aledoy I can't wait any longer for global variables. how did you get a unique ID for the conversation to store the values in CDS against ?


can u tell how can i implement the code and run it in my own pc

python3 -m http.server

How to modifiy the .js base .
any documentation please provide..
Thanks.

First you need to do is to clone the Github to your machine:
TERMINAL
git clone https://github.com/simondevyoutube/Quick_3D_RPG.git
after installing it, you need to open the localhost server port (for example port 9000) as follow:
TERMINAL
python3 -m http.server/9000
BROWSER
localhost:9000


add "PDF" to description and/or topics

currently if you search GitHub like this:
pdf language:c++ stars:>999

you dont find this repo.

Thanks for pointing this out. I have fixed it by updating the description and adding pdf and pdf-document-processor to tags.

awesome thank you sir


Annotation-based 2i with dynamic index names [JIRA: CLIENTS-1017]

The current RiakIndex annotation requires the name to be static like "email" here:
@RiakIndex(name="email")
public Set<String> emailIndx;

We need a way to annotate dynamic indices like:
@RiakIndex
public Map<String, String> references;

Where each key in the Map is a 2i key to index, and each value is the corresponding 2i value.
The old RiakObject based API can do this.
Is this something basho can implement or would you be willing to merge a PR on it?

Hi Rune,
PR's are very welcome!  This seems like a small design regression from when we rebuilt the client, so I'd be happy to review and merge anything provided.
Thanks,
Alex

Looks like for this one we'd need to add the appropriate type sniffing code in RiakIndexField and RiakIndexMethod, to detect a map of the proper key type.

Also, I can't find any examples in the 1.4 Client where you can assign the RiakIndex annotation to a Map, do you have any examples you can share / link to?

In http, you can add the same index multiple times when storing.
curl <IP_ADDRESS>:8098/buckets/test/keys/a -XPUT -d 'hello' -H 'X-Riak-Index-myIndex_bin: myvalue1' -H 'X-Riak-Index-myIndex_bin: myvalue2'
curl <IP_ADDRESS>:8098/buckets/test/index/myIndex_bin/myvalue1
{"keys":["a"]}
curl <IP_ADDRESS>:8098/buckets/test/index/myIndex_bin/myvalue2
{"keys":["a"]}

I'm pretty sure, you can do the same in the old java api.


Creating beaver pid directory when missing

#564 Fixing Beaver PID handling

Creating Beaver PID directory when missing
Cleaning Beaver PID after shutting it down

Hi @BjoernT - thanks for the PR.
Would you mind removing the github issue number from the commit message title, and perhaps add an independent description of the bug being fixed in the commit message? This makes it easier to see what's changed when parsing the commit history.
Thanks!

@mancdaz That's fine by me i'll change it later

Updated beaver_pre_install.yml to remove the pid dir

premature backport, please wait til merged with master then cherrypick
:-1:

:+1: straightforward backport

@BjoernT please use git cherry-pick -x for this backport

@BjoernT what @git-harry said :)

Opened #657 to continue this PR, as its been >2 weeks since a cherry-pick -x was requested.


How to download SNU-FILM benchmark ？

The linked page only provides gopro datasets. SNU-FILM benchmark consists of test split of [GOPRO] dataset + manually collected video sequences from YouTube. But, the video sequences from YouTube is not provided.
Can you tell me how to download the complete SNU-FILM benchmark？

In the linked page, the author provides selected frame triplets for evaluation , and all RGB frames .


Themes

What I think may be a great idea for lsfp came to my mind recently, and that idea are themes. By themes I mean custom color sets, maybe some defaults that you can choose from, and also user designed ones (for example on a file). Keep in mind, this is a concept, to be done in a future and to keep developing, it is not a complete concept by any means.
So, the themes would be like the actual FILE_EXTENSION_COLORS constant. By default, the colors that we have registered there would be used, but the user would have the option to decide among other themes, built-in or custom. The theme selection could be done either by a --theme flag or a theme option in your .lsfprc, which would take a string or path. The string passed should be the name of one of the built-in themes like noir, mono, solarized, etc. (just some ideas). On the other hand, if a path is passed, lsfp would locate the file and read the theme from it. Summing up, to get a different theme for that print, you would do lsfp --theme <builtin_theme_name | path_to_theme_file>, and to make it persistent, a theme=<builtin_theme_name | path_to_theme_file> setting in your .lsfprc.
For the built-in themes, rather than hard-coding them, which could work, maybe we could distribute them as an additional zip file. This file would contain a bunch of theme files, which then the user would unzip for example in ~/.lsfp-themes directory, which lsfp would read if a named theme is passed to it, by finding the file whose name is the same as the passed. This would also allow users to define named custom named themes, just by creating the theme file in that directory. The main benefit of making a separate zip for it rather than hard-coding it is that the themes don't contribute to the binary size and people who are fine with the default styling don't have to worry about themes.
For the theme definition files, we can look at some already existing syntax and maybe simplify it, which would make it easier for anyone to use, or we could make an easy to parse custom syntax. Just came up with this:
--- javascript: The text after the first dash (can be more than one) does not matter, the parser will start to parse again after the newline
extensions=["js", "mjs"]
color=(0, 0, 0)
icon=e54f
- typescript: Users could use this header to write the file type or make some comments, nothing will get parsed!
extensions=["ts"]
color=(0, 0, 255)
icon=e55f
---------- <other_language>
...

The syntax would be based in a dash (-) to separate languages, and anything written after the dash until the newline would be ignored, that way leaving room for the user to type the language name or add some comments. Then, items would be a <key>=<value> pair, which we could borrow from the already existing config parser. For extensions, a classic square bracket array shouldn't be hard to parse I think, we could maybe even drop the quotes around the values for even more simplicity (another idea is dropping everything except the comma, which could also work or even be easier to parse). The color is a simple rgb set in the form (r, g, b), which shouldn't be something complicated to parse either. The icon (yet to introduce, #47) is two hexadecimal values, adding up to 4 characters, which would definitely be something easy to parse, is just taking the next 4 characters or maybe to the new line. This is only a concept, it may then be too complicated or even impossible to parse..
I will try to finish the icons now, and when I'm done with that I will try to look into this if you think it is a good idea, and as I go I will try to show you some snapshots of what the themes are looking like.

I have recently been working on this feature, now that icons has already been pushed. I was getting a bit confused with the many code that was around me, lifetimes and other aspects, and therefore I decided to work on the parser in a new repository. So I have concluded the basic aspects of the parser, being it fully functional, although there are some aspects left to polish. You can find the code at HipyCas/theme-parser. It would be great if you could take a look and give me your opinion! You can also try to play with the code and try to break it some way!

It looks good.
I'm thinking using # for comments makes more sense, as that's used in many languages and config files.

After much work on the parser, I have come with a highly satisfactory experience. I won't rewrite every explanation about the theme parser implementation here, instead got to the formal specification in HipyCas/theme-parser (you could also look at the README, but it is highly outdated, so I recommend the specification over the README. I encourage you to clone the repo and test the program, with different theme files (try to break it too!). If everything looks good to you, I'll copy the code to the mainstream codebase and make the necessary modifications to other lsfp related code.
For what I called named themes, which are basically just theme files that you can invoke by a name instead of a path, I decided to make them live in ~/.lsfp-themes/. This works by reading the files in the named folder, and matching the passed named theme with the file names, e.g. lsfp --theme noir will result in loading ~/.lsfp-themes/noir and lsfp --theme solarized.dark will result in loading ~/.lsfp-themes/solarized.dark. I took the whole file and decided not to strip any extension simply because I hadn't thought of any extension and there is currently (and I don't think there will ever be) any support for this theme file. What do you think of the idea?
I had to come up with some creative ideas for parsing the value out of the --theme option, but it is working. The only real problem I found was getting a value from .lsfprc, which as of now is only used for boolean values. I will do some work later on on that, but the fist version of themes will probably go out without support for configuration in .lsfprc.
I'm waiting for your opinion on the parser, and for the approval. Feel free to ask me about it and tell me any problems you may encounter with it.

Looks great!
I don't think there's any need for a file extension.


dbfv psi limitation issue

Hi,

Largest for n=8192: 512 parties, here, does it mean the code allow maximum 512 parties, and for each party's vector it has maximum 8192 elements?
And how to extend this limitation of 8192: 512 for size of parties and size of each party's data vector?
So could I increase LogN to increase 8192 limit for each party's data vector size?
And how could I increase the size of the parties? Such as 5,000 parties?
BR

@macknight Yes, it means that the ring degree is 8192 and that the maximum number of parties that the circuit can support with this parameterization is 512. Also, yes, the number of element per vector is 8192.
I'm sorry that I cannot answer your question about extending the number of parties or the size of the vectors, because it goes out of the scope of the example and is more related to FHE circuit design and parameterization.


Fix: Increase Vulkan detection timeout to 12 seconds

The previous timeout of 1 second for detecting the Vulkan GPU using vulkaninfo --summary was insufficient on some systems, leading to the command timing out and the inference falling back to the CPU. This commit increases the timeout to 12 seconds to accommodate systems where vulkaninfo takes longer to complete.
This change addresses an issue where the Vulkan backend would frequently fall back to CPU inference due to the vulkaninfo command timing out before it could return the necessary information to detect the GPU. The increased timeout ensures that the command has sufficient time to complete on a wider range of systems, enabling the Vulkan backend to correctly detect and utilize the GPU for inference.

Thanks for investigating and fixing this 😁


fix: Change Password dialog allowing new password to be the same as current #1203

Fixes #1203

Prevents change password dialog from allowing the new password from being the same as the current password

Before
After

A quick comment before I approve, the change looks good!
I can immediately do a third change to change my password back to the first password after changing it to a different second password. Is this OK?
If so then I will approve.

A quick comment before I approve, the change looks good!
I can immediately do a third change to change my password back to the first password after changing it to a different second password. Is this OK?
If so then I will approve.

Yes, that will work! It doesn't check with your actual current password, instead it only compares with what is in the field for Current Password, so changing a third time to your original password should work just fine.


WIP: Updates to Contributribution Guide

@tradej I did not replace all instances of booster because this term is still used heavily here: https://github.com/fabric8-launcher/launcher-booster-catalog.

Can one of the admins verify this patch?

ok to test

@amehenda @nchauda @inoxx03
Can you please provide a peer review and approve?

@huntley I don't think that's Nidhi's user name. You may be better off sending an e-mail.


SSL for Web UI

Is your feature request related to a problem? Please describe.
I'm trying to have the web UI displayed on HomeAssistant through an iFrame but I'm unable to load HTTP inside a HTTPS web server.
Describe the solution you'd like*
Would it be possible to support SSL? Maybe through the environment variables on docker file, we could specify the certificate and key and enable SSL on the same port.
Describe alternatives you've considered
Disabling HTTPS on HomeAssistant but that would make it very insecure during remote access.
Anything else?
No response

Hi @smarthome-enthusiast
Thank you for the feature request.
I can offer you the following:

The tls cert files have to be mounted as volume into the Container.
The location and names of the certs can be defiend via env variables.
Check https://github.com/bakito/adguardhome-sync/blob/tls-mode/README.md?plain=1#L176 and #329

This would be fantastic.

released with: https://github.com/bakito/adguardhome-sync/releases/tag/v0.6.9

Just  updated and it work. Thank you for the quick work and all the work you have done on this!


Fix return type of bulkCreate (CSV Upload)

Currently the return type as in the GraphQL schema is an Array of records. We changed this to be a background job that sends an email informing the user about success or (validation) errors.
Adjust the return type to String and send an informative message like
Bulk import of ${dataModel.name} records started. You will be send an email to ${user.email} informing you about success or errors.

Done. Commit: #70d5d5


Not able to get the Name/ClassName/AutomationId for Outlook--> Inbox when it has unread msgs

Hi all,
I am trying to do some automation on my outlook with Winappdriver.
But not able to get the Name/ClassName/AutomationId for outlook --> Inbox when it has mails.
My scenario requires to add "Inbox" to "fav list" of outlook. It is only possible when the inbox has no unread emails as then the element Inbox name is easy to catch up to but when it has unread emails then it's difficult to select inbox.
Can anyone please guide me, how can I get "Inbox" id on Outlook that is constant throughout.

Look into the GitHub repo linked below, I created a few examples with Outlook 2019 in this repo. I am looking for a folder name and it is easy to find. I'm also going through mail items in the list of messages.
https://github.com/naeemakram/Outlook2019AutomationWinAppDriver

Thanks alot @naeemakram . Your code solved my problem 👍

That's great, please note that here I'm teaching a Udemy course about UI test automation with WinAppDriver and C# and the course can be helpful for people looking forward to get started with automation.


Building for production guide error

I am following the guide: https://webpack.js.org/guides/production-build/
The
function buildConfig (env) {
  return require('./config/' + env + '.js')(env)
}

module.exports = buildConfig

Results in
/Users/maasha/install/src/rpncalc/webpack.config.js:2
  return require('./config/' + env + '.js')(env)
                                           ^

TypeError: require(...) is not a function
    at buildConfig (/Users/maasha/install/src/rpncalc/webpack.config.js:2:44)
    at requireConfig (/Users/maasha/install/src/rpncalc/node_modules/webpack/bin/convert-argv.js:102:15)
    at /Users/maasha/install/src/rpncalc/node_modules/webpack/bin/convert-argv.js:109:17
    at Array.forEach (native)
    at module.exports (/Users/maasha/install/src/rpncalc/node_modules/webpack/bin/convert-argv.js:107:15)
    at Object.<anonymous> (/Users/maasha/install/src/rpncalc/node_modules/webpack/bin/webpack.js:153:40)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)

Are you passing --env=dev and --env=prod? Can you log out the what's returned from require('./config/' + env + './js')? The guide is expecting this will resolve correctly will return a function in both cases.
That said, I think this guide needs some work and could probably be simplified a bit. For example, the env parameter is never used in dev.js or prod.js.

@bebraw @simon04 do we have example/boilerplate repos backing any of these guides? Maybe something we should try out or encourage going forward. This way people would have something to go off when things break down and we could point them to a working example when something goes wrong.
However keeping the guide and repo in sync may be tough as well, so I'm not sure this is necessarily the perfect answer either.

Ah, sorry, I have wiped the code since I couldn't get it to work. But would require('./config/' + env + './js') not cause the same err?

It shouldn't, I don't think if your repository is set up in the same way the guide instructs. Basically that should either resolve to whatever is exported from ./config/dev.js or ./config/prod.js. It looks like those weren't coming back at all, or weren't coming back with the right export. The error you saw was because whatever is returned by the require(...) wasn't a function, hence the require(...) is not a function.
That error isn't saying require isn't a function, it's saying whatever is returned by that require(...) statement isn't a function so it can't be called with (env). Does that make sense?

It vaguely makes sense :o). I think some boilerplate code would be awesome.
On Sat, Apr 15, 2017 at 6:58 PM, Greg Venech<EMAIL_ADDRESS>wrote:

It shouldn't, I don't think if your repository is set up in the same way
the guide instructs. Basically that should either resolve to whatever is
exported from ./config/dev.js or ./config/prod.js. It looks like those
weren't coming back at all, or weren't coming back with the right export.
The error you saw was because whatever is returned by the require(...)
wasn't a function, hence the require(...) is not a function.
That error isn't saying require isn't a function, it's saying whatever is
returned by that require(...) statement isn't a function so it can't be
called with (env). Does that make sense?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/webpack/webpack.js.org/issues/1100#issuecomment-294305285,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABGrqdwC9KIA2ppPC22qLEdFp_35PqyBks5rwPdMgaJpZM4M6Fhz
.

Yeah, I hear you. I'll leave this issue open as a stub for improving that guide either by simplifying it a bit or adding a boilerplate somewhere.

Cool, getting webpack to work with electron + react has given my headaches. Prowling the internet have left me with a feeling that the available docs, guides, and tutorials are causing lots of confusion (at least for me). Basically, one want to get started with webpack for development. That means starting with webpack-server-dev and not webpack on its own IMHO! Next you want to optimize for production I guess...

@bebraw @simon04 do we have example/boilerplate repos backing any of these guides? Maybe something we should try out or encourage going forward. This way people would have something to go off when things break down and we could point them to a working example when something goes wrong.

@skipjack No repos. Maintenance-wise it would be the best to generate the repos based on the tutorial code (or vice versa) but that's a harder problem. Otherwise you get a syncing issue (both need to be changed).


Error when code reloader enabled

Environment

Elixir / Hex version (mix hex.info):

$ mix hex.info
Hex:    0.14.1
Elixir: 1.3.3
OTP:    19.1

Built with: Elixir 1.3.4 and OTP <IP_ADDRESS>

Node / NPM version (node -v) (npm -v):

$ node -v
v6.9.1
$ npm -v
3.10.8

Operating system:

$ uname -a
Darwin Compe.local 16.1.0 Darwin Kernel Version 16.1.0: Thu Oct 13 21:26:57 PDT 2016; root:xnu-3789.21.3~60/RELEASE_X86_64 x86_64

Current behavior
When running a brand new Kitto dashboard installed from the 0.3.0 archive, opening the sample dashboard raises errors in the console:
16:10:40.726 [error] Ranch listener Kitto.Router.HTTP had connection process started with :cowboy_protocol:start_link/4 at #PID<0.1402.0> exit with reason: {{:noproc, {GenServer, :call, [nil, {:get, #Function<1.103310966/1 in Kitto.Notifier.cache/0>}, 5000]}}, {Kitto.Router, :call, [%Plug.Conn{adapter: {Plug.Adapters.Cowboy.Conn, :...}, assigns: %{}, before_send: [], body_params: %Plug.Conn.Unfetched{aspect: :body_params}, cookies: %Plug.Conn.Unfetched{aspect: :cookies}, halted: false, host: "localhost", method: "GET", owner: #PID<0.1402.0>, params: %Plug.Conn.Unfetched{aspect: :params}, path_info: ["events"], path_params: %{}, peer: {{127, 0, 0, 1}, 51690}, port: 4000, private: %{}, query_params: %Plug.Conn.Unfetched{aspect: :query_params}, query_string: "topics=text,random,buzzwords,random,convergence", remote_ip: {127, 0, 0, 1}, req_cookies: %Plug.Conn.Unfetched{aspect: :cookies}, req_headers: [{"host", "localhost:4000"}, {"connection", "keep-alive"}, {"accept", "text/event-stream"}, {"cache-control", "no-cache"}, {"user-agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.75 Safari/537.36"}, {"referer", "http://localhost:4000/dashboards/sample"}, {"accept-encoding", "gzip, deflate, sdch, br"}, {"accept-language", "en-US,en;q=0.8"}], request_path: "/events", resp_body: nil, resp_cookies: %{}, resp_headers: [{"cache-control", "max-age=0, private, must-revalidate"}], scheme: :http, script_name: [], secret_key_base: nil, state: :unset, status: nil}, []]}}

No data is rendered to the dashboard.
Workaround is to disable code reloading by appending the following code to config/config.exs:
config :kitto, reload_code?: false

I've been able to replicate the error from the master branch as well.
Expected behavior
I expect to not have errors in the console from a base install.

Unfortunately this seems specific to macOS and i cannot reproduce it in Linux.
Can you please try the following steps and provide feedback?

Set :reload_code? to false in config/config.exs
Start a shell using iex -S mix from within your generated dashboard app
Try starting :fs using the lines: https://github.com/kittoframework/kitto/blob/master/lib/kitto/code_reloader.ex#L20

Does fs start?
Is there any error printed?
If you set {:fs, "0.9.2", override: true} in your mix.exs and run mix deps.get does it still fail to start?

0.9.2 fails because the API is different. fs 0.9.2 doesn't have a start_link/1 method and only a subscribe/0 method.
Manually attempting to start the :fs process results in the following:
iex(1)> :fs.start_link(:default_fs)
** (EXIT from #PID<0.484.0>) an exception was raised:
    ** (UndefinedFunctionError) function :mad_repl.load_file/1 is undefined (module :mad_repl is not available)
        :mad_repl.load_file('deps/fs/priv/mac_listener')
        src/fs.erl:43: :fs.mad_file/1
        src/fs_sup.erl:27: :fs_sup.has_executable/1
        src/fs_sup.erl:17: :fs_sup.init/1
        (stdlib) supervisor.erl:294: :supervisor.init/1
        (stdlib) gen_server.erl:328: :gen_server.init_it/6
        (stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3

Found the solution... https://github.com/synrc/fs/issues/33. Will open a PR shortly

Upgrade to 2.12.0 works on my Mac.


CS Script Tools Extension is disabled. No compatible CS-Script version found (min v<IP_ADDRESS>)

Hello, I'm using CS Script Tools Extension for Visual Studio 2017-2019. I need CS-Script for .NET framework 4.5 so I installed cs-script v.<IP_ADDRESS> by using Configuration console. It was working until I launched Visual Studio updates (now I have Visual Studio 2019 with .NET framework 4.8.04084) After this in CS Script Tools Extension appears a message: "CS Script Tools Extension is disabled. No compatible CS-Script version found (min v<IP_ADDRESS>)". I tried to reinstall cs-script or CS Script Tools Extension or even Visual Studio but still I have the same message. I tried different ways of installation:
with using Chocolatey or with Configuration Console. I also tried with clear OS, so I created a virtual machine and I installed Visual Studio 2019 (.NET framework 4.8.04084), CS Script Tools Extension, and CS-Script. In the virtual machine is working. But I can't fix the problem on the host PC. Can you help me ?

I solved the problem, the wrong "Engine Script Path" was the cause. I figured out that the path is stored in the CSSCRIPT_DIR variable in Windows Environment Variables. I changed it to the correct one and it started working.

Great, glad you managed to solve it.


Feature random initiative

Hi!
Thanks for the tool you created, I was using dm.tools and struggled with player/creature conditions & lack of other features that I found in your project.
I added 2 tiny improvements:

D20 button near the initiative input, to randomize a value (tried to follow your UI)
Randomized initiative for creatures when initiative is present and multiplier is applied (e.g. For 3 Goblins, when initiative is typed/rolled 11, other 2 goblins will have generated initiative.)

Those 2 improvements are useful for me, it's completely alright if you don't want to implement them.
Happy Holidays!

Hi @vforvasile !
First of all, thank you very much for taking the time to put together these PRs (I've seen https://github.com/Paul-Ladyman/dnd-battle-tracker/pull/505 as well). I've only had one other PR in the last few years so I really appreciate it.
D20 Button
This is cool and preempts a dice rolling feature I was intending on working on (https://github.com/Paul-Ladyman/dnd-battle-tracker/issues/436). I think this would be a nice solution in the interim to help you and I'm sure others out in your sessions.
Random initiative for multiplied creatures
This is also cool.
I'd like to keep the ability to have a single initiative score for all the creatures in the group. This is how the PHB suggests things should be done, "The DM makes one roll for an entire group of identical creatures, so each member of the group acts at the same time" (p189).
I've already thought a little how I'd combine this with a random initiative roll and I'm still not sure. Perhaps if the user clicks the D20 button, we roll a separate initiative for each creature in the group, where as if a value is typed in we use that same value for each creature. What do you think?
Merging
There's some tests failing in the status checks and there may be some other problems to look at too.
It's totally up to you how much time you want to put into these PRs, I know tests aren't everyone's thing particularly for a hobby project! If you want you could treat them more as feature suggestions and I'll work on them when I find some time.
I'll also do some reviewing and testing when I find the time so it may take me a little while but I'm well up for PRs from other DMs so I will get to it and thanks again!

I've already thought a little how I'd combine this with a random initiative roll and I'm still not sure. Perhaps if the user clicks the D20 button, we roll a separate initiative for each creature in the group, where as if a value is typed in we use that same value for each creature. What do you think?

Maybe add a toggle, when multiplier value is bigger than 1, sync inititiative/same initiative dunno.

D20 Button

This is cool and preempts a dice rolling feature I was intending on working on (https://github.com/Paul-Ladyman/dnd-battle-tracker/issues/436). I think this would be a nice solution in the interim to help you and I'm sure others out in your sessions.
About the D20 button, I was thinking to combine DEX modifier for the creatures (from the other PR) and add it to the roll on click, however there's no TS is in the project and it's easy to mess things up

There's a lot of cool stuff in that video! Very exciting!
One thought, how are things looking on mobile screen sizes? There's a lot of new information to cram in there.
I'd like to work towards getting these new features merged and deployed. Ideally it would be good if we could break them up into small chunks so I can review and test them more easily. Basically the smaller the PR you can give me the better!
Is this PR and https://github.com/Paul-Ladyman/dnd-battle-tracker/pull/505 still valid after the new work you did, should I start with those?

Here's a peak on mobile:
https://user-images.githubusercontent.com/9382283/211139508-b86a42ca-5c4e-4a6e-b28e-92852b2936fb.mp4
I have to think on how to split them and how to fix some tests (this is on my master branch after merging all the features)

Oh yeah mobile actually looks fine from that video! Anyway as long as it's not completely broken I don't mind merging and then following up with improvements.
Also I spotted the creature name links you mentioned you'd added in https://github.com/Paul-Ladyman/dnd-battle-tracker/issues/435#issuecomment-1373831960, brilliant!
Take your time figuring out how best to split everything up. I can help out dealing with the tests once the branches are ready. I've been trying to increase my test coverage lately, especially for the UI, so if you felt like adding some for the new features that's great (with a preference for integration tests). But if manual testing looks good I'll probably merge anyway and then add some automated tests on the main branch.
Thanks again for all this work, so many great new features! Looking forward to releasing them for everyone to enjoy.

I fixed the tests on this branch. The tests for adding multiple creatures were failing because they expected both new creatures to use the same initiative, whereas the second one now uses a random initiative. I mocked out rollDice to give a consistent value for the random number. A similar approach could be used for the "random init" toggle.
Would it be useful for me to merge this branch or do you want to go from your other branch(es) where you've developed things further?

I'm going to merge and deploy this branch so people can start using your awesome new feature! I've removed the random initiative for multiplied creatures for now as we'll be adding the toggle button to activate this functionality later.
Thanks again for this!

Sorry, I've been very busy last week, I'll see what I can do about the next PRs in the following days

No problem at all Vasile just take your time and we'll deploy things when they're ready.


Remove django guardian from querysets

We set these permissions when we save a project or a version
https://github.com/rtfd/readthedocs.org/blob/1ee57dec16f352d14ca17c1bcd8877a9a88a8f0a/readthedocs/projects/models.py#L424-L425
https://github.com/rtfd/readthedocs.org/blob/1ee57dec16f352d14ca17c1bcd8877a9a88a8f0a/readthedocs/builds/models.py#L249-L250
We set them to all the owners of a project,
we already know all projects of an user with user.projects.
For now I'm just removing guardian from the querysets,
in another PR I'm going to remove the dep of guardian
This also removes the use of distinct (this generates problems when trying to do another or |)

self.all() - This doesn't look like it's going to return duplicated results
self.filter() - this is filtering for selected pk's only, I don't think we can have duplicated results neither

I triggered a couple of builds locally, nothing broken so far

Got a duplicated :/

Wasn't able to remove the distinct call, but I have other ideas, but in another PR after this.

I didn't see so much changes in the number of queries, actually the number of queries got reduced in the project dashboard page

There's also this, but I think it is the same as the project save:
https://github.com/rtfd/readthedocs.org/blob/master/readthedocs/projects/forms.py#L487-L489

Yeah, it's the same, it adds another user to the project-user relationship

Let's not break the internet :crossed_fingers:

Tested this with external and internal versions and its working as expected now. Thanks :)


Update Stats page to allow easy download of graphs

Resolves #1265
Adds a button to allow easy downloads of graphs on the stats page

Works as expected!
The download button is huge, and most visitors will not want to download anything. What do you think about adding a more subtle icon? We already have an icon package installed (font awesome). Here are some options: https://fontawesome.com/search?q=download&o=r&m=free. I was thinking maybe it would fit in the legend or next to the title (see below)?
A few other general points about the plot (not related to downloading). @sambaxter do you have feedback?

Normally people expect graphs to have titles. Perhaps something like "Sample size across major ExAC/gnomAD releases"
Would be cool if the year of each was release was included below the release title to emphasize the long history of the project (2014, 2016, 2019, 2023)
There is no Y axis label... should it be "Number of samples"?
There is a point where the text overlaps:

Could set the minimum width of this plot to be larger?

Thanks for the feedback, the button is pretty huge and imposing. I'll make it more subtle and incorporate your other suggestions.

Updated with:

Smaller download button with icon (next to title)
Added prop for title so all bar graphs have a title

id of element and download are now generated by slugifying the title of the graph

Cleaning up: defined y axis for graphs, used same small download icon on tables, added titles to all graphs


cocotb fails to initialize in 32-bit Aldec since #629

I'm getting this error message when running any cocotb testbench in the following environment:

32-bit Riviera-PRO 2<IP_ADDRESS>35
32-bit Python 3.6.5
VHDL/VHPI interface
Running on 64-bit CentOS (we're using the 32-bit simulator for licensing reasons)

This happens since this commit in #629. @eric-wieser, you mentioned that you found more issues related to #629, do you expect that those will eventually fix this problem as well?

Not sure they could, they would introduce the problem in more places.

I know the cause here.
To summarize #629 - I changed Py_BuildValue("l", hdl); to PyLong_FromVoidPtr.This has the following effect:

C void* value
platform
old python value
new python value

0x01234567_01234567
Windows 64-bit
0x01234567 (bad bug)
0x01234567_01234567

0x01234567_01234567
Other 64-bit
0x01234567_01234567
0x01234567_01234567

0x01234567
32-bit
0x01234567
0x01234567

0x80000000
32-bit
-0x80000000
0x80000000

This last row is causing your problem, as elsewhere the python integer is loaded with Py_ParseTupleArgs("l"), where l is a signed long. 0x80000000 doesn't fit in a signed long, so this fails.
The  fix here is to replace all these formats with "O", and then call PyLong_FromVoidPtr on the result.
Changing the format strings to L would s

Another fix would be:
int VoidPtrConverter(PyObject* o, void** data) {
   void *p = PyLong_AsVoidPtr(o);
   if (p == -1 && PyErr_Occurred()) {
       return 1;
   }
   *data = p;
   return 0;
}

PyArg_ParseTuple("O&", VoidPtrConverter, &hdl)

Awesome, I can work with that. I'll try it out tomorrow and submit a PR when I get it to work again.