« first day (2499 days earlier)      last day (1986 days later) » 

 
4 hours later…
7:15 AM
@CarlLange I remember writing one using itertools and some tricks and stuff like 5 years ago. It...wasn't pretty.
@Kuba @Szabolcs this is also something I've played with. It's just a huge pain writing the transformations. The canonical WRI exporter uses the Transmogrify package which you can find a copy of (I think) deep in the ResourceSystemClient paclet. The problem is that the XLST or whatever concept it builds off of is a) very slow and b) hella fragile.
To get my doc NB -> HTML converter working for my 11.3-style docs I had to prune everything and it still breaks continually. (and I'm using the stuff that Workbench itself uses!)
But if you don't want to reimplement everything that's a way to go.
 
 
2 hours later…
9:28 AM
I hate how poorly stylesheets work. I just lost two hours of work because the stylesheet I was editing was silently not working.
2
 
 
2 hours later…
11:15 AM
@b3m2a1 Stylesheets are a major pain and I really wished WRI would come up with a better mechanism to tweak and use them ( more CSS-like). But it looks like they always focus on something new before revisiting the old semi-broken implementations.
 
The tweaking I just sat down and hammered out myself so that's actually really clean for me. My big issue is that the notebooks don't really work right in many cases. A Saveable->False gets set secretly sometimes and they auto-close when the notebook they reference does (which makes sense, it just is surprising and annoying).
Overall I just feel like there are too many gotchas hidden in them
 
11:45 AM
Does anyone know if I can provide videos on a GitHub wiki? I feel like some How-To videos would be easier to make and clearer than a typed up run through of the workflow.
I suppose I could always upload to YouTube and embed via iframe...
 
12:12 PM
@b3m2a1 How about GIF?
 
 
4 hours later…
4:07 PM
is there a way to determine what the version number of a loaded paclet is?
 
 
2 hours later…
6:29 PM
whoa, new theme
I'm not convinced this is better than the old theme...
 
Hi folks, does Netlink support .net core?
the new theme is always worse than the old one. Many people (for example, tex.se users) also don't like the new theme.
 
0
Q: Mathematica updated site theme is ready for testing!

Jon EricsonAs part of implementing the new unified themes across the network, we're gradually rolling out updated site themes for each site. As of today, we have enabled your updated site theme for testing. If you can't see it right now, that's by design! This is a very early test implementation of your d...

 
@ArtificialStupidity In general it seems ok, I just feel like the questions are relegated to maybe a third of the browser width
to be honest I don't know how much browser width the questions took up in the previous theme :)
 
For comparison only:
-60
Q: TeX new site theme is live

Joe FriendWe rolled out the new site theme for TeX. It is now live. What new theme? If you're like, "What the heck are you talking about?", then you should read the Meta Stack Exchange post entitled Rollout of new network site themes (and maybe the posts it links to for the full background). Your help...

 
well, switching off the left bar is something, at least
I think I'm basically fine with this. I don't love it but it'll do.
 
6:39 PM
Some ideas:
53
Q: Make TeX.SX look nice again!

samcarterA collection of user scripts to make the main site look a bit better again, after the new design has gone live on August 3, 2018. The scripts can be used e.g. with Tampermonkey (Chrome) Greasemonkey (Firefox) A fix for recent versions of Firefox and GreaseMonkey (4.x) by @PaulGaborit. A use...

 
in general otherwise I think it's fine. do mods have the ability to change the colour of links etc?
 
@CarlLange I don't think so.
Moderators have no power. :-)
 
:-)
Well, yeah, whatever, I guess I'm fine with it. It still looks better than the community
😈
 
6:56 PM
I will say I would like the question type bar to move away from where it is
 
 
1 hour later…
8:20 PM
@ArtificialStupidity what's the status of tex.se? Do they really boycott?
 
8:41 PM
@xzczd Problem is I want to do a full workflow (maybe with some voice over, if I can ever stomach how awful it is to hear a recording of one's own voice).
@KraZug PacletInformation will do this.
 
8:55 PM
@CarlLange can I set up something in chrome so that whenever I go to MSE the browser applies the changes I did to get this:
 
@b3m2a1 You made some CSS changes for that?
 
It was literally just a few display: none on some id tags
Yeah
(after turning off the LHS nav bar)
I added a padding-left: 25px to #mainbar and display: none to #sidebar
 
You can definitely use a browser extension to do it. I think Stylus is the one of the moment chrome.google.com/webstore/detail/stylus/…
 
Oh and a display none to .tabs-filter
Amazing
 
hm, does anybody know if it's possible to remove a data point from a NearestFunction, or do I have to recreate a new NearestFunction without that data point?
 
9:15 PM
I think you need an entirely new nearest function.
Optimally we'd have access to the oct-tree or whatever it builds (I think it's an oct-tree) and you could work with the raw data structure.
But we don't
 
That's such a pity, it'll make what I'm going a ton slower.
 
Yeah that's one of the big issues with Nearest. Maybe you can spelunk and there might be some modification function.
 
I suppose I could get the NF to give me every single index and I can manually pick the first that I haven't already used.
 
That's probably best.
 
but that kind of sucks.
 
9:18 PM
Just toss the used indices into an Association and let the hash function handle that for you with some SelectFirst call.
 
Yeah, I suppose I'll have to. Generating a new nearest function is expensive...
 
By the way, the ability to edit the page CSS automatically is awesome. I'm very happy with the new site layout (thanks StackExchange!):
 
maybe you can share your css? That looks great!
 
I had to do some real hacks to get our ld logo back, but everything else was a quick line or two
 
Maybe the only thing I'd miss is the link to the chat
 
9:19 PM
.tabs-filter {
    display: none;
}

#left-sidebar{
    display: none
}

#mainbar {
    padding: 25px;
    width: 100%;
}

#content {
    border: none;
    width: 100%;
}

#sidebar {
    display: none;
}

img.h-auto.wmx100 {
    width:0px;
    height:0px;
        padding: 28px 150px;
    background: url(cdn.sstatic.net/Sites/mathematica/img/logo@2.png?v=37ecb83d823e);
    background-size: cover;
}
My link to chat doesn't show up most of the time anyway
So I just come here from the top thing
 
nice and concise :)
yeah, I actually find it really weird how it doesn't show sometimes
 
Everything is really clean except for img.h-auto.wmx100 :)
That one is a true hack.
One mild issue with eradicating .tabs-filter is it hits some other menus too... but none that I care about.
 
Totally unrelated: Sort of a pity that ProgressIndicator doesn't have something builtin to estimate time of completion
 
It...kind of does (by which I mean you can give it that sense manually).
 
How do you mean?
(I would like something like "x minutes y seconds remaining" alongside my progressbar
)
Doesn't have to be progressindicator but it's coming out of a long mapindexed
 
9:25 PM
Oh like that. That you'd need to be clever for, although an AttachedCell solution in a Dynamic off the base box would be really clean there.
 
Yeah, I dunno, being clever is just not my style ;)
 
I always use Monitor and Internal`LoadingPanel.
And then just say n of N basically
 
Will that do what I'm aiming for?
 
As long as you set up the Monitor expression right.
 
Do you have an example handy? I'm not really that well-versed in some of these Dynamic-y things
no problem if you don't, I can just wait and use my useless brain to guess how long it'll take :)
 
9:30 PM
Block[{n, m = 10},
 Monitor[
  MapIndexed[
   Function[n = #2[[1]]; Pause[.5]; fn[#]],
   RandomWord[m]
   ],
  Internal`LoadingPanel[StringForm["`` of ``", n, m]]
  ]
 ]
That's the kind of thing I do.
It's not beautiful, but I've written wrapper functions for it on like 50 different occasions
Looks like that (which is basically what the internal stuff does, I think).
 
Ah, cool, thanks a lot.
Eh, I should probably just rewrite my code to be faster.
Or I could just be patient. That would be an option also
 
9:44 PM
Can anybody comment on the performance of the new OSX frontend in 12.0 when it comes to accidentally printing out a really large amount of data? I crash 11.3 multiple times a month by accidentally printing out two thousand entities or whatever
 
10:01 PM
@CarlLange You might be interested in the ProgressReport function contained in the ForScience paclet I'm working on.
This is what it looks like for the case of a simple Table call:
 
@LukasLang Oh! I actually even have that installed!! Thanks for the reminder, that's really helpful
 
I'm still working on it, but by now it supports most constructs automatically
 
Will it work with MapIndexed?
 
(you might want to update the paclet, since I've improved the performance and functionality of ProgressReport a lot in the last weeks - you should be able to call UpdateForScience[] to update)
 
Anyone want to try to break something for me? I have something that converts \[IndentingNewLine] box expressions to an appropriately tabbed version (with whatever tab character you want).
I just added support for the indentation coming from @, ->, etc.
And now need to battle test a bit
 
10:06 PM
@b3m2a1 I'd like to help but I have no idea what you're talking about
 
Yes, it even supports custom level specifications
 
@LukasLang That's exactly what I was looking for, thanks a lot.
 
You can write this in the FE:
<|
 # :> NotebookWrite[InputNotebook[], #2] &,
 <|
  "Symbol" ->
   Cell@
    CellGroupData[
     {
      $metaCell, blah
      }
     ]
  |>
 |>
And it automatically indents
I needed to get code that would take the automatic indentation and convert it to, e.g., \n and \t
And I added a very convenient feature that I need to try to break now
 
@LukasLang Also, surname high-five 🙏
 
@CarlLange Let me know if you manage to break it (it should also support ProgressReport[Parallelize@MapIndexed[...]] in theory, but unfortunately I didn't have many test cases yet)
🙏
@b3m2a1 I'm always up for breaking things ;)
 
10:09 PM
Sadly I can't parallelize this particular mapindexed but I'll definitely give it a shot with my code!
@LukasLang I did manage to break my docs:
 
Sorry, completely forgot about this - sadly, I haven't found a way around that yet... Just restart the frontend and you should be fine
 
No worries, just wanted to let you know. It's not the end of the world and ProgressReport works really well. :)
 
Glad to hear that - and thanks for reminding me of the documentation issue, I should definitely put it on my todo list ;)
 
10:34 PM
Anybody have a method that's faster than MemberQ for checking if an element is in a list? It gets slow when there's a hundred thousand elements in the list
@C.E. Loved your answer for the mark centroids question by the way, very elegant.
@LukasLang Really, great job. It's so useful, I'm going to use this everywhere
 
@CarlLange You could convert the list into an association using AssociationThread[list->Null] - KeyMemberQ is a lot faster than MemberQ (assuming you check for many elements)
 
@LukasLang What do you mean by "assuming you check for many elements"?
 
The conversion itself is relatively expensive - so you have to do many MemberQ calls to benefit from the speedup
 
@LukasLang Ah, gotcha. Yes, I'm doing approximate 200,000 calls into a list that grows to about 90,000.
so hopefully that will help. thanks a lot!
 
If you build the association as you go, the speedup should be even faster - appending to a list is way more expensive that adding to an association (which you're essentially abusing as a hash-set)
 
10:46 PM
I'm learning a lot tonight :)
 
(Just note that you can't have duplicate keys in the association, but if you're only interested in MemberQ, that shouldn't be a problem anyways)
 
oh, yeah, KeyMemberQ is an order of magnitude faster!
 
11:11 PM
@CarlLange you might also find KeyExistsQ helpful
test =
  AssociationThread[
   RandomWord[10000],
   RandomReal[{}, 10000]
   ];

twords = RandomWord[10000];

KeyMemberQ[test, #] & /@ twords // RepeatedTiming // First
KeyExistsQ[test, #] & /@ twords // RepeatedTiming // First

0.011

0.0092
 
Wow
 
It works by exact matching so the hash function really helps
 
Thanks for that too, my god
I'll never need to get up and get a coffee again
 

« first day (2499 days earlier)      last day (1986 days later) »