« first day (126 days earlier)      last day (2758 days later) » 

R.M
12:10 AM
@halirutan I'm here now
 
@RM I didn't whether I can ping you here.
 
R.M
You'll have to reply to an older message of mine, because chat doesn't like 2 letter names :)
 
Do you think that
it is a better idea to make the "how to change the style for input code" a separate question?
Because I do!
It's really interesting and I'm afraid someone will not find it, if you post it into the answer the the stylesheet repo question.
 
R.M
sure, that will be a good question
 
If you tell me right now where to find this, I promise to post this question ;-)
I saw it in your screen-shot, but I only find the styles for sections, and input in general.
 
R.M
12:14 AM
A fake example that I was preparing for my answer to that question... those are the auto styling tokens that need to be set
You didn't miss it in Core.nb... it isn't there. The default styles are probably baked into the FE so nothing is explicitly set
 
Ahh, ok. And how do I set for instance "CommentStyle"?
 
R.M
You change the style for StandardForm in the stylesheet. Mine for instance looks like:
Cell[StyleData["StandardForm"],
 CellGroupingRules->{GroupTogetherGrouping, 10000.},
 CellChangeTimes->{3.545825155715281*^9},
 AutoStyleOptions->{
 "CommentStyle" -> {FontColor -> RGBColor[0.576471,0.631373,0.631373],ShowAutoStyles->False,
 	ShowSyntaxStyles->False,AutoNumberFormatting->False},
 "FunctionLocalVariableStyle"->{FontColor -> RGBColor[0.709804, 0.537255, 0.]},
 "LocalScopeConflictStyle"->{FontColor -> RGBColor[0.423529, 0.443137, 0.768627]},
 "LocalVariableStyle"->{FontColor -> RGBColor[0.164706, 0.631373, 0.596078]},
 
Yes, I see, but how do you get this cell into the stylesheet?
(I have to admit, I never really paid attention to this)
 
R.M
You can choose a dropdown cell option in the private stylesheet for that notebook (which you can eventually save as a standalone one). You'll find this in the top left.
My preferred way of doing it is to start writing something, which creates a cell, and then Cmd-Shift-E to show the expressions. Then I replace whatever is in there with what I want to enter
Oh, and to get to the private stylesheet, Format > Edit stylesheet
 
Wait, hier a screenshot:
This is my private style-sheet and the dropdown menu.
There is no StandartForm I could select
 
R.M
12:24 AM
Yeah, you can also enter it in the box next to it (I'll admit, I didn't realize StdForm was not there... I use the alternate approach I mentioned above)
 
Shit, I thought that was the name of the stylesheet I want to install with the button next to it..
Now I see it.
 
R.M
:)
 
Ok, so I post the question and you make sure, that you write it as detailed as possible for dumb-asses like me! ;-)
 
R.M
heh, ok :)
 
12:36 AM
@R.M Here we go
0
Q: Is it possible to change the colors of the highlighted code in the Mathematica frontend?

halirutanWith Format -> Edit Stylesheet... it is possible to adjust text-properties, text-colors, formatting of equations, etc of a notebook and to use this style-definitions again by installing it as Stylesheet. Lately, I saw a very nice screen-shot of a notebook and I noticed, that not only the text-pr...

 
I wondered the same thing.
 
@rcollyer It was luck that I saw it on the screenshot of RM and thought omg, this is what I really want.
 
@halirutan now I get to play with the syntax colors to my heart's content! I can't stand the defaults, and the ones I came up with after nuking my front-end's init.m file, I can't seem to reproduce the ones I had. This will make it easier. :)
 
1:27 AM
@verbeia libraries and info science made it into beta.
 
R.M
oh hey, it's @YuSungChang
hello
 
2:18 AM
@Verbeia how's it going?
 
@rcollyer I saw. Answered a question on meta. I'd really only participate in certain information management type questions rather than library questions. Ironically, it might be of interest to my ex (InfoScience professor).
Hi @BrettChampion - do you know if the video from yesterday's presentation will be available for later viewing? How did it go?
 
We're mostly pleased with how it went.
 
mostly?
 
Sounds like the video may be up sometime next week.
 
sounds good - I can wait till then, but I am interested in seeing it. Time zones are such a nuisance.
 
2:22 AM
We had a couple pre-recorded clips, but the first one had problems playing smoothly, so we skipped the rest of them.
The video (and the notebooks we worked on during the session) should show up on wolfram.com/training/special-event/…
Time zones are a pain. I remember for the Virtual Conference last year the support staff had to roll into the office around 3am or something for the version that was aimed at Europe.
 
R.M
2:36 AM
Heh, all three of you dropped by to scan the transcript for the commentary, I suppose? :P
(there was hardly any)
 
@RM Three?
 
R.M
Well, YuSung and Vitaliy were in earlier, but didn't comment (they never respond to chat pings)
 
Ah, I'd seen Yu-Sung had stopped by, by not Vitaliy. I originally popped in to see if Yu-Sung was still here. (And hit the 'Join' button from the transcript instead of the 'Info' button by accident.)
 
R.M
I was hoping this site would get a shout out during the Q&A
Do you have some approx numbers on how many people tuned in?
 
Sounded like there were a few hundred pretty constantly, although some people left partway through or came in late.
 
R.M
2:54 AM
Hmm... Sounds like a decent crowd then.
 
It was, especially for such short notice.
 
R.M
Why was it organized at such short notice then? Did something prompt it?
Generally, I get emails for seminars and stuff weeks in advance
 
I think there were emails that went out a couple weeks ago or so, but I don't see them myself...
I think the general idea has been around for a while; I don't know how they decided now was a good time to do such an event.
 
3:18 AM
Seems like it is a general ramp-up of promotional events - I notice that the special events has a "System Modeller" virtual conference scheduled for mid June.
 
@Verbeia It definitely does feel like there has been an increase in such events.
 
@BrettChampion in other words, they're asking you to do more for the same money ;-)
 
Today's event was during business hours, so it just means I spent a bit less time working on Kernel development. All told I think it took up ~8 hours this month, which isn't too bad.
And in any case, it's fun to do something different for a bit.
 
It looks like I'll have to post my questions here, though. :) I did learn something: using Labeled for legends.
 
3:34 AM
@rcollyer There were a LOT of questions...
 
@BrettChampion considering how many people were posting in the chat room afterwords, I would say so. And, my questions were fairly advanced, so I did not expect them to be answered in that forum, anyway.
But, it was a nice presentation.
 
@rcollyer Does Labeled work for things like DateListPlot?
 
@rcollyer Thanks!
 
I thought it was just for the *Chart functions like BarChart. But then, who knew that ScalingFunctions works in ListPlot?
 
@Verbeia I don't see why it wouldn't.
@Verbeia Do you have an example of ScalingFunctions in ListPlot? I'm curious.
 
3:37 AM
@Verbeia You can use Labeled[<DateListPlot>, label]. DateListPlot doesn't currently support Labeled as a wrapper for the data (which does work for the XXXXChart functions.)
@rcollyer
13
Q: Flipping axis on a plot

s0rceI want to make a 2D plot where the x-axis is flipped so the higher numbers are on the right and lower numbers are on the left. I've managed to do it by flipping the data and making new Ticks but this solution is manually and requires manipulating the data. I was hoping there was a better way. F...

 
@BrettChampion thanks. I don't remember reading that answer. Useful. I wonder why it works though, as it is not listed as an option of either ListPlot or Graphics.
@brett did you by any chance see wxffles logo design?
 
I think it'll be a while before Graphics supports ScalingFunctions. As for ListPlot, there are may be gaps in how some of the options are handled when ScalingFunctions is used. Something I need to look into.
 
Well, I was just assuming that ListPlot is just a front-end for Graphics.
 
@rcollyer Yes, and I was playing with it on and off recently (different colors and different n-gons.) I especially like the badges he made.
 
I have a (list of words)[alcor.concordia.ca/~vjorge/Palavras-Cruzadas/…, without mathematica formatation, it's not {a,b,c,d}, it's just one word per line, how can i transform it in a formated list?
I have a (list of words) [alcor.concordia.ca/~vjorge/…, without mathematica formatation, it's not {a,b,c,d}, it's just one word per line, how can i transform it in a formated list?
 
3:49 AM
@rcollyer ListPlot generates Graphics, but there are a lot of options that are specific to ListPlot.
 
@GustavoBandeira To format a link: [text](link).
 
ok
it's the oposite, i always forget
 
@BrettChampion right. a lot of preprocessing going on. But, as ListPlot did not have the option ScalingFunctions listed, I thought maybe it was in the parent object Graphics. In this case, neither => undocumented. :P
 
@GustavoBandeira How about Import[<file>, "Words"]?
Time to go. See you later!
 
Night.
Night all.
 
3:52 AM
@BrettChampion Will it import per line?
@BrettChampion 1 word per line?
 
4:20 AM
Hello
Anyone knows how MemberQ works in Compile? It's in the compilable functions list and it doesn't call back to the main evaluator, but it works weird. Try Compile[{{x, _Real, 1}}, MemberQ[x, 2]][{2}]
 
 
3 hours later…
7:20 AM
@Rojo Weird ... it does work if you set the type to _Integer.
@Rojo I think the reason is that the 2 in MemberQ[x,2] is an integer, and since the type of x is real (whatever you pass to the function either gets converted to real or throws an error if it can't), 2 can never be part of x.
@Rojo Okay, I see you asked on main and solved it
 
7:38 AM
Yeah, there wasn't a lot of activity in the chat 3 hours ago. Thanks @Szabolcs
 
I just thinking what would be a more descriptive (or googler-friendly) title for the question
 
8:28 AM
Not sure if anyone is around, but I'm having problems with NDSolve within a function
The NDSolve works if the body of the function is not in a function, or in a Do loop
But for some reason breaks when I put it into a function
 
I suppose the problem isn't that _?NumericQ is missing?
 
Nah, it's not that
the function has one variable input, adding the _?NumericQ doesn't seem to do anything different
 
Does anyone have the NonParametricSplines package that kguler is talking about in here?
@Guillochon Did you clear the function first before adding _?NumericQ
 
Yeah
 
Just checking.
 
8:35 AM
Just restarted the kernel, same thing
dohhhh i think i see it
Accidentally had a table passing to the startingstepsize...
 
@Heike I don't have it ...
 
Mmm, pity. Maybe google knows.
 
I checked, it doesn't. I search for snippets from the doc page of which he included a screenshot.
@Heike Maybe an older version (e.g. 8.0.0) had it, and when he installed 8.0.4 over it, it got kept there.
 
8:54 AM
@Szabolcs Maybe. It's not in 8.0.1 either. Also, the link kguler mentioned in his answer gives me a "Page not found"
 
Hmmm...any idea if something like this exists for a 1D function: goo.gl/1yBr7
 
@Guillochon For 1D it's really easy.
 
what should i use?
 
@Guillochon And of course it's built into Plot, so I suppose you can't use Plot for your application, right? (I couldn't because I needed more control.)
 
The function is expensive to calculate
And has a sharp asymptote
 
9:00 AM
Yes, that's a good reason not to use Plot.
 
so I wanted to build an interpolating function from it
I wanted something that could adaptive sample the domain
 
@Guillochon Mine didn't have a sharp asymptote (it was bounded), so I did this:
compute the function on an equally spaced coarse grid, then refine like this:
if we have three successive points on the curve, A, B and C, and the angle between AB and BC is greater than a threshold, then insert two new sampling points at the midpoints of AB and BC
This is exactly what Plot does, BTW
(sorry, my code is on an external drive, would have to dig it up ...)
 
OK...what about just using plot, and then extracting the data points?
Is that an option?
 
shouldn't take more than 20 minutes to implement it from scratch
using plot and extracting points can get messy ...
 
So I guess what you're saying is that extracting the datapoints from Plot isn't straightforward :P
 
9:04 AM
extracting points is straightforward, but controlling how many times your expensive function will get evaluated is not straightforward
 
oh, but can't that be controlled via maxrecursion, plotpoints, etc?
 
oh yes, but then Plot stops somehwere and you find out you need to add a few more points (refine the sampling)
 
ok, got it working with plot
 
@Guillochon My function was very expensive to calculate, a whole run (to sample a domain) could take hours, so it was important to be able to stop midway, and then refine the sampling mesh without throwing away previous results. This is not (easily & reliably) possible using Plot
 
9:13 AM
nd[{points_, values_}] :=
Transpose@{(Drop[points, 1] + Drop[points, -1])/2,
Differences[values]/Differences[points]}

subdivide1d[result_, resolution_, maxAngle_: 10] :=
Module[
{deriv, angle, dangle, pos, nf},
deriv = nd[result\[Transpose]];
angle = ArcTan[#2] & @@@ deriv;
dangle = Differences[angle];
pos = Flatten@Position[dangle, d_ /; Abs[d] > maxAngle/180 Pi];
pos = Union[pos, pos + 1];
nf = Nearest[result[[All, 1]]];
Select[deriv[[pos, 1]], Abs[# - First@nf[#]] > resolution &]
]
 
Yeah, mine only takes about a minute
So I guess it's not super-expensive
 
10:12 AM
0
A: What would be a good community promotion ad?

SzabolcsPieced together from existing bits, here's one possibility. This is a start. Please upvote if you think it's ready to be posted, comment if you think something needs to be changed, or even better: post another one. Full code follows. I chose to make it fully in Mathematica so everyone on thi...

I need comments / improvements on this:
 
acl
@Rojo try Compile[{{x, _Integer, 1}}, MemberQ[x, 2]]
:4693810 and try
Needs["CompiledFunctionTools`"];
CompilePrint[
 Compile[{{x, _Real, 1}},
  MemberQ[x, 2]]
 ]
to see what is going on
 
10:53 AM
Here's @Verbeia's to get you all excited :D
 
This is the tweaked version
 
The tweaked version is nicer!
Got to run, driving lesson again!
 
acl
@Szabolcs when you have time, ping me (about the Ramer-Douglas-Peucker algorithm implementation)
about the ad and logo, I think @Heike once correctly pointed out that a kitchen sink would be ideal
 
11:40 AM
hi @belisarius
 
@Verbeia hi !
[In the case of Mathematica, though, there is no guarantee that even documented functions will remain unchanged in future versions.] <- (Verbeia) :D
 
 
2 hours later…
1:18 PM
@Verbeia I like the colour scheme of this one best.
@Szabolcs: I think this question is right up your street.
 
R.M
Anyone for closing and removing this one as localized? OP posts an update today (2 mo later) saying there was a typo in what he posted originally
 
@RM I don't have an issue with that. Voted to close.
 
R.M
I can't vote because apparently I voted to close 2 months ago too and my vote has expired
 
@RM did you see Rolf's answer?
Of course, he's using parallelizaton, also ...
Hmmm, unpingable mods. annoying.
 
acl
1:42 PM
@RM I agree, and it's also very badly stated (he just dumped his code, as do more and more people recently)
@rcollyer I posted also a speedup in the other question, but in the end I got annoyed because it took me far longer to locate the relevant parts of the code than to modify them. the first half of the code he posts is irrelevant (literally, you don't even need to look at it), as is the last 1/3; his real question is`PD1` is slow, how do I speed it up
wasted 30 min to work that out (admittedly I had time to waste, so...)
 
@acl that and he did not take our "advice" and post only input form, not mma markup. grrr.
But, is it just that PD1 is slow, or is it that PW1 is slow, also.
 
acl
if you define it like I do, it takes .2s on my air
and the definition is instantaneous; the way he had it, even the definition of PW2 did not finish evaluating after 5 min on my computer
but these are things that are OK in a question (if he knew he wouldn't have asked). what's not OK is dumping code and asking
for it to be fixed, with apparently no effort in isolating the problem
now, here's a nice question:
4
Q: Speed up DensityHistogram rendering (display)

AjasjaWhen I tried to present some pre-calculated density histograms inside Manipulate I noticed that the display of DensityHistogram is extremely slow. Here is a simple benchmark: Second[x_] := x[[2]]; data = RandomVariate[BinormalDistribution[Abs@Random[]], {5, 10^4}]; histograms = DensityHistogr...

 
Ah, I see what you did: replace Integrate with NIntegrate. Where do you perform the sum, though?
 
acl
isolated pieces of code demonstrating the problem :)
 
Never mind, I missed Total at the beginning of your code. :P
@acl Pw1 can be further simplified by noting $\tan(0) = 0$, then the exponential becomes 1.
 
acl
1:56 PM
@rcollyer no doubt, but why should I spent more than 30min doing trivial manipulations, if he can't be bothered?
 
@acl I think this has to do with the translation of the Graphics expression to boxes. Szabolcs has commented on how slow this is before.
 
@acl true, very true. I just like looking to see what he may have missed. Whether I show it to him, or not, is an entirely different question. :D
 
acl
@Heike that is what I first thought of too, but I've never really dealt with the boxes business
 
R.M
 
@acl Me neither. I think Szabolcs is better equipped to answer this question.
 
2:01 PM
@acl Thanks:)
The DensityHistogram has a lot of RectangleBoxs, while the ContourPlot is a GraphicsComplexBox
 
acl
maybe I should also just dump my pages of code here and ask "why does this take 3 weeks?". at least I've tried answering some questions once in a while!
hm, seems I got really annoyed at him :)
 
Oh and I tried to re-vectorize the output like this Vectorize[plot_] := ImportString[ExportString[plot, "PDF"], "PDF"]; but that didn't help.
 
@acl because quantum computing doesn't work on large scales, yet.
Did that answer your question? =D
 
@Ajasja You could try something like CellPrint[Cell[RowBox[GraphicsBox @@@ (histograms /. Rectangle -> RectangleBox)]]]
It seems to be a factor 3 faster than just evaluating histograms.
 
acl
@rcollyer right... come to think of it, the experiment it is describing takes less than 10ms
doesn't sound all that efficient, what I am doing
 
2:13 PM
@acl apparently, about 5-10 years ago, the guys at NOAA were able to exactly predict the state of the weather ... 10 hours after it had occurred. So, 3 wks for a 10ms process is not as bad as it sounds.
 
acl
@rcollyer at least they have boats
 
@acl ping
 
acl
@Szabolcs hi, good timing
 
I should get some work done. Bye all.
 
bye
 
acl
2:16 PM
@Szabolcs so have you implemented Ramer-Douglas-Peucker? are you willing to share the code?
(and how did the lesson go)
 
@Heike That is indeed faster, but I would like this to be faster inside Manipulate and in this way it would just keep printing cells.
 
@acl I'll mail it to you later (to your gmail). It has awful performance, I only needed it a few times to reduce the number of points in some figures (and reduce figure size)
 
acl
@Szabolcs ok thanks, I just wanted to see how you implemented it
no rush
 
@acl I just got back, I'll make a note in a notepad window here, and I'll mail it in half an hour or one hour, OK?
 
acl
@Szabolcs no problem, take your time
 
2:43 PM
6
Q: What would be a good community promotion ad?

David ZaslavskyOne way we can promote this site is to create a community promotion ad to be shown on other SE sites. Each graduated SE site has a meta question where people can submit these ads (math, physics, stats), and if they receive enough upvotes they will be automatically shown by the system. If we are ...

2
 
3:20 PM
@acl If any of you guys can quickly fabricate a kitchen sink in Mathematica, I'd shift support in a heartbeat.
 
@JM does it have to have the 3D printer interface, too?
 
Just for the logo... :)
 
I think a 3D printer interface for mma would be awesome. Not that I'm volunteering to write one, though.
 
That would be cool, but for logo purposes, the likeness of a kitchen sink ought to suffice...
 
True. Now, where can I get a model of a kitchen sink ...
 
3:29 PM
On a different note, at least I managed to convince you guys that coloring by radial distance is nice... :)
 
One like this would be more fun:
 
@Szabolcs WOW! :o
@Szabolcs I could probably fake the general shape, but the ridges would be hard to put into the equations for the surface...
 
@@whuber Did it work? I thought the double-at was a moderator-only tool.
@JM A nautilus. Yes, that's where a bump map could be useful!
 
@Szabolcs Yes, I did recognize the nautilus shape; I more or less know how to manipulate the logarithmic spiral, which is why I said I could fake the general shape of the surface...
...but the methods I know for modifying surface parametric equations to have ridges tend to be unreliable for things with non-circular cross sections.
 
3:43 PM
@belisarius :)
 
R.M
@JM pffft... who needs real ridges when you can Texture[] your way out ;)
 
@RM I'm a perfectionist. ;P (But seriously, I've managed to give a torus some ridges by tweaking its parametric equations; there should be something that will work for that.)
 
ParametricPlot3D[
With[{r = (v Exp[s u] + Exp[s (u + 2 Pi)] (1 - v))}, {r Cos[u],
r Sin[u],
r ((v - m)^2 + z/(2 Pi) u + 0.2 v (1 - v) Sin[10 u])}], {u, -2 Pi,
6 Pi}, {v, 0, 1}, PlotPoints -> {100, 6}, PlotRange -> All]
m = 0.53
z = m^2 - (1 - m)^2
s = 0.1
@JM Sorry, no time to fix some misunderstanding about how I used the radius and no time for a better ripple function than Sin ... got to do the dishes and make dinner
 
@Szabolcs I'm currently rendering new artwork, so I'll try it out later. Thanks for this. :)
 
4:45 PM
@Szabolcs Nice work! Only a further tiny tweak was needed:
With[{m = 0.53, s = 0.1, b = 5}, ParametricPlot3D[With[{r = (v Exp[s u] + Exp[s (u + 2 Pi)] (1 - v)), z = m^2 - (1 - m)^2}, {r Cos[u], r Sin[u], r ((v - m)^2 + z/(2 Pi) u + 0.2 v (1 - v) Tanh[b Sin[10 u]])}], {u, -2 Pi, 6 Pi}, {v, 0, 1}, Mesh -> False, PlotPoints -> {120, 10}, PlotRange -> All]]
 
5:08 PM
Nice ridges
 
With[{m = 5/9, s = 1/10, b = 7}, ParametricPlot3D[Exp[s u] (v + Exp[2 Pi s] (1 - v)) {Cos[u], Sin[u], (v - m)^2 + u (m - 1/2)/Pi + v (1 - v) Tanh[b Sin[10 u]]/b}, {u, -2 Pi, 6 Pi}, {v, 0, 1}, Axes -> None, Boxed -> False, Lighting -> "Neutral", Mesh -> False, PlotPoints -> {120, 20}, PlotRange -> All, PlotStyle -> Directive[GrayLevel[1/5], Glow[Gray], Specularity[Gray, 90]]]]
 
posted on May 23, 2012 by Stephen Wolfram

Today I’m excited to be able to announce that our company is moving into yet another new area: large-scale system modeling. Last year, I wrote about our plans to initiate a new generation of large-scale system modeling. Now we are taking a major step in that direction with the release of Wolfram SystemModeler. SystemModeler is a [...]

 
acl
5:43 PM
all, I've removed all sorts of irrelevant tags (plotting, differential equations and the like) from here:
8
Q: Saving data inside a notebook so that I don't have to run it again?

DNAPiggybacking on this, I am somehow not fully convinced that I can't save data generated by a calculation in a mathematica file so that when I re-launch said file, I wouldn't have to run my calculations again. I ask because I use NDSolve for 4th order non linear PDEs and sometimes I need to run i...

and added and
any other ideas?
 
@acl That suffices, I think.
 
6:12 PM
Hello
Cheerio
 
lol -- anyone watching ignore the last question I posted. Contributing to multiple SE sites gets confusing.
 
6:36 PM
@acl Are questions about that going to be on-topic? AFAIK it uses a different programming language.
 
@MrWizard I never noticed that ... I almost lambasted a person for re-posting a question that had been closed as being off-topic here. Note: I was on sci-comp at the time.
@Szabolcs I'd say no, unless it was built on top of mma and mma is accessible.
It appears that they're separate but compatible systems. So, I'd say that interfacing the two is on topic, but questions only on SystemModeler are off-topic.
 
6:55 PM
What if it is going to ship with some "premium" version of Mathematica and most universities will purchase it (i.e. many of us will have access)?
 
We'll cross that bridge when we get there.
 
acl
@Szabolcs no clue; I didn't post that!
 
@acl I'm sorry, it was meant to be a reply to the blogpost
 
@acl He mis-clicked. ;)
@Szabolcs: did you derive the equations for the nautilus surface yourself? It's quite nice! Coloring it was slightly difficult, but I managed to do so...
(...though I could probably have spaced the ribs logarithmically so that it looks better.)
 
@acl but the code is really easy. I even wrote one english sentence ...
 
7:07 PM
@JM Yes, I did, step by step. I used to love to do parametric surfaces when I was in high school (it was a good exercise too, just to figure out how to get e.g. a sphere, and getting all kinds of shapes---mostly tori---while trying)
 
@JM The ribs are logs themselves
 
Does anybody know why SetDelayed has Attribute SequenceHold ?
 
@belisarius Yes, that's why I said it would have looked more realistic if the stripes were log-spaced, but I will have to figure the proper color function later...
 
@rcollyer what do you mean by "Hmmm, unpingable mods." ? BTW: ParallelMap is not necessary. Just an extra second.
 
acl
@RolfMertig what are you referring to? I am getting confused here...
 
7:10 PM
@RolfMertig Maybe so we can do a := Sequence[1,2,3] then re-use it? On yesterdays visualization seminar they did something like options = {PlotRange -> ..., Frame -> True, ... etc.}, then used it as Plot[..., options]. I did not know that the options could be in a list, and I would have used optiosn = Sequence[ ... ] myself instead. That could be one application (but it turned out it's unnecessary ...)
 
@Szabolcs Awesome. I love surface synthesis. :) The pieces you used to assemble it look obvious in retrospect... :)
 
@acl I think he was talking about SystemModeler
 
acl
oh I see, a continuation of the confusion!
 
It's fun to reply to lines many pages away... :D
 
7:39 PM
@acl to your post at 15:32 or so
@Szabolcs But suppose := would not be SequenceHold I could just do a:=Apply[Sequence, {1,2,3}] . I also always wondered why If is SequenceHold. I think it should not be (so I could do If[x>1, {3,4},Sequence[] ]; Now I have to do something like ReleaseHold[If[x>1,{3,4},Hold[Sequence[]]]]
 
R.M
@RolfMertig still confusing because the times are in your local time zone... next time, you could use the reply button so that it's easy to track :)
 
@RolfMertig, I agree with you, but
in the docs of SequenceHold, it gives @Szabolcs's excuse
"Assignment operators are SequenceHold, so that sequences can be returned as results:"
(or explanation)
 
R.M
@RolfMertig I often use ##&[], which came up in a discussion between Mr.Wizard and Leonid... so it would be something like If[x>1, {3, 4}, ##&[]]
 
7:55 PM
In rules it makes sense I think, so perhaps it has to do with a possible use of DownValues?
f := Sequence[2, 3]; f2 := Sequence @@ {2, 3};Hold[f, f2] /. Join[OwnValues[f], OwnValues[f2]]
gives Hold[2, 3, Sequence @@ {2, 3}]
 
R.M
btw, If has SequenceHold?
Attributes[If]
{HoldRest, Protected}
 
@RM, what could be a use of ##&[]?
Oh, I see
Interesting
 
@RM sure. I am tired. I meant: If should have attribute SequenceHold. Probably I just don't like SequenceHold. But it is necessary, I guess.
@RM Cool!
 
These are the only system symbols with SequenceHold, so it's not that bad
{"AbsoluteTiming", "Rule", "RuleDelayed", "Set", "SetDelayed",
"TagSet", "TagSetDelayed", "Timing", "UpSet", "UpSetDelayed"}
So, timings, rules, and sets
(If you include the HoldAllComplete ones, {"Assert", "DebugTag", "DisplayWith", "HoldComplete",
"InterpretationBox", "MakeBoxes", "Parenthesize", "PreemptProtect", \
"SystemException", "Unevaluated"})
 
R.M
@Rojo It does nothing, which is very useful :) Mr.Wizard called it a vanishing function, which is an apt name, I guess...
 
8:13 PM
@RolfMertig You mean why If isn't SequenceHold, right? I agree, it would make sense for it to be.
 
@Szabolcs yes.
 
acl
8:24 PM
@RolfMertig the problem isn't that the code is complicated... but OK
 
@Verbeia Your modification to the ad seems to be very popular :-) I think after a full 24-hour wait we can go ahead and post them (just to make sure all time zones got a chance to wait). @whuber has the idea that instead of just choosing one ad, we can cycle through them periodically.
 
8:44 PM
@RolfMertig You can use If[condition, something, Unevaluated@Sequence[]] too. I just realized I used this in the image uploader palette.
 
@Szabolcs That's very nice. Thanx!
 
rot90[{x_, y_}] := {-y, x}

dist[a_, b_, pt_] :=
With[{v = Normalize@rot90[b - a]}, Abs[(pt - b).v]]

ClearAll[downsample]
downsample[points_?MatrixQ, eps_] :=
With[{a = First[points], b = Last[points]},
Module[{mid, distances},
distances = dist[a, b, #] & /@ points;
mid = First@Ordering[distances, -1];
If[distances[[mid]] < eps, {a, b},
Join[downsample[points[[;; mid]], eps],
Rest@downsample[points[[mid ;;]], eps]]]
]
]
downsample[points : {a_, b_}, _] := points
 
acl
@Szabolcs thanks
 
@acl That above is a very quick and very dirty Ramer-Douglas-Peucker which I used to downsample some simulation output before creating figures. It's quite slow and I only used it on curves that had a monotonically increasing x-coordinate (something like a function that you can show with ListPlot). If you improve it, let me know!
 
acl
does anybody know if I can get mathematica to never use more than a single core?
 
8:52 PM
It might have problems with curves that turn back, I didn't verify the code now, just copied and pasted from my old notebook.
 
acl
eg are there any options I can set?
 
@acl Yes, there's a systemoption, let me check ...
 
acl
@Szabolcs curves that turn back will likely be a problem, from my attempt
 
@acl Experimental`SystemOptionsEditor[] is the easy way to set system options, look under parallel.
 
acl
OK, thanks. let me see if that does work
 
8:54 PM
@acl SetSystemOptions["ParallelOptions" -> "ParallelThreadNumber" -> 1] should affect the MKL (e.g. LinearSolve which is multithreaded), and under Edit -> Preferences -> Parallel there's a setting for the parallel computing tools (how may kernels to launch)
I must sleep now, good night all!
 
acl
@Szabolcs no, it doesnt affect linear algebra computations
thanks though
in case anybody knows something useful:
my problem is not to avoid launching kernels, it is that my program involves a number of matrix multiplications inside an NDSolve, and this seems to grab as many processors as it can within a single kernel.
 
That's our ad posted on CrossValidated (@Verbeia and every one else)
 
acl
this means that when I run it on some machines at work, it goes and grabs 10 cores.
it is not faster, though. and the actual problem is that it counts as processor time, so I end up having to request the queing system for days of computing time; this means I end up waiting for 10-20min for my jobs to run
so if anybody knows of any other ways to control this kind of thing, I'd appreciate being told.
our logo is a flower-like object with the world "funnest" in the title. amazing
pink, too! :)
 
Ugh, here's an annoying inconsistency
Range[3, 3, 0] will produce {3}
Range[3, 3, 0.] will fail
 
9:11 PM
@Guillochon On which operating system does this fail?
Ahh, here too.
 
I guess a safe way is to wrap the third argument in Rationalize[#, 0]
On another note, I have a question about how substitutions work within plotting routines
I have a function that won't plot because I presume something is being held in symbolic form
But if I do something trivial like this: Plot[func[x] /. x -> xx, {xx, 0, 1}]
That will make it plot
And I'm not sure what is going on to make that happen
(P.S.: All my function arguments have _?NumericQ)
 
9:29 PM
@Guillochon Usually not a good idea to mix exact and inexact numbers...
 
That was just an example, the real code has finite precision numbers for the plot limits
many mathematica functions break (as you can see above) if you don't use exact numbers, unfortunately
 
@Guillochon I was talking about your Range[] example, which is what my message was linked to.
 
Ah, sorry
 
@Guillochon What does func[] look like, for starters?
 
It's a little complicated
I'll pastebin it
the function in question is "elef"
 
9:42 PM
@Guillochon Tsk, unfortunately I'm out of time today. I'll get back to it if no one has looked at it while I'm away.
 
@RolfMertig J.M had edited something that I wanted to discuss with him, but he's is not directly pingable here. (or, anywhere, for that matter.)
 
See you guys later.
 
@JM OK, no problem
 
@rcollyer Wrong timing... I'd ask if I wasn't about to leave.
Anyway... *poof*
 
@JM see you later!
@JM For reference, when you get back, it was your edit for this question which made it an exact duplicate of his newer question.
 
9:47 PM
Alright, I guess I have a relatively simple version of my question that I can post to the site
 
@Guillochon Let me se if I understand. Are you trying to integrate lef[n] over Xi where lef is of the form lef[n_] := Theta[Xi] /. NDSolve[eqns, Theta[Xi], {Xi, ...}]
 
yes
sorry, the pastebin doesn't handle all the greek gracefully
 
10:02 PM
I think the problem could be that in NDSolve you're solving for Theta[Xi], so the solution is of the form Theta[Xi] -> ..... This means that Theta[Xi] /. NDSolve[..., Theta[Xi],...] will work but Theta[2.] /. NDSolve[...], say, will just return Theta[2.]. Instead you could try lef[n_] := Theta[Xi] /. NDSolve[..., Theta,...]
 
@Szabolcs Glad everyone liked it. But really, credit to @@wxffles for coming up with the design and @Szabolcs for the ad design. I just wrote a different slogan and played with colors.
@acl I first heard "funnest" in a keynote by Steve Jobs. I think it was about Photo Booth. It's not really a word, but that will get attention.
 
acl
10:17 PM
@Verbeia yes I gathered that that was the aim :)
 
@Heike OK, I'll give that a try
 

« first day (126 days earlier)      last day (2758 days later) »