This is a tutorial worksheet for SageMathCloud's Julia interface. This is orthogonal to IJulia and is a completetely different approach.
See http://julia.readthedocs.org/en/latest/manual/getting-started/
WARNING: Currently if you put %julia at the start of a cell it will be properly Julia syntax highlighted. If you just switch to Julia mode (with default_mode), then Python syntax highlighting happens instead. This is a temporary "not implemented" issue and won't be hard to fix.
3
3
Note that % modes do work here (we have markdown right here), unlike in IJulia, and you can escape to different other systems, convert variables back and forth, etc.
'1225'
1225
1235
1235
Sage pexepct modes have some interesting depth, for example:
57
0.43616475524782494
Back to the tutorial...
Greetings! 你好! 안녕하세요?
10
11
2
"Hello World!"
1.0
-3
"My string"
"Hello world!"
"人人生而自由,在尊严和权力上一律平等。"
"Hello"
1.00001
π = 3.1415926535897...
Warning: imported binding for pi overwritten in module Main
3
10.0
Warning: imported binding for sqrt overwritten in module Main
4
10
0.20689655172413796 + 0.5172413793103449im
"Hello, world.\n"
"Hello, world.\n"
f (generic function with 1 method)
5
∑ (generic function with 1 method)
5
5
Error in lines 1-1
Traceback (most recent call last):
File "/projects/4a5f0542-5873-4eed-a85c-a18c706e8bcd/.sagemathcloud/sage_server.py", line 862, in execute
exec compile(block+'\n', '', 'single') in namespace, locals
File "", line 1, in <module>
File "/projects/4a5f0542-5873-4eed-a85c-a18c706e8bcd/.sagemathcloud/sage_server.py", line 897, in execute_with_code_decorators
print code_decorator.eval(code, locals=self.namespace),
File "/projects/4a5f0542-5873-4eed-a85c-a18c706e8bcd/.sagemathcloud/julia.py", line 114, in eval
raise RuntimeError(julia_error)
RuntimeError: ERROR: i not defined
hypot (generic function with 1 method)
5.0