2019-01-20-self-hosted-bitcoin-and-lightning-payments.md

title: Nicolas Dorier and BTCPayServer – self hosted Bitcoin and Lightning payments
transcript_by: Stephan Livera
categories: ['podcast']
speakers: ['Nicolas Dorier']
date: 2019-01-20
media:  https://stephanlivera.com/episode/48/
Download_link:  https://stephanlivera.com/download-episode/955/48.mp3?ref=download
Stephan Livera podcast with Nicolas Dorier - January 20th 2019
Nicolas Dorier, a Bitcoin developer, joins me in this episode to talk about the open source project he started, BTCPayServer. BTCPayServer allows you to start accepting Bitcoin payments with 0% fees & no third-party. It is built with security, privacy and censorship-resistance at its core.
Stephan Livera: You’re listening to the Stephan Livera podcast focused on Bitcoin and Austrian economics. This is episode 48 with Nicolas Dorier, who started a great project. I wanted to discuss BTCPayServer. Nicolas is also the creator of NBitcoin, a Bitcoin library for the .Net platform in C#. Here’s my conversation with Nicolas. Nicolas, thanks for coming on the show.
Nicolas Dorier: Yeah, thank you for inviting me.
Stephan Livera: Yeah, I’ve seen you’ve been doing so many interesting things and really impressive things really with BTCPayServer. So obviously I had to get you on and get you to tell a bit of your story and tell us a little bit about why you’re doing what you’re doing. So, let’s start with a little bit of when did you into Bitcoin and what was it about Bitcoin that drew you in?
Nicolas Dorier: So what drew me in Bitcoin is basically Mt. Gox when the Mt. Gox crash happened, I didn’t really give any shits, but it turns out that I was very surprised that Bitcoin was not dead after this. I didn’t know what Bitcoin was. For me, it was just a startup money and just a scam. But because it was still living even by people who lost money to Mt. Gox and got curious about it. Well just once you start informing yourself of or Bitcoin, you’re never over and like yeah, let’s say maybe around four years, five years, I’m in this space and I still learning every day since, first question I asked. So yeah, that’s what drew me in by exactly.
Stephan Livera: Nice, nice. And then what was it also that drew you into work in terms of working on Bitcoin? Because obviously I see you doing, you’re working really hard with BTCPayServer. Someone with your skills could easily go work in some large tech company, right? You could go work for a FAANG, your Facebook, Amazon, Apple, Netflix, Google, one of those companies, and probably a hundred, multiple, hundreds of thousands of dollars. Why do you work on Bitcoin?
Nicolas Dorier: Well, because once you discover Bitcoin, everything seems a bit boring. So I am happy where in the case where I can basically find the right mix between flexibility, boredom, and a salary in my wallet. So, yeah, I mean right now everything I’m working, which is not Bitcoin is basically boring. So, I can afford to push that away.
Stephan Livera: Excellent. Okay. All right. Now let’s get little bit into what it was that drove you to go and start BTCPayServer. I’d like to hear a little bit around what it was with Bitpay that irks you.
Nicolas Dorier: Okay. So, basically before the Bitpay episode last year, I was pretty a big fan of what Bitpay was doing. I was using their wallet was Copay, which was one of the best wallets in the market at this time. And yeah, I was pretty supportive of them. I was a bit upset when they start like pushing the narrative that it was a software upgrade instead of a hard fork and tried to push all their merchant to support this new Shitcoin and telling them that is Bitcoin. I thought it was very fraudulent behavior. The people that were behind it didn’t seem to care at all about it and never bothered to apologize for this story. So, yeah, basically I found out that Bitcoin while it might be decentralized at the blockchain level because Bitcoin is hard to program upon.
Nicolas Dorier: A lot of people end up depending on the infrastructure providers, centralized infrastructure provider like Bitpay or like, I don’t know, BlockCypher or like some centralized infrastructure provider. At the end of the day, if everybody is depending on them, then even if you have a decentralized currency, you’re still vulnerable to the kind of attack that Bitcoin is meant to prevent. So yeah, that’s why I started working on BTCPay. I wanted to provide an easy to host infrastructure that everybody can run so they don’t need those kind of third party services to run their business.
Stephan Livera: Excellent. I think Nicolas, it might be great if you comment on perhaps the difference in opinion in the standing of Bitpay back in the early days versus the standing that Bitpay was in sort of towards the end of 2017.
Nicolas Dorier: The difference of what? Sorry.
Stephan Livera: In the standing, the way people looked at Bitpay, the way people would help promote Bitpay back in the early days and then it changed obviously.
Nicolas Dorier: Yeah. So, back in the day, like Bitcoin community was very supportive of BitPay. I think right now, like most of pure Bitcoiners just hate them and prevent and try to avoid merchants that accept payments that are BitPays. So, but on the other hand, BitPay become a bigger company and don’t really care anymore about Bitcoiners, so, I think it goes both way. Well, on my side right now, I’m less worried about Bitpay. One years ago they had lots of people were depending on them, nowadays there is lots of competing payment processors. So not only BTCPay, but also like coin payment and GloBee and many, many others that that start fixing the gap, that Bitpay left in the market. So I think right now they are not really, really events anymore and I think that’s for the better.
Stephan Livera: Right. Now, tell us a little bit about the narrative in a little more detail. Let’s talk a little bit about what Bitpay were trying to do in terms of how they were trying to change bitcoin. Whereas say the Bitcoiner type people, the average individual person was not necessarily in favor of those changes.
Nicolas Dorier: Yeah. Basically I think their main idea was that the merchant that are using Bitpay don’t really care about all the drama of Bitcoin. So they can silently update them without too much resistance because most of them just want to wait to get paid in Bitcoin and don’t care at all about Bitcoins. But well, lots of Bitcoiner we can tell that lots of Bitcoiner are like a stubborn minority in the sense that if it ever happened that Bitpay do this change, then pure Bitcoiner will never pay any merchants with this new coin. So, it means that we have a split and we have a new coin coming along. So, yeah, sorry, I forgot the-
Stephan Livera: I was just mentioning… I thought it’d be good to just touch on how Bitpay were basically providing a different angle than what most Bitcoiners would have agreed with. So they would say things like, “Oh, the network is congested and this is the network fee.”
Nicolas Dorier: Yeah, yeah.  If they tell you that the fee are high, then you don’t complain.  So, well, I understand their position, I understand what they try to do. But at the end of the day, the customers of Bitcoiner will never use such currency that is controlled by a few infrastructure provider. Well, I understand what they try to do, but I think it’s useless as long as people are refusing to, customer are refusing to use this new coins and doesn’t matter what they try to do, it won’t work.
Stephan Livera: Right. Right. I think it might also be good if you just touch on, just tell the listeners a little bit around BIP-70 and some of the contrast and the debate that happened on that particular BIP.
Nicolas Dorier: Okay. So BIP-70 is a payment protocol which aim to remove, have a sort of protocol to pay a destination, which does not involve copy pasting addresses. And that unlock also some capabilities where while I can pay several destination in one payments. So, BIP by itself was, so for lots of reason, it has been specified in a way that is very, very bad. I think it’s very bad protocol, but for purely technical nature of sort of for example, they are using protobuf and it also either dependency at the application level about PKY and infrastructure. So it’s very… for people that want to implement their protocol, it’s like lots of requirements. However, this protocol I think is bad, but like BitPay added somewhere an extension to this protocol actually, which allow the merchant to tell what are the fees to the user.
Nicolas Dorier: I think that this particular feature is not a bad things per se. I think it’s a good idea that the merchant can communicate to the users of fees that he is expecting. It just that the manner they did it, without any once I did away without asking to the community or without asking for feedback or improvements, like threw lots of people off. But I think at the end of the day, having a way for the merchant to tell the fee, these are good things. So just to tell you the problem they are trying to fix and with this new extension that they did. When the network was congested, customer were paying the merchants to a certain rate. The problem is that we in BitPay, if the transaction take more than one hour to get confirmed, then BitPay decide that this transaction is invalid.
Nicolas Dorier: And like, then after, the merchant need to send back the money or BitPay needs to send back the money to the customer. Okay? So imagine that you are in a… when there have been lots of traffic, when the Blockchain was congested, basically lots of customer were paying, transaction were not validated after one hour, then you need to refund all those customers. But because the network is congested, refunding those customers take even more fees. So, they were kind of stucks. So their solution was, well, we might be able to impose to the user which fees they need to pay to prevent this problem. I think at the end of the day, I mean, it’s a good idea, but just the way they tried to push it and like completely removing the address turns lots of people off.
Stephan Livera: Right. Then let’s talk a little bit about some of the troubles that cause people who were trying to pay with Bitcoin.
Nicolas Dorier: Yes. So right now their new payment protocol. Most of the wallets that we’re using today are not supporting it. So, on my side in BTCPay, I made like some tool to translate their protocol to a normal address that you can copy paste on another wallet. The, so LunaNode are using BitPay as payment processor. On their side they are proposing inside their user interface. They themselves could do the piece of code to extract the address from BitPay payment protocol and show it to the users. Like people are doing work around this, and I got lots of merchant that came to BTCPay whose primary reason was we don’t want to deal with customer support that can’t pay our product basically. So, it turns a lot of people off. I think it’s bad decision, but well, it’s good for BTCPay to bring us more people.
Stephan Livera: Yeah, sure. Definitely. So I think the other thing, I think we’ve got to obviously touch on where you famously tweeted, “This is lies. I’ll make you obsolete.” Tell us a little bit about that.
Nicolas Dorier: Well, yeah, so when this happened, basically I understood that Bitcoin was in danger. If everybody keep depending on centralized services. I started developing BTCPay, so, myself as well as a Bitcoiner I’d advise, people to use BitPay to lots of customer and people I know. But basically, if you’re a merchant and you integrate BitPay, you cannot easily migrate to another solution if you don’t have developer in house that can help you to reach this transition. It takes time to test, it takes time to get it up. So my goal was, I wanted to migrate everybody that I advise BitPay to a open source solution without code change on their side. So, I basically replicated the API of BitPay inside BTCPay.
Nicolas Dorier: So, like merchant that are already integrating with BitPay can just seamlessly migrate to BTCPay without any code change to their backend. That was my primary goal. I won’t say I make them completely obsolete yet. Like for example, if you want fiat integration, you still need a payment processor either like BitPay, though I will advise better one, like, I don’t know, GloBee or CoinPayments or like many other that has been created. But in BTCPay later, so I know that Rockstar Dev is working on the fiat features and integration to add changes.
Stephan Livera: Yeah. Yeah. Well let’s start with talk with a bit of an overview around BTCPayServer and how to set one up and then we’ll get into some of the more detailed components of it.
Nicolas Dorier: So, you want me to talk about what about BTCPay?
Stephan Livera: Yeah. Just around how it’s sort of… what’s the process to set one up? How kind of, how tech savvy do you need to be to run one?
Nicolas Dorier: Okay. So good question, basically BTCPay, I took maybe half of my time coding BTCPay and half of my time trying to find the easy way to deploy it. So, when you are… so my background is mostly Microsoft. Okay. I always use Microsoft project. I love what they’re doing. In Microsoft Word, like installing new software is quite easier in general but in the Linux space. For one reason is that in general, Microsoft software come in one big blob of software that you install on your machine. While in Linux in general, it’s very lots of different small tools that you’re gluing together to get something that match your expectations. But average user, you don’t know to properly glue everything together to make it work. You cannot expect normal user to read like 10 page manual on 10 different GitHub pages on how to make those tools work.
Nicolas Dorier: Basically, lots of effort has been to make BTCPay run on one common line. Actually I try to remove this common lines.  So at first I was using Azure as a hosting provider and Azure allow you to have a sort of wizard which help you to provision a new VM and install some stuff on it. I was using this, so you got a wizard where you can say, okay, I want Bitcoin, Litecoin and I want lightning network, please create the VM and give me the address. So it was working fine, just that Azure is very expensive and like not very efficient.
Stephan Livera: Yeah. So on that, let’s talk about the range of cost options now that are available to, say I’m a merchant and I want to take bitcoin payments, and I want to self host, I don’t want to use a BitPay, what are the different cost ranges or options available to me?
Nicolas Dorier: Yeah. So right now the most popular one is around nine euro per, no, $9 per month. So when I started doing it in Azure, it was 60 bucks. We managed to find ways to drop it to less than 10 USD per month and it’s really a very simple wizard, you create an account on LunaNode, you fill out your account where… you can fill out your account credit with Bitcoin if you want. Then you just have to go to a certain page, there is a sort of wizard that you can follow up to say, okay, I want Bitcoin, Litecoin, I want the lnd as a lightning network. Please do so you click and boom, like in 10 minutes you already have your BTCPay that is running. So yeah, around 9 euro per month.
Nicolas Dorier: One thing I think I can drop it to $4 with the new offer that LunaNode released recently but I still need to make some tests around this. Also, there is some people that are trying to push self hosting at home BTCPayServer. So, basically you put BTCPayServer on the Raspberry Pi and then you just run it at your home, you just open the wallet as you needed and it just work. If you do this, it’s more technical but you can drop the price to around one or $2 per month. Basically the cost of electricity that it takes to run the Raspberry Pi.
Stephan Livera: Fantastic. I think another thing that’s really great that I’ve noticed with the BTCPay community around it and the slack channel is that it’s very supportive. So, there are a lot of people who are out there creating guides. So I know Bitcoinshirt or I think he changed his name now to Pavlenex.
Nicolas Dorier: Yes.
Stephan Livera: He made a really great guide and you got guys like Rockstar Dev and you’ve got all these other people in the slack chat. Talk a little bit about that community and how they’re helping people set up their own BTCPayServer.
Nicolas Dorier: Yeah.  So there is Rockstar Dev came first, then there was Bitcoin Shirt that came and these data is also Mr Kukks that is very active. There is also Britt K that is doing lots of translation related work that is very useful. So yeah, it’s growing and Rockstar Dev and Kukks are like developers, they think about the future they want, they just code it. Bitcoinshirt is like trying to tie everything up together. Like trying to document everything, making video of it to advertise it. As equally is like the marketing, the one Man Marketing Team of BTCPay and he did very great work. He did tutorials theory about if you’re a merchant out to create your own WooCommerce, your own e-commerce website or to create your own BTCPay or to plug them together and like everything from scratch.
Nicolas Dorier: So lots of people came on the slack asking questions and we are not a company, which mean that we cannot expend resources to have customer support people. So that’s why we depends on having the slack and the community like replying to each others when there is problems and it’s working fine. When I see problems, like lots of questions, I come backs very often like Bitcoinshirt told me, this particular point lots of people don’t understand it. So on my side I try to fix those codes so there is less questions the next time. It’s an iterative process every two or three days I release a new version and it’s slowly, slowly evolving in the right direction, thanks to all this feedback that we get continuously every day.
Stephan Livera: Fantastic. You mentioned new features there and I think now might be a good time to just talk about this Fiat exchange component. So obviously the easiest way right now is if you just take Bitcoin and just accept Bitcoin. But obviously the reality is many merchants do not have prices denominated for their inputs, the things that they’re buying and not in Bitcoin. So they have to convert it back into USD or whatever other fiat. Talk to us a little bit about what the plans are around that fiat exchange component.
Nicolas Dorier: Okay. So the main developer on fiat stuff right now, it’s Rockstar Dev. As a general rule, I never code something that I don’t use myself. For example, I never sell Bitcoin, I always hold on my side. So like I had no interest in decoding Fiats integration myself. But like Rockstar Dev for example is working on it. As far as I understand, I’m not sure because he didn’t talk to me too much about what he’s doing exactly. But the way he’s thinking is, if you’re a merchant, you buy some stock of Bitcoin on some exchange.
Stephan Livera: Right? So it’s almost like there’s a float maintained on the exchange.
Nicolas Dorier: Yes, yes. So basically when the money is received by the merchants, then the money will be forwarded to his exchange and the balance will be restored to one Bitcoin eventually.
Stephan Livera: Right.
Nicolas Dorier: [crosstalk 00:25:02] What he’s working on.
Stephan Livera: Right. My understanding then would be, this is because again, Bitcoin on chain was not necessarily designed to function as a retail level payments network. Because of these difficulties that you might face around confirmation time, once a transaction is sent, it may not necessarily confirm instantly or it in most cases it won’t. So that’s why we need this sort of a concept of a float held at the exchange.
Nicolas Dorier: Yep. So basically, like I tell you before BitPay, if the transaction doesn’t confirm after one hour, they call this invoice invalid. The reason behind it is, between the time that the customer sends a transaction and between the time that the invoice is created on the merchant side to the time this transaction is confirmed by the network, exchange rate is like changing a lot. So that’s why that BitPay, after one hour, if the transaction is not confirmed, they say, the exchange rate change so much that we cannot ensure about this particular exchange rates. So that’s why our plan is really to do, we receive a transaction, we convert immediate terms of change and then later coins are forwarded to the exchange. So it means it still means that the merchants is taking some risk on one Bitcoin because he has a stock of one Bitcoin with the exchange, but at least it’s calculated risk.
Stephan Livera: Right, and so the idea there, tell me if you don’t know that the detail, but is Rockstar working with any particular exchanges on who he might try to set this up to work with?
Nicolas Dorier: That’s a very good question. I’m not sure I don’t really know. I know he’s working on this. I don’t know if he’s working with a particular exchange. I know that lot’s exchange approached him to work around this. So I would say probably.
Stephan Livera: Okay.
Nicolas Dorier: But I don’t know enough myself about it.
Stephan Livera: Excellent. Well, we’ll have to get him on eventually, but so yeah, go on.
Nicolas Dorier: Yeah. So, but the thing is that in BTCPay is not like there is a specific roadmap, it’s more like different contributor want different features and just like get it done and then we ship it. So there is no real big roadmap. People sticking to it, it’s just like a need and that you just code it.
Stephan Livera: Yeah, sure. No, I totally appreciate that. I mean that’s the nature of open source software. It’s not like a standard company where there’s someone paying you to do a certain function. But I think another area that might be good for you to touch on is just around this idea of getting from the broader Bitcoiner what we might call the Bitcoin Community. Obviously years and years down the line there won’t be a Bitcoin community. But for now there still is. Are you getting a lot of support? Are you getting a lot of people who recommend, who kind of bring you new people who might use BTCPayServer?
Nicolas Dorier: Yeah, yeah. I mean, so BTCPayServer, in one year it developed entirely thanks to the Bitcoin Community we didn’t invest it into any marketing. We didn’t even had the official websites since last months. So it has been anti lead community driven or of like people trying, it’s talking to other people about it. Then at their turn they try it and like it and then spread the virus a little bit more. Even for example, BitcoinShirt that is our main, let’s say marketing guy in the team. He came himself because he learned about BTCPay about, by somebody else in the community and then try it for his own store where his selling T-shirt. He found it very interesting. He’s dedicating lots of resources to help spreading the virus.
Nicolas Dorier: So it has been very organical and like… you know, it’s thanks to the community, and people just spreading the word of mouth. I prefer it to be like this because imagine that we invest in marketing and lots of people come at once because we don’t have any supports team behind it. This will quickly implode. But if the communities keep growing and growing, even if there is more and more questions, it doesn’t matter too much because there’s so many people using it by now that lots of people can reply to questions. So, it’s very organical growth and yeah, I hope it will continue like this.
Stephan Livera: Excellent. Now, the other aspect there is also around hardware. So I know I haven’t looked into it too much, but I know nodl were looking into this idea of putting in BTCPayServer software built into the hardware full node product. Can you comment a little bit on that?
Nicolas Dorier: Well, that is awesome. So there is not only them as well, lightning in a box. There were several people trying to do this. I am very fun of this approach because it means you go further you own your own hardware, you don’t even depends on ones data center and it’s way better for the network. So right now in BTCPay, most people usually LunaNode to host because it’s the simplest one. But what if LunaNode tomorrow go out of business, then we can have a sizable impact. Of course, I can make other tutorial to other host provider. But if people run their own BTCPay in their own home, you completely remove this problem at all. You don’t have a single point of failure anymore.
Nicolas Dorier: The big challenge… So myself and my company in Japan, we will try to do some kind of box like this as well. But the main difficult part in this project is lots of consumer don’t know how to configure their router. If you host a service at home, you need to configure what we call the NAT of your router. It’s quite technical, so it’s not ready for everyone. On top of this there’s lots of internet provider that don’t provide static IP, which mean that you cannot just configure your DNS name to point to your home. There is solutions to this that I’m thinking about, but it’s still a bit messy, I’m still wondering how to make it as easy as possible. And I don’t have the perfect answer yet.
Stephan Livera: Right, right.
Nicolas Dorier: People still need to be a little bit technical savvy to set it up with these boxes.
Stephan Livera: Right. I suppose some of the other difficulties could just be if you live in an area where you don’t have reliable Internet that might drop out or power might out, and then how would you take payments on it? That kind of thing as well.
Nicolas Dorier: Yeah, that’s kind of thing as well. But there is also some people that are asking where they say, “Oh, we don’t really want BTCPay to be accessible from the outside.” So it simplifies some stuff but not everything. For example, if you want to accept lightning payments, you need a public IP and a fixed IP to receive the payments. So yeah, there is still things to think about. Indeed, if for example, you want to accept lightning payments and you don’t have a reliable connection, then you have more problems. So there’s still things to be fixed. I hope to push this push to self-hosting at home. But yeah, there’s some technical consideration around this.
Stephan Livera: Sure, sure. I suppose then the other angle is also as Bitcoin grows up, we’ll see more and more commercialization around some of these things and we may start to see more and more companies and providers who come out and say, “Hey, we’ll set up and configure the BTCPayServer for you.” That kind of a concept. You want to comment on that?
Nicolas Dorier: Yeah, I hope so. LunaNode themselves they created this simple wizard to create your BTCPay. Actually this wizard is open source itself. I think they are using cloud in it. I don’t really know what it is but like for provisioning new VM, they are using this cloud in its tool and they created this wizard where if you are a hosting provider as well using this cloud in it’s stuff, you can just use the stuff that LunaNode did. And it can easily spread that way. But right now I don’t know how interested are other host provider to offer this kinds of specific service.
Stephan Livera: Right. But I guess it all helps out.
Nicolas Dorier: Yeah, yeah. It will help out. But right now I saw only LunaNode are doing this.
Stephan Livera: Got It. I see, I see.
Nicolas Dorier: Yeah. If there is another host provider that is interested into doing this, I wish they’d join the slack and then we can all talk together about it and help them to do it.
Stephan Livera: Okay. Excellent. I think another good point that you were touching on earlier is just around in general the rise of self hosting. So obviously that is becoming more relevant nowadays, especially with this whole Patreon shutdown, more and more people looking at alternatives. What else is required to help people use Bitcoin in a self hosting approach? So, for example, making sure that the servers don’t get shut down or other tech infrastructure, not just the payments component. Do you have any ideas on that?
Nicolas Dorier: Yeah. So it’s very hard problem basically. So, here is the thing, for example, Gab right now is using, Gab.com Is using a BTCPayServer and basically recently they have been targeted by political opponents to try to shut them down even if they did nothing wrong. Basically, the way it works is that they have some services hosted on some IP address. Then people are trying to find who own this IP address and then complain to the owner of this IP address. Then this owner has better things to do than processing the sort of complaint. So they just shut them down, it’s very problematic. The only way to fix this problem is using Tor. One of the ways to, is the simplest way to solve this problem is using Tor.
 So you have another option that I will, I think push people to and it’s related to those boxes as well. One solution is you host your BTCPayServer box inside your own data center. Okay? Except that you don’t accept queries directly into your data center. Instead, what you are doing is you set up another server. So for example, very small server on LunaNode on LunaNode you set up some SSH server and you use a system what we call a reverse tunneling. Basically what will happen is that if a user want to go to your website, he will use a public IP of LunaNode and LunaNode will forward the request to your backend server that is on someones IP that you control.
Stephan Livera: Right, an intermediate step.
 So, then it become very unproductive to try to reach those IP owner because it’s so easy to pop up a new service. Because they don’t own your data. It’s only possible because the server, the service provider don’t own your data. Your data is owned by yours. So it’s related as well to the boxes basically.
Stephan Livera: Right. I imagine the other way is essentially if you’re lucky, like say Gab, they managed, I think they’ve managed to find a provider who just is willing to still continue hosting them.
Nicolas Dorier: Yeah. It’s good that they find it, but it will work until one point. We never know when it will break. But well, I guess if it breaks they can jump to another provider as well. As they’re getting more and more kicked and that every time they get kicked they learn more and more about this space and they will become more and more resistant to it. Gab.com before you trying to use BTCPay, like trying many other solution. Basically, they tried every single centralized payment processor that they called and like MasterCard, basically it was like pulling the strings to prevent them to service gabs.com.  They become more and more efficient at it as they can ban them. But at one point they will always come back.

Nicolas Dorier: Yeah, yeah. That’s it. I mean, as long as you own the data as long as you own your own data in your own end, then they can shut you down. You just have to find another way to get back online eventually possible. So yeah, it’s no problem, I think about this but well, it’s still right now technically speaking, it’s still a bit hard to do it. I try, I will try to make it easier, but it’s, I always come back in the sense of on my side, I’m always coding on the stuff that I use myself, and myself I’m not targeting that this kind of behaviors. I’m less motivated to work on it that say gabs.com or people like this. If people are targeted and are willing to help me on this, it will be very helpful.
Stephan Livera: Right, right. Okay. Another area, so you touched on this earlier, it was just around the hosted options. So companies like GloBee, OpenNode, CoinGate. Do you have any thoughts on the main trade-offs that a person has to think about when they’re thinking about whether they want to use BTCPayServer, self hosted or whether they would go through one of those other options?
Nicolas Dorier: Well, so the other option are possible depending on where you live, depending on the jurisdiction and depending of your political inclinations. If you are a Gab, like I am in GloBee coin payment or anything else, like eventually we’ll get shut down. There is no question of about this. For people that are not politically targeted, I think they can be good solution, but because of the fact that you don’t control your own key, what you can do with those payment processor or way more restricted. For example, BTCPayServer is not only useful for merchant, actually, it’s very good wallets. You can use it for as a wallets and you depend on your own node. So you don’t leak any privacy, you can do this with coin payment or GloBee or those kinds of services.
Nicolas Dorier: We have other features that are pretty cool. For example, where the point of sales feature where you can very easily create very simple point of sale, very easy to operate and then create invoice out of this, it’s like kind of feature that is possible only with BTCPay not with GloBee. Recently there is Mr Kukks that created a crowdfunding application of BTCPay, I don’t know if you have seen it.
Stephan Livera: [inaudible 00:43:06].
Nicolas Dorier: Yeah, it’s, I can send you the link later but basically anybody can create their own fully customized crowdfunding page and be public and then people can just send Lightning payments, Bitcoin payments to it’s. So it’s fun, it’s kind of fun feature like this that you can not re-do with centralized payment processors and way more fun feature like this will come in the future in BTCPay. So yeah keep tuned.
Stephan Livera: Yeah, it’s a very exciting space. I think there’s a lot of possibilities around this whole concept of self hosting.
Nicolas Dorier: Well, there is a very interesting thing with BTCPay that because it’s open source, there is some people that are just forking BTCPay, adding their own feature or adding their own design. And like time to time mergings upstream changes. If you’re a business and BTCPay doesn’t have a match yet, it’s that doesn’t have a completely matched what you want to do. It’s very easy to fork and I plan to do it even more easy, easier to fork in the future. That’s kind of flexibility that you can get from open source project but not from other centralized payments, processors.
Nicolas Dorier: For the features to look out, there is the Fiat things that Rockstar Dev is working on. I can’t say myself too much about it because I don’t really know that much about it. There is Kukks that have a pull request about doing permanent invoices. So the idea, so imagine that you are a freelance and you want to request a payment to your customer. The program right now is when you create an invoice with BTCPay, it locks the rates, the rate is locked for like 15 minutes.
Stephan Livera: Yeah.
Nicolas Dorier: If the user don’t pay in 15 minutes, then you need to create a new invoice. It’s not very user friendly. So like Mr Kukks is doing a new feature where it create a simple page of payment, we call that payment request page.  It takes the rate of the day credit invoice and can pay. So it’s like you can pay it is own convenience.
Stephan Livera: Fantastic.
Nicolas Dorier: The last thing I will work is what we were talking about away, so you remember when I talk to you about this reverse tunneling-
Stephan Livera: Yeah.
Nicolas Dorier: … features. That is to prevent people to be shutdown. Actually, it’s not only useful for people that are politically targeted. It’s also very useful for people that want to host BTCPay at home because they don’t have a fixed IP. If you don’t have a fixed IP, with this reverse terminal in solution, you can still create your own BTCPay and have a very easy set up and you don’t have to configure the net, or that kind of things. So like, it started even useful for politically targeted people, but also for people that just want to plug the box at home and like that just work. So that will be what I will work on in the short term.
Stephan Livera: Yeah. That’s awesome. I think it’s really fascinating to see all the ways these different technologies are kind of building out together and interacting in different ways and you’ve got the hardware guys and then you’ve got you guys, and there’s just a really interesting, what’s the word, kind of symbiosis there in the way that some of the different products are kind of interacting together.
Nicolas Dorier: Yeah, it’s always a question of, in open source, people are not paid, which means that they need to find their own motivation to code some features. SO, it can be profit related, like people selling boxes, they hope to make profit with it. People like Kukks did with crowdfunding gap because he himself has cool idea to code and want to raise money by doing this. When people are like customer of their own products give like lots of motivation to code on it. Then as more stuff getting built, some other people say, “Oh, what you do is pretty cool. I want to use it for myself and like, maybe improve it and then little by little, the product become bigger and bigger.” It’s very organic growth and it’s a beauty of opensource.
Stephan Livera: Yeah. I think you make a great point around how many people, they just want to scratch their own itch and then that is what drives people to go and do different projects.
Nicolas Dorier: Yeah.
Stephan Livera: Yeah. Okay. Have you got anything else that you want to get the listeners to know in terms of how they can, if they want to come and support BTCPayServer or anything else to consider?
Nicolas Dorier: Yeah. I mean, a very good way to help BTCPayServer is using it by yourself and see for your own case. Like what is the gaps of features that you will like and just discuss it on the slack and just get some developer motivated to do it or developing it yourself.  So yeah, just try it, have fun with it and come on just like sharing your experience.
Stephan Livera: Excellent. Okay. Where can people find you guys and find the slack?
Nicolas Dorier: It’s slack.btcpayserver.org.
Stephan Livera: Okay. Excellent. Also, obviously your Twitter is Nicolas Dorier. I’ll put the link obviously in the show notes.
Nicolas Dorier: There is also the BTCPayServer Twitter accounts as well.
Stephan Livera: Oh, yes, I’ll link that as well. So Twitter for that. Okay. Excellent. Anything, any final comments?
Nicolas Dorier: Oh, yeah, as well. You can also send the link to our YouTube Channel because like we have a YouTube Channel with lots of video to get started, to play with BTCPay and that kind of stuff. So yeah, I will I send it to you by text.
Stephan Livera: Excellent. All right, well look, thank you very much for coming on Nicolas. I hope the listeners found it interesting to just learn a little bit more about BTCPayServer.
Nicolas Dorier: Yeah, I hope so. I think they will.
Stephan Livera: There you go. I hope you enjoyed hearing more about the BTCPayServer project and why Nicholas started it. More importantly, I hope you’ll be interested to go and try it out. So go and check out the YouTube Channel for some how to videos and join the BTCPayServer slack and discuss with the guys links are in the show notes on my website, stephanlivera.com. Lastly, if you enjoyed this podcast, remember to retweet and share with your friends. That’s it for me. Thanks and chat next time.

This PR isn't going to work. Closing.


fix: issue with nova path duplicated in home path

Hello, I noticed that the path in the Home breadcrumb was duplicated, maybe because Nova changed something about how it generates paths. Feel free to use this if you want or let me know if there are any issues with the changes.

Yeah looks like their URL generation on the front end already includes the nova path now, looks good, ill merge into v3.x and run it against the tests repo and then merge into main for release, thanks!

Released as 3.1.2, thanks again!

Happy to help. Thanks for creating the package.


Scale and displacement by code

Hi @danielgindi , thank you for this great library, it's amazing. I have a question. I have two charts, a chart below the other. I need to synchronize both charts. I mean, when a chart is displaced and/or scaled, the other chart should also do the same. It this possible? How can I do this?

Definitely it's possible, but this will requires some addtional understanding how the scale and scroll works.
There is a class called ChartViewPortHandler, and there are the methods you need to scale/scroll or even give your own matrix.

Hi again @liuxuan30 and @danielgindi. I managed to synchronize the two charts. Now the problem that I have is that the size of the charts changes when I zoom or scroll as the y-axis values change.
Example:

I need to synchronize the size of chart too. I need that the size of both charts is always the same.
Example:

1. the size of the charts changes when I zoom or scroll
the size of the chart is controlled by the frame, right? Have you change it? The zoom/scroll will never change the frame. Not sure the meaning
2. as the y-axis values change.
the y-axis value will change, because you are zooming! Right? :)


control timeout on search product

Describe the bug
Consider to control timeout on parser.
To Reproduce
Steps to reproduce the behavior:

Go to https://madhardware.app/search/P2421D
Some times the result of some shops are empty.

Expected behavior
Show 'product not found' when the time out is fired.
Screenshots

Fixed in #47


SerialDispatcher pushing initial POC code for Serial Message Dispatcher

Want to have a pull request so  you can monitor this branch. Now there is also a JIRA for it https://jira.springsource.org/browse/INT-2108

Closing it as it was just a POC code


Manage Files

Script Title -
I would like to create a script to manage files in a particular folder (especially the Download folder)
Generally, we download most of the things from the web and when we need to find them after some days it is sometimes hard.
So, what my script does will separate the files in a different folder like music files in one folder documents in another, and all other extensions like .exe .zip accordingly
Instructions

Create a new folder for your script and the file/folder name should be appropriate.
Create a README.md in your folder for program Instructions
add requirements.txt if needed

Programming Language

[x] Python

Happy Coding

Please assign this issue to me. :-)

Duplicate of #219


Include beep in recording

Hi Nick,
Thanks for an excellent repository that was (almost*) working out of the box. Here a PR with a simple suggestion:
The beep file you provide has a small amount of silence after the beep.
Because of this some of my test messages got cropped in the beginning.
I suggest to start recording already before playing the beep to ensure no part of the voice message is lost.
Cheers,
Fabian
*almost because: I changed the username to something different than admin 🤦♂ and subsequently had to modify the paths in a couple of files to make the service start successfully...

Might be nice to automatically cut the audio in post at the beep so users playing back don't have to listen to the beep before every recording

I kind of liked the beep. So I kept it in my messages. :)
But at least now the user have the option to keep it or cut it.
Just note that you might also cut part of the message, in the recordings where the caller was too eager to wait until the beep.


[lapack:x64-windows] build failure

Host Environment

OS: [e.g. Windows/Linux etc...]
Compiler:
-- Selecting Windows SDK version 10.0.14393.0 to target Windows 10.0.19042.
-- The C compiler identification is MSVC 19.0.24215.1
-- The CXX compiler identification is MSVC 19.0.24215.1

To Reproduce
Steps to reproduce the behavior:
./vcpkg install lapack
Failure logs
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:105 (message):
Command failed: ninja -v
Working Directory: C:/Users/ycz_y/Desktop/Canyon/ARcloud/vdpkg/vcpkg/buildtrees/lapack/x64-windows-rel/vcpkg-parallel-configure
Error code: 1
See logs for more information:
C:\Users\ycz_y\Desktop\Canyon\ARcloud\vdpkg\vcpkg\buildtrees\lapack\config-x64-windows-out.log
Call Stack (most recent call first):
scripts/cmake/vcpkg_configure_cmake.cmake:323 (vcpkg_execute_required_process)
ports/lapack/portfile.cmake:4 (vcpkg_configure_cmake)
scripts/ports.cmake:139 (include)
Additional context
config-x64-windows-out.log

I think that is because I installed x86 version package, I create another vcpkg folder and install all the packages with --triplet=x64-windows, I didn't face this issue. So it works now.


Add support for Ollama multimodal

Draft PR for multimodal Ollama: https://github.com/jmorganca/ollama/pull/1216
This would add Ollama as a supported provider alongside structure generation: https://github.com/lgrammel/modelfusion#generate-structure

@suavelizard thanks for letting me know. I plan to add Ollama multi-modal, once it is available in the Ollama API (similar to Llama.cpp)

Can you add more examples of using ollama with tools that make it be able to do more like for example aa ollama ts file with a search tool or to get more creative a ollama model with a stable diffusion tool to generate imags from query etc. If u get what im trying to say. Best i can explain it lol

Can you add more examples of using ollama with tools that make it be able to do more like for example aa ollama ts file with a search tool or to get more creative a ollama model with a stable diffusion tool to generate imags from query etc. If u get what im trying to say. Best i can explain it lol

Yeah an image generation tool has been on my list. There are existing tools and you can also define your own. Feel free to contribute working examples!

Multi-modal models are now available on the ollama main branch, there is also a pre-release https://github.com/jmorganca/ollama/releases/tag/v0.1.15. Would be great to have Modelfusion support it.

Basic multi-modal support was added w/ ModelFusion v0.97: https://github.com/lgrammel/modelfusion/releases/tag/v0.97.0

Thank you 😄


Fix: Progress text sometimes does not update

I found a small bug in Circle.js; when I update the progress from 0 to 0.05 the progress bar grows to 5% but the text continues to display "0%". Further updates of the component do not show the problem.
Repro
Initialise the component with:
<Circle
  progress={0}
  color="#564"
  size={55}
  showsText
  strokeCap="round"
  style={s.progressCircle}
/>

Then update it:
<Circle
  progress={0.05}
  color="#564"
  size={55}
  showsText
  strokeCap="round"
  style={s.progressCircle}
/>

Proposed fix
It looks like the listener that is registered in componentWillMount() sets this.progressValue too late, after the component has updated. A simple solution is to stop using this.progressValue and instead read the internal value inside this.props.progress (an instance of Animated.Value). The race condition is therefore avoided.
Further improvements
I'm not sure if the componentDidMount() listener is still useful. It looks like it was there to work around this particular bug. I left it because it may be needed in some other case I'm not aware of.
Feel free to amend the merge request.

I discovered that my fix is similar to another PR. Using the getter method is more proper.

Can we get this one merged? The issue's 100% reproducable and needs to be fixed.

Can this pull request be merged? Thanks

Reading internal properties of the Animated value is not the way to go as it is not a public API and is not available when using stuff like native driver.


Upgrading Zig to version v0.12.0-dev

Upgrading Zig to version v0.12.0-dev.

I was able to run zig build successfully with your patch! (version 0.12.0-dev.2341+92211135f)
I now need to remove the dust from my arduino board to flash it...

@oliverpool That is excellent! I am glad to hear that you can compile. It's flashing and running well for me on my end. I am  lazily going through the datasheet and this repo to see what else can be implemented, but pretty neat so far!

Thanks for the PR, much appreciated!


adjust import directory

under ray[rllib,default]==2.0.0 as clarified in here https://github.com/deepmind/meltingpot/issues/103#issue-1562429787

Please agree to the CLA for Google contributors to enable this PR to go in :) Thanks!

Done!


fix: add images copy into rollup config

self explanatory

:tada: This PR is included in version 1.7.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Add additional import with custom template?

I already defined import/additional in my custom template like:
{{ define "import/additional" }}
    _ "github.com/facebook/ent"
{{ end }}

but the import not output to my go files.
Version: v0.5.4

Hey @kuoruan, can you provide some test repo to reproduce this? I just check this on master and it works for me.
BTW, if you use the latest version, you can also name your templates as "import/additional/<name>" (this allow using multiple import templates), see: https://github.com/facebook/ent/blob/aa73b9067fb97275afc38f1f2750d2ba0e9edc7b/entc/gen/template/import.tmpl#L48-L52

Hey @kuoruan, can you provide some test repo to reproduce this? I just check this on master and it works for me.
BTW, if you use the latest version, you can also name your templates as "import/additional/<name>" (this allow using multiple import templates), see: https://github.com/facebook/ent/blob/aa73b9067fb97275afc38f1f2750d2ba0e9edc7b/entc/gen/template/import.tmpl#L48-L52

Hi @a8m, here is a repo.
https://github.com/kuoruan/ent/tree/test_import

Hi @a8m, here is a repo.
https://github.com/kuoruan/ent/tree/test_import

It looks like the codegen does include your additional imports. See ent/config.go.
If you want these additional imports in your custom templates, add the "import" template in your custom template as follows:
{{ template "import" $ }}

It looks like the codegen does include your additional imports. See ent/config.go.
If you want these additional imports in your custom templates, add the "import" template in your custom template as follows:
{{ template "import" $ }}

It's working now, thanks. 😊
But all other generate files are contain my additional imports now, is there any way to prevent it?

It's working now, thanks. 😊
But all other generate files are contain my additional imports now, is there any way to prevent it?

But all other generate files are contain my additional imports now, is there any way to prevent it?

Yes. If you're looking for adding the imports only for your custom template, don't use the "import" template (because it's used for all templates). For example, your template should look as follows:
{{ define "test_import" }}

{{ $pkg := base $.Config.Package }}
{{ template "header" $ }}

import (
    "<your package>"
    "<another package>"
    // ...
)

func TestImport() time.Time {
    return time.Now()
}
{{ end }}

But all other generate files are contain my additional imports now, is there any way to prevent it?

Yes. If you're looking for adding the imports only for your custom template, don't use the "import" template (because it's used for all templates). For example, your template should look as follows:
{{ define "test_import" }}

{{ $pkg := base $.Config.Package }}
{{ template "header" $ }}

import (
    "<your package>"
    "<another package>"
    // ...
)

func TestImport() time.Time {
    return time.Now()
}
{{ end }}


Unable to close the netconf session using .close() method

Looks like there is no definition of close() function in the library.
I always get router.close() is not a function

Hmm, yeah, it looks like when we rebuilt it, since we were never closing by design originally, it never got reworked to close. I've updated the package, and am about to head into the office, if you want to pull down the latest version, it should have close. I kept it to version 1.0, and overwrote the original version, as it should have had close to start with.


Depth First Search

I couldn't find if DFS is done before, if not, I could totally do that. (In java if possible)
Thanks

Issue #74 is now closed

Can I take this up?

Hello Faheel, I'm learning C++ and I would like to contribute to your project.
Is this issue still open? If not, can you suggest me another easy one?
Thanks


wierd border on the left

To repreat:

start nyoom
press :ls

Those are actually fold icons, that you can use to identify whats foldable and whats not (zM and zR). They should probably be disabled on the startup screen though, I'll get to that


gh-35 - String Deduplicate Binary Operator

Apologies, branched off from the incorrect place.
Added the String Deduplicate Binary Operator and associated Unit Test.

Codecov Report

Merging #39 into develop will increase coverage by 0.5%.
The diff coverage is 86.95%.

@@             Coverage Diff              @@
##             develop      #39     +/-   ##
============================================
+ Coverage      63.18%   63.68%   +0.5%
- Complexity       442      443      +1
============================================
  Files             83       82      -1
  Lines           1282     1297     +15
  Branches         115      116      +1
============================================
+ Hits             810      826     +16
+ Misses           406      405      -1
  Partials          66       66

Impacted Files
Coverage Δ
Complexity Δ

...e/impl/binaryoperator/StringDeduplicateConcat.java
86.95% <86.95%> (ø)
9 <9> (?)

...va/uk/gov/gchq/koryphe/impl/binaryoperator/Or.java

...a/uk/gov/gchq/koryphe/impl/binaryoperator/And.java

Continue to review full report at Codecov.

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


code for AutoDAN, GCG, DeepInception and PAIR attacks

Dear authors,
Could you share your implementation about the attacks you used to generate the dataset SafeDecoding-Attackers
Thanks very much.

We follow official implementations and hyperparameters.
Please refer to the official repo of these papers for implementation details:

GCG: https://github.com/llm-attacks/llm-attacks
AutoDAN: https://github.com/SheltonLiu-N/AutoDAN
PAIR: https://github.com/patrickrchao/JailbreakingLLMs
DeepInception: https://github.com/tmlr-group/DeepInception


Setting fileMode doesn't work for a distribution zip

Context

I am making an AWS Lambda in Java. I am building it using Gradle. The accepted format for the code defining a lambda function in AWS is a zip archive of a format such as the following:
rob@Robs-MacBook-Pro-2 distributions % tree lambda-1.0
lambda-1.0
├── com
│   └── lightlang
│       └── Handler.class
└── lib
    ├── aws-lambda-java-core-1.2.1.jar
    ├── aws-lambda-java-events-3.11.0.jar
    └── joda-time-2.6.jar

The problem
I was investigating why two archives with identical file contents behave differently when uploaded as AWS lambda functions. One works, the other doesn't.
The cause is that the unix file permissions for the files in the archive are different once the archive is expanded.
Here is how I define the two seemingly-identical archives:
Working archive: :lambda:buildZip
tasks.register<Zip>("buildZip") {
    from(tasks.named<JavaCompile>("compileJava").flatMap { it.destinationDirectory })
    from(tasks.named<ProcessResources>("processResources").map { it.destinationDir })
    into("lib") {
        from(configurations.runtimeClasspath)
    }
    archiveBaseName.set("lambda-archive")
}

Broken archive: :lambda:distZip
distributions {
    main {
        contents {
            from(tasks.named<JavaCompile>("compileJava").flatMap { it.destinationDirectory })
            from(tasks.named<ProcessResources>("processResources").map { it.destinationDir })
            into("lib") {
                from(configurations.runtimeClasspath)
            }
        }
    }
}

What about fileMode? I tried setting that, both at the level of the CopySpec, and using eachFile and I'm sorry to report that it made no difference to the distribution output. Sad trombone.
Expected Behavior vs Current behaviour

The root cause for why I can't create my lambda archive by configuring the distribution plugin, is that setting the fileMode on the CopySpec of the main distribution does not result in the required change in the unix file permissions of the resulting zip archive. The configuration of the CopySpec is not respected, and it should be.
Aside from that, Amazon currently recommends that those wanting to create lambdas using Java should create a custom Zip task like the one that works in my example above. This is not really idiomatic Gradle. It should be possible to configure the distribution plugin to create the lambda archive, rather than having to register a custom task.
To fix this issue, distributions configured for the distribution plugin should respect the fileMode of the CopySpec configuration they are given when creating zip archives.
Steps to Reproduce

I used zipinfo to find the difference between the archive listings. Notice the difference in file permissions. In particular, the fact that some entries in the broken archive are not readable.
This archive is correct:
rob@Robs-MacBook-Pro-2 distributions % zipinfo lambda-archive-1.0.zip
Archive:  lambda-archive-1.0.zip
Zip file size: 874188 bytes, number of entries: 7
drwxr-xr-x  2.0 unx        0 b- defN 23-Feb-28 23:31 com/
drwxr-xr-x  2.0 unx        0 b- defN 23-Feb-28 23:31 com/lightlang/
-rw-r--r--  2.0 unx     2228 b- defN 23-Feb-28 23:31 com/lightlang/Handler.class
drwxr-xr-x  2.0 unx        0 b- defN 23-Feb-28 23:31 lib/
-rw-r--r--  2.0 unx     7515 b- defN 23-Feb-28 18:27 lib/aws-lambda-java-core-1.2.1.jar
-rw-r--r--  2.0 unx   419741 b- defN 23-Feb-28 18:27 lib/aws-lambda-java-events-3.11.0.jar
-rw-r--r--  2.0 unx   587512 b- defN 23-Feb-28 18:27 lib/joda-time-2.6.jar
7 files, 1016996 bytes uncompressed, 873352 bytes compressed:  14.1%
rob@Robs-MacBook-Pro-2 distributions %

This archive is not correct:
rob@Robs-MacBook-Pro-2 distributions % zipinfo lambda-1.0.zip
Archive:  lambda-1.0.zip
Zip file size: 874442 bytes, number of entries: 8
drwxr-xr-x  2.0 unx        0 b- defN 23-Feb-28 23:44 lambda-1.0/
drwxr-xr-x  2.0 unx        0 b- defN 23-Feb-28 23:31 lambda-1.0/com/
drwxr-xr-x  2.0 unx        0 b- defN 23-Feb-28 23:31 lambda-1.0/com/lightlang/
--w----r-T  2.0 unx     2228 b- defN 23-Feb-28 23:31 lambda-1.0/com/lightlang/Handler.class
drwxr-xr-x  2.0 unx        0 b- defN 23-Feb-28 23:44 lambda-1.0/lib/
--w----r-T  2.0 unx     7515 b- defN 23-Feb-28 18:27 lambda-1.0/lib/aws-lambda-java-core-1.2.1.jar
--w----r-T  2.0 unx   419741 b- defN 23-Feb-28 18:27 lambda-1.0/lib/aws-lambda-java-events-3.11.0.jar
--w----r-T  2.0 unx   587512 b- defN 23-Feb-28 18:27 lambda-1.0/lib/joda-time-2.6.jar
8 files, 1016996 bytes uncompressed, 873354 bytes compressed:  14.1%

You can reproduce the problem in a Gradle build by creating a build that applies the distribution plugin and setting fileMode on its CopySpec. Observe that the listing of the archive that gets created has incorrect unix file permissions.
Your Environment

Let me know if this is insufficient:
rob@Robs-MacBook-Pro-2 LightLang-APN % ./gradlew --version

------------------------------------------------------------
Gradle 8.0.1
------------------------------------------------------------

Build time:   2023-02-17 20:09:48 UTC
Revision:     68959bf76cef4d28c678f2e2085ee84e8647b77a

Kotlin:       1.8.10
Groovy:       3.0.13
Ant:          Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM:          11.0.18 (Homebrew 11.0.18+0)
OS:           Mac OS X 12.6.3 x86_64

Thank you for providing a valid reproducer.
The issue is in the backlog of the relevant team but this area of Gradle is currently not a focus one so it might take a while before a fix is made.


AADB2C90085 error every time user is redirected to applicaiton

Core Library
MSAL.js (@azure/msal-browser)
Core Library Version
3.7.0
Wrapper Library
MSAL Angular (@azure/msal-angular)
Wrapper Library Version
3.0.10
Public or Confidential Client?
Public
Description
We are using custom policies for user flow for our app. Every time when user completes the flow, they are redirected back to /setting page from where the policy was actually triggered. However, every time user is redirected after the flow, I get ServerError: invalid_grant: undefined - [undefined]: AADB2C90085: The service has encountered an internal error. Please reauthenticate and try again.
MSAL Configuration
function b2cFactory(config: B2cConfig): IPublicClientApplication {
  return new PublicClientApplication({
    auth: {
      clientId: config.clientId,
      authority: config.authorities.signUpSignIn,
      redirectUri: window.origin,
      postLogoutRedirectUri: window.origin,
      knownAuthorities: [config.authorityDomain]
    },
    cache: {
      cacheLocation: BrowserCacheLocation.LocalStorage,
      storeAuthStateInCookie: false
    },
    system: {
      loggerOptions: {
        // eslint-disable-next-line ban/ban, no-console
        loggerCallback: (level, message) => console.log(message),
        logLevel: config.logLevel,
        piiLoggingEnabled: false
      }
    }
  });
}

export function b2cGuardFactory(): MsalGuardConfiguration {
  return {
    interactionType: InteractionType.Redirect,
    loginFailedRoute: `${window.origin}/error/B2C_USER_LOGIN_FAILED/1`
  };
}

@NgModule({
  providers: [
    {
      provide: B2C_CONFIG,
      useValue: {
        clientId: 'xxx',
        authorityDomain: 'xxx',
        authorities: {
          signUpSignIn: 'xxx',
          resetPassword: 'xxx,
          editProfile: 'xxx'
        },
        logLevel: 1,
        appIdUris: {
          bones: 'xxx'
        },
      },
      deps: [EnvironmentConfigService]
    },
    {
      provide: MSAL_INSTANCE,
      useFactory: b2cFactory,
      deps: [B2C_CONFIG]
    },
    {
      provide: MSAL_GUARD_CONFIG,
      useFactory: b2cGuardFactory
    },
    {
      provide: MSAL_INTERCEPTOR_CONFIG,
      useFactory: b2cInterceptorFactory,
      deps: [B2C_CONFIG, EnvironmentConfigService]
    },
    {
      provide: HTTP_INTERCEPTORS,
      useClass: B2cFeatureFlaggedInterceptor,
      multi: true
    },
    MsalService,
    MsalGuard,
    MsalBroadcastService,
    MsalInterceptor
  ]
})

Relevant Code Snippets
    this.msalBroadcastService.msalSubject$.subscribe((event: EventMessage) => {
      switch (event.eventType) {
        case EventType.ACQUIRE_TOKEN_SUCCESS:
          this._tokenSubject.next((event.payload as AuthenticationResult)?.accessToken);
          break;
        case EventType.HANDLE_REDIRECT_END:
          this.checkAndSetActiveAccount();
          break;
        case EventType.SSO_SILENT_FAILURE:
          // Sso session is expired but jwt can be still valid.
          this._ssoSessionExpired = true;
          break;
        default:
          if (event.error) {
            if (event.error.message?.indexOf('AADB2C90091') > -1) {
              this.window.location.replace('/settings');
            } else {
              console.error(event.error);
            }
          }
      }
    });

Identity Provider
Azure B2C Custom Policy
Source
External (Customer)

Upon further digging, I found that after redirect, the token endpoint is passed wrong code resulting into mentioned error. However I am not able to find how it's passing wrong code in the payload.

I realized I the reason I was getting that error was because I wasn't passing correct authority or hitting correct endpoint. The logic I had to redirect to custom policy was
changeEmail() {
    this.authService.loginRedirect({
      extraQueryParameters: {  p: 'B2C_1A_ChangeEmail' },
      scopes: OIDC_DEFAULT_SCOPES,
    });
  }

which wouldn't work because each policy would issue it's own jwt. So with above logic I wasn't receiving the correct token for the policy as it wasn't requesting to the correct endpoint, hence the error. Changing that to authority solved the issue for me. So with the below changes I could remove the specific error condition.
  changeEmail() {
    // Redirect the user to ProfileEdit policy
    this.authService.loginRedirect({
      authority: this.b2cConfig.authorities.editProfile,
      scopes: OIDC_DEFAULT_SCOPES,
    });
  }


Fix broken tests in BabelTransformerTests.cs

Change two Assert.AreEqual() calls to StringAssert.EndsWith(). This fixes the build.

How is the test failing - What's in result when it fails?

Here's what's in result:
// Automatically generated by ReactJS.NET. Do not edit, your changes will be overridden.
// Version:
// Generated at: 10/15/2015 9:02:38 AM
///////////////////////////////////////////////////////////////////////////////
React.DOM.div('Hello World')

Ahh, this must have broken with 4c73590b85f6d81e37e012d9b9eb5dd52bd1d148. derp. Thanks for fixing it.


Added the Power Platform Admin, Power Apps and Power Automate - US GC…

Hello Fordos, Please check the latest changes and merge the code.

@PottiArun thank you for the submission and inputs. I have 2 questions:

based on doc (https://learn.microsoft.com/en-us/power-platform/admin/powerapps-us-government) the PowerAutomate links are rather "flow.microsoft.us" and not "powerautomate.us". Are you sure they are redirected to the URLs you have added?

I haven't yet worked with US GOV cloud. Do you think it is more frequent use case that an end user works with both US GOV cloud and the generic commercial one parallel (for example make.powerapps.com)? Or rather the other way around, those who need to work with the US GOV services are only working with the US GOV services?

The second question is about how we should structure the folders - the way how you did it, given usually end users work both with US GOV and commercial cloud parallel, or instead have a separate "US GOV" folder which holds the specific URLs for it

@PottiArun thank you for the submission and inputs. I have 2 questions:

based on doc (https://learn.microsoft.com/en-us/power-platform/admin/powerapps-us-government) the PowerAutomate links are rather "flow.microsoft.us" and not "powerautomate.us". Are you sure they are redirected to the URLs you have added?

@PottiArun - Yes URLs are correct, pls check the below link for your reference.
https://learn.microsoft.com/en-us/power-automate/us-govt#power-automate-us-government-service-urls

I haven't yet worked with US GOV cloud. Do you think it is more frequent use case that an end user works with both US GOV cloud and the generic commercial one parallel (for example make.powerapps.com)? Or rather the other way around, those who need to work with the US GOV services are only working with the US GOV services?

The second question is about how we should structure the folders - the way how you did it, given usually end users work both with US GOV and commercial cloud parallel, or instead have a separate "US GOV" folder which holds the specific URLs for it

@PottiArun - Yes, for the US Gov Projects, generally the people will use these URLs. We can have a separate US GOV folder to show them separately.

@PottiArun  thanks for the response!
In this case, my preference would be a separate root level folder "US Government", adding there the US relevant specific URLs.
This way - given most users are not working with it - it is easy to separate and does not "bloat" up the everyday work of most users
In case you disagree, I am happy to merge, but most probably I will reorganize it then myself sooner or later


Fritzbox Mesh: Determining on which AP device is logged on?

Hi,
I have a 7590, a 7490 and a 1750E Repeater in a mesh in my house, every device on one floor.
Would it be possible for fritzbox-tools to gather the information, which Wifi Device is on which AP?
(Eg, the MAC from entity device_tracker.android1234 is logged on to the 1750E, so I know it´s in the basement).
Agreed, it´s not very useful for fast automations like turning lights on, as the Mesh (for now) is rather slow in roaming devices, but I thinks this is getting better in every FritzOS release)

This custom integration is now deprecated because is fully merged into HomeAssistant core.
I would suggest you open a feature request on HomeAssistant Community forum
Simone


Make the dependency injection thread safe

Hi,
I just wanted to share this code, which I developed for our company to solve issue https://github.com/techtalk/SpecFlow/issues/657 from Specflow, using NUnit runner along with an Unity 3 plugin.
This change to make the dependency injection thread-safe allowed us to parallellize at the feature level without any issue, while it was constantly failing before the fix.
Of course, the fix is pretty crude, as its aim was to have no public surface change, but I though it was better to share it if it could be of use.

@Greybird Thx. Unfortunately the diff cannot show the differences properly here, so it is hard to get an overview. Could you please summarize the change in a few sentences?

Yes sure!
Basically

features from the ObjectContainer are moved to the ObjectContainerUnsafe, Unsafe meaning not thread-safe
a new ObjectContainer class wraps an instance of the ObjectContainerUnsafe and delegates calls to it, after locking.

This design was chosen because it allowed:

in-place replacement for SpecFlow usage using a binding-redirect
locking in the interface implementation methods, without having to consider actual inner workings of the previously-named ObjectContainer.

Of course, the key is locking, and a simpler design could be used provided depending libraries code can be modified.
The goal of this PR is mainly to indicate that the SpecFlow issue reported is actually solvable through proper locking on the DI.
Hope this helps!
Arnaud


Simple Cloud Client Tests

Note: WiP, not ready for merge, various decisions need input.
What
A simple Greentea test case for Simple Cloud Client, that tests that the platform is able to register to Mbed Cloud, and uses the Python SDK to confirm that from Mbed Cloud.
Why
This can be used by partners and developers as they integrate their platform to be compatible with Mbed Cloud.
Challenges
The biggest challenge is to standardize the configurations for each platform. At a bare minimum, each platform will have different:

Storage
Connectivity
SOTP regions

In the future, we will want to test Update, which will also include custom memory definitions for app-starts, potentially larger stack sizes, etc.
Currently, this is being solved by having a set of custom mbed_app.json parameters that must be present for the test to run. This allows the test to be generic for any platform, with sensible defaults, and the ability to customize those parameters with custom connect statements, storage definitions, etc.The customization would happen within the Example Application level, so there is no need to contribute anything directly to SMCC.
An example of an mbed_app.json with these custom statements can be found here: https://github.com/dhwalters423/simple-mbed-cloud-client-example-restricted/blob/smcc_tests_odin/mbed_app.json
There are other ways of solving this issue:

A /test-config folder inside Simple Cloud Client that holds the configurations for each board, either in one single .json file or a custom .json file for each board. This requires partners to contribute this test configuration when enabling a platform for Mbed Cloud Client.
A /test-config folder with custom header files that are automatically compiled in based on pre-processor statements (like the current target). Again, this requires partners to contribute these header files for testing.
Solving this by setting the default values in Mbed OS, potentially within targets.json
... other ideas welcome!

How to Reproduce
A reproducible test case on the Ublox EVK Odin W2 has been created to test this concept.
Note, you will need the Mbed Cloud Python SDK installed locally.

mbed import https://github.com/dhwalters423/simple-mbed-cloud-client-example-restricted
mbed update smcc_tests_odin
Include your mbed_cloud_dev_credentials.c
Modify the Wifi SSID and password in mbed_app.json
Set A system environment variable called MBED_CLOUD_API_KEY with an API key from the account your device will connect to.
You may need to remove main.cpp
mbed test -m UBLOX_EVK_ODIN_W2 -t ARM --app-config mbed_app.json -n simple-mbed-cloud-client-tests-* -v

Other considerations
Currently the host tests are point to https://api-os2.mbedcloudstaging.net, we will want this to point to https://api.mbedcloud.com by default. (just made simpler for testing internally)

Thanks @dhwalters423!
This is great to have tests that anyone can use it.

Regarding the configuration of the tests to enable certain connectivity & storage, I’m happy with this solution for now.
Note there are ongoing discussions to understand what configurations we create, where are being stored, and the message that goes with it – we should not worry about this topic for now.

Let’s focus on the actual greentea tests and checkpoints to ensure we’re testing the right thing.
I think we should have tests executed in this order:
1   Check if SOTP data is preserved across multiple programming of the device – optional for now
2   Check if certificates can be installed on a fresh device using RESET_STORAGE
3   Check if certificates can be read from storage after a second boot, not using RESET_STORAGE
4   Check if the network is up and running – done in this PR
5   Connects and registers in Mbed Cloud – done on this PR
6   Check LwM2M functionality over CoAP, for example, GET, PUT, POST, DELETE, using Cloud SDK.
7   Advanced / future: do FW update using Cloud SDK

Styling got all messed up between my IDE.. should be fixed now.

Ready for this to be merged. Please take one last review @MarceloSalazar, @bridadan and @janjongboom

Looks good as initial version.
Possible enhancement: as the user has to specify the API key, would you consider installing the credentials by using the SDK instead of having to install it manually ?

@MarceloSalazar good idea, can make this happen in this PR.

@dhwalters423 I'm happy to merge this now as it's good enough to move forward with other test tasks. The enhancement I mentioned is relatively low priority and can be done in the future.

Test now connects, resets, connects again, and checks for consistent identity.
This proves working SOTP, Root of Trust, secure storage.
Moved reformat_storage from private to public.
TODO:

Better way to handle API config (host name, API key), right now this points to OS2 only.

Thanks @dhwalters423 is looking good.
IMO there are 2 very minor items pending:

point to production cloud instead of os2
document tests cases to let people understand what they are doing.

I'd leave the API key config as it's.
FYI there is a 'mbed config' option coming to handle this and we should align to simplify the setup.

@dhwalters423 for the test config stuff (choosing the right socket object) you may be able to take advantage of the test config present in mbed os already: https://github.com/ARMmbed/mbed-os/tree/master/tools/test_configs
I haven't used them much myself, are you aware of this feature?

//TODO:
Rebase to 1.4.
Test 1.4
Change API Config to point to Production
Documentation changes

@bridadan The problem with that approach is that then we will need to maintain per platform configurations. I took a lot of ideas from the configuration, but I'd like to continue with this until we can get around the issue of having to maintain a seperate config per platform

Fair enough 👍

Ready for merge.
DEPENDENCY: https://github.com/ARMmbed/simple-mbed-cloud-client-template-restricted/pull/27


Allow kbd tags

Fixes #9242
Per @guillep2k's comment it was a simple fix.

Codecov Report

Merging #9245 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff            @@
##           master   #9245      +/-   ##
=========================================
+ Coverage   41.09%   41.1%   +<.01%
=========================================
  Files         555     555
  Lines       72400   72403       +3
=========================================
+ Hits        29750   29758       +8
+ Misses      38909   38899      -10
- Partials     3741    3746       +5

Impacted Files
Coverage Δ

modules/markup/sanitizer.go
100% <100%> (ø)
:arrow_up:

modules/process/manager.go
74.69% <0%> (-3.62%)
:arrow_down:

modules/migrations/migrate.go
23.78% <0%> (-1.63%)
:arrow_down:

modules/migrations/gitea.go
8.82% <0%> (-0.64%)
:arrow_down:

models/repo.go
47.82% <0%> (-0.06%)
:arrow_down:

routers/repo/view.go
39.47% <0%> (+0.87%)
:arrow_up:

models/error.go
33.86% <0%> (+1.18%)
:arrow_up:

modules/task/migrate.go
28.94% <0%> (+3.94%)
:arrow_up:

models/unit.go
67.56% <0%> (+5.4%)
:arrow_up:

Continue to review full report at Codecov.

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


Python mistralrs-cuda not running on GPU

Describe the bug
After installing mistralrs-cuda, I tried to run inference using the below two steps (following the python API):
llm = Runner(
    which=Which.GGUF(
        tok_model_id="NousResearch/Meta-Llama-3-8B-Instruct",
        quantized_model_id="NousResearch/Meta-Llama-3-8B-Instruct-GGUF",
        quantized_filename="Meta-Llama-3-8B-Instruct-Q4_K_M.gguf",
        tokenizer_json=None,
        repeat_last_n=64,
    ),
    no_kv_cache=False,
    token_source=access_token,
    speculative_gamma=64,
    num_device_layers=32,
)

And:
output = llm.send_chat_completion_request(
    ChatCompletionRequest(
        model="llama",
        messages=messages,
        max_tokens=256,
        presence_penalty=1.0,
        top_p=0.1,
        temperature=0,
    )
)

Using nvidia-smi, I see no processes running

Running the model using rust seems to run on GPU CUDA_NVCC_FLAGS="-fPIE" cargo run --release --features "cuda flash-attn cudnn" -- --token-source "literal:hf_.." -i plain -m meta-llama/Meta-Llama-3-8B-Instruct -a llama

How do I get the python api to use CUDA?
Latest commit
5c3e9f1

I think this is more of an issue with the Sagemaker notebook I'm using. I'll leave the issue open for now, just in case it is an issue with the project.

 Closing the issue

Ah, ok. I was a bit worried the CUDA distribution was wrong, glad to hear that.


Simple string functions

adds:

toUpperCase()
toLowerCase()
charCodeAt()
codePointAt()
indexOf()
lastIndexOf()
substr(), substrTo()
substring(), substringTo()

What do you guys prefer here @1-liners/owners all inclusive functions or just use one method in terms of the next.
So in the case of substr you can just do drop and substrTo you can just use take since under the hood they use slice which we could add to this library to help with the other methods as well... but I am up for whatever the collective decides :smile:

@davidchase I like it how we have it now:
plus(2, 3);      //» 5
plus('a', 'b');  //» 'ab'

@tomekwi yes yes, i agree with that point... what i meant or i guess what i was asking is if 1-liners needs to or wants to encompass all the possible native methods as listed above in by @tristaaan ... or just use the methods we currently have in the library to achieve the same results...
so for example we currently have a drop method so we can do this
drop(6, 'hello world'); //=> 'world'

which means that something like substr(6, 'hello world') //=> 'world seems to be unnecessary
essentially because drop and take are defined using slice it makes the substr(), substrTo(), substring(), substringTo() methods a bit un-needed.
unless we want to encompass all methods.
i hope i made some sense.

Yeah, that’s exactly what I meant. + works for numbers as well as strings. .slice works for strings as well as arrays.

Shall I revert the last two commits, if so perhaps make a note in the docs of take and drop that they're to be used in place of substr methods?
'hello'.substr(2) === drop(2, 'hello') // => 'llo'
'razzmatazz'.substring(2, 5) === drop(2, take(5, 'razzmatazz')) // => 'zzm'

I agree with @tomekwi. @tristaaan yop a note would be good. Thx for your contribution.

@stoeffel i think i wasnt clear, i was just trying to figure out if 1-liners needed certain methods... also why not define const slice = (x, y, xs) => str.slice(x, y);
then we can do slice(2, 5, 'razzmatazz') // => 'zzm' :smile:

@davidchase Got you, I don't think we need to add all native functions, if the same can be accomplished with a function already there (like with drop). slice would be a nice addition, @tristaaan could just rename substrTo and use .slice internally.

Dropped the substr(ing) functions, added slice

IMO this is ready to :ship:.
@tristaaan do you want to join the team?

@tristaaan do you want to join the team?

:+1: :+1:

Awesome, yes :)

Awesome, yes :)
(commented with work account earlier sorry)

Done. you are now a member. welcome :smile:


[Bug]: No way to delete a Pipeline Server in DS Projects

Is there an existing issue for this?

[X] I have searched the existing issues

Deploy type
OpenDataHub core version (eg. v1.6.0)
Version
1.7.0
Current Behavior
I can create a Pipeline Server:

But I can't find any way to modify it or delete it after.
But I should be able to delete, potentially to re-create it after?
This is all I see:

This can be performed in the Pipeline section, but not in DS projects:

Expected Behavior
Have the ability to delete a Pipeline Server
Steps To Reproduce

Create a Pipeline Server
Try to delete it in DS Projects

Workaround (if any)
No response
What browsers are you seeing the problem on?
No response
Anything else
No response

@erwangranger I've moved the conversation of this topic upstream.
I think @kywalker-rh created some mockups for this, can you share them here please, I cannot render them.

Here's the design @lucferbux:

Not sure I'd have called this a bug -- it seems to be more of a feature request, but in the end, field-priority takes precedence anyways.

Not sure I'd have called this a bug -- it seems to be more of a feature request, but in the end, field-priority takes precedence anyways.

Yeah, I should have converted this into a feature request, this was originally logged as an issue, but is more a feature request.


Fixed invalid java code snippet

There is an invalid code snippet in the Inbound deserialisation section of the docs.
I made a PR to fix it

Thanks for the PR! Merged upstream.


[Feature Request] 24-hour time input when scheduling a note

Hi, I have my Android time setup for 24-hour time. When I schedule a pinned note, the app only gives me the option for AM/PM
I would like to request either an option in the app to toggle 24 hour time, or for the app to somehow respect the Android time settings.
Thanks for the wonderful app.

That's an oversight. Thanks for raising an issue.


Improve readability of code by using if expression

The code is simplified by using if expressions (and simplifying that when possible).
This pull requests solves https://github.com/Ada-Audio/audio_wavefiles/issues/5
Problem detected and solved by Rejuvenation-Ada crate

If this merge is accepted,
I could also check for the usage of short circuit versions of Boolean operators:
See e.g.
https://github.com/TNO/Rewriters-Ada/blob/47ca5f092d736ce7ab86a0214008023dd59b2f4f/src/predefined_rewriters_prefer_short_circuit.ads#L26-L31

Sorry for the delay: I'll take a look into your changes as soon as I have some spare time.
Feel free to perform others checks. The only thing I'd like to ask you, though, is to avoid creating an issue and a pull request at the same time: creating a pull request alone is more than sufficient.


Add object mapping for JSON and XML path

From<EMAIL_ADDRESS>on October 21, 2011 10:19:56
E.g.
from(json).to(MyClass.class);
or
from(json).get(MyClass.class);
or
from(json).getObject(MyClass.class);
Original issue: http://code.google.com/p/rest-assured/issues/detail?id=125

From<EMAIL_ADDRESS>on October 23, 2011 07:50:53
Status: Started


[5.3] Fix to prevent recursive where clause addition for chunkById

Noticed during a recent meetup presentation that when running chunkById, the id where clause gets appended over and over again.  (Ie you get queries like `SELECT * FROM my_table WHERE id > 50 AND id > 100 AND id > 150 AND ...).
For smaller datasets this isn't a big deal, but as the whole point of chunkById is dealing with increasingly larger datasets, this seems problematic.  Eventually you'll run into query length limits somewhere.  Even if you don't, transmitting so much useless data hurts my sense of performance.
This change is intended to "tag" the chunking where clause so it gets replaced each iteration instead of appended.  I couldn't find anywhere that relies on the Builder where member variable to be numerically indexed, so I don't believe this will be an issue.  Still, I'm not intimately familiar with this framework.
Also, this prevents the usage of more exotic id columns with chunkById.  Frankly I think that's desirable--I would restrict it further to only allowing use of indexed columns if I could.  If there's disagreement with this, another option would be to make the where function a wrapper around an internal function that also accepts a tag parameter.

Can you show me some code I can use to recreate the issue?

I can reproduce this issue, good catch.

Alternatively, maybe the $this->wheres property could be "pre-filtered", like it's done above for the $this->orders property. Did you try it?

Can someone just share the code I need to reproduce this?

Just use this on any table you have available:
\DB::enableQueryLog();

$count = 0;
\DB::table('users')->chunkById(1, function () use (&$count) {
    if (++$count > 2) return false;
});

var_dump( \DB::getQueryLog() );

Thanks vlakoff, yes that's the issue.  Especially bad with low chunk sizes.
Sure, there are many ways to solve this so up to you guys how you prefer to tackle it.  I figured I'd just offer one of the simpler solutions.  I hesitate on running the where clauses through a pre-filter though--eliminating basic redundancies wouldn't be too bad, but I could see that quickly snow balling into some crazy finite state machine to optimize wheres.  The SQL engine query optimizer already does that sort of stuff anyway, and it seemed a little overkill for this situation.
Also the chunkById issue is a bug, but I can see other cases where the ability to tag where clauses would be a useful feature and not a matter of optimizing away redundancy.  For example, it might be nice to cycle through a set of enumerated values in a where clause without creating an entirely new query each loop.
Another option would also be to change the existing where function to be a wrapper to another that accepts a tag parameter (default null), allowing any variety of where clauses to be labeled for future modification/removal.  Not sure if this aligns with the product vision though, so I didn't go that route.

I don't understand why we're having to fix these problems now. Did chunk always have this problem. Was the problem just introduced? If so, how and why and can we revert that change instead of introducing some new key into the wheres clause? Who knows what other consequences that will have.

I think some people just gained interest in this previously rarely used method.
My PRs were about usability (#16180, #16283) and adding tests (#16263, #16359), the main target being https://github.com/laravel/internals/issues/103.
But here we have a real bug. It's probably present since the first implementation of chunkById.

Just in case, ping @mzur, as you have authored #14499 and #14711 maybe you have some insight.
Also ping @nunomazer as you authored #13604 (didn't you encounter the same issue with the "where" clause?)

So this big under discussion in this PR was not introduced with any recent PR, but has existed since chunk was introduced?

It seems so. Not chunk but the later chunkById.

Yes, this where clause exists since v5.2.27 when chunkById was introduced.

This chunkById method behavior since 5.2 wouldn't have been noticed because its output is idempotent.

Chunk 1: WHERE id > 0
Chunk 2: WHERE id > 0 AND id > 100
Chunk 3: WHERE id > 0 AND id > 100 AND id > 200
Chunk 4: WHERE id > 0 AND id > 100 AND id > 200 AND id > 300
Chunk 5: WHERE id > 0 AND id > 100 AND id > 200 AND id > 300 AND id > 400

The result set for each chunk will be the same after the fix when only the last clause in the above iterations is applied.

Chunk 1: WHERE id > 0
Chunk 2: WHERE id > 100
Chunk 3: WHERE id > 200
Chunk 4: WHERE id > 300
Chunk 5: WHERE id > 400

Its severity is mild as the fix only affects query performance once 100+ chunks are hit.

@derekmd no argument with the mild statement.  This will indeed not affect the majority of users and it is idempotent (aside from when you exceed buffer limits and start to fatal).
However I wouldn't want laravel to become known for "doesn't scale".  These types of issues will contribute towards that reputation.

Don't forget about a different fix I have suggested above. I bet it would be a better solution:

Alternatively, maybe the $this->wheres property could be "pre-filtered", like it's done above for the $this->orders property.

@vlakoff it seems to me that a filter at that lower level should be general purpose.  And I would be worried about trying to write a general purpose optimizer to accurately recognize and eliminate redundant where clauses.  Taking that to the extreme you'd essentially be writing a SQL query optimizer.  It will also certainly be worse performance-wise.
Possible I misunderstand what you mean though.

I disagree when you say it's about optimizing the query, no, what we have here is a bug.
About my fix, I think it integrates better in the codebase. Your fix is introducing named where clauses. Though it would be great to get some feedback about the possible fixes.

@vlakoff if you have a better implementation of a fix then submit it.

@vlakoff but how would you implement a general-purpose order-by filter at the lower level?  Are you talking about inspecting each order by clause to see if it is subsumed by another one?  That feels an awful lot like an NP-complete FSM waiting to happen if you do it in a way that isn't just a very naive approach targeting this specific case.
Maybe I misunderstand, as @taylorotwell said maybe send a PR?

@soundsgoodsofar possible to write a test for this?

Fixed: https://github.com/laravel/framework/commit/53f97a014da380dc85fb4b0d826475e562d78dcc
Would appreciate if y'all can confirm.

I will make same fix to Eloquent query builder.

I noticed this has been fixed, will this be released into illuminate/database at some point, as this is still at 5.3.23 at some point? Could really do with this fix in Lumen!


CI: remove "sudo" to fix incorrect Go versions (incorrect PATH, GOROOT)

We were using sudo (without -E), causing environment variables that were set by actions/setup-go to be lost.
We need to preserve environment variables, including PATH, because actions/setup-go@v2 installs Go in specific paths to allow multiple versions to be installed/cached on workers, for example, in "/opt/hostedtoolcache/go/1.13.15/x64".
While it's possible to fix by adding both -E, and env "PATH=$PATH" (sudo -E does not preserve PATHas a security measure (see https://unix.stackexchange.com/a/83194/78656), this repository does not need sudo for its tests to run, so we might as well remove it altogether.
Also removing the setup-go step from the Lint stage, as it runs in a container, so Go is not needed on the host.
For details, see my debugging steps in https://github.com/moby/term/pull/21

@AkihiroSuda @dims PTAL

Actually; why do we need sudo? Is there anything in this repo that requires sudo privileges? 🤔

Updated; now removed sudo 😅

let me go ahead and merge this one


ZXHN H298A V 1.0 Python script error

When writing this code to decode config.bin to config.xml: py examples/decode.py --serial ZTEXXX config.bin config.xml  it gives me blank config.xml file and it says this in cmd message: Traceback (most recent call last):
File "C:\Users\merta\Desktop\zte-config-utility-master\examples\decode.py", line 194, in
main()
File "C:\Users\merta\Desktop\zte-config-utility-master\examples\decode.py", line 49, in main
payload_type = zcu.zte.read_payload_type(infile)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\merta\AppData\Roaming\Python\Python312\site-packages\zcu-0.4.0-py3.12.egg\zcu\zte.py", line 56, in read_payload_type
File "C:\Users\merta\AppData\Roaming\Python\Python312\site-packages\zcu-0.4.0-py3.12.egg\zcu\zte.py", line 48, in read_payload
ValueError: Payload header does not start with the payload magic.
Any help will be appreciated

bump

Same issue for me. Is there any suggestion?

not supported yet we are waiting ...

Can someone upload their config.bin so that I can have a look at it?

sure, H298A V9
Device Type H298A V9
Device Serial No. ZTAXXXXXXXXX
config.zip

Do you want to drop me the serial number via email (mkst@protonmail.com)... because I don't get the same error as you.
$ python3 examples/decode.py tmp/H298A_V1.bin tmp/config.cfg --serial ZTAXXXXXXXXX
Detected signature: H298A V9
Detected payload type 4
Trying to decode Type 4 payload...
No keygens matched the supplied/detected signature and parameters! Try adding --try-all-known-keys and try again.

sure here I will delete it later:
ZTA87484FF62FA

I wonder if anyone has managed to grab the cspd binary from this router to figure out what the iv + keys are?

how to get cspd binary?

Do you want to drop me the serial number via email (mkst@protonmail.com)... because I don't get the same error as you.
$ python3 examples/decode.py tmp/H298A_V1.bin tmp/config.cfg --serial ZTAXXXXXXXXX
Detected signature: H298A V9
Detected payload type 4
Trying to decode Type 4 payload...
No keygens matched the supplied/detected signature and parameters! Try adding --try-all-known-keys and try again.

I sent an email

I wonder if anyone has managed to grab the cspd binary from this router to figure out what the iv + keys are?

I sent an email as well any help is appreciated.

For some reason, the config.bin files you are downloading are encoded as base64.
So you would first need to do something like
import base64

with open("config.bin", "rb") as f:
  data = f.read()
with open("config.bin", "wb") as f:
  f.write(base64.b64decode(data))

However. that only gets you as far as being able to try to decode it. I wonder if these routers require the MAC as well as the Serial Number (and/or whether there are additional iv/key prefix or suffixes).
In terms of getting the cspd file.. if you already have telnet access it's probably easy. I dont know whether this youtube video is of any use. Alternatively if there is a firmware update file for this router we can take a look (although it may be encrypted).

As far as I understand, it comes encrypted with base64 with the new version. zte-config-utility does not work. The config file I take before works without any problems. When I decoded the current config file from base64 and tried again, I couldn't get the result.

Can you try with auto.py instead of decode.py?

I tried it in many ways, with Mac, with serial with password
C:\zte-config-utility-master>py examples/auto.py --mac 8C:DE:xxxxxxxx --serial ZTC0xxxxxxxxx --password aaxxxxxxx config.bin config.xml
Unable to find valid key for payload.

same


why not use gunicorn

Hi,
Can you elaborate on it? Do you mean using gunicorn instead of flask? There is no other reason than the fact the Flask does its job well already. If it becomes a bottleneck in the future, we can rewrite it in a different framework.


update WordPress-API Client Documentation example

const categories = await client.postCategories().find()
const categories = await  client.postCategory().find()

fixed, thanks for reaching out!
sorry for responding so late, I'd been in hospital and currently am undergoing medical treatment.


Dockerize

Depends upon #140.
Early experiments with running the server in a Docker container revealed the need for improvements in scripts/serve and server shutdown per #138 and #140. Once #140 is closed, I'll return to this task.

Even though I've technically already "Dockerized" the app in #153, will keep this open until the graceful shutdown from #140 is implemented.


Why Doesn't Float8 Save More Memory Compared to FP16?

As shown in the results from  #685  , why doesn't float8 save more memory compared to fp16?

Based on my observation, the memory overhead seems to primarily stem from the float8 operators (scale_mm, to_float8_construct). Are there any methods to reduce its memory consumption during inference?

FP8 training keeps high-precision weight copy, thus there will be no memory saving. For inference, I think you can use AffineQuantizedTensor (with torch.compile())
https://github.com/pytorch/ao/tree/main/torchao/quantization#a8w8-float8-dynamic-quantization


Check depedency in toml file

Check depedency in toml file so it gets automatically rendered on readthedocs server

I have updated the dependicies


image-text pre-trianed

nice work！I have two question.
When I finish reading this paper，i think the prior consists of a image encoder and a text encoder，so the  image-text pre-trianed weights just contain image encoder and a text encoder weights？
and How do I load  image-text pre-trianed  weights into models for other medical downstream tasks.

In this repository, I have made available two sets of pre-trained weights to facilitate further research and application development. The first set consists of pure vision-encoder weights, grounded in the ResNet50 architecture. This is a standard architecture of ResNet50 as found in the TorchVision Library, with the exception of the last fully connected (FC) layer. These weights can be freely accessed and downloaded from this link. Leveraging these weights allows for straightforward fine-tuning on various downstream tasks.
The second set of weights is designed for text-image joint representation, and is hosted on  Google Drive. Typically, such weights find their application in zero-shot tasks. To support this, I have included scripts and code within the repository for zero-shot classification, enabling users to implement this advanced functionality with ease.