2018-05-20 11:40 GMT+02:00 Ricardo Wurmus : > > Hi Sahithi, > > >> While this achieves the goal for a single character it does not > >> constitute a custom port. Have you read the documentation for > >> “make-custom-port” in the Guile manual? > > > > I have tried with the following code for, Gábor helped me in process […] > > Oh, I haven’t seen those emails on the mailing list. Please keep the > discussion on the mailing list so that all mentors and the community can > comment. > > The discussion was on IRC in a 1:1 conversation. The task Sahitihi wanted to achieve was to create a soft-port capitalizing all text sent to it. I helped her to achieve that. I was thinking about mailing you the details, but it was only a few lines of code. I will also make sure to keep you in the circuit in the future. > > the description for that goes this way.... > > > > The input taken from input port is read and stored in variable "s". > > This variable is passed to make-soft-port. The variable s is > > capitalized by locale conversion then binded with color. the result is > > displayed when called. > > Please try to be a little more precise with the descriptions. You > defined a new port with “make-soft-port”. The new port has two > important procedures: one that takes a single character, and another > that takes a string. In the case of a single character you just pass it > through to the current output port. In the case of a string, you > colorize it first and then write it to the output port. > > The result is a port that will print a coloured string whenever you pass > it a string. > > How would you use this in “(guix store)”? Note that we don’t want to > apply colour to any and all strings there. We want only certain > messages to be coloured. Can you please prepare a patch to “(guix > store)” that shows us how you would use this new port? > > As a first change, could you please add the relevant parts of “(ice-9 > colorized)” to a module in Guix? We probably don’t want to depend on > having users install this module separately. We also don’t need all of > it. Please prepare a patch that adds only the relevant parts to “(guix > ui)” and update the copyright headers. > > > I have tried the other process using escape codes however failed with > > the result i will come with this implementation and procedure in my next > > mail > > I have not received this email. Have you worked on this yet? > > When you have problems with code please always provide the relevant > parts of your code with the error messages, so that we can help you. > > I think that we need to start moving forward at a slighter higher > speed. Thanks! > > -- > Ricardo > > >