assertion failure does not print sufficient information to debug

I also enabled debug printing with:
--debug ModuleName --debug_level Extreme
and scanned that output but could not find any information on example values that would cause the assertion to fail.
Am I missing an easy way to get this information out of the engine? Or is it that the engine is reasoning at a level where this information is not easy for it to produce?
Here's the code that is causing the assertion failure:
module Primes

val isNotDivisor: n:nat -> d:pos -> r:nat -> Tot bool (decreases r)
let rec isNotDivisor n d runs =
  match runs with
  | 0 -> true
  | _ -> d * d > n || (n % d <> 0 && isNotDivisor n (d + 1) (runs - 1))

val isPrime: x:pos -> Tot bool
let isPrime n = n <> 1 && isNotDivisor n 2 (n / 2)

type prime = x:pos{isPrime x}

let a = assert(forall (p:prime) (n:pos{n > 1 && n < p}). p <= 2 || isNotDivisor p n 1)

Also, any advice on debugging assertion failures generally would be appreciated (as well as any specific insight re: the particular failure above).

There is not much you can debug. This is a case where the engine is reasoning at a level where this information is not easy for it to produce. The formula inside the assertion is sent as a whole to Z3, which fails to prove (or disprove) it. This shouldn't be too surprising, because a proof requires to reason by induction.
If it is of any help, here's a proof of the assertion you wanted to prove, using the more idiomatic Lemma notation:
val fact_1: n:nat -> d:pos -> Lemma (isNotDivisor n d 1 <==> (d * d > n) \/ (n % d <> 0))
let fact_1 n d = ()

val fact_2: n:nat -> d:pos -> r:nat -> a:nat{ d <= a /\ a < d + r } -> Lemma
  (requires isNotDivisor n d r)
  (ensures  (a * a > n \/ n % a <> 0))
  (decreases r)
let rec fact_2 n d r a =
  if r = 0 || d = a then ()
  else fact_2 n (d + 1) (r - 1) a

val conclusion: p:prime -> n:pos{n > 1 /\ n < p} ->
  Lemma (p <= 2 \/ isNotDivisor p n 1)
let conclusion p n =
  if p <= 2 then ()
  else if n < 2 + (p / 2) then (fact_2 p 2 (p / 2) n; fact_1 p n)
  else ()

At the moment, there is little support for debugging typing errors. You may try the --detail_errors and --split_cases command-line options in the master branch, but I haven't had any luck using them. Instead, what I do is to insert admit() and intermediate assertions at strategic points to reduce the scope and detect the part of the verification condition that is failing. Another handy trick is using ~> in place of ->  in pattern matching branches to focus on one branch at a time. This has effectively the same effect as admitting every branch but the ones using ~>.

Thanks for that although I don't think it is fair to call that code "more idiomatic". Per the tutorial (and common sense), the decision to use refinement types on the functions, assertions or lemmas is "subjective" and a matter of personal style.
And, in my opinion, the code I tried to write is much prettier and to the point. It would be really great to find a way to make it work. It appears like maybe the engine just needs more hints/facts (so I'll try capturing a few more of your specs [in hopefully tighter syntax]).

I think you are missing the point about the "more idiomatic" remark.
As Santiago stressed out, the assertion you are trying to verify requires a proof the solver cannot completely infer. There is no "magic" involved here. If the solver cannot do it alone, you need to provide additional lemmas to help it, whatever the style you are using may be.
In your case, if you add a pattern to Santiago's lemma:
val conclusion: p:prime -> n:pos{n > 1 /\ n < p} ->
  Lemma (requires (True))
	(ensures (p <= 2 \/ isNotDivisor p n 1))
	[SMTPat (isNotDivisor p n 1)]
let conclusion p n =
  if p <= 2 then ()
  else if n < 2 + (p / 2) then (fact_2 p 2 (p / 2) n; fact_1 p n)
  else ()

let a = assert(forall (p:prime) (n:pos{n > 1 && n < p}). p <= 2 || isNotDivisor p n 1)

Then your assertion works like a charm because the solver has all the hints it requires. The thing is that using lemmas in that fashion, and associating them to patterns for quantifiers, is a robust way to help the solver instantiate quantifiers properly.

Thanks Jean-Karim. That's a nice example of using patterns, which I completely forgot.
@johanatan: If you want tighter syntax, here is a concise (but arguably less readable) proof that doesn't use Lemma:
let conclusion (p:prime) (n:_{1 < n /\ n < p}): Tot (u:_{p <= 2 \/ isNotDivisor p n 1}) =
  let rec f n d r (a:int{isNotDivisor n d r /\ d <= a /\ a < d + r}):
    Tot (u:_{a * a > n \/ n % a <> 0}) (decreases r) =
    if d = a then () else f n (d + 1) (r - 1) a
  in if n < p/2 then f p 2 (p/2) n else _

The first argument of f could be omitted if #533 was fixed.
Another remark: in your original code, a doesn't carry any computational or logical meaning. So, once the assertion is proven, there is no way you can later use what was proven.

@jkzinzindohoue As I mentioned before, it was the assertion that Lemmas are "more idiomatic" than refinement types directly on the functions that I took issue with (and that view is supported by the tutorial itself). SMTPat is neat--I'll have to look into that some more.
@s-zanella Thanks! That is better to my eyes at least. Just a couple of questions though-- is the type of u Unit? Does the _ represent unit in that case or just whatever type needs to be inferred there (i.e., generic)? Or something else?

Both us are inferred to have type unit. The notation _ asks F* to infer a type.
You can see inferred types with --log_types

Ahh, that's what I figured. Is there any reason these two return Tot instead of GTot? There doesn't seem to be any computation at the value-level going on in there. And, if not, I'm not completely opposed to benefiting from Lemma's 'sugar' where Lemmas can't be avoided-- was more just a desire to avoid the Lemmas in the first place (but at least we have gotten rid of fact_1 and fact_2). :)

No reason to use Tot, using GTot is actually better.
You can get rid of fact_1, but not the induction in fact_2. It is hidden in the local let rec in the second proof.

Yea, I understand that the essence of fact_2 was nested inside conclusion but I meant that the actual top-level val fact_2 is eliminated. 😉
Thanks again for all your help!

Good to know we're on the same page.
Thanks for bringing up the question!

P.S. It seems that your code isn't compiling.
/Users/jonathan/Documents/SourceCode/fstar-examples/primes.fst(22,50-22,92) : Error
Kinds "Effect" and "Type" are incompatible

[Line 22 is the first line and column 50 is the beginning of the first Tot]. I tried changing both Tots to GTot as well to no avail.

You're likely missing the --universes flag.

Hmm, adding that flag caused a lot of other stuff to break earlier in the file.
Copied from FStar.Constructive (as my build isn't currently able to import things directly)
type cexists (#a:Type) (p:a -> Type) : Type =
  | ExIntro : x:a -> h:p x -> cexists p

type divides (a:pos) (b:pos) = (cexists (fun (c:pos) -> (a*c) == b))  // Error: Expected expression of type "Type"; got expression "a" of type "Prims.pos"

val isNotDivisor: n:nat -> d:pos -> r:nat -> Tot bool (decreases r)
let rec isNotDivisor n d runs =
  match runs with
  | 0 -> true
  | _ -> d * d > n || (notDivides n d && isNotDivisor n (d + 1) (runs - 1)) // Error: Expected expression of type "Type"; got expression "d" of type "Prims.pos"

A consequence of --universes is that the type constructor * and the multiplication operator cannot be disambiguated by the kind. Try with let op_Star = op_Multiply

That seems to have helped but there are still issues:
Jonathans-MacBook-Pro:fstar-examples jonathan$ fstar.exe --universes primes.fst
/Users/jonathan/Documents/SourceCode/fstar-examples/primes.fst(15,9-15,10) : Error
Expected expression of type "Type";
got expression "d" of type "Prims.pos"
Jonathans-MacBook-Pro:fstar-examples jonathan$ fstar.exe --universes primes.fst
/Users/jonathan/Documents/SourceCode/fstar-examples/primes.fst(25,2-30,3) (Warning): Non-top-level recursive functions are not yet fully encoded to the SMT solver; you may not be able to prove some facts
/Users/jonathan/Documents/SourceCode/fstar-examples/primes.fst(25,2-30,3) (Warning): Non-top-level recursive functions are not yet fully encoded to the SMT solver; you may not be able to prove some facts
/Users/jonathan/Documents/SourceCode/fstar-examples/primes.fst(28,23-30,3): Subtyping check failed; expected type (?17125 p n f); got type (u#3162:Prims.unit{(Prims.l_or (Prims.b2t (Prims.op_GreaterThan (Primes.op_Star n n) p)) (Prims.b2t (Prims.op_disEquality (Prims.op_Modulus p n) 0)))})
Error: 1 errors were reported (see above)

Here's the entire file:
module Primes

let op_Star = op_Multiply

type cexists (#a:Type) (p:a -> Type) : Type =
  | ExIntro : x:a -> h:p x -> cexists p

type divides (a:pos) (b:pos) = (cexists (fun (c:pos) -> (a*c) == b))

val notDivides: n:nat -> d:pos -> Tot bool
let notDivides n d = n % d <> 0

val isNotDivisor: n:nat -> d:pos -> r:nat -> Tot bool (decreases r)
let rec isNotDivisor n d runs =
  match runs with
  | 0 -> true
  | _ -> d * d > n || (notDivides n d && isNotDivisor n (d + 1) (runs - 1))

val isPrime: x:pos -> Tot bool
let isPrime n = n <> 1 && isNotDivisor n 2 (n / 2)

type prime = x:pos{isPrime x}

let conclusion_0 (p:prime) (n:_{1 < n /\ n < p}): Tot (u:_{p <= 2 \/ isNotDivisor p n 1}) =
  let rec f n d r (a:int{isNotDivisor n d r /\ d <= a /\ a < d + r}):
      Tot (u:_{a * a > n \/ n % a <> 0}) (decreases r) =
    if d <> a then f n (d + 1) (r - 1) a
    in if n < p/2 then f p 2 (p/2) n

val fact_1: n:pos -> d:pos -> Lemma (isNotDivisor n d 1 <==> d * d > n \/ notDivides n d)
let fact_1 n d = ()

val fact_2: n:nat -> d:pos -> r:nat -> a:nat{ d <= a /\ a < d + r } -> Lemma
  (requires isNotDivisor n d r)
  (ensures  (a * a > n \/ notDivides n a))
  (decreases r)
let rec fact_2 n d r a =
  if r = 0 || d = a then ()
  else fact_2 n (d + 1) (r - 1) a

val conclusion: p:prime -> n:pos{n > 1 /\ n < p} -> Lemma (p <= 2 \/ isNotDivisor p n 1)
let conclusion p n =
  if p <= 2 then ()
  else if n < 2 + (p / 2) then (fact_2 p 2 (p / 2) n; fact_1 p n)
  else ()

val gcd: a:nat -> b:nat -> Tot nat (decreases %[b;a])
let rec gcd a b =
  match b with
  | 0 -> a
  | _ -> gcd b (a % b)

val coprime: a:nat -> b:nat -> Tot bool
let coprime a b = gcd a b = 1

val fact_4: a:nat -> b:nat -> Lemma(coprime a b <==> gcd a b = 1)
let fact_4 a b = ()

//val abs: x:int -> Tot (y:int{ ((x >= 0) ==> (y = x)) /\ ((x < 0) ==> y = -x) })
//let abs x =
//  if x >= 0 then x
//  else -x

//val fact_5: a:pos -> b:pos -> Lemma(coprime a b <==> isPrime (abs (a - b)))
//let fact_5 a b = ()

It works for me with Z3 4.4.1.
The proof of conclusion_0 may be too demanding for your setup. You can try increasing --z3timeout.

Ahh, yep. That worked!

/Users/jonathan/Documents/SourceCode/fstar-examples/primes.fst(25,2-30,3) (Warning): Non-top-level recursive functions are not yet fully encoded to the SMT solver; you may not be able to prove some facts

Great!
That means that when typechecking conclusion_0, Z3 doesn't see the definition of f. But that's fine because the rest of the proof doesn't rely on the definition, just on the type signature.

So, the following variation type checks much faster (only a few seconds) and doesn't require the --z3timeout flag:
let conclusion_0 (p:prime) (n:_{1 < n /\ n < p}): Lemma (p <= 2 \/ isNotDivisor p n 1) =
  let rec f n d r (a:int{isNotDivisor n d r /\ d <= a /\ a < d + r}):
      Lemma (ensures (a * a > n \/ n % a <> 0)) (decreases r) =
    if d <> a then f n (d + 1) (r - 1) a
    in if n < p / 2 then f p 2 (p / 2) n

whereas this one takes a couple of minutes with --z3timeout set to 600:
let conclusion_0 (p:prime) (n:_{1 < n /\ n < p}): Lemma (p <= 2 \/ isNotDivisor p n 1) =
  let rec f n d r (a:int{isNotDivisor n d r /\ d <= a /\ a < d + r}):
      GTot (u:_{a * a > n \/ n % a <> 0}) (decreases r) =
    if d <> a then f n (d + 1) (r - 1) a
    in if n < p / 2 then f p 2 (p / 2) n

Is this a known performance bug? Doesn't Lemma de-sugar into exactly that same code?

I don't observe much difference between the two. For me, the latter takes slightly more time to typecheck, but the difference is at most a couple of seconds.
My understanding is that Lemma should de-sugar to the same code you wrote, except that _ would become unit. Replacing _ by unit does seem to speed up typechecking.


Replacing Arg(dict) with marshmallow?

In webargs < 0.16, I have arguments defined as Arg(dict, ...). How do I convert these to marshmallow fields? The changelog shows examples with strings and nested arguments, but I couldn't find an example with dict.

You can use a custom Dict field:
import collections

class Dict(Field):
    default_error_messages = {
        'invalid': 'Not a valid dict.'
    }

    def _deserialize(self, value, attr, data):
        if isinstance(value, collections.Mapping):
            return value
        else:
            self.fail('invalid')

A Dict field will be added to marshmallow in https://github.com/marshmallow-code/marshmallow/pull/286 . Until that is released, the code above should meet your use case.

Dict field is in marshmallow 2.1.0, which is on the PyPI.

I am trying to pass in a complex criterion dict in the querystring as shown below:
/companies?where={'revenue': {'$in': ['$100-$200']}}
The controller definition:
@use_args({
  'where': fields.Dict()
})
def get_companies(args):
   args['where']
   return '', httplib.OK

It seems the where arg is not parsed as a dict, but an unicode, when marshamallow tests it again the collections.Mapping it failed.
Am I missing anything to make it as a dict in the preprocess?
Thanks!!

@stranbird That is the expected behavior; fields.Dict does not expect to receive strings as input, and webargs does not do any special preprocessing. One solution is to create a custom field:
class JSONDict(fields.Dict):

    def _deserialize(self, value):
        if isinstance(value, str):
            value = json.loads(value)
        super()._deserialize(value)

@use_args({
  'where': JSONDict()
})

@sloria neat solution, ty!


Chapter 1.

Chapter 2 here is just a clone of chapter 1 for now.

@abarth would you like to take a glance at the main.dart here and see if there's any obvious mistakes?

next step: try to cache the paragraphs, try to cache the pictures so that only the hands repaint, show how this requires refactoring that becomes intractable.
factor out the layout, making a grid layout, a stack layout.


PR: Add the capability to change the value of TFSOIL in the HELP model

The changes to support this option in the API have already been made in PR #5.
TFSOIL in the HELP model is the average air temperature, in Fahrenheit degrees, below which the soil is assumed to be freezing.
DFS is a constant for a particular set of climatic data that represents the number of days in which the soil is to remain frozen after the daily mean air temperature first rises above freezing.
Prediction of frozen soil conditions in HELP3:
Freezing
In the HELP model, the soil is assumed to enter frozen state when the average temperature of the previous 30 days first drops below 32 °F. During the time in which the soil is considered to be frozen, the infiltration capacity of the soil is reduced by increasing the calculated runoff. This is done by increasing the curve number.

If the CNII for unfrozen soil is less than or equal to 80, the CNII for frozen soil conditions is set at 95.
When the unfrozen soil CNII is greater than 80, the CNII is reset to be 98 on days when the program has determined the soil to be frozen.

In addition, other processes are affected such as soil evaporation, vertical drainage in the evaporative zone and groundmelt of snow.
Thawing
The point in which the soil is no longer considered to be frozen is determined by calculating the length of time required to thaw frozen soil; that is, the number of days in which the soil is to remain frozen after the daily mean air temperature first rises above freezing. The thaw period in days, DFS, is a constant for a particular set of climatic data. The thaw period increases with latitude and decreases with solar radiation in the winter at the site and is determined using some empirical relations in HELP.
A counter in the program keeps track of the number of days of below freezing (one is subtracted for each day down to a minimum of zero) or above freezing temperatures (one is added for each day up until a maximum of DFS is reached, at which point the soil becomes unfrozen) since the soil became frozen. When the soil freezes for the first time during the season, the counter is set to 0. When a thaw is completed, the counter is reset to (DFS + 2)/3, but not less than 3 unless greater than DFS. When the counter returns to 0, the soil is refrozen if the average temperature of the previous thirty days is below freezing. As such, the value of the counter also limits the occurrence of a refreeze after a thaw (i.e. the soil is prevented from refreezing immediately following a thaw when the previous 30-day average temperature may not yet have increased to above freezing) (Dozier, 1992).

@pep8speaks suggest diff

@pep8speaks Resume now

@pep8speaks Resume now


Testing of the second half of the "Service" Folder (Backend)

User story

As a business partner
I want that the service folder is tested
So that the different services are doing what they are supposed to do

Acceptance criteria

Services of Product are tested
Services of ProjectUser are tested
Services of User are tested

Definition of done

Approved by product owner
minimum 85% test coverage
No syntax or runtime errors emerged
Code has been peer reviewed and approved
Tests have been written (e.g. Unit test, integration test etc..)

TODOs: refactor following service tests (important ones)

[ ] ProjectServiceTest
[ ] ProductServiceTest
[ ] ProductRatingServiceTest
[ ] ProductAreaServiceTest
[ ] RatingServiceTest

TODOs: refactor following service tests (not as important)

[ ] ProjectUserServiceTest

Not part of refactoring because api not finalised

UserService


Replacing GENIEXSecExtract::ChainWrapper with PlotUtils::ChainWrapper

There exist 2 separate versions of the ChainWrapper class, one in GENIEXSecExtract and one in PlotUtils.
This commit replaces instances of the GENIEXSecExtract with the preferred PlotUtils version.

LGTM 👍


Ch07 fiddling

This change was just for grabbing some screen shots of things along the way for inclusion in the chapter.

Mischief managed


Reorganize PSF engagement records

Putting the PSF engagement more in-line structurally with the other engagements. cc @scovetta

LGTM, thanks @sethmlarson!


Monitor is alerting labelling excluded Service Limits from TrustedAdvisor as Warnings

@aws-limit-monitor
Limit Monitor Documentation
AccountId
XXXXXXXXXXXXXX
Status
:warning:
TimeStamp
2020-01-21T20:00:15Z
Region
us-east-1
Service
RDS
LimitName
Max auths per security group
CurrentUsage
20
LimitAmount
20

It seems that even though the service limit has been excluded from the TA service limit check, the alert is still being sent as a warning. As you may know. RDS's "Max auths per security group" is a hard limit

Can you please confirm you removed 'dBkuNCvqn5' from RDS service limit checks here:
https://github.com/awslabs/aws-limit-monitor/blob/1f365564eae725aeac994bbbd5b2895d76c30332/source/services/tarefresh/lib/ta-refresh.js#L66
Once you update this list, the solution shouldn't be refreshing this particular check. However, if you visit TA Console or refresh TA checks through any other mechanism outside the solution, it might still refresh that check and send you the alert. You can also enable debug mode on the solution to see if that particular check is being refreshed by the solution or not. Turn LOG_LEVEL to DEBUG
https://github.com/awslabs/aws-limit-monitor/blob/1f365564eae725aeac994bbbd5b2895d76c30332/deployment/limit-monitor-spoke.template#L165
Reference here


Classes set on  component in layout are sometimes lost

My default.vue layout currently looks something like this:
<template>
  <main-menu />
  <nuxt class="view" />
</template>

At first, the .view class gets set on whatever page component is rendered in the <nuxt /> container, but when I start changing routes through <nuxt-link> tags, this class gets subsequently lost.
This doesn't happen when working with vue-router directly, from which I am currently porting a project to Nuxt.js, so it looks like a Nuxt.js bug to me.

@lehni You have to set this class on some patent component.

But isn't this a bug? Why does the class get lost?

Because <nuxt/> does not correspond completly to <router-view>, see https://github.com/nuxt/nuxt.js/blob/dev/lib/app/components/nuxt.vue

It looks like it could rather easily pass class through to the <nuxt-child> instance? Happy to create a PR if it's of interest.

You can add a PR @lehni but it should work with style too (see https://github.com/nuxt/nuxt.js/blob/dev/lib/app/components/nuxt.vue)

I believe this should hold the solution to both problems:
https://github.com/vuejs/vue/commit/6118759
From the release notes of v2.4.0:

Easier creation of wrapper components:

New component option: inheritAttrs. Turns off the default behavior where parent scope non-prop bindings are automatically inherited on component root as attributes.
New instance properties: $attrs & $listeners. $attrs contains the parent-scope attribute bindings that were not recognized as props, and $listeners contains the v-on listeners registered in the parent scope (without the .native modifier). These are essentially aliases of $vnode.data.attrs and $vnode.data.on, but are reactive.

Combining these allows us to simplify a component like this down into this:
<div>
  <input v-bind="$attrs" v-on="$listeners">
</div>

Based on discussion in https://github.com/vuejs/vue/issues/5983.

Unfortunately this works for everything except class and style, and there is already a closed issue about that, see https://github.com/vuejs/vue/issues/6144#issuecomment-316543936

Without this, I don't see a clean way that this can be done. And I'm fine with the status quo.


[BUG]: The stride of an ndarray can be wrong for numpy views

Problem description
Numpy allows a new view of an array with the same data, which can cause a reinterpretation of the bytes in memory.
In particular, an array with 2N real values per row can be reinterpreted as an array with N complex values per row.
[This is useful for FFTs of real data, as the result is complex-valued, and since the Fourier transform is reversible, there is not more "data content" in the output than in the input.  So, numpy's views do the right thing.]
The issue arises when the stride from one row to the next is an odd number of real-valued elements.   Numpy measures strides in bytes, so a view does not change the stride and it just works.   In nanobind, strides are measured in units of  itemsize, so an nb::ndarray cannot correctly represent a stride that is not an integral multiple of the size of the dtype.
Reproducible example code
C++

    m.def("inspect", [](const nb::ndarray<nb::ro>& a) {
            printf("Array on nb::device::%s%s (id %u) at address %p\n",
                   (a.device_type() == nb::device::cpu::value)  ? "cpu"  : "",
                   (a.device_type() == nb::device::cuda::value) ? "cuda" : "",
                   a.device_id(), a.data());
            printf("    dtype : %s%s%s%s   itemsize : %2zu\n",
                   (a.dtype() == nb::dtype<float>())    ? "float32" : "",
                   (a.dtype() == nb::dtype<double>())   ? "float64" : "",
                   (a.dtype() == nb::dtype<std::complex<float>>())
                                             ? "complex<float32>" : "",
                   (a.dtype() == nb::dtype<std::complex<double>>())
                                             ? "complex<float64>" : "",
                   a.itemsize());
            printf("    ndim : %zu\n", a.ndim());
            for (size_t i = 0; i < a.ndim(); ++i) {
                printf("    shape(%zu) : %2zu    stride(%zu) : %2zd\n",
                              i,  a.shape(i),       i,  a.stride(i));
            }
        });

Python (interactive session):
>>> a = np.array([[1, 2, 3, 4, 5, 6, np.NAN],
...               [8, 0, 0, 0, 0, 0, np.NAN]], dtype=np.float32)
>>> a
array([[ 1.,  2.,  3.,  4.,  5.,  6., nan],
       [ 8.,  0.,  0.,  0.,  0.,  0., nan]], dtype=float32)
>>> m.inspect(a)
Array on nb::device::cpu (id 0) at address 0x1a5ddb0
    dtype : float32   itemsize :  4
    ndim : 2
    shape(0) :  2    stride(0) :  7
    shape(1) :  7    stride(1) :  1
>>> a.strides
(28, 4)
>>>
>>> s = a[:, 0:6]  # slice
>>> s
array([[1., 2., 3., 4., 5., 6.],
       [8., 0., 0., 0., 0., 0.]], dtype=float32)
>>> m.inspect(s)
Array on nb::device::cpu (id 0) at address 0x1a5ddb0
    dtype : float32   itemsize :  4
    ndim : 2
    shape(0) :  2    stride(0) :  7
    shape(1) :  6    stride(1) :  1
>>> s.strides
(28, 4)
>>>
>>> v = s.view(np.complex64)
>>> v
array([[1.+2.j, 3.+4.j, 5.+6.j],
       [8.+0.j, 0.+0.j, 0.+0.j]], dtype=complex64)
>>> m.inspect(v)
Array on nb::device::cpu (id 0) at address 0x1a5ddb0
    dtype : complex<float32>   itemsize :  8
    ndim : 2
    shape(0) :  2    stride(0) :  3
    shape(1) :  3    stride(1) :  1
>>> v.strides
(28, 8)

I'd like to suggest that nb::ndarray store strides with finer granularity.   Two ideas immediately come to mind:

Define strides to be measured in terms of bytes.

Pro: This matches NumPy.
Pro: This is the most general and may support future (unknown) use cases.
Con: Any extensions using nb::ndarray strides would have to change to the new convention.

Define strides to be measured in terms of sizeof(T) for nb::ndarray<std::complex<T>>.

Pro: Extensions using strides for complex ndarrays would have to change to the new convention, but there is no change to strides for ndarrays of non-complex types.

There may be some plausible justification for the latter option if staying closer to the current behavior is desired.

The C++ type aliasing rules are fairly strict in order to allow compilers to optimize using type-based alias analysis.  However, the C++ standard specifically mandates, for z of type std::complex<T>, that reinterpret_cast<T(&)[2]>(z)[0] is the real part of z and reinterpret_cast<T(&)[2]>(z)[1] is the imaginary part of z.    Also, for a pointer to an array of complex numbers, the pointer can be reinterpreted as T* and the resulting real-valued array pointer can be indexed as one would expect, with even indices for the real parts and odd indices for the imaginary.   I guess the point is that complex numbers get special treatment.
Perhaps it is reasonable that nb::ndarray strides be measured in terms of dtype alignment rather than dtype size.

static_assert(sizeof(uint8_t) == 1);
static_assert(alignof(uint8_t) == 1);

static_assert(sizeof(uint32_t) == 4);
static_assert(alignof(uint32_t) == 4);

static_assert(sizeof(float) == 4);
static_assert(alignof(float) == 4);

static_assert(sizeof(std::complex<float>) == 8);
static_assert(alignof(std::complex<float>) == 4);

AFAIK this is not possible because nanobind centers around DLPack. The ability for nb::ndarray to talk to NumPy via the buffer protocol is really just there to support older NumPy versions, since DLPack is still a relatively new feature.
In any case, for DLPack, all of these quantities are relative to the itemsize. So I think this request is not compatible with the design of the library.

Yes, I see.
>>> import numpy as np
>>> a = np.array([[1, 2, 3, 4, 5, 6, np.NAN],
...               [8, 0, 0, 0, 0, 0, np.NAN]], dtype=np.float32)
>>> s = a[:, 0:6]  # slice
>>> v = s.view(np.complex64)
>>> v.__dlpack__()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
BufferError: DLPack only supports strides which are a multiple of itemsize.

Would it be good for nanobind to throw an exception in the buffer protocol path if strides are not a multiple of itemsize?
This would avoid silent data corruption if the stride (in bytes) cannot be correctly converted to itemsize units.
If you like, I can work on a PR for this.   I'm a hardware/assembly/C++ guy who is new to python, so your careful code review and any suggestions you have would be welcome.

Would it be good for nanobind to throw an exception in the buffer protocol path if strides are not a multiple of itemsize?
This would avoid silent data corruption if the stride (in bytes) cannot be correctly converted to itemsize units.

Absolutely—if this currently leads to corruption, then it should be fixed. I'm happy to review a PR if you make one.

Closed via #489


removes thoses exports and referenced variables

sorry, I am confused about this code
options
{
  "plugins": [
    ["eliminator", {"namedExports": ["foo"]}]
  ]
}

input
import pkg from 'some-pkg'

const someVariable = 'some-string'

export const foo = () => {
    return pkg(someVariable)
}

output
export var foo = 1

this plugin it essentially removes thoses exports and referenced variables. why does foo exist in output other than remove it?

cause sometimes you might need to know if the file has certain exports, I'll add an option to allow completely removing the code if that's the use case.


docs: create OpenAPI 3.0 definition

Hi @amamenko! This API is great, thanks for putting it together! I have a long-running joke with my friends based on this video so this API means a lot to me lol.
I just went down a rabbit hole for the last hour and whipped up an OpenAPI definition for this API (closes #8), complete with parameter and response schema definitions and examples. The language and the examples are derived almost entirely from your usage guidance, but feel free to adjust anything as you see fit.
I also created an open-source project on ReadMe that renders out the OpenAPI definition into some nifty-looking API docs[^1] and linked to them from the README. I'd love to transfer ownership of this project to you so you can customize the ReadMe docs to your liking—let me know what email address you'd like me to send the invite to!
I personally think that the API docs can replace the Usage section in the README as well as on the site[^2], but I'll defer to you on that. I'm also happy to open another PR that sets up a syncing workflow to ReadMe whenever you make changes to the OpenAPI file. Let me know if that's something you'd be interested in!
Thanks again, this brought me a good laugh and a nice li'l escape from my actual work responsibilities 😁 take care!
[^1]: Disclaimer: I'm a developer advocate at ReadMe! 🦉
[^2]: Again, I'm biased here!

Hi,
Thanks so much for the OpenAPI definition. Glad you're enjoying the API so far.
I haven't actually heard of ReadMe before, but the docs and the examples look great. You can send me an invite link at my email in the contact section<EMAIL_ADDRESS>I'm going to keep the Usage section in the README and homepage simply for convenience purposes. (f users want to check out the API docs on ReadMe they have that option, as well. A little redundancy in this case doesn't hurt.
The syncing workflow would be very helpful, feel free to open another PR! 😄

I haven't actually heard of ReadMe before, but the docs and the examples look great. You can send me an invite link at my email in the contact section<EMAIL_ADDRESS>
Invite sent! I also sent you an email.

I'm going to keep the Usage section in the README and homepage simply for convenience purposes. (f users want to check out the API docs on ReadMe they have that option, as well. A little redundancy in this case doesn't hurt.

Makes sense to me!

The syncing workflow would be very helpful, feel free to open another PR! 😄

Opened the PR in #11, thanks @amamenko! 💙


Conversion Failed: Command ['/usr/bin/leapp', 'upgrade'] failed with return code 1

conversion with cento2alma failed
'centos2alma' utility version: c52e588cbbbdddb0d33995af889e754178c51e74
Upgrader 'Plesk::Centos2AlmaConverter' version: 1.3.2-c655abe1
Distribution information: CentOS 7
Kernel information: Linux 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Log shows many conflicts about all kinds of  "git"-related packages.
centos2alma_feedback.zip

Removing the repositories and the installed packages from IUS fixed the problem of phase 1.


Documenting src/components/PlayAnimation/PlayAnimation.jsx to explain functionality

Documenting src/components/PlayAnimation/PlayAnimation.jsx to explain functionality and writing comments to explain to developers how the play animation works in the FakeFlix program.

I would like to work on this please!

Great! I assigned you (@evanpilling) to the issue. Have fun working on it!

Sorry, can't help you here. This issue already has a volunteer.

I would like to work on this please!

Sorry, can't help you here. This issue already has a volunteer.

I would like to work on this please!

Great! I assigned you (@evanpilling) to the issue. Have fun working on it!


Improve parser to detect partially written annotations in expressions

Description:
Consider the following scenarios:
1.
function demo() {
    future<int> f = @stra<cursor>
}

function demo() {
    future<int> f = @strand {<cursor>}
}

In both cases, the <cursor> is within the leading minutiae of the initializer. And the node at cursor is identified as a simple name reference node.
Describe your problem(s)
See description
Describe your solution(s)
Need to improve the parser logic to detect those nodes as annotations. Especially case 2.
Related Issues (optional):
#33757

Currently, we are keeping the annotation intact (without invalidating) at the top level and the statement level. However, we do not do it at the expression level. We need to do it there as well.


In my application, failed to use video_player to play local videos

In my company application, i have imported many other libs, now i need to play local videos, and find video
_player, after i imported  it, and get the same code from video_play_master to my app,

when i run, it shows the flowing issues:

if i create a new flutter project, and copy the same code, and run it, it is ok, can display my local videos, anyone have seen this? have any idea to fix it? thanks a lot!!!

@big-zZ
Since you said it works properly in a new flutter project and local video file plays properly, this indicates, it could be something related to your company app' config / setting that might be leading to the error. You can ask about the same on support channels like StackOverflow, since the new Flutter project, video_player plugin and it's usage seems to be working properly.
Closing from here.


Checkbox component IE11 issue

Checkbox component does not work correctly in IE11/IE10

@ticketmaster/aurora latest:
node version: 10.15.0
yarn version: 1.12.3

Fixed in https://github.com/ticketmaster/aurora/pull/509


Ability to set metadata in output mp4 file

I'm not precisely sure what the correct name is for this kind of data, but for my use case I need to be able to set the track's width and height independent of the "outputWidth" and "outputHeight" variables.
Is there a way to expose this kind of data in the library?

Which of these do you want to override? The ones in tkhd? Why do you want to do this?
It is beyond this library's scope to allow for manual tampering with metadata as I want to keep the API minimal. You can try to patch the bytes manually though:
let patchMade = false;
function fixTkhdWidthHeight(data: Uint8Array, targetWidth: number, targetHeight: number): void {
    if (patchMade) return;

    const tkhdString = 'tkhd';
    const tkhdBytes = tkhdString.split('').map(char => char.charCodeAt(0));
    let offset = 0;

    // Simple byte-by-byte search for "tkhd"
    while (offset < data.length - 4) {
        if (
            data[offset] === tkhdBytes[0] &&
            data[offset + 1] === tkhdBytes[1] &&
            data[offset + 2] === tkhdBytes[2] &&
            data[offset + 3] === tkhdBytes[3]
        ) {
            // We found "tkhd", process the box
            const tkhdOffset = offset;
            const version = data[tkhdOffset + 4]; // Version byte
            let widthOffset: number;
            let heightOffset: number;

            if (version === 1) {
                // Version 1, 64-bit fields
                widthOffset = tkhdOffset + 84; // Width offset for version 1 tkhd
                heightOffset = tkhdOffset + 88; // Height offset for version 1 tkhd
            } else {
                // Version 0, 32-bit fields
                widthOffset = tkhdOffset + 76; // Width offset for version 0 tkhd
                heightOffset = tkhdOffset + 80; // Height offset for version 0 tkhd
            }

            const width = readFixed16_16(data, widthOffset);
            if (width !== 0) {
                // Assume it's the video track if the width is non-zero
                writeFixed16_16(data, widthOffset, targetWidth);
                writeFixed16_16(data, heightOffset, targetHeight);

                patchMade = true;
                break;
            }
        }
        offset++;
    }
}

function readUint32(data: Uint8Array, offset: number): number {
    return (
        (data[offset] << 24) |
        (data[offset + 1] << 16) |
        (data[offset + 2] << 8) |
        data[offset + 3]
    ) >>> 0;
}

function readFixed16_16(data: Uint8Array, offset: number): number {
    const value = readUint32(data, offset);
    return value / 65536;
}

function writeUint32(data: Uint8Array, offset: number, value: number): void {
    data[offset] = (value >>> 24) & 0xff;
    data[offset + 1] = (value >>> 16) & 0xff;
    data[offset + 2] = (value >>> 8) & 0xff;
    data[offset + 3] = value & 0xff;
}

function writeFixed16_16(data: Uint8Array, offset: number, value: number): void {
    const fixedValue = Math.round(value * 65536);
    writeUint32(data, offset, fixedValue);
}

I haven't tested this code, but perhaps it's something you can work with.


Colorful Headings issue?

Describe the bug
When theme is set to one of the presets and colorful headings is turned on, some themes override the colorful headings styles.
This may be by design, but I wanted to make sure.
For example, if I set my theme to Things and set Colorful headings to on, the Things theme overrides the Colorful headings CSS variables.
To reproduce

Screenshot of settings

Example

Theme CSS specificity is higher than colorful headers specificity

Expected behavior
Personally, I'd like the colorful headers to override the theme headers. However, this could be subjective.
Screenshots
See above.
 If still not fixed, please try to make the issue happen in the help vault or disable community theme and snippets.
Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the help vault or disable community plugins.

Now, I may be wrong on this or it could be a design/development choice to have the theme override the colorful headers choice. Let me know either way.

This is changed as of the latest commit.
Note that the actual Things app doesn't specify many colors and blue is the color for headings. So now the Minimal Things color scheme will fall back on the default colorful heading which is red for H1s. I expect this will cause some annoyance for some users because this is less accurate to the Things look, however it does provide the ability to customize via Style Settings.


Merge 0.2

This PR merges the next branch into the main branch and contains all changes for version 0.2.0.
We should discuss the last necessary steps before we can finally merge and release 0.2.0 here.

[ ] CGlue 0.2
[ ] Restructure modules
[ ] Update documentation
[ ] memflow book (examples)
[ ] Move out memflow-win32
[ ] Minor MMU changes (future proofing for RV64)

Think it was discussed that after this merge master will become the development branch. It could also be renamed to main, but the primary branch will be for development, and stable will become its own branch.


New patch version.

Hey guys, after #134 was merged it would be awesome if you could release a new version of Mapper. It would ease up the commit requirement in Carthage that we have to use right now. Thanks!

Pushed 7.4.1 with only that change. Thanks!

Thanks @keith!


key:by breaks set invariant

++key in by should use put:in instead of trying to be clever with preserving structure.
~pittyp-datfyn# ~(key by (my [/a 1] [/b 2] [/c 3] ~))  {[%c ~] [%a ~] [%b ~]}
~pittyp-datfyn# (sy /a /b /c ~)  {[%a ~] [%c ~] [%b ~]}
~pittyp-datfyn= one of these things is not like the other
~pittyp-datfyn# (~(put in ~(key by (my [/a 1] [/b 2] [/c 3] ~))) /a)  {[%a ~] [%c ~] [%a ~] [%b ~]}
~pittyp-datfyn# (~(has in ~(key by (my [/a 1] [/b 2] [/c 3] ~))) /a)  %.n

It's worth noting that ++apt doesn't catch this. The right branch noun-order conditions* look suspicious to me:
?&((vor n.a n.r.a) (hor n.a n.r.a) $(a r.a))

I'm not sure what seems suspicious to you?  n must be above l and r
vertically, between n and r horizontally?
On Fri, Sep 30, 2016 at 1:43 PM, Joe Bryan<EMAIL_ADDRESS>wrote:

It's worth noting that ++apt doesn't catch this. The right branch
noun-order conditions* look suspicious to me:
?&((vor n.a n.r.a) (hor n.a n.r.a) $(a r.a))
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/urbit/arvo/issues/266#issuecomment-250847475, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AALyAYmlpv7Byj4EX7X27csZCa2Mcw-cks5qvXRWgaJpZM4KFWFS
.

I didn't realize "h-order" meant "horizontal" -- I just mentioned the only part of ++apt that looked (maybe) off ...
Am I correct in assuming that ++apt should only produce & for valid sets? It works correctly here:
> (apt (sy 1 3 2 ~))
%.y
> (apt [1 [2 ~ ~] [3 ~ ~]])
%.n

But not here:
> (apt (sy /a /b /c ~))
%.y
> (apt ~(key by (my [/a 1] [/b 2] [/c 3] ~)))
%.y

Are you sure that isn't just a coincidence? :-)
Sent from my iPhone

On Oct 3, 2016, at 5:58 PM, Joe Bryan<EMAIL_ADDRESS>wrote:
I didn't realize "h-order" meant "horizontal" -- I just mentioned the only part of ++apt that looked (maybe) off ...
Am I correct in assuming that ++apt should only produce & for valid sets? It works correctly here:

(apt (sy 1 3 2 ~))
%.y
(apt [1 [2 ~ ~] [3 ~ ~]])
%.n
But not here:

(apt (sy /a /b /c ~))
%.y
(apt ~(key by (my [/a 1] [/b 2] [/c 3] ~)))
%.y
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

I'm not sure what that means -- as distinct from a bug ;)
Is ++apt just roughly documentary, or should it have the same perspective as +-put:in?
> ({n/* l/* r/*} (sy /a /b /c ~))
[n=[99 0] l=[[97 0] 0 0] r=[[98 0] 0 0]]

(apt (sy /a /b /c ~)) reduces to the following comparisons:
(vor [99 0] [97 0])
(hor [97 0] [99 0])
(vor [99 0] [98 0])
(hor [99 0] [98 0])

> ({n/* l/* r/*} ~(key by (my [/a 1] [/b 2] [/c 3] ~)))
[n=[99 0] l=0 r=[[98 0] [[97 0] 0 0] 0]]

(apt ~(key by (my [/a 1] [/b 2] [/c 3] ~))) reduces to:
(vor [99 0] [98 0])
(hor [99 0] [98 0])
(vor [98 0] [97 0])
(hor [97 0] [98 0])

It should certainly have the same perspective!  Let me stop my children from screaming at me and get to a computer...
Sent from my iPhone

On Oct 3, 2016, at 6:42 PM, Joe Bryan<EMAIL_ADDRESS>wrote:
I'm not sure what that means -- as distinct from a bug ;)
Is ++apt just roughly documentary, or should it have the same perspective as +-put:in?

({n/* l/* r/*} (sy /a /b /c ~))
[n=[99 0] l=[[97 0] 0 0] r=[[98 0] 0 0]]
(apt (sy /a /b /c ~)) reduces to the following comparisons:

(vor [99 0] [97 0])
(hor [97 0] [99 0])
(vor [99 0] [98 0])
(hor [99 0] [98 0])

({n/* l/* r/*} ~(key by (my [/a 1] [/b 2] [/c 3] ~)))
[n=[99 0] l=0 r=[[98 0] [[97 0] 0 0] 0]]
(apt ~(key by (my [/a 1] [/b 2] [/c 3] ~))) reduces to:

(vor [99 0] [98 0])
(hor [99 0] [98 0])
(vor [98 0] [97 0])
(hor [97 0] [98 0])
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

++apt does not check h-order recursively, therefore doesn't detect all faulty sets. In-order traversal is warranted, probably.

I see that the right branch of the +-key:by example is a valid set:
> r:({n/* l/* r/*} ~(key by (my [/a 1] [/b 2] [/c 3] ~)))
[[98 0] [[97 0] 0 0] 0]
> `*`(sy /a /b ~)
[[98 0] [[97 0] 0 0] 0]

Is the only solution to compare n to every node of l and r, for every n?

Ordering is definitely transitive, if that's a reasonable way to interpret
your question
On Tuesday, 4 October 2016, Joe Bryan<EMAIL_ADDRESS>wrote:

I see that the right branch of the +-key:by example is a valid set:

r:({n/* l/* r/*} ~(key by (my [/a 1] [/b 2] [/c 3] ~)))
[[98 0] [[97 0] 0 0] 0]
*(sy /a /b ~)
[[98 0] [[97 0] 0 0] 0]

Is the only solution to compare n to every node of l and r, for every n?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/urbit/arvo/issues/266#issuecomment-251526587, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABxXhmZlPaqtTDDtqa1yPaG3g04Di7X-ks5qwsyNgaJpZM4KFWFS
.

Hm?  h-order is a total order, so
?&  ?~(l.a & ?&((vor n.a n.l.a) (hor n.l.a n.a) $(a l.a)))
  ?~(r.a & ?&((vor n.a n.r.a) (hor n.a n.r.a) $(a r.a)))

==
will also check the ordering for l.a and r.a -- it is an in-order
traversal.
On Tue, Oct 4, 2016 at 2:51 PM, Max<EMAIL_ADDRESS>wrote:

++apt does not check h-order recursively, therefore doesn't detect all
faulty sets. In-order traversal is warranted, probably.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/urbit/arvo/issues/266#issuecomment-251524554, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AALyASsD7rVgnKzagvGOr5bJ62uxHQC-ks5qwsp1gaJpZM4KFWFS
.

If (hor n.l.r.a n.a), which shouldn't be the case, that algorithm won't find it.
It will only check (hor n.a n.r.a) and (hor n.l.r.a n.r.a)... will not prove that every single item in l-subtree is hor n, nor will it prove that n is hor every single item in r-subtree.
I think +-tap:in produces the items in (reverse) h-order, so you could ++reel over that and check ordering that way...

Won't $(a r.a) check (hor n.l.a n.a)?
On Tuesday, 4 October 2016, Max<EMAIL_ADDRESS>wrote:

If (hor n.l.r.a n.a), which shouldn't be the case, that algorithm won't
find it.
It will only check (hor n.a n.r.a) and (hor n.l.r.a n.r.a)... will not
prove that every single item in l-subtree is hor n, nor will it prove that
n is hor every single item in r-subtree.
I think +-tap:in produces the items in (reverse) h-order, so you could
++reel over that and check ordering that way...
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/urbit/arvo/issues/266#issuecomment-251531038, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABxXhrZTf6mOg7i0YwVXfYPEqGhf4DGVks5qwtGQgaJpZM4KFWFS
.

Ah right.  Thanks Max.  I think the answer is that ++apt is purely
documentary.  :-)
BUT - it shouldn't be, because we send sets and maps over the network.  I
shouldn't have to worry in %jael that someone is practicing some kind of
hanky-panky by sending me an invalid will map.
The correct answer is that the gate (map foo) should actually work
correctly as a mold -- it should cast its product to the span it currently
generates, but if you call ((map foo) bar), it should either normalize bar
to a correct map of foos by applying the map invariant, or (at the very
least, and probably it should be the very least) crash if the map is
malformed.  I can't say the failure to do this is a security hole, but I
can't say it isn't a security hole either, if you know what I mean.
Anyone want to send a patch?
On Tue, Oct 4, 2016 at 3:22 PM, Max<EMAIL_ADDRESS>wrote:

If (hor n.l.r.a n.a), which shouldn't be the case, that algorithm won't
find it.
It will only check (hor n.a n.r.a) and (hor n.l.r.a n.r.a)... will not
prove that every single item in l-subtree is hor n, nor will it prove that
n is hor every single item in r-subtree.
I think +-tap:in produces the items in (reverse) h-order, so you could
++reel over that and check ordering that way...
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/urbit/arvo/issues/266#issuecomment-251531038, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AALyAf8xzoCom5M_I-yRvp-xpbiIAkUqks5qwtGPgaJpZM4KFWFS
.

I've opened a PR to fix ++apt. I suspect that ++ept has the same problem, but I'm having trouble generating an invalid map to prove it. Any tips?

Any invalid set is also an invalid map?
On Tuesday, 4 October 2016, Joe Bryan<EMAIL_ADDRESS><javascript:_e(%7B%7D,'cvml','notifications@github.com');>> wrote:

I've opened a PR to fix ++apt. I suspect that ++ept has the same problem,
but I'm having trouble generating an invalid map to prove it. Any tips?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/urbit/arvo/issues/266#issuecomment-251571167, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABxXhlS8T7Oa9IfVlwMBBF3oNDB_45Amks5qwxS_gaJpZM4KFWFS
.

I don't follow -- a valid set is also an invalid map:
(there's probably some noun that's both a valid set and a valid map, but I wouldn't know how to find it)
> (apt (sy /a /b /c ~))
%.y
> (ept (sy /a /b /c ~))
%.n

Oh huh, they have different v-order? I thought the whole point of hor
trickiness was so that maps were sets.
On Wed, Oct 5, 2016 at 11:28 AM, Joe Bryan<EMAIL_ADDRESS>wrote:

I don't follow -- a valid set is also an invalid map:
(there's probably some noun that's both a valid set and a valid map, but I
wouldn't know how to find it)

(apt (sy /a /b /c ~))
%.y
(ept (sy /a /b /c ~))
%.n

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/urbit/arvo/issues/266#issuecomment-251758595, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABxXhuL-SrzyPpCIiSFEtvZphu-jHYAIks5qw-xKgaJpZM4KFWFS
.

Maps are ordered on p.n, not on n.
Sent from my iPhone

On Oct 5, 2016, at 11:32 AM, Anton Dyudin<EMAIL_ADDRESS>wrote:
Oh huh, they have different v-order? I thought the whole point of hor
trickiness was so that maps were sets.
On Wed, Oct 5, 2016 at 11:28 AM, Joe Bryan<EMAIL_ADDRESS>wrote:

I don't follow -- a valid set is also an invalid map:
(there's probably some noun that's both a valid set and a valid map, but I
wouldn't know how to find it)

(apt (sy /a /b /c ~))
%.y
(ept (sy /a /b /c ~))
%.n

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/urbit/arvo/issues/266#issuecomment-251758595, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABxXhuL-SrzyPpCIiSFEtvZphu-jHYAIks5qw-xKgaJpZM4KFWFS
.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

I can see how that would cause this error, but either hor should be gor or
sets should also have special vor handling. Right now (sy foo) and (my foo)
create incompatible datastructures that(intentionally?) look the same when
pretty-printed, which is the worst of both worlds.
On Wednesday, 5 October 2016, cgyarvin<EMAIL_ADDRESS>wrote:

Maps are ordered on p.n, not on n.
Sent from my iPhone

On Oct 5, 2016, at 11:32 AM, Anton Dyudin<EMAIL_ADDRESS><javascript:_e(%7B%7D,'cvml','notifications@github.com');>> wrote:
Oh huh, they have different v-order? I thought the whole point of hor
trickiness was so that maps were sets.
On Wed, Oct 5, 2016 at 11:28 AM, Joe Bryan<EMAIL_ADDRESS><javascript:_e(%7B%7D,'cvml','notifications@github.com');>> wrote:

I don't follow -- a valid set is also an invalid map:
(there's probably some noun that's both a valid set and a valid map,
but I
wouldn't know how to find it)

(apt (sy /a /b /c ~))
%.y
(ept (sy /a /b /c ~))
%.n

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/urbit/arvo/issues/266#issuecomment-251758595, or
mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABxXhuL-
SrzyPpCIiSFEtvZphu-jHYAIks5qw-xKgaJpZM4KFWFS>
.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/urbit/arvo/issues/266#issuecomment-251763289, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABxXhokZGI_5V04B-xtO0S1gxY0xwOyIks5qw_BRgaJpZM4KFWFS
.

Anyway, try [/f ~ /b [/d ~ ~] ~] for a "crossover" invalid map

(~(has by (tree (pair term $~))[/f [/d ~ ~] [/b ~ ~]]) %d)
%.y
(~(has by (tree (pair term $~))[/f ~ [/b [/d ~ ~] ~]]) %d)
%.n
(ept [/f [/d ~ ~] [/b ~ ~]])
%.y
(ept [/f ~ [/b [/d ~ ~] ~]])
%.y

On Wed, Oct 5, 2016 at 11:48 AM, Anton Dyudin<EMAIL_ADDRESS>wrote:

I can see how that would cause this error, but either hor should be gor or
sets should also have special vor handling. Right now (sy foo) and (my foo)
create incompatible datastructures that(intentionally?) look the same when
pretty-printed, which is the worst of both worlds.
On Wednesday, 5 October 2016, cgyarvin<EMAIL_ADDRESS>wrote:

Maps are ordered on p.n, not on n.
Sent from my iPhone

On Oct 5, 2016, at 11:32 AM, Anton Dyudin<EMAIL_ADDRESS>wrote:
Oh huh, they have different v-order? I thought the whole point of hor
trickiness was so that maps were sets.
On Wed, Oct 5, 2016 at 11:28 AM, Joe Bryan<EMAIL_ADDRESS>wrote:

I don't follow -- a valid set is also an invalid map:
(there's probably some noun that's both a valid set and a valid map,
but I
wouldn't know how to find it)

(apt (sy /a /b /c ~))
%.y
(ept (sy /a /b /c ~))
%.n

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/urbit/arvo/issues/266#issuecomment-251758595,
or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABxXhuL-S
rzyPpCIiSFEtvZphu-jHYAIks5qw-xKgaJpZM4KFWFS>
.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/urbit/arvo/issues/266#issuecomment-251763289, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABxXhokZGI_5V04B-xtO0S1gxY0xwOyIks5qw_BRgaJpZM4KFWFS
.

Perfect! The update in #275 catches that one.


Changed title behaviour for date prompts (issue #386)

The DateTimePicker will now display the title (and keep displaying the title, also after picking a date).
Previously the behaviour was to display the title when showing the picker, and after picking a date, it would display the date as the title. This is unnecessary since the date is shown directly below already, also in string representation. Additionally, when setting MinimumDate or MaximumDate in the DatePromptConfig, it would override the title and never show it, not even when the picker is shown.

Should I call base.OnDateChanged() in the OnDateChanged event?


Add type group for combining constraints/variables

Pull request details
Describe the changes made in this pull request
List of related issues or pull requests
Closes #732
Collaboration confirmation
As a contributor I confirm

[ ] I read and followed the instructions in README.dev.md
[ ] The documentation is up to date with the changes introduced in this Pull Request (or NA)
[ ] Tests are passing
[ ] Lint is passing

After discussion with @datejada @suvayu @abelsiqueira, this PR is closed as we will tackle this issue later.


Client-sent payloads are empty server-side when calling a client RPC function that uses a GET request (RpcFunc2)

This issue happens on the clients I tested (Unity & Javascript) as well as various PostMan HTTP requests. I used blank plugins for Lua and Go with no functions except the test functions below.
Description
Payloads sent from the client are empty server-side when calling a client function that uses a GET request with a payload= query parameter internally.
The payload query parameter in a URL is not passed onto RPC functions, and so the payload string is always empty when the RPC function is invoked server-side.
It works if you put the payload into the body of a POST request, but no GET requests with a payload as a query parameter worked when I tested it.
GET request (generated from NakamaJS, put into PostMan):
https://exampleserver.com:7350/v2/rpc/test_rpc?payload=%7B%22PokemonName%22%3A%22dragonite%22%7D&http_key=myhttpkey
PostMan:
https://exampleserver.com:7350/v2/rpc/test_rpc?payload={"PokemonName":"dragonite"}&http_key=myhttpkey
Javascript client code:
const payload = { "PokemonName": "dragonite"};

nakamaClient.rpcGet("test_rpc", null, "myhttpkey", payload)
                .then((r: RpcResponse) => {
                    let response = r.payload;
                    console.log(response)
                })
                .catch(reason => {
                    console.error(reason);
                });

Unity client code:
public static async void TestRpcHttpKey()
        {
            var client = new Client("https", "exampleserver.com", 7350, "myserverkey");
            IApiRpc rpcAsync = await client.RpcAsync("myhttpkey", "test_rpc", "{\"PokemonName\":\"dragonite\"}");
            Debug.Log($"Response: {rpcAsync.Payload}");
        }

Go server-side code:
It is supposed to echo the payload back to the client.
func testRpc(ctx context.Context, logger runtime.Logger, db *sql.DB, nk runtime.NakamaModule, payload string) (s string, e error) {
	logger.Info("input length " + string(len(payload)))    // This outputs 'input length \u0000'
	logger.Info(payload)    // This outputs nothing
	return payload, nil
}

Lua server-side code:
local function test_rpc(context, payload)
  nk.logger_info(("Payload: %q"):format(payload)) -- This produces 'Payload: ', aka blank
  return payload
end

They all result in the same response: {"payload":""}
Works fine if I change it to a POST request (and convert the JSON into bytes, put it into the body, yadda yadda)
What's strange about this is that all the client libs use a GET function for the RPC server-to-server functions, but only the POST variant ever passes the payload. While the GET request does call the RPC function just fine, the payload string parameter is always blank, even though the payload query param is set.
Steps to Reproduce

Write client code that uses an RPC function w/ HTTP Key and a payload.
Call an RPC function using a GET request with a payload={} query parameter and an http key.
a. The JS and Unity clients currently use a GET request when calling the http-key variant of the RPC function. (Called rpcGet in JS and RpcAsync w/ httpKey param in C#)
You will find that the RPC function on the server is passed a blank payload string.

Expected Result
The payload is passed to the RPC function server-side.
Actual Result
The payload is empty even though the client sent data.
Context

[x] Unity
[ ] Unreal
[x] Other

Your Environment

Nakama: 2.8.0+ab268696
Database: v19.1.3
Environment name and version:

Digital Ocean Droplet
Binaries installed
Tested w/ both Lua and Go

Operating System and version: Ubuntu 18.04

@NavidK0 I don't think this is an issue.
We follow the HTTP spec where a GET resource is described such that the message-body should be ignored when handling the request. This is not a requirement because the spec suggests that any "should" advice can be overruled by the specific web application server. Essentially whether a GET should pass through a body or not is undefined behaviour. We've chosen to ignore the body in RPC GET operations.
Have a look at this Stackoverflow post for more information - https://stackoverflow.com/a/983458
Why do you want to pass in a message-body on GET rather than POST?

@novabyte I'm not talking about the message body of a GET request, I'm saying that the payload query parameter in a GET request is not being passed through.
As far as I'm aware, the current Nakama clients (at least for C# and JS) have functions that allow you to pass in a payload with an HTTP key. These are implemented using a function called RpcFunc2 which uses a GET request. The GET request created by RpcFunc2 has payload as a query parameter. The client functions that use a session instead of the httpkey work just fine because they use RpcFunc which uses a POST request with a message body.
That being said, is the payload query parameter ignored because the server considers it part of the message body? If that's the case, I think the client libs probably need to be updated to use POST requests for their httpkey payload functions instead of GET.
I am using client functions with an HTTP key for an admin tool that I made, which is why I'm not using a POST request for a server-to-server call. I figured I could just use the provided Nakama client libs to implement said functionality.

Query parameters should be available in your RPC function context:
queryParams := ctx.Value(runtime.RUNTIME_CTX_QUERY_PARAMS).(map[string][]string)
_ = queryParams["payload"]

or
context.query_params

These should work inside your runtime RPC functions.
On a separate note the clients are both capable of making POST requests as far as I recall. client.rpc(...) in JavaScript for example.

@zyro Yep, that solves the payload problem! I was unaware that that was a thing. Good to know!
On the note of the clients, I don't see any functions that have an httpkey variant that can make a POST request.
    public Task<IApiRpc> RpcAsync(ISession session, string id, string payload)
    {
      return this._apiClient.RpcFuncAsync(session.AuthToken, id, payload);
    }

    public Task<IApiRpc> RpcAsync(ISession session, string id)
    {
      return this._apiClient.RpcFunc2Async(session.AuthToken, id, (string) null, (string) null);
    }

    public Task<IApiRpc> RpcAsync(string httpkey, string id, string payload = null)
    {
      return this._apiClient.RpcFunc2Async((string) null, id, payload, httpkey);
    }

    Client.prototype.rpc = function (session, id, input) {
        this.configuration.bearerToken = (session && session.token);
        return this.apiClient.rpcFunc(id, JSON.stringify(input)).then(function (response) {
            // code...
    };

As far as I can see, only the functions that take bearerTokens/sessions have the ability to make POST requests.
Of course, now that I know you can grab the payload using the QUERY_PARAMS context key, it's not a big deal anymore, though probably a little confusing for someone trying to use the httpkey rpc functions with a payload and wondering why it doesn't work by default.
Adding the option to use an httpkey with the (POST) methods above is probably enough.
But since this isn't really a bug and more of a documentation thing more than anything, I'll go ahead and close this.

Thanks @NavidK0. When you have a chance please open an issue on the .NET and JavaScript client sdks for the improvement. I think it would be good to have and I'll discuss the implementation details for the code generators with the team.

Will do when I get a chance later today 👍


Update sys-dm-database-backups-azure-sql-database.md

Made modifications with respect to the suggestion from https://github.com/MicrosoftDocs/sql-docs/pull/9817#issuecomment-2163378325.

https://github.com/MicrosoftDocs/sql-docs/pull/9817

@SudhirRaparla
Can you review the proposed changes?
Important: When the changes are ready for publication, adding a #sign-off comment is the best way to signal that the PR is ready for the review team to merge.
#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

@Court72 its been 2 weeks. Was the PR not submitted properly?

@rwestMSFT
Can you assist in reviewing the proposed changes?
Important: When the changes are ready for publication, adding a #sign-off comment is the best way to signal that the PR is ready for the review team to merge.

@marigbede It was submitted correctly. Please be patient.


Occasional CI failures

https://circleci.com/gh/viviag/LaTeX-numbers/61 for example

Waiting for new occasions.
Hopefully gone with https://github.com/viviag/LaTeX-numbers/commit/1bfd993b296411b7a9e71120a104d96c8c044c06

Is not present for a long time.


ImageStreamsBackup Custom Resource design.

Related to OADP-363

Why a new controller rather than a plugin that is able to hand back the data to be backed up by coping the manifefsts and blobs?

New controller approach allow us to rely on existing vetted solutions of tarring up images without complicated deduplication logic instead of within the confines of velero plugin that requires you to

double check what's already uploaded in object storage to avoid duplication which may either require that we redownload what's already uploaded to check digest or trust the manifests is correct.

@shawn-hurley @kaovilai I think it's important we decide the pros and cons of going down each path. Our biggest concern with the plugin approach was that we wouldn't be able to dedup the layers in a single backup. The hope with an API/Controller approach was that we could bunch images into one action and get the dedup functionality.
It's worth noting that both approaches involve a change to the velero plugins to work properly... but if we went down this approach the gaps missing would be identical to data mover, which is a plugin creating a custom resource and having to wait for it complete for the backup to be complete.
The plugin backup method requires us to introduce a new concept of a "pre backup complete plugin" which gets wonky and would also require us to be writing data to a transient location in the pod. I'm unsure which approach is better... but I like the idea of exploring this being separate from the velero backup process if our goal is to simply enable backup/restore of the internal registry. What do you all think?

What do you all think?
I'm on the fence about both approach :) So no comment.


toDF() isn't working on the shell

I get the same error (see attached) when trying orgs.toDF().show()  or memberships.select_fields(['organization_id']).toDF().distinct().show()

Thanks for using AWS Glue.
Please refer to the step 5 in AWS Glue documentation on using a REPL shell at: http://docs.aws.amazon.com/glue/latest/dg/tutorial-development-endpoint-repl.html
The solution to resolve this error is as follows – you would have to stop the existing SparkContext and create a new one using GlueContext.
spark.stop()
glueContext = GlueContext(SparkContext.getOrCreate())
If you have further questions, you can also use the AWS Glue Forum: https://forums.aws.amazon.com/forum.jspa?forumID=262

Thanks for the suggestion. I've tried it but unfortunately I still get the same error.

Thanks for trying out the fix. We were not able to reproduce the error on a REPL shell after using the above fix.
Could you please open up a support ticket.

The fix with spark.stop() worked for me. Let me also post the exact error message here for better indexing by search engines:

Caused by: ERROR XSDB6: Another instance of Derby may have already booted the database /home/glue/metastore_db.

One workaround would be to disable hive support when sparkContext is initialized.
newconf = sc._conf.set("spark.sql.catalogImplementation", "in-memory")
sc.stop()
sc = sc.getOrCreate(newconf)
Let me know if this causes you additional problems.

The spark.stop() "fix" worked for me as well.
The specific error message was:

ERROR Schema: Failed initialising database.
Unable to open a test connection to the given database. JDBC url = jdbc:derby:;databaseName=metastore_db;create=true, username = APP. Terminating connection pool (set lazyInit to true if you expect to start your database after your app). Original Exception: ------
java.sql.SQLException: Failed to start database 'metastore_db'

I ran into this as well. Why isn't the development environment setup to support this from the beginning? There's lots of glue documentation out there using .toDF() that doesn't work out of the box (the first example in https://github.com/aws-samples/aws-glue-samples/blob/master/FAQ_and_How_to.md for example)

Just ran into this. The above did not work for me.
Ended up starting pyspark with the following flag:
./bin/gluepyspark --conf spark.sql.catalogImplementation=in-memory

https://github.com/apache/spark/commit/ac9c0536bc518f173f2ff53bee42b7a89d28ee20 this is a spark patch that should fix this in the Spark 3.0.0 release


Using overshoot_interpolator case undesired behavior.

When I set overshoot_interpolator as umanoScrollInterpolator and max height of umanoDragView is less than screen size the overshoot effect is applied to whole layout causing bottom of it to overshoot and revealing  undesired background.

Thanks. I will look into it.

@tokudu Any updates on this.
I just ran into the same exact issue and its been 3 years since this issue has been created.

Tbh haven't use this libarary like over a year so I'm unable to help

Sorry for that, wanted to discard comment but clicked faster than read


Lua error

Randomly happens to players on the server
[advdupe2-master] addons/advdupe2-master/lua/advdupe2/file_browser.lua:994: attempt to get length of local 'dirs' (a nil value)
1. unknown - addons/advdupe2-master/lua/advdupe2/file_browser.lua:994

I think this line just needs to be guarded. My guess would be a folder gets deleted between ticks.
https://github.com/wiremod/advdupe2/tree/master/lua/advdupe2/file_browser.lua#L986


internal chore: remove shrinkwraps from 3_0_x

shrinkwraps seem to be causing some issues with webpack:

without a shrinkwrap, npm install correctly dedupes and hoists the plugin-editor dependencies, notably monaco-editor
with a shrinkwrap, for some reason these deps are installed in the plugin-editor subdirectory
our webpack.config.js currently assumes these deps are located at the top level
running npm dedupe immediately after an npm install seems to hoist as expected

and, while we should fix that third point, it is still desirable for deps to be deduped automatically. this seems like a bug in npm... should not a dedupe immediately after an install be a no-op?
in any case, let's just remove the shrinkwraps from 3_0_x until we can figure out what is going on.

resolved by 2692


Add a more real case scenario reconcile test

As discussed in #103 , the https://github.com/Skyscanner/applicationset-progressive-sync/blob/main/controllers/progressivesync_controller_test.go#L268 test has a very naive ProgressiveSync object: two stages with a selector that returns only one cluster, and targeting a single cluster at the time.
We should change this test to better reflect a real case scenario. We've internally used as default the ProgressiveSync reported in #103 so this PR change the test to use that ProgressiveSync.
In addition, I changed a couple of helpers function to be more generic for when we want to add more tests with different combination of clusters.

There's still some work to do on the multi-stage test, I will take a look at this again tomorrow. We've integrated the failing stage test, but haven't improved it much compared to how it already was.

Close this one as we continued the work in #114


🎮 Game Request
Sudoku Game Description
Game Logic:
Sudoku is a logic-based number puzzle where the objective is to fill a 9x9 grid with digits so that each column, each row, and each of the nine 3x3 subgrids contain all of the digits from 1 to 9. The puzzle starts with some cells filled in with numbers, and the player must fill in the remaining cells while adhering to the rules.
Point down the features
Sudoku Game Features:

Random Puzzle Generation: Each time the game starts or the player resets the board, a new Sudoku puzzle is randomly generated.
Difficulty Levels: The game offers three difficulty levels (easy, medium, hard) which determine the number of pre-filled cells in the puzzle.
Interactive Gameplay: Players can input their answers by clicking on the cells and typing the numbers from 1 to 9.
Solution Checking: Players can check their solution against the correct solution to determine if they have solved the puzzle correctly.
Timer: The game features a timer that tracks the time taken by the player to solve the puzzle.
Reset Board: Players can reset the board at any time to start a new game or if they want to try a different approach.

Select program in which you are contributing
GSSoC24
Code of Conduct

[X] I follow CONTRIBUTING GUIDELINE of this project.

I would like to work on this issue. Pls assign me this!!

Hey, I would like to tackle up with this issue . I would really appreciate I you would assign me this issue . Moreover I would like you to label it for the levels.

#3079 I'm really interested in adding up of this sudoku game in this project can you pls assign this work for me.

I would like to work on this issue .I ad worked as a web developer at IITM RESEARCH PARK .With my knowledge i believe that i complte this project.Please assign to me.

@kunjgit gentle reminder. Please assign me this issue on FCFS basis

Hi, I hope this message finds you well.
I am writing to express my interest in contributing to the issue. I am enthusiastic about participating in GSSoC'24 and believe that working on this issue will allow me to make a meaningful contribution to the project.
Could you please assign this issue to me under GSSoC'24?
Thank you for considering my request. (also add gssoc label)

Hello @roysammy123, Time's up!⏰
Sorry for closing your issue!
But it's more than a week since we haven't received anything from your side 😢 .
Come up with new ideas, create a new issue and make sure you finish it within a week! 🔥
All the best! 🚀
Happy Hacking! 💗

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


Operator installation with default containerd config file makes the K8s node NotReady.

After installing the containerd with docker (as suggested by install docker on ubuntu ) and creating a single-node K8s cluster with 'worker' role, when the operator is installed, the K8s node becomes NotReady.
Here is the content of the /etc/containerd/config.toml when the containerd is installed.
#   Copyright 2018-2022 Docker Inc.

#   Licensed under the Apache License, Version 2.0 (the "License");
#   you may not use this file except in compliance with the License.
#   You may obtain a copy of the License at

#       http://www.apache.org/licenses/LICENSE-2.0

#   Unless required by applicable law or agreed to in writing, software
#   distributed under the License is distributed on an "AS IS" BASIS,
#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#   See the License for the specific language governing permissions and
#   limitations under the License.

disabled_plugins = ["cri"]

#root = "/var/lib/containerd"
#state = "/run/containerd"
#subreaper = true
#oom_score = 0

#[grpc]
#  address = "/run/containerd/containerd.sock"
#  uid = 0
#  gid = 0

#[debug]
#  address = "/run/containerd/debug.sock"
#  uid = 0
#  gid = 0
#  level = "info"

The K8s cluster is created after commenting out the line disabled_plugins = ["cri"] in above /etc/containerd/config.toml otherwise it reports the following error.
[ERROR CRI]: container runtime is not running: output: E1205 20:16:43.815128  869946 remote_runtime.go:948] "Status from runtime service failed" err="rpc error: code = Unimplemented desc = unknown service runtime.v1alpha2.RuntimeService"
The status of the K8s node is as follows.
$ kubectl get node
NAME        STATUS   ROLES                  AGE   VERSION
amdmilan1   Ready    control-plane,worker   74s   v1.25.4

Then, the operator is installed as follows.
$ kubectl apply -k github.com/confidential-containers/operator/config/release?ref=v0.2.0

$ kubectl apply  -f https://raw.githubusercontent.com/confidential-containers/operator/main/config/samples/ccruntime.yaml

$ kubectl get runtimeclass
NAME                    HANDLER                 AGE
kata                    kata                    4s
kata-clh                kata-clh                4s
kata-clh-tdx            kata-clh-tdx            4s
kata-clh-tdx-eaa-kbc    kata-clh-tdx-eaa-kbc    4s
kata-qemu               kata-qemu               4s
kata-qemu-sev           kata-qemu-sev           4s
kata-qemu-tdx           kata-qemu-tdx           4s
kata-qemu-tdx-eaa-kbc   kata-qemu-tdx-eaa-kbc   4s

Within 60 seconds of the installation of operator, the K8s node becomes NotReady.
$ sleep 60

$ kubectl get node
NAME        STATUS     ROLES                  AGE     VERSION
amdmilan1   NotReady   control-plane,worker   4m14s   v1.25.4

We found a workaround to handle the above problem.
Instead of using the installed /etc/containerd/config.toml, if we generate it using the command containerd config default,  then the above problem does not occur.

@fitzthum @bpradipt

Not sure if this is the same issue, but one thing I have seen many times is that containerd does not always install with a config file or at least I have been on a number of machines where containerd is installed and there is no config. If you run the operator in this state, you will get an unusable installation. It might be a good idea to add a check somewhere that installs the default containerd config file (as @niteeshkd mentions above) if the current one is non-existent or empty.

Hi @niteeshkd ,

We found a workaround to handle the above problem.
Instead of using the installed /etc/containerd/config.toml, if we generate it using the command containerd config default, then the above problem does not occur.

That's exactly what we do on CI. On https://github.com/confidential-containers/operator/blob/main/tests/e2e/ansible/install_containerd.yml#L16 there is an explanation.
@fitzthum maybe it deserves a note on the quickstart's troubleshoot section?

Hi, I recently faced this issue as well while installing the operator. Definitely +1 for adding a note regarding it. Or would it make sense to also handle it in the script container-engine-for-cc-deploy.sh?

I think it would be relatively straightforward to add a check for this in the operator. I guess we've been putting off containerd-related changes because we want to get rid of the containerd fork. This issue could affect upstream containerd as well though.


performance: defer clipboard because xsel and pbcopy can be slow

See this discussion in LazyVim
The approach discussed has been merged in LazyVim and AstroNvim
TLDR:
Startup time performance is affected quite significantly when the clipboard provider is xsel(linux) or pbcopy(macos). I expect an improvement in these cases, especially on older pc's.
This PR makes sure that vim.opt.clipboard is only applied after UiEnter.

In my view this just complicates the config, makes it confusing for the newcomer who would be the target audience, without providing a tangible improvement. What tasks can one do before UiEnter? I expect if you measure the time it takes from start to actually editing a file it would be the same? In what use case is this useful? Perhaps for running vim or lua scripts using neovim? Just trying to understand...

Thanks for the reply!
I understand your concern about complicating the config. That said, I think the extra line is not overly complicated. The accompanying comment is important.
A similar question was asked on reddit :

Delaying a function call like this just means your startup time shows a smaller number, but the function is still called later in the event loop. You aren't saving any actual time by doing this.

My response, based on my own config:

Very true. However, in my opinion, the purpose of lazy loading is to render text on the screen as quickly as possible. The actual time is not that important. When I open Neovim with a file argument, that file is rendered immediately, treesitter included. Most of the plugins are loaded after.

I think I do provide a tangible improvement. However that improvement varies between environments. Worst case: No improvement at all. Best case someone reported: A startup-time improvement of 300ms( see this discussion). That's huge for a setting that's not even needed before UiEnter.
Also, I would argue that the intent of kickstart is not primarily to avoid complications for the novice neovim user. The config educates and provides ample comments. For example, nvim-cmp is loaded on InsertEnter.
On my system, just kickstart takes 135 ms to load. Without InsertEnter on nvim-cmp, it takes 161 seconds, a decrease of 25 ms. To compare, when scheduling the clipboard, startup time is 94 seconds: A decrease of 41 ms.

I'd like to chime in here and say that I do agree with @abeldekat's sentiment. Kickstart is a base config that takes a lot of the initial hurdle of configuring nvim out of the equation for a novice, and furthermore, it's a good base configuration period. I don't think the philosophy should be to skirt away from performance improvements that may take a bit of further reading to completely understand.
With the above being said, what is overly confusing about wrapping an already existing line in a schedule function? It seems like it'd be a good opportunity to introduce vim.schedule(), and with the potential upside of lowering the base configuration's startup time in some environments this seems like a good change to me. Just my single cent.

@igniscyan Thanks for the reply!
@dam9000, in my previous reply, I would like to rephrase my answer to your most important question:

What tasks can one do before UiEnter?

I think it is not about what one can do before UiEnter. It's about how fast "the UI enters".
In general I don't mind to wait a bit before having full editing capabilities(for example, the lsp and completions). I do want to see the code or the startupscreen almost immediately, so that I can read the code, think and navigate.

Out of curiosity I tested it on my pc and:
original:
048.315  000.002: --- NVIM STARTED ---
this change:
035.874  000.002: --- NVIM STARTED ---
so a 13 millisecond improvement, interesting :) ... but small. For this negligible gain I would rather keep the config simple.
shouldn't this improvement go to nvim core so that everyone benefits instead of having work-arounds in the configuration? Did you bring up this with the core neovim project?

so a 13 millisecond improvement, interesting :) ... but small. For this negligible gain I would rather keep the config simple.

That's a 27% decrease in startup-time by just using vim.schedule...)
Your environment is not the target of this PR. Applied to that environment, kickstart could be simplified even more by removing the following events from the spec: InsertEnter, VimEnter, BufWritePre. The human eye would not notice the change.
I know the statement above is a bit absurd. After all, those events make sense, and when the config expands each improvement counts.
On older hardware, the improvement can be very noticeable. According to this comment, even on a fairly recent setup using wsl2.

shouldn't this improvement go to nvim core so that everyone benefits instead of having work-arounds in the configuration? Did you bring up this with the core neovim project?

I did consider doing so. In clipboard.vim, xsel and pbcopy are handled a bit differently. I think it's not trivial without breaking changes.
After feedback in this reddit post, I wanted this simple improvement to also be available for people that don't follow Neovim topics that closely.
My PR's in LazyVim and Astronvim were accepted. For nvchad the solution was a little harder to apply. The maintainer decided that the change should be the responsibility of the user.
Last, but certainly not least, kickstart is the perfect target for this change in my opinion. Many people having their own pde use kickstart, either directly or as a reference.

I think this should be brought up to neovim core team:
Tested this change in core neovim runtime and the improvement is the same:
--- clipboard.vim-orig	2024-07-27 11:36:19.166852465 +0200
+++ clipboard.vim	2024-07-27 11:36:36.640979483 +0200
@@ -105,7 +105,7 @@
     let s:copy['*'] = s:copy['+']
     let s:paste['*'] = s:paste['+']
     return 'wayclip'
-  elseif !empty($DISPLAY) && executable('xsel') && s:cmd_ok('xsel -o -b')
+  elseif !empty($DISPLAY) && executable('xsel')
     let s:copy['+'] = ['xsel', '--nodetach', '-i', '-b']
     let s:paste['+'] = ['xsel', '-o', '-b']
     let s:copy['*'] = ['xsel', '--nodetach', '-i', '-p']

I take it by reverting from xclip back to xsel:
https://github.com/neovim/neovim/issues/20862 clipboard: prefer xsel before xclip
then this is again an issue:
https://github.com/neovim/neovim/issues/7237 Slow startup with clipboard.vim + xsel
I guess it could be fixed by the above change, or if ancient backward compatibility is an issue then the cmd_ok could be cached in a file instead of executing xsel every time. Or the whole clipboard.vim could be rescheduled after uienter in a similar way as you do it in the config.
ps. I'm just commenting, not trying to block this change - it's up to the maintainers anyway.

ps. I'm just commenting, not trying to block this change - it's up to the maintainers anyway.

No problem. It's good to have the discussion.

...  take it by reverting from xclip back to xsel: ...

Yes, I read those core issues, they were mentioned in the link I provided to the discussion in LazyVim. They were one of the reasons I decided not to file a new issue.

I guess it could be fixed by the above change...

I don't know whether that cmd_ok is there for historical reasons. However, that won't fix the problem with pbcopy on macos. Also, scheduling the whole clipboard.vim is a breaking change I guess. There would be no way to have the clipboard configured earlier when that behavior is required for some reason.

OK I read the code in this PR and while it does add complexity I'm not sure it really raises the bar to entry too much for new users.
What I want to know is:

You talk about Linux and Mac, what about Windows? Or Windows/WSL?
Will your change break the Smartyank plugin? It's the only thing that keeps me from tearing my nearly non existent remaining hair out WRT Neovim clipboards.

If you can confidently answer that your proposed change will work under these additional environments, I'm all for it.
I'm also happy to do testing for these configurations as I have access to all. I run Smartyank by default and WSL is one of my primary environments along with Mac (I do run Ubuntu on the side as my mad scientist's lab, so I can test there too when I get around to it :)

You talk about Linux and Mac, what about Windows? Or Windows/WSL?

I don't know about windows without wsl. I did receive positive feedback from a wsl2 user.

Will your change break the Smartyank plugin?

No. I just tested this with your smartyank setup. The plugin is activated and I can copy to the system  clipboard. Your remaining hair won't be affected by this PR...;)
I also tested the yanky plugin, included as extra in LazyVim.

I'm also happy to do testing for these configurations as I have access to all.

Thank you! I would like to know on which of those platforms the improvement is most noticeable. I don't think this PR requires extensive testing( see also Folke`s comment )


Enforce max-statement/line & further unify UI

This is mostly a rearrangement of the code, so it shoud have not broken anything (I've tested as much as I can, so hopefuly there are no errors)
This also fixes some code duplicates in some of the views. Note that exceeding 120 chars per line / 50 statements will now fail the tests
This PR is here so you can take a look in case I've missed something.
If nothing goes wrong, this can be merged soon

After testing it, everything seems to work as before so let's hope for the best (Will test again on beta just in case!)


Feature/add operation method flush

close #35
close #36

Codecov Report

Merging #38 (2076285) into master (3cac952) will decrease coverage by 0.08%.
The diff coverage is 50.00%.

@@            Coverage Diff             @@
##           master      #38      +/-   ##
==========================================
- Coverage   93.31%   93.23%   -0.09%
==========================================
  Files          58       58
  Lines        1047     1049       +2
  Branches      107      107
==========================================
+ Hits          977      978       +1
- Misses         38       39       +1
  Partials       32       32

Impacted Files
Coverage Δ

lib/HiveOperation.ts
82.71% <50.00%> (-0.83%)
:arrow_down:

Continue to review full report at Codecov.

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


release 0.2.1

Now that #168 has been fixed, would be great to get a new s3fs release. Reading hdf5 files from s3 is certainly a very anticipated feature.

https://github.com/conda-forge/s3fs-feedstock/pull/19


Procedure for github fetch remote repo pull/merge into local CSR repo - and associated merge conflict avoidance and workload redeploy issues

Q
Chris Carty, 11 min
Do we have any strategies to keep tabs on any potential drift between upstream source and downstream deployments?
A
Not in the repo - but I have been thinking about documenting the repo merge procedure on a remote pull from the github branch and associated CSR local branch.  So far we have been doing manual merges.
raised to track this
Until we finish the 2nd part of the id overlay (do/undo) - we will end up with expected merge conflicts on any pull - I should have the deployment specific ID seds done shortly on top of
https://github.com/GoogleCloudPlatform/pbmm-on-gcp-onboarding/issues/41
associated with our need to handle redeployment of workloads during possible teardown/redeployments of infrastructure - like when we moved the perimeter.
https://github.com/GoogleCloudPlatform/pbmm-on-gcp-onboarding/issues/91

key the doc off recently added doc folder in https://github.com/GoogleCloudPlatform/pbmm-on-gcp-onboarding/blob/main/docs/README.md

example from guardrails
https://github.com/canada-ca/accelerators_accelerateurs-gcp/issues/24#issuecomment-1087722599
 1277  [2022-03-31 20:51:42 -0400] git clone https://github.com/fmichaelobrien/accelerators_accelerateurs-gcp.git
 1278  [2022-03-31 20:52:00 -0400] git checkout -b canada-ca-main main
 1279  [2022-03-31 20:52:03 -0400] cd accelerators_accelerateurs-gcp/
 1280  [2022-03-31 20:52:04 -0400] git checkout -b canada-ca-main main
 1281  [2022-03-31 20:52:12 -0400] git pull git://github.com/canada-ca/accelerators_accelerateurs-gcp.git main
 1282  [2022-03-31 20:53:08 -0400] git config --global pull.rebase false
 1283  [2022-03-31 20:53:11 -0400] git pull git://github.com/canada-ca/accelerators_accelerateurs-gcp.git main
 1287  [2022-03-31 20:57:07 -0400] git add deployment-templates/
 1289  [2022-03-31 20:57:57 -0400] git commit -m "merge remote"
 1290  [2022-03-31 20:58:07 -0400] git push origin main
 1292  [2022-03-31 20:59:09 -0400] git checkout main
 1294  [2022-03-31 20:59:28 -0400] git merge --no-ff canada-ca-main
 1296  [2022-03-31 21:00:15 -0400] git push origin main

20240406: Closing issue during retrofit/rebase of this TEF V1 based/modified repo to TEF V4 standards
This issue may participate in the LZ refactor after rebase
Query on all issues related to the older V1 version via the tag
https://github.com/GoogleCloudPlatform/pbmm-on-gcp-onboarding/labels/2024-pre-tef-v4


Allow setting locale in frontmatter

Is your feature request related to a problem? Please describe.
I am using astro's dynamic routing to build up my urls, and it would be really nice if I could add a hidden locale field to my collection so that it appears in the frontmatter.  As it stands, it seems the only way to determine a file's locale is from the path/filename, unless I'm missing another option.
Describe the solution you'd like
Ideally, this would be as easy as adding a field like { name: "locale", label: "Locale", widget: "hidden", default: "{{locale}}", i18n: true},
Describe alternatives you've considered
I tried to create a preSave handler, but it seems to only run once per entry, and expects data to be returned, not the i18n map which contains the data for the localized versions.

I am working on this @erezrokah


Update index.md

Proposed changes

Unreleased project version (optional)

Related issues (optional)

Deploy preview for modest-edison-79d82e ready!
Built with commit cfd9be68ca114d40540917912b79b3c02afd34e8
https://deploy-preview-7183--modest-edison-79d82e.netlify.com

Deploy preview for modest-edison-79d82e ready!
Built with commit cfd9be68ca114d40540917912b79b3c02afd34e8
https://deploy-preview-7183--modest-edison-79d82e.netlify.com


MovieLens with SAP HANA APL Recommendation (MovieLens App)

Tutorial URL: https://developers.sap.com/tutorials/hxe-aa-movielens-05.html
in step 10, I tried to build HANA DB table, here is the error I see:
$$$$$$$$$$$$$$$$$
Deploying "src/hdb/apl/views/recommendation_contentbased.hdbview"... ok  (0s 325ms)    Deploying "src/hdb/apl/views/recommendation_collaborative.hdbview"... ok  (0s 332ms)
Error: com.sap.hana.di.afllangprocedure: Database error 129: : transaction rolled back by an internal error: "SYS"."AFLLANG_WRAPPER_PROCEDURE_CREATE": line 156 col 5 (at pos 5073):
### AFL error: Registration of AFLLANG wrapper procedure "ML"."movielens.db.hdb.apl.afllang::recommendation" failed with error 'unknown function APL_AREA::CREATE_RECO_MODEL_AND_TRAIN'. [8201003]       at "src/hdb/apl/afllang/recommendation.hdbafllangprocedure" (0:0)
Warning: Worker 3 running the "com.sap.hana.di.afllangprocedure" plugin has encountered an error while deploying 1 objects [8212030]
Error: Worker 3 has encountered an error; all remaining jobs will be canceled [8214600]
Error: Processing work list... failed [8212102]   Make failed (4 errors, 1 warnings): tried to deploy 4 files, undeploy 0 files, redeploy 0 dependent files
Error: Making... failed [8211605] Error: Starting make in the container "ML" with 4 files to deploy, 0 files to undeploy... failed [8214168]Deployment to container ML failed - error: HDI make failed [Deployment ID: none].
Error: HDI make failed(9s 975ms)npm ERR! code ELIFECYCLEnpm ERR! errno 1npm ERR! deploy@ start: node<EMAIL_ADDRESS>ERR! Exit status 1npm ERR! npm ERR! Failed at the deploy@ start script.npm ERR! This is probably not a problem with npm. There is likely additional logging output above.npm ERR! A complete log of this run can be found in:npm ERR!
**/hana/shared/HXE/xs/controller_data/executionagent/executionroot/49f689ad-100c-4ef3-a4d8-c7afc47fa6a6/app/META-INF/cache/node8.15/.npm/_logs/2019-10-01T22_13_34_937Z-debug.log
3:13:25 PM (Builder) Build of /movielens/db failed.
$$$$$$$$$$$$$$$$$$$$
why it shows unknown function APL_AREA::CREATE_RECO_MODEL_AND_TRAIN'
{   "area" : "APL_AREA",   "function" : "CREATE_RECO_MODEL_AND_TRAIN",   "parameters" : [     {"direction" : "IN",  "type" : "movielens.db.hdb.apl::recommendation.tt_function_header"},     {"direction" : "IN",  "type" : "movielens.db.hdb.apl::recommendation.tt_operation_config"},     {"direction" : "IN",  "type" : "movielens.db.hdb.apl::recommendation.tt_variable_descs"},     {"direction" : "IN",  "type" : "movielens.db.hdb.apl::recommendation.tt_movielens_dataset"},     {"direction" : "OUT", "type" : "movielens.db.hdb.apl::recommendation.tt_model"},     {"direction" : "OUT", "type" : "movielens.db.hdb.apl::recommendation.tt_model_node_user"},     {"direction" : "OUT", "type" : "movielens.db.hdb.apl::recommendation.tt_model_node_movie"},     {"direction" : "OUT", "type" : "movielens.db.hdb.apl::recommendation.tt_model_links"},     {"direction" : "OUT", "type" : "movielens.db.hdb.apl::recommendation.tt_operation_log"},     {"direction" : "OUT", "type" : "movielens.db.hdb.apl::recommendation.tt_summary"},     {"direction" : "OUT", "type" : "movielens.db.hdb.apl::recommendation.tt_indicators"},     {"direction" : "OUT", "type" : "movielens.db.hdb.apl::recommendation.tt_model_sql_code"}   ] }

Thank you for your feedback. The issue seems to be resolved, so I am closing the issue.
If you still have questions, feel free to reopen the issue.


 My game is a digital implementation of tic tac toe. The game features automatic scoring as well as alternating placement.

How do you play your game? Press WASD to move the cursor. To select a box press J. The goal is to be the first to get 3 X's or O's next to each other.

Code
Check off the items that are true.

[x] The game was made using the Sprig editor.
[x] The game is placed in the in the /games directory.
[x] The code is significantly different from all other games in the Sprig gallery (except for games labeled "demo").
[x] The game runs without errors.
[x] The name of the file/game contains only alphanumeric characters, -s, or _s.
[x] The game name is not the same as the others from gallery

Image (If an image is used)

[x] The image is in the /games/img directory.
[x] The name of the image matches the name of your file.

Thanks for your PR!

Good implementation as far as my testing showed.  Congratz!  If you're a teen, and you haven't already received one, plz fill out this form to receive a Sprig device!  Also, plz feel free to join Hack Club's Slack, say hi in #lounge or share your game in #sprig!


Add gitHub testing workflow and update sharp

This adds a github workflow so the tests can be run without travis under different node and OS versions.
Since the tests would fail under macos and node 16 I also updated the sharp dependency, therefor fixing #149, #150 and #151

https://github.com/mahnunchik/gulp-responsive/pull/151

Bumping sharp version is not enough for this library to work fine: https://github.com/mahnunchik/gulp-responsive/pull/151#pullrequestreview-702197171

Closing since this seems to be abandoned and I dont use the library anymore


Tree View: programmatic selection does not account for singular selection

🐛 Bug report
Selecting an item programmatically with the select function does not account for singular selection. It always retains the already selected value.
💻 Link to reproduction
No reproduction, but see https://github.com/chakra-ui/zag/blob/b697c965064f6dfec7797c673f67b3348d595eea/packages/machines/tree-view/src/tree-view.connect.ts#L69
🧐 Expected behavior
You shouldn't be able to add more than one item when selection mode is singular.
🧭 Possible Solution
The obvious solution is to to check state.context.selectionMode before deciding whether to append or replace the already selected value. This could either be done in connect or machine, depending on where you feel it fits the best. If we choose the latter, we'd have to simply choose the last value in the set.
I'm not sure what kind of repercussions this might have. If the above solution sounds alright to you I'll submit a PR.
🌍 System information

Software
Version(s)

Zag Version
0.65.1

Browser
Firefox

Operating System
MacOS

Feel free to open a PR @Jonas-C.
For single selection mode, let's warn and choose the last value in the set.

I just pushed a fix for this. We'll release an update shortly.
If the issue persists after upgrading, I'll re-open it.