--- Log opened Fri Apr 04 00:00:31 2014 |
00:32 | | macdjord|wurk is now known as macdjord |
00:57 | | himi [fow035@Nightstar-q9amk4.ffp.csiro.au] has joined #code |
00:57 | | mode/#code [+o himi] by ChanServ |
01:00 | | Turaiel[Offline] is now known as Turaiel |
01:11 | | Derakon [Derakon@Nightstar-5fqf0m.ca.comcast.net] has quit [Operation timed out] |
01:16 | | Derakon_ [Derakon@Nightstar-5fqf0m.ca.comcast.net] has joined #code |
01:30 | < Xon> | http://blogs.msdn.com/b/dotnet/archive/2014/04/02/announcing-net-native-preview. aspx |
01:30 | < Xon> | hmmm |
01:47 | | Derakon_ is now known as Derakon |
02:37 | <@Reiv> | Azash: I point out the idea, in principle, is still not actually a bad one :p |
03:14 | | Syloq [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds] |
03:22 | | Syloq [Syloq@Nightstar-mbk.c3p.254.173.IP] has joined #code |
03:22 | | mode/#code [+o Syloq] by ChanServ |
04:30 | <@froztbyte> | we had a couple of EE folks here, right? |
04:30 | <@froztbyte> | I suspect http://siliconexposed.blogspot.com/2014/03/getting-my-feet-wet-with-invasive.htm l might have a lot of appreciation |
04:31 | | VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [[NS] Quit: Program Shutting down] |
04:34 | | Kindamoody[zZz] is now known as Kindamoody |
04:48 | | * Alek drools. |
05:35 | | JackKnife [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code |
05:36 | | mode/#code [+o JackKnife] by ChanServ |
05:52 | | celticminstrel [celticminst@Nightstar-mhtogh.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] |
06:00 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code |
06:00 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
06:12 | | macdjord is now known as macdjord|slep |
06:44 | | AverageJoe [evil1@Nightstar-fb1kt4.ph.cox.net] has joined #code |
06:52 | | RchrdB [RichardB@Nightstar-c6u.vd5.170.83.IP] has quit [[NS] Quit: Gone.] |
06:55 | | RchrdB [RichardB@Nightstar-c6u.vd5.170.83.IP] has joined #code |
06:57 | | Harlow [harlow@Nightstar-9hnfdm.il.comcast.net] has joined #code |
07:00 | | Kindamoody is now known as Kindamoody|afk |
07:12 | | Erik [8f610223@Nightstar-d81bfg.mibbit.com] has joined #code |
07:23 | | himi [fow035@Nightstar-q9amk4.ffp.csiro.au] has quit [Ping timeout: 121 seconds] |
07:37 | | Turaiel is now known as Turaiel[Offline] |
07:56 | | AverageJoe [evil1@Nightstar-fb1kt4.ph.cox.net] has quit [[NS] Quit: Leaving] |
08:20 | | Syka [the@Nightstar-s57.sib.126.1.IP] has joined #code |
08:21 | | Syka is now known as NSGuest32255 |
09:03 | | Derakon [Derakon@Nightstar-5fqf0m.ca.comcast.net] has quit [Ping timeout: 121 seconds] |
09:23 | | Harlow [harlow@Nightstar-9hnfdm.il.comcast.net] has quit [[NS] Quit: Leaving] |
09:24 | | macdjord|slep [macdjord@Nightstar-7rac1r.mc.videotron.ca] has quit [Ping timeout: 121 seconds] |
09:31 | | macdjord|slep [macdjord@Nightstar-7rac1r.mc.videotron.ca] has joined #code |
09:31 | | mode/#code [+o macdjord|slep] by ChanServ |
10:38 | | Derakon [Derakon@Nightstar-5fqf0m.ca.comcast.net] has joined #code |
10:38 | | mode/#code [+ao Derakon Derakon] by ChanServ |
10:51 | | NSGuest32255 [the@Nightstar-s57.sib.126.1.IP] has quit [Ping timeout: 121 seconds] |
11:02 | | mode/#code [+o RchrdB] by ChanServ |
11:09 | | macdjord|slep [macdjord@Nightstar-7rac1r.mc.videotron.ca] has quit [Ping timeout: 121 seconds] |
11:10 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed] |
11:13 | | macdjord|slep [macdjord@Nightstar-7rac1r.mc.videotron.ca] has joined #code |
11:13 | | mode/#code [+o macdjord|slep] by ChanServ |
11:34 | | VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code |
11:45 | | Syka [the@Nightstar-s57.sib.126.1.IP] has joined #code |
11:46 | | Syka is now known as NSGuest52157 |
12:06 | | AlexValent [kvirc@Nightstar-2f7.cd9.232.77.IP] has joined #code |
12:29 | <&McMartin> | Holy crap, I've reverse-engineered the C64 software floating point format. http://pastebin.starforge.co.uk/630 |
12:30 | <@froztbyte> | :D |
12:31 | <&McMartin> | I think I now know enough about the internals that I could write a formula translator |
12:32 | <@froztbyte> | is that straight-up lisp? |
12:32 | <@froztbyte> | doesn't look very clojure-y |
12:32 | <@froztbyte> | but I've only done like 30min of that |
12:32 | <&McMartin> | It's Scheme, yeah |
12:34 | <&McMartin> | I'm not using anything in there that isn't in r5rs, but I tend to use Gambit for Scheme programming because it has some nice extensions and a superb compiler and FFI |
12:34 | <&McMartin> | Sadly, the Debian packages are absurdly out of date. |
12:34 | <&McMartin> | Fedora's relatively up-to-date, though |
12:34 | <@TheWatcher> | Debian out of date? Say it ain't so!~ |
12:35 | <&McMartin> | TheWatcher: It's because they can't make the autotools work well enough to build shippable packages for the past six or so minor revisions -_- |
12:35 | <&McMartin> | (A co-worker and I actually did some pushing on this but we couldn't do it either, just get works-for-me builds) |
12:35 | | * TheWatcher shudders at the mention of That Abomination |
12:35 | <&McMartin> | Yeah, pretty much |
12:35 | <&McMartin> | I'd give Debian more of a pass here except that Fedora has managed it =P |
12:36 | <@froztbyte> | McMartin: I literally can't comment on scheme, or any lisp |
12:36 | <@froztbyte> | I can read it, and make sense, but that's about it |
12:37 | <&McMartin> | Scheme is what gave us call-with-cthulhu-invocation, which you can also use to make loops without explicitly defining recursive functions |
12:37 | <&McMartin> | But the syntax for that is super-close to Clojure's loop-recur, which is super-clean |
12:38 | <&McMartin> | So I also now have a complete detokenizer for .prg files saved by C64 BASIC |
12:38 | <&McMartin> | I could probably compile all the math stuff now if I wanted to |
12:40 | <&McMartin> | I'd need to write a garbage collector to compile the full language. |
12:40 | <&McMartin> | ... that isn't that hard |
12:40 | <&McMartin> | I am clearly going mad |
12:40 | <@froztbyte> | prg? |
12:40 | <@froztbyte> | nah, it's just friday mornin |
12:40 | <@froztbyte> | g |
12:40 | <&McMartin> | Program files |
12:40 | <&McMartin> | When you save a BASIC program it's saved out in a tokenized half-binary form |
12:40 | <@froztbyte> | (spot the person who never dealt with basic, or a c64 in any form) |
12:40 | <@froztbyte> | McMartin: ....wat |
12:40 | <@froztbyte> | okay explain that one |
12:41 | <@froztbyte> | something like an early form of an AST? |
12:41 | <&McMartin> | Mmm |
12:41 | <&McMartin> | It doesn't get that far |
12:41 | <&McMartin> | It's more like a lexer that makes later interpretation easier |
12:41 | <&McMartin> | It finds the keywords and regex-replaces them with single bytes for easy detection later |
12:41 | <&McMartin> | And the lines are linked together with pointers |
12:41 | <&McMartin> | The saved file is a memory dump of that. |
12:42 | <&McMartin> | Early Commodore machines were sold under the title "Personal Electronic Transactor" |
12:42 | <&McMartin> | This has given the standard unix tool for translating to and from this format and ASCII the best tool name ever |
12:42 | <&McMartin> | "petcat" |
12:42 | | AlexValent [kvirc@Nightstar-2f7.cd9.232.77.IP] has quit [[NS] Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/] |
12:42 | <&McMartin> | My lexer isn't as good as petcat because it doesn't do substitutions to let you write out the various non-ASCII control codes that PETSCII had |
12:43 | <&McMartin> | But it's better than petcat because it can distinguish keywords, operators, variables, numbers, and strings; it's a full lexer |
12:43 | <&McMartin> | Which means I *could* turn that into A Proper AST. |
12:43 | <@froztbyte> | ah, so basically, cheapo ASN.1? |
12:43 | <&McMartin> | Unfamiliar with ASN.1 |
12:43 | <@froztbyte> | EBNF wire coding for w/e you feel like |
12:43 | <&McMartin> | (AST technology did exist at this point; Pascal and Forth were the compiled langauges of choice for these machines) |
12:44 | <&McMartin> | Aha |
12:44 | <&McMartin> | Sure |
12:44 | <@froztbyte> | (my brain is a terrible place) |
12:44 | <&McMartin> | Anyway, this is also fantastic for any retro projects I have because I finally have access to the ROM's multiplier and divider |
12:44 | <@froztbyte> | haha |
12:44 | <@froztbyte> | oh! |
12:44 | <&McMartin> | Because the 6502 doesn't have hardware multipliers -_- |
12:45 | <@froztbyte> | did you see the link I pasted around 2am UTC? |
12:45 | <@froztbyte> | maybe like 3am |
12:45 | <@froztbyte> | I expect you might gain enjoyment from reading it. |
12:45 | <&McMartin> | The Silicon Exposed one? |
12:45 | <@froztbyte> | ye |
12:46 | <&McMartin> | That is mostly beyond my pay grade, I fear |
12:47 | <@froztbyte> | haha |
12:47 | <@froztbyte> | I could mostly follow it, short of glossing over the traces |
12:49 | <@TheWatcher> | .... scary thing is, I actually undersand that |
12:49 | <@froztbyte> | :D |
13:13 | | macdjord|slep is now known as macdjord|wurk |
13:16 | | Syloq [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds] |
13:23 | | celticminstrel [celticminst@Nightstar-mhtogh.dsl.bell.ca] has joined #code |
13:23 | | mode/#code [+o celticminstrel] by ChanServ |
13:28 | | NSGuest52157 is now known as Syk |
13:38 | | Syloq [Syloq@Nightstar-mbk.c3p.254.173.IP] has joined #code |
13:38 | | mode/#code [+o Syloq] by ChanServ |
14:15 | | gnolam [lenin@Nightstar-3pr.n94.131.88.IP] has joined #code |
14:15 | | mode/#code [+o gnolam] by ChanServ |
14:41 | | Syloq [Syloq@Nightstar-mbk.c3p.254.173.IP] has quit [Ping timeout: 121 seconds] |
14:43 | | Syloq [Syloq@Nightstar-mbk.c3p.254.173.IP] has joined #code |
14:43 | | mode/#code [+o Syloq] by ChanServ |
14:44 | | Erik [8f610223@Nightstar-d81bfg.mibbit.com] has quit [[NS] Quit: doot doot] |
15:00 | | celticminstrel [celticminst@Nightstar-mhtogh.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] |
15:59 | | gnolam [lenin@Nightstar-3pr.n94.131.88.IP] has quit [Ping timeout: 121 seconds] |
16:28 | | gnolam [lenin@Nightstar-3pr.n94.131.88.IP] has joined #code |
16:28 | | mode/#code [+o gnolam] by ChanServ |
17:04 | | gnolam [lenin@Nightstar-3pr.n94.131.88.IP] has quit [Ping timeout: 121 seconds] |
18:00 | | AnnoDomini is now known as Number3 |
18:13 | | celticminstrel [celticminst@Nightstar-mhtogh.dsl.bell.ca] has joined #code |
18:13 | | mode/#code [+o celticminstrel] by ChanServ |
18:30 | | gnolam [lenin@Nightstar-471pis.cust.bredbandsbolaget.se] has joined #code |
18:30 | | mode/#code [+o gnolam] by ChanServ |
18:47 | | Shemhazai [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code |
18:49 | | JackKnife [Z@Nightstar-484uip.cust.comxnet.dk] has quit [Ping timeout: 121 seconds] |
19:30 | | Kindamoody|afk is now known as Kindamoody |
19:59 | | Kindamoody is now known as Kindamoody[zZz] |
20:19 | | Orthia [orthianz@Nightstar-3tp.juj.184.203.IP] has quit [Ping timeout: 121 seconds] |
20:33 | | Syk [the@Nightstar-s57.sib.126.1.IP] has quit [[NS] Quit: lol3g] |
21:01 | <@gnolam> | http://www.phdcomics.com/comics.php?f=1693 |
21:35 | | HotShot^Work [HotShot^Wor@Nightstar-v7se27.try.wideopenwest.com] has joined #code |
21:52 | | Number3 is now known as AnnoDomini |
22:11 | | HotShot^Work [HotShot^Wor@Nightstar-v7se27.try.wideopenwest.com] has quit [Ping timeout: 121 seconds] |
22:12 | | HotShot^Work [HotShot^Wor@Nightstar-v7se27.try.wideopenwest.com] has joined #code |
22:20 | | HotShot^Work [HotShot^Wor@Nightstar-v7se27.try.wideopenwest.com] has quit [Ping timeout: 121 seconds] |
22:41 | <&ToxicFrog> | python question: I am doing 'if x in foo' where foo is an instance of a custom class wrapping an ID3Tag. |
22:41 | <&ToxicFrog> | 'if x in id3' works. |
22:41 | <&ToxicFrog> | I want it to work for the custom class. |
22:41 | <&ToxicFrog> | As it is I get an 'ID3Wrapper is not iterable' exception. |
22:42 | <&ToxicFrog> | If I make it iterable by implementing __iter__ and next (and just forwarding to the wrapped object), I still get that error. |
22:42 | <&ToxicFrog> | This is, of course, impossible to google for. |
22:43 | <&ToxicFrog> | It also implies that 'in' is implemented by iterating over all the contents of a collection, which cannot possibly be universally true because that would be horrifying. |
22:45 | <@gnolam> | ToxicFrog: "in" uses __contains__(self, item) |
22:46 | | Shemhazai [Z@Nightstar-484uip.cust.comxnet.dk] has quit [Ping timeout: 121 seconds] |
22:47 | | JackKnife [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code |
22:47 | <@gnolam> | And for lists and the like, that's a straight linear search. But not for the things you're normally expected to use "in" on, like sets. |
22:47 | | mode/#code [+o JackKnife] by ChanServ |
22:48 | <@gnolam> | TL;DR: implement __contains__ for your class. |
22:49 | <@celticminstrel> | I'm pretty sure the python docs explain this reasonably well... |
22:51 | <@gnolam> | http://laughingsquid.com/the-expert-a-hilarious-sketch-about-the-pain-of-being-t he-only-engineer-in-a-business-meeting/ |
23:24 | | JackKnife [Z@Nightstar-484uip.cust.comxnet.dk] has quit [Ping timeout: 121 seconds] |
23:26 | | ErikMesoy is now known as ErikMesoy|sleep |
23:36 | | Orthia [orthianz@Nightstar-3tp.juj.184.203.IP] has joined #code |
23:36 | | mode/#code [+o Orthia] by ChanServ |
23:37 | <@RchrdB> | ToxicFrog, the specific document that explains what all the builtin magic names like __iter__ and __contains__ are is https://docs.python.org/2/reference/datamodel.html for Python 2.x or https://docs.python.org/3/reference/datamodel.html for Python 3.x |
23:53 | <&ToxicFrog> | celticminstrel: probably, but 'in' is completely unsearchable and 'is not iterable' is all results from people trying to iterate over ints and stuff |
23:53 | <&ToxicFrog> | So I have no idea where |
23:53 | <&ToxicFrog> | gnolam: that worked, thanks. |
23:53 | <&McMartin> | RchrdB has the links |
23:53 | <&ToxicFrog> | So why is the error message 'is not iterable' if it's looking for __contains__? |
23:55 | <@celticminstrel> | Maybe it looks for __iter__ if it fails to find __contains__? |
23:57 | <@RchrdB> | Correct. It tries __contains__ first and falls back to __iter__. |
23:58 | <@RchrdB> | celticminstrel, ^- you are correct, which is the best thing. |
--- Log closed Sat Apr 05 00:00:47 2014 |