Open Side Menu Go to the Top

07-06-2013 , 11:41 PM
Quote:
Originally Posted by ballin4life
My gut feeling is that any code that contains lots of if else is bad style. Especially if the blocks are multiple lines. Complicated procedural flows are hard to follow.

I find this pattern especially unreadable:

Code:
if some_check:
  if some_other_check:
    do_thing1()
    do_thing2()
    ... (like 50 lines later)
  else:
    some_error()
else:
  some_other_error()
It is better to have 100 functions operate on one data structure than 10 functions on 10 data structures. -- Alan Perlis

Admit it, this is one interpretation...
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **
$25m Guaranteed WPM on CoinPoker
Join the action now
Daily Rewards • Splash Pots • CoinRaces
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **
07-07-2013 , 02:11 AM
Has anyone here worked with the Gambit Library:

http://www.gambit-project.org/

I want to calculate basic equilibria (maybe at Cardrunners EV level?) for Pot Limit Omaha, but there are no commercial programs for this yet. Is it feasible for me to learn Python and accomplish this through the scripting API or would I need to learn C++? I am a programming newb.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-07-2013 , 02:17 PM
Quote:
Originally Posted by tyler_cracker
for a dude who a few short years ago turned down a hike that was completed by a pre-schooler, i'd say at the very least this wins you Most Improved.

gl hf dd
11+ miles 2700 feet of climbing, misplaced 2 people for a couple of scary hours. Made it to within about a mile of the summit but didn't have the legs to climb another 1800 feet in that mile. 6.5 hours of moving over 8 hours and I can barely walk today... Good times!
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-07-2013 , 02:27 PM
Quote:
Originally Posted by Jeff W
Has anyone here worked with the Gambit Library:

http://www.gambit-project.org/

I want to calculate basic equilibria (maybe at Cardrunners EV level?) for Pot Limit Omaha, but there are no commercial programs for this yet. Is it feasible for me to learn Python and accomplish this through the scripting API or would I need to learn C++? I am a programming newb.
i've played around with gambit some. it's good for solving little toy games, but if you want to calculate equilibria (or approximate them) for anything resembling the size of a real poker game it won't be of much use. you need to look into iterative methods like counterfactual regret minimization. if you're a programming newb, this is a pretty tough problem to start with.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-07-2013 , 02:57 PM
Quote:
Originally Posted by kerowo
11+ miles 2700 feet of climbing, misplaced 2 people for a couple of scary hours. Made it to within about a mile of the summit but didn't have the legs to climb another 1800 feet in that mile. 6.5 hours of moving over 8 hours and I can barely walk today... Good times!
nh

1800:1 is pretty ridic. probably hardest i've done is turtlehead peak in red rock which is ~2000:2. my buddy and i destroyed the gatorade section of the nearest safeway after that.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-07-2013 , 03:24 PM
Quote:
Originally Posted by tyler_cracker
nh

1800:1 is pretty ridic. probably hardest i've done is turtlehead peak in red rock which is ~2000:2. my buddy and i destroyed the gatorade section of the nearest safeway after that.
Green Mountain is about the worst I've done, ~2300:<3, lots of stair stepping which I won't be a fan of until I drop some weight. Tough to train for 5+ hour hikes though which is almost as hard as doing a lot of climbing.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-07-2013 , 06:22 PM
Anyone see GorillaScript?

Looks like a pretty cool project, but one thing bothers me:

How is:

Code:
let gorillas-are-awesome = "Yes, they are."
more clear than:

Code:
var gorillasAreAwesome;
gorillasAreAwesome = "Yes, they are.";
?

In mind mind, there is a bright and thick line between "let" and "var." Let being local and var being global. What is the justification of using let instead of var in this case? He also uses "let" to define function names.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-07-2013 , 06:28 PM
Why would there be a bright and thick line on a use of a keyword that extends across all languages?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-07-2013 , 09:24 PM
"Var" means "This entity is variable and permanent and can exist in the global space."

"Let" can be expanded to "Let this entity be this value exist for this moment and only exists in the local function I am using it."

In fact, MDN says let is defined in JS 1.7 with a very specific definition:

Quote:
Declares a block scope local variable, optionally initializing it to a value.
https://developer.mozilla.org/en-US/...Statements/let
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-07-2013 , 11:59 PM
that link doesn't mention anything about bright colors or lines
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-08-2013 , 12:20 AM
Quote:
Originally Posted by gaming_mouse
i've played around with gambit some. it's good for solving little toy games, but if you want to calculate equilibria (or approximate them) for anything resembling the size of a real poker game it won't be of much use. you need to look into iterative methods like counterfactual regret minimization. if you're a programming newb, this is a pretty tough problem to start with.
Yeah, I figured this was the case. My best bet seems to be a much less ambitious project that interfaces with Pro Poker Tools command line.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-08-2013 , 12:57 AM
Quote:
Originally Posted by daveT
"Var" means "This entity is variable and permanent and can exist in the global space."

"Let" can be expanded to "Let this entity be this value exist for this moment and only exists in the local function I am using it."

In fact, MDN says let is defined in JS 1.7 with a very specific definition:



https://developer.mozilla.org/en-US/...Statements/let
I thought we were talking about Gorillascript.

Seriously: Just because Gorillascript compiles to Javascript, there's no reason to conflate the two languages.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-08-2013 , 01:07 AM
I was simply wondering why he chose to use let instead of var. Perhaps there was a clarifying issue yadda yadda.

Putting aside conflation for the moment, how does the (gs -> js) conversion handle the var and let difference if all of them are the same type on the gs side but should be different on the js side?

Eh, maybe its not that important but I'm interested in what the creator may have been thinking.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-08-2013 , 01:40 AM
Quote:
Originally Posted by Jeff W
Yeah, I figured this was the case. My best bet seems to be a much less ambitious project that interfaces with Pro Poker Tools command line.
I think that would be a good place to start, and build from there if you are inclined.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-08-2013 , 09:05 AM
Quote:
Originally Posted by daveT
I was simply wondering why he chose to use let instead of var. Perhaps there was a clarifying issue yadda yadda.
it appears that in gorillascript references created with let are immutable by default.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-08-2013 , 06:23 PM
Any suggestions for an XML Editor to use for my XML course this summer?

The instructor said he uses XML Copy Editor and the textbook recommends jEdit, but the instructor says to use whatever we want.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-08-2013 , 07:06 PM
Xcode has a pretty good built in xml editor if you're on a mac.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-08-2013 , 10:31 PM
Started 1 week contract, had to work with Eclipse for the first time for me, whatever.

Had to google/manually install a ****ing plugin just to get ****ing word wrap. Amazing.

Obviously the fact that they put me on a PC with a single 19" 4:3 monitor to do front end web dev didn't help. 1WP.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-09-2013 , 04:36 AM
Quote:
Originally Posted by Grue
Started 1 week contract, had to work with Eclipse for the first time for me, whatever.

Had to google/manually install a ****ing plugin just to get ****ing word wrap. Amazing.

Obviously the fact that they put me on a PC with a single 19" 4:3 monitor to do front end web dev didn't help. 1WP.
I started to just make fun of you for wanting word wrap - but damn that is pretty ******ed to need a plugin for that.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-09-2013 , 12:45 PM
It's so stupid when development environments that want you to use their editors.

And I'm still mad that Apple took a step back into the dark ages with Xcode 4.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-09-2013 , 04:46 PM
So I'm messing around with HTML / CSS in the hopes of getting a personal site up and running. Not my favorite languages but hey, what are you going to do?

I learned that Word can save file types as HTML, which I think is awesome. I plan on using Word to generate most of my pages that just contain text / pictures to make formatting easier.

http://www.indiana.edu/~halllab/

^ The above website definitely uses Word for the pages. But it looks to me like he has a more universal navigation bar. Is it possible to have a constant title, centered on top of all webpages, and a vertical navigation bar to the side of all webpages, without changing the Word source for each individual page?

tl;dr I know how to put a list of links on every page, but am wondering if there is a more universal way to do site navigation.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-09-2013 , 05:38 PM
Quote:
Originally Posted by Urinal Mint
tl;dr I know how to put a list of links on every page, but am wondering if there is a more universal way to do site navigation.
ah, why php became so popular

Code:
<?php include('navigation.html'); ?>
but you should just use wordpress
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-09-2013 , 05:50 PM
Thanks. http://www.w3schools.com/PHP/php_includes.asp looks like it has examples of that

Would the halllab site use something like that then? When I view page source and control-find 'php', I don't get any results.

Also, maybe I will just use WordPress.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-09-2013 , 06:31 PM
Quote:
Originally Posted by Urinal Mint
Thanks. http://www.w3schools.com/PHP/php_includes.asp looks like it has examples of that

Would the halllab site use something like that then? When I view page source and control-find 'php', I don't get any results.

Also, maybe I will just use WordPress.
The PHP code won't be in the page source. The PHP code is basically telling the server to "insert this HTML here".
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-09-2013 , 07:06 PM
I'm about half way to my 3 week deadline with that rails project. So far I've read 3/4ths of eloquent ruby, watched 20 random railscasts videos and I don't think I'll miss the deadline.

Right now the only thing I'm unsure of is how I want to handle displaying the admin panel's contents. It seems using generators in rails is really popular but generators are just copy/pasting basically. I'm not sold on making an engine because an engine based admin panel doesn't seem to make sense.

It's also what turned me off from devise. It just adds so much unnecessary complication when you have controllers/views in the engine because you end up overwriting the views anyways. So now you have half the views in your /app folder and the untouched ones in your /gems folder outside of the project.

I might just try and make my own generators? What is the best way to do this? Also when it comes time to doing the front end, do you just use different layouts to handle outputting the same resource in 2 different ways based on the URL accessed?

Example:
In /dashboard/posts, you would likely lists posts in a table and it would be consumed by an admin.
In /blog, you would likely list posts in a typical blog style that is consumed by visitors.

In both cases they would use the same Post model and I guess the same controller?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **
$25m Guaranteed WPM on CoinPoker
Join the action now
Daily Rewards • Splash Pots • CoinRaces
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

      
m