« first day (178 days earlier)      last day (4295 days later) » 

12:01 AM
@Verbeia Just give us your password and we will post a few things in your name
 
On a related matter, I'm going to post my last How are we doing update this weekend.
@belisarius haha
 
How do you handle the size of text you mix with graphics?
I just want a letter inside a rectangle, that scales it's size with the rectangle
or with a fixed size in graphics coordinates coordinates
Szabolcs, I need your blog post on coordinates
 
R.M
@belisarius verbeia@verbeia.com password: hunter2
 
@RM Thanks a lot. I'll change it for something more esasy to remember
brb
 
Haaaha
 
R.M
are there any known easter eggs in Mathematica?
 
1:05 AM
@RM What do you consider an easter egg?
Around V3 or V4 holding down a modifier while clicking near the edge of the window on X would bring up a picture of one of the developers. But that's been gone for ages.
 
R.M
@BrettChampion I found that online when I searched for Mathematica easter eggs, but it didn't say anything about the version. I just assumed that person was high
 
@Vlad sorry, nobody answered you seriously, and I think you were asking those questions in all seriousness. We answer because it's fun, like doing crossword puzzles. Also, by answering questions, one becomes a better Mathematica programmer. Which answers your third question - practice! Including asking and answering questions here.
 
R.M
But yeah, stuff like that... I can only give MATLAB's examples: spy() used to bring up a sparse matrix with the spy vs spy image. Also, why
 
@RM No, it was definitely there; I remember finding it while I was still in grad school.
 
R.M
Also, something like this
 
Jin
1:14 AM
hi @BrettChampion, was just about to reply to your email
thanks for the headsup btw!
 
@Jin No problem.
Anyway offhand I can't think of any easter eggs, just lots of undocumented features...
 
@Verbeia I answered quite seriously
 
In[58]:= foo := x
x = 1; foo
x = 2; foo
Module[{x = 3}, foo]
Block[{x = 3}, foo]

Out[59]= 1

Out[60]= 2

Out[61]= 2

Out[62]= 3

In[63]:= x

Out[63]= 2
does the above imply that all mathematica variables are dynamic bound by default?
 
R.M
what are you trying to do and what do you want to find out?
 
I'm executing pages 93-94 of Wagner's book
and I'm trying to understand how scoping works in mathematica
 
R.M
1:25 AM
Wagner's book is notoriously hard to find these days, so you're a lucky dog. But page 93-94 means nothing to me
 
It talks about Lexical vs Dynamic Scoping,
and in particular, the difference of Module vs Block
given the way Block works, it appears as if all mathematica vars are dynamically scoped by default
(since I can "override" their global value with a Block)
 
Jin
7
A: What should our site design look like?

RojoThis would be a first attempt at a code that generates the knot. Graphics experts can prettify it With[{absRoundabouts = 5, phaseRoundabouts = 2, depthRoundabouts = 5}, ParametricPlot3D[ Evaluate@ Append[(2 + Cos[2 Pi t absRoundabouts]) Through@{Cos, Sin}[ 2 Pi phaseRoundabouts ...

can someone generate that knot graphic and send me the vector?
I need have to update the logo to that one.
 
R.M
@termrewritica You'll find a lot of value in reading this answer by Leonid
 
@RM You should have @termrewritica send you his copy of the book "for a bit" so you can look at it. :-)
 
R.M
@termrewritica Also see this:
39
A: What are the use cases for different scoping constructs?

Leonid ShifrinYou will find a lot of information in this answer. I will add a few personal notes. Module Use Module when you want to localize variables inside your function`s body, and those variables will potentially acquire and/or change their values during the computation. Basic use For example: f[x_]:...

 
1:27 AM
lol, who is Leonid, and why is he so prolific?
 
R.M
@BrettChampion yeah, he totally should. I swear, I'll return when I'm done
 
is there no pdf of the book floating around?
 
@Jin bummer
That's a great logo too, but obviously disappointing that Wolfram Research felt the previous one was too close to the Mathematica logo
 
@Jin the other one was to close, I'm assuming?
 
woot! chapter 4 done. Up to chapter 5. This is the first book I've read in ages where my rate is < 1 chapter per day.
 
Jin
1:32 AM
well, it's my goal not to get sued :) I respect their opinion and thanks @BrettChampion for giving me the heads up before the site launch!
I think there's plenty time to make tweaks
 
R.M
@termrewritica He's the tsar of Mathematica or Леонидъ Шифрин, Царь Математика
 
Jin
^ super rough draft
 
R.M
waaaah :(
 
Jin
I'd like to have that shape not in gradient shade, as posted in the answer
@BrettChampion is that OK?
 
@RM Hmmm, allegedly there's a copy of Wagner in our library. I should see if it's actually there.
 
1:34 AM
@Jin I can appreciate and respect that. Just a little disappointed. Oh well, that's how the logo crumbles. :P
 
R.M
I wish I had never seen what it could have been...
 
Jin
I actually did consider using the knot too. but I went with the other one because I liked the shading.
 
@RM: what is the "what it could ahve been" ?
 
R.M
@Jin Can you use the twisted knot (below the one you used)
 
@termrewritica Here.
 
Jin
1:35 AM
@RM sure.
 
@rcollye; I Like. Why are we not using it?
"we" might be a bit strong given I've been here for < 1 week
 
@termrewritica potential legal difficulties.
 
from wolfram ?
 
Jin
@RM my only concern with that one is, once it's flat shaded, the "twist and turn"s may not look as obvious
 
R.M
Can we use a creative commons picture of Wolfram for the captcha?
 
1:37 AM
@BrettChampion Isn't WR afraid of US? We could sue them for menacing behavior!
 
R.M
@Jin Could the previous logo, but with a hexagon instead of a pentagon work?
 
Jin
@RM I'm guessing it's the spikey-ness that resembles the official logo. so I'm not sure having one extra angle helps or not
I feel like a more round and organic shape such as the knot may be safer.
 
can't we just get Wolfram's blessing?
this after all, is meant to help with Mathematica
 
R.M
@Jin The shading looks nice though... what if the spikiness was filed out?
 
Jin
1:41 AM
@RM can you show me an example? i'll send several mockups to WRI see if if they're ok with them
I really like the colors in the old logo, I hope to keep them.
 
R.M
Hey mma design pros, you heard the man, get on it!
 
Jin
meanwhile if someone can do the knot in vector for me that'd be great :)
 
Can Matheamtica render vector?
it seems like lighting/shading does not go well with vector
 
1:44 AM
That's what it is internally, essentially just a list of primitives.
 
lighting/shading <-- doesn't this use ray tracing?
ray tracing, iirc, gives pixels, not vector
 
Unless it has been rasterized or is an image loaded to begin with.
@termrewritica I don't know how the lighting is done.
 
In[114]:= Clear[a]
gmean[lst_] := (Times @@ lst)^(1 / Length[lst])
gmean[{a, b, c}]

Out[116]= (a b c)^(1/3)

In[117]:= hmean[lst_] := 1/(Plus @@ ((1/# &) /@ lst))
hmean[{a, b, c}]

Out[118]= 1/(1/a + 1/b + 1/c)

worked on first time -- I am impressed
err, "worked on first time referes to the harmonic mean"
 
Sometimes they do. Functional languages are easier to get right the first time.
 
R.M
@termrewritica why not hmean[lst_] := 1/Total[1/lst]
 
1:47 AM
@RM: because I'm not smart enough to see Listable
Is there something like "Zip" in mathematica? where it takes n lists as inputs, and creates a single list with the first elem of each list; 2nd elem of each list, 3rd elem of each list, etc ...
 
R.M
@termrewritica sounds like Transpose
 
@RM : damn it, it is
Mathematica really takes the "100 functions on 1 data structure" to a new level
 
@rcollyer Did you change your avatar? or was just an unexpected Higgs interaction?
 
@RM Can you beat this for euclidean distance?
In[142]:= euclid[p1_, p2_] := Sqrt[Plus @@ ((p1 - p2)^2)]
euclid[{x1, y1}, {x2, y2}]

Out[143]= Sqrt[(x1 - x2)^2 + (y1 - y2)^2]
 
R.M
1:57 AM
EuclideanDistance ?
 
@RM I should learn to type quicker
 
@RM : you win
 
R.M
@Jin Is there any possibility of a collaboration/partnership with WRI, just like canonical for AU?
 
Jin
@RM hm I'm not sure. AU was a special case, Canonical approached us first, if I remember correctly. the design was done by their designer
 
R.M
@Jin are you at liberty to say anything about what their lawyers said or what the reaction was?
 
Jin
2:03 AM
I'd love to see some kind of partnership though, to mutually promote each other.
 
it would be great to have a mathematica bot in thist chat
 
R.M
and what would the bot do?
 
it would evaluate expressions
it would be a matheamtica evaluator
 
Jin
@RM I'm not sure if I should. I'm not a lawyer, so I'll play safe :) but the gist was basically the Mathematica trademark and logo use.
I don't think this changes the overall design too much. it's just the logo that's all.
 
R.M
@Jin we'll have to disagree on that one :)
 
Jin
2:06 AM
@RM I mean the overall look and feel of the design. if we get a logo that's just as intricate in shape, similar color I think it'd be OK.
 
I like the old logo more.
 
R.M
I'm skeptical about their claims though.. it's basically arm twisting. Their logo is a dodecahedron, whereas ours is a pentagon. It's true that a dodecahedron is basically a pentagon tiled in 3D, but... oh well
 
Is the dodecahedron patented? Poor Euclid!
 
2:10 AM
marvel at my elegant moving average:
In[189]:= moveAvg[lst_, num_] := Plus @@@ Partition[lst, num, 1] / num
moveAvg[{a, b, c, d, e}, 2]
moveAvg[{a, b, c, d, e}, 3]

Out[190]= {(a + b)/2, (b + c)/2, (c + d)/2, (d + e)/2}

Out[191]= {1/3 (a + b + c), 1/3 (b + c + d), 1/3 (c + d + e)}
 
@termrewritica MovingAverage[] ?
 
this was exercise 2 on page 103, "Implement MovingAverage using Partition, Map, and Apply" :-)
I really wish mathematica had a @SRC command,
that would show me the source code of each command; it would be quite enlightening
 
@termrewritica Not all Mma is implemented in MMa ... obviously
 
dumb question: why has no one ever recomended Wolfram's "Mathematica: using computer to do math" or "The matheamtica book"
are they poorly written, too advanced, or something else?
 
R.M
@termrewritica because they stopped printing it after v5
 
2:14 AM
the book I'm reading targets mathematica v3
 
@termrewritica When you feel comfortable with the functional aspects, remember to read the ToolBag question
 
72
Q: What is in your Mathematica tool bag?

TimoWe all know that Mathematica is great, but it also often lacks critical functionality. What kind of external packages / tools / resources do you use with Mathematica? I'll edit (and invite anyone else to do so too) this main post to include resources which are focused on general applicability i...

 
oh shit ... I can evalute shell commands in the notebook?
I should make matheamtica notebooks my new zsh
 
@termrewritica Using four letter words cost you 100 rep points
 
2:22 AM
@bellsarius: ah, good to know for future references
 
@termrewritica yep
 
@belisarius photon-photon interaction.
@termrewritica don't let him fool you, I use 4-letter words in here all the time, e.g. hello, etc.
 
@rcollyer They don't charge you if you don't know how to count
 
@belisarius well, shit, apparently I don't. ;)
 
@RM @jin what about a fourpoint? it works in the rest of the design still.
 
R.M
2:31 AM
with the other frills and designs worked in?
 
@Jin I tried and got a 750Mb PDF. Must be doing something wrong and it crashed Mac OS X Preview
 
@rcollyer Length@Characters["hello"] == 4
 
Jin
hmm weird.
 
R.M
@Verbeia must be all the shading
 
Jin
@Verbeia sure.
 
2:32 AM
@RM like
 
R.M
@belisarius StringLength["hello"]
 
@belisarius that's to easy. Can't you make it more complicated?
 
@rcollyer I will try
@RM We are playing
 
@belisarius sort of a reverse code-golf.
 
R.M
@rcollyer "hello"~StringLength~## &[]~Equal~4
 
2:34 AM
gotta go - talk later
 
@rcollyer StringJoin[{{"h"}, {"e"}, Array[{"l"} &, 2], {"o"}}]
 
@RM Length@("hello"~Characters~## &[])~Equal~4
 
@Verbeia bye!
 
R.M
@rcollyer Uncompress@1:eJxTTMoPKmZlYGBwS8wpTgUAGawDqA==
 
Length@("hello"~Characters~SlotSequence[] &[])~Equal~4
 
2:38 AM
@rcollyer FromCharacterCode[{4, 1, 8, 8, 11} + 100]
 
Length@(FromCharacterCode[{4, 1, 8, 8, 11} + 100]~Characters~SlotSequence[] &[])~Equal~4: 81 chars
 
R.M
Import["https://dl.dropbox.com/u/33211495/foo"]~StringSplit~ "." // Length
 
`FromCharacterCode[
Join[{#[[1]]}, Accumulate[Differences[#]] + Length@# - 1] &@{4, 1, 8,
8, 11} + 100]`
 
StringLength@"hello": 20 chars, so 81 is an impressive increase while remaining completely functional, no dead branches to pad the code.
 
@rcollyer I-d call that "self promoting"
 
2:43 AM
@belisarius Impressive.
`Length@(FromCharacterCode[Join[{#[[1]]},Accumulate[Differences[#]]+\
Length@#-1]&@{4,1,8,8,11}+100]~Characters~SlotSequence[]&[])~Equal~4`: 135 chars.
 
R.M
TextRecognize@
  Uncompress@
   "1:eJztW7FuGkEQHSVRlBTp/\
AP5Ab7AzSVSrEiRiEjrhljgIDlwMrggpTtKd3RUrqhcuUrjiobGDY0LGhoKChoKCmcfNxu\
W8+3e7QHJnbwjPQ6Om9l3s7Mze7vw/nujVH1JRM034uXovOz/\
qJ00q69w5rV4KZWbrcp5HVccCBwK4P2jg4ODg4ODg4ODg8OzwVxgJjAVGCuYKJjxdYsM8H\
3uWCj9NQn1mey3KV+Tpr+\
WbOdGwCM78QX6AiOBB7bRtrThsd6YuZj8gGvuuI2iQMGyLSkF1u8I9ARuKfBjnP/w/Yh1/\
oUcC1xTMBbzwCfMDT4dCFyybpr+KrDuJdsak7mfltwu+\
rRo2RbiCrH4wO3ccrs2UqR1PIXjecG2+\
wlt4b595oVjlez9CJ1RBBc1fq41NguWbak6Yb0Cc+mTvv+yxmeu8EkixyHI/koiGMP3FD+\
I win.
 
@RM -1 that is cheating
 
R.M
@belisarius Or in other words, you didn't think of it first ;)
 
@RM probably.
 
@RM That is another way to say it
 
2:48 AM
@RM I'm not sure every bit of it is functioning code, but it is an amusing variant. Reminds me of the Daily-WTF.
 
@belisarius that was brilliant, wasn't it?
 
@rcollyer A master mind product
 
I like reading the Tales From the Interview section.
They are terrifying and hysterical.
 
@rcollyer well, I do interviews all the time ... you should hear the other bell too
 
2:55 AM
@belisarius they have tales from both sides, the interviewer and the interviewee. Some of them it is the interviewee making fun of themselves.
 
@rcollyer I read a few of then some time ago and found only the interviewee POV,. Perhaps I did not read enough of them
 
@belisarius Try this one, second one down.
 
@rcollyer From yesterday> "What was your last project?"
Answer. "I don't remember"
 
For an interview you gave?
Either way, wow!
 
I made the Q ..
:)
interviews are like chess ... stupidity arises mostly when you try to hide something
 
3:00 AM
I can't say I've ever done that in an interview ... no wait, I did screw one up a while back, but not in that way.
or, even close.
 
Oh ... I have a full book of anecdotes ... me being on both sides
 
yeah, you can't help it sometimes.
 
Interviewing a wanna be CTO. "What was your biggest achievement?"
answer
"Achievement?"
 
brilliant, absolutely brilliant.
He got the job, right? ;)
 
@rcollyer No, but I invited her to lunch
 
3:05 AM
@belisarius did that go anywhere interesting? or just a good meal?
 
@rcollyer I have a NDA. sorry.
:D
 
@belisarius standard in those sort of entanglements.
 
@rcollyer Seriously, each interview is an adventure. People is SO nervous that the better and worst of them is fighting to appear at the least stimuli
 
@belisarius I went on one recently, and I am very familiar with that feeling.
 
R.M
@Jin The center part of the pompeii mosaic also looks nice... (I mean just the inner part with the six triangles and the circle)
 
3:09 AM
@RM I like that.
 
@rcollyer Question: "What do you expect from our relationship?"
answer
" $ xxxx a week"
 
@belisarius It's better than saying: "sex." But, I guess that depends on the interview ...
 
@rcollyer Sex is not an option. just a complement :)
 
lol
Okay, I am ready to pass out here. Talk to you later.
 
I had an interview once with a VERY nice woman
wait hear this one
 
3:12 AM
sure.
 
she was applying as a Systems programmer
and she was VERY good
almost too good for the job
lot of experience. A first class uni. Clever.
The problem was that she knew all that and wanted much more money than the scarce pay I had available for her
So, painfully, I said "NO", and linked her with a friend of mine who was also searching the same profile, but with a higher budget
 
that sucks, for you. How did your friend's company make out?
 
As a result, my coworkers forbade me to lunch with them for a month.
 
Ouch!
 
All of them were in love with her *at first sight)
:D
 
3:18 AM
"Love," right.
 
yep
 
Okay. I'm falling asleep as I type. Night.
 
@rcollyer Night!
 
 
3 hours later…
6:05 AM
zzz
 
6:36 AM
0
A: What should our site design look like?

VerbeiaSince the original logo has turned out to be a bit too close to the Mathematica logo for Wolfram's lawyers' comfort, here are a few alternatives that maintain the essential look and color palette, but are different enough to hopefully skirt around the problem. Of course, we can have any combinat...

 
@Verbeia I must have missed something. When did Wolfram's lawyers show up?
 
@Heike Here and following messages.
the knot graphic is lovely but it is very hard to do as vector art and it will change the whole design
 
@Verbeia Hmm, that's a shame. I thought the 2d vs 3d and the different colour schemes would be enough of a difference.
 
@Heike apparently not, but changing the curvature or eliminating it completely might help.
 
6:55 AM
@Verbeia Maybe just changing the colour and/or the number of vertices would be enough
 
@Heike Maybe. I thought R.M.'s suggestion was good, if only I could work out how to colour it correctly.
 
 
4 hours later…
11:14 AM
-1
Q: Becoming one with Mathematica

term-rewriticaProblem: I have been using VIM for close to 15 years now. There is a certain flow one achieves: http://www.rudism.com/s/vimcreep I have used emacs every now and then too. There is also a certain flow one can achieve. As I'm working through these mathematica tutorials; it's obvious to me: my cu...

 
12:04 PM
Morning
Anyone knows why code like this doesn't update in a loop?
ClearAll[x, y];
x = y[];
x[] = 0;
Dynamic[Print@2; x[] = Random[]; x]
 
12:36 PM
@Rojo magic?
I often feel that I have a better chance of understanding quantum mechanics than how Dynamic works.
 
12:59 PM
@Heike Haha
Hope you don't come all the way to the chat for a haha
 
1:14 PM
@Rojo I didn't have to travel far.
 
Hehe
I think I'll be up for a self answer in a few mins :)
I'll tell you to go check if it makes sense, because as usual it will be wild guessing
 
@Rojo Did you figure out the behaviour of Dynamic?
 
So far as the few things I've tried
but not 100% sure yet
 
1:50 PM
HUH=!?!?!?!?
 
R.M
2:02 PM
@Rojo Information::nomatch: No symbol matching !?!?!? found. >>
 
@RM Haha
Sorry
 
R.M
:)
 
I just deleted my question because the behaviour that was puzzling me the most, stopped happening!
and I had restarted the kernel several times, and I never restarted MMA
 
R.M
ah, aren't all dynamic stuff in the FE and not the kernel?
 
Not really, when they evaluate they are generally sent to the kernel
I guess they depend on both
 
R.M
2:05 PM
well, yes, but I have scribbled something in the back of my mind which goes like: if Quit[] doesn't help, then really quit
 
Nice one
However, it got "fixed" when I did nothing
so I'm wondering if I'm mentally fine
 
R.M
Too early in the day to be insane anyway
 
Too early in the day to be drinking also
 
R.M
It's a Saturday... exception granted
 
@Rojo I don't know. 4.15 pm seems like a perfectly good time for a beer.
 
2:17 PM
11:17 AM
@Heike
Still a good time
 
@Rojo that wouldn't have stopped one of my former supervisors
This week I noticed how desensitised I have become to seeing wine bottles all over the office.
 
@Heike a bottle a day is healthy for the heart they say?
 
@Rojo I think you might have made a rounding error there.
 
Hey @Heike, how would you put a text in a rectangle, so that the text size relative to the rectangle is fixed? Meaning, the text size in graphics coordinates for example
Text[Style["H", FontSize -> 250], {0.5, 0.5}] seem to take a fixed size on the screen, and Scaled seems to be relative to the whole graphics size
 
@Rojo Put is in a Pane with ImageSizeAction->"ResizeToFit"?
 
2:29 PM
Let me try that
 
Oh, wait, That wouldn't work. Pane is in printerpoints.
 
I just want rectangle+text primitive to happily translate and rotate around
 
@Rojo But Text primitives can be translated and rotated already?
 
@Heike I mean, i want to make a scrabble piece that I can use in any Graphics with Translate and Rotate, knowing the "H" won't end up being tiny relative to the rectangle, or huge
depending on the ImageSize or the PlotRange
A piece I know, e.g, that it measures {1, 1} in graphcis coordinates
I'm not sure how to go about these things
 
@Rojo Oh, ok. One way would be to turn the letters into FilledCurve's using InputString.
 
2:35 PM
how does InputString fit in here?
It's a dialog that lets you input a string, right?
 
@Rojo You can do something like
First[First[
ImportString[
ExportString[
Style["H", Bold, FontFamily -> "Helvetica", FontSize -> 12],
"PDF"], "TextMode" -> "Outlines"]]]
 
@Heike Thanks! I wouldn't have come up with that in a year
 
@Rojo I got this from the second example in "Neat examples" on the doc page of FilledCurve.
 
R.M
3:33 PM
@Jin still too similar?
 
Jin
4:19 PM
@RM I think so. I feel like the knot is the best option right now
 
R.M
But the knot has absolutely no connection or meaning to Mathematica
What if we removed the pointed star ends?
(ok, there are some gaps at the ends, but they can be filled in — this is a quick one)
 
Jin
@RM I think the idea is to show Mathematica's graphing ability.. in fact, if we make the logo to have a strong connection, then that'd get us in trouble like the old logo.
but, feel free to come up with these samples. i'll forward them to WRI.
they're the ones who suggested the knot, so i know it's safe
^ i think that one might be OK too, from @Verbeia's answer
but i'll forward all these to WRI
 

« first day (178 days earlier)      last day (4295 days later) »