code logs -> 2012 -> Mon, 21 May 2012< code.20120520.log - code.20120522.log >
--- Log opened Mon May 21 00:00:10 2012
--- Day changed Mon May 21 2012
00:00 You're now known as TheWatcher[T-2]
00:03 You're now known as TheWatcher[zZzZ]
00:22 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
00:54 RichyB [MyCatVerbs@Nightstar-86656b6c.cable.virginmedia.com] has quit [Ping timeout: 121 seconds]
01:25
<&McMartin>
https://gist.github.com/2760021 <-- love the 20+-binding let clause for doing the year-end computation
01:33
<&jerith>
What are you rewriting?
01:37
<&McMartin>
This: http://www.atariarchives.org/basicgames/showpage.php?page=96
01:39
<&jerith>
Ah.
01:42 himi [fow035@D741F1.243F35.CADC30.81D435] has joined #code
01:42 mode/#code [+o himi] by ChanServ
02:07 Kindamoody[zZz] is now known as Kindamoody
02:31 Attilla [Obsolete@Nightstar-3f363270.as43234.net] has quit [Ping timeout: 121 seconds]
02:37
<~Vornicus>
Nurbs are more expensive. Unlike b-splines, however, they cannot be accurately conve3rted to beziers.
02:43
<~Vornicus>
(an order p b-spline with k control points can be converted to iirc k-p bezier splines of order p.
02:43
<~Vornicus>
(nurbs on the other hand can accurately model all the quadratics including circles, where b-splines and beziers cannot)
02:54 Vash [Vash@Nightstar-241cb5d4.wlfrct.sbcglobal.net] has joined #code
02:54 mode/#code [+o Vash] by ChanServ
03:01
<~Vornicus>
Also if you're already working in a projective space (which if you're passing vector4's, you are), then the last d divides are "free"
03:15 * Vornicus eyes visio
03:15
<~Vornicus>
okay so it says this is a nurbs
03:16
<~Vornicus>
but a nurbs, like a b-spline, needs more knots than control points, but there are clearly the same number on both here.
03:30
<~Vornicus>
oh oh oh. clamped, don't need to worry about the last knot values because of that.
03:58 jeroid [jerith@83BF1D.4E7445.8DFF6A.5145AD] has joined #code
04:03 Derakon is now known as Derakon[AFK]
04:07 jeroid [jerith@83BF1D.4E7445.8DFF6A.5145AD] has quit [Ping timeout: 121 seconds]
04:11 jeroid [jerith@83BF1D.4E7445.8DFF6A.5145AD] has joined #code
04:26 jeroid [jerith@83BF1D.4E7445.8DFF6A.5145AD] has quit [[NS] Quit: Bye]
05:05
< celticminstrel>
I think I like how XCode can detect the proper name to use when I typo.
05:09 Derakon[AFK] is now known as Derakon
05:16 celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
06:03 iospace is now known as iospacedout
06:10 Derakon is now known as Derakon[AFK]
06:22 Rhamphoryncus [rhamph@Nightstar-5697f7e2.abhsia.telus.net] has joined #code
06:22 You're now known as TheWatcher
06:30 Kindamoody is now known as Kindamoody|P2
06:44 Vash [Vash@Nightstar-241cb5d4.wlfrct.sbcglobal.net] has quit [[NS] Quit: I lovecraft Vorn!]
06:47 Noah [nbarr@Nightstar-9e797a1c.pools.spcsdns.net] has left #code ["Leaving"]
06:47 Noah [nbarr@Nightstar-9e797a1c.pools.spcsdns.net] has joined #code
06:50 eckse [eckse@Nightstar-44362701.dsl.sentex.ca] has joined #code
06:50 mode/#code [+o eckse] by ChanServ
06:51 eckse_ [eckse@Nightstar-44362701.dsl.sentex.ca] has quit [Ping timeout: 121 seconds]
07:16 eckse [eckse@Nightstar-44362701.dsl.sentex.ca] has quit [Client closed the connection]
07:35 Reiver [reiverta@5B433A.3CF6C7.B34AFB.F361B9] has joined #code
07:38
< Rhamphoryncus>
*twitch*
07:39
< Rhamphoryncus>
auto_ptr is described as a limited garbage collection facility.. all it does is extend your stack-based destructor behaviour on to a single object on the heap
07:40
< Rhamphoryncus>
Meaning it behaves exactly like a normal stack-based object. It just happens to be dynamically allocated on the heap
07:58 himi [fow035@D741F1.243F35.CADC30.81D435] has quit [Ping timeout: 121 seconds]
08:13
< Rhamphoryncus>
"Ting also compared the human time cost vs. the computer time cost and revealed that the image of the VW cost more than its street value."
08:13
< Rhamphoryncus>
XD
08:13
< Rhamphoryncus>
That's *the* VW Bug model from 1972
08:14
< Rhamphoryncus>
Which is notable for being the birth of Phong Shading
08:17 RichyB [MyCatVerbs@Nightstar-86656b6c.cable.virginmedia.com] has joined #code
08:21 Kindamoody|P2 is now known as Kindamoody
08:43
< Rhamphoryncus>
"FreeType can spit out Bezier glyph boundaries and kerning information" that would be very useful for rendering fonts in opengl, yes
08:52
< Rhamphoryncus>
but now that I read more the first answer says otherwise: http://stackoverflow.com/questions/5262951/what-is-state-of-the-art-for-text-ren dering-in-opengl-as-of-version-4-1
09:20 RichyB [MyCatVerbs@Nightstar-86656b6c.cable.virginmedia.com] has quit [[NS] Quit: Leaving]
10:44 Attilla [Obsolete@Nightstar-3f363270.as43234.net] has joined #code
11:25 RichyB [MyCatVerbs@Nightstar-3b2c2db2.bethere.co.uk] has joined #code
11:29 Kindamoody is now known as Kindamoody|out
11:31 RichyB [MyCatVerbs@Nightstar-3b2c2db2.bethere.co.uk] has quit [Ping timeout: 121 seconds]
12:18 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
12:18 mode/#code [+o himi] by ChanServ
12:32 RichyB [MyCatVerbs@Nightstar-3b2c2db2.bethere.co.uk] has joined #code
12:34 Reiver [reiverta@5B433A.3CF6C7.B34AFB.F361B9] has quit [Ping timeout: 121 seconds]
12:35 RichyB [MyCatVerbs@Nightstar-3b2c2db2.bethere.co.uk] has quit [[NS] Quit: Leaving]
13:21 jeroid [jerith@Nightstar-4426b628.tmodns.net] has joined #code
13:44 * TheWatcher grumbles vaguely at DBI::execute()'s handling of extraneous bind parameters.
14:02 celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has joined #code
14:16
<@rms>
At least it's better than PDO's retarded binding issues
14:17
<@rms>
Hopefully it's better
14:17
<@rms>
(You can't use the same named bind in PDO twice on the same prepare for some reason)
14:17
<@rms>
So you end up having to declare variables.
14:17
<@rms>
(which isn't that bad, but it's still annoying)
14:20
<@TheWatcher>
Nah, the only issue is that it tries to be too helpful - if you have a prepared query with two bind markers, and you call execute on it with three, it'll fail with an "incorrect number of bind params" error.
14:22
<@TheWatcher>
Even if the third is actually undef
14:26 RichyB [MyCatVerbs@Nightstar-3b2c2db2.bethere.co.uk] has joined #code
14:34 You're now known as TheWatcher[afk]
14:40
< Rhamphoryncus>
Sounds like it's "correct", but still a pita
14:40
< Rhamphoryncus>
ie you need a way to have a dummy bind marker
15:11
<@rms>
Heh
15:12
<@rms>
PDO bitches on that too :/
15:12
<@rms>
If it only wans {foo} and {bar} if you give it foo, bar and baz it'll error out
15:13
<@rms>
PDO is probably the worst lib I've ever used
15:28 jeroid [jerith@Nightstar-4426b628.tmodns.net] has quit [Client closed the connection]
15:29
< Noah>
http://pastebin.starforge.co.uk/519
15:30
< Noah>
Is that valid? Assuming that I reload a module that has that line in it, would it import or refresh changes to another module like that?
15:34
<@rms>
Only way to find out is to try it
15:35
< Noah>
I suppose so
15:35
<&jerith>
Noah: You don't really want to use reoal.
15:35
<&jerith>
Err, reloaf
15:35
<&jerith>
Ugh.
15:35
<&jerith>
That thing. Avoid it.
15:35
< Noah>
Well, the trick is getting the bot to reload certain modules safely
15:36
<&jerith>
It reloads the thing you reload, but anything referencing the old one stays referencing the old one.
15:36
< Noah>
And as it stand, it works fine for things in the plugins dir, but any other packages that those plugins import don't get reloaded
15:37
<&jerith>
Yes.
15:48
< Noah>
Yea, that didn't seem to work
15:49
< Noah>
So, how do I go about getting the bot to not only reload plugins, but also any modules that they themselves import...hmm
15:52
<@rms>
Grr
15:52
<@rms>
Chrome stops certain security tests like http://127.0.0.1:8125/../../../../etc/fstab
15:53
<@rms>
(It redirects the user to http://127.0.0.1:8125/etc/fstab)
15:54
<&jerith>
Run the plugins in a separate process and restart thay.
15:56
< Noah>
Er...huh?
15:56
<@rms>
That seems annoyingly expensive
15:56
<@rms>
Both in programmer-time and computer-time
15:58
<@rms>
Unless Python has some stupid simple IPC stuff
15:59
<@rms>
But considering the state of their DB APIs (last I checked), I doubt it.
16:00
< RichyB>
Python ships with xmlrpclib which is stupidly simple.
16:00
< RichyB>
Works as an okay RPC if you happen to be targeting certain kinds of frameworks.
16:04
<@rms>
Yay overhead of parsing XML
16:07 * RichyB hunts for the "ignore" button.
16:13
< Noah>
jerith: How do you mean?
16:15
< RichyB>
Noah, start a new process, either with the subprocess module or os.fork(), communicate with it over a pipe or socket.
16:16
< Noah>
Ahhh
16:16
< Noah>
Okay, I see
16:16
< RichyB>
subprocess.Popen() may be rather easier if you plan to ever be portable to Windows, I'm not sure how happy the story around the os.fork() function is there.
16:16
< Noah>
It's on windows currently
16:16
< RichyB>
Use Popen then.
16:17
< Noah>
That does complicate a lot of things about my structure though
16:18
< RichyB>
Ye-es. Alternately, deep reloading isn't impossible, just really fiddly and bug-prone.
16:19
< RichyB>
Arguably, plugins should usually be confined to separate processes just to stop them taking your main process out if they segfault or crash for some other reason.
16:19
< RichyB>
Often, but not always, anyway.
16:19
< Noah>
Well, the context is an IRC bot that's extensible with commands
16:20
< Noah>
The plugins create the commands and handle logic and make calls to other modules, I could put those modules in the plugin dir too instead as their own package, but I'm trying to keep it sound
16:21
< Noah>
I could also put the code for the imported packages directly in the plugin scripts, but that's also something I'm trying to avoid
16:21
< RichyB>
Sensible. I can see why you don't want to complicate things too much.
16:21
< Noah>
My goal is to make the bot be able to reload all of it's plugin scripts, and the modules that support them
16:22
< Noah>
That way I can make changes to what the bot does without having to restart it all the time
16:22
< Noah>
I don't mind having to restart the bot when I change something about HOW it interacts with IRC from twisted, just when I want to make it do something new
16:22
< RichyB>
Under Unix I might handle this by restarting the whole process without losing the connection to IRC.
16:22
<@rms>
There is a hacky alternative, it'd require a custom module (in C) though
16:23
<@rms>
Yeah
16:23
< RichyB>
(You start a new process, talk to it to hand over the file descriptor corresponding to your IRC connection socket, tell it to go wild on that.)
16:23
<@rms>
Unless Python supports grabbing an fd from the parent.
16:24
< RichyB>
I think separate processes is probably your easiest bet.
16:24
< Noah>
Shoot
16:25
< RichyB>
Processes aren't even that expensive. New process for every IRC command invocation would be fine for most bots. They're not too complicated unless you want them to be long-running.
16:25
< RichyB>
Popen([command, line, arguments], stdin=PIPE, stdout=PIPE).communicate("information on stdin")[0] # returns information from stdout
16:26 RichyB [MyCatVerbs@Nightstar-3b2c2db2.bethere.co.uk] has quit [[NS] Quit: Leaving]
16:29
< Noah>
So, basically like that, I would need to structure the modules as if they were command line programs prepared to accept arguements and print out to a screen
16:36
< Rhamphoryncus>
woot, got my outline shading fixed :D
16:36
< Rhamphoryncus>
turns out taking the min() of x,y,z is fine for triangles (they represent the distance to each edge), but when trying to also outline the whole square patch you really don't want to include the z..
16:39
< Rhamphoryncus>
2d surfaces don't tend to have useful data in z
16:40
< Noah>
A side effect of doing it this way is that I can only return text right, no objects
16:42
< Rhamphoryncus>
easy multiprocess stuff in python? Look at the multiprocessing module :)
16:42
<@rms>
You can serialize stuff
16:42
< Rhamphoryncus>
It basically takes some of the threading APIs (like a queue) and layers it over forked processes
16:42
< Noah>
True
16:44
< Rhamphoryncus>
The trick to reloading plugins in the conceptually correct way is not *re*loading them, it's *un*loading them
16:44
< Rhamphoryncus>
If you delete all references to a pure python module it will actually delete it
16:44
< Noah>
Hmm, good point
16:45
< Rhamphoryncus>
(C extension modules have some constraints that I don't remember. You don't want to do it.)
16:45
< Rhamphoryncus>
I've never actually done it but I've always felt you could hook into most of the importing code and basically replace it with your own for your plugins
16:46
< Rhamphoryncus>
Something where it looks in the plugin dir and either finds a single file (which *cannot* load any other files from that dir) or finds a subdir (which can only load within that subdir)
16:47
< Noah>
https://bitbucket.org/mao42ranma/mf0dicebot/src/7075a6c5acef/main.py
16:48
< Noah>
Lines 18 through 33
16:48
< Rhamphoryncus>
Any time a plugin needs to store an object externally (such as a callback) you make the API such that you can trivially reset them all
16:49
< Rhamphoryncus>
And then the best bit: make weakrefs to all the modules that are part of the plugin (one for single file, multiple if a subdir), clear all the references you know of, run the tracing GC, then check the weakrefs to verify they were all cleared. If not you have a module that failed to unload
16:50
< Rhamphoryncus>
My internet seems broken atm
16:50
< Rhamphoryncus>
Specifically the router
16:50
< Rhamphoryncus>
or it's bitbucket
16:51
< Noah>
blah
16:51
< Rhamphoryncus>
Anyway that whole scheme is not something you'd accomplish in 5 lines
16:52 Kindamoody|out is now known as Kindamoody
16:52
< Noah>
Try that link again
16:52
< Rhamphoryncus>
I've played with all the relevant parts of python before so I know it's possible, but that's it
16:52
< Noah>
I suspect that I had it on private
16:52
< Rhamphoryncus>
ah works now
16:53
< Rhamphoryncus>
My DNS is also slow (router issue) and I can't hg push my own tree (ssh connection refused)
16:54
< Rhamphoryncus>
My own dicebot is a supybot plugin
16:54
< Rhamphoryncus>
Which uses twisted anyway
16:56
< Noah>
See, I wonder if I can't creat a list of sorts that contains all the imports that I want to reload, then have the script reloader in main just iterate through that list instead
16:57
< Noah>
Obviously I don't want it to reload twisted
16:58 Netsplit *.net <-> *.split quits: ShellNinja, Attilla, @Derakon[AFK], celticminstrel, Noah, @PinkFreud, froztbyte, @himi, iospacedout, @McMartin, (+7 more, use /NETSPLIT to show all of them)
16:59 Netsplit over, joins: @Tamber, @PinkFreud, @ToxicFrog, froztbyte, iospacedout, @himi, &Derakon[AFK], &McMartin, Namegduf, Noah (+7 more)
16:59
< Noah>
Okay, whatever it's doing currently for the plugins in the plugins dir works, I can change stuff in the script, and the bot uses those changes
17:00
< Rhamphoryncus>
Yeah, most of the time it will "work", but there's a good chance you leak memory each time
17:00
< Rhamphoryncus>
Which, honestly, that's probably good enough
17:01
< Noah>
Well, they aren't 500MB scripts
17:01
< Noah>
So I think I'd be okay even if they did leak
17:01
< Rhamphoryncus>
yeah, and you just need to restart it once every 50 reloads
17:02
< Rhamphoryncus>
The point where things fail is if you're retaining a reference rather than looking things up by name each time
17:03
< Noah>
I don't suspect that would happen often with what I'm doing
17:04
< Rhamphoryncus>
yeah
17:04
< Rhamphoryncus>
it's just a dicebot
17:05
< Noah>
For now
17:05
< Noah>
I do plan to do more things with it
17:17
< Noah>
Well, that doesn't seem to work either.
17:18
< Noah>
I may just have to settle with keeping all my code in the plugins instead
17:18
< Noah>
Or at least in the plugin dir
17:19 Kindamoody is now known as Kindamoody|out
17:30
< Rhamphoryncus>
iirc supybot has some sort of unload or reload ability
17:30
< Rhamphoryncus>
Of course the command & help system is abysmal
17:58 Rhamphoryncus [rhamph@Nightstar-5697f7e2.abhsia.telus.net] has quit [Operation timed out]
18:01 Vash [Vash@Nightstar-241cb5d4.wlfrct.sbcglobal.net] has joined #code
18:01 mode/#code [+o Vash] by ChanServ
18:02 Rhamphoryncus [rhamph@Nightstar-5697f7e2.abhsia.telus.net] has joined #code
18:13 Attilla [Obsolete@Nightstar-3f363270.as43234.net] has quit [[NS] Quit: ]
18:23 You're now known as TheWatcher
18:24 Attilla [Obsolete@Nightstar-2f52281f.threembb.co.uk] has joined #code
18:24
< Rhamphoryncus>
Gah LOL
18:25
< Rhamphoryncus>
So I'm tweaking some effect options in KDE
18:25
< Rhamphoryncus>
playing with window wobble, seeing if I can turn it down far enough to be usable
18:25
< Rhamphoryncus>
Apparently I went to the other extreme
18:25
< Rhamphoryncus>
It's spazming all over the screen
18:25
< Rhamphoryncus>
and it WON'T STOP
18:26
< Rhamphoryncus>
alt-shift-F12 to the rescue
18:27
< Rhamphoryncus>
and again
18:28
<@TheWatcher>
'window wobble', what?
18:28
<@TheWatcher>
You kids and your fancy gizmos.
18:28
< Rhamphoryncus>
it's a gimick they dreamed up when they first started playing with opengl window managers
18:29
< Rhamphoryncus>
You grab the titlebar to drag a window and it lags ever so slightly. It's not rigid anymore
18:29
< Rhamphoryncus>
Except it's never "ever so slightly". It typically varies between "lots" and "OMFG"
18:30
<@TheWatcher>
Um.. /why/
18:30
< Rhamphoryncus>
because they can apparently
18:30
<@TheWatcher>
That sounds phenominally pointless
18:31
< Rhamphoryncus>
Well, originally it was just an experiment
18:31
< Rhamphoryncus>
"Now that we can do this let's see what works and what doesn't"
18:31
< Rhamphoryncus>
It's in the "what doesn't" camp
18:34
< Rhamphoryncus>
There's a lot that can work but it's mostly very subtle
18:35
< Rhamphoryncus>
Like I went and turned on a slight darkening of non-focused windows. Much easier for me to know which one is the focused one
18:35
< Rhamphoryncus>
Of course if they just clearly marked that window's title bar like they used to I wouldn't care :/
18:41
<~Vornicus>
There are a few window-wobble-ish effects that might be reasonable
18:41
<~Vornicus>
a slight deformation of corners when you get into a magnet region would work, for instance
18:41
<@TheWatcher>
Possibly indicating that it needs attention, maybe
18:43
<~Vornicus>
The key to these is subtlety.
18:49 Kindamoody|out is now known as Kindamoody
18:58 Kindamoody is now known as Kindamoody[shower]
19:17 Kindamoody[shower] is now known as Kindamoody
19:44 Kindamoody is now known as Kindamoody[zZz]
19:45
< gnolam>
http://glyphic.s3.amazonaws.com/ozone/mark/periodic/Periodic%20Table%20of%20the% 20Operators%20A4%20300dpi.jpg
19:52
< Rhamphoryncus>
That compass rose hurts my brain
20:02
< froztbyte>
I'm going to just go right ahead and close that tab
20:02
< froztbyte>
since it has no use in my life :D
20:10 eckse [eckse@Nightstar-44362701.dsl.sentex.ca] has joined #code
20:10 mode/#code [+o eckse] by ChanServ
20:11 Attilla [Obsolete@Nightstar-2f52281f.threembb.co.uk] has quit [[NS] Quit: ]
20:13 Attilla [Obsolete@Nightstar-3f363270.as43234.net] has joined #code
21:03
< Rhamphoryncus>
bwahahahaha
21:03
< Rhamphoryncus>
KDE's okular (pdf viewer) has an option in the settings for "Obey DRM Restrictions". You can turn it off and suddenly you get thumbnails
21:03
< Rhamphoryncus>
I bet you can thank adobe for putting that in the spec
21:24
<~Vornicus>
that's a ridiculous number of operators.
21:35
< gnolam>
Yes. Yes it is.
21:35 * gnolam wonders what TheWatcher has to say about it.
21:50 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
21:52 * McMartin likes the prelude
21:54
<&McMartin>
"Since the Classical Period, knowledge of these operators has significantly increased. They are now spelled differently than they were in ancient times"
21:54
<&McMartin>
Oh wait, this is Perl 6
21:55
<&McMartin>
Does it have any implementations not written in Haskell yet
22:00
<&McMartin>
Apparently so
22:00
< gnolam>
Also, I want to see someone set /that/ periodic table to the tune of "I Am the Very Model of a Modern Major-General".
22:18
<&McMartin>
"Syntactic simplification": "braces now optional, like C"
22:18
<&McMartin>
That is not what simplification means
22:18
<&McMartin>
Angry about Perl designers
22:18
<&McMartin>
on the internet
22:23 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has quit [Operation timed out]
22:53 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has joined #code
22:53 mode/#code [+o ToxicFrog] by ChanServ
23:00
< Rhamphoryncus>
It's disturbing that they have all of those years of experience with previous perl versions, grafting on more and more, and when they finally decide to make a clean break.. that.
23:01
<&McMartin>
I still find it hilarious that for years the most conformant implementation was in Haskell
23:01
< Rhamphoryncus>
heh
23:01
<&McMartin>
I love Haskell, but when it's leading the way in practical implementations, your problem may be too theoretically complex =P
23:01
< Rhamphoryncus>
Is.. that a fast forward operator?
23:01
<&McMartin>
=>>?
23:01
< Namegduf>
Does it make the program go faster?
23:01
<&McMartin>
C has >>=.
23:01
< Rhamphoryncus>
==>>
23:01
<&McMartin>
"Shift right and assign back"
23:02
<&McMartin>
I dunno man
23:02
<&McMartin>
Also, Perl 6 has been in the design phase for 12 years now
23:02
< Rhamphoryncus>
Which *is* a fast forward operator. It's a "feed forward" with a seek
23:02
<&McMartin>
hee
23:02
< Namegduf>
Hmm. And C++ has >>, the vague directional concept operator for anything vaguely directionally.
23:02
<&McMartin>
Well Then (tm)
23:03
<&McMartin>
Namegduf: Remember, kids, they're trained standards committee members, don't try this at home
23:03
< Rhamphoryncus>
Okay, the only solution here is take away their right to use operators. They can have it back when they start acting like adults.
23:03
<&McMartin>
The *true* solution is to make operators just be functions with symbolic names that are infix by default, like in ML!
23:03
<&McMartin>
I'm actually not sure if I'm kidding
23:04
< Namegduf>
If all language semantics are just function calls, anything can be anything
23:04
< Namegduf>
Whee
23:04
<&McMartin>
Though doing certain legal things in ML were also described in the book I learned ML from as leading "only to madness"
23:04
<&McMartin>
Well, most functions are prefix by default in most languages
23:04
<&McMartin>
If you have your operators be prefix too, hi Lisp, I didn't see you in that corner where you've been sitting for the past 50 years
23:04
<&McMartin>
I hear there are some kids on your lawn.
23:06
<&McMartin>
But yeah, Lisp gives Zero Fucks here and just lets + and - and whatever just be identifiers like any other, bound to sum/difference/etc functions
23:06
< Namegduf>
Yeah.
23:06
< Namegduf>
One day I will learn how to write Lisp which doesn't get tangled up in shared state and funky action at a distance.
23:06
< Namegduf>
Maybe.
23:06
< Namegduf>
I might just learn Haskell.
23:07
< Namegduf>
That sounds like the better investment.
23:07
<&McMartin>
I gotta admit, going back to Scheme post-Haskell was like pulling teeth.
23:07
<&McMartin>
It really is that much cleaner
23:08
< Rhamphoryncus>
Hmm. I wonder if we'll have to wait for C++27 before they snarf python3's string .format() scheme to replace the << crap
23:08
< Rhamphoryncus>
Apparently C++11 snarfs the RNG and has std::mt19937
23:10 maoranma [nbarr@Nightstar-9e797a1c.pools.spcsdns.net] has joined #code
23:11
<&McMartin>
(Clojure bugged me less, oddly, because Clojure's tightly enoug bound to OO-like VMs that I don't keep reaching for Haskell control or data constructs in the first place)
23:12 Noah [nbarr@Nightstar-9e797a1c.pools.spcsdns.net] has quit [Ping timeout: 121 seconds]
23:16 maoranma is now known as noah
23:16 noah is now known as Noah
23:18
< Rhamphoryncus>
Haw. The standard mandates that the MT RNG produce certain values at certain times XD
23:19
< Rhamphoryncus>
(not as silly as it sounds, since it's a PRNG and that's with a specified seed value)
23:21
< celticminstrel>
Um. How does "braces now optional" get followed by "like C"?
23:22
<&McMartin>
It's optional for single-line clauses.
23:22
<&McMartin>
Perl did not permit while (i < 10) ++i; before, you needed while ($i < 10) { $i += 1; }
23:26 ShellNinja [abudhabi@Nightstar-7b2d96ca.adsl.inetia.pl] has quit [Ping timeout: 121 seconds]
23:27 cpux [cpux@Nightstar-c5874a39.dyn.optonline.net] has joined #code
23:28 * Rhamphoryncus peeks at boost::format
23:28
< Rhamphoryncus>
makes me want to reimplement python's formatting
23:31
< Rhamphoryncus>
with pformat() and errformat() helper functions for stdout and stderr, since those are excruciatingly common usage
23:32 himi [fow035@D741F1.243F35.CADC30.81D435] has joined #code
23:32 mode/#code [+o himi] by ChanServ
23:48
< Rhamphoryncus>
Oh look, an example of C++11 variadic templates that actually makes sense: http://oopscenities.net/2011/07/19/c0x-variadic-templates-functions/
23:49
< Rhamphoryncus>
So it is in fact possible to implement a sane printf()-equivalent in C++11
23:51 * gnolam reposts http://alan.dipert.org/post/153430634/the-march-of-progress
23:54
< Rhamphoryncus>
yeah
23:55
< Rhamphoryncus>
There's significant drawbacks with C's scheme, but if you want to replace it with something better you have to actually *replace it with something better*
23:57
< Rhamphoryncus>
In classical C++ you can't do a type-safe printf(). There's no type-safe variadic scheme, so you'd have to have 32 overloads, one for each length of argument list, and just not allow more than that. Oh wait, that wouldn't be bad at all :P
--- Log closed Tue May 22 00:00:53 2012
code logs -> 2012 -> Mon, 21 May 2012< code.20120520.log - code.20120522.log >

[ Latest log file ]