3,842 reputation
1829
bio website
location
age
visits member for 2 years, 8 months
seen 19 hours ago

Aug
8
comment Start Mathematica without the menu bar?
¡¡ WE DID IT REDDIT !!
Jan
3
comment What's wrong with my use of Do?
to rephrase Anon's comment, Do[..., {i, list}] and Do[..., {i, number}] are different forms
Dec
31
comment Get DownValues that do not involve patterns?
one way of extracting the inputs/outputs: Cases[DownValues[f], (_[Verbatim[f][value : Except[_Pattern]]] :> result_) :> (value -> result)] (general note: i figure this out by using FullForm. e.g. FullForm[x_] => Pattern[x, Blank[]])
Dec
26
comment How to generate a random snowflake
i just noticed this isn't particularly in line with what OP was looking for. i don't think it'll hurt anyone though and it's in the Christmas spirit
Dec
26
comment How to generate a random snowflake
some of those remind me of snowflakes i've seen on other planets. ah the memories
Dec
20
comment Module that finds the sum of digits of any given positive integer
@rola please see my answer to this question. it's important to understand that Mathematica's syntax is very "raw", in that there are no keywords. Module is not a keyword. it's a regular symbol/function that you could make your own version of. the important syntax is :=, which expects a pattern on the left and basically anything you want on the right. the purpose of Module is to create local variables. if you don't need local variables then you don't need Module, you can just write the expression, or e.g. f[x] := (Print[x]; x)
Dec
20
comment Module that finds the sum of digits of any given positive integer
@rola Look in the Mathematica documentation (F1 button in Mathematica), it is very useful. Total is basically the same as Plus @@ # & which is the same as Apply[Plus, #] &. The main difference, I suppose, is that Total allows you to specify the level (for example you can add up all the elements of a matrix, instead of its rows).
Nov
30
comment Pasting monospaced text into Mathematica notebook destroys aligment
maybe i'm being an idiot by bringing this up, but you can do some basic vector editing (by hand) in Mathematica
Sep
20
comment Raster with ColorFunction is blank when Dynamic Updating is disabled
@AlexeyBobrick Yep, I lowered the number of kernels. But I don't know if that is a general solution. As I wrote in the update, the problem appears to have something to do with the way Dynamic interacts with Rasterize, which is most likely an actual bug. Look at this thread which deals with the underlying Dynamic problem. I don't know why the number of kernels has an effect.
Aug
25
comment Programming Mathematica in plaintext, i.e. no formatting, non-notebook
@acheong87 you can just right-click in a Notebook and insert a Code cell, which will have standard text/formatting (same cell type as in New -> package). also check out my answer here for an example of the kinds of things you can do with a Mathematica notebook. and do try to play with Manipulate. i don't miss Vim much in Mathematica because Mathematica code is very succinct. i consider around more than 200 lines to be a large Mathematica program. you can accomplish a lot very efficiently once you get into the vibe of the language
Aug
19
comment Automate mouse clicks with Mathematica
hmm wonder why this syntax didn't occur to me. @RodLm feel free to change the accepted question
Aug
19
comment Automate mouse clicks with Mathematica
@RodLm for some reason i had assumed you were familiar with Java. to be clearer: the mousePress function expects an integer. mousePress(InputEvent.BUTTON1_MASK) works in Java because InputEvent.BUTTON1_MASK is an integer in Java. what you do with this knowledge is something i leave to you :)
Aug
19
comment Paste data into Mathematica with formatting
@Liam nah i mean right-click -> Insert New Cell -> Code
Aug
19
comment Paste data into Mathematica with formatting
i just create a Code cell, which preserves the formatting. it'd be nice if these kinds of tricks weren't necessary though. i assume Mathematica eats the formatting primarily to delete spaces, which don't mix well with the pretty-form display
Aug
16
comment Resources on Mathematica and strong AI (a.k.a. AGI)
@Jagra i did peruse the article. i'll give it a serious read later, but one thing i will mention is that your brain plays an enormous number of tricks on itself. eg it's entirely possible that "consciousness" is not only an illusion, but one that is deliberately perpetrated and sustained by the brain itself. i also think the issue of creativity is much easier than it sounds, and has mainly to do with the kind of memory an individual has (eg different people are creative in different ways because they store memories in different ways). don't be too certain about anything involving intelligence!
Aug
16
comment Resources on Mathematica and strong AI (a.k.a. AGI)
from what i've gleaned offhandedly, it seems Lisp was used back then because people thought intelligence had something to do with logic... which is, of course, hilariously naive. Lisp being an expression language and having cultural roots in mathematics made it a good choice for logic programming. there's a chapter in one of Paul Graham's books (free online i believe) that builds a Prolog interpreter in Lisp after implementing continuations, if i recall correctly. statistical machine learning and neural networks are the closest we've come so far to "general" AI, and these are language-agnostic
Aug
15
comment Blend code for built-in ColorData schemes
by the way, you might be able to use Differences to simplify some of the code
Aug
12
comment How do I use Mathematica as a vector drawing program?
besides aligning things in parallel, you can vector-edit just fine with the drawing menu (Ctrl+D)
Aug
11
comment Custom Matrix product
by the way, you can use the Scaled symbol like this: ImageResize[img, Scaled[2]]
Aug
8
comment How can I improve Mathematica's resolution on a macbook retina display?
just want to mention that i have issues like this on Windows if i set the DPI too high (Win7/Mathematica 8)