Open Side Menu Go to the Top

04-04-2013 , 07:27 AM
That position seems a lot more reasonable than your previous one. I'm still not inclined to care but if I were doing a bunch of web work where I only needed basic dom manipulation I would probably look for a good small library to use that wasn't jQuery.
** 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 **
04-04-2013 , 10:45 AM
Due to ridiculous time management it looks like I'm going to have to teach myself and make a cartoon in Adobe Flash CS6 in the space of one day. I've never used Flash before. Is this completely impossible? (I just want to scrape a pass)
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-04-2013 , 12:30 PM
I am looking for someone to work with writing a very obvious program (game theory/poker). Can offer money/expertise. PM if interested.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-04-2013 , 12:53 PM
If that same person wants to help make my flash cartoon it would be much appreciated
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-04-2013 , 01:14 PM
Quote:
Originally Posted by There Is A Light
Due to ridiculous time management it looks like I'm going to have to teach myself and make a cartoon in Adobe Flash CS6 in the space of one day. I've never used Flash before. Is this completely impossible? (I just want to scrape a pass)
depending on the definition of "cartoon", not necessarily impossible
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-04-2013 , 01:43 PM
Sorry if this is a bit spammy, but if anyone here is good with Django and could help answer this stackoverflow question, I'd be incredibly grateful: http://stackoverflow.com/questions/1...g-to-create-in .

I've been fighting with this problem forever. I know exactly what's causing it but I have absolutely no clue how to fix it without using a really really stupid hack--my guess is that I should just use a completely different approach to the whole thing.

I posted a slightly different question about it earlier and got no response (so I deleted it and created this version, which is more straightforward).
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-04-2013 , 03:58 PM
I have to give it to the Clojure community, they really do go out of their way to keep up with the Jones's and create cool things inspired from other stuff: C2 is a library based of of d3.js.

I'm going to the Clojure meetup tonight. They are talking about Riemann, which means I'll be sitting there with zero clue of what eff they are talking about.

I don't feel so bad, it appears many of the people attending are trying to learn or struggling with the language, so I take comfort in the fact that I'll be about the median knowledge.

I'm wondering, should I expect someone to ask me what cool things I did with the language? If that's the case, I suspect I should take my computer and let someone play donkey poker.

Plus, I found this cool video where Hickey talks about the deeper considerations of Clojure. http://channel9.msdn.com/Shows/Going...Inside-Clojure... I was wondering why the hell conj worked so damn weird and now it all makes sense.

And thus ends my self-brain-washing for the preparation of the meetup.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-04-2013 , 04:02 PM
Quote:
Originally Posted by daveT
I'm wondering, should I expect someone to ask me what cool things I did with the language?
it's a social engagement, not a job interview.

Quote:
If that's the case, I suspect I should take my computer and let someone play donkey poker.
however, this sounds like a great ice breaker and/or answer if the topic comes up.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-04-2013 , 05:03 PM
Thanks for the response, Mr. _cracker; After thinking on it, the optimal strategy is probably arrive five minutes late and leave five minutes early.

Smart People are Scary People.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-04-2013 , 11:35 PM
I fully suspected that meetup to be scary and intimidating.

Turns out these people are 10x more intelligent than I bought in for. I felt like a drooler at a Mensa meeting. Definitely some interesting conversations...

Have to come up with better answers to "So what do you do?" Because building a few websites and a poker bot is not... Well, its dog ****.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-04-2013 , 11:49 PM
To be clear, I thoroughly enjoyed the meetup and the conversations I had. Definitely glad to move attention away from me and admire others.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-05-2013 , 01:15 AM
Quote:
Originally Posted by daveT
Have to come up with better answers to "So what do you do?" Because building a few websites and a poker bot is not... Well, its dog ****.
This attitude seems questionable. Nothing wrong with building whatever crosses your mind. Don't build stuff just to impress people that seems like a horrible plan.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-05-2013 , 05:44 AM
I think a lot of people would be interested in the creation of a poker bot. They'll want to know how you're doing it? How do you teach it how to play? Heuristics? Some kind of learning program? If the latter, does it learn a given opponent's tendencies? How good is it? Do you have plans to improve it? Have you heard of/learned from the RPS contest? http://www.rpscontest.com
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-05-2013 , 06:26 AM
Quote:
Originally Posted by clowntable
This attitude seems questionable. Nothing wrong with building whatever crosses your mind. Don't build stuff just to impress people that seems like a horrible plan.
I didn't say I actually wanted to build said item.

So, basically, I had long chat with the presenter and another person who worked on some really mind blowing projects.

This particular crowd was interested in managing largely distributed data flows and analyzing efficiency and thoroughput.

Anyways, they were tossing around words and concepts that were so far out that I just like... Wtf? I may as well have been talking to a bunch of skateboarders. Just nuts how they could talk about this stuff.

Most certainly would have been up jjshabado alley, but for me, I understood none of it. Imagine people talking about big data without ever once saying data, database, system, etc. The depth of the issues and their understanding of that was incredible. The techniques and ideas just made me say Woah.

In fact, very little of it was about Clojure. Just goes to show that once you get past the pretty hacker news bull****, there are people out there solving real problems that far surpass any language or idealism, and they all, although unified by a passive interest in Clojure, most couldn't derp a line of it. In here, there was no shame.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-05-2013 , 07:14 AM
A simple analogy of how I felt. Imagine you are a high school student who thinks he is getting pretty good at math and is heading down the correct path to accomplishing something useful. You walk into a room and you hear Godel, Euler, and Ramanujan start talking. The experience would be quite humbling and you'd pretty much leave with no extra knowledge but the fact that you really don't know anything at all.

I'll go again because everyone seemed cool as all get out, but I'm basically a party crasher.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-05-2013 , 07:27 AM
Don't confuse being knowledgeable about a subject with being smart. While these guys are probably smart I highly doubt the gap between you and them is anything like that between a high schooler and a G,E, or R.

There are times where I can't really follow a discussion in this thread because I just don't know enough about the subject matter to follow the conversation without doing some googling (and I'm usually lazy).
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-05-2013 , 08:31 AM
Quote:
Originally Posted by daveT
I have to give it to the Clojure community, they really do go out of their way to keep up with the Jones's and create cool things inspired from other stuff: C2 is a library based of of d3.js.
It's awesome someone is doing is this, but they mention they don't have animations. Sort of like remaking the pizza without cheese....
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-05-2013 , 09:36 AM
Quote:
Originally Posted by daveT
In fact, very little of it was about Clojure. Just goes to show that once you get past the pretty hacker news bull****, there are people out there solving real problems that far surpass any language or idealism, and they all, although unified by a passive interest in Clojure, most couldn't derp a line of it. In here, there was no shame.
The guy that wrote Riemann answered questions about it on HN ~end of last year (iirc). Not sure if he posted the project himself

Edit: found it his HN username is aphyr101 (github name is aphyr)
https://news.ycombinator.com/item?id=4962849

Quote:
Originally Posted by daveT
You walk into a room and you hear Godel, Euler, and Ramanujan start talking.
How did you not pick Riemann here heh

Riemann actually seems pretty interesting at first glance. Could be the basis for a nice IDS.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-05-2013 , 01:13 PM
I'm so confused by monitering systems. They seem so hard to setup.

I recently tried New Relic on a Sinatra app, and it was awesome because it's actually insanely easy to setup. I just had to add like 2 lines of code to my app, and somehow it magically can get all this info based on that.

It's super expensive, though, beyond the trial thing that provides just 24 hours of data. Are there roll your own substitutes for it with open source stuff? How hard are they to get setup? I'd love to hear whatever you guys do to solve the monitoring/performance problem....
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-05-2013 , 06:21 PM
Quote:
Originally Posted by jjshabado
Don't confuse being knowledgeable about a subject with being smart. While these guys are probably smart I highly doubt the gap between you and them is anything like that between a high schooler and a G,E, or R.

There are times where I can't really follow a discussion in this thread because I just don't know enough about the subject matter to follow the conversation without doing some googling (and I'm usually lazy).
I doubt anything I've spoke about here lost you.

If you don't feel like using Google, just disagree with gaming_mouse on something: he'll save you the trouble and link you to a 20,000+ word article that states his case for him.

Quote:
Originally Posted by gaming_mouse
It's awesome someone is doing is this, but they mention they don't have animations. Sort of like remaking the pizza without cheese....
JavaScript = Animations
ClojureScript = No Animations
Animations > No Animations
======== thus:
JavaScript > ClojureScript

?????

Quote:
Originally Posted by gaming_mouse
I'm so confused by monitering systems. They seem so hard to setup.

I recently tried New Relic on a Sinatra app, and it was awesome because it's actually insanely easy to setup. I just had to add like 2 lines of code to my app, and somehow it magically can get all this info based on that.

It's super expensive, though, beyond the trial thing that provides just 24 hours of data. Are there roll your own substitutes for it with open source stuff? How hard are they to get setup? I'd love to hear whatever you guys do to solve the monitoring/performance problem....
Riemann is built to monitor Riak, which is an open source NoSQL database built with Erlang. So, I guess you can roll your own that way. The upside is that it appears free, the downside is that you have to learn Erlang and Clojure*. How well that combines to whatever you are using to back-end Sinatra is a different question.

*probably not hard-core Clojure, but enough to be able to understand how to use the primitives they offer, which looks quite easy tbh.

I think one of the issues that Riemann attempts to solve is that, once you have an issue that is more "custom," the other systems available begin to break, whereas Riemann is more flexible.

***

There was one person I was talking to that had a job where they had to actually control *how* the data was being wrote to the disks. I had no idea someone could do this. Then they mentioned how that decision was sometimes problematic and I had zero clue why that was an issue.

Despite the huge blow to my ego, the conversations were nothing short of inspiring to listen to, until they started talking about specific technology, which makes that HTML9 page seem tame.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-05-2013 , 10:31 PM
Quote:
Originally Posted by daveT
I doubt anything I've spoke about here lost you.

If you don't feel like using Google, just disagree with gaming_mouse on something: he'll save you the trouble and link you to a 20,000+ word article that states his case for him.



JavaScript = Animations
ClojureScript = No Animations
Animations > No Animations
======== thus:
JavaScript > ClojureScript

?????

.
I'm not implying that, it sounds like closure version has definite advantages. Just saying if you look at most of the awesome d3 stuff out there, the really inspiring examples, they use animation, so you're losing a key element
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-06-2013 , 02:17 AM
@Noah - if no one answers your django question I can help with it at some point, pm me your skype if no luck. i know django very well.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-06-2013 , 02:16 PM
Hi Noah, was good to talk to you. I don't have stack overflow account but here's a reworking of your code that works. I tried to stick with the spirit of your approach. I did add a couple example fields to the Debt model just for illustration.

the key points are:

- exclude the actual debt foreign key from the form, since as you pointed out django requires it to be in place by the time post clean is called
- pass through errors from the related form as shown in clean()
- fix up your model in save()

Since this is a bit of a toy example, I'm not sure what approach I would really use.

Hope this is helpful.

Code:
from django import forms

from noah.models import Debt, Payment

def validate_code_for_count(code, count):
    #
    if count == 1 and not code == 'foo':
        raise forms.ValidationError("Code invalid for potato count")


class DebtForm(forms.ModelForm):
    class Meta:
        model = Debt

    def clean(self):
        cleaned_data = super(DebtForm, self).clean()
        validate_code_for_count(cleaned_data.get('secret_code'), cleaned_data.get('potato_count'))

        return cleaned_data


class PaymentForm(forms.ModelForm):
    secret_code = forms.CharField(max_length=12)
    potato_count = forms.IntegerField()

    # so you can filter the select queryset for the user who owns the debt or whatever
    def __init__(self, *args, **kwargs):
        super(PaymentForm, self).__init__(*args, **kwargs)
        # just change queryset to whatever
        self.fields['apply_to_debt'] = forms.ModelChoiceField(queryset=Debt.objects.all(), required=False)

    class Meta:
        model = Payment
        exclude = 'debt'

    def clean(self):
        cleaned_data = super(PaymentForm, self).clean()

        if not cleaned_data.get('apply_to_debt'):
            validation_form = DebtForm(cleaned_data)
            if not validation_form.is_valid():
                self._errors.update(validation_form.errors)
            else:
                self.cleaned_data['apply_to_debt'] = validation_form.save()

        return cleaned_data

    def save(self, commit=True):
        payment = super(PaymentForm, self).save(commit=False)
        payment.debt = self.cleaned_data['apply_to_debt']
        payment.save()
        return payment
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-06-2013 , 08:07 PM
quick C++ question. I'm supposed to be using this code in an assignment.

Flight** ptrFlight = new Flight*[100];
ptrFlight[0] = new Flight(...);
ptrFlight[1] = new Flight(...);

Flight is a class. So does the first line mean that ptrFlights is an array of pointers that point to other pointers? If so how can we then assign ptrFlight[0] to new Flight() ? isn't that assigning a pointer to a class rather than the address of a class?

Last edited by SenorKeeed; 04-06-2013 at 08:22 PM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-06-2013 , 08:26 PM
the new keyword returns a pointer.

// this is a class instance allocated on the stack
Flight foo;

// this is a pointer to a class instance created on the heap that you must free using delete
Flight *bar = new Flight();
** 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