8:42 AM
@kirma Let me know if you implement it and if it turns out to work well!

9:17 AM
@Pickett Looks great Pickett :). I hope it also gets a lot of stars in chat :P

9:35 AM
@Szabolcs I have taken a cursory look at Probabilistic Bisection Algorithm (from the thesis you linked) and it sort of works, but obviously requires a better representation of the probability density function than piles of `Piecewise` expressions. Also, I think I don't entirely understand how to use it on all situations, but I haven't spent more than maybe half an hour on it.

9:58 AM
@Szabolcs Ah, I think I sort of got it now. The remaining problem is not the algorithm itself... but efficiency of representations.

@kirma I used this representation. Then it's easy to calculate the median.

@Szabolcs I thought of creating relatively straight-forward presentation for the problem at hand (basically a list of tuples), and two operations operating on it: distribution reshape and distribution median (or, I suppose mean should be the same in this case?)

10:35 AM
@Mr.Wizard I have a long answer written up for the question that was just closed ...

10:50 AM
@JacobAkkerboom Thanks :)

1 hour later…
11:59 AM
Is there a built-in function akin to `PadRight` that would not trim list? For Example, I want `f[{1,2,3},5]` to return {1,2,3,0,0} and `f[{1,2,3,4,5,6},5]` to return {1,2,3,4,5,6}.
Easy enough to do with a conditional statement; I'm just trying to clean up code if possible.

12:22 PM
@bobthechemist Not that I know of, but without conditionals:
`PadRight[#1, Max[Length[#1], #2]] &`

12:40 PM
@halirutan why order of `Alternatives` matters?
```StringCases[
"test ending",
"test " ~~ Alternatives @@ {"end", "ending"}
]```
```StringCases[
"test ending",
"test " ~~ Alternatives @@ Reverse @ {"end", "ending"}
]```

@Kuba Well, the word alternative already says it: you don't care which one matches because one is an alternative of the other. And with these non-mutual-exclusive string-patterns, this happens :-)

@halirutan so there is no logic behind it?

@Kuba Hard to say, but from the top of my head I would say it is like using logical Or in testing: `if(p || q) then ...`
When p is true, then q isn't even tested.
This paradigm is used extensively in programming languages like C and Java

@halirutan yes, that's the point, but why longer pattern is found before shorter then?
@halirutan does it mean that the whole pattern is Thread over those Alternatives?

@Kuba OK, this is what I get:
This doesn't surprise me. The first alternative is tested first and if it matches, it is used.
@Kuba Can you reformulate your question? Maybe I don't see the point but in the second case the longer pattern is found before shorter one because it is first in the alternative.

12:53 PM
@halirutan hmm let's narrow it down:

@Kuba `Alternatives` has nothing to do with short-circuiting behaviour of `Or`. What makes that string pattern find the longer alternative is that like most (extended) regular expression matchers, it tries to greedily match as long substring as possible.

```StringCases[
"ending",
Alternatives @@ {"end", "ending"}
]```
I'd expect that the algorithm goes like: "e" -> no match, "en"-> no match, "end" -> match -> return
and then even with "ending" first, the "end" will be found first

Ehm... interesting. I guess it still has some precedence!

But it seems I don't know how string pattern matching works! And I thought I know! :(

As far as I remember, Mma regular expression matcher is built on PCRE matcher under the hood.

12:57 PM
@halirutan Am I clear now?
@kirma I'm not sure if I understand your point.

@Kuba I guess yes. First, usually string matchers are greedy, as @kirma pointed out.
`StringCases["ending", RegularExpression["end(ing)?"]]`
`StringCases["endin", RegularExpression["end(ing)?"]]`
They try to match the longest subsequence.
@Kuba But for your example, I have different understanding of how matching works.

Interesting conversation

@Kuba I would have thought that it tests one alternative completely and if it matches, it returns it. It doesn't work characterwise, testing the complete pattern after each bit.

@halirutan I agree because of the output. But it seems like not efficient approach, unless I'm missing the general picture.

1:21 PM
@Kuba I'm not aware of all the implications either but I didn't shoot myself in the foot
@zab Hi zab

1:42 PM
@halirutan hello!
@ku
@Kuba hello

@zab Hi :)
@halirutan It's not like I made a terrible mistake, I wouldn't use such general pattern anyway, I was just confused because the logic implied by output was not intuitive for me.

2:36 PM
@Kuba Perhaps it will seem more intuitive to you if you consider cases where the arguments to Alternatives are themselves string patterns. It is not clear how the way you thought it worked would apply to this situation, which Alternatives of course needs to handle.

2:52 PM
@Pickett , I'm not sure what do you mean, why ' "e" -> no match, "en"-> no match, "end" -> match -> return ' approach wouldn't be intuitive there too

3:06 PM
@Kuba I'm not sure either anymore, I'll have to think more about it.

1 hour later…
4:19 PM
@Kuba The behaviour is due to the depth-first, backtracking implementation of PCRE's standard matching algorithm. That algorithm considers alternatives in the order that they appear and stops searching with the first match.
There is an alternative algorithm that can consider all possible matches, but it comes at a cost and to my knowledge is not accessible from within Mathematica.

5:07 PM
On the Mathematica StackExchange, what is the proper way to tag a question with a [bugs] tag as fixed? I've used the tag [fixed] on a couple, but I wanted to make sure this is the right thing to do. Example case: mathematica.stackexchange.com/questions/18305/…

@ArnoudBuzing The existing practice is to add a notation in the description. Please see this discussion on meta:
18

Using What to do with [bugs] questions now that version 9 is released? as a guideline Questions about bugs that have been fixed should have individual tags for each affected version. However this is impossible for longstanding bugs where there are many affected versions as a Question may only ha...

The use of a [fixed] tag was proposed in that discussion, but the proposal did not receive a lot of discussion and has not been widely adopted.

5:51 PM
@ArnoudBuzing Do you guys search the site for bug reports and are you trying to avoid getting already fixed results in the search? As WReach said, right now the most common way is to add a first line in bold stating which versions have the bug, but it's not fully standardized. If you need a reliable way for searching, perhaps we should make an effort to standardize it.

OK, thanks. I'm trying to find a good way to search for unfixed issues. I'll read that thread.

@Arnoud This standardization is unlikely to succeed unless there's a very good reason for it that will convince people that it's worth the effort. I think that such a reason could be if WRI QA people such as yourself, Stefan and ilian have a need for it,
I mean, if you stated in a meta discussion that it is useful for you to have bug-questions clearly marked, that might help ... that's just my guess though.
We could enforce something simple, e.g. that the first non-empty line of the question must contain the word fixed. That seems simple enough and it's not as hard to follow as a strict and inflexible template.
@Arnoud What do you think?
Then you could write a Mma program that retrieves the question body and checks the first line.
Or maybe putting [fixed] in the title is better?

There are a couple of things I am interested here: Making sure that all issues that are tagged here with [bugs] are known in the Wolfram issue tracker (most will be, since various Wolfram employees track this site, but there will be some omissions and I want to make sure I know what those are).
Also I want to make sure these SE issues are up to date with the current state (fixed with a paclet update or fixed in a particular bug-fix or feature release). Again I think a good number of them are up to date, but there probably are some that are out of date.
Also, for the ones that have a good number of votes on them, I want to look internally what the state of these issues is.

6:14 PM
@Arnoud I'd propose the following: 1. We can start a meta thread, and propose a standard template for the first line of bug posts. So far there's the idea that fixed bugs get a note, preferably at the top, but it's not standardized. This new post will be a reference where people can copy the message from, so it will encourage good practices.
Of course it would be naive to think that people will be able to strictly keep to the standard, but there can be one key element: make sure that the word fixed appears on the first line of only those bug-posts where the bug is fixed. That's enough for searching.
2. Then you can maintain a database on your side which has information about all bugs-tagged posts, as well as a Mathematica program that updates it (based on last modified time). The question is whether the SE API allows a sufficient number of calls per day to be able to update such a database efficiently.
Do you think it's worth starting a thread on this (i.e. standardize the format for bug posts)?

yes, I think this might be useful (to me, at least). My main interest is to have a simple way to get a clean list of open issues reported here.

6:40 PM
Talking about bugs ..., is this a bug? or just sloppy programming?
For a customer I need to use Quantity. But just loading it takes too long for my taste (0.7 seconds for AbsoluteTiming@Needs@"QuantityUnits`").

7:05 PM

7:31 PM
Are many people here using the new Dataset stuff? I want to like it so much, but it feels so awkward, I keep just using lists. I feel like I am missing something, but it feels like so few functions deal with Datasets in a general way (ie they seem to always break or not have complete definitions for datasets).

7:57 PM
@Gabriel I can only recommend to use it. I know the documentation is awfully long and since you have to learn about Association too, it might be confusion sometimes, but I'm sure it is worth the effort. Before this existed, I implemented my own `Properties` which is now Dataset that contained a list of rules, which is now Association. I added syntactic sugar so that I can easily work with it and I never regretted it.
Now with Dataset and Association you have exactly this, only that it is built-in and will further mature, but above all it is (or will be) very performant.

8:22 PM
@halirutan yeah I love the idea of it and have made my own simple wrappers to get this kind of behavior. I really like Associations and use them all the time, but Datasets feel far more jarring in Mathematica. Am I wrong to think that you cant use lists of Datasets to ListPlot? Export feels super hacky at the moment with raw Print statements coming back. Etc. I take it you use Datasets often and have had no problems? I will keep trying but man it feels weird to me.

8:39 PM
@Gabriel The Print statement from Dataset (when using Transpose) has been fixed in a paclet update. It will update completely automatically during your weekly paclet update check, but you can force the update with this:
PacletSiteUpdate /@ PacletSites[];
PacletInstall /@ PacletFindRemote["WolframAutoUpdate"];
PacletInstall /@ PacletFindRemote["GeneralUtilities"];
and then quit and restart your kernel.

@ArnoudBuzing thank you for this. I was horrified when I saw this ;)

@Gabriel It was just a leftover Print statement, relatively easy to correct (with paclets) and mostly harmless (but annoying and distracting).

@ArnoudBuzing yeah I figured ... still debugging with Print statements scares me ;)

I highly suspect I'm going to be visited by the vote reversal fairy soon.

@ArnoudBuzing the paclet update didn't fix it. Is their somewhere I can get help with this? Maybe my bad feelings for 10.x in general are coming from my paclet updater not working

8:55 PM
What do you get for PacletFind["GeneralUtilities"] ?

The full stuff is long, not sure if you want that. The truncated in notebook version is: {Paclet[GeneralUtilities, 1.0.0, <>]}

ok, that means you do not have the new paclet yet. Let me check to make sure I gave the right update commands once more ...

thank you so much

did you Quit the kernel before you retried this?

yup
a couple of times. When I redo the commands you give I get an error about WolframAutoUpdate with same version number is already installed
I guess I can use the command to uninstall this but not sure if that is a reversable operation

9:02 PM
yes, you can omit that one (so the WolframAutoUpdate is already at 6.0.0?
"Version" /. PacletInformation["WolframAutoUpdate"]

Yes 6.0.0
I am on version 10.1 if that is an issue

Oh, this paclet is 10.2 only ... Maybe I misunderstood your concern here?
This is not the issue you were referring to? mathematica.stackexchange.com/questions/88238/…

I see. My concern was that Dataset feels awkward/unfinished in Mathematica. I guess I will have the Print statements :(
no when I export a csv I get a "PATCH!" print statement

Do you have an example (or link to a SE post) for this?

I guess transposing will also suck with Datasets for me :( Anyhu thanks for trying to help.

9:09 PM
You just do Export["file.csv", {1,2,3} ] and you get a PATCH! printed?

only if what I am exporting is a Dataset

OK, I see it. I will try to get this fixed (with a 10.1 paclet) for you. It's fixed in 10.2, but that doesn't help you right now.

Wow. Thanks.
Does Wolfram keep a list of fixed bugs anywhere? The paclet thing seems pretty invisible (not a bad thing!) but I know I have had bad tastes in my mouth from bugs that maybe I can check are fixed.

Hi guys,
I've a list of values from 1 to 8 and I want to delete the one that are not in the correct order like:
{1,2,3,4,6,5,7,8}->{1,2,3,4,7,8}
Thus mantaining the fact that there is an increasing order.
I tought that deletecases maybe useful but I'm not able to make Mathematica check value within the same list.
Any Ideas?
Thanks a lot

We don't have a public list of issues (and the internal tracking system doesn't really lend itself to be made public). We do update SE reported issues as well as getting back to users who reported issues via support@wolfram.com (when that issue is fixed in a particular version).

9:16 PM
I see. Thanks
@Yyrkoon probably a good question to ask a real question :) Give someone some points
though as it stands it is a bit unclear
why is 6 in the wrong order? whereas 7 is not?

@Gabriel Ya you're totally right, I've formatted it in a very ambiguos way. But will open a question now with the correct order.

Sweetness. I will try my hand at it unless the big fish get it first

hello
i need some help with one problem , i have this 104,04\$ on my account
i know the Interest per year are 2%
i need to know the started money