Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
William Stein
@williamstein
(In general, look in /cocalc/supervisor/supervisord.conf to see what happens when now projects start.)
For the record I don’t like the name project.init so much, so we’ll likely change it, though maybe keep it working for backward compatibility...
Harald Schilly
@haraldschilly
@gabindu hi, I'm the one who added this as a test. Once I know a better name I'll change it. Also ,there'll only be one entry for such a daemon script (which won't restart if the exit value is 0). Maybe we should have two for python and bash script, e.g. project_init.py and project_init.sh.
Gabriel Indurskis
@gabindu
cool, that's great to know, I've actually just put it in .bashrc for the moment (dropbox start; dropbox status), which works even if it was already running, and gives a quick feedback on the current status whenever I open a terminal. (By the way, this could be a neat feature for the future: add a custom tray icon/status area in the status bar somewhere which can be accessed by scripts.)
(to show the status of running daemons etc.)
Harald Schilly
@haraldschilly
yes, .bashrc is run when you open the terminal, but a restarted project doesn't run anything by default :-)
I think in your case it's sufficient if you make this project.init file with the content
#!/usr/bin/env bash
dropbox start
Gabriel Indurskis
@gabindu
very good point, so this is definitely better in the long run (just move the dropbox start into project.init, and leave the dropbox status in .bashrc. ;-) )
Harald Schilly
@haraldschilly
yes
and well, it will break when we rename the supposed name of this magic file ... but that's the cost of using unreleased features :-p
Gabriel Indurskis
@gabindu
oh, that's quite alright, I'm used to living on the edge. ;-)
But thinking about the Dropbox relinking issue some more, I begin to wonder if the changing IP address is really the culprit: most laptops and other devices will have wildly changing IP addresses. So it's a bit of a mystery to me why DB stops syncing. I guess I'll have to do more testing to identify when it actually happens - for the moment I've increased the timeout for this particular project so that it'll (maybe) never restart.
Thanks for the help and insight!
Harald Schilly
@haraldschilly
well, it definitely stops when the project stops. everything your run in your project is containerized.
I'm not a user of dropbox, but I'm curious if there is somewhere a logfile?
There might be some explanation inside of it (maybe in ~/.local/... or so)
Gabriel Indurskis
@gabindu
The default daemon script doesn't keep any log files unfortunately, but it keeps various config and account information files in ~/.dropbox
Harald Schilly
@haraldschilly

I just started it:

$ find ~/.dropbox/logs/
/home/user/.dropbox/logs/
/home/user/.dropbox/logs/0
/home/user/.dropbox/logs/1
/home/user/.dropbox/logs/1/1-59b028a2

but no idea if this stays there after a restart

Gabriel Indurskis
@gabindu
hm, yes, just checked in my own folder, there is indeed a logs folder, with two subfolders, but no files in it.
Harald Schilly
@haraldschilly
well, no idea actually. that logfile here above contains some binary information... weird
Gabriel Indurskis
@gabindu
I just did a test restarting the project and the dropbox daemon manually. It then indeed recreates logfiles in that directory - but they are all binary files. I tried gunzip and tar tfz as some obvious candidates, but file only returns data as file type.
Anyhow, the more important observation is that restarting the project manually does not affect the dropbox daemon, the account stays linked. So maybe the issue only arises when the project has been stopped for a longer period of time. The dropbox daemon keeps track of a hostkey in one of its config files in .dropbox, so my guess is that this somehow is recomputed and gives a different value under certain circumstances.
But let's not waste too much time with this now, I'll investigate this some more if and when it happens again. Until then, back to more important work. ;-) Thanks again!
Gabriel Indurskis
@gabindu
Just as a quick note to others who read this and want to use project.init (until it gets renamed): it has be an executable file, so make sure to use chmod a+x project.init
William Stein
@williamstein
Projects are no longer attached to specific host computers — when you restart them (or stop and start them later) — they come up on the “best” (by some criterion) available host. That may or may not be the same computer you were using before.
This model is much more efficient. For example, when a pre-emptible node goes down, all the projects running on it fan out to the rest of the cluster and are running again in seconds, rather than waiting 10 minutes for the preemptible to full boot up, bootstrap, join the mesh network, etc.
Gabriel Indurskis
@gabindu
I see, that makes a lot of sense - and might indeed explain the Dropbox relinking problem.
iara iapc
@iaraiapc
127/5000
Hello everyone. Is there a command equivalent to "typeset (True)" for Jupyter? I want the outputs of the evaluations to be pretty.
ops, "typeset _mode(True)"
iara iapc
@iaraiapc
Hi W Stein
thanks for this ;) it works now
Gabriel Indurskis
@gabindu
Hi there, I just hit a weird problem from one moment to the other: typeset math in a Sage worksheet suddenly doesn't display anymore. For example: A=matrix(2,2,[1,2,3,4]); show(A); A only shows the non-typeset version of the matrix. I've tested with Chrome and Firefox, so it doesn't seem to be a browser issue (in particular since it did work just a few minutes ago...) Was there a (very) recent change in the backend to cause this? Thanks for checking! (my students are writing an exam this week on CoCalc, so I do hope we can fix this quickly...)
Gabriel Indurskis
@gabindu
ah, it just came back and now seems to work again. No idea if this was just a temporary issue on my end or a fix on your end, but thanks in any case (and sorry for the false-alert if it was indeed on my end). ;-)
Michael McNeil Forbes
@mforbes
Is there any way to use Notebooks in the CoCalc environment using something like the RISE extension? I can't find reference to this, so I suspect not, but we have some upcoming presentations where most students are using Jupyter notebooks and I thought it would be a nice way for them to show their work.
Ah. I missed sagemathinc/cocalc#2158. Could be very useful.
William Stein
@williamstein

Was there a (very) recent change in the backend to cause this?

I changed the frontend to not show raw stuff when rendering mathjax; maybe it was taking a little while to load...

Incidentally, if you use the new share server by making files public, then it does all mathjax rendering on the server rather than in the browser, so it is much faster for the browser to load/show, smaller, and uses way less resources (not javascript at all)...
William Stein
@williamstein

Is there any way to use Notebooks in the CoCalc environment using something like the RISE extension? I can't find reference to this, so I suspect not,

It definitely must be possible, but I've not tested/tried. You can install any extension locally in a project and use it with the Plain Vanilla Server (link from project settings)...

Gabriel Indurskis
@gabindu

I changed the frontend to not show raw stuff when rendering mathjax; maybe it was taking a little while to load...

I've been having these issues repeatedly since last I reported it, mostly in Chrome, Firefox seemed to be doing a bit better - always with Sage worksheets with lots of matrices, and some directed graphs. Possibly relatedly, I've also had a frightening number of "worksheet could not be saved to the server" recently (this while I had a very stable network connection, and other worksheets which were open at the same time had no trouble saving). When this happened for a worksheet, I could also not access TimeTravel. (on a related note, I noticed that the hidden history files which used to be in the same folder have disappeared, have they gone somewhere in the backend, or in a snapshot folder now?) Anyways, I'm almost done with my marking, and there were no issues during my exam, so it's not super-urgent for me, but maybe worth investigating some more in case this is a more serious issue. Thanks in any case, William!

William Stein
@williamstein

(on a related note, I noticed that the hidden history files which used to be in the same folder have disappeared, have they gone somewhere in the backend, or in a snapshot folder now?)

There are no hidden history files -- the last time those were, was several iterations of realtime sync ago (years ago).

I could also not access TimeTravel.

What does this mean precisely?

Gabriel Indurskis
@gabindu
when the "cannot save worksheet" problem occurs, clicking on TimeTravel tries to open the history file, but is stuck loading it (the file remains empty and unresponsive).
William Stein
@williamstein
Further discussion here: sagemathinc/cocalc#2561
Michael McNeil Forbes
@mforbes
What is the recommended procedure for "regrading" an assignment? I made comments in the student's notebooks, but then many of them did their corrections in the "graded" folder so they did not get collected a second time. This is discussed a bit in sagemathinc/cocalc#465 but a recommended workflow has not been provided.
William Stein
@williamstein
We have absolutely no support for regrading of assignments. For some reason I've not even thought about this. Duh. Can you make a new issue and tell us what YOU want? We will prioritize it highly.
iara iapc
@iaraiapc
Hello everyone. Does anyone know which algorithms the solve () function of sympy uses?
Vijay Sharma
@Eulerianial
@iaraiapc You can see the code in following file: /ext/sage/sage-8.1/local/lib/python2.7/site-packages/sage/symbolic/relation.py. You can always (?) to get more info. For example: "solve?" solve is using the routine from Maxima internally in the code.
dv-extrarius
@dv-extrarius
I'm having trouble getting 'from future import print_function' working in a sage worksheet on cocalc. It doesn't seem to make any difference - print(a,b,c) acts like I'm printing a tuple, not calling the print function. Any ideas?
a boy
@a-boy
By using Sagemath, I wrote a proof for Goldbach's Conjecture. gold(n) < prime_pi(n)+sigma(n,0)