Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Python

Name: Anonymous 2009-04-17 8:31

Whats the thing with import blah.blah.blah
Can't they just include it by default and use only the called functions? It is an interpreter. Not C++ where this is useful.

Name: Anonymous 2009-04-20 17:17

>>40
copy con
I love you.

Name: Anonymous 2009-04-20 17:20

>>39
Thank you for sharing a well-known information about module loading in statically typed languages.

Python is not statically typed and its modules are executed when loaded. Note that doesn't forbit modules being compiled in a sense, its just that the compiled (to bytecode but that doesn't matter) module code is executed to populate the actual module object with methods, classes and fields.

It's not limited to modules, of course. In the following example (simplified, the real thing should use __slots__ and **kwargs) the inner class definition is executed each time the function is called, yielding different class objects. Sure, it's slow as fuck and dangerous in the wrong hands, yet allows a lot of interesting techniques.
def record_class(*fieldnames):
    class TempClass(object):
        names = fieldnames
        def __init__(self, *args):
            for (name, arg) in zip(self.names, args):
                setattr(self, name, arg)
    return TempClass

Record = record_class("a", "b")
obj = Record(1, 2)
print obj.a, obj.b

Name: Anonymous 2009-04-20 17:56

>>41
I second this emotion

Name: Anonymous 2009-04-20 18:01

>>41,43
I love you guys too <3

Name: Anonymous 2009-04-20 18:54

>>44
:)

sometimes I wish I could make real friends on /prog/... :S

Name: Anonymous 2009-04-20 18:58

>>45
But you can.

I did

Name: Anonymous 2009-04-20 19:00

>>46
I know I'm just asking to be trolled, but... How?

Name: Anonymous 2009-04-20 19:05

I found my girlfriend on /b/. Well, ex-girlfriend now. But it was good while it lasted.Point is, the impossible is possible, sometimes.

Name: Anonymous 2009-04-20 19:25

>>48
/b/ [o]
>>45
/prog/
(  ̄3 ̄)

Name: Anonymous 2009-04-20 19:28

>>47
Didn't you go to /prog/-con 2009? Leah Culver and the ginger were there.

Name: Anonymous 2009-04-20 21:31

>>50
Did they fuck a lot? Was it in public?

Name: Anonymous 2009-04-21 5:58

>>50
/prog/-con 2009
Never heard of it.

Name: Anonymous 2009-04-21 6:00

>>52
You weren't invited. Draw your own conclusions.

Name: Anonymous 2009-04-21 6:22

>>53
Were YOU?

Name: Anonymous 2009-04-21 6:25

>>54
Of course I was. I even bought Xarn a beer.

Name: Anonymous 2009-04-21 6:27

>>55
How did you get invited, then?
You're making me feel left out

Name: Anonymous 2009-04-21 6:28

I had a terrible time at prog-con, I got wasted and exposed myself in front of the Sussman :(

Name: Anonymous 2009-04-21 8:49

>>57
I think he enjoyed it. I saw his snake rise in approval, if you catch my drift.
>>55
James?

Name: Anonymous 2009-04-21 12:49

I talked with Christopher about EMACS and Haskell all the time. In lojban.

Name: Anonymous 2009-04-21 13:49

This thread sucks.

Name: Anonymous 2009-04-21 14:09

Actually, the /prog/ snake is a Python.

Name: Anonymous 2009-04-22 3:53

>>59
roses smell red
violets smell blue
lojban is for fuckwits
that means you

Name: Anonymous 2009-04-22 4:08

>>62
What is the meaning of this? Maybe we could understand you if you could write in Lojban.

Name: Anonymous 2009-04-22 4:49

>>63
Let's say it brings up the question - do roses smell red. I might stop and ponder that for a minute or more and reach an immediate conclusion.

Name: Anonymous 2009-04-22 6:14

>>62
EXPERT SYNESTHETE

Name: Anonymous 2009-04-22 7:40

>>64
Yes, I believe you might.  The rest of us, however, can in a matter of seconds and without interrupting what we were previously doing, remember that in English, the word 'red' describes a colour and not a smell.  Thus, to use this word to describe the experience of molecules from the air stimulating smell receptors in your nose rather than frequencies of light hitting your retina makes little sense outside of discussing the medical condition that Herr >>65 refers to.

Name: Anonymous 2009-04-22 8:36

Not all roses are red.

Name: Anonymous 2009-04-22 8:48

>>66
Wouldn't it be nice to use a language not only syntactically unambigous, like Lojban, but also strongly-typed? I'm thinking along the lines of representing words like ``Red'' as type-qualified, as in ``Coloured-Red'', the same for verbs, ``To See'' would be actually constructed as ``To Perceive-Colour'' (ditto ``...-smell''), correct sentences should be constructed in a type-safe manner: ``to-perceive-colour'' + ``colour-red'' = ``to-perceive-colour-red'' (where colour is still kind of linked to both words it connects), while nonsensical sentences like ``to-perceive-colour-smell-red'' would have obviously wrong grammatical structure.

Name: Anonymous 2009-04-22 8:52

>>68
THIS IS WHAT HASKELLITES ACTUALLY BELIEVE.

Name: Anonymous 2009-04-22 9:02

>>66
colour
Australian detected

Name: Anonymous 2009-04-22 9:14

>>68
WHAt

Name: Anonymous 2009-04-22 18:47

>>68
Couldn't you just say to-perceive-smell-red, and everything would be syntactically dandy, though using the made-up word smell-red? And this requires you to define the categories for words, and there's potentially a whole lot of categories, where not everyone is as clearly delimited as colors. Would some kind of authority sit and name new categories as the need arises?

Name: Anonymous 2009-04-22 18:51

>>68

The only problem with that is that in "seeing" we process motion and object differently beyond the "color" level

It's an integration of two processess

Name: Anonymous 2009-04-22 21:29

>>73
Um, it's RGB not RGBv!!!

Name: Anonymous 2009-04-22 22:20

>>68
It would be about as nice as using a statically typed programming language. I.e. not at all.

Name: Anonymous 2009-04-22 22:59

>>74
You forgot your ROYGBIV

Name: Anonymous 2011-01-31 21:12

<-- check em dubz

Name: 2012-01-25 23:04


Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List