Re: [fricas-devel] Documentation patches
> I compiled the book successfully, it works like a charm! Thank you. > One comment: to enable pdf hyperlink, you need to use > "latex" to compile the source twice. book.ps: book.dvi makeindex book ${MAKE} $< ${MAKE} $< dvips $< Oh... OK. Seems like I optimized too much recently, so that latex was not called as often as I intended. Thanks for the hint. I will look into this issue. > Also, can you explain more about your thought behind > commit "compile user guide into book.tex", so that I > can catch up to it and review it more effectively. I don't think it is worth to waste your time with a review, but to explain the whole process, I need more time. Wait a little. I try to put the things together. Unfortunatly, although I've put some comments into src/doc/Makefile.in, it id not soo easy to see what is going on before latex can be started. In short. There are pictures generated (the graphics in the book). Some .ht pages are created from the .htex files. The commands in the .htex files are executed and their output is collected (as tex output) back into the .tex file. More details later. Maybe I add it to the beginning of the Makefile.in. > Once this is merged, I'd like to improve this documentation > book more. Maybe here our views differ. I somehow tend to keep the book close to its original form and rather create a new book or other forms of tutorials, but if more people rather want to see a modernized version of the content of the book, I am not against such a change. In the end it is much more important for current users to have helpful documentation. The historical version of the book can always be retrieved from the time when my commits are included. That is why we have version control. Ralf -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To unsubscribe from this group and stop receiving emails from it, send an email to fricas-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/fricas-devel/835b5b67-b1e6-2b57-d371-3a2967022bfd%40hemmecke.org.
Re: [fricas-devel] GAWK?
> Yes, FriCAS should build with different awk, in particular mawk. OK. > From mawk manual: > > : Program flow at the pattern {action} level can be changed with the > : > :next > :exit opt_expr > > so it seems that you are not allowed to use next in functions. Yes, that would also be my interpretation. However, clearly, one can only interpret it this way if one runs into that error. Unfortunately, then I don't understand, why mawk seemingly allows to replace my "next" by "exit 1" and does the right thing without signalling "exit not allowed in this position". The description above is not very clear if one must run the program to see how it behaves. Ralf -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To unsubscribe from this group and stop receiving emails from it, send an email to fricas-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/fricas-devel/680cef7f-cf89-a1d6-6772-8510ae395dd8%40hemmecke.de.
Re: [fricas-devel] GAWK?
On Tue, Sep 08, 2020 at 10:20:18PM +0200, Ralf Hemmecke wrote: > Waldek, > > I usually install gawk on my machine, but on testing Debian 10 I didn't. > FriCAS configure ran fine with the default mawk, but failed at my ht.awk > script in the "formatted" branch. > > mawk complained about the "next" in line 554. > > https://github.com/hemmecke/fricas/blob/formatted/src/doc/ht.awk#L554 > > Before a try to look what is to be changed, can you confirm that FriCAS > should run fine with any awk? > > The code in configure.ac > https://github.com/hemmecke/fricas/blob/formatted/configure.ac#L101 > claims at least for solaris9 that gawk is needed. Yes, FriCAS should build with different awk, in particular mawk. Solaris is somewhat special. Some "standard" Solaris tools were/are extremaly old fashioned it make no sense to support so old tools on rare platform. OTOH there were fixes to our awk scripts and there is good chance that they will work now. But it seems that nobody tried Solaris in many years so we keep it without change. > Is FriCAS supposed to work with mawk? Can we require gawk in general or > would you rather like to be able to build with any awk? > > If it is any awk, then what is the language that is accepted for FriCAS > awk scripts, since there are quite a few differences between the various > awks. There is Posix standard for awk so core language should be the same on all reasonably modern awk. In practice we deal with issues in reactive manner: it there is a problem we fix it. Currenly mawk is main alternative... IIRC manual for GNU awk said which parts are standard and which are extentions. > > In that "any awk case", it would be helpful to know the reason why mawk says > > make[3]: Entering directory '/home/hemmecke/scratch/fricas/src/doc' > mawk -f /home/hemmecke/g/fricas/src/doc/ht.awk > /home/hemmecke/g/fricas/src/doc/htex/ug02.htex tmp > ug02.ht > mawk: /home/hemmecke/g/fricas/src/doc/ht.awk: line 554: improper use of next > make[3]: *** [Makefile:477: ug02.ht] Error 2 >From mawk manual: : Program flow at the pattern {action} level can be changed with the : :next :exit opt_expr so it seems that you are not allowed to use next in functions. -- Waldek Hebisch -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To unsubscribe from this group and stop receiving emails from it, send an email to fricas-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/fricas-devel/20200909105421.GB39118%40math.uni.wroc.pl.
Re: [fricas-devel] an interesting bug, regarding sman (low level C stuff)
On Wed, Sep 09, 2020 at 06:08:32PM +0800, oldk1331 wrote: > > > What about the attached patch. It skips 'memset' which seem > > to be not needed at all and cleans up relevant parts. > > Hi Waldek, I'm afraid you forget to include the attachment. > Oops, second time. -- Waldek Hebisch -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To unsubscribe from this group and stop receiving emails from it, send an email to fricas-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/fricas-devel/20200909103047.GA39118%40math.uni.wroc.pl. diff --git a/src/lib/sockio-c.c b/src/lib/sockio-c.c index 30e0eba5..5878cfb1 100644 --- a/src/lib/sockio-c.c +++ b/src/lib/sockio-c.c @@ -752,13 +752,13 @@ connect_to_local_server(char *server_name, int purpose, int time_out) return NULL; } /* connect socket using name specified in command line */ - memset(server[1].addr.u_addr.sa_data, 0, - sizeof(server[1].addr.u_addr.sa_data)); sock->addr.u_addr.sa_family = FRICAS_AF_LOCAL; - strcpy(sock->addr.u_addr.sa_data, name); + strcpy(sock->addr.pad + + ((char *)(&(sock->addr.u_addr.sa_data)) + -(char *)(&(sock->addr.u_addr))), name); for(i=0; isocket, >addr.u_addr, - sizeof(sock->addr.u_addr)); + sizeof(sock->addr.pad)); if (code == -1) { if ( /* @@@ Why we need this */ @@ -923,12 +923,13 @@ open_server(char *server_name) server[1].socket = 0; return -2; } else { -server[1].addr.u_addr.sa_family = FRICAS_AF_LOCAL; -memset(server[1].addr.u_addr.sa_data, 0, - sizeof(server[1].addr.u_addr.sa_data)); -strcpy(server[1].addr.u_addr.sa_data, name); -if (bind(server[1].socket, [1].addr.u_addr, - sizeof(server[1].addr.u_addr))) { +Sock * sock = &(server[1]); +sock->addr.u_addr.sa_family = FRICAS_AF_LOCAL; +strcpy(sock->addr.pad + + ((char *)(&(sock->addr.u_addr.sa_data)) + -(char *)(&(sock->addr.u_addr))), name); +if (bind(sock->socket, &(sock->addr.u_addr), + sizeof(sock->addr.pad))) { perror("binding local server socket"); server[1].socket = 0; return -2; @@ -936,11 +937,12 @@ open_server(char *server_name) #ifdef HAVE_SO_NOSIGPIPE /* macOS doesn't have MSG_NOSIGNAL, so use SO_NOSIGPIPE instead */ int set = 1; -setsockopt(server[1].socket, SOL_SOCKET, SO_NOSIGPIPE, (void *), sizeof(int)); +setsockopt(sock->socket, SOL_SOCKET, SO_NOSIGPIPE, + (void *), sizeof(int)); #endif -FD_SET(server[1].socket, _mask); -FD_SET(server[1].socket, _mask); -listen(server[1].socket, 5); +FD_SET(sock->socket, _mask); +FD_SET(sock->socket, _mask); +listen(sock->socket, 5); } s = getenv("SPADSERVER"); if (s == NULL) {
Re: [fricas-devel] Documentation patches
Hi Ralf, I compiled the book successfully, it works like a charm! One comment: to enable pdf hyperlink, you need to use "latex" to compile the source twice. Also, can you explain more about your thought behind commit "compile user guide into book.tex", so that I can catch up to it and review it more effectively. Once this is merged, I'd like to improve this documentation book more. Best, Qian On 9/7/20 12:35 AM, Ralf Hemmecke wrote: > BTW, note that for compiling the book you must have the following > packages installed: > > epsf > verbatim > hyperref > color > listings > makeidx > xparse > tikz > framed > amsmath > tensor > mleftright > > Ralf > -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To unsubscribe from this group and stop receiving emails from it, send an email to fricas-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/fricas-devel/4abe41a3-6c8b-ec67-e8e3-dcd9e813ea1d%40gmail.com.
Re: [fricas-devel] Tips and tricks for building FriCAS in mingw64 on windows
Hi Greg, I tried your exe on Windows 10 and it works very well. I guess your installer works similar with https://github.com/nilqed/fricas_w32 . I agree it's a good idea to provide a windows binary without graphics, it'll enable more people to give FriCAS a try. Best, Qian > BTW I own a NSIS script to build a self installer if Waldek and others > want a self installer for download. > It supports uninstallation via start menu or configuration panel > (registry key), icons in start menu etc. > > If you want you can test the installer and remove FriCAS easily, the > FriCAS self installer is available here: > https://drive.google.com/file/d/1Ir7p6UF6O13QYh-bHqmwbwPTBr38Kn33/view?usp=sharing > > I would be happy if you can test it, though I need to update the > FriCAS version. I hesitate between a stable release or the lastest > GitHub version. > > I think it would be good to provide this type of installer to "a give > it a try" to Windows users even if it has no graphics nor hyperdoc. > If they like FriCAS or are more curious and they own Windows 10 they > can switch to a full FriCAS with graphics and Hyperdoc or only in > terminal mode on WSL 2. I wrote in the past two tutorials to build > FriCAS on WSL 2 with or without Xorg: > https://groups.google.com/g/fricas-devel/c/k-k0TNsn2ro/m/UUgmR0cPBQAJ > It explains also what is needed to be installed on MSYS2. > > Cheers, > > __ > Greg -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To unsubscribe from this group and stop receiving emails from it, send an email to fricas-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/fricas-devel/807bc75c-3531-8fa1-2a75-5e5515b01196%40gmail.com.
Re: [fricas-devel] an interesting bug, regarding sman (low level C stuff)
> What about the attached patch. It skips 'memset' which seem > to be not needed at all and cleans up relevant parts. Hi Waldek, I'm afraid you forget to include the attachment. -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To unsubscribe from this group and stop receiving emails from it, send an email to fricas-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/fricas-devel/c759384e-e6de-74ca-8a01-11d8c2128ad0%40gmail.com.