« first day (2683 days earlier)      last day (1810 days later) » 

1:13 AM
Why does `Table[Round[123.810284, 10^n], {n, -5, 0}] // N` output `{123.81, 123.81, 123.81, 123.81, 123.8, 124.}`? I've read the docs. Did I miss something trivial?
I've managed to achieve what I want with `Round2[x_, n_] :=
If[n > 0, Round[x, n], NumberForm[x, {\[Infinity], -n}]];`
 
 
4 hours later…
5:38 AM
@WeavingBird1917 By default, machine numbers only print with a maximum of 6 digits of precision. If you want more digits to be displayed, you can use the Style option PrintPrecision, e.g., Style[Table[Round[123.810284,10^n],{n,-5,0}]//N,PrintPrecision->8]
 
 
3 hours later…
8:34 AM
Has anybody checked if Mathematica performs persistent HTTPS requests, that is, doesn't open a new connection for each of them when communicating with the same host?
On basis no indications the feature could be controlled by provided APIs I'm a bit cynical about it.
 
 
4 hours later…
12:24 PM
Oh I see, thanks! I'll stick to the custom function as it preserves trailing zeroes.
 
 
2 hours later…
2:48 PM
Is anyone else getting "Provided Wolfram Engine binary path does not exist." when trying to install Wolfram Language for Jupyter on Linux?
Meh, I didn't specify the right path. ConfigureJupyter["Add", "WolframEngineBinary" -> "/usr/local/Wolfram/WolframEngine/12.0/Executables/wolfram"] worked in case anyone else is thinking of installing this. I used the standard paths when installing Wolfram Engine.
 
 
2 hours later…
4:51 PM
@C.E. It should point to a WolframKernel.
 
@halirutan thanks, for some reason it started working anyway.
 
@C.E. I cannot get the kernel working. What I mean is that I can successfully create the kernelspec file required by Jupyter. The contents there looks good, but I cannot get the kernel to start in a Jupyter notebook.
Are you on Linux as well?
 
@halirutan Yes, in my workplace I am and that is where I tried it. Ubuntu 18.04.
 
@C.E. And you could evaluate something in a Jupyter notebook?
 
Yes, I made some beautiful plots and stuff.
 
5:00 PM
@C.E. Yeah, so thats that... Encouraged by your success I could debug it in seconds..
You need to use the WolframKernel from the Executables directory. What didn't work for me was
/usr/local/Wolfram/Mathematica/12.0/SystemFiles/Kernel/Binaries/Linux-x86-64/WolframKernel
because then the shared libraries are not included correctly in the LD_LIBRARY_PATH.
Now it works as well.
@C.E. I really wished we had some more Java devs here. I don't think that implementing the messaging between Jupyter and the evaluating Wolfram Kernel in the Wolfram Language itself is particularly nice. Hard to debug and we cannot use any of the features (highlighting, code-completion) we already have in e.g. the IntelliJ Plugin.
 
@halirutan Sadly, Java is not a prioritized language for me.
 
5:47 PM
@halirutan I thought the basic Jupyter interface was python based? How would Java help?
 
 
2 hours later…
7:38 PM
Right now it works like this:

A WL program connects to Jupyter through ZMQ. It retrieves the code in a cell, evaluates it, and send the result back. The evaluation and the ZMQ communication run in the same kernel, in fact technically in the same evaluation (In[1]). The innards of the system are hanging out and the behaviour is not as we expect on a standard Mma command line.
A potential fix is that the evaluations are done in a separate compute kernel.
Each evaluation is a true separate kernel evaluation. Uncaught Throws wouldn't run away, Dialog would work, Trace would work, everything would work the same way as usual.
But it'd use a 2nd kernel license.
Yet another option is that the Jupyter communication code is not written in WL. It could be written in some language that has access to MathLink. It would control the WL kernel through MathLink and it would communicate with Jupyter through ZMQ.
There are basically two languages to choose from for this: C or Java.
 
8:18 PM
@Szabolcs ahhh I see. I mean if I had the time I could also make my Python MathLink package do it...but it’s a lot of work and I’m not sure I have the energy for that.
If the Jupyter stuff provides more direct python hooks though that’d be probably another good option.
 
@b3m2a1 Szabolcs nailed it.
 

« first day (2683 days earlier)      last day (1810 days later) »