Need a database/interface for managing our version of the CW, MD, and other crk dictionary sources

In order for us to reliably create and supplement the aggregated dictionary source for Cree Words and the Maskwacîs Dictionary, we need a database solution with some practical interface for managing the content, the interrelationships between the lexical entries (assessment similarity or difference of their English glosses), as well as the addition of new lexical entries and new information concerning these entries.
This database would be the source for creating the the aggregate dictionary source used in (the new, mobile-first) itwêwina as well as the LEXC files used in the crk FST.
In the case of CW, we will be getting incremental additions from AEW. In the case of MD, we would be adding to current content through the validation process of the Maskwacîs recordings - so this is connected with the further development of the validation interface/speech database. So, we will need a pipeline for integrating these additions so that they will end up appropriately in itwêwina.
For both CW and MD (and other sources), we need to ensure that the lexical entries have a proper, full FST-stem as well as a proper inflectional subclass specification, that can be used to generate the FST LEXC code. We will also want to generate a POS-analysis of English glosses for new lexical entries in either source, so that eventually we can generate inflected versions of the English glosses. Also, for new entries in either source, we will want to have some automation to check if a new lexical entry in one source resembles an existing lexical entry in another source, so that the assessment of semantic similarity of the English glosses can be prompted.

This is something we have been looking for for years also in Tromsø. Our present plan is to generalise the structure found in https://satni.uit.no/termwiki/index.php?title=Váldosiidu for terminology to also cover dictionaries, but our experience with the MediaWiki code is mixed, and we don't see this as a viable long-term solution. Also, there is work going on in Helsinki by Mika Hämäläinen targeting the same basic problem.
In the coming year we in Tromsø will have the need to convert at least three dictionaries from various ad-hoc formats to semantically structured xml, and then from there into a tool to allow both editing and maintenance of the dictionary source text as well as synchronisation with lexc sources.
Ideally we would like to separate the monolingual information (lexc, dictionary entry head word + infl. and other information) from the multilingual part (translations, domain specifications, examples, etc), and let the monolingual information be two-way synced with a lexc "database". This way people can continue to work in lexc if they want / need (and it is sometimes way more effective), and the full lexc lemma collection is available for future dictionary enhancements.
We have given these ideas some thoughts, and although we do not have any final solution, I think we should collaborate on this work. More minds, hands and eyes mean more work and good ideas 😃

Our challenge here is that neither of the primary sources (CW nor MD) are static, but both are being added to (CW by AEW through his lexicographical work, and MD based on our recordings word with "new" lexical entries that we will be validating), which need to be continuously contrasted with new additions to either source (not to mention the incorporation of a third dictionary source such as Elders). And these resources are being developed (by others) on whatever platforms, from which we have to import.
Trying to script the aggregation from a number CSV-style sources and comparison files has made it clear that we need some type of proper (relational) database (to deal with the n-to-n relations), and then a linguist-friendly interface to that. At least currently, my idea is a no-frills solution using already existing standard solutions and which an academic can work with (me or our students).

Copying from elsewhere:
@eddieantonio More properly on the longer term, aggregating Cree Words and the Maskwacîs Dictionary should be fixed by creating a proper lexical database of the Maskwacîs Dictionary content, which includes the following information:

Original MD dictionary entry.
Normatized MD dictionary entry.
Matching CW dictionary entry, if any. May require the creation of a unique ID on CW side, if match is ambiguous.
CW-MD English gloss comparison classification (reflecting how the English glosses are presented if comparable).
Cree stem (when appropriate, not for multiword phrases) <- can be extracted from CW, if match established, but likely good to specify under MD dictionary entry as well.
POS and inflectional class (following CW style).
Rapid Words semantic classification numbers
Rapid Words semantic classification labels
POS-parsed version of MD English gloss (useful for Eng-to-Cree search and in creating inflected English paradigm cells, if not already in CW).

The above information, coupled with comparably organized CW content, will allow for the instantaneous and easy dynamic creation of the aggregated Cree dictionaries' content.
Eventually, this will be extended as a result of the validation of the new words and sentences from the Spoken Dictionary of Maskwacîs Cree project.
We should consider whether this should be part of the validation project (as it serves it) or a separate small project.

@aradu12 this is for you, based on our discussion today - we can probably treat this is a top-level meta-issue, under which we organize a number of more specific individual issues that are more straight-forwardly actionable.

This is now being implemented in its own project: https://github.com/UAlbertaALTLab/dictionary-database-model

Moved to UAlbertaALTLab/dictionary-database-model#3.


Add () to all calls of rest method "Packages" that have no argument (#3575)

@matthid did we do this on purpose because some other feed needs it like this?

Yes I think other feeds don't like the braces

so what now??

Our current workflow is we release and revert, forget and repeat ;)

I have investigated some more. Our Artifactory server also supports Nuget V3 but the problem here is that it doesn't expose the resources with ".../api/nuget/v3/packages-nuget/index.json" but only ".../api/nuget/v3/packages-nuget", so paket does not recognise this api.
A solution here would be to remove the "index.json" from the regex in packagesources.fs:
                    if Regex("/v3(?:/[-\w]+)?$").IsMatch source then
                        NuGetV3 { Url = source; Authentication = auth }
                    else
                        NuGetV2 { Url = source; Authentication = auth }

instead of
                    if Regex("/v3(?:/[-\w]+)?/index.json$").IsMatch source then
                        NuGetV3 { Url = source; Authentication = auth }
                    else
                        NuGetV2 { Url = source; Authentication = auth }

mmm that could work as well

I've added a new pull request with this proposal
[https://github.com/fsprojects/Paket/pull/3588]

but this is not really fixed is it?

You're right. A solution that doesn't break other feeds would be to try with braces only if the call without braces fails

Ok with all the PRs I missed that #3575 is actually still open


Give us a like on ngmodules

If you are using it and like it, please Give us a like on ngmodules
Thanks

Thanks all :+1:

@Voles do you have access to the ngmodules page so we can update it with the current .io site and pointing to the github.com/angular-ui-tree instead of the jim-liu link for consistency?


trial of palette-mobile

This PR resolves []
Description

PR Checklist

[ ] I tested my changes on iOS / Android.
[ ] I added screenshots or videos to illustrate my changes.
[ ] I added Tests and Stories for my changes.
[ ] I added an app state migration.
[ ] I hid my changes behind a feature flag.
[ ] I have prefixed changes that need to be tested during a release QA with [NEEDS EXTERNAL QA] on the changelog.

To the reviewers 👀

[ ] I would like at least one of the reviewers to run this PR on the simulator or device.

Changelog updates
Changelog updates

Cross-platform user-facing changes

iOS user-facing changes

Android user-facing changes

Dev changes

Need help with something? Have a look at our docs, or get in touch with us.

done

making a beta for this one too, and ill remove the extra text thing


Removing redundant entries

@alexalikiotis I think your fork might be out of date,  that is what is causing those errors.   might want rebase on the latest master

@lholmquist you were right, rebase fixed the issues 👍


expose symbolMaster.ID on importable symbol refference

Please indicate if this is not the correct place for this.
I was wondering how to get the following information via the API, and if this is on the roadmap.
For a plugin that I develop I am swapping symbols from one library to another library. Each library is identical to eachother except for some color variations and the document ID.
I am looking for a way to import a symbol from a library based on the symbolMaster.ID
With this I am already capable of getting all imprtable refferences from that library.
https://developer.sketchapp.com/reference/api/#importable-object
var document = require('sketch/dom').getSelectedDocument();
var Library = require('sketch/dom').Library;
var library = Library.getLibraryForDocumentAtPath('/path/to/my/library/library.sketch');
var symbolReferences = library.getImportableSymbolReferencesForDocument(document);

Although each refference has an this is not the same ID as the symbolMaster.ID
Is there a way to get the symbolMaster.ID from the importable object withouth importing the whole symbol?

@mathieudutour As suggestion could you update https://developer.sketchapp.com/reference/api/#importable-object and add to the documentation that the symbolReference.id === symbolMaster.symbolId ?

I just checked a bit more thoroughly, and in my case symbolReference.id !== symbolMaster.symbolId
The importable object:
{
  type: 'ImportableObject',
  id: 'FE134E06-DC85-4FD7-8DFB-AB917144D97C',
  name: 'Button/1. Touch & pointer/1. Primary/1. Text/1. Normal',
  objectType: 'Symbol' }

The symbol Master from my current document:
{ type: 'SymbolMaster',
  id: '64C7778B-ADE9-412F-A792-DAF9B48F08F6',
  frame: { x: 2801, y: 0, width: 85, height: 40 },
  name: 'Button/1. Touch & pointer/1. Primary/1. Text/1. Normal',
  selected: false,
  layers:
   [ { type: 'Shape',
       id: 'BD99D5D7-7C12-47CC-B7A4-92A1AA646F8C',
       frame: [Object],
       name: 'button>primary>background>normal',
       selected: false,
       flow: null,
       hidden: false,
       locked: false,
       style: [Object] },
     { type: 'Group',
       id: 'B3E90807-18D3-4F94-A0EE-870E5A5656F5',
       frame: [Object],
       name: 'button>primary>>normal',
       selected: false,
       flow: null,
       hidden: false,
       locked: false,
       style: [Object],
       layers: [Array] } ],
  flowStartPoint: false,
  symbolId: '2B37B1B9-4416-4E5E-B575-C75AAD106357' }

I can do a match on name, but would prefer to do the match on ID, as this is more robust.
The symbolMaster from the library I want to change my symbol to:
{ type: 'SymbolMaster',
  id: '64C7778B-ADE9-412F-A792-DAF9B48F08F6',
  frame: { x: 2801, y: 0, width: 85, height: 40 },
  name: 'Button/1. Touch & pointer/1. Primary/1. Text/1. Normal',
  selected: false,
  layers:
   [ { type: 'Shape',
       id: 'BD99D5D7-7C12-47CC-B7A4-92A1AA646F8C',
       frame: [Object],
       name: 'button>primary>background>normal',
       selected: false,
       flow: null,
       hidden: false,
       locked: false,
       style: [Object] },
     { type: 'Group',
       id: 'B3E90807-18D3-4F94-A0EE-870E5A5656F5',
       frame: [Object],
       name: 'button>primary>>normal',
       selected: false,
       flow: null,
       hidden: false,
       locked: false,
       style: [Object],
       layers: [Array] } ],
  flowStartPoint: false,
  symbolId: 'DA6C981A-D7ED-4558-9EF4-BA1401BC4E58' }

As you can see the symbolMaster.id is the same accros my libraries, symbolMaster.symbolId seems to change over libraries. (my use case: I have 1 master library, and I duplicate that library and only change themes for the other libraries. Only thing I update is the document ID )
If possible can you reopen this request? Still would like to see an ID on the importable refference that is the same as my symbolInstance.master.id


Async websocket handlers

Is your feature request related to a problem? Please describe.
Not really a problem, but I think it'd be nice if on_websocket accepted async handlers
Describe the solution you'd like
Self-explanatory

After another look, I've found out actually implementing this is pretty hard at library-level and extremely easy to implement at a user level:
use async_std::task;
use snowboard::{Request, ResponseLike, Result, Server};
use std::time::Duration;

async fn index(_: Request) -> impl ResponseLike {
	task::sleep(Duration::from_secs(1)).await;

	"Async works!"
}

async fn ws_handler(mut ws: snowboard::WebSocket<'_>) {
	while let Ok(msg) = ws.read() {
		let _ = ws.send(msg);
	}
}

fn main() -> Result {
	Server::new("localhost:8080")?
		.on_websocket("/ws", |ws| {
			async_std::task::block_on(ws_handler(ws));
		})
		.run_async(index);
}

this, as simple as it is, doesn't work due to type issues (closures can only be fn pointers if they don't capture anything, and here we're capturing the handler function). I think this is not going to get implemented yet.
#[cfg(all(feature = "websocket", feature = "async"))]
pub fn on_websocket_async<R: Future<Output = ()>>(
    mut self,
    handler: fn(WebSocket<&mut Stream>) -> R,
) -> Self {
    let new_handler = move |ws: crate::WebSocket| {
        let fut = handler(ws);
        async_std::task::block_on(fut);
    };

    self.ws_handler = Some((path, new_handler));
    self
}


Bypass has_expired check when session store supports TimeToLive

(1 line change)
motivation
(was hoping this would help visitors searching for this issue)
I'm using RedisStore and have trouble extending the session lifetime on visit.
Once PERMANENT_SESSION_LIFETIME is set for RedisStore, the data gets saved with SETEX so the expiration happens automatically. To my understanding, by design, if the store supports TTL, housekeeping functions like cleanup_sessions and even SessionID.has_expired can be ignored by the user for all practical purposes.
issue
The code in https://github.com/mbr/flask-kvsession/blob/master/flask_kvsession/init.py#L148-L152 does the has_expired check based on deserialization of KEY_CREATED, so we end up ignoring the TTL set in save_session in https://github.com/mbr/flask-kvsession/blob/master/flask_kvsession/init.py#L183-L186
proposed change
in open_session, check the store for TTL support prior to the has_expired check; if supported, bypass the has_expired check that relies on KEY_CREATED.
impact
No regressions, and repeated visits apply session lifetime extension according to PERMANENT_SESSION_LIFETIME, though this change feels a bit hacky. Is it sensible?
Thanks!

Yikes. request context is bork. BRB

Current implementation issues aside, this is a hard thing to check for me right now (I'd want at least an hour or two to think through all the scenarios and I'm a little short on time recently).
The issue I can think of is that time-to-live-support in the session backend is "write-only", for lack of a better word - it can influence the way sessions are cleaned up and can only cause sessions to live shorter than usual, but it should not have any impact on how verification is done or sessions are restored. Put simply, there's only mention of ttl_support in save_session(), not open_session().
For better understanding, could you give an example scenario where the new version performs better than the current one?

Ah, I can see it being a problem if TTL vs non-TTL behavior differs here, though currently this behavior doesn't seem to be explicitly documented in either case. I admit I did not consider any other case using any other backend.
Here's an example where the change makes intuitive sense.
Set PERMANENT_SESSION_LIFETIME to 1 minute. Effect is if you visit an endpoint at time t_0, start a session cookie, and don't visit for 1 minute, it gets destroyed. On RedisStore this happens automatically due to SETEX. The server-side key simply vanishes, and a new cookie is issued on the second visit (after >1 minute).
If you revisit in e.g. 30 seconds, due to the ttl block in save_session(), RedisStore runs a SETEX on the session data to now() + app.permanent_session_lifetime, i.e. t_now + 60 = t_0 + 90 seconds. Thus if the user revisits at t_0 + 75 seconds, has_expired section in open_session is unaware of the new expiration set by ttl, and will expire the session anyway, no matter what you did in save_session. In the longest case, the session key will reside on server side for 2x the time as it does on client side (if you revisit immediately before it expires).
To keep open_session as-is, but ensure server-side key lifetime is similar to client side cookie lifetime, you could e.g. change in https://github.com/mbr/flask-kvsession/blob/9309f119bd7b52af97e0af8cdd30226e2fa39b33/flask_kvsession/init.py#L184-L187
            if getattr(store, 'ttl_support', False):
                # TTL is supported
                # OLD
                # ttl = current_app.permanent_session_lifetime.total_seconds()
                # NEW
                ttl_new = store.ttl(session.sid_s)
                store.put(session.sid_s, data, ttl_new)

Here, ttl_new ≤ ttl ≈ CHECK portion of sid_s always.
Put another way, right now there is no method to extend the session lifespan (at least using the in-memory stores) server-side. The closest operation is session.regenerate but that reissues the entire cookie. With this change we are using the server side store as the point of truth: if the key vanished, the session expired, else it's valid. The 1-line check only ensures that behavior is preserved for non-TTL backends.

I have pushed a commit to my fork with expiration tests: https://github.com/whacked/flask-kvsession/commit/c2d972ec464ac36045750ef7e321e63ceee1f129
It's a single new test with a series of assertions testing for session / cookie lifecycle. Some maybe superfluous, but the final assertion is what fails on master but passes on my skip-has_expire-if-TTL-support. So it depends on what kind of behavior you are expecting regarding client side cookie vs. server side session key.

Ah, now I see where you're coming from. That exact use-case is something I had in mind, but I am not comfortable yet implementing it in the way you have. I am not convinced I want to rely on redis to keep session lifetimes, since it is baked into the session id already - I'd like a single source of truth. Furthermore, this makes time-to-live support change the behavior from a security point of view, which is not what I want (sessions should be "portable" across backends).
My own, less elegant but easier to understand idea for solving this was calling regenerate() if the remaining session lifetime is < 0.5 total lifetime or something similar. Basically, err on the side of "losing" a session instead of making security more complicated. This also has the advantage of working across backends, in case someone really is using filesystem-based sessions.
Maybe yours is the way to go, however this is by no means an auto-include, sorry about that.

I understand your point about portability, and I don't have a clearly better method. I tried regenerate() to extend sessions at one point, but the extension based on current lifetime still leads to surprising behavior: for example if you extend it when remaining lifetime is < 0.5 total lifetime, and tell them "you will get logged out automatically if you don't visit in 30 days", and the user visits on day 15 at exactly 0.5 of total lifetime, the session isn't regenerated. They then may wrongly believe they have 30 more days to go.
I am guessing the security part is because you want to keep the lifetime logic invariant? Or is there some other reason? One problem is, once you want to reliably extend the session lifetime, for example by frequently issuing regenerate, you will be making more session writes and cookie exchanges than if you used a bypass. (not saying this PR fixes the issue either, since it's redis-specific)
I will do some more research and revisit, thanks.

I am guessing the security part is because you want to keep the lifetime logic invariant? Or is there some other reason? One problem is, once you want to reliably extend the session lifetime, for example by frequently issuing regenerate, you will be making more session writes and cookie exchanges than if you used a bypass. (not saying this PR fixes the issue either, since it's redis-specific)

It's not set in stone, but I haven't worked with that section of the code in quite some time. Any significant changes should be made carefully =).
I do remember that the idea that writing may be expensive was a factor though; especially if caching is involved. Although I have no numbers to back that up.


Dark Mode for Flame graph reports

Is there an existing proposal for this?

[X] I have searched the existing proposals

Is your feature request related to a problem?
I have an issue when looking at Flame graphs, especially in a dark room, and would like to reduce white light to my eyes.
Describe the solution you'd like
I would love if generated Flame graphs had some sort of toggle at the top of the HTML file which could switch between Light/Dark mode.
Something else to consider would be to attempt to read the machine default value for Light/Dark mode, and initializing Flame graphs to this value.
Alternatives you considered
There are some plugins out there that attempt to auto convert web pages out there that don't support Dark Mode. I am not sure that I have tried one of these with a flame graph, but I could give it a whirl if we think it's worth it.

Are you interested in contributing this feature @jcarnaxide ?

Yes I would be interested in contributing this @pablogsal


Passing a variable that holds an array of schemas into z.discriminatedUnion() fails

Description
Passing a variable that holds an array of schemas to a z.discriminatedUnion() isn't possible on<EMAIL_ADDRESS>📍 Run the issue
const ThingSchemas = [
  z.object({ type: z.literal('vehicle'), name: z.string() }),
  z.object({ type: z.literal('food'), name: z.string() })
];

const Thing = z.discriminatedUnion('type', ThingSchemas);

would prompt Source provides no match for required element at position 0 in target error.
✅ By-pass it
const ThingSchemas = [
  z.object({ type: z.literal('vehicle'), name: z.string() }),
  z.object({ type: z.literal('food'), name: z.string() })
];

const Thing = z.discriminatedUnion('type', [ThingSchemas[0], ...ThingSchemas.slice(1)]);

Manually structuring the first item of the array and spreading the rest for the win 🤟

What are you wanting to be done about this? Or are you just posting it so other people can use your solution?

I'd have expected to work out of the batch. Or am I wrong that it should work? 🤔
So mostly raising the issue and sharing a "hacky" solution for the ones in need 🤟


0.10.1 vs 0.9.3

Is 0.9.3 a patch on 0.9.2, or does it follow on from 0.10.0/should actually be 0.10.1?

Oh crap, should actually be 0.10.1. :scream:

Fixed, thanks!


Noisy DQN

Added Noisy DQN

Is it training?

yes

What’s the reward? And which env?
On Thu, 16 Apr 2020 at 7:55 PM, Het Shah<EMAIL_ADDRESS>wrote:

yes
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/SforAiDl/JigglypuffRL/pull/80#issuecomment-614686197,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AH72FJYFSF5BWCFT3PUHVUDRM4IMDANCNFSM4MIWTWYA
.

--
Sharad Chitlangia
*Research Intern - Harvard University, *
Google Summer of Code Intern with CERN-HSF,
B.E. (Hons.) Electronics and Instrumentation Engineering
Birla Institute of Technology & Science, Pilani
Phone:  +91-9892219249

wait there are some minor errors now, someone changed some code in between

Try now should work

What have you trained this on?

Cartpole-v0

And reward?

max reward 200 after the default no of episodes

Ok cool. We do need to start benchmarking soon though.
On Fri, 17 Apr 2020 at 8:05 PM, Het Shah<EMAIL_ADDRESS>wrote:

max reward 200 after the default no of episodes
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/SforAiDl/JigglypuffRL/pull/80#issuecomment-615279595,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AH72FJ5HRZKG3SOMS6R7QEDRNBSLFANCNFSM4MIWTWYA
.

--
Sharad Chitlangia
*Research Intern - Harvard University, *
Google Summer of Code Intern with CERN-HSF,
B.E. (Hons.) Electronics and Instrumentation Engineering
Birla Institute of Technology & Science, Pilani
Phone:  +91-9892219249

Yea right.

Should we merge this? Or are you adding the other DQNs here?

merge this I'll add variants later

Any reason we're waiting to add the other ones? It might just be better to
get it done and over with, no?
On Sat, 18 Apr 2020, 22:59 Het Shah<EMAIL_ADDRESS>wrote:

merge this I'll add variants later
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/SforAiDl/JigglypuffRL/pull/80#issuecomment-615908378,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AH72FJYMEKMUZ43TSHSVKM3RNHPQJANCNFSM4MIWTWYA
.

I agree. Let's get dqn over with ASAP do that we can move onto trainer class and other common stuff. But I don't have any issue with adding the remaining variants in a different PR..

I'll add distributional today, can anyone of you take up "Adapt multi step bootstrapped return from A3C". I am a bit busy with my sop.

moreover, i don't believe adding variants later would change a lot in the trainer class or the other common stuff. I have added major variants, other variants will just be slight changes.

Right they won't be a lot different, but its majorly because we're just getting done with a major issue and milestone.
A3C will only be possible after some components of Distributed training, so let's just finish with Distributional DQN, we can then move onto the Distributed Training, etc.


Improve Trade History

It would be nice to add a visual information if it was a sell or buy trade, actually there is no information showing what was the order.

Suggested idea :
add a column with "buy/sell" or change "Price" column colour based on type of trade

Hi @Dr-Shin

change "Price" column colour based on type of trade

Actually I did it red for sell and green for buy.
Next time, I'll add side column with buy/sell .

Hello @thanhvk
If you check my screenshot, everything is red but older one (80.864) was a sell order while others were what i bought back, so buy order.
Is your modification live on v1.2.2 ?

Is your modification live on v1.2.2 ?

Yes, I did it for long time ago.
On our exchange dex.tomochain.com it work well, you can see the image below:

@thanhvk
Selling order (80.864 tomo) : https://scan.tomochain.com/trades/0x26eb748b1071e992a9a2e77d435f11d8eab27e4a948cb7a8aea53bf24be2f68d
One of the buy order (56.134 tomo) :
https://scan.tomochain.com/trades/0x83c0ef8d25e614350bfe5f045d2dbd3e8bf61bb8ef7916a524c638ab1656e4d1
Both are showing red with down css class. Are you checking if market is going up or down to handle colour instead of buy/sell order type ?

This is a bug, I'll fix it.
I use the trade's side to add color for the price.

Fixed at commit https://github.com/tomochain/tomox-sdk-ui/commit/f26cf03cfc9f7ae11d65bb2cacc1a441f64a28a0


[api-docs] Parentheses are missing in: GetCurrentLocale

A new commit was made into the api-docs repo. This issue was created automatically. Need to review if we made any change to the library for this commit.
https://github.com/discord/discord-api-docs/commit/8a6131344a7a48f8b5c9b904085dc06ab935e017

This commit will not effect our lib's code. No changes required.


Automated cherry pick of #10152

Cherry pick of #10152 on release-6.6.
/cc  @lieut-data
NONE

Will try to auto merge this PR once all tests and checks are passing. This might take up to an hour.


ERROR: relation "sessions" does not exist

Upgraded from Gitlab 7.1.1 to 7.7.2 with CI, and decided to give CI a try. However after adding ci_external_url to /etc/gitlab/gitlab.rb it throws a 500 Error.
production.log contains the following:
Started GET "/" for <IP_ADDRESS> at 2015-02-04 09:14:35 +0200
Processing by ProjectsController#index as HTML
PG::UndefinedTable: ERROR:  relation "sessions" does not exist
LINE 5:                WHERE a.attrelid = '"sessions"'::regclass
                                          ^
:               SELECT a.attname, format_type(a.atttypid, a.atttypmod),
                     pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
                FROM pg_attribute a LEFT JOIN pg_attrdef d
                  ON a.attrelid = d.adrelid AND a.attnum = d.adnum
               WHERE a.attrelid = '"sessions"'::regclass
                 AND a.attnum > 0 AND NOT a.attisdropped
               ORDER BY a.attnum

Redirected to
Completed 500 Internal Server Error in 5ms

ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR:  relation "sessions" does not exist
LINE 5:                WHERE a.attrelid = '"sessions"'::regclass
                                          ^
:               SELECT a.attname, format_type(a.atttypid, a.atttypmod),
                     pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
                FROM pg_attribute a LEFT JOIN pg_attrdef d
                  ON a.attrelid = d.adrelid AND a.attnum = d.adnum
               WHERE a.attrelid = '"sessions"'::regclass
                 AND a.attnum > 0 AND NOT a.attisdropped
               ORDER BY a.attnum
):
  app/controllers/application_controller.rb:76:in `check_config'

Solution: Run gitlab-ci-rake db:migrate
Source: http://stackoverflow.com/a/28315987/1769575


Add support for binary dependencies

Problem
I couldn't find an issue about this so opening one. In my blog post about writing your own rust linter, I need to have two cargo binaries:  the first calling the second with the right arguments. However, it means that I need to ask users to install the two binaries (with cargo install) manually.
Proposed Solution
It would be quite convenient if I could add in my Cargo.toml:
[binary.dependencies]
cargo-tools-inner = "x.y.z"

Like that, when running cargo install cargo-tools, it would also install cargo-tools-inner automatically. It's also important that the version is respected as the argument passed to cargo-tools-inner is quite important (the rustc toolchain to be used).
Notes
No response

That sounds like https://rust-lang.github.io/rfcs/3028-cargo-binary-dependencies.html

It's exactly what I want. :+1: Closing the issue then, thanks!


🐛 [firebase_crashlytics] Handling exception in Image.network

Bug report
I'm using Image.network with errorBuilder but crashlytics is still filled with exceptions. Because of these exceptions, I'm unable to see real issues in the firebase dashboard, because thousands of exceptions are related to Image.network only. I would like not to get any of the Image.network exceptions, even if the image URL throws 404 or some other invalid status codes. Even if internet was not available at that time, it should not throw exception. I just want to show Image.asset if an image was not found on Image.network.
Steps to reproduce
Image.network(
    "https://example.com/404.png",
    errorBuilder: (BuildContext context, Object exception, StackTrace? stackTrace) {
        return Image.asset("assets/noImage.png");
    },
)

Expected behaviour
Crashlytics should not pick up exception because we are already handling it with "errorBuilder"

@sukhcha-in
Can you provide flutter doctor -v, plugin version and the exceptions you are receiving in crashlytics ?

Thanks for the update. I see same behavior using code sample provided and logs from crashlytics.
Keeping it open and labeling for further insights from the team.

Same here as well. We cannot tell any backing guys to update image and all because we are already handling these in error builder and we do not want that in our firebase crashlogs

face same issue here

Same here , we should not report error on firebase crashlytics if we are already handling them through image view

Still waiting for an update.

/cc @russellwheatley

We are still facing this issue, waiting for update.

Are you sure the error isn't coming from inside the errorBuilder? I've just tested this and it does not log the error if you actually have an asset. For illustration:
If you have this setup:
Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await Firebase.initializeApp(
    options: DefaultFirebaseOptions.currentPlatform,
  );
  FlutterError.onError = (errorDetails) {
	// ERROR HANDLER THAT SENDS UNCAUGHT ERRORS TO CRASHLYTICS
    FirebaseCrashlytics.instance.recordFlutterFatalError(errorDetails);
  };
  runApp(MyApp());

The exception will make its way to the error handler if your asset does not exist:
Image.network(
    "https://example.com/404.png",
    errorBuilder: (BuildContext context, Object exception, StackTrace? stackTrace) {
		// THIS WILL MAKE ITS WAY TO THE ERROR HANDLER IF IT DOES NOT EXIST
        return Image.asset("assets/noImage.png");
    },
)

If the asset exists, no error in the error handler.

@russellwheatley
I have recordFlutterError instead of recordFlutterFatalError just like documentation suggests.
FlutterError.onError = FirebaseCrashlytics.instance.recordFlutterError;

It doesn't matter which one you use, it has to reach FlutterError.onError for either recordFlutterError or recordFlutterFatalError  to be called.

@russellwheatley Okay! I think there is no reason to close this issue, Console is full of image errors even when using errorBuilder.

Did you read this?
Please provide a reproduction as I can't reproduce. Preferably a github repo. Thanks.

@russellwheatley I have the exact code mentioned in this snippet.

if you're still experiencing this problem

Yes

Reopening based on above comment and for further action.
/cc @russellwheatley

I have the same issue with network images but using the CachedNetworkImage
See
https://github.com/flutter/flutter/issues/102494

I'm closing this out as I have already requested a reproduction which the OP has not provided. If you're seeing exceptions it is highly likely that your asset does not exist or you have not specified it in your pubspec.yaml as I have already explained here.


Use uri task to wait for Jenkins to start up

Using the pause task is a bit problematic, since it can either waste a
lot of time on fast systems or time out on really slow ones. This
commit uses the uri task to fetch the Jenkins homepage until it
returns status code 200. Jenkins will return 503 (service unavailable)
while it is loading.

Thanks @nre-ableton!


create sample module, prevent crash when getScripts,getStyles,getTrannslations returns null or empty list

Create sample Module in defaults folder, not added to defaults list
implements all the module methods..  (fix module loader to not fails if null or empty list returned from the three get...(files)  methods

Never saw mention of helloworld in developers doc.

I'll close this PR for know. If you feel this should remain ope feel free to let me know.


Fix #1020

@basnijholt I am now seeing a warning saying that the current behavior will stop working in 2025.1, which is going to be coming out very soon.  Any change to get this fix merged in and a new version released?
2024-12-31 14:04:50.326 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration adaptive_lighting with title: <REDACTED> and entry_id: <REDACTED>, during setup without awaiting async_forward_entry_setup, which can cause the setup lock to be released before the setup is sone. This will stop working in Home Assistant 2025.1, please report this issue


Use shimx64.efi for EFI boot.

We shouldn't be setting EFI boot to grubx64.efi, but rather shimx64.efi instead.
This commit also makes sure that both grub2-x64 and shim-x64 are properly
installed in an EFI boot system.

This PR broke ARM support. In case of ARM64 x64 should be replaced with aa64


Allow rank to be an optional parameter

Thanks for the project.  SVG looks real good.
I was wondering if you could make the "rank" data optional. I personally think it makes my stats look bad since it displays +100000. Should be pretty easy to add.
Thanks

Closed #2


dune_3: 3.16.1 -> 3.17.0

Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[x] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

@GrahamcOfBorg build ocamlPackages.hxd

For some reason, the dune cache is enabled, and there seems to be an error that cannot create a directory for it. I don't usually use Nix and don't know how to work around this. Can you help me?

Related PRs:

https://github.com/ocaml/dune/pull/10710
https://github.com/ocaml/dune/pull/10944

Here is an other suggestion:
--- a/pkgs/development/ocaml-modules/hxd/default.nix
+++ b/pkgs/development/ocaml-modules/hxd/default.nix
@@ -23,6 +23,10 @@ buildDunePackage rec {

   doCheck = true;

+  preCheck = ''
+    export DUNE_CACHE=disabled
+  '';
+
   meta = with lib; {
     description = "Hexdump in OCaml";
     homepage = "https://github.com/dinosaure/hxd";

@vbgl Isn't this possible for all packages using dune?

@GrahamcOfBorg build ocamlPackages.hxd

@GrahamcOfBorg build ocamlPackages.hxd

@GrahamcOfBorg build ocamlPackages.ligo

Other newly failing OCaml libraries: ocplib-simplex, melange.

@GrahamcOfBorg ocamlPackages.melange

ocplib-index can be fixed using the following patch:
diff --git a/tests/dune b/tests/dune
index 4fcdd22..b0e0fff 100644
--- a/tests/dune
+++ b/tests/dune
@@ -11,41 +11,3 @@
    standalone_minimal
    standalone_test_strict_bounds)
  (libraries ocplib-simplex zarith))
-
-(rule
- (alias runtest)
- (action
-  (diff solveEmpty.expected solveEmpty.output)
- )
-)
-
-(rule
- (alias runtest)
- (action
-  (diff
-    standalone_minimal_maximization.expected
-    standalone_minimal_maximization.output
-  )
- )
-)
-
-(rule
- (alias runtest)
- (action
-  (diff
-    standalone_minimal.expected
-    standalone_minimal.output
-  )
- )
-)
-
-(rule
- (alias runtest)
- (action
-  (diff
-    standalone_test_strict_bounds.expected
-    standalone_test_strict_bounds.output
-  )
- )
-)
-

@vbgl Can you add commits to this PR? I'm completely new to the Nix ecosystem and still don't understand which packages are broken and how.

I’ve just done it and included in this branch commits from other PRs (#362572 & #363369).

Thanks a lot!

Thanks a lot!


Benchmark

I also wonder about perhaps creating a template that builds a benchmark config.  It's a bit of a shame since we have one simple template now.

I suppose it could also be an option.  In some sense that dovetails into deploying an app.  I wonder if we'll need modifications for Cloud Launcher.  Perhaps we do that first...

Had a conversation with Babu on this today.  We're next chatting 7/13.  He's doing some initial work too!


Not exposing any metrics, nor logging any error

Well, I would give more detail if there would be any..

Now that I look at the code, there are many issue with it. For most it should use const metrics and implement a collector. But even as it is right now, it's not handling errors which is a problem.

I have the same problem

Are you guys using free_tier zones? If thats the case then probably the issue is related to https://github.com/lablabs/cloudflare-exporter/issues/32


Use certigo to read keystore files

Use certigo to read keystore files. Allows reading PEM on top of PKCS12, if certificate and keystore are in same file. Also allows reading JCEKS and PKCS7, although those are not really that important imo. Adds some vendored libs, check my commits to review individually.

Build failure was only on the initial commit, because I wanted to split out the vendoring changes. The --help info lists PEM and PKCS12 now which I think is sufficient.


Add image inset support for tab bar item

@jamonholmgren I was considering doing the :properties hash thing but this is one of the last tab bar item properties left for us to implement. This way feels more consistent with what we already have.

Maybe a spec?

Surely. :grin:

That spec totally passes locally. Promise.

:+1: Stage on 2.3 branch.

Staged for release on the version-2.3 branch.


IOS : Notifications not display in iOS background mode

Notifications sent using Notifee in a React Native project do not display when the app is in the background on iOS devices. when if app is on foreground it working as expected. However, notifications sent directly from the Firebase console appear correctly in background mode.
For Android it working fine.

If you use data only notifications - iOS wont pick it up
It caused trouble for me and i moved to notification messages

@Gautham495 Thanks for reply here i attached my payload :
{
"fcmTokens": [
"efliWkBTT4y6OEI3KtosasG:APA91bFDuNqwG87vZZLJCLMJilhLySnHrL5YtHmB3cG0iZ7JIEkALJXO7UdTFhxCmMkSCBiSWDpMih_uX_BVSmT8acMYP93xcRPlJe8QbILWcg8KhUoEHq5wBrZn7Nkm2sHg5pf_CY5d"
],
"notificationPayload": {
"title": "Hello Title1",
"subtitle": "sub Title1",
"body": "Fuck body1",
"data": {
"navigate": "https://housivity.com/rivfd7"
},
"android": {
"showTimestamp": true,
"color": "#0D264F",
"smallIcon": "ic_small_icon",
"style": {
"type": 1,
"text": "Large volume of text shown in the expanded statehttps://media.licdn.com/dms/image/D4D0BAQGezZnpi2-TRQ/company-logo_200_200/0/1713163177293/housivity_com_logo?e=2147483647&v=beta&t=CBld_IU5a3M88r99_JqeJizwYyBkLjpuh5Xg3eJIknwhttps://media.licdn.com/dms/image/D4D0BAQGezZnpi2-TRQ/company-logo_200_200/0/1713163177293/housivity_com_logo?e=2147483647&v=beta&t=CBld_IU5a3M88r99_JqeJizwYyBkLjpuh5Xg3eJIknwhttps://media.licdn.com/dms/image/D4D0BAQGezZnpi2-TRQ/company-logo_200_200/0/1713163177293/housivity_com_logo?e=2147483647&v=beta&t=CBld_IU5a3M88r99_JqeJizwYyBkLjpuh5Xg3eJIknwhttps://media.licdn.com/dms/image/D4D0BAQGezZnpi2-TRQ/company-logo_200_200/0/1713163177293/housivity_com_logo?e=2147483647&v=beta&t=CBld_IU5a3M88r99_JqeJizwYyBkLjpuh5Xg3eJIknw"
},
"largeIcon": "https://media.licdn.com/dms/image/D4D0BAQGezZnpi2-TRQ/company-logo_200_200/0/1713163177293/housivity_com_logo?e=2147483647&v=beta&t=CBld_IU5a3M88r99_JqeJizwYyBkLjpuh5Xg3eJIknw",
"channelId": "general",
"importance": 4,
"pressAction": {
"id": "default"
},
"actions": [
{
"title": "Dance 👯",
"pressAction": {
"id": "dance"
}
},
{
"title": "<p style="color: #f44336;">Cry 😭",
"pressAction": {
"id": "cry"
}
}
]
},
"ios": {
"critical": true,
"sound": "default",
"criticalVolume": 0.9,
"interruptionLevel": "timeSensitive",
"categoryId": "post",
"attachments": [
{
"url": "https://farm4.staticflickr.com/3075/3168662394_7d7103de7d_z_d.jpg"
}
]
}
}
}
any idea?

Hi @medreres I'm not using expo

My index.js
`import { EventEmitter } from "eventemitter3";
export const eventEmitter = new EventEmitter();
function HeadlessCheck({ isHeadless }) {
if (isHeadless) {
// App has been launched in the background by iOS, ignore
return null;
}
// Render the app component on foreground launch
return ;
}
const onMessageReceived = async message => {
const notification = JSON.parse(message.data.notifee);
await notifee.displayNotification(notification);
};
messaging().setBackgroundMessageHandler(onMessageReceived);
messaging().onMessage(onMessageReceived);
notifee.onBackgroundEvent(async ({ type, detail }) => {
const { notification, pressAction } = detail;
// Check if the user pressed the "Mark as read" action
if (type === EventType.PRESS) {
//For Android only
if (detail.notification)
eventEmitter.emit("notificationReceived", detail.notification);
// Remove the notification
await notifee.cancelNotification(notification.id);

}
});
AppRegistry.registerComponent(appName, () => HeadlessCheck);
`

I'm having this issue too, any news or solutions?

@Gautham495 is this true? data only notification won't work on iOS? they work as expected on android, since I let notify build the notification from this FCM data only notif.
anyone managed to find the root cause?

It worked for us on android too but nit much in ios.

OK found the issue on my end: make sure you added the setup_permissions in your podfile through react-native-permissions as per their doc: https://github.com/zoontek/react-native-permissions
once I did this, re-did a pod install, then I could see the background received notification from notifee. (caught by FCM, displayed by notifee)

data-only notifications can work on iOS, and they do sometimes
But they are heavily documented by Apple as being unreliable. Apple will frequently not deliver those messages to your app for a variety of reasons which they will not change.
So only use them for "nice to have" features, and do not expect them to work much for real users in the real world unless they use your app near-addictively and they have devices that are not too warm (not kidding!) with lots of battery status (so your app gets power budget and will be woken up for delivery)

thanks @mikehardy for this additional info.
so now I'm confused, for android I must rely on data only notification, otherwise my app will display twice the notification (one with the title/body as per the FCM server handled it, and another one with the edited notifee display notification)
I am using an edge function (supabase) to send the notification, like this:
  const res = await fetch(
    `https://fcm.googleapis.com/v1/projects/${serviceAccount.project_id}/messages:send`,
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
        Authorization: `Bearer ${accessToken}`,
      },
      body: JSON.stringify({
        message: {
          token: fcmToken,
          // notification: {
          //   title: payload.record.title,
          //   body: payload.record.body,
          // },
          // android: {
          //   notification: {
          //     channel_id: payload.record.room_code ? 'room_invites' : 'buzz', // Set the correct channel ID
          //     icon: 'ic_launcher_notif', // Small icon from Android res/drawable
          //   }
          // },
          // we send a DATA ONLY notification from FCM, notifee in charge to display notif from front
          data: {
            ...(payload.record.room_code && { // Conditionally add deeplink if room_code is set
              deeplink: `my-app://room/${payload.record.room_code}`,
            }),
            avatar: userAvatar || '', // Always include avatar if it exists
            from_name: userName || '',
            title: theTitle,
            body: payload.record.body,
            type: payload.record.type
          },
        },
      }),
    }
  )

it works awesome on android, but on iOS I feel like the notifee.displayNotification is not working:
await notifee.displayNotification({
           title: title,
           body: body,
           data: remoteMessage.data, // Pass along any data payload for deeplinking
           android: {
               channelId, // Dynamically set the channelId
               smallIcon: 'ic_launcher_notif',
               largeIcon: avatar ? avatar : undefined, // display avatar of friend?
               color: MAIN_PINK,
               // pressAction is needed if you want the notification to open the app when pressed
               pressAction: {
                   id: 'default',
               },
               sound: 'rizz', // Android < 8.0 (API level 26)
           },
       });
       ```
       since it doesn't catch the press action or any press event when I tap on it (as described below)
       ```

      notifee.onBackgroundEvent(async({ type, detail }) => {
   console.log('NOTIFEE ONBACKGROUND: ', type, detail)
   if (type === EventType.PRESS) {
       if (detail.notification?.data?.deeplink) {
           console.log('event press open notif: ', detail.notification?.data?.deeplink)
           await Linking.openURL(detail.notification.data.deeplink); // mainscreen not yed loaded in killed state to handle the deeplink :/
           storage.set('deepLinkUrl', detail.notification.data.deeplink);
       }
       // await notifee.cancelAllNotifications();
   }
});

so now I am super confused on what is missing; or how am I supposed to handle both ios and android without knowing from my server which device the receiver will have :/

I see what you're saying but do not have a good answer. You say "without knowing from my server which device the receiver will have" --> why not? device tokens are registered as an active process and they are specific to a device. You know what device type is as the token is registered, you can store that and send different messages to different device types as needed.
Statements that include the words "you can" are easy to type out, I understand - and it implies code etc, but, it's possible and if that's the UX you need, that's how to do it. Otherwise for Android you need to just send notification-block-containing messages but not also pop a notifee notification in response, as you'll get the low-level firebase-android-sdk notification and the notifee one, which you indicate is unwanted

yeah true, easy to catch the platform and send it to the DB; my main concern was mainly for edge cases of users switching devices etc. But I guess it remains edge case.
so now my last struggle is on this doc: https://notifee.app/react-native/docs/ios/remote-notification-support
mentioning apns as part of the payload if we want to have some "events" attached to it.
whatever I do I am unable to have any PRESS or ACTION_PRESS event on iOS; unless setting categories is ALSO mandatory if we want to handle events? (as per https://notifee.app/react-native/docs/ios/categories)
for ios all of it is super confusing tbh

There is no edge case on device switch: device switch === new token
Tokens are tied strongly to a specific device
iOS is not easy no, I don't have time to go deeper into the actions at the moment as I think there are some existing actual issues with the module at the moment and those require testing + research which is queued for me but not going to happen this moment, in this text box :-)
I just wanted to try to help with the FCM contents and how platforms differ for delivery since that one is for the most part settled knowledge based on what I know


[PATCH] Add VS hosts file for F# templates

See https://github.com/aspnet/templating/pull/336#issuecomment-370572137
Include this change in the next patch release for 2.0

This patch is approved for 2.0.7. I'll start an email thread to offer steps/instructions.


wip: implement basic password handling

The sensitive fields have to be redacted from logs and possible error event logging.

The sensitive fields have to be redacted from logs and possible error event logging.

@hdiniz What's your recommendation to achieve this?

The sensitive fields have to be redacted from logs and possible error event logging.

@hdiniz What's your recommendation to achieve this?

These are places where I think we can prevent accidental logging of the fields:

Use beforeSend and beforeSendTransaction hooks on the Sentry SDK init
https://docs.sentry.io/platforms/node/data-management/sensitive-data/#scrubbing-data
https://github.com/opencollective/opencollective-api/blob/main/server/lib/sentry.ts#L31

Review places where we are logging graphql variables or request params. For Sentry, the hook above might cover everything.
https://github.com/opencollective/opencollective-api/blob/main/server/lib/sentry.ts#L256

Sentry has an option to scrub sensitive fields when they are ingested, we can enable this and specify field names. This might be a catch all for Sentry, but we would still be sending the data out.
https://docs.sentry.io/product/data-management-settings/scrubbing/server-side-scrubbing/

Hyperwatch logs
https://github.com/opencollective/opencollective-api/blob/main/server/lib/hyperwatch.js#L77


Bug: Unavailable option -watchdog in startvm

What happened:
Using QEMU on newer systems (even Debian Bookworm) will report, that the watchdog option is not more present. Therefore, startvm will fail:
Press any key to continue...
qemu-system-x86_64: -watchdog: invalid option

Not sure about amd64, but at least for aarch64 this was fixed in https://github.com/gardenlinux/gardenlinux/pull/1777

Not sure about amd64, but at least for aarch64 this was fixed in #1777

Unfortunately, this also applies to some newer versions of qemu-system-x86_64. The current implementation was therefore also only for Debian based systems before bookworm. IMHO, I think we can safely remove this. You might have a look at my PR #1948. Let me know if you like to have any changes.
Have a great weekend!
Cheers,
gyptazy


Logout and silentlogin

Hello,
I use angular-oauth2-oidc (v10.0.3) and angular-oauth2-oidc-jwks (v9.0.0) in implicit flow.
In the AuthConfig, the logoutUrl attribute is filled (https://domain.com/x/y/logout type)
When I logout(false) from the page which is the redirect URI, the logout works (it logouts the user and displays the auth server page which says "you have been disconnected").
It seems correct (even if I would like a redirection to the login form after logout instead of the page which says "you have been disconnected").
In this case, I'm sure the user has been completely disconnected because if I try to access a page again, the silent login (initImplicitFlow method call) displays the login form.
However, if we logout from a page which is not the redirect URI page (or post logout redirect uri page), the library redirects the user to this redirect uri page just after the logout method has been called.
As this page also handles silent login (initImplicitFlow method call), and, I don't know why but it seems that the logout process has not been completed and it succeeds to reconnect the user automatically.
Why and how to handle it with angular-oauth2-oidc?
Thanks,
Silslt.

I think I largely follow your question, but it is built on a specific setup to which we have no access. The library does nothing really special here, all involved parts are OIDC spec stuffs (where to redirect and whatnot), or application-specific stuff (when your app refreshes or not).
You could have a look how I handle things in my sample setup, otherwise I think you need to provide a minimal repro about your scenario. In that case I also think Stack Overflow will give you better reach, possibly.
Good luck!

I found the solution. I had redirection problems in the application due to the href of the logout button.
You can close this post.
Thanks.


Animation effect on browsing pictures

Could you please make this to Aves,
https://transfer.sh/12sAT3N/screen-20210626-141747.mp4
This is an archived project, Camera Roll, https://github.com/kollerlukas/Camera-Roll-Android-App

Nice effect, thanks for the suggestion! It's done in https://github.com/deckerst/aves/commit/dc4db4c4e394b28aa49de9437c2772d7a276eb59 and will be in the next release.
Camera Roll and Aves use different UI components to scroll through the images, so don't expect an exact replica. I just added the parallax effect to what was already in Aves. It is notably different when the image doesn't take the full width of the device.

🤟

Is it possible to add an option to enable/disable this animation effect? I personnaly find it a a little bit dizzy.

Instead of sliding the pictures, you could tap on the screen edge to go to
the previous/next picture without animation. You can enable this gesture in
Settings > Viewer > Tap on screen edge.
On Thu, 16 Feb 2023, 11:31 wh7, @.***> wrote:

Is it possible to add an option to enable/disable this animation effect? I
personnaly find it a a little bit dizzy.
—
Reply to this email directly, view it on GitHub
https://github.com/deckerst/aves/issues/48#issuecomment-1432867167, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ADKBEXNRGLBYPLAGU2S6GV3WXX6YHANCNFSM47LERLOA
.
You are receiving this because you modified the open/close state.Message
ID: @.***>


private_class_method may kill parameter documentation

The following source code:
class Foo
  # @param [Numeric] a
  # @return [Numeric]
  private_class_method def self.foo(a)
    a + 1
  end
end

Results in a warning:
[warn]: @param tag has unknown parameter name: a
    in file `yardoc.rb' near line 4

The warning is gone if the @return tag is removed, or if the private_class_method modifier is removed.
Environment details:

OS: Ubuntu 16.10, kernel 4.10.0-42-generic
Ruby version (ruby -v): ruby 2.3.3p222 (2016-11-21) [i386-linux-gnu]
YARD version (yard -v): yard 0.9.12

I have read the Contributing Guide.

This is a known issue-- (private|public)_class_method is not supported as an inline prefix to defs, just as public or private prefixes are also not yet supported. A PR would be accepted to add support.
As a workaround, you can use the old syntax of:
class Foo
  def self.foo(a) a + 1 end
  private_class_method :foo
end

Closing out old issues. Please re-open or open a fresh issue with new context if this is still affecting you.


doc: fix multiple H1 headings

Only one H1 heading (first for the title) allowed.

@chensuyue @ashahba review and merge please


[Feature] Add Dora Calculator

Description
Dora have some issues in her eyes so that she can't able to see the things which is nearby or faraway from her eye site.
for that i like to make an calculator to check if the entered distance can be visible by dora or not.
Screenshots
No response
Checklist

[X] I have checked the existing issues.
[X] I follow Contributing Guidelines of this project.
[X] I am a GSSOC'24 contributor.
[ ] I am a IWOC'24 contributor.
[ ] I am a JWOC'24 contributor.
[ ] I am a SWOC'24 contributor.

Code of Conduct

[X] I agree to follow this project's "Code of Conduct".

"Dora the Explorer" is a famous cartoon character beloved by children. In the show, Dora often asks viewers for help finding objects that are right in front of her. It can be quite frustrating how she sometimes fails to notice things that are nearby. To improve this, Dora could use help from her friend, Map, who can guide her to see the objects clearly within her line of sight.
With the help of map, the map can give the distance of the object. with that we can calculate the distance from Dora to that thing which can be visible by her or not is the motive of this issue.

Go ahead @Tamilkumaran17


fix: grails-quartz feature

This PR fixes a bug introduced by https://github.com/grails/grails-forge/pull/276

I have now created a PR (#324) that fixes the problem with failing tests.
Maybe merge #324 first and then rebase this one to see the tests pass before merging?

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


Update dxvk.conf

Added hud config valuesalong with their definition the goal is to eliminate the necesity to rely on project readme for configuration

Also try to make the commit name a bit informing so it can be seen just from your name what the commit does.
The common style would be something like
[meta] Add dxvk.hud options to example config

thanks for the code reviews and all the hints


Add files via upload

Deleted prior commit.  pinRec issue is corrected in this version.

When I run a DRC check in KLayout, it generates no DRC errors.  I can't determine why it fails the automatic DRC check after making a pull request.


errors: Fix where error arrow points as number of lines grows

This fixes where the arrow points in when an error occurs earlier in a larger file. Before, we were miscalculating the largest line number, which caused us to miscount how many spaces over to put the arrow and label.
Before:
Error: Type mismatch: expected ‘i64’, but got ‘String’
----- testme.jakt:3:15
 2 |   let x = "bob"
 3 |   let y = x / 3
                    ^- Type mismatch: expected ‘i64’, but got ‘String’
 4 |
-----
Error: Binary arithmetic operation between incompatible types (‘String’ and ‘i64’)
----- testme.jakt:3:11
 2 |   let x = "bob"
 3 |   let y = x / 3
                ^- Binary arithmetic operation between incompatible types (‘String’ and ‘i64’)
 4 |
-----

Now:
Error: Type mismatch: expected ‘i64’, but got ‘String’
----- testme.jakt:3:15
 2 |   let x = "bob"
 3 |   let y = x / 3
                   ^- Type mismatch: expected ‘i64’, but got ‘String’
 4 |
-----
Error: Binary arithmetic operation between incompatible types (‘String’ and ‘i64’)
----- testme.jakt:3:11
 2 |   let x = "bob"
 3 |   let y = x / 3
               ^- Binary arithmetic operation between incompatible types (‘String’ and ‘i64’)
 4 |
-----

This happened because in larger lines, we used the total number of lines as an indicator of what the largest line number in the error.

Working on some improvements to this

Should be good now. Second improvement: errors can now span across a different number of digits in line numbers and stay aligned:
Error: Binary arithmetic operation between incompatible types (‘String’ and ‘i64’)
----- testme.jakt:9:11
 8  |
 9  |   let y = x / 3
                ^- Binary arithmetic operation between incompatible types (‘String’ and ‘i64’)
 10 |
-----


Vmchecker Issue

Good evening, I'm having a bit of a problem concerning the online checker.

Once it reaches the Floating point modulus check it freezes. I've also checked using the offline program and the are no errors and it doesn't freeze.

I can't quite grasp the end of this, would you mind helping me?

Most probably you have an infinite loop.

We have updated the checker, it will point out the timeouts now.

Most probably you have an infinite loop.

So I can assume that the offline check is different than the online vmchecker? Having only that freeze that even changed its place the last time I checked, makes it a little difficult to pinpoint the issue.

Update the checker and run it again offline.
On Mon, Mar 2, 2020 at 12:01 PM SenovalSevil<EMAIL_ADDRESS>wrote:

Most probably you have an infinite loop.
So I can assume that the offline check is different than the online
vmchecker? Having only that freeze that even changed its place the last
time I checked, makes it a little difficult to pinpoint the issue.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/UPB-FILS/alf/issues/7?email_source=notifications&email_token=AAVU5IJBFJ7P2XKUNZI5I23RFN7XBA5CNFSM4K66NFLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENOVYTQ#issuecomment-593321038,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAVU5IMWZ4LBZ6RPIZDM4BLRFN7XBANCNFSM4K66NFLA
.

--
Alexandru RADOVICI
Universitatea "Politehnica" din Bucuresti
e-mail<EMAIL_ADDRESS>telefon:<PHONE_NUMBER>
www.ipworkshop.ro

So I've updated the offline checker and saw the timeouts, fixed them but again, vmchecker doesn't work. To add to that, almost everything now results in an error, even though I haven't changed anything.

What is your username?
On Mon, Mar 2, 2020 at 2:30 PM SenovalSevil<EMAIL_ADDRESS>wrote:

So I've updated the offline checker and saw the timeouts, fixed them but
again, vmchecker doesn't work. To add to that, almost everything now
results in an error, even though I haven't changed anything.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/UPB-FILS/alf/issues/7?email_source=notifications&email_token=AAVU5ILRPO5KO5Z6CHQLG4LRFORHFA5CNFSM4K66NFLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENPD6JQ#issuecomment-593379110,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAVU5IKLPKO3D5BDVNQFWFLRFORHFANCNFSM4K66NFLA
.

--
Alexandru RADOVICI
Universitatea "Politehnica" din Bucuresti
e-mail<EMAIL_ADDRESS>telefon:<PHONE_NUMBER>
www.ipworkshop.ro

andy.buruiana

Fixed, your homework is timing out, it is running more than 120 seconds.
Most probably due to mathjs, consider not using it.
On Mon, Mar 2, 2020 at 4:19 PM SenovalSevil<EMAIL_ADDRESS>wrote:

andy.buruiana
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/UPB-FILS/alf/issues/7?email_source=notifications&email_token=AAVU5IKZGWCJ4GIXFCLF4EDRFO56DA5CNFSM4K66NFLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENPPCCQ#issuecomment-593424650,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAVU5IMD6DYPQXYDFYHYZETRFO56DANCNFSM4K66NFLA
.

--
Alexandru RADOVICI
Universitatea "Politehnica" din Bucuresti
e-mail<EMAIL_ADDRESS>telefon:<PHONE_NUMBER>
www.ipworkshop.ro

Done, thank you, everything works just fine after removing the mathjs library.


Visualization?

Hey,
is there a way to print a DAG generated with this library to the terminal? (git-log style)?
If not, please consider this a feature request.

I don't think it needs it in this library. Petgraph itself supports outputting graphviz files and then there are external tools that can do ascii-art versions if you really don't like actual graphics.


[BUG] Unflattening not working even when providing MapProperty

I Cannot Map Nested Object with unflattening even when I specify the property with the MapPropertyAttribute
My Source Class:
public class Source
{
    public required Guid Id { get; set; }
    public required string Name { get; set; }

    public required  string SourceTimeserieId { get; set; } = string.Empty;
    public required TimeserieProvider? SourceTimeserieProvider { get; set; }
}

My Target Class:
public class Target
{
    public required Guid Id { get; init; } // this is not mapped as expected
    public required string Name { get; set; } // this is mapped as expected

    public required SourceTimeserie SourceTimeserie { get; set; } // this is not mapped as not expected
}

I would like to Map SourceTimeserie.Id  property of the target with  SourceTimeserieId Property from the source
SourceTimeserie class:
public class SourceTimeserie
{
    public required string Id { get; set; } = string.Empty;
    public required TimeserieProvider? Provider { get; set; }
}

When I do the inverse Mapping it works perfectly
so this
private static partial void Update(Target target, Source source);
Result:
private static partial void Update(Target target, Source source)
        {
            source.Id = target.Id;
            source.Name = target.Name;
            source.SourceTimeserieId = target.SourceTimeserie.Id; // Mapped using flattening as expected
            source.SourceTimeserieProvider = target.SourceTimeserie.Provider; // Mapped using flattening as expected
        }

On the other side:
private static partial void Update(Source source, Target target);
Doesn't map Target.SourceTimeserie.Id
even when I speficy
[MapProperty("Source.SourceCompositionId", "Target.SourceComposition.Id")]
or
[MapProperty(nameof(Source.SourceCompositionId), nameof(Target.SourceComposition.Id))]
Any Idea why the mapping doesn't work?

I'm using the PreRelease version 2.8.0-next.2

I think the configurations you set are not correct.
Give it a try with [MapProperty("SourceCompositionId", "SourceComposition.Id")].

This works. Thanks.
Is this the only way? I'm sad having those magic strings

The same does also work with nameof.

Each mapping in Mapperly has it‘s own configuration and os not directly connected to other mapping methods. As Mapperly only generates implementations of user defined partial methods, I can‘t think of an approach which could work.
Also figuring it out automatically is kinda hard, since Mapperly loops through the target properties and tries to find a matching source property for each target property. It makes use of the pascal case notation to find candidates.

So "Unflattening" out of the box is out of the question?

Wouldn't it be possible to make a ReverseMapping ?
Like for example the .TwoWays() Mapping of Mapster or the ReverseMap() of Automapper

It could be its own attribute that would generate a similar reversed method. It could try to reverse the mapping stragedy and reverse it, although I don't think there is curretly a way of getting this. Perhaps an analyzer could tell the user to create a reverse map for any user generated mapping functions. It would definetely be a lot of work 😆
[TwoWayMapper]
private static partial void Update(Source source, Target target);

Each mapping in Mapperly has it‘s own configuration and os not directly connected to other mapping methods. As Mapperly only generates implementations of user defined partial methods, I can‘t think of an approach which could work.
Also figuring it out automatically is kinda hard, since Mapperly loops through the target properties and tries to find a matching source property for each target property. It makes use of the pascal case notation to find candidates.

I ran into a similar issue when looking at #349 and #103. Mapperly descends down the mapping tree, generating the mappings but does not pass information up to its parent mapping. This way you can't pass parameters down to complex mappings or  user mappers that take additional parameters. Mapperly would have to be refactored to depth first descend and work its way back up so that the correct parameters can be passed down.
Examples where it could be smarter:
 // This is the same as [MapProperty(nameof(Car.Manufacturer), nameof(CarDto.Producer))] but Mapperly requires a parameterless constructor with accessible parameters here.
[MapProperty("Manufacturer.Id", "Producer.Id")]
[MapProperty("Manufacturer.Name", "Producer.Name")]
public static partial CarDto MapCarToDto(Car car); // ProducerDto has no accessible parameterless constructor.

Ideally it should generate
// this would be useful for #109. Not possible mapperly
target.Producer = MapToProducerDto(car.Manufacturer.Id, car.Manufacturer.Name);

// smart mapper
target.Producer = MapToProducerDto(car.Manufacturer);

Second Example:
[MapProperty("Manufacturer.Id", "Producer.Id")]
[MapProperty(nameof(Car.NumberOfSeats), "Producer.Name")]
public static partial CarDto MapCarToDto(Car car);  // ProducerDto has no accessible parameterless constructor.

Ideally it should generate
target.Producer = MapToProducerDto(car.NumberOfSeats, car.Manufacturer.Name);

// smart mapper
target.Producer = MapToProducerDto(car);


migrate: supports INSERT Statement

WHAT

support INSERT statement.

WHY

to support INSERT statement.
Currently, Cloud Spanner does not support INSERT in partitioned DML (INSERT was treated as partitioned DML in wrench)

ref: https://cloud.google.com/spanner/docs/dml-partitioned#unsupported-features

Thank you for your PR, @knwoop, and sorry that we could not get back to you sooner 🙇 I left one minor comment, but except that it looks good to me!

@shuheiktgw Thank you for reviewing my PR! I appreciate your feedback and have addressed the comment.


Where is guide for dotnet core ????

How are you going to promote your new technology if you even cannot provide developers with documentation for YOUR OWN PRODUCTS????

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

ID: 83987349-2735-b9f5-8df2-80b65a9ff41d
Version Independent ID: 4f423457-b2ac-d90b-6104-a16e1aa92079
Content: Quickstart: Table API with .NET - Azure Cosmos DB
Content Source: articles/cosmos-db/create-table-dotnet.md
Service: cosmos-db
GitHub Login: @SnehaGunda
Microsoft Alias: sngun

@iamkarlson Thank you for the detailed feedback. Can you please Upvote and Comment on the following Uservoice entry: .NET Core Support for Table API. This is the best channel for making product and feature requests.

Sorry if you thought that I am interested in the improvement of that. MS forces developers to switch to dotnet core, and to use cosmosdb, but in return we get broken infrastructure and back compatibility. Do you think it's fare? I don't. Hence, I don't think that I can afford spending my time going to any other feedback website to tell Microsoft obvious things.

issue is not solved and never be

@iamkarlson, I am really sorry for the frustration you had with this. We recently published a new Table SDK for .NET Standard / .NET Core here. We are working on beefing up the documentation for it. In the interim, we have a sample on GitHub that I hope can be of help to get you started.

Hey @wmengmsft thanks but I would rather try something from AWS


Settings - Hide Table Elements in Categories & Weighting Depending on Radio Button Selection

Simplify the display of the "Categories & Weighting" table by hiding various table elements, depending upon the radio button selections made for Cat & Weighting:

Hide table altogether when "No Categories" is chosen
Hide "Percentage," "Extra Credit," and "Drop Highest/Lowest/Keep Highest" columns when "Categories only" is selected
Hide "Drop Highest/Lowest/Keep Highest" by default and show each column only when the associated checkbox is selected with "Categories & Weighting" chosen.

Additionally, since "Drop Highest/Lowest/Keep Highest" only applies when "Categories & Weighting" is chosen, disable and hide the checkboxes for these options when "No Categories" or "Categories" only is chosen.

Duplicate of #1408 - sorry @kyleblythe, think I double up on this issue.

No worries, @Payten! This was my bad. I added this after you! Going ahead and closing this one out.


read in more diverse kinds of file types

really only reading in spectra that are saved as pickles, with expected units and in microns.

it's probably fine actually. i just documented what the file types are.


Website and minisite integration

Related to the Datahub: https://github.com/jncc/datahub/issues/11

Done


Custom Learning Admin page blank after v4-v5 upgrade

Followed the instructions as outlined in https://github.com/pnp/custom-learning-office-365/blob/main/installation/UpdateV4-V5.md.
Everything seems fine except the CustomLearningAdmin.aspx page doesn't load.

I found an old article to resolve this. Deleting the sppkg from the app catalog and readding it solves the problem.


pin kubernetes provider as it contains breaking changes on v2

As said in the title, @nikever found an issue while using the eks installer related to the kubernetes provider.
Let's ping the version to a static one (latest v1 version)

They updated the provider block definition in the major version.
The specific issue is that they removed load_config_file attribute from the provider block (https://github.com/hashicorp/terraform-provider-kubernetes/pull/1052). There are also some major changes that it's best to test before.

They updated the provider block definition in the major version.
The specific issue is that they removed load_config_file attribute from the provider block (https://github.com/hashicorp/terraform-provider-kubernetes/pull/1052). There are also some major changes that it's best to test before.


⚠ SceneTime has degraded performance

In a480317, SceneTime ($ST) experienced degraded performance:

HTTP code: 200
Response time: 1273 ms

Resolved: SceneTime performance has improved in b26b894 after 4 minutes.


Question: overriding values after REST Call

Hi,
is there any way to change some values in a translation table that was previously loaded via static file loader?
$translateProvider.useStaticFilesLoader({
    	prefix: 'i18n/locale-',
    	suffix: '.json'
});

Specifically I need to load a "default" set of language tables at .config time (and this is working perfectly via above call), but then another call to a REST API may return some values I want to use to override values of these tables. This second call fires later than .config time, say at .run time or even later on.
I tried to use a custom loader that returns the "overriding values" , but that does not seem to be used in conjunction with the static file loader (while the REST Call is running, I see no values at all, not even the placeholders).
Thank you,

Yes. You can use your own loader or specifiy special options (i.e. prefix: '…', suffix: '…', $http: {transformResponse: …} (see here).

About the own loader, I'd like to use it but I also want my default values (in .json files) to be loaded immediately, without waiting for the REST call response.
About the second method, this is interesting, but how can I use it to override the translation tables I have (say en_GB, it_IT, pl_PL) ?

Making this clear: That is only a loader providing data (translations) for one given language. It does not override anything.

[…] I'd like to use it but I also want my default values (in .json files) to be loaded immediately, without waiting for the REST call response.

I don't get this. You want to load data, but do not wait?? What are you trying to do? If you have an external JSON file, it must be loaded asynchronously (and you have to wait).

Currently I have "default" data stored in JSON file, I'm able to read it and this is pretty awesome. BUT: upon a REST call that I'd fire later, some of the values should be overridden.
Example:
At the beginning (.conf) I load the following JSON files via static files loader:
i18n/locale-en_GB.json
{
    "market.marketplace.title": "Marketplace",
     "market.marketplace.descr": "Here is a description",
     "market.available.items": "Available items"
}

i18n/locale-it_IT.json
{
    "market.marketplace.title": "Marketplace",
     "market.marketplace.descr": "Ecco una descrizione",
     "market.available.items": "Oggetti disponibili"
}

Very nice, values are loaded IMMEDIATELY. And I want to keep things like this.
Now, the rest call returns this data:
REST Call response data:
{"en_GB",
        {
           "market.marketplace.title": "ENGLISHTITLE",
           "market.marketplace.descr": "ENGLISHDESCR"
        },
    },
    {"it_IT",
       {
           "market.marketplace.title": "ITALIANTITLE",
           "market.marketplace.descr": "ITALIANDESCR"
       }
    }

What I want is that translation tables values get overridden. So my translation tables should look like this now:
(English table)
{
    "market.marketplace.title": "ENGLISHTITLE",
     "market.marketplace.descr": "ENGLISHDESCR",
     "market.available.items": "Available items"
}

(italian table)
{
    "market.marketplace.title": "ITALIANTITLE",
     "market.marketplace.descr": "ITALIANDESCR",
     "market.available.items": "Oggetti disponibili"
}

I managed to create a custom loader that loads the new values, but I can't have this custom loader work in conjunction with the static files loader (which I want to keep, if possible).

One file is one language, there will be no updates.
Exceptions:

You use the partial loader.
You use the concept of "fallback language".
You invoke $translate.refresh() will be reload everything (but it will probably the same old ones again).

So that's not possible. Got it.

Just wondering: What is the usecase in overriding translations?

People may want to see labels as they prefer. It's a configuration matter. So if I (developer) say that the title of a page should be "Marketplace" in English and "Marketplace" in Italian, an italian user may want to change the italian label in "Mercato", and leave the english label as it was. This configuration will be applied only for THIS user, while all other users will keep seeing "Marketplace" in both languages (unless they, in turn, change the labels as they want). So the REST call is used to get the user's language configuration.


[Bug]: Blog error

Is there an existing issue for this?

[X] I have searched the existing issues

Describe the bug
When we click on Blog, Testimonial appear. This is incorrect.
Add blog content.
Expected behavior
More professional outlook
Add ScreenShots

What browsers are you seeing the problem on?
No response
Record

[X] I have read the Contributing Guidelines
[X] I'm a GSSOC'24 contributor
[X] I have starred the repository

please assign this task to me


Making numbers in believe both conformant and fast

This is the issue I hinted I would submit at https://github.com/luksamuk/believe/issues/6#issuecomment-545216093. I confess I've spent way too much time thinking about solutions to this challenge, both for this Bel implementation and for my own.
Per the guide,

Now we come to the code that implements numbers. Before we continue
I'd like to remind the reader of the principle that when something
is defined in the Bel source, the goal is to specify what it means
and not to provide an efficient implementation.

In other words, we read the source for correctness. An implementation, however, shouldn't implement this directly but instead cheat creatively.
Base Proposal
Instead of directly pointing to a car and cdr part, I suggest Bel_pair consist of two function pointers that can return Bel values for car and cdr. Expressed as a Java interface:
interface Bel_pair {
    Bel car();
    Bel cdr();
}

C doesn't have interfaces, but the struct inheritance idiom accomplishes the same. We "program to the interface", that is, all consumers of Bel_pair go through the Bel_pair struct and its two function pointers, and know nothing else about the data layout.
I suggest these two "implementations" of Bel_pair:

"Regular" pairs
"Aggregate numbers"

Aggregate numbers only provide a facade that presents as a pair, that allows destructuring operations into it, etc. But they also hold extra data about the number itself. An aggregate number for the Bel number 5 would hold an int with the value 5.
(The interface idea can also be used to optimize a whole host of other types in the language. For example, functions can carry around a precompiled optimized version of itself which can be used in most circumstances. Arrays can be allocated as a single block and provide constant (rather than linear) random access. Queues can be implemented as real queues or deques, and provide similar access speedups.)
It's possible it'd be better for there to be many different types of aggregate numbers: unsigned integer, rational, signed rational, complex — following the Bel spec itself. Here I will write of them as a single aggregate number type, for simplicity.
Hijacking the built-in numeric operations
The main benefit of this is that we can now intercept any call on operations like +, check if its arguments are all aggregate numbers. In that case, we can skip the slow-path spec implementation of + and just add the numbers as C ints, and return a new aggregate number.
This is expected to be the typical case.
Also recommended that both the Bel reader implemented in C and (later) the Bel reader implemented in Bel be convinced to spit out aggregate numbers by default.
Heterogenous operations
Despite best-effort attempts to intercept the creation of numbers and turn them into aggregate numbers, a user could always build a number "by hand", and it'd not be turned into an aggregate number.
It'd be theoretically possible to check at join-time, but I'm wary of suggesting this. Instead, we should just be ready for getting a mix of numbers and aggregate numbers to + and friends. They should then "upconvert" the numbers to aggregate numbers and proceed as usual.
Doing an upconversion on a number is presumably slow, since we have to traverse down ridiculously long lists of ts. However, something already went to the trouble of building those lists, which was also slow, and we're just adding the same type of linear const once more.
De-optimization
In two situations, the aggregate number has to destroy itself and replace itself with the actual list structure it emulates:

When an internal pair is modified with xar or xdr
When an internal pair is compared with id

None of these situations are very likely, let alone very sane. But a conforming Bel implementation must support this case. A first cut at an implementation can simply crash in protest; later ones can do the replacement. It won't be fast, but it will be correct.

I was thinking about this right for some hours. I'm not entirely sure about the interface-like idea...

all consumers of Bel_pair go through the Bel_pair struct and its two function pointers, and know nothing else about the data layout.

Function pointers are a no-no for me. The idea is to keep the implementation as simple as possible, and function pointers are one of the aspects which I'd rather not use at all. That is pretty much the reason why this software is being written as a literate program (though I must be fair, it lacks contribution guidelines explicitly saying all of that right now).
Plus, if we store car and cdr in Bel_pair as function pointers, deeper structural changes would need to be made. And not only that; since this is a literate program, explaining this "hack" on the prose parts would be... troublesome.
However, everytime I handled the car and cdr of any list, I used the bel_car and bel_cdr functions. How about making changes directly to those instead? This way, it would be only a matter of handling the special case on those functions.
The result of (type 5) returning the symbol number definitely has to go, but that can also be managed by handling the special case on the pertinent functions (which I still have to isolate. Adjustments will likely be made to bel_prim_type, but also to internal predicates such as bel_pairp).
A fix by changing bel_car and bel_cdr would involve converting directly a number to a literal, which are built-in and specified in the Bel spec:

Numbers in Bel take the form
(lit num (sign n d) (sign n d))
where the first (sign n d) is the real component and the second the
imaginary component. A sign is either + or -, and n and d are unary
integers (i.e. lists of t) representing a numerator and denominator.
So 2/3 is
(lit num (+ (t t) (t t t)) (+ () (t)))
and 4-1/2i is
(lit num (+ (t t t t) (t)) (- (t) (t t)))

Building the lists of t and this "coercion into a literal" itself would be as trivial as implementing a few more functions to do the job.
Other interesting thing is that we could also handle the (lit num ...) case in the bel_eval function as an "internal" special form; checking for a number literal is a very simple task, as well as doing a "reverse coercion" into a proper internal number as well. Since Bel specifies that valid numbers are printed as... well, numbers, that seems to be an option.
Plus, all arguments are evaluated during a function application, so this would work fine:

→ (+  (lit num (+ (t) (t)) (+ () (t)))   (lit num (+ (t t) (t)) (+ () (t)))  )
3

...that is, if the number is valid -- otherwise, we just return the plain literal list, which would be an "invalid" number:

→ (lit num blah)
(lit num blah)
→ (+ (lit num blah) 3)
Error: (lit num blah) is not a number

This seems to fit perfectly, since performing any operations in "non-numeric literals" should also be invalid anyways. Changes would have to be made to bel_numberp and bel_number_list_p to make that work.
xar and xdr would need extra attention because they have to check for the special case as well, but that's manageable: we convert, change the pertinent parts, and attempt to return a re-conversion into a number (which can fail, of course, but in that case the plain new literal is returned).
As for id, I am not entirely sure; maybe converting all numbers to literals by default when checking for identity in bel_prim_id would be a sane option.
There is an extra bonus for this approach: the numerator and denominator in Bel are plain integers, but they don't have to be like this in Believe. However, if one just goes ahead and uses car, cdr, xar and xdr to mess with an "optimized" number, the conversion from "number" into "number literal" can automatically coerce the numerators and denominators into integers -- in fact, this coercion is already implemented. So we get the best of both worlds.

Function pointers are a no-no for me. The idea is to keep the implementation as simple as possible, and function pointers are one of the aspects which I'd rather not use at all.

Yes, that makes sense. Function pointers have a high complexity penalty. I understand the desire to avoid them if possible. Even from a C language perspective it makes sense; C is more geared towards static, compile-time knowledge. Making things dynamic with function pointers moves the code out of C's sweet spot. Might even have an impact on the error messages the compiler is able to give, etc.

However, everytime I handled the car and cdr of any list, I used the bel_car and bel_cdr functions. How about making changes directly to those instead? This way, it would be only a matter of handling the special case on those functions.

It makes sense. By the way, this trade-off that you're deliberating is famous, and known as the expression problem — in short, do you associate differing behavior with the data (as function pointers would) or with the operations (as per your suggestion). I believe that c2 page and the one about switch statement smell is good reading in the context of this issue. (Not suggesting that there's a right answer here. That's the thing, it's a trade-off.)

xar and xdr would need extra attention because they have to check for the special case as well

Case in point. :smile: But it's not so bad, I think. What's interesting is the cost of doing this not just for numbers, but for some other type that can be optimized, later. But that could be premature design on my part.

As for id, I am not entirely sure; maybe converting all numbers to literals by default when checking for identity in bel_prim_id would be a sane option.

Not sure I understand. Would this guarantee that if you compared a number against itself, (id n n), you'd always get t?


Make examples its own workspace

Closes #39

I will merge and then add the symlink in a subsequent MR. Adding the release automation is blocked by this


Fix pay button doesn't reshow after the pay request fails

Details

We optimistically set the report status to paid when paying a request, but never revert it when the request fails.
Fixed Issues

$ https://github.com/Expensify/App/issues/33524
PROPOSAL: https://github.com/Expensify/App/issues/33524#issuecomment-1872486351
Tests

As User B, request money to User A
In User A, open the IOU report
In SaveResponseInOnyx.ts, add .catch(() => Onyx.update(request.failureData ?? []))
Turn on "Simulate failing network requests" in preferences page
Press the "Pay elsewhere" button. Wait until the request fails
When the request fails, verify the "Pay elsewhere" button shows back

[x] Verify that no errors appear in the JS console

Offline tests

The request can't fail while offline
QA Steps

Taken from the issue

Create a collect policy in OldDot
Execute the following JS snippet in the OldDot policy to enable workspace chats creation:
if (Url.getCurrentPageName()!="policy" ){ alert('Only run this snippet from a policy editor!'); } else { var p = Policy.getCurrent(); p.policy.isPolicyExpenseChatEnabled = "true"; p.save().done(function(){$.jGrowl('Workspace chat creation enabled!')}); }
Add a member and an approver (it can be the same as the policy owner)
Add the same bank account for the member and the policy owner
Login in one session as a member and in another session as the approver
As member, create and submit a money request in the workspace chat
As admin/approver click/tap on the request and approve
Then select Pay elsewhere
An error will appear at the bottom of the expense chat
Verify the Pay elsewhere button shows again

[x] Verify that no errors appear in the JS console

PR Author Checklist

[x] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[x] I added steps for the expected offline behavior in the Offline steps section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[x] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[x] I included screenshots or videos for tests on all platforms
[x] I ran the tests on all platforms & verified they passed on:

[x] Android: Native
[x] Android: mWeb Chrome
[x] iOS: Native
[x] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[x] MacOS: Desktop

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[x] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:

[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] I verified that if a function's arguments changed that all usages have also been updated correctly
[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))

[x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[x] If the PR modifies the form input styles:

[x] I verified that all the inputs inside a form are aligned with each other.
[x] I added Design label so the design team can review the changes.

[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native

https://github.com/Expensify/App/assets/50919443/edf603b4-51e1-4e94-9bea-35dcb3ba67a0

Android: mWeb Chrome

https://github.com/Expensify/App/assets/50919443/d67d0374-9ce2-4019-8546-592e70f07212

iOS: Native

https://github.com/Expensify/App/assets/50919443/92a0eeb8-95f6-40e9-a77b-473fc260f8ea

iOS: mWeb Safari

https://github.com/Expensify/App/assets/50919443/e4020266-6d5e-4bd3-ae60-1a94dc02da13

MacOS: Chrome / Safari

https://github.com/Expensify/App/assets/50919443/9361a19e-3b96-4efe-bc25-eafdf801beb9

MacOS: Desktop

https://github.com/Expensify/App/assets/50919443/baf268eb-df28-418b-8a3e-fdee52caa056

Friendly bump @thesahindia

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

🚀 Deployed to production by https://github.com/mountiny in version: 1.4.25-10 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
failure ❌

🕸 web 🕸
success ✅