# Search Results

• ### SmoothLife Is a Super Smooth Version of Conway’s Game of Life [Video]

##### - by Jason Fitzpatrick
What happens if you change cellular automaton program Game of Life to use floating point values instead of integers? You end up with SmoothLife, a fluid and organic growth simulator. SmoothLife is a family of rules created by Stephan Rafler. It was designed as a continuous version of Conway’s Game of Life – using floating point values instead of integers. This rule is SmoothLifeL which supports many interesting phenomena such as gliders that can travel in any direction, rotating pairs of gliders, wickstretchers and the appearance of elastic tension in the ‘cords’ that join the blobs. You can check out the paper outlining how SmoothLife works here and then grab the source code to run your own simulation here. [via Boing Boing] HTG Explains: What is the Windows Page File and Should You Disable It? How To Get a Better Wireless Signal and Reduce Wireless Network Interference How To Troubleshoot Internet Connection Problems

• ### What are functional-programming ways of implementing Conway's Game of Life

##### - by George Mauer
I recently implemented for fun Conway's Game of Life in Javascript (actually coffeescript but same thing). Since javascript can be used as a functional language I was trying to stay to that end of the spectrum. I was not happy with my results. I am a fairly good OO programmer and my solution smacked of same-old-same-old. So long question short: what is the (pseudocode) functional style of doing it? Here is Pseudocode for my attempt: class Node update: (board) -> get number_of_alive_neighbors from board get this_is_alive from board if this_is_alive and number_of_alive_neighbors < 2 then die if this_is_alive and number_of_alive_neighbors > 3 then die if not this_is_alive and number_of_alive_neighbors == 3 then alive class NodeLocations at: (x, y) -> return node value at x,y of: (node) -> return x,y of node class Board getNeighbors: (node) -> use node_locations to check 8 neighbors around node and return count nodes = for 1..100 new Node state = new NodeState(nodes) locations = new NodeLocations(nodes) board = new Board(locations, state) executeRound: state = clone state accumulated_changes = for n in nodes n.update(board) apply accumulated_changes to state board = new Board(locations, state)

• ### Damian Conway on Perl and its future

<b>O'Reilly GMT:</b> "We often hear people saying that Perl is dead. I assume that you don't agree, but what do you say to people who try to tell you that?"

• ### Perl OO frameworks and program design - Moose and Conway's inside-out objects (Class::Std)

##### - by Emmel
This is more of a use-case type of question... but also generic enough to be more broadly applicable: In short, I'm working on a module that's more or less a command-line wrapper; OO naturally. Without going into too many details (unless someone wants them), there isn't a crazy amount of complexity to the system, but it did feel natural to have three or four objects in this framework. Finally, it's an open source thing I'll put out there, rather than a module with a few developers in the same firm working on it. First I implemented the OO using Class::Std, because Perl Best Practices (Conway, 2005) made a good argument for why to use inside-out objects. Full control over what attributes get accessed and so on, proper encapsulation, etc. Also his design is surprisingly simple and clever. I liked it, but then noticed that no one really uses this; in fact it seems Conway himself doesn't really recommend this anymore? So I moved to everyone's favorite, Moose. It's easy to use, although way way overkill feature-wise for what I want to do. The big, major downside is: it's got a slew of module dependencies that force users of my module to download them all. A minor downside is it's got way more functionality than I really need. What are recommendations? Inconvenience fellow developers by forcing them to use a possibly-obsolete module, or force every user of the module to download Moose and all its dependencies? Is there a third option for a proper Perl OO framework that's popular but neither of these two?

• ### Le pluriel dans les traductions avec Qt, un article de Jan-Arve Sæther traduit par Jonathan Courtois

Bonjour, Dans la continuité des traductions des Qt Quarterly, je vous propose aujourd'hui un article expliquant comment gérer au mieux les formes du pluriel des différentes langues dans vos traductions. Les formes du pluriel dans les traductions Aviez-vous déjà connaissance de ces subtilités ? Cet article va-t-il améliorer la qualité des traductions de vos applications ?...

• ### Why is Conway's "Game of Life" used for code retreats?

##### - by blunders
Code Retreat is an all-day training event that focuses on the fundamentals of software development. There's a "global" code retreat day coming up, and I'm looking forward to it. That said, I've been to one before and have to say there was a huge amount of chaos... which is fine. One thing that I still don't get is why the "Game of Life" is a good problem for TDD, and what good and bad TDD for it feels like. Realize this is a pretty open ended question, so feel free to comment.

• ### How to optimize Conway's game of life for CUDA?

##### - by nlight
I've written this CUDA kernel for Conway's game of life: global void gameOfLife(float* returnBuffer, int width, int height) { unsigned int x = blockIdx.x*blockDim.x + threadIdx.x; unsigned int y = blockIdx.y*blockDim.y + threadIdx.y; float p = tex2D(inputTex, x, y); float neighbors = 0; neighbors += tex2D(inputTex, x+1, y); neighbors += tex2D(inputTex, x-1, y); neighbors += tex2D(inputTex, x, y+1); neighbors += tex2D(inputTex, x, y-1); neighbors += tex2D(inputTex, x+1, y+1); neighbors += tex2D(inputTex, x-1, y-1); neighbors += tex2D(inputTex, x-1, y+1); neighbors += tex2D(inputTex, x+1, y-1); __syncthreads(); float final = 0; if(neighbors < 2) final = 0; else if(neighbors 3) final = 0; else if(p != 0) final = 1; else if(neighbors == 3) final = 1; __syncthreads(); returnBuffer[x + y*width] = final; } I am looking for errors/optimizations. Parallel programming is quite new to me and I am not sure if I get how to do it right. The rest of the app is: Memcpy input array to a 2d texture inputTex stored in a CUDA array. Output is memcpy-ed from global memory to host and then dealt with. As you can see a thread deals with a single pixel. I am unsure if that is the fastest way as some sources suggest doing a row or more per thread. If I understand correctly NVidia themselves say that the more threads, the better. I would love advice on this on someone with practical experience.

• ### Apple Script error: Can't get Folder

##### - by Jonathan Hirsch
I started using apple script today, because I wanted to be able to automatically send files to someone when they go into a specific folder. I first tried with automator, but the files were never attached into emails, so i figured i could try with apple script. At first, I tried simply create an email with an attached file. The email was created, but the file was not attached. After a while, I stumbled onto this post that was trying to list files from a folder, so I tried that just to compare it to my code. It gave me an error telling me it is impossible to list files from that folder. So I tried setting a path to a specific folder, and I got an error saying the path can't be made. This is the code I used for the last part: tell application "Finder" set folderPath to folder "Macintosh HD: Users:Jonathan:Desktop:Send_Mail" set fileList to name of every file in folderPath end tell and this is the error I got. error "Finder got an error: Can’t get folder \"Macintosh HD: Users:Jonathan:Desktop:Send_Mail\"." number -1728 from folder "Macintosh HD: Users:Jonathan:Desktop:Send_Mail". I later tried with another folder, and I always get this error, even when using the Users folder for example. Any Suggestions? thanks

• ### How can I install Satchmo?

##### - by Jonathan Hayward
I am trying to install Satchmo 0.9 on an Ubuntu 9.10 guest off of the instructions at http://bitbucket.org/chris1610/satchmo/downloads/Satchmo.pdf. I run into difficulties at 2.1.2: pip install -r http://bitbucket.org/chris1610/satchmo/raw/tip/scripts/requirements.txt pip install -e hg+http://bitbucket.org/chris1610/satchmo/@v0.9#egg=satchmo The first command fails because a compile error for how it's trying to build PIL. So I ran an "aptitude install python-imaging", locally copy the first line's requirements.text, and remove the line that's unsuccessfully trying to build PIL. The first line completes without error, as does the second. The next step tells me to change directory to the /path/to/new/store, and run: python clonesatchmo.py A little bit of trouble here; I am told that clonesatchmo.py will be in /bin by now, and it isn't there, but I put some Satchmo stuff under /usr/local, create a symlink in /bin, and run: python /bin/clonesatchmo.py This gives: [email protected]:~/store\$ python /bin/clonesatchmo.py Creating the Satchmo Application Traceback (most recent call last): File "/bin/clonesatchmo.py", line 108, in <module> create_satchmo_site(opts.site_name) File "/bin/clonesatchmo.py", line 47, in create_satchmo_site import satchmo_skeleton ImportError: No module named satchmo_skeleton A find after apparently checking out the repository reveals that there is no file with a name like satchmo*skeleton* on my system. I thought that bash might be prone to take part of the second pip invocation's URL as the beginning of a comment; I tried both: pip install -e hg+http://bitbucket.org/chris1610/satchmo/@v0.9\#egg=satchmo pip install -e hg+http://bitbucket.org/chris1610/satchmo/@v0.9#egg=satchmo Neither way of doing it seems to take care of the import error mentioned above. How can I get a Satchmo installation under Ubuntu, or at least enough of a Satchmo installation that I am able to start with a skeleton of a store and then flesh it out the way I want? Thanks, Jonathan

• ### How can I install Satchmo?

##### - by Jonathan Hayward
I am trying to install Satchmo 0.9 on an Ubuntu 9.10 32-bit guest off of the instructions at http://bitbucket.org/chris1610/satchmo/downloads/Satchmo.pdf. I run into difficulties at 2.1.2: pip install -r http://bitbucket.org/chris1610/satchmo/raw/tip/scripts/requirements.txt pip install -e hg+http://bitbucket.org/chris1610/satchmo/@v0.9#egg=satchmo The first command fails because a compile error for how it's trying to build PIL. So I ran an "aptitude install python-imaging", locally copy the first line's requirements.text, and remove the line that's unsuccessfully trying to build PIL. The first line completes without reported error, as does the second. The next step tells me to change directory to the /path/to/new/store, and run: python clonesatchmo.py A little bit of trouble here; I am told that clonesatchmo.py will be in /bin by now, and it isn't there, but I put some Satchmo stuff under /usr/local, create a symlink in /bin, and run: python /bin/clonesatchmo.py This gives: [email protected]:~/store\$ python /bin/clonesatchmo.py Creating the Satchmo Application Traceback (most recent call last): File "/bin/clonesatchmo.py", line 108, in <module> create_satchmo_site(opts.site_name) File "/bin/clonesatchmo.py", line 47, in create_satchmo_site import satchmo_skeleton ImportError: No module named satchmo_skeleton A find after apparently checking out the repository reveals that there is no file with a name like satchmo*skeleton* on my system. I thought that bash might be prone to take part of the second pip invocation's URL as the beginning of a comment; I tried both: pip install -e hg+http://bitbucket.org/chris1610/satchmo/@v0.9\#egg=satchmo pip install -e hg+http://bitbucket.org/chris1610/satchmo/@v0.9#egg=satchmo Neither way of doing it seems to take care of the import error mentioned above. How can I get a Satchmo installation under Ubuntu, or at least enough of a Satchmo installation that I am able to start with a skeleton of a store and then flesh it out the way I want? Thanks, Jonathan

• ### C# System.IO.Filestream doesn't support Hebrew

##### - by Jonathan Dyle
Hi all Am I missing something or does System.IO.Filestream not read unicode txt files containing Hebrew? Thanks Jonathan

• ### .NET 4 Web Application Startup Time

##### - by Latest Microsoft Blogs
I was chatting with Jonathan Hawkins and some of the folks on the ASP.NET team about performance and Jonathan mentioned the startup time for large ASP.NET applications is improved on .NET 4. There are some improvements in the CLR and in ASP.NET itself Read More......(read more)

• ### Free eBook "Troubleshooting SQL Server: A Guide for the Accidental DBA"

##### - by TATWORTH
"SQL Server-related performance problems come up regularly and diagnosing and solving them can be difficult and time consuming. Read SQL Server MVP Jonathan Kehayias’ Troubleshooting SQL Server: A Guide for the Accidental DBA for descriptions of the most common issues and practical solutions to fix them quickly and accurately." Please go to http://www.red-gate.com/products/dba/sql-monitor/entrypage/tame-unruly-sql-servers-ebook RedGate produce some superb tools for SQL Server. Jonathan's book is excellent - I commend it to all SQL DBA and developers.

• ### What do DBAs do?

##### - by Jonathan Conway
Yes, I know they administrate databases. I asked this question because I'd like to get a further insight into the kind of day-to-day duties a DBA might perform, and the real-world business problems they solve. For example: I optimized a 'products' query so that it ran 25% faster, which made the overall application faster. Is this a typical duty? Or is there more to being a DBA than simply making things faster? In what situations does DBA work involve planning and creativity?

• ### Brand new battery is 100% charged but at 0% capacity

##### - by Chris Conway
I just bought a brand new battery to replace one that had seemingly died. I followed the instructions that came with the battery and charged it overnight, then ran my computer on battery until it was in a critical state and charged it overnight again. Now the battery appears to be 100% charged and at the same time at 0% capacity—when it's plugged in it doesn't charge and when it's unplugged the computer immediately goes into low power mode. I've taken the battery out and checked the contacts. I've rebooted the system with and without the battery. Nothing seems to help. I'm not sure if I should blame the battery, the laptop, the charger, or the power management software for this state of affairs. The obvious answer would be the battery but I bought this battery because another year-old battery exhibited similar behavior—I assumed it was dead and a Dell tech came to the same conclusion. I'm loathe to order another new battery without first exploring other explanations. What can I do to diagnose this problem? Here's the /proc info: \$ cat /proc/acpi/battery/BAT0/state present: yes capacity state: critical charging state: charged present rate: 1 mA remaining capacity: 0 mAh present voltage: 9754 mV \$ cat /proc/acpi/battery/BAT0/info present: yes design capacity: 6600 mAh last full capacity: 6789 mAh battery technology: rechargeable design voltage: 11100 mV design capacity warning: 660 mAh design capacity low: 200 mAh cycle count: 0 capacity granularity 1: 66 mAh capacity granularity 2: 66 mAh model number: DELL WK serial number: 4043 battery type: LION OEM info: SMP

##### - by Jonathan Conway
I've been proposing that my workplace implement Behavior-Driven-Development, by writing high-level specifications in a scenario format, and in such a way that one could imagine writing a test for it. I do know that working against testable specifications tends to increase developer productivity. And I can already think of several examples where this would be the case on our own project. However it's difficult to demonstrate the value of this to the business. This is because we already have a Joint Application Development (JAD) process in place, in which developers, management, user-experience and testers all get together to agree on a common set of requirements. So, they ask, why should developers work against the test-cases created by testers? These are for verification and are based on the higher-level specs created by the UX team, which the developers currently work off. This, they say, is sufficient for developers and there's no need to change how the specs are written. They seem to have a point. What is the actual benefit of BDD/TDD, if you already have a test-team who's test cases are fully compatible with the higher-level specs currently given to the developers?

• ### How do I ban a wifi network in Network Manager?

##### - by Chris Conway
My wifi connection drops sometimes and, for some reason, Network Manager attempts to connect to my neighbor's network, which requires a password that I don't know. The network in question is not listed in the "Edit Connections..." dialog and I can find no reference to it in any configuration file, but still the password dialog pops up every time my main connection drops. Is there a way to blacklist a wireless network so that the Network Manager will never attempt to connect to it? Or, equivalently, how can I remove the configuration data that causes the Network Manager to attempt to connect to this particular network?

• ### dazzle DVC100 in live movie maker

##### - by Jonathan
How can I use the Pinnacle Dazzle (it is a USB device which lets you plug in a video player or other analogue source) with Windows live movie maker (because it is just simple and I don't need effects/editing etc) Or is there a way I can use it on my Macbook Pro? Jonathan