« first day (2928 days earlier)      last day (1545 days later) » 

1:44 AM
@CarlLange if I had to guess, GeoGraphics will support this kind of approach just with more expensive renders
 
 
2 hours later…
3:45 AM
I've been working with Docker recently and I have to say I'm low-key in love. It cures so much of dependency hell...
Kind of a shame you can't really use it (I think...?) for like distributing something like a MathLink extension to Mathematica
 
 
3 hours later…
7:15 AM
Let's say that StringTemplate has some built in tokens e.g. NL -> "\n" etc. Would you prefer to be able to access it with slot names:
StringTemplate@ "customText `NL``otherField`"
or via dynamically scoped symbols:
StringTemplate @ "customText <*NL*>`otherField`"
 
7:30 AM
@Kuba Python provides both of these forms in recent versions and I know a lot of people really like the second
I still stick with the first because it was the original and the way I learned it, but I'll probably move to the second so as to not become an old fogey
Of course since python is partially compile there's actually a performance benefit to the second
Ah sorry misunderstood what you were getting at. You're talking about a set of pre-defined additions?
In that case I'd probably stick with the former
 
@b3m2a1 I prefer the second one because:
- more general you can expose NL[n_]:=StringRepeat["\n", n] etc
- Many backticks make templates unreadable
- Named slots break automatic numbering of slots, e.g. if we remove `otherField` then it's slot will be counted as the second one.
I really don't like that this:
StringTemplate@"customText `NL```"
produces TemplateSlot[2]
 
@Kuba for some reason I thought the <*NL*> syntax slower, though
I suppose that doesn't really matter unless you're doing tons of these applications, though
 
@b3m2a1 StringTemplates are converted to TemplateObjects anyway
If you want speed I suppose StringForm is the way to go.
 
Or writing some bespoke stuff with ToString and StringJoin, probably
 
 
2 hours later…
9:24 AM
@C.E. @CarlLange @halirutan how does GitHub highlight code blocks which start with
```mathematica
An why it does not look well with comparison to SE highlighter?
Can we do anything about that?
 
 
3 hours later…
11:59 AM
@Kuba Not sure what you mean by "well".
They highlight operators in red and they don't care if a symbol is built-in or user-defined. They highlight option symbols differently which makes no sense.
Here is the same snipped on SE
The colors for SE where defined a long time ago and I don't remember if we supplied the css for that.
> Can we do anything about that?
No, most definitely not. The SE company is impossible to work with. After the disaster with our header image which took a year to switch after we provided everything ourselves, I'm not up to putting any of my free-time in and hoping to get a feature request done. Sorry.
If someone wants to do this, feel free.
 
12:30 PM
@halirutan well, you see, there are issues with GH. I was rather thinking about working with GH rather than SE. To improve GH highlighter. But I am not sure what needs to be arranged, what is the role of your WolframLanguage-Google-Prettify etc.
GH highlighting is so bad that I think I prefer a plain code block
 
 
4 hours later…
4:23 PM
@Kuba Ah, sorry. I completely overlooked the not in your sentence.
I was honestly wondering what you mean :)
 
 
3 hours later…
7:04 PM
@LukasLang thank you. I still try reading the code, it's above my level now.
 
7:49 PM
@Kuba I mean I'm sure GitHub has a contact/support email that we could ping?
Might be worth putting out a request and just see what happens
 
 
3 hours later…
10:54 PM
Does anyone know a nice way to do lazy rendering of Tooltips and GUIs in general? My current solution is quite ugly:
DynamicModule[
 {
  tooltip,
  t1, t2
  },
 tooltip[t_, x_] := (
   t = Tooltip[
     "foo",
     Dynamic[t = Tooltip["foo", x]; x]
     ];
   Dynamic@t
   );
 {
  tooltip[t1, 3],
  tooltip[t2, 4]
  }
 ]
 
The symbols t1 and t2 are used to prevent updates to one tooltip from affecting the other (as would happen with downvalues). The idea is to trigger a replacement of the entire tooltipped object once the tooltip is requested the first time (via the Dynamic in the outer Tooltip). The problem is that this requires re-typesetting the tooltipped expression itself as well. Unfortunately, I have not found any other way to only evaluate the tooltip once when first needed. Any ideas?
 
@Kuba And here's the specific package they use for WL highlighting. github.com/shadanan/mathematica-tmbundle
 

« first day (2928 days earlier)      last day (1545 days later) »