Chemlambda, graph theory etc

Hello Guy, ive been doing lot of expetimentation lately on parsers, grammar and graph theory, and started to dig the relationship between graph theory and computation theory.
Deep down, all those algorithm of parser combinators, ll/lr parser etc seem to always come down to a tree representation, and i started to dig the relationship between graph theory and computation model.
Just yesterday i found this article
https://blog.reverberate.org/2013/07/ll-and-lr-parsing-demystified.html

There are three ways of traversing a binary tree, as explained on Wikipedia: in-order, pre-order, and post-order. They differ in whether you visit the parent node before (pre-order), after (post-order), or in between (in-order) the children of that parent. These three correspond exactly to infix, Polish, and Reverse Polish notation:

1 + 2 * 3 // Infix expression; in-order traversal.

1 * 2 3 // Polish (prefix) expression; pre-order traversal.
1 2 3 * + // Reverse Polish (postfix) expression; post-order traversal.

So Polish and Reverse Polish notation fully encode a tree structure and the steps you would take to traverse it. The main difference between these encodings and an actual parse tree is that Polish and Reverse Polish encodings are not random access. With a real tree you can choose to follow an interior node to its right subtree, its left subtree, or even (for many trees) its parent. With these linear encodings there is no such flexibility: you have to follow the traversal as it is already encoded

Thats an example of how tree theory and the way to process a tree has also implication into computation model.
While digging this,i found this this thing called chemlambda, who seems To be a model of computation based on graph theory, with graph rewrite operations that allow to modify the graph, which allow a way of formal self modifying code.
Apparently chemlambda is inspired from this model
http://tuvalu.santafe.edu/~walter/AlChemy/Statement/organization.html
Which i find very inspiring, and i found it has implication in both complexity theory, and distributed systems.
Its extremely interesting To me, especially this part

A central theme of this project is our emphasis on the action of "agents" as consisting in a mapping from "agents" to "agents". The foundational distinction between this project and others sharing similar emphasis is that none of the others have the feature of being interpretable as mathematical structures. To bootstrap a theory of biological organization, requires a formalization of chemistry that is useful for biology. Ultimately this means defining "interaction" and "structure of an entity" mutually. In our case "structure of an entity" will specifically come to mean a formula, expression, or term within a syntactical system resulting from a theory about the possible interactions characterizing that class of entities. To be illuminating, a linkage between structure and interaction must connect to a mathematical theory.

Stable relational structures are what conventional dynamical systems take as a given. If we aim at a description of their genesis, we must extend our description of the world to include a sound and sufficiently general dynamics of relationships capable of generating stable relational structures as stationary outcomes. What enables any such dynamics from within, we submit, is at the very minimum a notion of entities that lead this subtle double-life: entities that simultaneously act as relationships between entities (by being interpretable as functions on them).

Which remove the barrier between "code" and "data" in sort that you can have functions that take a function as an input and output another function, which allow for this kind of algebra needed for self organising structures. It seem to be a solution for parallelism, decentralised distributed system, and self modifying code, which look like an holy grail to me :)
I started to experiment with this and exploring this relationship between graph theory and computation model, but cant seem to find lot of information on this. It seems to be a given that a parser can output parse tree, and that those parse tree can be turned to turing complete system but i cant really find real deep formal theory on this.
I have this hunch that for example sticking to what can be represented as a DAG without backward references prevent loop and infinite recursion.
As i use a blockchain system to store the tree, with nodes referenced by their hash, it naturally prevent cycles. I just added some instruction to have equivalent of map working on lists, and recursive operations on data tree like to compute skeletal animation based on quaternion, and it seems to works well.
With a lr parsing style it even seem to allow very clean handling of asynchronous function, as all the computation that has To be done on the result is on the stack when the asynchronous function is called, so it can easily be added to the handler code and executed asynchronously when the function is done, and all the dependancy graph is explicit.
In theory using this sort of algebra can also allow runtime polymorphism, as if you can have graph operation working on the computation graph, it can allow to generate monomorphised function based on the polymorphic version, while still keeping in the realm of formal system.
In theory it can be done at compile time, load time or runtime, and i think can even elucidate the interface problem as function can be checked for their type with graph operations. And in theory graph rewrite operation like in chemlambda seem to be a good way to represent polymorphism.
And in theory it can accomodate with self modifying code, and all kind of dynamic system modeling, even if it seems to escape common computation rules.
But i cant seem to find lot of formal definition of how tree properties translate to computation model, even if it seem to me computation model can always be mapped to a tree, and its very easy to have a system of formal operations working on graph, which i think can be a way to have runtime polymorphism.
Its a paradigm that got stuck in my mind and it seems i cant really nail this sort of relationship or find formal systems describing this.

hello :)
I found out as well it has a connection with physics, even if that was not what i was seeking in the first place.
I could talk to a good physicist who told it looked close to prigogine thermodynamics
https://en.wikipedia.org/wiki/Ilya_Prigogine
As i'm also quite into edelman and whiteheads it would not suprise me that there are connections in physics. I would just answer this How is Natural Science Possible?: Whitehead's 1st Lecture at Harvard (1924) :)
I couldn't find a direct connection between wolfram model and this one, but it's close in the principle, it's likely one inspired the other or they have same implication with physics.
https://arxiv.org/pdf/1811.04960.pdf

The references and links in the text are left as they were and much improvement could be made concerning references pointing to Interaction Nets [2], for example; Berry and Boudol CHAM [1] is not explicitely mentioned here, but the initial version of this formalism, i.e. ”chemical concrete machine”[13], uses it. The Algorithmic Chemistry of Fontana and Buss [3] [4] appears here via a link to their research, perhaps this link is better. The same happens with the work [5] by Christoph Flamm, for which, in the body of the article, a link to his papers page is provided. Part of this was due to the ignorance of the author at the moment (a mathematician). A later hope was to keep the article as is and to link it with critical public reviews, as a weaker form of validation than, for example, an alternative Haskell implementation of chemlambda [5]. However, the main idea of the article is original, as are the self-imposed constraints, namely to restrict to only local rewrites on graphs, regardless their interpretation as lambda terms (or lack of such interpretation), restrict to only two algorithms of reduction (deterministic or random), the most simple possible.

This sort of model is more relevant for dealing with living organism than with inanimate objects like usual physics.
But it was not my original intent to get into physics.
Found this article that make a short summary of different way to achive polymorphism :
https://dev.to/jmcclell/inheritance-vs-generics-vs-typeclasses-in-scala-20op

Subtype Polymorphism (Inheritance)
subtyping allows a function to be written to take an object of a certain type T, but also work correctly, if passed an object that belongs to a type S that is a subtype of T (according to the Liskov substitution principle) [2]

Parametric Polymorphism (Generics)
Parametric polymorphism allows a function or a data type to be written generically, so that it can handle values uniformly without depending on their type [3]

Ad-hoc Polymorphism (Type Classes)
the term ad hoc polymorphism [refers] to polymorphic functions that can be applied to arguments of different types, but that behave differently depending on the type of the argument to which they are applied [4]

I will skip the first one based on subtyping because it still depend on static code, and some invariant among a category of different datatypes.
The 2 others are more relevant to where i want to get at, which is that you have a computation defined in a form that allow it to be combined with a type to yeld a version of the computation unique to that type.
So they both encode this notion of 'variable functions', but if i want to make a comparison on classic lambda function level, it's like if instead of computing the result from a value, you would pick an output value in a set of precomputed values based on the input. Much like you would use a table to compute a sinus if the cpu doesn't have sinus. The idea of dispatch table with a switch case is similiar to this principle. You have a set of predefined functions that are selected based on the input type. Whereas some computation rules applied to a graph could achieve the same thing. And it can also deal very well with asynchronous / simultaneous operations (even all of them are not executed in parrallel on the hardware).
My goal for the moment is not to have the whole range of operation that you would have in a real molecular computer, or to get to a physic model.
More to have some computation that can modify graph to alter the computation being done that can still fit into a formal model.

For those interested, i found the abstraction i was looking for in stepanov book 'elements of programming', he calls this 'coordinated structure' and gets into all the points i'm searching, in case someone end up with the same questions :)
I'm still digesting the two chapters but at least i feel less in uncharted territory :)

A concept is a coordinate structure if it consists of one or more coordinate
types, zero or more value types, one or more traversal functions, and zero or more
access functions. Each traversal function maps one or more coordinate types and/or
value types into a coordinate type, whereas each access function maps one or more
coordinate types and/or value types into a value type. For example, when considered
as a coordinate structure, a readable indexed iterator has one value type and two
coordinate types: the iterator type and its distance type. The traversal functions
are + (adding a distance to an iterator) and — (giving the distance between two
iterators). There is one access function: source.

Fun thing when i look for coordinated structure in google i find mostly result from chemistry =)

@NodixBlockchain I think Stepanov's "Elements of Programming" is one of the best books on Generics I have read. I recommend reading it from start to finish several times. It is not an easy book, but once you get the idea of what is going on, the early chapters make a lot more sense.
I also recommend reading "From Mathematics to Generic Programming" by Stepanov & Rose as it presents the same material in a different way, which can help with understanding, plus some really interesting history of mathematics and programming.

Yes there are all the algorithm to find isomorphism between "coordinated structures" and all those, couldn't find much reference to this term in the context of programming outside of stepanov book though.
The other book is also on my list, found some video on youtube as well.

@NodixBlockchain Try "Data Structues and Network Algorithms" by Robert Endre Tarjan, which is a book on algorithms recommended by Stepanov.

I just found this issue, thank you for interest. There is now a new page of experiments and technical notes on chemlambda: https://chemlambda.github.io/index.html
which I hope can answer many questions. There is a lot of information which one can play with, spread over several repositories.
For more please let me know, I'd be happy to discuss more, because the project started from a question in geometry and it now returns to it, but there are many directions which I would like to develop, like the "made of money" idea from the repository hapax. or which I would like a real programmer to magically do it, like a graphical horoscope app which would allow chemlambda molecules to live and circulate between many phones :)

https://youtu.be/2RMXujk5AhM?t=1543
Gerald Edelman - Brain Dynamics to Consciousness (Full Lecture)
the kind of theory i'm into :)

I just found this issue, thank you for interest. There is now a new page of experiments and technical notes on chemlambda: https://chemlambda.github.io/index.html
which I hope can answer many questions. There is a lot of information which one can play with, spread over several repositories.
For more please let me know, I'd be happy to discuss more, because the project started from a question in geometry and it now returns to it, but there are many directions which I would like to develop, like the "made of money" idea from the repository hapax. or which I would like a real programmer to magically do it, like a graphical horoscope app which would allow chemlambda molecules to live and circulate between many phones :)

originally i found this project looking into relationship between graph and computation model, looked for things like 'graph theory + lambda calculus' and found this project :)
what i would have in mind is really some kind of computation model with self modifying code that would follow a formal computation theory, and i think going through graph theory is really the way to go, because chemlambda show how graph manipulation can lead to a whole computation model, that can be equivalent to lambda calculs, but also add more possibilities :)
i'm still digging the whole thing :)

Oh thank you. I'm  more into applied biochemistry. Many links are available from the page of chemlambda, but maybe relevant for the situation we are in now is this short story https://archive.is/Ir9GG .
I would search in databases of biochemical reactions for patterns akin to those I use (and everybody else does, in so various fields of math and computation).
There is also the problem that graph rewrite systems (GRS) and term rewrite systems (TRS) are very different beasts. There is no clear way to define an isomorphism between a GRS and a TRS. Indeed, you can turn a term of a TRS into it's abstract syntactic tree, which is a graph. But you can't always turn a term rewrite into a graph rewrite on the tree graph, in such a way as to preserve the locality of the rewrite.
In the opposite direction, it is sometimes possible to define a function which decorates the edges of a graph with terms, such that if the graph is the abstract syntactic tree of a term then the root edge of the graph is decorated with that term. However, if you pass to graph rewrites, even if the graph rewrite is local (like the graphical version of the beta rewrite say), the decoration of the graph changes globally.
So I think that  TRS and GRS are not comparable without the introduction of external hypotheses, which may destroy the meaning of the seeked isomorphism.
An implication is that GRS-es with only local rewrites (like in nature) are not only a unnecessary graphical decoration of things which can be explained with TRS only (like lambda calculus), they are intrinsically interesting outside their (undefined properly) isomorphism with TRS-es.
But you'll say that any GRS for which there is a program is equivalent with the TRS (the program). Agree! but the TRS will consist mainly of a generator of randomness and a destroyer of the supplimentary structure (like random shuffles of lists), all run on a machine whose code can't be controlled. On the other side a GRS like real chemistry uses real space and probability distributions which are function of the state, so again is not at all clear in what sense the two systems are really comparable.
If though there is a low hanging fruit, is is that maybe in real chemistry we can identify a GRS which works (not perfectly but) well enough so we can use ideas from functional programming to get real chemical effects. And damned be the search for perfect semantics.
----- Original Message -----
From: "NodixBlockchain"<EMAIL_ADDRESS>To: "keean/zenscript"<EMAIL_ADDRESS>Cc: "mbuliga"<EMAIL_ADDRESS>"Comment"<EMAIL_ADDRESS>Sent: Tuesday, August 25, 2020 1:17:50 PM
Subject: Re: [keean/zenscript] Chemlambda, graph theory etc (#48)
https://youtu.be/2RMXujk5AhM?t=1543
Gerald Edelman - Brain Dynamics to Consciousness (Full Lecture)
the kind of theory i'm into :)
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/keean/zenscript/issues/48#issuecomment-679937649

Thanks for the input :) I can see from your answer it doesn't seem there is a very clear formal system to get from GRS to TRS or vice versa.
Weirdly enough, edelman doesn't even really get into neurochemistry at all, he get his whole brain theory based on a mixture of philosophy, darwinism and computation model.
In theory it sort of lead to a category / type system, he made a robot that he called darwin, following this sort of principles

He make a statement like programs make mistake, mistake are a full part of darwinist process, but they don't crash from mistake, they learn from mistake.
I already started to get into computational model close to lambda calculus, based on blockchain which use a graph system, it's more limited than full lambda calculs/turing machine, but i'm pretty sure it can get close, even if i'm quite in the dark regarding the computation model it entails.
Already from the stepanov book i get that you need at least a tree/graph parsing order algorithm additionally to the graph itself, because the way it's processed change the result. He give all the algorithm to formalise how two 'coordinated structures' can be tested for isomorphism.
But it's already pretty cool, because the graph can be represented very easily graphically, so it allow to completely edit the computation visually automatically from the graph, and then the code to execute the graph looks very much like a parser combinator in the end.
It's not completely operational yet, i already have skeletal animation with a 3D scene represented using a graph like this. Using this system i think i'm already pretty close to have a full match between modification in the graph and term/functional programming representation.
But it's very experimental, i'm not sure where it's going to lead to, but so far i get pretty interesting result from it.

As long as your GRS is restricted to tree traphs, it is indeed equivalent with a TRS, where you translate terms to their AST. But what if the GRS does act on a class of graph larger than trees? Then the equivalence breaks (in interesting ways).
Here is, related to the video of Edelman lecture, the part about neural groups, an experiment with two "neurons".

available also in the collection here https://chemlambda.github.io/collection.html#159
These graphs are encodings of two linear systems with some inputs and outputs connected. Imagine something like having two lambda terms, say T1 and T2, and you mix their inputs (free variables) and outputs (values of the terms) in the sense that you feed some outputs into some inputs. Then you reduce this mix graphically.

This is what electronics design tools like Symplectic do. The problem is
that designs like this are very hard to reason about and verify. When I
worked on VLSI designs we used to write a prototype in 'C' as it was much
easier to validate, and then compare the data from the electronic system
with the prototype for validation. The system I worked on was for MPEG
encoding, so you would apply the same configuration settings to both
systems and then compare the inputs and outputs bit for bit to validate the
design.
The point I am making is that designing free input/output systems is much
harder than writing sequential code. So a language like this will not get
used much, because not many people will be smart enough to use it, and
those that do will spend a lot of time validating designs.
On Wed, 26 Aug 2020, 09:33 mbuliga<EMAIL_ADDRESS>wrote:

As long as your GRS is restricted to tree traphs, it is indeed equivalent
with a TRS, where you translate terms to their AST. But what if the GRS
does act on a class of graph larger than trees? Then the equivalence breaks
(in interesting ways).
Here is, related to the video of Edelman lecture, the part about neural
groups, an experiment with two "neurons".
[image: 2neurons]
https://user-images.githubusercontent.com/39514942/91279759-95092c00-e78e-11ea-8d41-32bf778d8740.gif
available also in the collection here
https://chemlambda.github.io/collection.html#159
These graphs are encodings of two linear systems with some inputs and
outputs connected. Imagine something like having two lambda terms, say T1
and T2, and you mix their inputs (free variables) and outputs (values of
the terms) in the sense that you feed some outputs into some inputs. Then
you reduce this mix graphically.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/keean/zenscript/issues/48#issuecomment-680740471, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAD4DYA5LC6Y3VQLNURQJBDSCTCFRANCNFSM4N6EKMMA
.

This is what electronics design tools like Symplectic do. The problem is that designs like this are very hard to reason about and verify. When I worked on VLSI designs we used to write a prototype in 'C' as it was much easier to validate, and then compare the data from the electronic system with the prototype for validation. The system I worked on was for MPEG encoding, so you would apply the same configuration settings to both systems and then compare the inputs and outputs bit for bit to validate the design. The point I am making is that designing free input/output systems is much harder than writing sequential code. So a language like this will not get used much, because not many people will be smart enough to use it, and those that do will spend a lot of time validating designs.
…
On Wed, 26 Aug 2020, 09:33 mbuliga, @.***> wrote: As long as your GRS is restricted to tree traphs, it is indeed equivalent with a TRS, where you translate terms to their AST. But what if the GRS does act on a class of graph larger than trees? Then the equivalence breaks (in interesting ways). Here is, related to the video of Edelman lecture, the part about neural groups, an experiment with two "neurons". [image: 2neurons] https://user-images.githubusercontent.com/39514942/91279759-95092c00-e78e-11ea-8d41-32bf778d8740.gif available also in the collection here https://chemlambda.github.io/collection.html#159 These graphs are encodings of two linear systems with some inputs and outputs connected. Imagine something like having two lambda terms, say T1 and T2, and you mix their inputs (free variables) and outputs (values of the terms) in the sense that you feed some outputs into some inputs. Then you reduce this mix graphically. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#48 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAD4DYA5LC6Y3VQLNURQJBDSCTCFRANCNFSM4N6EKMMA .

yes ! it's not easy to write code like this, but the idea is that you don't build the graph by writing code, because the good thing about graph is that they can be very easily represented visually, and this sort of system works pretty well.
I had the chance to meet eric wenger, who is the author of meta synth/voyager etc for example, and this whole system works with graph that are edited visually and plugged into each others.

I already applied this principle like to build audio synth, dynamic web page, and 3D scenes, i think the mind still can cop very well with 'recursive graph' system, when they are presented visually.
For it to be meaningul it needs some amount of prebuilt basic functional/logic brick that can be semantically meaningful to begin with, as well as their composition/combination.
The meta synth system from eric wenger show it's possible to have this sort of functions that can work on audio/video/3d (depth  field rendering with some algebra), that can be combined together. Didn't dig the software too much, but he showed me some quick demo of the system and the possibilities are amazing :)
Well that's mostly step 1, already if i manage to get there it would already be a thing :)
But then the step 2 to go in the edelman kind of direction is that you don't actually write the whole tree, but it's more 'goal oriented', and the 'system' will work by trial and error to find the graph solution to the problem.
In the video there is also this slide

And i think that's sort of the problem is that you can't really 'proove' too much why and how the solution work, or even if it's the best possible solution to the problem.
It would be similar to neural network, except neural network are complete black box, and they don't allow to extract meaningfull generalisation or categories by themselves, and often it require some pre step to prepare the data for the neural network to works well.

I agree, these GRS are not for humans, they are for machines or for understanding nature (biochemistry in this case).
On the other hand, at first there were only (few) mathematicians playing with bits in the emerging computer architectures.
----- Original Message -----
From: "Keean Schupke"<EMAIL_ADDRESS>The point I am making is that designing free input/output systems is much
harder than writing sequential code. So a language like this will not get
used much, because not many people will be smart enough to use it, and
those that do will spend a lot of time validating designs.
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/keean/zenscript/issues/48#issuecomment-680764900

When i look at the definition of complex system, i think it touch on the point i'm looking into.
Like this definition of a complex system as in it cannot be explained only looking at separate elements on their own.
I'm not a chemistry buff, but i think i'm not wrong if i say you can't really account for the properties of complex molecular structure, at the most complex level let say living organism, only by looking at the set of atoms that compose it.
In term of stepanov element of programming, just looking at the set of atom would correspond to iterators, that are like a flat set of elements that cannot capture the particular organisation and how atoms are connected to form more complex molecules of which proparties not only  depend on the set of atoms composing it, but also how those atoms are connected together.
Coordinate structure can capture this idea of molecular organisation, and stepanov consider those coordinate structure as a form of iterator or set, but they can capture more complex configuration between the elements of the set.
But then it would need a form of type reflection to be able to capture the properties of the said coordinate structure, because it's the type of the object/structure tree that will capture the information of how each elements is related to the other, and i can completely get kean points on the flaw of type reflection approach.
That said, inside of a compiler, it still have to hold 'type variables' in order to build the AST, so a compiler would be able to capture this information about how each elements of a set relate to another in a dynamic system, but once compiled this informations is lost.
It's why i started to look into GRS as a possible way to be able to analyze those relationship.
In a way there is already a form of this in direct show, as the graph builder is able to automatically connect a file input to an output in real time, but it has 2 layers above the c++ typing, there is a layer of COM for the base module interface encapsulation, and it adds also a 'media type' for each 'pin', which allow the graph builder to connect a file input to an output with all the combination of codecs/filters/image-audio format converters etc, depending on what is installed or not on the system, and can add new codec/filter/converters without having to recompile anything, which allow to build graph that are specific to the particular combination of input source/graphic-audio device and codecs present on the system that are not known at compile time.
It's this kind of things that would not be easy to do with languages like haskel. I don't see a really good way to do this with any language i know of.
Direct show is still a basic example, the system of eric wenger is more developped, i'm not sure if it could still be able to model 'complex systems', i think it's still a bit limited on this regard, but it already give an infinite number of combination possibility with a modular functional composition approach.
With an approach based on typed module interface, and runtime/loadtime graph building mechanism, i think it could still give more opportunity to have graph analysis that would allow to capture the feature of 'complex system' defined as the whole exhibit properties that cannot be captured only by analysis the set elements that compose it.
I'm not sure if the way i put it is extremely clear though :) but it's something that is bugging me or obsessing me for while and i can't seem to find the good silver bullet system to explain this.
Chemlambda seems to be close, especially in the lense of the alchemy of fontanna and buss that i found on chemlambda related sites.

I'm not sure if the way i put it is extremely clear though :) but it's something that is bugging me or obsessing me for while and i can't seem to find the good silver bullet system to explain this.

Maybe process mining? https://en.wikipedia.org/wiki/Process_mining

I'm not a chemistry buff, but i think i'm not wrong if i say you can't really account for the properties of complex molecular structure, at the most complex level let say living organism, only by looking at the set of atoms that compose it.

I think the contrary (with some caveats). After all there exist universal Turing machines, we all use them, we can even build them. The tower of software we put on them is for our human convenience, to be able to easily program or interact with them as humans, not because we need all the huge pile for universal computation. Likewise, a cell is nothing more than a very special pattern of chemical reactions. When we explain (what we understand about) a cell, we invent, for our human understading purpose, all sort of names and analogies, but the cell functions well without the tower of semantic we inflict to it.

Chemlambda seems to be close, especially in the lense of the alchemy of fontanna and buss that i found on chemlambda related sites.

ALCHEMY is a very strange beast. Historically is very important, but otherwise is a system which disregards exactly what's the most interesting: computation.  Indeed, in ALCHEMY is used a soup (multiset of) lambda terms in_normal_form and there is a template for an infinity of possible chemical reactions:
A + B = NormalForm(A B)
Therefore the most interesting part from the point of view of computation, namely NormalForm(), is just ignored.
Later Fontana used a pi-calculus, which is another fashionable way (along with category theory) to ignore how computation really happens. It's magical. Who cares? they say, because they are interested in the meaning of the computation, not in the computation itself. I believe that computation, concretely, is all that happens, semantics attached or not. But how it happens in nature?
I'm not even that strange, there is an old fight here: TOC vs TOP
https://pron.github.io/posts/what-we-talk-about-when-we-talk-about-computation
I am TOC not TOP :)
Differently from ALCHEMY, chemlambda uses graphs, some of them can be obtained with a parser graph = lambda2mol(term), but in general it does not matter, and purely local graph rewrites (i.e. they can be executed by local machines, like enzymes) as chemical reactions. The computation is central here.
What is left, and you may consider this a critique, is how the graphs are built, before they engage in random chemical reactions.

Who cares? they say, because they are interested in the meaning of the computation, not in the computation itself. I believe that computation, concretely, is all that happens, semantics attached or not. But how it happens in nature?

A quick tangential answer, but somehow that can be also a valid concern, i remember a while back i was argueing with a free mason around pythagora, trying to make a sort of point like this, that computation is all what matter and he answered me something like computation like pythagora is a solution to an old problem that is as old as mankind and not a thing of its own.
I think it's also a bit the point that edelman makes all along, and even rieman i think made that sort of argument, that even computation or any kind of theorical science is maybe more a solution to a problem of the mind than really something reality needs to function.
It's more the question of how useful those concept are to solve humans problems that matter rather than how 'real' it is, i think it's a bit related to the degeneracy thing edelman talks about as well.
Maybe at neurological level, not two persons will have the same neural pattern that is used to represent the 'computation' or whatever is going on.
Very interesting answer otherwise, i'm going to dig all this more :)

For quite a while, I’ve been disturbed by the emphasis on language in computer science… Thinking is not the ability to manipulate language; it’s the ability to manipulate concepts. Computer science should be about concepts, not languages. … State machines… provide a uniform way to describe computation with simple mathematics. The obsession with language is a strong obstacle to any attempt at unifying different parts of computer science.

That seems like something stepanov would agree with :)

Computer scientists collectively suffer from what I call the Whorfian syndrome — the confusion of language with reality…Many of these formalisms are said to be mathematical, having words like algebra and calculus in their names. … Despite what those who suffer from the Whorfian syndrome may believe, calling something mathematical does not confer upon it the power and simplicity of ordinary mathematics.

good point as well :)
Well originally i started to get into this because i started to develop some micro kernel architecture, and i needed something to smash different modules/drivers together, compiled indifferently from windows/visual studio, or gcc, or any other compiler, and add new modules/drivers without having to recompile the whole tree. Like with the pci bus modules are matched with vendor/device ID, and that's all. Even using precompiled NDIS modules for network device or such.
But then i noticed the same structure works for filesystems, for windows system, for lot of things actually, even at the core web applications like say joomla or wordpress can be similar in that way of adding modules and configuring the system to load them together.
With also this possibility to log/debug the particular configuration used at some point when lot of loading and configuration is made more or less automatically, or can become relatively complex without being directly specified in a program.
But then i pushed it further to have decentralised/distributed computation.
Thanks for the answer, lot of food of thoughts :)

I'm not even that strange, there is an old fight here: TOC vs TOP
https://pron.github.io/posts/what-we-talk-about-when-we-talk-about-computation
I am TOC not TOP :)

The conclusion i reached is if you want to stick to a pure computation model, there are 2 things you are going to miss, which are streams, open/read/write/close are not really computation, and have not really much equivalent in mathematics, natural science or physics, and interupts in that sense of having procedures that can be executed at random moments, such as input devices for UI, or other hardware devices that work asynchronously with the main cpu. Can even add threads to this if targetting multi core, but if avoiding shared mutable states, i guess it can also come down to an interupt paradigm.
There can be way to get around those, but to me it looks all the ways that 'programming langages' departs from a pure computation models are either to handle streams or interupts. Those are not described in lambda calculs or computation models, and it's where all the clumpsyness comes from in most languages.

@NodixBlockchain The computational model for streams is called "codata". Haskell deals with this very nicely - lazy computation and codata go together very well, just like eager computation goes with data.
The problem is, like with most pure computational models, efficiency is difficult to achieve, and hard for programmers to understand.
One nice solution that keeps everything eager is 'coroutines'.  Coroutines can be modelled at a high level, see JavaScripts 'generator functuons' and Go's 'goroutines'.
Things like open/read/write can be modelled at the type system level by something I would call a 'protocol'.
Fundamentally the difference between 'logic' (mathematics) and computation, is that mathematics has no 'time'. A proof is either true, false or unprovable, there is no before and after. In computation 2 + 2 is not 4 until the expression is reduced, so there is a before "2 + 2" and and after "4". This is what Turing contributed to mathematics.
So a pure representation of something must be "true for all time" and declarative. We represent the state machine in the type system: the type of a new file is Unopened, after opening its Open, and after closing its Closed. The transitions are triggered by functions (messages) but we want to tie these to the File type.
data Unopened
data Open
data Closed
class File a
instance File Unopened
instance File Open
instance File Closed
open :: Unopened -> Open
read :: Open -> (Open, Buffer)
write :: Open -> Buffer -> Open
close :: Open -> Closed

I am not sure this is the best we can do in Haskell, but it has the problem that the functions are not really tied to the typeclasses. We could imagine writing a protocol like this:
protocol File (Unopened | Open | Closed) where
   open :: File Unopened -> File Open
   read :: File Open -> (Buffer, File Open)
   write :: File Open -> Buffer -> File Open
   close :: File Open -> File Closed

Which is sort of a cross between a type-class and a Generalised Abstract Data Type (GADT).

Am i right if i say codata and corecursion will work mostly if there is a sort base case that will be the same for all values generated ? Like if the stream is essentially an iterator ?
Because the main problems is that streams are not necessarily defined following a type definition, and there are all the serialisation format, like ASN, protobuf or BNF, that can become even a grammar of their own, or streams can just be random junk.
Even beside this, when dealing for example with sockets, the behavior of read/write will depend on the socket protocol, or the operating system, and there can be many way to handle a situation. To me it still seems it lacks the kind of concept like stepanov would put it to make the compiler able to check if the behavior of the socket manipulation algorithm is 'correct', or if the algorithm actually implement the desired behavior.
Even more so if you get asynchronous stream answers.
Even with goroutine if the channel is actually a socket, there are many way to handle a block, or a read/write return value, many flags/options that can be used alongside with sockets that will change the behavior and how the algorithm should handle their return value and what there will be in the buffer.

To get a bit more in depth, the problem as i see it is almost all file format or network protocol will have first an header that will contain a least the type of the data and its length, then the data itself.
Which mean you will have at least two successive read operation that depend on each other.
Eventually you'll have a layer of compression or encryption on top of it, or things like chunked transfer (Each chunk is preceded by its size in bytes. The transmission ends when a zero-length chunk is received. )
Eventually there is the system like in avi/mp4/ogm where there are "virtual streams" multiplexed inside a physical stream.
The idea would be alongside being able to define stream layout, and a processing algorithm, with something that allow to control the progress, let say in byte.
And then being able to use the stream definition as an input for computation.
I'm pretty sure with a system like this, the open/close points could be implicit and determined by the compiler, alongside with some error management, integrated into a 'concept' for the whole stream processing algorithm, in sort that the whole algorithm can be compile-time checked.

@NodixBlockchain

There can be way to get around those, but to me it looks all the ways that 'programming langages' departs from a pure computation models are either to handle streams or interupts. Those are not described in lambda calculs or computation models, and it's where all the clumpsyness comes from in most languages.

If I understand well, in the background of this discussion is the hope that we (somebody) will make some day a truly decentralized computer. Which has I/O and it is a true computer in the sense that it can do anything (computable).
The discussion is then that somehow an attempt like this may lead or led to some block, where there is no solution or there are solutions which turn a decentralized system into a centralized one, in time or in space. The discussion then turns to details and after a while the participants or the readers are lost.
This comment is to make a (perhaps well known) statement that a decentralized computer based on a term rewrite system (like lambda calculus is) is simply not possible from first principles. You can't mend it, nobody can.
On the contrary, a decentralized computer based on a local graph rewrite system (like Lafont Interaction Combinators, the pure version, or chemlambda or chemSKI, etc) is possible. The problem here is that there are no programmers to efficiently use it (yet).
So, like it or not, the goal to make a decentralized computer by using what programmers like, it is as possible as the transmutation of elements were for alchemists.

I like clojure's approach to exactly these kind of systems, which it calls an "Epochal timeline" I think.
Clojure is dynamically typed, but they have developed "spec" to specify wire protocols. I also note that the creator of Clojure says that the internals of programs should reflect their externals (paraphrased), so to me this implies that modules should also have APIs defined with "spec".
The state model I have been proposing to investigate for my language turns out to be the same as Clojure's Epochal timeline, except I want to allow controlled mutability (different topic however). The main difference in approach is that I want to capture the typing of protocols and modules in a type system rather than a tool.
Basically in my model/terminology a 'protocol' is a type that represents the exchange of data between two programs. Calling an API method in a local library is a very simple example of a protocol. Calling a remote procedure call, or a RESTful API with JSON data is a other slightly more complex protocol. The most complex protocols involve more than two programs, and each is maintaining an internal state that affects the messages it can send it receive.

https://www.academia.edu/27047824/Emergence_Oriented_Programming
Emergent properties arise from the numerousinteractions of many simple agents. It is difficult toencapsulate emergence in a traditional programminglanguage. An object-oriented language such as Java iscapable of encapsulating the properties and behavior of asingle agent within a class instance, or object. Thus, Javaprovides a specific language mechanism for modularizingagents. However, emergent structure does not exist withina single agent, nor does it result from the execution of asingle agent behavior; rather it arises from the interactionsof many agents over the course of time. Thus, toencapsulate emergence, we need a program languageconstruct that can express modularity across a set of objectsand a set of object interactions. This requires encapsulationof a set of classes and class method invocations. Object-oriented languages do not support such modularity.A new programming language paradigm has beenintroduced in recent years to address such “cross-cutting”concerns[7]. Aspect-oriented programming (AOP) is alanguage model that supports the encapsulation of concernsthat cross the object-oriented class boundary. AOP providesdirect language support for modularizing emergentstructure and behavior. For example, an aspect may bewritten that describes a set of method invocations, whichmay occur in multiple classes. Emergent behavior maythus be recognized when such a set of method invocationsoccurs during a program execution.
4.1

Using Aspect-Oriented Programming
Aspect-oriented programming allows theimplementation to accurately reflect the conceptual layersfrom the cognitive model by creating modular structuresthat encapsulate the layers on the software side[7]. Itsupports modularized code that can be mechanicallyinserted into executable code at specific, user-definablelocations. The key point is the set of locations can not beencapsulated modularly at the lower layer because theprogramming language at the lower level can not provide aconstruct for describing the set of execution points. Forexample, if we want to perform some logging operation thatshould occur directly before a particular set of invocationsof the method foo( ), we can either manually insert codeprior to each invocation of foo( ) throughout the Javaprogram, or use a higher level language such as AOP thathas a structure to express all invocations of foo( )simultaneously. By intertwining the new AOP modulesexpressed at the higher level into the executable bytecodes(in the case of Java) the original source is untouched, yetintegrates the desired functionality in the resultingexecutable. Many aspects can be applied to the same code,and aspects can be applied to other aspects. This powerfulmechanism provides a direct, tangible representation of thelayers within the emergence model described in section 3.We use the AspectJ compiler[1] to develop all code relatedto the visualization and implementation of downwardcausation of emergence, thus implementing the emergenceframework without tangling the agent and swarm models


Update to hugo keywords

adds block keyword
adds partial keyword

Looks good to me. @regisphilibert quick check, please?

This looks great!


Support calling EVP_DigestUpdate instead of EVP_Digest[Sign|Verify]Update

Prior to OpenSSL 3.0 EVP_Digest[Sign|Verify|Update were just macros for
EVP_DigestUpdate. They are now separate functions. Unfortunately some
code assumes that EVP_Digest[Sign|Verify]Update is interchangeable with
EVP_DigestUpdate. For example the dgst app uses an MD bio which always
calls EVP_DigestUpdate(). However the dgst app supports signing instead
of digesting and may initialise with EVP_DigestSignInit_ex() instead of
just EVP_DigestInit().
We now detect these differences and redirect to the correct function
where appropriate.
Fixes #10114
A secondary issue related to #10114 is that the implementation of the MD BIO used internal EVP_MD_CTX knowledge that hadn't been updated with knowledge about providers. There's really no reason for that code to use internal knowledge so instead we use the public APIs.

Fixup pushed addressing the travis failure. The compiler warning was actually bogus - but fixed up anyway. Please take another look.

Pushed.Thanks.


Move PKA to a tech

Resolves https://github.com/space-wizards/space-station-14/issues/17030
Higher tier variants should just be rewards.

would higher-tier variants mean pka modules

would higher-tier variants mean pka modules

I don't remember how it works in /tg/ but I'd probably make them rare spawns or smth.


Enable Ngspice simulation for temp-sense generator

Can you document the current issue here?

Sure

Addressed in this https://github.com/idea-fasoc/OpenFASOC/pull/93 by @alibillalhammoud


xExchUpdate: New resource proposal - Upgrade from CU[X] to CU[Y]

Description
Create a new resource called xExchUpdate. This resource would be used to update an existing Exchange 2013/2016/2019 installation from one cumulative update version to another (i.e. Exchange 2016 CU12 to Exchange 2016 CU14). This resource would automatically check if all prerequisites are present (i.e. .Net Framework 4.7.2 or 4.8, C++ Redist. 2012 and 2013, etc.). Once all prerequisites are present the update would be performed using the unattended install. Any reboots would be handled by this resource as well. All update files would be located on a remote share and pulled in as needed.
Proposed properties
Special considerations or limitations
Currently the xExchInstall resource doesn't check prerequisites, I will also be submitting a proposal to enhance that resource with a prerequisite check/install feature. This would allow a uniform experience for both new installs and updates.

Hi Dana,
Support to upgrade to a new CU using xExchInstall was added within the past year (or two maybe). Function 'Test-ShouldUpgradeExchange' in xExchangeHelper.psm1 should handle that. If that's not working for you we may need to debug what's going wrong. Can you send -Verbose output of your DSC script while trying to upgrade via xExchInstall?

Seems that xExchInstall should be update to support more functionality. If there is a need for an exclusive xExchUpdate then please elaborate why xExchInstall is not sufficient.

See issue #425 in regards of the prerequisites.

This can be closed considering that xExchInstall should be able to handle the upgrade. See also #320 and #190.
Unfortunately, upgrading does not work for reasons that are not primarily a DSC or DSC resource issue: #496

Closing as per previous comment.


pnpm: 9.15.0 -> 9.15.1

https://github.com/pnpm/pnpm/releases/tag/v9.15.1
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] 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
[x] 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

[ ] Fits CONTRIBUTING.md.

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

Thanks! I started a nixpkgs-review on linux which will be done in ~5 hours.


Modelling subrecipes

Last week I discussed the possibility of subrecipes with @nikolakasev. I made a small prototype of how I envision this: https://github.com/vincentdehaan/baker-subprocess/blob/master/src/main/scala/nl/vindh/baker/SubprocessApp.scala
In my prototype, the idea is as follows:

We can define an ExpandableSubprocess that needs some inputIngredients and yields some outputIngredients. This is just an interaction (with a dummy event in order to make it compile) that can be inserted in any recipe to make it compile.
We can expand such a subprocess by substituting it with any recipe that takes the same inputIngredients and yields the same outputIngredients. After expansion, the resulting recipe still compiles and is runnable as well, given that the chosen subrecipe has an implementation.

The advantage of this approach is that we can reuse code optimally at the one hand, and at the other hand visualize the resulting process as a whole in one diagram.
At the moment I implemented the expandSubprocess method using an implicit class, but if you like the idea, I could create a pull request to attach this method directly to the Recipe case class.

Hello Vincent,
Its always good to see someone looking into expending Baker!
Thank you for the example code, this makes it much clearer what you mean.
First lets start with some history.
The subject of sub recipes has come up multiple times in the past.
In most of those cases we found that a sub recipe was not really needed.
For example last time we encountered this they had 4 different recipes that reused a lot of the same interactions.
In their case we moved this generic part of the recipe to its own recipe and exposing it as its own API endpoint.
We made a new interaction that in turn calls this API endpoint.
This made it easy to reuse this code because now its just a interaction in a recipe and at the same time they did not have to maintain duplicate code between different APIs/Recipes.
This is now also the first thing we ask a team if they ask for sub recipes.
Is this sub recipe not a capability of its own and should it not be its own endpoint?
I do understand this is not always the case.
For the Java dsl we have the .withRecipe functionaly.
Like your example this just adds the interactions and events from the given recipe to the recipe.
This was a experiment and we are thinking about removing this again.
Our reasoning is that if we add functionality like a sub recipe we want to do it in a bigger way.
Instead of only having the sub recipe on recipe level we also want it to reflect on the runtime.
For we have no concrete plans for this and decided it is not worth the effort at this time.


[Feature Request] Dynamically set Application name ("Playing ...")

Rich Presence does not support dynamically setting a custom App Name (as in "Now Playing ..."). It instead takes the App Name from the Application Name from under https://discordapp.com/developers.
The vast majority of people don't click on profiles to see rich presence details, this would be very useful for music/movies etc app rich presence support.
It's the difference between 99% of people seeing ie. "Playing <song title/artist>" instead of "Playing Music" or such.
It's a feature that even MSN messenger supported.

This Issue is a continuation of #54 that got inexplicably closed.

At the very least, users should be able to change the name ("Last.fm" here) dynamically.

The  AliucordRN RichPresence plugin has the ability to do this:

@amsyarasyiq any tips on how we can do this?

Can you actually edit the application name while running tho? Is it doing it via the RPC or is it using a API call to the developer portal?
Also note custom clients, being outside of the TOS, dont always follow the rules when it comes to implementing features

Can you actually edit the application name while running tho

It should be possible from what I know of the Discord RPC API. There is a field for name in the Activity Structure.
I would 100% support this being added. I have numerous use cases for this and it seems logical given that most people tend to only glance at quick status, which only displays the activity name. I do this myself and it is annoying that you need a different client ID for every different custom app, since Discord limits the amount of applications you can have.

No, it is not possible from a real application. It's only possible from the modified Discord clients since it manually set the application name bypasses the default behavior (which is fetching the application name from the ID).

Another reference: Vencord CustomRPC plugin

It is possible because you expose your discord token :(

Another reference: Vencord CustomRPC plugin

It's like with Spotify, you can create account there and link discord, when you link discord, you expose your discord token, so that they can detect activity.

Rich Presence doesn't expose your token to anyone.

Rich Presence doesn't expose your token to anyone.

Then how people is able to change the status to Listening to or Watching when it's not the part of RPC?

any news on that?

any news on that?

In order to actually change statuses to those, you need to extract actual user token. And use something else than this library. For example discord bots allow that feature because we literally parse the token of bot (like a user). And then using API calling specific code to change status to whatever you like. So in here, in this library, there will be no ability to add this feature unless to add the authentication, extracting user token and etc. To allow such functionality. This library is perfect for making "Game" activity.


React group project: set up your Kanban board

Project Link
We are a team of 2 members.

It's approved by reviewer. No. we can move forward and resolve other issues.


Fix Other Payment Option

If payment is 0 use cash,  make sure discount dose not go below 0

Other has been removed!


Adding codemeta.json file for standard metadata

@garciagenrique @LukasNickel maybe you can add your author information  as  well in the file please - by pushing directly to this PR branch is fine

New to me - do we all agree with these definitions ? For the record I found it for R contributions, and not sure how do they apply to Python ones,
(Author) Use for full authors who have made substantial contributions to the package and should show up in the package citation.
(Contributor) Use for authors who have made smaller contributions (such as code patches etc.) but should not show up in the package citation.

New to me - do we all agree with these definitions ? For the record I found it for R contributions, and not sure how do they apply to Python ones,
(Author) Use for full authors who have made substantial contributions to the package and should show up in the package citation. (Contributor) Use for authors who have made smaller contributions (such as code patches etc.) but should not show up in the package citation.

Haven't seen it so far aswell.
I suppose with that definition I might be a contributor? Up to you to decide


License

Discuss CCO vs. MIT license. Which is a better fit?
MIT License
Copyright (c) 2022 Environmental Protection Agency
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
 IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Completed edits for CCO


Document how jsbundling-rails compares to webpacker

With webpacker previously becoming the default JavaScript bundler in Rails, I suspect many folks are going to come to the jsbundling-rails project wondering how the two compare.
With that in mind, I think it would be useful to document some of the differences that will help developers decide if they want to migrate to jsbundling-rails or stick with webpacker. This PR is a basic attempt to do that :)
Something else that could be useful is some sort of migration guide, but I don't intend to include something that specific in this PR, especially given that things are still in flux (this gem is still pre-1.0, and webpacker appears to be nearing a new major version release).

Good guide. Let's split it out into a separate file, then link to that file from the README 👍

Created a new docs directory and moved the content to a new file there which is linked from the README.


Add rules to eslint and integrate prettier

As per #151

Added rules and integrated prettier in yarn build in #175


navigateToLoginRequestUrl: true - For Dyanmic pages

Please follow the issue template below. Failure to do so will result in a delay in answering your question.
Library

[ ]<EMAIL_ADDRESS>
Description
I have dynamic pages, like a blog for example.  If the user tries to access a blog and they are not signed in, we are redirecting them to sign in.    Therefore, I want to use navigateToLoginRequestUrl: true.   However, I am getting errors that my redirect URL is not valid.
I have a first party app in the First party portal.   Can we configure wildcard redirect URLs in the FPP?  I do not think we can and if not how should I handle this scenario.
Thanks

@jrmcdona You should set your redirectUri in MSAL to something that is registered in the portal and implement handleRedirectPromise on that page as well. After signing in AAD will redirect you to your redirectUri and from there handleRedirectPromise will redirect you a 2nd time to the original page that made the request (this is the part that navigateToLoginRequestUrl: true enables)

@jrmcdona You can also find the relevant documentation here

@tnorling so it needs to be on a page different from our primary  handleRedirectPromise?
I don't think this is going to work I have an Angular app.  My handleRedirectPromise is in the app.component.ts right now so it will load everytime the Angular app loads, there for it is going to load twice if I add handleRedirectPromise  in yet another Angular route.
When I set navigateToLoginRequestUrl = true in my current App is seems to get caught in a login loop.

@jrmcdona Yes. It's fine if it loads twice (this is actually intentional) because the internal logic will ensure that it only processes the redirect response on the route that the response is intended for. It determines this based on the navigateToLoginRequestUrl flag. If this is set to true handleRedirectPromise will redirect to the original route that initiated the request. If it's set to false or you're already on the original route it will just process the response.

When I set navigateToLoginRequestUrl = true in my current App is seems to get caught in a login loop.

Can you do some debugging to determine what's causing your loop? Is your app calling login again before completing the redirect to your other route?

@tnorling  I think I see the issue here.    We are using auth guards on our Angular routes.   The Auth guard is getting called before the user has been authenticated during the redirect process and therefore triggers another loginRedirect request and starts a loop.
It then errors out saying there is already an interaction in progress.
I am having some difficulty thinking of a way to get around this so far.  Besides moving Auth guards altogether and coming up with some at the page level that check for auth but that isn't ideal.

@tnorling  is there a way I can capture the URL  where MSAL is going to redirect to?  Because if so then maybe I can get the URL and do something on my own with it.   Not sure what but trying to come up with some ideas.

Actually,  maybe MSAL.JS should not perform a redirect until the callback has completed.


Add Spark 3.0.2 to Shim layer

Spark now has 3.0.2 snapshot available, add it to shim. Everything right now just uses 3.0.1 as we don't have any incompatibilities at this point.
I added the unit tests for 3.0.2 to the nightly build.  I also added the jenkinsfile for the integration tests but we will have to file a pr with Calvin to add that actual build.

build

@NvTimLiu @GaryShen2008   Note that this is added another shim layer and adds unit tests to nightly.  I added the Jenkins file for integration tests but we can add that actual build later after the 0.2 release.

build


library watch issues

Hello,
When I run your script: trigger_transfer_share_flow.py
I am getting this error:
from watch import FileTrigger
ModuleNotFoundError: No module named 'watch'
Can you please tell me where does that module come from? I installed watch from PyPy and it doesn't have FileTrigger.
Thanks
Ana

Hello @anamariaUIC! There is a second file, watch.py in this repository that is used by the various scripts. The watch module on PyPI is unrelated.
Try downloading watch.py and putting it in the same directory as trigger_transfer_share_flow.py, and please let me know if that resolves the issue!

Hi,
Thank you for getting back to me. I did just that and this is the error I got:
@.@.>:~/globus-flows-trigger-examples $ ./trigger_transfer_share_flow.py --watchdir "/home/anamaria/matlab/data"  --patterns ".mlx"
Watcher Started
Monitoring: /home/anamaria/matlab/data
File created: f4.mlx
File ends with .mlx
Starting flow...
Please log into Globus here:

https://auth.globus.org/v2/oauth2/authorize?client_id=e6c75d97-532a-4c88-b031-8584a319fa3e&redirect_uri=https%3A%2F%2Fauth.globus.org%2Fv2%2Fweb%2Fauth-code&scope=https%3A%2F%2Fauth.globus.org%2Fscopes%2Feec9b274-0c81-4334-bdc2-54e90e689b9a%2Fmanage_flows&state=_default&response_type=code&code_challenge=KxVT9Ca_9RbU7B521LpGXxR8jG59CEZgQfZPBC5pTek&code_challenge_method=S256&access_type=offline&prefill_named_grant=Globus+Automate+Command+Line+Interface+on+login-1.extreme.acer.uic.edu

Enter the resulting Authorization Code here: Hy9SLZFamrvLyv0dkdWDgv2BOxsxAw
Exception in thread Thread-1:
Traceback (most recent call last):
File "/software/linux-el7-x86_64-legacy/EasyBuild/software/Mamba/4.14.0-0/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()

File "/software/linux-el7-x86_64-legacy/EasyBuild/software/Mamba/4.14.0-0/lib/python3.10/site-packages/watchdog/observers/api.py", line 205, in run
self.dispatch_events(self.event_queue)

File "/software/linux-el7-x86_64-legacy/EasyBuild/software/Mamba/4.14.0-0/lib/python3.10/site-packages/watchdog/observers/api.py", line 381, in dispatch_events
handler.dispatch(event)

File "/software/linux-el7-x86_64-legacy/EasyBuild/software/Mamba/4.14.0-0/lib/python3.10/site-packages/watchdog/events.py", line 271, in dispatch
self.on_any_event(event)

File "/home/anamaria/globus-flows-trigger-examples/watch.py", line 67, in on_any_event
self.logic_function(event.src_path)

File "/home/anamaria/globus-flows-trigger-examples/./trigger_transfer_share_flow.py", line 15, in run_flow
flow_scope = fc.get_flow(flow_id).data["globus_auth_scope"]

File "/software/linux-el7-x86_64-legacy/EasyBuild/software/Mamba/4.14.0-0/lib/python3.10/site-packages/globus_automate_client/flows_client.py", line 472, in get_flow
return self.get(f"/flows/{quote(flow_id)}", **kwargs)

File "/software/linux-el7-x86_64-legacy/EasyBuild/software/Mamba/4.14.0-0/lib/python3.10/site-packages/globus_sdk/client.py", line 144, in get
return self.request("GET", path, query_params=query_params, headers=headers)

File "/software/linux-el7-x86_64-legacy/EasyBuild/software/Mamba/4.14.0-0/lib/python3.10/site-packages/globus_sdk/client.py", line 319, in request
raise self.error_class(r)

globus_sdk.exc.api.GlobusAPIError: ('GET', 'https://flows.globus.org/flows/REPLACE_WITH_FLOW_ID'https://flows.globus.org/flows/REPLACE_WITH_FLOW_ID', 'Bearer', 404, 'Error', 'NOT FOUND')
Please advise,
Ana
On Jul 24, 2023, at 4:57 PM, Kurt McKee<EMAIL_ADDRESS>wrote:
Hello @anamariaUIChttps://github.com/anamariaUIC! There is a second file, watch.py in this repository that is used by the various scripts. The watch module on PyPI is unrelated.
Try downloading watch.py and putting it in the same directory as trigger_transfer_share_flow.py, and please let me know if that resolves the issue!
—
Reply to this email directly, view it on GitHubhttps://github.com/globus/globus-flows-trigger-examples/issues/8#issuecomment-1648682172, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AUHBH5DSXWDHPMIP66RCVQ3XR3VVBANCNFSM6AAAAAA2QM4WCY.
You are receiving this because you were mentioned.Message ID: @.***>

I see "REPLACE_WITH_FLOW_ID" in the error text. There are several variables that need to be modified in the trigger_transfer_share_flow.py file, starting at line 15:
https://github.com/globus/globus-flows-trigger-examples/blob/068e70fdabccfed35e804ca9581a2e50a9f5026f/trigger_transfer_share_flow.py#L13-L36
All of the variables prefaced by a TODO comment should be modified to match your circumstance.

I'm going to close this issue, but please respond again if you have more questions!


test: remote branch run e2e test

/ready-to-test

/ready-to-test

/ready-to-test

/ready-to-test

/test

https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/2716059639

/ready-to-test

/test

/test


Matplotlib: shared libc++

Porting p4a matplolib recipe leads to runtime error:
ImportError: dlopen failed: TLS symbol "_ZZN8gwp_asan15getThreadLocalsEvE6Locals"

I have received the same error message for the same entry point in a completely different program.
Does anyone know what it even means? Or what causes it? Or how to fix it?


Fails to properly serialize Active Record descendants with unsaved records

invoice = Enrollment::Invoice.last
puts invoice.items.length # equals 1

invoice.items << invoice.items.build
puts invoice.items.length # equals 2

options = {
    include_blank: true,
    include_unsaved_changes: true,
    include_descendants: true,
    descendant_depth: 2,
    include_keys: true
  }
str = URI::UID.build(invoice, options).to_s
new_invoice = URI::UID.parse(str).decode
puts new_invoice.items.length # should equal 2, but equals 1.  <-------------

Some additional detail: This is because incldue_descendants operates on loaded associations. We need to update the internals to ensure that persisted descendants are also included.

I decided to tackle this feature in the PR I'm current working on (along with marked_for_destruction tracking). Here are the relevant commits for each.

Marked for destruction tracking
Unsaved descendant tracking


is this still maintained?

There are several pull requests (including one from me). @cswl is this project still maintained?

Sorry I had been busy.
I have no time now for messing with Android like I used to.

I did however upgrade it for magisk and stuff..


Add view user last seen at label

Related to flarum/core#1540

Should probably contain the word "user" to make it clear what it's referring to.
"View user status"
"View user activity"
"View user last seen time"
"View user visit time"
"View user online time"

I think "View user last seen time" is the best for the moment because that's the only thing it does right now.
If maybe in the future there were some other record of a user's last activity, then it could be changed. But for now, it's just the last seen at time.


SyntaxError: Unexpected token{

Describe the bug
Uncaught SyntaxError: Unexpected token { VM:364:6
Following the instructions for "How to delete/unsend all messages?" I am able to follow the steps up until "enter" to run the code.
To Reproduce
Steps to reproduce the behavior:
Following the instructions for "How to delete/unsend all messages?" I am able to follow the steps up until "enter" to run the code.

I extra the file, and create an empty folder. I open the special chrome, log into IG and copy and paste the chat thread id to a notepad.
I then paste the  InstagramHelper.js file contents into conseole tab. I do not press "enter" here.
The last step is to copy and paste the following code and then press "enter"
"  var ig  = new InstagramHelper();
ig.startUnsending("your_chat_thread_Id",10);"
I copy and paste it, then paste my "you_chat_thread_Id", then remove the " quotations around it, then press "enter" and I get the syntaxerror.

Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
NA
Desktop (please complete the following information):

OS: PC
Browser chrome
Version 96.0.4664.110

Additional context
i tried this with a different "your_thread_Id" and I still get a syntaxerror. Here is the new variable I tried it with. If I leave the " quotations around the "your_thread_Id" then I get VM420:35 as the syntax error. If I take the quotations out, then I get VM421:35 as the syntax error

Please attach screenshots of the red errors you getting.

Please see attached.

You need to press Enter after you paste the whole code from file.
And then after you need to run that two lines of code passing chat thread id in double quotes (not without number)

When I press Enter after I paste the whole code from the file I get another error (picture attached)

.

Can you put a screenshot of the error which mentions "Unexpected token = " after that at the most right side will be written underlines words, press on that and take a screenshot and attach here.

Ok, I took a picture. Line 35

Ok, I took a picture. Line 35

Is your browser is updated with latest version?

Is your browser is updated with latest version?

Thanks, I was able to relink the special chrome to an updated version which solved one piece of the error. Below, I am getting another "looping" error after I paste the second piece of the code. I did a quick screen shot before the error message fills up the screen and I have to eventually exit and restart the chrome broswer.

Thanks, I was able to relink the special chrome to an updated version which solved one piece of the error. Below, I am getting another "looping" error after I paste the second piece of the code. I did a quick screen shot before the error message fills up the screen and I have to eventually exit and restart the chrome broswer.

You need to pass thread id in double quotes

You need to pass thread id in double quotes


Adoptable Pets: Add empty state

If you go to /adoptable_pets and perform a search that returns no results, we don't show anything.
Please add an empty state and render it if the adoptable pets collection is empty. It should say "We don't have any pets matching your search criteria."

I'll take this one!

FYI @Gabe-Torres this PR https://github.com/rubyforgood/homeward-tails/pull/1070 is creating separate adopatable pet pages, by species, but it's using the same controller. So, the empty state rendering shouldn't be impacted much. But, thought I would let you know. P.S. let me know if you have any questions.

@Gabe-Torres how's this going?

I'll have this pr submitted asap!

Thanks @Gabe-Torres no major rush! Just checking in :)

PR submitted!

Here is the new new. Sorry for the confusion! 🐶
This PR has the latest main and no previous commits from my last attempt.
I will delete the previous branch once this issue is closed.


Feature Request: Extend syncStatusBar option

Regarding the options 'syncStatusBar' it would be nice to have the ability to skip setting the background color (https://github.com/aparajita/capacitor-dark-mode/blob/main/src/base.ts#L163). In my case I set the status bar background on transparent on app start (StatusBar.setBackgroundColor({ color: '#00000000' }), because I am using my app in fullscreen (true) but this plugin would override the color if I use the option syncStatusBar. So either a new option should be introduced to skip setting the background color and only set the style of the statusbar to change its text color, or the --background should also handle alpha channels.
I would prefer a new option to prevent an overhead of useless 'setBackgroundColor' calls in my case. In other cases the non alpha hex values should be enough. What do you think?

I guess I could allow syncStatusBar to be either true (change text color and background) or textOnly.

Hey aparajita,
do you have any news on this? :)

Implemented in v3.1.0.


[BLE] AT+BLECONN gives ERROR

Hi, my problem is simple: AT+BLECONN does not work.  I type:
AT+BLEINIT = 1

AT+BLECONN=0,"5b:f5:b9:de:b2:65"

(I let an uuid for the exemple)
And I randomly get one of those 3 ERRORS:
1)After 15 seconds

+BLECONN:0,-1
ERROR

2)Immediately

ERROR

3)After 15 seconds

+BLECONN:65535,-1
ERROR

Here is what I tried

I changed the service
I changed the uuid
I changed the device
I checked the uuid with AT+BLESCAN=1
I always succed to connect with an other client device (a phone or a computer)

And surprisingly, it once worked for severeal seconds without changing any parameter. But just one time.
Did I missed something ?
Thank you,
Alex

By the way, my firmware version is 1.2
AT+GMR
AT version:<IP_ADDRESS>(6fe4345 - Jun 27 2019 05:39:23)
SDK version:v3.2-127-gddbce78
compile time:Jun 27 2019 12:08:01
Bin version:1.2.0(Unknown)

The remote device must be needed in broadcast
Also note the address type, if the remote device is a random address type, you need to add optional parameters
AT+BLECONN=0,"5b:f5:b9:de:b2:65",1

Hi, as I said here #166 there is still a problem (I must reset the ESP sometimes) :

For a static (not random) adress, I get sometimes:
AT+BLECONN=0,"d4:ca:6e:b6:ef:57"
+BLECONN:0,-1
ERROR
That happens when I try just before to connect to a busy periferical or when the periferical rejected the connection.
To fix that, I must reset the esp with AT+RST.
Is there any clean solution ? Other than reseting the chip I mean.
Thanks

I assume that BLE AT commands for ESP32 are not perfect at all. I am working on since June and I found a lot of bugs.


Define and document semantics of dynamic Insertion in Chare arrays wrt broadcasts and reductions

Original author: Nikhil Jain
Original issue: https://charm.cs.illinois.edu/redmine/issues/49

Define the semantics of dynamic insertion, make modifications in Charm to adhere to those semantics, and document it.

Original date: 2013-02-18 03:15:26

So, the meeting on this happened, and it seemed that the consensus settled on "application developers are responsible for ensuring that reductions and dynamic insertion do not overlap". I suggest that this restriction should be documented in the manual section regarding dynamic array element insertion, and referenced in the section on array reductions.
Sanjay, please re-assign this to someone to write.

Original date: 2013-03-15 21:42:07

As discussed in core group, the general semantics should be "don't overlap reductions with insertion", along with an option to specify some sort of token to match an insertion to a specific reduction in which it should participate.

Original date: 2015-12-15 20:32:52

I recently wrote some code for my thesis project that relies on the undocumented semantics of our implementation for reductions. I have a single chare array in which one set of elements are dynamically inserting a later set of elements. I need all of the elements to be on the same page in terms of reductions. Here's what I did:

all of the pre-existing elements call contribute() before making an insertion call
that contribute() call ensures that all of the inserted elements see and are stamped with the same reduction in progress
neither the old nor new elements can safely contribute to a later reduction until we are certain that all of the insertion calls have been made (but not necessarily that the objects have actually been constructed)
the early reduction is completed solely from the contributions of the old elements, because all new elements are stamped one past it
that reduction targets a broadcast to the array telling everyone that it's now safe to go on.

Original author: Laxmikant "Sanjay" Kale
Original date: 2018-04-21 15:10:53

I think implicit in Phil's comments is the requirement/assumption that the new elements must be inserted by other existing elements of the same chare array. (what about the case of an existing element creating a second one, which creates a 3rd one? I don't think thats permissible within the same epoch.. i.e. the second and 3rd element cannot be part of the same epoch of reduction numbers. All the new elements must be created by elements the exist before the reduction is .. called.. [need more precise definition: ].
The task now is to document this and check in a program that shows its use (and tests it regularly).


Unable to revert ParticlesMaterial's Orbit Velocity properties

Godot version:
v3.1.1.stable.mono.official
v3.2.dev.mono.custom_build.d087a9e32
OS/device including version:
Windows 10
Issue description:
When using the Inspector to customise a ParticlesMaterial I am unable to revert the properties under the Orbit Velocity group:

For some reason, the Orbit Velocity section is missing in my build https://github.com/godotengine/godot/commit/d087a9e3283528792634de84b55a607d9b9b5137 (latest).

Orbit properties are only available if the Disable Z flag is enabled. It's a 2D-only feature (or 2D in 3D).

Can anyone still reproduce this bug in Godot 3.2.2 or any later release?
If yes, please ensure that an up-to-date Minimal Reproduction Project (MRP) is included in this report (a MRP is a zipped Godot project with the minimal elements necessary to reliably trigger the bug). You can upload ZIP files in an issue comment with a drag and drop.

That's still reproducible in 3.3-stable.
The fact that these properties can't be reverted is likely related to this:

Orbit properties are only available if the Disable Z flag is enabled. It's a 2D-only feature (or 2D in 3D).

They're shown conditionally and this might impact whether they're considered "revertable".


Correct the spelling of CocoaPods in README

This pull requests corrects the spelling of CocoaPods 🤓
https://github.com/CocoaPods/shared_resources/tree/master/media
One day I’ll make a bot that looks through the READMEs of all Pods, looks to see if it uses “Cocoapods” and PRs “CocoaPods” :D— Ørta (@orta) February 10, 2016

Created with cocoapods-readme.

Sorry for my lated response, I added invalid for some github 500 error, but now it return to normal. thanks for your PR and follow the convention of CocoaPods. I'll merge it.👍

Note We use a capital P in CocoaPods, it's an uphill battle, but worth it :D


Use edge avoiding position

I need more time to finish my review so ill do it tomorrow. FYI - build is not passing.

Looking good - Would be nice if we can come up with some better naming but thats all.


Added new perp order instruction and time in force

Status
Type
⚠ Core Change
Issue

Ready
Feature
Yes
#59

Adds new Time In Force feature to limit orders
Adds new PlacePerpOrder2 instruction which can be more efficient and allows specifying TIF

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

84 of 87 (96.55%)  changed or added relevant lines in 6 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.4%) to 80.614%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

Solnet.Mango/MangoProgramData.cs
36
37
97.3%

Solnet.Mango/Models/Perpetuals/PerpMarket.cs
0
2
0.0%

Totals

Change from base Build<PHONE_NUMBER>:
0.4%

Covered Lines:
2234

Relevant Lines:
2740

💛  - Coveralls


Enable SELinux labelling for targzip rootFS image formats

Merge Checklist

All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)

[x] The toolchain has been rebuilt successfully (or no changes were made to it)
[x] The toolchain/worker package manifests are up-to-date
[x] Any updated packages successfully build (or no packages were changed)
[x] Packages depending on static components modified in this PR (Golang, *-static subpackages, etc.) have had their Release tag incremented.
[x] Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files
[x] All package sources are available
[x] cgmanifest files are up-to-date and sorted (./cgmanifest.json, ./toolkit/scripts/toolchain/cgmanifest.json, .github/workflows/cgmanifest.json)
[x] LICENSE-MAP files are up-to-date (./SPECS/LICENSES-AND-NOTICES/data/licenses.json, ./SPECS/LICENSES-AND-NOTICES/LICENSES-MAP.md, ./SPECS/LICENSES-AND-NOTICES/LICENSE-EXCEPTIONS.PHOTON)
[x] All source files have up-to-date hashes in the *.signatures.json files
[x] sudo make go-tidy-all and sudo make go-test-coverage pass
[x] Documentation has been updated to match any changes to the build system
[x] Ready to merge

Summary

Some projects need to build only a targzip or squashfs image format of rootFS using Mariner toolkit. The existing logic for SELinux labeling was not working for those cases because they are not building an ISO or VHD images that include different image partitions.
Here are the changes that are introduced in this PR:

Factor out the SELinux labeling logic from !isRootFS {} condition block.
Allow overriding the SELinux policy RPM package name. Currently it’s expecting the selinux-policy package, however some projects need their own policies. Therefore, the exact string match is replaced with a substring match.
“—xattrs” option is added to tar command to capture the extended attributes as well.

Does this affect the toolchain?

YES
Test Methodology

Pipeline build id: xxxx

FYI: The change doesn't affect the toolchain. It only affects the toolkit.


Plex Reverse Proxy Link is wrong

I have HTPC Manager running and working on my local server however I have an issue with the reverse proxy link within plex.
Plex Settings:

Plex within HTPC Manager works fine however when click on the 'Plex' title it takes me to:
https://www.domain.com/htpc/plex/webinterface
This page just contains the text of my Plex install:
https://www.domain.com/plex
And nothing else.
I believe the Plex 'title' should link to that URL instead of a page containing it. The reverse proxy link for Sabnzbd, sickbeard and couchpotato are all working fine and are setup the same way. If I click on the title it takes me to the correct url (https://domain.com/sabnzbd for example)
Cheers.

Should be fixed now.


Athena - database tables getting confused if metadata files are included in folder structure

If you include the parquet files for a table you wish to link inside of the folder in which all of your splink3 outputs are stored, you can occasionally run into issues with athena getting confused.
Looking at this folder structure...
splink_warehouse               # root folder everything is held within
├── parquet files             # parquet files for table to be linked contained inside folder
├── splink_tables           # folder containing the outputs from splink3
│   ├── __splink_table     # table created by splink...
│   ├── __splink...            # more tables created by splink...
│   ├── tables                   # generated by awswrangler create_ctas_table func - stores metadata
│   └── ...                 # etc.
└── ...

The problem originates from the fact that we have the tables folder (which stores the metadata from create_ctas_table) inside the same area as our raw data.
This results in the following error in which athena tries to read the metadata instead of the parquet files, for whatever reason...

This also blocks our ability to run select * from main_table from directly inside of athena, as it looks at the metadata files before executing.
From a quick overview, there appear to be two solutions...

Continuously delete the tables folder. This will add another query step with s3, which I'd rather avoid if we can.
Advise that users store their linker data in another area to their splink3 outputs.

It's worth noting that you can run a full pipeline without any issues. This problem only arises after you've generated __splink_df tables.

Closing for the time being. We may revisit this when given the time, but it's not a high priority ticket.


feat: add the buldge in the trace

Closes - #36

But the offset as well as the point between the offsets should be of the same width right? Just that the transition is what I need to take care between the routes width

@seveibar Is this how the convergence at the start and end should look like?

No, i can try to give you an equation shortly, but it should always linearly interpolate, there isnt any special behavior as you get close to a corner

@imrishabh18 here's a method you can use:
interface Point {
  x: number;
  y: number;
  width?: number;
}

function getExpandedStroke(
  strokeInput: (Point | [number, number] | number[])[],
  defaultWidth: number
): Point[] {
  if (strokeInput.length < 2) {
    throw new Error("Stroke must have at least two points");
  }

  const stroke: Point[] = strokeInput.map(point => {
    if (Array.isArray(point)) {
      return { x: point[0], y: point[1] };
    }
    return point as Point;
  });

  const leftSide: Point[] = [];
  const rightSide: Point[] = [];

  function getNormal(p1: Point, p2: Point): Point {
    const dx = p2.x - p1.x;
    const dy = p2.y - p1.y;
    const length = Math.sqrt(dx * dx + dy * dy);
    return { x: -dy / length, y: dx / length };
  }

  function addPoint(point: Point, normal: Point, factor: number, width: number) {
    const halfWidth = width / 2;
    const newPoint = {
      x: point.x + normal.x * halfWidth * factor,
      y: point.y + normal.y * halfWidth * factor,
    };
    if (factor > 0) {
      leftSide.push(newPoint);
    } else {
      rightSide.unshift(newPoint);
    }
  }

  // Handle the first point
  const firstNormal = getNormal(stroke[0]!, stroke[1]!);
  const firstWidth = stroke[0]!.width ?? defaultWidth;
  addPoint(stroke[0]!, firstNormal, 1, firstWidth);
  addPoint(stroke[0]!, firstNormal, -1, firstWidth);

  // Handle middle points
  for (let i = 1; i < stroke.length - 1; i++) {
    const prev = stroke[i - 1]!;
    const current = stroke[i]!;
    const next = stroke[i + 1]!;

    const normalPrev = getNormal(prev, current);
    const normalNext = getNormal(current, next);

    // Calculate miter line
    const miterX = normalPrev.x + normalNext.x;
    const miterY = normalPrev.y + normalNext.y;
    const miterLength = Math.sqrt(miterX * miterX + miterY * miterY);

    const currentWidth = current.width ?? defaultWidth;

    // Check if miter is too long (sharp corner)
    const miterLimit = 2; // Adjust this value to control when to bevel
    if (miterLength / 2 > miterLimit * (currentWidth / 2)) {
      // Use bevel join
      addPoint(current, normalPrev, 1, currentWidth);
      addPoint(current, normalNext, 1, currentWidth);
      addPoint(current, normalPrev, -1, currentWidth);
      addPoint(current, normalNext, -1, currentWidth);
    } else {
      // Use miter join
      const scale = 1 / miterLength;
      addPoint(current, { x: miterX * scale, y: miterY * scale }, 1, currentWidth);
      addPoint(current, { x: miterX * scale, y: miterY * scale }, -1, currentWidth);
    }
  }

  // Handle the last point
  const lastNormal = getNormal(
    stroke[stroke.length - 2]!,
    stroke[stroke.length - 1]!
  );
  const lastWidth = stroke[stroke.length - 1]!.width ?? defaultWidth;
  addPoint(stroke[stroke.length - 1]!, lastNormal, 1, lastWidth);
  addPoint(stroke[stroke.length - 1]!, lastNormal, -1, lastWidth);

  // Combine left and right sides to form a closed polygon
  return [...leftSide, ...rightSide];
}

Here's the conversation I used to generate it (make sure to scroll down to the bottom-most artifact) https://claude.ai/share/f448873d-bac2-4734-a878-c12a5afa0b2c

@imrishabh18 if you want to play with the algo online i uploaded it to repl.it https://replit.com/join/hartauagda-seveibar

@imrishabh18 we might label this stroke behavior as pcb_trace.route_thickness_mode: "interpolate", because it's actually not super common (although IMO it's the best one) a lot of programs will use an alternate method that's easier to compute collisions for which we might call route_thickness_mode: "rounded_segments" (shown below)

@seveibar Take a look now. Will the offset circle width will also be this big, or it can be just a point?

This can be future work but trace hints should show the width as a second circle on the offset point, then the polygon trace thats drawn in transparent red here should be fully red and should be drawn in the render function for a trace
I will create a wireframe showing what that looks like so we can just take this as incremental progress for now
A fill was added to the circles recently that i think is a bit confusing. We'll have to play with it (maybe in a future PR) but i think using an invert filter on the stroke (similar to dimension lines from the "d" key press where the color auto-inverts thanks to css) would be a better option than a fill

Ok i was going to accept but i think its a slight regression unless we move this code to a trace render rather than a trace hint render. Will probably into this

Ok following up with more information.

The tracehint should NOT draw the trace- the trace should draw the trace
The tracehint should show the width that the trace will get at each offset and the user should be able to "click and drag" to make the trace thicker in the pcb viewer
The tracehint should have mixed-blend-mode: difference, same as the dimension overlay as shown in the code screenshot below
There should be two circles on a trace hint when the trace_width is defined. One circle corresponds to the trace_width at that offset. If the trace_width isn't defined- the user hasn't specified their desired width at that point
This is not needed for the initial PR, but there should be a square that the user can click and drag to adjust the trace_width, when they click and drag the square, it emits an "EditEvent"

we're getting closer- I didn't have a design totally in mind when we started so I can do a bit better next time, the only thing I knew is that we wanted to support interpolated traces, but I didn't realize we were editing the trace hint this time because of the same color etc.

@seveibar Can we close this PR labelled as progress? Take a look at this https://pcb-viewer-9lyo8cwia-tscircuit.vercel.app/?path=/story/tracehint--trace-hint-example or let me know if something else also needs to be added. I will add and then we can merge this


WIP: Move WaitHandle to shared CoreLib

Counter-part to https://github.com/dotnet/coreclr/pull/22634.

Merged into https://github.com/dotnet/corert/pull/7079


Externalize pod status check

We should convert the pod status checker into an external check for Kuberhealthy 2.
This is already in progress here: https://github.com/Comcast/kuberhealthy/tree/2.0.0-PodStatusCheck

this is blocked #245

This was recently merged, even though it may be bugged in #245 - PR was #248


📝 Add notification message warning about old versions of FastAPI not supporting Annotated

The new annotated dependency feature creates some to unexpected errors on old versions:
https://github.com/tiangolo/fastapi/discussions/9277
https://github.com/tiangolo/fastapi/discussions/9297
This adds in a quick warning to the dependencies tutorial for anyone about to integrate the new functionality.
Feel free to close this request without discussion if you don't think it will be beneficial. It won't bother me

Great, thanks! I updated the message a bit and added it in the first two places in the docs where it is used. :nerd_face: :cake:


ls: move from getopts to clap and structure configuration

In the same vein as https://github.com/uutils/coreutils/issues/1795, https://github.com/uutils/coreutils/issues/1794 and https://github.com/uutils/coreutils/issues/1793, ls needs to use clap instead of getopts. That is what I originally set out to do, what I ended up doing was a much bigger refactor:

Move from getopts to clap for argument handling.
Create a Config struct which contains configuration options created from the command line arguments.
Create enums  for:

Sorting: None, Name, Size, Time & CTime
Which files are displayed: Normal, All & AlmostAll
Size formats: Bytes (default) and Binary (specified by --human-readable,  this could have been a bool, but making this an enum makes adding --si easier later)

Use the Config struct instead of the direct arguments in the rest of the program.
Simplified the implementation of the pad_left function.

This moves a lot of awkward code for the configuration into a dedicated function and the use of enums makes adding new flags and options easier (especially --si and other sorting options such as -v & -X, which are sorting by version and extension, respectively).

Thank you for the review! I thought I implemented that behaviour correctly, but it seems I was wrong. It seems that Arg::empty_values(true) and Arg::requires_equals(true) do not play well together in clap. Switching to Arg::min_values(0) fixed it, along with another mistake I made. So it works correctly now. I'll update the PR with these changes and more tests tomorrow.

I guess you saw that you have some warnings
By the way, there is this crate:
https://crates.io/crates/lscolors
(but this isn't a request for this review to be clear :)
If you are interested, it should be done in a separate PR to avoid mixing too many things!

To recap what I've done since yesterday:

Made the arguments overridable, i.e. ls -l1 will give the single column format.
Added --sort, --format and --time. They are only partially implemented, but work will the functionality that was already present via dedicated flags, i.e. ls -l will give the same result as ls --format=long.
Fixed the --color flag such that ls, ls --color=no, etc. will not give colored output, but ls --color, ls --color=yes will. This also plays nicely with the format ls --color file.txt.
-c and -u are now implemented not as sort options, but as time options and will show up in the output when -l is passed, just like in the GNU version.

One quirk remains, which is that the access time does not seem to be set when reading from a file on Windows. I don't have a Windows machine so I can't really check this apart from the output of the tests.
Finally the CI for Mac fails, but it seems unrelated to this PR.
The lscolors crate looks nice! I might look into that in a next PR.

Please also add the --color various options ( https://github.com/uutils/coreutils/pull/1820#pullrequestreview-611720877 ) as test
(the three cases :)
thanks
next time, please don't mix changes in the same PR

Yes, that makes sense. I've expanded the tests for --color, which should cover all cases now and actually checks for colors.
I'll also keep my next PRs more contained!

kudos!