Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
dangerz
Jan 12, 2005

when i move you move, just like that

TJChap2840 posted:

I'm just looking to improve upon my programming skills and find some new projects to work on.
That's exactly why I got into writing games. It's been a great adventure.

Adbot
ADBOT LOVES YOU

PDP-1
Oct 12, 2004

It's a beautiful day in the neighborhood.

Scaevolus posted:

Reverse Engineering the MOS 6502 CPU gives a good explanation of how the original 6502 works, and in particular why the undocumented opcodes function as they do.

Thanks for that link - not only was it an interesting talk, but the between the speaker's interactive 6502 simulator and the code samples on the closely-related 6502.org site I actually have a lot better info base to debug against than my original ROM listings.

HauntedRobot posted:

Did the same for the Acorn Electron (my first computer, and another 6502 based one at that) and it was a really fun exercise. :) So satisfying to see it boot, and also even though I used to program on that thing way back when, I was 6, and now I actually understand it.

:hfive: 6502 emulator buddy. It is absolutely bizarrely fascinating to watch the thing go, especially as more and more bugs in my code get fixed allowing it to run longer and more complex programs without exploding. Today's big excitement was getting bubblesort going:

code:
*** Start ***
List: 2, 1, 3, 5, 9, 8, 6, 4, 7, 0, End
0x0200|00: BRK Imp     (0000) [00] A:00 X:00 Y:00 S:FF nvXbdizc
0x0201|A0: LDY Imm     (0000) [00] A:00 X:00 Y:00 S:FF nvXbdiZc
0x0203|84: STY ZP      (0032) [00] A:00 X:00 Y:00 S:FF nvXbdiZc
0x0205|B1: LDA (ZP),Y  (0000) [0A] A:0A X:00 Y:00 S:FF nvXbdizc
.
.
.
0x0224|24: BIT ZP      (0032) [00] A:01 X:00 Y:0A S:FF nvXbdiZc
0x0226|30: BMI Rel     (0000) [D9] A:01 X:00 Y:0A S:FF nvXbdiZc
0x0228|00: BRK Imp     (0000) [00] A:01 X:00 Y:0A S:FF nvXbdiZc
List: 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, End

Jonnty
Aug 2, 2007

The enemy has become a flaming star!

PDP-1 posted:

Thanks for that link - not only was it an interesting talk, but the between the speaker's interactive 6502 simulator and the code samples on the closely-related 6502.org site I actually have a lot better info base to debug against than my original ROM listings.


:hfive: 6502 emulator buddy. It is absolutely bizarrely fascinating to watch the thing go, especially as more and more bugs in my code get fixed allowing it to run longer and more complex programs without exploding. Today's big excitement was getting bubblesort going:

code:
*** Start ***
List: 2, 1, 3, 5, 9, 8, 6, 4, 7, 0, End
0x0200|00: BRK Imp     (0000) [00] A:00 X:00 Y:00 S:FF nvXbdizc
0x0201|A0: LDY Imm     (0000) [00] A:00 X:00 Y:00 S:FF nvXbdiZc
0x0203|84: STY ZP      (0032) [00] A:00 X:00 Y:00 S:FF nvXbdiZc
0x0205|B1: LDA (ZP),Y  (0000) [0A] A:0A X:00 Y:00 S:FF nvXbdizc
.
.
.
0x0224|24: BIT ZP      (0032) [00] A:01 X:00 Y:0A S:FF nvXbdiZc
0x0226|30: BMI Rel     (0000) [D9] A:01 X:00 Y:0A S:FF nvXbdiZc
0x0228|00: BRK Imp     (0000) [00] A:01 X:00 Y:0A S:FF nvXbdiZc
List: 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, End

This is ironic given your name but I actually did an essay on the PDP-1 earlier this year which involved looking at the instruction manual and seeing how simple the architecture and instruction set are. When I get some free time I'm quite tempted to try and make an emulator, though the only time I've ever done something like that was implementing a relatively simple VM from a programming competition. Do you guys have any suggestions for things to read first, or is it (as my intuition kinda suggests) something you can just have a think about then dive into and solve bugs as they occur?

PDP-1
Oct 12, 2004

It's a beautiful day in the neighborhood.

Jonnty posted:

This is ironic given your name but I actually did an essay on the PDP-1 earlier this year which involved looking at the instruction manual and seeing how simple the architecture and instruction set are. When I get some free time I'm quite tempted to try and make an emulator, though the only time I've ever done something like that was implementing a relatively simple VM from a programming competition. Do you guys have any suggestions for things to read first, or is it (as my intuition kinda suggests) something you can just have a think about then dive into and solve bugs as they occur?

Get all the documentation and source code samples that you can before beginning. Implementing any one particular opcode is dirt simple but there are a lot of them and verifying that each one works correctly for all possible inputs is picky work. Having a corpus of known good results to check yourself against is a huge help.

Another issue is undocumented opcodes. If you have an 8-bit system like the 6502 there are 256 possible inputs, but only ~150 of those are actually meant to represent a valid operation. The rest of the possibilities may or may not have side-effects on the system state, and programmers from that era are very likely to have probed out what did what and then use that undocumented behavior write 'clever' code.

Finally, stare at the instruction set and see if there are any patterns that you can use to reduce the amount of work you have to do. For the 6502 there are maybe ~40 logical operations and 15 memory addressing modes that can be combined in various ways to get the ~150 possible opcodes. By splitting things up into <logical operator, memory access mode> pairs I saved a lot of work since I only had to write each logical operator once and each memory access mode once and then combine them on the fly to get all the valid (and invalid) input codes.

P.S. If you do go through with it, you absolutely have to run Spacewar! on the thing in some form!

My Rhythmic Crotch
Jan 13, 2011

I've been working on a document search engine ... sorta-thing. The idea is that it will be dead-simple to deploy, just call up one jar file, and it will index all of your documents, stuff everything into a HSQL database, and then launch a webserver...

Well I have it scraping PDFs, and using AlchemyAPI to come up with some keywords and concepts for each document.

code:
me@computer:~> java -jar doxbox.jar reindex
Found 4 valid document files. Building index now.
Opening ./LPC.pdf: encrypted, 0 pages, extracting text... cleaning text... finding keywords... finding concepts... finished.
Opening ./atmel.pdf: encrypted, 64 pages, extracting text... cleaning text... finding keywords... finding concepts... finished.
Opening ./input.pdf: un-encrypted, 12 pages, extracting text... cleaning text... finding keywords... finding concepts... finished.
Opening ./testdir/brstm32f4.pdf: un-encrypted, 4 pages, extracting text... cleaning text... finding keywords... finding concepts... finished.
Processed 4 MB of documents in 43 seconds.
The AlchemyAPI calls are slow as gently caress. I think it's because my upload speed is really bad here.

I have tons left to do. Including I have no idea how to webberize this app so it's actually useful.

From Earth
Oct 21, 2005

Fun little weekend project:



A simple console application made in C# that determines the highest-scoring move for Scrabble/Wordfeud. It's essentially just a brute-force check of all possible placements of all possible permutations of your rack.

(The board in screenshot is of a Dutch game, in case you're confused)

Grawl
Aug 28, 2008

Do the D.A.N.C.E
1234, fight!
Stick to the B.E.A.T
Get ready to ignite
You were such a P.Y.T
Catching all the lights
Just easy as A.B.C
That's how we make it right
Taking a break from learning Java, I decided to go back to my guilty pleasure called Visual Basic.

I love Crashplan, but it does exactly what it suggests it does; it makes my PC crash. I love Dropbox, but I need to manually move my files there for them to be sent to the cloud. I'm working on a simple application where you can select files you want to sync to your Dropbox folder and copy them there.



(Lots of stuff to do)

Scaramouche
Mar 26, 2001

SPACE FACE! SPACE FACE!

hootimus posted:

I've been working on a document search engine ... sorta-thing. The idea is that it will be dead-simple to deploy, just call up one jar file, and it will index all of your documents, stuff everything into a HSQL database, and then launch a webserver...

Well I have it scraping PDFs, and using AlchemyAPI to come up with some keywords and concepts for each document.

code:
me@computer:~> java -jar doxbox.jar reindex
Found 4 valid document files. Building index now.
Opening ./LPC.pdf: encrypted, 0 pages, extracting text... cleaning text... finding keywords... finding concepts... finished.
Opening ./atmel.pdf: encrypted, 64 pages, extracting text... cleaning text... finding keywords... finding concepts... finished.
Opening ./input.pdf: un-encrypted, 12 pages, extracting text... cleaning text... finding keywords... finding concepts... finished.
Opening ./testdir/brstm32f4.pdf: un-encrypted, 4 pages, extracting text... cleaning text... finding keywords... finding concepts... finished.
Processed 4 MB of documents in 43 seconds.
The AlchemyAPI calls are slow as gently caress. I think it's because my upload speed is really bad here.

I have tons left to do. Including I have no idea how to webberize this app so it's actually useful.

You probably know but have you heard of Lucene/SOLR?

My Rhythmic Crotch
Jan 13, 2011

Scaramouche posted:

You probably know but have you heard of Lucene/SOLR?
Yeah, but I felt like I could make something cool "on my own" ... in reality I'm using a lot of Apache software anyway, so I'm really just re-inventing the wheel. Still learning a hell of a lot though.

Alligator
Jun 10, 2009

LOCK AND LOAF

Grawl posted:

Taking a break from learning Java, I decided to go back to my guilty pleasure called Visual Basic.

I love Crashplan, but it does exactly what it suggests it does; it makes my PC crash. I love Dropbox, but I need to manually move my files there for them to be sent to the cloud. I'm working on a simple application where you can select files you want to sync to your Dropbox folder and copy them there.



(Lots of stuff to do)
you can do this with a symlink.

Blue Star Error
Jun 11, 2001

For this recipie you will need:
Football match (Halftime of), Celebrity Owner (Motivational speaking of), Sherry (Bottle of)


This is a little music theory tool I've been working on. You select notes at the top and it shows you which scales contain those notes, and which chords you can make using them. It also works the other way round, clicking scales/chords will select the notes it has at the top.

Fullscreen shot showing more scales and chords

seiken
Feb 7, 2005

hah ha ha
As a musician with terrible theory I would definitely use that, are you gonna release it?

Blue Star Error
Jun 11, 2001

For this recipie you will need:
Football match (Halftime of), Celebrity Owner (Motivational speaking of), Sherry (Bottle of)
Yep, I've got a few more things to iron out with the gui but its pretty much done. I'll post in the Musicians Lounge and link to it in this thread.

lord funk
Feb 16, 2004

E, A, and B are part of the C major scale, D major, A minor, etc. Why aren't they highlighted?

Blue Star Error
Jun 11, 2001

For this recipie you will need:
Football match (Halftime of), Celebrity Owner (Motivational speaking of), Sherry (Bottle of)

lord funk posted:

E, A, and B are part of the C major scale, D major, A minor, etc. Why aren't they highlighted?

They are only highlighted if all the selected notes are in the scale, if for example I deselected the black notes, leaving E, A, and B, it would look like this, showing all the scales that have E, A, and B in them.

lord funk
Feb 16, 2004

Oh - I didn't notice the highlighted black notes at all. You might want to make it a light color like the white keys?

Incrediblastic
Oct 29, 2010

I eat food.
Is it just me or people have been posting more in this thread in the past two weeks?
Maybe this has something to do with upcoming exams and procrasination? ;)

Hughmoris
Apr 21, 2007
Let's go to the abyss!

From Earth posted:

Fun little weekend project:



A simple console application made in C# that determines the highest-scoring move for Scrabble/Wordfeud. It's essentially just a brute-force check of all possible placements of all possible permutations of your rack.

(The board in screenshot is of a Dutch game, in case you're confused)

:hfive:

I did one of these in Python, took about 3 minutes to give me results if I used 7 letters. Then I go to Scrabble's website and it takes theirs about 0.5 seconds. :suicide:

Wheelchair Stunts
Dec 17, 2005

Hughmoris posted:

:hfive:

I did one of these in Python, took about 3 minutes to give me results if I used 7 letters. Then I go to Scrabble's website and it takes theirs about 0.5 seconds. :suicide:

Could it just be that theirs was calculated ahead of time and is just compared via a hash?

Tad Naff
Jul 8, 2004

I told you you'd be sorry buying an emoticon, but no, you were hung over. Well look at you now. It's not catching on at all!
:backtowork:
I'm tweaking and massaging a zoomy image viewer, initially for newspapers but intended to become a general viewer for large images and PDFs. It's all jQuery on the client side, and a godawful mess of ghostscript, pdftools, and stuff I've forgotten about on the back end.

Only registered members can see post attachments!

Scaevolus
Apr 16, 2007

FeloniousDrunk posted:

I'm tweaking and massaging a zoomy image viewer, initially for newspapers but intended to become a general viewer for large images and PDFs. It's all jQuery on the client side, and a godawful mess of ghostscript, pdftools, and stuff I've forgotten about on the back end.



A few things that you're probably aware of:

New tiles should load in the background. When you zoom, it shouldn't blank the screen as the new tiles are loaded. It should load them in the background and replace them.

Double clicks should be caught so that you can't select images accidentally.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Wheelchair Stunts posted:

Could it just be that theirs was calculated ahead of time and is just compared via a hash?

Nah, there's a bunch of literature on doing it quickly (at the expense of a bit of memory). Read up on e.g. GADDAGs if you're curious.

Tad Naff
Jul 8, 2004

I told you you'd be sorry buying an emoticon, but no, you were hung over. Well look at you now. It's not catching on at all!
:backtowork:

Scaevolus posted:

A few things that you're probably aware of:

New tiles should load in the background. When you zoom, it shouldn't blank the screen as the new tiles are loaded. It should load them in the background and replace them.

Double clicks should be caught so that you can't select images accidentally.

Fixed these things. I had myself convinced that I was loading in the background; just not waiting long enough before fading out the copy. Thanks for the feedback.

MononcQc
May 29, 2007

Not as visual as what most other people post, but I've recently got a new job (moving away from doing Erlang training to doing real time bidding using Erlang) and about an hour ago I put a new software-based load balancer for client connections in production:



^ This is what we see on our end. Starting at 14:32 (time of deployment), we no longer have huge dips, we have better predictability when it comes to overload handling, no errors at all anymore. The blue line should follow the purple one, and when it doesn't the limit should always be constant (and ideally we'd see peaks of the green line with a flatter blue line), meaning we handle overload fine without jamming the system. So far so good.



^ This is what the customer sees. As soon as the new software got deployed, everything became very stable.

We're currently doubling the number of connections to see how well it goes. I'm pretty happy as this is my first serious assignment in almost a year and it seems to be going well from the first try.

Right now we're monitoring to see how well it goes.

Dr. Citan Uzuki
Jan 26, 2006

I would never tell you anything that wasn't absolutely true that hadn't come right from His mouth and He wants me to tell you
I've been playing around with the HTML5 Canvas and javascript and made a little shooter game for practice.

I'm still a student so it is probably really inefficient as we don't focus on that much in classes. The fun part is that you can use the accelerometer in iOS devices to control the ship by tilting and tapping the screen to fire. It also uses the HTML5 LocalStorage to keep track of your high score even between browser sessions. I need to tweak it a bit so the movement feels smoother and a bit quicker with tilting though. I didn't do any of the art, it was all stuff I found online. Any suggestions or advice is appreciated :)

Scaevolus
Apr 16, 2007

Dr. Citan Uzuki posted:

Any suggestions or advice is appreciated :)
Make shots disappear when the bottom goes off screen, not when the top goes off screen.

Shots should be visible when they're spawned (not beneath your plane). It makes it feel like there's a delay between when you press space and when the shot appears.

Either make sure the page doesn't scroll (body{overflow:hidden}) or trap up/down keys so that they don't scroll the page.

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
Also, "previous high score is null".

Wheelchair Stunts
Dec 17, 2005

pokeyman posted:

Nah, there's a bunch of literature on doing it quickly (at the expense of a bit of memory). Read up on e.g. GADDAGs if you're curious.

This is an example of one of those things you never think would exist, but once discovered is strangely engrossing. Thank you. :)

wellwhoopdedooo
Nov 23, 2007

Pound Trooper!
That's pretty cool, but DAWG is still my favorite data structure.

Blue Star Error
Jun 11, 2001

For this recipie you will need:
Football match (Halftime of), Celebrity Owner (Motivational speaking of), Sherry (Bottle of)
For those that were interested, I've posted my music theory tool here

Deus Rex
Mar 5, 2005

more newbie stuff but I'm proud of my (really slow) javascript cellular automata, made it in about 6 hours today. I'm still planning on polishing it up a little (edit transition rule table instead of just the decimal rule #, verification of form input, faster simulations, etc.)



http://github.com/tomjakubowski/ruleN/

http://tomjakubowski.github.com/ruleN/ruleN.html

Huragok
Sep 14, 2011
So what I've coined cloudlab has been going great lately. Say you have an app that makes JSON data:



You go ahead and store it in cloudlab. It shows up in your workspace along with all your other data and processing tools (called "iPhone 3GS Data" in this example):



Now you want to create a tool that gets the duration of the data recording session:



Say you want to interactively process your data, fire up an interactive session, load the data and the tool and process the data:



It's still a fair way to go but we're almost at minimum viable product once we optimise, smooth the edges and implement a few other features.

LOLLERZ
Dec 9, 2003
ASK ME ABOUT SPAMMING THE REPORT FORUM TO PROTECT ~MY WIFE'S~ OKCUPID PERSONALS ANALYSIS SA-MART THREAD. DO IT. ALL THE TIME. CONSTANTLY. IF SHE DOESN'T HAVE THE THREAD, SHE'LL WANT TO TALK TO ME!

Huragok posted:

So what I've coined cloudlab has been going great lately. Say you have an app that makes JSON data:



You go ahead and store it in cloudlab. It shows up in your workspace along with all your other data and processing tools (called "iPhone 3GS Data" in this example):



Now you want to create a tool that gets the duration of the data recording session:



Say you want to interactively process your data, fire up an interactive session, load the data and the tool and process the data:



It's still a fair way to go but we're almost at minimum viable product once we optimise, smooth the edges and implement a few other features.

This reminds me of http://buzzdata.com/

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."
Deus Rex: Nice! Clean, well-organized code, and a Turing-Complete default example to boot. I can dig it.

Biggz
Dec 27, 2005

Don't ask me why I worked on this most of today, it's not like there's Skyrim & Arkham City to play.

At work I diagnose SMTP problems from Microsoft Exchange Servers via Telnet. It will just run through a basic SMTP connection and try to queue an email, while displaying the SMTP messages.

You can either specify a server to send via, or look up the MX records for the domain. I still need to figure out how to select the correct MX. I'm using this to bring back the MX records and it appears to put them in a random order.



pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
There's no line breaks in the code you linked so I dunno what it does, but MX records are stored with a priority and (I think) you're supposed to pick the lowest priority server that is up.

Biggz
Dec 27, 2005

Yeah, they have a preference associated with the MX records, and the lowest preference is used. If two have the same preference, I think it's then random between the records with the same lowest preference.

Here's a slightly more sane version of the code - http://pastie.org/2926193

I understand DNS and to change the code so it works I'd probably have to scrap it and start from scratch. I find it hard reading other peoples code, especially when it isn't commented :P

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
Wow that's ugly. I feel your pain.

Deus Rex
Mar 5, 2005

continuing my mild obsession with ECA...

http://automatra-demo.herokuapp.com/
http://github.com/tomjakubowski/automatra



does your application need to generate elementary cellular automata trajectories for some reason? compute them in The Cloud™ with Automatra! Automatra will compute an ECA and generate a PNG, JSON, or plain-text representation on the fly.

Adbot
ADBOT LOVES YOU

Doh004
Apr 22, 2007

Mmmmm Donuts...
I don't understand anything about what you've just posted.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply