code logs -> 2012 -> Wed, 04 Apr 2012< code.20120403.log - code.20120405.log >
--- Log opened Wed Apr 04 00:00:22 2012
00:03 You're now known as TheWatcher[T-2]
00:12 You're now known as TheWatcher[zZzZ]
00:12 AnnoDomini [annodomini@Nightstar-a89397b3.adsl.tpnet.pl] has quit [[NS] Quit: leaving]
00:14
< Rhamphoryncus>
hydrogen? :D
00:35 Derakon[AFK] is now known as Derakon
00:48 Eri [Eri@Nightstar-3e5deec3.gv.shawcable.net] has quit [Connection closed]
00:51
< celticminstrel>
...what is openttd?
00:52
<~Vornicus>
openttd is an open source version of Transport Tycoon Deluxe
00:52
< celticminstrel>
Ooh.
00:53
<~Vornicus>
Trains, trucks, ships, and aircraft, transporting cargo. Focus is of course on rail, and there's all sorts of detailed routing and signaling stuff in there
00:53
< celticminstrel>
No buses?
00:53
<~Vornicus>
buses are truckly
00:54
< celticminstrel>
Subways?
00:55
<~Vornicus>
No subways that I'm aware of.
00:56
< celticminstrel>
Aw.
01:00
<~Vornicus>
I haven't played a game where you get to build proper subways, where it's actually the point
01:01
<~Vornicus>
I mean Sim City has had subways for a long time
01:02
< celticminstrel>
Yeah, it has.
01:03
<~Vornicus>
But it's not the point there.
01:03
< celticminstrel>
It's relatively minor, yeah.
01:22
<@ToxicFrog>
Vornicus: Cities in Motion
01:22
<@ToxicFrog>
I think that's it.
01:29
<@ToxicFrog>
And yeah, while OpenTTD does have passenger transport, it's really more focused on transport of cargoes (via train in particular)
01:29
<@ToxicFrog>
It's good fun.
01:30 eckse_ [eckse@Nightstar-4a81f197.dsl.sentex.ca] has joined #code
01:33 eckse [eckse@Nightstar-db8e8f5c.dsl.sentex.ca] has quit [Ping timeout: 121 seconds]
01:47
< Rhamphoryncus>
So I've got it working now. It doesn't exactly conform to my curve but it's pretty close
01:47
< Rhamphoryncus>
Now I'm wondering if it should be that gentle :)
01:50
< Rhamphoryncus>
I could make it two simple linear segments: rapid increase up to the speed threshold, then shallow to the max (twice the speed threshold
01:52
< Rhamphoryncus>
But I'm probably overthinking it
02:12 symbol [symbol@Nightstar-58fa4b17.cable.teksavvy.com] has joined #code
02:15 Noah [noah@Nightstar-c74807e7.pools.spcsdns.net] has quit [Ping timeout: 121 seconds]
02:19 Kindamoody[zZz] is now known as Kindamoody
02:25
<~Vornicus>
Cargodist apparently helps make passengers make any sense at all.
02:34 Attilla_ [Obsolete@Nightstar-2bcedfb2.threembb.co.uk] has quit [Ping timeout: 121 seconds]
02:59 celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has quit [Connection closed]
02:59 celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has joined #code
03:14 Omega is now known as Alek
03:14 mode/#code [+o Alek] by ChanServ
03:51 symbol [symbol@Nightstar-58fa4b17.cable.teksavvy.com] has quit [Ping timeout: 121 seconds]
03:54
< Rhamphoryncus>
ToxicFrog: oh hey, didn't see you come in :)
03:54 Noah [noah@Nightstar-c74807e7.pools.spcsdns.net] has joined #code
03:55
< Rhamphoryncus>
ToxicFrog: xiong is one of the few that admits to being autistic. A little bit hard to explain things to him.
03:56
<@ToxicFrog>
"one of the few"? IME self-diagnosed "autism" is common on the net as a "get out of polite social interaction free" card.
03:56
< Rhamphoryncus>
And unfortunately my own approaches to critical thought don't seem to translate well to others
03:57
< Rhamphoryncus>
In that channel? Very few admit it
03:58
<&Derakon>
TF: and/or a "I have superpowers" card.
03:59
< Noah>
You all are fuckers
03:59
< Noah>
Soz, my autism acting up
03:59
<&Derakon>
No, that's the Tourette's, Noah.
04:00
< Noah>
Oh
04:00
< Noah>
Well, you're still a fucker then
04:00 * Noah does a jig
04:01
< Rhamphoryncus>
symptoms here: rarely do socially obligated communication, oblivious to the social structure, very focused on technical details with no awareness of the overall effect
04:02
< Noah>
That's my best friend's wife
04:02
< Noah>
My best friend is ADHD
04:02
< Noah>
So imagine what hanging out with them is like
04:02
< Rhamphoryncus>
heh
04:03 * Alek can't. o_o
04:03
< Noah>
I however, am fairly well rounded
04:04
<@Alek>
I... can't even imagine how they got together. o_o
04:04
< Noah>
Alek: The guy who wants to do everything and the girl who only wants to do the SAME thing
04:04
<@Alek>
o_o
04:04
< Noah>
Yea, I haven't quite figured it out myself
04:05
< Noah>
I'm thinking, secretly, they were betrothed to each other, and it's like a huge family secret
04:06
< Noah>
There was probably exchanges of money and good
04:06
< Noah>
Which is bullshit
04:06
< Noah>
Because I was best man, and I want a cut
04:09 * Rhamphoryncus cuts Noah
04:28 Reaper [Z@Nightstar-3602cf5a.cust.comxnet.dk] has quit [Ping timeout: 121 seconds]
04:41
< Rhamphoryncus>
Hrm. Train speed is an interesting issue. They plateaued at around 120 km/h years back, but it's not an issue of power. We can make a train powerful enough to go much faster than that
04:42
<~Vornicus>
Train speed in the real world?
04:42
< Noah>
Faster the better, if we crash, I want my death to be very very instant
04:42
<@Kindamoody>
I need to take "KM" off my highlight list. :|
04:42 * Vornicus gives KiMo a physics
04:42
<@Kindamoody>
:P
04:43
< Noah>
Kindamoody: Really, did you think KM was a good idea for a highlight
04:43
< Rhamphoryncus>
So there's two issues: one is durability, both of the tracks and train components (wheels). Higher speeds increase shock loads resulting in much more rapid deterioration and failure
04:43
< Rhamphoryncus>
The other is cost of energy. More resistance at a higher speed, so it takes more energy to do the same distance
04:43
< Noah>
Which is why L-trains float on the track, right?
04:44
< Rhamphoryncus>
L-trains?
04:44
<@Kindamoody>
Noah, it's surprisingly not that bad, usually. ^^
04:44
< Noah>
Though magnetism
04:44
< Rhamphoryncus>
maglevs, yes. Never heard of L-trains before
04:44
< Noah>
Elevated trains
04:44
< Noah>
El-trains, or L-trains
04:44
< Noah>
I've seen it several ways
04:44
< Rhamphoryncus>
There's many ordinary trains that use elevated tracks
04:45
< Noah>
Maglevs is one I haven't seen in a while
04:45
< Noah>
Rhamphoryncus: I know
04:46
< Rhamphoryncus>
maglevs have two problems as well: purchase cost (comparable to other high speed trains, but eliminates any freight possibilities) and lack of dual gauges
04:46
< Noah>
Yep
04:46
<~Vornicus>
Turning.
04:46
< Rhamphoryncus>
Normal high speed trains provide dual gauges.. by using the same gauge.
04:46
<~Vornicus>
The big one is turning.
04:47
< Rhamphoryncus>
I haven't seen turning mentioned before
04:47
< Noah>
But they go really really fast, something passenger trains should do
04:47
< Noah>
Yea, turning a L-train is difficult
04:48
< Noah>
http://youtu.be/6b4ZZQkcNEo
04:48
< Noah>
I want one of these
04:48
<~Vornicus>
Turning is hard, because the faster you go around a turn, the further outward your center of gravity is
04:48
< Noah>
yea, so the turns have to be very very gradual
04:49 eckse_ [eckse@Nightstar-4a81f197.dsl.sentex.ca] has quit [Connection reset by peer]
04:49
<~Vornicus>
The Acela in the northeast corridor can't go full speed a lot of the time because it was built too wide - taking many turns at speed it would clip trees.
04:49
< Noah>
None of that simcity, train turns left here bullshit
04:50
< Rhamphoryncus>
My own take, which I'm vaguely plotting to make an openttd newgrf for, is to make a maglev system that is dual gauged. Take the active aspect from transrapid, but in a repulsive format, so it sits on the track.
04:50
< Noah>
So, a not real train?
04:51
<~Vornicus>
You have a minimum radius of curvature to allow high speed trains
04:51
<~Vornicus>
You can decrease that radius two ways.
04:51
< Noah>
Go slower
04:51
< Noah>
And curve the track itself (like a raceway?)
04:51
< Rhamphoryncus>
Do maglevs have a worse radius? Or is it the same with normal high speed?
04:52
<~Vornicus>
You can bank the turns - but then you have an ideal speed, and putting it too high makes lower-speed trains fall off the inside
04:53
<~Vornicus>
Or you can have active centroid adjusters on the trains so that the center of gravity moves toward the inside of the curve by tilting the cargo.
04:53
< Noah>
Ahh, yea, floating cargo
04:54
<~Vornicus>
Rham: I don't know how real maglevs work, but I think this is the same deal. I'm just doing center-of-mass calculations.
04:54
< Rhamphoryncus>
*nods*
04:54
< Noah>
It's sort of like a box on pistons, that attach to the actual train?
04:54
<~Vornicus>
Noah: yeah, that's floating cargo.
04:54
<~Vornicus>
Oh, third thing
04:55
<~Vornicus>
YOu can widen the gauge.
04:55
< Rhamphoryncus>
Most maglevs get creative in where they're attaching too. The transrapid wraps around. In theory it could push one side down to make up for the tendency to roll over, but I don't think it does
04:56
< Rhamphoryncus>
The other thing I think future train systems need is a zero headway ability. Attach to the train ahead while at speed.
04:56
< Noah>
Oh, that sounds fun
04:57
< Rhamphoryncus>
Definitely complicates things, heh
04:57
<~Vornicus>
"Complicates"? I would not get on that train.
04:57
< Rhamphoryncus>
It'd massively increase throughput, but it's very hard to allow switching with almost no space, nevermind having a robust enough safety system
04:58
< Rhamphoryncus>
But you get in a car?
04:59
< Noah>
Vornicus: Why not? Just don't eat before you attempt to board
04:59
<~Vornicus>
Cars can stop in 30 meters and get out of the way while doing it.
05:00
< Rhamphoryncus>
Magnets can do stupidly fast breaking and since you're normally levitating your wheels can use pneumatic rubber tires
05:01
< Rhamphoryncus>
You could actually approach it as an upgraded car system
05:02
< Rhamphoryncus>
Self-driving (which we're going to do anyway) and special lanes that let you activate maglev mode
05:11
< Rhamphoryncus>
Bluh. Now I just want to do more coding rather than playing
05:16
< Noah>
I really should install openttd
05:17
< Rhamphoryncus>
Yeah bitch, install it already :P
05:19
< Noah>
Installing
05:19 Eri [Eri@Nightstar-3e5deec3.gv.shawcable.net] has joined #code
05:20
< Rhamphoryncus>
Which version?
05:20
< Noah>
What ever is in my Repo
05:20
< Rhamphoryncus>
1.2.0 is at RC stage
05:21
< Rhamphoryncus>
hrm
05:22
< Noah>
Looks like 1.0.4-3
05:22
< Rhamphoryncus>
.. ancient
05:22
< Noah>
You're right, is there a ppa or something I can add for the newest?
05:24
< Rhamphoryncus>
I'm using an assortment of version control systems, mostly because I'm doing patching
05:25
< Rhamphoryncus>
Hrm. I'm not seeing a ppa of the RC
05:25
< Rhamphoryncus>
The PPA I do see isn't even the latest stable version
05:25
< Noah>
hah
05:26
< Rhamphoryncus>
.. and has it labelled as "active development" with 1.0 being "current stable release"
05:27 Syloq_Home [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Client closed the connection]
05:28
< Noah>
Looks like 1.1.4 is in pangolin
05:31
< Noah>
Oh, here's a deb on the main site
05:33
< Noah>
Still, a ppa would be nice
05:34
< Rhamphoryncus>
yeah
05:35
<~Vornicus>
Fuckin' Victory.
05:36 * Vornicus is Good At Math.
05:37 Syloq_Home [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code
05:38
< Noah>
Vornicus: Oh yea? What's 2 + 2?
05:39 * Noah downloads updated OpenSFX and OpenGFX, because the online content button is handy
05:39
<~Vornicus>
10
05:39
<~Vornicus>
(in base four, I'm fine)
05:39
<&Derakon>
Could've been base 3!
05:39
< Noah>
Damn, you outwitted me
05:40 * Vornicus randomly quotes Portal
05:43
< Rhamphoryncus>
So the reason I brought up train speed limits? For freight trains the UKRS set peaks at 2000. The NARS set peaks at 1940. Dutch goes to 2036. The builtin goes to 2035/2037
05:43
< Noah>
Map generated...now, how do I play this fucking game again?
05:43
< Rhamphoryncus>
(I actually thought dutch stopped earlier, but I wasn't including electrics)
05:43
< Rhamphoryncus>
Painfully :P
05:43
< Rhamphoryncus>
Then more pain.. then it becomes trivial
05:44
< Noah>
Wow, 1024x1024 makes a really big map
05:44
< Rhamphoryncus>
Yeah, it's rather excessive
05:45
< Rhamphoryncus>
I recommend 512x256 at most
05:46
<~Vornicus>
I used to play a lot on 64x128
05:47
< Noah>
Doing 256^2 now
06:20 Vash [Vash@Nightstar-cdeba41f.wlfrct.sbcglobal.net] has quit [[NS] Quit: I lovecraft Vorn!]
06:25 Derakon is now known as Derakon[AFK]
07:14 Tamber [tamber@furryhelix.co.uk] has quit [Ping timeout: 121 seconds]
07:18 Tamber [tamber@furryhelix.co.uk] has joined #code
07:18 mode/#code [+o Tamber] by ChanServ
07:22
< Rhamphoryncus>
Ergh. Apparently this industry newgrf (ECS's machinery vector) is broken. It takes 50 years to consume the stockpile of vehicles
07:28 Rhamphoryncus [rhamph@Nightstar-5697f7e2.abhsia.telus.net] has quit [Client exited]
07:37 himi [fow035@D741F1.243F35.CADC30.81D435] has quit [Ping timeout: 121 seconds]
08:33 Attilla [Obsolete@Nightstar-d8dc4e79.as43234.net] has joined #code
08:38 Attilla [Obsolete@Nightstar-d8dc4e79.as43234.net] has quit [Ping timeout: 121 seconds]
09:07 You're now known as TheWatcher
09:09 Attilla [Obsolete@Nightstar-d8dc4e79.as43234.net] has joined #code
09:27
< Tarinaky>
Reasons #109 why my project is taking so long...
09:27
< Tarinaky>
Writing a procedural Java state machine as a pipeline tool for populating some data file :/
09:47
<@TheWatcher>
I can't help but think that you're hugely overcomplicating a first year programming project~
09:48
< Tarinaky>
It's either that or hand edit an xml file :/
09:48
< Tarinaky>
And XML is spawn of satan.
09:48
< Tarinaky>
But yes. I get that feeling too.
09:48 * TheWatcher really never gets the xml hate, but meh
09:49
< Tarinaky>
It's difficult to edit by hand.
09:49
< Tarinaky>
Defeating the whole 'human readable' point.
09:49
<@TheWatcher>
Yeah, see, I don't have that
09:49
< Tarinaky>
Particularly since the library we're expected to use is particularly noxious.
10:03 Attilla [Obsolete@Nightstar-d8dc4e79.as43234.net] has quit [[NS] Quit: ]
10:06
< Tarinaky>
By all counts this is bad Java.
10:06
< Tarinaky>
But it's pretty sweet C >.>
10:12
< Tarinaky>
By which I mean this belongs to the category of "Reasons scientists shouldn't be allowed near compilers #76"
10:13
< Tarinaky>
I have four variables: state, c, s and i.
10:13
< Tarinaky>
>.>
10:13
< Tarinaky>
I'm a very bad man and I'm going to the hot place when I die.
10:18
< froztbyte>
haha
10:19
< froztbyte>
I'm okay with scientists near a computer language, they only need to do lots of practice like every other good code-emitting person
10:20
< froztbyte>
Tarinaky: there's some kde xml-editing tool which might be helpful
10:20
< froztbyte>
http://code.google.com/p/qxmledit/
10:22
< Tarinaky>
Not on KDE.
10:22
< Tarinaky>
Plus, I have xml editing tools.
10:23
< Tarinaky>
XMLEncode is just a complete pita to hand-write.
10:23
< Tarinaky>
Because it makes ridiculous assumptions.
10:23
< Tarinaky>
At least, ridiculous for my needs.
10:29
< Tarinaky>
This is also a fuck load more fun than actually working on the project itself.
10:29
< Tarinaky>
I've worked for an hour and a half nonstop :/
10:36 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
10:36 mode/#code [+o himi] by ChanServ
10:50
< froztbyte>
sorry, I shouldn't have said KDE, but rather Qt
10:50
< froztbyte>
but yeah, that's one option :P
10:50
< froztbyte>
and indeed, the other stuff is always more fun
10:51
< froztbyte>
during my little stint at university I recall one exam where my compiler (bloodshed.net dev-c++ environment, C++ course content) just wouldn't link in the included stuff
10:52
< froztbyte>
the included things in question being an obfuscated lib with headers and all, provided by the examiner
10:52
< froztbyte>
it was supposed to help with some animation or calculation thing
10:52
< froztbyte>
so I got to include that, write a note specifying that it didn't work, and rewrite the entire lib
10:52
< froztbyte>
all in the 3 hour window :D
11:00
< froztbyte>
http://comonad.com/reader/2012/wadlers-law-revisited/ --- ahahaha at HERP and DERP
11:05
< Tarinaky>
2hrs to write the editor
11:05
< Tarinaky>
5min to fill out the config file
11:06 * Tarinaky facepalms.
11:06
< Tarinaky>
*with it
11:19 Kindamoody is now known as Kindamoody|out
11:28
< Tarinaky>
Okay. Sod it. I'm taking a break for 30 min.
11:29 Reaper [Z@Nightstar-3602cf5a.cust.comxnet.dk] has joined #code
15:15 Attilla [Obsolete@Nightstar-d8dc4e79.as43234.net] has joined #code
15:48 Vash [Vash@Nightstar-cdeba41f.wlfrct.sbcglobal.net] has joined #code
15:48 mode/#code [+o Vash] by ChanServ
16:39 mode/#code [+o Syloq_Home] by ChanServ
16:50 Noah [noah@Nightstar-c74807e7.pools.spcsdns.net] has quit [Ping timeout: 121 seconds]
16:53 Noah [noah@Nightstar-c74807e7.pools.spcsdns.net] has joined #code
17:40 Serah [Z@Nightstar-3602cf5a.cust.comxnet.dk] has joined #code
17:45 Noah [noah@Nightstar-c74807e7.pools.spcsdns.net] has quit [Ping timeout: 121 seconds]
17:53
< gnolam>
http://vimeo.com/1854745
18:33 Kindamoody|out is now known as Kindamoody
19:13 Kindamoody is now known as Kindamoody[zZz]
19:14 Vornucopia [NSwebIRC@C888DE.7F9621.4A1301.BBBE7B] has joined #code
19:44 Kindamoody[zZz] [Kindamoody@Nightstar-6154a72a.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
19:44 Kindamoody[zZz] [Kindamoody@Nightstar-6154a72a.tbcn.telia.com] has joined #code
19:44 mode/#code [+o Kindamoody[zZz]] by ChanServ
20:43
<@ToxicFrog>
Pfft
20:43
<@ToxicFrog>
"There are "better" languages than Perl -- hell, there are lots of them, if you define "better" as "not being insane". Lisp, Smalltalk, Python, gosh, I could probably name 20 or 30 languages that are "better" than Perl, inasmuch as they don't look like that Sperm Whale that exploded in the streets of Taiwan over the summer. Whale guts everywhere, covering cars, motorcycles, pedestrians. That's Perl. It's charming, really.
20:43
<@ToxicFrog>
But Perl has many, many things going for it that, until recently, no other language had, and they compensated for its exo-intestinal qualities. You can make all sorts of useful things out of exploded whale, including perfume. It's quite useful. And so is Perl."
20:44
<&McMartin>
As of recently, no longer any reason to dynamite whales
20:52
< celticminstrel>
What things does it have going for it that no other language had?
20:55
<@ToxicFrog>
Wicked string processing + UNIX integration.
20:55
<@ToxicFrog>
(this quote is about ten years old)
20:59
< celticminstrel>
So what new languages have that? :P
20:59
< celticminstrel>
^newer
20:59
< celticminstrel>
Python isn't newer, is it?
21:01 Rhamphoryncus [rhamph@Nightstar-5697f7e2.abhsia.telus.net] has joined #code
21:01
<@ToxicFrog>
He was specifically referring to Ruby there, which at the time had just occurred.
21:02
<@ToxicFrog>
Python is, in fact, newever than Perl (but older than the article); however, what he's specifically referring to is the ability to use perl like some kind of rocket-powered turbo shell, with output redirection, string processing operators, backquotes, etc.
21:02
<@ToxicFrog>
Python can do all of these things, but they're all methods or module functions.
21:02
< celticminstrel>
Ah. Ruby's something I might actually consider using someday, unlike Perl. :P
21:03
< celticminstrel>
In fact I think I've used it a bit already.
21:03
<@ToxicFrog>
Yeah, the conclusion of that section is basically "Ruby took all of the good stuff from Perl but mostly avoided the whale guts, use it instead"
21:03
<@ToxicFrog>
(I'm not sure I agree on the "mostly avoided the whale guts" part, but I haven't used it extensively)
21:04
<&McMartin>
(I'm pretty sure I disagree, from all I hear)
21:04
<&McMartin>
Also
21:04
<&McMartin>
13:02 <@ToxicFrog> Python can do all of these things, but they're all methods or module functions.
21:04
<&McMartin>
Feature, not bug
21:07
<@ToxicFrog>
I agree with that with one reservation
21:07
< celticminstrel>
Oh?
21:08
<@ToxicFrog>
Which is that when you're using Perl the same way you use Bash, the existence of operators for output redirection, string manipulation, and forking helps a lot.
21:08
<@ToxicFrog>
(and if you're using perl for other purposes, you have gone badly wrong somewhere~)
21:09
<&McMartin>
Heh
21:09
< Rhamphoryncus>
Aye, the two contexts have conflicting goals
21:09
<&McMartin>
Yeah, the part I find unpleasant there is that it's so tightly bound to Unix that it's got a lot of extra wonkiness once you leave it
21:10
<&McMartin>
Python's method equivalents let you do much the same (sans fork, which isn't nearly as important as people insist =P) and it's write-once run-anywhere.
21:10
< Rhamphoryncus>
Except.. what a shell needs is easy *writing*. That doesn't mean it has to produce few characters on the screen. An IDE could treat them as shortcut keys and expand to something sane
21:11
<&McMartin>
heh
21:11
<&McMartin>
I have a dog in that fight~
21:11
<@ToxicFrog>
Yeah, my general take on Perl is that it is TurboBash; trying to use Perl for portable stuff is just as bad an idea as using Bash for portable stuff.
21:12
<@ToxicFrog>
It is a language for "I need to do something automatic to hundreds of log files, once, and bash's string manipulation won't cut it"
21:12
<&McMartin>
Hrm
21:12
<&McMartin>
I can't find the white paper
21:12
< Vornucopia>
http://mathbin.net/91907 Behold my might
21:12
<&McMartin>
Woo, might
21:12
<&McMartin>
Is it for something?
21:13
<&McMartin>
(There was a thing about Go where they write a big thing detailing the things they hate about Java)
21:13
<&McMartin>
(And my response was, roughly, "all of these things are featuers")
21:13
< Vornucopia>
Not really. Calc professor at work threw a problem around.
21:15
< Vornucopia>
That I marshalled tools from algebra 1 and 2, geometry, and calculus to do it, was probably the point.
21:16
< Rhamphoryncus>
I hate java's memory model. Yeah, it's a feature too.
21:16
<@ToxicFrog>
...Java's memory model?
21:16
<@ToxicFrog>
In what way?
21:16
< Rhamphoryncus>
It's not necessary to have one
21:17
<&McMartin>
There are two major things wrong with Java's memory model
21:17
< Rhamphoryncus>
And I don't mean like C. C has a memory model too (or at least POSIX does), it's just very very fragile
21:17
<@ToxicFrog>
You're going to have to expand on this
21:17
<@Tamber>
ToxicFrog, "NOMNOMNOMNOM"
21:17
<&McMartin>
No, that's a VM implementation detail
21:17
<&McMartin>
JVM implementations rarely if ever call brk() post gc
21:18
<&McMartin>
That's not a flaw in the language or the VM itself
21:18
<&McMartin>
That the VM's idea of the heap is in terms of Java Objects, however, *is* a flaw in the VM
21:18
< Rhamphoryncus>
My explorations with python-safethread revealed it's possible to have concurrency without ever exposing atomicity of primitives.
21:19
<&McMartin>
It vastly complicates targeting the JVM with other languages and is part of the reason tail call elimination is impossible in the general case
21:19
< Rhamphoryncus>
Memory model as in concurrency
21:19
<&McMartin>
Rhamphoryncus: Don't take this the wrong way, but if you were a pickpocket, you'd only rob people carrying a million dollars in cash~
21:20
< Rhamphoryncus>
heh
21:20
< Rhamphoryncus>
That's an interesting way of putting it
21:20 * McMartin stole it from Godel Escher Bach
21:20
<@ToxicFrog>
I am now completely lost
21:20
<&McMartin>
Rham has discovered something that is, to him, like currying was to me or typeclasses were to you
21:21
<&McMartin>
A thing that Spoils You Forever (tm)
21:21
<&McMartin>
This is my reading of it, anyway
21:21
<&McMartin>
Java *is* infamous for fuckups involving memory, but that wasn't what he meant there.
21:21 * Rhamphoryncus never got through GEB
21:21
<@ToxicFrog>
(and, yes, of course it's possible to have to concurrency without atomic primitives or even, for that matter, a concept of "primitive" as opposed to "object")
21:21
<&McMartin>
Rhamphoryncus: If you try again, stop after the chapter "On formally undecidable propositions in TNT and related systems" because he goes off the rails after that
21:21
<@ToxicFrog>
(the dichotomy of which is a recurring offpiss for me in Java)
21:22
< Rhamphoryncus>
heh
21:22
<&McMartin>
Hm. Now maybe I'm reading Rham wrong
21:22
<&McMartin>
I haven't used safethread.
21:22
<&McMartin>
I read what he said as "you don't need to expose a concurrency API to have safe concurrency if you do language design tricks A B C"
21:22
< Rhamphoryncus>
It was an experiment. The performance was ultimately a failure
21:22
< celticminstrel>
I wonder if GEB is in the basement somewhere... I know it used to be, but...
21:23
<&McMartin>
Anyway, to the thing I was going for in the first place...
21:23
<&McMartin>
Go's justification was something like "too many langauges these days make programs be the programmer trying to prove a point in a formal debate, and we wanted something that was more conversational"
21:24
< Rhamphoryncus>
McMartin: Other way around. If you do tricks A B C then you have safe concurrency. Java is robust but not safe. C is neither robust nor safe.
21:24
<&McMartin>
Hm. Can you define "robust" and "safe" in this context?
21:25
<&McMartin>
(If there's a "conservative" or "sound" floating around please do those too to save us the time of asking later~)
21:25
< Rhamphoryncus>
Java doesn't have undefined behaviour. Any mistakes can corrupt local memory but not the rest of the program
21:25
<&McMartin>
(:shake fist at type theorists and dataflow theorists, who define many things EXACTLY OPPOSITELY:)
21:25
< Rhamphoryncus>
And they'll corrupt in a well defined way
21:26
< Rhamphoryncus>
But.. it's still corrupted. You have to worry about how the compiler will reorder instructions, which ones are atomic and which aren't, etc. That's unsafe.
21:27
<@ToxicFrog>
See, I thought one of the Big Shiny Features of Java - back when people still thought that shared-memory concurrency was the way to go - was that all operations on synchronized objects were atomic WRT to that object.
21:28
<&McMartin>
That's not the same thing as safe, or deadlock-free
21:28
< Rhamphoryncus>
That's what it says on the box. Turns out the synchronized feature is a POS :)
21:28
<&McMartin>
Some of this is because we were still, theoretically, Bad At Multithreading in 1995.
21:28
<&McMartin>
The true guarantees are now lesser.
21:28
<@ToxicFrog>
McMartin: this is true; I'm not saying it is.
21:28
< Rhamphoryncus>
synchronized is just the same as using a lock in C. Just as easy to bypass, just as limited in application.
21:29
<&McMartin>
Rhamphoryncus: There are two improvements over standard C/Pthreads mutexes
21:29
<&McMartin>
(a) They are recursive
21:29
<&McMartin>
(b) Lock/unlock is controlled via scoping
21:29
<&McMartin>
(b) is honestly pretty huge.
21:30
< Rhamphoryncus>
Recursive is situation, and I forget about scoping because it's such a trivial syntax trick
21:30
< Rhamphoryncus>
situational*
21:30
< Rhamphoryncus>
So yes, it's quite an upgrade over C
21:30 ToxicDroid [ToxicFrog@Nightstar-58fa4b17.cable.teksavvy.com] has joined #code
21:31
< Rhamphoryncus>
If you grew up on C being taught the horrors of threading then Java changes everything
21:31
<&McMartin>
It's trivial but the only languages that do it right everywhere are Delphi and C# -_-
21:31
<&McMartin>
try-finally is *almost* right, but variable lifetime is wrong for the general use case
21:31
< Rhamphoryncus>
Anything wrong with what Python does?
21:32
<&McMartin>
The GIL~
21:32
< Rhamphoryncus>
I meant python's with-statement :)
21:33
<&McMartin>
Oh, sorry
21:33
< Vornucopia>
I still haven't figured out with
21:33
<&McMartin>
Python intrinsically doesn't have this problem, because variables are never destructed until you return from a function
21:33
<&McMartin>
This is only for languages with static variable declaration.
21:33
< Rhamphoryncus>
I don't like how with is implemented, but that's more of a nitty-gritty detail
21:34
< Rhamphoryncus>
*nods* Fair enough
21:34
<&McMartin>
(C++ gets you most of the way with precise destructors, and with the preprocessor jackassery that is BOOST_SCOPE_EXIT you get the rest of the way.)
21:35
< Rhamphoryncus>
heh
21:38
< Namegduf>
try-finally is so handy until you're writing async code, and suddenly you're in error cleanup hell.
21:39
< Rhamphoryncus>
heh
21:39
< Rhamphoryncus>
I'm not find of async
21:39
<@ToxicFrog>
Hmm. Thought: synchronized makes concurrent code in Java easier to write than C because you spend less time micromanaging your mutexes, but just as unpleasant to design because it's based around the same unpleasant assumption of concurrently accessed and updated shared state.
21:39 ToxicDroid [ToxicFrog@Nightstar-58fa4b17.cable.teksavvy.com] has quit [Ping timeout: 121 seconds]
21:39
< Rhamphoryncus>
ToxicFrog: Sounds right to me
21:39
< Namegduf>
Both are very simple so long as you don't have circular references
21:39
<@ToxicFrog>
Also, what does python-safethread do?
21:39
< Namegduf>
Both are nightmares if you have circular references
21:40 ToxicDroid [ToxicFrog@Nightstar-58fa4b17.cable.teksavvy.com] has joined #code
21:40
< Namegduf>
I don't really fuss much given that.
21:40
< Rhamphoryncus>
ToxicFrog: it adds a real monitors model, based on shareable vs unshareable objects. It also removes the GIL.. but I wasn't able to get the GC to scale
21:43
<@ToxicFrog>
"monitors model"?
21:43
< Rhamphoryncus>
IMO, programs need to shift more towards being database-driven, ie all the state is stored in a persistent database and the logic (functions) are transient. Well, when I say "all" I mean the higher level, long-running stuff. The exact tradeoffs are still pretty iffy
21:43
<@ToxicFrog>
(for perspective, the three concurrency models I'm familiar with are C-style (shared memory, locking for synchronization), Thoth-style (shared memory, message passes for synchronization) and MPI-style (local memory, message passes for synchronization)
21:44
< Rhamphoryncus>
Monitors are like locks, but enforced. You can't bypass them to break things, but you can share certain objects that are safe (such as another monitor or an immutable int)
21:45
< Rhamphoryncus>
Java labels itself as monitors, but is really just lucks.
21:45
< Rhamphoryncus>
locks*
21:45 ToxicDroid [ToxicFrog@Nightstar-58fa4b17.cable.teksavvy.com] has quit [Client closed the connection]
21:45
< Rhamphoryncus>
Monitors are conceptually a synchronous MPI. Your messages are just function calls/returns.
21:46 ToxicDroid [ToxicFrog@Nightstar-88fcc0b4.eng.wind.ca] has joined #code
21:46
< ToxicDroid>
Ouch.
21:47
< ToxicDroid>
Ok, what is it that makes them 'like locks but safe'?
21:47
< Rhamphoryncus>
They're enforced. If an attribute is within the monitor then you can't access it without first entering the monitor
21:47
<&McMartin>
Rhamphoryncus: ... that's not safe
21:48
<&McMartin>
For the same reason synchronized methods arent'.
21:48
< Namegduf>
How does that differ from an object with only synchronized methods in Java?
21:48
< Rhamphoryncus>
A thread can only be within one monitor at a time (although it can hold others)
21:48
< Rhamphoryncus>
synchronized methods are trivially bypassed
21:48
< Namegduf>
So their only distinction is in that they're harder for a programmer deliberately trying to do things wrong to do things wrong?
21:49
< Namegduf>
Or is there some kind of trivial bypass which doesn't involve knowing about it?
21:49
<&McMartin>
If you have a conceptually atomic operation that doesn't take the monitor for itself first, you can end up with race conditions even there.
21:49
< Namegduf>
It doesn't sound like it helps with deadlocks, which are really the only cases I've ever found any of the logic around these things tricky
21:50
< Rhamphoryncus>
Monitors are separate from the object itself, so you start with the assumption of grouping things together, as opposed to java which made each object independently locked
21:51
< Rhamphoryncus>
Yes, it's still possible to produce a deadlock, but it's *always* possible to produce a cyclic dependency in some form. My implementation would detect and break deadlocks (with an exception)
21:53 Vornucopia [NSwebIRC@C888DE.7F9621.4A1301.BBBE7B] has quit [[NS] Quit: Page closed]
21:54
< Rhamphoryncus>
I also didn't intend them to be the only tool available. The shareable vs unshareable concept can be built on with various other constructs
21:54
<&McMartin>
Yeah
21:54
<&McMartin>
The thing is
21:54
<&McMartin>
One of the holes in Java's sycnhronization stuff is you can write code that says, say
21:54
<&McMartin>
x = o.getBalance(); x += y; o.setBalance(x);
21:55
<&McMartin>
Which is as bad as having no lock at all, even when all of o's methods are synchronized.
21:55
< Rhamphoryncus>
yup
21:55
< Rhamphoryncus>
Same as a deadlock, always possible
21:55
<&McMartin>
It doesn't sound like your system gets around that... yeah.
21:55
< Rhamphoryncus>
In that particular case I was pondering having a way to grab a monitor before actually calling it
21:56
< Rhamphoryncus>
Which.. come to think of it I did have some recursive lock semantics. I can't remember the details
21:56
<&McMartin>
Well, in Java, the way you do that one right is
21:56
<&McMartin>
synchronized(o) { x = o.getBalance()... /* etc */ }
21:57
< Rhamphoryncus>
Yeah, it would have been like that
21:57
< Rhamphoryncus>
I might even have getBalance/setBalance require you be within the monitor but not automatically enter for you
21:58
<&McMartin>
There are C++ idioms for that, but they rely on C++ compilation quirks mandated by the standard/semantics. -_-
21:58
< Rhamphoryncus>
heh
21:58
<&McMartin>
(Specifically, you have a Monitor object that enters on construction and exits on destruction: then you require a const reference to a monitor in the args list of getBalance() and friends.)
21:59 * Rhamphoryncus nods
22:00
<&McMartin>
(It doesn't make sure you locked THAT OBJECT but I don't believe you can enforce that with typechecking alone without bringing in Haskell-monad levels of intrusion.)
22:00
< Rhamphoryncus>
safethread could, but it's baked in to the language.. and done at runtime, heh
22:01
<&McMartin>
Yeah, C++ you can do it at runtime by having the monitor know the object it's on and putting an assertion in the method.
22:01
< Rhamphoryncus>
yeah
22:13 ToxicDroid2 [ToxicFrog@Nightstar-58fa4b17.cable.teksavvy.com] has joined #code
22:14 * ToxicFrog pokes his phone with a stick
22:15
<&McMartin>
THE ENRICHMENT CENTER REMINDS YOU THAT ANDROID HELL IS A REAL PLACE WHERE YOU WILL BE SENT AT THE FIRST SIGN OF DEFIANCE
22:15 ToxicDroid2 [ToxicFrog@Nightstar-58fa4b17.cable.teksavvy.com] has quit [[NS] Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org]
22:15 ToxicDroid [ToxicFrog@Nightstar-88fcc0b4.eng.wind.ca] has quit [Ping timeout: 121 seconds]
22:15
< Rhamphoryncus>
Mine would disconnected the wireless if I didn't poke it regularly
22:16
<@ToxicFrog>
The issue here is that I was getting groceries, and the apartment building stairwell is a dead zone
22:16
< Rhamphoryncus>
*squints* I might have disabled that when plugged in
22:49 Attilla_ [Obsolete@Nightstar-c23b61b3.threembb.co.uk] has joined #code
22:50 * Rhamphoryncus ponders what the passenger speed threshold curve should look like
22:50 Attilla [Obsolete@Nightstar-d8dc4e79.as43234.net] has quit [Ping timeout: 121 seconds]
22:53 Attilla_ is now known as Attilla
23:15
< Rhamphoryncus>
map_type Yes MAP_TYPE_XXX with XXX = [RECTANGULAR | X_BIGGER | Y_BIGGER]
23:15
< Rhamphoryncus>
Still manages to leave me speechless
23:17 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
23:25
<@ToxicFrog>
?
23:31 gnolaptop [lenin@Nightstar-202a5047.priv.bahnhof.se] has joined #code
23:32 gnolaptop [lenin@Nightstar-202a5047.priv.bahnhof.se] has quit [[NS] Quit: Gone]
23:40
< Rhamphoryncus>
should be square | x_bigger | y_bigger
23:40
< Rhamphoryncus>
It's *always* a rectangle
--- Log closed Thu Apr 05 00:00:39 2012
code logs -> 2012 -> Wed, 04 Apr 2012< code.20120403.log - code.20120405.log >

[ Latest log file ]