« first day (1140 days earlier)      last day (3341 days later) » 

12:46 AM
@halirutan I don't quite understand the question.
Are you simply trying to pass command line options to the kernel which is used fromt he FE? Or are you looking to evaluate code on startup, not through init.m?
 
@Szabolcs With the command-line kernel you can do for instance
math -run "Print[1]"
 
yes.
 
@Szabolcs What I want to do is something along this:
Mathematica -run "AddTo[$Path, \"MyPath\"]" myNotebook.nb
 
@halirutan Ah, so you mean you start the front end from the command line! Linux?
 
@Szabolcs Most simple implementation of a RunConfiguration for the IDEA plugin. So all operating systems..
 
12:51 AM
@halirutan Have you already checked what the Workbench does?
 
@Szabolcs Unfortunately, yes.
They manage there own links to kernel and FE for this.
 
I see.
 
This is how they can keep the code from the IDE up to date with the FE, evalaluate stuff or debug things.
 
Documented command line options for the front end: reference.wolfram.com/language/tutorial/…
(I don't know the answer, I'm just looking...)
 
@Szabolcs I thought I have tested this because this was what I planned to do
@Szabolcs I don't know why this page suggest that the -run option is for the FE because it is not.
 
12:55 AM
"Wolfram Language input to run (kernel only)"
I guess the initfile is an FE initfile
Which does happen to contain the kernel configuration, which then can theoretically be modified to use startup code.
Why is there an initpath? Can there be multiple FE initfiles which are all read?
 
@Szabolcs Maybe if you want to have different inits for different M-Versions.
 
@halirutan How about this above? :-)
 
@Szabolcs Let me see whether this works for the FE
 
it's still not clear how we can affect a single-time kernel launch only
probably not the way to go
and what if the FE is already running anyway?
 
@Szabolcs This is going to be a problem on OSX and probably Win too. In Linux, everytime a new FE is launched
The situation is really crappy because what I probably can support from within IDEA is to start Mathematica, open a notebook and set the working directory (which lets you load the dev-package you are working on right away).
@Szabolcs All the time I was so damn sure that I can supply at least code that is started so that I can set $Path and load the dev package etc..
(btw, you MATHKERNELINIT does work here kind of)
@Szabolcs Does the MATHKERNELINIT method work on OSX? Because here, the code is really evaluated every time the kernel is started in this session, which is a good thing.
 
1:04 AM
@halirutan But we'd only want it evaluated once, no? Not for every kernel start. There's also the helper kernel that the FE uses for autocompletion.
 
@Szabolcs I would assume you want to be able to test your dev-package you're working on even after the kernel died.
 
@halirutan Yes, it does, if I run the FE from the command line:
 
What I currently do is I extract the executable from the Mathematica SDK and call it with the working directory being the dev-path of your package.
Now the plan is to auto-load the package-context if the user wants it.
 
@halirutan If I run /Applications/Mathematica\ 10.app/Contents/MacOS/Mathematica from the command line, it starts a new instance of the FE every time on OS X. That is what you need, right? So it might actually work.
 
@Szabolcs Really? It didn't for me when I tested it but probably I mis-remember.
@Szabolcs Where do you have the MATHKERNELINIT information from?
 
1:09 AM
I mean open Mathematica.app won't open a new one, but running the executable from within the app bundle will.
 
@Szabolcs That's good news because this is what I'm doing.
 
Just doing this:
 
@Szabolcs Nice. Btw, you can always use env like this:
 env MATHKERNELINIT="-run myvar=111" Mathematica
Should probably work in OSX too
 
This should be a good quick and dirty method. What the Workbench does is more "proper", but I don't think it's worth spending the time to implement it ...
I need to go now, talk later!
 
@Szabolcs Thanks!
 
 
9 hours later…
10:29 AM
@Kuba Thanks for your help!
 
 
6 hours later…
4:10 PM
@MichaelHale I think I managed to extrapolate that there are 301359406576520469424323428352000000 valid variations of face triangles for icosahedron in the "Hamiltonian cycles routing" problem, give or take rotation and mirror symmetries. There might be some computational challenges ahead...
 
@kirma Hm, yeah. I think someone would have to find some clever proof based on the number of possible rotations of the tile compared to the number of faces on the polyhedron, which somehow adds some constraints on the path lengths or something.
 
@MichaelHale Actually, now that I think of it, it's probably easier to approach the problem by trying to generate a counterexample... but that's not what I want! :)
 
I want to live forever, have virtual reality as good as the Matrix, and a spaceship. I'm not sure which is easier.
 
 
4 hours later…
8:13 PM
@Mr.Wizard there is an interesting question stackoverflow.com/q/28838163/4251542 but I can;t vote there
 
8:33 PM
Thanks :)
 

« first day (1140 days earlier)      last day (3341 days later) »