HNHacker News
TopNewBestAskShowJobs

rndmcnlly0

223 karma · joined December 9, 2009

submissionscomments
rndmcnlly0··on Show HN: my regular expression example match generator
"Generate all" and "efficient" seems doomed at some level. Considering /[01]+/, there are clearly an exponential number of matches given some given max length.

The expression itself provides a nice summary of the generative space it implies. Perhaps for a particular application you could apply a kind of lazy generation. Say, given /[01]+/ it would first expand it into the subspaces of /0/, /1/, /0[01]+/, and /1[01]+/. One of these branches could be expanded next depending on what was actually needed in the next step.

rndmcnlly0··on Show HN: my regular expression example match generator
Interesting module, but different target application. Part of the core of my generation process is remembering which parts of the example match came from which piece of your original expression so that (someday) there could be some nice mouseover effects that help you understand HOW some example match works (as there are sometimes expressions that match a given string in multiple ways).
rndmcnlly0··on Show HN: my regular expression example match generator
I purposely punted on inverted character classes because they brought up a major usability issue that I didn't have a quick solution for. The expression /[^abc]/ should match '@', ' ', and 'q', but, by the numbers, the majority of generated matches would look like '{angry unicode that you can't even see}'. This brings up the idea that you don't just want valid matches, but a meaningful set of examples that covers different ways of matching.

Likewise, I imagine it might be useful to specify some background language that matches should be taken from. That is, you might want to tell it to show you example matches made from snippets of valid html, from email-style English text, ascii-only strings, arbitrary unicode, etc. Incorporating this kind requires a lot of original thinking about usability (and some prototyping to figure out what would even make sense).

rndmcnlly0··on Show HN: my regular expression example match generator
I've thought about how to do a kind of regex-induction, where you give it matches and it gives you one or more expressions that will match it. But, after some thinking, even with a reasonable language bias, getting useful expression comes down to getting the user to type in a collection of positive an negative match examples. This kind of tool would be really nice to use, but the interaction has to be more than giving a single positive example.

A an iterative process where you start from a single positive example and then iteratively refine it with clarifying examples would work without being overwhelming. However, I'm really trying to get the user to better understand regexes to the point where they could do that process for themselves, mentally, and not depend on a super intelligent tool to do it for them.

rndmcnlly0··on Show HN: my regular expression example match generator
I made this tool over a year ago as a proof of concept. It doesn't support all features (like negations inside of character classes), but it should demonstrate the benefit that a tool like this would give you. I'd be interested in helping someone else understand the guts and make it into a public service to help out newbie developers coming to understand these notoriously-difficult-but-highly-useful expression.
rndmcnlly0··on Ask HN: When does programming start to make sense?
Programming, as a whole, is far larger than any one person could come to comprehend in a single lifetime (imagine it being 1000x bigger). And to make matters worse, it is continually growing more complex at a rate no person could follow either!

Just when you think you've finally gotten a solid grasp on writing CRUD apps in PHP, someone shows you Haskell, or Prolog, and suddenly realized just how little you thought you knew.

That said, this all makes for programming being an excellent domain for both a career and a passionate hobby. Easy to learn (a tiny corner) and hard to master (a chunk you can really appreciate 10 years in) -- what more could you want?

rndmcnlly0··on How often do you "Google" while programming?
More than 10 years in (implies mastery, right?) I still search all the time. However, I'm not looking for solutions per se. Instead, I'm just looking to refresh myself on the available building blocks (whether it be the API or whatever syntactic sugar the particular language at hand provides). In exchange for this constant dependence on external technical reference, you can gain fluency in a large number of languages libraries and tools.

Learn the big, important concepts in a variety of domains, and don't ever worry about memorizing the finicky details (which might very well change in the next release anyway).

rndmcnlly0··on Scott Aaronson adds $200K to prize money if P≠NP proof correct
The proof in questions attempts to show that P != NP, contrary to the title here.
rndmcnlly0··on A DSL in 5 Languages: Ruby, Python, PHP, C#, Java
One of the big reasons to build the DSL in the first place is to let the host language's syntax help you spot problems in your query. Syntax errors can be spotted from editor-provided syntax highlighting directly or slightly later when the code is read by the interpreter -- much sooner than when your runtime library finally decides to look at it (at search time).
rndmcnlly0··on Deep tour of game design and analysis in 63 minutes (skip to 1:45) [video]
I actually uploaded the linked video as a bit of constructive criticism of the somewhat annoying March 4th "Day of Action" protests on campus. I can't get behind closing off streets in demonstration as a way of addressing the high student costs of education when I haven't yet expended the option of digitally pirating said education.

I think this video is a surprising dense sample of what students are exposed to in our intro game design class. If simply viewing this video, for free, on your own computer gets you to think a little more deeply and objectively about game design, then I am successful. I have just reduced the average cost of education through rational, non-destructive means.

rndmcnlly0··on AM (1976): first math AI system to automate conjectures & concepts, not proofs
AM is an amazing piece of artificial intelligence history that too few people know about. In my own dissertation reseearch in AI at UC Santa Cruz I'm trying to make a "discovery system" that works in the context of game design and AM has been a fantastic inspiration. Well, EURISKO is even more amazing, but AM started it all.
rndmcnlly0··on Description of a NetHack AI
I'd really like to see more descriptions of people applying AI to hard-but-not-commercially-interesting problems.
rndmcnlly0··on Show HN: my story generator using answer-set programming
The intention, over the next year or so, is to hook this tech up to an interactive game world (as opposed to generating English text). As the player makes choices, more and more constraints are added to the story generator while possibilities for future story trajectories to just those that are in the intersection of the player choices and the authors constraints on the story (such as which roles each character may manifest).

I've actually made a little web-service wrapper of lparse/smodels so that it will be easier to integrate answer-set programming into Flash games. Teh src: http://github.com/rndmcnlly/ASPaaS

← PreviousPage 2 of 2