code logs -> 2007 -> Sat, 01 Dec 2007< code.20071130.log - code.20071202.log >
--- Log opened Sat Dec 01 00:00:30 2007
00:02 Vornicus is now known as Vornicus-Latens
00:15 GeekSoldier|dapper [~Rob@Nightstar-4541.pools.arcor-ip.net] has joined #code
00:15 GeekSoldier|dapper is now known as GeekSoldier|bed
--- Log opened Sat Dec 01 01:54:14 2007
01:54 TheWatcher [~chris@Nightstar-29731.dsl.in-addr.zen.co.uk] has joined #code
01:54 Irssi: #code: Total of 17 nicks [9 ops, 0 halfops, 0 voices, 8 normal]
01:54 mode/#code [+o TheWatcher] by ChanServ
01:54 Irssi: Join to #code was synced in 43 secs
12:58
< MyCatVerbs>
Good. Now make an imperative one, too. :D
12:59
<@AnnoDomini>
Eh?
13:00
< MyCatVerbs>
/me silly.
13:01 * AnnoDomini doesn't understand. Enlighten?
13:03
< MyCatVerbs>
Functional vs. imperative languages.
13:03
< Vornicus>
Functional and imperative at two main kinds of programming languages
13:03
< MyCatVerbs>
It's a retarded joke because you wrote it in an imperative programming language anyway.
13:04
<@AnnoDomini>
Okay. Should I JFGI, or would you tell me what the difference is?
13:05
< MyCatVerbs>
Functional languages are languages based mainly on lambda-calculus, rather than on the Random Access Machine model.
13:06
< MyCatVerbs>
e.g. FORTRAN, C, Pascal and Java all model a random access machine - you have contiguous block(s) of integer-indexed memory which you can access any element of in roughly the same amount of time as you can access any other element.
13:07
<@AnnoDomini>
I see.
13:07
< MyCatVerbs>
Functional languages are things like Lisp, ML and Haskell, where functions are first class values - that is, you can write functions that take functions as arguments, and return functions as their result.
13:08 * AnnoDomini boggles at that.
13:08
<@TheWatcher>
(although I note you can pull the same trick in imperative languages if you know what you're doing)
13:08
< MyCatVerbs>
It hurt my head, too.
13:09
< Vornicus>
Functional languages tend to have functions but not procedures - it's like declaring every method "final" in java.
13:10
< MyCatVerbs>
AnnoDomini: also, in functional programming, you don't modify values in-place - you never change data structures directly, instead you create new ones which are altered versions of the old ones.
13:11
< MyCatVerbs>
(And then you keep the reference to the new data structure and discard the reference to the old data structure, if you feel like doing that. >>)
13:12
<@AnnoDomini>
Sounds like a hassle.
13:13
< MyCatVerbs>
It's awesome for multiprocessing, because you can implement it so that the different CPUs don't tread on one anothers' toes.
13:15
< MyCatVerbs>
It often can be a hassle for performance because it's no longer so easy to make data structures with quite the same algorithmic complexity as you can get with a random-access machine, but for actually getting work done, it's fine.
13:16
< MyCatVerbs>
Usually a bored PHD can get you something that's within a log(n) factor or so of the random-access structure, but the people building those languages do give you, ah, imperative escape hatches, just in care you need them.
13:26
< MyCatVerbs>
(For actually getting shit done, it's a huge headache until you wrap your head around it, then it's totally fine.)
13:27
< MyCatVerbs>
(It's actually a lot easier to reason about purely functional programs than about imperative ones, because you have the property of referential transparency - that is, you never have to consider the context of a particular function call to work out what it'll do, only its arguments' values.)
13:28
< MyCatVerbs>
(As in, unless you're deliberately using "unsafe" constructs, algebraic substitution laws always work exactly as you'd expect them to.)
13:46 gnolam [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has joined #Code
13:46 mode/#code [+o gnolam] by ChanServ
15:31 * AnnoDomini is making the clock display actually readable.
15:44
<@ToxicFrog>
And then there's functional/imperative mixes, which have functional features (first-class and high-order functions, lambdas, and whatnot) but no referential transparency or so forth.
15:44
<@ToxicFrog>
Which are my preferred flavour.
15:45
< Vornicus>
What's "high-order" functions?
15:45
<@gnolam>
The entspeak is strong within this one.
15:45
< Vornicus>
Yay ents
15:45
<@ToxicFrog>
A high-order function is a function that recieves functions as arguments, returns them as results, or both.
15:46
< Vornicus>
Ah.
15:46
< Vornicus>
then, Python is a mix.
15:47
<@ToxicFrog>
Yes. Although its lambdas are weak, which makes me ;.;
15:48
< Vornicus>
Then there's declarative languages (Inform 7 and prolog, for instance)
15:54
<@AnnoDomini>
http://i13.tinypic.com/6ptzql3.jpg <- Now to only figure out why those damned colon labels won't have black background when I tell them to.
15:55
<@ToxicFrog>
Java ;.;
15:55 * GeekSoldier nods sagely.
16:02 * AnnoDomini can't stand most of the Java IDEs. They're slow, bugridden and then there's the matter of Arcane Generated Code. Just about the only IDE which was nice enough was RealJ, even though it was heavy on bugs.
16:04
<@ToxicFrog>
And yet you use it.
16:05
<@AnnoDomini>
No? I write in Notepad2 and compile with the help of batch files.
16:05
<@ToxicFrog>
It == Java.
16:06
<@AnnoDomini>
I don't dislike Java.
16:06
<@AnnoDomini>
Also, I use it because we're damned well required to use it.
16:06
<@ToxicFrog>
Aah.
16:08
<@McMartin>
Hoom
16:09
<@McMartin>
(Also, find . -name \*.java | xargs javac works pretty well in a pinch if you don't have a script to automate Basic Ant Files)
16:09
<@McMartin>
(Which I don't, and really should)
16:36
<@AnnoDomini>
Yay, clock is pretty much finished. It's something I can show the teacher now, without being given away by its crappiness that I'm using a very cheap way to make the graphics.
16:36
<@EvilDarkLord>
Do you have to show the teacher the code behind it at any point?
16:37
<@McMartin>
TAs do read code.
16:37
<@McMartin>
And they *always* check filesystems.
16:37 * AnnoDomini laughs out loud.
16:37
<@AnnoDomini>
I'll give you an example of how he checks our stuff.
16:38
<@McMartin>
If your task is "render X", submitting a "display this BMP" file will be noticed, even by the autograder.
16:38
< Vornicus>
Anno: what, you're making the graphics using the font idea I gave you?
16:38
< Vornicus>
That is probably perfectly okay.
16:38
<@AnnoDomini>
Yes.
16:38
<@AnnoDomini>
"Mr. X? Have you managed to get the program going." "Yes." "Okay, I believe you."
16:38
<@AnnoDomini>
s/./?
16:40
<@AnnoDomini>
I'm using pipes for vertical segments and those long hyphens for horizontal segments.
16:40
< Vornicus>
Ah.
16:40
< Vornicus>
That's not so bad.
16:42
<@AnnoDomini>
My group is mainly from the "Informatics in Programming" specialty, rather than the other one which is "Computer Programming and Information Networks". We're getting off very easy where programming is concerned.
16:43
<@AnnoDomini>
The teacher gave identical problems for us to solve on the first lesson - some basic thing with operations on arrays.
16:43
<@AnnoDomini>
Best times: CPaIN - 5 minutes. IiP - 1.5 hours.
16:44
<@EvilDarkLord>
Sounds like one person in the course does it for more than because it's required to.
16:45
<@AnnoDomini>
IIRC, the task was to search a table for the biggest sum of two adjacent values, with the collumns looping over to the other side next row.
16:46
<@AnnoDomini>
EvilDarkLord: I fail to parse your sentence.
16:46
<@McMartin>
... That sounds like you'd have to actively try to make it not be O(n)
16:46
<@McMartin>
AD: He means that somebody's attacking the problems for fun instead of merely as an assignment
16:46
<@AnnoDomini>
In any case, CPaIN's mostly accomplished the task in 2 hours. IiN mostly didn't.
16:47
<@AnnoDomini>
-apostrophe
16:47
<@McMartin>
Oh, wait
16:47
<@McMartin>
You mean writing time.
16:47
<@McMartin>
Not run time.
16:47
<@AnnoDomini>
Yes.
16:48
<@McMartin>
Therein lies The Puzzlement.
16:48
<@McMartin>
And yeah, I think I could whip that out within a half an hour.
16:48
<@AnnoDomini>
This was on boxes which actually ran, rather than in the Room of Doom, where most boxes take the whole 2 hours to boot up.
16:49
<@McMartin>
Yeah, I was going to say, 15 minutes times or divided by 2 depending on what kind of support system I have.
16:49
<@AnnoDomini>
Support system?
16:49
<@McMartin>
"You will be writing this in Brainfuck on an Amiga" vs BASIC on a C64 vs C-or-Java-on-Unix.
16:49
< GeekSoldier>
lol.
16:50
<@McMartin>
In roughly increasing order of difficulty for me~
16:50
<@McMartin>
Er, decreasing
16:50 * jerith giggles.
16:50
<@jerith>
Brainfuck's semantics shouldn't change at all by platform.
16:50
<@McMartin>
Yes, but I've never used AmigaOS.
16:50
<@jerith>
And it's not like you have any libraries to learn... :-P
16:50
< GeekSoldier>
hardcore: coding in befunge using ee.
16:51
<@McMartin>
And I'd have to implement arrays from scratch.
16:51
<@jerith>
Ah.
16:51
<@McMartin>
The problem being "Here's a 2D array, find the largest sum of two adjacent values"
16:51
<@AnnoDomini>
This was Java on Win2K, using either NetBeans, eclipse or Notepad.
16:52
<@EvilDarkLord>
So, adjacent horizontally or vertically as normal, not wraparound on the next column?
16:53
<@McMartin>
Eclipse doesn't start getting really nice until you're dealing with at least 5 or 6 thousands lines of code with significant maintenance burdens
16:53
<@AnnoDomini>
Wraparound. (K,N) is adjacent to (K+1,0). I think.
16:53 * McMartin would probably do it with three counters running through the table
16:54 * AnnoDomini did it with two nested loops.
16:54 * EvilDarkLord tries to oneliner that in Python.
16:54
<@jerith>
Eclipse is awesome for Java ravioli code.
16:54
<@EvilDarkLord>
What is java ravioli code?
16:54
<@McMartin>
Like spaghetti code, but with slightly better encapsulation.
16:55
<@jerith>
Ravioli code is like spaghetti code, only because of strict typing and whatnot, more clumpy.
16:55
<@McMartin>
It's got excellent code-search capability and awe-inspiring refactoring code.
16:58
<@EvilDarkLord>
Is this specific for Java or does it carry over into the various language plugins like PyDev?
16:59
< GeekSoldier>
It will also do it in Pydev.
17:07
<@McMartin>
I've only used it in Java, though, so I can't speak to it
17:07
< GeekSoldier>
blew my mind when I first saw it.
17:17 You're now known as TheWatcher[afk]
17:50 * AnnoDomini twitches.
17:51
<@AnnoDomini>
This is one of the reasons I hate NetBeans - it gives me a helpful message... but the message doesn't include linebreaks, and the window has a limited size to which I can extend it, making it impossible to read the whole message.
17:55 * AnnoDomini googles for the rest of the message.
17:56
<@EvilDarkLord>
You might be able to select-scroll through the message if you can select it.
17:57
<@AnnoDomini>
I can't select it.
17:57
<@ToxicFrog>
Hmm. Increasingly, it seems that I'm just reimplementing metalua with a different interface.
17:57
<@ToxicFrog>
Maybe I'd be better off just modifying metalua.
18:24 GeekSoldier [~Rob@Nightstar-4541.pools.arcor-ip.net] has quit [Quit: Praise "BOB"!]
18:31 * AnnoDomini is not sure what constitutes a 'property' where JavaBeans are concerned.
18:33 GeekSoldier [~Rob@Nightstar-4541.pools.arcor-ip.net] has joined #code
18:35 You're now known as TheWatcher
18:42
<@AnnoDomini>
Do I have to write a setter/getter for every damned label I put there?
--- Log opened Sat Dec 01 09:38:47 2007
09:38 TheWatcher [~chris@Nightstar-29731.dsl.in-addr.zen.co.uk] has joined #code
09:38 Irssi: #code: Total of 18 nicks [10 ops, 0 halfops, 0 voices, 8 normal]
09:38 mode/#code [+o TheWatcher] by ChanServ
09:39 Irssi: Join to #code was synced in 49 secs
09:49
<@McMartin>
AnnoDomini: I thought the point of Beans was to autogenerate the getters and setters.
09:50
<@AnnoDomini>
From the specifications, it only says that they're required.
09:51
<@AnnoDomini>
Maybe some IDEs generate them.
09:51
<@McMartin>
Setters are optional for read-only properties
09:51
<@McMartin>
But AFAIK "using systematically named methods instead of public fields" is the full extent of what JavaBeans is.
09:52
<@McMartin>
The idea being that if everyone plays along, then you can write one tool using java.lang.reflect to handle all such classes uniformly.
09:54
<@AnnoDomini>
For some reason, NetBeans fails to detect my thing as such. :(
09:55
<@McMartin>
I have no idea what NetBeans is or how it relates to JavaBeans
09:55
<@AnnoDomini>
I did put the manifests, and I'm pretty sure I did them correctly.
09:55
<@McMartin>
I do know that Enterprise JavaBeans have nothing at all to do with JavaBeans in any form.
09:55
<@AnnoDomini>
McMartin: An IDE. We need to show that it's a bean through a NetBeans palette.
09:56
<@AnnoDomini>
In other words, we need to make something that is drag-n-droppable.
09:56
<@McMartin>
... You've just lost me entirely.
09:57
<@AnnoDomini>
NetBeans has a graphical interface for forms. It has a palette from which you can select things like JLabel or Button and drag them onto the form.
09:58
<@AnnoDomini>
I need to do a component like that.
09:58
<@McMartin>
Ah, interesting.
09:58
<@McMartin>
OK, I've clearly never done anything like that.
10:08 AnnoDomini [AnnoDomini@Nightstar-28976.neoplus.adsl.tpnet.pl] has quit [Quit: Tradition may be defined as an extension of the franchise. Tradition means giving votes to the most obscure of all classes, our ancestors. It is the democracy of the dead. Tradition refuses to submit to the small and arrogant oligarchy of those who merely happen to be walking about. All democrats object to men being disqualified by the accident of birth; tradition objects to their being disqualified by the accident of death.]
10:11 AnnoDomini [AnnoDomini@Nightstar-28976.neoplus.adsl.tpnet.pl] has joined #Code
10:11 mode/#code [+o AnnoDomini] by ChanServ
10:30 Forj [~Forj@Nightstar-5330.worldnet.co.nz] has joined #code
10:30 mode/#code [+o Forj] by ChanServ
20:13 Derakon[AFK] is now known as Derakon
20:52 * Vornicus does battle with setup code.
20:52
<@McMartin>
> SLAP FISH
20:52
<@McMartin>
> BACKHAND FISH
20:52
<@McMartin>
> PUNCH FISH
20:53
< Vornicus>
Is this the fish-slapping dance?
20:53
<@EvilDarkLord>
> GET FISH CORPSE
21:10 AnnoDomini [AnnoDomini@Nightstar-28976.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
21:15 AnnoDomini [AnnoDomini@Nightstar-29797.neoplus.adsl.tpnet.pl] has joined #Code
21:15 mode/#code [+o AnnoDomini] by ChanServ
21:47 * Vornicus does more battle with the setup code.
21:47 * Vornicus is not winning this battle.
21:55 * Attilla gives Vornicus a +1 Keyboard
22:14 Derakon is now known as Derakon[AFK]
22:39 Derakon[AFK] is now known as Derakon
--- Log closed Sun Dec 02 00:00:01 2007
code logs -> 2007 -> Sat, 01 Dec 2007< code.20071130.log - code.20071202.log >