Open Side Menu Go to the Top
Register
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

02-09-2014 , 06:19 PM
That's pretty much braille to me, haha. Thank you for the help. I went with a free HTML file and edited it to suit my needs. It works well.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-09-2014 , 07:25 PM
Finally! Python w/ braces!

http://www.pythonb.org/

Isn't that beautiful? Almost like a real programming language now.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-09-2014 , 07:45 PM
Noooooo
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-09-2014 , 08:35 PM
Quote:
Originally Posted by daveT
Finally! Python w/ braces!

http://www.pythonb.org/

Isn't that beautiful? Almost like a real programming language now.
this will surely anger the gods
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-09-2014 , 08:49 PM
Quote:
Originally Posted by daveT
Finally! Python w/ braces!

http://www.pythonb.org/

Isn't that beautiful? Almost like a real programming language now.
Some people must have a lot of time on their hands. I understand wanting the way you write programs to be different, but for someone to really love python so much that they don't want to switch to a different language while simultaneously hating the indentation thing so much that they roll their own language, just seems a little out there.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-09-2014 , 09:27 PM
Quote:
Originally Posted by daveT
Finally! Python w/ braces!

http://www.pythonb.org/

Isn't that beautiful? Almost like a real programming language now.
motherofgod.jpg
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-09-2014 , 09:28 PM
It's so strange that you can't even consider it a troll. I mean, people joked it and the joke is even featured is the _future_ package, but actually baking braces in is unthinkable.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-10-2014 , 01:55 AM
I can't wait for the raspberry pib.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-10-2014 , 06:04 AM
Quote:
Originally Posted by daveT
Finally! Python w/ braces!

http://www.pythonb.org/

Isn't that beautiful? Almost like a real programming language now.
lol wtf...from the page

"""[...]can also enable the introduction of new concepts such as anonymous functions and classes to Python."""

WTF must be some lame attempt at humor, surely noone can be this ignorant?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-10-2014 , 10:40 AM
Quote:
Originally Posted by clowntable
lol wtf...from the page

"""[...]can also enable the introduction of new concepts such as anonymous functions and classes to Python."""

WTF must be some lame attempt at humor, surely noone can be this ignorant?
Guido basically said that lack of braces is why Python can't have multi-line lambdas. Doing anonymous classes, I think, runs into the same problem.

http://www.artima.com/weblogs/viewpo...?thread=147358
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-10-2014 , 12:41 PM
mock me if you will, but you'll have to pry my curly braces from my cold dead hands
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-10-2014 , 08:54 PM
Quote:
Originally Posted by candybar
Guido basically said that lack of braces is why Python can't have multi-line lambdas. Doing anonymous classes, I think, runs into the same problem.

http://www.artima.com/weblogs/viewpo...?thread=147358
python doesn't have multiline lambdas? what do you do instead?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-10-2014 , 09:25 PM
You can keep your braces, just don't do dorky indentation.

Python lambdas are horrible. i think Guido wanted to nuke them in Python 3 but the backlash was too strong.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-10-2014 , 10:18 PM
Random question: Do you know of any existing programs to scrape information from the web? For instance, certain business information on review sites, e.g., phone, address, website, categories, etc. I'm very interested in having something like this put together. If no scrapers of this kind exist, can any of you ballpark a price range for it? I believe my partner has used one, but one of the review sites banned it because the IP kept coming back, so proxies or whatever will be required. And obviously I've been vague so ask me any questions to help narrow this down if you need. Thanks!

Edit: There is a LOT of data to be scraped, so I'm assuming a custom program/bot/whatever is necessary. Both Yelp and Google Maps have available APIs so I'd like to use those as examples.

Last edited by Phresh; 02-10-2014 at 10:25 PM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-11-2014 , 12:05 AM
Quote:
Originally Posted by gaming_mouse
python doesn't have multiline lambdas? what do you do instead?
Write a named function. The fact that you pass a function value by just using the name of the function as a value was one reason I was so surprised at how complicated it is to treat named functions like values in Ruby.

Code:
def square(x):
    '''yes I'm aware there's no reason this couldn't be a single-line lambda'''
    return x**2

list(map(square, range(5)))
The need to do this for multiline functions is generally considered an acceptable tradeoff for the whitespace thing. The whitespace thing is in turn regarded as a feature, probably in part because anyone seriously bothered by it has had plenty of time to use any other language. And yeah, Guido literally had `lambda` penciled out of Python3 entirely and only put it back in due to user revolt. If he had his way it wouldn't even exist.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-11-2014 , 01:48 AM
Quote:
Originally Posted by Xhad
Write a named function. The fact that you pass a function value by just using the name of the function as a value was one reason I was so surprised at how complicated it is to treat named functions like values in Ruby.
you basically never need to do this in ruby because you have multiline blocks and lambdas.

Code:
(1..5).map do |x|
  x*x
end
the part you are calling really complicated is when you want to use a method as a block. but even if you do want to do that it's actually only one extra word and symbol (which converts the method to a proc):

Code:
def square(x)
  x*x
end
  
p (1..5).map(&method(:square))
it's important to note in the above square is a method on the main object, not a free floating function, which doesn't really exist in ruby.

Last edited by gaming_mouse; 02-11-2014 at 01:55 AM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-11-2014 , 02:34 AM
spent my last java class being really smugly happy that i spent a week on my winter break going over inheritance/polymorphism and messing around with it on some toy programs, but then this last class my professor randomly tossed in an inner class that was supposed to be passed as an argument for some other object's constructor like it was no big deal and I was just like ???!?!!!

This class is really making me question if I am cut out for this ****.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-11-2014 , 02:58 AM
I don't get the fuss about multi-line lambdas. Naming a function helps organizing your code/thoughts imo.
One could argue allowing multi-line anonymous functions encourages bad coding practices.

[same for anonymous classes]
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-11-2014 , 03:38 AM
you are welcome to name your lamdas or procs in ruby.
you also have the option not to.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-11-2014 , 03:41 AM
"Everything is a lambda in disguise."

Why does it matter if you have an anonymous lambda in your language anyways?
Why does it really matter if you have multi-line lambdas or not?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-11-2014 , 04:10 AM
Quote:
Originally Posted by clowntable
I don't get the fuss about multi-line lambdas. Naming a function helps organizing your code/thoughts imo.
One could argue allowing multi-line anonymous functions encourages bad coding practices.

[same for anonymous classes]
http://en.wikipedia.org/wiki/Continuation-passing_style

I'm not sure if the javascript programs I come across are technically using this style but it isn't unusual to get 3 or 4 levels deep of callbacks. I imagine following the flow of the program would be harder using named python functions but maybe not.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-11-2014 , 07:48 AM
Quote:
Originally Posted by clowntable
I don't get the fuss about multi-line lambdas. Naming a function helps organizing your code/thoughts imo.
+1

I thinks its nice to have the option but it literally has no impact on my day-to-day life when using Python.

Edit: unlike something like Java and not being able to pass functions where when you want to do it there's no simple way to solve your problem.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-11-2014 , 09:50 AM
We're serving a biggish download (125mb) off our main webserver, and it's using up just about all our bandwidth now (10TB per month). Looking to move the load onto a static file CDN, but getting quotes of $800-$1,500 per month, does this seem about right or does anyone have recommendations?

Not dealt with bandwidth of this size before. Price seems expensive considering our network utilisation never goes above 150mbps of our 1gbps and we can buy a new dedicated server with 10TB bandwidth, 1gbps port for ~$100 per month from our current dedicated server provider. Could probably work out a deal for 20TB bandwidth a month with current provider.

Will a CDN like Rackspace/Amazon perform better than a dedicated server based in the US for a 125mb download for our customers? If moneys not really an issue this is the way to go right?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-11-2014 , 10:09 AM
My rough math seems to show that Amazon is in that ball park (~$1200). If money were totally not an issue I'd probably go with a Rackspace or Amazon.

Edit: I guess it depends a lot on what the download is. If its mission critical I'd probably pony up the dough to get it into a good CDN. You're going to get great performance, great reliability, and you'll almost never have to worry about scaling up.

If its not mission critical then doing a ****ty little dedicated server for it at 1/10 the price seems really reasonable.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
02-11-2014 , 10:39 AM
It's for the download of our product (mainly free version!), I'm sure a dedicated server would function fine although I'm wondering how much more benefits a CDN would offer over this in terms of faster downloads, faster download initiation, reliability etc = more completed downloads which is very important for us. We're doing about 80k downloads a month so a slightly faster download might actually translate into hundreds or more completed downloads possibly. Our customers are pretty evenly geographically dispersed across the whole world. Just unsure if the order of mangitude more expensive option is worth these benefits (which I assume are real)
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote

      
m