Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 2019 20:29
    jbayardo edited #2018
  • Jan 31 2019 20:21
    jbayardo opened #2018
  • Jan 31 2019 20:16
    jbayardo commented #1352
  • Jan 31 2019 20:07
    SunderB synchronize #2017
  • Jan 31 2019 19:58
    SunderB synchronize #2017
  • Jan 31 2019 15:32
    JackUnthank starred samaaron/sonic-pi
  • Jan 31 2019 09:17
    oyd11 starred samaaron/sonic-pi
  • Jan 31 2019 06:27
    hidaris starred samaaron/sonic-pi
  • Jan 31 2019 05:23
  • Jan 30 2019 22:05
    lexmortis commented #1956
  • Jan 30 2019 21:54
    lexmortis commented #2012
  • Jan 30 2019 19:23
    lexmortis commented #2013
  • Jan 30 2019 19:00
    SunderB commented #1506
  • Jan 30 2019 18:10

    weblate on master

    Translated using Weblate (Russi… (compare)

  • Jan 30 2019 17:52
    SunderB commented #218
  • Jan 30 2019 17:46
    rdwebdesign commented #1506
  • Jan 30 2019 16:22
    JackEvans24 starred samaaron/sonic-pi
  • Jan 30 2019 06:25
    bob-the-dyer starred samaaron/sonic-pi
  • Jan 30 2019 03:21
    soasme starred samaaron/sonic-pi
  • Jan 30 2019 03:07
    luikore starred samaaron/sonic-pi
bawNg
@bawNg
I've got a bunch of debug logging which makes it real easy for me to see when all the jobs start and end, so I'm pretty sure things more or less work fine now
I'm currently adding some basic fiber-aware profiling support so that there can be time warnings for things that take too long in the reactor thread
I've just been sampling jitter every 10ms up until now, and the scheduler I implemented in C has warnings for timers which fire late too
ruby-prof should be a viable to use for profiling the full application on linux, but since I'm developing on windows right now, I can't use it to do CPU time profiling, so time warnings are a lot better than nothing
bawNg
@bawNg
Now that I've gone through more of the source, I'm really confident that performance can be boosted a huge amount. Some things will require some effort to rewrite and simplify, but there is also loads of low hanging fruit where just a few chars need to be swapped out
Sam Aaron
@samaaron
Ace!
Thanks again for your efforts with this
bawNg
@bawNg
I'm trying my best to not do low hanging fruit optimizations as part of the threading related changes, even though it's really hard to resist the urge haha
I'm hoping that if I do those as separate commits, it'll make it easy for you guys to see what is faster and avoids allocations when working with common things
There are a lot of things that aren't very intuitive when it comes to ruby performance, and no one has time to profile every line of code they write
Sam Aaron
@samaaron
:)
Also, if you could separate the fiber stuff into standard ruby and special c extension patches that would also be very helpful
bawNg
@bawNg
Implementing a scheduler in pure ruby will have a lot of overhead, which is they the very simple reactor is C and C++
Native calls are also needed to get a precise time on windows
Sam Aaron
@samaaron
Ok, I’m just a little weary of taking on code I might not be able to maintain
bawNg
@bawNg
Right now almost everything related to fibers is implemented in pure ruby, ideally some of the most used parts should be rewritten in C later to reduce overhead
You won't have any issues maintaining the code, I'll leave a comment about the internal part which in worst case can be commented out and replaced with a single line slow method dispatch call
C extensions which do common things are unlikely to ever break, even the small piece of internal ruby code needed to reduce the overhead of calling into ruby is unlikely to ever break, but it's worth the chance of having to make a small change to the extension if it reduces that overhead
I'm not only thinking of very low end hardware, but also very large involved scripts combined with real time input
bawNg
@bawNg
While the overhead of resuming a single fiber or calling a proc may seem small at ~20us, that's a single one on a 4.4ghz CPU, and it adds up quickly when there are hundreds or thousands of jobs firing frequently
Sam Aaron
@samaaron
and to be clear, a job firing in this case isn’t the equivalent of thread.new but a fiber resuming?
bawNg
@bawNg
Yeah, the equivalent of a thread context switch, or alternatively a timer callback being called if a fiber isn't needed
I have a simple pure ruby fiber pool so all jobs recycle and reuse fibers avoiding the instantiation overhead and GC
Sam Aaron
@samaaron
At which point do you yield control of one fiber to another?
From a logical point, calls to sleep or sync would be good places
idespiseyou
@idespiseyou
hello
bawNg
@bawNg
Fibers are completely cooperatively scheduled. You yield from a fiber when that fiber has a reason to not continue execution for some period of time, if that period is a set timeout, a timer registered with the scheduler can resume it, else some other piece of code needs to keep track of that fiber and resume it at some point
idespiseyou
@idespiseyou
just wondering
will there ever be a showreel of what sonic pi can do
Sam Aaron
@samaaron
@bawng so when do you currently yield. Fiber?
@idespiseyou what do you mean by showreel? :)
bawNg
@bawNg
Currently places that call Job.yield are Mutex#lock, Mutex#sleep, Job#join, Job.sleep, and the OSC received message fiber when it's queue is empty
Of course eventually most of the old thread-based things like mutex's and joining can be replaced with simpler solutions
Sam Aaron
@samaaron
Interesting
bawNg
@bawNg
@samaaron What is /spider_thread_sync/ used for?
Alex
@CadaverLab
hey (wow i haven't used gitter in ages...), quick Q here. is it possible to rearrange some of the panels in sonic pi's UI? i just stumbled across one of @samaaron 's videos from last year where it looked like it could be done
Julian Cheal
@juliancheal

Is anyone around to help with the steps to build Sonic Pi on macOS High Sierra?

I tried first running build-osx-app and ran into errors, then tried, build-osx-sierra-app and had different errors.

After some googling it seems those problems I encountered should have been fixed in a current git clone of the app.

I’m wondering if there is some undocumented step I’m missing.
Julian Cheal
@juliancheal
Just tried a fresh clone of SP and I’m still getting:
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't open file: Contents/MacOS/Sonic Pi (No such file or directory)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't open file: Contents/MacOS/Sonic Pi (No such file or directory)
./build-osx-sierra-app: line 87: cd: SP_APP_SRC: No such file or directory
Julian Cheal
@juliancheal
And if I build with build-osx-app it keeps looping the same error:
WARNING: Failure to find: help_files.qrc
/usr/local/Cellar/qt/5.10.0_1/bin/rcc: File does not exist 'help_files.qrc'
RCC: Error in 'info_files.qrc': Cannot find file 'info/CHANGELOG.html'
RCC: Error in 'info_files.qrc': Cannot find file 'info/COMMUNITY.html'
RCC: Error in 'info_files.qrc': Cannot find file 'info/CONTRIBUTORS.html'
RCC: Error in 'info_files.qrc': Cannot find file 'info/CORETEAM.html'
RCC: Error in 'info_files.qrc': Cannot find file 'info/LICENSE.html’
ethancrawford
@ethancrawford
Hey @juliancheal. I can solve at least one of those errors - In build-osx-sierra-app, that cd SP_APP_SRC should in fact be cd $SP_APP_SRC
Julian Cheal
@juliancheal
@ethancrawford ah yeah good spot! Rerunning it now. :)
1 error down :beers:
Julian Cheal
@juliancheal

Nice so there were actually a few more syntax errors in the build script (making a PR now).

Now I’m at least getting the same File does not exist ‘help_files.qrc’ error from both build scripts! I call that a success.

ethancrawford
@ethancrawford
😄
Julian Cheal
@juliancheal
Ok getting there, I’ve build an incomplete app. I think I know what all the fuss was now too. I’ve got a WIP PR up fixing the build script. I’ll keep at it until it’s :100:
Denys M.
@dector
Hi there. :)
Does anyone knows if 3.1.0 debian package exists?
Jacob Stoebel
@jstoebel
Hello, sorry if this question has been asked before (I have a suspicion it has) but I wasn't able to find an answer to it anywhere. Is there a way to use sonic pi with my text editor (in my case VS Code?) If not, and I wanted to make a VS Code plugin for this what might that entail (or is this even a good idea?)
Hanno Zulla
@hzulla
@dector Hi. I did the Debian packaging.