« first day (2661 days earlier)      last day (1813 days later) » 

12:37 AM
Anyone want to build a general AST constructor in Mathematica?
0
A: Cool Project Ideas

b3m2a1General Language/Box Parser Background The FE currently can tokenize Mathematica code so that it can be handled via the "box language" (and thus also colored). Unfortunately this parsing mechanism isn't exposed at all. It'd be nice to have syntax coloring for other languages too, especially vis...

If you do that I'll set things up so we can syntax highlight any language in Mathematica using the built-in mechanisms.
 
1:08 AM
@b3m2a1 Do you know about the code-tools? They already have a parser and AST for Mathematica
 
@halirutan yeah but the hope is to have a general framework
I'm imagining C, python, Java, Markdown, etc.
 
Ah, OK.
 
My actual desired use case is that I want to support different languages in my IDE
And the best way to do that is to have a decent parser for different languages
 
@b3m2a1 But only the AST needs to have a unified structure, right? The backend of the parser doesn't matter.
 
@halirutan exactly
I'm currently writing a tokenizer spec that'll take an InputStream and tokenize that
Then I'll write the parser after I've tokenized so that it always returns a well-formatted AST
 
1:15 AM
@b3m2a1 If you are doing it in Mathematica, please remember how fast all the passes must be. You write some code and you want to colorize the result instantly. So you need to tokenize, parse, build the AST, inspect the AST and created the boxes in well under a second.
Speaking from experience here :)
 
@halirutan Yup. I've been thinking about how that'll play out.
I'm gonna use BinaryRead and pass to a dispatcher for each token type
Which will also use BinaryRead
And I think I can use the pre-parsed boxes to not recompute everything
 
@b3m2a1 If you go trough with it, then we at least know how fast it can be.
 
Mhmmm. I'm gonna see what I can do.
 
The hard part is the tokenizing which requires some look-aheads and other nasty stuff.
Numbers and things like a=. and a=.1 are a pain.
 
Yeah I had to do that for a disgusting log file format that's basically natural language in the past
I'll probably target simple languages like C and Java first then move to fancier ones like python
Might never get to Markdown
But at the very least I'll write it to be extensible
 
 
5 hours later…
6:43 AM
@b3m2a1 did you know that with multiple versions of a paclet with a pallete the palletes menu will point to different paclet that Get @ paclet` would...
Seems to be fixed in 12 but it gave me headaches
 
@b3m2a1 This may be useful.
Don't forget to vote if you haven't yet:
9
Q: Site Logo Text: Mathematica and XXX. Which wording exactly?

halirutanIt's safe to say that after quite a discussion, the general consensus is that we should add "Wolfram Language" as sub-text to our header image. Now, the question is what exactly should we put there. I prepared 3 versions of things I like the most, where "Mathematica and Wolfram Language" is my fa...

 
 
1 hour later…
8:04 AM
Heh. The "Wolfram Language 12.0 is now available on the cloud" announcement was classified as spam by Gmail...
 
8:23 AM
@halirutan My implementation still needs some cleanup, I will send it to you once it's in a more presentable state
 
9:02 AM
@halirutan yeah when I get to a language with as sophisticated a setup as Mathematica that'll definitely be an issue. For my languages of interest, though, that's not the case. Currently have a basic tokenizer set up that I can now build off of. Each token gets a "handler" which is basically something to deal with the look-ahead nastiness.
 
9:15 AM
@LukasLang Thank you Lukas. It seems we slowly approach a consensus on the logo issue in my meta post and once all things are sorted out, I would like to create a final version of the image.
 
9:29 AM
@halirutan Let me advocate here for including "the", for consistency with official usage
;)
 
@ChrisK Hehe.. there are so many different opinions. I haven't voted at all, since most are my own posts.
I don't want the gray & to win, but what can you do :)
 
9:45 AM
@b3m2a1 maybe you know something that could help: mathematica.stackexchange.com/q/197504/5478
 
 
2 hours later…
11:36 AM
Have to say I think this is the best option I've seen so far: mathematica.meta.stackexchange.com/a/2475/57593
 
11:46 AM
@kirma I am looking for test graphs with difficult to compute automorphism groups for benchmarking purposes (went through GraphData already). I am especially looking for directed ones, but undirected ones are useful too. Do you have any tips?
 
12:40 PM
@Szabolcs Sorry, I don't think I have any particular examples or tips, although I played with them at some point in the past.
 
1:13 PM
Does something more readable exist than TracePrint?
 
 
1 hour later…
2:22 PM
posted on May 02, 2019 by Tuseeta Banerjee

If you haven’t used machine learning, deep learning and neural networks yourself, you’ve almost certainly heard of them. You may be familiar with their commercial use in self-driving cars, image recognition, automatic text completion, text translation and other complex data analysis, but you can also train your own neural nets to accomplish tasks like identifying [...]

 
@1010011010 I use Carl's TracePrintEvaluate quite often, mathematica.stackexchange.com/a/137615/9490
Just like with TracePrint it's important to use a restrictive pattern as the second argument or else your front end becomes sluggish with excessive printing
 
2:54 PM
@JasonB. Many thanks. I have created a separate thread on the main site while I troubleshoot: mathematica.stackexchange.com/questions/197530/… I've been at this for a while so any suggestions welcome :)
 
 
8 hours later…
11:32 PM
I just finished the first version of my general lexer/parser and simultaneously realized I don't actually need it...
In a "Code" cell I can type:
for f in range(n):
  print(f)
And I can make it style exactly as it would in a python IDE just using stuff I'd already worked on
Moreover I can make a "Python" cell style where all these things happen by default ;__;
Ah well at least I have a working parser that's quite flexible and pretty fast
 

« first day (2661 days earlier)      last day (1813 days later) »