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
Programmer Humor
Nov 27, 2008

Lipstick Apathy

TheresaJayne posted:

8 out of 10 cats is a comedy show, the actual show is called Countdown.

code:
100 25 / 1 75 + 10 * + 50 + = 814
100 25 / 50 75 1 + 10 * + + = 814
10 75 1 + * 50 100 25 / + + = 814
50 25 / 10 + 75 1 + * 100 - = 812
100 25 / 50 + 10 75 1 + * + = 814
50 100 25 / 10 75 1 + * + + = 814
1 75 + 50 25 / 10 + * 100 - = 812
10 75 1 + * 50 + 100 25 / + = 814
25 75 10 - * 1 + 100 50 / / = 813
1 75 10 - 25 * + 100 50 / / = 813
75 10 - 25 * 1 + 100 50 / / = 813
1 25 75 10 - * + 100 50 / / = 813
Best one:
75 - 10 = 65
25 * 65 = 1625
1 + 1625 = 1626
100 / 50 = 2
1626 / 2 = 813
checked 2929925 possible solutions
Thank you for the good input example. Ironically, this is one of the faster ones for a computer to solve, because the 4 large numbers means we can discard a lot more sub-expressions for being too large to ever yield a good result in the end. (Though it also illustrates that maybe that heuristic should be removed, as some solution could possibly be on the form (a*b*c*d + 1) / e. The thing saving this example is that we can make the 2 and divide it instead of going through 81300.)

Adbot
ADBOT LOVES YOU

Programmer Humor
Nov 27, 2008

Lipstick Apathy
Update on the Countdown cheat program: I implemented a cache of possible expression based on their operands, and culled that so only one expression per unique value was stored. I also moved the expressions from a vector to a custom class that stores the list in a member array, saving some time on allocations. All in all, I was able to get the run time down from "barely beating the countdown clock" to 25 milliseconds.

This week, I've been working on reimplementing an old project of mine in C++11. This dates back to my days at uni, when the student paper published two solutions to a crossword puzzle; one correct one and one purporting the picture of physicist Richard Feynman was in fact one of pop sensation Michael Jackson, then solving the entire puzzle wrong based on this premise. This inspired me to write a program doing the same thing: given a crossword puzzle layout and some already filled in letters, fill the rest of the boxes with valid but arbitrary words. Back then I wrote it in Java, this time C++.

Step one was to find all the word entries, each a list of coordinates into the grid. Then, using these entries, a recursive function fills in words and moves on, going until an entry has no valid possible words. There is still some work to do for certain edge cases, but the main premise works.

I also added a function to render the solution to an svg image. Here's a sample output:



Generated in 1800 milliseconds.

Centripetal Horse
Nov 22, 2009

Fuck money, get GBS

This could have bought you a half a tank of gas, lmfao -
Love, gromdul

Programmer Humor posted:

Step one was to find all the word entries, each a list of coordinates into the grid. Then, using these entries, a recursive function fills in words and moves on, going until an entry has no valid possible words. There is still some work to do for certain edge cases, but the main premise works.

Are you using some variation of a depth-first search? When you reach a dead end, do you back up one word, pick a new word for that spot, then carry on? Do you take letters that you know must be in place x, then select all words of the appropriate length matching those criteria? How do you track which words you've already tried? Do you allow the same word to appear multiple times in a single puzzle? Which dictionary or dictionaries do you use?

Programmer Humor
Nov 27, 2008

Lipstick Apathy

Centripetal Horse posted:

Are you using some variation of a depth-first search? When you reach a dead end, do you back up one word, pick a new word for that spot, then carry on? Do you take letters that you know must be in place x, then select all words of the appropriate length matching those criteria? How do you track which words you've already tried? Do you allow the same word to appear multiple times in a single puzzle? Which dictionary or dictionaries do you use?

Yes yes yes yes. I maintain a list of already used words, stored as their indices in the word list, so the same word can't be used twice.

One problem is to pick which word to fill in next. At the moment I do the one with the least matches since I figured if I'm going to fail, I might just as well do it fast. The recursion also doesn't handle cases where the word dependency graph gets disjoint, so I might also have to figure out how to detect that to save doing a bunch of useless tests.

Also I got lucky with the sample, sometimes it just churns on forever, depending on which words are randomly selected, so maybe I'll add some function that just gives up if a partial solution seems to be taking too long.

The word list is public domain Moby Word Lists by Grady Ward, Gutenberg Etext #3201.

elite_garbage_man
Apr 3, 2010
I THINK THAT "PRIMA DONNA" IS "PRE-MADONNA". I MAY BE ILLITERATE.
Just got done writing a couple of programs for a cryptography class. the first one is a simple frequency analyzer for substitution ciphers, and the second is a tool used to decrypt a Vigenere cipher with an unknown key length.



Jo
Jan 24, 2005

:allears:
Soiled Meat
Someone on Reddit asked for help with a CV problem: identify fuse colors for an aligned, lighting-constrained image. I threw together a tiny program which gives a probability distribution for the different colors (with an argmax at the end so the output was prettier). It was kinda' fun. :3:



code:
python fuse_color.py testimage

Fuse 0 color: blue
Fuse 1 color: blue
Fuse 2 color: blue
Fuse 3 color: blue
Fuse 4 color: orange
Fuse 5 color: blue
Fuse 6 color: blue
Fuse 7 color: blue
Fuse 8 color: blue
Fuse 9 color: blue
Fuse 10 color: blue
Fuse 11 color: red
The code: https://gist.github.com/JosephCatrambone/3bb3a49b454bcd52a68e

clockwork automaton
May 2, 2007

You've probably never heard of them.

Fun Shoe
So I'm 'releasing' my game next Thursday on itch.io so I decided I needed to spend some time making a stupid trailer for it.

https://www.youtube.com/watch?v=T5HSIGDc5pU

kayakyakr
Feb 16, 2004

Kayak is true

clockwork automaton posted:

So I'm 'releasing' my game next Thursday on itch.io so I decided I needed to spend some time making a stupid trailer for it.

https://www.youtube.com/watch?v=T5HSIGDc5pU

This is amazing and you should be proud.

gbaby
Feb 6, 2015

clockwork automaton posted:

So I'm 'releasing' my game next Thursday on itch.io so I decided I needed to spend some time making a stupid trailer for it.

https://www.youtube.com/watch?v=T5HSIGDc5pU

Dang good job!

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

clockwork automaton posted:

So I'm 'releasing' my game next Thursday on itch.io so I decided I needed to spend some time making a stupid trailer for it.

https://www.youtube.com/watch?v=T5HSIGDc5pU

Holy poo poo, pro click!

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

clockwork automaton posted:

So I'm 'releasing' my game next Thursday on itch.io so I decided I needed to spend some time making a stupid trailer for it.

https://www.youtube.com/watch?v=T5HSIGDc5pU

Congratulations! Looks awesome.

elcannon
Jun 24, 2009
Someone in this thread a while back made some really cool Lindenmayer System visualizations, and ever since I saw them I've spent a lot of my free time playing around with L-Systems and having a blast. So far I've had some neat things working with generating systems radially around a central point so I get a little fractal wheel type thing. Then I animate by adding some noise to the branching angles, point locations, color, etc.

Here's a pretty basic one:
http://gfycat.com/DarlingCheapAsiandamselfly

Increased the number of systems as well as the amount of noise in the point locations:
http://gfycat.com/WigglySerpentineChinchilla

Pretty difficult to pick out the structures at this point but you can still see patterns in the motion:
http://gfycat.com/CavernousUnluckyBird

Trying to make the color a little more dynamic right now:
http://gfycat.com/BossyWebbedIbisbill
http://gfycat.com/MetallicFrailIchthyosaurs

At this point I have an absolute shitload of free parameters, so I'm really tempted to implement something similar to Scott Draves' Electric Sheep and make a little web app where users vote on systems and a GA spits new ones out.

Doh004
Apr 22, 2007

Mmmmm Donuts...

clockwork automaton posted:

So I'm 'releasing' my game next Thursday on itch.io so I decided I needed to spend some time making a stupid trailer for it.

https://www.youtube.com/watch?v=T5HSIGDc5pU

Owns.

Neurion
Jun 3, 2013

The musical fruit
The more you eat
The more you hoot

Something I've always been fascinated by and wanted to do since I was a child was make an OPL3 synthesis MIDI player in DOS. I've tried many things over the years, but only now do I feel like I have the knowledge I truly need to make a good one. To help me in developing it, I've made a tool that allows me to watch the state of the OPL3 registers that are emulated in DOSBox. Using this I'll be able to see how established software and games make use of the OPL3 synth and use that to help me design my own synth player. I would post a screenshot, but it's much more impressive to see (and hear!) it in action!

https://www.youtube.com/watch?v=2uHdUgkKxtM

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.
Neurion: That's awesome! It makes me feel like a kid again :)

In my spare time for the last year or so (an evening a week) I've been working on a node- and timeline editor. It should eventually start rendering stuff but for now you can just connect and group nodes, animate properties and so on. Progress is slow, but steady!

Centripetal Horse
Nov 22, 2009

Fuck money, get GBS

This could have bought you a half a tank of gas, lmfao -
Love, gromdul

Dragola posted:

Someone in this thread a while back made some really cool Lindenmayer System visualizations, and ever since I saw them I've spent a lot of my free time playing around with L-Systems and having a blast.

Were they 2D? If they were, there's a good chance it was me. I love the drat things. In fact, I recently stuck some code up on Github, and made a few new gifs to share with the people who asked for the code.




If they were 3D, it definitely was not me. You mentioned points and fuzziness. Exactly what method are you using? Those words make me think of chaos game fractals.

Zaphod42
Sep 13, 2012

If there's anything more important than my ego around, I want it caught and shot now.

Centripetal Horse posted:

Were they 2D? If they were, there's a good chance it was me. I love the drat things. In fact, I recently stuck some code up on Github, and made a few new gifs to share with the people who asked for the code.



If you rendered it breadth-first instead of depth-first it'd look more like a natural tree growing :)

Workaday Wizard
Oct 23, 2009

by Pragmatica

Sagacity posted:

Neurion: That's awesome! It makes me feel like a kid again :)

In my spare time for the last year or so (an evening a week) I've been working on a node- and timeline editor. It should eventually start rendering stuff but for now you can just connect and group nodes, animate properties and so on. Progress is slow, but steady!



Neat. What's the GUI toolkit you're using?

clockwork automaton
May 2, 2007

You've probably never heard of them.

Fun Shoe

clockwork automaton posted:

So I'm 'releasing' my game next Thursday on itch.io so I decided I needed to spend some time making a stupid trailer for it.

https://www.youtube.com/watch?v=T5HSIGDc5pU

By the way this is up for download now: http://lindseyb.github.io/CuppaTea/ - if you don't want to pay money for it PM me for a code.

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.

Shinku ABOOKEN posted:

Neat. What's the GUI toolkit you're using?
It's Qt5. If you want to play around the code is up on Github, but no guarantees it'll work for you :)

Shalinor
Jun 10, 2002

Can I buy you a rootbeer?
Also posted in the gamedev thread, but what the hell. Finally getting some real art together for Spartan Fist. Started with these concepts...



Then 3D artist produced these...



It'll look a bit more like this in-game, just the bones wouldn't be visible. Also, the lighting here is bad, I assume it's default Maya directional:



Next step is to pose a few 3D shots from the first-person perspective, to get an idea of how the fists will look close up. Since it's a first-person melee game, you'll spend a lot of time staring at the top of said fists, so we need to make sure the meshes look alright from that angle. It's coming together nicely so far, though. :keke:

Also, I think she looks a lot cooler without the helmet (this character being Emma Jones, again, now as an arena fighter). We'll end up with a lot of body parts, though, and the helmet will probably appear as part of a Commander Keen-esque enemy eventually.

DeathBySpoon
Dec 17, 2007

I got myself a paper clip!


Just truckin' along on Roggle.

clockwork automaton
May 2, 2007

You've probably never heard of them.

Fun Shoe

This is adorable and awesome.

hendersa
Sep 17, 2006

DeathBySpoon posted:



Just truckin' along on Roggle.

How is this not getting more attention from you guys? This is awesome!

Pseudo-God
Mar 13, 2006

I just love oranges!

DeathBySpoon posted:



Just truckin' along on Roggle.
This is quite impressive. Which platform is it for?

DeathBySpoon
Dec 17, 2007

I got myself a paper clip!
Thanks! It's in Java with libgdx, so it'll run on anything. I'm mainly targeting desktop and Android, and hoping my code isn't too bloated for it to run in the browser too. I post about it pretty regularly in the roguelike thread. My goal is for it to be equally accessible with mouse, touch, keyboard, or controller. Too many roguelikes have indecipherable UIs, I wanted to make one anyone could play without sacrificing actual game depth.

NorthByNorthwest
Oct 9, 2012
I've been working my way through https://www.learnopengl.com's set of tutorials, and I finally got screen-space ambient occlusion working. At the moment, it's just the ambient map, but I'll be adding in lighting soon.

Jo
Jan 24, 2005

:allears:
Soiled Meat
Cross-posting from the Ask/Tell Numerical/Statistical/Mathematical thread. Still working on my learning toolkit. I can reproduce some of the result from Hinton's group.



Still working on the reconstruction (outlier on the right), but if that gets fixed I'm going to start procedurally generating sprites and dialog for a game of some sort.

curuinor
Feb 20, 2011

by Lowtax
I made a thingy! It's to remind you to talk to your friends occasionally... not on fb

https://diogenes.co

Drastic Actions
Apr 7, 2009

FUCK YOU!
GET PUMPED!
Nap Ghost

curuinor posted:

I made a thingy! It's to remind you to talk to your friends occasionally... not on fb

https://diogenes.co

Some suggestions for you. First, there is no secure http connection on the site at all. You're passing login and tokens around without SSL. I mean, it's not the biggest site in the world, but you really should have a secure connection for at least handling usernames and passwords.



If you do something wrong on the form, the entire thing gets deleted and disappears. That's kinda lame. It should point out the validation error in the form rather than just reset the whole thing.




What's with the box at the bottom?

code:
HTTP/1.1 200 OK
Server: nginx/1.4.6 (Ubuntu)
Date: Wed, 21 Oct 2015 19:44:59 GMT
Content-Type: text/html; charset=utf-8
Connection: keep-alive
Content-Length: 218

[{"name": "lowtax", "order": 1, "contacted": false, "uuid": "6f8322c0-dfb5-4dd5-bbb1-7b97681c3253"}, {"order": 2, "uuid": "f6749b3f-6b21-4e01-8470-7d1531b02b17", "contacted": false, "name": "\u30bf\u30c0\u30de\u30c4"}]
This is what's returned when you call people_list for me. Why is the Content Type html? You're returning json.

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."
I finally put together a repo for a pair of projects I made using the Wikireader, a plastic widget for viewing an offline snapshot of Wikipedia which runs Forth.
https://github.com/JohnEarnest/Wikireader-Adventures



Pizzatime
Apr 1, 2011



Got a devlog going over at byob.

OneEightHundred
Feb 28, 2008

Soon, we will be unstoppable!
Let's convert .NET generics into C++ templates.


OneEightHundred fucked around with this message at 21:16 on Oct 24, 2015

Shalinor
Jun 10, 2002

Can I buy you a rootbeer?
Finally threw in some backdrops, and think I've figured out where the fists need to be situated to feel like they're attached to "you". Current feedback is that the fists are maybe too low-res, and we need to make some up-ressed versions for FPS view:


One surprising result is that walking up close to the voxel terrain is actually kind of cool. It's like wandering through pixel art. It wouldn't work if the environments had pixel splotches of weird colors all over them, but Zach's been keeping them relatively "flat" for that reason:

curuinor
Feb 20, 2011

by Lowtax

Drastic Actions posted:

Some suggestions for you. First, there is no secure http connection on the site at all. You're passing login and tokens around without SSL. I mean, it's not the biggest site in the world, but you really should have a secure connection for at least handling usernames and passwords.



If you do something wrong on the form, the entire thing gets deleted and disappears. That's kinda lame. It should point out the validation error in the form rather than just reset the whole thing.


I was shopping around for a real SSL token (digicert is apparently the standard but it costs waaaay too loving much) but for less than $100, found one so I'll go with it. Everything's http basic auth, I do agree that it's an inducement to get pwned

The form deletion is definitely a thing, I'll fix that

Drastic Actions posted:




What's with the box at the bottom?

It's a box! Yah, it's an extraneous box.

Drastic Actions posted:


code:
HTTP/1.1 200 OK
Server: nginx/1.4.6 (Ubuntu)
Date: Wed, 21 Oct 2015 19:44:59 GMT
Content-Type: text/html; charset=utf-8
Connection: keep-alive
Content-Length: 218

[{"name": "lowtax", "order": 1, "contacted": false, "uuid": "6f8322c0-dfb5-4dd5-bbb1-7b97681c3253"}, {"order": 2, "uuid": "f6749b3f-6b21-4e01-8470-7d1531b02b17", "contacted": false, "name": "\u30bf\u30c0\u30de\u30c4"}]
This is what's returned when you call people_list for me. Why is the Content Type html? You're returning json.

It's what is returning for some reason from flask's jsonify, which I thought was supposed to return a proper content-type...

And it does return proper content-type on all the other requests, for some reason... 0_o

nuvan
Mar 29, 2008

And the gentle call of the feral 3am "Everything is going so well you can't help but panic."
This just popped up, if you're willing to wait a few weeks:
https://letsencrypt.org

IAmKale
Jun 7, 2007

やらないか

Fun Shoe
NameCheap has SSL certificates for about $11/yr. It's just a Class 1 but it's a good way to get up and running.

biznatchio
Mar 31, 2001


Buglord
You can get an SSL certificate for free from startssl.com.

Sedro
Dec 31, 2008

biznatchio posted:

You can get an SSL certificate for free from startssl.com.
Only for personal use, and the website will make you rip your hair out

Adbot
ADBOT LOVES YOU

kayakyakr
Feb 16, 2004

Kayak is true

nuvan posted:

This just popped up, if you're willing to wait a few weeks:
https://letsencrypt.org

This is beautiful, for the record. I love that they even threw in an auto-configure linux tool for nginx and apache.

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