Re: [Linuxsampler-devel] LSCP shell
Ok, I just committed an initial version of the LSCP shell to SVN. The application is just called "lscp". There is also a man page. I decided to go the thin-client route, that is LSCP aware stuff being handled on sampler side, and the shell application is more or less just forwarding individual key strokes to the sampler and handling output format (color & printing) of the returned informations on the command line terminal. That should make the shell be versatile for being used successfully against various LinuxSampler versions, no matter what the exact LSCP version is, and keeps development/maintenance effort low. Current shell features: - Colored highlighting while typing (i.e. good portions bold white, syntactical bad portions red, if the command is complete and ready to be fired: green, ...). - Auto completion by tab key. The shell will also show a possible completion in real-time while typing. So that one does not need to guess when it is possible to tab-complete the command. You see it immediately. - Auto correction of trivial mistakes: for now this just covers auto converting i.e. lower case characters to upper case (if necessary, according to current LSCP grammar position), space characters to underscore characters and vice versa (also according to grammar position). In future: orthographically similar mistyped keywords might be auto corrected as well. Not a hard task. I actually also planned to integrate the LSCP reference into the shell. That is, if a certain LSCP command is identified, the shell would automatically show the relevant LSCP reference document section below the current command line (and paging the shown LSCP reference with PGUP, PGDOWN keys). However ... I have now to work on completely other stuff for a while, so this spare time fun is postponed for now. The Windows version of LinuxSampler is currently broken, because I used the POSIX termios API to get the required control over the command line terminal. That API does not exist on Windows. If anybody is interested in trying to fix this on Windows, it would be very much appreciated! That's it for now. CU Christian -- Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk ___ Linuxsampler-devel mailing list Linuxsampler-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxsampler-devel
Re: [Linuxsampler-devel] LSCP shell
You're awesome, i jumped straight to the shell ! after updating the svn repos (libgig-svn just in case and linuxsampler-svn), it fails compiling on lscp.y any idea ? strangely i found the very same function in lscpparser.cpp make[3]: Entering directory '/home/seijitsu/build/linuxsampler-svn/src/linuxsampler-svn/src/network' /bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -D_FORTIFY_SOURCE=2 -Wreturn-type -ffast-math -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -pthread -MT lscpparser.lo -MD -MP -MF .deps/lscpparser.Tpo -c -o lscpparser.lo lscpparser.cpp libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -D_FORTIFY_SOURCE=2 -Wreturn-type -ffast-math -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -pthread -MT lscpparser.lo -MD -MP -MF .deps/lscpparser.Tpo -c lscpparser.cpp -fPIC -DPIC -o .libs/lscpparser.o lscp.y: In function 'bool _isRuleTerminalSymbol(int)': lscp.y:1319:18: error: 'yyprhs' was not declared in this scope for (int i = yyprhs[rule]; yyrhs[i] != -1; ++i) ^ lscp.y:1319:32: error: 'yyrhs' was not declared in this scope for (int i = yyprhs[rule]; yyrhs[i] != -1; ++i) ^ Makefile:427: recipe for target 'lscpparser.lo' failed make[3]: *** [lscpparser.lo] Error 1 Raphaël Le 6 févr. 2014 à 21:41, Christian Schoenebeck a écrit : > Ok, I just committed an initial version of the LSCP shell to SVN. The > application is just called "lscp". There is also a man page. > > I decided to go the thin-client route, that is LSCP aware stuff being handled > on sampler side, and the shell application is more or less just forwarding > individual key strokes to the sampler and handling output format (color & > printing) of the returned informations on the command line terminal. That > should make the shell be versatile for being used successfully against > various > LinuxSampler versions, no matter what the exact LSCP version is, and keeps > development/maintenance effort low. > > Current shell features: > > - Colored highlighting while typing (i.e. good portions bold white, > syntactical bad portions red, if the command is complete and ready to > be fired: green, ...). > > - Auto completion by tab key. The shell will also show a possible > completion in real-time while typing. So that one does not need to > guess when it is possible to tab-complete the command. You see it > immediately. > > - Auto correction of trivial mistakes: for now this just covers auto > converting i.e. lower case characters to upper case (if necessary, > according to current LSCP grammar position), space characters to > underscore characters and vice versa (also according to grammar > position). > In future: orthographically similar mistyped keywords might be auto > corrected as well. Not a hard task. > > I actually also planned to integrate the LSCP reference into the shell. That > is, if a certain LSCP command is identified, the shell would automatically > show the relevant LSCP reference document section below the current command > line (and paging the shown LSCP reference with PGUP, PGDOWN keys). > > However ... I have now to work on completely other stuff for a while, so this > spare time fun is postponed for now. > > The Windows version of LinuxSampler is currently broken, because I used the > POSIX termios API to get the required control over the command line terminal. > That API does not exist on Windows. If anybody is interested in trying to fix > this on Windows, it would be very much appreciated! > > That's it for now. > > CU > Christian > > -- > Managing the Performance of Cloud-Based Applications > Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. > Read the Whitepaper. > http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk > ___ > Linuxsampler-devel mailing list > Linuxsampler-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/linuxsampler-devel -- Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk ___ Linuxsampler-devel mailing list Linuxsampler-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxsampler-devel
Re: [Linuxsampler-devel] LSCP shell
On Thursday 06 February 2014 23:23:29 raf wrote: > after updating the svn repos (libgig-svn just in case and > linuxsampler-svn), it fails compiling on lscp.y any idea ? strangely i > found the very same function in lscpparser.cpp > [snip] > lscpparser.cpp -fPIC -DPIC -o .libs/lscpparser.o lscp.y: In function > 'bool _isRuleTerminalSymbol(int)': > lscp.y:1319:18: error: 'yyprhs' was not declared in this scope > for (int i = yyprhs[rule]; yyrhs[i] != -1; ++i) > ^ > lscp.y:1319:32: error: 'yyrhs' was not declared in this scope > for (int i = yyprhs[rule]; yyrhs[i] != -1; ++i) > ^ > Makefile:427: recipe for target 'lscpparser.lo' failed > make[3]: *** [lscpparser.lo] Error 1 Maybe a Bison version issue. Which Bison version are you using? The C arrays yyprhs[] and yyrhs[] are automatically generated by Bison according to the current grammar definition in src/network/lscp.y. However there is something special about them: those two arrays are not required for Bison's basic parser work, they are rather intended to be used for debugging purposes, human readable syntax errors, custom parser code and stuff like that. That's why those two arrays are embedded into C preprocessor macros in the auto generated lscpparser.cpp file by Bison. In my Bison version I just had to add #define YYDEBUG 1 to make those arrays available (I added this define in lscpparser.h). Does your Bison version need another macro maybe? CU Christian -- Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk ___ Linuxsampler-devel mailing list Linuxsampler-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxsampler-devel
Re: [Linuxsampler-devel] LSCP shell
Le 6 févr. 2014 à 22:37, Christian Schoenebeck a écrit : > On Thursday 06 February 2014 23:23:29 raf wrote: >> after updating the svn repos (libgig-svn just in case and >> linuxsampler-svn), it fails compiling on lscp.y any idea ? strangely i >> found the very same function in lscpparser.cpp >> > [snip] >> lscpparser.cpp -fPIC -DPIC -o .libs/lscpparser.o lscp.y: In function >> 'bool _isRuleTerminalSymbol(int)': >> lscp.y:1319:18: error: 'yyprhs' was not declared in this scope >> for (int i = yyprhs[rule]; yyrhs[i] != -1; ++i) >> ^ >> lscp.y:1319:32: error: 'yyrhs' was not declared in this scope >> for (int i = yyprhs[rule]; yyrhs[i] != -1; ++i) >>^ >> Makefile:427: recipe for target 'lscpparser.lo' failed >> make[3]: *** [lscpparser.lo] Error 1 > > Maybe a Bison version issue. Which Bison version are you using? > > The C arrays yyprhs[] and yyrhs[] are automatically generated by Bison > according to the current grammar definition in src/network/lscp.y. However > there is something special about them: those two arrays are not required for > Bison's basic parser work, they are rather intended to be used for debugging > purposes, human readable syntax errors, custom parser code and stuff like > that. That's why those two arrays are embedded into C preprocessor macros in > the auto generated lscpparser.cpp file by Bison. In my Bison version I just > had to add > > #define YYDEBUG 1 > > to make those arrays available (I added this define in lscpparser.h). Does > your Bison version need another macro maybe? i don't know anything about bison... i wouldn't be of any help to track down the problem. my version was 3.0.1, I updated to [seijitsu@astrux linuxsampler-svn]$ bison -V bison (GNU Bison) 3.0.2 Written by Robert Corbett and Richard Stallman. but still got the same error. looking more into the configure output I can see this message with some warnings related to bison : Searching for a parser generator...OK (/usr/bin/bison -y) Generating LSCP parser... lscp.y: warning: 1801 shift/reduce conflicts [-Wconflicts-sr] lscp.y: warning: 1045 reduce/reduce conflicts [-Wconflicts-rr] lscp.y: warning: 1801 shift/reduce conflicts [-Wconflicts-sr] lscp.y: warning: 1045 reduce/reduce conflicts [-Wconflicts-rr] Done then later on, not blocking : checking for ARTS artsc - version >= 0.9.5... no *** The artsc-config script installed by ARTS could not be found *** If ARTS was installed in PREFIX, make sure PREFIX/bin is in *** your path, or set the ARTS_CONFIG environment variable to the *** full path to artsc-config. what bison version do you have ? can a 64bits system make a difference ? Raphaël -- Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk ___ Linuxsampler-devel mailing list Linuxsampler-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxsampler-devel
Re: [Linuxsampler-devel] LSCP shell
On Fri, February 7, 2014 7:41 am, Christian Schoenebeck wrote: > Ok, I just committed an initial version of the LSCP shell to SVN. The > application is just called "lscp". There is also a man page. > > I decided to go the thin-client route, that is LSCP aware stuff being > handled > on sampler side, and the shell application is more or less just forwarding > individual key strokes to the sampler and handling output format (color & > printing) of the returned informations on the command line terminal. That > should make the shell be versatile for being used successfully against > various > LinuxSampler versions, no matter what the exact LSCP version is, and keeps > development/maintenance effort low. > > Current shell features: > > - Colored highlighting while typing (i.e. good portions bold white, > syntactical bad portions red, if the command is complete and ready to > be fired: green, ...). > > - Auto completion by tab key. The shell will also show a possible > completion in real-time while typing. So that one does not need to > guess when it is possible to tab-complete the command. You see it > immediately. > > - Auto correction of trivial mistakes: for now this just covers auto > converting i.e. lower case characters to upper case (if necessary, > according to current LSCP grammar position), space characters to > underscore characters and vice versa (also according to grammar > position). > In future: orthographically similar mistyped keywords might be auto > corrected as well. Not a hard task. > > I actually also planned to integrate the LSCP reference into the shell. > That > is, if a certain LSCP command is identified, the shell would automatically > show the relevant LSCP reference document section below the current > command > line (and paging the shown LSCP reference with PGUP, PGDOWN keys). > > However ... I have now to work on completely other stuff for a while, so > this > spare time fun is postponed for now. > > The Windows version of LinuxSampler is currently broken, because I used > the > POSIX termios API to get the required control over the command line > terminal. > That API does not exist on Windows. If anybody is interested in trying to > fix > this on Windows, it would be very much appreciated! > > That's it for now. > Hi, It compiles fine for me on debian-7.0 64bit. However it crashes on start and I get this backtrace: Reading symbols from /usr/bin/lscp...done. (gdb) run Starting program: /usr/bin/lscp [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Program received signal SIGSEGV, Segmentation fault. 0x7749449a in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (gdb) bt #0 0x7749449a in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 #1 0x00408a4e in operator-- (this=) at /usr/include/c++/4.7/bits/stl_tree.h:203 #2 std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_insert_unique ( this=this@entry=0x60d340, __v=...) at /usr/include/c++/4.7/bits/stl_tree.h:1295 #3 0x00408b7b in std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_insert_unique_ (this=this@entry=0x60d340, __position=..., __v=...) at /usr/include/c++/4.7/bits/stl_tree.h:1348 #4 0x004080d4 in insert (__x=..., __position=..., this=0x60d340) at /usr/include/c++/4.7/bits/stl_map.h:576 #5 operator[] (__k=, this=0x60d340) at /usr/include/c++/4.7/bits/stl_map.h:458 #6 _newTermios () at TerminalCtrl.cpp:26 #7 TerminalCtrl::now () at TerminalCtrl.cpp:93 #8 0x0040a29f in KeyboardReader::KeyboardReader (this=0x60d060) at KeyboardReader.cpp:16 #9 0x00406caa in __static_initialization_and_destruction_0 (__initialize_p=, __priority=) at lscp.cpp:31 #10 _GLOBAL__sub_I_main () at lscp.cpp:249 #11 0x0040a41d in __libc_csu_init () #12 0x769fbe40 in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6 #13 0x00406e11 in _start () -- Patrick Shirkey Boost Hardware Ltd -- Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk ___ Linuxsampler-devel mailing list Linuxsampler-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxsampler-devel