Rwyf sights cham. I welcome to the 26th meeting of the Education and Skills Wales Committee. Our first item of business today is a change to committee membership. I would like to put on record the committee's thanks to Mary Fee, who has been serving on the committee and wish her the best at her new parliamentary duties. I welcome Ian Gray, who is joining us today and I invite Mr Gray to declare any relevant interests. Mae Gwein ef wedi dweud bod yn ymwybodol y byddi'r White Cross am gwell, ond mae'n gweithio i bruniau mewn gwirio i ystyrpas aa oedd mynd i'r cysylltu yn gyfio'n cysylltu ond rwyf ymgyrch gyntaf iawn. Ieithaith y cysylltu i ei ddechrau am deall, ond mae'n credu ei ddechrau i ddechrau i mewn gwirio in private today and whether to take future reviews of evidence or a music tuition inquiry in private, so our members can tend to take agenda items 6 and 7 in private. Thank you, and as the committee can tend to take future reviews of evidence and music tuition in private. Thank you. Agenda item 3 is for coordinate legislation evidence. It has to consider an instrument that is subject to affirmative procedure. An affirmative instrument is two agenda items. First, the committee will have an opportunity to ask questions of the minister, and I welcome Richard Lochhead to committee this morning, along with his officials. The details of the instrument to the affirmative procedure included in paper one. We are considering today its assigned colleges, University of Highlands and Islands, Order 2018. I invite the minister to make an opening statement, and I welcome James Boyce, head of college policy and Gemma Grant's list to the Scottish Government to committee as well. Good morning, convener, and good morning to the committee. It's fine to be back again in a different capacity, and I congratulate the new members of the committee who are at their first meeting today. It's a good committee, speaking from experience. In terms of my new role as the minister for further education and higher education and science, I look forward to engaging with the community in the weeks and months ahead, and I'd be more than delighted to come back again in the near future to discuss any of the big issues that are on the agenda at the moment with the committee. In terms of today, however, I'm here for a relatively technical issue, but I do appreciate the opportunity to speak to the committee about the draft assigned colleges, University of Highlands and Islands, Order 2018. This draft order will assign Argyll College to the regional strategic body for the Highlands and Islands region and the University of the Highlands and Islands. Argyll College is one of the smaller colleges in Scotland, providing tertiary education across 11 centres throughout Argyll and the Islands, serving a population of approximately 88,000 people. In the region of the Highlands and Islands, eight colleges are already assigned to 2HI. Argyll College was not assigned to 2HI in 2014, as it did not meet what are known as the fundable body criteria under the Further and Higher Education Scotland Act 2005. The decision was made after the determination by the Scottish Funding Council in April 2014. However, Argyll College is already represented on UHI's further education regional board and is an academic partner of UHI. In practical terms, all the assignation will do is change the route by which funding is distributed to Argyll College. Until now, North Highland College has contracted with Argyll College for the provision of further education in the Argyll region. North Highland College is already assigned to UHI and has been responsible for assuring the delivery of quality fundable further education by Argyll College. After the assignation takes place, funding to Argyll College will instead go from the Scottish Funding Council to UHI and from UHI to Argyll College as part of its distribution of the further education funding for the region. Before Argyll College can be assigned to UHI, the Scottish Funding Council must be satisfied that the college complies with the fundable body criteria under the 2005 Act I mentions. Those ensure principally that a college has adequate provisions in place dealing with its governance and management, as well as financial accountability and quality control mechanisms. Between 2014 and 2018, Argyll College was assessed by Education Scotland, the Scottish Funding Council and UHI's own internal audit service. All outstanding recommendations from earlier assessments have now been addressed. On 29 March 2018, the Scottish Funding Council wrote to my predecessor proposing the assignation of Argyll College to UHI, since it was then satisfied that Argyll College now met all the fundable body criteria set out in the act. My public consultation was published on 28 May and closed on 25 June 2018, and 100 per cent of its responses supported the proposal to assign Argyll College to UHI. In summary, the assignation is strongly supported by the sector and powers the college to take accountability of its governance and funding under the oversight of UHI as a regional strategic body. I am confident that the benefits that will bring to the learners, employers and communities that the colleges serve will move forward. I am happy in that basis to take any questions from the committee. Thank you very much. Are there any questions from members of the committee? None at all? Okay. We will move to agenda item 4, which is the formal debate on motion S5M-14432, in the name of the minister. I would invite any members who want to contribute to the debate. No contributions. On that basis, the question is that motion S5M-14432 be agreed to. Are we all agreed? Thank you very much to the committee. I take it that will be the normal process when I appear before committee in the future. I hope that you do not regret your former offer. I hope that you do not regret your former offer, because I am sure that there will be plenty of opportunities for us to have you before us again. The committee must report to Parliament on the instrument and members' content for me is convener to sign off the report. We are now going to suspend for a few minutes to allow our witnesses to change over. Thank you very much. I welcome everyone back. We now move to agenda item 5, which is music tuition in schools inquiry. The committee is conducting an inquiry into music tradition and the first week of the committee's inquiry. We are starting to hear about the experiences and perspectives, particularly from young people. We had an informal session that was born with a number of young people and interested stakeholders to hear their experiences. We are glad to welcome two of the young people to the table to provide formal evidence. I welcome Catherine Mackay, member of the Scottish Youth Parliament, for Glasgow Southside, and Alice Ferguson, member of the Scottish Youth Parliament, for Linlithgow. The informal session that we are based on is in the paper 2 of the committee's papers for today. I would like to start the session by asking Alice and Catherine if they could say just a little bit about their experience of music tuition at school and the experiences of their peers and, indeed, their constituents as MSYPs. I invite Alice Ferguson to go first. Hi, everyone. My name is Alice Ferguson. As Clare said, I am an MSYP for the Linlithgow constituency. I am also a young person who participates in the instrumental service that West Llewyn offers. I started a campaign last year after the free service was under threat from West Llewyn council budget cuts. The campaign that I started was called WL Music and it invited young people all across West Llewyn to express what they thought about the service and why they would like to see it saved. It was extremely moving. The comments were just so powerful from young people, from primary age children to secondary age children. It was clear that young people had so much they wanted to say to save the service. You will deny thousands of young people in West Llewyn the opportunity to develop their musical talents, which, at this point, they may not even know they have. Like we were saying in the formal session, you do not only learn how to play an instrument, but you learn so many skills that you can take through life. By introducing a charge for instrumental service, you are denying young people this opportunity, depending on how much money they have, which should not be the case. In West Llewyn, when you have gone from a free service to charging, it is unfair and it is not right to deny young people these opportunities. Personally, from a point of view, as I was saying, I have not just developed skills in trumpet. I play trumpet, I have done my great exams in trumpet, but I have made new friends through music and through the extracurricular music provides. I have become more resilient, confident and open-minded in everything that I do. From a mental health point of view, I have benefited from the creativity and feeling that I am part of a community, part of something like a band is really good for my mental health. The one-to-one teaching that I have had from my music teacher is something that you do not get in any other class. This has allowed people to establish a relationship of trust, continuity and security, which often young people struggle to find in teachers or peers. I think that that has demonstrated that music is not just about playing an instrument, it is about the skills that you build that you can take through life. Catherine, would you like to contribute? Hi, I am Catherine Mack, MSYP for Glasgow Southside. I want to echo Alice's point. I went by winning from primary 4 up until fifth year at school. It allowed me to get into sitting national five music and taro music, which was fantastic for me. Learning violin did not just provide me with the skills of being able to play violin and being able to say to people that I can play violin. It also allowed me back when I played it to actually join an orchestra in the school, to make new friends at the orchestra, to join the string group, which was at the school as well. I also, while I am at university, with my studies at university, I am wearing a saxophone right now. That one-on-one tuition with my teacher Ms Freeland has been invaluable. If I hadn't of learnt how to play violin and saxophone, I wouldn't have been able to have that national five music or higher music, because as part of that book of occasions, you have to either play two instruments for your exam or play one instrument and sing. I cannot sing to save my life, so that was not an option. It had to be violin and saxophone. However, if you don't make music tuition free for all young people, how are they, which are I going to be able to do during national five music or higher music? That would affect so many Glasgow Southside constituents. Many Glasgow Southside constituents do not have the virtual funds to learn how to play an instrument. Before learning how to play an instrument, who knows what potential talent we could be missing out on? We could have the next Bach, the next Nicola Benedetto, the next anyone in our schools, so you really cannot cut music tuition. The amount of skills I have learned, friends I have made for music, even general knowledge about music, is all very handy. It is definitely a big issue for constituents in Glasgow Southside. It is not something that you can work out. The amount of benefits to music for it will weigh any financial costs and barriers to music tuition. I am going to open up to contributions from the committee. I said answer on who has already indicated. I was interested in what you were saying, Catherine, about qualifications. Obviously, as you rightly say, this is much more than to do with qualifications, but you did mention exams and so on as well. I was interested in that because when I was minister in this area, one of the things that happened was that we set up a working group on instrumental music tuition. One of the findings of that group was that whatever else local authorities around the country did about that, they should not be charging for lessons that led up to a qualification, an SQA qualification. I would be interested to know what your experience is around that and whether you think that to get an SQA qualification in a music-related subject that people are having to pay to get there. In my experience, it varies. I did not have experience of a state school. I went to Craig Holmes' school. If you were going to do national five music or higher music, tuition was free if you sat in keyboard or vocal. In fact, you could get both free if you did keyboard. You would just get tuition from your music teacher, like normal, and then he would also teach you singing as well. If you wanted to do any other instrument, like saxophone, I do not know treble, ukulele, but carnet, then you would have to pay because that was a specialist teacher who would come in. I am not quite 100% sure what the scenario is for every other school, but ultimately, yes, you can still get it for free for some instruments, but I do not think it should be a case of some instruments for free for doing your SQA qualifications and others, because that would be just as bad as just because you can get likes of keyboard for free for your SQ exams, but not via win. That would still be putting people off sitting national five or higher music, maybe the advanced tier if they wanted to. Good morning. Thanks for the excellent opening statements from both of you. Can I just ask if you could give us an idea of maybe how many of your friends might be either put off from taking up music because of the potential costs or the costs involved in some instruments? What impact is that having on people that you know? Well, I am part of the school band and watching the transition from the service being free to after the charges have been implemented, the band is just not the same. There aren't as many people there, and the people that are there almost feel like they have to be there now because they are paying, whether before it was you chose to do it, you did it for yourself rather than because your parents are telling you you have to because they are paying £382 a year now, and it's just really sad to lose that sort of spirit and lose that feeling that you're doing something for yourself and not because you have to, and I know a lot of my friends have now dropped out of music just because they can't afford it, which is ridiculous. Why should you be denied the opportunity to play something, to do something that you want to do just because you can't afford to? It's really sad and it's such a shame that some people aren't getting this opportunity. When it's your friends as well watching you being able to go on and do trumpet and do band, and then not being able to, you feel rubbish. I've got a slightly different response because I'm currently at university, so we're not quite affected in the same way at Glasgow Caledonian because I'm doing social sciences as a degree, so if you want to do music, it's a case of do-it-it-with, but one thing I noticed is that it's definitely at university level, there's actually a free music society to help people, not people, so students coming further on or musical talents from school. In terms of friends, so I was speaking to some of my new university friends and some of them were actually talking about how at school they weren't outright denied music education, not at all. It was more case of the cost to put them off, and that feels like an absolute shame to me. That makes me quite upset, actually. Let's think that this girl from Milg Navy, I think, couldn't learn how to play violin because of the cost, because she didn't want to financially burden her parents. Think about it, she could have ended up being fantastic, could have gotten a grade eight potentially in violin, could have been an extra child prodigy, and that's it because of the cost, so she couldn't do it. There's been other experiences as well, because obviously university is more broad in terms of the people you meet. There's an awful lot more cases of people who have become friendly of saying they would have loved to have taken music at school, but due to the financial barriers, they're missing out. It's completely imperative that you've got to have music free for everyone, because cost shouldn't be a barrier. You can't put a price in music. It's such a fantastic experience, and it should not be something that you've got to pay for. I want to bring in Ross Greer. A number of the people who've submitted written evidence to us were really keen to highlight that those who benefit the most from free music tuition are often people from family backgrounds where they wouldn't necessarily have a range of other opportunities if you had to pay for them, because of family income most obviously. Alice was wondering, the experience that you mentioned with the changes that you've seen in your school band and the changes across West Lothian as a result of that, have you noticed that the people you've said have not been able to continue? Is there a bit of a common thread there that those from backgrounds where the family has a lower income are or have been the most likely to not continue with their music? It is the privileged that are getting to do music now, which is going back to Victorian times where only the elite get to do violin, only the elite get to do music. The council are wanting to reduce inequality, but by charging for music, they're increasing inequality because the people that can afford it are getting these opportunities to go to music camp to go and to play concerts, to learn an instrument, do grade exams and the people that can't afford it, the middle, the people that don't qualify for school meals, but the people that can't necessarily afford to pay £300, £500, £600 a year, they're not being able to get this tuition, which is having a negative impact on the young people and it's increasing inequality as opposed to reducing it and it's, as I keep saying, it's a shame, it's not right, it's that the privileged are the ones that get to do music and the ones who can't afford to don't. Do you want to come in on that one Catherine, are you? I think Alice has basically covered everything very well, so I'm quite happy to move on to any other questions. Thank you. Jenny Gilruth. Good morning to you both. I'd just like to pick up on a couple of things you both mentioned. Alice, I think you spoke about the charge being, was it £382 a year? Can I just ask what does that charge cover then? Is it all your tuition and is it rental of the musical instrument then? How does it work? So it's 382 pounds for a year's tuition and with that covers one 25-minute lesson a week, so that can be sometimes it's one-to-one but sometimes now because of the reduced numbers it has to be six to ten pupils because the teacher is travelling. It also covers band, so a band happens, or band orchestra, an ensemble sort of for like an hour, but that roughly works out for £10 for a 25-minute lesson, which is you can get for cheaper if you go private, like a £10 would get 30-minute private tuition, one-to-one. So why are people paying £10 for a 25-minute lesson with maybe six other people? 382 pounds is what it is in I know, in Clackmannshire, we're talking about it, it's over £500 for a pupil to have music tuition, but in West Lothian £10 for 25 minutes of playing an instrument is quite absurd. That's helpful, thank you. Catherine, you mentioned that you were offered the violin, I think, in primary 4, is that right? Can I just ask, how did that come about? Were you identified as a pupil in your class or how did you get that offer? Maybe Alice, you can talk about how you were first offered the opportunity to play a musical instrument and when that came about in your education. I could have started violin in primary 2, but I never fancied trying an instrument until this night at the school held, where every music tuition teacher came in and had their instrument and so on, and you could go up and try each one and kind of see if you fancied learning how to play an instrument. So I kind of went around all of them, little people were me very enthusiastically. I tried out this violin and the music teacher for violin was this baron, was there? I immediately loved it, so it wasn't a case of being gifted at that point in time, oh my god, my poor appearance having to listen to my practice. It was more a case of I just showed an absolute love for computer told and other instruments, so I thought they were okay, but I'd rather try to play a violin. You said she was your music teacher? She was my violin teacher, so she specialised in violin, she'd just come in once a week to do all of her pupils and that bit. So there was a kind of music evening then whereby you would all offer the opportunity to try different instruments? Yeah, so all pupils were just invited to come along and basically just try ahead and string the one to see if they fancied taking out music. Okay, thank you. Alice, what about your experience? In around primary five I think it was, we were all, I don't know if it was like an assessment, we were all sort of made to fill out this form and I think it tested to see if we were, not tested such but assigned us to either strings or brass and then from there we were given the opportunity depending on how compatible we were to take up strings or brass. This continued throughout primary five to primary seven and then I know in S1 the opportunities sort of extended to woodwinds guitar and from there pupils could choose to do guitar or choose to do woodwind and that's how it came about. And so when you were in primary school was it a music specialist that delivered that? Yes. It wasn't your class teacher? Yes, it was a music specialist. Who came in? Right, okay, thank you. Thank you. Alice Smith. Alice, I wonder could I ask you as far as you're aware within your school are there any other charges of any sort for any other subject area or additional tuition or is it just music that's got this problem? As far as I'm concerned it's just music. I think when I was reading the papers it said that music is the only subject to have charges to complete the exam I think that's what it said but someone said in my WL music campaign that I find it unfair how when we are low on money music and art get thrown away and you'd never ever get charged to do maths you'd never do you just wouldn't and why is it that maths is more valuable? Maths and science stem subjects are more apparently more valued more valuable than music and creative subjects it's quite strange that you seem to have to pay hundreds of pounds to be able to sit music exams or be able to get instrumental tuition but you can sit science for free. You described your campaign that you have been very successful with could you just tell us a little bit about that campaign and some of the responses that you've had and what you hope to achieve with that? Yes, so the campaign run about this time last year and it ran for a couple months it was when young people were given sort of a card which said and they held it up why whistle being instrumental service should be saved this was at the point before when it was under complete threat that it was going to get completely scrapped and young people as I said from primary to secondary filled in why they wanted to share their experiences on why they wanted the service to be retained and some of the responses were it helps improve my coordination allows me to participate in something educational creative and rewarding that I would never normally have the chance to experience also music should be accessible by everybody not just the privileged and it opened up many doors for me the response there are a good lots of responses but you're posted on social media people were retweeting it people were talking about it people were sharing the experiences and it was just a great way of getting that personal touch across and that music is that's what the instrumental service is about and it was really great to hear all these experiences from young people and music makes you smart I find it unfair when we are low money music and art get thrown away. Did you get any response from the local authority to that campaign have you had any official responses to it? I've not had any official responses but the campaign definitely reached a lot of the councillors and I think it did play a part in retaining the service to some extent. In other words you feel that there's quite a strong pool of public support for what you're achieving that's good to hear. Mr Gray. I want to ask a bit more about choice of instrument you both talked a little bit about that when you talked about how you started but I had a specific question for Alice around West Lothian because I think I'm right in saying if I'm not you'll correct me that initially the council proposed to keep tuition free but to restrict it to brass only and as part of the campaign and the response from the public they took an alternative path which was to keep tuition more wider but to start charging for it and I just wondered how you felt about that because I mean I understand you would like to see all tuition free but there was almost a choice there wasn't there between keeping it free but very restricted or starting to charge but keeping it wider and I just I just wondered how you felt about that choice which was the the better thing. Yeah so initially as you said the council proposed that they cut 50 percent of the service and I believe it was just brass woodwind and piping that would remain free and my campaign was focused very much on the fact that music should be available for everybody and that music should be free because otherwise that's promoting inequality and so that's what I was primarily campaigning for and obviously when Wesleyans had a free service for goodness knows how long and then suddenly like that you're charging £382 per pupil is not what I was after and lots of my constituents were. Sure I mean I understand that but I'm kind of asking about the I mean how why did you both feel you had a choice when it came to instruments? I mean did you feel you could learn any instrument at all or or not your choice was did you feel your choice was restricted? I certainly think now the charges have been implemented and the whole thing has become far more restricted and far less you know it's far less about what music's about now it's far more restricted and not as not as good but you learn trumpet don't you so so an option would have been for that to remain free but some of the instrument of tuition to disappear I suppose I'm asking do you think that that would have been better or not than what happened which was the charge for everything preferably the outcome would have been free for everything but I know the cuts had to be made and so ideally everything would have been remained free and now that charges have been implemented across the instrumental tuition I think has negatively impacted the service altogether. I just wondered when you both of you when you started how wide a choice you felt you had about what instrument you would learn or whether you felt you kind of got the chance but it was trumpet or you got the chance but it was violin or did you feel you had quite a wide choice what instrument to learn? I think that was having the wider choice of violin or trumpet was definitely nice to have but the whole opportunity being able to be given an instrument and be taught how to play an instrument and to be part of a band to be part of a ensemble that was far more appealing to have that opportunity something that you've never done before in primary school and then be given this like door that was open to a world of music and skill building and all that was far a great opportunity a greater choice and being able to pick between two instruments.  Um well yes I did definitely but I feel like my answer is going to be a bit different because it was Craig Holman not quite a state school he like yes I did have a choice but ultimately if you're going to private school you're probably going to be able to afford the extra tuition for an instrument but I feel like even though I did have the opportunity to choose an instrument I wanted that would not be that would not have been the same if I had been at a state school so yes just because my experience was absolutely fine in terms of the charges doesn't mean to say that people here who maybe are struggling financially wouldn't manage I just still think that tuition should be completely free for all in state schools it just seems wrong I mean like Alice's hour where you get mass for free get English for free you even get drama etc for free so why is music always being the first to go in the topping block it just seems so wrong to make it that you've got to pay for it when beforehand it used to be free but in a lot of systems if you're studying music as a subject you don't pay it's only if you're doing instrumental tuition outside that and for the band so do you think that's okay? I mean acknowledge that that's an improvement and that yes you could still then wear a musical instrument but that seems a bit restrictive and that you've got to set music as a qualification well if you just want our music for the benefits for mental health to become to get new friends in an orchestra to get that experience not everyone is going to realistically want to sit national five music it isn't just performing it's also quite theoretical if you like that's a bit unfair to force or near enough force people to have to sit a national qualification music when you might not feel comfortable sitting the theory side as well I still feel like that would be a barrier I think ultimately the best solution would be just keep music free for everyone the benefits are there mental health improves you end up with more friends if you join a band or an orchestra heck even your grades can improve there's been studies out there saying that people who do music do far bats or in all the other subjects as well it seems like quite a clear solution to keep music free for everyone thank you thank you very much I'm interested in well I think first of all this issue about if you want to do national five or a higher you need to do an instrument you need to do two instruments but what's happening is people are restricted in their choice so it's not I want to do a violin I'm a violin specialist I want to do my higher music well you can't do violin because of your charge for it I think I'm interested in your sense of how common that is I suppose my more general point is has the youth parliament done some work to identify not just what's happening in West Lothian or in Glasgow but more broadly how different local authorities are responding to this challenge and to what extent what's happened in West Lothian is common in the experience of young people well the Scottish youth parliament as most of you are aware is a democratically elected voice of Scotland's young people and we have a unique democratic mandate to represent the views of young people aged 12 to 25 across Scotland and part of our policy is that the Scottish youth parliament believes that music tuition should be free for all secondary school pupils in Scotland local government should strive to implement this by 2021 and this was passed in 2015 but it was renewed in August this year so I think that shows that young people in Scotland want music tuition to remain free and it's all across Scotland that this is wanting to be happening and that's what the Scottish youth parliament have identified and hope to happen. What I'm interested in, I accept that the youth parliament has and I'm very persuaded round the whole argument around the importance of music and actually music tuition in terms of qualifications as well but to what extent it's not just a policy statement by the youth parliament but to what extent have you done any work on what's happening in other when you've always had your campaign highlighted what's happened in West Lothian and I wonder what is do you know what the experience is in other local authorities is West Lothian an extreme case or is it kind of an average case of what's happening? Oh very, could you please repeat the question? Sorry, I'm just interested whether I can see the youth parliament has taken a policy decision believing free tuition and it's driven by experiences of some young people like in West Lothian where they've started being charged to what extent do you know from other elected representatives to the parliament is happening in other parts of Scotland? Okay, so I can't really speak in behalf of all local authorities because I'm Glasgow based but I can't imagine that West Lothian would be the only one. I remember when I was sponsored her campaign it definitely appeared as though other local authorities from the Scottish Youth Parliament were taking a massive interest in this because they were taking such big interest that other local authorities would also be facing the problem. I definitely don't think it's just West Lothian who's experiencing this and pretty sure Glasgow's facing it as well. Maybe not in quite as an extreme scale as West Lothian, because West Lothian was very bad according to Alice, but I think definitely all local authorities are struggling to some extent with music tuition. One last question about the West Lothian situation. Is there any provision for families who have a low income to pay less when they were increasing the charges for everybody? Was there any distinction made for families who perhaps might have been on a low income say maybe pay less? Those who receive free school meals do get the tuition for free. However, it's the people that don't qualify for free school meals, but it's the people in between that are going to miss out most, the people that don't earn the most money in the constituency. It's the people that are just squeezing by who are just getting, you know, what is doing music going to compromise, football lessons, going on school trips. People can't afford to pay for music tuition and it's those people that are not only going to need it the most, not going to need that continuity, trust, skill building that music tuition provides, it's them that are going to miss out the most. Back to your other point, I know certainly in Clackmannshire that they've just doubled their charges in the last year. I think that the whole idea that music is not as valued, is invalid across Scotland, is the big point that this situation in West Lothian is trying to get across, that music is just as important, instrumental tuition, it's just as important if not sometimes more important in building skills that STEM subjects do and it's this whole idea that this attitude needs to change and by cutting the budget we give to instrumental services is working backwards, it's telling people that they can't build these skills that music builds, it's telling people that music isn't an option, it's STEM subjects, it's academics, it's not music and creativity. That's what this whole campaign was trying to get across, that music is important and music does build more skills generally speaking than some academic subjects. I agree with a lot of what you said and certainly my youngest son benefited from free music tuition and he learned keyboards and guitar and it stood him in good stead since he left school but there was a survey by Connect who used to be the old Scottish parent teacher council and there was a couple of comments and I just want to know what your reaction was to the comments and it says, however, a few individuals made comments that they were willing to pay if money goes to help those who can't afford tuition. As a high earner I do not believe my children should receive tuition for free and would be happy to pay if this subsidised lessons for others. What was your view on that me? My view is that in what I was saying earlier you've got the people, you've got the spectrum, you've got the people that don't earn much and then you've got the people that earn a lot. It's people in the middle that would generally speaking not be seen to be given extra help, it's those people that are going to miss out, it's those people that just get by to live a happy life. It's them that are going to be disadvantaged from this because they're not going to be seen to have any help or they're going to have to compromise other things to not do music tuition and that's what I think the whole message of free tuition is that it should be equal for everybody no matter who you are, what financial background you come from that you should be able to get instrumental tuition for free and by dividing it up into how much you earn and drawing lines that you qualify for it for free but you don't that's promoting inequality. Of the 32 local authorities 23 of them have been charging for a long number of years although some of them charge for the higher of instruments and not for music tuition itself if that was the model that was a charge for the instrument as in a higher fee as opposed to no music tuition would that be more acceptable or would you rather just was all free? If it's all free that's the way to go. In my constituents views as well as WM music has showed people want it to be free because it's the benefits are colossal. I was just wondering if you had a sense of how your teachers feel about this and if any of them actually said anything directly to you don't need to name them obviously but you know just wondering if you've had that sense of you know of their opinion? I know teachers certainly feel very upset about this taking instruments off pupils because they can afford to do lessons but can't afford to buy their own instrument watching pupils go to concerts but their parents can't afford to pay the tickets for the concert because they're paying for the tuition. As a teacher that just must be heartbreaking to watch pupils you've taken through from primary 5 to then in S3, S4, them dropping out because they can't afford to do it. As a teacher that's not why you go into the teaching profession and I know teachers have been really upset by the whole situation that having to take away something that so many young people value just because they can't afford their parents can't afford to or parents can't afford to pay. Are there any further questions from the committee? I thank both Alice and Catherine for coming along this morning and particularly I think you've picked up on many of the themes from the informal session particularly about the added benefits both chair educational achievement but also for mental health and social skills which I think was very important and also the hidden cost I think was another theme from this morning as it's not just about the tuition there's also access to the instruments and the opportunities to participate in orchestras and things like that that might have additional costs so and I think that's all been covered so thank you both very much for your attendance this morning and we're now going to move into private session.


Hi everybody, Joe for jaspyscasebreaks.com happy Sunday. We're closing out the night with a great one here I'm glad we got this done today the jaspys high roller mystery crate It's a random hit break Only six things inside So basically we're gonna open up this crate Type in all the show you the hits first type in all the hits and Then we'll randomize your names Randomize the hits and hopefully match you up with something awesome So big thanks to big thanks to David for buying two spots straight up So thanks David and congrats to the to the winners of these spots as well There it is There's the mystery crate What what treasures can we find what mysteries can we find in here? All right, so I'm just going to I'm just gonna reach in the first thing I grab will be the first thing I type in We'll just type things in in the order that that they're pulled first thing What do we have? Oh Whoa Wow a David Beckham autograph that is wild in Israel Madrid gear This is from this is Chronicles soccer. No mosaic La Liga. We know bex It's pretty good All right, next thing is PSA 10 from 1997 finest basketball Tim and Tim Duncan, and that's pretty sweet. He's pretty good. That was the second one Next is oh From downtown 2020 Panini prism draft picks downtown Lamello ball PSA 9 mint 9 already graded for you rookie of the year. It's pretty good. These downtown inserts are wildly popular Is this a dual relic dual auto? Franchise favorites dual relic dual auto Shaquille O'Neal on the left side and Magic Johnson on the right side and we have both are on card That's from bowman's best basketball 15 out of 25 from back in 2001 Two more. It's a good time to get this one 2015 tops heritage That's rookie Chris Bryant Real one auto in that red ink hand number 23 out of 66 PSA 10 of Gemmin 10 It's having a pretty solid season this year Could be on a new team by the end of the month by the trading deadline It's a good time to get his rookie card though All right, and the final hit is gonna be Wow is gonna be a Brady a downtown Tom Brady From 2020 Panini Donner's optic PSA 9 downtown Tom Brady Patriots edition I guess that's what downtown Boston looks like this is after all that that's what Downtown Charlotte apparently looks like that Wow what what a break empty box all right We're gonna pause the video When we come back And we're gonna have the hits typed in and we're gonna see who ends up with what? We'll be right back All right, welcome back everybody. I've got all the hits typed in One two three four five six got the hits typed in There are here are the brave people here. Thanks for getting in one two three four five six Let's go. Let's roll it. Let's randomize it and attach you with a hit after six and a three nine times for names and hits good luck One two Three four five six seven eight And ninth and final time Sean David Sean PJ Chad David Sean David Sean PJ Chad David Six and a three nine times for the hits Good luck one two three four five six seven eight and Ninth and final time. We got the Brady on top the Lamello on the bottom After nine six and a three nine times did I do it right? I did so here's how it shakes out Sean O'Leary with the Tom Brady downtown PSA nine David the Tim Duncan 1997 finest basketball PSA 10 Sean you have the Shaq magic dual relic dual auto to 25 PJ with the David Beckham mosaic autograph I know PJ likes soccer Chad with the Chris Brian 2015. It's rookie Heritage baseball red ink autograph PSA 10 and David with the Lamello ball downtown PSA nine What a break. Thanks everybody for digging deep on Getting the spots on Filling up the fillers We appreciate it Really nice stuff popping out of here. Thanks everybody for making this happen Keep your eye out for more Whether it's on our YouTube channel at Jasper's breaks Or at Jasper's breaks on our Instagram channel or on our YouTube channel that you're watching right now Always look out for these mystery crates. We always do fun stuff like this. Thanks for watching. Thanks for breaking with us I'm Joe. I'll see you next time for the next one on Jasper's case breaks


The researchers have developed a new type of stretchable electrode made from silver platinum copper alloy and inspired by the scales of snakes. This material can be used in applications such as wearables, medical devices, and flexible displays. It is highly stretchable and resilient, even under extreme conditions of strain or bending. Furthermore, the material is also highly conductive, making it suitable for use in electronics and other applications. This article was authored by Cha Young-Kong, Song Won Kim, Wook Kim, and others.


This research evaluated the effectiveness of microwave heating for improving the self-healing properties of asphalt mixtures. It found that mixtures with steel slag aggregates and steel wool fibers had the highest heating capacity and best self-healing performance. These mixtures also showed the greatest strength recovery after a total fracture and fatigue life recovery of up to 150%. This suggests that steel slag aggregates are key to achieving optimal self-healing capabilities in asphalt mixtures. This article was authored by Carlos Die Lerero, Hugo M.R.D. Silva, Joel R.M. Oliveira, and others.


Main time, approximately 300 persons affected by Hurricane Elsa are beneficiaries of a one-time cash payment through the Ministry of Equity, Social Justice and Empowerment under a pilot project funded by the World Food Program. This cash transfer program is part of a larger project, which provided an opportunity to test a new vulnerability index. On Monday, January 31, 2022, a post-distribution monitoring survey was launched to assess the value of this cash assistance to beneficiaries and solicit feedback on the program. This information will help to improve planning, design and implementation of future programs that support affected persons after a disaster and strengthening the social protection system. Direct payments were made in December 2021 and January 2022 through recipients' respective financial institutions. The amounts ranged from $300 to $750.


The Appalachian Wireless Holiday Sale is going on now. Till the end of the year, visit us in store or reserve online for an unbelievable sale on the hottest devices. We know what you want for the holidays because we are you. We are Appalachian Wireless. Throughout the month of December, Kentucky State Police Post 9 and Coal Run have been hosting their Cram the Cruiser food drive during the weekends. Families have been lining up to meet the troopers and receive charity during the Christmas season. Public Affairs Officer Michael Coleman tells us more. This is the last week for Cram the Cruiser here, so we're still taking donations. You can bring us to Post 9 where we actually have a donation being set up at the South Winston Food City. We did our one day event there at South Winston Food City where we received multiple donations, food and some monetary donations which will also go to the local food pantry that will be donating all the food to. We're working with the Lighthouse Ministry Food Pantry over in Belfry, Kentucky and they're going to take all those items and hand them out to the public and they'll also take the money and they'll go to God's Pantry and be able to order and buy things cheaper than what we would if we were just going to the store. This year we received probably more money donations than we did food. I don't know if people were just stopping by and seeing us out there and they would drop some money into the donation bucket but like I said all that money will go to the Lighthouse Ministry Food Pantry so they'll be able to go out and purchase food or purchase items needed for people in the community. Cram the Cruiser has always been by the community, for the community. Anyone can help by donating food or money. When the food donations brought in the post and the one day event, we've had probably several hundred people come by and make some kind of donation. With events such as this, it's always a great time for the community to come out and help us be able to collect these items so that we can get back to the community. I know the holidays is an expensive time for everyone but if you can come out and make some kind of donation so that we can help someone have a better Christmas and just make sure they have food on the table this Christmas. Reporting from Mountain Top News, I'm Nick Collum.


Welcome everybody. Here I'm presenting Arno Schull from head of development for Thingsal and he's going to have a presentation that is titled from iterators to ranges. All right thank you very much and thank you for coming. So I'm gonna talk about from iterators to ranges. What's going on currently in the standard in the standard library. Okay so we're gonna talk about from iterators to ranges. The first thing is who is familiar with ranges? Who is who knows the boost range library? Okay I guess very few. Now who knows the Eric Niebler's range v3 library? Okay no one and I guess that's kind of superfluous to ask. No one is using ranges and everyday programming. I think you should. So what I'm I think what I want you to what I want you to take away from today's talk that you can do your C++ programming much in a much more productive a much more efficient way if you make good use of ranges. Well what are ranges? Well when you're using C++ in the old-fashioned way you would write code like this. You have the std vector and then when you want to sort the vector you pull the begin and end iterators out of that vector and call std sort and then if you want to remove the duplicate elements because it's unique again with begin and end and then you call that dot erase of this thing again vector and that's a lot of mentioning of that pairs of iterators really belong together they should be one object so it would be much nicer if you could write something like unique in place of sort of vector where sort is doing the sorting of the vector unique in place is throwing away the duplicate elements. Now before we go on there is a bug in this piece of code at least it's not entirely generic and I want you to tell me what is that bug which operator a standard sort use to sort the range operator less what does the unique use to throw away elements equality operator okay and if these two are not consistently implemented on the T the whole code is not going to work and this is also something that range the good range library will give you our range library certainly gives you that that you use these these operators more consistently because you have functions that package everything together into range functions okay why do I think that we in particular know something about ranges things that has its own range library it grew out of boost range and we have about one million lines of production codes that use that library and we have the freedom to change both the library and our code as we like and the the library grew out of this collaboration between the our code and the library and I think that's the only way to come up with a good library design you need a heavy user of that library you need a large code base to try out your ideas and that's what we did we iterated our design until we came up with something that was really practical and I want to share with you today some of the insights that we got before well there are ranges kind of in C++ 11 already there is the range-based for loop and who is familiar with the range-based for loop okay most of you alright then there is actually universal access for the stiff begins to with stiff against it end so you don't have to call the member function it will actually the stiff against it end will also work on something like arrays so you can use always stiff begin instead and universally in generic code and well no there's no end that's all you have in terms of ranges in the standard C++ 11 C++ 14 didn't change much in that regard the future is going to be the current pet project of Eric Niebler he has a ranges technical specification in the standard committee and the first or the thing that this the this specification the technical specification does is to lay some groundwork for ranges and to make basically algorithm the algorithm header support ranges so you have for example a function find that doesn't work on two iterators anymore instead it takes a range and internally it will then just dispatch to stiff find pulling the iterators out of the range that you passed in and then he has a bit more advanced range of version three code base on the web and this is basically what Eric envisions to standardize eventually it contains more functionality than just basically packaging two iterators together into a range object and we'll see what this functionality is now first of all what are ranges first of all ranges are the familiar containers you can call begin and end on them and that makes them really ranges that they have a begin and end and they own their elements when you copy them you will copy the elements along with the object and you have deep consciousness if you have a const vector you can't mutate its elements in addition to containers there is this second thing which are also ranges the standard committee calls views and ranges are really containers and views taken together so what's a view well a view is basically your old iterator pair packaged into one object it instead of owning elements it will actually reference elements just like iterators do and you have shallow copying again just like iterators you can copy the reference in all of one and you have shallow constness so when you your object is const that doesn't necessarily mean you can't mutate the elements just like with an iterator it's const iterator versus iterator and the the constness of the iterator itself doesn't really matter now what I showed you was these just pip packaged pair of iterators and that's pretty boring there are more interesting ranges that make these ranges an actual practical concept and that's really driving the productivity gain you will get from them so when you have say a find you have a vector of ince you have a find and you find an element yeah so you have a find and you're finding an element for then well that's a that's simple call you get an iterator back now let's say you want to do the same thing on a structure and the ins are no longer just plain in there in that vector but they are packaged as an ID in structure a and you have a vector of ace you would like to kind of this code to be somewhat similar to that code because you are I mean you're looking for force at the end right so how different can it be well in fact as you if you write it like you write it today it's quite different because you are using a different function you're using find if and that function that you plug into the find if does basically the extraction of the end a dot ID and the equality comparison together in one op in one predicate so they're similar in semantics these two things but they're not really similar in syntax well how can we change that and there's the transform adapter so down here what we do is we take the vector and wrap it into it into a transform that you pass in an extractor function so what the TC transform does is it returns an object first of all it doesn't do much it just generates an object that reference this is a vector and hold on to that to that function to execute and when you then iterate it's a it's a range when you iterate over that range with begin to end then the function this did mention will be on the fly executed on every one of the elements so when you're extracting your effectively extracting the IDs from the vector and on this on this extract on these extracted IDs you will then run your regular ranges fine function with four and you get the iterator back now to further your understanding of the whole thing now what is it pointing to when you're running this anyone it's pointing to it right so it's not pointing to a because basically when you ran the system transform you turned your vector of a's into a range of it's and so the iterator is now pointing to it's if you want the iterator to the ace back there is a function where you can call base on the iterator and it will actually go back it will unwrap your transform that you did and give you the original iterator maybe to remove some of the magic here is the implementation of such a transform adapter the transform function will give you back an object of type transform range and it will have iterators and these iterators contain the functor and they will contain also the underlying iterator that is iterating over your vector your original vector of ace and whenever you are calling the dereference operator it will actually execute the function on the dereference value and return that okay and that really does the unpacking of the ID and here well the base function easy enough you just return your iterator okay let's talk about a different adapter and and that transform and the filter adapter are really the the bread and butter off of using ranges they will already get you if you if you nest them they will already get you quite far in your code these are by far the most used adapters for ranges so here's a filter adapter what does it do it takes a vector again and it will filter with that predicate it will filter all the elements out of that vector where the ID equals four and it will only return these and again it's lazy so when you create this thing it doesn't do anything and when you start iterating it will look at the individual elements and decide whether to pass them on to you or whether to skip them and just just go on and give you back the next one here's the implementation you have a function that is the one that basically decides whether that that's the filter function whether you pass or not and you have an iterator and you have the end iterator why do you have the end iterator let's look at the implementation of the increment operator so what does it do it increments the it goes one further and then until if you don't hit the end and there you need the end iterator it will basically keep filtering until you find something that actually passes your filter and that's the one where the iterator is gonna stop okay so it's it's just gonna skip the elements that you don't want basically but in order for you to ensure that you don't run past the end you need that end iterator okay pretty good so now we have two pretty useful components of our range library let's see how does the TC filter of the filter of a filter look like okay let's take a look looks like this you get a huge iterator when you're using this in your code and this is actually what boost range does you're getting iterators which are one kilobyte in size if you copy them around things get terrible why is that well you have a function that's the function three here okay fine then you have an iterator well the iterator the inner iterator itself is a filter iterator so it will return contain a function and an iterator and it's again a filter well it would turn in contain a function and an iterator and the iterator and and then this guy will again return the iterator and which again looks like this and then that and so on and so you get exponential growth in your iterator size obviously that's not what we want so the idea is you have to keep your iterators small iterators are copied frequently there are there moved around in your code you can't have them one kilobyte in size obviously okay so one idea is to say okay we have this adapter object and you notice that the filter and the transform adapter objects they were all empty I just defined the iterator inside but they can't carry data so why don't we put the data that is common to all these adapters the function and the end into this adapter object and then our iterators they just reference the range the adapter object and they carry around the inner iterator this is now for the filter range and as you can see well your iterators get quite a bit smaller there is a limitation since the iterator is now pointing at the adapter object the iterators must not outlive their range object their adapter object and that's actually a requirement that is in the range TS so the standard that you will the thing that you will get in the C++ standard tells you if you pull an iterator out of a range object you must not use this iterator object once your range object is dead and this is this requirement is essential to get reasonable performance in particular to reduce the size of the iterator and that's something that we actually that they actually put into the standard once we notice this problem okay so here is now the iterator of filter or filter well you have a range of an iterator well that iterator still contains a point until its range and the iterator and it contains a range to this way up well that's not great right it's actually what range v3 does this is the state of the art of the standard committee but it is not insanely great we want to do better how can we do better well let's introduce a new concept we call it index it's kind of like an iterator except that the operations require that you pass in the range object that this is this that this iterator is off okay so and then the operations on the on the index are actually defined by convention on the range object so when you have this index range which is which is a range implemented via these index concept then you have begin index and index which is kind of like begin and end and you have an increment index that takes the index which will increment this index you have a decrement index which decrements the index and the dereference so every time you're implementing these operations you have the index object as well as the range well first of all well that's a great idea but you know the world is running on iterators so if someone comes up and say well we're gonna gonna throw away the iterators we now need this new index concept and you're gonna rewrite your code all with indices that's unlikely to fly right well um luckily the index if you have implemented this index range you can easily implement a generic iterator for index wrapper that turns that index concept back into an iterator concept and so whenever you have an index range it's kind of trivial to implement iterators for them you it's boilerplate you can do it automatically um so you have iterator for index it just has a pointer to the range and it stores the index type of that range and if you have something like an increment operator it just calls the range with increment index of that index okay so easy enough um so that's not a problem whenever you're we are now doing index ranges we you can use them with iterators no problem okay so how does that help us to solve our problem here's an example of a filter range implemented using this concept so you have the filter range with a function the filter function and a reference to the base range you don't have iterate you don't store directly begin and iterators anymore but you could store a reference to the base range and you say okay my index type is actually the base index type there's no difference in types so it's kind of like well the filter needs the underlying vector iterator to increment but it doesn't need much else that's the essential piece of information now if you increment the index it you can ask the base because you stored it to increment your index and you do this until you had the end or until something passes your function every time for for increment for end for the reference you can always refer to the base which we stored here okay so together with this iterator for index you can now build stacks remember the filter index is no matter how large your stack is is always going to be the underlying in underlying iterator so if you have a filter of a filter of a filter of a vector the outermost filter will still have as its index the iterator iterator type of the vector and then you use our little wrapper iterator for index and now all the iterators you build on these huge stacks they're all just two pointers basically the iterator of the vector and a pointer to the range object the outermost range object okay that's quite nice let's go to another difference between what's basically proposed for standardization and what we are doing the if the adapter input who's familiar with l value versus r value okay if the adapter input is an l value container okay so it's basically a a vec here that has been has been declared elsewhere and here you are just generating a filter object on that vector with some predicate then this will obviously work but what happens if you turn this into an r value you're basically inside your filter you are creating the vector and directly passes into the filter and this is a quite quite frequent in your in code that that you want to do this kind of stuff i'm talking out of experience well the thing is it doesn't compile why doesn't it compile well the view is referencing its base range its base range or container whatever it is and in this case the vector will actually go out of scope as soon as you you go past the semicolon here and so when this is an r value you suddenly have a dangling reference certainly not a good idea and so what the range v3 library says is it doesn't compile we're not going to deal with this well the thing is there's an alternative in that library to call action filter instead of view filter and what will it will it will actually compile but what it does is that instead of generating a lazy range it will directly execute that filter operation on the underlying vector and basically take the vector filter it eagerly right away and pass out the vector the thing is i mean i'm afraid programmers are going to try or view filter doesn't work well then we use action filter oh this works that's that's great so let's use that well you suddenly pessimized your code because you really need to you it will eagerly filter that whole vector and even if you only need the first element and then throw away everything else well you you just force yourself to spend the time to filter the vector so what do we do instead yeah so it's not lazy anymore so what we are doing in our library is if the adapter is an l-value container there's just no problem the filter is going to create a view its reference of one copy shallow constants now if the adapter input is an r-value container what filter does is it creates a container it actually aggregates the r-value it moves the r-value into an internal variable an internal member and and then it's a deep copy it has deep constants it's just like a container but it's always lazy because in our mind the laziness concept and this container-ness are really orthogonal you can be a container but still be lazy and we hope that that avoids these kind of traps that you would get into when you when you follow this previous approach and at the same time it allows you to write compact code because you can you can nest all these these things the things that create the vector and the filtering and so on okay um there's one more thing that we have it's a bit stolen from the from the blue strange library they have something similar um the the more flexible algorithm returns so when you have a find usually you return an iterator to the element that you actually found uh or end if you didn't find anything sometimes it may be nice to do something like uh like this where you have so this is an extension where it gets an extra type pack that kind of lets you customize what happens when you found something or when you did not find something okay what pack actually gets is an iterator and a range uh and there is this special thing pack singleton which says I didn't find anything what shall I do uh and that is only past the range and the standard implementation would look like this uh the the regular pack just returns the iterator the pack singleton returns the end of the range okay so what you now can do is document for example in your code if you don't expect the find to ever fail if you know that something is or that what you what you are looking for is in the range then the uh then you can actually document I'm not expecting n to be ever returned and that's that usually requires this extra assert uh and and it's kind of lengthy to write but here you can simply say okay I'm gonna declare this should actually return something you can do more uh you can say hey um return me everything that is before the thing that I was looking for return the head okay so this will do something like it takes to take is is um generating a range that goes from from begin to the iterator that you passed in okay so it will basically up to the point where you where you found something it will give you a range of values and yeah we still have this the third false we still expect something to find something okay um let me get to a generalization of ranges so far ranges we're always using iterators in our mind that doesn't need to be the case sometimes you have some code like this where you are traversing widgets and you pass in a function uh that using essentially the big old uh visitor pattern where every every widget that you have gets passed in to this function so here you you may have a nesting traversal where you pass in the function by reference and otherwise the function gets called with every single element that you have and it's a bit like a range except that well you you iterate in kind of a different way there are no iterators and but still it might make sense to write something like this you say okay uh did my mouse hit anything well the first thing is kind of a range you pass in a function and it will just reverse the widgets and this thing is a little bit like the test function of a normal any off where you say okay get me a widget and I'm just going to check whether the mouse is when whether that widget got hit by the mouse okay so it's this is very range like although what you're what you're iterating over is not an iterator based range so how can we fold these concepts together what we're really doing here is replacing or integrating uh two concepts of iteration and I want to want to point them out to you um there is something called external iteration that's basic computer science um the the consumer that's consuming the data calls the producer to get the new element this is what we are used to with iterators so you are consumer sitting down here and whenever you're saying I don't want another element I say start it and it produces an element and returns it to the consumer and then I may say plus plus it and then again so I start it and I go into the producer and produce an element and it goes back to the consumer so the consumer is at the bottom of the stack this is how the stack grows and the producer is at the top of the stack and whenever you want an element you call up into a function and the functions come back with a new element um you can turn the whole thing around see do I have it internal iteration right so first of all uh the advantages and disadvantages of external iteration the consumer as I said is at the bottom of the stack and you can write contiguous code for this consumer you can do any kind of logic uh and you you have one contiguous code path and whenever you want an element you say give me an element give me an element give me an element that's easier to write obviously um and it also has better performance um because for for the consumer because the state in which the consumer is currently in is encoded in your program flow you don't have to restore the state you don't have you don't get called at one point and say well where why or where am I what what which state am I in you are in the state that you are while you're executing your program and you have no limit for stack memory whenever you need memory you just can get it get as much stack memory as you want you can recurse what do whatever you like uh there's no limit now the producer is in a more difficult put the situation it doesn't have uh the contiguous code path for the whole sequence it only has a contiguous code path to generate one single item and every time it gets called again for the next item it has to restore its state and decide where am I for example in the uh in the tree that I am iterating over or so um that makes it a bit harder to write and it also makes the performance a little bit worse uh you only have a single entry point so you kind of have this dynamic dispatch at that single entry point where I'm going to continue with in my code flow and um there is basically when you when you want to carry around state for one part of the form from producing one element to producing the next element so for one call to the next call the only place you really have you can really can do this is inside your iterator so inside your iterator you only have limited space you can't use arbitrary lots of of stack space that gets carried between any any iterator calls uh or you have to go to the heap and allocate the memory there but that's certainly not very efficient contrast that with internal iteration so the here the producer calls the consumer with and uh to with with a new element this is what we saw with the traverse widgets so um here the widgets are being traversed and whenever you are uh you whenever the producer has a new element it will consume call the consumer so it really turns things upside down the producer is again at the bottom of the stack and being at the bottom of the stack is great as all the advantages that I already talked about the consumer is now at the top and it has all the problems that the consumer would have if it's being at the top just all the problems of being at the top of the stack now how can we integrate these two well it would be nice to have both right that both are actually at the bottom of the stack and yes you can do this um with coroutines these are really what coroutines are all about you uh whenever you are you are hitting something that you want to pass on to your to your consumer you say yield and the other guy was waiting in its control flow and picks up the item and and quite a few programming languages already have that uh c plus person doesn't have it yet uh but there are actually proposals to do that um there are basically two ways to do it one is stackful you have in both have in an arbitrary amount of stack they're usually implemented as operating system fibers and that's very expensive so if you want to write a tight loop this is not going to be feasible this is not going to be efficient because every time you are basically yielding to your other fiber um you have to restore its state you have to switch stack and and that's that's expensive um every fiber is going to take one megabyte usually um on windows 32 I think of virtual memory uh because you for for this core routine so it's not nothing that you're going to do to iterate over a bunch of integers um the second alternative is uh our stackless core routines and because of the performance benefits that there is actually a proposal there's no proposal for stackful uh stackful core routines but there you can only yield in the topmost function they kind of go around this problem of having a limited stack space by saying well whenever you are yielding I I know that I will analyze the amount of stack that I have to allocate um for that core routine by yielding only in the topmost function and but that limits uh quite a bit what you can do because if you um one reason that you want this kind of thing is that you are going into uh that you are that you are recursing and they are naturally uh you you want to yield inside these recursive functions so and it's also still a bit expensive because um every time you yield to the other to the other uh other other fiber um you have to find your resume point so you kind of gonna have something like a dynamic jump kind of like a virtual function call every time you're doing it um again if you're if you are in a very tight loop and you want to aggressively inline your loops and aggressively optimize the code that's not something you want to use okay uh but it turns out internal iteration is quite quite often is good enough for many algorithms uh it's like like here find or binary search uh we'll find you want an iterator out so it's going to be difficult because with internal iteration you don't have have any iterators but for each that just works okay and most of the time what you're doing with rangers is for each you can accumulate you could do all of any of none of all these things they all work with internal iteration and there's basically no reason why your range library shouldn't support these algorithms that the regular library supporting with iterators why it it should not support this with internal iteration and our library does that the adapters i talked about the filter and the transform also they actually are implementable with internal iteration basically when you're filtering you are being called with a new element and if you don't like that new element you simply return wait for the next one to come um with a transform you just pick up the element transform it and pass it on so that's easy to implement also with internal iteration so we allow ranges that support only internal iteration and then the any off implementation for example looks like this so you get a range and again this range doesn't have any iterators okay uh you you have this helper function enumerate that basically takes the range and hides the fact whether that range has iterators or not if it has iterators it will iterate using iterators if it doesn't have any iterators it will call this this this for each function inside the range which will pass out all the elements and then you have this function here that you are passing into this enumerate and it will actually do the work of the any off um just ordering the results now is that all good well not quite there's something missing regular any off is lazy right it will stop as soon as it decided that it's true so how do we do that hmm first attempt was ah let's throw an exception right whenever you are you're true you throw an exception well that's not a good idea it's too slow throwing exceptions is expensive is not meant to be for regular control flow okay so second idea was a simple enum so what we say in our library is when you are when you're your your filter function here returns an enum of that special type break or continue he wants to tell you something he wants to tell you hey either continue or break the nice thing about returning this special type is you can actually check at compile time to eliminate this break check if the funk a refund returns break or continue then you have to do the check and you have to break when break is returned but if the return returns anything else there's nothing to check you know he's going to continue okay he doesn't try to tell you anything so you can just loop like you ever before and you don't have the check now um actually it's interesting that this concept is practical for things other than places where you need internal iteration for example when you want to concat uh to heterogeneous containers so you have a list and you have a vector and you want to append the list the vector to the list okay so the way you write it in our program is like this concat list back and here you are now um getting the the contents of both well usually when you want to write this with indices you would have to do something like a concat range that incorporates these two ranges and it also has to store an index that is either of the type of one range or of the type of the other range so you first have an iterator that iterates over the first range and once hits the end it will switch over to the second range and iterate through that one so that that index has to be either of that kind of iterator or that kind of iterator either of iterator of vectors or of iterator of lists in our case the thing is that an increment index then is quite complicated you basically have to switch on that variant if the variant is of one type you have to increment it for the first range and check whether you hit the end and if you hit the end you have to reassign that index with the begin of the second range so you have to kind of do the skip over and concatenate the two together and you have to do this every time you're incrementing your index you have quite a few checks that you have to do and it would be nice to avoid them uh dereference actually is similar here's also the switch on the index and and again you have a branch with every every time you are actually dereferencing your iterator hmm well with generator ranges you can actually do this very efficiently i mean that's that's pretty obvious uh in our case these operator parentheses here is um the the operator that enumerates the elements so that concat range on top of having this iterator functionality which it also has if you want to use it it for efficiency uh this time it actually has that generator interface this this internal iteration interface that will just plug the elements into this functional object and it does that by again calling the internal iteration of these two ranges that incorporates one and then and then the other and there you don't need any checks for for end it's very efficient and so so algorithms that are actually capable of dealing with internal iteration like this any of would actually use this form of iterating over ranges um because it's because it's more efficient all right uh that was it thank you very much we do have that range library public um on github if you want to play with it this is the url you also find it on our website and to wrap up i want to say this i hate the range-based for loop it's forbidden at think-cell why because instead people then write this the good old for loop instead of using algorithms and writing it nice and compactly like this so get away from the range-based for loop i don't know why they got this thing in there thank you very much okay thank you or no so we have some time for questions so raise your hands and i will run to you so hi i think that since your library is seems to be quite a bit more powerful and better than the boost version or the you know standardization version is your company involved in standardization efforts to push that upstream into sql well we are we are actually the the sponsors of the c++ committee in germany uh because there was no one else i mean siemens didn't want to do it so we did it um so we are sponsoring the participation of the germans and the c++ standard committee we didn't push this as a standardization effort why well if you have ever been to a standardization committee meeting it is a very political and very long-winded process and um so far we've been we spent our time rather on improving the code then then pushing it into standardization so it's it's simply a matter of of spending the time making the effort and certainly what what's going to come out of the current implementation or the the current standardization effort the ranges is not bad and in particular it doesn't do anything that would preclude later improvement so that's that's basically what we did as a gatekeeper this was one this one thing with the lifetime of iterators and ranges i mean if that would have been voted the other way around we say okay you can keep using your iterators even if your range is gone um then basically the the door would have been slammed shut to ever make something that actually works you you would have been in a in a dead end and and that we actually prevented so so that was it's kind of like the scope of our effort um other than that i'd rather write code than doing political work i'm sorry any more questions none okay then big thanks to arno again thank you very much and um there is actually if people haven't noticed there's ice cream outside and i'm gonna be in the um near our booth for the next half hour and and yes we are hiring thank you very much