issue with init variable when calling 'newSong'

Hello, thanks a lot for this great library, actually used to end up my clock, that's playing nice alarm songs.
I was reducing the code size and I found some tiny bugs, in the function newSong(const char *p), when looking for flat and sharp, the both arrays arent properly initialized. If the new song doesnt have global flat or sharp, the last settings will be held. The arrays should be initialized at the begining of the function. Same about the name of the song. Something like this :
MusicWithoutDelay& MusicWithoutDelay::newSong(const char *p)
{
  default_dur     = 1;  //equivalent to a wholenote
  default_oct     = 4;
  bpm             = 100;
  wholenote       = (60 * 1000L / bpm) * 4;

  playSingleNote  = false;
  start           = true;
  mySong          = p;
  loc             = 0;
  memset(songName, 0, SONG_NAME_LENGTH);
  memset(autoFlat, 0, 5);
  memset(autoSharp, 0, 5);
  slurCount = 0;

  // get the name
  if (pgm_read_byte_near(mySong) != ':')
  {
    ...
Also, but this is not a bug, some parts of the code could be easily optimized, especially when reading a new note, a large part of the code is duplicated for the reversed reading, we could save more than 500 bytes that way ;)

Thank you for joining my little hobby project. I thought it was a lost cause, but at least you're having fun. Some stuff I wanted to do was the ability to read midi files and play them; but I decided to just turn the Arduino into a synth engine(so I would send midi data to the rx and tx lines)
Hmm. Interesting. I forgot about memsetting the flats and sharps.  However, I thought the name would be renamed properly.
Also, reversing is something I was not able to make efficient.  I got stuck a year ago because when you read integers backwards, building a number from chars is different than reading it forward.

Really your library is the best I found. I just found it 1 second before to write my own one, you saved a lot off precious time for me. The ability to read midi will probably tickle me one day, actually I need the RTTL for my clock project ;-) I made a fork where I did some modifications in the MusicWithoutDelay& MusicWithoutDelay::update() function. I made 2 new private functions to manage this part, and when reading in reverse, I just make the loc increment pointer to jump at the begining of the note, so we will read it easy. I maybe found a better way to read flat and sharp too, this is working fine and it allows a global sharp to be depreciated if we add a flat to the note. Actually I saved more than 2kB, we never have enough on our tiny MCU :-P I m writting a little sketch to show a RTTL song like a ppartition, this is helpful to find mistake when writing a RRTL string. I will publish it soon, feel free to add it in your library examples if you like it.

Ah LOL, I m too much tired, I didnt see you already looked at the fork, since you did, I came back to the v3.5 but this part about reversing is very close. Also, since yesterday I finished to rewrite the reverse part. I also made some change for the wave table ;)

Wow thank you for your contributions.  I can't wait to see my little baby running on lite memory.
The only difference in v4.0.0 is the global synthEngine and the mixture of midi instruments with MusicWithoutDelay objects.
Glad, your enjoying your journey in c++ and memory management.
Also, get a teensy 3. You will be amazed at the number of midi instruments this baby can run at.

hehe yes, teensy 3 is making me drooling, especially for the FFT spectrum analyser I made, I could reach a sampling of 16kHz when Nano hardly reach 6kHz. But that s great fun to work with limited features, to push them at the limits, and nano is under 3€ :-D
About the change I made, 2 are a bit destructive:

the noisy wave table is reduced to 3/4 and repeated, but not in a linear form, so the effect is good.
the Envelopes are reduced by 4 times too, I didnt noticed real difference, but maybe it is better to keep them with full definition...

Some issues i got from your fork:

flats/sharps are wrong

I tried one of my examples: Zelda_New_version
And I hear one of the flats/sharps are wrong.  Perhaps something is off?

The other voices are not playing in sync

I tried my Spider_Dance_Undertale program and the Arduino only plays the melody while the other instruments are only played at the beginning and then drop out later on.  Strange...

I see you changed a lot of files including _skipSolver() so it may take a while for me to crack this bug; skipSolver() was the hardest feature for me to figure out since Arduino runs in a single thread without delay.
Anyway, if you need help, I'll be here.  And if you have any questions on how the SynthEngine works, I'll be more than happy to explain it. (TBH, it took me around 4 months to build the engine and add support for multiple boards)
Have fun  :)

Also, you probably know this, but I'll say it here anyways for others:
Replace the examples' dependencies from
#include <NoodleSynth.h>
synthEngine mixer(20E3);

to
#include <MusicWithoutDelay.h>

And in Arduino's list of libraries, delete my NoodleSynth so that it won't conflict with your fork.

Hello hello ;)
I changed the name only for skipSolver() to _skipSolver() just to be neat, like this is a private function, but nothing (yet?) in it ;)
I will check further for the flat/sharp, I have to give a try with the Zelda song. The tool to print the partition is almost done, this will help to debug.
I've to check this issue about synch, but right now I am ppuzzled. I only rewrote how to read note. However I got something strange sometimes, when burning the sketch into the MCU, I sometimes had this issue which has disappeared when I burn it again. Something like the IDE had an issue and I had to restart IDE to have cleen index? I will check further ;)
Glad to know about to replace the dependencies, maybe a setting with a #define could be useful to select? Anyway, soon I fixed these issues, I will look further for your Engine, no doubt :-)

Kinda fun, about Zelda and the #, like you defined the sketch we can only have 5 global sharp notes, and so, the e# never exist, neither the b#. The abusive notation of a b# to play a c is the issue. In your global settings for Zelda, you have f=aeb..., We could consider to play a b# like a c, but in this case, we must change autoSharp[5]; into autoSharp[7]; and I guess to modify the code, it never played a b# ;-)
However, like this notation is abusive, I think the code shouldnt be changed. If we have to check for each mistake or abusive notation, the code size will increase for nothing.

I gave a try to Spider Dance, it looks to play fine with the current modifications.
However I m still working on the code, I rewrote _skipSolver(); and skipTo();, I am checking further for pointer issues, but I m going to publish the actual code if you want to check it ;)

Yeah, I'm interested. I'll post a audio clip later today about the spider dance. Mine sounds different than your fork.  It's a small difference as soon as skipto(0) is called.  I'll check your skipto() function.

Also, in music I recall an a# is the same as b_.  This happens sometimes in a music sheet when the author wants to pull another note that doesn't follow the typical major or minor scale.
So forcing a a# in a scale with only a a_ is user friendly to the programmer and the musician.  At least, that's what I think.

Zelda looks to work fine as well, checking further I added the abusive notation about b# and c_ to work.

still a minor issue with skipTo, looks like the pointer is going back into the header, I m working on

Take your time, we only got our whole lives :) .  Also, are you in college by any chance?  I'm only 20 right now.  Are you interested in Electrical engineering, computer engineering, or computer science. Basically, what do you want to do in life? 😅
I don't know where I wanna go.  I mean I've done some software stuff, but I haven't made any money with it.
P. S.
Making money with Arduino is a waste of time and near impossible.

corrected a silly bug in skipTo where I used the pointer loc when skipCount must be used

I m not hurry but passionate, programing is a very exciting mind game :-P. I like also good to electric stuff, than computer, or to split apart my motorbike motor on the kitchen desk (GF doesnt LOL) Upon that I m an old 'monkey' and I m looking for fun and pleasant people, far away any kind of work (I feel work like slavery). Right, making money is not easy, especially with every kind of thing that can be copied. The reason why, I sommetimes do things under GNU license, and sometimes it will stay commercial. What I noted, many people will consider your work, depending of the price you will sell it.  A marvel you would sell for cheap, nobody will want it.
A good way to earn some money is to make scripts in some games like Second Life, cause they are protected and good scripters are rare there ;-)

take a look into my fork, at 'example/tools', this is not finished but already working, download the both files...

Sorry it took long to respond, I was working on Home Automation at my church.  I couldn't wait to try out your code.
What I noted, many people will consider your work

I'll make sure to add your name in the contributions at the top of the ReadMe file. 😄
you can sell a piece of shit if the price is 1000$. A marvel you would sell for cheap, nobody will want it

Finally, someone I can relate to.  Most Arduino programmers are noobs who don't know how to program.  But once I saw your code, I realized I can relate to you.  I love to program as a passion; like this project.  But to get a job is to show off our open-source projects.  It's a tough world out there, so thank you for posting this :)
take a look into my fork, at 'example/tools', this is not finished but already working, download the both files...

Oh my.  I tried your example and it sounds amazing and so musical ❤ .  This is better than I could even write.  Your coding skills are very professional and readable.  I especially like the first song: M Jarre - Lara's theme.  I'll definitely try porting this over to mine.
I also can't believe you made an RTTL to music sheet converter, otherwise known as a "partition".  😃
That must have taken a while.  👍
However.............I did notice a few things off:

The  spider Dance's first instrument drops out.  Actually, I am only able to hear two voices.  So is the library stuck somewhere after two MusicWithoutDelay objects?
Playing the music backward is off by a few milliseconds.  But to be honest, you can get rid of that function.  Playing music in reverse isn't really popular anyway.  This can save us a lot of code too.

Other than that, I'd say your fork is perfect. Good job 👍

Welcome back, I just woke up here :D, thank you for these nice comments, I m glad you appreciated, this is one of the meaning too, when sharing code, to know this can be useful and people will get fun with it ;)
Your library is great, see how it sounds just coding some traditional music sheet! At one moment I was wondering to use a MP3 player for my clock but finaly, I will use RTTL, pure coding project is funiest hehe.
I am still cleaning the code, trying to remove some unused part or declaration... Reverse is interesting and it will work, be sure, I am stubborn hehe, and the last issues now are just tiny bugs about pointers.
I am still wondering why, I didnt get the reason, during the update(), before and after reading the note letter, you have if (!skip)... and then to read for duration and twice time for a dot?
When the basic will work I will look further for issues like with Spider dance, and I will have a question for you, is there a possibility to make a function autoPlay(), a possibility for the timer interupt to call an update when the note is played and done?

Reverse is interesting and it will work, be sure, I am stubborn hehe

Oh, that gives me future headaches 😄
Also, there is a really cool effect to make a reverse sound effect.  Call instrument.overrideSustain(true)  and then instrument.setSustain(REV_SUSTAIN)  ;)
I am still wondering why, I didnt get the reason, during the update(), before and after reading the note letter, you have if (!skip)... and then to read for duration and twice time for a dot?

I must have been very deep in my code.  I was in God mode 😄 .  I kinda forgot, but I remember it helped prevent overlapping of notes.  For instance,
instrument 1:          a                    b                    c
instrument 2:          a          b                              c
skipTo(5) :                              *

If we skip to time location "5 seconds", the if(!skip) will purposely skip notes to make both instruments start with the note closest from the left of the time location.  So, at time "5", the Arduino will set instrument 1 to note "a" and will set instrument 2 to note b.  This is extremely complicated because we are dealing with a microcontroller who can't do processes in parallel.  So I basically...made is done in series 😓.  But it's fun.  TBH, I forgot exactly how skipTo works, but I remember parts of it.
is there a possibility to make a function autoPlay(), a possibility for the timer interupt to call an update when the note is played and done?

You can poll instrument.isEnd() in loop() and then if you want to play a song once or three times call, instrument.play(1) or instrument.play(3)  Interrupts aren't possible(I think), because timer 2 is used for sound, and timer 1 for manipulating that sound with wavetables.
This is also a good way to introduce to C++ and programation, so, we cannot complain about newbies hehe, we all have been newbie

Yeah, my first project was blinking an LED ;P.  My almost complex project was this library's synth engine and skipTo() function.  You probably know why 😄.  This project taught me about memory management and pointers...and mixing audio...and GitHub.

ah yes, I was just wondering how to synch 2 instruments after a skipTo()... now this have a meaning, actually it will start at a full note, I ve to preserve your idea.
Life would be boring if we couldnt learn or progress hehe.
about an autoPlay I mean without to call an update for sure. Interrupt are busy, like you said, but synth is using one to manage a note, maybe here, we could check when it could call a next update? This will be very powerful to play a music that way, I think this should be a very great add on at your library

now this have a meaning, actually it will start at a full note

I believe skipSolver() figures out the amount of time left to play the "leftover" note. That part was hard too; too much math in my head. In my code, go to Zelda and go in the serial monitor.  Then try pausing, reversing/forwarding, and skipping with brute force; I guarantee you it will stay in sync 😄
;)

but synth is using one to manage a note, maybe here, we could check when it could call a next update?.......This will be very powerful to play a music that way, I think this should be a very great add on at your library

Hmm, I'll research this.  Seems interesting 👀

yes, that s it, skipSolver() will send the duration for a note pointed by skipCount
skipTo() will first count time to reach the nearest note for the time we want.
I guess, soon we found the note and set the pointer loc to the concerned note, we have to manage millis() to keep the synch and to play only a part of the note duration

hello, may you try this?....
I noticed sluring notes werent really sluring and most of times, we have tiny horrible 'clack' between notes with no sustain. I did a try to 'round' lightly the end of notes with no sustain. It s giving nice sluring and reducing 'clacks', beat is preserved but the whole feeling is smoother.
If you could try it and to tell me your opinion? Changes are into synth.cpp. I changed this in the Volume envelope generator part :
        case NONE:
          value  = (value * -1) + volume[divider];
          value += (((unsigned char*) & (EPCW[divider] += EFTW[divider]))[1]);
          break;

into
        case NONE:
          // even monotone note must be lightly rounded (prevent 'clacks')
          if (((unsigned)value) > 24)   // sounds like best results from 16~32
          {
            value  = (value * -1) + volume[divider];
            value += (((unsigned char*) & (EPCW[divider] += EFTW[divider]))[1]);
          }
          break;

The Sustain NONE should have no rounding because its supposed to sound like a buzzer with no volume decreasing/increasing over time.  For slurring, you are right; I need to add a new case 'SLUR': that will handle slurring.   Actually, a year ago, I didn't know how to slur.  A slur is simply the volume is carried through multiple notes.  So for instance,
a+b+c, d

the instrument will start loudly at a and then decrease volume throughout b and c.  And then at d is triggers at full volume.
Volume is also a tough subject in Audio ;)
So NONE should be the same as in the master branch, and I need to figure out SLUR next.

It s going to work fine but I detected a bug when using pause. Sometimes a track will stop to play, I suspect an issue with a timer value, probably a > when a >= would match, I m looking for.

I'm not sure.  I never have issues with pause().  Could you give an example sketch for testing it?

Another question, Envelope2 is really making sound volume low, may you quickly explain to me how the envelope is working?

Because the attack of the note is halfway.  So the volume doesn't have enough time to reach there.  I personally like ENEVELOPE0 and ENEVELOPE1.  Envelopes are what basically allow us to control volume over a time without using another Timer.  It's basically a hack I learned from dzloine
I like these questions. It makes me think about my masterpiece a year ago:)

arggg, found a deadly bug with envelopes
{
  switch (env)
  {
    case 1:
      envs[voice] = (unsigned int)Env0;
      break;
    case 2:
      envs[voice] = (unsigned int)Env1;
      break;
    case 3:
      envs[voice] = (unsigned int)Env2;
      break;
    case 4:
      envs[voice] = (unsigned int)Env3;
      break;
    default:
      envs[voice] = (unsigned int)Env0;
      break;
  }
}```
case  will never happen, the code should be:
```void synth::setEnvelope(uint8_t voice, uint8_t env)
{
  switch (env)
  {
    case 0:
      envs[voice] = (unsigned int)Env0;
      break;
    case 1:
      envs[voice] = (unsigned int)Env1;
      break;
    case 2:
      envs[voice] = (unsigned int)Env2;
      break;
    case 3:
      envs[voice] = (unsigned int)Env3;
      break;
    default:
      envs[voice] = (unsigned int)Env0;
      break;
  }
}```

Lol, silly mistake. Thx

The Sustain NONE should have no rounding because its supposed to sound like a buzzer with no volume decreasing/increasing over time. For slurring, you are right; I need to add a new case 'SLUR': that will handle slurring. Actually, a year ago, I didn't know how to slur. A slur is simply the volume is carried through multiple notes.

mmm I think you are right, I will add the slurring I made, we can always modify it later, so NONE will not change. The slurring is only used by the update actually ;)

I just made an update (for the sketch to writ music sheet as well), it should be close now, I removed unused variable and also redefined many they were too big (many just needed 8 bit) also removed all float variable and constant.
I gave a try to envelopes, modifying just the first 1/4, so the volume is similar for all envelopes. I guess this could be a deal because it is balanced between envelope effect and what we can hear...

found an easy way to make slur, I changed this:
  int set = 0;
  if      (duration >= 1000)  set = 105;
  else if (duration >=  400)  set = 87;
  else if (duration >   300)  set = 82;
  else if (duration >   250)  set = 78;
  else if (duration >   200)  set = 73;
  else                        set = 55;
  edgar.setLength(myInstrument, set);

...

  if (!sustainControl)  // user did not define sustain, we are free to use it
  {
    if (pgm_read_byte_near(mySong + loc) == '+')  // a slur note, "+"
    {
      setSustain(NONE);
    }
    else              // a ',' or NOTHING for the last note of the song
    {
      setSustain(SUSTAIN);
    }
  }

into
  if      (duration >= 1000)  noteDur = 105;
  else if (duration >=  400)  noteDur = 87;
  else if (duration >=  300)  noteDur = 82;
  else if (duration >=  250)  noteDur = 78;
  else if (duration >=  200)  noteDur = 73;
  else                        noteDur = 55;

...

  if (!sustainControl)  // user did not define sustain, we are free to use it
  {
    if (pgm_read_byte_near(mySong + loc) == '+')  // a slur note, "+"
    {
      noteDur += 10;
      setSustain(NONE);
    }
    else              // a ',' or NOTHING for the last note of the song
    {
      setSustain(SUSTAIN);
    }
  }
  edgar.setLength(myInstrument, noteDur);

seems to work fine.
I also normalized wave shape so now, sine, triangle... all are the same volume and sound louder.
I will publish an update soon, right now for fun, I am trying to make an autoPlay function...

I tried your code now, and I can hear "clicks".  I liked how it sounded before.  Perhaps the full range envelopes and sine waves were necessary?  And yeah, pause() is broken.  Hmm, bugs ;)

the clicks come when a note is short and so, the rough cut will does this. We can hear them 'louder' now, just because the sound level is louder. With long notes it wont happen, the reason is, envelope is reaching the end and sound is lower. The issue is, we always had these ugly clicks and this can be solved only making an algorythm to lower down the sound level just before the note will be cut. When done, the synthetiser will make a good job ;)
The sine wave has exactly the same definition than the org code, I took care of this important point. The envelope are less precise, but we shouldnt do a difference at this point.
When normalizing sound level, I took care sound wont be satured and I adjusted each waves to give the same apparent level. If sound was satured, it would happen at the begining of the note, but it doesnt, that is well at the end of the note, this endless 'clik' issue ;)

yeha!!! good news, I made an autoPlay, with just few lines of code, the feeling is amazing. When running the 'partition' sketch, it will play the song without a break, while printing the music sheet! awesome

Sounds awesome man. Can't wait to hear it.

found a way to get ride from click. This is a common issue with most of synth, and it happens when especially with bass and with the sine wave. There are few solutions, one is to increase the wave frequency, the other one is to synch the note with the wave.
To synch will be to commplicated and to increase wave frequency like impossible. So I tried this: to generate a wave twice faster, so we re loosing precision on the sine wave itself, but the result is : hightly reduced clicks and envelope definition very much better.
It works! LOL
However, I m stepping a bit more away from the original library now :S

I saw something a bit boring... in casual definition of RTTL, when we have a not like "a6" it means octave 6. With your library, it means default octave + 6. I feel your way smarter, cause we can easy level up the whole song to 1 or more octave.
However the compatibility isnt preserved. I was thinking... if we defined default octave to zero, it could be interesting :

if we dont define default octave in the header, so the RTTL will be compatinble (0 + 6)
if we define default octave, it will become (x + 6)
that way we could play casual RTTL strings, and when we want octave to increment from default, so we will define the default octave in the header.

Sounds like a good idea

OK, adding a double wave form is really impressive, it sounds like we are sampling at 40kHz, especially with envelopes, and particulary with the delicate sine wave. I coded it, and at the begining of the file, I added the possibility to choose  double wave or not.
However some few clicks are always here but...
I figured this, if I use create a first intance, a voice I will never use, the 2 next instances I am using to play a song wont have cliks!!! so now, it seems an issue with the synth itself. Can you help me to check for a solution?
To reproduce what I got:

play song the entretainer with sine wave and envelope 0
play it once with envelope 0 (it will clik)
play it once with envelope 1 (it wont click)
then modify the table.h file, toggle envelope 0 and 1
play again the song, and now, you can figure, envelope 1 will click and envelope 0 wont

adding a first voice instance will reduce this issue.

I believe the problem is the way Rttl is made.  You see, Rttl expects to run only on one instrument with no sustain.  Sustain causes one instrument to be occupied but when another note is called, then the instrument will stop playing and play the next note(which causes clicks).  The solution is to use another voice when the current instrument is occupied. This is easier to solve in MIDI because we have all instruments in one char array with multiple voices "ready" to play.
If you look at my midi example, you can get an understanding on how I use multiple voices to avoid stopping the current instrument from playing.

I think something is broken in your new synth file, now you are using a numVoice++; beside the function edgar.setNumVoices(); you cannot anymore to create an object without to define the song, it will mess up voices order.
Also in the interrup, here:

  //************************************************
  //  Modulation engine
  //************************************************
  FTW[divider] = PITCH[divider] + (int)   (((PITCH[divider]/64)*(EPCW[divider]/64)) /128)*MOD[divider];
  FTW[divider] = PITCH[divider] + (int)   (((PITCH[divider]>>6)*(EPCW[divider]>>6))/128)*MOD[divider];
tim++;

the two line to assign a value in  FTW[divider] are useless, both are doing the same thing and could be replaced by even better one  :
FTW[divider] = PITCH[divider] + (int)(((PITCH[divider] >> 6) * (EPCW[divider] >> 6)) >> 7) * MOD[divider];
also tim is not used anymore ;)

I see what you re explaining about Sustain and notes, but I doubt this would explain why, if I add two voices without to use them, to be neat :
this wont make clicks  :
MusicWithoutDelay track0a; // track we never use
MusicWithoutDelay track0b; // track we never use
MusicWithoutDelay track1;
MusicWithoutDelay track2;

this will make clicks  :
MusicWithoutDelay track1;
MusicWithoutDelay track2;
// MusicWithoutDelay track0a; // track we never use
// MusicWithoutDelay track0b; // track we never use

OK!!! I found the bug, a real big one ;) The issue is well from the synth

org code is :

  divider++;
  if (divider >= numVoice)
  {
    divider = 0;
    divider = -1;
    //tik     = 1;
    return;
  }

....

    uint8_t sample[2] = {127, 127};   // set values for channel A and B to middle of wave
    for (uint8_t i = 0; i < numVoice; i++)  // connect the voices that share the same output pin
    {
      sample[stereoMode[i]] += (_getWaveValue(i, ((byte*)&(PCW[i] += FTW[i]))[1]) * AMP[i]) >> 9;
    }
    mOCR2A = sample[0];               // play the wave to corresponding PWM pins
    mOCR2B = sample[1];
    asm("NOP;NOP");   // Fine tuning

when it should be :
  divider++;
  if (divider >= maxVOICES)
  {
    divider = -1;
    return;
  }

...

    uint8_t sample[2] = {127, 127};   // set values for channel A and B to middle of wave
    if (divider < maxVOICES)
    {
      for (uint8_t i = 0; i < numVoice; i++)  // connect the voices that share the same output pin
      {
        sample[stereoMode[i]] += (_getWaveValue(i, ((byte*)&(PCW[i] += FTW[i]))[1]) * AMP[i]) >> 9;
      }
    }
    mOCR2A = sample[0];               // play the wave to corresponding PWM pins
    mOCR2B = sample[1];
    asm("NOP;NOP");                   // Fine tuning

Now, no more clicks and also, more important, the pitch will never increase again when adding voices!!!

OK I found the begining of a solution, there is something wrong in the code.

This version will change the pitch when we re adding new voices :

//*********************************************************************
//  Timer interuption
//*********************************************************************
SIGNAL(TIMER1_COMPB_vect)
{
  divider++;
  if (divider >= numVoice)
  {
    divider = -1;
    return;
  }

When this one keeps same pitch what amount of voices we have, also, reducing clicks :

  divider++;
  if (divider >= maxVOICES)
  {
    divider = -1;
    return;
  }

if (divider >= maxVOICES)

I don't think that is a good idea because when a user wants to play 2 voices instead of the default settings of 5 voices, the user will get lag.  But I guess it doesn't matter when the user can change maxVoice settings directly.
But what happens when maxVoice is 1?  Won't there still be clipping?

The return is there to immediately bring the engine to the next voice.  We don't want "dead air".

well if you keep if (divider >= numVoice) that way, the synth wont play good, like I said, it is cheating with cycle and every new voice we are adding will change the envelope of the sound. So code must be rewrote to take care of voice amount.

the return is totally useful and it s providing exactly a "dead air", one sampling with nothing to happen. It should be this :

  divider++;
  //if (divider >= numVoice)
  if (divider >= maxVOICES)
  {
    divider = 0;
  }

Now I can figure, maybe the coder who made the synth added a "dead sample" to reduce click ;)

Yea, I even wonder how this piece works:
//************************************************
  //  Modulation engine
  //************************************************
  FTW[divider] = PITCH[divider] + (int)(((PITCH[divider] >> 6) * (EPCW[divider] >> 6)) >> 7) * MOD[divider];

I got it from Dzloine, but I have no clue what it does.  But I went along with it and experimented.  But at least I have friends who can help me crack the code.  Alright, I'll go with your idea with getting rid of the return statement.
 The main issue is maxVoices, really, this will be hard to make the synth to work with something else 4.
To give you an idea, the length, the pitch, the envelope, everything depend of this 5 times cycle. Also, I guess, computing a voice at each of the first 4 cycle, we must take care it will stay in the sampling interval. Computing voices one afetr the other is not purely accurate, but like we re sending notes to the synth one after the other, that works! see all things here are precise like a clock.
Dont put you down!!! You did great job with volume and sustain!!! A nice add on. And to make the synth compatible with other boards too!
You main sketch to drive the synth is also a very interesting job. There are few mibor bugs here and there and I am sure, if you had time to spend on it, you could make it perfect. You already did the hardest job!!!
When I m coding I always do 3 steps :

coding roughly the full project
looking for bugs
optimizing the code (faster and shorter)

Be sure the work you already did is helping me a lot, and I also learned with your code. We all have our way to make things, and that s always interesting to see how this one or this other one solved a problem.
 You are always welcoming people and LOL, I wasnt always nice, many people wouldnt even talk about their code or what could be done.
I am sometimes a bit 'rough', especially after I spent hours to find a bug hehe, or like these days where I have strong tooth ache :P

I will continue and try to improove it the way I need it, maybe a bit different but close to yours, so you will be able to add the autoPlay and more to your code, even the example to write music sheet. I will also try to make 2 more envelope, we are missing ones sounding like guitar or horn. Actually I noted these settings :
   Instrument         Wave Shape    Envelope
   - [organ]          SINE          0
   - [piano]          TRIANGLE      3
   - [harpsichord]    SQUARE        0
   - [trumpet]        RAMP/SAW      2
   - [clarinet]       SQUARE        1
   - [flute]          TRIANGLE      1

I contacted you times ago, with a comment about one of your videos

lol, I don't remember...

Dont put you down!!!

Don't worry.  I'm a slow-to-anger kind of guy.  I find using sarcasm is wiser 😄 .  And thank you for your kind words.  Really, I'm just happy that someone other than me is learning from my code.  It warms my heart.

You already did the hardest job!!!

hehe, idk.  Optimizing my code down 3-4 kilobytes is more impressive.

I have strong tooth ache

I hope you feel better.  Also, I was wondering, do you know other languages, like python and javascript?  I was making a home automation website that connects raspberry pis to esp8266 and to cell phones.  It's kinda like my other Tinker-Controller.  You can join if you're interested.  I'll upload the code maybe around two weeks from now.(I have college exams next week 😀 )

ahah, dont miss your exams!!! the most important thing for the next of your life!
Well I like hard coding, I learn ASM years ago by myself, just for fun, but I m focusing on c++ now.
Maybe this will remain you something ;)
https://www.youtube.com/channel/UCuTqdGMVoDy_vjyDBD8fJSA

Maybe this will remain you something ;)
https://www.youtube.com/channel/UCuTqdGMVoDy_vjyDBD8fJSA

Link not directing me?

I found you: https://www.youtube.com/watch?v=uoHhlrqZYDI

strange, when I click on it, it opens youtube at the right page :S

lol, yes ! "Pal Treponem" a bad sexual disease

For what I got, a quick explanation for :
FTW[divider] = PITCH[divider] + (int)(((PITCH[divider] >> 6) * (EPCW[divider] >> 6)) >> 7) * MOD[divider];
This will calculate the frequency we have to play :

divider: current voice we are computing
MOD[divider]: modulation percent for the Pitch and Envelope

when zero => no modulation
EPCW[divider]:envelope ref value, PITCH[divider]:pitch ref value

PITCH[divider]:pitch of the current voice (note)

published  a new version of the tool ;)

Alright, i got to testing it, and notice a few "max" variables were missing from the compiler errors.
I added them myself and got it working.  Also noticed you changed the volume channel to CHA(That got me for a while).
The sound quality is much better than before, and I no longer hear clicks.  Good job 👍 .
Could you explain what you did? I'm kinda interested.  Like how does this part work:
if (num & 0x01)       envelope[0] = (++envelope[0]) % ENVELOPES_MAX;
          if      (num == 3)    envelope[1] = envelope[0];
          else if (num & 0x02)  envelope[1] = (++envelope[1]) % ENVELOPES_MAX;

I noticed you did this for the sustain and waves, but how does it work? :)

Hello hello, still working on, but needed a rest. I simplified the code again, after several tests I noticed the main issue with click is coming when the interrupt will need more time to compute than the sample time ;) I m adding a lot of comment that will help you to understand the synth. Now it works, the last part of the job is to optimize a bit more the code and to check for timers. For the use I have, combination of SPI hardware and Music, some trouble can happen ;)

          if (num & 0x01)       envelope[0] = (++envelope[0]) % ENVELOPES_MAX;
          if      (num == 3)    envelope[1] = envelope[0];
          else if (num & 0x02)  envelope[1] = (++envelope[1]) % ENVELOPES_MAX;

I made  a better version now, but very close, with comments :
#ifdef USE_DOUBLE_WAVE
  switch (wavs[divider])
  {
    // trick, here we build a double wave, it gives better sound relief and definition, reduce clik aswell
    // we will need (value == 2 || value == 3 || value == 6 || value == 7) <=> (value & 0x02)
    //    even num      odd num       wave period
    //    ---------------------------------------------------
    //    0:0000        1:0001        1st part of the phase
    //    2:0010 *      3:0011 *      last part of the phase
    //    4:0100        5:0101        -
    //    6:0110 *      7:0111 *      -
    case TRIANGLE:
      r       = 4 * (value % 32);         // [0, 124]
      value  /= 32;
      if (value & 0x01)  r   = 124 - r;   // only odds
      if (value & 0x02)  r   = -r;        // only 2nd 1/2 phase
      break;
    case SQUARE:
      r       = char(((value % 128) < 64) ? 56 : - 56);
      break;
    case SAW:
      r       = (5 * char(63 - (value % 128))) / 4;
      break;
    case RAMP:
      r       = (5 * char((value % 128) - 64)) / 4;
      break;
    case NOISE:
      pWaveTable = (byte*)NoiseTableD;
      goto sine;
    case SINE:
      pWaveTable = (byte*)SinTableD;
      sine:
      r       = value % 32;
      value  /= 32;
      if (value & 0x01)  r   = 31 - r;    // only odds
      r       = (signed char)pgm_read_byte_near(pWaveTable + r);
      if (value & 0x02)  r   = -r;        // only 2nd 1/2 phase
      break;
  }

now the explanation are in the header, it is very simple in fact. The Sine wave can be divided by 4, and then, to apply transformation, we can recompose the whole wave. So we must know which part of the curve to apply the transformation.

This thread was a blast to read.  :-)  @nathanRamaNoodles I've just found your polyphony library for Arduino and it's really nice.  Thank you!  I'm wondering if the memory optimizations described here have been incorporated or not in the released version.  Also when I install from the Arduino Library Manager I get 3.5.2 but I see a reference to 4.0.0 here?  I wonder if it has anything to do with issue #23 ?
I'm just getting started with the library but I'm curious about the demo with 4 voices (Basic example).  The first instrument song is "::e,8f,8g,8a,8b,8c1,8d1,8e1" which seems to me to be 1/8th note short of 2 whole notes when the other songs are whole note, half note and quarter note, respectively.  Why don't we hear song 1 shifting vs the others?  (this probably isn't the place for this comment/question but I'm not sure where to put it...not really an issue per se...)
Thanks again for a great library!

Hello @rbgorbet.
I would recommend @wEPac's fork: https://github.com/wEPac/Noodle-Synth
It's been a while and this repo needs a do-over tbh.  There is more power on the Teensy and esp32, so I have been playing with new toys.  If I get time, I can try to merge wEPac's fork.

I'm just getting started with the library but I'm curious about the demo with 4 voices (Basic example). The first instrument song is "::e,8f,8g,8a,8b,8c1,8d1,8e1" which seems to me to be 1/8th note short of 2 whole notes when the other songs are whole note, half note and quarter note, respectively.

Assuming we are using the music table from the readme.
And using this: 4/(note value) = duration => note value = 4/duration
"::e,8f,8g,8a,8b,8c1,8d1,8e1" = 4 + (1/2) * 7 = 7.5 beats
":d=4:c,d,e,f"  = 1 + 1 + 1 + 1 = 4 beats
":o=6,d=2:16a,16b,8a,4b" = (1/4) + (1/4) + (1/2) + 1 = 2 beats
":o=5,d=2:32g,32a,32b,32c" = (1/32) * 4 = 1/8 beats

Why don't we hear song 1 shifting vs the others?

They should be shifting because each instrument continues when they are done playing.  Unless you pause each instrument when instrument 1 ends:
if (instrument.isEnd()) {
    instrument.pause();     //pauses song
    instrument2.pause();
    instrument3.pause();
    instrument4.pause();
}

You can comment the pauses out and they should play continuously.

I also see in the README that you refer to NONE (override sustain) as being "slur", but when I do that it feels actually more detached than the default mode. ...?

At the time, I was trying to make a note transition to the other with the same decreasing volume effect, but I don't think it worked out.  It was supposed to sound like a person playing an instrument with one breath of air.

Thanks!  How would I use his fork?  Do I install a different library in the IDE or do I download his fork and replace the files with his (and if so where are they located)?
Thanks again!

From: nathanRamaNoodles @.>
Sent: Saturday, October 9, 2021 6:05:12 PM
To: nathanRamaNoodles/Noodle-Synth @.>
Cc: Rob Gorbet @.>; Mention @.>
Subject: Re: [nathanRamaNoodles/Noodle-Synth] issue with init variable when calling 'newSong' (#13)
Hello @rbgorbethttps://github.com/rbgorbet.
I would recommend @wEPachttps://github.com/wEPac's fork: https://github.com/wEPac/Noodle-Synth
It's been a while and this repo needs a do-over tbh. There is more power on the Teensy and esp32, so I have been playing with new toys. If I get time, I can try to merge wEPac's fork.
I'm just getting started with the library but I'm curious about the demo with 4 voices (Basic example). The first instrument song is "::e,8f,8g,8a,8b,8c1,8d1,8e1" which seems to me to be 1/8th note short of 2 whole notes when the other songs are whole note, half note and quarter note, respectively.
Assuming we are using the music table from the readmehttps://github.com/nathanRamaNoodles/Noodle-Synth#how-to-write-music.
And using this: 4/(note value) = duration => note value = 4/duration
"::e,8f,8g,8a,8b,8c1,8d1,8e1" = 4 + (1/2) * 7 = 7.5 beats
":d=4:c,d,e,f"  = 1 + 1 + 1 + 1 = 4 beats
":o=6,d=2:16a,16b,8a,4b" = (1/4) + (1/4) + (1/2) + 1 = 2 beats
":o=5,d=2:32g,32a,32b,32c" = (1/32) * 4 = 1/8 beats
Why don't we hear song 1 shifting vs the others?
They should be shifting because each instrument continues when they are done playing. Unless you pause each instrument when instrument 1 ends:
if (instrument.isEnd()) {
instrument.pause();     //pauses song
instrument2.pause();
instrument3.pause();
instrument4.pause();
}
You can comment the pauses out and they should play continuously.
I also see in the README that you refer to NONE (override sustain) as being "slur", but when I do that it feels actually more detached than the default mode. ...?
At the time, I was trying to make a note transition to the other with the same decreasing volume effect, but I don't think it worked out. It was supposed to sound like a person playing an instrument with one breath of air.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/nathanRamaNoodles/Noodle-Synth/issues/13#issuecomment-939367967, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABOD2HIR56SEE5VSFT5XRPDUGC4BRANCNFSM4HI6WMMQ.

You can install it by downloading his fork as a zip folder. Then in arduino, you uninstall mine with library manager. Then install wePAc's as a zip.


Font Size Mismatch and Minor Discrepancies in egui 0.22.0

Dear emilk,
In egui 0.21.0, the font size was aligned correctly in TextEdit (multiline) with the following code:
let row_height = ui.fonts(|f| f.row_height(&font_id));
Therefore, it worked well with ui.scroll_with_delta() as well. Additionally, the sizes of TextEdit and ui.label() were aligned properly when using ui.spacing_mut().item_spacing.y = 0.0 with matching font sizes.
However, in egui 0.22.0, there is a significant mismatch in sizes. To mitigate this, I tried the following code to adjust the row height:
let row_height = ui.fonts(|f| f.row_height(&font_id)) + 0.14;
But even with this adjustment, there is still a slight discrepancy in ui.scroll_with_delta() and other functions.
Moreover, in egui 0.22.0, when trying to align the sizes of TextEdit and ui.label(), I used the following code:
let font_id = egui::FontId::monospace( font_size );
let row_height = ui.fonts(|f| f.row_height(&font_id));
ui.spacing_mut().item_spacing.y = row_height * 0.0043;

However, even with this adjustment, there are minor discrepancies in sizes. Please note that you may need to have more than 1000 lines to observe these small discrepancies.
And depending on the font size, the magnitude of the minor discrepancy varies.
Although these discrepancies are very small, they can cause issues in practical applications, even though egui can be used to create simple programs without problems.
If you haven't already addressed these issues, I kindly request you to make the necessary adjustments to resolve them.
Thanks.

How to fix egui:
(1) row_height() returns the same value as TextEdit, or
Create a new function so you can get the row_height value.
(2) And, make the size of row_height of TextEdit and row_height of ui.label().
I create a function to get row_height directly in my program,
I solved it by using ui.add_sized() in ui.label().

This is likely an effect of https://github.com/emilk/egui/pull/2724

The height of a row of text is not fixed, but depends on the characters in it. If you want to know the sizes of the rows in the TextEdit, use TextEditOutput::galley. There you will find all the rows of text and where they are.


Avoid modifying bucket during ForEach loop, and Cursor traversal

bbolt documentation states that this is not safe and leads to undefined
behavior.
channeldb/migrations and contractcourt/briefcase are the only places in the codebase where the ForEach modification was done. `
channeldb had a few cases of cursor modification.

PTAL @cfromknecht @wpaulino


Possibly look into using a wrapper library for talking to forecast.io

There are several node.js wrapper libraries built for Forecast.io which might be useful:
not a major thing, just saw the wrappers and thought it would be worth sharing
https://developer.forecast.io/docs/v2

@EdHurtig as I mentioned in #14 & #3, I’m actually partway through with a refactor, and it does exactly this. Thanks for thinking of this!


Fix PgFunc compiled query cache

This PR fixes the PgFunc query cache mode and sets it as the default mode.
The QueryUnit under PgFunc was directly a function call, but we deferred the creation of the function into an asynchronous task, so the cache was not immediately available; it was failing because of this.
This PR first modified the QueryUnit to include the compiled SQL that is immediately available ("inline" SQL) and the function-call SQL that replaces the former immediately after we know the function is created. This resolves the error above.
However, there are 4 more issues with the functions in transactions.

The function creation was queued and executed as soon as the compilation was completed, even when it was in a transaction with DDL applied. The function creation may fail because it may refer to the new types that only exist in the transaction (is this true? update: yes for custom scalars in function signatures). ~The solution here is to store the query cache within the transaction first and push it up to the database-global cache registration for persistence once the transaction is committed.~ Queries in transactions after DDL are not cached now.

A function cache created after a transaction starts can be picked up by the transaction. In this case, we may not be able to call the function due to transaction isolation. ~To address this issue, this PR creates a snapshot of the cache registry when a transaction starts and only uses the cache that was available at the start of the transaction.~ This PR tracks the active transactions and the relative sequence of when each cache function is actually created in DB. The function cache is only activated after all transactions that can't see the function are closed. After activation, the "inline" SQL is dropped to save memory usage. UPDATE: Before activation, transactions started after the function creation could also use the function cache (last CRF).

As Sully mentioned below, scalar types are sometimes referred in cache function signatures, like select <array<MyStr>>$0. This is fixed by evicting all depending query cache when running DDL to drop such scalar types.

We're generating SQL functions that returning setof record[] which is an error in Postgres. This is reproducible with EdgeQL queries like select [(1,),(2,)]. Such errors are currently ignored (printing a warning) and the corresponding query cache falls back to InMemory.

What are the still known issues?

[ ] Deleting scalar types that are used in a cached function
[ ] Queries with 1000 (or something like that?) parameters

One other thing we need to figure out: how do we properly test this?
Most of our test suite runs queries inside transactions, which means the functions won't actually get called.
Worse, I think with this current version, since the transactions don't get committed, most of the functions generated as part of the test suite won't even get created.
(Though on the flip side, maybe that's good for performance...)

when we hydrate_cache because of a signal from another frontend, we will run into the same sorts of transaction visibility issues. Part of the solution is probably to track the txid we hydrated at,

If I understand it correctly, this is already taken care of by not using the function immediately after we received the signal (and followed by the same activation on transaction ends). Receiving the signal indicates the function is already created in another frontend and ready to use.

but we'll need to deal with not having SQL available, I think?

SQL is always available in the database, so the hydration will load both SQL and the function call. We strip out the SQL whenever the function cache is activated.

You're right, totally missed that being handled!

I'm dropping to-backport-5.x because there are follow-up bugs that need to be fixed before we can backport.
(Maybe we should change the default back on master to avoid breaking nightlies?)

The bug is fixed in #7564 which is marked with to-backport-5.x, so adding the same tag on its dependency too.


OLS-1181:  FIPS compliance - use rhel-9-4-els/rhel as base image

Description
use rhel-9-4-els/rhel instead of ubi-minimal base image
Type of change

[ ] Refactor
[ ] New feature
[ ] Bug fix
[ ] CVE fix
[ ] Optimization
[ ] Documentation Update
[x] Configuration Update
[ ] Bump-up dependent library

Related Tickets & Documents

Related Issue #
Closes # OLS-1181

Checklist before requesting a review

[ ] I have performed a self-review of my code.
[ ] PR has passed all pre-merge test jobs.
[ ] If it is a core feature, I have added thorough tests.

Testing

Please provide detailed steps to perform tests related to this code change.
How were the fix/results from this change verified? Please provide relevant screenshots or results.

/lgtm
/approve

/lgtm
/approve

/approve

/override "Red Hat Konflux"


slow in atari tasks

I'm running Atari tasks on the nvidia 2080 and A100 respectively, but I only have around 20 FPS, which is too slow.
That means it takes tens of days to run 10 million steps. When you run the Atari task, how much time does each task take?
Is there a way to speed things up?
{"step": 1446778, "expl_amount": 0.09999962151050568, "model_grad_norm": 12.273571968078613, "value_grad_norm": 2023.7537841796875, "actor_grad_norm":<PHONE_NUMBER>535156, "prior_ent": 73.4467544555664, "post_ent": 70.40204620361328, "image_loss": 11264.0, "reward_loss": 1.7543749809265137, "pcont_loss": 0.5491357445716858, "div": 3.099745988845825, "model_loss": 11264.7998046875, "value_loss": Infinity, "actor_loss": -190.18875122070312, "action_ent": 0.013957500457763672, "fps": 20.45536337258022}

my command is  the  same as  #33
python dreamer.py --logdir ./logdir/atari_mspacman/dreamer/2 --task atari_ms_pacman --expl epsilon_greedy --horizon 10 --kl_scale 0.1 --action_dist onehot --expl_amount 0.4 --expl_min 0.1 --expl_decay 100000 --pcont True --time_limit 1000000

Hi, please use the DreamerV2 code base for Atari experiments.


Spatial Alignment methods not work for two Hololens 2 set up

I have been using SpectatorView with HL2 as user and iPad as spectator. Both Azure Spatial Anchor and QRCode can successfully do the spatial alignment.
But when I use two HL2, both ASA and QRCode cannot work. The state synchronization was done, but the two coordinate spaces were not aligned.  Especially for the QRCode, I am a bit confused about the steps to complete the detection. The spectator HL2 didn't display a QRCode as iPad did, so the user HL2 was stuck by "Waiting for marker visual", even I print a physical QRCode for HL2 to scan but it still doesn't work.
I couldn't fine related documentation with the detailed steps for setting up the testing process.
Does anyone know how to make two Hololens 2 coordinate spaces aligned?

You could first try deleting the list of Default Spatial Localization Initializers on the SpectatorView game object. That's where the QR Code Visual Localization Initializer and ArUco Visual Location Initializer are assigned to by default. Maybe they override something they shouldn't be, so they them out for now and set the list size to 0.
Then verify in Spectator View --> Edit Settings the list of Prioritized Spatial Localization Initializers is empty.
Also verify you have added the QRCODESTRACKER_BINARY_AVAILABLE scripting define symbol in the WSA player settings of the User HL2.
For QR Code detection you would also need to build the SpectatorView.WinRTExtensions.dll and copy it into your Unity Plugins folder. Follow the steps described here:
https://microsoft.github.io/MixedReality-SpectatorView/src/SpectatorView.Native/README.html
You will need to print a fairly large QR marker with certainly more than 10cm side length if you want to detect it from a few meters away. This is because the HL2 scans for QR markers with their WFOV environment cameras and thus small QR markers will appear tiny if observed from a distance. Note, that this is not an issue when you are holding a visual QR code displayed on a mobile device right into the FOV of your Hololens.
Once you've resolved the QR code localization issue, you could have a shot at fixing the ASA localization.


default cluster subnet

Signed-off-by: Icarus9913<EMAIL_ADDRESS>What this PR does / why we need it:
Which issue(s) this PR fixes:

@ty-dc  需要配套 E2E


added WSL and Anaconda instructions

Proposed changes
Add instructions to install WSL on windows and install Anaconda on WSL/Linux #866 .
Types of changes
What types of changes does your code introduce to FESTIM?

[ ] Bugfix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Code refactoring
[x] Documentation Update (if none of the other choices apply)
[ ] New tests

Checklist

[ ] Black formatted
[ ] Unit tests pass locally with my changes
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] I have added necessary documentation (if appropriate)

Further comments
Testing on a fresh WSL default image is pending.

Double-checked that the commands worked on a default (Ubuntu) WSL install.

Latest commit implements what I got from #837 .


Use LibMan in SignalR tutorial

Fixes #8155

@tdykstra The changes here are significant enough that an update to ms.date is justified.

@scottaddie Good point, thanks, too often I forget to update that field.

@BrennanConroy  @anurse  can one of you take a quick look? We'll be merging this tonight so if you find anything latter we'll have to fix it.


[BUG] Remove jackson-databind and jackson-annotations implementations from build.gradle

Jackson-databind and jackson-annotations have been added to core, so the java client will receive these dependencies transitively from core.  Issues can arise if the jackson version from core and the jackson version from the client are not the same, so the dependencies should be removed from the java client build.gradle files.

This is no longer necessary, per discussion on https://github.com/opensearch-project/OpenSearch/issues/5504


[feature request] Bypass Windows defender reports for trojan

Any solution except to switch off Windows Defender would be appreciated, the latest release 3.0 still would receive virus reports and troubles ppl who use this injector for now.

You can add a exclusion folder and put r3nzskin into it.  Then there will be no more virus notices reported.

go to exclusions and add "file type" exclusion, type dll into it and it will be fine.. also what i like to do is i copy one of the logitech.dll files and put it into my recycle bin so if the exclusion ever disappears and my file gets removed by antivirus i have one copy in my recycle bin and dont need to look for download again because mods often delete these posts and downloads


can you explain what the function double Line::distToPoint(unsigned int index) does ?

what exactly the function distToPoint from the Line class does?

calculate the distance of a point to is  orthogonal projection on the line segment?
calculate the distance of a point to the start of the line segment?

thanks in advance

It is the distance of a point to its orthogonal projection on the line segment.


Add aggregate function to IF

Story
As a general user, I want to calculate the overall impact of my application, expressed in my desired functional units, so that I can interpret my impact holistically rather than component-by-component.
Rationale
We currently provide energy, carbon and SCI impacts per component, but we do not have a way to automatically aggregate the impacts across the entire impl. This issue points out the need for a method in IF to aggregate impacts.
Implementation details
Models are executed according to each component's pipeline, meaning they are executed within a single component's context, and only have a single component's observations available to them. This is a sensible design choice for all other models we've thought of so far, but the aggregation has to operate over the entire graph, not just single components. This means aggregation has to happen in the framework itself, by creating a function equivalent to compute() in supercomputer, and not by creating an aggregate model plugin.
NB We could have model plugins that aggregate individual component's impacts. However, there still needs to be a higher level function to aggregate across the entire graph. This might actually be a good way to do it, as the complicated logic is outsourced to a model plugin and the code being added to supercomputer.ts can be minimal.
We should be able to define an aggregation method, e.g. sum or average.
The aggregate function should iterate over every node in an impl and sum the impacts. If the aggregation method is average we should then divide the result by the number of observations.
It makes sense to simply sum raw impact metrics that are expressed in some absolute value, such as energy in kWh or carbon in gCO2eq (but not rates). However, this naturally requires some assumptions to be made about the timing of observations, for example if one node's timestamps cover a shorter timespan than others, this is because that component was really used for a shorter time, not because observations were unavailable. In this case, summing the impacts over time and over nodes will give the total energy/carbon for the whole graph.
SCI values are more complicated because they are expressed in some functional unit. It is likely fine to sum/average SCI values over an entire graph if all nodes use the same functional unit. This is not necessarily true for many applications (e.g. it is natural to have a functional unit of requests/time for an API, but this doesn't make sense for a database, or a storage blob). Therefore, there are likely cases where SCI can only be provided at the node level, and not summed over an entire graph. Cases where an entire graph's SCI values can be summed to give a graph-level SCI are likely minority cases.
That said, it should also be possible to calculate an SCI in functional units of application per time where no functional unit is provided and is instead defined implicitly as the SCI of the whole application. This is equivalent to calculating the sum and normalizing to some given unit of time.
This specific issue will therefore only implement aggregation logic for non-SCI metrics, and SCI scores will be dealt with separately.
Here are the implementation steps:

create a model plugin in if-models
a)  the model will take method and metrics arguments. metrics are the fields that should be aggregated for a node. method is the aggregation method - either sum or average
b) this model should iterate over the inputs and sum or average the metric values in each block of observations.
c) since we are constrained by the model plugin logic, the whole-node aggregate value will be appended to every set of input observations. The aggregate values shouold be prefixed aggregate-, for example the aggregated carbon values is named aggregate-carbon.

create a function in the framework's supercomputer.ts module
a) this function should identify all unique fields prefixed aggregate across the graph.
b) for each aggregate- metric, provide the sum across all components/nodes.
c) Add the graph-level aggregate to the ompl in a new yaml block as follows:

aggregate-metrics:
  total-aggregated-carbon: xxx
  total-aggregated-energy: xxx

Priority
High priority, 4/5.
Most users will want to know their overall impact - right now we don't have any functionality for that.
Scope
These changes will affect the framework itself. The aggregate() function and likely additional sub-functions will go in supercomputer.ts and be called immediately after compute().
Size
3-4 days to implement the changes and update tests and documentation.
What does "done" look like?
This task can be considered done when:

the framework code is updated to implement the logic described above
new unit tests are created, and all passing
the framework documentation is updated to describe the aggregation logic
test impls that invoke the aggregate function are created

Does this require updates to documentation or other materials?
Yes, this will require updates to several pieces of documentation:

the IF specification docs
example impls in the IF repo
a tutorial on the website

What testing is required?
Unit tests
Is this a known/expected update?
Not yet discussed with team

After discussing implementation details wioth @narekhovhannisyan we decided node-level aggregation is best delivered through a model plugin, and the graph level aggregation kept as simple as possible and delivered as a function in the framework's supercomputer module. Updated the original issue description with intended implementation details.

There is now a PR to add the aggregate model plugin, however, testing suggests having the node-level aggregation in a model plugin and graph-level aggregation in the framework is confusing and makes it awkward to write an impl correctly.
Therefore, @narekhovhannisyan will migrate the logic into the supercomputer.ts script.


Gssoc'23: Landing page of Dating Website

Hello, Can I add a landing Page of a Dating Website?

Can you assign this issue to me under GSSoC'23? I want to work on this.


reverting to layoutdoc

layout.json is full of weird quirks, one of which makes testing locally not work at all. Reverting to layoutDoc for local builds.

Contributor License Agreement adherence:

[x] This Contribution is under the terms of Individual Contributor License Agreements (and also Corporate Contributor License Agreements to the extent applicable) appearing in the Apereo CLA roster.

This is the one where if layout.json believes a portlet doesn't exist/is failing, it filters it from the layout. This causes you to not be able to log in locally, because the Quickstart Accounts widget does not appear.


ERROR: Procedure APICaller_POST_Extended - Column name or number of supplied values does not match table definition.

Hi,
I am facing this issue while using APICaller_POST_Extended and can't seem to resolve it. The details passed are correct as APICaller_POST_JsonBody_Header works perfectly. I am assuming there is an issue while receiving data into the table @JResp. The code for that is the same from your example. It can be something silly too that my eyes haven't caught. Hope you can help.

ERROR DESCRIPTION: (Screenshot attached)
A .NET Framework error occurred during execution of user defined routine or aggregate 'APICaller_POST_Extended':
System.Data.SqlClient.SqlException: Column name or number of supplied values does not match table definition.
System.Data.SqlClient.SqlException:
at Microsoft.SqlServer.Server.SmiEventSink_Default.DispatchMessages(Boolean ignoreNonFatalMessages)
at Microsoft.SqlServer.Server.SqlPipe.SendResultsStart(SqlDataRecord record)
at SQLAPI_Consumer.Helper.SendResultValue(String ColumnName, String Value)
at StoredProcedures.APICaller_POST_Extended(SqlString URL, SqlString Headers, SqlString JsonBody)
. User transaction, if any, will be rolled back.
CODE without ERROR:
Declare @JResp as table (Json_Result nvarchar(max))
insert into @JResp
EXEC [APICaller_POST_JsonBody_Header] @URL, @Header, @Body
SELECT * from @JResp
select @Result = Json_Result from @JResp

CODE with ERROR:
Declare @JResp as table (
Json_Result nvarchar(max),
ContentType varchar(100),
ServerName varchar(100),
Statuscode varchar(100),
Descripcion varchar(100),
Json_Headers nvarchar(max)
)
declare @i as int
insert into @JResp
EXEC @i = [APICaller_POST_Extended] @URL, @Header, @Body
select @Result = Json_Result, @Statuscode = Statuscode, @Descripcion = Descripcion from @JResp

Hi @hajrah,
Could you comment out this line --insert into @jresp?. Just to confirm if it's returning what it should.
--insert into @jresp
EXEC @i = [APICaller_POST_Extended] @url, @Header, @Body

Hi @geral2
After commenting it gives an error stating "Object reference not set to an instance of an object."
Screenshot attached


Create Room DAO for Clubs info table

Create a DAO to enable CRUD operation on the Clubs table in the Room Database
DoD: DAO created and unit test added for CRUD operation

Othman and isaak accidentally implemented this. sorry. check branch 63 to see progress


Get a holding record by 'holding_id'

Document where do we use this method in marc_liberation and across the rest of the repositories.
The Alma Rest api call requires a bib_id.

duplicate of #733


fix(calendar): fix old dates generation

fix #1101

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

0 of 2 (0.0%)  changed or added relevant lines in 1 file are covered.
1 unchanged line in 1 file lost coverage.
Overall coverage decreased (-0.02%) to 84.508%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

packages/calendar/src/components/calendar-mobile/Component.tsx
0
2
0.0%

Files with Coverage Reduction
New Missed Lines
%

packages/calendar/src/components/calendar-mobile/Component.tsx
1
40.44%

Totals

Change from base Build<PHONE_NUMBER>:
-0.02%

Covered Lines:
9363

Relevant Lines:
10248

💛  - Coveralls


REST API Issue

Hey mate,
First off thanks for the template, this is far more understandable and better than the ones Shopify generates, even though they are great I don't understand them. Now for the problem at hand.
I am trying to use the REST Client to do a PUT request, but I am not getting what I want. Meaning, I am not getting an error nor am I getting an actual result. I am first doing a GET request, which works perfectly, to get the theme id and then trying to upload a snippet to the assets API. This is because I need to make some changes to the online storefront or the merchant's website.
This is my code:

Here is what I get (I should not be getting this)

What I should be getting based on the REST Docs:

I would appreciate the help. I don't know if it's my error instead of the boilerplates and I would be really glad if you could just spare me a few minutes and help me with this problem. I have been at this for 2 days and I am not progressing forward.
Thanks

Thank you for the kind words! Can you link me the docs you're following?

Thanks for the quick reply.
I am following this doc
My API version is 2023-10, the latest one.

Can you try out this snippet:

import shopify from "utils/shopify.js" //Update this value to match your path
const asset = new shopify.rest.Asset({ session: res.locals.user_session }); //Double check verifyRequest middleware to ensure this value exists
asset.theme_id = themeid; //replace with theme id
asset.key = `${folder}/${fileName}`; // example: assets/script.js
asset.value = "
Value goes here
";

await asset.save({ update: true });

I tried out your snippet:
`userRoutes.get("/getTheme", async (req, res) => {
console.log("GET Themes API Hit");
const { client } = await clientProvider.restClient({
req,
res,
isOnline: true,
});
const getTheme = await client.get({ path: "themes" });
const themeID = getTheme.body.themes[0].id;
const themeName = crypto.createHash("sha-256", getTheme.body.themes[0].name);
console.log(getTheme.body.themes[0]);
const getAssets = await client.get({ path: themes/${themeID}/assets });
console.log("PUT Assets API Hit");
const asset = new shopify.rest.Asset({ session: res.locals.user_session });
asset.theme_id = themeID;
asset.key = sections/announcement-bar.liquid;
asset.value =
"This site is under works. Please try again in a few hour";
await asset.save({ update: true });
console.log(asset);
return res.status(200).json({ theme: getTheme.body.themes });
});`
I get this error now:

Try downgrading to 2023-07 (to test test)
What's your @shopify/shopify-api package version? I'm on 8.1.1

Downgraded to 2023-07
Getting the same error:

[server]   const asset = new shopify.rest.Asset({ session: res.locals.user_session });
[server]                 ^
[server]
[server] TypeError: shopify.rest.Asset is not a constructor
[server]     at file:///Users/zohaibarsalan/Developer/bannerito/server/routes/index.js:32:17
[server]     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

I am also on version 8.1.1

Is it possible for you to invite me to this repo?

Alright

OK I see the problem - the snippet I sent is fine but I forgot to add restResources in shopify.js.
import { restResources } from "@shopify/shopify-api/rest/admin/2023-07"; // <------ Add this

const shopify = shopifyApi({
  apiKey: process.env.SHOPIFY_API_KEY,
  apiSecretKey: process.env.SHOPIFY_API_SECRET,
  scopes: process.env.SHOPIFY_API_SCOPES,
  hostName: process.env.SHOPIFY_APP_URL.replace(/https:\/\//, ""),
  hostScheme: "https",
  apiVersion: process.env.SHOPIFY_API_VERSION,
  isEmbeddedApp: true,
  restResources, // <------ Add this
  logger: { level: isDev ? 1 : 0 }, //Error = 0,Warning = 1,Info = 2,Debug = 3
  })

Also just a heads up, if you don't have permissions for using Asset API, you'll get the 404 error from Shopify. If you downgrade to 2023-07 this should be fine because from 2023-10 you need perms. Get in touch with Shopify support for permissions.

Thanks mate the original error got resolved, but I now have another error 😢. I really appreciate your help and am very thankful to you man. I haven't come across a guy such as yourself, who resolved my issue so fast and responded within an hour of my first comment.
I am getting this now:
[server] /Users/zohaibarsalan/Developer/bannerito/node_modules/@shopify/shopify-api/lib/clients/http_client/http_client.js:193
[server]                 throw new ShopifyErrors.HttpResponseError({
[server]                       ^
[server]
[server] HttpResponseError: Received an error response (404 Not Found) from Shopify:
[server] "Not Found"
[server] If you report this error, please include this id: 85ce4a5c-2059-4ad7-966a-d6a72501c1e5
[server]     at NewRestClient.throwFailedRequest (/Users/zohaibarsalan/Developer/bannerito/node_modules/@shopify/shopify-api/lib/clients/http_client/http_client.js:193:23)
[server]     at NewRestClient.<anonymous> (/Users/zohaibarsalan/Developer/bannerito/node_modules/@shopify/shopify-api/lib/clients/http_client/http_client.js:220:22)
[server]     at Generator.next (<anonymous>)
[server]     at fulfilled (/Users/zohaibarsalan/Developer/bannerito/node_modules/tslib/tslib.js:166:62)
[server]     at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
[server]   response: {
[server]     code: 404,
[server]     statusText: 'Not Found',
[server]     body: { errors: 'Not Found' },

Do you reckon this is something to do with the asset.key? I tried changing the key but I got the same error. I am pushing the repo with the current changes made, you can have a look there.
And one more time, thanks, man.

Also just a heads up, if you don't have permissions for using Asset API, you'll get the 404 error from Shopify. If you downgrade to 2023-07 this should be fine because from 2023-10 you need perms. Get in touch with Shopify support for permissions.

This is exactly what I sent in, I think you missed it^

But I am using 2023-07 I even reinstalled the app to make sure it was 2023-07
Do you have any better way to interact with the storefront or the merchant's online store? The best way I found was using assets API, if there is any better way I would gladly take it

The PUT request doesn't seem to be working nor is the DEL one. I tried the previous code and the new one, but nothing works. Sticking with the code you gave me. The error remains even after I switch my API versions. Any idea why this is happening? I just want to be able to add a code snippet in the merchant's online store, and this is taking so much time and effort. If this doesn't work and there is a better way can you please tell me? I would appreciate this mate. So far you have been a godsend. I am going to push the repo, please have a look. Even though you don't work with REST you are still better than me. @kinngh

Sorry closing the repo - this is about as far as I can spend time on^


A little fix of #519

Mistakenly added used job function instead of job_with_argument function

Coverage remained the same at 99.701% when pulling 72800e46bbd1bd408e66d2a62f401ee234a97a8c on rudSarkar:patch-2 into c883af0229143285cf38e1c7733aaf36656c8744 on dbader:master.


[BUG] Self-Signed Certificate Error On Mobile

When dealing with self-signed certificates (for example from a self-hosted gitlab server), the app won't sync properly stating:
Error: Request Failed. SSLHandshakeException java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
native git has the -c http.sslVerify=false option but I'm not sure if isomorphic-git can do this...

I don't know that well, but I don't think this is specific to git/isomorphic-git here, but rather the http client used. I'm using a method provided by Obsidian, which doesn't support any settings like this, so I don't think there is a way to fix this.

Old feature request related to this https://forum.obsidian.md/t/feature-request-allow-user-supplied-root-certificates-weaken-security/26764. It looks that policy won't be changed any time soon. User defined CA certificates works in all apps which I tested so far: e.g. bitwarden, home assistant, gitnext.
@Vinzent03 would it be possible to allow user to add CA or self signed certificate in plugin settings?

As I said in my previous comment I'm very sure I can't configure this. Even if I could, I would follow the recommendation from the forum post and not implement it.


Enabling BLE Bridge after commissioning

I did a simple merge of the light switch and BLE mesh examples. This all works as expected except for one issue. After you commission the light bulb, BLE radio is left in an off state causing the BLE mesh code gets this error:
I (70276408) app_main: Free 118612
E (70276568) BLE_MESH: Advertising set failed: err 30
E (70276568) BLE_MESH: Start advertising failed: err 30
W (70276568) BLE_MESH: Failed to send adv packet
I (70276908) app_main: Free 118612

If you reboot it fixes the issue. So what needs to change? Should commissioning leaves BLE turned on? Or should the BLE Mesh code detect error 30 and turn the BLE radio back on?

This fixes it...
"Currentlly, by default, we disable and deinit BLE after commissioning. If you need BLE in your application, you can unset this option idf.py menuconfig -> Component config -> CHIP Device Layer -> BLE Options, re-build and re-flash"


[UWP][Android][iOS][.NET][WPF][HTML] Change sentiment from enum to string

Change the sentiment property from enum to a string fixing this issue: https://github.com/Microsoft/AdaptiveCards/issues/2227

Looks like updates are also needed in the shared model tests.


The diff coverage is 95.45%.

@@            Coverage Diff             @@
##           master      #45      +/-   ##
==========================================
+ Coverage   77.38%   77.73%   +0.35%
==========================================
  Files          53       54       +1
  Lines        2733     2821      +88
==========================================
+ Hits         2115     2193      +78
- Misses        618      628      +10

Impacted Files
Coverage Δ

src/MultiAddressBlackList.cs
100% <ø> (ø)
:arrow_up:

src/TaskHelper.cs
96.29% <100%> (ø)

src/PeerManager.cs
94.8% <94.8%> (ø)

src/Swarm.cs
87.94% <0%> (-1.65%)
:arrow_down:

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 d1a1bff...117fddf. Read the comment docs.


how to modify the advised subenet xxx.xxx.xxx.xxx/26 to xxx.xxx.xxx.xxx/28 for each node.

I  have 2048 container IP addresses in total, 100 calico node. But the TOR requires the minimal subnet xxx.xxx.xxx.xxx/28 from each node.  Some node can only get one container IP, unfortunately the IP subnet  is less then  xxx.xxx.xxx.xxx/28, so it is droped.
Expected Behavior
I want to modify the advised subenet xxx.xxx.xxx.xxx/26 to xxx.xxx.xxx.xxx/28 for each node.
emergency ！！！！！！

Closing this issue as a duplicate of the feature request for "configurable block sizes" here: https://github.com/projectcalico/libcalico-go/issues/761


chore(ci): libsinsp e2e CI caching

What type of PR is this?
/kind feature
Any specific area of the project related to this PR?
/area CI
Does this PR require a change in the driver versions?
What this PR does / why we need it:
This adds build caching in libsinsp e2e CI jobs.
Which issue(s) this PR fixes:

Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?:

NONE

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: therealbobo
Once this PR has been reviewed and has the lgtm label, please assign leogr for approval. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: FedeDP, therealbobo
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS [FedeDP]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

LGTM label has been added.  Git tree hash: 83efe3690e5f2c2a5238914a1eca068c8a1ad873

/milestone 0.16.0

Probably yes but we’ll need to check if there is a storage limit for the gh runners (the build dirs are pretty heavy :/)

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: Andreagit97, FedeDP, therealbobo
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS [Andreagit97,FedeDP]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment


how to remove <use id="" xlink:href="#" in composite svg file

Do you want to request a feature, report a bug or ask a question?
a question
What is the current behavior?
with to many  inside the final svg file.
What is the expected behavior?
without use tag. The small the better for the final composite svg file
If the current behavior is a bug, please provide the steps to reproduce, at least part of webpack config with loader configuration and piece of your code.
The best way is to create repo with minimal setup to demonstrate a problem (package.json, webpack config and your code).
It you don't want to create a repository - create a gist with multiple files
If this is a feature request, what is motivation or use case for changing the behavior?
Please tell us about your environment:

Node.js version: ?
webpack version: ?
svg-sprite-loader version: ?
OS type & version: ?

Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)

new SpriteLoaderPlugin({plainSprite: true})


[Usage]: Is it possible to generate without detokenizing?

Your current environment
Collecting environment information...
PyTorch version: 2.1.2+cu121
Is debug build: False
CUDA used to build PyTorch: 12.1
ROCM used to build PyTorch: N/A

OS: Rocky Linux release 8.7 (Green Obsidian) (x86_64)
GCC version: (GCC) 8.5.0 20210514 (Red Hat 8.5.0-16)
Clang version: 14.0.6 (Red Hat 14.0.6-1.module+el8.7.0+1080+d88dc670)
CMake version: version 3.28.4
Libc version: glibc-2.28

Python version: 3.11.6 | packaged by conda-forge | (main, Oct  3 2023, 10:40:35) [GCC 12.3.0] (64-bit runtime)
Python platform: Linux-4.18.0-425.10.1.el8_7.x86_64-x86_64-with-glibc2.28
Is CUDA available: True
CUDA runtime version: 12.2.91
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration:
GPU 0: NVIDIA A100-SXM4-80GB
GPU 1: NVIDIA A100-SXM4-80GB
GPU 2: NVIDIA A100-SXM4-80GB
GPU 3: NVIDIA A100-SXM4-80GB

Nvidia driver version: 545.23.08
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              64
On-line CPU(s) list: 0-63
Thread(s) per core:  1
Core(s) per socket:  32
Socket(s):           2
NUMA node(s):        2
Vendor ID:           GenuineIntel
CPU family:          6
Model:               106
Model name:          Intel(R) Xeon(R) Platinum 8358 CPU @ 2.60GHz
Stepping:            6
CPU MHz:             3300.000
CPU max MHz:         3400.0000
CPU min MHz:         800.0000
BogoMIPS:            5200.00
Virtualization:      VT-x
L1d cache:           48K
L1i cache:           32K
L2 cache:            1280K
L3 cache:            49152K
NUMA node0 CPU(s):   0-31
NUMA node1 CPU(s):   32-63
Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 invpcid_single intel_ppin ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect wbnoinvd dtherm ida arat pln pts avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid fsrm md_clear pconfig flush_l1d arch_capabilities

Versions of relevant libraries:
[pip3] mypy-extensions==1.0.0
[pip3] numpy==1.26.2
[pip3] torch==2.1.2
[pip3] torchaudio==2.2.1
[pip3] torchmetrics==1.3.1
[pip3] torchvision==0.17.1
[pip3] triton==2.1.0
[conda] numpy                     1.26.2                   pypi_0    pypi
[conda] torch                     2.1.2                    pypi_0    pypi
[conda] torchaudio                2.2.1                    pypi_0    pypi
[conda] torchvision               0.17.1                   pypi_0    pypi
[conda] triton                    2.1.0                    pypi_0    pypiROCM Version: Could not collect
Neuron SDK Version: N/A
vLLM Version: 0.3.3
vLLM Build Flags:
CUDA Archs: Not Set; ROCm: Disabled; Neuron: Disabled
GPU Topology:
GPU0    GPU1    GPU2    GPU3    NIC0    NIC1    NIC2    CPU Affinity    NUMA Affinity   GPU NUMA ID
GPU0     X      NV4     NV4     NV4     SYS     SYS     SYS     1-4     0               N/A
GPU1    NV4      X      NV4     NV4     SYS     SYS     SYS     1-4     0               N/A
GPU2    NV4     NV4      X      NV4     SYS     SYS     SYS     34-37   1               N/A
GPU3    NV4     NV4     NV4      X      SYS     SYS     SYS     34-37   1               N/A
NIC0    SYS     SYS     SYS     SYS      X      SYS     SYS
NIC1    SYS     SYS     SYS     SYS     SYS      X      PIX
NIC2    SYS     SYS     SYS     SYS     SYS     PIX      X

Legend:

  X    = Self
  SYS  = Connection traversing PCIe as well as the SMP interconnect between NUMA nodes (e.g., QPI/UPI)
  NODE = Connection traversing PCIe as well as the interconnect between PCIe Host Bridges within a NUMA node
  PHB  = Connection traversing PCIe as well as a PCIe Host Bridge (typically the CPU)
  PXB  = Connection traversing multiple PCIe bridges (without traversing the PCIe Host Bridge)
  PIX  = Connection traversing at most a single PCIe bridge
  NV#  = Connection traversing a bonded set of # NVLinks

NIC Legend:

  NIC0: mlx5_0
  NIC1: mlx5_1
  NIC2: mlx5_2

How would you like to use vllm
We have a use case where we only need the output tokens, but not the detokenized text. This also happens to be using a very small model, and as far as I can tell performance is limited by CPU, not GPU - we see 100% CPU utilisation, but only around 10% GPU utilisation (something similar has been observed even with medium sized models, see #1375 ).
We haven't done detailed profiling, but one obvious optimisation would be to skip detokenisation, i.e. return only the token_ids, but not the output text. Is there a way to do this? I haven't found anything so I assume the answer is "No" out of the box, but we also don't mind making changes to the vllm source for this, if it was just a matter of commenting out a line or two.
Thanks so much!

I think this can be a good idea. Are you thinking about offline evaluation using the LLM interface or the server?
Thoughts about this? @Yard1 @zhuohan123

I'd also been thinking about this recently. I think it would be nice to have some kind of skip_detokenization or include_text=False option in the sampling params.

@simon-mo If this is something that would be useful to others, I'd be happy to help work on a PR for this! Would this mainly be a matter of skipping the two calls to self.detokenizer in LLMEngine?

@GeauxEric please feel free to open a PR so it's easier to get feedback.

Just chiming in this is something I'd be interested in as well.

I've opened a PR that makes this optional on a per-request basis. Would be happy to get feedback! @simon-mo @njhill


Runtime modules are not imported properly on Windows

Environment

Operating System: Windows_NT
Node Version:     v20.9.0
Nuxt Version:     3.10.2
CLI Version:      3.10.1
Nitro Version:    2.8.1
Package Manager<EMAIL_ADDRESS>Builder:          -
User Config:      devtools, modules, nitro, ui, image, colorMode
Runtime Modules<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>Build Modules:    -

Reproduction
Follow through this link and create a Cloudflare app with Nuxt template on Windows and compare the result to that on WSL/Linux
No additional configuration required.
Describe the bug
From the logs, we can see that the runtime plugin of the nitro-cloudflare-dev module was imported by "virtual:#internal/nitro/virtual/plugins", but could not be resolved – treating it as an external dependency. Then later, there is an error related to the URL scheme which could be pointed to the path above that was not resolved properly.
At first I thought this was an issue on the nitro-cloudflare-dev end, but this module worked fine on WSL. My guess is that the \ made the path poorly escaped and unable to be resolved.
Additional context
This is a snippet from nitro-cloudflare-dev module. It might have something to do with fileURLToPath or import.meta.url.
async function nitroModule(nitro: Nitro) {
  //...

  // Add plugin to inject bindings to dev server
  nitro.options.plugins = nitro.options.plugins || [];
  nitro.options.plugins.push(
    fileURLToPath(new URL("runtime/plugin.dev", import.meta.url)),
  );
}

Logs
WARN  "C:Users<MY_USER_PROFILE>DocumentsGitHub<REPOSITORY_NAME>                                 8:17:02 PM
ode_modules
untimeplugin.dev" is imported by "virtual:#internal/nitro/virtual/plugins", but could not be resolved – treating it as an external dependency.

✔ Nitro built in 2169 ms                                             nitro 8:17:03 PM

[8:17:03 PM]  ERROR  [worker reload] [worker init] Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'

  at __node_internal_captureLargerStackTrace (node:internal/errors:497:5)
  at new NodeError (node:internal/errors:406:5)
  at throwIfUnsupportedURLScheme (node:internal/modules/esm/load:216:11)
  at defaultLoad (node:internal/modules/esm/load:118:3)
  at ModuleLoader.load (node:internal/modules/esm/loader:396:13)
  at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:278:56)
  at new ModuleJob (node:internal/modules/esm/module_job:65:26)
  at #createModuleJob (node:internal/modules/esm/loader:290:17)
  at ModuleLoader.getJobFromResolveResult (node:internal/modules/esm/loader:248:34)
  at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:229:17)
  at async ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:85:21)

Got the same error. Using NodeJS 21.6.2

Linking https://github.com/unjs/nitro/issues/836


Upload SGN

In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:

[ ] Filename in the lowercase format
[ ] Image format: png
[ ] Image size: 256 by 256 px

Fixed in https://github.com/TrustWallet/tokens/commit/21edc1dc249ee90dd64570f3648815c9400b8806

Also, you can use these graphics to say that your ERC20 token fully compatible with Trust Wallet (https://trustwalletapp.com/logo-assets). Tokens will show up automatically once the user receives them.
Feel free to share this on social media and tag Trust Wallet:
Twitter: @TrustWalletApp
Facebook: @TrustWalletApp


cabana: dynamically switch between OpenGL

Continuation of https://github.com/commaai/openpilot/pull/27145
Actually, it looks like this whole points feature doesn't work if you have OpenGL enabled.
https://doc.qt.io/qt-6.2/qabstractseries.html#useOpenGL-prop

The OpenGL acceleration of series drawing is meant for use cases that need fast drawing of large numbers of points. It is optimized for efficiency, and therefore the series using it lack support for many features available to non-accelerated series:

Pen styles, marker shapes and light markers are ignored for accelerated series. Only solid lines and plain scatter dots are supported. The scatter dots may be circular or rectangular, depending on the underlying graphics hardware and drivers.

Switching dynamically between OpenGL enabled/disabled seems to work decent, as long as you multiply the pen width by the device pixel ratio when OpenGL is enabled.
@deanlee any thoughts?

lgtm

I also noticed that dragging over a signal to zoom doesn't work while in OpenGL mode. I assume that has always been broken?

It looks like we only need to update them when the x-axis changes. how about  putting them in
if (min != axis_x->min() || max != axis_x->max())

I also noticed that dragging over a signal to zoom doesn't work while in OpenGL mode. I assume that has always been broken?

that's one of the qchart's opengl limitation too

@pd0wm I improved this function slightly, paint points in drawForeground instead of swithing between opengl.  https://github.com/commaai/openpilot/pull/27239


Add basic rustfmt and run a pass over the code

Most changes appear to be due to rustfmt wanting blocks to get their own
line.
Signed-off-by: Robbie Harwood<EMAIL_ADDRESS>

After discussion with the team, we have decided to keep the default rustfmt style. We concluded that there was value in not deviating from what the broader Rust community is doing.
We are, however, adding a test to ensure that the style is correct on each PR. This should help us maintain consistency.
Therefore, we are rejecting this PR.


fixed inhand and worn sprites for boxing gloves

Fixes and Closes #10398
the yellow, green, and blue boxing gloves would show as blue when worn or held, they now show the correct color. i also renamed the normal boxing gloves to red boxing gloves
Screenshots

Changelog
:cl:

fix: yellow, green, and blue boxing gloves now use correct sprites for worn and inhand states
tweak: renamed boxing gloves to red boxing gloves

looks good, only nitpick is that the changelog should only include player-facing changes (i.e. it should probably just mention that the inhands/worn sprites are fixed and nothing else)

fixed, thanks


Updated the README instructions

Updated the installation and usage instruction blocks to be more helpful to new users
Additions
None
Removals
None
Changes

Added description text to Installation block
Added description text to Usage block
Added mkdir && cd step to usage block
Added grunt step to usage block
Added "view index page" step to usage block

Testing
None
Review

@contolini
@ascott1
@Scotchester
@KimberlyMunoz
@himedlooff

Preview
None
Notes

expands on existing instructions for added clarity to new users
informs user where to run the generator
removed "$" from bash commands to make copy/paste easier
Fixes #31

:+1:


[North Star Applicant UI] Style program category filters on the homepage

Describe the solution presented in this issue.
Style program filter checkboxes and associated buttons on the homepage.
Link to Figma mocks: mocks
Add screenshot of relevant mocks for this issue here:
Note:  This is missing the "Filter" and "Clear" buttons.  Waiting for UX design of those.

Additional Context
This is a follow-up to #7813.
Done when:
What criteria need to be met for the issue to be finished?

[ ] Filter checkboxes and "Filter" and "Clear" buttons are styled according to the mocks
[ ] Filter selections meets accessibility standards

Color guidelines

CiviForm and USWDS colors: Unless specified all North Star designs will be implemented using USWDS theme color tokens and USWDS state color tokens

Text styles

All text should use the class usa-prose unless specified otherwise
https://designsystem.digital.gov/components/prose/

Hover states

Use the default USWDS hover styles.

USWDS components used

USWDS Checkbox tile

See USWDS guidance on the how to use the component
Checkbox tiles should be used for the filters on the homepage
We should no longer override the USWDS focus styles.  Focus will now be on the checkbox only, not the surrounding tile.

Accessibility

Colors have been checked for contrast standard

@sijiayam For the program filter checkboxes, should the clickable area be just inside the checkbox itself or do you want the surrounding button to be selectable?
If you want the surrounding button to be clickable, we would need to increase the contrast ratio of the button boundary.  Here's the guidance I see in the Deque class I'm taking:  "Whenever visual boundaries are used to distinguish controls, the contrast of UI control boundaries compared to adjacent areas MUST be at least 3 to 1 to distinguish the UI control from the adjacent areas."  I think that we could accomplish that with a darker border.  That would allow people with low vision to see where they can click.

@melanie-exygy In the newest filters design explorations, I am suggesting we use just the USWDS default checkbox rather than the checkbox tile. This change is because we have updated the feature to have a clear and filter button.
USWDS' checkboxes seem to have a 20px by 20px area with a 2px margin around it. Does this atisy the WCAG2.2 rule? https://designsystem.digital.gov/components/checkbox/

@melanie-exygy In the newest filters design explorations, I am suggesting we use just the USWDS default checkbox rather than the checkbox tile. This change is because we have updated the feature to have a clear and filter button.
USWDS' checkboxes seem to have a 20px by 20px area with a 2px margin around it. Does this atisy the WCAG2.2 rule? https://designsystem.digital.gov/components/checkbox/

Since the 2px margin on each side adds up to a total of 24px by 24px of clickable area, this should just barely meet the rule.  Technically, because of the rounded corners, the clickable square is undersized, but we do have spacing around the checkboxes, so that compensates.  It would be nice if USWDS did more than meet the absolute minimum requirements, but maybe they need time to catch up with this relatively new rule.


Changelog

@gouthamve 	what do you think about this changelog format and wording?
I am trying to write it so that searching through the changelog file with keywords would also give context about the different changes. This way if a behaviour is removed at some point can also deprecate/refactor the corresponding API

I think we should stick with the project's standard format. If someone needs this level of detail, they can always look at the commit history.