00:14:00 <ehird> I thikn I'm talking to a markov chain bot
00:14:01 <ehird> 00:12 <SamanthaDega> This is not #haskell. Maybe you could consider better file handling rather than loading the file into an array. Like in C I have a file handle which could with a releatively simple fn be move to point to the same column in the next/previous line. You don't need to load data into an array to own it, you just need to manage it properly however you decide to manage it. thanks for being awesome. thanks for the example code. Hope all the
00:16:10 <ehird> anyone want to decipher that?
00:18:58 <ehird> im talking about that guy
00:19:04 <ehird> i can't tell wtf he's trying to say
00:20:56 <ehird> i think you're messing with me. what i'm saying is that this guy is making no sense at all, he's just spewing random shit every time i say something to him
00:23:33 <oerjan> bsmntbombdood: never been to finland. good night.
00:23:36 -!- oerjan has quit ("leaving").
00:48:55 -!- jix has quit (Read error: 60 (Operation timed out)).
00:59:04 -!- GreaseMonkey has joined.
02:44:34 -!- pikhq has joined.
03:05:59 <Corun> What else does one do when bored?
03:06:34 <Corun> Write a very very simple language, in machine code (yes, machine code, not asm)
03:07:00 <Corun> Then write a superset language, written in the original language
03:07:03 <Corun> And keep doing that
03:07:20 <Corun> Until you have a relatively feature full language written in itself
03:07:33 <Corun> Without ever having written an interpreter in any other language
03:09:24 -!- pikhq has quit (kornbluth.freenode.net irc.freenode.net).
03:11:04 -!- pikhq has joined.
03:11:08 <Corun> Or you could initially write it in itself
03:11:13 <Corun> And hand compile it.
03:19:31 -!- Corun has quit ("WOT").
03:52:37 -!- CakeProphet has quit ("lol").
04:23:46 -!- psygnisfive has quit (Read error: 104 (Connection reset by peer)).
04:25:27 -!- psygnisfive has joined.
04:43:15 -!- Corun has joined.
05:12:51 -!- Corun_ has joined.
05:18:51 <oklopol> bsmntbombdood: is norway or finland better? <<< come to finland and we can go fishing
05:20:47 -!- Corun_ has quit ("This computer has gone to sleep").
05:21:42 <oklopol> i don't actually fish, ever
05:21:50 <oklopol> norway is better for that.
05:29:58 -!- Corun has quit (Read error: 110 (Connection timed out)).
05:47:44 -!- GreaseMonkey has quit ("Client Excited").
05:55:51 -!- sebbu2 has joined.
06:09:02 -!- psygnisfive has quit (Read error: 104 (Connection reset by peer)).
06:11:02 -!- psygnisfive has joined.
06:13:14 -!- sebbu has quit (Read error: 110 (Connection timed out)).
06:45:39 -!- Sgeo has quit (Remote closed the connection).
07:02:43 -!- olsner has joined.
07:59:59 -!- clog has quit (ended).
08:00:00 -!- clog has joined.
08:17:22 -!- olsner has quit ("Leaving").
09:14:20 -!- oerjan has joined.
11:39:54 -!- psygnisf_ has joined.
11:44:24 -!- psygnisfive has quit (Read error: 110 (Connection timed out)).
12:08:55 -!- ais523 has joined.
12:23:51 -!- jix has joined.
12:42:37 -!- oerjan has quit (kornbluth.freenode.net irc.freenode.net).
12:45:09 -!- oerjan has joined.
12:47:16 -!- ais523_ has joined.
12:52:54 -!- Mony has joined.
12:54:30 -!- ais523 has quit (Nick collision from services.).
12:54:44 -!- ais523_ has changed nick to ais523.
12:56:32 <Mony> how are you guys ?
12:57:03 <ais523> Slereah_: is this some definition of mile I'm unaware of?
12:57:26 <ais523> hmm... what's the horizon on 3 miles?
12:57:30 <ais523> I'm wondering if I can see you from England
12:58:19 <Slereah_> Buy some binoculars with your wolfram money mister millionaire.
12:58:35 <ais523> actually, I was wondering if the curvature of the earth got in the way
12:58:46 <ais523> and I'm mostly using the money to cancel out student debt
12:58:58 <Slereah_> Is school expensive in England?
12:59:12 <ais523> it can be, but University is very expensive
12:59:20 <ais523> mostly because you have to meet living and tuition costs yet don't have a job
12:59:25 <Slereah_> I pay like 400 euros a year here.
12:59:29 <ais523> so students famously nearly always get into huge amount of debt
12:59:45 <ais523> it's something like £1175 per year over here
12:59:46 <Slereah_> Well, I'm still at my mom's, so it helps
12:59:53 <ais523> plus the cost of living
13:00:00 <ais523> which normally comes to more
13:15:19 -!- oerjan has quit ("leaving").
13:45:11 -!- Corun has joined.
13:50:09 -!- Corun has quit ("This computer has gone to sleep").
14:21:47 <Deewiant> ehird: coding a Befunge-98 interp in Haskell?
14:21:54 <ehird> that is my intention, yep
14:22:05 <ehird> i also intend to implement every fingerprint I can.
14:22:16 <ais523> more even than the AnMaster list?
14:22:18 <ehird> Deewiant: actually, funge98
14:22:29 <ehird> I hope to be N dimensional.
14:22:35 * ais523 wonders vaguely if ehird is mad enough to implement IFFI
14:22:37 <ehird> ais523: Sure, he doesn't even do stuff like TRDS.
14:22:44 <ehird> Or half of MikeRiley's fingerprints.
14:23:04 <ais523> note that IFFI is written such that it could in theory be used with INTERCAL interps other than C-INTERCAL
14:23:08 <ais523> or even with languages other than INTERCAL
14:23:17 <Deewiant> I implement every cross-platform fingerprint which makes a degree of sense
14:23:26 <ais523> Deewiant: and IFFI doesn't?
14:23:27 <Deewiant> (that excludes MKRY among others)
14:23:40 <ehird> Deewiant: i will implement fingerprints no matter if I can test them on the right software/hardware or not
14:23:49 <ehird> and sense will get your fingerprint delayed
14:24:06 <Deewiant> ais523: IFFI was the intercal one? I'm not sure it does ;-)
14:24:21 <ais523> Deewiant: well, a lot is left implementation-defined
14:24:28 <AnMaster> ais523, I'm currently writing down ideas for a fingerprint called SQL, very early, not even level of draft yet
14:24:42 <ehird> umm, that's a nice random topic change
14:24:48 <ais523> and it also depends on the "implementation-specified instructions" area with charcodes above 100
14:24:54 <AnMaster> ehird, err? it is befunge related
14:25:12 * ais523 thought ehird was referring to the /topic
14:25:37 <ehird> no, that's a reference to a gay porn site. google corrected an acronym oklopol said to EUROCREME
14:25:46 <ehird> and apparently it's a gay porn site. so there you go.
14:25:50 <AnMaster> http://rafb.net/p/Z73Y8i84.html <-- some random ideas for it, most isn't detailed yet, like parameters for most things and so on
14:26:11 <AnMaster> any constructive comments are welcome
14:26:26 <ehird> it's still a thoroughly uninteresting idea.
14:26:56 <ais523> ehird: this isn't about MKRY randomness or TRDS insanity, this is about Befunge as a practical esoteric language for the 21st century
14:27:07 <ais523> you have to admit, on the practical esolangs side, Befunge is winning
14:27:36 <ehird> Deewiant: what would you use if you needed a Data.Map that'll get mutated alll the time?
14:27:37 <ais523> it has the best stdlib of any esolang I know, apart from possibly Deltaplex
14:27:47 <ais523> and I don't really know Deltaplex
14:28:04 <AnMaster> ais523, I think I should return stuff like what db drivers are supported and such (possibly). If I implement this in cfunge it will probably support sqlite and postgresql
14:28:05 <ehird> ais523: fuck you. Deewiant: how slow was hsfunge?
14:28:07 <Deewiant> ehird: but, uh, have fun with N dimensions
14:28:17 <ehird> Deewiant: wellllll, I'm not sure it can be done
14:28:23 <ehird> you need instructions for turning in N dimensions
14:28:32 <Deewiant> ehird: can't remember, maybe about 50x slower than cfunge
14:28:36 <Ilari> Got reference for MKRY (I couldn't find one that's up)?
14:28:43 <ehird> Ilari: yes, google cache:
14:28:50 <ais523> Ilari: not a very good joke either
14:29:07 <ehird> pfft, it's hilarious
14:29:34 <ehird> hrm, no google cache. trying web archive
14:29:41 <Deewiant> ehird: I seem to recall hsfunge getting through mycology in 1-2 seconds but I don't remember on what machine so I can't compare that time to anything
14:29:49 <AnMaster> ais523, anyway what is needed for a generic database access abstraction interface? I have only used mysql, sqlite and postgresql so I don't know what other database systems could need.
14:29:59 <ais523> ehird: you could just install an httpd on eso-std.org...
14:30:04 <AnMaster> odbc and such for example, (I don't even know how that works)
14:30:08 <ehird> no i couldn't because i didn't save tusho.net
14:30:26 <ais523> oh, you lost the spec too?
14:30:55 <Deewiant> ehird: eh? what happened to tusho.net
14:31:00 <ais523> well, my opinions on wiping a server to uninstall all the software vs. simply uninstalling all the software using the package manager are a matter of private record
14:31:14 <ehird> ais523: you know what, it's my server, i really don't give a shit.
14:31:57 <ais523> AnMaster: are you going to implement a driver-independent syntax for SQL queries?
14:32:05 <ehird> <html style="font-family: sans-serif">
14:32:06 <ehird> <h1>"MKRY" (0x4d4b5259)</h1>
14:32:08 <ehird> <h2>a funge-98 fingerprint by <a href="http://tusho.net/">tusho</a></h2>
14:32:22 <ehird> <dd>Push 'e' and 'h' (random)
14:32:26 <ehird> <p>All pushes from 3 to 15.</p>
14:32:30 <ehird> before you say anything, that's the idea.
14:33:31 <AnMaster> ais523, hm there is the SQL standard
14:33:47 <ais523> AnMaster: yes, not all DB drivers implement it correctly
14:33:50 <AnMaster> ais523, isn't that enough? I assume everyone follows the standard ;P
14:33:52 <ais523> in fact, I'm not entirely convinced any do
14:33:53 <ehird> why not just use DBI via Perl if you think it's such an interesting idea.
14:34:10 <ais523> for instance, what quote characters mean what tends to vary a lot
14:34:41 <ehird> then make them use scke.
14:34:49 <AnMaster> ais523, hm what about prepared statements? I don't know how standard they are, but surely they solve some of the issue?
14:34:52 <ehird> because if you're just passing sql on, there's no point
14:34:56 <ais523> AnMaster: some of the issue, yes
14:35:05 <ais523> make sure you allow for parameterised statements
14:35:07 <ehird> so it's not even an SQL fingerprint any more
14:35:16 <ais523> ehird: it's an interact-with-DB-driver fingerprint
14:35:26 <ais523> having both SQL and prepared statements makes sense there
14:35:35 <ehird> which is unneeded unless you abstract the queries.
14:35:41 <ehird> because every server and its dog has a socket interface.
14:35:42 <ais523> parameterised SQL, anyway, is useful for avoiding injections
14:35:58 <AnMaster> which is the one I'm most interested in
14:36:10 <ais523> it makes much more sense to write "WHERE field = ?" and give an argument rather than trying to use string concatenation
14:36:17 <ais523> also, I love SQL's use of ? for arguments
14:36:27 <AnMaster> ais523, well some dbs allow WHERE field :namedparameter
14:36:34 <AnMaster> not sure how wide that support is
14:37:35 <ehird> i wonder if there's a channel called #really-esoteric that is actually about esoteric programming ideas
14:37:39 <ais523> SQL portability is a nightmare
14:37:53 <ais523> ehird: this is about esolanging, although not a part of it that, say, you or oklopol would be interested in
14:37:57 <AnMaster> ais523, well that is why abstracting the actual query would be very hard
14:38:06 <ehird> no, it's not about esoteric programming ideas
14:38:11 <ais523> you'd have to invent your own nonportable unambiguous syntax for it
14:38:17 <ehird> it is tangentially related to an esolang, but it's not an esoteric programming idea
14:38:26 <AnMaster> I mean simple selects sure, but what about nested selects, with joins and sub queries and so on
14:38:34 <ais523> ehird: the international hub for design, development and deployment of esoteric programming languages
14:38:37 <ais523> this is deployment, IMO
14:39:02 <ehird> ok, tell you what, i'll emulate #really-esoteric: someone tell me when we're talking about esoteric programming ideas.
14:39:03 -!- ehird has left (?).
14:39:50 <Ilari> Like languages with write-once-read-many memory? :-)
14:40:27 <ais523> that might be esoteric, but needn't be
14:40:33 <ais523> write-many-read-once would be more fun
14:41:00 <ais523> I've actually had some thoughts along those lines
14:41:18 <ais523> to create a lang which was as usable as possible, but deliberately sub-TC
14:41:27 <Ilari> Oh, and no instruction pointer. :-)
14:41:43 <ais523> the idea would be that it would be impossible to write a nonterminating program, but apart from that it would be as usable as possible
14:41:51 <Slereah_> ais523 : Just do a TC language and add to the specs "The memory is 10^80 bits"
14:41:51 <ais523> Ilari: which lang are you thinking of, here?
14:42:05 <ais523> Slereah_: yes, but in a less cheating way than that
14:42:10 <ais523> besides, that fails for some things
14:42:17 <ais523> it can't primality-check arbitrarily large numbers, for instance
14:42:20 <ais523> whereas the lang I was thinking of could
14:43:20 <Ilari> Language which uses context-free grammar to guide lengthening of string (the extension candidates are matched to given context-free grammar on each step).
14:44:00 <ais523> hmm... I find that in IP-less languages like Thue, I normally end up implementing an IP in order to program in them
14:44:37 <Ilari> <AOL>Me too</AOL> :-)
14:45:12 <ais523> the AOL tags always seem to be redundant, because it always says "Me too" between them
14:45:17 <ais523> maybe just <AOL /> would do
14:45:46 <Ilari> ais523: For language that can express P, you probably just need to prohibit backward jumps and superlinear looping...
14:46:05 <ais523> my idea was basically that
14:46:21 <ais523> but instead of prohibiting superlinear looping, to prohibit super-Ackermann looping
14:47:16 <Ilari> How you prohibit super-Ackermann looping? Something to do with primitive recursion?
14:47:42 <Slereah_> What is "super ackermann looping"?
14:47:44 <ais523> oh, much more boring than that, I was planning to just make the programmer use the Ackermann function to calculate the number of iterations
14:48:28 <ais523> Slereah_: it's a loop which goes more times than an any Ackermann function whose arguments are the amount of input, and constants
14:48:37 <Ilari> Or having loop construct where loop bound is A(m.n), where m needs to be fixed?
14:49:12 <Ilari> Actually, probably no need to fix m. Its finite anyway...
14:49:55 <ais523> in fact, you could just put the Ackermann function in the standard library, use bignums, and require the programmer to specify the number of iterations of a loop in advance
14:50:10 <ais523> you need the Ackermann function in the stdlib to be able to do that, or you can't implement the Ackermann function itself
14:51:25 -!- ehird has joined.
14:51:29 <ehird> To be a hypocrite:
14:51:33 <ehird> YES QT IS NOW UNDER THE LGPL
14:51:45 <ais523> ehird: why is that better than what they had before?
14:51:57 <ehird> because it was either GPL or shell out money to them for a commercial license
14:52:15 <ehird> ais523: the QPL is viral too, iirc
14:52:18 <ais523> it had a special exception allowing it to link with <long list of open-source licences>
14:52:26 <ais523> and BSD was definitely one of them
14:52:55 <ehird> Well, OK, I didn't know that. But now it's obvious, and commercial apps can use it freely too. Which is nice.
14:53:29 <ehird> *Qt source code repositories will be made publicly available and will encourage contributions from desktop and embedded developer communities.
14:53:31 <ehird> *Service offerings for Qt will be expanded to ensure that all Qt development projects can have access to the same levels of support, independent of the selected license.
14:53:36 <ehird> ok, hypocrite over ->
14:53:38 -!- ehird has left (?).
14:54:13 <Ilari> Also, one could make language expressing most useful classes by allowing bounding loops by input fields...
14:54:26 <Ilari> Not just input field sizes.
14:55:01 <ais523> strange, trolltech's own page on Qt licensing is currently a 404
14:55:07 -!- ehird has joined.
14:55:13 <ehird> WHEN DID TROLLTECH RENAME TO QT SOFTWARE
14:55:15 -!- ehird has left (?).
14:55:22 -!- ehird has joined.
14:55:27 -!- ehird has left (?).
14:56:00 <ais523> Ilari: that's a linear bounded automaton, isn't it?
14:56:11 <ais523> ah, only if the input's in unary
14:57:02 <Ilari> I think that would allow expressing all E+TIME classes...
14:57:16 <ais523> Ilari: you're a lot more technical than me on these matters
15:00:55 <Ilari> BTW: Primality-checking arbitiary large numbers doesn't need loop superlinear in input size... :-)
15:01:07 <ais523> no, but it does need an infinite amount of memory
15:02:16 <Ilari> Lack of loops superlinear in input size impiles bound on memory usage.
15:02:32 <Ilari> ... Growing with input size, of course.
15:02:33 <ais523> only if there's a bound on the input
15:02:50 <ais523> which is what I think I was trying to get at
15:03:13 <Ilari> Unbounded amount of memory is not the same thing as infinite amount of memory.
15:03:32 <ais523> they come to the same thing from the programmer's point of view, though
15:03:38 <ais523> at least, there's no way to tell them apart that I know of
15:07:10 <Ilari> I think that proving that some program can only use unbounded amount of memory is in AH-PI-2 (harder than halting problem).
15:08:24 <ais523> I know there's more than one uncomputable computational class, but I don't know the names of any in particular
15:08:50 <Slereah_> Aren't they just greek letters with superscripts?
15:09:07 <ais523> but there's quite a difference between proving the program halts, and requiring the programmer to give a proof the program halts
15:09:07 <ais523> the second can be done in the syntax of a langauge
15:09:15 <Ilari> AH-PI-2 is class of problems that are in co-RE if halting oracle is available.
15:09:35 <ais523> what's it a halting oracle for? TC languages?
15:10:12 -!- FireFly has joined.
15:11:06 <ais523> lots of people I don't recognise seem to have been turning up in #esoteric recently
15:11:14 <ais523> that can only be a good thing, probably
15:11:28 <FireFly> Well, I've been lurking that esolang wiki for about half a year
15:12:01 <ais523> although not all the langs are all that good, there are some real gems in there
15:12:13 <ais523> Slereah_: which one was EsCo again? And do I sense sarcasm?
15:12:40 <Slereah_> EsCo was the Esoteric Compiler
15:12:54 <Slereah_> For such diverse languages as Brainfuck, Spoon and Ook.
15:12:56 <ais523> oh, it was that one that someone spammed to esolang
15:13:11 <Slereah_> I'm sure the next bold move is an esme compiler.
15:13:18 <ais523> don't mention esme, please
15:13:33 <ais523> I still hope, deep down, it was a trolling attempt
15:13:37 <ais523> because there's no other logical explanation
15:13:42 <ais523> on the other hand, that makes it very esoteric, I suppose
15:14:34 <ais523> and esco's apparently an interp, not a compiler
15:15:20 <ais523> let's see... it claims BF, Ook!, Spoon, HQ9+, Whitespace, Byter, and Befunge-93
15:15:35 <ais523> not that bad a selection, although there are no "hard" esolangs there
15:15:49 <ais523> and it's apparently an abbreviation for "EsotericCombined"
15:15:58 <ais523> Slereah_: one that's hard to interpret/compile
15:16:08 <ais523> I'd say Unlambda and INTERCAL are two good examples
15:16:10 <Slereah_> Like the ANDREI MACHINE 9000? :o
15:16:39 <Slereah_> Unlambda should be easily doable in a functional languages.
15:16:42 <ais523> I'm not counting langs like TwoDucks which are theoretically impossible to interpret, of course
15:16:47 <ais523> Slereah_: the problem in functional languages is d
15:16:51 <Slereah_> Although I still don't know what continuation is.
15:16:52 <ais523> although I think I've worked out a way around that
15:16:58 <ais523> c is hard if you don't have call/cc already
15:17:09 <ais523> anyway, I think Unlambda -> Underlambda is doable
15:17:31 <Ilari> Or esolang that needs full-blown implmentation of CYK for execution?
15:17:44 <ais523> I worked out the trick for d -> pure-functional a while back
15:17:51 <ais523> but deleted my notes on it, and the compiler I wrote, by mistake
15:17:57 <ais523> and haven't reconstructed them yet
15:17:59 <Slereah_> Also what's the theoretical machine behind INTERCAL again?
15:18:06 <ais523> Slereah_: I'm not sure if it has a name
15:18:18 <Slereah_> Well, where does it store informations
15:18:19 <ais523> CLC-INTERCAL compiles to bytecode called ICBM that's specifically designed for INTERCAL
15:18:24 <Ilari> Algorithm to decide uniform language recognization for context-free grammars in polynomial time.
15:18:35 <ais523> whereas C-INTERCAL compiles to C
15:18:39 <ais523> (and from there to native code)
15:19:15 <Ilari> That is, given string x and context-free grammar L, it can decide wheiher x is in L in polynomial time.
15:19:55 <ais523> most esolangs don't care about computational complexity
15:20:06 <ais523> in fact, most practical langs don't
15:20:09 <ais523> it might be nice to create one that did
15:20:10 <Slereah_> We're all about the model, not the speed!
15:20:32 <ais523> cfunge is a nice counterexample
15:20:45 <Slereah_> I don't know much of funge languages
15:20:49 -!- ehird has joined.
15:20:51 <ehird> http://philosecurity.org/2009/01/12/interview-with-an-adware-author
15:20:52 <ais523> Slereah_: it's nothing to do with the lang, just the interp
15:20:56 -!- ehird has left (?).
15:21:11 <ais523> the interp is specifically designed for speed
15:21:28 <ais523> because when you're having fun with esolangs, you may as well set extra challenges
15:21:34 <ais523> like writing the world's fastest funge interp
15:21:50 <ais523> (and then fizzie went and invented jitfunge, just for even more crazy-speed funge fun)
15:23:48 -!- ehird has joined.
15:23:50 <ehird> 07:12:40 <Slereah_> EsCo was the Esoteric Compiler
15:23:52 <ehird> esoteric _combine_
15:23:58 <ehird> they were naive interpreters
15:23:59 -!- ehird has left (?).
15:24:42 <Slereah_> Do they shoot you with lasguns?
15:24:57 -!- ehird has joined.
15:25:02 <Slereah_> [16:24:20] <Slereah_> Combine?
15:25:02 <Slereah_> [16:24:30] <Slereah_> Do they shoot you with lasguns?
15:25:04 <ehird> i think it was that the interpreters were COMBINED together.
15:25:07 -!- ehird has left (?).
15:26:23 <ais523> ehird: http://doc.trolltech.com/4.4/license-gpl-exceptions.html is the list of licences that pre-LGPL Qt could be linked with
15:27:33 -!- ehird has joined.
15:27:35 <ehird> S: In your professional opinion, how can people avoid adware?
15:27:40 <ehird> M: We did actually get the ad client working under Wine on Linux.
15:27:42 <ehird> S: That seems like a bit of a stretch!
15:27:44 <ehird> M: That was a pretty limited market, I’d say.
15:27:45 <Slereah_> Also, that dude was writing in scheme, he can't be all bad.
15:27:46 <ehird> -- that interview linked above
15:27:50 -!- ehird has left (?).
15:28:09 <ais523> why don't we just set the channel to allow message from outside?
15:28:16 <ais523> that way, ehird wouldn't have to join and part again to send messages
15:28:28 <ais523> OTOH, ehird is obviously reading the logs, so just joining the channel would be easier
15:30:34 <Slereah_> ehird, stop being the scourge of the world
15:36:54 <AnMaster> ais523, hm was afk, what is the argument about?
15:37:10 <ais523> there's no actual argument; just ehird keeps joining, saying stuff, and parting again
15:38:52 <Slereah_> Because he is the scourge of the earth.
15:39:05 <AnMaster> ais523, also funge is not that easy to make fast, I mean 2D sparse array
15:39:16 <AnMaster> linear address space is much simpler
15:39:56 <AnMaster> ais523, however that reminds me of a wild idea, I don't know if me or Deewiant had it first, anyway it happened when trying to understand what ehird meant with an idea for another fingerprint
15:40:11 <AnMaster> so you can mmap a file into an area
15:40:33 <AnMaster> ais523, add in some buzz words like DMA to non-funge world and such
15:41:03 <AnMaster> ais523, anyway it would slow down normal operation because you would need to check if the coords would be into an mmaped area
15:41:26 <AnMaster> also the file would need to be a raw file, couldn't care about stuff like newlines
15:41:28 <ais523> AnMaster: are you focusing specifically on optimising fingerprints? or just on optimising core funge?
15:41:49 <AnMaster> ais523, this idea? neither, because it would slow down normal operation
15:42:12 <AnMaster> ais523, anyway I wouldn't want to spec it, just an idea I had
15:42:13 <ais523> well, it's sane /enough/
15:42:51 <AnMaster> ais523, well, how would you avoid the overhead of checking a list of mappings to see if the access would be inside a mmaped() area in funge space on every funge space access
15:43:22 <ais523> well, you'd only need to do it for p and g unless the IP went into the area
15:43:28 <ais523> and you'd only need to do it if the fingerprint had been loaded
15:43:40 <AnMaster> ais523, well other instructions that access too, lots of them in fingerprints
15:44:23 <AnMaster> ais523, but then you would need to check each time the IP moves to see if it is inside such an area
15:44:32 <AnMaster> so not sure you could gain much
15:44:39 <ais523> AnMaster: not each time the IP moved
15:44:46 <ais523> just at every delta-changing or jumping instruction
15:44:55 <ais523> you can project the IP's path the rest of the time
15:45:15 <AnMaster> hm, this would be one thing that is easier in a JIT I believe
15:45:32 <ais523> well, JITs need to do that anyway
15:46:08 <ais523> doesn't mean you can't do it in a non-JIT
15:47:39 -!- ehird has joined.
15:50:32 <ehird> you know what sucks
15:52:12 <oklopol> i should probably do some algebra
15:53:30 <oklopol> Slereah_: i don't have the time for your incredible puzzles right now.
15:53:53 <ais523> Slereah_: (x-3) is not an lvalue
15:54:20 <AnMaster> ais523, postgres has an async SQL interface as well as a sync one
15:58:40 <AnMaster> or wait, ehird uses a variable width font, he probably didn't see that we all used same length of the lines
15:58:51 <ehird> no, I don' tuse a variable width font
15:58:55 <ehird> 15:54 <oklopol> oooooooooooo
15:58:55 <ehird> 15:55 <ais523> kkkkkkkkkkkk
15:58:56 <ehird> 15:56 <AnMaster> eeeeeeeeeeee
15:58:58 <ehird> account for nicks, bums
15:59:16 <ais523> besides, some clients right-justify nicks
15:59:23 <AnMaster> ehird, well I right-align nicks to column 12 or so
15:59:42 * ehird switches to a variable-width font
16:00:15 <ais523> AnMaster: I actually spent the effort counting oklopol's os
16:00:20 -!- FireFly has quit ("Later").
16:00:43 <Ilari> Variable-with fonts and some versions of xterm don't mix (the results look hideous)...
16:00:43 <AnMaster> ais523, I just copied, went to start, pressed Insert key to enter overwriting mode and pressed e until the end :P
16:00:55 <ehird> Ilari: I don't use a console IRC client.
16:00:55 <ais523> AnMaster: that's cheating
16:01:04 <ehird> because I have a GUI environment :P
16:01:07 <ais523> although this client doesn't have the insert/overwrite toggling
16:01:07 <AnMaster> ais523, no that is solving it in the simplest possible way
16:01:18 <ehird> no that is cheating
16:01:27 <ais523> ehird: nothing prevents you right-justifying nicks in a GUI environment...
16:01:36 <ehird> 16:00 <Ilari> Variable-with fonts and some versions of xterm don't mix (the results look hideous)...
16:02:03 <ais523> ehird: oh, miseed the context
16:02:07 <AnMaster> ais523, indeed, I'm using a GUI client on the bouncer atm, well two clients in fact
16:02:27 <AnMaster> seems like "a slightly less sucking xchat"
16:02:46 <ehird> its an xchat fork.
16:03:26 <ehird> I am using futura. I feel FUTURAstic.
16:03:38 <AnMaster> well I much prefer ERC over conspire
16:03:59 <AnMaster> but well, I prefer trying stuff before I dismiss them. :)
16:04:15 <ehird> Optima looks weird.
16:04:36 <ehird> HELLO FROM ZAPFINO
16:04:40 <AnMaster> how does font differ from typeface?
16:05:03 <ehird> A font is the computerized representation of one variation (regular, bold etc) of a typeface.
16:05:17 <ehird> Or, you know, the metal-ized representation, if you're oldsk00l.
16:05:43 <AnMaster> ehird, ah yes, my old pal Gutenberg liked that a lot
16:06:10 <ehird> You knew Johannes Gutenberg?
16:06:29 <ehird> PAPYRUS! Next up: COMIC SANS!
16:06:45 <ehird> COMIC SANS MS! The OFFICIAL FONT of #ESOTERIC!
16:06:50 -!- FireFly has joined.
16:07:12 <AnMaster> ehird, what about that MS chat thingy
16:07:16 <AnMaster> ehird, that would be even worse
16:07:37 <AnMaster> ehird, I mean using it, in comics mode
16:07:49 <ehird> I'm ignoring you :D
16:08:24 <ehird> MS Chat is the best irc client eve
16:08:59 <AnMaster> ehird, I'm quite sure you forgot the ~
16:11:20 <ehird> "YouTube Now Mutes Videos With Unauthorized Copyrighted Music"
16:11:21 <ehird> http://mashable.com/2009/01/14/youtube-mutes-videos/
16:14:42 <AnMaster> I mean, just in the GUI or in the actual file?
16:14:58 <ehird> i think it forces the mute in the gui
16:15:54 <AnMaster> ehird, seems to be in the file, I just tried with youtube-dl to get the .flv
16:16:02 <ehird> well, that makes more sense :P
16:31:41 <AnMaster> ais523, about quoting, what about S = Escape string for query
16:31:48 <AnMaster> iirc several DB interfaces has such
16:32:08 <ais523> don't do escaping then inserting strings, that way injections lie
16:32:09 <AnMaster> ais523, ok prepared is better yes
16:32:14 <ais523> use parametrised queries, or prepared statements
16:32:42 <AnMaster> ais523, well at least sqlite only allow parametrised queries with prepared statements iirc
16:32:57 <AnMaster> but it was a while since I last used that API
16:36:26 <AnMaster> ais523, I'm reading up on three DBs when making this interface: PostgreSQL, SQLite and MySQL. To make sure it is reasonably portable
16:36:50 <AnMaster> if you know any other open source SQL database that may be of interest, tell me
16:37:18 <AnMaster> (and before anyone ask: why open source only?: I don't plan to pay for oracle to make sure it is compatible)
16:37:25 <ehird> oracle has a free edition.
16:37:43 <ehird> i think it needs like 4gb of ram though.
16:37:52 <AnMaster> ehird, I have 1.5 in this system
16:38:01 <ehird> that was an exaggeration
16:38:26 <AnMaster> anyway from what I heard oracle is quite similar to postgres in many aspects
16:38:51 <ehird> oracle is pretty terrible from what i've seen.
16:40:00 <AnMaster> well if you can do simple stuff like: query, get row at a time, start/end/roll back transactions, connect/disconnect, get error code/message related to last error it should be fine
16:40:29 <AnMaster> what interest me more is how to integrate the postgresql async interface easily
16:40:38 <ehird> wow, this is so boring
16:40:50 <AnMaster> well everything isn't about you all the time
16:43:13 <ehird> grrrrr fuck people who talk about useless use of cat.
16:43:21 <ehird> its a bloody unix pipeline. it makes sense like that.
16:43:41 <AnMaster> ehird, well doing cat foo | grep bar makes no sense
16:43:55 <ehird> it makes perfect effing sense
16:44:06 <ehird> no, why doesn't it?
16:44:11 <ehird> you're catting the file, then grepping that
16:44:16 <ehird> you read unix pipelines left to right
16:44:21 <ehird> that makes _perfect_ sense
16:44:21 <AnMaster> grepping a file makes more sense
16:44:37 <AnMaster> ehird, "can not create process: limit exceeded"
16:44:49 <ehird> yeah because that cat is going to linger there forever
16:44:52 <ehird> and you can only run 5 processes
16:44:57 <ehird> before your machine crashes
16:45:09 <AnMaster> ehird, because you can hit the limit on a lot of shell servers quickly
16:45:11 -!- BeholdMyGlory has joined.
16:45:26 <ehird> yes. adding an extra cat to a pipeline will be _fatal_
16:45:44 <AnMaster> ehird, sometimes it will break stuff yes. Like I described
16:45:45 <ais523> BeholdMyGlory: are you AnMaster, or do we have two Arvids on this channel?
16:45:55 <ehird> AnMaster: uh huh. sure.
16:59:47 <ehird> The people on the Tubes must chip in and make an alternative to You Tube, it's not that expensive. The company must be based somewhere outside USA and it should be owned by at least 1 Mil guys so it will be never sold to any big company.
17:00:26 <ais523> ehird: you'd have to make a distributed version, somehow
17:00:37 <ehird> ok ais523 i ask you one thing
17:00:44 <ais523> 1 million's about the population of Birmingham, so it seems a bit excessive
17:00:44 <ehird> when i quote someone stupid for no particular reason
17:00:48 <ehird> please stop responding seriously
17:01:01 <ais523> ehird: in that case, you've missed the joke
17:01:13 <ehird> it's more that the joke is turning me into a gibbering wreck
17:09:36 <ehird> wow, zzo38 doesn't get open source
17:09:37 <ehird> Most of the new files added to Vonkeror are now licensed by GNU GPL v3 or
17:09:38 <ehird> later version (it is permitted because the LGPL v2.1 permits it). I am
17:09:40 <ehird> making a exception: Anyone who is making Conkeror software may relicense
17:09:42 <ehird> under the Conkeror license, in order to be added into Conkeror. Anyone
17:09:44 <ehird> can remove this exception from your own copy of the codes if they want
17:09:46 <ehird> to, but it is not required to remove this exception. However, this
17:09:48 <ehird> exception only grants additional permission to the workers of Conkeror.
17:09:50 <ehird> itt: vaguest shit ever
17:09:52 <ehird> who the hell is a worker of conkeror
17:10:19 <ehird> 1* Select odd/even row of tables using [_even] and [_odd] CSS selectors
17:10:20 <ais523> well, it's certainly legit to make a GPL3 fork of an LGPL2.1+ project
17:10:24 <ais523> not that that is generally sensible
17:10:25 <ehird> itt: zzo38 is microsoft 2.0
17:10:33 <ehird> ais523: i mean the relicensing clause
17:10:50 <ehird> http://zzo38computer.cjb.net/vonkeror/screenshots/screenshot_001.png Impressively ugly.
17:11:05 <ais523> ehird: that sort of thing is relatively common, just worded better
17:11:13 <ehird> ais523: conkeror is OPEN SOURCE
17:11:14 <ais523> in fact, it reminds me of the actually correct version of the wording
17:11:16 <ehird> everyone is a "worker" of it
17:11:20 <ehird> there's no people actually "in" conkeror
17:11:31 <ais523> the problem's with who the exception is given to
17:11:41 <ais523> but legally speaking, it can be given to any set of people and the licence still works
17:12:08 <ehird> doesn't mean the reclicensing works
17:12:25 <ehird> Tax bracket system should work differently, which is that for example if $0.01 to $200.00 is 0% and $200.01 to $400.00 is 10% and if you earn $300.00 then you should pay $10.00 in taxes, not $30.00 (note that my numbers are just examples, these actual numbers are stupid but the idea has to do with how the calculations are done, not the actual rates used)
17:12:27 <ehird> Maybe that is unclear. But maybe if I write it in Javascript then it will be easier to understand? Or maybe not. I will write in Javascript anyways.
17:12:38 <ehird> this guy is like a troll minus the troll
17:12:50 <ehird> he's impossible to understand and often slightly clueless, except minus the frustration
17:12:57 <ehird> and he's just writing on his blog nowadays so he isn't even talking to anyon
17:33:39 -!- oerjan has joined.
17:37:43 <AnMaster> <ehird> when i quote someone stupid for no particular reason <ehird> please stop responding seriously <-- you aren't that nice when I do it...
17:38:00 <ehird> he does it less often.
17:39:16 <ais523> ehird: I respond seriously only when it's actually funny
17:39:32 <ais523> or when, in this case, I don't think the comment is as stupid as you think it is (yet, of course, still stupid)
17:41:29 <ehird> i wonder where chris pressey works
17:41:43 <ehird> i wouldn't be surprised if he somehow makes money out of cats eye, due to the expanse of http://catseye.tc/projects/
17:46:06 <ehird> Established by Chris Pressey in Winnipeg, Manitoba, Canada, and now located in Vancouver, British Columbia, Cat's Eye Technologies has provided custom software development and consulting services since 1995. Our clients have included Manitoba Health, Star Building Materials, Morrison Homes, and Samkoma.com.
17:46:30 <ais523> it's pretty amazing that a genuine company has a whole esolang win
17:46:40 <ais523> especially one so famous
17:47:30 <ehird> well, it's just one guy :P
17:47:44 <ehird> who does freelancing work. and happens to have an esolang hobby.
17:49:16 <ehird> http://catseye.tc/about/php.html
17:49:30 <ehird> the last paragraph is priceless
17:49:41 <ehird> especially since it's a real error
17:50:38 <ehird> "Perl is what happens when you play Katamari Damacy with the Unix toolchain. This condition has been less gracefully described, by others, as "being a steaming heap." "
17:50:40 <ehird> http://catseye.tc/about/perl.html
17:50:41 <ais523> how do you know it's a real error?
17:50:46 <ehird> ais523: the source code
17:50:51 <ehird> the linebreak and everything
17:50:54 <ehird> is exactly the same
17:50:54 <ais523> is it linked from the page?
17:51:08 <FireFly> Too bad it wasn't line 404
17:51:18 <ais523> I do like the idea of playing Katamari Damacy with the UNIX toolchain, though
17:51:20 <ehird> /internal/directory/structure/home/website/include/oh_drat.php
17:51:23 <ehird> that's obviously fake
17:51:31 <ehird> so i guess he caused a php error
17:51:33 <ehird> then copied the code
17:51:47 <oerjan> <ais523> I'd say Unlambda and INTERCAL are two good examples
17:51:58 <ais523> oerjan: of esolangs which are hard to compile/interpret
17:52:03 <oerjan> unlambda is easy if you think in terms of graph rewriting
17:52:04 <ais523> as opposed to BF, which is easy
17:52:20 <ais523> oerjan: I suppose rewriting langs would be good at d
17:52:23 <ais523> how good are they at c?
17:52:32 <ais523> OTOH, actually writing a graph rewriting lang in the first place is nontrivial
17:52:39 <oerjan> you use CPS style, of course
17:52:41 <ehird> I want to write an unlambda->efficient c compiler
17:52:49 <ehird> it isn't self-modifying is it?
17:53:01 <ais523> but d makes it self-resemanticising
17:53:29 <ehird> can't you just track d tags and pass thunks to d-tainted functions?
17:53:35 <ehird> to be efficient on non-D using code
17:53:44 <ais523> oh, I'm sure there are tricks that work
17:54:01 <ais523> as for c, if you're using CPS you need to do garbage collection of continuations somehow
17:54:20 <oerjan> actually by graph rewriting i mean little more than ML/haskell style ADTs with pattern matching
17:54:26 <ehird> ais523: http://home.pipeline.com/~hbaker1/CheneyMTA.html
17:54:33 <ais523> oerjan: that's what I was thinking of too
17:54:34 <ehird> you convert to cps
17:54:35 <ehird> you allocate everything on the stack
17:54:38 <ehird> and you use regular c function calls
17:54:42 <ais523> I normally use Thutu for that sort of thing
17:54:49 <ais523> or even more fun, recursive Perl regexen
17:54:51 <ehird> to clear the cstack
17:54:51 <oerjan> ais523: oh, the point is the continuations can _also_ be done as such structures
17:55:05 <ehird> it's a generational garbage collector that's really insanely fast beacuse you just call c functions and allocate on the stack
17:55:13 <ehird> it's a piece of art
17:55:28 <ehird> you get efficient allocation, function calls, continuations and GC, almost for free.
17:56:10 <ais523> hmm... it depends on longjmp/alloca
17:56:20 <ais523> presumably using alloca precisely because it plays well with longjmp
17:56:21 <ehird> it doesn't depend on alloca inherently
17:56:26 <ehird> although most of the time you want to use it
17:56:29 <ehird> but their example doesn't
17:56:31 <ais523> it's how it handles dynamic-size data
17:56:32 <ehird> it is _all_ stack-allocated
17:56:37 <ais523> alloca is stack allocation
17:56:45 <ehird> please stop talking to me like I don't know C
17:56:46 <ehird> read their example program
17:56:48 <ais523> I suppose you could use VLAs, but VLA + longjmp = madness
17:56:59 <ehird> http://home.pipeline.com/~hbaker1/cboyer13.c
17:57:44 <ais523> ehird: probably it just doesn't have any dynamic-sized data structures, so doesn't need it
17:57:54 -!- oklopol has quit (Read error: 145 (Connection timed out)).
17:58:22 <ehird> of course, alloca would be about as well-supported, easier to code, and more sane.
17:58:36 <ais523> I'm not certain that longjmp + VLA is guaranteed to do anything in particular
18:00:49 * ehird decides to write some perl
18:01:15 <ehird> unlambda-compiling perl to be specific
18:02:09 <ehird> guess what i'm going to do to be esoteric
18:02:27 <ais523> that's esoteric in Perl
18:02:57 <ehird> write my own object system.
18:04:23 <oerjan> i recall the bundled perl interpreter in the unlambda distribution was rather slow
18:04:35 <oerjan> as in, my INTERCAL interpreter was faster than it :D
18:04:43 <ehird> this will compile unl to semi-efficient c
18:05:52 <ais523> well, C-INTERCAL is designed to be not inherently slow
18:06:04 <ais523> but as in, it won't deliberately slow you down
18:06:13 <ais523> also it doesn't give a runtime penalty for features you aren't using
18:06:33 <oerjan> i thought that was a C++ mantra
18:06:35 <ehird> ais523 isn't nearly shocked enough :(
18:07:04 <ais523> oerjan: well, C++ is like that too
18:07:14 <ais523> but on the other hand, other langs do give a penalty for features you aren't using
18:07:18 <ais523> so we had to choose one or the other
18:07:45 <oerjan> of course there's an excuse, the perl interpreter was a debugger too
18:07:55 <ais523> that isn't really an excuse
18:08:01 <ais523> debuggers shouldn't give much of a runtime penalty either
18:08:07 <ais523> IIRC, even yuk doesn't slow programs down much
18:08:34 <ais523> anyway, there's a huge bug in the C-INTERCAL profiler atm
18:08:35 <ehird> hmm, what's the perl prototype that makes the {...} passed to the function be a sub {...}?
18:09:31 <ais523> wait, you're messing with prototypes?
18:09:37 <ais523> that's eso from the start
18:09:43 <ehird> ais523: it uses prototypes to implement a prototypical object system
18:11:17 <ehird> ais523: can you make an anonymous sub run in a certain scope?
18:11:21 <ehird> i.e., inject variables into it and stuff
18:11:54 <ais523> as long as the sub doesn't try to declare the variables itself
18:12:22 <ais523> you make sure the variables haven't been lexically scoped when the anon sub has been declared
18:12:38 <ehird> they need to be lexical inside the scope of the anon sub
18:12:41 <ais523> they mustn't be inside a my at any level, you have to be aiming at the globals when the sub was declared
18:12:48 <ais523> then, you use local inside the block that calls the sub
18:13:13 <ehird> hrm, actually I'll just do it like the rest of perl's oo system
18:13:16 <ais523> you can use local anywhere without interfering with this, it was deprecated in favour of my because my was saner
18:13:32 <ais523> but local, being insaner, is better for implementing that sort of insane scheme
18:13:40 <ehird> my $Rectangle = $Object->clone {
18:13:42 <ehird> my ($self, $w, $h) = @_;
18:13:44 <ehird> $self->width = $w; $self->height = $h;
18:14:08 <ehird> now to get that to run
18:14:27 <ehird> oops, first line should be
18:14:28 <ehird> my $Rectangle = $Object->clone->do {
18:14:40 * ais523 tries to remember the last time they saw a perl variable that started with a capital letter
18:14:44 <ais523> for some reason, that just Doesn't Happen
18:15:25 <ehird> does #include "__FILE__" work in C?
18:15:46 <ais523> I think it works without the quotes
18:15:58 <ais523> although it isn't guaranteed to, it will on most cpps
18:16:00 <ehird> ais523: here's what i'll do in the underload compilation:
18:16:13 <ehird> #ifndef _UNDERLOAD_HEADER
18:16:17 <ais523> (it isn't guaranteed because #include isn't guaranteed to work on non-standard-headers, e.g. if you don't have a filesystem)
18:16:24 <ehird> stop ruining my paste
18:16:28 <ehird> #ifndef _UNDERLOAD_HEADER
18:16:30 <ehird> #define _UNDERLOAD_HEADER
18:16:33 <ais523> if you don't want people to ruin your pastes, use a pastebin
18:16:38 <ais523> besides, it's still readable anyway
18:16:40 <ehird> i'm writing it as I go
18:16:42 <ehird> so here I start again
18:16:45 <ehird> #ifndef _UNDERLOAD_HEADER
18:16:47 <ehird> #define _UNDERLOAD_HEADER
18:16:54 <ehird> #undef _UNDERLOAD_HEADER
18:16:59 <ehird> (HERE GOES UNDERLOAD CODE)
18:17:03 <ais523> it's not as if you're using telnet, surely other people's comments don't interfere with typing?
18:17:04 <ehird> (BORING HEADER BOILERPLATE)
18:17:18 <ehird> i.e., it hides the boring boilerplate definitions at the bottom of the file
18:17:23 <ehird> while still letting them be used in the top of the file
18:17:25 <ais523> Underload, or Unlambda?
18:17:34 <ehird> unlambda, but whatever
18:17:40 <ehird> that's irrelevant to the trick :P
18:17:47 <ais523> ehird: please, they're as different as Java and JavaScript
18:17:57 <ehird> they're irrelevant _to the trick_
18:19:15 <oerjan> <ais523> 1 million's about the population of Birmingham, so it seems a bit excessive <-- is that the official UK definition of excessive?
18:19:32 <AnMaster> wow this fingerprint spec is quite large
18:19:38 <ais523> oerjan: no, but it may as well be
18:19:39 <AnMaster> it is already 200 lines, and far from complete
18:19:41 <ais523> AnMaster: which fingerprint?
18:19:42 <ehird> say, does perl have a built-in exception handling system?
18:19:47 <ais523> IFFI's about that long, but complete IIRC
18:19:58 <ais523> it's eval {} for try {} (note, not eval "")
18:20:08 <ais523> catch is done using one of the weirdly named variables
18:20:14 <ais523> probably $@, but I might be wrong on that
18:20:16 <ehird> okay, ummm, how do you have different types of exceptions there :DD
18:20:33 <ais523> ehird: I'm not sure offhand if you can throw anything but a string
18:20:39 <AnMaster> ais523, what language is this?
18:20:40 <ais523> but if you can, you can just use isa on the object to see what it is
18:21:04 <ehird> ... stuff with $@ ...
18:21:18 <AnMaster> ehird, that is perl's exception handling?
18:21:30 <ais523> AnMaster: this is Perl we're talking about
18:21:32 <ehird> it just lets you recover from a die "foo"
18:21:38 <ais523> all its features were bolted onto the core as simply as possible
18:21:43 <ehird> because eval { } will be false when it dies
18:21:48 <ais523> which is why objects are basically just sugar for stuff
18:21:48 <ehird> so you can use or on it with a code block
18:21:51 <ehird> and the die string is put in $@
18:22:01 <ais523> ehird: I think the block might have to end with 1; for that to work
18:22:04 <AnMaster> ehird, does this work for language errors, say division by zero
18:22:10 <ais523> but then, Perl modules have to end like that for the same reason
18:22:18 <ais523> although it throws a string in that case
18:22:31 <ais523> you can use ref $@ to see if it's a string or not
18:22:38 <ehird> does perl have an empty package built in?
18:22:42 <ehird> like BLANK or something
18:23:02 <ais523> although some, like strict or warnings, are very simple
18:23:10 <ais523> because they just set flags that the compiler reads
18:23:21 <ais523> what, you thought use strict; was a compiler directive?
18:23:37 <ais523> AnMaster: no, that's @ARGV
18:23:50 <ais523> what made you think it would be $@?
18:23:53 <AnMaster> well perl is often close to shell I noted...
18:24:13 <ais523> AnMaster: it's a mix of C, shell, and sed
18:25:00 <ais523> although that's more use English; than default
18:29:05 <ais523> AnMaster: use English; imports awk-like variable names
18:29:25 * ais523 wonders vaguely if awkwards is the opposite direction to sedwards
18:30:09 <ehird> 18:28 tomboy64 has left IRC ("This connection was severed because the sys-admin has been abducted by aliens and is now being tortured in the most pleasurab)
18:30:41 <AnMaster> ais523, so what would this awk script be in perl http://rafb.net/p/DOu9SY23.html ?
18:31:14 <AnMaster> ehird, I'm not sure if this is gawk specific or not since I have no other awk here
18:31:36 <AnMaster> ehird, also what package is awk2perl?
18:31:44 -!- KingOfKarlsruhe has joined.
18:31:45 <ehird> if you have perl you have it
18:32:01 <ehird> output looks correct to m
18:33:03 <ais523> AnMaster: http://rafb.net/p/fw7OUJ65.html
18:33:12 <ehird> yeah because he is unable to run program
18:33:27 <ais523> ehird: well, jumped to running a2p before that conversation started
18:33:33 <ais523> and only just saw your descriptions
18:33:42 <ehird> a2p is surprisingly competent
18:33:48 <ais523> ehird: it generated the line $[=1
18:33:52 * AnMaster waits for ehird to say he is sorry for that comment above to ais523
18:33:54 <ais523> which is very very deprecated in modern Perl
18:34:03 <ehird> who cares about modern perl
18:34:14 <ais523> ehird: it's more or less gets-level deprecation
18:34:23 <ais523> it doesn't automatically give everyone an evil handle to take over your computer
18:34:24 <ehird> if it works, it works
18:34:26 <AnMaster> <ehird> yeah because he is unable to run program <ehird> s <ais523> ehird: well, jumped to running a2p before that conversation started <ais523> and only just saw your descriptions <ehird> oops, sorry
18:34:33 <AnMaster> that is what I expected but didn't see
18:34:40 <ais523> ehird: the version number
18:34:47 <ais523> $[ is the base of arrays
18:34:54 <ais523> as in, normally arrays are zero-based
18:34:58 <ais523> $[=1; makes them one-based
18:35:03 <AnMaster> no one sane would make $] be a version number
18:35:07 <ais523> but changing the value causes chaos
18:35:13 <ehird> AnMaster: um, I made a mistake. do I have to point that out to everyone?
18:35:19 <ehird> i mean, he said he did it before the conversation
18:35:37 <ais523> apparently they chose it based on a bad pun, so people would remember it more easily
18:35:42 <AnMaster> ais523, well it makes no sense, I mean reserve the namespace $PERL_ or such and have $PERL_VERSION
18:35:43 <ais523> "Is this version of Perl within the right bracket?"
18:35:58 <ehird> AnMaster: that's longer.
18:36:09 <ehird> AnMaster: there you go.
18:36:17 <FireFly> [19:35:03] <AnMaster> no one sane would make $] be a version number <-- Last time I checked, we were in #esoteric
18:36:18 <ehird> it's perfectly readable to anyone who knows perl
18:36:19 <ais523> and they do have a reserved namespace, it's dollar followed by punctuation marks or control codes
18:36:22 <ehird> and makes hacking up scripts easy
18:36:26 <ehird> FireFly: wow, you caught on already
18:36:31 <ehird> don't worry, AnMaster is always like this
18:37:02 <AnMaster> ais523, well, what if they one day need more than the amount of punctuation marks or control codes
18:37:16 <ais523> they have already, but they didn't run out
18:37:33 <ais523> you can have variable names which start with a control code and are followed by normal letters
18:37:40 <ais523> written as ${^Variable}, for instance
18:37:45 <ais523> where ^V is either a literal control-V
18:37:52 <ais523> or the separate characters ^V
18:37:54 <ais523> to make it easier to type
18:37:56 <AnMaster> ais523, also that awk script was a lot nicer
18:38:01 <ais523> it's stored internally as a literal control-V, though
18:38:07 <ehird> omg machine compiled code
18:38:08 <AnMaster> but I assume you could make the perl code nicer
18:38:08 <ais523> and of course it was, written code > generated code
18:38:29 <AnMaster> <AnMaster> but I assume you could make the perl code nicer <ehird> omg machine compiled code <ehird> is <ehird> ugly!!
18:38:48 <ehird> <AnMaster> everyone types instantly, and network lag does not exist
18:38:52 <ais523> the Perl isn't that bad, though, apart from it's missing idiomatic abbreviations for if/else
18:38:59 <ais523> which makes it much vertically longer than it ought to be
18:39:04 <AnMaster> ehird, well you could wait a few seconds before over reacting
18:39:16 <ehird> it's called sarcasm
18:39:31 <AnMaster> ehird, it seemed like you were attacking me?
18:39:49 <ehird> i was responding sarcastically to comments I considered ridiculous.
18:40:25 <AnMaster> ais523, well it uses next line; instead of a switch or elseif or whatever, because each of those ends so it will never execute the next one
18:40:59 <ais523> AnMaster: there is no switch in perl, but an if/elsif chain would have made more sense
18:41:03 <ais523> just a2p isn't trying to optimise that case
18:41:13 <ais523> or even a ?: chain would have worked there
18:41:24 <AnMaster> ais523, true. would local($dir, $CC, $bits, $GC, $THR) = @_; detect missing parameters?
18:41:25 <ais523> (actually, I lied, there is a switch in Perl but it's really new and hasn't caught on yet)
18:41:51 <AnMaster> as in error out, or warn on missing parameters
18:41:54 <ais523> AnMaster: not without warnings on
18:41:56 <ais523> probably not even then
18:41:58 <ais523> it would just assign undef
18:42:03 <AnMaster> ais523, well the original awk code would
18:42:10 <ais523> you can check easily enough using @_ == 5
18:42:14 <ais523> just a2p neglected that check
18:43:01 <AnMaster> ais523, I don't understand the logic for the check if $running_under_some_shell; at the top
18:43:15 <ais523> AnMaster: that's for systems on which #! doesn't work
18:43:18 <ehird> AnMaster: it's a hack
18:43:22 <ehird> in shell, the next line won't be executed
18:43:24 <ais523> think about what the code does in sh
18:43:27 <ehird> but in perl, it's waiting for the end of the statement
18:43:30 <ehird> and that if makes it never run
18:43:39 <ais523> it is, in fact, a Perl/sh polyglot
18:43:49 <ais523> which reinvokes the program under Perl if it's running in sh
18:43:55 <ais523> hence the slightly weird phrasing
18:44:13 <AnMaster> ais523, that assumes perl is in /usr/bin however
18:44:22 <AnMaster> I think /usr/bin/env perl would be more portable
18:44:25 <ais523> it's often done with /usr/bin/env
18:44:27 <ehird> it uses the perl you have on your system
18:44:34 <ehird> #!/opt/local/bin/perl
18:44:35 <ehird> eval 'exec /opt/local/bin/perl -S $0 ${1+"$@"}'
18:44:37 <ehird> if $running_under_some_shell;
18:44:41 <ehird> AnMaster: you're not meant to distribute these scripts, ofc
18:45:01 <AnMaster> well then I would surely use the local awk on my system
18:45:09 <ehird> not everyone has gawk
18:45:18 <ehird> not everyone _wants_ gawk
18:45:20 <AnMaster> ehird, well it could be portable awk
18:45:29 <ehird> AnMaster: a2p is useful for porting scripts over
18:45:31 <AnMaster> since it is a local one off script
18:45:38 <ehird> it runs as object code out of the box as a proof-of-concept
18:45:42 <ehird> and lets you hack it up afterward
18:46:00 <AnMaster> ehird, it supports gawk extensions?
18:51:26 <AnMaster> " For aesthetic reasons you may wish to change the array base $[ from 1 back to perl’s default of 0, but remember to change all array subscripts AND all substr()
18:51:26 <AnMaster> and index() operations to match."
18:52:34 <ais523> it's more than just aesthetic reasons, though
18:52:45 <ais523> really, you don't want to force an array index of 1 onto all the other code you link it with
18:52:55 <ais523> although they have a fix for that in recent versions, it's hacky
18:53:05 <AnMaster> ais523, why do they set $[ then?
18:53:44 <ais523> AnMaster: to avoid having to wrap all the indexing operations in the whole program
18:53:51 <AnMaster> For efficiency, you may wish to remove the keyword from any return statement that is the last statement executed in a subroutine. A2p catches the most common
18:53:51 <AnMaster> case, but doesn’t analyze embedded blocks for subtler cases.
18:53:53 <ais523> the thing about Perl is it's good for large programs and short one-off scripts
18:54:08 <ais523> AnMaster: hmm... that shouldn't affect efficiency nowadays
18:54:11 <ais523> a2p must be really old
18:54:25 <ais523> you can write 4; instead of return 4;
18:54:29 <ais523> at the end of a procedure
18:54:40 <Mony> http://fichiers.asibasth.com/images/conneries/divers/Programmer_Superiority.jpg
18:54:41 <ais523> shouldn't affect efficiency apart from the time it takes to parse the return keyword, though
18:55:58 <AnMaster> ais523, what is $, = ' '; about?
18:56:12 <ais523> AnMaster: separator for print statements
18:56:38 <ais523> print "a", "b", "c"; is equivalent to print "a$,b$,c$/";
18:56:45 <ais523> except that the second one would actually print $/ twice, as it's implicit
18:56:49 <AnMaster> ais523, anyway how do you set input separator? because the call to the script did that with -F iirc
18:57:04 <ais523> although that can't be a regex in Perl, and it can be in awk
18:57:28 <AnMaster> I shall certainly remember it, will be useful
18:58:08 <AnMaster> It would be possible to emulate awk’s behavior in selecting string versus numeric operations at run time by inspection of the operands, but it would be gross
18:58:08 <AnMaster> and inefficient. Besides, a2p almost always guesses right.
18:58:08 <AnMaster> Storage for the awk syntax tree is currently static, and can run out.
18:58:35 <ehird> why's that notable?
18:59:52 <AnMaster> ehird, what? the strange bug about using static storage?
19:00:18 <AnMaster> ehird, well wikipedia has an article on him so I guess he is notable?
19:00:27 <ehird> but why is it notable that he wrote a2p
19:00:31 <ehird> why did you quote that block
19:00:34 <oerjan> HOW DARE YOU INSULT THE GREAT LARRY WALL
19:00:35 <ais523> AnMaster: he's notable for writing Perl
19:00:40 <ais523> so writing a2p too is hardly surprising
19:00:49 <ais523> that's like calling me notable for writing convickt
19:01:02 <ais523> not for that reason, though
19:01:20 <AnMaster> ais523, well after looking at convickt code I would say: very notable for that
19:03:44 <ehird> Just to put this into perspective, I never use getopt, either in C or in perl.
19:03:44 <ehird> I suppose this could be construed as a character flaw.
19:03:45 <ehird> —Larry Wall, Dec 1989
19:04:05 <ais523> there are lots of good Larry Wall quotes
19:04:09 <AnMaster> ehird, "put what in perspective"
19:04:14 <ehird> http://groups.google.com/group/comp.lang.perl/browse_thread/thread/4bda45c06e872fef/86586c72bf0ddc18#86586c72bf0ddc18
19:04:29 <ais523> the one about real programmers not needing backups, but instead persuade the whole Internet to mirror their work, I think is quite insightful
19:04:58 <ehird> backing up a gpg-encrypted drive image via thepiratebay could work, if you bundle parts of it with illegal material
19:05:12 <ehird> I remember once I uploaded a computer game to the pirate bay -- skip ahead a year, I can't find my disc.
19:05:19 <ehird> So I download my own copy from everyone else.
19:05:27 <ehird> that was quite silly
19:07:27 <AnMaster> ehird, also isn't the pirate pay just a torrent searcher, not a tracker?
19:07:43 <ehird> it's a tracker that provides a search facility for the torrents it tracks
19:07:52 <AnMaster> ehird, and not for other's torrents?
19:08:10 <ehird> No. Sites like torrentz.com aggregate torrent trackers into a search engine.
19:09:18 <ehird> I wonder if bless {}, NULL will work in perl
19:09:29 <ehird> AnMaster: that would run the script getopt.pl
19:09:30 <AnMaster> isn't it use getopt? or something
19:09:36 <ehird> and this is from _1989_
19:09:46 <AnMaster> so it is probably a module nowdays?
19:09:56 <ehird> perl was only 2 years old back then, and had only been public i think for like a year
19:09:59 <AnMaster> modules didn't exist back then?
19:14:38 <ehird> hee, I found the torrent
19:14:45 <ehird> seeder 0, leechers 1 :(
19:15:04 -!- sebbu has joined.
19:15:10 <AnMaster> how to represent NULL in funge? as in NULL from SQL
19:15:38 <ais523> AnMaster: hmm... are you mostly dealing with string data?
19:15:55 <AnMaster> ais523, um? as in type of prepared statement or type or return value
19:16:04 <AnMaster> I try to make it support several types
19:16:15 <ais523> if so, you could use -1 or some other character that doesn't make sense in strings
19:16:15 <ais523> but that's no good if you're returning an integer
19:16:19 <AnMaster> currently I have <type><data> where format of <data> depends on <type>
19:16:29 <ehird> every window in my browser
19:16:34 <AnMaster> ais523, and yes I support integers and blobs
19:16:34 <ehird> without me telling it to
19:16:45 <ais523> and keyboard, or mouse?
19:16:47 <ehird> ais523: yep, i'll explain
19:17:05 <ehird> i pressed cmd-w to close one window, while i was pressing it, my (wireless) keyboard lost connection for some reason
19:17:14 <ehird> and so the OS never got the "keypress up" signal from it
19:17:17 <ehird> so it thought i was holding it down
19:17:24 <ehird> and it stopped when the last window was closed, and thus there was no focus
19:17:27 <ais523> that's a bug, isn't it?
19:17:39 <ehird> it's not exactly gonna be common though
19:17:41 <AnMaster> ehird, I wouldn't use a wireless keyboard anyway
19:17:51 <ehird> that's nice. i don't care. it was my system, not yours
19:18:01 <ais523> I don't know about other protocols, but on Windows the protocol is to send a key-down message for every time the key should appear, then a key-up at the end
19:18:02 -!- sebbu2 has quit (Connection timed out).
19:18:10 <ais523> so holding down a key gives down,down,down,down,down...
19:18:13 <ais523> and letting go gives up
19:18:22 <ehird> that's not how it works at the hardware layer
19:18:25 <ais523> that's how messages are sent to the software
19:18:33 <ais523> hardware using a similar method would make sense, probably
19:18:42 <AnMaster> ehird, you have a short fuse (as I would say in Swedish, "kort stubin", not sure if the translation is very unidiomatic or not)
19:18:43 <ehird> because the repeat rate is configurable
19:18:52 <ais523> AnMaster: it is idiomatic
19:19:01 <ais523> ehird: yes, but wouldn't the keyword be?
19:19:05 <ehird> AnMaster: no, i've just learnt that talking with you is so irritating that I try not to give it too much thought.
19:19:07 <ehird> ais523: well, yes...
19:19:11 <ehird> but anyway, that's how keyboards work
19:19:18 <ehird> so the driver never got "key X up"
19:19:47 -!- kar8nga has joined.
19:20:25 <ehird> ok, $Object->{hello}(); works
19:20:32 <ehird> now to make $Object->hello work
19:20:32 <AnMaster> ehird, if it detects the lost connection (which I know it does for wireless mouse on OS X at least) it should send the key up event itself
19:21:07 <ehird> hey, what perl method gets called when the method isn't known again?
19:21:08 <ais523> ehird: most people wouldn't consider all their windows closing a feature...
19:21:14 <AnMaster> ehird, I'm pretty sure I have seen an ibook display "connection lost" under an image of a mouse
19:21:32 <AnMaster> ehird, the same for keyboards I assume?
19:21:50 <AnMaster> and for mouse it sends button up when that box shows up
19:21:50 <ehird> ais523: what args does it get? :\
19:22:40 -!- ais523 has quit (Read error: 60 (Operation timed out)).
19:22:56 <AnMaster> ouch that sounds like the C pre-processor trying to auto add missing includes XD
19:24:51 <ehird> http://pastie.org/private/xisw72zrb5danroibmor7a c program reordering
19:24:58 <ehird> self-contained files without huge library bulk at the top.
19:25:46 -!- ais523 has joined.
19:27:38 <AnMaster> ehird, why though? I don't see the point
19:27:45 <ehird> for compiler output
19:28:00 <ehird> the huge support functions can be at the bottom so you can inspect the compiled unlambda easily
19:28:02 <AnMaster> ehird, why not just add the include at the top instead
19:28:03 <ehird> without scrolling a lot
19:28:14 <ehird> AnMaster: that adds a function too
19:28:19 <ehird> note that there's no prototype before it
19:28:22 <ehird> it just reorders thec ode
19:28:24 <AnMaster> ehird, this is from an unlambda compiler?
19:28:33 <ehird> i'm planning to write it :P
19:28:44 <ehird> also, I'll keep the constant name.
19:28:48 <AnMaster> ehird, well yes for that I guess it makes a certain amount of cense
19:29:38 <ehird> http://www.nordier.com/v7x86/index.html
19:30:53 <ehird> __PROXY=HASH(0x18006a0)
19:31:00 <ehird> __PROXY=HASH(0x18006a0)
19:31:02 <ehird> now why does it duplicate that arg...
19:35:07 * ehird tries to figure out how to define a variable i n another package
19:35:29 <ehird> a package I made up.
19:35:44 <AnMaster> and what is this HASH() thing? MD5 hash?
19:36:10 <ais523> AnMaster: no, it's an attempt to print a pointer to a hash
19:36:21 <ehird> our $__PROXY::foo;
19:36:34 <ais523> ehird: that makes no sense
19:36:43 <ehird> and that's why I want to do it.
19:36:45 <ais523> so what /are/ you trying to do?
19:36:56 <ehird> as if in __PROXY "our $foo;" was done
19:37:12 <ehird> aha, I got it working
19:37:12 <ais523> you're trying to declare a lexically scoped variable... in a different scope?
19:37:16 <ehird> sub __PROXY::AUTOLOAD {
19:37:17 <ehird> my ($obj, @args) = @_;
19:37:18 <ais523> AnMaster: my is a keyword too
19:37:19 <ehird> print $__PROXY::AUTOLOAD,"\n";
19:37:37 <ais523> AnMaster: they declare lexically scoped variables
19:37:40 <ais523> sort-of like auto in C
19:37:45 <ais523> except in C you have to give the data type
19:38:02 <ais523> in Perl, you don't, which is why the auto-like keyword is needed
19:38:09 <AnMaster> ais523, so what if you don't use my, what sort of scope is used then?
19:38:15 <ehird> AnMaster: dynamic scope
19:38:33 <ehird> "local" is for dynamic scope
19:39:06 <ais523> ehird: "local" is for INTERCAL-like scope
19:39:24 <ehird> ais523: question, how can you say "is this a sub"?
19:39:43 <ais523> well, it's a sub if you're running it
19:39:49 <ais523> checking for a pointer to a sub would make more sense
19:39:52 <ais523> which you can do with ref
19:39:59 <AnMaster> ehird, if (Object.IsSubmerged()) return true;
19:40:00 <ais523> AnMaster: push/pop on a stack for scoping
19:40:21 <ehird> how do you call an anonymous sub again?
19:40:54 <ehird> it just wasn't funny
19:41:04 <ais523> ehird: &$variable_holding_pointer_to_sub;
19:41:15 <AnMaster> you never like my jokes ehird :(
19:41:18 <ehird> ais523: actually, the anonymous sub is the result of a function calll.
19:42:10 <ehird> ais523: do you have to do ->() or something?
19:42:24 <ais523> ehird: that's syntactic sugar, which works
19:42:34 <ais523> the non-sugared version is &{put call here}();
19:43:08 <ehird> ais523: ok, now how do I execute some code in the context of whoever called me? <_<
19:43:31 <ais523> ehird: you're already in the context of whoever called you, apart from lexically scoped variables
19:43:42 <ais523> lexical scoping is deliberately sane, so you aren't going to be able to get around it
19:44:01 <ehird> functions can use caller
19:44:09 <ehird> I want caller to be whoever called this method, in the function I call
19:44:23 <ehird> so, I just want to contort the call stack
19:44:46 <ais523> ehird: ah, interesting
19:44:53 <ais523> do you return immediately after the call, or do you do other things?
19:45:04 <ehird> return the result of the call, immediately after it returns
19:45:14 <ais523> Perl has a primitive just for you, then
19:45:25 <ais523> that's the tail-recursion primitive
19:45:27 <ehird> and with arguments?
19:45:33 <ehird> goto &procedure(@args);?
19:45:33 <ais523> you put them in @_ before the call
19:45:40 <ehird> ais523: okay, what about if I have a subref?
19:46:12 <AnMaster> ais523, does perl support "normal" goto? I mean like goto in C
19:46:25 <ais523> yes, although it's bad style
19:46:29 <ehird> oh my fucking god.
19:46:52 <ais523> ehird: what's wrong with a tail-recursion primitive which lets you tail-recurse to /different/ procedures?
19:46:56 <ais523> actually, that was its original use
19:47:03 <ehird> ais523: you've got to see this
19:47:05 <ehird> http://pastie.org/private/c1x8277pqihm1ht3srcwfg
19:47:33 <ais523> ehird: is that a good thing, or a bad thing?
19:47:39 <AnMaster> ehird, my $name = $__PROXY::AUTOLOAD; ?
19:47:41 <ehird> i wish I knew, ais523
19:47:58 <ehird> AnMaster: google it, i'd have another breakdown if I tried to explain
19:48:19 <ais523> ehird: that's the original purpose for which AUTOLOAD and goto & were invented
19:48:23 <AnMaster> ehird, well googling that exact string found nothing, I have no clue what to google
19:48:27 <ehird> ais523: i know, but what it does
19:48:31 <ehird> it invents an object system
19:48:35 <ehird> and a whole new object semantics
19:48:40 <ehird> with that horrible, horrible stuff
19:48:42 <ais523> does it make you feel dirtier or less dirty to know that you're using those commands with their intended meaning?
19:48:52 <ehird> I think it's the fact that I can use them to give that result
19:49:05 <ehird> I mean, variables and functions in the same namespace?
19:49:21 <ais523> they aren't in the same namespace
19:49:28 <AnMaster> ehird, is this object orientation for perl?
19:49:33 <ehird> $Object->foo(1,2,3)
19:49:37 <ehird> AnMaster: perl already has object orientation
19:49:37 <ais523> AnMaster: Perl has at least 2 object-orientation systems already
19:49:42 <ehird> i'm just abusing one aspect of it
19:49:45 <ehird> in a deliciously perverse way
19:49:47 <ehird> to invent my _own_ system
19:50:05 <ais523> AnMaster: the default one
19:50:10 <ais523> and lots of others as CPAN modules
19:50:12 <AnMaster> wouldn't just adding basic OO work
19:50:13 <ais523> probably using similar tricks to ehird
19:50:31 <AnMaster> ais523, so the perl built in OO is not very good?
19:50:37 <ehird> mine doesn't pass along self
19:50:41 <ais523> no, it's just too general
19:50:48 <ais523> and thus confusing to use, and not particularly standardised
19:51:30 <AnMaster> ais523, sounds like even PHP OO is saner than that
19:51:40 <ehird> wait, I wonder how my use of unshift worked
19:51:46 <ehird> it actually did a pop...
19:51:59 <ehird> oh no... I can't figure out my own code...
19:52:05 <ais523> unshift pushes to the left of an array, pop pops from the right
19:52:37 <oerjan> so unshift should be called mom then?
19:53:25 <ais523> oerjan: I was going to reply to that, but couldn't think of anything sensible to say
19:53:28 <ais523> AnMaster: it's a really bad pun
19:53:43 <ehird> how do you merge two hashes in perl?
19:53:50 <oerjan> AnMaster: ask your mom or pop
19:53:56 <ais523> ehird: %a = (%b, %c) for hashes
19:54:19 <ehird> can you do %$self = ...;?
19:54:24 <ais523> should be pretty obvious given the syntax for dereferencing
19:54:40 <ais523> actually, I'm not entirely sure if assigning to self screws up the blessing
19:54:47 <ais523> and yes, to merge into a hash
19:54:52 <ais523> but you can easily just rebless once you're done
19:54:58 <ehird> my ($self, $more) = @_;
19:54:59 <ehird> %$self = (%$self, %$more);
19:55:13 <ais523> did it mess up the blessing?
19:55:24 <ehird> i don't want parens
19:55:29 <ehird> I need a prototype
19:55:37 <ais523> what you're saying makes no sense
19:55:41 <ais523> you can't have object calls with prototypes
19:55:47 <ais523> because then you could change the syntax at runtime
19:55:47 <ehird> AnMaster: well, yes
19:55:49 <ehird> larry wall is christian
19:55:54 <ehird> but bless is part of the OO system
19:56:03 <ais523> AnMaster: no, it's just the syntax for associating a pointer with a class
19:56:05 <ehird> ais523: you can anyway :P
19:56:07 <ais523> to tell it what class it's an object for
19:56:14 <ais523> only inside BEGIN{} blocks
19:56:20 <ais523> even eval doesn't change the syntax at runtime
19:56:25 <ehird> umm, schwartzian snippet
19:56:27 <ais523> what confuses people is that eval has a compile then run
19:56:45 <ais523> but that only affects the code inside the eval
19:56:47 <AnMaster> <ais523> because then you could change the syntax at runtime <-- Feather!
19:57:10 <ehird> ais523: then what about the schwartzian snippet
19:57:14 <ehird> or wtf it's called
19:57:19 <ais523> the one that says parsing Perl is TC?
19:57:26 <ais523> it just runs the prototype code in a BEGIN {} block
19:57:32 <ais523> which in Perl, is technically compile-time
19:57:45 <ais523> being able to run arbitrary code at compile-time = having TC syntax
19:58:00 <AnMaster> Schwartzian Transform is the only hit
19:58:10 <ehird> http://www.perlmonks.org/?node_id=663393
19:58:14 <ehird> whatever / 25 ; # / ; die "this dies!";
19:58:17 <ehird> that can be parsed two ways
19:58:21 <ehird> if whatever takes no arguments, it's a call to it
19:58:29 <ehird> if whatever takes an argument
19:58:31 <ehird> it calls whatever with a regexp
19:58:43 <ehird> but you can define functions at runtime...
19:59:37 <ais523> ehird: prototypes are compile-time only
19:59:47 <ais523> that's why there's a BEGIN block in the proof
20:00:01 <AnMaster> ais523, prototypes as prototypes in C?
20:00:12 <ais523> AnMaster: not exactly, as they modify the syntax of the language
20:00:23 <ais523> although they say what type each parameter is, just like C prototypes do
20:00:30 <AnMaster> ais523, I thought Perl didn't have C-style prototypes
20:00:55 <ehird> how can I get $Object->do { to work
20:00:57 <ais523> saying what type each parameter is isn't sufficient to be a C-style prototype
20:01:03 <ais523> ehird: Source filters!
20:01:09 <ais523> (N.B. not recommended)
20:01:12 <ehird> ais523: FUCK YOU :(
20:04:00 <ehird> ais523: couldn't I define a dynamic prototype on AUTOLOAD? <__<
20:04:19 <ais523> Perl is a compiled language!
20:04:25 <ehird> ais523: hmm, perl needs a ,= operator
20:04:28 <ehird> %$self = (%$self, %more);
20:05:24 -!- Mony has quit ("Quit").
20:05:27 <ehird> that is for strings
20:05:29 <ais523> AnMaster: that's for string concatenation
20:05:32 <ais523> not array concatenation
20:05:34 <AnMaster> ehird, yes I was wondering if it existed
20:05:37 <ehird> AnMaster: you can't even compare strings and ints the same way
20:05:38 <ais523> which would indeed be ,= if it existed
20:05:54 <ehird> i was just saying something funny.
20:06:09 <ehird> how do you copy a hash in perl <__<
20:06:12 <ais523> but then, it does in PHP too, and PHP doesn't have a string-compare operator
20:06:23 <ais523> ehird: just assign it without using a reference
20:06:30 <ais523> as in my %new_hash = %$oldhash
20:06:37 <ehird> i much prefer (= x y), (equal? x y), (eqv? x y) and (eq? x y)
20:06:38 <ais523> and you can then return a reference to new_hash
20:06:43 <ehird> (Scheme has _all_ of those comparison ops.)
20:06:48 <ehird> (They're all useful in all different situations.)_
20:07:03 <ehird> R5RS Scheme is interestingly complete in the few areas it dabbles in.
20:07:06 <ais523> Perl has ||=, if you're after weird operators
20:07:07 <ehird> It has a comprehensive numeric tower.
20:07:14 <ehird> ais523: eh, ruby has that
20:07:21 <ehird> it's "initialize this var if it isn't already"
20:07:25 <ehird> FireFly: a ||= b is actually
20:07:36 <ais523> ehird: no, it's a = (a || b)
20:07:47 <ehird> ais523: well, in Perl maybe
20:07:49 <ehird> but in ruby it's that
20:07:53 <ais523> ehird: they mean the same thing
20:08:00 <ais523> because if a, then a || b is the same as a
20:08:07 <ehird> in Ruby, the assignment is never triggered
20:08:12 <ehird> a very VM-level distinction, yes
20:08:16 <ehird> but one nevertheless
20:08:19 <ehird> it's actually faster
20:08:26 <ehird> ais523: i don't think you can detect it
20:08:32 <ehird> you can in a C extension, probably, though
20:08:36 <ais523> if you can't detect it from inside the program, then it semantically is a = (a || b), and it's just being optimised
20:08:53 <ehird> bless %$self, __PROXY;
20:09:14 <ehird> should just be $self
20:09:31 <ais523> ehird: that doesn't copy the object
20:09:40 <ais523> it should be my %copy_of_self = %$self;
20:09:52 <ais523> bless \%copy_of_self, $self;
20:09:52 <ehird> my $copy_of_self = \%$self;
20:10:01 <ais523> ehird: no, that's wrong
20:10:10 <ais523> \%$self is like writing &*self in C
20:10:15 <ais523> you get back self, not a copy of it
20:10:30 <ais523> you want to dereference, copy the dereferenced value, then reference the copy
20:10:36 <ais523> that's what a deep copy /is/, after all
20:10:43 <ehird> a prototypical object system in Perl in 27 lines
20:10:58 * ehird adds one last nicety
20:11:40 <AnMaster> ais523, err a deep copy is more, it copies any pointers in the struct too
20:11:52 <ais523> a non-shallow non-deep copy
20:11:53 <AnMaster> ais523, you mean a shallow copy
20:11:59 <ais523> no, a shallow copy just copies the pointer
20:12:10 <AnMaster> ais523, no that would be making a copy of the reference
20:12:10 <ais523> you're duplicating the struct, but not pointers inside it
20:12:18 <ais523> AnMaster: ah, that's what I call a shallow copy
20:12:20 <AnMaster> a shallow copy would copy level 1
20:12:32 <AnMaster> but I thought shallow copy was what you described
20:12:33 <ais523> it's one-level copies we're talking about, anyway
20:12:35 <ehird> http://pastie.org/private/jenlaevavatsjngzjmsljw
20:12:41 <ehird> A PROTOTYPICAL OBJECT SYSTEM IN AROUND 30 LINES OF PERL
20:13:06 <ehird> I will add delegation to multiple prototypes instead of just one, then that'll be version 1.
20:13:12 <ehird> I shall use it for my underload to C compiler. :D
20:13:19 <ehird> It will be called... Minob.
20:13:28 <ehird> Slogan: So small you can just paste it in.
20:13:45 <AnMaster> ehird, what about private members?
20:14:03 <ehird> AnMaster: Eh, private data is for weenies.
20:14:17 <AnMaster> also C++-style friend for the extra "eww"
20:14:18 <ehird> I don't even think CLOS has it, and CLOS is a pretty good object system.
20:14:22 <ais523> AnMaster: in Perl, the convention is not to declare as private, just to not access other class's private stuff
20:14:28 <ehird> AnMaster: Just call the var _foo if you really don't want anyone to touch it
20:14:37 <AnMaster> ais523, well perl usually have good documentation so I guess it works
20:14:49 <ehird> I'd prefer to be able to do
20:15:09 <ais523> leading underscore's normally used for internals, so as to let people know not to use it
20:15:19 <ais523> but that isn't actually enforced
20:15:21 <ehird> ais523: how would I go about doing it with sub?
20:15:28 <AnMaster> ais523, ah it isn't reserved for something?
20:15:40 <ais523> apparently, they use the leading underscore to scare C programmers
20:15:59 <ais523> AnMaster: no, from private internals
20:16:23 <ehird> ais523: is there an "anti ,="? :D
20:16:23 <ais523> ehird: the problem is that sub hello { } is a named subroutine declaration
20:16:39 <ais523> you aren't going to be able to return a value like that
20:16:45 <ais523> that's why anonymous subs exist, after all
20:16:47 -!- KingOfKarlsruhe has quit (Remote closed the connection).
20:16:52 <ais523> as for an anti ,=, what do you want to do?
20:16:56 <ais523> remove elements from a hash?
20:16:58 <ehird> un-concatenate hashes
20:17:16 <ehird> what I really need is to define AUTOLOAD on the hash _itself_
20:17:17 <ais523> ehird: does that differ from removing elements which are the keys of a given hash?
20:17:32 <ehird> ais523: nope. any ideas how I could "AUTOLOAD the hash"?
20:17:34 <AnMaster> ais523, perl is basically hack * (awk + sed + C + sh + rand())
20:17:37 <ehird> $hashref->{fooasdasdasd}
20:17:40 <ehird> would call a subroutine
20:17:50 <ais523> ehird: yes, you could tie the hash
20:17:55 <ais523> but then anyone sane will kill you
20:18:05 <ehird> ais523: can you bless a tied hash?
20:18:09 <ais523> and I have no idea how tied hashes interact with the OO system
20:18:17 <ais523> I'm not at all convinced that you can bless a tied hash
20:18:21 <ehird> im gonna ask #perl XD
20:18:25 <ais523> although I'm pretty sure it's in an FAQ somewhere
20:18:26 <oerjan> AnMaster: i really liked that katamari damacy reference earlier
20:18:32 <ehird> 20:18 <ehird> Can you bless a tied hash? Don't ask.
20:18:32 <ehird> 20:18 ais523 has joined (n=ais523@147.188.254.127)
20:18:43 <ais523> ehird: I'm here to watch the fun
20:18:46 <ehird> of course, now they will ask.
20:18:47 <AnMaster> <ehird> im gonna ask #perl XD <-- I'm going to watch too
20:18:48 <ais523> it isn't something you'd do if you were sane
20:19:30 <ehird> http://perldoc.perl.org/Tie/Hash.html
20:19:33 <AnMaster> ehird, when you are done you should pastebin your code there
20:19:40 <ehird> 20:19 <mst> ehird: you can bless any reference, perl doesn't give a shit what it's a reference -to-
20:19:44 <AnMaster> ehird, I want to see their reactions
20:19:45 <ehird> itt: hardcore perl users don't be givin' a shit
20:19:47 <ais523> ehird: no, that's the CPAN module for tying hashes
20:19:57 <ais523> there's a tie primitive
20:19:58 <ehird> if that was a cpan module
20:19:59 <ehird> Home > Core modules > T > Tie::Hash
20:20:13 <ais523> ehird: well, core is also CPAN, the way I think of things
20:20:17 <ais523> just because it's in core doesn't change things
20:20:29 <ehird> I think the sky is green.
20:20:29 <ais523> there's a primitive for doing tying, why bother with modules?
20:20:39 <ais523> ehird: modules get moved back and forth all the time
20:20:59 <AnMaster> ais523, well what is a tied hash then?
20:21:21 <ehird> 20:20 <buu> ehird: So, in short, "yes". And it does what you expect.
20:21:22 <ehird> 20:21 <ehird> buu: Hooray. What I expect is bunnies to fly out of my nose, though.
20:21:25 <ehird> 20:21 <buu> ehird: You're in luck!
20:21:25 <ehird> 20:21 <ehird> I'm so lucky!
20:21:57 <AnMaster> ehird, well this is a typical example of #perl I guess
20:22:13 <AnMaster> at least they would be happy about a hack like that python-with-no-indent hack you made
20:22:19 <ais523> Tie::Hash just defines the standard hash-tying methods
20:22:27 <ais523> AnMaster: ever seen ACME::Pythonic?
20:22:36 <ais523> IIRC, there was also a Python module to go the other way
20:22:38 <AnMaster> ais523, the name doesn't bode well
20:22:49 <ais523> AnMaster: it's a Perl source filter which gives it Python syntax
20:22:59 <ais523> and ACME is for the jokey/not entirely serious stuff on CPAN
20:23:08 <ais523> there's an ACME::Brainfuck, for instance
20:23:14 <ais523> which allows inline BF in Perl code
20:23:20 <ais523> without even any special syntax
20:23:28 <ais523> I think it uses heuristics to tell the BF and the Perl apart
20:23:29 <AnMaster> ais523, there is a python module for ; and {} in python I know
20:23:36 <AnMaster> filter or encoding or something
20:34:09 <AnMaster> ais523, hm how does it reinterpret the code?
20:34:19 <AnMaster> I mean it needs to reinterpret the code with a changed interpreter right?
20:34:36 <ais523> AnMaster: it's a source filter
20:34:44 <ais523> you have to write the use foo at the top
20:34:54 <ais523> and it goes and runs the rest of the code through the source filter before continuing to compile
20:35:00 <AnMaster> ais523, after any #!/bin/perl or such I assume?
20:35:07 <ais523> only from the use statement onwards
20:36:36 <AnMaster> also that ACME::Brainfuck, does it share memory with perl or something?
20:37:13 <ais523> I think it uses some var in the module itself as a tape and pointer
20:37:14 <AnMaster> ais523, I mean the bf code it runs
20:37:24 <ais523> it doesn't share memory with Perl
20:37:27 <AnMaster> how can they interact with each other memory
20:37:41 <ais523> but BF code is a Perl expression which returns the current value at the pointer
20:37:46 <ais523> and I think Perl can access the tape via some API
20:38:01 <AnMaster> ais523, this may interest you too http://www.postgresql.org/docs/8.3/static/ecpg-concept.html
20:38:38 <ais523> AnMaster: heh, that's source filters for C
20:39:16 <AnMaster> ais523, and it is serious, I can't see any serious use of a source filter for perl or C. I think ecpg is silly
20:39:33 <ais523> what about cpp? that's a source filter
20:40:17 <AnMaster> but I mean another source filter apart from cpp
20:40:34 <AnMaster> ehird, what is the last version of your OO system?
20:40:51 <ais523> last would imply there wouldn't be any more
20:41:15 <AnMaster> what about the last and greast?
20:42:05 * AnMaster wish it was last word instead of latest Office crap
20:42:48 <ais523> AnMaster: what in particular don't you like about it?
20:43:00 <AnMaster> ais523, well it's document format for a start
20:43:15 <AnMaster> even more so with the last XML based not-really-standard thing
20:43:31 <ais523> ok, I'll agree with that
20:43:51 <ais523> meh, clippy was easy to turn off
20:44:18 <AnMaster> ais523, and then there is the stupid "this sentence seems overly bureaucratic" when I type (message translated from Swedish word)
20:44:33 <ais523> it's "overly formal" in English
20:44:40 <ais523> but actually, I usually got the opposite error
20:44:49 <AnMaster> ais523, I never got the opposite
20:44:53 <ais523> Word's grammar-checker doesn't like people using the passive
20:45:02 <AnMaster> also it complains about "old Swedish" sometimes
20:45:20 <AnMaster> which again I use because I want to
20:45:34 <AnMaster> ais523, I guess it differs between languages
20:45:46 -!- Corun has joined.
20:45:49 <AnMaster> ais523, oh also they don't include spell checking or grammar checking for all the languages
20:45:59 <AnMaster> just English + language Word is localized in
20:46:08 <AnMaster> ais523, which is quite strange
20:46:23 <ais523> AnMaster: it's addonable, I think
20:46:26 <ais523> just not installed by default
20:47:53 <AnMaster> ais523, oh and openoffice is just as bad. I mean why are there no high quality office suites, I mean same level of quality as emacs is for text editors or such
20:48:30 <AnMaster> ais523, yes but that doesn't do the spreadsheet bit though
20:48:32 <oerjan> http://www.irregularwebcomic.net/744.html
20:48:43 <ais523> AnMaster: I've heard good things about Gnumeric, but never used it
20:48:49 <ais523> maybe I should download it and have a look
20:49:09 <AnMaster> ais523, I think I tried it a few years ago
20:49:15 <AnMaster> wasn't very good back then iirc
20:49:52 <AnMaster> ais523, that would mean installing half of gnome
20:50:56 <ais523> AnMaster: I have half of gnome installed already
20:51:03 <ais523> both Gnome and KDE are installed here
20:51:09 <ais523> besides, KDE4 still isn't finished
20:51:20 <ais523> so Gnome is the only real desktop environment I can use here atm
20:51:42 <AnMaster> ais523, KDE 3.x for me. And going awesome wm instead of KDE 4 when it is time for that
20:52:23 <AnMaster> ais523, I wonder what happens if you do startx, then jumps back to the console and starts xdm using the normal service script for it
20:52:45 <ais523> AnMaster: me? I don't run startx by hand
20:53:07 <AnMaster> ehird, <AnMaster> ehird, what is the last version of your OO system? <AnMaster> care to pastebin it? :D
20:54:08 <ehird> "I mean same level of quality as emacs is for text editors or such"
20:54:18 <ehird> AnMaster: i just came back, no revisions atm
20:54:26 -!- olsner has joined.
20:54:35 <AnMaster> ehird, tell me when you are done
20:54:40 <ais523> hmm... Gnumeric reminds me of Abiword
20:54:52 <ais523> not full-featured, but looks good at what it tries to do
20:55:23 <ais523> circular references act really weirdly, though
20:56:17 <ais523> it seems to get 850*77.1 right
20:56:28 <ais523> but that's not particularly surprising
20:57:23 <ais523> psygnisf_: what paradigm?
20:57:56 <psygnisf_> i think the best way to describe it is as a pattern-matching unifying tree-rewriting system.
21:00:30 <psygnisf_> my only task now is to.. actually make the language. XD
21:00:54 -!- psygnisf_ has changed nick to psygnisfive.
21:01:04 <AnMaster> <ais523> it seems to get 850*77.1 right
21:01:04 <AnMaster> <ais523> but that's not particularly surprising
21:01:19 <ais523> AnMaster: because famously, Excel 2007 got it wrong
21:01:23 <ais523> at least, until they patched it
21:01:32 <ais523> to be precise, it was a bug in the binary to decimal conversion
21:01:39 <ais523> which converted numbers just below 65535 to 1000000
21:01:56 <AnMaster> ais523, why not just use snprintf()?
21:02:15 <ais523> AnMaster: don't ask me, I haven't read the source code to Excel
21:02:26 <ais523> but I think it's because it would have printed as 65534.9999999999999999999999999
21:02:38 <psygnisfive> ais523: i think also the way its designed, integer math is entirely feasible from primitives in the system. rather than building it in terms of stuff outside the system. :o
21:02:44 <AnMaster> ais523, oh? depends on setting precision?
21:02:47 <ais523> psygnisfive: that's true of most langs
21:03:05 <AnMaster> ais523, if proper rounding mode is set it wouldn't be an issue
21:03:08 <ais523> if you set "precision as displayed", the incorrect numbers actually went and affected other calculations
21:03:16 <ais523> the bug wasn't rounding mode, just the rounding algorithm
21:03:42 <ais523> Googling "850 77.1" gives lots of results, anywy
21:06:01 <ehird> I wonder how you do "x and return x" in perl.
21:10:25 -!- oklopol has joined.
21:10:32 <ehird> $result = $_->{$key} and return $result; works
21:12:19 <ehird> ais523: can you put undef in a hash or is that just essentially deleting that element?
21:12:28 <ais523> you can put undef in a hash
21:12:32 <ais523> and it isn't deleting the element
21:12:42 <ais523> you use exists to tell if undef's in a hash
21:12:50 <ehird> i'm _implementing_ exists.
21:12:52 <ais523> and defined to see if it's undef
21:13:11 <ais523> you can use delete to get rid of an element altogether, rather than just undeffing it out
21:13:47 <oerjan> oklopol: how dare you call me a jam!
21:14:24 <oklopol> it made frighteningly lot of sense.
21:15:27 <ehird> i have to implement firstkey/nextkey.
21:15:48 <oerjan> i cannot, someone took my saucepan
21:15:53 <ehird> each %{ $self->{data}, @$self->{delegates} }
21:17:27 <ehird> AnMaster: the object system is growing to >100 lines :P
21:18:20 <oerjan> rule #1 of short programs: never add features
21:18:27 <ehird> it's not really a feature
21:18:29 <ehird> it's just making it actually work
21:19:03 <AnMaster> also is saucepan == fryingpan?
21:19:10 <ais523> AnMaster: no, not quite
21:19:16 <ais523> frying pans are flatter and wider
21:19:28 <ais523> and generally used to fry things
21:19:34 <ais523> saucepans are more commonly used for boiling
21:19:48 <ais523> kettles are used for boiling water
21:19:54 <ais523> and are much more enclosed
21:20:00 <ais523> saucepans are used for boiling vegetables
21:20:08 <ehird> i was imagining AnMaster putting stuff to boil in a kettle there XD
21:20:10 <ais523> and cooking baked beans
21:20:31 <ais523> a saucepan's a type of pot, but there are others
21:20:47 <ehird> Type of arg 1 to keys must be hash (not private variable) at unl2c.pl line 55, near "$flattened;"
21:20:58 <ais523> ehird: that makes sense
21:20:59 <ehird> it's just the result of a function callllllllllllll
21:21:04 <ais523> you maybe want to dereference it first
21:21:05 <ehird> my $flattened = $self->_flatten;
21:21:07 <ais523> functions can't return hashes
21:21:09 <ehird> sub __DELEGATE::_flatten {
21:21:12 <ehird> %{ $self->{data}, @$self->{delegations} };
21:21:19 <ais523> yep, you're returning an array there
21:21:22 <ais523> functions can't return hashes
21:21:24 <ehird> hashes are arrays.
21:21:30 <ehird> did you mean hashref?
21:21:43 <ais523> you can't run keys on an array
21:21:45 <ehird> ohhhhhhhhh, the problem is "my $flattened"
21:22:01 <ais523> and yes, you're assigning your array to a scalar there
21:22:04 <ais523> so you only get its length
21:22:14 <ehird> my %flattened = $self->_flatten;
21:22:18 <AnMaster> From Wikipedia, the free encyclopedia
21:22:25 <AnMaster> can't find interwiki link that way
21:22:44 <ehird> Type of arg 1 to each must be hash (not subroutine entry) at unl2c.pl line 61, near "->flatten;"
21:22:46 <ehird> ok now _that's_ bizarre
21:23:09 <ais523> it's telling you exactly what I was saying
21:23:15 <ais523> which is that functions can't return hashes
21:23:20 <ais523> you can return a hashref if you want
21:23:47 <ehird> Bareword "__PROXY" not allowed while "strict subs" in use at unl2c.pl line 75.
21:24:03 <ais523> ehird: ah, you're interacting with use strict;
21:24:07 <ais523> try putting it in quotes
21:24:08 * ehird defines __PROXY stuff _before_ doing the bless
21:24:18 <ais523> AnMaster: a bareword's a string with no meaning
21:24:32 <ehird> Can't use global @_ in "my" at unl2c.pl line 85, near "= @_"
21:24:36 <ais523> Perl interprets it as "foo", or &foo(), depending on context
21:24:38 <ehird> fuck you Perl, thatmakes perfect sense
21:24:43 <ehird> its complaininga bout
21:24:44 <ehird> my ($self, %more) = @_;
21:24:51 <ais523> ehird: you aren't inside a function
21:24:53 <ehird> which worked fine before I turned on STUPID PEDANTIC MODE.
21:24:58 <ehird> my ($self, %more) = @_;
21:25:34 <ais523> and that is presumably a global @_
21:25:45 <ais523> so all that remains is to wonder wtf that's an error
21:25:55 <AnMaster> ais523, can't you read a global in a function?
21:26:01 <ais523> AnMaster: you can, normally
21:26:06 <ais523> so I'm wondering what's happening here
21:26:20 <oerjan> AnMaster: in fact = @_ is the perl idiom for finding a function's arguments
21:26:21 <ehird> bet its to do with the %more
21:26:31 <ais523> ehird: no, because that's inside the my
21:26:38 <AnMaster> oerjan, I know *THAT* much perl
21:26:46 <ais523> out of interest, what does my $self = shift; my %more = @_; do?
21:26:57 <ais523> that should mean the same thing
21:27:17 <ehird> ahhh, i found the issue
21:27:19 <ais523> AnMaster: it leaves a different value in @_
21:27:22 <ais523> but normally you aren't reading it again
21:27:34 <ehird> my ($self, %more) = @_;
21:27:36 <ehird> can you spot the error?
21:27:39 <ais523> so you weren't inside a sub
21:27:42 <ehird> the 'do' was tripping it up and all went to hell :D
21:27:46 <AnMaster> <ehird> can you spot the error?
21:27:56 <ehird> said it first on my end :P
21:28:03 <AnMaster> ehird, well it looked funny here
21:28:04 <ais523> ehird: said it before I received your message
21:28:13 <ais523> no way can I type that fast
21:28:21 <AnMaster> ais523, of course, or it couldn't had arrived first to me
21:28:34 <ais523> and it would have been a pretty fast sopt even then
21:28:42 <AnMaster> you can't get out of order then
21:31:46 <ehird> "Joel on Software. The site is read by thousands of programmers a month -- the ones who are so good at programming they have spare time at work to read the self-absorbed drivel I publish there."
21:31:52 <ehird> Gee, Joel is finally coming to a realization.
21:31:57 <ais523> is that what it actually says?
21:32:07 <ehird> http://www.inc.com/magazine/20090101/how-hard-could-it-be-thanks-or-no-thanks_Printer_Friendly.html?partner=fogcreek
21:32:11 <ehird> the rest of the article is, of course, drivel
21:34:30 <ehird> this thing is awful
21:34:36 <ehird> I'm basically implementing an object system as a tied hash
21:34:39 <ehird> then blessing it for nicer syntax
21:36:14 <oerjan> clearly cthulhu is the god involved here
21:38:11 <ehird> Can't coerce array into hash at unl2c.pl line 66.
21:38:12 <ehird> ;_____________________;
21:39:42 <oerjan> maybe the array is not of the right format?
21:40:05 <ais523> nah, you can coerce even an array of the wrong format into a hash, normally
21:40:10 <ais523> although it gives warnings
21:40:42 <ehird> print $self->{delegates},"\n";
21:40:42 <ehird> foreach (@$self->{delegates}) {
21:40:48 <ehird> Not an ARRAY reference at unl2c.pl line 15.
21:41:07 <ais523> you fail at operator precedence
21:41:18 <ehird> hmm. No, I think Perl does in that case
21:41:28 <ais523> ehird: what should $$self->{delegates} do?
21:41:39 <ehird> um. shoot the programmer?
21:41:40 <ais523> now, claim with a straight face that @ and $ should have different precedences
21:42:22 <ais523> AnMaster: $ means lots of things
21:42:28 <ais523> but all to do with scalars
21:42:38 <ehird> Using a hash as a reference is deprecated at unl2c.pl line 94.
21:42:40 <ais523> AnMaster: that's two separate $s
21:42:42 <ehird> so what am I meant to do, retardoperl
21:42:49 <ais523> ehird: what are you trying to do?
21:42:57 <ais523> you can't dereference a hash, it isn't a pointer
21:43:01 <ehird> ais523: it's kind of complicated and it involves tied hashes.
21:43:02 <ais523> that's like trying to dereference an int
21:43:02 <ehird> and FWIW, it works.
21:43:10 <ehird> %Object_proto->{delegations} _actually works_
21:43:18 <AnMaster> ais523, hm I just had an idea: a lisp language with list as the ONLY datatype, no integers no #t or #f, no strings
21:43:41 <ehird> i guess you could hack them with a bunch of nils.
21:43:54 <ehird> AnMaster: there's no list in lisp
21:43:58 <ehird> there's cons cells and nil
21:44:03 <ehird> so, you have two datatypes, right off the bat
21:44:07 <AnMaster> ehird, right true, so cons and nil
21:44:21 <ehird> ais523: so how can I do %Object_proto->{data} without perl whining
21:44:23 <AnMaster> just cons, and instead of nil you have another node
21:44:38 <AnMaster> ehird, what do you think about that?
21:44:41 <ais523> ehird: it's whining because that is deliberately deprecated
21:44:46 <ais523> what, exactly, are you trying to do?
21:44:54 <ehird> ais523: i've told you
21:45:02 <ehird> I'm trying to access its internal object data.
21:45:12 <ais523> put the internal data as a key in the hash
21:45:13 <ehird> there _has_ to be a way without getting a warning
21:45:19 <ehird> that's not the reccomended way
21:45:23 <ehird> and it's not how perl's code examples do it
21:45:28 <ais523> well, you have to store it somewhere
21:45:29 <ehird> and it's also brittle if that key ever comes up in user code
21:45:30 <ais523> where are you storing it?
21:45:31 <oerjan> AnMaster: well then you need pointer equality to be able to distinguish anything
21:45:34 <ehird> ais523: yes, inside the hash's object
21:45:36 <ehird> that's how tied hashes work
21:46:02 <ehird> read perldoc perltie, plz
21:46:07 <AnMaster> oerjan, ok I guess cons and nil then
21:46:10 <ais523> or wait... is it tied to an object that is also a hash?
21:46:40 <oerjan> AnMaster: _everything_ would be x = (x . x) in structure otherwise
21:48:32 <ais523> ehird: googling implies that $Object_proto->{data} is equivalent
21:48:36 <ais523> although I'm not sure if I believe it
21:48:45 <ais523> and that the fact the original was working is a bug in the parser
21:49:07 <ais523> does that do the same thing?
21:49:11 <ehird> gonna try in a sec
21:49:19 <ehird> @foo[1..-1] is the list resulting the same except without the first element?
21:49:37 <ais523> I think -1 is the last element
21:49:48 <ais523> but I haven't tried, I might have confused it with Haskell
21:49:49 <ehird> Global symbol "$Object_proto" requires explicit package name at unl2c.pl line 94.
21:50:00 <ehird> i'll just ask #perl and be shunned
21:50:02 <ais523> ehird: so the Googling was wrong, I thought it looked fishy
21:50:15 <ehird> 21:50 <ehird> so... don't ask... but how can I use a hash as a reference in a way that doesn't cause perl to spew a warning at me?
21:50:29 <ehird> i predict an answer involving "no warnings;"
21:50:33 <ehird> or "no strict;" or w/e
21:50:45 <ehird> 21:50 <mauke> ehird: no.
21:50:46 <ehird> 21:50 <ehird> mauke: but-but-but-
21:50:58 <ehird> 21:50 <bloo> ehird: ....If it's spitting a warning out at you, you're doing it wrong
21:50:58 <ehird> 21:51 <ehird> bloo: probably. how do I do it right?
21:51:02 <ehird> ais523: no, that's wrong too
21:51:08 <ais523> or does that mean something else?
21:51:10 <ehird> that's a regular hash object
21:51:13 <ais523> they're equivalent on untied hashes, it seems
21:51:15 <ehird> 21:51 <bloo> perldoc perlreftut
21:51:15 <ehird> 21:51 <bloo> I think.
21:51:23 <ehird> April fools day idea: #perl stops being a haven for condescending idiots.
21:51:59 <ais523> perl -Mwarnings -Mstrict -e'my %a = ( a => 1); print %a->{a},"\n"' prints 1, for instance
21:52:02 <ehird> hrm, $Object_proto{data} works, which is a bug
21:52:13 <ais523> ehird: not a bug at all
21:52:18 <ehird> it's a bug in my code
21:52:20 <ais523> you're storing data inside the hash itself
21:52:25 <ais523> I knew you would be, there was nowhere else
21:52:40 <ehird> I just have to figure out how to get the hash to give me access to a secret area of vip quality.
21:53:04 <ehird> 21:52 <bloo> ehird: Don't feel bad, some times I do shit in perl that shouldn't work but does
21:54:37 <ehird> elsif (defined $obj->{_unknown}) {
21:54:38 <ehird> @_ = (@_[0], $name, @_[1..]);
21:54:40 <ehird> goto &$obj->{_unknown};
21:54:56 <ehird> I don't think any of this code should work, but it does.
21:55:16 <ais523> why shouldn't that work?
21:55:28 <ais523> splice on @_ would be more idiomatic than that, though
21:55:37 <AnMaster> ehird, show them your whole file
21:55:41 <ais523> although I can never remember which arg to splice does what
21:56:02 <AnMaster> ehird, also what about using the C API to do it in some strange way?
21:56:13 <ehird> AnMaster: no, and no
21:56:51 <AnMaster> ehird, then why no at the first?
21:57:03 <ehird> because it isn't _that_ crazy, just a bit fucked
21:57:29 <AnMaster> I thought you said a lot was _THAT_ crazy even
21:57:36 <oerjan> "I'm not mad, I'm a scientist!"
21:57:56 <AnMaster> oerjan, sounds like mezzacotta?
21:58:16 <ais523> I don't think the mezzacottan scientist ever said exactly that, but I might be wrong
21:58:44 <AnMaster> ais523, also have you checked the whole history XD
21:58:51 <ais523> after all, I have quite a lot of mezzacotta backlog to catch up on
21:59:00 <ais523> meh, you made that joke first
21:59:44 <AnMaster> hrrm why does the mezzacotta comic have scrollbars some days
21:59:53 <oklopol> statistically speaking, nothing has been said yet, the combinatorial explosion is visible in natural language as well.
22:00:00 <AnMaster> zooming in and then out removes it
22:00:46 <AnMaster> so why shouldn't it display just fine inline
22:00:55 <oerjan> did you mention this earlier? if not i think someone else did
22:01:32 <oerjan> i have a sense someone mentioned scrollbars before
22:02:02 <oerjan> anyway i don't see it, so it's something about how firefox displays them i guess
22:02:07 <psygnisfive> what did you mean "statistically speaking, nothing has been said yet, ..."?
22:02:20 <AnMaster> oerjan, they only happens sometimes
22:02:28 <AnMaster> oerjan, what browser do you use?
22:02:34 <oklopol> psygnisfive: well what percentage would you estimate has been said of all 10 word sentences for instance?
22:02:43 <oklopol> i'll venture 0%, maybe negative.
22:03:29 <oerjan> oklopol: in fact the word ligwotnigafebrble has probably been mentioned only once
22:03:55 <oklopol> oerjan: that too, but i find that a less interesting observation.
22:04:21 <AnMaster> if you can make up any word of any length then the number of possible 10 word sentences is infinite
22:04:27 <AnMaster> and that means some number / inf
22:04:34 <AnMaster> I have no clue what that ends up as
22:04:41 -!- kar8nga has left (?).
22:05:00 <AnMaster> oerjan, what sort if infinite is all possible words in all possible languages?
22:05:23 <oerjan> well the character set would be an issue
22:05:25 <oklopol> was reading the algo book, which for some reason introduces probabilities and shit in the last chapter
22:05:37 <oklopol> your measure theory explanation was pretty useful there
22:05:40 <AnMaster> oerjan, in "all possible" I said
22:05:59 <oerjan> if there are more than countably many possible characters, you get more than that
22:06:03 <oklopol> talked about measuring probabilities in continuous sample spaces
22:06:31 <oerjan> i'm not sure the question even has meaning
22:06:47 <oklopol> just warning you i'll probably want another wikipedia lecture at some point! :P
22:07:36 <oerjan> you need some mathematical representation of "all possible languages" to even begin to answer it, but "all possible" might force you outside that...
22:09:47 <oerjan> well semantics more than math, perhaps
22:11:24 <oerjan> now if we assume something more limited, such as something representable as a subset of the plane, you can limit it
22:11:31 <AnMaster> but then remains a single question:
22:12:02 <oerjan> (beth-2 or less, i think)
22:12:04 <AnMaster> Why? (no not why anything specific, but just a plain "why")
22:14:13 <oerjan> with pictures satisfying any kind of niceness requirement, that will probably drop to beth-1
22:15:24 <psygnisfive> hold the newsreaders nose squarely, water, or friendly milk with countermand my trousers
22:15:47 <oerjan> beth-(n+1) = 2^(beth-n)
22:15:51 <AnMaster> well, I asked if 2^aleph_0 == beth-1 or not?
22:16:28 <oerjan> my eyes read that as what
22:17:38 <oklopol> ooooooooooooooooooooooooooooooooo
22:17:57 <oklopol> psygnisfive: what's countermand?
22:18:21 <oklopol> it's a real world word i didn't know.
22:18:26 <oklopol> well this is embarrassing.
22:18:41 <ais523> well, it doesn't make any sense in psygnisfive's sentence
22:18:41 <oklopol> i did somewhat reverse-engineer it though
22:18:43 <ais523> despite being a real word
22:19:04 <ais523> for that matter, the rest of the sentence makes no sense either
22:19:18 <psygnisfive> ais523, you clearly have never seen this: http://www.youtube.com/watch?v=hHQ2756cyD8
22:19:22 <oerjan> and yet, he insisted on correcting water
22:19:28 <ais523> correct, I can't access Youtube
22:20:13 -!- BeholdMyGlory has quit ("Konversation terminated!").
22:21:12 <ais523> nor do I want to install it
22:21:48 <AnMaster> ais523, also where is ick's darcs atm?
22:21:54 <ais523> AnMaster: on my hard drive
22:22:04 <ais523> ever since eso-std.org went down, I've had nowhere to host it
22:22:04 <AnMaster> ais523, want some hosting for it?
22:22:38 <AnMaster> ais523, gcc-bf would be too big with gcc source included however, but ick repo should be find
22:23:18 <psygnisfive> some crazy esolanger is going to geneer a sexually transmitted disease
22:23:26 <oklopol> ais523: it makes perfect sense when you s/with/will/
22:24:01 <AnMaster> ais523, adduser want to know full name, I guess from a whois it is "(this is obviously not my real name)"?
22:24:11 <oklopol> well it did originally too, but it didn't really parse
22:24:36 <oklopol> and don't any of you dare parse it now, i already failed once today.
22:25:29 <ehird> yay, the damn kids are getting off my lawn.
22:25:31 <ehird> where by lawn I mean server.
22:25:46 <AnMaster> ais523, I need your public ssh key since password auth is turned off
22:25:50 <oerjan> got yourself thrown off?
22:26:11 -!- FireFly has quit ("'till morning").
22:26:12 -!- ais523 has quit (Read error: 104 (Connection reset by peer)).
22:26:15 <ehird> by the way psygnisfive
22:26:18 <ehird> that video is muted
22:26:22 <ehird> due to copyright infringement :P
22:26:32 -!- ais523 has joined.
22:26:39 <AnMaster> <AnMaster> ais523, I need your public ssh key since password auth is turned off
22:27:12 <ais523> but couldn't send for some reason
22:27:12 <ais523> it's in id_rsa.pub, isn't it?
22:27:23 <oerjan> January 2009: Youtube starts seriously getting rid of copyright infringements
22:27:45 <oerjan> February 2009: Youtube loses 90% of users
22:27:46 <oklopol> what it's only january still?
22:28:18 <oklopol> oerjan: another story time? :D
22:28:21 <AnMaster> ais523, stop timing out all the time
22:28:40 <ais523> AnMaster: received it yet?
22:28:45 <oerjan> also, this was a real world prediction
22:28:54 * ais523 wonders wtf's up with their connection
22:29:10 <ais523> 16 seconds to ping myself
22:29:17 <ais523> apparently it took AnMaster 30 seconds to ping me
22:29:46 <oklopol> well i don't see any use for youtube except to see copyrighted shit. and most good shit is copyrighted
22:30:10 <ehird> 22:29 <ehird> how can I "temporarily untie" a var?
22:30:10 <ehird> 22:29 <ehird> without doing untie/tie
22:30:12 <ehird> 22:29 <mauke> the answer is "no"
22:30:16 <ehird> #perl thinks they're really clever.
22:30:22 -!- jix has quit ("...").
22:30:54 <oerjan> isn't that more of a prolog answer, really?
22:31:32 <ehird> psygnisfive: i'm implementing an OOP system in perl. shush
22:31:37 <ais523> ehird: simple, you use a localised typeglob, like we worked out in /msg
22:32:09 <ais523> I thought you said it did
22:32:17 <ehird> http://www.apple.com/pr/library/2009/01/14advisory.html uhoh
22:33:24 <psygnisfive> or hes having problems with a meth addiction
22:33:26 <ehird> lol, google muted the rick roll
22:33:38 <ais523> ehird: for being copyrighted?
22:33:40 <ehird> http://uk.youtube.com/watch?v=oHg5SJYRHA0
22:33:54 <ehird> it was all an elaborate scheme leading to this
22:34:56 <ehird> ... wait apparently it isn't actually muted
22:35:09 <ehird> my Flash is playing up...
22:35:30 <oklopol> yeah right, you're just making up these muting stories so we'd get rickrolled by your link.
22:35:33 <ehird> no, seriously psygnisfive
22:35:37 <ehird> it's silent for me
22:35:42 <psygnisfive> by playing up do you mean you accidentally had it muted yourself? ;)
22:35:51 <ehird> the volume is on full on it
22:35:58 <ehird> it just isn't making any sound
22:36:09 <oklopol> ...what, astley has *other songs* too?!?
22:36:13 <ehird> i'm not lying okay psygnisfive
22:36:27 <psygnisfive> ehird: obviously not. you're lying poorly, ehird. POORLY!
22:36:40 <ehird> psygnisfive: STOP IT I HATE NOT BEING BELIEVED WHEN I'M NOT LYING >__<
22:36:58 <psygnisfive> ehird: stop hating it and i'll stop not believing you.
22:37:35 <ehird> feel free to apply that to new exciting contexts.
22:38:12 <ehird> Four weeks after birthing a nationwide Wikipedia edit ban, Britain's child porn blacklist has led at least one ISP to muzzle the Internet Archive's Wayback Machine - an 85 billion page web history dating back to 1996.
22:38:36 <ehird> sooo guys where should I escape to from this hellhole?
22:38:46 <ais523> sourced from a different country
22:38:48 <ais523> psygnisfive: only for a bit
22:38:52 <ais523> it wasn't an aren't allowed
22:39:10 <ais523> basically, what happened was that lots of ISPs used proxies to implement the blacklist
22:39:15 <ais523> routing all the traffic from the UK through about 6 IPs
22:39:26 <ehird> ais523: "How can I escape from Oceania?" "Talk in pig latin!"
22:39:29 <psygnisfive> how would wikipedia and the wayback machine have anything to do with child porn?!
22:39:46 <ais523> which meant that there was no way to distinguish legitimate users from vandals
22:39:51 <ehird> psygnisfive: http://en.wikipedia.org/wiki/Virgin_Killer
22:39:51 <ais523> and the UK got blocked by mistake a lot
22:39:55 <ehird> which is the page that was blocked
22:39:57 <ais523> it happened to Qatar once
22:40:01 <ehird> for the edit block
22:40:14 <ais523> Wikipedia doesn't cope well with entire countries having only a few IPs
22:40:38 <psygnisfive> oh i see, so what you mean ais is not that BRITAIN banned people from editting WIKI
22:40:49 <ehird> it's called wikipedia
22:40:51 <psygnisfive> but rather britain implemented measures that made it impossible for wiki to verify idents
22:41:02 <ais523> yes, and all brits got banned by mistake every now and then
22:41:03 <ehird> so guys i'm thinking like, Norway?
22:41:15 <ehird> oerjan: how's it in Norway with yer civil liberties, and your fjords?
22:41:23 <ais523> not to mention the limit that only 6 users could register per IP per day made it rather hard for everyone to log in
22:42:06 <psygnisfive> americans seem to have an enormously difficult time pronouncing things that look, at first, like they're foreign
22:43:13 <psygnisfive> its not as tho english doesnt have the sequence "ky" /kj/ as it is
22:43:52 <psygnisfive> i once heard an american say "bjarnum" as "buh-jar-num" because she couldnt get the bj right
22:44:06 <ehird> <psygnisfive> she couldnt get the bj right
22:45:02 <psygnisfive> in circles around the head of the cock, you see.
22:46:48 -!- olsner has quit (Remote closed the connection).
22:47:23 <oerjan> ehird: the fjords are nice
22:47:42 <psygnisfive> im not really sure what fjords ARE, but they're cool
22:48:51 <psygnisfive> a long narrow inlet with steep sides, created by glacial activity
22:48:51 <oerjan> norway does have a cp blacklist though afair
22:56:29 <ehird> ais523: kill me i hate perl
22:59:58 <ehird> because i want to, psygnisfive
23:00:15 <oerjan> clearly it would be far too easy in anything else
23:03:30 <ehird> Reference found where even-sized list expected at unl2c.pl line 61.
23:08:49 <ehird> it's mainstream, but it's eso
23:08:58 <psygnisfive> the only way in which it might be eso is in its ugliness
23:09:07 <ehird> the only thing I glean from your past two lines is that you're the typical ruby fanatic who's never used perl but dislikes it anyway
23:09:10 <ehird> hmm, wait a second, you are!
23:09:23 <ehird> yeah. sure you have.
23:09:36 <psygnisfive> and im not really a ruby fanatic. its just convenient for me to dev in
23:09:49 <ehird> ais523: can you pick up the argument from here I lost interest.
23:10:08 <ais523> no, it's too late, I need to go home very soon
23:10:17 <ehird> IT'S NEVER TOO LATE TO DEFEND PERL
23:11:16 <ehird> so don't talk about my usage of it
23:11:32 <psygnisfive> i was merely wondering why you were doing this with perl
23:13:26 <ehird> is there a nicer way to phrase this
23:13:38 <ehird> @{[$foo, @{$bar}]}
23:13:43 <ehird> where $bar is an arrayref and $foo is a hash
23:13:51 <ehird> ($foo, $bar) makes it a hash
23:14:00 <ehird> I guess (@$bar, $foo) might work
23:14:04 <ehird> but that's the wrong way around :p
23:14:08 <ais523> ($foo, $bar) isn't intrinsically either a hash or an array, I think
23:14:43 <ehird> wait... I want a hash
23:15:15 <ehird> return %{$self->{data}}, map {%$_} @{$self->{delegations}};
23:15:18 <ehird> am I a bad person?
23:18:57 <ehird> Returns a reference to the object underlying VARIABLE (the same value that was originally returned by the tie call that bound the variable to a package.) Returns the undefined value if VARIABLE isn't tied to a package.
23:26:08 -!- ais523 has quit (Client Quit).
23:39:52 -!- amca has joined.
23:41:37 -!- amca has quit (Client Quit).
23:49:43 -!- Corun has left (?).