« first day (856 days earlier)      last day (3634 days later) » 

12:02 AM
Isn't the Listable attribute of Plus too narrow minded? I think there should be a NumericListable and NonNumericListable attribute. Otherwise one runs into trouble defining functions which should work for symbolic and list entries. Since right now: (({1, 2} + x) /. x -> {3, 4}) ===
({1, 2} + (x /. x -> {3, 4})) gives False. Which in a larger function can get quickly unnoticed (just happened to me while debugging ...)
 
@RolfMertig Good morning!
 
Or abstract data types should be added ... But that is maybe asked too much and Scratchpad (alias Axiom) tried to do this and it was quite hairy.
Good evening (I am in Mexico, UNAM, right now)
 
@RolfMertig Oh... I just was about to ask why on earth you are up ;-)
 
@halirutan: why are YOU up?
Ruhig und kühl, ja?
 
@RolfMertig Working. It was 40 C today, so I'm doing a night shift
@RolfMertig Ja.
@RolfMertig To be on-topic: I often rely on the behavior that {1,2}+x is evaluated to {1+x, 2+x}. It simplifies many operations where you want to add a scalar to both elements.
 
12:13 AM
@halirutan Right. A scalar. But if x is a list or matrix, this is just not right ...
Basically I miss a way to Assume data types. And probably there is no easy way to achieve this.
So what I want is either something like the y: Integer declaration on page 26 of axiom-developer.org/axiom-website/bookvol1.pdf, or Listable should be extended: If there was an Attribute NumericListable, then I could change Listable to NumericListable and all is fine. So maybe my question is (@Leonid, or, @WRI) : how to add Attributes to built-in Mathematica functions. But probably that is asked too much an d I'll just use some workaround now (or I am going to finally study Axiom ...)
 
@RolfMertig You can add and delete attributes of Plus as you like. The problem is that the set of Attributes is fixed:
> The attributes available in each version of Mathematica are fixed and cannot be changed.
 
Right. And that is quite limiting for advanced stuff.
 
@RolfMertig I occasionally find myself wanting {{1, 2}, {3, 4}, {5, 6}} + {7, 8} to be intelligent enough to give: {{8, 10}, {10, 12}, {12, 14}}, but I guess then it would be hard to remember if a 2x2 list plus a 2x1 list would thread across the rows or the columns.
You can add custom "attributes", just not custom "Attributes" I guess.
 
12:45 AM
@RolfMertig How bout something like this:
SetAttributes[f1, Attributes[Plus]];
SetAttributes[f2, Attributes[Plus]];
ClearAttributes[f1, {Listable, Protected}];
f1[a_?NumericQ, b_List, rest___] := f1[f2[a, b], rest]

SetAttributes[WithSpecialPlus, {HoldAllComplete}];
WithSpecialPlus[code_] :=
 Block[{Plus = f1},
  With[{body = code},
   HoldForm[body] /. {f1 :> Plus, f2 :> Plus}
   ]
  ]
WithSpecialPlus[3 + a + {1, 2}]
@RolfMertig the thing is, as soon as you leave the environment, the old behavior of Plus will kick in (because you don't want HoldForm in the final version).
@RolfMertig If you kill the HoldForm and put the replacement of f1, f2 at the end, then the following code gives the right answer:
WithSpecialPlus[Block[{a, expr},
  expr = {1, 2} + a;
  a = {3, 4};
  expr
  ]]
(* {4, 6} *)
while the usual version will give the unexpected {{4, 5}, {5, 6}}.
 
I hesitate to call that unexpected though. In general, doing a replacement at different points during an evaluation gives different results.
 
@MichaelHale Unexpected in the sense of Rolf's suggestion.
the above approach won't work correctly anyway for many arguments.
 
1:10 AM
I have looked into `root/AddOns/Applications/Parallel` and it seems that per default parallel subkernels are always started with `-noinit` which makes it impossible to set the `$Path` variable for subkernels upfront.
For the main kernel, you have various options: (1) You can append something to `$Path`, (2) you can call your package with `Get[pack, Path :> ...]` (which is not working if you are calling an `Kernel/init.m` file contains additional `Get` calls and (3) you can use `SetOptions[Get, Path->..]` which will make that all subsequent calls to nested `Get`'s will work too.
The first and the last approach will make that calls to Needs work too. Unfortunately, I haven't found a way to change the default setting of $Path on the subkernels. Therefore, I suggest that you define a ParallelGetDev which first appends your dev folder to the $Path variable of all subkernels and then calls Get on.
 
2:04 AM
@halirutan I think I'm going to do something like that. Sorry for the sudden disappearance. Got an RPi today, which can be a big distraction :-)
 
@Szabolcs Here, I'm using different development machines, so I differenciate them by name. I would probably use something like this here.
This expects that you use dev-folders like the WB creates them.
So if you develop package A, then the actual Mathematica code is under devfolder/A/A.
 
2:54 AM
@RolfMertig What about the new Inactive for those kinds of things? You do whatever operation and activate after the replacements?
having more power over attributes would be great anyway
 
@Rojo Damn. I want a RPi
 
@Rojo I haven't said anything about _buying_it
 
@belisarius I'm just pointing out where you can steal it
 
@Rojo Not True. No address there
 
3:05 AM
@belisarius I have to do everything for you?
 
@Rojo Bring me that RPi, I'll buy you a couple of beers
 
@belisarius I don't believe you, you'll steal them
 
@Rojo Well, right. Is there any difference?
 
@belisarius I can't answer that, I'm not under a pseudonym like you
 
@Rojo I always thought your real surname was "independiente"
 
3:12 AM
@belisarius No, it's Rojo
and my name Caballero
You can call me gentleman
 
@Rojo mucho gusto. Martin Karadagian.
 
@belisarius I always thought your real name was El Hombre De La Barra De Hielo
 
@Rojo That was a nome-de-guerre I used mostly at night. After I had to cease with Martha when the catchphrase "Pegame y llamame Martha" became popular
 
Jaja
 
@Rojo Nights! I need some sleep
 
3:24 AM
@belisarius Night
 
 
7 hours later…
10:54 AM
Just out of curiosity, is anyone going here? aerovehicles1.sciencesconf.org
"First International Conference in numerical and experimental aerodynamics of road vehicles and trains." in Bordeaux, France.
 
11:52 AM
@Öska Bordeaux in June, hmm? Nice, but will have to pass on this one ;-)
 
12:03 PM
I need to use something like:
Block[{x = HoldForm[x]}, x]
but x is makred Red, so is it safe?
@Öskå I would love to but no time no money :P
 
@Kuba I am dimly remembering someone from WRI advocating this, but I cannot find it right now (or my memory plays tricks on me).
 
Aww, too bad :( I would have liked to meet one of the Mathematica pros from here :P
 
@Öskå so you are going to be there? Nice, is this what you are doing for living?
@YvesKlett thanks. I will ask a question involving this construction later so be prepared :p
 
@Öskå well, go look into a mirror :D
 
I don't do anything for a living right now.., I recently graduated and after looking for a job in Scandinavia for 3 months I am now looking for a job in France, where I live :) That's why I'm spending so much time on here these days, not having a job helps :)
And I'm doing structural/mechanical engineering, which can be coupled with fluids sometimes, hence that conference :)
 
12:15 PM
(but yes, that should be fun!)
 
@YvesKlett Stop that now, I'm gonna blush ;o)
 
 
4 hours later…
4:19 PM
What happens when you press the "Leave open" button while reviewing items in the review queue? It seems that the number of close votes is not affected and, as far as I can tell, it's not recorded as a re-open vote in the event that the question is closed.
 
5:19 PM
@MarkMcClure If the outcome of the review is "Leave open" (i.e. a majority voted for it), then the post is removed from the queue and the close votes start expiring. In other words, they aren't removed immediately, but the life of each vote is now only 4 days. If it doesn't get closed, then soon the number of close votes will be 0.
 
5:33 PM
So who else here, other than @bobthechemist, uses Mathematica on the RPi? I'm looking for cool projects :-)
As a start I'm trying to make a trail cam, as well as a camera trigger for external cameras based on motion and colour detection (interesting birds are colourful!).
 
@rm-rf Thanks!
 
 
2 hours later…
8:00 PM
The developers of MATLink are saints. Had to use a package in matlab ... but being able to use it in conjunction with mathematica was all to sweet. If any of the developers are ever in california drinks on me
 
8:51 PM
SIGGRAPH 2014 technical papers preview video was posted last week. I always find it pretty inspirational. youtube.com/watch?v=u3Z1hDwGEmM
 
9:25 PM
@MichaelHale strong stuff!
 

« first day (856 days earlier)      last day (3634 days later) »