6 ms·
You used Python for what?
From the Boston Python Meetup group last night - @jtauber presented a few different projects, including an Apple ][ emulator in Python!
- theorique 15y agoThis was presented last night (2012-03-22) by @jtauber at http://meetup.bostonpython.com/events/56404642/ http://meetup.bostonpython.com/events/56404642/ - great event!
- brown9-2 15y agoTangent, but I really wish Speakerdeck wouldn't make each slide transition a new history location. I don't want to have to hit back 30 times after viewing 30 slides to get back to the page that linked me there.
- judofyr 15y agoInteresting. This doesn't happen here (Chrome on OS X).
- brown9-2 15y agoI'm using the same combination. Either they just changed something, or I was hallucinating five minutes ago :)
- Drbble 15y agoI would be nice to have a conventional Javascript utility for these kinds of app-pages, or browser plugin to make something like ctrl-back go the most recent history page not on the same page (or maybe even not on the same site, for #! Twitter)
- rdl 15y agoI'm really not a fan of the UI on speaker deck presentations. Clicking seems to advance or retreat somewhat randomly (I guess based on which side), the buttons are non standard and tiny and close together, etc. A regular PDF or video or keynote/ppt is much easier.
- SaulOfTheJungle 15y ago> Clicking seems to advance or retreat somewhat randomly It depends on which half of the slide you click.
- icebraining 15y agoThere's a link to download the PDF on the bar on the right.
- davidwparker 15y agoI found it pretty easy to use the left and right arrow keys, assuming you have a keyboard available to you.
- rdl 15y agoYeah, I was using an iPad (new), and the presentation was approximately thumb-sized, so left/right of the presentation made less sense to me.
- jodoherty 15y agoI thought it was a video and that I couldn't find the play button at first. Then I looked for a transcript and couldn't find that either. Finally I thought maybe it was an audio player with a slideshow that follows along. When I realized it was just a slideshow, I was disappointed. Slides are meant to highlight points, illustrate concepts, and provide focus during a presentation, but they aren't meant to replace it. The only purpose in sharing slides is so that the folks who saw the presentation can remember it better.
- thristian 15y agoI too use Python for my various noodlings where I don't have a pressing need to use some other language... or even if I do, I'll draft it in Python first to get my head around the problem space then think about porting it later. Some unusual stuff I've done in Python that I happen to have online: https://gitorious.org/bdflib https://gitorious.org/bdflib is a library for working with bitmap fonts in the "BDF" file-format, one of the traditional X11 font formats. Among other things, given a font with some base glyphs and some combining glyphs, it can automatically generate all the pre-composed glyphs Unicode defines. https://gitorious.org/macfontextractor https://gitorious.org/macfontextractor is a library for extracting FONT and NFNT resources from Mac OS Classic resource forks. It loads them into the data structures defined by bdflib above, so you can save them out to BDF files. Currently it only supports resource forks in MacBinary-encoded files, but it shouldn't be too hard to extend it to work with AppleSingle, AppleDouble and native resource-fork support. https://gitorious.org/python-blip https://gitorious.org/python-blip (now renamed Python BPS, I couldn't change the URL) is a diff/patch tool for arbitrary binary files; a bit like bsdiff or xdelta. It produces less space-efficient diffs than bsdiff, and it's much slower than xdelta, but the BPS file-format is vastly easier to implement than either of those.
- mace 15y agoNot coincidentally, 'drafting' is what led me to first use Python. Prototyping and working out the architecture/logic of a piece of code is very fast in Python. Many libraries (standard and 3rd-party) are generally well-designed and are of a very high quality (ex. django, twisted, sqlalchemy, numpy)
- rogerbinns 15y ago> ... then think about porting it later. I also write tests in Python which is very efficient (in lines of code). Having those tests available makes the porting considerably easier as you can verify the new code quickly.
- ntoll 15y agoNice one jtauber... :-)
- killa_bee 15y agoI'm not an expert on this, just a linguist who happens to code a lot, but there is some serious work on the complexity of frequency ordering. The algorithms proposed by R. Rivest (1976, Communications of the ACM) produce near-optimal frequency orders online, so if you can settle for "near optimal" then the problem is hardly traveling salesman as this author claims.
- Wilduck 15y agoEven with a traveling salesman problem you can get "near-optimal" results with an algorithm that has a reasonable run time. It's still important to note that you have such a problem though, as the fact that you're settling for "near optimal" needs to be understood.
- cschmidt 15y agoYou can actually find the global optimal solution for surprisingly large real world instances. They do tens of thousands of cities. Lots of interesting stuff here. The Concorde solver is probably the state of the art. http://www.tsp.gatech.edu/concorde/index.html http://www.tsp.gatech.edu/concorde/index.html
- mirsadm 15y agoAt my last job we used Python to write the UI for controlling train brakes (electronically controlled pneumatic railway brakes). Worked really well for us since we did a buttload of testing (with robotframework http://code.google.com/p/robotframework/ http://code.google.com/p/robotframework/ and a bunch of other things).
- deleted 15y ago[deleted]
- overshard 15y agoI always find it fun and interesting to see people implement random known "x" software in a language I really understand. As the presentation says, it really does help me learn something once I see it in Python, or Ruby for that matter. Both languages seem to help me grasp code.
- badclient 15y agoIs this a presentation or a video or both? I could swear the way it is presented it looks like a video. But I don't hear anything. I'm unsure what this is :[
- dalore 15y agoIt's his slide deck from a presentation. There is no audio.
- lewisgodowski 15y agoI've done some basic Python coding to create custom MIDI Remote Scripts for use with unsupported MIDI controllers in Ableton Live. I never actually learned it in a conventional method, just jumped into programming these scripts and looking at other people's scripts for reference. Now that I've taken a basic course on objective-based coding, I'd love to go back and learn Python for real.
- albertzeyer 15y agoI once wrote a C parser & interpreter in Python. :) https://github.com/albertz/PyCParser https://github.com/albertz/PyCParser
- mvanveen 15y agoThis is neat. I used Eli Bendersky's pycparser a few years back to create a static analysis suite for C. Does your project support C99?
- albertzeyer 15y agoWhat parts of C99? It is quite incomplete. But on the other side a bit loosely on the grammar, so it might work. I wasn't able yet to interpret any bigger projects. One goal was to interpret CPython (https://github.com/albertz/PyCPython https://github.com/albertz/PyCPython) and I got pretty far but I lost interest in it a bit (I remember that I got stuck when interpreting `goto` because there was no easy equivalent in Python, but I found a solution recently: https://github.com/albertz/playground/blob/master/py_goto.py https://github.com/albertz/playground/blob/master/py_goto.py). I successfully used this however to create ctypes interfaces for header files on the fly. E.g. https://github.com/albertz/PySDL https://github.com/albertz/PySDL uses it. And for doing some analytics, it might also work good enough.
- colinsidoti 15y agoMy roommate did a 3 part blog post on Exporting Non-Exported functions in Windows PEs with Python: http://burrowscode.wordpress.com/2010/02/18/exporting-non-exported-functions-in-windows-pes/ http://burrowscode.wordpress.com/2010/02/18/exporting-non-ex... http://burrowscode.wordpress.com/2010/02/20/code-snippet-to-scan-pe-for-functions/ http://burrowscode.wordpress.com/2010/02/20/code-snippet-to-... http://burrowscode.wordpress.com/2010/02/22/exporting-non-exported-functions-in-windows-pes-part-3-of-3/ http://burrowscode.wordpress.com/2010/02/22/exporting-non-ex... Couldn't tell you what it does exactly, but I remember him thinking it was weird he did it in Python
- cadr 15y agoI like doing codegolf in Python because it just feels so perverse. My golfed BF interpreter was way shorter than his :)
- rwos 15y agoPython lends itself quite nicely to code-golfing, that's true. In fact I am constantly amazed of how terse Python code can be, despite the significant whitespace stuff. from os import* r='s=[0]*8**5' p=0 for c in read(0,9**9):r+='\n'+' '*p+dict(zip("><+-.,[","p+=1|p-=1|s[p]+=1|s[p]-=1|write(1,chr(s[p]))|s[p]=ord(read(0,1))|while s[p]:".split('|'))).get(c,'');p+=c in'[]'and 92-ord(c) exec r I know, it's a JIT compiler, not an interpreter, but still... :)
- cadr 15y agoMan, that's slick - similar how I did it, but even shorter :)
- dochtman 15y agoI'm currently using Python to write a compiler for a language I'm playing with (which, incidentally, looks a lot like Python, but is statically typed). Targeting LLVM IR, it's worked out nicely so far.
- shalakhin 15y agoDuring my studying at the University I wrote the most of homework in Python including pseudo-random numbers generators etc. Then I found an interesting job at financial startup where people liked Django/Python combination so I used it there too. Business logic was far clearer to read than Java code from other system parts I saw (I had to describe writing documentation and diagrams describing some details of "how it works").