u/bcorfman

1,093 post karma · 706 comment karma · joined Jan 2006

bcorfman

Great idea. Also, you can also look at the follow-on to FSMs: behavior trees.

bcorfman

Zoolander joke

bcorfman

My list comprehensions are too hard to understand ... let's write a compiler? Not really how my thought process works. Nice side exploration for a blog post though.

bcorfman

Maybe you're searching for some form of 'instantiate'?

bcorfman

Although everyone may not like the look of the Tkinter/Ttk GUI as well as PyQt, it really is the solution with the least amount of hassle. PyQt sounds great until you try to bundle the libraries for different OSes -- the last 10% of the solution (distribution) is the most difficult.

bcorfman

I work on data science, game programming, AI, simulations, and scientific apps. All of these are CPU-intensive. Business and web apps do not provide the complete picture of a general-purpose language.

bcorfman

C extensions work on virtually every Python implementation, including PyPy. You're missing the point above.

bcorfman

I perceived the future of Python as being a great general-purpose language, as opposed to just a scripting language. As such, it would've been better to throw the resources that were devoted to CPython behind PyPy instead. This would have enabled both JIT compiling and truly scalable concurrency, plus a better code infrastructure for long-term expandability. Additionally, it would also have boosted PyPy's funding and developer support, which needed to play catchup for several years instead. Imagine how many C extensions could have been rewritten as JIT-compiled Python after more than a decade, and how many more excited developers would have jumped on to help open-source projects that used readable Python instead of low-level C code.

bcorfman

It's not like people didn't try to tell Guido at the time. TLDR: the importance of using multiple cores was evident, but C extension interoperability was deemed a higher priority.

bcorfman

Yeah, I figured I'd need to build it on Mac or Linux, but bundling all the dependencies and getting them to load without run-time issues seems to be the challenge. Quality (i.e., not simplistic) examples seem hard to come by.

bcorfman

How does it compare with conda constructor?

bcorfman

Does anyone know where I could find a PyInstaller .spec script for Mayavi and its dependencies (VTK, PyQt/PySide, etc.)? In the past, I've grabbed a Python 2.7 of PortablePython and pip installed everything I need into that directory. However, this only works for Windows. I'd love to have a PyInstaller script that allows me to generate a simple install package for Mac, Windows and Linux, preferably under Python 3.x ...

bcorfman

Fluent Python. I've learned more per page from that book than any other Python resource I've come across. For example, studying the book's material on hashable objects got me over a problem I was having with a planning algorithm. When I finished, I had successfully implemented a knowledge base and a total-order planner that could directly leverage the A*-search in the AIMA-Python code base. Kudos to the book's author, Luciano Ramalho, as that is just one example that helped my problem-solving skills in Python.

bcorfman

If you use numpy to its fullest, then you will think in terms of vectorization. This will largely avoid any of the inefficiencies of Python data structures. See From Python to Numpy for a complete tutorial.

bcorfman

Correct. They are in pure C.

bcorfman

Use numpy

bcorfman

If you think Emacs + add-on modules is not a bolted-together "IDE", then just move on and ignore my comments.

bcorfman

See my comment to dzecniv.

bcorfman

I gave on anything Vim or Emacs-related a long time ago. I'm just commenting on what keeps the regular developer away from Lisp -- it's ecosystem issues. You can't solve that with bolted-together items when we are used to integrated tools.

bcorfman

That's great. I'll look into your recommendations. Thank you.

bcorfman

Yes, wasn't impressed.

bcorfman

lol, did I also mention the condescending Lisp user?

bcorfman

No need to worry about Lisp happening. As a developer who's most comfortable with C-style languages (but still has a liking for functional paradigms), Lisp is still missing major items in the normal developer's ecosystem:

1) An IDE on par with IDEA, PyCharm, Visual Studio, etc.... I feel hampered when I use CL in a regular editor. How do Lisp developers debug? The best discussion of this that I could find was from Norvig's PAIP book, and it all seemed to be command-prompt-level debugging. This just doesn't work for me when I can set breakpoints and view call stack/variables in my normal IDE.

2) No auto-complete. Almost everything useful in CL is at the function level (from what I recall, about 300+ individual functions). In Python/C#/C++, etc., these functions would be organized in their own namespace/library/module, and you could get autocomplete by typing in the name of the library and a '.' character. From when I used CL, I just had to learn or memorize all the function names because the namespace is flat. This is overwhelming to a beginner.

3) I find Python indentation to be far more intuitive than Lisp's "visual" indentation. I know that a good editor shows the indentation level by interpreting the number of open and closed parentheses and indenting accordingly. But in practice, I often had problems being at the wrong indentation level and got (to me) cryptic error messages about out-of-scope variables and loops. The frustration of matching up the correct sequence of open and closed parens at the right levels quickly became aggravating for me and detracted from developing my code. I think Clojure gets this right where the language uses different bracket types (square, curved, curly) to indicate different semantics. CL seems too focused on purity (data-is-code, code-is-data) and misses the fact the developers have a hard time using the language when one symbol means 10 different things, based on context alone.

bcorfman

Would this work? It's a framework, but the main code (and its dependencies) only uses Numpy/Scipy. You can get in there and see what they're doing.

bcorfman

Yeah, fuzzed out after a few pages. I think there's good stuff there, but needs to pack a quicker punch.