code logs -> 2007 -> Mon, 16 Jul 2007< code.20070715.log - code.20070717.log >
--- Log opened Mon Jul 16 00:00:11 2007
00:18 AnnoDomini [~farkoff@Nightstar-28825.neoplus.adsl.tpnet.pl] has quit [Quit: There is no Dana, only Zuul.]
00:51 GeekSoldier|Sleep [~Rob@Nightstar-2927.pools.arcor-ip.net] has quit [Ping Timeout]
00:53 GeekSoldier|Sleep [~Rob@Nightstar-2927.pools.arcor-ip.net] has joined #code
01:14
<@Pi>
Python has a serious problem with treating whitespace with grammatical significance, but I tend to think ending comments at EOL is probably not an example of this.
01:14
<@Chalcedon>
I can see the logic
01:14
<@Chalcedon>
It's just irritating when trying to comment out a 10-15 line function.
01:15
<@Chalcedon>
well, irritating from the point of view of someone who likes to keep those kinds of movements to a minimum.
01:15
<@Pi>
The problem here is with your editor, not with the language. Nearly all of the good code editors out there will have some sort of "comment block" functionality.
01:16
<@Chalcedon>
I'm just using IDLE.
01:16
<@Chalcedon>
I have been thinking about switching but hadn't applied any thought to it yet.
01:17
<@Pi>
One of the most important things a person can do to become a better (more effective/efficient) programmer is to pick a powerful code editor (doesn't really matter which one) and learn it well.
01:18
<@Chalcedon>
any suggestions on editors to investigate?
01:18 * Pi uses MS DevStoooo.
01:19
<@Pi>
But as for suggestions? Not really.
01:19
<@Chalcedon>
thanks :)
01:19 * Chalcedon will investigate this
01:19
<@Pi>
(Visual Studio is an excellent editor, but has two major drawbacks: 1) It costs money. 2) It runs only on Windows)
01:21
<@Chalcedon>
I have a windows machine
01:21
<@Chalcedon>
I use Visual Studio during my programming course. Do you know if it can be edited to support Python?
01:21
<@Chalcedon>
*used
01:21
<@Pi>
3) It's only really effective with the languages that it ships with.
01:22
<@Chalcedon>
woe :(
01:22
<@Chalcedon>
(I have a free, legal copy)
01:22
<@Pi>
You can add "profiles" for partial support of other languages, but they can't get the most useful features like intellisense.
01:23
< Vornicus>
note that intellisense doesn't work well with dynamically typed languages.
01:23
<@Chalcedon>
remind me what the difference between dynamically and statically typed languages is please?
01:23
<@Pi>
I use it because I use it at work to dev on Windows boxes in C++, and I got it really cheap through my company.
01:24
< Vornicus>
Dynamically typed languages, you do not specify the type of object a variable has.
01:24
<@Chalcedon>
gothcha
01:24
< Vornicus>
It figures that out while it's running, and it can change.
01:24
<@Chalcedon>
-er-
01:24
<@Chalcedon>
gotcha.
01:24 * Chalcedon nods
01:26 ReivZzz is now known as Reiver
01:27
< Vornicus>
the C family of languages is statically typed.
01:27
< Vornicus>
Python is dynamically typed.
01:28 * Chalcedon nods
01:28
<@Chalcedon>
I know what you're getting at... I just didn't know that was the name for it.
01:31
< Vornicus>
The advantage of statically typed languages is that your compiler/interpreter can figure out a lot of really cool things.
01:34 * Chalcedon pokes Reiver
01:35 * Reiver cookies Chalcedon
01:35
<@Chalcedon>
I recall you talking about Eclipse while learning java.
01:35
<@Reiver>
Yes?
01:35
<@Chalcedon>
am I remembering correctly?
01:35
<@Reiver>
It's a software development kit.
01:35
<@Chalcedon>
I know that ;)
01:35
<@Reiver>
Oh, right.
01:35
<@Chalcedon>
is it open source?
01:35
<@Reiver>
Yep!
01:35 * Chalcedon googles
01:38 * Chalcedon decides to try this
01:38
< Vornicus>
Eclipse, I find, is waay too heavy for smaller projects.
01:40
<@Chalcedon>
I need to start somewhere though.
01:40
<@Chalcedon>
and at least this way I know I can poke somebody if I get stuck.
01:40
< Vornicus>
Like, I wouldn't dare use it for things under ten thousand LOC.
01:40 * Chalcedon cookies Vorn
01:40
<@Chalcedon>
what's a LOC?
01:40
< Vornicus>
Lines Of Code
01:40
<@Chalcedon>
o.O
01:41
<@ToxicFrog>
Does it talk Python?
01:41
<@Chalcedon>
it does if you add a plug in
01:41
<@ToxicFrog>
Aah.
01:41
<@ToxicFrog>
(also, NEdit is delicious)
01:42
< Vornicus>
Personally I use TextWrangler, which is for Mac. It's quite nice.
01:42
<@Chalcedon>
sadly, I lack a mac.
01:43
<@Chalcedon>
I haven't yet got around to reinstalling Cygwin unfortunately TF.
02:47 Reiver is now known as ReivClass
03:45 GeekSoldier|Sleep is now known as GeekSoldier
03:46 GeekSoldier is now known as GeekSoldier_
03:46 GeekSoldier_ is now known as GeekSoldier
03:51 GeekSoldier is now known as GeekSoldier|Work
03:59 GeekSoldier|Work [~Rob@Nightstar-2927.pools.arcor-ip.net] has quit [Ping Timeout]
04:41 Chalcedon is now known as ChalcyOut
05:42 ChalcyOut is now known as Chalcedon
06:16 ReivClass is now known as Reiver
07:42 Forj [~Forj@Nightstar-15747.ue.woosh.co.nz] has joined #code
08:37 Forj [~Forj@Nightstar-15747.ue.woosh.co.nz] has quit [Connection reset by peer]
09:27 Forjadon [~Forjadon@Nightstar-15747.ue.woosh.co.nz] has joined #code
09:27 mode/#code [+o Forjadon] by ChanServ
09:33 Chalcedon [~Chalcedon@Nightstar-15747.ue.woosh.co.nz] has quit [Quit: Gone]
09:42 You're now known as TheWatcher
09:51 Forjadon is now known as ChalcyLaptop
09:57
< Vornicus>
Have some python code:
09:57
< Vornicus>
def ceiling(n, units = 1):
09:57
< Vornicus>
base = int(n/units)
09:57
< Vornicus>
multiple = base + (0 if base >= n else 1)
09:57
< Vornicus>
return multiple * units
09:58 * ChalcyLaptop blink
09:59
< Vornicus>
This works fine for pretty much everything - well, okay, you need to special case for units == 0, but - including n and units having opposite signs
10:00
< Vornicus>
But both OOXML (which uses a slightly different formula anyway) and ODF, and their predecessors, define it to throw an error when n and sign have opposite signs.
10:44 ChalcyLaptop [~Forjadon@Nightstar-15747.ue.woosh.co.nz] has quit [Ping Timeout]
10:45 Forjadon [~Forjadon@Nightstar-15747.ue.woosh.co.nz] has joined #code
10:45 mode/#code [+o Forjadon] by ChanServ
10:46 Forjadon is now known as ChalcyLaptop
10:54 Forjadon [~Forjadon@Nightstar-15747.ue.woosh.co.nz] has joined #code
10:54 mode/#code [+o Forjadon] by ChanServ
10:54 ChalcyLaptop [~Forjadon@Nightstar-15747.ue.woosh.co.nz] has quit [Ping Timeout]
10:57 Forjadon is now known as ChalcyLaptop
11:00 AnnoDomini [~farkoff@Nightstar-29129.neoplus.adsl.tpnet.pl] has joined #Code
11:00 mode/#code [+o AnnoDomini] by ChanServ
11:02 ChalcyLaptop [~Forjadon@Nightstar-15747.ue.woosh.co.nz] has quit [Quit: Leaving]
11:56 Vornicus is now known as Vornicus-Latens
12:13 Serah [~Z@87.72.35.ns-3885] has quit [Excess Flood]
12:13 Serah [~Z@87.72.35.ns-3885] has joined #Code
12:14 mode/#code [+o Serah] by ChanServ
12:15 Serah [~Z@87.72.35.ns-3885] has quit [Excess Flood]
12:16 Serah [~Z@87.72.35.ns-3885] has joined #Code
12:16 mode/#code [+o Serah] by ChanServ
12:18 Serah [~Z@87.72.35.ns-3885] has quit [Excess Flood]
12:19 Serah [~Z@87.72.35.ns-3885] has joined #Code
12:19 mode/#code [+o Serah] by ChanServ
12:22 Serah [~Z@87.72.35.ns-3885] has quit [Excess Flood]
12:23 Serah [~Z@87.72.35.ns-3885] has joined #Code
12:23 mode/#code [+o Serah] by ChanServ
12:25 Serah [~Z@87.72.35.ns-3885] has quit [Excess Flood]
12:26 Serah [~Z@87.72.35.ns-3885] has joined #Code
12:26 mode/#code [+o Serah] by ChanServ
13:48 MyCatVerbs [~rb6822@Nightstar-18504.cs.bris.ac.uk] has joined #code
15:00 MyCatVerbs [~rb6822@Nightstar-18504.cs.bris.ac.uk] has quit [Quit: Swim, swim, hungry!]
15:34
<@ToxicFrog>
GTK-Server is Made Of Awesome.
15:41
<@AnnoDomini>
Indeed?
15:42
<@ToxicFrog>
Yes. Are you familiar with it?
15:46
<@AnnoDomini>
No.
15:46
<@ToxicFrog>
Basically, it's the X11 concept applied to a GUI library.
15:47
<@ToxicFrog>
You run gtk-server, then talk to it over stdin, fifo, TCP, UDP, shared memory, or (if built as a DSO) direct function calls.
15:47
<@ToxicFrog>
You send it strings, it replies with strings.
15:48
<@ToxicFrog>
This means that any language that supports some subset of (file IO, TCP/UDP networking, direct IPC, DSO loading) - ie, all of them - can use GTK+ with no additional bindings or modifications.
15:48
<@ToxicFrog>
It also means that you can trivially do things like select() on both network events and GUI events simultaneously.
15:49
<@ToxicFrog>
And, for the final awesomecookie, it supports Glade.
15:51
<@ToxicFrog>
And since it supports networking, you can do networked display even for systems that don't have X11.
16:00 GeekSoldier|Work [~Rob@Nightstar-2927.pools.arcor-ip.net] has joined #code
16:01 GeekSoldier|Work is now known as GeekSoldier
16:06 MyCatVerbs [~rb6822@Nightstar-1463.cs.bris.ac.uk] has joined #code
16:07 Reiver is now known as ReivZzz
16:07 ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has quit [Quit: Leaving]
16:07 ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has joined #code
16:08 mode/#code [+o ToxicFrog] by ChanServ
16:08 ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has quit [Connection reset by peer]
16:19 ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has joined #code
16:19 mode/#code [+o ToxicFrog] by ChanServ
16:35 MyCatVerbs [~rb6822@Nightstar-1463.cs.bris.ac.uk] has quit [Quit: Swim, swim, hungry!]
16:48 You're now known as TheWatcher[afk]
18:30 ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has quit [Operation timed out]
18:30 You're now known as TheWatcher
18:31 ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has joined #code
18:31 mode/#code [+o ToxicFrog] by ChanServ
18:32 GeekSoldier [~Rob@Nightstar-2927.pools.arcor-ip.net] has quit [Ping Timeout]
18:32 GeekSoldier [~Rob@Nightstar-4186.pools.arcor-ip.net] has joined #code
18:33 GeekSoldier is now known as GeekSoldier_
18:34 GeekSoldier_ is now known as GeekSoldier
18:35 * ToxicFrog fiddles with Lua, specifically with something that will combine with Glade and gtk-server to create an automatically generated widget heirarchy
18:48
<@ToxicFrog>
DIEEEEEEEEEEEE
18:48
<@ToxicFrog>
DIE, XML
18:48 * jerith burns an XML spec.
18:50
<@ToxicFrog>
And while I'm at it
18:50
<@ToxicFrog>
DIE, UBUNTU, DIEEEEEEEEEEEEEE
18:50 * ToxicFrog feeds them both to the headcrabs
18:51 * jerith hands ToxicFrog a Debian.
18:56 * ToxicFrog dismembers it and nails the pieces to the boot sector as a warning to the others.
18:57 * jerith hands ToxicFrog a Gentoo.
18:58 * ToxicFrog gives it a more-in-sorrow-than-anger look and tells it to run along and come back when it has a better package management system.
18:58
<@jerith>
s/package management system/quality control process on the repo/
18:59
<@ToxicFrog>
It needs a useful package manager before the repo contents become relevant~
19:00
<@ToxicFrog>
Anyways. I vote that we round up some Ubuntu devs and beat them with the Filesystem Heirarchy Standard until they stop breaking the fuck out of my scripts, thanks.
19:02 * jerith mourns the replacement of /mnt/ with /media/
19:03
< GeekSoldier>
yes, even knoppix has done this.
19:04
<@jerith>
I still resolutely use /mnt for everything that isn't built-in hardware, however.
19:05
<@jerith>
Although usually usb drives go in /media/ too.
19:05
<@ToxicFrog>
/media isn't a replacement, it's an addition.
19:06
<@ToxicFrog>
/media is specifically for removable media (floppies, CDs, etc)
19:06
<@jerith>
Yeah.
19:06
<@ToxicFrog>
/mnt is for everything else.
19:06
<@ToxicFrog>
I'm not sure whether USB sticks officially count as removable media, but Fedora puts them in /media.
19:06
<@jerith>
But I had to rewrite a whole bunch of scripts when that changed.
19:06
<@ToxicFrog>
Aah.
19:06
<@ToxicFrog>
In this case, the script breakage comes from the fact that someone thought it would be a good idea to put env in /usr/bin.
19:07
<@jerith>
I've gotten used to it, but I don't have to like it.
19:07
<@jerith>
I thought env always lived in /usr/bin?
19:07
< GeekSoldier>
yes, but it tried to mount some new scsi drives in /media.
19:07
<@ToxicFrog>
Which is something you do not fucking do, because there are a lot of scripts that start with #!/bin/env foo
19:08
< GeekSoldier>
that was very against what I wanted.
19:08
<@ToxicFrog>
For some foo that might be in /bin or might be in /usr/bin or might be in /usr/local/bin or might be in /usr/X11R6/bin etc.
19:08
<@ToxicFrog>
jerith: AFAIK, Ubuntu and possibly Debian and some BSD variants are the only things that put it in /usr/bin.
19:09
<@jerith>
[jerith@jerith-lap1 ~]$ which env
19:09
<@jerith>
/usr/bin/env
19:09
<@jerith>
RHEL 5
19:09
<@ToxicFrog>
RH and Fedora put a link in /usr/bin.
19:09
<@ToxicFrog>
So you can access it with either.
19:09
<@jerith>
Ah.
19:09
<@ToxicFrog>
ben@orias ~
19:09
<@ToxicFrog>
$ ls -l /usr/bin/env
19:09
<@ToxicFrog>
lrwxrwxrwx 1 root root 13 Jun 17 14:05 /usr/bin/env -> ../../bin/env
19:10
<@jerith>
lrwxrwxrwx 1 root root 13 Jun 4 11:39 /usr/bin/env -> ../../bin/env
19:10
<@jerith>
Yeah.
19:10
<@ToxicFrog>
Not all systems do, but on the vast majority of linuxes you can be confident that /bin/env will be there.
19:10
<@jerith>
All the scripts I've ever seen it in use /usr/bin/env, though.
19:10
<@ToxicFrog>
Ubuntu, however, sticks the actual binary in /usr/bin and doesn't bother linking.
19:10
<@ToxicFrog>
Really?
19:10
<@ToxicFrog>
All the ones I've seen use /bin/env
19:11
<@jerith>
I haven't seen very many, though
19:13 AnnoDomini [~farkoff@Nightstar-29129.neoplus.adsl.tpnet.pl] has quit [Quit: Quem quer o garfo?]
19:13
<@ToxicFrog>
And in the various places I've seen that recommend the use of env rather than direct paths, they always recommend /bin/env.
19:15
<@ToxicFrog>
Anyways. Back to hating XML.
19:16
<@jerith>
A sentiment I don't think anyone here would disagree with.
19:16 AnnoDomini [~farkoff@Nightstar-29129.neoplus.adsl.tpnet.pl] has joined #Code
19:17 mode/#code [+o AnnoDomini] by ChanServ
19:18
<@ToxicFrog>
I'm the only person in here currently writing a restricted XML parser, though ;.;
19:19
<@jerith>
Ugh.
19:20
<@jerith>
How much of XML do you need?
19:20
<@jerith>
But first, bathtime.
19:22
<@ToxicFrog>
Enough to pull the <widget> and <signal> tags out of a Glade file.
19:22
<@ToxicFrog>
Including telling what widget each widget and signal belongs to.
19:23
<@ToxicFrog>
If not for that I could just...oh hey, cunning plan
19:25 GeekSoldier is now known as GeekSoldier|Bed
19:36
<@ToxicFrog>
Hah, victory!
19:36
<@ToxicFrog>
In a mere 45 lines of horrible regex-covered code of agony!
19:36 Chalcedon [~Chalcedon@Nightstar-15747.ue.woosh.co.nz] has joined #code
19:36 mode/#code [+o Chalcedon] by ChanServ
19:37 AnnoDomini [~farkoff@Nightstar-29129.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
19:38 AnnoDomini [~farkoff@Nightstar-29129.neoplus.adsl.tpnet.pl] has joined #Code
19:46
<@ToxicFrog>
On the plus side, it's given me this:
19:46
<@ToxicFrog>
gtk = setmetatable({}, {
19:46
<@ToxicFrog>
__index = function(self, key)
19:46
<@ToxicFrog>
return function(...)
19:46
<@ToxicFrog>
return real_gtk(table.concat({ "gtk_"..key, ... }, " "))
19:46
<@ToxicFrog>
end
19:46
<@ToxicFrog>
end
19:46
<@ToxicFrog>
})
19:57 Chalcedon [~Chalcedon@Nightstar-15747.ue.woosh.co.nz] has quit [Quit: gone]
20:35
< Vornicus-Latens>
I don't remember ever seeing /bin/env anywhere.
20:53 Vornicus-Latens is now known as Vornicus
20:54
<@ToxicFrog>
Odd.
20:54 * ToxicFrog tries to figure out why bind isn't working
21:52
<@ToxicFrog>
...because the BUILD* environment variables are unset.
21:52 * ToxicFrog facedesks.
21:56 GeekSoldier|Bed [~Rob@Nightstar-4186.pools.arcor-ip.net] has quit [Ping Timeout]
22:04
<@ToxicFrog>
Woot!
22:04 * ToxicFrog successfully creates something in Glade and feeds it to Lua and GTK-Server to get automatic event bindings
22:20 Netsplit Blargh.CA.US.Nightstar.Net <-> DeepThought.NY.US.Nightstar.Net quits: EvilDarkLord, AnnoDomini, +KarmaBot, @ToxicFrog, Vornicus, @Pi, NSGuest-14, @jerith, Raif, @Chalain
22:26 Netsplit over, joins: EvilDarkLord, NSGuest-14, Chalain, jerith, +KarmaBot, Pi, Vornicus, Raif, ToxicFrog, AnnoDomini
22:26 mode/#code [+o TheWatcher] by ChanServ
22:26 mode/#code [+o Serah] by ChanServ
22:26 mode/#code [-o ReivZzz] by ChanServ
22:30 * ToxicFrog adds masking by arbitrary properties to glade_build_widget_tree
22:37 mode/#code [+o AnnoDomini] by ChanServ
22:37 mode/#code [+ooo Raif ReivZzz Vornicus] by AnnoDomini
22:37 mode/#code [+o EvilDarkLord] by AnnoDomini
22:52 Netsplit Blargh.CA.US.Nightstar.Net <-> DeepThought.NY.US.Nightstar.Net quits: @EvilDarkLord, @AnnoDomini, +KarmaBot, ToxicFrog, @Vornicus, Pi, NSGuest-14, jerith, @Raif, Chalain
22:53 Netsplit over, joins: Chalain
22:53 Netsplit over, joins: @jerith, @EvilDarkLord, NSGuest-14, KarmaBot, @Pi, @Vornicus, @Raif, @ToxicFrog, @AnnoDomini
22:53 ServerMode/#Code [+oo jerith Chalain] by Troika.TX.US.Nightstar.Net
22:53 ServerMode/#Code [+v KarmaBot] by Troika.TX.US.Nightstar.Net
22:53 Netsplit over, joins: EvilDarkLord, NSGuest-14, ToxicFrog
22:53 mode/#code [+o Chalain] by ChanServ
22:53 mode/#code [+o jerith] by ChanServ
22:53 mode/#code [+v KarmaBot] by ChanServ
22:53 mode/#code [+o Pi] by ChanServ
22:53 mode/#code [+o Vornicus] by ChanServ
22:53 mode/#code [+o AnnoDomini] by ChanServ
22:53 mode/#code [-o Raif] by ChanServ
22:53 mode/#code [+o TheWatcher] by ChanServ
22:53 mode/#code [+o Serah] by ChanServ
22:58 mode/#code [+oooo EvilDarkLord NSGuest-14 Raif ToxicFrog] by AnnoDomini
23:16 EDL [~EDL@Nightstar-28403.proxy2.balk.dk] has joined #code
23:21 EDL [~EDL@Nightstar-28403.proxy2.balk.dk] has quit [Quit: Leaving]
23:35 ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has quit [Operation timed out]
--- Log closed Tue Jul 17 00:00:17 2007
code logs -> 2007 -> Mon, 16 Jul 2007< code.20070715.log - code.20070717.log >