« first day (2472 days earlier)      last day (2310 days later) » 

01:01
Here's a fun way to make it impossible to click on a 500pixel rectangle of a notebook...
FrontEndExecute@
 FrontEnd`AttachCell[
  EvaluationCell[],
  Cell["...",
   CellSize -> {10000, 500},
   CellMargins -> {{-3000, 0}, {0, 0}},
   CellFrame -> False
   ],
  {Automatic, {Center, Bottom}},
  {Center, Top},
  "ClosingActions" -> {"ParentChanged", "EvaluatorQuit"}
  ]
There might be some use for this some day but it's a bit disappointing. I was hoping the attached cell would be behind all the others...
On the other hand this might be very useful. Here's a way to make a left-hand guide to show how large a cell can get:
FrontEndExecute@
 FrontEnd`AttachCell[
  EvaluationCell[],
  Cell["",
   CellSize -> {
     FirstCase[
       Flatten@CurrentValue[EvaluationCell[], CellMargins],
       _?NumericQ,
       66
       ] - 20,
     500
     },
   CellMargins -> {{0, 0}, {0, 0}},
   CellFrame -> {{1, 0}, {1, 1}},
   CellFrameStyle -> GrayLevel[.8]
   ],
  {
   Offset[{10, 0}, 0],
   {Left, Bottom}
   },
  {Right, Top},
  "ClosingActions" -> {"ParentChanged", "EvaluatorQuit"}
  ]
01:21
Hey there b3m2a1, are you into statistics at all?
01:38
@duhaime I like to do it for fun, but if you have actual stats questions direct them to @JimB
3
I just like to mess around with data
 
6 hours later…
07:58
@b3m2a1 What do you mean by behind all others?
Is three any extensive discussion about naming conventions? In particular about {Do}{Stuff} vs {Stuff}{Do}.
08:16
@Kuba I made an attached cell in a cell above another one and I was hoping it'd be layered behind the cells below so I could still click on those.
@b3m2a1 so it would be on top the parent cell but below of the rest of cells?
08:26
@Kuba optimally it'd be below all cells
I attach it to the parent, but I'd be thrilled if it were on a lower layer
Or in some way transparent to clicks. I just want it for its frame.
@b3m2a1 Ah, I see now. Well, I consider it an edge use case since you usually want to interact with floating elements. So yes, an option would be on point.
@Kuba yeah it's certainly an edge case. Just one that's useful in writing templates and things.
I ran into another edge-case today of wanting to be able to use TextData form cells in inline cells too
Because I want clean subscripts when I have to write like C_{2v}
Since it's all StandardForm it forces spacing between 2 and v and it's impossible to remove that since the inline cell is a BoxData form
@b3m2a1 I see, here is another workaround but probably I would not use it:
BoxData[
 RowBox[{"whatever", " ", Cell[BoxData[SubscriptBox["C", Cell["2v","Text"]]], "Text"]}]]
08:53
@Kuba my hope was to be able to do it at the stylesheet level. Manually I do it by inserting an [InvisibleSpace] (esc is esc)
It collapses the space
ah, right.
09:38
@b3m2a1 "in some way transparent to clicks" I think what you want is the EventHandler PassEventsDown but for cells. In JavaScript one can control whether to capture or pass on events very well, we'd want something like that, I think. (Events also travel down and then travel up, so you can catch them either on the way down or on the way up.)
@C.E. problem is I don't think you can tell a Cell to PassEventsDown
No, I'm just dreaming about what we would want.
Oh I see
Makes sense
The problem, of course--that AttachedCell was clearly invented to fix--is that a notebook is expected to just be a linear unlayered scroll so who knows how willing the FE people would be to add support for these non-linear layered things
 
2 hours later…
11:33
Any help?
1
Q: Simplify (or Reduce) a system of inequalities intelligently

apt45I have the following system of inequalities of 4 real variables 3 (a + b) + 4 (d + c) > 0 && 2 (a - d) + 3 (b - c) > 0 The system can be written as a system of 3 independent variables using the following variables a+b=x d+c=y a-d=e b-c=x-y-e 3x+4y>0 && -e +3(x-y)>0 Is there a way to do thi...

@Nasser Are you around by any chance?
12:29
is there a way to get TabView to trigger something when I change tabs?
 
1 hour later…
13:34
@halirutan hi. I just saw your ping. I am about to leave to school. something I can answer before I do?
@Nasser Yes. We prepared a small summary for Rubi to publish it in the Journal of Open Source Software.
Would you mind to read of the text and provide me with an orcid and your affiliation?
(you can do this when you are back and have time)
@halirutan wow, that sounds great! I will look forward to read it. FYI. There was a post about RUBI tests on FRICAS forum. groups.google.com/forum/#!topic/fricas-devel/AvPjx6o4da8 Yes, will read it if I know where it is posted. Thanks.
(An orcid is a number that uniquely identifies an author. You just need to register there orcid.org)
@halirutan Oh, so you want me to register at orcid.org and send you the ID that I get? Ok, will do that when class is over. Later this afternoon. Cheers.
@Nasser Yes, you are co-author of the paper!
13:41
@halirutan OMG! I am a co-author of a paper, wow!. Will read it as soon I am back from school. bye.
I ping you on gitter and give you the link.
14:34
@KraZug TabView[{...}, Dynamic[tab, (tab = #; something)&]]?
15:20
@Kuba, nothing to put it on each tab individually? I suppose I can put a check on what the current value is to determine which event to perform.
This is my first time I've built anything like this Apple segmenting app I'm creating
and hence my skills with Dynamic are somewhat limited
A Switch within the argument like that has worked though, thanks.
15:51
@kglr, can we chat anytime? If you can give me email. I would really appreciate it. Here is my info business.humboldt.edu/people/ramesh-adhikari
 
1 hour later…
17:12
posted on October 25, 2018 by Christopher Carlson

Images and machine learning were the dominant themes of submissions to the One-Liner Competition held at this year’s Wolfram Technology Conference. The competition challenges attendees to show us the most astounding things they can accomplish with 128 or fewer characters—less than one tweet—of Wolfram Language code. And astound us they did. Read on to see [...]

@KraZug you can do something like mathematica.stackexchange.com/a/26069/5478 depends on your use case
18:30
What is the right way to load packages that are needed for a palette?
@C.E. If your palette gui is dynamically created when it is opened then via asynchronous initialization. If your palette gui is pregenerated and you only call package functions from palette's buttons/controllers then I just write:

Button["something", Block[{$ContextPath}, Needs["MyPackage`"]; Something]
You can always add Needs to initialization anywa, for faster execution on the first click.
@Kuba How do I generate the palette dynamically? From what I can tell, I need to place a palette notebook in FrontEnd/Palettes to have it show up in the menu.
And how do I specify initialization? That sounds like what I was after, but I didn't find it.
@C.E. I meant it's gui rather than the paletten .nb. Something along those lines is saved then:

CreatePalette[DynamicModule[{}, Dynamic[Refresh[gui[], None]], Initialization:>(needs)]]
ah, that seem like a good idea.
But many palettes are just static with few buttons inside so gui[] would be evaluated when it is first started.
18:42
I'm going to try it out.
If you can do this, it is better because of problems Dynamic has on kernel quits etc
Sometimes you need more interactive gui, then you need to proceed as above
I'm going to experiment with this.
@C.E. at the end a palette is just a notebook. So you can do whatever you want, you can even embed definitions:

https://mathematica.stackexchange.com/a/86707/5478

And if not, just call Needs from Initialization instead of injecting them there.
But if it is just a column with buttons, then ignore it and use the button idiom I've written above.
Anyone familiar with c++? I'm going to play with it a little an I wonder if there is a point of having VS installed if there is a plugin to IntelliJ and I use it for WL anyway.
19:09
@Kuba I suggest you start from the command line. VS is too complicated. You can use any editor you like. VSCode and Qt Creator and nice and not too difficult to set up.
Instead of IntelliJ, you might use CLion, but it requires you to learn cmake. So you will need to learn both C++ and cmake at the same time. Maybe that's too much.
@Szabolcs Hmm, wasn't expecting that but ok :)
Thanks
@Szabolcs but then I need to independently setup compiler etc, right?
I thought IDEs should be plug and play for something like c++
@Kuba, thanks. I have so much to learn about Dynamics.
Is there any part of the tutorials/documentation that you would recommend
19:25
@KraZug there are Introduction to Dynamics and Advanced Dynamic Functionality tutorials. Those are a must. Then I recommend searching for examples here in SE.
@Kuba, Yes, I've read through those thanks. I've been working this week to make a semi-automated image analysis gui and have it working reasonably well. Just some bits of it are rather cludgy and I feel like I still don't have a good handle on why bits work.
@KraZug if you have quick questions that are not suited well for the main page you can always ask here. Ping me and maybe I will be around to help, if not there are others. Ping @b3m2a1 too.
Thanks, that's appreciated.
19:50
@Kuba Should it work with just PaletteNotebook[DynamicModule[{palette stuff}, Initialization :> Needs[]], or is the Dynamic and Refresh necessary?
20:01
@C.E. If the gui is not dynamic, e.g. it only is something like Column[{__Button}] then you don't need dynamic and refresh.
ok thanks
@C.E. Here's a very related topic about that: mathematica.stackexchange.com/q/167/5478
@C.E. here is a very simple script I use for a very simple palette for my MD converter: github.com/kubaPod/M2MD/blob/master/build.m
@Kuba Thank you, it's much appreciated. I am trying not to load the package in every button though.
I'll have to continue with this tomorrow... but again, thank you very much.
Kuba linked to that one, I've tried NotebookDynamicExpression and I've tried Initialization on DynamicModule it seems like they don't load the package :/
20:25
@C.E. Needs does not load the package if it was loaded.
I find a Block solution nice because Initialization will pollute global ContextPath while Blocks keep your package context in $Packages and only fetch it for the action.
ok, I will keep it in mind.
@C.E. @Szabolcs and others, how do you deal with propagating options between top level functions?
I have a very small feature but already an options pattern looks like this:

opts: OptionsPattern[{ThisPackageFunction, PackageFunctionA, PackageFunctionB, CreateDocument, BaseStyle -> {}}]

And then I need to do very similar ugly lines to FilterRules to appropriate functions inside.

Another pain is that CreateDocument options may not be needed by ThisFunction at all, but PackageFunctionA may need it. And I don't want Options[PackageFunctionA] to contain Options[CreateDocument], for clarity fo
I always found options management a pain. https://mathematica.stackexchange.com/q/82626/5478

But since I do mostly gui based solution I didn't need to care about them much. Users won't use them and I can manage my code differently.
I must say I find 'strictness' of OptionsPattern very cumbersome. I'd love it to only validate few selected options while being able to pass everything around anyway. And whatever was entered or is mentioned in Options[_], should be available in OptionValue.
Since I don't care about validation so much I am just a one step from not using it, but I need OptionValue that knows default options and current ones aswell.
20:53
Hmm, it is good to make the grief public, it motivates to search for solutions more. I think I have one that does fits my needs:
OptionLookup[name_, function_, explicit_List] :=
 OptionValue[function, FilterRules[explicit, Options[function]], name]

ClearAll[foo];
Options[foo] = {a -> a0, b -> b0};

foo[x_, opts___Rule] := {x, OptionLookup[a, foo, {opts}]}

foo[7] (*works*)
foo[7, a -> 1] (*works*)
foo[7, AnotherOption -> 1] (*no message, yes!*)
21:23
Hello. I am using maxima, which is similar to mathematica (from what I understand). I believe I have a simple question: How do I put the eigenvalues of a matrix in a list, so that I can compute the largest eigenvalue?
From what I'm reading, if M is a matrix, then eigenvalues(M) is a list containing two lists, the first is eigenvalues of M itself, the second is their respective multiplicities. So I guess what I need to define a new list be the extraction of the first list from eigenvalues(M)...Not sure how to do that, however.

« first day (2472 days earlier)      last day (2310 days later) »