code logs -> 2010 -> Tue, 17 Aug 2010< code.20100816.log - code.20100818.log >
--- Log opened Tue Aug 17 00:00:37 2010
00:05 AnnoDomini [annodomini@Nightstar-e2bf5f44.adsl.tpnet.pl] has quit [[NS] Quit: leaving]
00:43 * Chi coughs.
00:43
< Chi>
jezz: the entry level is higher there.
00:43
< Chi>
jezz: on asp.net you can learn to write up a Hello World in 10 minutes (8 to launch the studio, 2 to code), but java is a whole different story.
00:43
< Chi>
jezz: while you download one library, another, while you paste them with xml config half a megabyte, while you set up hibernate mapping, while you draw the base, while you raise web services.
00:43
< Chi>
jezz: you think you're writing Hello World, but look around, two weeks have gone by and everybody thinks it's an accounting system for a small business.
00:43 Chi is now known as Alek
00:47
< simon__>
haha
00:49
< Alek>
speaking of coding...
00:50 shade_of_cpux [cpux@Nightstar-20a84089.dyn.optonline.net] has joined #code
00:50
< Alek>
I should paste together a sample interactive form for a touchscreen. -_-
00:50 shade_of_cpux is now known as cpux
00:50
< Alek>
wibs cpux.
00:51
< Alek>
to put with my proposal.
00:51
< Alek>
or at least make a video clip of one. >_>
00:51
< Alek>
cause I doubt they'll risk putting unknown code on their iphones. <_<
00:52
< Alek>
which brings up some problems, really.
00:53
< Alek>
I don't know which language to use. I don't know whichever language it is. and I don't have access to a touchscreen, not even a phone.
00:53
< Alek>
and really, a phone's too small for what I need. -_-
00:53
< Alek>
something like India's $35 computer would be better, but they don't even have a manufacturer for those yet.
00:54 * Alek ponders.
00:54
< Alek>
guess I'll just fake it with my LCD. <_<
00:55
< Alek>
and make a video.
00:55
< Alek>
maybe.
01:30 Stalker [Z@26ECB6.A4B64C.298B52.D80DA0] has quit [Ping timeout: 121 seconds]
01:32 Derakon[AFK] is now known as Derakon
01:54 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has joined #code
02:37 Derakon is now known as Derakon[CIV]
04:08 Syloqs-AFH [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Connection closed]
04:19 Syloqs_AFH [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code
04:21 Syloqs_AFH is now known as Syloqs-AFH
04:26 Derakon[CIV] is now known as Derakon
05:35 celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
06:08 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds]
06:36 Derakon is now known as Derakon[AFK]
07:11 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code
07:13 You're now known as TheWatcher
07:29 Alek is now known as Seraphicus
07:30 AnnoDomini [annodomini@Nightstar-0687c150.adsl.tpnet.pl] has joined #code
07:30 mode/#code [+o AnnoDomini] by Reiver
07:41 Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has joined #code
07:46 Reiv is now known as Reivicus
07:50 Seraphicus is now known as Alek
08:12 You're now known as TheWatcher[afk]
09:15 Kazriko [kaz@Nightstar-e09690fa.client.bresnan.net] has quit [Ping timeout: 121 seconds]
09:17 Kazriko [kaz@Nightstar-e09690fa.client.bresnan.net] has joined #code
09:17 mode/#code [+o Kazriko] by Reiver
09:22 Kazriko [kaz@Nightstar-e09690fa.client.bresnan.net] has quit [Ping timeout: 121 seconds]
09:24 Kazriko [kaz@Nightstar-e09690fa.client.bresnan.net] has joined #code
09:24 mode/#code [+o Kazriko] by Reiver
09:49 You're now known as TheWatcher
10:27 Rhamphoryncus [rhamph@Nightstar-bbc709c4.abhsia.telus.net] has quit [Client exited]
10:41 cpux [cpux@Nightstar-20a84089.dyn.optonline.net] has quit [[NS] Quit: ChatZilla 0.9.86 [Firefox 3.6.8/20100722155716]]
11:05
< Tarinaky>
Am I doing something ridiculously stupid with the expression: "map(math.floor,(1/128)*TargetPosition) != map(math.floor,(1/128)*self.Position)" ?
11:05
< Tarinaky>
It won't dividing a Tuple by an integer...
11:05
< Vornicus>
Yes.
11:06
< Vornicus>
map(lambda k: math.floor(k/128), TargetPosition)
11:08
< Tarinaky>
Ah, hah.
11:08
< Vornicus>
Everything you wish to do to each element of the iterable must be in the function (lambda).
11:11
< Tarinaky>
... Does it modify TargetPosition?
11:13
< Tarinaky>
Because I'm getting odd behavior.
11:19
< Tarinaky>
Ooooh. That's what I'm doing wrong.
11:20
< Vornicus>
It does not modify TargetPosition. It gives you a new list.
11:25
< Tarinaky>
Nah, it's okay. I was scrolling in the wrong direction. Which was making it 'jump'.
11:40 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has joined #code
12:09 Vornicus is now known as Vornicus-Latens
12:19 Reivicus is now known as Reiv
13:09 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Client closed the connection]
13:09 PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has joined #code
14:31
<@jerith>
(1/128) == 0
14:36 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code
14:39 You're now known as TheWatcher[afk]
14:43
< Tarinaky>
How can I multiply all the elements of a list of unknown length by an integer?
14:43
< Tarinaky>
map only works if I know the length.
14:48
< Tarinaky>
Nm. Figured it out.
14:49 celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has joined #code
15:26
<@ToxicFrog>
Tarinaky: er, what? Map doesn't require the lengthy
15:27
<@ToxicFrog>
--> PinkFreud (WhyNot@NetworkAdministrator.Nightstar.Net) has joined #Fleet
15:27
<@ToxicFrog>
--- ChanServ sets modes [#Fleet +o PinkFreud]
15:27
<@ToxicFrog>
<Confusion> ...
15:27
<@ToxicFrog>
<Confusion> Ok. Fuck WEBER. I can't keep forcing myself through this at present.
15:27
<@ToxicFrog>
<Confusion> Spoiler: War still not over
15:27
<@ToxicFrog>
* Thalass decides to not read the honor books then
15:28
<@ToxicFrog>
<Confusion> Thalass: the first 5-6 were fun
15:28
<@ToxicFrog>
<Confusion> After book 4 or so though they become steadily more choreful
15:28
<@ToxicFrog>
<Thalass> ah
15:28
<@ToxicFrog>
...um
15:28
<@ToxicFrog>
>>> map(lambda x: x*3, [1,2,3,4,5])
15:28
<@ToxicFrog>
[3, 6, 9, 12, 15]
15:30
< Tarinaky>
Ahh. I opted for [128*a for a in range((TargetPosition[1]-558)/128,(TargetPosition[1]+558)/128+1)]
15:30
< Tarinaky>
(I couldn't find a way to build a range with non-unit intervals)
15:31
<@ToxicFrog>
Read the docs for range.
15:31
<@ToxicFrog>
>>> range(1,10)
15:31
<@ToxicFrog>
[1, 2, 3, 4, 5, 6, 7, 8, 9]
15:31
<@ToxicFrog>
>>> range(1,10,2)
15:31
<@ToxicFrog>
[1, 3, 5, 7, 9]
15:32
<@ToxicFrog>
You probably want something like range(TargetPosition[1]-558, TargetPosition[1]+558, 128)
15:32
< Tarinaky>
The index only linked to a footnote on for about how range can be used for a pascal-like for loop.
15:35
<@Derakon[AFK]>
BTW, for list comprehensions, range is good, but for actual for loops, you should get into the habit of using xrange instead.
15:36
<@Derakon[AFK]>
Because xrange doesn't build up a list, so it's a bit faster and uses marginally less memory.
15:36
<@Derakon[AFK]>
(Or not so marginally if you have a million-iteration loop~)
15:37
< Tarinaky>
I don't understand. How does xrange work then?
15:38
<@Derakon[AFK]>
Broadly speaking, you can think of it as a function that, each time it's called, returns the next number.
15:38
<@Derakon[AFK]>
And it gets called automatically one time per iteration.
15:39
<@Derakon[AFK]>
(Read up on generator functions if you're curious)
15:39
<@Derakon[AFK]>
Anyway, off to work.
15:39
< Tarinaky>
Oh I see.
15:40
< Tarinaky>
xrange only offers an advantage when you don't intend to call each element or have a very large domain.
15:45
<@ToxicFrog>
Tarinaky: http://docs.python.org/library/functions.html#range
15:46
<@ToxicFrog>
"If the step argument is omitted, it defaults to 1. If the start argument is omitted, it defaults to 0. The full form returns a list of plain integers [start, start + step, start + 2 * step, ...]."
15:46
<@ToxicFrog>
I suspect you're looking at the wrong docs.
15:46
< Tarinaky>
Probably.
15:46
< Tarinaky>
I thought they all shared a common index.
15:47
<@ToxicFrog>
That's a very vague statement.
15:47
< Tarinaky>
http://docs.python.org/release/2.6.5/genindex.html
15:47
< Tarinaky>
range
15:47
< Tarinaky>
built-in function
15:48
< Tarinaky>
http://docs.python.org/release/2.6.5/reference/compound_stmts.html#index-771
15:48
<@ToxicFrog>
Which in turn, if you click on the link "range()", links you to http://docs.python.org/release/2.6.5/library/functions.html#range
15:48
<@ToxicFrog>
Which is the 2.6.5 version of what I linked.
15:49
<@ToxicFrog>
In any case, you probably want to back up to docs.python.org/release/2.6.5 and look in the correct manual depending on your question - standard library reference or laguage reference.
15:52
< Tarinaky>
That requires me to know which the correct manual is >.<
15:53
< celticminstrel>
Standard library if you're looking up a function.
15:53
< celticminstrel>
Language reference if you're looking up a statement such as 'for' or 'with' or 'print'.
15:53
< celticminstrel>
Or any other syntax element.
15:55
< Tarinaky>
Isn't range a builtin though?
15:58
<@ToxicFrog>
Yes?
16:00
<@ToxicFrog>
It's a builtin library function.
16:01
<@ToxicFrog>
Language reference: "This reference manual describes the syntax and "core semantics" of the language. It is terse, but attempts to be exact and complete. The semantics of non-essential built-in object types and of the built-in functions and modules are described in The Python Standard Library. For an informal introduction to the language, see The Python Tutorial."
16:02
<@ToxicFrog>
Library reference: "While The Python Language Reference describes the exact syntax and semantics of the Python language, this library reference manual describes the standard library that is distributed with Python. It also describes some of the optional components that are commonly included in Python distributions."
16:11 PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
16:13
< Tarinaky>
Oh.
16:23 You're now known as TheWatcher
17:30 AnnoDomini is now known as ST
19:27
< Vornicus-Latens>
If it's a keyword, or the way various special methods are used, then you look in the language reference.
20:08 Rhamphoryncus [rhamph@Nightstar-bbc709c4.abhsia.telus.net] has joined #code
20:52 TarinakyKai [Tarinaky@Nightstar-f349ca6d.plus.com] has joined #code
20:55 Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has quit [Ping timeout: 121 seconds]
21:03 TarinakyKai [Tarinaky@Nightstar-f349ca6d.plus.com] has quit [[NS] Quit: Leaving]
21:47 ST is now known as AnnoDomini
22:27 Derakon[AFK] [Derakon@Nightstar-5213d778.ca.comcast.net] has quit [Ping timeout: 121 seconds]
22:49 AnnoDomini [annodomini@Nightstar-0687c150.adsl.tpnet.pl] has quit [[NS] Quit: Blegh.]
22:50 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Connection closed]
23:26 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds]
23:28 celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
--- Log closed Wed Aug 18 00:00:37 2010
code logs -> 2010 -> Tue, 17 Aug 2010< code.20100816.log - code.20100818.log >