code logs -> 2012 -> Mon, 23 Jul 2012< code.20120722.log - code.20120724.log >
--- Log opened Mon Jul 23 00:00:47 2012
00:39 * Vornicus wanders the world looking at IRC bot frameworks
00:42
<~Vornicus>
Twisted.words: this doesn't look like IRC
00:44 Vasi is now known as rms
00:50
<~Vornicus>
gnah. do any of these not suck.
00:56
< Rhamphoryncus>
no
00:57
<~Vornicus>
righto.
02:06 Kindamoody[zZz] is now known as Kindamoody
02:22 * McMartin sets about porting his Hex Inverter core to Java for Android purposes.
02:22 Attilla [Obsolete@Nightstar-71866fd9.as43234.net] has quit [Ping timeout: 121 seconds]
02:23
<&McMartin>
Kind of sad that this is actually the path of least resistance - I'd used C++ to prototype the algorithms with, and my C++ idioms are heavily Java-influenced (no MI, heavy use of STL collections) so the port is easy.
02:25
<&McMartin>
Though there is always the obnoxious boilerplate. =(
02:25
<&McMartin>
C++ is more casual about letting you skip the boring parts.
02:47
<&McMartin>
20 minutes with Java and I'm already remembering why I'm sick of it~
03:04 SmithKurosaki [smith@Nightstar-ad56e792.home1.cgocable.net] has joined #code
03:05
< rms>
Is it the impossible to debug "can't find class" errors?
03:10
<&McMartin>
No, it's the endles manual boilerplate bullshit that C++ doesn't need to work acceptably and that all the classier languages totally automate by being smug and immutable.
03:12 cpux [cpux@Nightstar-c5874a39.dyn.optonline.net] has quit [[NS] Quit: Well, most things get better when I kick them!]
03:27
<~Vornicus>
What kind of manual boilerplate bullshit are we talking here?
03:31
<&McMartin>
.equals and .hashCode
03:31
<&McMartin>
accessors
03:31
<~Vornicus>
oh, .equals
03:32
<&McMartin>
comparators if you want them to fully participate in collections (executive summary: I don't!)
03:33
<&McMartin>
On the plus side, I almost have my AI thunderdome completely ported.
04:00 Ariii [Ariii@Nightstar-f695463f.cicril.sbcglobal.net] has quit [Connection closed]
04:01 Ariii [Ariii@Nightstar-f695463f.cicril.sbcglobal.net] has joined #code
04:41 SmithK [smith@Nightstar-ad56e792.home1.cgocable.net] has joined #code
04:43 SmithKurosaki [smith@Nightstar-ad56e792.home1.cgocable.net] has quit [Ping timeout: 121 seconds]
04:47 SmithK is now known as SmithKurosaki
04:54 SmithKurosaki [smith@Nightstar-ad56e792.home1.cgocable.net] has quit [Ping timeout: 121 seconds]
05:07 iospace is now known as iospacedout
05:48 Ariii [Ariii@Nightstar-f695463f.cicril.sbcglobal.net] has quit [Client closed the connection]
07:12 You're now known as TheWatcher
07:31
< froztbyte>
Vornicus: https://launchpad.net/eridanus
07:32
< froztbyte>
its followup is being written in haskell
07:36 Vash [Vash@Nightstar-e8057de2.wlfrct.sbcglobal.net] has quit [[NS] Quit: I lovecraft Vorn!]
07:39
<~Vornicus>
froztbyte: wootnauts
07:41 himi [fow035@D741F1.243F35.CADC30.81D435] has quit [Ping timeout: 121 seconds]
07:41
< froztbyte>
Vornicus: the devs are also pretty clued up, and should respond at somewhatever time
07:42
< froztbyte>
you want to contact them directly, hop onto shadowfire
07:42
< froztbyte>
and yeah, t.w is more like the bones for some sort of chat implementation, than a framework itself
07:43
< froztbyte>
you still get to design the skeleton and muscular system
07:47
<~Vornicus>
Nice.
07:47 * Vornicus will have to build his model first
08:13 You're now known as TheWatcher[afk]
09:04 Nemu [NeophoxProd@Nightstar-7e9f4d2f.asahi-net.or.jp] has quit [Connection reset by peer]
09:05 Nemu [NeophoxProd@Nightstar-7e9f4d2f.asahi-net.or.jp] has joined #code
09:15 Attilla [Obsolete@Nightstar-71866fd9.as43234.net] has joined #code
09:48
<&jerith>
Oh, is Vorn writing a Twisted-based ircbot?
09:51
<&jerith>
Here's a rather more bare-bones example. All it does is translate messages to vumi's internal message format and back: https://github.com/praekelt/vumi/blob/develop/vumi/transports/irc/irc.py
09:52
<&jerith>
Vornicus: If you need any help with this stuff, feel free to ping me. :-)
10:03 You're now known as TheWatcher
10:14 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
10:14 mode/#code [+o himi] by ChanServ
10:36 Reiver [reiverta@5B433A.3CF6C7.F35D68.E05346] has joined #code
10:39 RichyB [MyCatVerbs@Nightstar-3b2c2db2.bethere.co.uk] has joined #code
10:39
< froztbyte>
jerith: he was searching, then I pointed him at eridanus
10:39
< froztbyte>
vumi might make more sense though
10:39
< froztbyte>
it's a bit lighter too
10:39 * froztbyte didn't really think of it as a bot yet
10:39
<&jerith>
Vumi's pretty heavyweight, actually.
10:40
< froztbyte>
well, I'm talking install procedure here
10:40
< froztbyte>
eridanus /is/ a bit unfriendly to install still
10:40
<&jerith>
It is.
10:40
< froztbyte>
vumi's far easier to get going
10:40
<&jerith>
Vumi needs three external deps before starting, though.
10:41
< froztbyte>
but yeah, that's a solvable problem when I get more RAM in my home server
10:41
<&jerith>
I wouldn't recommend it just for ircbots.
10:45 Kindamoody is now known as Kindamoody|out
10:47
< Reiver>
man, I keep forgetting to check out that irc client :/
10:48
<@TheWatcher>
Which?
10:50 You're now known as TheWatcher[d00m]
10:55 Reiver [reiverta@5B433A.3CF6C7.F35D68.E05346] has quit [Ping timeout: 121 seconds]
11:02 Reiver [reiverta@5B433A.F67240.C2CC9E.90F5EF] has joined #code
11:03
< Reiver>
TheWatcher: Quassel, IIRC
11:03
< Reiver>
Cient/server cache thingy, without the pain and agony of learning irssi :P
11:04
<@TheWatcher[d00m]>
Bah
11:05
<@TheWatcher[d00m]>
Well, okay, maybe the learning curve is a leeetle steep
11:06
< Reiver>
'Oh god, why are my eyes full of spiders giving birth to baby spiders that are nesting in my brain' can, in some circles, be considered 'steep', yes.
11:10
< sshine>
is that irssi?
11:13
< Reiver>
The reference? Indeed.
11:29 iospacedout is now known as iospace
11:33 Reiver [reiverta@5B433A.F67240.C2CC9E.90F5EF] has quit [[NS] Quit: ]
11:41 Reiver [Reiver@5B433A.F67240.C2CC9E.90F5EF] has joined #code
11:50 Attilla [Obsolete@Nightstar-71866fd9.as43234.net] has quit [[NS] Quit: ]
11:50
< sshine>
I'm juggling with some programming paradigm terminology here
11:52
< sshine>
imperative, declarative, applicative, functional, value-oriented, state-oriented,
11:53
< sshine>
declarative is supposed to be a superset of functional and logical
11:53
< sshine>
imperative is supposed to be synonymous to state-oriented
11:53
< sshine>
applicative is supposed to be synonymous with functional, I think.
11:55
< sshine>
but among my professors, the terminology expert (in Danish, but still) puts applicative on the same taxonomic level as imperative...
11:55
< sshine>
maybe this is because you in logic programming apply predicates rather than functions, and so application is a more general term.
11:56
< sshine>
the reason I wonder about all of this is because I'm writing a template for Wikipedia that summarizes these, and I'd like to use the terms that are best suitable and not the most popular. e.g. saying functional is the primary alternative to imperative is neglecting a bigger hierarchy of paradigms.
11:57
< sshine>
so: would you say that applicative or declarative best describes the main alternative to imperative programming?
11:59
< sshine>
and is "logical" something you can call a language like Prolog? I mean, "functional" means "it extensively uses functions" and not "it works", so "logical" could mean "it extensively uses formal logic" and not "it is (tauto)logical"
12:01 Rhamphoryncus [rhamph@Nightstar-5697f7e2.abhsia.telus.net] has quit [Client exited]
12:03 You're now known as TheWatcher
12:04 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Connection closed]
12:05 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
12:05 mode/#code [+o himi] by ChanServ
12:10
<@TheWatcher>
So, I have just learnt something midly mind-boggling.
12:11
<@TheWatcher>
Apparently, in India, it is the norm for students taking CS degrees to do no practical work whatsoever
12:11
<&jerith>
Um.
12:11
<&jerith>
That would explain some stuff, though.
12:12
<@TheWatcher>
They learn to program from books, are examined on that knoweldge, but apparently never actually /use/ the languages involved. Which just breaks my brain, frankly.
12:14
<@TheWatcher>
It certainly exaplins why the indian postgrads we get are so overwhelmed in the first 6 weeks or so - because our taught postgrad programmes are very programming heavy
12:14
<&jerith>
Programming is a craft. It requires lots of practice to get right.
12:15
<@TheWatcher>
Indeed
12:15
<&jerith>
I've been practicing for close to a quarter of a century, and I don't yet consider myself a master.
12:16
<&jerith>
(The first decade of that doesn't /really/ count. I was mucking about in BASIC.)
12:17
< RichyB>
jerith, arguably it does and pity the poor people who haven't had the 10 years of mucking around in BASIC to build up instincts.
12:19 You're now known as TheWatcher[d00m]
12:20
<@TheWatcher[d00m]>
And now, to go instruct said students on the art of "looking at the error log in Eclipse"
12:22 Orthia [orthianz@3CF3A5.E1CD01.C6689C.33956A] has quit [Ping timeout: 121 seconds]
13:01 iospace is now known as io\gone
13:15 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
13:29 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
13:29 mode/#code [+o himi] by ChanServ
13:33 Attilla [Obsolete@Nightstar-71866fd9.as43234.net] has joined #code
13:42 Rev [Reiver@5B433A.3CF6C7.2773B8.33A591] has joined #code
13:43 Reiver [Reiver@5B433A.F67240.C2CC9E.90F5EF] has quit [Ping timeout: 121 seconds]
13:47 Rev [Reiver@5B433A.3CF6C7.2773B8.33A591] has quit [Ping timeout: 121 seconds]
13:48 Reiver [Reiver@5B433A.3CF6C7.2773B8.33A591] has joined #code
14:13 You're now known as TheWatcher
14:23 Reiver [Reiver@5B433A.3CF6C7.2773B8.33A591] has quit [Connection reset by peer]
14:31 io\gone is now known as iospace
14:38 You're now known as TheWatcher[afk]
15:47 Ariii [Ariii@Nightstar-f695463f.cicril.sbcglobal.net] has joined #code
16:26 SmithK [smith@2D9871.28B611.AF4103.1BCEC0] has joined #code
16:44
< Tarinaky>
"Alan M. Turing thought about criteria to settle the question of whether Machines Can Think, a question of which we now know that it is about as relevant as the question of whether Submarines Can Swim."
16:48
< sshine>
Tarinaky, Dijkstra!
16:49
< sshine>
(I only knew that because I'm translating CS articles on the Danish Wikipedia.)
16:49
< Tarinaky>
Heh.
16:49
< Tarinaky>
Turned up in my Facebook feed.
16:49
< sshine>
so we accept that they can think, but do they dream of electric sheep?
17:31 Ariii [Ariii@Nightstar-f695463f.cicril.sbcglobal.net] has quit [Connection closed]
17:49 SmithK [smith@2D9871.28B611.AF4103.1BCEC0] has quit [Ping timeout: 121 seconds]
18:03 Kindamoody|out is now known as Kindamoody
19:28 Kindamoody is now known as Kindamoody[zZz]
19:41 Netsplit *.net <-> *.split quits: @Tamber, iospace, froztbyte, jerith
19:43 Netsplit over, joins: @Tamber, &jerith, iospace, froztbyte
21:21 Ariii [Ariii@Nightstar-f695463f.cicril.sbcglobal.net] has joined #code
21:50 RichyB [MyCatVerbs@Nightstar-3b2c2db2.bethere.co.uk] has quit [[NS] Quit: Leaving]
21:56 iospace is now known as io\gone
22:01 Attilla [Obsolete@Nightstar-71866fd9.as43234.net] has quit [[NS] Quit: ]
22:04 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
22:43 Moltare [Moltare@583787.FF2A18.190FE2.4D81A1] has joined #code
22:43
< Moltare>
Evening, gents
22:43
<&McMartin>
GENTLEMAN.
22:43
< Moltare>
Over in the corner, fast asleep.
22:44
< Moltare>
Mind if I ask about a Java woe I'm having?
22:44
<&McMartin>
Go for it.
22:46 gnolam [lenin@Nightstar-202a5047.priv.bahnhof.se] has joined #code
22:46
< Moltare>
I've got a String variable called timeStamp. It consists entirely of a figure of approximately 1.3x10^12
22:47
<&McMartin>
So it's a string containing a large number.
22:47
<&McMartin>
OK.
22:47
< Moltare>
I'm trying to turn this into a long, using Long.valueOf(text) to make a Long and then returning l.longValue()
22:47
< Moltare>
A certain amount of investigation suggests this is not unreasonable
22:47
< Moltare>
But when I do so I get a numberformatexception
22:48
<&McMartin>
Hmmm.
22:48
< Moltare>
Outputting just the string suggests it's what I think it is
22:48
<&McMartin>
Hmm.
22:48
< Moltare>
The value quoted in the exception is the same
22:48
<&McMartin>
Is it choking on whitespace?
22:48
<&McMartin>
Can you quote the value?
22:49
<&McMartin>
Because this does work:
22:49
<&McMartin>
user=> (.longValue (Long/valueOf "17391823740123"))
22:49
<&McMartin>
17391823740123
22:49
< Moltare>
1343079347576, last time
22:49
<&McMartin>
However!
22:49
<&McMartin>
user=> (.longValue (Long/valueOf "17391823740123 "))
22:49
<&McMartin>
NumberFormatException For input string: "17391823740123 " java.lang.NumberFormatException.forInputString (NumberFormatException.java:65)
22:50
< Moltare>
I'm reasonably convinced there's no whitespace, but~
22:51
< Moltare>
This value originally came off an NTP time server as a long. I cast it to a String and write it to an output file for later (time stamp of last session exit)
22:51
<&McMartin>
Hrm.
22:51
< Moltare>
I then load it back up next time from that file into the timeStamp variable as noted above
22:51
<&McMartin>
I'd do a dump of the string character by character to make sure there's no end-of-file-character BS or nulls or newlines or whatever.
22:51
< Moltare>
So if there's some dodgy character in there that I don't see in LogCat or in the exception message
22:51
<&McMartin>
=^_^=
22:52
< Moltare>
Fair enough, that'll be my next step~
22:52
< ToxicFrog>
Depending on how you're reading it from the file I could easily see a newline sneaking in there, and then the exception message reporter conveniently stripping that to keep things readable.
22:52
< ToxicFrog>
So, yeah, what McM said.
22:53
<&McMartin>
But yeah, some brief experimentation says your core idea here is sound.
22:53
<&McMartin>
(One thing Clojure is pretty great for is as a JVM REPL)
22:54
< sshine>
right
22:54
< sshine>
I enjoyed Jython for that as well.
22:58
< Moltare>
You're quite right, there's something nasty on the end of that String
23:01
< Moltare>
Looks like a newline, charas. Does trim() clean those as well as whitespace?
23:02 * Moltare will find out shortly~
23:03
< Moltare>
Yep :) and now it doesn't die. Thanks, lads
23:07
<&McMartin>
No worries
23:24 You're now known as TheWatcher
23:37 io\gone is now known as iospace
23:40
< Moltare>
And of course the thing works flawlessly on the IDE emulator, and dies horribly on my state of the art Galaxy S3 ??
23:40
<@TheWatcher>
Naturally
23:40
< ToxicFrog>
:embeddedsystems:
23:40
<&McMartin>
Is that any different from :scigonk:?
23:41
< ToxicFrog>
There's more pratfalls and dodgy documentation~
23:41 himi [fow035@D741F1.243F35.CADC30.81D435] has joined #code
23:41 mode/#code [+o himi] by ChanServ
23:42
< Moltare>
It works some of the time ?? it's just as soon as the NTP server du jour takes more than the merest gnat's crotchet to respond, the real device decides the app's frozen
23:42
< Moltare>
Despite that request being in its own worker thread
23:42
< ToxicFrog>
Oh god
23:43
<&McMartin>
Yarghborgle
23:43 * ToxicFrog has Blackberry flashbacks
23:45
< ToxicFrog>
In which blocking the main thread for any reason blocks the entire app, which is bad if - for example - you have a background thread that is required to maintain a 50ms heartbeat to a robot that goes insane if it thinks it's lost connection to the controller.
23:45
< Moltare>
Yep, Android apps die the moment they think the main thread's hung
23:46
<&McMartin>
Elsenet today someone mentioned the article "Android Threading: AND YET YOU DECIDED TO DO IT ANYWAY"
23:47
< Moltare>
?\O_o/?
23:53 Attilla [Obsolete@Nightstar-71866fd9.as43234.net] has joined #code
--- Log closed Tue Jul 24 00:00:02 2012
code logs -> 2012 -> Mon, 23 Jul 2012< code.20120722.log - code.20120724.log >

[ Latest log file ]